@stevederico/skateboard-ui 3.12.0 → 4.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/CHANGELOG.md +12 -0
- package/README.md +37 -31
- package/dist/shadcn/ui/accordion.d.ts +1 -6
- package/dist/shadcn/ui/accordion.js +3 -17
- package/dist/shadcn/ui/alert-dialog.d.ts +1 -18
- package/dist/shadcn/ui/alert-dialog.js +3 -43
- package/dist/shadcn/ui/alert.d.ts +1 -13
- package/dist/shadcn/ui/alert.js +3 -28
- package/dist/shadcn/ui/aspect-ratio.d.ts +1 -4
- package/dist/shadcn/ui/aspect-ratio.js +3 -8
- package/dist/shadcn/ui/avatar.d.ts +1 -11
- package/dist/shadcn/ui/avatar.js +3 -24
- package/dist/shadcn/ui/badge.d.ts +1 -14
- package/dist/shadcn/ui/badge.js +3 -33
- package/dist/shadcn/ui/breadcrumb.d.ts +1 -10
- package/dist/shadcn/ui/breadcrumb.js +3 -37
- package/dist/shadcn/ui/button-group.d.ts +1 -13
- package/dist/shadcn/ui/button-group.js +3 -36
- package/dist/shadcn/ui/button.d.ts +1 -34
- package/dist/shadcn/ui/button.js +3 -53
- package/dist/shadcn/ui/calendar.d.ts +1 -13
- package/dist/shadcn/ui/calendar.js +3 -75
- package/dist/shadcn/ui/card.d.ts +1 -11
- package/dist/shadcn/ui/card.js +3 -25
- package/dist/shadcn/ui/checkbox.d.ts +1 -3
- package/dist/shadcn/ui/checkbox.js +3 -9
- package/dist/shadcn/ui/collapsible.d.ts +1 -5
- package/dist/shadcn/ui/collapsible.js +3 -13
- package/dist/shadcn/ui/command.d.ts +1 -19
- package/dist/shadcn/ui/command.js +3 -35
- package/dist/shadcn/ui/context-menu.d.ts +1 -29
- package/dist/shadcn/ui/context-menu.js +3 -52
- package/dist/shadcn/ui/dialog.d.ts +1 -17
- package/dist/shadcn/ui/dialog.js +3 -38
- package/dist/shadcn/ui/drawer.d.ts +1 -13
- package/dist/shadcn/ui/drawer.js +3 -196
- package/dist/shadcn/ui/dropdown-menu.d.ts +1 -29
- package/dist/shadcn/ui/dropdown-menu.js +3 -52
- package/dist/shadcn/ui/empty.d.ts +1 -14
- package/dist/shadcn/ui/empty.js +3 -33
- package/dist/shadcn/ui/field.d.ts +1 -28
- package/dist/shadcn/ui/field.js +3 -68
- package/dist/shadcn/ui/hover-card.d.ts +1 -5
- package/dist/shadcn/ui/hover-card.js +3 -14
- package/dist/shadcn/ui/input-group.d.ts +1 -28
- package/dist/shadcn/ui/input-group.js +3 -58
- package/dist/shadcn/ui/input.d.ts +1 -3
- package/dist/shadcn/ui/input.js +3 -8
- package/dist/shadcn/ui/item.d.ts +1 -34
- package/dist/shadcn/ui/item.js +3 -79
- package/dist/shadcn/ui/kbd.d.ts +1 -3
- package/dist/shadcn/ui/kbd.js +3 -9
- package/dist/shadcn/ui/label.d.ts +1 -3
- package/dist/shadcn/ui/label.js +3 -8
- package/dist/shadcn/ui/menubar.d.ts +1 -29
- package/dist/shadcn/ui/menubar.js +3 -57
- package/dist/shadcn/ui/navigation-menu.d.ts +1 -13
- package/dist/shadcn/ui/navigation-menu.js +3 -31
- package/dist/shadcn/ui/pagination.d.ts +1 -17
- package/dist/shadcn/ui/pagination.js +3 -27
- package/dist/shadcn/ui/popover.d.ts +1 -9
- package/dist/shadcn/ui/popover.js +3 -24
- package/dist/shadcn/ui/progress.d.ts +1 -7
- package/dist/shadcn/ui/progress.js +3 -20
- package/dist/shadcn/ui/radio-group.d.ts +1 -5
- package/dist/shadcn/ui/radio-group.js +3 -12
- package/dist/shadcn/ui/scroll-area.d.ts +1 -5
- package/dist/shadcn/ui/scroll-area.js +3 -12
- package/dist/shadcn/ui/select.d.ts +1 -15
- package/dist/shadcn/ui/select.js +3 -35
- package/dist/shadcn/ui/separator.d.ts +1 -3
- package/dist/shadcn/ui/separator.js +3 -8
- package/dist/shadcn/ui/sheet.d.ts +1 -14
- package/dist/shadcn/ui/sheet.js +3 -38
- package/dist/shadcn/ui/sidebar.d.ts +1 -70
- package/dist/shadcn/ui/sidebar.js +3 -256
- package/dist/shadcn/ui/skeleton.d.ts +1 -2
- package/dist/shadcn/ui/skeleton.js +3 -6
- package/dist/shadcn/ui/slider.d.ts +1 -3
- package/dist/shadcn/ui/slider.js +3 -12
- package/dist/shadcn/ui/spinner.d.ts +1 -2
- package/dist/shadcn/ui/spinner.js +3 -7
- package/dist/shadcn/ui/switch.d.ts +1 -5
- package/dist/shadcn/ui/switch.js +3 -8
- package/dist/shadcn/ui/table.d.ts +1 -10
- package/dist/shadcn/ui/table.js +3 -29
- package/dist/shadcn/ui/tabs.d.ts +1 -13
- package/dist/shadcn/ui/tabs.js +3 -29
- package/dist/shadcn/ui/textarea.d.ts +1 -3
- package/dist/shadcn/ui/textarea.js +3 -7
- package/dist/shadcn/ui/toggle-group.d.ts +1 -11
- package/dist/shadcn/ui/toggle-group.js +3 -25
- package/dist/shadcn/ui/toggle.d.ts +1 -15
- package/dist/shadcn/ui/toggle.js +3 -26
- package/dist/shadcn/ui/tooltip.d.ts +1 -6
- package/dist/shadcn/ui/tooltip.js +3 -17
- package/dist/ui/accordion.d.ts +21 -0
- package/dist/ui/accordion.js +67 -0
- package/dist/ui/alert-dialog.d.ts +32 -0
- package/dist/ui/alert-dialog.js +102 -0
- package/dist/ui/alert.d.ts +13 -0
- package/dist/ui/alert.js +28 -0
- package/dist/ui/aspect-ratio.d.ts +5 -0
- package/dist/ui/aspect-ratio.js +9 -0
- package/dist/ui/avatar.d.ts +14 -0
- package/dist/ui/avatar.js +49 -0
- package/dist/ui/badge.d.ts +22 -0
- package/dist/ui/badge.js +26 -0
- package/dist/ui/breadcrumb.d.ts +13 -0
- package/dist/ui/breadcrumb.js +29 -0
- package/dist/ui/button-group.d.ts +21 -0
- package/dist/ui/button-group.js +29 -0
- package/dist/ui/button.d.ts +38 -0
- package/dist/ui/button.js +49 -0
- package/dist/ui/calendar.d.ts +13 -0
- package/dist/ui/calendar.js +75 -0
- package/dist/ui/card.d.ts +11 -0
- package/dist/ui/card.js +25 -0
- package/dist/ui/checkbox.d.ts +17 -0
- package/dist/ui/checkbox.js +25 -0
- package/dist/ui/collapsible.d.ts +11 -0
- package/dist/ui/collapsible.js +40 -0
- package/dist/ui/command.d.ts +19 -0
- package/dist/ui/command.js +35 -0
- package/dist/ui/context-menu.d.ts +53 -0
- package/dist/ui/context-menu.js +345 -0
- package/dist/ui/dialog.d.ts +40 -0
- package/dist/ui/dialog.js +109 -0
- package/dist/ui/drawer.d.ts +36 -0
- package/dist/ui/drawer.js +234 -0
- package/dist/ui/dropdown-menu.d.ts +61 -0
- package/dist/ui/dropdown-menu.js +323 -0
- package/dist/ui/empty.d.ts +14 -0
- package/dist/ui/empty.js +33 -0
- package/dist/ui/field.d.ts +28 -0
- package/dist/ui/field.js +68 -0
- package/dist/ui/hover-card.d.ts +32 -0
- package/dist/ui/hover-card.js +119 -0
- package/dist/ui/input-group.d.ts +28 -0
- package/dist/ui/input-group.js +58 -0
- package/dist/ui/input.d.ts +3 -0
- package/dist/ui/input.js +7 -0
- package/dist/ui/item.d.ts +41 -0
- package/dist/ui/item.js +69 -0
- package/dist/ui/kbd.d.ts +4 -0
- package/dist/ui/kbd.js +10 -0
- package/dist/ui/label.d.ts +3 -0
- package/dist/ui/label.js +8 -0
- package/dist/ui/menubar.d.ts +59 -0
- package/dist/ui/menubar.js +384 -0
- package/dist/ui/navigation-menu.d.ts +24 -0
- package/dist/ui/navigation-menu.js +134 -0
- package/dist/ui/pagination.d.ts +17 -0
- package/dist/ui/pagination.js +36 -0
- package/dist/ui/popover.d.ts +25 -0
- package/dist/ui/popover.js +68 -0
- package/dist/ui/portal.d.ts +7 -0
- package/dist/ui/portal.js +12 -0
- package/dist/ui/progress.d.ts +15 -0
- package/dist/ui/progress.js +36 -0
- package/dist/ui/radio-group.d.ts +17 -0
- package/dist/ui/radio-group.js +54 -0
- package/dist/ui/scroll-area.d.ts +9 -0
- package/dist/ui/scroll-area.js +72 -0
- package/dist/ui/select.d.ts +37 -0
- package/dist/ui/select.js +216 -0
- package/dist/ui/separator.d.ts +14 -0
- package/dist/ui/separator.js +13 -0
- package/dist/ui/sheet.d.ts +31 -0
- package/dist/ui/sheet.js +121 -0
- package/dist/ui/sidebar.d.ts +86 -0
- package/dist/ui/sidebar.js +211 -0
- package/dist/ui/skeleton.d.ts +3 -0
- package/dist/ui/skeleton.js +7 -0
- package/dist/ui/slider.d.ts +18 -0
- package/dist/ui/slider.js +94 -0
- package/dist/ui/slot.d.ts +27 -0
- package/dist/ui/slot.js +62 -0
- package/dist/ui/spinner.d.ts +3 -0
- package/dist/ui/spinner.js +8 -0
- package/dist/ui/switch.d.ts +17 -0
- package/dist/ui/switch.js +23 -0
- package/dist/ui/table.d.ts +10 -0
- package/dist/ui/table.js +29 -0
- package/dist/ui/tabs.d.ts +29 -0
- package/dist/ui/tabs.js +82 -0
- package/dist/ui/textarea.d.ts +3 -0
- package/dist/ui/textarea.js +7 -0
- package/dist/ui/toggle-group.d.ts +23 -0
- package/dist/ui/toggle-group.js +52 -0
- package/dist/ui/toggle.d.ts +25 -0
- package/dist/ui/toggle.js +41 -0
- package/dist/ui/tooltip.d.ts +25 -0
- package/dist/ui/tooltip.js +90 -0
- package/dist/ui/use-controllable-state.d.ts +10 -0
- package/dist/ui/use-controllable-state.js +17 -0
- package/dist/ui/use-dismiss.d.ts +10 -0
- package/dist/ui/use-dismiss.js +51 -0
- package/dist/ui/use-floating.d.ts +38 -0
- package/dist/ui/use-floating.js +128 -0
- package/dist/ui/use-presence.d.ts +8 -0
- package/dist/ui/use-presence.js +48 -0
- package/package.json +6 -1
- package/dist/shadcn/lib/base-ui/LICENSE +0 -21
- package/dist/shadcn/lib/base-ui/_chunk-000kmre8.js +0 -150
- package/dist/shadcn/lib/base-ui/_chunk-1vw45v38.js +0 -64
- package/dist/shadcn/lib/base-ui/_chunk-23rx7haq.js +0 -81
- package/dist/shadcn/lib/base-ui/_chunk-242gh8ph.js +0 -230
- package/dist/shadcn/lib/base-ui/_chunk-26cc610z.js +0 -6
- package/dist/shadcn/lib/base-ui/_chunk-2z044bba.js +0 -5890
- package/dist/shadcn/lib/base-ui/_chunk-3cpd1vjz.js +0 -13
- package/dist/shadcn/lib/base-ui/_chunk-3enq1vat.js +0 -82
- package/dist/shadcn/lib/base-ui/_chunk-3xpke33f.js +0 -23
- package/dist/shadcn/lib/base-ui/_chunk-451nqgsa.js +0 -6
- package/dist/shadcn/lib/base-ui/_chunk-4maf6pas.js +0 -11
- package/dist/shadcn/lib/base-ui/_chunk-4zhfq4d3.js +0 -16
- package/dist/shadcn/lib/base-ui/_chunk-5gaqyne5.js +0 -21
- package/dist/shadcn/lib/base-ui/_chunk-5tt5hk59.js +0 -4
- package/dist/shadcn/lib/base-ui/_chunk-5tze5c8q.js +0 -13
- package/dist/shadcn/lib/base-ui/_chunk-5xmdvndx.js +0 -225
- package/dist/shadcn/lib/base-ui/_chunk-6adaer33.js +0 -435
- package/dist/shadcn/lib/base-ui/_chunk-6ejf1z1r.js +0 -9
- package/dist/shadcn/lib/base-ui/_chunk-6kqramh9.js +0 -27
- package/dist/shadcn/lib/base-ui/_chunk-7b9dc493.js +0 -14
- package/dist/shadcn/lib/base-ui/_chunk-8a9vv8am.js +0 -89
- package/dist/shadcn/lib/base-ui/_chunk-8ctgmf06.js +0 -129
- package/dist/shadcn/lib/base-ui/_chunk-8ganmsbg.js +0 -54
- package/dist/shadcn/lib/base-ui/_chunk-8xaqxgck.js +0 -15
- package/dist/shadcn/lib/base-ui/_chunk-95tf2rxq.js +0 -62
- package/dist/shadcn/lib/base-ui/_chunk-9x63vfqj.js +0 -70
- package/dist/shadcn/lib/base-ui/_chunk-ase0ydtt.js +0 -9
- package/dist/shadcn/lib/base-ui/_chunk-b0nc8wq7.js +0 -34
- package/dist/shadcn/lib/base-ui/_chunk-b5ya6xds.js +0 -10
- package/dist/shadcn/lib/base-ui/_chunk-b6dkjkbw.js +0 -43
- package/dist/shadcn/lib/base-ui/_chunk-c2bz952e.js +0 -19
- package/dist/shadcn/lib/base-ui/_chunk-cdgfsr3q.js +0 -15
- package/dist/shadcn/lib/base-ui/_chunk-cdj8cpx5.js +0 -347
- package/dist/shadcn/lib/base-ui/_chunk-cgptgywc.js +0 -104
- package/dist/shadcn/lib/base-ui/_chunk-cwvtvwc7.js +0 -35
- package/dist/shadcn/lib/base-ui/_chunk-dan0mva4.js +0 -23
- package/dist/shadcn/lib/base-ui/_chunk-dzvjwv25.js +0 -0
- package/dist/shadcn/lib/base-ui/_chunk-e13rsb6b.js +0 -184
- package/dist/shadcn/lib/base-ui/_chunk-e56mpvk1.js +0 -118
- package/dist/shadcn/lib/base-ui/_chunk-e6k2ecs7.js +0 -48
- package/dist/shadcn/lib/base-ui/_chunk-ebyxgtb4.js +0 -29
- package/dist/shadcn/lib/base-ui/_chunk-f2wttwrf.js +0 -39
- package/dist/shadcn/lib/base-ui/_chunk-fdzctasg.js +0 -38
- package/dist/shadcn/lib/base-ui/_chunk-ffpjy0ta.js +0 -39
- package/dist/shadcn/lib/base-ui/_chunk-fqry7pew.js +0 -603
- package/dist/shadcn/lib/base-ui/_chunk-ghn1tzt8.js +0 -84
- package/dist/shadcn/lib/base-ui/_chunk-gy0bpkmx.js +0 -12
- package/dist/shadcn/lib/base-ui/_chunk-hm5h9vsk.js +0 -16
- package/dist/shadcn/lib/base-ui/_chunk-htdj1jps.js +0 -833
- package/dist/shadcn/lib/base-ui/_chunk-j29xjete.js +0 -146
- package/dist/shadcn/lib/base-ui/_chunk-j3qkyd10.js +0 -50
- package/dist/shadcn/lib/base-ui/_chunk-ktvsd5k6.js +0 -2386
- package/dist/shadcn/lib/base-ui/_chunk-kw8nnq00.js +0 -546
- package/dist/shadcn/lib/base-ui/_chunk-m307wpdj.js +0 -18
- package/dist/shadcn/lib/base-ui/_chunk-mnd0j7v9.js +0 -15
- package/dist/shadcn/lib/base-ui/_chunk-n11h505c.js +0 -32
- package/dist/shadcn/lib/base-ui/_chunk-p0e2qacz.js +0 -26
- package/dist/shadcn/lib/base-ui/_chunk-pv7b791x.js +0 -106
- package/dist/shadcn/lib/base-ui/_chunk-q5cg71p7.js +0 -83
- package/dist/shadcn/lib/base-ui/_chunk-qbezxj1g.js +0 -385
- package/dist/shadcn/lib/base-ui/_chunk-qmsqz6nt.js +0 -15
- package/dist/shadcn/lib/base-ui/_chunk-rrh8rt4v.js +0 -65
- package/dist/shadcn/lib/base-ui/_chunk-s5pwkz8v.js +0 -25
- package/dist/shadcn/lib/base-ui/_chunk-svxv97ph.js +0 -218
- package/dist/shadcn/lib/base-ui/_chunk-t7ppm3t0.js +0 -68
- package/dist/shadcn/lib/base-ui/_chunk-vg16xxmb.js +0 -52
- package/dist/shadcn/lib/base-ui/_chunk-vgkfmtbe.js +0 -21
- package/dist/shadcn/lib/base-ui/_chunk-watha94s.js +0 -14
- package/dist/shadcn/lib/base-ui/_chunk-wdqynnjf.js +0 -35
- package/dist/shadcn/lib/base-ui/_chunk-wx2nxg0p.js +0 -15
- package/dist/shadcn/lib/base-ui/_chunk-x11e1k9r.js +0 -0
- package/dist/shadcn/lib/base-ui/_chunk-x8xehj6d.js +0 -302
- package/dist/shadcn/lib/base-ui/_chunk-xcqbtm2f.js +0 -28
- package/dist/shadcn/lib/base-ui/_chunk-ytnp24gq.js +0 -328
- package/dist/shadcn/lib/base-ui/_chunk-yzr7eg4b.js +0 -6
- package/dist/shadcn/lib/base-ui/_chunk-zk4mtm9m.js +0 -9
- package/dist/shadcn/lib/base-ui/accordion.d.ts +0 -447
- package/dist/shadcn/lib/base-ui/accordion.js +0 -630
- package/dist/shadcn/lib/base-ui/alert-dialog.d.ts +0 -1467
- package/dist/shadcn/lib/base-ui/alert-dialog.js +0 -98
- package/dist/shadcn/lib/base-ui/avatar.d.ts +0 -123
- package/dist/shadcn/lib/base-ui/avatar.js +0 -235
- package/dist/shadcn/lib/base-ui/button.d.ts +0 -84
- package/dist/shadcn/lib/base-ui/button.js +0 -51
- package/dist/shadcn/lib/base-ui/checkbox.d.ts +0 -341
- package/dist/shadcn/lib/base-ui/checkbox.js +0 -501
- package/dist/shadcn/lib/base-ui/collapsible.d.ts +0 -291
- package/dist/shadcn/lib/base-ui/collapsible.js +0 -264
- package/dist/shadcn/lib/base-ui/context-menu.d.ts +0 -2213
- package/dist/shadcn/lib/base-ui/context-menu.js +0 -323
- package/dist/shadcn/lib/base-ui/dialog.d.ts +0 -1448
- package/dist/shadcn/lib/base-ui/dialog.js +0 -79
- package/dist/shadcn/lib/base-ui/input.d.ts +0 -506
- package/dist/shadcn/lib/base-ui/input.js +0 -1027
- package/dist/shadcn/lib/base-ui/menu.d.ts +0 -2275
- package/dist/shadcn/lib/base-ui/menu.js +0 -60
- package/dist/shadcn/lib/base-ui/menubar.d.ts +0 -48
- package/dist/shadcn/lib/base-ui/menubar.js +0 -156
- package/dist/shadcn/lib/base-ui/merge-props.d.ts +0 -70
- package/dist/shadcn/lib/base-ui/merge-props.js +0 -15
- package/dist/shadcn/lib/base-ui/navigation-menu.d.ts +0 -825
- package/dist/shadcn/lib/base-ui/navigation-menu.js +0 -1849
- package/dist/shadcn/lib/base-ui/popover.d.ts +0 -1743
- package/dist/shadcn/lib/base-ui/popover.js +0 -1089
- package/dist/shadcn/lib/base-ui/preview-card.d.ts +0 -1608
- package/dist/shadcn/lib/base-ui/preview-card.js +0 -919
- package/dist/shadcn/lib/base-ui/progress.d.ts +0 -172
- package/dist/shadcn/lib/base-ui/progress.js +0 -272
- package/dist/shadcn/lib/base-ui/radio-group.d.ts +0 -260
- package/dist/shadcn/lib/base-ui/radio-group.js +0 -239
- package/dist/shadcn/lib/base-ui/radio.d.ts +0 -176
- package/dist/shadcn/lib/base-ui/radio.js +0 -387
- package/dist/shadcn/lib/base-ui/scroll-area.d.ts +0 -241
- package/dist/shadcn/lib/base-ui/scroll-area.js +0 -1055
- package/dist/shadcn/lib/base-ui/select.d.ts +0 -1266
- package/dist/shadcn/lib/base-ui/select.js +0 -2450
- package/dist/shadcn/lib/base-ui/separator.d.ts +0 -76
- package/dist/shadcn/lib/base-ui/separator.js +0 -11
- package/dist/shadcn/lib/base-ui/slider.d.ts +0 -551
- package/dist/shadcn/lib/base-ui/slider.js +0 -1583
- package/dist/shadcn/lib/base-ui/switch.d.ts +0 -313
- package/dist/shadcn/lib/base-ui/switch.js +0 -326
- package/dist/shadcn/lib/base-ui/tabs.d.ts +0 -406
- package/dist/shadcn/lib/base-ui/tabs.js +0 -915
- package/dist/shadcn/lib/base-ui/toggle-group.d.ts +0 -235
- package/dist/shadcn/lib/base-ui/toggle-group.js +0 -145
- package/dist/shadcn/lib/base-ui/toggle.d.ts +0 -224
- package/dist/shadcn/lib/base-ui/toggle.js +0 -127
- package/dist/shadcn/lib/base-ui/tooltip.d.ts +0 -1656
- package/dist/shadcn/lib/base-ui/tooltip.js +0 -920
- package/dist/shadcn/lib/base-ui/use-render.d.ts +0 -87
- package/dist/shadcn/lib/base-ui/use-render.js +0 -15
|
@@ -1,833 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
InternalBackdrop,
|
|
3
|
-
useOpenMethodTriggerProps,
|
|
4
|
-
useScrollLock
|
|
5
|
-
} from "./_chunk-ytnp24gq.js";
|
|
6
|
-
import {
|
|
7
|
-
createInitialPopupStoreState,
|
|
8
|
-
createPopupFloatingRootContext,
|
|
9
|
-
popupStoreSelectors
|
|
10
|
-
} from "./_chunk-q5cg71p7.js";
|
|
11
|
-
import {
|
|
12
|
-
FOCUSABLE_POPUP_PROPS,
|
|
13
|
-
setOpenTriggerState,
|
|
14
|
-
useImplicitActiveTrigger,
|
|
15
|
-
useOnFirstRender,
|
|
16
|
-
useOpenStateTransitions,
|
|
17
|
-
usePopupInteractionProps,
|
|
18
|
-
usePopupRootSync,
|
|
19
|
-
usePopupStore,
|
|
20
|
-
useTriggerDataForwarding
|
|
21
|
-
} from "./_chunk-242gh8ph.js";
|
|
22
|
-
import {
|
|
23
|
-
CommonPopupDataAttributes,
|
|
24
|
-
popupStateMapping,
|
|
25
|
-
triggerOpenStateMapping
|
|
26
|
-
} from "./_chunk-t7ppm3t0.js";
|
|
27
|
-
import {
|
|
28
|
-
inertValue
|
|
29
|
-
} from "./_chunk-3cpd1vjz.js";
|
|
30
|
-
import {
|
|
31
|
-
CLICK_TRIGGER_IDENTIFIER,
|
|
32
|
-
FloatingFocusManager,
|
|
33
|
-
FloatingPortal,
|
|
34
|
-
PopupTriggerMap,
|
|
35
|
-
ReactStore,
|
|
36
|
-
createSelector,
|
|
37
|
-
useClick,
|
|
38
|
-
useDismiss
|
|
39
|
-
} from "./_chunk-2z044bba.js";
|
|
40
|
-
import {
|
|
41
|
-
contains,
|
|
42
|
-
getTarget
|
|
43
|
-
} from "./_chunk-cgptgywc.js";
|
|
44
|
-
import {
|
|
45
|
-
COMPOSITE_KEYS
|
|
46
|
-
} from "./_chunk-pv7b791x.js";
|
|
47
|
-
import {
|
|
48
|
-
createChangeEventDetails,
|
|
49
|
-
exports_reason_parts
|
|
50
|
-
} from "./_chunk-e56mpvk1.js";
|
|
51
|
-
import {
|
|
52
|
-
useBaseUiId
|
|
53
|
-
} from "./_chunk-wdqynnjf.js";
|
|
54
|
-
import {
|
|
55
|
-
transitionStatusMapping,
|
|
56
|
-
useOpenChangeComplete
|
|
57
|
-
} from "./_chunk-e13rsb6b.js";
|
|
58
|
-
import {
|
|
59
|
-
useButton
|
|
60
|
-
} from "./_chunk-5xmdvndx.js";
|
|
61
|
-
import {
|
|
62
|
-
EMPTY_OBJECT,
|
|
63
|
-
useRenderElement
|
|
64
|
-
} from "./_chunk-x8xehj6d.js";
|
|
65
|
-
import {
|
|
66
|
-
mergeProps
|
|
67
|
-
} from "./_chunk-svxv97ph.js";
|
|
68
|
-
|
|
69
|
-
// node_modules/@base-ui/react/esm/dialog/backdrop/DialogBackdrop.js
|
|
70
|
-
import * as React2 from "react";
|
|
71
|
-
|
|
72
|
-
// node_modules/@base-ui/react/esm/dialog/root/DialogRootContext.js
|
|
73
|
-
import * as React from "react";
|
|
74
|
-
"use client";
|
|
75
|
-
var IsDrawerContext = /* @__PURE__ */ React.createContext(false);
|
|
76
|
-
if (true)
|
|
77
|
-
IsDrawerContext.displayName = "IsDrawerContext";
|
|
78
|
-
var DialogRootContext = /* @__PURE__ */ React.createContext(undefined);
|
|
79
|
-
if (true)
|
|
80
|
-
DialogRootContext.displayName = "DialogRootContext";
|
|
81
|
-
function useDialogRootContext(optional) {
|
|
82
|
-
const dialogRootContext = React.useContext(DialogRootContext);
|
|
83
|
-
if (optional === false && dialogRootContext === undefined) {
|
|
84
|
-
throw new Error("Base UI: DialogRootContext is missing. Dialog parts must be placed within <Dialog.Root>.");
|
|
85
|
-
}
|
|
86
|
-
return dialogRootContext;
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
// node_modules/@base-ui/react/esm/dialog/backdrop/DialogBackdrop.js
|
|
90
|
-
"use client";
|
|
91
|
-
var stateAttributesMapping = {
|
|
92
|
-
...popupStateMapping,
|
|
93
|
-
...transitionStatusMapping
|
|
94
|
-
};
|
|
95
|
-
var DialogBackdrop = /* @__PURE__ */ React2.forwardRef(function DialogBackdrop2(componentProps, forwardedRef) {
|
|
96
|
-
const {
|
|
97
|
-
render,
|
|
98
|
-
className,
|
|
99
|
-
style,
|
|
100
|
-
forceRender = false,
|
|
101
|
-
...elementProps
|
|
102
|
-
} = componentProps;
|
|
103
|
-
const {
|
|
104
|
-
store
|
|
105
|
-
} = useDialogRootContext();
|
|
106
|
-
const open = store.useState("open");
|
|
107
|
-
const nested = store.useState("nested");
|
|
108
|
-
const mounted = store.useState("mounted");
|
|
109
|
-
const transitionStatus = store.useState("transitionStatus");
|
|
110
|
-
const state = {
|
|
111
|
-
open,
|
|
112
|
-
transitionStatus
|
|
113
|
-
};
|
|
114
|
-
return useRenderElement("div", componentProps, {
|
|
115
|
-
state,
|
|
116
|
-
ref: [store.context.backdropRef, forwardedRef],
|
|
117
|
-
stateAttributesMapping,
|
|
118
|
-
props: [{
|
|
119
|
-
role: "presentation",
|
|
120
|
-
hidden: !mounted,
|
|
121
|
-
style: {
|
|
122
|
-
userSelect: "none",
|
|
123
|
-
WebkitUserSelect: "none"
|
|
124
|
-
}
|
|
125
|
-
}, elementProps],
|
|
126
|
-
enabled: forceRender || !nested
|
|
127
|
-
});
|
|
128
|
-
});
|
|
129
|
-
if (true)
|
|
130
|
-
DialogBackdrop.displayName = "DialogBackdrop";
|
|
131
|
-
|
|
132
|
-
// node_modules/@base-ui/react/esm/dialog/close/DialogClose.js
|
|
133
|
-
import * as React3 from "react";
|
|
134
|
-
"use client";
|
|
135
|
-
var DialogClose = /* @__PURE__ */ React3.forwardRef(function DialogClose2(componentProps, forwardedRef) {
|
|
136
|
-
const {
|
|
137
|
-
render,
|
|
138
|
-
className,
|
|
139
|
-
style,
|
|
140
|
-
disabled = false,
|
|
141
|
-
nativeButton = true,
|
|
142
|
-
...elementProps
|
|
143
|
-
} = componentProps;
|
|
144
|
-
const {
|
|
145
|
-
store
|
|
146
|
-
} = useDialogRootContext();
|
|
147
|
-
const open = store.useState("open");
|
|
148
|
-
const {
|
|
149
|
-
getButtonProps,
|
|
150
|
-
buttonRef
|
|
151
|
-
} = useButton({
|
|
152
|
-
disabled,
|
|
153
|
-
native: nativeButton
|
|
154
|
-
});
|
|
155
|
-
const state = {
|
|
156
|
-
disabled
|
|
157
|
-
};
|
|
158
|
-
function handleClick(event) {
|
|
159
|
-
if (open) {
|
|
160
|
-
store.setOpen(false, createChangeEventDetails(exports_reason_parts.closePress, event.nativeEvent));
|
|
161
|
-
}
|
|
162
|
-
}
|
|
163
|
-
return useRenderElement("button", componentProps, {
|
|
164
|
-
state,
|
|
165
|
-
ref: [forwardedRef, buttonRef],
|
|
166
|
-
props: [{
|
|
167
|
-
onClick: handleClick
|
|
168
|
-
}, elementProps, getButtonProps]
|
|
169
|
-
});
|
|
170
|
-
});
|
|
171
|
-
if (true)
|
|
172
|
-
DialogClose.displayName = "DialogClose";
|
|
173
|
-
|
|
174
|
-
// node_modules/@base-ui/react/esm/dialog/description/DialogDescription.js
|
|
175
|
-
import * as React4 from "react";
|
|
176
|
-
"use client";
|
|
177
|
-
var DialogDescription = /* @__PURE__ */ React4.forwardRef(function DialogDescription2(componentProps, forwardedRef) {
|
|
178
|
-
const {
|
|
179
|
-
render,
|
|
180
|
-
className,
|
|
181
|
-
style,
|
|
182
|
-
id: idProp,
|
|
183
|
-
...elementProps
|
|
184
|
-
} = componentProps;
|
|
185
|
-
const {
|
|
186
|
-
store
|
|
187
|
-
} = useDialogRootContext();
|
|
188
|
-
const id = useBaseUiId(idProp);
|
|
189
|
-
store.useSyncedValueWithCleanup("descriptionElementId", id);
|
|
190
|
-
return useRenderElement("p", componentProps, {
|
|
191
|
-
ref: forwardedRef,
|
|
192
|
-
props: [{
|
|
193
|
-
id
|
|
194
|
-
}, elementProps]
|
|
195
|
-
});
|
|
196
|
-
});
|
|
197
|
-
if (true)
|
|
198
|
-
DialogDescription.displayName = "DialogDescription";
|
|
199
|
-
|
|
200
|
-
// node_modules/@base-ui/react/esm/dialog/popup/DialogPopup.js
|
|
201
|
-
import * as React6 from "react";
|
|
202
|
-
|
|
203
|
-
// node_modules/@base-ui/react/esm/dialog/popup/DialogPopupCssVars.js
|
|
204
|
-
var DialogPopupCssVars = /* @__PURE__ */ function(DialogPopupCssVars2) {
|
|
205
|
-
DialogPopupCssVars2["nestedDialogs"] = "--nested-dialogs";
|
|
206
|
-
return DialogPopupCssVars2;
|
|
207
|
-
}({});
|
|
208
|
-
|
|
209
|
-
// node_modules/@base-ui/react/esm/dialog/popup/DialogPopupDataAttributes.js
|
|
210
|
-
var DialogPopupDataAttributes = function(DialogPopupDataAttributes2) {
|
|
211
|
-
DialogPopupDataAttributes2[DialogPopupDataAttributes2["open"] = CommonPopupDataAttributes.open] = "open";
|
|
212
|
-
DialogPopupDataAttributes2[DialogPopupDataAttributes2["closed"] = CommonPopupDataAttributes.closed] = "closed";
|
|
213
|
-
DialogPopupDataAttributes2[DialogPopupDataAttributes2["startingStyle"] = CommonPopupDataAttributes.startingStyle] = "startingStyle";
|
|
214
|
-
DialogPopupDataAttributes2[DialogPopupDataAttributes2["endingStyle"] = CommonPopupDataAttributes.endingStyle] = "endingStyle";
|
|
215
|
-
DialogPopupDataAttributes2["nested"] = "data-nested";
|
|
216
|
-
DialogPopupDataAttributes2["nestedDialogOpen"] = "data-nested-dialog-open";
|
|
217
|
-
return DialogPopupDataAttributes2;
|
|
218
|
-
}({});
|
|
219
|
-
|
|
220
|
-
// node_modules/@base-ui/react/esm/dialog/portal/DialogPortalContext.js
|
|
221
|
-
import * as React5 from "react";
|
|
222
|
-
"use client";
|
|
223
|
-
var DialogPortalContext = /* @__PURE__ */ React5.createContext(undefined);
|
|
224
|
-
if (true)
|
|
225
|
-
DialogPortalContext.displayName = "DialogPortalContext";
|
|
226
|
-
function useDialogPortalContext() {
|
|
227
|
-
const value = React5.useContext(DialogPortalContext);
|
|
228
|
-
if (value === undefined) {
|
|
229
|
-
throw new Error("Base UI: <Dialog.Portal> is missing.");
|
|
230
|
-
}
|
|
231
|
-
return value;
|
|
232
|
-
}
|
|
233
|
-
|
|
234
|
-
// node_modules/@base-ui/react/esm/dialog/popup/DialogPopup.js
|
|
235
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
236
|
-
"use client";
|
|
237
|
-
var stateAttributesMapping2 = {
|
|
238
|
-
...popupStateMapping,
|
|
239
|
-
...transitionStatusMapping,
|
|
240
|
-
nestedDialogOpen(value) {
|
|
241
|
-
return value ? {
|
|
242
|
-
[DialogPopupDataAttributes.nestedDialogOpen]: ""
|
|
243
|
-
} : null;
|
|
244
|
-
}
|
|
245
|
-
};
|
|
246
|
-
var DialogPopup = /* @__PURE__ */ React6.forwardRef(function DialogPopup2(componentProps, forwardedRef) {
|
|
247
|
-
const {
|
|
248
|
-
render,
|
|
249
|
-
className,
|
|
250
|
-
style,
|
|
251
|
-
finalFocus,
|
|
252
|
-
initialFocus,
|
|
253
|
-
...elementProps
|
|
254
|
-
} = componentProps;
|
|
255
|
-
const {
|
|
256
|
-
store
|
|
257
|
-
} = useDialogRootContext();
|
|
258
|
-
const descriptionElementId = store.useState("descriptionElementId");
|
|
259
|
-
const disablePointerDismissal = store.useState("disablePointerDismissal");
|
|
260
|
-
const floatingRootContext = store.useState("floatingRootContext");
|
|
261
|
-
const rootPopupProps = store.useState("popupProps");
|
|
262
|
-
const modal = store.useState("modal");
|
|
263
|
-
const mounted = store.useState("mounted");
|
|
264
|
-
const nested = store.useState("nested");
|
|
265
|
-
const nestedOpenDialogCount = store.useState("nestedOpenDialogCount");
|
|
266
|
-
const open = store.useState("open");
|
|
267
|
-
const openMethod = store.useState("openMethod");
|
|
268
|
-
const titleElementId = store.useState("titleElementId");
|
|
269
|
-
const transitionStatus = store.useState("transitionStatus");
|
|
270
|
-
const role = store.useState("role");
|
|
271
|
-
const floatingId = floatingRootContext.useState("floatingId");
|
|
272
|
-
const popupId = elementProps.id ?? floatingId;
|
|
273
|
-
useDialogPortalContext();
|
|
274
|
-
useOpenChangeComplete({
|
|
275
|
-
open,
|
|
276
|
-
ref: store.context.popupRef,
|
|
277
|
-
onComplete() {
|
|
278
|
-
if (open) {
|
|
279
|
-
store.context.onOpenChangeComplete?.(true);
|
|
280
|
-
}
|
|
281
|
-
}
|
|
282
|
-
});
|
|
283
|
-
function defaultInitialFocus(interactionType) {
|
|
284
|
-
if (interactionType === "touch") {
|
|
285
|
-
return store.context.popupRef.current;
|
|
286
|
-
}
|
|
287
|
-
return true;
|
|
288
|
-
}
|
|
289
|
-
const resolvedInitialFocus = initialFocus === undefined ? defaultInitialFocus : initialFocus;
|
|
290
|
-
const nestedDialogOpen = nestedOpenDialogCount > 0;
|
|
291
|
-
const setPopupElement = store.useStateSetter("popupElement");
|
|
292
|
-
const state = {
|
|
293
|
-
open,
|
|
294
|
-
nested,
|
|
295
|
-
transitionStatus,
|
|
296
|
-
nestedDialogOpen
|
|
297
|
-
};
|
|
298
|
-
const element = useRenderElement("div", componentProps, {
|
|
299
|
-
state,
|
|
300
|
-
props: [rootPopupProps, {
|
|
301
|
-
id: popupId,
|
|
302
|
-
"aria-labelledby": titleElementId ?? undefined,
|
|
303
|
-
"aria-describedby": descriptionElementId ?? undefined,
|
|
304
|
-
role,
|
|
305
|
-
...FOCUSABLE_POPUP_PROPS,
|
|
306
|
-
hidden: !mounted,
|
|
307
|
-
onKeyDown(event) {
|
|
308
|
-
if (COMPOSITE_KEYS.has(event.key)) {
|
|
309
|
-
event.stopPropagation();
|
|
310
|
-
}
|
|
311
|
-
},
|
|
312
|
-
style: {
|
|
313
|
-
[DialogPopupCssVars.nestedDialogs]: nestedOpenDialogCount
|
|
314
|
-
}
|
|
315
|
-
}, elementProps],
|
|
316
|
-
ref: [forwardedRef, store.context.popupRef, setPopupElement],
|
|
317
|
-
stateAttributesMapping: stateAttributesMapping2
|
|
318
|
-
});
|
|
319
|
-
return /* @__PURE__ */ _jsx(FloatingFocusManager, {
|
|
320
|
-
context: floatingRootContext,
|
|
321
|
-
openInteractionType: openMethod,
|
|
322
|
-
disabled: !mounted,
|
|
323
|
-
closeOnFocusOut: !disablePointerDismissal,
|
|
324
|
-
initialFocus: resolvedInitialFocus,
|
|
325
|
-
returnFocus: finalFocus,
|
|
326
|
-
modal: modal !== false,
|
|
327
|
-
restoreFocus: "popup",
|
|
328
|
-
children: element
|
|
329
|
-
});
|
|
330
|
-
});
|
|
331
|
-
if (true)
|
|
332
|
-
DialogPopup.displayName = "DialogPopup";
|
|
333
|
-
|
|
334
|
-
// node_modules/@base-ui/react/esm/dialog/portal/DialogPortal.js
|
|
335
|
-
import * as React7 from "react";
|
|
336
|
-
import { jsx as _jsx2, jsxs as _jsxs } from "react/jsx-runtime";
|
|
337
|
-
"use client";
|
|
338
|
-
var DialogPortal = /* @__PURE__ */ React7.forwardRef(function DialogPortal2(props, forwardedRef) {
|
|
339
|
-
const {
|
|
340
|
-
keepMounted = false,
|
|
341
|
-
...portalProps
|
|
342
|
-
} = props;
|
|
343
|
-
const {
|
|
344
|
-
store
|
|
345
|
-
} = useDialogRootContext();
|
|
346
|
-
const mounted = store.useState("mounted");
|
|
347
|
-
const modal = store.useState("modal");
|
|
348
|
-
const open = store.useState("open");
|
|
349
|
-
const shouldRender = mounted || keepMounted;
|
|
350
|
-
if (!shouldRender) {
|
|
351
|
-
return null;
|
|
352
|
-
}
|
|
353
|
-
return /* @__PURE__ */ _jsx2(DialogPortalContext.Provider, {
|
|
354
|
-
value: keepMounted,
|
|
355
|
-
children: /* @__PURE__ */ _jsxs(FloatingPortal, {
|
|
356
|
-
ref: forwardedRef,
|
|
357
|
-
...portalProps,
|
|
358
|
-
children: [mounted && modal === true && /* @__PURE__ */ _jsx2(InternalBackdrop, {
|
|
359
|
-
ref: store.context.internalBackdropRef,
|
|
360
|
-
inert: inertValue(!open)
|
|
361
|
-
}), props.children]
|
|
362
|
-
})
|
|
363
|
-
});
|
|
364
|
-
});
|
|
365
|
-
if (true)
|
|
366
|
-
DialogPortal.displayName = "DialogPortal";
|
|
367
|
-
|
|
368
|
-
// node_modules/@base-ui/react/esm/dialog/title/DialogTitle.js
|
|
369
|
-
import * as React8 from "react";
|
|
370
|
-
"use client";
|
|
371
|
-
var DialogTitle = /* @__PURE__ */ React8.forwardRef(function DialogTitle2(componentProps, forwardedRef) {
|
|
372
|
-
const {
|
|
373
|
-
render,
|
|
374
|
-
className,
|
|
375
|
-
style,
|
|
376
|
-
id: idProp,
|
|
377
|
-
...elementProps
|
|
378
|
-
} = componentProps;
|
|
379
|
-
const {
|
|
380
|
-
store
|
|
381
|
-
} = useDialogRootContext();
|
|
382
|
-
const id = useBaseUiId(idProp);
|
|
383
|
-
store.useSyncedValueWithCleanup("titleElementId", id);
|
|
384
|
-
return useRenderElement("h2", componentProps, {
|
|
385
|
-
ref: forwardedRef,
|
|
386
|
-
props: [{
|
|
387
|
-
id
|
|
388
|
-
}, elementProps]
|
|
389
|
-
});
|
|
390
|
-
});
|
|
391
|
-
if (true)
|
|
392
|
-
DialogTitle.displayName = "DialogTitle";
|
|
393
|
-
|
|
394
|
-
// node_modules/@base-ui/react/esm/dialog/trigger/DialogTrigger.js
|
|
395
|
-
import * as React9 from "react";
|
|
396
|
-
"use client";
|
|
397
|
-
var DialogTrigger = /* @__PURE__ */ React9.forwardRef(function DialogTrigger2(componentProps, forwardedRef) {
|
|
398
|
-
const {
|
|
399
|
-
render,
|
|
400
|
-
className,
|
|
401
|
-
style,
|
|
402
|
-
disabled = false,
|
|
403
|
-
nativeButton = true,
|
|
404
|
-
id: idProp,
|
|
405
|
-
payload,
|
|
406
|
-
handle,
|
|
407
|
-
...elementProps
|
|
408
|
-
} = componentProps;
|
|
409
|
-
const dialogRootContext = useDialogRootContext(true);
|
|
410
|
-
const store = handle?.store ?? dialogRootContext?.store;
|
|
411
|
-
if (!store) {
|
|
412
|
-
throw new Error("Base UI: <Dialog.Trigger> must be used within <Dialog.Root> or provided with a handle.");
|
|
413
|
-
}
|
|
414
|
-
const thisTriggerId = useBaseUiId(idProp);
|
|
415
|
-
const floatingContext = store.useState("floatingRootContext");
|
|
416
|
-
const isOpenedByThisTrigger = store.useState("isOpenedByTrigger", thisTriggerId);
|
|
417
|
-
const popupId = store.useState("triggerPopupId", thisTriggerId);
|
|
418
|
-
const triggerElementRef = React9.useRef(null);
|
|
419
|
-
const {
|
|
420
|
-
registerTrigger,
|
|
421
|
-
isMountedByThisTrigger
|
|
422
|
-
} = useTriggerDataForwarding(thisTriggerId, triggerElementRef, store, {
|
|
423
|
-
payload
|
|
424
|
-
});
|
|
425
|
-
const {
|
|
426
|
-
getButtonProps,
|
|
427
|
-
buttonRef
|
|
428
|
-
} = useButton({
|
|
429
|
-
disabled,
|
|
430
|
-
native: nativeButton
|
|
431
|
-
});
|
|
432
|
-
const click = useClick(floatingContext, {
|
|
433
|
-
enabled: floatingContext != null
|
|
434
|
-
});
|
|
435
|
-
const interactionTypeProps = useOpenMethodTriggerProps(() => store.select("open"), (interactionType) => {
|
|
436
|
-
store.set("openMethod", interactionType);
|
|
437
|
-
});
|
|
438
|
-
const state = {
|
|
439
|
-
disabled,
|
|
440
|
-
open: isOpenedByThisTrigger
|
|
441
|
-
};
|
|
442
|
-
const rootTriggerProps = store.useState("triggerProps", isMountedByThisTrigger);
|
|
443
|
-
return useRenderElement("button", componentProps, {
|
|
444
|
-
state,
|
|
445
|
-
ref: [buttonRef, forwardedRef, registerTrigger, triggerElementRef],
|
|
446
|
-
props: [click.reference, rootTriggerProps, interactionTypeProps, {
|
|
447
|
-
[CLICK_TRIGGER_IDENTIFIER]: "",
|
|
448
|
-
id: thisTriggerId,
|
|
449
|
-
"aria-haspopup": "dialog",
|
|
450
|
-
"aria-expanded": isOpenedByThisTrigger,
|
|
451
|
-
"aria-controls": popupId
|
|
452
|
-
}, elementProps, getButtonProps],
|
|
453
|
-
stateAttributesMapping: triggerOpenStateMapping
|
|
454
|
-
});
|
|
455
|
-
});
|
|
456
|
-
if (true)
|
|
457
|
-
DialogTrigger.displayName = "DialogTrigger";
|
|
458
|
-
|
|
459
|
-
// node_modules/@base-ui/react/esm/dialog/viewport/DialogViewport.js
|
|
460
|
-
import * as React10 from "react";
|
|
461
|
-
|
|
462
|
-
// node_modules/@base-ui/react/esm/dialog/viewport/DialogViewportDataAttributes.js
|
|
463
|
-
var DialogViewportDataAttributes = function(DialogViewportDataAttributes2) {
|
|
464
|
-
DialogViewportDataAttributes2[DialogViewportDataAttributes2["open"] = CommonPopupDataAttributes.open] = "open";
|
|
465
|
-
DialogViewportDataAttributes2[DialogViewportDataAttributes2["closed"] = CommonPopupDataAttributes.closed] = "closed";
|
|
466
|
-
DialogViewportDataAttributes2[DialogViewportDataAttributes2["startingStyle"] = CommonPopupDataAttributes.startingStyle] = "startingStyle";
|
|
467
|
-
DialogViewportDataAttributes2[DialogViewportDataAttributes2["endingStyle"] = CommonPopupDataAttributes.endingStyle] = "endingStyle";
|
|
468
|
-
DialogViewportDataAttributes2["nested"] = "data-nested";
|
|
469
|
-
DialogViewportDataAttributes2["nestedDialogOpen"] = "data-nested-dialog-open";
|
|
470
|
-
return DialogViewportDataAttributes2;
|
|
471
|
-
}({});
|
|
472
|
-
|
|
473
|
-
// node_modules/@base-ui/react/esm/dialog/viewport/DialogViewport.js
|
|
474
|
-
"use client";
|
|
475
|
-
var stateAttributesMapping3 = {
|
|
476
|
-
...popupStateMapping,
|
|
477
|
-
...transitionStatusMapping,
|
|
478
|
-
nested(value) {
|
|
479
|
-
return value ? {
|
|
480
|
-
[DialogViewportDataAttributes.nested]: ""
|
|
481
|
-
} : null;
|
|
482
|
-
},
|
|
483
|
-
nestedDialogOpen(value) {
|
|
484
|
-
return value ? {
|
|
485
|
-
[DialogViewportDataAttributes.nestedDialogOpen]: ""
|
|
486
|
-
} : null;
|
|
487
|
-
}
|
|
488
|
-
};
|
|
489
|
-
var DialogViewport = /* @__PURE__ */ React10.forwardRef(function DialogViewport2(componentProps, forwardedRef) {
|
|
490
|
-
const {
|
|
491
|
-
render,
|
|
492
|
-
className,
|
|
493
|
-
style,
|
|
494
|
-
children,
|
|
495
|
-
...elementProps
|
|
496
|
-
} = componentProps;
|
|
497
|
-
const keepMounted = useDialogPortalContext();
|
|
498
|
-
const {
|
|
499
|
-
store
|
|
500
|
-
} = useDialogRootContext();
|
|
501
|
-
const open = store.useState("open");
|
|
502
|
-
const nested = store.useState("nested");
|
|
503
|
-
const transitionStatus = store.useState("transitionStatus");
|
|
504
|
-
const nestedOpenDialogCount = store.useState("nestedOpenDialogCount");
|
|
505
|
-
const mounted = store.useState("mounted");
|
|
506
|
-
const setViewportElement = store.useStateSetter("viewportElement");
|
|
507
|
-
const nestedDialogOpen = nestedOpenDialogCount > 0;
|
|
508
|
-
const state = {
|
|
509
|
-
open,
|
|
510
|
-
nested,
|
|
511
|
-
transitionStatus,
|
|
512
|
-
nestedDialogOpen
|
|
513
|
-
};
|
|
514
|
-
const shouldRender = keepMounted || mounted;
|
|
515
|
-
return useRenderElement("div", componentProps, {
|
|
516
|
-
enabled: shouldRender,
|
|
517
|
-
state,
|
|
518
|
-
ref: [forwardedRef, setViewportElement],
|
|
519
|
-
stateAttributesMapping: stateAttributesMapping3,
|
|
520
|
-
props: [{
|
|
521
|
-
role: "presentation",
|
|
522
|
-
hidden: !mounted,
|
|
523
|
-
style: {
|
|
524
|
-
pointerEvents: !open ? "none" : undefined
|
|
525
|
-
},
|
|
526
|
-
children
|
|
527
|
-
}, elementProps]
|
|
528
|
-
});
|
|
529
|
-
});
|
|
530
|
-
if (true)
|
|
531
|
-
DialogViewport.displayName = "DialogViewport";
|
|
532
|
-
|
|
533
|
-
// node_modules/@base-ui/react/esm/dialog/store/DialogStore.js
|
|
534
|
-
import * as React11 from "react";
|
|
535
|
-
var selectors = {
|
|
536
|
-
...popupStoreSelectors,
|
|
537
|
-
modal: createSelector((state) => state.modal),
|
|
538
|
-
nested: createSelector((state) => state.nested),
|
|
539
|
-
nestedOpenDialogCount: createSelector((state) => state.nestedOpenDialogCount),
|
|
540
|
-
nestedOpenDrawerCount: createSelector((state) => state.nestedOpenDrawerCount),
|
|
541
|
-
disablePointerDismissal: createSelector((state) => state.disablePointerDismissal),
|
|
542
|
-
openMethod: createSelector((state) => state.openMethod),
|
|
543
|
-
descriptionElementId: createSelector((state) => state.descriptionElementId),
|
|
544
|
-
titleElementId: createSelector((state) => state.titleElementId),
|
|
545
|
-
viewportElement: createSelector((state) => state.viewportElement),
|
|
546
|
-
role: createSelector((state) => state.role)
|
|
547
|
-
};
|
|
548
|
-
|
|
549
|
-
class DialogStore extends ReactStore {
|
|
550
|
-
constructor(initialState, floatingId, nested = false) {
|
|
551
|
-
const triggerElements = new PopupTriggerMap;
|
|
552
|
-
const state = createInitialState(initialState);
|
|
553
|
-
state.floatingRootContext = createPopupFloatingRootContext(triggerElements, floatingId, nested);
|
|
554
|
-
super(state, {
|
|
555
|
-
popupRef: /* @__PURE__ */ React11.createRef(),
|
|
556
|
-
backdropRef: /* @__PURE__ */ React11.createRef(),
|
|
557
|
-
internalBackdropRef: /* @__PURE__ */ React11.createRef(),
|
|
558
|
-
outsidePressEnabledRef: {
|
|
559
|
-
current: true
|
|
560
|
-
},
|
|
561
|
-
triggerElements,
|
|
562
|
-
onOpenChange: undefined,
|
|
563
|
-
onOpenChangeComplete: undefined
|
|
564
|
-
}, selectors);
|
|
565
|
-
}
|
|
566
|
-
setOpen = (nextOpen, eventDetails) => {
|
|
567
|
-
eventDetails.preventUnmountOnClose = () => {
|
|
568
|
-
this.set("preventUnmountingOnClose", true);
|
|
569
|
-
};
|
|
570
|
-
if (!nextOpen && eventDetails.trigger == null && this.state.activeTriggerId != null) {
|
|
571
|
-
eventDetails.trigger = this.state.activeTriggerElement ?? undefined;
|
|
572
|
-
}
|
|
573
|
-
this.context.onOpenChange?.(nextOpen, eventDetails);
|
|
574
|
-
if (eventDetails.isCanceled) {
|
|
575
|
-
return;
|
|
576
|
-
}
|
|
577
|
-
this.state.floatingRootContext.dispatchOpenChange(nextOpen, eventDetails);
|
|
578
|
-
const updatedState = {
|
|
579
|
-
open: nextOpen
|
|
580
|
-
};
|
|
581
|
-
setOpenTriggerState(updatedState, nextOpen, eventDetails.trigger);
|
|
582
|
-
this.update(updatedState);
|
|
583
|
-
};
|
|
584
|
-
static useStore(externalStore, initialState) {
|
|
585
|
-
const store = usePopupStore(externalStore, (floatingId, nested) => new DialogStore(initialState, floatingId, nested), true).store;
|
|
586
|
-
return store;
|
|
587
|
-
}
|
|
588
|
-
}
|
|
589
|
-
function createInitialState(initialState = {}) {
|
|
590
|
-
return {
|
|
591
|
-
...createInitialPopupStoreState(),
|
|
592
|
-
modal: true,
|
|
593
|
-
disablePointerDismissal: false,
|
|
594
|
-
popupElement: null,
|
|
595
|
-
viewportElement: null,
|
|
596
|
-
descriptionElementId: undefined,
|
|
597
|
-
titleElementId: undefined,
|
|
598
|
-
openMethod: null,
|
|
599
|
-
nested: false,
|
|
600
|
-
nestedOpenDialogCount: 0,
|
|
601
|
-
nestedOpenDrawerCount: 0,
|
|
602
|
-
role: "dialog",
|
|
603
|
-
...initialState
|
|
604
|
-
};
|
|
605
|
-
}
|
|
606
|
-
|
|
607
|
-
// node_modules/@base-ui/react/esm/dialog/store/DialogHandle.js
|
|
608
|
-
class DialogHandle {
|
|
609
|
-
constructor(store) {
|
|
610
|
-
this.store = store ?? new DialogStore;
|
|
611
|
-
}
|
|
612
|
-
open(triggerId) {
|
|
613
|
-
const triggerElement = triggerId ? this.store.context.triggerElements.getById(triggerId) : undefined;
|
|
614
|
-
if (true) {
|
|
615
|
-
if (triggerId && !triggerElement) {
|
|
616
|
-
console.warn(`Base UI: DialogHandle.open: No trigger found with id "${triggerId}". The dialog will open, but the trigger will not be associated with the dialog.`);
|
|
617
|
-
}
|
|
618
|
-
}
|
|
619
|
-
this.store.setOpen(true, createChangeEventDetails(exports_reason_parts.imperativeAction, undefined, triggerElement));
|
|
620
|
-
}
|
|
621
|
-
openWithPayload(payload) {
|
|
622
|
-
this.store.set("payload", payload);
|
|
623
|
-
this.store.setOpen(true, createChangeEventDetails(exports_reason_parts.imperativeAction, undefined, undefined));
|
|
624
|
-
}
|
|
625
|
-
close() {
|
|
626
|
-
this.store.setOpen(false, createChangeEventDetails(exports_reason_parts.imperativeAction, undefined, undefined));
|
|
627
|
-
}
|
|
628
|
-
get isOpen() {
|
|
629
|
-
return this.store.select("open");
|
|
630
|
-
}
|
|
631
|
-
}
|
|
632
|
-
function createDialogHandle() {
|
|
633
|
-
return new DialogHandle;
|
|
634
|
-
}
|
|
635
|
-
|
|
636
|
-
// node_modules/@base-ui/react/esm/dialog/root/useRenderDialogRoot.js
|
|
637
|
-
import * as React13 from "react";
|
|
638
|
-
|
|
639
|
-
// node_modules/@base-ui/react/esm/dialog/root/useDialogRoot.js
|
|
640
|
-
import * as React12 from "react";
|
|
641
|
-
"use client";
|
|
642
|
-
function useDialogRoot(params) {
|
|
643
|
-
const {
|
|
644
|
-
store,
|
|
645
|
-
parentContext,
|
|
646
|
-
actionsRef,
|
|
647
|
-
isDrawer
|
|
648
|
-
} = params;
|
|
649
|
-
const open = store.useState("open");
|
|
650
|
-
usePopupRootSync(store, open);
|
|
651
|
-
useImplicitActiveTrigger(store);
|
|
652
|
-
const {
|
|
653
|
-
forceUnmount
|
|
654
|
-
} = useOpenStateTransitions(open, store);
|
|
655
|
-
const handleImperativeClose = React12.useCallback(() => {
|
|
656
|
-
store.setOpen(false, createChangeEventDetails(exports_reason_parts.imperativeAction));
|
|
657
|
-
}, [store]);
|
|
658
|
-
React12.useImperativeHandle(actionsRef, () => ({
|
|
659
|
-
unmount: forceUnmount,
|
|
660
|
-
close: handleImperativeClose
|
|
661
|
-
}), [forceUnmount, handleImperativeClose]);
|
|
662
|
-
return {
|
|
663
|
-
parentContext,
|
|
664
|
-
isDrawer
|
|
665
|
-
};
|
|
666
|
-
}
|
|
667
|
-
function DialogInteractions({
|
|
668
|
-
store,
|
|
669
|
-
dialogRoot
|
|
670
|
-
}) {
|
|
671
|
-
const {
|
|
672
|
-
parentContext,
|
|
673
|
-
isDrawer
|
|
674
|
-
} = dialogRoot;
|
|
675
|
-
const open = store.useState("open");
|
|
676
|
-
const disablePointerDismissal = store.useState("disablePointerDismissal");
|
|
677
|
-
const modal = store.useState("modal");
|
|
678
|
-
const popupElement = store.useState("popupElement");
|
|
679
|
-
const floatingRootContext = store.useState("floatingRootContext");
|
|
680
|
-
const [ownNestedOpenDialogs, setOwnNestedOpenDialogs] = React12.useState(0);
|
|
681
|
-
const [ownNestedOpenDrawers, setOwnNestedOpenDrawers] = React12.useState(0);
|
|
682
|
-
const isTopmost = ownNestedOpenDialogs === 0;
|
|
683
|
-
const dismiss = useDismiss(floatingRootContext, {
|
|
684
|
-
outsidePressEvent() {
|
|
685
|
-
if (store.context.internalBackdropRef.current || store.context.backdropRef.current) {
|
|
686
|
-
return "intentional";
|
|
687
|
-
}
|
|
688
|
-
return {
|
|
689
|
-
mouse: modal === "trap-focus" ? "sloppy" : "intentional",
|
|
690
|
-
touch: "sloppy"
|
|
691
|
-
};
|
|
692
|
-
},
|
|
693
|
-
outsidePress(event) {
|
|
694
|
-
if (!store.context.outsidePressEnabledRef.current) {
|
|
695
|
-
return false;
|
|
696
|
-
}
|
|
697
|
-
if ("button" in event && event.button !== 0) {
|
|
698
|
-
return false;
|
|
699
|
-
}
|
|
700
|
-
if ("touches" in event && event.touches.length !== 1) {
|
|
701
|
-
return false;
|
|
702
|
-
}
|
|
703
|
-
const target = getTarget(event);
|
|
704
|
-
if (isTopmost && !disablePointerDismissal) {
|
|
705
|
-
const eventTarget = target;
|
|
706
|
-
if (modal) {
|
|
707
|
-
return store.context.internalBackdropRef.current || store.context.backdropRef.current ? store.context.internalBackdropRef.current === eventTarget || store.context.backdropRef.current === eventTarget || contains(eventTarget, popupElement) && !eventTarget?.hasAttribute("data-base-ui-portal") : true;
|
|
708
|
-
}
|
|
709
|
-
return true;
|
|
710
|
-
}
|
|
711
|
-
return false;
|
|
712
|
-
},
|
|
713
|
-
escapeKey: isTopmost
|
|
714
|
-
});
|
|
715
|
-
useScrollLock(open && modal === true, popupElement);
|
|
716
|
-
store.useContextCallback("onNestedDialogOpen", (dialogCount, drawerCount) => {
|
|
717
|
-
setOwnNestedOpenDialogs(dialogCount);
|
|
718
|
-
setOwnNestedOpenDrawers(drawerCount);
|
|
719
|
-
});
|
|
720
|
-
store.useContextCallback("onNestedDialogClose", () => {
|
|
721
|
-
setOwnNestedOpenDialogs(0);
|
|
722
|
-
setOwnNestedOpenDrawers(0);
|
|
723
|
-
});
|
|
724
|
-
React12.useEffect(() => {
|
|
725
|
-
if (parentContext?.onNestedDialogOpen && open) {
|
|
726
|
-
parentContext.onNestedDialogOpen(ownNestedOpenDialogs + 1, ownNestedOpenDrawers + (isDrawer ? 1 : 0));
|
|
727
|
-
}
|
|
728
|
-
if (parentContext?.onNestedDialogClose && !open) {
|
|
729
|
-
parentContext.onNestedDialogClose();
|
|
730
|
-
}
|
|
731
|
-
return () => {
|
|
732
|
-
if (parentContext?.onNestedDialogClose && open) {
|
|
733
|
-
parentContext.onNestedDialogClose();
|
|
734
|
-
}
|
|
735
|
-
};
|
|
736
|
-
}, [isDrawer, open, ownNestedOpenDialogs, ownNestedOpenDrawers, parentContext]);
|
|
737
|
-
const activeTriggerProps = dismiss.reference ?? EMPTY_OBJECT;
|
|
738
|
-
const inactiveTriggerProps = dismiss.trigger ?? EMPTY_OBJECT;
|
|
739
|
-
const popupProps = React12.useMemo(() => mergeProps(FOCUSABLE_POPUP_PROPS, dismiss.floating), [dismiss.floating]);
|
|
740
|
-
usePopupInteractionProps(store, {
|
|
741
|
-
activeTriggerProps,
|
|
742
|
-
inactiveTriggerProps,
|
|
743
|
-
popupProps,
|
|
744
|
-
nestedOpenDialogCount: ownNestedOpenDialogs,
|
|
745
|
-
nestedOpenDrawerCount: ownNestedOpenDrawers
|
|
746
|
-
});
|
|
747
|
-
return null;
|
|
748
|
-
}
|
|
749
|
-
|
|
750
|
-
// node_modules/@base-ui/react/esm/dialog/root/useRenderDialogRoot.js
|
|
751
|
-
import { jsx as _jsx3, jsxs as _jsxs2 } from "react/jsx-runtime";
|
|
752
|
-
"use client";
|
|
753
|
-
function useRenderDialogRoot(props, mode = "dialog") {
|
|
754
|
-
const {
|
|
755
|
-
children,
|
|
756
|
-
open: openProp,
|
|
757
|
-
defaultOpen = false,
|
|
758
|
-
onOpenChange,
|
|
759
|
-
onOpenChangeComplete,
|
|
760
|
-
disablePointerDismissal: disablePointerDismissalProp = false,
|
|
761
|
-
modal: modalProp = true,
|
|
762
|
-
actionsRef,
|
|
763
|
-
handle,
|
|
764
|
-
triggerId: triggerIdProp,
|
|
765
|
-
defaultTriggerId: defaultTriggerIdProp = null
|
|
766
|
-
} = props;
|
|
767
|
-
const isDrawer = mode === "drawer";
|
|
768
|
-
const isAlertDialog = mode === "alert-dialog";
|
|
769
|
-
const modal = isAlertDialog ? true : modalProp;
|
|
770
|
-
const disablePointerDismissal = isAlertDialog || disablePointerDismissalProp;
|
|
771
|
-
const role = isAlertDialog ? "alertdialog" : "dialog";
|
|
772
|
-
const parentDialogRootContext = useDialogRootContext(true);
|
|
773
|
-
const nested = Boolean(parentDialogRootContext);
|
|
774
|
-
const rootState = {
|
|
775
|
-
modal,
|
|
776
|
-
disablePointerDismissal,
|
|
777
|
-
nested,
|
|
778
|
-
role
|
|
779
|
-
};
|
|
780
|
-
const store = DialogStore.useStore(handle?.store, {
|
|
781
|
-
open: defaultOpen,
|
|
782
|
-
openProp,
|
|
783
|
-
activeTriggerId: defaultTriggerIdProp,
|
|
784
|
-
triggerIdProp,
|
|
785
|
-
...rootState
|
|
786
|
-
});
|
|
787
|
-
useOnFirstRender(() => {
|
|
788
|
-
const nextState = openProp === undefined && store.state.open === false && defaultOpen === true ? {
|
|
789
|
-
open: true,
|
|
790
|
-
activeTriggerId: defaultTriggerIdProp
|
|
791
|
-
} : null;
|
|
792
|
-
if (isAlertDialog) {
|
|
793
|
-
store.update(nextState ? {
|
|
794
|
-
...rootState,
|
|
795
|
-
...nextState
|
|
796
|
-
} : rootState);
|
|
797
|
-
} else if (nextState) {
|
|
798
|
-
store.update(nextState);
|
|
799
|
-
}
|
|
800
|
-
});
|
|
801
|
-
store.useControlledProp("openProp", openProp);
|
|
802
|
-
store.useControlledProp("triggerIdProp", triggerIdProp);
|
|
803
|
-
store.useSyncedValues(rootState);
|
|
804
|
-
store.useContextCallback("onOpenChange", onOpenChange);
|
|
805
|
-
store.useContextCallback("onOpenChangeComplete", onOpenChangeComplete);
|
|
806
|
-
const open = store.useState("open");
|
|
807
|
-
const mounted = store.useState("mounted");
|
|
808
|
-
const payload = store.useState("payload");
|
|
809
|
-
const dialogRoot = useDialogRoot({
|
|
810
|
-
store,
|
|
811
|
-
actionsRef,
|
|
812
|
-
parentContext: parentDialogRootContext?.store.context,
|
|
813
|
-
isDrawer
|
|
814
|
-
});
|
|
815
|
-
const shouldRenderInteractions = open || mounted;
|
|
816
|
-
const contextValue = React13.useMemo(() => ({
|
|
817
|
-
store
|
|
818
|
-
}), [store]);
|
|
819
|
-
return /* @__PURE__ */ _jsx3(IsDrawerContext.Provider, {
|
|
820
|
-
value: false,
|
|
821
|
-
children: /* @__PURE__ */ _jsxs2(DialogRootContext.Provider, {
|
|
822
|
-
value: contextValue,
|
|
823
|
-
children: [shouldRenderInteractions && /* @__PURE__ */ _jsx3(DialogInteractions, {
|
|
824
|
-
store,
|
|
825
|
-
dialogRoot
|
|
826
|
-
}), typeof children === "function" ? children({
|
|
827
|
-
payload
|
|
828
|
-
}) : children]
|
|
829
|
-
})
|
|
830
|
-
});
|
|
831
|
-
}
|
|
832
|
-
|
|
833
|
-
export { IsDrawerContext, DialogStore, useRenderDialogRoot, DialogBackdrop, DialogClose, DialogDescription, DialogPopup, DialogPortal, DialogTitle, DialogTrigger, DialogViewport, DialogHandle, createDialogHandle };
|