@ably/ui 8.7.0-dev.c598ce1 → 8.7.0-dev.cf2bf50
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/README.md +7 -3
- package/core/.DS_Store +0 -0
- package/core/Code/component.js +1 -1
- package/core/Code.jsx +108 -88
- package/core/CompanyAutocomplete/component.js +1 -1
- package/core/ConnectStateWrapper/component.js +1 -1
- package/core/ConnectStateWrapper.jsx +7 -7
- package/core/ContactFooter/component.js +1 -1
- package/core/ContactFooter.jsx +12 -12
- package/core/CookieMessage/component.js +1 -1
- package/core/CookieMessage.jsx +10 -10
- package/core/CustomerLogos/component.js +1 -1
- package/core/CustomerLogos.jsx +7 -7
- package/core/DropdownMenu/component.js +1 -1
- package/core/DropdownMenu.jsx +11 -11
- package/core/FeatureFooter/component.js +1 -1
- package/core/FeaturedLink/component.js +1 -1
- package/core/FeaturedLink.jsx +10 -10
- package/core/Flash/component.js +1 -1
- package/core/Flash.jsx +19 -19
- package/core/Footer/component.js +1 -1
- package/core/Footer.jsx +33 -38
- package/core/Icon/component.js +1 -1
- package/core/Icon.jsx +7 -7
- package/core/Loader/component.js +1 -1
- package/core/Loader.jsx +7 -7
- package/core/Logo/component.js +1 -1
- package/core/Logo.jsx +7 -7
- package/core/Meganav/component.css +42 -20
- package/core/Meganav/component.js +1 -1
- package/core/Meganav/component.json +1 -1
- package/core/Meganav.jsx +586 -295
- package/core/MeganavBlogPostsList/component.js +1 -1
- package/core/MeganavBlogPostsList.jsx +13 -13
- package/core/MeganavContentCompany/component.js +1 -1
- package/core/MeganavContentCompany.jsx +39 -27
- package/core/MeganavContentDevelopers/component.js +1 -1
- package/core/MeganavContentDevelopers.jsx +380 -84
- package/core/MeganavContentPlatform/component.js +1 -1
- package/core/MeganavContentPlatform.jsx +26 -50
- package/core/MeganavContentProducts/component.js +1 -0
- package/core/MeganavContentProducts.jsx +333 -0
- package/core/MeganavContentUseCases/component.js +1 -1
- package/core/MeganavContentUseCases.jsx +62 -54
- package/core/MeganavControl/component.js +1 -1
- package/core/MeganavControl.jsx +10 -10
- package/core/MeganavControlMobileDropdown/component.js +1 -1
- package/core/MeganavControlMobileDropdown.jsx +11 -11
- package/core/MeganavControlMobilePanelClose/component.js +1 -1
- package/core/MeganavControlMobilePanelClose.jsx +10 -10
- package/core/MeganavControlMobilePanelOpen/component.js +1 -1
- package/core/MeganavControlMobilePanelOpen.jsx +10 -10
- package/core/MeganavItemsDesktop/component.js +1 -1
- package/core/MeganavItemsDesktop.jsx +17 -17
- package/core/MeganavItemsMobile/component.js +1 -1
- package/core/MeganavItemsMobile.jsx +39 -39
- package/core/MeganavItemsSignedIn/component.js +1 -1
- package/core/MeganavItemsSignedIn.jsx +33 -33
- package/core/MeganavSearch/component.js +1 -1
- package/core/MeganavSearch.jsx +23 -23
- package/core/MeganavSearchAutocomplete/component.js +1 -1
- package/core/MeganavSearchAutocomplete.jsx +4 -4
- package/core/MeganavSearchPanel/component.js +1 -1
- package/core/MeganavSearchPanel.jsx +19 -19
- package/core/MeganavSearchSuggestions/component.js +1 -1
- package/core/MeganavSearchSuggestions.jsx +13 -13
- package/core/Notice/component.js +1 -1
- package/core/Notice.jsx +30 -30
- package/core/Showcase/component.js +1 -1
- package/core/Showcase.jsx +1 -1
- package/core/SignOutLink/component.js +1 -1
- package/core/SignOutLink.jsx +7 -7
- package/core/Slider/component.js +1 -1
- package/core/Slider.jsx +14 -14
- package/core/Uptime/component.js +1 -1
- package/core/Uptime.jsx +15 -15
- package/core/images/best-support-2023.svg +1 -0
- package/core/images/fastest-implementation-2023.svg +1 -0
- package/core/images/high-performer-2023.svg +1 -0
- package/core/images/highest-user-adoption-2023.svg +1 -0
- package/core/scripts.js +1 -1
- package/core/sprites.svg +93 -0
- package/core/styles.css +1 -7
- package/package.json +3 -3
- package/reset/scripts.js +1 -1
- package/reset/styles.css +1 -11
- package/src/.DS_Store +0 -0
- package/src/core/.DS_Store +0 -0
- package/src/core/Footer/component.html.erb +7 -12
- package/src/core/Footer/component.jsx +10 -18
- package/src/core/HeadwayWidget/HeadwayWidget.jsx +234 -0
- package/src/core/HeadwayWidget/index.js +5 -0
- package/src/core/Meganav/component.css +42 -18
- package/src/core/Meganav/component.json +1 -1
- package/src/core/Meganav/component.jsx +2 -2
- package/src/core/Meganav/component.rb +4 -4
- package/src/core/MeganavContentCompany/component.html.erb +9 -0
- package/src/core/MeganavContentCompany/component.jsx +9 -0
- package/src/core/MeganavContentDevelopers/component.html.erb +18 -2
- package/src/core/MeganavContentDevelopers/component.jsx +139 -115
- package/src/core/{MeganavContentPlatform → MeganavContentProducts}/component.html.erb +15 -33
- package/src/core/{MeganavContentPlatform → MeganavContentProducts}/component.jsx +18 -39
- package/src/core/{MeganavContentPlatform → MeganavContentProducts}/component.rb +1 -1
- package/src/core/MeganavContentUseCases/component.html.erb +42 -38
- package/src/core/MeganavContentUseCases/component.jsx +41 -38
- package/src/core/MeganavItemsDesktop/component.jsx +1 -1
- package/src/core/MeganavItemsDesktop/component.rb +1 -1
- package/src/core/core.rb +8 -4
- package/src/core/icons/icon-display-asset-tracking-col.svg +18 -0
- package/src/core/icons/icon-display-data-broadcast-col.svg +26 -0
- package/src/core/icons/icon-display-data-synchronization-col.svg +14 -0
- package/src/core/icons/icon-display-events-col.svg +13 -0
- package/src/core/icons/icon-display-examples-col.svg +11 -0
- package/src/core/icons/icon-display-kafka-at-the-edge-col.svg +8 -0
- package/src/core/icons/icon-display-push-notifications-col.svg +6 -0
- package/src/core/icons/icon-social-x.svg +3 -0
- package/src/core/icons/icon-tech-apachekafka.svg +3 -0
- package/src/core/images/best-support-2023.svg +1 -0
- package/src/core/images/fastest-implementation-2023.svg +1 -0
- package/src/core/images/high-performer-2023.svg +1 -0
- package/src/core/images/highest-user-adoption-2023.svg +1 -0
- package/src/core/styles/text.css +1 -1
- package/src/core/utils/syntax-highlighter-registry.js +2 -0
- package/src/core/utils/syntax-highlighter.js +5 -0
- package/core/DropdownMenuPreview/component.js +0 -6
- package/core/DropdownMenuPreview.jsx +0 -6
- package/core/Meganav/component.js.LICENSE.txt +0 -7
- package/core/MeganavSearchAutocomplete/component.js.LICENSE.txt +0 -7
- package/core/Notice/component.js.LICENSE.txt +0 -9
- /package/src/core/{MeganavContentPlatform → MeganavContentProducts}/component.js +0 -0
|
@@ -0,0 +1,234 @@
|
|
|
1
|
+
import PropTypes from "prop-types";
|
|
2
|
+
import React, { useCallback, useEffect, useRef } from "react";
|
|
3
|
+
|
|
4
|
+
const HeadwayWidgetClassName = "HW_widget_component";
|
|
5
|
+
const HeadwayWidgetSelector = "." + HeadwayWidgetClassName;
|
|
6
|
+
const HeadwayWidgetTriggerClassName = "HW_trigger";
|
|
7
|
+
const HeadwayWidgetTriggerSelector = "." + HeadwayWidgetTriggerClassName;
|
|
8
|
+
|
|
9
|
+
const HeadwayWidgetTrigger = ({ widgetId, component, children }) => {
|
|
10
|
+
const Component = component || "div";
|
|
11
|
+
const className = HeadwayWidgetTriggerClassName + `_${widgetId}`;
|
|
12
|
+
|
|
13
|
+
return <Component className={className}>{children}</Component>;
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
HeadwayWidgetTrigger.defaultProps = {
|
|
17
|
+
widgetId: "widget-1",
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
const HeadwayWidget = ({
|
|
21
|
+
id,
|
|
22
|
+
account,
|
|
23
|
+
children,
|
|
24
|
+
widgetPosition,
|
|
25
|
+
badgePosition,
|
|
26
|
+
component,
|
|
27
|
+
trigger,
|
|
28
|
+
onWidgetReady,
|
|
29
|
+
onShowWidget,
|
|
30
|
+
onShowDetails,
|
|
31
|
+
onReadMore,
|
|
32
|
+
onHideWidget,
|
|
33
|
+
styles,
|
|
34
|
+
options,
|
|
35
|
+
translations,
|
|
36
|
+
...rest
|
|
37
|
+
}) => {
|
|
38
|
+
const onWidgetReadyRef = useRef(onWidgetReady);
|
|
39
|
+
const onShowWidgetRef = useRef(onShowWidget);
|
|
40
|
+
const onShowDetailsRef = useRef(onShowDetails);
|
|
41
|
+
const onReadMoreRef = useRef(onReadMore);
|
|
42
|
+
const onHideWidgetRef = useRef(onHideWidget);
|
|
43
|
+
const optionsRef = useRef(options);
|
|
44
|
+
useEffect(() => {
|
|
45
|
+
onWidgetReadyRef.current = onWidgetReady || (options.callbacks && options.callbacks.onWidgetReady);
|
|
46
|
+
onShowWidgetRef.current = onShowWidget || (options.callbacks && options.callbacks.onShowWidget);
|
|
47
|
+
onShowDetailsRef.current = onShowDetails || (options.callbacks && options.callbacks.onShowDetails);
|
|
48
|
+
onReadMoreRef.current = onReadMore || (options.callbacks && options.callbacks.onReadMore);
|
|
49
|
+
onHideWidgetRef.current = onHideWidget || (options.callbacks && options.callbacks.onHideWidget);
|
|
50
|
+
optionsRef.current = options;
|
|
51
|
+
});
|
|
52
|
+
|
|
53
|
+
const handleWidgetReady = useCallback(() => onWidgetReadyRef.current && onWidgetReadyRef.current(), []);
|
|
54
|
+
const handleShowWidget = useCallback(() => onShowWidgetRef.current && onShowWidgetRef.current(), []);
|
|
55
|
+
const handleShowDetails = useCallback(() => onShowDetailsRef.current && onShowDetailsRef.current(), []);
|
|
56
|
+
const handleReadMore = useCallback(() => onReadMoreRef.current && onReadMoreRef.current(), []);
|
|
57
|
+
const handleHideWidget = useCallback(() => onHideWidgetRef.current && onHideWidgetRef.current(), []);
|
|
58
|
+
|
|
59
|
+
const initHeadway = useCallback(() => {
|
|
60
|
+
const hwConfig = {
|
|
61
|
+
selector: HeadwayWidgetSelector + `_${id}`,
|
|
62
|
+
account: account || options.account,
|
|
63
|
+
trigger: trigger ? HeadwayWidgetSelector + `_${id}` : options.trigger || HeadwayWidgetTriggerSelector + `_${id}`,
|
|
64
|
+
callbacks: {
|
|
65
|
+
onWidgetReady: handleWidgetReady,
|
|
66
|
+
onShowWidget: handleShowWidget,
|
|
67
|
+
onShowDetails: handleShowDetails,
|
|
68
|
+
onReadMore: handleReadMore,
|
|
69
|
+
onHideWidget: handleHideWidget,
|
|
70
|
+
},
|
|
71
|
+
translations,
|
|
72
|
+
widgetPosition,
|
|
73
|
+
badgePosition,
|
|
74
|
+
__component: true,
|
|
75
|
+
styles,
|
|
76
|
+
...options,
|
|
77
|
+
};
|
|
78
|
+
|
|
79
|
+
const widget = window.Headway.getNewWidget();
|
|
80
|
+
widget.init(hwConfig);
|
|
81
|
+
|
|
82
|
+
return () => {
|
|
83
|
+
widget.destroy();
|
|
84
|
+
};
|
|
85
|
+
}, [account, trigger, handleWidgetReady, handleShowWidget, handleShowDetails, handleReadMore, handleHideWidget, badgePosition, widgetPosition, translations]);
|
|
86
|
+
|
|
87
|
+
console.log(window.Headway);
|
|
88
|
+
|
|
89
|
+
useEffect(() => {
|
|
90
|
+
console.log("test");
|
|
91
|
+
let destroy;
|
|
92
|
+
if (window.Headway) {
|
|
93
|
+
console.log("destroy");
|
|
94
|
+
destroy = initHeadway();
|
|
95
|
+
} else {
|
|
96
|
+
console.log("else");
|
|
97
|
+
const head = document.getElementsByTagName("head")[0];
|
|
98
|
+
const script = document.createElement("script");
|
|
99
|
+
script.type = "text/javascript";
|
|
100
|
+
const p = new Promise((resolve) => {
|
|
101
|
+
script.onload = () => {
|
|
102
|
+
const d = initHeadway();
|
|
103
|
+
resolve(d);
|
|
104
|
+
};
|
|
105
|
+
});
|
|
106
|
+
|
|
107
|
+
destroy = () => {
|
|
108
|
+
p.then((d) => d());
|
|
109
|
+
};
|
|
110
|
+
script.src = "https://cdn.headwayapp.co/widget.js"; // "https://cdn.headwaystaging.com/widget.js"; //;
|
|
111
|
+
head.appendChild(script);
|
|
112
|
+
}
|
|
113
|
+
return destroy;
|
|
114
|
+
}, [initHeadway]);
|
|
115
|
+
|
|
116
|
+
const Component = component || "div";
|
|
117
|
+
|
|
118
|
+
return (
|
|
119
|
+
<Component className={HeadwayWidgetClassName + `_${id}`} {...rest} style={{ position: "relative", display: "inline-block" }}>
|
|
120
|
+
{children}
|
|
121
|
+
</Component>
|
|
122
|
+
);
|
|
123
|
+
};
|
|
124
|
+
|
|
125
|
+
export default HeadwayWidget;
|
|
126
|
+
|
|
127
|
+
HeadwayWidget.propTypes = {
|
|
128
|
+
/**
|
|
129
|
+
* account of your Headway.
|
|
130
|
+
*/
|
|
131
|
+
account: PropTypes.string.isRequired,
|
|
132
|
+
/**
|
|
133
|
+
* id of the Widget. It is required if you have more than one widget instance on the page.
|
|
134
|
+
*/
|
|
135
|
+
id: PropTypes.string,
|
|
136
|
+
/**
|
|
137
|
+
* position of a badge
|
|
138
|
+
*/
|
|
139
|
+
badgePosition: PropTypes.oneOf([
|
|
140
|
+
"top-left",
|
|
141
|
+
"top-center",
|
|
142
|
+
"top-right",
|
|
143
|
+
"center-left",
|
|
144
|
+
"center",
|
|
145
|
+
"center-right",
|
|
146
|
+
"bottom-left",
|
|
147
|
+
"bottom-center",
|
|
148
|
+
"bottom-right",
|
|
149
|
+
]),
|
|
150
|
+
/**
|
|
151
|
+
* badge relative widget position
|
|
152
|
+
*/
|
|
153
|
+
widgetPosition: PropTypes.oneOf(["top-left", "top-right", "center-left", "center-right", "bottom-left", "bottom-right"]),
|
|
154
|
+
/**
|
|
155
|
+
* callback fired when widget has loaded
|
|
156
|
+
*/
|
|
157
|
+
onWidgetReady: PropTypes.func,
|
|
158
|
+
/**
|
|
159
|
+
* callback fired when widget is shown
|
|
160
|
+
*/
|
|
161
|
+
onShowWidget: PropTypes.func,
|
|
162
|
+
/**
|
|
163
|
+
* callback fired when an item in the widget is clicked
|
|
164
|
+
*/
|
|
165
|
+
onShowDetails: PropTypes.func,
|
|
166
|
+
/**
|
|
167
|
+
* callback fired when user clicks on readMore link
|
|
168
|
+
*/
|
|
169
|
+
onReadMore: PropTypes.func,
|
|
170
|
+
/**
|
|
171
|
+
* callback fired when user closes the widget
|
|
172
|
+
*/
|
|
173
|
+
onHideWidget: PropTypes.func,
|
|
174
|
+
/**
|
|
175
|
+
* Translating the text inside of the widget
|
|
176
|
+
* */
|
|
177
|
+
translations: PropTypes.shape({
|
|
178
|
+
title: PropTypes.string,
|
|
179
|
+
labels: PropTypes.shape({
|
|
180
|
+
new: PropTypes.string,
|
|
181
|
+
update: PropTypes.string,
|
|
182
|
+
improvement: PropTypes.string,
|
|
183
|
+
}),
|
|
184
|
+
readMore: PropTypes.string,
|
|
185
|
+
footer: PropTypes.string,
|
|
186
|
+
}),
|
|
187
|
+
/**
|
|
188
|
+
* options defined in classic object format. Read more at https://docs.headwayapp.co/widget
|
|
189
|
+
*/
|
|
190
|
+
options: PropTypes.shape({
|
|
191
|
+
account: PropTypes.string,
|
|
192
|
+
callbacks: PropTypes.shape({
|
|
193
|
+
onWidgetReady: PropTypes.func,
|
|
194
|
+
onShowWidget: PropTypes.func,
|
|
195
|
+
onShowDetails: PropTypes.func,
|
|
196
|
+
onReadMore: PropTypes.func,
|
|
197
|
+
onHideWidget: PropTypes.func,
|
|
198
|
+
}),
|
|
199
|
+
translations: PropTypes.shape({
|
|
200
|
+
title: PropTypes.string,
|
|
201
|
+
labels: PropTypes.shape({
|
|
202
|
+
new: PropTypes.string,
|
|
203
|
+
update: PropTypes.string,
|
|
204
|
+
improvement: PropTypes.string,
|
|
205
|
+
}),
|
|
206
|
+
readMore: PropTypes.string,
|
|
207
|
+
footer: PropTypes.string,
|
|
208
|
+
}),
|
|
209
|
+
trigger: PropTypes.string,
|
|
210
|
+
}),
|
|
211
|
+
|
|
212
|
+
component: PropTypes.oneOfType([PropTypes.string, PropTypes.func]),
|
|
213
|
+
children: PropTypes.node,
|
|
214
|
+
trigger: PropTypes.string,
|
|
215
|
+
styles: PropTypes.object,
|
|
216
|
+
};
|
|
217
|
+
|
|
218
|
+
HeadwayWidget.defaultProps = {
|
|
219
|
+
account: "",
|
|
220
|
+
id: "widget-1",
|
|
221
|
+
badgePosition: "bottom-right",
|
|
222
|
+
widgetPosition: "bottom-right",
|
|
223
|
+
styles: {},
|
|
224
|
+
translations: {},
|
|
225
|
+
options: {},
|
|
226
|
+
};
|
|
227
|
+
|
|
228
|
+
HeadwayWidgetTrigger.propTypes = {
|
|
229
|
+
widgetId: PropTypes.string.isRequired,
|
|
230
|
+
component: PropTypes.oneOfType([PropTypes.string, PropTypes.func]),
|
|
231
|
+
children: PropTypes.node,
|
|
232
|
+
};
|
|
233
|
+
|
|
234
|
+
export { HeadwayWidgetTrigger };
|
|
@@ -7,13 +7,13 @@
|
|
|
7
7
|
z-index: var(--stacking-context-page-meganav);
|
|
8
8
|
|
|
9
9
|
@apply fixed top-0 w-full;
|
|
10
|
-
@apply
|
|
10
|
+
@apply font-sans antialiased transition-colors;
|
|
11
11
|
}
|
|
12
12
|
|
|
13
13
|
.ui-meganav {
|
|
14
14
|
height: var(--ui-meganav-height);
|
|
15
15
|
|
|
16
|
-
@apply flex justify-between
|
|
16
|
+
@apply flex items-center justify-between max-w-screen-xl mx-auto;
|
|
17
17
|
}
|
|
18
18
|
|
|
19
19
|
.ui-meganav-panel,
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
z-index: var(--stacking-context-meganav-dropdown);
|
|
23
23
|
|
|
24
24
|
@apply absolute left-0 right-0;
|
|
25
|
-
@apply border-mid-grey
|
|
25
|
+
@apply border-t border-mid-grey shadow-container;
|
|
26
26
|
}
|
|
27
27
|
|
|
28
28
|
.ui-meganav-panel {
|
|
@@ -35,9 +35,9 @@
|
|
|
35
35
|
/* Prevents momentum-based scrolling https://devdocs.io/css/-webkit-overflow-scrolling */
|
|
36
36
|
-webkit-overflow-scrolling: auto;
|
|
37
37
|
|
|
38
|
-
@apply bg-white
|
|
39
|
-
@apply border-mid-grey
|
|
40
|
-
@apply fixed
|
|
38
|
+
@apply pt-16 bg-white border-0;
|
|
39
|
+
@apply border-t border-mid-grey shadow-container;
|
|
40
|
+
@apply fixed left-0 right-0 overflow-y-auto top-64;
|
|
41
41
|
}
|
|
42
42
|
|
|
43
43
|
.ui-meganav-panel-account {
|
|
@@ -51,8 +51,8 @@
|
|
|
51
51
|
}
|
|
52
52
|
|
|
53
53
|
.ui-meganav-link {
|
|
54
|
-
@apply
|
|
55
|
-
@apply mr-12 lg:mr-24
|
|
54
|
+
@apply block font-medium text-menu2;
|
|
55
|
+
@apply px-0 py-20 mr-12 lg:mr-24;
|
|
56
56
|
@apply hover:text-gui-hover focus:text-gui-focus focus:outline-none;
|
|
57
57
|
@apply transition-colors;
|
|
58
58
|
}
|
|
@@ -62,18 +62,18 @@
|
|
|
62
62
|
}
|
|
63
63
|
|
|
64
64
|
.ui-meganav-mobile-link {
|
|
65
|
-
@apply p-menu-row
|
|
66
|
-
@apply
|
|
65
|
+
@apply relative p-menu-row -left-8 w-extend-8;
|
|
66
|
+
@apply block font-medium text-left text-menu2 text-cool-black;
|
|
67
67
|
@apply flex items-center;
|
|
68
68
|
@apply focus:text-gui-focus focus:outline-none;
|
|
69
69
|
}
|
|
70
70
|
|
|
71
71
|
.ui-meganav-account-link {
|
|
72
|
-
@apply block px-8 py-8 hover:bg-light-grey hover:text-gui-hover
|
|
72
|
+
@apply relative block px-8 py-8 font-light rounded hover:bg-light-grey hover:text-gui-hover -left-8 text-menu3 w-extend-8;
|
|
73
73
|
}
|
|
74
74
|
|
|
75
75
|
.ui-meganav-content {
|
|
76
|
-
@apply max-w-screen-xl py-24 lg:py-32
|
|
76
|
+
@apply max-w-screen-xl py-24 mx-auto lg:py-32;
|
|
77
77
|
@apply grid grid-cols-1;
|
|
78
78
|
@apply px-24 md:px-32 lg:px-32 xl:px-64;
|
|
79
79
|
}
|
|
@@ -81,27 +81,27 @@
|
|
|
81
81
|
/* This is implemented not as padding so we can change the color of just this space, while keeping the grid
|
|
82
82
|
as close to the designs as possible */
|
|
83
83
|
.ui-meganav-content-spacer {
|
|
84
|
-
@apply hidden md:block md:w-32 lg:w-32 xl:w-64
|
|
84
|
+
@apply self-stretch flex-grow-0 flex-shrink-0 hidden md:block md:w-32 lg:w-32 xl:w-64;
|
|
85
85
|
}
|
|
86
86
|
|
|
87
87
|
.ui-meganav-media {
|
|
88
|
-
@apply block px-8 py-8 hover:bg-light-grey
|
|
88
|
+
@apply relative block px-8 py-8 rounded hover:bg-light-grey -left-8 w-extend-8;
|
|
89
89
|
}
|
|
90
90
|
|
|
91
91
|
.ui-meganav-media-with-image {
|
|
92
92
|
grid-template-columns: max-content 1fr;
|
|
93
93
|
grid-template-rows: min-content 1fr;
|
|
94
94
|
|
|
95
|
-
@apply block px-8 py-8 hover:bg-light-grey
|
|
96
|
-
@apply grid gap-x-
|
|
95
|
+
@apply relative block px-8 py-8 rounded hover:bg-light-grey -left-8 w-extend-8;
|
|
96
|
+
@apply grid gap-x-16;
|
|
97
97
|
}
|
|
98
98
|
|
|
99
99
|
.ui-meganav-media-heading {
|
|
100
|
-
@apply text-menu3 text-cool-black
|
|
100
|
+
@apply font-medium text-menu3 text-cool-black group-hover:text-gui-hover group-focus:text-gui-focus;
|
|
101
101
|
}
|
|
102
102
|
|
|
103
103
|
.ui-meganav-media-copy {
|
|
104
|
-
@apply text-p3 text-dark-grey
|
|
104
|
+
@apply font-light text-p3 text-dark-grey;
|
|
105
105
|
}
|
|
106
106
|
|
|
107
107
|
.ui-meganav-overline {
|
|
@@ -112,3 +112,27 @@
|
|
|
112
112
|
@apply my-0 text-mid-grey;
|
|
113
113
|
}
|
|
114
114
|
}
|
|
115
|
+
|
|
116
|
+
.HW_badge {
|
|
117
|
+
width: 1.25rem !important;
|
|
118
|
+
height: 1.25rem !important;
|
|
119
|
+
display: flex !important;
|
|
120
|
+
justify-content: center !important;
|
|
121
|
+
align-items: center !important;
|
|
122
|
+
font-size: 14px !important;
|
|
123
|
+
top: 2px !important;
|
|
124
|
+
left: 20px !important;
|
|
125
|
+
transition: none !important;
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
.HW_animated {
|
|
129
|
+
animation: none !important;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
.invisible .HW_badge {
|
|
133
|
+
visibility: hidden !important;
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
.invisible .HW_frame {
|
|
137
|
+
visibility: hidden !important;
|
|
138
|
+
}
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
}
|
|
30
30
|
},
|
|
31
31
|
"panels": [
|
|
32
|
-
{ "label": "
|
|
32
|
+
{ "label": "Products", "shortLabel": "Products", "id": "products-panel", "component": "MeganavContentProducts" },
|
|
33
33
|
{ "label": "Solutions", "shortLabel": "Solutions", "id": "use-cases-panel", "component": "MeganavContentUseCases" },
|
|
34
34
|
{ "label": "Company", "shortLabel": "Company", "id": "company-panel", "component": "MeganavContentCompany" },
|
|
35
35
|
{ "label": "Developers", "shortLabel": "Developers", "id": "developers-panel", "component": "MeganavContentDevelopers" }
|
|
@@ -14,7 +14,7 @@ import Notice from "../Notice/component.jsx";
|
|
|
14
14
|
import MeganavData from "./component.json";
|
|
15
15
|
import _absUrl from "../url-base";
|
|
16
16
|
|
|
17
|
-
import
|
|
17
|
+
import MeganavContentProducts from "../MeganavContentProducts/component.jsx";
|
|
18
18
|
import MeganavContentUseCases from "../MeganavContentUseCases/component.jsx";
|
|
19
19
|
import MeganavContentCompany from "../MeganavContentCompany/component.jsx";
|
|
20
20
|
import MeganavContentDevelopers from "../MeganavContentDevelopers/component.jsx";
|
|
@@ -58,7 +58,7 @@ SignIn.propTypes = {
|
|
|
58
58
|
const SignInPlaceholder = () => <div />;
|
|
59
59
|
|
|
60
60
|
const panels = {
|
|
61
|
-
|
|
61
|
+
MeganavContentProducts: MeganavContentProducts,
|
|
62
62
|
MeganavContentUseCases: MeganavContentUseCases,
|
|
63
63
|
MeganavContentCompany: MeganavContentCompany,
|
|
64
64
|
MeganavContentDevelopers: MeganavContentDevelopers,
|
|
@@ -30,10 +30,10 @@ module AblyUi
|
|
|
30
30
|
def panels
|
|
31
31
|
[
|
|
32
32
|
{
|
|
33
|
-
label: '
|
|
34
|
-
short_label: '
|
|
35
|
-
id: '
|
|
36
|
-
class: 'AblyUi::Core::
|
|
33
|
+
label: 'Products',
|
|
34
|
+
short_label: 'Products',
|
|
35
|
+
id: 'products-panel',
|
|
36
|
+
class: 'AblyUi::Core::MeganavContentProducts'
|
|
37
37
|
},
|
|
38
38
|
{
|
|
39
39
|
label: 'Solutions',
|
|
@@ -72,6 +72,15 @@
|
|
|
72
72
|
</div>
|
|
73
73
|
<% end %>
|
|
74
74
|
</li>
|
|
75
|
+
<li>
|
|
76
|
+
<%= link_to abs_url("/events"), class: "ui-meganav-media-with-image group" do %>
|
|
77
|
+
<%= render(AblyUi::Core::Icon.new(name: "icon-display-events-col", size: "2.5rem")) %>
|
|
78
|
+
<div class="flex flex-col justify-center">
|
|
79
|
+
<p class="ui-meganav-media-heading">Events</p>
|
|
80
|
+
<p class="ui-meganav-media-copy">Join Ably at upcoming events.</p>
|
|
81
|
+
</div>
|
|
82
|
+
<% end %>
|
|
83
|
+
</li>
|
|
75
84
|
</ul>
|
|
76
85
|
</div>
|
|
77
86
|
|
|
@@ -88,6 +88,15 @@ const MeganavContentCompany = ({ paths, absUrl }) => {
|
|
|
88
88
|
</div>
|
|
89
89
|
</a>
|
|
90
90
|
</li>
|
|
91
|
+
<li>
|
|
92
|
+
<a href={absUrl("/events")} className="ui-meganav-media-with-image group">
|
|
93
|
+
<Icon name="icon-display-events-col" size="2.5rem" />
|
|
94
|
+
<div className="flex flex-col justify-center">
|
|
95
|
+
<p className="ui-meganav-media-heading">Events</p>
|
|
96
|
+
<p className="ui-meganav-media-copy">Join Ably at upcoming events.</p>
|
|
97
|
+
</div>
|
|
98
|
+
</a>
|
|
99
|
+
</li>
|
|
91
100
|
</ul>
|
|
92
101
|
</div>
|
|
93
102
|
|
|
@@ -33,9 +33,17 @@
|
|
|
33
33
|
</div>
|
|
34
34
|
<% end %>
|
|
35
35
|
</li>
|
|
36
|
+
<li>
|
|
37
|
+
<%= link_to abs_url("/examples"), class: "ui-meganav-media-with-image group" do %>
|
|
38
|
+
<%= render(AblyUi::Core::Icon.new(name: "icon-display-examples-col", size: "2.5rem")) %>
|
|
39
|
+
<div class="flex flex-col justify-center">
|
|
40
|
+
<p class="ui-meganav-media-heading">Live examples</p>
|
|
41
|
+
<p class="ui-meganav-media-copy">Discover our features and their use cases.</p>
|
|
42
|
+
</div>
|
|
43
|
+
<% end %>
|
|
44
|
+
</li>
|
|
36
45
|
</ul>
|
|
37
46
|
</div>
|
|
38
|
-
|
|
39
47
|
<div class="col-span-full md:col-span-4 pb-8 md:py-24 lg:py-32 px-24 sm:px-32 md:px-0">
|
|
40
48
|
<ul class="md:mt-40" aria-labelledby="meganav-developers-panel-explore">
|
|
41
49
|
<li>
|
|
@@ -65,9 +73,17 @@
|
|
|
65
73
|
</div>
|
|
66
74
|
<% end %>
|
|
67
75
|
</li>
|
|
76
|
+
<li>
|
|
77
|
+
<%= link_to abs_url("/reference-guide-multiplayer"), class: "ui-meganav-media-with-image group" do %>
|
|
78
|
+
<%= render(AblyUi::Core::Icon.new(name: "icon-multi-user-spaces-col", size: "2.5rem")) %>
|
|
79
|
+
<div class="flex flex-col justify-center">
|
|
80
|
+
<p class="ui-meganav-media-heading">Multiplayer reference guide</p>
|
|
81
|
+
<p class="ui-meganav-media-copy">Learn how to build collaborative features with Ably.</p>
|
|
82
|
+
</div>
|
|
83
|
+
<% end %>
|
|
84
|
+
</li>
|
|
68
85
|
</ul>
|
|
69
86
|
</div>
|
|
70
|
-
|
|
71
87
|
<div class="col-span-full md:col-span-4 pt-8 pb-24 md:py-24 lg:py-32 px-24 sm:px-32 md:px-0">
|
|
72
88
|
<h3 class="ui-meganav-overline uppercase" id="meganav-developers-panel-quick-links">
|
|
73
89
|
Quick links
|