@ably/ui 7.8.0-dev.57f3505 → 7.8.0-dev.ba22343
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/core/Logo.jsx +18 -8
- package/core/Meganav.jsx +18 -9
- package/core/styles.css +22 -17
- package/package.json +1 -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 +17 -10
- package/src/core/Logo/component.rb +4 -2
- 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/core/Logo.jsx
CHANGED
|
@@ -214,16 +214,27 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
214
214
|
|
|
215
215
|
|
|
216
216
|
var Logo = function Logo(_ref) {
|
|
217
|
-
var
|
|
218
|
-
dataId = _ref.dataId,
|
|
217
|
+
var dataId = _ref.dataId,
|
|
219
218
|
_ref$href = _ref.href,
|
|
220
219
|
href = _ref$href === void 0 ? "/" : _ref$href;
|
|
220
|
+
|
|
221
|
+
// This fixes a bug where if the logo is rendered more then once on the page, and one of the instance
|
|
222
|
+
// of it is hidden, the other instance will not show the ably shape from the logo.
|
|
223
|
+
// This is because the defs in this SVG reference ids that need to be unique ids. The browser discards the "newer"
|
|
224
|
+
// linearGradients defined in the other logo, and inherits the `hidden` style from the first.
|
|
225
|
+
var createID = function createID() {
|
|
226
|
+
return "paint_gradient_".concat(Date.now());
|
|
227
|
+
};
|
|
228
|
+
|
|
229
|
+
var gradientIds = (0,react__WEBPACK_IMPORTED_MODULE_0__.useMemo)(function () {
|
|
230
|
+
return [createID(), createID()];
|
|
231
|
+
}, []);
|
|
221
232
|
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("a", {
|
|
222
233
|
href: href,
|
|
223
234
|
className: "h-32"
|
|
224
235
|
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("svg", {
|
|
225
236
|
"data-id": dataId,
|
|
226
|
-
className: "
|
|
237
|
+
className: "text-cool-black transition-colors",
|
|
227
238
|
width: "108",
|
|
228
239
|
height: "32",
|
|
229
240
|
viewBox: "0 0 108 32",
|
|
@@ -233,12 +244,12 @@ var Logo = function Logo(_ref) {
|
|
|
233
244
|
fill: "currentColor"
|
|
234
245
|
}), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("path", {
|
|
235
246
|
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(#
|
|
247
|
+
fill: "url(#".concat(gradientIds[0], ")")
|
|
237
248
|
}), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("path", {
|
|
238
249
|
d: "M35.4238 29.7107L19.3983 17.16L3.37271 29.7107L6.64323 32L19.3983 22.0147L32.1533 32L35.4238 29.7107Z",
|
|
239
|
-
fill: "url(#
|
|
250
|
+
fill: "url(#".concat(gradientIds[1], ")")
|
|
240
251
|
}), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("defs", null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("linearGradient", {
|
|
241
|
-
id:
|
|
252
|
+
id: gradientIds[0],
|
|
242
253
|
x1: "5.47361",
|
|
243
254
|
y1: "37.4219",
|
|
244
255
|
x2: "32.4603",
|
|
@@ -262,7 +273,7 @@ var Logo = function Logo(_ref) {
|
|
|
262
273
|
offset: "1",
|
|
263
274
|
stopColor: "#FF0000"
|
|
264
275
|
})), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("linearGradient", {
|
|
265
|
-
id:
|
|
276
|
+
id: gradientIds[1],
|
|
266
277
|
x1: "10.7084",
|
|
267
278
|
y1: "39.3593",
|
|
268
279
|
x2: "26.6583",
|
|
@@ -290,7 +301,6 @@ var Logo = function Logo(_ref) {
|
|
|
290
301
|
|
|
291
302
|
Logo.propTypes = {
|
|
292
303
|
dataId: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().string),
|
|
293
|
-
theme: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().object),
|
|
294
304
|
href: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().string)
|
|
295
305
|
};
|
|
296
306
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (/*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().memo(Logo));
|
package/core/Meganav.jsx
CHANGED
|
@@ -478,16 +478,27 @@ Icon.propTypes = {
|
|
|
478
478
|
|
|
479
479
|
|
|
480
480
|
var Logo = function Logo(_ref) {
|
|
481
|
-
var
|
|
482
|
-
dataId = _ref.dataId,
|
|
481
|
+
var dataId = _ref.dataId,
|
|
483
482
|
_ref$href = _ref.href,
|
|
484
483
|
href = _ref$href === void 0 ? "/" : _ref$href;
|
|
484
|
+
|
|
485
|
+
// This fixes a bug where if the logo is rendered more then once on the page, and one of the instance
|
|
486
|
+
// of it is hidden, the other instance will not show the ably shape from the logo.
|
|
487
|
+
// This is because the defs in this SVG reference ids that need to be unique ids. The browser discards the "newer"
|
|
488
|
+
// linearGradients defined in the other logo, and inherits the `hidden` style from the first.
|
|
489
|
+
var createID = function createID() {
|
|
490
|
+
return "paint_gradient_".concat(Date.now());
|
|
491
|
+
};
|
|
492
|
+
|
|
493
|
+
var gradientIds = (0,react__WEBPACK_IMPORTED_MODULE_0__.useMemo)(function () {
|
|
494
|
+
return [createID(), createID()];
|
|
495
|
+
}, []);
|
|
485
496
|
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("a", {
|
|
486
497
|
href: href,
|
|
487
498
|
className: "h-32"
|
|
488
499
|
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("svg", {
|
|
489
500
|
"data-id": dataId,
|
|
490
|
-
className: "
|
|
501
|
+
className: "text-cool-black transition-colors",
|
|
491
502
|
width: "108",
|
|
492
503
|
height: "32",
|
|
493
504
|
viewBox: "0 0 108 32",
|
|
@@ -497,12 +508,12 @@ var Logo = function Logo(_ref) {
|
|
|
497
508
|
fill: "currentColor"
|
|
498
509
|
}), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("path", {
|
|
499
510
|
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(#
|
|
511
|
+
fill: "url(#".concat(gradientIds[0], ")")
|
|
501
512
|
}), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("path", {
|
|
502
513
|
d: "M35.4238 29.7107L19.3983 17.16L3.37271 29.7107L6.64323 32L19.3983 22.0147L32.1533 32L35.4238 29.7107Z",
|
|
503
|
-
fill: "url(#
|
|
514
|
+
fill: "url(#".concat(gradientIds[1], ")")
|
|
504
515
|
}), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("defs", null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("linearGradient", {
|
|
505
|
-
id:
|
|
516
|
+
id: gradientIds[0],
|
|
506
517
|
x1: "5.47361",
|
|
507
518
|
y1: "37.4219",
|
|
508
519
|
x2: "32.4603",
|
|
@@ -526,7 +537,7 @@ var Logo = function Logo(_ref) {
|
|
|
526
537
|
offset: "1",
|
|
527
538
|
stopColor: "#FF0000"
|
|
528
539
|
})), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("linearGradient", {
|
|
529
|
-
id:
|
|
540
|
+
id: gradientIds[1],
|
|
530
541
|
x1: "10.7084",
|
|
531
542
|
y1: "39.3593",
|
|
532
543
|
x2: "26.6583",
|
|
@@ -554,7 +565,6 @@ var Logo = function Logo(_ref) {
|
|
|
554
565
|
|
|
555
566
|
Logo.propTypes = {
|
|
556
567
|
dataId: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().string),
|
|
557
|
-
theme: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().object),
|
|
558
568
|
href: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().string)
|
|
559
569
|
};
|
|
560
570
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (/*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().memo(Logo));
|
|
@@ -6485,7 +6495,6 @@ function component_Meganav(_ref2) {
|
|
|
6485
6495
|
})), /*#__PURE__*/external_commonjs_react_commonjs2_react_default().createElement("div", {
|
|
6486
6496
|
className: "ui-meganav ui-grid-px"
|
|
6487
6497
|
}, /*#__PURE__*/external_commonjs_react_commonjs2_react_default().createElement(component.default, {
|
|
6488
|
-
theme: theme,
|
|
6489
6498
|
dataId: "meganav-logo",
|
|
6490
6499
|
href: urlBase
|
|
6491
6500
|
}), /*#__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.0-dev.
|
|
3
|
+
"version": "7.8.0-dev.ba22343",
|
|
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",
|
|
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,11 +1,19 @@
|
|
|
1
|
-
import React from "react";
|
|
1
|
+
import React, { useMemo } from "react";
|
|
2
2
|
import T from "prop-types";
|
|
3
3
|
|
|
4
|
-
const Logo = ({
|
|
5
|
-
|
|
4
|
+
const Logo = ({ dataId, href = "/" }) => {
|
|
5
|
+
// This fixes a bug where if the logo is rendered more then once on the page, and one of the instance
|
|
6
|
+
// of it is hidden, the other instance will not show the ably shape from the logo.
|
|
7
|
+
|
|
8
|
+
// This is because the defs in this SVG reference ids that need to be unique ids. The browser discards the "newer"
|
|
9
|
+
// linearGradients defined in the other logo, and inherits the `hidden` style from the first.
|
|
10
|
+
const createID = () => `paint_gradient_${Date.now()}`
|
|
11
|
+
const gradientIds = useMemo(() => [createID(), createID()], [])
|
|
12
|
+
|
|
13
|
+
return <a href={href} className="h-32">
|
|
6
14
|
<svg
|
|
7
15
|
data-id={dataId}
|
|
8
|
-
className=
|
|
16
|
+
className="text-cool-black transition-colors"
|
|
9
17
|
width="108"
|
|
10
18
|
height="32"
|
|
11
19
|
viewBox="0 0 108 32"
|
|
@@ -17,11 +25,11 @@ const Logo = ({ theme, dataId, href = "/" }) => (
|
|
|
17
25
|
/>
|
|
18
26
|
<path
|
|
19
27
|
d="M19.2858 0L3.14788 29.5369L0 27.3293L14.932 0H19.2858ZM19.5107 0L35.6487 29.5369L38.7965 27.3293L23.8646 0H19.5107Z"
|
|
20
|
-
fill=
|
|
28
|
+
fill={`url(#${gradientIds[0]})`}
|
|
21
29
|
/>
|
|
22
|
-
<path d="M35.4238 29.7107L19.3983 17.16L3.37271 29.7107L6.64323 32L19.3983 22.0147L32.1533 32L35.4238 29.7107Z" fill=
|
|
30
|
+
<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]})`} />
|
|
23
31
|
<defs>
|
|
24
|
-
<linearGradient id=
|
|
32
|
+
<linearGradient id={gradientIds[0]} x1="5.47361" y1="37.4219" x2="32.4603" y2="7.45023" gradientUnits="userSpaceOnUse">
|
|
25
33
|
<stop stopColor="#FF5416" />
|
|
26
34
|
<stop offset="0.2535" stopColor="#FF5115" />
|
|
27
35
|
<stop offset="0.461" stopColor="#FF4712" />
|
|
@@ -29,7 +37,7 @@ const Logo = ({ theme, dataId, href = "/" }) => (
|
|
|
29
37
|
<stop offset="0.8327" stopColor="#FF1E08" />
|
|
30
38
|
<stop offset="1" stopColor="#FF0000" />
|
|
31
39
|
</linearGradient>
|
|
32
|
-
<linearGradient id=
|
|
40
|
+
<linearGradient id={gradientIds[1]} x1="10.7084" y1="39.3593" x2="26.6583" y2="21.6452" gradientUnits="userSpaceOnUse">
|
|
33
41
|
<stop stopColor="#FF5416" />
|
|
34
42
|
<stop offset="0.2535" stopColor="#FF5115" />
|
|
35
43
|
<stop offset="0.461" stopColor="#FF4712" />
|
|
@@ -40,11 +48,10 @@ const Logo = ({ theme, dataId, href = "/" }) => (
|
|
|
40
48
|
</defs>
|
|
41
49
|
</svg>
|
|
42
50
|
</a>
|
|
43
|
-
|
|
51
|
+
};
|
|
44
52
|
|
|
45
53
|
Logo.propTypes = {
|
|
46
54
|
dataId: T.string,
|
|
47
|
-
theme: T.object,
|
|
48
55
|
href: T.string,
|
|
49
56
|
};
|
|
50
57
|
|
|
@@ -3,11 +3,13 @@ module AblyUi
|
|
|
3
3
|
class Logo < ViewComponent::Base
|
|
4
4
|
include AblyUi::Core::MeganavConfig
|
|
5
5
|
|
|
6
|
-
attr_reader :href, :data_id
|
|
6
|
+
attr_reader :href, :data_id, :gradient_id_0, :gradient_id_1
|
|
7
7
|
|
|
8
|
-
def initialize(
|
|
8
|
+
def initialize(data_id: '', href:)
|
|
9
9
|
@data_id = data_id
|
|
10
10
|
@href = href
|
|
11
|
+
@gradient_id_0 = "paint_linear_#{Date.now}"
|
|
12
|
+
@gradient_id_1 = "paint_linear_#{Date.now}"
|
|
11
13
|
theme_setup(theme_name)
|
|
12
14
|
end
|
|
13
15
|
|
|
@@ -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"],
|