@ably/ui 14.0.0-dev.968e4a2 → 14.0.0-dev.99c9769
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 +8 -10
- package/core/.DS_Store +0 -0
- package/core/Accordion.js +1 -1
- package/core/Code.js +1 -1
- package/core/ConnectStateWrapper.js +1 -1
- package/core/ContactFooter.js +1 -1
- package/core/CookieMessage.js +1 -1
- package/core/DropdownMenu.js +1 -1
- package/core/FeaturedLink.js +1 -1
- package/core/Flash.js +1 -1
- package/core/Footer.js +1 -1
- package/core/Meganav.js +1 -1
- package/core/MeganavBlogPostsList.js +1 -1
- package/core/MeganavContentCompany.js +1 -1
- package/core/MeganavContentDevelopers.js +1 -1
- package/core/MeganavContentProducts.js +1 -1
- package/core/MeganavContentUseCases.js +1 -1
- package/core/MeganavControl.js +1 -1
- package/core/MeganavControlMobileDropdown.js +1 -1
- package/core/MeganavControlMobilePanelClose.js +1 -1
- package/core/MeganavControlMobilePanelOpen.js +1 -1
- package/core/MeganavItemsDesktop.js +1 -1
- package/core/MeganavItemsMobile.js +1 -1
- package/core/MeganavItemsSignedIn.js +1 -1
- package/core/MeganavSearch.js +1 -1
- package/core/MeganavSearchPanel.js +1 -1
- package/core/MeganavSearchSuggestions.js +1 -1
- package/core/Notice/component.js +1 -1
- package/core/Notice.js +1 -1
- package/core/Slider.js +1 -1
- package/core/Table/Table.js +1 -1
- package/core/Table/TableCell.js +4 -4
- package/core/Table/data.js +1 -1
- package/core/Table.js +1 -1
- package/core/Tooltip.js +1 -1
- package/core/icons/icon-gui-partial.svg +4 -0
- package/core/sprites.svg +1 -1
- package/package.json +1 -2
- package/src/.DS_Store +0 -0
- package/src/core/.DS_Store +0 -0
- package/src/core/Accordion/Accordion.stories.tsx +1 -1
- package/src/core/Accordion.tsx +1 -1
- package/src/core/Code/Code.stories.tsx +1 -1
- package/src/core/Code.tsx +3 -3
- package/src/core/ConnectStateWrapper.tsx +1 -1
- package/src/core/ContactFooter/ContactFooter.stories.tsx +1 -1
- package/src/core/ContactFooter.tsx +4 -4
- package/src/core/CookieMessage/CookieMessage.stories.tsx +1 -1
- package/src/core/CookieMessage.tsx +2 -2
- package/src/core/CustomerLogos/CustomerLogos.stories.tsx +1 -1
- package/src/core/DropdownMenu/DropdownMenu.stories.tsx +2 -2
- package/src/core/DropdownMenu.tsx +1 -1
- package/src/core/FeaturedLink/FeaturedLink.stories.tsx +1 -1
- package/src/core/FeaturedLink.tsx +1 -1
- package/src/core/Flash/Flash.stories.tsx +1 -1
- package/src/core/Flash.tsx +4 -4
- package/src/core/Footer/Footer.stories.tsx +1 -1
- package/src/core/Footer.tsx +3 -3
- package/src/core/Icon/Icon.stories.tsx +2 -1
- package/src/core/Loader/Loader.stories.tsx +1 -1
- package/src/core/Logo/Logo.stories.tsx +1 -1
- package/src/core/Meganav/Meganav.stories.tsx +1 -1
- package/src/core/Meganav.tsx +17 -19
- package/src/core/MeganavBlogPostsList.tsx +2 -2
- package/src/core/MeganavContentCompany.tsx +5 -5
- package/src/core/MeganavContentDevelopers.tsx +2 -2
- package/src/core/MeganavContentProducts.tsx +2 -2
- package/src/core/MeganavContentUseCases.tsx +2 -2
- package/src/core/MeganavControl.tsx +2 -2
- package/src/core/MeganavControlMobileDropdown.tsx +2 -2
- package/src/core/MeganavControlMobilePanelClose.tsx +1 -2
- package/src/core/MeganavControlMobilePanelOpen.tsx +1 -2
- package/src/core/MeganavItemsDesktop.tsx +3 -3
- package/src/core/MeganavItemsMobile.tsx +9 -9
- package/src/core/MeganavItemsSignedIn.tsx +4 -8
- package/src/core/MeganavSearch.tsx +3 -3
- package/src/core/MeganavSearchPanel.tsx +4 -4
- package/src/core/MeganavSearchSuggestions.tsx +2 -2
- package/src/core/Notice/component.js +1 -1
- package/src/core/Notice.tsx +3 -4
- package/src/core/SignOutLink.tsx +1 -1
- package/src/core/Slider/Slider.stories.tsx +1 -1
- package/src/core/Slider.tsx +3 -3
- package/src/core/Table/Table.tsx +38 -9
- package/src/core/Table/TableCell.tsx +31 -6
- package/src/core/Table/data.tsx +3 -3
- package/src/core/Table.tsx +5 -3
- package/src/core/Tooltip/Tooltip.stories.tsx +1 -1
- package/src/core/Tooltip.tsx +34 -6
- package/src/core/icons/icon-gui-partial.svg +4 -0
- package/src/pages/Buttons.mdx +1 -1
- package/src/pages/Chips.mdx +1 -1
- package/src/pages/Forms.mdx +2 -2
- package/core/Accordion/component.js +0 -0
- package/core/ConnectStateWrapper/component.js +0 -0
- package/core/CookieMessage/component.js +0 -1
- package/core/CustomerLogos/component.js +0 -0
- package/core/DropdownMenu/component.js +0 -0
- package/core/FeaturedLink/component.js +0 -0
- package/core/Flash/component.js +0 -1
- package/core/Footer/component.js +0 -1
- package/core/Icon/component.js +0 -0
- package/core/Loader/component.js +0 -0
- package/core/Logo/component.js +0 -0
- package/core/MeganavContentCompany/component.js +0 -0
- package/core/MeganavContentDevelopers/component.js +0 -0
- package/core/MeganavContentProducts/.DS_Store +0 -0
- package/core/MeganavContentProducts/component.js +0 -0
- package/core/MeganavContentUseCases/.DS_Store +0 -0
- package/core/MeganavContentUseCases/component.js +0 -0
- package/core/MeganavItemsDesktop/.DS_Store +0 -0
- package/core/MeganavItemsDesktop/component.js +0 -0
- package/core/MeganavItemsMobile/.DS_Store +0 -0
- package/core/MeganavItemsMobile/component.js +0 -0
- package/core/MeganavItemsSignedIn/.DS_Store +0 -0
- package/core/MeganavItemsSignedIn/component.js +0 -0
- package/core/MeganavSearch/.DS_Store +0 -0
- package/core/MeganavSearch/component.js +0 -0
- package/core/MeganavSearchPanel/.DS_Store +0 -0
- package/core/MeganavSearchPanel/component.js +0 -0
- package/core/SignOutLink/.DS_Store +0 -0
- package/core/SignOutLink/component.js +0 -0
- package/src/core/Accordion/component.js +0 -0
- package/src/core/ConnectStateWrapper/component.js +0 -0
- package/src/core/CookieMessage/component.js +0 -1
- package/src/core/CustomerLogos/component.js +0 -0
- package/src/core/DropdownMenu/component.js +0 -0
- package/src/core/FeaturedLink/component.js +0 -0
- package/src/core/Flash/component.js +0 -1
- package/src/core/Footer/component.js +0 -1
- package/src/core/Icon/component.js +0 -0
- package/src/core/Loader/component.js +0 -0
- package/src/core/Logo/component.js +0 -0
- package/src/core/MeganavContentCompany/.DS_Store +0 -0
- package/src/core/MeganavContentCompany/component.js +0 -0
- package/src/core/MeganavContentDevelopers/.DS_Store +0 -0
- package/src/core/MeganavContentDevelopers/component.js +0 -0
- package/src/core/MeganavContentProducts/.DS_Store +0 -0
- package/src/core/MeganavContentProducts/component.js +0 -0
- package/src/core/MeganavContentUseCases/.DS_Store +0 -0
- package/src/core/MeganavContentUseCases/component.js +0 -1
- package/src/core/MeganavItemsDesktop/.DS_Store +0 -0
- package/src/core/MeganavItemsDesktop/component.js +0 -0
- package/src/core/MeganavItemsMobile/.DS_Store +0 -0
- package/src/core/MeganavItemsMobile/component.js +0 -0
- package/src/core/MeganavItemsSignedIn/.DS_Store +0 -0
- package/src/core/MeganavItemsSignedIn/component.js +0 -0
- package/src/core/MeganavSearch/.DS_Store +0 -0
- package/src/core/MeganavSearch/component.js +0 -0
- package/src/core/MeganavSearchPanel/.DS_Store +0 -0
- package/src/core/MeganavSearchPanel/component.js +0 -0
- package/src/core/SignOutLink/.DS_Store +0 -0
- package/src/core/SignOutLink/component.js +0 -0
- /package/core/{MeganavContentCompany → Tooltip}/.DS_Store +0 -0
- /package/{core/MeganavContentDevelopers → src/core/Tooltip}/.DS_Store +0 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React, { PropsWithChildren } from "react";
|
|
2
|
-
import Icon from "../Icon
|
|
2
|
+
import Icon from "../Icon";
|
|
3
3
|
|
|
4
4
|
type TableCellProps = {
|
|
5
5
|
isRowHeader?: boolean;
|
|
@@ -25,13 +25,22 @@ const Unsupported = () => (
|
|
|
25
25
|
/>
|
|
26
26
|
);
|
|
27
27
|
|
|
28
|
+
const Partial = () => (
|
|
29
|
+
<Icon
|
|
30
|
+
name="icon-gui-partial"
|
|
31
|
+
size="1.5rem"
|
|
32
|
+
additionalCSS="flex-grow-0 flex-shrink-0"
|
|
33
|
+
data-testid="partial-icon"
|
|
34
|
+
/>
|
|
35
|
+
);
|
|
36
|
+
|
|
28
37
|
const LabelCell = ({
|
|
29
38
|
children,
|
|
30
39
|
...rest
|
|
31
40
|
}: PropsWithChildren<React.TdHTMLAttributes<HTMLTableCellElement>>) => {
|
|
32
41
|
const classes = `
|
|
33
42
|
ui-text-p1 !font-bold pt-24 pb-8 border-light-grey sm:p-24 sm:relative sm:top-2 flex sm:table-cell ${
|
|
34
|
-
rest
|
|
43
|
+
rest?.className ?? ""
|
|
35
44
|
}
|
|
36
45
|
`;
|
|
37
46
|
|
|
@@ -56,7 +65,7 @@ const TableCell = ({
|
|
|
56
65
|
? "rounded-l-none rounded-r sm:rounded-lg py-20 px-24"
|
|
57
66
|
: "py-6"
|
|
58
67
|
}
|
|
59
|
-
${rest
|
|
68
|
+
${rest?.className ?? ""}
|
|
60
69
|
`}
|
|
61
70
|
>
|
|
62
71
|
{children}
|
|
@@ -67,7 +76,12 @@ const HeaderCell = ({
|
|
|
67
76
|
children,
|
|
68
77
|
...rest
|
|
69
78
|
}: PropsWithChildren<React.TdHTMLAttributes<HTMLTableCellElement>>) => (
|
|
70
|
-
<td
|
|
79
|
+
<td
|
|
80
|
+
{...rest}
|
|
81
|
+
className={`ui-text-h3 px-24 py-24 hidden sm:table-cell ${
|
|
82
|
+
rest?.className ?? ""
|
|
83
|
+
}`}
|
|
84
|
+
>
|
|
71
85
|
{children}
|
|
72
86
|
</td>
|
|
73
87
|
);
|
|
@@ -76,9 +90,20 @@ const CtaCell = ({
|
|
|
76
90
|
children,
|
|
77
91
|
...rest
|
|
78
92
|
}: PropsWithChildren<React.TdHTMLAttributes<HTMLTableCellElement>>) => (
|
|
79
|
-
<td
|
|
93
|
+
<td
|
|
94
|
+
{...rest}
|
|
95
|
+
className={`pt-24 hidden sm:table-cell ${rest?.className ?? ""}`}
|
|
96
|
+
>
|
|
80
97
|
{children}
|
|
81
98
|
</td>
|
|
82
99
|
);
|
|
83
100
|
|
|
84
|
-
export {
|
|
101
|
+
export {
|
|
102
|
+
TableCell,
|
|
103
|
+
LabelCell,
|
|
104
|
+
HeaderCell,
|
|
105
|
+
CtaCell,
|
|
106
|
+
Supported,
|
|
107
|
+
Unsupported,
|
|
108
|
+
Partial,
|
|
109
|
+
};
|
package/src/core/Table/data.tsx
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import React, { Fragment } from "react";
|
|
2
2
|
|
|
3
|
-
import Tooltip from "
|
|
4
|
-
import { Supported, Unsupported } from "
|
|
5
|
-
import Table from "
|
|
3
|
+
import Tooltip from "../Tooltip";
|
|
4
|
+
import { Supported, Unsupported } from "./TableCell";
|
|
5
|
+
import Table from "../Table";
|
|
6
6
|
|
|
7
7
|
const testRow = (index) => ({
|
|
8
8
|
label: `Label ${index + 1}`,
|
package/src/core/Table.tsx
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Table, TableRowHeader, TableHeader, TableBody } from "./Table";
|
|
2
|
-
import { TableRow } from "./TableRow";
|
|
1
|
+
import { Table, TableRowHeader, TableHeader, TableBody } from "./Table/Table";
|
|
2
|
+
import { TableRow } from "./Table/TableRow";
|
|
3
3
|
import {
|
|
4
4
|
TableCell,
|
|
5
5
|
LabelCell,
|
|
@@ -7,7 +7,8 @@ import {
|
|
|
7
7
|
CtaCell,
|
|
8
8
|
Supported,
|
|
9
9
|
Unsupported,
|
|
10
|
-
|
|
10
|
+
Partial,
|
|
11
|
+
} from "./Table/TableCell";
|
|
11
12
|
|
|
12
13
|
export default {
|
|
13
14
|
Root: Table,
|
|
@@ -21,4 +22,5 @@ export default {
|
|
|
21
22
|
Header: TableHeader,
|
|
22
23
|
Supported,
|
|
23
24
|
Unsupported,
|
|
25
|
+
Partial,
|
|
24
26
|
};
|
package/src/core/Tooltip.tsx
CHANGED
|
@@ -1,7 +1,24 @@
|
|
|
1
|
-
import React, {
|
|
2
|
-
|
|
1
|
+
import React, {
|
|
2
|
+
ButtonHTMLAttributes,
|
|
3
|
+
HTMLAttributes,
|
|
4
|
+
PropsWithChildren,
|
|
5
|
+
useEffect,
|
|
6
|
+
useRef,
|
|
7
|
+
useState,
|
|
8
|
+
} from "react";
|
|
9
|
+
import Icon from "./Icon";
|
|
3
10
|
|
|
4
|
-
|
|
11
|
+
type TooltipProps = {
|
|
12
|
+
triggerProps?: ButtonHTMLAttributes<HTMLButtonElement>;
|
|
13
|
+
tooltipProps?: HTMLAttributes<HTMLDivElement>;
|
|
14
|
+
} & HTMLAttributes<HTMLDivElement>;
|
|
15
|
+
|
|
16
|
+
const Tooltip = ({
|
|
17
|
+
children,
|
|
18
|
+
triggerProps,
|
|
19
|
+
tooltipProps,
|
|
20
|
+
...rest
|
|
21
|
+
}: PropsWithChildren<TooltipProps>) => {
|
|
5
22
|
const [open, setOpen] = useState(false);
|
|
6
23
|
const [position, setPosition] = useState({ x: 0, y: 0 });
|
|
7
24
|
const offset = 8;
|
|
@@ -27,21 +44,28 @@ const Tooltip = ({ children }: PropsWithChildren) => {
|
|
|
27
44
|
}, [open]);
|
|
28
45
|
|
|
29
46
|
return (
|
|
30
|
-
<div
|
|
47
|
+
<div
|
|
48
|
+
{...rest}
|
|
49
|
+
className={`relative inline-block align-top h-16 ${
|
|
50
|
+
rest?.className ?? ""
|
|
51
|
+
}`}
|
|
52
|
+
>
|
|
31
53
|
<button
|
|
32
54
|
onMouseEnter={() => setOpen(true)}
|
|
33
55
|
onMouseLeave={() => setOpen(false)}
|
|
34
|
-
className="ml-8 p-0 relative top-1 focus:outline-none"
|
|
35
56
|
type="button"
|
|
36
57
|
ref={reference}
|
|
37
58
|
aria-describedby="tooltip"
|
|
59
|
+
{...triggerProps}
|
|
60
|
+
className={`ml-8 p-0 relative top-1 focus:outline-none ${
|
|
61
|
+
triggerProps?.className ?? ""
|
|
62
|
+
}`}
|
|
38
63
|
>
|
|
39
64
|
<Icon name="icon-gui-info" size="1rem" />
|
|
40
65
|
</button>
|
|
41
66
|
|
|
42
67
|
{open ? (
|
|
43
68
|
<div
|
|
44
|
-
className="bg-light-grey p-12 rounded pointer-events-none absolute z-20"
|
|
45
69
|
role="tooltip"
|
|
46
70
|
ref={floating}
|
|
47
71
|
style={{
|
|
@@ -49,6 +73,10 @@ const Tooltip = ({ children }: PropsWithChildren) => {
|
|
|
49
73
|
left: -position.x,
|
|
50
74
|
boxShadow: "4px 4px 15px rgba(0, 0, 0, 0.2)",
|
|
51
75
|
}}
|
|
76
|
+
{...tooltipProps}
|
|
77
|
+
className={`bg-light-grey p-12 rounded pointer-events-none absolute z-20 ${
|
|
78
|
+
tooltipProps?.className ?? ""
|
|
79
|
+
}`}
|
|
52
80
|
>
|
|
53
81
|
<div className="w-256">{children}</div>
|
|
54
82
|
</div>
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M1.5 12C1.5 17.799 6.20101 22.5 12 22.5C17.799 22.5 22.5 17.799 22.5 12C22.5 6.20101 17.799 1.5 12 1.5C6.20101 1.5 1.5 6.20101 1.5 12ZM1.2779e-06 12C9.30272e-07 18.6274 5.37258 24 12 24C18.6274 24 24 18.6274 24 12C24 5.37258 18.6274 -1.95703e-07 12 -4.37114e-07C5.37259 -6.78525e-07 1.62554e-06 5.37258 1.2779e-06 12Z" fill="#03020D"/>
|
|
3
|
+
<path d="M11.5833 23.576C5.37903 23.3566 0.416667 18.2578 0.416667 12C0.416668 5.74218 5.37903 0.643381 11.5833 0.424021L11.5833 23.576Z" fill="#03020D" stroke="#03020D" stroke-width="0.833333"/>
|
|
4
|
+
</svg>
|
package/src/pages/Buttons.mdx
CHANGED
package/src/pages/Chips.mdx
CHANGED
package/src/pages/Forms.mdx
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Meta, Unstyled } from "@storybook/blocks";
|
|
2
2
|
import { formsHtml } from "./utils";
|
|
3
|
-
import Code from "../core/Code
|
|
4
|
-
import Icon from "../core/Icon
|
|
3
|
+
import Code from "../core/Code";
|
|
4
|
+
import Icon from "../core/Icon";
|
|
5
5
|
|
|
6
6
|
<Meta title="Brand/Forms" />
|
|
7
7
|
|
|
File without changes
|
|
File without changes
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import"./component.css";
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/core/Flash/component.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import"./component.css";
|
package/core/Footer/component.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import"./component.css";
|
package/core/Icon/component.js
DELETED
|
File without changes
|
package/core/Loader/component.js
DELETED
|
File without changes
|
package/core/Logo/component.js
DELETED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
Binary file
|
|
File without changes
|
|
Binary file
|
|
File without changes
|
|
Binary file
|
|
File without changes
|
|
Binary file
|
|
File without changes
|
|
Binary file
|
|
File without changes
|
|
Binary file
|
|
File without changes
|
|
Binary file
|
|
File without changes
|
|
Binary file
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import "./component.css";
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import "./component.css";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import "./component.css";
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
Binary file
|
|
File without changes
|
|
Binary file
|
|
File without changes
|
|
Binary file
|
|
File without changes
|
|
Binary file
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
// TODO: Webpack expects a .js file for any component
|
|
Binary file
|
|
File without changes
|
|
Binary file
|
|
File without changes
|
|
Binary file
|
|
File without changes
|
|
Binary file
|
|
File without changes
|
|
Binary file
|
|
File without changes
|
|
Binary file
|
|
File without changes
|
|
File without changes
|
|
File without changes
|