@blimu/react 0.7.0 → 1.1.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/_virtual/index.cjs +5 -1
- package/dist/_virtual/index.cjs.map +1 -1
- package/dist/_virtual/index.js +3 -3
- package/dist/_virtual/index2.cjs +4 -1
- package/dist/_virtual/index2.cjs.map +1 -1
- package/dist/_virtual/index2.js +2 -2
- package/dist/_virtual/use-sync-external-store-shim.development.cjs +4 -1
- package/dist/_virtual/use-sync-external-store-shim.development.cjs.map +1 -1
- package/dist/_virtual/use-sync-external-store-shim.development.js +2 -2
- package/dist/_virtual/use-sync-external-store-shim.production.cjs +4 -1
- package/dist/_virtual/use-sync-external-store-shim.production.cjs.map +1 -1
- package/dist/_virtual/use-sync-external-store-shim.production.js +2 -2
- package/dist/client/auth.service.cjs +249 -1
- package/dist/client/auth.service.cjs.map +1 -1
- package/dist/client/auth.service.d.ts.map +1 -1
- package/dist/client/auth.service.js +195 -95
- package/dist/client/auth.service.js.map +1 -1
- package/dist/client/external-store.cjs +26 -1
- package/dist/client/external-store.cjs.map +1 -1
- package/dist/client/external-store.js +22 -8
- package/dist/client/external-store.js.map +1 -1
- package/dist/client/runtime-client.cjs +136 -1
- package/dist/client/runtime-client.cjs.map +1 -1
- package/dist/client/runtime-client.js +86 -52
- package/dist/client/runtime-client.js.map +1 -1
- package/dist/components/index.cjs +13 -0
- package/dist/components/index.cjs.map +1 -0
- package/dist/components/index.js +13 -0
- package/dist/components/index.js.map +1 -0
- package/dist/components/members-list.cjs +132 -1
- package/dist/components/members-list.cjs.map +1 -1
- package/dist/components/members-list.js +69 -64
- package/dist/components/members-list.js.map +1 -1
- package/dist/components/redirect-to-sign-in.cjs +34 -1
- package/dist/components/redirect-to-sign-in.cjs.map +1 -1
- package/dist/components/redirect-to-sign-in.js +28 -20
- package/dist/components/redirect-to-sign-in.js.map +1 -1
- package/dist/components/sign-in-button.cjs +36 -1
- package/dist/components/sign-in-button.cjs.map +1 -1
- package/dist/components/sign-in-button.js +25 -21
- package/dist/components/sign-in-button.js.map +1 -1
- package/dist/components/ui/avatar.cjs +42 -1
- package/dist/components/ui/avatar.cjs.map +1 -1
- package/dist/components/ui/avatar.js +23 -23
- package/dist/components/ui/avatar.js.map +1 -1
- package/dist/components/ui/dropdown-menu.cjs +148 -1
- package/dist/components/ui/dropdown-menu.cjs.map +1 -1
- package/dist/components/ui/dropdown-menu.js +83 -81
- package/dist/components/ui/dropdown-menu.js.map +1 -1
- package/dist/components/user-avatar.cjs +22 -1
- package/dist/components/user-avatar.cjs.map +1 -1
- package/dist/components/user-avatar.js +16 -16
- package/dist/components/user-avatar.js.map +1 -1
- package/dist/components/user-button/styles.cjs +39 -1
- package/dist/components/user-button/styles.cjs.map +1 -1
- package/dist/components/user-button/styles.js +6 -5
- package/dist/components/user-button/styles.js.map +1 -1
- package/dist/components/user-button/user-button.cjs +98 -1
- package/dist/components/user-button/user-button.cjs.map +1 -1
- package/dist/components/user-button/user-button.js +64 -58
- package/dist/components/user-button/user-button.js.map +1 -1
- package/dist/hooks/index.cjs +14 -0
- package/dist/hooks/index.cjs.map +1 -0
- package/dist/hooks/index.d.ts +1 -0
- package/dist/hooks/index.d.ts.map +1 -1
- package/dist/hooks/index.js +14 -0
- package/dist/hooks/index.js.map +1 -0
- package/dist/hooks/use-auth.cjs +44 -1
- package/dist/hooks/use-auth.cjs.map +1 -1
- package/dist/hooks/use-auth.d.ts +13 -15
- package/dist/hooks/use-auth.d.ts.map +1 -1
- package/dist/hooks/use-auth.js +30 -26
- package/dist/hooks/use-auth.js.map +1 -1
- package/dist/hooks/use-client.cjs +9 -1
- package/dist/hooks/use-client.cjs.map +1 -1
- package/dist/hooks/use-client.d.ts +1 -1
- package/dist/hooks/use-client.d.ts.map +1 -1
- package/dist/hooks/use-client.js +6 -5
- package/dist/hooks/use-client.js.map +1 -1
- package/dist/hooks/use-members.cjs +60 -1
- package/dist/hooks/use-members.cjs.map +1 -1
- package/dist/hooks/use-members.js +53 -41
- package/dist/hooks/use-members.js.map +1 -1
- package/dist/hooks/use-store.cjs +17 -1
- package/dist/hooks/use-store.cjs.map +1 -1
- package/dist/hooks/use-store.js +7 -7
- package/dist/hooks/use-store.js.map +1 -1
- package/dist/index.cjs +37 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +35 -35
- package/dist/lib/utils.cjs +8 -1
- package/dist/lib/utils.cjs.map +1 -1
- package/dist/lib/utils.js +5 -5
- package/dist/lib/utils.js.map +1 -1
- package/dist/lib/variants.cjs +46 -1
- package/dist/lib/variants.cjs.map +1 -1
- package/dist/lib/variants.js +6 -5
- package/dist/lib/variants.js.map +1 -1
- package/dist/node_modules/@floating-ui/core/dist/floating-ui.core.cjs +721 -1
- package/dist/node_modules/@floating-ui/core/dist/floating-ui.core.cjs.map +1 -1
- package/dist/node_modules/@floating-ui/core/dist/floating-ui.core.js +571 -377
- package/dist/node_modules/@floating-ui/core/dist/floating-ui.core.js.map +1 -1
- package/dist/node_modules/@floating-ui/dom/dist/floating-ui.dom.cjs +625 -1
- package/dist/node_modules/@floating-ui/dom/dist/floating-ui.dom.cjs.map +1 -1
- package/dist/node_modules/@floating-ui/dom/dist/floating-ui.dom.js +539 -316
- package/dist/node_modules/@floating-ui/dom/dist/floating-ui.dom.js.map +1 -1
- package/dist/node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.cjs +313 -1
- package/dist/node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.cjs.map +1 -1
- package/dist/node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.js +261 -172
- package/dist/node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.js.map +1 -1
- package/dist/node_modules/@floating-ui/utils/dist/floating-ui.utils.cjs +154 -1
- package/dist/node_modules/@floating-ui/utils/dist/floating-ui.utils.cjs.map +1 -1
- package/dist/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.cjs +173 -1
- package/dist/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.cjs.map +1 -1
- package/dist/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.js +144 -107
- package/dist/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.js.map +1 -1
- package/dist/node_modules/@floating-ui/utils/dist/floating-ui.utils.js +111 -87
- package/dist/node_modules/@floating-ui/utils/dist/floating-ui.utils.js.map +1 -1
- package/dist/node_modules/@radix-ui/primitive/dist/index.cjs +11 -1
- package/dist/node_modules/@radix-ui/primitive/dist/index.cjs.map +1 -1
- package/dist/node_modules/@radix-ui/primitive/dist/index.js +7 -5
- package/dist/node_modules/@radix-ui/primitive/dist/index.js.map +1 -1
- package/dist/node_modules/@radix-ui/react-arrow/dist/index.cjs +42 -1
- package/dist/node_modules/@radix-ui/react-arrow/dist/index.cjs.map +1 -1
- package/dist/node_modules/@radix-ui/react-arrow/dist/index.js +17 -16
- package/dist/node_modules/@radix-ui/react-arrow/dist/index.js.map +1 -1
- package/dist/node_modules/@radix-ui/react-avatar/dist/index.cjs +140 -1
- package/dist/node_modules/@radix-ui/react-avatar/dist/index.cjs.map +1 -1
- package/dist/node_modules/@radix-ui/react-avatar/dist/index.js +105 -57
- package/dist/node_modules/@radix-ui/react-avatar/dist/index.js.map +1 -1
- package/dist/node_modules/@radix-ui/react-avatar/node_modules/@radix-ui/react-context/dist/index.cjs +80 -1
- package/dist/node_modules/@radix-ui/react-avatar/node_modules/@radix-ui/react-context/dist/index.cjs.map +1 -1
- package/dist/node_modules/@radix-ui/react-avatar/node_modules/@radix-ui/react-context/dist/index.js +49 -41
- package/dist/node_modules/@radix-ui/react-avatar/node_modules/@radix-ui/react-context/dist/index.js.map +1 -1
- package/dist/node_modules/@radix-ui/react-avatar/node_modules/@radix-ui/react-primitive/dist/index.cjs +56 -1
- package/dist/node_modules/@radix-ui/react-avatar/node_modules/@radix-ui/react-primitive/dist/index.cjs.map +1 -1
- package/dist/node_modules/@radix-ui/react-avatar/node_modules/@radix-ui/react-primitive/dist/index.js +17 -10
- package/dist/node_modules/@radix-ui/react-avatar/node_modules/@radix-ui/react-primitive/dist/index.js.map +1 -1
- package/dist/node_modules/@radix-ui/react-avatar/node_modules/@radix-ui/react-slot/dist/index.cjs +119 -1
- package/dist/node_modules/@radix-ui/react-avatar/node_modules/@radix-ui/react-slot/dist/index.cjs.map +1 -1
- package/dist/node_modules/@radix-ui/react-avatar/node_modules/@radix-ui/react-slot/dist/index.js +86 -42
- package/dist/node_modules/@radix-ui/react-avatar/node_modules/@radix-ui/react-slot/dist/index.js.map +1 -1
- package/dist/node_modules/@radix-ui/react-collection/dist/index.cjs +70 -1
- package/dist/node_modules/@radix-ui/react-collection/dist/index.cjs.map +1 -1
- package/dist/node_modules/@radix-ui/react-collection/dist/index.js +57 -37
- package/dist/node_modules/@radix-ui/react-collection/dist/index.js.map +1 -1
- package/dist/node_modules/@radix-ui/react-compose-refs/dist/index.cjs +56 -1
- package/dist/node_modules/@radix-ui/react-compose-refs/dist/index.cjs.map +1 -1
- package/dist/node_modules/@radix-ui/react-compose-refs/dist/index.js +29 -19
- package/dist/node_modules/@radix-ui/react-compose-refs/dist/index.js.map +1 -1
- package/dist/node_modules/@radix-ui/react-context/dist/index.cjs +79 -1
- package/dist/node_modules/@radix-ui/react-context/dist/index.cjs.map +1 -1
- package/dist/node_modules/@radix-ui/react-context/dist/index.js +48 -39
- package/dist/node_modules/@radix-ui/react-context/dist/index.js.map +1 -1
- package/dist/node_modules/@radix-ui/react-direction/dist/index.cjs +27 -1
- package/dist/node_modules/@radix-ui/react-direction/dist/index.cjs.map +1 -1
- package/dist/node_modules/@radix-ui/react-direction/dist/index.js +6 -6
- package/dist/node_modules/@radix-ui/react-direction/dist/index.js.map +1 -1
- package/dist/node_modules/@radix-ui/react-dismissable-layer/dist/index.cjs +229 -1
- package/dist/node_modules/@radix-ui/react-dismissable-layer/dist/index.cjs.map +1 -1
- package/dist/node_modules/@radix-ui/react-dismissable-layer/dist/index.js +182 -97
- package/dist/node_modules/@radix-ui/react-dismissable-layer/dist/index.js.map +1 -1
- package/dist/node_modules/@radix-ui/react-dropdown-menu/dist/index.cjs +296 -1
- package/dist/node_modules/@radix-ui/react-dropdown-menu/dist/index.cjs.map +1 -1
- package/dist/node_modules/@radix-ui/react-dropdown-menu/dist/index.js +232 -167
- package/dist/node_modules/@radix-ui/react-dropdown-menu/dist/index.js.map +1 -1
- package/dist/node_modules/@radix-ui/react-focus-guards/dist/index.cjs +46 -1
- package/dist/node_modules/@radix-ui/react-focus-guards/dist/index.cjs.map +1 -1
- package/dist/node_modules/@radix-ui/react-focus-guards/dist/index.js +23 -11
- package/dist/node_modules/@radix-ui/react-focus-guards/dist/index.js.map +1 -1
- package/dist/node_modules/@radix-ui/react-focus-scope/dist/index.cjs +224 -1
- package/dist/node_modules/@radix-ui/react-focus-scope/dist/index.cjs.map +1 -1
- package/dist/node_modules/@radix-ui/react-focus-scope/dist/index.js +169 -98
- package/dist/node_modules/@radix-ui/react-focus-scope/dist/index.js.map +1 -1
- package/dist/node_modules/@radix-ui/react-id/dist/index.cjs +31 -1
- package/dist/node_modules/@radix-ui/react-id/dist/index.cjs.map +1 -1
- package/dist/node_modules/@radix-ui/react-id/dist/index.js +11 -10
- package/dist/node_modules/@radix-ui/react-id/dist/index.js.map +1 -1
- package/dist/node_modules/@radix-ui/react-menu/dist/index.cjs +845 -1
- package/dist/node_modules/@radix-ui/react-menu/dist/index.cjs.map +1 -1
- package/dist/node_modules/@radix-ui/react-menu/dist/index.js +662 -442
- package/dist/node_modules/@radix-ui/react-menu/dist/index.js.map +1 -1
- package/dist/node_modules/@radix-ui/react-popper/dist/index.cjs +308 -1
- package/dist/node_modules/@radix-ui/react-popper/dist/index.cjs.map +1 -1
- package/dist/node_modules/@radix-ui/react-popper/dist/index.js +209 -137
- package/dist/node_modules/@radix-ui/react-popper/dist/index.js.map +1 -1
- package/dist/node_modules/@radix-ui/react-portal/dist/index.cjs +34 -1
- package/dist/node_modules/@radix-ui/react-portal/dist/index.cjs.map +1 -1
- package/dist/node_modules/@radix-ui/react-portal/dist/index.js +14 -12
- package/dist/node_modules/@radix-ui/react-portal/dist/index.js.map +1 -1
- package/dist/node_modules/@radix-ui/react-presence/dist/index.cjs +145 -1
- package/dist/node_modules/@radix-ui/react-presence/dist/index.cjs.map +1 -1
- package/dist/node_modules/@radix-ui/react-presence/dist/index.js +103 -45
- package/dist/node_modules/@radix-ui/react-presence/dist/index.js.map +1 -1
- package/dist/node_modules/@radix-ui/react-primitive/dist/index.cjs +61 -1
- package/dist/node_modules/@radix-ui/react-primitive/dist/index.cjs.map +1 -1
- package/dist/node_modules/@radix-ui/react-primitive/dist/index.js +21 -14
- package/dist/node_modules/@radix-ui/react-primitive/dist/index.js.map +1 -1
- package/dist/node_modules/@radix-ui/react-roving-focus/dist/index.cjs +244 -1
- package/dist/node_modules/@radix-ui/react-roving-focus/dist/index.cjs.map +1 -1
- package/dist/node_modules/@radix-ui/react-roving-focus/dist/index.js +179 -135
- package/dist/node_modules/@radix-ui/react-roving-focus/dist/index.js.map +1 -1
- package/dist/node_modules/@radix-ui/react-slot/dist/index.cjs +105 -1
- package/dist/node_modules/@radix-ui/react-slot/dist/index.cjs.map +1 -1
- package/dist/node_modules/@radix-ui/react-slot/dist/index.js +74 -35
- package/dist/node_modules/@radix-ui/react-slot/dist/index.js.map +1 -1
- package/dist/node_modules/@radix-ui/react-use-callback-ref/dist/index.cjs +28 -1
- package/dist/node_modules/@radix-ui/react-use-callback-ref/dist/index.cjs.map +1 -1
- package/dist/node_modules/@radix-ui/react-use-callback-ref/dist/index.js +8 -7
- package/dist/node_modules/@radix-ui/react-use-callback-ref/dist/index.js.map +1 -1
- package/dist/node_modules/@radix-ui/react-use-controllable-state/dist/index.cjs +86 -1
- package/dist/node_modules/@radix-ui/react-use-controllable-state/dist/index.cjs.map +1 -1
- package/dist/node_modules/@radix-ui/react-use-controllable-state/dist/index.js +57 -40
- package/dist/node_modules/@radix-ui/react-use-controllable-state/dist/index.js.map +1 -1
- package/dist/node_modules/@radix-ui/react-use-escape-keydown/dist/index.cjs +34 -1
- package/dist/node_modules/@radix-ui/react-use-escape-keydown/dist/index.cjs.map +1 -1
- package/dist/node_modules/@radix-ui/react-use-escape-keydown/dist/index.js +13 -10
- package/dist/node_modules/@radix-ui/react-use-escape-keydown/dist/index.js.map +1 -1
- package/dist/node_modules/@radix-ui/react-use-is-hydrated/dist/index.cjs +15 -1
- package/dist/node_modules/@radix-ui/react-use-is-hydrated/dist/index.cjs.map +1 -1
- package/dist/node_modules/@radix-ui/react-use-is-hydrated/dist/index.js +8 -8
- package/dist/node_modules/@radix-ui/react-use-is-hydrated/dist/index.js.map +1 -1
- package/dist/node_modules/@radix-ui/react-use-layout-effect/dist/index.cjs +23 -1
- package/dist/node_modules/@radix-ui/react-use-layout-effect/dist/index.cjs.map +1 -1
- package/dist/node_modules/@radix-ui/react-use-layout-effect/dist/index.js +3 -3
- package/dist/node_modules/@radix-ui/react-use-layout-effect/dist/index.js.map +1 -1
- package/dist/node_modules/@radix-ui/react-use-size/dist/index.cjs +56 -1
- package/dist/node_modules/@radix-ui/react-use-size/dist/index.cjs.map +1 -1
- package/dist/node_modules/@radix-ui/react-use-size/dist/index.js +34 -22
- package/dist/node_modules/@radix-ui/react-use-size/dist/index.js.map +1 -1
- package/dist/node_modules/aria-hidden/dist/es2015/index.cjs +122 -1
- package/dist/node_modules/aria-hidden/dist/es2015/index.cjs.map +1 -1
- package/dist/node_modules/aria-hidden/dist/es2015/index.js +111 -41
- package/dist/node_modules/aria-hidden/dist/es2015/index.js.map +1 -1
- package/dist/node_modules/class-variance-authority/dist/index.cjs +45 -1
- package/dist/node_modules/class-variance-authority/dist/index.cjs.map +1 -1
- package/dist/node_modules/class-variance-authority/dist/index.js +40 -30
- package/dist/node_modules/class-variance-authority/dist/index.js.map +1 -1
- package/dist/node_modules/clsx/dist/clsx.cjs +17 -1
- package/dist/node_modules/clsx/dist/clsx.cjs.map +1 -1
- package/dist/node_modules/clsx/dist/clsx.js +13 -13
- package/dist/node_modules/clsx/dist/clsx.js.map +1 -1
- package/dist/node_modules/get-nonce/dist/es2015/index.cjs +9 -1
- package/dist/node_modules/get-nonce/dist/es2015/index.cjs.map +1 -1
- package/dist/node_modules/get-nonce/dist/es2015/index.js +5 -3
- package/dist/node_modules/get-nonce/dist/es2015/index.js.map +1 -1
- package/dist/node_modules/js-cookie/dist/js.cookie.cjs +98 -1
- package/dist/node_modules/js-cookie/dist/js.cookie.cjs.map +1 -1
- package/dist/node_modules/js-cookie/dist/js.cookie.js +69 -43
- package/dist/node_modules/js-cookie/dist/js.cookie.js.map +1 -1
- package/dist/node_modules/jwt-decode/build/esm/index.cjs +58 -1
- package/dist/node_modules/jwt-decode/build/esm/index.cjs.map +1 -1
- package/dist/node_modules/jwt-decode/build/esm/index.js +36 -30
- package/dist/node_modules/jwt-decode/build/esm/index.js.map +1 -1
- package/dist/node_modules/lucide-react/dist/esm/Icon.cjs +34 -1
- package/dist/node_modules/lucide-react/dist/esm/Icon.cjs.map +1 -1
- package/dist/node_modules/lucide-react/dist/esm/Icon.js +25 -25
- package/dist/node_modules/lucide-react/dist/esm/Icon.js.map +1 -1
- package/dist/node_modules/lucide-react/dist/esm/createLucideIcon.cjs +21 -1
- package/dist/node_modules/lucide-react/dist/esm/createLucideIcon.cjs.map +1 -1
- package/dist/node_modules/lucide-react/dist/esm/createLucideIcon.js +16 -15
- package/dist/node_modules/lucide-react/dist/esm/createLucideIcon.js.map +1 -1
- package/dist/node_modules/lucide-react/dist/esm/defaultAttributes.cjs +13 -1
- package/dist/node_modules/lucide-react/dist/esm/defaultAttributes.cjs.map +1 -1
- package/dist/node_modules/lucide-react/dist/esm/defaultAttributes.js +2 -2
- package/dist/node_modules/lucide-react/dist/esm/defaultAttributes.js.map +1 -1
- package/dist/node_modules/lucide-react/dist/esm/icons/check.cjs +7 -1
- package/dist/node_modules/lucide-react/dist/esm/icons/check.cjs.map +1 -1
- package/dist/node_modules/lucide-react/dist/esm/icons/check.js +5 -4
- package/dist/node_modules/lucide-react/dist/esm/icons/check.js.map +1 -1
- package/dist/node_modules/lucide-react/dist/esm/icons/chevron-right.cjs +7 -1
- package/dist/node_modules/lucide-react/dist/esm/icons/chevron-right.cjs.map +1 -1
- package/dist/node_modules/lucide-react/dist/esm/icons/chevron-right.js +5 -4
- package/dist/node_modules/lucide-react/dist/esm/icons/chevron-right.js.map +1 -1
- package/dist/node_modules/lucide-react/dist/esm/icons/circle.cjs +7 -1
- package/dist/node_modules/lucide-react/dist/esm/icons/circle.cjs.map +1 -1
- package/dist/node_modules/lucide-react/dist/esm/icons/circle.js +5 -4
- package/dist/node_modules/lucide-react/dist/esm/icons/circle.js.map +1 -1
- package/dist/node_modules/lucide-react/dist/esm/icons/log-out.cjs +11 -1
- package/dist/node_modules/lucide-react/dist/esm/icons/log-out.cjs.map +1 -1
- package/dist/node_modules/lucide-react/dist/esm/icons/log-out.js +6 -5
- package/dist/node_modules/lucide-react/dist/esm/icons/log-out.js.map +1 -1
- package/dist/node_modules/lucide-react/dist/esm/shared/src/utils.cjs +26 -1
- package/dist/node_modules/lucide-react/dist/esm/shared/src/utils.cjs.map +1 -1
- package/dist/node_modules/lucide-react/dist/esm/shared/src/utils.js +22 -14
- package/dist/node_modules/lucide-react/dist/esm/shared/src/utils.js.map +1 -1
- package/dist/node_modules/react-remove-scroll/dist/es2015/Combination.cjs +27 -1
- package/dist/node_modules/react-remove-scroll/dist/es2015/Combination.cjs.map +1 -1
- package/dist/node_modules/react-remove-scroll/dist/es2015/Combination.js +8 -8
- package/dist/node_modules/react-remove-scroll/dist/es2015/Combination.js.map +1 -1
- package/dist/node_modules/react-remove-scroll/dist/es2015/SideEffect.cjs +197 -4
- package/dist/node_modules/react-remove-scroll/dist/es2015/SideEffect.cjs.map +1 -1
- package/dist/node_modules/react-remove-scroll/dist/es2015/SideEffect.js +163 -98
- package/dist/node_modules/react-remove-scroll/dist/es2015/SideEffect.js.map +1 -1
- package/dist/node_modules/react-remove-scroll/dist/es2015/UI.cjs +55 -1
- package/dist/node_modules/react-remove-scroll/dist/es2015/UI.cjs.map +1 -1
- package/dist/node_modules/react-remove-scroll/dist/es2015/UI.js +31 -24
- package/dist/node_modules/react-remove-scroll/dist/es2015/UI.js.map +1 -1
- package/dist/node_modules/react-remove-scroll/dist/es2015/aggresiveCapture.cjs +19 -1
- package/dist/node_modules/react-remove-scroll/dist/es2015/aggresiveCapture.cjs.map +1 -1
- package/dist/node_modules/react-remove-scroll/dist/es2015/aggresiveCapture.js +12 -9
- package/dist/node_modules/react-remove-scroll/dist/es2015/aggresiveCapture.js.map +1 -1
- package/dist/node_modules/react-remove-scroll/dist/es2015/handleScroll.cjs +102 -1
- package/dist/node_modules/react-remove-scroll/dist/es2015/handleScroll.cjs.map +1 -1
- package/dist/node_modules/react-remove-scroll/dist/es2015/handleScroll.js +85 -51
- package/dist/node_modules/react-remove-scroll/dist/es2015/handleScroll.js.map +1 -1
- package/dist/node_modules/react-remove-scroll/dist/es2015/medium.cjs +5 -1
- package/dist/node_modules/react-remove-scroll/dist/es2015/medium.cjs.map +1 -1
- package/dist/node_modules/react-remove-scroll/dist/es2015/medium.js +3 -3
- package/dist/node_modules/react-remove-scroll/dist/es2015/medium.js.map +1 -1
- package/dist/node_modules/react-remove-scroll/dist/es2015/sidecar.cjs +6 -1
- package/dist/node_modules/react-remove-scroll/dist/es2015/sidecar.cjs.map +1 -1
- package/dist/node_modules/react-remove-scroll/dist/es2015/sidecar.js +5 -5
- package/dist/node_modules/react-remove-scroll/dist/es2015/sidecar.js.map +1 -1
- package/dist/node_modules/react-remove-scroll-bar/dist/es2015/component.cjs +62 -36
- package/dist/node_modules/react-remove-scroll-bar/dist/es2015/component.cjs.map +1 -1
- package/dist/node_modules/react-remove-scroll-bar/dist/es2015/component.js +41 -65
- package/dist/node_modules/react-remove-scroll-bar/dist/es2015/component.js.map +1 -1
- package/dist/node_modules/react-remove-scroll-bar/dist/es2015/constants.cjs +10 -1
- package/dist/node_modules/react-remove-scroll-bar/dist/es2015/constants.cjs.map +1 -1
- package/dist/node_modules/react-remove-scroll-bar/dist/es2015/constants.js +8 -5
- package/dist/node_modules/react-remove-scroll-bar/dist/es2015/constants.js.map +1 -1
- package/dist/node_modules/react-remove-scroll-bar/dist/es2015/utils.cjs +37 -1
- package/dist/node_modules/react-remove-scroll-bar/dist/es2015/utils.cjs.map +1 -1
- package/dist/node_modules/react-remove-scroll-bar/dist/es2015/utils.js +28 -16
- package/dist/node_modules/react-remove-scroll-bar/dist/es2015/utils.js.map +1 -1
- package/dist/node_modules/react-style-singleton/dist/es2015/component.cjs +13 -1
- package/dist/node_modules/react-style-singleton/dist/es2015/component.cjs.map +1 -1
- package/dist/node_modules/react-style-singleton/dist/es2015/component.js +9 -7
- package/dist/node_modules/react-style-singleton/dist/es2015/component.js.map +1 -1
- package/dist/node_modules/react-style-singleton/dist/es2015/hook.cjs +33 -1
- package/dist/node_modules/react-style-singleton/dist/es2015/hook.cjs.map +1 -1
- package/dist/node_modules/react-style-singleton/dist/es2015/hook.js +11 -10
- package/dist/node_modules/react-style-singleton/dist/es2015/hook.js.map +1 -1
- package/dist/node_modules/react-style-singleton/dist/es2015/singleton.cjs +48 -1
- package/dist/node_modules/react-style-singleton/dist/es2015/singleton.cjs.map +1 -1
- package/dist/node_modules/react-style-singleton/dist/es2015/singleton.js +35 -17
- package/dist/node_modules/react-style-singleton/dist/es2015/singleton.js.map +1 -1
- package/dist/node_modules/tailwind-merge/dist/bundle-mjs.cjs +3014 -1
- package/dist/node_modules/tailwind-merge/dist/bundle-mjs.cjs.map +1 -1
- package/dist/node_modules/tailwind-merge/dist/bundle-mjs.js +804 -555
- package/dist/node_modules/tailwind-merge/dist/bundle-mjs.js.map +1 -1
- package/dist/node_modules/tailwindcss/dist/plugin.cjs +12 -1
- package/dist/node_modules/tailwindcss/dist/plugin.cjs.map +1 -1
- package/dist/node_modules/tailwindcss/dist/plugin.js +8 -8
- package/dist/node_modules/tailwindcss/dist/plugin.js.map +1 -1
- package/dist/node_modules/tslib/tslib.es6.cjs +38 -1
- package/dist/node_modules/tslib/tslib.es6.cjs.map +1 -1
- package/dist/node_modules/tslib/tslib.es6.js +33 -21
- package/dist/node_modules/tslib/tslib.es6.js.map +1 -1
- package/dist/node_modules/use-callback-ref/dist/es2015/assignRef.cjs +11 -1
- package/dist/node_modules/use-callback-ref/dist/es2015/assignRef.cjs.map +1 -1
- package/dist/node_modules/use-callback-ref/dist/es2015/assignRef.js +8 -3
- package/dist/node_modules/use-callback-ref/dist/es2015/assignRef.js.map +1 -1
- package/dist/node_modules/use-callback-ref/dist/es2015/useMergeRef.cjs +52 -1
- package/dist/node_modules/use-callback-ref/dist/es2015/useMergeRef.cjs.map +1 -1
- package/dist/node_modules/use-callback-ref/dist/es2015/useMergeRef.js +28 -19
- package/dist/node_modules/use-callback-ref/dist/es2015/useMergeRef.js.map +1 -1
- package/dist/node_modules/use-callback-ref/dist/es2015/useRef.cjs +29 -1
- package/dist/node_modules/use-callback-ref/dist/es2015/useRef.cjs.map +1 -1
- package/dist/node_modules/use-callback-ref/dist/es2015/useRef.js +15 -11
- package/dist/node_modules/use-callback-ref/dist/es2015/useRef.js.map +1 -1
- package/dist/node_modules/use-sidecar/dist/es2015/exports.cjs +38 -1
- package/dist/node_modules/use-sidecar/dist/es2015/exports.cjs.map +1 -1
- package/dist/node_modules/use-sidecar/dist/es2015/exports.js +15 -12
- package/dist/node_modules/use-sidecar/dist/es2015/exports.js.map +1 -1
- package/dist/node_modules/use-sidecar/dist/es2015/medium.cjs +88 -1
- package/dist/node_modules/use-sidecar/dist/es2015/medium.cjs.map +1 -1
- package/dist/node_modules/use-sidecar/dist/es2015/medium.js +64 -43
- package/dist/node_modules/use-sidecar/dist/es2015/medium.js.map +1 -1
- package/dist/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.development.cjs +68 -1
- package/dist/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.development.cjs.map +1 -1
- package/dist/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.development.js +49 -39
- package/dist/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.development.js.map +1 -1
- package/dist/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.production.cjs +53 -1
- package/dist/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.production.cjs.map +1 -1
- package/dist/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.production.js +39 -32
- package/dist/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.production.js.map +1 -1
- package/dist/node_modules/use-sync-external-store/shim/index.cjs +17 -1
- package/dist/node_modules/use-sync-external-store/shim/index.cjs.map +1 -1
- package/dist/node_modules/use-sync-external-store/shim/index.js +14 -7
- package/dist/node_modules/use-sync-external-store/shim/index.js.map +1 -1
- package/dist/providers/auth/auth.context.cjs +5 -1
- package/dist/providers/auth/auth.context.cjs.map +1 -1
- package/dist/providers/auth/auth.context.js +3 -3
- package/dist/providers/auth/auth.context.js.map +1 -1
- package/dist/providers/auth/auth.hook.cjs +12 -1
- package/dist/providers/auth/auth.hook.cjs.map +1 -1
- package/dist/providers/auth/auth.hook.js +8 -7
- package/dist/providers/auth/auth.hook.js.map +1 -1
- package/dist/providers/auth/auth.provider.cjs +37 -1
- package/dist/providers/auth/auth.provider.cjs.map +1 -1
- package/dist/providers/auth/auth.provider.js +31 -22
- package/dist/providers/auth/auth.provider.js.map +1 -1
- package/dist/providers/blimu/blimu.context.cjs +5 -1
- package/dist/providers/blimu/blimu.context.cjs.map +1 -1
- package/dist/providers/blimu/blimu.context.js +3 -3
- package/dist/providers/blimu/blimu.context.js.map +1 -1
- package/dist/providers/blimu/blimu.hook.cjs +12 -1
- package/dist/providers/blimu/blimu.hook.cjs.map +1 -1
- package/dist/providers/blimu/blimu.hook.js +8 -7
- package/dist/providers/blimu/blimu.hook.js.map +1 -1
- package/dist/providers/blimu/blimu.provider.cjs +71 -1
- package/dist/providers/blimu/blimu.provider.cjs.map +1 -1
- package/dist/providers/blimu/blimu.provider.js +32 -27
- package/dist/providers/blimu/blimu.provider.js.map +1 -1
- package/dist/providers/index.cjs +13 -0
- package/dist/providers/index.cjs.map +1 -0
- package/dist/providers/index.js +13 -0
- package/dist/providers/index.js.map +1 -0
- package/dist/providers/theme/theme.context.cjs +5 -1
- package/dist/providers/theme/theme.context.cjs.map +1 -1
- package/dist/providers/theme/theme.context.js +3 -3
- package/dist/providers/theme/theme.context.js.map +1 -1
- package/dist/providers/theme/theme.hook.cjs +12 -1
- package/dist/providers/theme/theme.hook.cjs.map +1 -1
- package/dist/providers/theme/theme.hook.js +8 -7
- package/dist/providers/theme/theme.hook.js.map +1 -1
- package/dist/providers/theme/theme.provider.cjs +104 -1
- package/dist/providers/theme/theme.provider.cjs.map +1 -1
- package/dist/providers/theme/theme.provider.js +85 -48
- package/dist/providers/theme/theme.provider.js.map +1 -1
- package/dist/tailwind.cjs +200 -0
- package/dist/tailwind.cjs.map +1 -0
- package/dist/{tailwind.plugin.js → tailwind.js} +6 -6
- package/dist/tailwind.js.map +1 -0
- package/dist/types/index.cjs +11 -1
- package/dist/types/index.cjs.map +1 -1
- package/dist/types/index.js +8 -8
- package/dist/types/index.js.map +1 -1
- package/dist/utils/publishable-key.cjs +62 -1
- package/dist/utils/publishable-key.cjs.map +1 -1
- package/dist/utils/publishable-key.js +52 -27
- package/dist/utils/publishable-key.js.map +1 -1
- package/package.json +41 -42
- package/dist/components.cjs +0 -2
- package/dist/components.cjs.map +0 -1
- package/dist/components.js +0 -13
- package/dist/components.js.map +0 -1
- package/dist/hooks.cjs +0 -2
- package/dist/hooks.cjs.map +0 -1
- package/dist/hooks.js +0 -14
- package/dist/hooks.js.map +0 -1
- package/dist/providers.cjs +0 -2
- package/dist/providers.cjs.map +0 -1
- package/dist/providers.js +0 -13
- package/dist/providers.js.map +0 -1
- package/dist/tailwind.plugin.cjs +0 -2
- package/dist/tailwind.plugin.cjs.map +0 -1
- package/dist/tailwind.plugin.js.map +0 -1
|
@@ -1,528 +1,722 @@
|
|
|
1
|
-
import { evaluate
|
|
2
|
-
function
|
|
1
|
+
import { evaluate, getSideAxis, getSide, clamp, getOppositePlacement, getExpandedPlacements, getOppositeAxisPlacements, getAlignmentSides, getAlignment, min, max, getPaddingObject, rectToClientRect, getOppositeAxis, getAlignmentAxis, sides, getAxisLength } from "../../utils/dist/floating-ui.utils.js";
|
|
2
|
+
function computeCoordsFromPlacement(_ref, placement, rtl) {
|
|
3
3
|
let {
|
|
4
|
-
reference
|
|
5
|
-
floating
|
|
6
|
-
} =
|
|
7
|
-
const
|
|
8
|
-
|
|
9
|
-
|
|
4
|
+
reference,
|
|
5
|
+
floating
|
|
6
|
+
} = _ref;
|
|
7
|
+
const sideAxis = getSideAxis(placement);
|
|
8
|
+
const alignmentAxis = getAlignmentAxis(placement);
|
|
9
|
+
const alignLength = getAxisLength(alignmentAxis);
|
|
10
|
+
const side = getSide(placement);
|
|
11
|
+
const isVertical = sideAxis === "y";
|
|
12
|
+
const commonX = reference.x + reference.width / 2 - floating.width / 2;
|
|
13
|
+
const commonY = reference.y + reference.height / 2 - floating.height / 2;
|
|
14
|
+
const commonAlign = reference[alignLength] / 2 - floating[alignLength] / 2;
|
|
15
|
+
let coords;
|
|
16
|
+
switch (side) {
|
|
10
17
|
case "top":
|
|
11
|
-
|
|
12
|
-
x:
|
|
13
|
-
y:
|
|
18
|
+
coords = {
|
|
19
|
+
x: commonX,
|
|
20
|
+
y: reference.y - floating.height
|
|
14
21
|
};
|
|
15
22
|
break;
|
|
16
23
|
case "bottom":
|
|
17
|
-
|
|
18
|
-
x:
|
|
19
|
-
y:
|
|
24
|
+
coords = {
|
|
25
|
+
x: commonX,
|
|
26
|
+
y: reference.y + reference.height
|
|
20
27
|
};
|
|
21
28
|
break;
|
|
22
29
|
case "right":
|
|
23
|
-
|
|
24
|
-
x:
|
|
25
|
-
y:
|
|
30
|
+
coords = {
|
|
31
|
+
x: reference.x + reference.width,
|
|
32
|
+
y: commonY
|
|
26
33
|
};
|
|
27
34
|
break;
|
|
28
35
|
case "left":
|
|
29
|
-
|
|
30
|
-
x:
|
|
31
|
-
y:
|
|
36
|
+
coords = {
|
|
37
|
+
x: reference.x - floating.width,
|
|
38
|
+
y: commonY
|
|
32
39
|
};
|
|
33
40
|
break;
|
|
34
41
|
default:
|
|
35
|
-
|
|
36
|
-
x:
|
|
37
|
-
y:
|
|
42
|
+
coords = {
|
|
43
|
+
x: reference.x,
|
|
44
|
+
y: reference.y
|
|
38
45
|
};
|
|
39
46
|
}
|
|
40
|
-
switch (
|
|
47
|
+
switch (getAlignment(placement)) {
|
|
41
48
|
case "start":
|
|
42
|
-
|
|
49
|
+
coords[alignmentAxis] -= commonAlign * (rtl && isVertical ? -1 : 1);
|
|
43
50
|
break;
|
|
44
51
|
case "end":
|
|
45
|
-
|
|
52
|
+
coords[alignmentAxis] += commonAlign * (rtl && isVertical ? -1 : 1);
|
|
46
53
|
break;
|
|
47
54
|
}
|
|
48
|
-
return
|
|
55
|
+
return coords;
|
|
49
56
|
}
|
|
50
|
-
const
|
|
57
|
+
const computePosition = async (reference, floating, config) => {
|
|
51
58
|
const {
|
|
52
|
-
placement
|
|
53
|
-
strategy
|
|
54
|
-
middleware
|
|
55
|
-
platform
|
|
56
|
-
} =
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
59
|
+
placement = "bottom",
|
|
60
|
+
strategy = "absolute",
|
|
61
|
+
middleware = [],
|
|
62
|
+
platform
|
|
63
|
+
} = config;
|
|
64
|
+
const validMiddleware = middleware.filter(Boolean);
|
|
65
|
+
const rtl = await (platform.isRTL == null ? void 0 : platform.isRTL(floating));
|
|
66
|
+
let rects = await platform.getElementRects({
|
|
67
|
+
reference,
|
|
68
|
+
floating,
|
|
69
|
+
strategy
|
|
70
|
+
});
|
|
71
|
+
let {
|
|
72
|
+
x,
|
|
73
|
+
y
|
|
74
|
+
} = computeCoordsFromPlacement(rects, placement, rtl);
|
|
75
|
+
let statefulPlacement = placement;
|
|
76
|
+
let middlewareData = {};
|
|
77
|
+
let resetCount = 0;
|
|
78
|
+
for (let i = 0; i < validMiddleware.length; i++) {
|
|
79
|
+
const {
|
|
80
|
+
name,
|
|
81
|
+
fn
|
|
82
|
+
} = validMiddleware[i];
|
|
66
83
|
const {
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
middlewareData: i,
|
|
81
|
-
rects: h,
|
|
82
|
-
platform: o,
|
|
84
|
+
x: nextX,
|
|
85
|
+
y: nextY,
|
|
86
|
+
data,
|
|
87
|
+
reset
|
|
88
|
+
} = await fn({
|
|
89
|
+
x,
|
|
90
|
+
y,
|
|
91
|
+
initialPlacement: placement,
|
|
92
|
+
placement: statefulPlacement,
|
|
93
|
+
strategy,
|
|
94
|
+
middlewareData,
|
|
95
|
+
rects,
|
|
96
|
+
platform,
|
|
83
97
|
elements: {
|
|
84
|
-
reference
|
|
85
|
-
floating
|
|
98
|
+
reference,
|
|
99
|
+
floating
|
|
86
100
|
}
|
|
87
101
|
});
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
102
|
+
x = nextX != null ? nextX : x;
|
|
103
|
+
y = nextY != null ? nextY : y;
|
|
104
|
+
middlewareData = {
|
|
105
|
+
...middlewareData,
|
|
106
|
+
[name]: {
|
|
107
|
+
...middlewareData[name],
|
|
108
|
+
...data
|
|
93
109
|
}
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
110
|
+
};
|
|
111
|
+
if (reset && resetCount <= 50) {
|
|
112
|
+
resetCount++;
|
|
113
|
+
if (typeof reset === "object") {
|
|
114
|
+
if (reset.placement) {
|
|
115
|
+
statefulPlacement = reset.placement;
|
|
116
|
+
}
|
|
117
|
+
if (reset.rects) {
|
|
118
|
+
rects = reset.rects === true ? await platform.getElementRects({
|
|
119
|
+
reference,
|
|
120
|
+
floating,
|
|
121
|
+
strategy
|
|
122
|
+
}) : reset.rects;
|
|
123
|
+
}
|
|
124
|
+
({
|
|
125
|
+
x,
|
|
126
|
+
y
|
|
127
|
+
} = computeCoordsFromPlacement(rects, statefulPlacement, rtl));
|
|
128
|
+
}
|
|
129
|
+
i = -1;
|
|
130
|
+
}
|
|
102
131
|
}
|
|
103
132
|
return {
|
|
104
|
-
x
|
|
105
|
-
y
|
|
106
|
-
placement:
|
|
107
|
-
strategy
|
|
108
|
-
middlewareData
|
|
133
|
+
x,
|
|
134
|
+
y,
|
|
135
|
+
placement: statefulPlacement,
|
|
136
|
+
strategy,
|
|
137
|
+
middlewareData
|
|
109
138
|
};
|
|
110
139
|
};
|
|
111
|
-
async function
|
|
112
|
-
var
|
|
113
|
-
|
|
140
|
+
async function detectOverflow(state, options) {
|
|
141
|
+
var _await$platform$isEle;
|
|
142
|
+
if (options === void 0) {
|
|
143
|
+
options = {};
|
|
144
|
+
}
|
|
145
|
+
const {
|
|
146
|
+
x,
|
|
147
|
+
y,
|
|
148
|
+
platform,
|
|
149
|
+
rects,
|
|
150
|
+
elements,
|
|
151
|
+
strategy
|
|
152
|
+
} = state;
|
|
114
153
|
const {
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
154
|
+
boundary = "clippingAncestors",
|
|
155
|
+
rootBoundary = "viewport",
|
|
156
|
+
elementContext = "floating",
|
|
157
|
+
altBoundary = false,
|
|
158
|
+
padding = 0
|
|
159
|
+
} = evaluate(options, state);
|
|
160
|
+
const paddingObject = getPaddingObject(padding);
|
|
161
|
+
const altContext = elementContext === "floating" ? "reference" : "floating";
|
|
162
|
+
const element = elements[altBoundary ? altContext : elementContext];
|
|
163
|
+
const clippingClientRect = rectToClientRect(await platform.getClippingRect({
|
|
164
|
+
element: ((_await$platform$isEle = await (platform.isElement == null ? void 0 : platform.isElement(element))) != null ? _await$platform$isEle : true) ? element : element.contextElement || await (platform.getDocumentElement == null ? void 0 : platform.getDocumentElement(elements.floating)),
|
|
165
|
+
boundary,
|
|
166
|
+
rootBoundary,
|
|
167
|
+
strategy
|
|
168
|
+
}));
|
|
169
|
+
const rect = elementContext === "floating" ? {
|
|
170
|
+
x,
|
|
171
|
+
y,
|
|
172
|
+
width: rects.floating.width,
|
|
173
|
+
height: rects.floating.height
|
|
174
|
+
} : rects.reference;
|
|
175
|
+
const offsetParent = await (platform.getOffsetParent == null ? void 0 : platform.getOffsetParent(elements.floating));
|
|
176
|
+
const offsetScale = await (platform.isElement == null ? void 0 : platform.isElement(offsetParent)) ? await (platform.getScale == null ? void 0 : platform.getScale(offsetParent)) || {
|
|
138
177
|
x: 1,
|
|
139
178
|
y: 1
|
|
140
179
|
} : {
|
|
141
180
|
x: 1,
|
|
142
181
|
y: 1
|
|
143
|
-
}
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
182
|
+
};
|
|
183
|
+
const elementClientRect = rectToClientRect(platform.convertOffsetParentRelativeRectToViewportRelativeRect ? await platform.convertOffsetParentRelativeRectToViewportRelativeRect({
|
|
184
|
+
elements,
|
|
185
|
+
rect,
|
|
186
|
+
offsetParent,
|
|
187
|
+
strategy
|
|
188
|
+
}) : rect);
|
|
149
189
|
return {
|
|
150
|
-
top: (
|
|
151
|
-
bottom: (
|
|
152
|
-
left: (
|
|
153
|
-
right: (
|
|
190
|
+
top: (clippingClientRect.top - elementClientRect.top + paddingObject.top) / offsetScale.y,
|
|
191
|
+
bottom: (elementClientRect.bottom - clippingClientRect.bottom + paddingObject.bottom) / offsetScale.y,
|
|
192
|
+
left: (clippingClientRect.left - elementClientRect.left + paddingObject.left) / offsetScale.x,
|
|
193
|
+
right: (elementClientRect.right - clippingClientRect.right + paddingObject.right) / offsetScale.x
|
|
154
194
|
};
|
|
155
195
|
}
|
|
156
|
-
const
|
|
196
|
+
const arrow = (options) => ({
|
|
157
197
|
name: "arrow",
|
|
158
|
-
options
|
|
159
|
-
async fn(
|
|
198
|
+
options,
|
|
199
|
+
async fn(state) {
|
|
200
|
+
const {
|
|
201
|
+
x,
|
|
202
|
+
y,
|
|
203
|
+
placement,
|
|
204
|
+
rects,
|
|
205
|
+
platform,
|
|
206
|
+
elements,
|
|
207
|
+
middlewareData
|
|
208
|
+
} = state;
|
|
160
209
|
const {
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
platform: o,
|
|
166
|
-
elements: m,
|
|
167
|
-
middlewareData: u
|
|
168
|
-
} = e, {
|
|
169
|
-
element: h,
|
|
170
|
-
padding: c = 0
|
|
171
|
-
} = L(t, e) || {};
|
|
172
|
-
if (h == null)
|
|
210
|
+
element,
|
|
211
|
+
padding = 0
|
|
212
|
+
} = evaluate(options, state) || {};
|
|
213
|
+
if (element == null) {
|
|
173
214
|
return {};
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
const
|
|
215
|
+
}
|
|
216
|
+
const paddingObject = getPaddingObject(padding);
|
|
217
|
+
const coords = {
|
|
218
|
+
x,
|
|
219
|
+
y
|
|
220
|
+
};
|
|
221
|
+
const axis = getAlignmentAxis(placement);
|
|
222
|
+
const length = getAxisLength(axis);
|
|
223
|
+
const arrowDimensions = await platform.getDimensions(element);
|
|
224
|
+
const isYAxis = axis === "y";
|
|
225
|
+
const minProp = isYAxis ? "top" : "left";
|
|
226
|
+
const maxProp = isYAxis ? "bottom" : "right";
|
|
227
|
+
const clientProp = isYAxis ? "clientHeight" : "clientWidth";
|
|
228
|
+
const endDiff = rects.reference[length] + rects.reference[axis] - coords[axis] - rects.floating[length];
|
|
229
|
+
const startDiff = coords[axis] - rects.reference[axis];
|
|
230
|
+
const arrowOffsetParent = await (platform.getOffsetParent == null ? void 0 : platform.getOffsetParent(element));
|
|
231
|
+
let clientSize = arrowOffsetParent ? arrowOffsetParent[clientProp] : 0;
|
|
232
|
+
if (!clientSize || !await (platform.isElement == null ? void 0 : platform.isElement(arrowOffsetParent))) {
|
|
233
|
+
clientSize = elements.floating[clientProp] || rects.floating[length];
|
|
234
|
+
}
|
|
235
|
+
const centerToReference = endDiff / 2 - startDiff / 2;
|
|
236
|
+
const largestPossiblePadding = clientSize / 2 - arrowDimensions[length] / 2 - 1;
|
|
237
|
+
const minPadding = min(paddingObject[minProp], largestPossiblePadding);
|
|
238
|
+
const maxPadding = min(paddingObject[maxProp], largestPossiblePadding);
|
|
239
|
+
const min$1 = minPadding;
|
|
240
|
+
const max2 = clientSize - arrowDimensions[length] - maxPadding;
|
|
241
|
+
const center = clientSize / 2 - arrowDimensions[length] / 2 + centerToReference;
|
|
242
|
+
const offset2 = clamp(min$1, center, max2);
|
|
243
|
+
const shouldAddOffset = !middlewareData.arrow && getAlignment(placement) != null && center !== offset2 && rects.reference[length] / 2 - (center < min$1 ? minPadding : maxPadding) - arrowDimensions[length] / 2 < 0;
|
|
244
|
+
const alignmentOffset = shouldAddOffset ? center < min$1 ? center - min$1 : center - max2 : 0;
|
|
181
245
|
return {
|
|
182
|
-
[
|
|
246
|
+
[axis]: coords[axis] + alignmentOffset,
|
|
183
247
|
data: {
|
|
184
|
-
[
|
|
185
|
-
centerOffset:
|
|
186
|
-
...
|
|
187
|
-
alignmentOffset
|
|
248
|
+
[axis]: offset2,
|
|
249
|
+
centerOffset: center - offset2 - alignmentOffset,
|
|
250
|
+
...shouldAddOffset && {
|
|
251
|
+
alignmentOffset
|
|
188
252
|
}
|
|
189
253
|
},
|
|
190
|
-
reset:
|
|
254
|
+
reset: shouldAddOffset
|
|
191
255
|
};
|
|
192
256
|
}
|
|
193
|
-
})
|
|
194
|
-
|
|
257
|
+
});
|
|
258
|
+
const flip = function(options) {
|
|
259
|
+
if (options === void 0) {
|
|
260
|
+
options = {};
|
|
261
|
+
}
|
|
262
|
+
return {
|
|
195
263
|
name: "flip",
|
|
196
|
-
options
|
|
197
|
-
async fn(
|
|
198
|
-
var
|
|
264
|
+
options,
|
|
265
|
+
async fn(state) {
|
|
266
|
+
var _middlewareData$arrow, _middlewareData$flip;
|
|
267
|
+
const {
|
|
268
|
+
placement,
|
|
269
|
+
middlewareData,
|
|
270
|
+
rects,
|
|
271
|
+
initialPlacement,
|
|
272
|
+
platform,
|
|
273
|
+
elements
|
|
274
|
+
} = state;
|
|
199
275
|
const {
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
fallbackPlacements: f,
|
|
210
|
-
fallbackStrategy: i = "bestFit",
|
|
211
|
-
fallbackAxisSideDirection: l = "none",
|
|
212
|
-
flipAlignment: g = !0,
|
|
213
|
-
...x
|
|
214
|
-
} = L(t, e);
|
|
215
|
-
if ((d = n.arrow) != null && d.alignmentOffset)
|
|
276
|
+
mainAxis: checkMainAxis = true,
|
|
277
|
+
crossAxis: checkCrossAxis = true,
|
|
278
|
+
fallbackPlacements: specifiedFallbackPlacements,
|
|
279
|
+
fallbackStrategy = "bestFit",
|
|
280
|
+
fallbackAxisSideDirection = "none",
|
|
281
|
+
flipAlignment = true,
|
|
282
|
+
...detectOverflowOptions
|
|
283
|
+
} = evaluate(options, state);
|
|
284
|
+
if ((_middlewareData$arrow = middlewareData.arrow) != null && _middlewareData$arrow.alignmentOffset) {
|
|
216
285
|
return {};
|
|
217
|
-
const y = j(r), A = T(m), p = j(m) === m, v = await (u.isRTL == null ? void 0 : u.isRTL(h.floating)), w = f || (p || !g ? [ee(m)] : te(m)), P = l !== "none";
|
|
218
|
-
!f && P && w.push(...ne(m, g, l, v));
|
|
219
|
-
const C = [m, ...w], M = await Y(e, x), k = [];
|
|
220
|
-
let O = ((a = n.flip) == null ? void 0 : a.overflows) || [];
|
|
221
|
-
if (c && k.push(M[y]), s) {
|
|
222
|
-
const b = ie(r, o, v);
|
|
223
|
-
k.push(M[b[0]], M[b[1]]);
|
|
224
286
|
}
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
287
|
+
const side = getSide(placement);
|
|
288
|
+
const initialSideAxis = getSideAxis(initialPlacement);
|
|
289
|
+
const isBasePlacement = getSide(initialPlacement) === initialPlacement;
|
|
290
|
+
const rtl = await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating));
|
|
291
|
+
const fallbackPlacements = specifiedFallbackPlacements || (isBasePlacement || !flipAlignment ? [getOppositePlacement(initialPlacement)] : getExpandedPlacements(initialPlacement));
|
|
292
|
+
const hasFallbackAxisSideDirection = fallbackAxisSideDirection !== "none";
|
|
293
|
+
if (!specifiedFallbackPlacements && hasFallbackAxisSideDirection) {
|
|
294
|
+
fallbackPlacements.push(...getOppositeAxisPlacements(initialPlacement, flipAlignment, fallbackAxisSideDirection, rtl));
|
|
295
|
+
}
|
|
296
|
+
const placements = [initialPlacement, ...fallbackPlacements];
|
|
297
|
+
const overflow = await detectOverflow(state, detectOverflowOptions);
|
|
298
|
+
const overflows = [];
|
|
299
|
+
let overflowsData = ((_middlewareData$flip = middlewareData.flip) == null ? void 0 : _middlewareData$flip.overflows) || [];
|
|
300
|
+
if (checkMainAxis) {
|
|
301
|
+
overflows.push(overflow[side]);
|
|
302
|
+
}
|
|
303
|
+
if (checkCrossAxis) {
|
|
304
|
+
const sides2 = getAlignmentSides(placement, rects, rtl);
|
|
305
|
+
overflows.push(overflow[sides2[0]], overflow[sides2[1]]);
|
|
306
|
+
}
|
|
307
|
+
overflowsData = [...overflowsData, {
|
|
308
|
+
placement,
|
|
309
|
+
overflows
|
|
310
|
+
}];
|
|
311
|
+
if (!overflows.every((side2) => side2 <= 0)) {
|
|
312
|
+
var _middlewareData$flip2, _overflowsData$filter;
|
|
313
|
+
const nextIndex = (((_middlewareData$flip2 = middlewareData.flip) == null ? void 0 : _middlewareData$flip2.index) || 0) + 1;
|
|
314
|
+
const nextPlacement = placements[nextIndex];
|
|
315
|
+
if (nextPlacement) {
|
|
316
|
+
const ignoreCrossAxisOverflow = checkCrossAxis === "alignment" ? initialSideAxis !== getSideAxis(nextPlacement) : false;
|
|
317
|
+
if (!ignoreCrossAxisOverflow || // We leave the current main axis only if every placement on that axis
|
|
318
|
+
// overflows the main axis.
|
|
319
|
+
overflowsData.every((d) => getSideAxis(d.placement) === initialSideAxis ? d.overflows[0] > 0 : true)) {
|
|
320
|
+
return {
|
|
321
|
+
data: {
|
|
322
|
+
index: nextIndex,
|
|
323
|
+
overflows: overflowsData
|
|
324
|
+
},
|
|
325
|
+
reset: {
|
|
326
|
+
placement: nextPlacement
|
|
327
|
+
}
|
|
328
|
+
};
|
|
329
|
+
}
|
|
330
|
+
}
|
|
331
|
+
let resetPlacement = (_overflowsData$filter = overflowsData.filter((d) => d.overflows[0] <= 0).sort((a, b) => a.overflows[1] - b.overflows[1])[0]) == null ? void 0 : _overflowsData$filter.placement;
|
|
332
|
+
if (!resetPlacement) {
|
|
333
|
+
switch (fallbackStrategy) {
|
|
246
334
|
case "bestFit": {
|
|
247
|
-
var
|
|
248
|
-
const
|
|
249
|
-
if (
|
|
250
|
-
const
|
|
251
|
-
return
|
|
335
|
+
var _overflowsData$filter2;
|
|
336
|
+
const placement2 = (_overflowsData$filter2 = overflowsData.filter((d) => {
|
|
337
|
+
if (hasFallbackAxisSideDirection) {
|
|
338
|
+
const currentSideAxis = getSideAxis(d.placement);
|
|
339
|
+
return currentSideAxis === initialSideAxis || // Create a bias to the `y` side axis due to horizontal
|
|
252
340
|
// reading directions favoring greater width.
|
|
253
|
-
|
|
341
|
+
currentSideAxis === "y";
|
|
254
342
|
}
|
|
255
|
-
return
|
|
256
|
-
}).map((
|
|
257
|
-
|
|
343
|
+
return true;
|
|
344
|
+
}).map((d) => [d.placement, d.overflows.filter((overflow2) => overflow2 > 0).reduce((acc, overflow2) => acc + overflow2, 0)]).sort((a, b) => a[1] - b[1])[0]) == null ? void 0 : _overflowsData$filter2[0];
|
|
345
|
+
if (placement2) {
|
|
346
|
+
resetPlacement = placement2;
|
|
347
|
+
}
|
|
258
348
|
break;
|
|
259
349
|
}
|
|
260
350
|
case "initialPlacement":
|
|
261
|
-
|
|
351
|
+
resetPlacement = initialPlacement;
|
|
262
352
|
break;
|
|
263
353
|
}
|
|
264
|
-
|
|
354
|
+
}
|
|
355
|
+
if (placement !== resetPlacement) {
|
|
265
356
|
return {
|
|
266
357
|
reset: {
|
|
267
|
-
placement:
|
|
358
|
+
placement: resetPlacement
|
|
268
359
|
}
|
|
269
360
|
};
|
|
361
|
+
}
|
|
270
362
|
}
|
|
271
363
|
return {};
|
|
272
364
|
}
|
|
273
365
|
};
|
|
274
366
|
};
|
|
275
|
-
function
|
|
367
|
+
function getSideOffsets(overflow, rect) {
|
|
276
368
|
return {
|
|
277
|
-
top:
|
|
278
|
-
right:
|
|
279
|
-
bottom:
|
|
280
|
-
left:
|
|
369
|
+
top: overflow.top - rect.height,
|
|
370
|
+
right: overflow.right - rect.width,
|
|
371
|
+
bottom: overflow.bottom - rect.height,
|
|
372
|
+
left: overflow.left - rect.width
|
|
281
373
|
};
|
|
282
374
|
}
|
|
283
|
-
function
|
|
284
|
-
return
|
|
375
|
+
function isAnySideFullyClipped(overflow) {
|
|
376
|
+
return sides.some((side) => overflow[side] >= 0);
|
|
285
377
|
}
|
|
286
|
-
const
|
|
287
|
-
|
|
378
|
+
const hide = function(options) {
|
|
379
|
+
if (options === void 0) {
|
|
380
|
+
options = {};
|
|
381
|
+
}
|
|
382
|
+
return {
|
|
288
383
|
name: "hide",
|
|
289
|
-
options
|
|
290
|
-
async fn(
|
|
384
|
+
options,
|
|
385
|
+
async fn(state) {
|
|
386
|
+
const {
|
|
387
|
+
rects
|
|
388
|
+
} = state;
|
|
291
389
|
const {
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
} = L(t, e);
|
|
297
|
-
switch (a) {
|
|
390
|
+
strategy = "referenceHidden",
|
|
391
|
+
...detectOverflowOptions
|
|
392
|
+
} = evaluate(options, state);
|
|
393
|
+
switch (strategy) {
|
|
298
394
|
case "referenceHidden": {
|
|
299
|
-
const
|
|
300
|
-
...
|
|
395
|
+
const overflow = await detectOverflow(state, {
|
|
396
|
+
...detectOverflowOptions,
|
|
301
397
|
elementContext: "reference"
|
|
302
|
-
})
|
|
398
|
+
});
|
|
399
|
+
const offsets = getSideOffsets(overflow, rects.reference);
|
|
303
400
|
return {
|
|
304
401
|
data: {
|
|
305
|
-
referenceHiddenOffsets:
|
|
306
|
-
referenceHidden:
|
|
402
|
+
referenceHiddenOffsets: offsets,
|
|
403
|
+
referenceHidden: isAnySideFullyClipped(offsets)
|
|
307
404
|
}
|
|
308
405
|
};
|
|
309
406
|
}
|
|
310
407
|
case "escaped": {
|
|
311
|
-
const
|
|
312
|
-
...
|
|
313
|
-
altBoundary:
|
|
314
|
-
})
|
|
408
|
+
const overflow = await detectOverflow(state, {
|
|
409
|
+
...detectOverflowOptions,
|
|
410
|
+
altBoundary: true
|
|
411
|
+
});
|
|
412
|
+
const offsets = getSideOffsets(overflow, rects.floating);
|
|
315
413
|
return {
|
|
316
414
|
data: {
|
|
317
|
-
escapedOffsets:
|
|
318
|
-
escaped:
|
|
415
|
+
escapedOffsets: offsets,
|
|
416
|
+
escaped: isAnySideFullyClipped(offsets)
|
|
319
417
|
}
|
|
320
418
|
};
|
|
321
419
|
}
|
|
322
|
-
default:
|
|
420
|
+
default: {
|
|
323
421
|
return {};
|
|
422
|
+
}
|
|
324
423
|
}
|
|
325
424
|
}
|
|
326
425
|
};
|
|
327
|
-
}
|
|
328
|
-
|
|
426
|
+
};
|
|
427
|
+
const originSides = /* @__PURE__ */ new Set(["left", "top"]);
|
|
428
|
+
async function convertValueToCoords(state, options) {
|
|
329
429
|
const {
|
|
330
|
-
placement
|
|
331
|
-
platform
|
|
332
|
-
elements
|
|
333
|
-
} =
|
|
430
|
+
placement,
|
|
431
|
+
platform,
|
|
432
|
+
elements
|
|
433
|
+
} = state;
|
|
434
|
+
const rtl = await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating));
|
|
435
|
+
const side = getSide(placement);
|
|
436
|
+
const alignment = getAlignment(placement);
|
|
437
|
+
const isVertical = getSideAxis(placement) === "y";
|
|
438
|
+
const mainAxisMulti = originSides.has(side) ? -1 : 1;
|
|
439
|
+
const crossAxisMulti = rtl && isVertical ? -1 : 1;
|
|
440
|
+
const rawValue = evaluate(options, state);
|
|
334
441
|
let {
|
|
335
|
-
mainAxis
|
|
336
|
-
crossAxis
|
|
337
|
-
alignmentAxis
|
|
338
|
-
} = typeof
|
|
339
|
-
mainAxis:
|
|
442
|
+
mainAxis,
|
|
443
|
+
crossAxis,
|
|
444
|
+
alignmentAxis
|
|
445
|
+
} = typeof rawValue === "number" ? {
|
|
446
|
+
mainAxis: rawValue,
|
|
340
447
|
crossAxis: 0,
|
|
341
448
|
alignmentAxis: null
|
|
342
449
|
} : {
|
|
343
|
-
mainAxis:
|
|
344
|
-
crossAxis:
|
|
345
|
-
alignmentAxis:
|
|
450
|
+
mainAxis: rawValue.mainAxis || 0,
|
|
451
|
+
crossAxis: rawValue.crossAxis || 0,
|
|
452
|
+
alignmentAxis: rawValue.alignmentAxis
|
|
346
453
|
};
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
454
|
+
if (alignment && typeof alignmentAxis === "number") {
|
|
455
|
+
crossAxis = alignment === "end" ? alignmentAxis * -1 : alignmentAxis;
|
|
456
|
+
}
|
|
457
|
+
return isVertical ? {
|
|
458
|
+
x: crossAxis * crossAxisMulti,
|
|
459
|
+
y: mainAxis * mainAxisMulti
|
|
350
460
|
} : {
|
|
351
|
-
x:
|
|
352
|
-
y:
|
|
461
|
+
x: mainAxis * mainAxisMulti,
|
|
462
|
+
y: crossAxis * crossAxisMulti
|
|
353
463
|
};
|
|
354
464
|
}
|
|
355
|
-
const
|
|
356
|
-
|
|
465
|
+
const offset = function(options) {
|
|
466
|
+
if (options === void 0) {
|
|
467
|
+
options = 0;
|
|
468
|
+
}
|
|
469
|
+
return {
|
|
357
470
|
name: "offset",
|
|
358
|
-
options
|
|
359
|
-
async fn(
|
|
360
|
-
var
|
|
471
|
+
options,
|
|
472
|
+
async fn(state) {
|
|
473
|
+
var _middlewareData$offse, _middlewareData$arrow;
|
|
361
474
|
const {
|
|
362
|
-
x
|
|
363
|
-
y
|
|
364
|
-
placement
|
|
365
|
-
middlewareData
|
|
366
|
-
} =
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
475
|
+
x,
|
|
476
|
+
y,
|
|
477
|
+
placement,
|
|
478
|
+
middlewareData
|
|
479
|
+
} = state;
|
|
480
|
+
const diffCoords = await convertValueToCoords(state, options);
|
|
481
|
+
if (placement === ((_middlewareData$offse = middlewareData.offset) == null ? void 0 : _middlewareData$offse.placement) && (_middlewareData$arrow = middlewareData.arrow) != null && _middlewareData$arrow.alignmentOffset) {
|
|
482
|
+
return {};
|
|
483
|
+
}
|
|
484
|
+
return {
|
|
485
|
+
x: x + diffCoords.x,
|
|
486
|
+
y: y + diffCoords.y,
|
|
370
487
|
data: {
|
|
371
|
-
...
|
|
372
|
-
placement
|
|
488
|
+
...diffCoords,
|
|
489
|
+
placement
|
|
373
490
|
}
|
|
374
491
|
};
|
|
375
492
|
}
|
|
376
493
|
};
|
|
377
|
-
}
|
|
378
|
-
|
|
494
|
+
};
|
|
495
|
+
const shift = function(options) {
|
|
496
|
+
if (options === void 0) {
|
|
497
|
+
options = {};
|
|
498
|
+
}
|
|
499
|
+
return {
|
|
379
500
|
name: "shift",
|
|
380
|
-
options
|
|
381
|
-
async fn(
|
|
501
|
+
options,
|
|
502
|
+
async fn(state) {
|
|
382
503
|
const {
|
|
383
|
-
x
|
|
384
|
-
y
|
|
385
|
-
placement
|
|
386
|
-
} =
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
504
|
+
x,
|
|
505
|
+
y,
|
|
506
|
+
placement
|
|
507
|
+
} = state;
|
|
508
|
+
const {
|
|
509
|
+
mainAxis: checkMainAxis = true,
|
|
510
|
+
crossAxis: checkCrossAxis = false,
|
|
511
|
+
limiter = {
|
|
512
|
+
fn: (_ref) => {
|
|
391
513
|
let {
|
|
392
|
-
x:
|
|
393
|
-
y:
|
|
394
|
-
} =
|
|
514
|
+
x: x2,
|
|
515
|
+
y: y2
|
|
516
|
+
} = _ref;
|
|
395
517
|
return {
|
|
396
|
-
x:
|
|
397
|
-
y:
|
|
518
|
+
x: x2,
|
|
519
|
+
y: y2
|
|
398
520
|
};
|
|
399
521
|
}
|
|
400
522
|
},
|
|
401
|
-
...
|
|
402
|
-
} =
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
523
|
+
...detectOverflowOptions
|
|
524
|
+
} = evaluate(options, state);
|
|
525
|
+
const coords = {
|
|
526
|
+
x,
|
|
527
|
+
y
|
|
528
|
+
};
|
|
529
|
+
const overflow = await detectOverflow(state, detectOverflowOptions);
|
|
530
|
+
const crossAxis = getSideAxis(getSide(placement));
|
|
531
|
+
const mainAxis = getOppositeAxis(crossAxis);
|
|
532
|
+
let mainAxisCoord = coords[mainAxis];
|
|
533
|
+
let crossAxisCoord = coords[crossAxis];
|
|
534
|
+
if (checkMainAxis) {
|
|
535
|
+
const minSide = mainAxis === "y" ? "top" : "left";
|
|
536
|
+
const maxSide = mainAxis === "y" ? "bottom" : "right";
|
|
537
|
+
const min2 = mainAxisCoord + overflow[minSide];
|
|
538
|
+
const max2 = mainAxisCoord - overflow[maxSide];
|
|
539
|
+
mainAxisCoord = clamp(min2, mainAxisCoord, max2);
|
|
410
540
|
}
|
|
411
|
-
if (
|
|
412
|
-
const
|
|
413
|
-
|
|
541
|
+
if (checkCrossAxis) {
|
|
542
|
+
const minSide = crossAxis === "y" ? "top" : "left";
|
|
543
|
+
const maxSide = crossAxis === "y" ? "bottom" : "right";
|
|
544
|
+
const min2 = crossAxisCoord + overflow[minSide];
|
|
545
|
+
const max2 = crossAxisCoord - overflow[maxSide];
|
|
546
|
+
crossAxisCoord = clamp(min2, crossAxisCoord, max2);
|
|
414
547
|
}
|
|
415
|
-
const
|
|
416
|
-
...
|
|
417
|
-
[
|
|
418
|
-
[
|
|
548
|
+
const limitedCoords = limiter.fn({
|
|
549
|
+
...state,
|
|
550
|
+
[mainAxis]: mainAxisCoord,
|
|
551
|
+
[crossAxis]: crossAxisCoord
|
|
419
552
|
});
|
|
420
553
|
return {
|
|
421
|
-
...
|
|
554
|
+
...limitedCoords,
|
|
422
555
|
data: {
|
|
423
|
-
x:
|
|
424
|
-
y:
|
|
556
|
+
x: limitedCoords.x - x,
|
|
557
|
+
y: limitedCoords.y - y,
|
|
425
558
|
enabled: {
|
|
426
|
-
[
|
|
427
|
-
[
|
|
559
|
+
[mainAxis]: checkMainAxis,
|
|
560
|
+
[crossAxis]: checkCrossAxis
|
|
428
561
|
}
|
|
429
562
|
}
|
|
430
563
|
};
|
|
431
564
|
}
|
|
432
565
|
};
|
|
433
|
-
}
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
566
|
+
};
|
|
567
|
+
const limitShift = function(options) {
|
|
568
|
+
if (options === void 0) {
|
|
569
|
+
options = {};
|
|
570
|
+
}
|
|
571
|
+
return {
|
|
572
|
+
options,
|
|
573
|
+
fn(state) {
|
|
574
|
+
const {
|
|
575
|
+
x,
|
|
576
|
+
y,
|
|
577
|
+
placement,
|
|
578
|
+
rects,
|
|
579
|
+
middlewareData
|
|
580
|
+
} = state;
|
|
437
581
|
const {
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
mainAxis: g,
|
|
582
|
+
offset: offset2 = 0,
|
|
583
|
+
mainAxis: checkMainAxis = true,
|
|
584
|
+
crossAxis: checkCrossAxis = true
|
|
585
|
+
} = evaluate(options, state);
|
|
586
|
+
const coords = {
|
|
587
|
+
x,
|
|
588
|
+
y
|
|
589
|
+
};
|
|
590
|
+
const crossAxis = getSideAxis(placement);
|
|
591
|
+
const mainAxis = getOppositeAxis(crossAxis);
|
|
592
|
+
let mainAxisCoord = coords[mainAxis];
|
|
593
|
+
let crossAxisCoord = coords[crossAxis];
|
|
594
|
+
const rawOffset = evaluate(offset2, state);
|
|
595
|
+
const computedOffset = typeof rawOffset === "number" ? {
|
|
596
|
+
mainAxis: rawOffset,
|
|
454
597
|
crossAxis: 0
|
|
455
598
|
} : {
|
|
456
599
|
mainAxis: 0,
|
|
457
600
|
crossAxis: 0,
|
|
458
|
-
...
|
|
601
|
+
...rawOffset
|
|
459
602
|
};
|
|
460
|
-
if (
|
|
461
|
-
const
|
|
462
|
-
|
|
603
|
+
if (checkMainAxis) {
|
|
604
|
+
const len = mainAxis === "y" ? "height" : "width";
|
|
605
|
+
const limitMin = rects.reference[mainAxis] - rects.floating[len] + computedOffset.mainAxis;
|
|
606
|
+
const limitMax = rects.reference[mainAxis] + rects.reference[len] - computedOffset.mainAxis;
|
|
607
|
+
if (mainAxisCoord < limitMin) {
|
|
608
|
+
mainAxisCoord = limitMin;
|
|
609
|
+
} else if (mainAxisCoord > limitMax) {
|
|
610
|
+
mainAxisCoord = limitMax;
|
|
611
|
+
}
|
|
463
612
|
}
|
|
464
|
-
if (
|
|
465
|
-
var
|
|
466
|
-
const
|
|
467
|
-
|
|
613
|
+
if (checkCrossAxis) {
|
|
614
|
+
var _middlewareData$offse, _middlewareData$offse2;
|
|
615
|
+
const len = mainAxis === "y" ? "width" : "height";
|
|
616
|
+
const isOriginSide = originSides.has(getSide(placement));
|
|
617
|
+
const limitMin = rects.reference[crossAxis] - rects.floating[len] + (isOriginSide ? ((_middlewareData$offse = middlewareData.offset) == null ? void 0 : _middlewareData$offse[crossAxis]) || 0 : 0) + (isOriginSide ? 0 : computedOffset.crossAxis);
|
|
618
|
+
const limitMax = rects.reference[crossAxis] + rects.reference[len] + (isOriginSide ? 0 : ((_middlewareData$offse2 = middlewareData.offset) == null ? void 0 : _middlewareData$offse2[crossAxis]) || 0) - (isOriginSide ? computedOffset.crossAxis : 0);
|
|
619
|
+
if (crossAxisCoord < limitMin) {
|
|
620
|
+
crossAxisCoord = limitMin;
|
|
621
|
+
} else if (crossAxisCoord > limitMax) {
|
|
622
|
+
crossAxisCoord = limitMax;
|
|
623
|
+
}
|
|
468
624
|
}
|
|
469
625
|
return {
|
|
470
|
-
[
|
|
471
|
-
[
|
|
626
|
+
[mainAxis]: mainAxisCoord,
|
|
627
|
+
[crossAxis]: crossAxisCoord
|
|
472
628
|
};
|
|
473
629
|
}
|
|
474
630
|
};
|
|
475
|
-
}
|
|
476
|
-
|
|
631
|
+
};
|
|
632
|
+
const size = function(options) {
|
|
633
|
+
if (options === void 0) {
|
|
634
|
+
options = {};
|
|
635
|
+
}
|
|
636
|
+
return {
|
|
477
637
|
name: "size",
|
|
478
|
-
options
|
|
479
|
-
async fn(
|
|
480
|
-
var
|
|
638
|
+
options,
|
|
639
|
+
async fn(state) {
|
|
640
|
+
var _state$middlewareData, _state$middlewareData2;
|
|
481
641
|
const {
|
|
482
|
-
placement
|
|
483
|
-
rects
|
|
484
|
-
platform
|
|
485
|
-
elements
|
|
486
|
-
} =
|
|
487
|
-
|
|
642
|
+
placement,
|
|
643
|
+
rects,
|
|
644
|
+
platform,
|
|
645
|
+
elements
|
|
646
|
+
} = state;
|
|
647
|
+
const {
|
|
648
|
+
apply = () => {
|
|
488
649
|
},
|
|
489
|
-
...
|
|
490
|
-
} =
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
650
|
+
...detectOverflowOptions
|
|
651
|
+
} = evaluate(options, state);
|
|
652
|
+
const overflow = await detectOverflow(state, detectOverflowOptions);
|
|
653
|
+
const side = getSide(placement);
|
|
654
|
+
const alignment = getAlignment(placement);
|
|
655
|
+
const isYAxis = getSideAxis(placement) === "y";
|
|
656
|
+
const {
|
|
657
|
+
width,
|
|
658
|
+
height
|
|
659
|
+
} = rects.floating;
|
|
660
|
+
let heightSide;
|
|
661
|
+
let widthSide;
|
|
662
|
+
if (side === "top" || side === "bottom") {
|
|
663
|
+
heightSide = side;
|
|
664
|
+
widthSide = alignment === (await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating)) ? "start" : "end") ? "left" : "right";
|
|
665
|
+
} else {
|
|
666
|
+
widthSide = side;
|
|
667
|
+
heightSide = alignment === "end" ? "top" : "bottom";
|
|
501
668
|
}
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
669
|
+
const maximumClippingHeight = height - overflow.top - overflow.bottom;
|
|
670
|
+
const maximumClippingWidth = width - overflow.left - overflow.right;
|
|
671
|
+
const overflowAvailableHeight = min(height - overflow[heightSide], maximumClippingHeight);
|
|
672
|
+
const overflowAvailableWidth = min(width - overflow[widthSide], maximumClippingWidth);
|
|
673
|
+
const noShift = !state.middlewareData.shift;
|
|
674
|
+
let availableHeight = overflowAvailableHeight;
|
|
675
|
+
let availableWidth = overflowAvailableWidth;
|
|
676
|
+
if ((_state$middlewareData = state.middlewareData.shift) != null && _state$middlewareData.enabled.x) {
|
|
677
|
+
availableWidth = maximumClippingWidth;
|
|
678
|
+
}
|
|
679
|
+
if ((_state$middlewareData2 = state.middlewareData.shift) != null && _state$middlewareData2.enabled.y) {
|
|
680
|
+
availableHeight = maximumClippingHeight;
|
|
681
|
+
}
|
|
682
|
+
if (noShift && !alignment) {
|
|
683
|
+
const xMin = max(overflow.left, 0);
|
|
684
|
+
const xMax = max(overflow.right, 0);
|
|
685
|
+
const yMin = max(overflow.top, 0);
|
|
686
|
+
const yMax = max(overflow.bottom, 0);
|
|
687
|
+
if (isYAxis) {
|
|
688
|
+
availableWidth = width - 2 * (xMin !== 0 || xMax !== 0 ? xMin + xMax : max(overflow.left, overflow.right));
|
|
689
|
+
} else {
|
|
690
|
+
availableHeight = height - 2 * (yMin !== 0 || yMax !== 0 ? yMin + yMax : max(overflow.top, overflow.bottom));
|
|
511
691
|
}
|
|
512
|
-
}
|
|
692
|
+
}
|
|
693
|
+
await apply({
|
|
694
|
+
...state,
|
|
695
|
+
availableWidth,
|
|
696
|
+
availableHeight
|
|
697
|
+
});
|
|
698
|
+
const nextDimensions = await platform.getDimensions(elements.floating);
|
|
699
|
+
if (width !== nextDimensions.width || height !== nextDimensions.height) {
|
|
700
|
+
return {
|
|
701
|
+
reset: {
|
|
702
|
+
rects: true
|
|
703
|
+
}
|
|
704
|
+
};
|
|
705
|
+
}
|
|
706
|
+
return {};
|
|
513
707
|
}
|
|
514
708
|
};
|
|
515
709
|
};
|
|
516
710
|
export {
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
711
|
+
arrow,
|
|
712
|
+
computePosition,
|
|
713
|
+
detectOverflow,
|
|
714
|
+
flip,
|
|
715
|
+
hide,
|
|
716
|
+
limitShift,
|
|
717
|
+
offset,
|
|
718
|
+
rectToClientRect,
|
|
719
|
+
shift,
|
|
720
|
+
size
|
|
527
721
|
};
|
|
528
722
|
//# sourceMappingURL=floating-ui.core.js.map
|