-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
9584fb4
commit efed888
Showing
140 changed files
with
77,888 additions
and
2,476 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
import{j as c}from"./jsx-runtime-Bxcv0yjW.js";import{u as l}from"./styled-components.browser.esm-DnUtS8XV.js";import{r as a,g as s,c as i,m,a as d}from"./polished.esm-B9vzHjoG.js";const u=l.div` | ||
width: 100%; | ||
border: ${e=>`1px solid ${e.theme.colors[e.type]}`}; | ||
border-left-width: ${e=>e.theme.spacing.sm}; | ||
color: ${e=>a(e.theme.colors[e.type])}; | ||
padding: ${e=>e.theme.spacing.md}; | ||
box-sizing: border-box; | ||
margin-bottom: ${e=>e.theme.spacing.lg}; | ||
background: ${e=>s(e.theme.colors.background)<.5?i(.1,e.theme.colors.background):"white"}; | ||
color: ${e=>{const r=s(e.theme.colors.background)<.5;let t=e.theme.colors[e.type],o=0;for(;o<4;){if(m(t,e.theme.colors.background).AA)return t;t=r?i(.1,t):d(.1,t),o++}return a(e.theme.colors.background)}}; | ||
p { | ||
font-size: ${e=>e.theme.fontSizes.sm}; | ||
margin-top: 0; | ||
margin-bottom: ${e=>e.theme.spacing.xs}; | ||
&:first-child { | ||
font-size: ${e=>e.theme.fontSizes.default}; | ||
} | ||
&:last-child { | ||
margin-bottom: 0; | ||
} | ||
} | ||
`,n=({type:e,children:r})=>c.jsx(u,{"data-testid":"Alert",type:e??"info",children:r});try{n.displayName="Alert",n.__docgenInfo={description:"",displayName:"Alert",props:{type:{defaultValue:null,description:"",name:"type",required:!1,type:{name:"enum",value:[{value:'"success"'},{value:'"info"'},{value:'"warning"'},{value:'"error"'}]}}}}}catch{}export{n as A}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
import{c,a as t,r}from"./polished.esm-B9vzHjoG.js";import{u as i}from"./styled-components.browser.esm-DnUtS8XV.js";const a=1.25,o={colors:{primary:"#e97462",secondary:"#370e4a",subtle:"#b3a7b7",light:"#f8f9fa",dark:"#0e080e",success:"#00b285",error:"#84213A",warning:"#e97462",info:"#00aeb2",background:"#f8f9fa"},spacing:{xs:"0.25rem",sm:"0.5rem",md:"1rem",lg:"1.5rem",xl:"2rem",xxl:"3rem"},typeScale:a,fontFamily:{body:"'Inter Tight', sans-serif",heading:"'Inter Tight', sans-serif"},fontWeights:{light:300,normal:400,semibold:600,bold:700},fontSizes:["md","lg","xl","xxl","display"].reduce((e,n)=>{const s=Object.values(e).pop();return e[n]=`${parseFloat(s.replace("rem",""))*a}rem`,e},{sm:"0.8rem",default:"1rem"})},m={...o,colors:{...o.colors,primary:"#fbb653",secondary:"#e97462",success:"#599d62",info:"#5d8de8",background:"#f8f9fa",dark:"#370e4a"}},f={...o,colors:{...o.colors,primary:"#370e4a",secondary:"#5680a6",info:"#5680a6",success:"#00776d",background:"#f8f9fa",dark:"#0B0E10",subtle:"#e8d5b5"}},u={...o,colors:{...o.colors,primary:"#84213A",secondary:"#FF3465",info:"#54bac1",background:"#0B0E10",dark:c(.05,"#0B0E10"),subtle:t(.65,o.colors.subtle)}},$=i.button` | ||
display: inline-block; | ||
font-family: ${e=>e.theme.fontFamily.body}; | ||
font-weight: ${e=>e.theme.fontWeights.normal}; | ||
background: ${e=>e.theme.colors[e.$color]}; | ||
color: ${e=>r(e.theme.colors[e.$color])}; | ||
text-decoration: underline; | ||
text-decoration-color: transparent; | ||
appearance: none; | ||
border: 0; | ||
border-radius: 3rem; | ||
cursor: pointer; | ||
transition: all 0.3s ease; | ||
font-size: ${e=>e.theme.fontSizes.sm}; | ||
// Handle appearance | ||
${e=>{if(e.$appearance==="outline")return` | ||
background: transparent; | ||
color: ${e.theme.colors[e.$color]}; | ||
border: 1px solid ${e.theme.colors[e.$color]}; | ||
`}}; | ||
// Handle sizes | ||
${e=>e.$size==="sm"?` | ||
padding: ${e.theme.spacing.xs} ${e.theme.spacing.md}; | ||
font-size: ${e.theme.fontSizes.xs}; | ||
`:e.$size==="lg"?` | ||
padding: ${e.theme.spacing.sm} ${e.theme.spacing.xxl}; | ||
font-size: ${e.theme.fontSizes.default}; | ||
`:` | ||
padding: ${e.theme.spacing.sm} ${e.theme.spacing.lg}; | ||
font-size: 0.875rem; // in between sm (0.75rem) and default (1rem) | ||
`}; | ||
&:hover, &:focus, &:active { | ||
text-decoration-color: currentColor; | ||
color: ${e=>r(e.theme.colors[e.$color])}; | ||
${e=>e.$appearance==="outline"?` | ||
background: ${e.theme.colors[e.$color]}; | ||
`:` | ||
background: ${t(.15,e.theme.colors[e.$color])}; | ||
`}}; | ||
} | ||
`;export{$ as S,f as a,u as b,o as d,m as s}; |
This file was deleted.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
import{j as o}from"./jsx-runtime-Bxcv0yjW.js";import{useMDXComponents as i}from"./index-EeWIkZEf.js";import"./index-mfbfsM12.js";import{u as c}from"./styled-components.browser.esm-DnUtS8XV.js";import{g as l,c as m,a as d}from"./polished.esm-B9vzHjoG.js";import{R as h}from"./RedbackUiThemeProvider-92619l97.js";import{t as u}from"./index-82mlukfQ.js";import{A as g}from"./Alert-CRCkG8cY.js";import"./Button-BtzO9Cgo.js";import"./Label-DTqbhiXx.js";import"./LinkButton-BrwIWpTO.js";import"./Table-CTfJIhs4.js";import"./TruncatedText-dI59SCl1.js";import"./_commonjsHelpers-BosuxZz1.js";import"./Button.style-BuRJTyuz.js";const p=c.div` | ||
background: ${e=>e.theme.colors.background}; | ||
margin-bottom: ${e=>e.theme.spacing.xl}; | ||
`,x=c.div` | ||
display: grid; | ||
grid-template-columns: repeat(12, 1fr); | ||
grid-gap: ${e=>e.theme.spacing.md}; | ||
`,$=c.div` | ||
grid-column: ${e=>{switch(e.$color){case"background":return"span 12";case"primary":case"secondary":return"span 6";case"subtle":case"light":case"dark":return"span 4";default:return"span 3"}}}; | ||
> div { | ||
background: ${e=>e.theme.colors[e.$color]}; | ||
height: ${e=>{if(e.$color==="primary"||e.$color==="secondary")return"6rem";if(e.$color!=="background")return"4rem"}}; | ||
/* eslint-enable indent */ | ||
border: ${e=>{const r=l(e.theme.colors[e.$color])<.5;return e.theme.colors[e.$color]===e.theme.colors.background&&e.$color!=="background"?`1px solid ${r?m(.3,e.theme.colors[e.$color]):d(.2,e.theme.colors[e.$color])}`:"1px solid transparent"}}; | ||
/* eslint-enable indent */ | ||
} | ||
> span { | ||
display: block; | ||
text-align: right; | ||
font-size: ${e=>e.theme.fontSizes.default}; | ||
padding-top: ${e=>e.theme.spacing.xs}; | ||
} | ||
`,n=()=>{const e=localStorage.getItem("ui-theme"),r=u[e];return o.jsxs(h,{theme:r,children:[o.jsxs(g,{type:"info",children:[o.jsxs("p",{children:["You are currently viewing these docs with Redback's ",o.jsx("strong",{children:e})," theme."]}),o.jsx("p",{children:"You can select a different theme in the toolbar at the top of the page."})]}),o.jsx(p,{"data-testid":"Colour Docs",children:o.jsx(x,{children:Object.entries(r.colors).map(([t,a])=>o.jsxs($,{$color:t,children:[o.jsx("div",{}),o.jsxs("span",{children:[t," ",o.jsx("strong",{children:a})]})]},t))})})]})};try{n.displayName="ColourDemo",n.__docgenInfo={description:"",displayName:"ColourDemo",props:{}}}catch{}function s(e){const r={h1:"h1",...i(),...e.components};return o.jsxs(o.Fragment,{children:[o.jsx(r.h1,{id:"colours",children:"Colours"}),` | ||
`,o.jsx(n,{})]})}function z(e={}){const{wrapper:r}={...i(),...e.components};return r?o.jsx(r,{...e,children:o.jsx(s,{...e})}):s(e)}export{z as default}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.