@umami/react-zen 0.25.0 → 0.26.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 +1 -1
- package/dist/index.css +159 -140
- package/dist/index.d.ts +123 -53
- package/dist/index.js +5222 -3152
- package/dist/index.mjs +4718 -2646
- package/dist/styles.css +159 -140
- package/package.json +9 -9
package/README.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
**zen** is a modern, minimalist React component library.
|
|
4
4
|
|
|
5
|
-
- Built on top of [React Aria](https://react-spectrum.adobe.com/react-aria/)
|
|
5
|
+
- Built on top of [React Aria](https://react-spectrum.adobe.com/react-aria/) primitives.
|
|
6
6
|
- No Tailwind, pure CSS.
|
|
7
7
|
- Out-of-the-box accessibility.
|
|
8
8
|
|
package/dist/index.css
CHANGED
|
@@ -2388,6 +2388,117 @@ body a.Button_button__YmM3M {
|
|
|
2388
2388
|
}
|
|
2389
2389
|
}
|
|
2390
2390
|
|
|
2391
|
+
/* virtual-css:css:d2946ea0055c0d1ebfac02670168114b */
|
|
2392
|
+
.Toast_toast__YjU0N {
|
|
2393
|
+
display: grid;
|
|
2394
|
+
grid-template-areas: "icon title action" "icon description action";
|
|
2395
|
+
grid-template-columns: auto 1fr auto;
|
|
2396
|
+
grid-auto-columns: auto;
|
|
2397
|
+
align-items: center;
|
|
2398
|
+
background-color: var(--background-color);
|
|
2399
|
+
border-radius: var(--border-radius);
|
|
2400
|
+
box-shadow: var(--box-shadow-3);
|
|
2401
|
+
padding: var(--spacing-4) var(--spacing-5);
|
|
2402
|
+
border: var(--border);
|
|
2403
|
+
position: relative;
|
|
2404
|
+
}
|
|
2405
|
+
.Toast_toast__YjU0N:has(.Toast_icon__YmFhZ) {
|
|
2406
|
+
grid-template-columns: auto 1fr auto;
|
|
2407
|
+
column-gap: var(--gap);
|
|
2408
|
+
}
|
|
2409
|
+
.Toast_icon__YmFhZ {
|
|
2410
|
+
grid-area: icon;
|
|
2411
|
+
}
|
|
2412
|
+
.Toast_icon__YmFhZ:empty {
|
|
2413
|
+
display: none;
|
|
2414
|
+
}
|
|
2415
|
+
.Toast_title__OGRhM {
|
|
2416
|
+
grid-area: title;
|
|
2417
|
+
color: var(--font-color);
|
|
2418
|
+
font-weight: 700;
|
|
2419
|
+
}
|
|
2420
|
+
.Toast_description__MDBkN {
|
|
2421
|
+
grid-area: description;
|
|
2422
|
+
}
|
|
2423
|
+
.Toast_action__MjUxO {
|
|
2424
|
+
grid-area: action;
|
|
2425
|
+
border: 0;
|
|
2426
|
+
background: transparent;
|
|
2427
|
+
}
|
|
2428
|
+
.Toast_close__ZDVjN {
|
|
2429
|
+
display: none;
|
|
2430
|
+
color: currentColor;
|
|
2431
|
+
position: absolute;
|
|
2432
|
+
right: var(--spacing-3);
|
|
2433
|
+
top: 50%;
|
|
2434
|
+
transform: translateY(-50%);
|
|
2435
|
+
}
|
|
2436
|
+
.Toast_toast__YjU0N:hover .Toast_close__ZDVjN {
|
|
2437
|
+
display: block;
|
|
2438
|
+
cursor: pointer;
|
|
2439
|
+
}
|
|
2440
|
+
.Toast_toast__YjU0N.Toast_info__ZDRhY {
|
|
2441
|
+
color: var(--primary-font-color);
|
|
2442
|
+
background: var(--primary-color);
|
|
2443
|
+
border: 0;
|
|
2444
|
+
}
|
|
2445
|
+
.Toast_toast__YjU0N.Toast_error__NmEwO {
|
|
2446
|
+
color: var(--danger-font-color);
|
|
2447
|
+
background: var(--danger-color);
|
|
2448
|
+
border: 0;
|
|
2449
|
+
}
|
|
2450
|
+
|
|
2451
|
+
/* virtual-css:css:11394aec644bbe21859c5e1cb74970ec */
|
|
2452
|
+
.Toaster_toaster__OGJjM {
|
|
2453
|
+
position: fixed;
|
|
2454
|
+
display: flex;
|
|
2455
|
+
flex-direction: column;
|
|
2456
|
+
padding: var(--spacing-6);
|
|
2457
|
+
gap: var(--spacing-5);
|
|
2458
|
+
width: 460px;
|
|
2459
|
+
max-width: 100vw;
|
|
2460
|
+
margin: 0;
|
|
2461
|
+
list-style: none;
|
|
2462
|
+
z-index: 2147483647;
|
|
2463
|
+
outline: none;
|
|
2464
|
+
}
|
|
2465
|
+
.Toaster_position-top__Y2YyM {
|
|
2466
|
+
top: 0;
|
|
2467
|
+
left: 50%;
|
|
2468
|
+
transform: translateX(-50%);
|
|
2469
|
+
}
|
|
2470
|
+
.Toaster_position-top-right__Y2I1Y {
|
|
2471
|
+
top: 0;
|
|
2472
|
+
right: 0;
|
|
2473
|
+
}
|
|
2474
|
+
.Toaster_position-top-left__ZGZlM {
|
|
2475
|
+
top: 0;
|
|
2476
|
+
left: 0;
|
|
2477
|
+
}
|
|
2478
|
+
.Toaster_position-bottom__NjJmM {
|
|
2479
|
+
bottom: 0;
|
|
2480
|
+
left: 50%;
|
|
2481
|
+
transform: translateX(-50%);
|
|
2482
|
+
}
|
|
2483
|
+
.Toaster_position-bottom-right__MGVjY {
|
|
2484
|
+
bottom: 0;
|
|
2485
|
+
right: 0;
|
|
2486
|
+
}
|
|
2487
|
+
.Toaster_position-bottom-left__ODBhZ {
|
|
2488
|
+
bottom: 0;
|
|
2489
|
+
left: 0;
|
|
2490
|
+
}
|
|
2491
|
+
.Toaster_position-left__MWMzM {
|
|
2492
|
+
left: 0;
|
|
2493
|
+
top: 50%;
|
|
2494
|
+
transform: translateY(-50%);
|
|
2495
|
+
}
|
|
2496
|
+
.Toaster_position-right__YWYzZ {
|
|
2497
|
+
right: 0;
|
|
2498
|
+
top: 50%;
|
|
2499
|
+
transform: translateY(-50%);
|
|
2500
|
+
}
|
|
2501
|
+
|
|
2391
2502
|
/* virtual-css:css:fa53717340120f23a623f1ff98237d94 */
|
|
2392
2503
|
.Accordion_accordion__ODg3O {
|
|
2393
2504
|
display: flex;
|
|
@@ -2609,6 +2720,54 @@ body a.Button_button__YmM3M {
|
|
|
2609
2720
|
padding: var(--spacing-1);
|
|
2610
2721
|
}
|
|
2611
2722
|
|
|
2723
|
+
/* virtual-css:css:0fb02723d81c5960ed149d3d9f58f1ba */
|
|
2724
|
+
.List_list__NmQyZ {
|
|
2725
|
+
min-width: 100px;
|
|
2726
|
+
outline: none;
|
|
2727
|
+
}
|
|
2728
|
+
.List_separator__NTYwN {
|
|
2729
|
+
border-bottom: var(--border);
|
|
2730
|
+
}
|
|
2731
|
+
.List_section__MzJkM {
|
|
2732
|
+
margin-bottom: var(--spacing-4);
|
|
2733
|
+
}
|
|
2734
|
+
.List_header__MjllY {
|
|
2735
|
+
font-size: var(--font-size-2);
|
|
2736
|
+
font-weight: var(--font-weight-bold);
|
|
2737
|
+
padding: var(--padding);
|
|
2738
|
+
}
|
|
2739
|
+
.List_item__MWE2M {
|
|
2740
|
+
display: flex;
|
|
2741
|
+
align-items: center;
|
|
2742
|
+
justify-content: space-between;
|
|
2743
|
+
font-size: var(--font-size);
|
|
2744
|
+
color: var(--font-color);
|
|
2745
|
+
background: var(--background-color);
|
|
2746
|
+
padding: var(--padding);
|
|
2747
|
+
gap: var(--gap);
|
|
2748
|
+
min-width: 120px;
|
|
2749
|
+
cursor: pointer;
|
|
2750
|
+
outline: none;
|
|
2751
|
+
border-radius: var(--border-radius);
|
|
2752
|
+
}
|
|
2753
|
+
.List_item__MWE2M[data-focus],
|
|
2754
|
+
.List_item__MWE2M[data-focus-visible] {
|
|
2755
|
+
outline: var(--outline);
|
|
2756
|
+
background: var(--highlight-color);
|
|
2757
|
+
}
|
|
2758
|
+
.List_item__MWE2M:hover {
|
|
2759
|
+
background: var(--highlight-color);
|
|
2760
|
+
}
|
|
2761
|
+
.List_item__MWE2M[data-selected] {
|
|
2762
|
+
font-weight: bold;
|
|
2763
|
+
}
|
|
2764
|
+
.List_item__MWE2M[data-selected] .List_check__NTFkY {
|
|
2765
|
+
display: block;
|
|
2766
|
+
}
|
|
2767
|
+
.List_check__NTFkY {
|
|
2768
|
+
display: none;
|
|
2769
|
+
}
|
|
2770
|
+
|
|
2612
2771
|
/* virtual-css:css:22e6c8058c0151ab54d204a5cd8c6d11 */
|
|
2613
2772
|
.ListItem_item__MzQ0Z {
|
|
2614
2773
|
display: flex;
|
|
@@ -2640,27 +2799,6 @@ body a.Button_button__YmM3M {
|
|
|
2640
2799
|
display: none;
|
|
2641
2800
|
}
|
|
2642
2801
|
|
|
2643
|
-
/* virtual-css:css:0fb02723d81c5960ed149d3d9f58f1ba */
|
|
2644
|
-
.List_list__OGNmY {
|
|
2645
|
-
overflow: hidden;
|
|
2646
|
-
min-width: 100px;
|
|
2647
|
-
outline: none;
|
|
2648
|
-
}
|
|
2649
|
-
.List_item__ZTAwN {
|
|
2650
|
-
border: var(--border-radius);
|
|
2651
|
-
}
|
|
2652
|
-
.List_separator__ZDRjM {
|
|
2653
|
-
border-bottom: var(--border);
|
|
2654
|
-
}
|
|
2655
|
-
.List_section__MjY4N {
|
|
2656
|
-
margin-bottom: var(--spacing-3);
|
|
2657
|
-
}
|
|
2658
|
-
.List_header__ZjI0N {
|
|
2659
|
-
font-size: var(--font-size-2);
|
|
2660
|
-
font-weight: var(--font-weight-bold);
|
|
2661
|
-
padding: var(--padding-y) var(--padding-x);
|
|
2662
|
-
}
|
|
2663
|
-
|
|
2664
2802
|
/* virtual-css:css:f94974973c639ccc39a8a6465cbebeb2 */
|
|
2665
2803
|
.Popover_popover__YmFhM[data-placement=top] {
|
|
2666
2804
|
--origin: translateY(8px);
|
|
@@ -3523,125 +3661,6 @@ body a.Button_button__YmM3M {
|
|
|
3523
3661
|
resize: vertical;
|
|
3524
3662
|
}
|
|
3525
3663
|
|
|
3526
|
-
/* virtual-css:css:2660738c02b9f8e6e348a808b81b16d8 */
|
|
3527
|
-
.Toast_viewport__NzVhM {
|
|
3528
|
-
--viewport-padding: 25px;
|
|
3529
|
-
position: fixed;
|
|
3530
|
-
bottom: 0;
|
|
3531
|
-
right: 0;
|
|
3532
|
-
display: flex;
|
|
3533
|
-
flex-direction: column;
|
|
3534
|
-
padding: var(--viewport-padding);
|
|
3535
|
-
gap: 10px;
|
|
3536
|
-
width: 460px;
|
|
3537
|
-
max-width: 100vw;
|
|
3538
|
-
margin: 0;
|
|
3539
|
-
list-style: none;
|
|
3540
|
-
z-index: 2147483647;
|
|
3541
|
-
outline: none;
|
|
3542
|
-
}
|
|
3543
|
-
.Toast_toast__YWM3Z {
|
|
3544
|
-
display: grid;
|
|
3545
|
-
grid-template-areas: "icon title action" "icon description action";
|
|
3546
|
-
grid-template-columns: auto 1fr auto;
|
|
3547
|
-
grid-auto-columns: auto;
|
|
3548
|
-
align-items: center;
|
|
3549
|
-
background-color: var(--background-color);
|
|
3550
|
-
border-radius: var(--border-radius);
|
|
3551
|
-
box-shadow: var(--box-shadow-3);
|
|
3552
|
-
padding: 1.25rem 1.5rem;
|
|
3553
|
-
border: var(--border);
|
|
3554
|
-
position: relative;
|
|
3555
|
-
}
|
|
3556
|
-
.Toast_toast__YWM3Z[data-state=open] {
|
|
3557
|
-
animation: Toast_slide-in__ZDZhN 150ms cubic-bezier(0.16, 1, 0.3, 1);
|
|
3558
|
-
}
|
|
3559
|
-
.Toast_toast__YWM3Z[data-state=closed] {
|
|
3560
|
-
animation: Toast_hide__NjM0N 100ms ease-in;
|
|
3561
|
-
}
|
|
3562
|
-
.Toast_toast__YWM3Z[data-swipe=move] {
|
|
3563
|
-
transform: translateX(0);
|
|
3564
|
-
}
|
|
3565
|
-
.Toast_toast__YWM3Z[data-swipe=cancel] {
|
|
3566
|
-
transform: translateX(0);
|
|
3567
|
-
transition: transform 200ms ease-out;
|
|
3568
|
-
}
|
|
3569
|
-
.Toast_toast__YWM3Z[data-swipe=end] {
|
|
3570
|
-
animation: Toast_swipe-out__NzI3N 100ms ease-out;
|
|
3571
|
-
}
|
|
3572
|
-
.Toast_toast__YWM3Z:has(.Toast_icon__MmY1Y) {
|
|
3573
|
-
grid-template-columns: auto 1fr auto;
|
|
3574
|
-
column-gap: var(--gap);
|
|
3575
|
-
}
|
|
3576
|
-
.Toast_icon__MmY1Y {
|
|
3577
|
-
grid-area: icon;
|
|
3578
|
-
}
|
|
3579
|
-
.Toast_icon__MmY1Y:empty {
|
|
3580
|
-
display: none;
|
|
3581
|
-
}
|
|
3582
|
-
.Toast_title__OTU5Z {
|
|
3583
|
-
grid-area: title;
|
|
3584
|
-
color: var(--font-color);
|
|
3585
|
-
font-weight: 700;
|
|
3586
|
-
}
|
|
3587
|
-
.Toast_description__OWJkZ {
|
|
3588
|
-
grid-area: description;
|
|
3589
|
-
}
|
|
3590
|
-
.Toast_action__NjZiZ {
|
|
3591
|
-
grid-area: action;
|
|
3592
|
-
border: 0;
|
|
3593
|
-
background: transparent;
|
|
3594
|
-
}
|
|
3595
|
-
.Toast_close__MjU1N {
|
|
3596
|
-
color: currentColor;
|
|
3597
|
-
position: absolute;
|
|
3598
|
-
right: 10px;
|
|
3599
|
-
top: 10px;
|
|
3600
|
-
display: none;
|
|
3601
|
-
border: 0;
|
|
3602
|
-
background: transparent;
|
|
3603
|
-
}
|
|
3604
|
-
.Toast_toast__YWM3Z:hover .Toast_close__MjU1N {
|
|
3605
|
-
display: block;
|
|
3606
|
-
cursor: pointer;
|
|
3607
|
-
}
|
|
3608
|
-
.Toast_toast__YWM3Z.Toast_info__MTZkO {
|
|
3609
|
-
color: var(--primary-font-color);
|
|
3610
|
-
background: var(--primary-color);
|
|
3611
|
-
border: 0;
|
|
3612
|
-
}
|
|
3613
|
-
.Toast_toast__YWM3Z.Toast_error__NTA3M {
|
|
3614
|
-
color: var(--danger-font-color);
|
|
3615
|
-
background: var(--danger-color);
|
|
3616
|
-
border: 0;
|
|
3617
|
-
}
|
|
3618
|
-
@keyframes Toast_hide__NjM0N {
|
|
3619
|
-
from {
|
|
3620
|
-
opacity: 1;
|
|
3621
|
-
transform: translateY(0);
|
|
3622
|
-
}
|
|
3623
|
-
to {
|
|
3624
|
-
opacity: 0;
|
|
3625
|
-
transform: translateY(50px);
|
|
3626
|
-
}
|
|
3627
|
-
}
|
|
3628
|
-
@keyframes Toast_slide-in__ZDZhN {
|
|
3629
|
-
from {
|
|
3630
|
-
transform: translateX(calc(100% + var(--viewport-padding)));
|
|
3631
|
-
}
|
|
3632
|
-
to {
|
|
3633
|
-
transform: translateX(0);
|
|
3634
|
-
}
|
|
3635
|
-
}
|
|
3636
|
-
@keyframes Toast_swipe-out__NzI3N {
|
|
3637
|
-
from {
|
|
3638
|
-
transform: translateX(0);
|
|
3639
|
-
}
|
|
3640
|
-
to {
|
|
3641
|
-
transform: translateX(calc(100% + var(--viewport-padding)));
|
|
3642
|
-
}
|
|
3643
|
-
}
|
|
3644
|
-
|
|
3645
3664
|
/* virtual-css:css:9e5c8c52b82d4f77f80ba529f88ddc39 */
|
|
3646
3665
|
.Toggle_toggle__OWVjZ {
|
|
3647
3666
|
font-size: var(--font-size);
|
package/dist/index.d.ts
CHANGED
|
@@ -1,21 +1,20 @@
|
|
|
1
1
|
// Generated by dts-bundle v0.7.3
|
|
2
2
|
// Dependencies for this module:
|
|
3
3
|
// ../../react-aria-components
|
|
4
|
-
// ../../@/components/forms/Form
|
|
5
|
-
// ../../@/components/forms/FormField
|
|
6
|
-
// ../../@/components/forms/FormResetButton
|
|
7
|
-
// ../../@/components/forms/FormSubmitButton
|
|
8
4
|
// ../../react
|
|
5
|
+
// ../../react-hook-form
|
|
9
6
|
// ../../@/lib/types
|
|
10
|
-
//
|
|
11
|
-
// ../../@radix-ui/react-toast
|
|
7
|
+
// ../../@/components/toast/Toaster
|
|
12
8
|
|
|
13
9
|
declare module '@umami/react-zen' {
|
|
14
10
|
import { DialogTrigger, FileTrigger, MenuTrigger, SubmenuTrigger, TooltipTrigger } from 'react-aria-components';
|
|
15
|
-
import { Form } from '
|
|
16
|
-
import { FormField } from '
|
|
17
|
-
import { FormResetButton } from '
|
|
18
|
-
import { FormSubmitButton } from '
|
|
11
|
+
import { Form } from '@umami/react-zen/forms/Form';
|
|
12
|
+
import { FormField } from '@umami/react-zen/forms/FormField';
|
|
13
|
+
import { FormResetButton } from '@umami/react-zen/forms/FormResetButton';
|
|
14
|
+
import { FormSubmitButton } from '@umami/react-zen/forms/FormSubmitButton';
|
|
15
|
+
import { Toast } from '@umami/react-zen/toast/Toast';
|
|
16
|
+
import { Toaster } from '@umami/react-zen/toast/Toaster';
|
|
17
|
+
import { ToastProvider } from '@umami/react-zen/toast/ToastProvider';
|
|
19
18
|
import { useDebounce } from '@umami/react-zen/hooks/useDebounce';
|
|
20
19
|
import { useTheme } from '@umami/react-zen/hooks/useTheme';
|
|
21
20
|
import { useToast } from '@umami/react-zen/hooks/useToast';
|
|
@@ -44,8 +43,7 @@ declare module '@umami/react-zen' {
|
|
|
44
43
|
import { Icons } from '@umami/react-zen/Icons';
|
|
45
44
|
import { InlineEditField } from '@umami/react-zen/InlineEditField';
|
|
46
45
|
import { Label } from '@umami/react-zen/Label';
|
|
47
|
-
import { List, ListSeparator, ListSection } from '@umami/react-zen/List';
|
|
48
|
-
import { ListItem } from '@umami/react-zen/ListItem';
|
|
46
|
+
import { List, ListItem, ListSeparator, ListSection } from '@umami/react-zen/List';
|
|
49
47
|
import { Loading } from '@umami/react-zen/Loading';
|
|
50
48
|
import { LoadingButton } from '@umami/react-zen/LoadingButton';
|
|
51
49
|
import { Menu } from '@umami/react-zen/Menu';
|
|
@@ -71,12 +69,97 @@ declare module '@umami/react-zen' {
|
|
|
71
69
|
import { TextOverflow } from '@umami/react-zen/TextOverflow';
|
|
72
70
|
import { TextField } from '@umami/react-zen/TextField';
|
|
73
71
|
import { TextArea } from '@umami/react-zen/TextArea';
|
|
74
|
-
import { Toast, ToastProvider, Toaster } from '@umami/react-zen/Toast';
|
|
75
72
|
import { Toggle } from '@umami/react-zen/Toggle';
|
|
76
73
|
import { ToggleGroup, ToggleGroupItem } from '@umami/react-zen/ToggleGroup';
|
|
77
74
|
import { Tooltip } from '@umami/react-zen/Tooltip';
|
|
78
75
|
import { ZenProvider } from '@umami/react-zen/ZenProvider';
|
|
79
|
-
export { Form, FormField, FormResetButton, FormSubmitButton, useDebounce, useTheme, useToast, Accordion, AccordionItem, AlertBanner, AlertDialog, Blockquote, Box, Breadcrumb, Breadcrumbs, Button, Calendar, Checkbox, Code, Column, Combobox, Container, ConfirmationDialog, DataTable, DataColumn, Dialog, DialogTrigger, Dots, FileTrigger, Flexbox, Grid, Heading, HoverTrigger, Icon, Icons, InlineEditField, Label, List, ListItem, ListSection, Loading, LoadingButton, Menu, MenuItem, MenuTrigger, Modal, NavigationMenu, NavigationMenuItem, PasswordField, Popover, ProgressBar, ProgressCircle, Radio, RadioGroup, Row, SearchField, Select, ListSeparator, Slider, Slot, Spinner, StatusLight, SubmenuTrigger, Switch, Table, TableHeader, TableBody, TableRow, TableColumn, TableCell, Tab, Tabs, TabList, TabPanel, Text, TextOverflow, TextField, TextArea,
|
|
76
|
+
export { Form, FormField, FormResetButton, FormSubmitButton, Toast, Toaster, ToastProvider, useDebounce, useTheme, useToast, Accordion, AccordionItem, AlertBanner, AlertDialog, Blockquote, Box, Breadcrumb, Breadcrumbs, Button, Calendar, Checkbox, Code, Column, Combobox, Container, ConfirmationDialog, DataTable, DataColumn, Dialog, DialogTrigger, Dots, FileTrigger, Flexbox, Grid, Heading, HoverTrigger, Icon, Icons, InlineEditField, Label, List, ListItem, ListSection, Loading, LoadingButton, Menu, MenuItem, MenuTrigger, Modal, NavigationMenu, NavigationMenuItem, PasswordField, Popover, ProgressBar, ProgressCircle, Radio, RadioGroup, Row, SearchField, Select, ListSeparator, Slider, Slot, Spinner, StatusLight, SubmenuTrigger, Switch, Table, TableHeader, TableBody, TableRow, TableColumn, TableCell, Tab, Tabs, TabList, TabPanel, Text, TextOverflow, TextField, TextArea, Toggle, ToggleGroup, ToggleGroupItem, Tooltip, TooltipTrigger, ZenProvider, };
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
declare module '@umami/react-zen/forms/Form' {
|
|
80
|
+
import { HTMLAttributes, ReactNode } from 'react';
|
|
81
|
+
import { UseFormProps, SubmitHandler, UseFormReturn } from 'react-hook-form';
|
|
82
|
+
import { Responsive, Spacing } from '@/lib/types';
|
|
83
|
+
interface FormProps extends UseFormProps, Omit<HTMLAttributes<HTMLFormElement>, 'children'> {
|
|
84
|
+
gap?: Responsive<Spacing>;
|
|
85
|
+
autoComplete?: string;
|
|
86
|
+
onSubmit?: SubmitHandler<any>;
|
|
87
|
+
error?: ReactNode;
|
|
88
|
+
preventSubmit?: boolean;
|
|
89
|
+
children?: ReactNode | ((e: UseFormReturn) => ReactNode);
|
|
90
|
+
}
|
|
91
|
+
function Form({ gap, autoComplete, onSubmit, error, preventSubmit, mode, disabled, reValidateMode, defaultValues, values, errors, resetOptions, resolver, context, shouldFocusError, shouldUnregister, shouldUseNativeValidation, progressive, criteriaMode, delayError, className, children, ...props }: FormProps): import("react").JSX.Element;
|
|
92
|
+
export { Form };
|
|
93
|
+
export type { FormProps };
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
declare module '@umami/react-zen/forms/FormField' {
|
|
97
|
+
import { HTMLAttributes } from 'react';
|
|
98
|
+
import { RegisterOptions, UseFormReturn, FieldValues } from 'react-hook-form';
|
|
99
|
+
interface FormFieldProps extends HTMLAttributes<HTMLDivElement>, Partial<UseFormReturn> {
|
|
100
|
+
name: string;
|
|
101
|
+
description?: string;
|
|
102
|
+
label?: string;
|
|
103
|
+
rules?: RegisterOptions<FieldValues, string>;
|
|
104
|
+
children: any;
|
|
105
|
+
}
|
|
106
|
+
const FormField: import("react").ForwardRefExoticComponent<FormFieldProps & import("react").RefAttributes<any>>;
|
|
107
|
+
export { FormField };
|
|
108
|
+
export type { FormFieldProps };
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
declare module '@umami/react-zen/forms/FormResetButton' {
|
|
112
|
+
import { FieldValues } from 'react-hook-form';
|
|
113
|
+
import { ButtonProps } from '@umami/react-zen/Button';
|
|
114
|
+
interface FormResetButtonProps extends ButtonProps {
|
|
115
|
+
values?: FieldValues | {
|
|
116
|
+
[p: string]: any;
|
|
117
|
+
};
|
|
118
|
+
}
|
|
119
|
+
function FormResetButton({ values, children, onPress, ...props }: FormResetButtonProps): import("react").JSX.Element;
|
|
120
|
+
export { FormResetButton };
|
|
121
|
+
export type { FormResetButtonProps };
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
declare module '@umami/react-zen/forms/FormSubmitButton' {
|
|
125
|
+
import { LoadingButtonProps } from '@umami/react-zen/LoadingButton';
|
|
126
|
+
function FormSubmitButton({ children, disabled, isLoading, ...props }: LoadingButtonProps): import("react").JSX.Element;
|
|
127
|
+
export { FormSubmitButton };
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
declare module '@umami/react-zen/toast/Toast' {
|
|
131
|
+
import { HTMLAttributes } from 'react';
|
|
132
|
+
interface ToastProps extends HTMLAttributes<HTMLDivElement> {
|
|
133
|
+
id: string;
|
|
134
|
+
message: string;
|
|
135
|
+
title?: string;
|
|
136
|
+
actions?: string[];
|
|
137
|
+
allowClose?: boolean;
|
|
138
|
+
variant?: 'info' | 'error';
|
|
139
|
+
onClose?: (action?: string) => void;
|
|
140
|
+
}
|
|
141
|
+
function Toast({ id, message, title, actions, allowClose, variant, className, children, onClose, ...props }: ToastProps): import("react").JSX.Element;
|
|
142
|
+
export { Toast };
|
|
143
|
+
export type { ToastProps };
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
declare module '@umami/react-zen/toast/Toaster' {
|
|
147
|
+
export type ToastPosition = 'top-left' | 'top' | 'top-right' | 'bottom-left' | 'bottom' | 'bottom-right' | 'left' | 'right';
|
|
148
|
+
export interface ToasterProps {
|
|
149
|
+
duration?: number;
|
|
150
|
+
position?: ToastPosition;
|
|
151
|
+
}
|
|
152
|
+
export function Toaster({ duration, position }: ToasterProps): import("react").JSX.Element;
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
declare module '@umami/react-zen/toast/ToastProvider' {
|
|
156
|
+
import { ReactNode } from 'react';
|
|
157
|
+
import { ToasterProps } from '@/components/toast/Toaster';
|
|
158
|
+
export interface ToastProviderProps extends ToasterProps {
|
|
159
|
+
children: ReactNode;
|
|
160
|
+
}
|
|
161
|
+
export const ToastContext: import("react").Context<{}>;
|
|
162
|
+
export function ToastProvider({ children, ...config }: ToastProviderProps): import("react").JSX.Element;
|
|
80
163
|
}
|
|
81
164
|
|
|
82
165
|
declare module '@umami/react-zen/hooks/useDebounce' {
|
|
@@ -96,18 +179,24 @@ declare module '@umami/react-zen/hooks/useTheme' {
|
|
|
96
179
|
}
|
|
97
180
|
|
|
98
181
|
declare module '@umami/react-zen/hooks/useToast' {
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
182
|
+
export interface ToastOptions {
|
|
183
|
+
duration?: number;
|
|
184
|
+
title?: string;
|
|
185
|
+
actions?: string[];
|
|
186
|
+
allowClose?: boolean;
|
|
187
|
+
variant?: 'info' | 'error';
|
|
188
|
+
onClose?: (action?: string) => void;
|
|
189
|
+
}
|
|
190
|
+
export interface ToastState extends ToastOptions {
|
|
191
|
+
id: string;
|
|
102
192
|
message: string;
|
|
103
|
-
|
|
193
|
+
timestamp: number;
|
|
104
194
|
}
|
|
105
|
-
function
|
|
106
|
-
function useToast(): {
|
|
107
|
-
toast:
|
|
195
|
+
export function removeToast(id: string): void;
|
|
196
|
+
export function useToast(): {
|
|
197
|
+
toast: (message: string, options?: ToastOptions) => void;
|
|
108
198
|
toasts: ToastState[];
|
|
109
199
|
};
|
|
110
|
-
export { useToast, toast };
|
|
111
200
|
}
|
|
112
201
|
|
|
113
202
|
declare module '@umami/react-zen/Accordion' {
|
|
@@ -479,26 +568,20 @@ declare module '@umami/react-zen/Label' {
|
|
|
479
568
|
|
|
480
569
|
declare module '@umami/react-zen/List' {
|
|
481
570
|
import { ReactNode } from 'react';
|
|
482
|
-
import { ListBoxProps, SeparatorProps, ListBoxSectionProps } from 'react-aria-components';
|
|
571
|
+
import { ListBoxProps, SeparatorProps, ListBoxSectionProps, ListBoxItemProps } from 'react-aria-components';
|
|
483
572
|
export interface ListProps extends ListBoxProps<any> {
|
|
484
573
|
items?: any[];
|
|
485
574
|
className?: string;
|
|
486
575
|
children?: ReactNode;
|
|
487
576
|
}
|
|
488
577
|
export function List({ items, className, children, ...props }: ListProps): import("react").JSX.Element;
|
|
578
|
+
export function ListItem({ children, className, ...props }: ListBoxItemProps<any>): import("react").JSX.Element;
|
|
489
579
|
export function ListSeparator({ className, ...props }: SeparatorProps): import("react").JSX.Element;
|
|
490
580
|
export function ListSection({ title, className, children, ...props }: ListBoxSectionProps<any> & {
|
|
491
581
|
title?: string;
|
|
492
582
|
}): ReactNode;
|
|
493
583
|
}
|
|
494
584
|
|
|
495
|
-
declare module '@umami/react-zen/ListItem' {
|
|
496
|
-
import { ListBoxItemProps } from 'react-aria-components';
|
|
497
|
-
function ListItem({ children, className, ...props }: ListBoxItemProps<any>): import("react").JSX.Element;
|
|
498
|
-
export { ListItem };
|
|
499
|
-
export type { ListBoxItemProps as ListItemProps };
|
|
500
|
-
}
|
|
501
|
-
|
|
502
585
|
declare module '@umami/react-zen/Loading' {
|
|
503
586
|
export interface LoadingProps {
|
|
504
587
|
size?: 'sm' | 'md' | 'lg' | 'xl';
|
|
@@ -662,7 +745,11 @@ declare module '@umami/react-zen/Slider' {
|
|
|
662
745
|
}
|
|
663
746
|
|
|
664
747
|
declare module '@umami/react-zen/Slot' {
|
|
665
|
-
|
|
748
|
+
import { ReactElement, ReactNode } from 'react';
|
|
749
|
+
export function Slot({ children, ...props }: {
|
|
750
|
+
children: ReactElement | ReactNode;
|
|
751
|
+
[key: string]: any;
|
|
752
|
+
}): ReactElement<unknown, string | import("react").JSXElementConstructor<any>> | null;
|
|
666
753
|
}
|
|
667
754
|
|
|
668
755
|
declare module '@umami/react-zen/Spinner' {
|
|
@@ -777,21 +864,6 @@ declare module '@umami/react-zen/TextArea' {
|
|
|
777
864
|
export type { TextAreaProps };
|
|
778
865
|
}
|
|
779
866
|
|
|
780
|
-
declare module '@umami/react-zen/Toast' {
|
|
781
|
-
import { ToastProvider, ToastProviderProps, ToastProps, ToastViewportProps } from '@radix-ui/react-toast';
|
|
782
|
-
interface _ToastProps extends ToastProps {
|
|
783
|
-
title?: string;
|
|
784
|
-
description?: string;
|
|
785
|
-
actionText?: string;
|
|
786
|
-
allowClose?: boolean;
|
|
787
|
-
variant?: 'info' | 'error';
|
|
788
|
-
}
|
|
789
|
-
function Toast({ title, description, actionText, allowClose, variant, className, children, ...props }: _ToastProps): import("react").JSX.Element;
|
|
790
|
-
function Toaster(props: ToastViewportProps): import("react").JSX.Element;
|
|
791
|
-
export { Toast, ToastProvider, Toaster };
|
|
792
|
-
export type { _ToastProps as ToastProps, ToastProviderProps, ToastViewportProps as ToasterProps };
|
|
793
|
-
}
|
|
794
|
-
|
|
795
867
|
declare module '@umami/react-zen/Toggle' {
|
|
796
868
|
import { ToggleButtonProps } from 'react-aria-components';
|
|
797
869
|
interface ToggleProps extends ToggleButtonProps {
|
|
@@ -824,16 +896,14 @@ declare module '@umami/react-zen/Tooltip' {
|
|
|
824
896
|
|
|
825
897
|
declare module '@umami/react-zen/ZenProvider' {
|
|
826
898
|
import { ReactNode } from 'react';
|
|
827
|
-
import {
|
|
899
|
+
import { ToasterProps } from '@/components/toast/Toaster';
|
|
828
900
|
interface ZenProviderProps {
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
toast?: ToastProviderProps;
|
|
833
|
-
};
|
|
901
|
+
theme?: string;
|
|
902
|
+
colorScheme?: 'light' | 'dark' | 'system';
|
|
903
|
+
toast?: ToasterProps;
|
|
834
904
|
children: ReactNode;
|
|
835
905
|
}
|
|
836
|
-
function ZenProvider({
|
|
906
|
+
function ZenProvider({ children, ...props }: ZenProviderProps): import("react").JSX.Element;
|
|
837
907
|
export { ZenProvider };
|
|
838
908
|
export type { ZenProviderProps };
|
|
839
909
|
}
|