@ably/ui 7.8.2 → 7.9.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 +12 -4
- package/core/Logo.jsx +74 -36
- package/core/Meganav.jsx +76 -39
- package/package.json +6 -3
- package/src/core/Logo/component.jsx +2 -2
package/README.md
CHANGED
|
@@ -73,8 +73,16 @@ import "@ably/ui/core/styles.css";
|
|
|
73
73
|
Currently, AblyUI CSS is built to work with TailwindCSS. To integrate it into your app:
|
|
74
74
|
|
|
75
75
|
1. Add AblyUI to your project
|
|
76
|
-
|
|
77
|
-
1.
|
|
76
|
+
2. Add TailwindCSS to your project
|
|
77
|
+
1. By project type:
|
|
78
|
+
1. In [HTML](https://tailwindcss.com/docs/installation#installing-tailwind-css-as-a-post-css-plugin)
|
|
79
|
+
2. In [Gatsby](https://tailwindcss.com/docs/guides/gatsby)
|
|
80
|
+
1. Add postCSS import with `npm install postcss-import`
|
|
81
|
+
1. Further to the instructions, if installation is hanging for over 5 minutes or otherwise problematic, try installing the libraries one at a time
|
|
82
|
+
2. Make sure you are installing v2 with `npm install -D tailwindcss@2.X`
|
|
83
|
+
3. Make sure that tailwindcss-filters is also set to v2 in your package.json: otherwise `npm install -D tailwindcss-filters@2.X`
|
|
84
|
+
3. Make sure you are using the format `@import 'tailwindcss/base';...` in your `global.css` file rather than the `@tailwind/base` format from Tailwind v3
|
|
85
|
+
4. Add the following to your `tailwind.config.js`. Note how different config properties are always extended by the `ablyUIConfig`:
|
|
78
86
|
|
|
79
87
|
```js
|
|
80
88
|
const extendConfig = require("@ably/ui/tailwind.extend.js");
|
|
@@ -93,7 +101,7 @@ module.exports = extendConfig((ablyUIConfig) => ({
|
|
|
93
101
|
}));
|
|
94
102
|
```
|
|
95
103
|
|
|
96
|
-
1. In the CSS file you added your tailwind declarations
|
|
104
|
+
1. In the CSS file you added your tailwind declarations to, import the CSS for the modules and components you need:
|
|
97
105
|
|
|
98
106
|
```css
|
|
99
107
|
@import "tailwindcss/base";
|
|
@@ -136,7 +144,7 @@ Note that this loads neither CSS nor JS — these need to still be loaded by a b
|
|
|
136
144
|
|
|
137
145
|
### Icons
|
|
138
146
|
|
|
139
|
-
Putting SVG files inside
|
|
147
|
+
Putting SVG files inside a`src/MODULE_NAME/icons` folder will add them to a per-module sprites file that will be available at the root of the module (e.g., `core/sprites.svg`). This file can be loaded with the `loadSprites` helper available in the `core` module or include in the page directly.
|
|
140
148
|
|
|
141
149
|
Usage with the `Icon` React component:
|
|
142
150
|
|
package/core/Logo.jsx
CHANGED
|
@@ -202,14 +202,57 @@ var __webpack_exports__ = {};
|
|
|
202
202
|
// This entry need to be wrapped in an IIFE because it need to be in strict mode.
|
|
203
203
|
(() => {
|
|
204
204
|
"use strict";
|
|
205
|
+
// ESM COMPAT FLAG
|
|
205
206
|
__webpack_require__.r(__webpack_exports__);
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
207
|
+
|
|
208
|
+
// EXPORTS
|
|
209
|
+
__webpack_require__.d(__webpack_exports__, {
|
|
210
|
+
"default": () => (/* binding */ component)
|
|
211
|
+
});
|
|
212
|
+
|
|
213
|
+
// EXTERNAL MODULE: external {"commonjs":"react","commonjs2":"react"}
|
|
214
|
+
var external_commonjs_react_commonjs2_react_ = __webpack_require__(9281);
|
|
215
|
+
var external_commonjs_react_commonjs2_react_default = /*#__PURE__*/__webpack_require__.n(external_commonjs_react_commonjs2_react_);
|
|
216
|
+
// EXTERNAL MODULE: ./node_modules/prop-types/index.js
|
|
217
|
+
var prop_types = __webpack_require__(5697);
|
|
218
|
+
var prop_types_default = /*#__PURE__*/__webpack_require__.n(prop_types);
|
|
219
|
+
;// CONCATENATED MODULE: ./node_modules/nanoid/index.browser.js
|
|
220
|
+
|
|
221
|
+
let random = bytes => crypto.getRandomValues(new Uint8Array(bytes))
|
|
222
|
+
let customRandom = (alphabet, defaultSize, getRandom) => {
|
|
223
|
+
let mask = (2 << (Math.log(alphabet.length - 1) / Math.LN2)) - 1
|
|
224
|
+
let step = -~((1.6 * mask * defaultSize) / alphabet.length)
|
|
225
|
+
return (size = defaultSize) => {
|
|
226
|
+
let id = ''
|
|
227
|
+
while (true) {
|
|
228
|
+
let bytes = getRandom(step)
|
|
229
|
+
let j = step
|
|
230
|
+
while (j--) {
|
|
231
|
+
id += alphabet[bytes[j] & mask] || ''
|
|
232
|
+
if (id.length === size) return id
|
|
233
|
+
}
|
|
234
|
+
}
|
|
235
|
+
}
|
|
236
|
+
}
|
|
237
|
+
let customAlphabet = (alphabet, size = 21) =>
|
|
238
|
+
customRandom(alphabet, size, random)
|
|
239
|
+
let nanoid = (size = 21) =>
|
|
240
|
+
crypto.getRandomValues(new Uint8Array(size)).reduce((id, byte) => {
|
|
241
|
+
byte &= 63
|
|
242
|
+
if (byte < 36) {
|
|
243
|
+
id += byte.toString(36)
|
|
244
|
+
} else if (byte < 62) {
|
|
245
|
+
id += (byte - 26).toString(36).toUpperCase()
|
|
246
|
+
} else if (byte > 62) {
|
|
247
|
+
id += '-'
|
|
248
|
+
} else {
|
|
249
|
+
id += '_'
|
|
250
|
+
}
|
|
251
|
+
return id
|
|
252
|
+
}, '')
|
|
253
|
+
|
|
254
|
+
;// CONCATENATED MODULE: ./src/core/Logo/component.jsx
|
|
255
|
+
|
|
213
256
|
|
|
214
257
|
|
|
215
258
|
|
|
@@ -217,93 +260,88 @@ var Logo = function Logo(_ref) {
|
|
|
217
260
|
var dataId = _ref.dataId,
|
|
218
261
|
_ref$href = _ref.href,
|
|
219
262
|
href = _ref$href === void 0 ? "/" : _ref$href;
|
|
220
|
-
|
|
221
263
|
// This fixes a bug where if the logo is rendered more than once on the page, and one of the instances
|
|
222
264
|
// if it is hidden, the other instance will not show the ably shape from the logo.
|
|
223
265
|
// This is because the defs in this SVG reference ids that need to be unique ids. The browser discards the "newer"
|
|
224
266
|
// linearGradients defined in the other logo, and inherits the `hidden` style from the first.
|
|
225
|
-
var
|
|
226
|
-
return
|
|
227
|
-
};
|
|
228
|
-
|
|
229
|
-
var gradientIds = (0,react__WEBPACK_IMPORTED_MODULE_0__.useMemo)(function () {
|
|
230
|
-
return [createID(), createID()];
|
|
267
|
+
var gradientIds = (0,external_commonjs_react_commonjs2_react_.useMemo)(function () {
|
|
268
|
+
return [nanoid(), nanoid()];
|
|
231
269
|
}, []);
|
|
232
|
-
return /*#__PURE__*/
|
|
270
|
+
return /*#__PURE__*/external_commonjs_react_commonjs2_react_default().createElement("a", {
|
|
233
271
|
href: href,
|
|
234
272
|
className: "h-32"
|
|
235
|
-
}, /*#__PURE__*/
|
|
273
|
+
}, /*#__PURE__*/external_commonjs_react_commonjs2_react_default().createElement("svg", {
|
|
236
274
|
"data-id": dataId,
|
|
237
275
|
className: "text-cool-black transition-colors",
|
|
238
276
|
width: "108",
|
|
239
277
|
height: "32",
|
|
240
278
|
viewBox: "0 0 108 32",
|
|
241
279
|
xmlns: "http://www.w3.org/2000/svg"
|
|
242
|
-
}, /*#__PURE__*/
|
|
280
|
+
}, /*#__PURE__*/external_commonjs_react_commonjs2_react_default().createElement("path", {
|
|
243
281
|
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",
|
|
244
282
|
fill: "currentColor"
|
|
245
|
-
}), /*#__PURE__*/
|
|
283
|
+
}), /*#__PURE__*/external_commonjs_react_commonjs2_react_default().createElement("path", {
|
|
246
284
|
d: "M19.2858 0L3.14788 29.5369L0 27.3293L14.932 0H19.2858ZM19.5107 0L35.6487 29.5369L38.7965 27.3293L23.8646 0H19.5107Z",
|
|
247
285
|
fill: "url(#".concat(gradientIds[0], ")")
|
|
248
|
-
}), /*#__PURE__*/
|
|
286
|
+
}), /*#__PURE__*/external_commonjs_react_commonjs2_react_default().createElement("path", {
|
|
249
287
|
d: "M35.4238 29.7107L19.3983 17.16L3.37271 29.7107L6.64323 32L19.3983 22.0147L32.1533 32L35.4238 29.7107Z",
|
|
250
288
|
fill: "url(#".concat(gradientIds[1], ")")
|
|
251
|
-
}), /*#__PURE__*/
|
|
289
|
+
}), /*#__PURE__*/external_commonjs_react_commonjs2_react_default().createElement("defs", null, /*#__PURE__*/external_commonjs_react_commonjs2_react_default().createElement("linearGradient", {
|
|
252
290
|
id: gradientIds[0],
|
|
253
291
|
x1: "5.47361",
|
|
254
292
|
y1: "37.4219",
|
|
255
293
|
x2: "32.4603",
|
|
256
294
|
y2: "7.45023",
|
|
257
295
|
gradientUnits: "userSpaceOnUse"
|
|
258
|
-
}, /*#__PURE__*/
|
|
296
|
+
}, /*#__PURE__*/external_commonjs_react_commonjs2_react_default().createElement("stop", {
|
|
259
297
|
stopColor: "#FF5416"
|
|
260
|
-
}), /*#__PURE__*/
|
|
298
|
+
}), /*#__PURE__*/external_commonjs_react_commonjs2_react_default().createElement("stop", {
|
|
261
299
|
offset: "0.2535",
|
|
262
300
|
stopColor: "#FF5115"
|
|
263
|
-
}), /*#__PURE__*/
|
|
301
|
+
}), /*#__PURE__*/external_commonjs_react_commonjs2_react_default().createElement("stop", {
|
|
264
302
|
offset: "0.461",
|
|
265
303
|
stopColor: "#FF4712"
|
|
266
|
-
}), /*#__PURE__*/
|
|
304
|
+
}), /*#__PURE__*/external_commonjs_react_commonjs2_react_default().createElement("stop", {
|
|
267
305
|
offset: "0.6523",
|
|
268
306
|
stopColor: "#FF350E"
|
|
269
|
-
}), /*#__PURE__*/
|
|
307
|
+
}), /*#__PURE__*/external_commonjs_react_commonjs2_react_default().createElement("stop", {
|
|
270
308
|
offset: "0.8327",
|
|
271
309
|
stopColor: "#FF1E08"
|
|
272
|
-
}), /*#__PURE__*/
|
|
310
|
+
}), /*#__PURE__*/external_commonjs_react_commonjs2_react_default().createElement("stop", {
|
|
273
311
|
offset: "1",
|
|
274
312
|
stopColor: "#FF0000"
|
|
275
|
-
})), /*#__PURE__*/
|
|
313
|
+
})), /*#__PURE__*/external_commonjs_react_commonjs2_react_default().createElement("linearGradient", {
|
|
276
314
|
id: gradientIds[1],
|
|
277
315
|
x1: "10.7084",
|
|
278
316
|
y1: "39.3593",
|
|
279
317
|
x2: "26.6583",
|
|
280
318
|
y2: "21.6452",
|
|
281
319
|
gradientUnits: "userSpaceOnUse"
|
|
282
|
-
}, /*#__PURE__*/
|
|
320
|
+
}, /*#__PURE__*/external_commonjs_react_commonjs2_react_default().createElement("stop", {
|
|
283
321
|
stopColor: "#FF5416"
|
|
284
|
-
}), /*#__PURE__*/
|
|
322
|
+
}), /*#__PURE__*/external_commonjs_react_commonjs2_react_default().createElement("stop", {
|
|
285
323
|
offset: "0.2535",
|
|
286
324
|
stopColor: "#FF5115"
|
|
287
|
-
}), /*#__PURE__*/
|
|
325
|
+
}), /*#__PURE__*/external_commonjs_react_commonjs2_react_default().createElement("stop", {
|
|
288
326
|
offset: "0.461",
|
|
289
327
|
stopColor: "#FF4712"
|
|
290
|
-
}), /*#__PURE__*/
|
|
328
|
+
}), /*#__PURE__*/external_commonjs_react_commonjs2_react_default().createElement("stop", {
|
|
291
329
|
offset: "0.6523",
|
|
292
330
|
stopColor: "#FF350E"
|
|
293
|
-
}), /*#__PURE__*/
|
|
331
|
+
}), /*#__PURE__*/external_commonjs_react_commonjs2_react_default().createElement("stop", {
|
|
294
332
|
offset: "0.8327",
|
|
295
333
|
stopColor: "#FF1E08"
|
|
296
|
-
}), /*#__PURE__*/
|
|
334
|
+
}), /*#__PURE__*/external_commonjs_react_commonjs2_react_default().createElement("stop", {
|
|
297
335
|
offset: "1",
|
|
298
336
|
stopColor: "#FF0000"
|
|
299
337
|
})))));
|
|
300
338
|
};
|
|
301
339
|
|
|
302
340
|
Logo.propTypes = {
|
|
303
|
-
dataId: (
|
|
304
|
-
href: (
|
|
341
|
+
dataId: (prop_types_default()).string,
|
|
342
|
+
href: (prop_types_default()).string
|
|
305
343
|
};
|
|
306
|
-
/* harmony default export */ const
|
|
344
|
+
/* harmony default export */ const component = (/*#__PURE__*/external_commonjs_react_commonjs2_react_default().memo(Logo));
|
|
307
345
|
})();
|
|
308
346
|
|
|
309
347
|
/******/ return __webpack_exports__;
|
package/core/Meganav.jsx
CHANGED
|
@@ -463,17 +463,59 @@ Icon.propTypes = {
|
|
|
463
463
|
|
|
464
464
|
/***/ }),
|
|
465
465
|
|
|
466
|
-
/***/
|
|
466
|
+
/***/ 3925:
|
|
467
467
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
468
468
|
|
|
469
469
|
"use strict";
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
470
|
+
|
|
471
|
+
// EXPORTS
|
|
472
|
+
__webpack_require__.d(__webpack_exports__, {
|
|
473
|
+
"default": () => (/* binding */ component)
|
|
474
|
+
});
|
|
475
|
+
|
|
476
|
+
// EXTERNAL MODULE: external {"commonjs":"react","commonjs2":"react"}
|
|
477
|
+
var external_commonjs_react_commonjs2_react_ = __webpack_require__(9281);
|
|
478
|
+
var external_commonjs_react_commonjs2_react_default = /*#__PURE__*/__webpack_require__.n(external_commonjs_react_commonjs2_react_);
|
|
479
|
+
// EXTERNAL MODULE: ./node_modules/prop-types/index.js
|
|
480
|
+
var prop_types = __webpack_require__(5697);
|
|
481
|
+
var prop_types_default = /*#__PURE__*/__webpack_require__.n(prop_types);
|
|
482
|
+
;// CONCATENATED MODULE: ./node_modules/nanoid/index.browser.js
|
|
483
|
+
|
|
484
|
+
let random = bytes => crypto.getRandomValues(new Uint8Array(bytes))
|
|
485
|
+
let customRandom = (alphabet, defaultSize, getRandom) => {
|
|
486
|
+
let mask = (2 << (Math.log(alphabet.length - 1) / Math.LN2)) - 1
|
|
487
|
+
let step = -~((1.6 * mask * defaultSize) / alphabet.length)
|
|
488
|
+
return (size = defaultSize) => {
|
|
489
|
+
let id = ''
|
|
490
|
+
while (true) {
|
|
491
|
+
let bytes = getRandom(step)
|
|
492
|
+
let j = step
|
|
493
|
+
while (j--) {
|
|
494
|
+
id += alphabet[bytes[j] & mask] || ''
|
|
495
|
+
if (id.length === size) return id
|
|
496
|
+
}
|
|
497
|
+
}
|
|
498
|
+
}
|
|
499
|
+
}
|
|
500
|
+
let customAlphabet = (alphabet, size = 21) =>
|
|
501
|
+
customRandom(alphabet, size, random)
|
|
502
|
+
let nanoid = (size = 21) =>
|
|
503
|
+
crypto.getRandomValues(new Uint8Array(size)).reduce((id, byte) => {
|
|
504
|
+
byte &= 63
|
|
505
|
+
if (byte < 36) {
|
|
506
|
+
id += byte.toString(36)
|
|
507
|
+
} else if (byte < 62) {
|
|
508
|
+
id += (byte - 26).toString(36).toUpperCase()
|
|
509
|
+
} else if (byte > 62) {
|
|
510
|
+
id += '-'
|
|
511
|
+
} else {
|
|
512
|
+
id += '_'
|
|
513
|
+
}
|
|
514
|
+
return id
|
|
515
|
+
}, '')
|
|
516
|
+
|
|
517
|
+
;// CONCATENATED MODULE: ./src/core/Logo/component.jsx
|
|
518
|
+
|
|
477
519
|
|
|
478
520
|
|
|
479
521
|
|
|
@@ -481,93 +523,88 @@ var Logo = function Logo(_ref) {
|
|
|
481
523
|
var dataId = _ref.dataId,
|
|
482
524
|
_ref$href = _ref.href,
|
|
483
525
|
href = _ref$href === void 0 ? "/" : _ref$href;
|
|
484
|
-
|
|
485
526
|
// This fixes a bug where if the logo is rendered more than once on the page, and one of the instances
|
|
486
527
|
// if it is hidden, the other instance will not show the ably shape from the logo.
|
|
487
528
|
// This is because the defs in this SVG reference ids that need to be unique ids. The browser discards the "newer"
|
|
488
529
|
// linearGradients defined in the other logo, and inherits the `hidden` style from the first.
|
|
489
|
-
var
|
|
490
|
-
return
|
|
491
|
-
};
|
|
492
|
-
|
|
493
|
-
var gradientIds = (0,react__WEBPACK_IMPORTED_MODULE_0__.useMemo)(function () {
|
|
494
|
-
return [createID(), createID()];
|
|
530
|
+
var gradientIds = (0,external_commonjs_react_commonjs2_react_.useMemo)(function () {
|
|
531
|
+
return [nanoid(), nanoid()];
|
|
495
532
|
}, []);
|
|
496
|
-
return /*#__PURE__*/
|
|
533
|
+
return /*#__PURE__*/external_commonjs_react_commonjs2_react_default().createElement("a", {
|
|
497
534
|
href: href,
|
|
498
535
|
className: "h-32"
|
|
499
|
-
}, /*#__PURE__*/
|
|
536
|
+
}, /*#__PURE__*/external_commonjs_react_commonjs2_react_default().createElement("svg", {
|
|
500
537
|
"data-id": dataId,
|
|
501
538
|
className: "text-cool-black transition-colors",
|
|
502
539
|
width: "108",
|
|
503
540
|
height: "32",
|
|
504
541
|
viewBox: "0 0 108 32",
|
|
505
542
|
xmlns: "http://www.w3.org/2000/svg"
|
|
506
|
-
}, /*#__PURE__*/
|
|
543
|
+
}, /*#__PURE__*/external_commonjs_react_commonjs2_react_default().createElement("path", {
|
|
507
544
|
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",
|
|
508
545
|
fill: "currentColor"
|
|
509
|
-
}), /*#__PURE__*/
|
|
546
|
+
}), /*#__PURE__*/external_commonjs_react_commonjs2_react_default().createElement("path", {
|
|
510
547
|
d: "M19.2858 0L3.14788 29.5369L0 27.3293L14.932 0H19.2858ZM19.5107 0L35.6487 29.5369L38.7965 27.3293L23.8646 0H19.5107Z",
|
|
511
548
|
fill: "url(#".concat(gradientIds[0], ")")
|
|
512
|
-
}), /*#__PURE__*/
|
|
549
|
+
}), /*#__PURE__*/external_commonjs_react_commonjs2_react_default().createElement("path", {
|
|
513
550
|
d: "M35.4238 29.7107L19.3983 17.16L3.37271 29.7107L6.64323 32L19.3983 22.0147L32.1533 32L35.4238 29.7107Z",
|
|
514
551
|
fill: "url(#".concat(gradientIds[1], ")")
|
|
515
|
-
}), /*#__PURE__*/
|
|
552
|
+
}), /*#__PURE__*/external_commonjs_react_commonjs2_react_default().createElement("defs", null, /*#__PURE__*/external_commonjs_react_commonjs2_react_default().createElement("linearGradient", {
|
|
516
553
|
id: gradientIds[0],
|
|
517
554
|
x1: "5.47361",
|
|
518
555
|
y1: "37.4219",
|
|
519
556
|
x2: "32.4603",
|
|
520
557
|
y2: "7.45023",
|
|
521
558
|
gradientUnits: "userSpaceOnUse"
|
|
522
|
-
}, /*#__PURE__*/
|
|
559
|
+
}, /*#__PURE__*/external_commonjs_react_commonjs2_react_default().createElement("stop", {
|
|
523
560
|
stopColor: "#FF5416"
|
|
524
|
-
}), /*#__PURE__*/
|
|
561
|
+
}), /*#__PURE__*/external_commonjs_react_commonjs2_react_default().createElement("stop", {
|
|
525
562
|
offset: "0.2535",
|
|
526
563
|
stopColor: "#FF5115"
|
|
527
|
-
}), /*#__PURE__*/
|
|
564
|
+
}), /*#__PURE__*/external_commonjs_react_commonjs2_react_default().createElement("stop", {
|
|
528
565
|
offset: "0.461",
|
|
529
566
|
stopColor: "#FF4712"
|
|
530
|
-
}), /*#__PURE__*/
|
|
567
|
+
}), /*#__PURE__*/external_commonjs_react_commonjs2_react_default().createElement("stop", {
|
|
531
568
|
offset: "0.6523",
|
|
532
569
|
stopColor: "#FF350E"
|
|
533
|
-
}), /*#__PURE__*/
|
|
570
|
+
}), /*#__PURE__*/external_commonjs_react_commonjs2_react_default().createElement("stop", {
|
|
534
571
|
offset: "0.8327",
|
|
535
572
|
stopColor: "#FF1E08"
|
|
536
|
-
}), /*#__PURE__*/
|
|
573
|
+
}), /*#__PURE__*/external_commonjs_react_commonjs2_react_default().createElement("stop", {
|
|
537
574
|
offset: "1",
|
|
538
575
|
stopColor: "#FF0000"
|
|
539
|
-
})), /*#__PURE__*/
|
|
576
|
+
})), /*#__PURE__*/external_commonjs_react_commonjs2_react_default().createElement("linearGradient", {
|
|
540
577
|
id: gradientIds[1],
|
|
541
578
|
x1: "10.7084",
|
|
542
579
|
y1: "39.3593",
|
|
543
580
|
x2: "26.6583",
|
|
544
581
|
y2: "21.6452",
|
|
545
582
|
gradientUnits: "userSpaceOnUse"
|
|
546
|
-
}, /*#__PURE__*/
|
|
583
|
+
}, /*#__PURE__*/external_commonjs_react_commonjs2_react_default().createElement("stop", {
|
|
547
584
|
stopColor: "#FF5416"
|
|
548
|
-
}), /*#__PURE__*/
|
|
585
|
+
}), /*#__PURE__*/external_commonjs_react_commonjs2_react_default().createElement("stop", {
|
|
549
586
|
offset: "0.2535",
|
|
550
587
|
stopColor: "#FF5115"
|
|
551
|
-
}), /*#__PURE__*/
|
|
588
|
+
}), /*#__PURE__*/external_commonjs_react_commonjs2_react_default().createElement("stop", {
|
|
552
589
|
offset: "0.461",
|
|
553
590
|
stopColor: "#FF4712"
|
|
554
|
-
}), /*#__PURE__*/
|
|
591
|
+
}), /*#__PURE__*/external_commonjs_react_commonjs2_react_default().createElement("stop", {
|
|
555
592
|
offset: "0.6523",
|
|
556
593
|
stopColor: "#FF350E"
|
|
557
|
-
}), /*#__PURE__*/
|
|
594
|
+
}), /*#__PURE__*/external_commonjs_react_commonjs2_react_default().createElement("stop", {
|
|
558
595
|
offset: "0.8327",
|
|
559
596
|
stopColor: "#FF1E08"
|
|
560
|
-
}), /*#__PURE__*/
|
|
597
|
+
}), /*#__PURE__*/external_commonjs_react_commonjs2_react_default().createElement("stop", {
|
|
561
598
|
offset: "1",
|
|
562
599
|
stopColor: "#FF0000"
|
|
563
600
|
})))));
|
|
564
601
|
};
|
|
565
602
|
|
|
566
603
|
Logo.propTypes = {
|
|
567
|
-
dataId: (
|
|
568
|
-
href: (
|
|
604
|
+
dataId: (prop_types_default()).string,
|
|
605
|
+
href: (prop_types_default()).string
|
|
569
606
|
};
|
|
570
|
-
/* harmony default export */ const
|
|
607
|
+
/* harmony default export */ const component = (/*#__PURE__*/external_commonjs_react_commonjs2_react_default().memo(Logo));
|
|
571
608
|
|
|
572
609
|
/***/ }),
|
|
573
610
|
|
|
@@ -5961,8 +5998,8 @@ var selectSessionData = function selectSessionData(store) {
|
|
|
5961
5998
|
};
|
|
5962
5999
|
|
|
5963
6000
|
|
|
5964
|
-
// EXTERNAL MODULE: ./src/core/Logo/component.jsx
|
|
5965
|
-
var component = __webpack_require__(
|
|
6001
|
+
// EXTERNAL MODULE: ./src/core/Logo/component.jsx + 1 modules
|
|
6002
|
+
var component = __webpack_require__(3925);
|
|
5966
6003
|
// EXTERNAL MODULE: ./node_modules/lodash.throttle/index.js
|
|
5967
6004
|
var lodash_throttle = __webpack_require__(3096);
|
|
5968
6005
|
var lodash_throttle_default = /*#__PURE__*/__webpack_require__.n(lodash_throttle);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ably/ui",
|
|
3
|
-
"version": "7.
|
|
3
|
+
"version": "7.9.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",
|
|
@@ -54,13 +54,15 @@
|
|
|
54
54
|
"build": "node scripts/build.js",
|
|
55
55
|
"build:verbose": "node scripts/build.js -v",
|
|
56
56
|
"watch": "node scripts/build.js -w",
|
|
57
|
-
"dev": "./cleanstart.sh",
|
|
57
|
+
"dev": "./scripts/cleanstart.sh",
|
|
58
58
|
"format:check": "yarn prettier -c *.js src src/**/*.jsx cypress",
|
|
59
59
|
"format:write": "yarn prettier -w *.js src src/**/*.jsx cypress",
|
|
60
60
|
"lint": "eslint *.js src src/**/*.jsx cypress",
|
|
61
61
|
"cy:open": "cypress open",
|
|
62
62
|
"cy:headless": "cypress run --quiet",
|
|
63
|
-
"update:all": "./scripts/update-dependents.sh"
|
|
63
|
+
"update:all": "./scripts/update-dependents.sh",
|
|
64
|
+
"pre-release": "./scripts/pre-release.sh",
|
|
65
|
+
"release": "./scripts/release.sh"
|
|
64
66
|
},
|
|
65
67
|
"dependencies": {
|
|
66
68
|
"array-flat-polyfill": "^1.0.1",
|
|
@@ -70,6 +72,7 @@
|
|
|
70
72
|
"js-cookie": "^2.2.1",
|
|
71
73
|
"lodash.debounce": "^4.0.8",
|
|
72
74
|
"lodash.throttle": "^4.1.1",
|
|
75
|
+
"nanoid": "^4.0.0",
|
|
73
76
|
"react": "^17.0.1",
|
|
74
77
|
"react-dom": "^17.0.1",
|
|
75
78
|
"redux": "^4.0.5",
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import React, { useMemo } from "react";
|
|
2
2
|
import T from "prop-types";
|
|
3
|
+
import { nanoid } from "nanoid";
|
|
3
4
|
|
|
4
5
|
const Logo = ({ dataId, href = "/" }) => {
|
|
5
6
|
// This fixes a bug where if the logo is rendered more than once on the page, and one of the instances
|
|
@@ -7,8 +8,7 @@ const Logo = ({ dataId, href = "/" }) => {
|
|
|
7
8
|
|
|
8
9
|
// This is because the defs in this SVG reference ids that need to be unique ids. The browser discards the "newer"
|
|
9
10
|
// linearGradients defined in the other logo, and inherits the `hidden` style from the first.
|
|
10
|
-
const
|
|
11
|
-
const gradientIds = useMemo(() => [createID(), createID()], []);
|
|
11
|
+
const gradientIds = useMemo(() => [nanoid(), nanoid()], []);
|
|
12
12
|
|
|
13
13
|
return (
|
|
14
14
|
<a href={href} className="h-32">
|