@luxfi/core 4.4.10 → 4.4.12

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.
Files changed (84) hide show
  1. package/components/access-code-input.tsx +71 -71
  2. package/components/auth/auth-listener.tsx +23 -41
  3. package/components/auth/auth-token/clear-auth-token.tsx +12 -0
  4. package/components/auth/auth-token/set-auth-token.tsx +16 -0
  5. package/components/auth/common-auth-domains.ts +16 -15
  6. package/components/auth/login-panel.tsx +119 -117
  7. package/components/chat-widget.tsx +77 -77
  8. package/components/commerce/bag-button.tsx +67 -67
  9. package/components/commerce/checkout-panel/close-button.tsx +26 -26
  10. package/components/commerce/checkout-panel/dt-bag-carousel.tsx +36 -36
  11. package/components/commerce/checkout-panel/dt-checkout-panel.tsx +66 -66
  12. package/components/commerce/checkout-panel/index.tsx +123 -123
  13. package/components/commerce/checkout-panel/links-row.tsx +21 -21
  14. package/components/commerce/checkout-panel/mb-checkout-panel.tsx +55 -55
  15. package/components/commerce/checkout-panel/steps-indicator.tsx +39 -39
  16. package/components/commerce/checkout-panel/thank-you.tsx +18 -18
  17. package/components/commerce/desktop-bag-popup.tsx +78 -78
  18. package/components/commerce/mobile-bag-drawer.tsx +51 -51
  19. package/components/commerce/mobile-menu-toggle-button.tsx +35 -35
  20. package/components/commerce/mobile-nav-menu.tsx +64 -64
  21. package/components/contact-dialog/contact-form.tsx +112 -112
  22. package/components/contact-dialog/disclaimer.tsx +13 -13
  23. package/components/contact-dialog/index.tsx +64 -64
  24. package/components/copyright.tsx +21 -21
  25. package/components/footer.tsx +77 -77
  26. package/components/header/desktop.tsx +54 -54
  27. package/components/header/index.tsx +26 -26
  28. package/components/header/mobile.tsx +161 -161
  29. package/components/header/theme-toggle.tsx +26 -26
  30. package/components/icons/bag-icon.tsx +10 -10
  31. package/components/icons/github.tsx +14 -14
  32. package/components/icons/index.tsx +35 -35
  33. package/components/icons/lux-logo.tsx +10 -10
  34. package/components/icons/secure-delivery.tsx +13 -13
  35. package/components/icons/social-icon.tsx +35 -35
  36. package/components/icons/social-svg.css +3 -3
  37. package/components/icons/youtube-logo.tsx +59 -59
  38. package/components/index.ts +27 -27
  39. package/components/logo.tsx +81 -81
  40. package/components/mini-chart/index.tsx +7 -7
  41. package/components/mini-chart/mini-chart-props.ts +43 -43
  42. package/components/mini-chart/mini-chart.tsx +85 -85
  43. package/components/mini-chart/wrapper.tsx +23 -23
  44. package/components/not-found/index.tsx +27 -27
  45. package/components/not-found/not-found-content.mdx +5 -5
  46. package/components/root-layout.tsx +71 -71
  47. package/components/scripts.tsx +23 -23
  48. package/conf/index.ts +50 -50
  49. package/environment.d.ts +5 -5
  50. package/next/analytics/fpixel.ts +15 -15
  51. package/next/analytics/google-analytics.ts +13 -13
  52. package/next/analytics/index.ts +3 -3
  53. package/next/analytics/pixel-analytics.tsx +54 -54
  54. package/next/determine-device-mw.ts +16 -16
  55. package/next/font/get-app-router-font-classes.ts +12 -12
  56. package/next/font/load-and-return-lux-next-fonts-on-import.ts +68 -68
  57. package/next/font/next-font-desc.ts +27 -27
  58. package/next/font/pages-router-font-vars.tsx +18 -18
  59. package/next/head-metadata/from-next/metadata-types.ts +158 -158
  60. package/next/head-metadata/from-next/opengraph-types.ts +267 -267
  61. package/next/head-metadata/from-next/twitter-types.ts +92 -92
  62. package/next/head-metadata/index.tsx +208 -208
  63. package/package.json +73 -73
  64. package/server-actions/firebase-app.ts +14 -14
  65. package/server-actions/index.ts +5 -5
  66. package/server-actions/store-contact.ts +51 -51
  67. package/site-def/footer/community.tsx +67 -67
  68. package/site-def/footer/company.ts +37 -37
  69. package/site-def/footer/ecosystem.ts +37 -37
  70. package/site-def/footer/index.tsx +26 -26
  71. package/site-def/footer/legal.ts +28 -28
  72. package/site-def/footer/network.ts +45 -45
  73. package/site-def/footer/svg/warpcast-logo.svg +11 -11
  74. package/site-def/index.ts +2 -2
  75. package/site-def/main-nav.ts +35 -35
  76. package/site-def/site-def.ts +36 -36
  77. package/style/lux-colors.css +85 -85
  78. package/style/lux-global.css +30 -30
  79. package/tailwind/fontFamily.tailwind.lux.ts +18 -18
  80. package/tailwind/index.ts +2 -2
  81. package/tailwind/lux-tw-fonts.ts +39 -39
  82. package/tailwind/tailwind.config.lux-preset.ts +10 -10
  83. package/tsconfig.json +10 -10
  84. package/types/contact-info.ts +10 -10
@@ -1,78 +1,78 @@
1
- 'use client'
2
- import React, { useState, useEffect } from 'react'
3
- import { useRouter } from 'next/navigation'
4
-
5
- import { X } from 'lucide-react'
6
-
7
- import {
8
- Popover,
9
- PopoverContent,
10
- PopoverTrigger,
11
- PopoverClose,
12
- } from "@hanzo/ui/primitives"
13
-
14
- import { cn } from '@hanzo/ui/util'
15
- import { CartPanel, useCommerce } from '@hanzo/commerce'
16
-
17
- import * as Icons from '../icons'
18
- import sendGAEvent from '../../next/analytics/google-analytics'
19
-
20
- const DesktopBagPopup: React.FC<{
21
- triggerClx?: string
22
- popupClx?: string
23
- trigger: React.ReactNode
24
- }> = ({
25
- triggerClx='',
26
- popupClx='',
27
- trigger
28
- }) => {
29
- const cmmc = useCommerce()
30
-
31
- const [bagOpen, setBagOpen] = useState<boolean>(false)
32
- const router = useRouter()
33
-
34
- useEffect(() => {
35
- if (bagOpen) {
36
- sendGAEvent('view_cart', {
37
- items: cmmc.cartItems.map((item) => ({
38
- item_id: item.sku,
39
- item_name: item.title,
40
- item_category: item.familyId,
41
- price: item.price,
42
- quantity: item.quantity
43
- })),
44
- value: cmmc.cartTotal,
45
- currency: 'USD',
46
- })
47
- }
48
- }, [bagOpen])
49
-
50
- return (
51
- <Popover open={bagOpen} onOpenChange={setBagOpen}>
52
- <PopoverTrigger className={triggerClx}>
53
- {trigger}
54
- </PopoverTrigger>
55
- <PopoverContent sideOffset={28} className={cn('relative flex flex-col p-0 px-4 pb-4 pt-2', popupClx)}>
56
- <PopoverClose className='absolute z-above-content right-2 top-2 self-end hover:bg-level-3 text-muted hover:text-accent p-1 rounded-full'><X className='w-5 h-5'/></PopoverClose>
57
- <CartPanel
58
- handleCheckout={() => {router.push('/checkout')}}
59
- className='mt-4 mb-4 border-none py-0 px-4'
60
- listClx='rounded-sm pr-3'
61
- scrollAfter={5}
62
- scrollHeightClx='h-[70vh]'
63
- itemClx='mt-3'
64
- totalClx='sticky px-1 pr-2 -bottom-[1px] bg-level-1'
65
- buttonClx='max-w-[220px] flex-none'
66
- >
67
- <div className='flex flex-row items-center flex-none justify-center '>
68
- <Icons.bag className='mr-2 relative w-6 h-7 fill-foreground ' />
69
- <p className='font-heading text-foreground text-default'>Your Bag</p>
70
- </div>
71
- <div className='h-[1px] w-pr-80 bg-muted-3 mx-auto mt-1.5 flex-none'/>
72
- </CartPanel>
73
- </PopoverContent>
74
- </Popover>
75
- )
76
- }
77
-
78
- export default DesktopBagPopup
1
+ 'use client'
2
+ import React, { useState, useEffect } from 'react'
3
+ import { useRouter } from 'next/navigation'
4
+
5
+ import { X } from 'lucide-react'
6
+
7
+ import {
8
+ Popover,
9
+ PopoverContent,
10
+ PopoverTrigger,
11
+ PopoverClose,
12
+ } from "@hanzo/ui/primitives"
13
+
14
+ import { cn } from '@hanzo/ui/util'
15
+ import { CartPanel, useCommerce } from '@hanzo/commerce'
16
+
17
+ import * as Icons from '../icons'
18
+ import sendGAEvent from '../../next/analytics/google-analytics'
19
+
20
+ const DesktopBagPopup: React.FC<{
21
+ triggerClx?: string
22
+ popupClx?: string
23
+ trigger: React.ReactNode
24
+ }> = ({
25
+ triggerClx='',
26
+ popupClx='',
27
+ trigger
28
+ }) => {
29
+ const cmmc = useCommerce()
30
+
31
+ const [bagOpen, setBagOpen] = useState<boolean>(false)
32
+ const router = useRouter()
33
+
34
+ useEffect(() => {
35
+ if (bagOpen) {
36
+ sendGAEvent('view_cart', {
37
+ items: cmmc.cartItems.map((item) => ({
38
+ item_id: item.sku,
39
+ item_name: item.title,
40
+ item_category: item.familyId,
41
+ price: item.price,
42
+ quantity: item.quantity
43
+ })),
44
+ value: cmmc.cartTotal,
45
+ currency: 'USD',
46
+ })
47
+ }
48
+ }, [bagOpen])
49
+
50
+ return (
51
+ <Popover open={bagOpen} onOpenChange={setBagOpen}>
52
+ <PopoverTrigger className={triggerClx}>
53
+ {trigger}
54
+ </PopoverTrigger>
55
+ <PopoverContent sideOffset={28} className={cn('relative flex flex-col p-0 px-4 pb-4 pt-2', popupClx)}>
56
+ <PopoverClose className='absolute z-above-content right-2 top-2 self-end hover:bg-level-3 text-muted hover:text-accent p-1 rounded-full'><X className='w-5 h-5'/></PopoverClose>
57
+ <CartPanel
58
+ handleCheckout={() => {router.push('/checkout')}}
59
+ className='mt-4 mb-4 border-none py-0 px-4'
60
+ listClx='rounded-sm pr-3'
61
+ scrollAfter={5}
62
+ scrollHeightClx='h-[70vh]'
63
+ itemClx='mt-3'
64
+ totalClx='sticky px-1 pr-2 -bottom-[1px] bg-level-1'
65
+ buttonClx='max-w-[220px] flex-none'
66
+ >
67
+ <div className='flex flex-row items-center flex-none justify-center '>
68
+ <Icons.bag className='mr-2 relative w-6 h-7 fill-foreground ' />
69
+ <p className='font-heading text-foreground text-default'>Your Bag</p>
70
+ </div>
71
+ <div className='h-[1px] w-pr-80 bg-muted-3 mx-auto mt-1.5 flex-none'/>
72
+ </CartPanel>
73
+ </PopoverContent>
74
+ </Popover>
75
+ )
76
+ }
77
+
78
+ export default DesktopBagPopup
@@ -1,51 +1,51 @@
1
- 'use client'
2
- import React from 'react'
3
-
4
- import { Drawer, DrawerContent} from '@hanzo/ui/primitives'
5
- import { cn } from '@hanzo/ui/util'
6
- import { CartPanel } from '@hanzo/commerce'
7
-
8
- import BagButton from './bag-button'
9
-
10
- const MobileBagDrawer: React.FC<{
11
- open: boolean,
12
- setOpen: (b: boolean) => void
13
- handleCheckout: () => void
14
- className?: string
15
- }> = ({
16
- open,
17
- setOpen,
18
- handleCheckout,
19
- className='',
20
- }) => {
21
-
22
- return (
23
- <Drawer open={open} onOpenChange={setOpen}>
24
- <DrawerContent className={cn('rounded-t-xl mt-6 pb-12 h-auto', className)} >
25
- <CartPanel
26
- handleCheckout={handleCheckout}
27
- className='mt-4 mb-4 border-none py-0 px-4 w-full '
28
- listClx='rounded-sm pr-3'
29
- scrollAfter={5}
30
- itemClx='mt-2'
31
- totalClx='sticky px-1 pr-2 border rounded-sm -bottom-[1px] bg-background'
32
- buttonClx='max-w-[220px] flex-none'
33
- >
34
- <div className='flex flex-row items-center flex-none justify-center '>
35
- <BagButton
36
- noHoverEffects
37
- showIfEmpty
38
- className=
39
- 'mr-2 relative w-6 h-7'
40
- iconClx='fill-foreground '
41
- />
42
- <p className='font-heading text-foreground text-default'>Your Bag</p>
43
- </div>
44
- <div className='h-[1px] w-pr-80 bg-muted-3 mx-auto mt-1.5 flex-none'/>
45
- </CartPanel>
46
- </DrawerContent>
47
- </Drawer>
48
- )
49
- }
50
-
51
- export default MobileBagDrawer
1
+ 'use client'
2
+ import React from 'react'
3
+
4
+ import { Drawer, DrawerContent} from '@hanzo/ui/primitives'
5
+ import { cn } from '@hanzo/ui/util'
6
+ import { CartPanel } from '@hanzo/commerce'
7
+
8
+ import BagButton from './bag-button'
9
+
10
+ const MobileBagDrawer: React.FC<{
11
+ open: boolean,
12
+ setOpen: (b: boolean) => void
13
+ handleCheckout: () => void
14
+ className?: string
15
+ }> = ({
16
+ open,
17
+ setOpen,
18
+ handleCheckout,
19
+ className='',
20
+ }) => {
21
+
22
+ return (
23
+ <Drawer open={open} onOpenChange={setOpen}>
24
+ <DrawerContent className={cn('rounded-t-xl mt-6 pb-12 h-auto', className)} >
25
+ <CartPanel
26
+ handleCheckout={handleCheckout}
27
+ className='mt-4 mb-4 border-none py-0 px-4 w-full '
28
+ listClx='rounded-sm pr-3'
29
+ scrollAfter={5}
30
+ itemClx='mt-2'
31
+ totalClx='sticky px-1 pr-2 border rounded-sm -bottom-[1px] bg-background'
32
+ buttonClx='max-w-[220px] flex-none'
33
+ >
34
+ <div className='flex flex-row items-center flex-none justify-center '>
35
+ <BagButton
36
+ noHoverEffects
37
+ showIfEmpty
38
+ className=
39
+ 'mr-2 relative w-6 h-7'
40
+ iconClx='fill-foreground '
41
+ />
42
+ <p className='font-heading text-foreground text-default'>Your Bag</p>
43
+ </div>
44
+ <div className='h-[1px] w-pr-80 bg-muted-3 mx-auto mt-1.5 flex-none'/>
45
+ </CartPanel>
46
+ </DrawerContent>
47
+ </Drawer>
48
+ )
49
+ }
50
+
51
+ export default MobileBagDrawer
@@ -1,35 +1,35 @@
1
- 'use client'
2
- import React, { useState } from 'react'
3
-
4
- import { Plus } from 'lucide-react'
5
-
6
- import { Button } from '@hanzo/ui/primitives'
7
- import { cn } from '@hanzo/ui/util'
8
-
9
- const MobileMenuToggleButton: React.FC<{
10
- open: boolean
11
- setOpen: (b: boolean) => void
12
- className?: string
13
- }> = ({
14
- open,
15
- setOpen,
16
- className=''
17
- }) => {
18
-
19
- return (
20
- <Button
21
- variant='ghost'
22
- size='default'
23
- rounded='full'
24
- onClick={() => {setOpen(!open)}}
25
- className={cn('p-0 aspect-square hover:bg-background sm:hover:bg-level-1 active:scale-75', className)}
26
- >
27
- <Plus width={28} height={28} className={
28
- 'block h-full will-change-transform transition-transform transition-scale transition-duration-[1500] ' +
29
- (open ? 'rotate-[135deg] scale-110' : 'rotate-none')
30
- } />
31
- </Button>
32
- )
33
- }
34
-
35
- export default MobileMenuToggleButton
1
+ 'use client'
2
+ import React, { useState } from 'react'
3
+
4
+ import { Plus } from 'lucide-react'
5
+
6
+ import { Button } from '@hanzo/ui/primitives'
7
+ import { cn } from '@hanzo/ui/util'
8
+
9
+ const MobileMenuToggleButton: React.FC<{
10
+ open: boolean
11
+ setOpen: (b: boolean) => void
12
+ className?: string
13
+ }> = ({
14
+ open,
15
+ setOpen,
16
+ className=''
17
+ }) => {
18
+
19
+ return (
20
+ <Button
21
+ variant='ghost'
22
+ size='default'
23
+ rounded='full'
24
+ onClick={() => {setOpen(!open)}}
25
+ className={cn('p-0 aspect-square hover:bg-background sm:hover:bg-level-1 active:scale-75', className)}
26
+ >
27
+ <Plus width={28} height={28} className={
28
+ 'block h-full will-change-transform transition-transform transition-scale transition-duration-[1500] ' +
29
+ (open ? 'rotate-[135deg] scale-110' : 'rotate-none')
30
+ } />
31
+ </Button>
32
+ )
33
+ }
34
+
35
+ export default MobileMenuToggleButton
@@ -1,64 +1,64 @@
1
- 'use client'
2
- import React from 'react'
3
-
4
- import type { LinkDef } from '@hanzo/ui/types'
5
- import { LinkElement } from '@hanzo/ui/primitives'
6
- import { cn } from '@hanzo/ui/util'
7
-
8
- const MobileNav: React.FC<{
9
- currentAs: string | undefined
10
- links: LinkDef[]
11
- className?: string
12
- commonItemClx?: string | ((def: LinkDef) => string),
13
- /**
14
- * This is called *in addition* to the link's actual navigation
15
- * action. eg, I link is clicked, and the modal menu is closes
16
- */
17
- onAction?: () => void
18
- }> = ({
19
- currentAs,
20
- links,
21
- onAction,
22
- className='',
23
- commonItemClx,
24
- }) => (
25
-
26
- links.length > 0 ? (
27
-
28
- <nav className={className} >
29
- {links.map((el, index) => {
30
- const variant = el.variant ?? 'link'
31
- let internalClx = ''
32
- // note that linkFG (or any other variant of 'link')
33
- // will not get assigned these classes,
34
- // and will remain styles is 'foreground' (hence the name)
35
- if (variant === 'link') {
36
- internalClx+= ' text-muted hover:text-foreground active:text-accent rounded-none'
37
- if (currentAs && currentAs === el.href) {
38
- internalClx += ' text-accent '
39
- }
40
- }
41
- else {
42
- internalClx+= ' min-w-0'
43
- }
44
- if (currentAs && currentAs === el.href) {
45
- internalClx += ' pointer-events-none'
46
- }
47
- const itemClx = (commonItemClx) ? (typeof commonItemClx === 'string' ? commonItemClx : commonItemClx(el)) : ''
48
-
49
- return (
50
- <LinkElement
51
- def={el}
52
- key={`common-${index}`}
53
- size='lg'
54
- className={cn(internalClx, itemClx)}
55
- onClick={onAction}
56
- />
57
- )
58
- })}
59
- </nav>
60
- )
61
- : null
62
- )
63
-
64
- export default MobileNav
1
+ 'use client'
2
+ import React from 'react'
3
+
4
+ import type { LinkDef } from '@hanzo/ui/types'
5
+ import { LinkElement } from '@hanzo/ui/primitives'
6
+ import { cn } from '@hanzo/ui/util'
7
+
8
+ const MobileNav: React.FC<{
9
+ currentAs: string | undefined
10
+ links: LinkDef[]
11
+ className?: string
12
+ commonItemClx?: string | ((def: LinkDef) => string),
13
+ /**
14
+ * This is called *in addition* to the link's actual navigation
15
+ * action. eg, I link is clicked, and the modal menu is closes
16
+ */
17
+ onAction?: () => void
18
+ }> = ({
19
+ currentAs,
20
+ links,
21
+ onAction,
22
+ className='',
23
+ commonItemClx,
24
+ }) => (
25
+
26
+ links.length > 0 ? (
27
+
28
+ <nav className={className} >
29
+ {links.map((el, index) => {
30
+ const variant = el.variant ?? 'link'
31
+ let internalClx = ''
32
+ // note that linkFG (or any other variant of 'link')
33
+ // will not get assigned these classes,
34
+ // and will remain styles is 'foreground' (hence the name)
35
+ if (variant === 'link') {
36
+ internalClx+= ' text-muted hover:text-foreground active:text-accent rounded-none'
37
+ if (currentAs && currentAs === el.href) {
38
+ internalClx += ' text-accent '
39
+ }
40
+ }
41
+ else {
42
+ internalClx+= ' min-w-0'
43
+ }
44
+ if (currentAs && currentAs === el.href) {
45
+ internalClx += ' pointer-events-none'
46
+ }
47
+ const itemClx = (commonItemClx) ? (typeof commonItemClx === 'string' ? commonItemClx : commonItemClx(el)) : ''
48
+
49
+ return (
50
+ <LinkElement
51
+ def={el}
52
+ key={`common-${index}`}
53
+ size='lg'
54
+ className={cn(internalClx, itemClx)}
55
+ onClick={onAction}
56
+ />
57
+ )
58
+ })}
59
+ </nav>
60
+ )
61
+ : null
62
+ )
63
+
64
+ export default MobileNav