@ably/ui 7.8.0-dev.57f3505 → 7.8.2-dev.b40c1c7
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 +85 -37
- package/core/Meganav.jsx +87 -41
- package/core/styles.css +22 -17
- package/package.json +2 -1
- package/preview/vendor/bundle/ruby/3.0.0/bundler/gems/ably-ui-abffd210ec0f/preview/log/.keep +0 -0
- package/preview/vendor/bundle/ruby/3.0.0/bundler/gems/ably-ui-abffd210ec0f/preview/tmp/.keep +0 -0
- package/preview/vendor/bundle/ruby/3.0.0/bundler/gems/ably-ui-abffd210ec0f/preview/tmp/pids/.keep +0 -0
- package/src/core/Code/component.css +3 -1
- package/src/core/Logo/component.html.erb +5 -5
- package/src/core/Logo/component.jsx +44 -42
- package/src/core/Logo/component.rb +6 -3
- package/src/core/Meganav/component.html.erb +1 -1
- package/src/core/Meganav/component.jsx +1 -1
- package/src/core/styles/properties.css +3 -4
- package/src/core/styles/text.css +16 -12
- package/tailwind.config.js +4 -12
- package/core/fonts/source-code-pro.css +0 -3
- package/src/core/fonts/source-code-pro.css +0 -3
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,98 +202,146 @@ 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
|
|
|
216
259
|
var Logo = function Logo(_ref) {
|
|
217
|
-
var
|
|
218
|
-
dataId = _ref.dataId,
|
|
260
|
+
var dataId = _ref.dataId,
|
|
219
261
|
_ref$href = _ref.href,
|
|
220
262
|
href = _ref$href === void 0 ? "/" : _ref$href;
|
|
221
|
-
|
|
263
|
+
// This fixes a bug where if the logo is rendered more than once on the page, and one of the instances
|
|
264
|
+
// if it is hidden, the other instance will not show the ably shape from the logo.
|
|
265
|
+
// This is because the defs in this SVG reference ids that need to be unique ids. The browser discards the "newer"
|
|
266
|
+
// linearGradients defined in the other logo, and inherits the `hidden` style from the first.
|
|
267
|
+
var gradientIds = (0,external_commonjs_react_commonjs2_react_.useMemo)(function () {
|
|
268
|
+
return [nanoid(), nanoid()];
|
|
269
|
+
}, []);
|
|
270
|
+
return /*#__PURE__*/external_commonjs_react_commonjs2_react_default().createElement("a", {
|
|
222
271
|
href: href,
|
|
223
272
|
className: "h-32"
|
|
224
|
-
}, /*#__PURE__*/
|
|
273
|
+
}, /*#__PURE__*/external_commonjs_react_commonjs2_react_default().createElement("svg", {
|
|
225
274
|
"data-id": dataId,
|
|
226
|
-
className: "
|
|
275
|
+
className: "text-cool-black transition-colors",
|
|
227
276
|
width: "108",
|
|
228
277
|
height: "32",
|
|
229
278
|
viewBox: "0 0 108 32",
|
|
230
279
|
xmlns: "http://www.w3.org/2000/svg"
|
|
231
|
-
}, /*#__PURE__*/
|
|
280
|
+
}, /*#__PURE__*/external_commonjs_react_commonjs2_react_default().createElement("path", {
|
|
232
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",
|
|
233
282
|
fill: "currentColor"
|
|
234
|
-
}), /*#__PURE__*/
|
|
283
|
+
}), /*#__PURE__*/external_commonjs_react_commonjs2_react_default().createElement("path", {
|
|
235
284
|
d: "M19.2858 0L3.14788 29.5369L0 27.3293L14.932 0H19.2858ZM19.5107 0L35.6487 29.5369L38.7965 27.3293L23.8646 0H19.5107Z",
|
|
236
|
-
fill: "url(#
|
|
237
|
-
}), /*#__PURE__*/
|
|
285
|
+
fill: "url(#".concat(gradientIds[0], ")")
|
|
286
|
+
}), /*#__PURE__*/external_commonjs_react_commonjs2_react_default().createElement("path", {
|
|
238
287
|
d: "M35.4238 29.7107L19.3983 17.16L3.37271 29.7107L6.64323 32L19.3983 22.0147L32.1533 32L35.4238 29.7107Z",
|
|
239
|
-
fill: "url(#
|
|
240
|
-
}), /*#__PURE__*/
|
|
241
|
-
id:
|
|
288
|
+
fill: "url(#".concat(gradientIds[1], ")")
|
|
289
|
+
}), /*#__PURE__*/external_commonjs_react_commonjs2_react_default().createElement("defs", null, /*#__PURE__*/external_commonjs_react_commonjs2_react_default().createElement("linearGradient", {
|
|
290
|
+
id: gradientIds[0],
|
|
242
291
|
x1: "5.47361",
|
|
243
292
|
y1: "37.4219",
|
|
244
293
|
x2: "32.4603",
|
|
245
294
|
y2: "7.45023",
|
|
246
295
|
gradientUnits: "userSpaceOnUse"
|
|
247
|
-
}, /*#__PURE__*/
|
|
296
|
+
}, /*#__PURE__*/external_commonjs_react_commonjs2_react_default().createElement("stop", {
|
|
248
297
|
stopColor: "#FF5416"
|
|
249
|
-
}), /*#__PURE__*/
|
|
298
|
+
}), /*#__PURE__*/external_commonjs_react_commonjs2_react_default().createElement("stop", {
|
|
250
299
|
offset: "0.2535",
|
|
251
300
|
stopColor: "#FF5115"
|
|
252
|
-
}), /*#__PURE__*/
|
|
301
|
+
}), /*#__PURE__*/external_commonjs_react_commonjs2_react_default().createElement("stop", {
|
|
253
302
|
offset: "0.461",
|
|
254
303
|
stopColor: "#FF4712"
|
|
255
|
-
}), /*#__PURE__*/
|
|
304
|
+
}), /*#__PURE__*/external_commonjs_react_commonjs2_react_default().createElement("stop", {
|
|
256
305
|
offset: "0.6523",
|
|
257
306
|
stopColor: "#FF350E"
|
|
258
|
-
}), /*#__PURE__*/
|
|
307
|
+
}), /*#__PURE__*/external_commonjs_react_commonjs2_react_default().createElement("stop", {
|
|
259
308
|
offset: "0.8327",
|
|
260
309
|
stopColor: "#FF1E08"
|
|
261
|
-
}), /*#__PURE__*/
|
|
310
|
+
}), /*#__PURE__*/external_commonjs_react_commonjs2_react_default().createElement("stop", {
|
|
262
311
|
offset: "1",
|
|
263
312
|
stopColor: "#FF0000"
|
|
264
|
-
})), /*#__PURE__*/
|
|
265
|
-
id:
|
|
313
|
+
})), /*#__PURE__*/external_commonjs_react_commonjs2_react_default().createElement("linearGradient", {
|
|
314
|
+
id: gradientIds[1],
|
|
266
315
|
x1: "10.7084",
|
|
267
316
|
y1: "39.3593",
|
|
268
317
|
x2: "26.6583",
|
|
269
318
|
y2: "21.6452",
|
|
270
319
|
gradientUnits: "userSpaceOnUse"
|
|
271
|
-
}, /*#__PURE__*/
|
|
320
|
+
}, /*#__PURE__*/external_commonjs_react_commonjs2_react_default().createElement("stop", {
|
|
272
321
|
stopColor: "#FF5416"
|
|
273
|
-
}), /*#__PURE__*/
|
|
322
|
+
}), /*#__PURE__*/external_commonjs_react_commonjs2_react_default().createElement("stop", {
|
|
274
323
|
offset: "0.2535",
|
|
275
324
|
stopColor: "#FF5115"
|
|
276
|
-
}), /*#__PURE__*/
|
|
325
|
+
}), /*#__PURE__*/external_commonjs_react_commonjs2_react_default().createElement("stop", {
|
|
277
326
|
offset: "0.461",
|
|
278
327
|
stopColor: "#FF4712"
|
|
279
|
-
}), /*#__PURE__*/
|
|
328
|
+
}), /*#__PURE__*/external_commonjs_react_commonjs2_react_default().createElement("stop", {
|
|
280
329
|
offset: "0.6523",
|
|
281
330
|
stopColor: "#FF350E"
|
|
282
|
-
}), /*#__PURE__*/
|
|
331
|
+
}), /*#__PURE__*/external_commonjs_react_commonjs2_react_default().createElement("stop", {
|
|
283
332
|
offset: "0.8327",
|
|
284
333
|
stopColor: "#FF1E08"
|
|
285
|
-
}), /*#__PURE__*/
|
|
334
|
+
}), /*#__PURE__*/external_commonjs_react_commonjs2_react_default().createElement("stop", {
|
|
286
335
|
offset: "1",
|
|
287
336
|
stopColor: "#FF0000"
|
|
288
337
|
})))));
|
|
289
338
|
};
|
|
290
339
|
|
|
291
340
|
Logo.propTypes = {
|
|
292
|
-
dataId: (
|
|
293
|
-
|
|
294
|
-
href: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().string)
|
|
341
|
+
dataId: (prop_types_default()).string,
|
|
342
|
+
href: (prop_types_default()).string
|
|
295
343
|
};
|
|
296
|
-
/* harmony default export */ const
|
|
344
|
+
/* harmony default export */ const component = (/*#__PURE__*/external_commonjs_react_commonjs2_react_default().memo(Logo));
|
|
297
345
|
})();
|
|
298
346
|
|
|
299
347
|
/******/ return __webpack_exports__;
|
package/core/Meganav.jsx
CHANGED
|
@@ -463,101 +463,148 @@ 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
|
|
|
480
522
|
var Logo = function Logo(_ref) {
|
|
481
|
-
var
|
|
482
|
-
dataId = _ref.dataId,
|
|
523
|
+
var dataId = _ref.dataId,
|
|
483
524
|
_ref$href = _ref.href,
|
|
484
525
|
href = _ref$href === void 0 ? "/" : _ref$href;
|
|
485
|
-
|
|
526
|
+
// This fixes a bug where if the logo is rendered more than once on the page, and one of the instances
|
|
527
|
+
// if it is hidden, the other instance will not show the ably shape from the logo.
|
|
528
|
+
// This is because the defs in this SVG reference ids that need to be unique ids. The browser discards the "newer"
|
|
529
|
+
// linearGradients defined in the other logo, and inherits the `hidden` style from the first.
|
|
530
|
+
var gradientIds = (0,external_commonjs_react_commonjs2_react_.useMemo)(function () {
|
|
531
|
+
return [nanoid(), nanoid()];
|
|
532
|
+
}, []);
|
|
533
|
+
return /*#__PURE__*/external_commonjs_react_commonjs2_react_default().createElement("a", {
|
|
486
534
|
href: href,
|
|
487
535
|
className: "h-32"
|
|
488
|
-
}, /*#__PURE__*/
|
|
536
|
+
}, /*#__PURE__*/external_commonjs_react_commonjs2_react_default().createElement("svg", {
|
|
489
537
|
"data-id": dataId,
|
|
490
|
-
className: "
|
|
538
|
+
className: "text-cool-black transition-colors",
|
|
491
539
|
width: "108",
|
|
492
540
|
height: "32",
|
|
493
541
|
viewBox: "0 0 108 32",
|
|
494
542
|
xmlns: "http://www.w3.org/2000/svg"
|
|
495
|
-
}, /*#__PURE__*/
|
|
543
|
+
}, /*#__PURE__*/external_commonjs_react_commonjs2_react_default().createElement("path", {
|
|
496
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",
|
|
497
545
|
fill: "currentColor"
|
|
498
|
-
}), /*#__PURE__*/
|
|
546
|
+
}), /*#__PURE__*/external_commonjs_react_commonjs2_react_default().createElement("path", {
|
|
499
547
|
d: "M19.2858 0L3.14788 29.5369L0 27.3293L14.932 0H19.2858ZM19.5107 0L35.6487 29.5369L38.7965 27.3293L23.8646 0H19.5107Z",
|
|
500
|
-
fill: "url(#
|
|
501
|
-
}), /*#__PURE__*/
|
|
548
|
+
fill: "url(#".concat(gradientIds[0], ")")
|
|
549
|
+
}), /*#__PURE__*/external_commonjs_react_commonjs2_react_default().createElement("path", {
|
|
502
550
|
d: "M35.4238 29.7107L19.3983 17.16L3.37271 29.7107L6.64323 32L19.3983 22.0147L32.1533 32L35.4238 29.7107Z",
|
|
503
|
-
fill: "url(#
|
|
504
|
-
}), /*#__PURE__*/
|
|
505
|
-
id:
|
|
551
|
+
fill: "url(#".concat(gradientIds[1], ")")
|
|
552
|
+
}), /*#__PURE__*/external_commonjs_react_commonjs2_react_default().createElement("defs", null, /*#__PURE__*/external_commonjs_react_commonjs2_react_default().createElement("linearGradient", {
|
|
553
|
+
id: gradientIds[0],
|
|
506
554
|
x1: "5.47361",
|
|
507
555
|
y1: "37.4219",
|
|
508
556
|
x2: "32.4603",
|
|
509
557
|
y2: "7.45023",
|
|
510
558
|
gradientUnits: "userSpaceOnUse"
|
|
511
|
-
}, /*#__PURE__*/
|
|
559
|
+
}, /*#__PURE__*/external_commonjs_react_commonjs2_react_default().createElement("stop", {
|
|
512
560
|
stopColor: "#FF5416"
|
|
513
|
-
}), /*#__PURE__*/
|
|
561
|
+
}), /*#__PURE__*/external_commonjs_react_commonjs2_react_default().createElement("stop", {
|
|
514
562
|
offset: "0.2535",
|
|
515
563
|
stopColor: "#FF5115"
|
|
516
|
-
}), /*#__PURE__*/
|
|
564
|
+
}), /*#__PURE__*/external_commonjs_react_commonjs2_react_default().createElement("stop", {
|
|
517
565
|
offset: "0.461",
|
|
518
566
|
stopColor: "#FF4712"
|
|
519
|
-
}), /*#__PURE__*/
|
|
567
|
+
}), /*#__PURE__*/external_commonjs_react_commonjs2_react_default().createElement("stop", {
|
|
520
568
|
offset: "0.6523",
|
|
521
569
|
stopColor: "#FF350E"
|
|
522
|
-
}), /*#__PURE__*/
|
|
570
|
+
}), /*#__PURE__*/external_commonjs_react_commonjs2_react_default().createElement("stop", {
|
|
523
571
|
offset: "0.8327",
|
|
524
572
|
stopColor: "#FF1E08"
|
|
525
|
-
}), /*#__PURE__*/
|
|
573
|
+
}), /*#__PURE__*/external_commonjs_react_commonjs2_react_default().createElement("stop", {
|
|
526
574
|
offset: "1",
|
|
527
575
|
stopColor: "#FF0000"
|
|
528
|
-
})), /*#__PURE__*/
|
|
529
|
-
id:
|
|
576
|
+
})), /*#__PURE__*/external_commonjs_react_commonjs2_react_default().createElement("linearGradient", {
|
|
577
|
+
id: gradientIds[1],
|
|
530
578
|
x1: "10.7084",
|
|
531
579
|
y1: "39.3593",
|
|
532
580
|
x2: "26.6583",
|
|
533
581
|
y2: "21.6452",
|
|
534
582
|
gradientUnits: "userSpaceOnUse"
|
|
535
|
-
}, /*#__PURE__*/
|
|
583
|
+
}, /*#__PURE__*/external_commonjs_react_commonjs2_react_default().createElement("stop", {
|
|
536
584
|
stopColor: "#FF5416"
|
|
537
|
-
}), /*#__PURE__*/
|
|
585
|
+
}), /*#__PURE__*/external_commonjs_react_commonjs2_react_default().createElement("stop", {
|
|
538
586
|
offset: "0.2535",
|
|
539
587
|
stopColor: "#FF5115"
|
|
540
|
-
}), /*#__PURE__*/
|
|
588
|
+
}), /*#__PURE__*/external_commonjs_react_commonjs2_react_default().createElement("stop", {
|
|
541
589
|
offset: "0.461",
|
|
542
590
|
stopColor: "#FF4712"
|
|
543
|
-
}), /*#__PURE__*/
|
|
591
|
+
}), /*#__PURE__*/external_commonjs_react_commonjs2_react_default().createElement("stop", {
|
|
544
592
|
offset: "0.6523",
|
|
545
593
|
stopColor: "#FF350E"
|
|
546
|
-
}), /*#__PURE__*/
|
|
594
|
+
}), /*#__PURE__*/external_commonjs_react_commonjs2_react_default().createElement("stop", {
|
|
547
595
|
offset: "0.8327",
|
|
548
596
|
stopColor: "#FF1E08"
|
|
549
|
-
}), /*#__PURE__*/
|
|
597
|
+
}), /*#__PURE__*/external_commonjs_react_commonjs2_react_default().createElement("stop", {
|
|
550
598
|
offset: "1",
|
|
551
599
|
stopColor: "#FF0000"
|
|
552
600
|
})))));
|
|
553
601
|
};
|
|
554
602
|
|
|
555
603
|
Logo.propTypes = {
|
|
556
|
-
dataId: (
|
|
557
|
-
|
|
558
|
-
href: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().string)
|
|
604
|
+
dataId: (prop_types_default()).string,
|
|
605
|
+
href: (prop_types_default()).string
|
|
559
606
|
};
|
|
560
|
-
/* harmony default export */ const
|
|
607
|
+
/* harmony default export */ const component = (/*#__PURE__*/external_commonjs_react_commonjs2_react_default().memo(Logo));
|
|
561
608
|
|
|
562
609
|
/***/ }),
|
|
563
610
|
|
|
@@ -5951,8 +5998,8 @@ var selectSessionData = function selectSessionData(store) {
|
|
|
5951
5998
|
};
|
|
5952
5999
|
|
|
5953
6000
|
|
|
5954
|
-
// EXTERNAL MODULE: ./src/core/Logo/component.jsx
|
|
5955
|
-
var component = __webpack_require__(
|
|
6001
|
+
// EXTERNAL MODULE: ./src/core/Logo/component.jsx + 1 modules
|
|
6002
|
+
var component = __webpack_require__(3925);
|
|
5956
6003
|
// EXTERNAL MODULE: ./node_modules/lodash.throttle/index.js
|
|
5957
6004
|
var lodash_throttle = __webpack_require__(3096);
|
|
5958
6005
|
var lodash_throttle_default = /*#__PURE__*/__webpack_require__.n(lodash_throttle);
|
|
@@ -6485,7 +6532,6 @@ function component_Meganav(_ref2) {
|
|
|
6485
6532
|
})), /*#__PURE__*/external_commonjs_react_commonjs2_react_default().createElement("div", {
|
|
6486
6533
|
className: "ui-meganav ui-grid-px"
|
|
6487
6534
|
}, /*#__PURE__*/external_commonjs_react_commonjs2_react_default().createElement(component.default, {
|
|
6488
|
-
theme: theme,
|
|
6489
6535
|
dataId: "meganav-logo",
|
|
6490
6536
|
href: urlBase
|
|
6491
6537
|
}), /*#__PURE__*/external_commonjs_react_commonjs2_react_default().createElement(MeganavItemsDesktop_component.default, {
|
package/core/styles.css
CHANGED
|
@@ -15,10 +15,9 @@
|
|
|
15
15
|
--color-charcoal-grey: #292831;
|
|
16
16
|
--color-gui-default: #0073e6;
|
|
17
17
|
--color-gui-hover: #0867c4;
|
|
18
|
-
--color-gui-focus: #
|
|
19
|
-
--color-gui-focus-outline: #80b9f2;
|
|
18
|
+
--color-gui-focus: #80b9f2;
|
|
20
19
|
--color-gui-active: #074095;
|
|
21
|
-
--color-gui-
|
|
20
|
+
--color-gui-viewed: #4887c2;
|
|
22
21
|
--color-gui-unavailable: #a8a8a8;
|
|
23
22
|
--color-gui-error: #fb0c0c;
|
|
24
23
|
--color-gui-success: #11cb24;
|
|
@@ -156,7 +155,7 @@
|
|
|
156
155
|
/* In components, when looking at implementing viewport margin and spacing between elements,
|
|
157
156
|
the values in the comments can be used as guide as they represent the grid the elements (should) sit on.
|
|
158
157
|
alternatively, look for ui-grid-* helpers. */
|
|
159
|
-
--bp-xs:
|
|
158
|
+
--bp-xs: 375px; /* gutters 8px, side-margin 24px */
|
|
160
159
|
--bp-sm: 768px; /* gutters 16px, side-margin 32px */
|
|
161
160
|
--bp-md: 1040px; /* gutters 24px, side-margin 40px, meganav desktop */
|
|
162
161
|
--bp-lg: 1280px; /* gutters 24px, side-margin 64px */
|
|
@@ -344,17 +343,17 @@
|
|
|
344
343
|
}
|
|
345
344
|
|
|
346
345
|
.ui-text-p1 {
|
|
347
|
-
@apply font-sans font-light text-
|
|
346
|
+
@apply font-sans font-light text-cool-black;
|
|
348
347
|
@apply text-p1;
|
|
349
348
|
}
|
|
350
349
|
|
|
351
350
|
.ui-text-p2 {
|
|
352
|
-
@apply font-sans font-light text-
|
|
351
|
+
@apply font-sans font-light text-cool-black;
|
|
353
352
|
@apply text-p2;
|
|
354
353
|
}
|
|
355
354
|
|
|
356
355
|
.ui-text-p3 {
|
|
357
|
-
@apply font-sans font-light text-
|
|
356
|
+
@apply font-sans font-light text-cool-black;
|
|
358
357
|
@apply text-p3;
|
|
359
358
|
}
|
|
360
359
|
|
|
@@ -460,18 +459,24 @@
|
|
|
460
459
|
@apply list-square;
|
|
461
460
|
}
|
|
462
461
|
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
@apply
|
|
466
|
-
@apply focus:text-gui-focus focus:outline-gui-focus;
|
|
467
|
-
@apply underline;
|
|
462
|
+
/* visited needs to come before :hover et all else it overrides them */
|
|
463
|
+
.ui-link:visited {
|
|
464
|
+
@apply text-gui-viewed;
|
|
468
465
|
}
|
|
469
466
|
|
|
470
|
-
.ui-link
|
|
471
|
-
@apply
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
467
|
+
.ui-link {
|
|
468
|
+
@apply hover:text-active-orange active:text-red-orange;
|
|
469
|
+
-webkit-text-decoration-color: var(--color-active-orange);
|
|
470
|
+
text-decoration-color: var(--color-active-orange);
|
|
471
|
+
text-underline-offset: 4px; /* px used here as behaves weird with rem's */
|
|
472
|
+
-webkit-text-decoration-line: underline;
|
|
473
|
+
text-decoration-line: underline;
|
|
474
|
+
text-decoration-thickness: 0.125rem;
|
|
475
|
+
}
|
|
476
|
+
|
|
477
|
+
.ui-link:focus {
|
|
478
|
+
@apply focus:text-white focus:bg-active-orange focus:outline-none;
|
|
479
|
+
text-decoration: none;
|
|
475
480
|
}
|
|
476
481
|
}
|
|
477
482
|
@layer components {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ably/ui",
|
|
3
|
-
"version": "7.8.
|
|
3
|
+
"version": "7.8.2-dev.b40c1c7",
|
|
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",
|
|
@@ -70,6 +70,7 @@
|
|
|
70
70
|
"js-cookie": "^2.2.1",
|
|
71
71
|
"lodash.debounce": "^4.0.8",
|
|
72
72
|
"lodash.throttle": "^4.1.1",
|
|
73
|
+
"nanoid": "^4.0.0",
|
|
73
74
|
"react": "^17.0.1",
|
|
74
75
|
"react-dom": "^17.0.1",
|
|
75
76
|
"redux": "^4.0.5",
|
|
File without changes
|
|
File without changes
|
package/preview/vendor/bundle/ruby/3.0.0/bundler/gems/ably-ui-abffd210ec0f/preview/tmp/pids/.keep
ADDED
|
File without changes
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
<%= link_to logo_href, class: 'h-32' do %>
|
|
2
|
-
<%= tag.svg class: ["transition-colors",
|
|
2
|
+
<%= tag.svg class: ["transition-colors", "text-cool-black"], data: { id: data_id }, width: "108", height: "32", viewBox: "0 0 108 32", xmlns: "http://www.w3.org/2000/svg" do %>
|
|
3
3
|
<path
|
|
4
4
|
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"
|
|
5
5
|
fill="currentColor"
|
|
6
6
|
/>
|
|
7
|
-
<path d="M19.2858 0L3.14788 29.5369L0 27.3293L14.932 0H19.2858ZM19.5107 0L35.6487 29.5369L38.7965 27.3293L23.8646 0H19.5107Z" fill="url(
|
|
8
|
-
<path d="M35.4238 29.7107L19.3983 17.16L3.37271 29.7107L6.64323 32L19.3983 22.0147L32.1533 32L35.4238 29.7107Z" fill="url(
|
|
7
|
+
<path d="M19.2858 0L3.14788 29.5369L0 27.3293L14.932 0H19.2858ZM19.5107 0L35.6487 29.5369L38.7965 27.3293L23.8646 0H19.5107Z" fill="url(#<%= gradient_id_0 %>)" />
|
|
8
|
+
<path d="M35.4238 29.7107L19.3983 17.16L3.37271 29.7107L6.64323 32L19.3983 22.0147L32.1533 32L35.4238 29.7107Z" fill="url(#<%= gradient_id_1 %>)" />
|
|
9
9
|
<defs>
|
|
10
|
-
<linearGradient id="
|
|
10
|
+
<linearGradient id="<%= gradient_id_0 %>" x1="5.47361" y1="37.4219" x2="32.4603" y2="7.45023" gradientUnits="userSpaceOnUse">
|
|
11
11
|
<stop stop-color="#FF5416" />
|
|
12
12
|
<stop offset="0.2535" stop-color="#FF5115" />
|
|
13
13
|
<stop offset="0.461" stop-color="#FF4712" />
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
<stop offset="0.8327" stop-color="#FF1E08" />
|
|
16
16
|
<stop offset="1" stop-color="#FF0000" />
|
|
17
17
|
</linearGradient>
|
|
18
|
-
<linearGradient id="
|
|
18
|
+
<linearGradient id="<%= gradient_id_1 %>" x1="10.7084" y1="39.3593" x2="26.6583" y2="21.6452" gradientUnits="userSpaceOnUse">
|
|
19
19
|
<stop stop-color="#FF5416" />
|
|
20
20
|
<stop offset="0.2535" stop-color="#FF5115" />
|
|
21
21
|
<stop offset="0.461" stop-color="#FF4712" />
|
|
@@ -1,50 +1,52 @@
|
|
|
1
|
-
import React from "react";
|
|
1
|
+
import React, { useMemo } from "react";
|
|
2
2
|
import T from "prop-types";
|
|
3
|
+
import { nanoid } from "nanoid";
|
|
3
4
|
|
|
4
|
-
const Logo = ({
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
>
|
|
14
|
-
<
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
<
|
|
25
|
-
<
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
<
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
5
|
+
const Logo = ({ dataId, href = "/" }) => {
|
|
6
|
+
// This fixes a bug where if the logo is rendered more than once on the page, and one of the instances
|
|
7
|
+
// if it is hidden, the other instance will not show the ably shape from the logo.
|
|
8
|
+
|
|
9
|
+
// This is because the defs in this SVG reference ids that need to be unique ids. The browser discards the "newer"
|
|
10
|
+
// linearGradients defined in the other logo, and inherits the `hidden` style from the first.
|
|
11
|
+
const gradientIds = useMemo(() => [nanoid(), nanoid()], []);
|
|
12
|
+
|
|
13
|
+
return (
|
|
14
|
+
<a href={href} className="h-32">
|
|
15
|
+
<svg data-id={dataId} className="text-cool-black transition-colors" width="108" height="32" viewBox="0 0 108 32" xmlns="http://www.w3.org/2000/svg">
|
|
16
|
+
<path
|
|
17
|
+
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"
|
|
18
|
+
fill="currentColor"
|
|
19
|
+
/>
|
|
20
|
+
<path
|
|
21
|
+
d="M19.2858 0L3.14788 29.5369L0 27.3293L14.932 0H19.2858ZM19.5107 0L35.6487 29.5369L38.7965 27.3293L23.8646 0H19.5107Z"
|
|
22
|
+
fill={`url(#${gradientIds[0]})`}
|
|
23
|
+
/>
|
|
24
|
+
<path d="M35.4238 29.7107L19.3983 17.16L3.37271 29.7107L6.64323 32L19.3983 22.0147L32.1533 32L35.4238 29.7107Z" fill={`url(#${gradientIds[1]})`} />
|
|
25
|
+
<defs>
|
|
26
|
+
<linearGradient id={gradientIds[0]} x1="5.47361" y1="37.4219" x2="32.4603" y2="7.45023" gradientUnits="userSpaceOnUse">
|
|
27
|
+
<stop stopColor="#FF5416" />
|
|
28
|
+
<stop offset="0.2535" stopColor="#FF5115" />
|
|
29
|
+
<stop offset="0.461" stopColor="#FF4712" />
|
|
30
|
+
<stop offset="0.6523" stopColor="#FF350E" />
|
|
31
|
+
<stop offset="0.8327" stopColor="#FF1E08" />
|
|
32
|
+
<stop offset="1" stopColor="#FF0000" />
|
|
33
|
+
</linearGradient>
|
|
34
|
+
<linearGradient id={gradientIds[1]} x1="10.7084" y1="39.3593" x2="26.6583" y2="21.6452" gradientUnits="userSpaceOnUse">
|
|
35
|
+
<stop stopColor="#FF5416" />
|
|
36
|
+
<stop offset="0.2535" stopColor="#FF5115" />
|
|
37
|
+
<stop offset="0.461" stopColor="#FF4712" />
|
|
38
|
+
<stop offset="0.6523" stopColor="#FF350E" />
|
|
39
|
+
<stop offset="0.8327" stopColor="#FF1E08" />
|
|
40
|
+
<stop offset="1" stopColor="#FF0000" />
|
|
41
|
+
</linearGradient>
|
|
42
|
+
</defs>
|
|
43
|
+
</svg>
|
|
44
|
+
</a>
|
|
45
|
+
);
|
|
46
|
+
};
|
|
44
47
|
|
|
45
48
|
Logo.propTypes = {
|
|
46
49
|
dataId: T.string,
|
|
47
|
-
theme: T.object,
|
|
48
50
|
href: T.string,
|
|
49
51
|
};
|
|
50
52
|
|
|
@@ -1,14 +1,17 @@
|
|
|
1
|
+
require 'securerandom'
|
|
2
|
+
|
|
1
3
|
module AblyUi
|
|
2
4
|
module Core
|
|
3
5
|
class Logo < ViewComponent::Base
|
|
4
6
|
include AblyUi::Core::MeganavConfig
|
|
5
7
|
|
|
6
|
-
attr_reader :href, :data_id
|
|
8
|
+
attr_reader :href, :data_id, :gradient_id_0, :gradient_id_1
|
|
7
9
|
|
|
8
|
-
def initialize(
|
|
10
|
+
def initialize(data_id: '', href:)
|
|
9
11
|
@data_id = data_id
|
|
10
12
|
@href = href
|
|
11
|
-
|
|
13
|
+
@gradient_id_0 = "paint_linear_#{SecureRandom.uuid}"
|
|
14
|
+
@gradient_id_1 = "paint_linear_#{SecureRandom.uuid}"
|
|
12
15
|
end
|
|
13
16
|
|
|
14
17
|
def logo_href
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
<%= notice %>
|
|
3
3
|
|
|
4
4
|
<div class="ui-meganav ui-grid-px">
|
|
5
|
-
<%= render(AblyUi::Core::Logo.new(
|
|
5
|
+
<%= render(AblyUi::Core::Logo.new(data_id: "meganav-logo", href: logo_link)) %>
|
|
6
6
|
<%= render(AblyUi::Core::MeganavItemsDesktop.new(theme_name: @theme_name, url_base: url_base)) %>
|
|
7
7
|
|
|
8
8
|
<% if @session_data[:signedIn] %>
|
|
@@ -81,7 +81,7 @@ export default function Meganav({ paths, themeName = "white", notice, loginLink
|
|
|
81
81
|
<nav className={`ui-meganav-wrapper ${theme.backgroundColor} ${theme.barShadow}`} data-id="meganav" aria-label="Main">
|
|
82
82
|
{notice && <Notice {...notice.props} config={notice.config} />}
|
|
83
83
|
<div className="ui-meganav ui-grid-px">
|
|
84
|
-
<Logo
|
|
84
|
+
<Logo dataId="meganav-logo" href={urlBase} />
|
|
85
85
|
<MeganavItemsDesktop panels={panels} paths={paths} theme={theme} absUrl={absUrl} />
|
|
86
86
|
|
|
87
87
|
{/* Because we load the session state through fetch, we display a placeholder until fetch returns */}
|
|
@@ -15,10 +15,9 @@
|
|
|
15
15
|
--color-charcoal-grey: #292831;
|
|
16
16
|
--color-gui-default: #0073e6;
|
|
17
17
|
--color-gui-hover: #0867c4;
|
|
18
|
-
--color-gui-focus: #
|
|
19
|
-
--color-gui-focus-outline: #80b9f2;
|
|
18
|
+
--color-gui-focus: #80b9f2;
|
|
20
19
|
--color-gui-active: #074095;
|
|
21
|
-
--color-gui-
|
|
20
|
+
--color-gui-viewed: #4887c2;
|
|
22
21
|
--color-gui-unavailable: #a8a8a8;
|
|
23
22
|
--color-gui-error: #fb0c0c;
|
|
24
23
|
--color-gui-success: #11cb24;
|
|
@@ -156,7 +155,7 @@
|
|
|
156
155
|
/* In components, when looking at implementing viewport margin and spacing between elements,
|
|
157
156
|
the values in the comments can be used as guide as they represent the grid the elements (should) sit on.
|
|
158
157
|
alternatively, look for ui-grid-* helpers. */
|
|
159
|
-
--bp-xs:
|
|
158
|
+
--bp-xs: 375px; /* gutters 8px, side-margin 24px */
|
|
160
159
|
--bp-sm: 768px; /* gutters 16px, side-margin 32px */
|
|
161
160
|
--bp-md: 1040px; /* gutters 24px, side-margin 40px, meganav desktop */
|
|
162
161
|
--bp-lg: 1280px; /* gutters 24px, side-margin 64px */
|
package/src/core/styles/text.css
CHANGED
|
@@ -30,17 +30,17 @@
|
|
|
30
30
|
}
|
|
31
31
|
|
|
32
32
|
.ui-text-p1 {
|
|
33
|
-
@apply font-sans font-light text-
|
|
33
|
+
@apply font-sans font-light text-cool-black;
|
|
34
34
|
@apply text-p1;
|
|
35
35
|
}
|
|
36
36
|
|
|
37
37
|
.ui-text-p2 {
|
|
38
|
-
@apply font-sans font-light text-
|
|
38
|
+
@apply font-sans font-light text-cool-black;
|
|
39
39
|
@apply text-p2;
|
|
40
40
|
}
|
|
41
41
|
|
|
42
42
|
.ui-text-p3 {
|
|
43
|
-
@apply font-sans font-light text-
|
|
43
|
+
@apply font-sans font-light text-cool-black;
|
|
44
44
|
@apply text-p3;
|
|
45
45
|
}
|
|
46
46
|
|
|
@@ -146,17 +146,21 @@
|
|
|
146
146
|
@apply list-square;
|
|
147
147
|
}
|
|
148
148
|
|
|
149
|
+
/* visited needs to come before :hover et all else it overrides them */
|
|
150
|
+
.ui-link:visited {
|
|
151
|
+
@apply text-gui-viewed;
|
|
152
|
+
}
|
|
153
|
+
|
|
149
154
|
.ui-link {
|
|
150
|
-
@apply
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
155
|
+
@apply hover:text-active-orange active:text-red-orange;
|
|
156
|
+
text-decoration-color: var(--color-active-orange);
|
|
157
|
+
text-underline-offset: 4px; /* px used here as behaves weird with rem's */
|
|
158
|
+
text-decoration-line: underline;
|
|
159
|
+
text-decoration-thickness: 0.125rem;
|
|
154
160
|
}
|
|
155
161
|
|
|
156
|
-
.ui-link
|
|
157
|
-
@apply
|
|
158
|
-
|
|
159
|
-
@apply focus:text-gui-focus focus:outline-gui-focus-neutral;
|
|
160
|
-
@apply underline;
|
|
162
|
+
.ui-link:focus {
|
|
163
|
+
@apply focus:text-white focus:bg-active-orange focus:outline-none;
|
|
164
|
+
text-decoration: none;
|
|
161
165
|
}
|
|
162
166
|
}
|
package/tailwind.config.js
CHANGED
|
@@ -17,7 +17,7 @@ module.exports = {
|
|
|
17
17
|
theme: {
|
|
18
18
|
screens: {
|
|
19
19
|
// CSS custom properties can't be used in media queries
|
|
20
|
-
xs: "
|
|
20
|
+
xs: "375px",
|
|
21
21
|
sm: "768px",
|
|
22
22
|
md: "1040px",
|
|
23
23
|
lg: "1280px",
|
|
@@ -74,7 +74,7 @@ module.exports = {
|
|
|
74
74
|
"gui-hover": "var(--color-gui-hover)",
|
|
75
75
|
"gui-focus": "var(--color-gui-focus)",
|
|
76
76
|
"gui-active": "var(--color-gui-active)",
|
|
77
|
-
"gui-
|
|
77
|
+
"gui-viewed": "var(--color-gui-viewed)",
|
|
78
78
|
"gui-unavailable": "var(--color-gui-unavailable)",
|
|
79
79
|
"gui-error": "var(--color-gui-error)",
|
|
80
80
|
"gui-success": "var(--color-gui-success)",
|
|
@@ -181,8 +181,7 @@ module.exports = {
|
|
|
181
181
|
filter: "filter",
|
|
182
182
|
},
|
|
183
183
|
outline: {
|
|
184
|
-
"gui-focus": "
|
|
185
|
-
"gui-focus-neutral": "2px solid var(--color-white)",
|
|
184
|
+
"gui-focus": "4px solid var(--color-gui-focus)",
|
|
186
185
|
},
|
|
187
186
|
width: {
|
|
188
187
|
"extend-8": "calc(100% + var(--spacing-8))",
|
|
@@ -209,14 +208,7 @@ module.exports = {
|
|
|
209
208
|
variants: {
|
|
210
209
|
extend: {
|
|
211
210
|
borderColor: ["hover", "focus", "active", "group-focus", "disabled"],
|
|
212
|
-
textColor: [
|
|
213
|
-
"hover",
|
|
214
|
-
"focus",
|
|
215
|
-
"active",
|
|
216
|
-
"group-focus",
|
|
217
|
-
"disabled",
|
|
218
|
-
"visited",
|
|
219
|
-
],
|
|
211
|
+
textColor: ["hover", "focus", "active", "group-focus", "disabled"],
|
|
220
212
|
display: ["group-focus"],
|
|
221
213
|
backgroundColor: ["hover", "focus", "active", "group-focus", "disabled"],
|
|
222
214
|
backgroundImage: ["hover", "active", "focus"],
|