@luxfi/ui 5.5.3 → 5.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (244) hide show
  1. package/dist/accordion.cjs +213 -0
  2. package/dist/accordion.js +186 -0
  3. package/dist/alert.cjs +553 -0
  4. package/dist/alert.js +531 -0
  5. package/dist/avatar.cjs +149 -0
  6. package/dist/avatar.js +125 -0
  7. package/dist/badge.cjs +611 -0
  8. package/dist/badge.js +589 -0
  9. package/dist/button.cjs +689 -0
  10. package/dist/button.js +664 -0
  11. package/dist/checkbox.cjs +265 -0
  12. package/dist/checkbox.js +241 -0
  13. package/dist/close-button.cjs +73 -0
  14. package/dist/close-button.js +51 -0
  15. package/dist/collapsible.cjs +702 -0
  16. package/dist/collapsible.js +679 -0
  17. package/dist/color-mode.cjs +96 -0
  18. package/dist/color-mode.js +72 -0
  19. package/dist/dialog.cjs +279 -0
  20. package/dist/dialog.js +246 -0
  21. package/dist/drawer.cjs +207 -0
  22. package/dist/drawer.js +175 -0
  23. package/dist/empty-state.cjs +93 -0
  24. package/dist/empty-state.js +71 -0
  25. package/dist/field.cjs +183 -0
  26. package/dist/field.js +160 -0
  27. package/dist/heading.cjs +46 -0
  28. package/dist/heading.js +40 -0
  29. package/dist/icon-button.cjs +491 -0
  30. package/dist/icon-button.js +470 -0
  31. package/dist/image.cjs +572 -0
  32. package/dist/image.js +551 -0
  33. package/dist/index.cjs +5779 -0
  34. package/dist/index.js +5619 -0
  35. package/dist/input-group.cjs +155 -0
  36. package/dist/input-group.js +133 -0
  37. package/dist/input.cjs +65 -0
  38. package/dist/input.js +59 -0
  39. package/dist/link.cjs +630 -0
  40. package/dist/link.js +606 -0
  41. package/dist/menu.cjs +305 -0
  42. package/dist/menu.js +269 -0
  43. package/dist/pin-input.cjs +182 -0
  44. package/dist/pin-input.js +160 -0
  45. package/dist/popover.cjs +327 -0
  46. package/dist/popover.js +294 -0
  47. package/dist/progress-circle.cjs +152 -0
  48. package/dist/progress-circle.js +128 -0
  49. package/dist/progress.cjs +117 -0
  50. package/dist/progress.js +94 -0
  51. package/dist/provider.cjs +62 -0
  52. package/dist/provider.js +40 -0
  53. package/dist/radio.cjs +177 -0
  54. package/dist/radio.js +153 -0
  55. package/dist/rating.cjs +80 -0
  56. package/dist/rating.js +58 -0
  57. package/dist/select.cjs +791 -0
  58. package/dist/select.js +757 -0
  59. package/dist/separator.cjs +57 -0
  60. package/dist/separator.js +51 -0
  61. package/dist/skeleton.cjs +370 -0
  62. package/dist/skeleton.js +346 -0
  63. package/dist/slider.cjs +138 -0
  64. package/dist/slider.js +115 -0
  65. package/dist/switch.cjs +163 -0
  66. package/dist/switch.js +140 -0
  67. package/dist/table.cjs +1044 -0
  68. package/dist/table.js +1013 -0
  69. package/dist/tabs.cjs +240 -0
  70. package/dist/tabs.js +213 -0
  71. package/dist/tag.cjs +651 -0
  72. package/dist/tag.js +628 -0
  73. package/dist/textarea.cjs +65 -0
  74. package/dist/textarea.js +59 -0
  75. package/dist/toaster.cjs +99 -0
  76. package/dist/toaster.js +96 -0
  77. package/dist/tooltip.cjs +171 -0
  78. package/dist/tooltip.js +148 -0
  79. package/dist/utils.cjs +11 -0
  80. package/dist/utils.js +9 -0
  81. package/package.json +270 -65
  82. package/src/accordion.tsx +285 -0
  83. package/src/alert.tsx +221 -0
  84. package/src/avatar.tsx +174 -0
  85. package/src/badge.tsx +158 -0
  86. package/src/button.tsx +411 -0
  87. package/src/checkbox.tsx +307 -0
  88. package/src/close-button.tsx +51 -0
  89. package/src/collapsible.tsx +126 -0
  90. package/src/color-mode.tsx +125 -0
  91. package/src/dialog.tsx +356 -0
  92. package/src/drawer.tsx +186 -0
  93. package/src/empty-state.tsx +97 -0
  94. package/src/field.tsx +202 -0
  95. package/src/heading.tsx +55 -0
  96. package/src/icon-button.tsx +192 -0
  97. package/src/image.tsx +280 -0
  98. package/src/index.ts +192 -0
  99. package/src/input-group.tsx +159 -0
  100. package/src/input.tsx +60 -0
  101. package/src/link.tsx +326 -0
  102. package/src/menu.tsx +471 -0
  103. package/src/pin-input.tsx +187 -0
  104. package/src/popover.tsx +400 -0
  105. package/src/progress-circle.tsx +180 -0
  106. package/src/progress.tsx +109 -0
  107. package/src/provider.tsx +12 -0
  108. package/src/radio.tsx +175 -0
  109. package/src/rating.tsx +79 -0
  110. package/src/select.tsx +696 -0
  111. package/src/separator.tsx +59 -0
  112. package/src/skeleton.tsx +302 -0
  113. package/src/slider.tsx +152 -0
  114. package/src/switch.tsx +158 -0
  115. package/src/table.tsx +621 -0
  116. package/src/tabs.tsx +354 -0
  117. package/src/tag.tsx +159 -0
  118. package/src/textarea.tsx +60 -0
  119. package/src/toaster.tsx +117 -0
  120. package/src/tokens.css +438 -0
  121. package/src/tooltip.tsx +184 -0
  122. package/src/utils/cn.ts +7 -0
  123. package/src/utils.ts +6 -0
  124. package/tokens.css +438 -0
  125. package/commerce/ui/conf.ts +0 -13
  126. package/commerce/ui/context.tsx +0 -123
  127. package/commerce/ui/store.ts +0 -295
  128. package/components/access-code-input.tsx +0 -71
  129. package/components/analytics.tsx +0 -23
  130. package/components/auth/auth-listener.tsx +0 -29
  131. package/components/auth/auth-token/clear-auth-token.tsx +0 -12
  132. package/components/auth/auth-token/set-auth-token.tsx +0 -16
  133. package/components/auth/common-auth-domains.ts +0 -17
  134. package/components/auth/login-panel.tsx +0 -111
  135. package/components/auth/mobile-login-button.tsx +0 -107
  136. package/components/auth/signup-panel.tsx +0 -113
  137. package/components/back-button.tsx +0 -49
  138. package/components/chat-widget.tsx +0 -85
  139. package/components/commerce/bag-button.tsx +0 -98
  140. package/components/commerce/buy-button.tsx +0 -34
  141. package/components/commerce/checkout-button.tsx +0 -129
  142. package/components/commerce/checkout-panel/cart-accordian.tsx +0 -66
  143. package/components/commerce/checkout-panel/checkout-panel-props.ts +0 -10
  144. package/components/commerce/checkout-panel/desktop-bag-carousel.tsx +0 -36
  145. package/components/commerce/checkout-panel/desktop-cp.tsx +0 -83
  146. package/components/commerce/checkout-panel/index.tsx +0 -126
  147. package/components/commerce/checkout-panel/mobile-cp.tsx +0 -67
  148. package/components/commerce/checkout-panel/policy-links.tsx +0 -29
  149. package/components/commerce/checkout-panel/steps-indicator.tsx +0 -39
  150. package/components/commerce/checkout-panel/thank-you.tsx +0 -18
  151. package/components/commerce/desktop-bag-popup.tsx +0 -78
  152. package/components/commerce/drawer/index.tsx +0 -88
  153. package/components/commerce/drawer/micro.tsx +0 -145
  154. package/components/commerce/drawer/shell.tsx +0 -85
  155. package/components/contact-dialog/contact-form.tsx +0 -116
  156. package/components/contact-dialog/disclaimer.tsx +0 -13
  157. package/components/contact-dialog/index.tsx +0 -64
  158. package/components/copyright.tsx +0 -21
  159. package/components/drawer-margin.tsx +0 -28
  160. package/components/footer.tsx +0 -78
  161. package/components/header/desktop-nav-menu.tsx +0 -204
  162. package/components/header/desktop.tsx +0 -65
  163. package/components/header/index.tsx +0 -50
  164. package/components/header/mobile-bag-drawer.tsx +0 -51
  165. package/components/header/mobile-menu-toggle-button.tsx +0 -35
  166. package/components/header/mobile-nav-menu-ai.tsx +0 -51
  167. package/components/header/mobile-nav-menu-item.tsx +0 -47
  168. package/components/header/mobile-nav-menu.tsx +0 -102
  169. package/components/header/mobile.tsx +0 -170
  170. package/components/header/theme-toggle.tsx +0 -26
  171. package/components/icons/avatar.tsx +0 -11
  172. package/components/icons/bag-icon.tsx +0 -10
  173. package/components/icons/index.ts +0 -6
  174. package/components/icons/left-arrow.tsx +0 -11
  175. package/components/icons/lux-logo.tsx +0 -10
  176. package/components/icons/right-arrow.tsx +0 -10
  177. package/components/icons/social-icon.tsx +0 -35
  178. package/components/icons/social-svg.css +0 -3
  179. package/components/index.ts +0 -26
  180. package/components/logo.tsx +0 -92
  181. package/components/main.tsx +0 -27
  182. package/components/mini-chart/index.tsx +0 -8
  183. package/components/mini-chart/mini-chart-props.ts +0 -44
  184. package/components/mini-chart/mini-chart.tsx +0 -85
  185. package/components/mini-chart/wrapper.tsx +0 -23
  186. package/components/not-found/index.tsx +0 -28
  187. package/components/not-found/not-found-content.mdx +0 -5
  188. package/components/tooltip.tsx +0 -31
  189. package/environment.d.ts +0 -6
  190. package/next/analytics/fpixel.ts +0 -16
  191. package/next/analytics/google-analytics.ts +0 -14
  192. package/next/analytics/index.ts +0 -3
  193. package/next/analytics/pixel-analytics.tsx +0 -55
  194. package/next/font/get-app-router-font-classes.ts +0 -17
  195. package/next/font/load-and-return-lux-next-fonts-on-import.ts +0 -68
  196. package/next/font/local/Druk-Wide-Bold.ttf +0 -0
  197. package/next/font/local/Druk-Wide-Medium.ttf +0 -0
  198. package/next/font/local/InterVariable-Italic.ttf +0 -0
  199. package/next/font/local/InterVariable-Italic.woff2 +0 -0
  200. package/next/font/local/InterVariable.ttf +0 -0
  201. package/next/font/local/InterVariable.woff2 +0 -0
  202. package/next/font/next-font-desc.ts +0 -28
  203. package/next/font/pages-router-font-vars.tsx +0 -18
  204. package/next/head-metadata/from-next/metadata-types.ts +0 -158
  205. package/next/head-metadata/from-next/opengraph-types.ts +0 -267
  206. package/next/head-metadata/from-next/twitter-types.ts +0 -92
  207. package/next/head-metadata/index.tsx +0 -208
  208. package/next/index.ts +0 -2
  209. package/next/middleware/determine-device-mw.ts +0 -29
  210. package/root-layout/WHY_THIS_IS_SEPARATE.txt +0 -2
  211. package/root-layout/index.tsx +0 -112
  212. package/site-def/footer/community.tsx +0 -61
  213. package/site-def/footer/company.ts +0 -37
  214. package/site-def/footer/ecosystem.ts +0 -37
  215. package/site-def/footer/index.tsx +0 -26
  216. package/site-def/footer/legal.ts +0 -28
  217. package/site-def/footer/network.ts +0 -45
  218. package/site-def/footer/svg/warpcast-logo.svg +0 -12
  219. package/site-def/index.ts +0 -4
  220. package/site-def/main-nav.tsx +0 -460
  221. package/style/cart-animation.css +0 -29
  222. package/style/checkout-animation.css +0 -23
  223. package/style/drawer-handle-overrides.css +0 -160
  224. package/style/fonts/COPY_TO_PUBLIC_FOR_NON_NEXT.txt +0 -0
  225. package/style/fonts/Druk-Wide-Bold.ttf +0 -0
  226. package/style/fonts/Druk-Wide-Medium.ttf +0 -0
  227. package/style/fonts/InterVariable-Italic.ttf +0 -0
  228. package/style/fonts/InterVariable-Italic.woff2 +0 -0
  229. package/style/fonts/InterVariable.ttf +0 -0
  230. package/style/fonts/InterVariable.woff2 +0 -0
  231. package/style/lux-colors.css +0 -85
  232. package/style/lux-fonts.css +0 -30
  233. package/style/lux-global-non-next.css +0 -52
  234. package/style/lux-global.css +0 -51
  235. package/tailwind/fontFamily.tailwind.lux.ts +0 -18
  236. package/tailwind/index.ts +0 -2
  237. package/tailwind/lux-tw-fonts.ts +0 -40
  238. package/tailwind/tailwind.config.lux-preset.ts +0 -10
  239. package/tsconfig.json +0 -15
  240. package/types/chatbot-config.ts +0 -7
  241. package/types/chatbot-suggested-question.ts +0 -7
  242. package/types/contact-info.ts +0 -11
  243. package/types/index.ts +0 -4
  244. package/types/site-def.ts +0 -46
@@ -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
package/next/index.ts DELETED
@@ -1,2 +0,0 @@
1
- export { default as determineDeviceMW } from './middleware/determine-device-mw'
2
- export { default as HeadMetadata } from './head-metadata'
@@ -1,29 +0,0 @@
1
- import { NextRequest, NextResponse, userAgent } from 'next/server'
2
- import { getSelectorsByUserAgent } from 'react-device-detect'
3
- import { setCookie } from 'cookies-next'
4
-
5
- // writed this way so they can be chained :)
6
- const determineDeviceMW = async (request: NextRequest) => {
7
-
8
- const ua = userAgent(request)
9
- const { isMobileOnly, isTablet, isDesktop } = getSelectorsByUserAgent(ua.ua)
10
- const agent = isMobileOnly ? 'phone' : (isTablet ? 'tablet' : (isDesktop ? 'desktop' : 'unknown'))
11
- const { nextUrl: url } = request
12
- //console.log(`\n=== from ${url.href} on a *${agent && agent.toUpperCase()}* device. ===\n`)
13
- const auth_token = url.searchParams.get('auth-token')
14
- if (auth_token) {
15
- setCookie('auth-token', auth_token, {
16
- domain: url.hostname,
17
- path: '/',
18
- sameSite: 'none',
19
- secure: true,
20
- httpOnly: false,
21
- expires: new Date(Date.now() + 1000 * 60 * 60 * 24 * 30), // 30 days
22
- })
23
- url.searchParams.delete('auth-token')
24
- }
25
- url.searchParams.set('agent', agent)
26
- return NextResponse.rewrite(url)
27
- }
28
-
29
- export default determineDeviceMW
@@ -1,2 +0,0 @@
1
- Unwise to have this in a barrel / index file that is mostly imported by a Client Component.
2
- Creates Next / SSR issues
@@ -1,112 +0,0 @@
1
- import React, { type PropsWithChildren } from 'react'
2
- import type { Viewport } from 'next'
3
-
4
- import { Toaster } from '@hanzo/ui/primitives'
5
- import { AuthServiceProvider } from '@hanzo/auth/service'
6
- import type { AuthServiceConf } from '@hanzo/auth/types'
7
- import { CommerceProvider } from '@hanzo/commerce'
8
-
9
- import getAppRouterBodyFontClasses from '../next/font/get-app-router-font-classes'
10
- import { FacebookPixelHead } from '../next/analytics/pixel-analytics'
11
-
12
- import { CommerceUIProvider } from '../commerce/ui/context'
13
- import { AuthListener, ChatWidget, Header, Analytics } from '../components'
14
-
15
- import CommerceDrawer from '../components/commerce/drawer'
16
-
17
- import type SiteDef from '../types/site-def'
18
-
19
- import '../style/lux-global.css'
20
- import '../style/cart-animation.css'
21
- import '../style/checkout-animation.css'
22
-
23
-
24
- // Next 14: https://nextjs.org/docs/app/building-your-application/upgrading/codemods#use-viewport-export
25
- const viewport = {
26
- themeColor: [
27
- { media: '(prefers-color-scheme: light)', color: 'white' },
28
- { media: '(prefers-color-scheme: dark)', color: 'black' },
29
- ],
30
- } satisfies Viewport
31
-
32
- /*
33
- These '.variable' fields are actually autogenerate css classnames that *define* the actual
34
- css variables ('--<ugly-name>') that one asks for in the tailwind classes.
35
- They are what make them available in the global scope. So this MUST
36
- be done like this for the tailwind font classes to work.
37
-
38
- (...not to be confused with the css var itself. This field should be named something else!)
39
- */
40
-
41
- /*
42
- re body: overflow-y-hidden overflow-x-hidden, h-full
43
- We cannot have these on body tag for scroll-snap to work on iOS!
44
- */
45
- const bodyClasses =
46
- 'bg-background text-foreground flex flex-col min-h-full ' +
47
- getAppRouterBodyFontClasses()
48
-
49
- function RootLayout({
50
- showHeader = false,
51
- chatbot = false,
52
- siteDef,
53
- children,
54
- } : {
55
- siteDef: SiteDef
56
- showHeader?: boolean
57
- chatbot?: boolean
58
- } & PropsWithChildren) {
59
-
60
- // For static export, we don't have server-side auth
61
- // User auth will be handled client-side via AuthListener
62
- const currentUser = null
63
-
64
- const Guts: React.FC = () => (<>
65
- {showHeader && <Header siteDef={siteDef}/>}
66
- {children}
67
- {chatbot && (<ChatWidget
68
- title='LUX'
69
- subtitle='AI'
70
- chatbotUrl='https://lux.chat/iframe'
71
- suggestedQuestions={siteDef.chatbot?.suggestedQuestions ?? []}
72
- buttonClx='hidden md:block'
73
- />)}
74
- </>)
75
-
76
- return (
77
- <html lang='en' suppressHydrationWarning className='hanzo-ui-dark-theme' style={{backgroundColor: '#000'}}>
78
- <head >
79
- {/* https://stackoverflow.com/a/75716588/11645689 */ }
80
- <base target='_blank' />
81
- <FacebookPixelHead/>
82
- </head>
83
-
84
- <body suppressHydrationWarning className={bodyClasses} style={{
85
-
86
- // As noted above: 'overflow: hidden' on the <body> tag breaks scroll snap!
87
- display: 'none', // see analytics.tsx
88
- }}>
89
- <Analytics/>
90
- <AuthServiceProvider user={currentUser} conf={{} as AuthServiceConf}>
91
- {siteDef?.commerce ? (
92
- <CommerceProvider config={siteDef.commerce!} >
93
- <CommerceUIProvider >
94
- <Guts />
95
- <CommerceDrawer />
96
- </CommerceUIProvider>
97
- </CommerceProvider>
98
- ) : (
99
- <Guts />
100
- )}
101
- <AuthListener/>
102
- </AuthServiceProvider>
103
- <Toaster position='top-center' duration={3000}/>
104
- </body>
105
- </html>
106
- )
107
- }
108
-
109
- export {
110
- RootLayout,
111
- viewport
112
- }
@@ -1,61 +0,0 @@
1
- import type { LinkDef } from '@hanzo/ui/types'
2
-
3
- import { SocialIcon } from '../../components/icons'
4
-
5
- // @ts-ignore (will build in project that has @svgr support)
6
- import SVG_warp_logo from './svg/warpcast-logo.svg'
7
-
8
- const SOC_ICON_SIZE = 18
9
-
10
- export default [
11
- {
12
- title: 'Community',
13
- href: '',
14
- variant: 'linkFG',
15
- },
16
- {
17
- title: 'Lux Channel',
18
- href: 'https://warpcast.com/~/channel/lux',
19
- icon: <SVG_warp_logo width={SOC_ICON_SIZE} height={SOC_ICON_SIZE} /> //<SocialIcon network='warpcast' size={SOC_ICON_SIZE} />
20
- },
21
- {
22
- title: 'Lux Discussions',
23
- href: 'https://github.com/orgs/luxfi/discussions',
24
- icon: <SocialIcon network='github' size={SOC_ICON_SIZE} />
25
- },
26
- {
27
- title: 'Discord',
28
- href: 'https://discord.gg/sxaS7FFHwh',
29
- icon: <SocialIcon network='discord' size={SOC_ICON_SIZE} />
30
- },
31
- {
32
- title: 'Telegram',
33
- href: 'https://t.me/luxdefi',
34
- icon: <SocialIcon network='telegram' size={SOC_ICON_SIZE} />
35
- },
36
- {
37
- title: '@luxdefi',
38
- href: 'https://twitter.com/luxdefi',
39
- icon: <SocialIcon network='x' size={SOC_ICON_SIZE} />
40
- },
41
- {
42
- title: '@luxdefi',
43
- href: 'https://facebook.com/luxdefi',
44
- icon: <SocialIcon network='facebook' size={SOC_ICON_SIZE + 2} />
45
- },
46
- {
47
- title: '@luxdefi',
48
- href: 'https://www.instagram.com/luxdefi',
49
- icon: <SocialIcon network='instagram' size={SOC_ICON_SIZE + 2} />
50
- },
51
- {
52
- title: '@luxdefi',
53
- href: 'https://linkedin.com/company/luxdefi',
54
- icon: <SocialIcon network='linkedin' size={SOC_ICON_SIZE + 2} />
55
- },
56
- {
57
- title: '@luxdefi',
58
- href: 'https://www.youtube.com/@luxdefi',
59
- icon: <SocialIcon network='youtube' size={SOC_ICON_SIZE + 2} />
60
- },
61
- ] satisfies LinkDef[]
@@ -1,37 +0,0 @@
1
- import type { LinkDef } from '@hanzo/ui/types'
2
-
3
- export default [
4
- {
5
- title: 'Company',
6
- href: "https://lux.partners/",
7
- variant: 'linkFG',
8
- newTab: false,
9
- },
10
- {
11
- title: 'About',
12
- href: 'https://lux.partners',
13
- newTab: false,
14
- },
15
- {
16
- title: 'Brand',
17
- href: 'https://drive.google.com/drive/folders/14OJtKLVakGY6883XO9yGbiHtlFxQUUm5?usp=share_link',
18
- },
19
- {
20
- title: 'Careers',
21
- href: 'https://docs.google.com/document/d/1SCt0Hg7EIs06TootKCA1am1xo4mcXoKF/edit#heading=h.30j0zll',
22
- newTab: true,
23
- },
24
- {
25
- title: 'Partnerships',
26
- href: 'https://apply.lux.partners/',
27
- newTab: false,
28
- },
29
- {
30
- title: 'Press',
31
- href: 'mailto:ai@lux.partners?subject=%E2%96%BC%20Press',
32
- },
33
- {
34
- title: 'Help',
35
- href: 'mailto:ai@lux.partners?subject=%E2%96%BC%20Help',
36
- },
37
- ] satisfies LinkDef[]
@@ -1,37 +0,0 @@
1
- import type { LinkDef } from '@hanzo/ui/types'
2
-
3
- export default [
4
- {
5
- title: 'Ecosystem',
6
- href: 'https://lux.link',
7
- variant: 'linkFG'
8
- },
9
- {
10
- title: 'Lux AI',
11
- href: 'https://lux.chat',
12
- },
13
- {
14
- title: 'Lux Credit',
15
- href: 'https://lux.credit',
16
- },
17
- {
18
- title: 'Lux Exchange',
19
- href: 'https://lux.exchange',
20
- },
21
- {
22
- title: 'Lux Finance',
23
- href: 'https://lux.finance',
24
- },
25
- {
26
- title: 'Lux Market',
27
- href: 'https://lux.market',
28
- },
29
- {
30
- title: 'Lux Shop',
31
- href: 'https://lux.shop',
32
- },
33
- {
34
- title: 'Lux Quest',
35
- href: 'https://lux.quest',
36
- },
37
- ] satisfies LinkDef[]
@@ -1,26 +0,0 @@
1
- import type { LinkDef } from '@hanzo/ui/types'
2
-
3
- import ecosystem from './ecosystem'
4
- import network from './network'
5
- import company from './company'
6
- import community from './community'
7
- import { legal, legalColumn } from './legal'
8
-
9
-
10
- const standard = [
11
- ecosystem,
12
- network,
13
- company,
14
- community,
15
- ] satisfies LinkDef[][]
16
-
17
- export {
18
- ecosystem,
19
- network,
20
- company,
21
- community,
22
- legal,
23
- legalColumn,
24
- standard
25
- }
26
-
@@ -1,28 +0,0 @@
1
- import type { LinkDef } from '@hanzo/ui/types'
2
-
3
- const legal: LinkDef[] = [
4
- {
5
- title: 'Terms and Conditions',
6
- href: 'https://docs.google.com/document/d/1mvkjr1w8Rv8ttirs1mu-_2fw_PXclOyS/preview',
7
- newTab: true,
8
- },
9
- {
10
- title: 'Privacy Policy',
11
- href: 'https://docs.google.com/document/d/1vZjOKaNdOoThDIaVLERWxflQLtOsuvLn/preview',
12
- newTab: true,
13
- },
14
- ]
15
-
16
- const title: LinkDef =
17
- {
18
- title: 'Legal',
19
- href: '',
20
- variant: 'linkFG',
21
- }
22
-
23
- const legalColumn: LinkDef[] = [title, ...legal]
24
-
25
- export {
26
- legal,
27
- legalColumn
28
- }
@@ -1,45 +0,0 @@
1
- import type { LinkDef } from '@hanzo/ui/types'
2
-
3
- export default [
4
- {
5
- title: 'Network',
6
- href: "https://lux.network/",
7
- variant: 'linkFG'
8
- },
9
- {
10
- title: 'Lux Bridge',
11
- href: "https://bridge.lux.network/",
12
- },
13
- {
14
- title: 'Lux Explorer',
15
- href: "https://explore.lux.network/",
16
- },
17
- {
18
- title: 'Lux Wallet',
19
- href: "https://wallet.lux.network/",
20
- },
21
- {
22
- title: 'Lux Safe',
23
- href: "https://safe.lux.network/",
24
- },
25
- {
26
- title: 'Lux Validator',
27
- href: "https://lux.network/validator",
28
- },
29
- {
30
- title: 'Lux Coin',
31
- href: "https://lux.network/coin",
32
- },
33
- {
34
- title: 'Governance',
35
- href: "https://lux.vote",
36
- },
37
- {
38
- title: 'Open Source',
39
- href: 'https://github.com/luxfi',
40
- },
41
- {
42
- title: 'Launch Subnet',
43
- href: 'https://docs.lux.network/build/subnet/hello-subnet',
44
- },
45
- ] satisfies LinkDef[]
@@ -1,12 +0,0 @@
1
- <svg viewBox="0 0 1260 1260" fill="none" xmlns="http://www.w3.org/2000/svg">
2
- <g clip-path="url(#clip0_1_2)">
3
- <!-- path d="M947.747 1259.61H311.861C139.901 1259.61 0 1119.72 0 947.752V311.871C0 139.907 139.901 0.00541362 311.861 0.00541362H947.747C1119.71 0.00541362 1259.61 139.907 1259.61 311.871V947.752C1259.61 1119.72 1119.71 1259.61 947.747 1259.61Z" fill="#472A91"></path -->
4
- <path d="M826.513 398.633L764.404 631.889L702.093 398.633H558.697L495.789 633.607L433.087 398.633H269.764L421.528 914.36H562.431L629.807 674.876L697.181 914.36H838.388L989.819 398.633H826.513Z" fill="currentColor">
5
- </path>
6
- </g>
7
- <defs>
8
- <clipPath id="clip0_1_2">
9
- <rect width="1259.61" height="1259.61" fill="white"></rect>
10
- </clipPath>
11
- </defs>
12
- </svg>
package/site-def/index.ts DELETED
@@ -1,4 +0,0 @@
1
- export * as footer from './footer' // footer.standard, footer.community, etc
2
- export { default as mainNav } from './main-nav'
3
- export type { ChildMenu, LinkDefExtended } from './main-nav'
4
- export type { SiteDef } from '../types'