@hanzo/ui 1.0.15 → 2.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (78) hide show
  1. package/blocks/components/card-block.tsx +1 -1
  2. package/package.json +8 -10
  3. package/primitives/icons/index.ts +18 -0
  4. package/primitives/index.ts +1 -0
  5. package/primitives/toggle-group.tsx +1 -1
  6. package/primitives/youtube-embed.tsx +1 -1
  7. package/style/hanzo-default-colors.css +2 -2
  8. package/{context-providers → style}/theme-provider.tsx +2 -2
  9. package/tailwind/fontFamily.tailwind.ts +7 -0
  10. package/tailwind/{fonts.tailwind.ts → fontSize.tailwind.ts} +1 -19
  11. package/tailwind/index.ts +8 -5
  12. package/tailwind/{tailwind.config.base.js → tailwind.config.hanzo-preset.js} +3 -2
  13. package/tailwind/typo-plugin/get-plugin-styles.js +42 -42
  14. package/tailwind/typography-test.mdx +1 -1
  15. package/types/index.ts +5 -15
  16. package/assets/lux-site-icons/android-chrome-192x192.png +0 -0
  17. package/assets/lux-site-icons/android-chrome-512x512.png +0 -0
  18. package/assets/lux-site-icons/apple-touch-icon.png +0 -0
  19. package/assets/lux-site-icons/favicon-16x16.png +0 -0
  20. package/assets/lux-site-icons/favicon-32x32.png +0 -0
  21. package/assets/lux-site-icons/favicon.ico +0 -0
  22. package/assets/standard-docs/LUX-NFT-Terms-and-Conditions.pdf +0 -0
  23. package/assets/standard-docs/LUX-Privacy-Policy.pdf +0 -0
  24. package/common/chat-widget.tsx +0 -75
  25. package/common/contact-dialog/contact-form.tsx +0 -111
  26. package/common/contact-dialog/disclaimer.tsx +0 -13
  27. package/common/contact-dialog/index.tsx +0 -48
  28. package/common/copyright.tsx +0 -21
  29. package/common/drawer-menu.tsx +0 -54
  30. package/common/footer.tsx +0 -77
  31. package/common/head-metadata/from-next/metadata-types.ts +0 -158
  32. package/common/head-metadata/from-next/opengraph-types.ts +0 -267
  33. package/common/head-metadata/from-next/twitter-types.ts +0 -92
  34. package/common/head-metadata/index.tsx +0 -208
  35. package/common/header/index.tsx +0 -66
  36. package/common/header/mobile-nav.tsx +0 -72
  37. package/common/header/theme-toggle.tsx +0 -26
  38. package/common/icons/index.tsx +0 -34
  39. package/common/icons/lux-logo.tsx +0 -10
  40. package/common/icons/secure-delivery.tsx +0 -13
  41. package/common/icons/social-icon.tsx +0 -35
  42. package/common/index.ts +0 -14
  43. package/common/logo.tsx +0 -71
  44. package/common/mini-chart/index.tsx +0 -8
  45. package/common/mini-chart/mini-chart-props.ts +0 -44
  46. package/common/mini-chart/mini-chart.tsx +0 -76
  47. package/common/mini-chart/wrapper.tsx +0 -23
  48. package/context-providers/index.ts +0 -1
  49. package/next/README.md +0 -11
  50. package/next/analytics/fpixel.ts +0 -18
  51. package/next/analytics/pixel-analytics.tsx +0 -55
  52. package/next/determine-device-middleware.ts +0 -16
  53. package/next/fonts/DrukTextWide-Bold-Trial.otf +0 -0
  54. package/next/fonts/DrukTextWide-Heavy-Trial.otf +0 -0
  55. package/next/fonts/DrukTextWide-Medium-Trial.otf +0 -0
  56. package/next/fonts/DrukWide-Bold-Trial.otf +0 -0
  57. package/next/fonts/DrukWide-Heavy-Trial.otf +0 -0
  58. package/next/fonts/DrukWide-Medium-Trial.otf +0 -0
  59. package/next/get-app-router-font-classes.ts +0 -12
  60. package/next/load-and-return-lux-next-fonts-on-import.ts +0 -94
  61. package/next/next-font-desc.ts +0 -28
  62. package/next/not-found-content.mdx +0 -5
  63. package/next/not-found.tsx +0 -23
  64. package/next/pages-router-font-vars.tsx +0 -18
  65. package/next/root-layout.tsx +0 -62
  66. package/siteDef/footer/community.tsx +0 -67
  67. package/siteDef/footer/company.ts +0 -37
  68. package/siteDef/footer/ecosystem.ts +0 -37
  69. package/siteDef/footer/index.tsx +0 -26
  70. package/siteDef/footer/legal.ts +0 -28
  71. package/siteDef/footer/network.ts +0 -37
  72. package/siteDef/footer/svg/warpcast-logo.svg +0 -12
  73. package/siteDef/main-nav.ts +0 -35
  74. package/style/social-svg.css +0 -3
  75. package/tailwind/lux-tw-fonts.ts +0 -37
  76. package/types/site-def.ts +0 -36
  77. /package/{common → primitives}/icons/github.tsx +0 -0
  78. /package/{common → primitives}/icons/youtube-logo.tsx +0 -0
@@ -1,92 +0,0 @@
1
- // Reference: https://developer.twitter.com/en/docs/twitter-for-websites/cards/overview/markup
2
-
3
- import type { AbsoluteTemplateString, TemplateString } from './metadata-types'
4
-
5
- export type Twitter =
6
- | TwitterSummary
7
- | TwitterSummaryLargeImage
8
- | TwitterPlayer
9
- | TwitterApp
10
- | TwitterMetadata
11
-
12
- type TwitterMetadata = {
13
- // defaults to card="summary"
14
- site?: string // username for account associated to the site itself
15
- siteId?: string // id for account associated to the site itself
16
- creator?: string // username for the account associated to the creator of the content on the site
17
- creatorId?: string // id for the account associated to the creator of the content on the site
18
- description?: string
19
- title?: string | TemplateString
20
- images?: TwitterImage | Array<TwitterImage>
21
- }
22
- type TwitterSummary = TwitterMetadata & {
23
- card: 'summary'
24
- }
25
- type TwitterSummaryLargeImage = TwitterMetadata & {
26
- card: 'summary_large_image'
27
- }
28
- type TwitterPlayer = TwitterMetadata & {
29
- card: 'player'
30
- players: TwitterPlayerDescriptor | Array<TwitterPlayerDescriptor>
31
- }
32
- type TwitterApp = TwitterMetadata & {
33
- card: 'app'
34
- app: TwitterAppDescriptor
35
- }
36
- export type TwitterAppDescriptor = {
37
- id: {
38
- iphone?: string | number
39
- ipad?: string | number
40
- googleplay?: string
41
- }
42
- url?: {
43
- iphone?: string | URL
44
- ipad?: string | URL
45
- googleplay?: string | URL
46
- }
47
- name?: string
48
- }
49
-
50
- export type TwitterImage = string | TwitterImageDescriptor | URL
51
- type TwitterImageDescriptor = {
52
- url: string | URL
53
- alt?: string
54
- secureUrl?: string | URL
55
- type?: string
56
- width?: string | number
57
- height?: string | number
58
- }
59
- type TwitterPlayerDescriptor = {
60
- playerUrl: string | URL
61
- streamUrl: string | URL
62
- width: number
63
- height: number
64
- }
65
-
66
- type ResolvedTwitterImage = {
67
- url: string | URL
68
- alt?: string
69
- secureUrl?: string | URL
70
- type?: string
71
- width?: string | number
72
- height?: string | number
73
- }
74
- type ResolvedTwitterSummary = {
75
- site: string | null
76
- siteId: string | null
77
- creator: string | null
78
- creatorId: string | null
79
- description: string | null
80
- title: AbsoluteTemplateString
81
- images?: Array<ResolvedTwitterImage>
82
- }
83
- type ResolvedTwitterPlayer = ResolvedTwitterSummary & {
84
- players: Array<TwitterPlayerDescriptor>
85
- }
86
- type ResolvedTwitterApp = ResolvedTwitterSummary & { app: TwitterAppDescriptor }
87
-
88
- export type ResolvedTwitterMetadata =
89
- | ({ card: 'summary' } & ResolvedTwitterSummary)
90
- | ({ card: 'summary_large_image' } & ResolvedTwitterSummary)
91
- | ({ card: 'player' } & ResolvedTwitterPlayer)
92
- | ({ card: 'app' } & ResolvedTwitterApp)
@@ -1,208 +0,0 @@
1
- import React from 'react'
2
-
3
- import type { Metadata } from 'next'
4
- import Head from "next/head"
5
-
6
- import type {
7
- IconDescriptor,
8
- TemplateString,
9
- Author,
10
- ThemeColorDescriptor
11
- } from './from-next/metadata-types'
12
-
13
- import type { OpenGraph, OGImage } from './from-next/opengraph-types'
14
- import type { Twitter, TwitterImage } from './from-next/twitter-types'
15
-
16
- /*
17
- NOTE: This is ONLY for sites that use the pages router in next.
18
- The app router does this automatically
19
- */
20
-
21
- const getURLasString = (url: string | URL) => {
22
- return (
23
- (typeof url === 'string') ? (url as string) : (url.href)
24
- )
25
- }
26
-
27
- // https://stackoverflow.com/questions/68746228/next-head-wont-render-meta-tags-inside-of-fragment
28
- const Icons: React.FC<{icons: IconDescriptor[]}> = ({
29
- icons
30
- }) => {
31
- return <Head>
32
- {icons.map(({url, ...rest}: IconDescriptor, index) => (
33
- <link {...rest} href={getURLasString(url)} key={`icons-${index}`}/>
34
- ))}
35
- </Head>
36
- }
37
-
38
- export const getTitleFromTemplateString = (title: string | TemplateString | null | undefined): string | null => {
39
-
40
- if (!title) {
41
- return null
42
- }
43
- if (typeof title === 'object') {
44
- if ('default' in title) {
45
- return title.default
46
- }
47
- else if ('absolute' in title) {
48
- return title.absolute
49
- }
50
- }
51
- return title as string
52
- }
53
-
54
- const Authors: React.FC<{
55
- authors: null | undefined | Author | Array<Author>
56
- }> = ({
57
- authors
58
- }) => {
59
-
60
- const Author: React.FC<{author: Author}> = ({author}) => (<>
61
- {author.name && <meta name="author" content={author.name} />}
62
- {author.url && <link rel="author" href={getURLasString(author.url)}/>}
63
- </>)
64
-
65
- if (!authors) {
66
- return null
67
- }
68
-
69
- if (Array.isArray(authors)) {
70
- return (<>
71
- {authors.map((el: Author, index) => (
72
- <Author author={el} key={`authors-${index}`} />
73
- ))}
74
- </>)
75
- }
76
- return (<Author author={authors as Author} />)
77
- }
78
-
79
- const Keywords: React.FC<{keywords: undefined | null | string | Array<string>}> = ({
80
- keywords
81
- }) => {
82
- if (!keywords) return null
83
- const content = (Array.isArray(keywords) ? keywords.join(', ') : keywords as string)
84
- return (<meta name="keywords" content={content} />)
85
- }
86
-
87
- const ThemeColor: React.FC<{
88
- thColors: null | undefined | string | ThemeColorDescriptor | ThemeColorDescriptor[]
89
- }> = ({
90
- thColors
91
- }) => {
92
-
93
- const ThColor: React.FC<{thColor: ThemeColorDescriptor}> = ({thColor}) => {
94
- const toSpread: any = {
95
- content: thColor.color
96
- }
97
-
98
- if ('media' in thColor) {
99
- toSpread.media = thColor.media
100
- }
101
-
102
- return <meta name="theme-color" {...toSpread}/>
103
- }
104
-
105
- if (!thColors) {
106
- return null
107
- }
108
-
109
- if (Array.isArray(thColors)) {
110
- return (<>
111
- {thColors.map((el: ThemeColorDescriptor, index) => (
112
- <ThColor thColor={el} key={`theme-colors-${index}`} />
113
- ))}
114
- </>)
115
- }
116
- else if (typeof thColors === 'string') {
117
- <meta name="theme-color" content={thColors as string}/>
118
- }
119
- return (<ThColor thColor={thColors as ThemeColorDescriptor} />)
120
- }
121
-
122
- const Manifest: React.FC<{
123
- manifest: undefined | null | string | URL
124
- }> = ({
125
- manifest
126
- }) => (
127
- manifest && (<link rel="manifest" href={getURLasString(manifest)}/>)
128
- )
129
-
130
- const getOGImageURL = (img: OGImage | undefined): string | null => {
131
-
132
- if (!img) {
133
- return null
134
- }
135
- if (typeof img === 'object' && 'url' in img) { // this is a OGImageDescriptor
136
- return getURLasString(img.url)
137
- }
138
- return getURLasString(img) // this is a URL or string
139
- }
140
-
141
- const getTwitterImageURL = (img: TwitterImage | undefined): string | null => {
142
-
143
- if (!img) {
144
- return null
145
- }
146
- if (typeof img === 'object' && 'url' in img) { // this is a TwitterImageDescriptor
147
- return getURLasString(img.url)
148
- }
149
- return getURLasString(img) // this is a URL or string
150
- }
151
-
152
- // https://stackoverflow.com/questions/68746228/next-head-wont-render-meta-tags-inside-of-fragment
153
- const OpenGraphComponent: React.FC<{
154
- og: OpenGraph | undefined | null
155
- }> = ({
156
- og
157
- }) => (og && (<Head>
158
- {og.url && (<meta property="og:url" content={(typeof og.url === 'string') ? (og.url as string) : (og.url.href)} />)}
159
- {(og as any).type && (<meta property="og:type" content={(og as any).type} />)}
160
- {og.title && (<meta property="og:title" content={getTitleFromTemplateString(og.title)!} />)}
161
- {og.description && (<meta property="og:description" content={og.description} />)}
162
- {og.images && (<meta property="og:image" content={getOGImageURL(Array.isArray(og.images) ? og.images[0] : og.images)!} />)}
163
- </Head>))
164
-
165
- // https://stackoverflow.com/questions/68746228/next-head-wont-render-meta-tags-inside-of-fragment
166
- export const TwitterComponent: React.FC<{
167
- tw: Twitter | undefined | null
168
- }> = ({
169
- tw
170
- }) => (tw && (<Head>
171
- {(tw as any).card && (<meta name="twitter:card" content={(tw as any).card} />)}
172
- {tw.title && (<meta name="twitter:title" content={getTitleFromTemplateString(tw.title)!} />)}
173
- {tw.description && (<meta name="twitter:description" content={tw.description} />)}
174
- {tw.images && (<meta name="twitter:image" content={getTwitterImageURL(Array.isArray(tw.images) ? tw.images[0] : tw.images)!} />)}
175
- {tw.site && (<meta name="twitter:site" content={tw.site} />)}
176
- </Head>))
177
-
178
- /* See NOTE at top of file! */
179
- // https://stackoverflow.com/questions/68746228/next-head-wont-render-meta-tags-inside-of-fragment
180
- const HeadMetadataComponent: React.FC<{
181
- metadata: Metadata
182
- }> = ({
183
- metadata
184
- }) => {
185
- const mainTitle = getTitleFromTemplateString(metadata.title)
186
-
187
- return (<>
188
- <Head>
189
- {mainTitle && (<title>{mainTitle}</title>) /* must be here, directly under Head component */}
190
- {metadata.description && (
191
- <meta name="description" content={metadata.description} />
192
- )}
193
- {metadata.applicationName && (
194
- <meta name="application-name" content={metadata.applicationName} />
195
- )}
196
- <Authors authors={metadata.authors} />
197
- <Keywords keywords={metadata.keywords} />
198
- <ThemeColor thColors={metadata.themeColor} />
199
- <Manifest manifest={metadata.manifest} />
200
- </Head>
201
- {/* Icons: We only support this format for now */}
202
- <Icons icons={metadata.icons as IconDescriptor[]} />
203
- <OpenGraphComponent og={metadata.openGraph} />
204
- <TwitterComponent tw={metadata.twitter} />
205
- </>)
206
- }
207
-
208
- export default HeadMetadataComponent
@@ -1,66 +0,0 @@
1
- import React from 'react'
2
-
3
- import type { SiteDef } from '../../types'
4
- import { NavItems } from '../../primitives'
5
- import { Icons, DrawerMenu, Logo } from '..'
6
- import { cn } from '../../util'
7
-
8
- import MobileNav from './mobile-nav'
9
-
10
- const Header: React.FC<{
11
- siteDef: SiteDef
12
- className?: string
13
- }> = ({
14
- siteDef,
15
- className = ''
16
- }) => {
17
-
18
- const { nav: { common, featured }} = siteDef
19
- const allElements = (featured) ? [...common, ...featured] : common
20
- // TODO move 13px into a size class and configure twMerge to recognize say, 'text-size-nav'
21
- // (vs be beat out by 'text-color-nav')
22
- const navItemClx = 'font-nav h-8 !text-[13px]/[13px]'
23
-
24
- return (
25
- <header className={cn('bg-background sticky z-10 top-0 ', className)} >
26
- {/* md or larger */}
27
- <div className={
28
- 'hidden md:flex flex-row md:h-[80px] items-center justify-between ' +
29
- 'px-[32px] 2xl:mx-auto max-w-screen-2xl'
30
- }>
31
- <Logo size='md' className='hidden lg:flex' key='two'/>
32
- <Logo size='sm' className='hidden md:flex lg:hidden' key='one'/>
33
- {/* md or larger */}
34
- <div className='flex gap-7 items-center'>
35
- <NavItems
36
- currentAs={siteDef.currentAs}
37
- items={allElements}
38
- className='hidden md:flex md:gap-4 lg:justify-between lg:gap-7 '
39
- itemClx={navItemClx}
40
- key='three'
41
- />
42
- {siteDef.nav.cart}
43
- </div>
44
- </div>
45
- {/* smaller than md: mobile style drawer menu */}
46
- <div className="flex md:hidden h-[44px] items-center justify-between px-2">
47
- <Logo size='sm' />
48
- <div className='flex gap-4'>
49
- {siteDef.nav.cart}
50
- <DrawerMenu
51
- className='p-0 text-primary' // ui has 'text-inherit', so need this for close buttons to appear.
52
- trigger={<Icons.burger className='h-7 w-7'/>}
53
- >
54
- <MobileNav
55
- siteDef={siteDef}
56
- className='pt-12'
57
- commonItemClx='px-10 text-l h-10 justify-start border-b rounded-none'
58
- />
59
- </DrawerMenu>
60
- </div>
61
- </div>
62
- </header>
63
- )
64
- }
65
-
66
- export default Header
@@ -1,72 +0,0 @@
1
- 'use client'
2
- import React from 'react'
3
-
4
- import { type ButtonVariants, LinkElement } from '../../primitives'
5
- import type { LinkDef, SiteDef } from '../../types'
6
- import { cn } from '../../util'
7
-
8
- const MobileNav: React.FC<{
9
- siteDef: SiteDef
10
- className?: string
11
- commonItemClx?: string | ((def: LinkDef) => string),
12
- /**
13
- * This is called *in addition* to the link's actual navigation
14
- * action. eg, I link is clicked, and the modal menu is closes
15
- */
16
- onAction?: () => void
17
- }> = ({
18
- siteDef,
19
- onAction,
20
- className='',
21
- commonItemClx,
22
- }) => {
23
-
24
- const { nav: { common, featured }} = siteDef
25
-
26
- return (common.length || featured?.length) ? (
27
- <nav className={className} >
28
- {common.map((el, index) => {
29
- const variant = el.variant ?? 'link'
30
- let internalClx = ''
31
- // note that linkFG (or any other variant of 'link')
32
- // will not get assigned these classes,
33
- // and will remain styles is 'foreground' (hence the name)
34
- if (variant === 'link') {
35
- internalClx+= ' text-nav hover:text-nav-hover active:text-nav-hover '
36
- if (siteDef.currentAs && siteDef.currentAs === el.href) {
37
- internalClx += ' text-nav-current'
38
- }
39
- }
40
- else {
41
- internalClx+= ' min-w-0'
42
- }
43
- if (siteDef.currentAs && siteDef.currentAs === el.href) {
44
- internalClx += ' pointer-events-none'
45
- }
46
- const itemClx = (commonItemClx) ? (typeof commonItemClx === 'string' ? commonItemClx : commonItemClx(el)) : ''
47
-
48
- return (
49
- <LinkElement
50
- def={el}
51
- key={`common-${index}`}
52
- size='lg'
53
- className={cn(internalClx, itemClx)}
54
- onClick = {onAction}
55
- />
56
- )
57
- })}
58
- {featured?.length && (featured.map((el, index) => (
59
- <LinkElement
60
- def={el}
61
- key={`featured-${index}`}
62
- size='lg'
63
- className='mt-6 w-4/5 mx-auto'
64
- onClick={onAction}
65
- />
66
- )))}
67
- </nav>
68
- )
69
- : null
70
- }
71
-
72
- export default MobileNav
@@ -1,26 +0,0 @@
1
- 'use client'
2
-
3
- import React from 'react'
4
- import { Moon, Sun } from 'lucide-react'
5
- import { useTheme } from 'next-themes'
6
-
7
- import { Button } from '../../primitives'
8
-
9
- const ThemeToggle: React.FC = () => {
10
-
11
- const { setTheme, theme } = useTheme()
12
-
13
- return (
14
- <Button
15
- variant='ghost'
16
- size='icon'
17
- onClick={() => {setTheme(theme === 'light' ? 'dark' : 'light')}}
18
- >
19
- <Sun className='h-[1.5rem] w-[1.3rem] dark:hidden' />
20
- <Moon className='hidden h-5 w-5 dark:block' />
21
- <span className='sr-only'>Toggle theme</span>
22
- </Button>
23
- )
24
- }
25
-
26
- export default ThemeToggle
@@ -1,34 +0,0 @@
1
- import {
2
- Moon as moon,
3
- SunMedium as sun,
4
- Menu as burger,
5
- ArrowUpRight as linkOut,
6
- type XIcon as LucideIcon,
7
- } from 'lucide-react'
8
-
9
- import gitHub from './github'
10
- import logo from './lux-logo'
11
- import youtube from './youtube-logo'
12
- import secureDelivery from './secure-delivery'
13
-
14
- import {
15
- type SocialIconProps,
16
- default as SocialIcon
17
- } from './social-icon'
18
-
19
- export { type LucideIcon as Icon, type SocialIconProps }
20
-
21
-
22
- export {
23
- sun,
24
- moon,
25
- logo,
26
- burger,
27
- gitHub,
28
- linkOut,
29
- youtube,
30
- secureDelivery,
31
- SocialIcon,
32
- }
33
-
34
-
@@ -1,10 +0,0 @@
1
- import React from 'react'
2
- import { type LucideProps } from 'lucide-react'
3
-
4
- const LuxLogo: React.FC<LucideProps> = (props: LucideProps) => (
5
- <svg fill='currentColor' viewBox="0 0 260 260" xmlns="http://www.w3.org/2000/svg" {...props}>
6
- <path d="M5,5H265L135,230"/>
7
- </svg>
8
- )
9
-
10
- export default LuxLogo
@@ -1,13 +0,0 @@
1
- import React from 'react'
2
- import { type LucideProps } from 'lucide-react'
3
-
4
- // width="52" height="36"
5
- const SecureDelivery: React.FC<LucideProps> = (props: LucideProps) => (
6
- <svg fill="currentColor" viewBox="0 0 52 36" xmlns="http://www.w3.org/2000/svg" {...props}>
7
- <path d="M47.7611 24.5439H42.822L39.5293 14.9971H12.0732L8.7805 24.5439H2.96342L0 36.0001H51.7127L47.7611 24.5439ZM38.4147 16.9064L41.0488 24.5439H28.0049L25.3708 16.9064H38.4147ZM13.1879 16.9064H23.5976L26.2317 24.5439H10.5528L13.1879 16.9064ZM2.21225 34.0907L4.18786 26.4532H14.4865L16.4621 34.0907H2.21225ZM17.6804 32.1537L16.2061 26.4531H19.646L17.6804 32.1537ZM28.2706 34.0907H18.7854L21.4196 26.4532H31.8293L34.4634 34.0907H28.2706ZM36.2367 34.0907L33.6025 26.4532H46.6473L49.2814 34.0907H36.2367Z" />
8
- <path d="M10.0843 0.108973C10.1056 -0.0363242 10.2915 -0.0363242 10.3128 0.108973L10.5061 1.43021C10.9095 4.18489 12.8287 6.34425 15.2772 6.79764L16.4515 7.01512C16.5808 7.03912 16.5808 7.24823 16.4515 7.27223L15.2772 7.4897C12.8286 7.94345 10.9091 10.1026 10.5061 12.8571L10.3128 14.1782C10.2915 14.3237 10.1056 14.3237 10.0843 14.1782L9.89096 12.8571C9.48763 10.1025 7.56837 7.9431 5.11989 7.4897L3.94562 7.27223C3.8163 7.24823 3.8163 7.03912 3.94562 7.01512L5.11989 6.79764C7.5685 6.3439 9.48794 4.18475 9.89096 1.43021L10.0843 0.108973Z" />
9
- <path d="M22.034 0.0726485C22.0473 -0.0242162 22.1635 -0.0242162 22.1768 0.0726485L22.2977 0.953473C22.5497 2.78993 23.7493 4.2295 25.2796 4.53176L26.0135 4.67675C26.0943 4.69275 26.0943 4.83215 26.0135 4.84815L25.2796 4.99314C23.7492 5.29563 22.5495 6.73507 22.2977 8.57142L22.1768 9.45212C22.1635 9.54911 22.0473 9.54911 22.034 9.45212L21.9132 8.57142C21.6611 6.73497 20.4616 5.2954 18.9313 4.99314L18.1973 4.84815C18.1165 4.83215 18.1165 4.69275 18.1973 4.67675L18.9313 4.53176C20.4616 4.22926 21.6613 2.78983 21.9132 0.953473L22.034 0.0726485Z" />
10
- </svg>
11
- )
12
-
13
- export default SecureDelivery
@@ -1,35 +0,0 @@
1
- import React from 'react'
2
-
3
- import { SocialIcon as BaseSocialIcon } from 'react-social-icons'
4
-
5
- import { cn } from '../../util'
6
- import '../../style/social-svg.css'
7
-
8
- interface SocialIconProps {
9
- // one of these: https://github.com/couetilc/react-social-icons/tree/main/db
10
- network: string
11
- size: number
12
- className?: string
13
- }
14
-
15
- const SocialIcon: React.FC<SocialIconProps> = ({
16
- network,
17
- size,
18
- className = ''
19
- }) => (
20
- <BaseSocialIcon
21
- network={network}
22
- as='div'
23
- // This is set up so the enclosing element sets the color.
24
- // For example, something like 'color-foreground hover:color-muted-1'
25
- className={cn('color-inherit', className)}
26
- bgColor='transparent'
27
- fgColor='currentColor'
28
- style={{height: size, width: size}}
29
- />
30
- )
31
-
32
- export {
33
- type SocialIconProps,
34
- SocialIcon as default
35
- }
package/common/index.ts DELETED
@@ -1,14 +0,0 @@
1
- export { default as ChatWidget } from './chat-widget'
2
- export { default as ContactDialog } from './contact-dialog'
3
- export { default as Copyright} from './copyright'
4
- export { default as DrawerMenu } from './drawer-menu'
5
- export { default as Footer } from './footer'
6
- export { default as Header } from './header'
7
- export {
8
- default as HeadMetadata,
9
- getTitleFromTemplateString,
10
- TwitterComponent
11
- } from './head-metadata'
12
- export * as Icons from './icons'
13
- export { default as Logo } from './logo'
14
- export { default as MiniChart } from './mini-chart'
package/common/logo.tsx DELETED
@@ -1,71 +0,0 @@
1
- import React from 'react'
2
- import Link from 'next/link'
3
-
4
- import { type TShirtSize } from '../types'
5
- import { cn } from '../util'
6
- import { Icons } from '.'
7
-
8
- const Logo: React.FC<{
9
- size?: TShirtSize
10
- logoOnly?: boolean
11
- href?: string
12
- className?: string
13
- }> = ({
14
- size,
15
- href, // no default please!
16
- className='',
17
- logoOnly=false
18
- }) => {
19
- let classes: any = {}
20
- const toAdd = (logoOnly) ? {
21
- span: ' hidden',
22
- icon: ' mr-r'
23
- } : {
24
- span: '',
25
- icon: ''
26
- }
27
- if (size === 'lg' || size === 'xl' ) { // for safety
28
- classes.icon = 'h-10 w-10 mr-4 color-inherit' + toAdd.icon
29
- classes.span = 'text-3xl' + toAdd.span
30
- }
31
- // match lux.network
32
- else if (size === 'md') {
33
- classes.icon = 'h-[32px] w-[32px] mr-[12px] color-inherit' + toAdd.icon
34
- classes.span = 'text-[26px]/[26px] tracking-tighter' + toAdd.span
35
- }
36
- else if (size === 'sm' ) {
37
- classes.icon = 'h-6 w-6 mr-2 color-inherit' + toAdd.icon
38
- classes.span = 'text-lg' + toAdd.span
39
- }
40
- // xs
41
- else {
42
- classes.icon = 'h-4 w-4 mr-1 color-inherit' + toAdd.icon
43
- classes.span = 'text-base' + toAdd.span
44
- }
45
-
46
- const outerClasses = 'flex flex-row items-center ' + className
47
- const spanClasses = 'inline-block font-bold font-heading '
48
- + (href ? 'hover:text-accent ' : 'cursor-default ')
49
- + classes.span
50
-
51
- const Inner: React.FC = () => (<>
52
- <Icons.logo className={classes.icon} />
53
- <span className={cn(spanClasses, ' text-inherit')}>LUX</span>
54
- </>)
55
-
56
-
57
- return (
58
- href ? (
59
- <Link href={href} className={outerClasses} >
60
- <Inner />
61
- </Link>
62
-
63
- ) : (
64
- <span className={outerClasses} >
65
- <Inner />
66
- </span>
67
- )
68
- )
69
- }
70
-
71
- export default Logo
@@ -1,8 +0,0 @@
1
- import MiniChart from './wrapper'
2
- // import { type MiniChartProps, type MiniChartDateRanges } from './mini-chart-props'
3
-
4
- export {
5
- MiniChart as default,
6
- // type MiniChartProps,
7
- // type MiniChartDateRanges
8
- }