Skip to content

Commit

Permalink
deploy: be68b92
Browse files Browse the repository at this point in the history
  • Loading branch information
doubleedesign committed May 14, 2024
1 parent 61cb828 commit b653f41
Show file tree
Hide file tree
Showing 33 changed files with 234 additions and 202 deletions.
4 changes: 2 additions & 2 deletions assets/About-BQlpBetq.js → assets/About-D3ovQwck.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions assets/Button-CjAWrQ4F.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions assets/Colours-DBtq2hbG.js → assets/Colours-CjXKP4th.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import{j as o}from"./jsx-runtime-DRTy3Uxn.js";import{useMDXComponents as c}from"./index-z5U8iC57.js";import"./index-BBkUAzwr.js";import{u as n}from"./styled-components.browser.esm-CoKU8m7y.js";import{g as l,a as d,c as m}from"./polished.esm-DHPXM_EY.js";import{R as h}from"./RedbackUiThemeProvider-D71Zj-Rh.js";import{t as u}from"./index-CUhKrI82.js";import{A as g}from"./Alert-70_fx8x3.js";const x=n.div`
import{j as o}from"./jsx-runtime-DRTy3Uxn.js";import{useMDXComponents as c}from"./index-z5U8iC57.js";import"./index-BBkUAzwr.js";import{u as n}from"./styled-components.browser.esm-CoKU8m7y.js";import{g as l,a as m,c as d}from"./polished.esm-DHPXM_EY.js";import{R as h}from"./RedbackUiThemeProvider-Co3QCjBu.js";import{t as u}from"./index-V0zlLCsl.js";import{A as g}from"./Alert-70_fx8x3.js";import"./Button-CjAWrQ4F.js";import"./Label-lwa5kVBA.js";import"./LinkButton-zDjC6fZ_.js";import"./Table-Dh1fEt5Y.js";import"./TruncatedText-Dr-qNbjw.js";import"./smartrack-Ddg4N9PD.js";import"./Button.style-DhS0uTNt.js";const x=n.div`
background: ${e=>e.theme.colors.background};
margin-bottom: ${e=>e.theme.spacing.xl};
`,$=n.div`
Expand All @@ -12,7 +12,7 @@ import{j as o}from"./jsx-runtime-DRTy3Uxn.js";import{useMDXComponents as c}from"
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 t=l(e.theme.colors[e.$color])<.5;return e.theme.colors[e.$color]===e.theme.colors.background&&e.$color!=="background"?`1px solid ${t?d(.3,e.theme.colors[e.$color]):m(.2,e.theme.colors[e.$color])}`:"1px solid transparent"}};
border: ${e=>{const t=l(e.theme.colors[e.$color])<.5;return e.theme.colors[e.$color]===e.theme.colors.background&&e.$color!=="background"?`1px solid ${t?m(.3,e.theme.colors[e.$color]):d(.2,e.theme.colors[e.$color])}`:"1px solid transparent"}};
/* eslint-enable indent */
}
Expand All @@ -23,4 +23,4 @@ import{j as o}from"./jsx-runtime-DRTy3Uxn.js";import{useMDXComponents as c}from"
padding-top: ${e=>e.theme.spacing.xs};
}
`,i=()=>{const e=localStorage.getItem("ui-theme"),t=u[e];return o.jsxs(h,{theme:t,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(x,{"data-testid":"Colour Docs",children:o.jsx($,{children:Object.entries(t.colors).map(([r,a])=>o.jsxs(f,{$color:r,children:[o.jsx("div",{}),o.jsxs("span",{children:[r," ",o.jsx("strong",{children:a})]})]},r))})})]})};i.__docgenInfo={description:"",methods:[],displayName:"ColourDemo"};function s(e){const t={h1:"h1",...c(),...e.components};return o.jsxs(o.Fragment,{children:[o.jsx(t.h1,{id:"colours",children:"Colours"}),`
`,o.jsx(i,{})]})}function w(e={}){const{wrapper:t}={...c(),...e.components};return t?o.jsx(t,{...e,children:o.jsx(s,{...e})}):s(e)}export{w as default};
`,o.jsx(i,{})]})}function A(e={}){const{wrapper:t}={...c(),...e.components};return t?o.jsx(t,{...e,children:o.jsx(s,{...e})}):s(e)}export{A as default};
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import{j as e}from"./jsx-runtime-DRTy3Uxn.js";import{useMDXComponents as o}from"./index-z5U8iC57.js";import"./index-BBkUAzwr.js";function r(s){const n={a:"a",code:"code",h1:"h1",h2:"h2",h3:"h3",hr:"hr",li:"li",ol:"ol",p:"p",pre:"pre",ul:"ul",...o(),...s.components};return e.jsxs(e.Fragment,{children:[e.jsx(n.h1,{id:"contributing-to-redback-ui",children:"Contributing to Redback UI"}),`
import{j as e}from"./jsx-runtime-DRTy3Uxn.js";import{useMDXComponents as o}from"./index-z5U8iC57.js";import"./index-BBkUAzwr.js";function r(s){const n={a:"a",code:"code",em:"em",h1:"h1",h2:"h2",h3:"h3",hr:"hr",li:"li",ol:"ol",p:"p",pre:"pre",strong:"strong",ul:"ul",...o(),...s.components};return e.jsxs(e.Fragment,{children:[e.jsx(n.h1,{id:"contributing-to-redback-ui",children:"Contributing to Redback UI"}),`
`,e.jsxs(n.ol,{children:[`
`,e.jsx(n.li,{children:e.jsx(n.a,{href:"#prerequisites",children:"Prerequisites"})}),`
`,e.jsx(n.li,{children:e.jsx(n.a,{href:"#getting-started",children:"Getting started"})}),`
Expand Down Expand Up @@ -78,6 +78,7 @@ import{j as e}from"./jsx-runtime-DRTy3Uxn.js";import{useMDXComponents as o}from"
`,e.jsxs(n.li,{children:[e.jsx(n.code,{children:"ComponentName.stories.tsx"}),": the ",e.jsx(n.a,{href:"https://storybook.js.org/",rel:"nofollow",children:"Storybook"})," file used to see, test, and document the component"]}),`
`,e.jsxs(n.li,{children:[e.jsx(n.code,{children:"ComponentName.test.tsx"}),": the unit test file. A basic example is included. Please add further tests as relevant to your component."]}),`
`]}),`
`,e.jsxs(n.p,{children:[e.jsx(n.strong,{children:"Important!"})," To enable your component to be used by other apps or websites using the short ",e.jsx(n.code,{children:"import { YourComponent } from '@redbackops/redback-ui'"})," syntax, you will need to export it from ",e.jsx(n.code,{children:"src/index.ts"}),". Please add it to the list following the same format as the other components, and in alphabetical order."]}),`
`,e.jsx(n.h3,{id:"theme-and-design-tokens",children:"Theme and design tokens"}),`
`,e.jsx(n.p,{children:"Design tokens are used to maintain consistency across the design system and applications that use it. The tokens are defined in a JavaScript object."}),`
`,e.jsxs(n.p,{children:["All apps/websites consuming Redback UI should define a theme with keys matching the example provided in Redback UI (i.e., of type ",e.jsx(n.code,{children:"RedbackUiTheme"}),"), and be wrapped in a ",e.jsx(n.code,{children:"RedbackUiThemeProvider"})," component imported from Redback UI. This component is a wrapper for styled-components' ",e.jsx(n.code,{children:"ThemeProvider"})," that expects the tokens we have defined."]}),`
Expand All @@ -95,8 +96,10 @@ import{j as e}from"./jsx-runtime-DRTy3Uxn.js";import{useMDXComponents as o}from"
`,e.jsx(n.pre,{children:e.jsx(n.code,{className:"language-bash",children:`npx generate-react-cli component ComponentName --type=doc
`})}),`
`,e.jsx(n.h2,{id:"before-submitting-your-change",children:"Before submitting your change"}),`
`,e.jsx(n.p,{children:"Test the built version of Storybook to make sure everything works as expected, so that when your PR is approved and merged into the main branch you can be confident that you haven't introduced any errors such as incorrect file paths."}),`
`,e.jsxs(n.ol,{children:[`
`,e.jsxs(n.li,{children:[`
`,e.jsx(n.p,{children:"Test the built version of Storybook to make sure everything works as expected, so that when your PR is approved and merged into the main branch you can be confident that you haven't introduced any errors such as incorrect file paths."}),`
`,e.jsxs(n.ul,{children:[`
`,e.jsxs(n.li,{children:["Build Storybook",`
`,e.jsx(n.pre,{children:e.jsx(n.code,{className:"language-bash",children:`npm run build
`})}),`
Expand All @@ -106,6 +109,30 @@ import{j as e}from"./jsx-runtime-DRTy3Uxn.js";import{useMDXComponents as o}from"
`})}),`
`]}),`
`]}),`
`]}),`
`,e.jsxs(n.li,{children:[`
`,e.jsx(n.p,{children:"Run ESLint to check for any formatting or quality issues in your code according to the project's ESLint configuration."}),`
`,e.jsx(n.pre,{children:e.jsx(n.code,{className:"language-bash",children:`npm run lint
`})}),`
`,e.jsx(n.p,{children:"Some issues can be fixed automatically:"}),`
`,e.jsx(n.pre,{children:e.jsx(n.code,{className:"language-bash",children:`npm run lint:fix
`})}),`
`,e.jsx(n.p,{children:"It is recommended to enable running ESLint on save in your IDE to catch issues and reformat code as you work."}),`
`,e.jsx(n.p,{children:"If you would like to add or edit a rule in the ESLint configuration, please raise a pull request with your change and include the reasoning in the description."}),`
`]}),`
`,e.jsxs(n.li,{children:[`
`,e.jsx(n.p,{children:"Ensure your files follow the expected structure"}),`
`,e.jsx(n.pre,{children:e.jsx(n.code,{className:"language-bash",children:`npm run lint:structure
`})}),`
`,e.jsx(n.p,{children:e.jsxs(n.em,{children:[e.jsx(n.strong,{children:"Note"}),": This will also run the general ESLint checks from step 2, so it's a good idea to run that first so you can fix any issues before running the structure check."]})}),`
`]}),`
`,e.jsxs(n.li,{children:[`
`,e.jsxs(n.p,{children:["If you created a new component, ensure it is exported by opening ",e.jsx(n.code,{children:"src/index.ts"})," and add your component to the list following the same format as the other components, and in alphabetical order."]}),`
`]}),`
`,e.jsxs(n.li,{children:[`
`,e.jsxs(n.p,{children:["Bump the version number in ",e.jsx(n.code,{children:"package.json"})," according to the ",e.jsx(n.a,{href:"https://semver.org/",rel:"nofollow",children:"Semantic Versioning"})," guidelines."]}),`
`]}),`
`]}),`
`,e.jsx(n.h2,{id:"submitting-your-change",children:"Submitting your change"}),`
`,e.jsxs(n.ol,{children:[`
`,e.jsxs(n.li,{children:[`
Expand All @@ -128,7 +155,7 @@ import{j as e}from"./jsx-runtime-DRTy3Uxn.js";import{useMDXComponents as o}from"
`})}),`
`]}),`
`,e.jsxs(n.li,{children:[`
`,e.jsx(n.p,{children:"Create a pull request on GitHub, ensuring your include a clear description of your changes and any relevant context for reviewers."}),`
`,e.jsxs(n.p,{children:["Create a pull request on GitHub, in ",e.jsx(n.a,{href:"https://github.com/Redback-Operations/redback-ui",rel:"nofollow",children:"the main Redback UI repository"}),", ensuring your include a clear description of your changes and any relevant context for reviewers."]}),`
`]}),`
`]}),`
`,e.jsx(n.h2,{id:"video-tutorials",children:"Video tutorials"}),`
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 10 additions & 0 deletions assets/Label-lwa5kVBA.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import{j as r}from"./jsx-runtime-DRTy3Uxn.js";import{u as a}from"./styled-components.browser.esm-CoKU8m7y.js";import{r as n}from"./polished.esm-DHPXM_EY.js";const s=a.span`
display: inline-block;
background: ${e=>e.theme.colors[e.type]};
color: ${e=>n(e.theme.colors[e.type])};
font-size: ${e=>e.theme.fontSizes.sm};
padding: ${e=>e.theme.spacing.xs} ${e=>e.theme.spacing.sm};
line-height: 1;
text-transform: uppercase;
font-weight: ${e=>e.theme.fontWeights.semibold};
`,i=({type:e,text:t})=>r.jsx(s,{"data-testid":"Label",type:e,children:t});i.__docgenInfo={description:"",methods:[],displayName:"Label",props:{type:{required:!0,tsType:{name:"union",raw:"'info' | 'warning' | 'success' | 'error'",elements:[{name:"literal",value:"'info'"},{name:"literal",value:"'warning'"},{name:"literal",value:"'success'"},{name:"literal",value:"'error'"}]},description:""},text:{required:!0,tsType:{name:"string"},description:""}}};export{i as L};
Loading

0 comments on commit b653f41

Please sign in to comment.