@hanzo/ui 2.5.1 → 3.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.
- package/blocks/components/card-block.tsx +1 -1
- package/blocks/components/screenful-block/content.tsx +2 -2
- package/package.json +11 -11
- package/primitives/carousel.tsx +2 -0
- package/primitives/icons/index.ts +18 -0
- package/primitives/index.ts +3 -0
- package/primitives/toggle-group.tsx +1 -1
- package/primitives/youtube-embed.tsx +1 -1
- package/style/hanzo-default-colors.css +2 -2
- package/{context-providers → style}/theme-provider.tsx +2 -2
- package/tailwind/fontFamily.tailwind.ts +7 -0
- package/tailwind/{fonts.tailwind.ts → fontSize.tailwind.ts} +1 -19
- package/tailwind/index.ts +4 -15
- package/tailwind/tailwind.config.hanzo-preset.d.ts +5 -0
- package/tailwind/{tailwind.config.base.js → tailwind.config.hanzo-preset.js} +4 -2
- package/tailwind/typo-plugin/get-plugin-styles.js +42 -42
- package/tailwind/typography-test.mdx +1 -1
- package/types/index.ts +5 -15
- package/assets/lux-site-icons/android-chrome-192x192.png +0 -0
- package/assets/lux-site-icons/android-chrome-512x512.png +0 -0
- package/assets/lux-site-icons/apple-touch-icon.png +0 -0
- package/assets/lux-site-icons/favicon-16x16.png +0 -0
- package/assets/lux-site-icons/favicon-32x32.png +0 -0
- package/assets/lux-site-icons/favicon.ico +0 -0
- package/assets/standard-docs/LUX-NFT-Terms-and-Conditions.pdf +0 -0
- package/assets/standard-docs/LUX-Privacy-Policy.pdf +0 -0
- package/common/chat-widget.tsx +0 -75
- package/common/contact-dialog/contact-form.tsx +0 -111
- package/common/contact-dialog/disclaimer.tsx +0 -13
- package/common/contact-dialog/index.tsx +0 -48
- package/common/copyright.tsx +0 -21
- package/common/drawer-menu.tsx +0 -54
- package/common/footer.tsx +0 -77
- package/common/head-metadata/from-next/metadata-types.ts +0 -158
- package/common/head-metadata/from-next/opengraph-types.ts +0 -267
- package/common/head-metadata/from-next/twitter-types.ts +0 -92
- package/common/head-metadata/index.tsx +0 -208
- package/common/header/index.tsx +0 -66
- package/common/header/mobile-nav.tsx +0 -72
- package/common/header/theme-toggle.tsx +0 -26
- package/common/icons/index.tsx +0 -34
- package/common/icons/lux-logo.tsx +0 -10
- package/common/icons/secure-delivery.tsx +0 -13
- package/common/icons/social-icon.tsx +0 -35
- package/common/index.ts +0 -14
- package/common/logo.tsx +0 -71
- package/common/mini-chart/index.tsx +0 -8
- package/common/mini-chart/mini-chart-props.ts +0 -44
- package/common/mini-chart/mini-chart.tsx +0 -76
- package/common/mini-chart/wrapper.tsx +0 -23
- package/context-providers/index.ts +0 -1
- package/next/README.md +0 -11
- package/next/analytics/fpixel.ts +0 -18
- package/next/analytics/pixel-analytics.tsx +0 -55
- package/next/determine-device-middleware.ts +0 -16
- package/next/fonts/DrukTextWide-Bold-Trial.otf +0 -0
- package/next/fonts/DrukTextWide-Heavy-Trial.otf +0 -0
- package/next/fonts/DrukTextWide-Medium-Trial.otf +0 -0
- package/next/fonts/DrukWide-Bold-Trial.otf +0 -0
- package/next/fonts/DrukWide-Heavy-Trial.otf +0 -0
- package/next/fonts/DrukWide-Medium-Trial.otf +0 -0
- package/next/get-app-router-font-classes.ts +0 -12
- package/next/load-and-return-lux-next-fonts-on-import.ts +0 -94
- package/next/next-font-desc.ts +0 -28
- package/next/not-found-content.mdx +0 -5
- package/next/not-found.tsx +0 -23
- package/next/pages-router-font-vars.tsx +0 -18
- package/next/root-layout.tsx +0 -62
- package/siteDef/footer/community.tsx +0 -67
- package/siteDef/footer/company.ts +0 -37
- package/siteDef/footer/ecosystem.ts +0 -37
- package/siteDef/footer/index.tsx +0 -26
- package/siteDef/footer/legal.ts +0 -28
- package/siteDef/footer/network.ts +0 -37
- package/siteDef/footer/svg/warpcast-logo.svg +0 -12
- package/siteDef/main-nav.ts +0 -35
- package/style/social-svg.css +0 -3
- package/tailwind/lux-tw-fonts.ts +0 -37
- package/types/site-def.ts +0 -36
- /package/{common → primitives}/icons/github.tsx +0 -0
- /package/{common → primitives}/icons/youtube-logo.tsx +0 -0
|
@@ -90,8 +90,8 @@ const Content: React.FC<{
|
|
|
90
90
|
className='',
|
|
91
91
|
}) => {
|
|
92
92
|
|
|
93
|
-
|
|
94
|
-
const layoutClx = 'flex flex-col gap-2 sm:gap-4 ' + ((agent !== 'phone') ? ('md:grid md:gap-8 ' + `md:grid-cols-${b.contentColumns.length} `) : '')
|
|
93
|
+
// We need to set h-full when we have more than 1 column too, so the grid takes full height - Firefox and Safari fix.
|
|
94
|
+
const layoutClx = 'flex flex-col gap-2 sm:gap-4 h-full pt-11 lg:pt-20 ' + ((agent !== 'phone') ? ('md:grid md:gap-8 ' + `md:grid-cols-${b.contentColumns.length} `) : '')
|
|
95
95
|
|
|
96
96
|
const orderclx = (columnIndex: number): string => {
|
|
97
97
|
const orderIndex = b.mobileOrder?.indexOf(columnIndex)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hanzo/ui",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "3.0.1",
|
|
4
4
|
"description": "Library that contains shared UI primitives, support for a common design system, and other boilerplate support.",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/",
|
|
@@ -29,7 +29,6 @@
|
|
|
29
29
|
"clean": "rm -rf dist && rm -rf node_modules"
|
|
30
30
|
},
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"@hookform/resolvers": "^3.3.2",
|
|
33
32
|
"@next/third-parties": "^14.1.0",
|
|
34
33
|
"@radix-ui/react-accordion": "^1.1.2",
|
|
35
34
|
"@radix-ui/react-aspect-ratio": "^1.0.3",
|
|
@@ -54,29 +53,30 @@
|
|
|
54
53
|
"class-variance-authority": "^0.7.0",
|
|
55
54
|
"clsx": "^2.1.0",
|
|
56
55
|
"cmdk": "^0.2.0",
|
|
56
|
+
"embla-carousel-autoplay": "8.0.0-rc15",
|
|
57
57
|
"embla-carousel-react": "8.0.0-rc15",
|
|
58
58
|
"input-otp": "^1.0.1",
|
|
59
59
|
"lodash.castarray": "^4.4.0",
|
|
60
60
|
"lodash.isplainobject": "^4.0.6",
|
|
61
61
|
"lodash.merge": "^4.6.2",
|
|
62
|
-
"lucide-react": "^0.344.0",
|
|
63
62
|
"markdown-to-jsx": "^7.3.2",
|
|
64
63
|
"postcss-selector-parser": "^6.0.13",
|
|
65
64
|
"react-day-picker": "^8.7.1",
|
|
66
|
-
"react-device-detect": "^2.2.3",
|
|
67
|
-
"react-hook-form": "^7.47.0",
|
|
68
65
|
"react-intersection-observer": "^9.7.0",
|
|
69
|
-
"react-social-icons": "^6.14.0",
|
|
70
66
|
"tailwind-merge": "^2.2.0",
|
|
71
|
-
"tailwindcss-
|
|
72
|
-
"
|
|
73
|
-
"zod": "3.21.4"
|
|
67
|
+
"tailwindcss-animate": "^1.0.6",
|
|
68
|
+
"tailwindcss-interaction-media": "^0.1.0"
|
|
74
69
|
},
|
|
75
70
|
"peerDependencies": {
|
|
71
|
+
"@hookform/resolvers": "^3.3.2",
|
|
72
|
+
"lucide-react": "^0.344.0",
|
|
76
73
|
"next": "^14.1.0",
|
|
77
74
|
"next-themes": "^0.2.1",
|
|
78
75
|
"react": "^18.2.0",
|
|
79
|
-
"react-dom": "^18.2.0"
|
|
76
|
+
"react-dom": "^18.2.0",
|
|
77
|
+
"react-hook-form": "^7.47.0",
|
|
78
|
+
"validator": "^13.11.0",
|
|
79
|
+
"zod": "3.21.4"
|
|
80
80
|
},
|
|
81
81
|
"devDependencies": {
|
|
82
82
|
"@mdx-js/loader": "^3.0.0",
|
|
@@ -85,7 +85,7 @@
|
|
|
85
85
|
"@types/gtag.js": "^0.0.19",
|
|
86
86
|
"@types/lodash.merge": "^4.6.9",
|
|
87
87
|
"@types/mdx": "^2.0.9",
|
|
88
|
-
"@types/react": "^18.2.
|
|
88
|
+
"@types/react": "^18.2.64",
|
|
89
89
|
"@types/react-dom": "^18.2.18",
|
|
90
90
|
"tailwindcss": "^3.4.1",
|
|
91
91
|
"typescript": "5.3.3"
|
package/primitives/carousel.tsx
CHANGED
|
@@ -5,6 +5,7 @@ import useEmblaCarousel, {
|
|
|
5
5
|
type UseEmblaCarouselType,
|
|
6
6
|
} from 'embla-carousel-react'
|
|
7
7
|
import { ArrowLeft, ArrowRight } from 'lucide-react'
|
|
8
|
+
import Autoplay from "embla-carousel-autoplay"
|
|
8
9
|
|
|
9
10
|
import { cn } from '../util'
|
|
10
11
|
import { Button } from '.'
|
|
@@ -260,4 +261,5 @@ export {
|
|
|
260
261
|
CarouselItem,
|
|
261
262
|
CarouselPrevious,
|
|
262
263
|
CarouselNext,
|
|
264
|
+
Autoplay as CarouselAutoplayPlugin
|
|
263
265
|
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import {
|
|
2
|
+
Moon as moon,
|
|
3
|
+
SunMedium as sun,
|
|
4
|
+
Menu as burger,
|
|
5
|
+
ArrowUpRight as linkOut,
|
|
6
|
+
} from 'lucide-react'
|
|
7
|
+
|
|
8
|
+
import youtube from './youtube-logo'
|
|
9
|
+
import gitHub from './github'
|
|
10
|
+
|
|
11
|
+
export {
|
|
12
|
+
sun,
|
|
13
|
+
moon,
|
|
14
|
+
burger,
|
|
15
|
+
gitHub,
|
|
16
|
+
linkOut,
|
|
17
|
+
youtube,
|
|
18
|
+
}
|
package/primitives/index.ts
CHANGED
|
@@ -132,11 +132,13 @@ export {
|
|
|
132
132
|
} from './input-otp'
|
|
133
133
|
|
|
134
134
|
export {
|
|
135
|
+
type CarouselApi,
|
|
135
136
|
Carousel,
|
|
136
137
|
CarouselContent,
|
|
137
138
|
CarouselItem,
|
|
138
139
|
CarouselNext,
|
|
139
140
|
CarouselPrevious,
|
|
141
|
+
CarouselAutoplayPlugin,
|
|
140
142
|
} from './carousel'
|
|
141
143
|
|
|
142
144
|
export { Toggle, toggleVariants } from './toggle'
|
|
@@ -165,3 +167,4 @@ export { default as NavItems} from './nav-items'
|
|
|
165
167
|
export { default as Main } from './main'
|
|
166
168
|
export { default as ListBox } from './list-box'
|
|
167
169
|
|
|
170
|
+
export * as Icons from './icons'
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
@layer base {
|
|
5
5
|
|
|
6
|
-
:root, .
|
|
6
|
+
:root, .hanzo-ui-light-theme {
|
|
7
7
|
--hz-ui-fg-0: hsl(0 0% 0%);
|
|
8
8
|
--hz-ui-fg-body: hsl(0 0% 10%);
|
|
9
9
|
--hz-ui-fg-1: hsl(0 0% 20%);
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
--hz-ui-radius: 0.5rem;
|
|
50
50
|
}
|
|
51
51
|
|
|
52
|
-
.
|
|
52
|
+
.hanzo-ui-dark-theme {
|
|
53
53
|
|
|
54
54
|
--hz-ui-fg-0: hsl(0 0% 100%);
|
|
55
55
|
--hz-ui-fg-body: hsl(0, 0%, 97%);
|
|
@@ -9,8 +9,8 @@ const ThemeProvider: React.FC<ThemeProviderProps> = ({ children, ...props }) =>
|
|
|
9
9
|
attribute="class"
|
|
10
10
|
{...props}
|
|
11
11
|
value={{
|
|
12
|
-
light: '
|
|
13
|
-
dark: '
|
|
12
|
+
light: 'hanzo-ui-light-theme',
|
|
13
|
+
dark: 'hanzo-ui-dark-theme'
|
|
14
14
|
}}
|
|
15
15
|
>
|
|
16
16
|
{children}
|
|
@@ -1,22 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
import type TwFontDesc from './tw-font-desc'
|
|
3
|
-
|
|
4
|
-
export const fontFamily = (ignoreTheme: any): {
|
|
5
|
-
[key: string]: string[]
|
|
6
|
-
} => {
|
|
7
|
-
|
|
8
|
-
let result: any = {}
|
|
9
|
-
luxTwFonts.forEach((font: TwFontDesc) => {
|
|
10
|
-
result[font.twName] = font.fontFamily
|
|
11
|
-
// eg: heading: ['var(--font-druk-text-wide)']
|
|
12
|
-
})
|
|
13
|
-
|
|
14
|
-
return result as {
|
|
15
|
-
[key: string]: string[]
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
export const fontSize = {
|
|
1
|
+
export default {
|
|
20
2
|
xxs: ['0.65rem', { lineHeight: '0.8rem' }], // very fine print
|
|
21
3
|
xs: ['0.8rem', { lineHeight: '1rem' }], // fine print
|
|
22
4
|
sm: ['0.9rem', { lineHeight: '1.2rem' }], // 'standard' some news article cards (set manually when using typography-sm)
|
package/tailwind/index.ts
CHANGED
|
@@ -1,18 +1,7 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import safelist from './safelist.tailwind'
|
|
4
|
-
import screens from './screens.tailwind'
|
|
5
|
-
import spacing from './spacing.tailwind'
|
|
6
|
-
import typographyPlugin from './typo-plugin'
|
|
7
|
-
import config from './tailwind.config.base'
|
|
1
|
+
import preset from './tailwind.config.hanzo-preset'
|
|
2
|
+
import type TwFontDesc from './tw-font-desc'
|
|
8
3
|
|
|
9
4
|
export {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
fontFamily,
|
|
13
|
-
fontSize,
|
|
14
|
-
safelist,
|
|
15
|
-
screens,
|
|
16
|
-
spacing,
|
|
17
|
-
typographyPlugin
|
|
5
|
+
preset,
|
|
6
|
+
type TwFontDesc
|
|
18
7
|
}
|
|
@@ -6,12 +6,14 @@ import colors from './colors.tailwind'
|
|
|
6
6
|
import safelist from './safelist.tailwind'
|
|
7
7
|
import screens from './screens.tailwind'
|
|
8
8
|
import spacing from './spacing.tailwind'
|
|
9
|
-
import
|
|
9
|
+
import fontSize from './fontSize.tailwind'
|
|
10
|
+
import fontFamily from './fontFamily.tailwind'
|
|
10
11
|
import typographyPlugin from './typo-plugin'
|
|
11
12
|
|
|
12
13
|
export default {
|
|
13
14
|
presets: [],
|
|
14
15
|
darkMode: ["class"],
|
|
16
|
+
content: [],
|
|
15
17
|
safelist,
|
|
16
18
|
plugins: [
|
|
17
19
|
animatePlugin,
|
|
@@ -296,7 +298,7 @@ export default {
|
|
|
296
298
|
0: '0',
|
|
297
299
|
DEFAULT: '1',
|
|
298
300
|
},
|
|
299
|
-
fontFamily,
|
|
301
|
+
fontFamily,
|
|
300
302
|
fontSize,
|
|
301
303
|
fontWeight: {
|
|
302
304
|
thin: '100',
|
|
@@ -7,29 +7,29 @@ import {
|
|
|
7
7
|
const typographyColorTheme = {
|
|
8
8
|
// vars are defined in global.css
|
|
9
9
|
// and dark mode is handled at that level.
|
|
10
|
-
'--tw-
|
|
11
|
-
'--tw-
|
|
12
|
-
'--tw-
|
|
13
|
-
'--tw-
|
|
14
|
-
'--tw-
|
|
15
|
-
'--tw-
|
|
16
|
-
'--tw-
|
|
17
|
-
'--tw-
|
|
18
|
-
'--tw-
|
|
19
|
-
'--tw-
|
|
20
|
-
'--tw-
|
|
21
|
-
'--tw-
|
|
22
|
-
'--tw-
|
|
23
|
-
'--tw-
|
|
24
|
-
'--tw-
|
|
25
|
-
'--tw-
|
|
26
|
-
'--tw-
|
|
27
|
-
'--tw-
|
|
10
|
+
'--tw-typo-plugin-body': "var(--hz-ui-fg-body)",
|
|
11
|
+
'--tw-typo-plugin-headings': "var(--hz-ui-fg-0)",
|
|
12
|
+
'--tw-typo-plugin-links': "var(--hz-ui-fg-0)",
|
|
13
|
+
'--tw-typo-plugin-links-hover': "var(--hz-ui-fg-2)",
|
|
14
|
+
'--tw-typo-plugin-bold': "var(--hz-ui-fg-0)",
|
|
15
|
+
'--tw-typo-plugin-counters': "var(--hz-ui-fg-4)",
|
|
16
|
+
'--tw-typo-plugin-bullets': "var(--hz-ui-fg-2)",
|
|
17
|
+
'--tw-typo-plugin-hr': "var(--hz-ui-fg-2)",
|
|
18
|
+
'--tw-typo-plugin-quotes': "var(--hz-ui-fg-body)",
|
|
19
|
+
'--tw-typo-plugin-quote-borders': "var(--hz-ui-fg-3)",
|
|
20
|
+
'--tw-typo-plugin-captions': "var(--hz-ui-fg-2)",
|
|
21
|
+
'--tw-typo-plugin-kbd': "var(--hz-ui-fg-0)",
|
|
22
|
+
'--tw-typo-plugin-kbd-shadows': "var(--hz-ui-fg-1)",
|
|
23
|
+
'--tw-typo-plugin-code': "var(--hz-ui-fg-0)",
|
|
24
|
+
'--tw-typo-plugin-pre-code': "var(--hz-ui-fg-1)",
|
|
25
|
+
'--tw-typo-plugin-pre-bg': "var(--hz-ui-bg-1)",
|
|
26
|
+
'--tw-typo-plugin-th-borders': "var(--hz-ui-fg-2)",
|
|
27
|
+
'--tw-typo-plugin-td-borders': "var(--hz-ui-fg-3)",
|
|
28
28
|
}
|
|
29
29
|
|
|
30
30
|
const defaultCSS = {
|
|
31
31
|
|
|
32
|
-
color: 'var(--tw-
|
|
32
|
+
color: 'var(--tw-typo-plugin-body)',
|
|
33
33
|
// YUCK maxWidth: '65ch',
|
|
34
34
|
p: {
|
|
35
35
|
textAlign: 'inherit'
|
|
@@ -37,17 +37,17 @@ const defaultCSS = {
|
|
|
37
37
|
'p:first-child': {},
|
|
38
38
|
'p:last-child': {},
|
|
39
39
|
a: {
|
|
40
|
-
color: 'var(--tw-
|
|
40
|
+
color: 'var(--tw-typo-plugin-links)',
|
|
41
41
|
textDecoration: 'underline',
|
|
42
42
|
fontWeight: '400',
|
|
43
43
|
},
|
|
44
44
|
'a:hover': {
|
|
45
|
-
color: 'var(--tw-
|
|
45
|
+
color: 'var(--tw-typo-plugin-links-hover)',
|
|
46
46
|
},
|
|
47
47
|
blockquote: {
|
|
48
48
|
fontWeight: '400',
|
|
49
49
|
fontStyle: 'italic',
|
|
50
|
-
color: 'var(--tw-
|
|
50
|
+
color: 'var(--tw-typo-plugin-quotes)',
|
|
51
51
|
quotes: '"\\201C""\\201D""\\2018""\\2019"',
|
|
52
52
|
},
|
|
53
53
|
//'blockquote::before': {},
|
|
@@ -65,7 +65,7 @@ const defaultCSS = {
|
|
|
65
65
|
display: 'block',
|
|
66
66
|
fontStyle: 'normal',
|
|
67
67
|
textAlign: 'right',
|
|
68
|
-
color: 'var(--tw-
|
|
68
|
+
color: 'var(--tw-typo-plugin-quotes)',
|
|
69
69
|
},
|
|
70
70
|
ol: {
|
|
71
71
|
listStyleType: 'decimal',
|
|
@@ -75,44 +75,44 @@ const defaultCSS = {
|
|
|
75
75
|
},
|
|
76
76
|
'ol > li::marker': {
|
|
77
77
|
fontWeight: '400',
|
|
78
|
-
color: 'var(--tw-
|
|
78
|
+
color: 'var(--tw-typo-plugin-counters)',
|
|
79
79
|
},
|
|
80
80
|
'ul > li::marker': {
|
|
81
|
-
color: 'var(--tw-
|
|
81
|
+
color: 'var(--tw-typo-plugin-bullets)',
|
|
82
82
|
},
|
|
83
83
|
'ul > li::before': {
|
|
84
84
|
},
|
|
85
85
|
hr: {
|
|
86
|
-
borderColor: 'var(--tw-
|
|
86
|
+
borderColor: 'var(--tw-typo-plugin-hr)',
|
|
87
87
|
borderTopWidth: 1,
|
|
88
88
|
},
|
|
89
89
|
h1: {
|
|
90
|
-
color: 'var(--tw-
|
|
90
|
+
color: 'var(--tw-typo-plugin-headings)',
|
|
91
91
|
fontWeight: '800',
|
|
92
92
|
textAlign: 'inherit'
|
|
93
93
|
},
|
|
94
94
|
h2: {
|
|
95
|
-
color: 'var(--tw-
|
|
95
|
+
color: 'var(--tw-typo-plugin-headings)',
|
|
96
96
|
fontWeight: '700',
|
|
97
97
|
textAlign: 'inherit'
|
|
98
98
|
},
|
|
99
99
|
h3: {
|
|
100
|
-
color: 'var(--tw-
|
|
100
|
+
color: 'var(--tw-typo-plugin-headings)',
|
|
101
101
|
fontWeight: '600',
|
|
102
102
|
textAlign: 'inherit'
|
|
103
103
|
},
|
|
104
104
|
h4: {
|
|
105
|
-
color: 'var(--tw-
|
|
105
|
+
color: 'var(--tw-typo-plugin-headings)',
|
|
106
106
|
fontWeight: '600',
|
|
107
107
|
textAlign: 'inherit'
|
|
108
108
|
},
|
|
109
109
|
h5: {
|
|
110
|
-
color: 'var(--tw-
|
|
110
|
+
color: 'var(--tw-typo-plugin-headings)',
|
|
111
111
|
fontWeight: '600',
|
|
112
112
|
textAlign: 'inherit'
|
|
113
113
|
},
|
|
114
114
|
h6: {
|
|
115
|
-
color: 'var(--tw-
|
|
115
|
+
color: 'var(--tw-typo-plugin-headings)',
|
|
116
116
|
textAlign: 'inherit'
|
|
117
117
|
},
|
|
118
118
|
img: {},
|
|
@@ -124,19 +124,19 @@ const defaultCSS = {
|
|
|
124
124
|
display: 'block',
|
|
125
125
|
},
|
|
126
126
|
strong: {
|
|
127
|
-
color: 'var(--tw-
|
|
127
|
+
color: 'var(--tw-typo-plugin-bold)',
|
|
128
128
|
fontWeight: '600',
|
|
129
129
|
},
|
|
130
130
|
video: {},
|
|
131
131
|
kbd: {
|
|
132
132
|
fontWeight: '500',
|
|
133
133
|
fontFamily: 'inherit',
|
|
134
|
-
color: 'var(--tw-
|
|
134
|
+
color: 'var(--tw-typo-plugin-kbd)',
|
|
135
135
|
boxShadow:
|
|
136
|
-
'0 0 0 1px rgb(var(--tw-
|
|
136
|
+
'0 0 0 1px rgb(var(--tw-typo-plugin-kbd-shadows) / 10%), 0 3px 0 rgb(var(--tw-typo-plugin-kbd-shadows) / 10%)',
|
|
137
137
|
},
|
|
138
138
|
code: {
|
|
139
|
-
color: 'var(--tw-
|
|
139
|
+
color: 'var(--tw-typo-plugin-code)',
|
|
140
140
|
fontWeight: '500',
|
|
141
141
|
},
|
|
142
142
|
'code::before': {
|
|
@@ -173,8 +173,8 @@ const defaultCSS = {
|
|
|
173
173
|
color: 'inherit',
|
|
174
174
|
},
|
|
175
175
|
pre: {
|
|
176
|
-
color: 'var(--tw-
|
|
177
|
-
backgroundColor: 'var(--tw-
|
|
176
|
+
color: 'var(--tw-typo-plugin-pre-code)',
|
|
177
|
+
backgroundColor: 'var(--tw-typo-plugin-pre-bg)',
|
|
178
178
|
overflowX: 'auto',
|
|
179
179
|
fontWeight: '400',
|
|
180
180
|
},
|
|
@@ -202,10 +202,10 @@ const defaultCSS = {
|
|
|
202
202
|
},
|
|
203
203
|
thead: {
|
|
204
204
|
borderBottomWidth: '1px',
|
|
205
|
-
borderBottomColor: 'var(--tw-
|
|
205
|
+
borderBottomColor: 'var(--tw-typo-plugin-th-borders)',
|
|
206
206
|
},
|
|
207
207
|
'thead th': {
|
|
208
|
-
color: 'var(--tw-
|
|
208
|
+
color: 'var(--tw-typo-plugin-headings)',
|
|
209
209
|
fontWeight: '600',
|
|
210
210
|
verticalAlign: 'bottom',
|
|
211
211
|
},
|
|
@@ -218,7 +218,7 @@ const defaultCSS = {
|
|
|
218
218
|
},
|
|
219
219
|
tfoot: {
|
|
220
220
|
borderTopWidth: '1px',
|
|
221
|
-
borderTopColor: 'var(--tw-
|
|
221
|
+
borderTopColor: 'var(--tw-typo-plugin-th-borders)',
|
|
222
222
|
},
|
|
223
223
|
'tfoot td': {
|
|
224
224
|
verticalAlign: 'top',
|
|
@@ -244,7 +244,7 @@ const defaultModifiers = (base) => ({
|
|
|
244
244
|
a: {},
|
|
245
245
|
'a:hover': {},
|
|
246
246
|
blockquote: {
|
|
247
|
-
//color: 'blue', //var(--tw-
|
|
247
|
+
//color: 'blue', //var(--tw-typo-plugin-quotes)',
|
|
248
248
|
//marginTop: pxToEm(32, 20),
|
|
249
249
|
//marginBottom: pxToEm(32, 20),
|
|
250
250
|
//paddingLeft: pxToEm(20, 20),
|
package/types/index.ts
CHANGED
|
@@ -11,19 +11,9 @@ export type {default as GridDef, GridColumnSpec} from './grid-def'
|
|
|
11
11
|
export type { TShirtDimensions, Dimensions } from './dimensions'
|
|
12
12
|
export type { ContactInfo, ContactInfoFields } from './contact-info'
|
|
13
13
|
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
import type TShirtSize from './t-shirt-size'
|
|
20
|
-
|
|
21
|
-
export {
|
|
22
|
-
type BulletItem,
|
|
23
|
-
type Icon,
|
|
24
|
-
type ImageDef,
|
|
25
|
-
type LinkDef,
|
|
26
|
-
type SiteDef,
|
|
27
|
-
type TShirtSize,
|
|
28
|
-
}
|
|
14
|
+
export type { default as BulletItem } from './bullet-item'
|
|
15
|
+
export type { default as Icon } from './icon'
|
|
16
|
+
export type { default as ImageDef } from './image-def'
|
|
17
|
+
export type { default as LinkDef } from './link-def'
|
|
18
|
+
export type { default as TShirtSize } from './t-shirt-size'
|
|
29
19
|
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/common/chat-widget.tsx
DELETED
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
'use client'
|
|
2
|
-
import React from 'react'
|
|
3
|
-
|
|
4
|
-
import { X } from 'lucide-react'
|
|
5
|
-
|
|
6
|
-
import LuxLogo from './icons/lux-logo'
|
|
7
|
-
import { Button, Card } from '../primitives'
|
|
8
|
-
|
|
9
|
-
const ChatWidget: React.FC<{
|
|
10
|
-
title: string,
|
|
11
|
-
chatbotUrl: string,
|
|
12
|
-
subtitle?: string,
|
|
13
|
-
question?: string,
|
|
14
|
-
/*
|
|
15
|
-
Currently supports these icons from remix icons (https://remixicon.com/):
|
|
16
|
-
GlobalLineIcon,
|
|
17
|
-
ShieldFlashLineIcon,
|
|
18
|
-
BankCardLineIcon,
|
|
19
|
-
GroupLineIcon,
|
|
20
|
-
QuestionnaireLineIcon
|
|
21
|
-
*/
|
|
22
|
-
suggestedQuestions?: { heading: string, message: string, icon?: string }[]
|
|
23
|
-
}> = ({
|
|
24
|
-
title,
|
|
25
|
-
chatbotUrl,
|
|
26
|
-
subtitle,
|
|
27
|
-
question,
|
|
28
|
-
suggestedQuestions
|
|
29
|
-
}) => {
|
|
30
|
-
|
|
31
|
-
const [showChatbot, setShowChatbot] = React.useState<boolean>(false)
|
|
32
|
-
|
|
33
|
-
const onClick = () => { setShowChatbot(!showChatbot) }
|
|
34
|
-
|
|
35
|
-
const searchParams = new URLSearchParams()
|
|
36
|
-
if (question) {
|
|
37
|
-
searchParams.append('question', question)
|
|
38
|
-
}
|
|
39
|
-
if (suggestedQuestions) {
|
|
40
|
-
searchParams.append('sQuestions', suggestedQuestions.map(({ message }) => message).join(','))
|
|
41
|
-
searchParams.append('sHeadings', suggestedQuestions.map(({ heading }) => heading).join(','))
|
|
42
|
-
searchParams.append('sIcons', suggestedQuestions.map(({ icon }) => icon).join(','))
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
const iframeSrc = `${chatbotUrl}?${searchParams.toString()}`
|
|
46
|
-
|
|
47
|
-
return (<>
|
|
48
|
-
<div className={
|
|
49
|
-
'fixed bottom-0 sm:bottom-20 right-0 w-full h-full ' +
|
|
50
|
-
'sm:max-w-[400px] sm:max-h-[550px] sm:px-4 z-[1002] ' +
|
|
51
|
-
(showChatbot ? 'flex' : 'hidden')
|
|
52
|
-
}>
|
|
53
|
-
<Card className='flex flex-col h-full w-full'>
|
|
54
|
-
<div className='flex px-4 py-2 h-12 bg-level-0 items-center justify-between'>
|
|
55
|
-
<h3 className='font-semibold font-heading'>{title} <span className='opacity-60'>{subtitle}</span></h3>
|
|
56
|
-
<Button onClick={onClick} variant='link' size='icon' className='w-fit sm:hidden'>
|
|
57
|
-
<X />
|
|
58
|
-
</Button>
|
|
59
|
-
</div>
|
|
60
|
-
<iframe src={iframeSrc} className='h-full' />
|
|
61
|
-
</Card>
|
|
62
|
-
</div>
|
|
63
|
-
|
|
64
|
-
<Button
|
|
65
|
-
variant='outline'
|
|
66
|
-
size='link'
|
|
67
|
-
onClick={onClick}
|
|
68
|
-
className='fixed bottom-4 right-0 h-12 w-12 mx-4 rounded-full z-[1001]'
|
|
69
|
-
>
|
|
70
|
-
{showChatbot ? <X /> : <LuxLogo width={24} height={24} className='mt-2' />}
|
|
71
|
-
</Button>
|
|
72
|
-
</>)
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
export default ChatWidget
|