Skip to content

Commit

Permalink
building main
Browse files Browse the repository at this point in the history
  • Loading branch information
staxly committed Dec 12, 2024
1 parent c0f1cf4 commit c8be088
Show file tree
Hide file tree
Showing 50 changed files with 1,396 additions and 0 deletions.
1 change: 1 addition & 0 deletions main/assets/BodyPortal.1dd53688.js

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

57 changes: 57 additions & 0 deletions main/assets/Button.103d7123.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
import{s as n,C as m,a as i}from"./index.b00fac09.js";import{t as e}from"./theme.165950be.js";import{a as p}from"./buttons.362062b4.js";const a=n.button`
${o=>p(o.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: 0.5rem;
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;
${o=>o.variant==="primary"?`
&:focus {
outline: solid ${e.colors.palette.white};
box-shadow: inset 0 0 0 3px ${e.colors.palette.black};
}
`:""}
&:not([disabled]) {
cursor: pointer;
}
&:disabled {
opacity: 0.4;
}
& + & {
margin-left: 1.6rem;
}
`,f=o=>{const{disabled:t,isWaiting:r,waitingText:s,children:l,variant:c="primary",...d}=o;return i(a,{...d,disabled:r||t,variant:c,children:r&&s||l})},y=({variant:o="primary",...t})=>i(a,{...t,as:"a",variant:o,children:t.children}),u=m`
color: ${e.colors.link.color};
cursor: pointer;
text-decoration: none;
:hover,
:focus {
text-decoration: underline;
color: ${e.colors.link.hover};
}
`,h=n.button`
cursor: pointer;
border: none;
margin: 0;
padding: 0;
background: none;
`,k=n(h)`
${u}
`;export{f as B,y as L,k as a};
1 change: 1 addition & 0 deletions main/assets/Button.module.fc55542b.js

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

1 change: 1 addition & 0 deletions main/assets/Button.stories.a9a17d3f.js

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

12 changes: 12 additions & 0 deletions main/assets/ButtonBar.stories.43ea2b6b.js

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

39 changes: 39 additions & 0 deletions main/assets/Checkbox.8a04e396.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
import{c as r}from"./theme.165950be.js";import{s as t,j as s,a as g}from"./index.b00fac09.js";const p='data:image/svg+xml,<svg height="125px" width="125px" version="1.1" id="Capa_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 17.837 17.837" xml:space="preserve" fill="%23000000"><g id="SVGRepo_bgCarrier" stroke-width="0"></g><g id="SVGRepo_tracerCarrier" stroke-linecap="round" stroke-linejoin="round"></g><g id="SVGRepo_iconCarrier"><g><path style="fill:%23fff;" d="M16.145,2.571c-0.272-0.273-0.718-0.273-0.99,0L6.92,10.804l-4.241-4.27 c-0.272-0.274-0.715-0.274-0.989,0L0.204,8.019c-0.272,0.271-0.272,0.717,0,0.99l6.217,6.258c0.272,0.271,0.715,0.271,0.99,0 L17.63,5.047c0.276-0.273,0.276-0.72,0-0.994L16.145,2.571z"></path></g></g></svg>',h='data:image/svg+xml,<svg height="125px" width="125px" version="1.1" id="Capa_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 17.837 17.837" xml:space="preserve" fill="%23000000"><g id="SVGRepo_bgCarrier" stroke-width="0"></g><g id="SVGRepo_tracerCarrier" stroke-linecap="round" stroke-linejoin="round"></g><g id="SVGRepo_iconCarrier"><g><path style="fill:%235e5e5e;" d="M16.145,2.571c-0.272-0.273-0.718-0.273-0.99,0L6.92,10.804l-4.241-4.27 c-0.272-0.274-0.715-0.274-0.989,0L0.204,8.019c-0.272,0.271-0.272,0.717,0,0.99l6.217,6.258c0.272,0.271,0.715,0.271,0.99,0 L17.63,5.047c0.276-0.273,0.276-0.72,0-0.994L16.145,2.571z"></path></g></g></svg>',k='data:image/svg+xml,<svg height="125px" width="125px" version="1.1" id="Capa_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 17.837 17.837" xml:space="preserve" fill="%23000000"><g id="SVGRepo_bgCarrier" stroke-width="0"></g><g id="SVGRepo_tracerCarrier" stroke-linecap="round" stroke-linejoin="round"></g><g id="SVGRepo_iconCarrier"><g><path style="fill:%23C22032;" d="M16.145,2.571c-0.272-0.273-0.718-0.273-0.99,0L6.92,10.804l-4.241-4.27 c-0.272-0.274-0.715-0.274-0.989,0L0.204,8.019c-0.272,0.271-0.272,0.717,0,0.99l6.217,6.258c0.272,0.271,0.715,0.271,0.99,0 L17.63,5.047c0.276-0.273,0.276-0.72,0-0.994L16.145,2.571z"></path></g></g></svg>',o={primary:{backgroundColor:r.palette.mediumBlue,color:"inherit",unCheckedBorder:`1px solid ${r.palette.neutralThin}`,checkedBorder:`1px solid ${r.palette.mediumBlue}`,backgroundImage:p},light:{backgroundColor:r.palette.white,color:"inherit",unCheckedBorder:`1px solid ${r.palette.pale}`,checkedBorder:`1px solid ${r.palette.pale}`,backgroundImage:h},error:{backgroundColor:r.palette.paleRed,color:r.palette.darkRed,unCheckedBorder:`1px solid ${r.palette.lightRed}`,checkedBorder:`1px solid ${r.palette.lightRed}`,backgroundImage:k},disabled:{backgroundColor:r.palette.white,color:"inherit",unCheckedBorder:`1px solid ${r.palette.pale}`,checkedBorder:`1px solid ${r.palette.pale}`,backgroundImage:"none"}},m=t.label`
font-size: 1.4rem;
display: flex;
align-items: center;
font-weight: ${e=>e.bold?700:400};
color: ${e=>e.isDisabled?r.palette.neutralLight:o[e.variant].color};
`,x=t.input`
appearance: none;
/* For iOS < 15 to remove gradient background */
background-color: ${r.palette.white};
opacity: ${e=>e.isDisabled?"0.4":"1"};
border: ${e=>e.isDisabled?`1px solid ${r.palette.pale}`:o[e.variant].unCheckedBorder};
border-radius: 0.2rem;
transform: translateY(-0.075em);
width: ${e=>e.checkboxSize}rem;
height: ${e=>e.checkboxSize}rem;
margin: 0 1.6rem 0 0;
display: grid;
place-content: center;
&::before {
content: "";
width: ${e=>e.checkboxSize}rem;
height: ${e=>e.checkboxSize}rem;
border: ${e=>o[e.variant].checkedBorder};
border-radius: 0.2rem;
transform: scale(0);
background-color: ${e=>o[e.variant].backgroundColor};
background-image: url('${e=>o[e.variant].backgroundImage}');
background-size: 80%;
background-position: center;
background-repeat: no-repeat;
}
&:checked::before {
transform: scale(1);
opacity: ${e=>e.isDisabled?0:1};
}
`,w=({children:e,disabled:a,variant:i="primary",bold:l=!1,size:c=1.6,labelProps:d,...n})=>s(m,{bold:l,variant:i,isDisabled:a,...d,children:[g(x,{...n,type:"checkbox",variant:i,checkboxSize:c,isDisabled:a}),e]});export{w as C};
9 changes: 9 additions & 0 deletions main/assets/Checkbox.stories.775a882a.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import{s as l,j as r,F as c,a as d}from"./index.b00fac09.js";import{C as i}from"./Checkbox.8a04e396.js";import"./theme.165950be.js";import"./palette.15e4d008.js";const n=l.div`
text-transform: capitalize;
& + & {
margin-top: 3.2rem;
}
> * + * {
margin-top: 0.5rem;
}
`,e=(o,t)=>r(n,{children:[r("h2",{children:["Size ",t]}),d(i,{size:t,variant:o,children:"Checkbox label"}),d(i,{size:t,variant:o,defaultChecked:!0,children:"Checkbox label"}),d(i,{size:t,variant:o,defaultChecked:!0,bold:!0,children:"Checkbox label"})]}),p=()=>r(c,{children:[e("primary",1.4),e("primary",1.6),e("primary",1.8),e("primary",2)]}),u=()=>r(c,{children:[e("light",1.4),e("light",1.6),e("light",1.8),e("light",2)]});typeof window<"u"&&window.document&&window.document.createElement&&document.documentElement.setAttribute("data-storyloaded","");export{u as Light,p as Primary};
1 change: 1 addition & 0 deletions main/assets/Dialog.module.84231fcc.js

Large diffs are not rendered by default.

66 changes: 66 additions & 0 deletions main/assets/DropdownMenu.stories.6296ca4d.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
import{s as m,j as a,a as t,R as b,F as h}from"./index.b00fac09.js";import{$ as g}from"./Button.module.fc55542b.js";import{$ as u,a as f,b as r}from"./Menu.module.6da9ca3b.js";import{$ as y}from"./Dialog.module.84231fcc.js";import{a as $}from"./buttons.362062b4.js";import{p as n}from"./palette.15e4d008.js";import"./context.module.40f7a861.js";import"./useFocusRing.module.6b354afb.js";import"./SelectionManager.module.7695a1b9.js";import"./FocusScope.module.7543fa69.js";import"./OverlayArrow.module.e28af6fa.js";const x=m(g)`
${e=>$(e.variant)}
align-items: center;
border: 0;
border-radius: 0.5rem;
box-shadow: 0px 0.2rem 0.4rem rgba(0, 0, 0, 0.2);
display: inline-flex;
flex-direction: row;
font-size: 1.6rem;
position: relative;
justify-content: center;
line-height: 2rem;
min-height: 2.5rem;
padding: 0 1.5rem 0 0.5rem;
text-align: left;
text-decoration: none;
transition: all 0.2s ease-in-out;
user-select: none;
${e=>e.width?`width: ${e.width}`:null}
-moz-osx-font-smoothing: grayscale;
-webkit-font-smoothing: antialiased;
&:disabled {
opacity: 0.4;
}
&:not([disabled]) {
cursor: pointer;
}
:after {
background: ${e=>e.variant==="light"?n.black:n.white};
clip-path: polygon(0 0, 100% 100%, 100% 0);
content: ' ';
display: block;
position: absolute;
height: 0.5rem;
margin-top: -0.25rem;
right: 0.5rem;
transform: rotate(135deg);
width: 0.5rem;
}
`,w=m(u)`
margin-top: -0.6rem;
background-color: ${n.white};
border: 0.1rem solid ${n.pale};
padding: 0.3rem 0;
cursor: pointer;
color: ${n.black};
[role="menuitem"] {
font-size: 1.6rem;
min-height: 2.5rem;
line-height: 2rem;
padding: 0 0.5rem;
cursor: pointer;
transition: all 0.2s ease-in-out;
-moz-osx-font-smoothing: grayscale;
-webkit-font-smoothing: antialiased;
&:hover {
background-color: ${n.pale};
}
}
`,l=({text:e,children:c,variant:i,width:o,disabled:p,...s})=>a(f,{...s,children:[t(x,{variant:i,width:o,isDisabled:p,children:e}),t(y,{children:t(w,{...s,children:c})})]}),d=e=>{const[c,i]=b.useState(!1),o=()=>{i(!0),setTimeout(()=>{i(!1)},1e3)};return a(h,{children:[a(l,{disabled:c,id:"enabled-grades-menu",text:"Sync/Export Grades",variant:e,children:[t(r,{onAction:o,children:"Sync only completed grades to LMS"}),t(r,{onAction:o,children:"Sync all grades to LMS (including partial)"}),t(r,{onAction:o,children:"Export grades to .csv"})]}),t("br",{}),a(l,{disabled:!0,id:"disabled-grades-menu",text:"Sync/Export Grades",variant:e,children:[t(r,{onAction:o,children:"Sync only completed grades to LMS"}),t(r,{onAction:o,children:"Sync all grades to LMS (including partial)"}),t(r,{onAction:o,children:"Export grades to .csv"})]})]})},F=()=>d("light"),G=()=>d("primary"),R=()=>d("secondary");typeof window<"u"&&window.document&&window.document.createElement&&document.documentElement.setAttribute("data-storyloaded","");export{F as Light,G as Primary,R as Secondary};
Loading

0 comments on commit c8be088

Please sign in to comment.