@blimu/react 1.1.0 → 1.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_virtual/index.cjs +5 -1
- package/dist/_virtual/index.cjs.map +1 -1
- package/dist/_virtual/index.js +3 -3
- package/dist/_virtual/index2.cjs +4 -1
- package/dist/_virtual/index2.cjs.map +1 -1
- package/dist/_virtual/index2.js +2 -2
- package/dist/_virtual/use-sync-external-store-shim.development.cjs +4 -1
- package/dist/_virtual/use-sync-external-store-shim.development.cjs.map +1 -1
- package/dist/_virtual/use-sync-external-store-shim.development.js +2 -2
- package/dist/_virtual/use-sync-external-store-shim.production.cjs +4 -1
- package/dist/_virtual/use-sync-external-store-shim.production.cjs.map +1 -1
- package/dist/_virtual/use-sync-external-store-shim.production.js +2 -2
- package/dist/client/auth.service.cjs +249 -1
- package/dist/client/auth.service.cjs.map +1 -1
- package/dist/client/auth.service.js +194 -96
- package/dist/client/auth.service.js.map +1 -1
- package/dist/client/external-store.cjs +26 -1
- package/dist/client/external-store.cjs.map +1 -1
- package/dist/client/external-store.js +22 -8
- package/dist/client/external-store.js.map +1 -1
- package/dist/client/runtime-client.cjs +136 -1
- package/dist/client/runtime-client.cjs.map +1 -1
- package/dist/client/runtime-client.js +85 -51
- package/dist/client/runtime-client.js.map +1 -1
- package/dist/components/index.cjs +13 -0
- package/dist/components/index.cjs.map +1 -0
- package/dist/components/index.js +13 -0
- package/dist/components/index.js.map +1 -0
- package/dist/components/members-list.cjs +132 -1
- package/dist/components/members-list.cjs.map +1 -1
- package/dist/components/members-list.js +69 -64
- package/dist/components/members-list.js.map +1 -1
- package/dist/components/redirect-to-sign-in.cjs +34 -1
- package/dist/components/redirect-to-sign-in.cjs.map +1 -1
- package/dist/components/redirect-to-sign-in.js +28 -20
- package/dist/components/redirect-to-sign-in.js.map +1 -1
- package/dist/components/sign-in-button.cjs +36 -1
- package/dist/components/sign-in-button.cjs.map +1 -1
- package/dist/components/sign-in-button.js +25 -21
- package/dist/components/sign-in-button.js.map +1 -1
- package/dist/components/ui/avatar.cjs +42 -1
- package/dist/components/ui/avatar.cjs.map +1 -1
- package/dist/components/ui/avatar.js +23 -23
- package/dist/components/ui/avatar.js.map +1 -1
- package/dist/components/ui/dropdown-menu.cjs +148 -1
- package/dist/components/ui/dropdown-menu.cjs.map +1 -1
- package/dist/components/ui/dropdown-menu.js +83 -81
- package/dist/components/ui/dropdown-menu.js.map +1 -1
- package/dist/components/user-avatar.cjs +22 -1
- package/dist/components/user-avatar.cjs.map +1 -1
- package/dist/components/user-avatar.js +16 -16
- package/dist/components/user-avatar.js.map +1 -1
- package/dist/components/user-button/styles.cjs +39 -1
- package/dist/components/user-button/styles.cjs.map +1 -1
- package/dist/components/user-button/styles.js +6 -5
- package/dist/components/user-button/styles.js.map +1 -1
- package/dist/components/user-button/user-button.cjs +98 -1
- package/dist/components/user-button/user-button.cjs.map +1 -1
- package/dist/components/user-button/user-button.js +64 -58
- package/dist/components/user-button/user-button.js.map +1 -1
- package/dist/hooks/index.cjs +14 -0
- package/dist/hooks/index.cjs.map +1 -0
- package/dist/hooks/index.d.ts +1 -0
- package/dist/hooks/index.d.ts.map +1 -1
- package/dist/hooks/index.js +14 -0
- package/dist/hooks/index.js.map +1 -0
- package/dist/hooks/use-auth.cjs +44 -1
- package/dist/hooks/use-auth.cjs.map +1 -1
- package/dist/hooks/use-auth.d.ts +13 -15
- package/dist/hooks/use-auth.d.ts.map +1 -1
- package/dist/hooks/use-auth.js +30 -26
- package/dist/hooks/use-auth.js.map +1 -1
- package/dist/hooks/use-client.cjs +9 -1
- package/dist/hooks/use-client.cjs.map +1 -1
- package/dist/hooks/use-client.d.ts +1 -1
- package/dist/hooks/use-client.d.ts.map +1 -1
- package/dist/hooks/use-client.js +6 -5
- package/dist/hooks/use-client.js.map +1 -1
- package/dist/hooks/use-members.cjs +60 -1
- package/dist/hooks/use-members.cjs.map +1 -1
- package/dist/hooks/use-members.js +53 -41
- package/dist/hooks/use-members.js.map +1 -1
- package/dist/hooks/use-store.cjs +17 -1
- package/dist/hooks/use-store.cjs.map +1 -1
- package/dist/hooks/use-store.js +7 -7
- package/dist/hooks/use-store.js.map +1 -1
- package/dist/index.cjs +37 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +35 -35
- package/dist/lib/utils.cjs +8 -1
- package/dist/lib/utils.cjs.map +1 -1
- package/dist/lib/utils.js +5 -5
- package/dist/lib/utils.js.map +1 -1
- package/dist/lib/variants.cjs +46 -1
- package/dist/lib/variants.cjs.map +1 -1
- package/dist/lib/variants.js +6 -5
- package/dist/lib/variants.js.map +1 -1
- package/dist/node_modules/@floating-ui/core/dist/floating-ui.core.cjs +721 -1
- package/dist/node_modules/@floating-ui/core/dist/floating-ui.core.cjs.map +1 -1
- package/dist/node_modules/@floating-ui/core/dist/floating-ui.core.js +571 -377
- package/dist/node_modules/@floating-ui/core/dist/floating-ui.core.js.map +1 -1
- package/dist/node_modules/@floating-ui/dom/dist/floating-ui.dom.cjs +625 -1
- package/dist/node_modules/@floating-ui/dom/dist/floating-ui.dom.cjs.map +1 -1
- package/dist/node_modules/@floating-ui/dom/dist/floating-ui.dom.js +539 -316
- package/dist/node_modules/@floating-ui/dom/dist/floating-ui.dom.js.map +1 -1
- package/dist/node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.cjs +313 -1
- package/dist/node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.cjs.map +1 -1
- package/dist/node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.js +261 -172
- package/dist/node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.js.map +1 -1
- package/dist/node_modules/@floating-ui/utils/dist/floating-ui.utils.cjs +154 -1
- package/dist/node_modules/@floating-ui/utils/dist/floating-ui.utils.cjs.map +1 -1
- package/dist/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.cjs +173 -1
- package/dist/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.cjs.map +1 -1
- package/dist/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.js +144 -107
- package/dist/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.js.map +1 -1
- package/dist/node_modules/@floating-ui/utils/dist/floating-ui.utils.js +111 -87
- package/dist/node_modules/@floating-ui/utils/dist/floating-ui.utils.js.map +1 -1
- package/dist/node_modules/@radix-ui/primitive/dist/index.cjs +11 -1
- package/dist/node_modules/@radix-ui/primitive/dist/index.cjs.map +1 -1
- package/dist/node_modules/@radix-ui/primitive/dist/index.js +7 -5
- package/dist/node_modules/@radix-ui/primitive/dist/index.js.map +1 -1
- package/dist/node_modules/@radix-ui/react-arrow/dist/index.cjs +42 -1
- package/dist/node_modules/@radix-ui/react-arrow/dist/index.cjs.map +1 -1
- package/dist/node_modules/@radix-ui/react-arrow/dist/index.js +17 -16
- package/dist/node_modules/@radix-ui/react-arrow/dist/index.js.map +1 -1
- package/dist/node_modules/@radix-ui/react-avatar/dist/index.cjs +140 -1
- package/dist/node_modules/@radix-ui/react-avatar/dist/index.cjs.map +1 -1
- package/dist/node_modules/@radix-ui/react-avatar/dist/index.js +105 -57
- package/dist/node_modules/@radix-ui/react-avatar/dist/index.js.map +1 -1
- package/dist/node_modules/@radix-ui/react-avatar/node_modules/@radix-ui/react-context/dist/index.cjs +80 -1
- package/dist/node_modules/@radix-ui/react-avatar/node_modules/@radix-ui/react-context/dist/index.cjs.map +1 -1
- package/dist/node_modules/@radix-ui/react-avatar/node_modules/@radix-ui/react-context/dist/index.js +49 -41
- package/dist/node_modules/@radix-ui/react-avatar/node_modules/@radix-ui/react-context/dist/index.js.map +1 -1
- package/dist/node_modules/@radix-ui/react-avatar/node_modules/@radix-ui/react-primitive/dist/index.cjs +56 -1
- package/dist/node_modules/@radix-ui/react-avatar/node_modules/@radix-ui/react-primitive/dist/index.cjs.map +1 -1
- package/dist/node_modules/@radix-ui/react-avatar/node_modules/@radix-ui/react-primitive/dist/index.js +17 -10
- package/dist/node_modules/@radix-ui/react-avatar/node_modules/@radix-ui/react-primitive/dist/index.js.map +1 -1
- package/dist/node_modules/@radix-ui/react-avatar/node_modules/@radix-ui/react-slot/dist/index.cjs +119 -1
- package/dist/node_modules/@radix-ui/react-avatar/node_modules/@radix-ui/react-slot/dist/index.cjs.map +1 -1
- package/dist/node_modules/@radix-ui/react-avatar/node_modules/@radix-ui/react-slot/dist/index.js +86 -42
- package/dist/node_modules/@radix-ui/react-avatar/node_modules/@radix-ui/react-slot/dist/index.js.map +1 -1
- package/dist/node_modules/@radix-ui/react-collection/dist/index.cjs +70 -1
- package/dist/node_modules/@radix-ui/react-collection/dist/index.cjs.map +1 -1
- package/dist/node_modules/@radix-ui/react-collection/dist/index.js +57 -37
- package/dist/node_modules/@radix-ui/react-collection/dist/index.js.map +1 -1
- package/dist/node_modules/@radix-ui/react-compose-refs/dist/index.cjs +56 -1
- package/dist/node_modules/@radix-ui/react-compose-refs/dist/index.cjs.map +1 -1
- package/dist/node_modules/@radix-ui/react-compose-refs/dist/index.js +29 -19
- package/dist/node_modules/@radix-ui/react-compose-refs/dist/index.js.map +1 -1
- package/dist/node_modules/@radix-ui/react-context/dist/index.cjs +79 -1
- package/dist/node_modules/@radix-ui/react-context/dist/index.cjs.map +1 -1
- package/dist/node_modules/@radix-ui/react-context/dist/index.js +48 -39
- package/dist/node_modules/@radix-ui/react-context/dist/index.js.map +1 -1
- package/dist/node_modules/@radix-ui/react-direction/dist/index.cjs +27 -1
- package/dist/node_modules/@radix-ui/react-direction/dist/index.cjs.map +1 -1
- package/dist/node_modules/@radix-ui/react-direction/dist/index.js +6 -6
- package/dist/node_modules/@radix-ui/react-direction/dist/index.js.map +1 -1
- package/dist/node_modules/@radix-ui/react-dismissable-layer/dist/index.cjs +229 -1
- package/dist/node_modules/@radix-ui/react-dismissable-layer/dist/index.cjs.map +1 -1
- package/dist/node_modules/@radix-ui/react-dismissable-layer/dist/index.js +182 -97
- package/dist/node_modules/@radix-ui/react-dismissable-layer/dist/index.js.map +1 -1
- package/dist/node_modules/@radix-ui/react-dropdown-menu/dist/index.cjs +296 -1
- package/dist/node_modules/@radix-ui/react-dropdown-menu/dist/index.cjs.map +1 -1
- package/dist/node_modules/@radix-ui/react-dropdown-menu/dist/index.js +232 -167
- package/dist/node_modules/@radix-ui/react-dropdown-menu/dist/index.js.map +1 -1
- package/dist/node_modules/@radix-ui/react-focus-guards/dist/index.cjs +46 -1
- package/dist/node_modules/@radix-ui/react-focus-guards/dist/index.cjs.map +1 -1
- package/dist/node_modules/@radix-ui/react-focus-guards/dist/index.js +23 -11
- package/dist/node_modules/@radix-ui/react-focus-guards/dist/index.js.map +1 -1
- package/dist/node_modules/@radix-ui/react-focus-scope/dist/index.cjs +224 -1
- package/dist/node_modules/@radix-ui/react-focus-scope/dist/index.cjs.map +1 -1
- package/dist/node_modules/@radix-ui/react-focus-scope/dist/index.js +169 -98
- package/dist/node_modules/@radix-ui/react-focus-scope/dist/index.js.map +1 -1
- package/dist/node_modules/@radix-ui/react-id/dist/index.cjs +31 -1
- package/dist/node_modules/@radix-ui/react-id/dist/index.cjs.map +1 -1
- package/dist/node_modules/@radix-ui/react-id/dist/index.js +11 -10
- package/dist/node_modules/@radix-ui/react-id/dist/index.js.map +1 -1
- package/dist/node_modules/@radix-ui/react-menu/dist/index.cjs +845 -1
- package/dist/node_modules/@radix-ui/react-menu/dist/index.cjs.map +1 -1
- package/dist/node_modules/@radix-ui/react-menu/dist/index.js +662 -442
- package/dist/node_modules/@radix-ui/react-menu/dist/index.js.map +1 -1
- package/dist/node_modules/@radix-ui/react-popper/dist/index.cjs +308 -1
- package/dist/node_modules/@radix-ui/react-popper/dist/index.cjs.map +1 -1
- package/dist/node_modules/@radix-ui/react-popper/dist/index.js +209 -137
- package/dist/node_modules/@radix-ui/react-popper/dist/index.js.map +1 -1
- package/dist/node_modules/@radix-ui/react-portal/dist/index.cjs +34 -1
- package/dist/node_modules/@radix-ui/react-portal/dist/index.cjs.map +1 -1
- package/dist/node_modules/@radix-ui/react-portal/dist/index.js +14 -12
- package/dist/node_modules/@radix-ui/react-portal/dist/index.js.map +1 -1
- package/dist/node_modules/@radix-ui/react-presence/dist/index.cjs +145 -1
- package/dist/node_modules/@radix-ui/react-presence/dist/index.cjs.map +1 -1
- package/dist/node_modules/@radix-ui/react-presence/dist/index.js +103 -45
- package/dist/node_modules/@radix-ui/react-presence/dist/index.js.map +1 -1
- package/dist/node_modules/@radix-ui/react-primitive/dist/index.cjs +61 -1
- package/dist/node_modules/@radix-ui/react-primitive/dist/index.cjs.map +1 -1
- package/dist/node_modules/@radix-ui/react-primitive/dist/index.js +21 -14
- package/dist/node_modules/@radix-ui/react-primitive/dist/index.js.map +1 -1
- package/dist/node_modules/@radix-ui/react-roving-focus/dist/index.cjs +244 -1
- package/dist/node_modules/@radix-ui/react-roving-focus/dist/index.cjs.map +1 -1
- package/dist/node_modules/@radix-ui/react-roving-focus/dist/index.js +179 -135
- package/dist/node_modules/@radix-ui/react-roving-focus/dist/index.js.map +1 -1
- package/dist/node_modules/@radix-ui/react-slot/dist/index.cjs +105 -1
- package/dist/node_modules/@radix-ui/react-slot/dist/index.cjs.map +1 -1
- package/dist/node_modules/@radix-ui/react-slot/dist/index.js +74 -35
- package/dist/node_modules/@radix-ui/react-slot/dist/index.js.map +1 -1
- package/dist/node_modules/@radix-ui/react-use-callback-ref/dist/index.cjs +28 -1
- package/dist/node_modules/@radix-ui/react-use-callback-ref/dist/index.cjs.map +1 -1
- package/dist/node_modules/@radix-ui/react-use-callback-ref/dist/index.js +8 -7
- package/dist/node_modules/@radix-ui/react-use-callback-ref/dist/index.js.map +1 -1
- package/dist/node_modules/@radix-ui/react-use-controllable-state/dist/index.cjs +86 -1
- package/dist/node_modules/@radix-ui/react-use-controllable-state/dist/index.cjs.map +1 -1
- package/dist/node_modules/@radix-ui/react-use-controllable-state/dist/index.js +57 -40
- package/dist/node_modules/@radix-ui/react-use-controllable-state/dist/index.js.map +1 -1
- package/dist/node_modules/@radix-ui/react-use-escape-keydown/dist/index.cjs +34 -1
- package/dist/node_modules/@radix-ui/react-use-escape-keydown/dist/index.cjs.map +1 -1
- package/dist/node_modules/@radix-ui/react-use-escape-keydown/dist/index.js +13 -10
- package/dist/node_modules/@radix-ui/react-use-escape-keydown/dist/index.js.map +1 -1
- package/dist/node_modules/@radix-ui/react-use-is-hydrated/dist/index.cjs +15 -1
- package/dist/node_modules/@radix-ui/react-use-is-hydrated/dist/index.cjs.map +1 -1
- package/dist/node_modules/@radix-ui/react-use-is-hydrated/dist/index.js +8 -8
- package/dist/node_modules/@radix-ui/react-use-is-hydrated/dist/index.js.map +1 -1
- package/dist/node_modules/@radix-ui/react-use-layout-effect/dist/index.cjs +23 -1
- package/dist/node_modules/@radix-ui/react-use-layout-effect/dist/index.cjs.map +1 -1
- package/dist/node_modules/@radix-ui/react-use-layout-effect/dist/index.js +3 -3
- package/dist/node_modules/@radix-ui/react-use-layout-effect/dist/index.js.map +1 -1
- package/dist/node_modules/@radix-ui/react-use-size/dist/index.cjs +56 -1
- package/dist/node_modules/@radix-ui/react-use-size/dist/index.cjs.map +1 -1
- package/dist/node_modules/@radix-ui/react-use-size/dist/index.js +34 -22
- package/dist/node_modules/@radix-ui/react-use-size/dist/index.js.map +1 -1
- package/dist/node_modules/aria-hidden/dist/es2015/index.cjs +122 -1
- package/dist/node_modules/aria-hidden/dist/es2015/index.cjs.map +1 -1
- package/dist/node_modules/aria-hidden/dist/es2015/index.js +111 -41
- package/dist/node_modules/aria-hidden/dist/es2015/index.js.map +1 -1
- package/dist/node_modules/class-variance-authority/dist/index.cjs +45 -1
- package/dist/node_modules/class-variance-authority/dist/index.cjs.map +1 -1
- package/dist/node_modules/class-variance-authority/dist/index.js +40 -30
- package/dist/node_modules/class-variance-authority/dist/index.js.map +1 -1
- package/dist/node_modules/clsx/dist/clsx.cjs +17 -1
- package/dist/node_modules/clsx/dist/clsx.cjs.map +1 -1
- package/dist/node_modules/clsx/dist/clsx.js +13 -13
- package/dist/node_modules/clsx/dist/clsx.js.map +1 -1
- package/dist/node_modules/get-nonce/dist/es2015/index.cjs +9 -1
- package/dist/node_modules/get-nonce/dist/es2015/index.cjs.map +1 -1
- package/dist/node_modules/get-nonce/dist/es2015/index.js +5 -3
- package/dist/node_modules/get-nonce/dist/es2015/index.js.map +1 -1
- package/dist/node_modules/js-cookie/dist/js.cookie.cjs +98 -1
- package/dist/node_modules/js-cookie/dist/js.cookie.cjs.map +1 -1
- package/dist/node_modules/js-cookie/dist/js.cookie.js +69 -43
- package/dist/node_modules/js-cookie/dist/js.cookie.js.map +1 -1
- package/dist/node_modules/jwt-decode/build/esm/index.cjs +58 -1
- package/dist/node_modules/jwt-decode/build/esm/index.cjs.map +1 -1
- package/dist/node_modules/jwt-decode/build/esm/index.js +36 -30
- package/dist/node_modules/jwt-decode/build/esm/index.js.map +1 -1
- package/dist/node_modules/lucide-react/dist/esm/Icon.cjs +34 -1
- package/dist/node_modules/lucide-react/dist/esm/Icon.cjs.map +1 -1
- package/dist/node_modules/lucide-react/dist/esm/Icon.js +25 -25
- package/dist/node_modules/lucide-react/dist/esm/Icon.js.map +1 -1
- package/dist/node_modules/lucide-react/dist/esm/createLucideIcon.cjs +21 -1
- package/dist/node_modules/lucide-react/dist/esm/createLucideIcon.cjs.map +1 -1
- package/dist/node_modules/lucide-react/dist/esm/createLucideIcon.js +16 -15
- package/dist/node_modules/lucide-react/dist/esm/createLucideIcon.js.map +1 -1
- package/dist/node_modules/lucide-react/dist/esm/defaultAttributes.cjs +13 -1
- package/dist/node_modules/lucide-react/dist/esm/defaultAttributes.cjs.map +1 -1
- package/dist/node_modules/lucide-react/dist/esm/defaultAttributes.js +2 -2
- package/dist/node_modules/lucide-react/dist/esm/defaultAttributes.js.map +1 -1
- package/dist/node_modules/lucide-react/dist/esm/icons/check.cjs +7 -1
- package/dist/node_modules/lucide-react/dist/esm/icons/check.cjs.map +1 -1
- package/dist/node_modules/lucide-react/dist/esm/icons/check.js +5 -4
- package/dist/node_modules/lucide-react/dist/esm/icons/check.js.map +1 -1
- package/dist/node_modules/lucide-react/dist/esm/icons/chevron-right.cjs +7 -1
- package/dist/node_modules/lucide-react/dist/esm/icons/chevron-right.cjs.map +1 -1
- package/dist/node_modules/lucide-react/dist/esm/icons/chevron-right.js +5 -4
- package/dist/node_modules/lucide-react/dist/esm/icons/chevron-right.js.map +1 -1
- package/dist/node_modules/lucide-react/dist/esm/icons/circle.cjs +7 -1
- package/dist/node_modules/lucide-react/dist/esm/icons/circle.cjs.map +1 -1
- package/dist/node_modules/lucide-react/dist/esm/icons/circle.js +5 -4
- package/dist/node_modules/lucide-react/dist/esm/icons/circle.js.map +1 -1
- package/dist/node_modules/lucide-react/dist/esm/icons/log-out.cjs +11 -1
- package/dist/node_modules/lucide-react/dist/esm/icons/log-out.cjs.map +1 -1
- package/dist/node_modules/lucide-react/dist/esm/icons/log-out.js +6 -5
- package/dist/node_modules/lucide-react/dist/esm/icons/log-out.js.map +1 -1
- package/dist/node_modules/lucide-react/dist/esm/shared/src/utils.cjs +26 -1
- package/dist/node_modules/lucide-react/dist/esm/shared/src/utils.cjs.map +1 -1
- package/dist/node_modules/lucide-react/dist/esm/shared/src/utils.js +22 -14
- package/dist/node_modules/lucide-react/dist/esm/shared/src/utils.js.map +1 -1
- package/dist/node_modules/react-remove-scroll/dist/es2015/Combination.cjs +27 -1
- package/dist/node_modules/react-remove-scroll/dist/es2015/Combination.cjs.map +1 -1
- package/dist/node_modules/react-remove-scroll/dist/es2015/Combination.js +8 -8
- package/dist/node_modules/react-remove-scroll/dist/es2015/Combination.js.map +1 -1
- package/dist/node_modules/react-remove-scroll/dist/es2015/SideEffect.cjs +197 -4
- package/dist/node_modules/react-remove-scroll/dist/es2015/SideEffect.cjs.map +1 -1
- package/dist/node_modules/react-remove-scroll/dist/es2015/SideEffect.js +163 -98
- package/dist/node_modules/react-remove-scroll/dist/es2015/SideEffect.js.map +1 -1
- package/dist/node_modules/react-remove-scroll/dist/es2015/UI.cjs +55 -1
- package/dist/node_modules/react-remove-scroll/dist/es2015/UI.cjs.map +1 -1
- package/dist/node_modules/react-remove-scroll/dist/es2015/UI.js +31 -24
- package/dist/node_modules/react-remove-scroll/dist/es2015/UI.js.map +1 -1
- package/dist/node_modules/react-remove-scroll/dist/es2015/aggresiveCapture.cjs +19 -1
- package/dist/node_modules/react-remove-scroll/dist/es2015/aggresiveCapture.cjs.map +1 -1
- package/dist/node_modules/react-remove-scroll/dist/es2015/aggresiveCapture.js +12 -9
- package/dist/node_modules/react-remove-scroll/dist/es2015/aggresiveCapture.js.map +1 -1
- package/dist/node_modules/react-remove-scroll/dist/es2015/handleScroll.cjs +102 -1
- package/dist/node_modules/react-remove-scroll/dist/es2015/handleScroll.cjs.map +1 -1
- package/dist/node_modules/react-remove-scroll/dist/es2015/handleScroll.js +85 -51
- package/dist/node_modules/react-remove-scroll/dist/es2015/handleScroll.js.map +1 -1
- package/dist/node_modules/react-remove-scroll/dist/es2015/medium.cjs +5 -1
- package/dist/node_modules/react-remove-scroll/dist/es2015/medium.cjs.map +1 -1
- package/dist/node_modules/react-remove-scroll/dist/es2015/medium.js +3 -3
- package/dist/node_modules/react-remove-scroll/dist/es2015/medium.js.map +1 -1
- package/dist/node_modules/react-remove-scroll/dist/es2015/sidecar.cjs +6 -1
- package/dist/node_modules/react-remove-scroll/dist/es2015/sidecar.cjs.map +1 -1
- package/dist/node_modules/react-remove-scroll/dist/es2015/sidecar.js +5 -5
- package/dist/node_modules/react-remove-scroll/dist/es2015/sidecar.js.map +1 -1
- package/dist/node_modules/react-remove-scroll-bar/dist/es2015/component.cjs +62 -36
- package/dist/node_modules/react-remove-scroll-bar/dist/es2015/component.cjs.map +1 -1
- package/dist/node_modules/react-remove-scroll-bar/dist/es2015/component.js +41 -65
- package/dist/node_modules/react-remove-scroll-bar/dist/es2015/component.js.map +1 -1
- package/dist/node_modules/react-remove-scroll-bar/dist/es2015/constants.cjs +10 -1
- package/dist/node_modules/react-remove-scroll-bar/dist/es2015/constants.cjs.map +1 -1
- package/dist/node_modules/react-remove-scroll-bar/dist/es2015/constants.js +8 -5
- package/dist/node_modules/react-remove-scroll-bar/dist/es2015/constants.js.map +1 -1
- package/dist/node_modules/react-remove-scroll-bar/dist/es2015/utils.cjs +37 -1
- package/dist/node_modules/react-remove-scroll-bar/dist/es2015/utils.cjs.map +1 -1
- package/dist/node_modules/react-remove-scroll-bar/dist/es2015/utils.js +28 -16
- package/dist/node_modules/react-remove-scroll-bar/dist/es2015/utils.js.map +1 -1
- package/dist/node_modules/react-style-singleton/dist/es2015/component.cjs +13 -1
- package/dist/node_modules/react-style-singleton/dist/es2015/component.cjs.map +1 -1
- package/dist/node_modules/react-style-singleton/dist/es2015/component.js +9 -7
- package/dist/node_modules/react-style-singleton/dist/es2015/component.js.map +1 -1
- package/dist/node_modules/react-style-singleton/dist/es2015/hook.cjs +33 -1
- package/dist/node_modules/react-style-singleton/dist/es2015/hook.cjs.map +1 -1
- package/dist/node_modules/react-style-singleton/dist/es2015/hook.js +11 -10
- package/dist/node_modules/react-style-singleton/dist/es2015/hook.js.map +1 -1
- package/dist/node_modules/react-style-singleton/dist/es2015/singleton.cjs +48 -1
- package/dist/node_modules/react-style-singleton/dist/es2015/singleton.cjs.map +1 -1
- package/dist/node_modules/react-style-singleton/dist/es2015/singleton.js +35 -17
- package/dist/node_modules/react-style-singleton/dist/es2015/singleton.js.map +1 -1
- package/dist/node_modules/tailwind-merge/dist/bundle-mjs.cjs +3014 -1
- package/dist/node_modules/tailwind-merge/dist/bundle-mjs.cjs.map +1 -1
- package/dist/node_modules/tailwind-merge/dist/bundle-mjs.js +804 -555
- package/dist/node_modules/tailwind-merge/dist/bundle-mjs.js.map +1 -1
- package/dist/node_modules/tailwindcss/dist/plugin.cjs +12 -1
- package/dist/node_modules/tailwindcss/dist/plugin.cjs.map +1 -1
- package/dist/node_modules/tailwindcss/dist/plugin.js +8 -8
- package/dist/node_modules/tailwindcss/dist/plugin.js.map +1 -1
- package/dist/node_modules/tslib/tslib.es6.cjs +38 -1
- package/dist/node_modules/tslib/tslib.es6.cjs.map +1 -1
- package/dist/node_modules/tslib/tslib.es6.js +33 -21
- package/dist/node_modules/tslib/tslib.es6.js.map +1 -1
- package/dist/node_modules/use-callback-ref/dist/es2015/assignRef.cjs +11 -1
- package/dist/node_modules/use-callback-ref/dist/es2015/assignRef.cjs.map +1 -1
- package/dist/node_modules/use-callback-ref/dist/es2015/assignRef.js +8 -3
- package/dist/node_modules/use-callback-ref/dist/es2015/assignRef.js.map +1 -1
- package/dist/node_modules/use-callback-ref/dist/es2015/useMergeRef.cjs +52 -1
- package/dist/node_modules/use-callback-ref/dist/es2015/useMergeRef.cjs.map +1 -1
- package/dist/node_modules/use-callback-ref/dist/es2015/useMergeRef.js +28 -19
- package/dist/node_modules/use-callback-ref/dist/es2015/useMergeRef.js.map +1 -1
- package/dist/node_modules/use-callback-ref/dist/es2015/useRef.cjs +29 -1
- package/dist/node_modules/use-callback-ref/dist/es2015/useRef.cjs.map +1 -1
- package/dist/node_modules/use-callback-ref/dist/es2015/useRef.js +15 -11
- package/dist/node_modules/use-callback-ref/dist/es2015/useRef.js.map +1 -1
- package/dist/node_modules/use-sidecar/dist/es2015/exports.cjs +38 -1
- package/dist/node_modules/use-sidecar/dist/es2015/exports.cjs.map +1 -1
- package/dist/node_modules/use-sidecar/dist/es2015/exports.js +15 -12
- package/dist/node_modules/use-sidecar/dist/es2015/exports.js.map +1 -1
- package/dist/node_modules/use-sidecar/dist/es2015/medium.cjs +88 -1
- package/dist/node_modules/use-sidecar/dist/es2015/medium.cjs.map +1 -1
- package/dist/node_modules/use-sidecar/dist/es2015/medium.js +64 -43
- package/dist/node_modules/use-sidecar/dist/es2015/medium.js.map +1 -1
- package/dist/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.development.cjs +68 -1
- package/dist/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.development.cjs.map +1 -1
- package/dist/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.development.js +49 -39
- package/dist/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.development.js.map +1 -1
- package/dist/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.production.cjs +53 -1
- package/dist/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.production.cjs.map +1 -1
- package/dist/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.production.js +39 -32
- package/dist/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.production.js.map +1 -1
- package/dist/node_modules/use-sync-external-store/shim/index.cjs +17 -1
- package/dist/node_modules/use-sync-external-store/shim/index.cjs.map +1 -1
- package/dist/node_modules/use-sync-external-store/shim/index.js +14 -7
- package/dist/node_modules/use-sync-external-store/shim/index.js.map +1 -1
- package/dist/providers/auth/auth.context.cjs +5 -1
- package/dist/providers/auth/auth.context.cjs.map +1 -1
- package/dist/providers/auth/auth.context.js +3 -3
- package/dist/providers/auth/auth.context.js.map +1 -1
- package/dist/providers/auth/auth.hook.cjs +12 -1
- package/dist/providers/auth/auth.hook.cjs.map +1 -1
- package/dist/providers/auth/auth.hook.js +8 -7
- package/dist/providers/auth/auth.hook.js.map +1 -1
- package/dist/providers/auth/auth.provider.cjs +37 -1
- package/dist/providers/auth/auth.provider.cjs.map +1 -1
- package/dist/providers/auth/auth.provider.js +31 -22
- package/dist/providers/auth/auth.provider.js.map +1 -1
- package/dist/providers/blimu/blimu.context.cjs +5 -1
- package/dist/providers/blimu/blimu.context.cjs.map +1 -1
- package/dist/providers/blimu/blimu.context.js +3 -3
- package/dist/providers/blimu/blimu.context.js.map +1 -1
- package/dist/providers/blimu/blimu.hook.cjs +12 -1
- package/dist/providers/blimu/blimu.hook.cjs.map +1 -1
- package/dist/providers/blimu/blimu.hook.js +8 -7
- package/dist/providers/blimu/blimu.hook.js.map +1 -1
- package/dist/providers/blimu/blimu.provider.cjs +71 -1
- package/dist/providers/blimu/blimu.provider.cjs.map +1 -1
- package/dist/providers/blimu/blimu.provider.js +32 -27
- package/dist/providers/blimu/blimu.provider.js.map +1 -1
- package/dist/providers/index.cjs +13 -0
- package/dist/providers/index.cjs.map +1 -0
- package/dist/providers/index.js +13 -0
- package/dist/providers/index.js.map +1 -0
- package/dist/providers/theme/theme.context.cjs +5 -1
- package/dist/providers/theme/theme.context.cjs.map +1 -1
- package/dist/providers/theme/theme.context.js +3 -3
- package/dist/providers/theme/theme.context.js.map +1 -1
- package/dist/providers/theme/theme.hook.cjs +12 -1
- package/dist/providers/theme/theme.hook.cjs.map +1 -1
- package/dist/providers/theme/theme.hook.js +8 -7
- package/dist/providers/theme/theme.hook.js.map +1 -1
- package/dist/providers/theme/theme.provider.cjs +104 -1
- package/dist/providers/theme/theme.provider.cjs.map +1 -1
- package/dist/providers/theme/theme.provider.js +85 -48
- package/dist/providers/theme/theme.provider.js.map +1 -1
- package/dist/tailwind.cjs +200 -0
- package/dist/tailwind.cjs.map +1 -0
- package/dist/{tailwind.plugin.js → tailwind.js} +6 -6
- package/dist/tailwind.js.map +1 -0
- package/dist/types/index.cjs +11 -1
- package/dist/types/index.cjs.map +1 -1
- package/dist/types/index.js +8 -8
- package/dist/types/index.js.map +1 -1
- package/dist/utils/publishable-key.cjs +62 -1
- package/dist/utils/publishable-key.cjs.map +1 -1
- package/dist/utils/publishable-key.js +52 -27
- package/dist/utils/publishable-key.js.map +1 -1
- package/package.json +41 -42
- package/dist/components.cjs +0 -2
- package/dist/components.cjs.map +0 -1
- package/dist/components.js +0 -13
- package/dist/components.js.map +0 -1
- package/dist/hooks.cjs +0 -2
- package/dist/hooks.cjs.map +0 -1
- package/dist/hooks.js +0 -14
- package/dist/hooks.js.map +0 -1
- package/dist/providers.cjs +0 -2
- package/dist/providers.cjs.map +0 -1
- package/dist/providers.js +0 -13
- package/dist/providers.js.map +0 -1
- package/dist/tailwind.plugin.cjs +0 -2
- package/dist/tailwind.plugin.cjs.map +0 -1
- package/dist/tailwind.plugin.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dropdown-menu.js","sources":["../../../src/components/ui/dropdown-menu.tsx"],"sourcesContent":["import * as React from 'react';\nimport * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu';\nimport { Check, ChevronRight, Circle } from 'lucide-react';\n\nimport { cn } from '../../lib/utils';\n\nconst DropdownMenu = DropdownMenuPrimitive.Root;\n\nconst DropdownMenuTrigger = DropdownMenuPrimitive.Trigger;\n\nconst DropdownMenuGroup = DropdownMenuPrimitive.Group;\n\nconst DropdownMenuPortal = DropdownMenuPrimitive.Portal;\n\nconst DropdownMenuSub = DropdownMenuPrimitive.Sub;\n\nconst DropdownMenuRadioGroup = DropdownMenuPrimitive.RadioGroup;\n\nconst DropdownMenuSubTrigger = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.SubTrigger>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.SubTrigger> & {\n inset?: boolean;\n }\n>(({ className, inset, children, ...props }, ref) => (\n <DropdownMenuPrimitive.SubTrigger\n ref={ref}\n className={cn(\n 'flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm text-blimu-muted-foreground outline-none focus:bg-blimu-accent focus:text-blimu-accent-foreground data-[state=open]:bg-blimu-accent data-[state=open]:text-blimu-accent-foreground',\n inset && 'pl-8',\n className,\n )}\n {...props}\n >\n {children}\n <ChevronRight className=\"ml-auto h-3.5 w-3.5\" />\n </DropdownMenuPrimitive.SubTrigger>\n));\nDropdownMenuSubTrigger.displayName = DropdownMenuPrimitive.SubTrigger.displayName;\n\nconst DropdownMenuSubContent = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.SubContent>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.SubContent>\n>(({ className, ...props }, ref) => (\n <DropdownMenuPrimitive.SubContent\n ref={ref}\n style={{\n backgroundColor: 'var(--blimu-popover)',\n }}\n className={cn(\n 'z-50 min-w-[8rem] overflow-hidden rounded-blimu border border-blimu-border text-blimu-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2',\n className,\n )}\n {...props}\n />\n));\nDropdownMenuSubContent.displayName = DropdownMenuPrimitive.SubContent.displayName;\n\nconst DropdownMenuContent = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Content>\n>(({ className, sideOffset = 4, ...props }, ref) => (\n <DropdownMenuPrimitive.Portal>\n <DropdownMenuPrimitive.Content\n ref={ref}\n sideOffset={sideOffset}\n className={cn(\n 'z-50 min-w-[8rem] overflow-hidden rounded-blimu border border-blimu-border text-blimu-popover-foreground shadow-md p-1',\n 'data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2',\n className,\n )}\n {...props}\n />\n </DropdownMenuPrimitive.Portal>\n));\nDropdownMenuContent.displayName = DropdownMenuPrimitive.Content.displayName;\n\nconst DropdownMenuItem = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.Item>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Item> & {\n inset?: boolean;\n }\n>(({ className, inset, ...props }, ref) => (\n <DropdownMenuPrimitive.Item\n ref={ref}\n className={cn(\n 'relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 mx-1 text-sm text-blimu-muted-foreground outline-none transition-colors focus:bg-blimu-accent focus:text-blimu-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50',\n inset && 'pl-8',\n className,\n )}\n {...props}\n />\n));\nDropdownMenuItem.displayName = DropdownMenuPrimitive.Item.displayName;\n\nconst DropdownMenuCheckboxItem = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.CheckboxItem>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.CheckboxItem>\n>(({ className, children, checked, ...props }, ref) => (\n <DropdownMenuPrimitive.CheckboxItem\n ref={ref}\n className={cn(\n 'relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm text-blimu-muted-foreground outline-none transition-colors focus:bg-blimu-accent focus:text-blimu-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50',\n className,\n )}\n checked={checked}\n {...props}\n >\n <span className=\"absolute left-2 flex h-3.5 w-3.5 items-center justify-center\">\n <DropdownMenuPrimitive.ItemIndicator>\n <Check className=\"h-3.5 w-3.5\" />\n </DropdownMenuPrimitive.ItemIndicator>\n </span>\n {children}\n </DropdownMenuPrimitive.CheckboxItem>\n));\nDropdownMenuCheckboxItem.displayName = DropdownMenuPrimitive.CheckboxItem.displayName;\n\nconst DropdownMenuRadioItem = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.RadioItem>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.RadioItem>\n>(({ className, children, ...props }, ref) => (\n <DropdownMenuPrimitive.RadioItem\n ref={ref}\n className={cn(\n 'relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm text-blimu-muted-foreground outline-none transition-colors focus:bg-blimu-accent focus:text-blimu-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50',\n className,\n )}\n {...props}\n >\n <span className=\"absolute left-2 flex h-3.5 w-3.5 items-center justify-center\">\n <DropdownMenuPrimitive.ItemIndicator>\n <Circle className=\"h-2.5 w-2.5 fill-current\" />\n </DropdownMenuPrimitive.ItemIndicator>\n </span>\n {children}\n </DropdownMenuPrimitive.RadioItem>\n));\nDropdownMenuRadioItem.displayName = DropdownMenuPrimitive.RadioItem.displayName;\n\nconst DropdownMenuLabel = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.Label>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Label> & {\n inset?: boolean;\n }\n>(({ className, inset, ...props }, ref) => (\n <DropdownMenuPrimitive.Label\n ref={ref}\n className={cn('px-2 py-1.5 text-sm font-semibold', inset && 'pl-8', className)}\n {...props}\n />\n));\nDropdownMenuLabel.displayName = DropdownMenuPrimitive.Label.displayName;\n\nconst DropdownMenuSeparator = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.Separator>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Separator>\n>(({ className, ...props }, ref) => (\n <DropdownMenuPrimitive.Separator\n ref={ref}\n className={cn('-mx-1 my-1 h-px bg-blimu-border', className)}\n {...props}\n />\n));\nDropdownMenuSeparator.displayName = DropdownMenuPrimitive.Separator.displayName;\n\nconst DropdownMenuShortcut = ({ className, ...props }: React.HTMLAttributes<HTMLSpanElement>) => {\n return (\n <span className={cn('ml-auto text-xs tracking-widest opacity-60', className)} {...props} />\n );\n};\nDropdownMenuShortcut.displayName = 'DropdownMenuShortcut';\n\nexport {\n DropdownMenu,\n DropdownMenuTrigger,\n DropdownMenuContent,\n DropdownMenuItem,\n DropdownMenuCheckboxItem,\n DropdownMenuRadioItem,\n DropdownMenuLabel,\n DropdownMenuSeparator,\n DropdownMenuShortcut,\n DropdownMenuGroup,\n DropdownMenuPortal,\n DropdownMenuSub,\n DropdownMenuSubContent,\n DropdownMenuSubTrigger,\n DropdownMenuRadioGroup,\n};\n"],"names":["DropdownMenu","DropdownMenuPrimitive.Root","DropdownMenuTrigger","DropdownMenuPrimitive.Trigger","DropdownMenuSubTrigger","React","className","inset","children","props","ref","jsxs","DropdownMenuPrimitive.SubTrigger","cn","jsx","ChevronRight","DropdownMenuSubContent","DropdownMenuPrimitive.SubContent","DropdownMenuContent","sideOffset","DropdownMenuPrimitive.Portal","DropdownMenuPrimitive.Content","DropdownMenuItem","DropdownMenuPrimitive.Item","DropdownMenuCheckboxItem","checked","DropdownMenuPrimitive.CheckboxItem","DropdownMenuPrimitive.ItemIndicator","Check","DropdownMenuRadioItem","DropdownMenuPrimitive.RadioItem","Circle","DropdownMenuLabel","DropdownMenuPrimitive.Label","DropdownMenuSeparator","DropdownMenuPrimitive.Separator"],"mappings":"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"}
|
|
1
|
+
{"version":3,"file":"dropdown-menu.js","sources":["../../../src/components/ui/dropdown-menu.tsx"],"sourcesContent":["import * as React from 'react';\nimport * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu';\nimport { Check, ChevronRight, Circle } from 'lucide-react';\n\nimport { cn } from '../../lib/utils';\n\nconst DropdownMenu = DropdownMenuPrimitive.Root;\n\nconst DropdownMenuTrigger = DropdownMenuPrimitive.Trigger;\n\nconst DropdownMenuGroup = DropdownMenuPrimitive.Group;\n\nconst DropdownMenuPortal = DropdownMenuPrimitive.Portal;\n\nconst DropdownMenuSub = DropdownMenuPrimitive.Sub;\n\nconst DropdownMenuRadioGroup = DropdownMenuPrimitive.RadioGroup;\n\nconst DropdownMenuSubTrigger = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.SubTrigger>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.SubTrigger> & {\n inset?: boolean;\n }\n>(({ className, inset, children, ...props }, ref) => (\n <DropdownMenuPrimitive.SubTrigger\n ref={ref}\n className={cn(\n 'flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm text-blimu-muted-foreground outline-none focus:bg-blimu-accent focus:text-blimu-accent-foreground data-[state=open]:bg-blimu-accent data-[state=open]:text-blimu-accent-foreground',\n inset && 'pl-8',\n className,\n )}\n {...props}\n >\n {children}\n <ChevronRight className=\"ml-auto h-3.5 w-3.5\" />\n </DropdownMenuPrimitive.SubTrigger>\n));\nDropdownMenuSubTrigger.displayName = DropdownMenuPrimitive.SubTrigger.displayName;\n\nconst DropdownMenuSubContent = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.SubContent>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.SubContent>\n>(({ className, ...props }, ref) => (\n <DropdownMenuPrimitive.SubContent\n ref={ref}\n style={{\n backgroundColor: 'var(--blimu-popover)',\n }}\n className={cn(\n 'z-50 min-w-[8rem] overflow-hidden rounded-blimu border border-blimu-border text-blimu-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2',\n className,\n )}\n {...props}\n />\n));\nDropdownMenuSubContent.displayName = DropdownMenuPrimitive.SubContent.displayName;\n\nconst DropdownMenuContent = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.Content>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Content>\n>(({ className, sideOffset = 4, ...props }, ref) => (\n <DropdownMenuPrimitive.Portal>\n <DropdownMenuPrimitive.Content\n ref={ref}\n sideOffset={sideOffset}\n className={cn(\n 'z-50 min-w-[8rem] overflow-hidden rounded-blimu border border-blimu-border text-blimu-popover-foreground shadow-md p-1',\n 'data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2',\n className,\n )}\n {...props}\n />\n </DropdownMenuPrimitive.Portal>\n));\nDropdownMenuContent.displayName = DropdownMenuPrimitive.Content.displayName;\n\nconst DropdownMenuItem = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.Item>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Item> & {\n inset?: boolean;\n }\n>(({ className, inset, ...props }, ref) => (\n <DropdownMenuPrimitive.Item\n ref={ref}\n className={cn(\n 'relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 mx-1 text-sm text-blimu-muted-foreground outline-none transition-colors focus:bg-blimu-accent focus:text-blimu-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50',\n inset && 'pl-8',\n className,\n )}\n {...props}\n />\n));\nDropdownMenuItem.displayName = DropdownMenuPrimitive.Item.displayName;\n\nconst DropdownMenuCheckboxItem = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.CheckboxItem>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.CheckboxItem>\n>(({ className, children, checked, ...props }, ref) => (\n <DropdownMenuPrimitive.CheckboxItem\n ref={ref}\n className={cn(\n 'relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm text-blimu-muted-foreground outline-none transition-colors focus:bg-blimu-accent focus:text-blimu-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50',\n className,\n )}\n checked={checked}\n {...props}\n >\n <span className=\"absolute left-2 flex h-3.5 w-3.5 items-center justify-center\">\n <DropdownMenuPrimitive.ItemIndicator>\n <Check className=\"h-3.5 w-3.5\" />\n </DropdownMenuPrimitive.ItemIndicator>\n </span>\n {children}\n </DropdownMenuPrimitive.CheckboxItem>\n));\nDropdownMenuCheckboxItem.displayName = DropdownMenuPrimitive.CheckboxItem.displayName;\n\nconst DropdownMenuRadioItem = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.RadioItem>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.RadioItem>\n>(({ className, children, ...props }, ref) => (\n <DropdownMenuPrimitive.RadioItem\n ref={ref}\n className={cn(\n 'relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm text-blimu-muted-foreground outline-none transition-colors focus:bg-blimu-accent focus:text-blimu-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50',\n className,\n )}\n {...props}\n >\n <span className=\"absolute left-2 flex h-3.5 w-3.5 items-center justify-center\">\n <DropdownMenuPrimitive.ItemIndicator>\n <Circle className=\"h-2.5 w-2.5 fill-current\" />\n </DropdownMenuPrimitive.ItemIndicator>\n </span>\n {children}\n </DropdownMenuPrimitive.RadioItem>\n));\nDropdownMenuRadioItem.displayName = DropdownMenuPrimitive.RadioItem.displayName;\n\nconst DropdownMenuLabel = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.Label>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Label> & {\n inset?: boolean;\n }\n>(({ className, inset, ...props }, ref) => (\n <DropdownMenuPrimitive.Label\n ref={ref}\n className={cn('px-2 py-1.5 text-sm font-semibold', inset && 'pl-8', className)}\n {...props}\n />\n));\nDropdownMenuLabel.displayName = DropdownMenuPrimitive.Label.displayName;\n\nconst DropdownMenuSeparator = React.forwardRef<\n React.ElementRef<typeof DropdownMenuPrimitive.Separator>,\n React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Separator>\n>(({ className, ...props }, ref) => (\n <DropdownMenuPrimitive.Separator\n ref={ref}\n className={cn('-mx-1 my-1 h-px bg-blimu-border', className)}\n {...props}\n />\n));\nDropdownMenuSeparator.displayName = DropdownMenuPrimitive.Separator.displayName;\n\nconst DropdownMenuShortcut = ({ className, ...props }: React.HTMLAttributes<HTMLSpanElement>) => {\n return (\n <span className={cn('ml-auto text-xs tracking-widest opacity-60', className)} {...props} />\n );\n};\nDropdownMenuShortcut.displayName = 'DropdownMenuShortcut';\n\nexport {\n DropdownMenu,\n DropdownMenuTrigger,\n DropdownMenuContent,\n DropdownMenuItem,\n DropdownMenuCheckboxItem,\n DropdownMenuRadioItem,\n DropdownMenuLabel,\n DropdownMenuSeparator,\n DropdownMenuShortcut,\n DropdownMenuGroup,\n DropdownMenuPortal,\n DropdownMenuSub,\n DropdownMenuSubContent,\n DropdownMenuSubTrigger,\n DropdownMenuRadioGroup,\n};\n"],"names":["DropdownMenuPrimitive.Root","DropdownMenuPrimitive.Trigger","DropdownMenuPrimitive.SubTrigger","DropdownMenuPrimitive.SubContent","DropdownMenuPrimitive.Portal","DropdownMenuPrimitive.Content","DropdownMenuPrimitive.Item","DropdownMenuPrimitive.CheckboxItem","DropdownMenuPrimitive.ItemIndicator","DropdownMenuPrimitive.RadioItem","DropdownMenuPrimitive.Label","DropdownMenuPrimitive.Separator"],"mappings":"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"}
|
|
@@ -1,2 +1,23 @@
|
|
|
1
|
-
"use strict";
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const jsxRuntime = require("react/jsx-runtime");
|
|
4
|
+
require("react");
|
|
5
|
+
const avatar = require("./ui/avatar.cjs");
|
|
6
|
+
const utils = require("../lib/utils.cjs");
|
|
7
|
+
const variants = require("../lib/variants.cjs");
|
|
8
|
+
function UserAvatar({
|
|
9
|
+
src,
|
|
10
|
+
alt,
|
|
11
|
+
fallback,
|
|
12
|
+
size = "default",
|
|
13
|
+
className,
|
|
14
|
+
...props
|
|
15
|
+
}) {
|
|
16
|
+
const fallbackText = fallback || alt?.split(" ").map((n) => n[0]).join("").toUpperCase().slice(0, 2) || "U";
|
|
17
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(avatar.Avatar, { className: utils.cn(variants.avatarVariants({ size }), className), ...props, children: [
|
|
18
|
+
src && /* @__PURE__ */ jsxRuntime.jsx(avatar.AvatarImage, { src, alt }),
|
|
19
|
+
/* @__PURE__ */ jsxRuntime.jsx(avatar.AvatarFallback, { className: "bg-blimu-muted text-blimu-muted-foreground text-sm font-medium", children: fallbackText })
|
|
20
|
+
] });
|
|
21
|
+
}
|
|
22
|
+
exports.UserAvatar = UserAvatar;
|
|
2
23
|
//# sourceMappingURL=user-avatar.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"user-avatar.cjs","sources":["../../src/components/user-avatar.tsx"],"sourcesContent":["import * as React from 'react';\n\nimport { Avatar, AvatarFallback, AvatarImage } from './ui/avatar';\nimport { cn } from '../lib/utils';\nimport { avatarVariants, type AvatarVariants } from '../lib/variants';\n\nexport interface UserAvatarProps extends React.ComponentPropsWithoutRef<typeof Avatar> {\n /**\n * Image source URL\n */\n src?: string;\n\n /**\n * Alt text for the image\n */\n alt?: string;\n\n /**\n * Fallback text or initials to display when image is not available\n */\n fallback?: string;\n\n /**\n * Size variant\n * @default \"default\"\n */\n size?: AvatarVariants['size'];\n\n /**\n * Custom className\n */\n className?: string;\n}\n\n/**\n * UserAvatar component that displays a user's profile picture with fallback\n *\n * @example\n * ```tsx\n * <UserAvatar\n * src=\"/avatar.jpg\"\n * alt=\"John Doe\"\n * fallback=\"JD\"\n * size=\"lg\"\n * />\n * ```\n */\nexport function UserAvatar({\n src,\n alt,\n fallback,\n size = 'default',\n className,\n ...props\n}: UserAvatarProps) {\n const fallbackText =\n fallback ||\n alt\n ?.split(' ')\n .map((n) => n[0])\n .join('')\n .toUpperCase()\n .slice(0, 2) ||\n 'U';\n\n return (\n <Avatar className={cn(avatarVariants({ size }), className)} {...props}>\n {src && <AvatarImage src={src} alt={alt} />}\n <AvatarFallback className=\"bg-blimu-muted text-blimu-muted-foreground text-sm font-medium\">\n {fallbackText}\n </AvatarFallback>\n </Avatar>\n );\n}\n"],"names":["
|
|
1
|
+
{"version":3,"file":"user-avatar.cjs","sources":["../../src/components/user-avatar.tsx"],"sourcesContent":["import * as React from 'react';\n\nimport { Avatar, AvatarFallback, AvatarImage } from './ui/avatar';\nimport { cn } from '../lib/utils';\nimport { avatarVariants, type AvatarVariants } from '../lib/variants';\n\nexport interface UserAvatarProps extends React.ComponentPropsWithoutRef<typeof Avatar> {\n /**\n * Image source URL\n */\n src?: string;\n\n /**\n * Alt text for the image\n */\n alt?: string;\n\n /**\n * Fallback text or initials to display when image is not available\n */\n fallback?: string;\n\n /**\n * Size variant\n * @default \"default\"\n */\n size?: AvatarVariants['size'];\n\n /**\n * Custom className\n */\n className?: string;\n}\n\n/**\n * UserAvatar component that displays a user's profile picture with fallback\n *\n * @example\n * ```tsx\n * <UserAvatar\n * src=\"/avatar.jpg\"\n * alt=\"John Doe\"\n * fallback=\"JD\"\n * size=\"lg\"\n * />\n * ```\n */\nexport function UserAvatar({\n src,\n alt,\n fallback,\n size = 'default',\n className,\n ...props\n}: UserAvatarProps) {\n const fallbackText =\n fallback ||\n alt\n ?.split(' ')\n .map((n) => n[0])\n .join('')\n .toUpperCase()\n .slice(0, 2) ||\n 'U';\n\n return (\n <Avatar className={cn(avatarVariants({ size }), className)} {...props}>\n {src && <AvatarImage src={src} alt={alt} />}\n <AvatarFallback className=\"bg-blimu-muted text-blimu-muted-foreground text-sm font-medium\">\n {fallbackText}\n </AvatarFallback>\n </Avatar>\n );\n}\n"],"names":["jsxs","Avatar","cn","avatarVariants","jsx","AvatarImage","AvatarFallback"],"mappings":";;;;;;;AA+CO,SAAS,WAAW;AAAA,EACzB;AAAA,EACA;AAAA,EACA;AAAA,EACA,OAAO;AAAA,EACP;AAAA,EACA,GAAG;AACL,GAAoB;AAClB,QAAM,eACJ,YACA,KACI,MAAM,GAAG,EACV,IAAI,CAAC,MAAM,EAAE,CAAC,CAAC,EACf,KAAK,EAAE,EACP,cACA,MAAM,GAAG,CAAC,KACb;AAEF,SACEA,2BAAAA,KAACC,OAAAA,QAAA,EAAO,WAAWC,MAAAA,GAAGC,SAAAA,eAAe,EAAE,KAAA,CAAM,GAAG,SAAS,GAAI,GAAG,OAC7D,UAAA;AAAA,IAAA,OAAOC,2BAAAA,IAACC,OAAAA,aAAA,EAAY,KAAU,IAAA,CAAU;AAAA,IACzCD,2BAAAA,IAACE,OAAAA,gBAAA,EAAe,WAAU,kEACvB,UAAA,aAAA,CACH;AAAA,EAAA,GACF;AAEJ;;"}
|
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
import { jsxs
|
|
1
|
+
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
2
|
import "react";
|
|
3
|
-
import { Avatar
|
|
4
|
-
import { cn
|
|
5
|
-
import { avatarVariants
|
|
6
|
-
function
|
|
7
|
-
src
|
|
8
|
-
alt
|
|
9
|
-
fallback
|
|
10
|
-
size
|
|
11
|
-
className
|
|
12
|
-
...
|
|
3
|
+
import { Avatar, AvatarImage, AvatarFallback } from "./ui/avatar.js";
|
|
4
|
+
import { cn } from "../lib/utils.js";
|
|
5
|
+
import { avatarVariants } from "../lib/variants.js";
|
|
6
|
+
function UserAvatar({
|
|
7
|
+
src,
|
|
8
|
+
alt,
|
|
9
|
+
fallback,
|
|
10
|
+
size = "default",
|
|
11
|
+
className,
|
|
12
|
+
...props
|
|
13
13
|
}) {
|
|
14
|
-
const
|
|
15
|
-
return /* @__PURE__ */
|
|
16
|
-
|
|
17
|
-
/* @__PURE__ */
|
|
14
|
+
const fallbackText = fallback || alt?.split(" ").map((n) => n[0]).join("").toUpperCase().slice(0, 2) || "U";
|
|
15
|
+
return /* @__PURE__ */ jsxs(Avatar, { className: cn(avatarVariants({ size }), className), ...props, children: [
|
|
16
|
+
src && /* @__PURE__ */ jsx(AvatarImage, { src, alt }),
|
|
17
|
+
/* @__PURE__ */ jsx(AvatarFallback, { className: "bg-blimu-muted text-blimu-muted-foreground text-sm font-medium", children: fallbackText })
|
|
18
18
|
] });
|
|
19
19
|
}
|
|
20
20
|
export {
|
|
21
|
-
|
|
21
|
+
UserAvatar
|
|
22
22
|
};
|
|
23
23
|
//# sourceMappingURL=user-avatar.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"user-avatar.js","sources":["../../src/components/user-avatar.tsx"],"sourcesContent":["import * as React from 'react';\n\nimport { Avatar, AvatarFallback, AvatarImage } from './ui/avatar';\nimport { cn } from '../lib/utils';\nimport { avatarVariants, type AvatarVariants } from '../lib/variants';\n\nexport interface UserAvatarProps extends React.ComponentPropsWithoutRef<typeof Avatar> {\n /**\n * Image source URL\n */\n src?: string;\n\n /**\n * Alt text for the image\n */\n alt?: string;\n\n /**\n * Fallback text or initials to display when image is not available\n */\n fallback?: string;\n\n /**\n * Size variant\n * @default \"default\"\n */\n size?: AvatarVariants['size'];\n\n /**\n * Custom className\n */\n className?: string;\n}\n\n/**\n * UserAvatar component that displays a user's profile picture with fallback\n *\n * @example\n * ```tsx\n * <UserAvatar\n * src=\"/avatar.jpg\"\n * alt=\"John Doe\"\n * fallback=\"JD\"\n * size=\"lg\"\n * />\n * ```\n */\nexport function UserAvatar({\n src,\n alt,\n fallback,\n size = 'default',\n className,\n ...props\n}: UserAvatarProps) {\n const fallbackText =\n fallback ||\n alt\n ?.split(' ')\n .map((n) => n[0])\n .join('')\n .toUpperCase()\n .slice(0, 2) ||\n 'U';\n\n return (\n <Avatar className={cn(avatarVariants({ size }), className)} {...props}>\n {src && <AvatarImage src={src} alt={alt} />}\n <AvatarFallback className=\"bg-blimu-muted text-blimu-muted-foreground text-sm font-medium\">\n {fallbackText}\n </AvatarFallback>\n </Avatar>\n );\n}\n"],"names":[
|
|
1
|
+
{"version":3,"file":"user-avatar.js","sources":["../../src/components/user-avatar.tsx"],"sourcesContent":["import * as React from 'react';\n\nimport { Avatar, AvatarFallback, AvatarImage } from './ui/avatar';\nimport { cn } from '../lib/utils';\nimport { avatarVariants, type AvatarVariants } from '../lib/variants';\n\nexport interface UserAvatarProps extends React.ComponentPropsWithoutRef<typeof Avatar> {\n /**\n * Image source URL\n */\n src?: string;\n\n /**\n * Alt text for the image\n */\n alt?: string;\n\n /**\n * Fallback text or initials to display when image is not available\n */\n fallback?: string;\n\n /**\n * Size variant\n * @default \"default\"\n */\n size?: AvatarVariants['size'];\n\n /**\n * Custom className\n */\n className?: string;\n}\n\n/**\n * UserAvatar component that displays a user's profile picture with fallback\n *\n * @example\n * ```tsx\n * <UserAvatar\n * src=\"/avatar.jpg\"\n * alt=\"John Doe\"\n * fallback=\"JD\"\n * size=\"lg\"\n * />\n * ```\n */\nexport function UserAvatar({\n src,\n alt,\n fallback,\n size = 'default',\n className,\n ...props\n}: UserAvatarProps) {\n const fallbackText =\n fallback ||\n alt\n ?.split(' ')\n .map((n) => n[0])\n .join('')\n .toUpperCase()\n .slice(0, 2) ||\n 'U';\n\n return (\n <Avatar className={cn(avatarVariants({ size }), className)} {...props}>\n {src && <AvatarImage src={src} alt={alt} />}\n <AvatarFallback className=\"bg-blimu-muted text-blimu-muted-foreground text-sm font-medium\">\n {fallbackText}\n </AvatarFallback>\n </Avatar>\n );\n}\n"],"names":[],"mappings":";;;;;AA+CO,SAAS,WAAW;AAAA,EACzB;AAAA,EACA;AAAA,EACA;AAAA,EACA,OAAO;AAAA,EACP;AAAA,EACA,GAAG;AACL,GAAoB;AAClB,QAAM,eACJ,YACA,KACI,MAAM,GAAG,EACV,IAAI,CAAC,MAAM,EAAE,CAAC,CAAC,EACf,KAAK,EAAE,EACP,cACA,MAAM,GAAG,CAAC,KACb;AAEF,SACE,qBAAC,QAAA,EAAO,WAAW,GAAG,eAAe,EAAE,KAAA,CAAM,GAAG,SAAS,GAAI,GAAG,OAC7D,UAAA;AAAA,IAAA,OAAO,oBAAC,aAAA,EAAY,KAAU,IAAA,CAAU;AAAA,IACzC,oBAAC,gBAAA,EAAe,WAAU,kEACvB,UAAA,aAAA,CACH;AAAA,EAAA,GACF;AAEJ;"}
|
|
@@ -1,2 +1,40 @@
|
|
|
1
|
-
"use strict";
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const index = require("../../node_modules/class-variance-authority/dist/index.cjs");
|
|
4
|
+
const userButtonTriggerVariants = index.cva(
|
|
5
|
+
"inline-flex items-center justify-center rounded-full transition-colors outline-none focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-blimu-ring focus-visible:ring-offset-2 focus-visible:ring-offset-blimu-background disabled:pointer-events-none disabled:opacity-50 hover:opacity-80 text-blimu-foreground p-1",
|
|
6
|
+
{
|
|
7
|
+
variants: {
|
|
8
|
+
variant: {
|
|
9
|
+
default: "bg-transparent",
|
|
10
|
+
outline: "border border-blimu-input bg-blimu-background",
|
|
11
|
+
ghost: "hover:bg-blimu-accent hover:text-blimu-accent-foreground"
|
|
12
|
+
},
|
|
13
|
+
size: {
|
|
14
|
+
default: "h-10 min-w-[2.5rem]",
|
|
15
|
+
sm: "h-8 min-w-[2rem]",
|
|
16
|
+
lg: "h-12 min-w-[3rem]"
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
defaultVariants: {
|
|
20
|
+
variant: "default",
|
|
21
|
+
size: "default"
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
);
|
|
25
|
+
const userButtonContentVariants = index.cva(
|
|
26
|
+
"z-50 min-w-[260px] overflow-hidden rounded-blimu border border-blimu-border bg-blimu-popover text-blimu-popover-foreground shadow-md",
|
|
27
|
+
{
|
|
28
|
+
variants: {
|
|
29
|
+
variant: {
|
|
30
|
+
default: ""
|
|
31
|
+
}
|
|
32
|
+
},
|
|
33
|
+
defaultVariants: {
|
|
34
|
+
variant: "default"
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
);
|
|
38
|
+
exports.userButtonContentVariants = userButtonContentVariants;
|
|
39
|
+
exports.userButtonTriggerVariants = userButtonTriggerVariants;
|
|
2
40
|
//# sourceMappingURL=styles.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"styles.cjs","sources":["../../../src/components/user-button/styles.ts"],"sourcesContent":["import { cva, type VariantProps } from 'class-variance-authority';\n\n/**\n * UserButton trigger variant styles\n */\nexport const userButtonTriggerVariants = cva(\n 'inline-flex items-center justify-center rounded-full transition-colors outline-none focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-blimu-ring focus-visible:ring-offset-2 focus-visible:ring-offset-blimu-background disabled:pointer-events-none disabled:opacity-50 hover:opacity-80 text-blimu-foreground p-1',\n {\n variants: {\n variant: {\n default: 'bg-transparent',\n outline: 'border border-blimu-input bg-blimu-background',\n ghost: 'hover:bg-blimu-accent hover:text-blimu-accent-foreground',\n },\n size: {\n default: 'h-10 min-w-[2.5rem]',\n sm: 'h-8 min-w-[2rem]',\n lg: 'h-12 min-w-[3rem]',\n },\n },\n defaultVariants: {\n variant: 'default',\n size: 'default',\n },\n },\n);\n\nexport type UserButtonTriggerVariants = VariantProps<typeof userButtonTriggerVariants>;\n\n/**\n * UserButton dropdown content styles\n */\nexport const userButtonContentVariants = cva(\n 'z-50 min-w-[260px] overflow-hidden rounded-blimu border border-blimu-border bg-blimu-popover text-blimu-popover-foreground shadow-md',\n {\n variants: {\n variant: {\n default: '',\n },\n },\n defaultVariants: {\n variant: 'default',\n },\n },\n);\n\nexport type UserButtonContentVariants = VariantProps<typeof userButtonContentVariants>;\n"],"names":["
|
|
1
|
+
{"version":3,"file":"styles.cjs","sources":["../../../src/components/user-button/styles.ts"],"sourcesContent":["import { cva, type VariantProps } from 'class-variance-authority';\n\n/**\n * UserButton trigger variant styles\n */\nexport const userButtonTriggerVariants = cva(\n 'inline-flex items-center justify-center rounded-full transition-colors outline-none focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-blimu-ring focus-visible:ring-offset-2 focus-visible:ring-offset-blimu-background disabled:pointer-events-none disabled:opacity-50 hover:opacity-80 text-blimu-foreground p-1',\n {\n variants: {\n variant: {\n default: 'bg-transparent',\n outline: 'border border-blimu-input bg-blimu-background',\n ghost: 'hover:bg-blimu-accent hover:text-blimu-accent-foreground',\n },\n size: {\n default: 'h-10 min-w-[2.5rem]',\n sm: 'h-8 min-w-[2rem]',\n lg: 'h-12 min-w-[3rem]',\n },\n },\n defaultVariants: {\n variant: 'default',\n size: 'default',\n },\n },\n);\n\nexport type UserButtonTriggerVariants = VariantProps<typeof userButtonTriggerVariants>;\n\n/**\n * UserButton dropdown content styles\n */\nexport const userButtonContentVariants = cva(\n 'z-50 min-w-[260px] overflow-hidden rounded-blimu border border-blimu-border bg-blimu-popover text-blimu-popover-foreground shadow-md',\n {\n variants: {\n variant: {\n default: '',\n },\n },\n defaultVariants: {\n variant: 'default',\n },\n },\n);\n\nexport type UserButtonContentVariants = VariantProps<typeof userButtonContentVariants>;\n"],"names":["cva"],"mappings":";;;AAKO,MAAM,4BAA4BA,MAAAA;AAAAA,EACvC;AAAA,EACA;AAAA,IACE,UAAU;AAAA,MACR,SAAS;AAAA,QACP,SAAS;AAAA,QACT,SAAS;AAAA,QACT,OAAO;AAAA,MAAA;AAAA,MAET,MAAM;AAAA,QACJ,SAAS;AAAA,QACT,IAAI;AAAA,QACJ,IAAI;AAAA,MAAA;AAAA,IACN;AAAA,IAEF,iBAAiB;AAAA,MACf,SAAS;AAAA,MACT,MAAM;AAAA,IAAA;AAAA,EACR;AAEJ;AAOO,MAAM,4BAA4BA,MAAAA;AAAAA,EACvC;AAAA,EACA;AAAA,IACE,UAAU;AAAA,MACR,SAAS;AAAA,QACP,SAAS;AAAA,MAAA;AAAA,IACX;AAAA,IAEF,iBAAiB;AAAA,MACf,SAAS;AAAA,IAAA;AAAA,EACX;AAEJ;;;"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { cva
|
|
2
|
-
const
|
|
1
|
+
import { cva } from "../../node_modules/class-variance-authority/dist/index.js";
|
|
2
|
+
const userButtonTriggerVariants = cva(
|
|
3
3
|
"inline-flex items-center justify-center rounded-full transition-colors outline-none focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-blimu-ring focus-visible:ring-offset-2 focus-visible:ring-offset-blimu-background disabled:pointer-events-none disabled:opacity-50 hover:opacity-80 text-blimu-foreground p-1",
|
|
4
4
|
{
|
|
5
5
|
variants: {
|
|
@@ -19,7 +19,8 @@ const r = e(
|
|
|
19
19
|
size: "default"
|
|
20
20
|
}
|
|
21
21
|
}
|
|
22
|
-
)
|
|
22
|
+
);
|
|
23
|
+
const userButtonContentVariants = cva(
|
|
23
24
|
"z-50 min-w-[260px] overflow-hidden rounded-blimu border border-blimu-border bg-blimu-popover text-blimu-popover-foreground shadow-md",
|
|
24
25
|
{
|
|
25
26
|
variants: {
|
|
@@ -33,7 +34,7 @@ const r = e(
|
|
|
33
34
|
}
|
|
34
35
|
);
|
|
35
36
|
export {
|
|
36
|
-
|
|
37
|
-
|
|
37
|
+
userButtonContentVariants,
|
|
38
|
+
userButtonTriggerVariants
|
|
38
39
|
};
|
|
39
40
|
//# sourceMappingURL=styles.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"styles.js","sources":["../../../src/components/user-button/styles.ts"],"sourcesContent":["import { cva, type VariantProps } from 'class-variance-authority';\n\n/**\n * UserButton trigger variant styles\n */\nexport const userButtonTriggerVariants = cva(\n 'inline-flex items-center justify-center rounded-full transition-colors outline-none focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-blimu-ring focus-visible:ring-offset-2 focus-visible:ring-offset-blimu-background disabled:pointer-events-none disabled:opacity-50 hover:opacity-80 text-blimu-foreground p-1',\n {\n variants: {\n variant: {\n default: 'bg-transparent',\n outline: 'border border-blimu-input bg-blimu-background',\n ghost: 'hover:bg-blimu-accent hover:text-blimu-accent-foreground',\n },\n size: {\n default: 'h-10 min-w-[2.5rem]',\n sm: 'h-8 min-w-[2rem]',\n lg: 'h-12 min-w-[3rem]',\n },\n },\n defaultVariants: {\n variant: 'default',\n size: 'default',\n },\n },\n);\n\nexport type UserButtonTriggerVariants = VariantProps<typeof userButtonTriggerVariants>;\n\n/**\n * UserButton dropdown content styles\n */\nexport const userButtonContentVariants = cva(\n 'z-50 min-w-[260px] overflow-hidden rounded-blimu border border-blimu-border bg-blimu-popover text-blimu-popover-foreground shadow-md',\n {\n variants: {\n variant: {\n default: '',\n },\n },\n defaultVariants: {\n variant: 'default',\n },\n },\n);\n\nexport type UserButtonContentVariants = VariantProps<typeof userButtonContentVariants>;\n"],"names":[
|
|
1
|
+
{"version":3,"file":"styles.js","sources":["../../../src/components/user-button/styles.ts"],"sourcesContent":["import { cva, type VariantProps } from 'class-variance-authority';\n\n/**\n * UserButton trigger variant styles\n */\nexport const userButtonTriggerVariants = cva(\n 'inline-flex items-center justify-center rounded-full transition-colors outline-none focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-blimu-ring focus-visible:ring-offset-2 focus-visible:ring-offset-blimu-background disabled:pointer-events-none disabled:opacity-50 hover:opacity-80 text-blimu-foreground p-1',\n {\n variants: {\n variant: {\n default: 'bg-transparent',\n outline: 'border border-blimu-input bg-blimu-background',\n ghost: 'hover:bg-blimu-accent hover:text-blimu-accent-foreground',\n },\n size: {\n default: 'h-10 min-w-[2.5rem]',\n sm: 'h-8 min-w-[2rem]',\n lg: 'h-12 min-w-[3rem]',\n },\n },\n defaultVariants: {\n variant: 'default',\n size: 'default',\n },\n },\n);\n\nexport type UserButtonTriggerVariants = VariantProps<typeof userButtonTriggerVariants>;\n\n/**\n * UserButton dropdown content styles\n */\nexport const userButtonContentVariants = cva(\n 'z-50 min-w-[260px] overflow-hidden rounded-blimu border border-blimu-border bg-blimu-popover text-blimu-popover-foreground shadow-md',\n {\n variants: {\n variant: {\n default: '',\n },\n },\n defaultVariants: {\n variant: 'default',\n },\n },\n);\n\nexport type UserButtonContentVariants = VariantProps<typeof userButtonContentVariants>;\n"],"names":[],"mappings":";AAKO,MAAM,4BAA4B;AAAA,EACvC;AAAA,EACA;AAAA,IACE,UAAU;AAAA,MACR,SAAS;AAAA,QACP,SAAS;AAAA,QACT,SAAS;AAAA,QACT,OAAO;AAAA,MAAA;AAAA,MAET,MAAM;AAAA,QACJ,SAAS;AAAA,QACT,IAAI;AAAA,QACJ,IAAI;AAAA,MAAA;AAAA,IACN;AAAA,IAEF,iBAAiB;AAAA,MACf,SAAS;AAAA,MACT,MAAM;AAAA,IAAA;AAAA,EACR;AAEJ;AAOO,MAAM,4BAA4B;AAAA,EACvC;AAAA,EACA;AAAA,IACE,UAAU;AAAA,MACR,SAAS;AAAA,QACP,SAAS;AAAA,MAAA;AAAA,IACX;AAAA,IAEF,iBAAiB;AAAA,MACf,SAAS;AAAA,IAAA;AAAA,EACX;AAEJ;"}
|
|
@@ -1,2 +1,99 @@
|
|
|
1
|
-
"use strict";
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const jsxRuntime = require("react/jsx-runtime");
|
|
4
|
+
require("react");
|
|
5
|
+
const avatar = require("../ui/avatar.cjs");
|
|
6
|
+
const dropdownMenu = require("../ui/dropdown-menu.cjs");
|
|
7
|
+
const utils = require("../../lib/utils.cjs");
|
|
8
|
+
const useAuth = require("../../hooks/use-auth.cjs");
|
|
9
|
+
const styles = require("./styles.cjs");
|
|
10
|
+
const logOut = require("../../node_modules/lucide-react/dist/esm/icons/log-out.cjs");
|
|
11
|
+
function UserButton({
|
|
12
|
+
className,
|
|
13
|
+
classes,
|
|
14
|
+
onManageAccount,
|
|
15
|
+
variant,
|
|
16
|
+
size,
|
|
17
|
+
showNameInTrigger = false,
|
|
18
|
+
showEmailInTrigger = false,
|
|
19
|
+
avatarPos = "start"
|
|
20
|
+
} = {}) {
|
|
21
|
+
const { logout } = useAuth.useAuth();
|
|
22
|
+
const { user } = useAuth.useUser();
|
|
23
|
+
const displayName = user?.firstName && user?.lastName ? `${user.firstName} ${user.lastName}` : user?.firstName || user?.email?.split("@")[0] || "User";
|
|
24
|
+
const initials = displayName?.split(" ").map((n) => n[0]).join("").toUpperCase().slice(0, 2) || "U";
|
|
25
|
+
if (!user) {
|
|
26
|
+
return null;
|
|
27
|
+
}
|
|
28
|
+
const showText = showNameInTrigger || showEmailInTrigger;
|
|
29
|
+
const avatarElement = /* @__PURE__ */ jsxRuntime.jsx(avatar.Avatar, { className: utils.cn("w-8 h-8", classes?.avatar), children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
30
|
+
avatar.AvatarFallback,
|
|
31
|
+
{
|
|
32
|
+
className: utils.cn(
|
|
33
|
+
"bg-blimu-muted text-blimu-muted-foreground text-sm font-medium",
|
|
34
|
+
classes?.avatarFallback
|
|
35
|
+
),
|
|
36
|
+
children: initials
|
|
37
|
+
}
|
|
38
|
+
) });
|
|
39
|
+
const textElement = showText && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: utils.cn("flex flex-col items-start", classes?.userInfo), children: [
|
|
40
|
+
showNameInTrigger && /* @__PURE__ */ jsxRuntime.jsx("span", { className: utils.cn("text-sm leading-tight font-medium", classes?.userName), children: displayName }),
|
|
41
|
+
showEmailInTrigger && /* @__PURE__ */ jsxRuntime.jsx("span", { className: utils.cn("text-xs leading-tight opacity-70", classes?.userEmail), children: user.email })
|
|
42
|
+
] });
|
|
43
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(dropdownMenu.DropdownMenu, { children: [
|
|
44
|
+
/* @__PURE__ */ jsxRuntime.jsx(dropdownMenu.DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
45
|
+
"button",
|
|
46
|
+
{
|
|
47
|
+
className: utils.cn(
|
|
48
|
+
styles.userButtonTriggerVariants({ variant, size }),
|
|
49
|
+
"flex items-center gap-2",
|
|
50
|
+
className,
|
|
51
|
+
classes?.trigger
|
|
52
|
+
),
|
|
53
|
+
children: avatarPos === "start" ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
54
|
+
avatarElement,
|
|
55
|
+
textElement
|
|
56
|
+
] }) : /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
57
|
+
textElement,
|
|
58
|
+
avatarElement
|
|
59
|
+
] })
|
|
60
|
+
}
|
|
61
|
+
) }),
|
|
62
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
63
|
+
dropdownMenu.DropdownMenuContent,
|
|
64
|
+
{
|
|
65
|
+
className: utils.cn(styles.userButtonContentVariants(), "w-64 p-0", classes?.popover),
|
|
66
|
+
align: "end",
|
|
67
|
+
sideOffset: 8,
|
|
68
|
+
children: [
|
|
69
|
+
/* @__PURE__ */ jsxRuntime.jsx(dropdownMenu.DropdownMenuLabel, { className: "p-0 ", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-3 p-4", children: [
|
|
70
|
+
/* @__PURE__ */ jsxRuntime.jsx(avatar.Avatar, { className: "size-10", children: /* @__PURE__ */ jsxRuntime.jsx(avatar.AvatarFallback, { className: "bg-blimu-primary text-blimu-primary-foreground text-base font-medium", children: initials }) }),
|
|
71
|
+
displayName && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col", children: [
|
|
72
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm font-medium text-blimu-foreground", children: displayName }),
|
|
73
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-xs text-blimu-muted-foreground", children: user.email })
|
|
74
|
+
] })
|
|
75
|
+
] }) }),
|
|
76
|
+
/* @__PURE__ */ jsxRuntime.jsx(dropdownMenu.DropdownMenuSeparator, { className: "m-0" }),
|
|
77
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "py-1.5 space-y-2", children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
78
|
+
dropdownMenu.DropdownMenuItem,
|
|
79
|
+
{
|
|
80
|
+
onClick: logout,
|
|
81
|
+
className: utils.cn("flex items-center gap-3 text-sm cursor-pointer", classes?.signOutButton),
|
|
82
|
+
children: [
|
|
83
|
+
/* @__PURE__ */ jsxRuntime.jsx(logOut.default, { className: "w-4 h-4 text-blimu-muted-foreground" }),
|
|
84
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { children: "Sign out" })
|
|
85
|
+
]
|
|
86
|
+
}
|
|
87
|
+
) }),
|
|
88
|
+
/* @__PURE__ */ jsxRuntime.jsx(dropdownMenu.DropdownMenuSeparator, { className: "m-0" }),
|
|
89
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "p-4 bg-blimu-muted/50", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex justify-center items-center gap-2 text-xs text-blimu-muted-foreground", children: [
|
|
90
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { children: "Secured by" }),
|
|
91
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "font-semibold text-blimu-foreground", children: "Blimu" })
|
|
92
|
+
] }) })
|
|
93
|
+
]
|
|
94
|
+
}
|
|
95
|
+
)
|
|
96
|
+
] });
|
|
97
|
+
}
|
|
98
|
+
exports.UserButton = UserButton;
|
|
2
99
|
//# sourceMappingURL=user-button.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"user-button.cjs","sources":["../../../src/components/user-button/user-button.tsx"],"sourcesContent":["import React from 'react';\nimport { Avatar, AvatarFallback } from '@/components/ui/avatar';\nimport {\n DropdownMenu,\n DropdownMenuContent,\n DropdownMenuItem,\n DropdownMenuLabel,\n DropdownMenuSeparator,\n DropdownMenuTrigger,\n} from '@/components/ui/dropdown-menu';\nimport { cn } from '@/lib/utils';\nimport { LogOut, Settings } from 'lucide-react';\n\nimport { useAuth, useUser } from '../../hooks/use-auth';\nimport type { BlimuComponentProps } from '../../types';\nimport {\n userButtonTriggerVariants,\n userButtonContentVariants,\n type UserButtonTriggerVariants,\n} from './styles';\n\nexport interface UserButtonProps extends BlimuComponentProps, UserButtonTriggerVariants {\n /** Callback when user clicks \"Manage account\" */\n onManageAccount?: () => void;\n /** Show user name in trigger button */\n showNameInTrigger?: boolean;\n /** Show user email in trigger button */\n showEmailInTrigger?: boolean;\n /** Avatar position when text is shown in trigger */\n avatarPos?: 'start' | 'end';\n}\n\nexport function UserButton({\n className,\n classes,\n onManageAccount,\n variant,\n size,\n showNameInTrigger = false,\n showEmailInTrigger = false,\n avatarPos = 'start',\n}: UserButtonProps = {}) {\n const { logout } = useAuth();\n const { user } = useUser();\n\n const displayName =\n user?.firstName && user?.lastName\n ? `${user.firstName} ${user.lastName}`\n : user?.firstName || user?.email?.split('@')[0] || 'User';\n\n const initials =\n displayName\n ?.split(' ')\n .map((n) => n[0])\n .join('')\n .toUpperCase()\n .slice(0, 2) || 'U';\n\n if (!user) {\n return null;\n }\n\n const showText = showNameInTrigger || showEmailInTrigger;\n\n const avatarElement = (\n <Avatar className={cn('w-8 h-8', classes?.avatar)}>\n <AvatarFallback\n className={cn(\n 'bg-blimu-muted text-blimu-muted-foreground text-sm font-medium',\n classes?.avatarFallback,\n )}\n >\n {initials}\n </AvatarFallback>\n </Avatar>\n );\n\n const textElement = showText && (\n <div className={cn('flex flex-col items-start', classes?.userInfo)}>\n {showNameInTrigger && (\n <span className={cn('text-sm leading-tight font-medium', classes?.userName)}>\n {displayName}\n </span>\n )}\n {showEmailInTrigger && (\n <span className={cn('text-xs leading-tight opacity-70', classes?.userEmail)}>\n {user.email}\n </span>\n )}\n </div>\n );\n\n return (\n <DropdownMenu>\n <DropdownMenuTrigger asChild>\n <button\n className={cn(\n userButtonTriggerVariants({ variant, size }),\n 'flex items-center gap-2',\n className,\n classes?.trigger,\n )}\n >\n {avatarPos === 'start' ? (\n <>\n {avatarElement}\n {textElement}\n </>\n ) : (\n <>\n {textElement}\n {avatarElement}\n </>\n )}\n </button>\n </DropdownMenuTrigger>\n <DropdownMenuContent\n className={cn(userButtonContentVariants(), 'w-64 p-0', classes?.popover)}\n align=\"end\"\n sideOffset={8}\n >\n <DropdownMenuLabel className=\"p-0 \">\n <div className=\"flex items-center gap-3 p-4\">\n <Avatar className=\"size-10\">\n <AvatarFallback className=\"bg-blimu-primary text-blimu-primary-foreground text-base font-medium\">\n {initials}\n </AvatarFallback>\n </Avatar>\n {displayName && (\n <div className=\"flex flex-col\">\n <span className=\"text-sm font-medium text-blimu-foreground\">{displayName}</span>\n <span className=\"text-xs text-blimu-muted-foreground\">{user.email}</span>\n </div>\n )}\n </div>\n </DropdownMenuLabel>\n\n <DropdownMenuSeparator className=\"m-0\" />\n <div className=\"py-1.5 space-y-2\">\n {/* <DropdownMenuItem\n onClick={onManageAccount}\n className={cn(\n 'flex items-center gap-3 text-sm cursor-pointer',\n classes?.manageAccountButton,\n )}\n >\n <Settings className=\"size-4 text-blimu-muted-foreground\" />\n <span>Manage account</span>\n </DropdownMenuItem> */}\n\n <DropdownMenuItem\n onClick={logout}\n className={cn('flex items-center gap-3 text-sm cursor-pointer', classes?.signOutButton)}\n >\n <LogOut className=\"w-4 h-4 text-blimu-muted-foreground\" />\n <span>Sign out</span>\n </DropdownMenuItem>\n </div>\n\n <DropdownMenuSeparator className=\"m-0\" />\n\n <div className=\"p-4 bg-blimu-muted/50\">\n <div className=\"flex justify-center items-center gap-2 text-xs text-blimu-muted-foreground\">\n <span>Secured by</span>\n <span className=\"font-semibold text-blimu-foreground\">Blimu</span>\n </div>\n </div>\n </DropdownMenuContent>\n </DropdownMenu>\n );\n}\n"],"names":["
|
|
1
|
+
{"version":3,"file":"user-button.cjs","sources":["../../../src/components/user-button/user-button.tsx"],"sourcesContent":["import React from 'react';\nimport { Avatar, AvatarFallback } from '@/components/ui/avatar';\nimport {\n DropdownMenu,\n DropdownMenuContent,\n DropdownMenuItem,\n DropdownMenuLabel,\n DropdownMenuSeparator,\n DropdownMenuTrigger,\n} from '@/components/ui/dropdown-menu';\nimport { cn } from '@/lib/utils';\nimport { LogOut, Settings } from 'lucide-react';\n\nimport { useAuth, useUser } from '../../hooks/use-auth';\nimport type { BlimuComponentProps } from '../../types';\nimport {\n userButtonTriggerVariants,\n userButtonContentVariants,\n type UserButtonTriggerVariants,\n} from './styles';\n\nexport interface UserButtonProps extends BlimuComponentProps, UserButtonTriggerVariants {\n /** Callback when user clicks \"Manage account\" */\n onManageAccount?: () => void;\n /** Show user name in trigger button */\n showNameInTrigger?: boolean;\n /** Show user email in trigger button */\n showEmailInTrigger?: boolean;\n /** Avatar position when text is shown in trigger */\n avatarPos?: 'start' | 'end';\n}\n\nexport function UserButton({\n className,\n classes,\n onManageAccount,\n variant,\n size,\n showNameInTrigger = false,\n showEmailInTrigger = false,\n avatarPos = 'start',\n}: UserButtonProps = {}) {\n const { logout } = useAuth();\n const { user } = useUser();\n\n const displayName =\n user?.firstName && user?.lastName\n ? `${user.firstName} ${user.lastName}`\n : user?.firstName || user?.email?.split('@')[0] || 'User';\n\n const initials =\n displayName\n ?.split(' ')\n .map((n) => n[0])\n .join('')\n .toUpperCase()\n .slice(0, 2) || 'U';\n\n if (!user) {\n return null;\n }\n\n const showText = showNameInTrigger || showEmailInTrigger;\n\n const avatarElement = (\n <Avatar className={cn('w-8 h-8', classes?.avatar)}>\n <AvatarFallback\n className={cn(\n 'bg-blimu-muted text-blimu-muted-foreground text-sm font-medium',\n classes?.avatarFallback,\n )}\n >\n {initials}\n </AvatarFallback>\n </Avatar>\n );\n\n const textElement = showText && (\n <div className={cn('flex flex-col items-start', classes?.userInfo)}>\n {showNameInTrigger && (\n <span className={cn('text-sm leading-tight font-medium', classes?.userName)}>\n {displayName}\n </span>\n )}\n {showEmailInTrigger && (\n <span className={cn('text-xs leading-tight opacity-70', classes?.userEmail)}>\n {user.email}\n </span>\n )}\n </div>\n );\n\n return (\n <DropdownMenu>\n <DropdownMenuTrigger asChild>\n <button\n className={cn(\n userButtonTriggerVariants({ variant, size }),\n 'flex items-center gap-2',\n className,\n classes?.trigger,\n )}\n >\n {avatarPos === 'start' ? (\n <>\n {avatarElement}\n {textElement}\n </>\n ) : (\n <>\n {textElement}\n {avatarElement}\n </>\n )}\n </button>\n </DropdownMenuTrigger>\n <DropdownMenuContent\n className={cn(userButtonContentVariants(), 'w-64 p-0', classes?.popover)}\n align=\"end\"\n sideOffset={8}\n >\n <DropdownMenuLabel className=\"p-0 \">\n <div className=\"flex items-center gap-3 p-4\">\n <Avatar className=\"size-10\">\n <AvatarFallback className=\"bg-blimu-primary text-blimu-primary-foreground text-base font-medium\">\n {initials}\n </AvatarFallback>\n </Avatar>\n {displayName && (\n <div className=\"flex flex-col\">\n <span className=\"text-sm font-medium text-blimu-foreground\">{displayName}</span>\n <span className=\"text-xs text-blimu-muted-foreground\">{user.email}</span>\n </div>\n )}\n </div>\n </DropdownMenuLabel>\n\n <DropdownMenuSeparator className=\"m-0\" />\n <div className=\"py-1.5 space-y-2\">\n {/* <DropdownMenuItem\n onClick={onManageAccount}\n className={cn(\n 'flex items-center gap-3 text-sm cursor-pointer',\n classes?.manageAccountButton,\n )}\n >\n <Settings className=\"size-4 text-blimu-muted-foreground\" />\n <span>Manage account</span>\n </DropdownMenuItem> */}\n\n <DropdownMenuItem\n onClick={logout}\n className={cn('flex items-center gap-3 text-sm cursor-pointer', classes?.signOutButton)}\n >\n <LogOut className=\"w-4 h-4 text-blimu-muted-foreground\" />\n <span>Sign out</span>\n </DropdownMenuItem>\n </div>\n\n <DropdownMenuSeparator className=\"m-0\" />\n\n <div className=\"p-4 bg-blimu-muted/50\">\n <div className=\"flex justify-center items-center gap-2 text-xs text-blimu-muted-foreground\">\n <span>Secured by</span>\n <span className=\"font-semibold text-blimu-foreground\">Blimu</span>\n </div>\n </div>\n </DropdownMenuContent>\n </DropdownMenu>\n );\n}\n"],"names":["useAuth","useUser","Avatar","cn","jsx","AvatarFallback","jsxs","DropdownMenu","DropdownMenuTrigger","userButtonTriggerVariants","Fragment","DropdownMenuContent","userButtonContentVariants","DropdownMenuLabel","DropdownMenuSeparator","DropdownMenuItem","LogOut"],"mappings":"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"}
|
|
@@ -1,86 +1,92 @@
|
|
|
1
|
-
import { jsx
|
|
1
|
+
import { jsx, jsxs, Fragment } from "react/jsx-runtime";
|
|
2
2
|
import "react";
|
|
3
|
-
import { Avatar
|
|
4
|
-
import { DropdownMenu
|
|
5
|
-
import { cn
|
|
6
|
-
import { useAuth
|
|
7
|
-
import { userButtonTriggerVariants
|
|
8
|
-
import
|
|
9
|
-
function
|
|
10
|
-
className
|
|
11
|
-
classes
|
|
12
|
-
onManageAccount
|
|
13
|
-
variant
|
|
14
|
-
size
|
|
15
|
-
showNameInTrigger
|
|
16
|
-
showEmailInTrigger
|
|
17
|
-
avatarPos
|
|
3
|
+
import { Avatar, AvatarFallback } from "../ui/avatar.js";
|
|
4
|
+
import { DropdownMenu, DropdownMenuTrigger, DropdownMenuContent, DropdownMenuLabel, DropdownMenuSeparator, DropdownMenuItem } from "../ui/dropdown-menu.js";
|
|
5
|
+
import { cn } from "../../lib/utils.js";
|
|
6
|
+
import { useAuth, useUser } from "../../hooks/use-auth.js";
|
|
7
|
+
import { userButtonTriggerVariants, userButtonContentVariants } from "./styles.js";
|
|
8
|
+
import LogOut from "../../node_modules/lucide-react/dist/esm/icons/log-out.js";
|
|
9
|
+
function UserButton({
|
|
10
|
+
className,
|
|
11
|
+
classes,
|
|
12
|
+
onManageAccount,
|
|
13
|
+
variant,
|
|
14
|
+
size,
|
|
15
|
+
showNameInTrigger = false,
|
|
16
|
+
showEmailInTrigger = false,
|
|
17
|
+
avatarPos = "start"
|
|
18
18
|
} = {}) {
|
|
19
|
-
const { logout
|
|
20
|
-
|
|
19
|
+
const { logout } = useAuth();
|
|
20
|
+
const { user } = useUser();
|
|
21
|
+
const displayName = user?.firstName && user?.lastName ? `${user.firstName} ${user.lastName}` : user?.firstName || user?.email?.split("@")[0] || "User";
|
|
22
|
+
const initials = displayName?.split(" ").map((n) => n[0]).join("").toUpperCase().slice(0, 2) || "U";
|
|
23
|
+
if (!user) {
|
|
21
24
|
return null;
|
|
22
|
-
|
|
23
|
-
|
|
25
|
+
}
|
|
26
|
+
const showText = showNameInTrigger || showEmailInTrigger;
|
|
27
|
+
const avatarElement = /* @__PURE__ */ jsx(Avatar, { className: cn("w-8 h-8", classes?.avatar), children: /* @__PURE__ */ jsx(
|
|
28
|
+
AvatarFallback,
|
|
24
29
|
{
|
|
25
|
-
className:
|
|
30
|
+
className: cn(
|
|
26
31
|
"bg-blimu-muted text-blimu-muted-foreground text-sm font-medium",
|
|
27
|
-
|
|
32
|
+
classes?.avatarFallback
|
|
28
33
|
),
|
|
29
|
-
children:
|
|
34
|
+
children: initials
|
|
30
35
|
}
|
|
31
|
-
) })
|
|
32
|
-
|
|
33
|
-
|
|
36
|
+
) });
|
|
37
|
+
const textElement = showText && /* @__PURE__ */ jsxs("div", { className: cn("flex flex-col items-start", classes?.userInfo), children: [
|
|
38
|
+
showNameInTrigger && /* @__PURE__ */ jsx("span", { className: cn("text-sm leading-tight font-medium", classes?.userName), children: displayName }),
|
|
39
|
+
showEmailInTrigger && /* @__PURE__ */ jsx("span", { className: cn("text-xs leading-tight opacity-70", classes?.userEmail), children: user.email })
|
|
34
40
|
] });
|
|
35
|
-
return /* @__PURE__ */
|
|
36
|
-
/* @__PURE__ */
|
|
41
|
+
return /* @__PURE__ */ jsxs(DropdownMenu, { children: [
|
|
42
|
+
/* @__PURE__ */ jsx(DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ jsx(
|
|
37
43
|
"button",
|
|
38
44
|
{
|
|
39
|
-
className:
|
|
40
|
-
|
|
45
|
+
className: cn(
|
|
46
|
+
userButtonTriggerVariants({ variant, size }),
|
|
41
47
|
"flex items-center gap-2",
|
|
42
|
-
|
|
43
|
-
|
|
48
|
+
className,
|
|
49
|
+
classes?.trigger
|
|
44
50
|
),
|
|
45
|
-
children:
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
] }) : /* @__PURE__ */
|
|
49
|
-
|
|
50
|
-
|
|
51
|
+
children: avatarPos === "start" ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
52
|
+
avatarElement,
|
|
53
|
+
textElement
|
|
54
|
+
] }) : /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
55
|
+
textElement,
|
|
56
|
+
avatarElement
|
|
51
57
|
] })
|
|
52
58
|
}
|
|
53
59
|
) }),
|
|
54
|
-
/* @__PURE__ */
|
|
55
|
-
|
|
60
|
+
/* @__PURE__ */ jsxs(
|
|
61
|
+
DropdownMenuContent,
|
|
56
62
|
{
|
|
57
|
-
className:
|
|
63
|
+
className: cn(userButtonContentVariants(), "w-64 p-0", classes?.popover),
|
|
58
64
|
align: "end",
|
|
59
65
|
sideOffset: 8,
|
|
60
66
|
children: [
|
|
61
|
-
/* @__PURE__ */
|
|
62
|
-
/* @__PURE__ */
|
|
63
|
-
|
|
64
|
-
/* @__PURE__ */
|
|
65
|
-
/* @__PURE__ */
|
|
67
|
+
/* @__PURE__ */ jsx(DropdownMenuLabel, { className: "p-0 ", children: /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-3 p-4", children: [
|
|
68
|
+
/* @__PURE__ */ jsx(Avatar, { className: "size-10", children: /* @__PURE__ */ jsx(AvatarFallback, { className: "bg-blimu-primary text-blimu-primary-foreground text-base font-medium", children: initials }) }),
|
|
69
|
+
displayName && /* @__PURE__ */ jsxs("div", { className: "flex flex-col", children: [
|
|
70
|
+
/* @__PURE__ */ jsx("span", { className: "text-sm font-medium text-blimu-foreground", children: displayName }),
|
|
71
|
+
/* @__PURE__ */ jsx("span", { className: "text-xs text-blimu-muted-foreground", children: user.email })
|
|
66
72
|
] })
|
|
67
73
|
] }) }),
|
|
68
|
-
/* @__PURE__ */
|
|
69
|
-
/* @__PURE__ */
|
|
70
|
-
|
|
74
|
+
/* @__PURE__ */ jsx(DropdownMenuSeparator, { className: "m-0" }),
|
|
75
|
+
/* @__PURE__ */ jsx("div", { className: "py-1.5 space-y-2", children: /* @__PURE__ */ jsxs(
|
|
76
|
+
DropdownMenuItem,
|
|
71
77
|
{
|
|
72
|
-
onClick:
|
|
73
|
-
className:
|
|
78
|
+
onClick: logout,
|
|
79
|
+
className: cn("flex items-center gap-3 text-sm cursor-pointer", classes?.signOutButton),
|
|
74
80
|
children: [
|
|
75
|
-
/* @__PURE__ */
|
|
76
|
-
/* @__PURE__ */
|
|
81
|
+
/* @__PURE__ */ jsx(LogOut, { className: "w-4 h-4 text-blimu-muted-foreground" }),
|
|
82
|
+
/* @__PURE__ */ jsx("span", { children: "Sign out" })
|
|
77
83
|
]
|
|
78
84
|
}
|
|
79
85
|
) }),
|
|
80
|
-
/* @__PURE__ */
|
|
81
|
-
/* @__PURE__ */
|
|
82
|
-
/* @__PURE__ */
|
|
83
|
-
/* @__PURE__ */
|
|
86
|
+
/* @__PURE__ */ jsx(DropdownMenuSeparator, { className: "m-0" }),
|
|
87
|
+
/* @__PURE__ */ jsx("div", { className: "p-4 bg-blimu-muted/50", children: /* @__PURE__ */ jsxs("div", { className: "flex justify-center items-center gap-2 text-xs text-blimu-muted-foreground", children: [
|
|
88
|
+
/* @__PURE__ */ jsx("span", { children: "Secured by" }),
|
|
89
|
+
/* @__PURE__ */ jsx("span", { className: "font-semibold text-blimu-foreground", children: "Blimu" })
|
|
84
90
|
] }) })
|
|
85
91
|
]
|
|
86
92
|
}
|
|
@@ -88,6 +94,6 @@ function G({
|
|
|
88
94
|
] });
|
|
89
95
|
}
|
|
90
96
|
export {
|
|
91
|
-
|
|
97
|
+
UserButton
|
|
92
98
|
};
|
|
93
99
|
//# sourceMappingURL=user-button.js.map
|