@blimu/react 0.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +552 -0
- package/dist/_virtual/index.cjs +2 -0
- package/dist/_virtual/index.cjs.map +1 -0
- package/dist/_virtual/index.js +6 -0
- package/dist/_virtual/index.js.map +1 -0
- package/dist/_virtual/index2.cjs +2 -0
- package/dist/_virtual/index2.cjs.map +1 -0
- package/dist/_virtual/index2.js +5 -0
- package/dist/_virtual/index2.js.map +1 -0
- package/dist/_virtual/use-sync-external-store-shim.development.cjs +2 -0
- package/dist/_virtual/use-sync-external-store-shim.development.cjs.map +1 -0
- package/dist/_virtual/use-sync-external-store-shim.development.js +5 -0
- package/dist/_virtual/use-sync-external-store-shim.development.js.map +1 -0
- package/dist/_virtual/use-sync-external-store-shim.production.cjs +2 -0
- package/dist/_virtual/use-sync-external-store-shim.production.cjs.map +1 -0
- package/dist/_virtual/use-sync-external-store-shim.production.js +5 -0
- package/dist/_virtual/use-sync-external-store-shim.production.js.map +1 -0
- package/dist/client/auth.service.cjs +2 -0
- package/dist/client/auth.service.cjs.map +1 -0
- package/dist/client/auth.service.d.ts +50 -0
- package/dist/client/auth.service.d.ts.map +1 -0
- package/dist/client/auth.service.js +153 -0
- package/dist/client/auth.service.js.map +1 -0
- package/dist/client/auth.service.test-service.d.ts +39 -0
- package/dist/client/auth.service.test-service.d.ts.map +1 -0
- package/dist/client/external-store.cjs +2 -0
- package/dist/client/external-store.cjs.map +1 -0
- package/dist/client/external-store.d.ts +20 -0
- package/dist/client/external-store.d.ts.map +1 -0
- package/dist/client/external-store.js +13 -0
- package/dist/client/external-store.js.map +1 -0
- package/dist/client/runtime-client.cjs +2 -0
- package/dist/client/runtime-client.cjs.map +1 -0
- package/dist/client/runtime-client.d.ts +49 -0
- package/dist/client/runtime-client.d.ts.map +1 -0
- package/dist/client/runtime-client.js +103 -0
- package/dist/client/runtime-client.js.map +1 -0
- package/dist/components/index.d.ts +11 -0
- package/dist/components/index.d.ts.map +1 -0
- package/dist/components/members-list.cjs +2 -0
- package/dist/components/members-list.cjs.map +1 -0
- package/dist/components/members-list.d.ts +70 -0
- package/dist/components/members-list.d.ts.map +1 -0
- package/dist/components/members-list.js +111 -0
- package/dist/components/members-list.js.map +1 -0
- package/dist/components/redirect-to-sign-in.cjs +2 -0
- package/dist/components/redirect-to-sign-in.cjs.map +1 -0
- package/dist/components/redirect-to-sign-in.d.ts +39 -0
- package/dist/components/redirect-to-sign-in.d.ts.map +1 -0
- package/dist/components/redirect-to-sign-in.js +27 -0
- package/dist/components/redirect-to-sign-in.js.map +1 -0
- package/dist/components/sign-in-button/styles.d.ts +7 -0
- package/dist/components/sign-in-button/styles.d.ts.map +1 -0
- package/dist/components/sign-in-button.cjs +2 -0
- package/dist/components/sign-in-button.cjs.map +1 -0
- package/dist/components/sign-in-button.d.ts +47 -0
- package/dist/components/sign-in-button.d.ts.map +1 -0
- package/dist/components/sign-in-button.js +33 -0
- package/dist/components/sign-in-button.js.map +1 -0
- package/dist/components/ui/avatar.cjs +2 -0
- package/dist/components/ui/avatar.cjs.map +1 -0
- package/dist/components/ui/avatar.d.ts +7 -0
- package/dist/components/ui/avatar.d.ts.map +1 -0
- package/dist/components/ui/avatar.js +43 -0
- package/dist/components/ui/avatar.js.map +1 -0
- package/dist/components/ui/badge.d.ts +10 -0
- package/dist/components/ui/badge.d.ts.map +1 -0
- package/dist/components/ui/dropdown-menu.cjs +2 -0
- package/dist/components/ui/dropdown-menu.cjs.map +1 -0
- package/dist/components/ui/dropdown-menu.d.ts +28 -0
- package/dist/components/ui/dropdown-menu.d.ts.map +1 -0
- package/dist/components/ui/dropdown-menu.js +130 -0
- package/dist/components/ui/dropdown-menu.js.map +1 -0
- package/dist/components/ui/popover.d.ts +8 -0
- package/dist/components/ui/popover.d.ts.map +1 -0
- package/dist/components/ui/separator.d.ts +5 -0
- package/dist/components/ui/separator.d.ts.map +1 -0
- package/dist/components/user-avatar/styles.d.ts +7 -0
- package/dist/components/user-avatar/styles.d.ts.map +1 -0
- package/dist/components/user-avatar.cjs +2 -0
- package/dist/components/user-avatar.cjs.map +1 -0
- package/dist/components/user-avatar.d.ts +41 -0
- package/dist/components/user-avatar.d.ts.map +1 -0
- package/dist/components/user-avatar.js +23 -0
- package/dist/components/user-avatar.js.map +1 -0
- package/dist/components/user-button/styles.cjs +2 -0
- package/dist/components/user-button/styles.cjs.map +1 -0
- package/dist/components/user-button/styles.d.ts +17 -0
- package/dist/components/user-button/styles.d.ts.map +1 -0
- package/dist/components/user-button/styles.js +39 -0
- package/dist/components/user-button/styles.js.map +1 -0
- package/dist/components/user-button/user-button.cjs +2 -0
- package/dist/components/user-button/user-button.cjs.map +1 -0
- package/dist/components/user-button/user-button.d.ts +15 -0
- package/dist/components/user-button/user-button.d.ts.map +1 -0
- package/dist/components/user-button/user-button.js +93 -0
- package/dist/components/user-button/user-button.js.map +1 -0
- package/dist/components.cjs +2 -0
- package/dist/components.cjs.map +1 -0
- package/dist/components.js +13 -0
- package/dist/components.js.map +1 -0
- package/dist/hooks/index.d.ts +7 -0
- package/dist/hooks/index.d.ts.map +1 -0
- package/dist/hooks/use-auth.cjs +2 -0
- package/dist/hooks/use-auth.cjs.map +1 -0
- package/dist/hooks/use-auth.d.ts +92 -0
- package/dist/hooks/use-auth.d.ts.map +1 -0
- package/dist/hooks/use-auth.js +41 -0
- package/dist/hooks/use-auth.js.map +1 -0
- package/dist/hooks/use-client.cjs +2 -0
- package/dist/hooks/use-client.cjs.map +1 -0
- package/dist/hooks/use-client.d.ts +27 -0
- package/dist/hooks/use-client.d.ts.map +1 -0
- package/dist/hooks/use-client.js +9 -0
- package/dist/hooks/use-client.js.map +1 -0
- package/dist/hooks/use-members.cjs +2 -0
- package/dist/hooks/use-members.cjs.map +1 -0
- package/dist/hooks/use-members.d.ts +50 -0
- package/dist/hooks/use-members.d.ts.map +1 -0
- package/dist/hooks/use-members.js +49 -0
- package/dist/hooks/use-members.js.map +1 -0
- package/dist/hooks/use-store.cjs +2 -0
- package/dist/hooks/use-store.cjs.map +1 -0
- package/dist/hooks/use-store.d.ts +24 -0
- package/dist/hooks/use-store.d.ts.map +1 -0
- package/dist/hooks/use-store.js +18 -0
- package/dist/hooks/use-store.js.map +1 -0
- package/dist/hooks.cjs +2 -0
- package/dist/hooks.cjs.map +1 -0
- package/dist/hooks.js +14 -0
- package/dist/hooks.js.map +1 -0
- package/dist/index.cjs +2 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.ts +13 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +38 -0
- package/dist/index.js.map +1 -0
- package/dist/lib/utils.cjs +2 -0
- package/dist/lib/utils.cjs.map +1 -0
- package/dist/lib/utils.d.ts +7 -0
- package/dist/lib/utils.d.ts.map +1 -0
- package/dist/lib/utils.js +9 -0
- package/dist/lib/utils.js.map +1 -0
- package/dist/lib/variants.cjs +2 -0
- package/dist/lib/variants.cjs.map +1 -0
- package/dist/lib/variants.d.ts +37 -0
- package/dist/lib/variants.d.ts.map +1 -0
- package/dist/lib/variants.js +46 -0
- package/dist/lib/variants.js.map +1 -0
- package/dist/node_modules/@floating-ui/core/dist/floating-ui.core.cjs +2 -0
- package/dist/node_modules/@floating-ui/core/dist/floating-ui.core.cjs.map +1 -0
- package/dist/node_modules/@floating-ui/core/dist/floating-ui.core.js +528 -0
- package/dist/node_modules/@floating-ui/core/dist/floating-ui.core.js.map +1 -0
- package/dist/node_modules/@floating-ui/dom/dist/floating-ui.dom.cjs +2 -0
- package/dist/node_modules/@floating-ui/dom/dist/floating-ui.dom.cjs.map +1 -0
- package/dist/node_modules/@floating-ui/dom/dist/floating-ui.dom.js +403 -0
- package/dist/node_modules/@floating-ui/dom/dist/floating-ui.dom.js.map +1 -0
- package/dist/node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.cjs +2 -0
- package/dist/node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.cjs.map +1 -0
- package/dist/node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.js +209 -0
- package/dist/node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.js.map +1 -0
- package/dist/node_modules/@floating-ui/utils/dist/floating-ui.utils.cjs +2 -0
- package/dist/node_modules/@floating-ui/utils/dist/floating-ui.utils.cjs.map +1 -0
- package/dist/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.cjs +2 -0
- package/dist/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.cjs.map +1 -0
- package/dist/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.js +137 -0
- package/dist/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.js.map +1 -0
- package/dist/node_modules/@floating-ui/utils/dist/floating-ui.utils.js +131 -0
- package/dist/node_modules/@floating-ui/utils/dist/floating-ui.utils.js.map +1 -0
- package/dist/node_modules/@radix-ui/primitive/dist/index.cjs +2 -0
- package/dist/node_modules/@radix-ui/primitive/dist/index.cjs.map +1 -0
- package/dist/node_modules/@radix-ui/primitive/dist/index.js +10 -0
- package/dist/node_modules/@radix-ui/primitive/dist/index.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-arrow/dist/index.cjs +2 -0
- package/dist/node_modules/@radix-ui/react-arrow/dist/index.cjs.map +1 -0
- package/dist/node_modules/@radix-ui/react-arrow/dist/index.js +25 -0
- package/dist/node_modules/@radix-ui/react-arrow/dist/index.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-avatar/dist/index.cjs +2 -0
- package/dist/node_modules/@radix-ui/react-avatar/dist/index.cjs.map +1 -0
- package/dist/node_modules/@radix-ui/react-avatar/dist/index.js +76 -0
- package/dist/node_modules/@radix-ui/react-avatar/dist/index.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-avatar/node_modules/@radix-ui/react-context/dist/index.cjs +2 -0
- package/dist/node_modules/@radix-ui/react-avatar/node_modules/@radix-ui/react-context/dist/index.cjs.map +1 -0
- package/dist/node_modules/@radix-ui/react-avatar/node_modules/@radix-ui/react-context/dist/index.js +56 -0
- package/dist/node_modules/@radix-ui/react-avatar/node_modules/@radix-ui/react-context/dist/index.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-avatar/node_modules/@radix-ui/react-primitive/dist/index.cjs +2 -0
- package/dist/node_modules/@radix-ui/react-avatar/node_modules/@radix-ui/react-primitive/dist/index.cjs.map +1 -0
- package/dist/node_modules/@radix-ui/react-avatar/node_modules/@radix-ui/react-primitive/dist/index.js +33 -0
- package/dist/node_modules/@radix-ui/react-avatar/node_modules/@radix-ui/react-primitive/dist/index.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-avatar/node_modules/@radix-ui/react-slot/dist/index.cjs +2 -0
- package/dist/node_modules/@radix-ui/react-avatar/node_modules/@radix-ui/react-slot/dist/index.cjs.map +1 -0
- package/dist/node_modules/@radix-ui/react-avatar/node_modules/@radix-ui/react-slot/dist/index.js +59 -0
- package/dist/node_modules/@radix-ui/react-avatar/node_modules/@radix-ui/react-slot/dist/index.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-collection/dist/index.cjs +2 -0
- package/dist/node_modules/@radix-ui/react-collection/dist/index.cjs.map +1 -0
- package/dist/node_modules/@radix-ui/react-collection/dist/index.js +51 -0
- package/dist/node_modules/@radix-ui/react-collection/dist/index.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-compose-refs/dist/index.cjs +2 -0
- package/dist/node_modules/@radix-ui/react-compose-refs/dist/index.cjs.map +1 -0
- package/dist/node_modules/@radix-ui/react-compose-refs/dist/index.js +30 -0
- package/dist/node_modules/@radix-ui/react-compose-refs/dist/index.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-context/dist/index.cjs +2 -0
- package/dist/node_modules/@radix-ui/react-context/dist/index.cjs.map +1 -0
- package/dist/node_modules/@radix-ui/react-context/dist/index.js +54 -0
- package/dist/node_modules/@radix-ui/react-context/dist/index.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-direction/dist/index.cjs +2 -0
- package/dist/node_modules/@radix-ui/react-direction/dist/index.cjs.map +1 -0
- package/dist/node_modules/@radix-ui/react-direction/dist/index.js +11 -0
- package/dist/node_modules/@radix-ui/react-direction/dist/index.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-dismissable-layer/dist/index.cjs +2 -0
- package/dist/node_modules/@radix-ui/react-dismissable-layer/dist/index.cjs.map +1 -0
- package/dist/node_modules/@radix-ui/react-dismissable-layer/dist/index.js +128 -0
- package/dist/node_modules/@radix-ui/react-dismissable-layer/dist/index.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-dropdown-menu/dist/index.cjs +2 -0
- package/dist/node_modules/@radix-ui/react-dropdown-menu/dist/index.cjs.map +1 -0
- package/dist/node_modules/@radix-ui/react-dropdown-menu/dist/index.js +215 -0
- package/dist/node_modules/@radix-ui/react-dropdown-menu/dist/index.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-focus-guards/dist/index.cjs +2 -0
- package/dist/node_modules/@radix-ui/react-focus-guards/dist/index.cjs.map +1 -0
- package/dist/node_modules/@radix-ui/react-focus-guards/dist/index.js +18 -0
- package/dist/node_modules/@radix-ui/react-focus-guards/dist/index.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-focus-scope/dist/index.cjs +2 -0
- package/dist/node_modules/@radix-ui/react-focus-scope/dist/index.cjs.map +1 -0
- package/dist/node_modules/@radix-ui/react-focus-scope/dist/index.js +137 -0
- package/dist/node_modules/@radix-ui/react-focus-scope/dist/index.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-id/dist/index.cjs +2 -0
- package/dist/node_modules/@radix-ui/react-id/dist/index.cjs.map +1 -0
- package/dist/node_modules/@radix-ui/react-id/dist/index.js +14 -0
- package/dist/node_modules/@radix-ui/react-id/dist/index.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-menu/dist/index.cjs +2 -0
- package/dist/node_modules/@radix-ui/react-menu/dist/index.cjs.map +1 -0
- package/dist/node_modules/@radix-ui/react-menu/dist/index.js +609 -0
- package/dist/node_modules/@radix-ui/react-menu/dist/index.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-popper/dist/index.cjs +2 -0
- package/dist/node_modules/@radix-ui/react-popper/dist/index.cjs.map +1 -0
- package/dist/node_modules/@radix-ui/react-popper/dist/index.js +220 -0
- package/dist/node_modules/@radix-ui/react-popper/dist/index.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-portal/dist/index.cjs +2 -0
- package/dist/node_modules/@radix-ui/react-portal/dist/index.cjs.map +1 -0
- package/dist/node_modules/@radix-ui/react-portal/dist/index.js +16 -0
- package/dist/node_modules/@radix-ui/react-portal/dist/index.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-presence/dist/index.cjs +2 -0
- package/dist/node_modules/@radix-ui/react-presence/dist/index.cjs.map +1 -0
- package/dist/node_modules/@radix-ui/react-presence/dist/index.js +71 -0
- package/dist/node_modules/@radix-ui/react-presence/dist/index.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-primitive/dist/index.cjs +2 -0
- package/dist/node_modules/@radix-ui/react-primitive/dist/index.cjs.map +1 -0
- package/dist/node_modules/@radix-ui/react-primitive/dist/index.js +37 -0
- package/dist/node_modules/@radix-ui/react-primitive/dist/index.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-roving-focus/dist/index.cjs +2 -0
- package/dist/node_modules/@radix-ui/react-roving-focus/dist/index.cjs.map +1 -0
- package/dist/node_modules/@radix-ui/react-roving-focus/dist/index.js +184 -0
- package/dist/node_modules/@radix-ui/react-roving-focus/dist/index.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-slot/dist/index.cjs +2 -0
- package/dist/node_modules/@radix-ui/react-slot/dist/index.cjs.map +1 -0
- package/dist/node_modules/@radix-ui/react-slot/dist/index.js +50 -0
- package/dist/node_modules/@radix-ui/react-slot/dist/index.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-use-callback-ref/dist/index.cjs +2 -0
- package/dist/node_modules/@radix-ui/react-use-callback-ref/dist/index.cjs.map +1 -0
- package/dist/node_modules/@radix-ui/react-use-callback-ref/dist/index.js +11 -0
- package/dist/node_modules/@radix-ui/react-use-callback-ref/dist/index.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-use-controllable-state/dist/index.cjs +2 -0
- package/dist/node_modules/@radix-ui/react-use-controllable-state/dist/index.cjs.map +1 -0
- package/dist/node_modules/@radix-ui/react-use-controllable-state/dist/index.js +53 -0
- package/dist/node_modules/@radix-ui/react-use-controllable-state/dist/index.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-use-escape-keydown/dist/index.cjs +2 -0
- package/dist/node_modules/@radix-ui/react-use-escape-keydown/dist/index.cjs.map +1 -0
- package/dist/node_modules/@radix-ui/react-use-escape-keydown/dist/index.js +15 -0
- package/dist/node_modules/@radix-ui/react-use-escape-keydown/dist/index.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-use-is-hydrated/dist/index.cjs +2 -0
- package/dist/node_modules/@radix-ui/react-use-is-hydrated/dist/index.cjs.map +1 -0
- package/dist/node_modules/@radix-ui/react-use-is-hydrated/dist/index.js +16 -0
- package/dist/node_modules/@radix-ui/react-use-is-hydrated/dist/index.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-use-layout-effect/dist/index.cjs +2 -0
- package/dist/node_modules/@radix-ui/react-use-layout-effect/dist/index.cjs.map +1 -0
- package/dist/node_modules/@radix-ui/react-use-layout-effect/dist/index.js +7 -0
- package/dist/node_modules/@radix-ui/react-use-layout-effect/dist/index.js.map +1 -0
- package/dist/node_modules/@radix-ui/react-use-size/dist/index.cjs +2 -0
- package/dist/node_modules/@radix-ui/react-use-size/dist/index.cjs.map +1 -0
- package/dist/node_modules/@radix-ui/react-use-size/dist/index.js +28 -0
- package/dist/node_modules/@radix-ui/react-use-size/dist/index.js.map +1 -0
- package/dist/node_modules/aria-hidden/dist/es2015/index.cjs +2 -0
- package/dist/node_modules/aria-hidden/dist/es2015/index.cjs.map +1 -0
- package/dist/node_modules/aria-hidden/dist/es2015/index.js +53 -0
- package/dist/node_modules/aria-hidden/dist/es2015/index.js.map +1 -0
- package/dist/node_modules/class-variance-authority/dist/index.cjs +2 -0
- package/dist/node_modules/class-variance-authority/dist/index.cjs.map +1 -0
- package/dist/node_modules/class-variance-authority/dist/index.js +36 -0
- package/dist/node_modules/class-variance-authority/dist/index.js.map +1 -0
- package/dist/node_modules/clsx/dist/clsx.cjs +2 -0
- package/dist/node_modules/clsx/dist/clsx.cjs.map +1 -0
- package/dist/node_modules/clsx/dist/clsx.js +18 -0
- package/dist/node_modules/clsx/dist/clsx.js.map +1 -0
- package/dist/node_modules/get-nonce/dist/es2015/index.cjs +2 -0
- package/dist/node_modules/get-nonce/dist/es2015/index.cjs.map +1 -0
- package/dist/node_modules/get-nonce/dist/es2015/index.js +8 -0
- package/dist/node_modules/get-nonce/dist/es2015/index.js.map +1 -0
- package/dist/node_modules/js-cookie/dist/js.cookie.cjs +2 -0
- package/dist/node_modules/js-cookie/dist/js.cookie.cjs.map +1 -0
- package/dist/node_modules/js-cookie/dist/js.cookie.js +74 -0
- package/dist/node_modules/js-cookie/dist/js.cookie.js.map +1 -0
- package/dist/node_modules/jwt-decode/build/esm/index.cjs +2 -0
- package/dist/node_modules/jwt-decode/build/esm/index.cjs.map +1 -0
- package/dist/node_modules/jwt-decode/build/esm/index.js +53 -0
- package/dist/node_modules/jwt-decode/build/esm/index.js.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/Icon.cjs +2 -0
- package/dist/node_modules/lucide-react/dist/esm/Icon.cjs.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/Icon.js +36 -0
- package/dist/node_modules/lucide-react/dist/esm/Icon.js.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/createLucideIcon.cjs +2 -0
- package/dist/node_modules/lucide-react/dist/esm/createLucideIcon.cjs.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/createLucideIcon.js +22 -0
- package/dist/node_modules/lucide-react/dist/esm/createLucideIcon.js.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/defaultAttributes.cjs +2 -0
- package/dist/node_modules/lucide-react/dist/esm/defaultAttributes.cjs.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/defaultAttributes.js +15 -0
- package/dist/node_modules/lucide-react/dist/esm/defaultAttributes.js.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/check.cjs +2 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/check.cjs.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/check.js +7 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/check.js.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/chevron-right.cjs +2 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/chevron-right.cjs.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/chevron-right.js +7 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/chevron-right.js.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/circle.cjs +2 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/circle.cjs.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/circle.js +7 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/circle.js.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/log-out.cjs +2 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/log-out.cjs.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/log-out.js +11 -0
- package/dist/node_modules/lucide-react/dist/esm/icons/log-out.js.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/shared/src/utils.cjs +2 -0
- package/dist/node_modules/lucide-react/dist/esm/shared/src/utils.cjs.map +1 -0
- package/dist/node_modules/lucide-react/dist/esm/shared/src/utils.js +19 -0
- package/dist/node_modules/lucide-react/dist/esm/shared/src/utils.js.map +1 -0
- package/dist/node_modules/react-remove-scroll/dist/es2015/Combination.cjs +2 -0
- package/dist/node_modules/react-remove-scroll/dist/es2015/Combination.cjs.map +1 -0
- package/dist/node_modules/react-remove-scroll/dist/es2015/Combination.js +12 -0
- package/dist/node_modules/react-remove-scroll/dist/es2015/Combination.js.map +1 -0
- package/dist/node_modules/react-remove-scroll/dist/es2015/SideEffect.cjs +5 -0
- package/dist/node_modules/react-remove-scroll/dist/es2015/SideEffect.cjs.map +1 -0
- package/dist/node_modules/react-remove-scroll/dist/es2015/SideEffect.js +116 -0
- package/dist/node_modules/react-remove-scroll/dist/es2015/SideEffect.js.map +1 -0
- package/dist/node_modules/react-remove-scroll/dist/es2015/UI.cjs +2 -0
- package/dist/node_modules/react-remove-scroll/dist/es2015/UI.cjs.map +1 -0
- package/dist/node_modules/react-remove-scroll/dist/es2015/UI.js +32 -0
- package/dist/node_modules/react-remove-scroll/dist/es2015/UI.js.map +1 -0
- package/dist/node_modules/react-remove-scroll/dist/es2015/aggresiveCapture.cjs +2 -0
- package/dist/node_modules/react-remove-scroll/dist/es2015/aggresiveCapture.cjs.map +1 -0
- package/dist/node_modules/react-remove-scroll/dist/es2015/aggresiveCapture.js +17 -0
- package/dist/node_modules/react-remove-scroll/dist/es2015/aggresiveCapture.js.map +1 -0
- package/dist/node_modules/react-remove-scroll/dist/es2015/handleScroll.cjs +2 -0
- package/dist/node_modules/react-remove-scroll/dist/es2015/handleScroll.cjs.map +1 -0
- package/dist/node_modules/react-remove-scroll/dist/es2015/handleScroll.js +69 -0
- package/dist/node_modules/react-remove-scroll/dist/es2015/handleScroll.js.map +1 -0
- package/dist/node_modules/react-remove-scroll/dist/es2015/medium.cjs +2 -0
- package/dist/node_modules/react-remove-scroll/dist/es2015/medium.cjs.map +1 -0
- package/dist/node_modules/react-remove-scroll/dist/es2015/medium.js +6 -0
- package/dist/node_modules/react-remove-scroll/dist/es2015/medium.js.map +1 -0
- package/dist/node_modules/react-remove-scroll/dist/es2015/sidecar.cjs +2 -0
- package/dist/node_modules/react-remove-scroll/dist/es2015/sidecar.cjs.map +1 -0
- package/dist/node_modules/react-remove-scroll/dist/es2015/sidecar.js +8 -0
- package/dist/node_modules/react-remove-scroll/dist/es2015/sidecar.js.map +1 -0
- package/dist/node_modules/react-remove-scroll-bar/dist/es2015/component.cjs +39 -0
- package/dist/node_modules/react-remove-scroll-bar/dist/es2015/component.cjs.map +1 -0
- package/dist/node_modules/react-remove-scroll-bar/dist/es2015/component.js +72 -0
- package/dist/node_modules/react-remove-scroll-bar/dist/es2015/component.js.map +1 -0
- package/dist/node_modules/react-remove-scroll-bar/dist/es2015/constants.cjs +2 -0
- package/dist/node_modules/react-remove-scroll-bar/dist/es2015/constants.cjs.map +1 -0
- package/dist/node_modules/react-remove-scroll-bar/dist/es2015/constants.js +8 -0
- package/dist/node_modules/react-remove-scroll-bar/dist/es2015/constants.js.map +1 -0
- package/dist/node_modules/react-remove-scroll-bar/dist/es2015/utils.cjs +2 -0
- package/dist/node_modules/react-remove-scroll-bar/dist/es2015/utils.cjs.map +1 -0
- package/dist/node_modules/react-remove-scroll-bar/dist/es2015/utils.js +26 -0
- package/dist/node_modules/react-remove-scroll-bar/dist/es2015/utils.js.map +1 -0
- package/dist/node_modules/react-style-singleton/dist/es2015/component.cjs +2 -0
- package/dist/node_modules/react-style-singleton/dist/es2015/component.cjs.map +1 -0
- package/dist/node_modules/react-style-singleton/dist/es2015/component.js +12 -0
- package/dist/node_modules/react-style-singleton/dist/es2015/component.js.map +1 -0
- package/dist/node_modules/react-style-singleton/dist/es2015/hook.cjs +2 -0
- package/dist/node_modules/react-style-singleton/dist/es2015/hook.cjs.map +1 -0
- package/dist/node_modules/react-style-singleton/dist/es2015/hook.js +16 -0
- package/dist/node_modules/react-style-singleton/dist/es2015/hook.js.map +1 -0
- package/dist/node_modules/react-style-singleton/dist/es2015/singleton.cjs +2 -0
- package/dist/node_modules/react-style-singleton/dist/es2015/singleton.cjs.map +1 -0
- package/dist/node_modules/react-style-singleton/dist/es2015/singleton.js +31 -0
- package/dist/node_modules/react-style-singleton/dist/es2015/singleton.js.map +1 -0
- package/dist/node_modules/tailwind-merge/dist/bundle-mjs.cjs +2 -0
- package/dist/node_modules/tailwind-merge/dist/bundle-mjs.cjs.map +1 -0
- package/dist/node_modules/tailwind-merge/dist/bundle-mjs.js +2766 -0
- package/dist/node_modules/tailwind-merge/dist/bundle-mjs.js.map +1 -0
- package/dist/node_modules/tailwindcss/dist/plugin.cjs +2 -0
- package/dist/node_modules/tailwindcss/dist/plugin.cjs.map +1 -0
- package/dist/node_modules/tailwindcss/dist/plugin.js +14 -0
- package/dist/node_modules/tailwindcss/dist/plugin.js.map +1 -0
- package/dist/node_modules/tslib/tslib.es6.cjs +2 -0
- package/dist/node_modules/tslib/tslib.es6.cjs.map +1 -0
- package/dist/node_modules/tslib/tslib.es6.js +28 -0
- package/dist/node_modules/tslib/tslib.es6.js.map +1 -0
- package/dist/node_modules/use-callback-ref/dist/es2015/assignRef.cjs +2 -0
- package/dist/node_modules/use-callback-ref/dist/es2015/assignRef.cjs.map +1 -0
- package/dist/node_modules/use-callback-ref/dist/es2015/assignRef.js +7 -0
- package/dist/node_modules/use-callback-ref/dist/es2015/assignRef.js.map +1 -0
- package/dist/node_modules/use-callback-ref/dist/es2015/useMergeRef.cjs +2 -0
- package/dist/node_modules/use-callback-ref/dist/es2015/useMergeRef.cjs.map +1 -0
- package/dist/node_modules/use-callback-ref/dist/es2015/useMergeRef.js +27 -0
- package/dist/node_modules/use-callback-ref/dist/es2015/useMergeRef.js.map +1 -0
- package/dist/node_modules/use-callback-ref/dist/es2015/useRef.cjs +2 -0
- package/dist/node_modules/use-callback-ref/dist/es2015/useRef.cjs.map +1 -0
- package/dist/node_modules/use-callback-ref/dist/es2015/useRef.js +26 -0
- package/dist/node_modules/use-callback-ref/dist/es2015/useRef.js.map +1 -0
- package/dist/node_modules/use-sidecar/dist/es2015/exports.cjs +2 -0
- package/dist/node_modules/use-sidecar/dist/es2015/exports.cjs.map +1 -0
- package/dist/node_modules/use-sidecar/dist/es2015/exports.js +19 -0
- package/dist/node_modules/use-sidecar/dist/es2015/exports.js.map +1 -0
- package/dist/node_modules/use-sidecar/dist/es2015/medium.cjs +2 -0
- package/dist/node_modules/use-sidecar/dist/es2015/medium.cjs.map +1 -0
- package/dist/node_modules/use-sidecar/dist/es2015/medium.js +68 -0
- package/dist/node_modules/use-sidecar/dist/es2015/medium.js.map +1 -0
- package/dist/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.development.cjs +2 -0
- package/dist/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.development.cjs.map +1 -0
- package/dist/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.development.js +59 -0
- package/dist/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.development.js.map +1 -0
- package/dist/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.production.cjs +2 -0
- package/dist/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.production.cjs.map +1 -0
- package/dist/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.production.js +47 -0
- package/dist/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.production.js.map +1 -0
- package/dist/node_modules/use-sync-external-store/shim/index.cjs +2 -0
- package/dist/node_modules/use-sync-external-store/shim/index.cjs.map +1 -0
- package/dist/node_modules/use-sync-external-store/shim/index.js +11 -0
- package/dist/node_modules/use-sync-external-store/shim/index.js.map +1 -0
- package/dist/providers/auth/auth.context.cjs +2 -0
- package/dist/providers/auth/auth.context.cjs.map +1 -0
- package/dist/providers/auth/auth.context.d.ts +3 -0
- package/dist/providers/auth/auth.context.d.ts.map +1 -0
- package/dist/providers/auth/auth.context.js +6 -0
- package/dist/providers/auth/auth.context.js.map +1 -0
- package/dist/providers/auth/auth.hook.cjs +2 -0
- package/dist/providers/auth/auth.hook.cjs.map +1 -0
- package/dist/providers/auth/auth.hook.d.ts +7 -0
- package/dist/providers/auth/auth.hook.d.ts.map +1 -0
- package/dist/providers/auth/auth.hook.js +12 -0
- package/dist/providers/auth/auth.hook.js.map +1 -0
- package/dist/providers/auth/auth.provider.cjs +2 -0
- package/dist/providers/auth/auth.provider.cjs.map +1 -0
- package/dist/providers/auth/auth.provider.d.ts +7 -0
- package/dist/providers/auth/auth.provider.d.ts.map +1 -0
- package/dist/providers/auth/auth.provider.js +29 -0
- package/dist/providers/auth/auth.provider.js.map +1 -0
- package/dist/providers/blimu/blimu.context.cjs +2 -0
- package/dist/providers/blimu/blimu.context.cjs.map +1 -0
- package/dist/providers/blimu/blimu.context.d.ts +27 -0
- package/dist/providers/blimu/blimu.context.d.ts.map +1 -0
- package/dist/providers/blimu/blimu.context.js +6 -0
- package/dist/providers/blimu/blimu.context.js.map +1 -0
- package/dist/providers/blimu/blimu.hook.cjs +2 -0
- package/dist/providers/blimu/blimu.hook.cjs.map +1 -0
- package/dist/providers/blimu/blimu.hook.d.ts +19 -0
- package/dist/providers/blimu/blimu.hook.d.ts.map +1 -0
- package/dist/providers/blimu/blimu.hook.js +12 -0
- package/dist/providers/blimu/blimu.hook.js.map +1 -0
- package/dist/providers/blimu/blimu.provider.cjs +2 -0
- package/dist/providers/blimu/blimu.provider.cjs.map +1 -0
- package/dist/providers/blimu/blimu.provider.d.ts +47 -0
- package/dist/providers/blimu/blimu.provider.d.ts.map +1 -0
- package/dist/providers/blimu/blimu.provider.js +67 -0
- package/dist/providers/blimu/blimu.provider.js.map +1 -0
- package/dist/providers/index.d.ts +7 -0
- package/dist/providers/index.d.ts.map +1 -0
- package/dist/providers/theme/index.d.ts +4 -0
- package/dist/providers/theme/index.d.ts.map +1 -0
- package/dist/providers/theme/theme.context.cjs +2 -0
- package/dist/providers/theme/theme.context.cjs.map +1 -0
- package/dist/providers/theme/theme.context.d.ts +8 -0
- package/dist/providers/theme/theme.context.d.ts.map +1 -0
- package/dist/providers/theme/theme.context.js +6 -0
- package/dist/providers/theme/theme.context.js.map +1 -0
- package/dist/providers/theme/theme.hook.cjs +2 -0
- package/dist/providers/theme/theme.hook.cjs.map +1 -0
- package/dist/providers/theme/theme.hook.d.ts +18 -0
- package/dist/providers/theme/theme.hook.d.ts.map +1 -0
- package/dist/providers/theme/theme.hook.js +12 -0
- package/dist/providers/theme/theme.hook.js.map +1 -0
- package/dist/providers/theme/theme.provider.cjs +2 -0
- package/dist/providers/theme/theme.provider.cjs.map +1 -0
- package/dist/providers/theme/theme.provider.d.ts +28 -0
- package/dist/providers/theme/theme.provider.d.ts.map +1 -0
- package/dist/providers/theme/theme.provider.js +68 -0
- package/dist/providers/theme/theme.provider.js.map +1 -0
- package/dist/providers.cjs +2 -0
- package/dist/providers.cjs.map +1 -0
- package/dist/providers.js +13 -0
- package/dist/providers.js.map +1 -0
- package/dist/styles/styles.css +1351 -0
- package/dist/styles/tw-styles.css +120 -0
- package/dist/tailwind.plugin.cjs +2 -0
- package/dist/tailwind.plugin.cjs.map +1 -0
- package/dist/tailwind.plugin.d.ts +19 -0
- package/dist/tailwind.plugin.d.ts.map +1 -0
- package/dist/tailwind.plugin.js +200 -0
- package/dist/tailwind.plugin.js.map +1 -0
- package/dist/types/index.cjs +2 -0
- package/dist/types/index.cjs.map +1 -0
- package/dist/types/index.d.ts +128 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/index.js +12 -0
- package/dist/types/index.js.map +1 -0
- package/dist/utils/publishable-key.cjs +2 -0
- package/dist/utils/publishable-key.cjs.map +1 -0
- package/dist/utils/publishable-key.d.ts +38 -0
- package/dist/utils/publishable-key.d.ts.map +1 -0
- package/dist/utils/publishable-key.js +38 -0
- package/dist/utils/publishable-key.js.map +1 -0
- package/package.json +128 -0
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import * as i from "react";
|
|
2
|
+
import { useComposedRefs as O } from "../../react-compose-refs/dist/index.js";
|
|
3
|
+
import { useLayoutEffect as A } from "../../react-use-layout-effect/dist/index.js";
|
|
4
|
+
function E(n, e) {
|
|
5
|
+
return i.useReducer((t, r) => e[t][r] ?? t, n);
|
|
6
|
+
}
|
|
7
|
+
var T = (n) => {
|
|
8
|
+
const { present: e, children: t } = n, r = R(e), a = typeof t == "function" ? t({ present: r.isPresent }) : i.Children.only(t), c = O(r.ref, v(a));
|
|
9
|
+
return typeof t == "function" || r.isPresent ? i.cloneElement(a, { ref: c }) : null;
|
|
10
|
+
};
|
|
11
|
+
T.displayName = "Presence";
|
|
12
|
+
function R(n) {
|
|
13
|
+
const [e, t] = i.useState(), r = i.useRef(null), a = i.useRef(n), c = i.useRef("none"), p = n ? "mounted" : "unmounted", [N, s] = E(p, {
|
|
14
|
+
mounted: {
|
|
15
|
+
UNMOUNT: "unmounted",
|
|
16
|
+
ANIMATION_OUT: "unmountSuspended"
|
|
17
|
+
},
|
|
18
|
+
unmountSuspended: {
|
|
19
|
+
MOUNT: "mounted",
|
|
20
|
+
ANIMATION_END: "unmounted"
|
|
21
|
+
},
|
|
22
|
+
unmounted: {
|
|
23
|
+
MOUNT: "mounted"
|
|
24
|
+
}
|
|
25
|
+
});
|
|
26
|
+
return i.useEffect(() => {
|
|
27
|
+
const o = l(r.current);
|
|
28
|
+
c.current = N === "mounted" ? o : "none";
|
|
29
|
+
}, [N]), A(() => {
|
|
30
|
+
const o = r.current, m = a.current;
|
|
31
|
+
if (m !== n) {
|
|
32
|
+
const f = c.current, u = l(o);
|
|
33
|
+
n ? s("MOUNT") : u === "none" || o?.display === "none" ? s("UNMOUNT") : s(m && f !== u ? "ANIMATION_OUT" : "UNMOUNT"), a.current = n;
|
|
34
|
+
}
|
|
35
|
+
}, [n, s]), A(() => {
|
|
36
|
+
if (e) {
|
|
37
|
+
let o;
|
|
38
|
+
const m = e.ownerDocument.defaultView ?? window, d = (u) => {
|
|
39
|
+
const g = l(r.current).includes(CSS.escape(u.animationName));
|
|
40
|
+
if (u.target === e && g && (s("ANIMATION_END"), !a.current)) {
|
|
41
|
+
const y = e.style.animationFillMode;
|
|
42
|
+
e.style.animationFillMode = "forwards", o = m.setTimeout(() => {
|
|
43
|
+
e.style.animationFillMode === "forwards" && (e.style.animationFillMode = y);
|
|
44
|
+
});
|
|
45
|
+
}
|
|
46
|
+
}, f = (u) => {
|
|
47
|
+
u.target === e && (c.current = l(r.current));
|
|
48
|
+
};
|
|
49
|
+
return e.addEventListener("animationstart", f), e.addEventListener("animationcancel", d), e.addEventListener("animationend", d), () => {
|
|
50
|
+
m.clearTimeout(o), e.removeEventListener("animationstart", f), e.removeEventListener("animationcancel", d), e.removeEventListener("animationend", d);
|
|
51
|
+
};
|
|
52
|
+
} else
|
|
53
|
+
s("ANIMATION_END");
|
|
54
|
+
}, [e, s]), {
|
|
55
|
+
isPresent: ["mounted", "unmountSuspended"].includes(N),
|
|
56
|
+
ref: i.useCallback((o) => {
|
|
57
|
+
r.current = o ? getComputedStyle(o) : null, t(o);
|
|
58
|
+
}, [])
|
|
59
|
+
};
|
|
60
|
+
}
|
|
61
|
+
function l(n) {
|
|
62
|
+
return n?.animationName || "none";
|
|
63
|
+
}
|
|
64
|
+
function v(n) {
|
|
65
|
+
let e = Object.getOwnPropertyDescriptor(n.props, "ref")?.get, t = e && "isReactWarning" in e && e.isReactWarning;
|
|
66
|
+
return t ? n.ref : (e = Object.getOwnPropertyDescriptor(n, "ref")?.get, t = e && "isReactWarning" in e && e.isReactWarning, t ? n.props.ref : n.props.ref || n.ref);
|
|
67
|
+
}
|
|
68
|
+
export {
|
|
69
|
+
T as Presence
|
|
70
|
+
};
|
|
71
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../../../../node_modules/@radix-ui/react-presence/dist/index.mjs"],"sourcesContent":["\"use client\";\n\n// src/presence.tsx\nimport * as React2 from \"react\";\nimport { useComposedRefs } from \"@radix-ui/react-compose-refs\";\nimport { useLayoutEffect } from \"@radix-ui/react-use-layout-effect\";\n\n// src/use-state-machine.tsx\nimport * as React from \"react\";\nfunction useStateMachine(initialState, machine) {\n return React.useReducer((state, event) => {\n const nextState = machine[state][event];\n return nextState ?? state;\n }, initialState);\n}\n\n// src/presence.tsx\nvar Presence = (props) => {\n const { present, children } = props;\n const presence = usePresence(present);\n const child = typeof children === \"function\" ? children({ present: presence.isPresent }) : React2.Children.only(children);\n const ref = useComposedRefs(presence.ref, getElementRef(child));\n const forceMount = typeof children === \"function\";\n return forceMount || presence.isPresent ? React2.cloneElement(child, { ref }) : null;\n};\nPresence.displayName = \"Presence\";\nfunction usePresence(present) {\n const [node, setNode] = React2.useState();\n const stylesRef = React2.useRef(null);\n const prevPresentRef = React2.useRef(present);\n const prevAnimationNameRef = React2.useRef(\"none\");\n const initialState = present ? \"mounted\" : \"unmounted\";\n const [state, send] = useStateMachine(initialState, {\n mounted: {\n UNMOUNT: \"unmounted\",\n ANIMATION_OUT: \"unmountSuspended\"\n },\n unmountSuspended: {\n MOUNT: \"mounted\",\n ANIMATION_END: \"unmounted\"\n },\n unmounted: {\n MOUNT: \"mounted\"\n }\n });\n React2.useEffect(() => {\n const currentAnimationName = getAnimationName(stylesRef.current);\n prevAnimationNameRef.current = state === \"mounted\" ? currentAnimationName : \"none\";\n }, [state]);\n useLayoutEffect(() => {\n const styles = stylesRef.current;\n const wasPresent = prevPresentRef.current;\n const hasPresentChanged = wasPresent !== present;\n if (hasPresentChanged) {\n const prevAnimationName = prevAnimationNameRef.current;\n const currentAnimationName = getAnimationName(styles);\n if (present) {\n send(\"MOUNT\");\n } else if (currentAnimationName === \"none\" || styles?.display === \"none\") {\n send(\"UNMOUNT\");\n } else {\n const isAnimating = prevAnimationName !== currentAnimationName;\n if (wasPresent && isAnimating) {\n send(\"ANIMATION_OUT\");\n } else {\n send(\"UNMOUNT\");\n }\n }\n prevPresentRef.current = present;\n }\n }, [present, send]);\n useLayoutEffect(() => {\n if (node) {\n let timeoutId;\n const ownerWindow = node.ownerDocument.defaultView ?? window;\n const handleAnimationEnd = (event) => {\n const currentAnimationName = getAnimationName(stylesRef.current);\n const isCurrentAnimation = currentAnimationName.includes(CSS.escape(event.animationName));\n if (event.target === node && isCurrentAnimation) {\n send(\"ANIMATION_END\");\n if (!prevPresentRef.current) {\n const currentFillMode = node.style.animationFillMode;\n node.style.animationFillMode = \"forwards\";\n timeoutId = ownerWindow.setTimeout(() => {\n if (node.style.animationFillMode === \"forwards\") {\n node.style.animationFillMode = currentFillMode;\n }\n });\n }\n }\n };\n const handleAnimationStart = (event) => {\n if (event.target === node) {\n prevAnimationNameRef.current = getAnimationName(stylesRef.current);\n }\n };\n node.addEventListener(\"animationstart\", handleAnimationStart);\n node.addEventListener(\"animationcancel\", handleAnimationEnd);\n node.addEventListener(\"animationend\", handleAnimationEnd);\n return () => {\n ownerWindow.clearTimeout(timeoutId);\n node.removeEventListener(\"animationstart\", handleAnimationStart);\n node.removeEventListener(\"animationcancel\", handleAnimationEnd);\n node.removeEventListener(\"animationend\", handleAnimationEnd);\n };\n } else {\n send(\"ANIMATION_END\");\n }\n }, [node, send]);\n return {\n isPresent: [\"mounted\", \"unmountSuspended\"].includes(state),\n ref: React2.useCallback((node2) => {\n stylesRef.current = node2 ? getComputedStyle(node2) : null;\n setNode(node2);\n }, [])\n };\n}\nfunction getAnimationName(styles) {\n return styles?.animationName || \"none\";\n}\nfunction getElementRef(element) {\n let getter = Object.getOwnPropertyDescriptor(element.props, \"ref\")?.get;\n let mayWarn = getter && \"isReactWarning\" in getter && getter.isReactWarning;\n if (mayWarn) {\n return element.ref;\n }\n getter = Object.getOwnPropertyDescriptor(element, \"ref\")?.get;\n mayWarn = getter && \"isReactWarning\" in getter && getter.isReactWarning;\n if (mayWarn) {\n return element.props.ref;\n }\n return element.props.ref || element.ref;\n}\nvar Root = Presence;\nexport {\n Presence,\n Root\n};\n//# sourceMappingURL=index.mjs.map\n"],"names":["useStateMachine","initialState","machine","React","state","event","Presence","props","present","children","presence","usePresence","child","React2","ref","useComposedRefs","getElementRef","node","setNode","stylesRef","prevPresentRef","prevAnimationNameRef","send","currentAnimationName","getAnimationName","useLayoutEffect","styles","wasPresent","prevAnimationName","timeoutId","ownerWindow","handleAnimationEnd","isCurrentAnimation","currentFillMode","handleAnimationStart","node2","element","getter","mayWarn"],"mappings":";;;AASA,SAASA,EAAgBC,GAAcC,GAAS;AAC9C,SAAOC,EAA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W,CAAC,WAAW,kBAAkB,EAAE,SAASlB,CAAK;AAAA,IACzD,KAAKS,EAAO,YAAY,CAACsB,MAAU;AACjC,MAAAhB,EAAU,UAAUgB,IAAQ,iBAAiBA,CAAK,IAAI,MACtDjB,EAAQiB,CAAK;AAAA,IACf,GAAG,CAAA,CAAE;AAAA,EACT;AACA;AACA,SAASX,EAAiBE,GAAQ;AAChC,SAAOA,GAAQ,iBAAiB;AAClC;AACA,SAASV,EAAcoB,GAAS;AAC9B,MAAIC,IAAS,OAAO,yBAAyBD,EAAQ,OAAO,KAAK,GAAG,KAChEE,IAAUD,KAAU,oBAAoBA,KAAUA,EAAO;AAC7D,SAAIC,IACKF,EAAQ,OAEjBC,IAAS,OAAO,yBAAyBD,GAAS,KAAK,GAAG,KAC1DE,IAAUD,KAAU,oBAAoBA,KAAUA,EAAO,gBACrDC,IACKF,EAAQ,MAAM,MAEhBA,EAAQ,MAAM,OAAOA,EAAQ;AACtC;","x_google_ignoreList":[0]}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("react"),f=require("react-dom"),d=require("../../react-slot/dist/index.cjs"),m=require("react/jsx-runtime");function n(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const i in e)if(i!=="default"){const r=Object.getOwnPropertyDescriptor(e,i);Object.defineProperty(t,i,r.get?r:{enumerable:!0,get:()=>e[i]})}}return t.default=e,Object.freeze(t)}const p=n(l),v=n(f);var b=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],y=b.reduce((e,t)=>{const i=d.createSlot(`Primitive.${t}`),r=p.forwardRef((o,c)=>{const{asChild:s,...a}=o,u=s?i:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),m.jsx(u,{...a,ref:c})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function O(e,t){e&&v.flushSync(()=>e.dispatchEvent(t))}exports.Primitive=y;exports.dispatchDiscreteCustomEvent=O;
|
|
2
|
+
//# sourceMappingURL=index.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.cjs","sources":["../../../../../../../node_modules/@radix-ui/react-primitive/dist/index.mjs"],"sourcesContent":["// src/primitive.tsx\nimport * as React from \"react\";\nimport * as ReactDOM from \"react-dom\";\nimport { createSlot } from \"@radix-ui/react-slot\";\nimport { jsx } from \"react/jsx-runtime\";\nvar NODES = [\n \"a\",\n \"button\",\n \"div\",\n \"form\",\n \"h2\",\n \"h3\",\n \"img\",\n \"input\",\n \"label\",\n \"li\",\n \"nav\",\n \"ol\",\n \"p\",\n \"select\",\n \"span\",\n \"svg\",\n \"ul\"\n];\nvar Primitive = NODES.reduce((primitive, node) => {\n const Slot = createSlot(`Primitive.${node}`);\n const Node = React.forwardRef((props, forwardedRef) => {\n const { asChild, ...primitiveProps } = props;\n const Comp = asChild ? Slot : node;\n if (typeof window !== \"undefined\") {\n window[Symbol.for(\"radix-ui\")] = true;\n }\n return /* @__PURE__ */ jsx(Comp, { ...primitiveProps, ref: forwardedRef });\n });\n Node.displayName = `Primitive.${node}`;\n return { ...primitive, [node]: Node };\n}, {});\nfunction dispatchDiscreteCustomEvent(target, event) {\n if (target) ReactDOM.flushSync(() => target.dispatchEvent(event));\n}\nvar Root = Primitive;\nexport {\n Primitive,\n Root,\n dispatchDiscreteCustomEvent\n};\n//# sourceMappingURL=index.mjs.map\n"],"names":["NODES","Primitive","primitive","node","Slot","createSlot","Node","React","props","forwardedRef","asChild","primitiveProps","Comp","jsx","dispatchDiscreteCustomEvent","target","event","ReactDOM"],"mappings":"6eAKA,IAAIA,EAAQ,CACV,IACA,SACA,MACA,OACA,KACA,KACA,MACA,QACA,QACA,KACA,MACA,KACA,IACA,SACA,OACA,MACA,IACF,EACIC,EAAYD,EAAM,OAAO,CAACE,EAAWC,IAAS,CAChD,MAAMC,EAAOC,EAAAA,WAAW,aAAaF,CAAI,EAAE,EACrCG,EAAOC,EAAM,WAAW,CAACC,EAAOC,IAAiB,CACrD,KAAM,CAAE,QAAAC,EAAS,GAAGC,CAAc,EAAKH,EACjCI,EAAOF,EAAUN,EAAOD,EAC9B,OAAI,OAAO,OAAW,MACpB,OAAO,OAAO,IAAI,UAAU,CAAC,EAAI,IAEZU,EAAAA,IAAID,EAAM,CAAE,GAAGD,EAAgB,IAAKF,EAAc,CAC3E,CAAC,EACD,OAAAH,EAAK,YAAc,aAAaH,CAAI,GAC7B,CAAE,GAAGD,EAAW,CAACC,CAAI,EAAGG,CAAI,CACrC,EAAG,CAAA,CAAE,EACL,SAASQ,EAA4BC,EAAQC,EAAO,CAC9CD,GAAQE,EAAS,UAAU,IAAMF,EAAO,cAAcC,CAAK,CAAC,CAClE","x_google_ignoreList":[0]}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import * as f from "react";
|
|
2
|
+
import * as p from "react-dom";
|
|
3
|
+
import { createSlot as c } from "../../react-slot/dist/index.js";
|
|
4
|
+
import { jsx as l } from "react/jsx-runtime";
|
|
5
|
+
var u = [
|
|
6
|
+
"a",
|
|
7
|
+
"button",
|
|
8
|
+
"div",
|
|
9
|
+
"form",
|
|
10
|
+
"h2",
|
|
11
|
+
"h3",
|
|
12
|
+
"img",
|
|
13
|
+
"input",
|
|
14
|
+
"label",
|
|
15
|
+
"li",
|
|
16
|
+
"nav",
|
|
17
|
+
"ol",
|
|
18
|
+
"p",
|
|
19
|
+
"select",
|
|
20
|
+
"span",
|
|
21
|
+
"svg",
|
|
22
|
+
"ul"
|
|
23
|
+
], h = u.reduce((t, i) => {
|
|
24
|
+
const o = c(`Primitive.${i}`), r = f.forwardRef((e, m) => {
|
|
25
|
+
const { asChild: s, ...a } = e, n = s ? o : i;
|
|
26
|
+
return typeof window < "u" && (window[/* @__PURE__ */ Symbol.for("radix-ui")] = !0), /* @__PURE__ */ l(n, { ...a, ref: m });
|
|
27
|
+
});
|
|
28
|
+
return r.displayName = `Primitive.${i}`, { ...t, [i]: r };
|
|
29
|
+
}, {});
|
|
30
|
+
function w(t, i) {
|
|
31
|
+
t && p.flushSync(() => t.dispatchEvent(i));
|
|
32
|
+
}
|
|
33
|
+
export {
|
|
34
|
+
h as Primitive,
|
|
35
|
+
w as dispatchDiscreteCustomEvent
|
|
36
|
+
};
|
|
37
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../../../../node_modules/@radix-ui/react-primitive/dist/index.mjs"],"sourcesContent":["// src/primitive.tsx\nimport * as React from \"react\";\nimport * as ReactDOM from \"react-dom\";\nimport { createSlot } from \"@radix-ui/react-slot\";\nimport { jsx } from \"react/jsx-runtime\";\nvar NODES = [\n \"a\",\n \"button\",\n \"div\",\n \"form\",\n \"h2\",\n \"h3\",\n \"img\",\n \"input\",\n \"label\",\n \"li\",\n \"nav\",\n \"ol\",\n \"p\",\n \"select\",\n \"span\",\n \"svg\",\n \"ul\"\n];\nvar Primitive = NODES.reduce((primitive, node) => {\n const Slot = createSlot(`Primitive.${node}`);\n const Node = React.forwardRef((props, forwardedRef) => {\n const { asChild, ...primitiveProps } = props;\n const Comp = asChild ? Slot : node;\n if (typeof window !== \"undefined\") {\n window[Symbol.for(\"radix-ui\")] = true;\n }\n return /* @__PURE__ */ jsx(Comp, { ...primitiveProps, ref: forwardedRef });\n });\n Node.displayName = `Primitive.${node}`;\n return { ...primitive, [node]: Node };\n}, {});\nfunction dispatchDiscreteCustomEvent(target, event) {\n if (target) ReactDOM.flushSync(() => target.dispatchEvent(event));\n}\nvar Root = Primitive;\nexport {\n Primitive,\n Root,\n dispatchDiscreteCustomEvent\n};\n//# sourceMappingURL=index.mjs.map\n"],"names":["NODES","Primitive","primitive","node","Slot","createSlot","Node","React","props","forwardedRef","asChild","primitiveProps","Comp","jsx","dispatchDiscreteCustomEvent","target","event","ReactDOM"],"mappings":";;;;AAKA,IAAIA,IAAQ;AAAA,EACV;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,GACIC,IAAYD,EAAM,OAAO,CAACE,GAAWC,MAAS;AAChD,QAAMC,IAAOC,EAAW,aAAaF,CAAI,EAAE,GACrCG,IAAOC,EAAM,WAAW,CAACC,GAAOC,MAAiB;AACrD,UAAM,EAAE,SAAAC,GAAS,GAAGC,EAAc,IAAKH,GACjCI,IAAOF,IAAUN,IAAOD;AAC9B,WAAI,OAAO,SAAW,QACpB,OAAO,uBAAO,IAAI,UAAU,CAAC,IAAI,KAEZ,gBAAAU,EAAID,GAAM,EAAE,GAAGD,GAAgB,KAAKF,GAAc;AAAA,EAC3E,CAAC;AACD,SAAAH,EAAK,cAAc,aAAaH,CAAI,IAC7B,EAAE,GAAGD,GAAW,CAACC,CAAI,GAAGG,EAAI;AACrC,GAAG,CAAA,CAAE;AACL,SAASQ,EAA4BC,GAAQC,GAAO;AAClD,EAAID,KAAQE,EAAS,UAAU,MAAMF,EAAO,cAAcC,CAAK,CAAC;AAClE;","x_google_ignoreList":[0]}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const H=require("react"),m=require("../../primitive/dist/index.cjs"),B=require("../../react-collection/dist/index.cjs"),Y=require("../../react-compose-refs/dist/index.cjs"),z=require("../../react-context/dist/index.cjs"),V=require("../../react-id/dist/index.cjs"),j=require("../../react-primitive/dist/index.cjs"),J=require("../../react-use-callback-ref/dist/index.cjs"),Q=require("../../react-use-controllable-state/dist/index.cjs"),W=require("../../react-direction/dist/index.cjs"),f=require("react/jsx-runtime");function X(e){const o=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const t=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(o,r,t.get?t:{enumerable:!0,get:()=>e[r]})}}return o.default=e,Object.freeze(o)}const s=X(H);var h="rovingFocusGroup.onEntryFocus",Z={bubbles:!1,cancelable:!0},b="RovingFocusGroup",[A,N,ee]=B.createCollection(b),[te,oe]=z.createContextScope(b,[ee]),[re,ne]=te(b),O=s.forwardRef((e,o)=>f.jsx(A.Provider,{scope:e.__scopeRovingFocusGroup,children:f.jsx(A.Slot,{scope:e.__scopeRovingFocusGroup,children:f.jsx(ce,{...e,ref:o})})}));O.displayName=b;var ce=s.forwardRef((e,o)=>{const{__scopeRovingFocusGroup:r,orientation:t,loop:S=!1,dir:T,currentTabStopId:v,defaultCurrentTabStopId:w,onCurrentTabStopIdChange:x,onEntryFocus:p,preventScrollOnEntryFocus:u=!1,...g}=e,I=s.useRef(null),F=Y.useComposedRefs(o,I),R=W.useDirection(T),[E,n]=Q.useControllableState({prop:v,defaultProp:w??null,onChange:x,caller:b}),[a,C]=s.useState(!1),i=J.useCallbackRef(p),l=N(r),y=s.useRef(!1),[K,D]=s.useState(0);return s.useEffect(()=>{const c=I.current;if(c)return c.addEventListener(h,i),()=>c.removeEventListener(h,i)},[i]),f.jsx(re,{scope:r,orientation:t,dir:R,loop:S,currentTabStopId:E,onItemFocus:s.useCallback(c=>n(c),[n]),onItemShiftTab:s.useCallback(()=>C(!0),[]),onFocusableItemAdd:s.useCallback(()=>D(c=>c+1),[]),onFocusableItemRemove:s.useCallback(()=>D(c=>c-1),[]),children:f.jsx(j.Primitive.div,{tabIndex:a||K===0?-1:0,"data-orientation":t,...g,ref:F,style:{outline:"none",...e.style},onMouseDown:m.composeEventHandlers(e.onMouseDown,()=>{y.current=!0}),onFocus:m.composeEventHandlers(e.onFocus,c=>{const k=!y.current;if(c.target===c.currentTarget&&k&&!a){const G=new CustomEvent(h,Z);if(c.currentTarget.dispatchEvent(G),!G.defaultPrevented){const _=l().filter(d=>d.focusable),L=_.find(d=>d.active),U=_.find(d=>d.id===E),$=[L,U,..._].filter(Boolean).map(d=>d.ref.current);M($,u)}}y.current=!1}),onBlur:m.composeEventHandlers(e.onBlur,()=>C(!1))})})}),q="RovingFocusGroupItem",P=s.forwardRef((e,o)=>{const{__scopeRovingFocusGroup:r,focusable:t=!0,active:S=!1,tabStopId:T,children:v,...w}=e,x=V.useId(),p=T||x,u=ne(q,r),g=u.currentTabStopId===p,I=N(r),{onFocusableItemAdd:F,onFocusableItemRemove:R,currentTabStopId:E}=u;return s.useEffect(()=>{if(t)return F(),()=>R()},[t,F,R]),f.jsx(A.ItemSlot,{scope:r,id:p,focusable:t,active:S,children:f.jsx(j.Primitive.span,{tabIndex:g?0:-1,"data-orientation":u.orientation,...w,ref:o,onMouseDown:m.composeEventHandlers(e.onMouseDown,n=>{t?u.onItemFocus(p):n.preventDefault()}),onFocus:m.composeEventHandlers(e.onFocus,()=>u.onItemFocus(p)),onKeyDown:m.composeEventHandlers(e.onKeyDown,n=>{if(n.key==="Tab"&&n.shiftKey){u.onItemShiftTab();return}if(n.target!==n.currentTarget)return;const a=ie(n,u.orientation,u.dir);if(a!==void 0){if(n.metaKey||n.ctrlKey||n.altKey||n.shiftKey)return;n.preventDefault();let i=I().filter(l=>l.focusable).map(l=>l.ref.current);if(a==="last")i.reverse();else if(a==="prev"||a==="next"){a==="prev"&&i.reverse();const l=i.indexOf(n.currentTarget);i=u.loop?ae(i,l+1):i.slice(l+1)}setTimeout(()=>M(i))}}),children:typeof v=="function"?v({isCurrentTabStop:g,hasTabStop:E!=null}):v})})});P.displayName=q;var se={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function ue(e,o){return o!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function ie(e,o,r){const t=ue(e.key,r);if(!(o==="vertical"&&["ArrowLeft","ArrowRight"].includes(t))&&!(o==="horizontal"&&["ArrowUp","ArrowDown"].includes(t)))return se[t]}function M(e,o=!1){const r=document.activeElement;for(const t of e)if(t===r||(t.focus({preventScroll:o}),document.activeElement!==r))return}function ae(e,o){return e.map((r,t)=>e[(o+t)%e.length])}var le=O,de=P;exports.Item=de;exports.Root=le;exports.RovingFocusGroup=O;exports.RovingFocusGroupItem=P;exports.createRovingFocusGroupScope=oe;
|
|
2
|
+
//# sourceMappingURL=index.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.cjs","sources":["../../../../../../../node_modules/@radix-ui/react-roving-focus/dist/index.mjs"],"sourcesContent":["\"use client\";\n\n// src/roving-focus-group.tsx\nimport * as React from \"react\";\nimport { composeEventHandlers } from \"@radix-ui/primitive\";\nimport { createCollection } from \"@radix-ui/react-collection\";\nimport { useComposedRefs } from \"@radix-ui/react-compose-refs\";\nimport { createContextScope } from \"@radix-ui/react-context\";\nimport { useId } from \"@radix-ui/react-id\";\nimport { Primitive } from \"@radix-ui/react-primitive\";\nimport { useCallbackRef } from \"@radix-ui/react-use-callback-ref\";\nimport { useControllableState } from \"@radix-ui/react-use-controllable-state\";\nimport { useDirection } from \"@radix-ui/react-direction\";\nimport { jsx } from \"react/jsx-runtime\";\nvar ENTRY_FOCUS = \"rovingFocusGroup.onEntryFocus\";\nvar EVENT_OPTIONS = { bubbles: false, cancelable: true };\nvar GROUP_NAME = \"RovingFocusGroup\";\nvar [Collection, useCollection, createCollectionScope] = createCollection(GROUP_NAME);\nvar [createRovingFocusGroupContext, createRovingFocusGroupScope] = createContextScope(\n GROUP_NAME,\n [createCollectionScope]\n);\nvar [RovingFocusProvider, useRovingFocusContext] = createRovingFocusGroupContext(GROUP_NAME);\nvar RovingFocusGroup = React.forwardRef(\n (props, forwardedRef) => {\n return /* @__PURE__ */ jsx(Collection.Provider, { scope: props.__scopeRovingFocusGroup, children: /* @__PURE__ */ jsx(Collection.Slot, { scope: props.__scopeRovingFocusGroup, children: /* @__PURE__ */ jsx(RovingFocusGroupImpl, { ...props, ref: forwardedRef }) }) });\n }\n);\nRovingFocusGroup.displayName = GROUP_NAME;\nvar RovingFocusGroupImpl = React.forwardRef((props, forwardedRef) => {\n const {\n __scopeRovingFocusGroup,\n orientation,\n loop = false,\n dir,\n currentTabStopId: currentTabStopIdProp,\n defaultCurrentTabStopId,\n onCurrentTabStopIdChange,\n onEntryFocus,\n preventScrollOnEntryFocus = false,\n ...groupProps\n } = props;\n const ref = React.useRef(null);\n const composedRefs = useComposedRefs(forwardedRef, ref);\n const direction = useDirection(dir);\n const [currentTabStopId, setCurrentTabStopId] = useControllableState({\n prop: currentTabStopIdProp,\n defaultProp: defaultCurrentTabStopId ?? null,\n onChange: onCurrentTabStopIdChange,\n caller: GROUP_NAME\n });\n const [isTabbingBackOut, setIsTabbingBackOut] = React.useState(false);\n const handleEntryFocus = useCallbackRef(onEntryFocus);\n const getItems = useCollection(__scopeRovingFocusGroup);\n const isClickFocusRef = React.useRef(false);\n const [focusableItemsCount, setFocusableItemsCount] = React.useState(0);\n React.useEffect(() => {\n const node = ref.current;\n if (node) {\n node.addEventListener(ENTRY_FOCUS, handleEntryFocus);\n return () => node.removeEventListener(ENTRY_FOCUS, handleEntryFocus);\n }\n }, [handleEntryFocus]);\n return /* @__PURE__ */ jsx(\n RovingFocusProvider,\n {\n scope: __scopeRovingFocusGroup,\n orientation,\n dir: direction,\n loop,\n currentTabStopId,\n onItemFocus: React.useCallback(\n (tabStopId) => setCurrentTabStopId(tabStopId),\n [setCurrentTabStopId]\n ),\n onItemShiftTab: React.useCallback(() => setIsTabbingBackOut(true), []),\n onFocusableItemAdd: React.useCallback(\n () => setFocusableItemsCount((prevCount) => prevCount + 1),\n []\n ),\n onFocusableItemRemove: React.useCallback(\n () => setFocusableItemsCount((prevCount) => prevCount - 1),\n []\n ),\n children: /* @__PURE__ */ jsx(\n Primitive.div,\n {\n tabIndex: isTabbingBackOut || focusableItemsCount === 0 ? -1 : 0,\n \"data-orientation\": orientation,\n ...groupProps,\n ref: composedRefs,\n style: { outline: \"none\", ...props.style },\n onMouseDown: composeEventHandlers(props.onMouseDown, () => {\n isClickFocusRef.current = true;\n }),\n onFocus: composeEventHandlers(props.onFocus, (event) => {\n const isKeyboardFocus = !isClickFocusRef.current;\n if (event.target === event.currentTarget && isKeyboardFocus && !isTabbingBackOut) {\n const entryFocusEvent = new CustomEvent(ENTRY_FOCUS, EVENT_OPTIONS);\n event.currentTarget.dispatchEvent(entryFocusEvent);\n if (!entryFocusEvent.defaultPrevented) {\n const items = getItems().filter((item) => item.focusable);\n const activeItem = items.find((item) => item.active);\n const currentItem = items.find((item) => item.id === currentTabStopId);\n const candidateItems = [activeItem, currentItem, ...items].filter(\n Boolean\n );\n const candidateNodes = candidateItems.map((item) => item.ref.current);\n focusFirst(candidateNodes, preventScrollOnEntryFocus);\n }\n }\n isClickFocusRef.current = false;\n }),\n onBlur: composeEventHandlers(props.onBlur, () => setIsTabbingBackOut(false))\n }\n )\n }\n );\n});\nvar ITEM_NAME = \"RovingFocusGroupItem\";\nvar RovingFocusGroupItem = React.forwardRef(\n (props, forwardedRef) => {\n const {\n __scopeRovingFocusGroup,\n focusable = true,\n active = false,\n tabStopId,\n children,\n ...itemProps\n } = props;\n const autoId = useId();\n const id = tabStopId || autoId;\n const context = useRovingFocusContext(ITEM_NAME, __scopeRovingFocusGroup);\n const isCurrentTabStop = context.currentTabStopId === id;\n const getItems = useCollection(__scopeRovingFocusGroup);\n const { onFocusableItemAdd, onFocusableItemRemove, currentTabStopId } = context;\n React.useEffect(() => {\n if (focusable) {\n onFocusableItemAdd();\n return () => onFocusableItemRemove();\n }\n }, [focusable, onFocusableItemAdd, onFocusableItemRemove]);\n return /* @__PURE__ */ jsx(\n Collection.ItemSlot,\n {\n scope: __scopeRovingFocusGroup,\n id,\n focusable,\n active,\n children: /* @__PURE__ */ jsx(\n Primitive.span,\n {\n tabIndex: isCurrentTabStop ? 0 : -1,\n \"data-orientation\": context.orientation,\n ...itemProps,\n ref: forwardedRef,\n onMouseDown: composeEventHandlers(props.onMouseDown, (event) => {\n if (!focusable) event.preventDefault();\n else context.onItemFocus(id);\n }),\n onFocus: composeEventHandlers(props.onFocus, () => context.onItemFocus(id)),\n onKeyDown: composeEventHandlers(props.onKeyDown, (event) => {\n if (event.key === \"Tab\" && event.shiftKey) {\n context.onItemShiftTab();\n return;\n }\n if (event.target !== event.currentTarget) return;\n const focusIntent = getFocusIntent(event, context.orientation, context.dir);\n if (focusIntent !== void 0) {\n if (event.metaKey || event.ctrlKey || event.altKey || event.shiftKey) return;\n event.preventDefault();\n const items = getItems().filter((item) => item.focusable);\n let candidateNodes = items.map((item) => item.ref.current);\n if (focusIntent === \"last\") candidateNodes.reverse();\n else if (focusIntent === \"prev\" || focusIntent === \"next\") {\n if (focusIntent === \"prev\") candidateNodes.reverse();\n const currentIndex = candidateNodes.indexOf(event.currentTarget);\n candidateNodes = context.loop ? wrapArray(candidateNodes, currentIndex + 1) : candidateNodes.slice(currentIndex + 1);\n }\n setTimeout(() => focusFirst(candidateNodes));\n }\n }),\n children: typeof children === \"function\" ? children({ isCurrentTabStop, hasTabStop: currentTabStopId != null }) : children\n }\n )\n }\n );\n }\n);\nRovingFocusGroupItem.displayName = ITEM_NAME;\nvar MAP_KEY_TO_FOCUS_INTENT = {\n ArrowLeft: \"prev\",\n ArrowUp: \"prev\",\n ArrowRight: \"next\",\n ArrowDown: \"next\",\n PageUp: \"first\",\n Home: \"first\",\n PageDown: \"last\",\n End: \"last\"\n};\nfunction getDirectionAwareKey(key, dir) {\n if (dir !== \"rtl\") return key;\n return key === \"ArrowLeft\" ? \"ArrowRight\" : key === \"ArrowRight\" ? \"ArrowLeft\" : key;\n}\nfunction getFocusIntent(event, orientation, dir) {\n const key = getDirectionAwareKey(event.key, dir);\n if (orientation === \"vertical\" && [\"ArrowLeft\", \"ArrowRight\"].includes(key)) return void 0;\n if (orientation === \"horizontal\" && [\"ArrowUp\", \"ArrowDown\"].includes(key)) return void 0;\n return MAP_KEY_TO_FOCUS_INTENT[key];\n}\nfunction focusFirst(candidates, preventScroll = false) {\n const PREVIOUSLY_FOCUSED_ELEMENT = document.activeElement;\n for (const candidate of candidates) {\n if (candidate === PREVIOUSLY_FOCUSED_ELEMENT) return;\n candidate.focus({ preventScroll });\n if (document.activeElement !== PREVIOUSLY_FOCUSED_ELEMENT) return;\n }\n}\nfunction wrapArray(array, startIndex) {\n return array.map((_, index) => array[(startIndex + index) % array.length]);\n}\nvar Root = RovingFocusGroup;\nvar Item = RovingFocusGroupItem;\nexport {\n Item,\n Root,\n RovingFocusGroup,\n RovingFocusGroupItem,\n createRovingFocusGroupScope\n};\n//# sourceMappingURL=index.mjs.map\n"],"names":["ENTRY_FOCUS","EVENT_OPTIONS","GROUP_NAME","Collection","useCollection","createCollectionScope","createCollection","createRovingFocusGroupContext","createRovingFocusGroupScope","createContextScope","RovingFocusProvider","useRovingFocusContext","RovingFocusGroup","React","props","forwardedRef","jsx","RovingFocusGroupImpl","__scopeRovingFocusGroup","orientation","loop","dir","currentTabStopIdProp","defaultCurrentTabStopId","onCurrentTabStopIdChange","onEntryFocus","preventScrollOnEntryFocus","groupProps","ref","composedRefs","useComposedRefs","direction","useDirection","currentTabStopId","setCurrentTabStopId","useControllableState","isTabbingBackOut","setIsTabbingBackOut","handleEntryFocus","useCallbackRef","getItems","isClickFocusRef","focusableItemsCount","setFocusableItemsCount","node","tabStopId","prevCount","Primitive","composeEventHandlers","event","isKeyboardFocus","entryFocusEvent","items","item","activeItem","currentItem","candidateNodes","focusFirst","ITEM_NAME","RovingFocusGroupItem","focusable","active","children","itemProps","autoId","useId","id","context","isCurrentTabStop","onFocusableItemAdd","onFocusableItemRemove","focusIntent","getFocusIntent","currentIndex","wrapArray","MAP_KEY_TO_FOCUS_INTENT","getDirectionAwareKey","key","candidates","preventScroll","PREVIOUSLY_FOCUSED_ELEMENT","candidate","array","startIndex","_","index","Root","Item"],"mappings":"62BAcA,IAAIA,EAAc,gCACdC,EAAgB,CAAE,QAAS,GAAO,WAAY,EAAI,EAClDC,EAAa,mBACb,CA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AgB,cAAgB,CAAC,UAAW,WAAW,EAAE,SAAS0D,CAAG,GACzE,OAAOF,GAAwBE,CAAG,CACpC,CACA,SAASpB,EAAWqB,EAAYC,EAAgB,GAAO,CACrD,MAAMC,EAA6B,SAAS,cAC5C,UAAWC,KAAaH,EAGtB,GAFIG,IAAcD,IAClBC,EAAU,MAAM,CAAE,cAAAF,EAAe,EAC7B,SAAS,gBAAkBC,GAA4B,MAE/D,CACA,SAASN,GAAUQ,EAAOC,EAAY,CACpC,OAAOD,EAAM,IAAI,CAACE,EAAGC,IAAUH,GAAOC,EAAaE,GAASH,EAAM,MAAM,CAAC,CAC3E,CACG,IAACI,GAAO1E,EACP2E,GAAO5B","x_google_ignoreList":[0]}
|
|
@@ -0,0 +1,184 @@
|
|
|
1
|
+
import * as c from "react";
|
|
2
|
+
import { composeEventHandlers as p } from "../../primitive/dist/index.js";
|
|
3
|
+
import { createCollection as V } from "../../react-collection/dist/index.js";
|
|
4
|
+
import { useComposedRefs as j } from "../../react-compose-refs/dist/index.js";
|
|
5
|
+
import { createContextScope as z } from "../../react-context/dist/index.js";
|
|
6
|
+
import { useId as q } from "../../react-id/dist/index.js";
|
|
7
|
+
import { Primitive as G } from "../../react-primitive/dist/index.js";
|
|
8
|
+
import { useCallbackRef as J } from "../../react-use-callback-ref/dist/index.js";
|
|
9
|
+
import { useControllableState as Q } from "../../react-use-controllable-state/dist/index.js";
|
|
10
|
+
import { useDirection as W } from "../../react-direction/dist/index.js";
|
|
11
|
+
import { jsx as d } from "react/jsx-runtime";
|
|
12
|
+
var y = "rovingFocusGroup.onEntryFocus", X = { bubbles: !1, cancelable: !0 }, I = "RovingFocusGroup", [D, N, Z] = V(I), [$, Fe] = z(
|
|
13
|
+
I,
|
|
14
|
+
[Z]
|
|
15
|
+
), [ee, oe] = $(I), O = c.forwardRef(
|
|
16
|
+
(e, r) => /* @__PURE__ */ d(D.Provider, { scope: e.__scopeRovingFocusGroup, children: /* @__PURE__ */ d(D.Slot, { scope: e.__scopeRovingFocusGroup, children: /* @__PURE__ */ d(te, { ...e, ref: r }) }) })
|
|
17
|
+
);
|
|
18
|
+
O.displayName = I;
|
|
19
|
+
var te = c.forwardRef((e, r) => {
|
|
20
|
+
const {
|
|
21
|
+
__scopeRovingFocusGroup: s,
|
|
22
|
+
orientation: o,
|
|
23
|
+
loop: T = !1,
|
|
24
|
+
dir: w,
|
|
25
|
+
currentTabStopId: v,
|
|
26
|
+
defaultCurrentTabStopId: C,
|
|
27
|
+
onCurrentTabStopIdChange: S,
|
|
28
|
+
onEntryFocus: m,
|
|
29
|
+
preventScrollOnEntryFocus: u = !1,
|
|
30
|
+
...b
|
|
31
|
+
} = e, F = c.useRef(null), g = j(r, F), R = W(w), [E, t] = Q({
|
|
32
|
+
prop: v,
|
|
33
|
+
defaultProp: C ?? null,
|
|
34
|
+
onChange: S,
|
|
35
|
+
caller: I
|
|
36
|
+
}), [i, h] = c.useState(!1), a = J(m), l = N(s), A = c.useRef(!1), [L, P] = c.useState(0);
|
|
37
|
+
return c.useEffect(() => {
|
|
38
|
+
const n = F.current;
|
|
39
|
+
if (n)
|
|
40
|
+
return n.addEventListener(y, a), () => n.removeEventListener(y, a);
|
|
41
|
+
}, [a]), /* @__PURE__ */ d(
|
|
42
|
+
ee,
|
|
43
|
+
{
|
|
44
|
+
scope: s,
|
|
45
|
+
orientation: o,
|
|
46
|
+
dir: R,
|
|
47
|
+
loop: T,
|
|
48
|
+
currentTabStopId: E,
|
|
49
|
+
onItemFocus: c.useCallback(
|
|
50
|
+
(n) => t(n),
|
|
51
|
+
[t]
|
|
52
|
+
),
|
|
53
|
+
onItemShiftTab: c.useCallback(() => h(!0), []),
|
|
54
|
+
onFocusableItemAdd: c.useCallback(
|
|
55
|
+
() => P((n) => n + 1),
|
|
56
|
+
[]
|
|
57
|
+
),
|
|
58
|
+
onFocusableItemRemove: c.useCallback(
|
|
59
|
+
() => P((n) => n - 1),
|
|
60
|
+
[]
|
|
61
|
+
),
|
|
62
|
+
children: /* @__PURE__ */ d(
|
|
63
|
+
G.div,
|
|
64
|
+
{
|
|
65
|
+
tabIndex: i || L === 0 ? -1 : 0,
|
|
66
|
+
"data-orientation": o,
|
|
67
|
+
...b,
|
|
68
|
+
ref: g,
|
|
69
|
+
style: { outline: "none", ...e.style },
|
|
70
|
+
onMouseDown: p(e.onMouseDown, () => {
|
|
71
|
+
A.current = !0;
|
|
72
|
+
}),
|
|
73
|
+
onFocus: p(e.onFocus, (n) => {
|
|
74
|
+
const U = !A.current;
|
|
75
|
+
if (n.target === n.currentTarget && U && !i) {
|
|
76
|
+
const x = new CustomEvent(y, X);
|
|
77
|
+
if (n.currentTarget.dispatchEvent(x), !x.defaultPrevented) {
|
|
78
|
+
const _ = l().filter((f) => f.focusable), B = _.find((f) => f.active), Y = _.find((f) => f.id === E), H = [B, Y, ..._].filter(
|
|
79
|
+
Boolean
|
|
80
|
+
).map((f) => f.ref.current);
|
|
81
|
+
k(H, u);
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
A.current = !1;
|
|
85
|
+
}),
|
|
86
|
+
onBlur: p(e.onBlur, () => h(!1))
|
|
87
|
+
}
|
|
88
|
+
)
|
|
89
|
+
}
|
|
90
|
+
);
|
|
91
|
+
}), K = "RovingFocusGroupItem", M = c.forwardRef(
|
|
92
|
+
(e, r) => {
|
|
93
|
+
const {
|
|
94
|
+
__scopeRovingFocusGroup: s,
|
|
95
|
+
focusable: o = !0,
|
|
96
|
+
active: T = !1,
|
|
97
|
+
tabStopId: w,
|
|
98
|
+
children: v,
|
|
99
|
+
...C
|
|
100
|
+
} = e, S = q(), m = w || S, u = oe(K, s), b = u.currentTabStopId === m, F = N(s), { onFocusableItemAdd: g, onFocusableItemRemove: R, currentTabStopId: E } = u;
|
|
101
|
+
return c.useEffect(() => {
|
|
102
|
+
if (o)
|
|
103
|
+
return g(), () => R();
|
|
104
|
+
}, [o, g, R]), /* @__PURE__ */ d(
|
|
105
|
+
D.ItemSlot,
|
|
106
|
+
{
|
|
107
|
+
scope: s,
|
|
108
|
+
id: m,
|
|
109
|
+
focusable: o,
|
|
110
|
+
active: T,
|
|
111
|
+
children: /* @__PURE__ */ d(
|
|
112
|
+
G.span,
|
|
113
|
+
{
|
|
114
|
+
tabIndex: b ? 0 : -1,
|
|
115
|
+
"data-orientation": u.orientation,
|
|
116
|
+
...C,
|
|
117
|
+
ref: r,
|
|
118
|
+
onMouseDown: p(e.onMouseDown, (t) => {
|
|
119
|
+
o ? u.onItemFocus(m) : t.preventDefault();
|
|
120
|
+
}),
|
|
121
|
+
onFocus: p(e.onFocus, () => u.onItemFocus(m)),
|
|
122
|
+
onKeyDown: p(e.onKeyDown, (t) => {
|
|
123
|
+
if (t.key === "Tab" && t.shiftKey) {
|
|
124
|
+
u.onItemShiftTab();
|
|
125
|
+
return;
|
|
126
|
+
}
|
|
127
|
+
if (t.target !== t.currentTarget) return;
|
|
128
|
+
const i = ce(t, u.orientation, u.dir);
|
|
129
|
+
if (i !== void 0) {
|
|
130
|
+
if (t.metaKey || t.ctrlKey || t.altKey || t.shiftKey) return;
|
|
131
|
+
t.preventDefault();
|
|
132
|
+
let a = F().filter((l) => l.focusable).map((l) => l.ref.current);
|
|
133
|
+
if (i === "last") a.reverse();
|
|
134
|
+
else if (i === "prev" || i === "next") {
|
|
135
|
+
i === "prev" && a.reverse();
|
|
136
|
+
const l = a.indexOf(t.currentTarget);
|
|
137
|
+
a = u.loop ? se(a, l + 1) : a.slice(l + 1);
|
|
138
|
+
}
|
|
139
|
+
setTimeout(() => k(a));
|
|
140
|
+
}
|
|
141
|
+
}),
|
|
142
|
+
children: typeof v == "function" ? v({ isCurrentTabStop: b, hasTabStop: E != null }) : v
|
|
143
|
+
}
|
|
144
|
+
)
|
|
145
|
+
}
|
|
146
|
+
);
|
|
147
|
+
}
|
|
148
|
+
);
|
|
149
|
+
M.displayName = K;
|
|
150
|
+
var re = {
|
|
151
|
+
ArrowLeft: "prev",
|
|
152
|
+
ArrowUp: "prev",
|
|
153
|
+
ArrowRight: "next",
|
|
154
|
+
ArrowDown: "next",
|
|
155
|
+
PageUp: "first",
|
|
156
|
+
Home: "first",
|
|
157
|
+
PageDown: "last",
|
|
158
|
+
End: "last"
|
|
159
|
+
};
|
|
160
|
+
function ne(e, r) {
|
|
161
|
+
return r !== "rtl" ? e : e === "ArrowLeft" ? "ArrowRight" : e === "ArrowRight" ? "ArrowLeft" : e;
|
|
162
|
+
}
|
|
163
|
+
function ce(e, r, s) {
|
|
164
|
+
const o = ne(e.key, s);
|
|
165
|
+
if (!(r === "vertical" && ["ArrowLeft", "ArrowRight"].includes(o)) && !(r === "horizontal" && ["ArrowUp", "ArrowDown"].includes(o)))
|
|
166
|
+
return re[o];
|
|
167
|
+
}
|
|
168
|
+
function k(e, r = !1) {
|
|
169
|
+
const s = document.activeElement;
|
|
170
|
+
for (const o of e)
|
|
171
|
+
if (o === s || (o.focus({ preventScroll: r }), document.activeElement !== s)) return;
|
|
172
|
+
}
|
|
173
|
+
function se(e, r) {
|
|
174
|
+
return e.map((s, o) => e[(r + o) % e.length]);
|
|
175
|
+
}
|
|
176
|
+
var ge = O, Re = M;
|
|
177
|
+
export {
|
|
178
|
+
Re as Item,
|
|
179
|
+
ge as Root,
|
|
180
|
+
O as RovingFocusGroup,
|
|
181
|
+
M as RovingFocusGroupItem,
|
|
182
|
+
Fe as createRovingFocusGroupScope
|
|
183
|
+
};
|
|
184
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../../../../node_modules/@radix-ui/react-roving-focus/dist/index.mjs"],"sourcesContent":["\"use client\";\n\n// src/roving-focus-group.tsx\nimport * as React from \"react\";\nimport { composeEventHandlers } from \"@radix-ui/primitive\";\nimport { createCollection } from \"@radix-ui/react-collection\";\nimport { useComposedRefs } from \"@radix-ui/react-compose-refs\";\nimport { createContextScope } from \"@radix-ui/react-context\";\nimport { useId } from \"@radix-ui/react-id\";\nimport { Primitive } from \"@radix-ui/react-primitive\";\nimport { useCallbackRef } from \"@radix-ui/react-use-callback-ref\";\nimport { useControllableState } from \"@radix-ui/react-use-controllable-state\";\nimport { useDirection } from \"@radix-ui/react-direction\";\nimport { jsx } from \"react/jsx-runtime\";\nvar ENTRY_FOCUS = \"rovingFocusGroup.onEntryFocus\";\nvar EVENT_OPTIONS = { bubbles: false, cancelable: true };\nvar GROUP_NAME = \"RovingFocusGroup\";\nvar [Collection, useCollection, createCollectionScope] = createCollection(GROUP_NAME);\nvar [createRovingFocusGroupContext, createRovingFocusGroupScope] = createContextScope(\n GROUP_NAME,\n [createCollectionScope]\n);\nvar [RovingFocusProvider, useRovingFocusContext] = createRovingFocusGroupContext(GROUP_NAME);\nvar RovingFocusGroup = React.forwardRef(\n (props, forwardedRef) => {\n return /* @__PURE__ */ jsx(Collection.Provider, { scope: props.__scopeRovingFocusGroup, children: /* @__PURE__ */ jsx(Collection.Slot, { scope: props.__scopeRovingFocusGroup, children: /* @__PURE__ */ jsx(RovingFocusGroupImpl, { ...props, ref: forwardedRef }) }) });\n }\n);\nRovingFocusGroup.displayName = GROUP_NAME;\nvar RovingFocusGroupImpl = React.forwardRef((props, forwardedRef) => {\n const {\n __scopeRovingFocusGroup,\n orientation,\n loop = false,\n dir,\n currentTabStopId: currentTabStopIdProp,\n defaultCurrentTabStopId,\n onCurrentTabStopIdChange,\n onEntryFocus,\n preventScrollOnEntryFocus = false,\n ...groupProps\n } = props;\n const ref = React.useRef(null);\n const composedRefs = useComposedRefs(forwardedRef, ref);\n const direction = useDirection(dir);\n const [currentTabStopId, setCurrentTabStopId] = useControllableState({\n prop: currentTabStopIdProp,\n defaultProp: defaultCurrentTabStopId ?? null,\n onChange: onCurrentTabStopIdChange,\n caller: GROUP_NAME\n });\n const [isTabbingBackOut, setIsTabbingBackOut] = React.useState(false);\n const handleEntryFocus = useCallbackRef(onEntryFocus);\n const getItems = useCollection(__scopeRovingFocusGroup);\n const isClickFocusRef = React.useRef(false);\n const [focusableItemsCount, setFocusableItemsCount] = React.useState(0);\n React.useEffect(() => {\n const node = ref.current;\n if (node) {\n node.addEventListener(ENTRY_FOCUS, handleEntryFocus);\n return () => node.removeEventListener(ENTRY_FOCUS, handleEntryFocus);\n }\n }, [handleEntryFocus]);\n return /* @__PURE__ */ jsx(\n RovingFocusProvider,\n {\n scope: __scopeRovingFocusGroup,\n orientation,\n dir: direction,\n loop,\n currentTabStopId,\n onItemFocus: React.useCallback(\n (tabStopId) => setCurrentTabStopId(tabStopId),\n [setCurrentTabStopId]\n ),\n onItemShiftTab: React.useCallback(() => setIsTabbingBackOut(true), []),\n onFocusableItemAdd: React.useCallback(\n () => setFocusableItemsCount((prevCount) => prevCount + 1),\n []\n ),\n onFocusableItemRemove: React.useCallback(\n () => setFocusableItemsCount((prevCount) => prevCount - 1),\n []\n ),\n children: /* @__PURE__ */ jsx(\n Primitive.div,\n {\n tabIndex: isTabbingBackOut || focusableItemsCount === 0 ? -1 : 0,\n \"data-orientation\": orientation,\n ...groupProps,\n ref: composedRefs,\n style: { outline: \"none\", ...props.style },\n onMouseDown: composeEventHandlers(props.onMouseDown, () => {\n isClickFocusRef.current = true;\n }),\n onFocus: composeEventHandlers(props.onFocus, (event) => {\n const isKeyboardFocus = !isClickFocusRef.current;\n if (event.target === event.currentTarget && isKeyboardFocus && !isTabbingBackOut) {\n const entryFocusEvent = new CustomEvent(ENTRY_FOCUS, EVENT_OPTIONS);\n event.currentTarget.dispatchEvent(entryFocusEvent);\n if (!entryFocusEvent.defaultPrevented) {\n const items = getItems().filter((item) => item.focusable);\n const activeItem = items.find((item) => item.active);\n const currentItem = items.find((item) => item.id === currentTabStopId);\n const candidateItems = [activeItem, currentItem, ...items].filter(\n Boolean\n );\n const candidateNodes = candidateItems.map((item) => item.ref.current);\n focusFirst(candidateNodes, preventScrollOnEntryFocus);\n }\n }\n isClickFocusRef.current = false;\n }),\n onBlur: composeEventHandlers(props.onBlur, () => setIsTabbingBackOut(false))\n }\n )\n }\n );\n});\nvar ITEM_NAME = \"RovingFocusGroupItem\";\nvar RovingFocusGroupItem = React.forwardRef(\n (props, forwardedRef) => {\n const {\n __scopeRovingFocusGroup,\n focusable = true,\n active = false,\n tabStopId,\n children,\n ...itemProps\n } = props;\n const autoId = useId();\n const id = tabStopId || autoId;\n const context = useRovingFocusContext(ITEM_NAME, __scopeRovingFocusGroup);\n const isCurrentTabStop = context.currentTabStopId === id;\n const getItems = useCollection(__scopeRovingFocusGroup);\n const { onFocusableItemAdd, onFocusableItemRemove, currentTabStopId } = context;\n React.useEffect(() => {\n if (focusable) {\n onFocusableItemAdd();\n return () => onFocusableItemRemove();\n }\n }, [focusable, onFocusableItemAdd, onFocusableItemRemove]);\n return /* @__PURE__ */ jsx(\n Collection.ItemSlot,\n {\n scope: __scopeRovingFocusGroup,\n id,\n focusable,\n active,\n children: /* @__PURE__ */ jsx(\n Primitive.span,\n {\n tabIndex: isCurrentTabStop ? 0 : -1,\n \"data-orientation\": context.orientation,\n ...itemProps,\n ref: forwardedRef,\n onMouseDown: composeEventHandlers(props.onMouseDown, (event) => {\n if (!focusable) event.preventDefault();\n else context.onItemFocus(id);\n }),\n onFocus: composeEventHandlers(props.onFocus, () => context.onItemFocus(id)),\n onKeyDown: composeEventHandlers(props.onKeyDown, (event) => {\n if (event.key === \"Tab\" && event.shiftKey) {\n context.onItemShiftTab();\n return;\n }\n if (event.target !== event.currentTarget) return;\n const focusIntent = getFocusIntent(event, context.orientation, context.dir);\n if (focusIntent !== void 0) {\n if (event.metaKey || event.ctrlKey || event.altKey || event.shiftKey) return;\n event.preventDefault();\n const items = getItems().filter((item) => item.focusable);\n let candidateNodes = items.map((item) => item.ref.current);\n if (focusIntent === \"last\") candidateNodes.reverse();\n else if (focusIntent === \"prev\" || focusIntent === \"next\") {\n if (focusIntent === \"prev\") candidateNodes.reverse();\n const currentIndex = candidateNodes.indexOf(event.currentTarget);\n candidateNodes = context.loop ? wrapArray(candidateNodes, currentIndex + 1) : candidateNodes.slice(currentIndex + 1);\n }\n setTimeout(() => focusFirst(candidateNodes));\n }\n }),\n children: typeof children === \"function\" ? children({ isCurrentTabStop, hasTabStop: currentTabStopId != null }) : children\n }\n )\n }\n );\n }\n);\nRovingFocusGroupItem.displayName = ITEM_NAME;\nvar MAP_KEY_TO_FOCUS_INTENT = {\n ArrowLeft: \"prev\",\n ArrowUp: \"prev\",\n ArrowRight: \"next\",\n ArrowDown: \"next\",\n PageUp: \"first\",\n Home: \"first\",\n PageDown: \"last\",\n End: \"last\"\n};\nfunction getDirectionAwareKey(key, dir) {\n if (dir !== \"rtl\") return key;\n return key === \"ArrowLeft\" ? \"ArrowRight\" : key === \"ArrowRight\" ? \"ArrowLeft\" : key;\n}\nfunction getFocusIntent(event, orientation, dir) {\n const key = getDirectionAwareKey(event.key, dir);\n if (orientation === \"vertical\" && [\"ArrowLeft\", \"ArrowRight\"].includes(key)) return void 0;\n if (orientation === \"horizontal\" && [\"ArrowUp\", \"ArrowDown\"].includes(key)) return void 0;\n return MAP_KEY_TO_FOCUS_INTENT[key];\n}\nfunction focusFirst(candidates, preventScroll = false) {\n const PREVIOUSLY_FOCUSED_ELEMENT = document.activeElement;\n for (const candidate of candidates) {\n if (candidate === PREVIOUSLY_FOCUSED_ELEMENT) return;\n candidate.focus({ preventScroll });\n if (document.activeElement !== PREVIOUSLY_FOCUSED_ELEMENT) return;\n }\n}\nfunction wrapArray(array, startIndex) {\n return array.map((_, index) => array[(startIndex + index) % array.length]);\n}\nvar Root = RovingFocusGroup;\nvar Item = RovingFocusGroupItem;\nexport {\n Item,\n Root,\n RovingFocusGroup,\n RovingFocusGroupItem,\n createRovingFocusGroupScope\n};\n//# sourceMappingURL=index.mjs.map\n"],"names":["ENTRY_FOCUS","EVENT_OPTIONS","GROUP_NAME","Collection","useCollection","createCollectionScope","createCollection","createRovingFocusGroupContext","createRovingFocusGroupScope","createContextScope","RovingFocusProvider","useRovingFocusContext","RovingFocusGroup","React","props","forwardedRef","jsx","RovingFocusGroupImpl","__scopeRovingFocusGroup","orientation","loop","dir","currentTabStopIdProp","defaultCurrentTabStopId","onCurrentTabStopIdChange","onEntryFocus","preventScrollOnEntryFocus","groupProps","ref","composedRefs","useComposedRefs","direction","useDirection","currentTabStopId","setCurrentTabStopId","useControllableState","isTabbingBackOut","setIsTabbingBackOut","handleEntryFocus","useCallbackRef","getItems","isClickFocusRef","focusableItemsCount","setFocusableItemsCount","node","tabStopId","prevCount","Primitive","composeEventHandlers","event","isKeyboardFocus","entryFocusEvent","items","item","activeItem","currentItem","candidateNodes","focusFirst","ITEM_NAME","RovingFocusGroupItem","focusable","active","children","itemProps","autoId","useId","id","context","isCurrentTabStop","onFocusableItemAdd","onFocusableItemRemove","focusIntent","getFocusIntent","currentIndex","wrapArray","MAP_KEY_TO_FOCUS_INTENT","getDirectionAwareKey","key","candidates","preventScroll","PREVIOUSLY_FOCUSED_ELEMENT","candidate","array","startIndex","_","index","Root","Item"],"mappings":";;;;;;;;;;;AAcA,IAAIA,IAAc,iCACdC,IAAgB,EAAE,SAAS,IAAO,YAAY,GAAI,GAClDC,IAAa,oBACb,CAACC,GAAYC,GAAeC,CAAqB,IAAIC,EAAiBJ,CAAU,GAChF,CAACK,GAA+BC,EAA2B,IAAIC;AAAA,EACjEP;AAAA,EACA,CAACG,CAAqB;AACxB,GACI,CAACK,IAAqBC,EAAqB,IAAIJ,EAA8BL,CAAU,GACvFU,IAAmBC,EAAM;AAAA,EAC3B,CAACC,GAAOC,MACiB,gBAAAC,EAAIb,EAAW,UAAU,EAAE,OAAOW,EAAM,yBAAyB,UAA0B,gBAAAE,EAAIb,EAAW,MAAM,EAAE,OAAOW,EAAM,yBAAyB,UAA0B,gBAAAE,EAAIC,IAAsB,EAAE,GAAGH,GAAO,KAAKC,GAAc,EAAC,CAAE,EAAC,CAAE;AAE5Q;AACAH,EAAiB,cAAcV;AAC/B,IAAIe,KAAuBJ,EAAM,WAAW,CAACC,GAAOC,MAAiB;AACnE,QAAM;AAAA,IACJ,yB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QAAMwD,IAAMD,GAAqB3B,EAAM,KAAK5B,CAAG;AAC/C,MAAI,EAAAF,MAAgB,cAAc,CAAC,aAAa,YAAY,EAAE,SAAS0D,CAAG,MACtE,EAAA1D,MAAgB,gBAAgB,CAAC,WAAW,WAAW,EAAE,SAAS0D,CAAG;AACzE,WAAOF,GAAwBE,CAAG;AACpC;AACA,SAASpB,EAAWqB,GAAYC,IAAgB,IAAO;AACrD,QAAMC,IAA6B,SAAS;AAC5C,aAAWC,KAAaH;AAGtB,QAFIG,MAAcD,MAClBC,EAAU,MAAM,EAAE,eAAAF,GAAe,GAC7B,SAAS,kBAAkBC,GAA4B;AAE/D;AACA,SAASN,GAAUQ,GAAOC,GAAY;AACpC,SAAOD,EAAM,IAAI,CAACE,GAAGC,MAAUH,GAAOC,IAAaE,KAASH,EAAM,MAAM,CAAC;AAC3E;AACG,IAACI,KAAO1E,GACP2E,KAAO5B;","x_google_ignoreList":[0]}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const y=require("react"),g=require("../../react-compose-refs/dist/index.cjs"),p=require("react/jsx-runtime");function m(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const l=m(y);function S(e){const t=b(e),n=l.forwardRef((r,o)=>{const{children:i,...c}=r,s=l.Children.toArray(i),a=s.find(E);if(a){const u=a.props.children,d=s.map(f=>f===a?l.Children.count(u)>1?l.Children.only(null):l.isValidElement(u)?u.props.children:null:f);return p.jsx(t,{...c,ref:o,children:l.isValidElement(u)?l.cloneElement(u,void 0,d):null})}return p.jsx(t,{...c,ref:o,children:i})});return n.displayName=`${e}.Slot`,n}function b(e){const t=l.forwardRef((n,r)=>{const{children:o,...i}=n;if(l.isValidElement(o)){const c=R(o),s=O(i,o.props);return o.type!==l.Fragment&&(s.ref=r?g.composeRefs(r,c):c),l.cloneElement(o,s)}return l.Children.count(o)>1?l.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var j=Symbol("radix.slottable");function E(e){return l.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===j}function O(e,t){const n={...t};for(const r in t){const o=e[r],i=t[r];/^on[A-Z]/.test(r)?o&&i?n[r]=(...s)=>{const a=i(...s);return o(...s),a}:o&&(n[r]=o):r==="style"?n[r]={...o,...i}:r==="className"&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}function R(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}exports.createSlot=S;
|
|
2
|
+
//# sourceMappingURL=index.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.cjs","sources":["../../../../../../../node_modules/@radix-ui/react-slot/dist/index.mjs"],"sourcesContent":["// src/slot.tsx\nimport * as React from \"react\";\nimport { composeRefs } from \"@radix-ui/react-compose-refs\";\nimport { Fragment as Fragment2, jsx } from \"react/jsx-runtime\";\n// @__NO_SIDE_EFFECTS__\nfunction createSlot(ownerName) {\n const SlotClone = /* @__PURE__ */ createSlotClone(ownerName);\n const Slot2 = React.forwardRef((props, forwardedRef) => {\n const { children, ...slotProps } = props;\n const childrenArray = React.Children.toArray(children);\n const slottable = childrenArray.find(isSlottable);\n if (slottable) {\n const newElement = slottable.props.children;\n const newChildren = childrenArray.map((child) => {\n if (child === slottable) {\n if (React.Children.count(newElement) > 1) return React.Children.only(null);\n return React.isValidElement(newElement) ? newElement.props.children : null;\n } else {\n return child;\n }\n });\n return /* @__PURE__ */ jsx(SlotClone, { ...slotProps, ref: forwardedRef, children: React.isValidElement(newElement) ? React.cloneElement(newElement, void 0, newChildren) : null });\n }\n return /* @__PURE__ */ jsx(SlotClone, { ...slotProps, ref: forwardedRef, children });\n });\n Slot2.displayName = `${ownerName}.Slot`;\n return Slot2;\n}\nvar Slot = /* @__PURE__ */ createSlot(\"Slot\");\n// @__NO_SIDE_EFFECTS__\nfunction createSlotClone(ownerName) {\n const SlotClone = React.forwardRef((props, forwardedRef) => {\n const { children, ...slotProps } = props;\n if (React.isValidElement(children)) {\n const childrenRef = getElementRef(children);\n const props2 = mergeProps(slotProps, children.props);\n if (children.type !== React.Fragment) {\n props2.ref = forwardedRef ? composeRefs(forwardedRef, childrenRef) : childrenRef;\n }\n return React.cloneElement(children, props2);\n }\n return React.Children.count(children) > 1 ? React.Children.only(null) : null;\n });\n SlotClone.displayName = `${ownerName}.SlotClone`;\n return SlotClone;\n}\nvar SLOTTABLE_IDENTIFIER = Symbol(\"radix.slottable\");\n// @__NO_SIDE_EFFECTS__\nfunction createSlottable(ownerName) {\n const Slottable2 = ({ children }) => {\n return /* @__PURE__ */ jsx(Fragment2, { children });\n };\n Slottable2.displayName = `${ownerName}.Slottable`;\n Slottable2.__radixId = SLOTTABLE_IDENTIFIER;\n return Slottable2;\n}\nvar Slottable = /* @__PURE__ */ createSlottable(\"Slottable\");\nfunction isSlottable(child) {\n return React.isValidElement(child) && typeof child.type === \"function\" && \"__radixId\" in child.type && child.type.__radixId === SLOTTABLE_IDENTIFIER;\n}\nfunction mergeProps(slotProps, childProps) {\n const overrideProps = { ...childProps };\n for (const propName in childProps) {\n const slotPropValue = slotProps[propName];\n const childPropValue = childProps[propName];\n const isHandler = /^on[A-Z]/.test(propName);\n if (isHandler) {\n if (slotPropValue && childPropValue) {\n overrideProps[propName] = (...args) => {\n const result = childPropValue(...args);\n slotPropValue(...args);\n return result;\n };\n } else if (slotPropValue) {\n overrideProps[propName] = slotPropValue;\n }\n } else if (propName === \"style\") {\n overrideProps[propName] = { ...slotPropValue, ...childPropValue };\n } else if (propName === \"className\") {\n overrideProps[propName] = [slotPropValue, childPropValue].filter(Boolean).join(\" \");\n }\n }\n return { ...slotProps, ...overrideProps };\n}\nfunction getElementRef(element) {\n let getter = Object.getOwnPropertyDescriptor(element.props, \"ref\")?.get;\n let mayWarn = getter && \"isReactWarning\" in getter && getter.isReactWarning;\n if (mayWarn) {\n return element.ref;\n }\n getter = Object.getOwnPropertyDescriptor(element, \"ref\")?.get;\n mayWarn = getter && \"isReactWarning\" in getter && getter.isReactWarning;\n if (mayWarn) {\n return element.props.ref;\n }\n return element.props.ref || element.ref;\n}\nexport {\n Slot as Root,\n Slot,\n Slottable,\n createSlot,\n createSlottable\n};\n//# sourceMappingURL=index.mjs.map\n"],"names":["createSlot","ownerName","SlotClone","createSlotClone","Slot2","React","props","forwardedRef","children","slotProps","childrenArray","slottable","isSlottable","newElement","newChildren","child","jsx","childrenRef","getElementRef","props2","mergeProps","composeRefs","SLOTTABLE_IDENTIFIER","childProps","overrideProps","propName","slotPropValue","childPropValue","args","result","element","getter","mayWarn"],"mappings":"udAKA,SAASA,EAAWC,EAAW,CAC7B,MAAMC,EAA4BC,EAAgBF,CAAS,EACrDG,EAAQC,EAAM,WAAW,CAACC,EAAOC,IAAiB,CACtD,KAAM,CAAE,SAAAC,EAAU,GAAGC,CAAS,EAAKH,EAC7BI,EAAgBL,EAAM,SAAS,QAAQG,CAAQ,EAC/CG,EAAYD,EAAc,KAAKE,CAAW,EAChD,GAAID,EAAW,CACb,MAAME,EAAaF,EAAU,MAAM,SAC7BG,EAAcJ,EAAc,IAAKK,GACjCA,IAAUJ,EACRN,EAAM,SAAS,MAAMQ,CAAU,EAAI,EAAUR,EAAM,SAAS,KAAK,IAAI,EAClEA,EAAM,eAAeQ,CAAU,EAAIA,EAAW,MAAM,SAAW,KAE/DE,CAEV,EACD,OAAuBC,EAAAA,IAAId,EAAW,CAAE,GAAGO,EAAW,IAAKF,EAAc,SAAUF,EAAM,eAAeQ,CAAU,EAAIR,EAAM,aAAaQ,EAA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AQ,EAAIC,GAEnBD,IAAa,QACtBD,EAAcC,CAAQ,EAAI,CAAE,GAAGC,EAAe,GAAGC,CAAc,EACtDF,IAAa,cACtBD,EAAcC,CAAQ,EAAI,CAACC,EAAeC,CAAc,EAAE,OAAO,OAAO,EAAE,KAAK,GAAG,EAEtF,CACA,MAAO,CAAE,GAAGlB,EAAW,GAAGe,CAAa,CACzC,CACA,SAASN,EAAcY,EAAS,CAC9B,IAAIC,EAAS,OAAO,yBAAyBD,EAAQ,MAAO,KAAK,GAAG,IAChEE,EAAUD,GAAU,mBAAoBA,GAAUA,EAAO,eAC7D,OAAIC,EACKF,EAAQ,KAEjBC,EAAS,OAAO,yBAAyBD,EAAS,KAAK,GAAG,IAC1DE,EAAUD,GAAU,mBAAoBA,GAAUA,EAAO,eACrDC,EACKF,EAAQ,MAAM,IAEhBA,EAAQ,MAAM,KAAOA,EAAQ,IACtC","x_google_ignoreList":[0]}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import * as l from "react";
|
|
2
|
+
import { composeRefs as m } from "../../react-compose-refs/dist/index.js";
|
|
3
|
+
import { jsx as u } from "react/jsx-runtime";
|
|
4
|
+
// @__NO_SIDE_EFFECTS__
|
|
5
|
+
function b(e) {
|
|
6
|
+
const r = /* @__PURE__ */ y(e), t = l.forwardRef((o, n) => {
|
|
7
|
+
const { children: i, ...c } = o, s = l.Children.toArray(i), a = s.find(E);
|
|
8
|
+
if (a) {
|
|
9
|
+
const f = a.props.children, d = s.map((p) => p === a ? l.Children.count(f) > 1 ? l.Children.only(null) : l.isValidElement(f) ? f.props.children : null : p);
|
|
10
|
+
return /* @__PURE__ */ u(r, { ...c, ref: n, children: l.isValidElement(f) ? l.cloneElement(f, void 0, d) : null });
|
|
11
|
+
}
|
|
12
|
+
return /* @__PURE__ */ u(r, { ...c, ref: n, children: i });
|
|
13
|
+
});
|
|
14
|
+
return t.displayName = `${e}.Slot`, t;
|
|
15
|
+
}
|
|
16
|
+
// @__NO_SIDE_EFFECTS__
|
|
17
|
+
function y(e) {
|
|
18
|
+
const r = l.forwardRef((t, o) => {
|
|
19
|
+
const { children: n, ...i } = t;
|
|
20
|
+
if (l.isValidElement(n)) {
|
|
21
|
+
const c = S(n), s = C(i, n.props);
|
|
22
|
+
return n.type !== l.Fragment && (s.ref = o ? m(o, c) : c), l.cloneElement(n, s);
|
|
23
|
+
}
|
|
24
|
+
return l.Children.count(n) > 1 ? l.Children.only(null) : null;
|
|
25
|
+
});
|
|
26
|
+
return r.displayName = `${e}.SlotClone`, r;
|
|
27
|
+
}
|
|
28
|
+
var g = /* @__PURE__ */ Symbol("radix.slottable");
|
|
29
|
+
function E(e) {
|
|
30
|
+
return l.isValidElement(e) && typeof e.type == "function" && "__radixId" in e.type && e.type.__radixId === g;
|
|
31
|
+
}
|
|
32
|
+
function C(e, r) {
|
|
33
|
+
const t = { ...r };
|
|
34
|
+
for (const o in r) {
|
|
35
|
+
const n = e[o], i = r[o];
|
|
36
|
+
/^on[A-Z]/.test(o) ? n && i ? t[o] = (...s) => {
|
|
37
|
+
const a = i(...s);
|
|
38
|
+
return n(...s), a;
|
|
39
|
+
} : n && (t[o] = n) : o === "style" ? t[o] = { ...n, ...i } : o === "className" && (t[o] = [n, i].filter(Boolean).join(" "));
|
|
40
|
+
}
|
|
41
|
+
return { ...e, ...t };
|
|
42
|
+
}
|
|
43
|
+
function S(e) {
|
|
44
|
+
let r = Object.getOwnPropertyDescriptor(e.props, "ref")?.get, t = r && "isReactWarning" in r && r.isReactWarning;
|
|
45
|
+
return t ? e.ref : (r = Object.getOwnPropertyDescriptor(e, "ref")?.get, t = r && "isReactWarning" in r && r.isReactWarning, t ? e.props.ref : e.props.ref || e.ref);
|
|
46
|
+
}
|
|
47
|
+
export {
|
|
48
|
+
b as createSlot
|
|
49
|
+
};
|
|
50
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../../../../node_modules/@radix-ui/react-slot/dist/index.mjs"],"sourcesContent":["// src/slot.tsx\nimport * as React from \"react\";\nimport { composeRefs } from \"@radix-ui/react-compose-refs\";\nimport { Fragment as Fragment2, jsx } from \"react/jsx-runtime\";\n// @__NO_SIDE_EFFECTS__\nfunction createSlot(ownerName) {\n const SlotClone = /* @__PURE__ */ createSlotClone(ownerName);\n const Slot2 = React.forwardRef((props, forwardedRef) => {\n const { children, ...slotProps } = props;\n const childrenArray = React.Children.toArray(children);\n const slottable = childrenArray.find(isSlottable);\n if (slottable) {\n const newElement = slottable.props.children;\n const newChildren = childrenArray.map((child) => {\n if (child === slottable) {\n if (React.Children.count(newElement) > 1) return React.Children.only(null);\n return React.isValidElement(newElement) ? newElement.props.children : null;\n } else {\n return child;\n }\n });\n return /* @__PURE__ */ jsx(SlotClone, { ...slotProps, ref: forwardedRef, children: React.isValidElement(newElement) ? React.cloneElement(newElement, void 0, newChildren) : null });\n }\n return /* @__PURE__ */ jsx(SlotClone, { ...slotProps, ref: forwardedRef, children });\n });\n Slot2.displayName = `${ownerName}.Slot`;\n return Slot2;\n}\nvar Slot = /* @__PURE__ */ createSlot(\"Slot\");\n// @__NO_SIDE_EFFECTS__\nfunction createSlotClone(ownerName) {\n const SlotClone = React.forwardRef((props, forwardedRef) => {\n const { children, ...slotProps } = props;\n if (React.isValidElement(children)) {\n const childrenRef = getElementRef(children);\n const props2 = mergeProps(slotProps, children.props);\n if (children.type !== React.Fragment) {\n props2.ref = forwardedRef ? composeRefs(forwardedRef, childrenRef) : childrenRef;\n }\n return React.cloneElement(children, props2);\n }\n return React.Children.count(children) > 1 ? React.Children.only(null) : null;\n });\n SlotClone.displayName = `${ownerName}.SlotClone`;\n return SlotClone;\n}\nvar SLOTTABLE_IDENTIFIER = Symbol(\"radix.slottable\");\n// @__NO_SIDE_EFFECTS__\nfunction createSlottable(ownerName) {\n const Slottable2 = ({ children }) => {\n return /* @__PURE__ */ jsx(Fragment2, { children });\n };\n Slottable2.displayName = `${ownerName}.Slottable`;\n Slottable2.__radixId = SLOTTABLE_IDENTIFIER;\n return Slottable2;\n}\nvar Slottable = /* @__PURE__ */ createSlottable(\"Slottable\");\nfunction isSlottable(child) {\n return React.isValidElement(child) && typeof child.type === \"function\" && \"__radixId\" in child.type && child.type.__radixId === SLOTTABLE_IDENTIFIER;\n}\nfunction mergeProps(slotProps, childProps) {\n const overrideProps = { ...childProps };\n for (const propName in childProps) {\n const slotPropValue = slotProps[propName];\n const childPropValue = childProps[propName];\n const isHandler = /^on[A-Z]/.test(propName);\n if (isHandler) {\n if (slotPropValue && childPropValue) {\n overrideProps[propName] = (...args) => {\n const result = childPropValue(...args);\n slotPropValue(...args);\n return result;\n };\n } else if (slotPropValue) {\n overrideProps[propName] = slotPropValue;\n }\n } else if (propName === \"style\") {\n overrideProps[propName] = { ...slotPropValue, ...childPropValue };\n } else if (propName === \"className\") {\n overrideProps[propName] = [slotPropValue, childPropValue].filter(Boolean).join(\" \");\n }\n }\n return { ...slotProps, ...overrideProps };\n}\nfunction getElementRef(element) {\n let getter = Object.getOwnPropertyDescriptor(element.props, \"ref\")?.get;\n let mayWarn = getter && \"isReactWarning\" in getter && getter.isReactWarning;\n if (mayWarn) {\n return element.ref;\n }\n getter = Object.getOwnPropertyDescriptor(element, \"ref\")?.get;\n mayWarn = getter && \"isReactWarning\" in getter && getter.isReactWarning;\n if (mayWarn) {\n return element.props.ref;\n }\n return element.props.ref || element.ref;\n}\nexport {\n Slot as Root,\n Slot,\n Slottable,\n createSlot,\n createSlottable\n};\n//# sourceMappingURL=index.mjs.map\n"],"names":["createSlot","ownerName","SlotClone","createSlotClone","Slot2","React","props","forwardedRef","children","slotProps","childrenArray","slottable","isSlottable","newElement","newChildren","child","jsx","childrenRef","getElementRef","props2","mergeProps","composeRefs","SLOTTABLE_IDENTIFIER","childProps","overrideProps","propName","slotPropValue","childPropValue","args","result","element","getter","mayWarn"],"mappings":";;;;AAKA,SAASA,EAAWC,GAAW;AAC7B,QAAMC,IAA4B,gBAAAC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ol.toStringTag,{value:"Module"});const u=require("react");function o(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:()=>e[r]})}}return t.default=e,Object.freeze(t)}const c=o(u);function a(e){const t=c.useRef(e);return c.useEffect(()=>{t.current=e}),c.useMemo(()=>(...r)=>t.current?.(...r),[])}exports.useCallbackRef=a;
|
|
2
|
+
//# sourceMappingURL=index.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.cjs","sources":["../../../../../../../node_modules/@radix-ui/react-use-callback-ref/dist/index.mjs"],"sourcesContent":["// packages/react/use-callback-ref/src/use-callback-ref.tsx\nimport * as React from \"react\";\nfunction useCallbackRef(callback) {\n const callbackRef = React.useRef(callback);\n React.useEffect(() => {\n callbackRef.current = callback;\n });\n return React.useMemo(() => (...args) => callbackRef.current?.(...args), []);\n}\nexport {\n useCallbackRef\n};\n//# sourceMappingURL=index.mjs.map\n"],"names":["useCallbackRef","callback","callbackRef","React","args"],"mappings":"mYAEA,SAASA,EAAeC,EAAU,CAChC,MAAMC,EAAcC,EAAM,OAAOF,CAAQ,EACzCE,OAAAA,EAAM,UAAU,IAAM,CACpBD,EAAY,QAAUD,CACxB,CAAC,EACME,EAAM,QAAQ,IAAM,IAAIC,IAASF,EAAY,UAAU,GAAGE,CAAI,EAAG,EAAE,CAC5E","x_google_ignoreList":[0]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../../../../node_modules/@radix-ui/react-use-callback-ref/dist/index.mjs"],"sourcesContent":["// packages/react/use-callback-ref/src/use-callback-ref.tsx\nimport * as React from \"react\";\nfunction useCallbackRef(callback) {\n const callbackRef = React.useRef(callback);\n React.useEffect(() => {\n callbackRef.current = callback;\n });\n return React.useMemo(() => (...args) => callbackRef.current?.(...args), []);\n}\nexport {\n useCallbackRef\n};\n//# sourceMappingURL=index.mjs.map\n"],"names":["useCallbackRef","callback","callbackRef","React","args"],"mappings":";AAEA,SAASA,EAAeC,GAAU;AAChC,QAAMC,IAAcC,EAAM,OAAOF,CAAQ;AACzC,SAAAE,EAAM,UAAU,MAAM;AACpB,IAAAD,EAAY,UAAUD;AAAA,EACxB,CAAC,GACME,EAAM,QAAQ,MAAM,IAAIC,MAASF,EAAY,UAAU,GAAGE,CAAI,GAAG,EAAE;AAC5E;","x_google_ignoreList":[0]}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const m=require("react"),b=require("../../react-use-layout-effect/dist/index.cjs");function v(e){const o=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const r=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(o,t,r.get?r:{enumerable:!0,get:()=>e[t]})}}return o.default=e,Object.freeze(o)}const n=v(m);var g=n[" useInsertionEffect ".trim().toString()]||b.useLayoutEffect;function R({prop:e,defaultProp:o,onChange:t=()=>{},caller:r}){const[s,l,i]=S({defaultProp:o,onChange:t}),c=e!==void 0,a=c?e:s;{const u=n.useRef(e!==void 0);n.useEffect(()=>{const f=u.current;f!==c&&console.warn(`${r} is changing from ${f?"controlled":"uncontrolled"} to ${c?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),u.current=c},[c,r])}const d=n.useCallback(u=>{if(c){const f=y(u)?u(e):u;f!==e&&i.current?.(f)}else l(u)},[c,e,l,i]);return[a,d]}function S({defaultProp:e,onChange:o}){const[t,r]=n.useState(e),s=n.useRef(t),l=n.useRef(o);return g(()=>{l.current=o},[o]),n.useEffect(()=>{s.current!==t&&(l.current?.(t),s.current=t)},[t,s]),[t,r,l]}function y(e){return typeof e=="function"}exports.useControllableState=R;
|
|
2
|
+
//# sourceMappingURL=index.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.cjs","sources":["../../../../../../../node_modules/@radix-ui/react-use-controllable-state/dist/index.mjs"],"sourcesContent":["// src/use-controllable-state.tsx\nimport * as React from \"react\";\nimport { useLayoutEffect } from \"@radix-ui/react-use-layout-effect\";\nvar useInsertionEffect = React[\" useInsertionEffect \".trim().toString()] || useLayoutEffect;\nfunction useControllableState({\n prop,\n defaultProp,\n onChange = () => {\n },\n caller\n}) {\n const [uncontrolledProp, setUncontrolledProp, onChangeRef] = useUncontrolledState({\n defaultProp,\n onChange\n });\n const isControlled = prop !== void 0;\n const value = isControlled ? prop : uncontrolledProp;\n if (true) {\n const isControlledRef = React.useRef(prop !== void 0);\n React.useEffect(() => {\n const wasControlled = isControlledRef.current;\n if (wasControlled !== isControlled) {\n const from = wasControlled ? \"controlled\" : \"uncontrolled\";\n const to = isControlled ? \"controlled\" : \"uncontrolled\";\n console.warn(\n `${caller} is changing from ${from} to ${to}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`\n );\n }\n isControlledRef.current = isControlled;\n }, [isControlled, caller]);\n }\n const setValue = React.useCallback(\n (nextValue) => {\n if (isControlled) {\n const value2 = isFunction(nextValue) ? nextValue(prop) : nextValue;\n if (value2 !== prop) {\n onChangeRef.current?.(value2);\n }\n } else {\n setUncontrolledProp(nextValue);\n }\n },\n [isControlled, prop, setUncontrolledProp, onChangeRef]\n );\n return [value, setValue];\n}\nfunction useUncontrolledState({\n defaultProp,\n onChange\n}) {\n const [value, setValue] = React.useState(defaultProp);\n const prevValueRef = React.useRef(value);\n const onChangeRef = React.useRef(onChange);\n useInsertionEffect(() => {\n onChangeRef.current = onChange;\n }, [onChange]);\n React.useEffect(() => {\n if (prevValueRef.current !== value) {\n onChangeRef.current?.(value);\n prevValueRef.current = value;\n }\n }, [value, prevValueRef]);\n return [value, setValue, onChangeRef];\n}\nfunction isFunction(value) {\n return typeof value === \"function\";\n}\n\n// src/use-controllable-state-reducer.tsx\nimport * as React2 from \"react\";\nimport { useEffectEvent } from \"@radix-ui/react-use-effect-event\";\nvar SYNC_STATE = Symbol(\"RADIX:SYNC_STATE\");\nfunction useControllableStateReducer(reducer, userArgs, initialArg, init) {\n const { prop: controlledState, defaultProp, onChange: onChangeProp, caller } = userArgs;\n const isControlled = controlledState !== void 0;\n const onChange = useEffectEvent(onChangeProp);\n if (true) {\n const isControlledRef = React2.useRef(controlledState !== void 0);\n React2.useEffect(() => {\n const wasControlled = isControlledRef.current;\n if (wasControlled !== isControlled) {\n const from = wasControlled ? \"controlled\" : \"uncontrolled\";\n const to = isControlled ? \"controlled\" : \"uncontrolled\";\n console.warn(\n `${caller} is changing from ${from} to ${to}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`\n );\n }\n isControlledRef.current = isControlled;\n }, [isControlled, caller]);\n }\n const args = [{ ...initialArg, state: defaultProp }];\n if (init) {\n args.push(init);\n }\n const [internalState, dispatch] = React2.useReducer(\n (state2, action) => {\n if (action.type === SYNC_STATE) {\n return { ...state2, state: action.state };\n }\n const next = reducer(state2, action);\n if (isControlled && !Object.is(next.state, state2.state)) {\n onChange(next.state);\n }\n return next;\n },\n ...args\n );\n const uncontrolledState = internalState.state;\n const prevValueRef = React2.useRef(uncontrolledState);\n React2.useEffect(() => {\n if (prevValueRef.current !== uncontrolledState) {\n prevValueRef.current = uncontrolledState;\n if (!isControlled) {\n onChange(uncontrolledState);\n }\n }\n }, [onChange, uncontrolledState, prevValueRef, isControlled]);\n const state = React2.useMemo(() => {\n const isControlled2 = controlledState !== void 0;\n if (isControlled2) {\n return { ...internalState, state: controlledState };\n }\n return internalState;\n }, [internalState, controlledState]);\n React2.useEffect(() => {\n if (isControlled && !Object.is(controlledState, internalState.state)) {\n dispatch({ type: SYNC_STATE, state: controlledState });\n }\n }, [controlledState, internalState.state, isControlled]);\n return [state, dispatch];\n}\nexport {\n useControllableState,\n useControllableStateReducer\n};\n//# sourceMappingURL=index.mjs.map\n"],"names":["useInsertionEffect","React","useLayoutEffect","useControllableState","prop","defaultProp","onChange","caller","uncontrolledProp","setUncontrolledProp","onChangeRef","useUncontrolledState","isControlled","value","isControlledRef","wasControlled","setValue","nextValue","value2","isFunction","prevValueRef"],"mappings":"6bAGA,IAAIA,EAAqBC,EAAM,uBAAuB,KAAI,EAAG,SAAQ,CAAE,GAAKC,EAAAA,gBAC5E,SAASC,EAAqB,CAC5B,KAAAC,EACA,YAAAC,EACA,SAAAC,EAAW,IAAM,CACjB,EACA,OAAAC,CACF,EAAG,CACD,KAAM,CAACC,EAAkBC,EAAqBC,CAAW,EAAIC,EAAqB,CAChF,YAAAN,EACA,SAAAC,CACJ,CAAG,EACKM,EAAeR,IAAS,OACxBS,EAAQD,EAAeR,EAAOI,EAC1B,CACR,MAAMM,EAAkBb,EAAM,OAAOG,IAAS,MAAM,EACpDH,EAAM,UAAU,IAAM,CACpB,MAAMc,EAAgBD,EAAgB,QAClCC,IAAkBH,GAGpB,QAAQ,KACN,GAAGL,CAAM,qBAHEQ,EAAgB,aAAe,cAGR,OAFzBH,EAAe,aAAe,cAEI,4KACrD,EAEME,EAAgB,QAAUF,CAC5B,EAAG,CAACA,EAAcL,CAAM,CAAC,CAC3B,CACA,MAAMS,EAAWf,EAAM,YACpBgB,GAAc,CACb,GAAIL,EAAc,CAChB,MAAMM,EAASC,EAAWF,CAAS,EAAIA,EAAUb,CAAI,EAAIa,EACrDC,IAAWd,GACbM,EAAY,UAAUQ,CAAM,CAEhC,MACET,EAAoBQ,CAAS,CAEjC,EACA,CAACL,EAAcR,EAAMK,EAAqBC,CAAW,CACzD,EACE,MAAO,CAACG,EAAOG,CAAQ,CACzB,CACA,SAASL,EAAqB,CAC5B,YAAAN,EACA,SAAAC,CACF,EAAG,CACD,KAAM,CAACO,EAAOG,CAAQ,EAAIf,EAAM,SAASI,CAAW,EAC9Ce,EAAenB,EAAM,OAAOY,CAAK,EACjCH,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