@ably/ui 14.0.0-dev.968e4a2 → 14.0.0-dev.f024736
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/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 +1 -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 +13 -5
- package/src/core/Table/data.tsx +3 -3
- package/src/core/Table.tsx +3 -3
- package/src/core/Tooltip/Tooltip.stories.tsx +1 -1
- package/src/core/Tooltip.tsx +34 -6
- 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
package/src/core/Slider.tsx
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import React, { CSSProperties, ReactNode, useEffect, useRef } from "react";
|
|
2
2
|
|
|
3
|
-
import Icon from "
|
|
4
|
-
import SliderScripts from "./component.js";
|
|
5
|
-
import "./component.css";
|
|
3
|
+
import Icon from "./Icon";
|
|
4
|
+
import SliderScripts from "./Slider/component.js";
|
|
5
|
+
import "./Slider/component.css";
|
|
6
6
|
|
|
7
7
|
type SliderProps = {
|
|
8
8
|
slides?: ReactNode[];
|
package/src/core/Table/Table.tsx
CHANGED
|
@@ -1,28 +1,57 @@
|
|
|
1
|
-
import React, {
|
|
1
|
+
import React, {
|
|
2
|
+
PropsWithChildren,
|
|
3
|
+
ReactElement,
|
|
4
|
+
TableHTMLAttributes,
|
|
5
|
+
cloneElement,
|
|
6
|
+
} from "react";
|
|
2
7
|
|
|
3
8
|
type TableProps = {
|
|
4
9
|
id?: string;
|
|
5
10
|
};
|
|
6
11
|
|
|
7
|
-
export const Table = ({
|
|
8
|
-
|
|
12
|
+
export const Table = ({
|
|
13
|
+
id,
|
|
14
|
+
children,
|
|
15
|
+
...rest
|
|
16
|
+
}: PropsWithChildren<TableProps & TableHTMLAttributes<HTMLTableElement>>) => (
|
|
17
|
+
<table
|
|
18
|
+
id={id}
|
|
19
|
+
{...rest}
|
|
20
|
+
className={`ui-standard-container mb-4 sm:table-fixed ${
|
|
21
|
+
rest?.className ?? ""
|
|
22
|
+
}`}
|
|
23
|
+
>
|
|
9
24
|
{children}
|
|
10
25
|
</table>
|
|
11
26
|
);
|
|
12
27
|
|
|
13
|
-
export const TableBody = ({
|
|
14
|
-
|
|
28
|
+
export const TableBody = ({
|
|
29
|
+
children,
|
|
30
|
+
...rest
|
|
31
|
+
}: PropsWithChildren<TableHTMLAttributes<HTMLTableSectionElement>>) => (
|
|
32
|
+
<tbody {...rest}>{children}</tbody>
|
|
15
33
|
);
|
|
16
34
|
|
|
17
|
-
export const TableHeader = ({
|
|
18
|
-
|
|
35
|
+
export const TableHeader = ({
|
|
36
|
+
children,
|
|
37
|
+
...rest
|
|
38
|
+
}: PropsWithChildren<TableHTMLAttributes<HTMLTableSectionElement>>) => (
|
|
39
|
+
<thead
|
|
40
|
+
{...rest}
|
|
41
|
+
className={`sticky bg-white z-10 top-0 ${rest?.className ?? ""}`}
|
|
42
|
+
>
|
|
19
43
|
{cloneElement(children as ReactElement, { isHeader: true })}
|
|
20
44
|
</thead>
|
|
21
45
|
);
|
|
22
46
|
|
|
23
|
-
export const TableRowHeader = ({
|
|
47
|
+
export const TableRowHeader = ({
|
|
48
|
+
children,
|
|
49
|
+
...rest
|
|
50
|
+
}: PropsWithChildren<TableHTMLAttributes<HTMLTableRowElement>>) => (
|
|
24
51
|
<tr
|
|
25
|
-
className=
|
|
52
|
+
className={`-ml-24 mt-8 sm:ml-0 sm:mt-0 bg-light-grey sm:sticky z-10 ${
|
|
53
|
+
rest?.className ?? ""
|
|
54
|
+
}`}
|
|
26
55
|
style={{ top: "4rem" }}
|
|
27
56
|
>
|
|
28
57
|
{cloneElement(children as ReactElement, { isRowHeader: true })}
|
|
@@ -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;
|
|
@@ -31,7 +31,7 @@ const LabelCell = ({
|
|
|
31
31
|
}: PropsWithChildren<React.TdHTMLAttributes<HTMLTableCellElement>>) => {
|
|
32
32
|
const classes = `
|
|
33
33
|
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
|
|
34
|
+
rest?.className ?? ""
|
|
35
35
|
}
|
|
36
36
|
`;
|
|
37
37
|
|
|
@@ -56,7 +56,7 @@ const TableCell = ({
|
|
|
56
56
|
? "rounded-l-none rounded-r sm:rounded-lg py-20 px-24"
|
|
57
57
|
: "py-6"
|
|
58
58
|
}
|
|
59
|
-
${rest
|
|
59
|
+
${rest?.className ?? ""}
|
|
60
60
|
`}
|
|
61
61
|
>
|
|
62
62
|
{children}
|
|
@@ -67,7 +67,12 @@ const HeaderCell = ({
|
|
|
67
67
|
children,
|
|
68
68
|
...rest
|
|
69
69
|
}: PropsWithChildren<React.TdHTMLAttributes<HTMLTableCellElement>>) => (
|
|
70
|
-
<td
|
|
70
|
+
<td
|
|
71
|
+
{...rest}
|
|
72
|
+
className={`ui-text-h3 px-24 py-24 hidden sm:table-cell ${
|
|
73
|
+
rest?.className ?? ""
|
|
74
|
+
}`}
|
|
75
|
+
>
|
|
71
76
|
{children}
|
|
72
77
|
</td>
|
|
73
78
|
);
|
|
@@ -76,7 +81,10 @@ const CtaCell = ({
|
|
|
76
81
|
children,
|
|
77
82
|
...rest
|
|
78
83
|
}: PropsWithChildren<React.TdHTMLAttributes<HTMLTableCellElement>>) => (
|
|
79
|
-
<td
|
|
84
|
+
<td
|
|
85
|
+
{...rest}
|
|
86
|
+
className={`pt-24 hidden sm:table-cell ${rest?.className ?? ""}`}
|
|
87
|
+
>
|
|
80
88
|
{children}
|
|
81
89
|
</td>
|
|
82
90
|
);
|
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,7 @@ import {
|
|
|
7
7
|
CtaCell,
|
|
8
8
|
Supported,
|
|
9
9
|
Unsupported,
|
|
10
|
-
} from "./TableCell";
|
|
10
|
+
} from "./Table/TableCell";
|
|
11
11
|
|
|
12
12
|
export default {
|
|
13
13
|
Root: Table,
|
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>
|
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
|