@tempots/beatui 0.89.0 → 0.91.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/dist/{ar-MUKILk4c.js → ar-8Cko5i-Z.js} +18 -10
- package/dist/{ar-CBrjAlIY.cjs → ar-D2DjoXta.cjs} +1 -1
- package/dist/auth/index.cjs.js +1 -1
- package/dist/auth/index.es.js +1 -1
- package/dist/{auth-divider-DvVmqjnk.js → auth-divider-B4n8lGx5.js} +7 -7
- package/dist/{auth-divider-Cj-xJxF_.cjs → auth-divider-VzrKnv2d.cjs} +1 -1
- package/dist/beatui.css +88 -79
- package/dist/beatui.tailwind.css +88 -79
- package/dist/better-auth/index.cjs.js +1 -1
- package/dist/better-auth/index.es.js +5 -5
- package/dist/{de-CEsW1rVX.js → de-Bt-d2iKj.js} +12 -4
- package/dist/{de-CrBw41po.cjs → de-Cdf3432J.cjs} +1 -1
- package/dist/{deep-merge-OvVqSLSN.js → deep-merge-BdRgguFO.js} +38 -38
- package/dist/deep-merge-CI1g9sjh.cjs +1 -0
- package/dist/{duration-input-BCXujp0V.js → duration-input-BZhzeELL.js} +4 -4
- package/dist/{duration-input-MJz6UO6E.cjs → duration-input-a1fCTfKl.cjs} +1 -1
- package/dist/{editor-toolbar-group-Cnta0SOa.js → editor-toolbar-group-CzdBZ1yr.js} +2 -2
- package/dist/{editor-toolbar-group-BgWLVgMZ.cjs → editor-toolbar-group-DhKJdqER.cjs} +1 -1
- package/dist/{es-ChP-aFwC.js → es-2llfNFX2.js} +10 -2
- package/dist/{es-Ca5xT3NE.cjs → es-6fFPkKHL.cjs} +1 -1
- package/dist/{fa-CNsrlIqh.js → fa-CQVIBjKP.js} +18 -10
- package/dist/{fa-DhZJYuC6.cjs → fa-GXyNzAXz.cjs} +1 -1
- package/dist/{fr-1nSKSIlw.cjs → fr-C6EYTwSH.cjs} +1 -1
- package/dist/{fr-DgEFKpML.js → fr-CC3smTlW.js} +19 -11
- package/dist/{he-DhcurPt5.cjs → he-CJUgxvi8.cjs} +1 -1
- package/dist/{he-B4TqfISZ.js → he-CZilsN75.js} +16 -8
- package/dist/{hi-TSoDsngT.js → hi-CAZjwGv-.js} +16 -8
- package/dist/{hi-CxsIxbfM.cjs → hi-DqIR4VtX.cjs} +1 -1
- package/dist/{index-D4ZFV8Rs.cjs → index-B-cwxUsP.cjs} +1 -1
- package/dist/{index-DOc1_-Nm.js → index-BFzxpY7y.js} +1 -1
- package/dist/{index-D3QVPAme.cjs → index-BOC0cVoY.cjs} +2 -2
- package/dist/{index-D_aTUfqS.js → index-DJ9YIJcG.js} +6 -6
- package/dist/index.cjs.js +2 -2
- package/dist/index.es.js +1847 -1822
- package/dist/{input-container-BBWCDGTv.js → input-container-9r1F3KuX.js} +1 -1
- package/dist/{input-container-B31Seozh.cjs → input-container-DiYEl_y8.cjs} +1 -1
- package/dist/{it-D_IcaYxp.cjs → it-BvHsJ7fH.cjs} +1 -1
- package/dist/{it-BrbebXg4.js → it-D6RXFIL6.js} +19 -11
- package/dist/{ja-CMGqpPo7.cjs → ja-B2gP7OHY.cjs} +1 -1
- package/dist/{ja-DcfOktrV.js → ja-D7zsz4Ij.js} +15 -7
- package/dist/json-schema/index.cjs.js +1 -1
- package/dist/json-schema/index.es.js +11 -12
- package/dist/json-schema-display/index.cjs.js +1 -1
- package/dist/json-schema-display/index.es.js +1 -1
- package/dist/json-structure/index.cjs.js +1 -1
- package/dist/json-structure/index.es.js +6 -6
- package/dist/{ko-BPl5rP97.cjs → ko-BddhddIA.cjs} +1 -1
- package/dist/{ko-73e6t369.js → ko-taN2Npr4.js} +12 -4
- package/dist/lexical/index.cjs.js +30 -30
- package/dist/lexical/index.es.js +5741 -5527
- package/dist/lexical.css +31 -28
- package/dist/{modal-jJMS0ZlW.cjs → modal-C-d5Btti.cjs} +1 -1
- package/dist/{modal-BBJWY7NB.js → modal-DTz98Dk7.js} +3 -3
- package/dist/{nl-BSfaHFt0.cjs → nl-COrtZUnH.cjs} +1 -1
- package/dist/{nl-Bq-1-ulc.js → nl-CRC6r4Q4.js} +22 -14
- package/dist/{notice-9lpZ-VDn.cjs → notice-BDTfBGtx.cjs} +1 -1
- package/dist/{notice-AUVH8Lho.js → notice-CZuh-h6a.js} +4 -4
- package/dist/{oneof-branch-detection-BsGhMslW.cjs → oneof-branch-detection-D6Xa8qNR.cjs} +1 -1
- package/dist/{oneof-branch-detection-BQnRjp9P.js → oneof-branch-detection-DCPwyutI.js} +1 -1
- package/dist/{pl-D-O4sCnr.cjs → pl-BHI4zBgV.cjs} +1 -1
- package/dist/{pl-Du9-VCfW.js → pl-C6qNs0Lq.js} +19 -11
- package/dist/prosemirror/index.cjs.js +1 -1
- package/dist/prosemirror/index.es.js +1 -1
- package/dist/{pt-chEEYLlt.cjs → pt-BGzC9MhU.cjs} +1 -1
- package/dist/{pt-B2UqqSAB.js → pt-CcWPLqBh.js} +20 -12
- package/dist/{ru-B46hVpFF.cjs → ru-CXeFbIPb.cjs} +1 -1
- package/dist/{ru-DiWa2inw.js → ru-Dt9-9m0E.js} +20 -12
- package/dist/tailwind/vite-plugin.es.js +0 -1
- package/dist/{text-input-6FD7p7hN.js → text-input-BgPx8BbG.js} +1 -1
- package/dist/{text-input-w0eVcqk5.cjs → text-input-DUnhBUd6.cjs} +1 -1
- package/dist/{toolbar-Cr0JGj5h.js → toolbar-DKOh_gbA.js} +1 -1
- package/dist/{toolbar-BR8In7O0.cjs → toolbar-Dkc2y1dI.cjs} +1 -1
- package/dist/{tr-Culcm2Zb.js → tr-CDTWeRY0.js} +14 -6
- package/dist/{tr-CaMaflJL.cjs → tr-CdOtQAtA.cjs} +1 -1
- package/dist/{translations-CZ0KOii3.cjs → translations-BdCtLBZt.cjs} +1 -1
- package/dist/{translations-uEUkO6gJ.js → translations-CiBhB2FV.js} +135 -127
- package/dist/translations-Cy9hoMGV.cjs +1 -0
- package/dist/{translations-Cttn6w0G.js → translations-NBY7SubC.js} +1 -1
- package/dist/types/beatui-i18n/default.d.ts +8 -0
- package/dist/types/beatui-i18n/locales/en.d.ts +8 -0
- package/dist/types/beatui-i18n/translations.d.ts +8 -0
- package/dist/types/components/form/input/index.d.ts +2 -0
- package/dist/types/components/form/input/nullable-color-input.d.ts +31 -0
- package/dist/types/components/form/input/nullable-color-swatch-input.d.ts +39 -0
- package/dist/types/components/lexical/table/table-controls.d.ts +3 -1
- package/dist/types/components/lexical/toolbar/index.d.ts +1 -0
- package/dist/types/components/lexical/toolbar/toolbar-registry.d.ts +16 -0
- package/dist/types/lexical/index.d.ts +2 -1
- package/dist/types/lexical/plugins/element-style.d.ts +29 -0
- package/dist/types/lexical/plugins/index.d.ts +1 -0
- package/dist/types/lexical/types.d.ts +43 -2
- package/dist/{ur-CvGP14xo.cjs → ur-C7itXvnC.cjs} +1 -1
- package/dist/{ur-Deb-uH6b.js → ur-CLrK5FPQ.js} +16 -8
- package/dist/{use-form-lg6-7Brc.js → use-form-Cd8YFWaN.js} +3 -3
- package/dist/{use-form-i97PToWB.cjs → use-form-DQVN_Zjb.cjs} +2 -2
- package/dist/{vi-CUsCVh3n.js → vi-B1_QDUQJ.js} +21 -13
- package/dist/{vi-Df4WZe9y.cjs → vi-CQrUWB3y.cjs} +1 -1
- package/dist/{widget-customization-CDD72zYs.js → widget-customization-BY4Ox_4e.js} +25 -25
- package/dist/{widget-customization-BLvD4Lqt.cjs → widget-customization-eyQ2pxvu.cjs} +1 -1
- package/dist/{zh-C5a9NGFW.cjs → zh-DWswYYTS.cjs} +1 -1
- package/dist/{zh-Dil2Jft8.js → zh-rDtQ92Pp.js} +12 -4
- package/package.json +1 -1
- package/dist/deep-merge-Dgy9xj6w.cjs +0 -1
- package/dist/translations-gVgMyNno.cjs +0 -1
package/dist/beatui.tailwind.css
CHANGED
|
@@ -252,49 +252,12 @@
|
|
|
252
252
|
--spacing-none: 0;
|
|
253
253
|
--spacing-px: 1px;
|
|
254
254
|
--spacing-base: 0.25rem;
|
|
255
|
-
--spacing-xs: calc(var(--spacing-base) / 2);
|
|
256
|
-
--spacing-sm: var(--spacing-base);
|
|
257
|
-
--spacing-smh: calc(var(--spacing-base) * 1.5);
|
|
258
|
-
--spacing-md: calc(var(--spacing-base) * 2);
|
|
259
|
-
--spacing-mdh: calc(var(--spacing-base) * 3);
|
|
260
|
-
--spacing-lg: calc(var(--spacing-base) * 4);
|
|
261
|
-
--spacing-lgh: calc(var(--spacing-base) * 5);
|
|
262
|
-
--spacing-xl: calc(var(--spacing-base) * 6);
|
|
263
|
-
--spacing-2xl: calc(var(--spacing-base) * 8);
|
|
264
|
-
--spacing-2xlh: calc(var(--spacing-base) * 10);
|
|
265
|
-
--spacing-3xl: calc(var(--spacing-base) * 12);
|
|
266
|
-
--spacing-4xl: calc(var(--spacing-base) * 16);
|
|
267
255
|
--spacing-full: 2000px;
|
|
268
256
|
--font-size-base: 1rem;
|
|
269
|
-
--font-size-3xs: calc(var(--font-size-base) * 0.5);
|
|
270
|
-
--font-size-3xs-lh: calc(var(--font-size-base) * 0.75);
|
|
271
|
-
--font-size-2xs: calc(var(--font-size-base) * 0.625);
|
|
272
|
-
--font-size-2xs-lh: calc(var(--font-size-base) * 0.75);
|
|
273
|
-
--font-size-xs: calc(var(--font-size-base) * 0.75);
|
|
274
|
-
--font-size-xs-lh: var(--font-size-base);
|
|
275
|
-
--font-size-sm: calc(var(--font-size-base) * 0.875);
|
|
276
|
-
--font-size-sm-lh: calc(var(--font-size-base) * 1.25);
|
|
277
|
-
--font-size-md: var(--font-size-base);
|
|
278
|
-
--font-size-md-lh: calc(var(--font-size-base) * 1.5);
|
|
279
|
-
--font-size-lg: calc(var(--font-size-base) * 1.125);
|
|
280
|
-
--font-size-lg-lh: calc(var(--font-size-base) * 1.75);
|
|
281
|
-
--font-size-xl: calc(var(--font-size-base) * 1.25);
|
|
282
|
-
--font-size-xl-lh: calc(var(--font-size-base) * 1.75);
|
|
283
|
-
--font-size-2xl: calc(var(--font-size-base) * 1.5);
|
|
284
|
-
--font-size-2xl-lh: calc(var(--font-size-base) * 2);
|
|
285
|
-
--font-size-3xl: calc(var(--font-size-base) * 1.875);
|
|
286
|
-
--font-size-3xl-lh: calc(var(--font-size-base) * 2.25);
|
|
287
|
-
--font-size-4xl: calc(var(--font-size-base) * 2.25);
|
|
288
|
-
--font-size-4xl-lh: calc(var(--font-size-base) * 2.5);
|
|
289
|
-
--font-size-5xl: calc(var(--font-size-base) * 3);
|
|
290
257
|
--font-size-5xl-lh: 1;
|
|
291
|
-
--font-size-6xl: calc(var(--font-size-base) * 3.75);
|
|
292
258
|
--font-size-6xl-lh: 1;
|
|
293
|
-
--font-size-7xl: calc(var(--font-size-base) * 4.5);
|
|
294
259
|
--font-size-7xl-lh: 1;
|
|
295
|
-
--font-size-8xl: calc(var(--font-size-base) * 6);
|
|
296
260
|
--font-size-8xl-lh: 1;
|
|
297
|
-
--font-size-9xl: calc(var(--font-size-base) * 8);
|
|
298
261
|
--font-size-9xl-lh: 1;
|
|
299
262
|
--font-weight-thin: 100;
|
|
300
263
|
--font-weight-extralight: 200;
|
|
@@ -329,11 +292,6 @@
|
|
|
329
292
|
--breakpoint-xl: 80rem;
|
|
330
293
|
--breakpoint-2xl: 96rem;
|
|
331
294
|
--radius-none: 0;
|
|
332
|
-
--radius-xs: var(--spacing-xs);
|
|
333
|
-
--radius-sm: var(--spacing-sm);
|
|
334
|
-
--radius-md: var(--spacing-smh);
|
|
335
|
-
--radius-lg: var(--spacing-md);
|
|
336
|
-
--radius-xl: var(--spacing-mdh);
|
|
337
295
|
--radius-full: 9999px;
|
|
338
296
|
--shadow-none: none;
|
|
339
297
|
--shadow-2xs: 0 1px rgb(0 0 0 / 0.05);
|
|
@@ -351,10 +309,7 @@
|
|
|
351
309
|
--shadow-top-xl: 0 -20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
|
|
352
310
|
--shadow-top-2xl: 0 -25px 50px -12px rgb(0 0 0 / 0.25);
|
|
353
311
|
--motion-duration-instant: 0s;
|
|
354
|
-
--motion-duration-fast: calc(var(--motion-duration-base) * 0.6);
|
|
355
312
|
--motion-duration-base: 200ms;
|
|
356
|
-
--motion-duration-slow: calc(var(--motion-duration-base) * 1.6);
|
|
357
|
-
--motion-duration-relaxed: calc(var(--motion-duration-base) * 2.4);
|
|
358
313
|
--motion-easing-standard: cubic-bezier(0.2, 0, 0, 1);
|
|
359
314
|
--motion-easing-emphasized: cubic-bezier(0.33, 1, 0.68, 1);
|
|
360
315
|
--motion-easing-entrance: cubic-bezier(0, 0, 0.2, 1);
|
|
@@ -383,6 +338,60 @@
|
|
|
383
338
|
--outline-width-none: 0;
|
|
384
339
|
--outline-width-default: 1px;
|
|
385
340
|
--outline-width-focus: 2px;
|
|
341
|
+
--overlay-width-xs: min(20rem, 90vw);
|
|
342
|
+
--overlay-width-sm: min(25rem, 90vw);
|
|
343
|
+
--overlay-width-md: min(37.5rem, 90vw);
|
|
344
|
+
--overlay-width-lg: min(50rem, 90vw);
|
|
345
|
+
--overlay-width-xl: min(62.5rem, 90vw);
|
|
346
|
+
--overlay-width-min-width: 12rem;
|
|
347
|
+
}
|
|
348
|
+
|
|
349
|
+
*, ::before, ::after {
|
|
350
|
+
--spacing-xs: calc(var(--spacing-base) / 2);
|
|
351
|
+
--spacing-sm: var(--spacing-base);
|
|
352
|
+
--spacing-smh: calc(var(--spacing-base) * 1.5);
|
|
353
|
+
--spacing-md: calc(var(--spacing-base) * 2);
|
|
354
|
+
--spacing-mdh: calc(var(--spacing-base) * 3);
|
|
355
|
+
--spacing-lg: calc(var(--spacing-base) * 4);
|
|
356
|
+
--spacing-lgh: calc(var(--spacing-base) * 5);
|
|
357
|
+
--spacing-xl: calc(var(--spacing-base) * 6);
|
|
358
|
+
--spacing-2xl: calc(var(--spacing-base) * 8);
|
|
359
|
+
--spacing-2xlh: calc(var(--spacing-base) * 10);
|
|
360
|
+
--spacing-3xl: calc(var(--spacing-base) * 12);
|
|
361
|
+
--spacing-4xl: calc(var(--spacing-base) * 16);
|
|
362
|
+
--font-size-3xs: calc(var(--font-size-base) * 0.5);
|
|
363
|
+
--font-size-3xs-lh: calc(var(--font-size-base) * 0.75);
|
|
364
|
+
--font-size-2xs: calc(var(--font-size-base) * 0.625);
|
|
365
|
+
--font-size-2xs-lh: calc(var(--font-size-base) * 0.75);
|
|
366
|
+
--font-size-xs: calc(var(--font-size-base) * 0.75);
|
|
367
|
+
--font-size-xs-lh: var(--font-size-base);
|
|
368
|
+
--font-size-sm: calc(var(--font-size-base) * 0.875);
|
|
369
|
+
--font-size-sm-lh: calc(var(--font-size-base) * 1.25);
|
|
370
|
+
--font-size-md: var(--font-size-base);
|
|
371
|
+
--font-size-md-lh: calc(var(--font-size-base) * 1.5);
|
|
372
|
+
--font-size-lg: calc(var(--font-size-base) * 1.125);
|
|
373
|
+
--font-size-lg-lh: calc(var(--font-size-base) * 1.75);
|
|
374
|
+
--font-size-xl: calc(var(--font-size-base) * 1.25);
|
|
375
|
+
--font-size-xl-lh: calc(var(--font-size-base) * 1.75);
|
|
376
|
+
--font-size-2xl: calc(var(--font-size-base) * 1.5);
|
|
377
|
+
--font-size-2xl-lh: calc(var(--font-size-base) * 2);
|
|
378
|
+
--font-size-3xl: calc(var(--font-size-base) * 1.875);
|
|
379
|
+
--font-size-3xl-lh: calc(var(--font-size-base) * 2.25);
|
|
380
|
+
--font-size-4xl: calc(var(--font-size-base) * 2.25);
|
|
381
|
+
--font-size-4xl-lh: calc(var(--font-size-base) * 2.5);
|
|
382
|
+
--font-size-5xl: calc(var(--font-size-base) * 3);
|
|
383
|
+
--font-size-6xl: calc(var(--font-size-base) * 3.75);
|
|
384
|
+
--font-size-7xl: calc(var(--font-size-base) * 4.5);
|
|
385
|
+
--font-size-8xl: calc(var(--font-size-base) * 6);
|
|
386
|
+
--font-size-9xl: calc(var(--font-size-base) * 8);
|
|
387
|
+
--radius-xs: var(--spacing-xs);
|
|
388
|
+
--radius-sm: var(--spacing-sm);
|
|
389
|
+
--radius-md: var(--spacing-smh);
|
|
390
|
+
--radius-lg: var(--spacing-md);
|
|
391
|
+
--radius-xl: var(--spacing-mdh);
|
|
392
|
+
--motion-duration-fast: calc(var(--motion-duration-base) * 0.6);
|
|
393
|
+
--motion-duration-slow: calc(var(--motion-duration-base) * 1.6);
|
|
394
|
+
--motion-duration-relaxed: calc(var(--motion-duration-base) * 2.4);
|
|
386
395
|
--control-height-xs: calc(var(--spacing-base) * 7);
|
|
387
396
|
--control-height-sm: calc(var(--spacing-base) * 8);
|
|
388
397
|
--control-height-md: calc(var(--spacing-base) * 10);
|
|
@@ -403,17 +412,14 @@
|
|
|
403
412
|
--control-gap-md: var(--spacing-smh);
|
|
404
413
|
--control-gap-lg: var(--spacing-md);
|
|
405
414
|
--control-gap-xl: var(--spacing-mdh);
|
|
406
|
-
--overlay-width-xs: min(20rem, 90vw);
|
|
407
|
-
--overlay-width-sm: min(25rem, 90vw);
|
|
408
|
-
--overlay-width-md: min(37.5rem, 90vw);
|
|
409
|
-
--overlay-width-lg: min(50rem, 90vw);
|
|
410
|
-
--overlay-width-xl: min(62.5rem, 90vw);
|
|
411
|
-
--overlay-width-min-width: 12rem;
|
|
412
415
|
}
|
|
413
416
|
|
|
414
417
|
}
|
|
415
418
|
@layer base {
|
|
416
419
|
:root {
|
|
420
|
+
}
|
|
421
|
+
|
|
422
|
+
*, ::before, ::after {
|
|
417
423
|
--color-primary-50: var(--color-blue-50);
|
|
418
424
|
--color-primary-100: var(--color-blue-100);
|
|
419
425
|
--color-primary-200: var(--color-blue-200);
|
|
@@ -7919,35 +7925,43 @@ a:focus-visible {
|
|
|
7919
7925
|
outline-offset: calc(-1 * var(--outline-width-focus));
|
|
7920
7926
|
}
|
|
7921
7927
|
|
|
7922
|
-
/* Table
|
|
7923
|
-
.bc-table-
|
|
7924
|
-
|
|
7925
|
-
flex-direction: column;
|
|
7928
|
+
/* Table cell marker button (appears at top-right of selected cell) */
|
|
7929
|
+
.bc-table-cell-marker {
|
|
7930
|
+
pointer-events: auto;
|
|
7926
7931
|
}
|
|
7927
7932
|
|
|
7928
|
-
.bc-table-
|
|
7929
|
-
|
|
7930
|
-
|
|
7931
|
-
|
|
7933
|
+
.bc-table-cell-marker__button {
|
|
7934
|
+
display: inline-flex;
|
|
7935
|
+
align-items: center;
|
|
7936
|
+
justify-content: center;
|
|
7937
|
+
width: 1.25rem;
|
|
7938
|
+
height: 1.25rem;
|
|
7939
|
+
padding: 0;
|
|
7940
|
+
border: var(--border-width-thin) solid var(--color-neutral-300);
|
|
7941
|
+
border-radius: var(--radius-sm);
|
|
7942
|
+
background-color: var(--color-surface);
|
|
7943
|
+
color: var(--color-neutral-600);
|
|
7944
|
+
cursor: pointer;
|
|
7945
|
+
transition: background-color 0.15s, border-color 0.15s;
|
|
7946
|
+
font-size: 0;
|
|
7947
|
+
line-height: 1;
|
|
7932
7948
|
}
|
|
7933
7949
|
|
|
7934
|
-
.bc-table-
|
|
7950
|
+
.bc-table-cell-marker__button:hover:not(:disabled) {
|
|
7935
7951
|
background-color: var(--color-neutral-100);
|
|
7952
|
+
border-color: var(--color-neutral-400);
|
|
7953
|
+
color: var(--color-neutral-800);
|
|
7936
7954
|
}
|
|
7937
7955
|
|
|
7938
|
-
.bc-table-
|
|
7956
|
+
.bc-table-cell-marker__button:active:not(:disabled) {
|
|
7939
7957
|
background-color: var(--color-neutral-200);
|
|
7940
7958
|
}
|
|
7941
7959
|
|
|
7942
|
-
.bc-table-
|
|
7960
|
+
.bc-table-cell-marker__button:disabled {
|
|
7943
7961
|
opacity: 0.5;
|
|
7944
7962
|
cursor: not-allowed;
|
|
7945
7963
|
}
|
|
7946
7964
|
|
|
7947
|
-
.bc-table-menu-separator {
|
|
7948
|
-
/* Separator styling defined inline in component */
|
|
7949
|
-
}
|
|
7950
|
-
|
|
7951
7965
|
/* Dark mode styles */
|
|
7952
7966
|
.dark .bc-lexical-table-cell,
|
|
7953
7967
|
.dark .bc-lexical-table-cell-header {
|
|
@@ -7967,30 +7981,25 @@ a:focus-visible {
|
|
|
7967
7981
|
outline-color: var(--color-primary-400);
|
|
7968
7982
|
}
|
|
7969
7983
|
|
|
7970
|
-
.dark .bc-table-
|
|
7984
|
+
.dark .bc-table-cell-marker__button {
|
|
7985
|
+
border-color: var(--color-neutral-600);
|
|
7971
7986
|
background-color: var(--color-neutral-800);
|
|
7972
|
-
|
|
7973
|
-
}
|
|
7974
|
-
|
|
7975
|
-
.dark .bc-table-menu-button {
|
|
7976
|
-
color: var(--color-neutral-100);
|
|
7987
|
+
color: var(--color-neutral-400);
|
|
7977
7988
|
}
|
|
7978
7989
|
|
|
7979
|
-
.dark .bc-table-
|
|
7990
|
+
.dark .bc-table-cell-marker__button:hover:not(:disabled) {
|
|
7980
7991
|
background-color: var(--color-neutral-700);
|
|
7992
|
+
border-color: var(--color-neutral-500);
|
|
7993
|
+
color: var(--color-neutral-200);
|
|
7981
7994
|
}
|
|
7982
7995
|
|
|
7983
|
-
.dark .bc-table-
|
|
7996
|
+
.dark .bc-table-cell-marker__button:active:not(:disabled) {
|
|
7984
7997
|
background-color: var(--color-neutral-600);
|
|
7985
7998
|
}
|
|
7986
7999
|
|
|
7987
|
-
.dark .bc-table-menu-separator {
|
|
7988
|
-
background-color: var(--color-neutral-700);
|
|
7989
|
-
}
|
|
7990
|
-
|
|
7991
8000
|
/* Accessibility */
|
|
7992
8001
|
@media (prefers-reduced-motion: reduce) {
|
|
7993
|
-
.bc-table-
|
|
8002
|
+
.bc-table-cell-marker__button {
|
|
7994
8003
|
transition: none;
|
|
7995
8004
|
}
|
|
7996
8005
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("@tempots/dom"),L=require("../auth-divider-Cj-xJxF_.cjs"),I=require("../translations-gVgMyNno.cjs"),w=require("../notice-9lpZ-VDn.cjs"),y=require("../stack-4VUGISn6.cjs"),b=require("../input-container-B31Seozh.cjs"),v=require("../text-input-w0eVcqk5.cjs");function g(a,t){return a.error?(t.onError?.({message:a.error.message,status:a.error.status}),a.error.message):null}function F(a,t,s){return async n=>{const i=await a.signIn.email({email:n.email,password:n.password,callbackURL:t.callbackURL}),o=g(i,t);return o||(await s(),null)}}function A(a,t,s){return async n=>{const i=await a.signUp.email({name:n.name,email:n.email,password:n.password,callbackURL:t.callbackURL}),o=g(i,t);return o||(await s(),null)}}function U(a,t){return async s=>{const n=await a.requestPasswordReset({email:s.email,redirectTo:t.callbackURL});return g(n,t)}}function $(a,t){return async s=>{const n=await a.signIn.social({provider:s,callbackURL:t.callbackURL,errorCallbackURL:t.errorCallbackURL});g(n,t)}}function P(a,t={}){const s=e.prop(null),n=e.prop(!0),i=e.computedOf(s)(h=>h?.user??null),o=e.computedOf(s)(h=>h!=null);let u;async function d(){try{const h=await a.getSession();h.error||!h.data?s.set(null):s.set({user:h.data.user,session:h.data.session})}catch{s.set(null)}finally{n.set(!1)}}t.onSessionChange&&s.on(t.onSessionChange),d(),t.refreshInterval&&t.refreshInterval>0&&(u=setInterval(d,t.refreshInterval));function p(){u!=null&&(clearInterval(u),u=void 0),s.dispose(),n.dispose(),i.dispose(),o.dispose()}return{session:s,isPending:n,user:i,isAuthenticated:o,refresh:d,dispose:p}}function _(a){return a.map(t=>({provider:t}))}function C(a,t={}){const s=P(a,{refreshInterval:t.refreshInterval,onSessionChange:t.onSessionChange}),n=()=>s.refresh(),i=F(a,t,n),o=A(a,t,n),u=U(a,t),d=$(a,t),p=t.socialProviders?_(t.socialProviders):[],h={onSignIn:i,passwordRules:t.passwordRules,showRememberMe:t.showRememberMe,labels:t.labels?{emailLabel:t.labels.emailLabel,passwordLabel:t.labels.passwordLabel,rememberMeLabel:t.labels.rememberMeLabel,signInButton:t.labels.signInButton,forgotPasswordLink:t.labels.forgotPasswordLink,noAccountLink:t.labels.noAccountLink}:void 0},c={onSignUp:o,passwordRules:t.passwordRules,showPasswordStrength:t.showPasswordStrength,showNameField:t.showNameField,showConfirmPassword:t.showConfirmPassword,labels:t.labels?{nameLabel:t.labels.nameLabel,emailLabel:t.labels.emailLabel,passwordLabel:t.labels.passwordLabel,confirmPasswordLabel:t.labels.confirmPasswordLabel,acceptTermsLabel:t.labels.acceptTermsLabel,signUpButton:t.labels.signUpButton,hasAccountLink:t.labels.hasAccountLink}:void 0},m={onResetPassword:u,labels:t.labels?{resetPasswordButton:t.labels.resetPasswordButton,resetPasswordDescription:t.labels.resetPasswordDescription,emailLabel:t.labels.emailLabel,backToSignInLink:t.labels.backToSignInLink}:void 0},l={onSignIn:i,onSignUp:o,onResetPassword:u,onSocialLogin:d,socialProviders:p.length>0?p:void 0,showSocialDivider:p.length>0,passwordRules:t.passwordRules,showRememberMe:t.showRememberMe,showPasswordStrength:t.showPasswordStrength,showNameField:t.showNameField,showConfirmPassword:t.showConfirmPassword,labels:t.labels};async function r(){await a.signOut(),await n()}function f(){s.dispose()}return{session:s.session,isPending:s.isPending,user:s.user,isAuthenticated:s.isAuthenticated,containerOptions:l,signInOptions:h,signUpOptions:c,resetOptions:m,socialProviders:p,signOut:r,refreshSession:n,dispose:f}}const R={mark:e.makeProviderMark("BetterAuth"),create:a=>{if(!a)throw new Error("BetterAuth provider requires a client option");const t=C(a.client,a);return{value:t,dispose:()=>t.dispose()}}};function E(a,t,...s){return L.AuthContainer({...a.containerOptions,...t},...s)}function O(a,t){return L.AuthModal(s=>t(n=>s({...a.containerOptions,...n})))}function M(a,t){return e.When(a.isAuthenticated,t)}function D(a,t){return e.Unless(a.isAuthenticated,t)}const T={twoFactorSetupDescription:"Enter your password to enable two-factor authentication.",twoFactorEnableButton:"Enable 2FA",twoFactorVerifyButton:"Verify",twoFactorScanDescription:"Scan the code below with your authenticator app, then enter the verification code.",twoFactorBackupCodesDescription:"Save these backup codes in a safe place. You can use them to sign in if you lose access to your authenticator.",twoFactorCodePlaceholder:"Enter 6-digit code",twoFactorBackupCodePlaceholder:"Enter backup code",twoFactorEnabled:"Two-factor authentication has been enabled.",twoFactorTotpDescription:"Enter the code from your authenticator app.",twoFactorOtpDescription:"Enter the one-time code sent to you.",twoFactorBackupDescription:"Enter one of your backup codes.",twoFactorSendOtpButton:"Send Code",twoFactorMethodLabel:a=>{switch(a){case"totp":return"Authenticator";case"otp":return"Email/SMS";case"backup":return"Backup Code";default:return a}},passwordPlaceholder:"Enter your password",magicLinkDescription:"Enter your email to receive a sign-in link.",magicLinkSendButton:"Send Magic Link",magicLinkSent:"A sign-in link has been sent to your email.",passkeySignInButton:"Sign in with Passkey",passkeyAddButton:"Add Passkey",passkeyDeleteButton:"Delete",passkeyRenameButton:"Rename",passkeySaveButton:"Save",passkeyCancelButton:"Cancel",passkeyNamePlaceholder:"Passkey name (optional)",passkeyUnnamed:"Unnamed passkey"},B=T,S="en",N=Object.assign({}),k=I.makeI18nProvider({defaultLocale:S,defaultMessages:B,localeLoader:async a=>{if(a===S)return B;const t=N[`./locales/${a}.ts`];return t?await t():B},providerName:"BetterAuthI18n"});function q({twoFactor:a,issuer:t,onComplete:s}){const n=e.prop(""),i=e.prop(null),o=e.prop([]),u=e.prop(""),d=e.prop(null),p=e.prop(!1),h=e.prop("password");async function c(l){l.preventDefault(),p.set(!0),d.set(null);const r=await a.enable({password:n.value,issuer:t});if(p.set(!1),r.error){d.set(r.error.message);return}r.data&&(i.set(r.data.totpURI),o.set(r.data.backupCodes),h.set("verify"))}async function m(l){l.preventDefault(),p.set(!0),d.set(null);const r=await a.verifyTotp({code:u.value});if(p.set(!1),r.error){d.set(r.error.message);return}h.set("complete"),s?.()}return e.Use(k,l=>e.html.div(e.attr.class("bc-two-factor"),e.Ensure(d,r=>w.Notice({variant:"danger",tone:"prominent",role:"alert"},e.html.div(r))),e.OneOfValue(h,{password:()=>e.html.form(e.attr.class("bc-two-factor__form"),e.on.submit(c),y.Stack(e.html.p(e.attr.class("bc-auth-form__description"),l.$.twoFactorSetupDescription),w.PasswordInput({value:n,onChange:r=>n.set(r),placeholder:l.$.passwordPlaceholder}),b.Button({type:"submit",variant:"filled",color:"primary",loading:p},e.attr.class("bc-auth-form__submit"),l.$.twoFactorEnableButton))),verify:()=>e.Fragment(e.Ensure(i,r=>e.html.div(e.attr.class("bc-two-factor__totp-uri"),e.html.p(l.$.twoFactorScanDescription),e.html.code(e.attr.class("bc-two-factor__code-display"),r))),e.NotEmpty(o,()=>e.html.div(e.attr.class("bc-two-factor__backup-codes"),e.html.p(l.$.twoFactorBackupCodesDescription),e.html.ul(e.ForEach(o,r=>e.html.li(r))))),e.html.form(e.attr.class("bc-two-factor__form"),e.on.submit(m),y.Stack(v.TextInput({value:u,onChange:r=>u.set(r),placeholder:l.$.twoFactorCodePlaceholder}),b.Button({type:"submit",variant:"filled",color:"primary",loading:p},e.attr.class("bc-auth-form__submit"),l.$.twoFactorVerifyButton)))),complete:()=>e.html.div(e.attr.class("bc-two-factor__complete"),w.Notice({variant:"success",tone:"prominent"},e.html.div(l.$.twoFactorEnabled)))})))}function x({twoFactor:a,methods:t=["totp","backup"],trustDevice:s,onVerified:n}){const i=e.prop(""),o=e.prop(null),u=e.prop(!1),d=e.prop(t[0]??"totp");async function p(c){c.preventDefault(),u.set(!0),o.set(null);const m=d.value;let l;if(m==="totp")l=await a.verifyTotp({code:i.value,trustDevice:s});else if(m==="otp"&&a.verifyOtp)l=await a.verifyOtp({code:i.value,trustDevice:s});else if(m==="backup")l=await a.verifyBackupCode({code:i.value});else{o.set("Unsupported verification method"),u.set(!1);return}if(u.set(!1),l.error){o.set(l.error.message);return}n?.()}async function h(){if(!a.sendOtp)return;u.set(!0),o.set(null);const c=await a.sendOtp({trustDevice:s});u.set(!1),c.error&&o.set(c.error.message)}return e.Use(k,c=>{const m=e.computedOf(d,c)((r,f)=>r==="totp"?f.twoFactorTotpDescription:r==="otp"?f.twoFactorOtpDescription:f.twoFactorBackupDescription),l=e.computedOf(d,c)((r,f)=>r==="backup"?f.twoFactorBackupCodePlaceholder:f.twoFactorCodePlaceholder);return e.html.div(e.attr.class("bc-two-factor"),e.Ensure(o,r=>w.Notice({variant:"danger",tone:"prominent",role:"alert"},e.html.div(r))),e.When(t.length>1,()=>e.html.div(e.attr.class("bc-two-factor__methods"),...t.map(r=>e.html.button(e.attr.type("button"),e.attr.class("bc-two-factor__method-button"),e.attr.class(d.map(f=>f===r?"bc-two-factor__method-button--active":"")),e.on.click(()=>{d.set(r),i.set(""),o.set(null)}),c.$.twoFactorMethodLabel.map(f=>f(r)))))),e.html.form(e.attr.class("bc-two-factor__form"),e.on.submit(p),y.Stack(e.html.p(e.attr.class("bc-auth-form__description"),m),e.When(d.map(r=>r==="otp"&&a.sendOtp!=null),()=>b.Button({type:"button",variant:"outline",color:"primary",onClick:h,loading:u},c.$.twoFactorSendOtpButton)),v.TextInput({value:i,onChange:r=>i.set(r),placeholder:l}),b.Button({type:"submit",variant:"filled",color:"primary",loading:u},e.attr.class("bc-auth-form__submit"),c.$.twoFactorVerifyButton))))})}function V({client:a,callbackURL:t}){const s=e.prop(""),n=e.prop(null),i=e.prop(!1),o=e.prop(!1);async function u(d){if(d.preventDefault(),!a.signIn.magicLink){n.set("Magic link sign-in is not configured");return}i.set(!0),n.set(null);const p=await a.signIn.magicLink({email:s.value,callbackURL:t});if(i.set(!1),p.error){n.set(p.error.message);return}o.set(!0)}return e.Use(k,d=>e.html.div(e.attr.class("bc-auth-form"),e.Ensure(n,p=>w.Notice({variant:"danger",tone:"prominent",role:"alert"},e.html.div(p))),e.Unless(o,()=>e.html.form(e.attr.class("bc-auth-form__form"),e.on.submit(u),y.Stack(e.attr.class("bc-auth-form__fields"),e.html.p(e.attr.class("bc-auth-form__description"),d.$.magicLinkDescription),w.EmailInput({value:s,onChange:p=>s.set(p)}),b.Button({type:"submit",variant:"filled",color:"primary",loading:i},e.attr.class("bc-auth-form__submit"),d.$.magicLinkSendButton)))),e.When(o,()=>w.Notice({variant:"success",tone:"prominent"},e.html.div(d.$.magicLinkSent)))))}function W({client:a,autoFill:t,onSuccess:s,onError:n}){const i=e.prop(!1);async function o(){if(!a.signIn.passkey)return;i.set(!0);const u=await a.signIn.passkey({autoFill:t});if(i.set(!1),u.error){n?.({message:u.error.message,status:u.error.status});return}s?.()}return e.Use(k,u=>b.Button({type:"button",variant:"outline",color:"primary",onClick:o,loading:i},e.attr.class("bc-passkey-signin"),u.$.passkeySignInButton))}function z({passkey:a}){const t=e.prop([]),s=e.prop(null),n=e.prop(!1),i=e.prop("");async function o(c,m){n.set(!0),s.set(null);const l=await c();if(n.set(!1),l.error){s.set(l.error.message);return}await m?.(l.data)}async function u(){await o(()=>a.listUserPasskeys(),c=>t.set(c??[]))}async function d(){const c=i.value||void 0;await o(()=>a.addPasskey({name:c}),async()=>{i.set(""),await u()})}async function p(c){await o(()=>a.deletePasskey({id:c}),()=>u())}async function h(c,m){await o(()=>a.updatePasskey({id:c,name:m}),()=>u())}return u(),e.Use(k,c=>e.html.div(e.attr.class("bc-passkey-management"),e.Ensure(s,m=>w.Notice({variant:"danger",tone:"prominent",role:"alert"},e.html.div(m))),e.html.div(e.attr.class("bc-passkey-list"),e.ForEach(t,m=>{const l=e.prop(!1),r=e.prop(m.$.name?.value??"");return e.html.div(e.attr.class("bc-passkey-item"),e.Unless(l,()=>e.html.div(e.attr.class("bc-passkey-item__info"),e.html.span(e.attr.class("bc-passkey-item__name"),m.$.name?.map(f=>f??c.$.passkeyUnnamed.value)??c.$.passkeyUnnamed),e.html.span(e.attr.class("bc-passkey-item__date"),m.$.createdAt))),e.When(l,()=>e.html.div(e.attr.class("bc-passkey-item__edit"),v.TextInput({value:r,onChange:f=>r.set(f)}))),e.html.div(e.attr.class("bc-passkey-item__actions"),e.Unless(l,()=>e.html.div(b.Button({type:"button",variant:"text",size:"sm",onClick:()=>{r.set(m.$.name?.value??""),l.set(!0)}},c.$.passkeyRenameButton),b.Button({type:"button",variant:"text",size:"sm",color:"danger",onClick:()=>p(m.$.id.value)},c.$.passkeyDeleteButton))),e.When(l,()=>e.html.div(b.Button({type:"button",variant:"text",size:"sm",onClick:async()=>{await h(m.$.id.value,r.value),l.set(!1)}},c.$.passkeySaveButton),b.Button({type:"button",variant:"text",size:"sm",onClick:()=>l.set(!1)},c.$.passkeyCancelButton)))))})),e.html.div(e.attr.class("bc-passkey-add"),y.Stack(v.TextInput({value:i,onChange:m=>i.set(m),placeholder:c.$.passkeyNamePlaceholder}),b.Button({type:"button",variant:"filled",color:"primary",onClick:d,loading:n},c.$.passkeyAddButton)))))}exports.Authenticated=M;exports.BetterAuth=R;exports.BetterAuthContainer=E;exports.BetterAuthI18n=k;exports.BetterAuthModal=O;exports.MagicLinkForm=V;exports.PasskeyManagement=z;exports.PasskeySignIn=W;exports.TwoFactorSetup=q;exports.TwoFactorVerify=x;exports.Unauthenticated=D;exports.createBetterAuthBridge=C;exports.createSessionManager=P;exports.mapSocialProviders=_;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("@tempots/dom"),L=require("../auth-divider-VzrKnv2d.cjs"),I=require("../translations-Cy9hoMGV.cjs"),w=require("../notice-BDTfBGtx.cjs"),y=require("../stack-4VUGISn6.cjs"),b=require("../input-container-DiYEl_y8.cjs"),v=require("../text-input-DUnhBUd6.cjs");function g(a,t){return a.error?(t.onError?.({message:a.error.message,status:a.error.status}),a.error.message):null}function F(a,t,s){return async n=>{const i=await a.signIn.email({email:n.email,password:n.password,callbackURL:t.callbackURL}),o=g(i,t);return o||(await s(),null)}}function A(a,t,s){return async n=>{const i=await a.signUp.email({name:n.name,email:n.email,password:n.password,callbackURL:t.callbackURL}),o=g(i,t);return o||(await s(),null)}}function U(a,t){return async s=>{const n=await a.requestPasswordReset({email:s.email,redirectTo:t.callbackURL});return g(n,t)}}function $(a,t){return async s=>{const n=await a.signIn.social({provider:s,callbackURL:t.callbackURL,errorCallbackURL:t.errorCallbackURL});g(n,t)}}function P(a,t={}){const s=e.prop(null),n=e.prop(!0),i=e.computedOf(s)(h=>h?.user??null),o=e.computedOf(s)(h=>h!=null);let u;async function d(){try{const h=await a.getSession();h.error||!h.data?s.set(null):s.set({user:h.data.user,session:h.data.session})}catch{s.set(null)}finally{n.set(!1)}}t.onSessionChange&&s.on(t.onSessionChange),d(),t.refreshInterval&&t.refreshInterval>0&&(u=setInterval(d,t.refreshInterval));function p(){u!=null&&(clearInterval(u),u=void 0),s.dispose(),n.dispose(),i.dispose(),o.dispose()}return{session:s,isPending:n,user:i,isAuthenticated:o,refresh:d,dispose:p}}function _(a){return a.map(t=>({provider:t}))}function C(a,t={}){const s=P(a,{refreshInterval:t.refreshInterval,onSessionChange:t.onSessionChange}),n=()=>s.refresh(),i=F(a,t,n),o=A(a,t,n),u=U(a,t),d=$(a,t),p=t.socialProviders?_(t.socialProviders):[],h={onSignIn:i,passwordRules:t.passwordRules,showRememberMe:t.showRememberMe,labels:t.labels?{emailLabel:t.labels.emailLabel,passwordLabel:t.labels.passwordLabel,rememberMeLabel:t.labels.rememberMeLabel,signInButton:t.labels.signInButton,forgotPasswordLink:t.labels.forgotPasswordLink,noAccountLink:t.labels.noAccountLink}:void 0},c={onSignUp:o,passwordRules:t.passwordRules,showPasswordStrength:t.showPasswordStrength,showNameField:t.showNameField,showConfirmPassword:t.showConfirmPassword,labels:t.labels?{nameLabel:t.labels.nameLabel,emailLabel:t.labels.emailLabel,passwordLabel:t.labels.passwordLabel,confirmPasswordLabel:t.labels.confirmPasswordLabel,acceptTermsLabel:t.labels.acceptTermsLabel,signUpButton:t.labels.signUpButton,hasAccountLink:t.labels.hasAccountLink}:void 0},m={onResetPassword:u,labels:t.labels?{resetPasswordButton:t.labels.resetPasswordButton,resetPasswordDescription:t.labels.resetPasswordDescription,emailLabel:t.labels.emailLabel,backToSignInLink:t.labels.backToSignInLink}:void 0},l={onSignIn:i,onSignUp:o,onResetPassword:u,onSocialLogin:d,socialProviders:p.length>0?p:void 0,showSocialDivider:p.length>0,passwordRules:t.passwordRules,showRememberMe:t.showRememberMe,showPasswordStrength:t.showPasswordStrength,showNameField:t.showNameField,showConfirmPassword:t.showConfirmPassword,labels:t.labels};async function r(){await a.signOut(),await n()}function f(){s.dispose()}return{session:s.session,isPending:s.isPending,user:s.user,isAuthenticated:s.isAuthenticated,containerOptions:l,signInOptions:h,signUpOptions:c,resetOptions:m,socialProviders:p,signOut:r,refreshSession:n,dispose:f}}const R={mark:e.makeProviderMark("BetterAuth"),create:a=>{if(!a)throw new Error("BetterAuth provider requires a client option");const t=C(a.client,a);return{value:t,dispose:()=>t.dispose()}}};function E(a,t,...s){return L.AuthContainer({...a.containerOptions,...t},...s)}function O(a,t){return L.AuthModal(s=>t(n=>s({...a.containerOptions,...n})))}function M(a,t){return e.When(a.isAuthenticated,t)}function D(a,t){return e.Unless(a.isAuthenticated,t)}const T={twoFactorSetupDescription:"Enter your password to enable two-factor authentication.",twoFactorEnableButton:"Enable 2FA",twoFactorVerifyButton:"Verify",twoFactorScanDescription:"Scan the code below with your authenticator app, then enter the verification code.",twoFactorBackupCodesDescription:"Save these backup codes in a safe place. You can use them to sign in if you lose access to your authenticator.",twoFactorCodePlaceholder:"Enter 6-digit code",twoFactorBackupCodePlaceholder:"Enter backup code",twoFactorEnabled:"Two-factor authentication has been enabled.",twoFactorTotpDescription:"Enter the code from your authenticator app.",twoFactorOtpDescription:"Enter the one-time code sent to you.",twoFactorBackupDescription:"Enter one of your backup codes.",twoFactorSendOtpButton:"Send Code",twoFactorMethodLabel:a=>{switch(a){case"totp":return"Authenticator";case"otp":return"Email/SMS";case"backup":return"Backup Code";default:return a}},passwordPlaceholder:"Enter your password",magicLinkDescription:"Enter your email to receive a sign-in link.",magicLinkSendButton:"Send Magic Link",magicLinkSent:"A sign-in link has been sent to your email.",passkeySignInButton:"Sign in with Passkey",passkeyAddButton:"Add Passkey",passkeyDeleteButton:"Delete",passkeyRenameButton:"Rename",passkeySaveButton:"Save",passkeyCancelButton:"Cancel",passkeyNamePlaceholder:"Passkey name (optional)",passkeyUnnamed:"Unnamed passkey"},B=T,S="en",N=Object.assign({}),k=I.makeI18nProvider({defaultLocale:S,defaultMessages:B,localeLoader:async a=>{if(a===S)return B;const t=N[`./locales/${a}.ts`];return t?await t():B},providerName:"BetterAuthI18n"});function q({twoFactor:a,issuer:t,onComplete:s}){const n=e.prop(""),i=e.prop(null),o=e.prop([]),u=e.prop(""),d=e.prop(null),p=e.prop(!1),h=e.prop("password");async function c(l){l.preventDefault(),p.set(!0),d.set(null);const r=await a.enable({password:n.value,issuer:t});if(p.set(!1),r.error){d.set(r.error.message);return}r.data&&(i.set(r.data.totpURI),o.set(r.data.backupCodes),h.set("verify"))}async function m(l){l.preventDefault(),p.set(!0),d.set(null);const r=await a.verifyTotp({code:u.value});if(p.set(!1),r.error){d.set(r.error.message);return}h.set("complete"),s?.()}return e.Use(k,l=>e.html.div(e.attr.class("bc-two-factor"),e.Ensure(d,r=>w.Notice({variant:"danger",tone:"prominent",role:"alert"},e.html.div(r))),e.OneOfValue(h,{password:()=>e.html.form(e.attr.class("bc-two-factor__form"),e.on.submit(c),y.Stack(e.html.p(e.attr.class("bc-auth-form__description"),l.$.twoFactorSetupDescription),w.PasswordInput({value:n,onChange:r=>n.set(r),placeholder:l.$.passwordPlaceholder}),b.Button({type:"submit",variant:"filled",color:"primary",loading:p},e.attr.class("bc-auth-form__submit"),l.$.twoFactorEnableButton))),verify:()=>e.Fragment(e.Ensure(i,r=>e.html.div(e.attr.class("bc-two-factor__totp-uri"),e.html.p(l.$.twoFactorScanDescription),e.html.code(e.attr.class("bc-two-factor__code-display"),r))),e.NotEmpty(o,()=>e.html.div(e.attr.class("bc-two-factor__backup-codes"),e.html.p(l.$.twoFactorBackupCodesDescription),e.html.ul(e.ForEach(o,r=>e.html.li(r))))),e.html.form(e.attr.class("bc-two-factor__form"),e.on.submit(m),y.Stack(v.TextInput({value:u,onChange:r=>u.set(r),placeholder:l.$.twoFactorCodePlaceholder}),b.Button({type:"submit",variant:"filled",color:"primary",loading:p},e.attr.class("bc-auth-form__submit"),l.$.twoFactorVerifyButton)))),complete:()=>e.html.div(e.attr.class("bc-two-factor__complete"),w.Notice({variant:"success",tone:"prominent"},e.html.div(l.$.twoFactorEnabled)))})))}function x({twoFactor:a,methods:t=["totp","backup"],trustDevice:s,onVerified:n}){const i=e.prop(""),o=e.prop(null),u=e.prop(!1),d=e.prop(t[0]??"totp");async function p(c){c.preventDefault(),u.set(!0),o.set(null);const m=d.value;let l;if(m==="totp")l=await a.verifyTotp({code:i.value,trustDevice:s});else if(m==="otp"&&a.verifyOtp)l=await a.verifyOtp({code:i.value,trustDevice:s});else if(m==="backup")l=await a.verifyBackupCode({code:i.value});else{o.set("Unsupported verification method"),u.set(!1);return}if(u.set(!1),l.error){o.set(l.error.message);return}n?.()}async function h(){if(!a.sendOtp)return;u.set(!0),o.set(null);const c=await a.sendOtp({trustDevice:s});u.set(!1),c.error&&o.set(c.error.message)}return e.Use(k,c=>{const m=e.computedOf(d,c)((r,f)=>r==="totp"?f.twoFactorTotpDescription:r==="otp"?f.twoFactorOtpDescription:f.twoFactorBackupDescription),l=e.computedOf(d,c)((r,f)=>r==="backup"?f.twoFactorBackupCodePlaceholder:f.twoFactorCodePlaceholder);return e.html.div(e.attr.class("bc-two-factor"),e.Ensure(o,r=>w.Notice({variant:"danger",tone:"prominent",role:"alert"},e.html.div(r))),e.When(t.length>1,()=>e.html.div(e.attr.class("bc-two-factor__methods"),...t.map(r=>e.html.button(e.attr.type("button"),e.attr.class("bc-two-factor__method-button"),e.attr.class(d.map(f=>f===r?"bc-two-factor__method-button--active":"")),e.on.click(()=>{d.set(r),i.set(""),o.set(null)}),c.$.twoFactorMethodLabel.map(f=>f(r)))))),e.html.form(e.attr.class("bc-two-factor__form"),e.on.submit(p),y.Stack(e.html.p(e.attr.class("bc-auth-form__description"),m),e.When(d.map(r=>r==="otp"&&a.sendOtp!=null),()=>b.Button({type:"button",variant:"outline",color:"primary",onClick:h,loading:u},c.$.twoFactorSendOtpButton)),v.TextInput({value:i,onChange:r=>i.set(r),placeholder:l}),b.Button({type:"submit",variant:"filled",color:"primary",loading:u},e.attr.class("bc-auth-form__submit"),c.$.twoFactorVerifyButton))))})}function V({client:a,callbackURL:t}){const s=e.prop(""),n=e.prop(null),i=e.prop(!1),o=e.prop(!1);async function u(d){if(d.preventDefault(),!a.signIn.magicLink){n.set("Magic link sign-in is not configured");return}i.set(!0),n.set(null);const p=await a.signIn.magicLink({email:s.value,callbackURL:t});if(i.set(!1),p.error){n.set(p.error.message);return}o.set(!0)}return e.Use(k,d=>e.html.div(e.attr.class("bc-auth-form"),e.Ensure(n,p=>w.Notice({variant:"danger",tone:"prominent",role:"alert"},e.html.div(p))),e.Unless(o,()=>e.html.form(e.attr.class("bc-auth-form__form"),e.on.submit(u),y.Stack(e.attr.class("bc-auth-form__fields"),e.html.p(e.attr.class("bc-auth-form__description"),d.$.magicLinkDescription),w.EmailInput({value:s,onChange:p=>s.set(p)}),b.Button({type:"submit",variant:"filled",color:"primary",loading:i},e.attr.class("bc-auth-form__submit"),d.$.magicLinkSendButton)))),e.When(o,()=>w.Notice({variant:"success",tone:"prominent"},e.html.div(d.$.magicLinkSent)))))}function W({client:a,autoFill:t,onSuccess:s,onError:n}){const i=e.prop(!1);async function o(){if(!a.signIn.passkey)return;i.set(!0);const u=await a.signIn.passkey({autoFill:t});if(i.set(!1),u.error){n?.({message:u.error.message,status:u.error.status});return}s?.()}return e.Use(k,u=>b.Button({type:"button",variant:"outline",color:"primary",onClick:o,loading:i},e.attr.class("bc-passkey-signin"),u.$.passkeySignInButton))}function z({passkey:a}){const t=e.prop([]),s=e.prop(null),n=e.prop(!1),i=e.prop("");async function o(c,m){n.set(!0),s.set(null);const l=await c();if(n.set(!1),l.error){s.set(l.error.message);return}await m?.(l.data)}async function u(){await o(()=>a.listUserPasskeys(),c=>t.set(c??[]))}async function d(){const c=i.value||void 0;await o(()=>a.addPasskey({name:c}),async()=>{i.set(""),await u()})}async function p(c){await o(()=>a.deletePasskey({id:c}),()=>u())}async function h(c,m){await o(()=>a.updatePasskey({id:c,name:m}),()=>u())}return u(),e.Use(k,c=>e.html.div(e.attr.class("bc-passkey-management"),e.Ensure(s,m=>w.Notice({variant:"danger",tone:"prominent",role:"alert"},e.html.div(m))),e.html.div(e.attr.class("bc-passkey-list"),e.ForEach(t,m=>{const l=e.prop(!1),r=e.prop(m.$.name?.value??"");return e.html.div(e.attr.class("bc-passkey-item"),e.Unless(l,()=>e.html.div(e.attr.class("bc-passkey-item__info"),e.html.span(e.attr.class("bc-passkey-item__name"),m.$.name?.map(f=>f??c.$.passkeyUnnamed.value)??c.$.passkeyUnnamed),e.html.span(e.attr.class("bc-passkey-item__date"),m.$.createdAt))),e.When(l,()=>e.html.div(e.attr.class("bc-passkey-item__edit"),v.TextInput({value:r,onChange:f=>r.set(f)}))),e.html.div(e.attr.class("bc-passkey-item__actions"),e.Unless(l,()=>e.html.div(b.Button({type:"button",variant:"text",size:"sm",onClick:()=>{r.set(m.$.name?.value??""),l.set(!0)}},c.$.passkeyRenameButton),b.Button({type:"button",variant:"text",size:"sm",color:"danger",onClick:()=>p(m.$.id.value)},c.$.passkeyDeleteButton))),e.When(l,()=>e.html.div(b.Button({type:"button",variant:"text",size:"sm",onClick:async()=>{await h(m.$.id.value,r.value),l.set(!1)}},c.$.passkeySaveButton),b.Button({type:"button",variant:"text",size:"sm",onClick:()=>l.set(!1)},c.$.passkeyCancelButton)))))})),e.html.div(e.attr.class("bc-passkey-add"),y.Stack(v.TextInput({value:i,onChange:m=>i.set(m),placeholder:c.$.passkeyNamePlaceholder}),b.Button({type:"button",variant:"filled",color:"primary",onClick:d,loading:n},c.$.passkeyAddButton)))))}exports.Authenticated=M;exports.BetterAuth=R;exports.BetterAuthContainer=E;exports.BetterAuthI18n=k;exports.BetterAuthModal=O;exports.MagicLinkForm=V;exports.PasskeyManagement=z;exports.PasskeySignIn=W;exports.TwoFactorSetup=q;exports.TwoFactorVerify=x;exports.Unauthenticated=D;exports.createBetterAuthBridge=C;exports.createSessionManager=P;exports.mapSocialProviders=_;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { prop as b, computedOf as B, makeProviderMark as U, When as y, Unless as C, Use as S, html as r, attr as l, Ensure as g, OneOfValue as D, Fragment as E, NotEmpty as O, ForEach as A, on as L } from "@tempots/dom";
|
|
2
|
-
import { b as M, d as T } from "../auth-divider-
|
|
3
|
-
import { m as N } from "../translations-
|
|
4
|
-
import { N as v, P as V, E as x } from "../notice-
|
|
2
|
+
import { b as M, d as T } from "../auth-divider-B4n8lGx5.js";
|
|
3
|
+
import { m as N } from "../translations-CiBhB2FV.js";
|
|
4
|
+
import { N as v, P as V, E as x } from "../notice-CZuh-h6a.js";
|
|
5
5
|
import { S as P } from "../stack-Bm-UZosx.js";
|
|
6
|
-
import { B as k } from "../input-container-
|
|
7
|
-
import { T as I } from "../text-input-
|
|
6
|
+
import { B as k } from "../input-container-9r1F3KuX.js";
|
|
7
|
+
import { T as I } from "../text-input-BgPx8BbG.js";
|
|
8
8
|
function F(t, e) {
|
|
9
9
|
return t.error ? (e.onError?.({
|
|
10
10
|
message: t.error.message,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { f as
|
|
1
|
+
import { f as a } from "./translations-CiBhB2FV.js";
|
|
2
2
|
const s = {
|
|
3
3
|
loadingExtended: "Lädt, bitte warten",
|
|
4
4
|
loadingShort: "Lädt...",
|
|
@@ -63,10 +63,10 @@ const s = {
|
|
|
63
63
|
if (e || n) {
|
|
64
64
|
const i = [];
|
|
65
65
|
if (e != null && e > 1 && i.push(`bis zu ${e} Dateien`), n && t) {
|
|
66
|
-
const
|
|
66
|
+
const l = a(n, {
|
|
67
67
|
units: t
|
|
68
68
|
});
|
|
69
|
-
i.push(`max ${
|
|
69
|
+
i.push(`max ${l} je Datei`);
|
|
70
70
|
}
|
|
71
71
|
i.length > 0 && (r += ` (${i.join(", ")})`);
|
|
72
72
|
}
|
|
@@ -144,7 +144,15 @@ const s = {
|
|
|
144
144
|
noCommandsFound: "Keine Befehle gefunden",
|
|
145
145
|
changeBlockType: "Blocktyp ändern",
|
|
146
146
|
blockTypes: "Blocktypen",
|
|
147
|
-
enterUrl: "URL eingeben:"
|
|
147
|
+
enterUrl: "URL eingeben:",
|
|
148
|
+
tableActions: "Table actions",
|
|
149
|
+
insertRowAbove: "Insert row above",
|
|
150
|
+
insertRowBelow: "Insert row below",
|
|
151
|
+
insertColumnLeft: "Insert column left",
|
|
152
|
+
insertColumnRight: "Insert column right",
|
|
153
|
+
deleteRow: "Delete row",
|
|
154
|
+
deleteColumn: "Delete column",
|
|
155
|
+
deleteTable: "Delete table"
|
|
148
156
|
},
|
|
149
157
|
// prosemirror
|
|
150
158
|
prosemirror: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./translations-Cy9hoMGV.cjs"),a={loadingExtended:"Lädt, bitte warten",loadingShort:"Lädt...",iconDescription:"Symbol",loadingIcon:"Ladesymbol",locale:"Landesvariante",failedToLoadIcon:"Symbol konnte nicht geladen werden",editLabel:"Bearbeiten",selectOne:"Eines auswählen",selectNone:"Keines",selectMany:"Mehrere auswählen",noResults:"Keine Ergebnisse",passwordPlaceholderText:"Geheimes Passwort",togglePasswordVisibility:"Passwort-Sichtbarkeit umschalten",toggleMenu:"Menü umschalten",toggleAside:"Seitenleiste umschalten",mainNavigation:"Hauptnavigation",sidebar:"Seitenleiste",closeDrawer:"Schublade schließen",closeModal:"Modal schließen",confirm:"Bestätigen",cancel:"Abbrechen",addLabel:"Hinzufügen",removeItem:"Element entfernen",currentLocale:"Deutsch",ar:"Arabisch",de:"Deutsch",en:"Englisch",es:"Spanisch",fr:"Französisch",hi:"Hindi",it:"Italienisch",ja:"Japanisch",ko:"Koreanisch",nl:"Niederländisch",pl:"Polnisch",pt:"Portugiesisch",ru:"Russisch",tr:"Türkisch",vi:"Vietnamesisch",zh:"Chinesisch",he:"Hebräisch",fa:"Persisch",ur:"Urdu",emailPlaceholderText:"E-Mail eingeben",incrementValue:"Wert erhöhen",decrementValue:"Wert verringern",dropZoneInstructions:e=>e?"Klicken zum Auswählen oder Dateien hierher ziehen, oder Enter oder Leertaste drücken, um Dateiauswahl zu öffnen":"Dateien hierher ziehen",fileSizeUnits:["Bytes","KB","MB","GB","TB"],removeFile:"Datei entfernen",clearAllFiles:"Alle Dateien löschen",clearValue:"Wert löschen",unknownType:"Unbekannter Typ",filesInputInstructions:(e,n,i)=>{let r=e==null||e>1?"Klicken zum Auswählen oder Dateien hierher ziehen":"Klicken zum Auswählen oder Datei hierher ziehen";if(e||n){const t=[];if(e!=null&&e>1&&t.push(`bis zu ${e} Dateien`),n&&i){const l=o.formatFileSize(n,{units:i});t.push(`max ${l} je Datei`)}t.length>0&&(r+=` (${t.join(", ")})`)}return r},paginationLabel:"Seitennavigation",firstPage:"Erste Seite",previousPage:"Vorherige Seite",nextPage:"Nächste Seite",lastPage:"Letzte Seite",breadcrumbs:"Brotkrümelnavigation",commandPalette:"Befehlspalette",typeACommand:"Befehl eingeben...",noResultsFound:"Keine Ergebnisse gefunden",noMatchingCommands:"Keine passenden Befehle",appearanceSystem:"System",appearanceLight:"Hell",appearanceDark:"Dunkel",ok:"OK",changeTypeConfirmation:"Typänderung löscht den aktuellen Wert. Fortfahren?",notifications:"Benachrichtigungen",markAllAsRead:"Alle als gelesen markieren",noNotifications:"Keine Benachrichtigungen",schemaConflictsDetected:"Schemakonflikte erkannt",schemaViolationsDetected:"Schemaverletzungen erkannt",properties:"Eigenschaften",uploading:"Wird hochgeladen...",dropFilesOrBrowse:"Dateien hierher ziehen oder klicken zum Durchsuchen",acceptedTypes:e=>`Akzeptierte Typen: ${e}`,enterUrlPrompt:"URL eingeben:",exceeded:"(überschritten)",pdfPreview:"PDF-Vorschau",lexical:{fontFamily:"Schriftart",fontSize:"Schriftgröße",fontColor:"Schriftfarbe",highlightColor:"Hervorhebungsfarbe",backgroundColor:"Hintergrundfarbe",bold:"Fett",italic:"Kursiv",underline:"Unterstrichen",strikethrough:"Durchgestrichen",code:"Code",clearFormatting:"Formatierung löschen",normal:"Normal",heading:e=>`Überschrift ${e}`,bulletList:"Aufzählung",orderedList:"Nummerierte Liste",checkList:"Checkliste",indent:"Einzug vergrößern",outdent:"Einzug verkleinern",blockquote:"Zitat",codeBlock:"Code-Block",horizontalRule:"Horizontale Linie",insertTable:"Tabelle einfügen",link:"Link",undo:"Rückgängig",redo:"Wiederholen",cut:"Ausschneiden",copy:"Kopieren",paste:"Einfügen",defaultOption:"Standard",slashCommands:"Schrägstrich-Befehle",noCommandsFound:"Keine Befehle gefunden",changeBlockType:"Blocktyp ändern",blockTypes:"Blocktypen",enterUrl:"URL eingeben:",tableActions:"Table actions",insertRowAbove:"Insert row above",insertRowBelow:"Insert row below",insertColumnLeft:"Insert column left",insertColumnRight:"Insert column right",deleteRow:"Delete row",deleteColumn:"Delete column",deleteTable:"Delete table"},prosemirror:{bold:"Fett",italic:"Kursiv",code:"Inline-Code",link:"Link einfügen",removeLink:"Link entfernen",heading:e=>`Überschrift ${e}`,bulletList:"Aufzählung",orderedList:"Nummerierte Liste",blockquote:"Zitat",codeBlock:"Code-Block",horizontalRule:"Horizontale Linie",linkUrlPlaceholder:"https://beispiel.com"},pdfPageViewer:{loading:"PDF wird geladen...",loadFailed:"PDF konnte nicht geladen werden",invalidPdf:"Ungültige PDF-Datei",pageOutOfRange:(e,n)=>`Seite ${e} liegt außerhalb des Bereichs (1-${n})`,renderFailed:"PDF-Seite konnte nicht gerendert werden"}};exports.default=a;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { Task as ye, Use as O, Value as f, prop as ae, html as h, attr as l, on as C, WithElement as te, Empty as S, aria as J, bind as ie, computedOf as V, style as we, OnDispose as ne, When as U, NotEmpty as Re, Fragment as N, ForEach as ee, coalesce as Ne, Ensure as Pe, OneOfType as je, Repeat as We, signal as _e, input as se, emitValue as P, emitValueAsNumber as ke } from "@tempots/dom";
|
|
2
|
-
import { B as F, b as Ce, f as De, I as E, d as ce } from "./translations-
|
|
2
|
+
import { B as F, b as Ce, f as De, I as E, d as ce } from "./translations-CiBhB2FV.js";
|
|
3
3
|
import { l as Ze } from "./colors-BY0Ja_bf.js";
|
|
4
4
|
import { g as He } from "./timer-Rd2sKnvH.js";
|
|
5
5
|
import { ElementRect as qe } from "@tempots/ui";
|
|
6
|
-
import { I as W, a as Ye, g as Ge, B as be } from "./input-container-
|
|
7
|
-
import { C as oe, I as Ve, m as Je, c as Xe, d as fe, O as K, e as Ie } from "./use-form-
|
|
8
|
-
import { C as q } from "./text-input-
|
|
6
|
+
import { I as W, a as Ye, g as Ge, B as be } from "./input-container-9r1F3KuX.js";
|
|
7
|
+
import { C as oe, I as Ve, m as Je, c as Xe, d as fe, O as K, e as Ie } from "./use-form-Cd8YFWaN.js";
|
|
8
|
+
import { C as q } from "./text-input-BgPx8BbG.js";
|
|
9
9
|
import { S as Ae } from "./stack-Bm-UZosx.js";
|
|
10
10
|
let pe = null;
|
|
11
11
|
async function he() {
|
|
@@ -83,7 +83,7 @@ function de({
|
|
|
83
83
|
// Screen reader instructions
|
|
84
84
|
J.label(ie(g.$.dropZoneInstructions)(s)),
|
|
85
85
|
// Content
|
|
86
|
-
r({ files: p, clear: () => p.value = [], change: p.set })
|
|
86
|
+
r({ files: p, clear: () => p.value = [], change: (u) => p.set(u) })
|
|
87
87
|
);
|
|
88
88
|
});
|
|
89
89
|
}
|
|
@@ -511,7 +511,25 @@ const St = (t, ...e) => {
|
|
|
511
511
|
...e
|
|
512
512
|
)
|
|
513
513
|
);
|
|
514
|
-
}
|
|
514
|
+
};
|
|
515
|
+
function Le(t, e, n) {
|
|
516
|
+
const s = f.map(t, (i) => i != null), r = V(
|
|
517
|
+
s,
|
|
518
|
+
e ?? !1
|
|
519
|
+
)((i, g) => !i || g), b = ce.clearValue;
|
|
520
|
+
return h.button(
|
|
521
|
+
l.type("button"),
|
|
522
|
+
l.class("bc-input-container__reset"),
|
|
523
|
+
J.label(b),
|
|
524
|
+
l.title(b),
|
|
525
|
+
l.disabled(r),
|
|
526
|
+
E({ icon: "mdi:close", size: "sm" }),
|
|
527
|
+
C.click((i) => {
|
|
528
|
+
i.stopPropagation(), n?.(null);
|
|
529
|
+
})
|
|
530
|
+
);
|
|
531
|
+
}
|
|
532
|
+
const ge = "$$tts-exp-", lt = (t, e) => te((n) => {
|
|
515
533
|
const s = `${ge}${t}`;
|
|
516
534
|
return ne(f.on(e, (r) => Reflect.set(n, s, r)));
|
|
517
535
|
}), Tt = (t, e) => {
|
|
@@ -529,7 +547,7 @@ const St = (t, ...e) => {
|
|
|
529
547
|
function $e(...t) {
|
|
530
548
|
return h.div(l.class("bc-group"), ...t);
|
|
531
549
|
}
|
|
532
|
-
const
|
|
550
|
+
const Ue = (t, e, n) => Pe(
|
|
533
551
|
t,
|
|
534
552
|
(s) => je(s, {
|
|
535
553
|
value: (r) => {
|
|
@@ -547,7 +565,7 @@ const Le = (t, e, n) => Pe(
|
|
|
547
565
|
l.label(r.$.group),
|
|
548
566
|
ee(
|
|
549
567
|
r.$.options,
|
|
550
|
-
(b) =>
|
|
568
|
+
(b) => Ue(
|
|
551
569
|
b,
|
|
552
570
|
e,
|
|
553
571
|
n
|
|
@@ -596,7 +614,7 @@ const Le = (t, e, n) => Pe(
|
|
|
596
614
|
Ne(b, v.$.selectOne)
|
|
597
615
|
)
|
|
598
616
|
),
|
|
599
|
-
ee(r, (v) =>
|
|
617
|
+
ee(r, (v) => Ue(v, i, e)),
|
|
600
618
|
n != null ? C.blur(n) : S,
|
|
601
619
|
s != null ? C.change(rt("value", (v) => s(v))) : S
|
|
602
620
|
)
|
|
@@ -690,7 +708,7 @@ const Me = {
|
|
|
690
708
|
A: { pattern: /^[A-Za-z]$/, transform: (t) => t.toUpperCase() },
|
|
691
709
|
"*": { pattern: /^.$/ }
|
|
692
710
|
}, at = (t) => t instanceof RegExp;
|
|
693
|
-
function
|
|
711
|
+
function Ee(t, e, n) {
|
|
694
712
|
if (t == null) return [];
|
|
695
713
|
const s = n ? { ...Me, ...e } : e ?? Me, r = (i, g) => {
|
|
696
714
|
const p = s[g];
|
|
@@ -729,7 +747,7 @@ function Se(t, e, n, s, r, b) {
|
|
|
729
747
|
previousConformed: e,
|
|
730
748
|
cursor: r ?? t.length,
|
|
731
749
|
completed: !1
|
|
732
|
-
}, g = s.definitions ?? {}, p = typeof n == "function" ? n(t, i) : n, v =
|
|
750
|
+
}, g = s.definitions ?? {}, p = typeof n == "function" ? n(t, i) : n, v = Ee(
|
|
733
751
|
p,
|
|
734
752
|
g,
|
|
735
753
|
s.useDefaultDefinitions ?? !0
|
|
@@ -780,7 +798,7 @@ function ft(t, e) {
|
|
|
780
798
|
const n = e?.strategy ?? "none";
|
|
781
799
|
return n === "custom" && e?.unmask ? e.unmask(t) : n === "strip" ? t.replace(/[^A-Za-z0-9]/g, "") : t;
|
|
782
800
|
}
|
|
783
|
-
const
|
|
801
|
+
const Oe = (t) => {
|
|
784
802
|
const {
|
|
785
803
|
value: e,
|
|
786
804
|
onBlur: n,
|
|
@@ -885,7 +903,7 @@ const Ee = (t) => {
|
|
|
885
903
|
if (z !== _ || z <= 0) return;
|
|
886
904
|
const B = c.value ?? "", R = g != null ? f.get(g) : null;
|
|
887
905
|
if (!R) return;
|
|
888
|
-
const X = p != null ? f.get(p) : void 0, Q = v != null ? f.get(v) : !0, Y = m != null ? f.get(m) : void 0, Z = y != null ? f.get(y) : void 0, le =
|
|
906
|
+
const X = p != null ? f.get(p) : void 0, Q = v != null ? f.get(v) : !0, Y = m != null ? f.get(m) : void 0, Z = y != null ? f.get(y) : void 0, le = Ee(
|
|
889
907
|
typeof R == "function" ? R(B, {
|
|
890
908
|
raw: B,
|
|
891
909
|
previousConformed: B,
|
|
@@ -909,25 +927,7 @@ const Ee = (t) => {
|
|
|
909
927
|
)
|
|
910
928
|
)
|
|
911
929
|
});
|
|
912
|
-
}
|
|
913
|
-
function Oe(t, e, n) {
|
|
914
|
-
const s = f.map(t, (i) => i != null), r = V(
|
|
915
|
-
s,
|
|
916
|
-
e ?? !1
|
|
917
|
-
)((i, g) => !i || g), b = ce.clearValue;
|
|
918
|
-
return h.button(
|
|
919
|
-
l.type("button"),
|
|
920
|
-
l.class("bc-input-container__reset"),
|
|
921
|
-
J.label(b),
|
|
922
|
-
l.title(b),
|
|
923
|
-
l.disabled(r),
|
|
924
|
-
E({ icon: "mdi:close", size: "sm" }),
|
|
925
|
-
C.click((i) => {
|
|
926
|
-
i.stopPropagation(), n?.(null);
|
|
927
|
-
})
|
|
928
|
-
);
|
|
929
|
-
}
|
|
930
|
-
const Bt = (t) => {
|
|
930
|
+
}, Bt = (t) => {
|
|
931
931
|
const { value: e, onBlur: n, onChange: s, onInput: r, rows: b } = t;
|
|
932
932
|
return W({
|
|
933
933
|
baseContainer: !0,
|
|
@@ -1117,7 +1117,7 @@ const Vt = (t) => {
|
|
|
1117
1117
|
ce.incrementValue,
|
|
1118
1118
|
ce.decrementValue
|
|
1119
1119
|
);
|
|
1120
|
-
})(), m =
|
|
1120
|
+
})(), m = Le(
|
|
1121
1121
|
e,
|
|
1122
1122
|
t.disabled,
|
|
1123
1123
|
i ?? g
|
|
@@ -1161,7 +1161,7 @@ const Vt = (t) => {
|
|
|
1161
1161
|
pattern: /[0-9A-Fa-f]/,
|
|
1162
1162
|
transform: (s) => s.toLowerCase()
|
|
1163
1163
|
};
|
|
1164
|
-
return
|
|
1164
|
+
return Oe({
|
|
1165
1165
|
...t,
|
|
1166
1166
|
mask: [
|
|
1167
1167
|
e,
|
|
@@ -1237,11 +1237,11 @@ const ze = (t, e) => {
|
|
|
1237
1237
|
}
|
|
1238
1238
|
}, Ut = (t) => {
|
|
1239
1239
|
const { value: e, onChange: n, onInput: s, after: r, disabled: b, onBlur: i } = t, g = () => {
|
|
1240
|
-
const d =
|
|
1240
|
+
const d = Le(e, b, n ?? s);
|
|
1241
1241
|
return r != null ? N(d, r) : d;
|
|
1242
1242
|
}, p = t.placeholder != null ? S : l.placeholder("P0DT0H0M0S");
|
|
1243
1243
|
return Qe(
|
|
1244
|
-
(d) =>
|
|
1244
|
+
(d) => Oe({
|
|
1245
1245
|
...t,
|
|
1246
1246
|
value: f.map(e, (m) => m?.toString() ?? ""),
|
|
1247
1247
|
onChange: n ? (m) => n(m === "" ? null : d.Duration.from(m)) : void 0,
|
|
@@ -1674,8 +1674,8 @@ export {
|
|
|
1674
1674
|
St as F,
|
|
1675
1675
|
$e as G,
|
|
1676
1676
|
Ot as L,
|
|
1677
|
-
|
|
1678
|
-
|
|
1677
|
+
Oe as M,
|
|
1678
|
+
Le as N,
|
|
1679
1679
|
Mt as S,
|
|
1680
1680
|
Bt as T,
|
|
1681
1681
|
Lt as U,
|