@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.
Files changed (155) hide show
  1. package/README.md +8 -10
  2. package/core/.DS_Store +0 -0
  3. package/core/Accordion.js +1 -1
  4. package/core/Code.js +1 -1
  5. package/core/ConnectStateWrapper.js +1 -1
  6. package/core/ContactFooter.js +1 -1
  7. package/core/CookieMessage.js +1 -1
  8. package/core/DropdownMenu.js +1 -1
  9. package/core/FeaturedLink.js +1 -1
  10. package/core/Flash.js +1 -1
  11. package/core/Footer.js +1 -1
  12. package/core/Meganav.js +1 -1
  13. package/core/MeganavBlogPostsList.js +1 -1
  14. package/core/MeganavContentCompany.js +1 -1
  15. package/core/MeganavContentDevelopers.js +1 -1
  16. package/core/MeganavContentProducts.js +1 -1
  17. package/core/MeganavContentUseCases.js +1 -1
  18. package/core/MeganavControl.js +1 -1
  19. package/core/MeganavControlMobileDropdown.js +1 -1
  20. package/core/MeganavControlMobilePanelClose.js +1 -1
  21. package/core/MeganavControlMobilePanelOpen.js +1 -1
  22. package/core/MeganavItemsDesktop.js +1 -1
  23. package/core/MeganavItemsMobile.js +1 -1
  24. package/core/MeganavItemsSignedIn.js +1 -1
  25. package/core/MeganavSearch.js +1 -1
  26. package/core/MeganavSearchPanel.js +1 -1
  27. package/core/MeganavSearchSuggestions.js +1 -1
  28. package/core/Notice/component.js +1 -1
  29. package/core/Notice.js +1 -1
  30. package/core/Slider.js +1 -1
  31. package/core/Table/Table.js +1 -1
  32. package/core/Table/TableCell.js +4 -4
  33. package/core/Table/data.js +1 -1
  34. package/core/Table.js +1 -1
  35. package/core/Tooltip.js +1 -1
  36. package/core/icons/icon-gui-partial.svg +4 -0
  37. package/core/sprites.svg +1 -1
  38. package/package.json +1 -2
  39. package/src/.DS_Store +0 -0
  40. package/src/core/.DS_Store +0 -0
  41. package/src/core/Accordion/Accordion.stories.tsx +1 -1
  42. package/src/core/Accordion.tsx +1 -1
  43. package/src/core/Code/Code.stories.tsx +1 -1
  44. package/src/core/Code.tsx +3 -3
  45. package/src/core/ConnectStateWrapper.tsx +1 -1
  46. package/src/core/ContactFooter/ContactFooter.stories.tsx +1 -1
  47. package/src/core/ContactFooter.tsx +4 -4
  48. package/src/core/CookieMessage/CookieMessage.stories.tsx +1 -1
  49. package/src/core/CookieMessage.tsx +2 -2
  50. package/src/core/CustomerLogos/CustomerLogos.stories.tsx +1 -1
  51. package/src/core/DropdownMenu/DropdownMenu.stories.tsx +2 -2
  52. package/src/core/DropdownMenu.tsx +1 -1
  53. package/src/core/FeaturedLink/FeaturedLink.stories.tsx +1 -1
  54. package/src/core/FeaturedLink.tsx +1 -1
  55. package/src/core/Flash/Flash.stories.tsx +1 -1
  56. package/src/core/Flash.tsx +4 -4
  57. package/src/core/Footer/Footer.stories.tsx +1 -1
  58. package/src/core/Footer.tsx +3 -3
  59. package/src/core/Icon/Icon.stories.tsx +2 -1
  60. package/src/core/Loader/Loader.stories.tsx +1 -1
  61. package/src/core/Logo/Logo.stories.tsx +1 -1
  62. package/src/core/Meganav/Meganav.stories.tsx +1 -1
  63. package/src/core/Meganav.tsx +17 -19
  64. package/src/core/MeganavBlogPostsList.tsx +2 -2
  65. package/src/core/MeganavContentCompany.tsx +5 -5
  66. package/src/core/MeganavContentDevelopers.tsx +2 -2
  67. package/src/core/MeganavContentProducts.tsx +2 -2
  68. package/src/core/MeganavContentUseCases.tsx +2 -2
  69. package/src/core/MeganavControl.tsx +2 -2
  70. package/src/core/MeganavControlMobileDropdown.tsx +2 -2
  71. package/src/core/MeganavControlMobilePanelClose.tsx +1 -2
  72. package/src/core/MeganavControlMobilePanelOpen.tsx +1 -2
  73. package/src/core/MeganavItemsDesktop.tsx +3 -3
  74. package/src/core/MeganavItemsMobile.tsx +9 -9
  75. package/src/core/MeganavItemsSignedIn.tsx +4 -8
  76. package/src/core/MeganavSearch.tsx +3 -3
  77. package/src/core/MeganavSearchPanel.tsx +4 -4
  78. package/src/core/MeganavSearchSuggestions.tsx +2 -2
  79. package/src/core/Notice/component.js +1 -1
  80. package/src/core/Notice.tsx +3 -4
  81. package/src/core/SignOutLink.tsx +1 -1
  82. package/src/core/Slider/Slider.stories.tsx +1 -1
  83. package/src/core/Slider.tsx +3 -3
  84. package/src/core/Table/Table.tsx +38 -9
  85. package/src/core/Table/TableCell.tsx +31 -6
  86. package/src/core/Table/data.tsx +3 -3
  87. package/src/core/Table.tsx +5 -3
  88. package/src/core/Tooltip/Tooltip.stories.tsx +1 -1
  89. package/src/core/Tooltip.tsx +34 -6
  90. package/src/core/icons/icon-gui-partial.svg +4 -0
  91. package/src/pages/Buttons.mdx +1 -1
  92. package/src/pages/Chips.mdx +1 -1
  93. package/src/pages/Forms.mdx +2 -2
  94. package/core/Accordion/component.js +0 -0
  95. package/core/ConnectStateWrapper/component.js +0 -0
  96. package/core/CookieMessage/component.js +0 -1
  97. package/core/CustomerLogos/component.js +0 -0
  98. package/core/DropdownMenu/component.js +0 -0
  99. package/core/FeaturedLink/component.js +0 -0
  100. package/core/Flash/component.js +0 -1
  101. package/core/Footer/component.js +0 -1
  102. package/core/Icon/component.js +0 -0
  103. package/core/Loader/component.js +0 -0
  104. package/core/Logo/component.js +0 -0
  105. package/core/MeganavContentCompany/component.js +0 -0
  106. package/core/MeganavContentDevelopers/component.js +0 -0
  107. package/core/MeganavContentProducts/.DS_Store +0 -0
  108. package/core/MeganavContentProducts/component.js +0 -0
  109. package/core/MeganavContentUseCases/.DS_Store +0 -0
  110. package/core/MeganavContentUseCases/component.js +0 -0
  111. package/core/MeganavItemsDesktop/.DS_Store +0 -0
  112. package/core/MeganavItemsDesktop/component.js +0 -0
  113. package/core/MeganavItemsMobile/.DS_Store +0 -0
  114. package/core/MeganavItemsMobile/component.js +0 -0
  115. package/core/MeganavItemsSignedIn/.DS_Store +0 -0
  116. package/core/MeganavItemsSignedIn/component.js +0 -0
  117. package/core/MeganavSearch/.DS_Store +0 -0
  118. package/core/MeganavSearch/component.js +0 -0
  119. package/core/MeganavSearchPanel/.DS_Store +0 -0
  120. package/core/MeganavSearchPanel/component.js +0 -0
  121. package/core/SignOutLink/.DS_Store +0 -0
  122. package/core/SignOutLink/component.js +0 -0
  123. package/src/core/Accordion/component.js +0 -0
  124. package/src/core/ConnectStateWrapper/component.js +0 -0
  125. package/src/core/CookieMessage/component.js +0 -1
  126. package/src/core/CustomerLogos/component.js +0 -0
  127. package/src/core/DropdownMenu/component.js +0 -0
  128. package/src/core/FeaturedLink/component.js +0 -0
  129. package/src/core/Flash/component.js +0 -1
  130. package/src/core/Footer/component.js +0 -1
  131. package/src/core/Icon/component.js +0 -0
  132. package/src/core/Loader/component.js +0 -0
  133. package/src/core/Logo/component.js +0 -0
  134. package/src/core/MeganavContentCompany/.DS_Store +0 -0
  135. package/src/core/MeganavContentCompany/component.js +0 -0
  136. package/src/core/MeganavContentDevelopers/.DS_Store +0 -0
  137. package/src/core/MeganavContentDevelopers/component.js +0 -0
  138. package/src/core/MeganavContentProducts/.DS_Store +0 -0
  139. package/src/core/MeganavContentProducts/component.js +0 -0
  140. package/src/core/MeganavContentUseCases/.DS_Store +0 -0
  141. package/src/core/MeganavContentUseCases/component.js +0 -1
  142. package/src/core/MeganavItemsDesktop/.DS_Store +0 -0
  143. package/src/core/MeganavItemsDesktop/component.js +0 -0
  144. package/src/core/MeganavItemsMobile/.DS_Store +0 -0
  145. package/src/core/MeganavItemsMobile/component.js +0 -0
  146. package/src/core/MeganavItemsSignedIn/.DS_Store +0 -0
  147. package/src/core/MeganavItemsSignedIn/component.js +0 -0
  148. package/src/core/MeganavSearch/.DS_Store +0 -0
  149. package/src/core/MeganavSearch/component.js +0 -0
  150. package/src/core/MeganavSearchPanel/.DS_Store +0 -0
  151. package/src/core/MeganavSearchPanel/component.js +0 -0
  152. package/src/core/SignOutLink/.DS_Store +0 -0
  153. package/src/core/SignOutLink/component.js +0 -0
  154. /package/core/{MeganavContentCompany → Tooltip}/.DS_Store +0 -0
  155. /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/component.tsx";
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.className ?? ""
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.className ?? ""}
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 {...rest} className="ui-text-h3 px-24 py-24 hidden sm:table-cell">
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 {...rest} className="pt-24 hidden sm:table-cell">
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 { TableCell, LabelCell, HeaderCell, CtaCell, Supported, Unsupported };
101
+ export {
102
+ TableCell,
103
+ LabelCell,
104
+ HeaderCell,
105
+ CtaCell,
106
+ Supported,
107
+ Unsupported,
108
+ Partial,
109
+ };
@@ -1,8 +1,8 @@
1
1
  import React, { Fragment } from "react";
2
2
 
3
- import Tooltip from "../../Tooltip/component";
4
- import { Supported, Unsupported } from "../TableCell";
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}`,
@@ -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
- } from "./TableCell";
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
  };
@@ -1,5 +1,5 @@
1
1
  import React from "react";
2
- import Tooltip from "./component";
2
+ import Tooltip from "../Tooltip";
3
3
 
4
4
  export default {
5
5
  title: "Components/Tooltip",
@@ -1,7 +1,24 @@
1
- import React, { PropsWithChildren, useEffect, useRef, useState } from "react";
2
- import Icon from "../Icon/component.tsx";
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
- const Tooltip = ({ children }: PropsWithChildren) => {
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 className="relative inline-block align-top h-16">
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>
@@ -1,5 +1,5 @@
1
1
  import { Meta, Unstyled } from "@storybook/blocks";
2
- import Icon from "../core/Icon/component.tsx";
2
+ import Icon from "../core/Icon";
3
3
 
4
4
  <Meta title="Brand/Buttons" />
5
5
 
@@ -1,5 +1,5 @@
1
1
  import { Meta, Unstyled } from "@storybook/blocks";
2
- import Icon from "../core/Icon/component.tsx";
2
+ import Icon from "../core/Icon";
3
3
 
4
4
  <Meta title="Brand/Chips" />
5
5
 
@@ -1,7 +1,7 @@
1
1
  import { Meta, Unstyled } from "@storybook/blocks";
2
2
  import { formsHtml } from "./utils";
3
- import Code from "../core/Code/component.tsx";
4
- import Icon from "../core/Icon/component.tsx";
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
@@ -1 +0,0 @@
1
- import"./component.css";
@@ -1 +0,0 @@
1
- import"./component.css";
File without changes
File without changes
File without changes
File without changes
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
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
File without changes
File without changes
File without changes
@@ -1 +0,0 @@
1
- // TODO: Webpack expects a .js file for any component
File without changes
File without changes
File without changes
Binary file
File without changes
File without changes
Binary file
File without changes