@quantinuum/quantinuum-ui 4.0.1-fix-update-radix.1 → 4.0.1
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/dist/node_modules/@babel/runtime/helpers/esm/extends.js +12 -0
- package/dist/node_modules/@babel/runtime/helpers/esm/extends.js.map +1 -0
- package/dist/node_modules/@radix-ui/number/dist/index.mjs.js +3 -4
- package/dist/node_modules/@radix-ui/number/dist/index.mjs.js.map +1 -1
- package/dist/node_modules/@radix-ui/primitive/dist/index.mjs.js +6 -9
- package/dist/node_modules/@radix-ui/primitive/dist/index.mjs.js.map +1 -1
- package/dist/node_modules/@radix-ui/react-accordion/dist/index.mjs.js +267 -279
- package/dist/node_modules/@radix-ui/react-accordion/dist/index.mjs.js.map +1 -1
- package/dist/node_modules/@radix-ui/react-avatar/dist/index.mjs.js +92 -114
- package/dist/node_modules/@radix-ui/react-avatar/dist/index.mjs.js.map +1 -1
- package/dist/node_modules/@radix-ui/react-checkbox/dist/index.mjs.js +138 -255
- package/dist/node_modules/@radix-ui/react-checkbox/dist/index.mjs.js.map +1 -1
- package/dist/node_modules/@radix-ui/react-collapsible/dist/index.mjs.js +130 -135
- package/dist/node_modules/@radix-ui/react-collapsible/dist/index.mjs.js.map +1 -1
- package/dist/node_modules/@radix-ui/react-collection/dist/index.mjs.js +88 -66
- package/dist/node_modules/@radix-ui/react-collection/dist/index.mjs.js.map +1 -1
- package/dist/node_modules/@radix-ui/react-collection/node_modules/@radix-ui/react-slot/dist/index.mjs.js +73 -81
- package/dist/node_modules/@radix-ui/react-collection/node_modules/@radix-ui/react-slot/dist/index.mjs.js.map +1 -1
- package/dist/node_modules/@radix-ui/react-compose-refs/dist/index.mjs.js +21 -34
- package/dist/node_modules/@radix-ui/react-compose-refs/dist/index.mjs.js.map +1 -1
- package/dist/node_modules/@radix-ui/react-context/dist/index.mjs.js +93 -72
- package/dist/node_modules/@radix-ui/react-context/dist/index.mjs.js.map +1 -1
- package/dist/node_modules/@radix-ui/react-dialog/dist/index.mjs.js +254 -297
- package/dist/node_modules/@radix-ui/react-dialog/dist/index.mjs.js.map +1 -1
- package/dist/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-slot/dist/index.mjs.js +73 -81
- package/dist/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-slot/dist/index.mjs.js.map +1 -1
- package/dist/node_modules/@radix-ui/react-direction/dist/index.mjs.js +6 -8
- package/dist/node_modules/@radix-ui/react-direction/dist/index.mjs.js.map +1 -1
- package/dist/node_modules/@radix-ui/react-dismissable-layer/dist/index.mjs.js +217 -190
- package/dist/node_modules/@radix-ui/react-dismissable-layer/dist/index.mjs.js.map +1 -1
- package/dist/node_modules/@radix-ui/react-dropdown-menu/dist/index.mjs.js +217 -243
- package/dist/node_modules/@radix-ui/react-dropdown-menu/dist/index.mjs.js.map +1 -1
- package/dist/node_modules/@radix-ui/react-focus-guards/dist/index.mjs.js +25 -26
- package/dist/node_modules/@radix-ui/react-focus-guards/dist/index.mjs.js.map +1 -1
- package/dist/node_modules/@radix-ui/react-focus-scope/dist/index.mjs.js +259 -191
- package/dist/node_modules/@radix-ui/react-focus-scope/dist/index.mjs.js.map +1 -1
- package/dist/node_modules/@radix-ui/react-hover-card/dist/index.mjs.js +205 -224
- package/dist/node_modules/@radix-ui/react-hover-card/dist/index.mjs.js.map +1 -1
- package/dist/node_modules/@radix-ui/react-id/dist/index.mjs.js +14 -11
- package/dist/node_modules/@radix-ui/react-id/dist/index.mjs.js.map +1 -1
- package/dist/node_modules/@radix-ui/react-label/dist/index.mjs.js +14 -22
- package/dist/node_modules/@radix-ui/react-label/dist/index.mjs.js.map +1 -1
- package/dist/node_modules/@radix-ui/react-menu/dist/index.mjs.js +820 -765
- package/dist/node_modules/@radix-ui/react-menu/dist/index.mjs.js.map +1 -1
- package/dist/node_modules/@radix-ui/react-menu/node_modules/@radix-ui/react-slot/dist/index.mjs.js +73 -81
- package/dist/node_modules/@radix-ui/react-menu/node_modules/@radix-ui/react-slot/dist/index.mjs.js.map +1 -1
- package/dist/node_modules/@radix-ui/react-navigation-menu/dist/index.mjs.js +730 -717
- package/dist/node_modules/@radix-ui/react-navigation-menu/dist/index.mjs.js.map +1 -1
- package/dist/node_modules/@radix-ui/react-popover/dist/index.mjs.js +199 -268
- package/dist/node_modules/@radix-ui/react-popover/dist/index.mjs.js.map +1 -1
- package/dist/node_modules/@radix-ui/react-popover/node_modules/@radix-ui/react-slot/dist/index.mjs.js +73 -81
- package/dist/node_modules/@radix-ui/react-popover/node_modules/@radix-ui/react-slot/dist/index.mjs.js.map +1 -1
- package/dist/node_modules/@radix-ui/react-popper/dist/index.mjs.js +223 -267
- package/dist/node_modules/@radix-ui/react-popper/dist/index.mjs.js.map +1 -1
- package/dist/node_modules/@radix-ui/react-portal/dist/index.mjs.js +10 -14
- package/dist/node_modules/@radix-ui/react-portal/dist/index.mjs.js.map +1 -1
- package/dist/node_modules/@radix-ui/react-presence/dist/index.mjs.js +121 -122
- package/dist/node_modules/@radix-ui/react-presence/dist/index.mjs.js.map +1 -1
- package/dist/node_modules/@radix-ui/react-primitive/dist/index.mjs.js +83 -39
- package/dist/node_modules/@radix-ui/react-primitive/dist/index.mjs.js.map +1 -1
- package/dist/node_modules/@radix-ui/react-primitive/node_modules/@radix-ui/react-slot/dist/index.mjs.js +73 -81
- package/dist/node_modules/@radix-ui/react-primitive/node_modules/@radix-ui/react-slot/dist/index.mjs.js.map +1 -1
- package/dist/node_modules/@radix-ui/react-progress/dist/index.mjs.js +78 -77
- package/dist/node_modules/@radix-ui/react-progress/dist/index.mjs.js.map +1 -1
- package/dist/node_modules/@radix-ui/react-radio-group/dist/index.mjs.js +217 -264
- package/dist/node_modules/@radix-ui/react-radio-group/dist/index.mjs.js.map +1 -1
- package/dist/node_modules/@radix-ui/react-roving-focus/dist/index.mjs.js +216 -204
- package/dist/node_modules/@radix-ui/react-roving-focus/dist/index.mjs.js.map +1 -1
- package/dist/node_modules/@radix-ui/react-scroll-area/dist/index.mjs.js +9 -9
- package/dist/node_modules/@radix-ui/react-scroll-area/node_modules/@radix-ui/number/dist/index.mjs.js +7 -0
- package/dist/node_modules/@radix-ui/react-scroll-area/node_modules/@radix-ui/number/dist/index.mjs.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-scroll-area/node_modules/@radix-ui/primitive/dist/index.mjs.js +12 -0
- package/dist/node_modules/@radix-ui/react-scroll-area/node_modules/@radix-ui/primitive/dist/index.mjs.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-scroll-area/node_modules/@radix-ui/react-compose-refs/dist/index.mjs.js +40 -0
- package/dist/node_modules/@radix-ui/react-scroll-area/node_modules/@radix-ui/react-compose-refs/dist/index.mjs.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-scroll-area/node_modules/@radix-ui/react-context/dist/index.mjs.js +64 -0
- package/dist/node_modules/@radix-ui/react-scroll-area/node_modules/@radix-ui/react-context/dist/index.mjs.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-scroll-area/node_modules/@radix-ui/react-direction/dist/index.mjs.js +12 -0
- package/dist/node_modules/@radix-ui/react-scroll-area/node_modules/@radix-ui/react-direction/dist/index.mjs.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-scroll-area/node_modules/@radix-ui/react-presence/dist/index.mjs.js +132 -0
- package/dist/node_modules/@radix-ui/react-scroll-area/node_modules/@radix-ui/react-presence/dist/index.mjs.js.map +1 -0
- package/dist/node_modules/{cmdk → @radix-ui/react-scroll-area}/node_modules/@radix-ui/react-primitive/dist/index.mjs.js +1 -1
- package/dist/node_modules/@radix-ui/react-scroll-area/node_modules/@radix-ui/react-primitive/dist/index.mjs.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-scroll-area/node_modules/@radix-ui/react-slot/dist/index.mjs.js +90 -0
- package/dist/node_modules/@radix-ui/react-scroll-area/node_modules/@radix-ui/react-slot/dist/index.mjs.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-scroll-area/node_modules/@radix-ui/react-use-callback-ref/dist/index.mjs.js +13 -0
- package/dist/node_modules/@radix-ui/react-scroll-area/node_modules/@radix-ui/react-use-callback-ref/dist/index.mjs.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-scroll-area/node_modules/@radix-ui/react-use-layout-effect/dist/index.mjs.js +8 -0
- package/dist/node_modules/@radix-ui/react-scroll-area/node_modules/@radix-ui/react-use-layout-effect/dist/index.mjs.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-select/dist/index.mjs.js +1079 -1080
- package/dist/node_modules/@radix-ui/react-select/dist/index.mjs.js.map +1 -1
- package/dist/node_modules/@radix-ui/react-select/node_modules/@radix-ui/react-slot/dist/index.mjs.js +73 -81
- package/dist/node_modules/@radix-ui/react-select/node_modules/@radix-ui/react-slot/dist/index.mjs.js.map +1 -1
- package/dist/node_modules/@radix-ui/react-separator/dist/index.mjs.js +43 -26
- package/dist/node_modules/@radix-ui/react-separator/dist/index.mjs.js.map +1 -1
- package/dist/node_modules/@radix-ui/react-slot/dist/index.mjs.js +1 -1
- package/dist/node_modules/@radix-ui/react-slot/node_modules/@radix-ui/react-compose-refs/dist/index.mjs.js +37 -0
- package/dist/node_modules/@radix-ui/react-slot/node_modules/@radix-ui/react-compose-refs/dist/index.mjs.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-switch/dist/index.mjs.js +112 -140
- package/dist/node_modules/@radix-ui/react-switch/dist/index.mjs.js.map +1 -1
- package/dist/node_modules/@radix-ui/react-tabs/dist/index.mjs.js +141 -173
- package/dist/node_modules/@radix-ui/react-tabs/dist/index.mjs.js.map +1 -1
- package/dist/node_modules/@radix-ui/react-toggle/dist/index.mjs.js +25 -34
- package/dist/node_modules/@radix-ui/react-toggle/dist/index.mjs.js.map +1 -1
- package/dist/node_modules/@radix-ui/react-toggle-group/dist/index.mjs.js +145 -154
- package/dist/node_modules/@radix-ui/react-toggle-group/dist/index.mjs.js.map +1 -1
- package/dist/node_modules/@radix-ui/react-tooltip/dist/index.mjs.js +491 -462
- package/dist/node_modules/@radix-ui/react-tooltip/dist/index.mjs.js.map +1 -1
- package/dist/node_modules/@radix-ui/react-tooltip/node_modules/@radix-ui/react-slot/dist/index.mjs.js +78 -13
- package/dist/node_modules/@radix-ui/react-tooltip/node_modules/@radix-ui/react-slot/dist/index.mjs.js.map +1 -1
- package/dist/node_modules/@radix-ui/react-use-callback-ref/dist/index.mjs.js +15 -9
- package/dist/node_modules/@radix-ui/react-use-callback-ref/dist/index.mjs.js.map +1 -1
- package/dist/node_modules/@radix-ui/react-use-controllable-state/dist/index.mjs.js +43 -66
- package/dist/node_modules/@radix-ui/react-use-controllable-state/dist/index.mjs.js.map +1 -1
- package/dist/node_modules/@radix-ui/react-use-escape-keydown/dist/index.mjs.js +18 -15
- package/dist/node_modules/@radix-ui/react-use-escape-keydown/dist/index.mjs.js.map +1 -1
- package/dist/node_modules/@radix-ui/react-use-layout-effect/dist/index.mjs.js +9 -5
- package/dist/node_modules/@radix-ui/react-use-layout-effect/dist/index.mjs.js.map +1 -1
- package/dist/node_modules/@radix-ui/react-use-previous/dist/index.mjs.js +18 -12
- package/dist/node_modules/@radix-ui/react-use-previous/dist/index.mjs.js.map +1 -1
- package/dist/node_modules/@radix-ui/react-use-size/dist/index.mjs.js +48 -37
- package/dist/node_modules/@radix-ui/react-use-size/dist/index.mjs.js.map +1 -1
- package/dist/node_modules/@radix-ui/react-visually-hidden/dist/index.mjs.js +23 -32
- package/dist/node_modules/@radix-ui/react-visually-hidden/dist/index.mjs.js.map +1 -1
- package/dist/node_modules/aria-hidden/dist/es2015/index.js +16 -22
- package/dist/node_modules/aria-hidden/dist/es2015/index.js.map +1 -1
- package/dist/node_modules/class-variance-authority/dist/index.mjs.js +9 -7
- package/dist/node_modules/class-variance-authority/dist/index.mjs.js.map +1 -1
- package/dist/node_modules/class-variance-authority/node_modules/clsx/dist/clsx.mjs.js +4 -0
- package/dist/node_modules/class-variance-authority/node_modules/clsx/dist/clsx.mjs.js.map +1 -0
- package/dist/node_modules/cmdk/dist/index.mjs.js +4 -8
- package/dist/node_modules/cmdk/dist/index.mjs.js.map +1 -1
- package/dist/node_modules/cmdk/node_modules/@radix-ui/primitive/dist/index.module.js +9 -0
- package/dist/node_modules/cmdk/node_modules/@radix-ui/primitive/dist/index.module.js.map +1 -0
- package/dist/node_modules/cmdk/node_modules/@radix-ui/react-compose-refs/dist/index.module.js +27 -0
- package/dist/node_modules/cmdk/node_modules/@radix-ui/react-compose-refs/dist/index.module.js.map +1 -0
- package/dist/node_modules/cmdk/node_modules/@radix-ui/react-context/dist/index.module.js +101 -0
- package/dist/node_modules/cmdk/node_modules/@radix-ui/react-context/dist/index.module.js.map +1 -0
- package/dist/node_modules/cmdk/node_modules/@radix-ui/react-dialog/dist/index.module.js +214 -0
- package/dist/node_modules/cmdk/node_modules/@radix-ui/react-dialog/dist/index.module.js.map +1 -0
- package/dist/node_modules/cmdk/node_modules/@radix-ui/react-dismissable-layer/dist/index.module.js +233 -0
- package/dist/node_modules/cmdk/node_modules/@radix-ui/react-dismissable-layer/dist/index.module.js.map +1 -0
- package/dist/node_modules/cmdk/node_modules/@radix-ui/react-focus-guards/dist/index.module.js +30 -0
- package/dist/node_modules/cmdk/node_modules/@radix-ui/react-focus-guards/dist/index.module.js.map +1 -0
- package/dist/node_modules/cmdk/node_modules/@radix-ui/react-focus-scope/dist/index.module.js +252 -0
- package/dist/node_modules/cmdk/node_modules/@radix-ui/react-focus-scope/dist/index.module.js.map +1 -0
- package/dist/node_modules/cmdk/node_modules/@radix-ui/react-id/dist/index.module.js +19 -0
- package/dist/node_modules/cmdk/node_modules/@radix-ui/react-id/dist/index.module.js.map +1 -0
- package/dist/node_modules/cmdk/node_modules/@radix-ui/react-portal/dist/index.module.js +15 -0
- package/dist/node_modules/cmdk/node_modules/@radix-ui/react-portal/dist/index.module.js.map +1 -0
- package/dist/node_modules/cmdk/node_modules/@radix-ui/react-presence/dist/index.module.js +131 -0
- package/dist/node_modules/cmdk/node_modules/@radix-ui/react-presence/dist/index.module.js.map +1 -0
- package/dist/node_modules/cmdk/node_modules/@radix-ui/react-primitive/dist/index.module.js +85 -0
- package/dist/node_modules/cmdk/node_modules/@radix-ui/react-primitive/dist/index.module.js.map +1 -0
- package/dist/node_modules/cmdk/node_modules/@radix-ui/react-slot/dist/index.module.js +79 -0
- package/dist/node_modules/cmdk/node_modules/@radix-ui/react-slot/dist/index.module.js.map +1 -0
- package/dist/node_modules/cmdk/node_modules/@radix-ui/react-use-callback-ref/dist/index.module.js +19 -0
- package/dist/node_modules/cmdk/node_modules/@radix-ui/react-use-callback-ref/dist/index.module.js.map +1 -0
- package/dist/node_modules/cmdk/node_modules/@radix-ui/react-use-controllable-state/dist/index.module.js +48 -0
- package/dist/node_modules/cmdk/node_modules/@radix-ui/react-use-controllable-state/dist/index.module.js.map +1 -0
- package/dist/node_modules/cmdk/node_modules/@radix-ui/react-use-escape-keydown/dist/index.module.js +21 -0
- package/dist/node_modules/cmdk/node_modules/@radix-ui/react-use-escape-keydown/dist/index.module.js.map +1 -0
- package/dist/node_modules/cmdk/node_modules/@radix-ui/react-use-layout-effect/dist/index.module.js +12 -0
- package/dist/node_modules/cmdk/node_modules/@radix-ui/react-use-layout-effect/dist/index.module.js.map +1 -0
- package/dist/node_modules/cmdk/node_modules/react-remove-scroll/dist/es2015/Combination.js +10 -0
- package/dist/node_modules/cmdk/node_modules/react-remove-scroll/dist/es2015/Combination.js.map +1 -0
- package/dist/node_modules/cmdk/node_modules/react-remove-scroll/dist/es2015/SideEffect.js +146 -0
- package/dist/node_modules/cmdk/node_modules/react-remove-scroll/dist/es2015/SideEffect.js.map +1 -0
- package/dist/node_modules/cmdk/node_modules/react-remove-scroll/dist/es2015/UI.js +39 -0
- package/dist/node_modules/cmdk/node_modules/react-remove-scroll/dist/es2015/UI.js.map +1 -0
- package/dist/node_modules/cmdk/node_modules/react-remove-scroll/dist/es2015/aggresiveCapture.js +22 -0
- package/dist/node_modules/cmdk/node_modules/react-remove-scroll/dist/es2015/aggresiveCapture.js.map +1 -0
- package/dist/node_modules/cmdk/node_modules/react-remove-scroll/dist/es2015/handleScroll.js +97 -0
- package/dist/node_modules/cmdk/node_modules/react-remove-scroll/dist/es2015/handleScroll.js.map +1 -0
- package/dist/node_modules/cmdk/node_modules/react-remove-scroll/dist/es2015/medium.js +9 -0
- package/dist/node_modules/cmdk/node_modules/react-remove-scroll/dist/es2015/medium.js.map +1 -0
- package/dist/node_modules/cmdk/node_modules/react-remove-scroll/dist/es2015/sidecar.js +10 -0
- package/dist/node_modules/cmdk/node_modules/react-remove-scroll/dist/es2015/sidecar.js.map +1 -0
- package/dist/node_modules/command-score/index.js +138 -0
- package/dist/node_modules/command-score/index.js.map +1 -0
- package/dist/node_modules/input-otp/dist/index.mjs.js +1 -1
- package/dist/node_modules/input-otp/dist/index.mjs.js.map +1 -1
- package/dist/node_modules/react-remove-scroll/dist/es2015/SideEffect.js +5 -23
- package/dist/node_modules/react-remove-scroll/dist/es2015/SideEffect.js.map +1 -1
- package/dist/node_modules/react-remove-scroll/dist/es2015/UI.js +2 -2
- package/dist/node_modules/react-remove-scroll/dist/es2015/UI.js.map +1 -1
- package/dist/node_modules/react-remove-scroll/dist/es2015/handleScroll.js +6 -18
- package/dist/node_modules/react-remove-scroll/dist/es2015/handleScroll.js.map +1 -1
- package/dist/node_modules/react-remove-scroll-bar/dist/es2015/component.js +5 -25
- package/dist/node_modules/react-remove-scroll-bar/dist/es2015/component.js.map +1 -1
- package/dist/node_modules/sonner/dist/index.mjs.js +26 -46
- package/dist/node_modules/sonner/dist/index.mjs.js.map +1 -1
- package/dist/node_modules/use-callback-ref/dist/es2015/useMergeRef.js +1 -27
- package/dist/node_modules/use-callback-ref/dist/es2015/useMergeRef.js.map +1 -1
- package/dist/src/index.js +1 -1
- package/dist/src/shadcn/ui/accordion.js +7 -7
- package/dist/src/shadcn/ui/avatar.js +7 -7
- package/dist/src/shadcn/ui/checkbox.js +3 -3
- package/dist/src/shadcn/ui/command.js +15 -15
- package/dist/src/shadcn/ui/dialog.js +14 -14
- package/dist/src/shadcn/ui/dropdown-menu.js +23 -23
- package/dist/src/shadcn/ui/hover-card.js +5 -5
- package/dist/src/shadcn/ui/label.js +3 -3
- package/dist/src/shadcn/ui/navigation-menu.js +15 -15
- package/dist/src/shadcn/ui/navigation-menu.js.map +1 -1
- package/dist/src/shadcn/ui/popover.js +6 -32
- package/dist/src/shadcn/ui/popover.js.map +1 -1
- package/dist/src/shadcn/ui/progress.js +3 -3
- package/dist/src/shadcn/ui/radio-group.js +5 -5
- package/dist/src/shadcn/ui/select.js +19 -19
- package/dist/src/shadcn/ui/separator.js +3 -3
- package/dist/src/shadcn/ui/sheet.js +14 -14
- package/dist/src/shadcn/ui/switch.js +3 -3
- package/dist/src/shadcn/ui/tabs.js +8 -8
- package/dist/src/shadcn/ui/toggle-group.js +5 -5
- package/dist/src/shadcn/ui/toggle.js +3 -3
- package/dist/src/shadcn/ui/tooltip.js +7 -7
- package/dist/src/tailwindTheme.js +12 -12
- package/dist/src/tailwindTheme.js.map +1 -1
- package/dist/tailwind-manifest.js +10978 -9482
- package/dist/types/src/shadcn/ui/command.d.ts +8 -44
- package/dist/types/src/shadcn/ui/popover.d.ts +4 -8
- package/dist/types/src/shadcn/ui/sheet.d.ts +1 -1
- package/dist/types/src/tailwindTheme.d.ts +4 -6
- package/dist/types/tailwind.config.d.ts +4 -6
- package/package.json +31 -11
- package/dist/_virtual/index.js +0 -4
- package/dist/_virtual/index.js.map +0 -1
- package/dist/_virtual/use-sync-external-store-shim.development.js +0 -4
- package/dist/_virtual/use-sync-external-store-shim.development.js.map +0 -1
- package/dist/_virtual/use-sync-external-store-shim.production.js +0 -4
- package/dist/_virtual/use-sync-external-store-shim.production.js.map +0 -1
- package/dist/node_modules/@radix-ui/react-arrow/dist/index.mjs.js +0 -26
- package/dist/node_modules/@radix-ui/react-arrow/dist/index.mjs.js.map +0 -1
- package/dist/node_modules/@radix-ui/react-use-is-hydrated/dist/index.mjs.js +0 -18
- package/dist/node_modules/@radix-ui/react-use-is-hydrated/dist/index.mjs.js.map +0 -1
- package/dist/node_modules/cmdk/dist/chunk-NZJY6EH4.mjs.js +0 -4
- package/dist/node_modules/cmdk/dist/chunk-NZJY6EH4.mjs.js.map +0 -1
- package/dist/node_modules/cmdk/node_modules/@radix-ui/react-primitive/dist/index.mjs.js.map +0 -1
- package/dist/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.development.js +0 -107
- package/dist/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.development.js.map +0 -1
- package/dist/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.production.js +0 -78
- package/dist/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.production.js.map +0 -1
- package/dist/node_modules/use-sync-external-store/shim/index.js +0 -13
- package/dist/node_modules/use-sync-external-store/shim/index.js.map +0 -1
|
@@ -1,225 +1,237 @@
|
|
|
1
|
-
|
|
2
|
-
import
|
|
3
|
-
import { composeEventHandlers } from '../../primitive/dist/index.mjs.js';
|
|
4
|
-
import { createCollection } from '../../react-collection/dist/index.mjs.js';
|
|
5
|
-
import { useComposedRefs } from '../../react-compose-refs/dist/index.mjs.js';
|
|
6
|
-
import { createContextScope } from '../../react-context/dist/index.mjs.js';
|
|
7
|
-
import { useId } from '../../react-id/dist/index.mjs.js';
|
|
8
|
-
import { Primitive } from '../../react-primitive/dist/index.mjs.js';
|
|
9
|
-
import { useCallbackRef } from '../../react-use-callback-ref/dist/index.mjs.js';
|
|
10
|
-
import { useControllableState } from '../../react-use-controllable-state/dist/index.mjs.js';
|
|
11
|
-
import { useDirection } from '../../react-direction/dist/index.mjs.js';
|
|
12
|
-
import { jsx } from 'react/jsx-runtime';
|
|
1
|
+
import _extends from '../../../@babel/runtime/helpers/esm/extends.js';
|
|
2
|
+
import { forwardRef, createElement, useRef, useState, useEffect, useCallback } from 'react';
|
|
3
|
+
import { composeEventHandlers as $e42e1063c40fb3ef$export$b9ecd428b558ff10 } from '../../primitive/dist/index.mjs.js';
|
|
4
|
+
import { createCollection as $e02a7d9cb1dc128c$export$c74125a8e3af6bb2 } from '../../react-collection/dist/index.mjs.js';
|
|
5
|
+
import { useComposedRefs as $6ed0406888f73fc4$export$c7b2cbe3552a0d05 } from '../../react-compose-refs/dist/index.mjs.js';
|
|
6
|
+
import { createContextScope as $c512c27ab02ef895$export$50c7b4e9d9f19c1 } from '../../react-context/dist/index.mjs.js';
|
|
7
|
+
import { useId as $1746a345f3d73bb7$export$f680877a34711e37 } from '../../react-id/dist/index.mjs.js';
|
|
8
|
+
import { Primitive as $8927f6f2acc4f386$export$250ffa63cdc0d034 } from '../../react-primitive/dist/index.mjs.js';
|
|
9
|
+
import { useCallbackRef as $b1b2314f5f9a1d84$export$25bec8c6f54ee79a } from '../../react-use-callback-ref/dist/index.mjs.js';
|
|
10
|
+
import { useControllableState as $71cd76cc60e0454e$export$6f32135080cb4c3 } from '../../react-use-controllable-state/dist/index.mjs.js';
|
|
11
|
+
import { useDirection as $f631663db3294ace$export$b39126d51d94e6f3 } from '../../react-direction/dist/index.mjs.js';
|
|
13
12
|
|
|
14
|
-
var
|
|
15
|
-
var
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
var
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
)
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
onCurrentTabStopIdChange,
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
[]
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
...groupProps,
|
|
90
|
-
ref: composedRefs,
|
|
91
|
-
style: { outline: "none", ...props.style },
|
|
92
|
-
onMouseDown: composeEventHandlers(props.onMouseDown, () => {
|
|
13
|
+
const $d7bdfb9eb0fdf311$var$ENTRY_FOCUS = 'rovingFocusGroup.onEntryFocus';
|
|
14
|
+
const $d7bdfb9eb0fdf311$var$EVENT_OPTIONS = {
|
|
15
|
+
bubbles: false,
|
|
16
|
+
cancelable: true
|
|
17
|
+
};
|
|
18
|
+
/* -------------------------------------------------------------------------------------------------
|
|
19
|
+
* RovingFocusGroup
|
|
20
|
+
* -----------------------------------------------------------------------------------------------*/ const $d7bdfb9eb0fdf311$var$GROUP_NAME = 'RovingFocusGroup';
|
|
21
|
+
const [$d7bdfb9eb0fdf311$var$Collection, $d7bdfb9eb0fdf311$var$useCollection, $d7bdfb9eb0fdf311$var$createCollectionScope] = $e02a7d9cb1dc128c$export$c74125a8e3af6bb2($d7bdfb9eb0fdf311$var$GROUP_NAME);
|
|
22
|
+
const [$d7bdfb9eb0fdf311$var$createRovingFocusGroupContext, $d7bdfb9eb0fdf311$export$c7109489551a4f4] = $c512c27ab02ef895$export$50c7b4e9d9f19c1($d7bdfb9eb0fdf311$var$GROUP_NAME, [
|
|
23
|
+
$d7bdfb9eb0fdf311$var$createCollectionScope
|
|
24
|
+
]);
|
|
25
|
+
const [$d7bdfb9eb0fdf311$var$RovingFocusProvider, $d7bdfb9eb0fdf311$var$useRovingFocusContext] = $d7bdfb9eb0fdf311$var$createRovingFocusGroupContext($d7bdfb9eb0fdf311$var$GROUP_NAME);
|
|
26
|
+
const $d7bdfb9eb0fdf311$export$8699f7c8af148338 = /*#__PURE__*/ forwardRef((props, forwardedRef)=>{
|
|
27
|
+
return /*#__PURE__*/ createElement($d7bdfb9eb0fdf311$var$Collection.Provider, {
|
|
28
|
+
scope: props.__scopeRovingFocusGroup
|
|
29
|
+
}, /*#__PURE__*/ createElement($d7bdfb9eb0fdf311$var$Collection.Slot, {
|
|
30
|
+
scope: props.__scopeRovingFocusGroup
|
|
31
|
+
}, /*#__PURE__*/ createElement($d7bdfb9eb0fdf311$var$RovingFocusGroupImpl, _extends({}, props, {
|
|
32
|
+
ref: forwardedRef
|
|
33
|
+
}))));
|
|
34
|
+
});
|
|
35
|
+
/* -----------------------------------------------------------------------------------------------*/ const $d7bdfb9eb0fdf311$var$RovingFocusGroupImpl = /*#__PURE__*/ forwardRef((props, forwardedRef)=>{
|
|
36
|
+
const { __scopeRovingFocusGroup: __scopeRovingFocusGroup , orientation: orientation , loop: loop = false , dir: dir , currentTabStopId: currentTabStopIdProp , defaultCurrentTabStopId: defaultCurrentTabStopId , onCurrentTabStopIdChange: onCurrentTabStopIdChange , onEntryFocus: onEntryFocus , ...groupProps } = props;
|
|
37
|
+
const ref = useRef(null);
|
|
38
|
+
const composedRefs = $6ed0406888f73fc4$export$c7b2cbe3552a0d05(forwardedRef, ref);
|
|
39
|
+
const direction = $f631663db3294ace$export$b39126d51d94e6f3(dir);
|
|
40
|
+
const [currentTabStopId = null, setCurrentTabStopId] = $71cd76cc60e0454e$export$6f32135080cb4c3({
|
|
41
|
+
prop: currentTabStopIdProp,
|
|
42
|
+
defaultProp: defaultCurrentTabStopId,
|
|
43
|
+
onChange: onCurrentTabStopIdChange
|
|
44
|
+
});
|
|
45
|
+
const [isTabbingBackOut, setIsTabbingBackOut] = useState(false);
|
|
46
|
+
const handleEntryFocus = $b1b2314f5f9a1d84$export$25bec8c6f54ee79a(onEntryFocus);
|
|
47
|
+
const getItems = $d7bdfb9eb0fdf311$var$useCollection(__scopeRovingFocusGroup);
|
|
48
|
+
const isClickFocusRef = useRef(false);
|
|
49
|
+
const [focusableItemsCount, setFocusableItemsCount] = useState(0);
|
|
50
|
+
useEffect(()=>{
|
|
51
|
+
const node = ref.current;
|
|
52
|
+
if (node) {
|
|
53
|
+
node.addEventListener($d7bdfb9eb0fdf311$var$ENTRY_FOCUS, handleEntryFocus);
|
|
54
|
+
return ()=>node.removeEventListener($d7bdfb9eb0fdf311$var$ENTRY_FOCUS, handleEntryFocus)
|
|
55
|
+
;
|
|
56
|
+
}
|
|
57
|
+
}, [
|
|
58
|
+
handleEntryFocus
|
|
59
|
+
]);
|
|
60
|
+
return /*#__PURE__*/ createElement($d7bdfb9eb0fdf311$var$RovingFocusProvider, {
|
|
61
|
+
scope: __scopeRovingFocusGroup,
|
|
62
|
+
orientation: orientation,
|
|
63
|
+
dir: direction,
|
|
64
|
+
loop: loop,
|
|
65
|
+
currentTabStopId: currentTabStopId,
|
|
66
|
+
onItemFocus: useCallback((tabStopId)=>setCurrentTabStopId(tabStopId)
|
|
67
|
+
, [
|
|
68
|
+
setCurrentTabStopId
|
|
69
|
+
]),
|
|
70
|
+
onItemShiftTab: useCallback(()=>setIsTabbingBackOut(true)
|
|
71
|
+
, []),
|
|
72
|
+
onFocusableItemAdd: useCallback(()=>setFocusableItemsCount((prevCount)=>prevCount + 1
|
|
73
|
+
)
|
|
74
|
+
, []),
|
|
75
|
+
onFocusableItemRemove: useCallback(()=>setFocusableItemsCount((prevCount)=>prevCount - 1
|
|
76
|
+
)
|
|
77
|
+
, [])
|
|
78
|
+
}, /*#__PURE__*/ createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.div, _extends({
|
|
79
|
+
tabIndex: isTabbingBackOut || focusableItemsCount === 0 ? -1 : 0,
|
|
80
|
+
"data-orientation": orientation
|
|
81
|
+
}, groupProps, {
|
|
82
|
+
ref: composedRefs,
|
|
83
|
+
style: {
|
|
84
|
+
outline: 'none',
|
|
85
|
+
...props.style
|
|
86
|
+
},
|
|
87
|
+
onMouseDown: $e42e1063c40fb3ef$export$b9ecd428b558ff10(props.onMouseDown, ()=>{
|
|
93
88
|
isClickFocusRef.current = true;
|
|
94
|
-
|
|
95
|
-
|
|
89
|
+
}),
|
|
90
|
+
onFocus: $e42e1063c40fb3ef$export$b9ecd428b558ff10(props.onFocus, (event)=>{
|
|
91
|
+
// We normally wouldn't need this check, because we already check
|
|
92
|
+
// that the focus is on the current target and not bubbling to it.
|
|
93
|
+
// We do this because Safari doesn't focus buttons when clicked, and
|
|
94
|
+
// instead, the wrapper will get focused and not through a bubbling event.
|
|
96
95
|
const isKeyboardFocus = !isClickFocusRef.current;
|
|
97
96
|
if (event.target === event.currentTarget && isKeyboardFocus && !isTabbingBackOut) {
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
97
|
+
const entryFocusEvent = new CustomEvent($d7bdfb9eb0fdf311$var$ENTRY_FOCUS, $d7bdfb9eb0fdf311$var$EVENT_OPTIONS);
|
|
98
|
+
event.currentTarget.dispatchEvent(entryFocusEvent);
|
|
99
|
+
if (!entryFocusEvent.defaultPrevented) {
|
|
100
|
+
const items = getItems().filter((item)=>item.focusable
|
|
101
|
+
);
|
|
102
|
+
const activeItem = items.find((item)=>item.active
|
|
103
|
+
);
|
|
104
|
+
const currentItem = items.find((item)=>item.id === currentTabStopId
|
|
105
|
+
);
|
|
106
|
+
const candidateItems = [
|
|
107
|
+
activeItem,
|
|
108
|
+
currentItem,
|
|
109
|
+
...items
|
|
110
|
+
].filter(Boolean);
|
|
111
|
+
const candidateNodes = candidateItems.map((item)=>item.ref.current
|
|
112
|
+
);
|
|
113
|
+
$d7bdfb9eb0fdf311$var$focusFirst(candidateNodes);
|
|
114
|
+
}
|
|
110
115
|
}
|
|
111
116
|
isClickFocusRef.current = false;
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
}
|
|
117
|
-
);
|
|
117
|
+
}),
|
|
118
|
+
onBlur: $e42e1063c40fb3ef$export$b9ecd428b558ff10(props.onBlur, ()=>setIsTabbingBackOut(false)
|
|
119
|
+
)
|
|
120
|
+
})));
|
|
118
121
|
});
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
active = false,
|
|
126
|
-
tabStopId,
|
|
127
|
-
children,
|
|
128
|
-
...itemProps
|
|
129
|
-
} = props;
|
|
130
|
-
const autoId = useId();
|
|
122
|
+
/* -------------------------------------------------------------------------------------------------
|
|
123
|
+
* RovingFocusGroupItem
|
|
124
|
+
* -----------------------------------------------------------------------------------------------*/ const $d7bdfb9eb0fdf311$var$ITEM_NAME = 'RovingFocusGroupItem';
|
|
125
|
+
const $d7bdfb9eb0fdf311$export$ab9df7c53fe8454 = /*#__PURE__*/ forwardRef((props, forwardedRef)=>{
|
|
126
|
+
const { __scopeRovingFocusGroup: __scopeRovingFocusGroup , focusable: focusable = true , active: active = false , tabStopId: tabStopId , ...itemProps } = props;
|
|
127
|
+
const autoId = $1746a345f3d73bb7$export$f680877a34711e37();
|
|
131
128
|
const id = tabStopId || autoId;
|
|
132
|
-
const context = useRovingFocusContext(ITEM_NAME, __scopeRovingFocusGroup);
|
|
129
|
+
const context = $d7bdfb9eb0fdf311$var$useRovingFocusContext($d7bdfb9eb0fdf311$var$ITEM_NAME, __scopeRovingFocusGroup);
|
|
133
130
|
const isCurrentTabStop = context.currentTabStopId === id;
|
|
134
|
-
const getItems = useCollection(__scopeRovingFocusGroup);
|
|
135
|
-
const { onFocusableItemAdd, onFocusableItemRemove
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
Collection.ItemSlot,
|
|
144
|
-
{
|
|
145
|
-
scope: __scopeRovingFocusGroup,
|
|
146
|
-
id,
|
|
131
|
+
const getItems = $d7bdfb9eb0fdf311$var$useCollection(__scopeRovingFocusGroup);
|
|
132
|
+
const { onFocusableItemAdd: onFocusableItemAdd , onFocusableItemRemove: onFocusableItemRemove } = context;
|
|
133
|
+
useEffect(()=>{
|
|
134
|
+
if (focusable) {
|
|
135
|
+
onFocusableItemAdd();
|
|
136
|
+
return ()=>onFocusableItemRemove()
|
|
137
|
+
;
|
|
138
|
+
}
|
|
139
|
+
}, [
|
|
147
140
|
focusable,
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
141
|
+
onFocusableItemAdd,
|
|
142
|
+
onFocusableItemRemove
|
|
143
|
+
]);
|
|
144
|
+
return /*#__PURE__*/ createElement($d7bdfb9eb0fdf311$var$Collection.ItemSlot, {
|
|
145
|
+
scope: __scopeRovingFocusGroup,
|
|
146
|
+
id: id,
|
|
147
|
+
focusable: focusable,
|
|
148
|
+
active: active
|
|
149
|
+
}, /*#__PURE__*/ createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.span, _extends({
|
|
150
|
+
tabIndex: isCurrentTabStop ? 0 : -1,
|
|
151
|
+
"data-orientation": context.orientation
|
|
152
|
+
}, itemProps, {
|
|
153
|
+
ref: forwardedRef,
|
|
154
|
+
onMouseDown: $e42e1063c40fb3ef$export$b9ecd428b558ff10(props.onMouseDown, (event)=>{
|
|
155
|
+
// We prevent focusing non-focusable items on `mousedown`.
|
|
156
|
+
// Even though the item has tabIndex={-1}, that only means take it out of the tab order.
|
|
157
|
+
if (!focusable) event.preventDefault(); // Safari doesn't focus a button when clicked so we run our logic on mousedown also
|
|
158
|
+
else context.onItemFocus(id);
|
|
159
|
+
}),
|
|
160
|
+
onFocus: $e42e1063c40fb3ef$export$b9ecd428b558ff10(props.onFocus, ()=>context.onItemFocus(id)
|
|
161
|
+
),
|
|
162
|
+
onKeyDown: $e42e1063c40fb3ef$export$b9ecd428b558ff10(props.onKeyDown, (event)=>{
|
|
163
|
+
if (event.key === 'Tab' && event.shiftKey) {
|
|
163
164
|
context.onItemShiftTab();
|
|
164
165
|
return;
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
if (event.metaKey || event.ctrlKey || event.altKey || event.shiftKey) return;
|
|
166
|
+
}
|
|
167
|
+
if (event.target !== event.currentTarget) return;
|
|
168
|
+
const focusIntent = $d7bdfb9eb0fdf311$var$getFocusIntent(event, context.orientation, context.dir);
|
|
169
|
+
if (focusIntent !== undefined) {
|
|
170
170
|
event.preventDefault();
|
|
171
|
-
const items = getItems().filter((item)
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
171
|
+
const items = getItems().filter((item)=>item.focusable
|
|
172
|
+
);
|
|
173
|
+
let candidateNodes = items.map((item)=>item.ref.current
|
|
174
|
+
);
|
|
175
|
+
if (focusIntent === 'last') candidateNodes.reverse();
|
|
176
|
+
else if (focusIntent === 'prev' || focusIntent === 'next') {
|
|
177
|
+
if (focusIntent === 'prev') candidateNodes.reverse();
|
|
178
|
+
const currentIndex = candidateNodes.indexOf(event.currentTarget);
|
|
179
|
+
candidateNodes = context.loop ? $d7bdfb9eb0fdf311$var$wrapArray(candidateNodes, currentIndex + 1) : candidateNodes.slice(currentIndex + 1);
|
|
178
180
|
}
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
);
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
End: "last"
|
|
181
|
+
/**
|
|
182
|
+
* Imperative focus during keydown is risky so we prevent React's batching updates
|
|
183
|
+
* to avoid potential bugs. See: https://github.com/facebook/react/issues/20332
|
|
184
|
+
*/ setTimeout(()=>$d7bdfb9eb0fdf311$var$focusFirst(candidateNodes)
|
|
185
|
+
);
|
|
186
|
+
}
|
|
187
|
+
})
|
|
188
|
+
})));
|
|
189
|
+
});
|
|
190
|
+
/* -----------------------------------------------------------------------------------------------*/ // prettier-ignore
|
|
191
|
+
const $d7bdfb9eb0fdf311$var$MAP_KEY_TO_FOCUS_INTENT = {
|
|
192
|
+
ArrowLeft: 'prev',
|
|
193
|
+
ArrowUp: 'prev',
|
|
194
|
+
ArrowRight: 'next',
|
|
195
|
+
ArrowDown: 'next',
|
|
196
|
+
PageUp: 'first',
|
|
197
|
+
Home: 'first',
|
|
198
|
+
PageDown: 'last',
|
|
199
|
+
End: 'last'
|
|
199
200
|
};
|
|
200
|
-
function getDirectionAwareKey(key, dir) {
|
|
201
|
-
|
|
202
|
-
|
|
201
|
+
function $d7bdfb9eb0fdf311$var$getDirectionAwareKey(key, dir) {
|
|
202
|
+
if (dir !== 'rtl') return key;
|
|
203
|
+
return key === 'ArrowLeft' ? 'ArrowRight' : key === 'ArrowRight' ? 'ArrowLeft' : key;
|
|
203
204
|
}
|
|
204
|
-
function getFocusIntent(event, orientation, dir) {
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
205
|
+
function $d7bdfb9eb0fdf311$var$getFocusIntent(event, orientation, dir) {
|
|
206
|
+
const key = $d7bdfb9eb0fdf311$var$getDirectionAwareKey(event.key, dir);
|
|
207
|
+
if (orientation === 'vertical' && [
|
|
208
|
+
'ArrowLeft',
|
|
209
|
+
'ArrowRight'
|
|
210
|
+
].includes(key)) return undefined;
|
|
211
|
+
if (orientation === 'horizontal' && [
|
|
212
|
+
'ArrowUp',
|
|
213
|
+
'ArrowDown'
|
|
214
|
+
].includes(key)) return undefined;
|
|
215
|
+
return $d7bdfb9eb0fdf311$var$MAP_KEY_TO_FOCUS_INTENT[key];
|
|
209
216
|
}
|
|
210
|
-
function focusFirst(candidates
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
+
function $d7bdfb9eb0fdf311$var$focusFirst(candidates) {
|
|
218
|
+
const PREVIOUSLY_FOCUSED_ELEMENT = document.activeElement;
|
|
219
|
+
for (const candidate of candidates){
|
|
220
|
+
// if focus is already where we want to go, we don't want to keep going through the candidates
|
|
221
|
+
if (candidate === PREVIOUSLY_FOCUSED_ELEMENT) return;
|
|
222
|
+
candidate.focus();
|
|
223
|
+
if (document.activeElement !== PREVIOUSLY_FOCUSED_ELEMENT) return;
|
|
224
|
+
}
|
|
217
225
|
}
|
|
218
|
-
|
|
219
|
-
|
|
226
|
+
/**
|
|
227
|
+
* Wraps an array around itself at a given start index
|
|
228
|
+
* Example: `wrapArray(['a', 'b', 'c', 'd'], 2) === ['c', 'd', 'a', 'b']`
|
|
229
|
+
*/ function $d7bdfb9eb0fdf311$var$wrapArray(array, startIndex) {
|
|
230
|
+
return array.map((_, index)=>array[(startIndex + index) % array.length]
|
|
231
|
+
);
|
|
220
232
|
}
|
|
221
|
-
|
|
222
|
-
|
|
233
|
+
const $d7bdfb9eb0fdf311$export$be92b6f5f03c0fe9 = $d7bdfb9eb0fdf311$export$8699f7c8af148338;
|
|
234
|
+
const $d7bdfb9eb0fdf311$export$6d08773d2e66f8f2 = $d7bdfb9eb0fdf311$export$ab9df7c53fe8454;
|
|
223
235
|
|
|
224
|
-
export { Item, Root, RovingFocusGroup, RovingFocusGroupItem, createRovingFocusGroupScope };
|
|
236
|
+
export { $d7bdfb9eb0fdf311$export$6d08773d2e66f8f2 as Item, $d7bdfb9eb0fdf311$export$be92b6f5f03c0fe9 as Root, $d7bdfb9eb0fdf311$export$8699f7c8af148338 as RovingFocusGroup, $d7bdfb9eb0fdf311$export$ab9df7c53fe8454 as RovingFocusGroupItem, $d7bdfb9eb0fdf311$export$c7109489551a4f4 as createRovingFocusGroupScope };
|
|
225
237
|
//# sourceMappingURL=index.mjs.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs.js","sources":["../../../../../node_modules/@radix-ui/react-roving-focus/dist/index.mjs"],"sourcesContent":["\"use client\";\n\n// src/roving-focus-group.tsx\nimport * as React from \"react\";\nimport { composeEventHandlers } from \"@radix-ui/primitive\";\nimport { createCollection } from \"@radix-ui/react-collection\";\nimport { useComposedRefs } from \"@radix-ui/react-compose-refs\";\nimport { createContextScope } from \"@radix-ui/react-context\";\nimport { useId } from \"@radix-ui/react-id\";\nimport { Primitive } from \"@radix-ui/react-primitive\";\nimport { useCallbackRef } from \"@radix-ui/react-use-callback-ref\";\nimport { useControllableState } from \"@radix-ui/react-use-controllable-state\";\nimport { useDirection } from \"@radix-ui/react-direction\";\nimport { jsx } from \"react/jsx-runtime\";\nvar ENTRY_FOCUS = \"rovingFocusGroup.onEntryFocus\";\nvar EVENT_OPTIONS = { bubbles: false, cancelable: true };\nvar GROUP_NAME = \"RovingFocusGroup\";\nvar [Collection, useCollection, createCollectionScope] = createCollection(GROUP_NAME);\nvar [createRovingFocusGroupContext, createRovingFocusGroupScope] = createContextScope(\n GROUP_NAME,\n [createCollectionScope]\n);\nvar [RovingFocusProvider, useRovingFocusContext] = createRovingFocusGroupContext(GROUP_NAME);\nvar RovingFocusGroup = React.forwardRef(\n (props, forwardedRef) => {\n return /* @__PURE__ */ jsx(Collection.Provider, { scope: props.__scopeRovingFocusGroup, children: /* @__PURE__ */ jsx(Collection.Slot, { scope: props.__scopeRovingFocusGroup, children: /* @__PURE__ */ jsx(RovingFocusGroupImpl, { ...props, ref: forwardedRef }) }) });\n }\n);\nRovingFocusGroup.displayName = GROUP_NAME;\nvar RovingFocusGroupImpl = React.forwardRef((props, forwardedRef) => {\n const {\n __scopeRovingFocusGroup,\n orientation,\n loop = false,\n dir,\n currentTabStopId: currentTabStopIdProp,\n defaultCurrentTabStopId,\n onCurrentTabStopIdChange,\n onEntryFocus,\n preventScrollOnEntryFocus = false,\n ...groupProps\n } = props;\n const ref = React.useRef(null);\n const composedRefs = useComposedRefs(forwardedRef, ref);\n const direction = useDirection(dir);\n const [currentTabStopId, setCurrentTabStopId] = useControllableState({\n prop: currentTabStopIdProp,\n defaultProp: defaultCurrentTabStopId ?? null,\n onChange: onCurrentTabStopIdChange,\n caller: GROUP_NAME\n });\n const [isTabbingBackOut, setIsTabbingBackOut] = React.useState(false);\n const handleEntryFocus = useCallbackRef(onEntryFocus);\n const getItems = useCollection(__scopeRovingFocusGroup);\n const isClickFocusRef = React.useRef(false);\n const [focusableItemsCount, setFocusableItemsCount] = React.useState(0);\n React.useEffect(() => {\n const node = ref.current;\n if (node) {\n node.addEventListener(ENTRY_FOCUS, handleEntryFocus);\n return () => node.removeEventListener(ENTRY_FOCUS, handleEntryFocus);\n }\n }, [handleEntryFocus]);\n return /* @__PURE__ */ jsx(\n RovingFocusProvider,\n {\n scope: __scopeRovingFocusGroup,\n orientation,\n dir: direction,\n loop,\n currentTabStopId,\n onItemFocus: React.useCallback(\n (tabStopId) => setCurrentTabStopId(tabStopId),\n [setCurrentTabStopId]\n ),\n onItemShiftTab: React.useCallback(() => setIsTabbingBackOut(true), []),\n onFocusableItemAdd: React.useCallback(\n () => setFocusableItemsCount((prevCount) => prevCount + 1),\n []\n ),\n onFocusableItemRemove: React.useCallback(\n () => setFocusableItemsCount((prevCount) => prevCount - 1),\n []\n ),\n children: /* @__PURE__ */ jsx(\n Primitive.div,\n {\n tabIndex: isTabbingBackOut || focusableItemsCount === 0 ? -1 : 0,\n \"data-orientation\": orientation,\n ...groupProps,\n ref: composedRefs,\n style: { outline: \"none\", ...props.style },\n onMouseDown: composeEventHandlers(props.onMouseDown, () => {\n isClickFocusRef.current = true;\n }),\n onFocus: composeEventHandlers(props.onFocus, (event) => {\n const isKeyboardFocus = !isClickFocusRef.current;\n if (event.target === event.currentTarget && isKeyboardFocus && !isTabbingBackOut) {\n const entryFocusEvent = new CustomEvent(ENTRY_FOCUS, EVENT_OPTIONS);\n event.currentTarget.dispatchEvent(entryFocusEvent);\n if (!entryFocusEvent.defaultPrevented) {\n const items = getItems().filter((item) => item.focusable);\n const activeItem = items.find((item) => item.active);\n const currentItem = items.find((item) => item.id === currentTabStopId);\n const candidateItems = [activeItem, currentItem, ...items].filter(\n Boolean\n );\n const candidateNodes = candidateItems.map((item) => item.ref.current);\n focusFirst(candidateNodes, preventScrollOnEntryFocus);\n }\n }\n isClickFocusRef.current = false;\n }),\n onBlur: composeEventHandlers(props.onBlur, () => setIsTabbingBackOut(false))\n }\n )\n }\n );\n});\nvar ITEM_NAME = \"RovingFocusGroupItem\";\nvar RovingFocusGroupItem = React.forwardRef(\n (props, forwardedRef) => {\n const {\n __scopeRovingFocusGroup,\n focusable = true,\n active = false,\n tabStopId,\n children,\n ...itemProps\n } = props;\n const autoId = useId();\n const id = tabStopId || autoId;\n const context = useRovingFocusContext(ITEM_NAME, __scopeRovingFocusGroup);\n const isCurrentTabStop = context.currentTabStopId === id;\n const getItems = useCollection(__scopeRovingFocusGroup);\n const { onFocusableItemAdd, onFocusableItemRemove, currentTabStopId } = context;\n React.useEffect(() => {\n if (focusable) {\n onFocusableItemAdd();\n return () => onFocusableItemRemove();\n }\n }, [focusable, onFocusableItemAdd, onFocusableItemRemove]);\n return /* @__PURE__ */ jsx(\n Collection.ItemSlot,\n {\n scope: __scopeRovingFocusGroup,\n id,\n focusable,\n active,\n children: /* @__PURE__ */ jsx(\n Primitive.span,\n {\n tabIndex: isCurrentTabStop ? 0 : -1,\n \"data-orientation\": context.orientation,\n ...itemProps,\n ref: forwardedRef,\n onMouseDown: composeEventHandlers(props.onMouseDown, (event) => {\n if (!focusable) event.preventDefault();\n else context.onItemFocus(id);\n }),\n onFocus: composeEventHandlers(props.onFocus, () => context.onItemFocus(id)),\n onKeyDown: composeEventHandlers(props.onKeyDown, (event) => {\n if (event.key === \"Tab\" && event.shiftKey) {\n context.onItemShiftTab();\n return;\n }\n if (event.target !== event.currentTarget) return;\n const focusIntent = getFocusIntent(event, context.orientation, context.dir);\n if (focusIntent !== void 0) {\n if (event.metaKey || event.ctrlKey || event.altKey || event.shiftKey) return;\n event.preventDefault();\n const items = getItems().filter((item) => item.focusable);\n let candidateNodes = items.map((item) => item.ref.current);\n if (focusIntent === \"last\") candidateNodes.reverse();\n else if (focusIntent === \"prev\" || focusIntent === \"next\") {\n if (focusIntent === \"prev\") candidateNodes.reverse();\n const currentIndex = candidateNodes.indexOf(event.currentTarget);\n candidateNodes = context.loop ? wrapArray(candidateNodes, currentIndex + 1) : candidateNodes.slice(currentIndex + 1);\n }\n setTimeout(() => focusFirst(candidateNodes));\n }\n }),\n children: typeof children === \"function\" ? children({ isCurrentTabStop, hasTabStop: currentTabStopId != null }) : children\n }\n )\n }\n );\n }\n);\nRovingFocusGroupItem.displayName = ITEM_NAME;\nvar MAP_KEY_TO_FOCUS_INTENT = {\n ArrowLeft: \"prev\",\n ArrowUp: \"prev\",\n ArrowRight: \"next\",\n ArrowDown: \"next\",\n PageUp: \"first\",\n Home: \"first\",\n PageDown: \"last\",\n End: \"last\"\n};\nfunction getDirectionAwareKey(key, dir) {\n if (dir !== \"rtl\") return key;\n return key === \"ArrowLeft\" ? \"ArrowRight\" : key === \"ArrowRight\" ? \"ArrowLeft\" : key;\n}\nfunction getFocusIntent(event, orientation, dir) {\n const key = getDirectionAwareKey(event.key, dir);\n if (orientation === \"vertical\" && [\"ArrowLeft\", \"ArrowRight\"].includes(key)) return void 0;\n if (orientation === \"horizontal\" && [\"ArrowUp\", \"ArrowDown\"].includes(key)) return void 0;\n return MAP_KEY_TO_FOCUS_INTENT[key];\n}\nfunction focusFirst(candidates, preventScroll = false) {\n const PREVIOUSLY_FOCUSED_ELEMENT = document.activeElement;\n for (const candidate of candidates) {\n if (candidate === PREVIOUSLY_FOCUSED_ELEMENT) return;\n candidate.focus({ preventScroll });\n if (document.activeElement !== PREVIOUSLY_FOCUSED_ELEMENT) return;\n }\n}\nfunction wrapArray(array, startIndex) {\n return array.map((_, index) => array[(startIndex + index) % array.length]);\n}\nvar Root = RovingFocusGroup;\nvar Item = RovingFocusGroupItem;\nexport {\n Item,\n Root,\n RovingFocusGroup,\n RovingFocusGroupItem,\n createRovingFocusGroupScope\n};\n//# sourceMappingURL=index.mjs.map\n"],"names":[],"mappings":";;;;;;;;;;;;;AAcA;AACA;AACA;AACA;AACG;AACH;AACA;AACA;AACA;AACG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACG;AACA;;"}
|
|
1
|
+
{"version":3,"file":"index.mjs.js","sources":["../../../../../node_modules/@radix-ui/react-roving-focus/dist/index.mjs"],"sourcesContent":["import $98Iye$babelruntimehelpersesmextends from \"@babel/runtime/helpers/esm/extends\";\nimport {forwardRef as $98Iye$forwardRef, createElement as $98Iye$createElement, useRef as $98Iye$useRef, useState as $98Iye$useState, useEffect as $98Iye$useEffect, useCallback as $98Iye$useCallback} from \"react\";\nimport {composeEventHandlers as $98Iye$composeEventHandlers} from \"@radix-ui/primitive\";\nimport {createCollection as $98Iye$createCollection} from \"@radix-ui/react-collection\";\nimport {useComposedRefs as $98Iye$useComposedRefs} from \"@radix-ui/react-compose-refs\";\nimport {createContextScope as $98Iye$createContextScope} from \"@radix-ui/react-context\";\nimport {useId as $98Iye$useId} from \"@radix-ui/react-id\";\nimport {Primitive as $98Iye$Primitive} from \"@radix-ui/react-primitive\";\nimport {useCallbackRef as $98Iye$useCallbackRef} from \"@radix-ui/react-use-callback-ref\";\nimport {useControllableState as $98Iye$useControllableState} from \"@radix-ui/react-use-controllable-state\";\nimport {useDirection as $98Iye$useDirection} from \"@radix-ui/react-direction\";\n\n\n\n\n\n\n\n\n\n\n\n\nconst $d7bdfb9eb0fdf311$var$ENTRY_FOCUS = 'rovingFocusGroup.onEntryFocus';\nconst $d7bdfb9eb0fdf311$var$EVENT_OPTIONS = {\n bubbles: false,\n cancelable: true\n};\n/* -------------------------------------------------------------------------------------------------\n * RovingFocusGroup\n * -----------------------------------------------------------------------------------------------*/ const $d7bdfb9eb0fdf311$var$GROUP_NAME = 'RovingFocusGroup';\nconst [$d7bdfb9eb0fdf311$var$Collection, $d7bdfb9eb0fdf311$var$useCollection, $d7bdfb9eb0fdf311$var$createCollectionScope] = $98Iye$createCollection($d7bdfb9eb0fdf311$var$GROUP_NAME);\nconst [$d7bdfb9eb0fdf311$var$createRovingFocusGroupContext, $d7bdfb9eb0fdf311$export$c7109489551a4f4] = $98Iye$createContextScope($d7bdfb9eb0fdf311$var$GROUP_NAME, [\n $d7bdfb9eb0fdf311$var$createCollectionScope\n]);\nconst [$d7bdfb9eb0fdf311$var$RovingFocusProvider, $d7bdfb9eb0fdf311$var$useRovingFocusContext] = $d7bdfb9eb0fdf311$var$createRovingFocusGroupContext($d7bdfb9eb0fdf311$var$GROUP_NAME);\nconst $d7bdfb9eb0fdf311$export$8699f7c8af148338 = /*#__PURE__*/ $98Iye$forwardRef((props, forwardedRef)=>{\n return /*#__PURE__*/ $98Iye$createElement($d7bdfb9eb0fdf311$var$Collection.Provider, {\n scope: props.__scopeRovingFocusGroup\n }, /*#__PURE__*/ $98Iye$createElement($d7bdfb9eb0fdf311$var$Collection.Slot, {\n scope: props.__scopeRovingFocusGroup\n }, /*#__PURE__*/ $98Iye$createElement($d7bdfb9eb0fdf311$var$RovingFocusGroupImpl, $98Iye$babelruntimehelpersesmextends({}, props, {\n ref: forwardedRef\n }))));\n});\n/*#__PURE__*/ Object.assign($d7bdfb9eb0fdf311$export$8699f7c8af148338, {\n displayName: $d7bdfb9eb0fdf311$var$GROUP_NAME\n});\n/* -----------------------------------------------------------------------------------------------*/ const $d7bdfb9eb0fdf311$var$RovingFocusGroupImpl = /*#__PURE__*/ $98Iye$forwardRef((props, forwardedRef)=>{\n const { __scopeRovingFocusGroup: __scopeRovingFocusGroup , orientation: orientation , loop: loop = false , dir: dir , currentTabStopId: currentTabStopIdProp , defaultCurrentTabStopId: defaultCurrentTabStopId , onCurrentTabStopIdChange: onCurrentTabStopIdChange , onEntryFocus: onEntryFocus , ...groupProps } = props;\n const ref = $98Iye$useRef(null);\n const composedRefs = $98Iye$useComposedRefs(forwardedRef, ref);\n const direction = $98Iye$useDirection(dir);\n const [currentTabStopId = null, setCurrentTabStopId] = $98Iye$useControllableState({\n prop: currentTabStopIdProp,\n defaultProp: defaultCurrentTabStopId,\n onChange: onCurrentTabStopIdChange\n });\n const [isTabbingBackOut, setIsTabbingBackOut] = $98Iye$useState(false);\n const handleEntryFocus = $98Iye$useCallbackRef(onEntryFocus);\n const getItems = $d7bdfb9eb0fdf311$var$useCollection(__scopeRovingFocusGroup);\n const isClickFocusRef = $98Iye$useRef(false);\n const [focusableItemsCount, setFocusableItemsCount] = $98Iye$useState(0);\n $98Iye$useEffect(()=>{\n const node = ref.current;\n if (node) {\n node.addEventListener($d7bdfb9eb0fdf311$var$ENTRY_FOCUS, handleEntryFocus);\n return ()=>node.removeEventListener($d7bdfb9eb0fdf311$var$ENTRY_FOCUS, handleEntryFocus)\n ;\n }\n }, [\n handleEntryFocus\n ]);\n return /*#__PURE__*/ $98Iye$createElement($d7bdfb9eb0fdf311$var$RovingFocusProvider, {\n scope: __scopeRovingFocusGroup,\n orientation: orientation,\n dir: direction,\n loop: loop,\n currentTabStopId: currentTabStopId,\n onItemFocus: $98Iye$useCallback((tabStopId)=>setCurrentTabStopId(tabStopId)\n , [\n setCurrentTabStopId\n ]),\n onItemShiftTab: $98Iye$useCallback(()=>setIsTabbingBackOut(true)\n , []),\n onFocusableItemAdd: $98Iye$useCallback(()=>setFocusableItemsCount((prevCount)=>prevCount + 1\n )\n , []),\n onFocusableItemRemove: $98Iye$useCallback(()=>setFocusableItemsCount((prevCount)=>prevCount - 1\n )\n , [])\n }, /*#__PURE__*/ $98Iye$createElement($98Iye$Primitive.div, $98Iye$babelruntimehelpersesmextends({\n tabIndex: isTabbingBackOut || focusableItemsCount === 0 ? -1 : 0,\n \"data-orientation\": orientation\n }, groupProps, {\n ref: composedRefs,\n style: {\n outline: 'none',\n ...props.style\n },\n onMouseDown: $98Iye$composeEventHandlers(props.onMouseDown, ()=>{\n isClickFocusRef.current = true;\n }),\n onFocus: $98Iye$composeEventHandlers(props.onFocus, (event)=>{\n // We normally wouldn't need this check, because we already check\n // that the focus is on the current target and not bubbling to it.\n // We do this because Safari doesn't focus buttons when clicked, and\n // instead, the wrapper will get focused and not through a bubbling event.\n const isKeyboardFocus = !isClickFocusRef.current;\n if (event.target === event.currentTarget && isKeyboardFocus && !isTabbingBackOut) {\n const entryFocusEvent = new CustomEvent($d7bdfb9eb0fdf311$var$ENTRY_FOCUS, $d7bdfb9eb0fdf311$var$EVENT_OPTIONS);\n event.currentTarget.dispatchEvent(entryFocusEvent);\n if (!entryFocusEvent.defaultPrevented) {\n const items = getItems().filter((item)=>item.focusable\n );\n const activeItem = items.find((item)=>item.active\n );\n const currentItem = items.find((item)=>item.id === currentTabStopId\n );\n const candidateItems = [\n activeItem,\n currentItem,\n ...items\n ].filter(Boolean);\n const candidateNodes = candidateItems.map((item)=>item.ref.current\n );\n $d7bdfb9eb0fdf311$var$focusFirst(candidateNodes);\n }\n }\n isClickFocusRef.current = false;\n }),\n onBlur: $98Iye$composeEventHandlers(props.onBlur, ()=>setIsTabbingBackOut(false)\n )\n })));\n});\n/* -------------------------------------------------------------------------------------------------\n * RovingFocusGroupItem\n * -----------------------------------------------------------------------------------------------*/ const $d7bdfb9eb0fdf311$var$ITEM_NAME = 'RovingFocusGroupItem';\nconst $d7bdfb9eb0fdf311$export$ab9df7c53fe8454 = /*#__PURE__*/ $98Iye$forwardRef((props, forwardedRef)=>{\n const { __scopeRovingFocusGroup: __scopeRovingFocusGroup , focusable: focusable = true , active: active = false , tabStopId: tabStopId , ...itemProps } = props;\n const autoId = $98Iye$useId();\n const id = tabStopId || autoId;\n const context = $d7bdfb9eb0fdf311$var$useRovingFocusContext($d7bdfb9eb0fdf311$var$ITEM_NAME, __scopeRovingFocusGroup);\n const isCurrentTabStop = context.currentTabStopId === id;\n const getItems = $d7bdfb9eb0fdf311$var$useCollection(__scopeRovingFocusGroup);\n const { onFocusableItemAdd: onFocusableItemAdd , onFocusableItemRemove: onFocusableItemRemove } = context;\n $98Iye$useEffect(()=>{\n if (focusable) {\n onFocusableItemAdd();\n return ()=>onFocusableItemRemove()\n ;\n }\n }, [\n focusable,\n onFocusableItemAdd,\n onFocusableItemRemove\n ]);\n return /*#__PURE__*/ $98Iye$createElement($d7bdfb9eb0fdf311$var$Collection.ItemSlot, {\n scope: __scopeRovingFocusGroup,\n id: id,\n focusable: focusable,\n active: active\n }, /*#__PURE__*/ $98Iye$createElement($98Iye$Primitive.span, $98Iye$babelruntimehelpersesmextends({\n tabIndex: isCurrentTabStop ? 0 : -1,\n \"data-orientation\": context.orientation\n }, itemProps, {\n ref: forwardedRef,\n onMouseDown: $98Iye$composeEventHandlers(props.onMouseDown, (event)=>{\n // We prevent focusing non-focusable items on `mousedown`.\n // Even though the item has tabIndex={-1}, that only means take it out of the tab order.\n if (!focusable) event.preventDefault(); // Safari doesn't focus a button when clicked so we run our logic on mousedown also\n else context.onItemFocus(id);\n }),\n onFocus: $98Iye$composeEventHandlers(props.onFocus, ()=>context.onItemFocus(id)\n ),\n onKeyDown: $98Iye$composeEventHandlers(props.onKeyDown, (event)=>{\n if (event.key === 'Tab' && event.shiftKey) {\n context.onItemShiftTab();\n return;\n }\n if (event.target !== event.currentTarget) return;\n const focusIntent = $d7bdfb9eb0fdf311$var$getFocusIntent(event, context.orientation, context.dir);\n if (focusIntent !== undefined) {\n event.preventDefault();\n const items = getItems().filter((item)=>item.focusable\n );\n let candidateNodes = items.map((item)=>item.ref.current\n );\n if (focusIntent === 'last') candidateNodes.reverse();\n else if (focusIntent === 'prev' || focusIntent === 'next') {\n if (focusIntent === 'prev') candidateNodes.reverse();\n const currentIndex = candidateNodes.indexOf(event.currentTarget);\n candidateNodes = context.loop ? $d7bdfb9eb0fdf311$var$wrapArray(candidateNodes, currentIndex + 1) : candidateNodes.slice(currentIndex + 1);\n }\n /**\n * Imperative focus during keydown is risky so we prevent React's batching updates\n * to avoid potential bugs. See: https://github.com/facebook/react/issues/20332\n */ setTimeout(()=>$d7bdfb9eb0fdf311$var$focusFirst(candidateNodes)\n );\n }\n })\n })));\n});\n/*#__PURE__*/ Object.assign($d7bdfb9eb0fdf311$export$ab9df7c53fe8454, {\n displayName: $d7bdfb9eb0fdf311$var$ITEM_NAME\n});\n/* -----------------------------------------------------------------------------------------------*/ // prettier-ignore\nconst $d7bdfb9eb0fdf311$var$MAP_KEY_TO_FOCUS_INTENT = {\n ArrowLeft: 'prev',\n ArrowUp: 'prev',\n ArrowRight: 'next',\n ArrowDown: 'next',\n PageUp: 'first',\n Home: 'first',\n PageDown: 'last',\n End: 'last'\n};\nfunction $d7bdfb9eb0fdf311$var$getDirectionAwareKey(key, dir) {\n if (dir !== 'rtl') return key;\n return key === 'ArrowLeft' ? 'ArrowRight' : key === 'ArrowRight' ? 'ArrowLeft' : key;\n}\nfunction $d7bdfb9eb0fdf311$var$getFocusIntent(event, orientation, dir) {\n const key = $d7bdfb9eb0fdf311$var$getDirectionAwareKey(event.key, dir);\n if (orientation === 'vertical' && [\n 'ArrowLeft',\n 'ArrowRight'\n ].includes(key)) return undefined;\n if (orientation === 'horizontal' && [\n 'ArrowUp',\n 'ArrowDown'\n ].includes(key)) return undefined;\n return $d7bdfb9eb0fdf311$var$MAP_KEY_TO_FOCUS_INTENT[key];\n}\nfunction $d7bdfb9eb0fdf311$var$focusFirst(candidates) {\n const PREVIOUSLY_FOCUSED_ELEMENT = document.activeElement;\n for (const candidate of candidates){\n // if focus is already where we want to go, we don't want to keep going through the candidates\n if (candidate === PREVIOUSLY_FOCUSED_ELEMENT) return;\n candidate.focus();\n if (document.activeElement !== PREVIOUSLY_FOCUSED_ELEMENT) return;\n }\n}\n/**\n * Wraps an array around itself at a given start index\n * Example: `wrapArray(['a', 'b', 'c', 'd'], 2) === ['c', 'd', 'a', 'b']`\n */ function $d7bdfb9eb0fdf311$var$wrapArray(array, startIndex) {\n return array.map((_, index)=>array[(startIndex + index) % array.length]\n );\n}\nconst $d7bdfb9eb0fdf311$export$be92b6f5f03c0fe9 = $d7bdfb9eb0fdf311$export$8699f7c8af148338;\nconst $d7bdfb9eb0fdf311$export$6d08773d2e66f8f2 = $d7bdfb9eb0fdf311$export$ab9df7c53fe8454;\n\n\n\n\nexport {$d7bdfb9eb0fdf311$export$c7109489551a4f4 as createRovingFocusGroupScope, $d7bdfb9eb0fdf311$export$8699f7c8af148338 as RovingFocusGroup, $d7bdfb9eb0fdf311$export$ab9df7c53fe8454 as RovingFocusGroupItem, $d7bdfb9eb0fdf311$export$be92b6f5f03c0fe9 as Root, $d7bdfb9eb0fdf311$export$6d08773d2e66f8f2 as Item};\n//# sourceMappingURL=index.mjs.map\n"],"names":["$98Iye$createCollection","$98Iye$createContextScope","$98Iye$forwardRef","$98Iye$createElement","$98Iye$babelruntimehelpersesmextends","$98Iye$useRef","$98Iye$useComposedRefs","$98Iye$useDirection","$98Iye$useControllableState","$98Iye$useState","$98Iye$useCallbackRef","$98Iye$useEffect","$98Iye$useCallback","$98Iye$Primitive","$98Iye$composeEventHandlers","$98Iye$useId"],"mappings":";;;;;;;;;;;;AAuBA,MAAM,iCAAiC,GAAG,+BAA+B,CAAC;AAC1E,MAAM,mCAAmC,GAAG;AAC5C,IAAI,OAAO,EAAE,KAAK;AAClB,IAAI,UAAU,EAAE,IAAI;AACpB,CAAC,CAAC;AACF;AACA;AACA,qGAAqG,MAAM,gCAAgC,GAAG,kBAAkB,CAAC;AACjK,MAAM,CAAC,gCAAgC,EAAE,mCAAmC,EAAE,2CAA2C,CAAC,GAAGA,yCAAuB,CAAC,gCAAgC,CAAC,CAAC;AAClL,MAAC,CAAC,mDAAmD,EAAE,wCAAwC,CAAC,GAAGC,wCAAyB,CAAC,gCAAgC,EAAE;AACpK,IAAI,2CAA2C;AAC/C,CAAC,EAAE;AACH,MAAM,CAAC,yCAAyC,EAAE,2CAA2C,CAAC,GAAG,mDAAmD,CAAC,gCAAgC,CAAC,CAAC;AAClL,MAAC,yCAAyC,iBAAiBC,UAAiB,CAAC,CAAC,KAAK,EAAE,YAAY,GAAG;AACz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,WAAW;AACnB,KAAK,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE,OAAO,SAAS,CAAC;AACtC,IAAI,OAAO,6CAA6C,CAAC,GAAG,CAAC,CAAC;AAC9D,CAAC;AACD,SAAS,gCAAgC,CAAC,UAAU,EAAE;AACtD,IAAI,MAAM,0BAA0B,GAAG,QAAQ,CAAC,aAAa,CAAC;AAC9D,IAAI,KAAK,MAAM,SAAS,IAAI,UAAU,CAAC;AACvC;AACA,QAAQ,IAAI,SAAS,KAAK,0BAA0B,EAAE,OAAO;AAC7D,QAAQ,SAAS,CAAC,KAAK,EAAE,CAAC;AAC1B,QAAQ,IAAI,QAAQ,CAAC,aAAa,KAAK,0BAA0B,EAAE,OAAO;AAC1E,KAAK;AACL,CAAC;AACD;AACA;AACA;AACA,IAAI,SAAS,+BAA+B,CAAC,KAAK,EAAE,UAAU,EAAE;AAChE,IAAI,OAAO,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,KAAK,GAAG,KAAK,CAAC,CAAC,UAAU,GAAG,KAAK,IAAI,KAAK,CAAC,MAAM,CAAC;AAC3E,KAAK,CAAC;AACN,CAAC;AACI,MAAC,yCAAyC,GAAG,0CAA0C;AACvF,MAAC,yCAAyC,GAAG;;;;"}
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import * as React from 'react';
|
|
3
|
-
import { Primitive } from '
|
|
4
|
-
import { Presence } from '
|
|
5
|
-
import { createContextScope } from '
|
|
6
|
-
import { useComposedRefs } from '
|
|
7
|
-
import { useCallbackRef } from '
|
|
8
|
-
import { useDirection } from '
|
|
9
|
-
import { useLayoutEffect as useLayoutEffect2 } from '
|
|
10
|
-
import { clamp } from '
|
|
11
|
-
import { composeEventHandlers } from '
|
|
3
|
+
import { Primitive } from '../node_modules/@radix-ui/react-primitive/dist/index.mjs.js';
|
|
4
|
+
import { Presence } from '../node_modules/@radix-ui/react-presence/dist/index.mjs.js';
|
|
5
|
+
import { createContextScope } from '../node_modules/@radix-ui/react-context/dist/index.mjs.js';
|
|
6
|
+
import { useComposedRefs } from '../node_modules/@radix-ui/react-compose-refs/dist/index.mjs.js';
|
|
7
|
+
import { useCallbackRef } from '../node_modules/@radix-ui/react-use-callback-ref/dist/index.mjs.js';
|
|
8
|
+
import { useDirection } from '../node_modules/@radix-ui/react-direction/dist/index.mjs.js';
|
|
9
|
+
import { useLayoutEffect as useLayoutEffect2 } from '../node_modules/@radix-ui/react-use-layout-effect/dist/index.mjs.js';
|
|
10
|
+
import { clamp } from '../node_modules/@radix-ui/number/dist/index.mjs.js';
|
|
11
|
+
import { composeEventHandlers } from '../node_modules/@radix-ui/primitive/dist/index.mjs.js';
|
|
12
12
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
13
13
|
|
|
14
14
|
function useStateMachine(initialState, machine) {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.mjs.js","sources":["../../../../../../../../node_modules/@radix-ui/react-scroll-area/node_modules/@radix-ui/number/dist/index.mjs"],"sourcesContent":["// packages/core/number/src/number.ts\nfunction clamp(value, [min, max]) {\n return Math.min(max, Math.max(min, value));\n}\nexport {\n clamp\n};\n//# sourceMappingURL=index.mjs.map\n"],"names":[],"mappings":"AAAA;AACA,SAAS,KAAK,CAAC,KAAK,EAAE,CAAC,GAAG,EAAE,GAAG,CAAC,EAAE;AAClC,EAAE,OAAO,IAAI,CAAC,GAAG,CAAC,GAAG,EAAE,IAAI,CAAC,GAAG,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC,CAAC;AAC7C;;;;"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
// src/primitive.tsx
|
|
2
|
+
function composeEventHandlers(originalEventHandler, ourEventHandler, { checkForDefaultPrevented = true } = {}) {
|
|
3
|
+
return function handleEvent(event) {
|
|
4
|
+
originalEventHandler?.(event);
|
|
5
|
+
if (checkForDefaultPrevented === false || !event.defaultPrevented) {
|
|
6
|
+
return ourEventHandler?.(event);
|
|
7
|
+
}
|
|
8
|
+
};
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export { composeEventHandlers };
|
|
12
|
+
//# sourceMappingURL=index.mjs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.mjs.js","sources":["../../../../../../../../node_modules/@radix-ui/react-scroll-area/node_modules/@radix-ui/primitive/dist/index.mjs"],"sourcesContent":["// src/primitive.tsx\nvar canUseDOM = !!(typeof window !== \"undefined\" && window.document && window.document.createElement);\nfunction composeEventHandlers(originalEventHandler, ourEventHandler, { checkForDefaultPrevented = true } = {}) {\n return function handleEvent(event) {\n originalEventHandler?.(event);\n if (checkForDefaultPrevented === false || !event.defaultPrevented) {\n return ourEventHandler?.(event);\n }\n };\n}\nfunction getOwnerWindow(element) {\n if (!canUseDOM) {\n throw new Error(\"Cannot access window outside of the DOM\");\n }\n return element?.ownerDocument?.defaultView ?? window;\n}\nfunction getOwnerDocument(element) {\n if (!canUseDOM) {\n throw new Error(\"Cannot access document outside of the DOM\");\n }\n return element?.ownerDocument ?? document;\n}\nfunction getActiveElement(node, activeDescendant = false) {\n const { activeElement } = getOwnerDocument(node);\n if (!activeElement?.nodeName) {\n return null;\n }\n if (isFrame(activeElement) && activeElement.contentDocument) {\n return getActiveElement(activeElement.contentDocument.body, activeDescendant);\n }\n if (activeDescendant) {\n const id = activeElement.getAttribute(\"aria-activedescendant\");\n if (id) {\n const element = getOwnerDocument(activeElement).getElementById(id);\n if (element) {\n return element;\n }\n }\n }\n return activeElement;\n}\nfunction isFrame(element) {\n return element.tagName === \"IFRAME\";\n}\nexport {\n canUseDOM,\n composeEventHandlers,\n getActiveElement,\n getOwnerDocument,\n getOwnerWindow,\n isFrame\n};\n//# sourceMappingURL=index.mjs.map\n"],"names":[],"mappings":"AAAA;AAEA,SAAS,oBAAoB,CAAC,oBAAoB,EAAE,eAAe,EAAE,EAAE,wBAAwB,GAAG,IAAI,EAAE,GAAG,EAAE,EAAE;AAC/G,EAAE,OAAO,SAAS,WAAW,CAAC,KAAK,EAAE;AACrC,IAAI,oBAAoB,GAAG,KAAK,CAAC,CAAC;AAClC,IAAI,IAAI,wBAAwB,KAAK,KAAK,IAAI,CAAC,KAAK,CAAC,gBAAgB,EAAE;AACvE,MAAM,OAAO,eAAe,GAAG,KAAK,CAAC,CAAC;AACtC,KAAK;AACL,GAAG,CAAC;AACJ;;;;"}
|