@ably/ui 14.0.0-dev.58ef698 → 14.0.0-dev.64a4085
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/.DS_Store +0 -0
- package/core/Accordion.js +1 -0
- package/core/Code/.DS_Store +0 -0
- package/core/Code/component.js +1 -1
- package/core/Code.js +1 -0
- package/core/ConnectStateWrapper.js +1 -0
- package/core/ContactFooter/.DS_Store +0 -0
- package/core/ContactFooter/component.js +1 -1
- package/core/ContactFooter.js +1 -0
- package/core/CookieMessage/.DS_Store +0 -0
- package/core/CookieMessage.js +1 -0
- package/core/CustomerLogos/.DS_Store +0 -0
- package/core/CustomerLogos.js +1 -0
- package/core/DropdownMenu/.DS_Store +0 -0
- package/core/DropdownMenu.js +1 -0
- package/core/Expander.js +1 -0
- package/core/FeaturedLink/.DS_Store +0 -0
- package/core/FeaturedLink.js +1 -0
- package/core/Flash/.DS_Store +0 -0
- package/core/Flash.js +1 -0
- package/core/Footer/.DS_Store +0 -0
- package/core/Footer.js +1 -0
- package/core/Icon/.DS_Store +0 -0
- package/core/Icon.js +1 -0
- package/core/Loader/.DS_Store +0 -0
- package/core/Loader.js +13 -0
- package/core/Logo/.DS_Store +0 -0
- package/core/Logo.js +1 -0
- package/core/Meganav/component.js +1 -1
- package/core/Meganav.js +1 -0
- package/core/MeganavBlogPostsList/.DS_Store +0 -0
- package/core/MeganavBlogPostsList/component.js +1 -1
- package/core/MeganavBlogPostsList.js +1 -0
- package/core/MeganavContentCompany.js +1 -0
- package/core/MeganavContentDevelopers.js +1 -0
- package/core/MeganavContentProducts.js +1 -0
- package/core/MeganavContentUseCases.js +1 -0
- package/core/MeganavControl/.DS_Store +0 -0
- package/core/MeganavControl/component.js +1 -1
- package/core/MeganavControl.js +1 -0
- package/core/MeganavControlMobileDropdown/.DS_Store +0 -0
- package/core/MeganavControlMobileDropdown/component.js +1 -1
- package/core/MeganavControlMobileDropdown.js +1 -0
- package/core/MeganavControlMobilePanelClose/.DS_Store +0 -0
- package/core/MeganavControlMobilePanelClose/component.js +1 -1
- package/core/MeganavControlMobilePanelClose.js +1 -0
- package/core/MeganavControlMobilePanelOpen/.DS_Store +0 -0
- package/core/MeganavControlMobilePanelOpen/component.js +1 -1
- package/core/MeganavControlMobilePanelOpen.js +1 -0
- package/core/MeganavItemsDesktop.js +1 -0
- package/core/MeganavItemsMobile.js +1 -0
- package/core/MeganavItemsSignedIn.js +1 -0
- package/core/MeganavSearch.js +1 -0
- package/core/MeganavSearchAutocomplete/.DS_Store +0 -0
- package/core/MeganavSearchAutocomplete/component.js +1 -1
- package/core/MeganavSearchAutocomplete.js +1 -0
- package/core/MeganavSearchPanel.js +1 -0
- package/core/MeganavSearchSuggestions/.DS_Store +0 -0
- package/core/MeganavSearchSuggestions/component.js +1 -1
- package/core/MeganavSearchSuggestions.js +1 -0
- package/core/Notice/.DS_Store +0 -0
- package/core/Notice/component.js +1 -1
- package/core/Notice.js +1 -0
- package/core/SignOutLink.js +1 -0
- package/core/Slider/.DS_Store +0 -0
- package/core/Slider/component.css +32 -0
- package/core/Slider/component.js +1 -1
- package/core/Slider.js +1 -0
- package/core/Table/.DS_Store +0 -0
- package/core/Table/Table.js +1 -1
- package/core/Table/TableCell.js +7 -1
- package/core/Table/TableRow.js +1 -1
- package/core/Table/data.js +1 -0
- package/core/Table.js +1 -0
- package/core/Tooltip/.DS_Store +0 -0
- package/core/Tooltip.js +1 -0
- package/core/css.js +1 -1
- package/core/dom-query.js +1 -1
- package/core/hubspot-chat-toggle.js +1 -1
- package/core/icons/icon-gui-partial.svg +4 -0
- package/core/icons.js +1 -1
- package/core/load-sprites.js +1 -1
- package/core/react-renderer.js +1 -1
- package/core/remote-blogs-posts.js +1 -1
- package/core/remote-data-store.js +1 -1
- package/core/remote-data-util.js +1 -1
- package/core/remote-session-data.js +1 -1
- package/core/sprites.svg +1 -1
- package/core/url-base.js +1 -1
- package/core/utils/syntax-highlighter-registry.js +1 -1
- package/core/utils/syntax-highlighter.js +1 -1
- package/package.json +2 -3
- package/src/.DS_Store +0 -0
- package/src/core/.DS_Store +0 -0
- package/src/core/Accordion/.DS_Store +0 -0
- package/src/core/Accordion/Accordion.stories.tsx +1 -1
- package/src/core/{Accordion/component.tsx → Accordion.tsx} +6 -6
- package/src/core/Code/.DS_Store +0 -0
- package/src/core/Code/Code.stories.tsx +1 -1
- package/src/core/{Code/component.tsx → Code.tsx} +3 -3
- package/src/core/{ConnectStateWrapper/component.tsx → ConnectStateWrapper.tsx} +1 -1
- package/src/core/ContactFooter/.DS_Store +0 -0
- package/src/core/ContactFooter/ContactFooter.stories.tsx +1 -1
- package/src/core/{ContactFooter/component.tsx → ContactFooter.tsx} +4 -4
- package/src/core/CookieMessage/.DS_Store +0 -0
- package/src/core/CookieMessage/CookieMessage.stories.tsx +1 -1
- package/src/core/{CookieMessage/component.tsx → CookieMessage.tsx} +2 -2
- package/src/core/CustomerLogos/.DS_Store +0 -0
- package/src/core/CustomerLogos/CustomerLogos.stories.tsx +1 -1
- package/src/core/DropdownMenu/.DS_Store +0 -0
- package/src/core/DropdownMenu/DropdownMenu.stories.tsx +2 -2
- package/src/core/{DropdownMenu/component.tsx → DropdownMenu.tsx} +1 -1
- package/src/core/Expander/Expander.stories.tsx +118 -0
- package/src/core/Expander.tsx +46 -0
- package/src/core/FeaturedLink/.DS_Store +0 -0
- package/src/core/FeaturedLink/FeaturedLink.stories.tsx +1 -1
- package/src/core/{FeaturedLink/component.tsx → FeaturedLink.tsx} +1 -1
- package/src/core/Flash/.DS_Store +0 -0
- package/src/core/Flash/Flash.stories.tsx +1 -1
- package/src/core/{Flash/component.tsx → Flash.tsx} +4 -4
- package/src/core/Footer/.DS_Store +0 -0
- package/src/core/Footer/Footer.stories.tsx +1 -1
- package/src/core/{Footer/component.tsx → Footer.tsx} +3 -3
- package/src/core/Icon/.DS_Store +0 -0
- package/src/core/Icon/Icon.stories.tsx +2 -1
- package/src/core/Loader/.DS_Store +0 -0
- package/src/core/Loader/Loader.stories.tsx +1 -1
- package/src/core/Logo/.DS_Store +0 -0
- package/src/core/Logo/Logo.stories.tsx +1 -1
- package/src/core/Meganav/Meganav.stories.tsx +1 -1
- package/src/core/{Meganav/component.tsx → Meganav.tsx} +17 -19
- package/src/core/MeganavBlogPostsList/.DS_Store +0 -0
- package/src/core/{MeganavBlogPostsList/component.tsx → MeganavBlogPostsList.tsx} +2 -2
- package/src/core/{MeganavContentCompany/component.tsx → MeganavContentCompany.tsx} +5 -5
- package/src/core/{MeganavContentDevelopers/component.tsx → MeganavContentDevelopers.tsx} +2 -2
- package/src/core/{MeganavContentProducts/component.tsx → MeganavContentProducts.tsx} +2 -2
- package/src/core/{MeganavContentUseCases/component.tsx → MeganavContentUseCases.tsx} +2 -2
- package/src/core/MeganavControl/.DS_Store +0 -0
- package/src/core/{MeganavControl/component.tsx → MeganavControl.tsx} +2 -2
- package/src/core/MeganavControlMobileDropdown/.DS_Store +0 -0
- package/src/core/{MeganavControlMobileDropdown/component.tsx → MeganavControlMobileDropdown.tsx} +2 -2
- package/src/core/MeganavControlMobilePanelClose/.DS_Store +0 -0
- package/src/core/{MeganavControlMobilePanelClose/component.tsx → MeganavControlMobilePanelClose.tsx} +1 -2
- package/src/core/MeganavControlMobilePanelOpen/.DS_Store +0 -0
- package/src/core/{MeganavControlMobilePanelOpen/component.tsx → MeganavControlMobilePanelOpen.tsx} +1 -2
- package/src/core/{MeganavItemsDesktop/component.tsx → MeganavItemsDesktop.tsx} +3 -3
- package/src/core/{MeganavItemsMobile/component.tsx → MeganavItemsMobile.tsx} +9 -9
- package/src/core/{MeganavItemsSignedIn/component.tsx → MeganavItemsSignedIn.tsx} +4 -8
- package/src/core/{MeganavSearch/component.tsx → MeganavSearch.tsx} +3 -3
- package/src/core/MeganavSearchAutocomplete/.DS_Store +0 -0
- package/src/core/{MeganavSearchPanel/component.tsx → MeganavSearchPanel.tsx} +4 -4
- package/src/core/MeganavSearchSuggestions/.DS_Store +0 -0
- package/src/core/{MeganavSearchSuggestions/component.tsx → MeganavSearchSuggestions.tsx} +2 -2
- package/src/core/Notice/.DS_Store +0 -0
- package/src/core/Notice/component.js +1 -1
- package/src/core/{Notice/component.tsx → Notice.tsx} +3 -4
- package/src/core/{SignOutLink/component.tsx → SignOutLink.tsx} +1 -1
- package/src/core/Slider/.DS_Store +0 -0
- package/src/core/Slider/Slider.stories.tsx +83 -30
- package/src/core/Slider/component.css +32 -0
- package/src/core/Slider.tsx +193 -0
- package/src/core/Table/.DS_Store +0 -0
- package/src/core/Table/Table.tsx +38 -9
- package/src/core/Table/TableCell.tsx +31 -6
- package/src/core/Table/{stories/data.tsx → data.tsx} +3 -3
- package/src/core/{Table/index.ts → Table.tsx} +5 -3
- package/src/core/Tooltip/.DS_Store +0 -0
- package/src/core/Tooltip/Tooltip.stories.tsx +1 -1
- package/src/core/{Tooltip/component.tsx → 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 -1
- package/core/ConnectStateWrapper/component.js +0 -1
- package/core/CookieMessage/component.js +0 -1
- package/core/CustomerLogos/component.js +0 -1
- package/core/DropdownMenu/component.js +0 -1
- package/core/FeaturedLink/component.js +0 -1
- package/core/Flash/component.js +0 -1
- package/core/Footer/component.js +0 -1
- package/core/Icon/component.js +0 -1
- package/core/Loader/component.js +0 -1
- package/core/Logo/component.js +0 -1
- package/core/MeganavContentCompany/component.js +0 -1
- package/core/MeganavContentDevelopers/component.js +0 -1
- package/core/MeganavContentProducts/component.js +0 -1
- package/core/MeganavContentUseCases/component.js +0 -1
- package/core/MeganavItemsDesktop/component.js +0 -1
- package/core/MeganavItemsMobile/component.js +0 -1
- package/core/MeganavItemsSignedIn/component.js +0 -1
- package/core/MeganavSearch/component.js +0 -1
- package/core/MeganavSearchPanel/component.js +0 -1
- package/core/SignOutLink/component.js +0 -1
- package/core/Table/index.js +0 -1
- package/core/Table/stories/data.js +0 -1
- package/core/Tooltip/component.js +0 -1
- 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/component.js +0 -0
- package/src/core/MeganavContentDevelopers/component.js +0 -0
- package/src/core/MeganavContentProducts/component.js +0 -0
- package/src/core/MeganavContentUseCases/component.js +0 -1
- package/src/core/MeganavItemsDesktop/component.js +0 -0
- package/src/core/MeganavItemsMobile/component.js +0 -0
- package/src/core/MeganavItemsSignedIn/component.js +0 -0
- package/src/core/MeganavSearch/component.js +0 -0
- package/src/core/MeganavSearchPanel/component.js +0 -0
- package/src/core/SignOutLink/component.js +0 -0
- package/src/core/Slider/component.tsx +0 -112
- /package/src/core/{CustomerLogos/component.tsx → CustomerLogos.tsx} +0 -0
- /package/src/core/{Icon/component.tsx → Icon.tsx} +0 -0
- /package/src/core/{Loader/component.tsx → Loader.tsx} +0 -0
- /package/src/core/{Logo/component.tsx → Logo.tsx} +0 -0
- /package/src/core/{MeganavSearchAutocomplete/component.tsx → MeganavSearchAutocomplete.tsx} +0 -0
- /package/src/core/Table/{stories/Table.stories.tsx → Table.stories.tsx} +0 -0
package/src/core/{MeganavControlMobileDropdown/component.tsx → MeganavControlMobileDropdown.tsx}
RENAMED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
|
|
3
|
-
import Icon from "
|
|
4
|
-
import { MeganavTheme } from "
|
|
3
|
+
import Icon from "./Icon";
|
|
4
|
+
import { MeganavTheme } from "./Meganav";
|
|
5
5
|
|
|
6
6
|
const MeganavControlMobileDropdown = ({ theme }: { theme: MeganavTheme }) => (
|
|
7
7
|
<button
|
|
Binary file
|
|
Binary file
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
|
|
3
|
-
import MeganavData from "
|
|
4
|
-
import MeganavControl from "
|
|
5
|
-
import { AbsUrl, MeganavPanels, MeganavTheme } from "
|
|
3
|
+
import MeganavData from "./Meganav/component.json";
|
|
4
|
+
import MeganavControl from "./MeganavControl";
|
|
5
|
+
import { AbsUrl, MeganavPanels, MeganavTheme } from "./Meganav";
|
|
6
6
|
|
|
7
7
|
type MeganavDesktopItems = {
|
|
8
8
|
panels: MeganavPanels;
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
|
|
3
|
-
import SignOutLink from "
|
|
4
|
-
import MeganavSearchSuggestions from "
|
|
5
|
-
import Icon from "
|
|
6
|
-
import MeganavData from "
|
|
7
|
-
import MeganavControlMobileDropdown from "
|
|
8
|
-
import MeganavControlMobilePanelClose from "
|
|
9
|
-
import MeganavControlMobilePanelOpen from "
|
|
10
|
-
import MeganavSearchAutocomplete from "
|
|
3
|
+
import SignOutLink from "./SignOutLink";
|
|
4
|
+
import MeganavSearchSuggestions from "./MeganavSearchSuggestions";
|
|
5
|
+
import Icon from "./Icon";
|
|
6
|
+
import MeganavData from "./Meganav/component.json";
|
|
7
|
+
import MeganavControlMobileDropdown from "./MeganavControlMobileDropdown";
|
|
8
|
+
import MeganavControlMobilePanelClose from "./MeganavControlMobilePanelClose";
|
|
9
|
+
import MeganavControlMobilePanelOpen from "./MeganavControlMobilePanelOpen";
|
|
10
|
+
import MeganavSearchAutocomplete from "./MeganavSearchAutocomplete";
|
|
11
11
|
import {
|
|
12
12
|
AbsUrl,
|
|
13
13
|
MeganavPanels,
|
|
14
14
|
MeganavSessionState,
|
|
15
15
|
MeganavTheme,
|
|
16
|
-
} from "
|
|
16
|
+
} from "./Meganav";
|
|
17
17
|
|
|
18
18
|
type MeganavItemsMobileProps = {
|
|
19
19
|
panels: MeganavPanels;
|
|
@@ -1,13 +1,9 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
|
|
3
|
-
import MeganavControl from "
|
|
4
|
-
import SignOutLink from "
|
|
5
|
-
import MeganavSearch from "
|
|
6
|
-
import {
|
|
7
|
-
AbsUrl,
|
|
8
|
-
MeganavSessionState,
|
|
9
|
-
MeganavTheme,
|
|
10
|
-
} from "../Meganav/component.tsx";
|
|
3
|
+
import MeganavControl from "./MeganavControl";
|
|
4
|
+
import SignOutLink from "./SignOutLink";
|
|
5
|
+
import MeganavSearch from "./MeganavSearch";
|
|
6
|
+
import { AbsUrl, MeganavSessionState, MeganavTheme } from "./Meganav";
|
|
11
7
|
|
|
12
8
|
type MeganavItemsSignedIn = {
|
|
13
9
|
sessionState: MeganavSessionState;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
|
|
3
|
-
import Icon from "
|
|
4
|
-
import MeganavSearchPanel from "
|
|
5
|
-
import { AbsUrl } from "
|
|
3
|
+
import Icon from "./Icon";
|
|
4
|
+
import MeganavSearchPanel from "./MeganavSearchPanel";
|
|
5
|
+
import { AbsUrl } from "./Meganav";
|
|
6
6
|
|
|
7
7
|
const MeganavSearch = ({ absUrl }: { absUrl: AbsUrl }) => (
|
|
8
8
|
<>
|
|
Binary file
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
|
|
3
|
-
import Icon from "
|
|
4
|
-
import MeganavSearchSuggestions from "
|
|
5
|
-
import MeganavSearchAutocomplete from "
|
|
6
|
-
import { AbsUrl } from "
|
|
3
|
+
import Icon from "./Icon";
|
|
4
|
+
import MeganavSearchSuggestions from "./MeganavSearchSuggestions";
|
|
5
|
+
import MeganavSearchAutocomplete from "./MeganavSearchAutocomplete";
|
|
6
|
+
import { AbsUrl } from "./Meganav";
|
|
7
7
|
|
|
8
8
|
const MeganavSearchPanel = ({ absUrl }: { absUrl: AbsUrl }) => (
|
|
9
9
|
<section className="ui-meganav-content grid-cols-12">
|
|
Binary file
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
|
|
3
|
-
import FeaturedLink from "
|
|
4
|
-
import { AbsUrl } from "
|
|
3
|
+
import FeaturedLink from "./FeaturedLink";
|
|
4
|
+
import { AbsUrl } from "./Meganav";
|
|
5
5
|
|
|
6
6
|
type MeganavSearchSuggestionsProps = {
|
|
7
7
|
absUrl: AbsUrl;
|
|
Binary file
|
|
@@ -3,7 +3,7 @@ import Cookie from "js-cookie";
|
|
|
3
3
|
import throttle from "lodash.throttle";
|
|
4
4
|
|
|
5
5
|
import { queryId } from "../dom-query";
|
|
6
|
-
import { FLASH_DATA_ID } from "../Flash
|
|
6
|
+
import { FLASH_DATA_ID } from "../Flash";
|
|
7
7
|
|
|
8
8
|
const COOKIE_EXPIRY = 90;
|
|
9
9
|
const COLLAPSE_TRIGGER_DISTANCE = 5;
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import React, { ReactNode, useEffect } from "react";
|
|
2
2
|
|
|
3
|
-
import NoticeScripts from "./component.js";
|
|
4
|
-
import "./component.css";
|
|
5
|
-
import Icon from "
|
|
6
|
-
|
|
3
|
+
import NoticeScripts from "./Notice/component.js";
|
|
4
|
+
import "./Notice/component.css";
|
|
5
|
+
import Icon from "./Icon";
|
|
7
6
|
type ContentWrapperProps = {
|
|
8
7
|
buttonLink: string;
|
|
9
8
|
children: ReactNode;
|
|
Binary file
|
|
@@ -1,45 +1,98 @@
|
|
|
1
|
-
import React
|
|
2
|
-
import Slider from "
|
|
1
|
+
import React from "react";
|
|
2
|
+
import Slider from "../Slider";
|
|
3
|
+
import Icon from "../Icon";
|
|
3
4
|
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
5
|
+
const Slide = ({ name }: { name: string }) => (
|
|
6
|
+
<div className="relative ">
|
|
7
|
+
<div className="relative w-full sm:w-[560px] md:w-[784px] lg:w-[960px] bg-white overflow-hidden flex gap-40 rounded-3xl shadow-container-subtle">
|
|
8
|
+
<div className="w-full md:w-2/3 flex flex-col gap-24 pr-40 md:pr-0 pt-40 pl-40 pb-40 sm:pb-[120px] md:pb-40">
|
|
9
|
+
<h2 className="ui-text-h2 font-medium text-neutral-1000">
|
|
10
|
+
“Ably seamlessly absorbs sudden bursts in load during unexpected
|
|
11
|
+
client events. The integration was easy and we were live in under a
|
|
12
|
+
month.”
|
|
13
|
+
</h2>
|
|
14
|
+
<div className="flex flex-col sm:flex-row gap-32">
|
|
15
|
+
<div className="flex gap-8">
|
|
16
|
+
<div className="static self-center sm:absolute sm:-bottom-48 sm:-right-[56px] rounded-full bg-gradient-to-l from-neutral-200 to-50% to-neutral-500 w-[48px] h-[48px] sm:w-[201px] sm:h-[201px] md:w-[257px] md:h-[257px] lg:w-[280px] lg:h-[280px] overflow-hidden flex items-center justify-center sm:border-[16px] border-neutral-200">
|
|
17
|
+
<img src="https://picsum.photos/id/64/200" alt="test-image" />
|
|
18
|
+
</div>
|
|
19
|
+
<div className="sm:py-16">
|
|
20
|
+
<p className="ui-text-p1 text-neutral-1300">{name}</p>
|
|
21
|
+
<p className="ui-text-p3 text-neutral-800">
|
|
22
|
+
Co-Founder & Technical Leader
|
|
23
|
+
</p>
|
|
24
|
+
</div>
|
|
25
|
+
</div>
|
|
12
26
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
27
|
+
<div className="w-[80px] h-1 sm:w-1 sm:h-full bg-neutral-500"></div>
|
|
28
|
+
<div className="flex items-center gap-4">
|
|
29
|
+
<img src="https://picsum.photos/id/145/40" alt="test-image" />
|
|
30
|
+
<p className="ui-text-h4 font-bold">Mentimeter</p>
|
|
31
|
+
</div>
|
|
32
|
+
</div>
|
|
33
|
+
<a href="/case-study" className="ui-btn self-start">
|
|
34
|
+
Read case study
|
|
35
|
+
<Icon
|
|
36
|
+
name="icon-gui-arrow-right"
|
|
37
|
+
size="1.25rem"
|
|
38
|
+
additionalCSS="ml-4"
|
|
39
|
+
/>
|
|
40
|
+
</a>
|
|
41
|
+
</div>
|
|
42
|
+
</div>
|
|
43
|
+
|
|
44
|
+
<div className="absolute h-256 -z-10 -bottom-48 -left-36 w-1/5 rounded-full blur-xl opacity-50 transform -rotate-45 bg-gradient-to-bl from-bg-glow-green to-bg-glow-teal"></div>
|
|
45
|
+
<div className="absolute h-256 -z-10 -top-48 -right-48 w-3/5 rounded-full blur-xl opacity-50 transform rotate-12 bg-gradient-to-br from-bg-glow-green to-bg-glow-teal"></div>
|
|
16
46
|
</div>
|
|
17
47
|
);
|
|
18
48
|
|
|
19
49
|
const slides = [
|
|
20
|
-
<Slide key="1"
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
<Slide key="
|
|
24
|
-
Powers virtual venues for millions of event attendees around the world.
|
|
25
|
-
</Slide>,
|
|
26
|
-
<Slide key="3">
|
|
27
|
-
Provides 5 million daily users with live financial commentary and stock
|
|
28
|
-
tickers.
|
|
29
|
-
</Slide>,
|
|
30
|
-
<Slide key="4">Monitors live car performance data across the USA.</Slide>,
|
|
50
|
+
<Slide key="1" name={"Johan Bengtsson"} />,
|
|
51
|
+
<Slide key="2" name={"Mirko Bergman"} />,
|
|
52
|
+
<Slide key="3" name={"Stefania Lombardo"} />,
|
|
53
|
+
<Slide key="4" name={"Aleksandar Kostadinov"} />,
|
|
31
54
|
];
|
|
32
55
|
|
|
33
|
-
export
|
|
56
|
+
export default {
|
|
57
|
+
title: "Components/Slider",
|
|
58
|
+
component: Slider,
|
|
59
|
+
args: {
|
|
60
|
+
children: slides,
|
|
61
|
+
options: {
|
|
62
|
+
interval: 10000,
|
|
63
|
+
intervalIndicator: true,
|
|
64
|
+
controlPosition: "floating",
|
|
65
|
+
},
|
|
66
|
+
},
|
|
67
|
+
};
|
|
68
|
+
|
|
69
|
+
export const FloatingControlPosition = {
|
|
70
|
+
args: {
|
|
71
|
+
children: slides,
|
|
72
|
+
options: {
|
|
73
|
+
interval: 10000,
|
|
74
|
+
intervalIndicator: true,
|
|
75
|
+
controlPosition: "floating",
|
|
76
|
+
},
|
|
77
|
+
},
|
|
78
|
+
};
|
|
79
|
+
|
|
80
|
+
export const InlineControlPosition = {
|
|
34
81
|
args: {
|
|
35
|
-
|
|
82
|
+
options: {
|
|
83
|
+
interval: 10000,
|
|
84
|
+
intervalIndicator: true,
|
|
85
|
+
controlPosition: "inline",
|
|
86
|
+
},
|
|
36
87
|
},
|
|
37
88
|
};
|
|
38
89
|
|
|
39
|
-
export const
|
|
90
|
+
export const WithoutIntervalIndicator = {
|
|
40
91
|
args: {
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
92
|
+
options: {
|
|
93
|
+
interval: 10000,
|
|
94
|
+
intervalIndicator: false,
|
|
95
|
+
controlPosition: "floating",
|
|
96
|
+
},
|
|
44
97
|
},
|
|
45
98
|
};
|
|
@@ -4,3 +4,35 @@
|
|
|
4
4
|
|
|
5
5
|
@apply leading-none px-4 relative;
|
|
6
6
|
}
|
|
7
|
+
|
|
8
|
+
@keyframes fillAnimation {
|
|
9
|
+
0% {
|
|
10
|
+
width: 0%;
|
|
11
|
+
}
|
|
12
|
+
100% {
|
|
13
|
+
width: 100%;
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.ui-icon-cta {
|
|
18
|
+
@apply cursor-pointer overflow-hidden;
|
|
19
|
+
@apply rounded border-2 border-mid-grey hover:border-active-orange;
|
|
20
|
+
transition: all 0.4s;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
@screen sm {
|
|
24
|
+
.ui-icon-cta-left:hover .ui-icon-cta-holder {
|
|
25
|
+
transform: translateX(-120%);
|
|
26
|
+
}
|
|
27
|
+
.ui-icon-cta-right .ui-icon-cta-holder {
|
|
28
|
+
transform: translateX(-120%);
|
|
29
|
+
}
|
|
30
|
+
.ui-icon-cta-right:hover .ui-icon-cta-holder {
|
|
31
|
+
transform: translateX(0%);
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.ui-icon-cta-holder {
|
|
36
|
+
@apply w-full h-full;
|
|
37
|
+
transition: all 0.4s;
|
|
38
|
+
}
|
|
@@ -0,0 +1,193 @@
|
|
|
1
|
+
import React, { useState, useEffect, useRef, ReactNode } from "react";
|
|
2
|
+
import Icon from "./Icon";
|
|
3
|
+
import "./Slider/component.css";
|
|
4
|
+
|
|
5
|
+
interface SliderProps {
|
|
6
|
+
children: ReactNode[];
|
|
7
|
+
options?: {
|
|
8
|
+
interval?: number;
|
|
9
|
+
controlPosition?: "inline" | "floating";
|
|
10
|
+
intervalIndicator?: boolean;
|
|
11
|
+
};
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
interface SliderIndicatorProps {
|
|
15
|
+
numSlides: number;
|
|
16
|
+
activeIndex: number;
|
|
17
|
+
interval: number;
|
|
18
|
+
intervalIndicator?: boolean;
|
|
19
|
+
isInline?: boolean;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
const SlideIndicator = ({
|
|
23
|
+
numSlides,
|
|
24
|
+
activeIndex,
|
|
25
|
+
interval,
|
|
26
|
+
intervalIndicator,
|
|
27
|
+
isInline,
|
|
28
|
+
}: SliderIndicatorProps) => {
|
|
29
|
+
return (
|
|
30
|
+
<ul
|
|
31
|
+
className={`flex gap-4 left-1/2 ${
|
|
32
|
+
isInline ? "bottom-0" : "absolute -bottom-40 transform -translate-x-1/2"
|
|
33
|
+
}`}
|
|
34
|
+
>
|
|
35
|
+
{Array.from({ length: numSlides }, (_, i) =>
|
|
36
|
+
intervalIndicator ? (
|
|
37
|
+
<li
|
|
38
|
+
key={i}
|
|
39
|
+
className="relative w-40 h-4 mx-1 rounded-full bg-neutral-500"
|
|
40
|
+
>
|
|
41
|
+
{i === activeIndex && (
|
|
42
|
+
<span
|
|
43
|
+
className="absolute inset-0 rounded-full bg-active-orange"
|
|
44
|
+
style={{
|
|
45
|
+
animation: `fillAnimation ${interval}ms linear`,
|
|
46
|
+
}}
|
|
47
|
+
></span>
|
|
48
|
+
)}
|
|
49
|
+
</li>
|
|
50
|
+
) : (
|
|
51
|
+
<li key={i}>
|
|
52
|
+
<span
|
|
53
|
+
className={`ui-slider-marker ${
|
|
54
|
+
i === activeIndex ? "text-active-orange" : "text-cool-black"
|
|
55
|
+
}`}
|
|
56
|
+
data-id="slider-marker"
|
|
57
|
+
>
|
|
58
|
+
⬤
|
|
59
|
+
</span>
|
|
60
|
+
</li>
|
|
61
|
+
)
|
|
62
|
+
)}
|
|
63
|
+
</ul>
|
|
64
|
+
);
|
|
65
|
+
};
|
|
66
|
+
|
|
67
|
+
const Slider = ({ children, options }: SliderProps) => {
|
|
68
|
+
const [activeIndex, setActiveIndex] = useState(0);
|
|
69
|
+
const [touchStartX, setTouchStartX] = useState(0);
|
|
70
|
+
const [touchEndX, setTouchEndX] = useState(0);
|
|
71
|
+
const timerRef = useRef<NodeJS.Timeout | null>(null);
|
|
72
|
+
|
|
73
|
+
const isInline = options?.controlPosition === "inline";
|
|
74
|
+
|
|
75
|
+
const next = () => {
|
|
76
|
+
setActiveIndex((prevIndex) => (prevIndex + 1) % children.length);
|
|
77
|
+
resetInterval();
|
|
78
|
+
};
|
|
79
|
+
|
|
80
|
+
const prev = () => {
|
|
81
|
+
setActiveIndex((prevIndex) =>
|
|
82
|
+
prevIndex > 0 ? prevIndex - 1 : children.length - 1
|
|
83
|
+
);
|
|
84
|
+
resetInterval();
|
|
85
|
+
};
|
|
86
|
+
|
|
87
|
+
const resetInterval = () => {
|
|
88
|
+
if (timerRef.current) clearInterval(timerRef.current);
|
|
89
|
+
timerRef.current = setInterval(next, options?.interval ?? 10000);
|
|
90
|
+
};
|
|
91
|
+
|
|
92
|
+
const handleTouchStart = (e) => {
|
|
93
|
+
setTouchStartX(e.touches[0].clientX);
|
|
94
|
+
};
|
|
95
|
+
|
|
96
|
+
const handleTouchMove = (e) => {
|
|
97
|
+
setTouchEndX(e.touches[0].clientX);
|
|
98
|
+
};
|
|
99
|
+
|
|
100
|
+
const handleTouchEnd = () => {
|
|
101
|
+
if (touchStartX - touchEndX > 50) {
|
|
102
|
+
next();
|
|
103
|
+
}
|
|
104
|
+
if (touchStartX - touchEndX < -50) {
|
|
105
|
+
prev();
|
|
106
|
+
}
|
|
107
|
+
};
|
|
108
|
+
|
|
109
|
+
useEffect(() => {
|
|
110
|
+
resetInterval();
|
|
111
|
+
return () => {
|
|
112
|
+
if (timerRef.current) clearInterval(timerRef.current);
|
|
113
|
+
};
|
|
114
|
+
}, [children.length, options?.interval]);
|
|
115
|
+
|
|
116
|
+
return (
|
|
117
|
+
<div
|
|
118
|
+
className="relative"
|
|
119
|
+
onTouchStart={handleTouchStart}
|
|
120
|
+
onTouchMove={handleTouchMove}
|
|
121
|
+
onTouchEnd={handleTouchEnd}
|
|
122
|
+
>
|
|
123
|
+
<div className="overflow-hidden w-full py-40">
|
|
124
|
+
<div
|
|
125
|
+
className="flex items-center transition-transform ease-in-out duration-500"
|
|
126
|
+
style={{ transform: `translateX(-${activeIndex * 100}%)` }}
|
|
127
|
+
>
|
|
128
|
+
{children.map((child, index) => (
|
|
129
|
+
<div
|
|
130
|
+
key={index}
|
|
131
|
+
className="w-full flex-shrink-0 flex justify-center sm:px-60 transition-opacity ease-in delay-500 duration-500"
|
|
132
|
+
style={{
|
|
133
|
+
opacity: activeIndex === index ? 1 : 0.1,
|
|
134
|
+
}}
|
|
135
|
+
>
|
|
136
|
+
{child}
|
|
137
|
+
</div>
|
|
138
|
+
))}
|
|
139
|
+
</div>
|
|
140
|
+
</div>
|
|
141
|
+
|
|
142
|
+
<div
|
|
143
|
+
className={`flex items-center pointer-events-none ${
|
|
144
|
+
isInline
|
|
145
|
+
? "ui-standard-container justify-center gap-24"
|
|
146
|
+
: "sm:flex sm:absolute inset-0 justify-between"
|
|
147
|
+
}`}
|
|
148
|
+
>
|
|
149
|
+
<button
|
|
150
|
+
className={`${
|
|
151
|
+
isInline ? "w-32 h-32" : "hidden sm:flex w-48 h-48"
|
|
152
|
+
} pointer-events-auto rounded border border-mid-grey hover:border-active-orange flex justify-center items-center ui-icon-cta ui-icon-cta-left`}
|
|
153
|
+
onClick={prev}
|
|
154
|
+
>
|
|
155
|
+
<div className="ui-icon-cta-holder flex gap-4">
|
|
156
|
+
<div className="w-full h-full flex-shrink-0 flex items-center justify-center">
|
|
157
|
+
<Icon name="icon-gui-arrow-left" size="1.5rem" />
|
|
158
|
+
</div>
|
|
159
|
+
<div className="w-full h-full flex-shrink-0 flex items-center justify-center">
|
|
160
|
+
<Icon name="icon-gui-arrow-left" size="1.5rem" />
|
|
161
|
+
</div>
|
|
162
|
+
</div>
|
|
163
|
+
</button>
|
|
164
|
+
|
|
165
|
+
<SlideIndicator
|
|
166
|
+
numSlides={children.length}
|
|
167
|
+
activeIndex={activeIndex}
|
|
168
|
+
interval={options?.interval ?? 10000}
|
|
169
|
+
intervalIndicator={options?.intervalIndicator}
|
|
170
|
+
isInline={isInline}
|
|
171
|
+
/>
|
|
172
|
+
|
|
173
|
+
<button
|
|
174
|
+
className={`${
|
|
175
|
+
isInline ? "w-32 h-32" : "hidden sm:flex w-48 h-48"
|
|
176
|
+
} pointer-events-auto rounded border border-mid-grey hover:border-active-orange justify-center items-center ui-icon-cta ui-icon-cta-right`}
|
|
177
|
+
onClick={next}
|
|
178
|
+
>
|
|
179
|
+
<div className="ui-icon-cta-holder flex gap-4">
|
|
180
|
+
<div className="w-full h-full flex-shrink-0 flex items-center justify-center">
|
|
181
|
+
<Icon name="icon-gui-arrow-right" size="1.5rem" />
|
|
182
|
+
</div>
|
|
183
|
+
<div className="w-full h-full flex-shrink-0 flex items-center justify-center">
|
|
184
|
+
<Icon name="icon-gui-arrow-right" size="1.5rem" />
|
|
185
|
+
</div>
|
|
186
|
+
</div>
|
|
187
|
+
</button>
|
|
188
|
+
</div>
|
|
189
|
+
</div>
|
|
190
|
+
);
|
|
191
|
+
};
|
|
192
|
+
|
|
193
|
+
export default Slider;
|
|
Binary file
|
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 })}
|