@ably/ui 14.0.2-dev.7ec9557 → 14.0.3-dev.79f1214

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.
@@ -8,6 +8,8 @@
8
8
  box-shadow: 0px 24px 32px 0px #0000000d;
9
9
  border: 1px solid var(--color-mid-grey);
10
10
  border-left: 0.5rem solid var(--color-electric-cyan);
11
- transition: bottom 250ms ease-out, opacity 150ms ease-out;
11
+ transition:
12
+ bottom 250ms ease-out,
13
+ opacity 150ms ease-out;
12
14
  }
13
15
  }
@@ -8,7 +8,10 @@
8
8
 
9
9
  .ui-flash-message {
10
10
  @apply font-sans font-light antialiased max-w-screen-xl mx-auto mt-8 opacity-0 relative;
11
- transition: opacity 200ms, transform 200ms, height 200ms 200ms,
11
+ transition:
12
+ opacity 200ms,
13
+ transform 200ms,
14
+ height 200ms 200ms,
12
15
  margin-top 200ms 200ms;
13
16
  transform: translateY(-200%) rotateX(-90deg);
14
17
  }
@@ -1 +1 @@
1
- import React from"react";import SignOutLink from"./SignOutLink";import MeganavSearchSuggestions from"./MeganavSearchSuggestions";import Icon from"./Icon";import MeganavData from"./Meganav/component.json";import MeganavControlMobileDropdown from"./MeganavControlMobileDropdown";import MeganavControlMobilePanelClose from"./MeganavControlMobilePanelClose";import MeganavControlMobilePanelOpen from"./MeganavControlMobilePanelOpen";import MeganavSearchAutocomplete from"./MeganavSearchAutocomplete";const MeganavItemsMobile=({panels,paths,sessionState,theme,loginLink,absUrl})=>{const classNames=`ui-meganav-link ${theme.textColor}`;return React.createElement("ul",{className:"flex md:hidden","data-id":"meganav-items-mobile"},React.createElement("li",null,(sessionState===null||sessionState===void 0?void 0:sessionState.signedIn)&&(sessionState===null||sessionState===void 0?void 0:sessionState.logOut)?React.createElement(SignOutLink,{absUrl:absUrl,...sessionState.logOut},({text,href,onClick})=>React.createElement("a",{onClick:onClick,href:absUrl(href),className:classNames,"data-id":"meganav-link"},text)):React.createElement("a",{href:absUrl(loginLink),className:classNames,"data-id":"meganav-link"},"Login")),React.createElement("li",{className:"ui-meganav-item"},React.createElement(MeganavControlMobileDropdown,{theme:theme}),React.createElement("div",{className:"ui-meganav-mobile-dropdown invisible",id:"meganav-mobile-dropdown","data-id":"meganav-mobile-dropdown"},React.createElement("div",{className:"pt-24 pb-16 ui-grid-px bg-white"},React.createElement("form",{className:"mb-16",action:absUrl("/search"),method:"get"},React.createElement("div",{className:"relative w-full"},React.createElement(Icon,{name:"icon-gui-search",color:"text-cool-black",size:"1.5rem",additionalCSS:"absolute top-12 left-16 hover:text-gui-hover"}),React.createElement("button",{type:"button",className:"absolute top-12 right-16 p-0 focus:outline-gui-focus m-0 md:hidden invisible","data-id":"meganav-search-input-clear"},React.createElement(Icon,{name:"icon-gui-cross-circled-fill",color:"text-dark-grey",size:"1.5rem",additionalCSS:""})),React.createElement("input",{type:"search",name:"q",className:"ui-input px-48 h-48",style:{maxWidth:"none"},placeholder:"Search",autoComplete:"off","data-id":"meganav-mobile-search-input"}),React.createElement(MeganavSearchAutocomplete,null))),React.createElement("div",{className:"max-h-0 overflow-hidden transition-all","data-id":"meganav-mobile-search-suggestions"},React.createElement(MeganavSearchSuggestions,{absUrl:absUrl,displaySupportLink:false})),React.createElement("ul",{className:"mb-16","data-id":"meganav-mobile-panel-controls"},MeganavData.panels.map(panel=>{const PanelComponent=panels[panel.component];const displayHr=["company-panel","developers-panel"].includes(panel.id);return React.createElement("li",{className:"ui-meganav-mobile-item",key:`${panel.id}-mobile`},React.createElement(MeganavControlMobilePanelOpen,{ariaControls:`${panel.id}-mobile`},panel.label),React.createElement("div",{className:"ui-meganav-panel-mobile hidden",id:`${panel.id}-mobile`,"data-scroll-lock-scrollable":true},React.createElement(MeganavControlMobilePanelClose,{ariaControls:`${panel.id}-mobile`,displayHr:displayHr}),React.createElement(PanelComponent,{paths:paths,absUrl:absUrl})))}),React.createElement("li",null,React.createElement("a",{href:absUrl("/pricing"),className:"ui-meganav-mobile-link"},"Pricing"))),React.createElement("hr",{className:"ui-meganav-hr mb-20"}),React.createElement("div",{className:"flex justify-between items-center mb-16"},React.createElement("a",{href:absUrl("/contact"),className:"text-menu2 font-medium block ml-0 mr-8 lg:mx-12 p-0 hover:text-gui-hover focus:text-gui-focus focus:outline-none"},"Contact us"),(sessionState===null||sessionState===void 0?void 0:sessionState.signedIn)&&(sessionState===null||sessionState===void 0?void 0:sessionState.account)?React.createElement("a",{href:absUrl(sessionState.account.links.dashboard.href),className:"ui-btn-secondary"},"Dashboard"):React.createElement("a",{href:absUrl("/sign-up"),className:"ui-btn"},"Sign up free"))))))};export default React.memo(MeganavItemsMobile,(oldState,newState)=>{const{paths:pathsOld,theme:themeOld}=oldState;const{paths:pathsNew,theme:themeNew}=newState;return pathsOld===pathsNew&&themeOld===themeNew&&Object.keys(newState.sessionState||{}).length===0});
1
+ import React from"react";import SignOutLink from"./SignOutLink";import MeganavSearchSuggestions from"./MeganavSearchSuggestions";import Icon from"./Icon";import MeganavData from"./Meganav/component.json";import MeganavControlMobileDropdown from"./MeganavControlMobileDropdown";import MeganavControlMobilePanelClose from"./MeganavControlMobilePanelClose";import MeganavControlMobilePanelOpen from"./MeganavControlMobilePanelOpen";import MeganavSearchAutocomplete from"./MeganavSearchAutocomplete";const MeganavItemsMobile=({panels,paths,sessionState,theme,loginLink,absUrl})=>{const classNames=`ui-meganav-link ${theme.textColor}`;return React.createElement("ul",{className:"flex md:hidden items-center","data-id":"meganav-items-mobile"},React.createElement("li",null,(sessionState===null||sessionState===void 0?void 0:sessionState.signedIn)&&(sessionState===null||sessionState===void 0?void 0:sessionState.logOut)?React.createElement(SignOutLink,{absUrl:absUrl,...sessionState.logOut},({text,href,onClick})=>React.createElement("a",{onClick:onClick,href:absUrl(href),className:classNames,"data-id":"meganav-link"},text)):React.createElement("a",{href:absUrl(loginLink),className:classNames,"data-id":"meganav-link"},"Login")),React.createElement("li",{className:"ui-meganav-item"},React.createElement(MeganavControlMobileDropdown,{theme:theme}),React.createElement("div",{className:"ui-meganav-mobile-dropdown invisible",id:"meganav-mobile-dropdown","data-id":"meganav-mobile-dropdown"},React.createElement("div",{className:"pt-24 pb-16 ui-grid-px bg-white"},React.createElement("form",{className:"mb-16",action:absUrl("/search"),method:"get"},React.createElement("div",{className:"relative w-full"},React.createElement(Icon,{name:"icon-gui-search",color:"text-cool-black",size:"1.5rem",additionalCSS:"absolute top-12 left-16 hover:text-gui-hover"}),React.createElement("button",{type:"button",className:"absolute top-12 right-16 p-0 focus:outline-gui-focus m-0 md:hidden invisible","data-id":"meganav-search-input-clear"},React.createElement(Icon,{name:"icon-gui-cross-circled-fill",color:"text-dark-grey",size:"1.5rem",additionalCSS:""})),React.createElement("input",{type:"search",name:"q",className:"ui-input px-48 h-48",style:{maxWidth:"none"},placeholder:"Search",autoComplete:"off","data-id":"meganav-mobile-search-input"}),React.createElement(MeganavSearchAutocomplete,null))),React.createElement("div",{className:"max-h-0 overflow-hidden transition-all","data-id":"meganav-mobile-search-suggestions"},React.createElement(MeganavSearchSuggestions,{absUrl:absUrl,displaySupportLink:false})),React.createElement("ul",{className:"mb-16","data-id":"meganav-mobile-panel-controls"},MeganavData.panels.map(panel=>{const PanelComponent=panels[panel.component];const displayHr=["company-panel","developers-panel"].includes(panel.id);return React.createElement("li",{className:"ui-meganav-mobile-item",key:`${panel.id}-mobile`},React.createElement(MeganavControlMobilePanelOpen,{ariaControls:`${panel.id}-mobile`},panel.label),React.createElement("div",{className:"ui-meganav-panel-mobile hidden",id:`${panel.id}-mobile`,"data-scroll-lock-scrollable":true},React.createElement(MeganavControlMobilePanelClose,{ariaControls:`${panel.id}-mobile`,displayHr:displayHr}),React.createElement(PanelComponent,{paths:paths,absUrl:absUrl})))}),React.createElement("li",null,React.createElement("a",{href:absUrl("/pricing"),className:"ui-meganav-mobile-link"},"Pricing"))),React.createElement("hr",{className:"ui-meganav-hr mb-20"}),React.createElement("div",{className:"flex justify-between items-center mb-16"},React.createElement("a",{href:absUrl("/contact"),className:"text-menu2 font-medium block ml-0 mr-8 lg:mx-12 p-0 hover:text-gui-hover focus:text-gui-focus focus:outline-none"},"Contact us"),(sessionState===null||sessionState===void 0?void 0:sessionState.signedIn)&&(sessionState===null||sessionState===void 0?void 0:sessionState.account)?React.createElement("a",{href:absUrl(sessionState.account.links.dashboard.href),className:"ui-btn-secondary"},"Dashboard"):React.createElement("a",{href:absUrl("/sign-up"),className:"ui-btn"},"Sign up free"))))))};export default React.memo(MeganavItemsMobile,(oldState,newState)=>{const{paths:pathsOld,theme:themeOld}=oldState;const{paths:pathsNew,theme:themeNew}=newState;return pathsOld===pathsNew&&themeOld===themeNew&&Object.keys(newState.sessionState||{}).length===0});
@@ -23,10 +23,10 @@
23
23
 
24
24
  @screen sm {
25
25
  .ui-icon-cta-left:hover .ui-icon-cta-holder {
26
- transform: translateX(-120%);
26
+ transform: translateX(-100%);
27
27
  }
28
28
  .ui-icon-cta-right .ui-icon-cta-holder {
29
- transform: translateX(-120%);
29
+ transform: translateX(-100%);
30
30
  }
31
31
  .ui-icon-cta-right:hover .ui-icon-cta-holder {
32
32
  transform: translateX(0%);
package/core/Slider.js CHANGED
@@ -1 +1 @@
1
- import React,{useState,useEffect,useRef}from"react";import Icon from"./Icon";const SLIDE_TRANSITION_LENGTH=300;const SlideIndicator=({numSlides,activeIndex,interval,intervalIndicator,isInline})=>{return React.createElement("ul",{className:`flex gap-4 left-1/2 ${isInline?"bottom-0":"absolute bottom-0 transform -translate-x-1/2"}`},Array.from({length:numSlides},(_,i)=>intervalIndicator?React.createElement("li",{key:i,className:"relative w-40 h-4 mx-1 rounded-full bg-neutral-500"},i===activeIndex&&React.createElement("span",{className:"absolute inset-0 rounded-full bg-active-orange",style:{animation:`fillAnimation ${interval}ms linear`}})):React.createElement("li",{key:i},React.createElement("span",{className:`ui-slider-marker ${i===activeIndex?"text-active-orange":"text-cool-black"}`,"data-id":"slider-marker"},"⬤"))))};const setupSlides=(children,activeIndex)=>[children[activeIndex===0?children.length-1:activeIndex-1],children[activeIndex],children[activeIndex===children.length-1?0:activeIndex+1]];const Slider=({children,options})=>{const[activeIndex,setActiveIndex]=useState(0);const[touchStartX,setTouchStartX]=useState(0);const[touchEndX,setTouchEndX]=useState(0);const[slides,setSlides]=useState(setupSlides(children,activeIndex));const[translationCoefficient,setTranslationCoefficient]=useState(0);const timerRef=useRef(null);const[slideLock,setSlideLock]=useState(false);const isInline=(options===null||options===void 0?void 0:options.controlPosition)==="inline";const next=()=>{if(!slideLock){setActiveIndex(prevIndex=>(prevIndex+1)%children.length);setTranslationCoefficient(1);resetInterval();setSlideLock(true)}};const prev=()=>{if(!slideLock){setActiveIndex(prevIndex=>prevIndex>0?prevIndex-1:children.length-1);setTranslationCoefficient(-1);resetInterval();setSlideLock(true)}};const resetInterval=()=>{if(timerRef.current)clearInterval(timerRef.current);var _options_interval;timerRef.current=setInterval(next,(_options_interval=options===null||options===void 0?void 0:options.interval)!==null&&_options_interval!==void 0?_options_interval:1e4)};const handleTouchStart=e=>{setTouchStartX(e.touches[0].clientX)};const handleTouchMove=e=>{setTouchEndX(e.touches[0].clientX)};const handleTouchEnd=()=>{if(touchStartX-touchEndX>50){next()}if(touchStartX-touchEndX<-50){prev()}};useEffect(()=>{resetInterval();return()=>{if(timerRef.current)clearInterval(timerRef.current)}},[children.length,options===null||options===void 0?void 0:options.interval]);useEffect(()=>{setTimeout(()=>{setSlides(setupSlides(children,activeIndex));setTranslationCoefficient(0);setSlideLock(false)},SLIDE_TRANSITION_LENGTH)},[activeIndex]);var _options_interval;return React.createElement("div",{className:"relative",onTouchStart:handleTouchStart,onTouchMove:handleTouchMove,onTouchEnd:handleTouchEnd},React.createElement("div",{className:"overflow-y-visible overflow-x-clip w-full py-40"},React.createElement("div",{className:`flex items-center ${translationCoefficient!==0?`transition-transform ease-in-out duration-${SLIDE_TRANSITION_LENGTH}`:""} `,style:{transform:`translateX(-${(translationCoefficient+1)*100}%)`}},slides.map((child,index)=>React.createElement("div",{key:index,className:"w-full flex-shrink-0 flex justify-center sm:px-60"},child)))),React.createElement("div",{className:`flex items-center pointer-events-none ${isInline?"ui-standard-container justify-center gap-24 -mt-16":"sm:flex sm:absolute inset-0 justify-between"}`},React.createElement("button",{className:`${isInline?"w-32 h-32":"hidden sm:flex w-48 h-48"} pointer-events-auto rounded border border-mid-grey hover:border-active-orange flex justify-center items-center ui-icon-cta ui-icon-cta-left`,onClick:prev},React.createElement("div",{className:"ui-icon-cta-holder flex gap-4"},React.createElement("div",{className:"w-full h-full flex-shrink-0 flex items-center justify-center"},React.createElement(Icon,{name:"icon-gui-arrow-left",size:"1.5rem"})),React.createElement("div",{className:"w-full h-full flex-shrink-0 flex items-center justify-center"},React.createElement(Icon,{name:"icon-gui-arrow-left",size:"1.5rem"})))),React.createElement(SlideIndicator,{numSlides:children.length,activeIndex:activeIndex,interval:(_options_interval=options===null||options===void 0?void 0:options.interval)!==null&&_options_interval!==void 0?_options_interval:1e4,intervalIndicator:options===null||options===void 0?void 0:options.intervalIndicator,isInline:isInline}),React.createElement("button",{className:`${isInline?"w-32 h-32":"hidden sm:flex w-48 h-48"} pointer-events-auto rounded border border-mid-grey hover:border-active-orange justify-center items-center ui-icon-cta ui-icon-cta-right`,onClick:next},React.createElement("div",{className:"ui-icon-cta-holder flex gap-4"},React.createElement("div",{className:"w-full h-full flex-shrink-0 flex items-center justify-center"},React.createElement(Icon,{name:"icon-gui-arrow-right",size:"1.5rem"})),React.createElement("div",{className:"w-full h-full flex-shrink-0 flex items-center justify-center"},React.createElement(Icon,{name:"icon-gui-arrow-right",size:"1.5rem"}))))))};export default Slider;
1
+ import React,{useState,useEffect,useRef}from"react";import Icon from"./Icon";const SLIDE_TRANSITION_LENGTH=300;const SlideIndicator=({numSlides,activeIndex,interval,intervalIndicator,isInline})=>{return React.createElement("ul",{className:`flex gap-4 left-1/2 ${isInline?"bottom-0":"absolute bottom-0 transform -translate-x-1/2"}`},Array.from({length:numSlides},(_,i)=>intervalIndicator?React.createElement("li",{key:i,className:"relative w-40 h-4 mx-1 rounded-full bg-neutral-500"},i===activeIndex&&React.createElement("span",{className:"absolute inset-0 rounded-full bg-active-orange",style:{animation:`fillAnimation ${interval}ms linear`}})):React.createElement("li",{key:i},React.createElement("span",{className:`ui-slider-marker ${i===activeIndex?"text-active-orange":"text-cool-black"}`,"data-id":"slider-marker"},"⬤"))))};const setupSlides=(children,activeIndex)=>[children[activeIndex===0?children.length-1:activeIndex-1],children[activeIndex],children[activeIndex===children.length-1?0:activeIndex+1]];const Slider=({children,options})=>{const[activeIndex,setActiveIndex]=useState(0);const[touchStartX,setTouchStartX]=useState(0);const[touchEndX,setTouchEndX]=useState(0);const[slides,setSlides]=useState(setupSlides(children,activeIndex));const[translationCoefficient,setTranslationCoefficient]=useState(0);const timerRef=useRef(null);const[slideLock,setSlideLock]=useState(false);const isInline=(options===null||options===void 0?void 0:options.controlPosition)==="inline";const next=()=>{if(!slideLock){setActiveIndex(prevIndex=>(prevIndex+1)%children.length);setTranslationCoefficient(1);resetInterval();setSlideLock(true)}};const prev=()=>{if(!slideLock){setActiveIndex(prevIndex=>prevIndex>0?prevIndex-1:children.length-1);setTranslationCoefficient(-1);resetInterval();setSlideLock(true)}};const resetInterval=()=>{if(timerRef.current)clearInterval(timerRef.current);var _options_interval;timerRef.current=setInterval(next,(_options_interval=options===null||options===void 0?void 0:options.interval)!==null&&_options_interval!==void 0?_options_interval:1e4)};const handleTouchStart=e=>{setTouchStartX(e.touches[0].clientX)};const handleTouchMove=e=>{setTouchEndX(e.touches[0].clientX)};const handleTouchEnd=()=>{if(touchStartX-touchEndX>50){next()}if(touchStartX-touchEndX<-50){prev()}};useEffect(()=>{resetInterval();return()=>{if(timerRef.current)clearInterval(timerRef.current)}},[children.length,options===null||options===void 0?void 0:options.interval]);useEffect(()=>{setTimeout(()=>{setSlides(setupSlides(children,activeIndex));setTranslationCoefficient(0);setSlideLock(false)},SLIDE_TRANSITION_LENGTH)},[activeIndex]);var _options_interval;return React.createElement("div",{className:"relative",onTouchStart:handleTouchStart,onTouchMove:handleTouchMove,onTouchEnd:handleTouchEnd},React.createElement("div",{className:"overflow-y-visible overflow-x-clip w-full py-40"},React.createElement("div",{className:`flex items-center ${translationCoefficient!==0?`transition-transform ease-in-out duration-${SLIDE_TRANSITION_LENGTH}`:""} `,style:{transform:`translateX(-${(translationCoefficient+1)*100}%)`}},slides.map((child,index)=>React.createElement("div",{key:index,className:"w-full flex-shrink-0 flex justify-center sm:px-60"},child)))),React.createElement("div",{className:`flex items-center pointer-events-none ${isInline?"ui-standard-container justify-center gap-24 -mt-16":"sm:flex sm:absolute inset-0 justify-between"}`},React.createElement("button",{className:`${isInline?"w-32 h-32":"hidden sm:flex w-48 h-48"} pointer-events-auto rounded border border-mid-grey hover:border-active-orange flex justify-center items-center ui-icon-cta ui-icon-cta-left`,onClick:prev},React.createElement("div",{className:"ui-icon-cta-holder flex w-48"},React.createElement("div",{className:"w-full h-full flex-shrink-0 flex items-center justify-center"},React.createElement(Icon,{name:"icon-gui-arrow-left",size:"1.5rem"})),React.createElement("div",{className:"w-full h-full flex-shrink-0 flex items-center justify-center"},React.createElement(Icon,{name:"icon-gui-arrow-left",size:"1.5rem"})))),React.createElement(SlideIndicator,{numSlides:children.length,activeIndex:activeIndex,interval:(_options_interval=options===null||options===void 0?void 0:options.interval)!==null&&_options_interval!==void 0?_options_interval:1e4,intervalIndicator:options===null||options===void 0?void 0:options.intervalIndicator,isInline:isInline}),React.createElement("button",{className:`${isInline?"w-32 h-32":"hidden sm:flex w-48 h-48"} pointer-events-auto rounded border border-mid-grey hover:border-active-orange justify-center items-center ui-icon-cta ui-icon-cta-right`,onClick:next},React.createElement("div",{className:"ui-icon-cta-holder flex w-48"},React.createElement("div",{className:"w-full h-full flex-shrink-0 flex items-center justify-center"},React.createElement(Icon,{name:"icon-gui-arrow-right",size:"1.5rem"})),React.createElement("div",{className:"w-full h-full flex-shrink-0 flex items-center justify-center"},React.createElement(Icon,{name:"icon-gui-arrow-right",size:"1.5rem"}))))))};export default Slider;
@@ -21,7 +21,8 @@
21
21
  @font-face {
22
22
  font-family: "NEXT Book";
23
23
  src: url("NEXT-Book-Light.eot");
24
- src: url("NEXT-Book-Light.eot?#iefix") format("embedded-opentype"),
24
+ src:
25
+ url("NEXT-Book-Light.eot?#iefix") format("embedded-opentype"),
25
26
  url("NEXT-Book-Light.woff2") format("woff2"),
26
27
  url("NEXT-Book-Light.woff") format("woff");
27
28
  font-weight: 300;
@@ -31,7 +32,8 @@
31
32
  @font-face {
32
33
  font-family: "NEXT Book";
33
34
  src: url("NEXT-Book-Light-Italic.eot");
34
- src: url("NEXT-Book-Light-Italic.eot?#iefix") format("embedded-opentype"),
35
+ src:
36
+ url("NEXT-Book-Light-Italic.eot?#iefix") format("embedded-opentype"),
35
37
  url("NEXT-Book-Light-Italic.woff2") format("woff2"),
36
38
  url("NEXT-Book-Light-Italic.woff") format("woff");
37
39
  font-weight: 300;
@@ -41,7 +43,8 @@
41
43
  @font-face {
42
44
  font-family: "NEXT Book";
43
45
  src: url("NEXT-Book-Medium.eot");
44
- src: url("NEXT-Book-Medium.eot?#iefix") format("embedded-opentype"),
46
+ src:
47
+ url("NEXT-Book-Medium.eot?#iefix") format("embedded-opentype"),
45
48
  url("NEXT-Book-Medium.woff2") format("woff2"),
46
49
  url("NEXT-Book-Medium.woff") format("woff");
47
50
  font-weight: 500;
@@ -51,7 +54,8 @@
51
54
  @font-face {
52
55
  font-family: "NEXT Book";
53
56
  src: url("NEXT-Book-Medium-Italic.eot");
54
- src: url("NEXT-Book-Medium-Italic.eot?#iefix") format("embedded-opentype"),
57
+ src:
58
+ url("NEXT-Book-Medium-Italic.eot?#iefix") format("embedded-opentype"),
55
59
  url("NEXT-Book-Medium-Italic.woff2") format("woff2"),
56
60
  url("NEXT-Book-Medium-Italic.woff") format("woff");
57
61
  font-weight: 500;
@@ -32,4 +32,12 @@
32
32
  margin-left: 3px;
33
33
  font-size: 8px;
34
34
  }
35
+
36
+ .ui-spacing {
37
+ @apply py-80 sm:py-96 md:py-128;
38
+ }
39
+
40
+ hr.ui-spacing {
41
+ @apply py-40 sm:py-48 md:py-64;
42
+ }
35
43
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ably/ui",
3
- "version": "14.0.2-dev.7ec9557",
3
+ "version": "14.0.3-dev.79f1214",
4
4
  "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
5
  "repository": {
6
6
  "type": "git",
@@ -15,14 +15,15 @@
15
15
  "tailwind.extend.js"
16
16
  ],
17
17
  "devDependencies": {
18
+ "@chromatic-com/storybook": "^1",
18
19
  "@mrtkrcm/cypress-plugin-snapshots": "https://github.com/mrtkrcm/cypress-plugin-snapshots#v1.13.0",
19
- "@storybook/addon-essentials": "^7.6.17",
20
- "@storybook/addon-interactions": "^7.6.17",
21
- "@storybook/addon-links": "^7.6.17",
22
- "@storybook/blocks": "^7.6.17",
23
- "@storybook/react": "^7.6.17",
24
- "@storybook/react-vite": "^7.6.17",
25
- "@storybook/test": "^7.6.4",
20
+ "@storybook/addon-essentials": "^8.1.4",
21
+ "@storybook/addon-interactions": "^8.1.4",
22
+ "@storybook/addon-links": "^8.1.4",
23
+ "@storybook/blocks": "^8.1.4",
24
+ "@storybook/react": "^8.1.4",
25
+ "@storybook/react-vite": "^8.1.4",
26
+ "@storybook/test": "^8.1.4",
26
27
  "@swc/cli": "^0.3.10",
27
28
  "@swc/core": "^1.4.11",
28
29
  "@typescript-eslint/eslint-plugin": "^6.21.0",
@@ -31,18 +32,18 @@
31
32
  "autoprefixer": "^10.0.2",
32
33
  "cypress": "^13.3.1",
33
34
  "eslint": "^7.12.1",
34
- "eslint-config-prettier": "^6.15.0",
35
- "eslint-plugin-cypress": "^2.11.2",
35
+ "eslint-config-prettier": "^9.1.0",
36
+ "eslint-plugin-cypress": "^3.2.0",
36
37
  "eslint-plugin-react": "^7.21.5",
37
- "eslint-plugin-storybook": "^0.6.15",
38
- "msw": "1.3.2",
39
- "msw-storybook-addon": "^1.10.0",
40
- "prettier": "^2.3.0",
41
- "storybook": "^7.6.4",
38
+ "eslint-plugin-storybook": "^0.8.0",
39
+ "msw": "2.3.1",
40
+ "msw-storybook-addon": "^2.0.2",
41
+ "prettier": "^3.2.5",
42
+ "storybook": "^8.1.4",
42
43
  "svg-sprite": "^2.0.4",
43
44
  "tailwindcss": "^3.3.6",
44
45
  "typescript": "5.3.3",
45
- "vite": "^4.5.2"
46
+ "vite": "^5.2.12"
46
47
  },
47
48
  "scripts": {
48
49
  "build:prebuild": "rm -rf core reset",
@@ -60,16 +61,16 @@
60
61
  "pre-release": "./scripts/pre-release.sh",
61
62
  "release": "./scripts/release.sh",
62
63
  "start": "vite --port 5000",
63
- "storybook": "yarn build && storybook dev -p 6006 --no-version-updates",
64
+ "storybook": "yarn build && storybook dev -p 6006",
64
65
  "build-storybook": "yarn build && storybook build -o preview"
65
66
  },
66
67
  "dependencies": {
67
- "addsearch-js-client": "^0.7.0",
68
+ "addsearch-js-client": "^0.8.11",
68
69
  "array-flat-polyfill": "^1.0.1",
69
- "dompurify": "^2.2.9",
70
- "highlight.js": "^10.7.2",
70
+ "dompurify": "^3.1.4",
71
+ "highlight.js": "^11.9.0",
71
72
  "highlightjs-curl": "^1.3.0",
72
- "js-cookie": "^2.2.1",
73
+ "js-cookie": "^3.0.5",
73
74
  "lodash.throttle": "^4.1.1",
74
75
  "nanoid": "^4.0.0",
75
76
  "react": "^18.2.0",
@@ -1,9 +1,19 @@
1
1
  /* Reset based on https://unpkg.com/tailwindcss@1.9.6/dist/base.css */
2
2
  @layer base {
3
3
  html {
4
- font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
5
- Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif,
6
- "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol",
4
+ font-family:
5
+ system-ui,
6
+ -apple-system,
7
+ BlinkMacSystemFont,
8
+ "Segoe UI",
9
+ Roboto,
10
+ "Helvetica Neue",
11
+ Arial,
12
+ "Noto Sans",
13
+ sans-serif,
14
+ "Apple Color Emoji",
15
+ "Segoe UI Emoji",
16
+ "Segoe UI Symbol",
7
17
  "Noto Color Emoji";
8
18
  line-height: 1.5;
9
19
  }
@@ -118,7 +118,7 @@ const Accordion = ({
118
118
  setActiveIndexes(
119
119
  currentIndexIsActive
120
120
  ? activeIndexes.filter((i) => i !== index)
121
- : [...activeIndexes, index]
121
+ : [...activeIndexes, index],
122
122
  );
123
123
  }
124
124
  };
@@ -22,7 +22,7 @@ const ConnectStateWrapper = (Component, selectors) => {
22
22
  const store = getRemoteDataStore();
23
23
  const resolvedState = Object.keys(selectors).reduce(
24
24
  (acc, key) => ({ ...acc, [key]: selectors[key](store) }),
25
- {}
25
+ {},
26
26
  );
27
27
 
28
28
  // Set initial state
@@ -8,6 +8,8 @@
8
8
  box-shadow: 0px 24px 32px 0px #0000000d;
9
9
  border: 1px solid var(--color-mid-grey);
10
10
  border-left: 0.5rem solid var(--color-electric-cyan);
11
- transition: bottom 250ms ease-out, opacity 150ms ease-out;
11
+ transition:
12
+ bottom 250ms ease-out,
13
+ opacity 150ms ease-out;
12
14
  }
13
15
  }
@@ -58,7 +58,7 @@ const FeaturedLink = ({
58
58
  {
59
59
  "--featured-link-icon-size": `var(${textSize.replace(
60
60
  "text",
61
- "--fs"
61
+ "--fs",
62
62
  )})`,
63
63
  } as CSSProperties
64
64
  }
@@ -8,7 +8,10 @@
8
8
 
9
9
  .ui-flash-message {
10
10
  @apply font-sans font-light antialiased max-w-screen-xl mx-auto mt-8 opacity-0 relative;
11
- transition: opacity 200ms, transform 200ms, height 200ms 200ms,
11
+ transition:
12
+ opacity 200ms,
13
+ transform 200ms,
14
+ height 200ms 200ms,
12
15
  margin-top 200ms 200ms;
13
16
  transform: translateY(-200%) rotateX(-90deg);
14
17
  }
@@ -1,5 +1,5 @@
1
1
  import React, { useEffect } from "react";
2
- import { rest } from "msw";
2
+ import { http, HttpResponse } from "msw";
3
3
 
4
4
  import Meganav from "../Meganav";
5
5
  import loadIcons from "../icons.js";
@@ -23,13 +23,13 @@ export default {
23
23
  component: Meganav,
24
24
  parameters: {
25
25
  layout: "fullscreen",
26
- msw: [
27
- rest.get("/api/me", (_req, res, ctx) => {
28
- return res(ctx.json({}));
29
- }),
30
- rest.get("/api/blog", (_req, res, ctx) => {
31
- return res(
32
- ctx.json([
26
+ msw: {
27
+ handlers: [
28
+ http.get("/api/me", () => {
29
+ return HttpResponse.json({});
30
+ }),
31
+ http.get("/api/blog", () => {
32
+ return HttpResponse.json([
33
33
  {
34
34
  title: "Achieving exactly-once delivery with Ably",
35
35
  link: "https://ably.com/blog/achieving-exactly-once-message-processing-with-ably",
@@ -46,10 +46,10 @@ export default {
46
46
  link: "https://ably.com/blog/beam-optimization-mqtt",
47
47
  pubDate: "Jul 17, 2020",
48
48
  },
49
- ])
50
- );
51
- }),
52
- ],
49
+ ]);
50
+ }),
51
+ ],
52
+ },
53
53
  },
54
54
  };
55
55
 
@@ -57,7 +57,7 @@ attachStoreToWindow(
57
57
  createRemoteDataStore({
58
58
  ...reducerBlogPosts,
59
59
  ...reducerSessionData,
60
- })
60
+ }),
61
61
  );
62
62
 
63
63
  const Page = () => {
@@ -46,10 +46,10 @@ const documentScroll = (themeName) => {
46
46
  const meganav = queryId("meganav");
47
47
  const navItems = queryIdAll("meganav-link");
48
48
  const controlMobileDropdownMenu = queryId(
49
- "meganav-control-mobile-dropdown-menu"
49
+ "meganav-control-mobile-dropdown-menu",
50
50
  );
51
51
  const controlMobileDropdownClose = queryId(
52
- "meganav-control-mobile-dropdown-close"
52
+ "meganav-control-mobile-dropdown-close",
53
53
  );
54
54
  const controls = queryIdAll("meganav-control");
55
55
  const signUpBtn = queryId("meganav-sign-up-btn");
@@ -90,7 +90,7 @@ const documentScroll = (themeName) => {
90
90
  invertMobleDropdownColor(true);
91
91
 
92
92
  invertTextCollection.forEach((n) =>
93
- n.classList.replace("text-white", "text-cool-black")
93
+ n.classList.replace("text-white", "text-cool-black"),
94
94
  );
95
95
  } else {
96
96
  meganav.classList.replace("bg-white", "bg-transparent");
@@ -98,7 +98,7 @@ const documentScroll = (themeName) => {
98
98
  invertMobleDropdownColor(false);
99
99
 
100
100
  invertTextCollection.forEach((n) =>
101
- n.classList.replace("text-cool-black", "text-white")
101
+ n.classList.replace("text-cool-black", "text-white"),
102
102
  );
103
103
  }
104
104
  }, 150);
@@ -111,7 +111,7 @@ const documentScroll = (themeName) => {
111
111
  };
112
112
 
113
113
  export default function Meganav(
114
- { themeName, addSearchApiKey } = { themeName: null }
114
+ { themeName, addSearchApiKey } = { themeName: null },
115
115
  ) {
116
116
  const controls = MeganavControl();
117
117
  const panelOpenControls = MobilePanelOpenClick();
@@ -4,7 +4,7 @@ import { connectState } from "../remote-data-store";
4
4
 
5
5
  const template = ({ link, title, pubDate }) => {
6
6
  const [li, a, heading, copy] = ["li", "a", "p", "p"].map((el) =>
7
- document.createElement(el)
7
+ document.createElement(el),
8
8
  );
9
9
 
10
10
  a.href = link;
@@ -36,7 +36,7 @@ export default () => {
36
36
  });
37
37
 
38
38
  Array.from(sections).forEach((section) =>
39
- section.classList.remove("hidden")
39
+ section.classList.remove("hidden"),
40
40
  );
41
41
  }
42
42
  });
@@ -4,19 +4,19 @@ const MeganavControl = () => {
4
4
  const controls = Array.from(queryIdAll("meganav-control"));
5
5
  const panels = Array.from(queryIdAll("meganav-panel"));
6
6
  const mdBreakpoint = getComputedStyle(
7
- document.documentElement
7
+ document.documentElement,
8
8
  ).getPropertyValue("--bp-md");
9
9
 
10
10
  const hoverEnabled = () =>
11
11
  window.matchMedia(
12
- `(hover: hover) and (pointer: fine) and (min-width: ${mdBreakpoint})`
12
+ `(hover: hover) and (pointer: fine) and (min-width: ${mdBreakpoint})`,
13
13
  ).matches;
14
14
 
15
15
  const isSearchControl = (node) => node.dataset.control === "search";
16
16
 
17
17
  const isSearchPanelOpen = () => {
18
18
  const searchPanel = document.querySelector(
19
- '[data-id="meganav-panel"]#panel-search'
19
+ '[data-id="meganav-panel"]#panel-search',
20
20
  );
21
21
  if (!searchPanel) return;
22
22
  return !searchPanel.classList.contains("invisible");
@@ -42,11 +42,12 @@ const MeganavControl = () => {
42
42
 
43
43
  const clickHandler = (control, panel) => () => {
44
44
  controls.forEach(
45
- (node) => node !== control && node.setAttribute("aria-expanded", false)
45
+ (node) => node !== control && node.setAttribute("aria-expanded", false),
46
46
  );
47
47
 
48
48
  panels.forEach(
49
- (node) => node !== panel && node.classList.replace("visible", "invisible")
49
+ (node) =>
50
+ node !== panel && node.classList.replace("visible", "invisible"),
50
51
  );
51
52
 
52
53
  const ariaExpanded = control.getAttribute("aria-expanded");
@@ -79,7 +80,7 @@ const MeganavControl = () => {
79
80
  .map((control) => {
80
81
  const item = control.parentNode;
81
82
  const panel = document.querySelector(
82
- `#${control.getAttribute("aria-controls")}`
83
+ `#${control.getAttribute("aria-controls")}`,
83
84
  );
84
85
  const click = clickHandler(control, panel);
85
86
  control.addEventListener("click", click);
@@ -2,10 +2,10 @@ import { queryIdAll } from "../dom-query";
2
2
 
3
3
  export default () => {
4
4
  const closeControls = Array.from(
5
- queryIdAll("meganav-control-mobile-panel-close")
5
+ queryIdAll("meganav-control-mobile-panel-close"),
6
6
  );
7
7
  const openControls = Array.from(
8
- queryIdAll("meganav-control-mobile-panel-open")
8
+ queryIdAll("meganav-control-mobile-panel-open"),
9
9
  );
10
10
 
11
11
  const clickHandler = (btn, openBtn, panel) => () => {
@@ -18,10 +18,11 @@ export default () => {
18
18
  return closeControls.map((btn) => {
19
19
  const openBtn = openControls.find(
20
20
  (open) =>
21
- open.getAttribute("aria-controls") === btn.getAttribute("aria-controls")
21
+ open.getAttribute("aria-controls") ===
22
+ btn.getAttribute("aria-controls"),
22
23
  );
23
24
  const panel = document.querySelector(
24
- `#${btn.getAttribute("aria-controls")}`
25
+ `#${btn.getAttribute("aria-controls")}`,
25
26
  );
26
27
  const handler = clickHandler(btn, openBtn, panel);
27
28
 
@@ -3,18 +3,18 @@ import { remsToPixelValue } from "../css";
3
3
 
4
4
  export default () => {
5
5
  const closeControls = Array.from(
6
- queryIdAll("meganav-control-mobile-panel-close")
6
+ queryIdAll("meganav-control-mobile-panel-close"),
7
7
  );
8
8
  const openControls = Array.from(
9
- queryIdAll("meganav-control-mobile-panel-open")
9
+ queryIdAll("meganav-control-mobile-panel-open"),
10
10
  );
11
11
  const dropdown = queryId("meganav-mobile-dropdown");
12
12
 
13
13
  // Height is defined in rem's so to get the pixel value we need to find the fontSize on root
14
14
  const meganavHeight = remsToPixelValue(
15
15
  getComputedStyle(document.documentElement).getPropertyValue(
16
- "--ui-meganav-height"
17
- )
16
+ "--ui-meganav-height",
17
+ ),
18
18
  );
19
19
 
20
20
  const clickHandler = (btn, closeBtn, panel) => () => {
@@ -36,10 +36,11 @@ export default () => {
36
36
  return openControls.map((btn) => {
37
37
  const closeBtn = closeControls.find(
38
38
  (node) =>
39
- node.getAttribute("aria-controls") === btn.getAttribute("aria-controls")
39
+ node.getAttribute("aria-controls") ===
40
+ btn.getAttribute("aria-controls"),
40
41
  );
41
42
  const panel = document.querySelector(
42
- `#${btn.getAttribute("aria-controls")}`
43
+ `#${btn.getAttribute("aria-controls")}`,
43
44
  );
44
45
  const handler = clickHandler(btn, closeBtn, panel);
45
46
 
@@ -37,7 +37,7 @@ const MeganavItemsMobile = ({
37
37
  const classNames = `ui-meganav-link ${theme.textColor}`;
38
38
 
39
39
  return (
40
- <ul className="flex md:hidden" data-id="meganav-items-mobile">
40
+ <ul className="flex md:hidden items-center" data-id="meganav-items-mobile">
41
41
  <li>
42
42
  {sessionState?.signedIn && sessionState?.logOut ? (
43
43
  <SignOutLink absUrl={absUrl} {...sessionState.logOut}>
@@ -24,7 +24,7 @@ const MeganavItemsSignedIn = ({
24
24
  }: MeganavItemsSignedIn) => {
25
25
  const links = sessionState.account
26
26
  ? Object.keys(sessionState.account.links).map(
27
- (key) => sessionState.account.links[key]
27
+ (key) => sessionState.account.links[key],
28
28
  )
29
29
  : [];
30
30
  const accountName = truncate(sessionState.accountName, 20);
@@ -21,7 +21,7 @@ const init = ({ input, container, listContainer, clear, client }) => {
21
21
  const markQueryInSuggestion = (suggestionValue, query) => {
22
22
  return suggestionValue.replace(
23
23
  query.toLowerCase(),
24
- `<span class="font-light">${query}</span>`
24
+ `<span class="font-light">${query}</span>`,
25
25
  );
26
26
  };
27
27
 
@@ -29,7 +29,7 @@ const init = ({ input, container, listContainer, clear, client }) => {
29
29
 
30
30
  const focusNext = (index) => {
31
31
  const nextSuggestion = listContainer.querySelector(
32
- `[data-suggestion-index="${index + 1}"]`
32
+ `[data-suggestion-index="${index + 1}"]`,
33
33
  );
34
34
  if (!nextSuggestion) return;
35
35
  nextSuggestion.focus();
@@ -39,7 +39,7 @@ const init = ({ input, container, listContainer, clear, client }) => {
39
39
  const previousIndex = index - 1;
40
40
 
41
41
  const previousSuggestion = listContainer.querySelector(
42
- `[data-suggestion-index="${previousIndex}"]`
42
+ `[data-suggestion-index="${previousIndex}"]`,
43
43
  );
44
44
  if (!previousSuggestion) return;
45
45
  previousSuggestion.focus();
@@ -76,7 +76,7 @@ const init = ({ input, container, listContainer, clear, client }) => {
76
76
  "rounded",
77
77
  "hover:text-gui-hover",
78
78
  "focus:outline-gui-focus",
79
- "hover:bg-light-grey"
79
+ "hover:bg-light-grey",
80
80
  );
81
81
 
82
82
  button.innerHTML = markQueryInSuggestion(suggestion.value, query);
@@ -167,7 +167,7 @@ export default (apiKey) => {
167
167
  const parent = input.parentNode;
168
168
  const container = queryId(
169
169
  "meganav-search-autocomplete-container",
170
- parent
170
+ parent,
171
171
  );
172
172
  const listContainer = queryId("meganav-search-autocomplete-list", parent);
173
173
  const clear = queryId("meganav-search-input-clear", parent);
@@ -84,7 +84,7 @@ const setupCloseBtn = (
84
84
  bannerContainer,
85
85
  cookieId,
86
86
  noticeId,
87
- collapseUnmountListeners
87
+ collapseUnmountListeners,
88
88
  ) => {
89
89
  const closeBtn = bannerContainer.querySelector("button");
90
90
 
@@ -117,7 +117,7 @@ const Notice = ({ bannerContainer, cookieId, noticeId, options }) => {
117
117
 
118
118
  if (!bannerContainer) {
119
119
  console.warn(
120
- "A Notice component was initited but no notice container was found."
120
+ "A Notice component was initited but no notice container was found.",
121
121
  );
122
122
  return () => {};
123
123
  }
@@ -137,7 +137,7 @@ const Notice = ({ bannerContainer, cookieId, noticeId, options }) => {
137
137
  bannerContainer,
138
138
  cookieId,
139
139
  noticeId,
140
- collapseUnmountListeners
140
+ collapseUnmountListeners,
141
141
  );
142
142
 
143
143
  const resizeUnmountListener = resizeHandler(bannerContainer);
@@ -23,10 +23,10 @@
23
23
 
24
24
  @screen sm {
25
25
  .ui-icon-cta-left:hover .ui-icon-cta-holder {
26
- transform: translateX(-120%);
26
+ transform: translateX(-100%);
27
27
  }
28
28
  .ui-icon-cta-right .ui-icon-cta-holder {
29
- transform: translateX(-120%);
29
+ transform: translateX(-100%);
30
30
  }
31
31
  .ui-icon-cta-right:hover .ui-icon-cta-holder {
32
32
  transform: translateX(0%);
@@ -31,12 +31,12 @@ const init = (slidesContainer) => {
31
31
 
32
32
  const updateSlide = (index) =>
33
33
  (transformContainer.style.transform = `translateX(${calculateTransform(
34
- index
34
+ index,
35
35
  )}px)`);
36
36
 
37
37
  const updateMarkers = (index) => {
38
38
  slideMarkers.forEach((marker) =>
39
- marker.classList.remove("text-active-orange")
39
+ marker.classList.remove("text-active-orange"),
40
40
  );
41
41
  slideMarkers[index].classList.remove("text-cool-black");
42
42
  slideMarkers[index].classList.add("text-active-orange");
@@ -98,7 +98,7 @@ const Slider = ({ container, mqEnableThreshold }) => {
98
98
  } else {
99
99
  unmount();
100
100
  }
101
- }, 100)
101
+ }, 100),
102
102
  );
103
103
  };
104
104
 
@@ -59,7 +59,7 @@ const SlideIndicator = ({
59
59
  &#x2b24;
60
60
  </span>
61
61
  </li>
62
- )
62
+ ),
63
63
  )}
64
64
  </ul>
65
65
  );
@@ -76,7 +76,7 @@ const Slider = ({ children, options }: SliderProps) => {
76
76
  const [touchStartX, setTouchStartX] = useState(0);
77
77
  const [touchEndX, setTouchEndX] = useState(0);
78
78
  const [slides, setSlides] = useState<ReactNode[]>(
79
- setupSlides(children, activeIndex)
79
+ setupSlides(children, activeIndex),
80
80
  );
81
81
  const [translationCoefficient, setTranslationCoefficient] = useState(0);
82
82
  const timerRef = useRef<NodeJS.Timeout | null>(null);
@@ -96,7 +96,7 @@ const Slider = ({ children, options }: SliderProps) => {
96
96
  const prev = () => {
97
97
  if (!slideLock) {
98
98
  setActiveIndex((prevIndex) =>
99
- prevIndex > 0 ? prevIndex - 1 : children.length - 1
99
+ prevIndex > 0 ? prevIndex - 1 : children.length - 1,
100
100
  );
101
101
  setTranslationCoefficient(-1);
102
102
  resetInterval();
@@ -183,7 +183,7 @@ const Slider = ({ children, options }: SliderProps) => {
183
183
  } pointer-events-auto rounded border border-mid-grey hover:border-active-orange flex justify-center items-center ui-icon-cta ui-icon-cta-left`}
184
184
  onClick={prev}
185
185
  >
186
- <div className="ui-icon-cta-holder flex gap-4">
186
+ <div className="ui-icon-cta-holder flex w-48">
187
187
  <div className="w-full h-full flex-shrink-0 flex items-center justify-center">
188
188
  <Icon name="icon-gui-arrow-left" size="1.5rem" />
189
189
  </div>
@@ -207,7 +207,7 @@ const Slider = ({ children, options }: SliderProps) => {
207
207
  } pointer-events-auto rounded border border-mid-grey hover:border-active-orange justify-center items-center ui-icon-cta ui-icon-cta-right`}
208
208
  onClick={next}
209
209
  >
210
- <div className="ui-icon-cta-holder flex gap-4">
210
+ <div className="ui-icon-cta-holder flex w-48">
211
211
  <div className="w-full h-full flex-shrink-0 flex items-center justify-center">
212
212
  <Icon name="icon-gui-arrow-right" size="1.5rem" />
213
213
  </div>
@@ -21,7 +21,8 @@
21
21
  @font-face {
22
22
  font-family: "NEXT Book";
23
23
  src: url("NEXT-Book-Light.eot");
24
- src: url("NEXT-Book-Light.eot?#iefix") format("embedded-opentype"),
24
+ src:
25
+ url("NEXT-Book-Light.eot?#iefix") format("embedded-opentype"),
25
26
  url("NEXT-Book-Light.woff2") format("woff2"),
26
27
  url("NEXT-Book-Light.woff") format("woff");
27
28
  font-weight: 300;
@@ -31,7 +32,8 @@
31
32
  @font-face {
32
33
  font-family: "NEXT Book";
33
34
  src: url("NEXT-Book-Light-Italic.eot");
34
- src: url("NEXT-Book-Light-Italic.eot?#iefix") format("embedded-opentype"),
35
+ src:
36
+ url("NEXT-Book-Light-Italic.eot?#iefix") format("embedded-opentype"),
35
37
  url("NEXT-Book-Light-Italic.woff2") format("woff2"),
36
38
  url("NEXT-Book-Light-Italic.woff") format("woff");
37
39
  font-weight: 300;
@@ -41,7 +43,8 @@
41
43
  @font-face {
42
44
  font-family: "NEXT Book";
43
45
  src: url("NEXT-Book-Medium.eot");
44
- src: url("NEXT-Book-Medium.eot?#iefix") format("embedded-opentype"),
46
+ src:
47
+ url("NEXT-Book-Medium.eot?#iefix") format("embedded-opentype"),
45
48
  url("NEXT-Book-Medium.woff2") format("woff2"),
46
49
  url("NEXT-Book-Medium.woff") format("woff");
47
50
  font-weight: 500;
@@ -51,7 +54,8 @@
51
54
  @font-face {
52
55
  font-family: "NEXT Book";
53
56
  src: url("NEXT-Book-Medium-Italic.eot");
54
- src: url("NEXT-Book-Medium-Italic.eot?#iefix") format("embedded-opentype"),
57
+ src:
58
+ url("NEXT-Book-Medium-Italic.eot?#iefix") format("embedded-opentype"),
55
59
  url("NEXT-Book-Medium-Italic.woff2") format("woff2"),
56
60
  url("NEXT-Book-Medium-Italic.woff") format("woff");
57
61
  font-weight: 500;
@@ -4,7 +4,7 @@ const fetchBlogPosts = async (store, blogUrl) => {
4
4
  try {
5
5
  if (!blogUrl) {
6
6
  console.log(
7
- `Skipping fetching blog posts, invalid blogUrl: "${blogUrl}"`
7
+ `Skipping fetching blog posts, invalid blogUrl: "${blogUrl}"`,
8
8
  );
9
9
  return;
10
10
  }
@@ -12,7 +12,7 @@ const fetchSessionData = async (store, sessionUrl) => {
12
12
  try {
13
13
  if (!sessionUrl) {
14
14
  console.log(
15
- `Skipping fetching session, invalid sessionUrl: "${sessionUrl}"`
15
+ `Skipping fetching session, invalid sessionUrl: "${sessionUrl}"`,
16
16
  );
17
17
  sessionLoaded();
18
18
  return;
@@ -32,4 +32,12 @@
32
32
  margin-left: 3px;
33
33
  font-size: 8px;
34
34
  }
35
+
36
+ .ui-spacing {
37
+ @apply py-80 sm:py-96 md:py-128;
38
+ }
39
+
40
+ hr.ui-spacing {
41
+ @apply py-40 sm:py-48 md:py-64;
42
+ }
35
43
  }
@@ -1,9 +1,19 @@
1
1
  /* Reset based on https://unpkg.com/tailwindcss@1.9.6/dist/base.css */
2
2
  @layer base {
3
3
  html {
4
- font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
5
- Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif,
6
- "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol",
4
+ font-family:
5
+ system-ui,
6
+ -apple-system,
7
+ BlinkMacSystemFont,
8
+ "Segoe UI",
9
+ Roboto,
10
+ "Helvetica Neue",
11
+ Arial,
12
+ "Noto Sans",
13
+ sans-serif,
14
+ "Apple Color Emoji",
15
+ "Segoe UI Emoji",
16
+ "Segoe UI Symbol",
7
17
  "Noto Color Emoji";
8
18
  line-height: 1.5;
9
19
  }
@@ -7,7 +7,7 @@ const ablyUItailwindConfig = (extend) => {
7
7
  // Create absolute paths to templates in AblyUI
8
8
  const addPurgeContentPaths = () => {
9
9
  const paths = ["*.html.erb", "*", "*.js", "*.json"].map((fileGlob) =>
10
- path.join(ablyUiConfigPath, "src", "**", fileGlob)
10
+ path.join(ablyUiConfigPath, "src", "**", fileGlob),
11
11
  );
12
12
 
13
13
  return paths;