@hanzo/ui 3.8.16 → 3.8.18
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
|
|
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)
|
|
@@ -40,8 +40,8 @@ const ScreenfulComponent: React.FC<{
|
|
|
40
40
|
const narrowGutters = specified('narrow-gutters') // eg, for a table object that is large
|
|
41
41
|
const noGutters = specified('no-gutters')
|
|
42
42
|
const fullScreenWidth = specified('full-screen-width')
|
|
43
|
-
const
|
|
44
|
-
const
|
|
43
|
+
const vertCenter = specified('vert-center') // at the main level, it seems only useful w one column
|
|
44
|
+
const oneColumn = b.contentColumns.length === 1
|
|
45
45
|
|
|
46
46
|
// content wrapper clx:
|
|
47
47
|
// [
|
|
@@ -50,17 +50,17 @@ const ScreenfulComponent: React.FC<{
|
|
|
50
50
|
// p&m-modifiers
|
|
51
51
|
// ]
|
|
52
52
|
const cwclx = [
|
|
53
|
-
'xl:mx-auto overflow-y-hidden ',
|
|
53
|
+
'xl:mx-auto overflow-y-hidden h-full',
|
|
54
54
|
fullScreenWidth ? '' : 'max-w-screen-xl',
|
|
55
|
-
fullScreenHeight ? 'h-full' : '',
|
|
56
55
|
// desktop header: 80px / pt-20
|
|
57
56
|
// mobile header: 44px / pt-11
|
|
58
57
|
narrowGutters ?
|
|
59
|
-
'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
|
|
60
|
-
: noGutters ?
|
|
61
|
-
'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
|
|
62
59
|
:
|
|
63
|
-
|
|
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)] ',
|
|
64
64
|
|
|
65
65
|
(agent && agent !== 'desktop') ? 'pt-15 sm:pt-17 pb-0 px-3 sm:px-8' : ''
|
|
66
66
|
]
|
|
@@ -88,7 +88,7 @@ const ScreenfulComponent: React.FC<{
|
|
|
88
88
|
...cwclx,
|
|
89
89
|
snapTile ? 'absolute left-0 right-0 top-0 bottom-0 ' : 'flex min-h-screen w-full',
|
|
90
90
|
contentClx,
|
|
91
|
-
vertCenter ? '!py-0
|
|
91
|
+
vertCenter ? 'self-center ' + (oneColumn ? '!py-0' : '' ) : ''
|
|
92
92
|
)}
|
|
93
93
|
>
|
|
94
94
|
<Content block={b} agent={agent} className='w-full'/>
|
package/package.json
CHANGED
|
@@ -5,8 +5,7 @@ import { cn } from '../util'
|
|
|
5
5
|
type TypographySize = 'responsive' | 'sm' | 'base' | 'lg' | 'xl' // if t-shirt size, do *not* be responsive
|
|
6
6
|
|
|
7
7
|
const ApplyTypography: React.FC<
|
|
8
|
-
|
|
9
|
-
className?: string,
|
|
8
|
+
React.ComponentProps<'div'> & {
|
|
10
9
|
asTag?: 'div' | 'section' | 'nav' | 'main' | 'article',
|
|
11
10
|
size?: TypographySize
|
|
12
11
|
}
|
|
@@ -14,7 +13,8 @@ const ApplyTypography: React.FC<
|
|
|
14
13
|
children,
|
|
15
14
|
className='',
|
|
16
15
|
asTag='div',
|
|
17
|
-
size='responsive'
|
|
16
|
+
size='responsive',
|
|
17
|
+
...rest
|
|
18
18
|
}) => {
|
|
19
19
|
|
|
20
20
|
// responsive version by default
|
|
@@ -43,7 +43,7 @@ const ApplyTypography: React.FC<
|
|
|
43
43
|
|
|
44
44
|
const Tag = asTag
|
|
45
45
|
return (
|
|
46
|
-
<Tag className={cn(typoClasses, className)}>
|
|
46
|
+
<Tag {...rest} className={cn(typoClasses, className)}>
|
|
47
47
|
{children}
|
|
48
48
|
</Tag>
|
|
49
49
|
)
|
package/primitives/popover.tsx
CHANGED
|
@@ -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 ' +
|