@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.
Files changed (118) hide show
  1. package/core/Accordion.js +1 -1
  2. package/core/Code.js +1 -1
  3. package/core/ContactFooter/component.css +9 -7
  4. package/core/ContactFooter.js +1 -1
  5. package/core/CookieMessage/component.css +12 -10
  6. package/core/CookieMessage.js +1 -1
  7. package/core/Expander.js +1 -0
  8. package/core/Flash/component.css +21 -19
  9. package/core/Flash.js +1 -1
  10. package/core/Footer/component.css +24 -22
  11. package/core/Footer.js +1 -1
  12. package/core/Meganav/component.css +105 -103
  13. package/core/Meganav/component.js +1 -1
  14. package/core/Meganav.js +1 -1
  15. package/core/Notice/component.css +6 -4
  16. package/core/Notice/component.js +1 -1
  17. package/core/Notice.js +1 -1
  18. package/core/Slider/component.css +32 -30
  19. package/core/Slider/component.js +1 -1
  20. package/core/Slider.js +1 -1
  21. package/core/Table/Table.js +1 -1
  22. package/core/Table/TableCell.js +3 -3
  23. package/core/Table/data.js +1 -1
  24. package/core/Table.js +1 -1
  25. package/core/scripts.js +1 -1
  26. package/core/styles/buttons.css +123 -121
  27. package/core/styles/forms.css +51 -49
  28. package/core/styles/layout.css +16 -14
  29. package/core/styles/properties.css +252 -250
  30. package/core/styles/text.css +167 -165
  31. package/core/styles.components.css +24 -22
  32. package/core/utils/syntax-highlighter.css +59 -55
  33. package/package.json +2 -4
  34. package/src/core/Accordion.tsx +8 -6
  35. package/src/core/Code.tsx +0 -1
  36. package/src/core/ContactFooter/component.css +9 -7
  37. package/src/core/ContactFooter.tsx +0 -1
  38. package/src/core/CookieMessage/component.css +12 -10
  39. package/src/core/CookieMessage.tsx +0 -1
  40. package/src/core/Expander/Expander.stories.tsx +132 -0
  41. package/src/core/Expander.tsx +63 -0
  42. package/src/core/Flash/component.css +21 -19
  43. package/src/core/Flash.tsx +0 -1
  44. package/src/core/Footer/component.css +24 -22
  45. package/src/core/Footer.tsx +0 -1
  46. package/src/core/Meganav/component.css +105 -103
  47. package/src/core/Meganav/component.js +0 -2
  48. package/src/core/Meganav.tsx +0 -1
  49. package/src/core/Notice/component.css +6 -4
  50. package/src/core/Notice/component.js +0 -1
  51. package/src/core/Notice.tsx +0 -1
  52. package/src/core/Slider/Slider.stories.tsx +2 -2
  53. package/src/core/Slider/component.css +32 -30
  54. package/src/core/Slider/component.js +0 -2
  55. package/src/core/Slider.tsx +51 -20
  56. package/src/core/Table/Table.tsx +1 -2
  57. package/src/core/Table/TableCell.tsx +2 -40
  58. package/src/core/Table/data.tsx +21 -1
  59. package/src/core/Table.tsx +1 -12
  60. package/src/core/scripts.js +0 -2
  61. package/src/core/styles/buttons.css +123 -121
  62. package/src/core/styles/forms.css +51 -49
  63. package/src/core/styles/layout.css +16 -14
  64. package/src/core/styles/properties.css +252 -250
  65. package/src/core/styles/text.css +167 -165
  66. package/src/core/styles.components.css +24 -22
  67. package/src/core/utils/syntax-highlighter.css +59 -55
  68. package/core/.DS_Store +0 -0
  69. package/core/Accordion/.DS_Store +0 -0
  70. package/core/Code/.DS_Store +0 -0
  71. package/core/ContactFooter/.DS_Store +0 -0
  72. package/core/CookieMessage/.DS_Store +0 -0
  73. package/core/CustomerLogos/.DS_Store +0 -0
  74. package/core/DropdownMenu/.DS_Store +0 -0
  75. package/core/FeaturedLink/.DS_Store +0 -0
  76. package/core/Flash/.DS_Store +0 -0
  77. package/core/Footer/.DS_Store +0 -0
  78. package/core/Icon/.DS_Store +0 -0
  79. package/core/Loader/.DS_Store +0 -0
  80. package/core/Logo/.DS_Store +0 -0
  81. package/core/Meganav/.DS_Store +0 -0
  82. package/core/MeganavBlogPostsList/.DS_Store +0 -0
  83. package/core/MeganavControl/.DS_Store +0 -0
  84. package/core/MeganavControlMobileDropdown/.DS_Store +0 -0
  85. package/core/MeganavControlMobilePanelClose/.DS_Store +0 -0
  86. package/core/MeganavControlMobilePanelOpen/.DS_Store +0 -0
  87. package/core/MeganavSearchAutocomplete/.DS_Store +0 -0
  88. package/core/MeganavSearchSuggestions/.DS_Store +0 -0
  89. package/core/Notice/.DS_Store +0 -0
  90. package/core/Slider/.DS_Store +0 -0
  91. package/core/Table/.DS_Store +0 -0
  92. package/core/Tooltip/.DS_Store +0 -0
  93. package/src/.DS_Store +0 -0
  94. package/src/core/.DS_Store +0 -0
  95. package/src/core/Accordion/.DS_Store +0 -0
  96. package/src/core/Code/.DS_Store +0 -0
  97. package/src/core/ContactFooter/.DS_Store +0 -0
  98. package/src/core/CookieMessage/.DS_Store +0 -0
  99. package/src/core/CustomerLogos/.DS_Store +0 -0
  100. package/src/core/DropdownMenu/.DS_Store +0 -0
  101. package/src/core/FeaturedLink/.DS_Store +0 -0
  102. package/src/core/Flash/.DS_Store +0 -0
  103. package/src/core/Footer/.DS_Store +0 -0
  104. package/src/core/Icon/.DS_Store +0 -0
  105. package/src/core/Loader/.DS_Store +0 -0
  106. package/src/core/Logo/.DS_Store +0 -0
  107. package/src/core/Meganav/.DS_Store +0 -0
  108. package/src/core/MeganavBlogPostsList/.DS_Store +0 -0
  109. package/src/core/MeganavControl/.DS_Store +0 -0
  110. package/src/core/MeganavControlMobileDropdown/.DS_Store +0 -0
  111. package/src/core/MeganavControlMobilePanelClose/.DS_Store +0 -0
  112. package/src/core/MeganavControlMobilePanelOpen/.DS_Store +0 -0
  113. package/src/core/MeganavSearchAutocomplete/.DS_Store +0 -0
  114. package/src/core/MeganavSearchSuggestions/.DS_Store +0 -0
  115. package/src/core/Notice/.DS_Store +0 -0
  116. package/src/core/Slider/.DS_Store +0 -0
  117. package/src/core/Table/.DS_Store +0 -0
  118. package/src/core/Tooltip/.DS_Store +0 -0
@@ -1,11 +1,13 @@
1
- .ui-cookie-message {
2
- @apply rounded-lg bg-white font-sans;
3
- @apply justify-between items-center;
4
- @apply opacity-100 z-50 bottom-0 fixed sm:flex;
5
- @apply p-16 mb-16 ml-16;
6
- max-width: 70vw;
7
- box-shadow: 0px 24px 32px 0px #0000000d;
8
- border: 1px solid var(--color-mid-grey);
9
- border-left: 0.5rem solid var(--color-electric-cyan);
10
- transition: bottom 250ms ease-out, opacity 150ms ease-out;
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
  }
@@ -1,7 +1,6 @@
1
1
  import React, { useRef, useEffect, useState } from "react";
2
2
  import Cookie from "js-cookie";
3
3
 
4
- import "./CookieMessage/component.css";
5
4
  import _absUrl from "./url-base";
6
5
 
7
6
  const COOKIE_EXPIRY = 365;
@@ -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
- .ui-flash {
2
- @apply w-full fixed;
3
- top: 5.5rem;
4
- z-index: calc(var(--stacking-context-page-meganav) - 10);
5
- transition: margin-top 200ms;
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
- @apply font-sans font-light antialiased max-w-screen-xl mx-auto mt-8 opacity-0 relative;
10
- transition: opacity 200ms, transform 200ms, height 200ms 200ms,
11
- margin-top 200ms 200ms;
12
- transform: translateY(-200%) rotateX(-90deg);
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
- @apply underline;
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
- @apply opacity-100;
22
- transform: translateY(0) rotateX(0);
21
+ .ui-flash-message-enter {
22
+ @apply opacity-100;
23
+ transform: translateY(0) rotateX(0);
24
+ }
23
25
  }
@@ -5,7 +5,6 @@ import { nanoid } from "nanoid/non-secure";
5
5
  import { getRemoteDataStore } from "./remote-data-store.js";
6
6
  import ConnectStateWrapper from "./ConnectStateWrapper";
7
7
  import Icon from "./Icon";
8
- import "./Flash/component.css";
9
8
 
10
9
  type FlashProps = {
11
10
  id: string;
@@ -1,31 +1,33 @@
1
- .ui-footer-col-title {
2
- @apply font-mono text-overline2 p-menu-row-title font-medium uppercase tracking-widen-0.16;
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
- @apply text-menu3 text-cool-black font-sans font-medium hover:text-gui-hover block;
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
- @apply text-gui-default hover:text-gui-hover text-menu3 font-sans font-medium;
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
- font-size: 12px;
15
- }
14
+ .ui-footer-compliance-text {
15
+ font-size: 12px;
16
+ }
16
17
 
17
- .ui-footer-tick-icon {
18
- min-width: 1.5rem;
19
- }
18
+ .ui-footer-tick-icon {
19
+ min-width: 1.5rem;
20
+ }
20
21
 
21
- @media (max-width: 1040px) {
22
- .ui-footer-bottom-links {
23
- @apply pb-40;
22
+ @media (max-width: 1040px) {
23
+ .ui-footer-bottom-links {
24
+ @apply pb-40;
25
+ }
24
26
  }
25
- }
26
27
 
27
- @media screen {
28
- .ui-footer-glassdoor {
29
- display: none;
28
+ @media screen {
29
+ .ui-footer-glassdoor {
30
+ display: none;
31
+ }
30
32
  }
31
33
  }
@@ -2,7 +2,6 @@ import React from "react";
2
2
 
3
3
  import Icon from "./Icon";
4
4
  import _absUrl from "./url-base.js";
5
- import "./Footer/component.css";
6
5
 
7
6
  type FooterProps = {
8
7
  paths: {
@@ -1,112 +1,114 @@
1
- .ui-meganav-wrapper {
2
- /* Define values for new stacking context defined by position: fixed */
3
- --stacking-context-meganav-dropdown: 10;
4
- --stacking-context-meganav-mobile-panel: 20;
5
-
6
- z-index: var(--stacking-context-page-meganav);
7
-
8
- @apply fixed top-0 w-full;
9
- @apply antialiased font-sans transition-colors;
10
- }
11
-
12
- .ui-meganav {
13
- height: var(--ui-meganav-height);
14
-
15
- @apply flex justify-between items-center max-w-screen-xl mx-auto;
16
- }
17
-
18
- .ui-meganav-panel,
19
- .ui-meganav-mobile-dropdown,
20
- .ui-meganav-panel-account {
21
- z-index: var(--stacking-context-meganav-dropdown);
22
-
23
- @apply absolute left-0 right-0;
24
- @apply border-mid-grey border-t shadow-container;
25
- }
26
-
27
- .ui-meganav-panel {
28
- @apply bg-white;
29
- }
30
-
31
- .ui-meganav-panel-mobile {
32
- z-index: var(--stacking-context-meganav-mobile-panel);
33
-
34
- /* Prevents momentum-based scrolling https://devdocs.io/css/-webkit-overflow-scrolling */
35
- -webkit-overflow-scrolling: auto;
36
-
37
- @apply bg-white pt-16 border-0;
38
- @apply border-mid-grey border-t shadow-container;
39
- @apply fixed top-64 left-0 right-0 overflow-y-auto;
40
- }
41
-
42
- .ui-meganav-panel-account {
43
- left: auto;
44
- min-width: 20rem;
45
- @apply bg-white rounded-t-none;
46
- }
47
-
48
- .ui-meganav-panel-split-bg {
49
- background: linear-gradient(to right, #fafafb 33%, white 33%, white 100%);
50
- }
51
-
52
- .ui-meganav-link {
53
- @apply text-menu2 font-bold font-sans;
54
- @apply mr-12 lg:mr-24 px-0 py-20;
55
- @apply hover:text-gui-hover focus:text-gui-focus focus:outline-none;
56
- @apply transition-colors;
57
- }
58
-
59
- .ui-meganav-item {
60
- flex: 1 0 auto;
61
- }
62
-
63
- .ui-meganav-mobile-link {
64
- @apply p-menu-row relative -left-8 w-extend-8;
65
- @apply text-menu2 font-mono font-medium block text-cool-black text-left;
66
- @apply flex items-center;
67
- @apply focus:text-gui-focus focus:outline-none;
68
- }
69
-
70
- .ui-meganav-account-link {
71
- @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;
72
- }
73
-
74
- .ui-meganav-content {
75
- @apply max-w-screen-xl py-24 lg:py-32 mx-auto;
76
- @apply grid grid-cols-1;
77
- @apply px-24 md:px-32 lg:px-32 xl:px-64;
78
- }
79
-
80
- /* This is implemented not as padding so we can change the color of just this space, while keeping the grid
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
- @apply hidden md:block md:w-32 lg:w-32 xl:w-64 self-stretch flex-shrink-0 flex-grow-0;
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
- @apply block px-8 py-8 hover:bg-light-grey rounded relative -left-8 w-extend-8;
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
- grid-template-columns: max-content 1fr;
92
- grid-template-rows: min-content 1fr;
91
+ .ui-meganav-media-with-image {
92
+ grid-template-columns: max-content 1fr;
93
+ grid-template-rows: min-content 1fr;
93
94
 
94
- @apply block px-8 py-8 hover:bg-light-grey rounded relative -left-8 w-extend-8;
95
- @apply grid gap-x-16;
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
- @apply text-menu3 text-cool-black font-bold font-sans group-hover:text-gui-hover group-focus:text-gui-focus leading-normal;
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
- @apply text-p3 font-sans font-medium text-dark-grey leading-normal;
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
- @apply text-overline2 text-cool-black uppercase font-medium font-mono tracking-widen-0.16 p-overline;
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
- @apply my-0 text-mid-grey;
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
@@ -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";
@@ -1,5 +1,7 @@
1
- .ui-announcement {
2
- @apply font-sans;
3
- max-height: 37.5rem;
4
- transition: max-height 300ms;
1
+ @layer components {
2
+ .ui-announcement {
3
+ @apply font-sans;
4
+ max-height: 37.5rem;
5
+ transition: max-height 300ms;
6
+ }
5
7
  }
@@ -1,4 +1,3 @@
1
- import "./component.css";
2
1
  import Cookie from "js-cookie";
3
2
  import throttle from "lodash.throttle";
4
3
 
@@ -1,7 +1,6 @@
1
1
  import React, { ReactNode, useEffect } from "react";
2
2
 
3
3
  import NoticeScripts from "./Notice/component.js";
4
- import "./Notice/component.css";
5
4
  import Icon from "./Icon";
6
5
  type ContentWrapperProps = {
7
6
  buttonLink: string;
@@ -1,6 +1,6 @@
1
1
  import React from "react";
2
- import Slider from "../Slider.tsx";
3
- import Icon from "../Icon.tsx";
2
+ import Slider from "../Slider";
3
+ import Icon from "../Icon";
4
4
 
5
5
  const Slide = ({ name }: { name: string }) => (
6
6
  <div className="relative ">