@ably/ui 8.8.1 → 8.10.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/README.md +1 -1
- package/core/CustomerLogos.jsx +6 -3
- package/core/DropdownMenu/component.js +1 -0
- package/core/DropdownMenu.jsx +423 -0
- package/core/Meganav.jsx +14 -2
- package/core/MeganavContentDevelopers.jsx +13 -1
- package/core/MeganavContentUseCases.jsx +1 -1
- package/core/sprites.svg +7 -0
- package/package.json +1 -1
- package/src/core/CustomerLogos/component.html.erb +2 -2
- package/src/core/CustomerLogos/component.jsx +3 -2
- package/src/core/CustomerLogos/component.rb +2 -1
- package/src/core/DropdownMenu/component.js +0 -0
- package/src/core/DropdownMenu/component.jsx +114 -0
- package/src/core/MeganavContentDevelopers/component.html.erb +9 -0
- package/src/core/MeganavContentDevelopers/component.jsx +9 -0
- package/src/core/MeganavContentUseCases/component.html.erb +1 -1
- package/src/core/MeganavContentUseCases/component.jsx +1 -1
- package/src/core/MeganavSearchSuggestions/component.html.erb +1 -1
- package/src/core/icons/icon-display-integrations-col.svg +8 -0
package/README.md
CHANGED
package/core/CustomerLogos.jsx
CHANGED
|
@@ -214,11 +214,13 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
214
214
|
|
|
215
215
|
|
|
216
216
|
var CustomerLogos = function CustomerLogos(_ref) {
|
|
217
|
-
var companies = _ref.companies
|
|
217
|
+
var companies = _ref.companies,
|
|
218
|
+
_ref$additionalCss = _ref.additionalCss,
|
|
219
|
+
additionalCss = _ref$additionalCss === void 0 ? "" : _ref$additionalCss;
|
|
218
220
|
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("section", {
|
|
219
221
|
className: "w-full bg-white"
|
|
220
222
|
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("ul", {
|
|
221
|
-
className: "py-64 flex flex-row flex-wrap md:flex-nowrap content-between m-auto items-center"
|
|
223
|
+
className: "py-64 flex flex-row flex-wrap md:flex-nowrap content-between m-auto items-center ".concat(additionalCss)
|
|
222
224
|
}, companies.map(function (company) {
|
|
223
225
|
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("li", {
|
|
224
226
|
key: company.label,
|
|
@@ -235,7 +237,8 @@ CustomerLogos.propTypes = {
|
|
|
235
237
|
companies: prop_types__WEBPACK_IMPORTED_MODULE_1___default().arrayOf(prop_types__WEBPACK_IMPORTED_MODULE_1___default().shape({
|
|
236
238
|
label: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().string),
|
|
237
239
|
logo: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().string)
|
|
238
|
-
}))
|
|
240
|
+
})),
|
|
241
|
+
additionalCss: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().string)
|
|
239
242
|
};
|
|
240
243
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (CustomerLogos);
|
|
241
244
|
})();
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
!function(e,o){"object"==typeof exports&&"object"==typeof module?module.exports=o():"function"==typeof define&&define.amd?define([],o):"object"==typeof exports?exports.AblyUi=o():(e.AblyUi=e.AblyUi||{},e.AblyUi.Core=e.AblyUi.Core||{},e.AblyUi.Core.DropdownMenu=o())}(this,(function(){return{}.default}));
|
|
@@ -0,0 +1,423 @@
|
|
|
1
|
+
(function webpackUniversalModuleDefinition(root, factory) {
|
|
2
|
+
if(typeof exports === 'object' && typeof module === 'object')
|
|
3
|
+
module.exports = factory(require("react"));
|
|
4
|
+
else if(typeof define === 'function' && define.amd)
|
|
5
|
+
define([], factory);
|
|
6
|
+
else {
|
|
7
|
+
var a = typeof exports === 'object' ? factory(require("react")) : factory(root[undefined]);
|
|
8
|
+
for(var i in a) (typeof exports === 'object' ? exports : root)[i] = a[i];
|
|
9
|
+
}
|
|
10
|
+
})(this, function(__WEBPACK_EXTERNAL_MODULE__9281__) {
|
|
11
|
+
return /******/ (() => { // webpackBootstrap
|
|
12
|
+
/******/ var __webpack_modules__ = ({
|
|
13
|
+
|
|
14
|
+
/***/ 9008:
|
|
15
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
16
|
+
|
|
17
|
+
"use strict";
|
|
18
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
19
|
+
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
20
|
+
/* harmony export */ });
|
|
21
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(9281);
|
|
22
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
|
23
|
+
/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(5697);
|
|
24
|
+
/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_1__);
|
|
25
|
+
var _excluded = ["name", "size", "color", "additionalCSS"];
|
|
26
|
+
|
|
27
|
+
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
28
|
+
|
|
29
|
+
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
30
|
+
|
|
31
|
+
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
var Icon = function Icon(_ref) {
|
|
37
|
+
var name = _ref.name,
|
|
38
|
+
_ref$size = _ref.size,
|
|
39
|
+
size = _ref$size === void 0 ? "0.75rem" : _ref$size,
|
|
40
|
+
_ref$color = _ref.color,
|
|
41
|
+
color = _ref$color === void 0 ? "" : _ref$color,
|
|
42
|
+
_ref$additionalCSS = _ref.additionalCSS,
|
|
43
|
+
additionalCSS = _ref$additionalCSS === void 0 ? "" : _ref$additionalCSS,
|
|
44
|
+
additionalAttributes = _objectWithoutProperties(_ref, _excluded);
|
|
45
|
+
|
|
46
|
+
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("svg", _extends({
|
|
47
|
+
className: "".concat(color, " ").concat(additionalCSS),
|
|
48
|
+
style: {
|
|
49
|
+
width: size,
|
|
50
|
+
height: size
|
|
51
|
+
}
|
|
52
|
+
}, additionalAttributes), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("use", {
|
|
53
|
+
xlinkHref: "#sprite-".concat(name)
|
|
54
|
+
}));
|
|
55
|
+
};
|
|
56
|
+
|
|
57
|
+
Icon.propTypes = {
|
|
58
|
+
name: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().string.isRequired),
|
|
59
|
+
size: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().string),
|
|
60
|
+
color: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().string),
|
|
61
|
+
additionalCSS: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().string)
|
|
62
|
+
};
|
|
63
|
+
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (Icon);
|
|
64
|
+
|
|
65
|
+
/***/ }),
|
|
66
|
+
|
|
67
|
+
/***/ 2703:
|
|
68
|
+
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
69
|
+
|
|
70
|
+
"use strict";
|
|
71
|
+
/**
|
|
72
|
+
* Copyright (c) 2013-present, Facebook, Inc.
|
|
73
|
+
*
|
|
74
|
+
* This source code is licensed under the MIT license found in the
|
|
75
|
+
* LICENSE file in the root directory of this source tree.
|
|
76
|
+
*/
|
|
77
|
+
|
|
78
|
+
|
|
79
|
+
|
|
80
|
+
var ReactPropTypesSecret = __webpack_require__(414);
|
|
81
|
+
|
|
82
|
+
function emptyFunction() {}
|
|
83
|
+
function emptyFunctionWithReset() {}
|
|
84
|
+
emptyFunctionWithReset.resetWarningCache = emptyFunction;
|
|
85
|
+
|
|
86
|
+
module.exports = function() {
|
|
87
|
+
function shim(props, propName, componentName, location, propFullName, secret) {
|
|
88
|
+
if (secret === ReactPropTypesSecret) {
|
|
89
|
+
// It is still safe when called from React.
|
|
90
|
+
return;
|
|
91
|
+
}
|
|
92
|
+
var err = new Error(
|
|
93
|
+
'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +
|
|
94
|
+
'Use PropTypes.checkPropTypes() to call them. ' +
|
|
95
|
+
'Read more at http://fb.me/use-check-prop-types'
|
|
96
|
+
);
|
|
97
|
+
err.name = 'Invariant Violation';
|
|
98
|
+
throw err;
|
|
99
|
+
};
|
|
100
|
+
shim.isRequired = shim;
|
|
101
|
+
function getShim() {
|
|
102
|
+
return shim;
|
|
103
|
+
};
|
|
104
|
+
// Important!
|
|
105
|
+
// Keep this list in sync with production version in `./factoryWithTypeCheckers.js`.
|
|
106
|
+
var ReactPropTypes = {
|
|
107
|
+
array: shim,
|
|
108
|
+
bool: shim,
|
|
109
|
+
func: shim,
|
|
110
|
+
number: shim,
|
|
111
|
+
object: shim,
|
|
112
|
+
string: shim,
|
|
113
|
+
symbol: shim,
|
|
114
|
+
|
|
115
|
+
any: shim,
|
|
116
|
+
arrayOf: getShim,
|
|
117
|
+
element: shim,
|
|
118
|
+
elementType: shim,
|
|
119
|
+
instanceOf: getShim,
|
|
120
|
+
node: shim,
|
|
121
|
+
objectOf: getShim,
|
|
122
|
+
oneOf: getShim,
|
|
123
|
+
oneOfType: getShim,
|
|
124
|
+
shape: getShim,
|
|
125
|
+
exact: getShim,
|
|
126
|
+
|
|
127
|
+
checkPropTypes: emptyFunctionWithReset,
|
|
128
|
+
resetWarningCache: emptyFunction
|
|
129
|
+
};
|
|
130
|
+
|
|
131
|
+
ReactPropTypes.PropTypes = ReactPropTypes;
|
|
132
|
+
|
|
133
|
+
return ReactPropTypes;
|
|
134
|
+
};
|
|
135
|
+
|
|
136
|
+
|
|
137
|
+
/***/ }),
|
|
138
|
+
|
|
139
|
+
/***/ 5697:
|
|
140
|
+
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
141
|
+
|
|
142
|
+
/**
|
|
143
|
+
* Copyright (c) 2013-present, Facebook, Inc.
|
|
144
|
+
*
|
|
145
|
+
* This source code is licensed under the MIT license found in the
|
|
146
|
+
* LICENSE file in the root directory of this source tree.
|
|
147
|
+
*/
|
|
148
|
+
|
|
149
|
+
if (false) { var throwOnDirectAccess, ReactIs; } else {
|
|
150
|
+
// By explicitly using `prop-types` you are opting into new production behavior.
|
|
151
|
+
// http://fb.me/prop-types-in-prod
|
|
152
|
+
module.exports = __webpack_require__(2703)();
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
|
|
156
|
+
/***/ }),
|
|
157
|
+
|
|
158
|
+
/***/ 414:
|
|
159
|
+
/***/ ((module) => {
|
|
160
|
+
|
|
161
|
+
"use strict";
|
|
162
|
+
/**
|
|
163
|
+
* Copyright (c) 2013-present, Facebook, Inc.
|
|
164
|
+
*
|
|
165
|
+
* This source code is licensed under the MIT license found in the
|
|
166
|
+
* LICENSE file in the root directory of this source tree.
|
|
167
|
+
*/
|
|
168
|
+
|
|
169
|
+
|
|
170
|
+
|
|
171
|
+
var ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';
|
|
172
|
+
|
|
173
|
+
module.exports = ReactPropTypesSecret;
|
|
174
|
+
|
|
175
|
+
|
|
176
|
+
/***/ }),
|
|
177
|
+
|
|
178
|
+
/***/ 9281:
|
|
179
|
+
/***/ ((module) => {
|
|
180
|
+
|
|
181
|
+
"use strict";
|
|
182
|
+
module.exports = __WEBPACK_EXTERNAL_MODULE__9281__;
|
|
183
|
+
|
|
184
|
+
/***/ })
|
|
185
|
+
|
|
186
|
+
/******/ });
|
|
187
|
+
/************************************************************************/
|
|
188
|
+
/******/ // The module cache
|
|
189
|
+
/******/ var __webpack_module_cache__ = {};
|
|
190
|
+
/******/
|
|
191
|
+
/******/ // The require function
|
|
192
|
+
/******/ function __webpack_require__(moduleId) {
|
|
193
|
+
/******/ // Check if module is in cache
|
|
194
|
+
/******/ var cachedModule = __webpack_module_cache__[moduleId];
|
|
195
|
+
/******/ if (cachedModule !== undefined) {
|
|
196
|
+
/******/ return cachedModule.exports;
|
|
197
|
+
/******/ }
|
|
198
|
+
/******/ // Create a new module (and put it into the cache)
|
|
199
|
+
/******/ var module = __webpack_module_cache__[moduleId] = {
|
|
200
|
+
/******/ // no module.id needed
|
|
201
|
+
/******/ // no module.loaded needed
|
|
202
|
+
/******/ exports: {}
|
|
203
|
+
/******/ };
|
|
204
|
+
/******/
|
|
205
|
+
/******/ // Execute the module function
|
|
206
|
+
/******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
|
|
207
|
+
/******/
|
|
208
|
+
/******/ // Return the exports of the module
|
|
209
|
+
/******/ return module.exports;
|
|
210
|
+
/******/ }
|
|
211
|
+
/******/
|
|
212
|
+
/************************************************************************/
|
|
213
|
+
/******/ /* webpack/runtime/compat get default export */
|
|
214
|
+
/******/ (() => {
|
|
215
|
+
/******/ // getDefaultExport function for compatibility with non-harmony modules
|
|
216
|
+
/******/ __webpack_require__.n = (module) => {
|
|
217
|
+
/******/ var getter = module && module.__esModule ?
|
|
218
|
+
/******/ () => (module['default']) :
|
|
219
|
+
/******/ () => (module);
|
|
220
|
+
/******/ __webpack_require__.d(getter, { a: getter });
|
|
221
|
+
/******/ return getter;
|
|
222
|
+
/******/ };
|
|
223
|
+
/******/ })();
|
|
224
|
+
/******/
|
|
225
|
+
/******/ /* webpack/runtime/define property getters */
|
|
226
|
+
/******/ (() => {
|
|
227
|
+
/******/ // define getter functions for harmony exports
|
|
228
|
+
/******/ __webpack_require__.d = (exports, definition) => {
|
|
229
|
+
/******/ for(var key in definition) {
|
|
230
|
+
/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
|
|
231
|
+
/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
|
|
232
|
+
/******/ }
|
|
233
|
+
/******/ }
|
|
234
|
+
/******/ };
|
|
235
|
+
/******/ })();
|
|
236
|
+
/******/
|
|
237
|
+
/******/ /* webpack/runtime/hasOwnProperty shorthand */
|
|
238
|
+
/******/ (() => {
|
|
239
|
+
/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
|
|
240
|
+
/******/ })();
|
|
241
|
+
/******/
|
|
242
|
+
/******/ /* webpack/runtime/make namespace object */
|
|
243
|
+
/******/ (() => {
|
|
244
|
+
/******/ // define __esModule on exports
|
|
245
|
+
/******/ __webpack_require__.r = (exports) => {
|
|
246
|
+
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
|
|
247
|
+
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
248
|
+
/******/ }
|
|
249
|
+
/******/ Object.defineProperty(exports, '__esModule', { value: true });
|
|
250
|
+
/******/ };
|
|
251
|
+
/******/ })();
|
|
252
|
+
/******/
|
|
253
|
+
/************************************************************************/
|
|
254
|
+
var __webpack_exports__ = {};
|
|
255
|
+
// This entry need to be wrapped in an IIFE because it need to be in strict mode.
|
|
256
|
+
(() => {
|
|
257
|
+
"use strict";
|
|
258
|
+
__webpack_require__.r(__webpack_exports__);
|
|
259
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
260
|
+
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
261
|
+
/* harmony export */ });
|
|
262
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(9281);
|
|
263
|
+
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
|
264
|
+
/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(5697);
|
|
265
|
+
/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_1__);
|
|
266
|
+
/* harmony import */ var _Icon_component_jsx__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(9008);
|
|
267
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
268
|
+
|
|
269
|
+
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
270
|
+
|
|
271
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
272
|
+
|
|
273
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
274
|
+
|
|
275
|
+
function _iterableToArrayLimit(arr, i) { var _i = arr && (typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]); if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
|
276
|
+
|
|
277
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
278
|
+
|
|
279
|
+
|
|
280
|
+
|
|
281
|
+
|
|
282
|
+
var DropdownMenuContext = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_0__.createContext)();
|
|
283
|
+
|
|
284
|
+
var DropdownMenu = function DropdownMenu(_ref) {
|
|
285
|
+
var children = _ref.children;
|
|
286
|
+
|
|
287
|
+
var _useState = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(false),
|
|
288
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
289
|
+
isOpen = _useState2[0],
|
|
290
|
+
setOpen = _useState2[1];
|
|
291
|
+
|
|
292
|
+
var ref = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(null);
|
|
293
|
+
(0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () {
|
|
294
|
+
var clickHandler = function clickHandler(e) {
|
|
295
|
+
var _ref$current;
|
|
296
|
+
|
|
297
|
+
if (ref !== null && ref !== void 0 && (_ref$current = ref.current) !== null && _ref$current !== void 0 && _ref$current.contains(e.target)) return;
|
|
298
|
+
setOpen(false);
|
|
299
|
+
};
|
|
300
|
+
|
|
301
|
+
document.addEventListener("click", clickHandler);
|
|
302
|
+
return function () {
|
|
303
|
+
document.removeEventListener("click", clickHandler);
|
|
304
|
+
};
|
|
305
|
+
}, []);
|
|
306
|
+
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(DropdownMenuContext.Provider, {
|
|
307
|
+
value: {
|
|
308
|
+
isOpen: isOpen,
|
|
309
|
+
setOpen: setOpen
|
|
310
|
+
}
|
|
311
|
+
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
|
|
312
|
+
id: "dropdown-menu",
|
|
313
|
+
className: "relative",
|
|
314
|
+
ref: ref
|
|
315
|
+
}, children));
|
|
316
|
+
};
|
|
317
|
+
|
|
318
|
+
DropdownMenu.propTypes = {
|
|
319
|
+
children: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().node)
|
|
320
|
+
};
|
|
321
|
+
|
|
322
|
+
var Trigger = function Trigger(_ref2) {
|
|
323
|
+
var children = _ref2.children,
|
|
324
|
+
_ref2$additionalTrigg = _ref2.additionalTriggerCSS,
|
|
325
|
+
additionalTriggerCSS = _ref2$additionalTrigg === void 0 ? "" : _ref2$additionalTrigg;
|
|
326
|
+
|
|
327
|
+
var _useContext = (0,react__WEBPACK_IMPORTED_MODULE_0__.useContext)(DropdownMenuContext),
|
|
328
|
+
isOpen = _useContext.isOpen,
|
|
329
|
+
setOpen = _useContext.setOpen;
|
|
330
|
+
|
|
331
|
+
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("button", {
|
|
332
|
+
id: "menu-trigger",
|
|
333
|
+
onClick: function onClick() {
|
|
334
|
+
return setOpen(!isOpen);
|
|
335
|
+
},
|
|
336
|
+
className: "".concat(additionalTriggerCSS, " flex items-center p-8 ml-8 group hover:text-gui-hover hover:bg-light-grey active:text-gui-active focus:text-gui-focus focus:outline-none rounded-lg")
|
|
337
|
+
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("span", {
|
|
338
|
+
className: "leading-normal"
|
|
339
|
+
}, children), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_Icon_component_jsx__WEBPACK_IMPORTED_MODULE_2__.default, {
|
|
340
|
+
name: "icon-gui-disclosure-arrow",
|
|
341
|
+
color: "text-cool-black",
|
|
342
|
+
size: "1.25rem",
|
|
343
|
+
additionalCSS: "transform rotate-90 group-hover:text-gui-hover group-active:text-gui-active group-focus:text-gui-focus"
|
|
344
|
+
}));
|
|
345
|
+
};
|
|
346
|
+
|
|
347
|
+
/*#__PURE__*/
|
|
348
|
+
react__WEBPACK_IMPORTED_MODULE_0___default().createElement(DropdownMenu.Trigger, {
|
|
349
|
+
className: "list of names"
|
|
350
|
+
}, "Click me");
|
|
351
|
+
Trigger.propTypes = {
|
|
352
|
+
children: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().node),
|
|
353
|
+
additionalTriggerCSS: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().string)
|
|
354
|
+
};
|
|
355
|
+
|
|
356
|
+
var Content = function Content(_ref3) {
|
|
357
|
+
var children = _ref3.children,
|
|
358
|
+
_ref3$anchorPosition = _ref3.anchorPosition,
|
|
359
|
+
anchorPosition = _ref3$anchorPosition === void 0 ? "right" : _ref3$anchorPosition,
|
|
360
|
+
additionalContentCSS = _ref3.additionalContentCSS;
|
|
361
|
+
|
|
362
|
+
var _useContext2 = (0,react__WEBPACK_IMPORTED_MODULE_0__.useContext)(DropdownMenuContext),
|
|
363
|
+
isOpen = _useContext2.isOpen;
|
|
364
|
+
|
|
365
|
+
if (!isOpen) {
|
|
366
|
+
return null;
|
|
367
|
+
}
|
|
368
|
+
|
|
369
|
+
var anchorPositionClasses = anchorPosition === "right" ? "right-0" : "left-0";
|
|
370
|
+
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
|
|
371
|
+
id: "menu-content",
|
|
372
|
+
className: "".concat(additionalContentCSS, " absolute p-8 z-10 border border-mid-grey bg-white rounded shadow-container ").concat(anchorPositionClasses),
|
|
373
|
+
style: {
|
|
374
|
+
minWidth: 275,
|
|
375
|
+
top: 44
|
|
376
|
+
}
|
|
377
|
+
}, children);
|
|
378
|
+
};
|
|
379
|
+
|
|
380
|
+
Content.propTypes = {
|
|
381
|
+
children: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().node),
|
|
382
|
+
anchorPosition: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().string),
|
|
383
|
+
additionalContentCSS: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().string)
|
|
384
|
+
};
|
|
385
|
+
|
|
386
|
+
var Link = function Link(_ref4) {
|
|
387
|
+
var url = _ref4.url,
|
|
388
|
+
title = _ref4.title,
|
|
389
|
+
subtitle = _ref4.subtitle,
|
|
390
|
+
iconName = _ref4.iconName,
|
|
391
|
+
children = _ref4.children;
|
|
392
|
+
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("a", {
|
|
393
|
+
href: url,
|
|
394
|
+
className: "menu-link group block p-8 hover:bg-light-grey hover:text-cool-black rounded"
|
|
395
|
+
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("p", {
|
|
396
|
+
className: "mb-4"
|
|
397
|
+
}, title, iconName ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_Icon_component_jsx__WEBPACK_IMPORTED_MODULE_2__.default, {
|
|
398
|
+
name: iconName,
|
|
399
|
+
size: "1rem",
|
|
400
|
+
color: "text-cool-black",
|
|
401
|
+
additionalCSS: "align-middle ml-8 relative -top-1 -left-4"
|
|
402
|
+
}) : null), subtitle ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("p", {
|
|
403
|
+
className: "text-p3 mb-16 text-dark-grey"
|
|
404
|
+
}, subtitle) : null, children);
|
|
405
|
+
};
|
|
406
|
+
|
|
407
|
+
Link.propTypes = {
|
|
408
|
+
url: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().string),
|
|
409
|
+
title: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().string),
|
|
410
|
+
subtitle: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().string),
|
|
411
|
+
iconName: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().string),
|
|
412
|
+
children: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().node)
|
|
413
|
+
};
|
|
414
|
+
DropdownMenu.Trigger = Trigger;
|
|
415
|
+
DropdownMenu.Content = Content;
|
|
416
|
+
DropdownMenu.Link = Link;
|
|
417
|
+
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (DropdownMenu);
|
|
418
|
+
})();
|
|
419
|
+
|
|
420
|
+
/******/ return __webpack_exports__;
|
|
421
|
+
/******/ })()
|
|
422
|
+
;
|
|
423
|
+
});
|
package/core/Meganav.jsx
CHANGED
|
@@ -4330,7 +4330,19 @@ var MeganavContentDevelopers = function MeganavContentDevelopers(_ref) {
|
|
|
4330
4330
|
className: "ui-meganav-media-heading"
|
|
4331
4331
|
}, "Tutorials & Demos"), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("p", {
|
|
4332
4332
|
className: "ui-meganav-media-copy"
|
|
4333
|
-
}, "Get stuck in with our hands-on resources. ")))))
|
|
4333
|
+
}, "Get stuck in with our hands-on resources. ")))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("li", null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("a", {
|
|
4334
|
+
href: absUrl("/integrations"),
|
|
4335
|
+
className: "ui-meganav-media-with-image group"
|
|
4336
|
+
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_Icon_component_jsx__WEBPACK_IMPORTED_MODULE_2__.default, {
|
|
4337
|
+
name: "icon-display-integrations-col",
|
|
4338
|
+
size: "2.5rem"
|
|
4339
|
+
}), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
|
|
4340
|
+
className: "flex flex-col justify-center"
|
|
4341
|
+
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("p", {
|
|
4342
|
+
className: "ui-meganav-media-heading"
|
|
4343
|
+
}, "Integrations"), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("p", {
|
|
4344
|
+
className: "ui-meganav-media-copy"
|
|
4345
|
+
}, "Find out more about Ably integrations. ")))))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
|
|
4334
4346
|
className: "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"
|
|
4335
4347
|
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("h3", {
|
|
4336
4348
|
className: "ui-meganav-overline uppercase",
|
|
@@ -4635,7 +4647,7 @@ var MeganavContentUseCases = function MeganavContentUseCases(_ref) {
|
|
|
4635
4647
|
className: "ui-meganav-media group"
|
|
4636
4648
|
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("p", {
|
|
4637
4649
|
className: "ui-meganav-media-heading"
|
|
4638
|
-
}, "
|
|
4650
|
+
}, "FinTech"), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("p", {
|
|
4639
4651
|
className: "ui-meganav-media-copy"
|
|
4640
4652
|
}, "Deliver personalised financial data in realtime."))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("li", null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("a", {
|
|
4641
4653
|
href: absUrl("/solutions/automotive-logistics-and-mobility"),
|
|
@@ -348,7 +348,19 @@ var MeganavContentDevelopers = function MeganavContentDevelopers(_ref) {
|
|
|
348
348
|
className: "ui-meganav-media-heading"
|
|
349
349
|
}, "Tutorials & Demos"), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("p", {
|
|
350
350
|
className: "ui-meganav-media-copy"
|
|
351
|
-
}, "Get stuck in with our hands-on resources. ")))))
|
|
351
|
+
}, "Get stuck in with our hands-on resources. ")))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("li", null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("a", {
|
|
352
|
+
href: absUrl("/integrations"),
|
|
353
|
+
className: "ui-meganav-media-with-image group"
|
|
354
|
+
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_Icon_component_jsx__WEBPACK_IMPORTED_MODULE_2__.default, {
|
|
355
|
+
name: "icon-display-integrations-col",
|
|
356
|
+
size: "2.5rem"
|
|
357
|
+
}), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
|
|
358
|
+
className: "flex flex-col justify-center"
|
|
359
|
+
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("p", {
|
|
360
|
+
className: "ui-meganav-media-heading"
|
|
361
|
+
}, "Integrations"), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("p", {
|
|
362
|
+
className: "ui-meganav-media-copy"
|
|
363
|
+
}, "Find out more about Ably integrations. ")))))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
|
|
352
364
|
className: "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"
|
|
353
365
|
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("h3", {
|
|
354
366
|
className: "ui-meganav-overline uppercase",
|
|
@@ -350,7 +350,7 @@ var MeganavContentUseCases = function MeganavContentUseCases(_ref) {
|
|
|
350
350
|
className: "ui-meganav-media group"
|
|
351
351
|
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("p", {
|
|
352
352
|
className: "ui-meganav-media-heading"
|
|
353
|
-
}, "
|
|
353
|
+
}, "FinTech"), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("p", {
|
|
354
354
|
className: "ui-meganav-media-copy"
|
|
355
355
|
}, "Deliver personalised financial data in realtime."))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("li", null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("a", {
|
|
356
356
|
href: absUrl("/solutions/automotive-logistics-and-mobility"),
|
package/core/sprites.svg
CHANGED
|
@@ -99,6 +99,13 @@
|
|
|
99
99
|
<rect width="48" height="48" fill="white"/>
|
|
100
100
|
</clipPath>
|
|
101
101
|
</defs>
|
|
102
|
+
</symbol><symbol fill="none" id="sprite-icon-display-integrations-col" viewBox="0 0 48 48"><title>sprite-icon-display-integrations-col</title>
|
|
103
|
+
<path d="M7.69985 7.70029C3.40409 11.9961 3.18585 18.7426 7.21241 22.7692L11.9425 27.4993L27.4988 11.9429L22.7688 7.21285C18.7422 3.18629 11.9956 3.40453 7.69985 7.70029Z" stroke="#03020D" stroke-width="1.5" stroke-linejoin="round"/>
|
|
104
|
+
<path d="M45.2129 45.2131L42.3844 42.3847" stroke="#03020D" stroke-width="1.37459" stroke-linecap="round" stroke-linejoin="round"/>
|
|
105
|
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M40.4514 40.451C35.8956 45.0068 28.6731 45.2897 24.3219 40.9385L19.5918 36.2084C19.2989 35.9155 19.2989 35.4406 19.5918 35.1477L35.1482 19.5914C35.441 19.2985 35.9159 19.2985 36.2088 19.5914L40.9389 24.3215C45.2902 28.6727 45.0073 35.8952 40.4514 40.451Z" fill="#FF5416"/>
|
|
106
|
+
<path d="M2.78647 2.78662L7.73622 7.73637" stroke="#03020D" stroke-width="1.37459" stroke-linecap="round" stroke-linejoin="round"/>
|
|
107
|
+
<path d="M23.2925 16.2217L28.2423 21.1714" stroke="#03020D" stroke-width="1.37459" stroke-linecap="round" stroke-linejoin="round"/>
|
|
108
|
+
<path d="M16.2215 23.2927L21.1712 28.2425" stroke="#03020D" stroke-width="1.37459" stroke-linecap="round" stroke-linejoin="round"/>
|
|
102
109
|
</symbol><symbol fill="none" id="sprite-icon-display-it-support-access" viewBox="0 0 48 48"><title>sprite-icon-display-it-support-access</title>
|
|
103
110
|
<path fill-rule="evenodd" clip-rule="evenodd" d="M46.5 40V12.75H1.5V40C1.5 40.2761 1.72386 40.5 2 40.5H46C46.2761 40.5 46.5 40.2761 46.5 40ZM46.5 8V11.25H1.5V8C1.5 7.72386 1.72386 7.5 2 7.5H46C46.2761 7.5 46.5 7.72386 46.5 8ZM48 8V40C48 41.1046 47.1046 42 46 42H2C0.895432 42 0 41.1046 0 40V8C0 6.89543 0.895431 6 2 6H46C47.1046 6 48 6.89543 48 8ZM4.25 9.25C4.25 9.80228 3.80228 10.25 3.25 10.25C2.69772 10.25 2.25 9.80228 2.25 9.25C2.25 8.69772 2.69772 8.25 3.25 8.25C3.80228 8.25 4.25 8.69772 4.25 9.25ZM6.25 10.25C6.80228 10.25 7.25 9.80228 7.25 9.25C7.25 8.69772 6.80228 8.25 6.25 8.25C5.69772 8.25 5.25 8.69772 5.25 9.25C5.25 9.80228 5.69772 10.25 6.25 10.25ZM10.25 9.25C10.25 9.80228 9.80228 10.25 9.25 10.25C8.69771 10.25 8.25 9.80228 8.25 9.25C8.25 8.69772 8.69771 8.25 9.25 8.25C9.80228 8.25 10.25 8.69772 10.25 9.25ZM24.75 29.7993C25.1984 29.54 25.5 29.0552 25.5 28.5C25.5 27.6716 24.8284 27 24 27C23.1716 27 22.5 27.6716 22.5 28.5C22.5 29.0552 22.8016 29.54 23.25 29.7993V33.5H24.75V29.7993ZM17 24.25C16.5858 24.25 16.25 24.5858 16.25 25V30.205L16.25 30.2421C16.2498 31.0676 16.2495 32.6758 17.0154 34.0849C17.4144 34.8189 18.0189 35.498 18.9172 35.9873C19.81 36.4735 20.9514 36.75 22.3949 36.75H25.6051C27.048 36.75 28.1892 36.4751 29.0819 35.9904C29.9804 35.5025 30.5854 34.8247 30.9846 34.0902C31.7506 32.681 31.7502 31.0674 31.75 30.2226L31.75 30.1839V25C31.75 24.5858 31.4142 24.25 31 24.25H29.75V21.1841C29.75 19.3825 29.1112 18.087 27.9744 17.2764C26.8851 16.4997 25.4495 16.25 24 16.25C22.5484 16.25 21.1133 16.5046 20.0247 17.2833C18.8896 18.0953 18.25 19.3896 18.25 21.1841V24.25H17ZM28.25 21.1841V24.25H19.75V21.1841C19.75 19.7819 20.2251 18.9842 20.8974 18.5033C21.6161 17.9891 22.6811 17.75 24 17.75C25.321 17.75 26.3855 17.9857 27.1035 18.4977C27.7741 18.9758 28.25 19.7723 28.25 21.1841ZM29 25.75H19H17.75V30.205C17.75 31.0561 17.7622 32.3179 18.3333 33.3686C18.6087 33.8753 19.0157 34.3328 19.6347 34.67C20.2593 35.0102 21.141 35.25 22.3949 35.25H25.6051C26.8596 35.25 27.7416 35.0113 28.3662 34.6721C28.985 34.3362 29.3916 33.88 29.6667 33.3739C30.2376 32.3236 30.25 31.0573 30.25 30.1839V25.75H29Z" fill="currentColor"/>
|
|
104
111
|
</symbol><symbol fill="none" id="sprite-icon-display-it-support-helpdesk" viewBox="0 0 48 48"><title>sprite-icon-display-it-support-helpdesk</title>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ably/ui",
|
|
3
|
-
"version": "8.
|
|
3
|
+
"version": "8.10.0",
|
|
4
4
|
"description": "Home of the Ably design system library ([design.ably.com](https://design.ably.com)). It provides a showcase, development/test environment and a publishing pipeline for different distributables.",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
<section class="w-full bg-white">
|
|
2
|
-
|
|
2
|
+
<%= tag.ul class: "py-64 flex flex-row flex-wrap md:flex-nowrap content-between m-auto items-center #{@additional_css}" do %>
|
|
3
3
|
<% companies.each do |company| %>
|
|
4
4
|
<li class="flex-auto text-center sm:w-1/3 w-1/2">
|
|
5
5
|
<%= image_tag company[:logo], alt: "#{company[:label]} logo", class: 'mx-auto' %>
|
|
6
6
|
</li>
|
|
7
7
|
<% end %>
|
|
8
|
-
|
|
8
|
+
<% end %>
|
|
9
9
|
</section>
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import T from "prop-types";
|
|
3
3
|
|
|
4
|
-
const CustomerLogos = ({ companies }) => {
|
|
4
|
+
const CustomerLogos = ({ companies, additionalCss = "" }) => {
|
|
5
5
|
return (
|
|
6
6
|
<section className="w-full bg-white">
|
|
7
|
-
<ul className=
|
|
7
|
+
<ul className={`py-64 flex flex-row flex-wrap md:flex-nowrap content-between m-auto items-center ${additionalCss}`}>
|
|
8
8
|
{companies.map((company) => (
|
|
9
9
|
<li key={company.label} className="flex-auto text-center sm:w-1/3 w-1/2">
|
|
10
10
|
<img alt={company.label} src={company.logo} className="mx-auto" />
|
|
@@ -22,6 +22,7 @@ CustomerLogos.propTypes = {
|
|
|
22
22
|
logo: T.string,
|
|
23
23
|
})
|
|
24
24
|
),
|
|
25
|
+
additionalCss: T.string,
|
|
25
26
|
};
|
|
26
27
|
|
|
27
28
|
export default CustomerLogos;
|
|
File without changes
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
import React, { createContext, useContext, useState, useEffect, useRef } from "react";
|
|
2
|
+
import T from "prop-types";
|
|
3
|
+
import Icon from "../Icon/component.jsx";
|
|
4
|
+
|
|
5
|
+
const DropdownMenuContext = createContext();
|
|
6
|
+
|
|
7
|
+
const DropdownMenu = ({ children }) => {
|
|
8
|
+
const [isOpen, setOpen] = useState(false);
|
|
9
|
+
const ref = useRef(null);
|
|
10
|
+
|
|
11
|
+
useEffect(() => {
|
|
12
|
+
const clickHandler = (e) => {
|
|
13
|
+
if (ref?.current?.contains(e.target)) return;
|
|
14
|
+
setOpen(false);
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
document.addEventListener("click", clickHandler);
|
|
18
|
+
|
|
19
|
+
return () => {
|
|
20
|
+
document.removeEventListener("click", clickHandler);
|
|
21
|
+
};
|
|
22
|
+
}, []);
|
|
23
|
+
|
|
24
|
+
return (
|
|
25
|
+
<DropdownMenuContext.Provider value={{ isOpen, setOpen }}>
|
|
26
|
+
<div id="dropdown-menu" className="relative" ref={ref}>
|
|
27
|
+
{children}
|
|
28
|
+
</div>
|
|
29
|
+
</DropdownMenuContext.Provider>
|
|
30
|
+
);
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
DropdownMenu.propTypes = {
|
|
34
|
+
children: T.node,
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
const Trigger = ({ children, additionalTriggerCSS = "" }) => {
|
|
38
|
+
const { isOpen, setOpen } = useContext(DropdownMenuContext);
|
|
39
|
+
|
|
40
|
+
return (
|
|
41
|
+
<button
|
|
42
|
+
id="menu-trigger"
|
|
43
|
+
onClick={() => setOpen(!isOpen)}
|
|
44
|
+
className={`${additionalTriggerCSS} flex items-center p-8 ml-8 group hover:text-gui-hover hover:bg-light-grey active:text-gui-active focus:text-gui-focus focus:outline-none rounded-lg`}
|
|
45
|
+
>
|
|
46
|
+
<span className="leading-normal">{children}</span>
|
|
47
|
+
<Icon
|
|
48
|
+
name="icon-gui-disclosure-arrow"
|
|
49
|
+
color="text-cool-black"
|
|
50
|
+
size="1.25rem"
|
|
51
|
+
additionalCSS="transform rotate-90 group-hover:text-gui-hover group-active:text-gui-active group-focus:text-gui-focus"
|
|
52
|
+
/>
|
|
53
|
+
</button>
|
|
54
|
+
);
|
|
55
|
+
};
|
|
56
|
+
|
|
57
|
+
<DropdownMenu.Trigger className="list of names">Click me</DropdownMenu.Trigger>;
|
|
58
|
+
|
|
59
|
+
Trigger.propTypes = {
|
|
60
|
+
children: T.node,
|
|
61
|
+
additionalTriggerCSS: T.string,
|
|
62
|
+
};
|
|
63
|
+
|
|
64
|
+
const Content = ({ children, anchorPosition = "right", additionalContentCSS }) => {
|
|
65
|
+
const { isOpen } = useContext(DropdownMenuContext);
|
|
66
|
+
|
|
67
|
+
if (!isOpen) {
|
|
68
|
+
return null;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
const anchorPositionClasses = anchorPosition === "right" ? "right-0" : "left-0";
|
|
72
|
+
|
|
73
|
+
return (
|
|
74
|
+
<div
|
|
75
|
+
id="menu-content"
|
|
76
|
+
className={`${additionalContentCSS} absolute p-8 z-10 border border-mid-grey bg-white rounded shadow-container ${anchorPositionClasses}`}
|
|
77
|
+
style={{ minWidth: 275, top: 44 }}
|
|
78
|
+
>
|
|
79
|
+
{children}
|
|
80
|
+
</div>
|
|
81
|
+
);
|
|
82
|
+
};
|
|
83
|
+
|
|
84
|
+
Content.propTypes = {
|
|
85
|
+
children: T.node,
|
|
86
|
+
anchorPosition: T.string,
|
|
87
|
+
additionalContentCSS: T.string,
|
|
88
|
+
};
|
|
89
|
+
|
|
90
|
+
const Link = ({ url, title, subtitle, iconName, children }) => {
|
|
91
|
+
return (
|
|
92
|
+
<a href={url} className="menu-link group block p-8 hover:bg-light-grey hover:text-cool-black rounded">
|
|
93
|
+
<p className="mb-4">
|
|
94
|
+
{title}
|
|
95
|
+
{iconName ? <Icon name={iconName} size="1rem" color="text-cool-black" additionalCSS="align-middle ml-8 relative -top-1 -left-4" /> : null}
|
|
96
|
+
</p>
|
|
97
|
+
{subtitle ? <p className="text-p3 mb-16 text-dark-grey">{subtitle}</p> : null}
|
|
98
|
+
{children}
|
|
99
|
+
</a>
|
|
100
|
+
);
|
|
101
|
+
};
|
|
102
|
+
|
|
103
|
+
Link.propTypes = {
|
|
104
|
+
url: T.string,
|
|
105
|
+
title: T.string,
|
|
106
|
+
subtitle: T.string,
|
|
107
|
+
iconName: T.string,
|
|
108
|
+
children: T.node,
|
|
109
|
+
};
|
|
110
|
+
|
|
111
|
+
DropdownMenu.Trigger = Trigger;
|
|
112
|
+
DropdownMenu.Content = Content;
|
|
113
|
+
DropdownMenu.Link = Link;
|
|
114
|
+
export default DropdownMenu;
|
|
@@ -56,6 +56,15 @@
|
|
|
56
56
|
</div>
|
|
57
57
|
<% end %>
|
|
58
58
|
</li>
|
|
59
|
+
<li>
|
|
60
|
+
<%= link_to abs_url("/integrations"), class: "ui-meganav-media-with-image group" do %>
|
|
61
|
+
<%= render(AblyUi::Core::Icon.new(name: "icon-display-integrations-col", size: "2.5rem")) %>
|
|
62
|
+
<div class="flex flex-col justify-center">
|
|
63
|
+
<p class="ui-meganav-media-heading">Integrations</p>
|
|
64
|
+
<p class="ui-meganav-media-copy">Find out more about Ably integrations. </p>
|
|
65
|
+
</div>
|
|
66
|
+
<% end %>
|
|
67
|
+
</li>
|
|
59
68
|
</ul>
|
|
60
69
|
</div>
|
|
61
70
|
|
|
@@ -62,6 +62,15 @@ const MeganavContentDevelopers = ({ absUrl }) => (
|
|
|
62
62
|
</div>
|
|
63
63
|
</a>
|
|
64
64
|
</li>
|
|
65
|
+
<li>
|
|
66
|
+
<a href={absUrl("/integrations")} className="ui-meganav-media-with-image group">
|
|
67
|
+
<Icon name="icon-display-integrations-col" size="2.5rem" />
|
|
68
|
+
<div className="flex flex-col justify-center">
|
|
69
|
+
<p className="ui-meganav-media-heading">Integrations</p>
|
|
70
|
+
<p className="ui-meganav-media-copy">Find out more about Ably integrations. </p>
|
|
71
|
+
</div>
|
|
72
|
+
</a>
|
|
73
|
+
</li>
|
|
65
74
|
</ul>
|
|
66
75
|
</div>
|
|
67
76
|
|
|
@@ -58,7 +58,7 @@
|
|
|
58
58
|
</li>
|
|
59
59
|
<li>
|
|
60
60
|
<%= link_to abs_url("/solutions/fintech"), class: "ui-meganav-media group" do %>
|
|
61
|
-
<p class="ui-meganav-media-heading">
|
|
61
|
+
<p class="ui-meganav-media-heading">FinTech</p>
|
|
62
62
|
<p class="ui-meganav-media-copy">Deliver personalised financial data in realtime.</p>
|
|
63
63
|
<% end %>
|
|
64
64
|
</li>
|
|
@@ -64,7 +64,7 @@ const MeganavContentUseCases = ({ absUrl }) => (
|
|
|
64
64
|
</li>
|
|
65
65
|
<li>
|
|
66
66
|
<a href={absUrl("/solutions/fintech")} className="ui-meganav-media group">
|
|
67
|
-
<p className="ui-meganav-media-heading">
|
|
67
|
+
<p className="ui-meganav-media-heading">FinTech</p>
|
|
68
68
|
<p className="ui-meganav-media-copy">Deliver personalised financial data in realtime.</p>
|
|
69
69
|
</a>
|
|
70
70
|
</li>
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
<%= link_to 'Publish/Subscribe Messaging', abs_url("/docs/core-features/pubsub"), class: "ui-text-p2 hover:text-gui-hover active:text-gui-active focus:text-gui-focus" %>
|
|
13
13
|
</li>
|
|
14
14
|
<li class="py-12 pl-8 flex-shrink-0">
|
|
15
|
-
<%= link_to 'Platform', abs_url("/
|
|
15
|
+
<%= link_to 'Platform', abs_url("/platform"), class: "ui-text-p2 hover:text-gui-hover active:text-gui-active focus:text-gui-focus" %>
|
|
16
16
|
</li>
|
|
17
17
|
</ul>
|
|
18
18
|
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
<svg width="48" height="48" viewBox="0 0 48 48" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<path d="M7.69985 7.70029C3.40409 11.9961 3.18585 18.7426 7.21241 22.7692L11.9425 27.4993L27.4988 11.9429L22.7688 7.21285C18.7422 3.18629 11.9956 3.40453 7.69985 7.70029Z" stroke="#03020D" stroke-width="1.5" stroke-linejoin="round"/>
|
|
3
|
+
<path d="M45.2129 45.2131L42.3844 42.3847" stroke="#03020D" stroke-width="1.37459" stroke-linecap="round" stroke-linejoin="round"/>
|
|
4
|
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M40.4514 40.451C35.8956 45.0068 28.6731 45.2897 24.3219 40.9385L19.5918 36.2084C19.2989 35.9155 19.2989 35.4406 19.5918 35.1477L35.1482 19.5914C35.441 19.2985 35.9159 19.2985 36.2088 19.5914L40.9389 24.3215C45.2902 28.6727 45.0073 35.8952 40.4514 40.451Z" fill="#FF5416"/>
|
|
5
|
+
<path d="M2.78647 2.78662L7.73622 7.73637" stroke="#03020D" stroke-width="1.37459" stroke-linecap="round" stroke-linejoin="round"/>
|
|
6
|
+
<path d="M23.2925 16.2217L28.2423 21.1714" stroke="#03020D" stroke-width="1.37459" stroke-linecap="round" stroke-linejoin="round"/>
|
|
7
|
+
<path d="M16.2215 23.2927L21.1712 28.2425" stroke="#03020D" stroke-width="1.37459" stroke-linecap="round" stroke-linejoin="round"/>
|
|
8
|
+
</svg>
|