@stevederico/skateboard-ui 3.11.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 +17 -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 -48
- 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,1089 +0,0 @@
|
|
|
1
|
-
/* @base-ui/react 1.5.0 — vendored (MIT — MUI Inc).
|
|
2
|
-
* Refresh: scripts/vendor-base-ui.js (see header for instructions).
|
|
3
|
-
* Do not edit by hand. */
|
|
4
|
-
import {
|
|
5
|
-
useTriggerFocusGuards
|
|
6
|
-
} from "./_chunk-8ganmsbg.js";
|
|
7
|
-
import {
|
|
8
|
-
useAnchoredPopupScrollLock
|
|
9
|
-
} from "./_chunk-ebyxgtb4.js";
|
|
10
|
-
import {
|
|
11
|
-
useToolbarRootContext
|
|
12
|
-
} from "./_chunk-mnd0j7v9.js";
|
|
13
|
-
import {
|
|
14
|
-
usePopupViewport
|
|
15
|
-
} from "./_chunk-qbezxj1g.js";
|
|
16
|
-
import"./_chunk-m307wpdj.js";
|
|
17
|
-
import {
|
|
18
|
-
adaptiveOrigin,
|
|
19
|
-
getDisabledMountTransitionStyles,
|
|
20
|
-
useAnchorPositioning,
|
|
21
|
-
usePositioner
|
|
22
|
-
} from "./_chunk-fqry7pew.js";
|
|
23
|
-
import"./_chunk-xcqbtm2f.js";
|
|
24
|
-
import"./_chunk-gy0bpkmx.js";
|
|
25
|
-
import {
|
|
26
|
-
InternalBackdrop,
|
|
27
|
-
useOpenMethodTriggerProps
|
|
28
|
-
} from "./_chunk-ytnp24gq.js";
|
|
29
|
-
import {
|
|
30
|
-
createInitialPopupStoreState,
|
|
31
|
-
createPopupFloatingRootContext,
|
|
32
|
-
popupStoreSelectors
|
|
33
|
-
} from "./_chunk-q5cg71p7.js";
|
|
34
|
-
import {
|
|
35
|
-
FOCUSABLE_POPUP_PROPS,
|
|
36
|
-
setOpenTriggerState,
|
|
37
|
-
useImplicitActiveTrigger,
|
|
38
|
-
useOnFirstRender,
|
|
39
|
-
useOpenStateTransitions,
|
|
40
|
-
usePopupInteractionProps,
|
|
41
|
-
usePopupRootSync,
|
|
42
|
-
usePopupStore,
|
|
43
|
-
useTriggerDataForwarding
|
|
44
|
-
} from "./_chunk-242gh8ph.js";
|
|
45
|
-
import"./_chunk-5gaqyne5.js";
|
|
46
|
-
import {
|
|
47
|
-
popupStateMapping,
|
|
48
|
-
pressableTriggerOpenStateMapping,
|
|
49
|
-
triggerOpenStateMapping
|
|
50
|
-
} from "./_chunk-t7ppm3t0.js";
|
|
51
|
-
import {
|
|
52
|
-
inertValue
|
|
53
|
-
} from "./_chunk-3cpd1vjz.js";
|
|
54
|
-
import {
|
|
55
|
-
CLICK_TRIGGER_IDENTIFIER,
|
|
56
|
-
FloatingFocusManager,
|
|
57
|
-
FloatingNode,
|
|
58
|
-
FloatingPortal,
|
|
59
|
-
FloatingTree,
|
|
60
|
-
FocusGuard,
|
|
61
|
-
PATIENT_CLICK_THRESHOLD,
|
|
62
|
-
POPUP_COLLISION_AVOIDANCE,
|
|
63
|
-
PopupTriggerMap,
|
|
64
|
-
ReactStore,
|
|
65
|
-
createSelector,
|
|
66
|
-
safePolygon,
|
|
67
|
-
useClick,
|
|
68
|
-
useDismiss,
|
|
69
|
-
useFloatingNodeId,
|
|
70
|
-
useFloatingParentNodeId,
|
|
71
|
-
useHoverFloatingInteraction,
|
|
72
|
-
useHoverReferenceInteraction
|
|
73
|
-
} from "./_chunk-2z044bba.js";
|
|
74
|
-
import"./_chunk-1vw45v38.js";
|
|
75
|
-
import"./_chunk-cgptgywc.js";
|
|
76
|
-
import {
|
|
77
|
-
COMPOSITE_KEYS
|
|
78
|
-
} from "./_chunk-pv7b791x.js";
|
|
79
|
-
import"./_chunk-kw8nnq00.js";
|
|
80
|
-
import"./_chunk-rrh8rt4v.js";
|
|
81
|
-
import {
|
|
82
|
-
Timeout
|
|
83
|
-
} from "./_chunk-b6dkjkbw.js";
|
|
84
|
-
import"./_chunk-s5pwkz8v.js";
|
|
85
|
-
import"./_chunk-dan0mva4.js";
|
|
86
|
-
import"./_chunk-x11e1k9r.js";
|
|
87
|
-
import"./_chunk-ase0ydtt.js";
|
|
88
|
-
import"./_chunk-6kqramh9.js";
|
|
89
|
-
import"./_chunk-451nqgsa.js";
|
|
90
|
-
import {
|
|
91
|
-
createChangeEventDetails,
|
|
92
|
-
exports_reason_parts
|
|
93
|
-
} from "./_chunk-e56mpvk1.js";
|
|
94
|
-
import {
|
|
95
|
-
useBaseUiId
|
|
96
|
-
} from "./_chunk-wdqynnjf.js";
|
|
97
|
-
import {
|
|
98
|
-
transitionStatusMapping,
|
|
99
|
-
useAnimationsFinished,
|
|
100
|
-
useOpenChangeComplete
|
|
101
|
-
} from "./_chunk-e13rsb6b.js";
|
|
102
|
-
import"./_chunk-zk4mtm9m.js";
|
|
103
|
-
import"./_chunk-8a9vv8am.js";
|
|
104
|
-
import"./_chunk-6ejf1z1r.js";
|
|
105
|
-
import {
|
|
106
|
-
useButton
|
|
107
|
-
} from "./_chunk-5xmdvndx.js";
|
|
108
|
-
import"./_chunk-hm5h9vsk.js";
|
|
109
|
-
import"./_chunk-cdgfsr3q.js";
|
|
110
|
-
import {
|
|
111
|
-
isHTMLElement
|
|
112
|
-
} from "./_chunk-000kmre8.js";
|
|
113
|
-
import {
|
|
114
|
-
useStableCallback
|
|
115
|
-
} from "./_chunk-cwvtvwc7.js";
|
|
116
|
-
import {
|
|
117
|
-
useIsoLayoutEffect
|
|
118
|
-
} from "./_chunk-5tze5c8q.js";
|
|
119
|
-
import {
|
|
120
|
-
EMPTY_OBJECT,
|
|
121
|
-
useRenderElement
|
|
122
|
-
} from "./_chunk-x8xehj6d.js";
|
|
123
|
-
import {
|
|
124
|
-
__export,
|
|
125
|
-
mergeProps
|
|
126
|
-
} from "./_chunk-svxv97ph.js";
|
|
127
|
-
|
|
128
|
-
// node_modules/@base-ui/react/esm/popover/index.parts.js
|
|
129
|
-
var exports_index_parts = {};
|
|
130
|
-
__export(exports_index_parts, {
|
|
131
|
-
createHandle: () => createPopoverHandle,
|
|
132
|
-
Viewport: () => PopoverViewport,
|
|
133
|
-
Trigger: () => PopoverTrigger,
|
|
134
|
-
Title: () => PopoverTitle,
|
|
135
|
-
Root: () => PopoverRoot,
|
|
136
|
-
Positioner: () => PopoverPositioner,
|
|
137
|
-
Portal: () => PopoverPortal,
|
|
138
|
-
Popup: () => PopoverPopup,
|
|
139
|
-
Handle: () => PopoverHandle,
|
|
140
|
-
Description: () => PopoverDescription,
|
|
141
|
-
Close: () => PopoverClose,
|
|
142
|
-
Backdrop: () => PopoverBackdrop,
|
|
143
|
-
Arrow: () => PopoverArrow
|
|
144
|
-
});
|
|
145
|
-
|
|
146
|
-
// node_modules/@base-ui/react/esm/popover/root/PopoverRoot.js
|
|
147
|
-
import * as React3 from "react";
|
|
148
|
-
|
|
149
|
-
// node_modules/@base-ui/react/esm/popover/root/PopoverRootContext.js
|
|
150
|
-
import * as React from "react";
|
|
151
|
-
"use client";
|
|
152
|
-
var PopoverRootContext = /* @__PURE__ */ React.createContext(undefined);
|
|
153
|
-
if (true)
|
|
154
|
-
PopoverRootContext.displayName = "PopoverRootContext";
|
|
155
|
-
function usePopoverRootContext(optional) {
|
|
156
|
-
const context = React.useContext(PopoverRootContext);
|
|
157
|
-
if (context === undefined && !optional) {
|
|
158
|
-
throw new Error("Base UI: PopoverRootContext is missing. Popover parts must be placed within <Popover.Root>.");
|
|
159
|
-
}
|
|
160
|
-
return context;
|
|
161
|
-
}
|
|
162
|
-
|
|
163
|
-
// node_modules/@base-ui/react/esm/popover/store/PopoverStore.js
|
|
164
|
-
import * as React2 from "react";
|
|
165
|
-
import * as ReactDOM from "react-dom";
|
|
166
|
-
"use client";
|
|
167
|
-
function createInitialState() {
|
|
168
|
-
return {
|
|
169
|
-
...createInitialPopupStoreState(),
|
|
170
|
-
disabled: false,
|
|
171
|
-
modal: false,
|
|
172
|
-
focusManagerModal: false,
|
|
173
|
-
instantType: undefined,
|
|
174
|
-
openMethod: null,
|
|
175
|
-
openChangeReason: null,
|
|
176
|
-
titleElementId: undefined,
|
|
177
|
-
descriptionElementId: undefined,
|
|
178
|
-
stickIfOpen: true,
|
|
179
|
-
nested: false,
|
|
180
|
-
openOnHover: false,
|
|
181
|
-
closeDelay: 0,
|
|
182
|
-
hasViewport: false
|
|
183
|
-
};
|
|
184
|
-
}
|
|
185
|
-
var selectors = {
|
|
186
|
-
...popupStoreSelectors,
|
|
187
|
-
disabled: createSelector((state) => state.disabled),
|
|
188
|
-
instantType: createSelector((state) => state.instantType),
|
|
189
|
-
openMethod: createSelector((state) => state.openMethod),
|
|
190
|
-
openChangeReason: createSelector((state) => state.openChangeReason),
|
|
191
|
-
modal: createSelector((state) => state.modal),
|
|
192
|
-
focusManagerModal: createSelector((state) => state.focusManagerModal),
|
|
193
|
-
stickIfOpen: createSelector((state) => state.stickIfOpen),
|
|
194
|
-
titleElementId: createSelector((state) => state.titleElementId),
|
|
195
|
-
descriptionElementId: createSelector((state) => state.descriptionElementId),
|
|
196
|
-
openOnHover: createSelector((state) => state.openOnHover),
|
|
197
|
-
closeDelay: createSelector((state) => state.closeDelay),
|
|
198
|
-
hasViewport: createSelector((state) => state.hasViewport)
|
|
199
|
-
};
|
|
200
|
-
|
|
201
|
-
class PopoverStore extends ReactStore {
|
|
202
|
-
constructor(initialState, floatingId, nested = false) {
|
|
203
|
-
const initial = {
|
|
204
|
-
...createInitialState(),
|
|
205
|
-
...initialState
|
|
206
|
-
};
|
|
207
|
-
const triggerElements = new PopupTriggerMap;
|
|
208
|
-
if (initial.open && initialState?.mounted === undefined) {
|
|
209
|
-
initial.mounted = true;
|
|
210
|
-
}
|
|
211
|
-
initial.floatingRootContext = createPopupFloatingRootContext(triggerElements, floatingId, nested);
|
|
212
|
-
super(initial, {
|
|
213
|
-
popupRef: /* @__PURE__ */ React2.createRef(),
|
|
214
|
-
backdropRef: /* @__PURE__ */ React2.createRef(),
|
|
215
|
-
internalBackdropRef: /* @__PURE__ */ React2.createRef(),
|
|
216
|
-
onOpenChange: undefined,
|
|
217
|
-
onOpenChangeComplete: undefined,
|
|
218
|
-
triggerFocusTargetRef: /* @__PURE__ */ React2.createRef(),
|
|
219
|
-
beforeContentFocusGuardRef: /* @__PURE__ */ React2.createRef(),
|
|
220
|
-
stickIfOpenTimeout: new Timeout,
|
|
221
|
-
triggerElements
|
|
222
|
-
}, selectors);
|
|
223
|
-
}
|
|
224
|
-
setOpen = (nextOpen, eventDetails) => {
|
|
225
|
-
const isHover = eventDetails.reason === exports_reason_parts.triggerHover;
|
|
226
|
-
const isKeyboardClick = eventDetails.reason === exports_reason_parts.triggerPress && eventDetails.event.detail === 0;
|
|
227
|
-
const isDismissClose = !nextOpen && (eventDetails.reason === exports_reason_parts.escapeKey || eventDetails.reason == null);
|
|
228
|
-
eventDetails.preventUnmountOnClose = () => {
|
|
229
|
-
this.set("preventUnmountingOnClose", true);
|
|
230
|
-
};
|
|
231
|
-
const activeTriggerId = this.select("activeTriggerId");
|
|
232
|
-
if (!nextOpen && eventDetails.reason === exports_reason_parts.closePress && eventDetails.trigger == null && activeTriggerId != null) {
|
|
233
|
-
eventDetails.trigger = this.context.triggerElements.getById(activeTriggerId) ?? this.select("activeTriggerElement") ?? undefined;
|
|
234
|
-
}
|
|
235
|
-
this.context.onOpenChange?.(nextOpen, eventDetails);
|
|
236
|
-
if (eventDetails.isCanceled) {
|
|
237
|
-
return;
|
|
238
|
-
}
|
|
239
|
-
this.state.floatingRootContext.dispatchOpenChange(nextOpen, eventDetails);
|
|
240
|
-
const changeState = () => {
|
|
241
|
-
const updatedState = {
|
|
242
|
-
open: nextOpen,
|
|
243
|
-
openChangeReason: eventDetails.reason
|
|
244
|
-
};
|
|
245
|
-
setOpenTriggerState(updatedState, nextOpen, eventDetails.trigger);
|
|
246
|
-
this.update(updatedState);
|
|
247
|
-
};
|
|
248
|
-
if (isHover) {
|
|
249
|
-
this.set("stickIfOpen", true);
|
|
250
|
-
this.context.stickIfOpenTimeout.start(PATIENT_CLICK_THRESHOLD, () => {
|
|
251
|
-
this.set("stickIfOpen", false);
|
|
252
|
-
});
|
|
253
|
-
ReactDOM.flushSync(changeState);
|
|
254
|
-
} else {
|
|
255
|
-
changeState();
|
|
256
|
-
}
|
|
257
|
-
if (isKeyboardClick || isDismissClose) {
|
|
258
|
-
this.set("instantType", isKeyboardClick ? "click" : "dismiss");
|
|
259
|
-
} else if (eventDetails.reason === exports_reason_parts.focusOut) {
|
|
260
|
-
this.set("instantType", "focus");
|
|
261
|
-
} else {
|
|
262
|
-
this.set("instantType", undefined);
|
|
263
|
-
}
|
|
264
|
-
};
|
|
265
|
-
static useStore(externalStore, initialState) {
|
|
266
|
-
const {
|
|
267
|
-
store,
|
|
268
|
-
internalStore
|
|
269
|
-
} = usePopupStore(externalStore, (floatingId, nested) => new PopoverStore(initialState, floatingId, nested));
|
|
270
|
-
React2.useEffect(() => internalStore?.disposeEffect(), [internalStore]);
|
|
271
|
-
return store;
|
|
272
|
-
}
|
|
273
|
-
disposeEffect = () => {
|
|
274
|
-
return this.context.stickIfOpenTimeout.disposeEffect();
|
|
275
|
-
};
|
|
276
|
-
}
|
|
277
|
-
|
|
278
|
-
// node_modules/@base-ui/react/esm/popover/root/PopoverRoot.js
|
|
279
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
280
|
-
"use client";
|
|
281
|
-
function PopoverRootComponent({
|
|
282
|
-
props
|
|
283
|
-
}) {
|
|
284
|
-
const {
|
|
285
|
-
children,
|
|
286
|
-
open: openProp,
|
|
287
|
-
defaultOpen = false,
|
|
288
|
-
onOpenChange,
|
|
289
|
-
onOpenChangeComplete,
|
|
290
|
-
modal = false,
|
|
291
|
-
handle,
|
|
292
|
-
triggerId: triggerIdProp,
|
|
293
|
-
defaultTriggerId: defaultTriggerIdProp = null
|
|
294
|
-
} = props;
|
|
295
|
-
const store = PopoverStore.useStore(handle?.store, {
|
|
296
|
-
modal,
|
|
297
|
-
open: defaultOpen,
|
|
298
|
-
openProp,
|
|
299
|
-
activeTriggerId: defaultTriggerIdProp,
|
|
300
|
-
triggerIdProp
|
|
301
|
-
});
|
|
302
|
-
useOnFirstRender(() => {
|
|
303
|
-
if (openProp === undefined && store.state.open === false && defaultOpen === true) {
|
|
304
|
-
store.update({
|
|
305
|
-
open: true,
|
|
306
|
-
activeTriggerId: defaultTriggerIdProp
|
|
307
|
-
});
|
|
308
|
-
}
|
|
309
|
-
});
|
|
310
|
-
store.useControlledProp("openProp", openProp);
|
|
311
|
-
store.useControlledProp("triggerIdProp", triggerIdProp);
|
|
312
|
-
const open = store.useState("open");
|
|
313
|
-
const mounted = store.useState("mounted");
|
|
314
|
-
const payload = store.useState("payload");
|
|
315
|
-
const nested = useFloatingParentNodeId() != null;
|
|
316
|
-
store.useContextCallback("onOpenChange", onOpenChange);
|
|
317
|
-
store.useContextCallback("onOpenChangeComplete", onOpenChangeComplete);
|
|
318
|
-
usePopupRootSync(store, open);
|
|
319
|
-
useImplicitActiveTrigger(store);
|
|
320
|
-
const {
|
|
321
|
-
forceUnmount
|
|
322
|
-
} = useOpenStateTransitions(open, store, () => {
|
|
323
|
-
store.update({
|
|
324
|
-
stickIfOpen: true,
|
|
325
|
-
openChangeReason: null
|
|
326
|
-
});
|
|
327
|
-
});
|
|
328
|
-
store.useSyncedValues({
|
|
329
|
-
modal,
|
|
330
|
-
nested
|
|
331
|
-
});
|
|
332
|
-
React3.useEffect(() => {
|
|
333
|
-
if (!open) {
|
|
334
|
-
store.context.stickIfOpenTimeout.clear();
|
|
335
|
-
}
|
|
336
|
-
}, [store, open]);
|
|
337
|
-
const handleImperativeClose = React3.useCallback(() => {
|
|
338
|
-
store.setOpen(false, createChangeEventDetails(exports_reason_parts.imperativeAction));
|
|
339
|
-
}, [store]);
|
|
340
|
-
React3.useImperativeHandle(props.actionsRef, () => ({
|
|
341
|
-
unmount: forceUnmount,
|
|
342
|
-
close: handleImperativeClose
|
|
343
|
-
}), [forceUnmount, handleImperativeClose]);
|
|
344
|
-
const shouldRenderInteractions = open || mounted;
|
|
345
|
-
const popoverContext = React3.useMemo(() => ({
|
|
346
|
-
store
|
|
347
|
-
}), [store]);
|
|
348
|
-
return /* @__PURE__ */ _jsxs(PopoverRootContext.Provider, {
|
|
349
|
-
value: popoverContext,
|
|
350
|
-
children: [shouldRenderInteractions && /* @__PURE__ */ _jsx(PopoverInteractions, {
|
|
351
|
-
store,
|
|
352
|
-
modal
|
|
353
|
-
}), typeof children === "function" ? children({
|
|
354
|
-
payload
|
|
355
|
-
}) : children]
|
|
356
|
-
});
|
|
357
|
-
}
|
|
358
|
-
function PopoverRoot(props) {
|
|
359
|
-
if (usePopoverRootContext(true)) {
|
|
360
|
-
return /* @__PURE__ */ _jsx(PopoverRootComponent, {
|
|
361
|
-
props
|
|
362
|
-
});
|
|
363
|
-
}
|
|
364
|
-
return /* @__PURE__ */ _jsx(FloatingTree, {
|
|
365
|
-
children: /* @__PURE__ */ _jsx(PopoverRootComponent, {
|
|
366
|
-
props
|
|
367
|
-
})
|
|
368
|
-
});
|
|
369
|
-
}
|
|
370
|
-
function PopoverInteractions({
|
|
371
|
-
store,
|
|
372
|
-
modal
|
|
373
|
-
}) {
|
|
374
|
-
const floatingRootContext = store.useState("floatingRootContext");
|
|
375
|
-
const dismiss = useDismiss(floatingRootContext, {
|
|
376
|
-
outsidePressEvent: {
|
|
377
|
-
mouse: modal === "trap-focus" ? "sloppy" : "intentional",
|
|
378
|
-
touch: "sloppy"
|
|
379
|
-
}
|
|
380
|
-
});
|
|
381
|
-
const activeTriggerProps = dismiss.reference ?? EMPTY_OBJECT;
|
|
382
|
-
const inactiveTriggerProps = dismiss.trigger ?? EMPTY_OBJECT;
|
|
383
|
-
const popupProps = React3.useMemo(() => mergeProps(FOCUSABLE_POPUP_PROPS, dismiss.floating), [dismiss.floating]);
|
|
384
|
-
usePopupInteractionProps(store, {
|
|
385
|
-
activeTriggerProps,
|
|
386
|
-
inactiveTriggerProps,
|
|
387
|
-
popupProps
|
|
388
|
-
});
|
|
389
|
-
return null;
|
|
390
|
-
}
|
|
391
|
-
// node_modules/@base-ui/react/esm/popover/trigger/PopoverTrigger.js
|
|
392
|
-
import * as React4 from "react";
|
|
393
|
-
|
|
394
|
-
// node_modules/@base-ui/react/esm/popover/utils/constants.js
|
|
395
|
-
var OPEN_DELAY = 300;
|
|
396
|
-
|
|
397
|
-
// node_modules/@base-ui/react/esm/popover/trigger/PopoverTrigger.js
|
|
398
|
-
import { jsx as _jsx2, jsxs as _jsxs2 } from "react/jsx-runtime";
|
|
399
|
-
"use client";
|
|
400
|
-
var PopoverTrigger = /* @__PURE__ */ React4.forwardRef(function PopoverTrigger2(componentProps, forwardedRef) {
|
|
401
|
-
const {
|
|
402
|
-
render,
|
|
403
|
-
className,
|
|
404
|
-
style,
|
|
405
|
-
disabled = false,
|
|
406
|
-
nativeButton = true,
|
|
407
|
-
handle,
|
|
408
|
-
payload,
|
|
409
|
-
openOnHover = false,
|
|
410
|
-
delay = OPEN_DELAY,
|
|
411
|
-
closeDelay = 0,
|
|
412
|
-
id: idProp,
|
|
413
|
-
...elementProps
|
|
414
|
-
} = componentProps;
|
|
415
|
-
const rootContext = usePopoverRootContext(true);
|
|
416
|
-
const store = handle?.store ?? rootContext?.store;
|
|
417
|
-
if (!store) {
|
|
418
|
-
throw new Error("Base UI: <Popover.Trigger> must be either used within a <Popover.Root> component or provided with a handle.");
|
|
419
|
-
}
|
|
420
|
-
const thisTriggerId = useBaseUiId(idProp);
|
|
421
|
-
const isTriggerActive = store.useState("isTriggerActive", thisTriggerId);
|
|
422
|
-
const floatingContext = store.useState("floatingRootContext");
|
|
423
|
-
const isOpenedByThisTrigger = store.useState("isOpenedByTrigger", thisTriggerId);
|
|
424
|
-
const popupId = store.useState("triggerPopupId", thisTriggerId);
|
|
425
|
-
const triggerElementRef = React4.useRef(null);
|
|
426
|
-
const {
|
|
427
|
-
registerTrigger,
|
|
428
|
-
isMountedByThisTrigger
|
|
429
|
-
} = useTriggerDataForwarding(thisTriggerId, triggerElementRef, store, {
|
|
430
|
-
payload,
|
|
431
|
-
disabled,
|
|
432
|
-
openOnHover,
|
|
433
|
-
closeDelay
|
|
434
|
-
});
|
|
435
|
-
const openReason = store.useState("openChangeReason");
|
|
436
|
-
const stickIfOpen = store.useState("stickIfOpen");
|
|
437
|
-
const openMethod = store.useState("openMethod");
|
|
438
|
-
const focusManagerModal = store.useState("focusManagerModal");
|
|
439
|
-
const hoverProps = useHoverReferenceInteraction(floatingContext, {
|
|
440
|
-
enabled: floatingContext != null && openOnHover && (openMethod !== "touch" || openReason !== exports_reason_parts.triggerPress),
|
|
441
|
-
mouseOnly: true,
|
|
442
|
-
move: false,
|
|
443
|
-
handleClose: safePolygon(),
|
|
444
|
-
restMs: delay,
|
|
445
|
-
delay: {
|
|
446
|
-
close: closeDelay
|
|
447
|
-
},
|
|
448
|
-
triggerElementRef,
|
|
449
|
-
isActiveTrigger: isTriggerActive,
|
|
450
|
-
isClosing: () => store.select("transitionStatus") === "ending"
|
|
451
|
-
});
|
|
452
|
-
const click = useClick(floatingContext, {
|
|
453
|
-
enabled: floatingContext != null,
|
|
454
|
-
stickIfOpen
|
|
455
|
-
});
|
|
456
|
-
const interactionTypeProps = useOpenMethodTriggerProps(() => store.select("open"), (interactionType) => {
|
|
457
|
-
store.set("openMethod", interactionType);
|
|
458
|
-
});
|
|
459
|
-
const rootTriggerProps = store.useState("triggerProps", isMountedByThisTrigger);
|
|
460
|
-
const {
|
|
461
|
-
getButtonProps,
|
|
462
|
-
buttonRef
|
|
463
|
-
} = useButton({
|
|
464
|
-
disabled,
|
|
465
|
-
native: nativeButton
|
|
466
|
-
});
|
|
467
|
-
const stateAttributesMapping = {
|
|
468
|
-
open(value) {
|
|
469
|
-
if (value && openReason === exports_reason_parts.triggerPress) {
|
|
470
|
-
return pressableTriggerOpenStateMapping.open(value);
|
|
471
|
-
}
|
|
472
|
-
return triggerOpenStateMapping.open(value);
|
|
473
|
-
}
|
|
474
|
-
};
|
|
475
|
-
const {
|
|
476
|
-
preFocusGuardRef,
|
|
477
|
-
handlePreFocusGuardFocus,
|
|
478
|
-
handleFocusTargetFocus
|
|
479
|
-
} = useTriggerFocusGuards(store, triggerElementRef);
|
|
480
|
-
const state = {
|
|
481
|
-
disabled,
|
|
482
|
-
open: isOpenedByThisTrigger
|
|
483
|
-
};
|
|
484
|
-
const element = useRenderElement("button", componentProps, {
|
|
485
|
-
state,
|
|
486
|
-
ref: [buttonRef, forwardedRef, registerTrigger, triggerElementRef],
|
|
487
|
-
props: [click.reference, hoverProps, rootTriggerProps, interactionTypeProps, {
|
|
488
|
-
[CLICK_TRIGGER_IDENTIFIER]: "",
|
|
489
|
-
id: thisTriggerId,
|
|
490
|
-
"aria-haspopup": "dialog",
|
|
491
|
-
"aria-expanded": isOpenedByThisTrigger,
|
|
492
|
-
"aria-controls": popupId
|
|
493
|
-
}, elementProps, getButtonProps],
|
|
494
|
-
stateAttributesMapping
|
|
495
|
-
});
|
|
496
|
-
if (isMountedByThisTrigger && !focusManagerModal) {
|
|
497
|
-
return /* @__PURE__ */ _jsxs2(React4.Fragment, {
|
|
498
|
-
children: [/* @__PURE__ */ _jsx2(FocusGuard, {
|
|
499
|
-
ref: preFocusGuardRef,
|
|
500
|
-
onFocus: handlePreFocusGuardFocus
|
|
501
|
-
}), /* @__PURE__ */ _jsx2(React4.Fragment, {
|
|
502
|
-
children: element
|
|
503
|
-
}, thisTriggerId), /* @__PURE__ */ _jsx2(FocusGuard, {
|
|
504
|
-
ref: store.context.triggerFocusTargetRef,
|
|
505
|
-
onFocus: handleFocusTargetFocus
|
|
506
|
-
})]
|
|
507
|
-
});
|
|
508
|
-
}
|
|
509
|
-
return /* @__PURE__ */ _jsx2(React4.Fragment, {
|
|
510
|
-
children: element
|
|
511
|
-
}, thisTriggerId);
|
|
512
|
-
});
|
|
513
|
-
if (true)
|
|
514
|
-
PopoverTrigger.displayName = "PopoverTrigger";
|
|
515
|
-
// node_modules/@base-ui/react/esm/popover/portal/PopoverPortal.js
|
|
516
|
-
import * as React6 from "react";
|
|
517
|
-
|
|
518
|
-
// node_modules/@base-ui/react/esm/popover/portal/PopoverPortalContext.js
|
|
519
|
-
import * as React5 from "react";
|
|
520
|
-
"use client";
|
|
521
|
-
var PopoverPortalContext = /* @__PURE__ */ React5.createContext(undefined);
|
|
522
|
-
if (true)
|
|
523
|
-
PopoverPortalContext.displayName = "PopoverPortalContext";
|
|
524
|
-
function usePopoverPortalContext() {
|
|
525
|
-
const value = React5.useContext(PopoverPortalContext);
|
|
526
|
-
if (value === undefined) {
|
|
527
|
-
throw new Error("Base UI: <Popover.Portal> is missing.");
|
|
528
|
-
}
|
|
529
|
-
return value;
|
|
530
|
-
}
|
|
531
|
-
|
|
532
|
-
// node_modules/@base-ui/react/esm/popover/portal/PopoverPortal.js
|
|
533
|
-
import { jsx as _jsx3 } from "react/jsx-runtime";
|
|
534
|
-
"use client";
|
|
535
|
-
var PopoverPortal = /* @__PURE__ */ React6.forwardRef(function PopoverPortal2(props, forwardedRef) {
|
|
536
|
-
const {
|
|
537
|
-
keepMounted = false,
|
|
538
|
-
...portalProps
|
|
539
|
-
} = props;
|
|
540
|
-
const {
|
|
541
|
-
store
|
|
542
|
-
} = usePopoverRootContext();
|
|
543
|
-
const mounted = store.useState("mounted");
|
|
544
|
-
const shouldRender = mounted || keepMounted;
|
|
545
|
-
if (!shouldRender) {
|
|
546
|
-
return null;
|
|
547
|
-
}
|
|
548
|
-
return /* @__PURE__ */ _jsx3(PopoverPortalContext.Provider, {
|
|
549
|
-
value: keepMounted,
|
|
550
|
-
children: /* @__PURE__ */ _jsx3(FloatingPortal, {
|
|
551
|
-
ref: forwardedRef,
|
|
552
|
-
...portalProps
|
|
553
|
-
})
|
|
554
|
-
});
|
|
555
|
-
});
|
|
556
|
-
if (true)
|
|
557
|
-
PopoverPortal.displayName = "PopoverPortal";
|
|
558
|
-
// node_modules/@base-ui/react/esm/popover/positioner/PopoverPositioner.js
|
|
559
|
-
import * as React8 from "react";
|
|
560
|
-
|
|
561
|
-
// node_modules/@base-ui/react/esm/popover/positioner/PopoverPositionerContext.js
|
|
562
|
-
import * as React7 from "react";
|
|
563
|
-
"use client";
|
|
564
|
-
var PopoverPositionerContext = /* @__PURE__ */ React7.createContext(undefined);
|
|
565
|
-
if (true)
|
|
566
|
-
PopoverPositionerContext.displayName = "PopoverPositionerContext";
|
|
567
|
-
function usePopoverPositionerContext() {
|
|
568
|
-
const context = React7.useContext(PopoverPositionerContext);
|
|
569
|
-
if (!context) {
|
|
570
|
-
throw new Error("Base UI: PopoverPositionerContext is missing. PopoverPositioner parts must be placed within <Popover.Positioner>.");
|
|
571
|
-
}
|
|
572
|
-
return context;
|
|
573
|
-
}
|
|
574
|
-
|
|
575
|
-
// node_modules/@base-ui/react/esm/popover/positioner/PopoverPositioner.js
|
|
576
|
-
import { jsx as _jsx4, jsxs as _jsxs3 } from "react/jsx-runtime";
|
|
577
|
-
"use client";
|
|
578
|
-
var PopoverPositioner = /* @__PURE__ */ React8.forwardRef(function PopoverPositioner2(componentProps, forwardedRef) {
|
|
579
|
-
const {
|
|
580
|
-
render,
|
|
581
|
-
className,
|
|
582
|
-
style,
|
|
583
|
-
anchor,
|
|
584
|
-
positionMethod = "absolute",
|
|
585
|
-
side = "bottom",
|
|
586
|
-
align = "center",
|
|
587
|
-
sideOffset = 0,
|
|
588
|
-
alignOffset = 0,
|
|
589
|
-
collisionBoundary = "clipping-ancestors",
|
|
590
|
-
collisionPadding = 5,
|
|
591
|
-
arrowPadding = 5,
|
|
592
|
-
sticky = false,
|
|
593
|
-
disableAnchorTracking = false,
|
|
594
|
-
collisionAvoidance = POPUP_COLLISION_AVOIDANCE,
|
|
595
|
-
...elementProps
|
|
596
|
-
} = componentProps;
|
|
597
|
-
const {
|
|
598
|
-
store
|
|
599
|
-
} = usePopoverRootContext();
|
|
600
|
-
const keepMounted = usePopoverPortalContext();
|
|
601
|
-
const nodeId = useFloatingNodeId();
|
|
602
|
-
const floatingRootContext = store.useState("floatingRootContext");
|
|
603
|
-
const mounted = store.useState("mounted");
|
|
604
|
-
const open = store.useState("open");
|
|
605
|
-
const openReason = store.useState("openChangeReason");
|
|
606
|
-
const triggerElement = store.useState("activeTriggerElement");
|
|
607
|
-
const modal = store.useState("modal");
|
|
608
|
-
const openMethod = store.useState("openMethod");
|
|
609
|
-
const positionerElement = store.useState("positionerElement");
|
|
610
|
-
const instantType = store.useState("instantType");
|
|
611
|
-
const transitionStatus = store.useState("transitionStatus");
|
|
612
|
-
const hasViewport = store.useState("hasViewport");
|
|
613
|
-
const prevTriggerElementRef = React8.useRef(null);
|
|
614
|
-
const runOnceAnimationsFinish = useAnimationsFinished(positionerElement, false, false);
|
|
615
|
-
const positioning = useAnchorPositioning({
|
|
616
|
-
anchor,
|
|
617
|
-
floatingRootContext,
|
|
618
|
-
positionMethod,
|
|
619
|
-
mounted,
|
|
620
|
-
side,
|
|
621
|
-
sideOffset,
|
|
622
|
-
align,
|
|
623
|
-
alignOffset,
|
|
624
|
-
arrowPadding,
|
|
625
|
-
collisionBoundary,
|
|
626
|
-
collisionPadding,
|
|
627
|
-
sticky,
|
|
628
|
-
disableAnchorTracking,
|
|
629
|
-
keepMounted,
|
|
630
|
-
nodeId,
|
|
631
|
-
collisionAvoidance,
|
|
632
|
-
adaptiveOrigin: hasViewport ? adaptiveOrigin : undefined
|
|
633
|
-
});
|
|
634
|
-
const domReference = floatingRootContext.useState("domReferenceElement");
|
|
635
|
-
useIsoLayoutEffect(() => {
|
|
636
|
-
const currentTriggerElement = domReference;
|
|
637
|
-
const prevTriggerElement = prevTriggerElementRef.current;
|
|
638
|
-
if (currentTriggerElement) {
|
|
639
|
-
prevTriggerElementRef.current = currentTriggerElement;
|
|
640
|
-
}
|
|
641
|
-
if (prevTriggerElement && currentTriggerElement && currentTriggerElement !== prevTriggerElement) {
|
|
642
|
-
store.set("instantType", undefined);
|
|
643
|
-
const ac = new AbortController;
|
|
644
|
-
runOnceAnimationsFinish(() => {
|
|
645
|
-
store.set("instantType", "trigger-change");
|
|
646
|
-
}, ac.signal);
|
|
647
|
-
return () => {
|
|
648
|
-
ac.abort();
|
|
649
|
-
};
|
|
650
|
-
}
|
|
651
|
-
return;
|
|
652
|
-
}, [domReference, runOnceAnimationsFinish, store]);
|
|
653
|
-
useAnchoredPopupScrollLock(open && modal === true && openReason !== exports_reason_parts.triggerHover, openMethod === "touch", positionerElement, triggerElement);
|
|
654
|
-
const setPositionerElement = React8.useCallback((element2) => {
|
|
655
|
-
store.set("positionerElement", element2);
|
|
656
|
-
}, [store]);
|
|
657
|
-
const state = {
|
|
658
|
-
open,
|
|
659
|
-
side: positioning.side,
|
|
660
|
-
align: positioning.align,
|
|
661
|
-
anchorHidden: positioning.anchorHidden,
|
|
662
|
-
instant: instantType
|
|
663
|
-
};
|
|
664
|
-
const element = usePositioner(componentProps, state, {
|
|
665
|
-
styles: positioning.positionerStyles,
|
|
666
|
-
transitionStatus,
|
|
667
|
-
props: elementProps,
|
|
668
|
-
refs: [forwardedRef, setPositionerElement],
|
|
669
|
-
hidden: !mounted,
|
|
670
|
-
inert: !open
|
|
671
|
-
});
|
|
672
|
-
return /* @__PURE__ */ _jsxs3(PopoverPositionerContext.Provider, {
|
|
673
|
-
value: positioning,
|
|
674
|
-
children: [mounted && modal === true && openReason !== exports_reason_parts.triggerHover && /* @__PURE__ */ _jsx4(InternalBackdrop, {
|
|
675
|
-
ref: store.context.internalBackdropRef,
|
|
676
|
-
inert: inertValue(!open),
|
|
677
|
-
cutout: triggerElement
|
|
678
|
-
}), /* @__PURE__ */ _jsx4(FloatingNode, {
|
|
679
|
-
id: nodeId,
|
|
680
|
-
children: element
|
|
681
|
-
})]
|
|
682
|
-
});
|
|
683
|
-
});
|
|
684
|
-
if (true)
|
|
685
|
-
PopoverPositioner.displayName = "PopoverPositioner";
|
|
686
|
-
// node_modules/@base-ui/react/esm/popover/popup/PopoverPopup.js
|
|
687
|
-
import * as React10 from "react";
|
|
688
|
-
|
|
689
|
-
// node_modules/@base-ui/react/esm/utils/closePart.js
|
|
690
|
-
import * as React9 from "react";
|
|
691
|
-
import { jsx as _jsx5 } from "react/jsx-runtime";
|
|
692
|
-
"use client";
|
|
693
|
-
var ClosePartContext = /* @__PURE__ */ React9.createContext(undefined);
|
|
694
|
-
if (true)
|
|
695
|
-
ClosePartContext.displayName = "ClosePartContext";
|
|
696
|
-
function useClosePartCount() {
|
|
697
|
-
const [closePartCount, setClosePartCount] = React9.useState(0);
|
|
698
|
-
const register = useStableCallback(() => {
|
|
699
|
-
setClosePartCount((count) => count + 1);
|
|
700
|
-
return () => {
|
|
701
|
-
setClosePartCount((count) => Math.max(0, count - 1));
|
|
702
|
-
};
|
|
703
|
-
});
|
|
704
|
-
const context = React9.useMemo(() => ({
|
|
705
|
-
register
|
|
706
|
-
}), [register]);
|
|
707
|
-
return {
|
|
708
|
-
context,
|
|
709
|
-
hasClosePart: closePartCount > 0
|
|
710
|
-
};
|
|
711
|
-
}
|
|
712
|
-
function ClosePartProvider(props) {
|
|
713
|
-
const {
|
|
714
|
-
value,
|
|
715
|
-
children
|
|
716
|
-
} = props;
|
|
717
|
-
return /* @__PURE__ */ _jsx5(ClosePartContext.Provider, {
|
|
718
|
-
value,
|
|
719
|
-
children
|
|
720
|
-
});
|
|
721
|
-
}
|
|
722
|
-
function useClosePartRegistration() {
|
|
723
|
-
const context = React9.useContext(ClosePartContext);
|
|
724
|
-
useIsoLayoutEffect(() => {
|
|
725
|
-
return context?.register();
|
|
726
|
-
}, [context]);
|
|
727
|
-
}
|
|
728
|
-
|
|
729
|
-
// node_modules/@base-ui/react/esm/popover/popup/PopoverPopup.js
|
|
730
|
-
import { jsx as _jsx6 } from "react/jsx-runtime";
|
|
731
|
-
"use client";
|
|
732
|
-
var stateAttributesMapping = {
|
|
733
|
-
...popupStateMapping,
|
|
734
|
-
...transitionStatusMapping
|
|
735
|
-
};
|
|
736
|
-
var PopoverPopup = /* @__PURE__ */ React10.forwardRef(function PopoverPopup2(componentProps, forwardedRef) {
|
|
737
|
-
const {
|
|
738
|
-
render,
|
|
739
|
-
className,
|
|
740
|
-
style,
|
|
741
|
-
initialFocus,
|
|
742
|
-
finalFocus,
|
|
743
|
-
...elementProps
|
|
744
|
-
} = componentProps;
|
|
745
|
-
const {
|
|
746
|
-
store
|
|
747
|
-
} = usePopoverRootContext();
|
|
748
|
-
const positioner = usePopoverPositionerContext();
|
|
749
|
-
const insideToolbar = useToolbarRootContext(true) != null;
|
|
750
|
-
const {
|
|
751
|
-
context: closePartContext,
|
|
752
|
-
hasClosePart
|
|
753
|
-
} = useClosePartCount();
|
|
754
|
-
const open = store.useState("open");
|
|
755
|
-
const openMethod = store.useState("openMethod");
|
|
756
|
-
const instantType = store.useState("instantType");
|
|
757
|
-
const transitionStatus = store.useState("transitionStatus");
|
|
758
|
-
const popupProps = store.useState("popupProps");
|
|
759
|
-
const titleId = store.useState("titleElementId");
|
|
760
|
-
const descriptionId = store.useState("descriptionElementId");
|
|
761
|
-
const modal = store.useState("modal");
|
|
762
|
-
const mounted = store.useState("mounted");
|
|
763
|
-
const openReason = store.useState("openChangeReason");
|
|
764
|
-
const activeTriggerElement = store.useState("activeTriggerElement");
|
|
765
|
-
const floatingContext = store.useState("floatingRootContext");
|
|
766
|
-
const floatingId = floatingContext.useState("floatingId");
|
|
767
|
-
const disabled = store.useState("disabled");
|
|
768
|
-
const openOnHover = store.useState("openOnHover");
|
|
769
|
-
const closeDelay = store.useState("closeDelay");
|
|
770
|
-
const popupId = elementProps.id ?? floatingId;
|
|
771
|
-
useOpenChangeComplete({
|
|
772
|
-
open,
|
|
773
|
-
ref: store.context.popupRef,
|
|
774
|
-
onComplete() {
|
|
775
|
-
if (open) {
|
|
776
|
-
store.context.onOpenChangeComplete?.(true);
|
|
777
|
-
}
|
|
778
|
-
}
|
|
779
|
-
});
|
|
780
|
-
useHoverFloatingInteraction(floatingContext, {
|
|
781
|
-
enabled: openOnHover && !disabled,
|
|
782
|
-
closeDelay
|
|
783
|
-
});
|
|
784
|
-
function defaultInitialFocus(interactionType) {
|
|
785
|
-
if (interactionType === "touch") {
|
|
786
|
-
return store.context.popupRef.current;
|
|
787
|
-
}
|
|
788
|
-
return true;
|
|
789
|
-
}
|
|
790
|
-
const resolvedInitialFocus = initialFocus === undefined ? defaultInitialFocus : initialFocus;
|
|
791
|
-
const focusManagerModal = modal !== false && hasClosePart;
|
|
792
|
-
store.useSyncedValue("focusManagerModal", focusManagerModal);
|
|
793
|
-
const setPopupElement = React10.useCallback((element2) => {
|
|
794
|
-
store.set("popupElement", element2);
|
|
795
|
-
}, [store]);
|
|
796
|
-
const state = {
|
|
797
|
-
open,
|
|
798
|
-
side: positioner.side,
|
|
799
|
-
align: positioner.align,
|
|
800
|
-
instant: instantType,
|
|
801
|
-
transitionStatus
|
|
802
|
-
};
|
|
803
|
-
const element = useRenderElement("div", componentProps, {
|
|
804
|
-
state,
|
|
805
|
-
ref: [forwardedRef, store.context.popupRef, setPopupElement],
|
|
806
|
-
props: [popupProps, {
|
|
807
|
-
id: popupId,
|
|
808
|
-
role: "dialog",
|
|
809
|
-
...FOCUSABLE_POPUP_PROPS,
|
|
810
|
-
"aria-labelledby": titleId,
|
|
811
|
-
"aria-describedby": descriptionId,
|
|
812
|
-
onKeyDown(event) {
|
|
813
|
-
if (insideToolbar && COMPOSITE_KEYS.has(event.key)) {
|
|
814
|
-
event.stopPropagation();
|
|
815
|
-
}
|
|
816
|
-
}
|
|
817
|
-
}, getDisabledMountTransitionStyles(transitionStatus), elementProps],
|
|
818
|
-
stateAttributesMapping
|
|
819
|
-
});
|
|
820
|
-
return /* @__PURE__ */ _jsx6(FloatingFocusManager, {
|
|
821
|
-
context: floatingContext,
|
|
822
|
-
openInteractionType: openMethod,
|
|
823
|
-
modal: focusManagerModal,
|
|
824
|
-
disabled: !mounted || openReason === exports_reason_parts.triggerHover,
|
|
825
|
-
initialFocus: resolvedInitialFocus,
|
|
826
|
-
returnFocus: finalFocus,
|
|
827
|
-
restoreFocus: "popup",
|
|
828
|
-
previousFocusableElement: isHTMLElement(activeTriggerElement) ? activeTriggerElement : undefined,
|
|
829
|
-
nextFocusableElement: store.context.triggerFocusTargetRef,
|
|
830
|
-
beforeContentFocusGuardRef: store.context.beforeContentFocusGuardRef,
|
|
831
|
-
children: /* @__PURE__ */ _jsx6(ClosePartProvider, {
|
|
832
|
-
value: closePartContext,
|
|
833
|
-
children: element
|
|
834
|
-
})
|
|
835
|
-
});
|
|
836
|
-
});
|
|
837
|
-
if (true)
|
|
838
|
-
PopoverPopup.displayName = "PopoverPopup";
|
|
839
|
-
// node_modules/@base-ui/react/esm/popover/arrow/PopoverArrow.js
|
|
840
|
-
import * as React11 from "react";
|
|
841
|
-
"use client";
|
|
842
|
-
var PopoverArrow = /* @__PURE__ */ React11.forwardRef(function PopoverArrow2(componentProps, forwardedRef) {
|
|
843
|
-
const {
|
|
844
|
-
render,
|
|
845
|
-
className,
|
|
846
|
-
style,
|
|
847
|
-
...elementProps
|
|
848
|
-
} = componentProps;
|
|
849
|
-
const {
|
|
850
|
-
store
|
|
851
|
-
} = usePopoverRootContext();
|
|
852
|
-
const open = store.useState("open");
|
|
853
|
-
const {
|
|
854
|
-
arrowRef,
|
|
855
|
-
side,
|
|
856
|
-
align,
|
|
857
|
-
arrowUncentered,
|
|
858
|
-
arrowStyles
|
|
859
|
-
} = usePopoverPositionerContext();
|
|
860
|
-
const state = {
|
|
861
|
-
open,
|
|
862
|
-
side,
|
|
863
|
-
align,
|
|
864
|
-
uncentered: arrowUncentered
|
|
865
|
-
};
|
|
866
|
-
const element = useRenderElement("div", componentProps, {
|
|
867
|
-
state,
|
|
868
|
-
ref: [forwardedRef, arrowRef],
|
|
869
|
-
props: [{
|
|
870
|
-
style: arrowStyles,
|
|
871
|
-
"aria-hidden": true
|
|
872
|
-
}, elementProps],
|
|
873
|
-
stateAttributesMapping: popupStateMapping
|
|
874
|
-
});
|
|
875
|
-
return element;
|
|
876
|
-
});
|
|
877
|
-
if (true)
|
|
878
|
-
PopoverArrow.displayName = "PopoverArrow";
|
|
879
|
-
// node_modules/@base-ui/react/esm/popover/backdrop/PopoverBackdrop.js
|
|
880
|
-
import * as React12 from "react";
|
|
881
|
-
"use client";
|
|
882
|
-
var stateAttributesMapping2 = {
|
|
883
|
-
...popupStateMapping,
|
|
884
|
-
...transitionStatusMapping
|
|
885
|
-
};
|
|
886
|
-
var PopoverBackdrop = /* @__PURE__ */ React12.forwardRef(function PopoverBackdrop2(props, forwardedRef) {
|
|
887
|
-
const {
|
|
888
|
-
render,
|
|
889
|
-
className,
|
|
890
|
-
style,
|
|
891
|
-
...elementProps
|
|
892
|
-
} = props;
|
|
893
|
-
const {
|
|
894
|
-
store
|
|
895
|
-
} = usePopoverRootContext();
|
|
896
|
-
const open = store.useState("open");
|
|
897
|
-
const mounted = store.useState("mounted");
|
|
898
|
-
const transitionStatus = store.useState("transitionStatus");
|
|
899
|
-
const openReason = store.useState("openChangeReason");
|
|
900
|
-
const state = {
|
|
901
|
-
open,
|
|
902
|
-
transitionStatus
|
|
903
|
-
};
|
|
904
|
-
const element = useRenderElement("div", props, {
|
|
905
|
-
state,
|
|
906
|
-
ref: [store.context.backdropRef, forwardedRef],
|
|
907
|
-
props: [{
|
|
908
|
-
role: "presentation",
|
|
909
|
-
hidden: !mounted,
|
|
910
|
-
style: {
|
|
911
|
-
pointerEvents: openReason === exports_reason_parts.triggerHover ? "none" : undefined,
|
|
912
|
-
userSelect: "none",
|
|
913
|
-
WebkitUserSelect: "none"
|
|
914
|
-
}
|
|
915
|
-
}, elementProps],
|
|
916
|
-
stateAttributesMapping: stateAttributesMapping2
|
|
917
|
-
});
|
|
918
|
-
return element;
|
|
919
|
-
});
|
|
920
|
-
if (true)
|
|
921
|
-
PopoverBackdrop.displayName = "PopoverBackdrop";
|
|
922
|
-
// node_modules/@base-ui/react/esm/popover/title/PopoverTitle.js
|
|
923
|
-
import * as React13 from "react";
|
|
924
|
-
"use client";
|
|
925
|
-
var PopoverTitle = /* @__PURE__ */ React13.forwardRef(function PopoverTitle2(componentProps, forwardedRef) {
|
|
926
|
-
const {
|
|
927
|
-
render,
|
|
928
|
-
className,
|
|
929
|
-
style,
|
|
930
|
-
...elementProps
|
|
931
|
-
} = componentProps;
|
|
932
|
-
const {
|
|
933
|
-
store
|
|
934
|
-
} = usePopoverRootContext();
|
|
935
|
-
const id = useBaseUiId(elementProps.id);
|
|
936
|
-
store.useSyncedValueWithCleanup("titleElementId", id);
|
|
937
|
-
const element = useRenderElement("h2", componentProps, {
|
|
938
|
-
ref: forwardedRef,
|
|
939
|
-
props: [{
|
|
940
|
-
id
|
|
941
|
-
}, elementProps]
|
|
942
|
-
});
|
|
943
|
-
return element;
|
|
944
|
-
});
|
|
945
|
-
if (true)
|
|
946
|
-
PopoverTitle.displayName = "PopoverTitle";
|
|
947
|
-
// node_modules/@base-ui/react/esm/popover/description/PopoverDescription.js
|
|
948
|
-
import * as React14 from "react";
|
|
949
|
-
"use client";
|
|
950
|
-
var PopoverDescription = /* @__PURE__ */ React14.forwardRef(function PopoverDescription2(componentProps, forwardedRef) {
|
|
951
|
-
const {
|
|
952
|
-
render,
|
|
953
|
-
className,
|
|
954
|
-
style,
|
|
955
|
-
...elementProps
|
|
956
|
-
} = componentProps;
|
|
957
|
-
const {
|
|
958
|
-
store
|
|
959
|
-
} = usePopoverRootContext();
|
|
960
|
-
const id = useBaseUiId(elementProps.id);
|
|
961
|
-
store.useSyncedValueWithCleanup("descriptionElementId", id);
|
|
962
|
-
const element = useRenderElement("p", componentProps, {
|
|
963
|
-
ref: forwardedRef,
|
|
964
|
-
props: [{
|
|
965
|
-
id
|
|
966
|
-
}, elementProps]
|
|
967
|
-
});
|
|
968
|
-
return element;
|
|
969
|
-
});
|
|
970
|
-
if (true)
|
|
971
|
-
PopoverDescription.displayName = "PopoverDescription";
|
|
972
|
-
// node_modules/@base-ui/react/esm/popover/close/PopoverClose.js
|
|
973
|
-
import * as React15 from "react";
|
|
974
|
-
"use client";
|
|
975
|
-
var PopoverClose = /* @__PURE__ */ React15.forwardRef(function PopoverClose2(componentProps, forwardedRef) {
|
|
976
|
-
const {
|
|
977
|
-
render,
|
|
978
|
-
className,
|
|
979
|
-
style,
|
|
980
|
-
disabled = false,
|
|
981
|
-
nativeButton = true,
|
|
982
|
-
...elementProps
|
|
983
|
-
} = componentProps;
|
|
984
|
-
const {
|
|
985
|
-
buttonRef,
|
|
986
|
-
getButtonProps
|
|
987
|
-
} = useButton({
|
|
988
|
-
disabled,
|
|
989
|
-
focusableWhenDisabled: false,
|
|
990
|
-
native: nativeButton
|
|
991
|
-
});
|
|
992
|
-
const {
|
|
993
|
-
store
|
|
994
|
-
} = usePopoverRootContext();
|
|
995
|
-
useClosePartRegistration();
|
|
996
|
-
const element = useRenderElement("button", componentProps, {
|
|
997
|
-
ref: [forwardedRef, buttonRef],
|
|
998
|
-
props: [{
|
|
999
|
-
onClick(event) {
|
|
1000
|
-
store.setOpen(false, createChangeEventDetails(exports_reason_parts.closePress, event.nativeEvent));
|
|
1001
|
-
}
|
|
1002
|
-
}, elementProps, getButtonProps]
|
|
1003
|
-
});
|
|
1004
|
-
return element;
|
|
1005
|
-
});
|
|
1006
|
-
if (true)
|
|
1007
|
-
PopoverClose.displayName = "PopoverClose";
|
|
1008
|
-
// node_modules/@base-ui/react/esm/popover/viewport/PopoverViewport.js
|
|
1009
|
-
import * as React16 from "react";
|
|
1010
|
-
|
|
1011
|
-
// node_modules/@base-ui/react/esm/popover/viewport/PopoverViewportCssVars.js
|
|
1012
|
-
var PopoverViewportCssVars = /* @__PURE__ */ function(PopoverViewportCssVars2) {
|
|
1013
|
-
PopoverViewportCssVars2["popupWidth"] = "--popup-width";
|
|
1014
|
-
PopoverViewportCssVars2["popupHeight"] = "--popup-height";
|
|
1015
|
-
return PopoverViewportCssVars2;
|
|
1016
|
-
}({});
|
|
1017
|
-
|
|
1018
|
-
// node_modules/@base-ui/react/esm/popover/viewport/PopoverViewport.js
|
|
1019
|
-
"use client";
|
|
1020
|
-
var stateAttributesMapping3 = {
|
|
1021
|
-
activationDirection: (value) => value ? {
|
|
1022
|
-
"data-activation-direction": value
|
|
1023
|
-
} : null
|
|
1024
|
-
};
|
|
1025
|
-
var PopoverViewport = /* @__PURE__ */ React16.forwardRef(function PopoverViewport2(componentProps, forwardedRef) {
|
|
1026
|
-
const {
|
|
1027
|
-
render,
|
|
1028
|
-
className,
|
|
1029
|
-
style,
|
|
1030
|
-
children,
|
|
1031
|
-
...elementProps
|
|
1032
|
-
} = componentProps;
|
|
1033
|
-
const {
|
|
1034
|
-
store
|
|
1035
|
-
} = usePopoverRootContext();
|
|
1036
|
-
const {
|
|
1037
|
-
side
|
|
1038
|
-
} = usePopoverPositionerContext();
|
|
1039
|
-
const instantType = store.useState("instantType");
|
|
1040
|
-
const {
|
|
1041
|
-
children: childrenToRender,
|
|
1042
|
-
state: viewportState
|
|
1043
|
-
} = usePopupViewport({
|
|
1044
|
-
store,
|
|
1045
|
-
side,
|
|
1046
|
-
cssVars: PopoverViewportCssVars,
|
|
1047
|
-
children
|
|
1048
|
-
});
|
|
1049
|
-
const state = {
|
|
1050
|
-
activationDirection: viewportState.activationDirection,
|
|
1051
|
-
transitioning: viewportState.transitioning,
|
|
1052
|
-
instant: instantType
|
|
1053
|
-
};
|
|
1054
|
-
return useRenderElement("div", componentProps, {
|
|
1055
|
-
state,
|
|
1056
|
-
ref: forwardedRef,
|
|
1057
|
-
props: [elementProps, {
|
|
1058
|
-
children: childrenToRender
|
|
1059
|
-
}],
|
|
1060
|
-
stateAttributesMapping: stateAttributesMapping3
|
|
1061
|
-
});
|
|
1062
|
-
});
|
|
1063
|
-
if (true)
|
|
1064
|
-
PopoverViewport.displayName = "PopoverViewport";
|
|
1065
|
-
// node_modules/@base-ui/react/esm/popover/store/PopoverHandle.js
|
|
1066
|
-
class PopoverHandle {
|
|
1067
|
-
constructor() {
|
|
1068
|
-
this.store = new PopoverStore;
|
|
1069
|
-
}
|
|
1070
|
-
open(triggerId) {
|
|
1071
|
-
const triggerElement = triggerId ? this.store.context.triggerElements.getById(triggerId) ?? undefined : undefined;
|
|
1072
|
-
if (triggerId && !triggerElement) {
|
|
1073
|
-
throw new Error(`Base UI: PopoverHandle.open: No trigger found with id "${triggerId}".`);
|
|
1074
|
-
}
|
|
1075
|
-
this.store.setOpen(true, createChangeEventDetails(exports_reason_parts.imperativeAction, undefined, triggerElement));
|
|
1076
|
-
}
|
|
1077
|
-
close() {
|
|
1078
|
-
this.store.setOpen(false, createChangeEventDetails(exports_reason_parts.imperativeAction, undefined, undefined));
|
|
1079
|
-
}
|
|
1080
|
-
get isOpen() {
|
|
1081
|
-
return this.store.select("open");
|
|
1082
|
-
}
|
|
1083
|
-
}
|
|
1084
|
-
function createPopoverHandle() {
|
|
1085
|
-
return new PopoverHandle;
|
|
1086
|
-
}
|
|
1087
|
-
export {
|
|
1088
|
-
exports_index_parts as Popover
|
|
1089
|
-
};
|