@ably/ui 10.1.0 → 10.2.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.
@@ -238,10 +238,6 @@ var Trigger = function Trigger(_ref2) {
238
238
  }));
239
239
  };
240
240
 
241
- /*#__PURE__*/
242
- react__WEBPACK_IMPORTED_MODULE_0___default().createElement(DropdownMenu.Trigger, {
243
- className: "list of names"
244
- }, "Click me");
245
241
  Trigger.propTypes = {
246
242
  children: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().node),
247
243
  additionalTriggerCSS: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().string)
package/core/Flash.jsx CHANGED
@@ -285,22 +285,55 @@ module.exports = __WEBPACK_EXTERNAL_MODULE__5044__;
285
285
  var __webpack_exports__ = {};
286
286
  // This entry need to be wrapped in an IIFE because it need to be isolated against other modules in the chunk.
287
287
  (() => {
288
+ // ESM COMPAT FLAG
288
289
  __webpack_require__.r(__webpack_exports__);
289
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
290
- /* harmony export */ "reducerFlashes": () => (/* binding */ reducerFlashes),
291
- /* harmony export */ "FLASH_DATA_ID": () => (/* binding */ FLASH_DATA_ID),
292
- /* harmony export */ "Flashes": () => (/* binding */ Flashes),
293
- /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
294
- /* harmony export */ });
295
- /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(9281);
296
- /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
297
- /* harmony import */ var dompurify__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(6357);
298
- /* harmony import */ var dompurify__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(dompurify__WEBPACK_IMPORTED_MODULE_1__);
299
- /* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(3474);
300
- /* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_2__);
301
- /* harmony import */ var _remote_data_store__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(3511);
302
- /* harmony import */ var _ConnectStateWrapper_component_jsx__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(9787);
303
- /* harmony import */ var _Icon_component_jsx__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(9008);
290
+
291
+ // EXPORTS
292
+ __webpack_require__.d(__webpack_exports__, {
293
+ "FLASH_DATA_ID": () => (/* binding */ FLASH_DATA_ID),
294
+ "Flashes": () => (/* binding */ Flashes),
295
+ "default": () => (/* binding */ Flash_component),
296
+ "reducerFlashes": () => (/* binding */ reducerFlashes)
297
+ });
298
+
299
+ // EXTERNAL MODULE: external {"commonjs":"react","commonjs2":"react"}
300
+ var external_commonjs_react_commonjs2_react_ = __webpack_require__(9281);
301
+ var external_commonjs_react_commonjs2_react_default = /*#__PURE__*/__webpack_require__.n(external_commonjs_react_commonjs2_react_);
302
+ // EXTERNAL MODULE: external {"commonjs":"dompurify","commonjs2":"dompurify"}
303
+ var external_commonjs_dompurify_commonjs2_dompurify_ = __webpack_require__(6357);
304
+ var external_commonjs_dompurify_commonjs2_dompurify_default = /*#__PURE__*/__webpack_require__.n(external_commonjs_dompurify_commonjs2_dompurify_);
305
+ // EXTERNAL MODULE: external {"commonjs":"prop-types","commonjs2":"prop-types"}
306
+ var external_commonjs_prop_types_commonjs2_prop_types_ = __webpack_require__(3474);
307
+ var external_commonjs_prop_types_commonjs2_prop_types_default = /*#__PURE__*/__webpack_require__.n(external_commonjs_prop_types_commonjs2_prop_types_);
308
+ ;// CONCATENATED MODULE: ./node_modules/nanoid/non-secure/index.js
309
+ let urlAlphabet =
310
+ 'useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict'
311
+ let customAlphabet = (alphabet, defaultSize = 21) => {
312
+ return (size = defaultSize) => {
313
+ let id = ''
314
+ let i = size
315
+ while (i--) {
316
+ id += alphabet[(Math.random() * alphabet.length) | 0]
317
+ }
318
+ return id
319
+ }
320
+ }
321
+ let nanoid = (size = 21) => {
322
+ let id = ''
323
+ let i = size
324
+ while (i--) {
325
+ id += urlAlphabet[(Math.random() * 64) | 0]
326
+ }
327
+ return id
328
+ }
329
+
330
+ // EXTERNAL MODULE: ./src/core/remote-data-store.js
331
+ var remote_data_store = __webpack_require__(3511);
332
+ // EXTERNAL MODULE: ./src/core/ConnectStateWrapper/component.jsx
333
+ var component = __webpack_require__(9787);
334
+ // EXTERNAL MODULE: ./src/core/Icon/component.jsx
335
+ var Icon_component = __webpack_require__(9008);
336
+ ;// CONCATENATED MODULE: ./src/core/Flash/component.jsx
304
337
  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); }
305
338
 
306
339
  function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
@@ -335,6 +368,7 @@ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len
335
368
 
336
369
 
337
370
 
371
+
338
372
  var REDUCER_KEY = "flashes";
339
373
  var FLASH_DATA_ID = "ui-flashes";
340
374
  var initialState = {
@@ -364,8 +398,8 @@ var selectFlashes = function selectFlashes(store) {
364
398
  };
365
399
 
366
400
  var FlashT = {
367
- type: prop_types__WEBPACK_IMPORTED_MODULE_2___default().oneOf(["error", "success", "notice", "info", "alert"]),
368
- content: (prop_types__WEBPACK_IMPORTED_MODULE_2___default().string)
401
+ type: external_commonjs_prop_types_commonjs2_prop_types_default().oneOf(["error", "success", "notice", "info", "alert"]),
402
+ content: (external_commonjs_prop_types_commonjs2_prop_types_default()).string
369
403
  };
370
404
  var FLASH_BG_COLOR = {
371
405
  error: "bg-gui-error",
@@ -384,48 +418,60 @@ var FLASH_TEXT_COLOR = {
384
418
  var AUTO_HIDE = ["success", "info", "notice"];
385
419
  var AUTO_HIDE_TIME = 8000;
386
420
 
421
+ var useAutoHide = function useAutoHide(type, closeFlash) {
422
+ var timeoutId = (0,external_commonjs_react_commonjs2_react_.useRef)(null);
423
+ (0,external_commonjs_react_commonjs2_react_.useEffect)(function () {
424
+ if (AUTO_HIDE.includes(type)) {
425
+ timeoutId.current = setTimeout(function () {
426
+ closeFlash();
427
+ }, AUTO_HIDE_TIME);
428
+ }
429
+
430
+ return function () {
431
+ if (timeoutId.current) {
432
+ clearTimeout(timeoutId.current);
433
+ }
434
+ };
435
+ }, []);
436
+ };
437
+
387
438
  var Flash = function Flash(_ref) {
388
- var type = _ref.type,
389
- content = _ref.content;
390
- var ref = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(null);
439
+ var id = _ref.id,
440
+ type = _ref.type,
441
+ content = _ref.content,
442
+ removeFlash = _ref.removeFlash;
443
+ var ref = (0,external_commonjs_react_commonjs2_react_.useRef)(null);
391
444
 
392
- var _useState = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(false),
445
+ var _useState = (0,external_commonjs_react_commonjs2_react_.useState)(false),
393
446
  _useState2 = _slicedToArray(_useState, 2),
394
447
  closed = _useState2[0],
395
448
  setClosed = _useState2[1];
396
449
 
397
- var _useState3 = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(0),
450
+ var _useState3 = (0,external_commonjs_react_commonjs2_react_.useState)(0),
398
451
  _useState4 = _slicedToArray(_useState3, 2),
399
452
  flashHeight = _useState4[0],
400
453
  setFlashHeight = _useState4[1];
401
454
 
402
- var _useState5 = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(false),
455
+ var _useState5 = (0,external_commonjs_react_commonjs2_react_.useState)(false),
403
456
  _useState6 = _slicedToArray(_useState5, 2),
404
457
  triggerEntryAnimation = _useState6[0],
405
458
  setTriggerEntryAnimation = _useState6[1];
406
459
 
407
- (0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () {
408
- return setTriggerEntryAnimation(true);
409
- }, []);
410
- (0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () {
411
- if (AUTO_HIDE.includes(type)) {
412
- setTimeout(function () {
413
- // closeFlash is idempotent, we can call it even if the flash has been already closed
414
- closeFlash();
415
- }, AUTO_HIDE_TIME);
416
- }
417
- }, [closed]);
418
-
419
460
  var closeFlash = function closeFlash() {
420
461
  if (ref.current) {
421
462
  setFlashHeight(ref.current.getBoundingClientRect().height);
422
463
  }
423
464
 
465
+ setClosed(true);
424
466
  setTimeout(function () {
425
- return setClosed(true);
426
- }, 0);
467
+ removeFlash(id);
468
+ }, 100);
427
469
  };
428
470
 
471
+ (0,external_commonjs_react_commonjs2_react_.useEffect)(function () {
472
+ return setTriggerEntryAnimation(true);
473
+ }, []);
474
+ useAutoHide(type, closeFlash);
429
475
  var animateEntry = triggerEntryAnimation && !closed;
430
476
  var style;
431
477
 
@@ -443,7 +489,7 @@ var Flash = function Flash(_ref) {
443
489
  style = {};
444
490
  }
445
491
 
446
- var safeContent = dompurify__WEBPACK_IMPORTED_MODULE_1___default().sanitize(content, {
492
+ var safeContent = external_commonjs_dompurify_commonjs2_dompurify_default().sanitize(content, {
447
493
  ALLOWED_TAGS: ["a"],
448
494
  ALLOWED_ATTR: ["href", "data-method", "rel"]
449
495
  });
@@ -459,28 +505,28 @@ var Flash = function Flash(_ref) {
459
505
  error: "text-white",
460
506
  alert: "text-white"
461
507
  };
462
- return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
508
+ return /*#__PURE__*/external_commonjs_react_commonjs2_react_default().createElement("div", {
463
509
  className: "ui-flash-message ui-grid-px ".concat(animateEntry ? "ui-flash-message-enter" : ""),
464
510
  style: style,
465
511
  ref: ref,
466
512
  "data-id": "ui-flash"
467
- }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
513
+ }, /*#__PURE__*/external_commonjs_react_commonjs2_react_default().createElement("div", {
468
514
  className: "".concat(FLASH_BG_COLOR[type], " p-32 flex align-center rounded shadow-container-subtle")
469
- }, withIcons[type] && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_Icon_component_jsx__WEBPACK_IMPORTED_MODULE_5__.default, {
515
+ }, withIcons[type] && /*#__PURE__*/external_commonjs_react_commonjs2_react_default().createElement(Icon_component.default, {
470
516
  name: withIcons[type],
471
517
  color: iconColor[type],
472
518
  size: "1.5rem",
473
519
  additionalCSS: "mr-16 self-baseline"
474
- }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("p", {
520
+ }), /*#__PURE__*/external_commonjs_react_commonjs2_react_default().createElement("p", {
475
521
  className: "ui-flash-text ".concat(FLASH_TEXT_COLOR[type]),
476
522
  dangerouslySetInnerHTML: {
477
523
  __html: safeContent
478
524
  }
479
- }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("button", {
525
+ }), /*#__PURE__*/external_commonjs_react_commonjs2_react_default().createElement("button", {
480
526
  type: "button",
481
527
  className: "p-0 ml-auto self-start focus:outline-none",
482
528
  onClick: closeFlash
483
- }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_Icon_component_jsx__WEBPACK_IMPORTED_MODULE_5__.default, {
529
+ }, /*#__PURE__*/external_commonjs_react_commonjs2_react_default().createElement(Icon_component.default, {
484
530
  name: "icon-gui-close",
485
531
  color: iconColor[type],
486
532
  size: "1.5rem",
@@ -492,26 +538,55 @@ Flash.propTypes = _objectSpread({}, FlashT);
492
538
 
493
539
  var Flashes = function Flashes(_ref2) {
494
540
  var flashes = _ref2.flashes;
495
- var items = (flashes === null || flashes === void 0 ? void 0 : flashes.items) || [];
496
- return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
541
+
542
+ var _useState7 = (0,external_commonjs_react_commonjs2_react_.useState)([]),
543
+ _useState8 = _slicedToArray(_useState7, 2),
544
+ flashesWithIds = _useState8[0],
545
+ setFlashesWithIds = _useState8[1];
546
+
547
+ var removeFlash = function removeFlash(flashId) {
548
+ return setFlashesWithIds(function (items) {
549
+ return items.filter(function (item) {
550
+ return item.id !== flashId;
551
+ });
552
+ });
553
+ };
554
+
555
+ (0,external_commonjs_react_commonjs2_react_.useEffect)(function () {
556
+ setFlashesWithIds(function (state) {
557
+ return [].concat(_toConsumableArray(state), _toConsumableArray(((flashes === null || flashes === void 0 ? void 0 : flashes.items) || []).map(function (flash) {
558
+ return _objectSpread(_objectSpread({}, flash), {}, {
559
+ id: nanoid(),
560
+ removed: false
561
+ });
562
+ })));
563
+ });
564
+ }, [flashes]);
565
+ console.log({
566
+ flashesWithIds: flashesWithIds
567
+ });
568
+ return /*#__PURE__*/external_commonjs_react_commonjs2_react_default().createElement("div", {
497
569
  className: "ui-flash",
498
570
  "data-id": FLASH_DATA_ID
499
- }, items.map(function (flash) {
500
- return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(Flash, _extends({
501
- key: flash.type
571
+ }, flashesWithIds.filter(function (item) {
572
+ return !item.removed;
573
+ }).map(function (flash) {
574
+ return /*#__PURE__*/external_commonjs_react_commonjs2_react_default().createElement(Flash, _extends({
575
+ removeFlash: removeFlash,
576
+ key: flash.id
502
577
  }, flash));
503
578
  }));
504
579
  };
505
580
 
506
581
  Flashes.propTypes = {
507
- flashes: prop_types__WEBPACK_IMPORTED_MODULE_2___default().shape({
508
- items: prop_types__WEBPACK_IMPORTED_MODULE_2___default().arrayOf(prop_types__WEBPACK_IMPORTED_MODULE_2___default().shape(FlashT))
582
+ flashes: external_commonjs_prop_types_commonjs2_prop_types_default().shape({
583
+ items: external_commonjs_prop_types_commonjs2_prop_types_default().arrayOf(external_commonjs_prop_types_commonjs2_prop_types_default().shape(FlashT))
509
584
  })
510
585
  };
511
586
 
512
587
  var BackendFlashes = function BackendFlashes(_ref3) {
513
588
  var flashes = _ref3.flashes;
514
- (0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () {
589
+ (0,external_commonjs_react_commonjs2_react_.useEffect)(function () {
515
590
  var transformedFlashes = flashes.map(function (flash) {
516
591
  var _flash = _slicedToArray(flash, 2),
517
592
  type = _flash[0],
@@ -524,24 +599,24 @@ var BackendFlashes = function BackendFlashes(_ref3) {
524
599
  }) || [];
525
600
 
526
601
  if (transformedFlashes.length > 0) {
527
- var store = (0,_remote_data_store__WEBPACK_IMPORTED_MODULE_3__/* .getRemoteDataStore */ .cO)();
602
+ var store = (0,remote_data_store/* getRemoteDataStore */.cO)();
528
603
  store.dispatch({
529
604
  type: "flash/push",
530
605
  payload: transformedFlashes
531
606
  });
532
607
  }
533
608
  }, []);
534
- var WrappedFlashes = (0,_ConnectStateWrapper_component_jsx__WEBPACK_IMPORTED_MODULE_4__.default)(Flashes, {
609
+ var WrappedFlashes = (0,component.default)(Flashes, {
535
610
  flashes: selectFlashes
536
611
  });
537
- return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(WrappedFlashes, null);
612
+ return /*#__PURE__*/external_commonjs_react_commonjs2_react_default().createElement(WrappedFlashes, null);
538
613
  };
539
614
 
540
615
  BackendFlashes.propTypes = {
541
- flashes: prop_types__WEBPACK_IMPORTED_MODULE_2___default().arrayOf(prop_types__WEBPACK_IMPORTED_MODULE_2___default().arrayOf((prop_types__WEBPACK_IMPORTED_MODULE_2___default().string)))
616
+ flashes: external_commonjs_prop_types_commonjs2_prop_types_default().arrayOf(external_commonjs_prop_types_commonjs2_prop_types_default().arrayOf((external_commonjs_prop_types_commonjs2_prop_types_default()).string))
542
617
  };
543
618
 
544
- /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (BackendFlashes);
619
+ /* harmony default export */ const Flash_component = (BackendFlashes);
545
620
  })();
546
621
 
547
622
  /******/ return __webpack_exports__;
package/core/Logo.jsx CHANGED
@@ -97,133 +97,48 @@ module.exports = __WEBPACK_EXTERNAL_MODULE__9281__;
97
97
  var __webpack_exports__ = {};
98
98
  // This entry need to be wrapped in an IIFE because it need to be isolated against other modules in the chunk.
99
99
  (() => {
100
- // ESM COMPAT FLAG
101
100
  __webpack_require__.r(__webpack_exports__);
102
-
103
- // EXPORTS
104
- __webpack_require__.d(__webpack_exports__, {
105
- "default": () => (/* binding */ component)
106
- });
107
-
108
- // EXTERNAL MODULE: external {"commonjs":"react","commonjs2":"react"}
109
- var external_commonjs_react_commonjs2_react_ = __webpack_require__(9281);
110
- var external_commonjs_react_commonjs2_react_default = /*#__PURE__*/__webpack_require__.n(external_commonjs_react_commonjs2_react_);
111
- // EXTERNAL MODULE: external {"commonjs":"prop-types","commonjs2":"prop-types"}
112
- var external_commonjs_prop_types_commonjs2_prop_types_ = __webpack_require__(3474);
113
- var external_commonjs_prop_types_commonjs2_prop_types_default = /*#__PURE__*/__webpack_require__.n(external_commonjs_prop_types_commonjs2_prop_types_);
114
- ;// CONCATENATED MODULE: ./node_modules/nanoid/non-secure/index.js
115
- let urlAlphabet =
116
- 'useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict'
117
- let customAlphabet = (alphabet, defaultSize = 21) => {
118
- return (size = defaultSize) => {
119
- let id = ''
120
- let i = size
121
- while (i--) {
122
- id += alphabet[(Math.random() * alphabet.length) | 0]
123
- }
124
- return id
125
- }
126
- }
127
- let nanoid = (size = 21) => {
128
- let id = ''
129
- let i = size
130
- while (i--) {
131
- id += urlAlphabet[(Math.random() * 64) | 0]
132
- }
133
- return id
134
- }
135
-
136
- ;// CONCATENATED MODULE: ./src/core/Logo/component.jsx
101
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
102
+ /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
103
+ /* harmony export */ });
104
+ /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(9281);
105
+ /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
106
+ /* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(3474);
107
+ /* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_1__);
108
+ 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); }
137
109
 
138
110
 
139
111
 
140
112
 
141
113
  var Logo = function Logo(_ref) {
142
114
  var dataId = _ref.dataId,
115
+ logoUrl = _ref.logoUrl,
143
116
  _ref$href = _ref.href,
144
- href = _ref$href === void 0 ? "/" : _ref$href;
145
- // This fixes a bug where if the logo is rendered more than once on the page, and one of the instances
146
- // if it is hidden, the other instance will not show the ably shape from the logo.
147
- // This is because the defs in this SVG reference ids that need to be unique ids. The browser discards the "newer"
148
- // linearGradients defined in the other logo, and inherits the `hidden` style from the first.
149
- var gradientIds = (0,external_commonjs_react_commonjs2_react_.useMemo)(function () {
150
- return [nanoid(), nanoid()];
151
- }, []);
152
- return /*#__PURE__*/external_commonjs_react_commonjs2_react_default().createElement("a", {
117
+ href = _ref$href === void 0 ? "/" : _ref$href,
118
+ additionalImgAttrs = _ref.additionalImgAttrs,
119
+ additionalLinkAttrs = _ref.additionalLinkAttrs;
120
+ return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("a", _extends({
153
121
  href: href,
154
- className: "h-32"
155
- }, /*#__PURE__*/external_commonjs_react_commonjs2_react_default().createElement("svg", {
156
122
  "data-id": dataId,
157
- className: "text-cool-black transition-colors",
158
- width: "108",
159
- height: "32",
160
- viewBox: "0 0 108 32",
161
- xmlns: "http://www.w3.org/2000/svg"
162
- }, /*#__PURE__*/external_commonjs_react_commonjs2_react_default().createElement("path", {
163
- d: "M62.922 24.9786V4.08813H66.6933V11.6512C67.9709 10.435 69.6164 9.76044 71.3538 9.76044C75.4318 9.76044 79.0498 12.8674 79.0498 17.5484C79.0498 22.2293 75.4318 25.3465 71.3538 25.3465C69.5244 25.3465 67.7971 24.6209 66.5094 23.3024V24.9786H62.922ZM75.2785 17.5484C75.2785 14.932 73.4183 13.1025 70.9859 13.1025C68.6148 13.1025 66.7853 14.84 66.6933 17.3644V17.5484C66.6933 20.1648 68.5534 21.9942 70.9859 21.9942C73.4183 21.9942 75.2785 20.1648 75.2785 17.5484ZM80.7975 24.9786V4.08813H84.5688V24.9786H80.7975ZM89.8425 30.3954L92.0399 25.1523L86.0712 10.1284H90.1491L93.9511 20.6247L97.8144 10.1284H101.954L93.8591 30.4056H89.8425V30.3954ZM56.9329 10.1284V12.0191C55.6247 10.5883 53.7952 9.77066 51.9147 9.77066C47.8367 9.77066 44.2187 12.8777 44.2187 17.5586C44.2187 22.2497 47.8367 25.3465 51.9147 25.3465C53.8668 25.3465 55.7166 24.4982 57.0555 22.9754V24.9888H60.3465V10.1284H56.9329ZM56.5649 17.5484C56.5649 20.1341 54.7048 21.9942 52.2724 21.9942C49.8399 21.9942 47.9798 20.1341 47.9798 17.5484C47.9798 14.9626 49.8399 13.1025 52.2724 13.1025C54.6435 13.1025 56.473 14.8706 56.5649 17.3644V17.5484Z",
164
- fill: "currentColor"
165
- }), /*#__PURE__*/external_commonjs_react_commonjs2_react_default().createElement("path", {
166
- d: "M19.2858 0L3.14788 29.5369L0 27.3293L14.932 0H19.2858ZM19.5107 0L35.6487 29.5369L38.7965 27.3293L23.8646 0H19.5107Z",
167
- fill: "url(#".concat(gradientIds[0], ")")
168
- }), /*#__PURE__*/external_commonjs_react_commonjs2_react_default().createElement("path", {
169
- d: "M35.4238 29.7107L19.3983 17.16L3.37271 29.7107L6.64323 32L19.3983 22.0147L32.1533 32L35.4238 29.7107Z",
170
- fill: "url(#".concat(gradientIds[1], ")")
171
- }), /*#__PURE__*/external_commonjs_react_commonjs2_react_default().createElement("defs", null, /*#__PURE__*/external_commonjs_react_commonjs2_react_default().createElement("linearGradient", {
172
- id: gradientIds[0],
173
- x1: "5.47361",
174
- y1: "37.4219",
175
- x2: "32.4603",
176
- y2: "7.45023",
177
- gradientUnits: "userSpaceOnUse"
178
- }, /*#__PURE__*/external_commonjs_react_commonjs2_react_default().createElement("stop", {
179
- stopColor: "#FF5416"
180
- }), /*#__PURE__*/external_commonjs_react_commonjs2_react_default().createElement("stop", {
181
- offset: "0.2535",
182
- stopColor: "#FF5115"
183
- }), /*#__PURE__*/external_commonjs_react_commonjs2_react_default().createElement("stop", {
184
- offset: "0.461",
185
- stopColor: "#FF4712"
186
- }), /*#__PURE__*/external_commonjs_react_commonjs2_react_default().createElement("stop", {
187
- offset: "0.6523",
188
- stopColor: "#FF350E"
189
- }), /*#__PURE__*/external_commonjs_react_commonjs2_react_default().createElement("stop", {
190
- offset: "0.8327",
191
- stopColor: "#FF1E08"
192
- }), /*#__PURE__*/external_commonjs_react_commonjs2_react_default().createElement("stop", {
193
- offset: "1",
194
- stopColor: "#FF0000"
195
- })), /*#__PURE__*/external_commonjs_react_commonjs2_react_default().createElement("linearGradient", {
196
- id: gradientIds[1],
197
- x1: "10.7084",
198
- y1: "39.3593",
199
- x2: "26.6583",
200
- y2: "21.6452",
201
- gradientUnits: "userSpaceOnUse"
202
- }, /*#__PURE__*/external_commonjs_react_commonjs2_react_default().createElement("stop", {
203
- stopColor: "#FF5416"
204
- }), /*#__PURE__*/external_commonjs_react_commonjs2_react_default().createElement("stop", {
205
- offset: "0.2535",
206
- stopColor: "#FF5115"
207
- }), /*#__PURE__*/external_commonjs_react_commonjs2_react_default().createElement("stop", {
208
- offset: "0.461",
209
- stopColor: "#FF4712"
210
- }), /*#__PURE__*/external_commonjs_react_commonjs2_react_default().createElement("stop", {
211
- offset: "0.6523",
212
- stopColor: "#FF350E"
213
- }), /*#__PURE__*/external_commonjs_react_commonjs2_react_default().createElement("stop", {
214
- offset: "0.8327",
215
- stopColor: "#FF1E08"
216
- }), /*#__PURE__*/external_commonjs_react_commonjs2_react_default().createElement("stop", {
217
- offset: "1",
218
- stopColor: "#FF0000"
219
- })))));
123
+ className: "block",
124
+ style: {
125
+ height: "2.125rem"
126
+ }
127
+ }, additionalLinkAttrs), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("img", _extends({
128
+ src: logoUrl,
129
+ width: "108px",
130
+ alt: "Ably logo"
131
+ }, additionalImgAttrs)));
220
132
  };
221
133
 
222
134
  Logo.propTypes = {
223
- dataId: (external_commonjs_prop_types_commonjs2_prop_types_default()).string,
224
- href: (external_commonjs_prop_types_commonjs2_prop_types_default()).string
135
+ dataId: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().string),
136
+ href: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().string),
137
+ logoUrl: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().string),
138
+ additionalImgAttrs: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().object),
139
+ additionalLinkAttrs: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().object)
225
140
  };
226
- /* harmony default export */ const component = (/*#__PURE__*/external_commonjs_react_commonjs2_react_default().memo(Logo));
141
+ /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (/*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().memo(Logo));
227
142
  })();
228
143
 
229
144
  /******/ return __webpack_exports__;