@hanzo/ui 3.8.15 → 3.8.17

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.
@@ -91,7 +91,7 @@ const Content: React.FC<{
91
91
  }) => {
92
92
 
93
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} `) : '')
94
+ const layoutClx = 'flex flex-col gap-2 sm:gap-4 h-full ' + ((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)
@@ -14,15 +14,17 @@ const ScreenfulComponent: React.FC<{
14
14
  agent?: string
15
15
  initialInView?: boolean
16
16
  snapTile?: boolean
17
- className?: string
17
+ clx?: string
18
18
  contentClx?: string
19
+ bottom?: React.ReactNode
19
20
  }> = ({
20
21
  block,
21
22
  agent,
22
23
  initialInView=false,
23
24
  snapTile=false,
24
- className='',
25
- contentClx=''
25
+ clx='',
26
+ contentClx='',
27
+ bottom
26
28
  }) => {
27
29
 
28
30
  if (block.blockType !== 'screenful') {
@@ -38,8 +40,8 @@ const ScreenfulComponent: React.FC<{
38
40
  const narrowGutters = specified('narrow-gutters') // eg, for a table object that is large
39
41
  const noGutters = specified('no-gutters')
40
42
  const fullScreenWidth = specified('full-screen-width')
41
- const fullScreenHeight = specified('full-screen-height')
42
- const vertCenter = specified('vert-center')
43
+ const vertCenter = specified('vert-center') // at the main level, it seems only useful w one column
44
+ const oneColumn = b.contentColumns.length === 1
43
45
 
44
46
  // content wrapper clx:
45
47
  // [
@@ -48,26 +50,32 @@ const ScreenfulComponent: React.FC<{
48
50
  // p&m-modifiers
49
51
  // ]
50
52
  const cwclx = [
51
- 'xl:mx-auto overflow-y-hidden ',
53
+ 'xl:mx-auto overflow-y-hidden h-full',
52
54
  fullScreenWidth ? '' : 'max-w-screen-xl',
53
- fullScreenHeight ? 'h-full' : '',
54
55
  // desktop header: 80px / pt-20
55
56
  // mobile header: 44px / pt-11
56
57
  narrowGutters ?
57
- 'px-6 lg:px-8 2xl:px-2 pb-6 ' + (snapTile ? 'pt-15 md:pt-26 lg:pt-28 ' : '') // otherwise assume there is a Main
58
- : noGutters ?
59
- 'px-0 pb-0 ' + (snapTile ? 'pt-11 lg:pt-20 ' : '') // otherwise assume there is a Main
58
+ 'px-6 lg:px-8 2xl:px-2 pb-4 lg:pb-6 xl:pb-8 ' + (snapTile ? 'pt-15 md:pt-26 lg:pt-28 ' : '') // otherwise assume there is a Main
60
59
  :
61
- 'px-[8vw] xl:px-[1vw] pb-[8vh] pt-[calc(44px+4vh)] md:pt-[calc(80px+6vh)] ',
60
+ noGutters ?
61
+ 'px-0 pb-0 ' + (snapTile ? 'pt-11 lg:pt-20 ' : '') // otherwise assume there is a Main
62
+ :
63
+ 'px-[8vw] xl:px-[1vw] pb-[8vh] pt-[calc(44px+4vh)] md:pt-[calc(80px+6vh)] ',
62
64
 
63
65
  (agent && agent !== 'desktop') ? 'pt-15 sm:pt-17 pb-0 px-3 sm:px-8' : ''
64
66
  ]
65
67
 
66
- const spreadId = (b.anchorId) ? {id: b.anchorId} : {}
67
-
68
68
  return (
69
- <section {...spreadId} className={cn((snapTile ? 'snap-start snap-always h-[100vh]' : 'min-h-screen'), className)}>
70
- <ApplyTypography className={cn('w-full flex flex-row justify-center self-stretch', snapTile ? tileHeight : '')} >
69
+ <section {...((b.anchorId) ? {id: b.anchorId} : {})} className={cn(
70
+ snapTile ? 'snap-start snap-always h-[100vh]' : 'min-h-screen',
71
+ bottom ? 'flex flex-col' : '',
72
+ clx
73
+ )}>
74
+ <ApplyTypography className={cn(
75
+ 'w-full flex flex-row justify-center self-stretch',
76
+ snapTile ? tileHeight : '',
77
+ bottom ? 'grow' : ''
78
+ )}>
71
79
  <Poster banner={b.banner}>
72
80
  {hasBannerVideo() && (
73
81
  <Video
@@ -80,7 +88,7 @@ const ScreenfulComponent: React.FC<{
80
88
  ...cwclx,
81
89
  snapTile ? 'absolute left-0 right-0 top-0 bottom-0 ' : 'flex min-h-screen w-full',
82
90
  contentClx,
83
- vertCenter ? '!py-0 self-center' : ''
91
+ vertCenter ? 'self-center ' + (oneColumn ? '!py-0' : '' ) : ''
84
92
  )}
85
93
  >
86
94
  <Content block={b} agent={agent} className='w-full'/>
@@ -88,6 +96,7 @@ const ScreenfulComponent: React.FC<{
88
96
  </div>
89
97
  </Poster>
90
98
  </ApplyTypography>
99
+ {bottom}
91
100
  </section>
92
101
  )
93
102
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hanzo/ui",
3
- "version": "3.8.15",
3
+ "version": "3.8.17",
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/",
@@ -21,7 +21,7 @@ const PopoverContent = React.forwardRef<
21
21
  align={align}
22
22
  sideOffset={sideOffset}
23
23
  className={cn(
24
- 'z-modal w-72 rounded-md border bg-level-1 p-4 text-foreground shadow-md outline-none ' +
24
+ 'z-above-modal-2 w-72 rounded-md border bg-level-1 p-4 text-foreground shadow-md outline-none ' +
25
25
  'data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 ' +
26
26
  'data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 ' +
27
27
  'data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 ' +