@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,546 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
ARROW_DOWN,
|
|
3
|
-
ARROW_LEFT,
|
|
4
|
-
ARROW_RIGHT,
|
|
5
|
-
ARROW_UP,
|
|
6
|
-
isAndroid,
|
|
7
|
-
isJSDOM
|
|
8
|
-
} from "./_chunk-rrh8rt4v.js";
|
|
9
|
-
import {
|
|
10
|
-
getComputedStyle
|
|
11
|
-
} from "./_chunk-000kmre8.js";
|
|
12
|
-
|
|
13
|
-
// node_modules/@base-ui/react/esm/floating-ui-react/utils/event.js
|
|
14
|
-
function stopEvent(event) {
|
|
15
|
-
event.preventDefault();
|
|
16
|
-
event.stopPropagation();
|
|
17
|
-
}
|
|
18
|
-
function isReactEvent(event) {
|
|
19
|
-
return "nativeEvent" in event;
|
|
20
|
-
}
|
|
21
|
-
function isVirtualClick(event) {
|
|
22
|
-
if (event.pointerType === "" && event.isTrusted) {
|
|
23
|
-
return true;
|
|
24
|
-
}
|
|
25
|
-
if (isAndroid && event.pointerType) {
|
|
26
|
-
return event.type === "click" && event.buttons === 1;
|
|
27
|
-
}
|
|
28
|
-
return event.detail === 0 && !event.pointerType;
|
|
29
|
-
}
|
|
30
|
-
function isVirtualPointerEvent(event) {
|
|
31
|
-
if (isJSDOM) {
|
|
32
|
-
return false;
|
|
33
|
-
}
|
|
34
|
-
return !isAndroid && event.width === 0 && event.height === 0 || isAndroid && event.width === 1 && event.height === 1 && event.pressure === 0 && event.detail === 0 && event.pointerType === "mouse" || event.width < 1 && event.height < 1 && event.pressure === 0 && event.detail === 0 && event.pointerType === "touch";
|
|
35
|
-
}
|
|
36
|
-
function isMouseLikePointerType(pointerType, strict) {
|
|
37
|
-
const values = ["mouse", "pen"];
|
|
38
|
-
if (!strict) {
|
|
39
|
-
values.push("", undefined);
|
|
40
|
-
}
|
|
41
|
-
return values.includes(pointerType);
|
|
42
|
-
}
|
|
43
|
-
function isClickLikeEvent(event) {
|
|
44
|
-
const type = event.type;
|
|
45
|
-
return type === "click" || type === "mousedown" || type === "keydown" || type === "keyup";
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
// node_modules/@floating-ui/utils/dist/floating-ui.utils.mjs
|
|
49
|
-
var sides = ["top", "right", "bottom", "left"];
|
|
50
|
-
var min = Math.min;
|
|
51
|
-
var max = Math.max;
|
|
52
|
-
var round = Math.round;
|
|
53
|
-
var floor = Math.floor;
|
|
54
|
-
var createCoords = (v) => ({
|
|
55
|
-
x: v,
|
|
56
|
-
y: v
|
|
57
|
-
});
|
|
58
|
-
var oppositeSideMap = {
|
|
59
|
-
left: "right",
|
|
60
|
-
right: "left",
|
|
61
|
-
bottom: "top",
|
|
62
|
-
top: "bottom"
|
|
63
|
-
};
|
|
64
|
-
function clamp(start, value, end) {
|
|
65
|
-
return max(start, min(value, end));
|
|
66
|
-
}
|
|
67
|
-
function evaluate(value, param) {
|
|
68
|
-
return typeof value === "function" ? value(param) : value;
|
|
69
|
-
}
|
|
70
|
-
function getSide(placement) {
|
|
71
|
-
return placement.split("-")[0];
|
|
72
|
-
}
|
|
73
|
-
function getAlignment(placement) {
|
|
74
|
-
return placement.split("-")[1];
|
|
75
|
-
}
|
|
76
|
-
function getOppositeAxis(axis) {
|
|
77
|
-
return axis === "x" ? "y" : "x";
|
|
78
|
-
}
|
|
79
|
-
function getAxisLength(axis) {
|
|
80
|
-
return axis === "y" ? "height" : "width";
|
|
81
|
-
}
|
|
82
|
-
function getSideAxis(placement) {
|
|
83
|
-
const firstChar = placement[0];
|
|
84
|
-
return firstChar === "t" || firstChar === "b" ? "y" : "x";
|
|
85
|
-
}
|
|
86
|
-
function getAlignmentAxis(placement) {
|
|
87
|
-
return getOppositeAxis(getSideAxis(placement));
|
|
88
|
-
}
|
|
89
|
-
function getAlignmentSides(placement, rects, rtl) {
|
|
90
|
-
if (rtl === undefined) {
|
|
91
|
-
rtl = false;
|
|
92
|
-
}
|
|
93
|
-
const alignment = getAlignment(placement);
|
|
94
|
-
const alignmentAxis = getAlignmentAxis(placement);
|
|
95
|
-
const length = getAxisLength(alignmentAxis);
|
|
96
|
-
let mainAlignmentSide = alignmentAxis === "x" ? alignment === (rtl ? "end" : "start") ? "right" : "left" : alignment === "start" ? "bottom" : "top";
|
|
97
|
-
if (rects.reference[length] > rects.floating[length]) {
|
|
98
|
-
mainAlignmentSide = getOppositePlacement(mainAlignmentSide);
|
|
99
|
-
}
|
|
100
|
-
return [mainAlignmentSide, getOppositePlacement(mainAlignmentSide)];
|
|
101
|
-
}
|
|
102
|
-
function getExpandedPlacements(placement) {
|
|
103
|
-
const oppositePlacement = getOppositePlacement(placement);
|
|
104
|
-
return [getOppositeAlignmentPlacement(placement), oppositePlacement, getOppositeAlignmentPlacement(oppositePlacement)];
|
|
105
|
-
}
|
|
106
|
-
function getOppositeAlignmentPlacement(placement) {
|
|
107
|
-
return placement.includes("start") ? placement.replace("start", "end") : placement.replace("end", "start");
|
|
108
|
-
}
|
|
109
|
-
var lrPlacement = ["left", "right"];
|
|
110
|
-
var rlPlacement = ["right", "left"];
|
|
111
|
-
var tbPlacement = ["top", "bottom"];
|
|
112
|
-
var btPlacement = ["bottom", "top"];
|
|
113
|
-
function getSideList(side, isStart, rtl) {
|
|
114
|
-
switch (side) {
|
|
115
|
-
case "top":
|
|
116
|
-
case "bottom":
|
|
117
|
-
if (rtl)
|
|
118
|
-
return isStart ? rlPlacement : lrPlacement;
|
|
119
|
-
return isStart ? lrPlacement : rlPlacement;
|
|
120
|
-
case "left":
|
|
121
|
-
case "right":
|
|
122
|
-
return isStart ? tbPlacement : btPlacement;
|
|
123
|
-
default:
|
|
124
|
-
return [];
|
|
125
|
-
}
|
|
126
|
-
}
|
|
127
|
-
function getOppositeAxisPlacements(placement, flipAlignment, direction, rtl) {
|
|
128
|
-
const alignment = getAlignment(placement);
|
|
129
|
-
let list = getSideList(getSide(placement), direction === "start", rtl);
|
|
130
|
-
if (alignment) {
|
|
131
|
-
list = list.map((side) => side + "-" + alignment);
|
|
132
|
-
if (flipAlignment) {
|
|
133
|
-
list = list.concat(list.map(getOppositeAlignmentPlacement));
|
|
134
|
-
}
|
|
135
|
-
}
|
|
136
|
-
return list;
|
|
137
|
-
}
|
|
138
|
-
function getOppositePlacement(placement) {
|
|
139
|
-
const side = getSide(placement);
|
|
140
|
-
return oppositeSideMap[side] + placement.slice(side.length);
|
|
141
|
-
}
|
|
142
|
-
function expandPaddingObject(padding) {
|
|
143
|
-
return {
|
|
144
|
-
top: 0,
|
|
145
|
-
right: 0,
|
|
146
|
-
bottom: 0,
|
|
147
|
-
left: 0,
|
|
148
|
-
...padding
|
|
149
|
-
};
|
|
150
|
-
}
|
|
151
|
-
function getPaddingObject(padding) {
|
|
152
|
-
return typeof padding !== "number" ? expandPaddingObject(padding) : {
|
|
153
|
-
top: padding,
|
|
154
|
-
right: padding,
|
|
155
|
-
bottom: padding,
|
|
156
|
-
left: padding
|
|
157
|
-
};
|
|
158
|
-
}
|
|
159
|
-
function rectToClientRect(rect) {
|
|
160
|
-
const {
|
|
161
|
-
x,
|
|
162
|
-
y,
|
|
163
|
-
width,
|
|
164
|
-
height
|
|
165
|
-
} = rect;
|
|
166
|
-
return {
|
|
167
|
-
width,
|
|
168
|
-
height,
|
|
169
|
-
top: y,
|
|
170
|
-
left: x,
|
|
171
|
-
right: x + width,
|
|
172
|
-
bottom: y + height,
|
|
173
|
-
x,
|
|
174
|
-
y
|
|
175
|
-
};
|
|
176
|
-
}
|
|
177
|
-
|
|
178
|
-
// node_modules/@base-ui/react/esm/floating-ui-react/utils/composite.js
|
|
179
|
-
function isDifferentGridRow(index, cols, prevRow) {
|
|
180
|
-
return Math.floor(index / cols) !== prevRow;
|
|
181
|
-
}
|
|
182
|
-
function isIndexOutOfListBounds(list, index) {
|
|
183
|
-
return index < 0 || index >= list.length;
|
|
184
|
-
}
|
|
185
|
-
function getMinListIndex(listRef, disabledIndices) {
|
|
186
|
-
return findNonDisabledListIndex(listRef.current, {
|
|
187
|
-
disabledIndices
|
|
188
|
-
});
|
|
189
|
-
}
|
|
190
|
-
function getMaxListIndex(listRef, disabledIndices) {
|
|
191
|
-
return findNonDisabledListIndex(listRef.current, {
|
|
192
|
-
decrement: true,
|
|
193
|
-
startingIndex: listRef.current.length,
|
|
194
|
-
disabledIndices
|
|
195
|
-
});
|
|
196
|
-
}
|
|
197
|
-
function findNonDisabledListIndex(list, {
|
|
198
|
-
startingIndex = -1,
|
|
199
|
-
decrement = false,
|
|
200
|
-
disabledIndices,
|
|
201
|
-
amount = 1
|
|
202
|
-
} = {}) {
|
|
203
|
-
let index = startingIndex;
|
|
204
|
-
do {
|
|
205
|
-
index += decrement ? -amount : amount;
|
|
206
|
-
} while (index >= 0 && index <= list.length - 1 && isListIndexDisabled(list, index, disabledIndices));
|
|
207
|
-
return index;
|
|
208
|
-
}
|
|
209
|
-
function getGridNavigatedIndex(list, {
|
|
210
|
-
event,
|
|
211
|
-
orientation,
|
|
212
|
-
loopFocus,
|
|
213
|
-
onLoop,
|
|
214
|
-
rtl,
|
|
215
|
-
cols,
|
|
216
|
-
disabledIndices,
|
|
217
|
-
minIndex,
|
|
218
|
-
maxIndex,
|
|
219
|
-
prevIndex,
|
|
220
|
-
stopEvent: stop = false
|
|
221
|
-
}) {
|
|
222
|
-
let nextIndex = prevIndex;
|
|
223
|
-
let verticalDirection;
|
|
224
|
-
if (event.key === ARROW_UP) {
|
|
225
|
-
verticalDirection = "up";
|
|
226
|
-
} else if (event.key === ARROW_DOWN) {
|
|
227
|
-
verticalDirection = "down";
|
|
228
|
-
}
|
|
229
|
-
if (verticalDirection) {
|
|
230
|
-
const rows = [];
|
|
231
|
-
const rowIndexMap = [];
|
|
232
|
-
let hasRoleRow = false;
|
|
233
|
-
let visibleItemCount = 0;
|
|
234
|
-
{
|
|
235
|
-
let currentRowEl = null;
|
|
236
|
-
let currentRowIndex = -1;
|
|
237
|
-
list.forEach((el, idx) => {
|
|
238
|
-
if (el == null) {
|
|
239
|
-
return;
|
|
240
|
-
}
|
|
241
|
-
visibleItemCount += 1;
|
|
242
|
-
const rowEl = el.closest('[role="row"]');
|
|
243
|
-
if (rowEl) {
|
|
244
|
-
hasRoleRow = true;
|
|
245
|
-
}
|
|
246
|
-
if (rowEl !== currentRowEl || currentRowIndex === -1) {
|
|
247
|
-
currentRowEl = rowEl;
|
|
248
|
-
currentRowIndex += 1;
|
|
249
|
-
rows[currentRowIndex] = [];
|
|
250
|
-
}
|
|
251
|
-
rows[currentRowIndex].push(idx);
|
|
252
|
-
rowIndexMap[idx] = currentRowIndex;
|
|
253
|
-
});
|
|
254
|
-
}
|
|
255
|
-
let hasDomRows = false;
|
|
256
|
-
let inferredDomCols = 0;
|
|
257
|
-
if (hasRoleRow) {
|
|
258
|
-
for (const row of rows) {
|
|
259
|
-
const rowLength = row.length;
|
|
260
|
-
if (rowLength > inferredDomCols) {
|
|
261
|
-
inferredDomCols = rowLength;
|
|
262
|
-
}
|
|
263
|
-
if (rowLength !== cols) {
|
|
264
|
-
hasDomRows = true;
|
|
265
|
-
}
|
|
266
|
-
}
|
|
267
|
-
}
|
|
268
|
-
const hasVirtualizedGaps = hasDomRows && visibleItemCount < list.length;
|
|
269
|
-
const verticalCols = inferredDomCols || cols;
|
|
270
|
-
const navigateVertically = (direction) => {
|
|
271
|
-
if (!hasDomRows || prevIndex === -1) {
|
|
272
|
-
return;
|
|
273
|
-
}
|
|
274
|
-
const currentRow = rowIndexMap[prevIndex];
|
|
275
|
-
if (currentRow == null) {
|
|
276
|
-
return;
|
|
277
|
-
}
|
|
278
|
-
const colInRow = rows[currentRow].indexOf(prevIndex);
|
|
279
|
-
const step = direction === "up" ? -1 : 1;
|
|
280
|
-
for (let nextRow = currentRow + step, i = 0;i < rows.length; i += 1, nextRow += step) {
|
|
281
|
-
if (nextRow < 0 || nextRow >= rows.length) {
|
|
282
|
-
if (!loopFocus || hasVirtualizedGaps) {
|
|
283
|
-
return;
|
|
284
|
-
}
|
|
285
|
-
nextRow = nextRow < 0 ? rows.length - 1 : 0;
|
|
286
|
-
if (onLoop) {
|
|
287
|
-
const clampedCol = Math.min(colInRow, rows[nextRow].length - 1);
|
|
288
|
-
const targetItemIndex = rows[nextRow][clampedCol] ?? rows[nextRow][0];
|
|
289
|
-
const returnedItemIndex = onLoop(event, prevIndex, targetItemIndex);
|
|
290
|
-
nextRow = rowIndexMap[returnedItemIndex] ?? nextRow;
|
|
291
|
-
}
|
|
292
|
-
}
|
|
293
|
-
const targetRow = rows[nextRow];
|
|
294
|
-
for (let col = Math.min(colInRow, targetRow.length - 1);col >= 0; col -= 1) {
|
|
295
|
-
const candidate = targetRow[col];
|
|
296
|
-
if (!isListIndexDisabled(list, candidate, disabledIndices)) {
|
|
297
|
-
return candidate;
|
|
298
|
-
}
|
|
299
|
-
}
|
|
300
|
-
}
|
|
301
|
-
return;
|
|
302
|
-
};
|
|
303
|
-
const navigateVerticallyWithInferredRows = (direction) => {
|
|
304
|
-
if (!hasVirtualizedGaps || prevIndex === -1) {
|
|
305
|
-
return;
|
|
306
|
-
}
|
|
307
|
-
const colInRow = prevIndex % verticalCols;
|
|
308
|
-
const rowStep = direction === "up" ? -verticalCols : verticalCols;
|
|
309
|
-
const lastRowStart = maxIndex - maxIndex % verticalCols;
|
|
310
|
-
const rowCount = floor(maxIndex / verticalCols) + 1;
|
|
311
|
-
for (let rowStart = prevIndex - colInRow + rowStep, i = 0;i < rowCount; i += 1, rowStart += rowStep) {
|
|
312
|
-
if (rowStart < 0 || rowStart > maxIndex) {
|
|
313
|
-
if (!loopFocus) {
|
|
314
|
-
return;
|
|
315
|
-
}
|
|
316
|
-
rowStart = rowStart < 0 ? lastRowStart : 0;
|
|
317
|
-
}
|
|
318
|
-
const rowEnd = Math.min(rowStart + verticalCols - 1, maxIndex);
|
|
319
|
-
for (let candidate = Math.min(rowStart + colInRow, rowEnd);candidate >= rowStart; candidate -= 1) {
|
|
320
|
-
if (!isListIndexDisabled(list, candidate, disabledIndices)) {
|
|
321
|
-
return candidate;
|
|
322
|
-
}
|
|
323
|
-
}
|
|
324
|
-
}
|
|
325
|
-
return;
|
|
326
|
-
};
|
|
327
|
-
if (stop) {
|
|
328
|
-
stopEvent(event);
|
|
329
|
-
}
|
|
330
|
-
const verticalCandidate = navigateVertically(verticalDirection) ?? navigateVerticallyWithInferredRows(verticalDirection);
|
|
331
|
-
if (verticalCandidate !== undefined) {
|
|
332
|
-
nextIndex = verticalCandidate;
|
|
333
|
-
} else if (prevIndex === -1) {
|
|
334
|
-
nextIndex = verticalDirection === "up" ? maxIndex : minIndex;
|
|
335
|
-
} else {
|
|
336
|
-
nextIndex = findNonDisabledListIndex(list, {
|
|
337
|
-
startingIndex: prevIndex,
|
|
338
|
-
amount: verticalCols,
|
|
339
|
-
decrement: verticalDirection === "up",
|
|
340
|
-
disabledIndices
|
|
341
|
-
});
|
|
342
|
-
if (loopFocus) {
|
|
343
|
-
if (verticalDirection === "up" && (prevIndex - verticalCols < minIndex || nextIndex < 0)) {
|
|
344
|
-
const col = prevIndex % verticalCols;
|
|
345
|
-
const maxCol = maxIndex % verticalCols;
|
|
346
|
-
const offset = maxIndex - (maxCol - col);
|
|
347
|
-
if (maxCol === col) {
|
|
348
|
-
nextIndex = maxIndex;
|
|
349
|
-
} else {
|
|
350
|
-
nextIndex = maxCol > col ? offset : offset - verticalCols;
|
|
351
|
-
}
|
|
352
|
-
if (onLoop) {
|
|
353
|
-
nextIndex = onLoop(event, prevIndex, nextIndex);
|
|
354
|
-
}
|
|
355
|
-
}
|
|
356
|
-
if (verticalDirection === "down" && prevIndex + verticalCols > maxIndex) {
|
|
357
|
-
nextIndex = findNonDisabledListIndex(list, {
|
|
358
|
-
startingIndex: prevIndex % verticalCols - verticalCols,
|
|
359
|
-
amount: verticalCols,
|
|
360
|
-
disabledIndices
|
|
361
|
-
});
|
|
362
|
-
if (onLoop) {
|
|
363
|
-
nextIndex = onLoop(event, prevIndex, nextIndex);
|
|
364
|
-
}
|
|
365
|
-
}
|
|
366
|
-
}
|
|
367
|
-
}
|
|
368
|
-
if (isIndexOutOfListBounds(list, nextIndex)) {
|
|
369
|
-
nextIndex = prevIndex;
|
|
370
|
-
}
|
|
371
|
-
}
|
|
372
|
-
if (orientation === "both") {
|
|
373
|
-
const prevRow = floor(prevIndex / cols);
|
|
374
|
-
if (event.key === (rtl ? ARROW_LEFT : ARROW_RIGHT)) {
|
|
375
|
-
if (stop) {
|
|
376
|
-
stopEvent(event);
|
|
377
|
-
}
|
|
378
|
-
if (prevIndex % cols !== cols - 1) {
|
|
379
|
-
nextIndex = findNonDisabledListIndex(list, {
|
|
380
|
-
startingIndex: prevIndex,
|
|
381
|
-
disabledIndices
|
|
382
|
-
});
|
|
383
|
-
if (loopFocus && isDifferentGridRow(nextIndex, cols, prevRow)) {
|
|
384
|
-
nextIndex = findNonDisabledListIndex(list, {
|
|
385
|
-
startingIndex: prevIndex - prevIndex % cols - 1,
|
|
386
|
-
disabledIndices
|
|
387
|
-
});
|
|
388
|
-
if (onLoop) {
|
|
389
|
-
nextIndex = onLoop(event, prevIndex, nextIndex);
|
|
390
|
-
}
|
|
391
|
-
}
|
|
392
|
-
} else if (loopFocus) {
|
|
393
|
-
nextIndex = findNonDisabledListIndex(list, {
|
|
394
|
-
startingIndex: prevIndex - prevIndex % cols - 1,
|
|
395
|
-
disabledIndices
|
|
396
|
-
});
|
|
397
|
-
if (onLoop) {
|
|
398
|
-
nextIndex = onLoop(event, prevIndex, nextIndex);
|
|
399
|
-
}
|
|
400
|
-
}
|
|
401
|
-
if (isDifferentGridRow(nextIndex, cols, prevRow)) {
|
|
402
|
-
nextIndex = prevIndex;
|
|
403
|
-
}
|
|
404
|
-
}
|
|
405
|
-
if (event.key === (rtl ? ARROW_RIGHT : ARROW_LEFT)) {
|
|
406
|
-
if (stop) {
|
|
407
|
-
stopEvent(event);
|
|
408
|
-
}
|
|
409
|
-
if (prevIndex % cols !== 0) {
|
|
410
|
-
nextIndex = findNonDisabledListIndex(list, {
|
|
411
|
-
startingIndex: prevIndex,
|
|
412
|
-
decrement: true,
|
|
413
|
-
disabledIndices
|
|
414
|
-
});
|
|
415
|
-
if (loopFocus && isDifferentGridRow(nextIndex, cols, prevRow)) {
|
|
416
|
-
nextIndex = findNonDisabledListIndex(list, {
|
|
417
|
-
startingIndex: prevIndex + (cols - prevIndex % cols),
|
|
418
|
-
decrement: true,
|
|
419
|
-
disabledIndices
|
|
420
|
-
});
|
|
421
|
-
if (onLoop) {
|
|
422
|
-
nextIndex = onLoop(event, prevIndex, nextIndex);
|
|
423
|
-
}
|
|
424
|
-
}
|
|
425
|
-
} else if (loopFocus) {
|
|
426
|
-
nextIndex = findNonDisabledListIndex(list, {
|
|
427
|
-
startingIndex: prevIndex + (cols - prevIndex % cols),
|
|
428
|
-
decrement: true,
|
|
429
|
-
disabledIndices
|
|
430
|
-
});
|
|
431
|
-
if (onLoop) {
|
|
432
|
-
nextIndex = onLoop(event, prevIndex, nextIndex);
|
|
433
|
-
}
|
|
434
|
-
}
|
|
435
|
-
if (isDifferentGridRow(nextIndex, cols, prevRow)) {
|
|
436
|
-
nextIndex = prevIndex;
|
|
437
|
-
}
|
|
438
|
-
}
|
|
439
|
-
const lastRow = floor(maxIndex / cols) === prevRow;
|
|
440
|
-
if (isIndexOutOfListBounds(list, nextIndex)) {
|
|
441
|
-
if (loopFocus && lastRow) {
|
|
442
|
-
nextIndex = event.key === (rtl ? ARROW_RIGHT : ARROW_LEFT) ? maxIndex : findNonDisabledListIndex(list, {
|
|
443
|
-
startingIndex: prevIndex - prevIndex % cols - 1,
|
|
444
|
-
disabledIndices
|
|
445
|
-
});
|
|
446
|
-
if (onLoop) {
|
|
447
|
-
nextIndex = onLoop(event, prevIndex, nextIndex);
|
|
448
|
-
}
|
|
449
|
-
} else {
|
|
450
|
-
nextIndex = prevIndex;
|
|
451
|
-
}
|
|
452
|
-
}
|
|
453
|
-
}
|
|
454
|
-
return nextIndex;
|
|
455
|
-
}
|
|
456
|
-
function createGridCellMap(sizes, cols, dense) {
|
|
457
|
-
const cellMap = [];
|
|
458
|
-
let startIndex = 0;
|
|
459
|
-
sizes.forEach(({
|
|
460
|
-
width,
|
|
461
|
-
height
|
|
462
|
-
}, index) => {
|
|
463
|
-
if (width > cols) {
|
|
464
|
-
if (true) {
|
|
465
|
-
throw new Error(`[Floating UI]: Invalid grid - item width at index ${index} is greater than grid columns`);
|
|
466
|
-
}
|
|
467
|
-
}
|
|
468
|
-
let itemPlaced = false;
|
|
469
|
-
if (dense) {
|
|
470
|
-
startIndex = 0;
|
|
471
|
-
}
|
|
472
|
-
while (!itemPlaced) {
|
|
473
|
-
const targetCells = [];
|
|
474
|
-
for (let i = 0;i < width; i += 1) {
|
|
475
|
-
for (let j = 0;j < height; j += 1) {
|
|
476
|
-
targetCells.push(startIndex + i + j * cols);
|
|
477
|
-
}
|
|
478
|
-
}
|
|
479
|
-
if (startIndex % cols + width <= cols && targetCells.every((cell) => cellMap[cell] == null)) {
|
|
480
|
-
targetCells.forEach((cell) => {
|
|
481
|
-
cellMap[cell] = index;
|
|
482
|
-
});
|
|
483
|
-
itemPlaced = true;
|
|
484
|
-
} else {
|
|
485
|
-
startIndex += 1;
|
|
486
|
-
}
|
|
487
|
-
}
|
|
488
|
-
});
|
|
489
|
-
return [...cellMap];
|
|
490
|
-
}
|
|
491
|
-
function getGridCellIndexOfCorner(index, sizes, cellMap, cols, corner) {
|
|
492
|
-
if (index === -1) {
|
|
493
|
-
return -1;
|
|
494
|
-
}
|
|
495
|
-
const firstCellIndex = cellMap.indexOf(index);
|
|
496
|
-
const sizeItem = sizes[index];
|
|
497
|
-
switch (corner) {
|
|
498
|
-
case "tl":
|
|
499
|
-
return firstCellIndex;
|
|
500
|
-
case "tr":
|
|
501
|
-
if (!sizeItem) {
|
|
502
|
-
return firstCellIndex;
|
|
503
|
-
}
|
|
504
|
-
return firstCellIndex + sizeItem.width - 1;
|
|
505
|
-
case "bl":
|
|
506
|
-
if (!sizeItem) {
|
|
507
|
-
return firstCellIndex;
|
|
508
|
-
}
|
|
509
|
-
return firstCellIndex + (sizeItem.height - 1) * cols;
|
|
510
|
-
case "br":
|
|
511
|
-
return cellMap.lastIndexOf(index);
|
|
512
|
-
default:
|
|
513
|
-
return -1;
|
|
514
|
-
}
|
|
515
|
-
}
|
|
516
|
-
function getGridCellIndices(indices, cellMap) {
|
|
517
|
-
return cellMap.flatMap((index, cellIndex) => indices.includes(index) ? [cellIndex] : []);
|
|
518
|
-
}
|
|
519
|
-
function isListIndexDisabled(list, index, disabledIndices) {
|
|
520
|
-
const isExplicitlyDisabled = typeof disabledIndices === "function" ? disabledIndices(index) : disabledIndices?.includes(index) ?? false;
|
|
521
|
-
if (isExplicitlyDisabled) {
|
|
522
|
-
return true;
|
|
523
|
-
}
|
|
524
|
-
const element = list[index];
|
|
525
|
-
if (!element) {
|
|
526
|
-
return false;
|
|
527
|
-
}
|
|
528
|
-
if (!isElementVisible(element)) {
|
|
529
|
-
return true;
|
|
530
|
-
}
|
|
531
|
-
return !disabledIndices && (element.hasAttribute("disabled") || element.getAttribute("aria-disabled") === "true");
|
|
532
|
-
}
|
|
533
|
-
function isHiddenByStyles(styles) {
|
|
534
|
-
return styles.visibility === "hidden" || styles.visibility === "collapse";
|
|
535
|
-
}
|
|
536
|
-
function isElementVisible(element, styles = element ? getComputedStyle(element) : null) {
|
|
537
|
-
if (!element || !element.isConnected || !styles || isHiddenByStyles(styles)) {
|
|
538
|
-
return false;
|
|
539
|
-
}
|
|
540
|
-
if (typeof element.checkVisibility === "function") {
|
|
541
|
-
return element.checkVisibility();
|
|
542
|
-
}
|
|
543
|
-
return styles.display !== "none" && styles.display !== "contents";
|
|
544
|
-
}
|
|
545
|
-
|
|
546
|
-
export { stopEvent, isReactEvent, isVirtualClick, isVirtualPointerEvent, isMouseLikePointerType, isClickLikeEvent, sides, min, max, round, floor, createCoords, clamp, evaluate, getSide, getAlignment, getOppositeAxis, getAxisLength, getSideAxis, getAlignmentAxis, getAlignmentSides, getExpandedPlacements, getOppositeAxisPlacements, getOppositePlacement, getPaddingObject, rectToClientRect, isIndexOutOfListBounds, getMinListIndex, getMaxListIndex, findNonDisabledListIndex, getGridNavigatedIndex, createGridCellMap, getGridCellIndexOfCorner, getGridCellIndices, isListIndexDisabled, isElementVisible };
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
// node_modules/@base-ui/utils/esm/usePreviousValue.js
|
|
2
|
-
import * as React from "react";
|
|
3
|
-
"use client";
|
|
4
|
-
function usePreviousValue(value) {
|
|
5
|
-
const [state, setState] = React.useState({
|
|
6
|
-
current: value,
|
|
7
|
-
previous: null
|
|
8
|
-
});
|
|
9
|
-
if (value !== state.current) {
|
|
10
|
-
setState({
|
|
11
|
-
current: value,
|
|
12
|
-
previous: state.current
|
|
13
|
-
});
|
|
14
|
-
}
|
|
15
|
-
return state.previous;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
export { usePreviousValue };
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
// node_modules/@base-ui/react/esm/toolbar/root/ToolbarRootContext.js
|
|
2
|
-
import * as React from "react";
|
|
3
|
-
"use client";
|
|
4
|
-
var ToolbarRootContext = /* @__PURE__ */ React.createContext(undefined);
|
|
5
|
-
if (true)
|
|
6
|
-
ToolbarRootContext.displayName = "ToolbarRootContext";
|
|
7
|
-
function useToolbarRootContext(optional) {
|
|
8
|
-
const context = React.useContext(ToolbarRootContext);
|
|
9
|
-
if (context === undefined && !optional) {
|
|
10
|
-
throw new Error("Base UI: ToolbarRootContext is missing. Toolbar parts must be placed within <Toolbar.Root>.");
|
|
11
|
-
}
|
|
12
|
-
return context;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
export { useToolbarRootContext };
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
useRenderElement
|
|
3
|
-
} from "./_chunk-x8xehj6d.js";
|
|
4
|
-
|
|
5
|
-
// node_modules/@base-ui/react/esm/separator/Separator.js
|
|
6
|
-
import * as React from "react";
|
|
7
|
-
"use client";
|
|
8
|
-
var Separator = /* @__PURE__ */ React.forwardRef(function SeparatorComponent(componentProps, forwardedRef) {
|
|
9
|
-
const {
|
|
10
|
-
className,
|
|
11
|
-
render,
|
|
12
|
-
orientation = "horizontal",
|
|
13
|
-
style,
|
|
14
|
-
...elementProps
|
|
15
|
-
} = componentProps;
|
|
16
|
-
const state = {
|
|
17
|
-
orientation
|
|
18
|
-
};
|
|
19
|
-
const element = useRenderElement("div", componentProps, {
|
|
20
|
-
state,
|
|
21
|
-
ref: forwardedRef,
|
|
22
|
-
props: [{
|
|
23
|
-
role: "separator",
|
|
24
|
-
"aria-orientation": orientation
|
|
25
|
-
}, elementProps]
|
|
26
|
-
});
|
|
27
|
-
return element;
|
|
28
|
-
});
|
|
29
|
-
if (true)
|
|
30
|
-
Separator.displayName = "Separator";
|
|
31
|
-
|
|
32
|
-
export { Separator };
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
require_shim
|
|
3
|
-
} from "./_chunk-1vw45v38.js";
|
|
4
|
-
import {
|
|
5
|
-
NOOP
|
|
6
|
-
} from "./_chunk-x8xehj6d.js";
|
|
7
|
-
import {
|
|
8
|
-
__toESM
|
|
9
|
-
} from "./_chunk-svxv97ph.js";
|
|
10
|
-
|
|
11
|
-
// node_modules/@base-ui/react/esm/utils/useIsHydrating.js
|
|
12
|
-
var import_shim = __toESM(require_shim(), 1);
|
|
13
|
-
function subscribe() {
|
|
14
|
-
return NOOP;
|
|
15
|
-
}
|
|
16
|
-
function getSnapshot() {
|
|
17
|
-
return false;
|
|
18
|
-
}
|
|
19
|
-
function getServerSnapshot() {
|
|
20
|
-
return true;
|
|
21
|
-
}
|
|
22
|
-
function useIsHydrating() {
|
|
23
|
-
return import_shim.useSyncExternalStore(subscribe, getSnapshot, getServerSnapshot);
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
export { useIsHydrating };
|