Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@ably/ui

Package Overview
Dependencies
Maintainers
5
Versions
427
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ably/ui - npm Package Compare versions

Comparing version 7.8.0 to 7.8.2-dev.e8b31f4

core/fonts/source-code-pro.css

26

core/Logo.jsx

@@ -217,6 +217,17 @@ (function webpackUniversalModuleDefinition(root, factory) {

var Logo = function Logo(_ref) {
var theme = _ref.theme,
dataId = _ref.dataId,
var dataId = _ref.dataId,
_ref$href = _ref.href,
href = _ref$href === void 0 ? "/" : _ref$href;
// This fixes a bug where if the logo is rendered more than once on the page, and one of the instances
// if it is hidden, the other instance will not show the ably shape from the logo.
// This is because the defs in this SVG reference ids that need to be unique ids. The browser discards the "newer"
// linearGradients defined in the other logo, and inherits the `hidden` style from the first.
var createID = function createID() {
return "paint_gradient_".concat(Date.now());
};
var gradientIds = (0,react__WEBPACK_IMPORTED_MODULE_0__.useMemo)(function () {
return [createID(), createID()];
}, []);
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("a", {

@@ -227,3 +238,3 @@ href: href,

"data-id": dataId,
className: "".concat(theme.logoTextColor, " transition-colors"),
className: "text-cool-black transition-colors",
width: "108",

@@ -238,8 +249,8 @@ height: "32",

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(#paint0_linear)"
fill: "url(#".concat(gradientIds[0], ")")
}), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("path", {
d: "M35.4238 29.7107L19.3983 17.16L3.37271 29.7107L6.64323 32L19.3983 22.0147L32.1533 32L35.4238 29.7107Z",
fill: "url(#paint1_linear)"
fill: "url(#".concat(gradientIds[1], ")")
}), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("defs", null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("linearGradient", {
id: "paint0_linear",
id: gradientIds[0],
x1: "5.47361",

@@ -268,3 +279,3 @@ y1: "37.4219",

})), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("linearGradient", {
id: "paint1_linear",
id: gradientIds[1],
x1: "10.7084",

@@ -297,3 +308,2 @@ y1: "39.3593",

dataId: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().string),
theme: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().object),
href: (prop_types__WEBPACK_IMPORTED_MODULE_1___default().string)

@@ -300,0 +310,0 @@ };

{
"name": "@ably/ui",
"version": "7.8.0",
"version": "7.8.2-dev.e8b31f4",
"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,0 +5,0 @@ "repository": {

@@ -76,4 +76,12 @@ **_Note:_** some features are still in development and their documentation might be incomplete. Lookout for the ⚠️ icon.

1. Add AblyUI to your project
1. Add TailwindCSS to your project https://tailwindcss.com/docs/installation#installing-tailwind-css-as-a-post-css-plugin
1. Add the following to your `tailwind.config.js`. Note how different config properties are always extended by the `ablyUIConfig`:
2. Add TailwindCSS to your project
1. By project type:
1. In [HTML](https://tailwindcss.com/docs/installation#installing-tailwind-css-as-a-post-css-plugin)
2. In [Gatsby](https://tailwindcss.com/docs/guides/gatsby)
1. Add postCSS import with `npm install postcss-import`
1. Further to the instructions, if installation is hanging for over 5 minutes or otherwise problematic, try installing the libraries one at a time
2. Make sure you are installing v2 with `npm install -D tailwindcss@2.X`
3. Make sure that tailwindcss-filters is also set to v2 in your package.json: otherwise `npm install -D tailwindcss-filters@2.X`
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
4. Add the following to your `tailwind.config.js`. Note how different config properties are always extended by the `ablyUIConfig`:

@@ -97,3 +105,3 @@ ```js

1. In the CSS file you added your tailwind declarations too, import the CSS for the modules and components you need:
1. In the CSS file you added your tailwind declarations to, import the CSS for the modules and components you need:

@@ -141,3 +149,3 @@ ```css

Putting SVG files inside and `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.
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.

@@ -144,0 +152,0 @@ Usage with the `Icon` React component:

@@ -1,48 +0,50 @@

import React from "react";
import React, { useMemo } from "react";
import T from "prop-types";
const Logo = ({ theme, dataId, href = "/" }) => (
<a href={href} className="h-32">
<svg
data-id={dataId}
className={`${theme.logoTextColor} transition-colors`}
width="108"
height="32"
viewBox="0 0 108 32"
xmlns="http://www.w3.org/2000/svg"
>
<path
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"
fill="currentColor"
/>
<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(#paint0_linear)"
/>
<path d="M35.4238 29.7107L19.3983 17.16L3.37271 29.7107L6.64323 32L19.3983 22.0147L32.1533 32L35.4238 29.7107Z" fill="url(#paint1_linear)" />
<defs>
<linearGradient id="paint0_linear" x1="5.47361" y1="37.4219" x2="32.4603" y2="7.45023" gradientUnits="userSpaceOnUse">
<stop stopColor="#FF5416" />
<stop offset="0.2535" stopColor="#FF5115" />
<stop offset="0.461" stopColor="#FF4712" />
<stop offset="0.6523" stopColor="#FF350E" />
<stop offset="0.8327" stopColor="#FF1E08" />
<stop offset="1" stopColor="#FF0000" />
</linearGradient>
<linearGradient id="paint1_linear" x1="10.7084" y1="39.3593" x2="26.6583" y2="21.6452" gradientUnits="userSpaceOnUse">
<stop stopColor="#FF5416" />
<stop offset="0.2535" stopColor="#FF5115" />
<stop offset="0.461" stopColor="#FF4712" />
<stop offset="0.6523" stopColor="#FF350E" />
<stop offset="0.8327" stopColor="#FF1E08" />
<stop offset="1" stopColor="#FF0000" />
</linearGradient>
</defs>
</svg>
</a>
);
const Logo = ({ dataId, href = "/" }) => {
// This fixes a bug where if the logo is rendered more than once on the page, and one of the instances
// if it is hidden, the other instance will not show the ably shape from the logo.
// This is because the defs in this SVG reference ids that need to be unique ids. The browser discards the "newer"
// linearGradients defined in the other logo, and inherits the `hidden` style from the first.
const createID = () => `paint_gradient_${Date.now()}`;
const gradientIds = useMemo(() => [createID(), createID()], []);
return (
<a href={href} className="h-32">
<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">
<path
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"
fill="currentColor"
/>
<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(#${gradientIds[0]})`}
/>
<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]})`} />
<defs>
<linearGradient id={gradientIds[0]} x1="5.47361" y1="37.4219" x2="32.4603" y2="7.45023" gradientUnits="userSpaceOnUse">
<stop stopColor="#FF5416" />
<stop offset="0.2535" stopColor="#FF5115" />
<stop offset="0.461" stopColor="#FF4712" />
<stop offset="0.6523" stopColor="#FF350E" />
<stop offset="0.8327" stopColor="#FF1E08" />
<stop offset="1" stopColor="#FF0000" />
</linearGradient>
<linearGradient id={gradientIds[1]} x1="10.7084" y1="39.3593" x2="26.6583" y2="21.6452" gradientUnits="userSpaceOnUse">
<stop stopColor="#FF5416" />
<stop offset="0.2535" stopColor="#FF5115" />
<stop offset="0.461" stopColor="#FF4712" />
<stop offset="0.6523" stopColor="#FF350E" />
<stop offset="0.8327" stopColor="#FF1E08" />
<stop offset="1" stopColor="#FF0000" />
</linearGradient>
</defs>
</svg>
</a>
);
};
Logo.propTypes = {
dataId: T.string,
theme: T.object,
href: T.string,

@@ -49,0 +51,0 @@ };

@@ -84,3 +84,3 @@ import React, { useEffect, useState } from "react";

<div className="ui-meganav ui-grid-px">
<Logo theme={theme} dataId="meganav-logo" href={urlBase} />
<Logo dataId="meganav-logo" href={urlBase} />
<MeganavItemsDesktop panels={panels} paths={paths} theme={theme} absUrl={absUrl} />

@@ -87,0 +87,0 @@

@@ -20,3 +20,3 @@ module.exports = {

// CSS custom properties can't be used in media queries
xs: "375px",
xs: "428px",
sm: "768px",

@@ -78,3 +78,3 @@ md: "1040px",

"gui-active": "var(--color-gui-active)",
"gui-viewed": "var(--color-gui-viewed)",
"gui-visited": "var(--color-gui-visited)",
"gui-unavailable": "var(--color-gui-unavailable)",

@@ -186,3 +186,4 @@ "gui-error": "var(--color-gui-error)",

outline: {
"gui-focus": "4px solid var(--color-gui-focus)",
"gui-focus": "1.5px solid var(--color-gui-focus-outline)",
"gui-focus-neutral": "2px solid var(--color-white)",
},

@@ -214,3 +215,10 @@ width: {

borderColor: ["hover", "focus", "active", "group-focus", "disabled"],
textColor: ["hover", "focus", "active", "group-focus", "disabled"],
textColor: [
"hover",
"focus",
"active",
"group-focus",
"disabled",
"visited",
],
display: ["group-focus"],

@@ -217,0 +225,0 @@ backgroundColor: ["hover", "focus", "active", "group-focus", "disabled"],

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc