Skip to content

Commit

Permalink
building refs/heads/error-modal-props/e3456fbf5ec3c60e2b66bc903070d4c…
Browse files Browse the repository at this point in the history
…59c4f270e
  • Loading branch information
staxly committed Oct 18, 2023
1 parent 8b10548 commit 29fc2b8
Show file tree
Hide file tree
Showing 31 changed files with 1,197 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
import{C as i,s as n,a as c}from"./index.c94732e9.js";import{t as a}from"./theme.4ea0fa27.js";import{p as e}from"./palette.15e4d008.js";const b=t=>t,h=b({primary:{background:e.orange,backgroundActive:"#b03808",backgroundHover:"#be3c08",color:e.white},light:{background:e.white,backgroundActive:e.neutralLight,backgroundHover:e.white,color:e.neutralDarker,fontWeight:400},secondary:{background:e.darkGray,backgroundActive:"#4c4c4c",backgroundHover:"#646464",color:e.white}}),k=t=>{var r;const o=h[t];return i`
background-color: ${o.background};
color: ${o.color};
font-weight: ${(r=o.fontWeight)!=null?r:700};
&:not([disabled]) {
&:hover {
background: ${o.backgroundHover};
}
&:active {
background: ${o.backgroundActive};
}
}
`},s=n.button`
${t=>k(t.variant)}
font-size: 1.6rem;
line-height: 2rem;
-moz-osx-font-smoothing: grayscale;
-webkit-font-smoothing: antialiased;
display: inline-flex;
flex-direction: row;
justify-content: center;
align-items: center;
height: 4rem;
padding: 0 3rem;
border: 0;
border-radius: 5px;
box-shadow: 0px 0.2rem 0.4rem rgba(0, 0, 0, 0.2);
transition: all 0.2s ease-in-out;
text-decoration: none;
user-select: none;
white-space: nowrap;
&:not([disabled]) {
cursor: pointer;
}
&:disabled {
opacity: 0.4;
}
& + & {
margin-left: 1.6rem;
}
`,x=t=>{const{disabled:o,isWaiting:r,waitingText:d,children:l,variant:u="primary",...g}=t;return c(s,{...g,disabled:r||o,variant:u,children:r&&d||l})},w=({variant:t="primary",...o})=>c(s,{...o,as:"a",variant:t,children:o.children}),m=i`
color: ${a.colors.link.color};
cursor: pointer;
text-decoration: none;
:hover,
:focus {
text-decoration: underline;
color: ${a.colors.link.hover};
}
`,p=n.button`
cursor: pointer;
border: none;
margin: 0;
padding: 0;
background: none;
`,$=n(p)`
${m}
`;export{x as B,w as L,$ as a};

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

Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
import{s as n,j as r,a as c,F as d}from"./index.c94732e9.js";import{c as a}from"./theme.4ea0fa27.js";import"./palette.15e4d008.js";const l={primary:{accentColor:a.palette.mediumBlue,boxShadow:"none"},light:{accentColor:a.palette.white,boxShadow:"0 0 1px 0"}},b=n.label`
font-size: 1.4rem;
display: flex;
align-items: center;
font-weight: ${e=>e.bold?700:400}
`,p=n.input`
accent-color: ${e=>l[e.variant].accentColor};
width: ${e=>e.checkboxSize}rem;
height: ${e=>e.checkboxSize}rem;
margin: 0 1.6rem 0 0;
&:checked {
box-shadow: ${e=>l[e.variant].boxShadow};
}
`,i=({children:e,variant:o="primary",bold:h=!1,size:m=1.6,...s})=>r(b,{bold:h,children:[c(p,{...s,type:"checkbox",variant:o,checkboxSize:m}),e]}),x=n.div`
text-transform: capitalize;
& + & {
margin-top: 3.2rem;
}
> * + * {
margin-top: 0.5rem;
}
`,t=(e,o)=>r(x,{children:[r("h2",{children:["Size ",o]}),c(i,{size:o,variant:e,children:"Checkbox label"}),c(i,{size:o,variant:e,defaultChecked:!0,children:"Checkbox label"}),c(i,{size:o,variant:e,defaultChecked:!0,bold:!0,children:"Checkbox label"})]}),g=()=>r(d,{children:[t("primary",1.4),t("primary",1.6),t("primary",1.8),t("primary",2)]}),w=()=>r(d,{children:[t("light",1.4),t("light",1.6),t("light",1.8),t("light",2)]});typeof window<"u"&&window.document&&window.document.createElement&&document.documentElement.setAttribute("data-storyloaded","");export{w as Light,g as Primary};

Large diffs are not rendered by default.

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

Large diffs are not rendered by default.

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

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

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

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,111 @@
import{U as a,s as r,C as c,j as s,a as e}from"./index.c94732e9.js";const n=a`
from {
transform: scale(0);
}
to {
opacity: 1;
transform: scale(1);
}
`,i=a`
from {
transform: matrix(1, 0, 0, 1, 0, 0);
}
to {
transform: matrix(0.965926, -0.258819, 0.258819, 0.965926, 0, -18);
}
`,l=a`
from {
transform: matrix(1, 0, 0, 1, 0, 0);
}
to {
transform: matrix(0.994522, 0.104528, -0.104528, 0.994522, 0, -14);
}
`,m=a`
from {
transform: matrix(1, 0, 0, 1, 0, 0);
}
to {
transform: matrix(0.99863, 0.052336, -0.052336, 0.99863, 0, -8);
}
`,f=a`
from {
transform: matrix(1, 0, 0, 1, 0, 0);
}
to {
transform: matrix(1, 0, 0, 1, 0, -8);
}
`,h=a`
from {
transform: matrix(1, 0, 0, 1, 0, 0);
}
to {
transform: matrix(0.99863, 0.052336, -0.052336, 0.99863, 0, -4);
}
`,d=r.svg`
enable-background: new 0 0 57.6 39.1;
animation: ${n} 0.3s forwards ${t=>t.delay||300}ms;
display: block;
height: 100%;
margin: 0 auto;
opacity: 0;
position: relative;
transform: scale(0);
transform-origin: center;
width: 5rem;
${t=>t.large?c`
width: 10rem;
`:""}
* {
animation: fadeIn 0.3s forwards;
}
.os-green,
.os-orange,
.os-gray,
.os-yellow,
.os-blue {
animation-delay: 0.5s;
}
.os-green {
animation:
${i} 0.6s cubic-bezier(0.81, 0.41, 0.13, 0.74) 0.5s
infinite alternate;
transform-origin: center left;
}
.os-orange {
animation:
${l} 0.6s cubic-bezier(0.81, 0.41, 0.13, 0.74) 0.5s
infinite alternate;
transform-origin: center right;
}
.os-gray {
animation:
${m} 0.6s cubic-bezier(0.81, 0.41, 0.13, 0.74) 0.5s
infinite alternate;
transform-origin: center right;
}
.os-yellow {
animation:
${f} 0.6s cubic-bezier(0.81, 0.41, 0.13, 0.74) 0.6s
infinite alternate;
transform-origin: center right;
}
.os-blue {
animation:
${h} 0.6s cubic-bezier(0.81, 0.41, 0.13, 0.74) 0.5s
infinite alternate;
transform-origin: center;
}
`,o=t=>s(d,{"data-testid":"loader",version:"1.1",id:"Layer_1",x:"0px",y:"0px",viewBox:"0 -30 57.6 69.1",...t,children:[e("path",{id:"os-blue",className:"os-blue",style:{fill:"#00246a"},d:"M38.4,22c0,0.4-0.3,0.7-0.7,0.7H13.5c-0.4,0-0.7-0.3-0.7-0.7v-1.4c0-0.4,0.3-0.7,0.7-0.7h24.2 c0.4,0,0.7,0.3,0.7,0.7V22z"}),e("path",{id:"os-yellow",className:"os-yellow",style:{fill:"#f4d019"},d:"M41.8,17.8c0,0.4-0.3,0.7-0.7,0.7l-25.4,0.8c-0.4,0-0.7-0.3-0.7-0.7l-0.1-2.1 c0-0.4,0.3-0.7,0.7-0.7L41,15c0.4,0,0.7,0.3,0.7,0.7L41.8,17.8z"}),e("path",{id:"os-gray",className:"os-gray",style:{fill:"#5e6062"},d:"M34.8,14c0,0.4-0.3,0.7-0.7,0.7H11.6c-0.4,0-0.7-0.3-0.7-0.7v-3.5c0-0.4,0.3-0.7,0.7-0.7h22.5 c0.4,0,0.7,0.3,0.7,0.7V14z"}),e("path",{id:"os-orange",className:"os-orange",style:{fill:"#f47641"},d:"M39,8.1c0,0.3-0.4,0.5-1,0.5H8.6c-0.5,0-1-0.2-1-0.5V6.9c0-0.3,0.4-0.5,1-0.5H38 c0.5,0,1,0.2,1,0.5V8.1z"}),e("path",{id:"os-green",className:"os-green",style:{fill:"#77af42"},d:"M43.9,5c0,0.7-0.6,1.2-1.2,1.1L15,4.8c-0.7,0-1.2-0.6-1.1-1.2L14,1.1c0-0.7,0.6-1.2,1.2-1.1 l27.7,1.3c0.7,0,1.2,0.6,1.1,1.2L43.9,5z"}),e("path",{id:"os-type",className:"os-type",style:{fill:"#5e6062"},d:"M3.1,30.2c-1.8,0-3.1,1.3-3.1,3.1c0,1.8,1.3,3.1,3.1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,1 c0.3,0,0.6-0.1,0.8-0.2v1.3c-0.3,0.2-0.9,0.2-1.2,0.2c-1.6,0-2-0.7-2-2.2v-2.8h-1.3v-1.3H36v-1.8h1.5V30.1z M43,30 c-1,0-1.9,0.3-2.6,1l0.8,0.8c0.4-0.4,1-0.6,1.6-0.6c0.8,0,1.4,0.4,1.4,1.1v0.2h-0.4c-1.5,0-3.9,0.1-3.9,2.1c0,1.2,1.1,1.8,2.2,1.8 c0.8,0,1.5-0.3,2-1h0v0.8h1.4v-3.5C45.6,31.8,45.6,30,43,30z M44.1,33.8c0,0.9-0.5,1.4-1.5,1.4c-0.5,0-1.1-0.2-1.1-0.8 c0-0.9,1.5-0.9,2.3-0.9h0.3V33.8z M50.8,32.9l2.5,3.3h-1.9L49.8,34l-1.6,2.2h-1.8l2.5-3.3l-2.1-2.8h1.9l1.2,1.8l1.3-1.8h1.7 L50.8,32.9z M57.6,30.1v1.7h-0.3v-1.5h0l-0.6,1.5h-0.2l-0.6-1.5h0v1.5h-0.3v-1.7h0.4l0.5,1.3l0.5-1.3H57.6z M53.9,30.1h1.4v0.3h-0.5 v1.5h-0.3v-1.5h-0.5V30.1z"})]}),g=()=>e(o,{}),y=()=>e(o,{large:!0}),z=()=>e(o,{delay:1e3});typeof window<"u"&&window.document&&window.document.createElement&&document.documentElement.setAttribute("data-storyloaded","");export{g as Default,z as Delay,y as Large};

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

Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
import{c as e,z as h}from"./theme.4ea0fa27.js";import{a as r,s as o,C as d,j as n}from"./index.c94732e9.js";const m=t=>r("svg",{width:"15px",height:"15px",viewBox:"0 0 15 15",version:"1.1",...t,children:r("g",{stroke:"none",strokeWidth:"1",fill:"none",fillRule:"evenodd",children:r("g",{transform:"translate(-302.000000, -18.000000)",fill:"currentColor",children:r("g",{transform:"translate(302.000000, 18.000000)",children:r("path",{d:"M7.5,5.41522791 L12.0331524,0.579865364 C12.3077536,0.286957429 12.7165503,0.24816296 12.946282,0.493210121 L13.9861449,1.60239723 C14.2158766,1.84744439 14.1795068,2.28349422 13.9049056,2.57640216 L9.37175324,7.41176471 L13.9049056,12.2471273 C14.1795068,12.5400352 14.2158766,12.976085 13.9861449,13.2211322 L12.946282,14.3303193 C12.7165503,14.5753665 12.3077536,14.536572 12.0331524,14.243664 L7.5,9.4083015 L2.96684761,14.243664 C2.69224642,14.536572 2.2834497,14.5753665 2.05371799,14.3303193 L1.01385508,13.2211322 C0.784123363,12.976085 0.820493178,12.5400352 1.09509437,12.2471273 L5.62824676,7.41176471 L1.09509437,2.57640216 C0.820493178,2.28349422 0.784123363,1.84744439 1.01385508,1.60239723 L2.05371799,0.493210121 C2.2834497,0.24816296 2.69224642,0.286957429 2.96684761,0.579865364 L7.5,5.41522791 Z"})})})})}),g=o(({variant:t,...i})=>r("button",{...i,type:"button","aria-label":"Close",children:r(m,{"aria-hidden":"true",focusable:"false"})}))`
padding: 0.4rem;
cursor: pointer;
margin-right: 0;
padding-right: 0;
background: transparent;
color: ${e.palette.neutralMedium};
height: 2rem;
width: 2rem;
border: 0;
:hover {
color: ${e.palette.neutralDark};
}
${t=>t.variant==="error"&&d`
color: ${e.palette.darkRed};
`}
${t=>t.variant==="inverted-circle"&&d`
color: ${e.palette.white};
border: 0.1rem solid ${e.palette.white};
padding: 0;
display: flex;
align-items: center;
justify-content: center;
border-radius: 50%;
&:hover, &:focus {
color: ${e.palette.black};
background-color: ${e.palette.white};
border-color: ${e.palette.white};
}
`}
`,a=3,f=o.div`
display: flex;
flex-direction: column;
margin: auto;
overflow: hidden;
width: 40rem;
background-color: white;
box-shadow: 0 0 2rem rgba(0, 0, 0, 0.05), 0 0 4rem rgba(0, 0, 0, 0.08);
color: ${e.palette.neutralDarker};
font-size: 1.6rem;
line-height: 2.5rem;
`,u=o.header`
display: flex;
align-items: center;
margin-bottom: ${a*.5}rem;
padding: ${a*.5}rem ${a}rem;
background: ${e.palette.neutralLighter};
border-bottom: solid 0.1rem #ddd;
justify-content: space-between;
${t=>t.variant==="error"&&d`
background: ${e.palette.paleRed};
color: ${e.palette.darkRed};
`}
`,b=o.h1`
display: flex;
align-items: center;
margin: 0;
padding: ${a*.5}rem 0;
font-size: 1.8rem;
`,k=o.h3`
font-weight: 400;
font-size: 2.2rem;
margin-top: 0;
`,y=o.div`
font-size: 1.6rem;
padding: ${a}rem;
`,$=o.div`
top: 0;
left: 0;
width: 100%;
height: 100%;
display: flex;
position: fixed;
background-color: rgba(0, 0, 0, 0.3);
`,x=o.div`
top: 0;
z-index: ${h.modals};
left: 0;
width: 100%;
height: 100%;
display: flex;
position: fixed;
justify-content: center;
align-items: center;
`,v=o.div`
z-index: 1;
`,L=o.div`
display: flex;
justify-content: space-between;
padding: ${a}rem;
button {
min-width: 12rem;
}
`,M=({className:t,heading:i,onModalClose:s,children:c,show:p,variant:l})=>p?n(x,{className:t,children:[r(v,{children:n(f,{children:[n(u,{variant:l,children:[r(b,{children:i}),r(g,{onClick:s,variant:l})]}),c]})}),r($,{})]}):null;export{g as C,y as M,k as a,M as b,L as c,$ as d,x as e};
Loading

0 comments on commit 29fc2b8

Please sign in to comment.