@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,920 +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
|
-
FloatingPortalLite
|
|
6
|
-
} from "./_chunk-fdzctasg.js";
|
|
7
|
-
import {
|
|
8
|
-
usePopupViewport
|
|
9
|
-
} from "./_chunk-qbezxj1g.js";
|
|
10
|
-
import"./_chunk-m307wpdj.js";
|
|
11
|
-
import {
|
|
12
|
-
adaptiveOrigin,
|
|
13
|
-
getDisabledMountTransitionStyles,
|
|
14
|
-
useAnchorPositioning,
|
|
15
|
-
usePositioner
|
|
16
|
-
} from "./_chunk-fqry7pew.js";
|
|
17
|
-
import"./_chunk-xcqbtm2f.js";
|
|
18
|
-
import"./_chunk-gy0bpkmx.js";
|
|
19
|
-
import {
|
|
20
|
-
createInitialPopupStoreState,
|
|
21
|
-
createPopupFloatingRootContext,
|
|
22
|
-
popupStoreSelectors
|
|
23
|
-
} from "./_chunk-q5cg71p7.js";
|
|
24
|
-
import {
|
|
25
|
-
FOCUSABLE_POPUP_PROPS,
|
|
26
|
-
setOpenTriggerState,
|
|
27
|
-
useImplicitActiveTrigger,
|
|
28
|
-
useOnFirstRender,
|
|
29
|
-
useOpenStateTransitions,
|
|
30
|
-
usePopupInteractionProps,
|
|
31
|
-
usePopupStore,
|
|
32
|
-
useTriggerDataForwarding
|
|
33
|
-
} from "./_chunk-242gh8ph.js";
|
|
34
|
-
import"./_chunk-5gaqyne5.js";
|
|
35
|
-
import {
|
|
36
|
-
CommonTriggerDataAttributes,
|
|
37
|
-
popupStateMapping,
|
|
38
|
-
triggerOpenStateMapping
|
|
39
|
-
} from "./_chunk-t7ppm3t0.js";
|
|
40
|
-
import"./_chunk-3cpd1vjz.js";
|
|
41
|
-
import {
|
|
42
|
-
FloatingDelayGroup,
|
|
43
|
-
POPUP_COLLISION_AVOIDANCE,
|
|
44
|
-
PopupTriggerMap,
|
|
45
|
-
ReactStore,
|
|
46
|
-
createSelector,
|
|
47
|
-
fastComponent,
|
|
48
|
-
fastComponentRef,
|
|
49
|
-
safePolygon,
|
|
50
|
-
useClientPoint,
|
|
51
|
-
useDelayGroup,
|
|
52
|
-
useDismiss,
|
|
53
|
-
useFocus,
|
|
54
|
-
useHoverFloatingInteraction,
|
|
55
|
-
useHoverInteractionSharedState,
|
|
56
|
-
useHoverReferenceInteraction
|
|
57
|
-
} from "./_chunk-2z044bba.js";
|
|
58
|
-
import"./_chunk-1vw45v38.js";
|
|
59
|
-
import {
|
|
60
|
-
contains
|
|
61
|
-
} from "./_chunk-cgptgywc.js";
|
|
62
|
-
import {
|
|
63
|
-
isMouseLikePointerType
|
|
64
|
-
} from "./_chunk-kw8nnq00.js";
|
|
65
|
-
import"./_chunk-rrh8rt4v.js";
|
|
66
|
-
import {
|
|
67
|
-
useTimeout
|
|
68
|
-
} from "./_chunk-b6dkjkbw.js";
|
|
69
|
-
import"./_chunk-dan0mva4.js";
|
|
70
|
-
import"./_chunk-ase0ydtt.js";
|
|
71
|
-
import {
|
|
72
|
-
useValueAsRef
|
|
73
|
-
} from "./_chunk-6kqramh9.js";
|
|
74
|
-
import"./_chunk-451nqgsa.js";
|
|
75
|
-
import {
|
|
76
|
-
createChangeEventDetails,
|
|
77
|
-
exports_reason_parts
|
|
78
|
-
} from "./_chunk-e56mpvk1.js";
|
|
79
|
-
import {
|
|
80
|
-
useBaseUiId
|
|
81
|
-
} from "./_chunk-wdqynnjf.js";
|
|
82
|
-
import {
|
|
83
|
-
transitionStatusMapping,
|
|
84
|
-
useOpenChangeComplete
|
|
85
|
-
} from "./_chunk-e13rsb6b.js";
|
|
86
|
-
import"./_chunk-zk4mtm9m.js";
|
|
87
|
-
import"./_chunk-8a9vv8am.js";
|
|
88
|
-
import"./_chunk-6ejf1z1r.js";
|
|
89
|
-
import {
|
|
90
|
-
isElement
|
|
91
|
-
} from "./_chunk-000kmre8.js";
|
|
92
|
-
import"./_chunk-cwvtvwc7.js";
|
|
93
|
-
import {
|
|
94
|
-
useIsoLayoutEffect
|
|
95
|
-
} from "./_chunk-5tze5c8q.js";
|
|
96
|
-
import {
|
|
97
|
-
useRenderElement
|
|
98
|
-
} from "./_chunk-x8xehj6d.js";
|
|
99
|
-
import {
|
|
100
|
-
__export,
|
|
101
|
-
mergeProps
|
|
102
|
-
} from "./_chunk-svxv97ph.js";
|
|
103
|
-
|
|
104
|
-
// node_modules/@base-ui/react/esm/tooltip/index.parts.js
|
|
105
|
-
var exports_index_parts = {};
|
|
106
|
-
__export(exports_index_parts, {
|
|
107
|
-
createHandle: () => createTooltipHandle,
|
|
108
|
-
Viewport: () => TooltipViewport,
|
|
109
|
-
Trigger: () => TooltipTrigger,
|
|
110
|
-
Root: () => TooltipRoot,
|
|
111
|
-
Provider: () => TooltipProvider,
|
|
112
|
-
Positioner: () => TooltipPositioner,
|
|
113
|
-
Portal: () => TooltipPortal,
|
|
114
|
-
Popup: () => TooltipPopup,
|
|
115
|
-
Handle: () => TooltipHandle,
|
|
116
|
-
Arrow: () => TooltipArrow
|
|
117
|
-
});
|
|
118
|
-
|
|
119
|
-
// node_modules/@base-ui/react/esm/tooltip/root/TooltipRoot.js
|
|
120
|
-
import * as React3 from "react";
|
|
121
|
-
|
|
122
|
-
// node_modules/@base-ui/react/esm/tooltip/root/TooltipRootContext.js
|
|
123
|
-
import * as React from "react";
|
|
124
|
-
"use client";
|
|
125
|
-
var TooltipRootContext = /* @__PURE__ */ React.createContext(undefined);
|
|
126
|
-
if (true)
|
|
127
|
-
TooltipRootContext.displayName = "TooltipRootContext";
|
|
128
|
-
function useTooltipRootContext(optional) {
|
|
129
|
-
const context = React.useContext(TooltipRootContext);
|
|
130
|
-
if (context === undefined && !optional) {
|
|
131
|
-
throw new Error("Base UI: TooltipRootContext is missing. Tooltip parts must be placed within <Tooltip.Root>.");
|
|
132
|
-
}
|
|
133
|
-
return context;
|
|
134
|
-
}
|
|
135
|
-
|
|
136
|
-
// node_modules/@base-ui/react/esm/tooltip/store/TooltipStore.js
|
|
137
|
-
import * as React2 from "react";
|
|
138
|
-
import * as ReactDOM from "react-dom";
|
|
139
|
-
var selectors = {
|
|
140
|
-
...popupStoreSelectors,
|
|
141
|
-
disabled: createSelector((state) => state.disabled),
|
|
142
|
-
instantType: createSelector((state) => state.instantType),
|
|
143
|
-
isInstantPhase: createSelector((state) => state.isInstantPhase),
|
|
144
|
-
trackCursorAxis: createSelector((state) => state.trackCursorAxis),
|
|
145
|
-
disableHoverablePopup: createSelector((state) => state.disableHoverablePopup),
|
|
146
|
-
lastOpenChangeReason: createSelector((state) => state.openChangeReason),
|
|
147
|
-
closeOnClick: createSelector((state) => state.closeOnClick),
|
|
148
|
-
closeDelay: createSelector((state) => state.closeDelay),
|
|
149
|
-
hasViewport: createSelector((state) => state.hasViewport)
|
|
150
|
-
};
|
|
151
|
-
|
|
152
|
-
class TooltipStore extends ReactStore {
|
|
153
|
-
constructor(initialState, floatingId, nested = false) {
|
|
154
|
-
const triggerElements = new PopupTriggerMap;
|
|
155
|
-
const state = {
|
|
156
|
-
...createInitialState(),
|
|
157
|
-
...initialState
|
|
158
|
-
};
|
|
159
|
-
state.floatingRootContext = createPopupFloatingRootContext(triggerElements, floatingId, nested);
|
|
160
|
-
super(state, {
|
|
161
|
-
popupRef: /* @__PURE__ */ React2.createRef(),
|
|
162
|
-
onOpenChange: undefined,
|
|
163
|
-
onOpenChangeComplete: undefined,
|
|
164
|
-
triggerElements
|
|
165
|
-
}, selectors);
|
|
166
|
-
}
|
|
167
|
-
setOpen = (nextOpen, eventDetails) => {
|
|
168
|
-
const reason = eventDetails.reason;
|
|
169
|
-
const isHover = reason === exports_reason_parts.triggerHover;
|
|
170
|
-
const isFocusOpen = nextOpen && reason === exports_reason_parts.triggerFocus;
|
|
171
|
-
const isDismissClose = !nextOpen && (reason === exports_reason_parts.triggerPress || reason === exports_reason_parts.escapeKey);
|
|
172
|
-
eventDetails.preventUnmountOnClose = () => {
|
|
173
|
-
this.set("preventUnmountingOnClose", true);
|
|
174
|
-
};
|
|
175
|
-
this.context.onOpenChange?.(nextOpen, eventDetails);
|
|
176
|
-
if (eventDetails.isCanceled) {
|
|
177
|
-
return;
|
|
178
|
-
}
|
|
179
|
-
this.state.floatingRootContext.dispatchOpenChange(nextOpen, eventDetails);
|
|
180
|
-
const changeState = () => {
|
|
181
|
-
const updatedState = {
|
|
182
|
-
open: nextOpen,
|
|
183
|
-
openChangeReason: reason
|
|
184
|
-
};
|
|
185
|
-
if (isFocusOpen) {
|
|
186
|
-
updatedState.instantType = "focus";
|
|
187
|
-
} else if (isDismissClose) {
|
|
188
|
-
updatedState.instantType = "dismiss";
|
|
189
|
-
} else if (reason === exports_reason_parts.triggerHover) {
|
|
190
|
-
updatedState.instantType = undefined;
|
|
191
|
-
}
|
|
192
|
-
setOpenTriggerState(updatedState, nextOpen, eventDetails.trigger);
|
|
193
|
-
this.update(updatedState);
|
|
194
|
-
};
|
|
195
|
-
if (isHover) {
|
|
196
|
-
ReactDOM.flushSync(changeState);
|
|
197
|
-
} else {
|
|
198
|
-
changeState();
|
|
199
|
-
}
|
|
200
|
-
};
|
|
201
|
-
cancelPendingOpen(event) {
|
|
202
|
-
this.state.floatingRootContext.dispatchOpenChange(false, createChangeEventDetails(exports_reason_parts.triggerPress, event));
|
|
203
|
-
}
|
|
204
|
-
static useStore(externalStore, initialState) {
|
|
205
|
-
const store = usePopupStore(externalStore, (floatingId, nested) => new TooltipStore(initialState, floatingId, nested)).store;
|
|
206
|
-
return store;
|
|
207
|
-
}
|
|
208
|
-
}
|
|
209
|
-
function createInitialState() {
|
|
210
|
-
return {
|
|
211
|
-
...createInitialPopupStoreState(),
|
|
212
|
-
disabled: false,
|
|
213
|
-
instantType: undefined,
|
|
214
|
-
isInstantPhase: false,
|
|
215
|
-
trackCursorAxis: "none",
|
|
216
|
-
disableHoverablePopup: false,
|
|
217
|
-
openChangeReason: null,
|
|
218
|
-
closeOnClick: true,
|
|
219
|
-
closeDelay: 0,
|
|
220
|
-
hasViewport: false
|
|
221
|
-
};
|
|
222
|
-
}
|
|
223
|
-
|
|
224
|
-
// node_modules/@base-ui/react/esm/tooltip/root/TooltipRoot.js
|
|
225
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
226
|
-
"use client";
|
|
227
|
-
var TooltipRoot = fastComponent(function TooltipRoot2(props) {
|
|
228
|
-
const {
|
|
229
|
-
disabled = false,
|
|
230
|
-
defaultOpen = false,
|
|
231
|
-
open: openProp,
|
|
232
|
-
disableHoverablePopup = false,
|
|
233
|
-
trackCursorAxis = "none",
|
|
234
|
-
actionsRef,
|
|
235
|
-
onOpenChange,
|
|
236
|
-
onOpenChangeComplete,
|
|
237
|
-
handle,
|
|
238
|
-
triggerId: triggerIdProp,
|
|
239
|
-
defaultTriggerId: defaultTriggerIdProp = null,
|
|
240
|
-
children
|
|
241
|
-
} = props;
|
|
242
|
-
const store = TooltipStore.useStore(handle?.store, {
|
|
243
|
-
open: defaultOpen,
|
|
244
|
-
openProp,
|
|
245
|
-
activeTriggerId: defaultTriggerIdProp,
|
|
246
|
-
triggerIdProp
|
|
247
|
-
});
|
|
248
|
-
useOnFirstRender(() => {
|
|
249
|
-
if (openProp === undefined && store.state.open === false && defaultOpen === true) {
|
|
250
|
-
store.update({
|
|
251
|
-
open: true,
|
|
252
|
-
activeTriggerId: defaultTriggerIdProp
|
|
253
|
-
});
|
|
254
|
-
}
|
|
255
|
-
});
|
|
256
|
-
store.useControlledProp("openProp", openProp);
|
|
257
|
-
store.useControlledProp("triggerIdProp", triggerIdProp);
|
|
258
|
-
store.useContextCallback("onOpenChange", onOpenChange);
|
|
259
|
-
store.useContextCallback("onOpenChangeComplete", onOpenChangeComplete);
|
|
260
|
-
const openState = store.useState("open");
|
|
261
|
-
const open = !disabled && openState;
|
|
262
|
-
const activeTriggerId = store.useState("activeTriggerId");
|
|
263
|
-
const mounted = store.useState("mounted");
|
|
264
|
-
const payload = store.useState("payload");
|
|
265
|
-
store.useSyncedValues({
|
|
266
|
-
trackCursorAxis,
|
|
267
|
-
disableHoverablePopup
|
|
268
|
-
});
|
|
269
|
-
store.useSyncedValue("disabled", disabled);
|
|
270
|
-
useImplicitActiveTrigger(store);
|
|
271
|
-
const {
|
|
272
|
-
forceUnmount,
|
|
273
|
-
transitionStatus
|
|
274
|
-
} = useOpenStateTransitions(open, store);
|
|
275
|
-
const isInstantPhase = store.useState("isInstantPhase");
|
|
276
|
-
const instantType = store.useState("instantType");
|
|
277
|
-
const lastOpenChangeReason = store.useState("lastOpenChangeReason");
|
|
278
|
-
const previousInstantTypeRef = React3.useRef(null);
|
|
279
|
-
useIsoLayoutEffect(() => {
|
|
280
|
-
if (openState && disabled) {
|
|
281
|
-
store.setOpen(false, createChangeEventDetails(exports_reason_parts.disabled));
|
|
282
|
-
}
|
|
283
|
-
}, [openState, disabled, store]);
|
|
284
|
-
useIsoLayoutEffect(() => {
|
|
285
|
-
if (transitionStatus === "ending" && lastOpenChangeReason === exports_reason_parts.none || transitionStatus !== "ending" && isInstantPhase) {
|
|
286
|
-
if (instantType !== "delay") {
|
|
287
|
-
previousInstantTypeRef.current = instantType;
|
|
288
|
-
}
|
|
289
|
-
store.set("instantType", "delay");
|
|
290
|
-
} else if (previousInstantTypeRef.current !== null) {
|
|
291
|
-
store.set("instantType", previousInstantTypeRef.current);
|
|
292
|
-
previousInstantTypeRef.current = null;
|
|
293
|
-
}
|
|
294
|
-
}, [transitionStatus, isInstantPhase, lastOpenChangeReason, instantType, store]);
|
|
295
|
-
useIsoLayoutEffect(() => {
|
|
296
|
-
if (open) {
|
|
297
|
-
if (activeTriggerId == null) {
|
|
298
|
-
store.set("payload", undefined);
|
|
299
|
-
}
|
|
300
|
-
}
|
|
301
|
-
}, [store, activeTriggerId, open]);
|
|
302
|
-
const handleImperativeClose = React3.useCallback(() => {
|
|
303
|
-
store.setOpen(false, createChangeEventDetails(exports_reason_parts.imperativeAction));
|
|
304
|
-
}, [store]);
|
|
305
|
-
React3.useImperativeHandle(actionsRef, () => ({
|
|
306
|
-
unmount: forceUnmount,
|
|
307
|
-
close: handleImperativeClose
|
|
308
|
-
}), [forceUnmount, handleImperativeClose]);
|
|
309
|
-
const shouldRenderInteractions = open || mounted || !disabled && trackCursorAxis !== "none";
|
|
310
|
-
return /* @__PURE__ */ _jsxs(TooltipRootContext.Provider, {
|
|
311
|
-
value: store,
|
|
312
|
-
children: [shouldRenderInteractions && /* @__PURE__ */ _jsx(TooltipInteractions, {
|
|
313
|
-
store,
|
|
314
|
-
disabled,
|
|
315
|
-
trackCursorAxis
|
|
316
|
-
}), typeof children === "function" ? children({
|
|
317
|
-
payload
|
|
318
|
-
}) : children]
|
|
319
|
-
});
|
|
320
|
-
});
|
|
321
|
-
if (true)
|
|
322
|
-
TooltipRoot.displayName = "TooltipRoot";
|
|
323
|
-
function TooltipInteractions({
|
|
324
|
-
store,
|
|
325
|
-
disabled,
|
|
326
|
-
trackCursorAxis
|
|
327
|
-
}) {
|
|
328
|
-
const floatingRootContext = store.useState("floatingRootContext");
|
|
329
|
-
const dismiss = useDismiss(floatingRootContext, {
|
|
330
|
-
enabled: !disabled,
|
|
331
|
-
referencePress: () => store.select("closeOnClick")
|
|
332
|
-
});
|
|
333
|
-
const clientPoint = useClientPoint(floatingRootContext, {
|
|
334
|
-
enabled: !disabled && trackCursorAxis !== "none",
|
|
335
|
-
axis: trackCursorAxis === "none" ? undefined : trackCursorAxis
|
|
336
|
-
});
|
|
337
|
-
const activeTriggerProps = React3.useMemo(() => mergeProps(clientPoint.reference, dismiss.reference), [clientPoint.reference, dismiss.reference]);
|
|
338
|
-
const inactiveTriggerProps = React3.useMemo(() => mergeProps(clientPoint.trigger, dismiss.trigger), [clientPoint.trigger, dismiss.trigger]);
|
|
339
|
-
const popupProps = React3.useMemo(() => mergeProps(FOCUSABLE_POPUP_PROPS, clientPoint.floating, dismiss.floating), [clientPoint.floating, dismiss.floating]);
|
|
340
|
-
usePopupInteractionProps(store, {
|
|
341
|
-
activeTriggerProps,
|
|
342
|
-
inactiveTriggerProps,
|
|
343
|
-
popupProps
|
|
344
|
-
});
|
|
345
|
-
return null;
|
|
346
|
-
}
|
|
347
|
-
// node_modules/@base-ui/react/esm/tooltip/trigger/TooltipTrigger.js
|
|
348
|
-
import * as React5 from "react";
|
|
349
|
-
|
|
350
|
-
// node_modules/@base-ui/react/esm/tooltip/provider/TooltipProviderContext.js
|
|
351
|
-
import * as React4 from "react";
|
|
352
|
-
"use client";
|
|
353
|
-
var TooltipProviderContext = /* @__PURE__ */ React4.createContext(undefined);
|
|
354
|
-
if (true)
|
|
355
|
-
TooltipProviderContext.displayName = "TooltipProviderContext";
|
|
356
|
-
function useTooltipProviderContext() {
|
|
357
|
-
return React4.useContext(TooltipProviderContext);
|
|
358
|
-
}
|
|
359
|
-
|
|
360
|
-
// node_modules/@base-ui/react/esm/tooltip/trigger/TooltipTriggerDataAttributes.js
|
|
361
|
-
var TooltipTriggerDataAttributes = function(TooltipTriggerDataAttributes2) {
|
|
362
|
-
TooltipTriggerDataAttributes2[TooltipTriggerDataAttributes2["popupOpen"] = CommonTriggerDataAttributes.popupOpen] = "popupOpen";
|
|
363
|
-
TooltipTriggerDataAttributes2["triggerDisabled"] = "data-trigger-disabled";
|
|
364
|
-
return TooltipTriggerDataAttributes2;
|
|
365
|
-
}({});
|
|
366
|
-
|
|
367
|
-
// node_modules/@base-ui/react/esm/tooltip/utils/constants.js
|
|
368
|
-
var OPEN_DELAY = 600;
|
|
369
|
-
|
|
370
|
-
// node_modules/@base-ui/react/esm/tooltip/trigger/TooltipTrigger.js
|
|
371
|
-
"use client";
|
|
372
|
-
var TOOLTIP_TRIGGER_IDENTIFIER = "data-base-ui-tooltip-trigger";
|
|
373
|
-
function getTargetElement(event) {
|
|
374
|
-
if ("composedPath" in event) {
|
|
375
|
-
const path = event.composedPath();
|
|
376
|
-
for (let i = 0;i < path.length; i += 1) {
|
|
377
|
-
const element = path[i];
|
|
378
|
-
if (isElement(element)) {
|
|
379
|
-
return element;
|
|
380
|
-
}
|
|
381
|
-
}
|
|
382
|
-
}
|
|
383
|
-
const target = event.target;
|
|
384
|
-
if (isElement(target)) {
|
|
385
|
-
return target;
|
|
386
|
-
}
|
|
387
|
-
return null;
|
|
388
|
-
}
|
|
389
|
-
function closestEnabledTooltipTrigger(element) {
|
|
390
|
-
let current = element;
|
|
391
|
-
while (current) {
|
|
392
|
-
if (current.hasAttribute(TOOLTIP_TRIGGER_IDENTIFIER)) {
|
|
393
|
-
return current;
|
|
394
|
-
}
|
|
395
|
-
const parentElement = current.parentElement;
|
|
396
|
-
if (parentElement) {
|
|
397
|
-
current = parentElement;
|
|
398
|
-
continue;
|
|
399
|
-
}
|
|
400
|
-
const root = current.getRootNode();
|
|
401
|
-
current = "host" in root && isElement(root.host) ? root.host : null;
|
|
402
|
-
}
|
|
403
|
-
return null;
|
|
404
|
-
}
|
|
405
|
-
var TooltipTrigger = fastComponentRef(function TooltipTrigger2(componentProps, forwardedRef) {
|
|
406
|
-
const {
|
|
407
|
-
render,
|
|
408
|
-
className,
|
|
409
|
-
style,
|
|
410
|
-
handle,
|
|
411
|
-
payload,
|
|
412
|
-
disabled: disabledProp,
|
|
413
|
-
delay,
|
|
414
|
-
closeOnClick = true,
|
|
415
|
-
closeDelay,
|
|
416
|
-
id: idProp,
|
|
417
|
-
...elementProps
|
|
418
|
-
} = componentProps;
|
|
419
|
-
const rootContext = useTooltipRootContext(true);
|
|
420
|
-
const store = handle?.store ?? rootContext;
|
|
421
|
-
if (!store) {
|
|
422
|
-
throw new Error("Base UI: <Tooltip.Trigger> must be either used within a <Tooltip.Root> component or provided with a handle.");
|
|
423
|
-
}
|
|
424
|
-
const thisTriggerId = useBaseUiId(idProp);
|
|
425
|
-
const isTriggerActive = store.useState("isTriggerActive", thisTriggerId);
|
|
426
|
-
const isOpenedByThisTrigger = store.useState("isOpenedByTrigger", thisTriggerId);
|
|
427
|
-
const floatingRootContext = store.useState("floatingRootContext");
|
|
428
|
-
const triggerElementRef = React5.useRef(null);
|
|
429
|
-
const delayWithDefault = delay ?? OPEN_DELAY;
|
|
430
|
-
const closeDelayWithDefault = closeDelay ?? 0;
|
|
431
|
-
const {
|
|
432
|
-
registerTrigger,
|
|
433
|
-
isMountedByThisTrigger
|
|
434
|
-
} = useTriggerDataForwarding(thisTriggerId, triggerElementRef, store, {
|
|
435
|
-
payload,
|
|
436
|
-
closeOnClick,
|
|
437
|
-
closeDelay: closeDelayWithDefault
|
|
438
|
-
});
|
|
439
|
-
const providerContext = useTooltipProviderContext();
|
|
440
|
-
const {
|
|
441
|
-
delayRef,
|
|
442
|
-
isInstantPhase,
|
|
443
|
-
hasProvider
|
|
444
|
-
} = useDelayGroup(floatingRootContext, {
|
|
445
|
-
open: isOpenedByThisTrigger
|
|
446
|
-
});
|
|
447
|
-
const hoverInteraction = useHoverInteractionSharedState(floatingRootContext);
|
|
448
|
-
store.useSyncedValue("isInstantPhase", isInstantPhase);
|
|
449
|
-
const rootDisabled = store.useState("disabled");
|
|
450
|
-
const disabled = disabledProp ?? rootDisabled;
|
|
451
|
-
const disabledRef = useValueAsRef(disabled);
|
|
452
|
-
const trackCursorAxis = store.useState("trackCursorAxis");
|
|
453
|
-
const disableHoverablePopup = store.useState("disableHoverablePopup");
|
|
454
|
-
const isNestedTriggerHoveredRef = React5.useRef(false);
|
|
455
|
-
const nestedTriggerOpenTimeout = useTimeout();
|
|
456
|
-
const pointerTypeRef = React5.useRef(undefined);
|
|
457
|
-
function getOpenDelay() {
|
|
458
|
-
const providerDelay = providerContext?.delay;
|
|
459
|
-
const groupOpenValue = typeof delayRef.current === "object" ? delayRef.current.open : undefined;
|
|
460
|
-
let computedOpenDelay = delayWithDefault;
|
|
461
|
-
if (hasProvider) {
|
|
462
|
-
if (groupOpenValue !== 0) {
|
|
463
|
-
computedOpenDelay = delay ?? providerDelay ?? delayWithDefault;
|
|
464
|
-
} else {
|
|
465
|
-
computedOpenDelay = 0;
|
|
466
|
-
}
|
|
467
|
-
}
|
|
468
|
-
return computedOpenDelay;
|
|
469
|
-
}
|
|
470
|
-
function isEnabledNestedTriggerTarget(target) {
|
|
471
|
-
const triggerEl = triggerElementRef.current;
|
|
472
|
-
if (!triggerEl || !target) {
|
|
473
|
-
return false;
|
|
474
|
-
}
|
|
475
|
-
const nearestTrigger = closestEnabledTooltipTrigger(target);
|
|
476
|
-
return nearestTrigger !== null && nearestTrigger !== triggerEl && contains(triggerEl, nearestTrigger);
|
|
477
|
-
}
|
|
478
|
-
function detectNestedTriggerHover(target) {
|
|
479
|
-
const nestedTriggerHovered = isEnabledNestedTriggerTarget(target);
|
|
480
|
-
isNestedTriggerHoveredRef.current = nestedTriggerHovered;
|
|
481
|
-
if (nestedTriggerHovered) {
|
|
482
|
-
hoverInteraction.openChangeTimeout.clear();
|
|
483
|
-
hoverInteraction.restTimeout.clear();
|
|
484
|
-
hoverInteraction.restTimeoutPending = false;
|
|
485
|
-
nestedTriggerOpenTimeout.clear();
|
|
486
|
-
}
|
|
487
|
-
return nestedTriggerHovered;
|
|
488
|
-
}
|
|
489
|
-
const hoverProps = useHoverReferenceInteraction(floatingRootContext, {
|
|
490
|
-
enabled: !disabled,
|
|
491
|
-
mouseOnly: true,
|
|
492
|
-
move: false,
|
|
493
|
-
handleClose: !disableHoverablePopup && trackCursorAxis !== "both" ? safePolygon() : null,
|
|
494
|
-
restMs: getOpenDelay,
|
|
495
|
-
delay() {
|
|
496
|
-
const closeValue = typeof delayRef.current === "object" ? delayRef.current.close : undefined;
|
|
497
|
-
let computedCloseDelay = closeDelayWithDefault;
|
|
498
|
-
if (closeDelay == null && hasProvider) {
|
|
499
|
-
computedCloseDelay = closeValue;
|
|
500
|
-
}
|
|
501
|
-
return {
|
|
502
|
-
close: computedCloseDelay
|
|
503
|
-
};
|
|
504
|
-
},
|
|
505
|
-
triggerElementRef,
|
|
506
|
-
isActiveTrigger: isTriggerActive,
|
|
507
|
-
isClosing: () => store.select("transitionStatus") === "ending",
|
|
508
|
-
shouldOpen() {
|
|
509
|
-
return !isNestedTriggerHoveredRef.current;
|
|
510
|
-
}
|
|
511
|
-
});
|
|
512
|
-
const focusProps = useFocus(floatingRootContext, {
|
|
513
|
-
enabled: !disabled
|
|
514
|
-
}).reference;
|
|
515
|
-
const handleNestedTriggerHover = (event) => {
|
|
516
|
-
const wasNestedTriggerHovered = isNestedTriggerHoveredRef.current;
|
|
517
|
-
const target = getTargetElement(event);
|
|
518
|
-
const nestedTriggerHovered = detectNestedTriggerHover(target);
|
|
519
|
-
const triggerEl = triggerElementRef.current;
|
|
520
|
-
const targetInsideTrigger = triggerEl && target && contains(triggerEl, target);
|
|
521
|
-
if (nestedTriggerHovered && store.select("open") && store.select("lastOpenChangeReason") === exports_reason_parts.triggerHover) {
|
|
522
|
-
store.setOpen(false, createChangeEventDetails(exports_reason_parts.triggerHover, event));
|
|
523
|
-
return;
|
|
524
|
-
}
|
|
525
|
-
if (wasNestedTriggerHovered && !nestedTriggerHovered && targetInsideTrigger && !disabledRef.current && !store.select("open") && triggerEl && isMouseLikePointerType(pointerTypeRef.current)) {
|
|
526
|
-
const open = () => {
|
|
527
|
-
if (!isNestedTriggerHoveredRef.current && !disabledRef.current && !store.select("open")) {
|
|
528
|
-
store.setOpen(true, createChangeEventDetails(exports_reason_parts.triggerHover, event, triggerEl));
|
|
529
|
-
}
|
|
530
|
-
};
|
|
531
|
-
const openDelay = getOpenDelay();
|
|
532
|
-
if (openDelay === 0) {
|
|
533
|
-
nestedTriggerOpenTimeout.clear();
|
|
534
|
-
open();
|
|
535
|
-
} else {
|
|
536
|
-
nestedTriggerOpenTimeout.start(openDelay, open);
|
|
537
|
-
}
|
|
538
|
-
}
|
|
539
|
-
};
|
|
540
|
-
const rootTriggerProps = store.useState("triggerProps", isMountedByThisTrigger);
|
|
541
|
-
const shouldApplyRootTriggerProps = isMountedByThisTrigger || trackCursorAxis !== "none";
|
|
542
|
-
const state = {
|
|
543
|
-
open: isOpenedByThisTrigger
|
|
544
|
-
};
|
|
545
|
-
const element = useRenderElement("button", componentProps, {
|
|
546
|
-
state,
|
|
547
|
-
ref: [forwardedRef, registerTrigger, triggerElementRef],
|
|
548
|
-
props: [hoverProps, focusProps, shouldApplyRootTriggerProps ? rootTriggerProps : undefined, {
|
|
549
|
-
onMouseOver(event) {
|
|
550
|
-
handleNestedTriggerHover(event.nativeEvent);
|
|
551
|
-
},
|
|
552
|
-
onFocus(event) {
|
|
553
|
-
if (isEnabledNestedTriggerTarget(getTargetElement(event.nativeEvent))) {
|
|
554
|
-
event.preventBaseUIHandler();
|
|
555
|
-
}
|
|
556
|
-
},
|
|
557
|
-
onMouseLeave() {
|
|
558
|
-
isNestedTriggerHoveredRef.current = false;
|
|
559
|
-
nestedTriggerOpenTimeout.clear();
|
|
560
|
-
pointerTypeRef.current = undefined;
|
|
561
|
-
},
|
|
562
|
-
onPointerEnter(event) {
|
|
563
|
-
pointerTypeRef.current = event.pointerType;
|
|
564
|
-
},
|
|
565
|
-
onPointerDown(event) {
|
|
566
|
-
pointerTypeRef.current = event.pointerType;
|
|
567
|
-
store.set("closeOnClick", closeOnClick);
|
|
568
|
-
if (closeOnClick && !store.select("open")) {
|
|
569
|
-
store.cancelPendingOpen(event.nativeEvent);
|
|
570
|
-
}
|
|
571
|
-
},
|
|
572
|
-
onClick(event) {
|
|
573
|
-
if (closeOnClick && !store.select("open")) {
|
|
574
|
-
store.cancelPendingOpen(event.nativeEvent);
|
|
575
|
-
}
|
|
576
|
-
},
|
|
577
|
-
id: thisTriggerId,
|
|
578
|
-
[TooltipTriggerDataAttributes.triggerDisabled]: disabled ? "" : undefined,
|
|
579
|
-
[TOOLTIP_TRIGGER_IDENTIFIER]: disabled ? undefined : ""
|
|
580
|
-
}, elementProps],
|
|
581
|
-
stateAttributesMapping: triggerOpenStateMapping
|
|
582
|
-
});
|
|
583
|
-
return element;
|
|
584
|
-
});
|
|
585
|
-
if (true)
|
|
586
|
-
TooltipTrigger.displayName = "TooltipTrigger";
|
|
587
|
-
// node_modules/@base-ui/react/esm/tooltip/portal/TooltipPortal.js
|
|
588
|
-
import * as React7 from "react";
|
|
589
|
-
|
|
590
|
-
// node_modules/@base-ui/react/esm/tooltip/portal/TooltipPortalContext.js
|
|
591
|
-
import * as React6 from "react";
|
|
592
|
-
"use client";
|
|
593
|
-
var TooltipPortalContext = /* @__PURE__ */ React6.createContext(undefined);
|
|
594
|
-
if (true)
|
|
595
|
-
TooltipPortalContext.displayName = "TooltipPortalContext";
|
|
596
|
-
function useTooltipPortalContext() {
|
|
597
|
-
const value = React6.useContext(TooltipPortalContext);
|
|
598
|
-
if (value === undefined) {
|
|
599
|
-
throw new Error("Base UI: <Tooltip.Portal> is missing.");
|
|
600
|
-
}
|
|
601
|
-
return value;
|
|
602
|
-
}
|
|
603
|
-
|
|
604
|
-
// node_modules/@base-ui/react/esm/tooltip/portal/TooltipPortal.js
|
|
605
|
-
import { jsx as _jsx2 } from "react/jsx-runtime";
|
|
606
|
-
"use client";
|
|
607
|
-
var TooltipPortal = /* @__PURE__ */ React7.forwardRef(function TooltipPortal2(props, forwardedRef) {
|
|
608
|
-
const {
|
|
609
|
-
keepMounted = false,
|
|
610
|
-
...portalProps
|
|
611
|
-
} = props;
|
|
612
|
-
const store = useTooltipRootContext();
|
|
613
|
-
const mounted = store.useState("mounted");
|
|
614
|
-
const shouldRender = mounted || keepMounted;
|
|
615
|
-
if (!shouldRender) {
|
|
616
|
-
return null;
|
|
617
|
-
}
|
|
618
|
-
return /* @__PURE__ */ _jsx2(TooltipPortalContext.Provider, {
|
|
619
|
-
value: keepMounted,
|
|
620
|
-
children: /* @__PURE__ */ _jsx2(FloatingPortalLite, {
|
|
621
|
-
ref: forwardedRef,
|
|
622
|
-
...portalProps
|
|
623
|
-
})
|
|
624
|
-
});
|
|
625
|
-
});
|
|
626
|
-
if (true)
|
|
627
|
-
TooltipPortal.displayName = "TooltipPortal";
|
|
628
|
-
// node_modules/@base-ui/react/esm/tooltip/positioner/TooltipPositioner.js
|
|
629
|
-
import * as React9 from "react";
|
|
630
|
-
|
|
631
|
-
// node_modules/@base-ui/react/esm/tooltip/positioner/TooltipPositionerContext.js
|
|
632
|
-
import * as React8 from "react";
|
|
633
|
-
"use client";
|
|
634
|
-
var TooltipPositionerContext = /* @__PURE__ */ React8.createContext(undefined);
|
|
635
|
-
if (true)
|
|
636
|
-
TooltipPositionerContext.displayName = "TooltipPositionerContext";
|
|
637
|
-
function useTooltipPositionerContext() {
|
|
638
|
-
const context = React8.useContext(TooltipPositionerContext);
|
|
639
|
-
if (context === undefined) {
|
|
640
|
-
throw new Error("Base UI: TooltipPositionerContext is missing. TooltipPositioner parts must be placed within <Tooltip.Positioner>.");
|
|
641
|
-
}
|
|
642
|
-
return context;
|
|
643
|
-
}
|
|
644
|
-
|
|
645
|
-
// node_modules/@base-ui/react/esm/tooltip/positioner/TooltipPositioner.js
|
|
646
|
-
import { jsx as _jsx3 } from "react/jsx-runtime";
|
|
647
|
-
"use client";
|
|
648
|
-
var TooltipPositioner = /* @__PURE__ */ React9.forwardRef(function TooltipPositioner2(componentProps, forwardedRef) {
|
|
649
|
-
const {
|
|
650
|
-
render,
|
|
651
|
-
className,
|
|
652
|
-
anchor,
|
|
653
|
-
positionMethod = "absolute",
|
|
654
|
-
side = "top",
|
|
655
|
-
align = "center",
|
|
656
|
-
sideOffset = 0,
|
|
657
|
-
alignOffset = 0,
|
|
658
|
-
collisionBoundary = "clipping-ancestors",
|
|
659
|
-
collisionPadding = 5,
|
|
660
|
-
arrowPadding = 5,
|
|
661
|
-
sticky = false,
|
|
662
|
-
disableAnchorTracking = false,
|
|
663
|
-
collisionAvoidance = POPUP_COLLISION_AVOIDANCE,
|
|
664
|
-
style,
|
|
665
|
-
...elementProps
|
|
666
|
-
} = componentProps;
|
|
667
|
-
const store = useTooltipRootContext();
|
|
668
|
-
const keepMounted = useTooltipPortalContext();
|
|
669
|
-
const open = store.useState("open");
|
|
670
|
-
const mounted = store.useState("mounted");
|
|
671
|
-
const trackCursorAxis = store.useState("trackCursorAxis");
|
|
672
|
-
const disableHoverablePopup = store.useState("disableHoverablePopup");
|
|
673
|
-
const floatingRootContext = store.useState("floatingRootContext");
|
|
674
|
-
const instantType = store.useState("instantType");
|
|
675
|
-
const transitionStatus = store.useState("transitionStatus");
|
|
676
|
-
const hasViewport = store.useState("hasViewport");
|
|
677
|
-
const positioning = useAnchorPositioning({
|
|
678
|
-
anchor,
|
|
679
|
-
positionMethod,
|
|
680
|
-
floatingRootContext,
|
|
681
|
-
mounted,
|
|
682
|
-
side,
|
|
683
|
-
sideOffset,
|
|
684
|
-
align,
|
|
685
|
-
alignOffset,
|
|
686
|
-
collisionBoundary,
|
|
687
|
-
collisionPadding,
|
|
688
|
-
sticky,
|
|
689
|
-
arrowPadding,
|
|
690
|
-
disableAnchorTracking,
|
|
691
|
-
keepMounted,
|
|
692
|
-
collisionAvoidance,
|
|
693
|
-
adaptiveOrigin: hasViewport ? adaptiveOrigin : undefined
|
|
694
|
-
});
|
|
695
|
-
const state = React9.useMemo(() => ({
|
|
696
|
-
open,
|
|
697
|
-
side: positioning.side,
|
|
698
|
-
align: positioning.align,
|
|
699
|
-
anchorHidden: positioning.anchorHidden,
|
|
700
|
-
instant: trackCursorAxis !== "none" ? "tracking-cursor" : instantType
|
|
701
|
-
}), [open, positioning.side, positioning.align, positioning.anchorHidden, trackCursorAxis, instantType]);
|
|
702
|
-
const element = usePositioner(componentProps, state, {
|
|
703
|
-
styles: positioning.positionerStyles,
|
|
704
|
-
transitionStatus,
|
|
705
|
-
props: elementProps,
|
|
706
|
-
refs: [forwardedRef, store.useStateSetter("positionerElement")],
|
|
707
|
-
hidden: !mounted,
|
|
708
|
-
inert: !open || trackCursorAxis === "both" || disableHoverablePopup
|
|
709
|
-
});
|
|
710
|
-
return /* @__PURE__ */ _jsx3(TooltipPositionerContext.Provider, {
|
|
711
|
-
value: positioning,
|
|
712
|
-
children: element
|
|
713
|
-
});
|
|
714
|
-
});
|
|
715
|
-
if (true)
|
|
716
|
-
TooltipPositioner.displayName = "TooltipPositioner";
|
|
717
|
-
// node_modules/@base-ui/react/esm/tooltip/popup/TooltipPopup.js
|
|
718
|
-
import * as React10 from "react";
|
|
719
|
-
"use client";
|
|
720
|
-
var stateAttributesMapping = {
|
|
721
|
-
...popupStateMapping,
|
|
722
|
-
...transitionStatusMapping
|
|
723
|
-
};
|
|
724
|
-
var TooltipPopup = /* @__PURE__ */ React10.forwardRef(function TooltipPopup2(componentProps, forwardedRef) {
|
|
725
|
-
const {
|
|
726
|
-
render,
|
|
727
|
-
className,
|
|
728
|
-
style,
|
|
729
|
-
...elementProps
|
|
730
|
-
} = componentProps;
|
|
731
|
-
const store = useTooltipRootContext();
|
|
732
|
-
const {
|
|
733
|
-
side,
|
|
734
|
-
align
|
|
735
|
-
} = useTooltipPositionerContext();
|
|
736
|
-
const open = store.useState("open");
|
|
737
|
-
const instantType = store.useState("instantType");
|
|
738
|
-
const transitionStatus = store.useState("transitionStatus");
|
|
739
|
-
const popupProps = store.useState("popupProps");
|
|
740
|
-
const floatingContext = store.useState("floatingRootContext");
|
|
741
|
-
const disabled = store.useState("disabled");
|
|
742
|
-
const closeDelay = store.useState("closeDelay");
|
|
743
|
-
useOpenChangeComplete({
|
|
744
|
-
open,
|
|
745
|
-
ref: store.context.popupRef,
|
|
746
|
-
onComplete() {
|
|
747
|
-
if (open) {
|
|
748
|
-
store.context.onOpenChangeComplete?.(true);
|
|
749
|
-
}
|
|
750
|
-
}
|
|
751
|
-
});
|
|
752
|
-
useHoverFloatingInteraction(floatingContext, {
|
|
753
|
-
enabled: !disabled,
|
|
754
|
-
closeDelay
|
|
755
|
-
});
|
|
756
|
-
const setPopupElement = store.useStateSetter("popupElement");
|
|
757
|
-
const state = {
|
|
758
|
-
open,
|
|
759
|
-
side,
|
|
760
|
-
align,
|
|
761
|
-
instant: instantType,
|
|
762
|
-
transitionStatus
|
|
763
|
-
};
|
|
764
|
-
const element = useRenderElement("div", componentProps, {
|
|
765
|
-
state,
|
|
766
|
-
ref: [forwardedRef, store.context.popupRef, setPopupElement],
|
|
767
|
-
props: [popupProps, getDisabledMountTransitionStyles(transitionStatus), elementProps],
|
|
768
|
-
stateAttributesMapping
|
|
769
|
-
});
|
|
770
|
-
return element;
|
|
771
|
-
});
|
|
772
|
-
if (true)
|
|
773
|
-
TooltipPopup.displayName = "TooltipPopup";
|
|
774
|
-
// node_modules/@base-ui/react/esm/tooltip/arrow/TooltipArrow.js
|
|
775
|
-
import * as React11 from "react";
|
|
776
|
-
"use client";
|
|
777
|
-
var TooltipArrow = /* @__PURE__ */ React11.forwardRef(function TooltipArrow2(componentProps, forwardedRef) {
|
|
778
|
-
const {
|
|
779
|
-
render,
|
|
780
|
-
className,
|
|
781
|
-
style,
|
|
782
|
-
...elementProps
|
|
783
|
-
} = componentProps;
|
|
784
|
-
const store = useTooltipRootContext();
|
|
785
|
-
const {
|
|
786
|
-
arrowRef,
|
|
787
|
-
side,
|
|
788
|
-
align,
|
|
789
|
-
arrowUncentered,
|
|
790
|
-
arrowStyles
|
|
791
|
-
} = useTooltipPositionerContext();
|
|
792
|
-
const open = store.useState("open");
|
|
793
|
-
const instantType = store.useState("instantType");
|
|
794
|
-
const state = {
|
|
795
|
-
open,
|
|
796
|
-
side,
|
|
797
|
-
align,
|
|
798
|
-
uncentered: arrowUncentered,
|
|
799
|
-
instant: instantType
|
|
800
|
-
};
|
|
801
|
-
const element = useRenderElement("div", componentProps, {
|
|
802
|
-
state,
|
|
803
|
-
ref: [forwardedRef, arrowRef],
|
|
804
|
-
props: [{
|
|
805
|
-
style: arrowStyles,
|
|
806
|
-
"aria-hidden": true
|
|
807
|
-
}, elementProps],
|
|
808
|
-
stateAttributesMapping: popupStateMapping
|
|
809
|
-
});
|
|
810
|
-
return element;
|
|
811
|
-
});
|
|
812
|
-
if (true)
|
|
813
|
-
TooltipArrow.displayName = "TooltipArrow";
|
|
814
|
-
// node_modules/@base-ui/react/esm/tooltip/provider/TooltipProvider.js
|
|
815
|
-
import * as React12 from "react";
|
|
816
|
-
import { jsx as _jsx4 } from "react/jsx-runtime";
|
|
817
|
-
"use client";
|
|
818
|
-
var TooltipProvider = function TooltipProvider2(props) {
|
|
819
|
-
const {
|
|
820
|
-
delay,
|
|
821
|
-
closeDelay,
|
|
822
|
-
timeout = 400
|
|
823
|
-
} = props;
|
|
824
|
-
const contextValue = React12.useMemo(() => ({
|
|
825
|
-
delay,
|
|
826
|
-
closeDelay
|
|
827
|
-
}), [delay, closeDelay]);
|
|
828
|
-
const delayValue = React12.useMemo(() => ({
|
|
829
|
-
open: delay,
|
|
830
|
-
close: closeDelay
|
|
831
|
-
}), [delay, closeDelay]);
|
|
832
|
-
return /* @__PURE__ */ _jsx4(TooltipProviderContext.Provider, {
|
|
833
|
-
value: contextValue,
|
|
834
|
-
children: /* @__PURE__ */ _jsx4(FloatingDelayGroup, {
|
|
835
|
-
delay: delayValue,
|
|
836
|
-
timeoutMs: timeout,
|
|
837
|
-
children: props.children
|
|
838
|
-
})
|
|
839
|
-
});
|
|
840
|
-
};
|
|
841
|
-
if (true)
|
|
842
|
-
TooltipProvider.displayName = "TooltipProvider";
|
|
843
|
-
// node_modules/@base-ui/react/esm/tooltip/viewport/TooltipViewport.js
|
|
844
|
-
import * as React13 from "react";
|
|
845
|
-
|
|
846
|
-
// node_modules/@base-ui/react/esm/tooltip/viewport/TooltipViewportCssVars.js
|
|
847
|
-
var TooltipViewportCssVars = /* @__PURE__ */ function(TooltipViewportCssVars2) {
|
|
848
|
-
TooltipViewportCssVars2["popupWidth"] = "--popup-width";
|
|
849
|
-
TooltipViewportCssVars2["popupHeight"] = "--popup-height";
|
|
850
|
-
return TooltipViewportCssVars2;
|
|
851
|
-
}({});
|
|
852
|
-
|
|
853
|
-
// node_modules/@base-ui/react/esm/tooltip/viewport/TooltipViewport.js
|
|
854
|
-
"use client";
|
|
855
|
-
var stateAttributesMapping2 = {
|
|
856
|
-
activationDirection: (value) => value ? {
|
|
857
|
-
"data-activation-direction": value
|
|
858
|
-
} : null
|
|
859
|
-
};
|
|
860
|
-
var TooltipViewport = /* @__PURE__ */ React13.forwardRef(function TooltipViewport2(componentProps, forwardedRef) {
|
|
861
|
-
const {
|
|
862
|
-
render,
|
|
863
|
-
className,
|
|
864
|
-
style,
|
|
865
|
-
children,
|
|
866
|
-
...elementProps
|
|
867
|
-
} = componentProps;
|
|
868
|
-
const store = useTooltipRootContext();
|
|
869
|
-
const positioner = useTooltipPositionerContext();
|
|
870
|
-
const instantType = store.useState("instantType");
|
|
871
|
-
const {
|
|
872
|
-
children: childrenToRender,
|
|
873
|
-
state: viewportState
|
|
874
|
-
} = usePopupViewport({
|
|
875
|
-
store,
|
|
876
|
-
side: positioner.side,
|
|
877
|
-
cssVars: TooltipViewportCssVars,
|
|
878
|
-
children
|
|
879
|
-
});
|
|
880
|
-
const state = {
|
|
881
|
-
activationDirection: viewportState.activationDirection,
|
|
882
|
-
transitioning: viewportState.transitioning,
|
|
883
|
-
instant: instantType
|
|
884
|
-
};
|
|
885
|
-
return useRenderElement("div", componentProps, {
|
|
886
|
-
state,
|
|
887
|
-
ref: forwardedRef,
|
|
888
|
-
props: [elementProps, {
|
|
889
|
-
children: childrenToRender
|
|
890
|
-
}],
|
|
891
|
-
stateAttributesMapping: stateAttributesMapping2
|
|
892
|
-
});
|
|
893
|
-
});
|
|
894
|
-
if (true)
|
|
895
|
-
TooltipViewport.displayName = "TooltipViewport";
|
|
896
|
-
// node_modules/@base-ui/react/esm/tooltip/store/TooltipHandle.js
|
|
897
|
-
class TooltipHandle {
|
|
898
|
-
constructor() {
|
|
899
|
-
this.store = new TooltipStore;
|
|
900
|
-
}
|
|
901
|
-
open(triggerId) {
|
|
902
|
-
const triggerElement = triggerId ? this.store.context.triggerElements.getById(triggerId) : undefined;
|
|
903
|
-
if (triggerId && !triggerElement) {
|
|
904
|
-
throw new Error(`Base UI: TooltipHandle.open: No trigger found with id "${triggerId}".`);
|
|
905
|
-
}
|
|
906
|
-
this.store.setOpen(true, createChangeEventDetails(exports_reason_parts.imperativeAction, undefined, triggerElement));
|
|
907
|
-
}
|
|
908
|
-
close() {
|
|
909
|
-
this.store.setOpen(false, createChangeEventDetails(exports_reason_parts.imperativeAction, undefined, undefined));
|
|
910
|
-
}
|
|
911
|
-
get isOpen() {
|
|
912
|
-
return this.store.select("open");
|
|
913
|
-
}
|
|
914
|
-
}
|
|
915
|
-
function createTooltipHandle() {
|
|
916
|
-
return new TooltipHandle;
|
|
917
|
-
}
|
|
918
|
-
export {
|
|
919
|
-
exports_index_parts as Tooltip
|
|
920
|
-
};
|