@hanzo/ui 0.5.14 → 0.5.16

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.
@@ -21,6 +21,7 @@ import CTABlockComponent from '../cta-block'
21
21
  import Content from '../content'
22
22
  import type BlockComponentProps from '../block-component-props'
23
23
  import { EnhHeadingBlockComponent } from '..'
24
+ import VariantContentLeft from './variant-content-left'
24
25
 
25
26
  type CardSection = 'entire' | 'header' | 'content' | 'footer'
26
27
 
@@ -46,6 +47,9 @@ const _getClx = (specifier: string, section: CardSection): string => {
46
47
  case 'header': {
47
48
  result = 'border-none'
48
49
  } break
50
+ case 'footer': {
51
+ result = 'border-t-0'
52
+ } break
49
53
  }
50
54
  }
51
55
 
@@ -82,28 +86,40 @@ const CarteBlancheBlockComponent: React.FC<
82
86
  getClx('big-padding-content', 'content'),
83
87
  ].join(' ')
84
88
 
89
+ const footerclx = [
90
+ getClx('no-inner-borders', 'footer'),
91
+ ].join(' ')
92
+
85
93
  const noOuterBorders = specified('no-outer-borders')
94
+ const contentLeft = specified('variant-content-left')
95
+ const mobileContentLeft = specified('variant-mobile-content-left')
86
96
 
87
97
  return (
88
- <Card className={cn('flex flex-col ', className, noOuterBorders ? 'border-none' : '')} >
89
- {b.heading && (
90
- <CardHeader className={cn('typography-img:m-0', headingclx)} >
91
- {b.topContent && (
92
- <Content blocks={b.topContent} agent={agent} className=''/>
93
- )}
94
- <EnhHeadingBlockComponent block={b.heading} className='text-accent' agent={agent}/>
95
- </CardHeader>
96
- )}
97
- {b.content && (
98
- <CardContent className={cn('typography flex flex-col justify-center', contentclx, className)}>
99
- <Content blocks={b.content} agent={agent}/>
100
- </CardContent>
101
- )}
102
- {b.cta && (
103
- <CardFooter className={'grid grid-cols-1 gap-2 md:flex md:flex-row md:justify-center ' /*+ paddingclx*/} >
104
- <CTABlockComponent block={b.cta} agent={agent}/>
105
- </CardFooter>
106
- )}
98
+ <Card className={cn('flex flex-col', className, noOuterBorders ? 'border-none' : '')} >
99
+ {contentLeft || (mobileContentLeft && agent === 'phone') ? (
100
+ <VariantContentLeft block={b} agent={agent} className={className} headingclx={headingclx} contentclx={contentclx} footerclx={footerclx}/>
101
+ ) : (<>
102
+ {(b.heading || b.topContent) && (
103
+ <CardHeader className={cn('typography-img:m-0', headingclx)} >
104
+ {b.topContent && (
105
+ <Content blocks={b.topContent} agent={agent} className=''/>
106
+ )}
107
+ {b.heading && (
108
+ <EnhHeadingBlockComponent block={b.heading} className='text-accent' agent={agent}/>
109
+ )}
110
+ </CardHeader>
111
+ )}
112
+ {b.content && (
113
+ <CardContent className={cn('typography flex flex-col justify-center', contentclx, className)}>
114
+ <Content blocks={b.content} agent={agent}/>
115
+ </CardContent>
116
+ )}
117
+ {b.cta && (
118
+ <CardFooter className={cn('grid grid-cols-1 gap-2 md:flex md:flex-row md:justify-center', footerclx)} >
119
+ <CTABlockComponent block={b.cta} agent={agent}/>
120
+ </CardFooter>
121
+ )}
122
+ </>)}
107
123
  </Card>
108
124
  )
109
125
  }
@@ -0,0 +1,49 @@
1
+ import { EnhHeadingBlockComponent, type CarteBlancheBlock, CTABlockComponent } from '../..'
2
+ import {
3
+ CardContent,
4
+ CardFooter,
5
+ CardHeader,
6
+ } from '../../../primitives'
7
+ import { cn } from '../../../util'
8
+ import Content from '../content'
9
+
10
+ const VariantContentLeft: React.FC<{
11
+ block: CarteBlancheBlock,
12
+ agent?: string
13
+ className?: string
14
+ headingclx?: string
15
+ contentclx?: string
16
+ footerclx?: string
17
+ }> = ({
18
+ block,
19
+ agent,
20
+ className,
21
+ headingclx,
22
+ contentclx,
23
+ footerclx,
24
+ }) => {
25
+ return (<>
26
+ <div className='flex gap-2'>
27
+ {block.topContent && <Content blocks={block.topContent} agent={agent} className='self-center ml-6 mt-6'/>}
28
+ <div className='flex flex-col'>
29
+ {block.heading && (
30
+ <CardHeader className={cn('typography-img:m-0', headingclx)} >
31
+ <EnhHeadingBlockComponent block={block.heading} className='text-accent' agent={agent}/>
32
+ </CardHeader>
33
+ )}
34
+ {block.content && (
35
+ <CardContent className={cn('typography flex flex-col justify-start', contentclx, className)}>
36
+ <Content blocks={block.content} agent={agent}/>
37
+ </CardContent>
38
+ )}
39
+ </div>
40
+ </div>
41
+ {block.cta && (
42
+ <CardFooter className={cn('grid grid-cols-1 gap-2 md:flex md:flex-row md:justify-center mx-auto', footerclx)}>
43
+ <CTABlockComponent block={block.cta} agent={agent}/>
44
+ </CardFooter>
45
+ )}
46
+ </>)
47
+ }
48
+
49
+ export default VariantContentLeft
@@ -73,15 +73,28 @@ const getPositionClx = (
73
73
  } => {
74
74
 
75
75
  const mobileHeadingCentered = specified('mobile-heading-centered')
76
+ const mobileHeadingLeft = specified('mobile-heading-left')
76
77
  const headingCentered = specified('center')
77
78
  const headingRight = specified('right')
78
79
  const bylineCentered = specified('byline-center')
79
80
  const bylineRight = specified('byline-right')
81
+ const mobileBylineLeft = specified('mobile-byline-left')
80
82
 
81
83
  let headerclx = ''
84
+ let bylineclx = (bylineCentered) ?
85
+ 'self-center !text-center' : (bylineRight ? 'self-end !text-right' : 'self-start !text-left')
86
+
82
87
  if (agent === 'phone') {
83
- headerclx = (mobileHeadingCentered || headingCentered) ?
84
- 'self-center text-center' : (headingRight ? 'self-end text-right' : 'self-start text-left')
88
+ if (mobileHeadingLeft) {
89
+ headerclx = 'self-start text-left'
90
+ } else {
91
+ headerclx = (mobileHeadingCentered || headingCentered) ?
92
+ 'self-center text-center' : (headingRight ? 'self-end text-right' : 'self-start text-left')
93
+ }
94
+
95
+ if (mobileBylineLeft) {
96
+ bylineclx = 'self-start !text-left'
97
+ }
85
98
  }
86
99
  else {
87
100
  const largerclx = (headingCentered) ?
@@ -95,9 +108,6 @@ const getPositionClx = (
95
108
  }
96
109
  }
97
110
 
98
- const bylineclx = (bylineCentered) ?
99
- 'self-center' : (bylineRight ? 'self-end' : 'self-start')
100
-
101
111
  return {
102
112
  preheading: headerclx,
103
113
  heading: headerclx,
@@ -5,7 +5,7 @@ const Disclaimer: React.FC = () => (
5
5
  By entering your mobile number and submitting, you consent to receive text messages from Lux at the number provided.
6
6
  Message and data rates may apply. Message frequency varies.
7
7
  You can unsubscribe at any time by replying STOP.
8
- View our <a href='/assets/standard-docs/LUX-Privacy-Policy.pdf'>Privacy Policy</a> and <a href='/assets/standard-docs/LUX-NFT-Terms-and-Conditions.pdf'>Terms & conditions</a>.
8
+ View our <a href='/privacy'>Privacy Policy</a> and <a href='/terms'>Terms & conditions</a>.
9
9
  </div>
10
10
  )
11
11
 
@@ -30,8 +30,8 @@ const ContactDialog: React.FC<ButtonModalProps> = ({
30
30
  <DialogTrigger asChild>
31
31
  <Button {...buttonProps} >{buttonText}</Button>
32
32
  </DialogTrigger>
33
- <DialogContent className="sm:max-w-[500px] p-0 gap-0 light-theme">
34
- <DialogHeader className='py-6 text-foreground'>
33
+ <DialogContent className="sm:max-w-[500px] p-0 gap-0 bg-background border">
34
+ <DialogHeader className='py-6 text-foreground'>
35
35
  <DialogTitle className='text-4xl font-heading text-center text-inherit'>{title}</DialogTitle>
36
36
  {byline && (<DialogDescription className='text-inherit text-xl text-center'>{byline} </DialogDescription>)}
37
37
  </DialogHeader>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hanzo/ui",
3
- "version": "0.5.14",
3
+ "version": "0.5.16",
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/",
@@ -50,7 +50,7 @@ const DialogClose = React.forwardRef<
50
50
  <DialogPrimitive.Close
51
51
  ref={ref}
52
52
  className={cn(
53
- "absolute right-4 top-3 p-1 justify-self-start hover:brightness-105 hover:scale-110 duration-100 ring-1 ring-secondary-400 transition bg-secondary-500 hover:text-primary-text focus:outline-none rounded-full items-center",
53
+ "absolute right-4 top-3 p-1 justify-self-start hover:brightness-105 hover:scale-110 duration-100 ring-1 ring-muted transition bg-secondary-500 hover:text-primary-text focus:outline-none rounded-full items-center",
54
54
  className
55
55
  )}
56
56
  {...props}
@@ -3,12 +3,12 @@ import type { LinkDef } from '../../types'
3
3
  const legal: LinkDef[] = [
4
4
  {
5
5
  title: 'Terms and Conditions',
6
- href: '/assets/standard-docs/LUX-NFT-Terms-and-Conditions.pdf',
6
+ href: '/terms',
7
7
  newTab: true,
8
8
  },
9
9
  {
10
10
  title: 'Privacy Policy',
11
- href: '/assets/standard-docs/LUX-Privacy-Policy.pdf',
11
+ href: '/privacy',
12
12
  newTab: true,
13
13
  },
14
14
  ]