@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,323 +1,280 @@
|
|
|
1
|
-
|
|
2
|
-
import
|
|
3
|
-
import { composeEventHandlers } from '../../primitive/dist/index.mjs.js';
|
|
4
|
-
import { useComposedRefs } from '../../react-compose-refs/dist/index.mjs.js';
|
|
5
|
-
import { createContextScope
|
|
6
|
-
import { useId } from '../../react-id/dist/index.mjs.js';
|
|
7
|
-
import { useControllableState } from '../../react-use-controllable-state/dist/index.mjs.js';
|
|
8
|
-
import { DismissableLayer } from '../../react-dismissable-layer/dist/index.mjs.js';
|
|
9
|
-
import { FocusScope } from '../../react-focus-scope/dist/index.mjs.js';
|
|
10
|
-
import { Portal as
|
|
11
|
-
import { Presence } from '../../react-presence/dist/index.mjs.js';
|
|
12
|
-
import { Primitive } from '../../react-primitive/dist/index.mjs.js';
|
|
13
|
-
import { useFocusGuards } from '../../react-focus-guards/dist/index.mjs.js';
|
|
1
|
+
import _extends from '../../../@babel/runtime/helpers/esm/extends.js';
|
|
2
|
+
import { forwardRef, createElement, useRef, useEffect, Fragment, useCallback, Children } from 'react';
|
|
3
|
+
import { composeEventHandlers as $e42e1063c40fb3ef$export$b9ecd428b558ff10 } from '../../primitive/dist/index.mjs.js';
|
|
4
|
+
import { useComposedRefs as $6ed0406888f73fc4$export$c7b2cbe3552a0d05 } from '../../react-compose-refs/dist/index.mjs.js';
|
|
5
|
+
import { createContextScope as $c512c27ab02ef895$export$50c7b4e9d9f19c1 } from '../../react-context/dist/index.mjs.js';
|
|
6
|
+
import { useId as $1746a345f3d73bb7$export$f680877a34711e37 } from '../../react-id/dist/index.mjs.js';
|
|
7
|
+
import { useControllableState as $71cd76cc60e0454e$export$6f32135080cb4c3 } from '../../react-use-controllable-state/dist/index.mjs.js';
|
|
8
|
+
import { DismissableLayer as $5cb92bef7577960e$export$177fb62ff3ec1f22 } from '../../react-dismissable-layer/dist/index.mjs.js';
|
|
9
|
+
import { FocusScope as $d3863c46a17e8a28$export$20e40289641fbbb6 } from '../../react-focus-scope/dist/index.mjs.js';
|
|
10
|
+
import { Portal as $f1701beae083dbae$export$602eac185826482c } from '../../react-portal/dist/index.mjs.js';
|
|
11
|
+
import { Presence as $921a889cee6df7e8$export$99c2b779aa4e8b8b } from '../../react-presence/dist/index.mjs.js';
|
|
12
|
+
import { Primitive as $8927f6f2acc4f386$export$250ffa63cdc0d034 } from '../../react-primitive/dist/index.mjs.js';
|
|
13
|
+
import { useFocusGuards as $3db38b7d1fb3fe6a$export$b7ece24a22aeda8c } from '../../react-focus-guards/dist/index.mjs.js';
|
|
14
14
|
import ReactRemoveScroll from '../../../react-remove-scroll/dist/es2015/Combination.js';
|
|
15
15
|
import { hideOthers } from '../../../aria-hidden/dist/es2015/index.js';
|
|
16
|
-
import {
|
|
17
|
-
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
16
|
+
import { Slot as $5e63c961fc1ce211$export$8c6ed5c666ac1360 } from '../node_modules/@radix-ui/react-slot/dist/index.mjs.js';
|
|
18
17
|
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
var
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
children,
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
onOpenChange: setOpen,
|
|
50
|
-
onOpenToggle: React.useCallback(() => setOpen((prevOpen) => !prevOpen), [setOpen]),
|
|
51
|
-
modal,
|
|
52
|
-
children
|
|
53
|
-
}
|
|
54
|
-
);
|
|
18
|
+
/* -------------------------------------------------------------------------------------------------
|
|
19
|
+
* Dialog
|
|
20
|
+
* -----------------------------------------------------------------------------------------------*/ const $5d3850c4d0b4e6c7$var$DIALOG_NAME = 'Dialog';
|
|
21
|
+
const [$5d3850c4d0b4e6c7$var$createDialogContext, $5d3850c4d0b4e6c7$export$cc702773b8ea3e41] = $c512c27ab02ef895$export$50c7b4e9d9f19c1($5d3850c4d0b4e6c7$var$DIALOG_NAME);
|
|
22
|
+
const [$5d3850c4d0b4e6c7$var$DialogProvider, $5d3850c4d0b4e6c7$var$useDialogContext] = $5d3850c4d0b4e6c7$var$createDialogContext($5d3850c4d0b4e6c7$var$DIALOG_NAME);
|
|
23
|
+
const $5d3850c4d0b4e6c7$export$3ddf2d174ce01153 = (props)=>{
|
|
24
|
+
const { __scopeDialog: __scopeDialog , children: children , open: openProp , defaultOpen: defaultOpen , onOpenChange: onOpenChange , modal: modal = true } = props;
|
|
25
|
+
const triggerRef = useRef(null);
|
|
26
|
+
const contentRef = useRef(null);
|
|
27
|
+
const [open = false, setOpen] = $71cd76cc60e0454e$export$6f32135080cb4c3({
|
|
28
|
+
prop: openProp,
|
|
29
|
+
defaultProp: defaultOpen,
|
|
30
|
+
onChange: onOpenChange
|
|
31
|
+
});
|
|
32
|
+
return /*#__PURE__*/ createElement($5d3850c4d0b4e6c7$var$DialogProvider, {
|
|
33
|
+
scope: __scopeDialog,
|
|
34
|
+
triggerRef: triggerRef,
|
|
35
|
+
contentRef: contentRef,
|
|
36
|
+
contentId: $1746a345f3d73bb7$export$f680877a34711e37(),
|
|
37
|
+
titleId: $1746a345f3d73bb7$export$f680877a34711e37(),
|
|
38
|
+
descriptionId: $1746a345f3d73bb7$export$f680877a34711e37(),
|
|
39
|
+
open: open,
|
|
40
|
+
onOpenChange: setOpen,
|
|
41
|
+
onOpenToggle: useCallback(()=>setOpen((prevOpen)=>!prevOpen
|
|
42
|
+
)
|
|
43
|
+
, [
|
|
44
|
+
setOpen
|
|
45
|
+
]),
|
|
46
|
+
modal: modal
|
|
47
|
+
}, children);
|
|
55
48
|
};
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
var
|
|
59
|
-
|
|
60
|
-
const { __scopeDialog, ...triggerProps } = props;
|
|
61
|
-
const context = useDialogContext(TRIGGER_NAME, __scopeDialog);
|
|
62
|
-
const composedTriggerRef =
|
|
63
|
-
return
|
|
64
|
-
Primitive.button,
|
|
65
|
-
{
|
|
49
|
+
/* -------------------------------------------------------------------------------------------------
|
|
50
|
+
* DialogTrigger
|
|
51
|
+
* -----------------------------------------------------------------------------------------------*/ const $5d3850c4d0b4e6c7$var$TRIGGER_NAME = 'DialogTrigger';
|
|
52
|
+
const $5d3850c4d0b4e6c7$export$2e1e1122cf0cba88 = /*#__PURE__*/ forwardRef((props, forwardedRef)=>{
|
|
53
|
+
const { __scopeDialog: __scopeDialog , ...triggerProps } = props;
|
|
54
|
+
const context = $5d3850c4d0b4e6c7$var$useDialogContext($5d3850c4d0b4e6c7$var$TRIGGER_NAME, __scopeDialog);
|
|
55
|
+
const composedTriggerRef = $6ed0406888f73fc4$export$c7b2cbe3552a0d05(forwardedRef, context.triggerRef);
|
|
56
|
+
return /*#__PURE__*/ createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.button, _extends({
|
|
66
57
|
type: "button",
|
|
67
58
|
"aria-haspopup": "dialog",
|
|
68
59
|
"aria-expanded": context.open,
|
|
69
60
|
"aria-controls": context.contentId,
|
|
70
|
-
"data-state": getState(context.open)
|
|
71
|
-
|
|
61
|
+
"data-state": $5d3850c4d0b4e6c7$var$getState(context.open)
|
|
62
|
+
}, triggerProps, {
|
|
72
63
|
ref: composedTriggerRef,
|
|
73
|
-
onClick:
|
|
74
|
-
|
|
75
|
-
);
|
|
76
|
-
}
|
|
77
|
-
);
|
|
78
|
-
DialogTrigger.displayName = TRIGGER_NAME;
|
|
79
|
-
var PORTAL_NAME = "DialogPortal";
|
|
80
|
-
var [PortalProvider, usePortalContext] = createDialogContext(PORTAL_NAME, {
|
|
81
|
-
forceMount: void 0
|
|
64
|
+
onClick: $e42e1063c40fb3ef$export$b9ecd428b558ff10(props.onClick, context.onOpenToggle)
|
|
65
|
+
}));
|
|
82
66
|
});
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
67
|
+
/* -------------------------------------------------------------------------------------------------
|
|
68
|
+
* DialogPortal
|
|
69
|
+
* -----------------------------------------------------------------------------------------------*/ const $5d3850c4d0b4e6c7$var$PORTAL_NAME = 'DialogPortal';
|
|
70
|
+
const [$5d3850c4d0b4e6c7$var$PortalProvider, $5d3850c4d0b4e6c7$var$usePortalContext] = $5d3850c4d0b4e6c7$var$createDialogContext($5d3850c4d0b4e6c7$var$PORTAL_NAME, {
|
|
71
|
+
forceMount: undefined
|
|
72
|
+
});
|
|
73
|
+
const $5d3850c4d0b4e6c7$export$dad7c95542bacce0 = (props)=>{
|
|
74
|
+
const { __scopeDialog: __scopeDialog , forceMount: forceMount , children: children , container: container } = props;
|
|
75
|
+
const context = $5d3850c4d0b4e6c7$var$useDialogContext($5d3850c4d0b4e6c7$var$PORTAL_NAME, __scopeDialog);
|
|
76
|
+
return /*#__PURE__*/ createElement($5d3850c4d0b4e6c7$var$PortalProvider, {
|
|
77
|
+
scope: __scopeDialog,
|
|
78
|
+
forceMount: forceMount
|
|
79
|
+
}, Children.map(children, (child)=>/*#__PURE__*/ createElement($921a889cee6df7e8$export$99c2b779aa4e8b8b, {
|
|
80
|
+
present: forceMount || context.open
|
|
81
|
+
}, /*#__PURE__*/ createElement($f1701beae083dbae$export$602eac185826482c, {
|
|
82
|
+
asChild: true,
|
|
83
|
+
container: container
|
|
84
|
+
}, child))
|
|
85
|
+
));
|
|
87
86
|
};
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
var
|
|
91
|
-
|
|
92
|
-
const portalContext = usePortalContext(OVERLAY_NAME, props.__scopeDialog);
|
|
93
|
-
const { forceMount = portalContext.forceMount, ...overlayProps } = props;
|
|
94
|
-
const context = useDialogContext(OVERLAY_NAME, props.__scopeDialog);
|
|
95
|
-
return context.modal ?
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
const { __scopeDialog, ...overlayProps } = props;
|
|
103
|
-
const context = useDialogContext(OVERLAY_NAME, __scopeDialog);
|
|
104
|
-
return
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
87
|
+
/* -------------------------------------------------------------------------------------------------
|
|
88
|
+
* DialogOverlay
|
|
89
|
+
* -----------------------------------------------------------------------------------------------*/ const $5d3850c4d0b4e6c7$var$OVERLAY_NAME = 'DialogOverlay';
|
|
90
|
+
const $5d3850c4d0b4e6c7$export$bd1d06c79be19e17 = /*#__PURE__*/ forwardRef((props, forwardedRef)=>{
|
|
91
|
+
const portalContext = $5d3850c4d0b4e6c7$var$usePortalContext($5d3850c4d0b4e6c7$var$OVERLAY_NAME, props.__scopeDialog);
|
|
92
|
+
const { forceMount: forceMount = portalContext.forceMount , ...overlayProps } = props;
|
|
93
|
+
const context = $5d3850c4d0b4e6c7$var$useDialogContext($5d3850c4d0b4e6c7$var$OVERLAY_NAME, props.__scopeDialog);
|
|
94
|
+
return context.modal ? /*#__PURE__*/ createElement($921a889cee6df7e8$export$99c2b779aa4e8b8b, {
|
|
95
|
+
present: forceMount || context.open
|
|
96
|
+
}, /*#__PURE__*/ createElement($5d3850c4d0b4e6c7$var$DialogOverlayImpl, _extends({}, overlayProps, {
|
|
97
|
+
ref: forwardedRef
|
|
98
|
+
}))) : null;
|
|
99
|
+
});
|
|
100
|
+
const $5d3850c4d0b4e6c7$var$DialogOverlayImpl = /*#__PURE__*/ forwardRef((props, forwardedRef)=>{
|
|
101
|
+
const { __scopeDialog: __scopeDialog , ...overlayProps } = props;
|
|
102
|
+
const context = $5d3850c4d0b4e6c7$var$useDialogContext($5d3850c4d0b4e6c7$var$OVERLAY_NAME, __scopeDialog);
|
|
103
|
+
return(/*#__PURE__*/ // Make sure `Content` is scrollable even when it doesn't live inside `RemoveScroll`
|
|
104
|
+
// ie. when `Overlay` and `Content` are siblings
|
|
105
|
+
createElement(ReactRemoveScroll, {
|
|
106
|
+
as: $5e63c961fc1ce211$export$8c6ed5c666ac1360,
|
|
107
|
+
allowPinchZoom: true,
|
|
108
|
+
shards: [
|
|
109
|
+
context.contentRef
|
|
110
|
+
]
|
|
111
|
+
}, /*#__PURE__*/ createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.div, _extends({
|
|
112
|
+
"data-state": $5d3850c4d0b4e6c7$var$getState(context.open)
|
|
113
|
+
}, overlayProps, {
|
|
114
|
+
ref: forwardedRef // We re-enable pointer-events prevented by `Dialog.Content` to allow scrolling the overlay.
|
|
115
|
+
,
|
|
116
|
+
style: {
|
|
117
|
+
pointerEvents: 'auto',
|
|
118
|
+
...overlayProps.style
|
|
114
119
|
}
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
var
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
const
|
|
123
|
-
const
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
const
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
120
|
+
}))));
|
|
121
|
+
});
|
|
122
|
+
/* -------------------------------------------------------------------------------------------------
|
|
123
|
+
* DialogContent
|
|
124
|
+
* -----------------------------------------------------------------------------------------------*/ const $5d3850c4d0b4e6c7$var$CONTENT_NAME = 'DialogContent';
|
|
125
|
+
const $5d3850c4d0b4e6c7$export$b6d9565de1e068cf = /*#__PURE__*/ forwardRef((props, forwardedRef)=>{
|
|
126
|
+
const portalContext = $5d3850c4d0b4e6c7$var$usePortalContext($5d3850c4d0b4e6c7$var$CONTENT_NAME, props.__scopeDialog);
|
|
127
|
+
const { forceMount: forceMount = portalContext.forceMount , ...contentProps } = props;
|
|
128
|
+
const context = $5d3850c4d0b4e6c7$var$useDialogContext($5d3850c4d0b4e6c7$var$CONTENT_NAME, props.__scopeDialog);
|
|
129
|
+
return /*#__PURE__*/ createElement($921a889cee6df7e8$export$99c2b779aa4e8b8b, {
|
|
130
|
+
present: forceMount || context.open
|
|
131
|
+
}, context.modal ? /*#__PURE__*/ createElement($5d3850c4d0b4e6c7$var$DialogContentModal, _extends({}, contentProps, {
|
|
132
|
+
ref: forwardedRef
|
|
133
|
+
})) : /*#__PURE__*/ createElement($5d3850c4d0b4e6c7$var$DialogContentNonModal, _extends({}, contentProps, {
|
|
134
|
+
ref: forwardedRef
|
|
135
|
+
})));
|
|
136
|
+
});
|
|
137
|
+
/* -----------------------------------------------------------------------------------------------*/ const $5d3850c4d0b4e6c7$var$DialogContentModal = /*#__PURE__*/ forwardRef((props, forwardedRef)=>{
|
|
138
|
+
const context = $5d3850c4d0b4e6c7$var$useDialogContext($5d3850c4d0b4e6c7$var$CONTENT_NAME, props.__scopeDialog);
|
|
139
|
+
const contentRef = useRef(null);
|
|
140
|
+
const composedRefs = $6ed0406888f73fc4$export$c7b2cbe3552a0d05(forwardedRef, context.contentRef, contentRef); // aria-hide everything except the content (better supported equivalent to setting aria-modal)
|
|
141
|
+
useEffect(()=>{
|
|
142
|
+
const content = contentRef.current;
|
|
143
|
+
if (content) return hideOthers(content);
|
|
137
144
|
}, []);
|
|
138
|
-
return
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
...props,
|
|
142
|
-
ref: composedRefs,
|
|
145
|
+
return /*#__PURE__*/ createElement($5d3850c4d0b4e6c7$var$DialogContentImpl, _extends({}, props, {
|
|
146
|
+
ref: composedRefs // we make sure focus isn't trapped once `DialogContent` has been closed
|
|
147
|
+
,
|
|
143
148
|
trapFocus: context.open,
|
|
144
149
|
disableOutsidePointerEvents: true,
|
|
145
|
-
onCloseAutoFocus:
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
onPointerDownOutside: composeEventHandlers(props.onPointerDownOutside, (event) => {
|
|
150
|
-
const originalEvent = event.detail.originalEvent;
|
|
151
|
-
const ctrlLeftClick = originalEvent.button === 0 && originalEvent.ctrlKey === true;
|
|
152
|
-
const isRightClick = originalEvent.button === 2 || ctrlLeftClick;
|
|
153
|
-
if (isRightClick) event.preventDefault();
|
|
150
|
+
onCloseAutoFocus: $e42e1063c40fb3ef$export$b9ecd428b558ff10(props.onCloseAutoFocus, (event)=>{
|
|
151
|
+
var _context$triggerRef$c;
|
|
152
|
+
event.preventDefault();
|
|
153
|
+
(_context$triggerRef$c = context.triggerRef.current) === null || _context$triggerRef$c === void 0 || _context$triggerRef$c.focus();
|
|
154
154
|
}),
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
155
|
+
onPointerDownOutside: $e42e1063c40fb3ef$export$b9ecd428b558ff10(props.onPointerDownOutside, (event)=>{
|
|
156
|
+
const originalEvent = event.detail.originalEvent;
|
|
157
|
+
const ctrlLeftClick = originalEvent.button === 0 && originalEvent.ctrlKey === true;
|
|
158
|
+
const isRightClick = originalEvent.button === 2 || ctrlLeftClick; // If the event is a right-click, we shouldn't close because
|
|
159
|
+
// it is effectively as if we right-clicked the `Overlay`.
|
|
160
|
+
if (isRightClick) event.preventDefault();
|
|
161
|
+
}) // When focus is trapped, a `focusout` event may still happen.
|
|
162
|
+
,
|
|
163
|
+
onFocusOutside: $e42e1063c40fb3ef$export$b9ecd428b558ff10(props.onFocusOutside, (event)=>event.preventDefault()
|
|
158
164
|
)
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
);
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
const hasInteractedOutsideRef = React.useRef(false);
|
|
167
|
-
const hasPointerDownOutsideRef = React.useRef(false);
|
|
168
|
-
return /* @__PURE__ */ jsx(
|
|
169
|
-
DialogContentImpl,
|
|
170
|
-
{
|
|
171
|
-
...props,
|
|
165
|
+
}));
|
|
166
|
+
});
|
|
167
|
+
/* -----------------------------------------------------------------------------------------------*/ const $5d3850c4d0b4e6c7$var$DialogContentNonModal = /*#__PURE__*/ forwardRef((props, forwardedRef)=>{
|
|
168
|
+
const context = $5d3850c4d0b4e6c7$var$useDialogContext($5d3850c4d0b4e6c7$var$CONTENT_NAME, props.__scopeDialog);
|
|
169
|
+
const hasInteractedOutsideRef = useRef(false);
|
|
170
|
+
const hasPointerDownOutsideRef = useRef(false);
|
|
171
|
+
return /*#__PURE__*/ createElement($5d3850c4d0b4e6c7$var$DialogContentImpl, _extends({}, props, {
|
|
172
172
|
ref: forwardedRef,
|
|
173
173
|
trapFocus: false,
|
|
174
174
|
disableOutsidePointerEvents: false,
|
|
175
|
-
onCloseAutoFocus: (event)
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
if (!
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
hasPointerDownOutsideRef.current = false;
|
|
183
|
-
},
|
|
184
|
-
onInteractOutside: (event) => {
|
|
185
|
-
props.onInteractOutside?.(event);
|
|
186
|
-
if (!event.defaultPrevented) {
|
|
187
|
-
hasInteractedOutsideRef.current = true;
|
|
188
|
-
if (event.detail.originalEvent.type === "pointerdown") {
|
|
189
|
-
hasPointerDownOutsideRef.current = true;
|
|
175
|
+
onCloseAutoFocus: (event)=>{
|
|
176
|
+
var _props$onCloseAutoFoc;
|
|
177
|
+
(_props$onCloseAutoFoc = props.onCloseAutoFocus) === null || _props$onCloseAutoFoc === void 0 || _props$onCloseAutoFoc.call(props, event);
|
|
178
|
+
if (!event.defaultPrevented) {
|
|
179
|
+
var _context$triggerRef$c2;
|
|
180
|
+
if (!hasInteractedOutsideRef.current) (_context$triggerRef$c2 = context.triggerRef.current) === null || _context$triggerRef$c2 === void 0 || _context$triggerRef$c2.focus(); // Always prevent auto focus because we either focus manually or want user agent focus
|
|
181
|
+
event.preventDefault();
|
|
190
182
|
}
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
211
|
-
/* @__PURE__ */ jsx(
|
|
212
|
-
FocusScope,
|
|
213
|
-
{
|
|
214
|
-
asChild: true,
|
|
215
|
-
loop: true,
|
|
216
|
-
trapped: trapFocus,
|
|
217
|
-
onMountAutoFocus: onOpenAutoFocus,
|
|
218
|
-
onUnmountAutoFocus: onCloseAutoFocus,
|
|
219
|
-
children: /* @__PURE__ */ jsx(
|
|
220
|
-
DismissableLayer,
|
|
221
|
-
{
|
|
222
|
-
role: "dialog",
|
|
223
|
-
id: context.contentId,
|
|
224
|
-
"aria-describedby": context.descriptionId,
|
|
225
|
-
"aria-labelledby": context.titleId,
|
|
226
|
-
"data-state": getState(context.open),
|
|
227
|
-
...contentProps,
|
|
228
|
-
ref: composedRefs,
|
|
229
|
-
onDismiss: () => context.onOpenChange(false)
|
|
230
|
-
}
|
|
231
|
-
)
|
|
183
|
+
hasInteractedOutsideRef.current = false;
|
|
184
|
+
hasPointerDownOutsideRef.current = false;
|
|
185
|
+
},
|
|
186
|
+
onInteractOutside: (event)=>{
|
|
187
|
+
var _props$onInteractOuts, _context$triggerRef$c3;
|
|
188
|
+
(_props$onInteractOuts = props.onInteractOutside) === null || _props$onInteractOuts === void 0 || _props$onInteractOuts.call(props, event);
|
|
189
|
+
if (!event.defaultPrevented) {
|
|
190
|
+
hasInteractedOutsideRef.current = true;
|
|
191
|
+
if (event.detail.originalEvent.type === 'pointerdown') hasPointerDownOutsideRef.current = true;
|
|
192
|
+
} // Prevent dismissing when clicking the trigger.
|
|
193
|
+
// As the trigger is already setup to close, without doing so would
|
|
194
|
+
// cause it to close and immediately open.
|
|
195
|
+
const target = event.target;
|
|
196
|
+
const targetIsTrigger = (_context$triggerRef$c3 = context.triggerRef.current) === null || _context$triggerRef$c3 === void 0 ? void 0 : _context$triggerRef$c3.contains(target);
|
|
197
|
+
if (targetIsTrigger) event.preventDefault(); // On Safari if the trigger is inside a container with tabIndex={0}, when clicked
|
|
198
|
+
// we will get the pointer down outside event on the trigger, but then a subsequent
|
|
199
|
+
// focus outside event on the container, we ignore any focus outside event when we've
|
|
200
|
+
// already had a pointer down outside event.
|
|
201
|
+
if (event.detail.originalEvent.type === 'focusin' && hasPointerDownOutsideRef.current) event.preventDefault();
|
|
232
202
|
}
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
)
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
);
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
const
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
203
|
+
}));
|
|
204
|
+
});
|
|
205
|
+
/* -----------------------------------------------------------------------------------------------*/ const $5d3850c4d0b4e6c7$var$DialogContentImpl = /*#__PURE__*/ forwardRef((props, forwardedRef)=>{
|
|
206
|
+
const { __scopeDialog: __scopeDialog , trapFocus: trapFocus , onOpenAutoFocus: onOpenAutoFocus , onCloseAutoFocus: onCloseAutoFocus , ...contentProps } = props;
|
|
207
|
+
const context = $5d3850c4d0b4e6c7$var$useDialogContext($5d3850c4d0b4e6c7$var$CONTENT_NAME, __scopeDialog);
|
|
208
|
+
const contentRef = useRef(null);
|
|
209
|
+
const composedRefs = $6ed0406888f73fc4$export$c7b2cbe3552a0d05(forwardedRef, contentRef); // Make sure the whole tree has focus guards as our `Dialog` will be
|
|
210
|
+
// the last element in the DOM (beacuse of the `Portal`)
|
|
211
|
+
$3db38b7d1fb3fe6a$export$b7ece24a22aeda8c();
|
|
212
|
+
return /*#__PURE__*/ createElement(Fragment, null, /*#__PURE__*/ createElement($d3863c46a17e8a28$export$20e40289641fbbb6, {
|
|
213
|
+
asChild: true,
|
|
214
|
+
loop: true,
|
|
215
|
+
trapped: trapFocus,
|
|
216
|
+
onMountAutoFocus: onOpenAutoFocus,
|
|
217
|
+
onUnmountAutoFocus: onCloseAutoFocus
|
|
218
|
+
}, /*#__PURE__*/ createElement($5cb92bef7577960e$export$177fb62ff3ec1f22, _extends({
|
|
219
|
+
role: "dialog",
|
|
220
|
+
id: context.contentId,
|
|
221
|
+
"aria-describedby": context.descriptionId,
|
|
222
|
+
"aria-labelledby": context.titleId,
|
|
223
|
+
"data-state": $5d3850c4d0b4e6c7$var$getState(context.open)
|
|
224
|
+
}, contentProps, {
|
|
225
|
+
ref: composedRefs,
|
|
226
|
+
onDismiss: ()=>context.onOpenChange(false)
|
|
227
|
+
}))), false);
|
|
228
|
+
});
|
|
229
|
+
/* -------------------------------------------------------------------------------------------------
|
|
230
|
+
* DialogTitle
|
|
231
|
+
* -----------------------------------------------------------------------------------------------*/ const $5d3850c4d0b4e6c7$var$TITLE_NAME = 'DialogTitle';
|
|
232
|
+
const $5d3850c4d0b4e6c7$export$16f7638e4a34b909 = /*#__PURE__*/ forwardRef((props, forwardedRef)=>{
|
|
233
|
+
const { __scopeDialog: __scopeDialog , ...titleProps } = props;
|
|
234
|
+
const context = $5d3850c4d0b4e6c7$var$useDialogContext($5d3850c4d0b4e6c7$var$TITLE_NAME, __scopeDialog);
|
|
235
|
+
return /*#__PURE__*/ createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.h2, _extends({
|
|
236
|
+
id: context.titleId
|
|
237
|
+
}, titleProps, {
|
|
238
|
+
ref: forwardedRef
|
|
239
|
+
}));
|
|
240
|
+
});
|
|
241
|
+
/* -------------------------------------------------------------------------------------------------
|
|
242
|
+
* DialogDescription
|
|
243
|
+
* -----------------------------------------------------------------------------------------------*/ const $5d3850c4d0b4e6c7$var$DESCRIPTION_NAME = 'DialogDescription';
|
|
244
|
+
const $5d3850c4d0b4e6c7$export$94e94c2ec2c954d5 = /*#__PURE__*/ forwardRef((props, forwardedRef)=>{
|
|
245
|
+
const { __scopeDialog: __scopeDialog , ...descriptionProps } = props;
|
|
246
|
+
const context = $5d3850c4d0b4e6c7$var$useDialogContext($5d3850c4d0b4e6c7$var$DESCRIPTION_NAME, __scopeDialog);
|
|
247
|
+
return /*#__PURE__*/ createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.p, _extends({
|
|
248
|
+
id: context.descriptionId
|
|
249
|
+
}, descriptionProps, {
|
|
250
|
+
ref: forwardedRef
|
|
251
|
+
}));
|
|
252
|
+
});
|
|
253
|
+
/* -------------------------------------------------------------------------------------------------
|
|
254
|
+
* DialogClose
|
|
255
|
+
* -----------------------------------------------------------------------------------------------*/ const $5d3850c4d0b4e6c7$var$CLOSE_NAME = 'DialogClose';
|
|
256
|
+
const $5d3850c4d0b4e6c7$export$fba2fb7cd781b7ac = /*#__PURE__*/ forwardRef((props, forwardedRef)=>{
|
|
257
|
+
const { __scopeDialog: __scopeDialog , ...closeProps } = props;
|
|
258
|
+
const context = $5d3850c4d0b4e6c7$var$useDialogContext($5d3850c4d0b4e6c7$var$CLOSE_NAME, __scopeDialog);
|
|
259
|
+
return /*#__PURE__*/ createElement($8927f6f2acc4f386$export$250ffa63cdc0d034.button, _extends({
|
|
260
|
+
type: "button"
|
|
261
|
+
}, closeProps, {
|
|
269
262
|
ref: forwardedRef,
|
|
270
|
-
onClick:
|
|
271
|
-
|
|
272
|
-
);
|
|
273
|
-
}
|
|
274
|
-
);
|
|
275
|
-
DialogClose.displayName = CLOSE_NAME;
|
|
276
|
-
function getState(open) {
|
|
277
|
-
return open ? "open" : "closed";
|
|
278
|
-
}
|
|
279
|
-
var TITLE_WARNING_NAME = "DialogTitleWarning";
|
|
280
|
-
var [WarningProvider, useWarningContext] = createContext2(TITLE_WARNING_NAME, {
|
|
281
|
-
contentName: CONTENT_NAME,
|
|
282
|
-
titleName: TITLE_NAME,
|
|
283
|
-
docsSlug: "dialog"
|
|
263
|
+
onClick: $e42e1063c40fb3ef$export$b9ecd428b558ff10(props.onClick, ()=>context.onOpenChange(false)
|
|
264
|
+
)
|
|
265
|
+
}));
|
|
284
266
|
});
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
}
|
|
297
|
-
}, [MESSAGE, titleId]);
|
|
298
|
-
return null;
|
|
299
|
-
};
|
|
300
|
-
var DESCRIPTION_WARNING_NAME = "DialogDescriptionWarning";
|
|
301
|
-
var DescriptionWarning = ({ contentRef, descriptionId }) => {
|
|
302
|
-
const descriptionWarningContext = useWarningContext(DESCRIPTION_WARNING_NAME);
|
|
303
|
-
const MESSAGE = `Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${descriptionWarningContext.contentName}}.`;
|
|
304
|
-
React.useEffect(() => {
|
|
305
|
-
const describedById = contentRef.current?.getAttribute("aria-describedby");
|
|
306
|
-
if (descriptionId && describedById) {
|
|
307
|
-
const hasDescription = document.getElementById(descriptionId);
|
|
308
|
-
if (!hasDescription) console.warn(MESSAGE);
|
|
309
|
-
}
|
|
310
|
-
}, [MESSAGE, contentRef, descriptionId]);
|
|
311
|
-
return null;
|
|
312
|
-
};
|
|
313
|
-
var Root = Dialog;
|
|
314
|
-
var Trigger = DialogTrigger;
|
|
315
|
-
var Portal = DialogPortal;
|
|
316
|
-
var Overlay = DialogOverlay;
|
|
317
|
-
var Content = DialogContent;
|
|
318
|
-
var Title = DialogTitle;
|
|
319
|
-
var Description = DialogDescription;
|
|
320
|
-
var Close = DialogClose;
|
|
267
|
+
/* -----------------------------------------------------------------------------------------------*/ function $5d3850c4d0b4e6c7$var$getState(open) {
|
|
268
|
+
return open ? 'open' : 'closed';
|
|
269
|
+
}
|
|
270
|
+
const $5d3850c4d0b4e6c7$export$be92b6f5f03c0fe9 = $5d3850c4d0b4e6c7$export$3ddf2d174ce01153;
|
|
271
|
+
const $5d3850c4d0b4e6c7$export$41fb9f06171c75f4 = $5d3850c4d0b4e6c7$export$2e1e1122cf0cba88;
|
|
272
|
+
const $5d3850c4d0b4e6c7$export$602eac185826482c = $5d3850c4d0b4e6c7$export$dad7c95542bacce0;
|
|
273
|
+
const $5d3850c4d0b4e6c7$export$c6fdb837b070b4ff = $5d3850c4d0b4e6c7$export$bd1d06c79be19e17;
|
|
274
|
+
const $5d3850c4d0b4e6c7$export$7c6e2c02157bb7d2 = $5d3850c4d0b4e6c7$export$b6d9565de1e068cf;
|
|
275
|
+
const $5d3850c4d0b4e6c7$export$f99233281efd08a0 = $5d3850c4d0b4e6c7$export$16f7638e4a34b909;
|
|
276
|
+
const $5d3850c4d0b4e6c7$export$393edc798c47379d = $5d3850c4d0b4e6c7$export$94e94c2ec2c954d5;
|
|
277
|
+
const $5d3850c4d0b4e6c7$export$f39c2d165cd861fe = $5d3850c4d0b4e6c7$export$fba2fb7cd781b7ac;
|
|
321
278
|
|
|
322
|
-
export { Close, Content, Description, Dialog, DialogClose, DialogContent, DialogDescription, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, Overlay, Portal, Root, Title, Trigger,
|
|
279
|
+
export { $5d3850c4d0b4e6c7$export$f39c2d165cd861fe as Close, $5d3850c4d0b4e6c7$export$7c6e2c02157bb7d2 as Content, $5d3850c4d0b4e6c7$export$393edc798c47379d as Description, $5d3850c4d0b4e6c7$export$3ddf2d174ce01153 as Dialog, $5d3850c4d0b4e6c7$export$fba2fb7cd781b7ac as DialogClose, $5d3850c4d0b4e6c7$export$b6d9565de1e068cf as DialogContent, $5d3850c4d0b4e6c7$export$94e94c2ec2c954d5 as DialogDescription, $5d3850c4d0b4e6c7$export$bd1d06c79be19e17 as DialogOverlay, $5d3850c4d0b4e6c7$export$dad7c95542bacce0 as DialogPortal, $5d3850c4d0b4e6c7$export$16f7638e4a34b909 as DialogTitle, $5d3850c4d0b4e6c7$export$2e1e1122cf0cba88 as DialogTrigger, $5d3850c4d0b4e6c7$export$c6fdb837b070b4ff as Overlay, $5d3850c4d0b4e6c7$export$602eac185826482c as Portal, $5d3850c4d0b4e6c7$export$be92b6f5f03c0fe9 as Root, $5d3850c4d0b4e6c7$export$f99233281efd08a0 as Title, $5d3850c4d0b4e6c7$export$41fb9f06171c75f4 as Trigger, $5d3850c4d0b4e6c7$export$cc702773b8ea3e41 as createDialogScope };
|
|
323
280
|
//# sourceMappingURL=index.mjs.js.map
|