@ably/ui 14.0.3 → 14.0.5
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/core/CookieMessage/component.css +3 -1
- package/core/Flash/component.css +4 -1
- package/core/MeganavItemsMobile.js +1 -1
- package/core/Slider/component.css +2 -2
- package/core/Slider.js +1 -1
- package/core/fonts/next.css +8 -4
- package/core/styles/forms.css +4 -4
- package/core/styles/toggles.css +38 -0
- package/core/styles.components.css +9 -0
- package/package.json +22 -22
- package/reset/styles/reset.css +13 -3
- package/src/core/Accordion.tsx +1 -1
- package/src/core/ConnectStateWrapper.tsx +1 -1
- package/src/core/CookieMessage/component.css +3 -1
- package/src/core/FeaturedLink.tsx +1 -1
- package/src/core/Flash/component.css +4 -1
- package/src/core/Meganav/Meganav.stories.tsx +13 -13
- package/src/core/Meganav/component.js +5 -5
- package/src/core/MeganavBlogPostsList/component.js +2 -2
- package/src/core/MeganavControl/component.js +7 -6
- package/src/core/MeganavControlMobilePanelClose/component.js +5 -4
- package/src/core/MeganavControlMobilePanelOpen/component.js +7 -6
- package/src/core/MeganavItemsMobile.tsx +1 -1
- package/src/core/MeganavItemsSignedIn.tsx +1 -1
- package/src/core/MeganavSearchAutocomplete/component.js +5 -5
- package/src/core/Notice/component.js +3 -3
- package/src/core/Slider/component.css +2 -2
- package/src/core/Slider/component.js +3 -3
- package/src/core/Slider.tsx +5 -5
- package/src/core/fonts/next.css +8 -4
- package/src/core/remote-blogs-posts.js +1 -1
- package/src/core/remote-session-data.js +1 -1
- package/src/core/styles/forms.css +4 -4
- package/src/core/styles/toggles.css +38 -0
- package/src/core/styles.components.css +9 -0
- package/src/pages/Forms.mdx +48 -2
- package/src/pages/Toggles.mdx +42 -0
- package/src/pages/utils.ts +10 -0
- package/src/reset/styles/reset.css +13 -3
- package/tailwind.config.js +3 -0
- package/tailwind.extend.js +1 -1
|
@@ -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:
|
|
11
|
+
transition:
|
|
12
|
+
bottom 250ms ease-out,
|
|
13
|
+
opacity 150ms ease-out;
|
|
12
14
|
}
|
|
13
15
|
}
|
package/core/Flash/component.css
CHANGED
|
@@ -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:
|
|
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(-
|
|
26
|
+
transform: translateX(-100%);
|
|
27
27
|
}
|
|
28
28
|
.ui-icon-cta-right .ui-icon-cta-holder {
|
|
29
|
-
transform: translateX(-
|
|
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
|
|
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;
|
package/core/fonts/next.css
CHANGED
|
@@ -21,7 +21,8 @@
|
|
|
21
21
|
@font-face {
|
|
22
22
|
font-family: "NEXT Book";
|
|
23
23
|
src: url("NEXT-Book-Light.eot");
|
|
24
|
-
src:
|
|
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:
|
|
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:
|
|
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:
|
|
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;
|
package/core/styles/forms.css
CHANGED
|
@@ -31,10 +31,6 @@
|
|
|
31
31
|
@apply text-p2 font-medium text-cool-black;
|
|
32
32
|
}
|
|
33
33
|
|
|
34
|
-
.ui-checkbox-input:disabled + .ui-checkbox-styled {
|
|
35
|
-
@apply bg-gui-unavailable border;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
34
|
.ui-checkbox-input:focus + .ui-checkbox-styled {
|
|
39
35
|
border-width: 0.125rem;
|
|
40
36
|
@apply border-gui-focus;
|
|
@@ -48,6 +44,10 @@
|
|
|
48
44
|
@apply block;
|
|
49
45
|
}
|
|
50
46
|
|
|
47
|
+
.ui-checkbox-input:disabled + .ui-checkbox-styled {
|
|
48
|
+
@apply bg-gui-unavailable border;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
51
|
.ui-textarea {
|
|
52
52
|
@apply font-sans font-medium text-cool-black text-p1;
|
|
53
53
|
@apply p-input mb-16;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
@layer components {
|
|
2
|
+
.ui-toggle {
|
|
3
|
+
@apply h-32 w-[56px] rounded-full relative inline-block;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
.ui-toggle:has(:disabled) {
|
|
7
|
+
@apply pointer-events-none;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
.ui-toggle input {
|
|
11
|
+
@apply w-0 h-0 opacity-0;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.ui-toggle-slider {
|
|
15
|
+
@apply absolute cursor-pointer inset-0 transition-all bg-neutral-600 rounded-full;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.ui-toggle-slider:before {
|
|
19
|
+
@apply absolute h-[28px] w-[28px] left-2 bottom-2 bg-white rounded-full transition-transform drop-shadow-toggle;
|
|
20
|
+
content: "";
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.ui-toggle input:checked + .ui-toggle-slider {
|
|
24
|
+
@apply bg-orange-600;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.ui-toggle input:disabled + .ui-toggle-slider {
|
|
28
|
+
@apply bg-gui-unavailable;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.ui-toggle input:checked + .ui-toggle-slider:before {
|
|
32
|
+
@apply translate-x-24;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.ui-toggle input:disabled + .ui-toggle-slider:before {
|
|
36
|
+
@apply bg-neutral-500;
|
|
37
|
+
}
|
|
38
|
+
}
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
@import "./styles/layout.css";
|
|
3
3
|
@import "./styles/text.css";
|
|
4
4
|
@import "./styles/forms.css";
|
|
5
|
+
@import "./styles/toggles.css";
|
|
5
6
|
|
|
6
7
|
@layer components {
|
|
7
8
|
.ui-input {
|
|
@@ -32,4 +33,12 @@
|
|
|
32
33
|
margin-left: 3px;
|
|
33
34
|
font-size: 8px;
|
|
34
35
|
}
|
|
36
|
+
|
|
37
|
+
.ui-section-spacing {
|
|
38
|
+
@apply py-80 sm:py-96 md:py-128;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
.ui-divider-spacing {
|
|
42
|
+
@apply my-20 sm:my-24 md:my-32;
|
|
43
|
+
}
|
|
35
44
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ably/ui",
|
|
3
|
-
"version": "14.0.
|
|
3
|
+
"version": "14.0.5",
|
|
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",
|
|
@@ -16,13 +16,13 @@
|
|
|
16
16
|
],
|
|
17
17
|
"devDependencies": {
|
|
18
18
|
"@mrtkrcm/cypress-plugin-snapshots": "https://github.com/mrtkrcm/cypress-plugin-snapshots#v1.13.0",
|
|
19
|
-
"@storybook/addon-essentials": "^
|
|
20
|
-
"@storybook/addon-interactions": "^
|
|
21
|
-
"@storybook/addon-links": "^
|
|
22
|
-
"@storybook/blocks": "^
|
|
23
|
-
"@storybook/react": "^
|
|
24
|
-
"@storybook/react-vite": "^
|
|
25
|
-
"@storybook/test": "^
|
|
19
|
+
"@storybook/addon-essentials": "^8.1.7",
|
|
20
|
+
"@storybook/addon-interactions": "^8.1.7",
|
|
21
|
+
"@storybook/addon-links": "^8.1.7",
|
|
22
|
+
"@storybook/blocks": "^8.1.7",
|
|
23
|
+
"@storybook/react": "^8.1.7",
|
|
24
|
+
"@storybook/react-vite": "^8.1.7",
|
|
25
|
+
"@storybook/test": "^8.1.7",
|
|
26
26
|
"@swc/cli": "^0.3.10",
|
|
27
27
|
"@swc/core": "^1.4.11",
|
|
28
28
|
"@typescript-eslint/eslint-plugin": "^6.21.0",
|
|
@@ -31,18 +31,18 @@
|
|
|
31
31
|
"autoprefixer": "^10.0.2",
|
|
32
32
|
"cypress": "^13.3.1",
|
|
33
33
|
"eslint": "^7.12.1",
|
|
34
|
-
"eslint-config-prettier": "^
|
|
35
|
-
"eslint-plugin-cypress": "^2.
|
|
34
|
+
"eslint-config-prettier": "^9.1.0",
|
|
35
|
+
"eslint-plugin-cypress": "^3.2.0",
|
|
36
36
|
"eslint-plugin-react": "^7.21.5",
|
|
37
|
-
"eslint-plugin-storybook": "^0.
|
|
38
|
-
"msw": "
|
|
39
|
-
"msw-storybook-addon": "^
|
|
40
|
-
"prettier": "^2.
|
|
41
|
-
"storybook": "^
|
|
37
|
+
"eslint-plugin-storybook": "^0.8.0",
|
|
38
|
+
"msw": "2.3.1",
|
|
39
|
+
"msw-storybook-addon": "^2.0.2",
|
|
40
|
+
"prettier": "^3.2.5",
|
|
41
|
+
"storybook": "^8.1.7",
|
|
42
42
|
"svg-sprite": "^2.0.4",
|
|
43
43
|
"tailwindcss": "^3.3.6",
|
|
44
|
-
"typescript": "5.
|
|
45
|
-
"vite": "^
|
|
44
|
+
"typescript": "5.4.5",
|
|
45
|
+
"vite": "^5.2.12"
|
|
46
46
|
},
|
|
47
47
|
"scripts": {
|
|
48
48
|
"build:prebuild": "rm -rf core reset",
|
|
@@ -60,16 +60,16 @@
|
|
|
60
60
|
"pre-release": "./scripts/pre-release.sh",
|
|
61
61
|
"release": "./scripts/release.sh",
|
|
62
62
|
"start": "vite --port 5000",
|
|
63
|
-
"storybook": "yarn build && storybook dev -p 6006
|
|
63
|
+
"storybook": "yarn build && storybook dev -p 6006",
|
|
64
64
|
"build-storybook": "yarn build && storybook build -o preview"
|
|
65
65
|
},
|
|
66
66
|
"dependencies": {
|
|
67
|
-
"addsearch-js-client": "^0.
|
|
67
|
+
"addsearch-js-client": "^0.8.11",
|
|
68
68
|
"array-flat-polyfill": "^1.0.1",
|
|
69
|
-
"dompurify": "^
|
|
70
|
-
"highlight.js": "^
|
|
69
|
+
"dompurify": "^3.1.4",
|
|
70
|
+
"highlight.js": "^11.9.0",
|
|
71
71
|
"highlightjs-curl": "^1.3.0",
|
|
72
|
-
"js-cookie": "^
|
|
72
|
+
"js-cookie": "^3.0.5",
|
|
73
73
|
"lodash.throttle": "^4.1.1",
|
|
74
74
|
"nanoid": "^4.0.0",
|
|
75
75
|
"react": "^18.2.0",
|
package/reset/styles/reset.css
CHANGED
|
@@ -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:
|
|
5
|
-
|
|
6
|
-
|
|
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
|
}
|
package/src/core/Accordion.tsx
CHANGED
|
@@ -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:
|
|
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:
|
|
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 {
|
|
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
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
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) =>
|
|
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") ===
|
|
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") ===
|
|
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(-
|
|
26
|
+
transform: translateX(-100%);
|
|
27
27
|
}
|
|
28
28
|
.ui-icon-cta-right .ui-icon-cta-holder {
|
|
29
|
-
transform: translateX(-
|
|
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
|
|
package/src/core/Slider.tsx
CHANGED
|
@@ -59,7 +59,7 @@ const SlideIndicator = ({
|
|
|
59
59
|
⬤
|
|
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
|
|
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
|
|
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>
|
package/src/core/fonts/next.css
CHANGED
|
@@ -21,7 +21,8 @@
|
|
|
21
21
|
@font-face {
|
|
22
22
|
font-family: "NEXT Book";
|
|
23
23
|
src: url("NEXT-Book-Light.eot");
|
|
24
|
-
src:
|
|
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:
|
|
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:
|
|
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:
|
|
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;
|
|
@@ -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;
|
|
@@ -31,10 +31,6 @@
|
|
|
31
31
|
@apply text-p2 font-medium text-cool-black;
|
|
32
32
|
}
|
|
33
33
|
|
|
34
|
-
.ui-checkbox-input:disabled + .ui-checkbox-styled {
|
|
35
|
-
@apply bg-gui-unavailable border;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
34
|
.ui-checkbox-input:focus + .ui-checkbox-styled {
|
|
39
35
|
border-width: 0.125rem;
|
|
40
36
|
@apply border-gui-focus;
|
|
@@ -48,6 +44,10 @@
|
|
|
48
44
|
@apply block;
|
|
49
45
|
}
|
|
50
46
|
|
|
47
|
+
.ui-checkbox-input:disabled + .ui-checkbox-styled {
|
|
48
|
+
@apply bg-gui-unavailable border;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
51
|
.ui-textarea {
|
|
52
52
|
@apply font-sans font-medium text-cool-black text-p1;
|
|
53
53
|
@apply p-input mb-16;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
@layer components {
|
|
2
|
+
.ui-toggle {
|
|
3
|
+
@apply h-32 w-[56px] rounded-full relative inline-block;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
.ui-toggle:has(:disabled) {
|
|
7
|
+
@apply pointer-events-none;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
.ui-toggle input {
|
|
11
|
+
@apply w-0 h-0 opacity-0;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.ui-toggle-slider {
|
|
15
|
+
@apply absolute cursor-pointer inset-0 transition-all bg-neutral-600 rounded-full;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.ui-toggle-slider:before {
|
|
19
|
+
@apply absolute h-[28px] w-[28px] left-2 bottom-2 bg-white rounded-full transition-transform drop-shadow-toggle;
|
|
20
|
+
content: "";
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.ui-toggle input:checked + .ui-toggle-slider {
|
|
24
|
+
@apply bg-orange-600;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.ui-toggle input:disabled + .ui-toggle-slider {
|
|
28
|
+
@apply bg-gui-unavailable;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.ui-toggle input:checked + .ui-toggle-slider:before {
|
|
32
|
+
@apply translate-x-24;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.ui-toggle input:disabled + .ui-toggle-slider:before {
|
|
36
|
+
@apply bg-neutral-500;
|
|
37
|
+
}
|
|
38
|
+
}
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
@import "./styles/layout.css";
|
|
3
3
|
@import "./styles/text.css";
|
|
4
4
|
@import "./styles/forms.css";
|
|
5
|
+
@import "./styles/toggles.css";
|
|
5
6
|
|
|
6
7
|
@layer components {
|
|
7
8
|
.ui-input {
|
|
@@ -32,4 +33,12 @@
|
|
|
32
33
|
margin-left: 3px;
|
|
33
34
|
font-size: 8px;
|
|
34
35
|
}
|
|
36
|
+
|
|
37
|
+
.ui-section-spacing {
|
|
38
|
+
@apply py-80 sm:py-96 md:py-128;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
.ui-divider-spacing {
|
|
42
|
+
@apply my-20 sm:my-24 md:my-32;
|
|
43
|
+
}
|
|
35
44
|
}
|
package/src/pages/Forms.mdx
CHANGED
|
@@ -82,7 +82,7 @@ import Icon from "../core/Icon";
|
|
|
82
82
|
<h4 className="ui-text-h3 mb-16">
|
|
83
83
|
Checkboxes with P2 size text and tighter spacing
|
|
84
84
|
</h4>
|
|
85
|
-
<div className="
|
|
85
|
+
<div className="ui-checkbox-p2">
|
|
86
86
|
<input
|
|
87
87
|
data-ui-checkbox-native=""
|
|
88
88
|
type="checkbox"
|
|
@@ -108,7 +108,7 @@ import Icon from "../core/Icon";
|
|
|
108
108
|
this privacy policy.
|
|
109
109
|
</label>
|
|
110
110
|
</div>
|
|
111
|
-
<div className="
|
|
111
|
+
<div className="ui-checkbox-p2">
|
|
112
112
|
<input
|
|
113
113
|
data-ui-checkbox-native=""
|
|
114
114
|
type="checkbox"
|
|
@@ -150,6 +150,52 @@ import Icon from "../core/Icon";
|
|
|
150
150
|
</label>
|
|
151
151
|
</div>
|
|
152
152
|
</div>
|
|
153
|
+
<div className="mb-40">
|
|
154
|
+
<h4 className="ui-text-h3 mb-16">Disabled checkboxes</h4>
|
|
155
|
+
<div className="ui-checkbox-p2">
|
|
156
|
+
<input
|
|
157
|
+
data-ui-checkbox-native=""
|
|
158
|
+
type="checkbox"
|
|
159
|
+
id="checkbox-example-7"
|
|
160
|
+
name="checkbox-example-7"
|
|
161
|
+
value="yes"
|
|
162
|
+
className="ui-checkbox-input"
|
|
163
|
+
disabled
|
|
164
|
+
/>
|
|
165
|
+
<div data-ui-checkbox-styled="" className="ui-checkbox-styled">
|
|
166
|
+
<Icon
|
|
167
|
+
name="icon-gui-tick"
|
|
168
|
+
size="1rem"
|
|
169
|
+
additionalCSS="ui-checkbox-styled-tick"
|
|
170
|
+
/>
|
|
171
|
+
</div>
|
|
172
|
+
<label htmlFor="checkbox-example-7" className="ui-checkbox-label-p2">
|
|
173
|
+
Disabled checkbox
|
|
174
|
+
</label>
|
|
175
|
+
</div>
|
|
176
|
+
<div className="ui-checkbox-p2">
|
|
177
|
+
<input
|
|
178
|
+
data-ui-checkbox-native=""
|
|
179
|
+
type="checkbox"
|
|
180
|
+
id="checkbox-example-8"
|
|
181
|
+
name="checkbox-example-8"
|
|
182
|
+
value="yes"
|
|
183
|
+
className="ui-checkbox-input"
|
|
184
|
+
checked
|
|
185
|
+
disabled
|
|
186
|
+
/>
|
|
187
|
+
<div data-ui-checkbox-styled="" className="ui-checkbox-styled">
|
|
188
|
+
<Icon
|
|
189
|
+
name="icon-gui-tick"
|
|
190
|
+
size="1rem"
|
|
191
|
+
additionalCSS="ui-checkbox-styled-tick"
|
|
192
|
+
/>
|
|
193
|
+
</div>
|
|
194
|
+
<label htmlFor="checkbox-example-8" className="ui-checkbox-label-p2">
|
|
195
|
+
Disabled checkbox with a checked state
|
|
196
|
+
</label>
|
|
197
|
+
</div>
|
|
198
|
+
</div>
|
|
153
199
|
<h3 className="ui-text-h2 mb-24">Textarea</h3>
|
|
154
200
|
<div className="mb-40">
|
|
155
201
|
<label className="ui-text-p1 block mb-24" htmlFor="example-text-area">
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { Meta, Unstyled } from "@storybook/blocks";
|
|
2
|
+
import { togglesHtml } from "./utils.ts";
|
|
3
|
+
import Code from "../core/Code";
|
|
4
|
+
|
|
5
|
+
<Meta title="Brand/Toggles" />
|
|
6
|
+
|
|
7
|
+
<Unstyled>
|
|
8
|
+
<h1 className="ui-text-h1 mb-32">Toggles</h1>
|
|
9
|
+
|
|
10
|
+
<div className="flex items-center gap-24 mb-24">
|
|
11
|
+
<label className="ui-toggle">
|
|
12
|
+
<input type="checkbox" />
|
|
13
|
+
<span className="ui-toggle-slider"></span>
|
|
14
|
+
</label>
|
|
15
|
+
Default
|
|
16
|
+
</div>
|
|
17
|
+
<div className="flex items-center gap-24 mb-24">
|
|
18
|
+
<label className="ui-toggle">
|
|
19
|
+
<input type="checkbox" checked />
|
|
20
|
+
<span className="ui-toggle-slider"></span>
|
|
21
|
+
</label>
|
|
22
|
+
Toggled
|
|
23
|
+
</div>
|
|
24
|
+
<div className="flex items-center gap-24 mb-24">
|
|
25
|
+
<label className="ui-toggle">
|
|
26
|
+
<input type="checkbox" disabled />
|
|
27
|
+
<span className="ui-toggle-slider"></span>
|
|
28
|
+
</label>
|
|
29
|
+
Disabled
|
|
30
|
+
</div>
|
|
31
|
+
<div className="flex items-center gap-24 mb-24">
|
|
32
|
+
<label className="ui-toggle">
|
|
33
|
+
<input type="checkbox" />
|
|
34
|
+
<span className="ui-toggle-slider bg-neutral-800"></span>
|
|
35
|
+
</label>
|
|
36
|
+
Customised slider colour
|
|
37
|
+
</div>
|
|
38
|
+
<div className="ui-divider-spacing">
|
|
39
|
+
<h4 className="ui-text-h3 mb-16">Example HTML</h4>
|
|
40
|
+
<Code language="html" snippet={togglesHtml} />
|
|
41
|
+
</div>
|
|
42
|
+
</Unstyled>
|
package/src/pages/utils.ts
CHANGED
|
@@ -68,3 +68,13 @@ export const formsHtml = `
|
|
|
68
68
|
<label for="checkbox-example" class="ui-checkbox-label-p1">Yes</label>
|
|
69
69
|
</div>
|
|
70
70
|
`;
|
|
71
|
+
|
|
72
|
+
export const togglesHtml = `
|
|
73
|
+
<div className="flex items-center gap-24 mb-16">
|
|
74
|
+
<label className="ui-toggle">
|
|
75
|
+
<input type="checkbox" />
|
|
76
|
+
<span className="ui-toggle-slider"></span>
|
|
77
|
+
</label>
|
|
78
|
+
Default
|
|
79
|
+
</div>
|
|
80
|
+
`;
|
|
@@ -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:
|
|
5
|
-
|
|
6
|
-
|
|
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
|
}
|
package/tailwind.config.js
CHANGED
|
@@ -271,6 +271,9 @@ module.exports = {
|
|
|
271
271
|
quote: "0rem 1.5rem 2rem 0rem #0000000d",
|
|
272
272
|
// opacity
|
|
273
273
|
},
|
|
274
|
+
dropShadow: {
|
|
275
|
+
toggle: ["0 4px 4px rgba(0,0,0,0.25)", "0 4px 8px rgba(0,0,0,0.15)"],
|
|
276
|
+
},
|
|
274
277
|
letterSpacing: {
|
|
275
278
|
"tighten-0.025": "var(--ls-tighten-0_025)",
|
|
276
279
|
"tighten-0.02": "var(--ls-tighten-0_02)",
|
package/tailwind.extend.js
CHANGED
|
@@ -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;
|