@ably/ui 14.0.0-dev.f6c8d86 → 14.0.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.
- package/core/Accordion.js +1 -1
- package/core/Code.js +1 -1
- package/core/ContactFooter/component.css +9 -7
- package/core/ContactFooter.js +1 -1
- package/core/CookieMessage/component.css +12 -10
- package/core/CookieMessage.js +1 -1
- package/core/Expander.js +1 -0
- package/core/Flash/component.css +21 -19
- package/core/Flash.js +1 -1
- package/core/Footer/component.css +24 -22
- package/core/Footer.js +1 -1
- package/core/Meganav/component.css +105 -103
- package/core/Meganav/component.js +1 -1
- package/core/Meganav.js +1 -1
- package/core/Notice/component.css +6 -4
- package/core/Notice/component.js +1 -1
- package/core/Notice.js +1 -1
- package/core/Slider/component.css +32 -30
- package/core/Slider/component.js +1 -1
- package/core/Slider.js +1 -1
- package/core/Table/Table.js +1 -1
- package/core/Table/TableCell.js +3 -3
- package/core/Table/data.js +1 -1
- package/core/Table.js +1 -1
- package/core/scripts.js +1 -1
- package/core/styles/buttons.css +123 -121
- package/core/styles/forms.css +51 -49
- package/core/styles/layout.css +16 -14
- package/core/styles/properties.css +252 -250
- package/core/styles/text.css +167 -165
- package/core/styles.components.css +24 -22
- package/core/utils/syntax-highlighter.css +59 -55
- package/package.json +2 -4
- package/src/core/Accordion.tsx +8 -6
- package/src/core/Code.tsx +0 -1
- package/src/core/ContactFooter/component.css +9 -7
- package/src/core/ContactFooter.tsx +0 -1
- package/src/core/CookieMessage/component.css +12 -10
- package/src/core/CookieMessage.tsx +0 -1
- package/src/core/Expander/Expander.stories.tsx +132 -0
- package/src/core/Expander.tsx +63 -0
- package/src/core/Flash/component.css +21 -19
- package/src/core/Flash.tsx +0 -1
- package/src/core/Footer/component.css +24 -22
- package/src/core/Footer.tsx +0 -1
- package/src/core/Meganav/component.css +105 -103
- package/src/core/Meganav/component.js +0 -2
- package/src/core/Meganav.tsx +0 -1
- package/src/core/Notice/component.css +6 -4
- package/src/core/Notice/component.js +0 -1
- package/src/core/Notice.tsx +0 -1
- package/src/core/Slider/Slider.stories.tsx +2 -2
- package/src/core/Slider/component.css +32 -30
- package/src/core/Slider/component.js +0 -2
- package/src/core/Slider.tsx +51 -20
- package/src/core/Table/Table.tsx +1 -2
- package/src/core/Table/TableCell.tsx +2 -40
- package/src/core/Table/data.tsx +21 -1
- package/src/core/Table.tsx +1 -12
- package/src/core/scripts.js +0 -2
- package/src/core/styles/buttons.css +123 -121
- package/src/core/styles/forms.css +51 -49
- package/src/core/styles/layout.css +16 -14
- package/src/core/styles/properties.css +252 -250
- package/src/core/styles/text.css +167 -165
- package/src/core/styles.components.css +24 -22
- package/src/core/utils/syntax-highlighter.css +59 -55
- package/core/.DS_Store +0 -0
- package/core/Accordion/.DS_Store +0 -0
- package/core/Code/.DS_Store +0 -0
- package/core/ContactFooter/.DS_Store +0 -0
- package/core/CookieMessage/.DS_Store +0 -0
- package/core/CustomerLogos/.DS_Store +0 -0
- package/core/DropdownMenu/.DS_Store +0 -0
- package/core/FeaturedLink/.DS_Store +0 -0
- package/core/Flash/.DS_Store +0 -0
- package/core/Footer/.DS_Store +0 -0
- package/core/Icon/.DS_Store +0 -0
- package/core/Loader/.DS_Store +0 -0
- package/core/Logo/.DS_Store +0 -0
- package/core/Meganav/.DS_Store +0 -0
- package/core/MeganavBlogPostsList/.DS_Store +0 -0
- package/core/MeganavControl/.DS_Store +0 -0
- package/core/MeganavControlMobileDropdown/.DS_Store +0 -0
- package/core/MeganavControlMobilePanelClose/.DS_Store +0 -0
- package/core/MeganavControlMobilePanelOpen/.DS_Store +0 -0
- package/core/MeganavSearchAutocomplete/.DS_Store +0 -0
- package/core/MeganavSearchSuggestions/.DS_Store +0 -0
- package/core/Notice/.DS_Store +0 -0
- package/core/Slider/.DS_Store +0 -0
- package/core/Table/.DS_Store +0 -0
- package/core/Tooltip/.DS_Store +0 -0
- package/src/.DS_Store +0 -0
- package/src/core/.DS_Store +0 -0
- package/src/core/Accordion/.DS_Store +0 -0
- package/src/core/Code/.DS_Store +0 -0
- package/src/core/ContactFooter/.DS_Store +0 -0
- package/src/core/CookieMessage/.DS_Store +0 -0
- package/src/core/CustomerLogos/.DS_Store +0 -0
- package/src/core/DropdownMenu/.DS_Store +0 -0
- package/src/core/FeaturedLink/.DS_Store +0 -0
- package/src/core/Flash/.DS_Store +0 -0
- package/src/core/Footer/.DS_Store +0 -0
- package/src/core/Icon/.DS_Store +0 -0
- package/src/core/Loader/.DS_Store +0 -0
- package/src/core/Logo/.DS_Store +0 -0
- package/src/core/Meganav/.DS_Store +0 -0
- package/src/core/MeganavBlogPostsList/.DS_Store +0 -0
- package/src/core/MeganavControl/.DS_Store +0 -0
- package/src/core/MeganavControlMobileDropdown/.DS_Store +0 -0
- package/src/core/MeganavControlMobilePanelClose/.DS_Store +0 -0
- package/src/core/MeganavControlMobilePanelOpen/.DS_Store +0 -0
- package/src/core/MeganavSearchAutocomplete/.DS_Store +0 -0
- package/src/core/MeganavSearchSuggestions/.DS_Store +0 -0
- package/src/core/Notice/.DS_Store +0 -0
- package/src/core/Slider/.DS_Store +0 -0
- package/src/core/Table/.DS_Store +0 -0
- package/src/core/Tooltip/.DS_Store +0 -0
|
@@ -1,11 +1,13 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
1
|
+
@layer components {
|
|
2
|
+
.ui-cookie-message {
|
|
3
|
+
@apply rounded-lg bg-white font-sans;
|
|
4
|
+
@apply justify-between items-center;
|
|
5
|
+
@apply opacity-100 z-50 bottom-0 fixed sm:flex;
|
|
6
|
+
@apply p-16 mb-16 ml-16;
|
|
7
|
+
max-width: 70vw;
|
|
8
|
+
box-shadow: 0px 24px 32px 0px #0000000d;
|
|
9
|
+
border: 1px solid var(--color-mid-grey);
|
|
10
|
+
border-left: 0.5rem solid var(--color-electric-cyan);
|
|
11
|
+
transition: bottom 250ms ease-out, opacity 150ms ease-out;
|
|
12
|
+
}
|
|
11
13
|
}
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import Expander from "../Expander";
|
|
3
|
+
|
|
4
|
+
export default {
|
|
5
|
+
title: "Components/Expander",
|
|
6
|
+
component: Expander,
|
|
7
|
+
tags: ["autodocs"],
|
|
8
|
+
args: {
|
|
9
|
+
height: 200,
|
|
10
|
+
},
|
|
11
|
+
argTypes: {
|
|
12
|
+
height: {
|
|
13
|
+
control: {
|
|
14
|
+
type: "number",
|
|
15
|
+
},
|
|
16
|
+
},
|
|
17
|
+
},
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
const longContentInner = (
|
|
21
|
+
<div>
|
|
22
|
+
<p>Ipsum</p>
|
|
23
|
+
<ul className="mb-16 list-inside list-disc">
|
|
24
|
+
<li>Lorem ipsum dolor sit amet, consectetur adipiscing elit.</li>
|
|
25
|
+
<li>Sed convallis ex pharetra, tristique tellus vel, rhoncus velit.</li>
|
|
26
|
+
<li>Mauris molestie felis et scelerisque ullamcorper.</li>
|
|
27
|
+
<li>Maecenas congue ligula ut commodo tristique.</li>
|
|
28
|
+
<li>
|
|
29
|
+
Pellentesque venenatis elit vitae urna condimentum, in mollis arcu
|
|
30
|
+
venenatis.
|
|
31
|
+
</li>
|
|
32
|
+
<li>Donec nec turpis vel urna egestas fringilla.</li>
|
|
33
|
+
</ul>
|
|
34
|
+
<p>Ipsum</p>
|
|
35
|
+
<ul className="mb-16 list-inside list-disc">
|
|
36
|
+
<li>Mauris ut nibh vel metus cursus semper.</li>
|
|
37
|
+
<li>Ut mattis tortor eu urna accumsan gravida.</li>
|
|
38
|
+
<li>Nunc pellentesque neque at elit pretium tempor.</li>
|
|
39
|
+
<li>Curabitur finibus magna vitae nunc varius fermentum.</li>
|
|
40
|
+
</ul>
|
|
41
|
+
<ul className="mb-16 list-inside list-disc">
|
|
42
|
+
<li>Curabitur vehicula mi iaculis, luctus augue eu, venenatis quam.</li>
|
|
43
|
+
<li>Praesent in eros efficitur, consequat ante eu, faucibus arcu.</li>
|
|
44
|
+
<li>Nulla laoreet nibh a odio interdum, non molestie diam auctor.</li>
|
|
45
|
+
</ul>
|
|
46
|
+
<p>Ipsum</p>
|
|
47
|
+
<ul className="mb-16 list-inside list-disc">
|
|
48
|
+
<li>
|
|
49
|
+
Praesent aliquam diam tincidunt, sollicitudin tortor eget, vulputate
|
|
50
|
+
lacus.
|
|
51
|
+
</li>
|
|
52
|
+
<li>Quisque in mi sed ex vulputate varius in a leo.</li>
|
|
53
|
+
<li>Etiam posuere dolor at tortor aliquam imperdiet.</li>
|
|
54
|
+
<li>
|
|
55
|
+
Maecenas quis neque consequat, ultricies est sit amet, congue est.
|
|
56
|
+
</li>
|
|
57
|
+
<li>Aenean a elit sed nibh pretium lacinia sed convallis sapien.</li>
|
|
58
|
+
</ul>
|
|
59
|
+
<p>Ipsum</p>
|
|
60
|
+
<ul className="mb-16 list-inside list-disc">
|
|
61
|
+
<li>
|
|
62
|
+
Nulla malesuada libero id dolor aliquam, non sagittis mi scelerisque.
|
|
63
|
+
</li>
|
|
64
|
+
<li>
|
|
65
|
+
Etiam tincidunt lacus eu diam laoreet consectetur sit amet non est.
|
|
66
|
+
</li>
|
|
67
|
+
<li>In porta arcu nec purus tincidunt vulputate.</li>
|
|
68
|
+
</ul>
|
|
69
|
+
</div>
|
|
70
|
+
);
|
|
71
|
+
|
|
72
|
+
export const LongContent = {
|
|
73
|
+
render: () => <Expander>{longContentInner}</Expander>,
|
|
74
|
+
parameters: {
|
|
75
|
+
docs: {
|
|
76
|
+
description: {
|
|
77
|
+
story:
|
|
78
|
+
"A larger amount of content that exceeds the height cut-off, controls shown.",
|
|
79
|
+
},
|
|
80
|
+
},
|
|
81
|
+
},
|
|
82
|
+
};
|
|
83
|
+
|
|
84
|
+
export const ShortContent = {
|
|
85
|
+
render: () => (
|
|
86
|
+
<Expander>
|
|
87
|
+
<div>
|
|
88
|
+
<p>Ipsum</p>
|
|
89
|
+
<ul className="mb-16 list-inside list-disc">
|
|
90
|
+
<li>Lorem ipsum dolor sit amet, consectetur adipiscing elit.</li>
|
|
91
|
+
<li>
|
|
92
|
+
Sed convallis ex pharetra, tristique tellus vel, rhoncus velit.
|
|
93
|
+
</li>
|
|
94
|
+
<li>Mauris molestie felis et scelerisque ullamcorper.</li>
|
|
95
|
+
<li>Maecenas congue ligula ut commodo tristique.</li>
|
|
96
|
+
<li>
|
|
97
|
+
Pellentesque venenatis elit vitae urna condimentum, in mollis arcu
|
|
98
|
+
venenatis.
|
|
99
|
+
</li>
|
|
100
|
+
<li>Donec nec turpis vel urna egestas fringilla.</li>
|
|
101
|
+
</ul>
|
|
102
|
+
</div>
|
|
103
|
+
</Expander>
|
|
104
|
+
),
|
|
105
|
+
parameters: {
|
|
106
|
+
docs: {
|
|
107
|
+
description: {
|
|
108
|
+
story:
|
|
109
|
+
"A smaller amount of content that doesn't exceed the height cut-off, therefore no controls shown.",
|
|
110
|
+
},
|
|
111
|
+
},
|
|
112
|
+
},
|
|
113
|
+
};
|
|
114
|
+
|
|
115
|
+
export const OverriddenStyles = {
|
|
116
|
+
render: () => (
|
|
117
|
+
<Expander
|
|
118
|
+
className="bg-neutral-400 p-16 rounded-lg"
|
|
119
|
+
fadeClassName="from-neutral-800"
|
|
120
|
+
>
|
|
121
|
+
{longContentInner}
|
|
122
|
+
</Expander>
|
|
123
|
+
),
|
|
124
|
+
parameters: {
|
|
125
|
+
docs: {
|
|
126
|
+
description: {
|
|
127
|
+
story:
|
|
128
|
+
"A larger amount of content, with overridden styles for the content wrapper and fader.",
|
|
129
|
+
},
|
|
130
|
+
},
|
|
131
|
+
},
|
|
132
|
+
};
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import React, { PropsWithChildren, useEffect, useRef, useState } from "react";
|
|
2
|
+
|
|
3
|
+
type ExpanderProps = {
|
|
4
|
+
heightThreshold?: number;
|
|
5
|
+
className?: string;
|
|
6
|
+
fadeClassName?: string;
|
|
7
|
+
};
|
|
8
|
+
|
|
9
|
+
const Expander = ({
|
|
10
|
+
heightThreshold = 200,
|
|
11
|
+
className,
|
|
12
|
+
fadeClassName,
|
|
13
|
+
children,
|
|
14
|
+
}: PropsWithChildren<ExpanderProps>) => {
|
|
15
|
+
const innerRef = useRef<HTMLDivElement>(null);
|
|
16
|
+
const [showControls, setShowControls] = useState(false);
|
|
17
|
+
const [height, setHeight] = useState<number | "auto">(heightThreshold);
|
|
18
|
+
const [expanded, setExpanded] = useState(false);
|
|
19
|
+
|
|
20
|
+
useEffect(() => {
|
|
21
|
+
const contentHeight = innerRef.current?.clientHeight ?? heightThreshold;
|
|
22
|
+
|
|
23
|
+
if (contentHeight < heightThreshold) {
|
|
24
|
+
setHeight("auto");
|
|
25
|
+
} else if (expanded) {
|
|
26
|
+
setHeight(contentHeight);
|
|
27
|
+
} else {
|
|
28
|
+
setHeight(heightThreshold);
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
setShowControls(contentHeight >= heightThreshold);
|
|
32
|
+
}, [heightThreshold, expanded]);
|
|
33
|
+
|
|
34
|
+
return (
|
|
35
|
+
<>
|
|
36
|
+
<div
|
|
37
|
+
style={{ height }}
|
|
38
|
+
className={`overflow-hidden transition-all relative ${className ?? ""}`}
|
|
39
|
+
>
|
|
40
|
+
{showControls && !expanded && (
|
|
41
|
+
<div
|
|
42
|
+
className={`h-64 w-full bg-gradient-to-t from-white to-transparent absolute bottom-0 left-0 right-0 ${
|
|
43
|
+
fadeClassName ?? ""
|
|
44
|
+
}`}
|
|
45
|
+
></div>
|
|
46
|
+
)}
|
|
47
|
+
<div ref={innerRef}>{children}</div>
|
|
48
|
+
</div>
|
|
49
|
+
{showControls && (
|
|
50
|
+
<div
|
|
51
|
+
onClick={() => setExpanded(!expanded)}
|
|
52
|
+
onKeyDown={(e) => e.key === "Enter" && setExpanded(!expanded)}
|
|
53
|
+
tabIndex={0}
|
|
54
|
+
className="mt-16 cursor-pointer font-bold text-gui-blue-default-light hover:text-gui-blue-hover-light"
|
|
55
|
+
>
|
|
56
|
+
{expanded ? "View less -" : "View all +"}
|
|
57
|
+
</div>
|
|
58
|
+
)}
|
|
59
|
+
</>
|
|
60
|
+
);
|
|
61
|
+
};
|
|
62
|
+
|
|
63
|
+
export default Expander;
|
|
@@ -1,23 +1,25 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
@layer components {
|
|
2
|
+
.ui-flash {
|
|
3
|
+
@apply w-full fixed;
|
|
4
|
+
top: 5.5rem;
|
|
5
|
+
z-index: calc(var(--stacking-context-page-meganav) - 10);
|
|
6
|
+
transition: margin-top 200ms;
|
|
7
|
+
}
|
|
7
8
|
|
|
8
|
-
.ui-flash-message {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
}
|
|
9
|
+
.ui-flash-message {
|
|
10
|
+
@apply font-sans font-light antialiased max-w-screen-xl mx-auto mt-8 opacity-0 relative;
|
|
11
|
+
transition: opacity 200ms, transform 200ms, height 200ms 200ms,
|
|
12
|
+
margin-top 200ms 200ms;
|
|
13
|
+
transform: translateY(-200%) rotateX(-90deg);
|
|
14
|
+
}
|
|
14
15
|
|
|
15
|
-
/* dynamic content inside flash, can't add classes */
|
|
16
|
-
.ui-flash-text a {
|
|
17
|
-
|
|
18
|
-
}
|
|
16
|
+
/* dynamic content inside flash, can't add classes */
|
|
17
|
+
.ui-flash-text a {
|
|
18
|
+
@apply underline;
|
|
19
|
+
}
|
|
19
20
|
|
|
20
|
-
.ui-flash-message-enter {
|
|
21
|
-
|
|
22
|
-
|
|
21
|
+
.ui-flash-message-enter {
|
|
22
|
+
@apply opacity-100;
|
|
23
|
+
transform: translateY(0) rotateX(0);
|
|
24
|
+
}
|
|
23
25
|
}
|
package/src/core/Flash.tsx
CHANGED
|
@@ -1,31 +1,33 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
@layer components {
|
|
2
|
+
.ui-footer-col-title {
|
|
3
|
+
@apply font-mono text-overline2 p-menu-row-title font-medium uppercase tracking-widen-0.16;
|
|
4
|
+
}
|
|
4
5
|
|
|
5
|
-
.ui-footer-menu-row-link {
|
|
6
|
-
|
|
7
|
-
}
|
|
6
|
+
.ui-footer-menu-row-link {
|
|
7
|
+
@apply text-menu3 text-cool-black font-sans font-medium hover:text-gui-hover block;
|
|
8
|
+
}
|
|
8
9
|
|
|
9
|
-
.ui-footer-link {
|
|
10
|
-
|
|
11
|
-
}
|
|
10
|
+
.ui-footer-link {
|
|
11
|
+
@apply text-gui-default hover:text-gui-hover text-menu3 font-sans font-medium;
|
|
12
|
+
}
|
|
12
13
|
|
|
13
|
-
.ui-footer-compliance-text {
|
|
14
|
-
|
|
15
|
-
}
|
|
14
|
+
.ui-footer-compliance-text {
|
|
15
|
+
font-size: 12px;
|
|
16
|
+
}
|
|
16
17
|
|
|
17
|
-
.ui-footer-tick-icon {
|
|
18
|
-
|
|
19
|
-
}
|
|
18
|
+
.ui-footer-tick-icon {
|
|
19
|
+
min-width: 1.5rem;
|
|
20
|
+
}
|
|
20
21
|
|
|
21
|
-
@media (max-width: 1040px) {
|
|
22
|
-
|
|
23
|
-
|
|
22
|
+
@media (max-width: 1040px) {
|
|
23
|
+
.ui-footer-bottom-links {
|
|
24
|
+
@apply pb-40;
|
|
25
|
+
}
|
|
24
26
|
}
|
|
25
|
-
}
|
|
26
27
|
|
|
27
|
-
@media screen {
|
|
28
|
-
|
|
29
|
-
|
|
28
|
+
@media screen {
|
|
29
|
+
.ui-footer-glassdoor {
|
|
30
|
+
display: none;
|
|
31
|
+
}
|
|
30
32
|
}
|
|
31
33
|
}
|
package/src/core/Footer.tsx
CHANGED
|
@@ -1,112 +1,114 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
.ui-meganav-
|
|
20
|
-
.ui-meganav-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
1
|
+
@layer components {
|
|
2
|
+
.ui-meganav-wrapper {
|
|
3
|
+
/* Define values for new stacking context defined by position: fixed */
|
|
4
|
+
--stacking-context-meganav-dropdown: 10;
|
|
5
|
+
--stacking-context-meganav-mobile-panel: 20;
|
|
6
|
+
|
|
7
|
+
z-index: var(--stacking-context-page-meganav);
|
|
8
|
+
|
|
9
|
+
@apply fixed top-0 w-full;
|
|
10
|
+
@apply antialiased font-sans transition-colors;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.ui-meganav {
|
|
14
|
+
height: var(--ui-meganav-height);
|
|
15
|
+
|
|
16
|
+
@apply flex justify-between items-center max-w-screen-xl mx-auto;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.ui-meganav-panel,
|
|
20
|
+
.ui-meganav-mobile-dropdown,
|
|
21
|
+
.ui-meganav-panel-account {
|
|
22
|
+
z-index: var(--stacking-context-meganav-dropdown);
|
|
23
|
+
|
|
24
|
+
@apply absolute left-0 right-0;
|
|
25
|
+
@apply border-mid-grey border-t shadow-container;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.ui-meganav-panel {
|
|
29
|
+
@apply bg-white;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.ui-meganav-panel-mobile {
|
|
33
|
+
z-index: var(--stacking-context-meganav-mobile-panel);
|
|
34
|
+
|
|
35
|
+
/* Prevents momentum-based scrolling https://devdocs.io/css/-webkit-overflow-scrolling */
|
|
36
|
+
-webkit-overflow-scrolling: auto;
|
|
37
|
+
|
|
38
|
+
@apply bg-white pt-16 border-0;
|
|
39
|
+
@apply border-mid-grey border-t shadow-container;
|
|
40
|
+
@apply fixed top-64 left-0 right-0 overflow-y-auto;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.ui-meganav-panel-account {
|
|
44
|
+
left: auto;
|
|
45
|
+
min-width: 20rem;
|
|
46
|
+
@apply bg-white rounded-t-none;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
.ui-meganav-panel-split-bg {
|
|
50
|
+
background: linear-gradient(to right, #fafafb 33%, white 33%, white 100%);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
.ui-meganav-link {
|
|
54
|
+
@apply text-menu2 font-bold font-sans;
|
|
55
|
+
@apply mr-12 lg:mr-24 px-0 py-20;
|
|
56
|
+
@apply hover:text-gui-hover focus:text-gui-focus focus:outline-none;
|
|
57
|
+
@apply transition-colors;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
.ui-meganav-item {
|
|
61
|
+
flex: 1 0 auto;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
.ui-meganav-mobile-link {
|
|
65
|
+
@apply p-menu-row relative -left-8 w-extend-8;
|
|
66
|
+
@apply text-menu2 font-mono font-medium block text-cool-black text-left;
|
|
67
|
+
@apply flex items-center;
|
|
68
|
+
@apply focus:text-gui-focus focus:outline-none;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
.ui-meganav-account-link {
|
|
72
|
+
@apply block px-8 py-8 hover:bg-light-grey hover:text-gui-hover rounded relative -left-8 text-menu3 w-extend-8 font-bold font-mono;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
.ui-meganav-content {
|
|
76
|
+
@apply max-w-screen-xl py-24 lg:py-32 mx-auto;
|
|
77
|
+
@apply grid grid-cols-1;
|
|
78
|
+
@apply px-24 md:px-32 lg:px-32 xl:px-64;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
/* This is implemented not as padding so we can change the color of just this space, while keeping the grid
|
|
81
82
|
as close to the designs as possible */
|
|
82
|
-
.ui-meganav-content-spacer {
|
|
83
|
-
|
|
84
|
-
}
|
|
83
|
+
.ui-meganav-content-spacer {
|
|
84
|
+
@apply hidden md:block md:w-32 lg:w-32 xl:w-64 self-stretch flex-shrink-0 flex-grow-0;
|
|
85
|
+
}
|
|
85
86
|
|
|
86
|
-
.ui-meganav-media {
|
|
87
|
-
|
|
88
|
-
}
|
|
87
|
+
.ui-meganav-media {
|
|
88
|
+
@apply block px-8 py-8 hover:bg-light-grey rounded relative -left-8 w-extend-8;
|
|
89
|
+
}
|
|
89
90
|
|
|
90
|
-
.ui-meganav-media-with-image {
|
|
91
|
-
|
|
92
|
-
|
|
91
|
+
.ui-meganav-media-with-image {
|
|
92
|
+
grid-template-columns: max-content 1fr;
|
|
93
|
+
grid-template-rows: min-content 1fr;
|
|
93
94
|
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
}
|
|
95
|
+
@apply block px-8 py-8 hover:bg-light-grey rounded relative -left-8 w-extend-8;
|
|
96
|
+
@apply grid gap-x-16;
|
|
97
|
+
}
|
|
97
98
|
|
|
98
|
-
.ui-meganav-media-heading {
|
|
99
|
-
|
|
100
|
-
}
|
|
99
|
+
.ui-meganav-media-heading {
|
|
100
|
+
@apply text-menu3 text-cool-black font-bold font-sans group-hover:text-gui-hover group-focus:text-gui-focus leading-normal;
|
|
101
|
+
}
|
|
101
102
|
|
|
102
|
-
.ui-meganav-media-copy {
|
|
103
|
-
|
|
104
|
-
}
|
|
103
|
+
.ui-meganav-media-copy {
|
|
104
|
+
@apply text-p3 font-sans font-medium text-dark-grey leading-normal;
|
|
105
|
+
}
|
|
105
106
|
|
|
106
|
-
.ui-meganav-overline {
|
|
107
|
-
|
|
108
|
-
}
|
|
107
|
+
.ui-meganav-overline {
|
|
108
|
+
@apply text-overline2 text-cool-black uppercase font-medium font-mono tracking-widen-0.16 p-overline;
|
|
109
|
+
}
|
|
109
110
|
|
|
110
|
-
.ui-meganav-hr {
|
|
111
|
-
|
|
111
|
+
.ui-meganav-hr {
|
|
112
|
+
@apply my-0 text-mid-grey;
|
|
113
|
+
}
|
|
112
114
|
}
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
import throttle from "lodash.throttle";
|
|
2
2
|
|
|
3
|
-
import "./component.css";
|
|
4
|
-
|
|
5
3
|
// Glossary:
|
|
6
4
|
// item - is the element which contains both the control and the panel - these are adjacent
|
|
7
5
|
// control - interactive element that controls showing and hiding of dropdown or panel
|
package/src/core/Meganav.tsx
CHANGED
|
@@ -4,7 +4,6 @@ import { connectState } from "./remote-data-store.js";
|
|
|
4
4
|
import { selectSessionData } from "./remote-session-data.js";
|
|
5
5
|
|
|
6
6
|
import Logo from "./Logo";
|
|
7
|
-
import "./Meganav/component.css";
|
|
8
7
|
import MeganavData from "./Meganav/component.json";
|
|
9
8
|
import MeganavScripts from "./Meganav/component.js";
|
|
10
9
|
import MeganavItemsDesktop from "./MeganavItemsDesktop";
|
package/src/core/Notice.tsx
CHANGED