diff --git a/storybook-static/assets/Alert.stories-BifAKNCu.js b/storybook-static/assets/Alert.stories-CEbHkU-R.js similarity index 97% rename from storybook-static/assets/Alert.stories-BifAKNCu.js rename to storybook-static/assets/Alert.stories-CEbHkU-R.js index ad462cbe4f..21f27a4255 100644 --- a/storybook-static/assets/Alert.stories-BifAKNCu.js +++ b/storybook-static/assets/Alert.stories-CEbHkU-R.js @@ -1 +1 @@ -import{j as i}from"./jsx-runtime-CexXSJP5.js";import{A as e}from"./theme-ui-components.esm-DCiJ1mMX.js";import"./index-BP8_t0zE.js";import"./parseProps-780b287c.browser.esm-DiCerVr_.js";import"./emotion-use-insertion-effect-with-fallbacks.browser.esm-UWD3gXM2.js";import"./theme-ui-core-jsx-runtime.browser.esm-CH0qhC10.js";import"./hoist-non-react-statics.cjs-CQI8syxn.js";const E={title:"Layout/Alert",component:e},a=()=>i.jsx(e,{variant:"success",children:"A successful message"}),r=()=>i.jsx(e,{variant:"failure",children:"An error message"}),t=()=>i.jsx(e,{variant:"info",children:"An information message"}),s=()=>i.jsxs(e,{variant:"failure",children:["An error message: Veniam explicabo dolor ipsam impedit. Eum eos ut et consequatur eos eaque explicabo et inventore. Aperiam aut consequatur sit ut. Iusto consequatur enim placeat enim quia voluptas pariatur. Culpa quaerat placeat magni et autem earum placeat deserunt eum. A autem enim dolorum. Quo sint nisi vel. Voluptate voluptates alias repudiandae doloribus nemo. Quia aperiam nihil magnam quos ut id. Pariatur itaque sint. Id vel aliquid ullam delectus animi quis."," "]});var o,u,n,m,l,c,p,d,A,q,g,v;a.parameters={...a.parameters,docs:{...null==(o=a.parameters)?void 0:o.docs,source:{originalSource:'() => A successful message',...null==(n=null==(u=a.parameters)?void 0:u.docs)?void 0:n.source}}},r.parameters={...r.parameters,docs:{...null==(m=r.parameters)?void 0:m.docs,source:{originalSource:'() => An error message',...null==(c=null==(l=r.parameters)?void 0:l.docs)?void 0:c.source}}},t.parameters={...t.parameters,docs:{...null==(p=t.parameters)?void 0:p.docs,source:{originalSource:'() => An information message',...null==(A=null==(d=t.parameters)?void 0:d.docs)?void 0:A.source}}},s.parameters={...s.parameters,docs:{...null==(q=s.parameters)?void 0:q.docs,source:{originalSource:"() => \n An error message: Veniam explicabo dolor ipsam impedit. Eum eos ut et\n consequatur eos eaque explicabo et inventore. Aperiam aut consequatur sit\n ut. Iusto consequatur enim placeat enim quia voluptas pariatur. Culpa\n quaerat placeat magni et autem earum placeat deserunt eum. A autem enim\n dolorum. Quo sint nisi vel. Voluptate voluptates alias repudiandae doloribus\n nemo. Quia aperiam nihil magnam quos ut id. Pariatur itaque sint. Id vel\n aliquid ullam delectus animi quis.{' '}\n ",...null==(v=null==(g=s.parameters)?void 0:g.docs)?void 0:v.source}}};const F=["Success","Failure","Information","FailureLong"];export{r as Failure,s as FailureLong,t as Information,a as Success,F as __namedExportsOrder,E as default}; \ No newline at end of file +import{j as i}from"./jsx-runtime-CexXSJP5.js";import{A as e}from"./theme-ui-components.esm-BngKL4Rx.js";import"./index-BP8_t0zE.js";import"./parseProps-780b287c.browser.esm-DiCerVr_.js";import"./emotion-use-insertion-effect-with-fallbacks.browser.esm-UWD3gXM2.js";import"./theme-ui-core-jsx-runtime.browser.esm-CH0qhC10.js";import"./hoist-non-react-statics.cjs-CQI8syxn.js";const E={title:"Layout/Alert",component:e},a=()=>i.jsx(e,{variant:"success",children:"A successful message"}),r=()=>i.jsx(e,{variant:"failure",children:"An error message"}),t=()=>i.jsx(e,{variant:"info",children:"An information message"}),s=()=>i.jsxs(e,{variant:"failure",children:["An error message: Veniam explicabo dolor ipsam impedit. Eum eos ut et consequatur eos eaque explicabo et inventore. Aperiam aut consequatur sit ut. Iusto consequatur enim placeat enim quia voluptas pariatur. Culpa quaerat placeat magni et autem earum placeat deserunt eum. A autem enim dolorum. Quo sint nisi vel. Voluptate voluptates alias repudiandae doloribus nemo. Quia aperiam nihil magnam quos ut id. Pariatur itaque sint. Id vel aliquid ullam delectus animi quis."," "]});var o,u,n,m,l,c,p,d,A,q,g,v;a.parameters={...a.parameters,docs:{...null==(o=a.parameters)?void 0:o.docs,source:{originalSource:'() => A successful message',...null==(n=null==(u=a.parameters)?void 0:u.docs)?void 0:n.source}}},r.parameters={...r.parameters,docs:{...null==(m=r.parameters)?void 0:m.docs,source:{originalSource:'() => An error message',...null==(c=null==(l=r.parameters)?void 0:l.docs)?void 0:c.source}}},t.parameters={...t.parameters,docs:{...null==(p=t.parameters)?void 0:p.docs,source:{originalSource:'() => An information message',...null==(A=null==(d=t.parameters)?void 0:d.docs)?void 0:A.source}}},s.parameters={...s.parameters,docs:{...null==(q=s.parameters)?void 0:q.docs,source:{originalSource:"() => \n An error message: Veniam explicabo dolor ipsam impedit. Eum eos ut et\n consequatur eos eaque explicabo et inventore. Aperiam aut consequatur sit\n ut. Iusto consequatur enim placeat enim quia voluptas pariatur. Culpa\n quaerat placeat magni et autem earum placeat deserunt eum. A autem enim\n dolorum. Quo sint nisi vel. Voluptate voluptates alias repudiandae doloribus\n nemo. Quia aperiam nihil magnam quos ut id. Pariatur itaque sint. Id vel\n aliquid ullam delectus animi quis.{' '}\n ",...null==(v=null==(g=s.parameters)?void 0:g.docs)?void 0:v.source}}};const F=["Success","Failure","Information","FailureLong"];export{r as Failure,s as FailureLong,t as Information,a as Success,F as __namedExportsOrder,E as default}; \ No newline at end of file diff --git a/storybook-static/assets/ArticleCallToAction-S85J-T9-.js b/storybook-static/assets/ArticleCallToAction-Dg_5FoBY.js similarity index 84% rename from storybook-static/assets/ArticleCallToAction-S85J-T9-.js rename to storybook-static/assets/ArticleCallToAction-Dg_5FoBY.js index 5273aa923c..064c58ebb8 100644 --- a/storybook-static/assets/ArticleCallToAction-S85J-T9-.js +++ b/storybook-static/assets/ArticleCallToAction-Dg_5FoBY.js @@ -1 +1 @@ -import{j as e}from"./jsx-runtime-CexXSJP5.js";import{U as i}from"./Username-iPvtw0Lg.js";import{u as d}from"./theme-ui-core.browser.esm-CIov4Ln1.js";import{F as o,T as s,H as x}from"./theme-ui-components.esm-DCiJ1mMX.js";const n=t=>{const{author:r,children:n,contributors:a}=t,{theme:l}=d();return e.jsxs(o,{sx:{flexDirection:"column",alignItems:"center"},children:[e.jsxs(s,{variant:"body",sx:{fontSize:2},children:["Made by",e.jsx(i,{user:r,sx:{ml:1}})]}),a&&a.length?e.jsxs(s,{"data-testid":"ArticleCallToAction: contributors",variant:"quiet",sx:{display:"block",mt:2,textAlign:"center",fontSize:2},children:["With contributions from:"," ",a.map(((t,r)=>e.jsx(i,{user:t,sx:{mr:1}},r)))]}):null,e.jsx(x,{sx:{my:4},children:"Like what you see? \ud83d\udc47"}),e.jsx(o,{sx:{gap:2,[`@media screen and (max-width: ${l.breakpoints[0]})`]:{flexDirection:"column"}},children:n})]})};try{n.displayName="ArticleCallToAction",n.__docgenInfo={description:"",displayName:"ArticleCallToAction",props:{author:{defaultValue:null,description:"",name:"author",required:!0,type:{name:"User"}},contributors:{defaultValue:null,description:"",name:"contributors",required:!1,type:{name:"User[]"}}}}}catch{}export{n as A}; \ No newline at end of file +import{j as e}from"./jsx-runtime-CexXSJP5.js";import{U as i}from"./Username-CNsNRGy2.js";import{u as d}from"./theme-ui-core.browser.esm-CIov4Ln1.js";import{F as o,T as s,H as x}from"./theme-ui-components.esm-BngKL4Rx.js";const n=t=>{const{author:r,children:n,contributors:a}=t,{theme:l}=d();return e.jsxs(o,{sx:{flexDirection:"column",alignItems:"center"},children:[e.jsxs(s,{variant:"body",sx:{fontSize:2},children:["Made by",e.jsx(i,{user:r,sx:{ml:1}})]}),a&&a.length?e.jsxs(s,{"data-testid":"ArticleCallToAction: contributors",variant:"quiet",sx:{display:"block",mt:2,textAlign:"center",fontSize:2},children:["With contributions from:"," ",a.map(((t,s)=>e.jsx(i,{user:t,sx:{mr:1}},s)))]}):null,e.jsx(x,{sx:{my:4},children:"Like what you see? \ud83d\udc47"}),e.jsx(o,{sx:{gap:2,[`@media screen and (max-width: ${l.breakpoints[0]})`]:{flexDirection:"column"}},children:n})]})};try{n.displayName="ArticleCallToAction",n.__docgenInfo={description:"",displayName:"ArticleCallToAction",props:{author:{defaultValue:null,description:"",name:"author",required:!0,type:{name:"User"}},contributors:{defaultValue:null,description:"",name:"contributors",required:!1,type:{name:"User[]"}}}}}catch{}export{n as A}; \ No newline at end of file diff --git a/storybook-static/assets/ArticleCallToAction.stories-BKO2UBEP.js b/storybook-static/assets/ArticleCallToAction.stories-BKO2UBEP.js deleted file mode 100644 index 0e6ee9635a..0000000000 --- a/storybook-static/assets/ArticleCallToAction.stories-BKO2UBEP.js +++ /dev/null @@ -1 +0,0 @@ -import{j as e}from"./jsx-runtime-CexXSJP5.js";import{y as o}from"./index-D_kXk1yT.js";import{B as l}from"./Button-B7QBvkxh.js";import{LoggedOutWithCount as T}from"./UsefulStatsButton.stories-CwmlSmjo.js";import{A as r}from"./ArticleCallToAction-S85J-T9-.js";import"./index-BP8_t0zE.js";import"./Icon-BoVZOGVD.js";import"./emotion-styled.browser.esm-Dz2BNYeh.js";import"./extends-CF3RwP-h.js";import"./parseProps-780b287c.browser.esm-DiCerVr_.js";import"./emotion-use-insertion-effect-with-fallbacks.browser.esm-UWD3gXM2.js";import"./supporter-D7hp958O.js";import"./icon-arrow-down-CJeToCJe.js";import"./icon-star-active-ClN6U5FF.js";import"./theme-ui-core-jsx-runtime.browser.esm-CH0qhC10.js";import"./hoist-non-react-statics.cjs-CQI8syxn.js";import"./theme-ui-components.esm-DCiJ1mMX.js";import"./UsefulStatsButton-UfP_hPRY.js";import"./Tooltip-B9mgSRkZ.js";import"./floating-ui.dom-DtcZXcvp.js";import"./theme-ui-core.browser.esm-CIov4Ln1.js";import"./emotion-react.browser.esm-BYoRxRk_.js";import"./cjs-Clfm10Kj.js";import"./index-BXxqJQdV.js";import"./Username-iPvtw0Lg.js";import"./InternalLink-CtyTe3gy.js";import"./components-CutHIkdx.js";import"./index-BBRV8eG_.js";const X={title:"Layout/ArticleCallToAction",component:r},n=()=>e.jsxs(r,{author:t(),children:[e.jsx(l,{sx:{fontSize:2},children:"Leave a comment"}),e.jsx(T,{isLoggedIn:!1,hasUserVotedUseful:!1,votedUsefulCount:0,onUsefulClick:function(){throw new Error("Function not implemented.")}})]}),i=()=>e.jsx(r,{author:t(),children:e.jsx(T,{isLoggedIn:!1,hasUserVotedUseful:!1,votedUsefulCount:0,onUsefulClick:function(){throw new Error("Function not implemented.")}})}),a=()=>e.jsx(r,{author:t(),contributors:[{countryCode:o.address.countryCode(),userName:o.internet.userName(),isVerified:o.datatype.boolean(),isSupporter:o.datatype.boolean()}],children:e.jsx(l,{children:"Action"})}),t=()=>({countryCode:o.address.countryCode(),userName:o.internet.userName(),isVerified:o.datatype.boolean(),isSupporter:o.datatype.boolean()}),s=()=>e.jsx(r,{author:t(),contributors:o.helpers.uniqueArray(t,Math.floor(10*Math.random())),children:e.jsx(l,{children:"Action"})});var c,u,m,d,p,A,f,C,h,U,k,g;n.parameters={...n.parameters,docs:{...null==(c=n.parameters)?void 0:c.docs,source:{originalSource:"() => \n \n {\n throw new Error('Function not implemented.');\n }} />\n ",...null==(m=null==(u=n.parameters)?void 0:u.docs)?void 0:m.source}}},i.parameters={...i.parameters,docs:{...null==(d=i.parameters)?void 0:d.docs,source:{originalSource:"() => \n {\n throw new Error('Function not implemented.');\n }} />\n ",...null==(A=null==(p=i.parameters)?void 0:p.docs)?void 0:A.source}}},a.parameters={...a.parameters,docs:{...null==(f=a.parameters)?void 0:f.docs,source:{originalSource:"() => \n \n ",...null==(h=null==(C=a.parameters)?void 0:C.docs)?void 0:h.source}}},s.parameters={...s.parameters,docs:{...null==(U=s.parameters)?void 0:U.docs,source:{originalSource:"() => \n \n ",...null==(g=null==(k=s.parameters)?void 0:k.docs)?void 0:g.source}}};const Y=["ArticleCallToActionCommentAndUseful","ArticleCallToActionUseful","ArticleCallToActionSingleContributor","ArticleCallToActionMultipleContributors"];export{n as ArticleCallToActionCommentAndUseful,s as ArticleCallToActionMultipleContributors,a as ArticleCallToActionSingleContributor,i as ArticleCallToActionUseful,Y as __namedExportsOrder,X as default}; \ No newline at end of file diff --git a/storybook-static/assets/ArticleCallToAction.stories-qcZNjVYV.js b/storybook-static/assets/ArticleCallToAction.stories-qcZNjVYV.js new file mode 100644 index 0000000000..212f0d52a1 --- /dev/null +++ b/storybook-static/assets/ArticleCallToAction.stories-qcZNjVYV.js @@ -0,0 +1 @@ +import{j as e}from"./jsx-runtime-CexXSJP5.js";import{y as o}from"./index-D_kXk1yT.js";import{B as l}from"./Button-D4nxT_g_.js";import{LoggedOutWithCount as T}from"./UsefulStatsButton.stories-CzV8Tela.js";import{A as r}from"./ArticleCallToAction-Dg_5FoBY.js";import"./index-BP8_t0zE.js";import"./Icon-BoVZOGVD.js";import"./emotion-styled.browser.esm-Dz2BNYeh.js";import"./extends-CF3RwP-h.js";import"./parseProps-780b287c.browser.esm-DiCerVr_.js";import"./emotion-use-insertion-effect-with-fallbacks.browser.esm-UWD3gXM2.js";import"./supporter-D7hp958O.js";import"./icon-arrow-down-CJeToCJe.js";import"./icon-star-active-ClN6U5FF.js";import"./theme-ui-core-jsx-runtime.browser.esm-CH0qhC10.js";import"./hoist-non-react-statics.cjs-CQI8syxn.js";import"./theme-ui-components.esm-BngKL4Rx.js";import"./UsefulStatsButton-B_1AYhM5.js";import"./Tooltip-B9mgSRkZ.js";import"./floating-ui.dom-DtcZXcvp.js";import"./theme-ui-core.browser.esm-CIov4Ln1.js";import"./emotion-react.browser.esm-BYoRxRk_.js";import"./cjs-Clfm10Kj.js";import"./index-BXxqJQdV.js";import"./Username-CNsNRGy2.js";import"./InternalLink-BRM7MvOa.js";import"./components-CutHIkdx.js";import"./index-BBRV8eG_.js";import"./UserBadge-XI2JdGOl.js";const Y={title:"Layout/ArticleCallToAction",component:r},n=()=>e.jsxs(r,{author:t(),children:[e.jsx(l,{sx:{fontSize:2},children:"Leave a comment"}),e.jsx(T,{isLoggedIn:!1,hasUserVotedUseful:!1,votedUsefulCount:0,onUsefulClick:function(){throw new Error("Function not implemented.")}})]}),i=()=>e.jsx(r,{author:t(),children:e.jsx(T,{isLoggedIn:!1,hasUserVotedUseful:!1,votedUsefulCount:0,onUsefulClick:function(){throw new Error("Function not implemented.")}})}),a=()=>e.jsx(r,{author:t(),contributors:[{countryCode:o.address.countryCode(),userName:o.internet.userName(),isVerified:o.datatype.boolean(),isSupporter:o.datatype.boolean()}],children:e.jsx(l,{children:"Action"})}),t=()=>({countryCode:o.address.countryCode(),userName:o.internet.userName(),isVerified:o.datatype.boolean(),isSupporter:o.datatype.boolean()}),s=()=>e.jsx(r,{author:t(),contributors:o.helpers.uniqueArray(t,Math.floor(10*Math.random())),children:e.jsx(l,{children:"Action"})});var c,u,m,p,d,A,f,C,h,U,k,g;n.parameters={...n.parameters,docs:{...null==(c=n.parameters)?void 0:c.docs,source:{originalSource:"() => \n \n {\n throw new Error('Function not implemented.');\n }} />\n ",...null==(m=null==(u=n.parameters)?void 0:u.docs)?void 0:m.source}}},i.parameters={...i.parameters,docs:{...null==(p=i.parameters)?void 0:p.docs,source:{originalSource:"() => \n {\n throw new Error('Function not implemented.');\n }} />\n ",...null==(A=null==(d=i.parameters)?void 0:d.docs)?void 0:A.source}}},a.parameters={...a.parameters,docs:{...null==(f=a.parameters)?void 0:f.docs,source:{originalSource:"() => \n \n ",...null==(h=null==(C=a.parameters)?void 0:C.docs)?void 0:h.source}}},s.parameters={...s.parameters,docs:{...null==(U=s.parameters)?void 0:U.docs,source:{originalSource:"() => \n \n ",...null==(g=null==(k=s.parameters)?void 0:k.docs)?void 0:g.source}}};const Z=["ArticleCallToActionCommentAndUseful","ArticleCallToActionUseful","ArticleCallToActionSingleContributor","ArticleCallToActionMultipleContributors"];export{n as ArticleCallToActionCommentAndUseful,s as ArticleCallToActionMultipleContributors,a as ArticleCallToActionSingleContributor,i as ArticleCallToActionUseful,Z as __namedExportsOrder,Y as default}; \ No newline at end of file diff --git a/storybook-static/assets/Banner-Rp1eOMI_.js b/storybook-static/assets/Banner-CahIkehL.js similarity index 92% rename from storybook-static/assets/Banner-Rp1eOMI_.js rename to storybook-static/assets/Banner-CahIkehL.js index 2f322347ec..995c31f121 100644 --- a/storybook-static/assets/Banner-Rp1eOMI_.js +++ b/storybook-static/assets/Banner-CahIkehL.js @@ -1 +1 @@ -import{j as l}from"./jsx-runtime-CexXSJP5.js";import{A as o}from"./theme-ui-components.esm-DCiJ1mMX.js";const n=e=>{const{children:n,onClick:a,sx:r,variant:t}=e;return l.jsx(o,{"data-cy":"Banner",onClick:a,variant:t||"failure",sx:{borderRadius:0,alignItems:"center",flex:"1",justifyContent:"center",cursor:a?"pointer":"default",fontSize:2,":hover":{textDecoration:a?"underline":"none"},...r},children:n})};try{n.displayName="Banner",n.__docgenInfo={description:"",displayName:"Banner",props:{onClick:{defaultValue:null,description:"",name:"onClick",required:!1,type:{name:"(() => void)"}},sx:{defaultValue:null,description:"",name:"sx",required:!1,type:{name:"ThemeUIStyleObject"}},variant:{defaultValue:null,description:"",name:"variant",required:!1,type:{name:"enum",value:[{value:'"success"'},{value:'"info"'},{value:'"accent"'},{value:'"failure"'}]}}}}}catch{}export{n as B}; \ No newline at end of file +import{j as l}from"./jsx-runtime-CexXSJP5.js";import{A as o}from"./theme-ui-components.esm-BngKL4Rx.js";const n=e=>{const{children:n,onClick:a,sx:r,variant:t}=e;return l.jsx(o,{"data-cy":"Banner",onClick:a,variant:t||"failure",sx:{borderRadius:0,alignItems:"center",flex:"1",justifyContent:"center",cursor:a?"pointer":"default",fontSize:2,":hover":{textDecoration:a?"underline":"none"},...r},children:n})};try{n.displayName="Banner",n.__docgenInfo={description:"",displayName:"Banner",props:{onClick:{defaultValue:null,description:"",name:"onClick",required:!1,type:{name:"(() => void)"}},sx:{defaultValue:null,description:"",name:"sx",required:!1,type:{name:"ThemeUIStyleObject"}},variant:{defaultValue:null,description:"",name:"variant",required:!1,type:{name:"enum",value:[{value:'"success"'},{value:'"info"'},{value:'"accent"'},{value:'"failure"'}]}}}}}catch{}export{n as B}; \ No newline at end of file diff --git a/storybook-static/assets/Banner.stories-ppC-3OOU.js b/storybook-static/assets/Banner.stories-B2SQTCzy.js similarity index 93% rename from storybook-static/assets/Banner.stories-ppC-3OOU.js rename to storybook-static/assets/Banner.stories-B2SQTCzy.js index 9043b3288a..174702e247 100644 --- a/storybook-static/assets/Banner.stories-ppC-3OOU.js +++ b/storybook-static/assets/Banner.stories-B2SQTCzy.js @@ -1 +1 @@ -import{j as t}from"./jsx-runtime-CexXSJP5.js";import{B as e}from"./Banner-Rp1eOMI_.js";import"./index-BP8_t0zE.js";import"./theme-ui-components.esm-DCiJ1mMX.js";import"./parseProps-780b287c.browser.esm-DiCerVr_.js";import"./emotion-use-insertion-effect-with-fallbacks.browser.esm-UWD3gXM2.js";import"./theme-ui-core-jsx-runtime.browser.esm-CH0qhC10.js";import"./hoist-non-react-statics.cjs-CQI8syxn.js";const b={title:"Layout/Banner",component:e},n=()=>t.jsx(e,{children:"Defaults to a failure banner when no varient defined"}),r=()=>t.jsx(e,{variant:"accent",onClick:()=>null,children:"This is an accent with onClick"}),s=()=>t.jsx(e,{variant:"info",sx:{height:"200px",border:"4px solid #333"},children:"Info with custom stylings"}),a=()=>t.jsx(e,{variant:"success",onClick:()=>null,children:"Success Banner"});var o,c,i,l,u,m,p,d,h,f,x,B;n.parameters={...n.parameters,docs:{...null==(o=n.parameters)?void 0:o.docs,source:{originalSource:"() => Defaults to a failure banner when no varient defined",...null==(i=null==(c=n.parameters)?void 0:c.docs)?void 0:i.source}}},r.parameters={...r.parameters,docs:{...null==(l=r.parameters)?void 0:l.docs,source:{originalSource:'() => null}>\n This is an accent with onClick\n ',...null==(m=null==(u=r.parameters)?void 0:u.docs)?void 0:m.source}}},s.parameters={...s.parameters,docs:{...null==(p=s.parameters)?void 0:p.docs,source:{originalSource:"() => \n Info with custom stylings\n ",...null==(h=null==(d=s.parameters)?void 0:d.docs)?void 0:h.source}}},a.parameters={...a.parameters,docs:{...null==(f=a.parameters)?void 0:f.docs,source:{originalSource:'() => null}>\n Success Banner\n ',...null==(B=null==(x=a.parameters)?void 0:x.docs)?void 0:B.source}}};const D=["Default","AccentWithOnclick","InfoWithCustomStylings","Success"];export{r as AccentWithOnclick,n as Default,s as InfoWithCustomStylings,a as Success,D as __namedExportsOrder,b as default}; \ No newline at end of file +import{j as t}from"./jsx-runtime-CexXSJP5.js";import{B as e}from"./Banner-CahIkehL.js";import"./index-BP8_t0zE.js";import"./theme-ui-components.esm-BngKL4Rx.js";import"./parseProps-780b287c.browser.esm-DiCerVr_.js";import"./emotion-use-insertion-effect-with-fallbacks.browser.esm-UWD3gXM2.js";import"./theme-ui-core-jsx-runtime.browser.esm-CH0qhC10.js";import"./hoist-non-react-statics.cjs-CQI8syxn.js";const b={title:"Layout/Banner",component:e},n=()=>t.jsx(e,{children:"Defaults to a failure banner when no varient defined"}),r=()=>t.jsx(e,{variant:"accent",onClick:()=>null,children:"This is an accent with onClick"}),s=()=>t.jsx(e,{variant:"info",sx:{height:"200px",border:"4px solid #333"},children:"Info with custom stylings"}),a=()=>t.jsx(e,{variant:"success",onClick:()=>null,children:"Success Banner"});var o,c,i,l,u,m,p,d,h,f,x,B;n.parameters={...n.parameters,docs:{...null==(o=n.parameters)?void 0:o.docs,source:{originalSource:"() => Defaults to a failure banner when no varient defined",...null==(i=null==(c=n.parameters)?void 0:c.docs)?void 0:i.source}}},r.parameters={...r.parameters,docs:{...null==(l=r.parameters)?void 0:l.docs,source:{originalSource:'() => null}>\n This is an accent with onClick\n ',...null==(m=null==(u=r.parameters)?void 0:u.docs)?void 0:m.source}}},s.parameters={...s.parameters,docs:{...null==(p=s.parameters)?void 0:p.docs,source:{originalSource:"() => \n Info with custom stylings\n ",...null==(h=null==(d=s.parameters)?void 0:d.docs)?void 0:h.source}}},a.parameters={...a.parameters,docs:{...null==(f=a.parameters)?void 0:f.docs,source:{originalSource:'() => null}>\n Success Banner\n ',...null==(B=null==(x=a.parameters)?void 0:x.docs)?void 0:B.source}}};const D=["Default","AccentWithOnclick","InfoWithCustomStylings","Success"];export{r as AccentWithOnclick,n as Default,s as InfoWithCustomStylings,a as Success,D as __namedExportsOrder,b as default}; \ No newline at end of file diff --git a/storybook-static/assets/BlockedRoute-K9n5NNTD.js b/storybook-static/assets/BlockedRoute-B-LpWzKK.js similarity index 79% rename from storybook-static/assets/BlockedRoute-K9n5NNTD.js rename to storybook-static/assets/BlockedRoute-B-LpWzKK.js index 870e6b69e7..72645d848c 100644 --- a/storybook-static/assets/BlockedRoute-K9n5NNTD.js +++ b/storybook-static/assets/BlockedRoute-B-LpWzKK.js @@ -1 +1 @@ -import{j as e}from"./jsx-runtime-CexXSJP5.js";import{B as n}from"./Button-B7QBvkxh.js";import{I as c}from"./InternalLink-CtyTe3gy.js";import{F as o,T as a,a as s}from"./theme-ui-components.esm-DCiJ1mMX.js";const r=t=>{const r=t.redirectLabel||"Back to home",i=t.redirectUrl||"/";return e.jsxs(o,{sx:{justifyContent:"center",flexDirection:"column",mt:8},"data-cy":"BlockedRoute",children:[e.jsx(a,{sx:{width:"100%",textAlign:"center"},children:t.children}),e.jsx(s,{sx:{textAlign:"center",mt:2},children:e.jsx(c,{to:i,children:e.jsx(n,{type:"button",variant:"subtle",small:!0,children:r})})})]})};try{r.displayName="BlockedRoute",r.__docgenInfo={description:"",displayName:"BlockedRoute",props:{redirectUrl:{defaultValue:null,description:"",name:"redirectUrl",required:!1,type:{name:"string"}},redirectLabel:{defaultValue:null,description:"",name:"redirectLabel",required:!1,type:{name:"string"}}}}}catch{}export{r as B}; \ No newline at end of file +import{j as e}from"./jsx-runtime-CexXSJP5.js";import{B as n}from"./Button-D4nxT_g_.js";import{I as c}from"./InternalLink-BRM7MvOa.js";import{F as o,T as a,a as s}from"./theme-ui-components.esm-BngKL4Rx.js";const r=t=>{const r=t.redirectLabel||"Back to home",i=t.redirectUrl||"/";return e.jsxs(o,{sx:{justifyContent:"center",flexDirection:"column",mt:8},"data-cy":"BlockedRoute",children:[e.jsx(a,{sx:{width:"100%",textAlign:"center"},children:t.children}),e.jsx(s,{sx:{textAlign:"center",mt:2},children:e.jsx(c,{to:i,children:e.jsx(n,{type:"button",variant:"subtle",small:!0,children:r})})})]})};try{r.displayName="BlockedRoute",r.__docgenInfo={description:"",displayName:"BlockedRoute",props:{redirectUrl:{defaultValue:null,description:"",name:"redirectUrl",required:!1,type:{name:"string"}},redirectLabel:{defaultValue:null,description:"",name:"redirectLabel",required:!1,type:{name:"string"}}}}}catch{}export{r as B}; \ No newline at end of file diff --git a/storybook-static/assets/BlockedRoute.stories-C_bO7t8y.js b/storybook-static/assets/BlockedRoute.stories-BpECWIAY.js similarity index 84% rename from storybook-static/assets/BlockedRoute.stories-C_bO7t8y.js rename to storybook-static/assets/BlockedRoute.stories-BpECWIAY.js index 73d6e62205..a37d45f5cc 100644 --- a/storybook-static/assets/BlockedRoute.stories-C_bO7t8y.js +++ b/storybook-static/assets/BlockedRoute.stories-BpECWIAY.js @@ -1 +1 @@ -import{j as p}from"./jsx-runtime-CexXSJP5.js";import{y as l}from"./index-D_kXk1yT.js";import{B as o}from"./BlockedRoute-K9n5NNTD.js";import"./index-BP8_t0zE.js";import"./Button-B7QBvkxh.js";import"./Icon-BoVZOGVD.js";import"./emotion-styled.browser.esm-Dz2BNYeh.js";import"./extends-CF3RwP-h.js";import"./parseProps-780b287c.browser.esm-DiCerVr_.js";import"./emotion-use-insertion-effect-with-fallbacks.browser.esm-UWD3gXM2.js";import"./supporter-D7hp958O.js";import"./icon-arrow-down-CJeToCJe.js";import"./icon-star-active-ClN6U5FF.js";import"./theme-ui-core-jsx-runtime.browser.esm-CH0qhC10.js";import"./hoist-non-react-statics.cjs-CQI8syxn.js";import"./theme-ui-components.esm-DCiJ1mMX.js";import"./InternalLink-CtyTe3gy.js";import"./components-CutHIkdx.js";import"./index-BBRV8eG_.js";import"./index-BXxqJQdV.js";const S={title:"Layout/BlockedRoute",component:o},e=()=>p.jsx(o,{children:l.lorem.sentences(2)}),r=()=>p.jsx(o,{redirectLabel:"A custom call to action",redirectUrl:"/another-url",children:l.lorem.sentences(2)});var t,s,c,m,a,i;e.parameters={...e.parameters,docs:{...null==(t=e.parameters)?void 0:t.docs,source:{originalSource:"() => {faker.lorem.sentences(2)}",...null==(c=null==(s=e.parameters)?void 0:s.docs)?void 0:c.source}}},r.parameters={...r.parameters,docs:{...null==(m=r.parameters)?void 0:m.docs,source:{originalSource:'() => \n {faker.lorem.sentences(2)}\n ',...null==(i=null==(a=r.parameters)?void 0:a.docs)?void 0:i.source}}};const U=["Default","OverrideButton"];export{e as Default,r as OverrideButton,U as __namedExportsOrder,S as default}; \ No newline at end of file +import{j as p}from"./jsx-runtime-CexXSJP5.js";import{y as l}from"./index-D_kXk1yT.js";import{B as o}from"./BlockedRoute-B-LpWzKK.js";import"./index-BP8_t0zE.js";import"./Button-D4nxT_g_.js";import"./Icon-BoVZOGVD.js";import"./emotion-styled.browser.esm-Dz2BNYeh.js";import"./extends-CF3RwP-h.js";import"./parseProps-780b287c.browser.esm-DiCerVr_.js";import"./emotion-use-insertion-effect-with-fallbacks.browser.esm-UWD3gXM2.js";import"./supporter-D7hp958O.js";import"./icon-arrow-down-CJeToCJe.js";import"./icon-star-active-ClN6U5FF.js";import"./theme-ui-core-jsx-runtime.browser.esm-CH0qhC10.js";import"./hoist-non-react-statics.cjs-CQI8syxn.js";import"./theme-ui-components.esm-BngKL4Rx.js";import"./InternalLink-BRM7MvOa.js";import"./components-CutHIkdx.js";import"./index-BBRV8eG_.js";import"./index-BXxqJQdV.js";const S={title:"Layout/BlockedRoute",component:o},e=()=>p.jsx(o,{children:l.lorem.sentences(2)}),r=()=>p.jsx(o,{redirectLabel:"A custom call to action",redirectUrl:"/another-url",children:l.lorem.sentences(2)});var t,s,c,m,a,i;e.parameters={...e.parameters,docs:{...null==(t=e.parameters)?void 0:t.docs,source:{originalSource:"() => {faker.lorem.sentences(2)}",...null==(c=null==(s=e.parameters)?void 0:s.docs)?void 0:c.source}}},r.parameters={...r.parameters,docs:{...null==(m=r.parameters)?void 0:m.docs,source:{originalSource:'() => \n {faker.lorem.sentences(2)}\n ',...null==(i=null==(a=r.parameters)?void 0:a.docs)?void 0:i.source}}};const U=["Default","OverrideButton"];export{e as Default,r as OverrideButton,U as __namedExportsOrder,S as default}; \ No newline at end of file diff --git a/storybook-static/assets/Breadcrumbs-fIZcmrbj.js b/storybook-static/assets/Breadcrumbs-C-8z0Dk9.js similarity index 92% rename from storybook-static/assets/Breadcrumbs-fIZcmrbj.js rename to storybook-static/assets/Breadcrumbs-C-8z0Dk9.js index c06c6b1a96..f0e327d6cb 100644 --- a/storybook-static/assets/Breadcrumbs-fIZcmrbj.js +++ b/storybook-static/assets/Breadcrumbs-C-8z0Dk9.js @@ -1 +1 @@ -import{j as r}from"./jsx-runtime-CexXSJP5.js";import{I as l}from"./Icon-BoVZOGVD.js";import{B as s}from"./Button-B7QBvkxh.js";import{L as c}from"./components-CutHIkdx.js";import{a as m,T as p,F as o}from"./theme-ui-components.esm-DCiJ1mMX.js";const u=({text:e,link:t})=>t?r.jsx(c,{to:t,children:r.jsx(s,{type:"button",variant:"breadcrumb",children:e})}):r.jsx(s,{type:"button",variant:"breadcrumb",children:e}),n=({text:e,link:t,isLast:s})=>r.jsx(m,{style:{display:"inline-flex",marginRight:"3px"},"data-testid":"breadcrumbsItem","data-cy":"breadcrumbsItem",children:s?r.jsx(p,{sx:{display:"block",color:"black",fontSize:15,textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden",width:[100,"100%"]},children:e}):r.jsx(u,{link:t,text:e})});try{n.displayName="BreadcrumbItem",n.__docgenInfo={description:"",displayName:"BreadcrumbItem",props:{text:{defaultValue:null,description:"",name:"text",required:!0,type:{name:"string"}},link:{defaultValue:null,description:"",name:"link",required:!1,type:{name:"string"}},isLast:{defaultValue:null,description:"",name:"isLast",required:!0,type:{name:"boolean"}}}}}catch{}const d=({steps:e})=>r.jsx(o,{sx:{marginLeft:-1,marginTop:[2,2,7],marginBottom:2,padding:0,alignItems:"center"},children:e.map(((t,s)=>{const a=s===e.length-1;return r.jsxs(o,{sx:{alignItems:"center"},children:[r.jsx(n,{text:t.text,link:t.link,isLast:a}),!a&&r.jsx(l,{glyph:"chevron-right",color:"black",marginRight:"8px","data-testid":"breadcrumbsChevron"})]},s)}))});try{d.displayName="Breadcrumbs",d.__docgenInfo={description:"",displayName:"Breadcrumbs",props:{steps:{defaultValue:null,description:"",name:"steps",required:!0,type:{name:"Step[]"}}}}}catch{}export{d as B}; \ No newline at end of file +import{j as r}from"./jsx-runtime-CexXSJP5.js";import{I as l}from"./Icon-BoVZOGVD.js";import{B as s}from"./Button-D4nxT_g_.js";import{L as c}from"./components-CutHIkdx.js";import{a as m,T as p,F as o}from"./theme-ui-components.esm-BngKL4Rx.js";const u=({text:e,link:t})=>t?r.jsx(c,{to:t,children:r.jsx(s,{type:"button",variant:"breadcrumb",children:e})}):r.jsx(s,{type:"button",variant:"breadcrumb",children:e}),n=({text:e,link:t,isLast:s})=>r.jsx(m,{style:{display:"inline-flex",marginRight:"3px"},"data-testid":"breadcrumbsItem","data-cy":"breadcrumbsItem",children:s?r.jsx(p,{sx:{display:"block",color:"black",fontSize:15,textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden",width:[100,"100%"]},children:e}):r.jsx(u,{link:t,text:e})});try{n.displayName="BreadcrumbItem",n.__docgenInfo={description:"",displayName:"BreadcrumbItem",props:{text:{defaultValue:null,description:"",name:"text",required:!0,type:{name:"string"}},link:{defaultValue:null,description:"",name:"link",required:!1,type:{name:"string"}},isLast:{defaultValue:null,description:"",name:"isLast",required:!0,type:{name:"boolean"}}}}}catch{}const d=({steps:e})=>r.jsx(o,{sx:{marginLeft:-1,marginTop:[2,2,7],marginBottom:2,padding:0,alignItems:"center"},children:e.map(((t,s)=>{const a=s===e.length-1;return r.jsxs(o,{sx:{alignItems:"center"},children:[r.jsx(n,{text:t.text,link:t.link,isLast:a}),!a&&r.jsx(l,{glyph:"chevron-right",color:"black",marginRight:"8px","data-testid":"breadcrumbsChevron"})]},s)}))});try{d.displayName="Breadcrumbs",d.__docgenInfo={description:"",displayName:"Breadcrumbs",props:{steps:{defaultValue:null,description:"",name:"steps",required:!0,type:{name:"Step[]"}}}}}catch{}export{d as B}; \ No newline at end of file diff --git a/storybook-static/assets/Breadcrumbs.stories-COKopDR9.js b/storybook-static/assets/Breadcrumbs.stories-CSn4pAds.js similarity index 89% rename from storybook-static/assets/Breadcrumbs.stories-COKopDR9.js rename to storybook-static/assets/Breadcrumbs.stories-CSn4pAds.js index e40fb7adba..62f51b5c81 100644 --- a/storybook-static/assets/Breadcrumbs.stories-COKopDR9.js +++ b/storybook-static/assets/Breadcrumbs.stories-CSn4pAds.js @@ -1 +1 @@ -import{j as p}from"./jsx-runtime-CexXSJP5.js";import{B as r}from"./Breadcrumbs-fIZcmrbj.js";import"./index-BP8_t0zE.js";import"./Icon-BoVZOGVD.js";import"./emotion-styled.browser.esm-Dz2BNYeh.js";import"./extends-CF3RwP-h.js";import"./parseProps-780b287c.browser.esm-DiCerVr_.js";import"./emotion-use-insertion-effect-with-fallbacks.browser.esm-UWD3gXM2.js";import"./supporter-D7hp958O.js";import"./icon-arrow-down-CJeToCJe.js";import"./icon-star-active-ClN6U5FF.js";import"./theme-ui-core-jsx-runtime.browser.esm-CH0qhC10.js";import"./hoist-non-react-statics.cjs-CQI8syxn.js";import"./Button-B7QBvkxh.js";import"./theme-ui-components.esm-DCiJ1mMX.js";import"./components-CutHIkdx.js";import"./index-BBRV8eG_.js";import"./index-BXxqJQdV.js";const D={title:"Layout/Breadcrumbs",component:r},t=()=>p.jsx(r,{steps:[{text:"Question",link:"/questions"},{text:"Category",link:"/questions?category=Category"},{text:"Are we real?"}]}),e=()=>p.jsx(r,{steps:[{text:"Question",link:"/questions"},{text:"Are we real?"}]});var o,s,a,i,n,m;t.parameters={...t.parameters,docs:{...null==(o=t.parameters)?void 0:o.docs,source:{originalSource:"() => ",...null==(a=null==(s=t.parameters)?void 0:s.docs)?void 0:a.source}}},e.parameters={...e.parameters,docs:{...null==(i=e.parameters)?void 0:i.docs,source:{originalSource:"() => ",...null==(m=null==(n=e.parameters)?void 0:n.docs)?void 0:m.source}}};const E=["Default","NoCategory"];export{t as Default,e as NoCategory,E as __namedExportsOrder,D as default}; \ No newline at end of file +import{j as p}from"./jsx-runtime-CexXSJP5.js";import{B as r}from"./Breadcrumbs-C-8z0Dk9.js";import"./index-BP8_t0zE.js";import"./Icon-BoVZOGVD.js";import"./emotion-styled.browser.esm-Dz2BNYeh.js";import"./extends-CF3RwP-h.js";import"./parseProps-780b287c.browser.esm-DiCerVr_.js";import"./emotion-use-insertion-effect-with-fallbacks.browser.esm-UWD3gXM2.js";import"./supporter-D7hp958O.js";import"./icon-arrow-down-CJeToCJe.js";import"./icon-star-active-ClN6U5FF.js";import"./theme-ui-core-jsx-runtime.browser.esm-CH0qhC10.js";import"./hoist-non-react-statics.cjs-CQI8syxn.js";import"./Button-D4nxT_g_.js";import"./theme-ui-components.esm-BngKL4Rx.js";import"./components-CutHIkdx.js";import"./index-BBRV8eG_.js";import"./index-BXxqJQdV.js";const D={title:"Layout/Breadcrumbs",component:r},t=()=>p.jsx(r,{steps:[{text:"Question",link:"/questions"},{text:"Category",link:"/questions?category=Category"},{text:"Are we real?"}]}),e=()=>p.jsx(r,{steps:[{text:"Question",link:"/questions"},{text:"Are we real?"}]});var o,s,a,i,n,m;t.parameters={...t.parameters,docs:{...null==(o=t.parameters)?void 0:o.docs,source:{originalSource:"() => ",...null==(a=null==(s=t.parameters)?void 0:s.docs)?void 0:a.source}}},e.parameters={...e.parameters,docs:{...null==(i=e.parameters)?void 0:i.docs,source:{originalSource:"() => ",...null==(m=null==(n=e.parameters)?void 0:n.docs)?void 0:m.source}}};const E=["Default","NoCategory"];export{t as Default,e as NoCategory,E as __namedExportsOrder,D as default}; \ No newline at end of file diff --git a/storybook-static/assets/Button-B7QBvkxh.js b/storybook-static/assets/Button-D4nxT_g_.js similarity index 98% rename from storybook-static/assets/Button-B7QBvkxh.js rename to storybook-static/assets/Button-D4nxT_g_.js index 94c92ddeb9..681e847aba 100644 --- a/storybook-static/assets/Button-B7QBvkxh.js +++ b/storybook-static/assets/Button-D4nxT_g_.js @@ -1 +1 @@ -import{j as t}from"./jsx-runtime-CexXSJP5.js";import{I as i}from"./Icon-BoVZOGVD.js";import{B as c,F as v,T as s}from"./theme-ui-components.esm-DCiJ1mMX.js";const u={small:{px:2,py:1,pl:7,fontSize:1,height:"2rem"},default:{px:3,pl:9},large:{px:4,py:3,pl:10,fontSize:4,height:"3.5rem"}};function o(e,l){if(!u[`${e}`]&&!l)return{};if(!u[`${e}`]&&l)return{px:3,pl:9};const a={...u[`${e}`]};return l||delete a.pl,a}function d(e){return"large"===e?1.25:1}function p(e,l){const a={...e};return l.forEach((e=>{a[e]&&delete a[e]})),a}const r=e=>{var l;const[a]=Object.keys(e).filter((e=>Object.prototype.hasOwnProperty.call(u,e)));return t.jsxs(c,{...p(e,["small","large","showIconOnly","iconColor"]),sx:{...o(a,!!e.icon),...e.showIconOnly?{pr:0}:{},...e.sx},children:[e.icon&&t.jsx(v,{"aria-hidden":!0,sx:{position:"absolute",top:0,left:0,height:"100%",flexDirection:"column",justifyContent:"center",alignItems:"center",px:(null==(l=o(a,!!e.icon))?void 0:l.px)||0,boxSizing:"border-box",fontSize:0,maxWidth:"100%",lineHeight:0,transform:`translateY(-1px) scale(${d(a)})`,pointerEvents:"none"},children:t.jsx(i,{glyph:e.icon,color:e.iconColor})}),t.jsx(s,{sx:{...e.showIconOnly?{clipPath:"inset(100%)",clip:"rect(1px, 1px, 1px, 1px)",height:"1px",overflow:"hidden",position:"absolute",whiteSpace:"nowrap",width:"1px"}:{}},children:e.children})]})};try{r.displayName="Button",r.__docgenInfo={description:"",displayName:"Button",props:{icon:{defaultValue:null,description:"",name:"icon",required:!1,type:{name:"enum",value:[{value:'"map"'},{value:'"menu"'},{value:'"search"'},{value:'"time"'},{value:'"filter"'},{value:'"image"'},{value:'"view"'},{value:'"email"'},{value:'"step"'},{value:'"account-circle"'},{value:'"account"'},{value:'"add"'},{value:'"arrow-curved-bottom-right"'},{value:'"arrow-back"'},{value:'"arrow-down"'},{value:'"arrow-forward"'},{value:'"arrow-full-down"'},{value:'"arrow-full-up"'},{value:'"bazar"'},{value:'"check"'},{value:'"chevron-down"'},{value:'"chevron-left"'},{value:'"chevron-right"'},{value:'"chevron-up"'},{value:'"close"'},{value:'"comment"'},{value:'"contact"'},{value:'"discord"'},{value:'"delete"'},{value:'"difficulty"'},{value:'"download"'},{value:'"download-cloud"'},{value:'"edit"'},{value:'"email-outline"'},{value:'"employee"'},{value:'"external-link"'},{value:'"external-url"'},{value:'"facebook"'},{value:'"flag-unknown"'},{value:'"hide"'},{value:'"hyperlink"'},{value:'"impact"'},{value:'"instagram"'},{value:'"loading"'},{value:'"location-on"'},{value:'"lock"'},{value:'"machine"'},{value:'"mail-outline"'},{value:'"more-vert"'},{value:'"notifications"'},{value:'"patreon"'},{value:'"pdf"'},{value:'"plastic"'},{value:'"profile"'},{value:'"revenue"'},{value:'"show"'},{value:'"slack"'},{value:'"sliders"'},{value:'"social-media"'},{value:'"star"'},{value:'"star-active"'},{value:'"supporter"'},{value:'"thunderbolt"'},{value:'"thunderbolt-grey"'},{value:'"turned-in"'},{value:'"update"'},{value:'"upload"'},{value:'"useful"'},{value:'"verified"'},{value:'"volunteer"'},{value:'"website"'},{value:'"globe"'},{value:'"gps-location"'}]}},disabled:{defaultValue:null,description:"",name:"disabled",required:!1,type:{name:"boolean"}},small:{defaultValue:null,description:"",name:"small",required:!1,type:{name:"boolean"}},large:{defaultValue:null,description:"",name:"large",required:!1,type:{name:"boolean"}},showIconOnly:{defaultValue:null,description:"",name:"showIconOnly",required:!1,type:{name:"boolean"}},iconColor:{defaultValue:null,description:"",name:"iconColor",required:!1,type:{name:"string"}},ref:{defaultValue:null,description:"",name:"ref",required:!1,type:{name:"((instance: HTMLButtonElement | null) => void) | RefObject | null"}}}}}catch{}export{r as B}; \ No newline at end of file +import{j as t}from"./jsx-runtime-CexXSJP5.js";import{I as i}from"./Icon-BoVZOGVD.js";import{B as c,F as v,T as s}from"./theme-ui-components.esm-BngKL4Rx.js";const u={small:{px:2,py:1,pl:7,fontSize:1,height:"2rem"},default:{px:3,pl:9},large:{px:4,py:3,pl:10,fontSize:4,height:"3.5rem"}};function o(e,l){if(!u[`${e}`]&&!l)return{};if(!u[`${e}`]&&l)return{px:3,pl:9};const a={...u[`${e}`]};return l||delete a.pl,a}function d(e){return"large"===e?1.25:1}function p(e,l){const a={...e};return l.forEach((e=>{a[e]&&delete a[e]})),a}const r=e=>{var l;const[a]=Object.keys(e).filter((e=>Object.prototype.hasOwnProperty.call(u,e)));return t.jsxs(c,{...p(e,["small","large","showIconOnly","iconColor"]),sx:{...o(a,!!e.icon),...e.showIconOnly?{pr:0}:{},...e.sx},children:[e.icon&&t.jsx(v,{"aria-hidden":!0,sx:{position:"absolute",top:0,left:0,height:"100%",flexDirection:"column",justifyContent:"center",alignItems:"center",px:(null==(l=o(a,!!e.icon))?void 0:l.px)||0,boxSizing:"border-box",fontSize:0,maxWidth:"100%",lineHeight:0,transform:`translateY(-1px) scale(${d(a)})`,pointerEvents:"none"},children:t.jsx(i,{glyph:e.icon,color:e.iconColor})}),t.jsx(s,{sx:{...e.showIconOnly?{clipPath:"inset(100%)",clip:"rect(1px, 1px, 1px, 1px)",height:"1px",overflow:"hidden",position:"absolute",whiteSpace:"nowrap",width:"1px"}:{}},children:e.children})]})};try{r.displayName="Button",r.__docgenInfo={description:"",displayName:"Button",props:{icon:{defaultValue:null,description:"",name:"icon",required:!1,type:{name:"enum",value:[{value:'"map"'},{value:'"menu"'},{value:'"search"'},{value:'"time"'},{value:'"filter"'},{value:'"image"'},{value:'"view"'},{value:'"email"'},{value:'"step"'},{value:'"account-circle"'},{value:'"account"'},{value:'"add"'},{value:'"arrow-curved-bottom-right"'},{value:'"arrow-back"'},{value:'"arrow-down"'},{value:'"arrow-forward"'},{value:'"arrow-full-down"'},{value:'"arrow-full-up"'},{value:'"bazar"'},{value:'"check"'},{value:'"chevron-down"'},{value:'"chevron-left"'},{value:'"chevron-right"'},{value:'"chevron-up"'},{value:'"close"'},{value:'"comment"'},{value:'"contact"'},{value:'"discord"'},{value:'"delete"'},{value:'"difficulty"'},{value:'"download"'},{value:'"download-cloud"'},{value:'"edit"'},{value:'"email-outline"'},{value:'"employee"'},{value:'"external-link"'},{value:'"external-url"'},{value:'"facebook"'},{value:'"flag-unknown"'},{value:'"hide"'},{value:'"hyperlink"'},{value:'"impact"'},{value:'"instagram"'},{value:'"loading"'},{value:'"location-on"'},{value:'"lock"'},{value:'"machine"'},{value:'"mail-outline"'},{value:'"more-vert"'},{value:'"notifications"'},{value:'"patreon"'},{value:'"pdf"'},{value:'"plastic"'},{value:'"profile"'},{value:'"revenue"'},{value:'"show"'},{value:'"slack"'},{value:'"sliders"'},{value:'"social-media"'},{value:'"star"'},{value:'"star-active"'},{value:'"supporter"'},{value:'"thunderbolt"'},{value:'"thunderbolt-grey"'},{value:'"turned-in"'},{value:'"update"'},{value:'"upload"'},{value:'"useful"'},{value:'"verified"'},{value:'"volunteer"'},{value:'"website"'},{value:'"globe"'},{value:'"gps-location"'}]}},disabled:{defaultValue:null,description:"",name:"disabled",required:!1,type:{name:"boolean"}},small:{defaultValue:null,description:"",name:"small",required:!1,type:{name:"boolean"}},large:{defaultValue:null,description:"",name:"large",required:!1,type:{name:"boolean"}},showIconOnly:{defaultValue:null,description:"",name:"showIconOnly",required:!1,type:{name:"boolean"}},iconColor:{defaultValue:null,description:"",name:"iconColor",required:!1,type:{name:"string"}},ref:{defaultValue:null,description:"",name:"ref",required:!1,type:{name:"((instance: HTMLButtonElement | null) => void) | RefObject | null"}}}}}catch{}export{r as B}; \ No newline at end of file diff --git a/storybook-static/assets/Button.stories-AePka3C6.js b/storybook-static/assets/Button.stories-B35cgDfd.js similarity index 98% rename from storybook-static/assets/Button.stories-AePka3C6.js rename to storybook-static/assets/Button.stories-B35cgDfd.js index 1be9a12a35..35a48341e0 100644 --- a/storybook-static/assets/Button.stories-AePka3C6.js +++ b/storybook-static/assets/Button.stories-B35cgDfd.js @@ -1 +1 @@ -import{j as e}from"./jsx-runtime-CexXSJP5.js";import{g as Y}from"./Icon-BoVZOGVD.js";import{B as t}from"./Button-B7QBvkxh.js";import"./index-BP8_t0zE.js";import"./emotion-styled.browser.esm-Dz2BNYeh.js";import"./extends-CF3RwP-h.js";import"./parseProps-780b287c.browser.esm-DiCerVr_.js";import"./emotion-use-insertion-effect-with-fallbacks.browser.esm-UWD3gXM2.js";import"./supporter-D7hp958O.js";import"./icon-arrow-down-CJeToCJe.js";import"./icon-star-active-ClN6U5FF.js";import"./theme-ui-core-jsx-runtime.browser.esm-CH0qhC10.js";import"./hoist-non-react-statics.cjs-CQI8syxn.js";import"./theme-ui-components.esm-DCiJ1mMX.js";const me={title:"Components/Button",component:t},a=[{small:!0,label:"Small"},{label:"Default"},{large:!0,label:"Large"}],o=()=>e.jsx(t,{children:"Button Text"}),s=()=>e.jsxs(e.Fragment,{children:[e.jsx(t,{disabled:!0,children:"Disabled"}),e.jsx(t,{icon:"delete",disabled:!0,children:"Disabled"})]}),i=()=>e.jsxs(e.Fragment,{children:[e.jsx(t,{variant:"primary",children:"Primary"}),e.jsx(t,{icon:"delete",variant:"primary",children:"Primary"}),a.map(((n,r)=>e.jsx(t,{variant:"primary",...n,children:n.label},r)))]}),c=()=>e.jsxs(e.Fragment,{children:[e.jsx(t,{variant:"secondary",children:"Secondary"}),e.jsx(t,{icon:"delete",variant:"secondary",children:"Secondary"}),a.map(((n,r)=>e.jsx(t,{variant:"secondary",...n,children:n.label},r)))]}),l=()=>e.jsxs(e.Fragment,{children:[e.jsx(t,{variant:"destructive",children:"Destructive"}),e.jsx(t,{icon:"delete",variant:"destructive",children:"Destructive"}),a.map(((n,r)=>e.jsx(t,{variant:"destructive",...n,children:n.label},r)))]}),u=()=>e.jsxs(e.Fragment,{children:[e.jsx(t,{variant:"subtle",children:"Subtle"}),e.jsx(t,{variant:"subtle",icon:"account-circle",children:"Subtle"}),a.map(((n,r)=>e.jsx(t,{variant:"subtle",...n,children:n.label},r)))]}),d=()=>e.jsxs(e.Fragment,{children:[e.jsx(t,{variant:"outline",children:"Outline"}),e.jsx(t,{variant:"outline",icon:"account-circle",children:"Outline"}),a.map(((n,r)=>e.jsx(t,{variant:"outline",...n,children:n.label},r)))]}),m=()=>e.jsxs(e.Fragment,{children:[e.jsx(t,{small:!0,children:"Small Button"}),e.jsx(t,{small:!0,icon:"delete",children:"Small Button with Icon"})]}),p=()=>e.jsxs(e.Fragment,{children:[e.jsx(t,{large:!0,children:"Large Button"}),e.jsx(t,{large:!0,icon:"delete",children:"Large Button with Icon"})]}),B=()=>e.jsx(e.Fragment,{children:e.jsx(t,{large:!0,icon:"delete",showIconOnly:!0,children:"Icon Button with hidden text"})}),v=()=>e.jsx(e.Fragment,{children:a.map((n=>["primary","secondary","outline"].map((r=>Object.keys(Y).map(((a,o)=>e.jsxs(t,{icon:a,...n,variant:r,children:[n.label," with Icon"]},o)))))))});var h,y,x,g,b,j,S,k,O,I,D,w,F,z,L,P,f,_,E,T,C,R,q,A,G,H,J,K,M,N,Q,U,V;o.parameters={...o.parameters,docs:{...null==(h=o.parameters)?void 0:h.docs,source:{originalSource:"() => ",...null==(x=null==(y=o.parameters)?void 0:y.docs)?void 0:x.source}}},s.parameters={...s.parameters,docs:{...null==(g=s.parameters)?void 0:g.docs,source:{originalSource:'() => <>\n \n \n ',...null==(j=null==(b=s.parameters)?void 0:b.docs)?void 0:j.source}}},i.parameters={...i.parameters,docs:{...null==(S=i.parameters)?void 0:S.docs,source:{originalSource:"() => <>\n \n \n {sizeOptions.map((v, k) => )}\n ",...null==(O=null==(k=i.parameters)?void 0:k.docs)?void 0:O.source}}},c.parameters={...c.parameters,docs:{...null==(I=c.parameters)?void 0:I.docs,source:{originalSource:"() => <>\n \n \n {sizeOptions.map((v, k) => )}\n ",...null==(w=null==(D=c.parameters)?void 0:D.docs)?void 0:w.source}}},l.parameters={...l.parameters,docs:{...null==(F=l.parameters)?void 0:F.docs,source:{originalSource:"() => <>\n \n \n {sizeOptions.map((v, k) => )}\n ",...null==(L=null==(z=l.parameters)?void 0:z.docs)?void 0:L.source}}},u.parameters={...u.parameters,docs:{...null==(P=u.parameters)?void 0:P.docs,source:{originalSource:"() => <>\n \n \n {sizeOptions.map((v, k) => )}\n ",...null==(_=null==(f=u.parameters)?void 0:f.docs)?void 0:_.source}}},d.parameters={...d.parameters,docs:{...null==(E=d.parameters)?void 0:E.docs,source:{originalSource:"() => <>\n \n \n {sizeOptions.map((v, k) => )}\n ",...null==(C=null==(T=d.parameters)?void 0:T.docs)?void 0:C.source}}},m.parameters={...m.parameters,docs:{...null==(R=m.parameters)?void 0:R.docs,source:{originalSource:'() => <>\n \n \n ',...null==(A=null==(q=m.parameters)?void 0:q.docs)?void 0:A.source}}},p.parameters={...p.parameters,docs:{...null==(G=p.parameters)?void 0:G.docs,source:{originalSource:'() => <>\n \n \n ',...null==(J=null==(H=p.parameters)?void 0:H.docs)?void 0:J.source}}},B.parameters={...B.parameters,docs:{...null==(K=B.parameters)?void 0:K.docs,source:{originalSource:'() => <>\n \n ',...null==(N=null==(M=B.parameters)?void 0:M.docs)?void 0:N.source}}},v.parameters={...v.parameters,docs:{...null==(Q=v.parameters)?void 0:Q.docs,source:{originalSource:"() => <>\n {sizeOptions.map(size => ['primary', 'secondary', 'outline'].map(variant => Object.keys(glyphs).map((glyph: any, key) => )))}\n ",...null==(V=null==(U=v.parameters)?void 0:U.docs)?void 0:V.source}}};const pe=["Basic","Disabled","Primary","Secondary","Destructive","Subtle","Outline","Small","Large","IconOnly","Icons"];export{o as Basic,l as Destructive,s as Disabled,B as IconOnly,v as Icons,p as Large,d as Outline,i as Primary,c as Secondary,m as Small,u as Subtle,pe as __namedExportsOrder,me as default}; \ No newline at end of file +import{j as e}from"./jsx-runtime-CexXSJP5.js";import{g as Y}from"./Icon-BoVZOGVD.js";import{B as t}from"./Button-D4nxT_g_.js";import"./index-BP8_t0zE.js";import"./emotion-styled.browser.esm-Dz2BNYeh.js";import"./extends-CF3RwP-h.js";import"./parseProps-780b287c.browser.esm-DiCerVr_.js";import"./emotion-use-insertion-effect-with-fallbacks.browser.esm-UWD3gXM2.js";import"./supporter-D7hp958O.js";import"./icon-arrow-down-CJeToCJe.js";import"./icon-star-active-ClN6U5FF.js";import"./theme-ui-core-jsx-runtime.browser.esm-CH0qhC10.js";import"./hoist-non-react-statics.cjs-CQI8syxn.js";import"./theme-ui-components.esm-BngKL4Rx.js";const me={title:"Components/Button",component:t},a=[{small:!0,label:"Small"},{label:"Default"},{large:!0,label:"Large"}],o=()=>e.jsx(t,{children:"Button Text"}),s=()=>e.jsxs(e.Fragment,{children:[e.jsx(t,{disabled:!0,children:"Disabled"}),e.jsx(t,{icon:"delete",disabled:!0,children:"Disabled"})]}),i=()=>e.jsxs(e.Fragment,{children:[e.jsx(t,{variant:"primary",children:"Primary"}),e.jsx(t,{icon:"delete",variant:"primary",children:"Primary"}),a.map(((n,r)=>e.jsx(t,{variant:"primary",...n,children:n.label},r)))]}),c=()=>e.jsxs(e.Fragment,{children:[e.jsx(t,{variant:"secondary",children:"Secondary"}),e.jsx(t,{icon:"delete",variant:"secondary",children:"Secondary"}),a.map(((n,r)=>e.jsx(t,{variant:"secondary",...n,children:n.label},r)))]}),l=()=>e.jsxs(e.Fragment,{children:[e.jsx(t,{variant:"destructive",children:"Destructive"}),e.jsx(t,{icon:"delete",variant:"destructive",children:"Destructive"}),a.map(((n,r)=>e.jsx(t,{variant:"destructive",...n,children:n.label},r)))]}),u=()=>e.jsxs(e.Fragment,{children:[e.jsx(t,{variant:"subtle",children:"Subtle"}),e.jsx(t,{variant:"subtle",icon:"account-circle",children:"Subtle"}),a.map(((n,r)=>e.jsx(t,{variant:"subtle",...n,children:n.label},r)))]}),d=()=>e.jsxs(e.Fragment,{children:[e.jsx(t,{variant:"outline",children:"Outline"}),e.jsx(t,{variant:"outline",icon:"account-circle",children:"Outline"}),a.map(((n,r)=>e.jsx(t,{variant:"outline",...n,children:n.label},r)))]}),m=()=>e.jsxs(e.Fragment,{children:[e.jsx(t,{small:!0,children:"Small Button"}),e.jsx(t,{small:!0,icon:"delete",children:"Small Button with Icon"})]}),p=()=>e.jsxs(e.Fragment,{children:[e.jsx(t,{large:!0,children:"Large Button"}),e.jsx(t,{large:!0,icon:"delete",children:"Large Button with Icon"})]}),B=()=>e.jsx(e.Fragment,{children:e.jsx(t,{large:!0,icon:"delete",showIconOnly:!0,children:"Icon Button with hidden text"})}),v=()=>e.jsx(e.Fragment,{children:a.map((n=>["primary","secondary","outline"].map((r=>Object.keys(Y).map(((a,o)=>e.jsxs(t,{icon:a,...n,variant:r,children:[n.label," with Icon"]},o)))))))});var h,y,x,g,b,j,S,k,O,I,D,w,F,z,L,P,f,_,E,T,C,R,q,A,G,H,J,K,M,N,Q,U,V;o.parameters={...o.parameters,docs:{...null==(h=o.parameters)?void 0:h.docs,source:{originalSource:"() => ",...null==(x=null==(y=o.parameters)?void 0:y.docs)?void 0:x.source}}},s.parameters={...s.parameters,docs:{...null==(g=s.parameters)?void 0:g.docs,source:{originalSource:'() => <>\n \n \n ',...null==(j=null==(b=s.parameters)?void 0:b.docs)?void 0:j.source}}},i.parameters={...i.parameters,docs:{...null==(S=i.parameters)?void 0:S.docs,source:{originalSource:"() => <>\n \n \n {sizeOptions.map((v, k) => )}\n ",...null==(O=null==(k=i.parameters)?void 0:k.docs)?void 0:O.source}}},c.parameters={...c.parameters,docs:{...null==(I=c.parameters)?void 0:I.docs,source:{originalSource:"() => <>\n \n \n {sizeOptions.map((v, k) => )}\n ",...null==(w=null==(D=c.parameters)?void 0:D.docs)?void 0:w.source}}},l.parameters={...l.parameters,docs:{...null==(F=l.parameters)?void 0:F.docs,source:{originalSource:"() => <>\n \n \n {sizeOptions.map((v, k) => )}\n ",...null==(L=null==(z=l.parameters)?void 0:z.docs)?void 0:L.source}}},u.parameters={...u.parameters,docs:{...null==(P=u.parameters)?void 0:P.docs,source:{originalSource:"() => <>\n \n \n {sizeOptions.map((v, k) => )}\n ",...null==(_=null==(f=u.parameters)?void 0:f.docs)?void 0:_.source}}},d.parameters={...d.parameters,docs:{...null==(E=d.parameters)?void 0:E.docs,source:{originalSource:"() => <>\n \n \n {sizeOptions.map((v, k) => )}\n ",...null==(C=null==(T=d.parameters)?void 0:T.docs)?void 0:C.source}}},m.parameters={...m.parameters,docs:{...null==(R=m.parameters)?void 0:R.docs,source:{originalSource:'() => <>\n \n \n ',...null==(A=null==(q=m.parameters)?void 0:q.docs)?void 0:A.source}}},p.parameters={...p.parameters,docs:{...null==(G=p.parameters)?void 0:G.docs,source:{originalSource:'() => <>\n \n \n ',...null==(J=null==(H=p.parameters)?void 0:H.docs)?void 0:J.source}}},B.parameters={...B.parameters,docs:{...null==(K=B.parameters)?void 0:K.docs,source:{originalSource:'() => <>\n \n ',...null==(N=null==(M=B.parameters)?void 0:M.docs)?void 0:N.source}}},v.parameters={...v.parameters,docs:{...null==(Q=v.parameters)?void 0:Q.docs,source:{originalSource:"() => <>\n {sizeOptions.map(size => ['primary', 'secondary', 'outline'].map(variant => Object.keys(glyphs).map((glyph: any, key) => )))}\n ",...null==(V=null==(U=v.parameters)?void 0:U.docs)?void 0:V.source}}};const pe=["Basic","Disabled","Primary","Secondary","Destructive","Subtle","Outline","Small","Large","IconOnly","Icons"];export{o as Basic,l as Destructive,s as Disabled,B as IconOnly,v as Icons,p as Large,d as Outline,i as Primary,c as Secondary,m as Small,u as Subtle,pe as __namedExportsOrder,me as default}; \ No newline at end of file diff --git a/storybook-static/assets/ButtonIcon-BjD0tDRb.js b/storybook-static/assets/ButtonIcon-2rTJWwwt.js similarity index 96% rename from storybook-static/assets/ButtonIcon-BjD0tDRb.js rename to storybook-static/assets/ButtonIcon-2rTJWwwt.js index 789a35b114..125ef87d39 100644 --- a/storybook-static/assets/ButtonIcon-BjD0tDRb.js +++ b/storybook-static/assets/ButtonIcon-2rTJWwwt.js @@ -1 +1 @@ -import{j as a}from"./jsx-runtime-CexXSJP5.js";import{I as u}from"./Icon-BoVZOGVD.js";import{B as v}from"./theme-ui-components.esm-DCiJ1mMX.js";const l=e=>a.jsx(v,{...e,sx:{background:"white",borderRadius:99,padding:1,...e.sx},children:a.jsx(u,{glyph:e.icon,size:18})});try{l.displayName="ButtonIcon",l.__docgenInfo={description:"",displayName:"ButtonIcon",props:{icon:{defaultValue:null,description:"",name:"icon",required:!0,type:{name:"enum",value:[{value:'"map"'},{value:'"menu"'},{value:'"search"'},{value:'"time"'},{value:'"filter"'},{value:'"image"'},{value:'"view"'},{value:'"email"'},{value:'"step"'},{value:'"account-circle"'},{value:'"account"'},{value:'"add"'},{value:'"arrow-curved-bottom-right"'},{value:'"arrow-back"'},{value:'"arrow-down"'},{value:'"arrow-forward"'},{value:'"arrow-full-down"'},{value:'"arrow-full-up"'},{value:'"bazar"'},{value:'"check"'},{value:'"chevron-down"'},{value:'"chevron-left"'},{value:'"chevron-right"'},{value:'"chevron-up"'},{value:'"close"'},{value:'"comment"'},{value:'"contact"'},{value:'"discord"'},{value:'"delete"'},{value:'"difficulty"'},{value:'"download"'},{value:'"download-cloud"'},{value:'"edit"'},{value:'"email-outline"'},{value:'"employee"'},{value:'"external-link"'},{value:'"external-url"'},{value:'"facebook"'},{value:'"flag-unknown"'},{value:'"hide"'},{value:'"hyperlink"'},{value:'"impact"'},{value:'"instagram"'},{value:'"loading"'},{value:'"location-on"'},{value:'"lock"'},{value:'"machine"'},{value:'"mail-outline"'},{value:'"more-vert"'},{value:'"notifications"'},{value:'"patreon"'},{value:'"pdf"'},{value:'"plastic"'},{value:'"profile"'},{value:'"revenue"'},{value:'"show"'},{value:'"slack"'},{value:'"sliders"'},{value:'"social-media"'},{value:'"star"'},{value:'"star-active"'},{value:'"supporter"'},{value:'"thunderbolt"'},{value:'"thunderbolt-grey"'},{value:'"turned-in"'},{value:'"update"'},{value:'"upload"'},{value:'"useful"'},{value:'"verified"'},{value:'"volunteer"'},{value:'"website"'},{value:'"globe"'},{value:'"gps-location"'}]}},sx:{defaultValue:null,description:"",name:"sx",required:!1,type:{name:"ThemeUIStyleObject"}}}}}catch{}export{l as B}; \ No newline at end of file +import{j as a}from"./jsx-runtime-CexXSJP5.js";import{I as u}from"./Icon-BoVZOGVD.js";import{B as v}from"./theme-ui-components.esm-BngKL4Rx.js";const l=e=>a.jsx(v,{...e,sx:{background:"white",borderRadius:99,padding:1,...e.sx},children:a.jsx(u,{glyph:e.icon,size:18})});try{l.displayName="ButtonIcon",l.__docgenInfo={description:"",displayName:"ButtonIcon",props:{icon:{defaultValue:null,description:"",name:"icon",required:!0,type:{name:"enum",value:[{value:'"map"'},{value:'"menu"'},{value:'"search"'},{value:'"time"'},{value:'"filter"'},{value:'"image"'},{value:'"view"'},{value:'"email"'},{value:'"step"'},{value:'"account-circle"'},{value:'"account"'},{value:'"add"'},{value:'"arrow-curved-bottom-right"'},{value:'"arrow-back"'},{value:'"arrow-down"'},{value:'"arrow-forward"'},{value:'"arrow-full-down"'},{value:'"arrow-full-up"'},{value:'"bazar"'},{value:'"check"'},{value:'"chevron-down"'},{value:'"chevron-left"'},{value:'"chevron-right"'},{value:'"chevron-up"'},{value:'"close"'},{value:'"comment"'},{value:'"contact"'},{value:'"discord"'},{value:'"delete"'},{value:'"difficulty"'},{value:'"download"'},{value:'"download-cloud"'},{value:'"edit"'},{value:'"email-outline"'},{value:'"employee"'},{value:'"external-link"'},{value:'"external-url"'},{value:'"facebook"'},{value:'"flag-unknown"'},{value:'"hide"'},{value:'"hyperlink"'},{value:'"impact"'},{value:'"instagram"'},{value:'"loading"'},{value:'"location-on"'},{value:'"lock"'},{value:'"machine"'},{value:'"mail-outline"'},{value:'"more-vert"'},{value:'"notifications"'},{value:'"patreon"'},{value:'"pdf"'},{value:'"plastic"'},{value:'"profile"'},{value:'"revenue"'},{value:'"show"'},{value:'"slack"'},{value:'"sliders"'},{value:'"social-media"'},{value:'"star"'},{value:'"star-active"'},{value:'"supporter"'},{value:'"thunderbolt"'},{value:'"thunderbolt-grey"'},{value:'"turned-in"'},{value:'"update"'},{value:'"upload"'},{value:'"useful"'},{value:'"verified"'},{value:'"volunteer"'},{value:'"website"'},{value:'"globe"'},{value:'"gps-location"'}]}},sx:{defaultValue:null,description:"",name:"sx",required:!1,type:{name:"ThemeUIStyleObject"}}}}}catch{}export{l as B}; \ No newline at end of file diff --git a/storybook-static/assets/ButtonIcon.stories-Bw_O1uDc.js b/storybook-static/assets/ButtonIcon.stories-C4K_844G.js similarity index 87% rename from storybook-static/assets/ButtonIcon.stories-Bw_O1uDc.js rename to storybook-static/assets/ButtonIcon.stories-C4K_844G.js index 207388cf71..7da1ec30a5 100644 --- a/storybook-static/assets/ButtonIcon.stories-Bw_O1uDc.js +++ b/storybook-static/assets/ButtonIcon.stories-C4K_844G.js @@ -1 +1 @@ -import{j as i}from"./jsx-runtime-CexXSJP5.js";import{B as e}from"./ButtonIcon-BjD0tDRb.js";import"./index-BP8_t0zE.js";import"./Icon-BoVZOGVD.js";import"./emotion-styled.browser.esm-Dz2BNYeh.js";import"./extends-CF3RwP-h.js";import"./parseProps-780b287c.browser.esm-DiCerVr_.js";import"./emotion-use-insertion-effect-with-fallbacks.browser.esm-UWD3gXM2.js";import"./supporter-D7hp958O.js";import"./icon-arrow-down-CJeToCJe.js";import"./icon-star-active-ClN6U5FF.js";import"./theme-ui-core-jsx-runtime.browser.esm-CH0qhC10.js";import"./hoist-non-react-statics.cjs-CQI8syxn.js";import"./theme-ui-components.esm-DCiJ1mMX.js";const h={title:"Map/ButtonIcon",component:e},o=()=>i.jsx(e,{icon:"close"});var t,r,s;o.parameters={...o.parameters,docs:{...null==(t=o.parameters)?void 0:t.docs,source:{originalSource:'() => ',...null==(s=null==(r=o.parameters)?void 0:r.docs)?void 0:s.source}}};const C=["WithClose"];export{o as WithClose,C as __namedExportsOrder,h as default}; \ No newline at end of file +import{j as i}from"./jsx-runtime-CexXSJP5.js";import{B as e}from"./ButtonIcon-2rTJWwwt.js";import"./index-BP8_t0zE.js";import"./Icon-BoVZOGVD.js";import"./emotion-styled.browser.esm-Dz2BNYeh.js";import"./extends-CF3RwP-h.js";import"./parseProps-780b287c.browser.esm-DiCerVr_.js";import"./emotion-use-insertion-effect-with-fallbacks.browser.esm-UWD3gXM2.js";import"./supporter-D7hp958O.js";import"./icon-arrow-down-CJeToCJe.js";import"./icon-star-active-ClN6U5FF.js";import"./theme-ui-core-jsx-runtime.browser.esm-CH0qhC10.js";import"./hoist-non-react-statics.cjs-CQI8syxn.js";import"./theme-ui-components.esm-BngKL4Rx.js";const h={title:"Map/ButtonIcon",component:e},o=()=>i.jsx(e,{icon:"close"});var t,r,s;o.parameters={...o.parameters,docs:{...null==(t=o.parameters)?void 0:t.docs,source:{originalSource:'() => ',...null==(s=null==(r=o.parameters)?void 0:r.docs)?void 0:s.source}}};const C=["WithClose"];export{o as WithClose,C as __namedExportsOrder,h as default}; \ No newline at end of file diff --git a/storybook-static/assets/ButtonShowReplies-CiHAfYgx.js b/storybook-static/assets/ButtonShowReplies-rMDrrQbK.js similarity index 59% rename from storybook-static/assets/ButtonShowReplies-CiHAfYgx.js rename to storybook-static/assets/ButtonShowReplies-rMDrrQbK.js index 628ef953ba..65c9a1db4e 100644 --- a/storybook-static/assets/ButtonShowReplies-CiHAfYgx.js +++ b/storybook-static/assets/ButtonShowReplies-rMDrrQbK.js @@ -1 +1 @@ -import{j as p}from"./jsx-runtime-CexXSJP5.js";import{B as a}from"./Button-B7QBvkxh.js";import{n as u}from"./DiscussionTitle-Dhry4tok.js";const s=e=>{const{isShowReplies:s,replies:i,setIsShowReplies:t}=e,l=u(i),o=s?"chevron-up":"chevron-down",r=l?s?`Hide ${l} ${1===l?"reply":"replies"}`:`Show ${l} ${1===l?"reply":"replies"}`:s?"Hide":"Reply";return p.jsx(a,{type:"button","data-cy":"show-replies","data-testid":"show-replies",icon:o,onClick:t,sx:{alignSelf:"flex-start"},variant:"subtle",small:!0,children:r})};try{s.displayName="ButtonShowReplies",s.__docgenInfo={description:"",displayName:"ButtonShowReplies",props:{isShowReplies:{defaultValue:null,description:"",name:"isShowReplies",required:!0,type:{name:"boolean"}},replies:{defaultValue:null,description:"",name:"replies",required:!0,type:{name:"IComment[]"}},setIsShowReplies:{defaultValue:null,description:"",name:"setIsShowReplies",required:!0,type:{name:"() => void"}}}}}catch{}export{s as B}; \ No newline at end of file +import{j as p}from"./jsx-runtime-CexXSJP5.js";import{B as a}from"./Button-D4nxT_g_.js";import{n as u}from"./DiscussionTitle-BShaVqYD.js";const s=e=>{const{isShowReplies:s,replies:i,setIsShowReplies:l}=e,t=u(i),o=s?"chevron-up":"chevron-down",n=t?s?`Hide ${t} ${1===t?"reply":"replies"}`:`Show ${t} ${1===t?"reply":"replies"}`:s?"Hide":"Reply";return p.jsx(a,{type:"button","data-cy":"show-replies","data-testid":"show-replies",icon:o,onClick:l,sx:{alignSelf:"flex-start"},variant:"subtle",small:!0,children:n})};try{s.displayName="ButtonShowReplies",s.__docgenInfo={description:"",displayName:"ButtonShowReplies",props:{isShowReplies:{defaultValue:null,description:"",name:"isShowReplies",required:!0,type:{name:"boolean"}},replies:{defaultValue:null,description:"",name:"replies",required:!0,type:{name:"IComment[]"}},setIsShowReplies:{defaultValue:null,description:"",name:"setIsShowReplies",required:!0,type:{name:"() => void"}}}}}catch{}export{s as B}; \ No newline at end of file diff --git a/storybook-static/assets/ButtonShowReplies.stories-C3EqgxbV.js b/storybook-static/assets/ButtonShowReplies.stories-BjGncAfz.js similarity index 92% rename from storybook-static/assets/ButtonShowReplies.stories-C3EqgxbV.js rename to storybook-static/assets/ButtonShowReplies.stories-BjGncAfz.js index 991c6c2d72..6e5e994b66 100644 --- a/storybook-static/assets/ButtonShowReplies.stories-C3EqgxbV.js +++ b/storybook-static/assets/ButtonShowReplies.stories-BjGncAfz.js @@ -1 +1 @@ -import{j as o}from"./jsx-runtime-CexXSJP5.js";import{r as k}from"./index-BP8_t0zE.js";import{c as a}from"./utils-BRZF2j4e.js";import{B as s}from"./ButtonShowReplies-CiHAfYgx.js";import"./index-D_kXk1yT.js";import"./Button-B7QBvkxh.js";import"./Icon-BoVZOGVD.js";import"./emotion-styled.browser.esm-Dz2BNYeh.js";import"./extends-CF3RwP-h.js";import"./parseProps-780b287c.browser.esm-DiCerVr_.js";import"./emotion-use-insertion-effect-with-fallbacks.browser.esm-UWD3gXM2.js";import"./supporter-D7hp958O.js";import"./icon-arrow-down-CJeToCJe.js";import"./icon-star-active-ClN6U5FF.js";import"./theme-ui-core-jsx-runtime.browser.esm-CH0qhC10.js";import"./hoist-non-react-statics.cjs-CQI8syxn.js";import"./theme-ui-components.esm-DCiJ1mMX.js";import"./DiscussionTitle-Dhry4tok.js";const Q={title:"Components/ButtonShowReplies",component:s},r=()=>{const[e,r]=k.useState(!1),i=a(7);return o.jsx(s,{replies:i,isShowReplies:e,setIsShowReplies:()=>r(!e)})},t=()=>{const e=a(6);return o.jsx(s,{isShowReplies:!0,replies:e,setIsShowReplies:()=>null})},i=()=>{const e=a(1);return o.jsx(s,{isShowReplies:!1,replies:e,setIsShowReplies:()=>null})},p=()=>o.jsx(s,{isShowReplies:!1,replies:[],setIsShowReplies:()=>null}),l=()=>{const e=a(1);return o.jsx(s,{isShowReplies:!1,replies:e,setIsShowReplies:()=>null})};var n,m,c,u,S,R,h,w,d,f,I,x,B,C,g;r.parameters={...r.parameters,docs:{...null==(n=r.parameters)?void 0:n.docs,source:{originalSource:"() => {\n const [isShowReplies, setIsShowReplies] = useState(false);\n const replies = createFakeComments(7);\n return setIsShowReplies(!isShowReplies)} />;\n}",...null==(c=null==(m=r.parameters)?void 0:m.docs)?void 0:c.source}}},t.parameters={...t.parameters,docs:{...null==(u=t.parameters)?void 0:u.docs,source:{originalSource:"() => {\n const replies = createFakeComments(6);\n return null} />;\n}",...null==(R=null==(S=t.parameters)?void 0:S.docs)?void 0:R.source}}},i.parameters={...i.parameters,docs:{...null==(h=i.parameters)?void 0:h.docs,source:{originalSource:"() => {\n const replies = createFakeComments(1);\n return null} />;\n}",...null==(d=null==(w=i.parameters)?void 0:w.docs)?void 0:d.source}}},p.parameters={...p.parameters,docs:{...null==(f=p.parameters)?void 0:f.docs,source:{originalSource:"() => {\n return null} />;\n}",...null==(x=null==(I=p.parameters)?void 0:I.docs)?void 0:x.source}}},l.parameters={...l.parameters,docs:{...null==(B=l.parameters)?void 0:B.docs,source:{originalSource:"() => {\n const replies = createFakeComments(1);\n return null} />;\n}",...null==(g=null==(C=l.parameters)?void 0:C.docs)?void 0:g.source}}};const T=["Default","RepliesShowing","OneReply","NoReplies","NoCreatorName"];export{r as Default,l as NoCreatorName,p as NoReplies,i as OneReply,t as RepliesShowing,T as __namedExportsOrder,Q as default}; \ No newline at end of file +import{j as o}from"./jsx-runtime-CexXSJP5.js";import{r as k}from"./index-BP8_t0zE.js";import{c as a}from"./utils-BRZF2j4e.js";import{B as s}from"./ButtonShowReplies-rMDrrQbK.js";import"./index-D_kXk1yT.js";import"./Button-D4nxT_g_.js";import"./Icon-BoVZOGVD.js";import"./emotion-styled.browser.esm-Dz2BNYeh.js";import"./extends-CF3RwP-h.js";import"./parseProps-780b287c.browser.esm-DiCerVr_.js";import"./emotion-use-insertion-effect-with-fallbacks.browser.esm-UWD3gXM2.js";import"./supporter-D7hp958O.js";import"./icon-arrow-down-CJeToCJe.js";import"./icon-star-active-ClN6U5FF.js";import"./theme-ui-core-jsx-runtime.browser.esm-CH0qhC10.js";import"./hoist-non-react-statics.cjs-CQI8syxn.js";import"./theme-ui-components.esm-BngKL4Rx.js";import"./DiscussionTitle-BShaVqYD.js";const Q={title:"Components/ButtonShowReplies",component:s},r=()=>{const[e,r]=k.useState(!1),i=a(7);return o.jsx(s,{replies:i,isShowReplies:e,setIsShowReplies:()=>r(!e)})},t=()=>{const e=a(6);return o.jsx(s,{isShowReplies:!0,replies:e,setIsShowReplies:()=>null})},i=()=>{const e=a(1);return o.jsx(s,{isShowReplies:!1,replies:e,setIsShowReplies:()=>null})},p=()=>o.jsx(s,{isShowReplies:!1,replies:[],setIsShowReplies:()=>null}),l=()=>{const e=a(1);return o.jsx(s,{isShowReplies:!1,replies:e,setIsShowReplies:()=>null})};var n,m,c,u,S,R,h,w,d,f,I,x,B,C,g;r.parameters={...r.parameters,docs:{...null==(n=r.parameters)?void 0:n.docs,source:{originalSource:"() => {\n const [isShowReplies, setIsShowReplies] = useState(false);\n const replies = createFakeComments(7);\n return setIsShowReplies(!isShowReplies)} />;\n}",...null==(c=null==(m=r.parameters)?void 0:m.docs)?void 0:c.source}}},t.parameters={...t.parameters,docs:{...null==(u=t.parameters)?void 0:u.docs,source:{originalSource:"() => {\n const replies = createFakeComments(6);\n return null} />;\n}",...null==(R=null==(S=t.parameters)?void 0:S.docs)?void 0:R.source}}},i.parameters={...i.parameters,docs:{...null==(h=i.parameters)?void 0:h.docs,source:{originalSource:"() => {\n const replies = createFakeComments(1);\n return null} />;\n}",...null==(d=null==(w=i.parameters)?void 0:w.docs)?void 0:d.source}}},p.parameters={...p.parameters,docs:{...null==(f=p.parameters)?void 0:f.docs,source:{originalSource:"() => {\n return null} />;\n}",...null==(x=null==(I=p.parameters)?void 0:I.docs)?void 0:x.source}}},l.parameters={...l.parameters,docs:{...null==(B=l.parameters)?void 0:B.docs,source:{originalSource:"() => {\n const replies = createFakeComments(1);\n return null} />;\n}",...null==(g=null==(C=l.parameters)?void 0:C.docs)?void 0:g.source}}};const T=["Default","RepliesShowing","OneReply","NoReplies","NoCreatorName"];export{r as Default,l as NoCreatorName,p as NoReplies,i as OneReply,t as RepliesShowing,T as __namedExportsOrder,Q as default}; \ No newline at end of file diff --git a/storybook-static/assets/CardButton-QQF3n4Pb.js b/storybook-static/assets/CardButton-Nj67FTo7.js similarity index 93% rename from storybook-static/assets/CardButton-QQF3n4Pb.js rename to storybook-static/assets/CardButton-Nj67FTo7.js index eb75a275c3..72577159ce 100644 --- a/storybook-static/assets/CardButton-QQF3n4Pb.js +++ b/storybook-static/assets/CardButton-Nj67FTo7.js @@ -1 +1 @@ -import{j as s}from"./jsx-runtime-CexXSJP5.js";import{C as n}from"./theme-ui-components.esm-DCiJ1mMX.js";const t=e=>{const{children:r,extrastyles:t,isSelected:o}=e;return s.jsx(n,{sx:{alignItems:"center",alignContent:"center",marginTop:"2px",borderRadius:2,padding:0,transition:"borderBottom 0.2s, transform 0.2s","&:hover":!o&&{animationSpeed:"0.3s",cursor:"pointer",marginTop:"0",borderBottom:"4px solid",transform:"translateY(-2px)",borderColor:"black"},"&:active":{transform:"translateY(1px)",borderBottom:"3px solid",borderColor:"grey",transition:"borderBottom 0.2s, transform 0.2s, borderColor 0.2s"},...o?{marginTop:"0",borderBottom:"4px solid",borderColor:"grey",transform:"translateY(-2px)"}:{},...t},...e,children:r})};try{t.displayName="CardButton",t.__docgenInfo={description:"",displayName:"CardButton",props:{extrastyles:{defaultValue:null,description:"",name:"extrastyles",required:!1,type:{name:"ThemeUIStyleObject"}},isSelected:{defaultValue:null,description:"",name:"isSelected",required:!1,type:{name:"boolean"}}}}}catch{}export{t as C}; \ No newline at end of file +import{j as s}from"./jsx-runtime-CexXSJP5.js";import{C as n}from"./theme-ui-components.esm-BngKL4Rx.js";const t=e=>{const{children:r,extrastyles:t,isSelected:o}=e;return s.jsx(n,{sx:{alignItems:"center",alignContent:"center",marginTop:"2px",borderRadius:2,padding:0,transition:"borderBottom 0.2s, transform 0.2s","&:hover":!o&&{animationSpeed:"0.3s",cursor:"pointer",marginTop:"0",borderBottom:"4px solid",transform:"translateY(-2px)",borderColor:"black"},"&:active":{transform:"translateY(1px)",borderBottom:"3px solid",borderColor:"grey",transition:"borderBottom 0.2s, transform 0.2s, borderColor 0.2s"},...o?{marginTop:"0",borderBottom:"4px solid",borderColor:"grey",transform:"translateY(-2px)"}:{},...t},...e,children:r})};try{t.displayName="CardButton",t.__docgenInfo={description:"",displayName:"CardButton",props:{extrastyles:{defaultValue:null,description:"",name:"extrastyles",required:!1,type:{name:"ThemeUIStyleObject"}},isSelected:{defaultValue:null,description:"",name:"isSelected",required:!1,type:{name:"boolean"}}}}}catch{}export{t as C}; \ No newline at end of file diff --git a/storybook-static/assets/CardButton.stories-BbJ-diCg.js b/storybook-static/assets/CardButton.stories-CNRYJmVv.js similarity index 87% rename from storybook-static/assets/CardButton.stories-BbJ-diCg.js rename to storybook-static/assets/CardButton.stories-CNRYJmVv.js index 1212e322ce..6aefec4650 100644 --- a/storybook-static/assets/CardButton.stories-BbJ-diCg.js +++ b/storybook-static/assets/CardButton.stories-CNRYJmVv.js @@ -1 +1 @@ -import{j as e}from"./jsx-runtime-CexXSJP5.js";import{C as i}from"./CardButton-QQF3n4Pb.js";import"./index-BP8_t0zE.js";import"./theme-ui-components.esm-DCiJ1mMX.js";import"./parseProps-780b287c.browser.esm-DiCerVr_.js";import"./emotion-use-insertion-effect-with-fallbacks.browser.esm-UWD3gXM2.js";import"./theme-ui-core-jsx-runtime.browser.esm-CH0qhC10.js";import"./hoist-non-react-statics.cjs-CQI8syxn.js";const u={title:"Components/CardButton",component:i},t=()=>e.jsx("div",{style:{width:"300px"},children:e.jsx(i,{isSelected:!1,children:e.jsx("div",{style:{padding:"20px"},children:"Basic Implementation"})})});var r,s,o;t.parameters={...t.parameters,docs:{...null==(r=t.parameters)?void 0:r.docs,source:{originalSource:"() =>
\n \n
Basic Implementation
\n
\n
",...null==(o=null==(s=t.parameters)?void 0:s.docs)?void 0:o.source}}};const B=["Basic"];export{t as Basic,B as __namedExportsOrder,u as default}; \ No newline at end of file +import{j as e}from"./jsx-runtime-CexXSJP5.js";import{C as i}from"./CardButton-Nj67FTo7.js";import"./index-BP8_t0zE.js";import"./theme-ui-components.esm-BngKL4Rx.js";import"./parseProps-780b287c.browser.esm-DiCerVr_.js";import"./emotion-use-insertion-effect-with-fallbacks.browser.esm-UWD3gXM2.js";import"./theme-ui-core-jsx-runtime.browser.esm-CH0qhC10.js";import"./hoist-non-react-statics.cjs-CQI8syxn.js";const u={title:"Components/CardButton",component:i},t=()=>e.jsx("div",{style:{width:"300px"},children:e.jsx(i,{isSelected:!1,children:e.jsx("div",{style:{padding:"20px"},children:"Basic Implementation"})})});var r,s,o;t.parameters={...t.parameters,docs:{...null==(r=t.parameters)?void 0:r.docs,source:{originalSource:"() =>
\n \n
Basic Implementation
\n
\n
",...null==(o=null==(s=t.parameters)?void 0:s.docs)?void 0:o.source}}};const B=["Basic"];export{t as Basic,B as __namedExportsOrder,u as default}; \ No newline at end of file diff --git a/storybook-static/assets/CardList-8N7t_bxB.js b/storybook-static/assets/CardList-D27s8o8o.js similarity index 95% rename from storybook-static/assets/CardList-8N7t_bxB.js rename to storybook-static/assets/CardList-D27s8o8o.js index abd410ad84..7233a2855b 100644 --- a/storybook-static/assets/CardList-8N7t_bxB.js +++ b/storybook-static/assets/CardList-D27s8o8o.js @@ -1 +1 @@ -import{j as u}from"./jsx-runtime-CexXSJP5.js";import{a as p,r as y}from"./index-BP8_t0zE.js";import{C as k}from"./CardListItem-DBQLYOzT.js";import{I}from"./Icon-BoVZOGVD.js";import{L as O}from"./Loader-DmqUoSY8.js";import{F as g,T as j}from"./theme-ui-components.esm-DCiJ1mMX.js";function C(){return C=Object.assign||function(e){for(var t=1;t0?n[e[0]]:S;return e.forEach((function(e){e{const{columnsCountBreakPoints:t,filteredList:n,list:r,onBlur:i,onPinClick:o,selectedPin:s,viewport:l}=e,a=(null===n?r:n).sort(((e,t)=>{var n,r;return Date.parse((null==(n=t.creator)?void 0:n._lastActive)||"0")-Date.parse((null==(r=e.creator)?void 0:r._lastActive)||"0")})).map((e=>{const t=e._id===(null==s?void 0:s._id);return u.jsx(k,{item:e,isSelectedPin:t,onPinClick:t?i:o,viewport:l},e._id)})),c=0===a.length,p=r,d=`${a.length} result${1==a.length?"":"s"} in view`;return u.jsxs(g,{"data-cy":`CardList-${l}`,sx:{flexDirection:"column",gap:2,padding:2},children:[!p&&u.jsx(O,{}),p&&u.jsxs(u.Fragment,{children:[u.jsxs(g,{sx:{justifyContent:"space-between",paddingX:2,paddingTop:2,fontSize:2},children:[u.jsx(j,{"data-cy":"list-results",children:d}),u.jsxs(g,{sx:{alignItems:"center",gap:1},children:[u.jsx(j,{children:" Most recently active"}),u.jsx(I,{glyph:"arrow-full-down"})]})]}),c&&b,!c&&u.jsx(M,{columnsCountBreakPoints:t||{600:1,1100:2,1600:3},children:u.jsx(_,{children:a})})]})]})};try{L.displayName="CardList",L.__docgenInfo={description:"",displayName:"CardList",props:{columnsCountBreakPoints:{defaultValue:null,description:"",name:"columnsCountBreakPoints",required:!1,type:{name:"{ [key: number]: number; }"}},filteredList:{defaultValue:null,description:"",name:"filteredList",required:!0,type:{name:"IMapPin[] | null"}},list:{defaultValue:null,description:"",name:"list",required:!0,type:{name:"IMapPin[]"}},onBlur:{defaultValue:null,description:"",name:"onBlur",required:!0,type:{name:"() => void"}},onPinClick:{defaultValue:null,description:"",name:"onPinClick",required:!0,type:{name:"(arg: IMapPin) => void"}},selectedPin:{defaultValue:null,description:"",name:"selectedPin",required:!0,type:{name:"IMapPin | undefined"}},viewport:{defaultValue:null,description:"",name:"viewport",required:!0,type:{name:"string"}}}}}catch{}export{L as C}; \ No newline at end of file +import{j as u}from"./jsx-runtime-CexXSJP5.js";import{a as p,r as y}from"./index-BP8_t0zE.js";import{C as k}from"./CardListItem-DsaNSZFe.js";import{I}from"./Icon-BoVZOGVD.js";import{L as O}from"./Loader-BiCtIOH2.js";import{F as g,T as j}from"./theme-ui-components.esm-BngKL4Rx.js";function C(){return C=Object.assign||function(e){for(var t=1;t0?n[e[0]]:S;return e.forEach((function(e){e{const{columnsCountBreakPoints:t,filteredList:n,list:r,onBlur:i,onPinClick:o,selectedPin:s,viewport:l}=e,a=(null===n?r:n).sort(((e,t)=>{var n,r;return Date.parse((null==(n=t.creator)?void 0:n._lastActive)||"0")-Date.parse((null==(r=e.creator)?void 0:r._lastActive)||"0")})).map((e=>{const t=e._id===(null==s?void 0:s._id);return u.jsx(k,{item:e,isSelectedPin:t,onPinClick:t?i:o,viewport:l},e._id)})),c=0===a.length,p=r,d=`${a.length} result${1==a.length?"":"s"} in view`;return u.jsxs(g,{"data-cy":`CardList-${l}`,sx:{flexDirection:"column",gap:2,padding:2},children:[!p&&u.jsx(O,{}),p&&u.jsxs(u.Fragment,{children:[u.jsxs(g,{sx:{justifyContent:"space-between",paddingX:2,paddingTop:2,fontSize:2},children:[u.jsx(j,{"data-cy":"list-results",children:d}),u.jsxs(g,{sx:{alignItems:"center",gap:1},children:[u.jsx(j,{children:" Most recently active"}),u.jsx(I,{glyph:"arrow-full-down"})]})]}),c&&b,!c&&u.jsx(M,{columnsCountBreakPoints:t||{600:1,1100:2,1600:3},children:u.jsx(_,{children:a})})]})]})};try{L.displayName="CardList",L.__docgenInfo={description:"",displayName:"CardList",props:{columnsCountBreakPoints:{defaultValue:null,description:"",name:"columnsCountBreakPoints",required:!1,type:{name:"{ [key: number]: number; }"}},filteredList:{defaultValue:null,description:"",name:"filteredList",required:!0,type:{name:"IMapPin[] | null"}},list:{defaultValue:null,description:"",name:"list",required:!0,type:{name:"IMapPin[]"}},onBlur:{defaultValue:null,description:"",name:"onBlur",required:!0,type:{name:"() => void"}},onPinClick:{defaultValue:null,description:"",name:"onPinClick",required:!0,type:{name:"(arg: IMapPin) => void"}},selectedPin:{defaultValue:null,description:"",name:"selectedPin",required:!0,type:{name:"IMapPin | undefined"}},viewport:{defaultValue:null,description:"",name:"viewport",required:!0,type:{name:"string"}}}}}catch{}export{L as C}; \ No newline at end of file diff --git a/storybook-static/assets/CardList.stories-CilXBmZZ.js b/storybook-static/assets/CardList.stories-CilXBmZZ.js deleted file mode 100644 index b18e56bc60..0000000000 --- a/storybook-static/assets/CardList.stories-CilXBmZZ.js +++ /dev/null @@ -1 +0,0 @@ -import{j as s}from"./jsx-runtime-CexXSJP5.js";import{C as o}from"./CardList-8N7t_bxB.js";import"./index-BP8_t0zE.js";import"./CardListItem-DBQLYOzT.js";import"./CardButton-QQF3n4Pb.js";import"./theme-ui-components.esm-DCiJ1mMX.js";import"./parseProps-780b287c.browser.esm-DiCerVr_.js";import"./emotion-use-insertion-effect-with-fallbacks.browser.esm-UWD3gXM2.js";import"./theme-ui-core-jsx-runtime.browser.esm-CH0qhC10.js";import"./hoist-non-react-statics.cjs-CQI8syxn.js";import"./CardProfile-D6E6LGNb.js";import"./Category-BRVyiaSI.js";import"./MemberBadge-BFCUvfGJ.js";import"./icon-star-active-ClN6U5FF.js";import"./theme-ui-core.browser.esm-CIov4Ln1.js";import"./emotion-react.browser.esm-BYoRxRk_.js";import"./cjs-Clfm10Kj.js";import"./Username-iPvtw0Lg.js";import"./supporter-D7hp958O.js";import"./emotion-styled.browser.esm-Dz2BNYeh.js";import"./extends-CF3RwP-h.js";import"./InternalLink-CtyTe3gy.js";import"./components-CutHIkdx.js";import"./index-BBRV8eG_.js";import"./index-BXxqJQdV.js";import"./ProfileTagsList-D6w9cXVe.js";import"./Icon-BoVZOGVD.js";import"./icon-arrow-down-CJeToCJe.js";import"./Loader-DmqUoSY8.js";const Q={title:"Map/CardList",component:o},e=[{_deleted:!1,_id:"first-one",type:"member",moderation:"accepted",verified:!1,location:{lat:0,lng:0}},{_deleted:!1,_id:"second-one",type:"collection-point",moderation:"accepted",verified:!1,location:{lat:10,lng:-38}},{_deleted:!1,_id:"third",type:"member",moderation:"accepted",verified:!1,location:{lat:102,lng:30}},{_deleted:!1,_id:"4th",type:"member",moderation:"accepted",verified:!1,location:{lat:0,lng:73}}],l=()=>{},n=()=>{},t=()=>s.jsx(o,{list:e,onBlur:l,onPinClick:n,filteredList:null,selectedPin:void 0,viewport:"stories"}),i=()=>{const t=[e[0],e[2]];return s.jsx(o,{list:e,onBlur:l,onPinClick:n,filteredList:t,selectedPin:void 0,viewport:"stories"})},r=()=>s.jsx(o,{list:e,onBlur:l,onPinClick:n,filteredList:[],selectedPin:void 0,viewport:"stories"});var a,d,p,m,c,u,f,v,C;t.parameters={...t.parameters,docs:{...null==(a=t.parameters)?void 0:a.docs,source:{originalSource:'() => {\n return ;\n}',...null==(p=null==(d=t.parameters)?void 0:d.docs)?void 0:p.source}}},i.parameters={...i.parameters,docs:{...null==(m=i.parameters)?void 0:m.docs,source:{originalSource:'() => {\n const filteredList = [allItems[0], allItems[2]];\n return ;\n}',...null==(u=null==(c=i.parameters)?void 0:c.docs)?void 0:u.source}}},r.parameters={...r.parameters,docs:{...null==(f=r.parameters)?void 0:f.docs,source:{originalSource:'() => {\n return ;\n}',...null==(C=null==(v=r.parameters)?void 0:v.docs)?void 0:C.source}}};const T=["Default","FiltedDisplay","WhenFiltedDisplayIsZero"];export{t as Default,i as FiltedDisplay,r as WhenFiltedDisplayIsZero,T as __namedExportsOrder,Q as default}; \ No newline at end of file diff --git a/storybook-static/assets/CardList.stories-DhEhfAS6.js b/storybook-static/assets/CardList.stories-DhEhfAS6.js new file mode 100644 index 0000000000..4784a2338e --- /dev/null +++ b/storybook-static/assets/CardList.stories-DhEhfAS6.js @@ -0,0 +1 @@ +import{j as s}from"./jsx-runtime-CexXSJP5.js";import{C as o}from"./CardList-D27s8o8o.js";import"./index-BP8_t0zE.js";import"./CardListItem-DsaNSZFe.js";import"./CardButton-Nj67FTo7.js";import"./theme-ui-components.esm-BngKL4Rx.js";import"./parseProps-780b287c.browser.esm-DiCerVr_.js";import"./emotion-use-insertion-effect-with-fallbacks.browser.esm-UWD3gXM2.js";import"./theme-ui-core-jsx-runtime.browser.esm-CH0qhC10.js";import"./hoist-non-react-statics.cjs-CQI8syxn.js";import"./CardProfile-DtCgLDpd.js";import"./Category-CVnjFQdi.js";import"./MemberBadge-DSOx4fo1.js";import"./icon-star-active-ClN6U5FF.js";import"./theme-ui-core.browser.esm-CIov4Ln1.js";import"./emotion-react.browser.esm-BYoRxRk_.js";import"./cjs-Clfm10Kj.js";import"./Username-CNsNRGy2.js";import"./supporter-D7hp958O.js";import"./emotion-styled.browser.esm-Dz2BNYeh.js";import"./extends-CF3RwP-h.js";import"./InternalLink-BRM7MvOa.js";import"./components-CutHIkdx.js";import"./index-BBRV8eG_.js";import"./index-BXxqJQdV.js";import"./UserBadge-XI2JdGOl.js";import"./ProfileTagsList-CnWLcFtJ.js";import"./Icon-BoVZOGVD.js";import"./icon-arrow-down-CJeToCJe.js";import"./Loader-BiCtIOH2.js";const T={title:"Map/CardList",component:o},e=[{_deleted:!1,_id:"first-one",type:"member",moderation:"accepted",verified:!1,location:{lat:0,lng:0}},{_deleted:!1,_id:"second-one",type:"collection-point",moderation:"accepted",verified:!1,location:{lat:10,lng:-38}},{_deleted:!1,_id:"third",type:"member",moderation:"accepted",verified:!1,location:{lat:102,lng:30}},{_deleted:!1,_id:"4th",type:"member",moderation:"accepted",verified:!1,location:{lat:0,lng:73}}],l=()=>{},n=()=>{},t=()=>s.jsx(o,{list:e,onBlur:l,onPinClick:n,filteredList:null,selectedPin:void 0,viewport:"stories"}),i=()=>{const t=[e[0],e[2]];return s.jsx(o,{list:e,onBlur:l,onPinClick:n,filteredList:t,selectedPin:void 0,viewport:"stories"})},r=()=>s.jsx(o,{list:e,onBlur:l,onPinClick:n,filteredList:[],selectedPin:void 0,viewport:"stories"});var a,d,p,m,c,u,f,v,C;t.parameters={...t.parameters,docs:{...null==(a=t.parameters)?void 0:a.docs,source:{originalSource:'() => {\n return ;\n}',...null==(p=null==(d=t.parameters)?void 0:d.docs)?void 0:p.source}}},i.parameters={...i.parameters,docs:{...null==(m=i.parameters)?void 0:m.docs,source:{originalSource:'() => {\n const filteredList = [allItems[0], allItems[2]];\n return ;\n}',...null==(u=null==(c=i.parameters)?void 0:c.docs)?void 0:u.source}}},r.parameters={...r.parameters,docs:{...null==(f=r.parameters)?void 0:f.docs,source:{originalSource:'() => {\n return ;\n}',...null==(C=null==(v=r.parameters)?void 0:v.docs)?void 0:C.source}}};const U=["Default","FiltedDisplay","WhenFiltedDisplayIsZero"];export{t as Default,i as FiltedDisplay,r as WhenFiltedDisplayIsZero,U as __namedExportsOrder,T as default}; \ No newline at end of file diff --git a/storybook-static/assets/CardListItem-DBQLYOzT.js b/storybook-static/assets/CardListItem-DsaNSZFe.js similarity index 66% rename from storybook-static/assets/CardListItem-DBQLYOzT.js rename to storybook-static/assets/CardListItem-DsaNSZFe.js index 1dff2f4d50..b243cf1501 100644 --- a/storybook-static/assets/CardListItem-DBQLYOzT.js +++ b/storybook-static/assets/CardListItem-DsaNSZFe.js @@ -1 +1 @@ -import{j as t}from"./jsx-runtime-CexXSJP5.js";import{C as p}from"./CardButton-QQF3n4Pb.js";import{C as c}from"./CardProfile-D6E6LGNb.js";import{I as m}from"./InternalLink-CtyTe3gy.js";import{a as u}from"./theme-ui-components.esm-DCiJ1mMX.js";const d=e=>{const{item:i,onPinClick:a,isSelectedPin:n,viewport:d}=e,r="CardListItem"+(n?"-selected":""),s=t.jsx(p,{isSelected:n,children:t.jsx(c,{item:i})}),o={"data-cy":r,"data-testid":r,sx:{borderRadius:2,padding:2}};return"mobile"===d?t.jsx(m,{target:"_blank",to:`/u/${i._id}`,...o,children:s}):t.jsx(u,{"data-cy":r,"data-testid":r,onClick:()=>a(i),sx:{borderRadius:2,padding:2},children:s})};try{d.displayName="CardListItem",d.__docgenInfo={description:"",displayName:"CardListItem",props:{item:{defaultValue:null,description:"",name:"item",required:!0,type:{name:"IMapPin"}},isSelectedPin:{defaultValue:null,description:"",name:"isSelectedPin",required:!0,type:{name:"boolean"}},onPinClick:{defaultValue:null,description:"",name:"onPinClick",required:!0,type:{name:"(arg: IMapPin) => void"}},viewport:{defaultValue:null,description:"",name:"viewport",required:!0,type:{name:"string"}}}}}catch{}export{d as C}; \ No newline at end of file +import{j as t}from"./jsx-runtime-CexXSJP5.js";import{C as p}from"./CardButton-Nj67FTo7.js";import{C as c}from"./CardProfile-DtCgLDpd.js";import{I as m}from"./InternalLink-BRM7MvOa.js";import{a as u}from"./theme-ui-components.esm-BngKL4Rx.js";const d=e=>{const{item:i,onPinClick:a,isSelectedPin:d,viewport:n}=e,r="CardListItem"+(d?"-selected":""),s=t.jsx(p,{isSelected:d,children:t.jsx(c,{item:i})}),o={"data-cy":r,"data-testid":r,sx:{borderRadius:2,padding:2}};return"mobile"===n?t.jsx(m,{target:"_blank",to:`/u/${i._id}`,...o,children:s}):t.jsx(u,{"data-cy":r,"data-testid":r,onClick:()=>a(i),sx:{borderRadius:2,padding:2},children:s})};try{d.displayName="CardListItem",d.__docgenInfo={description:"",displayName:"CardListItem",props:{item:{defaultValue:null,description:"",name:"item",required:!0,type:{name:"IMapPin"}},isSelectedPin:{defaultValue:null,description:"",name:"isSelectedPin",required:!0,type:{name:"boolean"}},onPinClick:{defaultValue:null,description:"",name:"onPinClick",required:!0,type:{name:"(arg: IMapPin) => void"}},viewport:{defaultValue:null,description:"",name:"viewport",required:!0,type:{name:"string"}}}}}catch{}export{d as C}; \ No newline at end of file diff --git a/storybook-static/assets/CardListItem.stories-rLni6h4_.js b/storybook-static/assets/CardListItem.stories-rLni6h4_.js new file mode 100644 index 0000000000..6a214a72e0 --- /dev/null +++ b/storybook-static/assets/CardListItem.stories-rLni6h4_.js @@ -0,0 +1 @@ +import{j as e}from"./jsx-runtime-CexXSJP5.js";import{y as b}from"./index-D_kXk1yT.js";import{C as n}from"./CardListItem-DsaNSZFe.js";import"./index-BP8_t0zE.js";import"./CardButton-Nj67FTo7.js";import"./theme-ui-components.esm-BngKL4Rx.js";import"./parseProps-780b287c.browser.esm-DiCerVr_.js";import"./emotion-use-insertion-effect-with-fallbacks.browser.esm-UWD3gXM2.js";import"./theme-ui-core-jsx-runtime.browser.esm-CH0qhC10.js";import"./hoist-non-react-statics.cjs-CQI8syxn.js";import"./CardProfile-DtCgLDpd.js";import"./Category-CVnjFQdi.js";import"./MemberBadge-DSOx4fo1.js";import"./icon-star-active-ClN6U5FF.js";import"./theme-ui-core.browser.esm-CIov4Ln1.js";import"./emotion-react.browser.esm-BYoRxRk_.js";import"./cjs-Clfm10Kj.js";import"./Username-CNsNRGy2.js";import"./supporter-D7hp958O.js";import"./emotion-styled.browser.esm-Dz2BNYeh.js";import"./extends-CF3RwP-h.js";import"./InternalLink-BRM7MvOa.js";import"./components-CutHIkdx.js";import"./index-BBRV8eG_.js";import"./index-BXxqJQdV.js";import"./UserBadge-XI2JdGOl.js";import"./ProfileTagsList-CnWLcFtJ.js";const K={title:"Map/CardListItem",component:n},a=()=>{},s="desktop",i=()=>{const t={_deleted:!1,_id:"not-selected-onload",type:"member",moderation:"accepted",verified:!1,location:{lat:0,lng:0},creator:{_id:"member_no2",_lastActive:"string",countryCode:"br",userImage:b.image.avatar(),displayName:"member_no1",isContactableByPublic:!1,profileType:"member"}};return e.jsx("div",{style:{width:"500px"},children:e.jsx(n,{item:t,isSelectedPin:!1,onPinClick:a,viewport:s})})},r=()=>e.jsx("div",{style:{width:"500px"},children:e.jsx(n,{item:{_deleted:!1,_id:"not-selected-onload",location:{lat:0,lng:0},moderation:"accepted",type:"workspace",verified:!1,creator:{_id:"string",_lastActive:"string",about:"Lorem ipsum odor amet, consectetuer adipiscing elit. Lorem ipsum odor amet, consectetuer adipiscing elit.",badges:{supporter:!0,verified:!1},countryCode:"uk",displayName:"user",isContactableByPublic:!1,profileType:"workspace",workspaceType:"Sheetpress"}},isSelectedPin:!1,onPinClick:a,viewport:s})}),o=()=>e.jsx("div",{style:{width:"500px"},children:e.jsx(n,{item:{_deleted:!1,_id:"not-selected-onload",type:"member",location:{lat:0,lng:0},moderation:"accepted",verified:!1},isSelectedPin:!1,onPinClick:a,viewport:s})});var l,d,m,c,p,u,f,y,v;i.parameters={...i.parameters,docs:{...null==(l=i.parameters)?void 0:l.docs,source:{originalSource:"() => {\n const item = {\n _deleted: false,\n _id: 'not-selected-onload',\n type: 'member' as ProfileTypeName,\n moderation: 'accepted' as IModerationStatus,\n verified: false,\n location: {\n lat: 0,\n lng: 0\n },\n creator: {\n _id: 'member_no2',\n _lastActive: 'string',\n countryCode: 'br',\n userImage: faker.image.avatar(),\n displayName: 'member_no1',\n isContactableByPublic: false,\n profileType: 'member' as ProfileTypeName\n }\n };\n return
\n \n
;\n}",...null==(m=null==(d=i.parameters)?void 0:d.docs)?void 0:m.source}}},r.parameters={...r.parameters,docs:{...null==(c=r.parameters)?void 0:c.docs,source:{originalSource:"() => {\n const item = {\n _deleted: false,\n _id: 'not-selected-onload',\n location: {\n lat: 0,\n lng: 0\n },\n moderation: 'accepted' as IModerationStatus,\n type: 'workspace' as ProfileTypeName,\n verified: false,\n creator: {\n _id: 'string',\n _lastActive: 'string',\n about: 'Lorem ipsum odor amet, consectetuer adipiscing elit. Lorem ipsum odor amet, consectetuer adipiscing elit.',\n badges: {\n supporter: true,\n verified: false\n },\n countryCode: 'uk',\n displayName: 'user',\n isContactableByPublic: false,\n profileType: 'workspace' as ProfileTypeName,\n workspaceType: 'Sheetpress'\n }\n };\n return
\n \n
;\n}",...null==(u=null==(p=r.parameters)?void 0:p.docs)?void 0:u.source}}},o.parameters={...o.parameters,docs:{...null==(f=o.parameters)?void 0:f.docs,source:{originalSource:"() => {\n const item = {\n _deleted: false,\n _id: 'not-selected-onload',\n type: 'member' as ProfileTypeName,\n location: {\n lat: 0,\n lng: 0\n },\n moderation: 'accepted' as IModerationStatus,\n verified: false\n };\n return
\n \n
;\n}",...null==(v=null==(y=o.parameters)?void 0:y.docs)?void 0:v.source}}};const Q=["DefaultMember","DefaultSpace","DefaultFallback"];export{o as DefaultFallback,i as DefaultMember,r as DefaultSpace,Q as __namedExportsOrder,K as default}; \ No newline at end of file diff --git a/storybook-static/assets/CardListItem.stories-xDQSpXAF.js b/storybook-static/assets/CardListItem.stories-xDQSpXAF.js deleted file mode 100644 index 7014351921..0000000000 --- a/storybook-static/assets/CardListItem.stories-xDQSpXAF.js +++ /dev/null @@ -1 +0,0 @@ -import{j as e}from"./jsx-runtime-CexXSJP5.js";import{y as b}from"./index-D_kXk1yT.js";import{C as n}from"./CardListItem-DBQLYOzT.js";import"./index-BP8_t0zE.js";import"./CardButton-QQF3n4Pb.js";import"./theme-ui-components.esm-DCiJ1mMX.js";import"./parseProps-780b287c.browser.esm-DiCerVr_.js";import"./emotion-use-insertion-effect-with-fallbacks.browser.esm-UWD3gXM2.js";import"./theme-ui-core-jsx-runtime.browser.esm-CH0qhC10.js";import"./hoist-non-react-statics.cjs-CQI8syxn.js";import"./CardProfile-D6E6LGNb.js";import"./Category-BRVyiaSI.js";import"./MemberBadge-BFCUvfGJ.js";import"./icon-star-active-ClN6U5FF.js";import"./theme-ui-core.browser.esm-CIov4Ln1.js";import"./emotion-react.browser.esm-BYoRxRk_.js";import"./cjs-Clfm10Kj.js";import"./Username-iPvtw0Lg.js";import"./supporter-D7hp958O.js";import"./emotion-styled.browser.esm-Dz2BNYeh.js";import"./extends-CF3RwP-h.js";import"./InternalLink-CtyTe3gy.js";import"./components-CutHIkdx.js";import"./index-BBRV8eG_.js";import"./index-BXxqJQdV.js";import"./ProfileTagsList-D6w9cXVe.js";const J={title:"Map/CardListItem",component:n},a=()=>{},s="desktop",i=()=>{const t={_deleted:!1,_id:"not-selected-onload",type:"member",moderation:"accepted",verified:!1,location:{lat:0,lng:0},creator:{_id:"member_no2",_lastActive:"string",countryCode:"br",userImage:b.image.avatar(),displayName:"member_no1",isContactableByPublic:!1,profileType:"member"}};return e.jsx("div",{style:{width:"500px"},children:e.jsx(n,{item:t,isSelectedPin:!1,onPinClick:a,viewport:s})})},r=()=>e.jsx("div",{style:{width:"500px"},children:e.jsx(n,{item:{_deleted:!1,_id:"not-selected-onload",location:{lat:0,lng:0},moderation:"accepted",type:"workspace",verified:!1,creator:{_id:"string",_lastActive:"string",about:"Lorem ipsum odor amet, consectetuer adipiscing elit. Lorem ipsum odor amet, consectetuer adipiscing elit.",badges:{supporter:!0,verified:!1},countryCode:"uk",displayName:"user",isContactableByPublic:!1,profileType:"workspace",workspaceType:"Sheetpress"}},isSelectedPin:!1,onPinClick:a,viewport:s})}),o=()=>e.jsx("div",{style:{width:"500px"},children:e.jsx(n,{item:{_deleted:!1,_id:"not-selected-onload",type:"member",location:{lat:0,lng:0},moderation:"accepted",verified:!1},isSelectedPin:!1,onPinClick:a,viewport:s})});var l,d,m,c,p,u,f,y,v;i.parameters={...i.parameters,docs:{...null==(l=i.parameters)?void 0:l.docs,source:{originalSource:"() => {\n const item = {\n _deleted: false,\n _id: 'not-selected-onload',\n type: 'member' as ProfileTypeName,\n moderation: 'accepted' as IModerationStatus,\n verified: false,\n location: {\n lat: 0,\n lng: 0\n },\n creator: {\n _id: 'member_no2',\n _lastActive: 'string',\n countryCode: 'br',\n userImage: faker.image.avatar(),\n displayName: 'member_no1',\n isContactableByPublic: false,\n profileType: 'member' as ProfileTypeName\n }\n };\n return
\n \n
;\n}",...null==(m=null==(d=i.parameters)?void 0:d.docs)?void 0:m.source}}},r.parameters={...r.parameters,docs:{...null==(c=r.parameters)?void 0:c.docs,source:{originalSource:"() => {\n const item = {\n _deleted: false,\n _id: 'not-selected-onload',\n location: {\n lat: 0,\n lng: 0\n },\n moderation: 'accepted' as IModerationStatus,\n type: 'workspace' as ProfileTypeName,\n verified: false,\n creator: {\n _id: 'string',\n _lastActive: 'string',\n about: 'Lorem ipsum odor amet, consectetuer adipiscing elit. Lorem ipsum odor amet, consectetuer adipiscing elit.',\n badges: {\n supporter: true,\n verified: false\n },\n countryCode: 'uk',\n displayName: 'user',\n isContactableByPublic: false,\n profileType: 'workspace' as ProfileTypeName,\n workspaceType: 'Sheetpress'\n }\n };\n return
\n \n
;\n}",...null==(u=null==(p=r.parameters)?void 0:p.docs)?void 0:u.source}}},o.parameters={...o.parameters,docs:{...null==(f=o.parameters)?void 0:f.docs,source:{originalSource:"() => {\n const item = {\n _deleted: false,\n _id: 'not-selected-onload',\n type: 'member' as ProfileTypeName,\n location: {\n lat: 0,\n lng: 0\n },\n moderation: 'accepted' as IModerationStatus,\n verified: false\n };\n return
\n \n
;\n}",...null==(v=null==(y=o.parameters)?void 0:y.docs)?void 0:v.source}}};const K=["DefaultMember","DefaultSpace","DefaultFallback"];export{o as DefaultFallback,i as DefaultMember,r as DefaultSpace,K as __namedExportsOrder,J as default}; \ No newline at end of file diff --git a/storybook-static/assets/CardProfile-D6E6LGNb.js b/storybook-static/assets/CardProfile-DtCgLDpd.js similarity index 93% rename from storybook-static/assets/CardProfile-D6E6LGNb.js rename to storybook-static/assets/CardProfile-DtCgLDpd.js index cd2567bbaa..e57f7cbef5 100644 --- a/storybook-static/assets/CardProfile-D6E6LGNb.js +++ b/storybook-static/assets/CardProfile-DtCgLDpd.js @@ -1 +1 @@ -import{j as e}from"./jsx-runtime-CexXSJP5.js";import{C as g}from"./Category-BRVyiaSI.js";import{M as c}from"./MemberBadge-BFCUvfGJ.js";import{U as f}from"./Username-iPvtw0Lg.js";import{F as i,a as _,g as C,I as b,T as I}from"./theme-ui-components.esm-DCiJ1mMX.js";import{P as j}from"./ProfileTagsList-D6w9cXVe.js";const p=({item:r,isLink:s})=>{const{_id:t,subType:a,type:n}=r;return e.jsxs(i,{sx:{padding:2,gap:2},children:[e.jsx(c,{profileType:n,size:50}),e.jsxs(i,{sx:{flexDirection:"column",gap:2},children:[e.jsx(f,{user:{userName:t},sx:{alignSelf:"flex-start"},isLink:s,target:"_blank"}),a&&e.jsx(g,{category:{label:a},sx:{border:"1px solid #0087B6",backgroundColor:"#ECFAFF",color:"#0087B6"}}),"member"===n&&e.jsx(g,{category:{label:"Wants to get started"},sx:{border:"1px solid #A72E5A",backgroundColor:"#F7C7D9",color:"#A72E5A"}})]})]})};try{p.displayName="CardDetailsFallback",p.__docgenInfo={description:"",displayName:"CardDetailsFallback",props:{item:{defaultValue:null,description:"",name:"item",required:!0,type:{name:"IMapPin"}},isLink:{defaultValue:null,description:"",name:"isLink",required:!0,type:{name:"boolean"}}}}}catch{}const x=({creator:r,isLink:s})=>{const{_id:t,badges:a,countryCode:n,profileType:o,tags:l,userImage:d}=r;return e.jsxs(i,{sx:{gap:2,justifyContent:"center",alignItems:"center",padding:2,alignContent:"stretch"},children:[d&&e.jsx(_,{sx:{aspectRatio:1,width:"60px",height:"60px"},children:e.jsxs(i,{sx:{alignContent:"flex-start",justifyContent:"flex-end",flexWrap:"wrap"},children:[e.jsx(C,{src:d,sx:{width:"60px",height:"60px",objectFit:"cover"},loading:"lazy"}),e.jsx(c,{profileType:o,size:22,sx:{transform:"translateY(-22px)"}})]})}),!d&&e.jsx(c,{profileType:o,size:50}),e.jsxs(i,{sx:{flexDirection:"column",gap:1,flex:1},children:[e.jsx(f,{user:{userName:t,countryCode:n,isSupporter:(null==a?void 0:a.supporter)||!1,isVerified:(null==a?void 0:a.verified)||!1},sx:{alignSelf:"flex-start"},isLink:s,target:"_blank"}),l&&e.jsx(j,{tags:l})]})]})};try{x.displayName="CardDetailsMemberProfile",x.__docgenInfo={description:"",displayName:"CardDetailsMemberProfile",props:{creator:{defaultValue:null,description:"",name:"creator",required:!0,type:{name:"IProfileCreator"}},isLink:{defaultValue:null,description:"",name:"isLink",required:!0,type:{name:"boolean"}}}}}catch{}const u=({creator:r,isLink:s})=>{const{_id:t,about:a,badges:n,countryCode:o,coverImage:l,profileType:d,tags:p}=r,x=!!(a&&a.length>80)&&a.slice(0,78)+"...";return e.jsxs(i,{sx:{flexDirection:"column",width:"100%"},children:[l&&e.jsxs(e.Fragment,{children:[e.jsx(i,{sx:{aspectRatio:16/6,overflow:"hidden"},children:e.jsx(b,{src:l,sx:{aspectRatio:16/6,alignSelf:"stretch",objectFit:"cover"},loading:"lazy"})}),e.jsx(_,{sx:{position:"relative",height:0,top:"-20px",width:"100%"},children:e.jsx(c,{profileType:d,size:40,sx:{float:"right",marginX:2}})})]}),e.jsxs(i,{sx:{alignItems:"flex-start",flexDirection:"column",gap:1,padding:2},children:[e.jsxs(i,{sx:{gap:2},children:[!l&&e.jsx(c,{profileType:d,size:30}),e.jsx(f,{user:{userName:t,countryCode:o,isVerified:(null==n?void 0:n.verified)||!1,isSupporter:(null==n?void 0:n.supporter)||!1},sx:{alignSelf:"flex-start"},isLink:s,target:"_blank"})]}),p&&e.jsx(j,{tags:p}),a&&e.jsx(I,{variant:"quiet",sx:{fontSize:2},children:x||a})]})]})};try{u.displayName="CardDetailsSpaceProfile",u.__docgenInfo={description:"",displayName:"CardDetailsSpaceProfile",props:{creator:{defaultValue:null,description:"",name:"creator",required:!0,type:{name:"IProfileCreator"}},isLink:{defaultValue:null,description:"",name:"isLink",required:!0,type:{name:"boolean"}}}}}catch{}const y=({item:r,isLink:s=!1})=>{const{creator:t}=r,a="member"===(null==t?void 0:t.profileType);return e.jsxs(i,{sx:{alignItems:"stretch",alignContent:"stretch"},children:[a&&e.jsx(x,{creator:t,isLink:s}),!a&&t&&e.jsx(u,{creator:t,isLink:s}),!t&&e.jsx(p,{item:r,isLink:s})]})};try{y.displayName="CardProfile",y.__docgenInfo={description:"",displayName:"CardProfile",props:{item:{defaultValue:null,description:"",name:"item",required:!0,type:{name:"IMapPin"}},isLink:{defaultValue:{value:"false"},description:"",name:"isLink",required:!1,type:{name:"boolean"}}}}}catch{}export{y as C}; \ No newline at end of file +import{j as e}from"./jsx-runtime-CexXSJP5.js";import{C as g}from"./Category-CVnjFQdi.js";import{M as c}from"./MemberBadge-DSOx4fo1.js";import{U as f}from"./Username-CNsNRGy2.js";import{F as i,a as _,g as C,I as b,T as I}from"./theme-ui-components.esm-BngKL4Rx.js";import{P as j}from"./ProfileTagsList-CnWLcFtJ.js";const p=({item:r,isLink:s})=>{const{_id:t,subType:a,type:n}=r;return e.jsxs(i,{sx:{padding:2,gap:2},children:[e.jsx(c,{profileType:n,size:50}),e.jsxs(i,{sx:{flexDirection:"column",gap:2},children:[e.jsx(f,{user:{userName:t},sx:{alignSelf:"flex-start"},isLink:s,target:"_blank"}),a&&e.jsx(g,{category:{label:a},sx:{border:"1px solid #0087B6",backgroundColor:"#ECFAFF",color:"#0087B6"}}),"member"===n&&e.jsx(g,{category:{label:"Wants to get started"},sx:{border:"1px solid #A72E5A",backgroundColor:"#F7C7D9",color:"#A72E5A"}})]})]})};try{p.displayName="CardDetailsFallback",p.__docgenInfo={description:"",displayName:"CardDetailsFallback",props:{item:{defaultValue:null,description:"",name:"item",required:!0,type:{name:"IMapPin"}},isLink:{defaultValue:null,description:"",name:"isLink",required:!0,type:{name:"boolean"}}}}}catch{}const x=({creator:r,isLink:s})=>{const{_id:t,badges:a,countryCode:n,profileType:o,tags:l,userImage:d}=r;return e.jsxs(i,{sx:{gap:2,justifyContent:"center",alignItems:"center",padding:2,alignContent:"stretch"},children:[d&&e.jsx(_,{sx:{aspectRatio:1,width:"60px",height:"60px"},children:e.jsxs(i,{sx:{alignContent:"flex-start",justifyContent:"flex-end",flexWrap:"wrap"},children:[e.jsx(C,{src:d,sx:{width:"60px",height:"60px",objectFit:"cover"},loading:"lazy"}),e.jsx(c,{profileType:o,size:22,sx:{transform:"translateY(-22px)"}})]})}),!d&&e.jsx(c,{profileType:o,size:50}),e.jsxs(i,{sx:{flexDirection:"column",gap:1,flex:1},children:[e.jsx(f,{user:{userName:t,countryCode:n,isSupporter:(null==a?void 0:a.supporter)||!1,isVerified:(null==a?void 0:a.verified)||!1},sx:{alignSelf:"flex-start"},isLink:s,target:"_blank"}),l&&e.jsx(j,{tags:l})]})]})};try{x.displayName="CardDetailsMemberProfile",x.__docgenInfo={description:"",displayName:"CardDetailsMemberProfile",props:{creator:{defaultValue:null,description:"",name:"creator",required:!0,type:{name:"IProfileCreator"}},isLink:{defaultValue:null,description:"",name:"isLink",required:!0,type:{name:"boolean"}}}}}catch{}const u=({creator:r,isLink:s})=>{const{_id:t,about:a,badges:n,countryCode:o,coverImage:l,profileType:d,tags:p}=r,x=!!(a&&a.length>80)&&a.slice(0,78)+"...";return e.jsxs(i,{sx:{flexDirection:"column",width:"100%"},children:[l&&e.jsxs(e.Fragment,{children:[e.jsx(i,{sx:{aspectRatio:16/6,overflow:"hidden"},children:e.jsx(b,{src:l,sx:{aspectRatio:16/6,alignSelf:"stretch",objectFit:"cover"},loading:"lazy"})}),e.jsx(_,{sx:{position:"relative",height:0,top:"-20px",width:"100%"},children:e.jsx(c,{profileType:d,size:40,sx:{float:"right",marginX:2}})})]}),e.jsxs(i,{sx:{alignItems:"flex-start",flexDirection:"column",gap:1,padding:2},children:[e.jsxs(i,{sx:{gap:2},children:[!l&&e.jsx(c,{profileType:d,size:30}),e.jsx(f,{user:{userName:t,countryCode:o,isVerified:(null==n?void 0:n.verified)||!1,isSupporter:(null==n?void 0:n.supporter)||!1},sx:{alignSelf:"flex-start"},isLink:s,target:"_blank"})]}),p&&e.jsx(j,{tags:p}),a&&e.jsx(I,{variant:"quiet",sx:{fontSize:2},children:x||a})]})]})};try{u.displayName="CardDetailsSpaceProfile",u.__docgenInfo={description:"",displayName:"CardDetailsSpaceProfile",props:{creator:{defaultValue:null,description:"",name:"creator",required:!0,type:{name:"IProfileCreator"}},isLink:{defaultValue:null,description:"",name:"isLink",required:!0,type:{name:"boolean"}}}}}catch{}const y=({item:r,isLink:s=!1})=>{const{creator:t}=r,a="member"===(null==t?void 0:t.profileType);return e.jsxs(i,{sx:{alignItems:"stretch",alignContent:"stretch"},children:[a&&e.jsx(x,{creator:t,isLink:s}),!a&&t&&e.jsx(u,{creator:t,isLink:s}),!t&&e.jsx(p,{item:r,isLink:s})]})};try{y.displayName="CardProfile",y.__docgenInfo={description:"",displayName:"CardProfile",props:{item:{defaultValue:null,description:"",name:"item",required:!0,type:{name:"IMapPin"}},isLink:{defaultValue:{value:"false"},description:"",name:"isLink",required:!1,type:{name:"boolean"}}}}}catch{}export{y as C}; \ No newline at end of file diff --git a/storybook-static/assets/Category-BRVyiaSI.js b/storybook-static/assets/Category-CVnjFQdi.js similarity index 90% rename from storybook-static/assets/Category-BRVyiaSI.js rename to storybook-static/assets/Category-CVnjFQdi.js index 7969bcab6e..e58e735a76 100644 --- a/storybook-static/assets/Category-BRVyiaSI.js +++ b/storybook-static/assets/Category-CVnjFQdi.js @@ -1 +1 @@ -import{j as r}from"./jsx-runtime-CexXSJP5.js";import{F as c,T as s}from"./theme-ui-components.esm-DCiJ1mMX.js";const a=e=>{const{category:a,sx:t}=e;return r.jsx(c,{sx:{alignItems:"start"},children:r.jsx(s,{"data-cy":"category",sx:{fontSize:1,color:"#555555",backgroundColor:"#cccccc",paddingX:"7.5px",paddingY:"5px",borderRadius:1,...t},children:a.label})})};try{a.displayName="Category",a.__docgenInfo={description:"",displayName:"Category",props:{category:{defaultValue:null,description:"",name:"category",required:!0,type:{name:"{ label: string; }"}},sx:{defaultValue:null,description:"",name:"sx",required:!1,type:{name:"ThemeUIStyleObject"}}}}}catch{}export{a as C}; \ No newline at end of file +import{j as r}from"./jsx-runtime-CexXSJP5.js";import{F as c,T as s}from"./theme-ui-components.esm-BngKL4Rx.js";const a=e=>{const{category:a,sx:t}=e;return r.jsx(c,{sx:{alignItems:"start"},children:r.jsx(s,{"data-cy":"category",sx:{fontSize:1,color:"#555555",backgroundColor:"#cccccc",paddingX:"7.5px",paddingY:"5px",borderRadius:1,...t},children:a.label})})};try{a.displayName="Category",a.__docgenInfo={description:"",displayName:"Category",props:{category:{defaultValue:null,description:"",name:"category",required:!0,type:{name:"{ label: string; }"}},sx:{defaultValue:null,description:"",name:"sx",required:!1,type:{name:"ThemeUIStyleObject"}}}}}catch{}export{a as C}; \ No newline at end of file diff --git a/storybook-static/assets/Category.stories-CJyQmpTt.js b/storybook-static/assets/Category.stories-BPS-kAao.js similarity index 84% rename from storybook-static/assets/Category.stories-CJyQmpTt.js rename to storybook-static/assets/Category.stories-BPS-kAao.js index 969bcdcc73..f01b98144d 100644 --- a/storybook-static/assets/Category.stories-CJyQmpTt.js +++ b/storybook-static/assets/Category.stories-BPS-kAao.js @@ -1 +1 @@ -import{j as s}from"./jsx-runtime-CexXSJP5.js";import{C as a}from"./Category-BRVyiaSI.js";import"./index-BP8_t0zE.js";import"./theme-ui-components.esm-DCiJ1mMX.js";import"./parseProps-780b287c.browser.esm-DiCerVr_.js";import"./emotion-use-insertion-effect-with-fallbacks.browser.esm-UWD3gXM2.js";import"./theme-ui-core-jsx-runtime.browser.esm-CH0qhC10.js";import"./hoist-non-react-statics.cjs-CQI8syxn.js";const d={title:"Components/Category",component:a},o=()=>s.jsx(a,{category:{label:"Label"}});var r,t,e;o.parameters={...o.parameters,docs:{...null==(r=o.parameters)?void 0:r.docs,source:{originalSource:"() => ",...null==(e=null==(t=o.parameters)?void 0:t.docs)?void 0:e.source}}};const y=["Default"];export{o as Default,y as __namedExportsOrder,d as default}; \ No newline at end of file +import{j as s}from"./jsx-runtime-CexXSJP5.js";import{C as a}from"./Category-CVnjFQdi.js";import"./index-BP8_t0zE.js";import"./theme-ui-components.esm-BngKL4Rx.js";import"./parseProps-780b287c.browser.esm-DiCerVr_.js";import"./emotion-use-insertion-effect-with-fallbacks.browser.esm-UWD3gXM2.js";import"./theme-ui-core-jsx-runtime.browser.esm-CH0qhC10.js";import"./hoist-non-react-statics.cjs-CQI8syxn.js";const d={title:"Components/Category",component:a},o=()=>s.jsx(a,{category:{label:"Label"}});var r,t,e;o.parameters={...o.parameters,docs:{...null==(r=o.parameters)?void 0:r.docs,source:{originalSource:"() => ",...null==(e=null==(t=o.parameters)?void 0:t.docs)?void 0:e.source}}};const y=["Default"];export{o as Default,y as __namedExportsOrder,d as default}; \ No newline at end of file diff --git a/storybook-static/assets/CharacterCount-BGgvgJrP.js b/storybook-static/assets/CharacterCount-CVY3hBeQ.js similarity index 93% rename from storybook-static/assets/CharacterCount-BGgvgJrP.js rename to storybook-static/assets/CharacterCount-CVY3hBeQ.js index bc11af2ba3..4c8dc588f6 100644 --- a/storybook-static/assets/CharacterCount-BGgvgJrP.js +++ b/storybook-static/assets/CharacterCount-CVY3hBeQ.js @@ -1 +1 @@ -import{j as s}from"./jsx-runtime-CexXSJP5.js";import{T as m}from"./theme-ui-components.esm-DCiJ1mMX.js";const c=({currentSize:e,minSize:n,maxSize:r})=>{var o,t;const i=e/r,a=[{value:1,color:"red",font_weight:"bold"},{value:.95,color:"subscribed",font_weight:"bold"},{value:.9,color:"green",font_weight:"bold"}];let l=(null==(o=a.find((e=>e.value<=i)))?void 0:o.color)??"green",u=(null==(t=a.find((e=>e.value<=i)))?void 0:t.font_weight)??"normal";return e{var o,t;const i=e/r,a=[{value:1,color:"red",font_weight:"bold"},{value:.95,color:"subscribed",font_weight:"bold"},{value:.9,color:"green",font_weight:"bold"}];let l=(null==(o=a.find((e=>e.value<=i)))?void 0:o.color)??"green",u=(null==(t=a.find((e=>e.value<=i)))?void 0:t.font_weight)??"normal";return ee.jsx(i,{currentSize:0,minSize:0,maxSize:100}),t=()=>e.jsx(i,{currentSize:50,minSize:0,maxSize:100}),a=()=>e.jsx(e.Fragment,{children:C.map(((r,t)=>e.jsx(i,{currentSize:r.currentSize,minSize:r.minSize,maxSize:r.maxSize},t)))});var n,s,m,c,S,u,z,p,x;r.parameters={...r.parameters,docs:{...null==(n=r.parameters)?void 0:n.docs,source:{originalSource:"() => ",...null==(m=null==(s=r.parameters)?void 0:s.docs)?void 0:m.source}}},t.parameters={...t.parameters,docs:{...null==(c=t.parameters)?void 0:c.docs,source:{originalSource:"() => ",...null==(u=null==(S=t.parameters)?void 0:S.docs)?void 0:u.source}}},a.parameters={...a.parameters,docs:{...null==(z=a.parameters)?void 0:z.docs,source:{originalSource:"() => <>\n {errorValues.map((state, index) => {\n return ;\n })}\n ",...null==(x=null==(p=a.parameters)?void 0:p.docs)?void 0:x.source}}};const D=["Default","WithValidState","WithError"];export{r as Default,a as WithError,t as WithValidState,D as __namedExportsOrder,_ as default}; \ No newline at end of file +import{j as e}from"./jsx-runtime-CexXSJP5.js";import{C as i}from"./CharacterCount-CVY3hBeQ.js";import"./index-BP8_t0zE.js";import"./theme-ui-components.esm-BngKL4Rx.js";import"./parseProps-780b287c.browser.esm-DiCerVr_.js";import"./emotion-use-insertion-effect-with-fallbacks.browser.esm-UWD3gXM2.js";import"./theme-ui-core-jsx-runtime.browser.esm-CH0qhC10.js";import"./hoist-non-react-statics.cjs-CQI8syxn.js";const _={title:"Components/CharacterCount",component:i},C=[{currentSize:10,minSize:50,maxSize:200},{currentSize:200,minSize:0,maxSize:100}],r=()=>e.jsx(i,{currentSize:0,minSize:0,maxSize:100}),t=()=>e.jsx(i,{currentSize:50,minSize:0,maxSize:100}),a=()=>e.jsx(e.Fragment,{children:C.map(((r,t)=>e.jsx(i,{currentSize:r.currentSize,minSize:r.minSize,maxSize:r.maxSize},t)))});var n,s,m,c,S,u,z,p,x;r.parameters={...r.parameters,docs:{...null==(n=r.parameters)?void 0:n.docs,source:{originalSource:"() => ",...null==(m=null==(s=r.parameters)?void 0:s.docs)?void 0:m.source}}},t.parameters={...t.parameters,docs:{...null==(c=t.parameters)?void 0:c.docs,source:{originalSource:"() => ",...null==(u=null==(S=t.parameters)?void 0:S.docs)?void 0:u.source}}},a.parameters={...a.parameters,docs:{...null==(z=a.parameters)?void 0:z.docs,source:{originalSource:"() => <>\n {errorValues.map((state, index) => {\n return ;\n })}\n ",...null==(x=null==(p=a.parameters)?void 0:p.docs)?void 0:x.source}}};const D=["Default","WithValidState","WithError"];export{r as Default,a as WithError,t as WithValidState,D as __namedExportsOrder,_ as default}; \ No newline at end of file diff --git a/storybook-static/assets/Color-6VNJS4EI-Uu8FB38t.js b/storybook-static/assets/Color-6VNJS4EI-Bg8R5F17.js similarity index 99% rename from storybook-static/assets/Color-6VNJS4EI-Uu8FB38t.js rename to storybook-static/assets/Color-6VNJS4EI-Bg8R5F17.js index 409a191bf5..7b23699ead 100644 --- a/storybook-static/assets/Color-6VNJS4EI-Uu8FB38t.js +++ b/storybook-static/assets/Color-6VNJS4EI-Bg8R5F17.js @@ -1 +1 @@ -import{n as M,e as ue,T as Me,F as Ce,I as $e,g as Ne}from"./index-C6f7HM-L.js";import{a as h,r as b,g as fe}from"./index-BP8_t0zE.js";import{_ as Oe,i as J,a as Ie}from"./index-EEBIeVPD.js";import"./iframe-B1GJESFe.js";import"../sb-preview/runtime.js";import"./emotion-use-insertion-effect-with-fallbacks.browser.esm-UWD3gXM2.js";import"./index-BBRV8eG_.js";import"./index-D-8MO0q_.js";import"./extends-CF3RwP-h.js";import"./setPrototypeOf-NYsvoNVB.js";import"./inheritsLoose-CdQPfY07.js";import"./isNativeReflectConstruct-gwnEYaHE.js";import"./index-DrFu-skq.js";function $(){return($=Object.assign||function(e){for(var t=1;t=0||(a[r]=e[r]);return a}function K(e){var t=b.useRef(e),r=b.useRef((function(e){t.current&&t.current(e)}));return t.current=e,r.current}var S=function(e,t,r){return void 0===t&&(t=0),void 0===r&&(r=1),e>r?r:e0:e.buttons>0)&&a.current?o(ne(a.current,e,u.current)):r(!1)},t=function(){return r(!1)};function r(r){var n=i.current,o=V(a.current),l=r?o.addEventListener:o.removeEventListener;l(n?"touchmove":"mousemove",e),l(n?"touchend":"mouseup",t)}return[function(e){var t,n=e.nativeEvent,l=a.current;if(l&&(re(n),t=n,(!i.current||j(t))&&l)){if(j(n)){i.current=!0;var s=n.changedTouches||[];s.length&&(u.current=s[0].identifier)}l.focus(),o(ne(l,n,u.current)),r(!0)}},function(e){var t=e.which||e.keyCode;t<37||t>40||(e.preventDefault(),l({left:39===t?.05:37===t?-.05:0,top:40===t?.05:38===t?-.05:0}))},r]}),[l,o]),c=s[0],f=s[1],d=s[2];return b.useEffect((function(){return d}),[d]),h.createElement("div",$({},n,{onTouchStart:c,onMouseDown:c,className:"react-colorful__interactive",ref:a,onKeyDown:f,tabIndex:0,role:"slider"}))})),z=function(e){return e.filter(Boolean).join(" ")},ee=function(e){var t=e.color,r=e.left,n=e.top,a=void 0===n?.5:n,o=z(["react-colorful__pointer",e.className]);return h.createElement("div",{className:o,style:{top:100*a+"%",left:100*r+"%"}},h.createElement("div",{className:"react-colorful__pointer-fill",style:{backgroundColor:t}}))},y=function(e,t,r){return void 0===t&&(t=0),void 0===r&&(r=Math.pow(10,t)),Math.round(r*e)/r},Se={grad:.9,turn:360,rad:360/(2*Math.PI)},Re=function(e){return ge(A(e))},A=function(e){return"#"===e[0]&&(e=e.substring(1)),e.length<6?{r:parseInt(e[0]+e[0],16),g:parseInt(e[1]+e[1],16),b:parseInt(e[2]+e[2],16),a:4===e.length?y(parseInt(e[3]+e[3],16)/255,2):1}:{r:parseInt(e.substring(0,2),16),g:parseInt(e.substring(2,4),16),b:parseInt(e.substring(4,6),16),a:8===e.length?y(parseInt(e.substring(6,8),16)/255,2):1}},Te=function(e,t){return void 0===t&&(t="deg"),Number(e)*(Se[t]||1)},je=function(e){var t=/hsla?\(?\s*(-?\d*\.?\d+)(deg|rad|grad|turn)?[,\s]+(-?\d*\.?\d+)%?[,\s]+(-?\d*\.?\d+)%?,?\s*[/\s]*(-?\d*\.?\d+)?(%)?\s*\)?/i.exec(e);return t?Fe({h:Te(t[1],t[2]),s:Number(t[3]),l:Number(t[4]),a:void 0===t[5]?1:Number(t[5])/(t[6]?100:1)}):{h:0,s:0,v:0,a:1}},Fe=function(e){var t=e.s,r=e.l;return{h:e.h,s:(t*=(r<50?r:100-r)/100)>0?2*t/(r+t)*100:0,v:r+t,a:e.a}},ze=function(e){return Pe(de(e))},he=function(e){var t=e.s,r=e.v,n=e.a,a=(200-t)*r/100;return{h:y(e.h),s:y(a>0&&a<200?t*r/100/(a<=100?a:200-a)*100:0),l:y(a/2),a:y(n,2)}},G=function(e){var t=he(e);return"hsl("+t.h+", "+t.s+"%, "+t.l+"%)"},q=function(e){var t=he(e);return"hsla("+t.h+", "+t.s+"%, "+t.l+"%, "+t.a+")"},de=function(e){var t=e.h,r=e.s,n=e.v,a=e.a;t=t/360*6,r/=100,n/=100;var o=Math.floor(t),l=n*(1-r),u=n*(1-(t-o)*r),i=n*(1-(1-t+o)*r),s=o%6;return{r:y(255*[n,u,l,l,i,n][s]),g:y(255*[i,n,n,u,l,l][s]),b:y(255*[l,l,i,n,n,u][s]),a:y(a,2)}},He=function(e){var t=/rgba?\(?\s*(-?\d*\.?\d+)(%)?[,\s]+(-?\d*\.?\d+)(%)?[,\s]+(-?\d*\.?\d+)(%)?,?\s*[/\s]*(-?\d*\.?\d+)?(%)?\s*\)?/i.exec(e);return t?ge({r:Number(t[1])/(t[2]?100/255:1),g:Number(t[3])/(t[4]?100/255:1),b:Number(t[5])/(t[6]?100/255:1),a:void 0===t[7]?1:Number(t[7])/(t[8]?100:1)}):{h:0,s:0,v:0,a:1}},H=function(e){var t=e.toString(16);return t.length<2?"0"+t:t},Pe=function(e){var t=e.r,r=e.g,n=e.b,a=e.a,o=a<1?H(y(255*a)):"";return"#"+H(t)+H(r)+H(n)+o},ge=function(e){var t=e.r,r=e.g,n=e.b,a=e.a,o=Math.max(t,r,n),l=o-Math.min(t,r,n),u=l?o===t?(r-n)/l:o===r?2+(n-t)/l:4+(t-r)/l:0;return{h:y(60*(u<0?u+6:u)),s:y(o?l/o*100:0),v:y(o/255*100),a:a}},me=h.memo((function(e){var t=e.hue,r=e.onChange,n=z(["react-colorful__hue",e.className]);return h.createElement("div",{className:n},h.createElement(Z,{onMove:function(e){r({h:360*e.left})},onKey:function(e){r({h:S(t+360*e.left,0,360)})},"aria-label":"Hue","aria-valuenow":y(t),"aria-valuemax":"360","aria-valuemin":"0"},h.createElement(ee,{className:"react-colorful__hue-pointer",left:t/360,color:G({h:t,s:100,v:100,a:1})})))})),be=h.memo((function(e){var t=e.hsva,r=e.onChange,n={backgroundColor:G({h:t.h,s:100,v:100,a:1})};return h.createElement("div",{className:"react-colorful__saturation",style:n},h.createElement(Z,{onMove:function(e){r({s:100*e.left,v:100-100*e.top})},onKey:function(e){r({s:S(t.s+100*e.left,0,100),v:S(t.v-100*e.top,0,100)})},"aria-label":"Color","aria-valuetext":"Saturation "+y(t.s)+"%, Brightness "+y(t.v)+"%"},h.createElement(ee,{className:"react-colorful__saturation-pointer",top:1-t.v/100,left:t.s/100,color:G(t)})))})),ve=function(e,t){if(e===t)return!0;for(var r in e)if(e[r]!==t[r])return!1;return!0},pe=function(e,t){return e.replace(/\s/g,"")===t.replace(/\s/g,"")},Le=function(e,t){return e.toLowerCase()===t.toLowerCase()||ve(A(e),A(t))};function ye(e,t,r){var n=K(r),a=b.useState((function(){return e.toHsva(t)})),o=a[0],l=a[1],u=b.useRef({color:t,hsva:o});b.useEffect((function(){if(!e.equal(t,u.current.color)){var r=e.toHsva(t);u.current={hsva:r,color:t},l(r)}}),[t,e]),b.useEffect((function(){var t;ve(o,u.current.hsva)||e.equal(t=e.fromHsva(o),u.current.color)||(u.current={hsva:o,color:t},n(t))}),[o,e,n]);var i=b.useCallback((function(e){l((function(t){return Object.assign({},t,e)}))}),[]);return[o,i]}var qe=typeof window<"u"?b.useLayoutEffect:b.useEffect,Be=function(){return typeof __webpack_nonce__<"u"?__webpack_nonce__:void 0},oe=new Map,xe=function(e){qe((function(){var t=e.current?e.current.ownerDocument:document;if(void 0!==t&&!oe.has(t)){var r=t.createElement("style");r.innerHTML='.react-colorful{position:relative;display:flex;flex-direction:column;width:200px;height:200px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:default}.react-colorful__saturation{position:relative;flex-grow:1;border-color:transparent;border-bottom:12px solid #000;border-radius:8px 8px 0 0;background-image:linear-gradient(0deg,#000,transparent),linear-gradient(90deg,#fff,hsla(0,0%,100%,0))}.react-colorful__alpha-gradient,.react-colorful__pointer-fill{content:"";position:absolute;left:0;top:0;right:0;bottom:0;pointer-events:none;border-radius:inherit}.react-colorful__alpha-gradient,.react-colorful__saturation{box-shadow:inset 0 0 0 1px rgba(0,0,0,.05)}.react-colorful__alpha,.react-colorful__hue{position:relative;height:24px}.react-colorful__hue{background:linear-gradient(90deg,red 0,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,red)}.react-colorful__last-control{border-radius:0 0 8px 8px}.react-colorful__interactive{position:absolute;left:0;top:0;right:0;bottom:0;border-radius:inherit;outline:none;touch-action:none}.react-colorful__pointer{position:absolute;z-index:1;box-sizing:border-box;width:28px;height:28px;transform:translate(-50%,-50%);background-color:#fff;border:2px solid #fff;border-radius:50%;box-shadow:0 2px 4px rgba(0,0,0,.2)}.react-colorful__interactive:focus .react-colorful__pointer{transform:translate(-50%,-50%) scale(1.1)}.react-colorful__alpha,.react-colorful__alpha-pointer{background-color:#fff;background-image:url(\'data:image/svg+xml;charset=utf-8,\')}.react-colorful__saturation-pointer{z-index:3}.react-colorful__hue-pointer{z-index:2}',oe.set(t,r);var n=Be();n&&r.setAttribute("nonce",n),t.head.appendChild(r)}}),[])},We=function(e){var t=e.className,r=e.colorModel,n=e.color,a=void 0===n?r.defaultColor:n,o=e.onChange,l=Q(e,["className","colorModel","color","onChange"]),u=b.useRef(null);xe(u);var i=ye(r,a,o),s=i[0],c=i[1],f=z(["react-colorful",t]);return h.createElement("div",$({},l,{ref:u,className:f}),h.createElement(be,{hsva:s,onChange:c}),h.createElement(me,{hue:s.h,onChange:c,className:"react-colorful__last-control"}))},Xe={defaultColor:"000",toHsva:Re,fromHsva:function(e){return ze({h:e.h,s:e.s,v:e.v,a:1})},equal:Le},De=function(e){return h.createElement(We,$({},e,{colorModel:Xe}))},Ke=function(e){var t=e.className,r=e.hsva,n=e.onChange,a={backgroundImage:"linear-gradient(90deg, "+q(Object.assign({},r,{a:0}))+", "+q(Object.assign({},r,{a:1}))+")"},o=z(["react-colorful__alpha",t]),l=y(100*r.a);return h.createElement("div",{className:o},h.createElement("div",{className:"react-colorful__alpha-gradient",style:a}),h.createElement(Z,{onMove:function(e){n({a:e.left})},onKey:function(e){n({a:S(r.a+e.left)})},"aria-label":"Alpha","aria-valuetext":l+"%","aria-valuenow":l,"aria-valuemin":"0","aria-valuemax":"100"},h.createElement(ee,{className:"react-colorful__alpha-pointer",left:r.a,color:q(r)})))},we=function(e){var t=e.className,r=e.colorModel,n=e.color,a=void 0===n?r.defaultColor:n,o=e.onChange,l=Q(e,["className","colorModel","color","onChange"]),u=b.useRef(null);xe(u);var i=ye(r,a,o),s=i[0],c=i[1],f=z(["react-colorful",t]);return h.createElement("div",$({},l,{ref:u,className:f}),h.createElement(be,{hsva:s,onChange:c}),h.createElement(me,{hue:s.h,onChange:c}),h.createElement(Ke,{hsva:s,onChange:c,className:"react-colorful__last-control"}))},Ve={defaultColor:"hsla(0, 0%, 0%, 1)",toHsva:je,fromHsva:q,equal:pe},Ae=function(e){return h.createElement(we,$({},e,{colorModel:Ve}))},Ge={defaultColor:"rgba(0, 0, 0, 1)",toHsva:He,fromHsva:function(e){var t=de(e);return"rgba("+t.r+", "+t.g+", "+t.b+", "+t.a+")"},equal:pe},Ue=function(e){return h.createElement(we,$({},e,{colorModel:Ge}))},Ye={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]};const F=Ye,ke={};for(const e of Object.keys(F))ke[F[e]]=e;const u={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},lch:{channels:3,labels:"lch"},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}};var _e=u;for(const e of Object.keys(u)){if(!("channels"in u[e]))throw new Error("missing channels property: "+e);if(!("labels"in u[e]))throw new Error("missing channel labels property: "+e);if(u[e].labels.length!==u[e].channels)throw new Error("channel and label counts mismatch: "+e);const{channels:t,labels:r}=u[e];delete u[e].channels,delete u[e].labels,Object.defineProperty(u[e],"channels",{value:t}),Object.defineProperty(u[e],"labels",{value:r})}function Je(e,t){return(e[0]-t[0])**2+(e[1]-t[1])**2+(e[2]-t[2])**2}u.rgb.hsl=function(e){const t=e[0]/255,r=e[1]/255,n=e[2]/255,a=Math.min(t,r,n),o=Math.max(t,r,n),l=o-a;let u,i;o===a?u=0:t===o?u=(r-n)/l:r===o?u=2+(n-t)/l:n===o&&(u=4+(t-r)/l),u=Math.min(60*u,360),u<0&&(u+=360);const s=(a+o)/2;return i=o===a?0:s<=.5?l/(o+a):l/(2-o-a),[u,100*i,100*s]},u.rgb.hsv=function(e){let t,r,n,a,o;const l=e[0]/255,u=e[1]/255,i=e[2]/255,s=Math.max(l,u,i),c=s-Math.min(l,u,i),h=function(e){return(s-e)/6/c+.5};return 0===c?(a=0,o=0):(o=c/s,t=h(l),r=h(u),n=h(i),l===s?a=n-r:u===s?a=1/3+t-n:i===s&&(a=2/3+r-t),a<0?a+=1:a>1&&(a-=1)),[360*a,100*o,100*s]},u.rgb.hwb=function(e){const t=e[0],r=e[1];let n=e[2];const a=u.rgb.hsl(e)[0],o=1/255*Math.min(t,Math.min(r,n));return n=1-1/255*Math.max(t,Math.max(r,n)),[a,100*o,100*n]},u.rgb.cmyk=function(e){const t=e[0]/255,r=e[1]/255,n=e[2]/255,a=Math.min(1-t,1-r,1-n);return[100*((1-t-a)/(1-a)||0),100*((1-r-a)/(1-a)||0),100*((1-n-a)/(1-a)||0),100*a]},u.rgb.keyword=function(e){const t=ke[e];if(t)return t;let r,n=1/0;for(const a of Object.keys(F)){const t=Je(e,F[a]);t.04045?((t+.055)/1.055)**2.4:t/12.92,r=r>.04045?((r+.055)/1.055)**2.4:r/12.92,n=n>.04045?((n+.055)/1.055)**2.4:n/12.92;return[100*(.4124*t+.3576*r+.1805*n),100*(.2126*t+.7152*r+.0722*n),100*(.0193*t+.1192*r+.9505*n)]},u.rgb.lab=function(e){const t=u.rgb.xyz(e);let r=t[0],n=t[1],a=t[2];r/=95.047,n/=100,a/=108.883,r=r>.008856?r**(1/3):7.787*r+16/116,n=n>.008856?n**(1/3):7.787*n+16/116,a=a>.008856?a**(1/3):7.787*a+16/116;return[116*n-16,500*(r-n),200*(n-a)]},u.hsl.rgb=function(e){const t=e[0]/360,r=e[1]/100,n=e[2]/100;let a,o,l;if(0===r)return l=255*n,[l,l,l];a=n<.5?n*(1+r):n+r-n*r;const u=2*n-a,i=[0,0,0];for(let s=0;s<3;s++)o=t+1/3*-(s-1),o<0&&o++,o>1&&o--,l=6*o<1?u+6*(a-u)*o:2*o<1?a:3*o<2?u+(a-u)*(2/3-o)*6:u,i[s]=255*l;return i},u.hsl.hsv=function(e){const t=e[0];let r=e[1]/100,n=e[2]/100,a=r;const o=Math.max(n,.01);n*=2,r*=n<=1?n:2-n,a*=o<=1?o:2-o;return[t,100*(0===n?2*a/(o+a):2*r/(n+r)),100*((n+r)/2)]},u.hsv.rgb=function(e){const t=e[0]/60,r=e[1]/100;let n=e[2]/100;const a=Math.floor(t)%6,o=t-Math.floor(t),l=255*n*(1-r),u=255*n*(1-r*o),i=255*n*(1-r*(1-o));switch(n*=255,a){case 0:return[n,i,l];case 1:return[u,n,l];case 2:return[l,n,i];case 3:return[l,u,n];case 4:return[i,l,n];case 5:return[n,l,u]}},u.hsv.hsl=function(e){const t=e[0],r=e[1]/100,n=e[2]/100,a=Math.max(n,.01);let o,l;l=(2-r)*n;const u=(2-r)*a;return o=r*a,o/=u<=1?u:2-u,o=o||0,l/=2,[t,100*o,100*l]},u.hwb.rgb=function(e){const t=e[0]/360;let r=e[1]/100,n=e[2]/100;const a=r+n;let o;a>1&&(r/=a,n/=a);const l=Math.floor(6*t),u=1-n;o=6*t-l,1&l&&(o=1-o);const i=r+o*(u-r);let s,c,h;switch(l){default:case 6:case 0:s=u,c=i,h=r;break;case 1:s=i,c=u,h=r;break;case 2:s=r,c=u,h=i;break;case 3:s=r,c=i,h=u;break;case 4:s=i,c=r,h=u;break;case 5:s=u,c=r,h=i}return[255*s,255*c,255*h]},u.cmyk.rgb=function(e){const t=e[0]/100,r=e[1]/100,n=e[2]/100,a=e[3]/100;return[255*(1-Math.min(1,t*(1-a)+a)),255*(1-Math.min(1,r*(1-a)+a)),255*(1-Math.min(1,n*(1-a)+a))]},u.xyz.rgb=function(e){const t=e[0]/100,r=e[1]/100,n=e[2]/100;let a,o,l;return a=3.2406*t+-1.5372*r+-.4986*n,o=-.9689*t+1.8758*r+.0415*n,l=.0557*t+-.204*r+1.057*n,a=a>.0031308?1.055*a**(1/2.4)-.055:12.92*a,o=o>.0031308?1.055*o**(1/2.4)-.055:12.92*o,l=l>.0031308?1.055*l**(1/2.4)-.055:12.92*l,a=Math.min(Math.max(0,a),1),o=Math.min(Math.max(0,o),1),l=Math.min(Math.max(0,l),1),[255*a,255*o,255*l]},u.xyz.lab=function(e){let t=e[0],r=e[1],n=e[2];t/=95.047,r/=100,n/=108.883,t=t>.008856?t**(1/3):7.787*t+16/116,r=r>.008856?r**(1/3):7.787*r+16/116,n=n>.008856?n**(1/3):7.787*n+16/116;return[116*r-16,500*(t-r),200*(r-n)]},u.lab.xyz=function(e){let t,r,n;r=(e[0]+16)/116,t=e[1]/500+r,n=r-e[2]/200;const a=r**3,o=t**3,l=n**3;return r=a>.008856?a:(r-16/116)/7.787,t=o>.008856?o:(t-16/116)/7.787,n=l>.008856?l:(n-16/116)/7.787,t*=95.047,r*=100,n*=108.883,[t,r,n]},u.lab.lch=function(e){const t=e[0],r=e[1],n=e[2];let a;a=360*Math.atan2(n,r)/2/Math.PI,a<0&&(a+=360);return[t,Math.sqrt(r*r+n*n),a]},u.lch.lab=function(e){const t=e[0],r=e[1],n=e[2]/360*2*Math.PI;return[t,r*Math.cos(n),r*Math.sin(n)]},u.rgb.ansi16=function(e,t=null){const[r,n,a]=e;let o=null===t?u.rgb.hsv(e)[2]:t;if(o=Math.round(o/50),0===o)return 30;let l=30+(Math.round(a/255)<<2|Math.round(n/255)<<1|Math.round(r/255));return 2===o&&(l+=60),l},u.hsv.ansi16=function(e){return u.rgb.ansi16(u.hsv.rgb(e),e[2])},u.rgb.ansi256=function(e){const t=e[0],r=e[1],n=e[2];return t===r&&r===n?t<8?16:t>248?231:Math.round((t-8)/247*24)+232:16+36*Math.round(t/255*5)+6*Math.round(r/255*5)+Math.round(n/255*5)},u.ansi16.rgb=function(e){let t=e%10;if(0===t||7===t)return e>50&&(t+=3.5),t=t/10.5*255,[t,t,t];const r=.5*(1+~~(e>50));return[(1&t)*r*255,(t>>1&1)*r*255,(t>>2&1)*r*255]},u.ansi256.rgb=function(e){if(e>=232){const t=10*(e-232)+8;return[t,t,t]}let t;e-=16;return[Math.floor(e/36)/5*255,Math.floor((t=e%36)/6)/5*255,t%6/5*255]},u.rgb.hex=function(e){const t=(((255&Math.round(e[0]))<<16)+((255&Math.round(e[1]))<<8)+(255&Math.round(e[2]))).toString(16).toUpperCase();return"000000".substring(t.length)+t},u.hex.rgb=function(e){const t=e.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!t)return[0,0,0];let r=t[0];3===t[0].length&&(r=r.split("").map((e=>e+e)).join(""));const n=parseInt(r,16);return[n>>16&255,n>>8&255,255&n]},u.rgb.hcg=function(e){const t=e[0]/255,r=e[1]/255,n=e[2]/255,a=Math.max(Math.max(t,r),n),o=Math.min(Math.min(t,r),n),l=a-o;let u,i;return u=l<1?o/(1-l):0,i=l<=0?0:a===t?(r-n)/l%6:a===r?2+(n-t)/l:4+(t-r)/l,i/=6,i%=1,[360*i,100*l,100*u]},u.hsl.hcg=function(e){const t=e[1]/100,r=e[2]/100,n=r<.5?2*t*r:2*t*(1-r);let a=0;return n<1&&(a=(r-.5*n)/(1-n)),[e[0],100*n,100*a]},u.hsv.hcg=function(e){const t=e[1]/100,r=e[2]/100,n=t*r;let a=0;return n<1&&(a=(r-n)/(1-n)),[e[0],100*n,100*a]},u.hcg.rgb=function(e){const t=e[0]/360,r=e[1]/100,n=e[2]/100;if(0===r)return[255*n,255*n,255*n];const a=[0,0,0],o=t%1*6,l=o%1,u=1-l;let i=0;switch(Math.floor(o)){case 0:a[0]=1,a[1]=l,a[2]=0;break;case 1:a[0]=u,a[1]=1,a[2]=0;break;case 2:a[0]=0,a[1]=1,a[2]=l;break;case 3:a[0]=0,a[1]=u,a[2]=1;break;case 4:a[0]=l,a[1]=0,a[2]=1;break;default:a[0]=1,a[1]=0,a[2]=u}return i=(1-r)*n,[255*(r*a[0]+i),255*(r*a[1]+i),255*(r*a[2]+i)]},u.hcg.hsv=function(e){const t=e[1]/100,r=t+e[2]/100*(1-t);let n=0;return r>0&&(n=t/r),[e[0],100*n,100*r]},u.hcg.hsl=function(e){const t=e[1]/100,r=e[2]/100*(1-t)+.5*t;let n=0;return r>0&&r<.5?n=t/(2*r):r>=.5&&r<1&&(n=t/(2*(1-r))),[e[0],100*n,100*r]},u.hcg.hwb=function(e){const t=e[1]/100,r=t+e[2]/100*(1-t);return[e[0],100*(r-t),100*(1-r)]},u.hwb.hcg=function(e){const t=e[1]/100,r=1-e[2]/100,n=r-t;let a=0;return n<1&&(a=(r-n)/(1-n)),[e[0],100*n,100*a]},u.apple.rgb=function(e){return[e[0]/65535*255,e[1]/65535*255,e[2]/65535*255]},u.rgb.apple=function(e){return[e[0]/255*65535,e[1]/255*65535,e[2]/255*65535]},u.gray.rgb=function(e){return[e[0]/100*255,e[0]/100*255,e[0]/100*255]},u.gray.hsl=function(e){return[0,0,e[0]]},u.gray.hsv=u.gray.hsl,u.gray.hwb=function(e){return[0,100,e[0]]},u.gray.cmyk=function(e){return[0,0,0,e[0]]},u.gray.lab=function(e){return[e[0],0,0]},u.gray.hex=function(e){const t=255&Math.round(e[0]/100*255),r=((t<<16)+(t<<8)+t).toString(16).toUpperCase();return"000000".substring(r.length)+r},u.rgb.gray=function(e){return[(e[0]+e[1]+e[2])/3/255*100]};const B=_e;function Qe(){const e={},t=Object.keys(B);for(let r=t.length,n=0;n1&&(t=r),e(t))};return"conversion"in e&&(t.conversion=e.conversion),t}function st(e){const t=function(...t){const r=t[0];if(null==r)return r;r.length>1&&(t=r);const n=e(t);if("object"==typeof n)for(let e=n.length,a=0;a{O[e]={},Object.defineProperty(O[e],"channels",{value:U[e].channels}),Object.defineProperty(O[e],"labels",{value:U[e].labels});const t=rt(e);Object.keys(t).forEach((r=>{const n=t[r];O[e][r]=st(n),O[e][r].raw=at(n)}))}));var lt=O;const w=fe(lt);var it=Oe,ct=function(){return it.Date.now()},ut=ct,ft=/\s/;function ht(e){for(var t=e.length;t--&&ft.test(e.charAt(t)););return t}var dt=ht,gt=dt,mt=/^\s+/;function bt(e){return e&&e.slice(0,gt(e)+1).replace(mt,"")}var vt=bt,pt=vt,ae=J,yt=Ie,se=NaN,xt=/^[-+]0x[0-9a-f]+$/i,wt=/^0b[01]+$/i,kt=/^0o[0-7]+$/i,_t=parseInt;function Et(e){if("number"==typeof e)return e;if(yt(e))return se;if(ae(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=ae(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=pt(e);var r=wt.test(e);return r||kt.test(e)?_t(e.slice(2),r?2:8):xt.test(e)?se:+e}var Mt=Et,Ct=J,D=ut,le=Mt,$t="Expected a function",Nt=Math.max,Ot=Math.min;function It(e,t,r){var n,a,o,l,u,i,s=0,c=!1,h=!1,f=!0;if("function"!=typeof e)throw new TypeError($t);function d(t){var r=n,o=a;return n=a=void 0,s=t,l=e.apply(o,r)}function g(e){var r=e-i;return void 0===i||r>=t||r<0||h&&e-s>=o}function b(){var e=D();if(g(e))return v(e);u=setTimeout(b,function(e){var r=t-(e-i);return h?Ot(r,o-(e-s)):r}(e))}function v(e){return u=void 0,f&&n?d(e):(n=a=void 0,l)}function p(){var e=D(),r=g(e);if(n=arguments,a=this,i=e,r){if(void 0===u)return function(e){return s=e,u=setTimeout(b,t),c?d(e):l}(i);if(h)return clearTimeout(u),u=setTimeout(b,t),d(i)}return void 0===u&&(u=setTimeout(b,t)),l}return t=le(t)||0,Ct(r)&&(c=!!r.leading,o=(h="maxWait"in r)?Nt(le(r.maxWait)||0,t):o,f="trailing"in r?!!r.trailing:f),p.cancel=function(){void 0!==u&&clearTimeout(u),s=0,n=i=a=u=void 0},p.flush=function(){return void 0===u?l:v(D())},p}var St=It,Rt=St,Tt=J,jt="Expected a function";function Ft(e,t,r){var n=!0,a=!0;if("function"!=typeof e)throw new TypeError(jt);return Tt(r)&&(n="leading"in r?!!r.leading:n,a="trailing"in r?!!r.trailing:a),Rt(e,t,{leading:n,maxWait:t,trailing:a})}var zt=Ft;const Ht=fe(zt);var Pt=M.div({position:"relative",maxWidth:250}),Lt=M(ue)({position:"absolute",zIndex:1,top:4,left:4}),qt=M.div({width:200,margin:5,".react-colorful__saturation":{borderRadius:"4px 4px 0 0"},".react-colorful__hue":{boxShadow:"inset 0 0 0 1px rgb(0 0 0 / 5%)"},".react-colorful__last-control":{borderRadius:"0 0 4px 4px"}}),Bt=M(Me)((({theme:e})=>({fontFamily:e.typography.fonts.base}))),Wt=M.div({display:"grid",gridTemplateColumns:"repeat(9, 16px)",gap:6,padding:3,marginTop:5,width:200}),Xt=M.div((({theme:e,active:t})=>({width:16,height:16,boxShadow:t?`${e.appBorderColor} 0 0 0 1px inset, ${e.textMutedColor}50 0 0 0 4px`:`${e.appBorderColor} 0 0 0 1px inset`,borderRadius:e.appBorderRadius}))),Dt='url(\'data:image/svg+xml;charset=utf-8,\')',ie=({value:e,active:t,onClick:r,style:n,...a})=>{let o=`linear-gradient(${e}, ${e}), ${Dt}, linear-gradient(#fff, #fff)`;return h.createElement(Xt,{...a,active:t,onClick:r,style:{...n,backgroundImage:o}})},Kt=M(Ce.Input)((({theme:e})=>({width:"100%",paddingLeft:30,paddingRight:30,boxSizing:"border-box",fontFamily:e.typography.fonts.base}))),Vt=M($e)((({theme:e})=>({position:"absolute",zIndex:1,top:6,right:7,width:20,height:20,padding:4,boxSizing:"border-box",cursor:"pointer",color:e.input.color}))),Ee=(e=>(e.RGB="rgb",e.HSL="hsl",e.HEX="hex",e))(Ee||{}),P=Object.values(Ee),At=/\(([0-9]+),\s*([0-9]+)%?,\s*([0-9]+)%?,?\s*([0-9.]+)?\)/,Gt=/^\s*rgba?\(([0-9]+),\s*([0-9]+),\s*([0-9]+),?\s*([0-9.]+)?\)\s*$/i,Ut=/^\s*hsla?\(([0-9]+),\s*([0-9]+)%,\s*([0-9]+)%,?\s*([0-9.]+)?\)\s*$/i,Y=/^\s*#?([0-9a-f]{3}|[0-9a-f]{6})\s*$/i,Yt=/^\s*#?([0-9a-f]{3})\s*$/i,Jt={hex:De,rgb:Ue,hsl:Ae},L={hex:"transparent",rgb:"rgba(0, 0, 0, 0)",hsl:"hsla(0, 0%, 0%, 0)"},ce=e=>{let t=null==e?void 0:e.match(At);if(!t)return[0,0,0,1];let[,r,n,a,o=1]=t;return[r,n,a,o].map(Number)},I=e=>{if(!e)return;let t=!0;if(Gt.test(e)){let[r,n,a,o]=ce(e),[l,u,i]=w.rgb.hsl([r,n,a])||[0,0,0];return{valid:t,value:e,keyword:w.rgb.keyword([r,n,a]),colorSpace:"rgb",rgb:e,hsl:`hsla(${l}, ${u}%, ${i}%, ${o})`,hex:`#${w.rgb.hex([r,n,a]).toLowerCase()}`}}if(Ut.test(e)){let[r,n,a,o]=ce(e),[l,u,i]=w.hsl.rgb([r,n,a])||[0,0,0];return{valid:t,value:e,keyword:w.hsl.keyword([r,n,a]),colorSpace:"hsl",rgb:`rgba(${l}, ${u}, ${i}, ${o})`,hsl:e,hex:`#${w.hsl.hex([r,n,a]).toLowerCase()}`}}let r=e.replace("#",""),n=w.keyword.rgb(r)||w.hex.rgb(r),a=w.rgb.hsl(n),o=e;if(/[^#a-f0-9]/i.test(e)?o=r:Y.test(e)&&(o=`#${r}`),o.startsWith("#"))t=Y.test(o);else try{w.keyword.hex(o)}catch{t=!1}return{valid:t,value:o,keyword:w.rgb.keyword(n),colorSpace:"hex",rgb:`rgba(${n[0]}, ${n[1]}, ${n[2]}, 1)`,hsl:`hsla(${a[0]}, ${a[1]}%, ${a[2]}%, 1)`,hex:o}},Qt=(e,t,r)=>{if(!e||null==t||!t.valid)return L[r];if("hex"!==r)return(null==t?void 0:t[r])||L[r];if(!t.hex.startsWith("#"))try{return`#${w.keyword.hex(t.hex)}`}catch{return L.hex}let n=t.hex.match(Yt);if(!n)return Y.test(t.hex)?t.hex:L.hex;let[a,o,l]=n[1].split("");return`#${a}${a}${o}${o}${l}${l}`},Zt=(e,t)=>{let[r,n]=b.useState(e||""),[a,o]=b.useState((()=>I(r))),[l,u]=b.useState((null==a?void 0:a.colorSpace)||"hex");b.useEffect((()=>{let t=e||"",r=I(t);n(t),o(r),u((null==r?void 0:r.colorSpace)||"hex")}),[e]);let i=b.useMemo((()=>Qt(r,a,l).toLowerCase()),[r,a,l]),s=b.useCallback((e=>{let r=I(e),a=(null==r?void 0:r.value)||e||"";n(a),""===a&&(o(void 0),t(void 0)),r&&(o(r),u(r.colorSpace),t(r.value))}),[t]),c=b.useCallback((()=>{let e=P.indexOf(l)+1;e>=P.length&&(e=0),u(P[e]);let r=(null==a?void 0:a[P[e]])||"";n(r),t(r)}),[a,l,t]);return{value:r,realValue:i,updateValue:s,color:a,colorSpace:l,cycleColorSpace:c}},W=e=>e.replace(/\s*/,"").toLowerCase(),en=(e,t,r)=>{let[n,a]=b.useState(null!=t&&t.valid?[t]:[]);b.useEffect((()=>{void 0===t&&a([])}),[t]);let o=b.useMemo((()=>(e||[]).map((e=>"string"==typeof e?I(e):e.title?{...I(e.color),keyword:e.title}:I(e.color))).concat(n).filter(Boolean).slice(-27)),[e,n]),l=b.useCallback((e=>{null!=e&&e.valid&&(o.some((t=>W(t[r])===W(e[r])))||a((t=>t.concat(e))))}),[r,o]);return{presets:o,addPreset:l}},tn=({name:e,value:t,onChange:r,onFocus:n,onBlur:a,presetColors:o,startOpen:l=!1})=>{let u=b.useCallback(Ht(r,200),[r]),{value:i,realValue:s,updateValue:c,color:f,colorSpace:d,cycleColorSpace:g}=Zt(t,u),{presets:v,addPreset:p}=en(o,f,d),m=Jt[d];return h.createElement(Pt,null,h.createElement(Lt,{startOpen:l,closeOnOutsideClick:!0,onVisibleChange:()=>p(f),tooltip:h.createElement(qt,null,h.createElement(m,{color:"transparent"===s?"#000000":s,onChange:c,onFocus:n,onBlur:a}),v.length>0&&h.createElement(Wt,null,v.map(((e,t)=>h.createElement(ue,{key:`${e.value}-${t}`,hasChrome:!1,tooltip:h.createElement(Bt,{note:e.keyword||e.value})},h.createElement(ie,{value:e[d],active:f&&W(e[d])===W(f[d]),onClick:()=>c(e.value)}))))))},h.createElement(ie,{value:s,style:{margin:4}})),h.createElement(Kt,{id:Ne(e),value:i,onChange:e=>c(e.target.value),onFocus:e=>e.target.select(),placeholder:"Choose color..."}),i?h.createElement(Vt,{icon:"markup",onClick:g}):null)},bn=tn;export{tn as ColorControl,bn as default}; \ No newline at end of file +import{n as M,e as ue,T as Me,F as Ce,I as $e,g as Ne}from"./index-DXKNbq7A.js";import{a as h,r as b,g as fe}from"./index-BP8_t0zE.js";import{_ as Oe,i as J,a as Ie}from"./index-EEBIeVPD.js";import"./iframe-BgaKNRp_.js";import"../sb-preview/runtime.js";import"./emotion-use-insertion-effect-with-fallbacks.browser.esm-UWD3gXM2.js";import"./index-BBRV8eG_.js";import"./index-D-8MO0q_.js";import"./extends-CF3RwP-h.js";import"./setPrototypeOf-NYsvoNVB.js";import"./inheritsLoose-CdQPfY07.js";import"./isNativeReflectConstruct-gwnEYaHE.js";import"./index-DrFu-skq.js";function $(){return($=Object.assign||function(e){for(var t=1;t=0||(a[r]=e[r]);return a}function K(e){var t=b.useRef(e),r=b.useRef((function(e){t.current&&t.current(e)}));return t.current=e,r.current}var S=function(e,t,r){return void 0===t&&(t=0),void 0===r&&(r=1),e>r?r:e0:e.buttons>0)&&a.current?o(ne(a.current,e,u.current)):r(!1)},t=function(){return r(!1)};function r(r){var n=i.current,o=V(a.current),l=r?o.addEventListener:o.removeEventListener;l(n?"touchmove":"mousemove",e),l(n?"touchend":"mouseup",t)}return[function(e){var t,n=e.nativeEvent,l=a.current;if(l&&(re(n),t=n,(!i.current||j(t))&&l)){if(j(n)){i.current=!0;var s=n.changedTouches||[];s.length&&(u.current=s[0].identifier)}l.focus(),o(ne(l,n,u.current)),r(!0)}},function(e){var t=e.which||e.keyCode;t<37||t>40||(e.preventDefault(),l({left:39===t?.05:37===t?-.05:0,top:40===t?.05:38===t?-.05:0}))},r]}),[l,o]),c=s[0],f=s[1],d=s[2];return b.useEffect((function(){return d}),[d]),h.createElement("div",$({},n,{onTouchStart:c,onMouseDown:c,className:"react-colorful__interactive",ref:a,onKeyDown:f,tabIndex:0,role:"slider"}))})),z=function(e){return e.filter(Boolean).join(" ")},ee=function(e){var t=e.color,r=e.left,n=e.top,a=void 0===n?.5:n,o=z(["react-colorful__pointer",e.className]);return h.createElement("div",{className:o,style:{top:100*a+"%",left:100*r+"%"}},h.createElement("div",{className:"react-colorful__pointer-fill",style:{backgroundColor:t}}))},y=function(e,t,r){return void 0===t&&(t=0),void 0===r&&(r=Math.pow(10,t)),Math.round(r*e)/r},Se={grad:.9,turn:360,rad:360/(2*Math.PI)},Re=function(e){return ge(A(e))},A=function(e){return"#"===e[0]&&(e=e.substring(1)),e.length<6?{r:parseInt(e[0]+e[0],16),g:parseInt(e[1]+e[1],16),b:parseInt(e[2]+e[2],16),a:4===e.length?y(parseInt(e[3]+e[3],16)/255,2):1}:{r:parseInt(e.substring(0,2),16),g:parseInt(e.substring(2,4),16),b:parseInt(e.substring(4,6),16),a:8===e.length?y(parseInt(e.substring(6,8),16)/255,2):1}},Te=function(e,t){return void 0===t&&(t="deg"),Number(e)*(Se[t]||1)},je=function(e){var t=/hsla?\(?\s*(-?\d*\.?\d+)(deg|rad|grad|turn)?[,\s]+(-?\d*\.?\d+)%?[,\s]+(-?\d*\.?\d+)%?,?\s*[/\s]*(-?\d*\.?\d+)?(%)?\s*\)?/i.exec(e);return t?Fe({h:Te(t[1],t[2]),s:Number(t[3]),l:Number(t[4]),a:void 0===t[5]?1:Number(t[5])/(t[6]?100:1)}):{h:0,s:0,v:0,a:1}},Fe=function(e){var t=e.s,r=e.l;return{h:e.h,s:(t*=(r<50?r:100-r)/100)>0?2*t/(r+t)*100:0,v:r+t,a:e.a}},ze=function(e){return Pe(de(e))},he=function(e){var t=e.s,r=e.v,n=e.a,a=(200-t)*r/100;return{h:y(e.h),s:y(a>0&&a<200?t*r/100/(a<=100?a:200-a)*100:0),l:y(a/2),a:y(n,2)}},G=function(e){var t=he(e);return"hsl("+t.h+", "+t.s+"%, "+t.l+"%)"},q=function(e){var t=he(e);return"hsla("+t.h+", "+t.s+"%, "+t.l+"%, "+t.a+")"},de=function(e){var t=e.h,r=e.s,n=e.v,a=e.a;t=t/360*6,r/=100,n/=100;var o=Math.floor(t),l=n*(1-r),u=n*(1-(t-o)*r),i=n*(1-(1-t+o)*r),s=o%6;return{r:y(255*[n,u,l,l,i,n][s]),g:y(255*[i,n,n,u,l,l][s]),b:y(255*[l,l,i,n,n,u][s]),a:y(a,2)}},He=function(e){var t=/rgba?\(?\s*(-?\d*\.?\d+)(%)?[,\s]+(-?\d*\.?\d+)(%)?[,\s]+(-?\d*\.?\d+)(%)?,?\s*[/\s]*(-?\d*\.?\d+)?(%)?\s*\)?/i.exec(e);return t?ge({r:Number(t[1])/(t[2]?100/255:1),g:Number(t[3])/(t[4]?100/255:1),b:Number(t[5])/(t[6]?100/255:1),a:void 0===t[7]?1:Number(t[7])/(t[8]?100:1)}):{h:0,s:0,v:0,a:1}},H=function(e){var t=e.toString(16);return t.length<2?"0"+t:t},Pe=function(e){var t=e.r,r=e.g,n=e.b,a=e.a,o=a<1?H(y(255*a)):"";return"#"+H(t)+H(r)+H(n)+o},ge=function(e){var t=e.r,r=e.g,n=e.b,a=e.a,o=Math.max(t,r,n),l=o-Math.min(t,r,n),u=l?o===t?(r-n)/l:o===r?2+(n-t)/l:4+(t-r)/l:0;return{h:y(60*(u<0?u+6:u)),s:y(o?l/o*100:0),v:y(o/255*100),a:a}},me=h.memo((function(e){var t=e.hue,r=e.onChange,n=z(["react-colorful__hue",e.className]);return h.createElement("div",{className:n},h.createElement(Z,{onMove:function(e){r({h:360*e.left})},onKey:function(e){r({h:S(t+360*e.left,0,360)})},"aria-label":"Hue","aria-valuenow":y(t),"aria-valuemax":"360","aria-valuemin":"0"},h.createElement(ee,{className:"react-colorful__hue-pointer",left:t/360,color:G({h:t,s:100,v:100,a:1})})))})),be=h.memo((function(e){var t=e.hsva,r=e.onChange,n={backgroundColor:G({h:t.h,s:100,v:100,a:1})};return h.createElement("div",{className:"react-colorful__saturation",style:n},h.createElement(Z,{onMove:function(e){r({s:100*e.left,v:100-100*e.top})},onKey:function(e){r({s:S(t.s+100*e.left,0,100),v:S(t.v-100*e.top,0,100)})},"aria-label":"Color","aria-valuetext":"Saturation "+y(t.s)+"%, Brightness "+y(t.v)+"%"},h.createElement(ee,{className:"react-colorful__saturation-pointer",top:1-t.v/100,left:t.s/100,color:G(t)})))})),ve=function(e,t){if(e===t)return!0;for(var r in e)if(e[r]!==t[r])return!1;return!0},pe=function(e,t){return e.replace(/\s/g,"")===t.replace(/\s/g,"")},Le=function(e,t){return e.toLowerCase()===t.toLowerCase()||ve(A(e),A(t))};function ye(e,t,r){var n=K(r),a=b.useState((function(){return e.toHsva(t)})),o=a[0],l=a[1],u=b.useRef({color:t,hsva:o});b.useEffect((function(){if(!e.equal(t,u.current.color)){var r=e.toHsva(t);u.current={hsva:r,color:t},l(r)}}),[t,e]),b.useEffect((function(){var t;ve(o,u.current.hsva)||e.equal(t=e.fromHsva(o),u.current.color)||(u.current={hsva:o,color:t},n(t))}),[o,e,n]);var i=b.useCallback((function(e){l((function(t){return Object.assign({},t,e)}))}),[]);return[o,i]}var qe=typeof window<"u"?b.useLayoutEffect:b.useEffect,Be=function(){return typeof __webpack_nonce__<"u"?__webpack_nonce__:void 0},oe=new Map,xe=function(e){qe((function(){var t=e.current?e.current.ownerDocument:document;if(void 0!==t&&!oe.has(t)){var r=t.createElement("style");r.innerHTML='.react-colorful{position:relative;display:flex;flex-direction:column;width:200px;height:200px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:default}.react-colorful__saturation{position:relative;flex-grow:1;border-color:transparent;border-bottom:12px solid #000;border-radius:8px 8px 0 0;background-image:linear-gradient(0deg,#000,transparent),linear-gradient(90deg,#fff,hsla(0,0%,100%,0))}.react-colorful__alpha-gradient,.react-colorful__pointer-fill{content:"";position:absolute;left:0;top:0;right:0;bottom:0;pointer-events:none;border-radius:inherit}.react-colorful__alpha-gradient,.react-colorful__saturation{box-shadow:inset 0 0 0 1px rgba(0,0,0,.05)}.react-colorful__alpha,.react-colorful__hue{position:relative;height:24px}.react-colorful__hue{background:linear-gradient(90deg,red 0,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,red)}.react-colorful__last-control{border-radius:0 0 8px 8px}.react-colorful__interactive{position:absolute;left:0;top:0;right:0;bottom:0;border-radius:inherit;outline:none;touch-action:none}.react-colorful__pointer{position:absolute;z-index:1;box-sizing:border-box;width:28px;height:28px;transform:translate(-50%,-50%);background-color:#fff;border:2px solid #fff;border-radius:50%;box-shadow:0 2px 4px rgba(0,0,0,.2)}.react-colorful__interactive:focus .react-colorful__pointer{transform:translate(-50%,-50%) scale(1.1)}.react-colorful__alpha,.react-colorful__alpha-pointer{background-color:#fff;background-image:url(\'data:image/svg+xml;charset=utf-8,\')}.react-colorful__saturation-pointer{z-index:3}.react-colorful__hue-pointer{z-index:2}',oe.set(t,r);var n=Be();n&&r.setAttribute("nonce",n),t.head.appendChild(r)}}),[])},We=function(e){var t=e.className,r=e.colorModel,n=e.color,a=void 0===n?r.defaultColor:n,o=e.onChange,l=Q(e,["className","colorModel","color","onChange"]),u=b.useRef(null);xe(u);var i=ye(r,a,o),s=i[0],c=i[1],f=z(["react-colorful",t]);return h.createElement("div",$({},l,{ref:u,className:f}),h.createElement(be,{hsva:s,onChange:c}),h.createElement(me,{hue:s.h,onChange:c,className:"react-colorful__last-control"}))},Xe={defaultColor:"000",toHsva:Re,fromHsva:function(e){return ze({h:e.h,s:e.s,v:e.v,a:1})},equal:Le},De=function(e){return h.createElement(We,$({},e,{colorModel:Xe}))},Ke=function(e){var t=e.className,r=e.hsva,n=e.onChange,a={backgroundImage:"linear-gradient(90deg, "+q(Object.assign({},r,{a:0}))+", "+q(Object.assign({},r,{a:1}))+")"},o=z(["react-colorful__alpha",t]),l=y(100*r.a);return h.createElement("div",{className:o},h.createElement("div",{className:"react-colorful__alpha-gradient",style:a}),h.createElement(Z,{onMove:function(e){n({a:e.left})},onKey:function(e){n({a:S(r.a+e.left)})},"aria-label":"Alpha","aria-valuetext":l+"%","aria-valuenow":l,"aria-valuemin":"0","aria-valuemax":"100"},h.createElement(ee,{className:"react-colorful__alpha-pointer",left:r.a,color:q(r)})))},we=function(e){var t=e.className,r=e.colorModel,n=e.color,a=void 0===n?r.defaultColor:n,o=e.onChange,l=Q(e,["className","colorModel","color","onChange"]),u=b.useRef(null);xe(u);var i=ye(r,a,o),s=i[0],c=i[1],f=z(["react-colorful",t]);return h.createElement("div",$({},l,{ref:u,className:f}),h.createElement(be,{hsva:s,onChange:c}),h.createElement(me,{hue:s.h,onChange:c}),h.createElement(Ke,{hsva:s,onChange:c,className:"react-colorful__last-control"}))},Ve={defaultColor:"hsla(0, 0%, 0%, 1)",toHsva:je,fromHsva:q,equal:pe},Ae=function(e){return h.createElement(we,$({},e,{colorModel:Ve}))},Ge={defaultColor:"rgba(0, 0, 0, 1)",toHsva:He,fromHsva:function(e){var t=de(e);return"rgba("+t.r+", "+t.g+", "+t.b+", "+t.a+")"},equal:pe},Ue=function(e){return h.createElement(we,$({},e,{colorModel:Ge}))},Ye={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]};const F=Ye,ke={};for(const e of Object.keys(F))ke[F[e]]=e;const u={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},lch:{channels:3,labels:"lch"},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}};var _e=u;for(const e of Object.keys(u)){if(!("channels"in u[e]))throw new Error("missing channels property: "+e);if(!("labels"in u[e]))throw new Error("missing channel labels property: "+e);if(u[e].labels.length!==u[e].channels)throw new Error("channel and label counts mismatch: "+e);const{channels:t,labels:r}=u[e];delete u[e].channels,delete u[e].labels,Object.defineProperty(u[e],"channels",{value:t}),Object.defineProperty(u[e],"labels",{value:r})}function Je(e,t){return(e[0]-t[0])**2+(e[1]-t[1])**2+(e[2]-t[2])**2}u.rgb.hsl=function(e){const t=e[0]/255,r=e[1]/255,n=e[2]/255,a=Math.min(t,r,n),o=Math.max(t,r,n),l=o-a;let u,i;o===a?u=0:t===o?u=(r-n)/l:r===o?u=2+(n-t)/l:n===o&&(u=4+(t-r)/l),u=Math.min(60*u,360),u<0&&(u+=360);const s=(a+o)/2;return i=o===a?0:s<=.5?l/(o+a):l/(2-o-a),[u,100*i,100*s]},u.rgb.hsv=function(e){let t,r,n,a,o;const l=e[0]/255,u=e[1]/255,i=e[2]/255,s=Math.max(l,u,i),c=s-Math.min(l,u,i),h=function(e){return(s-e)/6/c+.5};return 0===c?(a=0,o=0):(o=c/s,t=h(l),r=h(u),n=h(i),l===s?a=n-r:u===s?a=1/3+t-n:i===s&&(a=2/3+r-t),a<0?a+=1:a>1&&(a-=1)),[360*a,100*o,100*s]},u.rgb.hwb=function(e){const t=e[0],r=e[1];let n=e[2];const a=u.rgb.hsl(e)[0],o=1/255*Math.min(t,Math.min(r,n));return n=1-1/255*Math.max(t,Math.max(r,n)),[a,100*o,100*n]},u.rgb.cmyk=function(e){const t=e[0]/255,r=e[1]/255,n=e[2]/255,a=Math.min(1-t,1-r,1-n);return[100*((1-t-a)/(1-a)||0),100*((1-r-a)/(1-a)||0),100*((1-n-a)/(1-a)||0),100*a]},u.rgb.keyword=function(e){const t=ke[e];if(t)return t;let r,n=1/0;for(const a of Object.keys(F)){const t=Je(e,F[a]);t.04045?((t+.055)/1.055)**2.4:t/12.92,r=r>.04045?((r+.055)/1.055)**2.4:r/12.92,n=n>.04045?((n+.055)/1.055)**2.4:n/12.92;return[100*(.4124*t+.3576*r+.1805*n),100*(.2126*t+.7152*r+.0722*n),100*(.0193*t+.1192*r+.9505*n)]},u.rgb.lab=function(e){const t=u.rgb.xyz(e);let r=t[0],n=t[1],a=t[2];r/=95.047,n/=100,a/=108.883,r=r>.008856?r**(1/3):7.787*r+16/116,n=n>.008856?n**(1/3):7.787*n+16/116,a=a>.008856?a**(1/3):7.787*a+16/116;return[116*n-16,500*(r-n),200*(n-a)]},u.hsl.rgb=function(e){const t=e[0]/360,r=e[1]/100,n=e[2]/100;let a,o,l;if(0===r)return l=255*n,[l,l,l];a=n<.5?n*(1+r):n+r-n*r;const u=2*n-a,i=[0,0,0];for(let s=0;s<3;s++)o=t+1/3*-(s-1),o<0&&o++,o>1&&o--,l=6*o<1?u+6*(a-u)*o:2*o<1?a:3*o<2?u+(a-u)*(2/3-o)*6:u,i[s]=255*l;return i},u.hsl.hsv=function(e){const t=e[0];let r=e[1]/100,n=e[2]/100,a=r;const o=Math.max(n,.01);n*=2,r*=n<=1?n:2-n,a*=o<=1?o:2-o;return[t,100*(0===n?2*a/(o+a):2*r/(n+r)),100*((n+r)/2)]},u.hsv.rgb=function(e){const t=e[0]/60,r=e[1]/100;let n=e[2]/100;const a=Math.floor(t)%6,o=t-Math.floor(t),l=255*n*(1-r),u=255*n*(1-r*o),i=255*n*(1-r*(1-o));switch(n*=255,a){case 0:return[n,i,l];case 1:return[u,n,l];case 2:return[l,n,i];case 3:return[l,u,n];case 4:return[i,l,n];case 5:return[n,l,u]}},u.hsv.hsl=function(e){const t=e[0],r=e[1]/100,n=e[2]/100,a=Math.max(n,.01);let o,l;l=(2-r)*n;const u=(2-r)*a;return o=r*a,o/=u<=1?u:2-u,o=o||0,l/=2,[t,100*o,100*l]},u.hwb.rgb=function(e){const t=e[0]/360;let r=e[1]/100,n=e[2]/100;const a=r+n;let o;a>1&&(r/=a,n/=a);const l=Math.floor(6*t),u=1-n;o=6*t-l,1&l&&(o=1-o);const i=r+o*(u-r);let s,c,h;switch(l){default:case 6:case 0:s=u,c=i,h=r;break;case 1:s=i,c=u,h=r;break;case 2:s=r,c=u,h=i;break;case 3:s=r,c=i,h=u;break;case 4:s=i,c=r,h=u;break;case 5:s=u,c=r,h=i}return[255*s,255*c,255*h]},u.cmyk.rgb=function(e){const t=e[0]/100,r=e[1]/100,n=e[2]/100,a=e[3]/100;return[255*(1-Math.min(1,t*(1-a)+a)),255*(1-Math.min(1,r*(1-a)+a)),255*(1-Math.min(1,n*(1-a)+a))]},u.xyz.rgb=function(e){const t=e[0]/100,r=e[1]/100,n=e[2]/100;let a,o,l;return a=3.2406*t+-1.5372*r+-.4986*n,o=-.9689*t+1.8758*r+.0415*n,l=.0557*t+-.204*r+1.057*n,a=a>.0031308?1.055*a**(1/2.4)-.055:12.92*a,o=o>.0031308?1.055*o**(1/2.4)-.055:12.92*o,l=l>.0031308?1.055*l**(1/2.4)-.055:12.92*l,a=Math.min(Math.max(0,a),1),o=Math.min(Math.max(0,o),1),l=Math.min(Math.max(0,l),1),[255*a,255*o,255*l]},u.xyz.lab=function(e){let t=e[0],r=e[1],n=e[2];t/=95.047,r/=100,n/=108.883,t=t>.008856?t**(1/3):7.787*t+16/116,r=r>.008856?r**(1/3):7.787*r+16/116,n=n>.008856?n**(1/3):7.787*n+16/116;return[116*r-16,500*(t-r),200*(r-n)]},u.lab.xyz=function(e){let t,r,n;r=(e[0]+16)/116,t=e[1]/500+r,n=r-e[2]/200;const a=r**3,o=t**3,l=n**3;return r=a>.008856?a:(r-16/116)/7.787,t=o>.008856?o:(t-16/116)/7.787,n=l>.008856?l:(n-16/116)/7.787,t*=95.047,r*=100,n*=108.883,[t,r,n]},u.lab.lch=function(e){const t=e[0],r=e[1],n=e[2];let a;a=360*Math.atan2(n,r)/2/Math.PI,a<0&&(a+=360);return[t,Math.sqrt(r*r+n*n),a]},u.lch.lab=function(e){const t=e[0],r=e[1],n=e[2]/360*2*Math.PI;return[t,r*Math.cos(n),r*Math.sin(n)]},u.rgb.ansi16=function(e,t=null){const[r,n,a]=e;let o=null===t?u.rgb.hsv(e)[2]:t;if(o=Math.round(o/50),0===o)return 30;let l=30+(Math.round(a/255)<<2|Math.round(n/255)<<1|Math.round(r/255));return 2===o&&(l+=60),l},u.hsv.ansi16=function(e){return u.rgb.ansi16(u.hsv.rgb(e),e[2])},u.rgb.ansi256=function(e){const t=e[0],r=e[1],n=e[2];return t===r&&r===n?t<8?16:t>248?231:Math.round((t-8)/247*24)+232:16+36*Math.round(t/255*5)+6*Math.round(r/255*5)+Math.round(n/255*5)},u.ansi16.rgb=function(e){let t=e%10;if(0===t||7===t)return e>50&&(t+=3.5),t=t/10.5*255,[t,t,t];const r=.5*(1+~~(e>50));return[(1&t)*r*255,(t>>1&1)*r*255,(t>>2&1)*r*255]},u.ansi256.rgb=function(e){if(e>=232){const t=10*(e-232)+8;return[t,t,t]}let t;e-=16;return[Math.floor(e/36)/5*255,Math.floor((t=e%36)/6)/5*255,t%6/5*255]},u.rgb.hex=function(e){const t=(((255&Math.round(e[0]))<<16)+((255&Math.round(e[1]))<<8)+(255&Math.round(e[2]))).toString(16).toUpperCase();return"000000".substring(t.length)+t},u.hex.rgb=function(e){const t=e.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!t)return[0,0,0];let r=t[0];3===t[0].length&&(r=r.split("").map((e=>e+e)).join(""));const n=parseInt(r,16);return[n>>16&255,n>>8&255,255&n]},u.rgb.hcg=function(e){const t=e[0]/255,r=e[1]/255,n=e[2]/255,a=Math.max(Math.max(t,r),n),o=Math.min(Math.min(t,r),n),l=a-o;let u,i;return u=l<1?o/(1-l):0,i=l<=0?0:a===t?(r-n)/l%6:a===r?2+(n-t)/l:4+(t-r)/l,i/=6,i%=1,[360*i,100*l,100*u]},u.hsl.hcg=function(e){const t=e[1]/100,r=e[2]/100,n=r<.5?2*t*r:2*t*(1-r);let a=0;return n<1&&(a=(r-.5*n)/(1-n)),[e[0],100*n,100*a]},u.hsv.hcg=function(e){const t=e[1]/100,r=e[2]/100,n=t*r;let a=0;return n<1&&(a=(r-n)/(1-n)),[e[0],100*n,100*a]},u.hcg.rgb=function(e){const t=e[0]/360,r=e[1]/100,n=e[2]/100;if(0===r)return[255*n,255*n,255*n];const a=[0,0,0],o=t%1*6,l=o%1,u=1-l;let i=0;switch(Math.floor(o)){case 0:a[0]=1,a[1]=l,a[2]=0;break;case 1:a[0]=u,a[1]=1,a[2]=0;break;case 2:a[0]=0,a[1]=1,a[2]=l;break;case 3:a[0]=0,a[1]=u,a[2]=1;break;case 4:a[0]=l,a[1]=0,a[2]=1;break;default:a[0]=1,a[1]=0,a[2]=u}return i=(1-r)*n,[255*(r*a[0]+i),255*(r*a[1]+i),255*(r*a[2]+i)]},u.hcg.hsv=function(e){const t=e[1]/100,r=t+e[2]/100*(1-t);let n=0;return r>0&&(n=t/r),[e[0],100*n,100*r]},u.hcg.hsl=function(e){const t=e[1]/100,r=e[2]/100*(1-t)+.5*t;let n=0;return r>0&&r<.5?n=t/(2*r):r>=.5&&r<1&&(n=t/(2*(1-r))),[e[0],100*n,100*r]},u.hcg.hwb=function(e){const t=e[1]/100,r=t+e[2]/100*(1-t);return[e[0],100*(r-t),100*(1-r)]},u.hwb.hcg=function(e){const t=e[1]/100,r=1-e[2]/100,n=r-t;let a=0;return n<1&&(a=(r-n)/(1-n)),[e[0],100*n,100*a]},u.apple.rgb=function(e){return[e[0]/65535*255,e[1]/65535*255,e[2]/65535*255]},u.rgb.apple=function(e){return[e[0]/255*65535,e[1]/255*65535,e[2]/255*65535]},u.gray.rgb=function(e){return[e[0]/100*255,e[0]/100*255,e[0]/100*255]},u.gray.hsl=function(e){return[0,0,e[0]]},u.gray.hsv=u.gray.hsl,u.gray.hwb=function(e){return[0,100,e[0]]},u.gray.cmyk=function(e){return[0,0,0,e[0]]},u.gray.lab=function(e){return[e[0],0,0]},u.gray.hex=function(e){const t=255&Math.round(e[0]/100*255),r=((t<<16)+(t<<8)+t).toString(16).toUpperCase();return"000000".substring(r.length)+r},u.rgb.gray=function(e){return[(e[0]+e[1]+e[2])/3/255*100]};const B=_e;function Qe(){const e={},t=Object.keys(B);for(let r=t.length,n=0;n1&&(t=r),e(t))};return"conversion"in e&&(t.conversion=e.conversion),t}function st(e){const t=function(...t){const r=t[0];if(null==r)return r;r.length>1&&(t=r);const n=e(t);if("object"==typeof n)for(let e=n.length,a=0;a{O[e]={},Object.defineProperty(O[e],"channels",{value:U[e].channels}),Object.defineProperty(O[e],"labels",{value:U[e].labels});const t=rt(e);Object.keys(t).forEach((r=>{const n=t[r];O[e][r]=st(n),O[e][r].raw=at(n)}))}));var lt=O;const w=fe(lt);var it=Oe,ct=function(){return it.Date.now()},ut=ct,ft=/\s/;function ht(e){for(var t=e.length;t--&&ft.test(e.charAt(t)););return t}var dt=ht,gt=dt,mt=/^\s+/;function bt(e){return e&&e.slice(0,gt(e)+1).replace(mt,"")}var vt=bt,pt=vt,ae=J,yt=Ie,se=NaN,xt=/^[-+]0x[0-9a-f]+$/i,wt=/^0b[01]+$/i,kt=/^0o[0-7]+$/i,_t=parseInt;function Et(e){if("number"==typeof e)return e;if(yt(e))return se;if(ae(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=ae(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=pt(e);var r=wt.test(e);return r||kt.test(e)?_t(e.slice(2),r?2:8):xt.test(e)?se:+e}var Mt=Et,Ct=J,D=ut,le=Mt,$t="Expected a function",Nt=Math.max,Ot=Math.min;function It(e,t,r){var n,a,o,l,u,i,s=0,c=!1,h=!1,f=!0;if("function"!=typeof e)throw new TypeError($t);function d(t){var r=n,o=a;return n=a=void 0,s=t,l=e.apply(o,r)}function g(e){var r=e-i;return void 0===i||r>=t||r<0||h&&e-s>=o}function b(){var e=D();if(g(e))return v(e);u=setTimeout(b,function(e){var r=t-(e-i);return h?Ot(r,o-(e-s)):r}(e))}function v(e){return u=void 0,f&&n?d(e):(n=a=void 0,l)}function p(){var e=D(),r=g(e);if(n=arguments,a=this,i=e,r){if(void 0===u)return function(e){return s=e,u=setTimeout(b,t),c?d(e):l}(i);if(h)return clearTimeout(u),u=setTimeout(b,t),d(i)}return void 0===u&&(u=setTimeout(b,t)),l}return t=le(t)||0,Ct(r)&&(c=!!r.leading,o=(h="maxWait"in r)?Nt(le(r.maxWait)||0,t):o,f="trailing"in r?!!r.trailing:f),p.cancel=function(){void 0!==u&&clearTimeout(u),s=0,n=i=a=u=void 0},p.flush=function(){return void 0===u?l:v(D())},p}var St=It,Rt=St,Tt=J,jt="Expected a function";function Ft(e,t,r){var n=!0,a=!0;if("function"!=typeof e)throw new TypeError(jt);return Tt(r)&&(n="leading"in r?!!r.leading:n,a="trailing"in r?!!r.trailing:a),Rt(e,t,{leading:n,maxWait:t,trailing:a})}var zt=Ft;const Ht=fe(zt);var Pt=M.div({position:"relative",maxWidth:250}),Lt=M(ue)({position:"absolute",zIndex:1,top:4,left:4}),qt=M.div({width:200,margin:5,".react-colorful__saturation":{borderRadius:"4px 4px 0 0"},".react-colorful__hue":{boxShadow:"inset 0 0 0 1px rgb(0 0 0 / 5%)"},".react-colorful__last-control":{borderRadius:"0 0 4px 4px"}}),Bt=M(Me)((({theme:e})=>({fontFamily:e.typography.fonts.base}))),Wt=M.div({display:"grid",gridTemplateColumns:"repeat(9, 16px)",gap:6,padding:3,marginTop:5,width:200}),Xt=M.div((({theme:e,active:t})=>({width:16,height:16,boxShadow:t?`${e.appBorderColor} 0 0 0 1px inset, ${e.textMutedColor}50 0 0 0 4px`:`${e.appBorderColor} 0 0 0 1px inset`,borderRadius:e.appBorderRadius}))),Dt='url(\'data:image/svg+xml;charset=utf-8,\')',ie=({value:e,active:t,onClick:r,style:n,...a})=>{let o=`linear-gradient(${e}, ${e}), ${Dt}, linear-gradient(#fff, #fff)`;return h.createElement(Xt,{...a,active:t,onClick:r,style:{...n,backgroundImage:o}})},Kt=M(Ce.Input)((({theme:e})=>({width:"100%",paddingLeft:30,paddingRight:30,boxSizing:"border-box",fontFamily:e.typography.fonts.base}))),Vt=M($e)((({theme:e})=>({position:"absolute",zIndex:1,top:6,right:7,width:20,height:20,padding:4,boxSizing:"border-box",cursor:"pointer",color:e.input.color}))),Ee=(e=>(e.RGB="rgb",e.HSL="hsl",e.HEX="hex",e))(Ee||{}),P=Object.values(Ee),At=/\(([0-9]+),\s*([0-9]+)%?,\s*([0-9]+)%?,?\s*([0-9.]+)?\)/,Gt=/^\s*rgba?\(([0-9]+),\s*([0-9]+),\s*([0-9]+),?\s*([0-9.]+)?\)\s*$/i,Ut=/^\s*hsla?\(([0-9]+),\s*([0-9]+)%,\s*([0-9]+)%,?\s*([0-9.]+)?\)\s*$/i,Y=/^\s*#?([0-9a-f]{3}|[0-9a-f]{6})\s*$/i,Yt=/^\s*#?([0-9a-f]{3})\s*$/i,Jt={hex:De,rgb:Ue,hsl:Ae},L={hex:"transparent",rgb:"rgba(0, 0, 0, 0)",hsl:"hsla(0, 0%, 0%, 0)"},ce=e=>{let t=null==e?void 0:e.match(At);if(!t)return[0,0,0,1];let[,r,n,a,o=1]=t;return[r,n,a,o].map(Number)},I=e=>{if(!e)return;let t=!0;if(Gt.test(e)){let[r,n,a,o]=ce(e),[l,u,i]=w.rgb.hsl([r,n,a])||[0,0,0];return{valid:t,value:e,keyword:w.rgb.keyword([r,n,a]),colorSpace:"rgb",rgb:e,hsl:`hsla(${l}, ${u}%, ${i}%, ${o})`,hex:`#${w.rgb.hex([r,n,a]).toLowerCase()}`}}if(Ut.test(e)){let[r,n,a,o]=ce(e),[l,u,i]=w.hsl.rgb([r,n,a])||[0,0,0];return{valid:t,value:e,keyword:w.hsl.keyword([r,n,a]),colorSpace:"hsl",rgb:`rgba(${l}, ${u}, ${i}, ${o})`,hsl:e,hex:`#${w.hsl.hex([r,n,a]).toLowerCase()}`}}let r=e.replace("#",""),n=w.keyword.rgb(r)||w.hex.rgb(r),a=w.rgb.hsl(n),o=e;if(/[^#a-f0-9]/i.test(e)?o=r:Y.test(e)&&(o=`#${r}`),o.startsWith("#"))t=Y.test(o);else try{w.keyword.hex(o)}catch{t=!1}return{valid:t,value:o,keyword:w.rgb.keyword(n),colorSpace:"hex",rgb:`rgba(${n[0]}, ${n[1]}, ${n[2]}, 1)`,hsl:`hsla(${a[0]}, ${a[1]}%, ${a[2]}%, 1)`,hex:o}},Qt=(e,t,r)=>{if(!e||null==t||!t.valid)return L[r];if("hex"!==r)return(null==t?void 0:t[r])||L[r];if(!t.hex.startsWith("#"))try{return`#${w.keyword.hex(t.hex)}`}catch{return L.hex}let n=t.hex.match(Yt);if(!n)return Y.test(t.hex)?t.hex:L.hex;let[a,o,l]=n[1].split("");return`#${a}${a}${o}${o}${l}${l}`},Zt=(e,t)=>{let[r,n]=b.useState(e||""),[a,o]=b.useState((()=>I(r))),[l,u]=b.useState((null==a?void 0:a.colorSpace)||"hex");b.useEffect((()=>{let t=e||"",r=I(t);n(t),o(r),u((null==r?void 0:r.colorSpace)||"hex")}),[e]);let i=b.useMemo((()=>Qt(r,a,l).toLowerCase()),[r,a,l]),s=b.useCallback((e=>{let r=I(e),a=(null==r?void 0:r.value)||e||"";n(a),""===a&&(o(void 0),t(void 0)),r&&(o(r),u(r.colorSpace),t(r.value))}),[t]),c=b.useCallback((()=>{let e=P.indexOf(l)+1;e>=P.length&&(e=0),u(P[e]);let r=(null==a?void 0:a[P[e]])||"";n(r),t(r)}),[a,l,t]);return{value:r,realValue:i,updateValue:s,color:a,colorSpace:l,cycleColorSpace:c}},W=e=>e.replace(/\s*/,"").toLowerCase(),en=(e,t,r)=>{let[n,a]=b.useState(null!=t&&t.valid?[t]:[]);b.useEffect((()=>{void 0===t&&a([])}),[t]);let o=b.useMemo((()=>(e||[]).map((e=>"string"==typeof e?I(e):e.title?{...I(e.color),keyword:e.title}:I(e.color))).concat(n).filter(Boolean).slice(-27)),[e,n]),l=b.useCallback((e=>{null!=e&&e.valid&&(o.some((t=>W(t[r])===W(e[r])))||a((t=>t.concat(e))))}),[r,o]);return{presets:o,addPreset:l}},tn=({name:e,value:t,onChange:r,onFocus:n,onBlur:a,presetColors:o,startOpen:l=!1})=>{let u=b.useCallback(Ht(r,200),[r]),{value:i,realValue:s,updateValue:c,color:f,colorSpace:d,cycleColorSpace:g}=Zt(t,u),{presets:v,addPreset:p}=en(o,f,d),m=Jt[d];return h.createElement(Pt,null,h.createElement(Lt,{startOpen:l,closeOnOutsideClick:!0,onVisibleChange:()=>p(f),tooltip:h.createElement(qt,null,h.createElement(m,{color:"transparent"===s?"#000000":s,onChange:c,onFocus:n,onBlur:a}),v.length>0&&h.createElement(Wt,null,v.map(((e,t)=>h.createElement(ue,{key:`${e.value}-${t}`,hasChrome:!1,tooltip:h.createElement(Bt,{note:e.keyword||e.value})},h.createElement(ie,{value:e[d],active:f&&W(e[d])===W(f[d]),onClick:()=>c(e.value)}))))))},h.createElement(ie,{value:s,style:{margin:4}})),h.createElement(Kt,{id:Ne(e),value:i,onChange:e=>c(e.target.value),onFocus:e=>e.target.select(),placeholder:"Choose color..."}),i?h.createElement(Vt,{icon:"markup",onClick:g}):null)},bn=tn;export{tn as ColorControl,bn as default}; \ No newline at end of file diff --git a/storybook-static/assets/CommentItem-CC36m9WH.js b/storybook-static/assets/CommentItem-Ccduf_Q5.js similarity index 60% rename from storybook-static/assets/CommentItem-CC36m9WH.js rename to storybook-static/assets/CommentItem-Ccduf_Q5.js index 4559b27922..a3a19e9380 100644 --- a/storybook-static/assets/CommentItem-CC36m9WH.js +++ b/storybook-static/assets/CommentItem-Ccduf_Q5.js @@ -1 +1 @@ -import{j as e}from"./jsx-runtime-CexXSJP5.js";import{r as o}from"./index-BP8_t0zE.js";import{B as j}from"./Button-B7QBvkxh.js";import{C as O}from"./ConfirmModal-DGUUT3uo.js";import{D as $}from"./DisplayDate-8pUkm3CJ.js";import{E as U}from"./EditComment-DY_6Q1TM.js";import{L as F}from"./LinkifyText-CTcW0PSE.js";import{M as L}from"./Modal-CNp0gEVS.js";import{U as P}from"./Username-iPvtw0Lg.js";import{F as t,a as C,T as c,g as G}from"./theme-ui-components.esm-DCiJ1mMX.js";const z=""+new URL("default_member-BrNDumk0.svg",import.meta.url).href,W=129,J="The original comment got deleted",E=a=>{const n=o.createRef(),[r,i]=o.useState(!1),[s,m]=o.useState(!1),[d,l]=o.useState(0),[p,u]=o.useState(!1),{comment:x,handleDelete:h,handleEditRequest:f,handleEdit:y,isReply:g}=a,{text:w,creatorName:E,creatorCountry:b,creatorImage:v,isUserVerified:D,isUserSupporter:S,isEditable:I,_created:B,_edited:k,_id:R,_deleted:T}=x,_={userName:E,countryCode:b,isVerified:!!D,isSupporter:!!S},q=p?"max-content":"128px",V=g?"ReplyItem":"CommentItem";o.useEffect((()=>{n.current&&l(n.current.scrollHeight)}),[n]);return e.jsxs(t,{id:`comment:${R}`,"data-cy":I?`Own${V}`:V,sx:{flexDirection:"column"},children:[e.jsxs(t,{sx:{gap:2},children:[T&&e.jsx(C,{sx:{marginBottom:2},"data-cy":"deletedComment",children:e.jsxs(c,{sx:{color:"grey"},children:["[",J,"]"]})}),!T&&e.jsxs(t,{sx:{gap:2,flexGrow:1},children:[e.jsx(C,{"data-cy":"commentAvatar","data-testid":"commentAvatar",children:e.jsx(G,{"data-cy":"commentAvatarImage",src:v??z,sx:{objectFit:"cover",width:["30px","50px"],height:["30px","50px"]},alt:E?`Avatar of ${E}`:"Avatar of comment author"})}),e.jsxs(t,{sx:{flexDirection:"column",flex:1},children:[e.jsxs(t,{sx:{flexWrap:"wrap",justifyContent:"space-between",flexDirection:["column","row"],gap:2},children:[e.jsxs(t,{sx:{alignItems:"baseline",gap:2,flexDirection:"row"},children:[e.jsx(P,{user:_}),e.jsxs(c,{sx:{fontSize:1,color:"darkGrey"},children:[k&&"Edited ",e.jsx($,{date:k||B})]})]}),I&&e.jsxs(t,{sx:{alignItems:"flex-end",gap:2,paddingBottom:2},children:[e.jsx(j,{type:"button","data-cy":`${V}: edit button`,variant:"subtle",small:!0,icon:"edit",onClick:()=>(e=>{if(f)return f(e),i(!0)})(R),children:"edit"}),e.jsx(j,{type:"button","data-cy":`${V}: delete button`,variant:"subtle",small:!0,icon:"delete",onClick:()=>m(!0),children:"delete"})]})]}),e.jsx(c,{"data-cy":"comment-text","data-testid":"commentText",sx:{fontFamily:"body",lineHeight:1.3,maxHeight:q,overflow:"hidden",whiteSpace:"pre-wrap",wordBreak:"break-word",marginTop:1,marginBottom:2},ref:n,children:e.jsx(F,{children:w})}),d>W&&e.jsx("a",{onClick:()=>{u(!p)},style:{color:"gray",cursor:"pointer"},children:p?"Show less":"Show more"})]})]})]}),e.jsx(L,{width:600,isOpen:r,children:e.jsx(U,{comment:w,handleSubmit:async e=>{await y(R,e),i(!1)},handleCancel:()=>i(!1),isReply:g})}),e.jsx(O,{isOpen:s,message:"Are you sure you want to delete this comment?",confirmButtonText:"Delete",handleCancel:()=>m(!1),handleConfirm:async()=>{h&&await h(R),m(!1)}})]})};try{E.displayName="CommentItem",E.__docgenInfo={description:"",displayName:"CommentItem",props:{comment:{defaultValue:null,description:"",name:"comment",required:!0,type:{name:"IComment"}},handleDelete:{defaultValue:null,description:"",name:"handleDelete",required:!1,type:{name:"((commentId: string) => Promise)"}},handleEdit:{defaultValue:null,description:"",name:"handleEdit",required:!0,type:{name:"(commentId: string, newCommentText: string) => void"}},handleEditRequest:{defaultValue:null,description:"",name:"handleEditRequest",required:!1,type:{name:"((commentId: string) => Promise)"}},isReply:{defaultValue:null,description:"",name:"isReply",required:!0,type:{name:"boolean"}}}}}catch{}export{E as C}; \ No newline at end of file +import{j as e}from"./jsx-runtime-CexXSJP5.js";import{r as o}from"./index-BP8_t0zE.js";import{B as j}from"./Button-D4nxT_g_.js";import{C as O}from"./ConfirmModal-p91B88N_.js";import{D as $}from"./DisplayDate-6lOgCKow.js";import{E as U}from"./EditComment-Cc0tE0_Q.js";import{L as F}from"./LinkifyText-MsKPRXsf.js";import{M as L}from"./Modal-DXxaFBTe.js";import{U as P}from"./Username-CNsNRGy2.js";import{F as t,a as C,T as c,g as G}from"./theme-ui-components.esm-BngKL4Rx.js";const z=""+new URL("default_member-BrNDumk0.svg",import.meta.url).href,W=129,J="The original comment got deleted",E=a=>{const n=o.createRef(),[r,i]=o.useState(!1),[s,m]=o.useState(!1),[d,l]=o.useState(0),[p,x]=o.useState(!1),{comment:u,handleDelete:h,handleEditRequest:f,handleEdit:y,isReply:g}=a,{text:w,creatorName:E,creatorCountry:b,creatorImage:D,isUserVerified:v,isUserSupporter:I,isEditable:R,_created:B,_edited:S,_id:_,_deleted:T}=u,k={userName:E,countryCode:b,isVerified:!!v,isSupporter:!!I},q=p?"max-content":"128px",N=g?"ReplyItem":"CommentItem";o.useEffect((()=>{n.current&&l(n.current.scrollHeight)}),[n]);return e.jsxs(t,{id:`comment:${_}`,"data-cy":R?`Own${N}`:N,sx:{flexDirection:"column"},children:[e.jsxs(t,{sx:{gap:2},children:[T&&e.jsx(C,{sx:{marginBottom:2},"data-cy":"deletedComment",children:e.jsxs(c,{sx:{color:"grey"},children:["[",J,"]"]})}),!T&&e.jsxs(t,{sx:{gap:2,flexGrow:1},children:[e.jsx(C,{"data-cy":"commentAvatar","data-testid":"commentAvatar",children:e.jsx(G,{"data-cy":"commentAvatarImage",src:D??z,sx:{objectFit:"cover",width:["30px","50px"],height:["30px","50px"]},alt:E?`Avatar of ${E}`:"Avatar of comment author"})}),e.jsxs(t,{sx:{flexDirection:"column",flex:1},children:[e.jsxs(t,{sx:{flexWrap:"wrap",justifyContent:"space-between",flexDirection:["column","row"],gap:2},children:[e.jsxs(t,{sx:{alignItems:"baseline",gap:2,flexDirection:"row"},children:[e.jsx(P,{user:k}),e.jsxs(c,{sx:{fontSize:1,color:"darkGrey"},children:[S&&"Edited ",e.jsx($,{date:S||B})]})]}),R&&e.jsxs(t,{sx:{alignItems:"flex-end",gap:2,paddingBottom:2},children:[e.jsx(j,{type:"button","data-cy":`${N}: edit button`,variant:"subtle",small:!0,icon:"edit",onClick:()=>(e=>{if(f)return f(e),i(!0)})(_),children:"edit"}),e.jsx(j,{type:"button","data-cy":`${N}: delete button`,variant:"subtle",small:!0,icon:"delete",onClick:()=>m(!0),children:"delete"})]})]}),e.jsx(c,{"data-cy":"comment-text","data-testid":"commentText",sx:{fontFamily:"body",lineHeight:1.3,maxHeight:q,overflow:"hidden",whiteSpace:"pre-wrap",wordBreak:"break-word",marginTop:1,marginBottom:2},ref:n,children:e.jsx(F,{children:w})}),d>W&&e.jsx("a",{onClick:()=>{x(!p)},style:{color:"gray",cursor:"pointer"},children:p?"Show less":"Show more"})]})]})]}),e.jsx(L,{width:600,isOpen:r,children:e.jsx(U,{comment:w,handleSubmit:async e=>{await y(_,e),i(!1)},handleCancel:()=>i(!1),isReply:g})}),e.jsx(O,{isOpen:s,message:"Are you sure you want to delete this comment?",confirmButtonText:"Delete",handleCancel:()=>m(!1),handleConfirm:async()=>{h&&await h(_),m(!1)}})]})};try{E.displayName="CommentItem",E.__docgenInfo={description:"",displayName:"CommentItem",props:{comment:{defaultValue:null,description:"",name:"comment",required:!0,type:{name:"IComment"}},handleDelete:{defaultValue:null,description:"",name:"handleDelete",required:!1,type:{name:"((commentId: string) => Promise)"}},handleEdit:{defaultValue:null,description:"",name:"handleEdit",required:!0,type:{name:"(commentId: string, newCommentText: string) => void"}},handleEditRequest:{defaultValue:null,description:"",name:"handleEditRequest",required:!1,type:{name:"((commentId: string) => Promise)"}},isReply:{defaultValue:null,description:"",name:"isReply",required:!0,type:{name:"boolean"}}}}}catch{}export{E as C}; \ No newline at end of file diff --git a/storybook-static/assets/CommentItem.stories-B7LsiCWt.js b/storybook-static/assets/CommentItem.stories-B7LsiCWt.js new file mode 100644 index 0000000000..0925446072 --- /dev/null +++ b/storybook-static/assets/CommentItem.stories-B7LsiCWt.js @@ -0,0 +1 @@ +import{j as i}from"./jsx-runtime-CexXSJP5.js";import{f as s}from"./utils-BRZF2j4e.js";import{C as t}from"./CommentItem-Ccduf_Q5.js";import"./index-BP8_t0zE.js";import"./index-D_kXk1yT.js";import"./Button-D4nxT_g_.js";import"./Icon-BoVZOGVD.js";import"./emotion-styled.browser.esm-Dz2BNYeh.js";import"./extends-CF3RwP-h.js";import"./parseProps-780b287c.browser.esm-DiCerVr_.js";import"./emotion-use-insertion-effect-with-fallbacks.browser.esm-UWD3gXM2.js";import"./supporter-D7hp958O.js";import"./icon-arrow-down-CJeToCJe.js";import"./icon-star-active-ClN6U5FF.js";import"./theme-ui-core-jsx-runtime.browser.esm-CH0qhC10.js";import"./hoist-non-react-statics.cjs-CQI8syxn.js";import"./theme-ui-components.esm-BngKL4Rx.js";import"./ConfirmModal-p91B88N_.js";import"./Modal-DXxaFBTe.js";import"./index-BBRV8eG_.js";import"./index-Snk9MO9S.js";import"./DisplayDate-6lOgCKow.js";import"./typeof-QjJsDpFa.js";import"./EditComment-Cc0tE0_Q.js";import"./objectWithoutPropertiesLoose-CAYKN5F1.js";import"./index.esm-D0u3ndg0.js";import"./FieldTextarea-oZDGU0lI.js";import"./CharacterCount-CVY3hBeQ.js";import"./LinkifyText-MsKPRXsf.js";import"./ExternalLink-DC09teyd.js";import"./InternalLink-BRM7MvOa.js";import"./components-CutHIkdx.js";import"./index-BXxqJQdV.js";import"./theme-ui-core.browser.esm-CIov4Ln1.js";import"./emotion-react.browser.esm-BYoRxRk_.js";import"./cjs-Clfm10Kj.js";import"./Username-CNsNRGy2.js";import"./UserBadge-XI2JdGOl.js";const ve={title:"Discussions/CommentItem",component:t},a=()=>{},u=()=>{const e=s({creatorImage:void 0});return i.jsx(t,{comment:e,handleEdit:a,isReply:!1})},r=()=>{const e=s();return i.jsx(t,{comment:e,handleEdit:a,isReply:!1})},m=()=>{const e=s({isEditable:!0});return i.jsx(t,{comment:e,handleEdit:a,isReply:!1})},n=()=>{const e=s({_edited:(new Date).toISOString()});return i.jsx(t,{comment:e,handleEdit:a,isReply:!1})},o=()=>{const e=s({text:"Ut dignissim, odio a cursus pretium, erat ex dictum quam, a eleifend augue mauris vel metus. Suspendisse pellentesque, elit efficitur rutrum maximus, arcu enim congue ipsum, vel aliquam ipsum urna quis tellus. Mauris at imperdiet nisi. Integer at neque ex. Nullam vel ipsum sodales, porttitor nulla vitae, tincidunt est. Pellentesque vitae lectus arcu. Integer dapibus rutrum facilisis. Nullam tincidunt quam at arcu interdum, vitae egestas libero vehicula. Morbi metus tortor, dapibus id finibus ac, egestas quis leo. Phasellus scelerisque suscipit mauris sed rhoncus. In quis ultricies ipsum. Integer vitae iaculis risus, sit amet elementum augue. Pellentesque vitae sagittis erat, eget consectetur lorem.\n\nUt pharetra molestie quam id dictum. In molestie, arcu sit amet faucibus pulvinar, eros erat egestas leo, at molestie nunc velit a arcu. Aliquam erat volutpat. Vivamus vehicula mi sit amet nibh auctor efficitur. Duis fermentum sem et nibh facilisis, ut tincidunt sem commodo. Nullam ornare ex a elementum accumsan. Etiam a neque ut lacus suscipit blandit. Maecenas id tortor velit.\n\nInterdum et malesuada fames ac ante ipsum primis in faucibus. Nam ut commodo tellus. Maecenas at leo metus. Vivamus ullamcorper ex purus, volutpat auctor nunc lobortis a. Integer sit amet ornare nisi, sed ultrices enim. Pellentesque ut aliquam urna, eu fringilla ante. Nullam dui nibh, feugiat id vestibulum nec, efficitur a lorem. In vitae pellentesque tellus. Pellentesque sed odio iaculis, imperdiet turpis at, aliquam ex. Praesent iaculis bibendum nibh, vel egestas turpis ultrices ac. Praesent tincidunt libero sed gravida ornare. Aliquam vehicula risus ut molestie suscipit. Nunc erat odio, venenatis nec posuere in, placerat eget massa. Sed in ultrices ex, vel egestas quam. Integer lectus magna, ornare at nisl sed, convallis euismod enim. Cras pretium commodo arcu non bibendum.\n\nNullam dictum lectus felis. Duis vitae lacus vitae nisl aliquet faucibus. Integer neque lacus, dignissim sed mi et, dignissim luctus metus. Cras sollicitudin vestibulum leo, ac ultrices sapien bibendum ac. Phasellus lobortis aliquam libero eu volutpat. Donec vitae rutrum tellus. Fusce vel ante ipsum. Suspendisse mollis tempus porta. Sed a orci tempor, rhoncus tortor eu, sodales justo."});return i.jsx(t,{comment:e,handleEdit:a,isReply:!0})},l=()=>{const e=s({text:"Ut dignissim, odio a cursus pretium. https://example.com"});return i.jsx(t,{comment:e,handleEdit:a,isReply:!0})};var c,d,p,v,g,f,b,q,h,x,I,E,C,S,P,N,R,y;u.parameters={...u.parameters,docs:{...null==(c=u.parameters)?void 0:c.docs,source:{originalSource:"() => {\n const comment = fakeComment({\n creatorImage: undefined\n });\n return ;\n}",...null==(p=null==(d=u.parameters)?void 0:d.docs)?void 0:p.source}}},r.parameters={...r.parameters,docs:{...null==(v=r.parameters)?void 0:v.docs,source:{originalSource:"() => {\n const comment = fakeComment();\n return ;\n}",...null==(f=null==(g=r.parameters)?void 0:g.docs)?void 0:f.source}}},m.parameters={...m.parameters,docs:{...null==(b=m.parameters)?void 0:b.docs,source:{originalSource:"() => {\n const comment = fakeComment({\n isEditable: true\n });\n return ;\n}",...null==(h=null==(q=m.parameters)?void 0:q.docs)?void 0:h.source}}},n.parameters={...n.parameters,docs:{...null==(x=n.parameters)?void 0:x.docs,source:{originalSource:"() => {\n const comment = fakeComment({\n _edited: new Date().toISOString()\n });\n return ;\n}",...null==(E=null==(I=n.parameters)?void 0:I.docs)?void 0:E.source}}},o.parameters={...o.parameters,docs:{...null==(C=o.parameters)?void 0:C.docs,source:{originalSource:"() => {\n const text = `Ut dignissim, odio a cursus pretium, erat ex dictum quam, a eleifend augue mauris vel metus. Suspendisse pellentesque, elit efficitur rutrum maximus, arcu enim congue ipsum, vel aliquam ipsum urna quis tellus. Mauris at imperdiet nisi. Integer at neque ex. Nullam vel ipsum sodales, porttitor nulla vitae, tincidunt est. Pellentesque vitae lectus arcu. Integer dapibus rutrum facilisis. Nullam tincidunt quam at arcu interdum, vitae egestas libero vehicula. Morbi metus tortor, dapibus id finibus ac, egestas quis leo. Phasellus scelerisque suscipit mauris sed rhoncus. In quis ultricies ipsum. Integer vitae iaculis risus, sit amet elementum augue. Pellentesque vitae sagittis erat, eget consectetur lorem.\\n\\nUt pharetra molestie quam id dictum. In molestie, arcu sit amet faucibus pulvinar, eros erat egestas leo, at molestie nunc velit a arcu. Aliquam erat volutpat. Vivamus vehicula mi sit amet nibh auctor efficitur. Duis fermentum sem et nibh facilisis, ut tincidunt sem commodo. Nullam ornare ex a elementum accumsan. Etiam a neque ut lacus suscipit blandit. Maecenas id tortor velit.\\n\\nInterdum et malesuada fames ac ante ipsum primis in faucibus. Nam ut commodo tellus. Maecenas at leo metus. Vivamus ullamcorper ex purus, volutpat auctor nunc lobortis a. Integer sit amet ornare nisi, sed ultrices enim. Pellentesque ut aliquam urna, eu fringilla ante. Nullam dui nibh, feugiat id vestibulum nec, efficitur a lorem. In vitae pellentesque tellus. Pellentesque sed odio iaculis, imperdiet turpis at, aliquam ex. Praesent iaculis bibendum nibh, vel egestas turpis ultrices ac. Praesent tincidunt libero sed gravida ornare. Aliquam vehicula risus ut molestie suscipit. Nunc erat odio, venenatis nec posuere in, placerat eget massa. Sed in ultrices ex, vel egestas quam. Integer lectus magna, ornare at nisl sed, convallis euismod enim. Cras pretium commodo arcu non bibendum.\\n\\nNullam dictum lectus felis. Duis vitae lacus vitae nisl aliquet faucibus. Integer neque lacus, dignissim sed mi et, dignissim luctus metus. Cras sollicitudin vestibulum leo, ac ultrices sapien bibendum ac. Phasellus lobortis aliquam libero eu volutpat. Donec vitae rutrum tellus. Fusce vel ante ipsum. Suspendisse mollis tempus porta. Sed a orci tempor, rhoncus tortor eu, sodales justo.`;\n const comment = fakeComment({\n text\n });\n return ;\n}",...null==(P=null==(S=o.parameters)?void 0:S.docs)?void 0:P.source}}},l.parameters={...l.parameters,docs:{...null==(N=l.parameters)?void 0:N.docs,source:{originalSource:"() => {\n const comment = fakeComment({\n text: `Ut dignissim, odio a cursus pretium. https://example.com`\n });\n return ;\n}",...null==(y=null==(R=l.parameters)?void 0:R.docs)?void 0:y.source}}};const ge=["Default","WithoutAvatar","Editable","Edited","LongText","ShortTextWithLink"];export{u as Default,m as Editable,n as Edited,o as LongText,l as ShortTextWithLink,r as WithoutAvatar,ge as __namedExportsOrder,ve as default}; \ No newline at end of file diff --git a/storybook-static/assets/CommentItem.stories-IVH7Sf0a.js b/storybook-static/assets/CommentItem.stories-IVH7Sf0a.js deleted file mode 100644 index 400ca2a355..0000000000 --- a/storybook-static/assets/CommentItem.stories-IVH7Sf0a.js +++ /dev/null @@ -1 +0,0 @@ -import{j as i}from"./jsx-runtime-CexXSJP5.js";import{f as s}from"./utils-BRZF2j4e.js";import{C as t}from"./CommentItem-CC36m9WH.js";import"./index-BP8_t0zE.js";import"./index-D_kXk1yT.js";import"./Button-B7QBvkxh.js";import"./Icon-BoVZOGVD.js";import"./emotion-styled.browser.esm-Dz2BNYeh.js";import"./extends-CF3RwP-h.js";import"./parseProps-780b287c.browser.esm-DiCerVr_.js";import"./emotion-use-insertion-effect-with-fallbacks.browser.esm-UWD3gXM2.js";import"./supporter-D7hp958O.js";import"./icon-arrow-down-CJeToCJe.js";import"./icon-star-active-ClN6U5FF.js";import"./theme-ui-core-jsx-runtime.browser.esm-CH0qhC10.js";import"./hoist-non-react-statics.cjs-CQI8syxn.js";import"./theme-ui-components.esm-DCiJ1mMX.js";import"./ConfirmModal-DGUUT3uo.js";import"./Modal-CNp0gEVS.js";import"./index-BBRV8eG_.js";import"./index-Snk9MO9S.js";import"./DisplayDate-8pUkm3CJ.js";import"./typeof-QjJsDpFa.js";import"./EditComment-DY_6Q1TM.js";import"./objectWithoutPropertiesLoose-CAYKN5F1.js";import"./index.esm-D0u3ndg0.js";import"./FieldTextarea-msSeWkcr.js";import"./CharacterCount-BGgvgJrP.js";import"./LinkifyText-CTcW0PSE.js";import"./ExternalLink-CHmx7fZ7.js";import"./InternalLink-CtyTe3gy.js";import"./components-CutHIkdx.js";import"./index-BXxqJQdV.js";import"./theme-ui-core.browser.esm-CIov4Ln1.js";import"./emotion-react.browser.esm-BYoRxRk_.js";import"./cjs-Clfm10Kj.js";import"./Username-iPvtw0Lg.js";const pe={title:"Discussions/CommentItem",component:t},a=()=>{},u=()=>{const e=s({creatorImage:void 0});return i.jsx(t,{comment:e,handleEdit:a,isReply:!1})},r=()=>{const e=s();return i.jsx(t,{comment:e,handleEdit:a,isReply:!1})},m=()=>{const e=s({isEditable:!0});return i.jsx(t,{comment:e,handleEdit:a,isReply:!1})},n=()=>{const e=s({_edited:(new Date).toISOString()});return i.jsx(t,{comment:e,handleEdit:a,isReply:!1})},o=()=>{const e=s({text:"Ut dignissim, odio a cursus pretium, erat ex dictum quam, a eleifend augue mauris vel metus. Suspendisse pellentesque, elit efficitur rutrum maximus, arcu enim congue ipsum, vel aliquam ipsum urna quis tellus. Mauris at imperdiet nisi. Integer at neque ex. Nullam vel ipsum sodales, porttitor nulla vitae, tincidunt est. Pellentesque vitae lectus arcu. Integer dapibus rutrum facilisis. Nullam tincidunt quam at arcu interdum, vitae egestas libero vehicula. Morbi metus tortor, dapibus id finibus ac, egestas quis leo. Phasellus scelerisque suscipit mauris sed rhoncus. In quis ultricies ipsum. Integer vitae iaculis risus, sit amet elementum augue. Pellentesque vitae sagittis erat, eget consectetur lorem.\n\nUt pharetra molestie quam id dictum. In molestie, arcu sit amet faucibus pulvinar, eros erat egestas leo, at molestie nunc velit a arcu. Aliquam erat volutpat. Vivamus vehicula mi sit amet nibh auctor efficitur. Duis fermentum sem et nibh facilisis, ut tincidunt sem commodo. Nullam ornare ex a elementum accumsan. Etiam a neque ut lacus suscipit blandit. Maecenas id tortor velit.\n\nInterdum et malesuada fames ac ante ipsum primis in faucibus. Nam ut commodo tellus. Maecenas at leo metus. Vivamus ullamcorper ex purus, volutpat auctor nunc lobortis a. Integer sit amet ornare nisi, sed ultrices enim. Pellentesque ut aliquam urna, eu fringilla ante. Nullam dui nibh, feugiat id vestibulum nec, efficitur a lorem. In vitae pellentesque tellus. Pellentesque sed odio iaculis, imperdiet turpis at, aliquam ex. Praesent iaculis bibendum nibh, vel egestas turpis ultrices ac. Praesent tincidunt libero sed gravida ornare. Aliquam vehicula risus ut molestie suscipit. Nunc erat odio, venenatis nec posuere in, placerat eget massa. Sed in ultrices ex, vel egestas quam. Integer lectus magna, ornare at nisl sed, convallis euismod enim. Cras pretium commodo arcu non bibendum.\n\nNullam dictum lectus felis. Duis vitae lacus vitae nisl aliquet faucibus. Integer neque lacus, dignissim sed mi et, dignissim luctus metus. Cras sollicitudin vestibulum leo, ac ultrices sapien bibendum ac. Phasellus lobortis aliquam libero eu volutpat. Donec vitae rutrum tellus. Fusce vel ante ipsum. Suspendisse mollis tempus porta. Sed a orci tempor, rhoncus tortor eu, sodales justo."});return i.jsx(t,{comment:e,handleEdit:a,isReply:!0})},l=()=>{const e=s({text:"Ut dignissim, odio a cursus pretium. https://example.com"});return i.jsx(t,{comment:e,handleEdit:a,isReply:!0})};var c,d,p,v,g,f,b,q,h,x,I,E,C,S,P,N,R,y;u.parameters={...u.parameters,docs:{...null==(c=u.parameters)?void 0:c.docs,source:{originalSource:"() => {\n const comment = fakeComment({\n creatorImage: undefined\n });\n return ;\n}",...null==(p=null==(d=u.parameters)?void 0:d.docs)?void 0:p.source}}},r.parameters={...r.parameters,docs:{...null==(v=r.parameters)?void 0:v.docs,source:{originalSource:"() => {\n const comment = fakeComment();\n return ;\n}",...null==(f=null==(g=r.parameters)?void 0:g.docs)?void 0:f.source}}},m.parameters={...m.parameters,docs:{...null==(b=m.parameters)?void 0:b.docs,source:{originalSource:"() => {\n const comment = fakeComment({\n isEditable: true\n });\n return ;\n}",...null==(h=null==(q=m.parameters)?void 0:q.docs)?void 0:h.source}}},n.parameters={...n.parameters,docs:{...null==(x=n.parameters)?void 0:x.docs,source:{originalSource:"() => {\n const comment = fakeComment({\n _edited: new Date().toISOString()\n });\n return ;\n}",...null==(E=null==(I=n.parameters)?void 0:I.docs)?void 0:E.source}}},o.parameters={...o.parameters,docs:{...null==(C=o.parameters)?void 0:C.docs,source:{originalSource:"() => {\n const text = `Ut dignissim, odio a cursus pretium, erat ex dictum quam, a eleifend augue mauris vel metus. Suspendisse pellentesque, elit efficitur rutrum maximus, arcu enim congue ipsum, vel aliquam ipsum urna quis tellus. Mauris at imperdiet nisi. Integer at neque ex. Nullam vel ipsum sodales, porttitor nulla vitae, tincidunt est. Pellentesque vitae lectus arcu. Integer dapibus rutrum facilisis. Nullam tincidunt quam at arcu interdum, vitae egestas libero vehicula. Morbi metus tortor, dapibus id finibus ac, egestas quis leo. Phasellus scelerisque suscipit mauris sed rhoncus. In quis ultricies ipsum. Integer vitae iaculis risus, sit amet elementum augue. Pellentesque vitae sagittis erat, eget consectetur lorem.\\n\\nUt pharetra molestie quam id dictum. In molestie, arcu sit amet faucibus pulvinar, eros erat egestas leo, at molestie nunc velit a arcu. Aliquam erat volutpat. Vivamus vehicula mi sit amet nibh auctor efficitur. Duis fermentum sem et nibh facilisis, ut tincidunt sem commodo. Nullam ornare ex a elementum accumsan. Etiam a neque ut lacus suscipit blandit. Maecenas id tortor velit.\\n\\nInterdum et malesuada fames ac ante ipsum primis in faucibus. Nam ut commodo tellus. Maecenas at leo metus. Vivamus ullamcorper ex purus, volutpat auctor nunc lobortis a. Integer sit amet ornare nisi, sed ultrices enim. Pellentesque ut aliquam urna, eu fringilla ante. Nullam dui nibh, feugiat id vestibulum nec, efficitur a lorem. In vitae pellentesque tellus. Pellentesque sed odio iaculis, imperdiet turpis at, aliquam ex. Praesent iaculis bibendum nibh, vel egestas turpis ultrices ac. Praesent tincidunt libero sed gravida ornare. Aliquam vehicula risus ut molestie suscipit. Nunc erat odio, venenatis nec posuere in, placerat eget massa. Sed in ultrices ex, vel egestas quam. Integer lectus magna, ornare at nisl sed, convallis euismod enim. Cras pretium commodo arcu non bibendum.\\n\\nNullam dictum lectus felis. Duis vitae lacus vitae nisl aliquet faucibus. Integer neque lacus, dignissim sed mi et, dignissim luctus metus. Cras sollicitudin vestibulum leo, ac ultrices sapien bibendum ac. Phasellus lobortis aliquam libero eu volutpat. Donec vitae rutrum tellus. Fusce vel ante ipsum. Suspendisse mollis tempus porta. Sed a orci tempor, rhoncus tortor eu, sodales justo.`;\n const comment = fakeComment({\n text\n });\n return ;\n}",...null==(P=null==(S=o.parameters)?void 0:S.docs)?void 0:P.source}}},l.parameters={...l.parameters,docs:{...null==(N=l.parameters)?void 0:N.docs,source:{originalSource:"() => {\n const comment = fakeComment({\n text: `Ut dignissim, odio a cursus pretium. https://example.com`\n });\n return ;\n}",...null==(y=null==(R=l.parameters)?void 0:R.docs)?void 0:y.source}}};const ve=["Default","WithoutAvatar","Editable","Edited","LongText","ShortTextWithLink"];export{u as Default,m as Editable,n as Edited,o as LongText,l as ShortTextWithLink,r as WithoutAvatar,ve as __namedExportsOrder,pe as default}; \ No newline at end of file diff --git a/storybook-static/assets/CommentList-Bubf--RT.js b/storybook-static/assets/CommentList-DhG71MGP.js similarity index 84% rename from storybook-static/assets/CommentList-Bubf--RT.js rename to storybook-static/assets/CommentList-DhG71MGP.js index cb83be9729..63f946b6f6 100644 --- a/storybook-static/assets/CommentList-Bubf--RT.js +++ b/storybook-static/assets/CommentList-DhG71MGP.js @@ -1 +1 @@ -import{j as e}from"./jsx-runtime-CexXSJP5.js";import{r as q}from"./index-BP8_t0zE.js";import{B as E}from"./Button-B7QBvkxh.js";import{B as j}from"./ButtonShowReplies-CiHAfYgx.js";import{C as L}from"./CommentItem-CC36m9WH.js";import{C as v}from"./CreateReply-2Azc7a5m.js";import{n as S}from"./DiscussionTitle-Dhry4tok.js";import{I as w}from"./Icon-BoVZOGVD.js";import{F as R,a as _}from"./theme-ui-components.esm-DCiJ1mMX.js";const V=10,I=n=>{const[t,i]=q.useState(!1),{comment:l,handleDelete:o,handleEditRequest:s,handleEdit:d,supportReplies:a,isLoggedIn:m,isReplies:r,maxLength:u,onSubmitReply:p}=n,{_id:c,_deleted:h,replies:g}=l,y=()=>e.jsx(j,{isShowReplies:t,replies:g||[],setIsShowReplies:()=>i(!t)});return!h||g&&0!==S(g)?e.jsxs(_,{sx:{backgroundColor:"white",borderRadius:1,padding:r?0:2},children:[e.jsx(L,{comment:l,handleEditRequest:s,handleDelete:o,handleEdit:d,isReply:!!r}),a&&!t&&y(),a&&t?e.jsxs(R,{sx:{alignItems:"stretch",flexDirection:"row"},children:[g&&e.jsx(_,{sx:{paddingTop:1,paddingRight:2},children:e.jsx(w,{glyph:"arrow-curved-bottom-right"})}),e.jsxs(R,{sx:{alignItems:"stretch",flexDirection:"column",flex:1},children:[e.jsx(b,{comments:g||[],handleDelete:o,handleEdit:d,handleEditRequest:s,isLoggedIn:m,isReplies:!0,maxLength:u,supportReplies:!1}),!h&&(()=>{if(p)return e.jsx(v,{commentId:c,isLoggedIn:m,maxLength:u,onSubmit:p})})(),y()]})]}):null]}):null},b=n=>{const{comments:t,handleDelete:i,handleEdit:l,handleEditRequest:o,highlightedCommentId:s,isLoggedIn:d,isReplies:a,maxLength:m,onMoreComments:r,onSubmitReply:u,supportReplies:p=!1}=n,[c,h]=q.useState(1),g=c*V;return q.useEffect((()=>{if(!s)return;const e=t.findIndex((e=>s.includes(e._id)));e>=0&&(h(Math.floor(e/V)+1),(e=>{setTimeout((()=>{var n;null==(n=document.getElementById(`comment:${e}`))||n.scrollIntoView({behavior:"smooth",block:"start"})}),0)})(s))}),[s,t]),e.jsxs(R,{sx:{gap:2,flexDirection:"column"},children:[t&&t.slice(0,g).map((n=>e.jsx(_,{"data-testid":"CommentList: item",sx:{border:""+(s===n._id?"2px dashed black":"none"),borderRadius:1},children:e.jsx(I,{comment:n,handleEditRequest:o,handleDelete:i,handleEdit:l,isLoggedIn:d,isReplies:a,maxLength:m,onSubmitReply:u,supportReplies:p})},n._id))),t&&t.length>g&&e.jsx(R,{children:e.jsx(E,{type:"button",sx:{margin:"0 auto"},variant:"outline","data-cy":"show-more-comments",onClick:()=>{r&&r(),h(c+1)},children:"show more comments"})})]})};try{I.displayName="CommentContainer",I.__docgenInfo={description:"",displayName:"CommentContainer",props:{comment:{defaultValue:null,description:"",name:"comment",required:!0,type:{name:"IComment"}},handleCommentReply:{defaultValue:null,description:"",name:"handleCommentReply",required:!1,type:{name:"((commentId: string | null) => void)"}},supportReplies:{defaultValue:null,description:"",name:"supportReplies",required:!0,type:{name:"boolean"}},handleDelete:{defaultValue:null,description:"",name:"handleDelete",required:!0,type:{name:"(_id: string) => Promise"}},handleEdit:{defaultValue:null,description:"",name:"handleEdit",required:!0,type:{name:"(_id: string, comment: string) => Promise"}},handleEditRequest:{defaultValue:null,description:"",name:"handleEditRequest",required:!0,type:{name:"() => Promise"}},isLoggedIn:{defaultValue:null,description:"",name:"isLoggedIn",required:!0,type:{name:"boolean"}},isReplies:{defaultValue:null,description:"",name:"isReplies",required:!0,type:{name:"boolean"}},maxLength:{defaultValue:null,description:"",name:"maxLength",required:!0,type:{name:"number"}},onSubmitReply:{defaultValue:null,description:"",name:"onSubmitReply",required:!1,type:{name:"((_id: string, reply: string) => Promise)"}}}}}catch{}try{b.displayName="CommentList",b.__docgenInfo={description:"",displayName:"CommentList",props:{supportReplies:{defaultValue:null,description:"",name:"supportReplies",required:!1,type:{name:"boolean"}},comments:{defaultValue:null,description:"",name:"comments",required:!0,type:{name:"IComment[]"}},highlightedCommentId:{defaultValue:null,description:"",name:"highlightedCommentId",required:!1,type:{name:"string"}},onMoreComments:{defaultValue:null,description:"",name:"onMoreComments",required:!1,type:{name:"(() => void)"}},setCommentBeingRepliedTo:{defaultValue:null,description:"",name:"setCommentBeingRepliedTo",required:!1,type:{name:"((commentId: string | null) => void)"}},handleDelete:{defaultValue:null,description:"",name:"handleDelete",required:!0,type:{name:"(_id: string) => Promise"}},handleEdit:{defaultValue:null,description:"",name:"handleEdit",required:!0,type:{name:"(_id: string, comment: string) => Promise"}},handleEditRequest:{defaultValue:null,description:"",name:"handleEditRequest",required:!0,type:{name:"() => Promise"}},isLoggedIn:{defaultValue:null,description:"",name:"isLoggedIn",required:!0,type:{name:"boolean"}},isReplies:{defaultValue:null,description:"",name:"isReplies",required:!0,type:{name:"boolean"}},maxLength:{defaultValue:null,description:"",name:"maxLength",required:!0,type:{name:"number"}},onSubmitReply:{defaultValue:null,description:"",name:"onSubmitReply",required:!1,type:{name:"((_id: string, reply: string) => Promise)"}}}}}catch{}export{b as C}; \ No newline at end of file +import{j as e}from"./jsx-runtime-CexXSJP5.js";import{r as q}from"./index-BP8_t0zE.js";import{B as E}from"./Button-D4nxT_g_.js";import{B as j}from"./ButtonShowReplies-rMDrrQbK.js";import{C as L}from"./CommentItem-Ccduf_Q5.js";import{C as v}from"./CreateReply-BdnxgSUh.js";import{n as S}from"./DiscussionTitle-BShaVqYD.js";import{I as w}from"./Icon-BoVZOGVD.js";import{F as R,a as _}from"./theme-ui-components.esm-BngKL4Rx.js";const V=10,I=n=>{const[t,i]=q.useState(!1),{comment:l,handleDelete:o,handleEditRequest:d,handleEdit:s,supportReplies:a,isLoggedIn:m,isReplies:r,maxLength:u,onSubmitReply:p}=n,{_id:c,_deleted:h,replies:g}=l,y=()=>e.jsx(j,{isShowReplies:t,replies:g||[],setIsShowReplies:()=>i(!t)});return!h||g&&0!==S(g)?e.jsxs(_,{sx:{backgroundColor:"white",borderRadius:1,padding:r?0:2},children:[e.jsx(L,{comment:l,handleEditRequest:d,handleDelete:o,handleEdit:s,isReply:!!r}),a&&!t&&y(),a&&t?e.jsxs(R,{sx:{alignItems:"stretch",flexDirection:"row"},children:[g&&e.jsx(_,{sx:{paddingTop:1,paddingRight:2},children:e.jsx(w,{glyph:"arrow-curved-bottom-right"})}),e.jsxs(R,{sx:{alignItems:"stretch",flexDirection:"column",flex:1},children:[e.jsx(b,{comments:g||[],handleDelete:o,handleEdit:s,handleEditRequest:d,isLoggedIn:m,isReplies:!0,maxLength:u,supportReplies:!1}),!h&&(()=>{if(p)return e.jsx(v,{commentId:c,isLoggedIn:m,maxLength:u,onSubmit:p})})(),y()]})]}):null]}):null},b=n=>{const{comments:t,handleDelete:i,handleEdit:l,handleEditRequest:o,highlightedCommentId:d,isLoggedIn:s,isReplies:a,maxLength:m,onMoreComments:r,onSubmitReply:u,supportReplies:p=!1}=n,[c,h]=q.useState(1),g=c*V;return q.useEffect((()=>{if(!d)return;const e=t.findIndex((e=>d.includes(e._id)));e>=0&&(h(Math.floor(e/V)+1),(e=>{setTimeout((()=>{var n;null==(n=document.getElementById(`comment:${e}`))||n.scrollIntoView({behavior:"smooth",block:"start"})}),0)})(d))}),[d,t]),e.jsxs(R,{sx:{gap:2,flexDirection:"column"},children:[t&&t.slice(0,g).map((n=>e.jsx(_,{"data-testid":"CommentList: item",sx:{border:""+(d===n._id?"2px dashed black":"none"),borderRadius:1},children:e.jsx(I,{comment:n,handleEditRequest:o,handleDelete:i,handleEdit:l,isLoggedIn:s,isReplies:a,maxLength:m,onSubmitReply:u,supportReplies:p})},n._id))),t&&t.length>g&&e.jsx(R,{children:e.jsx(E,{type:"button",sx:{margin:"0 auto"},variant:"outline","data-cy":"show-more-comments",onClick:()=>{r&&r(),h(c+1)},children:"show more comments"})})]})};try{I.displayName="CommentContainer",I.__docgenInfo={description:"",displayName:"CommentContainer",props:{comment:{defaultValue:null,description:"",name:"comment",required:!0,type:{name:"IComment"}},handleCommentReply:{defaultValue:null,description:"",name:"handleCommentReply",required:!1,type:{name:"((commentId: string | null) => void)"}},supportReplies:{defaultValue:null,description:"",name:"supportReplies",required:!0,type:{name:"boolean"}},handleDelete:{defaultValue:null,description:"",name:"handleDelete",required:!0,type:{name:"(_id: string) => Promise"}},handleEdit:{defaultValue:null,description:"",name:"handleEdit",required:!0,type:{name:"(_id: string, comment: string) => Promise"}},handleEditRequest:{defaultValue:null,description:"",name:"handleEditRequest",required:!0,type:{name:"() => Promise"}},isLoggedIn:{defaultValue:null,description:"",name:"isLoggedIn",required:!0,type:{name:"boolean"}},isReplies:{defaultValue:null,description:"",name:"isReplies",required:!0,type:{name:"boolean"}},maxLength:{defaultValue:null,description:"",name:"maxLength",required:!0,type:{name:"number"}},onSubmitReply:{defaultValue:null,description:"",name:"onSubmitReply",required:!1,type:{name:"((_id: string, reply: string) => Promise)"}}}}}catch{}try{b.displayName="CommentList",b.__docgenInfo={description:"",displayName:"CommentList",props:{supportReplies:{defaultValue:null,description:"",name:"supportReplies",required:!1,type:{name:"boolean"}},comments:{defaultValue:null,description:"",name:"comments",required:!0,type:{name:"IComment[]"}},highlightedCommentId:{defaultValue:null,description:"",name:"highlightedCommentId",required:!1,type:{name:"string"}},onMoreComments:{defaultValue:null,description:"",name:"onMoreComments",required:!1,type:{name:"(() => void)"}},setCommentBeingRepliedTo:{defaultValue:null,description:"",name:"setCommentBeingRepliedTo",required:!1,type:{name:"((commentId: string | null) => void)"}},handleDelete:{defaultValue:null,description:"",name:"handleDelete",required:!0,type:{name:"(_id: string) => Promise"}},handleEdit:{defaultValue:null,description:"",name:"handleEdit",required:!0,type:{name:"(_id: string, comment: string) => Promise"}},handleEditRequest:{defaultValue:null,description:"",name:"handleEditRequest",required:!0,type:{name:"() => Promise"}},isLoggedIn:{defaultValue:null,description:"",name:"isLoggedIn",required:!0,type:{name:"boolean"}},isReplies:{defaultValue:null,description:"",name:"isReplies",required:!0,type:{name:"boolean"}},maxLength:{defaultValue:null,description:"",name:"maxLength",required:!0,type:{name:"number"}},onSubmitReply:{defaultValue:null,description:"",name:"onSubmitReply",required:!1,type:{name:"((_id: string, reply: string) => Promise)"}}}}}catch{}export{b as C}; \ No newline at end of file diff --git a/storybook-static/assets/CommentList.stories-8jqrwoc3.js b/storybook-static/assets/CommentList.stories-8jqrwoc3.js new file mode 100644 index 0000000000..7be28ca4f0 --- /dev/null +++ b/storybook-static/assets/CommentList.stories-8jqrwoc3.js @@ -0,0 +1 @@ +import{j as s}from"./jsx-runtime-CexXSJP5.js";import{c as p,f as e}from"./utils-BRZF2j4e.js";import{C as o}from"./CommentList-DhG71MGP.js";import"./index-BP8_t0zE.js";import"./index-D_kXk1yT.js";import"./Button-D4nxT_g_.js";import"./Icon-BoVZOGVD.js";import"./emotion-styled.browser.esm-Dz2BNYeh.js";import"./extends-CF3RwP-h.js";import"./parseProps-780b287c.browser.esm-DiCerVr_.js";import"./emotion-use-insertion-effect-with-fallbacks.browser.esm-UWD3gXM2.js";import"./supporter-D7hp958O.js";import"./icon-arrow-down-CJeToCJe.js";import"./icon-star-active-ClN6U5FF.js";import"./theme-ui-core-jsx-runtime.browser.esm-CH0qhC10.js";import"./hoist-non-react-statics.cjs-CQI8syxn.js";import"./theme-ui-components.esm-BngKL4Rx.js";import"./ButtonShowReplies-rMDrrQbK.js";import"./DiscussionTitle-BShaVqYD.js";import"./CommentItem-Ccduf_Q5.js";import"./ConfirmModal-p91B88N_.js";import"./Modal-DXxaFBTe.js";import"./index-BBRV8eG_.js";import"./index-Snk9MO9S.js";import"./DisplayDate-6lOgCKow.js";import"./typeof-QjJsDpFa.js";import"./EditComment-Cc0tE0_Q.js";import"./objectWithoutPropertiesLoose-CAYKN5F1.js";import"./index.esm-D0u3ndg0.js";import"./FieldTextarea-oZDGU0lI.js";import"./CharacterCount-CVY3hBeQ.js";import"./LinkifyText-MsKPRXsf.js";import"./ExternalLink-DC09teyd.js";import"./InternalLink-BRM7MvOa.js";import"./components-CutHIkdx.js";import"./index-BXxqJQdV.js";import"./theme-ui-core.browser.esm-CIov4Ln1.js";import"./emotion-react.browser.esm-BYoRxRk_.js";import"./cjs-Clfm10Kj.js";import"./Username-CNsNRGy2.js";import"./UserBadge-XI2JdGOl.js";import"./CreateReply-BdnxgSUh.js";import"./CreateComment-D2RNG3uU.js";import"./MemberBadge-DSOx4fo1.js";const Re={title:"Discussions/CommentList",component:o},m=()=>s.jsx(o,{comments:p(2),handleDelete:()=>Promise.resolve(),handleEditRequest:()=>Promise.resolve(),handleEdit:()=>Promise.resolve(),isLoggedIn:!0,isReplies:!1,maxLength:1e3,onMoreComments:()=>null}),r=()=>s.jsx(o,{comments:p(20),handleDelete:()=>Promise.resolve(),handleEditRequest:()=>Promise.resolve(),handleEdit:()=>Promise.resolve(),isLoggedIn:!0,isReplies:!1,maxLength:1e3,onMoreComments:()=>null}),i=()=>{const t=[e({replies:[e(),e()]}),e({creatorImage:"https://oacpppprod-1fa0a.kxcdn.com/o/uploads%2Fhowtos%2FsEHCqVHlBmMRG8TG0CGN%2FToasteOvenMod-18cd7fc9c38.jpg?alt=media&token=1dd11c48-151a-49cc-9287-443f96a10840",replies:[e({creatorImage:"https://avatars.githubusercontent.com/u/16688508?s=80&u=7332d9d2a953c33179b428d2ee804bfc80a06f5d&v=4"})],_deleted:!0}),e({replies:[e()]}),e()];return s.jsx(o,{supportReplies:!0,comments:t,handleDelete:()=>Promise.resolve(),handleEditRequest:()=>Promise.resolve(),handleEdit:()=>Promise.resolve(),isLoggedIn:!0,isReplies:!1,maxLength:1e3,onMoreComments:()=>Promise.resolve(),onSubmitReply:()=>Promise.resolve()})},n=()=>{const t=[e({replies:[e(),e()]}),e(),e()];return s.jsx(o,{supportReplies:!0,comments:t,isLoggedIn:!0,isReplies:!1,maxLength:800,setCommentBeingRepliedTo:()=>{},handleDelete:()=>Promise.resolve(),handleEditRequest:()=>Promise.resolve(),handleEdit:()=>Promise.resolve(),onMoreComments:()=>Promise.resolve()})},a=()=>{const t=[e({replies:[e({replies:[e()]})]})];return s.jsx(o,{supportReplies:!0,isLoggedIn:!0,isReplies:!1,maxLength:800,comments:t,setCommentBeingRepliedTo:()=>{},handleDelete:()=>Promise.resolve(),handleEditRequest:()=>Promise.resolve(),handleEdit:()=>Promise.resolve(),onMoreComments:()=>Promise.resolve()})},d=p(20,{isEditable:!1}),l=()=>s.jsx(o,{comments:d,highlightedCommentId:d[d.length-2]._id,handleDelete:()=>Promise.resolve(),handleEditRequest:()=>Promise.resolve(),handleEdit:()=>Promise.resolve(),isLoggedIn:!0,isReplies:!1,maxLength:1e3,onMoreComments:()=>null});var c,h,u,g,C,v,f,P,R,L,E,x,k,I,M,D,q,b;m.parameters={...m.parameters,docs:{...null==(c=m.parameters)?void 0:c.docs,source:{originalSource:"() => Promise.resolve()} handleEditRequest={() => Promise.resolve()} handleEdit={() => Promise.resolve()} isLoggedIn={true} isReplies={false} maxLength={1000} onMoreComments={() => null} />",...null==(u=null==(h=m.parameters)?void 0:h.docs)?void 0:u.source}}},r.parameters={...r.parameters,docs:{...null==(g=r.parameters)?void 0:g.docs,source:{originalSource:"() => Promise.resolve()} handleEditRequest={() => Promise.resolve()} handleEdit={() => Promise.resolve()} isLoggedIn={true} isReplies={false} maxLength={1000} onMoreComments={() => null} />",...null==(v=null==(C=r.parameters)?void 0:C.docs)?void 0:v.source}}},i.parameters={...i.parameters,docs:{...null==(f=i.parameters)?void 0:f.docs,source:{originalSource:"() => {\n const comments = [fakeComment({\n replies: [fakeComment(), fakeComment()]\n }), fakeComment({\n creatorImage: 'https://oacpppprod-1fa0a.kxcdn.com/o/uploads%2Fhowtos%2FsEHCqVHlBmMRG8TG0CGN%2FToasteOvenMod-18cd7fc9c38.jpg?alt=media&token=1dd11c48-151a-49cc-9287-443f96a10840',\n replies: [fakeComment({\n creatorImage: 'https://avatars.githubusercontent.com/u/16688508?s=80&u=7332d9d2a953c33179b428d2ee804bfc80a06f5d&v=4'\n })],\n _deleted: true\n }), fakeComment({\n replies: [fakeComment()]\n }), fakeComment()];\n return Promise.resolve()} handleEditRequest={() => Promise.resolve()} handleEdit={() => Promise.resolve()} isLoggedIn={true} isReplies={false} maxLength={1000} onMoreComments={() => Promise.resolve()} onSubmitReply={() => Promise.resolve()} />;\n}",...null==(R=null==(P=i.parameters)?void 0:P.docs)?void 0:R.source}}},n.parameters={...n.parameters,docs:{...null==(L=n.parameters)?void 0:L.docs,source:{originalSource:"() => {\n const comments = [fakeComment({\n replies: [fakeComment(), fakeComment()]\n }), fakeComment(), fakeComment()];\n return {}} handleDelete={() => Promise.resolve()} handleEditRequest={() => Promise.resolve()} handleEdit={() => Promise.resolve()} onMoreComments={() => Promise.resolve()} />;\n}",...null==(x=null==(E=n.parameters)?void 0:E.docs)?void 0:x.source}}},a.parameters={...a.parameters,docs:{...null==(k=a.parameters)?void 0:k.docs,source:{originalSource:"() => {\n const comments = [fakeComment({\n replies: [fakeComment({\n replies: [fakeComment()]\n })]\n })];\n return {}} handleDelete={() => Promise.resolve()} handleEditRequest={() => Promise.resolve()} handleEdit={() => Promise.resolve()} onMoreComments={() => Promise.resolve()} />;\n}",...null==(M=null==(I=a.parameters)?void 0:I.docs)?void 0:M.source}}},l.parameters={...l.parameters,docs:{...null==(D=l.parameters)?void 0:D.docs,source:{originalSource:"() => Promise.resolve()} handleEditRequest={() => Promise.resolve()} handleEdit={() => Promise.resolve()} isLoggedIn={true} isReplies={false} maxLength={1000} onMoreComments={() => null} />",...null==(b=null==(q=l.parameters)?void 0:q.docs)?void 0:b.source}}};const Le=["Default","Expandable","WithNestedComments","WithNestedCommentsAndReplies","WithNestedCommentsAndRepliesMaxDepthTwo","Highlighted"];export{m as Default,r as Expandable,l as Highlighted,i as WithNestedComments,n as WithNestedCommentsAndReplies,a as WithNestedCommentsAndRepliesMaxDepthTwo,Le as __namedExportsOrder,Re as default}; \ No newline at end of file diff --git a/storybook-static/assets/CommentList.stories-B0pklZCr.js b/storybook-static/assets/CommentList.stories-B0pklZCr.js deleted file mode 100644 index 3ebfcffd16..0000000000 --- a/storybook-static/assets/CommentList.stories-B0pklZCr.js +++ /dev/null @@ -1 +0,0 @@ -import{j as s}from"./jsx-runtime-CexXSJP5.js";import{c as p,f as e}from"./utils-BRZF2j4e.js";import{C as o}from"./CommentList-Bubf--RT.js";import"./index-BP8_t0zE.js";import"./index-D_kXk1yT.js";import"./Button-B7QBvkxh.js";import"./Icon-BoVZOGVD.js";import"./emotion-styled.browser.esm-Dz2BNYeh.js";import"./extends-CF3RwP-h.js";import"./parseProps-780b287c.browser.esm-DiCerVr_.js";import"./emotion-use-insertion-effect-with-fallbacks.browser.esm-UWD3gXM2.js";import"./supporter-D7hp958O.js";import"./icon-arrow-down-CJeToCJe.js";import"./icon-star-active-ClN6U5FF.js";import"./theme-ui-core-jsx-runtime.browser.esm-CH0qhC10.js";import"./hoist-non-react-statics.cjs-CQI8syxn.js";import"./theme-ui-components.esm-DCiJ1mMX.js";import"./ButtonShowReplies-CiHAfYgx.js";import"./DiscussionTitle-Dhry4tok.js";import"./CommentItem-CC36m9WH.js";import"./ConfirmModal-DGUUT3uo.js";import"./Modal-CNp0gEVS.js";import"./index-BBRV8eG_.js";import"./index-Snk9MO9S.js";import"./DisplayDate-8pUkm3CJ.js";import"./typeof-QjJsDpFa.js";import"./EditComment-DY_6Q1TM.js";import"./objectWithoutPropertiesLoose-CAYKN5F1.js";import"./index.esm-D0u3ndg0.js";import"./FieldTextarea-msSeWkcr.js";import"./CharacterCount-BGgvgJrP.js";import"./LinkifyText-CTcW0PSE.js";import"./ExternalLink-CHmx7fZ7.js";import"./InternalLink-CtyTe3gy.js";import"./components-CutHIkdx.js";import"./index-BXxqJQdV.js";import"./theme-ui-core.browser.esm-CIov4Ln1.js";import"./emotion-react.browser.esm-BYoRxRk_.js";import"./cjs-Clfm10Kj.js";import"./Username-iPvtw0Lg.js";import"./CreateReply-2Azc7a5m.js";import"./CreateComment-C20B3Odi.js";import"./MemberBadge-BFCUvfGJ.js";const Pe={title:"Discussions/CommentList",component:o},m=()=>s.jsx(o,{comments:p(2),handleDelete:()=>Promise.resolve(),handleEditRequest:()=>Promise.resolve(),handleEdit:()=>Promise.resolve(),isLoggedIn:!0,isReplies:!1,maxLength:1e3,onMoreComments:()=>null}),r=()=>s.jsx(o,{comments:p(20),handleDelete:()=>Promise.resolve(),handleEditRequest:()=>Promise.resolve(),handleEdit:()=>Promise.resolve(),isLoggedIn:!0,isReplies:!1,maxLength:1e3,onMoreComments:()=>null}),i=()=>{const t=[e({replies:[e(),e()]}),e({creatorImage:"https://oacpppprod-1fa0a.kxcdn.com/o/uploads%2Fhowtos%2FsEHCqVHlBmMRG8TG0CGN%2FToasteOvenMod-18cd7fc9c38.jpg?alt=media&token=1dd11c48-151a-49cc-9287-443f96a10840",replies:[e({creatorImage:"https://avatars.githubusercontent.com/u/16688508?s=80&u=7332d9d2a953c33179b428d2ee804bfc80a06f5d&v=4"})],_deleted:!0}),e({replies:[e()]}),e()];return s.jsx(o,{supportReplies:!0,comments:t,handleDelete:()=>Promise.resolve(),handleEditRequest:()=>Promise.resolve(),handleEdit:()=>Promise.resolve(),isLoggedIn:!0,isReplies:!1,maxLength:1e3,onMoreComments:()=>Promise.resolve(),onSubmitReply:()=>Promise.resolve()})},n=()=>{const t=[e({replies:[e(),e()]}),e(),e()];return s.jsx(o,{supportReplies:!0,comments:t,isLoggedIn:!0,isReplies:!1,maxLength:800,setCommentBeingRepliedTo:()=>{},handleDelete:()=>Promise.resolve(),handleEditRequest:()=>Promise.resolve(),handleEdit:()=>Promise.resolve(),onMoreComments:()=>Promise.resolve()})},a=()=>{const t=[e({replies:[e({replies:[e()]})]})];return s.jsx(o,{supportReplies:!0,isLoggedIn:!0,isReplies:!1,maxLength:800,comments:t,setCommentBeingRepliedTo:()=>{},handleDelete:()=>Promise.resolve(),handleEditRequest:()=>Promise.resolve(),handleEdit:()=>Promise.resolve(),onMoreComments:()=>Promise.resolve()})},d=p(20,{isEditable:!1}),l=()=>s.jsx(o,{comments:d,highlightedCommentId:d[d.length-2]._id,handleDelete:()=>Promise.resolve(),handleEditRequest:()=>Promise.resolve(),handleEdit:()=>Promise.resolve(),isLoggedIn:!0,isReplies:!1,maxLength:1e3,onMoreComments:()=>null});var c,h,u,g,C,v,f,P,R,L,E,x,k,I,M,D,q,b;m.parameters={...m.parameters,docs:{...null==(c=m.parameters)?void 0:c.docs,source:{originalSource:"() => Promise.resolve()} handleEditRequest={() => Promise.resolve()} handleEdit={() => Promise.resolve()} isLoggedIn={true} isReplies={false} maxLength={1000} onMoreComments={() => null} />",...null==(u=null==(h=m.parameters)?void 0:h.docs)?void 0:u.source}}},r.parameters={...r.parameters,docs:{...null==(g=r.parameters)?void 0:g.docs,source:{originalSource:"() => Promise.resolve()} handleEditRequest={() => Promise.resolve()} handleEdit={() => Promise.resolve()} isLoggedIn={true} isReplies={false} maxLength={1000} onMoreComments={() => null} />",...null==(v=null==(C=r.parameters)?void 0:C.docs)?void 0:v.source}}},i.parameters={...i.parameters,docs:{...null==(f=i.parameters)?void 0:f.docs,source:{originalSource:"() => {\n const comments = [fakeComment({\n replies: [fakeComment(), fakeComment()]\n }), fakeComment({\n creatorImage: 'https://oacpppprod-1fa0a.kxcdn.com/o/uploads%2Fhowtos%2FsEHCqVHlBmMRG8TG0CGN%2FToasteOvenMod-18cd7fc9c38.jpg?alt=media&token=1dd11c48-151a-49cc-9287-443f96a10840',\n replies: [fakeComment({\n creatorImage: 'https://avatars.githubusercontent.com/u/16688508?s=80&u=7332d9d2a953c33179b428d2ee804bfc80a06f5d&v=4'\n })],\n _deleted: true\n }), fakeComment({\n replies: [fakeComment()]\n }), fakeComment()];\n return Promise.resolve()} handleEditRequest={() => Promise.resolve()} handleEdit={() => Promise.resolve()} isLoggedIn={true} isReplies={false} maxLength={1000} onMoreComments={() => Promise.resolve()} onSubmitReply={() => Promise.resolve()} />;\n}",...null==(R=null==(P=i.parameters)?void 0:P.docs)?void 0:R.source}}},n.parameters={...n.parameters,docs:{...null==(L=n.parameters)?void 0:L.docs,source:{originalSource:"() => {\n const comments = [fakeComment({\n replies: [fakeComment(), fakeComment()]\n }), fakeComment(), fakeComment()];\n return {}} handleDelete={() => Promise.resolve()} handleEditRequest={() => Promise.resolve()} handleEdit={() => Promise.resolve()} onMoreComments={() => Promise.resolve()} />;\n}",...null==(x=null==(E=n.parameters)?void 0:E.docs)?void 0:x.source}}},a.parameters={...a.parameters,docs:{...null==(k=a.parameters)?void 0:k.docs,source:{originalSource:"() => {\n const comments = [fakeComment({\n replies: [fakeComment({\n replies: [fakeComment()]\n })]\n })];\n return {}} handleDelete={() => Promise.resolve()} handleEditRequest={() => Promise.resolve()} handleEdit={() => Promise.resolve()} onMoreComments={() => Promise.resolve()} />;\n}",...null==(M=null==(I=a.parameters)?void 0:I.docs)?void 0:M.source}}},l.parameters={...l.parameters,docs:{...null==(D=l.parameters)?void 0:D.docs,source:{originalSource:"() => Promise.resolve()} handleEditRequest={() => Promise.resolve()} handleEdit={() => Promise.resolve()} isLoggedIn={true} isReplies={false} maxLength={1000} onMoreComments={() => null} />",...null==(b=null==(q=l.parameters)?void 0:q.docs)?void 0:b.source}}};const Re=["Default","Expandable","WithNestedComments","WithNestedCommentsAndReplies","WithNestedCommentsAndRepliesMaxDepthTwo","Highlighted"];export{m as Default,r as Expandable,l as Highlighted,i as WithNestedComments,n as WithNestedCommentsAndReplies,a as WithNestedCommentsAndRepliesMaxDepthTwo,Re as __namedExportsOrder,Pe as default}; \ No newline at end of file diff --git a/storybook-static/assets/ConfirmModal-DGUUT3uo.js b/storybook-static/assets/ConfirmModal-p91B88N_.js similarity index 92% rename from storybook-static/assets/ConfirmModal-DGUUT3uo.js rename to storybook-static/assets/ConfirmModal-p91B88N_.js index ed8edab7b7..8a74c3a7f6 100644 --- a/storybook-static/assets/ConfirmModal-DGUUT3uo.js +++ b/storybook-static/assets/ConfirmModal-p91B88N_.js @@ -1 +1 @@ -import{j as n}from"./jsx-runtime-CexXSJP5.js";import{B as t}from"./Button-B7QBvkxh.js";import{M as m}from"./Modal-CNp0gEVS.js";import{F as i,T as u}from"./theme-ui-components.esm-DCiJ1mMX.js";const l=e=>{const{message:a,confirmButtonText:l,isOpen:o,width:r}=e;return n.jsx(m,{onDidDismiss:()=>null==e?void 0:e.handleCancel,isOpen:o,width:r,children:n.jsxs(i,{"data-cy":"Confirm.modal: Modal",sx:{alignItems:"flex-start",flexDirection:"column",padding:1,gap:2,justifyContent:"flex-start"},children:[n.jsx(u,{sx:{alignSelf:"stretch",fontWeight:"bold"},children:a}),n.jsxs(i,{sx:{gap:2,flexWrap:"wrap"},children:[n.jsx(t,{type:"button",variant:"outline","data-cy":"Confirm.modal: Cancel",onClick:()=>null==e?void 0:e.handleCancel(),children:"Cancel"}),n.jsx(t,{type:"button","aria-label":`Confirm ${l} action`,"data-cy":"Confirm.modal: Confirm",variant:"outline",onClick:()=>null==e?void 0:e.handleConfirm(),children:l})]})]})})};try{l.displayName="ConfirmModal",l.__docgenInfo={description:"",displayName:"ConfirmModal",props:{message:{defaultValue:null,description:"",name:"message",required:!0,type:{name:"string"}},confirmButtonText:{defaultValue:null,description:"",name:"confirmButtonText",required:!0,type:{name:"string"}},isOpen:{defaultValue:null,description:"",name:"isOpen",required:!0,type:{name:"boolean"}},handleCancel:{defaultValue:null,description:"",name:"handleCancel",required:!0,type:{name:"() => void"}},handleConfirm:{defaultValue:null,description:"",name:"handleConfirm",required:!0,type:{name:"() => void"}},width:{defaultValue:null,description:"",name:"width",required:!1,type:{name:"number"}}}}}catch{}export{l as C}; \ No newline at end of file +import{j as n}from"./jsx-runtime-CexXSJP5.js";import{B as t}from"./Button-D4nxT_g_.js";import{M as m}from"./Modal-DXxaFBTe.js";import{F as i,T as u}from"./theme-ui-components.esm-BngKL4Rx.js";const l=e=>{const{message:a,confirmButtonText:l,isOpen:o,width:r}=e;return n.jsx(m,{onDidDismiss:()=>null==e?void 0:e.handleCancel,isOpen:o,width:r,children:n.jsxs(i,{"data-cy":"Confirm.modal: Modal",sx:{alignItems:"flex-start",flexDirection:"column",padding:1,gap:2,justifyContent:"flex-start"},children:[n.jsx(u,{sx:{alignSelf:"stretch",fontWeight:"bold"},children:a}),n.jsxs(i,{sx:{gap:2,flexWrap:"wrap"},children:[n.jsx(t,{type:"button",variant:"outline","data-cy":"Confirm.modal: Cancel",onClick:()=>null==e?void 0:e.handleCancel(),children:"Cancel"}),n.jsx(t,{type:"button","aria-label":`Confirm ${l} action`,"data-cy":"Confirm.modal: Confirm",variant:"outline",onClick:()=>null==e?void 0:e.handleConfirm(),children:l})]})]})})};try{l.displayName="ConfirmModal",l.__docgenInfo={description:"",displayName:"ConfirmModal",props:{message:{defaultValue:null,description:"",name:"message",required:!0,type:{name:"string"}},confirmButtonText:{defaultValue:null,description:"",name:"confirmButtonText",required:!0,type:{name:"string"}},isOpen:{defaultValue:null,description:"",name:"isOpen",required:!0,type:{name:"boolean"}},handleCancel:{defaultValue:null,description:"",name:"handleCancel",required:!0,type:{name:"() => void"}},handleConfirm:{defaultValue:null,description:"",name:"handleConfirm",required:!0,type:{name:"() => void"}},width:{defaultValue:null,description:"",name:"width",required:!1,type:{name:"number"}}}}}catch{}export{l as C}; \ No newline at end of file diff --git a/storybook-static/assets/ConfirmModal.stories---wCALSZ.js b/storybook-static/assets/ConfirmModal.stories-SOEg8W4A.js similarity index 85% rename from storybook-static/assets/ConfirmModal.stories---wCALSZ.js rename to storybook-static/assets/ConfirmModal.stories-SOEg8W4A.js index 5a8c46bb1b..ae2a3c9020 100644 --- a/storybook-static/assets/ConfirmModal.stories---wCALSZ.js +++ b/storybook-static/assets/ConfirmModal.stories-SOEg8W4A.js @@ -1 +1 @@ -import{j as i}from"./jsx-runtime-CexXSJP5.js";import{C as m}from"./ConfirmModal-DGUUT3uo.js";import"./index-BP8_t0zE.js";import"./Button-B7QBvkxh.js";import"./Icon-BoVZOGVD.js";import"./emotion-styled.browser.esm-Dz2BNYeh.js";import"./extends-CF3RwP-h.js";import"./parseProps-780b287c.browser.esm-DiCerVr_.js";import"./emotion-use-insertion-effect-with-fallbacks.browser.esm-UWD3gXM2.js";import"./supporter-D7hp958O.js";import"./icon-arrow-down-CJeToCJe.js";import"./icon-star-active-ClN6U5FF.js";import"./theme-ui-core-jsx-runtime.browser.esm-CH0qhC10.js";import"./hoist-non-react-statics.cjs-CQI8syxn.js";import"./theme-ui-components.esm-DCiJ1mMX.js";import"./Modal-CNp0gEVS.js";import"./index-BBRV8eG_.js";import"./index-Snk9MO9S.js";const _={title:"Layout/ConfirmModal",component:m},o=()=>i.jsx(m,{message:"Are you sure you want to delete this item?",confirmButtonText:"Delete",isOpen:!0,handleCancel:()=>null,handleConfirm:()=>null});var t,e,r;o.parameters={...o.parameters,docs:{...null==(t=o.parameters)?void 0:t.docs,source:{originalSource:'() => null} handleConfirm={() => null} />',...null==(r=null==(e=o.parameters)?void 0:e.docs)?void 0:r.source}}};const w=["Default"];export{o as Default,w as __namedExportsOrder,_ as default}; \ No newline at end of file +import{j as i}from"./jsx-runtime-CexXSJP5.js";import{C as m}from"./ConfirmModal-p91B88N_.js";import"./index-BP8_t0zE.js";import"./Button-D4nxT_g_.js";import"./Icon-BoVZOGVD.js";import"./emotion-styled.browser.esm-Dz2BNYeh.js";import"./extends-CF3RwP-h.js";import"./parseProps-780b287c.browser.esm-DiCerVr_.js";import"./emotion-use-insertion-effect-with-fallbacks.browser.esm-UWD3gXM2.js";import"./supporter-D7hp958O.js";import"./icon-arrow-down-CJeToCJe.js";import"./icon-star-active-ClN6U5FF.js";import"./theme-ui-core-jsx-runtime.browser.esm-CH0qhC10.js";import"./hoist-non-react-statics.cjs-CQI8syxn.js";import"./theme-ui-components.esm-BngKL4Rx.js";import"./Modal-DXxaFBTe.js";import"./index-BBRV8eG_.js";import"./index-Snk9MO9S.js";const _={title:"Layout/ConfirmModal",component:m},o=()=>i.jsx(m,{message:"Are you sure you want to delete this item?",confirmButtonText:"Delete",isOpen:!0,handleCancel:()=>null,handleConfirm:()=>null});var t,e,r;o.parameters={...o.parameters,docs:{...null==(t=o.parameters)?void 0:t.docs,source:{originalSource:'() => null} handleConfirm={() => null} />',...null==(r=null==(e=o.parameters)?void 0:e.docs)?void 0:r.source}}};const w=["Default"];export{o as Default,w as __namedExportsOrder,_ as default}; \ No newline at end of file diff --git a/storybook-static/assets/ContentStatistics-Clvo6xNg.js b/storybook-static/assets/ContentStatistics-bJnGvmTm.js similarity index 90% rename from storybook-static/assets/ContentStatistics-Clvo6xNg.js rename to storybook-static/assets/ContentStatistics-bJnGvmTm.js index 8d5b7268c6..f3d73be186 100644 --- a/storybook-static/assets/ContentStatistics-Clvo6xNg.js +++ b/storybook-static/assets/ContentStatistics-bJnGvmTm.js @@ -1 +1 @@ -import{j as t}from"./jsx-runtime-CexXSJP5.js";import{r as p}from"./index-BP8_t0zE.js";import{B as x}from"./Button-B7QBvkxh.js";import{I as m}from"./Icon-BoVZOGVD.js";import{F as s,T as i}from"./theme-ui-components.esm-DCiJ1mMX.js";const r=e=>{const[n,o]=p.useState(!1);return t.jsxs(s,{"data-cy":"ContentStatistics",py:1,sx:{alignItems:["flex-start","center","center"],justifyContent:"center",gap:2,flexDirection:["column","row","row"],pl:[2,0,0]},children:[t.jsxs(s,{sx:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",display:["flex","none","none"],width:"100%",pr:2,pl:2},onClick:()=>{o(!n)},children:[t.jsx(i,{sx:{fontSize:"13px"},children:n?"":"More Information"}),t.jsx(x,{type:"button",variant:"subtle",showIconOnly:!0,icon:n?"chevron-up":"chevron-down",small:!0,sx:{bg:"white",borderWidth:"0px","&:hover":{bg:"white"},"&:active":{bg:"white"}}})]}),e.statistics.map(((e,o)=>t.jsxs(s,{px:2,py:1,mb:1,sx:{alignItems:"center",fontSize:"1",display:[n?"flex":"none","flex","flex"]},children:[t.jsx(m,{glyph:e.icon,mr:1,size:"sm",opacity:"0.5"}),t.jsx(i,{children:e.label})]},o)))]})};try{r.displayName="ContentStatistics",r.__docgenInfo={description:"",displayName:"ContentStatistics",props:{statistics:{defaultValue:null,description:"",name:"statistics",required:!0,type:{name:"{ icon: availableGlyphs; label: string; }[]"}}}}}catch{}export{r as C}; \ No newline at end of file +import{j as t}from"./jsx-runtime-CexXSJP5.js";import{r as p}from"./index-BP8_t0zE.js";import{B as x}from"./Button-D4nxT_g_.js";import{I as m}from"./Icon-BoVZOGVD.js";import{F as s,T as i}from"./theme-ui-components.esm-BngKL4Rx.js";const r=e=>{const[n,o]=p.useState(!1);return t.jsxs(s,{"data-cy":"ContentStatistics",py:1,sx:{alignItems:["flex-start","center","center"],justifyContent:"center",gap:2,flexDirection:["column","row","row"],pl:[2,0,0]},children:[t.jsxs(s,{sx:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",display:["flex","none","none"],width:"100%",pr:2,pl:2},onClick:()=>{o(!n)},children:[t.jsx(i,{sx:{fontSize:"13px"},children:n?"":"More Information"}),t.jsx(x,{type:"button",variant:"subtle",showIconOnly:!0,icon:n?"chevron-up":"chevron-down",small:!0,sx:{bg:"white",borderWidth:"0px","&:hover":{bg:"white"},"&:active":{bg:"white"}}})]}),e.statistics.map(((e,o)=>t.jsxs(s,{px:2,py:1,mb:1,sx:{alignItems:"center",fontSize:"1",display:[n?"flex":"none","flex","flex"]},children:[t.jsx(m,{glyph:e.icon,mr:1,size:"sm",opacity:"0.5"}),t.jsx(i,{children:e.label})]},o)))]})};try{r.displayName="ContentStatistics",r.__docgenInfo={description:"",displayName:"ContentStatistics",props:{statistics:{defaultValue:null,description:"",name:"statistics",required:!0,type:{name:"{ icon: availableGlyphs; label: string; }[]"}}}}}catch{}export{r as C}; \ No newline at end of file diff --git a/storybook-static/assets/ContentStatistics.stories-BJCIsX0t.js b/storybook-static/assets/ContentStatistics.stories-DsZ7tb--.js similarity index 91% rename from storybook-static/assets/ContentStatistics.stories-BJCIsX0t.js rename to storybook-static/assets/ContentStatistics.stories-DsZ7tb--.js index 2475184a5d..85596b7068 100644 --- a/storybook-static/assets/ContentStatistics.stories-BJCIsX0t.js +++ b/storybook-static/assets/ContentStatistics.stories-DsZ7tb--.js @@ -1 +1 @@ -import{j as l}from"./jsx-runtime-CexXSJP5.js";import{y as t}from"./index-D_kXk1yT.js";import{C as n}from"./ContentStatistics-Clvo6xNg.js";import"./index-BP8_t0zE.js";import"./Button-B7QBvkxh.js";import"./Icon-BoVZOGVD.js";import"./emotion-styled.browser.esm-Dz2BNYeh.js";import"./extends-CF3RwP-h.js";import"./parseProps-780b287c.browser.esm-DiCerVr_.js";import"./emotion-use-insertion-effect-with-fallbacks.browser.esm-UWD3gXM2.js";import"./supporter-D7hp958O.js";import"./icon-arrow-down-CJeToCJe.js";import"./icon-star-active-ClN6U5FF.js";import"./theme-ui-core-jsx-runtime.browser.esm-CH0qhC10.js";import"./hoist-non-react-statics.cjs-CQI8syxn.js";import"./theme-ui-components.esm-DCiJ1mMX.js";const D={title:"Layout/ContentStatistics",component:n},e=()=>l.jsx(n,{statistics:[{icon:"view",label:`${t.datatype.number()} views`},{icon:"star",label:`${t.datatype.number()} useful`},{icon:"comment",label:`${t.datatype.number()} comments`},{icon:"update",label:`${t.datatype.number()} steps`}]}),a=()=>l.jsx(n,{statistics:[{icon:"view",label:"1 view"},{icon:"star",label:"1 useful"},{icon:"comment",label:"1 comment"},{icon:"update",label:"1 step"}]});var o,s,i,r,m,c;e.parameters={...e.parameters,docs:{...null==(o=e.parameters)?void 0:o.docs,source:{originalSource:"() => ",...null==(i=null==(s=e.parameters)?void 0:s.docs)?void 0:i.source}}},a.parameters={...a.parameters,docs:{...null==(r=a.parameters)?void 0:r.docs,source:{originalSource:"() => ",...null==(c=null==(m=a.parameters)?void 0:m.docs)?void 0:c.source}}};const E=["Default","SingleCount"];export{e as Default,a as SingleCount,E as __namedExportsOrder,D as default}; \ No newline at end of file +import{j as l}from"./jsx-runtime-CexXSJP5.js";import{y as t}from"./index-D_kXk1yT.js";import{C as n}from"./ContentStatistics-bJnGvmTm.js";import"./index-BP8_t0zE.js";import"./Button-D4nxT_g_.js";import"./Icon-BoVZOGVD.js";import"./emotion-styled.browser.esm-Dz2BNYeh.js";import"./extends-CF3RwP-h.js";import"./parseProps-780b287c.browser.esm-DiCerVr_.js";import"./emotion-use-insertion-effect-with-fallbacks.browser.esm-UWD3gXM2.js";import"./supporter-D7hp958O.js";import"./icon-arrow-down-CJeToCJe.js";import"./icon-star-active-ClN6U5FF.js";import"./theme-ui-core-jsx-runtime.browser.esm-CH0qhC10.js";import"./hoist-non-react-statics.cjs-CQI8syxn.js";import"./theme-ui-components.esm-BngKL4Rx.js";const D={title:"Layout/ContentStatistics",component:n},e=()=>l.jsx(n,{statistics:[{icon:"view",label:`${t.datatype.number()} views`},{icon:"star",label:`${t.datatype.number()} useful`},{icon:"comment",label:`${t.datatype.number()} comments`},{icon:"update",label:`${t.datatype.number()} steps`}]}),a=()=>l.jsx(n,{statistics:[{icon:"view",label:"1 view"},{icon:"star",label:"1 useful"},{icon:"comment",label:"1 comment"},{icon:"update",label:"1 step"}]});var o,s,i,r,m,c;e.parameters={...e.parameters,docs:{...null==(o=e.parameters)?void 0:o.docs,source:{originalSource:"() => ",...null==(i=null==(s=e.parameters)?void 0:s.docs)?void 0:i.source}}},a.parameters={...a.parameters,docs:{...null==(r=a.parameters)?void 0:r.docs,source:{originalSource:"() => ",...null==(c=null==(m=a.parameters)?void 0:m.docs)?void 0:c.source}}};const E=["Default","SingleCount"];export{e as Default,a as SingleCount,E as __namedExportsOrder,D as default}; \ No newline at end of file diff --git a/storybook-static/assets/CreateComment-C20B3Odi.js b/storybook-static/assets/CreateComment-D2RNG3uU.js similarity index 95% rename from storybook-static/assets/CreateComment-C20B3Odi.js rename to storybook-static/assets/CreateComment-D2RNG3uU.js index bcec12b6bb..ec1c3fed4f 100644 --- a/storybook-static/assets/CreateComment-C20B3Odi.js +++ b/storybook-static/assets/CreateComment-D2RNG3uU.js @@ -1 +1 @@ -import{j as e}from"./jsx-runtime-CexXSJP5.js";import{M as x}from"./MemberBadge-BFCUvfGJ.js";import{L as h}from"./components-CutHIkdx.js";import{F as o,a as l,b as y,T as c,B as L}from"./theme-ui-components.esm-DCiJ1mMX.js";const u=n=>{const{comment:a,isLoggedIn:r,isReply:t,maxLength:i,onSubmit:s,isLoading:m}=n,d=n.userProfileType||"member",u=n.placeholder||"Leave your questions or feedback...",p=n.buttonLabel??"Leave a comment",g=e=>{n.onChange&&(null==n||n.onChange(e))};return e.jsxs(o,{sx:{flexDirection:"column",gap:3},children:[e.jsxs(o,{"data-target":"create-comment-container",children:[e.jsx(l,{sx:{lineHeight:0,marginTop:2,display:["none","block"]},children:e.jsx(x,{profileType:d,useLowDetailVersion:!0})}),e.jsx(l,{sx:{display:"block",background:"white",flexGrow:1,marginLeft:[2,5],borderRadius:1,position:"relative","&:before":{content:'""',position:"absolute",borderWidth:"1em 1em",borderStyle:"solid",borderColor:"transparent white transparent transparent",margin:"1em -2em"}},children:r?e.jsxs(e.Fragment,{children:[e.jsx(y,{value:a,maxLength:i,onChange:e=>{g&&g(e.target.value)},"aria-label":"Comment","data-cy":t?"reply-form":"comments-form",placeholder:u,sx:{background:"none",resize:"vertical",padding:3,"&:focus":{borderColor:"transparent"}}}),e.jsxs(c,{sx:{fontSize:2,position:"absolute",right:0,bottom:-5,pointerEvents:"none",padding:1},children:[a.length,"/",i]})]}):e.jsx(v,{})})]}),e.jsx(o,{sx:{alignSelf:"flex-end"},children:e.jsx(L,{"data-cy":t?"reply-submit":"comment-submit",disabled:!a.trim()||!r||m,variant:"primary",onClick:()=>{m||s(a)},sx:{marginTop:r?3:0},children:m?"Loading...":p})})]})},v=()=>e.jsx(l,{sx:{padding:[3,4]},children:e.jsxs(c,{"data-cy":"comments-login-prompt",children:["Hi there!"," ",e.jsx(h,{to:"/sign-in",style:{textDecoration:"underline",color:"inherit"},children:"Login"})," ","to leave a comment"]})});try{u.displayName="CreateComment",u.__docgenInfo={description:"",displayName:"CreateComment",props:{maxLength:{defaultValue:null,description:"",name:"maxLength",required:!0,type:{name:"number"}},isLoggedIn:{defaultValue:null,description:"",name:"isLoggedIn",required:!0,type:{name:"boolean"}},isLoading:{defaultValue:null,description:"",name:"isLoading",required:!1,type:{name:"boolean"}},isReply:{defaultValue:null,description:"",name:"isReply",required:!1,type:{name:"boolean"}},onSubmit:{defaultValue:null,description:"",name:"onSubmit",required:!0,type:{name:"(value: string) => void"}},onChange:{defaultValue:null,description:"",name:"onChange",required:!0,type:{name:"(value: string) => void"}},comment:{defaultValue:null,description:"",name:"comment",required:!0,type:{name:"string"}},placeholder:{defaultValue:null,description:"",name:"placeholder",required:!1,type:{name:"string"}},userProfileType:{defaultValue:null,description:"",name:"userProfileType",required:!1,type:{name:"enum",value:[{value:'"space"'},{value:'"member"'},{value:'"workspace"'},{value:'"machine-builder"'},{value:'"community-builder"'},{value:'"collection-point"'}]}},buttonLabel:{defaultValue:null,description:"",name:"buttonLabel",required:!1,type:{name:"string"}}}}}catch{}export{u as C}; \ No newline at end of file +import{j as e}from"./jsx-runtime-CexXSJP5.js";import{M as x}from"./MemberBadge-DSOx4fo1.js";import{L as h}from"./components-CutHIkdx.js";import{F as o,a as l,b as y,T as c,B as L}from"./theme-ui-components.esm-BngKL4Rx.js";const u=n=>{const{comment:a,isLoggedIn:r,isReply:t,maxLength:i,onSubmit:s,isLoading:m}=n,d=n.userProfileType||"member",u=n.placeholder||"Leave your questions or feedback...",p=n.buttonLabel??"Leave a comment",g=e=>{n.onChange&&(null==n||n.onChange(e))};return e.jsxs(o,{sx:{flexDirection:"column",gap:3},children:[e.jsxs(o,{"data-target":"create-comment-container",children:[e.jsx(l,{sx:{lineHeight:0,marginTop:2,display:["none","block"]},children:e.jsx(x,{profileType:d,useLowDetailVersion:!0})}),e.jsx(l,{sx:{display:"block",background:"white",flexGrow:1,marginLeft:[2,5],borderRadius:1,position:"relative","&:before":{content:'""',position:"absolute",borderWidth:"1em 1em",borderStyle:"solid",borderColor:"transparent white transparent transparent",margin:"1em -2em"}},children:r?e.jsxs(e.Fragment,{children:[e.jsx(y,{value:a,maxLength:i,onChange:e=>{g&&g(e.target.value)},"aria-label":"Comment","data-cy":t?"reply-form":"comments-form",placeholder:u,sx:{background:"none",resize:"vertical",padding:3,"&:focus":{borderColor:"transparent"}}}),e.jsxs(c,{sx:{fontSize:2,position:"absolute",right:0,bottom:-5,pointerEvents:"none",padding:1},children:[a.length,"/",i]})]}):e.jsx(v,{})})]}),e.jsx(o,{sx:{alignSelf:"flex-end"},children:e.jsx(L,{"data-cy":t?"reply-submit":"comment-submit",disabled:!a.trim()||!r||m,variant:"primary",onClick:()=>{m||s(a)},sx:{marginTop:r?3:0},children:m?"Loading...":p})})]})},v=()=>e.jsx(l,{sx:{padding:[3,4]},children:e.jsxs(c,{"data-cy":"comments-login-prompt",children:["Hi there!"," ",e.jsx(h,{to:"/sign-in",style:{textDecoration:"underline",color:"inherit"},children:"Login"})," ","to leave a comment"]})});try{u.displayName="CreateComment",u.__docgenInfo={description:"",displayName:"CreateComment",props:{maxLength:{defaultValue:null,description:"",name:"maxLength",required:!0,type:{name:"number"}},isLoggedIn:{defaultValue:null,description:"",name:"isLoggedIn",required:!0,type:{name:"boolean"}},isLoading:{defaultValue:null,description:"",name:"isLoading",required:!1,type:{name:"boolean"}},isReply:{defaultValue:null,description:"",name:"isReply",required:!1,type:{name:"boolean"}},onSubmit:{defaultValue:null,description:"",name:"onSubmit",required:!0,type:{name:"(value: string) => void"}},onChange:{defaultValue:null,description:"",name:"onChange",required:!0,type:{name:"(value: string) => void"}},comment:{defaultValue:null,description:"",name:"comment",required:!0,type:{name:"string"}},placeholder:{defaultValue:null,description:"",name:"placeholder",required:!1,type:{name:"string"}},userProfileType:{defaultValue:null,description:"",name:"userProfileType",required:!1,type:{name:"enum",value:[{value:'"space"'},{value:'"member"'},{value:'"workspace"'},{value:'"machine-builder"'},{value:'"community-builder"'},{value:'"collection-point"'}]}},buttonLabel:{defaultValue:null,description:"",name:"buttonLabel",required:!1,type:{name:"string"}}}}}catch{}export{u as C}; \ No newline at end of file diff --git a/storybook-static/assets/CreateComment.stories-CU78S9AB.js b/storybook-static/assets/CreateComment.stories-ChdrnMQK.js similarity index 97% rename from storybook-static/assets/CreateComment.stories-CU78S9AB.js rename to storybook-static/assets/CreateComment.stories-ChdrnMQK.js index b9fa4d751b..c558b2d0fb 100644 --- a/storybook-static/assets/CreateComment.stories-CU78S9AB.js +++ b/storybook-static/assets/CreateComment.stories-ChdrnMQK.js @@ -1 +1 @@ -import{j as m}from"./jsx-runtime-CexXSJP5.js";import{r as a}from"./index-BP8_t0zE.js";import{C as s}from"./CreateComment-C20B3Odi.js";import"./MemberBadge-BFCUvfGJ.js";import"./icon-star-active-ClN6U5FF.js";import"./theme-ui-core.browser.esm-CIov4Ln1.js";import"./emotion-react.browser.esm-BYoRxRk_.js";import"./parseProps-780b287c.browser.esm-DiCerVr_.js";import"./emotion-use-insertion-effect-with-fallbacks.browser.esm-UWD3gXM2.js";import"./hoist-non-react-statics.cjs-CQI8syxn.js";import"./cjs-Clfm10Kj.js";import"./theme-ui-components.esm-DCiJ1mMX.js";import"./theme-ui-core-jsx-runtime.browser.esm-CH0qhC10.js";import"./components-CutHIkdx.js";import"./index-BBRV8eG_.js";import"./index-BXxqJQdV.js";const _={title:"Discussions/CreateComment",component:s},i=()=>{const[e,t]=a.useState("");return m.jsx(s,{comment:e,onChange:t,onSubmit:()=>null,userProfileType:"member",maxLength:1e3,isLoggedIn:!0})},n=()=>{const[e,t]=a.useState("");return m.jsx(s,{comment:e,onChange:t,onSubmit:()=>null,userProfileType:"member",maxLength:123,isLoggedIn:!1})},o=()=>{const[e,t]=a.useState("Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque sodales sodales nunc, ut pharetra magna. Nulla malesuada sodales finibus. In condimentum nulla et nunc convallis, ac interdum turpis convallis. Praesent nec ipsum et lacus rhoncus facilisis id ac enim. Nunc cursus facilisis libero non blandit. Maecenas in mauris vel odio sollicitudin rutrum. Sed suscipit fermentum mi, nec faucibus urna mattis quis. In euismod mi ut lorem imperdiet semper.\n\nVestibulum mi felis, blandit ut mollis sed, consequat et massa. Vivamus vitae sem mattis, scelerisque odio ac, convallis lectus. Duis arcu velit, euismod et leo eget, iaculis molestie est. Phasellus facilisis in metus id sodales. Integer vestibulum interdum euismod. Fusce in lectus non lorem accumsan condimentum a non enim. Quisque porta fermentum facilisis.\n\nDonec ut tristique sapien. Morbi consectetur, elit sit amet molestie fringilla, eros odio rutrum est, sed dictum tortor massa et mi. Donec nec justo lorem. Suspendisse potenti. Proin molestie dolor sed ipsum porta sollicitudin eget quis mauris. Integer quis nisl magna. Vivamus convallis nunc ac mauris interdum tempor. Nullam elit velit, sollicitudin et porttitor sit amet, ultricies a sem. Mauris erat orci, sodales eget enim a, semper porta enim. Integer at mi molestie enim consectetur laoreet. Mauris diam ligula, lobortis nec tortor eget, pulvinar finibus dolor. Fusce ac tincidunt leo. Pellentesque elementum, tellus a feugiat commodo, leo risus ornare nulla, ut interdum justo dolor non turpis. Aliquam semper tortor quis nunc posuere tincidunt.\n\nDonec dapibus leo quis sagittis fringilla. Phasellus ut imperdiet sapien. Nullam posuere elementum odio, a condimentum velit. Integer diam lacus, iaculis eu faucibus eu, iaculis ac eros. Suspendisse accumsan accumsan congue. Vivamus feugiat mi quis massa convallis, sed vestibulum elit volutpat. Suspendisse in elit arcu. Cras fermentum condimentum odio, et ultrices urna auctor et. Ut orci metus, sagittis sit amet sollicitudin in, sagittis sed metus.");return m.jsx(s,{comment:e,onChange:t,onSubmit:()=>null,userProfileType:"member",maxLength:12300,isLoggedIn:!0})},u=()=>{const[e,t]=a.useState("");return m.jsx(s,{comment:e,placeholder:"Custom placeholder",onChange:t,onSubmit:()=>null,userProfileType:"member",maxLength:12300,isLoggedIn:!0})};var r,l,c,d,p,g,f,C,b,h,v,S;i.parameters={...i.parameters,docs:{...null==(r=i.parameters)?void 0:r.docs,source:{originalSource:"() => {\n const [comment, setComment] = useState('');\n return null} userProfileType=\"member\" maxLength={1000} isLoggedIn={true} />;\n}",...null==(c=null==(l=i.parameters)?void 0:l.docs)?void 0:c.source}}},n.parameters={...n.parameters,docs:{...null==(d=n.parameters)?void 0:d.docs,source:{originalSource:"() => {\n const [comment, setComment] = useState('');\n return null} userProfileType=\"member\" maxLength={123} isLoggedIn={false} />;\n}",...null==(g=null==(p=n.parameters)?void 0:p.docs)?void 0:g.source}}},o.parameters={...o.parameters,docs:{...null==(f=o.parameters)?void 0:f.docs,source:{originalSource:'() => {\n const [comment, setComment] = useState(`Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque sodales sodales nunc, ut pharetra magna. Nulla malesuada sodales finibus. In condimentum nulla et nunc convallis, ac interdum turpis convallis. Praesent nec ipsum et lacus rhoncus facilisis id ac enim. Nunc cursus facilisis libero non blandit. Maecenas in mauris vel odio sollicitudin rutrum. Sed suscipit fermentum mi, nec faucibus urna mattis quis. In euismod mi ut lorem imperdiet semper.\n\nVestibulum mi felis, blandit ut mollis sed, consequat et massa. Vivamus vitae sem mattis, scelerisque odio ac, convallis lectus. Duis arcu velit, euismod et leo eget, iaculis molestie est. Phasellus facilisis in metus id sodales. Integer vestibulum interdum euismod. Fusce in lectus non lorem accumsan condimentum a non enim. Quisque porta fermentum facilisis.\n\nDonec ut tristique sapien. Morbi consectetur, elit sit amet molestie fringilla, eros odio rutrum est, sed dictum tortor massa et mi. Donec nec justo lorem. Suspendisse potenti. Proin molestie dolor sed ipsum porta sollicitudin eget quis mauris. Integer quis nisl magna. Vivamus convallis nunc ac mauris interdum tempor. Nullam elit velit, sollicitudin et porttitor sit amet, ultricies a sem. Mauris erat orci, sodales eget enim a, semper porta enim. Integer at mi molestie enim consectetur laoreet. Mauris diam ligula, lobortis nec tortor eget, pulvinar finibus dolor. Fusce ac tincidunt leo. Pellentesque elementum, tellus a feugiat commodo, leo risus ornare nulla, ut interdum justo dolor non turpis. Aliquam semper tortor quis nunc posuere tincidunt.\n\nDonec dapibus leo quis sagittis fringilla. Phasellus ut imperdiet sapien. Nullam posuere elementum odio, a condimentum velit. Integer diam lacus, iaculis eu faucibus eu, iaculis ac eros. Suspendisse accumsan accumsan congue. Vivamus feugiat mi quis massa convallis, sed vestibulum elit volutpat. Suspendisse in elit arcu. Cras fermentum condimentum odio, et ultrices urna auctor et. Ut orci metus, sagittis sit amet sollicitudin in, sagittis sed metus.`);\n return null} userProfileType="member" maxLength={12300} isLoggedIn={true} />;\n}',...null==(b=null==(C=o.parameters)?void 0:C.docs)?void 0:b.source}}},u.parameters={...u.parameters,docs:{...null==(h=u.parameters)?void 0:h.docs,source:{originalSource:'() => {\n const [comment, setComment] = useState(\'\');\n return null} userProfileType="member" maxLength={12300} isLoggedIn={true} />;\n}',...null==(S=null==(v=u.parameters)?void 0:v.docs)?void 0:S.source}}};const A=["Default","LoggedOut","WithLongComment","WithCustomPlaceholder"];export{i as Default,n as LoggedOut,u as WithCustomPlaceholder,o as WithLongComment,A as __namedExportsOrder,_ as default}; \ No newline at end of file +import{j as m}from"./jsx-runtime-CexXSJP5.js";import{r as a}from"./index-BP8_t0zE.js";import{C as s}from"./CreateComment-D2RNG3uU.js";import"./MemberBadge-DSOx4fo1.js";import"./icon-star-active-ClN6U5FF.js";import"./theme-ui-core.browser.esm-CIov4Ln1.js";import"./emotion-react.browser.esm-BYoRxRk_.js";import"./parseProps-780b287c.browser.esm-DiCerVr_.js";import"./emotion-use-insertion-effect-with-fallbacks.browser.esm-UWD3gXM2.js";import"./hoist-non-react-statics.cjs-CQI8syxn.js";import"./cjs-Clfm10Kj.js";import"./theme-ui-components.esm-BngKL4Rx.js";import"./theme-ui-core-jsx-runtime.browser.esm-CH0qhC10.js";import"./components-CutHIkdx.js";import"./index-BBRV8eG_.js";import"./index-BXxqJQdV.js";const _={title:"Discussions/CreateComment",component:s},i=()=>{const[e,t]=a.useState("");return m.jsx(s,{comment:e,onChange:t,onSubmit:()=>null,userProfileType:"member",maxLength:1e3,isLoggedIn:!0})},n=()=>{const[e,t]=a.useState("");return m.jsx(s,{comment:e,onChange:t,onSubmit:()=>null,userProfileType:"member",maxLength:123,isLoggedIn:!1})},o=()=>{const[e,t]=a.useState("Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque sodales sodales nunc, ut pharetra magna. Nulla malesuada sodales finibus. In condimentum nulla et nunc convallis, ac interdum turpis convallis. Praesent nec ipsum et lacus rhoncus facilisis id ac enim. Nunc cursus facilisis libero non blandit. Maecenas in mauris vel odio sollicitudin rutrum. Sed suscipit fermentum mi, nec faucibus urna mattis quis. In euismod mi ut lorem imperdiet semper.\n\nVestibulum mi felis, blandit ut mollis sed, consequat et massa. Vivamus vitae sem mattis, scelerisque odio ac, convallis lectus. Duis arcu velit, euismod et leo eget, iaculis molestie est. Phasellus facilisis in metus id sodales. Integer vestibulum interdum euismod. Fusce in lectus non lorem accumsan condimentum a non enim. Quisque porta fermentum facilisis.\n\nDonec ut tristique sapien. Morbi consectetur, elit sit amet molestie fringilla, eros odio rutrum est, sed dictum tortor massa et mi. Donec nec justo lorem. Suspendisse potenti. Proin molestie dolor sed ipsum porta sollicitudin eget quis mauris. Integer quis nisl magna. Vivamus convallis nunc ac mauris interdum tempor. Nullam elit velit, sollicitudin et porttitor sit amet, ultricies a sem. Mauris erat orci, sodales eget enim a, semper porta enim. Integer at mi molestie enim consectetur laoreet. Mauris diam ligula, lobortis nec tortor eget, pulvinar finibus dolor. Fusce ac tincidunt leo. Pellentesque elementum, tellus a feugiat commodo, leo risus ornare nulla, ut interdum justo dolor non turpis. Aliquam semper tortor quis nunc posuere tincidunt.\n\nDonec dapibus leo quis sagittis fringilla. Phasellus ut imperdiet sapien. Nullam posuere elementum odio, a condimentum velit. Integer diam lacus, iaculis eu faucibus eu, iaculis ac eros. Suspendisse accumsan accumsan congue. Vivamus feugiat mi quis massa convallis, sed vestibulum elit volutpat. Suspendisse in elit arcu. Cras fermentum condimentum odio, et ultrices urna auctor et. Ut orci metus, sagittis sit amet sollicitudin in, sagittis sed metus.");return m.jsx(s,{comment:e,onChange:t,onSubmit:()=>null,userProfileType:"member",maxLength:12300,isLoggedIn:!0})},u=()=>{const[e,t]=a.useState("");return m.jsx(s,{comment:e,placeholder:"Custom placeholder",onChange:t,onSubmit:()=>null,userProfileType:"member",maxLength:12300,isLoggedIn:!0})};var r,l,c,d,p,g,f,C,b,h,v,S;i.parameters={...i.parameters,docs:{...null==(r=i.parameters)?void 0:r.docs,source:{originalSource:"() => {\n const [comment, setComment] = useState('');\n return null} userProfileType=\"member\" maxLength={1000} isLoggedIn={true} />;\n}",...null==(c=null==(l=i.parameters)?void 0:l.docs)?void 0:c.source}}},n.parameters={...n.parameters,docs:{...null==(d=n.parameters)?void 0:d.docs,source:{originalSource:"() => {\n const [comment, setComment] = useState('');\n return null} userProfileType=\"member\" maxLength={123} isLoggedIn={false} />;\n}",...null==(g=null==(p=n.parameters)?void 0:p.docs)?void 0:g.source}}},o.parameters={...o.parameters,docs:{...null==(f=o.parameters)?void 0:f.docs,source:{originalSource:'() => {\n const [comment, setComment] = useState(`Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque sodales sodales nunc, ut pharetra magna. Nulla malesuada sodales finibus. In condimentum nulla et nunc convallis, ac interdum turpis convallis. Praesent nec ipsum et lacus rhoncus facilisis id ac enim. Nunc cursus facilisis libero non blandit. Maecenas in mauris vel odio sollicitudin rutrum. Sed suscipit fermentum mi, nec faucibus urna mattis quis. In euismod mi ut lorem imperdiet semper.\n\nVestibulum mi felis, blandit ut mollis sed, consequat et massa. Vivamus vitae sem mattis, scelerisque odio ac, convallis lectus. Duis arcu velit, euismod et leo eget, iaculis molestie est. Phasellus facilisis in metus id sodales. Integer vestibulum interdum euismod. Fusce in lectus non lorem accumsan condimentum a non enim. Quisque porta fermentum facilisis.\n\nDonec ut tristique sapien. Morbi consectetur, elit sit amet molestie fringilla, eros odio rutrum est, sed dictum tortor massa et mi. Donec nec justo lorem. Suspendisse potenti. Proin molestie dolor sed ipsum porta sollicitudin eget quis mauris. Integer quis nisl magna. Vivamus convallis nunc ac mauris interdum tempor. Nullam elit velit, sollicitudin et porttitor sit amet, ultricies a sem. Mauris erat orci, sodales eget enim a, semper porta enim. Integer at mi molestie enim consectetur laoreet. Mauris diam ligula, lobortis nec tortor eget, pulvinar finibus dolor. Fusce ac tincidunt leo. Pellentesque elementum, tellus a feugiat commodo, leo risus ornare nulla, ut interdum justo dolor non turpis. Aliquam semper tortor quis nunc posuere tincidunt.\n\nDonec dapibus leo quis sagittis fringilla. Phasellus ut imperdiet sapien. Nullam posuere elementum odio, a condimentum velit. Integer diam lacus, iaculis eu faucibus eu, iaculis ac eros. Suspendisse accumsan accumsan congue. Vivamus feugiat mi quis massa convallis, sed vestibulum elit volutpat. Suspendisse in elit arcu. Cras fermentum condimentum odio, et ultrices urna auctor et. Ut orci metus, sagittis sit amet sollicitudin in, sagittis sed metus.`);\n return null} userProfileType="member" maxLength={12300} isLoggedIn={true} />;\n}',...null==(b=null==(C=o.parameters)?void 0:C.docs)?void 0:b.source}}},u.parameters={...u.parameters,docs:{...null==(h=u.parameters)?void 0:h.docs,source:{originalSource:'() => {\n const [comment, setComment] = useState(\'\');\n return null} userProfileType="member" maxLength={12300} isLoggedIn={true} />;\n}',...null==(S=null==(v=u.parameters)?void 0:v.docs)?void 0:S.source}}};const A=["Default","LoggedOut","WithLongComment","WithCustomPlaceholder"];export{i as Default,n as LoggedOut,u as WithCustomPlaceholder,o as WithLongComment,A as __namedExportsOrder,_ as default}; \ No newline at end of file diff --git a/storybook-static/assets/CreateReply-2Azc7a5m.js b/storybook-static/assets/CreateReply-BdnxgSUh.js similarity index 74% rename from storybook-static/assets/CreateReply-2Azc7a5m.js rename to storybook-static/assets/CreateReply-BdnxgSUh.js index 592b730c7b..27fe45fa81 100644 --- a/storybook-static/assets/CreateReply-2Azc7a5m.js +++ b/storybook-static/assets/CreateReply-BdnxgSUh.js @@ -1 +1 @@ -import{j as t}from"./jsx-runtime-CexXSJP5.js";import{r}from"./index-BP8_t0zE.js";import{C as f}from"./CreateComment-C20B3Odi.js";import{a as b,A as x}from"./theme-ui-components.esm-DCiJ1mMX.js";const i=e=>{const[n,a]=r.useState(""),[i,m]=r.useState(!1),[o,s]=r.useState(!1),{commentId:d,isLoggedIn:l,maxLength:u,onSubmit:p}=e;return t.jsxs(b,{sx:{background:"softblue",borderRadius:2,marginBottom:3,padding:3},children:[t.jsx(f,{maxLength:u,comment:n,onChange:e=>a(e),onSubmit:async()=>{m(!0);try{await p(d,n),a(""),m(!1)}catch{m(!1),s(!0)}},isLoggedIn:l,isLoading:i,isReply:!0,buttonLabel:"Leave a reply"}),o?t.jsx(x,{variant:"failure",sx:{mt:3},children:"Unable to leave a comment at this time. Please try again later."}):null]})};try{i.displayName="CreateReply",i.__docgenInfo={description:"",displayName:"CreateReply",props:{commentId:{defaultValue:null,description:"",name:"commentId",required:!0,type:{name:"string"}},isLoggedIn:{defaultValue:null,description:"",name:"isLoggedIn",required:!0,type:{name:"boolean"}},maxLength:{defaultValue:null,description:"",name:"maxLength",required:!0,type:{name:"number"}},onSubmit:{defaultValue:null,description:"",name:"onSubmit",required:!0,type:{name:"(_id: string, reply: string) => Promise"}}}}}catch{}export{i as C}; \ No newline at end of file +import{j as t}from"./jsx-runtime-CexXSJP5.js";import{r}from"./index-BP8_t0zE.js";import{C as f}from"./CreateComment-D2RNG3uU.js";import{a as b,A as x}from"./theme-ui-components.esm-BngKL4Rx.js";const i=e=>{const[n,a]=r.useState(""),[i,m]=r.useState(!1),[o,s]=r.useState(!1),{commentId:l,isLoggedIn:d,maxLength:u,onSubmit:p}=e;return t.jsxs(b,{sx:{background:"softblue",borderRadius:2,marginBottom:3,padding:3},children:[t.jsx(f,{maxLength:u,comment:n,onChange:e=>a(e),onSubmit:async()=>{m(!0);try{await p(l,n),a(""),m(!1)}catch{m(!1),s(!0)}},isLoggedIn:d,isLoading:i,isReply:!0,buttonLabel:"Leave a reply"}),o?t.jsx(x,{variant:"failure",sx:{mt:3},children:"Unable to leave a comment at this time. Please try again later."}):null]})};try{i.displayName="CreateReply",i.__docgenInfo={description:"",displayName:"CreateReply",props:{commentId:{defaultValue:null,description:"",name:"commentId",required:!0,type:{name:"string"}},isLoggedIn:{defaultValue:null,description:"",name:"isLoggedIn",required:!0,type:{name:"boolean"}},maxLength:{defaultValue:null,description:"",name:"maxLength",required:!0,type:{name:"number"}},onSubmit:{defaultValue:null,description:"",name:"onSubmit",required:!0,type:{name:"(_id: string, reply: string) => Promise"}}}}}catch{}export{i as C}; \ No newline at end of file diff --git a/storybook-static/assets/CreateReply.stories-CxH52BhY.js b/storybook-static/assets/CreateReply.stories-CdeIw4Vo.js similarity index 91% rename from storybook-static/assets/CreateReply.stories-CxH52BhY.js rename to storybook-static/assets/CreateReply.stories-CdeIw4Vo.js index a0f1c222e3..8e338d9c10 100644 --- a/storybook-static/assets/CreateReply.stories-CxH52BhY.js +++ b/storybook-static/assets/CreateReply.stories-CdeIw4Vo.js @@ -1 +1 @@ -import{j as s}from"./jsx-runtime-CexXSJP5.js";import{C as t}from"./CreateReply-2Azc7a5m.js";import"./index-BP8_t0zE.js";import"./CreateComment-C20B3Odi.js";import"./MemberBadge-BFCUvfGJ.js";import"./icon-star-active-ClN6U5FF.js";import"./theme-ui-core.browser.esm-CIov4Ln1.js";import"./emotion-react.browser.esm-BYoRxRk_.js";import"./parseProps-780b287c.browser.esm-DiCerVr_.js";import"./emotion-use-insertion-effect-with-fallbacks.browser.esm-UWD3gXM2.js";import"./hoist-non-react-statics.cjs-CQI8syxn.js";import"./cjs-Clfm10Kj.js";import"./theme-ui-components.esm-DCiJ1mMX.js";import"./theme-ui-core-jsx-runtime.browser.esm-CH0qhC10.js";import"./components-CutHIkdx.js";import"./index-BBRV8eG_.js";import"./index-BXxqJQdV.js";const w={title:"Discussions/CreateReply",component:t},e=()=>s.jsx(t,{commentId:"23543bh",isLoggedIn:!1,maxLength:75,onSubmit:()=>Promise.resolve()}),r=()=>s.jsx(t,{commentId:"23543bh",isLoggedIn:!0,maxLength:1e3,onSubmit:()=>Promise.resolve()}),o=()=>s.jsx(t,{commentId:"23543bh",isLoggedIn:!0,maxLength:1e3,onSubmit:async()=>Promise.reject(new Error("Error!"))});var m,n,a,i,p,c,u,g,d;e.parameters={...e.parameters,docs:{...null==(m=e.parameters)?void 0:m.docs,source:{originalSource:"() => {\n return Promise.resolve()} />;\n}",...null==(a=null==(n=e.parameters)?void 0:n.docs)?void 0:a.source}}},r.parameters={...r.parameters,docs:{...null==(i=r.parameters)?void 0:i.docs,source:{originalSource:"() => {\n return Promise.resolve()} />;\n}",...null==(c=null==(p=r.parameters)?void 0:p.docs)?void 0:c.source}}},o.parameters={...o.parameters,docs:{...null==(u=o.parameters)?void 0:u.docs,source:{originalSource:"() => {\n return {\n return Promise.reject(new Error('Error!'));\n }} />;\n}",...null==(d=null==(g=o.parameters)?void 0:g.docs)?void 0:d.source}}};const W=["Default","LoggedIn","LoggedInWithError"];export{e as Default,r as LoggedIn,o as LoggedInWithError,W as __namedExportsOrder,w as default}; \ No newline at end of file +import{j as s}from"./jsx-runtime-CexXSJP5.js";import{C as t}from"./CreateReply-BdnxgSUh.js";import"./index-BP8_t0zE.js";import"./CreateComment-D2RNG3uU.js";import"./MemberBadge-DSOx4fo1.js";import"./icon-star-active-ClN6U5FF.js";import"./theme-ui-core.browser.esm-CIov4Ln1.js";import"./emotion-react.browser.esm-BYoRxRk_.js";import"./parseProps-780b287c.browser.esm-DiCerVr_.js";import"./emotion-use-insertion-effect-with-fallbacks.browser.esm-UWD3gXM2.js";import"./hoist-non-react-statics.cjs-CQI8syxn.js";import"./cjs-Clfm10Kj.js";import"./theme-ui-components.esm-BngKL4Rx.js";import"./theme-ui-core-jsx-runtime.browser.esm-CH0qhC10.js";import"./components-CutHIkdx.js";import"./index-BBRV8eG_.js";import"./index-BXxqJQdV.js";const w={title:"Discussions/CreateReply",component:t},e=()=>s.jsx(t,{commentId:"23543bh",isLoggedIn:!1,maxLength:75,onSubmit:()=>Promise.resolve()}),r=()=>s.jsx(t,{commentId:"23543bh",isLoggedIn:!0,maxLength:1e3,onSubmit:()=>Promise.resolve()}),o=()=>s.jsx(t,{commentId:"23543bh",isLoggedIn:!0,maxLength:1e3,onSubmit:async()=>Promise.reject(new Error("Error!"))});var m,n,a,i,p,c,u,g,d;e.parameters={...e.parameters,docs:{...null==(m=e.parameters)?void 0:m.docs,source:{originalSource:"() => {\n return Promise.resolve()} />;\n}",...null==(a=null==(n=e.parameters)?void 0:n.docs)?void 0:a.source}}},r.parameters={...r.parameters,docs:{...null==(i=r.parameters)?void 0:i.docs,source:{originalSource:"() => {\n return Promise.resolve()} />;\n}",...null==(c=null==(p=r.parameters)?void 0:p.docs)?void 0:c.source}}},o.parameters={...o.parameters,docs:{...null==(u=o.parameters)?void 0:u.docs,source:{originalSource:"() => {\n return {\n return Promise.reject(new Error('Error!'));\n }} />;\n}",...null==(d=null==(g=o.parameters)?void 0:g.docs)?void 0:d.source}}};const W=["Default","LoggedIn","LoggedInWithError"];export{e as Default,r as LoggedIn,o as LoggedInWithError,W as __namedExportsOrder,w as default}; \ No newline at end of file diff --git a/storybook-static/assets/DailyMotion-yp0XTFNk.js b/storybook-static/assets/DailyMotion-D0zN3jIt.js similarity index 97% rename from storybook-static/assets/DailyMotion-yp0XTFNk.js rename to storybook-static/assets/DailyMotion-D0zN3jIt.js index 513a7d8f02..2eee515123 100644 --- a/storybook-static/assets/DailyMotion-yp0XTFNk.js +++ b/storybook-static/assets/DailyMotion-D0zN3jIt.js @@ -1 +1 @@ -import{g as P,r as v}from"./index-BP8_t0zE.js";import{u as D,p as O}from"./VideoPlayer-ggRAiP4x.js";function b(e,t){for(var r=0;rn[t]})}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}var M=Object.create,s=Object.defineProperty,w=Object.getOwnPropertyDescriptor,S=Object.getOwnPropertyNames,j=Object.getPrototypeOf,T=Object.prototype.hasOwnProperty,E=(e,t,r)=>t in e?s(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,A=(e,t)=>{for(var r in t)s(e,r,{get:t[r],enumerable:!0})},h=(e,t,r,n)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let o of S(t))!T.call(e,o)&&o!==r&&s(e,o,{get:()=>t[o],enumerable:!(n=w(t,o))||n.enumerable});return e},L=(e,t,r)=>(r=null!=e?M(j(e)):{},h(e&&e.__esModule?r:s(r,"default",{value:e,enumerable:!0}),e)),C=e=>h(s({},"__esModule",{value:!0}),e),n=(e,t,r)=>(E(e,"symbol"!=typeof t?t+"":t,r),r),d={};A(d,{default:()=>p});var _=C(d),c=L(v),l=D,f=O;const N="https://api.dmcdn.net/all.js",x="DM",K="dmAsyncInit";class p extends c.Component{constructor(){super(...arguments),n(this,"callPlayer",l.callPlayer),n(this,"onDurationChange",(()=>{const e=this.getDuration();this.props.onDuration(e)})),n(this,"mute",(()=>{this.callPlayer("setMuted",!0)})),n(this,"unmute",(()=>{this.callPlayer("setMuted",!1)})),n(this,"ref",(e=>{this.container=e}))}componentDidMount(){this.props.onMount&&this.props.onMount(this)}load(e){const{controls:t,config:r,onError:n,playing:o}=this.props,[,a]=e.match(f.MATCH_URL_DAILYMOTION);this.player?this.player.load(a,{start:(0,l.parseStartTime)(e),autoplay:o}):(0,l.getSDK)(N,x,K,(e=>e.player)).then((o=>{if(!this.container)return;const s=o.player;this.player=new s(this.container,{width:"100%",height:"100%",video:a,params:{controls:t,autoplay:this.props.playing,mute:this.props.muted,start:(0,l.parseStartTime)(e),origin:window.location.origin,...r.params},events:{apiready:this.props.onReady,seeked:()=>this.props.onSeek(this.player.currentTime),video_end:this.props.onEnded,durationchange:this.onDurationChange,pause:this.props.onPause,playing:this.props.onPlay,waiting:this.props.onBuffer,error:e=>n(e)}})}),n)}play(){this.callPlayer("play")}pause(){this.callPlayer("pause")}stop(){}seekTo(e,t=!0){this.callPlayer("seek",e),t||this.pause()}setVolume(e){this.callPlayer("setVolume",e)}getDuration(){return this.player.duration||null}getCurrentTime(){return this.player.currentTime}getSecondsLoaded(){return this.player.bufferedTime}render(){const{display:e}=this.props,t={width:"100%",height:"100%",display:e};return c.default.createElement("div",{style:t},c.default.createElement("div",{ref:this.ref}))}}n(p,"displayName","DailyMotion"),n(p,"canPlay",f.canPlay.dailymotion),n(p,"loopOnEnded",!0);const R=P(_),k=b({__proto__:null,default:R},[_]);export{k as D}; \ No newline at end of file +import{g as P,r as v}from"./index-BP8_t0zE.js";import{u as D,p as O}from"./VideoPlayer-DllXxlDZ.js";function b(e,t){for(var r=0;rn[t]})}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}var M=Object.create,s=Object.defineProperty,w=Object.getOwnPropertyDescriptor,S=Object.getOwnPropertyNames,j=Object.getPrototypeOf,T=Object.prototype.hasOwnProperty,E=(e,t,r)=>t in e?s(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,A=(e,t)=>{for(var r in t)s(e,r,{get:t[r],enumerable:!0})},h=(e,t,r,n)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let o of S(t))!T.call(e,o)&&o!==r&&s(e,o,{get:()=>t[o],enumerable:!(n=w(t,o))||n.enumerable});return e},L=(e,t,r)=>(r=null!=e?M(j(e)):{},h(e&&e.__esModule?r:s(r,"default",{value:e,enumerable:!0}),e)),C=e=>h(s({},"__esModule",{value:!0}),e),n=(e,t,r)=>(E(e,"symbol"!=typeof t?t+"":t,r),r),d={};A(d,{default:()=>p});var _=C(d),c=L(v),l=D,f=O;const N="https://api.dmcdn.net/all.js",x="DM",K="dmAsyncInit";class p extends c.Component{constructor(){super(...arguments),n(this,"callPlayer",l.callPlayer),n(this,"onDurationChange",(()=>{const e=this.getDuration();this.props.onDuration(e)})),n(this,"mute",(()=>{this.callPlayer("setMuted",!0)})),n(this,"unmute",(()=>{this.callPlayer("setMuted",!1)})),n(this,"ref",(e=>{this.container=e}))}componentDidMount(){this.props.onMount&&this.props.onMount(this)}load(e){const{controls:t,config:r,onError:n,playing:o}=this.props,[,a]=e.match(f.MATCH_URL_DAILYMOTION);this.player?this.player.load(a,{start:(0,l.parseStartTime)(e),autoplay:o}):(0,l.getSDK)(N,x,K,(e=>e.player)).then((o=>{if(!this.container)return;const s=o.player;this.player=new s(this.container,{width:"100%",height:"100%",video:a,params:{controls:t,autoplay:this.props.playing,mute:this.props.muted,start:(0,l.parseStartTime)(e),origin:window.location.origin,...r.params},events:{apiready:this.props.onReady,seeked:()=>this.props.onSeek(this.player.currentTime),video_end:this.props.onEnded,durationchange:this.onDurationChange,pause:this.props.onPause,playing:this.props.onPlay,waiting:this.props.onBuffer,error:e=>n(e)}})}),n)}play(){this.callPlayer("play")}pause(){this.callPlayer("pause")}stop(){}seekTo(e,t=!0){this.callPlayer("seek",e),t||this.pause()}setVolume(e){this.callPlayer("setVolume",e)}getDuration(){return this.player.duration||null}getCurrentTime(){return this.player.currentTime}getSecondsLoaded(){return this.player.bufferedTime}render(){const{display:e}=this.props,t={width:"100%",height:"100%",display:e};return c.default.createElement("div",{style:t},c.default.createElement("div",{ref:this.ref}))}}n(p,"displayName","DailyMotion"),n(p,"canPlay",f.canPlay.dailymotion),n(p,"loopOnEnded",!0);const R=P(_),k=b({__proto__:null,default:R},[_]);export{k as D}; \ No newline at end of file diff --git a/storybook-static/assets/DiscussionContainer-BVmT0JYJ.js b/storybook-static/assets/DiscussionContainer-UK2PNt_d.js similarity index 85% rename from storybook-static/assets/DiscussionContainer-BVmT0JYJ.js rename to storybook-static/assets/DiscussionContainer-UK2PNt_d.js index d6ca94d236..f112e1e235 100644 --- a/storybook-static/assets/DiscussionContainer-BVmT0JYJ.js +++ b/storybook-static/assets/DiscussionContainer-UK2PNt_d.js @@ -1 +1 @@ -import{j as o}from"./jsx-runtime-CexXSJP5.js";import{r as u}from"./index-BP8_t0zE.js";import{C as I}from"./CommentList-Bubf--RT.js";import{C as _}from"./CreateComment-C20B3Odi.js";import{D}from"./DiscussionTitle-Dhry4tok.js";import{F as d}from"./theme-ui-components.esm-DCiJ1mMX.js";const S=e=>{const n=[],t={};for(const i of e)if(t[i._id]=i,i.parentCommentId){const e=t[i.parentCommentId];if(!e)continue;e.replies||(e.replies=[]),e.replies.push(i)}for(const i of e)i.parentCommentId||n.push(i);return n},p=e=>{const{comment:n,comments:t,handleDelete:i,handleEdit:m,handleEditRequest:s,onSubmitReply:l,highlightedCommentId:r,maxLength:a,onChange:p,onMoreComments:c,onSubmit:g,isLoggedIn:h,isSubmitting:f,supportReplies:C=!1}=e,[y,b]=u.useState(null),q=u.useMemo((()=>S(t)),[t]);return o.jsxs(d,{sx:{flexDirection:"column",gap:2},children:[o.jsx(D,{comments:t}),o.jsx(I,{supportReplies:C,comments:q,handleDelete:i,handleEdit:m,handleEditRequest:s,highlightedCommentId:r,isLoggedIn:h,isReplies:!1,maxLength:a,onMoreComments:c,onSubmitReply:l,setCommentBeingRepliedTo:e=>{b(e!==y?e:null)}}),o.jsx(d,{sx:{alignItems:"stretch",background:"softblue",borderRadius:2,flexDirection:"column",padding:3},children:o.jsx(_,{isLoading:f,maxLength:a,comment:n,onChange:p,onSubmit:g,isLoggedIn:h})})]})};try{p.displayName="DiscussionContainer",p.__docgenInfo={description:"",displayName:"DiscussionContainer",props:{comment:{defaultValue:null,description:"",name:"comment",required:!0,type:{name:"string"}},comments:{defaultValue:null,description:"",name:"comments",required:!0,type:{name:"IComment[]"}},handleDelete:{defaultValue:null,description:"",name:"handleDelete",required:!0,type:{name:"(_id: string) => Promise"}},handleEdit:{defaultValue:null,description:"",name:"handleEdit",required:!0,type:{name:"(_id: string, comment: string) => Promise"}},handleEditRequest:{defaultValue:null,description:"",name:"handleEditRequest",required:!0,type:{name:"() => Promise"}},highlightedCommentId:{defaultValue:null,description:"",name:"highlightedCommentId",required:!1,type:{name:"string"}},isLoggedIn:{defaultValue:null,description:"",name:"isLoggedIn",required:!0,type:{name:"boolean"}},maxLength:{defaultValue:null,description:"",name:"maxLength",required:!0,type:{name:"number"}},onChange:{defaultValue:null,description:"",name:"onChange",required:!0,type:{name:"(comment: string) => void"}},onMoreComments:{defaultValue:null,description:"",name:"onMoreComments",required:!0,type:{name:"() => void"}},onSubmit:{defaultValue:null,description:"",name:"onSubmit",required:!0,type:{name:"(comment: string) => void"}},onSubmitReply:{defaultValue:null,description:"",name:"onSubmitReply",required:!0,type:{name:"(_id: string, reply: string) => Promise"}},isSubmitting:{defaultValue:null,description:"",name:"isSubmitting",required:!0,type:{name:"boolean"}},supportReplies:{defaultValue:null,description:"",name:"supportReplies",required:!1,type:{name:"boolean"}}}}}catch{}export{p as D}; \ No newline at end of file +import{j as o}from"./jsx-runtime-CexXSJP5.js";import{r as u}from"./index-BP8_t0zE.js";import{C as I}from"./CommentList-DhG71MGP.js";import{C as _}from"./CreateComment-D2RNG3uU.js";import{D}from"./DiscussionTitle-BShaVqYD.js";import{F as d}from"./theme-ui-components.esm-BngKL4Rx.js";const S=e=>{const n=[],t={};for(const i of e)if(t[i._id]=i,i.parentCommentId){const e=t[i.parentCommentId];if(!e)continue;e.replies||(e.replies=[]),e.replies.push(i)}for(const i of e)i.parentCommentId||n.push(i);return n},p=e=>{const{comment:n,comments:t,handleDelete:i,handleEdit:m,handleEditRequest:s,onSubmitReply:l,highlightedCommentId:r,maxLength:a,onChange:p,onMoreComments:c,onSubmit:g,isLoggedIn:h,isSubmitting:f,supportReplies:C=!1}=e,[y,q]=u.useState(null),x=u.useMemo((()=>S(t)),[t]);return o.jsxs(d,{sx:{flexDirection:"column",gap:2},children:[o.jsx(D,{comments:t}),o.jsx(I,{supportReplies:C,comments:x,handleDelete:i,handleEdit:m,handleEditRequest:s,highlightedCommentId:r,isLoggedIn:h,isReplies:!1,maxLength:a,onMoreComments:c,onSubmitReply:l,setCommentBeingRepliedTo:e=>{q(e!==y?e:null)}}),o.jsx(d,{sx:{alignItems:"stretch",background:"softblue",borderRadius:2,flexDirection:"column",padding:3},children:o.jsx(_,{isLoading:f,maxLength:a,comment:n,onChange:p,onSubmit:g,isLoggedIn:h})})]})};try{p.displayName="DiscussionContainer",p.__docgenInfo={description:"",displayName:"DiscussionContainer",props:{comment:{defaultValue:null,description:"",name:"comment",required:!0,type:{name:"string"}},comments:{defaultValue:null,description:"",name:"comments",required:!0,type:{name:"IComment[]"}},handleDelete:{defaultValue:null,description:"",name:"handleDelete",required:!0,type:{name:"(_id: string) => Promise"}},handleEdit:{defaultValue:null,description:"",name:"handleEdit",required:!0,type:{name:"(_id: string, comment: string) => Promise"}},handleEditRequest:{defaultValue:null,description:"",name:"handleEditRequest",required:!0,type:{name:"() => Promise"}},highlightedCommentId:{defaultValue:null,description:"",name:"highlightedCommentId",required:!1,type:{name:"string"}},isLoggedIn:{defaultValue:null,description:"",name:"isLoggedIn",required:!0,type:{name:"boolean"}},maxLength:{defaultValue:null,description:"",name:"maxLength",required:!0,type:{name:"number"}},onChange:{defaultValue:null,description:"",name:"onChange",required:!0,type:{name:"(comment: string) => void"}},onMoreComments:{defaultValue:null,description:"",name:"onMoreComments",required:!0,type:{name:"() => void"}},onSubmit:{defaultValue:null,description:"",name:"onSubmit",required:!0,type:{name:"(comment: string) => void"}},onSubmitReply:{defaultValue:null,description:"",name:"onSubmitReply",required:!0,type:{name:"(_id: string, reply: string) => Promise"}},isSubmitting:{defaultValue:null,description:"",name:"isSubmitting",required:!0,type:{name:"boolean"}},supportReplies:{defaultValue:null,description:"",name:"supportReplies",required:!1,type:{name:"boolean"}}}}}catch{}export{p as D}; \ No newline at end of file diff --git a/storybook-static/assets/DiscussionContainer.stories-Cm_dtFTT.js b/storybook-static/assets/DiscussionContainer.stories-Cm_dtFTT.js new file mode 100644 index 0000000000..a2a81418f8 --- /dev/null +++ b/storybook-static/assets/DiscussionContainer.stories-Cm_dtFTT.js @@ -0,0 +1 @@ +import{j as n}from"./jsx-runtime-CexXSJP5.js";import{r as u}from"./index-BP8_t0zE.js";import{c as a}from"./utils-BRZF2j4e.js";import{D as e}from"./DiscussionContainer-UK2PNt_d.js";import"./index-D_kXk1yT.js";import"./CommentList-DhG71MGP.js";import"./Button-D4nxT_g_.js";import"./Icon-BoVZOGVD.js";import"./emotion-styled.browser.esm-Dz2BNYeh.js";import"./extends-CF3RwP-h.js";import"./parseProps-780b287c.browser.esm-DiCerVr_.js";import"./emotion-use-insertion-effect-with-fallbacks.browser.esm-UWD3gXM2.js";import"./supporter-D7hp958O.js";import"./icon-arrow-down-CJeToCJe.js";import"./icon-star-active-ClN6U5FF.js";import"./theme-ui-core-jsx-runtime.browser.esm-CH0qhC10.js";import"./hoist-non-react-statics.cjs-CQI8syxn.js";import"./theme-ui-components.esm-BngKL4Rx.js";import"./ButtonShowReplies-rMDrrQbK.js";import"./DiscussionTitle-BShaVqYD.js";import"./CommentItem-Ccduf_Q5.js";import"./ConfirmModal-p91B88N_.js";import"./Modal-DXxaFBTe.js";import"./index-BBRV8eG_.js";import"./index-Snk9MO9S.js";import"./DisplayDate-6lOgCKow.js";import"./typeof-QjJsDpFa.js";import"./EditComment-Cc0tE0_Q.js";import"./objectWithoutPropertiesLoose-CAYKN5F1.js";import"./index.esm-D0u3ndg0.js";import"./FieldTextarea-oZDGU0lI.js";import"./CharacterCount-CVY3hBeQ.js";import"./LinkifyText-MsKPRXsf.js";import"./ExternalLink-DC09teyd.js";import"./InternalLink-BRM7MvOa.js";import"./components-CutHIkdx.js";import"./index-BXxqJQdV.js";import"./theme-ui-core.browser.esm-CIov4Ln1.js";import"./emotion-react.browser.esm-BYoRxRk_.js";import"./cjs-Clfm10Kj.js";import"./Username-CNsNRGy2.js";import"./UserBadge-XI2JdGOl.js";import"./CreateReply-BdnxgSUh.js";import"./CreateComment-D2RNG3uU.js";import"./MemberBadge-DSOx4fo1.js";const Ee={title:"Discussions/DiscussionContainer",component:e},I=a(3),q=a(15),s={render:()=>n.jsx(e,{comment:"",comments:I,handleDelete:()=>Promise.resolve(),handleEditRequest:()=>Promise.resolve(),handleEdit:()=>Promise.resolve(),maxLength:1e3,onChange:()=>null,onMoreComments:()=>null,onSubmit:()=>null,onSubmitReply:()=>Promise.resolve(),isSubmitting:!1,isLoggedIn:!1})},m={render:()=>n.jsx(e,{comments:[],handleDelete:()=>Promise.resolve(),handleEditRequest:()=>Promise.resolve(),handleEdit:()=>Promise.resolve(),maxLength:1e3,comment:"",onChange:()=>null,onMoreComments:()=>null,onSubmit:()=>null,onSubmitReply:()=>Promise.resolve(),isSubmitting:!1,isLoggedIn:!1})},r={render:()=>{const[o,s]=u.useState("");return n.jsx(e,{comments:I,handleDelete:()=>Promise.resolve(),handleEditRequest:()=>Promise.resolve(),handleEdit:()=>Promise.resolve(),maxLength:1e3,comment:o,onChange:s,onMoreComments:()=>null,onSubmit:()=>null,onSubmitReply:()=>Promise.resolve(),isSubmitting:!1,isLoggedIn:!0})}},i={render:()=>{const[o,s]=u.useState("");return n.jsx(e,{comments:q,handleDelete:()=>Promise.resolve(),handleEditRequest:()=>Promise.resolve(),handleEdit:()=>Promise.resolve(),maxLength:1e3,comment:o,onChange:s,onMoreComments:()=>null,onSubmit:()=>null,onSubmitReply:()=>Promise.resolve(),isSubmitting:!1,isLoggedIn:!0})}},l={render:()=>{const[o,s]=u.useState(""),t=a(3);return t[0].replies=a(2),n.jsx(e,{supportReplies:!0,comments:t,handleDelete:()=>Promise.resolve(),handleEditRequest:()=>Promise.resolve(),handleEdit:()=>Promise.resolve(),maxLength:1e3,comment:o,onChange:s,onMoreComments:()=>null,onSubmit:()=>null,isLoggedIn:!0,isSubmitting:!1,onSubmitReply:async(e,o)=>alert(`reply to commentId: ${e} with comment: ${o}`)})}};var d,p,g,h,C,S,v,P,b,f,E,R,x,D,L;s.parameters={...s.parameters,docs:{...null==(d=s.parameters)?void 0:d.docs,source:{originalSource:"{\n render: () => {\n return Promise.resolve()} handleEditRequest={() => Promise.resolve()} handleEdit={() => Promise.resolve()} maxLength={1000} onChange={() => null} onMoreComments={() => null} onSubmit={() => null} onSubmitReply={() => Promise.resolve()} isSubmitting={false} isLoggedIn={false} />;\n }\n}",...null==(g=null==(p=s.parameters)?void 0:p.docs)?void 0:g.source}}},m.parameters={...m.parameters,docs:{...null==(h=m.parameters)?void 0:h.docs,source:{originalSource:"{\n render: () => {\n return Promise.resolve()} handleEditRequest={() => Promise.resolve()} handleEdit={() => Promise.resolve()} maxLength={1000} comment={''} onChange={() => null} onMoreComments={() => null} onSubmit={() => null} onSubmitReply={() => Promise.resolve()} isSubmitting={false} isLoggedIn={false} />;\n }\n}",...null==(S=null==(C=m.parameters)?void 0:C.docs)?void 0:S.source}}},r.parameters={...r.parameters,docs:{...null==(v=r.parameters)?void 0:v.docs,source:{originalSource:"{\n render: () => {\n const [comment, setComment] = useState('');\n return Promise.resolve()} handleEditRequest={() => Promise.resolve()} handleEdit={() => Promise.resolve()} maxLength={1000} comment={comment} onChange={setComment} onMoreComments={() => null} onSubmit={() => null} onSubmitReply={() => Promise.resolve()} isSubmitting={false} isLoggedIn={true} />;\n }\n}",...null==(b=null==(P=r.parameters)?void 0:P.docs)?void 0:b.source}}},i.parameters={...i.parameters,docs:{...null==(f=i.parameters)?void 0:f.docs,source:{originalSource:"{\n render: () => {\n const [comment, setComment] = useState('');\n return Promise.resolve()} handleEditRequest={() => Promise.resolve()} handleEdit={() => Promise.resolve()} maxLength={1000} comment={comment} onChange={setComment} onMoreComments={() => null} onSubmit={() => null} onSubmitReply={() => Promise.resolve()} isSubmitting={false} isLoggedIn={true} />;\n }\n}",...null==(R=null==(E=i.parameters)?void 0:E.docs)?void 0:R.source}}},l.parameters={...l.parameters,docs:{...null==(x=l.parameters)?void 0:x.docs,source:{originalSource:"{\n render: () => {\n const [comment, setComment] = useState('');\n const fakeComments = createFakeComments(3);\n fakeComments[0].replies = createFakeComments(2);\n return Promise.resolve()} handleEditRequest={() => Promise.resolve()} handleEdit={() => Promise.resolve()} maxLength={1000} comment={comment} onChange={setComment} onMoreComments={() => null} onSubmit={() => null} isLoggedIn={true} isSubmitting={false} onSubmitReply={async (commentId, comment) => alert(`reply to commentId: ${commentId} with comment: ${comment}`)} />;\n }\n}",...null==(L=null==(D=l.parameters)?void 0:D.docs)?void 0:L.source}}};const Re=["Default","NoComments","LoggedIn","Expandable","WithReplies"];export{s as Default,i as Expandable,r as LoggedIn,m as NoComments,l as WithReplies,Re as __namedExportsOrder,Ee as default}; \ No newline at end of file diff --git a/storybook-static/assets/DiscussionContainer.stories-KscweG6_.js b/storybook-static/assets/DiscussionContainer.stories-KscweG6_.js deleted file mode 100644 index 57e4fc5d53..0000000000 --- a/storybook-static/assets/DiscussionContainer.stories-KscweG6_.js +++ /dev/null @@ -1 +0,0 @@ -import{j as n}from"./jsx-runtime-CexXSJP5.js";import{r as u}from"./index-BP8_t0zE.js";import{c as a}from"./utils-BRZF2j4e.js";import{D as e}from"./DiscussionContainer-BVmT0JYJ.js";import"./index-D_kXk1yT.js";import"./CommentList-Bubf--RT.js";import"./Button-B7QBvkxh.js";import"./Icon-BoVZOGVD.js";import"./emotion-styled.browser.esm-Dz2BNYeh.js";import"./extends-CF3RwP-h.js";import"./parseProps-780b287c.browser.esm-DiCerVr_.js";import"./emotion-use-insertion-effect-with-fallbacks.browser.esm-UWD3gXM2.js";import"./supporter-D7hp958O.js";import"./icon-arrow-down-CJeToCJe.js";import"./icon-star-active-ClN6U5FF.js";import"./theme-ui-core-jsx-runtime.browser.esm-CH0qhC10.js";import"./hoist-non-react-statics.cjs-CQI8syxn.js";import"./theme-ui-components.esm-DCiJ1mMX.js";import"./ButtonShowReplies-CiHAfYgx.js";import"./DiscussionTitle-Dhry4tok.js";import"./CommentItem-CC36m9WH.js";import"./ConfirmModal-DGUUT3uo.js";import"./Modal-CNp0gEVS.js";import"./index-BBRV8eG_.js";import"./index-Snk9MO9S.js";import"./DisplayDate-8pUkm3CJ.js";import"./typeof-QjJsDpFa.js";import"./EditComment-DY_6Q1TM.js";import"./objectWithoutPropertiesLoose-CAYKN5F1.js";import"./index.esm-D0u3ndg0.js";import"./FieldTextarea-msSeWkcr.js";import"./CharacterCount-BGgvgJrP.js";import"./LinkifyText-CTcW0PSE.js";import"./ExternalLink-CHmx7fZ7.js";import"./InternalLink-CtyTe3gy.js";import"./components-CutHIkdx.js";import"./index-BXxqJQdV.js";import"./theme-ui-core.browser.esm-CIov4Ln1.js";import"./emotion-react.browser.esm-BYoRxRk_.js";import"./cjs-Clfm10Kj.js";import"./Username-iPvtw0Lg.js";import"./CreateReply-2Azc7a5m.js";import"./CreateComment-C20B3Odi.js";import"./MemberBadge-BFCUvfGJ.js";const fe={title:"Discussions/DiscussionContainer",component:e},I=a(3),q=a(15),s={render:()=>n.jsx(e,{comment:"",comments:I,handleDelete:()=>Promise.resolve(),handleEditRequest:()=>Promise.resolve(),handleEdit:()=>Promise.resolve(),maxLength:1e3,onChange:()=>null,onMoreComments:()=>null,onSubmit:()=>null,onSubmitReply:()=>Promise.resolve(),isSubmitting:!1,isLoggedIn:!1})},m={render:()=>n.jsx(e,{comments:[],handleDelete:()=>Promise.resolve(),handleEditRequest:()=>Promise.resolve(),handleEdit:()=>Promise.resolve(),maxLength:1e3,comment:"",onChange:()=>null,onMoreComments:()=>null,onSubmit:()=>null,onSubmitReply:()=>Promise.resolve(),isSubmitting:!1,isLoggedIn:!1})},r={render:()=>{const[o,s]=u.useState("");return n.jsx(e,{comments:I,handleDelete:()=>Promise.resolve(),handleEditRequest:()=>Promise.resolve(),handleEdit:()=>Promise.resolve(),maxLength:1e3,comment:o,onChange:s,onMoreComments:()=>null,onSubmit:()=>null,onSubmitReply:()=>Promise.resolve(),isSubmitting:!1,isLoggedIn:!0})}},i={render:()=>{const[o,s]=u.useState("");return n.jsx(e,{comments:q,handleDelete:()=>Promise.resolve(),handleEditRequest:()=>Promise.resolve(),handleEdit:()=>Promise.resolve(),maxLength:1e3,comment:o,onChange:s,onMoreComments:()=>null,onSubmit:()=>null,onSubmitReply:()=>Promise.resolve(),isSubmitting:!1,isLoggedIn:!0})}},l={render:()=>{const[o,s]=u.useState(""),t=a(3);return t[0].replies=a(2),n.jsx(e,{supportReplies:!0,comments:t,handleDelete:()=>Promise.resolve(),handleEditRequest:()=>Promise.resolve(),handleEdit:()=>Promise.resolve(),maxLength:1e3,comment:o,onChange:s,onMoreComments:()=>null,onSubmit:()=>null,isLoggedIn:!0,isSubmitting:!1,onSubmitReply:async(e,o)=>alert(`reply to commentId: ${e} with comment: ${o}`)})}};var d,p,g,h,C,S,v,P,b,f,E,R,x,D,L;s.parameters={...s.parameters,docs:{...null==(d=s.parameters)?void 0:d.docs,source:{originalSource:"{\n render: () => {\n return Promise.resolve()} handleEditRequest={() => Promise.resolve()} handleEdit={() => Promise.resolve()} maxLength={1000} onChange={() => null} onMoreComments={() => null} onSubmit={() => null} onSubmitReply={() => Promise.resolve()} isSubmitting={false} isLoggedIn={false} />;\n }\n}",...null==(g=null==(p=s.parameters)?void 0:p.docs)?void 0:g.source}}},m.parameters={...m.parameters,docs:{...null==(h=m.parameters)?void 0:h.docs,source:{originalSource:"{\n render: () => {\n return Promise.resolve()} handleEditRequest={() => Promise.resolve()} handleEdit={() => Promise.resolve()} maxLength={1000} comment={''} onChange={() => null} onMoreComments={() => null} onSubmit={() => null} onSubmitReply={() => Promise.resolve()} isSubmitting={false} isLoggedIn={false} />;\n }\n}",...null==(S=null==(C=m.parameters)?void 0:C.docs)?void 0:S.source}}},r.parameters={...r.parameters,docs:{...null==(v=r.parameters)?void 0:v.docs,source:{originalSource:"{\n render: () => {\n const [comment, setComment] = useState('');\n return Promise.resolve()} handleEditRequest={() => Promise.resolve()} handleEdit={() => Promise.resolve()} maxLength={1000} comment={comment} onChange={setComment} onMoreComments={() => null} onSubmit={() => null} onSubmitReply={() => Promise.resolve()} isSubmitting={false} isLoggedIn={true} />;\n }\n}",...null==(b=null==(P=r.parameters)?void 0:P.docs)?void 0:b.source}}},i.parameters={...i.parameters,docs:{...null==(f=i.parameters)?void 0:f.docs,source:{originalSource:"{\n render: () => {\n const [comment, setComment] = useState('');\n return Promise.resolve()} handleEditRequest={() => Promise.resolve()} handleEdit={() => Promise.resolve()} maxLength={1000} comment={comment} onChange={setComment} onMoreComments={() => null} onSubmit={() => null} onSubmitReply={() => Promise.resolve()} isSubmitting={false} isLoggedIn={true} />;\n }\n}",...null==(R=null==(E=i.parameters)?void 0:E.docs)?void 0:R.source}}},l.parameters={...l.parameters,docs:{...null==(x=l.parameters)?void 0:x.docs,source:{originalSource:"{\n render: () => {\n const [comment, setComment] = useState('');\n const fakeComments = createFakeComments(3);\n fakeComments[0].replies = createFakeComments(2);\n return Promise.resolve()} handleEditRequest={() => Promise.resolve()} handleEdit={() => Promise.resolve()} maxLength={1000} comment={comment} onChange={setComment} onMoreComments={() => null} onSubmit={() => null} isLoggedIn={true} isSubmitting={false} onSubmitReply={async (commentId, comment) => alert(`reply to commentId: ${commentId} with comment: ${comment}`)} />;\n }\n}",...null==(L=null==(D=l.parameters)?void 0:D.docs)?void 0:L.source}}};const Ee=["Default","NoComments","LoggedIn","Expandable","WithReplies"];export{s as Default,i as Expandable,r as LoggedIn,m as NoComments,l as WithReplies,Ee as __namedExportsOrder,fe as default}; \ No newline at end of file diff --git a/storybook-static/assets/DiscussionTitle-Dhry4tok.js b/storybook-static/assets/DiscussionTitle-BShaVqYD.js similarity index 90% rename from storybook-static/assets/DiscussionTitle-Dhry4tok.js rename to storybook-static/assets/DiscussionTitle-BShaVqYD.js index f8c2da036c..48471cf1b5 100644 --- a/storybook-static/assets/DiscussionTitle-Dhry4tok.js +++ b/storybook-static/assets/DiscussionTitle-BShaVqYD.js @@ -1 +1 @@ -import{j as r}from"./jsx-runtime-CexXSJP5.js";import{H as i}from"./theme-ui-components.esm-DCiJ1mMX.js";const c="Start the discussion",m="1 Comment",a="Comments",n=e=>e.filter((({_deleted:e})=>!0!==e)).length,o=({comments:e})=>{const t=n(e),s=0===t?c:1===t?m:`${t} ${a}`;return r.jsx(i,{as:"h3","data-cy":"DiscussionTitle",children:s})};try{n.displayName="nonDeletedCommentsCount",n.__docgenInfo={description:"",displayName:"nonDeletedCommentsCount",props:{}}}catch{}try{o.displayName="DiscussionTitle",o.__docgenInfo={description:"",displayName:"DiscussionTitle",props:{comments:{defaultValue:null,description:"",name:"comments",required:!0,type:{name:"IComment[]"}}}}}catch{}export{o as D,n}; \ No newline at end of file +import{j as r}from"./jsx-runtime-CexXSJP5.js";import{H as i}from"./theme-ui-components.esm-BngKL4Rx.js";const c="Start the discussion",m="1 Comment",a="Comments",n=e=>e.filter((({_deleted:e})=>!0!==e)).length,o=({comments:e})=>{const t=n(e),s=0===t?c:1===t?m:`${t} ${a}`;return r.jsx(i,{as:"h3","data-cy":"DiscussionTitle",children:s})};try{n.displayName="nonDeletedCommentsCount",n.__docgenInfo={description:"",displayName:"nonDeletedCommentsCount",props:{}}}catch{}try{o.displayName="DiscussionTitle",o.__docgenInfo={description:"",displayName:"DiscussionTitle",props:{comments:{defaultValue:null,description:"",name:"comments",required:!0,type:{name:"IComment[]"}}}}}catch{}export{o as D,n}; \ No newline at end of file diff --git a/storybook-static/assets/DiscussionTitle.stories-DMuy2t7b.js b/storybook-static/assets/DiscussionTitle.stories-D81KiUdE.js similarity index 91% rename from storybook-static/assets/DiscussionTitle.stories-DMuy2t7b.js rename to storybook-static/assets/DiscussionTitle.stories-D81KiUdE.js index 543b15605b..b19ad67993 100644 --- a/storybook-static/assets/DiscussionTitle.stories-DMuy2t7b.js +++ b/storybook-static/assets/DiscussionTitle.stories-D81KiUdE.js @@ -1 +1 @@ -import{j as r}from"./jsx-runtime-CexXSJP5.js";import{D as m}from"./DiscussionTitle-Dhry4tok.js";import"./index-BP8_t0zE.js";import"./theme-ui-components.esm-DCiJ1mMX.js";import"./parseProps-780b287c.browser.esm-DiCerVr_.js";import"./emotion-use-insertion-effect-with-fallbacks.browser.esm-UWD3gXM2.js";import"./theme-ui-core-jsx-runtime.browser.esm-CH0qhC10.js";import"./hoist-non-react-statics.cjs-CQI8syxn.js";const _={title:"Discussions/DiscussionTitle",component:m},e=()=>r.jsx(m,{comments:[]}),o=()=>r.jsx(m,{comments:[{}]}),t=()=>{const e={};return r.jsx(m,{comments:[e,e,e]})};var n,c,i,a,p,u,l,d,C;e.parameters={...e.parameters,docs:{...null==(n=e.parameters)?void 0:n.docs,source:{originalSource:"() => ",...null==(i=null==(c=e.parameters)?void 0:c.docs)?void 0:i.source}}},o.parameters={...o.parameters,docs:{...null==(a=o.parameters)?void 0:a.docs,source:{originalSource:"() => {\n const comment = {} as IComment;\n return ;\n}",...null==(u=null==(p=o.parameters)?void 0:p.docs)?void 0:u.source}}},t.parameters={...t.parameters,docs:{...null==(l=t.parameters)?void 0:l.docs,source:{originalSource:"() => {\n const comment = {} as IComment;\n return ;\n}",...null==(C=null==(d=t.parameters)?void 0:d.docs)?void 0:C.source}}};const E=["NoComments","OneComment","MultipleComments"];export{t as MultipleComments,e as NoComments,o as OneComment,E as __namedExportsOrder,_ as default}; \ No newline at end of file +import{j as r}from"./jsx-runtime-CexXSJP5.js";import{D as m}from"./DiscussionTitle-BShaVqYD.js";import"./index-BP8_t0zE.js";import"./theme-ui-components.esm-BngKL4Rx.js";import"./parseProps-780b287c.browser.esm-DiCerVr_.js";import"./emotion-use-insertion-effect-with-fallbacks.browser.esm-UWD3gXM2.js";import"./theme-ui-core-jsx-runtime.browser.esm-CH0qhC10.js";import"./hoist-non-react-statics.cjs-CQI8syxn.js";const _={title:"Discussions/DiscussionTitle",component:m},e=()=>r.jsx(m,{comments:[]}),o=()=>r.jsx(m,{comments:[{}]}),t=()=>{const e={};return r.jsx(m,{comments:[e,e,e]})};var n,c,i,a,p,u,l,d,C;e.parameters={...e.parameters,docs:{...null==(n=e.parameters)?void 0:n.docs,source:{originalSource:"() => ",...null==(i=null==(c=e.parameters)?void 0:c.docs)?void 0:i.source}}},o.parameters={...o.parameters,docs:{...null==(a=o.parameters)?void 0:a.docs,source:{originalSource:"() => {\n const comment = {} as IComment;\n return ;\n}",...null==(u=null==(p=o.parameters)?void 0:p.docs)?void 0:u.source}}},t.parameters={...t.parameters,docs:{...null==(l=t.parameters)?void 0:l.docs,source:{originalSource:"() => {\n const comment = {} as IComment;\n return ;\n}",...null==(C=null==(d=t.parameters)?void 0:d.docs)?void 0:C.source}}};const E=["NoComments","OneComment","MultipleComments"];export{t as MultipleComments,e as NoComments,o as OneComment,E as __namedExportsOrder,_ as default}; \ No newline at end of file diff --git a/storybook-static/assets/DisplayDate-8pUkm3CJ.js b/storybook-static/assets/DisplayDate-6lOgCKow.js similarity index 99% rename from storybook-static/assets/DisplayDate-8pUkm3CJ.js rename to storybook-static/assets/DisplayDate-6lOgCKow.js index 06d7c9a182..e181441c02 100644 --- a/storybook-static/assets/DisplayDate-8pUkm3CJ.js +++ b/storybook-static/assets/DisplayDate-6lOgCKow.js @@ -1 +1 @@ -import{j as ie}from"./jsx-runtime-CexXSJP5.js";import{_ as V}from"./typeof-QjJsDpFa.js";import{T as oe}from"./theme-ui-components.esm-DCiJ1mMX.js";function P(t){if(null===t||!0===t||!1===t)return NaN;var e=Number(t);return isNaN(e)?e:e<0?Math.ceil(e):Math.floor(e)}function h(t,e){if(e.length1?"s":"")+" required, but only "+e.length+" present")}function m(t){h(1,arguments);var e=Object.prototype.toString.call(t);return t instanceof Date||"object"===V(t)&&"[object Date]"===e?new Date(t.getTime()):"number"==typeof t||"[object Number]"===e?new Date(t):(("string"==typeof t||"[object String]"===e)&&typeof console<"u"&&(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments"),console.warn((new Error).stack)),new Date(NaN))}function ue(t,e){h(2,arguments);var n=m(t).getTime(),r=P(e);return new Date(n+r)}var se={};function W(){return se}function X(t){var e=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return e.setUTCFullYear(t.getFullYear()),t.getTime()-e.getTime()}function E(t,e){h(2,arguments);var n=m(t),r=m(e),a=n.getTime()-r.getTime();return a<0?-1:a>0?1:a}function de(t){return h(1,arguments),t instanceof Date||"object"===V(t)&&"[object Date]"===Object.prototype.toString.call(t)}function le(t){if(h(1,arguments),!de(t)&&"number"!=typeof t)return!1;var e=m(t);return!isNaN(Number(e))}function fe(t,e){h(2,arguments);var n=m(t),r=m(e);return 12*(n.getFullYear()-r.getFullYear())+(n.getMonth()-r.getMonth())}function ce(t,e){return h(2,arguments),m(t).getTime()-m(e).getTime()}var L={ceil:Math.ceil,round:Math.round,floor:Math.floor,trunc:function(t){return t<0?Math.ceil(t):Math.floor(t)}},me="trunc";function he(t){return t?L[t]:L[me]}function ve(t){h(1,arguments);var e=m(t);return e.setHours(23,59,59,999),e}function ge(t){h(1,arguments);var e=m(t),n=e.getMonth();return e.setFullYear(e.getFullYear(),n+1,0),e.setHours(23,59,59,999),e}function we(t){h(1,arguments);var e=m(t);return ve(e).getTime()===ge(e).getTime()}function be(t,e){h(2,arguments);var n,r=m(t),a=m(e),i=E(r,a),o=Math.abs(fe(r,a));if(o<1)n=0;else{1===r.getMonth()&&r.getDate()>27&&r.setDate(30),r.setMonth(r.getMonth()-i*o);var u=E(r,a)===-i;we(m(t))&&1===o&&1===E(t,a)&&(u=!1),n=i*(o-Number(u))}return 0===n?0:n}function ye(t,e,n){h(2,arguments);var r=ce(t,e)/1e3;return he(void 0)(r)}function Te(t,e){return h(2,arguments),ue(t,-P(e))}var pe=864e5;function Me(t){h(1,arguments);var e=m(t),n=e.getTime();e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0);var r=n-e.getTime();return Math.floor(r/pe)+1}function N(t){h(1,arguments);var e=m(t),n=e.getUTCDay(),r=(n<1?7:0)+n-1;return e.setUTCDate(e.getUTCDate()-r),e.setUTCHours(0,0,0,0),e}function J(t){h(1,arguments);var e=m(t),n=e.getUTCFullYear(),r=new Date(0);r.setUTCFullYear(n+1,0,4),r.setUTCHours(0,0,0,0);var a=N(r),i=new Date(0);i.setUTCFullYear(n,0,4),i.setUTCHours(0,0,0,0);var o=N(i);return e.getTime()>=a.getTime()?n+1:e.getTime()>=o.getTime()?n:n-1}function De(t){h(1,arguments);var e=J(t),n=new Date(0);return n.setUTCFullYear(e,0,4),n.setUTCHours(0,0,0,0),N(n)}var Oe=6048e5;function Ce(t){h(1,arguments);var e=m(t),n=N(e).getTime()-De(e).getTime();return Math.round(n/Oe)+1}function F(t,e){var n,r,a,i,o,u,s,d;h(1,arguments);var c=W(),l=P(null!==(n=null!==(r=null!==(a=null!==(i=null==e?void 0:e.weekStartsOn)&&void 0!==i?i:null==e||null===(o=e.locale)||void 0===o||null===(u=o.options)||void 0===u?void 0:u.weekStartsOn)&&void 0!==a?a:c.weekStartsOn)&&void 0!==r?r:null===(s=c.locale)||void 0===s||null===(d=s.options)||void 0===d?void 0:d.weekStartsOn)&&void 0!==n?n:0);if(!(l>=0&&l<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var f=m(t),g=f.getUTCDay(),v=(g=1&&g<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var v=new Date(0);v.setUTCFullYear(l+1,0,g),v.setUTCHours(0,0,0,0);var w=F(v,e),b=new Date(0);b.setUTCFullYear(l,0,g),b.setUTCHours(0,0,0,0);var y=F(b,e);return c.getTime()>=w.getTime()?l+1:c.getTime()>=y.getTime()?l:l-1}function Pe(t,e){var n,r,a,i,o,u,s,d;h(1,arguments);var c=W(),l=P(null!==(n=null!==(r=null!==(a=null!==(i=null==e?void 0:e.firstWeekContainsDate)&&void 0!==i?i:null==e||null===(o=e.locale)||void 0===o||null===(u=o.options)||void 0===u?void 0:u.firstWeekContainsDate)&&void 0!==a?a:c.firstWeekContainsDate)&&void 0!==r?r:null===(s=c.locale)||void 0===s||null===(d=s.options)||void 0===d?void 0:d.firstWeekContainsDate)&&void 0!==n?n:1),f=z(t,e),m=new Date(0);return m.setUTCFullYear(f,0,l),m.setUTCHours(0,0,0,0),F(m,e)}var xe=6048e5;function Se(t,e){h(1,arguments);var n=m(t),r=F(n,e).getTime()-Pe(n,e).getTime();return Math.round(r/xe)+1}function f(t,e){for(var n=t<0?"-":"",r=Math.abs(t).toString();r.length0?n:1-n;return f("yy"===e?r%100:r,e.length)},M:function(t,e){var n=t.getUTCMonth();return"M"===e?String(n+1):f(n+1,2)},d:function(t,e){return f(t.getUTCDate(),e.length)},a:function(t,e){var n=t.getUTCHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];default:return"am"===n?"a.m.":"p.m."}},h:function(t,e){return f(t.getUTCHours()%12||12,e.length)},H:function(t,e){return f(t.getUTCHours(),e.length)},m:function(t,e){return f(t.getUTCMinutes(),e.length)},s:function(t,e){return f(t.getUTCSeconds(),e.length)},S:function(t,e){var n=e.length,r=t.getUTCMilliseconds();return f(Math.floor(r*Math.pow(10,n-3)),e.length)}},x={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},_e={G:function(t,e,n){var r=t.getUTCFullYear()>0?1:0;switch(e){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});default:return n.era(r,{width:"wide"})}},y:function(t,e,n){if("yo"===e){var r=t.getUTCFullYear(),a=r>0?r:1-r;return n.ordinalNumber(a,{unit:"year"})}return D.y(t,e)},Y:function(t,e,n,r){var a=z(t,r),i=a>0?a:1-a;return"YY"===e?f(i%100,2):"Yo"===e?n.ordinalNumber(i,{unit:"year"}):f(i,e.length)},R:function(t,e){return f(J(t),e.length)},u:function(t,e){return f(t.getUTCFullYear(),e.length)},Q:function(t,e,n){var r=Math.ceil((t.getUTCMonth()+1)/3);switch(e){case"Q":return String(r);case"QQ":return f(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(t,e,n){var r=Math.ceil((t.getUTCMonth()+1)/3);switch(e){case"q":return String(r);case"qq":return f(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(t,e,n){var r=t.getUTCMonth();switch(e){case"M":case"MM":return D.M(t,e);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(t,e,n){var r=t.getUTCMonth();switch(e){case"L":return String(r+1);case"LL":return f(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(t,e,n,r){var a=Se(t,r);return"wo"===e?n.ordinalNumber(a,{unit:"week"}):f(a,e.length)},I:function(t,e,n){var r=Ce(t);return"Io"===e?n.ordinalNumber(r,{unit:"week"}):f(r,e.length)},d:function(t,e,n){return"do"===e?n.ordinalNumber(t.getUTCDate(),{unit:"date"}):D.d(t,e)},D:function(t,e,n){var r=Me(t);return"Do"===e?n.ordinalNumber(r,{unit:"dayOfYear"}):f(r,e.length)},E:function(t,e,n){var r=t.getUTCDay();switch(e){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(t,e,n,r){var a=t.getUTCDay(),i=(a-r.weekStartsOn+8)%7||7;switch(e){case"e":return String(i);case"ee":return f(i,2);case"eo":return n.ordinalNumber(i,{unit:"day"});case"eee":return n.day(a,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(a,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(a,{width:"short",context:"formatting"});default:return n.day(a,{width:"wide",context:"formatting"})}},c:function(t,e,n,r){var a=t.getUTCDay(),i=(a-r.weekStartsOn+8)%7||7;switch(e){case"c":return String(i);case"cc":return f(i,e.length);case"co":return n.ordinalNumber(i,{unit:"day"});case"ccc":return n.day(a,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(a,{width:"narrow",context:"standalone"});case"cccccc":return n.day(a,{width:"short",context:"standalone"});default:return n.day(a,{width:"wide",context:"standalone"})}},i:function(t,e,n){var r=t.getUTCDay(),a=0===r?7:r;switch(e){case"i":return String(a);case"ii":return f(a,e.length);case"io":return n.ordinalNumber(a,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(t,e,n){var r=t.getUTCHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(r,{width:"narrow",context:"formatting"});default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},b:function(t,e,n){var r,a=t.getUTCHours();switch(r=12===a?x.noon:0===a?x.midnight:a/12>=1?"pm":"am",e){case"b":case"bb":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(r,{width:"narrow",context:"formatting"});default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},B:function(t,e,n){var r,a=t.getUTCHours();switch(r=a>=17?x.evening:a>=12?x.afternoon:a>=4?x.morning:x.night,e){case"B":case"BB":case"BBB":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(r,{width:"narrow",context:"formatting"});default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},h:function(t,e,n){if("ho"===e){var r=t.getUTCHours()%12;return 0===r&&(r=12),n.ordinalNumber(r,{unit:"hour"})}return D.h(t,e)},H:function(t,e,n){return"Ho"===e?n.ordinalNumber(t.getUTCHours(),{unit:"hour"}):D.H(t,e)},K:function(t,e,n){var r=t.getUTCHours()%12;return"Ko"===e?n.ordinalNumber(r,{unit:"hour"}):f(r,e.length)},k:function(t,e,n){var r=t.getUTCHours();return 0===r&&(r=24),"ko"===e?n.ordinalNumber(r,{unit:"hour"}):f(r,e.length)},m:function(t,e,n){return"mo"===e?n.ordinalNumber(t.getUTCMinutes(),{unit:"minute"}):D.m(t,e)},s:function(t,e,n){return"so"===e?n.ordinalNumber(t.getUTCSeconds(),{unit:"second"}):D.s(t,e)},S:function(t,e){return D.S(t,e)},X:function(t,e,n,r){var a=(r._originalDate||t).getTimezoneOffset();if(0===a)return"Z";switch(e){case"X":return Q(a);case"XXXX":case"XX":return C(a);default:return C(a,":")}},x:function(t,e,n,r){var a=(r._originalDate||t).getTimezoneOffset();switch(e){case"x":return Q(a);case"xxxx":case"xx":return C(a);default:return C(a,":")}},O:function(t,e,n,r){var a=(r._originalDate||t).getTimezoneOffset();switch(e){case"O":case"OO":case"OOO":return"GMT"+$(a,":");default:return"GMT"+C(a,":")}},z:function(t,e,n,r){var a=(r._originalDate||t).getTimezoneOffset();switch(e){case"z":case"zz":case"zzz":return"GMT"+$(a,":");default:return"GMT"+C(a,":")}},t:function(t,e,n,r){var a=r._originalDate||t;return f(Math.floor(a.getTime()/1e3),e.length)},T:function(t,e,n,r){return f((r._originalDate||t).getTime(),e.length)}};function $(t,e){var n=t>0?"-":"+",r=Math.abs(t),a=Math.floor(r/60),i=r%60;if(0===i)return n+String(a);var o=e;return n+String(a)+o+f(i,2)}function Q(t,e){return t%60==0?(t>0?"-":"+")+f(Math.abs(t)/60,2):C(t,e)}function C(t,e){var n=e||"",r=t>0?"-":"+",a=Math.abs(t);return r+f(Math.floor(a/60),2)+n+f(a%60,2)}var j=function(t,e){switch(t){case"P":return e.date({width:"short"});case"PP":return e.date({width:"medium"});case"PPP":return e.date({width:"long"});default:return e.date({width:"full"})}},K=function(t,e){switch(t){case"p":return e.time({width:"short"});case"pp":return e.time({width:"medium"});case"ppp":return e.time({width:"long"});default:return e.time({width:"full"})}},ke=function(t,e){var n,r=t.match(/(P+)(p+)?/)||[],a=r[1],i=r[2];if(!i)return j(t,e);switch(a){case"P":n=e.dateTime({width:"short"});break;case"PP":n=e.dateTime({width:"medium"});break;case"PPP":n=e.dateTime({width:"long"});break;default:n=e.dateTime({width:"full"})}return n.replace("{{date}}",j(a,e)).replace("{{time}}",K(i,e))},We={p:K,P:ke},Ue=["D","DD"],Ye=["YY","YYYY"];function Ee(t){return-1!==Ue.indexOf(t)}function Ne(t){return-1!==Ye.indexOf(t)}function A(t,e,n){if("YYYY"===t)throw new RangeError("Use `yyyy` instead of `YYYY` (in `".concat(e,"`) for formatting years to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if("YY"===t)throw new RangeError("Use `yy` instead of `YY` (in `".concat(e,"`) for formatting years to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if("D"===t)throw new RangeError("Use `d` instead of `D` (in `".concat(e,"`) for formatting days of the month to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if("DD"===t)throw new RangeError("Use `dd` instead of `DD` (in `".concat(e,"`) for formatting days of the month to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"))}var Fe={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},qe=function(t,e,n){var r,a=Fe[t];return r="string"==typeof a?a:1===e?a.one:a.other.replace("{{count}}",e.toString()),null!=n&&n.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r};function I(t){return function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.width?String(e.width):t.defaultWidth;return t.formats[n]||t.formats[t.defaultWidth]}}var He={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},Ie={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},Re={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},Xe={date:I({formats:He,defaultWidth:"full"}),time:I({formats:Ie,defaultWidth:"full"}),dateTime:I({formats:Re,defaultWidth:"full"})},Le={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},$e=function(t,e,n,r){return Le[t]};function _(t){return function(e,n){var r;if("formatting"===(null!=n&&n.context?String(n.context):"standalone")&&t.formattingValues){var a=t.defaultFormattingWidth||t.defaultWidth,i=null!=n&&n.width?String(n.width):a;r=t.formattingValues[i]||t.formattingValues[a]}else{var o=t.defaultWidth,u=null!=n&&n.width?String(n.width):t.defaultWidth;r=t.values[u]||t.values[o]}return r[t.argumentCallback?t.argumentCallback(e):e]}}var Qe={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},je={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},Ae={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},Ge={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},Be={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},Ve={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},Je=function(t,e){var n=Number(t),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},ze={ordinalNumber:Je,era:_({values:Qe,defaultWidth:"wide"}),quarter:_({values:je,defaultWidth:"wide",argumentCallback:function(t){return t-1}}),month:_({values:Ae,defaultWidth:"wide"}),day:_({values:Ge,defaultWidth:"wide"}),dayPeriod:_({values:Be,defaultWidth:"wide",formattingValues:Ve,defaultFormattingWidth:"wide"})};function k(t){return function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=n.width,a=r&&t.matchPatterns[r]||t.matchPatterns[t.defaultMatchWidth],i=e.match(a);if(!i)return null;var o,u=i[0],s=r&&t.parsePatterns[r]||t.parsePatterns[t.defaultParseWidth],d=Array.isArray(s)?Ze(s,(function(t){return t.test(u)})):Ke(s,(function(t){return t.test(u)}));return o=t.valueCallback?t.valueCallback(d):d,{value:o=n.valueCallback?n.valueCallback(o):o,rest:e.slice(u.length)}}}function Ke(t,e){for(var n in t)if(t.hasOwnProperty(n)&&e(t[n]))return n}function Ze(t,e){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:{},r=e.match(t.matchPattern);if(!r)return null;var a=r[0],i=e.match(t.parsePattern);if(!i)return null;var o=t.valueCallback?t.valueCallback(i[0]):i[0];return{value:o=n.valueCallback?n.valueCallback(o):o,rest:e.slice(a.length)}}}var tt=/^(\d+)(th|st|nd|rd)?/i,rt=/\d+/i,at={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},nt={any:[/^b/i,/^(a|c)/i]},it={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},ot={any:[/1/i,/2/i,/3/i,/4/i]},ut={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},st={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},dt={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},lt={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},ft={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},ct={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},mt={ordinalNumber:et({matchPattern:tt,parsePattern:rt,valueCallback:function(t){return parseInt(t,10)}}),era:k({matchPatterns:at,defaultMatchWidth:"wide",parsePatterns:nt,defaultParseWidth:"any"}),quarter:k({matchPatterns:it,defaultMatchWidth:"wide",parsePatterns:ot,defaultParseWidth:"any",valueCallback:function(t){return t+1}}),month:k({matchPatterns:ut,defaultMatchWidth:"wide",parsePatterns:st,defaultParseWidth:"any"}),day:k({matchPatterns:dt,defaultMatchWidth:"wide",parsePatterns:lt,defaultParseWidth:"any"}),dayPeriod:k({matchPatterns:ft,defaultMatchWidth:"any",parsePatterns:ct,defaultParseWidth:"any"})},Z={code:"en-US",formatDistance:qe,formatLong:Xe,formatRelative:$e,localize:ze,match:mt,options:{weekStartsOn:0,firstWeekContainsDate:1}},ht=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,vt=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,gt=/^'([^]*?)'?$/,wt=/''/g,bt=/[a-zA-Z]/;function yt(t,e,n){var r,a,i,o,u,s,d,c,l,f,g;h(2,arguments);var v=String(e),w=W(),b=null!==(r=w.locale)&&void 0!==r?r:Z,y=P(null!==(a=null!==(i=null!==(o=void 0)&&void 0!==o?o:w.firstWeekContainsDate)&&void 0!==i?i:null===(u=w.locale)||void 0===u||null===(s=u.options)||void 0===s?void 0:s.firstWeekContainsDate)&&void 0!==a?a:1);if(!(y>=1&&y<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var p=P(null!==(d=null!==(c=null!==(l=void 0)&&void 0!==l?l:w.weekStartsOn)&&void 0!==c?c:null===(f=w.locale)||void 0===f||null===(g=f.options)||void 0===g?void 0:g.weekStartsOn)&&void 0!==d?d:0);if(!(p>=0&&p<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!b.localize)throw new RangeError("locale must contain localize property");if(!b.formatLong)throw new RangeError("locale must contain formatLong property");var T=m(t);if(!le(T))throw new RangeError("Invalid time value");var M=Te(T,X(T)),D={firstWeekContainsDate:y,weekStartsOn:p,locale:b,_originalDate:T};return v.match(vt).map((function(t){var e=t[0];return"p"===e||"P"===e?(0,We[e])(t,b.formatLong):t})).join("").match(ht).map((function(n){if("''"===n)return"'";var r=n[0];if("'"===r)return Tt(n);var a=_e[r];if(a)return Ne(n)&&A(n,e,String(t)),Ee(n)&&A(n,e,String(t)),a(M,n,b.localize,D);if(r.match(bt))throw new RangeError("Format string contains an unescaped latin alphabet character `"+r+"`");return n})).join("")}function Tt(t){var e=t.match(gt);return e?e[1].replace(wt,"'"):t}function ee(t,e){if(null==t)throw new TypeError("assign requires that input parameter not be null or undefined");for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t}function pt(t){return ee({},t)}var G=1440,Mt=2520,R=43200,Dt=86400;function Ot(t,e,n){var r,a;h(2,arguments);var i=W(),o=null!==(r=null!==(a=null==n?void 0:n.locale)&&void 0!==a?a:i.locale)&&void 0!==r?r:Z;if(!o.formatDistance)throw new RangeError("locale must contain formatDistance property");var u=E(t,e);if(isNaN(u))throw new RangeError("Invalid time value");var s,d,c=ee(pt(n),{addSuffix:!(null==n||!n.addSuffix),comparison:u});u>0?(s=m(e),d=m(t)):(s=m(t),d=m(e));var l,f=ye(d,s),g=(X(d)-X(s))/1e3,v=Math.round((f-g)/60);if(v<2)return null!=n&&n.includeSeconds?f<5?o.formatDistance("lessThanXSeconds",5,c):f<10?o.formatDistance("lessThanXSeconds",10,c):f<20?o.formatDistance("lessThanXSeconds",20,c):f<40?o.formatDistance("halfAMinute",0,c):f<60?o.formatDistance("lessThanXMinutes",1,c):o.formatDistance("xMinutes",1,c):0===v?o.formatDistance("lessThanXMinutes",1,c):o.formatDistance("xMinutes",v,c);if(v<45)return o.formatDistance("xMinutes",v,c);if(v<90)return o.formatDistance("aboutXHours",1,c);if(vt?yt(new Date(t),"dd-MM-yyyy HH:mm"):"",xt=t=>t?Ct(new Date(t),{addSuffix:!0}):"",B=({date:t})=>{const e=Pt(t),n=xt(t);return ie.jsx(oe,{title:e,children:n})};try{B.displayName="DisplayDate",B.__docgenInfo={description:"",displayName:"DisplayDate",props:{date:{defaultValue:null,description:"",name:"date",required:!1,type:{name:"DateType"}}}}}catch{}export{B as D,P as a,h as r,m as t}; \ No newline at end of file +import{j as ie}from"./jsx-runtime-CexXSJP5.js";import{_ as V}from"./typeof-QjJsDpFa.js";import{T as oe}from"./theme-ui-components.esm-BngKL4Rx.js";function P(t){if(null===t||!0===t||!1===t)return NaN;var e=Number(t);return isNaN(e)?e:e<0?Math.ceil(e):Math.floor(e)}function h(t,e){if(e.length1?"s":"")+" required, but only "+e.length+" present")}function m(t){h(1,arguments);var e=Object.prototype.toString.call(t);return t instanceof Date||"object"===V(t)&&"[object Date]"===e?new Date(t.getTime()):"number"==typeof t||"[object Number]"===e?new Date(t):(("string"==typeof t||"[object String]"===e)&&typeof console<"u"&&(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments"),console.warn((new Error).stack)),new Date(NaN))}function ue(t,e){h(2,arguments);var n=m(t).getTime(),r=P(e);return new Date(n+r)}var se={};function W(){return se}function X(t){var e=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return e.setUTCFullYear(t.getFullYear()),t.getTime()-e.getTime()}function E(t,e){h(2,arguments);var n=m(t),r=m(e),a=n.getTime()-r.getTime();return a<0?-1:a>0?1:a}function de(t){return h(1,arguments),t instanceof Date||"object"===V(t)&&"[object Date]"===Object.prototype.toString.call(t)}function le(t){if(h(1,arguments),!de(t)&&"number"!=typeof t)return!1;var e=m(t);return!isNaN(Number(e))}function fe(t,e){h(2,arguments);var n=m(t),r=m(e);return 12*(n.getFullYear()-r.getFullYear())+(n.getMonth()-r.getMonth())}function ce(t,e){return h(2,arguments),m(t).getTime()-m(e).getTime()}var L={ceil:Math.ceil,round:Math.round,floor:Math.floor,trunc:function(t){return t<0?Math.ceil(t):Math.floor(t)}},me="trunc";function he(t){return t?L[t]:L[me]}function ve(t){h(1,arguments);var e=m(t);return e.setHours(23,59,59,999),e}function ge(t){h(1,arguments);var e=m(t),n=e.getMonth();return e.setFullYear(e.getFullYear(),n+1,0),e.setHours(23,59,59,999),e}function we(t){h(1,arguments);var e=m(t);return ve(e).getTime()===ge(e).getTime()}function be(t,e){h(2,arguments);var n,r=m(t),a=m(e),i=E(r,a),o=Math.abs(fe(r,a));if(o<1)n=0;else{1===r.getMonth()&&r.getDate()>27&&r.setDate(30),r.setMonth(r.getMonth()-i*o);var u=E(r,a)===-i;we(m(t))&&1===o&&1===E(t,a)&&(u=!1),n=i*(o-Number(u))}return 0===n?0:n}function ye(t,e,n){h(2,arguments);var r=ce(t,e)/1e3;return he(void 0)(r)}function Te(t,e){return h(2,arguments),ue(t,-P(e))}var pe=864e5;function Me(t){h(1,arguments);var e=m(t),n=e.getTime();e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0);var r=n-e.getTime();return Math.floor(r/pe)+1}function N(t){h(1,arguments);var e=m(t),n=e.getUTCDay(),r=(n<1?7:0)+n-1;return e.setUTCDate(e.getUTCDate()-r),e.setUTCHours(0,0,0,0),e}function J(t){h(1,arguments);var e=m(t),n=e.getUTCFullYear(),r=new Date(0);r.setUTCFullYear(n+1,0,4),r.setUTCHours(0,0,0,0);var a=N(r),i=new Date(0);i.setUTCFullYear(n,0,4),i.setUTCHours(0,0,0,0);var o=N(i);return e.getTime()>=a.getTime()?n+1:e.getTime()>=o.getTime()?n:n-1}function De(t){h(1,arguments);var e=J(t),n=new Date(0);return n.setUTCFullYear(e,0,4),n.setUTCHours(0,0,0,0),N(n)}var Oe=6048e5;function Ce(t){h(1,arguments);var e=m(t),n=N(e).getTime()-De(e).getTime();return Math.round(n/Oe)+1}function F(t,e){var n,r,a,i,o,u,s,d;h(1,arguments);var c=W(),l=P(null!==(n=null!==(r=null!==(a=null!==(i=null==e?void 0:e.weekStartsOn)&&void 0!==i?i:null==e||null===(o=e.locale)||void 0===o||null===(u=o.options)||void 0===u?void 0:u.weekStartsOn)&&void 0!==a?a:c.weekStartsOn)&&void 0!==r?r:null===(s=c.locale)||void 0===s||null===(d=s.options)||void 0===d?void 0:d.weekStartsOn)&&void 0!==n?n:0);if(!(l>=0&&l<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var f=m(t),g=f.getUTCDay(),v=(g=1&&g<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var v=new Date(0);v.setUTCFullYear(l+1,0,g),v.setUTCHours(0,0,0,0);var w=F(v,e),b=new Date(0);b.setUTCFullYear(l,0,g),b.setUTCHours(0,0,0,0);var y=F(b,e);return c.getTime()>=w.getTime()?l+1:c.getTime()>=y.getTime()?l:l-1}function Pe(t,e){var n,r,a,i,o,u,s,d;h(1,arguments);var c=W(),l=P(null!==(n=null!==(r=null!==(a=null!==(i=null==e?void 0:e.firstWeekContainsDate)&&void 0!==i?i:null==e||null===(o=e.locale)||void 0===o||null===(u=o.options)||void 0===u?void 0:u.firstWeekContainsDate)&&void 0!==a?a:c.firstWeekContainsDate)&&void 0!==r?r:null===(s=c.locale)||void 0===s||null===(d=s.options)||void 0===d?void 0:d.firstWeekContainsDate)&&void 0!==n?n:1),f=z(t,e),m=new Date(0);return m.setUTCFullYear(f,0,l),m.setUTCHours(0,0,0,0),F(m,e)}var xe=6048e5;function Se(t,e){h(1,arguments);var n=m(t),r=F(n,e).getTime()-Pe(n,e).getTime();return Math.round(r/xe)+1}function f(t,e){for(var n=t<0?"-":"",r=Math.abs(t).toString();r.length0?n:1-n;return f("yy"===e?r%100:r,e.length)},M:function(t,e){var n=t.getUTCMonth();return"M"===e?String(n+1):f(n+1,2)},d:function(t,e){return f(t.getUTCDate(),e.length)},a:function(t,e){var n=t.getUTCHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];default:return"am"===n?"a.m.":"p.m."}},h:function(t,e){return f(t.getUTCHours()%12||12,e.length)},H:function(t,e){return f(t.getUTCHours(),e.length)},m:function(t,e){return f(t.getUTCMinutes(),e.length)},s:function(t,e){return f(t.getUTCSeconds(),e.length)},S:function(t,e){var n=e.length,r=t.getUTCMilliseconds();return f(Math.floor(r*Math.pow(10,n-3)),e.length)}},x={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},_e={G:function(t,e,n){var r=t.getUTCFullYear()>0?1:0;switch(e){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});default:return n.era(r,{width:"wide"})}},y:function(t,e,n){if("yo"===e){var r=t.getUTCFullYear(),a=r>0?r:1-r;return n.ordinalNumber(a,{unit:"year"})}return D.y(t,e)},Y:function(t,e,n,r){var a=z(t,r),i=a>0?a:1-a;return"YY"===e?f(i%100,2):"Yo"===e?n.ordinalNumber(i,{unit:"year"}):f(i,e.length)},R:function(t,e){return f(J(t),e.length)},u:function(t,e){return f(t.getUTCFullYear(),e.length)},Q:function(t,e,n){var r=Math.ceil((t.getUTCMonth()+1)/3);switch(e){case"Q":return String(r);case"QQ":return f(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(t,e,n){var r=Math.ceil((t.getUTCMonth()+1)/3);switch(e){case"q":return String(r);case"qq":return f(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(t,e,n){var r=t.getUTCMonth();switch(e){case"M":case"MM":return D.M(t,e);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(t,e,n){var r=t.getUTCMonth();switch(e){case"L":return String(r+1);case"LL":return f(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(t,e,n,r){var a=Se(t,r);return"wo"===e?n.ordinalNumber(a,{unit:"week"}):f(a,e.length)},I:function(t,e,n){var r=Ce(t);return"Io"===e?n.ordinalNumber(r,{unit:"week"}):f(r,e.length)},d:function(t,e,n){return"do"===e?n.ordinalNumber(t.getUTCDate(),{unit:"date"}):D.d(t,e)},D:function(t,e,n){var r=Me(t);return"Do"===e?n.ordinalNumber(r,{unit:"dayOfYear"}):f(r,e.length)},E:function(t,e,n){var r=t.getUTCDay();switch(e){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(t,e,n,r){var a=t.getUTCDay(),i=(a-r.weekStartsOn+8)%7||7;switch(e){case"e":return String(i);case"ee":return f(i,2);case"eo":return n.ordinalNumber(i,{unit:"day"});case"eee":return n.day(a,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(a,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(a,{width:"short",context:"formatting"});default:return n.day(a,{width:"wide",context:"formatting"})}},c:function(t,e,n,r){var a=t.getUTCDay(),i=(a-r.weekStartsOn+8)%7||7;switch(e){case"c":return String(i);case"cc":return f(i,e.length);case"co":return n.ordinalNumber(i,{unit:"day"});case"ccc":return n.day(a,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(a,{width:"narrow",context:"standalone"});case"cccccc":return n.day(a,{width:"short",context:"standalone"});default:return n.day(a,{width:"wide",context:"standalone"})}},i:function(t,e,n){var r=t.getUTCDay(),a=0===r?7:r;switch(e){case"i":return String(a);case"ii":return f(a,e.length);case"io":return n.ordinalNumber(a,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(t,e,n){var r=t.getUTCHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(r,{width:"narrow",context:"formatting"});default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},b:function(t,e,n){var r,a=t.getUTCHours();switch(r=12===a?x.noon:0===a?x.midnight:a/12>=1?"pm":"am",e){case"b":case"bb":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(r,{width:"narrow",context:"formatting"});default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},B:function(t,e,n){var r,a=t.getUTCHours();switch(r=a>=17?x.evening:a>=12?x.afternoon:a>=4?x.morning:x.night,e){case"B":case"BB":case"BBB":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(r,{width:"narrow",context:"formatting"});default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},h:function(t,e,n){if("ho"===e){var r=t.getUTCHours()%12;return 0===r&&(r=12),n.ordinalNumber(r,{unit:"hour"})}return D.h(t,e)},H:function(t,e,n){return"Ho"===e?n.ordinalNumber(t.getUTCHours(),{unit:"hour"}):D.H(t,e)},K:function(t,e,n){var r=t.getUTCHours()%12;return"Ko"===e?n.ordinalNumber(r,{unit:"hour"}):f(r,e.length)},k:function(t,e,n){var r=t.getUTCHours();return 0===r&&(r=24),"ko"===e?n.ordinalNumber(r,{unit:"hour"}):f(r,e.length)},m:function(t,e,n){return"mo"===e?n.ordinalNumber(t.getUTCMinutes(),{unit:"minute"}):D.m(t,e)},s:function(t,e,n){return"so"===e?n.ordinalNumber(t.getUTCSeconds(),{unit:"second"}):D.s(t,e)},S:function(t,e){return D.S(t,e)},X:function(t,e,n,r){var a=(r._originalDate||t).getTimezoneOffset();if(0===a)return"Z";switch(e){case"X":return Q(a);case"XXXX":case"XX":return C(a);default:return C(a,":")}},x:function(t,e,n,r){var a=(r._originalDate||t).getTimezoneOffset();switch(e){case"x":return Q(a);case"xxxx":case"xx":return C(a);default:return C(a,":")}},O:function(t,e,n,r){var a=(r._originalDate||t).getTimezoneOffset();switch(e){case"O":case"OO":case"OOO":return"GMT"+$(a,":");default:return"GMT"+C(a,":")}},z:function(t,e,n,r){var a=(r._originalDate||t).getTimezoneOffset();switch(e){case"z":case"zz":case"zzz":return"GMT"+$(a,":");default:return"GMT"+C(a,":")}},t:function(t,e,n,r){var a=r._originalDate||t;return f(Math.floor(a.getTime()/1e3),e.length)},T:function(t,e,n,r){return f((r._originalDate||t).getTime(),e.length)}};function $(t,e){var n=t>0?"-":"+",r=Math.abs(t),a=Math.floor(r/60),i=r%60;if(0===i)return n+String(a);var o=e;return n+String(a)+o+f(i,2)}function Q(t,e){return t%60==0?(t>0?"-":"+")+f(Math.abs(t)/60,2):C(t,e)}function C(t,e){var n=e||"",r=t>0?"-":"+",a=Math.abs(t);return r+f(Math.floor(a/60),2)+n+f(a%60,2)}var j=function(t,e){switch(t){case"P":return e.date({width:"short"});case"PP":return e.date({width:"medium"});case"PPP":return e.date({width:"long"});default:return e.date({width:"full"})}},K=function(t,e){switch(t){case"p":return e.time({width:"short"});case"pp":return e.time({width:"medium"});case"ppp":return e.time({width:"long"});default:return e.time({width:"full"})}},ke=function(t,e){var n,r=t.match(/(P+)(p+)?/)||[],a=r[1],i=r[2];if(!i)return j(t,e);switch(a){case"P":n=e.dateTime({width:"short"});break;case"PP":n=e.dateTime({width:"medium"});break;case"PPP":n=e.dateTime({width:"long"});break;default:n=e.dateTime({width:"full"})}return n.replace("{{date}}",j(a,e)).replace("{{time}}",K(i,e))},We={p:K,P:ke},Ue=["D","DD"],Ye=["YY","YYYY"];function Ee(t){return-1!==Ue.indexOf(t)}function Ne(t){return-1!==Ye.indexOf(t)}function A(t,e,n){if("YYYY"===t)throw new RangeError("Use `yyyy` instead of `YYYY` (in `".concat(e,"`) for formatting years to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if("YY"===t)throw new RangeError("Use `yy` instead of `YY` (in `".concat(e,"`) for formatting years to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if("D"===t)throw new RangeError("Use `d` instead of `D` (in `".concat(e,"`) for formatting days of the month to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if("DD"===t)throw new RangeError("Use `dd` instead of `DD` (in `".concat(e,"`) for formatting days of the month to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"))}var Fe={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},qe=function(t,e,n){var r,a=Fe[t];return r="string"==typeof a?a:1===e?a.one:a.other.replace("{{count}}",e.toString()),null!=n&&n.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r};function I(t){return function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.width?String(e.width):t.defaultWidth;return t.formats[n]||t.formats[t.defaultWidth]}}var He={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},Ie={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},Re={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},Xe={date:I({formats:He,defaultWidth:"full"}),time:I({formats:Ie,defaultWidth:"full"}),dateTime:I({formats:Re,defaultWidth:"full"})},Le={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},$e=function(t,e,n,r){return Le[t]};function _(t){return function(e,n){var r;if("formatting"===(null!=n&&n.context?String(n.context):"standalone")&&t.formattingValues){var a=t.defaultFormattingWidth||t.defaultWidth,i=null!=n&&n.width?String(n.width):a;r=t.formattingValues[i]||t.formattingValues[a]}else{var o=t.defaultWidth,u=null!=n&&n.width?String(n.width):t.defaultWidth;r=t.values[u]||t.values[o]}return r[t.argumentCallback?t.argumentCallback(e):e]}}var Qe={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},je={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},Ae={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},Ge={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},Be={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},Ve={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},Je=function(t,e){var n=Number(t),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},ze={ordinalNumber:Je,era:_({values:Qe,defaultWidth:"wide"}),quarter:_({values:je,defaultWidth:"wide",argumentCallback:function(t){return t-1}}),month:_({values:Ae,defaultWidth:"wide"}),day:_({values:Ge,defaultWidth:"wide"}),dayPeriod:_({values:Be,defaultWidth:"wide",formattingValues:Ve,defaultFormattingWidth:"wide"})};function k(t){return function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=n.width,a=r&&t.matchPatterns[r]||t.matchPatterns[t.defaultMatchWidth],i=e.match(a);if(!i)return null;var o,u=i[0],s=r&&t.parsePatterns[r]||t.parsePatterns[t.defaultParseWidth],d=Array.isArray(s)?Ze(s,(function(t){return t.test(u)})):Ke(s,(function(t){return t.test(u)}));return o=t.valueCallback?t.valueCallback(d):d,{value:o=n.valueCallback?n.valueCallback(o):o,rest:e.slice(u.length)}}}function Ke(t,e){for(var n in t)if(t.hasOwnProperty(n)&&e(t[n]))return n}function Ze(t,e){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:{},r=e.match(t.matchPattern);if(!r)return null;var a=r[0],i=e.match(t.parsePattern);if(!i)return null;var o=t.valueCallback?t.valueCallback(i[0]):i[0];return{value:o=n.valueCallback?n.valueCallback(o):o,rest:e.slice(a.length)}}}var tt=/^(\d+)(th|st|nd|rd)?/i,rt=/\d+/i,at={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},nt={any:[/^b/i,/^(a|c)/i]},it={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},ot={any:[/1/i,/2/i,/3/i,/4/i]},ut={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},st={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},dt={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},lt={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},ft={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},ct={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},mt={ordinalNumber:et({matchPattern:tt,parsePattern:rt,valueCallback:function(t){return parseInt(t,10)}}),era:k({matchPatterns:at,defaultMatchWidth:"wide",parsePatterns:nt,defaultParseWidth:"any"}),quarter:k({matchPatterns:it,defaultMatchWidth:"wide",parsePatterns:ot,defaultParseWidth:"any",valueCallback:function(t){return t+1}}),month:k({matchPatterns:ut,defaultMatchWidth:"wide",parsePatterns:st,defaultParseWidth:"any"}),day:k({matchPatterns:dt,defaultMatchWidth:"wide",parsePatterns:lt,defaultParseWidth:"any"}),dayPeriod:k({matchPatterns:ft,defaultMatchWidth:"any",parsePatterns:ct,defaultParseWidth:"any"})},Z={code:"en-US",formatDistance:qe,formatLong:Xe,formatRelative:$e,localize:ze,match:mt,options:{weekStartsOn:0,firstWeekContainsDate:1}},ht=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,vt=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,gt=/^'([^]*?)'?$/,wt=/''/g,bt=/[a-zA-Z]/;function yt(t,e,n){var r,a,i,o,u,s,d,c,l,f,g;h(2,arguments);var v=String(e),w=W(),b=null!==(r=w.locale)&&void 0!==r?r:Z,y=P(null!==(a=null!==(i=null!==(o=void 0)&&void 0!==o?o:w.firstWeekContainsDate)&&void 0!==i?i:null===(u=w.locale)||void 0===u||null===(s=u.options)||void 0===s?void 0:s.firstWeekContainsDate)&&void 0!==a?a:1);if(!(y>=1&&y<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var p=P(null!==(d=null!==(c=null!==(l=void 0)&&void 0!==l?l:w.weekStartsOn)&&void 0!==c?c:null===(f=w.locale)||void 0===f||null===(g=f.options)||void 0===g?void 0:g.weekStartsOn)&&void 0!==d?d:0);if(!(p>=0&&p<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!b.localize)throw new RangeError("locale must contain localize property");if(!b.formatLong)throw new RangeError("locale must contain formatLong property");var T=m(t);if(!le(T))throw new RangeError("Invalid time value");var M=Te(T,X(T)),D={firstWeekContainsDate:y,weekStartsOn:p,locale:b,_originalDate:T};return v.match(vt).map((function(t){var e=t[0];return"p"===e||"P"===e?(0,We[e])(t,b.formatLong):t})).join("").match(ht).map((function(n){if("''"===n)return"'";var r=n[0];if("'"===r)return Tt(n);var a=_e[r];if(a)return Ne(n)&&A(n,e,String(t)),Ee(n)&&A(n,e,String(t)),a(M,n,b.localize,D);if(r.match(bt))throw new RangeError("Format string contains an unescaped latin alphabet character `"+r+"`");return n})).join("")}function Tt(t){var e=t.match(gt);return e?e[1].replace(wt,"'"):t}function ee(t,e){if(null==t)throw new TypeError("assign requires that input parameter not be null or undefined");for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t}function pt(t){return ee({},t)}var G=1440,Mt=2520,R=43200,Dt=86400;function Ot(t,e,n){var r,a;h(2,arguments);var i=W(),o=null!==(r=null!==(a=null==n?void 0:n.locale)&&void 0!==a?a:i.locale)&&void 0!==r?r:Z;if(!o.formatDistance)throw new RangeError("locale must contain formatDistance property");var u=E(t,e);if(isNaN(u))throw new RangeError("Invalid time value");var s,d,c=ee(pt(n),{addSuffix:!(null==n||!n.addSuffix),comparison:u});u>0?(s=m(e),d=m(t)):(s=m(t),d=m(e));var l,f=ye(d,s),g=(X(d)-X(s))/1e3,v=Math.round((f-g)/60);if(v<2)return null!=n&&n.includeSeconds?f<5?o.formatDistance("lessThanXSeconds",5,c):f<10?o.formatDistance("lessThanXSeconds",10,c):f<20?o.formatDistance("lessThanXSeconds",20,c):f<40?o.formatDistance("halfAMinute",0,c):f<60?o.formatDistance("lessThanXMinutes",1,c):o.formatDistance("xMinutes",1,c):0===v?o.formatDistance("lessThanXMinutes",1,c):o.formatDistance("xMinutes",v,c);if(v<45)return o.formatDistance("xMinutes",v,c);if(v<90)return o.formatDistance("aboutXHours",1,c);if(vt?yt(new Date(t),"dd-MM-yyyy HH:mm"):"",xt=t=>t?Ct(new Date(t),{addSuffix:!0}):"",B=({date:t})=>{const e=Pt(t),n=xt(t);return ie.jsx(oe,{title:e,children:n})};try{B.displayName="DisplayDate",B.__docgenInfo={description:"",displayName:"DisplayDate",props:{date:{defaultValue:null,description:"",name:"date",required:!1,type:{name:"DateType"}}}}}catch{}export{B as D,P as a,h as r,m as t}; \ No newline at end of file diff --git a/storybook-static/assets/DisplayDate.stories-BQ_hvTcN.js b/storybook-static/assets/DisplayDate.stories-JqUDoEET.js similarity index 91% rename from storybook-static/assets/DisplayDate.stories-BQ_hvTcN.js rename to storybook-static/assets/DisplayDate.stories-JqUDoEET.js index e0545a68b5..9b8dc5cb86 100644 --- a/storybook-static/assets/DisplayDate.stories-BQ_hvTcN.js +++ b/storybook-static/assets/DisplayDate.stories-JqUDoEET.js @@ -1 +1 @@ -import{j as h}from"./jsx-runtime-CexXSJP5.js";import{r as M,t as w,a as f,D as i}from"./DisplayDate-8pUkm3CJ.js";import"./index-BP8_t0zE.js";import"./typeof-QjJsDpFa.js";import"./theme-ui-components.esm-DCiJ1mMX.js";import"./parseProps-780b287c.browser.esm-DiCerVr_.js";import"./emotion-use-insertion-effect-with-fallbacks.browser.esm-UWD3gXM2.js";import"./theme-ui-core-jsx-runtime.browser.esm-CH0qhC10.js";import"./hoist-non-react-statics.cjs-CQI8syxn.js";function y(e,t){M(2,arguments);var s=w(e),o=f(t);if(isNaN(o))return new Date(NaN);if(!o)return s;var a=s.getDate(),r=new Date(s.getTime());return r.setMonth(s.getMonth()+o+1,0),a>=r.getDate()?r:(s.setFullYear(r.getFullYear(),r.getMonth(),a),s)}function v(e,t){return M(2,arguments),y(e,-f(t))}const E={title:"Components/DisplayDate",component:i},a=()=>h.jsx(i,{date:new Date}),o=()=>{const e=v(new Date,2);return h.jsx(i,{date:e})};var p,m,D,c,d,l;a.parameters={...a.parameters,docs:{...null==(p=a.parameters)?void 0:p.docs,source:{originalSource:"() => {\n return ;\n}",...null==(D=null==(m=a.parameters)?void 0:m.docs)?void 0:D.source}}},o.parameters={...o.parameters,docs:{...null==(c=o.parameters)?void 0:c.docs,source:{originalSource:"() => {\n const twoMonthsAGo = subMonths(new Date(), 2);\n return ;\n}",...null==(l=null==(d=o.parameters)?void 0:d.docs)?void 0:l.source}}};const F=["Default","TwoMonthsAGo"];export{a as Default,o as TwoMonthsAGo,F as __namedExportsOrder,E as default}; \ No newline at end of file +import{j as h}from"./jsx-runtime-CexXSJP5.js";import{r as M,t as w,a as f,D as i}from"./DisplayDate-6lOgCKow.js";import"./index-BP8_t0zE.js";import"./typeof-QjJsDpFa.js";import"./theme-ui-components.esm-BngKL4Rx.js";import"./parseProps-780b287c.browser.esm-DiCerVr_.js";import"./emotion-use-insertion-effect-with-fallbacks.browser.esm-UWD3gXM2.js";import"./theme-ui-core-jsx-runtime.browser.esm-CH0qhC10.js";import"./hoist-non-react-statics.cjs-CQI8syxn.js";function y(e,t){M(2,arguments);var s=w(e),o=f(t);if(isNaN(o))return new Date(NaN);if(!o)return s;var a=s.getDate(),r=new Date(s.getTime());return r.setMonth(s.getMonth()+o+1,0),a>=r.getDate()?r:(s.setFullYear(r.getFullYear(),r.getMonth(),a),s)}function v(e,t){return M(2,arguments),y(e,-f(t))}const E={title:"Components/DisplayDate",component:i},a=()=>h.jsx(i,{date:new Date}),o=()=>{const e=v(new Date,2);return h.jsx(i,{date:e})};var p,m,D,c,d,l;a.parameters={...a.parameters,docs:{...null==(p=a.parameters)?void 0:p.docs,source:{originalSource:"() => {\n return ;\n}",...null==(D=null==(m=a.parameters)?void 0:m.docs)?void 0:D.source}}},o.parameters={...o.parameters,docs:{...null==(c=o.parameters)?void 0:c.docs,source:{originalSource:"() => {\n const twoMonthsAGo = subMonths(new Date(), 2);\n return ;\n}",...null==(l=null==(d=o.parameters)?void 0:d.docs)?void 0:l.source}}};const F=["Default","TwoMonthsAGo"];export{a as Default,o as TwoMonthsAGo,F as __namedExportsOrder,E as default}; \ No newline at end of file diff --git a/storybook-static/assets/DocsRenderer-NNNQARDV-Bj41et9Q.js b/storybook-static/assets/DocsRenderer-NNNQARDV-CqtQUV00.js similarity index 91% rename from storybook-static/assets/DocsRenderer-NNNQARDV-Bj41et9Q.js rename to storybook-static/assets/DocsRenderer-NNNQARDV-CqtQUV00.js index f33870d5d5..d5ff7e6872 100644 --- a/storybook-static/assets/DocsRenderer-NNNQARDV-Bj41et9Q.js +++ b/storybook-static/assets/DocsRenderer-NNNQARDV-CqtQUV00.js @@ -1 +1 @@ -const __vite__mapDeps=(e,t=__vite__mapDeps,r=t.f||(t.f=["./index-gbZvCw43.js","./index-BP8_t0zE.js"]))=>e.map((e=>r[e]));import{_ as p}from"./iframe-B1GJESFe.js";import{a as e,r as c}from"./index-BP8_t0zE.js";import{r as u,u as l}from"./react-18-Bze0iTLm.js";import{C as h,A as E,H as d,D as x}from"./index-C6f7HM-L.js";import"../sb-preview/runtime.js";import"./index-BBRV8eG_.js";import"./emotion-use-insertion-effect-with-fallbacks.browser.esm-UWD3gXM2.js";import"./index-D-8MO0q_.js";import"./extends-CF3RwP-h.js";import"./setPrototypeOf-NYsvoNVB.js";import"./inheritsLoose-CdQPfY07.js";import"./isNativeReflectConstruct-gwnEYaHE.js";import"./index-EEBIeVPD.js";import"./index-DrFu-skq.js";var D={code:h,a:E,...d},_=class extends c.Component{constructor(){super(...arguments),this.state={hasError:!1}}static getDerivedStateFromError(){return{hasError:!0}}componentDidCatch(e){let{showException:t}=this.props;t(e)}render(){let{hasError:t}=this.state,{children:r}=this.props;return t?null:e.createElement(e.Fragment,null,r)}},k=class{constructor(){this.render=async(t,r,s)=>{let o={...D,...null==r?void 0:r.components},n=x;return new Promise(((i,a)=>{p((async()=>{const{MDXProvider:e}=await import("./index-gbZvCw43.js");return{MDXProvider:e}}),__vite__mapDeps([0,1]),import.meta.url).then((({MDXProvider:i})=>u(e.createElement(_,{showException:a,key:Math.random()},e.createElement(i,{components:o},e.createElement(n,{context:t,docsParameter:r}))),s))).then((()=>i()))}))},this.unmount=e=>{l(e)}}};export{k as DocsRenderer,D as defaultComponents}; \ No newline at end of file +const __vite__mapDeps=(e,t=__vite__mapDeps,r=t.f||(t.f=["./index-gbZvCw43.js","./index-BP8_t0zE.js"]))=>e.map((e=>r[e]));import{_ as p}from"./iframe-BgaKNRp_.js";import{a as e,r as c}from"./index-BP8_t0zE.js";import{r as u,u as l}from"./react-18-Bze0iTLm.js";import{C as h,A as E,H as d,D as x}from"./index-DXKNbq7A.js";import"../sb-preview/runtime.js";import"./index-BBRV8eG_.js";import"./emotion-use-insertion-effect-with-fallbacks.browser.esm-UWD3gXM2.js";import"./index-D-8MO0q_.js";import"./extends-CF3RwP-h.js";import"./setPrototypeOf-NYsvoNVB.js";import"./inheritsLoose-CdQPfY07.js";import"./isNativeReflectConstruct-gwnEYaHE.js";import"./index-EEBIeVPD.js";import"./index-DrFu-skq.js";var D={code:h,a:E,...d},_=class extends c.Component{constructor(){super(...arguments),this.state={hasError:!1}}static getDerivedStateFromError(){return{hasError:!0}}componentDidCatch(e){let{showException:t}=this.props;t(e)}render(){let{hasError:t}=this.state,{children:r}=this.props;return t?null:e.createElement(e.Fragment,null,r)}},k=class{constructor(){this.render=async(t,r,s)=>{let o={...D,...null==r?void 0:r.components},n=x;return new Promise(((i,a)=>{p((async()=>{const{MDXProvider:e}=await import("./index-gbZvCw43.js");return{MDXProvider:e}}),__vite__mapDeps([0,1]),import.meta.url).then((({MDXProvider:i})=>u(e.createElement(_,{showException:a,key:Math.random()},e.createElement(i,{components:o},e.createElement(n,{context:t,docsParameter:r}))),s))).then((()=>i()))}))},this.unmount=e=>{l(e)}}};export{k as DocsRenderer,D as defaultComponents}; \ No newline at end of file diff --git a/storybook-static/assets/DonationRequest-0J0Ydxwt.js b/storybook-static/assets/DonationRequest-CKaGKX0b.js similarity index 91% rename from storybook-static/assets/DonationRequest-0J0Ydxwt.js rename to storybook-static/assets/DonationRequest-CKaGKX0b.js index 6ff984f4fc..933c2b8a41 100644 --- a/storybook-static/assets/DonationRequest-0J0Ydxwt.js +++ b/storybook-static/assets/DonationRequest-CKaGKX0b.js @@ -1 +1 @@ -import{j as e}from"./jsx-runtime-CexXSJP5.js";import{B as p}from"./Button-B7QBvkxh.js";import{E as x}from"./ExternalLink-CHmx7fZ7.js";import{C as m,F as t,c as f,T as a}from"./theme-ui-components.esm-DCiJ1mMX.js";const h="https://donorbox.org/embed/onearmy?a=b",o="Support our work",g="Thank you for helping to make this possible",y="Download",i=n=>{const{body:i,callback:r,iframeSrc:s,imageURL:d,link:l}=n,c={allowpaymentrequest:"allowpaymentrequest",allow:"payment","data-donorbox-id":"DonorBox-f2","data-testid":"donationRequestIframe",frameBorder:"0",name:"donorbox",seamless:!0,src:s||h};return e.jsxs(e.Fragment,{children:[e.jsxs(m,{sx:{overflowY:"auto",scrollbarWidth:"thin",borderRadius:"4px 4px 0 0"},"data-cy":"DonationRequest","data-testid":"DonationRequest",children:[e.jsx("script",{src:"https://donorbox.org/widget.js","data-paypalexpress":"false"}),e.jsxs(t,{sx:{flexDirection:["column","row"]},children:[e.jsxs(t,{sx:{flexDirection:"column",flex:1},children:[d&&e.jsx(t,{sx:{display:["none","inline"]},children:e.jsx(f,{loading:"lazy",ratio:16/9,src:d,alt:o,"data-testid":"donationRequestImage"})}),e.jsxs(a,{sx:{padding:[2,4,6]},children:[e.jsx(a,{as:"h1",children:o}),e.jsx("p",{children:i}),e.jsx("p",{children:g})]})]}),e.jsx(t,{sx:{borderLeft:[0,"2px solid"],minHeight:"542px",width:["100%","350px","400px"]},children:e.jsx("iframe",{...c,loading:"lazy",style:{border:"0",overflow:"scroll",width:"100%"}})})]})]}),e.jsx(t,{sx:{backgroundColor:"offWhite",borderRadius:"0 0 4px 4px",flexDirection:["column","row"],padding:2,gap:2,justifyContent:"flex-end",alignItems:"center"},children:e.jsx(x,{href:l,onClick:r,"data-cy":"DonationRequestSkip","data-testid":"DonationRequestSkip",children:e.jsx(p,{children:y})})})]})};try{i.displayName="DonationRequest",i.__docgenInfo={description:"",displayName:"DonationRequest",props:{body:{defaultValue:null,description:"",name:"body",required:!0,type:{name:"string | undefined"}},callback:{defaultValue:null,description:"",name:"callback",required:!0,type:{name:"() => void"}},iframeSrc:{defaultValue:null,description:"",name:"iframeSrc",required:!0,type:{name:"string | undefined"}},imageURL:{defaultValue:null,description:"",name:"imageURL",required:!0,type:{name:"string | undefined"}},link:{defaultValue:null,description:"",name:"link",required:!0,type:{name:"string"}}}}}catch{}export{i as D}; \ No newline at end of file +import{j as e}from"./jsx-runtime-CexXSJP5.js";import{B as p}from"./Button-D4nxT_g_.js";import{E as x}from"./ExternalLink-DC09teyd.js";import{C as m,F as t,c as f,T as a}from"./theme-ui-components.esm-BngKL4Rx.js";const h="https://donorbox.org/embed/onearmy?a=b",o="Support our work",g="Thank you for helping to make this possible",y="Download",i=n=>{const{body:i,callback:r,iframeSrc:s,imageURL:d,link:l}=n,c={allowpaymentrequest:"allowpaymentrequest",allow:"payment","data-donorbox-id":"DonorBox-f2","data-testid":"donationRequestIframe",frameBorder:"0",name:"donorbox",seamless:!0,src:s||h};return e.jsxs(e.Fragment,{children:[e.jsxs(m,{sx:{overflowY:"auto",scrollbarWidth:"thin",borderRadius:"4px 4px 0 0"},"data-cy":"DonationRequest","data-testid":"DonationRequest",children:[e.jsx("script",{src:"https://donorbox.org/widget.js","data-paypalexpress":"false"}),e.jsxs(t,{sx:{flexDirection:["column","row"]},children:[e.jsxs(t,{sx:{flexDirection:"column",flex:1},children:[d&&e.jsx(t,{sx:{display:["none","inline"]},children:e.jsx(f,{loading:"lazy",ratio:16/9,src:d,alt:o,"data-testid":"donationRequestImage"})}),e.jsxs(a,{sx:{padding:[2,4,6]},children:[e.jsx(a,{as:"h1",children:o}),e.jsx("p",{children:i}),e.jsx("p",{children:g})]})]}),e.jsx(t,{sx:{borderLeft:[0,"2px solid"],minHeight:"542px",width:["100%","350px","400px"]},children:e.jsx("iframe",{...c,loading:"lazy",style:{border:"0",overflow:"scroll",width:"100%"}})})]})]}),e.jsx(t,{sx:{backgroundColor:"offWhite",borderRadius:"0 0 4px 4px",flexDirection:["column","row"],padding:2,gap:2,justifyContent:"flex-end",alignItems:"center"},children:e.jsx(x,{href:l,onClick:r,"data-cy":"DonationRequestSkip","data-testid":"DonationRequestSkip",children:e.jsx(p,{children:y})})})]})};try{i.displayName="DonationRequest",i.__docgenInfo={description:"",displayName:"DonationRequest",props:{body:{defaultValue:null,description:"",name:"body",required:!0,type:{name:"string | undefined"}},callback:{defaultValue:null,description:"",name:"callback",required:!0,type:{name:"() => void"}},iframeSrc:{defaultValue:null,description:"",name:"iframeSrc",required:!0,type:{name:"string | undefined"}},imageURL:{defaultValue:null,description:"",name:"imageURL",required:!0,type:{name:"string | undefined"}},link:{defaultValue:null,description:"",name:"link",required:!0,type:{name:"string"}}}}}catch{}export{i as D}; \ No newline at end of file diff --git a/storybook-static/assets/DonationRequest.stories-qLdqat5A.js b/storybook-static/assets/DonationRequest.stories-BDG9oiLp.js similarity index 90% rename from storybook-static/assets/DonationRequest.stories-qLdqat5A.js rename to storybook-static/assets/DonationRequest.stories-BDG9oiLp.js index ac7cff7cf5..2225bff072 100644 --- a/storybook-static/assets/DonationRequest.stories-qLdqat5A.js +++ b/storybook-static/assets/DonationRequest.stories-BDG9oiLp.js @@ -1 +1 @@ -import{j as t}from"./jsx-runtime-CexXSJP5.js";import{D as n}from"./DonationRequest-0J0Ydxwt.js";import"./index-BP8_t0zE.js";import"./Button-B7QBvkxh.js";import"./Icon-BoVZOGVD.js";import"./emotion-styled.browser.esm-Dz2BNYeh.js";import"./extends-CF3RwP-h.js";import"./parseProps-780b287c.browser.esm-DiCerVr_.js";import"./emotion-use-insertion-effect-with-fallbacks.browser.esm-UWD3gXM2.js";import"./supporter-D7hp958O.js";import"./icon-arrow-down-CJeToCJe.js";import"./icon-star-active-ClN6U5FF.js";import"./theme-ui-core-jsx-runtime.browser.esm-CH0qhC10.js";import"./hoist-non-react-statics.cjs-CQI8syxn.js";import"./theme-ui-components.esm-DCiJ1mMX.js";import"./ExternalLink-CHmx7fZ7.js";const D={title:"Components/DonationRequest",component:n},o=()=>t.jsx("div",{style:{maxWidth:"1000px"},children:t.jsx(n,{body:"All of the content here is free. Your donation supports this library of Open Source recycling knowledge. Making it possible for everyone in the world to use it and start recycling.",callback:()=>{},iframeSrc:"https://donorbox.org/embed/ppcpdonor?language=en",imageURL:"https://images.unsplash.com/photo-1520222984843-df35ebc0f24d?ixlib=rb-1.2.1&q=80&fm=jpg&crop=entropy&cs=tinysrgb&w=1080&fit=max&ixid=eyJhcHBfaWQiOjF9",link:"https://bbc.co.uk/"})});var e,r,i;o.parameters={...o.parameters,docs:{...null==(e=o.parameters)?void 0:e.docs,source:{originalSource:'() =>
\n {}} iframeSrc="https://donorbox.org/embed/ppcpdonor?language=en" imageURL="https://images.unsplash.com/photo-1520222984843-df35ebc0f24d?ixlib=rb-1.2.1&q=80&fm=jpg&crop=entropy&cs=tinysrgb&w=1080&fit=max&ixid=eyJhcHBfaWQiOjF9" link="https://bbc.co.uk/" />\n
',...null==(i=null==(r=o.parameters)?void 0:r.docs)?void 0:i.source}}};const R=["Default"];export{o as Default,R as __namedExportsOrder,D as default}; \ No newline at end of file +import{j as t}from"./jsx-runtime-CexXSJP5.js";import{D as n}from"./DonationRequest-CKaGKX0b.js";import"./index-BP8_t0zE.js";import"./Button-D4nxT_g_.js";import"./Icon-BoVZOGVD.js";import"./emotion-styled.browser.esm-Dz2BNYeh.js";import"./extends-CF3RwP-h.js";import"./parseProps-780b287c.browser.esm-DiCerVr_.js";import"./emotion-use-insertion-effect-with-fallbacks.browser.esm-UWD3gXM2.js";import"./supporter-D7hp958O.js";import"./icon-arrow-down-CJeToCJe.js";import"./icon-star-active-ClN6U5FF.js";import"./theme-ui-core-jsx-runtime.browser.esm-CH0qhC10.js";import"./hoist-non-react-statics.cjs-CQI8syxn.js";import"./theme-ui-components.esm-BngKL4Rx.js";import"./ExternalLink-DC09teyd.js";const D={title:"Components/DonationRequest",component:n},o=()=>t.jsx("div",{style:{maxWidth:"1000px"},children:t.jsx(n,{body:"All of the content here is free. Your donation supports this library of Open Source recycling knowledge. Making it possible for everyone in the world to use it and start recycling.",callback:()=>{},iframeSrc:"https://donorbox.org/embed/ppcpdonor?language=en",imageURL:"https://images.unsplash.com/photo-1520222984843-df35ebc0f24d?ixlib=rb-1.2.1&q=80&fm=jpg&crop=entropy&cs=tinysrgb&w=1080&fit=max&ixid=eyJhcHBfaWQiOjF9",link:"https://bbc.co.uk/"})});var e,r,i;o.parameters={...o.parameters,docs:{...null==(e=o.parameters)?void 0:e.docs,source:{originalSource:'() =>
\n {}} iframeSrc="https://donorbox.org/embed/ppcpdonor?language=en" imageURL="https://images.unsplash.com/photo-1520222984843-df35ebc0f24d?ixlib=rb-1.2.1&q=80&fm=jpg&crop=entropy&cs=tinysrgb&w=1080&fit=max&ixid=eyJhcHBfaWQiOjF9" link="https://bbc.co.uk/" />\n
',...null==(i=null==(r=o.parameters)?void 0:r.docs)?void 0:i.source}}};const R=["Default"];export{o as Default,R as __namedExportsOrder,D as default}; \ No newline at end of file diff --git a/storybook-static/assets/DonationRequestModal-BNxPzf8m.js b/storybook-static/assets/DonationRequestModal-DTG05Bmq.js similarity index 89% rename from storybook-static/assets/DonationRequestModal-BNxPzf8m.js rename to storybook-static/assets/DonationRequestModal-DTG05Bmq.js index c56692b440..26e69ac0d9 100644 --- a/storybook-static/assets/DonationRequestModal-BNxPzf8m.js +++ b/storybook-static/assets/DonationRequestModal-DTG05Bmq.js @@ -1 +1 @@ -import{j as n}from"./jsx-runtime-CexXSJP5.js";import{D as m}from"./DonationRequest-0J0Ydxwt.js";import{M as p}from"./Modal-CNp0gEVS.js";const i=e=>{const{body:i,callback:a,iframeSrc:r,imageURL:d,isOpen:t,link:l,onDidDismiss:s}=e;return n.jsx(p,{onDidDismiss:s,isOpen:t,sx:{width:["500px","750px","1050px"],minWidth:"350px",border:"0 !important",background:"none !important"},children:n.jsx(m,{body:i,callback:a,iframeSrc:r,link:l,imageURL:d})})};try{i.displayName="DonationRequestModal",i.__docgenInfo={description:"",displayName:"DonationRequestModal",props:{body:{defaultValue:null,description:"",name:"body",required:!0,type:{name:"string | undefined"}},callback:{defaultValue:null,description:"",name:"callback",required:!0,type:{name:"() => void"}},imageURL:{defaultValue:null,description:"",name:"imageURL",required:!0,type:{name:"string | undefined"}},iframeSrc:{defaultValue:null,description:"",name:"iframeSrc",required:!0,type:{name:"string | undefined"}},isOpen:{defaultValue:null,description:"",name:"isOpen",required:!0,type:{name:"boolean"}},link:{defaultValue:null,description:"",name:"link",required:!0,type:{name:"string"}},onDidDismiss:{defaultValue:null,description:"",name:"onDidDismiss",required:!0,type:{name:"() => void"}}}}}catch{}export{i as D}; \ No newline at end of file +import{j as n}from"./jsx-runtime-CexXSJP5.js";import{D as m}from"./DonationRequest-CKaGKX0b.js";import{M as p}from"./Modal-DXxaFBTe.js";const i=e=>{const{body:i,callback:a,iframeSrc:r,imageURL:d,isOpen:t,link:l,onDidDismiss:s}=e;return n.jsx(p,{onDidDismiss:s,isOpen:t,sx:{width:["500px","750px","1050px"],minWidth:"350px",border:"0 !important",background:"none !important"},children:n.jsx(m,{body:i,callback:a,iframeSrc:r,link:l,imageURL:d})})};try{i.displayName="DonationRequestModal",i.__docgenInfo={description:"",displayName:"DonationRequestModal",props:{body:{defaultValue:null,description:"",name:"body",required:!0,type:{name:"string | undefined"}},callback:{defaultValue:null,description:"",name:"callback",required:!0,type:{name:"() => void"}},imageURL:{defaultValue:null,description:"",name:"imageURL",required:!0,type:{name:"string | undefined"}},iframeSrc:{defaultValue:null,description:"",name:"iframeSrc",required:!0,type:{name:"string | undefined"}},isOpen:{defaultValue:null,description:"",name:"isOpen",required:!0,type:{name:"boolean"}},link:{defaultValue:null,description:"",name:"link",required:!0,type:{name:"string"}},onDidDismiss:{defaultValue:null,description:"",name:"onDidDismiss",required:!0,type:{name:"() => void"}}}}}catch{}export{i as D}; \ No newline at end of file diff --git a/storybook-static/assets/DonationRequestModal.stories-CrO2izOz.js b/storybook-static/assets/DonationRequestModal.stories-CNv8wlCh.js similarity index 86% rename from storybook-static/assets/DonationRequestModal.stories-CrO2izOz.js rename to storybook-static/assets/DonationRequestModal.stories-CNv8wlCh.js index d4196c8ab4..ee54a66068 100644 --- a/storybook-static/assets/DonationRequestModal.stories-CrO2izOz.js +++ b/storybook-static/assets/DonationRequestModal.stories-CNv8wlCh.js @@ -1 +1 @@ -import{j as l}from"./jsx-runtime-CexXSJP5.js";import{r as c}from"./index-BP8_t0zE.js";import{D as s}from"./DonationRequestModal-BNxPzf8m.js";import"./DonationRequest-0J0Ydxwt.js";import"./Button-B7QBvkxh.js";import"./Icon-BoVZOGVD.js";import"./emotion-styled.browser.esm-Dz2BNYeh.js";import"./extends-CF3RwP-h.js";import"./parseProps-780b287c.browser.esm-DiCerVr_.js";import"./emotion-use-insertion-effect-with-fallbacks.browser.esm-UWD3gXM2.js";import"./supporter-D7hp958O.js";import"./icon-arrow-down-CJeToCJe.js";import"./icon-star-active-ClN6U5FF.js";import"./theme-ui-core-jsx-runtime.browser.esm-CH0qhC10.js";import"./hoist-non-react-statics.cjs-CQI8syxn.js";import"./theme-ui-components.esm-DCiJ1mMX.js";import"./ExternalLink-CHmx7fZ7.js";import"./Modal-CNp0gEVS.js";import"./index-BBRV8eG_.js";import"./index-Snk9MO9S.js";const v={title:"Components/DonationRequestModal",component:s},o=()=>{const[o,e]=c.useState(!0);return l.jsx(s,{body:"All of the content here is free. Your donation supports this library of Open Source recycling knowledge. Making it possible for everyone in the world to use it and start recycling.",callback:()=>{},iframeSrc:"https://donorbox.org/embed/ppcpdonor?language=en",imageURL:"https://images.unsplash.com/photo-1520222984843-df35ebc0f24d?ixlib=rb-1.2.1&q=80&fm=jpg&crop=entropy&cs=tinysrgb&w=1080&fit=max&ixid=eyJhcHBfaWQiOjF9",isOpen:o,link:"http://bbc.co.uk/",onDidDismiss:()=>e(!o)})};var e,r,n;o.parameters={...o.parameters,docs:{...null==(e=o.parameters)?void 0:e.docs,source:{originalSource:'() => {\n const [isModalOpen, setIsModalOpen] = useState(true);\n const toggleIsModalOpen = () => setIsModalOpen(!isModalOpen);\n const callback = () => {};\n const link = \'http://bbc.co.uk/\';\n return toggleIsModalOpen()} />;\n}',...null==(n=null==(r=o.parameters)?void 0:r.docs)?void 0:n.source}}};const A=["Default"];export{o as Default,A as __namedExportsOrder,v as default}; \ No newline at end of file +import{j as l}from"./jsx-runtime-CexXSJP5.js";import{r as c}from"./index-BP8_t0zE.js";import{D as s}from"./DonationRequestModal-DTG05Bmq.js";import"./DonationRequest-CKaGKX0b.js";import"./Button-D4nxT_g_.js";import"./Icon-BoVZOGVD.js";import"./emotion-styled.browser.esm-Dz2BNYeh.js";import"./extends-CF3RwP-h.js";import"./parseProps-780b287c.browser.esm-DiCerVr_.js";import"./emotion-use-insertion-effect-with-fallbacks.browser.esm-UWD3gXM2.js";import"./supporter-D7hp958O.js";import"./icon-arrow-down-CJeToCJe.js";import"./icon-star-active-ClN6U5FF.js";import"./theme-ui-core-jsx-runtime.browser.esm-CH0qhC10.js";import"./hoist-non-react-statics.cjs-CQI8syxn.js";import"./theme-ui-components.esm-BngKL4Rx.js";import"./ExternalLink-DC09teyd.js";import"./Modal-DXxaFBTe.js";import"./index-BBRV8eG_.js";import"./index-Snk9MO9S.js";const v={title:"Components/DonationRequestModal",component:s},o=()=>{const[o,e]=c.useState(!0);return l.jsx(s,{body:"All of the content here is free. Your donation supports this library of Open Source recycling knowledge. Making it possible for everyone in the world to use it and start recycling.",callback:()=>{},iframeSrc:"https://donorbox.org/embed/ppcpdonor?language=en",imageURL:"https://images.unsplash.com/photo-1520222984843-df35ebc0f24d?ixlib=rb-1.2.1&q=80&fm=jpg&crop=entropy&cs=tinysrgb&w=1080&fit=max&ixid=eyJhcHBfaWQiOjF9",isOpen:o,link:"http://bbc.co.uk/",onDidDismiss:()=>e(!o)})};var e,r,n;o.parameters={...o.parameters,docs:{...null==(e=o.parameters)?void 0:e.docs,source:{originalSource:'() => {\n const [isModalOpen, setIsModalOpen] = useState(true);\n const toggleIsModalOpen = () => setIsModalOpen(!isModalOpen);\n const callback = () => {};\n const link = \'http://bbc.co.uk/\';\n return toggleIsModalOpen()} />;\n}',...null==(n=null==(r=o.parameters)?void 0:r.docs)?void 0:n.source}}};const A=["Default"];export{o as Default,A as __namedExportsOrder,v as default}; \ No newline at end of file diff --git a/storybook-static/assets/DownloadButton-C_Yd3Qr5.js b/storybook-static/assets/DownloadButton-CbSDAvqa.js similarity index 97% rename from storybook-static/assets/DownloadButton-C_Yd3Qr5.js rename to storybook-static/assets/DownloadButton-CbSDAvqa.js index 99dd30b2d8..6eeb530e63 100644 --- a/storybook-static/assets/DownloadButton-C_Yd3Qr5.js +++ b/storybook-static/assets/DownloadButton-CbSDAvqa.js @@ -1 +1 @@ -import{j as e}from"./jsx-runtime-CexXSJP5.js";import{I as r}from"./Icon-BoVZOGVD.js";import{T as n}from"./Tooltip-B9mgSRkZ.js";import{F as i,T as v}from"./theme-ui-components.esm-DCiJ1mMX.js";const u=({glyph:a,isLoggedIn:l,label:u,onClick:o})=>e.jsxs(e.Fragment,{children:[e.jsxs(i,{p:2,mb:1,sx:{background:"accent.base",border:"2px solid black",justifyContent:"space-between",alignItems:"center",flexDirection:"row",maxWidth:"300px",borderRadius:1,cursor:"pointer"},onClick:o,"data-cy":"downloadButton","data-testid":"downloadButton","data-tooltip-id":"download-files","data-tooltip-content":l?"":"Login to download",children:[e.jsx(r,{size:24,glyph:a||"external-url",mr:3}),e.jsx(v,{sx:{flex:1,fontSize:1,color:"black"},mr:3,children:u||"Download files"})]}),e.jsx(n,{id:"download-files"})]});try{u.displayName="DownloadButton",u.__docgenInfo={description:"",displayName:"DownloadButton",props:{onClick:{defaultValue:null,description:"",name:"onClick",required:!0,type:{name:"() => void"}},isLoggedIn:{defaultValue:null,description:"",name:"isLoggedIn",required:!1,type:{name:"boolean"}},label:{defaultValue:null,description:"",name:"label",required:!1,type:{name:"string"}},glyph:{defaultValue:null,description:"",name:"glyph",required:!1,type:{name:"enum",value:[{value:'"map"'},{value:'"menu"'},{value:'"search"'},{value:'"time"'},{value:'"filter"'},{value:'"image"'},{value:'"view"'},{value:'"email"'},{value:'"step"'},{value:'"account-circle"'},{value:'"account"'},{value:'"add"'},{value:'"arrow-curved-bottom-right"'},{value:'"arrow-back"'},{value:'"arrow-down"'},{value:'"arrow-forward"'},{value:'"arrow-full-down"'},{value:'"arrow-full-up"'},{value:'"bazar"'},{value:'"check"'},{value:'"chevron-down"'},{value:'"chevron-left"'},{value:'"chevron-right"'},{value:'"chevron-up"'},{value:'"close"'},{value:'"comment"'},{value:'"contact"'},{value:'"discord"'},{value:'"delete"'},{value:'"difficulty"'},{value:'"download"'},{value:'"download-cloud"'},{value:'"edit"'},{value:'"email-outline"'},{value:'"employee"'},{value:'"external-link"'},{value:'"external-url"'},{value:'"facebook"'},{value:'"flag-unknown"'},{value:'"hide"'},{value:'"hyperlink"'},{value:'"impact"'},{value:'"instagram"'},{value:'"loading"'},{value:'"location-on"'},{value:'"lock"'},{value:'"machine"'},{value:'"mail-outline"'},{value:'"more-vert"'},{value:'"notifications"'},{value:'"patreon"'},{value:'"pdf"'},{value:'"plastic"'},{value:'"profile"'},{value:'"revenue"'},{value:'"show"'},{value:'"slack"'},{value:'"sliders"'},{value:'"social-media"'},{value:'"star"'},{value:'"star-active"'},{value:'"supporter"'},{value:'"thunderbolt"'},{value:'"thunderbolt-grey"'},{value:'"turned-in"'},{value:'"update"'},{value:'"upload"'},{value:'"useful"'},{value:'"verified"'},{value:'"volunteer"'},{value:'"website"'},{value:'"globe"'},{value:'"gps-location"'}]}}}}}catch{}export{u as D}; \ No newline at end of file +import{j as e}from"./jsx-runtime-CexXSJP5.js";import{I as r}from"./Icon-BoVZOGVD.js";import{T as n}from"./Tooltip-B9mgSRkZ.js";import{F as i,T as v}from"./theme-ui-components.esm-BngKL4Rx.js";const u=({glyph:a,isLoggedIn:l,label:u,onClick:o})=>e.jsxs(e.Fragment,{children:[e.jsxs(i,{p:2,mb:1,sx:{background:"accent.base",border:"2px solid black",justifyContent:"space-between",alignItems:"center",flexDirection:"row",maxWidth:"300px",borderRadius:1,cursor:"pointer"},onClick:o,"data-cy":"downloadButton","data-testid":"downloadButton","data-tooltip-id":"download-files","data-tooltip-content":l?"":"Login to download",children:[e.jsx(r,{size:24,glyph:a||"external-url",mr:3}),e.jsx(v,{sx:{flex:1,fontSize:1,color:"black"},mr:3,children:u||"Download files"})]}),e.jsx(n,{id:"download-files"})]});try{u.displayName="DownloadButton",u.__docgenInfo={description:"",displayName:"DownloadButton",props:{onClick:{defaultValue:null,description:"",name:"onClick",required:!0,type:{name:"() => void"}},isLoggedIn:{defaultValue:null,description:"",name:"isLoggedIn",required:!1,type:{name:"boolean"}},label:{defaultValue:null,description:"",name:"label",required:!1,type:{name:"string"}},glyph:{defaultValue:null,description:"",name:"glyph",required:!1,type:{name:"enum",value:[{value:'"map"'},{value:'"menu"'},{value:'"search"'},{value:'"time"'},{value:'"filter"'},{value:'"image"'},{value:'"view"'},{value:'"email"'},{value:'"step"'},{value:'"account-circle"'},{value:'"account"'},{value:'"add"'},{value:'"arrow-curved-bottom-right"'},{value:'"arrow-back"'},{value:'"arrow-down"'},{value:'"arrow-forward"'},{value:'"arrow-full-down"'},{value:'"arrow-full-up"'},{value:'"bazar"'},{value:'"check"'},{value:'"chevron-down"'},{value:'"chevron-left"'},{value:'"chevron-right"'},{value:'"chevron-up"'},{value:'"close"'},{value:'"comment"'},{value:'"contact"'},{value:'"discord"'},{value:'"delete"'},{value:'"difficulty"'},{value:'"download"'},{value:'"download-cloud"'},{value:'"edit"'},{value:'"email-outline"'},{value:'"employee"'},{value:'"external-link"'},{value:'"external-url"'},{value:'"facebook"'},{value:'"flag-unknown"'},{value:'"hide"'},{value:'"hyperlink"'},{value:'"impact"'},{value:'"instagram"'},{value:'"loading"'},{value:'"location-on"'},{value:'"lock"'},{value:'"machine"'},{value:'"mail-outline"'},{value:'"more-vert"'},{value:'"notifications"'},{value:'"patreon"'},{value:'"pdf"'},{value:'"plastic"'},{value:'"profile"'},{value:'"revenue"'},{value:'"show"'},{value:'"slack"'},{value:'"sliders"'},{value:'"social-media"'},{value:'"star"'},{value:'"star-active"'},{value:'"supporter"'},{value:'"thunderbolt"'},{value:'"thunderbolt-grey"'},{value:'"turned-in"'},{value:'"update"'},{value:'"upload"'},{value:'"useful"'},{value:'"verified"'},{value:'"volunteer"'},{value:'"website"'},{value:'"globe"'},{value:'"gps-location"'}]}}}}}catch{}export{u as D}; \ No newline at end of file diff --git a/storybook-static/assets/DownloadButton.stories-BYGgC8R9.js b/storybook-static/assets/DownloadButton.stories-BUbPQSwO.js similarity index 91% rename from storybook-static/assets/DownloadButton.stories-BYGgC8R9.js rename to storybook-static/assets/DownloadButton.stories-BUbPQSwO.js index cf2e84660c..5a2b2ebdb1 100644 --- a/storybook-static/assets/DownloadButton.stories-BYGgC8R9.js +++ b/storybook-static/assets/DownloadButton.stories-BUbPQSwO.js @@ -1 +1 @@ -import{j as i}from"./jsx-runtime-CexXSJP5.js";import{D as r}from"./DownloadButton-C_Yd3Qr5.js";import"./index-BP8_t0zE.js";import"./Icon-BoVZOGVD.js";import"./emotion-styled.browser.esm-Dz2BNYeh.js";import"./extends-CF3RwP-h.js";import"./parseProps-780b287c.browser.esm-DiCerVr_.js";import"./emotion-use-insertion-effect-with-fallbacks.browser.esm-UWD3gXM2.js";import"./supporter-D7hp958O.js";import"./icon-arrow-down-CJeToCJe.js";import"./icon-star-active-ClN6U5FF.js";import"./theme-ui-core-jsx-runtime.browser.esm-CH0qhC10.js";import"./hoist-non-react-statics.cjs-CQI8syxn.js";import"./Tooltip-B9mgSRkZ.js";import"./floating-ui.dom-DtcZXcvp.js";import"./theme-ui-components.esm-DCiJ1mMX.js";const y={title:"Components/DownloadButton",component:r},o=()=>i.jsx(r,{onClick:()=>{}}),t=()=>i.jsx(r,{onClick:()=>{},glyph:"download-cloud",label:"Hello there"});var e,s,a,m,l,p;o.parameters={...o.parameters,docs:{...null==(e=o.parameters)?void 0:e.docs,source:{originalSource:"() => {}} />",...null==(a=null==(s=o.parameters)?void 0:s.docs)?void 0:a.source}}},t.parameters={...t.parameters,docs:{...null==(m=t.parameters)?void 0:m.docs,source:{originalSource:'() => {}} glyph="download-cloud" label="Hello there" />',...null==(p=null==(l=t.parameters)?void 0:l.docs)?void 0:p.source}}};const E=["Default","CustomDetails"];export{t as CustomDetails,o as Default,E as __namedExportsOrder,y as default}; \ No newline at end of file +import{j as i}from"./jsx-runtime-CexXSJP5.js";import{D as r}from"./DownloadButton-CbSDAvqa.js";import"./index-BP8_t0zE.js";import"./Icon-BoVZOGVD.js";import"./emotion-styled.browser.esm-Dz2BNYeh.js";import"./extends-CF3RwP-h.js";import"./parseProps-780b287c.browser.esm-DiCerVr_.js";import"./emotion-use-insertion-effect-with-fallbacks.browser.esm-UWD3gXM2.js";import"./supporter-D7hp958O.js";import"./icon-arrow-down-CJeToCJe.js";import"./icon-star-active-ClN6U5FF.js";import"./theme-ui-core-jsx-runtime.browser.esm-CH0qhC10.js";import"./hoist-non-react-statics.cjs-CQI8syxn.js";import"./Tooltip-B9mgSRkZ.js";import"./floating-ui.dom-DtcZXcvp.js";import"./theme-ui-components.esm-BngKL4Rx.js";const y={title:"Components/DownloadButton",component:r},o=()=>i.jsx(r,{onClick:()=>{}}),t=()=>i.jsx(r,{onClick:()=>{},glyph:"download-cloud",label:"Hello there"});var e,s,a,m,l,p;o.parameters={...o.parameters,docs:{...null==(e=o.parameters)?void 0:e.docs,source:{originalSource:"() => {}} />",...null==(a=null==(s=o.parameters)?void 0:s.docs)?void 0:a.source}}},t.parameters={...t.parameters,docs:{...null==(m=t.parameters)?void 0:m.docs,source:{originalSource:'() => {}} glyph="download-cloud" label="Hello there" />',...null==(p=null==(l=t.parameters)?void 0:l.docs)?void 0:p.source}}};const E=["Default","CustomDetails"];export{t as CustomDetails,o as Default,E as __namedExportsOrder,y as default}; \ No newline at end of file diff --git a/storybook-static/assets/DownloadCounter-CpsPmH8s.js b/storybook-static/assets/DownloadCounter-BhwM3uCm.js similarity index 87% rename from storybook-static/assets/DownloadCounter-CpsPmH8s.js rename to storybook-static/assets/DownloadCounter-BhwM3uCm.js index d02a805352..6edb05b1da 100644 --- a/storybook-static/assets/DownloadCounter-CpsPmH8s.js +++ b/storybook-static/assets/DownloadCounter-BhwM3uCm.js @@ -1 +1 @@ -import{j as r}from"./jsx-runtime-CexXSJP5.js";import{T as n}from"./theme-ui-components.esm-DCiJ1mMX.js";const t=e=>new Intl.NumberFormat("en-US").format(e),e=({total:e})=>r.jsxs(n,{"data-cy":"file-download-counter",sx:{fontSize:1,color:"grey"},children:[t(e||0),1!==e?" downloads":" download"]});try{e.displayName="DownloadCounter",e.__docgenInfo={description:"",displayName:"DownloadCounter",props:{total:{defaultValue:null,description:"",name:"total",required:!0,type:{name:"number | undefined"}}}}}catch{}export{e as D}; \ No newline at end of file +import{j as r}from"./jsx-runtime-CexXSJP5.js";import{T as n}from"./theme-ui-components.esm-BngKL4Rx.js";const t=e=>new Intl.NumberFormat("en-US").format(e),e=({total:e})=>r.jsxs(n,{"data-cy":"file-download-counter",sx:{fontSize:1,color:"grey"},children:[t(e||0),1!==e?" downloads":" download"]});try{e.displayName="DownloadCounter",e.__docgenInfo={description:"",displayName:"DownloadCounter",props:{total:{defaultValue:null,description:"",name:"total",required:!0,type:{name:"number | undefined"}}}}}catch{}export{e as D}; \ No newline at end of file diff --git a/storybook-static/assets/DownloadCounter.stories-BHQsKB0E.js b/storybook-static/assets/DownloadCounter.stories-D-TQpB8D.js similarity index 90% rename from storybook-static/assets/DownloadCounter.stories-BHQsKB0E.js rename to storybook-static/assets/DownloadCounter.stories-D-TQpB8D.js index 4fd44120ea..3209664747 100644 --- a/storybook-static/assets/DownloadCounter.stories-BHQsKB0E.js +++ b/storybook-static/assets/DownloadCounter.stories-D-TQpB8D.js @@ -1 +1 @@ -import{j as a}from"./jsx-runtime-CexXSJP5.js";import{D as t}from"./DownloadCounter-CpsPmH8s.js";import"./index-BP8_t0zE.js";import"./theme-ui-components.esm-DCiJ1mMX.js";import"./parseProps-780b287c.browser.esm-DiCerVr_.js";import"./emotion-use-insertion-effect-with-fallbacks.browser.esm-UWD3gXM2.js";import"./theme-ui-core-jsx-runtime.browser.esm-CH0qhC10.js";import"./hoist-non-react-statics.cjs-CQI8syxn.js";const S={title:"Components/DownloadCounter",component:t},o=()=>a.jsx(t,{total:1888999}),r=()=>a.jsx(t,{total:1}),e=()=>a.jsx(t,{total:void 0});var s,n,m,p,c,d,u,i,l;o.parameters={...o.parameters,docs:{...null==(s=o.parameters)?void 0:s.docs,source:{originalSource:"() => ",...null==(m=null==(n=o.parameters)?void 0:n.docs)?void 0:m.source}}},r.parameters={...r.parameters,docs:{...null==(p=r.parameters)?void 0:p.docs,source:{originalSource:"() => ",...null==(d=null==(c=r.parameters)?void 0:c.docs)?void 0:d.source}}},e.parameters={...e.parameters,docs:{...null==(u=e.parameters)?void 0:u.docs,source:{originalSource:"() => ",...null==(l=null==(i=e.parameters)?void 0:i.docs)?void 0:l.source}}};const _=["Default","One","Zero"];export{o as Default,r as One,e as Zero,_ as __namedExportsOrder,S as default}; \ No newline at end of file +import{j as a}from"./jsx-runtime-CexXSJP5.js";import{D as t}from"./DownloadCounter-BhwM3uCm.js";import"./index-BP8_t0zE.js";import"./theme-ui-components.esm-BngKL4Rx.js";import"./parseProps-780b287c.browser.esm-DiCerVr_.js";import"./emotion-use-insertion-effect-with-fallbacks.browser.esm-UWD3gXM2.js";import"./theme-ui-core-jsx-runtime.browser.esm-CH0qhC10.js";import"./hoist-non-react-statics.cjs-CQI8syxn.js";const S={title:"Components/DownloadCounter",component:t},o=()=>a.jsx(t,{total:1888999}),r=()=>a.jsx(t,{total:1}),e=()=>a.jsx(t,{total:void 0});var s,n,m,p,c,d,u,i,l;o.parameters={...o.parameters,docs:{...null==(s=o.parameters)?void 0:s.docs,source:{originalSource:"() => ",...null==(m=null==(n=o.parameters)?void 0:n.docs)?void 0:m.source}}},r.parameters={...r.parameters,docs:{...null==(p=r.parameters)?void 0:p.docs,source:{originalSource:"() => ",...null==(d=null==(c=r.parameters)?void 0:c.docs)?void 0:d.source}}},e.parameters={...e.parameters,docs:{...null==(u=e.parameters)?void 0:u.docs,source:{originalSource:"() => ",...null==(l=null==(i=e.parameters)?void 0:i.docs)?void 0:l.source}}};const _=["Default","One","Zero"];export{o as Default,r as One,e as Zero,_ as __namedExportsOrder,S as default}; \ No newline at end of file diff --git a/storybook-static/assets/DownloadStaticFile-BGuyYeyj.js b/storybook-static/assets/DownloadStaticFile-CwDiAVJ3.js similarity index 92% rename from storybook-static/assets/DownloadStaticFile-BGuyYeyj.js rename to storybook-static/assets/DownloadStaticFile-CwDiAVJ3.js index 5b7ba6133c..89501481e1 100644 --- a/storybook-static/assets/DownloadStaticFile-BGuyYeyj.js +++ b/storybook-static/assets/DownloadStaticFile-CwDiAVJ3.js @@ -1 +1 @@ -import{j as o}from"./jsx-runtime-CexXSJP5.js";import{D as u}from"./DownloadButton-C_Yd3Qr5.js";import{E as m}from"./ExternalLink-CHmx7fZ7.js";import{I as f}from"./Icon-BoVZOGVD.js";import{T as w}from"./Tooltip-B9mgSRkZ.js";import{F as x,T as d}from"./theme-ui-components.esm-DCiJ1mMX.js";const s=e=>{const{file:n,glyph:i,size:l,redirectToSignIn:t}=e;return o.jsxs(o.Fragment,{children:[o.jsxs(x,{p:2,mb:1,sx:{borderRadius:1,border:"2px solid black",background:"accent.base",color:"black",justifyContent:"space-between",alignItems:"center",flexDirection:"row",width:"300px",cursor:"pointer"},onClick:()=>t&&t(),"data-tooltip-id":"login-download","data-tooltip-content":t?"Login to download":"",children:[o.jsx(f,{size:24,glyph:i,mr:3}),o.jsx(d,{sx:{flex:1,fontSize:1,whiteSpace:"nowrap",textOverflow:"ellipsis",overflow:"hidden"},mr:3,children:n.name}),o.jsx(d,{sx:{fontSize:1},children:l})]}),o.jsx(w,{id:"login-download"})]})},c=({file:e,allowDownload:n,handleClick:i,redirectToSignIn:l,forDonationRequest:t,isLoggedIn:r})=>{const a=g(e.size||0);if(!e)return null;const d=n&&e.downloadUrl&&!l;return o.jsxs(o.Fragment,{children:[d&&o.jsx(m,{m:1,onClick:()=>i&&i(),href:e.downloadUrl,download:e.name,style:{width:"300px",marginLeft:0},children:o.jsx(s,{file:e,glyph:"download-cloud",size:a})}),t&&o.jsx(u,{onClick:()=>i&&i(),isLoggedIn:r,label:`${e.name} (${a})`,glyph:"download-cloud"}),!d&&!t&&o.jsx(s,{file:e,glyph:"download-cloud",size:a,redirectToSignIn:l})]})},g=e=>{if(0===e)return"0 Bytes";const o=Number(Math.floor(Math.log(e)/Math.log(1024)));return(e/Math.pow(1024,o)).toPrecision(3)+" "+["Bytes","KB","MB","GB","TB"][o]};try{c.displayName="DownloadStaticFile",c.__docgenInfo={description:"",displayName:"DownloadStaticFile",props:{file:{defaultValue:null,description:"",name:"file",required:!0,type:{name:"{ name: string; size: number; downloadUrl?: string | undefined; }"}},forDonationRequest:{defaultValue:null,description:"",name:"forDonationRequest",required:!1,type:{name:"boolean"}},isLoggedIn:{defaultValue:null,description:"",name:"isLoggedIn",required:!1,type:{name:"boolean"}},allowDownload:{defaultValue:null,description:"",name:"allowDownload",required:!1,type:{name:"boolean"}},handleClick:{defaultValue:null,description:"",name:"handleClick",required:!1,type:{name:"(() => void)"}},redirectToSignIn:{defaultValue:null,description:"",name:"redirectToSignIn",required:!1,type:{name:"(() => Promise)"}}}}}catch{}export{c as D}; \ No newline at end of file +import{j as o}from"./jsx-runtime-CexXSJP5.js";import{D as u}from"./DownloadButton-CbSDAvqa.js";import{E as m}from"./ExternalLink-DC09teyd.js";import{I as f}from"./Icon-BoVZOGVD.js";import{T as w}from"./Tooltip-B9mgSRkZ.js";import{F as x,T as d}from"./theme-ui-components.esm-BngKL4Rx.js";const s=e=>{const{file:n,glyph:i,size:l,redirectToSignIn:t}=e;return o.jsxs(o.Fragment,{children:[o.jsxs(x,{p:2,mb:1,sx:{borderRadius:1,border:"2px solid black",background:"accent.base",color:"black",justifyContent:"space-between",alignItems:"center",flexDirection:"row",width:"300px",cursor:"pointer"},onClick:()=>t&&t(),"data-tooltip-id":"login-download","data-tooltip-content":t?"Login to download":"",children:[o.jsx(f,{size:24,glyph:i,mr:3}),o.jsx(d,{sx:{flex:1,fontSize:1,whiteSpace:"nowrap",textOverflow:"ellipsis",overflow:"hidden"},mr:3,children:n.name}),o.jsx(d,{sx:{fontSize:1},children:l})]}),o.jsx(w,{id:"login-download"})]})},c=({file:e,allowDownload:n,handleClick:i,redirectToSignIn:l,forDonationRequest:t,isLoggedIn:r})=>{const a=g(e.size||0);if(!e)return null;const d=n&&e.downloadUrl&&!l;return o.jsxs(o.Fragment,{children:[d&&o.jsx(m,{m:1,onClick:()=>i&&i(),href:e.downloadUrl,download:e.name,style:{width:"300px",marginLeft:0},children:o.jsx(s,{file:e,glyph:"download-cloud",size:a})}),t&&o.jsx(u,{onClick:()=>i&&i(),isLoggedIn:r,label:`${e.name} (${a})`,glyph:"download-cloud"}),!d&&!t&&o.jsx(s,{file:e,glyph:"download-cloud",size:a,redirectToSignIn:l})]})},g=e=>{if(0===e)return"0 Bytes";const o=Number(Math.floor(Math.log(e)/Math.log(1024)));return(e/Math.pow(1024,o)).toPrecision(3)+" "+["Bytes","KB","MB","GB","TB"][o]};try{c.displayName="DownloadStaticFile",c.__docgenInfo={description:"",displayName:"DownloadStaticFile",props:{file:{defaultValue:null,description:"",name:"file",required:!0,type:{name:"{ name: string; size: number; downloadUrl?: string | undefined; }"}},forDonationRequest:{defaultValue:null,description:"",name:"forDonationRequest",required:!1,type:{name:"boolean"}},isLoggedIn:{defaultValue:null,description:"",name:"isLoggedIn",required:!1,type:{name:"boolean"}},allowDownload:{defaultValue:null,description:"",name:"allowDownload",required:!1,type:{name:"boolean"}},handleClick:{defaultValue:null,description:"",name:"handleClick",required:!1,type:{name:"(() => void)"}},redirectToSignIn:{defaultValue:null,description:"",name:"redirectToSignIn",required:!1,type:{name:"(() => Promise)"}}}}}catch{}export{c as D}; \ No newline at end of file diff --git a/storybook-static/assets/DownloadStaticFile.stories-CEulzWP_.js b/storybook-static/assets/DownloadStaticFile.stories-DCoc6Hel.js similarity index 89% rename from storybook-static/assets/DownloadStaticFile.stories-CEulzWP_.js rename to storybook-static/assets/DownloadStaticFile.stories-DCoc6Hel.js index d4513c4cd6..fb29c4cb35 100644 --- a/storybook-static/assets/DownloadStaticFile.stories-CEulzWP_.js +++ b/storybook-static/assets/DownloadStaticFile.stories-DCoc6Hel.js @@ -1 +1 @@ -import{j as s}from"./jsx-runtime-CexXSJP5.js";import{D as t}from"./DownloadStaticFile-BGuyYeyj.js";import"./index-BP8_t0zE.js";import"./DownloadButton-C_Yd3Qr5.js";import"./Icon-BoVZOGVD.js";import"./emotion-styled.browser.esm-Dz2BNYeh.js";import"./extends-CF3RwP-h.js";import"./parseProps-780b287c.browser.esm-DiCerVr_.js";import"./emotion-use-insertion-effect-with-fallbacks.browser.esm-UWD3gXM2.js";import"./supporter-D7hp958O.js";import"./icon-arrow-down-CJeToCJe.js";import"./icon-star-active-ClN6U5FF.js";import"./theme-ui-core-jsx-runtime.browser.esm-CH0qhC10.js";import"./hoist-non-react-statics.cjs-CQI8syxn.js";import"./Tooltip-B9mgSRkZ.js";import"./floating-ui.dom-DtcZXcvp.js";import"./theme-ui-components.esm-DCiJ1mMX.js";import"./ExternalLink-CHmx7fZ7.js";const _={title:"Components/DownloadStaticFile",component:t},e=()=>s.jsx(t,{file:{name:"example",size:12e5,downloadUrl:"https://example.com"}}),o=()=>s.jsx(t,{file:{name:"example",size:12e5,downloadUrl:"https://example.com"},redirectToSignIn:async()=>{alert("Redirect to Sign In")}});var r,a,i,m,n,p;e.parameters={...e.parameters,docs:{...null==(r=e.parameters)?void 0:r.docs,source:{originalSource:"() => ",...null==(i=null==(a=e.parameters)?void 0:a.docs)?void 0:i.source}}},o.parameters={...o.parameters,docs:{...null==(m=o.parameters)?void 0:m.docs,source:{originalSource:"() => {\n alert('Redirect to Sign In');\n}} />",...null==(p=null==(n=o.parameters)?void 0:n.docs)?void 0:p.source}}};const y=["Default","LoggedOut"];export{e as Default,o as LoggedOut,y as __namedExportsOrder,_ as default}; \ No newline at end of file +import{j as s}from"./jsx-runtime-CexXSJP5.js";import{D as t}from"./DownloadStaticFile-CwDiAVJ3.js";import"./index-BP8_t0zE.js";import"./DownloadButton-CbSDAvqa.js";import"./Icon-BoVZOGVD.js";import"./emotion-styled.browser.esm-Dz2BNYeh.js";import"./extends-CF3RwP-h.js";import"./parseProps-780b287c.browser.esm-DiCerVr_.js";import"./emotion-use-insertion-effect-with-fallbacks.browser.esm-UWD3gXM2.js";import"./supporter-D7hp958O.js";import"./icon-arrow-down-CJeToCJe.js";import"./icon-star-active-ClN6U5FF.js";import"./theme-ui-core-jsx-runtime.browser.esm-CH0qhC10.js";import"./hoist-non-react-statics.cjs-CQI8syxn.js";import"./Tooltip-B9mgSRkZ.js";import"./floating-ui.dom-DtcZXcvp.js";import"./theme-ui-components.esm-BngKL4Rx.js";import"./ExternalLink-DC09teyd.js";const _={title:"Components/DownloadStaticFile",component:t},e=()=>s.jsx(t,{file:{name:"example",size:12e5,downloadUrl:"https://example.com"}}),o=()=>s.jsx(t,{file:{name:"example",size:12e5,downloadUrl:"https://example.com"},redirectToSignIn:async()=>{alert("Redirect to Sign In")}});var r,a,i,m,n,p;e.parameters={...e.parameters,docs:{...null==(r=e.parameters)?void 0:r.docs,source:{originalSource:"() => ",...null==(i=null==(a=e.parameters)?void 0:a.docs)?void 0:i.source}}},o.parameters={...o.parameters,docs:{...null==(m=o.parameters)?void 0:m.docs,source:{originalSource:"() => {\n alert('Redirect to Sign In');\n}} />",...null==(p=null==(n=o.parameters)?void 0:n.docs)?void 0:p.source}}};const y=["Default","LoggedOut"];export{e as Default,o as LoggedOut,y as __namedExportsOrder,_ as default}; \ No newline at end of file diff --git a/storybook-static/assets/DownloadWithDonationAsk-DqdQCDXv.js b/storybook-static/assets/DownloadWithDonationAsk-GJ8cWUSg.js similarity index 67% rename from storybook-static/assets/DownloadWithDonationAsk-DqdQCDXv.js rename to storybook-static/assets/DownloadWithDonationAsk-GJ8cWUSg.js index 2bbf0a57dd..16b5675a14 100644 --- a/storybook-static/assets/DownloadWithDonationAsk-DqdQCDXv.js +++ b/storybook-static/assets/DownloadWithDonationAsk-GJ8cWUSg.js @@ -1 +1 @@ -import{j as e}from"./jsx-runtime-CexXSJP5.js";import{r as u}from"./index-BP8_t0zE.js";import{D as q}from"./DonationRequestModal-BNxPzf8m.js";import{D as m}from"./DownloadButton-C_Yd3Qr5.js";import{D as C}from"./DownloadCounter-CpsPmH8s.js";import{D as I}from"./DownloadStaticFile-BGuyYeyj.js";import{u as j}from"./index-BXxqJQdV.js";const p=i=>{const{body:n,iframeSrc:l,imageURL:a,isLoggedIn:o,handleClick:r,fileDownloadCount:t,fileLink:d,files:s}=i,[p,f]=u.useState(!1),[c,g]=u.useState(""),D=j(),y=()=>f(!p),x=null==s?void 0:s.filter((e=>null!==e&&"downloadUrl"in e));return e.jsxs(e.Fragment,{children:[e.jsx(q,{body:n,callback:()=>{r(),y()},iframeSrc:l,imageURL:a,isOpen:p,link:c,onDidDismiss:()=>y()}),!o&&e.jsx(m,{onClick:()=>D("/sign-in"),isLoggedIn:!1}),o&&e.jsxs(e.Fragment,{children:[d&&e.jsx(m,{onClick:()=>{g(d),y()},isLoggedIn:!0}),x&&x.map(((i,n)=>e.jsx(I,{file:i,handleClick:()=>{g(i.downloadUrl),y()},forDonationRequest:!0,isLoggedIn:!0},i?i.name:`file-${n}`)))]}),e.jsx(C,{total:t})]})};try{p.displayName="DownloadWithDonationAsk",p.__docgenInfo={description:"",displayName:"DownloadWithDonationAsk",props:{body:{defaultValue:null,description:"",name:"body",required:!0,type:{name:"string"}},handleClick:{defaultValue:null,description:"",name:"handleClick",required:!0,type:{name:"() => Promise"}},iframeSrc:{defaultValue:null,description:"",name:"iframeSrc",required:!0,type:{name:"string"}},imageURL:{defaultValue:null,description:"",name:"imageURL",required:!0,type:{name:"string"}},isLoggedIn:{defaultValue:null,description:"",name:"isLoggedIn",required:!0,type:{name:"boolean"}},fileDownloadCount:{defaultValue:null,description:"",name:"fileDownloadCount",required:!0,type:{name:"number"}},fileLink:{defaultValue:null,description:"",name:"fileLink",required:!1,type:{name:"string"}},files:{defaultValue:null,description:"",name:"files",required:!1,type:{name:"(IUploadedFileMeta | File | null)[]"}}}}}catch{}export{p as D}; \ No newline at end of file +import{j as e}from"./jsx-runtime-CexXSJP5.js";import{r as u}from"./index-BP8_t0zE.js";import{D as q}from"./DonationRequestModal-DTG05Bmq.js";import{D as m}from"./DownloadButton-CbSDAvqa.js";import{D as C}from"./DownloadCounter-BhwM3uCm.js";import{D as I}from"./DownloadStaticFile-CwDiAVJ3.js";import{u as j}from"./index-BXxqJQdV.js";const p=i=>{const{body:n,iframeSrc:a,imageURL:l,isLoggedIn:o,handleClick:t,fileDownloadCount:r,fileLink:d,files:s}=i,[p,f]=u.useState(!1),[c,g]=u.useState(""),D=j(),y=()=>f(!p),k=null==s?void 0:s.filter((e=>null!==e&&"downloadUrl"in e));return e.jsxs(e.Fragment,{children:[e.jsx(q,{body:n,callback:()=>{t(),y()},iframeSrc:a,imageURL:l,isOpen:p,link:c,onDidDismiss:()=>y()}),!o&&e.jsx(m,{onClick:()=>D("/sign-in"),isLoggedIn:!1}),o&&e.jsxs(e.Fragment,{children:[d&&e.jsx(m,{onClick:()=>{g(d),y()},isLoggedIn:!0}),k&&k.map(((i,n)=>e.jsx(I,{file:i,handleClick:()=>{g(i.downloadUrl),y()},forDonationRequest:!0,isLoggedIn:!0},i?i.name:`file-${n}`)))]}),e.jsx(C,{total:r})]})};try{p.displayName="DownloadWithDonationAsk",p.__docgenInfo={description:"",displayName:"DownloadWithDonationAsk",props:{body:{defaultValue:null,description:"",name:"body",required:!0,type:{name:"string"}},handleClick:{defaultValue:null,description:"",name:"handleClick",required:!0,type:{name:"() => Promise"}},iframeSrc:{defaultValue:null,description:"",name:"iframeSrc",required:!0,type:{name:"string"}},imageURL:{defaultValue:null,description:"",name:"imageURL",required:!0,type:{name:"string"}},isLoggedIn:{defaultValue:null,description:"",name:"isLoggedIn",required:!0,type:{name:"boolean"}},fileDownloadCount:{defaultValue:null,description:"",name:"fileDownloadCount",required:!0,type:{name:"number"}},fileLink:{defaultValue:null,description:"",name:"fileLink",required:!1,type:{name:"string"}},files:{defaultValue:null,description:"",name:"files",required:!1,type:{name:"(IUploadedFileMeta | File | null)[]"}}}}}catch{}export{p as D}; \ No newline at end of file diff --git a/storybook-static/assets/DownloadWithDonationAsk.stories-HWN8n_K3.js b/storybook-static/assets/DownloadWithDonationAsk.stories-DIpA5rCG.js similarity index 76% rename from storybook-static/assets/DownloadWithDonationAsk.stories-HWN8n_K3.js rename to storybook-static/assets/DownloadWithDonationAsk.stories-DIpA5rCG.js index accef5494f..5bdbe4e4cf 100644 --- a/storybook-static/assets/DownloadWithDonationAsk.stories-HWN8n_K3.js +++ b/storybook-static/assets/DownloadWithDonationAsk.stories-DIpA5rCG.js @@ -1 +1 @@ -import{j as n}from"./jsx-runtime-CexXSJP5.js";import{D as r}from"./DownloadWithDonationAsk-DqdQCDXv.js";import"./index-BP8_t0zE.js";import"./DonationRequestModal-BNxPzf8m.js";import"./DonationRequest-0J0Ydxwt.js";import"./Button-B7QBvkxh.js";import"./Icon-BoVZOGVD.js";import"./emotion-styled.browser.esm-Dz2BNYeh.js";import"./extends-CF3RwP-h.js";import"./parseProps-780b287c.browser.esm-DiCerVr_.js";import"./emotion-use-insertion-effect-with-fallbacks.browser.esm-UWD3gXM2.js";import"./supporter-D7hp958O.js";import"./icon-arrow-down-CJeToCJe.js";import"./icon-star-active-ClN6U5FF.js";import"./theme-ui-core-jsx-runtime.browser.esm-CH0qhC10.js";import"./hoist-non-react-statics.cjs-CQI8syxn.js";import"./theme-ui-components.esm-DCiJ1mMX.js";import"./ExternalLink-CHmx7fZ7.js";import"./Modal-CNp0gEVS.js";import"./index-BBRV8eG_.js";import"./index-Snk9MO9S.js";import"./DownloadButton-C_Yd3Qr5.js";import"./Tooltip-B9mgSRkZ.js";import"./floating-ui.dom-DtcZXcvp.js";import"./DownloadCounter-CpsPmH8s.js";import"./DownloadStaticFile-BGuyYeyj.js";import"./index-BXxqJQdV.js";const H={title:"Components/DownloadWithDonationAsk",component:r},d={body:"Body Text for the donation request",iframeSrc:"https://donorbox.org/embed/ppcpdonor?language=en",imageURL:"https://images.unsplash.com/photo-1520222984843-df35ebc0f24d?ixlib=rb-1.2.1&q=80&fm=jpg&crop=entropy&cs=tinysrgb&w=1080&fit=max&ixid=eyJhcHBfaWQiOjF9",fileDownloadCount:45,fileLink:"https://example.com",handleClick:async()=>{alert("Clicked")},files:[]},o=()=>n.jsx(r,{isLoggedIn:!0,...d}),t=()=>n.jsx(r,{isLoggedIn:!1,...d});var i,e,s,p,a,m;o.parameters={...o.parameters,docs:{...null==(i=o.parameters)?void 0:i.docs,source:{originalSource:"() => ",...null==(s=null==(e=o.parameters)?void 0:e.docs)?void 0:s.source}}},t.parameters={...t.parameters,docs:{...null==(p=t.parameters)?void 0:p.docs,source:{originalSource:"() => ",...null==(m=null==(a=t.parameters)?void 0:a.docs)?void 0:m.source}}};const J=["Default","LoggedOut"];export{o as Default,t as LoggedOut,J as __namedExportsOrder,H as default}; \ No newline at end of file +import{j as n}from"./jsx-runtime-CexXSJP5.js";import{D as r}from"./DownloadWithDonationAsk-GJ8cWUSg.js";import"./index-BP8_t0zE.js";import"./DonationRequestModal-DTG05Bmq.js";import"./DonationRequest-CKaGKX0b.js";import"./Button-D4nxT_g_.js";import"./Icon-BoVZOGVD.js";import"./emotion-styled.browser.esm-Dz2BNYeh.js";import"./extends-CF3RwP-h.js";import"./parseProps-780b287c.browser.esm-DiCerVr_.js";import"./emotion-use-insertion-effect-with-fallbacks.browser.esm-UWD3gXM2.js";import"./supporter-D7hp958O.js";import"./icon-arrow-down-CJeToCJe.js";import"./icon-star-active-ClN6U5FF.js";import"./theme-ui-core-jsx-runtime.browser.esm-CH0qhC10.js";import"./hoist-non-react-statics.cjs-CQI8syxn.js";import"./theme-ui-components.esm-BngKL4Rx.js";import"./ExternalLink-DC09teyd.js";import"./Modal-DXxaFBTe.js";import"./index-BBRV8eG_.js";import"./index-Snk9MO9S.js";import"./DownloadButton-CbSDAvqa.js";import"./Tooltip-B9mgSRkZ.js";import"./floating-ui.dom-DtcZXcvp.js";import"./DownloadCounter-BhwM3uCm.js";import"./DownloadStaticFile-CwDiAVJ3.js";import"./index-BXxqJQdV.js";const H={title:"Components/DownloadWithDonationAsk",component:r},d={body:"Body Text for the donation request",iframeSrc:"https://donorbox.org/embed/ppcpdonor?language=en",imageURL:"https://images.unsplash.com/photo-1520222984843-df35ebc0f24d?ixlib=rb-1.2.1&q=80&fm=jpg&crop=entropy&cs=tinysrgb&w=1080&fit=max&ixid=eyJhcHBfaWQiOjF9",fileDownloadCount:45,fileLink:"https://example.com",handleClick:async()=>{alert("Clicked")},files:[]},o=()=>n.jsx(r,{isLoggedIn:!0,...d}),t=()=>n.jsx(r,{isLoggedIn:!1,...d});var i,e,s,p,a,m;o.parameters={...o.parameters,docs:{...null==(i=o.parameters)?void 0:i.docs,source:{originalSource:"() => ",...null==(s=null==(e=o.parameters)?void 0:e.docs)?void 0:s.source}}},t.parameters={...t.parameters,docs:{...null==(p=t.parameters)?void 0:p.docs,source:{originalSource:"() => ",...null==(m=null==(a=t.parameters)?void 0:a.docs)?void 0:m.source}}};const J=["Default","LoggedOut"];export{o as Default,t as LoggedOut,J as __namedExportsOrder,H as default}; \ No newline at end of file diff --git a/storybook-static/assets/EditComment-DY_6Q1TM.js b/storybook-static/assets/EditComment-Cc0tE0_Q.js similarity index 96% rename from storybook-static/assets/EditComment-DY_6Q1TM.js rename to storybook-static/assets/EditComment-Cc0tE0_Q.js index 27114e63e1..06305c7ea9 100644 --- a/storybook-static/assets/EditComment-DY_6Q1TM.js +++ b/storybook-static/assets/EditComment-Cc0tE0_Q.js @@ -1 +1 @@ -import{j as ie}from"./jsx-runtime-CexXSJP5.js";import{_ as q}from"./extends-CF3RwP-h.js";import{_ as he}from"./objectWithoutPropertiesLoose-CAYKN5F1.js";import{r as W,a as me}from"./index-BP8_t0zE.js";import{c as Ke,b as We}from"./index.esm-D0u3ndg0.js";import{B as Ee}from"./Button-B7QBvkxh.js";import{F as Te}from"./FieldTextarea-msSeWkcr.js";import{F as Ve,h as He}from"./theme-ui-components.esm-DCiJ1mMX.js";var ge={},Ye=/[.[\]]+/,Pe=function(e){if(null==e||!e.length)return[];if("string"!=typeof e)throw new Error("toPath() expects a string");return null==ge[e]&&(ge[e]=e.split(Ye).filter(Boolean)),ge[e]},j=function(e,t){for(var i=Pe(t),r=e,n=0;n=r.length)return n;var u=r[i];if(isNaN(u)){var o;if(null==t){var s,l=e(void 0,i+1,r,n,a);return void 0===l?void 0:((s={})[u]=l,s)}if(Array.isArray(t))throw new Error("Cannot set a non-numeric property on an array");var d=e(t[u],i+1,r,n,a);if(void 0===d){var c=Object.keys(t).length;if(void 0===t[u]&&0===c)return;return void 0!==t[u]&&c<=1?isNaN(r[i-1])||a?void 0:{}:(t[u],he(t,[u].map(Ge)))}return q({},t,((o={})[u]=d,o))}var f=Number(u);if(null==t){var m=e(void 0,i+1,r,n,a);if(void 0===m)return;var v=[];return v[f]=m,v}if(!Array.isArray(t))throw new Error("Cannot set a numeric property on an object");var b=e(t[f],i+1,r,n,a),S=[].concat(t);if(a&&void 0===b){if(S.splice(f,1),0===S.length)return}else S[f]=b;return S},H=function(e,t,i,r){if(void 0===r&&(r=!1),null==e)throw new Error("Cannot call setIn() with "+String(e)+" state");if(null==t)throw new Error("Cannot call setIn() with "+String(t)+" key");return Qe(e,0,Pe(t),i,r)},Oe="FINAL_FORM/form-error",ve="FINAL_FORM/array-error";function we(e,t){var i=e.errors,r=e.initialValues,n=e.lastSubmittedValues,a=e.submitErrors,u=e.submitFailed,o=e.submitSucceeded,s=e.submitting,l=e.values,d=t.active,c=t.blur,f=t.change,m=t.data,v=t.focus,b=t.modified,S=t.modifiedSinceLastSubmit,h=t.name,p=t.touched,g=t.validating,y=t.visited,E=j(l,h),F=j(i,h);F&&F[ve]&&(F=F[ve]);var O=a&&j(a,h),V=r&&j(r,h),k=t.isEqual(V,E),w=!F&&!O;return{active:d,blur:c,change:f,data:m,dirty:!k,dirtySinceLastSubmit:!(!n||t.isEqual(j(n,h),E)),error:F,focus:v,initial:V,invalid:!w,length:Array.isArray(E)?E.length:void 0,modified:b,modifiedSinceLastSubmit:S,name:h,pristine:k,submitError:O,submitFailed:u,submitSucceeded:o,submitting:s,touched:p,valid:w,value:E,visited:y,validating:g}}var Ne=["active","data","dirty","dirtySinceLastSubmit","error","initial","invalid","length","modified","modifiedSinceLastSubmit","pristine","submitError","submitFailed","submitSucceeded","submitting","touched","valid","value","visited","validating"],J=function(e,t){if(e===t)return!0;if("object"!=typeof e||!e||"object"!=typeof t||!t)return!1;var i=Object.keys(e),r=Object.keys(t);if(i.length!==r.length)return!1;for(var n=Object.prototype.hasOwnProperty.bind(t),a=0;a0,values:b}}function ze(e,t,i,r,n,a){var u=n(i,r,t,a);return!!u&&(e(u),!0)}function Re(e,t,i,r,n){var a=e.entries;Object.keys(a).forEach((function(e){var u=a[Number(e)];if(u){var o=u.subscription,s=u.subscriber,l=u.notified;ze(s,o,t,i,r,n||!l)&&(u.notified=!0)}}))}function rt(e){if(!e)throw new Error("No config specified");var t=e.debug,i=e.destroyOnUnregister,r=e.keepDirtyOnReinitialize,n=e.initialValues,a=e.mutators,u=e.onSubmit,o=e.validate,s=e.validateOnBlur;if(!u)throw new Error("No onSubmit function specified");var l={subscribers:{index:0,entries:{}},fieldSubscribers:{},fields:{},formState:{dirtySinceLastSubmit:!1,modifiedSinceLastSubmit:!1,errors:{},initialValues:n&&q({},n),invalid:!1,pristine:!0,submitting:!1,submitFailed:!1,submitSucceeded:!1,resetWhileSubmitting:!1,valid:!0,validating:0,values:n?q({},n):{}},lastFormState:void 0},d=0,c=!1,f=!1,m=!1,v=0,b={},S=function(e,t,i){var r=i(j(e.formState.values,t));e.formState.values=H(e.formState.values,t,r)||{}},h=function(e,t,i){if(e.fields[t]){var r,n;e.fields=q({},e.fields,((r={})[i]=q({},e.fields[t],{name:i,blur:function(){return L.blur(i)},change:function(e){return L.change(i,e)},focus:function(){return L.focus(i)},lastFieldState:void 0}),r)),delete e.fields[t],e.fieldSubscribers=q({},e.fieldSubscribers,((n={})[i]=e.fieldSubscribers[t],n)),delete e.fieldSubscribers[t];var a=j(e.formState.values,t);e.formState.values=H(e.formState.values,t,void 0)||{},e.formState.values=H(e.formState.values,i,a),delete e.lastFormState}},p=function(e){return function(){if(a){for(var t={formState:l.formState,fields:l.fields,fieldSubscribers:l.fieldSubscribers,lastFormState:l.lastFormState},i=arguments.length,r=new Array(i),n=0;n0,g=++v,E=Promise.all(h).then(function(e){return function(t){return delete b[e],t}}(g));p&&(b[g]=E);var F=function(){var e=q({},u?r.errors:{},m),t=function(t){a.forEach((function(r){if(i[r]){var a=j(m,r),s=j(e,r),l=y(n[r]).length,d=S[r];t(r,l&&d||o&&a||(a||u?void 0:s))}}))};t((function(t,i){e=H(e,t,i)||{}})),t((function(t,i){if(i&&i[ve]){var r=j(e,t),n=[].concat(r);n[ve]=i[ve],e=H(e,t,n)}})),J(r.errors,e)||(r.errors=e),r.error=m[Oe]};if(F(),t(),p){l.formState.validating++,t();var O=function(){l.formState.validating--,t()};E.then((function(){v>g||F()})).then(O,O)}}else t()},F=function(e){if(!d){var t=l.fields,i=l.fieldSubscribers,r=l.formState,n=q({},t),a=function(e){var t=n[e],a=we(r,t),u=t.lastFieldState;t.lastFieldState=a;var o=i[e];o&&Re(o,a,u,Ze,void 0===u)};e?a(e):Object.keys(n).forEach(a)}},O=function(){Object.keys(l.fields).forEach((function(e){l.fields[e].touched=!0}))},V=function(){var e=l.fields,t=l.formState,i=l.lastFormState,r=q({},e),n=Object.keys(r),a=!1,u=n.reduce((function(e,i){return!r[i].isEqual(j(t.values,i),j(t.initialValues||{},i))&&(a=!0,e[i]=!0),e}),{}),o=n.reduce((function(e,i){var n=t.lastSubmittedValues||{};return r[i].isEqual(j(t.values,i),j(n,i))||(e[i]=!0),e}),{});t.pristine=!a,t.dirtySinceLastSubmit=!(!t.lastSubmittedValues||!Object.values(o).some((function(e){return e}))),t.modifiedSinceLastSubmit=!(!t.lastSubmittedValues||!Object.keys(r).some((function(e){return r[e].modifiedSinceLastSubmit}))),t.valid=!(t.error||t.submitError||ue(t.errors)||t.submitErrors&&ue(t.submitErrors));var s=it(t),d=n.reduce((function(e,t){return e.modified[t]=r[t].modified,e.touched[t]=r[t].touched,e.visited[t]=r[t].visited,e}),{modified:{},touched:{},visited:{}}),c=d.modified,f=d.touched,m=d.visited;return s.dirtyFields=i&&J(i.dirtyFields,u)?i.dirtyFields:u,s.dirtyFieldsSinceLastSubmit=i&&J(i.dirtyFieldsSinceLastSubmit,o)?i.dirtyFieldsSinceLastSubmit:o,s.modified=i&&J(i.modified,c)?i.modified:c,s.touched=i&&J(i.touched,f)?i.touched:f,s.visited=i&&J(i.visited,m)?i.visited:m,i&&J(i,s)?i:s},k=!1,w=!1,x=function e(){if(k)w=!0;else{if(k=!0,t&&t(V(),Object.keys(l.fields).reduce((function(e,t){return e[t]=l.fields[t],e}),{})),!(d||c&&m)){var i=l.lastFormState,r=V();r!==i&&(l.lastFormState=r,Re(l.subscribers,r,i,Le))}k=!1,w&&(w=!1,e())}};E(void 0,(function(){x()}));var L={batch:function(e){d++,e(),d--,F(),x()},blur:function(e){var t=l.fields,i=l.formState,r=t[e];r&&(delete i.active,t[e]=q({},r,{active:!1,touched:!0}),s?E(e,(function(){F(),x()})):(F(),x()))},change:function(e,t){var i=l.fields,r=l.formState;if(j(r.values,e)!==t){S(l,e,(function(){return t}));var n=i[e];n&&(i[e]=q({},n,{modified:!0,modifiedSinceLastSubmit:!!r.lastSubmittedValues})),s?(F(),x()):E(e,(function(){F(),x()}))}},get destroyOnUnregister(){return!!i},set destroyOnUnregister(e){i=e},focus:function(e){var t=l.fields[e];t&&!t.active&&(l.formState.active=e,t.active=!0,t.visited=!0,F(),x())},mutators:g,getFieldState:function(e){var t=l.fields[e];return t&&t.lastFieldState},getRegisteredFields:function(){return Object.keys(l.fields)},getState:function(){return V()},initialize:function(e){var t=l.fields,i=l.formState,n=q({},t),a="function"==typeof e?e(i.values):e;r||(i.values=a);var u=r?Object.keys(n).reduce((function(e,t){return n[t].isEqual(j(i.values,t),j(i.initialValues||{},t))||(e[t]=j(i.values,t)),e}),{}):{};i.initialValues=a,i.values=a,Object.keys(u).forEach((function(e){i.values=H(i.values,e,u[e])})),E(void 0,(function(){F(),x()}))},isValidationPaused:function(){return c},pauseValidation:function(e){void 0===e&&(e=!0),c=!0,m=e},registerField:function(e,t,r,n){void 0===r&&(r={}),l.fieldSubscribers[e]||(l.fieldSubscribers[e]={index:0,entries:{}});var a=l.fieldSubscribers[e].index++;l.fieldSubscribers[e].entries[a]={subscriber:je(t),subscription:r,notified:!1},l.fields[e]||(l.fields[e]={active:!1,afterSubmit:n&&n.afterSubmit,beforeSubmit:n&&n.beforeSubmit,blur:function(){return L.blur(e)},change:function(t){return L.change(e,t)},data:n&&n.data||{},focus:function(){return L.focus(e)},isEqual:n&&n.isEqual||tt,lastFieldState:void 0,modified:!1,modifiedSinceLastSubmit:!1,name:e,touched:!1,valid:!0,validateFields:n&&n.validateFields,validators:{},validating:!1,visited:!1});var u=!1,o=n&&n.silent,s=function(){o?F(e):(x(),F())};if(n){u=!(!n.getValidator||!n.getValidator()),n.getValidator&&(l.fields[e].validators[a]=n.getValidator);var d=void 0===j(l.formState.values,e);void 0!==n.initialValue&&d&&(void 0===j(l.formState.values,e)||j(l.formState.values,e)===j(l.formState.initialValues,e))&&(l.formState.initialValues=H(l.formState.initialValues||{},e,n.initialValue),l.formState.values=H(l.formState.values,e,n.initialValue),E(void 0,s)),void 0!==n.defaultValue&&void 0===n.initialValue&&void 0===j(l.formState.initialValues,e)&&d&&(l.formState.values=H(l.formState.values,e,n.defaultValue))}return u?E(void 0,s):s(),function(){var t=!1;l.fields[e]&&(t=!(!l.fields[e].validators[a]||!l.fields[e].validators[a]()),delete l.fields[e].validators[a]);var r=!!l.fieldSubscribers[e];r&&delete l.fieldSubscribers[e].entries[a];var n=r&&!Object.keys(l.fieldSubscribers[e].entries).length;n&&(delete l.fieldSubscribers[e],delete l.fields[e],t&&(l.formState.errors=H(l.formState.errors,e,void 0)||{}),i&&(l.formState.values=H(l.formState.values,e,void 0,!0)||{})),o||(t?E(void 0,(function(){x(),F()})):n&&x())}},reset:function(e){void 0===e&&(e=l.formState.initialValues),l.formState.submitting&&(l.formState.resetWhileSubmitting=!0),l.formState.submitFailed=!1,l.formState.submitSucceeded=!1,delete l.formState.submitError,delete l.formState.submitErrors,delete l.formState.lastSubmittedValues,L.initialize(e||{})},resetFieldState:function(e){l.fields[e]=q({},l.fields[e],{active:!1,lastFieldState:void 0,modified:!1,touched:!1,valid:!0,validating:!1,visited:!1}),E(void 0,(function(){F(),x()}))},restart:function(e){void 0===e&&(e=l.formState.initialValues),L.batch((function(){for(var t in l.fields)L.resetFieldState(t),l.fields[t]=q({},l.fields[t],{active:!1,lastFieldState:void 0,modified:!1,modifiedSinceLastSubmit:!1,touched:!1,valid:!0,validating:!1,visited:!1});L.reset(e)}))},resumeValidation:function(){c=!1,m=!1,f&&E(void 0,(function(){F(),x()})),f=!1},setConfig:function(e,n){switch(e){case"debug":t=n;break;case"destroyOnUnregister":i=n;break;case"initialValues":L.initialize(n);break;case"keepDirtyOnReinitialize":r=n;break;case"mutators":a=n,n?(Object.keys(g).forEach((function(e){e in n||delete g[e]})),Object.keys(n).forEach((function(e){g[e]=p(e)}))):Object.keys(g).forEach((function(e){delete g[e]}));break;case"onSubmit":u=n;break;case"validate":o=n,E(void 0,(function(){F(),x()}));break;case"validateOnBlur":s=n;break;default:throw new Error("Unrecognised option "+e)}},submit:function(){var e=l.formState;if(!e.submitting){if(delete e.submitErrors,delete e.submitError,e.lastSubmittedValues=q({},e.values),l.formState.error||ue(l.formState.errors))return O(),l.formState.submitFailed=!0,x(),void F();var t=Object.keys(b);if(t.length)return void Promise.all(t.map((function(e){return b[Number(e)]}))).then(L.submit,console.error);var i=Object.keys(l.fields).some((function(e){return l.fields[e].beforeSubmit&&!1===l.fields[e].beforeSubmit()}));if(!i){var r,n=!1,a=function(t){e.submitting=!1;var i=e.resetWhileSubmitting;return i&&(e.resetWhileSubmitting=!1),t&&ue(t)?(e.submitFailed=!0,e.submitSucceeded=!1,e.submitErrors=t,e.submitError=t[Oe],O()):(i||(e.submitFailed=!1,e.submitSucceeded=!0),Object.keys(l.fields).forEach((function(e){return l.fields[e].afterSubmit&&l.fields[e].afterSubmit()}))),x(),F(),n=!0,r&&r(t),t};e.submitting=!0,e.submitFailed=!1,e.submitSucceeded=!1,e.lastSubmittedValues=q({},e.values),Object.keys(l.fields).forEach((function(e){return l.fields[e].modifiedSinceLastSubmit=!1}));var o=u(e.values,L,a);if(!n){if(o&&pe(o))return x(),F(),o.then(a,(function(e){throw a(),e}));if(u.length>=3)return x(),F(),new Promise((function(e){r=e}));a(o)}}}},subscribe:function(e,t){if(!e)throw new Error("No callback given.");if(!t)throw new Error("No subscription provided. What values do you want to listen to?");var i=je(e),r=l.subscribers,n=r.index++;r.entries[n]={subscriber:i,subscription:t,notified:!1};var a=V();return ze(i,t,a,a,Le,!0),function(){delete r.entries[n]}}};return L}function Ie(e,t,i){var r=e.render,n=e.children,a=e.component,u=he(e,["render","children","component"]);if(a)return W.createElement(a,Object.assign(t,u,{children:n,render:r}));if(r)return r(void 0===n?Object.assign(t,u):Object.assign(t,u,{children:n}));if("function"!=typeof n)throw new Error("Must specify either a render prop, a render function as children, or a component prop to "+i);return n(Object.assign(t,u))}function X(e,t,i){void 0===i&&(i=function(e,t){return e===t});var r=me.useRef(e);me.useEffect((function(){i(e,r.current)||(t(),r.current=e)}))}function at(e){var t=me.useRef();return t.current||(t.current=e()),t.current}var qe=function(e,t){if(e===t)return!0;if("object"!=typeof e||!e||"object"!=typeof t||!t)return!1;var i=Object.keys(e),r=Object.keys(t);if(i.length!==r.length)return!1;for(var n=Object.prototype.hasOwnProperty.bind(t),a=0;a component");return t}var vt=typeof window<"u"&&window.navigator&&window.navigator.product&&"ReactNative"===window.navigator.product,mt=function(e){var t=[];if(e)for(var i=0;i component");return Ie(q({children:a,component:u,ref:t},E),j,"Field("+v+")")}));const Ae=e=>{const{comment:t,isReply:i}=e,r=Ke({comment:We().required("Make sure this field is filled correctly")}),n=e=>null!=e&&e.trim()?void 0:"Comment cannot be blank";return ie.jsx(ft,{onSubmit:()=>{},initialValues:{comment:t},validate:async e=>{try{await r.validate(e,{abortEarly:!1})}catch(t){return t.inner.reduce(((e,t)=>({...e,[t.path]:t.message})),{})}},"data-cy":"EditCommentForm",render:({invalid:t,handleSubmit:r,values:a})=>{const u=t;return ie.jsxs(Ve,{as:"form",sx:{flexDirection:"column"},p:2,onSubmit:r,children:[ie.jsxs(He,{as:"label",htmlFor:"comment",sx:{marginBottom:"6px",fontSize:3},children:["Edit ",i?"Reply":"Comment"]}),ie.jsx(yt,{component:Te,"data-cy":"edit-comment",id:"comment",validate:n,name:"comment"}),ie.jsxs(Ve,{mt:4,ml:"auto",children:[ie.jsx(Ee,{type:"button",small:!0,mr:4,variant:"secondary",onClick:()=>null==e?void 0:e.handleCancel(),children:"Cancel"}),ie.jsx(Ee,{"data-cy":"edit-comment-submit","data-testid":"edit-comment-submit",type:"submit","aria-label":"Save changes",small:!0,disabled:u,onClick:()=>{(t=>{null!=t&&t.trim()&&(null==e||e.handleSubmit(t))})(a.comment)},children:"Save"})]})]})}})};try{Ae.displayName="EditComment",Ae.__docgenInfo={description:"",displayName:"EditComment",props:{comment:{defaultValue:null,description:"",name:"comment",required:!0,type:{name:"string"}},handleCancel:{defaultValue:null,description:"",name:"handleCancel",required:!0,type:{name:"() => void"}},handleSubmit:{defaultValue:null,description:"",name:"handleSubmit",required:!0,type:{name:"(commentText: string) => void"}},isReply:{defaultValue:null,description:"",name:"isReply",required:!0,type:{name:"boolean"}}}}}catch{}export{Ae as E}; \ No newline at end of file +import{j as ie}from"./jsx-runtime-CexXSJP5.js";import{_ as q}from"./extends-CF3RwP-h.js";import{_ as he}from"./objectWithoutPropertiesLoose-CAYKN5F1.js";import{r as W,a as me}from"./index-BP8_t0zE.js";import{c as Ke,b as We}from"./index.esm-D0u3ndg0.js";import{B as Ee}from"./Button-D4nxT_g_.js";import{F as Te}from"./FieldTextarea-oZDGU0lI.js";import{F as Ve,h as He}from"./theme-ui-components.esm-BngKL4Rx.js";var ge={},Ye=/[.[\]]+/,Pe=function(e){if(null==e||!e.length)return[];if("string"!=typeof e)throw new Error("toPath() expects a string");return null==ge[e]&&(ge[e]=e.split(Ye).filter(Boolean)),ge[e]},j=function(e,t){for(var i=Pe(t),r=e,n=0;n=r.length)return n;var u=r[i];if(isNaN(u)){var o;if(null==t){var s,l=e(void 0,i+1,r,n,a);return void 0===l?void 0:((s={})[u]=l,s)}if(Array.isArray(t))throw new Error("Cannot set a non-numeric property on an array");var d=e(t[u],i+1,r,n,a);if(void 0===d){var c=Object.keys(t).length;if(void 0===t[u]&&0===c)return;return void 0!==t[u]&&c<=1?isNaN(r[i-1])||a?void 0:{}:(t[u],he(t,[u].map(Ge)))}return q({},t,((o={})[u]=d,o))}var f=Number(u);if(null==t){var m=e(void 0,i+1,r,n,a);if(void 0===m)return;var v=[];return v[f]=m,v}if(!Array.isArray(t))throw new Error("Cannot set a numeric property on an object");var b=e(t[f],i+1,r,n,a),S=[].concat(t);if(a&&void 0===b){if(S.splice(f,1),0===S.length)return}else S[f]=b;return S},H=function(e,t,i,r){if(void 0===r&&(r=!1),null==e)throw new Error("Cannot call setIn() with "+String(e)+" state");if(null==t)throw new Error("Cannot call setIn() with "+String(t)+" key");return Qe(e,0,Pe(t),i,r)},Oe="FINAL_FORM/form-error",ve="FINAL_FORM/array-error";function we(e,t){var i=e.errors,r=e.initialValues,n=e.lastSubmittedValues,a=e.submitErrors,u=e.submitFailed,o=e.submitSucceeded,s=e.submitting,l=e.values,d=t.active,c=t.blur,f=t.change,m=t.data,v=t.focus,b=t.modified,S=t.modifiedSinceLastSubmit,h=t.name,p=t.touched,g=t.validating,y=t.visited,E=j(l,h),F=j(i,h);F&&F[ve]&&(F=F[ve]);var O=a&&j(a,h),V=r&&j(r,h),w=t.isEqual(V,E),k=!F&&!O;return{active:d,blur:c,change:f,data:m,dirty:!w,dirtySinceLastSubmit:!(!n||t.isEqual(j(n,h),E)),error:F,focus:v,initial:V,invalid:!k,length:Array.isArray(E)?E.length:void 0,modified:b,modifiedSinceLastSubmit:S,name:h,pristine:w,submitError:O,submitFailed:u,submitSucceeded:o,submitting:s,touched:p,valid:k,value:E,visited:y,validating:g}}var Ne=["active","data","dirty","dirtySinceLastSubmit","error","initial","invalid","length","modified","modifiedSinceLastSubmit","pristine","submitError","submitFailed","submitSucceeded","submitting","touched","valid","value","visited","validating"],J=function(e,t){if(e===t)return!0;if("object"!=typeof e||!e||"object"!=typeof t||!t)return!1;var i=Object.keys(e),r=Object.keys(t);if(i.length!==r.length)return!1;for(var n=Object.prototype.hasOwnProperty.bind(t),a=0;a0,values:b}}function ze(e,t,i,r,n,a){var u=n(i,r,t,a);return!!u&&(e(u),!0)}function Re(e,t,i,r,n){var a=e.entries;Object.keys(a).forEach((function(e){var u=a[Number(e)];if(u){var o=u.subscription,s=u.subscriber,l=u.notified;ze(s,o,t,i,r,n||!l)&&(u.notified=!0)}}))}function rt(e){if(!e)throw new Error("No config specified");var t=e.debug,i=e.destroyOnUnregister,r=e.keepDirtyOnReinitialize,n=e.initialValues,a=e.mutators,u=e.onSubmit,o=e.validate,s=e.validateOnBlur;if(!u)throw new Error("No onSubmit function specified");var l={subscribers:{index:0,entries:{}},fieldSubscribers:{},fields:{},formState:{dirtySinceLastSubmit:!1,modifiedSinceLastSubmit:!1,errors:{},initialValues:n&&q({},n),invalid:!1,pristine:!0,submitting:!1,submitFailed:!1,submitSucceeded:!1,resetWhileSubmitting:!1,valid:!0,validating:0,values:n?q({},n):{}},lastFormState:void 0},d=0,c=!1,f=!1,m=!1,v=0,b={},S=function(e,t,i){var r=i(j(e.formState.values,t));e.formState.values=H(e.formState.values,t,r)||{}},h=function(e,t,i){if(e.fields[t]){var r,n;e.fields=q({},e.fields,((r={})[i]=q({},e.fields[t],{name:i,blur:function(){return L.blur(i)},change:function(e){return L.change(i,e)},focus:function(){return L.focus(i)},lastFieldState:void 0}),r)),delete e.fields[t],e.fieldSubscribers=q({},e.fieldSubscribers,((n={})[i]=e.fieldSubscribers[t],n)),delete e.fieldSubscribers[t];var a=j(e.formState.values,t);e.formState.values=H(e.formState.values,t,void 0)||{},e.formState.values=H(e.formState.values,i,a),delete e.lastFormState}},p=function(e){return function(){if(a){for(var t={formState:l.formState,fields:l.fields,fieldSubscribers:l.fieldSubscribers,lastFormState:l.lastFormState},i=arguments.length,r=new Array(i),n=0;n0,g=++v,E=Promise.all(h).then(function(e){return function(t){return delete b[e],t}}(g));p&&(b[g]=E);var F=function(){var e=q({},u?r.errors:{},m),t=function(t){a.forEach((function(r){if(i[r]){var a=j(m,r),s=j(e,r),l=y(n[r]).length,d=S[r];t(r,l&&d||o&&a||(a||u?void 0:s))}}))};t((function(t,i){e=H(e,t,i)||{}})),t((function(t,i){if(i&&i[ve]){var r=j(e,t),n=[].concat(r);n[ve]=i[ve],e=H(e,t,n)}})),J(r.errors,e)||(r.errors=e),r.error=m[Oe]};if(F(),t(),p){l.formState.validating++,t();var O=function(){l.formState.validating--,t()};E.then((function(){v>g||F()})).then(O,O)}}else t()},F=function(e){if(!d){var t=l.fields,i=l.fieldSubscribers,r=l.formState,n=q({},t),a=function(e){var t=n[e],a=we(r,t),u=t.lastFieldState;t.lastFieldState=a;var o=i[e];o&&Re(o,a,u,Ze,void 0===u)};e?a(e):Object.keys(n).forEach(a)}},O=function(){Object.keys(l.fields).forEach((function(e){l.fields[e].touched=!0}))},V=function(){var e=l.fields,t=l.formState,i=l.lastFormState,r=q({},e),n=Object.keys(r),a=!1,u=n.reduce((function(e,i){return!r[i].isEqual(j(t.values,i),j(t.initialValues||{},i))&&(a=!0,e[i]=!0),e}),{}),o=n.reduce((function(e,i){var n=t.lastSubmittedValues||{};return r[i].isEqual(j(t.values,i),j(n,i))||(e[i]=!0),e}),{});t.pristine=!a,t.dirtySinceLastSubmit=!(!t.lastSubmittedValues||!Object.values(o).some((function(e){return e}))),t.modifiedSinceLastSubmit=!(!t.lastSubmittedValues||!Object.keys(r).some((function(e){return r[e].modifiedSinceLastSubmit}))),t.valid=!(t.error||t.submitError||ue(t.errors)||t.submitErrors&&ue(t.submitErrors));var s=it(t),d=n.reduce((function(e,t){return e.modified[t]=r[t].modified,e.touched[t]=r[t].touched,e.visited[t]=r[t].visited,e}),{modified:{},touched:{},visited:{}}),c=d.modified,f=d.touched,m=d.visited;return s.dirtyFields=i&&J(i.dirtyFields,u)?i.dirtyFields:u,s.dirtyFieldsSinceLastSubmit=i&&J(i.dirtyFieldsSinceLastSubmit,o)?i.dirtyFieldsSinceLastSubmit:o,s.modified=i&&J(i.modified,c)?i.modified:c,s.touched=i&&J(i.touched,f)?i.touched:f,s.visited=i&&J(i.visited,m)?i.visited:m,i&&J(i,s)?i:s},w=!1,k=!1,x=function e(){if(w)k=!0;else{if(w=!0,t&&t(V(),Object.keys(l.fields).reduce((function(e,t){return e[t]=l.fields[t],e}),{})),!(d||c&&m)){var i=l.lastFormState,r=V();r!==i&&(l.lastFormState=r,Re(l.subscribers,r,i,Le))}w=!1,k&&(k=!1,e())}};E(void 0,(function(){x()}));var L={batch:function(e){d++,e(),d--,F(),x()},blur:function(e){var t=l.fields,i=l.formState,r=t[e];r&&(delete i.active,t[e]=q({},r,{active:!1,touched:!0}),s?E(e,(function(){F(),x()})):(F(),x()))},change:function(e,t){var i=l.fields,r=l.formState;if(j(r.values,e)!==t){S(l,e,(function(){return t}));var n=i[e];n&&(i[e]=q({},n,{modified:!0,modifiedSinceLastSubmit:!!r.lastSubmittedValues})),s?(F(),x()):E(e,(function(){F(),x()}))}},get destroyOnUnregister(){return!!i},set destroyOnUnregister(e){i=e},focus:function(e){var t=l.fields[e];t&&!t.active&&(l.formState.active=e,t.active=!0,t.visited=!0,F(),x())},mutators:g,getFieldState:function(e){var t=l.fields[e];return t&&t.lastFieldState},getRegisteredFields:function(){return Object.keys(l.fields)},getState:function(){return V()},initialize:function(e){var t=l.fields,i=l.formState,n=q({},t),a="function"==typeof e?e(i.values):e;r||(i.values=a);var u=r?Object.keys(n).reduce((function(e,t){return n[t].isEqual(j(i.values,t),j(i.initialValues||{},t))||(e[t]=j(i.values,t)),e}),{}):{};i.initialValues=a,i.values=a,Object.keys(u).forEach((function(e){i.values=H(i.values,e,u[e])})),E(void 0,(function(){F(),x()}))},isValidationPaused:function(){return c},pauseValidation:function(e){void 0===e&&(e=!0),c=!0,m=e},registerField:function(e,t,r,n){void 0===r&&(r={}),l.fieldSubscribers[e]||(l.fieldSubscribers[e]={index:0,entries:{}});var a=l.fieldSubscribers[e].index++;l.fieldSubscribers[e].entries[a]={subscriber:je(t),subscription:r,notified:!1},l.fields[e]||(l.fields[e]={active:!1,afterSubmit:n&&n.afterSubmit,beforeSubmit:n&&n.beforeSubmit,blur:function(){return L.blur(e)},change:function(t){return L.change(e,t)},data:n&&n.data||{},focus:function(){return L.focus(e)},isEqual:n&&n.isEqual||tt,lastFieldState:void 0,modified:!1,modifiedSinceLastSubmit:!1,name:e,touched:!1,valid:!0,validateFields:n&&n.validateFields,validators:{},validating:!1,visited:!1});var u=!1,o=n&&n.silent,s=function(){o?F(e):(x(),F())};if(n){u=!(!n.getValidator||!n.getValidator()),n.getValidator&&(l.fields[e].validators[a]=n.getValidator);var d=void 0===j(l.formState.values,e);void 0!==n.initialValue&&d&&(void 0===j(l.formState.values,e)||j(l.formState.values,e)===j(l.formState.initialValues,e))&&(l.formState.initialValues=H(l.formState.initialValues||{},e,n.initialValue),l.formState.values=H(l.formState.values,e,n.initialValue),E(void 0,s)),void 0!==n.defaultValue&&void 0===n.initialValue&&void 0===j(l.formState.initialValues,e)&&d&&(l.formState.values=H(l.formState.values,e,n.defaultValue))}return u?E(void 0,s):s(),function(){var t=!1;l.fields[e]&&(t=!(!l.fields[e].validators[a]||!l.fields[e].validators[a]()),delete l.fields[e].validators[a]);var r=!!l.fieldSubscribers[e];r&&delete l.fieldSubscribers[e].entries[a];var n=r&&!Object.keys(l.fieldSubscribers[e].entries).length;n&&(delete l.fieldSubscribers[e],delete l.fields[e],t&&(l.formState.errors=H(l.formState.errors,e,void 0)||{}),i&&(l.formState.values=H(l.formState.values,e,void 0,!0)||{})),o||(t?E(void 0,(function(){x(),F()})):n&&x())}},reset:function(e){void 0===e&&(e=l.formState.initialValues),l.formState.submitting&&(l.formState.resetWhileSubmitting=!0),l.formState.submitFailed=!1,l.formState.submitSucceeded=!1,delete l.formState.submitError,delete l.formState.submitErrors,delete l.formState.lastSubmittedValues,L.initialize(e||{})},resetFieldState:function(e){l.fields[e]=q({},l.fields[e],{active:!1,lastFieldState:void 0,modified:!1,touched:!1,valid:!0,validating:!1,visited:!1}),E(void 0,(function(){F(),x()}))},restart:function(e){void 0===e&&(e=l.formState.initialValues),L.batch((function(){for(var t in l.fields)L.resetFieldState(t),l.fields[t]=q({},l.fields[t],{active:!1,lastFieldState:void 0,modified:!1,modifiedSinceLastSubmit:!1,touched:!1,valid:!0,validating:!1,visited:!1});L.reset(e)}))},resumeValidation:function(){c=!1,m=!1,f&&E(void 0,(function(){F(),x()})),f=!1},setConfig:function(e,n){switch(e){case"debug":t=n;break;case"destroyOnUnregister":i=n;break;case"initialValues":L.initialize(n);break;case"keepDirtyOnReinitialize":r=n;break;case"mutators":a=n,n?(Object.keys(g).forEach((function(e){e in n||delete g[e]})),Object.keys(n).forEach((function(e){g[e]=p(e)}))):Object.keys(g).forEach((function(e){delete g[e]}));break;case"onSubmit":u=n;break;case"validate":o=n,E(void 0,(function(){F(),x()}));break;case"validateOnBlur":s=n;break;default:throw new Error("Unrecognised option "+e)}},submit:function(){var e=l.formState;if(!e.submitting){if(delete e.submitErrors,delete e.submitError,e.lastSubmittedValues=q({},e.values),l.formState.error||ue(l.formState.errors))return O(),l.formState.submitFailed=!0,x(),void F();var t=Object.keys(b);if(t.length)return void Promise.all(t.map((function(e){return b[Number(e)]}))).then(L.submit,console.error);var i=Object.keys(l.fields).some((function(e){return l.fields[e].beforeSubmit&&!1===l.fields[e].beforeSubmit()}));if(!i){var r,n=!1,a=function(t){e.submitting=!1;var i=e.resetWhileSubmitting;return i&&(e.resetWhileSubmitting=!1),t&&ue(t)?(e.submitFailed=!0,e.submitSucceeded=!1,e.submitErrors=t,e.submitError=t[Oe],O()):(i||(e.submitFailed=!1,e.submitSucceeded=!0),Object.keys(l.fields).forEach((function(e){return l.fields[e].afterSubmit&&l.fields[e].afterSubmit()}))),x(),F(),n=!0,r&&r(t),t};e.submitting=!0,e.submitFailed=!1,e.submitSucceeded=!1,e.lastSubmittedValues=q({},e.values),Object.keys(l.fields).forEach((function(e){return l.fields[e].modifiedSinceLastSubmit=!1}));var o=u(e.values,L,a);if(!n){if(o&&pe(o))return x(),F(),o.then(a,(function(e){throw a(),e}));if(u.length>=3)return x(),F(),new Promise((function(e){r=e}));a(o)}}}},subscribe:function(e,t){if(!e)throw new Error("No callback given.");if(!t)throw new Error("No subscription provided. What values do you want to listen to?");var i=je(e),r=l.subscribers,n=r.index++;r.entries[n]={subscriber:i,subscription:t,notified:!1};var a=V();return ze(i,t,a,a,Le,!0),function(){delete r.entries[n]}}};return L}function Ie(e,t,i){var r=e.render,n=e.children,a=e.component,u=he(e,["render","children","component"]);if(a)return W.createElement(a,Object.assign(t,u,{children:n,render:r}));if(r)return r(void 0===n?Object.assign(t,u):Object.assign(t,u,{children:n}));if("function"!=typeof n)throw new Error("Must specify either a render prop, a render function as children, or a component prop to "+i);return n(Object.assign(t,u))}function X(e,t,i){void 0===i&&(i=function(e,t){return e===t});var r=me.useRef(e);me.useEffect((function(){i(e,r.current)||(t(),r.current=e)}))}function at(e){var t=me.useRef();return t.current||(t.current=e()),t.current}var qe=function(e,t){if(e===t)return!0;if("object"!=typeof e||!e||"object"!=typeof t||!t)return!1;var i=Object.keys(e),r=Object.keys(t);if(i.length!==r.length)return!1;for(var n=Object.prototype.hasOwnProperty.bind(t),a=0;a component");return t}var vt=typeof window<"u"&&window.navigator&&window.navigator.product&&"ReactNative"===window.navigator.product,mt=function(e){var t=[];if(e)for(var i=0;i component");return Ie(q({children:a,component:u,ref:t},E),j,"Field("+v+")")}));const Ae=e=>{const{comment:t,isReply:i}=e,r=Ke({comment:We().required("Make sure this field is filled correctly")}),n=e=>null!=e&&e.trim()?void 0:"Comment cannot be blank";return ie.jsx(ft,{onSubmit:()=>{},initialValues:{comment:t},validate:async e=>{try{await r.validate(e,{abortEarly:!1})}catch(t){return t.inner.reduce(((e,t)=>({...e,[t.path]:t.message})),{})}},"data-cy":"EditCommentForm",render:({invalid:t,handleSubmit:r,values:a})=>{const u=t;return ie.jsxs(Ve,{as:"form",sx:{flexDirection:"column"},p:2,onSubmit:r,children:[ie.jsxs(He,{as:"label",htmlFor:"comment",sx:{marginBottom:"6px",fontSize:3},children:["Edit ",i?"Reply":"Comment"]}),ie.jsx(yt,{component:Te,"data-cy":"edit-comment",id:"comment",validate:n,name:"comment"}),ie.jsxs(Ve,{mt:4,ml:"auto",children:[ie.jsx(Ee,{type:"button",small:!0,mr:4,variant:"secondary",onClick:()=>null==e?void 0:e.handleCancel(),children:"Cancel"}),ie.jsx(Ee,{"data-cy":"edit-comment-submit","data-testid":"edit-comment-submit",type:"submit","aria-label":"Save changes",small:!0,disabled:u,onClick:()=>{(t=>{null!=t&&t.trim()&&(null==e||e.handleSubmit(t))})(a.comment)},children:"Save"})]})]})}})};try{Ae.displayName="EditComment",Ae.__docgenInfo={description:"",displayName:"EditComment",props:{comment:{defaultValue:null,description:"",name:"comment",required:!0,type:{name:"string"}},handleCancel:{defaultValue:null,description:"",name:"handleCancel",required:!0,type:{name:"() => void"}},handleSubmit:{defaultValue:null,description:"",name:"handleSubmit",required:!0,type:{name:"(commentText: string) => void"}},isReply:{defaultValue:null,description:"",name:"isReply",required:!0,type:{name:"boolean"}}}}}catch{}export{Ae as E}; \ No newline at end of file diff --git a/storybook-static/assets/EditComment.stories-6IcvQ8ab.js b/storybook-static/assets/EditComment.stories-p6f5R7vw.js similarity index 81% rename from storybook-static/assets/EditComment.stories-6IcvQ8ab.js rename to storybook-static/assets/EditComment.stories-p6f5R7vw.js index e61b9dbea1..22527ed774 100644 --- a/storybook-static/assets/EditComment.stories-6IcvQ8ab.js +++ b/storybook-static/assets/EditComment.stories-p6f5R7vw.js @@ -1 +1 @@ -import{j as a}from"./jsx-runtime-CexXSJP5.js";import{E as o}from"./EditComment-DY_6Q1TM.js";import"./index-BP8_t0zE.js";import"./extends-CF3RwP-h.js";import"./objectWithoutPropertiesLoose-CAYKN5F1.js";import"./index.esm-D0u3ndg0.js";import"./Button-B7QBvkxh.js";import"./Icon-BoVZOGVD.js";import"./emotion-styled.browser.esm-Dz2BNYeh.js";import"./parseProps-780b287c.browser.esm-DiCerVr_.js";import"./emotion-use-insertion-effect-with-fallbacks.browser.esm-UWD3gXM2.js";import"./supporter-D7hp958O.js";import"./icon-arrow-down-CJeToCJe.js";import"./icon-star-active-ClN6U5FF.js";import"./theme-ui-core-jsx-runtime.browser.esm-CH0qhC10.js";import"./hoist-non-react-statics.cjs-CQI8syxn.js";import"./theme-ui-components.esm-DCiJ1mMX.js";import"./FieldTextarea-msSeWkcr.js";import"./CharacterCount-BGgvgJrP.js";const k={title:"Discussions/EditComment",component:o},t=()=>a.jsx(o,{isReply:!1,comment:"A short comment",handleCancel:()=>null,handleSubmit:()=>null}),e=()=>a.jsx(o,{isReply:!0,comment:"A short comment here...",handleCancel:()=>null,handleSubmit:()=>null});var m,r,s,n,i,l;t.parameters={...t.parameters,docs:{...null==(m=t.parameters)?void 0:m.docs,source:{originalSource:'() => null} handleSubmit={() => null} />',...null==(s=null==(r=t.parameters)?void 0:r.docs)?void 0:s.source}}},e.parameters={...e.parameters,docs:{...null==(n=e.parameters)?void 0:n.docs,source:{originalSource:'() => null} handleSubmit={() => null} />',...null==(l=null==(i=e.parameters)?void 0:i.docs)?void 0:l.source}}};const q=["Default","EditReply"];export{t as Default,e as EditReply,q as __namedExportsOrder,k as default}; \ No newline at end of file +import{j as a}from"./jsx-runtime-CexXSJP5.js";import{E as o}from"./EditComment-Cc0tE0_Q.js";import"./index-BP8_t0zE.js";import"./extends-CF3RwP-h.js";import"./objectWithoutPropertiesLoose-CAYKN5F1.js";import"./index.esm-D0u3ndg0.js";import"./Button-D4nxT_g_.js";import"./Icon-BoVZOGVD.js";import"./emotion-styled.browser.esm-Dz2BNYeh.js";import"./parseProps-780b287c.browser.esm-DiCerVr_.js";import"./emotion-use-insertion-effect-with-fallbacks.browser.esm-UWD3gXM2.js";import"./supporter-D7hp958O.js";import"./icon-arrow-down-CJeToCJe.js";import"./icon-star-active-ClN6U5FF.js";import"./theme-ui-core-jsx-runtime.browser.esm-CH0qhC10.js";import"./hoist-non-react-statics.cjs-CQI8syxn.js";import"./theme-ui-components.esm-BngKL4Rx.js";import"./FieldTextarea-oZDGU0lI.js";import"./CharacterCount-CVY3hBeQ.js";const k={title:"Discussions/EditComment",component:o},t=()=>a.jsx(o,{isReply:!1,comment:"A short comment",handleCancel:()=>null,handleSubmit:()=>null}),e=()=>a.jsx(o,{isReply:!0,comment:"A short comment here...",handleCancel:()=>null,handleSubmit:()=>null});var m,r,s,n,i,l;t.parameters={...t.parameters,docs:{...null==(m=t.parameters)?void 0:m.docs,source:{originalSource:'() => null} handleSubmit={() => null} />',...null==(s=null==(r=t.parameters)?void 0:r.docs)?void 0:s.source}}},e.parameters={...e.parameters,docs:{...null==(n=e.parameters)?void 0:n.docs,source:{originalSource:'() => null} handleSubmit={() => null} />',...null==(l=null==(i=e.parameters)?void 0:i.docs)?void 0:l.source}}};const q=["Default","EditReply"];export{t as Default,e as EditReply,q as __namedExportsOrder,k as default}; \ No newline at end of file diff --git a/storybook-static/assets/ElWithBeforeIcon-L9Bddb7t.js b/storybook-static/assets/ElWithBeforeIcon-ziIMqlVV.js similarity index 96% rename from storybook-static/assets/ElWithBeforeIcon-L9Bddb7t.js rename to storybook-static/assets/ElWithBeforeIcon-ziIMqlVV.js index 9f79070d8d..2ac7ec0e5b 100644 --- a/storybook-static/assets/ElWithBeforeIcon-L9Bddb7t.js +++ b/storybook-static/assets/ElWithBeforeIcon-ziIMqlVV.js @@ -1 +1 @@ -import{j as c}from"./jsx-runtime-CexXSJP5.js";import{a as s}from"./theme-ui-components.esm-DCiJ1mMX.js";const d="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2012.8%2010.34'%3e%3ctitle%3eicon%20checkmark%3c/title%3e%3cg%20id='Calque_1'%20data-name='Calque%201'%3e%3cpath%20d='M12.8,13.74a40,40,0,0,0,5.51,6.33,1.26,1.26,0,0,0,2-.25,54.13,54.13,0,0,1,5.11-6.75c1.46-1.64,3.13-3.06,4.2-5,.78-1.4-1.38-2.67-2.16-1.26-1.26,2.28-3.5,4.05-5.16,6.06a60.69,60.69,0,0,0-4.15,5.68l2-.25A37.26,37.26,0,0,1,15,12.48c-.92-1.31-3.09-.06-2.16,1.26Z'%20style='fill:%231d1d1b'/%3e%3cpath%20d='M.05,4.18A22,22,0,0,0,2.5,9.73a1.26,1.26,0,0,0,2.16,0,33.26,33.26,0,0,1,7.58-7.35C13.55,1.47,12.3-.7,11,.23A37.05,37.05,0,0,0,2.5,8.47H4.66a19.59,19.59,0,0,1-2.2-5,1.25,1.25,0,0,0-2.41.66Z'%20style='fill:%231d1d1b'/%3e%3c/g%3e%3c/svg%3e",u=22,n=({icon:e,size:t,children:n,ticked:a,contain:i})=>{let o={};const r=t||u;return a&&(o={content:"''",position:"absolute",right:"0",bottom:"50%",transform:"translateY(50%)",width:r,height:r,backgroundImage:`url("${d}")`,backgroundRepeat:"no-repeat"}),c.jsx(s,{sx:{position:"relative",pl:"30px",marginRight:0,"::after":o,"::before":{content:"''",position:"absolute",left:"0",bottom:"50%",transform:"translateY(50%)",width:r,height:r,backgroundPosition:"center",backgroundRepeat:"no-repeat",backgroundImage:`url("${e}")`,backgroundSize:i?"contain":"initial"}},children:n})};try{n.displayName="ElWithBeforeIcon",n.__docgenInfo={description:"",displayName:"ElWithBeforeIcon",props:{icon:{defaultValue:null,description:"",name:"icon",required:!0,type:{name:"string | Element"}},size:{defaultValue:null,description:"",name:"size",required:!1,type:{name:"number"}},ticked:{defaultValue:null,description:"",name:"ticked",required:!1,type:{name:"boolean"}},contain:{defaultValue:null,description:"",name:"contain",required:!1,type:{name:"boolean"}}}}}catch{}export{n as E}; \ No newline at end of file +import{j as c}from"./jsx-runtime-CexXSJP5.js";import{a as s}from"./theme-ui-components.esm-BngKL4Rx.js";const d="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2012.8%2010.34'%3e%3ctitle%3eicon%20checkmark%3c/title%3e%3cg%20id='Calque_1'%20data-name='Calque%201'%3e%3cpath%20d='M12.8,13.74a40,40,0,0,0,5.51,6.33,1.26,1.26,0,0,0,2-.25,54.13,54.13,0,0,1,5.11-6.75c1.46-1.64,3.13-3.06,4.2-5,.78-1.4-1.38-2.67-2.16-1.26-1.26,2.28-3.5,4.05-5.16,6.06a60.69,60.69,0,0,0-4.15,5.68l2-.25A37.26,37.26,0,0,1,15,12.48c-.92-1.31-3.09-.06-2.16,1.26Z'%20style='fill:%231d1d1b'/%3e%3cpath%20d='M.05,4.18A22,22,0,0,0,2.5,9.73a1.26,1.26,0,0,0,2.16,0,33.26,33.26,0,0,1,7.58-7.35C13.55,1.47,12.3-.7,11,.23A37.05,37.05,0,0,0,2.5,8.47H4.66a19.59,19.59,0,0,1-2.2-5,1.25,1.25,0,0,0-2.41.66Z'%20style='fill:%231d1d1b'/%3e%3c/g%3e%3c/svg%3e",u=22,n=({icon:e,size:t,children:n,ticked:a,contain:i})=>{let o={};const r=t||u;return a&&(o={content:"''",position:"absolute",right:"0",bottom:"50%",transform:"translateY(50%)",width:r,height:r,backgroundImage:`url("${d}")`,backgroundRepeat:"no-repeat"}),c.jsx(s,{sx:{position:"relative",pl:"30px",marginRight:0,"::after":o,"::before":{content:"''",position:"absolute",left:"0",bottom:"50%",transform:"translateY(50%)",width:r,height:r,backgroundPosition:"center",backgroundRepeat:"no-repeat",backgroundImage:`url("${e}")`,backgroundSize:i?"contain":"initial"}},children:n})};try{n.displayName="ElWithBeforeIcon",n.__docgenInfo={description:"",displayName:"ElWithBeforeIcon",props:{icon:{defaultValue:null,description:"",name:"icon",required:!0,type:{name:"string | Element"}},size:{defaultValue:null,description:"",name:"size",required:!1,type:{name:"number"}},ticked:{defaultValue:null,description:"",name:"ticked",required:!1,type:{name:"boolean"}},contain:{defaultValue:null,description:"",name:"contain",required:!1,type:{name:"boolean"}}}}}catch{}export{n as E}; \ No newline at end of file diff --git a/storybook-static/assets/ElWithBeforeIcon.stories-DeEz-BrI.js b/storybook-static/assets/ElWithBeforeIcon.stories-DzpHbo6W.js similarity index 96% rename from storybook-static/assets/ElWithBeforeIcon.stories-DeEz-BrI.js rename to storybook-static/assets/ElWithBeforeIcon.stories-DzpHbo6W.js index 201bd6a228..986454d4bb 100644 --- a/storybook-static/assets/ElWithBeforeIcon.stories-DeEz-BrI.js +++ b/storybook-static/assets/ElWithBeforeIcon.stories-DzpHbo6W.js @@ -1 +1 @@ -import{j as a}from"./jsx-runtime-CexXSJP5.js";import{E as t}from"./ElWithBeforeIcon-L9Bddb7t.js";import"./index-BP8_t0zE.js";import"./theme-ui-components.esm-DCiJ1mMX.js";import"./parseProps-780b287c.browser.esm-DiCerVr_.js";import"./emotion-use-insertion-effect-with-fallbacks.browser.esm-UWD3gXM2.js";import"./theme-ui-core-jsx-runtime.browser.esm-CH0qhC10.js";import"./hoist-non-react-statics.cjs-CQI8syxn.js";const d="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2042.59%2038.85'%3e%3ctitle%3eicon%20how-to%3c/title%3e%3cg%20id='Calque_2'%20data-name='Calque%202'%3e%3cpolygon%20points='1.49%203.54%201.49%2034.79%203.04%2036.16%2035.14%2037.37%2039.62%2035.95%2041.32%2032.33%2040.78%206.25%2037.59%201.49%205.16%201.42%201.49%203.54'%20style='fill:%23fff'/%3e%3c/g%3e%3cg%20id='Calque_3'%20data-name='Calque%203'%3e%3cpolygon%20points='18.22%205.84%2018%2022.17%2036.47%2022.07%2036.47%206.66%2018.22%205.84'%20style='fill:%2397cdeb'/%3e%3cpolygon%20points='18%2028.5%2017.8%2037.6%2037.42%2036.88%2037.14%2027.7%2018%2028.5'%20style='fill:%2397cdeb'/%3e%3c/g%3e%3cg%20id='Calque_1'%20data-name='Calque%201'%3e%3cpath%20d='M38,22.37c-.07-5.24,0-10.48-.23-15.71a.51.51,0,0,0,0-.13,1,1,0,0,0-.89-1.07c-6.08-1.14-12.24.44-18.26-.82A1.34,1.34,0,0,0,17,5.85a101.08,101.08,0,0,0-.22,16.32,1.34,1.34,0,0,0,.25.66l.05.06h0a1.21,1.21,0,0,0,1.28.48c5.72-1.26,12.55,0,18.37.24a1.1,1.1,0,0,0,1-.46A1.17,1.17,0,0,0,38,22.37ZM19.14,20.7a101.6,101.6,0,0,1,.23-13.4C24.65,8,30,7,35.26,7.73c.2,4.44.15,8.88.19,13.33C30.19,20.75,24.35,19.91,19.14,20.7Z'%20style='fill:%231d1d1b'/%3e%3cpath%20d='M42.57,32.26c-.12-8.44-.38-16.88-.49-25.32A6.76,6.76,0,0,0,38.27.8a1.3,1.3,0,0,0-.52-.22,1.43,1.43,0,0,0-.39-.06C32.14-.37,26.91.13,21.64.23Q13.4.38,5.16.17a1.07,1.07,0,0,0-.45.07,6.38,6.38,0,0,0-3.88,2C0,3.2.1,4.48.08,5.66-.08,13,0,20.3.28,27.62c.1,2.89-1.24,8.76,2.43,9.75a1.22,1.22,0,0,0,.32,0H3c11.15,1,22.38,2,33.57,1.09a5.87,5.87,0,0,0,5-3.11A5.71,5.71,0,0,0,42.57,32.26ZM19.16,36.12a29.78,29.78,0,0,1,0-6.47c5.6-.26,11.2-.39,16.79-.65.13,2.32.26,4.63.38,7,0,0,0,0,0,.07A133.24,133.24,0,0,1,19.16,36.12ZM40,33a5.79,5.79,0,0,1-.57,1.24,4.32,4.32,0,0,1-.6.79l-.4-7.3a1.31,1.31,0,0,0-1.25-1.25c-6.37.32-12.76.43-19.14.75a1.21,1.21,0,0,0-.93.47,1.29,1.29,0,0,0-.32.78,45.08,45.08,0,0,0-.1,7.53c-4.44-.28-8.88-.66-13.31-1-1.11-.52-.71-12-.75-13.51-.11-5.26-.13-10.52,0-15.77,0-.5,0-1,0-1.52a.93.93,0,0,0,.06-.22,7,7,0,0,1,.88-.73,5,5,0,0,1,1.66-.52q7.41.19,14.82.08C25.7,2.67,31.5,2,37.09,3a4.18,4.18,0,0,1,2.49,4c.11,8.47.38,16.93.49,25.39,0,.06,0,.1,0,.15S40,32.82,40,33Z'%20style='fill:%231d1d1b'/%3e%3cpath%20d='M6.41,10.06c1.79-.14,3.58-.21,5.37-.2a1.25,1.25,0,0,0,0-2.5c-1.79,0-3.58.06-5.37.2-1.59.12-1.61,2.62,0,2.5Z'%20style='fill:%231d1d1b'/%3e%3cpath%20d='M7.34,12.1a7.82,7.82,0,0,1-.84,0l1.08.62h0l-.75,1.84c-.64.09,0,0,.2,0H8.28c1.57,0,3.14,0,4.71,0a1.25,1.25,0,0,0,0-2.5,41,41,0,0,0-6.83,0A1.25,1.25,0,0,0,5.42,14c.42.72,1.21.63,1.92.63a1.25,1.25,0,0,0,0-2.5Z'%20style='fill:%231d1d1b'/%3e%3cpath%20d='M6.87,19.31h4.54a1.25,1.25,0,0,0,0-2.5H6.87a1.25,1.25,0,0,0,0,2.5Z'%20style='fill:%231d1d1b'/%3e%3cpath%20d='M6.69,32.58l5.19-.13a1.25,1.25,0,0,0,0-2.5l-5.19.13a1.25,1.25,0,0,0,0,2.5Z'%20style='fill:%231d1d1b'/%3e%3c/g%3e%3c/svg%3e",x={title:"Components/ElWithBeforeIcon",component:t},e=()=>a.jsx(t,{icon:d,children:a.jsx("p",{children:"Element"})}),o={render:e=>a.jsx(t,{...e,icon:d,children:a.jsx("p",{children:"Element"})})};var c,l,r,s,n,i;e.parameters={...e.parameters,docs:{...null==(c=e.parameters)?void 0:c.docs,source:{originalSource:"() => \n

Element

\n
",...null==(r=null==(l=e.parameters)?void 0:l.docs)?void 0:r.source}}},o.parameters={...o.parameters,docs:{...null==(s=o.parameters)?void 0:s.docs,source:{originalSource:"{\n render: args => \n

Element

\n
\n}",...null==(i=null==(n=o.parameters)?void 0:n.docs)?void 0:i.source}}};const I=["Default","Sizes"];export{e as Default,o as Sizes,I as __namedExportsOrder,x as default}; \ No newline at end of file +import{j as a}from"./jsx-runtime-CexXSJP5.js";import{E as t}from"./ElWithBeforeIcon-ziIMqlVV.js";import"./index-BP8_t0zE.js";import"./theme-ui-components.esm-BngKL4Rx.js";import"./parseProps-780b287c.browser.esm-DiCerVr_.js";import"./emotion-use-insertion-effect-with-fallbacks.browser.esm-UWD3gXM2.js";import"./theme-ui-core-jsx-runtime.browser.esm-CH0qhC10.js";import"./hoist-non-react-statics.cjs-CQI8syxn.js";const d="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2042.59%2038.85'%3e%3ctitle%3eicon%20how-to%3c/title%3e%3cg%20id='Calque_2'%20data-name='Calque%202'%3e%3cpolygon%20points='1.49%203.54%201.49%2034.79%203.04%2036.16%2035.14%2037.37%2039.62%2035.95%2041.32%2032.33%2040.78%206.25%2037.59%201.49%205.16%201.42%201.49%203.54'%20style='fill:%23fff'/%3e%3c/g%3e%3cg%20id='Calque_3'%20data-name='Calque%203'%3e%3cpolygon%20points='18.22%205.84%2018%2022.17%2036.47%2022.07%2036.47%206.66%2018.22%205.84'%20style='fill:%2397cdeb'/%3e%3cpolygon%20points='18%2028.5%2017.8%2037.6%2037.42%2036.88%2037.14%2027.7%2018%2028.5'%20style='fill:%2397cdeb'/%3e%3c/g%3e%3cg%20id='Calque_1'%20data-name='Calque%201'%3e%3cpath%20d='M38,22.37c-.07-5.24,0-10.48-.23-15.71a.51.51,0,0,0,0-.13,1,1,0,0,0-.89-1.07c-6.08-1.14-12.24.44-18.26-.82A1.34,1.34,0,0,0,17,5.85a101.08,101.08,0,0,0-.22,16.32,1.34,1.34,0,0,0,.25.66l.05.06h0a1.21,1.21,0,0,0,1.28.48c5.72-1.26,12.55,0,18.37.24a1.1,1.1,0,0,0,1-.46A1.17,1.17,0,0,0,38,22.37ZM19.14,20.7a101.6,101.6,0,0,1,.23-13.4C24.65,8,30,7,35.26,7.73c.2,4.44.15,8.88.19,13.33C30.19,20.75,24.35,19.91,19.14,20.7Z'%20style='fill:%231d1d1b'/%3e%3cpath%20d='M42.57,32.26c-.12-8.44-.38-16.88-.49-25.32A6.76,6.76,0,0,0,38.27.8a1.3,1.3,0,0,0-.52-.22,1.43,1.43,0,0,0-.39-.06C32.14-.37,26.91.13,21.64.23Q13.4.38,5.16.17a1.07,1.07,0,0,0-.45.07,6.38,6.38,0,0,0-3.88,2C0,3.2.1,4.48.08,5.66-.08,13,0,20.3.28,27.62c.1,2.89-1.24,8.76,2.43,9.75a1.22,1.22,0,0,0,.32,0H3c11.15,1,22.38,2,33.57,1.09a5.87,5.87,0,0,0,5-3.11A5.71,5.71,0,0,0,42.57,32.26ZM19.16,36.12a29.78,29.78,0,0,1,0-6.47c5.6-.26,11.2-.39,16.79-.65.13,2.32.26,4.63.38,7,0,0,0,0,0,.07A133.24,133.24,0,0,1,19.16,36.12ZM40,33a5.79,5.79,0,0,1-.57,1.24,4.32,4.32,0,0,1-.6.79l-.4-7.3a1.31,1.31,0,0,0-1.25-1.25c-6.37.32-12.76.43-19.14.75a1.21,1.21,0,0,0-.93.47,1.29,1.29,0,0,0-.32.78,45.08,45.08,0,0,0-.1,7.53c-4.44-.28-8.88-.66-13.31-1-1.11-.52-.71-12-.75-13.51-.11-5.26-.13-10.52,0-15.77,0-.5,0-1,0-1.52a.93.93,0,0,0,.06-.22,7,7,0,0,1,.88-.73,5,5,0,0,1,1.66-.52q7.41.19,14.82.08C25.7,2.67,31.5,2,37.09,3a4.18,4.18,0,0,1,2.49,4c.11,8.47.38,16.93.49,25.39,0,.06,0,.1,0,.15S40,32.82,40,33Z'%20style='fill:%231d1d1b'/%3e%3cpath%20d='M6.41,10.06c1.79-.14,3.58-.21,5.37-.2a1.25,1.25,0,0,0,0-2.5c-1.79,0-3.58.06-5.37.2-1.59.12-1.61,2.62,0,2.5Z'%20style='fill:%231d1d1b'/%3e%3cpath%20d='M7.34,12.1a7.82,7.82,0,0,1-.84,0l1.08.62h0l-.75,1.84c-.64.09,0,0,.2,0H8.28c1.57,0,3.14,0,4.71,0a1.25,1.25,0,0,0,0-2.5,41,41,0,0,0-6.83,0A1.25,1.25,0,0,0,5.42,14c.42.72,1.21.63,1.92.63a1.25,1.25,0,0,0,0-2.5Z'%20style='fill:%231d1d1b'/%3e%3cpath%20d='M6.87,19.31h4.54a1.25,1.25,0,0,0,0-2.5H6.87a1.25,1.25,0,0,0,0,2.5Z'%20style='fill:%231d1d1b'/%3e%3cpath%20d='M6.69,32.58l5.19-.13a1.25,1.25,0,0,0,0-2.5l-5.19.13a1.25,1.25,0,0,0,0,2.5Z'%20style='fill:%231d1d1b'/%3e%3c/g%3e%3c/svg%3e",x={title:"Components/ElWithBeforeIcon",component:t},e=()=>a.jsx(t,{icon:d,children:a.jsx("p",{children:"Element"})}),o={render:e=>a.jsx(t,{...e,icon:d,children:a.jsx("p",{children:"Element"})})};var c,l,r,s,n,i;e.parameters={...e.parameters,docs:{...null==(c=e.parameters)?void 0:c.docs,source:{originalSource:"() => \n

Element

\n
",...null==(r=null==(l=e.parameters)?void 0:l.docs)?void 0:r.source}}},o.parameters={...o.parameters,docs:{...null==(s=o.parameters)?void 0:s.docs,source:{originalSource:"{\n render: args => \n

Element

\n
\n}",...null==(i=null==(n=o.parameters)?void 0:n.docs)?void 0:i.source}}};const I=["Default","Sizes"];export{e as Default,o as Sizes,I as __namedExportsOrder,x as default}; \ No newline at end of file diff --git a/storybook-static/assets/ExternalLink-CHmx7fZ7.js b/storybook-static/assets/ExternalLink-DC09teyd.js similarity index 89% rename from storybook-static/assets/ExternalLink-CHmx7fZ7.js rename to storybook-static/assets/ExternalLink-DC09teyd.js index d091b750eb..f0b59da1d9 100644 --- a/storybook-static/assets/ExternalLink-CHmx7fZ7.js +++ b/storybook-static/assets/ExternalLink-DC09teyd.js @@ -1 +1 @@ -import{j as n}from"./jsx-runtime-CexXSJP5.js";import{L as t}from"./theme-ui-components.esm-DCiJ1mMX.js";const r=e=>n.jsx(t,{...e,target:"_blank",rel:"noopener noreferrer"});try{r.displayName="ExternalLink",r.__docgenInfo={description:"Provides a styled `a` tag. Opens in new tab with noopener and noreferrer rel attributes\n\nhttps://pointjupiter.com/what-noopener-noreferrer-nofollow-explained/",displayName:"ExternalLink",props:{ref:{defaultValue:null,description:"",name:"ref",required:!1,type:{name:"((instance: HTMLAnchorElement | null) => void) | RefObject | null"}}}}}catch{}export{r as E}; \ No newline at end of file +import{j as n}from"./jsx-runtime-CexXSJP5.js";import{L as t}from"./theme-ui-components.esm-BngKL4Rx.js";const r=e=>n.jsx(t,{...e,target:"_blank",rel:"noopener noreferrer"});try{r.displayName="ExternalLink",r.__docgenInfo={description:"Provides a styled `a` tag. Opens in new tab with noopener and noreferrer rel attributes\n\nhttps://pointjupiter.com/what-noopener-noreferrer-nofollow-explained/",displayName:"ExternalLink",props:{ref:{defaultValue:null,description:"",name:"ref",required:!1,type:{name:"((instance: HTMLAnchorElement | null) => void) | RefObject | null"}}}}}catch{}export{r as E}; \ No newline at end of file diff --git a/storybook-static/assets/ExternalLink.stories-BQBbXmOy.js b/storybook-static/assets/ExternalLink.stories-BQBbXmOy.js deleted file mode 100644 index 0662e6443b..0000000000 --- a/storybook-static/assets/ExternalLink.stories-BQBbXmOy.js +++ /dev/null @@ -1 +0,0 @@ -import{j as r}from"./jsx-runtime-CexXSJP5.js";import"./ArticleCallToAction-S85J-T9-.js";import"./Banner-Rp1eOMI_.js";import"./BlockedRoute-K9n5NNTD.js";import"./Breadcrumbs-fIZcmrbj.js";import"./Button-B7QBvkxh.js";import"./ButtonIcon-BjD0tDRb.js";import"./ButtonShowReplies-CiHAfYgx.js";import"./CardButton-QQF3n4Pb.js";import"./CardList-8N7t_bxB.js";import"./CardListItem-DBQLYOzT.js";import"./CardProfile-D6E6LGNb.js";import"./Category-BRVyiaSI.js";import"./ContentStatistics-Clvo6xNg.js";import"./CommentItem-CC36m9WH.js";import"./CommentList-Bubf--RT.js";import"./CreateReply-2Azc7a5m.js";import"./ConfirmModal-DGUUT3uo.js";import"./CreateComment-C20B3Odi.js";import"./DiscussionContainer-BVmT0JYJ.js";import"./DiscussionTitle-Dhry4tok.js";import"./DisplayDate-8pUkm3CJ.js";import"./DonationRequest-0J0Ydxwt.js";import"./DonationRequestModal-BNxPzf8m.js";import"./DownloadButton-C_Yd3Qr5.js";import"./DownloadCounter-CpsPmH8s.js";import"./DownloadWithDonationAsk-DqdQCDXv.js";import"./DownloadStaticFile-BGuyYeyj.js";import"./EditComment-DY_6Q1TM.js";import"./ElWithBeforeIcon-L9Bddb7t.js";import{E as m}from"./ExternalLink-CHmx7fZ7.js";import"./FieldInput-CIt9FN7x.js";import"./FieldTextarea-msSeWkcr.js";import"./Guidelines-CAuhvrJl.js";import"./Username-iPvtw0Lg.js";import"./FollowButton-gF1fEo3D.js";import"./GlobalStyles-Cwnjx0pv.js";import"./HeroBanner-D9U7RVxT.js";import{I as k}from"./Icon-BoVZOGVD.js";import"./IconCountWithTooltip-BgxPFEPA.js";import"./ImageCrop-DCgV90x1.js";import"./ImageGallery-BkpAuthm.js";import"./InternalLink-CtyTe3gy.js";import"./LinkifyText-CTcW0PSE.js";import"./Loader-DmqUoSY8.js";import"./Map.client-D7Zd9Rir.js";import"./MapFilterList-CT7nPuhI.js";import"./MapFilterProfileTypeCardList-B_N3XKVv.js";import"./MapMemberCard-CYhmSFBa.js";import"./MapWithPin.client-B3vCTPau.js";import"./MemberBadge-BFCUvfGJ.js";import"./Modal-CNp0gEVS.js";import"./ModerationStatus-i6sV2GYn.js";import"./MoreContainer-BHO-aLZj.js";import"./NotificationItem-BEQLiIOf.js";import"./NotificationList-B57zIKMs.js";import"./OsmGeocoding-Dk6lLoXi.js";import"./PinProfile-Dc_LX_A4.js";import"./ProfileLink-Bn1AIGdm.js";import"./ProfileTagsList-D6w9cXVe.js";import"./ResearchEditorOverview-DHGZ1VKA.js";import"./SearchField-BEwe93wL.js";import"./Select-C5bekj-a.js";import"./SettingsFormWrapper-wpFJEgrf.js";import"./SiteFooter-BzW_8Cd0.js";import"./TabbedContent-CQ_-r_zn.js";import"./Tag-Dzxf5qoT.js";import"./TagList-C0eLtcDO.js";import"./TextNotification-TOi5P2Z0.js";import"./Tooltip-B9mgSRkZ.js";import"./UsefulStatsButton-UfP_hPRY.js";import"./UserEngagementWrapper-A6DCP-GM.js";import"./UserStatistics-CUtZqp73.js";import"./VideoPlayer-ggRAiP4x.js";import{T as L}from"./theme-ui-components.esm-DCiJ1mMX.js";import"./index-BP8_t0zE.js";import"./theme-ui-core.browser.esm-CIov4Ln1.js";import"./emotion-react.browser.esm-BYoRxRk_.js";import"./parseProps-780b287c.browser.esm-DiCerVr_.js";import"./emotion-use-insertion-effect-with-fallbacks.browser.esm-UWD3gXM2.js";import"./hoist-non-react-statics.cjs-CQI8syxn.js";import"./cjs-Clfm10Kj.js";import"./components-CutHIkdx.js";import"./index-BBRV8eG_.js";import"./index-BXxqJQdV.js";import"./typeof-QjJsDpFa.js";import"./extends-CF3RwP-h.js";import"./objectWithoutPropertiesLoose-CAYKN5F1.js";import"./index.esm-D0u3ndg0.js";import"./CharacterCount-BGgvgJrP.js";import"./supporter-D7hp958O.js";import"./emotion-styled.browser.esm-Dz2BNYeh.js";import"./icon-arrow-down-CJeToCJe.js";import"./icon-star-active-ClN6U5FF.js";import"./theme-ui-core-jsx-runtime.browser.esm-CH0qhC10.js";import"./iframe-B1GJESFe.js";import"../sb-preview/runtime.js";import"./setPrototypeOf-NYsvoNVB.js";import"./inheritsLoose-CdQPfY07.js";import"./defineProperty-Dr9G4DxF.js";import"./MapLayer-CeGLoV_-.js";import"./MapPin.client-Ln2WLe_W.js";import"./index-Snk9MO9S.js";import"./isNativeReflectConstruct-gwnEYaHE.js";import"./floating-ui.dom-DtcZXcvp.js";import"./TabsList-DhTEw6FA.js";const kt={title:"Components/ExternalLink",component:m},t=()=>r.jsx(m,{href:"#",children:"Link Text"}),o=()=>r.jsx(m,{href:"#",color:"black",sx:{textDecoration:"underline"},children:"Link Text"}),i=()=>r.jsxs(m,{href:"#",children:[r.jsx(L,{children:"Link Text"}),r.jsx(k,{glyph:"external-link",ml:[1]})]});var p,e,n,s,a,c,l,x,d;t.parameters={...t.parameters,docs:{...null==(p=t.parameters)?void 0:p.docs,source:{originalSource:'() => Link Text',...null==(n=null==(e=t.parameters)?void 0:e.docs)?void 0:n.source}}},o.parameters={...o.parameters,docs:{...null==(s=o.parameters)?void 0:s.docs,source:{originalSource:'() => \n Link Text\n ',...null==(c=null==(a=o.parameters)?void 0:a.docs)?void 0:c.source}}},i.parameters={...i.parameters,docs:{...null==(l=i.parameters)?void 0:l.docs,source:{originalSource:'() => \n Link Text\n \n ',...null==(d=null==(x=i.parameters)?void 0:x.docs)?void 0:d.source}}};const Lt=["Basic","Styled","WithIcon"];export{t as Basic,o as Styled,i as WithIcon,Lt as __namedExportsOrder,kt as default}; \ No newline at end of file diff --git a/storybook-static/assets/ExternalLink.stories-BntqcWM4.js b/storybook-static/assets/ExternalLink.stories-BntqcWM4.js new file mode 100644 index 0000000000..9094427fb6 --- /dev/null +++ b/storybook-static/assets/ExternalLink.stories-BntqcWM4.js @@ -0,0 +1 @@ +import{j as r}from"./jsx-runtime-CexXSJP5.js";import"./ArticleCallToAction-Dg_5FoBY.js";import"./Banner-CahIkehL.js";import"./BlockedRoute-B-LpWzKK.js";import"./Breadcrumbs-C-8z0Dk9.js";import"./Button-D4nxT_g_.js";import"./ButtonIcon-2rTJWwwt.js";import"./ButtonShowReplies-rMDrrQbK.js";import"./CardButton-Nj67FTo7.js";import"./CardList-D27s8o8o.js";import"./CardListItem-DsaNSZFe.js";import"./CardProfile-DtCgLDpd.js";import"./Category-CVnjFQdi.js";import"./ContentStatistics-bJnGvmTm.js";import"./CommentItem-Ccduf_Q5.js";import"./CommentList-DhG71MGP.js";import"./CreateReply-BdnxgSUh.js";import"./ConfirmModal-p91B88N_.js";import"./CreateComment-D2RNG3uU.js";import"./DiscussionContainer-UK2PNt_d.js";import"./DiscussionTitle-BShaVqYD.js";import"./DisplayDate-6lOgCKow.js";import"./DonationRequest-CKaGKX0b.js";import"./DonationRequestModal-DTG05Bmq.js";import"./DownloadButton-CbSDAvqa.js";import"./DownloadCounter-BhwM3uCm.js";import"./DownloadWithDonationAsk-GJ8cWUSg.js";import"./DownloadStaticFile-CwDiAVJ3.js";import"./EditComment-Cc0tE0_Q.js";import"./ElWithBeforeIcon-ziIMqlVV.js";import{E as m}from"./ExternalLink-DC09teyd.js";import"./FieldInput-CGUt93Kw.js";import"./FieldTextarea-oZDGU0lI.js";import"./Guidelines-BB0ZBfiO.js";import"./Username-CNsNRGy2.js";import"./FollowButton-CYJNiQil.js";import"./GlobalStyles-Cwnjx0pv.js";import"./HeroBanner-DIi4EvbO.js";import{I as k}from"./Icon-BoVZOGVD.js";import"./IconCountWithTooltip-CZUhF_pl.js";import"./ImageCrop-IvK67aX8.js";import"./ImageGallery-Z1nzt08r.js";import"./InternalLink-BRM7MvOa.js";import"./LinkifyText-MsKPRXsf.js";import"./Loader-BiCtIOH2.js";import"./Map.client-D7Zd9Rir.js";import"./MapFilterList-Y-6ElEro.js";import"./MapFilterProfileTypeCardList-B9GpaZp7.js";import"./MapMemberCard-WWElHjiz.js";import"./MapWithPin.client-caBE0rMV.js";import"./MemberBadge-DSOx4fo1.js";import"./Modal-DXxaFBTe.js";import"./ModerationStatus-CWLvcR2F.js";import"./MoreContainer-CcsKR2f8.js";import"./NotificationItem-BpOS05-u.js";import"./NotificationList-Dv4Csxvg.js";import"./OsmGeocoding-BSwlbkyl.js";import"./PinProfile-Df17ks_L.js";import"./ProfileLink-CJW6tj3G.js";import"./ProfileTagsList-CnWLcFtJ.js";import"./ResearchEditorOverview-DCXr4jRB.js";import"./SearchField-D-_Sbl66.js";import"./Select-Jv7oc3OL.js";import"./SettingsFormWrapper-8HI_u4j_.js";import"./SiteFooter-BHZy9iC_.js";import"./TabbedContent-CQ_-r_zn.js";import"./Tag-BuO8hjpj.js";import"./TagList-azY_z3G0.js";import"./TextNotification-CHRBxPd1.js";import"./Tooltip-B9mgSRkZ.js";import"./UsefulStatsButton-B_1AYhM5.js";import"./UserEngagementWrapper-CZMhdjgS.js";import"./UserStatistics-DkY-J2x5.js";import"./VideoPlayer-DllXxlDZ.js";import{T as L}from"./theme-ui-components.esm-BngKL4Rx.js";import"./index-BP8_t0zE.js";import"./theme-ui-core.browser.esm-CIov4Ln1.js";import"./emotion-react.browser.esm-BYoRxRk_.js";import"./parseProps-780b287c.browser.esm-DiCerVr_.js";import"./emotion-use-insertion-effect-with-fallbacks.browser.esm-UWD3gXM2.js";import"./hoist-non-react-statics.cjs-CQI8syxn.js";import"./cjs-Clfm10Kj.js";import"./components-CutHIkdx.js";import"./index-BBRV8eG_.js";import"./index-BXxqJQdV.js";import"./typeof-QjJsDpFa.js";import"./extends-CF3RwP-h.js";import"./objectWithoutPropertiesLoose-CAYKN5F1.js";import"./index.esm-D0u3ndg0.js";import"./CharacterCount-CVY3hBeQ.js";import"./supporter-D7hp958O.js";import"./emotion-styled.browser.esm-Dz2BNYeh.js";import"./UserBadge-XI2JdGOl.js";import"./icon-arrow-down-CJeToCJe.js";import"./icon-star-active-ClN6U5FF.js";import"./theme-ui-core-jsx-runtime.browser.esm-CH0qhC10.js";import"./iframe-BgaKNRp_.js";import"../sb-preview/runtime.js";import"./setPrototypeOf-NYsvoNVB.js";import"./inheritsLoose-CdQPfY07.js";import"./defineProperty-Dr9G4DxF.js";import"./MapLayer-CeGLoV_-.js";import"./MapPin.client-Ln2WLe_W.js";import"./index-Snk9MO9S.js";import"./isNativeReflectConstruct-gwnEYaHE.js";import"./floating-ui.dom-DtcZXcvp.js";import"./TabsList-DhTEw6FA.js";const Lt={title:"Components/ExternalLink",component:m},t=()=>r.jsx(m,{href:"#",children:"Link Text"}),o=()=>r.jsx(m,{href:"#",color:"black",sx:{textDecoration:"underline"},children:"Link Text"}),i=()=>r.jsxs(m,{href:"#",children:[r.jsx(L,{children:"Link Text"}),r.jsx(k,{glyph:"external-link",ml:[1]})]});var p,e,n,s,a,c,l,x,d;t.parameters={...t.parameters,docs:{...null==(p=t.parameters)?void 0:p.docs,source:{originalSource:'() => Link Text',...null==(n=null==(e=t.parameters)?void 0:e.docs)?void 0:n.source}}},o.parameters={...o.parameters,docs:{...null==(s=o.parameters)?void 0:s.docs,source:{originalSource:'() => \n Link Text\n ',...null==(c=null==(a=o.parameters)?void 0:a.docs)?void 0:c.source}}},i.parameters={...i.parameters,docs:{...null==(l=i.parameters)?void 0:l.docs,source:{originalSource:'() => \n Link Text\n \n ',...null==(d=null==(x=i.parameters)?void 0:x.docs)?void 0:d.source}}};const ht=["Basic","Styled","WithIcon"];export{t as Basic,o as Styled,i as WithIcon,ht as __namedExportsOrder,Lt as default}; \ No newline at end of file diff --git a/storybook-static/assets/Facebook-BIAYX5pn.js b/storybook-static/assets/Facebook-BkPw3IZp.js similarity index 98% rename from storybook-static/assets/Facebook-BIAYX5pn.js rename to storybook-static/assets/Facebook-BkPw3IZp.js index 4d1acc448a..dec4066dca 100644 --- a/storybook-static/assets/Facebook-BIAYX5pn.js +++ b/storybook-static/assets/Facebook-BkPw3IZp.js @@ -1 +1 @@ -import{g as _,r as g}from"./index-BP8_t0zE.js";import{u as P,p as m}from"./VideoPlayer-ggRAiP4x.js";function v(e,t){for(var r=0;rs[t]})}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}var O=Object.create,i=Object.defineProperty,D=Object.getOwnPropertyDescriptor,E=Object.getOwnPropertyNames,S=Object.getPrototypeOf,j=Object.prototype.hasOwnProperty,I=(e,t,r)=>t in e?i(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,k=(e,t)=>{for(var r in t)i(e,r,{get:t[r],enumerable:!0})},h=(e,t,r,s)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let o of E(t))!j.call(e,o)&&o!==r&&i(e,o,{get:()=>t[o],enumerable:!(s=D(t,o))||s.enumerable});return e},w=(e,t,r)=>(r=null!=e?O(S(e)):{},h(e&&e.__esModule?r:i(r,"default",{value:e,enumerable:!0}),e)),F=e=>h(i({},"__esModule",{value:!0}),e),o=(e,t,r)=>(I(e,"symbol"!=typeof t?t+"":t,r),r),b={};k(b,{default:()=>l});var d=F(b),u=w(g),n=P,x=m;const c="https://connect.facebook.net/en_US/sdk.js",f="FB",y="fbAsyncInit",L="facebook-player-";class l extends u.Component{constructor(){super(...arguments),o(this,"callPlayer",n.callPlayer),o(this,"playerID",this.props.config.playerId||`${L}${(0,n.randomString)()}`),o(this,"mute",(()=>{this.callPlayer("mute")})),o(this,"unmute",(()=>{this.callPlayer("unmute")}))}componentDidMount(){this.props.onMount&&this.props.onMount(this)}load(e,t){t?(0,n.getSDK)(c,f,y).then((e=>e.XFBML.parse())):(0,n.getSDK)(c,f,y).then((e=>{e.init({appId:this.props.config.appId,xfbml:!0,version:this.props.config.version}),e.Event.subscribe("xfbml.render",(e=>{this.props.onLoaded()})),e.Event.subscribe("xfbml.ready",(e=>{"video"===e.type&&e.id===this.playerID&&(this.player=e.instance,this.player.subscribe("startedPlaying",this.props.onPlay),this.player.subscribe("paused",this.props.onPause),this.player.subscribe("finishedPlaying",this.props.onEnded),this.player.subscribe("startedBuffering",this.props.onBuffer),this.player.subscribe("finishedBuffering",this.props.onBufferEnd),this.player.subscribe("error",this.props.onError),this.props.muted?this.callPlayer("mute"):this.callPlayer("unmute"),this.props.onReady(),document.getElementById(this.playerID).querySelector("iframe").style.visibility="visible")}))}))}play(){this.callPlayer("play")}pause(){this.callPlayer("pause")}stop(){}seekTo(e,t=!0){this.callPlayer("seek",e),t||this.pause()}setVolume(e){this.callPlayer("setVolume",e)}getDuration(){return this.callPlayer("getDuration")}getCurrentTime(){return this.callPlayer("getCurrentPosition")}getSecondsLoaded(){return null}render(){const{attributes:e}=this.props.config;return u.default.createElement("div",{style:{width:"100%",height:"100%"},id:this.playerID,className:"fb-video","data-href":this.props.url,"data-autoplay":this.props.playing?"true":"false","data-allowfullscreen":"true","data-controls":this.props.controls?"true":"false",...e})}}o(l,"displayName","Facebook"),o(l,"canPlay",x.canPlay.facebook),o(l,"loopOnEnded",!0);const M=_(d),N=v({__proto__:null,default:M},[d]);export{N as F}; \ No newline at end of file +import{g as _,r as g}from"./index-BP8_t0zE.js";import{u as P,p as m}from"./VideoPlayer-DllXxlDZ.js";function v(e,t){for(var r=0;rs[t]})}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}var O=Object.create,i=Object.defineProperty,D=Object.getOwnPropertyDescriptor,E=Object.getOwnPropertyNames,S=Object.getPrototypeOf,j=Object.prototype.hasOwnProperty,I=(e,t,r)=>t in e?i(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,k=(e,t)=>{for(var r in t)i(e,r,{get:t[r],enumerable:!0})},h=(e,t,r,s)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let o of E(t))!j.call(e,o)&&o!==r&&i(e,o,{get:()=>t[o],enumerable:!(s=D(t,o))||s.enumerable});return e},w=(e,t,r)=>(r=null!=e?O(S(e)):{},h(e&&e.__esModule?r:i(r,"default",{value:e,enumerable:!0}),e)),F=e=>h(i({},"__esModule",{value:!0}),e),o=(e,t,r)=>(I(e,"symbol"!=typeof t?t+"":t,r),r),b={};k(b,{default:()=>l});var d=F(b),u=w(g),n=P,x=m;const c="https://connect.facebook.net/en_US/sdk.js",f="FB",y="fbAsyncInit",L="facebook-player-";class l extends u.Component{constructor(){super(...arguments),o(this,"callPlayer",n.callPlayer),o(this,"playerID",this.props.config.playerId||`${L}${(0,n.randomString)()}`),o(this,"mute",(()=>{this.callPlayer("mute")})),o(this,"unmute",(()=>{this.callPlayer("unmute")}))}componentDidMount(){this.props.onMount&&this.props.onMount(this)}load(e,t){t?(0,n.getSDK)(c,f,y).then((e=>e.XFBML.parse())):(0,n.getSDK)(c,f,y).then((e=>{e.init({appId:this.props.config.appId,xfbml:!0,version:this.props.config.version}),e.Event.subscribe("xfbml.render",(e=>{this.props.onLoaded()})),e.Event.subscribe("xfbml.ready",(e=>{"video"===e.type&&e.id===this.playerID&&(this.player=e.instance,this.player.subscribe("startedPlaying",this.props.onPlay),this.player.subscribe("paused",this.props.onPause),this.player.subscribe("finishedPlaying",this.props.onEnded),this.player.subscribe("startedBuffering",this.props.onBuffer),this.player.subscribe("finishedBuffering",this.props.onBufferEnd),this.player.subscribe("error",this.props.onError),this.props.muted?this.callPlayer("mute"):this.callPlayer("unmute"),this.props.onReady(),document.getElementById(this.playerID).querySelector("iframe").style.visibility="visible")}))}))}play(){this.callPlayer("play")}pause(){this.callPlayer("pause")}stop(){}seekTo(e,t=!0){this.callPlayer("seek",e),t||this.pause()}setVolume(e){this.callPlayer("setVolume",e)}getDuration(){return this.callPlayer("getDuration")}getCurrentTime(){return this.callPlayer("getCurrentPosition")}getSecondsLoaded(){return null}render(){const{attributes:e}=this.props.config;return u.default.createElement("div",{style:{width:"100%",height:"100%"},id:this.playerID,className:"fb-video","data-href":this.props.url,"data-autoplay":this.props.playing?"true":"false","data-allowfullscreen":"true","data-controls":this.props.controls?"true":"false",...e})}}o(l,"displayName","Facebook"),o(l,"canPlay",x.canPlay.facebook),o(l,"loopOnEnded",!0);const M=_(d),N=v({__proto__:null,default:M},[d]);export{N as F}; \ No newline at end of file diff --git a/storybook-static/assets/FieldInput-CIt9FN7x.js b/storybook-static/assets/FieldInput-CGUt93Kw.js similarity index 92% rename from storybook-static/assets/FieldInput-CIt9FN7x.js rename to storybook-static/assets/FieldInput-CGUt93Kw.js index 713c27545c..86dcc02057 100644 --- a/storybook-static/assets/FieldInput-CIt9FN7x.js +++ b/storybook-static/assets/FieldInput-CGUt93Kw.js @@ -1 +1 @@ -import{j as n}from"./jsx-runtime-CexXSJP5.js";import{r as m}from"./index-BP8_t0zE.js";import{C}from"./CharacterCount-BGgvgJrP.js";import{d as j,F as I,T as _,a as p}from"./theme-ui-components.esm-DCiJ1mMX.js";const F=e=>e.charAt(0).toUpperCase()+e.slice(1),z=(e,n={})=>("string"!=typeof e||(n.trim&&(e=e.trim()),n.capitalize&&(e=F(e))),e),f=({input:e,meta:t,disabled:r,modifiers:a,customOnBlur:i,showCharacterCount:o,minLength:l,maxLength:s,endAdornment:u,...d})=>{var c;const[h,x]=m.useState((null==(c=null==e?void 0:e.value)?void 0:c.length)??0),f=n.jsx(j,{disabled:r,variant:null!=t&&t.error&&null!=t&&t.touched?"textareaError":"textarea",...e,...d,minLength:l,maxLength:s,onBlur:n=>{a&&(n.target.value=z(n.target.value,a),e.onChange(n)),i&&i(n),e.onBlur()},onChange:n=>{o&&x(n.target.value.length),e.onChange(n)}});return n.jsxs(I,{sx:{flexDirection:"column",flex:1,gap:1},children:[t.error&&t.touched&&n.jsx(_,{sx:{fontSize:1,color:"error"},children:t.error}),u?n.jsxs(p,{style:{display:"flex",alignItems:"center",position:"relative"},children:[f,n.jsx(p,{sx:{position:"absolute",right:2},children:u})]}):f,o&&s&&n.jsx(C,{currentSize:h,minSize:l,maxSize:s})]})};try{f.displayName="FieldInput",f.__docgenInfo={description:"",displayName:"FieldInput",props:{disabled:{defaultValue:null,description:"",name:"disabled",required:!1,type:{name:"boolean"}},showCharacterCount:{defaultValue:null,description:"",name:"showCharacterCount",required:!1,type:{name:"boolean"}},"data-cy":{defaultValue:null,description:"",name:"data-cy",required:!1,type:{name:"string"}},customOnBlur:{defaultValue:null,description:"",name:"customOnBlur",required:!1,type:{name:"((event: any) => void)"}},endAdornment:{defaultValue:null,description:"",name:"endAdornment",required:!1,type:{name:"any"}}}}}catch{}export{f as F}; \ No newline at end of file +import{j as n}from"./jsx-runtime-CexXSJP5.js";import{r as m}from"./index-BP8_t0zE.js";import{C}from"./CharacterCount-CVY3hBeQ.js";import{d as j,F as I,T as _,a as p}from"./theme-ui-components.esm-BngKL4Rx.js";const F=e=>e.charAt(0).toUpperCase()+e.slice(1),z=(e,n={})=>("string"!=typeof e||(n.trim&&(e=e.trim()),n.capitalize&&(e=F(e))),e),f=({input:e,meta:t,disabled:r,modifiers:a,customOnBlur:i,showCharacterCount:o,minLength:l,maxLength:s,endAdornment:u,...d})=>{var c;const[h,x]=m.useState((null==(c=null==e?void 0:e.value)?void 0:c.length)??0),f=n.jsx(j,{disabled:r,variant:null!=t&&t.error&&null!=t&&t.touched?"textareaError":"textarea",...e,...d,minLength:l,maxLength:s,onBlur:n=>{a&&(n.target.value=z(n.target.value,a),e.onChange(n)),i&&i(n),e.onBlur()},onChange:n=>{o&&x(n.target.value.length),e.onChange(n)}});return n.jsxs(I,{sx:{flexDirection:"column",flex:1,gap:1},children:[t.error&&t.touched&&n.jsx(_,{sx:{fontSize:1,color:"error"},children:t.error}),u?n.jsxs(p,{style:{display:"flex",alignItems:"center",position:"relative"},children:[f,n.jsx(p,{sx:{position:"absolute",right:2},children:u})]}):f,o&&s&&n.jsx(C,{currentSize:h,minSize:l,maxSize:s})]})};try{f.displayName="FieldInput",f.__docgenInfo={description:"",displayName:"FieldInput",props:{disabled:{defaultValue:null,description:"",name:"disabled",required:!1,type:{name:"boolean"}},showCharacterCount:{defaultValue:null,description:"",name:"showCharacterCount",required:!1,type:{name:"boolean"}},"data-cy":{defaultValue:null,description:"",name:"data-cy",required:!1,type:{name:"string"}},customOnBlur:{defaultValue:null,description:"",name:"customOnBlur",required:!1,type:{name:"((event: any) => void)"}},endAdornment:{defaultValue:null,description:"",name:"endAdornment",required:!1,type:{name:"any"}}}}}catch{}export{f as F}; \ No newline at end of file diff --git a/storybook-static/assets/FieldInput.stories-CmNQbghs.js b/storybook-static/assets/FieldInput.stories-Dgzcgtdg.js similarity index 85% rename from storybook-static/assets/FieldInput.stories-CmNQbghs.js rename to storybook-static/assets/FieldInput.stories-Dgzcgtdg.js index 2093edd2c6..584abf52c2 100644 --- a/storybook-static/assets/FieldInput.stories-CmNQbghs.js +++ b/storybook-static/assets/FieldInput.stories-Dgzcgtdg.js @@ -1 +1 @@ -import{j as m}from"./jsx-runtime-CexXSJP5.js";import{F as t}from"./FieldInput-CIt9FN7x.js";import"./index-BP8_t0zE.js";import"./CharacterCount-BGgvgJrP.js";import"./theme-ui-components.esm-DCiJ1mMX.js";import"./parseProps-780b287c.browser.esm-DiCerVr_.js";import"./emotion-use-insertion-effect-with-fallbacks.browser.esm-UWD3gXM2.js";import"./theme-ui-core-jsx-runtime.browser.esm-CH0qhC10.js";import"./hoist-non-react-statics.cjs-CQI8syxn.js";const j={title:"Forms/FieldInput",component:t},r=()=>m.jsx(t,{placeholder:"Input placeholder",meta:{},input:{}}),e=()=>m.jsx(t,{placeholder:"Text area input",input:{},meta:{error:"What an error",touched:!0}});var o,a,p,s,n,i;r.parameters={...r.parameters,docs:{...null==(o=r.parameters)?void 0:o.docs,source:{originalSource:'() => ',...null==(p=null==(a=r.parameters)?void 0:a.docs)?void 0:p.source}}},e.parameters={...e.parameters,docs:{...null==(s=e.parameters)?void 0:s.docs,source:{originalSource:"() => ",...null==(i=null==(n=e.parameters)?void 0:n.docs)?void 0:i.source}}};const E=["Default","WithError"];export{r as Default,e as WithError,E as __namedExportsOrder,j as default}; \ No newline at end of file +import{j as m}from"./jsx-runtime-CexXSJP5.js";import{F as t}from"./FieldInput-CGUt93Kw.js";import"./index-BP8_t0zE.js";import"./CharacterCount-CVY3hBeQ.js";import"./theme-ui-components.esm-BngKL4Rx.js";import"./parseProps-780b287c.browser.esm-DiCerVr_.js";import"./emotion-use-insertion-effect-with-fallbacks.browser.esm-UWD3gXM2.js";import"./theme-ui-core-jsx-runtime.browser.esm-CH0qhC10.js";import"./hoist-non-react-statics.cjs-CQI8syxn.js";const j={title:"Forms/FieldInput",component:t},r=()=>m.jsx(t,{placeholder:"Input placeholder",meta:{},input:{}}),e=()=>m.jsx(t,{placeholder:"Text area input",input:{},meta:{error:"What an error",touched:!0}});var o,a,p,s,n,i;r.parameters={...r.parameters,docs:{...null==(o=r.parameters)?void 0:o.docs,source:{originalSource:'() => ',...null==(p=null==(a=r.parameters)?void 0:a.docs)?void 0:p.source}}},e.parameters={...e.parameters,docs:{...null==(s=e.parameters)?void 0:s.docs,source:{originalSource:"() => ",...null==(i=null==(n=e.parameters)?void 0:n.docs)?void 0:i.source}}};const E=["Default","WithError"];export{r as Default,e as WithError,E as __namedExportsOrder,j as default}; \ No newline at end of file diff --git a/storybook-static/assets/FieldTextarea-msSeWkcr.js b/storybook-static/assets/FieldTextarea-oZDGU0lI.js similarity index 77% rename from storybook-static/assets/FieldTextarea-msSeWkcr.js rename to storybook-static/assets/FieldTextarea-oZDGU0lI.js index 0fa66813b9..492877876c 100644 --- a/storybook-static/assets/FieldTextarea-msSeWkcr.js +++ b/storybook-static/assets/FieldTextarea-oZDGU0lI.js @@ -1 +1 @@ -import{j as o}from"./jsx-runtime-CexXSJP5.js";import{r as g}from"./index-BP8_t0zE.js";import{C as m}from"./CharacterCount-BGgvgJrP.js";import{F as z,T as C,b as _}from"./theme-ui-components.esm-DCiJ1mMX.js";const F=e=>e.charAt(0).toUpperCase()+e.slice(1),b=(e,r)=>("string"!=typeof e||(r.trim&&(e=e.trim()),r.capitalize&&(e=F(e))),e),f=({input:e,meta:r,disabled:a,modifiers:t,customOnBlur:n,minLength:i=0,maxLength:l,showCharacterCount:s,rows:u,...d})=>{var c,p;const[h,x]=g.useState((null==(c=null==e?void 0:e.value)?void 0:c.length)??0);return o.jsxs(z,{sx:{flexDirection:"column",gap:1},children:[r.error&&r.touched&&o.jsx(C,{sx:{fontSize:1,color:"error"},children:r.error}),o.jsx(_,{disabled:a,minLength:i,maxLength:l,variant:null!=r&&r.error&&null!=r&&r.touched?"textareaError":"textarea",rows:u||5,sx:{resize:null!=(p=null==d?void 0:d.style)&&p.resize?d.style.resize:"vertical"},...e,...d,onBlur:r=>{t&&(r.target.value=b(r.target.value,t),e.onChange(r)),n&&n(r),e.onBlur()},onChange:r=>{s&&x(r.target.value.length),e.onChange(r)}}),s&&l&&o.jsx(m,{minSize:i,maxSize:l,currentSize:h})]})};try{f.displayName="FieldTextarea",f.__docgenInfo={description:"",displayName:"FieldTextarea",props:{disabled:{defaultValue:null,description:"",name:"disabled",required:!1,type:{name:"boolean"}},showCharacterCount:{defaultValue:null,description:"",name:"showCharacterCount",required:!1,type:{name:"boolean"}},"data-cy":{defaultValue:null,description:"",name:"data-cy",required:!1,type:{name:"string"}},customOnBlur:{defaultValue:null,description:"",name:"customOnBlur",required:!1,type:{name:"((event: any) => void)"}},rows:{defaultValue:null,description:"",name:"rows",required:!1,type:{name:"number"}}}}}catch{}export{f as F}; \ No newline at end of file +import{j as o}from"./jsx-runtime-CexXSJP5.js";import{r as g}from"./index-BP8_t0zE.js";import{C as m}from"./CharacterCount-CVY3hBeQ.js";import{F as z,T as C,b as _}from"./theme-ui-components.esm-BngKL4Rx.js";const F=e=>e.charAt(0).toUpperCase()+e.slice(1),b=(e,r)=>("string"!=typeof e||(r.trim&&(e=e.trim()),r.capitalize&&(e=F(e))),e),f=({input:e,meta:r,disabled:a,modifiers:t,customOnBlur:n,minLength:l=0,maxLength:i,showCharacterCount:s,rows:u,...d})=>{var c,p;const[h,x]=g.useState((null==(c=null==e?void 0:e.value)?void 0:c.length)??0);return o.jsxs(z,{sx:{flexDirection:"column",gap:1},children:[r.error&&r.touched&&o.jsx(C,{sx:{fontSize:1,color:"error"},children:r.error}),o.jsx(_,{disabled:a,minLength:l,maxLength:i,variant:null!=r&&r.error&&null!=r&&r.touched?"textareaError":"textarea",rows:u||5,sx:{resize:null!=(p=null==d?void 0:d.style)&&p.resize?d.style.resize:"vertical"},...e,...d,onBlur:r=>{t&&(r.target.value=b(r.target.value,t),e.onChange(r)),n&&n(r),e.onBlur()},onChange:r=>{s&&x(r.target.value.length),e.onChange(r)}}),s&&i&&o.jsx(m,{minSize:l,maxSize:i,currentSize:h})]})};try{f.displayName="FieldTextarea",f.__docgenInfo={description:"",displayName:"FieldTextarea",props:{disabled:{defaultValue:null,description:"",name:"disabled",required:!1,type:{name:"boolean"}},showCharacterCount:{defaultValue:null,description:"",name:"showCharacterCount",required:!1,type:{name:"boolean"}},"data-cy":{defaultValue:null,description:"",name:"data-cy",required:!1,type:{name:"string"}},customOnBlur:{defaultValue:null,description:"",name:"customOnBlur",required:!1,type:{name:"((event: any) => void)"}},rows:{defaultValue:null,description:"",name:"rows",required:!1,type:{name:"number"}}}}}catch{}export{f as F}; \ No newline at end of file diff --git a/storybook-static/assets/FieldTextarea.stories-BPuU9jRK.js b/storybook-static/assets/FieldTextarea.stories-Bv4569fp.js similarity index 94% rename from storybook-static/assets/FieldTextarea.stories-BPuU9jRK.js rename to storybook-static/assets/FieldTextarea.stories-Bv4569fp.js index a1e9cdca74..c2bd96dc03 100644 --- a/storybook-static/assets/FieldTextarea.stories-BPuU9jRK.js +++ b/storybook-static/assets/FieldTextarea.stories-Bv4569fp.js @@ -1 +1 @@ -import{j as e}from"./jsx-runtime-CexXSJP5.js";import{F as r}from"./FieldTextarea-msSeWkcr.js";import"./index-BP8_t0zE.js";import"./CharacterCount-BGgvgJrP.js";import"./theme-ui-components.esm-DCiJ1mMX.js";import"./parseProps-780b287c.browser.esm-DiCerVr_.js";import"./emotion-use-insertion-effect-with-fallbacks.browser.esm-UWD3gXM2.js";import"./theme-ui-core-jsx-runtime.browser.esm-CH0qhC10.js";import"./hoist-non-react-statics.cjs-CQI8syxn.js";const D={title:"Forms/FieldTextarea",component:r},a=()=>e.jsx(r,{input:{},placeholder:"Text area input",meta:{}}),t=()=>e.jsx(r,{input:{},placeholder:"Text area input is not resizable",sx:{resize:"none"},meta:{error:"What an error",touched:!0}}),o=()=>e.jsx(r,{input:{},placeholder:"Text area input",meta:{error:"What an error",touched:!0}}),w=[{currentSize:5,minSize:0,maxSize:200,error:null},{currentSize:25,minSize:50,maxSize:200,error:"Character count must be a greater than 50 characters"},{currentSize:500,minSize:0,maxSize:100,error:"Character count must be a less than 100 characters"}],n=()=>e.jsx(e.Fragment,{children:w.map(((a,t)=>e.jsx(r,{input:{value:"Hello ".repeat(Math.round(a.currentSize/6))},placeholder:"Text area input",meta:{touched:!0},minLength:a.minSize,maxLength:a.maxSize,showCharacterCount:!0},t)))}),s=()=>e.jsx(r,{input:{},placeholder:"Text area input",meta:{},rows:10});var u,c,p,m,l,d,h,x,z,S,T,C,g,F,W;a.parameters={...a.parameters,docs:{...null==(u=a.parameters)?void 0:u.docs,source:{originalSource:'() => ',...null==(p=null==(c=a.parameters)?void 0:c.docs)?void 0:p.source}}},t.parameters={...t.parameters,docs:{...null==(m=t.parameters)?void 0:m.docs,source:{originalSource:"() => ",...null==(d=null==(l=t.parameters)?void 0:l.docs)?void 0:d.source}}},o.parameters={...o.parameters,docs:{...null==(h=o.parameters)?void 0:h.docs,source:{originalSource:"() => ",...null==(z=null==(x=o.parameters)?void 0:x.docs)?void 0:z.source}}},n.parameters={...n.parameters,docs:{...null==(S=n.parameters)?void 0:S.docs,source:{originalSource:"() => <>\n {characterCountValues.map((state, index) => {\n return ;\n })}\n ",...null==(C=null==(T=n.parameters)?void 0:T.docs)?void 0:C.source}}},s.parameters={...s.parameters,docs:{...null==(g=s.parameters)?void 0:g.docs,source:{originalSource:'() => ',...null==(W=null==(F=s.parameters)?void 0:F.docs)?void 0:W.source}}};const M=["Default","WithoutResizeHandle","WithError","WithCharacterCounts","CustomRowHeight"];export{s as CustomRowHeight,a as Default,n as WithCharacterCounts,o as WithError,t as WithoutResizeHandle,M as __namedExportsOrder,D as default}; \ No newline at end of file +import{j as e}from"./jsx-runtime-CexXSJP5.js";import{F as r}from"./FieldTextarea-oZDGU0lI.js";import"./index-BP8_t0zE.js";import"./CharacterCount-CVY3hBeQ.js";import"./theme-ui-components.esm-BngKL4Rx.js";import"./parseProps-780b287c.browser.esm-DiCerVr_.js";import"./emotion-use-insertion-effect-with-fallbacks.browser.esm-UWD3gXM2.js";import"./theme-ui-core-jsx-runtime.browser.esm-CH0qhC10.js";import"./hoist-non-react-statics.cjs-CQI8syxn.js";const D={title:"Forms/FieldTextarea",component:r},a=()=>e.jsx(r,{input:{},placeholder:"Text area input",meta:{}}),t=()=>e.jsx(r,{input:{},placeholder:"Text area input is not resizable",sx:{resize:"none"},meta:{error:"What an error",touched:!0}}),o=()=>e.jsx(r,{input:{},placeholder:"Text area input",meta:{error:"What an error",touched:!0}}),w=[{currentSize:5,minSize:0,maxSize:200,error:null},{currentSize:25,minSize:50,maxSize:200,error:"Character count must be a greater than 50 characters"},{currentSize:500,minSize:0,maxSize:100,error:"Character count must be a less than 100 characters"}],n=()=>e.jsx(e.Fragment,{children:w.map(((a,t)=>e.jsx(r,{input:{value:"Hello ".repeat(Math.round(a.currentSize/6))},placeholder:"Text area input",meta:{touched:!0},minLength:a.minSize,maxLength:a.maxSize,showCharacterCount:!0},t)))}),s=()=>e.jsx(r,{input:{},placeholder:"Text area input",meta:{},rows:10});var u,c,p,m,l,d,h,x,z,S,T,C,g,F,W;a.parameters={...a.parameters,docs:{...null==(u=a.parameters)?void 0:u.docs,source:{originalSource:'() => ',...null==(p=null==(c=a.parameters)?void 0:c.docs)?void 0:p.source}}},t.parameters={...t.parameters,docs:{...null==(m=t.parameters)?void 0:m.docs,source:{originalSource:"() => ",...null==(d=null==(l=t.parameters)?void 0:l.docs)?void 0:d.source}}},o.parameters={...o.parameters,docs:{...null==(h=o.parameters)?void 0:h.docs,source:{originalSource:"() => ",...null==(z=null==(x=o.parameters)?void 0:x.docs)?void 0:z.source}}},n.parameters={...n.parameters,docs:{...null==(S=n.parameters)?void 0:S.docs,source:{originalSource:"() => <>\n {characterCountValues.map((state, index) => {\n return ;\n })}\n ",...null==(C=null==(T=n.parameters)?void 0:T.docs)?void 0:C.source}}},s.parameters={...s.parameters,docs:{...null==(g=s.parameters)?void 0:g.docs,source:{originalSource:'() => ',...null==(W=null==(F=s.parameters)?void 0:F.docs)?void 0:W.source}}};const M=["Default","WithoutResizeHandle","WithError","WithCharacterCounts","CustomRowHeight"];export{s as CustomRowHeight,a as Default,n as WithCharacterCounts,o as WithError,t as WithoutResizeHandle,M as __namedExportsOrder,D as default}; \ No newline at end of file diff --git a/storybook-static/assets/FilePlayer-CkKJDhh1.js b/storybook-static/assets/FilePlayer-CHzHVn_0.js similarity index 99% rename from storybook-static/assets/FilePlayer-CkKJDhh1.js rename to storybook-static/assets/FilePlayer-CHzHVn_0.js index 3c4e797ae8..76b2e50689 100644 --- a/storybook-static/assets/FilePlayer-CkKJDhh1.js +++ b/storybook-static/assets/FilePlayer-CHzHVn_0.js @@ -1 +1 @@ -import{g as b,r as _}from"./index-BP8_t0zE.js";import{u as O,p as A}from"./VideoPlayer-ggRAiP4x.js";function R(e,t){for(var s=0;sr[t]})}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}var I=Object.create,u=Object.defineProperty,D=Object.getOwnPropertyDescriptor,w=Object.getOwnPropertyNames,M=Object.getPrototypeOf,k=Object.prototype.hasOwnProperty,U=(e,t,s)=>t in e?u(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s,N=(e,t)=>{for(var s in t)u(e,s,{get:t[s],enumerable:!0})},E=(e,t,s,r)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let i of w(t))!k.call(e,i)&&i!==s&&u(e,i,{get:()=>t[i],enumerable:!(r=D(t,i))||r.enumerable});return e},j=(e,t,s)=>(s=null!=e?I(M(e)):{},E(e&&e.__esModule?s:u(s,"default",{value:e,enumerable:!0}),e)),H=e=>E(u({},"__esModule",{value:!0}),e),r=(e,t,s)=>(U(e,"symbol"!=typeof t?t+"":t,s),s),m={};N(m,{default:()=>P});var g=H(m),d=j(_),a=O,c=A;const y=typeof navigator<"u",F=y&&"MacIntel"===navigator.platform&&navigator.maxTouchPoints>1,v=y&&(/iPad|iPhone|iPod/.test(navigator.userAgent)||F)&&!window.MSStream,V=y&&/^((?!chrome|android).)*safari/i.test(navigator.userAgent)&&!window.MSStream,T="https://cdn.jsdelivr.net/npm/hls.js@VERSION/dist/hls.min.js",C="Hls",B="https://cdnjs.cloudflare.com/ajax/libs/dashjs/VERSION/dash.all.min.js",x="dashjs",K="https://cdn.jsdelivr.net/npm/flv.js@VERSION/dist/flv.min.js",G="flvjs",X=/www\.dropbox\.com\/.+/,f=/https:\/\/watch\.cloudflarestream\.com\/([a-z0-9]+)/,W="https://videodelivery.net/{id}/manifest/video.m3u8";class P extends d.Component{constructor(){super(...arguments),r(this,"onReady",((...e)=>this.props.onReady(...e))),r(this,"onPlay",((...e)=>this.props.onPlay(...e))),r(this,"onBuffer",((...e)=>this.props.onBuffer(...e))),r(this,"onBufferEnd",((...e)=>this.props.onBufferEnd(...e))),r(this,"onPause",((...e)=>this.props.onPause(...e))),r(this,"onEnded",((...e)=>this.props.onEnded(...e))),r(this,"onError",((...e)=>this.props.onError(...e))),r(this,"onPlayBackRateChange",(e=>this.props.onPlaybackRateChange(e.target.playbackRate))),r(this,"onEnablePIP",((...e)=>this.props.onEnablePIP(...e))),r(this,"onDisablePIP",(e=>{const{onDisablePIP:t,playing:s}=this.props;t(e),s&&this.play()})),r(this,"onPresentationModeChange",(e=>{if(this.player&&(0,a.supportsWebKitPresentationMode)(this.player)){const{webkitPresentationMode:t}=this.player;"picture-in-picture"===t?this.onEnablePIP(e):"inline"===t&&this.onDisablePIP(e)}})),r(this,"onSeek",(e=>{this.props.onSeek(e.target.currentTime)})),r(this,"mute",(()=>{this.player.muted=!0})),r(this,"unmute",(()=>{this.player.muted=!1})),r(this,"renderSourceElement",((e,t)=>"string"==typeof e?d.default.createElement("source",{key:t,src:e}):d.default.createElement("source",{key:t,...e}))),r(this,"renderTrack",((e,t)=>d.default.createElement("track",{key:t,...e}))),r(this,"ref",(e=>{this.player&&(this.prevPlayer=this.player),this.player=e}))}componentDidMount(){this.props.onMount&&this.props.onMount(this),this.addListeners(this.player);const e=this.getSource(this.props.url);e&&(this.player.src=e),(v||this.props.config.forceDisableHls)&&this.player.load()}componentDidUpdate(e){this.shouldUseAudio(this.props)!==this.shouldUseAudio(e)&&(this.removeListeners(this.prevPlayer,e.url),this.addListeners(this.player)),this.props.url!==e.url&&!(0,a.isMediaStream)(this.props.url)&&!(this.props.url instanceof Array)&&(this.player.srcObject=null)}componentWillUnmount(){this.player.removeAttribute("src"),this.removeListeners(this.player),this.hls&&this.hls.destroy()}addListeners(e){const{url:t,playsinline:s}=this.props;e.addEventListener("play",this.onPlay),e.addEventListener("waiting",this.onBuffer),e.addEventListener("playing",this.onBufferEnd),e.addEventListener("pause",this.onPause),e.addEventListener("seeked",this.onSeek),e.addEventListener("ended",this.onEnded),e.addEventListener("error",this.onError),e.addEventListener("ratechange",this.onPlayBackRateChange),e.addEventListener("enterpictureinpicture",this.onEnablePIP),e.addEventListener("leavepictureinpicture",this.onDisablePIP),e.addEventListener("webkitpresentationmodechanged",this.onPresentationModeChange),this.shouldUseHLS(t)||e.addEventListener("canplay",this.onReady),s&&(e.setAttribute("playsinline",""),e.setAttribute("webkit-playsinline",""),e.setAttribute("x5-playsinline",""))}removeListeners(e,t){e.removeEventListener("canplay",this.onReady),e.removeEventListener("play",this.onPlay),e.removeEventListener("waiting",this.onBuffer),e.removeEventListener("playing",this.onBufferEnd),e.removeEventListener("pause",this.onPause),e.removeEventListener("seeked",this.onSeek),e.removeEventListener("ended",this.onEnded),e.removeEventListener("error",this.onError),e.removeEventListener("ratechange",this.onPlayBackRateChange),e.removeEventListener("enterpictureinpicture",this.onEnablePIP),e.removeEventListener("leavepictureinpicture",this.onDisablePIP),e.removeEventListener("webkitpresentationmodechanged",this.onPresentationModeChange),this.shouldUseHLS(t)||e.removeEventListener("canplay",this.onReady)}shouldUseAudio(e){return!e.config.forceVideo&&!e.config.attributes.poster&&(c.AUDIO_EXTENSIONS.test(e.url)||e.config.forceAudio)}shouldUseHLS(e){return!!(V&&this.props.config.forceSafariHLS||this.props.config.forceHLS)||!v&&!this.props.config.forceDisableHls&&(c.HLS_EXTENSIONS.test(e)||f.test(e))}shouldUseDASH(e){return c.DASH_EXTENSIONS.test(e)||this.props.config.forceDASH}shouldUseFLV(e){return c.FLV_EXTENSIONS.test(e)||this.props.config.forceFLV}load(e){const{hlsVersion:t,hlsOptions:s,dashVersion:r,flvVersion:i}=this.props.config;if(this.hls&&this.hls.destroy(),this.dash&&this.dash.reset(),this.shouldUseHLS(e)&&(0,a.getSDK)(T.replace("VERSION",t),C).then((t=>{if(this.hls=new t(s),this.hls.on(t.Events.MANIFEST_PARSED,(()=>{this.props.onReady()})),this.hls.on(t.Events.ERROR,((e,s)=>{this.props.onError(e,s,this.hls,t)})),f.test(e)){const t=e.match(f)[1];this.hls.loadSource(W.replace("{id}",t))}else this.hls.loadSource(e);this.hls.attachMedia(this.player),this.props.onLoaded()})),this.shouldUseDASH(e)&&(0,a.getSDK)(B.replace("VERSION",r),x).then((t=>{this.dash=t.MediaPlayer().create(),this.dash.initialize(this.player,e,this.props.playing),this.dash.on("error",this.props.onError),parseInt(r)<3?this.dash.getDebug().setLogToBrowserConsole(!1):this.dash.updateSettings({debug:{logLevel:t.Debug.LOG_LEVEL_NONE}}),this.props.onLoaded()})),this.shouldUseFLV(e)&&(0,a.getSDK)(K.replace("VERSION",i),G).then((t=>{this.flv=t.createPlayer({type:"flv",url:e}),this.flv.attachMediaElement(this.player),this.flv.on(t.Events.ERROR,((e,s)=>{this.props.onError(e,s,this.flv,t)})),this.flv.load(),this.props.onLoaded()})),e instanceof Array)this.player.load();else if((0,a.isMediaStream)(e))try{this.player.srcObject=e}catch{this.player.src=window.URL.createObjectURL(e)}}play(){const e=this.player.play();e&&e.catch(this.props.onError)}pause(){this.player.pause()}stop(){this.player.removeAttribute("src"),this.dash&&this.dash.reset()}seekTo(e,t=!0){this.player.currentTime=e,t||this.pause()}setVolume(e){this.player.volume=e}enablePIP(){this.player.requestPictureInPicture&&document.pictureInPictureElement!==this.player?this.player.requestPictureInPicture():(0,a.supportsWebKitPresentationMode)(this.player)&&"picture-in-picture"!==this.player.webkitPresentationMode&&this.player.webkitSetPresentationMode("picture-in-picture")}disablePIP(){document.exitPictureInPicture&&document.pictureInPictureElement===this.player?document.exitPictureInPicture():(0,a.supportsWebKitPresentationMode)(this.player)&&"inline"!==this.player.webkitPresentationMode&&this.player.webkitSetPresentationMode("inline")}setPlaybackRate(e){try{this.player.playbackRate=e}catch(t){this.props.onError(t)}}getDuration(){if(!this.player)return null;const{duration:e,seekable:t}=this.player;return e===1/0&&t.length>0?t.end(t.length-1):e}getCurrentTime(){return this.player?this.player.currentTime:null}getSecondsLoaded(){if(!this.player)return null;const{buffered:e}=this.player;if(0===e.length)return 0;const t=e.end(e.length-1),s=this.getDuration();return t>s?s:t}getSource(e){const t=this.shouldUseHLS(e),s=this.shouldUseDASH(e),r=this.shouldUseFLV(e);if(!(e instanceof Array||(0,a.isMediaStream)(e)||t||s||r))return X.test(e)?e.replace("www.dropbox.com","dl.dropboxusercontent.com"):e}render(){const{url:e,playing:t,loop:s,controls:r,muted:i,config:n,width:o,height:a}=this.props,h=this.shouldUseAudio(this.props)?"audio":"video",l={width:"auto"===o?o:"100%",height:"auto"===a?a:"100%"};return d.default.createElement(h,{ref:this.ref,src:this.getSource(e),style:l,preload:"auto",autoPlay:t||void 0,controls:r,muted:i,loop:s,...n.attributes},e instanceof Array&&e.map(this.renderSourceElement),n.tracks.map(this.renderTrack))}}r(P,"displayName","FilePlayer"),r(P,"canPlay",c.canPlay.file);const z=b(g),Q=R({__proto__:null,default:z},[g]);export{Q as F}; \ No newline at end of file +import{g as b,r as _}from"./index-BP8_t0zE.js";import{u as O,p as A}from"./VideoPlayer-DllXxlDZ.js";function R(e,t){for(var s=0;sr[t]})}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}var I=Object.create,u=Object.defineProperty,D=Object.getOwnPropertyDescriptor,w=Object.getOwnPropertyNames,M=Object.getPrototypeOf,k=Object.prototype.hasOwnProperty,U=(e,t,s)=>t in e?u(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s,N=(e,t)=>{for(var s in t)u(e,s,{get:t[s],enumerable:!0})},E=(e,t,s,r)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let i of w(t))!k.call(e,i)&&i!==s&&u(e,i,{get:()=>t[i],enumerable:!(r=D(t,i))||r.enumerable});return e},j=(e,t,s)=>(s=null!=e?I(M(e)):{},E(e&&e.__esModule?s:u(s,"default",{value:e,enumerable:!0}),e)),H=e=>E(u({},"__esModule",{value:!0}),e),r=(e,t,s)=>(U(e,"symbol"!=typeof t?t+"":t,s),s),m={};N(m,{default:()=>P});var g=H(m),d=j(_),a=O,c=A;const y=typeof navigator<"u",F=y&&"MacIntel"===navigator.platform&&navigator.maxTouchPoints>1,v=y&&(/iPad|iPhone|iPod/.test(navigator.userAgent)||F)&&!window.MSStream,V=y&&/^((?!chrome|android).)*safari/i.test(navigator.userAgent)&&!window.MSStream,T="https://cdn.jsdelivr.net/npm/hls.js@VERSION/dist/hls.min.js",C="Hls",B="https://cdnjs.cloudflare.com/ajax/libs/dashjs/VERSION/dash.all.min.js",x="dashjs",K="https://cdn.jsdelivr.net/npm/flv.js@VERSION/dist/flv.min.js",G="flvjs",X=/www\.dropbox\.com\/.+/,f=/https:\/\/watch\.cloudflarestream\.com\/([a-z0-9]+)/,W="https://videodelivery.net/{id}/manifest/video.m3u8";class P extends d.Component{constructor(){super(...arguments),r(this,"onReady",((...e)=>this.props.onReady(...e))),r(this,"onPlay",((...e)=>this.props.onPlay(...e))),r(this,"onBuffer",((...e)=>this.props.onBuffer(...e))),r(this,"onBufferEnd",((...e)=>this.props.onBufferEnd(...e))),r(this,"onPause",((...e)=>this.props.onPause(...e))),r(this,"onEnded",((...e)=>this.props.onEnded(...e))),r(this,"onError",((...e)=>this.props.onError(...e))),r(this,"onPlayBackRateChange",(e=>this.props.onPlaybackRateChange(e.target.playbackRate))),r(this,"onEnablePIP",((...e)=>this.props.onEnablePIP(...e))),r(this,"onDisablePIP",(e=>{const{onDisablePIP:t,playing:s}=this.props;t(e),s&&this.play()})),r(this,"onPresentationModeChange",(e=>{if(this.player&&(0,a.supportsWebKitPresentationMode)(this.player)){const{webkitPresentationMode:t}=this.player;"picture-in-picture"===t?this.onEnablePIP(e):"inline"===t&&this.onDisablePIP(e)}})),r(this,"onSeek",(e=>{this.props.onSeek(e.target.currentTime)})),r(this,"mute",(()=>{this.player.muted=!0})),r(this,"unmute",(()=>{this.player.muted=!1})),r(this,"renderSourceElement",((e,t)=>"string"==typeof e?d.default.createElement("source",{key:t,src:e}):d.default.createElement("source",{key:t,...e}))),r(this,"renderTrack",((e,t)=>d.default.createElement("track",{key:t,...e}))),r(this,"ref",(e=>{this.player&&(this.prevPlayer=this.player),this.player=e}))}componentDidMount(){this.props.onMount&&this.props.onMount(this),this.addListeners(this.player);const e=this.getSource(this.props.url);e&&(this.player.src=e),(v||this.props.config.forceDisableHls)&&this.player.load()}componentDidUpdate(e){this.shouldUseAudio(this.props)!==this.shouldUseAudio(e)&&(this.removeListeners(this.prevPlayer,e.url),this.addListeners(this.player)),this.props.url!==e.url&&!(0,a.isMediaStream)(this.props.url)&&!(this.props.url instanceof Array)&&(this.player.srcObject=null)}componentWillUnmount(){this.player.removeAttribute("src"),this.removeListeners(this.player),this.hls&&this.hls.destroy()}addListeners(e){const{url:t,playsinline:s}=this.props;e.addEventListener("play",this.onPlay),e.addEventListener("waiting",this.onBuffer),e.addEventListener("playing",this.onBufferEnd),e.addEventListener("pause",this.onPause),e.addEventListener("seeked",this.onSeek),e.addEventListener("ended",this.onEnded),e.addEventListener("error",this.onError),e.addEventListener("ratechange",this.onPlayBackRateChange),e.addEventListener("enterpictureinpicture",this.onEnablePIP),e.addEventListener("leavepictureinpicture",this.onDisablePIP),e.addEventListener("webkitpresentationmodechanged",this.onPresentationModeChange),this.shouldUseHLS(t)||e.addEventListener("canplay",this.onReady),s&&(e.setAttribute("playsinline",""),e.setAttribute("webkit-playsinline",""),e.setAttribute("x5-playsinline",""))}removeListeners(e,t){e.removeEventListener("canplay",this.onReady),e.removeEventListener("play",this.onPlay),e.removeEventListener("waiting",this.onBuffer),e.removeEventListener("playing",this.onBufferEnd),e.removeEventListener("pause",this.onPause),e.removeEventListener("seeked",this.onSeek),e.removeEventListener("ended",this.onEnded),e.removeEventListener("error",this.onError),e.removeEventListener("ratechange",this.onPlayBackRateChange),e.removeEventListener("enterpictureinpicture",this.onEnablePIP),e.removeEventListener("leavepictureinpicture",this.onDisablePIP),e.removeEventListener("webkitpresentationmodechanged",this.onPresentationModeChange),this.shouldUseHLS(t)||e.removeEventListener("canplay",this.onReady)}shouldUseAudio(e){return!e.config.forceVideo&&!e.config.attributes.poster&&(c.AUDIO_EXTENSIONS.test(e.url)||e.config.forceAudio)}shouldUseHLS(e){return!!(V&&this.props.config.forceSafariHLS||this.props.config.forceHLS)||!v&&!this.props.config.forceDisableHls&&(c.HLS_EXTENSIONS.test(e)||f.test(e))}shouldUseDASH(e){return c.DASH_EXTENSIONS.test(e)||this.props.config.forceDASH}shouldUseFLV(e){return c.FLV_EXTENSIONS.test(e)||this.props.config.forceFLV}load(e){const{hlsVersion:t,hlsOptions:s,dashVersion:r,flvVersion:i}=this.props.config;if(this.hls&&this.hls.destroy(),this.dash&&this.dash.reset(),this.shouldUseHLS(e)&&(0,a.getSDK)(T.replace("VERSION",t),C).then((t=>{if(this.hls=new t(s),this.hls.on(t.Events.MANIFEST_PARSED,(()=>{this.props.onReady()})),this.hls.on(t.Events.ERROR,((e,s)=>{this.props.onError(e,s,this.hls,t)})),f.test(e)){const t=e.match(f)[1];this.hls.loadSource(W.replace("{id}",t))}else this.hls.loadSource(e);this.hls.attachMedia(this.player),this.props.onLoaded()})),this.shouldUseDASH(e)&&(0,a.getSDK)(B.replace("VERSION",r),x).then((t=>{this.dash=t.MediaPlayer().create(),this.dash.initialize(this.player,e,this.props.playing),this.dash.on("error",this.props.onError),parseInt(r)<3?this.dash.getDebug().setLogToBrowserConsole(!1):this.dash.updateSettings({debug:{logLevel:t.Debug.LOG_LEVEL_NONE}}),this.props.onLoaded()})),this.shouldUseFLV(e)&&(0,a.getSDK)(K.replace("VERSION",i),G).then((t=>{this.flv=t.createPlayer({type:"flv",url:e}),this.flv.attachMediaElement(this.player),this.flv.on(t.Events.ERROR,((e,s)=>{this.props.onError(e,s,this.flv,t)})),this.flv.load(),this.props.onLoaded()})),e instanceof Array)this.player.load();else if((0,a.isMediaStream)(e))try{this.player.srcObject=e}catch{this.player.src=window.URL.createObjectURL(e)}}play(){const e=this.player.play();e&&e.catch(this.props.onError)}pause(){this.player.pause()}stop(){this.player.removeAttribute("src"),this.dash&&this.dash.reset()}seekTo(e,t=!0){this.player.currentTime=e,t||this.pause()}setVolume(e){this.player.volume=e}enablePIP(){this.player.requestPictureInPicture&&document.pictureInPictureElement!==this.player?this.player.requestPictureInPicture():(0,a.supportsWebKitPresentationMode)(this.player)&&"picture-in-picture"!==this.player.webkitPresentationMode&&this.player.webkitSetPresentationMode("picture-in-picture")}disablePIP(){document.exitPictureInPicture&&document.pictureInPictureElement===this.player?document.exitPictureInPicture():(0,a.supportsWebKitPresentationMode)(this.player)&&"inline"!==this.player.webkitPresentationMode&&this.player.webkitSetPresentationMode("inline")}setPlaybackRate(e){try{this.player.playbackRate=e}catch(t){this.props.onError(t)}}getDuration(){if(!this.player)return null;const{duration:e,seekable:t}=this.player;return e===1/0&&t.length>0?t.end(t.length-1):e}getCurrentTime(){return this.player?this.player.currentTime:null}getSecondsLoaded(){if(!this.player)return null;const{buffered:e}=this.player;if(0===e.length)return 0;const t=e.end(e.length-1),s=this.getDuration();return t>s?s:t}getSource(e){const t=this.shouldUseHLS(e),s=this.shouldUseDASH(e),r=this.shouldUseFLV(e);if(!(e instanceof Array||(0,a.isMediaStream)(e)||t||s||r))return X.test(e)?e.replace("www.dropbox.com","dl.dropboxusercontent.com"):e}render(){const{url:e,playing:t,loop:s,controls:r,muted:i,config:n,width:o,height:a}=this.props,h=this.shouldUseAudio(this.props)?"audio":"video",l={width:"auto"===o?o:"100%",height:"auto"===a?a:"100%"};return d.default.createElement(h,{ref:this.ref,src:this.getSource(e),style:l,preload:"auto",autoPlay:t||void 0,controls:r,muted:i,loop:s,...n.attributes},e instanceof Array&&e.map(this.renderSourceElement),n.tracks.map(this.renderTrack))}}r(P,"displayName","FilePlayer"),r(P,"canPlay",c.canPlay.file);const z=b(g),Q=R({__proto__:null,default:z},[g]);export{Q as F}; \ No newline at end of file diff --git a/storybook-static/assets/FollowButton-gF1fEo3D.js b/storybook-static/assets/FollowButton-CYJNiQil.js similarity index 95% rename from storybook-static/assets/FollowButton-gF1fEo3D.js rename to storybook-static/assets/FollowButton-CYJNiQil.js index 31c5f46e70..f9ab3d567d 100644 --- a/storybook-static/assets/FollowButton-gF1fEo3D.js +++ b/storybook-static/assets/FollowButton-CYJNiQil.js @@ -1 +1 @@ -import{j as e}from"./jsx-runtime-CexXSJP5.js";import{r as d}from"./index-BP8_t0zE.js";import{B as u}from"./Button-B7QBvkxh.js";import{T as c}from"./Tooltip-B9mgSRkZ.js";import{u as p}from"./index-BXxqJQdV.js";const r=o=>{const{hasUserSubscribed:t,isLoggedIn:n,onFollowClick:i,sx:l}=o,r=p(),s=d.useMemo((()=>(16*Math.random()).toString()),[]);return e.jsxs(e.Fragment,{children:[e.jsx(u,{type:"button","data-testid":n?"follow-button":"follow-redirect","data-cy":n?"follow-button":"follow-redirect","data-tooltip-id":s,"data-tooltip-content":n?"":"Login to follow",icon:"thunderbolt",variant:"outline",iconColor:t?"subscribed":"notSubscribed",sx:{fontSize:2,py:0,...l},onClick:()=>n?i():r("/sign-in"),children:t?"Following":"Follow"}),e.jsx(c,{id:s})]})};try{r.displayName="FollowButton",r.__docgenInfo={description:"",displayName:"FollowButton",props:{hasUserSubscribed:{defaultValue:null,description:"",name:"hasUserSubscribed",required:!0,type:{name:"boolean"}},isLoggedIn:{defaultValue:null,description:"",name:"isLoggedIn",required:!0,type:{name:"boolean"}},onFollowClick:{defaultValue:null,description:"",name:"onFollowClick",required:!0,type:{name:"() => void"}},sx:{defaultValue:null,description:"",name:"sx",required:!1,type:{name:"ThemeUIStyleObject"}}}}}catch{}export{r as F}; \ No newline at end of file +import{j as e}from"./jsx-runtime-CexXSJP5.js";import{r as d}from"./index-BP8_t0zE.js";import{B as u}from"./Button-D4nxT_g_.js";import{T as c}from"./Tooltip-B9mgSRkZ.js";import{u as p}from"./index-BXxqJQdV.js";const r=o=>{const{hasUserSubscribed:t,isLoggedIn:n,onFollowClick:i,sx:l}=o,r=p(),s=d.useMemo((()=>(16*Math.random()).toString()),[]);return e.jsxs(e.Fragment,{children:[e.jsx(u,{type:"button","data-testid":n?"follow-button":"follow-redirect","data-cy":n?"follow-button":"follow-redirect","data-tooltip-id":s,"data-tooltip-content":n?"":"Login to follow",icon:"thunderbolt",variant:"outline",iconColor:t?"subscribed":"notSubscribed",sx:{fontSize:2,py:0,...l},onClick:()=>n?i():r("/sign-in"),children:t?"Following":"Follow"}),e.jsx(c,{id:s})]})};try{r.displayName="FollowButton",r.__docgenInfo={description:"",displayName:"FollowButton",props:{hasUserSubscribed:{defaultValue:null,description:"",name:"hasUserSubscribed",required:!0,type:{name:"boolean"}},isLoggedIn:{defaultValue:null,description:"",name:"isLoggedIn",required:!0,type:{name:"boolean"}},onFollowClick:{defaultValue:null,description:"",name:"onFollowClick",required:!0,type:{name:"() => void"}},sx:{defaultValue:null,description:"",name:"sx",required:!1,type:{name:"ThemeUIStyleObject"}}}}}catch{}export{r as F}; \ No newline at end of file diff --git a/storybook-static/assets/FollowButton.stories-C1pCGpXR.js b/storybook-static/assets/FollowButton.stories-DMJ3mTrQ.js similarity index 90% rename from storybook-static/assets/FollowButton.stories-C1pCGpXR.js rename to storybook-static/assets/FollowButton.stories-DMJ3mTrQ.js index 1dc69307e2..46556b6475 100644 --- a/storybook-static/assets/FollowButton.stories-C1pCGpXR.js +++ b/storybook-static/assets/FollowButton.stories-DMJ3mTrQ.js @@ -1 +1 @@ -import{j as t}from"./jsx-runtime-CexXSJP5.js";import{F as s}from"./FollowButton-gF1fEo3D.js";import"./index-BP8_t0zE.js";import"./Button-B7QBvkxh.js";import"./Icon-BoVZOGVD.js";import"./emotion-styled.browser.esm-Dz2BNYeh.js";import"./extends-CF3RwP-h.js";import"./parseProps-780b287c.browser.esm-DiCerVr_.js";import"./emotion-use-insertion-effect-with-fallbacks.browser.esm-UWD3gXM2.js";import"./supporter-D7hp958O.js";import"./icon-arrow-down-CJeToCJe.js";import"./icon-star-active-ClN6U5FF.js";import"./theme-ui-core-jsx-runtime.browser.esm-CH0qhC10.js";import"./hoist-non-react-statics.cjs-CQI8syxn.js";import"./theme-ui-components.esm-DCiJ1mMX.js";import"./Tooltip-B9mgSRkZ.js";import"./floating-ui.dom-DtcZXcvp.js";import"./index-BXxqJQdV.js";const R={title:"Components/FollowButton",component:s},o=()=>t.jsx(s,{isLoggedIn:!1,hasUserSubscribed:!1,onFollowClick:()=>null}),r=()=>t.jsx(s,{hasUserSubscribed:!1,isLoggedIn:!0,onFollowClick:()=>null}),e=()=>t.jsx(s,{hasUserSubscribed:!0,isLoggedIn:!0,onFollowClick:()=>null});var l,i,a,n,u,c,m,p,d;o.parameters={...o.parameters,docs:{...null==(l=o.parameters)?void 0:l.docs,source:{originalSource:"() => null} />",...null==(a=null==(i=o.parameters)?void 0:i.docs)?void 0:a.source}}},r.parameters={...r.parameters,docs:{...null==(n=r.parameters)?void 0:n.docs,source:{originalSource:"() => null} />",...null==(c=null==(u=r.parameters)?void 0:u.docs)?void 0:c.source}}},e.parameters={...e.parameters,docs:{...null==(m=e.parameters)?void 0:m.docs,source:{originalSource:"() => null} />",...null==(d=null==(p=e.parameters)?void 0:p.docs)?void 0:d.source}}};const q=["LoggedOut","LoggedIn","CurrentUserSubscribed"];export{e as CurrentUserSubscribed,r as LoggedIn,o as LoggedOut,q as __namedExportsOrder,R as default}; \ No newline at end of file +import{j as t}from"./jsx-runtime-CexXSJP5.js";import{F as s}from"./FollowButton-CYJNiQil.js";import"./index-BP8_t0zE.js";import"./Button-D4nxT_g_.js";import"./Icon-BoVZOGVD.js";import"./emotion-styled.browser.esm-Dz2BNYeh.js";import"./extends-CF3RwP-h.js";import"./parseProps-780b287c.browser.esm-DiCerVr_.js";import"./emotion-use-insertion-effect-with-fallbacks.browser.esm-UWD3gXM2.js";import"./supporter-D7hp958O.js";import"./icon-arrow-down-CJeToCJe.js";import"./icon-star-active-ClN6U5FF.js";import"./theme-ui-core-jsx-runtime.browser.esm-CH0qhC10.js";import"./hoist-non-react-statics.cjs-CQI8syxn.js";import"./theme-ui-components.esm-BngKL4Rx.js";import"./Tooltip-B9mgSRkZ.js";import"./floating-ui.dom-DtcZXcvp.js";import"./index-BXxqJQdV.js";const R={title:"Components/FollowButton",component:s},o=()=>t.jsx(s,{isLoggedIn:!1,hasUserSubscribed:!1,onFollowClick:()=>null}),r=()=>t.jsx(s,{hasUserSubscribed:!1,isLoggedIn:!0,onFollowClick:()=>null}),e=()=>t.jsx(s,{hasUserSubscribed:!0,isLoggedIn:!0,onFollowClick:()=>null});var l,i,a,n,u,c,m,p,d;o.parameters={...o.parameters,docs:{...null==(l=o.parameters)?void 0:l.docs,source:{originalSource:"() => null} />",...null==(a=null==(i=o.parameters)?void 0:i.docs)?void 0:a.source}}},r.parameters={...r.parameters,docs:{...null==(n=r.parameters)?void 0:n.docs,source:{originalSource:"() => null} />",...null==(c=null==(u=r.parameters)?void 0:u.docs)?void 0:c.source}}},e.parameters={...e.parameters,docs:{...null==(m=e.parameters)?void 0:m.docs,source:{originalSource:"() => null} />",...null==(d=null==(p=e.parameters)?void 0:p.docs)?void 0:d.source}}};const q=["LoggedOut","LoggedIn","CurrentUserSubscribed"];export{e as CurrentUserSubscribed,r as LoggedIn,o as LoggedOut,q as __namedExportsOrder,R as default}; \ No newline at end of file diff --git a/storybook-static/assets/Guidelines-CAuhvrJl.js b/storybook-static/assets/Guidelines-BB0ZBfiO.js similarity index 72% rename from storybook-static/assets/Guidelines-CAuhvrJl.js rename to storybook-static/assets/Guidelines-BB0ZBfiO.js index 6abba25d31..d07f65b9b6 100644 --- a/storybook-static/assets/Guidelines-CAuhvrJl.js +++ b/storybook-static/assets/Guidelines-BB0ZBfiO.js @@ -1 +1 @@ -import{j as e}from"./jsx-runtime-CexXSJP5.js";import{C as s,F as l,H as d,T as o}from"./theme-ui-components.esm-DCiJ1mMX.js";const a=({title:a,steps:i})=>e.jsx(s,{children:e.jsxs(l,{sx:{flexDirection:"column",padding:[2,3,4],gap:1},children:[e.jsx(d,{as:"h2",mb:2,children:a}),i.map(((s,a)=>e.jsxs(o,{variant:"auxiliary",children:[`${a+1}. `," ",s]},a)))]})});try{a.displayName="Guidelines",a.__docgenInfo={description:"",displayName:"Guidelines",props:{title:{defaultValue:null,description:"",name:"title",required:!0,type:{name:"string"}},steps:{defaultValue:null,description:"",name:"steps",required:!0,type:{name:"ReactElement>[]"}}}}}catch{}export{a as G}; \ No newline at end of file +import{j as e}from"./jsx-runtime-CexXSJP5.js";import{C as s,F as l,H as d,T as o}from"./theme-ui-components.esm-BngKL4Rx.js";const a=({title:a,steps:t})=>e.jsx(s,{children:e.jsxs(l,{sx:{flexDirection:"column",padding:[2,3,4],gap:1},children:[e.jsx(d,{as:"h2",mb:2,children:a}),t.map(((s,a)=>e.jsxs(o,{variant:"auxiliary",children:[`${a+1}. `," ",s]},a)))]})});try{a.displayName="Guidelines",a.__docgenInfo={description:"",displayName:"Guidelines",props:{title:{defaultValue:null,description:"",name:"title",required:!0,type:{name:"string"}},steps:{defaultValue:null,description:"",name:"steps",required:!0,type:{name:"ReactElement>[]"}}}}}catch{}export{a as G}; \ No newline at end of file diff --git a/storybook-static/assets/Guidelines.stories-CABYKxLN.js b/storybook-static/assets/Guidelines.stories-CKmkQ2AV.js similarity index 90% rename from storybook-static/assets/Guidelines.stories-CABYKxLN.js rename to storybook-static/assets/Guidelines.stories-CKmkQ2AV.js index 47e072b034..e09cf5b398 100644 --- a/storybook-static/assets/Guidelines.stories-CABYKxLN.js +++ b/storybook-static/assets/Guidelines.stories-CKmkQ2AV.js @@ -1 +1 @@ -import{j as e}from"./jsx-runtime-CexXSJP5.js";import{E as o}from"./ExternalLink-CHmx7fZ7.js";import{G as i}from"./Guidelines-CAuhvrJl.js";import"./index-BP8_t0zE.js";import"./theme-ui-components.esm-DCiJ1mMX.js";import"./parseProps-780b287c.browser.esm-DiCerVr_.js";import"./emotion-use-insertion-effect-with-fallbacks.browser.esm-UWD3gXM2.js";import"./theme-ui-core-jsx-runtime.browser.esm-CH0qhC10.js";import"./hoist-non-react-statics.cjs-CQI8syxn.js";const g={title:"Forms/Guidelines",component:i},r=()=>e.jsx(i,{title:"How does it work?",steps:[e.jsxs(e.Fragment,{children:["Choose a topic you want to research"," ",e.jsx("span",{role:"img","aria-label":"raised-hand",children:"\ud83d\ude4c"})]}),e.jsxs(e.Fragment,{children:["Read"," ",e.jsxs(o,{sx:{color:"blue"},href:"/academy/guides/research",children:["our guidelines"," ",e.jsx("span",{role:"img","aria-label":"nerd-face",children:"\ud83e\udd13"})]})]}),e.jsxs(e.Fragment,{children:["Write your introduction"," ",e.jsx("span",{role:"img","aria-label":"archive-box",children:"\ud83d\uddc4\ufe0f"})]})]});var a,n,s;r.parameters={...r.parameters,docs:{...null==(a=r.parameters)?void 0:a.docs,source:{originalSource:'() => \n Choose a topic you want to research{\' \'}\n \n \ud83d\ude4c\n \n , <>\n Read{\' \'}\n \n our guidelines{\' \'}\n \n \ud83e\udd13\n \n \n , <>\n Write your introduction{\' \'}\n \n \ud83d\uddc4\ufe0f\n \n ]} />',...null==(s=null==(n=r.parameters)?void 0:n.docs)?void 0:s.source}}};const D=["Default"];export{r as Default,D as __namedExportsOrder,g as default}; \ No newline at end of file +import{j as e}from"./jsx-runtime-CexXSJP5.js";import{E as o}from"./ExternalLink-DC09teyd.js";import{G as i}from"./Guidelines-BB0ZBfiO.js";import"./index-BP8_t0zE.js";import"./theme-ui-components.esm-BngKL4Rx.js";import"./parseProps-780b287c.browser.esm-DiCerVr_.js";import"./emotion-use-insertion-effect-with-fallbacks.browser.esm-UWD3gXM2.js";import"./theme-ui-core-jsx-runtime.browser.esm-CH0qhC10.js";import"./hoist-non-react-statics.cjs-CQI8syxn.js";const g={title:"Forms/Guidelines",component:i},r=()=>e.jsx(i,{title:"How does it work?",steps:[e.jsxs(e.Fragment,{children:["Choose a topic you want to research"," ",e.jsx("span",{role:"img","aria-label":"raised-hand",children:"\ud83d\ude4c"})]}),e.jsxs(e.Fragment,{children:["Read"," ",e.jsxs(o,{sx:{color:"blue"},href:"/academy/guides/research",children:["our guidelines"," ",e.jsx("span",{role:"img","aria-label":"nerd-face",children:"\ud83e\udd13"})]})]}),e.jsxs(e.Fragment,{children:["Write your introduction"," ",e.jsx("span",{role:"img","aria-label":"archive-box",children:"\ud83d\uddc4\ufe0f"})]})]});var a,n,s;r.parameters={...r.parameters,docs:{...null==(a=r.parameters)?void 0:a.docs,source:{originalSource:'() => \n Choose a topic you want to research{\' \'}\n \n \ud83d\ude4c\n \n , <>\n Read{\' \'}\n \n our guidelines{\' \'}\n \n \ud83e\udd13\n \n \n , <>\n Write your introduction{\' \'}\n \n \ud83d\uddc4\ufe0f\n \n ]} />',...null==(s=null==(n=r.parameters)?void 0:n.docs)?void 0:s.source}}};const D=["Default"];export{r as Default,D as __namedExportsOrder,g as default}; \ No newline at end of file diff --git a/storybook-static/assets/Heading.stories-BAavE8eL.js b/storybook-static/assets/Heading.stories-DWn9Npoj.js similarity index 94% rename from storybook-static/assets/Heading.stories-BAavE8eL.js rename to storybook-static/assets/Heading.stories-DWn9Npoj.js index 53a31e78d6..fd1a75bc7a 100644 --- a/storybook-static/assets/Heading.stories-BAavE8eL.js +++ b/storybook-static/assets/Heading.stories-DWn9Npoj.js @@ -1 +1 @@ -import{j as m}from"./jsx-runtime-CexXSJP5.js";import{H as r}from"./theme-ui-components.esm-DCiJ1mMX.js";import"./index-BP8_t0zE.js";import"./parseProps-780b287c.browser.esm-DiCerVr_.js";import"./emotion-use-insertion-effect-with-fallbacks.browser.esm-UWD3gXM2.js";import"./theme-ui-core-jsx-runtime.browser.esm-CH0qhC10.js";import"./hoist-non-react-statics.cjs-CQI8syxn.js";const x={title:"Layout/Heading",component:r},e=()=>m.jsx(r,{children:"Default Heading style"}),a=()=>m.jsx(r,{variant:"small",children:"Default Heading style"});var t,s,o,i,n,l;e.parameters={...e.parameters,docs:{...null==(t=e.parameters)?void 0:t.docs,source:{originalSource:"() => Default Heading style",...null==(o=null==(s=e.parameters)?void 0:s.docs)?void 0:o.source}}},a.parameters={...a.parameters,docs:{...null==(i=a.parameters)?void 0:i.docs,source:{originalSource:'() => Default Heading style',...null==(l=null==(n=a.parameters)?void 0:n.docs)?void 0:l.source}}};const D=["Default","Small"];export{e as Default,a as Small,D as __namedExportsOrder,x as default}; \ No newline at end of file +import{j as m}from"./jsx-runtime-CexXSJP5.js";import{H as r}from"./theme-ui-components.esm-BngKL4Rx.js";import"./index-BP8_t0zE.js";import"./parseProps-780b287c.browser.esm-DiCerVr_.js";import"./emotion-use-insertion-effect-with-fallbacks.browser.esm-UWD3gXM2.js";import"./theme-ui-core-jsx-runtime.browser.esm-CH0qhC10.js";import"./hoist-non-react-statics.cjs-CQI8syxn.js";const x={title:"Layout/Heading",component:r},e=()=>m.jsx(r,{children:"Default Heading style"}),a=()=>m.jsx(r,{variant:"small",children:"Default Heading style"});var t,s,o,i,n,l;e.parameters={...e.parameters,docs:{...null==(t=e.parameters)?void 0:t.docs,source:{originalSource:"() => Default Heading style",...null==(o=null==(s=e.parameters)?void 0:s.docs)?void 0:o.source}}},a.parameters={...a.parameters,docs:{...null==(i=a.parameters)?void 0:i.docs,source:{originalSource:'() => Default Heading style',...null==(l=null==(n=a.parameters)?void 0:n.docs)?void 0:l.source}}};const D=["Default","Small"];export{e as Default,a as Small,D as __namedExportsOrder,x as default}; \ No newline at end of file diff --git a/storybook-static/assets/HeroBanner-D9U7RVxT.js b/storybook-static/assets/HeroBanner-DIi4EvbO.js similarity index 98% rename from storybook-static/assets/HeroBanner-D9U7RVxT.js rename to storybook-static/assets/HeroBanner-DIi4EvbO.js index afb8730c70..d7cb2e3388 100644 --- a/storybook-static/assets/HeroBanner-D9U7RVxT.js +++ b/storybook-static/assets/HeroBanner-DIi4EvbO.js @@ -1 +1 @@ -import{j as i}from"./jsx-runtime-CexXSJP5.js";import{I as a}from"./theme-ui-components.esm-DCiJ1mMX.js";const o=""+new URL("celebration-CcYZyxzK.svg",import.meta.url).href,l="data:image/svg+xml,%3csvg%20width='525'%20height='123'%20viewBox='0%200%20525%20123'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cmask%20id='mask0_519_19'%20style='mask-type:alpha'%20maskUnits='userSpaceOnUse'%20x='0'%20y='0'%20width='525'%20height='123'%3e%3crect%20width='525'%20height='123'%20fill='%23D9D9D9'/%3e%3c/mask%3e%3cg%20mask='url(%23mask0_519_19)'%3e%3cpath%20opacity='0.5'%20d='M185.166%2032.7359L163.995%20108.817C160.566%20121.139%20167.776%20133.908%20180.098%20137.337L305.888%20172.339C318.21%20175.768%20330.979%20168.559%20334.408%20156.237L355.578%2080.1557C359.007%2067.8335%20351.798%2055.0647%20339.475%2051.6359L213.686%2016.6331C201.363%2013.2042%20188.595%2020.4137%20185.166%2032.7359Z'%20fill='%23AAAAAA'/%3e%3cpath%20opacity='0.2'%20d='M349.345%2036.5923H219.652C198.426%2036.5923%20181.22%2053.7989%20181.22%2075.0244C181.22%2096.2498%20198.426%20113.456%20219.652%20113.456H349.345C370.57%20113.456%20387.777%2096.2498%20387.777%2075.0244C387.777%2053.7989%20370.57%2036.5923%20349.345%2036.5923Z'%20fill='%23AEADAD'/%3e%3cpath%20opacity='0.2'%20d='M297.958%2076.7435H174.432C153.207%2076.7435%20136%2093.9501%20136%20115.175C136%20136.401%20153.207%20153.608%20174.432%20153.608H297.958C319.183%20153.608%20336.39%20136.401%20336.39%20115.175C336.39%2093.9501%20319.183%2076.7435%20297.958%2076.7435Z'%20fill='%23AEADAD'/%3e%3cpath%20d='M179.62%2022.7474L158.449%2098.8282C155.02%20111.15%20162.23%20123.919%20174.552%20127.348L300.342%20162.351C312.664%20165.78%20325.433%20158.57%20328.862%20146.248L350.032%2070.1672C353.461%2057.8449%20346.252%2045.0762%20333.929%2041.6474L208.14%206.64453C195.817%203.21569%20183.049%2010.4252%20179.62%2022.7474Z'%20fill='%23E2EDF7'/%3e%3cpath%20d='M159.048%20112.059L157.673%20109.031L224.732%2078.5515L225.331%2080.2707C225.409%2080.5036%20233.483%20103.208%20249.633%20107.101C258.705%20109.319%20268.788%20105.149%20279.58%2094.8116L281.876%2097.2185C270.207%20108.388%20259.116%20112.802%20248.845%20110.329C233.495%20106.624%20225.143%2088.7446%20222.836%2083.0658L159.048%20112.059Z'%20fill='%23B3C9E8'/%3e%3cpath%20d='M280.524%2098.0978L283.19%2096.1074L324.91%20151.997L322.243%20153.987L280.524%2098.0978Z'%20fill='%23B3C9E8'/%3e%3cpath%20d='M332.009%2041.8718L210.125%207.94294C198.179%204.61549%20188.585%207.44382%20185.38%2013.1559L183.572%2017.6924C185.302%2011.4922%20196.46%2010.8267%20208.406%2014.1431L330.279%2048.072C342.225%2051.3994%20350.499%2059.1634%20348.78%2065.3192L350.51%2059.108C352.284%2052.9189%20343.955%2045.1882%20332.009%2041.8718Z'%20fill='white'/%3e%3cpath%20d='M179.745%2022.3112L158.575%2098.392C155.146%20110.714%20162.355%20123.483%20174.678%20126.912L300.467%20161.915C312.79%20165.344%20325.558%20158.134%20328.987%20145.812L350.158%2069.731C353.587%2057.4087%20346.377%2044.64%20334.055%2041.2112L208.265%206.20831C195.943%202.77948%20183.174%209.98897%20179.745%2022.3112Z'%20stroke='%232E576D'%20stroke-width='2.00147'%20stroke-miterlimit='10'%20stroke-linecap='round'/%3e%3cpath%20d='M158.981%20107.512L223.977%2077.6976'%20stroke='%232E576D'%20stroke-width='2.00147'%20stroke-miterlimit='10'%20stroke-linecap='round'/%3e%3cpath%20d='M283.383%2094.6673L325.287%20152.498'%20stroke='%232E576D'%20stroke-width='2.00147'%20stroke-miterlimit='10'%20stroke-linecap='round'/%3e%3cpath%20d='M183.56%2016.3393L235.823%2095.7211C238.618%20100.437%20243.127%20103.89%20248.408%20105.36C253.689%20106.829%20259.333%20106.201%20264.162%20103.607L350.776%2062.258'%20stroke='%232E576D'%20stroke-width='2.00147'%20stroke-miterlimit='10'%20stroke-linecap='round'/%3e%3c/g%3e%3c/svg%3e",t=({type:e})=>{const t={celebration:o,email:l};return i.jsx(a,{loading:"lazy",src:t[e]})};try{t.displayName="HeroBanner",t.__docgenInfo={description:"",displayName:"HeroBanner",props:{type:{defaultValue:null,description:"",name:"type",required:!0,type:{name:"enum",value:[{value:'"email"'},{value:'"celebration"'}]}}}}}catch{}export{t as H}; \ No newline at end of file +import{j as i}from"./jsx-runtime-CexXSJP5.js";import{I as a}from"./theme-ui-components.esm-BngKL4Rx.js";const o=""+new URL("celebration-CcYZyxzK.svg",import.meta.url).href,l="data:image/svg+xml,%3csvg%20width='525'%20height='123'%20viewBox='0%200%20525%20123'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cmask%20id='mask0_519_19'%20style='mask-type:alpha'%20maskUnits='userSpaceOnUse'%20x='0'%20y='0'%20width='525'%20height='123'%3e%3crect%20width='525'%20height='123'%20fill='%23D9D9D9'/%3e%3c/mask%3e%3cg%20mask='url(%23mask0_519_19)'%3e%3cpath%20opacity='0.5'%20d='M185.166%2032.7359L163.995%20108.817C160.566%20121.139%20167.776%20133.908%20180.098%20137.337L305.888%20172.339C318.21%20175.768%20330.979%20168.559%20334.408%20156.237L355.578%2080.1557C359.007%2067.8335%20351.798%2055.0647%20339.475%2051.6359L213.686%2016.6331C201.363%2013.2042%20188.595%2020.4137%20185.166%2032.7359Z'%20fill='%23AAAAAA'/%3e%3cpath%20opacity='0.2'%20d='M349.345%2036.5923H219.652C198.426%2036.5923%20181.22%2053.7989%20181.22%2075.0244C181.22%2096.2498%20198.426%20113.456%20219.652%20113.456H349.345C370.57%20113.456%20387.777%2096.2498%20387.777%2075.0244C387.777%2053.7989%20370.57%2036.5923%20349.345%2036.5923Z'%20fill='%23AEADAD'/%3e%3cpath%20opacity='0.2'%20d='M297.958%2076.7435H174.432C153.207%2076.7435%20136%2093.9501%20136%20115.175C136%20136.401%20153.207%20153.608%20174.432%20153.608H297.958C319.183%20153.608%20336.39%20136.401%20336.39%20115.175C336.39%2093.9501%20319.183%2076.7435%20297.958%2076.7435Z'%20fill='%23AEADAD'/%3e%3cpath%20d='M179.62%2022.7474L158.449%2098.8282C155.02%20111.15%20162.23%20123.919%20174.552%20127.348L300.342%20162.351C312.664%20165.78%20325.433%20158.57%20328.862%20146.248L350.032%2070.1672C353.461%2057.8449%20346.252%2045.0762%20333.929%2041.6474L208.14%206.64453C195.817%203.21569%20183.049%2010.4252%20179.62%2022.7474Z'%20fill='%23E2EDF7'/%3e%3cpath%20d='M159.048%20112.059L157.673%20109.031L224.732%2078.5515L225.331%2080.2707C225.409%2080.5036%20233.483%20103.208%20249.633%20107.101C258.705%20109.319%20268.788%20105.149%20279.58%2094.8116L281.876%2097.2185C270.207%20108.388%20259.116%20112.802%20248.845%20110.329C233.495%20106.624%20225.143%2088.7446%20222.836%2083.0658L159.048%20112.059Z'%20fill='%23B3C9E8'/%3e%3cpath%20d='M280.524%2098.0978L283.19%2096.1074L324.91%20151.997L322.243%20153.987L280.524%2098.0978Z'%20fill='%23B3C9E8'/%3e%3cpath%20d='M332.009%2041.8718L210.125%207.94294C198.179%204.61549%20188.585%207.44382%20185.38%2013.1559L183.572%2017.6924C185.302%2011.4922%20196.46%2010.8267%20208.406%2014.1431L330.279%2048.072C342.225%2051.3994%20350.499%2059.1634%20348.78%2065.3192L350.51%2059.108C352.284%2052.9189%20343.955%2045.1882%20332.009%2041.8718Z'%20fill='white'/%3e%3cpath%20d='M179.745%2022.3112L158.575%2098.392C155.146%20110.714%20162.355%20123.483%20174.678%20126.912L300.467%20161.915C312.79%20165.344%20325.558%20158.134%20328.987%20145.812L350.158%2069.731C353.587%2057.4087%20346.377%2044.64%20334.055%2041.2112L208.265%206.20831C195.943%202.77948%20183.174%209.98897%20179.745%2022.3112Z'%20stroke='%232E576D'%20stroke-width='2.00147'%20stroke-miterlimit='10'%20stroke-linecap='round'/%3e%3cpath%20d='M158.981%20107.512L223.977%2077.6976'%20stroke='%232E576D'%20stroke-width='2.00147'%20stroke-miterlimit='10'%20stroke-linecap='round'/%3e%3cpath%20d='M283.383%2094.6673L325.287%20152.498'%20stroke='%232E576D'%20stroke-width='2.00147'%20stroke-miterlimit='10'%20stroke-linecap='round'/%3e%3cpath%20d='M183.56%2016.3393L235.823%2095.7211C238.618%20100.437%20243.127%20103.89%20248.408%20105.36C253.689%20106.829%20259.333%20106.201%20264.162%20103.607L350.776%2062.258'%20stroke='%232E576D'%20stroke-width='2.00147'%20stroke-miterlimit='10'%20stroke-linecap='round'/%3e%3c/g%3e%3c/svg%3e",t=({type:e})=>{const t={celebration:o,email:l};return i.jsx(a,{loading:"lazy",src:t[e]})};try{t.displayName="HeroBanner",t.__docgenInfo={description:"",displayName:"HeroBanner",props:{type:{defaultValue:null,description:"",name:"type",required:!0,type:{name:"enum",value:[{value:'"email"'},{value:'"celebration"'}]}}}}}catch{}export{t as H}; \ No newline at end of file diff --git a/storybook-static/assets/HeroBanner.stories-DqXUwOnF.js b/storybook-static/assets/HeroBanner.stories-6-8fiYta.js similarity index 87% rename from storybook-static/assets/HeroBanner.stories-DqXUwOnF.js rename to storybook-static/assets/HeroBanner.stories-6-8fiYta.js index 3e1f5273a6..8d7d66dead 100644 --- a/storybook-static/assets/HeroBanner.stories-DqXUwOnF.js +++ b/storybook-static/assets/HeroBanner.stories-6-8fiYta.js @@ -1 +1 @@ -import{j as i}from"./jsx-runtime-CexXSJP5.js";import{H as o}from"./HeroBanner-D9U7RVxT.js";import"./index-BP8_t0zE.js";import"./theme-ui-components.esm-DCiJ1mMX.js";import"./parseProps-780b287c.browser.esm-DiCerVr_.js";import"./emotion-use-insertion-effect-with-fallbacks.browser.esm-UWD3gXM2.js";import"./theme-ui-core-jsx-runtime.browser.esm-CH0qhC10.js";import"./hoist-non-react-statics.cjs-CQI8syxn.js";const b={title:"Layout/HeroBanner",component:o},e=()=>i.jsx(o,{type:"celebration"}),r=()=>i.jsx(o,{type:"email"});var t,a,s,m,n,p;e.parameters={...e.parameters,docs:{...null==(t=e.parameters)?void 0:t.docs,source:{originalSource:'() => ',...null==(s=null==(a=e.parameters)?void 0:a.docs)?void 0:s.source}}},r.parameters={...r.parameters,docs:{...null==(m=r.parameters)?void 0:m.docs,source:{originalSource:'() => ',...null==(p=null==(n=r.parameters)?void 0:n.docs)?void 0:p.source}}};const j=["Celebration","Email"];export{e as Celebration,r as Email,j as __namedExportsOrder,b as default}; \ No newline at end of file +import{j as i}from"./jsx-runtime-CexXSJP5.js";import{H as o}from"./HeroBanner-DIi4EvbO.js";import"./index-BP8_t0zE.js";import"./theme-ui-components.esm-BngKL4Rx.js";import"./parseProps-780b287c.browser.esm-DiCerVr_.js";import"./emotion-use-insertion-effect-with-fallbacks.browser.esm-UWD3gXM2.js";import"./theme-ui-core-jsx-runtime.browser.esm-CH0qhC10.js";import"./hoist-non-react-statics.cjs-CQI8syxn.js";const b={title:"Layout/HeroBanner",component:o},e=()=>i.jsx(o,{type:"celebration"}),r=()=>i.jsx(o,{type:"email"});var t,a,s,m,n,p;e.parameters={...e.parameters,docs:{...null==(t=e.parameters)?void 0:t.docs,source:{originalSource:'() => ',...null==(s=null==(a=e.parameters)?void 0:a.docs)?void 0:s.source}}},r.parameters={...r.parameters,docs:{...null==(m=r.parameters)?void 0:m.docs,source:{originalSource:'() => ',...null==(p=null==(n=r.parameters)?void 0:n.docs)?void 0:p.source}}};const j=["Celebration","Email"];export{e as Celebration,r as Email,j as __namedExportsOrder,b as default}; \ No newline at end of file diff --git a/storybook-static/assets/IconCountWithTooltip-BgxPFEPA.js b/storybook-static/assets/IconCountWithTooltip-CZUhF_pl.js similarity index 97% rename from storybook-static/assets/IconCountWithTooltip-BgxPFEPA.js rename to storybook-static/assets/IconCountWithTooltip-CZUhF_pl.js index aa1f7e2d44..e6e939f854 100644 --- a/storybook-static/assets/IconCountWithTooltip-BgxPFEPA.js +++ b/storybook-static/assets/IconCountWithTooltip-CZUhF_pl.js @@ -1 +1 @@ -import{j as e}from"./jsx-runtime-CexXSJP5.js";import{r as i}from"./index-BP8_t0zE.js";import{I as v}from"./Icon-BoVZOGVD.js";import{T as c}from"./Tooltip-B9mgSRkZ.js";import{T as d}from"./theme-ui-components.esm-DCiJ1mMX.js";const u=a=>{const{count:l,dataCy:u,icon:t,text:o}=a,n=i.useMemo((()=>(16*Math.random()).toString()),[]);return e.jsxs(e.Fragment,{children:[e.jsxs(d,{"data-cy":u,"data-tooltip-id":n,"data-tooltip-content":o,color:"black",sx:{display:"flex",position:"relative",alignItems:"center",fontSize:[1,2,2]},children:[l,e.jsx(v,{glyph:t,ml:1})]}),e.jsx(c,{id:n})]})};try{u.displayName="IconCountWithTooltip",u.__docgenInfo={description:"",displayName:"IconCountWithTooltip",props:{count:{defaultValue:null,description:"",name:"count",required:!0,type:{name:"number"}},dataCy:{defaultValue:null,description:"",name:"dataCy",required:!1,type:{name:"string"}},icon:{defaultValue:null,description:"",name:"icon",required:!0,type:{name:"enum",value:[{value:'"map"'},{value:'"menu"'},{value:'"search"'},{value:'"time"'},{value:'"filter"'},{value:'"image"'},{value:'"view"'},{value:'"email"'},{value:'"step"'},{value:'"account-circle"'},{value:'"account"'},{value:'"add"'},{value:'"arrow-curved-bottom-right"'},{value:'"arrow-back"'},{value:'"arrow-down"'},{value:'"arrow-forward"'},{value:'"arrow-full-down"'},{value:'"arrow-full-up"'},{value:'"bazar"'},{value:'"check"'},{value:'"chevron-down"'},{value:'"chevron-left"'},{value:'"chevron-right"'},{value:'"chevron-up"'},{value:'"close"'},{value:'"comment"'},{value:'"contact"'},{value:'"discord"'},{value:'"delete"'},{value:'"difficulty"'},{value:'"download"'},{value:'"download-cloud"'},{value:'"edit"'},{value:'"email-outline"'},{value:'"employee"'},{value:'"external-link"'},{value:'"external-url"'},{value:'"facebook"'},{value:'"flag-unknown"'},{value:'"hide"'},{value:'"hyperlink"'},{value:'"impact"'},{value:'"instagram"'},{value:'"loading"'},{value:'"location-on"'},{value:'"lock"'},{value:'"machine"'},{value:'"mail-outline"'},{value:'"more-vert"'},{value:'"notifications"'},{value:'"patreon"'},{value:'"pdf"'},{value:'"plastic"'},{value:'"profile"'},{value:'"revenue"'},{value:'"show"'},{value:'"slack"'},{value:'"sliders"'},{value:'"social-media"'},{value:'"star"'},{value:'"star-active"'},{value:'"supporter"'},{value:'"thunderbolt"'},{value:'"thunderbolt-grey"'},{value:'"turned-in"'},{value:'"update"'},{value:'"upload"'},{value:'"useful"'},{value:'"verified"'},{value:'"volunteer"'},{value:'"website"'},{value:'"globe"'},{value:'"gps-location"'}]}},text:{defaultValue:null,description:"",name:"text",required:!0,type:{name:"string"}}}}}catch{}export{u as I}; \ No newline at end of file +import{j as e}from"./jsx-runtime-CexXSJP5.js";import{r as i}from"./index-BP8_t0zE.js";import{I as v}from"./Icon-BoVZOGVD.js";import{T as c}from"./Tooltip-B9mgSRkZ.js";import{T as d}from"./theme-ui-components.esm-BngKL4Rx.js";const u=a=>{const{count:l,dataCy:u,icon:t,text:o}=a,n=i.useMemo((()=>(16*Math.random()).toString()),[]);return e.jsxs(e.Fragment,{children:[e.jsxs(d,{"data-cy":u,"data-tooltip-id":n,"data-tooltip-content":o,color:"black",sx:{display:"flex",position:"relative",alignItems:"center",fontSize:[1,2,2]},children:[l,e.jsx(v,{glyph:t,ml:1})]}),e.jsx(c,{id:n})]})};try{u.displayName="IconCountWithTooltip",u.__docgenInfo={description:"",displayName:"IconCountWithTooltip",props:{count:{defaultValue:null,description:"",name:"count",required:!0,type:{name:"number"}},dataCy:{defaultValue:null,description:"",name:"dataCy",required:!1,type:{name:"string"}},icon:{defaultValue:null,description:"",name:"icon",required:!0,type:{name:"enum",value:[{value:'"map"'},{value:'"menu"'},{value:'"search"'},{value:'"time"'},{value:'"filter"'},{value:'"image"'},{value:'"view"'},{value:'"email"'},{value:'"step"'},{value:'"account-circle"'},{value:'"account"'},{value:'"add"'},{value:'"arrow-curved-bottom-right"'},{value:'"arrow-back"'},{value:'"arrow-down"'},{value:'"arrow-forward"'},{value:'"arrow-full-down"'},{value:'"arrow-full-up"'},{value:'"bazar"'},{value:'"check"'},{value:'"chevron-down"'},{value:'"chevron-left"'},{value:'"chevron-right"'},{value:'"chevron-up"'},{value:'"close"'},{value:'"comment"'},{value:'"contact"'},{value:'"discord"'},{value:'"delete"'},{value:'"difficulty"'},{value:'"download"'},{value:'"download-cloud"'},{value:'"edit"'},{value:'"email-outline"'},{value:'"employee"'},{value:'"external-link"'},{value:'"external-url"'},{value:'"facebook"'},{value:'"flag-unknown"'},{value:'"hide"'},{value:'"hyperlink"'},{value:'"impact"'},{value:'"instagram"'},{value:'"loading"'},{value:'"location-on"'},{value:'"lock"'},{value:'"machine"'},{value:'"mail-outline"'},{value:'"more-vert"'},{value:'"notifications"'},{value:'"patreon"'},{value:'"pdf"'},{value:'"plastic"'},{value:'"profile"'},{value:'"revenue"'},{value:'"show"'},{value:'"slack"'},{value:'"sliders"'},{value:'"social-media"'},{value:'"star"'},{value:'"star-active"'},{value:'"supporter"'},{value:'"thunderbolt"'},{value:'"thunderbolt-grey"'},{value:'"turned-in"'},{value:'"update"'},{value:'"upload"'},{value:'"useful"'},{value:'"verified"'},{value:'"volunteer"'},{value:'"website"'},{value:'"globe"'},{value:'"gps-location"'}]}},text:{defaultValue:null,description:"",name:"text",required:!0,type:{name:"string"}}}}}catch{}export{u as I}; \ No newline at end of file diff --git a/storybook-static/assets/IconCountWithTooltip.stories-B1_j__4h.js b/storybook-static/assets/IconCountWithTooltip.stories-C-3id8LK.js similarity index 89% rename from storybook-static/assets/IconCountWithTooltip.stories-B1_j__4h.js rename to storybook-static/assets/IconCountWithTooltip.stories-C-3id8LK.js index 4396710610..eb675447c4 100644 --- a/storybook-static/assets/IconCountWithTooltip.stories-B1_j__4h.js +++ b/storybook-static/assets/IconCountWithTooltip.stories-C-3id8LK.js @@ -1 +1 @@ -import{j as e}from"./jsx-runtime-CexXSJP5.js";import{I as i}from"./IconCountWithTooltip-BgxPFEPA.js";import"./index-BP8_t0zE.js";import"./Icon-BoVZOGVD.js";import"./emotion-styled.browser.esm-Dz2BNYeh.js";import"./extends-CF3RwP-h.js";import"./parseProps-780b287c.browser.esm-DiCerVr_.js";import"./emotion-use-insertion-effect-with-fallbacks.browser.esm-UWD3gXM2.js";import"./supporter-D7hp958O.js";import"./icon-arrow-down-CJeToCJe.js";import"./icon-star-active-ClN6U5FF.js";import"./theme-ui-core-jsx-runtime.browser.esm-CH0qhC10.js";import"./hoist-non-react-statics.cjs-CQI8syxn.js";import"./Tooltip-B9mgSRkZ.js";import"./floating-ui.dom-DtcZXcvp.js";import"./theme-ui-components.esm-DCiJ1mMX.js";const _={title:"Components/IconCountWithTooltip",component:i},o=()=>e.jsx(i,{count:3,icon:"comment",text:"Number of comments"});var t,r,m;o.parameters={...o.parameters,docs:{...null==(t=o.parameters)?void 0:t.docs,source:{originalSource:'() => ',...null==(m=null==(r=o.parameters)?void 0:r.docs)?void 0:m.source}}};const b=["Default"];export{o as Default,b as __namedExportsOrder,_ as default}; \ No newline at end of file +import{j as e}from"./jsx-runtime-CexXSJP5.js";import{I as i}from"./IconCountWithTooltip-CZUhF_pl.js";import"./index-BP8_t0zE.js";import"./Icon-BoVZOGVD.js";import"./emotion-styled.browser.esm-Dz2BNYeh.js";import"./extends-CF3RwP-h.js";import"./parseProps-780b287c.browser.esm-DiCerVr_.js";import"./emotion-use-insertion-effect-with-fallbacks.browser.esm-UWD3gXM2.js";import"./supporter-D7hp958O.js";import"./icon-arrow-down-CJeToCJe.js";import"./icon-star-active-ClN6U5FF.js";import"./theme-ui-core-jsx-runtime.browser.esm-CH0qhC10.js";import"./hoist-non-react-statics.cjs-CQI8syxn.js";import"./Tooltip-B9mgSRkZ.js";import"./floating-ui.dom-DtcZXcvp.js";import"./theme-ui-components.esm-BngKL4Rx.js";const _={title:"Components/IconCountWithTooltip",component:i},o=()=>e.jsx(i,{count:3,icon:"comment",text:"Number of comments"});var t,r,m;o.parameters={...o.parameters,docs:{...null==(t=o.parameters)?void 0:t.docs,source:{originalSource:'() => ',...null==(m=null==(r=o.parameters)?void 0:r.docs)?void 0:m.source}}};const b=["Default"];export{o as Default,b as __namedExportsOrder,_ as default}; \ No newline at end of file diff --git a/storybook-static/assets/ImageCrop-DCgV90x1.js b/storybook-static/assets/ImageCrop-IvK67aX8.js similarity index 98% rename from storybook-static/assets/ImageCrop-DCgV90x1.js rename to storybook-static/assets/ImageCrop-IvK67aX8.js index c21fb7c931..8c5206b1f0 100644 --- a/storybook-static/assets/ImageCrop-DCgV90x1.js +++ b/storybook-static/assets/ImageCrop-IvK67aX8.js @@ -1 +1 @@ -import{j as m}from"./jsx-runtime-CexXSJP5.js";import{r as D,a as p}from"./index-BP8_t0zE.js";import{B as j}from"./Button-B7QBvkxh.js";import{L as T}from"./Loader-DmqUoSY8.js";import{a as X,T as L,F as $}from"./theme-ui-components.esm-DCiJ1mMX.js";const S={x:0,y:0,width:0,height:0,unit:"px"},_=(e,t,n)=>Math.min(Math.max(e,t),n),F=(...e)=>e.filter((e=>e&&"string"==typeof e)).join(" "),A=(e,t)=>e===t||e.width===t.width&&e.height===t.height&&e.x===t.x&&e.y===t.y&&e.unit===t.unit;function z(e,t,n,i){const r=v(e,n,i);return e.width&&(r.height=r.width/t),e.height&&(r.width=r.height*t),r.y+r.height>i&&(r.height=i-r.y,r.width=r.height*t),r.x+r.width>n&&(r.width=n-r.x,r.height=r.width/t),"%"===e.unit?E(r,n,i):r}function W(e,t,n){const i=v(e,t,n);return i.x=(t-i.width)/2,i.y=(n-i.height)/2,"%"===e.unit?E(i,t,n):i}function E(e,t,n){return"%"===e.unit?{...S,...e,unit:"%"}:{unit:"%",x:e.x?e.x/t*100:0,y:e.y?e.y/n*100:0,width:e.width?e.width/t*100:0,height:e.height?e.height/n*100:0}}function v(e,t,n){return e.unit?"px"===e.unit?{...S,...e,unit:"px"}:{unit:"px",x:e.x?e.x*t/100:0,y:e.y?e.y*n/100:0,width:e.width?e.width*t/100:0,height:e.height?e.height*n/100:0}:{...S,...e,unit:"px"}}function K(e,t,n,i,r,o=0,a=0,h=i,s=r){const d={...e};let c=Math.min(o,i),l=Math.min(a,r),p=Math.min(h,i),g=Math.min(s,r);t&&(t>1?(c=a?a*t:c,l=c/t,p=h*t):(l=o?o/t:l,c=l*t,g=s/t)),d.y<0&&(d.height=Math.max(d.height+d.y,l),d.y=0),d.x<0&&(d.width=Math.max(d.width+d.x,c),d.x=0);const w=i-(d.x+d.width);w<0&&(d.x=Math.min(d.x,i-c),d.width+=w);const u=r-(d.y+d.height);if(u<0&&(d.y=Math.min(d.y,r-l),d.height+=u),d.widthp&&(("sw"===n||"nw"==n)&&(d.x-=p-d.width),d.width=p),d.height>g&&(("nw"===n||"ne"==n)&&(d.y-=g-d.height),d.height=g),t){const e=d.width/d.height;if(et){const e=Math.max(d.height*t,c);("sw"===n||"nw"==n)&&(d.x-=e-d.width),d.width=e}}return d}function q(e,t,n,i){const r={...e};return"ArrowLeft"===t?"nw"===i?(r.x-=n,r.y-=n,r.width+=n,r.height+=n):"w"===i?(r.x-=n,r.width+=n):"sw"===i?(r.x-=n,r.width+=n,r.height+=n):"ne"===i?(r.y+=n,r.width-=n,r.height-=n):"e"===i?r.width-=n:"se"===i&&(r.width-=n,r.height-=n):"ArrowRight"===t&&("nw"===i?(r.x+=n,r.y+=n,r.width-=n,r.height-=n):"w"===i?(r.x+=n,r.width-=n):"sw"===i?(r.x+=n,r.width-=n,r.height-=n):"ne"===i?(r.y-=n,r.width+=n,r.height+=n):"e"===i?r.width+=n:"se"===i&&(r.width+=n,r.height+=n)),"ArrowUp"===t?"nw"===i?(r.x-=n,r.y-=n,r.width+=n,r.height+=n):"n"===i?(r.y-=n,r.height+=n):"ne"===i?(r.y-=n,r.width+=n,r.height+=n):"sw"===i?(r.x+=n,r.width-=n,r.height-=n):"s"===i?r.height-=n:"se"===i&&(r.width-=n,r.height-=n):"ArrowDown"===t&&("nw"===i?(r.x+=n,r.y+=n,r.width-=n,r.height-=n):"n"===i?(r.y+=n,r.height-=n):"ne"===i?(r.y+=n,r.width-=n,r.height-=n):"sw"===i?(r.x-=n,r.width+=n,r.height+=n):"s"===i?r.height+=n:"se"===i&&(r.width+=n,r.height+=n)),r}const k={capture:!0,passive:!1};let V=0;const M=class e extends D.PureComponent{constructor(){super(...arguments),this.docMoveBound=!1,this.mouseDownOnCrop=!1,this.dragStarted=!1,this.evData={startClientX:0,startClientY:0,startCropX:0,startCropY:0,clientX:0,clientY:0,isResize:!0},this.componentRef=D.createRef(),this.mediaRef=D.createRef(),this.initChangeCalled=!1,this.instanceId="rc-"+V++,this.state={cropIsActive:!1,newCropIsBeingDrawn:!1},this.onCropPointerDown=e=>{const{crop:t,disabled:n}=this.props,i=this.getBox();if(!t)return;const r=v(t,i.width,i.height);if(n)return;e.cancelable&&e.preventDefault(),this.bindDocMove(),this.componentRef.current.focus({preventScroll:!0});const o=e.target.dataset.ord,a=!!o;let h=e.clientX,s=e.clientY,d=r.x,c=r.y;if(o){const t=e.clientX-i.x,n=e.clientY-i.y;let a=0,l=0;"ne"===o||"e"==o?(a=t-(r.x+r.width),l=n-r.y,d=r.x,c=r.y+r.height):"se"===o||"s"===o?(a=t-(r.x+r.width),l=n-(r.y+r.height),d=r.x,c=r.y):"sw"===o||"w"==o?(a=t-r.x,l=n-(r.y+r.height),d=r.x+r.width,c=r.y):("nw"===o||"n"==o)&&(a=t-r.x,l=n-r.y,d=r.x+r.width,c=r.y+r.height),h=d+i.x+a,s=c+i.y+l}this.evData={startClientX:h,startClientY:s,startCropX:d,startCropY:c,clientX:e.clientX,clientY:e.clientY,isResize:a,ord:o},this.mouseDownOnCrop=!0,this.setState({cropIsActive:!0})},this.onComponentPointerDown=e=>{const{crop:t,disabled:n,locked:i,keepSelection:r,onChange:o}=this.props,a=this.getBox();if(n||i||r&&t)return;e.cancelable&&e.preventDefault(),this.bindDocMove(),this.componentRef.current.focus({preventScroll:!0});const h=e.clientX-a.x,s=e.clientY-a.y,d={unit:"px",x:h,y:s,width:0,height:0};this.evData={startClientX:e.clientX,startClientY:e.clientY,startCropX:h,startCropY:s,clientX:e.clientX,clientY:e.clientY,isResize:!0},this.mouseDownOnCrop=!0,o(v(d,a.width,a.height),E(d,a.width,a.height)),this.setState({cropIsActive:!0,newCropIsBeingDrawn:!0})},this.onDocPointerMove=e=>{const{crop:t,disabled:n,onChange:i,onDragStart:r}=this.props,o=this.getBox();if(n||!t||!this.mouseDownOnCrop)return;e.cancelable&&e.preventDefault(),this.dragStarted||(this.dragStarted=!0,r&&r(e));const{evData:a}=this;let h;a.clientX=e.clientX,a.clientY=e.clientY,h=a.isResize?this.resizeCrop():this.dragCrop(),A(t,h)||i(v(h,o.width,o.height),E(h,o.width,o.height))},this.onComponentKeyDown=t=>{const{crop:n,disabled:i,onChange:r,onComplete:o}=this.props;if(i)return;const a=t.key;let h=!1;if(!n)return;const s=this.getBox(),d=this.makePixelCrop(s),c=(navigator.platform.match("Mac")?t.metaKey:t.ctrlKey)?e.nudgeStepLarge:t.shiftKey?e.nudgeStepMedium:e.nudgeStep;if("ArrowLeft"===a?(d.x-=c,h=!0):"ArrowRight"===a?(d.x+=c,h=!0):"ArrowUp"===a?(d.y-=c,h=!0):"ArrowDown"===a&&(d.y+=c,h=!0),h){t.cancelable&&t.preventDefault(),d.x=_(d.x,0,s.width-d.width),d.y=_(d.y,0,s.height-d.height);const e=v(d,s.width,s.height),n=E(d,s.width,s.height);r(e,n),o&&o(e,n)}},this.onHandlerKeyDown=(t,n)=>{const{aspect:i=0,crop:r,disabled:o,minWidth:a=0,minHeight:h=0,maxWidth:s,maxHeight:d,onChange:c,onComplete:l}=this.props,p=this.getBox();if(o||!r)return;if("ArrowUp"!==t.key&&"ArrowDown"!==t.key&&"ArrowLeft"!==t.key&&"ArrowRight"!==t.key)return;t.stopPropagation(),t.preventDefault();const g=(navigator.platform.match("Mac")?t.metaKey:t.ctrlKey)?e.nudgeStepLarge:t.shiftKey?e.nudgeStepMedium:e.nudgeStep,w=K(q(v(r,p.width,p.height),t.key,g,n),i,n,p.width,p.height,a,h,s,d);if(!A(r,w)){const e=E(w,p.width,p.height);c(w,e),l&&l(w,e)}},this.onDocPointerDone=e=>{const{crop:t,disabled:n,onComplete:i,onDragEnd:r}=this.props,o=this.getBox();this.unbindDocMove(),!n&&t&&this.mouseDownOnCrop&&(this.mouseDownOnCrop=!1,this.dragStarted=!1,r&&r(e),i&&i(v(t,o.width,o.height),E(t,o.width,o.height)),this.setState({cropIsActive:!1,newCropIsBeingDrawn:!1}))},this.onDragFocus=()=>{var e;null==(e=this.componentRef.current)||e.scrollTo(0,0)}}get document(){return document}getBox(){const e=this.mediaRef.current;if(!e)return{x:0,y:0,width:0,height:0};const{x:t,y:n,width:i,height:r}=e.getBoundingClientRect();return{x:t,y:n,width:i,height:r}}componentDidUpdate(e){const{crop:t,onComplete:n}=this.props;if(n&&!e.crop&&t){const{width:e,height:i}=this.getBox();e&&i&&n(v(t,e,i),E(t,e,i))}}componentWillUnmount(){this.resizeObserver&&this.resizeObserver.disconnect(),this.unbindDocMove()}bindDocMove(){this.docMoveBound||(this.document.addEventListener("pointermove",this.onDocPointerMove,k),this.document.addEventListener("pointerup",this.onDocPointerDone,k),this.document.addEventListener("pointercancel",this.onDocPointerDone,k),this.docMoveBound=!0)}unbindDocMove(){this.docMoveBound&&(this.document.removeEventListener("pointermove",this.onDocPointerMove,k),this.document.removeEventListener("pointerup",this.onDocPointerDone,k),this.document.removeEventListener("pointercancel",this.onDocPointerDone,k),this.docMoveBound=!1)}getCropStyle(){const{crop:e}=this.props;if(e)return{top:`${e.y}${e.unit}`,left:`${e.x}${e.unit}`,width:`${e.width}${e.unit}`,height:`${e.height}${e.unit}`}}dragCrop(){const{evData:e}=this,t=this.getBox(),n=this.makePixelCrop(t),i=e.clientX-e.startClientX,r=e.clientY-e.startClientY;return n.x=_(e.startCropX+i,0,t.width-n.width),n.y=_(e.startCropY+r,0,t.height-n.height),n}getPointRegion(e,t,n,i){const{evData:r}=this,o=r.clientX-e.x,a=r.clientY-e.y;let h,s;return h=i&&t?"nw"===t||"n"===t||"ne"===t:a1?r?[r,r/t]:[o*t,o]:o?[o*t,o]:[r,r/t]:[r,o]}resizeCrop(){const{evData:t}=this,{aspect:n=0,maxWidth:i,maxHeight:r}=this.props,o=this.getBox(),[a,h]=this.resolveMinDimensions(o,n,this.props.minWidth,this.props.minHeight);let s=this.makePixelCrop(o);const d=this.getPointRegion(o,t.ord,a,h),c=t.ord||d;let l=t.clientX-t.startClientX,p=t.clientY-t.startClientY;(a&&"nw"===c||"w"===c||"sw"===c)&&(l=Math.min(l,-a)),(h&&"nw"===c||"n"===c||"ne"===c)&&(p=Math.min(p,-h));const g={unit:"px",x:0,y:0,width:0,height:0};"ne"===d?(g.x=t.startCropX,g.width=l,n?(g.height=g.width/n,g.y=t.startCropY-g.height):(g.height=Math.abs(p),g.y=t.startCropY-g.height)):"se"===d?(g.x=t.startCropX,g.y=t.startCropY,g.width=l,g.height=n?g.width/n:p):"sw"===d?(g.x=t.startCropX+l,g.y=t.startCropY,g.width=Math.abs(l),g.height=n?g.width/n:p):"nw"===d&&(g.x=t.startCropX+l,g.width=Math.abs(l),n?(g.height=g.width/n,g.y=t.startCropY-g.height):(g.height=Math.abs(p),g.y=t.startCropY+p));const w=K(g,n,d,o.width,o.height,a,h,i,r);return n||e.xyOrds.indexOf(c)>-1?s=w:e.xOrds.indexOf(c)>-1?(s.x=w.x,s.width=w.width):e.yOrds.indexOf(c)>-1&&(s.y=w.y,s.height=w.height),s.x=_(s.x,0,o.width-s.width),s.y=_(s.y,0,o.height-s.height),s}renderCropSelection(){const{ariaLabels:t=e.defaultProps.ariaLabels,disabled:n,locked:i,renderSelectionAddon:r,ruleOfThirds:o,crop:a}=this.props,h=this.getCropStyle();if(a)return p.createElement("div",{style:h,className:"ReactCrop__crop-selection",onPointerDown:this.onCropPointerDown,"aria-label":t.cropArea,tabIndex:0,onKeyDown:this.onComponentKeyDown,role:"group"},!n&&!i&&p.createElement("div",{className:"ReactCrop__drag-elements",onFocus:this.onDragFocus},p.createElement("div",{className:"ReactCrop__drag-bar ord-n","data-ord":"n"}),p.createElement("div",{className:"ReactCrop__drag-bar ord-e","data-ord":"e"}),p.createElement("div",{className:"ReactCrop__drag-bar ord-s","data-ord":"s"}),p.createElement("div",{className:"ReactCrop__drag-bar ord-w","data-ord":"w"}),p.createElement("div",{className:"ReactCrop__drag-handle ord-nw","data-ord":"nw",tabIndex:0,"aria-label":t.nwDragHandle,onKeyDown:e=>this.onHandlerKeyDown(e,"nw"),role:"button"}),p.createElement("div",{className:"ReactCrop__drag-handle ord-n","data-ord":"n",tabIndex:0,"aria-label":t.nDragHandle,onKeyDown:e=>this.onHandlerKeyDown(e,"n"),role:"button"}),p.createElement("div",{className:"ReactCrop__drag-handle ord-ne","data-ord":"ne",tabIndex:0,"aria-label":t.neDragHandle,onKeyDown:e=>this.onHandlerKeyDown(e,"ne"),role:"button"}),p.createElement("div",{className:"ReactCrop__drag-handle ord-e","data-ord":"e",tabIndex:0,"aria-label":t.eDragHandle,onKeyDown:e=>this.onHandlerKeyDown(e,"e"),role:"button"}),p.createElement("div",{className:"ReactCrop__drag-handle ord-se","data-ord":"se",tabIndex:0,"aria-label":t.seDragHandle,onKeyDown:e=>this.onHandlerKeyDown(e,"se"),role:"button"}),p.createElement("div",{className:"ReactCrop__drag-handle ord-s","data-ord":"s",tabIndex:0,"aria-label":t.sDragHandle,onKeyDown:e=>this.onHandlerKeyDown(e,"s"),role:"button"}),p.createElement("div",{className:"ReactCrop__drag-handle ord-sw","data-ord":"sw",tabIndex:0,"aria-label":t.swDragHandle,onKeyDown:e=>this.onHandlerKeyDown(e,"sw"),role:"button"}),p.createElement("div",{className:"ReactCrop__drag-handle ord-w","data-ord":"w",tabIndex:0,"aria-label":t.wDragHandle,onKeyDown:e=>this.onHandlerKeyDown(e,"w"),role:"button"})),r&&p.createElement("div",{className:"ReactCrop__selection-addon",onPointerDown:e=>e.stopPropagation()},r(this.state)),o&&p.createElement(p.Fragment,null,p.createElement("div",{className:"ReactCrop__rule-of-thirds-hz"}),p.createElement("div",{className:"ReactCrop__rule-of-thirds-vt"})))}makePixelCrop(e){return v({...S,...this.props.crop||{}},e.width,e.height)}render(){const{aspect:e,children:t,circularCrop:n,className:i,crop:r,disabled:o,locked:a,style:h,ruleOfThirds:s}=this.props,{cropIsActive:d,newCropIsBeingDrawn:c}=this.state,l=r?this.renderCropSelection():null,g=F("ReactCrop",i,d&&"ReactCrop--active",o&&"ReactCrop--disabled",a&&"ReactCrop--locked",c&&"ReactCrop--new-crop",r&&e&&"ReactCrop--fixed-aspect",r&&n&&"ReactCrop--circular-crop",r&&s&&"ReactCrop--rule-of-thirds",!this.dragStarted&&r&&!r.width&&!r.height&&"ReactCrop--invisible-crop",n&&"ReactCrop--no-animate");return p.createElement("div",{ref:this.componentRef,className:g,style:h},p.createElement("div",{ref:this.mediaRef,className:"ReactCrop__child-wrapper",onPointerDown:this.onComponentPointerDown},t),r?p.createElement("svg",{className:"ReactCrop__crop-mask",width:"100%",height:"100%"},p.createElement("defs",null,p.createElement("mask",{id:`hole-${this.instanceId}`},p.createElement("rect",{width:"100%",height:"100%",fill:"white"}),n?p.createElement("ellipse",{cx:`${r.x+r.width/2}${r.unit}`,cy:`${r.y+r.height/2}${r.unit}`,rx:`${r.width/2}${r.unit}`,ry:`${r.height/2}${r.unit}`,fill:"black"}):p.createElement("rect",{x:`${r.x}${r.unit}`,y:`${r.y}${r.unit}`,width:`${r.width}${r.unit}`,height:`${r.height}${r.unit}`,fill:"black"}))),p.createElement("rect",{fill:"black",fillOpacity:.5,width:"100%",height:"100%",mask:`url(#hole-${this.instanceId})`})):void 0,l)}};M.xOrds=["e","w"],M.yOrds=["n","s"],M.xyOrds=["nw","ne","se","sw"],M.nudgeStep=1,M.nudgeStepMedium=10,M.nudgeStepLarge=100,M.defaultProps={ariaLabels:{cropArea:"Use the arrow keys to move the crop selection area",nwDragHandle:"Use the arrow keys to move the north west drag handle to change the crop selection area",nDragHandle:"Use the up and down arrow keys to move the north drag handle to change the crop selection area",neDragHandle:"Use the arrow keys to move the north east drag handle to change the crop selection area",eDragHandle:"Use the up and down arrow keys to move the east drag handle to change the crop selection area",seDragHandle:"Use the arrow keys to move the south east drag handle to change the crop selection area",sDragHandle:"Use the up and down arrow keys to move the south drag handle to change the crop selection area",swDragHandle:"Use the arrow keys to move the south west drag handle to change the crop selection area",wDragHandle:"Use the up and down arrow keys to move the west drag handle to change the crop selection area"}};let Q=M;const G=Math.PI/180;async function J(e,t,n,i=1,r=0){const o=t.getContext("2d");if(!o)throw new Error("No 2d context");const a=e.naturalWidth/e.width,h=e.naturalHeight/e.height,s=window.devicePixelRatio;t.width=Math.floor(n.width*a*s),t.height=Math.floor(n.height*h*s),o.scale(s,s),o.imageSmoothingQuality="high";const d=n.x*a,c=n.y*h,l=r*G,p=e.naturalWidth/2,g=e.naturalHeight/2;o.save(),o.translate(-d,-c),o.translate(p,g),o.rotate(l),o.scale(i,i),o.translate(-p,-g),o.drawImage(e,0,0,e.naturalWidth,e.naturalHeight,0,0,e.naturalWidth,e.naturalHeight),o.restore()}function Z(e,t,n){return W(z({unit:"%",width:90},n,e,t),e,t)}function ee(e,t,n){D.useEffect((()=>{const i=setTimeout((()=>e.apply({...n})),t);return()=>{clearTimeout(i)}}),n)}const te=90,N=1,B=e=>{const t=D.useRef(null),n=D.useRef(null),i=D.useRef(""),{aspect:r,callbackFn:o,callbackLabel:a,imgSrc:h,subTitle:s,title:d}=e,[c,l]=D.useState(),[p,g]=D.useState(),[w,u]=D.useState(!1);ee((async()=>{null!=p&&p.width&&null!=p&&p.height&&n.current&&t.current&&J(n.current,t.current,p,1)}),100,[p,1]);return m.jsxs(m.Fragment,{children:[m.jsxs(X,{sx:{padding:3},children:[m.jsx(L,{children:d}),m.jsx("br",{}),m.jsx(L,{variant:"quiet",children:s})]}),m.jsxs($,{sx:{borderBottom:"2px dashed silver",borderTop:"2px dashed silver",padding:3},children:[w&&m.jsx(X,{sx:{flex:1},children:m.jsx(T,{label:"Uploading image now. It'll only a sec. Hopefully."})}),!w&&!!h&&m.jsx($,{sx:{flex:1,justifyContent:"center"},children:m.jsx(Q,{aspect:r,crop:c,minHeight:100,onChange:(e,t)=>l(t),onComplete:e=>g(e),children:m.jsx("img",{alt:"Crop me","data-testid":"cropImage",onLoad:function(e){const{width:t,height:n}=e.currentTarget;l(Z(t,n,r))},ref:n,src:h})})})]}),m.jsx(X,{sx:{padding:3},children:m.jsx(j,{type:"button",onClick:async function(){u(!0);const e=n.current,r=t.current;if(!e||!r||!p)throw new Error("Crop canvas does not exist");const a=e.naturalWidth/e.width,h=e.naturalHeight/e.height,s=new OffscreenCanvas(p.width*a,p.height*h),d=s.getContext("2d");if(!d)throw new Error("No 2d context");d.drawImage(r,0,0,r.width,r.height,0,0,s.width,s.height);const c=await s.convertToBlob({type:"image/jpeg",quality:90});i.current&&URL.revokeObjectURL(i.current),i.current=URL.createObjectURL(c),await o(i.current),u(!1)},disabled:w,children:a})})]})};try{B.displayName="ImageCrop",B.__docgenInfo={description:"",displayName:"ImageCrop",props:{aspect:{defaultValue:null,description:"",name:"aspect",required:!0,type:{name:"number"}},callbackFn:{defaultValue:null,description:"",name:"callbackFn",required:!0,type:{name:"(imgSrc: string) => Promise"}},callbackLabel:{defaultValue:null,description:"",name:"callbackLabel",required:!0,type:{name:"string"}},imgSrc:{defaultValue:null,description:"",name:"imgSrc",required:!0,type:{name:"string"}},subTitle:{defaultValue:null,description:"",name:"subTitle",required:!1,type:{name:"string"}},title:{defaultValue:null,description:"",name:"title",required:!0,type:{name:"string"}}}}}catch{}export{B as I}; \ No newline at end of file +import{j as m}from"./jsx-runtime-CexXSJP5.js";import{r as D,a as p}from"./index-BP8_t0zE.js";import{B as j}from"./Button-D4nxT_g_.js";import{L as T}from"./Loader-BiCtIOH2.js";import{a as X,T as L,F as $}from"./theme-ui-components.esm-BngKL4Rx.js";const S={x:0,y:0,width:0,height:0,unit:"px"},_=(e,t,n)=>Math.min(Math.max(e,t),n),F=(...e)=>e.filter((e=>e&&"string"==typeof e)).join(" "),A=(e,t)=>e===t||e.width===t.width&&e.height===t.height&&e.x===t.x&&e.y===t.y&&e.unit===t.unit;function z(e,t,n,i){const r=v(e,n,i);return e.width&&(r.height=r.width/t),e.height&&(r.width=r.height*t),r.y+r.height>i&&(r.height=i-r.y,r.width=r.height*t),r.x+r.width>n&&(r.width=n-r.x,r.height=r.width/t),"%"===e.unit?E(r,n,i):r}function W(e,t,n){const i=v(e,t,n);return i.x=(t-i.width)/2,i.y=(n-i.height)/2,"%"===e.unit?E(i,t,n):i}function E(e,t,n){return"%"===e.unit?{...S,...e,unit:"%"}:{unit:"%",x:e.x?e.x/t*100:0,y:e.y?e.y/n*100:0,width:e.width?e.width/t*100:0,height:e.height?e.height/n*100:0}}function v(e,t,n){return e.unit?"px"===e.unit?{...S,...e,unit:"px"}:{unit:"px",x:e.x?e.x*t/100:0,y:e.y?e.y*n/100:0,width:e.width?e.width*t/100:0,height:e.height?e.height*n/100:0}:{...S,...e,unit:"px"}}function K(e,t,n,i,r,o=0,a=0,h=i,s=r){const d={...e};let c=Math.min(o,i),l=Math.min(a,r),p=Math.min(h,i),g=Math.min(s,r);t&&(t>1?(c=a?a*t:c,l=c/t,p=h*t):(l=o?o/t:l,c=l*t,g=s/t)),d.y<0&&(d.height=Math.max(d.height+d.y,l),d.y=0),d.x<0&&(d.width=Math.max(d.width+d.x,c),d.x=0);const w=i-(d.x+d.width);w<0&&(d.x=Math.min(d.x,i-c),d.width+=w);const u=r-(d.y+d.height);if(u<0&&(d.y=Math.min(d.y,r-l),d.height+=u),d.widthp&&(("sw"===n||"nw"==n)&&(d.x-=p-d.width),d.width=p),d.height>g&&(("nw"===n||"ne"==n)&&(d.y-=g-d.height),d.height=g),t){const e=d.width/d.height;if(et){const e=Math.max(d.height*t,c);("sw"===n||"nw"==n)&&(d.x-=e-d.width),d.width=e}}return d}function q(e,t,n,i){const r={...e};return"ArrowLeft"===t?"nw"===i?(r.x-=n,r.y-=n,r.width+=n,r.height+=n):"w"===i?(r.x-=n,r.width+=n):"sw"===i?(r.x-=n,r.width+=n,r.height+=n):"ne"===i?(r.y+=n,r.width-=n,r.height-=n):"e"===i?r.width-=n:"se"===i&&(r.width-=n,r.height-=n):"ArrowRight"===t&&("nw"===i?(r.x+=n,r.y+=n,r.width-=n,r.height-=n):"w"===i?(r.x+=n,r.width-=n):"sw"===i?(r.x+=n,r.width-=n,r.height-=n):"ne"===i?(r.y-=n,r.width+=n,r.height+=n):"e"===i?r.width+=n:"se"===i&&(r.width+=n,r.height+=n)),"ArrowUp"===t?"nw"===i?(r.x-=n,r.y-=n,r.width+=n,r.height+=n):"n"===i?(r.y-=n,r.height+=n):"ne"===i?(r.y-=n,r.width+=n,r.height+=n):"sw"===i?(r.x+=n,r.width-=n,r.height-=n):"s"===i?r.height-=n:"se"===i&&(r.width-=n,r.height-=n):"ArrowDown"===t&&("nw"===i?(r.x+=n,r.y+=n,r.width-=n,r.height-=n):"n"===i?(r.y+=n,r.height-=n):"ne"===i?(r.y+=n,r.width-=n,r.height-=n):"sw"===i?(r.x-=n,r.width+=n,r.height+=n):"s"===i?r.height+=n:"se"===i&&(r.width+=n,r.height+=n)),r}const k={capture:!0,passive:!1};let V=0;const M=class e extends D.PureComponent{constructor(){super(...arguments),this.docMoveBound=!1,this.mouseDownOnCrop=!1,this.dragStarted=!1,this.evData={startClientX:0,startClientY:0,startCropX:0,startCropY:0,clientX:0,clientY:0,isResize:!0},this.componentRef=D.createRef(),this.mediaRef=D.createRef(),this.initChangeCalled=!1,this.instanceId="rc-"+V++,this.state={cropIsActive:!1,newCropIsBeingDrawn:!1},this.onCropPointerDown=e=>{const{crop:t,disabled:n}=this.props,i=this.getBox();if(!t)return;const r=v(t,i.width,i.height);if(n)return;e.cancelable&&e.preventDefault(),this.bindDocMove(),this.componentRef.current.focus({preventScroll:!0});const o=e.target.dataset.ord,a=!!o;let h=e.clientX,s=e.clientY,d=r.x,c=r.y;if(o){const t=e.clientX-i.x,n=e.clientY-i.y;let a=0,l=0;"ne"===o||"e"==o?(a=t-(r.x+r.width),l=n-r.y,d=r.x,c=r.y+r.height):"se"===o||"s"===o?(a=t-(r.x+r.width),l=n-(r.y+r.height),d=r.x,c=r.y):"sw"===o||"w"==o?(a=t-r.x,l=n-(r.y+r.height),d=r.x+r.width,c=r.y):("nw"===o||"n"==o)&&(a=t-r.x,l=n-r.y,d=r.x+r.width,c=r.y+r.height),h=d+i.x+a,s=c+i.y+l}this.evData={startClientX:h,startClientY:s,startCropX:d,startCropY:c,clientX:e.clientX,clientY:e.clientY,isResize:a,ord:o},this.mouseDownOnCrop=!0,this.setState({cropIsActive:!0})},this.onComponentPointerDown=e=>{const{crop:t,disabled:n,locked:i,keepSelection:r,onChange:o}=this.props,a=this.getBox();if(n||i||r&&t)return;e.cancelable&&e.preventDefault(),this.bindDocMove(),this.componentRef.current.focus({preventScroll:!0});const h=e.clientX-a.x,s=e.clientY-a.y,d={unit:"px",x:h,y:s,width:0,height:0};this.evData={startClientX:e.clientX,startClientY:e.clientY,startCropX:h,startCropY:s,clientX:e.clientX,clientY:e.clientY,isResize:!0},this.mouseDownOnCrop=!0,o(v(d,a.width,a.height),E(d,a.width,a.height)),this.setState({cropIsActive:!0,newCropIsBeingDrawn:!0})},this.onDocPointerMove=e=>{const{crop:t,disabled:n,onChange:i,onDragStart:r}=this.props,o=this.getBox();if(n||!t||!this.mouseDownOnCrop)return;e.cancelable&&e.preventDefault(),this.dragStarted||(this.dragStarted=!0,r&&r(e));const{evData:a}=this;let h;a.clientX=e.clientX,a.clientY=e.clientY,h=a.isResize?this.resizeCrop():this.dragCrop(),A(t,h)||i(v(h,o.width,o.height),E(h,o.width,o.height))},this.onComponentKeyDown=t=>{const{crop:n,disabled:i,onChange:r,onComplete:o}=this.props;if(i)return;const a=t.key;let h=!1;if(!n)return;const s=this.getBox(),d=this.makePixelCrop(s),c=(navigator.platform.match("Mac")?t.metaKey:t.ctrlKey)?e.nudgeStepLarge:t.shiftKey?e.nudgeStepMedium:e.nudgeStep;if("ArrowLeft"===a?(d.x-=c,h=!0):"ArrowRight"===a?(d.x+=c,h=!0):"ArrowUp"===a?(d.y-=c,h=!0):"ArrowDown"===a&&(d.y+=c,h=!0),h){t.cancelable&&t.preventDefault(),d.x=_(d.x,0,s.width-d.width),d.y=_(d.y,0,s.height-d.height);const e=v(d,s.width,s.height),n=E(d,s.width,s.height);r(e,n),o&&o(e,n)}},this.onHandlerKeyDown=(t,n)=>{const{aspect:i=0,crop:r,disabled:o,minWidth:a=0,minHeight:h=0,maxWidth:s,maxHeight:d,onChange:c,onComplete:l}=this.props,p=this.getBox();if(o||!r)return;if("ArrowUp"!==t.key&&"ArrowDown"!==t.key&&"ArrowLeft"!==t.key&&"ArrowRight"!==t.key)return;t.stopPropagation(),t.preventDefault();const g=(navigator.platform.match("Mac")?t.metaKey:t.ctrlKey)?e.nudgeStepLarge:t.shiftKey?e.nudgeStepMedium:e.nudgeStep,w=K(q(v(r,p.width,p.height),t.key,g,n),i,n,p.width,p.height,a,h,s,d);if(!A(r,w)){const e=E(w,p.width,p.height);c(w,e),l&&l(w,e)}},this.onDocPointerDone=e=>{const{crop:t,disabled:n,onComplete:i,onDragEnd:r}=this.props,o=this.getBox();this.unbindDocMove(),!n&&t&&this.mouseDownOnCrop&&(this.mouseDownOnCrop=!1,this.dragStarted=!1,r&&r(e),i&&i(v(t,o.width,o.height),E(t,o.width,o.height)),this.setState({cropIsActive:!1,newCropIsBeingDrawn:!1}))},this.onDragFocus=()=>{var e;null==(e=this.componentRef.current)||e.scrollTo(0,0)}}get document(){return document}getBox(){const e=this.mediaRef.current;if(!e)return{x:0,y:0,width:0,height:0};const{x:t,y:n,width:i,height:r}=e.getBoundingClientRect();return{x:t,y:n,width:i,height:r}}componentDidUpdate(e){const{crop:t,onComplete:n}=this.props;if(n&&!e.crop&&t){const{width:e,height:i}=this.getBox();e&&i&&n(v(t,e,i),E(t,e,i))}}componentWillUnmount(){this.resizeObserver&&this.resizeObserver.disconnect(),this.unbindDocMove()}bindDocMove(){this.docMoveBound||(this.document.addEventListener("pointermove",this.onDocPointerMove,k),this.document.addEventListener("pointerup",this.onDocPointerDone,k),this.document.addEventListener("pointercancel",this.onDocPointerDone,k),this.docMoveBound=!0)}unbindDocMove(){this.docMoveBound&&(this.document.removeEventListener("pointermove",this.onDocPointerMove,k),this.document.removeEventListener("pointerup",this.onDocPointerDone,k),this.document.removeEventListener("pointercancel",this.onDocPointerDone,k),this.docMoveBound=!1)}getCropStyle(){const{crop:e}=this.props;if(e)return{top:`${e.y}${e.unit}`,left:`${e.x}${e.unit}`,width:`${e.width}${e.unit}`,height:`${e.height}${e.unit}`}}dragCrop(){const{evData:e}=this,t=this.getBox(),n=this.makePixelCrop(t),i=e.clientX-e.startClientX,r=e.clientY-e.startClientY;return n.x=_(e.startCropX+i,0,t.width-n.width),n.y=_(e.startCropY+r,0,t.height-n.height),n}getPointRegion(e,t,n,i){const{evData:r}=this,o=r.clientX-e.x,a=r.clientY-e.y;let h,s;return h=i&&t?"nw"===t||"n"===t||"ne"===t:a1?r?[r,r/t]:[o*t,o]:o?[o*t,o]:[r,r/t]:[r,o]}resizeCrop(){const{evData:t}=this,{aspect:n=0,maxWidth:i,maxHeight:r}=this.props,o=this.getBox(),[a,h]=this.resolveMinDimensions(o,n,this.props.minWidth,this.props.minHeight);let s=this.makePixelCrop(o);const d=this.getPointRegion(o,t.ord,a,h),c=t.ord||d;let l=t.clientX-t.startClientX,p=t.clientY-t.startClientY;(a&&"nw"===c||"w"===c||"sw"===c)&&(l=Math.min(l,-a)),(h&&"nw"===c||"n"===c||"ne"===c)&&(p=Math.min(p,-h));const g={unit:"px",x:0,y:0,width:0,height:0};"ne"===d?(g.x=t.startCropX,g.width=l,n?(g.height=g.width/n,g.y=t.startCropY-g.height):(g.height=Math.abs(p),g.y=t.startCropY-g.height)):"se"===d?(g.x=t.startCropX,g.y=t.startCropY,g.width=l,g.height=n?g.width/n:p):"sw"===d?(g.x=t.startCropX+l,g.y=t.startCropY,g.width=Math.abs(l),g.height=n?g.width/n:p):"nw"===d&&(g.x=t.startCropX+l,g.width=Math.abs(l),n?(g.height=g.width/n,g.y=t.startCropY-g.height):(g.height=Math.abs(p),g.y=t.startCropY+p));const w=K(g,n,d,o.width,o.height,a,h,i,r);return n||e.xyOrds.indexOf(c)>-1?s=w:e.xOrds.indexOf(c)>-1?(s.x=w.x,s.width=w.width):e.yOrds.indexOf(c)>-1&&(s.y=w.y,s.height=w.height),s.x=_(s.x,0,o.width-s.width),s.y=_(s.y,0,o.height-s.height),s}renderCropSelection(){const{ariaLabels:t=e.defaultProps.ariaLabels,disabled:n,locked:i,renderSelectionAddon:r,ruleOfThirds:o,crop:a}=this.props,h=this.getCropStyle();if(a)return p.createElement("div",{style:h,className:"ReactCrop__crop-selection",onPointerDown:this.onCropPointerDown,"aria-label":t.cropArea,tabIndex:0,onKeyDown:this.onComponentKeyDown,role:"group"},!n&&!i&&p.createElement("div",{className:"ReactCrop__drag-elements",onFocus:this.onDragFocus},p.createElement("div",{className:"ReactCrop__drag-bar ord-n","data-ord":"n"}),p.createElement("div",{className:"ReactCrop__drag-bar ord-e","data-ord":"e"}),p.createElement("div",{className:"ReactCrop__drag-bar ord-s","data-ord":"s"}),p.createElement("div",{className:"ReactCrop__drag-bar ord-w","data-ord":"w"}),p.createElement("div",{className:"ReactCrop__drag-handle ord-nw","data-ord":"nw",tabIndex:0,"aria-label":t.nwDragHandle,onKeyDown:e=>this.onHandlerKeyDown(e,"nw"),role:"button"}),p.createElement("div",{className:"ReactCrop__drag-handle ord-n","data-ord":"n",tabIndex:0,"aria-label":t.nDragHandle,onKeyDown:e=>this.onHandlerKeyDown(e,"n"),role:"button"}),p.createElement("div",{className:"ReactCrop__drag-handle ord-ne","data-ord":"ne",tabIndex:0,"aria-label":t.neDragHandle,onKeyDown:e=>this.onHandlerKeyDown(e,"ne"),role:"button"}),p.createElement("div",{className:"ReactCrop__drag-handle ord-e","data-ord":"e",tabIndex:0,"aria-label":t.eDragHandle,onKeyDown:e=>this.onHandlerKeyDown(e,"e"),role:"button"}),p.createElement("div",{className:"ReactCrop__drag-handle ord-se","data-ord":"se",tabIndex:0,"aria-label":t.seDragHandle,onKeyDown:e=>this.onHandlerKeyDown(e,"se"),role:"button"}),p.createElement("div",{className:"ReactCrop__drag-handle ord-s","data-ord":"s",tabIndex:0,"aria-label":t.sDragHandle,onKeyDown:e=>this.onHandlerKeyDown(e,"s"),role:"button"}),p.createElement("div",{className:"ReactCrop__drag-handle ord-sw","data-ord":"sw",tabIndex:0,"aria-label":t.swDragHandle,onKeyDown:e=>this.onHandlerKeyDown(e,"sw"),role:"button"}),p.createElement("div",{className:"ReactCrop__drag-handle ord-w","data-ord":"w",tabIndex:0,"aria-label":t.wDragHandle,onKeyDown:e=>this.onHandlerKeyDown(e,"w"),role:"button"})),r&&p.createElement("div",{className:"ReactCrop__selection-addon",onPointerDown:e=>e.stopPropagation()},r(this.state)),o&&p.createElement(p.Fragment,null,p.createElement("div",{className:"ReactCrop__rule-of-thirds-hz"}),p.createElement("div",{className:"ReactCrop__rule-of-thirds-vt"})))}makePixelCrop(e){return v({...S,...this.props.crop||{}},e.width,e.height)}render(){const{aspect:e,children:t,circularCrop:n,className:i,crop:r,disabled:o,locked:a,style:h,ruleOfThirds:s}=this.props,{cropIsActive:d,newCropIsBeingDrawn:c}=this.state,l=r?this.renderCropSelection():null,g=F("ReactCrop",i,d&&"ReactCrop--active",o&&"ReactCrop--disabled",a&&"ReactCrop--locked",c&&"ReactCrop--new-crop",r&&e&&"ReactCrop--fixed-aspect",r&&n&&"ReactCrop--circular-crop",r&&s&&"ReactCrop--rule-of-thirds",!this.dragStarted&&r&&!r.width&&!r.height&&"ReactCrop--invisible-crop",n&&"ReactCrop--no-animate");return p.createElement("div",{ref:this.componentRef,className:g,style:h},p.createElement("div",{ref:this.mediaRef,className:"ReactCrop__child-wrapper",onPointerDown:this.onComponentPointerDown},t),r?p.createElement("svg",{className:"ReactCrop__crop-mask",width:"100%",height:"100%"},p.createElement("defs",null,p.createElement("mask",{id:`hole-${this.instanceId}`},p.createElement("rect",{width:"100%",height:"100%",fill:"white"}),n?p.createElement("ellipse",{cx:`${r.x+r.width/2}${r.unit}`,cy:`${r.y+r.height/2}${r.unit}`,rx:`${r.width/2}${r.unit}`,ry:`${r.height/2}${r.unit}`,fill:"black"}):p.createElement("rect",{x:`${r.x}${r.unit}`,y:`${r.y}${r.unit}`,width:`${r.width}${r.unit}`,height:`${r.height}${r.unit}`,fill:"black"}))),p.createElement("rect",{fill:"black",fillOpacity:.5,width:"100%",height:"100%",mask:`url(#hole-${this.instanceId})`})):void 0,l)}};M.xOrds=["e","w"],M.yOrds=["n","s"],M.xyOrds=["nw","ne","se","sw"],M.nudgeStep=1,M.nudgeStepMedium=10,M.nudgeStepLarge=100,M.defaultProps={ariaLabels:{cropArea:"Use the arrow keys to move the crop selection area",nwDragHandle:"Use the arrow keys to move the north west drag handle to change the crop selection area",nDragHandle:"Use the up and down arrow keys to move the north drag handle to change the crop selection area",neDragHandle:"Use the arrow keys to move the north east drag handle to change the crop selection area",eDragHandle:"Use the up and down arrow keys to move the east drag handle to change the crop selection area",seDragHandle:"Use the arrow keys to move the south east drag handle to change the crop selection area",sDragHandle:"Use the up and down arrow keys to move the south drag handle to change the crop selection area",swDragHandle:"Use the arrow keys to move the south west drag handle to change the crop selection area",wDragHandle:"Use the up and down arrow keys to move the west drag handle to change the crop selection area"}};let Q=M;const G=Math.PI/180;async function J(e,t,n,i=1,r=0){const o=t.getContext("2d");if(!o)throw new Error("No 2d context");const a=e.naturalWidth/e.width,h=e.naturalHeight/e.height,s=window.devicePixelRatio;t.width=Math.floor(n.width*a*s),t.height=Math.floor(n.height*h*s),o.scale(s,s),o.imageSmoothingQuality="high";const d=n.x*a,c=n.y*h,l=r*G,p=e.naturalWidth/2,g=e.naturalHeight/2;o.save(),o.translate(-d,-c),o.translate(p,g),o.rotate(l),o.scale(i,i),o.translate(-p,-g),o.drawImage(e,0,0,e.naturalWidth,e.naturalHeight,0,0,e.naturalWidth,e.naturalHeight),o.restore()}function Z(e,t,n){return W(z({unit:"%",width:90},n,e,t),e,t)}function ee(e,t,n){D.useEffect((()=>{const i=setTimeout((()=>e.apply({...n})),t);return()=>{clearTimeout(i)}}),n)}const te=90,N=1,B=e=>{const t=D.useRef(null),n=D.useRef(null),i=D.useRef(""),{aspect:r,callbackFn:o,callbackLabel:a,imgSrc:h,subTitle:s,title:d}=e,[c,l]=D.useState(),[p,g]=D.useState(),[w,u]=D.useState(!1);ee((async()=>{null!=p&&p.width&&null!=p&&p.height&&n.current&&t.current&&J(n.current,t.current,p,1)}),100,[p,1]);return m.jsxs(m.Fragment,{children:[m.jsxs(X,{sx:{padding:3},children:[m.jsx(L,{children:d}),m.jsx("br",{}),m.jsx(L,{variant:"quiet",children:s})]}),m.jsxs($,{sx:{borderBottom:"2px dashed silver",borderTop:"2px dashed silver",padding:3},children:[w&&m.jsx(X,{sx:{flex:1},children:m.jsx(T,{label:"Uploading image now. It'll only a sec. Hopefully."})}),!w&&!!h&&m.jsx($,{sx:{flex:1,justifyContent:"center"},children:m.jsx(Q,{aspect:r,crop:c,minHeight:100,onChange:(e,t)=>l(t),onComplete:e=>g(e),children:m.jsx("img",{alt:"Crop me","data-testid":"cropImage",onLoad:function(e){const{width:t,height:n}=e.currentTarget;l(Z(t,n,r))},ref:n,src:h})})})]}),m.jsx(X,{sx:{padding:3},children:m.jsx(j,{type:"button",onClick:async function(){u(!0);const e=n.current,r=t.current;if(!e||!r||!p)throw new Error("Crop canvas does not exist");const a=e.naturalWidth/e.width,h=e.naturalHeight/e.height,s=new OffscreenCanvas(p.width*a,p.height*h),d=s.getContext("2d");if(!d)throw new Error("No 2d context");d.drawImage(r,0,0,r.width,r.height,0,0,s.width,s.height);const c=await s.convertToBlob({type:"image/jpeg",quality:90});i.current&&URL.revokeObjectURL(i.current),i.current=URL.createObjectURL(c),await o(i.current),u(!1)},disabled:w,children:a})})]})};try{B.displayName="ImageCrop",B.__docgenInfo={description:"",displayName:"ImageCrop",props:{aspect:{defaultValue:null,description:"",name:"aspect",required:!0,type:{name:"number"}},callbackFn:{defaultValue:null,description:"",name:"callbackFn",required:!0,type:{name:"(imgSrc: string) => Promise"}},callbackLabel:{defaultValue:null,description:"",name:"callbackLabel",required:!0,type:{name:"string"}},imgSrc:{defaultValue:null,description:"",name:"imgSrc",required:!0,type:{name:"string"}},subTitle:{defaultValue:null,description:"",name:"subTitle",required:!1,type:{name:"string"}},title:{defaultValue:null,description:"",name:"title",required:!0,type:{name:"string"}}}}}catch{}export{B as I}; \ No newline at end of file diff --git a/storybook-static/assets/ImageCrop.stories-DUOLW0ZZ.js b/storybook-static/assets/ImageCrop.stories-CgMDwovu.js similarity index 85% rename from storybook-static/assets/ImageCrop.stories-DUOLW0ZZ.js rename to storybook-static/assets/ImageCrop.stories-CgMDwovu.js index 0434b2ba16..8a83d2b319 100644 --- a/storybook-static/assets/ImageCrop.stories-DUOLW0ZZ.js +++ b/storybook-static/assets/ImageCrop.stories-CgMDwovu.js @@ -1 +1 @@ -import{j as e}from"./jsx-runtime-CexXSJP5.js";import{I as p}from"./ImageCrop-DCgV90x1.js";import"./index-BP8_t0zE.js";import"./Button-B7QBvkxh.js";import"./Icon-BoVZOGVD.js";import"./emotion-styled.browser.esm-Dz2BNYeh.js";import"./extends-CF3RwP-h.js";import"./parseProps-780b287c.browser.esm-DiCerVr_.js";import"./emotion-use-insertion-effect-with-fallbacks.browser.esm-UWD3gXM2.js";import"./supporter-D7hp958O.js";import"./icon-arrow-down-CJeToCJe.js";import"./icon-star-active-ClN6U5FF.js";import"./theme-ui-core-jsx-runtime.browser.esm-CH0qhC10.js";import"./hoist-non-react-statics.cjs-CQI8syxn.js";import"./theme-ui-components.esm-DCiJ1mMX.js";import"./Loader-DmqUoSY8.js";import"./emotion-react.browser.esm-BYoRxRk_.js";import"./theme-ui-core.browser.esm-CIov4Ln1.js";import"./cjs-Clfm10Kj.js";const _={title:"Forms/ImageCrop",component:p},t=()=>e.jsx("div",{style:{width:"600px"},children:e.jsx(p,{aspect:1,callbackFn:()=>Promise.resolve("http://upload.path/"),callbackLabel:"Upload image",imgSrc:"https://onearmy.github.io/academy/assets/comm_badges.jpg",subTitle:"Before uploading, select how we should crop the image to fit.",title:"Select crop"})});var o,r,a;t.parameters={...t.parameters,docs:{...null==(o=t.parameters)?void 0:o.docs,source:{originalSource:'() =>
\n Promise.resolve(\'http://upload.path/\')} callbackLabel="Upload image" imgSrc="https://onearmy.github.io/academy/assets/comm_badges.jpg" subTitle="Before uploading, select how we should crop the image to fit." title="Select crop" />\n
',...null==(a=null==(r=t.parameters)?void 0:r.docs)?void 0:a.source}}};const k=["Default"];export{t as Default,k as __namedExportsOrder,_ as default}; \ No newline at end of file +import{j as e}from"./jsx-runtime-CexXSJP5.js";import{I as p}from"./ImageCrop-IvK67aX8.js";import"./index-BP8_t0zE.js";import"./Button-D4nxT_g_.js";import"./Icon-BoVZOGVD.js";import"./emotion-styled.browser.esm-Dz2BNYeh.js";import"./extends-CF3RwP-h.js";import"./parseProps-780b287c.browser.esm-DiCerVr_.js";import"./emotion-use-insertion-effect-with-fallbacks.browser.esm-UWD3gXM2.js";import"./supporter-D7hp958O.js";import"./icon-arrow-down-CJeToCJe.js";import"./icon-star-active-ClN6U5FF.js";import"./theme-ui-core-jsx-runtime.browser.esm-CH0qhC10.js";import"./hoist-non-react-statics.cjs-CQI8syxn.js";import"./theme-ui-components.esm-BngKL4Rx.js";import"./Loader-BiCtIOH2.js";import"./emotion-react.browser.esm-BYoRxRk_.js";import"./theme-ui-core.browser.esm-CIov4Ln1.js";import"./cjs-Clfm10Kj.js";const _={title:"Forms/ImageCrop",component:p},t=()=>e.jsx("div",{style:{width:"600px"},children:e.jsx(p,{aspect:1,callbackFn:()=>Promise.resolve("http://upload.path/"),callbackLabel:"Upload image",imgSrc:"https://onearmy.github.io/academy/assets/comm_badges.jpg",subTitle:"Before uploading, select how we should crop the image to fit.",title:"Select crop"})});var o,r,a;t.parameters={...t.parameters,docs:{...null==(o=t.parameters)?void 0:o.docs,source:{originalSource:'() =>
\n Promise.resolve(\'http://upload.path/\')} callbackLabel="Upload image" imgSrc="https://onearmy.github.io/academy/assets/comm_badges.jpg" subTitle="Before uploading, select how we should crop the image to fit." title="Select crop" />\n
',...null==(a=null==(r=t.parameters)?void 0:r.docs)?void 0:a.source}}};const k=["Default"];export{t as Default,k as __namedExportsOrder,_ as default}; \ No newline at end of file diff --git a/storybook-static/assets/ImageGallery-BkpAuthm.js b/storybook-static/assets/ImageGallery-Z1nzt08r.js similarity index 98% rename from storybook-static/assets/ImageGallery-BkpAuthm.js rename to storybook-static/assets/ImageGallery-Z1nzt08r.js index 9832a72722..21e65d1158 100644 --- a/storybook-static/assets/ImageGallery-BkpAuthm.js +++ b/storybook-static/assets/ImageGallery-Z1nzt08r.js @@ -1,5 +1,5 @@ -/*! For license information please see ImageGallery-BkpAuthm.js.LICENSE.txt */ -import{_ as N}from"./iframe-B1GJESFe.js";import{j as h}from"./jsx-runtime-CexXSJP5.js";import{r as v}from"./index-BP8_t0zE.js";import{n as A}from"./emotion-styled.browser.esm-Dz2BNYeh.js";import{I as b}from"./Icon-BoVZOGVD.js";import{a as T,F as w,I as C}from"./theme-ui-components.esm-DCiJ1mMX.js";function u(t,e,i){const s=document.createElement(e);return t&&(s.className=t),i&&i.appendChild(s),s}function k(t,e,i){let s=`translate3d(${t}px,0px,0)`;return void 0!==i&&(s+=` scale3d(${i},${i},1)`),s}function _(t,e,i){t.style.width="number"==typeof e?`${e}px`:e,t.style.height="number"==typeof i?`${i}px`:i}const d={IDLE:"idle",LOADING:"loading",LOADED:"loaded",ERROR:"error"};function $(t){return"button"in t&&1===t.button||t.ctrlKey||t.metaKey||t.altKey||t.shiftKey}function m(t,e,i=document){let s=[];if(t instanceof Element)s=[t];else if(t instanceof NodeList||Array.isArray(t))s=Array.from(t);else{const n="string"==typeof t?t:e;n&&(s=Array.from(i.querySelectorAll(n)))}return s}function j(t){return"function"==typeof t&&t.prototype&&t.prototype.goTo}function P(){return!(!navigator.vendor||!navigator.vendor.match(/apple/i))}class W{constructor(t,e){this.type=t,this.defaultPrevented=!1,e&&Object.assign(this,e)}preventDefault(){this.defaultPrevented=!0}}class V{constructor(){this._listeners={},this._filters={},this.pswp=void 0,this.options=void 0}addFilter(t,e,i=100){var s,n,a;this._filters[t]||(this._filters[t]=[]),null===(s=this._filters[t])||void 0===s||s.push({fn:e,priority:i}),null===(n=this._filters[t])||void 0===n||n.sort(((t,e)=>t.priority-e.priority)),null===(a=this.pswp)||void 0===a||a.addFilter(t,e,i)}removeFilter(t,e){this._filters[t]&&(this._filters[t]=this._filters[t].filter((t=>t.fn!==e))),this.pswp&&this.pswp.removeFilter(t,e)}applyFilters(t,...e){var i;return null===(i=this._filters[t])||void 0===i||i.forEach((t=>{e[0]=t.fn.apply(this,e)})),e[0]}on(t,e){var i,s;this._listeners[t]||(this._listeners[t]=[]),null===(i=this._listeners[t])||void 0===i||i.push(e),null===(s=this.pswp)||void 0===s||s.on(t,e)}off(t,e){var i;this._listeners[t]&&(this._listeners[t]=this._listeners[t].filter((t=>e!==t))),null===(i=this.pswp)||void 0===i||i.off(t,e)}dispatch(t,e){var i;if(this.pswp)return this.pswp.dispatch(t,e);const s=new W(t,e);return null===(i=this._listeners[t])||void 0===i||i.forEach((t=>{t.call(this,s)})),s}}class G{constructor(t,e){if(this.element=u("pswp__img pswp__img--placeholder",t?"img":"div",e),t){const e=this.element;e.decoding="async",e.alt="",e.src=t,e.setAttribute("role","presentation")}this.element.setAttribute("aria-hidden","true")}setDisplayedSize(t,e){this.element&&("IMG"===this.element.tagName?(_(this.element,250,"auto"),this.element.style.transformOrigin="0 0",this.element.style.transform=k(0,0,t/250)):_(this.element,t,e))}destroy(){var t;null!==(t=this.element)&&void 0!==t&&t.parentNode&&this.element.remove(),this.element=null}}class U{constructor(t,e,i){this.instance=e,this.data=t,this.index=i,this.element=void 0,this.placeholder=void 0,this.slide=void 0,this.displayedImageWidth=0,this.displayedImageHeight=0,this.width=Number(this.data.w)||Number(this.data.width)||0,this.height=Number(this.data.h)||Number(this.data.height)||0,this.isAttached=!1,this.hasSlide=!1,this.isDecoding=!1,this.state=d.IDLE,this.data.type?this.type=this.data.type:this.data.src?this.type="image":this.type="html",this.instance.dispatch("contentInit",{content:this})}removePlaceholder(){this.placeholder&&!this.keepPlaceholder()&&setTimeout((()=>{this.placeholder&&(this.placeholder.destroy(),this.placeholder=void 0)}),1e3)}load(t,e){if(this.slide&&this.usePlaceholder())if(this.placeholder){const t=this.placeholder.element;t&&!t.parentElement&&this.slide.container.prepend(t)}else{const t=this.instance.applyFilters("placeholderSrc",!(!this.data.msrc||!this.slide.isFirstSlide)&&this.data.msrc,this);this.placeholder=new G(t,this.slide.container)}this.element&&!e||this.instance.dispatch("contentLoad",{content:this,isLazy:t}).defaultPrevented||(this.isImageContent()?(this.element=u("pswp__img","img"),this.displayedImageWidth&&this.loadImage(t)):(this.element=u("pswp__content","div"),this.element.innerHTML=this.data.html||""),e&&this.slide&&this.slide.updateContentSize(!0))}loadImage(t){var e,i;if(!this.isImageContent()||!this.element||this.instance.dispatch("contentLoadImage",{content:this,isLazy:t}).defaultPrevented)return;const s=this.element;this.updateSrcsetSizes(),this.data.srcset&&(s.srcset=this.data.srcset),s.src=null!==(e=this.data.src)&&void 0!==e?e:"",s.alt=null!==(i=this.data.alt)&&void 0!==i?i:"",this.state=d.LOADING,s.complete?this.onLoaded():(s.onload=()=>{this.onLoaded()},s.onerror=()=>{this.onError()})}setSlide(t){this.slide=t,this.hasSlide=!0,this.instance=t.pswp}onLoaded(){this.state=d.LOADED,this.slide&&this.element&&(this.instance.dispatch("loadComplete",{slide:this.slide,content:this}),this.slide.isActive&&this.slide.heavyAppended&&!this.element.parentNode&&(this.append(),this.slide.updateContentSize(!0)),(this.state===d.LOADED||this.state===d.ERROR)&&this.removePlaceholder())}onError(){this.state=d.ERROR,this.slide&&(this.displayError(),this.instance.dispatch("loadComplete",{slide:this.slide,isError:!0,content:this}),this.instance.dispatch("loadError",{slide:this.slide,content:this}))}isLoading(){return this.instance.applyFilters("isContentLoading",this.state===d.LOADING,this)}isError(){return this.state===d.ERROR}isImageContent(){return"image"===this.type}setDisplayedSize(t,e){if(this.element&&(this.placeholder&&this.placeholder.setDisplayedSize(t,e),!this.instance.dispatch("contentResize",{content:this,width:t,height:e}).defaultPrevented&&(_(this.element,t,e),this.isImageContent()&&!this.isError()))){const i=!this.displayedImageWidth&&t;this.displayedImageWidth=t,this.displayedImageHeight=e,i?this.loadImage(!1):this.updateSrcsetSizes(),this.slide&&this.instance.dispatch("imageSizeChange",{slide:this.slide,width:t,height:e,content:this})}}isZoomable(){return this.instance.applyFilters("isContentZoomable",this.isImageContent()&&this.state!==d.ERROR,this)}updateSrcsetSizes(){if(!this.isImageContent()||!this.element||!this.data.srcset)return;const t=this.element,e=this.instance.applyFilters("srcsetSizesWidth",this.displayedImageWidth,this);(!t.dataset.largestUsedSize||e>parseInt(t.dataset.largestUsedSize,10))&&(t.sizes=e+"px",t.dataset.largestUsedSize=String(e))}usePlaceholder(){return this.instance.applyFilters("useContentPlaceholder",this.isImageContent(),this)}lazyLoad(){this.instance.dispatch("contentLazyLoad",{content:this}).defaultPrevented||this.load(!0)}keepPlaceholder(){return this.instance.applyFilters("isKeepingPlaceholder",this.isLoading(),this)}destroy(){this.hasSlide=!1,this.slide=void 0,!this.instance.dispatch("contentDestroy",{content:this}).defaultPrevented&&(this.remove(),this.placeholder&&(this.placeholder.destroy(),this.placeholder=void 0),this.isImageContent()&&this.element&&(this.element.onload=null,this.element.onerror=null,this.element=void 0))}displayError(){if(this.slide){var t,e;let i=u("pswp__error-msg","div");i.innerText=null!==(t=null===(e=this.instance.options)||void 0===e?void 0:e.errorMsg)&&void 0!==t?t:"",i=this.instance.applyFilters("contentErrorElement",i,this),this.element=u("pswp__content pswp__error-msg-container","div"),this.element.appendChild(i),this.slide.container.innerText="",this.slide.container.appendChild(this.element),this.slide.updateContentSize(!0),this.removePlaceholder()}}append(){if(this.isAttached||!this.element)return;if(this.isAttached=!0,this.state===d.ERROR)return void this.displayError();if(this.instance.dispatch("contentAppend",{content:this}).defaultPrevented)return;const t="decode"in this.element;this.isImageContent()?t&&this.slide&&(!this.slide.isActive||P())?(this.isDecoding=!0,this.element.decode().catch((()=>{})).finally((()=>{this.isDecoding=!1,this.appendImage()}))):this.appendImage():this.slide&&!this.element.parentNode&&this.slide.container.appendChild(this.element)}activate(){this.instance.dispatch("contentActivate",{content:this}).defaultPrevented||!this.slide||(this.isImageContent()&&this.isDecoding&&!P()?this.appendImage():this.isError()&&this.load(!1,!0),this.slide.holderElement&&this.slide.holderElement.setAttribute("aria-hidden","false"))}deactivate(){this.instance.dispatch("contentDeactivate",{content:this}),this.slide&&this.slide.holderElement&&this.slide.holderElement.setAttribute("aria-hidden","true")}remove(){this.isAttached=!1,!this.instance.dispatch("contentRemove",{content:this}).defaultPrevented&&(this.element&&this.element.parentNode&&this.element.remove(),this.placeholder&&this.placeholder.element&&this.placeholder.element.remove())}appendImage(){this.isAttached&&(this.instance.dispatch("contentAppendImage",{content:this}).defaultPrevented||(this.slide&&this.element&&!this.element.parentNode&&this.slide.container.appendChild(this.element),(this.state===d.LOADED||this.state===d.ERROR)&&this.removePlaceholder()))}}function H(t,e){if(t.getViewportSizeFn){const i=t.getViewportSizeFn(t,e);if(i)return i}return{x:document.documentElement.clientWidth,y:window.innerHeight}}function g(t,e,i,s,n){let a=0;if(e.paddingFn)a=e.paddingFn(i,s,n)[t];else if(e.padding)a=e.padding[t];else{const i="padding"+t[0].toUpperCase()+t.slice(1);e[i]&&(a=e[i])}return Number(a)||0}function Z(t,e,i,s){return{x:e.x-g("left",t,e,i,s)-g("right",t,e,i,s),y:e.y-g("top",t,e,i,s)-g("bottom",t,e,i,s)}}const D=4e3;class q{constructor(t,e,i,s){this.pswp=s,this.options=t,this.itemData=e,this.index=i,this.panAreaSize=null,this.elementSize=null,this.fit=1,this.fill=1,this.vFill=1,this.initial=1,this.secondary=1,this.max=1,this.min=1}update(t,e,i){const s={x:t,y:e};this.elementSize=s,this.panAreaSize=i;const n=i.x/s.x,a=i.y/s.y;this.fit=Math.min(1,na?n:a),this.vFill=Math.min(1,a),this.initial=this._getInitial(),this.secondary=this._getSecondary(),this.max=Math.max(this.initial,this.secondary,this._getMax()),this.min=Math.min(this.fit,this.initial,this.secondary),this.pswp&&this.pswp.dispatch("zoomLevelsUpdate",{zoomLevels:this,slideData:this.itemData})}_parseZoomLevelOption(t){const e=t+"ZoomLevel",i=this.options[e];if(i)return"function"==typeof i?i(this):"fill"===i?this.fill:"fit"===i?this.fit:Number(i)}_getSecondary(){let t=this._parseZoomLevelOption("secondary");return t||(t=Math.min(1,3*this.fit),this.elementSize&&t*this.elementSize.x>D&&(t=D/this.elementSize.x),t)}_getInitial(){return this._parseZoomLevelOption("initial")||this.fit}_getMax(){return this._parseZoomLevelOption("max")||Math.max(1,4*this.fit)}}function z(t,e,i){const s=e.createContentFromData(t,i);let n;const{options:a}=e;if(a){let o;n=new q(a,t,-1),o=e.pswp?e.pswp.viewportSize:H(a,e);const l=Z(a,o,t,i);n.update(s.width,s.height,l)}return s.lazyLoad(),n&&s.setDisplayedSize(Math.ceil(s.width*n.initial),Math.ceil(s.height*n.initial)),s}function B(t,e){const i=e.getItemData(t);if(!e.dispatch("lazyLoadSlide",{index:t,itemData:i}).defaultPrevented)return z(i,e,t)}class K extends V{getNumItems(){var t;let e=0;const i=null===(t=this.options)||void 0===t?void 0:t.dataSource;i&&"length"in i?e=i.length:i&&"gallery"in i&&(i.items||(i.items=this._getGalleryDOMElements(i.gallery)),i.items&&(e=i.items.length));const s=this.dispatch("numItems",{dataSource:i,numItems:e});return this.applyFilters("numItems",s.numItems,i)}createContentFromData(t,e){return new U(t,this,e)}getItemData(t){var e;const i=null===(e=this.options)||void 0===e?void 0:e.dataSource;let s={};Array.isArray(i)?s=i[t]:i&&"gallery"in i&&(i.items||(i.items=this._getGalleryDOMElements(i.gallery)),s=i.items[t]);let n=s;n instanceof Element&&(n=this._domElementToItemData(n));const a=this.dispatch("itemData",{itemData:n||{},index:t});return this.applyFilters("itemData",a.itemData,t)}_getGalleryDOMElements(t){var e,i;return null!==(e=this.options)&&void 0!==e&&e.children||null!==(i=this.options)&&void 0!==i&&i.childSelector?m(this.options.children,this.options.childSelector,t)||[]:[t]}_domElementToItemData(t){const e={element:t},i="A"===t.tagName?t:t.querySelector("a");if(i){e.src=i.dataset.pswpSrc||i.href,i.dataset.pswpSrcset&&(e.srcset=i.dataset.pswpSrcset),e.width=i.dataset.pswpWidth?parseInt(i.dataset.pswpWidth,10):0,e.height=i.dataset.pswpHeight?parseInt(i.dataset.pswpHeight,10):0,e.w=e.width,e.h=e.height,i.dataset.pswpType&&(e.type=i.dataset.pswpType);const n=t.querySelector("img");var s;if(n)e.msrc=n.currentSrc||n.src,e.alt=null!==(s=n.getAttribute("alt"))&&void 0!==s?s:"";(i.dataset.pswpCropped||i.dataset.cropped)&&(e.thumbCropped=!0)}return this.applyFilters("domItemData",e,t,i)}lazyLoadData(t,e){return z(t,this,e)}}class X extends K{constructor(t){super(),this.options=t||{},this._uid=0,this.shouldOpen=!1,this._preloadedContent=void 0,this.onThumbnailsClick=this.onThumbnailsClick.bind(this)}init(){m(this.options.gallery,this.options.gallerySelector).forEach((t=>{t.addEventListener("click",this.onThumbnailsClick,!1)}))}onThumbnailsClick(t){if($(t)||window.pswp)return;let e={x:t.clientX,y:t.clientY};!e.x&&!e.y&&(e=null);let i=this.getClickedIndex(t);i=this.applyFilters("clickedIndex",i,t,this);const s={gallery:t.currentTarget};i>=0&&(t.preventDefault(),this.loadAndOpen(i,s,e))}getClickedIndex(t){if(this.options.getClickedIndexFn)return this.options.getClickedIndexFn.call(this,t);const e=t.target,i=m(this.options.children,this.options.childSelector,t.currentTarget).findIndex((t=>t===e||t.contains(e)));return-1!==i?i:this.options.children||this.options.childSelector?-1:0}loadAndOpen(t,e,i){if(window.pswp||!this.options)return!1;if(!e&&this.options.gallery&&this.options.children){const t=m(this.options.gallery);t[0]&&(e={gallery:t[0]})}return this.options.index=t,this.options.initialPointerPos=i,this.shouldOpen=!0,this.preload(t,e),!0}preload(t,e){const{options:i}=this;e&&(i.dataSource=e);const s=[],n=typeof i.pswpModule;if(j(i.pswpModule))s.push(Promise.resolve(i.pswpModule));else{if("string"===n)throw new Error("pswpModule as string is no longer supported");if("function"!==n)throw new Error("pswpModule is not valid");s.push(i.pswpModule())}"function"==typeof i.openPromise&&s.push(i.openPromise()),!1!==i.preloadFirstSlide&&t>=0&&(this._preloadedContent=B(t,this));const a=++this._uid;Promise.all(s).then((t=>{if(this.shouldOpen){const e=t[0];this._openPhotoswipe(e,a)}}))}_openPhotoswipe(t,e){if(e!==this._uid&&this.shouldOpen||(this.shouldOpen=!1,window.pswp))return;const i="object"==typeof t?new t.default(this.options):new t(this.options);this.pswp=i,window.pswp=i,Object.keys(this._listeners).forEach((t=>{var e;null===(e=this._listeners[t])||void 0===e||e.forEach((e=>{i.on(t,e)}))})),Object.keys(this._filters).forEach((t=>{var e;null===(e=this._filters[t])||void 0===e||e.forEach((e=>{i.addFilter(t,e.fn,e.priority)}))})),this._preloadedContent&&(i.contentLoader.addToCache(this._preloadedContent),this._preloadedContent=void 0),i.on("destroy",(()=>{this.pswp=void 0,delete window.pswp})),i.init()}destroy(){var t;null===(t=this.pswp)||void 0===t||t.destroy(),this.shouldOpen=!1,this._listeners={},m(this.options.gallery,this.options.gallerySelector).forEach((t=>{t.removeEventListener("click",this.onThumbnailsClick,!1)}))}}const Y=A(T)` +/*! For license information please see ImageGallery-Z1nzt08r.js.LICENSE.txt */ +import{_ as N}from"./iframe-BgaKNRp_.js";import{j as h}from"./jsx-runtime-CexXSJP5.js";import{r as v}from"./index-BP8_t0zE.js";import{n as A}from"./emotion-styled.browser.esm-Dz2BNYeh.js";import{I as b}from"./Icon-BoVZOGVD.js";import{a as T,F as w,I as C}from"./theme-ui-components.esm-BngKL4Rx.js";function u(t,e,i){const s=document.createElement(e);return t&&(s.className=t),i&&i.appendChild(s),s}function k(t,e,i){let s=`translate3d(${t}px,0px,0)`;return void 0!==i&&(s+=` scale3d(${i},${i},1)`),s}function _(t,e,i){t.style.width="number"==typeof e?`${e}px`:e,t.style.height="number"==typeof i?`${i}px`:i}const d={IDLE:"idle",LOADING:"loading",LOADED:"loaded",ERROR:"error"};function $(t){return"button"in t&&1===t.button||t.ctrlKey||t.metaKey||t.altKey||t.shiftKey}function m(t,e,i=document){let s=[];if(t instanceof Element)s=[t];else if(t instanceof NodeList||Array.isArray(t))s=Array.from(t);else{const n="string"==typeof t?t:e;n&&(s=Array.from(i.querySelectorAll(n)))}return s}function j(t){return"function"==typeof t&&t.prototype&&t.prototype.goTo}function P(){return!(!navigator.vendor||!navigator.vendor.match(/apple/i))}class W{constructor(t,e){this.type=t,this.defaultPrevented=!1,e&&Object.assign(this,e)}preventDefault(){this.defaultPrevented=!0}}class V{constructor(){this._listeners={},this._filters={},this.pswp=void 0,this.options=void 0}addFilter(t,e,i=100){var s,n,a;this._filters[t]||(this._filters[t]=[]),null===(s=this._filters[t])||void 0===s||s.push({fn:e,priority:i}),null===(n=this._filters[t])||void 0===n||n.sort(((t,e)=>t.priority-e.priority)),null===(a=this.pswp)||void 0===a||a.addFilter(t,e,i)}removeFilter(t,e){this._filters[t]&&(this._filters[t]=this._filters[t].filter((t=>t.fn!==e))),this.pswp&&this.pswp.removeFilter(t,e)}applyFilters(t,...e){var i;return null===(i=this._filters[t])||void 0===i||i.forEach((t=>{e[0]=t.fn.apply(this,e)})),e[0]}on(t,e){var i,s;this._listeners[t]||(this._listeners[t]=[]),null===(i=this._listeners[t])||void 0===i||i.push(e),null===(s=this.pswp)||void 0===s||s.on(t,e)}off(t,e){var i;this._listeners[t]&&(this._listeners[t]=this._listeners[t].filter((t=>e!==t))),null===(i=this.pswp)||void 0===i||i.off(t,e)}dispatch(t,e){var i;if(this.pswp)return this.pswp.dispatch(t,e);const s=new W(t,e);return null===(i=this._listeners[t])||void 0===i||i.forEach((t=>{t.call(this,s)})),s}}class G{constructor(t,e){if(this.element=u("pswp__img pswp__img--placeholder",t?"img":"div",e),t){const e=this.element;e.decoding="async",e.alt="",e.src=t,e.setAttribute("role","presentation")}this.element.setAttribute("aria-hidden","true")}setDisplayedSize(t,e){this.element&&("IMG"===this.element.tagName?(_(this.element,250,"auto"),this.element.style.transformOrigin="0 0",this.element.style.transform=k(0,0,t/250)):_(this.element,t,e))}destroy(){var t;null!==(t=this.element)&&void 0!==t&&t.parentNode&&this.element.remove(),this.element=null}}class U{constructor(t,e,i){this.instance=e,this.data=t,this.index=i,this.element=void 0,this.placeholder=void 0,this.slide=void 0,this.displayedImageWidth=0,this.displayedImageHeight=0,this.width=Number(this.data.w)||Number(this.data.width)||0,this.height=Number(this.data.h)||Number(this.data.height)||0,this.isAttached=!1,this.hasSlide=!1,this.isDecoding=!1,this.state=d.IDLE,this.data.type?this.type=this.data.type:this.data.src?this.type="image":this.type="html",this.instance.dispatch("contentInit",{content:this})}removePlaceholder(){this.placeholder&&!this.keepPlaceholder()&&setTimeout((()=>{this.placeholder&&(this.placeholder.destroy(),this.placeholder=void 0)}),1e3)}load(t,e){if(this.slide&&this.usePlaceholder())if(this.placeholder){const t=this.placeholder.element;t&&!t.parentElement&&this.slide.container.prepend(t)}else{const t=this.instance.applyFilters("placeholderSrc",!(!this.data.msrc||!this.slide.isFirstSlide)&&this.data.msrc,this);this.placeholder=new G(t,this.slide.container)}this.element&&!e||this.instance.dispatch("contentLoad",{content:this,isLazy:t}).defaultPrevented||(this.isImageContent()?(this.element=u("pswp__img","img"),this.displayedImageWidth&&this.loadImage(t)):(this.element=u("pswp__content","div"),this.element.innerHTML=this.data.html||""),e&&this.slide&&this.slide.updateContentSize(!0))}loadImage(t){var e,i;if(!this.isImageContent()||!this.element||this.instance.dispatch("contentLoadImage",{content:this,isLazy:t}).defaultPrevented)return;const s=this.element;this.updateSrcsetSizes(),this.data.srcset&&(s.srcset=this.data.srcset),s.src=null!==(e=this.data.src)&&void 0!==e?e:"",s.alt=null!==(i=this.data.alt)&&void 0!==i?i:"",this.state=d.LOADING,s.complete?this.onLoaded():(s.onload=()=>{this.onLoaded()},s.onerror=()=>{this.onError()})}setSlide(t){this.slide=t,this.hasSlide=!0,this.instance=t.pswp}onLoaded(){this.state=d.LOADED,this.slide&&this.element&&(this.instance.dispatch("loadComplete",{slide:this.slide,content:this}),this.slide.isActive&&this.slide.heavyAppended&&!this.element.parentNode&&(this.append(),this.slide.updateContentSize(!0)),(this.state===d.LOADED||this.state===d.ERROR)&&this.removePlaceholder())}onError(){this.state=d.ERROR,this.slide&&(this.displayError(),this.instance.dispatch("loadComplete",{slide:this.slide,isError:!0,content:this}),this.instance.dispatch("loadError",{slide:this.slide,content:this}))}isLoading(){return this.instance.applyFilters("isContentLoading",this.state===d.LOADING,this)}isError(){return this.state===d.ERROR}isImageContent(){return"image"===this.type}setDisplayedSize(t,e){if(this.element&&(this.placeholder&&this.placeholder.setDisplayedSize(t,e),!this.instance.dispatch("contentResize",{content:this,width:t,height:e}).defaultPrevented&&(_(this.element,t,e),this.isImageContent()&&!this.isError()))){const i=!this.displayedImageWidth&&t;this.displayedImageWidth=t,this.displayedImageHeight=e,i?this.loadImage(!1):this.updateSrcsetSizes(),this.slide&&this.instance.dispatch("imageSizeChange",{slide:this.slide,width:t,height:e,content:this})}}isZoomable(){return this.instance.applyFilters("isContentZoomable",this.isImageContent()&&this.state!==d.ERROR,this)}updateSrcsetSizes(){if(!this.isImageContent()||!this.element||!this.data.srcset)return;const t=this.element,e=this.instance.applyFilters("srcsetSizesWidth",this.displayedImageWidth,this);(!t.dataset.largestUsedSize||e>parseInt(t.dataset.largestUsedSize,10))&&(t.sizes=e+"px",t.dataset.largestUsedSize=String(e))}usePlaceholder(){return this.instance.applyFilters("useContentPlaceholder",this.isImageContent(),this)}lazyLoad(){this.instance.dispatch("contentLazyLoad",{content:this}).defaultPrevented||this.load(!0)}keepPlaceholder(){return this.instance.applyFilters("isKeepingPlaceholder",this.isLoading(),this)}destroy(){this.hasSlide=!1,this.slide=void 0,!this.instance.dispatch("contentDestroy",{content:this}).defaultPrevented&&(this.remove(),this.placeholder&&(this.placeholder.destroy(),this.placeholder=void 0),this.isImageContent()&&this.element&&(this.element.onload=null,this.element.onerror=null,this.element=void 0))}displayError(){if(this.slide){var t,e;let i=u("pswp__error-msg","div");i.innerText=null!==(t=null===(e=this.instance.options)||void 0===e?void 0:e.errorMsg)&&void 0!==t?t:"",i=this.instance.applyFilters("contentErrorElement",i,this),this.element=u("pswp__content pswp__error-msg-container","div"),this.element.appendChild(i),this.slide.container.innerText="",this.slide.container.appendChild(this.element),this.slide.updateContentSize(!0),this.removePlaceholder()}}append(){if(this.isAttached||!this.element)return;if(this.isAttached=!0,this.state===d.ERROR)return void this.displayError();if(this.instance.dispatch("contentAppend",{content:this}).defaultPrevented)return;const t="decode"in this.element;this.isImageContent()?t&&this.slide&&(!this.slide.isActive||P())?(this.isDecoding=!0,this.element.decode().catch((()=>{})).finally((()=>{this.isDecoding=!1,this.appendImage()}))):this.appendImage():this.slide&&!this.element.parentNode&&this.slide.container.appendChild(this.element)}activate(){this.instance.dispatch("contentActivate",{content:this}).defaultPrevented||!this.slide||(this.isImageContent()&&this.isDecoding&&!P()?this.appendImage():this.isError()&&this.load(!1,!0),this.slide.holderElement&&this.slide.holderElement.setAttribute("aria-hidden","false"))}deactivate(){this.instance.dispatch("contentDeactivate",{content:this}),this.slide&&this.slide.holderElement&&this.slide.holderElement.setAttribute("aria-hidden","true")}remove(){this.isAttached=!1,!this.instance.dispatch("contentRemove",{content:this}).defaultPrevented&&(this.element&&this.element.parentNode&&this.element.remove(),this.placeholder&&this.placeholder.element&&this.placeholder.element.remove())}appendImage(){this.isAttached&&(this.instance.dispatch("contentAppendImage",{content:this}).defaultPrevented||(this.slide&&this.element&&!this.element.parentNode&&this.slide.container.appendChild(this.element),(this.state===d.LOADED||this.state===d.ERROR)&&this.removePlaceholder()))}}function H(t,e){if(t.getViewportSizeFn){const i=t.getViewportSizeFn(t,e);if(i)return i}return{x:document.documentElement.clientWidth,y:window.innerHeight}}function g(t,e,i,s,n){let a=0;if(e.paddingFn)a=e.paddingFn(i,s,n)[t];else if(e.padding)a=e.padding[t];else{const i="padding"+t[0].toUpperCase()+t.slice(1);e[i]&&(a=e[i])}return Number(a)||0}function Z(t,e,i,s){return{x:e.x-g("left",t,e,i,s)-g("right",t,e,i,s),y:e.y-g("top",t,e,i,s)-g("bottom",t,e,i,s)}}const D=4e3;class q{constructor(t,e,i,s){this.pswp=s,this.options=t,this.itemData=e,this.index=i,this.panAreaSize=null,this.elementSize=null,this.fit=1,this.fill=1,this.vFill=1,this.initial=1,this.secondary=1,this.max=1,this.min=1}update(t,e,i){const s={x:t,y:e};this.elementSize=s,this.panAreaSize=i;const n=i.x/s.x,a=i.y/s.y;this.fit=Math.min(1,na?n:a),this.vFill=Math.min(1,a),this.initial=this._getInitial(),this.secondary=this._getSecondary(),this.max=Math.max(this.initial,this.secondary,this._getMax()),this.min=Math.min(this.fit,this.initial,this.secondary),this.pswp&&this.pswp.dispatch("zoomLevelsUpdate",{zoomLevels:this,slideData:this.itemData})}_parseZoomLevelOption(t){const e=t+"ZoomLevel",i=this.options[e];if(i)return"function"==typeof i?i(this):"fill"===i?this.fill:"fit"===i?this.fit:Number(i)}_getSecondary(){let t=this._parseZoomLevelOption("secondary");return t||(t=Math.min(1,3*this.fit),this.elementSize&&t*this.elementSize.x>D&&(t=D/this.elementSize.x),t)}_getInitial(){return this._parseZoomLevelOption("initial")||this.fit}_getMax(){return this._parseZoomLevelOption("max")||Math.max(1,4*this.fit)}}function z(t,e,i){const s=e.createContentFromData(t,i);let n;const{options:a}=e;if(a){let o;n=new q(a,t,-1),o=e.pswp?e.pswp.viewportSize:H(a,e);const l=Z(a,o,t,i);n.update(s.width,s.height,l)}return s.lazyLoad(),n&&s.setDisplayedSize(Math.ceil(s.width*n.initial),Math.ceil(s.height*n.initial)),s}function B(t,e){const i=e.getItemData(t);if(!e.dispatch("lazyLoadSlide",{index:t,itemData:i}).defaultPrevented)return z(i,e,t)}class K extends V{getNumItems(){var t;let e=0;const i=null===(t=this.options)||void 0===t?void 0:t.dataSource;i&&"length"in i?e=i.length:i&&"gallery"in i&&(i.items||(i.items=this._getGalleryDOMElements(i.gallery)),i.items&&(e=i.items.length));const s=this.dispatch("numItems",{dataSource:i,numItems:e});return this.applyFilters("numItems",s.numItems,i)}createContentFromData(t,e){return new U(t,this,e)}getItemData(t){var e;const i=null===(e=this.options)||void 0===e?void 0:e.dataSource;let s={};Array.isArray(i)?s=i[t]:i&&"gallery"in i&&(i.items||(i.items=this._getGalleryDOMElements(i.gallery)),s=i.items[t]);let n=s;n instanceof Element&&(n=this._domElementToItemData(n));const a=this.dispatch("itemData",{itemData:n||{},index:t});return this.applyFilters("itemData",a.itemData,t)}_getGalleryDOMElements(t){var e,i;return null!==(e=this.options)&&void 0!==e&&e.children||null!==(i=this.options)&&void 0!==i&&i.childSelector?m(this.options.children,this.options.childSelector,t)||[]:[t]}_domElementToItemData(t){const e={element:t},i="A"===t.tagName?t:t.querySelector("a");if(i){e.src=i.dataset.pswpSrc||i.href,i.dataset.pswpSrcset&&(e.srcset=i.dataset.pswpSrcset),e.width=i.dataset.pswpWidth?parseInt(i.dataset.pswpWidth,10):0,e.height=i.dataset.pswpHeight?parseInt(i.dataset.pswpHeight,10):0,e.w=e.width,e.h=e.height,i.dataset.pswpType&&(e.type=i.dataset.pswpType);const n=t.querySelector("img");var s;if(n)e.msrc=n.currentSrc||n.src,e.alt=null!==(s=n.getAttribute("alt"))&&void 0!==s?s:"";(i.dataset.pswpCropped||i.dataset.cropped)&&(e.thumbCropped=!0)}return this.applyFilters("domItemData",e,t,i)}lazyLoadData(t,e){return z(t,this,e)}}class X extends K{constructor(t){super(),this.options=t||{},this._uid=0,this.shouldOpen=!1,this._preloadedContent=void 0,this.onThumbnailsClick=this.onThumbnailsClick.bind(this)}init(){m(this.options.gallery,this.options.gallerySelector).forEach((t=>{t.addEventListener("click",this.onThumbnailsClick,!1)}))}onThumbnailsClick(t){if($(t)||window.pswp)return;let e={x:t.clientX,y:t.clientY};!e.x&&!e.y&&(e=null);let i=this.getClickedIndex(t);i=this.applyFilters("clickedIndex",i,t,this);const s={gallery:t.currentTarget};i>=0&&(t.preventDefault(),this.loadAndOpen(i,s,e))}getClickedIndex(t){if(this.options.getClickedIndexFn)return this.options.getClickedIndexFn.call(this,t);const e=t.target,i=m(this.options.children,this.options.childSelector,t.currentTarget).findIndex((t=>t===e||t.contains(e)));return-1!==i?i:this.options.children||this.options.childSelector?-1:0}loadAndOpen(t,e,i){if(window.pswp||!this.options)return!1;if(!e&&this.options.gallery&&this.options.children){const t=m(this.options.gallery);t[0]&&(e={gallery:t[0]})}return this.options.index=t,this.options.initialPointerPos=i,this.shouldOpen=!0,this.preload(t,e),!0}preload(t,e){const{options:i}=this;e&&(i.dataSource=e);const s=[],n=typeof i.pswpModule;if(j(i.pswpModule))s.push(Promise.resolve(i.pswpModule));else{if("string"===n)throw new Error("pswpModule as string is no longer supported");if("function"!==n)throw new Error("pswpModule is not valid");s.push(i.pswpModule())}"function"==typeof i.openPromise&&s.push(i.openPromise()),!1!==i.preloadFirstSlide&&t>=0&&(this._preloadedContent=B(t,this));const a=++this._uid;Promise.all(s).then((t=>{if(this.shouldOpen){const e=t[0];this._openPhotoswipe(e,a)}}))}_openPhotoswipe(t,e){if(e!==this._uid&&this.shouldOpen||(this.shouldOpen=!1,window.pswp))return;const i="object"==typeof t?new t.default(this.options):new t(this.options);this.pswp=i,window.pswp=i,Object.keys(this._listeners).forEach((t=>{var e;null===(e=this._listeners[t])||void 0===e||e.forEach((e=>{i.on(t,e)}))})),Object.keys(this._filters).forEach((t=>{var e;null===(e=this._filters[t])||void 0===e||e.forEach((e=>{i.addFilter(t,e.fn,e.priority)}))})),this._preloadedContent&&(i.contentLoader.addToCache(this._preloadedContent),this._preloadedContent=void 0),i.on("destroy",(()=>{this.pswp=void 0,delete window.pswp})),i.init()}destroy(){var t;null===(t=this.pswp)||void 0===t||t.destroy(),this.shouldOpen=!1,this._listeners={},m(this.options.gallery,this.options.gallerySelector).forEach((t=>{t.removeEventListener("click",this.onThumbnailsClick,!1)}))}}const Y=A(T)` cursor: pointer; padding: 5px; overflow: hidden; diff --git a/storybook-static/assets/ImageGallery-BkpAuthm.js.LICENSE.txt b/storybook-static/assets/ImageGallery-Z1nzt08r.js.LICENSE.txt similarity index 100% rename from storybook-static/assets/ImageGallery-BkpAuthm.js.LICENSE.txt rename to storybook-static/assets/ImageGallery-Z1nzt08r.js.LICENSE.txt diff --git a/storybook-static/assets/ImageGallery.stories-CCH29nNc.js b/storybook-static/assets/ImageGallery.stories-BOf0BcC1.js similarity index 95% rename from storybook-static/assets/ImageGallery.stories-CCH29nNc.js rename to storybook-static/assets/ImageGallery.stories-BOf0BcC1.js index 65be34785f..3cd6e63ae9 100644 --- a/storybook-static/assets/ImageGallery.stories-CCH29nNc.js +++ b/storybook-static/assets/ImageGallery.stories-BOf0BcC1.js @@ -1 +1 @@ -import{j as s}from"./jsx-runtime-CexXSJP5.js";import{I as r}from"./ImageGallery-BkpAuthm.js";import"./index-BP8_t0zE.js";import"./iframe-B1GJESFe.js";import"../sb-preview/runtime.js";import"./emotion-styled.browser.esm-Dz2BNYeh.js";import"./extends-CF3RwP-h.js";import"./parseProps-780b287c.browser.esm-DiCerVr_.js";import"./emotion-use-insertion-effect-with-fallbacks.browser.esm-UWD3gXM2.js";import"./Icon-BoVZOGVD.js";import"./supporter-D7hp958O.js";import"./icon-arrow-down-CJeToCJe.js";import"./icon-star-active-ClN6U5FF.js";import"./theme-ui-core-jsx-runtime.browser.esm-CH0qhC10.js";import"./hoist-non-react-statics.cjs-CQI8syxn.js";import"./theme-ui-components.esm-DCiJ1mMX.js";const O=[{full:"https://picsum.photos/id/29/1500/1000",thumb:"https://picsum.photos/id/29/150/150"},{full:"https://picsum.photos/id/50/4000/3000",thumb:"https://picsum.photos/id/50/150/150"},{full:"https://picsum.photos/id/110/800/1200",thumb:"https://picsum.photos/id/110/150/150"},{full:"https://picsum.photos/id/2/1500/1500",thumb:"https://picsum.photos/id/2/150/150"}],t=O.map(((e,s)=>({downloadUrl:e.full,contentType:"image/jpeg",fullPath:"cat.jpg",name:"cat"+s,type:"image/jpeg",size:115e3,thumbnailUrl:e.thumb,timeCreated:(new Date).toISOString(),updated:(new Date).toISOString()}))),K={title:"Layout/ImageGallery",component:r},a=e=>s.jsx(r,{images:t,...e}),o=e=>s.jsx(r,{images:t,...e,hideThumbnails:!0}),m=e=>s.jsx(r,{images:[t[0]],...e}),p=e=>s.jsx(r,{images:t,...e,hideThumbnails:!0,showNextPrevButton:!0}),i=e=>s.jsx(r,{images:[t[0]],...e,hideThumbnails:!0,showNextPrevButton:!0});var n,u,l,g,c,h,d,I,S,b,y,x,P,w,f,j,G,N;t.parameters={...t.parameters,docs:{...null==(n=t.parameters)?void 0:n.docs,source:{originalSource:"imageUrls.map((elt, i) => {\n return {\n downloadUrl: elt.full,\n contentType: 'image/jpeg',\n fullPath: 'cat.jpg',\n name: 'cat' + i,\n type: 'image/jpeg',\n size: 115000,\n thumbnailUrl: elt.thumb,\n timeCreated: new Date().toISOString(),\n updated: new Date().toISOString()\n };\n})",...null==(l=null==(u=t.parameters)?void 0:u.docs)?void 0:l.source}}},a.parameters={...a.parameters,docs:{...null==(g=a.parameters)?void 0:g.docs,source:{originalSource:"(props: Omit) => {\n return ;\n}",...null==(h=null==(c=a.parameters)?void 0:c.docs)?void 0:h.source}}},o.parameters={...o.parameters,docs:{...null==(d=o.parameters)?void 0:d.docs,source:{originalSource:"(props: Omit) => {\n return ;\n}",...null==(S=null==(I=o.parameters)?void 0:I.docs)?void 0:S.source}}},m.parameters={...m.parameters,docs:{...null==(b=m.parameters)?void 0:b.docs,source:{originalSource:"(props: Omit) => {\n return ;\n}",...null==(x=null==(y=m.parameters)?void 0:y.docs)?void 0:x.source}}},p.parameters={...p.parameters,docs:{...null==(P=p.parameters)?void 0:P.docs,source:{originalSource:"(props: Omit) => {\n return ;\n}",...null==(f=null==(w=p.parameters)?void 0:w.docs)?void 0:f.source}}},i.parameters={...i.parameters,docs:{...null==(j=i.parameters)?void 0:j.docs,source:{originalSource:"(props: Omit) => {\n return ;\n}",...null==(N=null==(G=i.parameters)?void 0:G.docs)?void 0:N.source}}};const M=["testImages","Default","NoThumbnails","HideThumbnailForSingleImage","ShowNextPrevButtons","DoNotShowNextPrevButtons"];export{a as Default,i as DoNotShowNextPrevButtons,m as HideThumbnailForSingleImage,o as NoThumbnails,p as ShowNextPrevButtons,M as __namedExportsOrder,K as default,t as testImages}; \ No newline at end of file +import{j as s}from"./jsx-runtime-CexXSJP5.js";import{I as r}from"./ImageGallery-Z1nzt08r.js";import"./index-BP8_t0zE.js";import"./iframe-BgaKNRp_.js";import"../sb-preview/runtime.js";import"./emotion-styled.browser.esm-Dz2BNYeh.js";import"./extends-CF3RwP-h.js";import"./parseProps-780b287c.browser.esm-DiCerVr_.js";import"./emotion-use-insertion-effect-with-fallbacks.browser.esm-UWD3gXM2.js";import"./Icon-BoVZOGVD.js";import"./supporter-D7hp958O.js";import"./icon-arrow-down-CJeToCJe.js";import"./icon-star-active-ClN6U5FF.js";import"./theme-ui-core-jsx-runtime.browser.esm-CH0qhC10.js";import"./hoist-non-react-statics.cjs-CQI8syxn.js";import"./theme-ui-components.esm-BngKL4Rx.js";const O=[{full:"https://picsum.photos/id/29/1500/1000",thumb:"https://picsum.photos/id/29/150/150"},{full:"https://picsum.photos/id/50/4000/3000",thumb:"https://picsum.photos/id/50/150/150"},{full:"https://picsum.photos/id/110/800/1200",thumb:"https://picsum.photos/id/110/150/150"},{full:"https://picsum.photos/id/2/1500/1500",thumb:"https://picsum.photos/id/2/150/150"}],t=O.map(((e,s)=>({downloadUrl:e.full,contentType:"image/jpeg",fullPath:"cat.jpg",name:"cat"+s,type:"image/jpeg",size:115e3,thumbnailUrl:e.thumb,timeCreated:(new Date).toISOString(),updated:(new Date).toISOString()}))),K={title:"Layout/ImageGallery",component:r},a=e=>s.jsx(r,{images:t,...e}),o=e=>s.jsx(r,{images:t,...e,hideThumbnails:!0}),m=e=>s.jsx(r,{images:[t[0]],...e}),p=e=>s.jsx(r,{images:t,...e,hideThumbnails:!0,showNextPrevButton:!0}),i=e=>s.jsx(r,{images:[t[0]],...e,hideThumbnails:!0,showNextPrevButton:!0});var n,u,l,g,c,h,d,I,S,b,y,x,P,w,f,j,G,N;t.parameters={...t.parameters,docs:{...null==(n=t.parameters)?void 0:n.docs,source:{originalSource:"imageUrls.map((elt, i) => {\n return {\n downloadUrl: elt.full,\n contentType: 'image/jpeg',\n fullPath: 'cat.jpg',\n name: 'cat' + i,\n type: 'image/jpeg',\n size: 115000,\n thumbnailUrl: elt.thumb,\n timeCreated: new Date().toISOString(),\n updated: new Date().toISOString()\n };\n})",...null==(l=null==(u=t.parameters)?void 0:u.docs)?void 0:l.source}}},a.parameters={...a.parameters,docs:{...null==(g=a.parameters)?void 0:g.docs,source:{originalSource:"(props: Omit) => {\n return ;\n}",...null==(h=null==(c=a.parameters)?void 0:c.docs)?void 0:h.source}}},o.parameters={...o.parameters,docs:{...null==(d=o.parameters)?void 0:d.docs,source:{originalSource:"(props: Omit) => {\n return ;\n}",...null==(S=null==(I=o.parameters)?void 0:I.docs)?void 0:S.source}}},m.parameters={...m.parameters,docs:{...null==(b=m.parameters)?void 0:b.docs,source:{originalSource:"(props: Omit) => {\n return ;\n}",...null==(x=null==(y=m.parameters)?void 0:y.docs)?void 0:x.source}}},p.parameters={...p.parameters,docs:{...null==(P=p.parameters)?void 0:P.docs,source:{originalSource:"(props: Omit) => {\n return ;\n}",...null==(f=null==(w=p.parameters)?void 0:w.docs)?void 0:f.source}}},i.parameters={...i.parameters,docs:{...null==(j=i.parameters)?void 0:j.docs,source:{originalSource:"(props: Omit) => {\n return ;\n}",...null==(N=null==(G=i.parameters)?void 0:G.docs)?void 0:N.source}}};const M=["testImages","Default","NoThumbnails","HideThumbnailForSingleImage","ShowNextPrevButtons","DoNotShowNextPrevButtons"];export{a as Default,i as DoNotShowNextPrevButtons,m as HideThumbnailForSingleImage,o as NoThumbnails,p as ShowNextPrevButtons,M as __namedExportsOrder,K as default,t as testImages}; \ No newline at end of file diff --git a/storybook-static/assets/Input.stories-ChjzHMa3.js b/storybook-static/assets/Input.stories-BBSxBs5P.js similarity index 95% rename from storybook-static/assets/Input.stories-ChjzHMa3.js rename to storybook-static/assets/Input.stories-BBSxBs5P.js index 6a91cd541a..0659696f77 100644 --- a/storybook-static/assets/Input.stories-ChjzHMa3.js +++ b/storybook-static/assets/Input.stories-BBSxBs5P.js @@ -1 +1 @@ -import{j as t}from"./jsx-runtime-CexXSJP5.js";import{d as o}from"./theme-ui-components.esm-DCiJ1mMX.js";import"./index-BP8_t0zE.js";import"./parseProps-780b287c.browser.esm-DiCerVr_.js";import"./emotion-use-insertion-effect-with-fallbacks.browser.esm-UWD3gXM2.js";import"./theme-ui-core-jsx-runtime.browser.esm-CH0qhC10.js";import"./hoist-non-react-statics.cjs-CQI8syxn.js";const E={title:"Forms/Input",component:o},r=()=>t.jsx(o,{placeholder:"Placeholder"}),e=()=>t.jsx(o,{variant:"error",value:"Invalid input"}),a=()=>t.jsx(o,{variant:"inputOutline",placeholder:"Placeholder"});var s,p,c,n,l,i,u,d,m;r.parameters={...r.parameters,docs:{...null==(s=r.parameters)?void 0:s.docs,source:{originalSource:'() => ',...null==(c=null==(p=r.parameters)?void 0:p.docs)?void 0:c.source}}},e.parameters={...e.parameters,docs:{...null==(n=e.parameters)?void 0:n.docs,source:{originalSource:'() => ',...null==(i=null==(l=e.parameters)?void 0:l.docs)?void 0:i.source}}},a.parameters={...a.parameters,docs:{...null==(u=a.parameters)?void 0:u.docs,source:{originalSource:'() => ',...null==(m=null==(d=a.parameters)?void 0:d.docs)?void 0:m.source}}};const P=["Default","Error","Outlined"];export{r as Default,e as Error,a as Outlined,P as __namedExportsOrder,E as default}; \ No newline at end of file +import{j as t}from"./jsx-runtime-CexXSJP5.js";import{d as o}from"./theme-ui-components.esm-BngKL4Rx.js";import"./index-BP8_t0zE.js";import"./parseProps-780b287c.browser.esm-DiCerVr_.js";import"./emotion-use-insertion-effect-with-fallbacks.browser.esm-UWD3gXM2.js";import"./theme-ui-core-jsx-runtime.browser.esm-CH0qhC10.js";import"./hoist-non-react-statics.cjs-CQI8syxn.js";const E={title:"Forms/Input",component:o},r=()=>t.jsx(o,{placeholder:"Placeholder"}),e=()=>t.jsx(o,{variant:"error",value:"Invalid input"}),a=()=>t.jsx(o,{variant:"inputOutline",placeholder:"Placeholder"});var s,p,c,n,l,i,u,d,m;r.parameters={...r.parameters,docs:{...null==(s=r.parameters)?void 0:s.docs,source:{originalSource:'() => ',...null==(c=null==(p=r.parameters)?void 0:p.docs)?void 0:c.source}}},e.parameters={...e.parameters,docs:{...null==(n=e.parameters)?void 0:n.docs,source:{originalSource:'() => ',...null==(i=null==(l=e.parameters)?void 0:l.docs)?void 0:i.source}}},a.parameters={...a.parameters,docs:{...null==(u=a.parameters)?void 0:u.docs,source:{originalSource:'() => ',...null==(m=null==(d=a.parameters)?void 0:d.docs)?void 0:m.source}}};const P=["Default","Error","Outlined"];export{r as Default,e as Error,a as Outlined,P as __namedExportsOrder,E as default}; \ No newline at end of file diff --git a/storybook-static/assets/InternalLink-CtyTe3gy.js b/storybook-static/assets/InternalLink-BRM7MvOa.js similarity index 84% rename from storybook-static/assets/InternalLink-CtyTe3gy.js rename to storybook-static/assets/InternalLink-BRM7MvOa.js index fbf8d3aea0..c3c1acc984 100644 --- a/storybook-static/assets/InternalLink-CtyTe3gy.js +++ b/storybook-static/assets/InternalLink-BRM7MvOa.js @@ -1 +1 @@ -import{j as e}from"./jsx-runtime-CexXSJP5.js";import{r as t}from"./index-BP8_t0zE.js";import{L as i}from"./theme-ui-components.esm-DCiJ1mMX.js";import{L as o}from"./components-CutHIkdx.js";const n=t.forwardRef(((n,r)=>e.jsx(i,{as:o,ref:r,...n,children:n.children})));n.displayName="InternalLink";try{n.displayName="InternalLink",n.__docgenInfo={description:"",displayName:"InternalLink",props:{}}}catch{}export{n as I}; \ No newline at end of file +import{j as e}from"./jsx-runtime-CexXSJP5.js";import{r as t}from"./index-BP8_t0zE.js";import{L as i}from"./theme-ui-components.esm-BngKL4Rx.js";import{L as o}from"./components-CutHIkdx.js";const n=t.forwardRef(((n,r)=>e.jsx(i,{as:o,ref:r,...n,children:n.children})));n.displayName="InternalLink";try{n.displayName="InternalLink",n.__docgenInfo={description:"",displayName:"InternalLink",props:{}}}catch{}export{n as I}; \ No newline at end of file diff --git a/storybook-static/assets/InternalLink.stories-Cjtj3wfE.js b/storybook-static/assets/InternalLink.stories-CRMQOOnL.js similarity index 85% rename from storybook-static/assets/InternalLink.stories-Cjtj3wfE.js rename to storybook-static/assets/InternalLink.stories-CRMQOOnL.js index 76d3a33f86..80fdc28685 100644 --- a/storybook-static/assets/InternalLink.stories-Cjtj3wfE.js +++ b/storybook-static/assets/InternalLink.stories-CRMQOOnL.js @@ -1 +1 @@ -import{j as i}from"./jsx-runtime-CexXSJP5.js";import{I as n}from"./InternalLink-CtyTe3gy.js";import"./index-BP8_t0zE.js";import"./theme-ui-components.esm-DCiJ1mMX.js";import"./parseProps-780b287c.browser.esm-DiCerVr_.js";import"./emotion-use-insertion-effect-with-fallbacks.browser.esm-UWD3gXM2.js";import"./theme-ui-core-jsx-runtime.browser.esm-CH0qhC10.js";import"./hoist-non-react-statics.cjs-CQI8syxn.js";import"./components-CutHIkdx.js";import"./index-BBRV8eG_.js";import"./index-BXxqJQdV.js";const f={title:"Components/InternalLink",component:n},r=()=>i.jsx(n,{to:"/abc/",children:"Link"});var t,o,e;r.parameters={...r.parameters,docs:{...null==(t=r.parameters)?void 0:t.docs,source:{originalSource:"() => Link",...null==(e=null==(o=r.parameters)?void 0:o.docs)?void 0:e.source}}};const x=["Default"];export{r as Default,x as __namedExportsOrder,f as default}; \ No newline at end of file +import{j as i}from"./jsx-runtime-CexXSJP5.js";import{I as n}from"./InternalLink-BRM7MvOa.js";import"./index-BP8_t0zE.js";import"./theme-ui-components.esm-BngKL4Rx.js";import"./parseProps-780b287c.browser.esm-DiCerVr_.js";import"./emotion-use-insertion-effect-with-fallbacks.browser.esm-UWD3gXM2.js";import"./theme-ui-core-jsx-runtime.browser.esm-CH0qhC10.js";import"./hoist-non-react-statics.cjs-CQI8syxn.js";import"./components-CutHIkdx.js";import"./index-BBRV8eG_.js";import"./index-BXxqJQdV.js";const f={title:"Components/InternalLink",component:n},r=()=>i.jsx(n,{to:"/abc/",children:"Link"});var t,o,e;r.parameters={...r.parameters,docs:{...null==(t=r.parameters)?void 0:t.docs,source:{originalSource:"() => Link",...null==(e=null==(o=r.parameters)?void 0:o.docs)?void 0:e.source}}};const x=["Default"];export{r as Default,x as __namedExportsOrder,f as default}; \ No newline at end of file diff --git a/storybook-static/assets/Kaltura-DxV-Gxrn.js b/storybook-static/assets/Kaltura-Bss1HbUT.js similarity index 97% rename from storybook-static/assets/Kaltura-DxV-Gxrn.js rename to storybook-static/assets/Kaltura-Bss1HbUT.js index b8e72a4fd9..f5cfd11212 100644 --- a/storybook-static/assets/Kaltura-DxV-Gxrn.js +++ b/storybook-static/assets/Kaltura-Bss1HbUT.js @@ -1 +1 @@ -import{g as y,r as f}from"./index-BP8_t0zE.js";import{u as _,p as m}from"./VideoPlayer-ggRAiP4x.js";function P(e,t){for(var r=0;rs[t]})}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}var g=Object.create,n=Object.defineProperty,b=Object.getOwnPropertyDescriptor,v=Object.getOwnPropertyNames,O=Object.getPrototypeOf,w=Object.prototype.hasOwnProperty,j=(e,t,r)=>t in e?n(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,L=(e,t)=>{for(var r in t)n(e,r,{get:t[r],enumerable:!0})},c=(e,t,r,s)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let o of v(t))!w.call(e,o)&&o!==r&&n(e,o,{get:()=>t[o],enumerable:!(s=b(t,o))||s.enumerable});return e},K=(e,t,r)=>(r=null!=e?g(O(e)):{},c(e&&e.__esModule?r:n(r,"default",{value:e,enumerable:!0}),e)),D=e=>c(n({},"__esModule",{value:!0}),e),s=(e,t,r)=>(j(e,"symbol"!=typeof t?t+"":t,r),r),d={};L(d,{default:()=>i});var h=D(d),u=K(f),p=_,M=m;const S="https://cdn.embed.ly/player-0.1.0.min.js",T="playerjs";class i extends u.Component{constructor(){super(...arguments),s(this,"callPlayer",p.callPlayer),s(this,"duration",null),s(this,"currentTime",null),s(this,"secondsLoaded",null),s(this,"mute",(()=>{this.callPlayer("mute")})),s(this,"unmute",(()=>{this.callPlayer("unmute")})),s(this,"ref",(e=>{this.iframe=e}))}componentDidMount(){this.props.onMount&&this.props.onMount(this)}load(e){(0,p.getSDK)(S,T).then((e=>{this.iframe&&(this.player=new e.Player(this.iframe),this.player.on("ready",(()=>{setTimeout((()=>{this.player.isReady=!0,this.player.setLoop(this.props.loop),this.props.muted&&this.player.mute(),this.addListeners(this.player,this.props),this.props.onReady()}),500)})))}),this.props.onError)}addListeners(e,t){e.on("play",t.onPlay),e.on("pause",t.onPause),e.on("ended",t.onEnded),e.on("error",t.onError),e.on("timeupdate",(({duration:e,seconds:t})=>{this.duration=e,this.currentTime=t}))}play(){this.callPlayer("play")}pause(){this.callPlayer("pause")}stop(){}seekTo(e,t=!0){this.callPlayer("setCurrentTime",e),t||this.pause()}setVolume(e){this.callPlayer("setVolume",e)}setLoop(e){this.callPlayer("setLoop",e)}getDuration(){return this.duration}getCurrentTime(){return this.currentTime}getSecondsLoaded(){return this.secondsLoaded}render(){return u.default.createElement("iframe",{ref:this.ref,src:this.props.url,frameBorder:"0",scrolling:"no",style:{width:"100%",height:"100%"},allow:"encrypted-media; autoplay; fullscreen;",referrerPolicy:"no-referrer-when-downgrade"})}}s(i,"displayName","Kaltura"),s(i,"canPlay",M.canPlay.kaltura);const E=y(h),C=P({__proto__:null,default:E},[h]);export{C as K}; \ No newline at end of file +import{g as y,r as f}from"./index-BP8_t0zE.js";import{u as _,p as m}from"./VideoPlayer-DllXxlDZ.js";function P(e,t){for(var r=0;rs[t]})}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}var g=Object.create,n=Object.defineProperty,b=Object.getOwnPropertyDescriptor,v=Object.getOwnPropertyNames,O=Object.getPrototypeOf,w=Object.prototype.hasOwnProperty,j=(e,t,r)=>t in e?n(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,L=(e,t)=>{for(var r in t)n(e,r,{get:t[r],enumerable:!0})},c=(e,t,r,s)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let o of v(t))!w.call(e,o)&&o!==r&&n(e,o,{get:()=>t[o],enumerable:!(s=b(t,o))||s.enumerable});return e},K=(e,t,r)=>(r=null!=e?g(O(e)):{},c(e&&e.__esModule?r:n(r,"default",{value:e,enumerable:!0}),e)),D=e=>c(n({},"__esModule",{value:!0}),e),s=(e,t,r)=>(j(e,"symbol"!=typeof t?t+"":t,r),r),d={};L(d,{default:()=>i});var h=D(d),u=K(f),p=_,M=m;const S="https://cdn.embed.ly/player-0.1.0.min.js",T="playerjs";class i extends u.Component{constructor(){super(...arguments),s(this,"callPlayer",p.callPlayer),s(this,"duration",null),s(this,"currentTime",null),s(this,"secondsLoaded",null),s(this,"mute",(()=>{this.callPlayer("mute")})),s(this,"unmute",(()=>{this.callPlayer("unmute")})),s(this,"ref",(e=>{this.iframe=e}))}componentDidMount(){this.props.onMount&&this.props.onMount(this)}load(e){(0,p.getSDK)(S,T).then((e=>{this.iframe&&(this.player=new e.Player(this.iframe),this.player.on("ready",(()=>{setTimeout((()=>{this.player.isReady=!0,this.player.setLoop(this.props.loop),this.props.muted&&this.player.mute(),this.addListeners(this.player,this.props),this.props.onReady()}),500)})))}),this.props.onError)}addListeners(e,t){e.on("play",t.onPlay),e.on("pause",t.onPause),e.on("ended",t.onEnded),e.on("error",t.onError),e.on("timeupdate",(({duration:e,seconds:t})=>{this.duration=e,this.currentTime=t}))}play(){this.callPlayer("play")}pause(){this.callPlayer("pause")}stop(){}seekTo(e,t=!0){this.callPlayer("setCurrentTime",e),t||this.pause()}setVolume(e){this.callPlayer("setVolume",e)}setLoop(e){this.callPlayer("setLoop",e)}getDuration(){return this.duration}getCurrentTime(){return this.currentTime}getSecondsLoaded(){return this.secondsLoaded}render(){return u.default.createElement("iframe",{ref:this.ref,src:this.props.url,frameBorder:"0",scrolling:"no",style:{width:"100%",height:"100%"},allow:"encrypted-media; autoplay; fullscreen;",referrerPolicy:"no-referrer-when-downgrade"})}}s(i,"displayName","Kaltura"),s(i,"canPlay",M.canPlay.kaltura);const E=y(h),C=P({__proto__:null,default:E},[h]);export{C as K}; \ No newline at end of file diff --git a/storybook-static/assets/LinkifyText-CTcW0PSE.js b/storybook-static/assets/LinkifyText-MsKPRXsf.js similarity index 97% rename from storybook-static/assets/LinkifyText-CTcW0PSE.js rename to storybook-static/assets/LinkifyText-MsKPRXsf.js index 0672a08886..ec9297b4e2 100644 --- a/storybook-static/assets/LinkifyText-CTcW0PSE.js +++ b/storybook-static/assets/LinkifyText-MsKPRXsf.js @@ -1,4 +1,4 @@ -import{j as vt}from"./jsx-runtime-CexXSJP5.js";import{n as ee}from"./emotion-styled.browser.esm-Dz2BNYeh.js";import{r as O}from"./index-BP8_t0zE.js";import{E as Re}from"./ExternalLink-CHmx7fZ7.js";import{I as Se}from"./InternalLink-CtyTe3gy.js";import{u as Ce}from"./theme-ui-core.browser.esm-CIov4Ln1.js";const Oe="aaa1rp3bb0ott3vie4c1le2ogado5udhabi7c0ademy5centure6ountant0s9o1tor4d0s1ult4e0g1ro2tna4f0l1rica5g0akhan5ency5i0g1rbus3force5tel5kdn3l0ibaba4pay4lfinanz6state5y2sace3tom5m0azon4ericanexpress7family11x2fam3ica3sterdam8nalytics7droid5quan4z2o0l2partments8p0le4q0uarelle8r0ab1mco4chi3my2pa2t0e3s0da2ia2sociates9t0hleta5torney7u0ction5di0ble3o3spost5thor3o0s4vianca6w0s2x0a2z0ure5ba0by2idu3namex3narepublic11d1k2r0celona5laycard4s5efoot5gains6seball5ketball8uhaus5yern5b0c1t1va3cg1n2d1e0ats2uty4er2ntley5rlin4st0buy5t2f1g1h0arti5i0ble3d1ke2ng0o3o1z2j1lack0friday9ockbuster8g1omberg7ue3m0s1w2n0pparibas9o0ats3ehringer8fa2m1nd2o0k0ing5sch2tik2on4t1utique6x2r0adesco6idgestone9oadway5ker3ther5ussels7s1t1uild0ers6siness6y1zz3v1w1y1z0h3ca0b1fe2l0l1vinklein9m0era3p2non3petown5ital0one8r0avan4ds2e0er0s4s2sa1e1h1ino4t0ering5holic7ba1n1re3c1d1enter4o1rn3f0a1d2g1h0anel2nel4rity4se2t2eap3intai5ristmas6ome4urch5i0priani6rcle4sco3tadel4i0c2y3k1l0aims4eaning6ick2nic1que6othing5ud3ub0med6m1n1o0ach3des3ffee4llege4ogne5m0cast4mbank4unity6pany2re3uter5sec4ndos3struction8ulting7tact3ractors9oking4l1p2rsica5untry4pon0s4rses6pa2r0edit0card4union9icket5own3s1uise0s6u0isinella9v1w1x1y0mru3ou3z2dabur3d1nce3ta1e1ing3sun4y2clk3ds2e0al0er2s3gree4livery5l1oitte5ta3mocrat6ntal2ist5si0gn4v2hl2iamonds6et2gital5rect0ory7scount3ver5h2y2j1k1m1np2o0cs1tor4g1mains5t1wnload7rive4tv2ubai3nlop4pont4rban5vag2r2z2earth3t2c0o2deka3u0cation8e1g1mail3erck5nergy4gineer0ing9terprises10pson4quipment8r0icsson6ni3s0q1tate5t1u0rovision8s2vents5xchange6pert3osed4ress5traspace10fage2il1rwinds6th3mily4n0s2rm0ers5shion4t3edex3edback6rrari3ero6i0delity5o2lm2nal1nce1ial7re0stone6mdale6sh0ing5t0ness6j1k1lickr3ghts4r2orist4wers5y2m1o0o0d1tball6rd1ex2sale4um3undation8x2r0ee1senius7l1ogans4ntier7tr2ujitsu5n0d2rniture7tbol5yi3ga0l0lery3o1up4me0s3p1rden4y2b0iz3d0n2e0a1nt0ing5orge5f1g0ee3h1i0ft0s3ves2ing5l0ass3e1obal2o4m0ail3bh2o1x2n1odaddy5ld0point6f2o0dyear5g0le4p1t1v2p1q1r0ainger5phics5tis4een3ipe3ocery4up4s1t1u0ardian6cci3ge2ide2tars5ru3w1y2hair2mburg5ngout5us3bo2dfc0bank7ealth0care8lp1sinki6re1mes5iphop4samitsu7tachi5v2k0t2m1n1ockey4ldings5iday5medepot5goods5s0ense7nda3rse3spital5t0ing5t0els3mail5use3w2r1sbc3t1u0ghes5yatt3undai7ibm2cbc2e1u2d1e0ee3fm2kano4l1m0amat4db2mo0bilien9n0c1dustries8finiti5o2g1k1stitute6urance4e4t0ernational10uit4vestments10o1piranga7q1r0ish4s0maili5t0anbul7t0au2v3jaguar4va3cb2e0ep2tzt3welry6io2ll2m0p2nj2o0bs1urg4t1y2p0morgan6rs3uegos4niper7kaufen5ddi3e0rryhotels6logistics9properties14fh2g1h1i0a1ds2m1ndle4tchen5wi3m1n1oeln3matsu5sher5p0mg2n2r0d1ed3uokgroup8w1y0oto4z2la0caixa5mborghini8er3ncaster6d0rover6xess5salle5t0ino3robe5w0yer5b1c1ds2ease3clerc5frak4gal2o2xus4gbt3i0dl2fe0insurance9style7ghting6ke2lly3mited4o2ncoln4k2psy3ve1ing5k1lc1p2oan0s3cker3us3l1ndon4tte1o3ve3pl0financial11r1s1t0d0a3u0ndbeck6xe1ury5v1y2ma0drid4if1son4keup4n0agement7go3p1rket0ing3s4riott5shalls7ttel5ba2c0kinsey7d1e0d0ia3et2lbourne7me1orial6n0u2rckmsd7g1h1iami3crosoft7l1ni1t2t0subishi9k1l0b1s2m0a2n1o0bi0le4da2e1i1m1nash3ey2ster5rmon3tgage6scow4to0rcycles9v0ie4p1q1r1s0d2t0n1r2u0seum3ic4v1w1x1y1z2na0b1goya4me2tura4vy3ba2c1e0c1t0bank4flix4work5ustar5w0s2xt0direct7us4f0l2g0o2hk2i0co2ke1on3nja3ssan1y5l1o0kia3rton4w0ruz3tv4p1r0a1w2tt2u1yc2z2obi1server7ffice5kinawa6layan0group9dnavy5lo3m0ega4ne1g1l0ine5oo2pen3racle3nge4g0anic5igins6saka4tsuka4t2vh3pa0ge2nasonic7ris2s1tners4s1y3y2ccw3e0t2f0izer5g1h0armacy6d1ilips5one2to0graphy6s4ysio5ics1tet2ures6d1n0g1k2oneer5zza4k1l0ace2y0station9umbing5s3m1n0c2ohl2ker3litie5rn2st3r0america6xi3ess3ime3o0d0uctions8f1gressive8mo2perties3y5tection8u0dential9s1t1ub2w0c2y2qa1pon3uebec3st5racing4dio4e0ad1lestate6tor2y4cipes5d0stone5umbrella9hab3ise0n3t2liance6n0t0als5pair3ort3ublican8st0aurant8view0s5xroth6ich0ardli6oh3l1o1p2o0cks3deo3gers4om3s0vp3u0gby3hr2n2w0e2yukyu6sa0arland6fe0ty4kura4le1on3msclub4ung5ndvik0coromant12ofi4p1rl2s1ve2xo3b0i1s2c0a1b1haeffler7midt4olarships8ol3ule3warz5ience5ot3d1e0arch3t2cure1ity6ek2lect4ner3rvices6ven3w1x0y3fr2g1h0angrila6rp2w2ell3ia1ksha5oes2p0ping5uji3w3i0lk2na1gles5te3j1k0i0n2y0pe4l0ing4m0art3ile4n0cf3o0ccer3ial4ftbank4ware6hu2lar2utions7ng1y2y2pa0ce3ort2t3r0l2s1t0ada2ples4r1tebank4farm7c0group6ockholm6rage3e3ream4udio2y3yle4u0cks3pplies3y2ort5rf1gery5zuki5v1watch4iss4x1y0dney4stems6z2tab1ipei4lk2obao4rget4tamotors6r2too4x0i3c0i2d0k2eam2ch0nology8l1masek5nnis4va3f1g1h0d1eater2re6iaa2ckets5enda4ps2res2ol4j0maxx4x2k0maxx5l1m0all4n1o0day3kyo3ols3p1ray3shiba5tal3urs3wn2yota3s3r0ade1ing4ining5vel0ers0insurance16ust3v2t1ube2i1nes3shu4v0s2w1z2ua1bank3s2g1k1nicom3versity8o2ol2ps2s1y1z2va0cations7na1guard7c1e0gas3ntures6risign5m\xf6gensberater2ung14sicherung10t2g1i0ajes4deo3g1king4llas4n1p1rgin4sa1ion4va1o3laanderen9n1odka3lvo3te1ing3o2yage5u2wales2mart4ter4ng0gou5tch0es6eather0channel12bcam3er2site5d0ding5ibo2r3f1hoswho6ien2ki2lliamhill9n0dows4e1ners6me2olterskluwer11odside6rk0s2ld3w2s1tc1f3xbox3erox4finity6ihuan4n2xx2yz3yachts4hoo3maxun5ndex5e1odobashi7ga2kohama6u0tube6t1un3za0ppos4ra3ero3ip2m1one3uerich6w2",be="\u03b5\u03bb1\u03c52\u0431\u04331\u0435\u043b3\u0434\u0435\u0442\u04384\u0435\u044e2\u043a\u0430\u0442\u043e\u043b\u0438\u043a6\u043e\u043c3\u043c\u043a\u04342\u043e\u043d1\u0441\u043a\u0432\u04306\u043e\u043d\u043b\u0430\u0439\u043d5\u0440\u04333\u0440\u0443\u04412\u04442\u0441\u0430\u0439\u04423\u0440\u04313\u0443\u043a\u04403\u049b\u0430\u04373\u0570\u0561\u05753\u05d9\u05e9\u05e8\u05d0\u05dc5\u05e7\u05d5\u05dd3\u0627\u0628\u0648\u0638\u0628\u064a5\u0631\u0627\u0645\u0643\u06485\u0644\u0627\u0631\u062f\u06464\u0628\u062d\u0631\u064a\u06465\u062c\u0632\u0627\u0626\u06315\u0633\u0639\u0648\u062f\u064a\u06296\u0639\u0644\u064a\u0627\u06465\u0645\u063a\u0631\u06285\u0645\u0627\u0631\u0627\u062a5\u06cc\u0631\u0627\u06465\u0628\u0627\u0631\u062a2\u0632\u0627\u06314\u064a\u062a\u06433\u06be\u0627\u0631\u062a5\u062a\u0648\u0646\u06334\u0633\u0648\u062f\u0627\u06463\u0631\u064a\u06295\u0634\u0628\u0643\u06294\u0639\u0631\u0627\u06422\u06282\u0645\u0627\u06464\u0641\u0644\u0633\u0637\u064a\u06466\u0642\u0637\u06313\u0643\u0627\u062b\u0648\u0644\u064a\u06436\u0648\u06453\u0645\u0635\u06312\u0644\u064a\u0633\u064a\u06275\u0648\u0631\u064a\u062a\u0627\u0646\u064a\u06277\u0642\u06394\u0647\u0645\u0631\u0627\u06475\u067e\u0627\u06a9\u0633\u062a\u0627\u06467\u0680\u0627\u0631\u062a4\u0915\u0949\u092e3\u0928\u0947\u091f3\u092d\u093e\u0930\u09240\u092e\u094d3\u094b\u09245\u0938\u0902\u0917\u0920\u09285\u09ac\u09be\u0982\u09b2\u09be5\u09ad\u09be\u09b0\u09a42\u09f0\u09a44\u0a2d\u0a3e\u0a30\u0a244\u0aad\u0abe\u0ab0\u0aa44\u0b2d\u0b3e\u0b30\u0b244\u0b87\u0ba8\u0bcd\u0ba4\u0bbf\u0baf\u0bbe6\u0bb2\u0b99\u0bcd\u0b95\u0bc86\u0b9a\u0bbf\u0b99\u0bcd\u0b95\u0baa\u0bcd\u0baa\u0bc2\u0bb0\u0bcd11\u0c2d\u0c3e\u0c30\u0c24\u0c4d5\u0cad\u0cbe\u0cb0\u0ca44\u0d2d\u0d3e\u0d30\u0d24\u0d025\u0dbd\u0d82\u0d9a\u0dcf4\u0e04\u0e2d\u0e213\u0e44\u0e17\u0e223\u0ea5\u0eb2\u0ea73\u10d2\u10d42\u307f\u3093\u306a3\u30a2\u30de\u30be\u30f34\u30af\u30e9\u30a6\u30c94\u30b0\u30fc\u30b0\u30eb4\u30b3\u30e02\u30b9\u30c8\u30a23\u30bb\u30fc\u30eb3\u30d5\u30a1\u30c3\u30b7\u30e7\u30f36\u30dd\u30a4\u30f3\u30c84\u4e16\u754c2\u4e2d\u4fe11\u56fd1\u570b1\u6587\u7f513\u4e9a\u9a6c\u900a3\u4f01\u4e1a2\u4f5b\u5c712\u4fe1\u606f2\u5065\u5eb72\u516b\u53662\u516c\u53f81\u76ca2\u53f0\u6e7e1\u70632\u5546\u57ce1\u5e971\u68072\u5609\u91cc0\u5927\u9152\u5e975\u5728\u7ebf2\u5927\u62ff2\u5929\u4e3b\u65593\u5a31\u4e502\u5bb6\u96fb2\u5e7f\u4e1c2\u5fae\u535a2\u6148\u55842\u6211\u7231\u4f603\u624b\u673a2\u62db\u80582\u653f\u52a11\u5e9c2\u65b0\u52a0\u57612\u95fb2\u65f6\u5c1a2\u66f8\u7c4d2\u673a\u67842\u6de1\u9a6c\u95213\u6e38\u620f2\u6fb3\u95802\u70b9\u770b2\u79fb\u52a82\u7ec4\u7ec7\u673a\u67844\u7f51\u57401\u5e971\u7ad91\u7edc2\u8054\u901a2\u8c37\u6b4c2\u8d2d\u72692\u901a\u8ca92\u96c6\u56e22\u96fb\u8a0a\u76c8\u79d14\u98de\u5229\u6d663\u98df\u54c12\u9910\u53852\u9999\u683c\u91cc\u62c93\u6e2f2\ub2f7\ub1371\ucef42\uc0bc\uc1312\ud55c\uad6d2",x=(t,e)=>{for(const n in e)t[n]=e[n];return t},Ut="numeric",Mt="ascii",Bt="alpha",X="asciinumeric",Q="alphanumeric",Kt="domain",he="emoji",Ne="scheme",Ie="slashscheme",ne="whitespace";function He(t,e){return t in e||(e[t]=[]),e[t]}function v(t,e,n){e[Ut]&&(e[X]=!0,e[Q]=!0),e[Mt]&&(e[X]=!0,e[Bt]=!0),e[X]&&(e[Q]=!0),e[Bt]&&(e[Q]=!0),e[Q]&&(e[Kt]=!0),e[he]&&(e[Kt]=!0);for(const r in e){const e=He(r,n);e.indexOf(t)<0&&e.push(t)}}function we(t,e){const n={};for(const r in e)e[r].indexOf(t)>=0&&(n[r]=!0);return n}function y(t){void 0===t&&(t=null),this.j={},this.jr=[],this.jd=null,this.t=t}y.groups={},y.prototype={accepts(){return!!this.t},go(t){const e=this,n=e.j[t];if(n)return n;for(let r=0;rt.ta(e,n,r,s),T=(t,e,n,r,s)=>t.tr(e,n,r,s),se=(t,e,n,r,s)=>t.ts(e,n,r,s),r=(t,e,n,r,s)=>t.tt(e,n,r,s),C="WORD",zt="UWORD",F="LOCALHOST",_t="TLD",Ft="UTLD",V="SCHEME",D="SLASH_SCHEME",Wt="NUM",fe="WS",Gt="NL",K="OPENBRACE",z="CLOSEBRACE",Z="OPENBRACKET",tt="CLOSEBRACKET",et="OPENPAREN",nt="CLOSEPAREN",st="OPENANGLEBRACKET",it="CLOSEANGLEBRACKET",ot="FULLWIDTHLEFTPAREN",rt="FULLWIDTHRIGHTPAREN",at="LEFTCORNERBRACKET",lt="RIGHTCORNERBRACKET",ct="LEFTWHITECORNERBRACKET",ut="RIGHTWHITECORNERBRACKET",dt="FULLWIDTHLESSTHAN",ht="FULLWIDTHGREATERTHAN",ft="AMPERSAND",gt="APOSTROPHE",mt="ASTERISK",N="AT",Et="BACKSLASH",pt="BACKTICK",yt="CARET",I="COLON",$t="COMMA",Tt="DOLLAR",A="DOT",kt="EQUALS",Qt="EXCLAMATION",R="HYPHEN",Lt="PERCENT",At="PIPE",Rt="PLUS",St="POUND",Ct="QUERY",qt="QUOTE",Yt="SEMI",S="SLASH",_="TILDE",Ot="UNDERSCORE",ge="EMOJI",bt="SYM";var me=Object.freeze({__proto__:null,WORD:C,UWORD:zt,LOCALHOST:F,TLD:_t,UTLD:Ft,SCHEME:V,SLASH_SCHEME:D,NUM:Wt,WS:fe,NL:Gt,OPENBRACE:K,CLOSEBRACE:z,OPENBRACKET:Z,CLOSEBRACKET:tt,OPENPAREN:et,CLOSEPAREN:nt,OPENANGLEBRACKET:st,CLOSEANGLEBRACKET:it,FULLWIDTHLEFTPAREN:ot,FULLWIDTHRIGHTPAREN:rt,LEFTCORNERBRACKET:at,RIGHTCORNERBRACKET:lt,LEFTWHITECORNERBRACKET:ct,RIGHTWHITECORNERBRACKET:ut,FULLWIDTHLESSTHAN:dt,FULLWIDTHGREATERTHAN:ht,AMPERSAND:ft,APOSTROPHE:gt,ASTERISK:mt,AT:N,BACKSLASH:Et,BACKTICK:pt,CARET:yt,COLON:I,COMMA:$t,DOLLAR:Tt,DOT:A,EQUALS:kt,EXCLAMATION:Qt,HYPHEN:R,PERCENT:Lt,PIPE:At,PLUS:Rt,POUND:St,QUERY:Ct,QUOTE:qt,SEMI:Yt,SLASH:S,TILDE:_,UNDERSCORE:Ot,EMOJI:ge,SYM:bt});const j=/[a-z]/,xt=new RegExp("\\p{L}","u"),Pt=new RegExp("\\p{Emoji}","u"),jt=/\d/,ie=/\s/,oe="\n",ve="\ufe0f",xe="\u200d";let q=null,Y=null;function Pe(t){void 0===t&&(t=[]);const e={};y.groups=e;const n=new y;null==q&&(q=re(Oe)),null==Y&&(Y=re(be)),r(n,"'",gt),r(n,"{",K),r(n,"}",z),r(n,"[",Z),r(n,"]",tt),r(n,"(",et),r(n,")",nt),r(n,"<",st),r(n,">",it),r(n,"\uff08",ot),r(n,"\uff09",rt),r(n,"\u300c",at),r(n,"\u300d",lt),r(n,"\u300e",ct),r(n,"\u300f",ut),r(n,"\uff1c",dt),r(n,"\uff1e",ht),r(n,"&",ft),r(n,"*",mt),r(n,"@",N),r(n,"`",pt),r(n,"^",yt),r(n,":",I),r(n,",",$t),r(n,"$",Tt),r(n,".",A),r(n,"=",kt),r(n,"!",Qt),r(n,"-",R),r(n,"%",Lt),r(n,"|",At),r(n,"+",Rt),r(n,"#",St),r(n,"?",Ct),r(n,'"',qt),r(n,"/",S),r(n,";",Yt),r(n,"~",_),r(n,"_",Ot),r(n,"\\",Et);const s=T(n,jt,Wt,{[Ut]:!0});T(s,jt,s);const i=T(n,j,C,{[Mt]:!0});T(i,j,i);const o=T(n,xt,zt,{[Bt]:!0});T(o,j),T(o,xt,o);const a=T(n,ie,fe,{[ne]:!0});r(n,oe,Gt,{[ne]:!0}),r(a,oe),T(a,ie,a);const l=T(n,Pt,ge,{[he]:!0});T(l,Pt,l),r(l,ve,l);const c=r(l,xe);T(c,Pt,l);const u=[[j,i]],d=[[j,null],[xt,o]];for(let r=0;rt[0]>e[0]?1:-1));for(let r=0;r=0?s[Kt]=!0:j.test(e)?jt.test(e)?s[X]=!0:s[Mt]=!0:s[Ut]=!0,se(n,e,e,s)}return se(n,"localhost",F,{ascii:!0}),n.jd=new y(bt),{start:n,tokens:x({groups:e},me)}}function je(t,e){const n=De(e.replace(/[A-Z]/g,(t=>t.toLowerCase()))),r=n.length,s=[];let i=0,o=0;for(;o=0&&(d+=n[o].length,g++),c+=n[o].length,i+=n[o].length,o++;i-=d,o-=g,c-=d,s.push({t:u.t,v:e.slice(i-c,i),s:i-c,e:i})}return s}function De(t){const e=[],n=t.length;let r=0;for(;r56319||r+1===n||(s=t.charCodeAt(r+1))<56320||s>57343?t[r]:t.slice(r,r+2);e.push(o),r+=o.length}return e}function b(t,e,n,r,s){let i;const o=e.length;for(let a=0;a=0;)s++;if(s>0){e.push(n.join(""));for(let e=parseInt(t.substring(r,r+s),10);e>0;e--)n.pop();r+=s}else n.push(t[r]),r++}return e}const U={defaultProtocol:"http",events:null,format:ae,formatHref:ae,nl2br:!1,tagName:"a",target:null,rel:null,validate:!0,truncate:1/0,className:null,attributes:null,ignoreTags:[],render:null};function Nt(t,e){void 0===e&&(e=null);let n=x({},U);t&&(n=x(n,t instanceof Nt?t.o:t));const r=n.ignoreTags,s=[];for(let i=0;it,check(t){return this.get("validate",t.toString(),t)},get(t,e,n){const r=null!=e;let s=this.o[t];return s&&("object"==typeof s?(s=n.t in s?s[n.t]:U[t],"function"==typeof s&&r&&(s=s(e,n))):"function"==typeof s&&r&&(s=s(e,n.t,n)),s)},getObj(t,e,n){let r=this.o[t];return"function"==typeof r&&null!=e&&(r=r(e,n.t,n)),r},render(t){const e=t.render(this);return(this.get("render",null,t)||this.defaultRender)(e,t.t,t)}};var Ee=Object.freeze({__proto__:null,defaults:U,Options:Nt,assign:x});function pe(t,e){this.t="token",this.v=t,this.tk=e}function W(t,e){class n extends pe{constructor(e,n){super(e,n),this.t=t}}for(const r in e)n.prototype[r]=e[r];return n.t=t,n}pe.prototype={isLink:!1,toString(){return this.v},toHref(t){return this.toString()},toFormattedString(t){const e=this.toString(),n=t.get("truncate",e,this),r=t.get("format",e,this);return n&&r.length>n?r.substring(0,n)+"\u2026":r},toFormattedHref(t){return t.get("formatHref",this.toHref(t.get("defaultProtocol")),this)},startIndex(){return this.tk[0].s},endIndex(){return this.tk[this.tk.length-1].e},toObject(t){return void 0===t&&(t=U.defaultProtocol),{type:this.t,value:this.toString(),isLink:this.isLink,href:this.toHref(t),start:this.startIndex(),end:this.endIndex()}},toFormattedObject(t){return{type:this.t,value:this.toFormattedString(t),isLink:this.isLink,href:this.toFormattedHref(t),start:this.startIndex(),end:this.endIndex()}},validate(t){return t.get("validate",this.toString(),this)},render(t){const e=this,n=this.toHref(t.get("defaultProtocol")),r=t.get("formatHref",n,this),s=t.get("tagName",n,e),i=this.toFormattedString(t),o={},a=t.get("className",n,e),l=t.get("target",n,e),c=t.get("rel",n,e),u=t.getObj("attributes",n,e),d=t.getObj("events",n,e);return o.href=r,a&&(o.class=a),l&&(o.target=l),c&&(o.rel=c),u&&x(o,u),{tagName:s,attributes:o,content:i,eventListeners:d}}};const le=W("email",{isLink:!0,toHref(){return"mailto:"+this.toString()}}),ce=W("text"),Ue=W("nl"),J=W("url",{isLink:!0,toHref(t){return void 0===t&&(t=U.defaultProtocol),this.hasProtocol()?this.v:`${t}://${this.v}`},hasProtocol(){const t=this.tk;return t.length>=2&&t[0].t!==F&&t[1].t===I}}),k=t=>new y(t);function Me(t){let{groups:e}=t;const n=e.domain.concat([ft,mt,N,Et,pt,yt,Tt,kt,R,Wt,Lt,At,Rt,St,S,bt,_,Ot]),s=[gt,I,$t,A,Qt,Ct,qt,Yt,st,it,K,z,tt,Z,et,nt,ot,rt,at,lt,ct,ut,dt,ht],i=[ft,gt,mt,Et,pt,yt,Tt,kt,R,K,z,Lt,At,Rt,St,Ct,S,bt,_,Ot],o=k(),a=r(o,_);d(a,i,a),d(a,e.domain,a);const l=k(),c=k(),u=k();d(o,e.domain,l),d(o,e.scheme,c),d(o,e.slashscheme,u),d(l,i,a),d(l,e.domain,l);const g=r(l,N);r(a,N,g),r(c,N,g),r(u,N,g);const h=r(a,A);d(h,i,a),d(h,e.domain,a);const m=k();d(g,e.domain,m),d(m,e.domain,m);const p=r(m,A);d(p,e.domain,m);const f=k(le);d(p,e.tld,f),d(p,e.utld,f),r(g,F,f);const y=r(m,R);d(y,e.domain,m),d(f,e.domain,m),r(f,A,p),r(f,R,y);const E=r(f,I);d(E,e.numeric,le);const b=r(l,R),T=r(l,A);d(b,e.domain,l),d(T,i,a),d(T,e.domain,l);const L=k(J);d(T,e.tld,L),d(T,e.utld,L),d(L,e.domain,l),d(L,i,a),r(L,A,T),r(L,R,b),r(L,N,g);const v=r(L,I),C=k(J);d(v,e.numeric,C);const O=k(J),x=k();d(O,n,O),d(O,s,x),d(x,n,O),d(x,s,x),r(L,S,O),r(C,S,O);const j=r(c,I),w=r(u,I),H=r(w,S),P=r(H,S);d(c,e.domain,l),r(c,A,T),r(c,R,b),d(u,e.domain,l),r(u,A,T),r(u,R,b),d(j,e.domain,O),r(j,S,O),d(P,e.domain,O),d(P,n,O),r(P,S,O);const D=[[K,z],[Z,tt],[et,nt],[st,it],[ot,rt],[at,lt],[ct,ut],[dt,ht]];for(let R=0;R=0&&g++,s++,u++;if(g<0)s-=u,s0&&(i.push(Dt(ce,e,o)),o=[]),s-=g,u-=g;const t=d.t,r=n.slice(s-u,s);i.push(Dt(t,e,r))}}return o.length>0&&i.push(Dt(ce,e,o)),i}function Dt(t,e,n){const r=n[0].s,s=n[n.length-1].e;return new t(e.slice(r,s),n)}const ue=typeof console<"u"&&console&&console.warn||(()=>{}),Ke="until manual call of linkify.init(). Register all schemes and plugins before invoking linkify the first time.",m={scanner:null,parser:null,tokenQueue:[],pluginQueue:[],customSchemes:[],initialized:!1};function ze(t,e){if("function"!=typeof e)throw new Error(`linkifyjs: Invalid plugin ${e} (expects function)`);for(let n=0;n{"string"==typeof t?r.push.apply(r,$e(t,e,n)):O.isValidElement(t)?"string"==typeof t.type&&e.ignoreTags.indexOf(t.type.toUpperCase())>=0?r.push(t):r.push(ye(t,e,n)):r.push(t)}));const s="__linkify-el-"+n.elementId++,i=Ee.assign({key:s},t.props);return O.cloneElement(t,i,r)}ze("mention",Ge);const Qe=t=>{let e=0;const n={key:"__linkify-wrapper"};for(const o in t)"options"!==o&&"as"!==o&&"tagName"!==o&&"children"!==o&&(n[o]=t[o]);const r=new Nt(t.options,(t=>{let{tagName:n,attributes:r,content:s}=t;return r.key="__linkify-lnk-"+e++,r.class&&(r.className=r.class,delete r.class),O.createElement(n,r,s)})),s=t.as||t.tagName||O.Fragment||"span",i=t.children;return ye(O.createElement(s,n,i),r,{elementId:0})},de=t=>{const{theme:e}=Ce(),n=ee(Re)` +import{j as vt}from"./jsx-runtime-CexXSJP5.js";import{n as ee}from"./emotion-styled.browser.esm-Dz2BNYeh.js";import{r as O}from"./index-BP8_t0zE.js";import{E as Re}from"./ExternalLink-DC09teyd.js";import{I as Se}from"./InternalLink-BRM7MvOa.js";import{u as Ce}from"./theme-ui-core.browser.esm-CIov4Ln1.js";const Oe="aaa1rp3bb0ott3vie4c1le2ogado5udhabi7c0ademy5centure6ountant0s9o1tor4d0s1ult4e0g1ro2tna4f0l1rica5g0akhan5ency5i0g1rbus3force5tel5kdn3l0ibaba4pay4lfinanz6state5y2sace3tom5m0azon4ericanexpress7family11x2fam3ica3sterdam8nalytics7droid5quan4z2o0l2partments8p0le4q0uarelle8r0ab1mco4chi3my2pa2t0e3s0da2ia2sociates9t0hleta5torney7u0ction5di0ble3o3spost5thor3o0s4vianca6w0s2x0a2z0ure5ba0by2idu3namex3narepublic11d1k2r0celona5laycard4s5efoot5gains6seball5ketball8uhaus5yern5b0c1t1va3cg1n2d1e0ats2uty4er2ntley5rlin4st0buy5t2f1g1h0arti5i0ble3d1ke2ng0o3o1z2j1lack0friday9ockbuster8g1omberg7ue3m0s1w2n0pparibas9o0ats3ehringer8fa2m1nd2o0k0ing5sch2tik2on4t1utique6x2r0adesco6idgestone9oadway5ker3ther5ussels7s1t1uild0ers6siness6y1zz3v1w1y1z0h3ca0b1fe2l0l1vinklein9m0era3p2non3petown5ital0one8r0avan4ds2e0er0s4s2sa1e1h1ino4t0ering5holic7ba1n1re3c1d1enter4o1rn3f0a1d2g1h0anel2nel4rity4se2t2eap3intai5ristmas6ome4urch5i0priani6rcle4sco3tadel4i0c2y3k1l0aims4eaning6ick2nic1que6othing5ud3ub0med6m1n1o0ach3des3ffee4llege4ogne5m0cast4mbank4unity6pany2re3uter5sec4ndos3struction8ulting7tact3ractors9oking4l1p2rsica5untry4pon0s4rses6pa2r0edit0card4union9icket5own3s1uise0s6u0isinella9v1w1x1y0mru3ou3z2dabur3d1nce3ta1e1ing3sun4y2clk3ds2e0al0er2s3gree4livery5l1oitte5ta3mocrat6ntal2ist5si0gn4v2hl2iamonds6et2gital5rect0ory7scount3ver5h2y2j1k1m1np2o0cs1tor4g1mains5t1wnload7rive4tv2ubai3nlop4pont4rban5vag2r2z2earth3t2c0o2deka3u0cation8e1g1mail3erck5nergy4gineer0ing9terprises10pson4quipment8r0icsson6ni3s0q1tate5t1u0rovision8s2vents5xchange6pert3osed4ress5traspace10fage2il1rwinds6th3mily4n0s2rm0ers5shion4t3edex3edback6rrari3ero6i0delity5o2lm2nal1nce1ial7re0stone6mdale6sh0ing5t0ness6j1k1lickr3ghts4r2orist4wers5y2m1o0o0d1tball6rd1ex2sale4um3undation8x2r0ee1senius7l1ogans4ntier7tr2ujitsu5n0d2rniture7tbol5yi3ga0l0lery3o1up4me0s3p1rden4y2b0iz3d0n2e0a1nt0ing5orge5f1g0ee3h1i0ft0s3ves2ing5l0ass3e1obal2o4m0ail3bh2o1x2n1odaddy5ld0point6f2o0dyear5g0le4p1t1v2p1q1r0ainger5phics5tis4een3ipe3ocery4up4s1t1u0ardian6cci3ge2ide2tars5ru3w1y2hair2mburg5ngout5us3bo2dfc0bank7ealth0care8lp1sinki6re1mes5iphop4samitsu7tachi5v2k0t2m1n1ockey4ldings5iday5medepot5goods5s0ense7nda3rse3spital5t0ing5t0els3mail5use3w2r1sbc3t1u0ghes5yatt3undai7ibm2cbc2e1u2d1e0ee3fm2kano4l1m0amat4db2mo0bilien9n0c1dustries8finiti5o2g1k1stitute6urance4e4t0ernational10uit4vestments10o1piranga7q1r0ish4s0maili5t0anbul7t0au2v3jaguar4va3cb2e0ep2tzt3welry6io2ll2m0p2nj2o0bs1urg4t1y2p0morgan6rs3uegos4niper7kaufen5ddi3e0rryhotels6logistics9properties14fh2g1h1i0a1ds2m1ndle4tchen5wi3m1n1oeln3matsu5sher5p0mg2n2r0d1ed3uokgroup8w1y0oto4z2la0caixa5mborghini8er3ncaster6d0rover6xess5salle5t0ino3robe5w0yer5b1c1ds2ease3clerc5frak4gal2o2xus4gbt3i0dl2fe0insurance9style7ghting6ke2lly3mited4o2ncoln4k2psy3ve1ing5k1lc1p2oan0s3cker3us3l1ndon4tte1o3ve3pl0financial11r1s1t0d0a3u0ndbeck6xe1ury5v1y2ma0drid4if1son4keup4n0agement7go3p1rket0ing3s4riott5shalls7ttel5ba2c0kinsey7d1e0d0ia3et2lbourne7me1orial6n0u2rckmsd7g1h1iami3crosoft7l1ni1t2t0subishi9k1l0b1s2m0a2n1o0bi0le4da2e1i1m1nash3ey2ster5rmon3tgage6scow4to0rcycles9v0ie4p1q1r1s0d2t0n1r2u0seum3ic4v1w1x1y1z2na0b1goya4me2tura4vy3ba2c1e0c1t0bank4flix4work5ustar5w0s2xt0direct7us4f0l2g0o2hk2i0co2ke1on3nja3ssan1y5l1o0kia3rton4w0ruz3tv4p1r0a1w2tt2u1yc2z2obi1server7ffice5kinawa6layan0group9dnavy5lo3m0ega4ne1g1l0ine5oo2pen3racle3nge4g0anic5igins6saka4tsuka4t2vh3pa0ge2nasonic7ris2s1tners4s1y3y2ccw3e0t2f0izer5g1h0armacy6d1ilips5one2to0graphy6s4ysio5ics1tet2ures6d1n0g1k2oneer5zza4k1l0ace2y0station9umbing5s3m1n0c2ohl2ker3litie5rn2st3r0america6xi3ess3ime3o0d0uctions8f1gressive8mo2perties3y5tection8u0dential9s1t1ub2w0c2y2qa1pon3uebec3st5racing4dio4e0ad1lestate6tor2y4cipes5d0stone5umbrella9hab3ise0n3t2liance6n0t0als5pair3ort3ublican8st0aurant8view0s5xroth6ich0ardli6oh3l1o1p2o0cks3deo3gers4om3s0vp3u0gby3hr2n2w0e2yukyu6sa0arland6fe0ty4kura4le1on3msclub4ung5ndvik0coromant12ofi4p1rl2s1ve2xo3b0i1s2c0a1b1haeffler7midt4olarships8ol3ule3warz5ience5ot3d1e0arch3t2cure1ity6ek2lect4ner3rvices6ven3w1x0y3fr2g1h0angrila6rp2w2ell3ia1ksha5oes2p0ping5uji3w3i0lk2na1gles5te3j1k0i0n2y0pe4l0ing4m0art3ile4n0cf3o0ccer3ial4ftbank4ware6hu2lar2utions7ng1y2y2pa0ce3ort2t3r0l2s1t0ada2ples4r1tebank4farm7c0group6ockholm6rage3e3ream4udio2y3yle4u0cks3pplies3y2ort5rf1gery5zuki5v1watch4iss4x1y0dney4stems6z2tab1ipei4lk2obao4rget4tamotors6r2too4x0i3c0i2d0k2eam2ch0nology8l1masek5nnis4va3f1g1h0d1eater2re6iaa2ckets5enda4ps2res2ol4j0maxx4x2k0maxx5l1m0all4n1o0day3kyo3ols3p1ray3shiba5tal3urs3wn2yota3s3r0ade1ing4ining5vel0ers0insurance16ust3v2t1ube2i1nes3shu4v0s2w1z2ua1bank3s2g1k1nicom3versity8o2ol2ps2s1y1z2va0cations7na1guard7c1e0gas3ntures6risign5m\xf6gensberater2ung14sicherung10t2g1i0ajes4deo3g1king4llas4n1p1rgin4sa1ion4va1o3laanderen9n1odka3lvo3te1ing3o2yage5u2wales2mart4ter4ng0gou5tch0es6eather0channel12bcam3er2site5d0ding5ibo2r3f1hoswho6ien2ki2lliamhill9n0dows4e1ners6me2olterskluwer11odside6rk0s2ld3w2s1tc1f3xbox3erox4finity6ihuan4n2xx2yz3yachts4hoo3maxun5ndex5e1odobashi7ga2kohama6u0tube6t1un3za0ppos4ra3ero3ip2m1one3uerich6w2",be="\u03b5\u03bb1\u03c52\u0431\u04331\u0435\u043b3\u0434\u0435\u0442\u04384\u0435\u044e2\u043a\u0430\u0442\u043e\u043b\u0438\u043a6\u043e\u043c3\u043c\u043a\u04342\u043e\u043d1\u0441\u043a\u0432\u04306\u043e\u043d\u043b\u0430\u0439\u043d5\u0440\u04333\u0440\u0443\u04412\u04442\u0441\u0430\u0439\u04423\u0440\u04313\u0443\u043a\u04403\u049b\u0430\u04373\u0570\u0561\u05753\u05d9\u05e9\u05e8\u05d0\u05dc5\u05e7\u05d5\u05dd3\u0627\u0628\u0648\u0638\u0628\u064a5\u0631\u0627\u0645\u0643\u06485\u0644\u0627\u0631\u062f\u06464\u0628\u062d\u0631\u064a\u06465\u062c\u0632\u0627\u0626\u06315\u0633\u0639\u0648\u062f\u064a\u06296\u0639\u0644\u064a\u0627\u06465\u0645\u063a\u0631\u06285\u0645\u0627\u0631\u0627\u062a5\u06cc\u0631\u0627\u06465\u0628\u0627\u0631\u062a2\u0632\u0627\u06314\u064a\u062a\u06433\u06be\u0627\u0631\u062a5\u062a\u0648\u0646\u06334\u0633\u0648\u062f\u0627\u06463\u0631\u064a\u06295\u0634\u0628\u0643\u06294\u0639\u0631\u0627\u06422\u06282\u0645\u0627\u06464\u0641\u0644\u0633\u0637\u064a\u06466\u0642\u0637\u06313\u0643\u0627\u062b\u0648\u0644\u064a\u06436\u0648\u06453\u0645\u0635\u06312\u0644\u064a\u0633\u064a\u06275\u0648\u0631\u064a\u062a\u0627\u0646\u064a\u06277\u0642\u06394\u0647\u0645\u0631\u0627\u06475\u067e\u0627\u06a9\u0633\u062a\u0627\u06467\u0680\u0627\u0631\u062a4\u0915\u0949\u092e3\u0928\u0947\u091f3\u092d\u093e\u0930\u09240\u092e\u094d3\u094b\u09245\u0938\u0902\u0917\u0920\u09285\u09ac\u09be\u0982\u09b2\u09be5\u09ad\u09be\u09b0\u09a42\u09f0\u09a44\u0a2d\u0a3e\u0a30\u0a244\u0aad\u0abe\u0ab0\u0aa44\u0b2d\u0b3e\u0b30\u0b244\u0b87\u0ba8\u0bcd\u0ba4\u0bbf\u0baf\u0bbe6\u0bb2\u0b99\u0bcd\u0b95\u0bc86\u0b9a\u0bbf\u0b99\u0bcd\u0b95\u0baa\u0bcd\u0baa\u0bc2\u0bb0\u0bcd11\u0c2d\u0c3e\u0c30\u0c24\u0c4d5\u0cad\u0cbe\u0cb0\u0ca44\u0d2d\u0d3e\u0d30\u0d24\u0d025\u0dbd\u0d82\u0d9a\u0dcf4\u0e04\u0e2d\u0e213\u0e44\u0e17\u0e223\u0ea5\u0eb2\u0ea73\u10d2\u10d42\u307f\u3093\u306a3\u30a2\u30de\u30be\u30f34\u30af\u30e9\u30a6\u30c94\u30b0\u30fc\u30b0\u30eb4\u30b3\u30e02\u30b9\u30c8\u30a23\u30bb\u30fc\u30eb3\u30d5\u30a1\u30c3\u30b7\u30e7\u30f36\u30dd\u30a4\u30f3\u30c84\u4e16\u754c2\u4e2d\u4fe11\u56fd1\u570b1\u6587\u7f513\u4e9a\u9a6c\u900a3\u4f01\u4e1a2\u4f5b\u5c712\u4fe1\u606f2\u5065\u5eb72\u516b\u53662\u516c\u53f81\u76ca2\u53f0\u6e7e1\u70632\u5546\u57ce1\u5e971\u68072\u5609\u91cc0\u5927\u9152\u5e975\u5728\u7ebf2\u5927\u62ff2\u5929\u4e3b\u65593\u5a31\u4e502\u5bb6\u96fb2\u5e7f\u4e1c2\u5fae\u535a2\u6148\u55842\u6211\u7231\u4f603\u624b\u673a2\u62db\u80582\u653f\u52a11\u5e9c2\u65b0\u52a0\u57612\u95fb2\u65f6\u5c1a2\u66f8\u7c4d2\u673a\u67842\u6de1\u9a6c\u95213\u6e38\u620f2\u6fb3\u95802\u70b9\u770b2\u79fb\u52a82\u7ec4\u7ec7\u673a\u67844\u7f51\u57401\u5e971\u7ad91\u7edc2\u8054\u901a2\u8c37\u6b4c2\u8d2d\u72692\u901a\u8ca92\u96c6\u56e22\u96fb\u8a0a\u76c8\u79d14\u98de\u5229\u6d663\u98df\u54c12\u9910\u53852\u9999\u683c\u91cc\u62c93\u6e2f2\ub2f7\ub1371\ucef42\uc0bc\uc1312\ud55c\uad6d2",x=(t,e)=>{for(const n in e)t[n]=e[n];return t},Ut="numeric",Mt="ascii",Bt="alpha",X="asciinumeric",Q="alphanumeric",Kt="domain",he="emoji",Ne="scheme",Ie="slashscheme",ne="whitespace";function He(t,e){return t in e||(e[t]=[]),e[t]}function v(t,e,n){e[Ut]&&(e[X]=!0,e[Q]=!0),e[Mt]&&(e[X]=!0,e[Bt]=!0),e[X]&&(e[Q]=!0),e[Bt]&&(e[Q]=!0),e[Q]&&(e[Kt]=!0),e[he]&&(e[Kt]=!0);for(const r in e){const e=He(r,n);e.indexOf(t)<0&&e.push(t)}}function we(t,e){const n={};for(const r in e)e[r].indexOf(t)>=0&&(n[r]=!0);return n}function y(t){void 0===t&&(t=null),this.j={},this.jr=[],this.jd=null,this.t=t}y.groups={},y.prototype={accepts(){return!!this.t},go(t){const e=this,n=e.j[t];if(n)return n;for(let r=0;rt.ta(e,n,r,s),T=(t,e,n,r,s)=>t.tr(e,n,r,s),se=(t,e,n,r,s)=>t.ts(e,n,r,s),r=(t,e,n,r,s)=>t.tt(e,n,r,s),C="WORD",zt="UWORD",F="LOCALHOST",_t="TLD",Ft="UTLD",V="SCHEME",D="SLASH_SCHEME",Wt="NUM",fe="WS",Gt="NL",K="OPENBRACE",z="CLOSEBRACE",Z="OPENBRACKET",tt="CLOSEBRACKET",et="OPENPAREN",nt="CLOSEPAREN",st="OPENANGLEBRACKET",it="CLOSEANGLEBRACKET",ot="FULLWIDTHLEFTPAREN",rt="FULLWIDTHRIGHTPAREN",at="LEFTCORNERBRACKET",lt="RIGHTCORNERBRACKET",ct="LEFTWHITECORNERBRACKET",ut="RIGHTWHITECORNERBRACKET",dt="FULLWIDTHLESSTHAN",ht="FULLWIDTHGREATERTHAN",ft="AMPERSAND",gt="APOSTROPHE",mt="ASTERISK",N="AT",Et="BACKSLASH",pt="BACKTICK",yt="CARET",I="COLON",$t="COMMA",Tt="DOLLAR",A="DOT",kt="EQUALS",Qt="EXCLAMATION",R="HYPHEN",Lt="PERCENT",At="PIPE",Rt="PLUS",St="POUND",Ct="QUERY",qt="QUOTE",Yt="SEMI",S="SLASH",_="TILDE",Ot="UNDERSCORE",ge="EMOJI",bt="SYM";var me=Object.freeze({__proto__:null,WORD:C,UWORD:zt,LOCALHOST:F,TLD:_t,UTLD:Ft,SCHEME:V,SLASH_SCHEME:D,NUM:Wt,WS:fe,NL:Gt,OPENBRACE:K,CLOSEBRACE:z,OPENBRACKET:Z,CLOSEBRACKET:tt,OPENPAREN:et,CLOSEPAREN:nt,OPENANGLEBRACKET:st,CLOSEANGLEBRACKET:it,FULLWIDTHLEFTPAREN:ot,FULLWIDTHRIGHTPAREN:rt,LEFTCORNERBRACKET:at,RIGHTCORNERBRACKET:lt,LEFTWHITECORNERBRACKET:ct,RIGHTWHITECORNERBRACKET:ut,FULLWIDTHLESSTHAN:dt,FULLWIDTHGREATERTHAN:ht,AMPERSAND:ft,APOSTROPHE:gt,ASTERISK:mt,AT:N,BACKSLASH:Et,BACKTICK:pt,CARET:yt,COLON:I,COMMA:$t,DOLLAR:Tt,DOT:A,EQUALS:kt,EXCLAMATION:Qt,HYPHEN:R,PERCENT:Lt,PIPE:At,PLUS:Rt,POUND:St,QUERY:Ct,QUOTE:qt,SEMI:Yt,SLASH:S,TILDE:_,UNDERSCORE:Ot,EMOJI:ge,SYM:bt});const j=/[a-z]/,xt=new RegExp("\\p{L}","u"),Pt=new RegExp("\\p{Emoji}","u"),jt=/\d/,ie=/\s/,oe="\n",ve="\ufe0f",xe="\u200d";let q=null,Y=null;function Pe(t){void 0===t&&(t=[]);const e={};y.groups=e;const n=new y;null==q&&(q=re(Oe)),null==Y&&(Y=re(be)),r(n,"'",gt),r(n,"{",K),r(n,"}",z),r(n,"[",Z),r(n,"]",tt),r(n,"(",et),r(n,")",nt),r(n,"<",st),r(n,">",it),r(n,"\uff08",ot),r(n,"\uff09",rt),r(n,"\u300c",at),r(n,"\u300d",lt),r(n,"\u300e",ct),r(n,"\u300f",ut),r(n,"\uff1c",dt),r(n,"\uff1e",ht),r(n,"&",ft),r(n,"*",mt),r(n,"@",N),r(n,"`",pt),r(n,"^",yt),r(n,":",I),r(n,",",$t),r(n,"$",Tt),r(n,".",A),r(n,"=",kt),r(n,"!",Qt),r(n,"-",R),r(n,"%",Lt),r(n,"|",At),r(n,"+",Rt),r(n,"#",St),r(n,"?",Ct),r(n,'"',qt),r(n,"/",S),r(n,";",Yt),r(n,"~",_),r(n,"_",Ot),r(n,"\\",Et);const s=T(n,jt,Wt,{[Ut]:!0});T(s,jt,s);const i=T(n,j,C,{[Mt]:!0});T(i,j,i);const o=T(n,xt,zt,{[Bt]:!0});T(o,j),T(o,xt,o);const a=T(n,ie,fe,{[ne]:!0});r(n,oe,Gt,{[ne]:!0}),r(a,oe),T(a,ie,a);const l=T(n,Pt,ge,{[he]:!0});T(l,Pt,l),r(l,ve,l);const c=r(l,xe);T(c,Pt,l);const u=[[j,i]],d=[[j,null],[xt,o]];for(let r=0;rt[0]>e[0]?1:-1));for(let r=0;r=0?s[Kt]=!0:j.test(e)?jt.test(e)?s[X]=!0:s[Mt]=!0:s[Ut]=!0,se(n,e,e,s)}return se(n,"localhost",F,{ascii:!0}),n.jd=new y(bt),{start:n,tokens:x({groups:e},me)}}function je(t,e){const n=De(e.replace(/[A-Z]/g,(t=>t.toLowerCase()))),r=n.length,s=[];let i=0,o=0;for(;o=0&&(d+=n[o].length,g++),c+=n[o].length,i+=n[o].length,o++;i-=d,o-=g,c-=d,s.push({t:u.t,v:e.slice(i-c,i),s:i-c,e:i})}return s}function De(t){const e=[],n=t.length;let r=0;for(;r56319||r+1===n||(s=t.charCodeAt(r+1))<56320||s>57343?t[r]:t.slice(r,r+2);e.push(o),r+=o.length}return e}function b(t,e,n,r,s){let i;const o=e.length;for(let a=0;a=0;)s++;if(s>0){e.push(n.join(""));for(let e=parseInt(t.substring(r,r+s),10);e>0;e--)n.pop();r+=s}else n.push(t[r]),r++}return e}const U={defaultProtocol:"http",events:null,format:ae,formatHref:ae,nl2br:!1,tagName:"a",target:null,rel:null,validate:!0,truncate:1/0,className:null,attributes:null,ignoreTags:[],render:null};function Nt(t,e){void 0===e&&(e=null);let n=x({},U);t&&(n=x(n,t instanceof Nt?t.o:t));const r=n.ignoreTags,s=[];for(let i=0;it,check(t){return this.get("validate",t.toString(),t)},get(t,e,n){const r=null!=e;let s=this.o[t];return s&&("object"==typeof s?(s=n.t in s?s[n.t]:U[t],"function"==typeof s&&r&&(s=s(e,n))):"function"==typeof s&&r&&(s=s(e,n.t,n)),s)},getObj(t,e,n){let r=this.o[t];return"function"==typeof r&&null!=e&&(r=r(e,n.t,n)),r},render(t){const e=t.render(this);return(this.get("render",null,t)||this.defaultRender)(e,t.t,t)}};var Ee=Object.freeze({__proto__:null,defaults:U,Options:Nt,assign:x});function pe(t,e){this.t="token",this.v=t,this.tk=e}function W(t,e){class n extends pe{constructor(e,n){super(e,n),this.t=t}}for(const r in e)n.prototype[r]=e[r];return n.t=t,n}pe.prototype={isLink:!1,toString(){return this.v},toHref(t){return this.toString()},toFormattedString(t){const e=this.toString(),n=t.get("truncate",e,this),r=t.get("format",e,this);return n&&r.length>n?r.substring(0,n)+"\u2026":r},toFormattedHref(t){return t.get("formatHref",this.toHref(t.get("defaultProtocol")),this)},startIndex(){return this.tk[0].s},endIndex(){return this.tk[this.tk.length-1].e},toObject(t){return void 0===t&&(t=U.defaultProtocol),{type:this.t,value:this.toString(),isLink:this.isLink,href:this.toHref(t),start:this.startIndex(),end:this.endIndex()}},toFormattedObject(t){return{type:this.t,value:this.toFormattedString(t),isLink:this.isLink,href:this.toFormattedHref(t),start:this.startIndex(),end:this.endIndex()}},validate(t){return t.get("validate",this.toString(),this)},render(t){const e=this,n=this.toHref(t.get("defaultProtocol")),r=t.get("formatHref",n,this),s=t.get("tagName",n,e),i=this.toFormattedString(t),o={},a=t.get("className",n,e),l=t.get("target",n,e),c=t.get("rel",n,e),u=t.getObj("attributes",n,e),d=t.getObj("events",n,e);return o.href=r,a&&(o.class=a),l&&(o.target=l),c&&(o.rel=c),u&&x(o,u),{tagName:s,attributes:o,content:i,eventListeners:d}}};const le=W("email",{isLink:!0,toHref(){return"mailto:"+this.toString()}}),ce=W("text"),Ue=W("nl"),J=W("url",{isLink:!0,toHref(t){return void 0===t&&(t=U.defaultProtocol),this.hasProtocol()?this.v:`${t}://${this.v}`},hasProtocol(){const t=this.tk;return t.length>=2&&t[0].t!==F&&t[1].t===I}}),k=t=>new y(t);function Me(t){let{groups:e}=t;const n=e.domain.concat([ft,mt,N,Et,pt,yt,Tt,kt,R,Wt,Lt,At,Rt,St,S,bt,_,Ot]),s=[gt,I,$t,A,Qt,Ct,qt,Yt,st,it,K,z,tt,Z,et,nt,ot,rt,at,lt,ct,ut,dt,ht],i=[ft,gt,mt,Et,pt,yt,Tt,kt,R,K,z,Lt,At,Rt,St,Ct,S,bt,_,Ot],o=k(),a=r(o,_);d(a,i,a),d(a,e.domain,a);const l=k(),c=k(),u=k();d(o,e.domain,l),d(o,e.scheme,c),d(o,e.slashscheme,u),d(l,i,a),d(l,e.domain,l);const g=r(l,N);r(a,N,g),r(c,N,g),r(u,N,g);const h=r(a,A);d(h,i,a),d(h,e.domain,a);const m=k();d(g,e.domain,m),d(m,e.domain,m);const p=r(m,A);d(p,e.domain,m);const f=k(le);d(p,e.tld,f),d(p,e.utld,f),r(g,F,f);const y=r(m,R);d(y,e.domain,m),d(f,e.domain,m),r(f,A,p),r(f,R,y);const E=r(f,I);d(E,e.numeric,le);const b=r(l,R),T=r(l,A);d(b,e.domain,l),d(T,i,a),d(T,e.domain,l);const v=k(J);d(T,e.tld,v),d(T,e.utld,v),d(v,e.domain,l),d(v,i,a),r(v,A,T),r(v,R,b),r(v,N,g);const L=r(v,I),C=k(J);d(L,e.numeric,C);const O=k(J),j=k();d(O,n,O),d(O,s,j),d(j,n,O),d(j,s,j),r(v,S,O),r(C,S,O);const x=r(c,I),w=r(u,I),H=r(w,S),P=r(H,S);d(c,e.domain,l),r(c,A,T),r(c,R,b),d(u,e.domain,l),r(u,A,T),r(u,R,b),d(x,e.domain,O),r(x,S,O),d(P,e.domain,O),d(P,n,O),r(P,S,O);const D=[[K,z],[Z,tt],[et,nt],[st,it],[ot,rt],[at,lt],[ct,ut],[dt,ht]];for(let R=0;R=0&&g++,s++,u++;if(g<0)s-=u,s0&&(i.push(Dt(ce,e,o)),o=[]),s-=g,u-=g;const t=d.t,r=n.slice(s-u,s);i.push(Dt(t,e,r))}}return o.length>0&&i.push(Dt(ce,e,o)),i}function Dt(t,e,n){const r=n[0].s,s=n[n.length-1].e;return new t(e.slice(r,s),n)}const ue=typeof console<"u"&&console&&console.warn||(()=>{}),Ke="until manual call of linkify.init(). Register all schemes and plugins before invoking linkify the first time.",m={scanner:null,parser:null,tokenQueue:[],pluginQueue:[],customSchemes:[],initialized:!1};function ze(t,e){if("function"!=typeof e)throw new Error(`linkifyjs: Invalid plugin ${e} (expects function)`);for(let n=0;n{"string"==typeof t?r.push.apply(r,$e(t,e,n)):O.isValidElement(t)?"string"==typeof t.type&&e.ignoreTags.indexOf(t.type.toUpperCase())>=0?r.push(t):r.push(ye(t,e,n)):r.push(t)}));const s="__linkify-el-"+n.elementId++,i=Ee.assign({key:s},t.props);return O.cloneElement(t,i,r)}ze("mention",Ge);const Qe=t=>{let e=0;const n={key:"__linkify-wrapper"};for(const o in t)"options"!==o&&"as"!==o&&"tagName"!==o&&"children"!==o&&(n[o]=t[o]);const r=new Nt(t.options,(t=>{let{tagName:n,attributes:r,content:s}=t;return r.key="__linkify-lnk-"+e++,r.class&&(r.className=r.class,delete r.class),O.createElement(n,r,s)})),s=t.as||t.tagName||O.Fragment||"span",i=t.children;return ye(O.createElement(s,n,i),r,{elementId:0})},de=t=>{const{theme:e}=Ce(),n=ee(Re)` color: ${e.colors.grey}!important; text-decoration: underline; `,r=ee(Se)` diff --git a/storybook-static/assets/LinkifyText.stories-CRNr229Y.js b/storybook-static/assets/LinkifyText.stories-CfdNABsH.js similarity index 87% rename from storybook-static/assets/LinkifyText.stories-CRNr229Y.js rename to storybook-static/assets/LinkifyText.stories-CfdNABsH.js index 4041f9645b..6cfc282c47 100644 --- a/storybook-static/assets/LinkifyText.stories-CRNr229Y.js +++ b/storybook-static/assets/LinkifyText.stories-CfdNABsH.js @@ -1 +1 @@ -import{j as t}from"./jsx-runtime-CexXSJP5.js";import{L as i}from"./LinkifyText-CTcW0PSE.js";import"./index-BP8_t0zE.js";import"./emotion-styled.browser.esm-Dz2BNYeh.js";import"./extends-CF3RwP-h.js";import"./parseProps-780b287c.browser.esm-DiCerVr_.js";import"./emotion-use-insertion-effect-with-fallbacks.browser.esm-UWD3gXM2.js";import"./ExternalLink-CHmx7fZ7.js";import"./theme-ui-components.esm-DCiJ1mMX.js";import"./theme-ui-core-jsx-runtime.browser.esm-CH0qhC10.js";import"./hoist-non-react-statics.cjs-CQI8syxn.js";import"./InternalLink-CtyTe3gy.js";import"./components-CutHIkdx.js";import"./index-BBRV8eG_.js";import"./index-BXxqJQdV.js";import"./theme-ui-core.browser.esm-CIov4Ln1.js";import"./emotion-react.browser.esm-BYoRxRk_.js";import"./cjs-Clfm10Kj.js";const A={title:"Components/LinkifyText",component:i},e=()=>t.jsx(i,{children:"There are some link.info hidden in this text. https://example.com if you can spot all of them."}),o=()=>t.jsxs(i,{children:["In addition to a URLs, it is also possible to @mention somone. Although there are edge cases where using @\u2060a-mention should ",t.jsx("b",{children:"not"})," be a link."]});var s,r,n,a,m,p;e.parameters={...e.parameters,docs:{...null==(s=e.parameters)?void 0:s.docs,source:{originalSource:"() => \n There are some link.info hidden in this text. https://example.com if you can\n spot all of them.\n ",...null==(n=null==(r=e.parameters)?void 0:r.docs)?void 0:n.source}}},o.parameters={...o.parameters,docs:{...null==(a=o.parameters)?void 0:a.docs,source:{originalSource:"() => \n In addition to a URLs, it is also possible to @mention somone. Although\n there are edge cases where using @⁠a-mention should not be a\n link.\n ",...null==(p=null==(m=o.parameters)?void 0:m.docs)?void 0:p.source}}};const D=["Default","SupportsMentions"];export{e as Default,o as SupportsMentions,D as __namedExportsOrder,A as default}; \ No newline at end of file +import{j as t}from"./jsx-runtime-CexXSJP5.js";import{L as i}from"./LinkifyText-MsKPRXsf.js";import"./index-BP8_t0zE.js";import"./emotion-styled.browser.esm-Dz2BNYeh.js";import"./extends-CF3RwP-h.js";import"./parseProps-780b287c.browser.esm-DiCerVr_.js";import"./emotion-use-insertion-effect-with-fallbacks.browser.esm-UWD3gXM2.js";import"./ExternalLink-DC09teyd.js";import"./theme-ui-components.esm-BngKL4Rx.js";import"./theme-ui-core-jsx-runtime.browser.esm-CH0qhC10.js";import"./hoist-non-react-statics.cjs-CQI8syxn.js";import"./InternalLink-BRM7MvOa.js";import"./components-CutHIkdx.js";import"./index-BBRV8eG_.js";import"./index-BXxqJQdV.js";import"./theme-ui-core.browser.esm-CIov4Ln1.js";import"./emotion-react.browser.esm-BYoRxRk_.js";import"./cjs-Clfm10Kj.js";const A={title:"Components/LinkifyText",component:i},e=()=>t.jsx(i,{children:"There are some link.info hidden in this text. https://example.com if you can spot all of them."}),o=()=>t.jsxs(i,{children:["In addition to a URLs, it is also possible to @mention somone. Although there are edge cases where using @\u2060a-mention should ",t.jsx("b",{children:"not"})," be a link."]});var s,r,n,a,m,p;e.parameters={...e.parameters,docs:{...null==(s=e.parameters)?void 0:s.docs,source:{originalSource:"() => \n There are some link.info hidden in this text. https://example.com if you can\n spot all of them.\n ",...null==(n=null==(r=e.parameters)?void 0:r.docs)?void 0:n.source}}},o.parameters={...o.parameters,docs:{...null==(a=o.parameters)?void 0:a.docs,source:{originalSource:"() => \n In addition to a URLs, it is also possible to @mention somone. Although\n there are edge cases where using @⁠a-mention should not be a\n link.\n ",...null==(p=null==(m=o.parameters)?void 0:m.docs)?void 0:p.source}}};const D=["Default","SupportsMentions"];export{e as Default,o as SupportsMentions,D as __namedExportsOrder,A as default}; \ No newline at end of file diff --git a/storybook-static/assets/Loader-DmqUoSY8.js b/storybook-static/assets/Loader-BiCtIOH2.js similarity index 95% rename from storybook-static/assets/Loader-DmqUoSY8.js rename to storybook-static/assets/Loader-BiCtIOH2.js index 62c4c78ca0..58744497da 100644 --- a/storybook-static/assets/Loader-DmqUoSY8.js +++ b/storybook-static/assets/Loader-BiCtIOH2.js @@ -1,4 +1,4 @@ -import{j as e}from"./jsx-runtime-CexXSJP5.js";import{k as s}from"./emotion-react.browser.esm-BYoRxRk_.js";import{n}from"./emotion-styled.browser.esm-Dz2BNYeh.js";import{u as i}from"./theme-ui-core.browser.esm-CIov4Ln1.js";import{I as l,F as d,T as m}from"./theme-ui-components.esm-DCiJ1mMX.js";const c=s` +import{j as e}from"./jsx-runtime-CexXSJP5.js";import{k as s}from"./emotion-react.browser.esm-BYoRxRk_.js";import{n}from"./emotion-styled.browser.esm-Dz2BNYeh.js";import{u as i}from"./theme-ui-core.browser.esm-CIov4Ln1.js";import{I as l,F as d,T as m}from"./theme-ui-components.esm-BngKL4Rx.js";const c=s` from { transform: rotate(0deg); } diff --git a/storybook-static/assets/Loader.stories-MBzLYqWO.js b/storybook-static/assets/Loader.stories-DjlfiQSg.js similarity index 89% rename from storybook-static/assets/Loader.stories-MBzLYqWO.js rename to storybook-static/assets/Loader.stories-DjlfiQSg.js index 7904649da0..e0ff853c42 100644 --- a/storybook-static/assets/Loader.stories-MBzLYqWO.js +++ b/storybook-static/assets/Loader.stories-DjlfiQSg.js @@ -1 +1 @@ -import{j as c}from"./jsx-runtime-CexXSJP5.js";import{L as e}from"./Loader-DmqUoSY8.js";import"./index-BP8_t0zE.js";import"./emotion-react.browser.esm-BYoRxRk_.js";import"./parseProps-780b287c.browser.esm-DiCerVr_.js";import"./emotion-use-insertion-effect-with-fallbacks.browser.esm-UWD3gXM2.js";import"./hoist-non-react-statics.cjs-CQI8syxn.js";import"./emotion-styled.browser.esm-Dz2BNYeh.js";import"./extends-CF3RwP-h.js";import"./theme-ui-core.browser.esm-CIov4Ln1.js";import"./cjs-Clfm10Kj.js";import"./theme-ui-components.esm-DCiJ1mMX.js";import"./theme-ui-core-jsx-runtime.browser.esm-CH0qhC10.js";const b={title:"Layout/Loader",component:e},r=()=>c.jsx(e,{}),o=()=>c.jsx(e,{label:"Whatever you want to say! OMG!"});var t,a,s,m,p,i;r.parameters={...r.parameters,docs:{...null==(t=r.parameters)?void 0:t.docs,source:{originalSource:"() => ",...null==(s=null==(a=r.parameters)?void 0:a.docs)?void 0:s.source}}},o.parameters={...o.parameters,docs:{...null==(m=o.parameters)?void 0:m.docs,source:{originalSource:'() => ',...null==(i=null==(p=o.parameters)?void 0:p.docs)?void 0:i.source}}};const h=["Default","CustomMessage"];export{o as CustomMessage,r as Default,h as __namedExportsOrder,b as default}; \ No newline at end of file +import{j as c}from"./jsx-runtime-CexXSJP5.js";import{L as e}from"./Loader-BiCtIOH2.js";import"./index-BP8_t0zE.js";import"./emotion-react.browser.esm-BYoRxRk_.js";import"./parseProps-780b287c.browser.esm-DiCerVr_.js";import"./emotion-use-insertion-effect-with-fallbacks.browser.esm-UWD3gXM2.js";import"./hoist-non-react-statics.cjs-CQI8syxn.js";import"./emotion-styled.browser.esm-Dz2BNYeh.js";import"./extends-CF3RwP-h.js";import"./theme-ui-core.browser.esm-CIov4Ln1.js";import"./cjs-Clfm10Kj.js";import"./theme-ui-components.esm-BngKL4Rx.js";import"./theme-ui-core-jsx-runtime.browser.esm-CH0qhC10.js";const b={title:"Layout/Loader",component:e},r=()=>c.jsx(e,{}),o=()=>c.jsx(e,{label:"Whatever you want to say! OMG!"});var t,a,s,m,p,i;r.parameters={...r.parameters,docs:{...null==(t=r.parameters)?void 0:t.docs,source:{originalSource:"() => ",...null==(s=null==(a=r.parameters)?void 0:a.docs)?void 0:s.source}}},o.parameters={...o.parameters,docs:{...null==(m=o.parameters)?void 0:m.docs,source:{originalSource:'() => ',...null==(i=null==(p=o.parameters)?void 0:p.docs)?void 0:i.source}}};const h=["Default","CustomMessage"];export{o as CustomMessage,r as Default,h as __namedExportsOrder,b as default}; \ No newline at end of file diff --git a/storybook-static/assets/MapFilterList-CT7nPuhI.js b/storybook-static/assets/MapFilterList-CT7nPuhI.js deleted file mode 100644 index b22df4b1aa..0000000000 --- a/storybook-static/assets/MapFilterList-CT7nPuhI.js +++ /dev/null @@ -1 +0,0 @@ -import{j as e}from"./jsx-runtime-CexXSJP5.js";import{B as C}from"./Button-B7QBvkxh.js";import{B as F}from"./ButtonIcon-BjD0tDRb.js";import{M as _}from"./MemberBadge-BFCUvfGJ.js";import{C as v}from"./CardButton-QQF3n4Pb.js";import{F as a,H as j,T as c}from"./theme-ui-components.esm-DCiJ1mMX.js";const d=i=>{const{active:t,onClick:l,children:a,filterType:r,sx:n}=i;return e.jsx(v,{"data-cy":`MapFilterListItem-${r}${t?"-active":""}`,onClick:l,extrastyles:{display:"flex",maxWidth:["100%","49%"],width:"500px",flexDirection:"row",backgroundColor:"offWhite",padding:1,alignItems:"center",gap:2,...t?{borderColor:"green",":hover":{borderColor:"green"}}:{borderColor:"offWhite",":hover":{borderColor:"offWhite"}},...n},children:a})};try{d.displayName="MapFilterListItem",d.__docgenInfo={description:"",displayName:"MapFilterListItem",props:{active:{defaultValue:null,description:"",name:"active",required:!0,type:{name:"boolean"}},onClick:{defaultValue:null,description:"",name:"onClick",required:!0,type:{name:"() => void"}},filterType:{defaultValue:null,description:"",name:"filterType",required:!0,type:{name:"string"}},sx:{defaultValue:null,description:"",name:"sx",required:!1,type:{name:"ThemeUIStyleObject"}}}}}catch{}const u=({children:i})=>e.jsx(a,{as:"ul","data-cy":"MapFilterList",sx:{listStyle:"none",flexWrap:"wrap",gap:2,flexDirection:"row",padding:0},children:i});try{u.displayName="MapFilterListWrapper",u.__docgenInfo={description:"",displayName:"MapFilterListWrapper",props:{}}}catch{}const g=i=>{const{activeFilters:t,availableFilters:l,onClose:r,onFilterChange:n,pinCount:o}=i,s=l.filter((({filterType:e})=>"profileType"===e)),p=l.filter((({filterType:e})=>"profileTag"===e)),m=e=>!!t.find((i=>i.label===e)),f=`Show ${o} result${1===o?"":"s"}`;return e.jsxs(a,{"data-cy":"MapFilterList",sx:{flexDirection:"column",position:"relative",gap:4},children:[e.jsxs(a,{sx:{alignItems:"center",gap:2,justifyContent:"space-between"},children:[e.jsx(j,{as:"h3",variant:"small",children:"So what are you looking for?"}),e.jsx(F,{"data-cy":"MapFilterList-CloseButton",icon:"close",onClick:()=>r(),sx:{paddingRight:3,paddingLeft:2,border:"none"}})]}),s.length>0&&e.jsxs(a,{sx:{gap:1,flexDirection:"column"},children:[e.jsx(c,{children:"Profiles:"}),e.jsx(u,{children:s.map(((i,t)=>e.jsxs(d,{active:m(i.label),onClick:()=>n(i),filterType:"profile",children:[e.jsx(_,{size:30,profileType:i._id}),e.jsx(c,{variant:"quiet",sx:{fontSize:1},children:i.label})]},t)))})]}),p.length>0&&e.jsxs(a,{sx:{gap:1,flexDirection:"column"},children:[e.jsx(c,{children:"Activities:"}),e.jsx(u,{children:p.map(((i,t)=>e.jsx(d,{active:m(i.label),onClick:()=>n(i),sx:{maxWidth:"auto",width:"auto"},filterType:"tag",children:e.jsx(c,{variant:"quiet",sx:{fontSize:1},children:i.label})},t)))})]}),e.jsx(C,{"data-cy":"MapFilterList-ShowResultsButton",icon:"sliders",onClick:()=>r(),sx:{alignSelf:"flex-start"},children:f})]})};try{g.displayName="MapFilterList",g.__docgenInfo={description:"",displayName:"MapFilterList",props:{activeFilters:{defaultValue:null,description:"",name:"activeFilters",required:!0,type:{name:"MapFilterOptionsList"}},availableFilters:{defaultValue:null,description:"",name:"availableFilters",required:!0,type:{name:"MapFilterOptionsList"}},onClose:{defaultValue:null,description:"",name:"onClose",required:!0,type:{name:"() => void"}},onFilterChange:{defaultValue:null,description:"",name:"onFilterChange",required:!0,type:{name:"(filter: MapFilterOption) => void"}},pinCount:{defaultValue:null,description:"",name:"pinCount",required:!0,type:{name:"number"}}}}}catch{}export{g as M}; \ No newline at end of file diff --git a/storybook-static/assets/MapFilterList-Y-6ElEro.js b/storybook-static/assets/MapFilterList-Y-6ElEro.js new file mode 100644 index 0000000000..f8b5036d55 --- /dev/null +++ b/storybook-static/assets/MapFilterList-Y-6ElEro.js @@ -0,0 +1 @@ +import{j as e}from"./jsx-runtime-CexXSJP5.js";import{B as j}from"./Button-D4nxT_g_.js";import{B as C}from"./ButtonIcon-2rTJWwwt.js";import{M as _}from"./MemberBadge-DSOx4fo1.js";import{U as v}from"./UserBadge-XI2JdGOl.js";import{C as F}from"./CardButton-Nj67FTo7.js";import{F as r,H as M,T as s,h as L,i as k}from"./theme-ui-components.esm-BngKL4Rx.js";const x=i=>{const{active:t,onClick:l,children:r,filterType:a,sx:n}=i;return e.jsx(F,{"data-cy":`MapFilterListItem-${a}${t?"-active":""}`,onClick:l,extrastyles:{display:"flex",maxWidth:["100%","49%"],width:"500px",flexDirection:"row",backgroundColor:"offWhite",padding:1,alignItems:"center",gap:2,...t?{borderColor:"green",":hover":{borderColor:"green"}}:{borderColor:"offWhite",":hover":{borderColor:"offWhite"}},...n},children:r})};try{x.displayName="MapFilterListItem",x.__docgenInfo={description:"",displayName:"MapFilterListItem",props:{active:{defaultValue:null,description:"",name:"active",required:!0,type:{name:"boolean"}},onClick:{defaultValue:null,description:"",name:"onClick",required:!0,type:{name:"() => void"}},filterType:{defaultValue:null,description:"",name:"filterType",required:!0,type:{name:"string"}},sx:{defaultValue:null,description:"",name:"sx",required:!1,type:{name:"ThemeUIStyleObject"}}}}}catch{}const d=({children:i})=>e.jsx(r,{as:"ul","data-cy":"MapFilterList",sx:{listStyle:"none",flexWrap:"wrap",gap:2,flexDirection:"row",padding:0},children:i});try{d.displayName="MapFilterListWrapper",d.__docgenInfo={description:"",displayName:"MapFilterListWrapper",props:{}}}catch{}const y=i=>{const{activeFilters:t,availableFilters:l,onClose:a,onFilterChange:n,pinCount:o}=i,p=l.filter((({filterType:e})=>"badge"===e)),c=l.filter((({filterType:e})=>"profileType"===e)),u=l.filter((({filterType:e})=>"profileTag"===e)),m=e=>!!t.find((i=>i.label===e)),f=`Show ${o} result${1===o?"":"s"}`;return e.jsxs(r,{"data-cy":"MapFilterList",sx:{flexDirection:"column",maxHeight:"100%",overflow:"auto",position:"relative"},children:[e.jsxs(r,{sx:{alignItems:"center",borderBottom:"1px solid",gap:2,justifyContent:"space-between",padding:2},children:[e.jsx(M,{as:"h3",variant:"small",children:"So what are you looking for?"}),e.jsx(C,{"data-cy":"MapFilterList-CloseButton",icon:"close",onClick:()=>a(),sx:{border:"none",paddingLeft:2,paddingRight:3}})]}),e.jsxs(r,{sx:{flexDirection:"column",flex:"auto",gap:2,overflow:"scroll",padding:2},children:[c.length>0&&e.jsxs(r,{sx:{gap:1,flexDirection:"column"},children:[e.jsx(s,{children:"Profiles"}),e.jsx(d,{children:c.map(((i,t)=>e.jsxs(x,{active:m(i.label),onClick:()=>n(i),filterType:"profile",children:[e.jsx(_,{size:30,profileType:i._id}),e.jsx(s,{variant:"quiet",sx:{fontSize:1},children:i.label})]},t)))})]}),u.length>0&&e.jsxs(r,{sx:{gap:1,flexDirection:"column"},children:[e.jsx(s,{children:"Activities"}),e.jsx(d,{children:u.map(((i,t)=>e.jsx(x,{active:m(i.label),onClick:()=>n(i),sx:{maxWidth:"auto",width:"auto"},filterType:"tag",children:e.jsx(s,{variant:"quiet",sx:{fontSize:1},children:i.label})},t)))})]}),p.length>0&&e.jsxs(r,{sx:{gap:1,flexDirection:"column"},children:[e.jsx(s,{children:"Badges"}),e.jsx(d,{children:p.map(((i,t)=>e.jsxs(L,{sx:{alignItems:"center",gap:0},children:[e.jsx(k,{onClick:()=>n(i),defaultChecked:m(i.label)}),i.label,e.jsx(v,{badgeName:i._id})]},t)))})]})]}),e.jsx(r,{sx:{borderTop:"1px solid",padding:2},children:e.jsx(j,{"data-cy":"MapFilterList-ShowResultsButton",icon:"sliders",onClick:()=>a(),sx:{alignSelf:"flex-start"},children:f})})]})};try{y.displayName="MapFilterList",y.__docgenInfo={description:"",displayName:"MapFilterList",props:{activeFilters:{defaultValue:null,description:"",name:"activeFilters",required:!0,type:{name:"MapFilterOptionsList"}},availableFilters:{defaultValue:null,description:"",name:"availableFilters",required:!0,type:{name:"MapFilterOptionsList"}},onClose:{defaultValue:null,description:"",name:"onClose",required:!0,type:{name:"() => void"}},onFilterChange:{defaultValue:null,description:"",name:"onFilterChange",required:!0,type:{name:"(filter: MapFilterOption) => void"}},pinCount:{defaultValue:null,description:"",name:"pinCount",required:!0,type:{name:"number"}}}}}catch{}export{y as M}; \ No newline at end of file diff --git a/storybook-static/assets/MapFilterList.stories-C15gtO-u.js b/storybook-static/assets/MapFilterList.stories-C15gtO-u.js deleted file mode 100644 index f79b64dbde..0000000000 --- a/storybook-static/assets/MapFilterList.stories-C15gtO-u.js +++ /dev/null @@ -1 +0,0 @@ -import{j as s}from"./jsx-runtime-CexXSJP5.js";import{M as l}from"./MapFilterList-CT7nPuhI.js";import"./index-BP8_t0zE.js";import"./Button-B7QBvkxh.js";import"./Icon-BoVZOGVD.js";import"./emotion-styled.browser.esm-Dz2BNYeh.js";import"./extends-CF3RwP-h.js";import"./parseProps-780b287c.browser.esm-DiCerVr_.js";import"./emotion-use-insertion-effect-with-fallbacks.browser.esm-UWD3gXM2.js";import"./supporter-D7hp958O.js";import"./icon-arrow-down-CJeToCJe.js";import"./icon-star-active-ClN6U5FF.js";import"./theme-ui-core-jsx-runtime.browser.esm-CH0qhC10.js";import"./hoist-non-react-statics.cjs-CQI8syxn.js";import"./theme-ui-components.esm-DCiJ1mMX.js";import"./ButtonIcon-BjD0tDRb.js";import"./MemberBadge-BFCUvfGJ.js";import"./theme-ui-core.browser.esm-CIov4Ln1.js";import"./emotion-react.browser.esm-BYoRxRk_.js";import"./cjs-Clfm10Kj.js";import"./CardButton-QQF3n4Pb.js";const E={title:"Components/MapFilterList",component:l},n=[{_id:"workspace",filterType:"profileType",label:"Workspace"},{_id:"machine-builder",filterType:"profileType",label:"Machine Builder"},{_id:"community-builder",filterType:"profileType",label:"Community Point"},{_id:"collection-point",filterType:"profileType",label:"Collection Point"},{_id:"space",filterType:"profileType",label:"Space"},{_id:"member",filterType:"profileType",label:"Want to get started"},{_id:"shredder",filterType:"workspaceType",label:"Shredder"},{_id:"sheetpress",filterType:"workspaceType",label:"Sheetpress"},{_id:"extrusion",filterType:"workspaceType",label:"Extrusion"},{_id:"injection",filterType:"workspaceType",label:"Injection"},{_id:"mix",filterType:"workspaceType",label:"Mix"},{_id:"tag1",filterType:"profileTag",label:"Tag 1"},{_id:"tag2",filterType:"profileTag",label:"Tag 2"},{_id:"tag3",filterType:"profileTag",label:"Tag 3"}],e=()=>s.jsx(l,{activeFilters:[],availableFilters:n,onFilterChange:()=>{},onClose:()=>{},pinCount:7});var i,t,r;e.parameters={...e.parameters,docs:{...null==(i=e.parameters)?void 0:i.docs,source:{originalSource:"() => {\n const activeFilters = [] as MapFilterOptionsList;\n const onClose = () => {\n null;\n };\n const onFilterChange = () => {\n null;\n };\n return ;\n}",...null==(r=null==(t=e.parameters)?void 0:t.docs)?void 0:r.source}}};const D=["Default"];export{e as Default,D as __namedExportsOrder,E as default}; \ No newline at end of file diff --git a/storybook-static/assets/MapFilterList.stories-Ds2-tDTM.js b/storybook-static/assets/MapFilterList.stories-Ds2-tDTM.js new file mode 100644 index 0000000000..baef87e48d --- /dev/null +++ b/storybook-static/assets/MapFilterList.stories-Ds2-tDTM.js @@ -0,0 +1 @@ +import{j as s}from"./jsx-runtime-CexXSJP5.js";import{M as o}from"./MapFilterList-Y-6ElEro.js";import"./index-BP8_t0zE.js";import"./Button-D4nxT_g_.js";import"./Icon-BoVZOGVD.js";import"./emotion-styled.browser.esm-Dz2BNYeh.js";import"./extends-CF3RwP-h.js";import"./parseProps-780b287c.browser.esm-DiCerVr_.js";import"./emotion-use-insertion-effect-with-fallbacks.browser.esm-UWD3gXM2.js";import"./supporter-D7hp958O.js";import"./icon-arrow-down-CJeToCJe.js";import"./icon-star-active-ClN6U5FF.js";import"./theme-ui-core-jsx-runtime.browser.esm-CH0qhC10.js";import"./hoist-non-react-statics.cjs-CQI8syxn.js";import"./theme-ui-components.esm-BngKL4Rx.js";import"./ButtonIcon-2rTJWwwt.js";import"./MemberBadge-DSOx4fo1.js";import"./theme-ui-core.browser.esm-CIov4Ln1.js";import"./emotion-react.browser.esm-BYoRxRk_.js";import"./cjs-Clfm10Kj.js";import"./UserBadge-XI2JdGOl.js";import"./CardButton-Nj67FTo7.js";const D={title:"Components/MapFilterList",component:o},n=[{_id:"workspace",filterType:"profileType",label:"Workspace"},{_id:"machine-builder",filterType:"profileType",label:"Machine Builder"},{_id:"community-builder",filterType:"profileType",label:"Community Point"},{_id:"collection-point",filterType:"profileType",label:"Collection Point"},{_id:"space",filterType:"profileType",label:"Space"},{_id:"member",filterType:"profileType",label:"Want to get started"},{_id:"shredder",filterType:"workspaceType",label:"Shredder"},{_id:"sheetpress",filterType:"workspaceType",label:"Sheetpress"},{_id:"extrusion",filterType:"workspaceType",label:"Extrusion"},{_id:"injection",filterType:"workspaceType",label:"Injection"},{_id:"mix",filterType:"workspaceType",label:"Mix"},{_id:"tag1",filterType:"profileTag",label:"Tag 1"},{_id:"tag2",filterType:"profileTag",label:"Tag 2"},{_id:"tag3",filterType:"profileTag",label:"Tag 3"}],e=()=>s.jsx(o,{activeFilters:[],availableFilters:n,onFilterChange:()=>{},onClose:()=>{},pinCount:7});var i,t,r;e.parameters={...e.parameters,docs:{...null==(i=e.parameters)?void 0:i.docs,source:{originalSource:"() => {\n const activeFilters = [] as MapFilterOptionsList;\n const onClose = () => {\n null;\n };\n const onFilterChange = () => {\n null;\n };\n return ;\n}",...null==(r=null==(t=e.parameters)?void 0:t.docs)?void 0:r.source}}};const O=["Default"];export{e as Default,O as __namedExportsOrder,D as default}; \ No newline at end of file diff --git a/storybook-static/assets/MapFilterProfileTypeCardList-B_N3XKVv.js b/storybook-static/assets/MapFilterProfileTypeCardList-B9GpaZp7.js similarity index 89% rename from storybook-static/assets/MapFilterProfileTypeCardList-B_N3XKVv.js rename to storybook-static/assets/MapFilterProfileTypeCardList-B9GpaZp7.js index 5ba5f63091..2745d6817c 100644 --- a/storybook-static/assets/MapFilterProfileTypeCardList-B_N3XKVv.js +++ b/storybook-static/assets/MapFilterProfileTypeCardList-B9GpaZp7.js @@ -1 +1 @@ -import{j as t}from"./jsx-runtime-CexXSJP5.js";import{r as i}from"./index-BP8_t0zE.js";import{B as m}from"./ButtonIcon-BjD0tDRb.js";import{C as L}from"./CardButton-QQF3n4Pb.js";import{M as T}from"./MemberBadge-BFCUvfGJ.js";import{F as s,T as w}from"./theme-ui-components.esm-DCiJ1mMX.js";const g=e=>{const r=i.useRef(null),[l,o]=i.useState(!0),[a,n]=i.useState(!1),{activeFilters:d,availableFilters:p,onFilterChange:c}=e,f=p.filter((({filterType:e})=>"profileType"===e)),h=e=>{const t=r.current;let i=0;const l=setInterval((()=>{if(t){t.scrollLeft+=e,i+=Math.abs(e),i>=121&&clearInterval(l);const{scrollLeft:r,scrollWidth:a,clientWidth:s}=t;switch(r+s){case s:o(!0);break;case a:n(!0);break;default:o(!1),n(!1)}}}),10)};return i.useEffect((()=>{h(0)}),[]),!p||p.length<2?null:t.jsxs(s,{sx:{flexDirection:"column",position:"relative"},children:[t.jsx(s,{as:"ul","data-cy":"MapFilterProfileTypeCardList",ref:r,sx:{listStyle:"none",flexWrap:"nowrap",overflow:"hidden",paddingY:2,paddingX:4,gap:2,zIndex:1,top:"-80px",height:"auto"},children:f.map(((e,i)=>{const r=d.find((t=>t.label===e.label));return t.jsxs(L,{as:"li","data-cy":"MapListFilter"+(r?"-active":""),onClick:()=>c(e),extrastyles:{backgroundColor:"offWhite",padding:1,textAlign:"center",width:"130px",minWidth:"130px",height:"75px",flexDirection:"column",...r?{borderColor:"green",":hover":{borderColor:"green"}}:{borderColor:"offWhite",":hover":{borderColor:"offWhite"}}},children:[t.jsx(T,{size:30,profileType:e._id}),t.jsx("br",{}),t.jsx(w,{variant:"quiet",sx:{fontSize:1},children:e.label})]},i)}))}),f.length>3&&t.jsxs(s,{sx:{justifyContent:"space-between",zIndex:2,paddingX:2,position:"relative",top:"-62px",height:0},children:[t.jsx(m,{onClick:()=>h(-10),icon:"chevron-left",disabled:l,sx:{height:"28px",borderColor:"grey"}}),t.jsx(m,{"data-cy":"MapFilterProfileTypeCardList-ButtonRight",onClick:()=>h(10),icon:"chevron-right",disabled:a,sx:{height:"28px",borderColor:"grey"}})]})]})};try{g.displayName="MapFilterProfileTypeCardList",g.__docgenInfo={description:"",displayName:"MapFilterProfileTypeCardList",props:{activeFilters:{defaultValue:null,description:"",name:"activeFilters",required:!0,type:{name:"MapFilterOptionsList"}},availableFilters:{defaultValue:null,description:"",name:"availableFilters",required:!0,type:{name:"MapFilterOptionsList"}},onFilterChange:{defaultValue:null,description:"",name:"onFilterChange",required:!0,type:{name:"(filter: MapFilterOption) => void"}}}}}catch{}export{g as M}; \ No newline at end of file +import{j as t}from"./jsx-runtime-CexXSJP5.js";import{r as i}from"./index-BP8_t0zE.js";import{B as m}from"./ButtonIcon-2rTJWwwt.js";import{C as L}from"./CardButton-Nj67FTo7.js";import{M as T}from"./MemberBadge-DSOx4fo1.js";import{F as s,T as w}from"./theme-ui-components.esm-BngKL4Rx.js";const g=e=>{const r=i.useRef(null),[l,o]=i.useState(!0),[a,n]=i.useState(!1),{activeFilters:d,availableFilters:p,onFilterChange:c}=e,f=p.filter((({filterType:e})=>"profileType"===e)),h=e=>{const t=r.current;let i=0;const l=setInterval((()=>{if(t){t.scrollLeft+=e,i+=Math.abs(e),i>=121&&clearInterval(l);const{scrollLeft:r,scrollWidth:a,clientWidth:s}=t;switch(r+s){case s:o(!0);break;case a:n(!0);break;default:o(!1),n(!1)}}}),10)};return i.useEffect((()=>{h(0)}),[]),!p||p.length<2?null:t.jsxs(s,{sx:{flexDirection:"column",position:"relative"},children:[t.jsx(s,{as:"ul","data-cy":"MapFilterProfileTypeCardList",ref:r,sx:{listStyle:"none",flexWrap:"nowrap",overflow:"hidden",paddingY:2,paddingX:4,gap:2,zIndex:1,top:"-80px",height:"auto"},children:f.map(((e,i)=>{const r=d.find((t=>t.label===e.label));return t.jsxs(L,{as:"li","data-cy":"MapListFilter"+(r?"-active":""),onClick:()=>c(e),extrastyles:{backgroundColor:"offWhite",padding:1,textAlign:"center",width:"130px",minWidth:"130px",height:"75px",flexDirection:"column",...r?{borderColor:"green",":hover":{borderColor:"green"}}:{borderColor:"offWhite",":hover":{borderColor:"offWhite"}}},children:[t.jsx(T,{size:30,profileType:e._id}),t.jsx("br",{}),t.jsx(w,{variant:"quiet",sx:{fontSize:1},children:e.label})]},i)}))}),f.length>3&&t.jsxs(s,{sx:{justifyContent:"space-between",zIndex:2,paddingX:2,position:"relative",top:"-62px",height:0},children:[t.jsx(m,{onClick:()=>h(-10),icon:"chevron-left",disabled:l,sx:{height:"28px",borderColor:"grey"}}),t.jsx(m,{"data-cy":"MapFilterProfileTypeCardList-ButtonRight",onClick:()=>h(10),icon:"chevron-right",disabled:a,sx:{height:"28px",borderColor:"grey"}})]})]})};try{g.displayName="MapFilterProfileTypeCardList",g.__docgenInfo={description:"",displayName:"MapFilterProfileTypeCardList",props:{activeFilters:{defaultValue:null,description:"",name:"activeFilters",required:!0,type:{name:"MapFilterOptionsList"}},availableFilters:{defaultValue:null,description:"",name:"availableFilters",required:!0,type:{name:"MapFilterOptionsList"}},onFilterChange:{defaultValue:null,description:"",name:"onFilterChange",required:!0,type:{name:"(filter: MapFilterOption) => void"}}}}}catch{}export{g as M}; \ No newline at end of file diff --git a/storybook-static/assets/MapFilterProfileTypeCardList.stories-CfF2a961.js b/storybook-static/assets/MapFilterProfileTypeCardList.stories-BshA6Hdk.js similarity index 95% rename from storybook-static/assets/MapFilterProfileTypeCardList.stories-CfF2a961.js rename to storybook-static/assets/MapFilterProfileTypeCardList.stories-BshA6Hdk.js index b4e37c3fee..de5334603f 100644 --- a/storybook-static/assets/MapFilterProfileTypeCardList.stories-CfF2a961.js +++ b/storybook-static/assets/MapFilterProfileTypeCardList.stories-BshA6Hdk.js @@ -1 +1 @@ -import{j as n}from"./jsx-runtime-CexXSJP5.js";import{r as d}from"./index-BP8_t0zE.js";import{M as F}from"./MapFilterProfileTypeCardList-B_N3XKVv.js";import"./ButtonIcon-BjD0tDRb.js";import"./Icon-BoVZOGVD.js";import"./emotion-styled.browser.esm-Dz2BNYeh.js";import"./extends-CF3RwP-h.js";import"./parseProps-780b287c.browser.esm-DiCerVr_.js";import"./emotion-use-insertion-effect-with-fallbacks.browser.esm-UWD3gXM2.js";import"./supporter-D7hp958O.js";import"./icon-arrow-down-CJeToCJe.js";import"./icon-star-active-ClN6U5FF.js";import"./theme-ui-core-jsx-runtime.browser.esm-CH0qhC10.js";import"./hoist-non-react-statics.cjs-CQI8syxn.js";import"./theme-ui-components.esm-DCiJ1mMX.js";import"./CardButton-QQF3n4Pb.js";import"./MemberBadge-BFCUvfGJ.js";import"./theme-ui-core.browser.esm-CIov4Ln1.js";import"./emotion-react.browser.esm-BYoRxRk_.js";import"./cjs-Clfm10Kj.js";const H={title:"Map/FilterList",component:F},r=[{label:"Workspace",_id:"workspace",filterType:"ProfileType"},{label:"Machine Builder",_id:"machine-builder",filterType:"ProfileType"},{label:"Collection Point",_id:"collection-point",filterType:"ProfileType"},{label:"Want to get started",_id:"member",filterType:"ProfileType"}],a=()=>{const[e,i]=d.useState([]);return n.jsx("div",{style:{maxWidth:"500px"},children:n.jsx(F,{activeFilters:e,availableFilters:r,onFilterChange:e=>r.find((i=>i._id==e._id))?i((i=>i.filter((i=>i!==e)))):i((i=>[...i,e]))})})},p=()=>{const[e,i]=d.useState([]);return n.jsxs("div",{style:{maxWidth:"500px"},children:[n.jsx(F,{activeFilters:e,availableFilters:[r[0]],onFilterChange:e=>r.find((i=>i._id==e._id))?i((i=>i.filter((i=>i!==e)))):i((i=>[...i,e]))}),"(Shouldn't see anything, only renders for two or more)"]})},c=()=>{const[e,i]=d.useState([]);return n.jsxs("div",{style:{maxWidth:"500px"},children:[n.jsx(F,{activeFilters:e,availableFilters:[r[0],r[1]],onFilterChange:e=>r.find((i=>i._id==e._id))?i((i=>i.filter((i=>i!==e)))):i((i=>[...i,e]))}),"(No buttons rendered)"]})};var v,f,u,x,g,h,y,O,P;a.parameters={...a.parameters,docs:{...null==(v=a.parameters)?void 0:v.docs,source:{originalSource:"() => {\n const [activeFilters, setActiveFilters] = useState([]);\n const onFilterChange = (option: MapFilterOption) => {\n const isFilterPresent = !!availableFilters.find(pinFilter => pinFilter._id == option._id);\n if (isFilterPresent) {\n return setActiveFilters(filter => filter.filter(existingOption => existingOption !== option));\n }\n return setActiveFilters(existingOptions => [...existingOptions, option]);\n };\n return
\n \n
;\n}",...null==(u=null==(f=a.parameters)?void 0:f.docs)?void 0:u.source}}},p.parameters={...p.parameters,docs:{...null==(x=p.parameters)?void 0:x.docs,source:{originalSource:"() => {\n const [activeFilters, setActiveFilters] = useState([]);\n const onFilterChange = (option: MapFilterOption) => {\n const isFilterPresent = !!availableFilters.find(pinFilter => pinFilter._id == option._id);\n if (isFilterPresent) {\n return setActiveFilters(filter => filter.filter(existingOption => existingOption !== option));\n }\n return setActiveFilters(existingOptions => [...existingOptions, option]);\n };\n return
\n \n (Shouldn't see anything, only renders for two or more)\n
;\n}",...null==(h=null==(g=p.parameters)?void 0:g.docs)?void 0:h.source}}},c.parameters={...c.parameters,docs:{...null==(y=c.parameters)?void 0:y.docs,source:{originalSource:"() => {\n const [activeFilters, setActiveFilters] = useState([]);\n const onFilterChange = (option: MapFilterOption) => {\n const isFilterPresent = !!availableFilters.find(pinFilter => pinFilter._id == option._id);\n if (isFilterPresent) {\n return setActiveFilters(filter => filter.filter(existingOption => existingOption !== option));\n }\n return setActiveFilters(existingOptions => [...existingOptions, option]);\n };\n return
\n \n (No buttons rendered)\n
;\n}",...null==(P=null==(O=c.parameters)?void 0:O.docs)?void 0:P.source}}};const I=["Basic","OnlyOne","OnlyTwo"];export{a as Basic,p as OnlyOne,c as OnlyTwo,I as __namedExportsOrder,H as default}; \ No newline at end of file +import{j as n}from"./jsx-runtime-CexXSJP5.js";import{r as d}from"./index-BP8_t0zE.js";import{M as F}from"./MapFilterProfileTypeCardList-B9GpaZp7.js";import"./ButtonIcon-2rTJWwwt.js";import"./Icon-BoVZOGVD.js";import"./emotion-styled.browser.esm-Dz2BNYeh.js";import"./extends-CF3RwP-h.js";import"./parseProps-780b287c.browser.esm-DiCerVr_.js";import"./emotion-use-insertion-effect-with-fallbacks.browser.esm-UWD3gXM2.js";import"./supporter-D7hp958O.js";import"./icon-arrow-down-CJeToCJe.js";import"./icon-star-active-ClN6U5FF.js";import"./theme-ui-core-jsx-runtime.browser.esm-CH0qhC10.js";import"./hoist-non-react-statics.cjs-CQI8syxn.js";import"./theme-ui-components.esm-BngKL4Rx.js";import"./CardButton-Nj67FTo7.js";import"./MemberBadge-DSOx4fo1.js";import"./theme-ui-core.browser.esm-CIov4Ln1.js";import"./emotion-react.browser.esm-BYoRxRk_.js";import"./cjs-Clfm10Kj.js";const H={title:"Map/FilterList",component:F},r=[{label:"Workspace",_id:"workspace",filterType:"ProfileType"},{label:"Machine Builder",_id:"machine-builder",filterType:"ProfileType"},{label:"Collection Point",_id:"collection-point",filterType:"ProfileType"},{label:"Want to get started",_id:"member",filterType:"ProfileType"}],a=()=>{const[e,i]=d.useState([]);return n.jsx("div",{style:{maxWidth:"500px"},children:n.jsx(F,{activeFilters:e,availableFilters:r,onFilterChange:e=>r.find((i=>i._id==e._id))?i((i=>i.filter((i=>i!==e)))):i((i=>[...i,e]))})})},p=()=>{const[e,i]=d.useState([]);return n.jsxs("div",{style:{maxWidth:"500px"},children:[n.jsx(F,{activeFilters:e,availableFilters:[r[0]],onFilterChange:e=>r.find((i=>i._id==e._id))?i((i=>i.filter((i=>i!==e)))):i((i=>[...i,e]))}),"(Shouldn't see anything, only renders for two or more)"]})},c=()=>{const[e,i]=d.useState([]);return n.jsxs("div",{style:{maxWidth:"500px"},children:[n.jsx(F,{activeFilters:e,availableFilters:[r[0],r[1]],onFilterChange:e=>r.find((i=>i._id==e._id))?i((i=>i.filter((i=>i!==e)))):i((i=>[...i,e]))}),"(No buttons rendered)"]})};var v,f,u,x,g,h,y,O,P;a.parameters={...a.parameters,docs:{...null==(v=a.parameters)?void 0:v.docs,source:{originalSource:"() => {\n const [activeFilters, setActiveFilters] = useState([]);\n const onFilterChange = (option: MapFilterOption) => {\n const isFilterPresent = !!availableFilters.find(pinFilter => pinFilter._id == option._id);\n if (isFilterPresent) {\n return setActiveFilters(filter => filter.filter(existingOption => existingOption !== option));\n }\n return setActiveFilters(existingOptions => [...existingOptions, option]);\n };\n return
\n \n
;\n}",...null==(u=null==(f=a.parameters)?void 0:f.docs)?void 0:u.source}}},p.parameters={...p.parameters,docs:{...null==(x=p.parameters)?void 0:x.docs,source:{originalSource:"() => {\n const [activeFilters, setActiveFilters] = useState([]);\n const onFilterChange = (option: MapFilterOption) => {\n const isFilterPresent = !!availableFilters.find(pinFilter => pinFilter._id == option._id);\n if (isFilterPresent) {\n return setActiveFilters(filter => filter.filter(existingOption => existingOption !== option));\n }\n return setActiveFilters(existingOptions => [...existingOptions, option]);\n };\n return
\n \n (Shouldn't see anything, only renders for two or more)\n
;\n}",...null==(h=null==(g=p.parameters)?void 0:g.docs)?void 0:h.source}}},c.parameters={...c.parameters,docs:{...null==(y=c.parameters)?void 0:y.docs,source:{originalSource:"() => {\n const [activeFilters, setActiveFilters] = useState([]);\n const onFilterChange = (option: MapFilterOption) => {\n const isFilterPresent = !!availableFilters.find(pinFilter => pinFilter._id == option._id);\n if (isFilterPresent) {\n return setActiveFilters(filter => filter.filter(existingOption => existingOption !== option));\n }\n return setActiveFilters(existingOptions => [...existingOptions, option]);\n };\n return
\n \n (No buttons rendered)\n
;\n}",...null==(P=null==(O=c.parameters)?void 0:O.docs)?void 0:P.source}}};const I=["Basic","OnlyOne","OnlyTwo"];export{a as Basic,p as OnlyOne,c as OnlyTwo,I as __namedExportsOrder,H as default}; \ No newline at end of file diff --git a/storybook-static/assets/MapMemberCard-CYhmSFBa.js b/storybook-static/assets/MapMemberCard-WWElHjiz.js similarity index 77% rename from storybook-static/assets/MapMemberCard-CYhmSFBa.js rename to storybook-static/assets/MapMemberCard-WWElHjiz.js index 30328194d5..5c168af7a0 100644 --- a/storybook-static/assets/MapMemberCard-CYhmSFBa.js +++ b/storybook-static/assets/MapMemberCard-WWElHjiz.js @@ -1,8 +1,8 @@ -import{j as e}from"./jsx-runtime-CexXSJP5.js";import{k as c}from"./emotion-react.browser.esm-BYoRxRk_.js";import{U as u}from"./Username-iPvtw0Lg.js";import{C as p,a as r,e as n,I as g,T as t,A as x}from"./theme-ui-components.esm-DCiJ1mMX.js";const h=c` +import{j as e}from"./jsx-runtime-CexXSJP5.js";import{k as c}from"./emotion-react.browser.esm-BYoRxRk_.js";import{U as u}from"./Username-CNsNRGy2.js";import{C as p,a as r,e as n,I as g,T as t,A as x}from"./theme-ui-components.esm-BngKL4Rx.js";const h=c` from { background: lightgrey; } to { background: grey; } -`,s=i=>{const{imageUrl:s,description:a,user:o,heading:d,comments:l}=i;return e.jsx(p,{sx:{maxWidth:"230px"},"data-cy":"MapMemberCard",children:e.jsxs(r,{children:[!!i.loading&&e.jsxs(e.Fragment,{children:[e.jsx(n,{ratio:230/120,sx:{background:"lightgrey",animation:`${h} 800ms ease infinite`}}),e.jsx(r,{sx:{p:2,height:"109px"}})]}),!i.loading&&e.jsxs(e.Fragment,{children:[e.jsx(n,{ratio:230/120,sx:{background:"lightgrey"},children:e.jsx(g,{src:s,sx:{objectFit:"cover",width:"100%",height:"100%"}})}),e.jsxs(r,{sx:{p:2},children:[e.jsx(t,{mb:2,sx:{fontSize:"12px",color:"blue"},children:d}),e.jsx("div",{children:e.jsx(u,{user:o})}),e.jsx(t,{mb:2,sx:{wordBreak:"break-word",fontSize:1,display:"block",color:"black"},children:a}),l?e.jsx(x,{variant:"info",sx:{fontSize:1,textAlign:"left"},"data-testid":"MapMemberCard: moderation comments",children:e.jsxs(r,{children:["This map pin has been marked as requiring further changes.",e.jsx(r,{children:l})]})}):null]})]})]})})};try{s.displayName="MapMemberCard",s.__docgenInfo={description:"",displayName:"MapMemberCard",props:{loading:{defaultValue:null,description:"",name:"loading",required:!1,type:{name:"boolean"}},imageUrl:{defaultValue:null,description:"",name:"imageUrl",required:!0,type:{name:"string"}},description:{defaultValue:null,description:"",name:"description",required:!0,type:{name:"string"}},comments:{defaultValue:null,description:"",name:"comments",required:!0,type:{name:"string | null"}},user:{defaultValue:null,description:"",name:"user",required:!0,type:{name:"User"}},heading:{defaultValue:null,description:"",name:"heading",required:!0,type:{name:"string"}}}}}catch{}export{s as M}; \ No newline at end of file +`,s=s=>{const{imageUrl:i,description:a,user:o,heading:d,comments:l}=s;return e.jsx(p,{sx:{maxWidth:"230px"},"data-cy":"MapMemberCard",children:e.jsxs(r,{children:[!!s.loading&&e.jsxs(e.Fragment,{children:[e.jsx(n,{ratio:230/120,sx:{background:"lightgrey",animation:`${h} 800ms ease infinite`}}),e.jsx(r,{sx:{p:2,height:"109px"}})]}),!s.loading&&e.jsxs(e.Fragment,{children:[e.jsx(n,{ratio:230/120,sx:{background:"lightgrey"},children:e.jsx(g,{src:i,sx:{objectFit:"cover",width:"100%",height:"100%"}})}),e.jsxs(r,{sx:{p:2},children:[e.jsx(t,{mb:2,sx:{fontSize:"12px",color:"blue"},children:d}),e.jsx("div",{children:e.jsx(u,{user:o})}),e.jsx(t,{mb:2,sx:{wordBreak:"break-word",fontSize:1,display:"block",color:"black"},children:a}),l?e.jsx(x,{variant:"info",sx:{fontSize:1,textAlign:"left"},"data-testid":"MapMemberCard: moderation comments",children:e.jsxs(r,{children:["This map pin has been marked as requiring further changes.",e.jsx(r,{children:l})]})}):null]})]})]})})};try{s.displayName="MapMemberCard",s.__docgenInfo={description:"",displayName:"MapMemberCard",props:{loading:{defaultValue:null,description:"",name:"loading",required:!1,type:{name:"boolean"}},imageUrl:{defaultValue:null,description:"",name:"imageUrl",required:!0,type:{name:"string"}},description:{defaultValue:null,description:"",name:"description",required:!0,type:{name:"string"}},comments:{defaultValue:null,description:"",name:"comments",required:!0,type:{name:"string | null"}},user:{defaultValue:null,description:"",name:"user",required:!0,type:{name:"User"}},heading:{defaultValue:null,description:"",name:"heading",required:!0,type:{name:"string"}}}}}catch{}export{s as M}; \ No newline at end of file diff --git a/storybook-static/assets/MapMemberCard.stories-BItVkr6o.js b/storybook-static/assets/MapMemberCard.stories-BItVkr6o.js deleted file mode 100644 index 1156e363b2..0000000000 --- a/storybook-static/assets/MapMemberCard.stories-BItVkr6o.js +++ /dev/null @@ -1 +0,0 @@ -import{y as e}from"./index-D_kXk1yT.js";import{M as u}from"./MapMemberCard-CYhmSFBa.js";import"./jsx-runtime-CexXSJP5.js";import"./index-BP8_t0zE.js";import"./emotion-react.browser.esm-BYoRxRk_.js";import"./parseProps-780b287c.browser.esm-DiCerVr_.js";import"./emotion-use-insertion-effect-with-fallbacks.browser.esm-UWD3gXM2.js";import"./hoist-non-react-statics.cjs-CQI8syxn.js";import"./Username-iPvtw0Lg.js";import"./supporter-D7hp958O.js";import"./emotion-styled.browser.esm-Dz2BNYeh.js";import"./extends-CF3RwP-h.js";import"./theme-ui-components.esm-DCiJ1mMX.js";import"./theme-ui-core-jsx-runtime.browser.esm-CH0qhC10.js";import"./InternalLink-CtyTe3gy.js";import"./components-CutHIkdx.js";import"./index-BBRV8eG_.js";import"./index-BXxqJQdV.js";const L={title:"Map/MapMemberCard",component:u},r={args:{imageUrl:"https://placekitten.com/450/450",description:`${e.lorem.sentence()}`,user:{countryCode:e.address.countryCode("alpha-2"),userName:e.internet.userName(),isSupporter:e.datatype.boolean(),isVerified:e.datatype.boolean()},heading:`${e.lorem.word()}`,isEditable:!1,comments:null}},a={args:{loading:!0,imageUrl:"https://placekitten.com/450/450",description:`${e.lorem.sentence()}`,user:{countryCode:e.address.countryCode("alpha-2"),userName:e.internet.userName(),isSupporter:e.datatype.boolean(),isVerified:e.datatype.boolean()},heading:`${e.lorem.word()}`,isEditable:!1}},t={args:{imageUrl:"https://placekitten.com/450/450",description:`${e.lorem.sentence()}`,comments:`${e.lorem.sentence()}`,user:{countryCode:e.address.countryCode("alpha-2"),userName:e.internet.userName(),isSupporter:e.datatype.boolean(),isVerified:e.datatype.boolean()},heading:`${e.lorem.word()}`,isEditable:!1}};var o,n,s,i,d,m,p,l,c;r.parameters={...r.parameters,docs:{...null==(o=r.parameters)?void 0:o.docs,source:{originalSource:"{\n args: {\n imageUrl: 'https://placekitten.com/450/450',\n description: `${faker.lorem.sentence()}`,\n user: {\n countryCode: faker.address.countryCode('alpha-2'),\n userName: faker.internet.userName(),\n isSupporter: faker.datatype.boolean(),\n isVerified: faker.datatype.boolean()\n },\n heading: `${faker.lorem.word()}`,\n isEditable: false,\n comments: null\n }\n}",...null==(s=null==(n=r.parameters)?void 0:n.docs)?void 0:s.source}}},a.parameters={...a.parameters,docs:{...null==(i=a.parameters)?void 0:i.docs,source:{originalSource:"{\n args: {\n loading: true,\n imageUrl: 'https://placekitten.com/450/450',\n description: `${faker.lorem.sentence()}`,\n user: {\n countryCode: faker.address.countryCode('alpha-2'),\n userName: faker.internet.userName(),\n isSupporter: faker.datatype.boolean(),\n isVerified: faker.datatype.boolean()\n },\n heading: `${faker.lorem.word()}`,\n isEditable: false\n }\n}",...null==(m=null==(d=a.parameters)?void 0:d.docs)?void 0:m.source}}},t.parameters={...t.parameters,docs:{...null==(p=t.parameters)?void 0:p.docs,source:{originalSource:"{\n args: {\n imageUrl: 'https://placekitten.com/450/450',\n description: `${faker.lorem.sentence()}`,\n comments: `${faker.lorem.sentence()}`,\n user: {\n countryCode: faker.address.countryCode('alpha-2'),\n userName: faker.internet.userName(),\n isSupporter: faker.datatype.boolean(),\n isVerified: faker.datatype.boolean()\n },\n heading: `${faker.lorem.word()}`,\n isEditable: false\n }\n}",...null==(c=null==(l=t.parameters)?void 0:l.docs)?void 0:c.source}}};const O=["Default","LoadingState","ModerationComments"];export{r as Default,a as LoadingState,t as ModerationComments,O as __namedExportsOrder,L as default}; \ No newline at end of file diff --git a/storybook-static/assets/MapMemberCard.stories-CEgsajrz.js b/storybook-static/assets/MapMemberCard.stories-CEgsajrz.js new file mode 100644 index 0000000000..63427a0e82 --- /dev/null +++ b/storybook-static/assets/MapMemberCard.stories-CEgsajrz.js @@ -0,0 +1 @@ +import{y as e}from"./index-D_kXk1yT.js";import{M as u}from"./MapMemberCard-WWElHjiz.js";import"./jsx-runtime-CexXSJP5.js";import"./index-BP8_t0zE.js";import"./emotion-react.browser.esm-BYoRxRk_.js";import"./parseProps-780b287c.browser.esm-DiCerVr_.js";import"./emotion-use-insertion-effect-with-fallbacks.browser.esm-UWD3gXM2.js";import"./hoist-non-react-statics.cjs-CQI8syxn.js";import"./Username-CNsNRGy2.js";import"./supporter-D7hp958O.js";import"./emotion-styled.browser.esm-Dz2BNYeh.js";import"./extends-CF3RwP-h.js";import"./theme-ui-components.esm-BngKL4Rx.js";import"./theme-ui-core-jsx-runtime.browser.esm-CH0qhC10.js";import"./InternalLink-BRM7MvOa.js";import"./components-CutHIkdx.js";import"./index-BBRV8eG_.js";import"./index-BXxqJQdV.js";import"./UserBadge-XI2JdGOl.js";const O={title:"Map/MapMemberCard",component:u},r={args:{imageUrl:"https://placekitten.com/450/450",description:`${e.lorem.sentence()}`,user:{countryCode:e.address.countryCode("alpha-2"),userName:e.internet.userName(),isSupporter:e.datatype.boolean(),isVerified:e.datatype.boolean()},heading:`${e.lorem.word()}`,isEditable:!1,comments:null}},a={args:{loading:!0,imageUrl:"https://placekitten.com/450/450",description:`${e.lorem.sentence()}`,user:{countryCode:e.address.countryCode("alpha-2"),userName:e.internet.userName(),isSupporter:e.datatype.boolean(),isVerified:e.datatype.boolean()},heading:`${e.lorem.word()}`,isEditable:!1}},t={args:{imageUrl:"https://placekitten.com/450/450",description:`${e.lorem.sentence()}`,comments:`${e.lorem.sentence()}`,user:{countryCode:e.address.countryCode("alpha-2"),userName:e.internet.userName(),isSupporter:e.datatype.boolean(),isVerified:e.datatype.boolean()},heading:`${e.lorem.word()}`,isEditable:!1}};var o,n,s,i,m,d,p,l,c;r.parameters={...r.parameters,docs:{...null==(o=r.parameters)?void 0:o.docs,source:{originalSource:"{\n args: {\n imageUrl: 'https://placekitten.com/450/450',\n description: `${faker.lorem.sentence()}`,\n user: {\n countryCode: faker.address.countryCode('alpha-2'),\n userName: faker.internet.userName(),\n isSupporter: faker.datatype.boolean(),\n isVerified: faker.datatype.boolean()\n },\n heading: `${faker.lorem.word()}`,\n isEditable: false,\n comments: null\n }\n}",...null==(s=null==(n=r.parameters)?void 0:n.docs)?void 0:s.source}}},a.parameters={...a.parameters,docs:{...null==(i=a.parameters)?void 0:i.docs,source:{originalSource:"{\n args: {\n loading: true,\n imageUrl: 'https://placekitten.com/450/450',\n description: `${faker.lorem.sentence()}`,\n user: {\n countryCode: faker.address.countryCode('alpha-2'),\n userName: faker.internet.userName(),\n isSupporter: faker.datatype.boolean(),\n isVerified: faker.datatype.boolean()\n },\n heading: `${faker.lorem.word()}`,\n isEditable: false\n }\n}",...null==(d=null==(m=a.parameters)?void 0:m.docs)?void 0:d.source}}},t.parameters={...t.parameters,docs:{...null==(p=t.parameters)?void 0:p.docs,source:{originalSource:"{\n args: {\n imageUrl: 'https://placekitten.com/450/450',\n description: `${faker.lorem.sentence()}`,\n comments: `${faker.lorem.sentence()}`,\n user: {\n countryCode: faker.address.countryCode('alpha-2'),\n userName: faker.internet.userName(),\n isSupporter: faker.datatype.boolean(),\n isVerified: faker.datatype.boolean()\n },\n heading: `${faker.lorem.word()}`,\n isEditable: false\n }\n}",...null==(c=null==(l=t.parameters)?void 0:l.docs)?void 0:c.source}}};const j=["Default","LoadingState","ModerationComments"];export{r as Default,a as LoadingState,t as ModerationComments,j as __namedExportsOrder,O as default}; \ No newline at end of file diff --git a/storybook-static/assets/MapWithPin.client-B3vCTPau.js b/storybook-static/assets/MapWithPin.client-caBE0rMV.js similarity index 95% rename from storybook-static/assets/MapWithPin.client-B3vCTPau.js rename to storybook-static/assets/MapWithPin.client-caBE0rMV.js index 5c8f15c7e7..b6a60066a4 100644 --- a/storybook-static/assets/MapWithPin.client-B3vCTPau.js +++ b/storybook-static/assets/MapWithPin.client-caBE0rMV.js @@ -1 +1 @@ -import{j as n}from"./jsx-runtime-CexXSJP5.js";import{r as c}from"./index-BP8_t0zE.js";import{B as E}from"./Button-B7QBvkxh.js";import{M as C}from"./Map.client-D7Zd9Rir.js";import{O as M}from"./OsmGeocoding-Dk6lLoXi.js";import{M as j}from"./MapPin.client-Ln2WLe_W.js";import{_ as d}from"./inheritsLoose-CdQPfY07.js";import{w as b,l as v}from"./MapLayer-CeGLoV_-.js";import{a as _}from"./setPrototypeOf-NYsvoNVB.js";import{_ as k}from"./defineProperty-Dr9G4DxF.js";import{F as m,A as P,T as I,a as U}from"./theme-ui-components.esm-DCiJ1mMX.js";var q=function(e){function t(t){var n;return n=e.call(this,t)||this,k(_(n),"leafletElement",void 0),n.leafletElement=n.createLeafletElement(n.props),n}d(t,e);var n=t.prototype;return n.createLeafletElement=function(e){throw new Error("createLeafletElement() must be implemented")},n.updateLeafletElement=function(e,t){t.position!==e.position&&this.leafletElement.setPosition(t.position)},n.componentDidMount=function(){this.leafletElement.addTo(this.props.leaflet.map)},n.componentDidUpdate=function(e){this.updateLeafletElement(e,this.props)},n.componentWillUnmount=function(){this.leafletElement.remove()},n.render=function(){return null},t}(c.Component),w=function(e){function t(){return e.apply(this,arguments)||this}return d(t,e),t.prototype.createLeafletElement=function(e){return new v.Control.Zoom(e)},t}(q);const z=b(w),D="Use my current location",V="To move your pin, grab it to move it or double click where you want it to go.",u=e=>{const[t,o]=c.useState(e.zoom||1),[i,a]=c.useState(e.center||[e.position.lat,e.position.lng]),{mapRef:r,position:l,markerIcon:s,onClickMapPin:p,popup:u}=e,d=e.hasUserLocation||!1,f=e.updatePosition||function(){};return n.jsxs(m,{sx:{flexDirection:"column",gap:2},children:[n.jsx(P,{variant:"info",sx:{marginTop:2},children:n.jsx(I,{sx:{fontSize:1},children:V})}),n.jsxs("div",{style:{position:"relative",borderRadius:6,overflow:"hidden"},children:[n.jsx(U,{sx:{position:"absolute",zIndex:2,padding:4,top:0,right:0,display:"flex",justifyContent:"center",alignItems:"center"},children:n.jsxs(m,{style:{width:"280px"},children:[n.jsx(M,{callback:e=>{e.lat&&e.lon&&(f({lat:e.lat,lng:e.lon}),a([e.lat,e.lon]),o(15))},acceptLanguage:"en"}),d&&n.jsx(E,{type:"button",mx:2,onClick:e=>{e.preventDefault(),navigator.geolocation.getCurrentPosition((e=>{f({lat:e.coords.latitude,lng:e.coords.longitude}),a([e.coords.latitude,e.coords.longitude]),o(15)}),(()=>{}))},children:D})]})}),n.jsxs(C,{ref:r,className:"markercluster-map settings-page",center:i,zoom:t,zoomControl:!1,setZoom:o,ondblclick:e=>{f({...e.latlng})},doubleClickZoom:!1,style:{height:"500px",zIndex:1},children:[n.jsx(z,{position:"topleft"}),n.jsxs(n.Fragment,{children:[u,l&&n.jsx(j,{position:l,markerIcon:s,onClick:p,onDrag:e=>{e.lat&&e.lng&&f({lat:e.lat,lng:e.lng})}})]})]})]})]})};try{u.displayName="MapWithPin",u.__docgenInfo={description:"",displayName:"MapWithPin",props:{mapRef:{defaultValue:null,description:"",name:"mapRef",required:!0,type:{name:"RefObject>"}},position:{defaultValue:null,description:"",name:"position",required:!0,type:{name:"{ lat: number; lng: number; }"}},markerIcon:{defaultValue:null,description:"",name:"markerIcon",required:!1,type:{name:"DivIcon"}},updatePosition:{defaultValue:null,description:"",name:"updatePosition",required:!1,type:{name:"any"}},center:{defaultValue:null,description:"",name:"center",required:!1,type:{name:"any"}},zoom:{defaultValue:null,description:"",name:"zoom",required:!1,type:{name:"number"}},hasUserLocation:{defaultValue:null,description:"",name:"hasUserLocation",required:!1,type:{name:"boolean"}},onClickMapPin:{defaultValue:null,description:"",name:"onClickMapPin",required:!1,type:{name:"(() => void)"}},popup:{defaultValue:null,description:"",name:"popup",required:!1,type:{name:"ReactNode"}}}}}catch{}export{u as M}; \ No newline at end of file +import{j as n}from"./jsx-runtime-CexXSJP5.js";import{r as c}from"./index-BP8_t0zE.js";import{B as E}from"./Button-D4nxT_g_.js";import{M as C}from"./Map.client-D7Zd9Rir.js";import{O as M}from"./OsmGeocoding-BSwlbkyl.js";import{M as j}from"./MapPin.client-Ln2WLe_W.js";import{_ as d}from"./inheritsLoose-CdQPfY07.js";import{w as b,l as v}from"./MapLayer-CeGLoV_-.js";import{a as _}from"./setPrototypeOf-NYsvoNVB.js";import{_ as k}from"./defineProperty-Dr9G4DxF.js";import{F as m,A as P,T as I,a as U}from"./theme-ui-components.esm-BngKL4Rx.js";var q=function(e){function t(t){var n;return n=e.call(this,t)||this,k(_(n),"leafletElement",void 0),n.leafletElement=n.createLeafletElement(n.props),n}d(t,e);var n=t.prototype;return n.createLeafletElement=function(e){throw new Error("createLeafletElement() must be implemented")},n.updateLeafletElement=function(e,t){t.position!==e.position&&this.leafletElement.setPosition(t.position)},n.componentDidMount=function(){this.leafletElement.addTo(this.props.leaflet.map)},n.componentDidUpdate=function(e){this.updateLeafletElement(e,this.props)},n.componentWillUnmount=function(){this.leafletElement.remove()},n.render=function(){return null},t}(c.Component),w=function(e){function t(){return e.apply(this,arguments)||this}return d(t,e),t.prototype.createLeafletElement=function(e){return new v.Control.Zoom(e)},t}(q);const z=b(w),D="Use my current location",V="To move your pin, grab it to move it or double click where you want it to go.",u=e=>{const[t,o]=c.useState(e.zoom||1),[i,a]=c.useState(e.center||[e.position.lat,e.position.lng]),{mapRef:r,position:l,markerIcon:s,onClickMapPin:p,popup:u}=e,d=e.hasUserLocation||!1,f=e.updatePosition||function(){};return n.jsxs(m,{sx:{flexDirection:"column",gap:2},children:[n.jsx(P,{variant:"info",sx:{marginTop:2},children:n.jsx(I,{sx:{fontSize:1},children:V})}),n.jsxs("div",{style:{position:"relative",borderRadius:6,overflow:"hidden"},children:[n.jsx(U,{sx:{position:"absolute",zIndex:2,padding:4,top:0,right:0,display:"flex",justifyContent:"center",alignItems:"center"},children:n.jsxs(m,{style:{width:"280px"},children:[n.jsx(M,{callback:e=>{e.lat&&e.lon&&(f({lat:e.lat,lng:e.lon}),a([e.lat,e.lon]),o(15))},acceptLanguage:"en"}),d&&n.jsx(E,{type:"button",mx:2,onClick:e=>{e.preventDefault(),navigator.geolocation.getCurrentPosition((e=>{f({lat:e.coords.latitude,lng:e.coords.longitude}),a([e.coords.latitude,e.coords.longitude]),o(15)}),(()=>{}))},children:D})]})}),n.jsxs(C,{ref:r,className:"markercluster-map settings-page",center:i,zoom:t,zoomControl:!1,setZoom:o,ondblclick:e=>{f({...e.latlng})},doubleClickZoom:!1,style:{height:"500px",zIndex:1},children:[n.jsx(z,{position:"topleft"}),n.jsxs(n.Fragment,{children:[u,l&&n.jsx(j,{position:l,markerIcon:s,onClick:p,onDrag:e=>{e.lat&&e.lng&&f({lat:e.lat,lng:e.lng})}})]})]})]})]})};try{u.displayName="MapWithPin",u.__docgenInfo={description:"",displayName:"MapWithPin",props:{mapRef:{defaultValue:null,description:"",name:"mapRef",required:!0,type:{name:"RefObject>"}},position:{defaultValue:null,description:"",name:"position",required:!0,type:{name:"{ lat: number; lng: number; }"}},markerIcon:{defaultValue:null,description:"",name:"markerIcon",required:!1,type:{name:"DivIcon"}},updatePosition:{defaultValue:null,description:"",name:"updatePosition",required:!1,type:{name:"any"}},center:{defaultValue:null,description:"",name:"center",required:!1,type:{name:"any"}},zoom:{defaultValue:null,description:"",name:"zoom",required:!1,type:{name:"number"}},hasUserLocation:{defaultValue:null,description:"",name:"hasUserLocation",required:!1,type:{name:"boolean"}},onClickMapPin:{defaultValue:null,description:"",name:"onClickMapPin",required:!1,type:{name:"(() => void)"}},popup:{defaultValue:null,description:"",name:"popup",required:!1,type:{name:"ReactNode"}}}}}catch{}export{u as M}; \ No newline at end of file diff --git a/storybook-static/assets/MapWithPin.stories-DNVx4Jgl.js b/storybook-static/assets/MapWithPin.stories-CM1-XWSD.js similarity index 82% rename from storybook-static/assets/MapWithPin.stories-DNVx4Jgl.js rename to storybook-static/assets/MapWithPin.stories-CM1-XWSD.js index f700218fa6..3136db9a1c 100644 --- a/storybook-static/assets/MapWithPin.stories-DNVx4Jgl.js +++ b/storybook-static/assets/MapWithPin.stories-CM1-XWSD.js @@ -1 +1 @@ -import{j as s}from"./jsx-runtime-CexXSJP5.js";import{r as a}from"./index-BP8_t0zE.js";import{M as e}from"./MapWithPin.client-B3vCTPau.js";import"./Button-B7QBvkxh.js";import"./Icon-BoVZOGVD.js";import"./emotion-styled.browser.esm-Dz2BNYeh.js";import"./extends-CF3RwP-h.js";import"./parseProps-780b287c.browser.esm-DiCerVr_.js";import"./emotion-use-insertion-effect-with-fallbacks.browser.esm-UWD3gXM2.js";import"./supporter-D7hp958O.js";import"./icon-arrow-down-CJeToCJe.js";import"./icon-star-active-ClN6U5FF.js";import"./theme-ui-core-jsx-runtime.browser.esm-CH0qhC10.js";import"./hoist-non-react-statics.cjs-CQI8syxn.js";import"./theme-ui-components.esm-DCiJ1mMX.js";import"./Map.client-D7Zd9Rir.js";import"./objectWithoutPropertiesLoose-CAYKN5F1.js";import"./setPrototypeOf-NYsvoNVB.js";import"./inheritsLoose-CdQPfY07.js";import"./defineProperty-Dr9G4DxF.js";import"./typeof-QjJsDpFa.js";import"./MapLayer-CeGLoV_-.js";import"./OsmGeocoding-Dk6lLoXi.js";import"./SearchField-BEwe93wL.js";import"./MapPin.client-Ln2WLe_W.js";const A={title:"Map/MapWithPin",component:e},t=()=>{const o={lat:0,lng:0},t=a.useRef(null);return s.jsx(e,{mapRef:t,position:o,updatePosition:t=>{o.lat=t.lat,o.lng=t.lng}})};var n,p,r;t.parameters={...t.parameters,docs:{...null==(n=t.parameters)?void 0:n.docs,source:{originalSource:"() => {\n const position = {\n lat: 0,\n lng: 0\n };\n const newMapRef = useRef(null);\n return {\n position.lat = _position.lat;\n position.lng = _position.lng;\n }} />;\n}",...null==(r=null==(p=t.parameters)?void 0:p.docs)?void 0:r.source}}};const B=["Default"];export{t as Default,B as __namedExportsOrder,A as default}; \ No newline at end of file +import{j as s}from"./jsx-runtime-CexXSJP5.js";import{r as a}from"./index-BP8_t0zE.js";import{M as e}from"./MapWithPin.client-caBE0rMV.js";import"./Button-D4nxT_g_.js";import"./Icon-BoVZOGVD.js";import"./emotion-styled.browser.esm-Dz2BNYeh.js";import"./extends-CF3RwP-h.js";import"./parseProps-780b287c.browser.esm-DiCerVr_.js";import"./emotion-use-insertion-effect-with-fallbacks.browser.esm-UWD3gXM2.js";import"./supporter-D7hp958O.js";import"./icon-arrow-down-CJeToCJe.js";import"./icon-star-active-ClN6U5FF.js";import"./theme-ui-core-jsx-runtime.browser.esm-CH0qhC10.js";import"./hoist-non-react-statics.cjs-CQI8syxn.js";import"./theme-ui-components.esm-BngKL4Rx.js";import"./Map.client-D7Zd9Rir.js";import"./objectWithoutPropertiesLoose-CAYKN5F1.js";import"./setPrototypeOf-NYsvoNVB.js";import"./inheritsLoose-CdQPfY07.js";import"./defineProperty-Dr9G4DxF.js";import"./typeof-QjJsDpFa.js";import"./MapLayer-CeGLoV_-.js";import"./OsmGeocoding-BSwlbkyl.js";import"./SearchField-D-_Sbl66.js";import"./MapPin.client-Ln2WLe_W.js";const A={title:"Map/MapWithPin",component:e},t=()=>{const o={lat:0,lng:0},t=a.useRef(null);return s.jsx(e,{mapRef:t,position:o,updatePosition:t=>{o.lat=t.lat,o.lng=t.lng}})};var n,p,r;t.parameters={...t.parameters,docs:{...null==(n=t.parameters)?void 0:n.docs,source:{originalSource:"() => {\n const position = {\n lat: 0,\n lng: 0\n };\n const newMapRef = useRef(null);\n return {\n position.lat = _position.lat;\n position.lng = _position.lng;\n }} />;\n}",...null==(r=null==(p=t.parameters)?void 0:p.docs)?void 0:r.source}}};const B=["Default"];export{t as Default,B as __namedExportsOrder,A as default}; \ No newline at end of file diff --git a/storybook-static/assets/MemberBadge-BFCUvfGJ.js b/storybook-static/assets/MemberBadge-DSOx4fo1.js similarity index 95% rename from storybook-static/assets/MemberBadge-BFCUvfGJ.js rename to storybook-static/assets/MemberBadge-DSOx4fo1.js index 1e265319d8..381b84d795 100644 --- a/storybook-static/assets/MemberBadge-BFCUvfGJ.js +++ b/storybook-static/assets/MemberBadge-DSOx4fo1.js @@ -1 +1 @@ -import{j as c}from"./jsx-runtime-CexXSJP5.js";import{s as p}from"./icon-star-active-ClN6U5FF.js";import{u as f}from"./theme-ui-core.browser.esm-CIov4Ln1.js";import{I as y}from"./theme-ui-components.esm-DCiJ1mMX.js";const n=40,o=e=>{var a,l;const{theme:r}=f(),{size:i,useLowDetailVersion:t,sx:o}=e,s=e.profileType||"member",m=i||n,u=s.charAt(0).toUpperCase()+s.slice(1).replace(/-/g," ");return c.jsx(y,{loading:"lazy",className:"avatar","data-cy":`MemberBadge-${s}`,sx:{width:m,borderRadius:"50%",...o},width:m,height:m,title:u,src:(m>n&&!t?null==(a=r.badges[s])?void 0:a.normal:null==(l=r.badges[s])?void 0:l.lowDetail)||p})};try{o.displayName="MemberBadge",o.__docgenInfo={description:"",displayName:"MemberBadge",props:{size:{defaultValue:null,description:"",name:"size",required:!1,type:{name:"number"}},profileType:{defaultValue:null,description:"",name:"profileType",required:!1,type:{name:"enum",value:[{value:'"space"'},{value:'"member"'},{value:'"workspace"'},{value:'"machine-builder"'},{value:'"community-builder"'},{value:'"collection-point"'}]}},useLowDetailVersion:{defaultValue:null,description:"",name:"useLowDetailVersion",required:!1,type:{name:"boolean"}},sx:{defaultValue:null,description:"",name:"sx",required:!1,type:{name:"ThemeUIStyleObject"}},ref:{defaultValue:null,description:"",name:"ref",required:!1,type:{name:"((instance: HTMLImageElement | null) => void) | RefObject | null"}}}}}catch{}export{o as M}; \ No newline at end of file +import{j as c}from"./jsx-runtime-CexXSJP5.js";import{s as p}from"./icon-star-active-ClN6U5FF.js";import{u as f}from"./theme-ui-core.browser.esm-CIov4Ln1.js";import{I as y}from"./theme-ui-components.esm-BngKL4Rx.js";const n=40,o=e=>{var a,l;const{theme:r}=f(),{size:i,useLowDetailVersion:t,sx:o}=e,s=e.profileType||"member",m=i||n,u=s.charAt(0).toUpperCase()+s.slice(1).replace(/-/g," ");return c.jsx(y,{loading:"lazy",className:"avatar","data-cy":`MemberBadge-${s}`,sx:{width:m,borderRadius:"50%",...o},width:m,height:m,title:u,src:(m>n&&!t?null==(a=r.badges[s])?void 0:a.normal:null==(l=r.badges[s])?void 0:l.lowDetail)||p})};try{o.displayName="MemberBadge",o.__docgenInfo={description:"",displayName:"MemberBadge",props:{size:{defaultValue:null,description:"",name:"size",required:!1,type:{name:"number"}},profileType:{defaultValue:null,description:"",name:"profileType",required:!1,type:{name:"enum",value:[{value:'"space"'},{value:'"member"'},{value:'"workspace"'},{value:'"machine-builder"'},{value:'"community-builder"'},{value:'"collection-point"'}]}},useLowDetailVersion:{defaultValue:null,description:"",name:"useLowDetailVersion",required:!1,type:{name:"boolean"}},sx:{defaultValue:null,description:"",name:"sx",required:!1,type:{name:"ThemeUIStyleObject"}},ref:{defaultValue:null,description:"",name:"ref",required:!1,type:{name:"((instance: HTMLImageElement | null) => void) | RefObject | null"}}}}}catch{}export{o as M}; \ No newline at end of file diff --git a/storybook-static/assets/MemberBadge.stories-r5ugHWuk.js b/storybook-static/assets/MemberBadge.stories-DI0GOUCs.js similarity index 97% rename from storybook-static/assets/MemberBadge.stories-r5ugHWuk.js rename to storybook-static/assets/MemberBadge.stories-DI0GOUCs.js index 04a3bd1d84..81581a980e 100644 --- a/storybook-static/assets/MemberBadge.stories-r5ugHWuk.js +++ b/storybook-static/assets/MemberBadge.stories-DI0GOUCs.js @@ -1 +1 @@ -import{j as e}from"./jsx-runtime-CexXSJP5.js";import{M as r}from"./MemberBadge-BFCUvfGJ.js";import"./index-BP8_t0zE.js";import"./icon-star-active-ClN6U5FF.js";import"./theme-ui-core.browser.esm-CIov4Ln1.js";import"./emotion-react.browser.esm-BYoRxRk_.js";import"./parseProps-780b287c.browser.esm-DiCerVr_.js";import"./emotion-use-insertion-effect-with-fallbacks.browser.esm-UWD3gXM2.js";import"./hoist-non-react-statics.cjs-CQI8syxn.js";import"./cjs-Clfm10Kj.js";import"./theme-ui-components.esm-DCiJ1mMX.js";import"./theme-ui-core-jsx-runtime.browser.esm-CH0qhC10.js";const N={title:"Components/MemberBadge",component:r},s=()=>e.jsx(r,{}),o={render:s=>e.jsxs(e.Fragment,{children:[e.jsx(r,{size:s.size}),e.jsx(r,{size:2*(s.size||40)}),e.jsx(r,{size:3*(s.size||40)})]})},i=()=>e.jsxs(e.Fragment,{children:[e.jsx(r,{size:100,profileType:"member"}),e.jsx(r,{size:100,profileType:"member",useLowDetailVersion:!0})]}),a=()=>e.jsxs(e.Fragment,{children:[e.jsx(r,{size:100,profileType:"workspace"}),e.jsx(r,{size:100,profileType:"workspace",useLowDetailVersion:!0})]}),p=()=>e.jsxs(e.Fragment,{children:[e.jsx(r,{size:100,profileType:"community-builder"}),e.jsx(r,{size:100,profileType:"community-builder",useLowDetailVersion:!0})]}),t=()=>e.jsxs(e.Fragment,{children:[e.jsx(r,{size:100,profileType:"collection-point"}),e.jsx(r,{size:100,profileType:"collection-point",useLowDetailVersion:!0})]}),m=()=>e.jsxs(e.Fragment,{children:[e.jsx(r,{size:100,profileType:"machine-builder"}),e.jsx(r,{size:100,profileType:"machine-builder",useLowDetailVersion:!0})]}),c=()=>e.jsxs(e.Fragment,{children:[e.jsx(r,{size:100,profileType:"space"}),e.jsx(r,{size:100,profileType:"space",useLowDetailVersion:!0})]});var l,d,u,y,z,g,T,b,f,x,j,B,M,w,h,D,L,S,V,F,k,C,_,E;s.parameters={...s.parameters,docs:{...null==(l=s.parameters)?void 0:l.docs,source:{originalSource:"() => ",...null==(u=null==(d=s.parameters)?void 0:d.docs)?void 0:u.source}}},o.parameters={...o.parameters,docs:{...null==(y=o.parameters)?void 0:y.docs,source:{originalSource:"{\n render: args => <>\n \n \n \n \n}",...null==(g=null==(z=o.parameters)?void 0:z.docs)?void 0:g.source}}},i.parameters={...i.parameters,docs:{...null==(T=i.parameters)?void 0:T.docs,source:{originalSource:"() => <>\n \n \n ",...null==(f=null==(b=i.parameters)?void 0:b.docs)?void 0:f.source}}},a.parameters={...a.parameters,docs:{...null==(x=a.parameters)?void 0:x.docs,source:{originalSource:"() => <>\n \n \n ",...null==(B=null==(j=a.parameters)?void 0:j.docs)?void 0:B.source}}},p.parameters={...p.parameters,docs:{...null==(M=p.parameters)?void 0:M.docs,source:{originalSource:"() => <>\n \n \n ",...null==(h=null==(w=p.parameters)?void 0:w.docs)?void 0:h.source}}},t.parameters={...t.parameters,docs:{...null==(D=t.parameters)?void 0:D.docs,source:{originalSource:"() => <>\n \n \n ",...null==(S=null==(L=t.parameters)?void 0:L.docs)?void 0:S.source}}},m.parameters={...m.parameters,docs:{...null==(V=m.parameters)?void 0:V.docs,source:{originalSource:"() => <>\n \n \n ",...null==(k=null==(F=m.parameters)?void 0:F.docs)?void 0:k.source}}},c.parameters={...c.parameters,docs:{...null==(C=c.parameters)?void 0:C.docs,source:{originalSource:"() => <>\n \n \n ",...null==(E=null==(_=c.parameters)?void 0:_.docs)?void 0:E.source}}};const Q=["Basic","Sizes","TypeMember","TypeWorkspace","TypeCommunityBuilder","TypeCollectionPoint","TypeMachineBuilder","TypeSpace"];export{s as Basic,o as Sizes,t as TypeCollectionPoint,p as TypeCommunityBuilder,m as TypeMachineBuilder,i as TypeMember,c as TypeSpace,a as TypeWorkspace,Q as __namedExportsOrder,N as default}; \ No newline at end of file +import{j as e}from"./jsx-runtime-CexXSJP5.js";import{M as r}from"./MemberBadge-DSOx4fo1.js";import"./index-BP8_t0zE.js";import"./icon-star-active-ClN6U5FF.js";import"./theme-ui-core.browser.esm-CIov4Ln1.js";import"./emotion-react.browser.esm-BYoRxRk_.js";import"./parseProps-780b287c.browser.esm-DiCerVr_.js";import"./emotion-use-insertion-effect-with-fallbacks.browser.esm-UWD3gXM2.js";import"./hoist-non-react-statics.cjs-CQI8syxn.js";import"./cjs-Clfm10Kj.js";import"./theme-ui-components.esm-BngKL4Rx.js";import"./theme-ui-core-jsx-runtime.browser.esm-CH0qhC10.js";const N={title:"Components/MemberBadge",component:r},s=()=>e.jsx(r,{}),o={render:s=>e.jsxs(e.Fragment,{children:[e.jsx(r,{size:s.size}),e.jsx(r,{size:2*(s.size||40)}),e.jsx(r,{size:3*(s.size||40)})]})},i=()=>e.jsxs(e.Fragment,{children:[e.jsx(r,{size:100,profileType:"member"}),e.jsx(r,{size:100,profileType:"member",useLowDetailVersion:!0})]}),a=()=>e.jsxs(e.Fragment,{children:[e.jsx(r,{size:100,profileType:"workspace"}),e.jsx(r,{size:100,profileType:"workspace",useLowDetailVersion:!0})]}),p=()=>e.jsxs(e.Fragment,{children:[e.jsx(r,{size:100,profileType:"community-builder"}),e.jsx(r,{size:100,profileType:"community-builder",useLowDetailVersion:!0})]}),t=()=>e.jsxs(e.Fragment,{children:[e.jsx(r,{size:100,profileType:"collection-point"}),e.jsx(r,{size:100,profileType:"collection-point",useLowDetailVersion:!0})]}),m=()=>e.jsxs(e.Fragment,{children:[e.jsx(r,{size:100,profileType:"machine-builder"}),e.jsx(r,{size:100,profileType:"machine-builder",useLowDetailVersion:!0})]}),c=()=>e.jsxs(e.Fragment,{children:[e.jsx(r,{size:100,profileType:"space"}),e.jsx(r,{size:100,profileType:"space",useLowDetailVersion:!0})]});var l,d,u,y,z,g,T,b,f,x,j,B,M,w,h,D,L,S,V,F,k,C,_,E;s.parameters={...s.parameters,docs:{...null==(l=s.parameters)?void 0:l.docs,source:{originalSource:"() => ",...null==(u=null==(d=s.parameters)?void 0:d.docs)?void 0:u.source}}},o.parameters={...o.parameters,docs:{...null==(y=o.parameters)?void 0:y.docs,source:{originalSource:"{\n render: args => <>\n \n \n \n \n}",...null==(g=null==(z=o.parameters)?void 0:z.docs)?void 0:g.source}}},i.parameters={...i.parameters,docs:{...null==(T=i.parameters)?void 0:T.docs,source:{originalSource:"() => <>\n \n \n ",...null==(f=null==(b=i.parameters)?void 0:b.docs)?void 0:f.source}}},a.parameters={...a.parameters,docs:{...null==(x=a.parameters)?void 0:x.docs,source:{originalSource:"() => <>\n \n \n ",...null==(B=null==(j=a.parameters)?void 0:j.docs)?void 0:B.source}}},p.parameters={...p.parameters,docs:{...null==(M=p.parameters)?void 0:M.docs,source:{originalSource:"() => <>\n \n \n ",...null==(h=null==(w=p.parameters)?void 0:w.docs)?void 0:h.source}}},t.parameters={...t.parameters,docs:{...null==(D=t.parameters)?void 0:D.docs,source:{originalSource:"() => <>\n \n \n ",...null==(S=null==(L=t.parameters)?void 0:L.docs)?void 0:S.source}}},m.parameters={...m.parameters,docs:{...null==(V=m.parameters)?void 0:V.docs,source:{originalSource:"() => <>\n \n \n ",...null==(k=null==(F=m.parameters)?void 0:F.docs)?void 0:k.source}}},c.parameters={...c.parameters,docs:{...null==(C=c.parameters)?void 0:C.docs,source:{originalSource:"() => <>\n \n \n ",...null==(E=null==(_=c.parameters)?void 0:_.docs)?void 0:E.source}}};const Q=["Basic","Sizes","TypeMember","TypeWorkspace","TypeCommunityBuilder","TypeCollectionPoint","TypeMachineBuilder","TypeSpace"];export{s as Basic,o as Sizes,t as TypeCollectionPoint,p as TypeCommunityBuilder,m as TypeMachineBuilder,i as TypeMember,c as TypeSpace,a as TypeWorkspace,Q as __namedExportsOrder,N as default}; \ No newline at end of file diff --git a/storybook-static/assets/Mixcloud-DIE-aRLx.js b/storybook-static/assets/Mixcloud-CJawzEpR.js similarity index 97% rename from storybook-static/assets/Mixcloud-DIE-aRLx.js rename to storybook-static/assets/Mixcloud-CJawzEpR.js index 2c4d19ac1c..e544f8d889 100644 --- a/storybook-static/assets/Mixcloud-DIE-aRLx.js +++ b/storybook-static/assets/Mixcloud-CJawzEpR.js @@ -1 +1 @@ -import{g as _,r as f}from"./index-BP8_t0zE.js";import{u as m,p as g}from"./VideoPlayer-ggRAiP4x.js";function v(e,t){for(var r=0;ro[t]})}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}var P=Object.create,i=Object.defineProperty,O=Object.getOwnPropertyDescriptor,b=Object.getOwnPropertyNames,M=Object.getPrototypeOf,w=Object.prototype.hasOwnProperty,x=(e,t,r)=>t in e?i(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,j=(e,t)=>{for(var r in t)i(e,r,{get:t[r],enumerable:!0})},c=(e,t,r,o)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let a of b(t))!w.call(e,a)&&a!==r&&i(e,a,{get:()=>t[a],enumerable:!(o=O(t,a))||o.enumerable});return e},D=(e,t,r)=>(r=null!=e?P(M(e)):{},c(e&&e.__esModule?r:i(r,"default",{value:e,enumerable:!0}),e)),S=e=>c(i({},"__esModule",{value:!0}),e),a=(e,t,r)=>(x(e,"symbol"!=typeof t?t+"":t,r),r),d={};j(d,{default:()=>l});var h=S(d),u=D(f),p=m,y=g;const E="https://widget.mixcloud.com/media/js/widgetApi.js",L="Mixcloud";class l extends u.Component{constructor(){super(...arguments),a(this,"callPlayer",p.callPlayer),a(this,"duration",null),a(this,"currentTime",null),a(this,"secondsLoaded",null),a(this,"mute",(()=>{})),a(this,"unmute",(()=>{})),a(this,"ref",(e=>{this.iframe=e}))}componentDidMount(){this.props.onMount&&this.props.onMount(this)}load(e){(0,p.getSDK)(E,L).then((e=>{this.player=e.PlayerWidget(this.iframe),this.player.ready.then((()=>{this.player.events.play.on(this.props.onPlay),this.player.events.pause.on(this.props.onPause),this.player.events.ended.on(this.props.onEnded),this.player.events.error.on(this.props.error),this.player.events.progress.on(((e,t)=>{this.currentTime=e,this.duration=t})),this.props.onReady()}))}),this.props.onError)}play(){this.callPlayer("play")}pause(){this.callPlayer("pause")}stop(){}seekTo(e,t=!0){this.callPlayer("seek",e),t||this.pause()}setVolume(e){}getDuration(){return this.duration}getCurrentTime(){return this.currentTime}getSecondsLoaded(){return null}render(){const{url:e,config:t}=this.props,r=e.match(y.MATCH_URL_MIXCLOUD)[1],o=(0,p.queryString)({...t.options,feed:`/${r}/`});return u.default.createElement("iframe",{key:r,ref:this.ref,style:{width:"100%",height:"100%"},src:`https://www.mixcloud.com/widget/iframe/?${o}`,frameBorder:"0",allow:"autoplay"})}}a(l,"displayName","Mixcloud"),a(l,"canPlay",y.canPlay.mixcloud),a(l,"loopOnEnded",!0);const T=_(h),A=v({__proto__:null,default:T},[h]);export{A as M}; \ No newline at end of file +import{g as _,r as f}from"./index-BP8_t0zE.js";import{u as m,p as g}from"./VideoPlayer-DllXxlDZ.js";function v(e,t){for(var r=0;ro[t]})}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}var P=Object.create,i=Object.defineProperty,O=Object.getOwnPropertyDescriptor,b=Object.getOwnPropertyNames,M=Object.getPrototypeOf,w=Object.prototype.hasOwnProperty,x=(e,t,r)=>t in e?i(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,j=(e,t)=>{for(var r in t)i(e,r,{get:t[r],enumerable:!0})},c=(e,t,r,o)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let a of b(t))!w.call(e,a)&&a!==r&&i(e,a,{get:()=>t[a],enumerable:!(o=O(t,a))||o.enumerable});return e},D=(e,t,r)=>(r=null!=e?P(M(e)):{},c(e&&e.__esModule?r:i(r,"default",{value:e,enumerable:!0}),e)),S=e=>c(i({},"__esModule",{value:!0}),e),a=(e,t,r)=>(x(e,"symbol"!=typeof t?t+"":t,r),r),d={};j(d,{default:()=>l});var h=S(d),u=D(f),p=m,y=g;const E="https://widget.mixcloud.com/media/js/widgetApi.js",L="Mixcloud";class l extends u.Component{constructor(){super(...arguments),a(this,"callPlayer",p.callPlayer),a(this,"duration",null),a(this,"currentTime",null),a(this,"secondsLoaded",null),a(this,"mute",(()=>{})),a(this,"unmute",(()=>{})),a(this,"ref",(e=>{this.iframe=e}))}componentDidMount(){this.props.onMount&&this.props.onMount(this)}load(e){(0,p.getSDK)(E,L).then((e=>{this.player=e.PlayerWidget(this.iframe),this.player.ready.then((()=>{this.player.events.play.on(this.props.onPlay),this.player.events.pause.on(this.props.onPause),this.player.events.ended.on(this.props.onEnded),this.player.events.error.on(this.props.error),this.player.events.progress.on(((e,t)=>{this.currentTime=e,this.duration=t})),this.props.onReady()}))}),this.props.onError)}play(){this.callPlayer("play")}pause(){this.callPlayer("pause")}stop(){}seekTo(e,t=!0){this.callPlayer("seek",e),t||this.pause()}setVolume(e){}getDuration(){return this.duration}getCurrentTime(){return this.currentTime}getSecondsLoaded(){return null}render(){const{url:e,config:t}=this.props,r=e.match(y.MATCH_URL_MIXCLOUD)[1],o=(0,p.queryString)({...t.options,feed:`/${r}/`});return u.default.createElement("iframe",{key:r,ref:this.ref,style:{width:"100%",height:"100%"},src:`https://www.mixcloud.com/widget/iframe/?${o}`,frameBorder:"0",allow:"autoplay"})}}a(l,"displayName","Mixcloud"),a(l,"canPlay",y.canPlay.mixcloud),a(l,"loopOnEnded",!0);const T=_(h),A=v({__proto__:null,default:T},[h]);export{A as M}; \ No newline at end of file diff --git a/storybook-static/assets/Modal-CNp0gEVS.js b/storybook-static/assets/Modal-DXxaFBTe.js similarity index 98% rename from storybook-static/assets/Modal-CNp0gEVS.js rename to storybook-static/assets/Modal-DXxaFBTe.js index 99bcdb80e1..4e1cb987b6 100644 --- a/storybook-static/assets/Modal-CNp0gEVS.js +++ b/storybook-static/assets/Modal-DXxaFBTe.js @@ -1,4 +1,4 @@ -import{j as r}from"./jsx-runtime-CexXSJP5.js";import{R as a}from"./index-BBRV8eG_.js";import{a as l}from"./index-BP8_t0zE.js";import{P as d}from"./index-Snk9MO9S.js";import{n as f}from"./emotion-styled.browser.esm-Dz2BNYeh.js";import{a as c}from"./theme-ui-components.esm-DCiJ1mMX.js";var w=!!(typeof window<"u"&&window.document&&window.document.createElement),v=function(){function e(e,t){for(var n=0;n{const{children:t,width:n,height:o,isOpen:i,sx:a}=e,d=f(c)` +import{j as r}from"./jsx-runtime-CexXSJP5.js";import{R as a}from"./index-BBRV8eG_.js";import{a as l}from"./index-BP8_t0zE.js";import{P as d}from"./index-Snk9MO9S.js";import{n as f}from"./emotion-styled.browser.esm-Dz2BNYeh.js";import{a as c}from"./theme-ui-components.esm-BngKL4Rx.js";var w=!!(typeof window<"u"&&window.document&&window.document.createElement),v=function(){function e(e,t){for(var n=0;n{const{children:t,width:n,height:o,isOpen:i,sx:a}=e,d=f(c)` position: fixed; top: 0; left: 0; diff --git a/storybook-static/assets/Modal.stories-BGpb3yBy.js b/storybook-static/assets/Modal.stories-B-r6DmaS.js similarity index 92% rename from storybook-static/assets/Modal.stories-BGpb3yBy.js rename to storybook-static/assets/Modal.stories-B-r6DmaS.js index 8c00aedd1f..e51d0d0f60 100644 --- a/storybook-static/assets/Modal.stories-BGpb3yBy.js +++ b/storybook-static/assets/Modal.stories-B-r6DmaS.js @@ -1 +1 @@ -import{j as s}from"./jsx-runtime-CexXSJP5.js";import{M as i}from"./Modal-CNp0gEVS.js";import"./index-BP8_t0zE.js";import"./index-BBRV8eG_.js";import"./index-Snk9MO9S.js";import"./emotion-styled.browser.esm-Dz2BNYeh.js";import"./extends-CF3RwP-h.js";import"./parseProps-780b287c.browser.esm-DiCerVr_.js";import"./emotion-use-insertion-effect-with-fallbacks.browser.esm-UWD3gXM2.js";import"./theme-ui-components.esm-DCiJ1mMX.js";import"./theme-ui-core-jsx-runtime.browser.esm-CH0qhC10.js";import"./hoist-non-react-statics.cjs-CQI8syxn.js";const E={title:"Layout/Modal",component:i},D=()=>alert("Dismissed"),e=()=>s.jsx(i,{isOpen:!0,onDidDismiss:D,children:s.jsx(s.Fragment,{children:"Some Content"})}),o=()=>s.jsx(i,{isOpen:!1}),r=()=>s.jsx(i,{isOpen:!0,onDidDismiss:D,height:100,width:100,children:s.jsx(s.Fragment,{children:"Sized Modal"})});var t,a,d,m,n,p,c,l,u;e.parameters={...e.parameters,docs:{...null==(t=e.parameters)?void 0:t.docs,source:{originalSource:"() => \n <>Some Content\n ",...null==(d=null==(a=e.parameters)?void 0:a.docs)?void 0:d.source}}},o.parameters={...o.parameters,docs:{...null==(m=o.parameters)?void 0:m.docs,source:{originalSource:"() => ",...null==(p=null==(n=o.parameters)?void 0:n.docs)?void 0:p.source}}},r.parameters={...r.parameters,docs:{...null==(c=r.parameters)?void 0:c.docs,source:{originalSource:"() => \n <>Sized Modal\n ",...null==(u=null==(l=r.parameters)?void 0:l.docs)?void 0:u.source}}};const F=["Default","Collapsed","Sized"];export{o as Collapsed,e as Default,r as Sized,F as __namedExportsOrder,E as default}; \ No newline at end of file +import{j as s}from"./jsx-runtime-CexXSJP5.js";import{M as i}from"./Modal-DXxaFBTe.js";import"./index-BP8_t0zE.js";import"./index-BBRV8eG_.js";import"./index-Snk9MO9S.js";import"./emotion-styled.browser.esm-Dz2BNYeh.js";import"./extends-CF3RwP-h.js";import"./parseProps-780b287c.browser.esm-DiCerVr_.js";import"./emotion-use-insertion-effect-with-fallbacks.browser.esm-UWD3gXM2.js";import"./theme-ui-components.esm-BngKL4Rx.js";import"./theme-ui-core-jsx-runtime.browser.esm-CH0qhC10.js";import"./hoist-non-react-statics.cjs-CQI8syxn.js";const E={title:"Layout/Modal",component:i},D=()=>alert("Dismissed"),e=()=>s.jsx(i,{isOpen:!0,onDidDismiss:D,children:s.jsx(s.Fragment,{children:"Some Content"})}),o=()=>s.jsx(i,{isOpen:!1}),r=()=>s.jsx(i,{isOpen:!0,onDidDismiss:D,height:100,width:100,children:s.jsx(s.Fragment,{children:"Sized Modal"})});var t,a,d,m,n,p,c,l,u;e.parameters={...e.parameters,docs:{...null==(t=e.parameters)?void 0:t.docs,source:{originalSource:"() => \n <>Some Content\n ",...null==(d=null==(a=e.parameters)?void 0:a.docs)?void 0:d.source}}},o.parameters={...o.parameters,docs:{...null==(m=o.parameters)?void 0:m.docs,source:{originalSource:"() => ",...null==(p=null==(n=o.parameters)?void 0:n.docs)?void 0:p.source}}},r.parameters={...r.parameters,docs:{...null==(c=r.parameters)?void 0:c.docs,source:{originalSource:"() => \n <>Sized Modal\n ",...null==(u=null==(l=r.parameters)?void 0:l.docs)?void 0:u.source}}};const F=["Default","Collapsed","Sized"];export{o as Collapsed,e as Default,r as Sized,F as __namedExportsOrder,E as default}; \ No newline at end of file diff --git a/storybook-static/assets/ModerationStatus-i6sV2GYn.js b/storybook-static/assets/ModerationStatus-CWLvcR2F.js similarity index 94% rename from storybook-static/assets/ModerationStatus-i6sV2GYn.js rename to storybook-static/assets/ModerationStatus-CWLvcR2F.js index 903210e369..cebb092975 100644 --- a/storybook-static/assets/ModerationStatus-i6sV2GYn.js +++ b/storybook-static/assets/ModerationStatus-CWLvcR2F.js @@ -1 +1 @@ -import{j as i}from"./jsx-runtime-CexXSJP5.js";import{T as s}from"./theme-ui-components.esm-DCiJ1mMX.js";const o=e=>{const{contentType:t,sx:a}=e;let{status:o}=e;if("accepted"===o)return null;"event"===t&&(o="draft"!==o?o:"awaiting-moderation");let n="";switch(o){case"rejected":n="howto"===t?"Needs to improve to be accepted":"Rejected";break;case"draft":n="Draft";break;default:n="Awaiting moderation"}return i.jsx(s,{sx:{...a,display:"inline-block",color:"rejected"===o?"red":"black",fontSize:1,whiteSpace:"nowrap",textOverflow:"ellipsis",overflow:"hidden",background:"accent.base",padding:1,borderRadius:1,borderBottomRightRadius:1},"data-cy":`moderationstatus-${o}`,children:n})};try{o.displayName="ModerationStatus",o.__docgenInfo={description:"",displayName:"ModerationStatus",props:{status:{defaultValue:null,description:"",name:"status",required:!0,type:{name:"string"}},contentType:{defaultValue:null,description:"",name:"contentType",required:!0,type:{name:"enum",value:[{value:'"event"'},{value:'"howto"'},{value:'"research"'},{value:'"question"'}]}},sx:{defaultValue:null,description:"",name:"sx",required:!1,type:{name:"ThemeUIStyleObject"}}}}}catch{}export{o as M}; \ No newline at end of file +import{j as i}from"./jsx-runtime-CexXSJP5.js";import{T as s}from"./theme-ui-components.esm-BngKL4Rx.js";const o=e=>{const{contentType:t,sx:a}=e;let{status:o}=e;if("accepted"===o)return null;"event"===t&&(o="draft"!==o?o:"awaiting-moderation");let n="";switch(o){case"rejected":n="howto"===t?"Needs to improve to be accepted":"Rejected";break;case"draft":n="Draft";break;default:n="Awaiting moderation"}return i.jsx(s,{sx:{...a,display:"inline-block",color:"rejected"===o?"red":"black",fontSize:1,whiteSpace:"nowrap",textOverflow:"ellipsis",overflow:"hidden",background:"accent.base",padding:1,borderRadius:1,borderBottomRightRadius:1},"data-cy":`moderationstatus-${o}`,children:n})};try{o.displayName="ModerationStatus",o.__docgenInfo={description:"",displayName:"ModerationStatus",props:{status:{defaultValue:null,description:"",name:"status",required:!0,type:{name:"string"}},contentType:{defaultValue:null,description:"",name:"contentType",required:!0,type:{name:"enum",value:[{value:'"event"'},{value:'"howto"'},{value:'"research"'},{value:'"question"'}]}},sx:{defaultValue:null,description:"",name:"sx",required:!1,type:{name:"ThemeUIStyleObject"}}}}}catch{}export{o as M}; \ No newline at end of file diff --git a/storybook-static/assets/ModerationStatus.stories-CiEV2mcg.js b/storybook-static/assets/ModerationStatus.stories-Cq_9dB1K.js similarity index 94% rename from storybook-static/assets/ModerationStatus.stories-CiEV2mcg.js rename to storybook-static/assets/ModerationStatus.stories-Cq_9dB1K.js index 52257d7360..06d522bfc6 100644 --- a/storybook-static/assets/ModerationStatus.stories-CiEV2mcg.js +++ b/storybook-static/assets/ModerationStatus.stories-Cq_9dB1K.js @@ -1 +1 @@ -import{j as t}from"./jsx-runtime-CexXSJP5.js";import{M as e}from"./ModerationStatus-i6sV2GYn.js";import"./index-BP8_t0zE.js";import"./theme-ui-components.esm-DCiJ1mMX.js";import"./parseProps-780b287c.browser.esm-DiCerVr_.js";import"./emotion-use-insertion-effect-with-fallbacks.browser.esm-UWD3gXM2.js";import"./theme-ui-core-jsx-runtime.browser.esm-CH0qhC10.js";import"./hoist-non-react-statics.cjs-CQI8syxn.js";const E={title:"Components/ModerationStatus",component:e},o=()=>t.jsx(e,{contentType:"event",status:"draft"}),s=()=>t.jsx(e,{contentType:"event",status:"rejected"}),a=()=>t.jsx(e,{contentType:"event",status:"awaiting-moderation"}),r=()=>t.jsx(e,{contentType:"howto",status:"draft"}),n=()=>t.jsxs(t.Fragment,{children:[t.jsx(e,{contentType:"event",status:"accepted"}),"The status text should not be shown."]});var c,p,d,u,i,m,S,j,l,x,T,f,g,w,y;o.parameters={...o.parameters,docs:{...null==(c=o.parameters)?void 0:c.docs,source:{originalSource:"() => ",...null==(d=null==(p=o.parameters)?void 0:p.docs)?void 0:d.source}}},s.parameters={...s.parameters,docs:{...null==(u=s.parameters)?void 0:u.docs,source:{originalSource:"() => ",...null==(m=null==(i=s.parameters)?void 0:i.docs)?void 0:m.source}}},a.parameters={...a.parameters,docs:{...null==(S=a.parameters)?void 0:S.docs,source:{originalSource:"() => ",...null==(l=null==(j=a.parameters)?void 0:j.docs)?void 0:l.source}}},r.parameters={...r.parameters,docs:{...null==(x=r.parameters)?void 0:x.docs,source:{originalSource:"() => ",...null==(f=null==(T=r.parameters)?void 0:T.docs)?void 0:f.source}}},n.parameters={...n.parameters,docs:{...null==(g=n.parameters)?void 0:g.docs,source:{originalSource:"() => <>\n \n The status text should not be shown.\n ",...null==(y=null==(w=n.parameters)?void 0:w.docs)?void 0:y.source}}};const H=["Default","Rejected","Awaiting","HowtoDraft","Accepted"];export{n as Accepted,a as Awaiting,o as Default,r as HowtoDraft,s as Rejected,H as __namedExportsOrder,E as default}; \ No newline at end of file +import{j as t}from"./jsx-runtime-CexXSJP5.js";import{M as e}from"./ModerationStatus-CWLvcR2F.js";import"./index-BP8_t0zE.js";import"./theme-ui-components.esm-BngKL4Rx.js";import"./parseProps-780b287c.browser.esm-DiCerVr_.js";import"./emotion-use-insertion-effect-with-fallbacks.browser.esm-UWD3gXM2.js";import"./theme-ui-core-jsx-runtime.browser.esm-CH0qhC10.js";import"./hoist-non-react-statics.cjs-CQI8syxn.js";const E={title:"Components/ModerationStatus",component:e},o=()=>t.jsx(e,{contentType:"event",status:"draft"}),s=()=>t.jsx(e,{contentType:"event",status:"rejected"}),a=()=>t.jsx(e,{contentType:"event",status:"awaiting-moderation"}),r=()=>t.jsx(e,{contentType:"howto",status:"draft"}),n=()=>t.jsxs(t.Fragment,{children:[t.jsx(e,{contentType:"event",status:"accepted"}),"The status text should not be shown."]});var c,p,d,u,i,m,S,j,l,x,T,f,g,w,y;o.parameters={...o.parameters,docs:{...null==(c=o.parameters)?void 0:c.docs,source:{originalSource:"() => ",...null==(d=null==(p=o.parameters)?void 0:p.docs)?void 0:d.source}}},s.parameters={...s.parameters,docs:{...null==(u=s.parameters)?void 0:u.docs,source:{originalSource:"() => ",...null==(m=null==(i=s.parameters)?void 0:i.docs)?void 0:m.source}}},a.parameters={...a.parameters,docs:{...null==(S=a.parameters)?void 0:S.docs,source:{originalSource:"() => ",...null==(l=null==(j=a.parameters)?void 0:j.docs)?void 0:l.source}}},r.parameters={...r.parameters,docs:{...null==(x=r.parameters)?void 0:x.docs,source:{originalSource:"() => ",...null==(f=null==(T=r.parameters)?void 0:T.docs)?void 0:f.source}}},n.parameters={...n.parameters,docs:{...null==(g=n.parameters)?void 0:g.docs,source:{originalSource:"() => <>\n \n The status text should not be shown.\n ",...null==(y=null==(w=n.parameters)?void 0:w.docs)?void 0:y.source}}};const H=["Default","Rejected","Awaiting","HowtoDraft","Accepted"];export{n as Accepted,a as Awaiting,o as Default,r as HowtoDraft,s as Rejected,H as __namedExportsOrder,E as default}; \ No newline at end of file diff --git a/storybook-static/assets/MoreContainer-BHO-aLZj.js b/storybook-static/assets/MoreContainer-CcsKR2f8.js similarity index 98% rename from storybook-static/assets/MoreContainer-BHO-aLZj.js rename to storybook-static/assets/MoreContainer-CcsKR2f8.js index a011305dfd..7c6aebd4ce 100644 --- a/storybook-static/assets/MoreContainer-BHO-aLZj.js +++ b/storybook-static/assets/MoreContainer-CcsKR2f8.js @@ -1,4 +1,4 @@ -import{j as r}from"./jsx-runtime-CexXSJP5.js";import{n as c}from"./emotion-styled.browser.esm-Dz2BNYeh.js";import{u as o}from"./theme-ui-core.browser.esm-CIov4Ln1.js";import{a}from"./theme-ui-components.esm-DCiJ1mMX.js";const i="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='utf-8'?%3e%3c!--%20Generator:%20Adobe%20Illustrator%2022.1.0,%20SVG%20Export%20Plug-In%20.%20SVG%20Version:%206.00%20Build%200)%20--%3e%3csvg%20version='1.1'%20id='Layer_1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20x='0px'%20y='0px'%20viewBox='0%200%20476.8%20303.4'%20style='enable-background:new%200%200%20476.8%20303.4;'%20xml:space='preserve'%3e%3cstyle%20type='text/css'%3e%20.st0{fill:%23FFFFFF;}%20%3c/style%3e%3cpath%20class='st0'%20d='M1.5,130.3c-2.4,24.9-1.7,19.9-1.5,46.2s5.1,51.4,12,69c6.5,16.7,13,31.5,32.5,43.1%20c19.1,11.3,38.3,17,68.3,13.2c30.1-3.8,52.3-8.9,65-13.3c26.5-9.4,45.3-13.9,86.3-13.9c84,0,64.7,20.4,154.9-8%20c17.8-5.5,40.7-48,44.9-59.2s15.2-43.6,12.2-106.8S435.8,8.8,409,4.3s-92-8.8-150.3,10.8c-61.4,20.5-66.9,7.2-110.2,5.7%20c-39.4-1.2-62.7-8.8-102,17.5C24.3,53,8.6,56.8,1.5,130.3z'/%3e%3c/svg%3e",l="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='utf-8'?%3e%3c!--%20Generator:%20Adobe%20Illustrator%2022.1.0,%20SVG%20Export%20Plug-In%20.%20SVG%20Version:%206.00%20Build%200)%20--%3e%3csvg%20version='1.1'%20id='Layer_1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20x='0px'%20y='0px'%20viewBox='0%200%20476.8%20147.4'%20style='enable-background:new%200%200%20476.8%20147.4;'%20xml:space='preserve'%3e%3cstyle%20type='text/css'%3e%20.st0{fill:%23FFFFFF;}%20%3c/style%3e%3cpath%20class='st0'%20d='M1.5,63.4C-0.9,75.4-0.2,73.1,0,85.7s5.1,24.9,12,33.4c6.5,8.1,13,15.3,32.5,20.9c19.1,5.5,38.3,8.2,68.3,6.4%20c30.1-1.8,52.3-4.3,65-6.4c26.5-4.5,45.3-6.7,86.3-6.7c84,0,64.7,9.9,154.9-3.8c17.8-2.7,40.7-23.3,44.9-28.6%20c4.2-5.4,15.2-21.1,12.2-51.7S435.8,4.5,409,2.4s-92-4.3-150.3,5.3c-61.4,9.9-66.9,3.5-110.2,2.7c-39.4-0.6-62.7-4.3-102,8.5%20C24.3,25.9,8.6,27.8,1.5,63.4z'/%3e%3c/svg%3e",x="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='utf-8'?%3e%3c!--%20Generator:%20Adobe%20Illustrator%2022.1.0,%20SVG%20Export%20Plug-In%20.%20SVG%20Version:%206.00%20Build%200)%20--%3e%3csvg%20version='1.1'%20id='Layer_1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20x='0px'%20y='0px'%20viewBox='0%200%20476.8%20123.4'%20style='enable-background:new%200%200%20476.8%20123.4;'%20xml:space='preserve'%3e%3cstyle%20type='text/css'%3e%20.st0{fill:%23FFFFFF;}%20%3c/style%3e%3cpath%20class='st0'%20d='M1.5,53.2C-0.9,63.3-0.2,61.3,0,71.9s5.1,20.9,12,28c6.5,6.8,13,12.8,32.5,17.5c19.1,4.6,38.3,6.9,68.3,5.4%20c30.1-1.5,52.3-3.6,65-5.4c26.5-3.8,45.3-5.6,86.3-5.6c84,0,64.7,8.3,154.9-3.2c17.8-2.3,40.7-19.5,44.9-24s15.2-17.7,12.2-43.3%20S435.8,3.9,409,2.1s-92-3.6-150.3,4.4c-61.4,8.3-66.9,2.9-110.2,2.3c-39.4-0.5-62.7-3.6-102,7.1C24.3,21.8,8.6,23.4,1.5,53.2z'/%3e%3c/svg%3e",d="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='utf-8'?%3e%3c!--%20Generator:%20Adobe%20Illustrator%2022.1.0,%20SVG%20Export%20Plug-In%20.%20SVG%20Version:%206.00%20Build%200)%20--%3e%3csvg%20version='1.1'%20id='Layer_1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20x='0px'%20y='0px'%20viewBox='0%200%20476.8%20123.4'%20style='enable-background:new%200%200%20476.8%20123.4;'%20xml:space='preserve'%3e%3cstyle%20type='text/css'%3e%20.st0{fill:%23FFFFFF;}%20%3c/style%3e%3cpath%20class='st0'%20d='M1.5,53.2C-0.9,63.3-0.2,61.3,0,71.9s5.1,20.9,12,28c6.5,6.8,13,12.8,32.5,17.5c19.1,4.6,38.3,6.9,68.3,5.4%20c30.1-1.5,52.3-3.6,65-5.4c26.5-3.8,45.3-5.6,86.3-5.6c84,0,64.7,8.3,154.9-3.2c17.8-2.3,40.7-19.5,44.9-24s15.2-17.7,12.2-43.3%20S435.8,3.9,409,2.1s-92-3.6-150.3,4.4c-61.4,8.3-66.9,2.9-110.2,2.3c-39.4-0.5-62.7-3.6-102,7.1C24.3,21.8,8.6,23.4,1.5,53.2z'/%3e%3c/svg%3e",s=e=>{const{theme:s}=o(),t=c(a)` +import{j as r}from"./jsx-runtime-CexXSJP5.js";import{n as c}from"./emotion-styled.browser.esm-Dz2BNYeh.js";import{u as o}from"./theme-ui-core.browser.esm-CIov4Ln1.js";import{a}from"./theme-ui-components.esm-BngKL4Rx.js";const i="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='utf-8'?%3e%3c!--%20Generator:%20Adobe%20Illustrator%2022.1.0,%20SVG%20Export%20Plug-In%20.%20SVG%20Version:%206.00%20Build%200)%20--%3e%3csvg%20version='1.1'%20id='Layer_1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20x='0px'%20y='0px'%20viewBox='0%200%20476.8%20303.4'%20style='enable-background:new%200%200%20476.8%20303.4;'%20xml:space='preserve'%3e%3cstyle%20type='text/css'%3e%20.st0{fill:%23FFFFFF;}%20%3c/style%3e%3cpath%20class='st0'%20d='M1.5,130.3c-2.4,24.9-1.7,19.9-1.5,46.2s5.1,51.4,12,69c6.5,16.7,13,31.5,32.5,43.1%20c19.1,11.3,38.3,17,68.3,13.2c30.1-3.8,52.3-8.9,65-13.3c26.5-9.4,45.3-13.9,86.3-13.9c84,0,64.7,20.4,154.9-8%20c17.8-5.5,40.7-48,44.9-59.2s15.2-43.6,12.2-106.8S435.8,8.8,409,4.3s-92-8.8-150.3,10.8c-61.4,20.5-66.9,7.2-110.2,5.7%20c-39.4-1.2-62.7-8.8-102,17.5C24.3,53,8.6,56.8,1.5,130.3z'/%3e%3c/svg%3e",l="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='utf-8'?%3e%3c!--%20Generator:%20Adobe%20Illustrator%2022.1.0,%20SVG%20Export%20Plug-In%20.%20SVG%20Version:%206.00%20Build%200)%20--%3e%3csvg%20version='1.1'%20id='Layer_1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20x='0px'%20y='0px'%20viewBox='0%200%20476.8%20147.4'%20style='enable-background:new%200%200%20476.8%20147.4;'%20xml:space='preserve'%3e%3cstyle%20type='text/css'%3e%20.st0{fill:%23FFFFFF;}%20%3c/style%3e%3cpath%20class='st0'%20d='M1.5,63.4C-0.9,75.4-0.2,73.1,0,85.7s5.1,24.9,12,33.4c6.5,8.1,13,15.3,32.5,20.9c19.1,5.5,38.3,8.2,68.3,6.4%20c30.1-1.8,52.3-4.3,65-6.4c26.5-4.5,45.3-6.7,86.3-6.7c84,0,64.7,9.9,154.9-3.8c17.8-2.7,40.7-23.3,44.9-28.6%20c4.2-5.4,15.2-21.1,12.2-51.7S435.8,4.5,409,2.4s-92-4.3-150.3,5.3c-61.4,9.9-66.9,3.5-110.2,2.7c-39.4-0.6-62.7-4.3-102,8.5%20C24.3,25.9,8.6,27.8,1.5,63.4z'/%3e%3c/svg%3e",x="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='utf-8'?%3e%3c!--%20Generator:%20Adobe%20Illustrator%2022.1.0,%20SVG%20Export%20Plug-In%20.%20SVG%20Version:%206.00%20Build%200)%20--%3e%3csvg%20version='1.1'%20id='Layer_1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20x='0px'%20y='0px'%20viewBox='0%200%20476.8%20123.4'%20style='enable-background:new%200%200%20476.8%20123.4;'%20xml:space='preserve'%3e%3cstyle%20type='text/css'%3e%20.st0{fill:%23FFFFFF;}%20%3c/style%3e%3cpath%20class='st0'%20d='M1.5,53.2C-0.9,63.3-0.2,61.3,0,71.9s5.1,20.9,12,28c6.5,6.8,13,12.8,32.5,17.5c19.1,4.6,38.3,6.9,68.3,5.4%20c30.1-1.5,52.3-3.6,65-5.4c26.5-3.8,45.3-5.6,86.3-5.6c84,0,64.7,8.3,154.9-3.2c17.8-2.3,40.7-19.5,44.9-24s15.2-17.7,12.2-43.3%20S435.8,3.9,409,2.1s-92-3.6-150.3,4.4c-61.4,8.3-66.9,2.9-110.2,2.3c-39.4-0.5-62.7-3.6-102,7.1C24.3,21.8,8.6,23.4,1.5,53.2z'/%3e%3c/svg%3e",d="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='utf-8'?%3e%3c!--%20Generator:%20Adobe%20Illustrator%2022.1.0,%20SVG%20Export%20Plug-In%20.%20SVG%20Version:%206.00%20Build%200)%20--%3e%3csvg%20version='1.1'%20id='Layer_1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20x='0px'%20y='0px'%20viewBox='0%200%20476.8%20123.4'%20style='enable-background:new%200%200%20476.8%20123.4;'%20xml:space='preserve'%3e%3cstyle%20type='text/css'%3e%20.st0{fill:%23FFFFFF;}%20%3c/style%3e%3cpath%20class='st0'%20d='M1.5,53.2C-0.9,63.3-0.2,61.3,0,71.9s5.1,20.9,12,28c6.5,6.8,13,12.8,32.5,17.5c19.1,4.6,38.3,6.9,68.3,5.4%20c30.1-1.5,52.3-3.6,65-5.4c26.5-3.8,45.3-5.6,86.3-5.6c84,0,64.7,8.3,154.9-3.2c17.8-2.3,40.7-19.5,44.9-24s15.2-17.7,12.2-43.3%20S435.8,3.9,409,2.1s-92-3.6-150.3,4.4c-61.4,8.3-66.9,2.9-110.2,2.3c-39.4-0.5-62.7-3.6-102,7.1C24.3,21.8,8.6,23.4,1.5,53.2z'/%3e%3c/svg%3e",s=e=>{const{theme:s}=o(),t=c(a)` position: relative; max-width: 780px; &:after { diff --git a/storybook-static/assets/MoreContainer.stories-BZDjrecP.js b/storybook-static/assets/MoreContainer.stories-C00jNWh4.js similarity index 91% rename from storybook-static/assets/MoreContainer.stories-BZDjrecP.js rename to storybook-static/assets/MoreContainer.stories-C00jNWh4.js index 3585194bce..56aadb1081 100644 --- a/storybook-static/assets/MoreContainer.stories-BZDjrecP.js +++ b/storybook-static/assets/MoreContainer.stories-C00jNWh4.js @@ -1 +1 @@ -import{j as e}from"./jsx-runtime-CexXSJP5.js";import{M as a}from"./MoreContainer-BHO-aLZj.js";import{F as i,H as m}from"./theme-ui-components.esm-DCiJ1mMX.js";import"./index-BP8_t0zE.js";import"./emotion-styled.browser.esm-Dz2BNYeh.js";import"./extends-CF3RwP-h.js";import"./parseProps-780b287c.browser.esm-DiCerVr_.js";import"./emotion-use-insertion-effect-with-fallbacks.browser.esm-UWD3gXM2.js";import"./theme-ui-core.browser.esm-CIov4Ln1.js";import"./emotion-react.browser.esm-BYoRxRk_.js";import"./hoist-non-react-statics.cjs-CQI8syxn.js";import"./cjs-Clfm10Kj.js";import"./theme-ui-core-jsx-runtime.browser.esm-CH0qhC10.js";const C={title:"Layout/MoreContainer",component:a,parameters:{layout:"padded",backgrounds:{default:"twitter",values:[{name:"twitter",value:"#00aced"},{name:"facebook",value:"#3b5998"}]}}},t=()=>e.jsx(a,{m:"0 auto",pt:60,pb:90,children:e.jsxs(i,{sx:{alignItems:"center",flexDirection:"column"},mt:5,children:[e.jsx(m,{children:"Some heading"}),e.jsx(e.Fragment,{children:"Some content"})]})});var o,r,n;t.parameters={...t.parameters,docs:{...null==(o=t.parameters)?void 0:o.docs,source:{originalSource:"() => \n \n Some heading\n <>Some content\n \n ",...null==(n=null==(r=t.parameters)?void 0:r.docs)?void 0:n.source}}};const F=["Default"];export{t as Default,F as __namedExportsOrder,C as default}; \ No newline at end of file +import{j as e}from"./jsx-runtime-CexXSJP5.js";import{M as a}from"./MoreContainer-CcsKR2f8.js";import{F as i,H as m}from"./theme-ui-components.esm-BngKL4Rx.js";import"./index-BP8_t0zE.js";import"./emotion-styled.browser.esm-Dz2BNYeh.js";import"./extends-CF3RwP-h.js";import"./parseProps-780b287c.browser.esm-DiCerVr_.js";import"./emotion-use-insertion-effect-with-fallbacks.browser.esm-UWD3gXM2.js";import"./theme-ui-core.browser.esm-CIov4Ln1.js";import"./emotion-react.browser.esm-BYoRxRk_.js";import"./hoist-non-react-statics.cjs-CQI8syxn.js";import"./cjs-Clfm10Kj.js";import"./theme-ui-core-jsx-runtime.browser.esm-CH0qhC10.js";const C={title:"Layout/MoreContainer",component:a,parameters:{layout:"padded",backgrounds:{default:"twitter",values:[{name:"twitter",value:"#00aced"},{name:"facebook",value:"#3b5998"}]}}},t=()=>e.jsx(a,{m:"0 auto",pt:60,pb:90,children:e.jsxs(i,{sx:{alignItems:"center",flexDirection:"column"},mt:5,children:[e.jsx(m,{children:"Some heading"}),e.jsx(e.Fragment,{children:"Some content"})]})});var o,r,n;t.parameters={...t.parameters,docs:{...null==(o=t.parameters)?void 0:o.docs,source:{originalSource:"() => \n \n Some heading\n <>Some content\n \n ",...null==(n=null==(r=t.parameters)?void 0:r.docs)?void 0:n.source}}};const F=["Default"];export{t as Default,F as __namedExportsOrder,C as default}; \ No newline at end of file diff --git a/storybook-static/assets/Mux-CcD-OrTJ.js b/storybook-static/assets/Mux-BrXQb0bp.js similarity index 94% rename from storybook-static/assets/Mux-CcD-OrTJ.js rename to storybook-static/assets/Mux-BrXQb0bp.js index 7d1e856849..7b9472223f 100644 --- a/storybook-static/assets/Mux-CcD-OrTJ.js +++ b/storybook-static/assets/Mux-BrXQb0bp.js @@ -1 +1 @@ -import{_ as P}from"./iframe-B1GJESFe.js";import{g as E,r as g}from"./index-BP8_t0zE.js";import{p as _}from"./VideoPlayer-ggRAiP4x.js";function b(e,t){for(var n=0;nr[t]})}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}var L=Object.create,u=Object.defineProperty,I=Object.getOwnPropertyDescriptor,k=Object.getOwnPropertyNames,O=Object.getPrototypeOf,x=Object.prototype.hasOwnProperty,M=(e,t,n)=>t in e?u(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,R=(e,t)=>{for(var n in t)u(e,n,{get:t[n],enumerable:!0})},v=(e,t,n,r)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let i of k(t))!x.call(e,i)&&i!==n&&u(e,i,{get:()=>t[i],enumerable:!(r=I(t,i))||r.enumerable});return e},w=(e,t,n)=>(n=null!=e?L(O(e)):{},v(e&&e.__esModule?n:u(n,"default",{value:e,enumerable:!0}),e)),D=e=>v(u({},"__esModule",{value:!0}),e),n=(e,t,n)=>(M(e,"symbol"!=typeof t?t+"":t,n),n),m={};R(m,{default:()=>l});var y=D(m),f=w(g),p=_;const j="https://cdn.jsdelivr.net/npm/@mux/mux-player@VERSION/dist/mux-player.mjs";class l extends f.Component{constructor(){super(...arguments),n(this,"onReady",((...e)=>this.props.onReady(...e))),n(this,"onPlay",((...e)=>this.props.onPlay(...e))),n(this,"onBuffer",((...e)=>this.props.onBuffer(...e))),n(this,"onBufferEnd",((...e)=>this.props.onBufferEnd(...e))),n(this,"onPause",((...e)=>this.props.onPause(...e))),n(this,"onEnded",((...e)=>this.props.onEnded(...e))),n(this,"onError",((...e)=>this.props.onError(...e))),n(this,"onPlayBackRateChange",(e=>this.props.onPlaybackRateChange(e.target.playbackRate))),n(this,"onEnablePIP",((...e)=>this.props.onEnablePIP(...e))),n(this,"onSeek",(e=>{this.props.onSeek(e.target.currentTime)})),n(this,"onDurationChange",(()=>{const e=this.getDuration();this.props.onDuration(e)})),n(this,"mute",(()=>{this.player.muted=!0})),n(this,"unmute",(()=>{this.player.muted=!1})),n(this,"ref",(e=>{this.player=e}))}componentDidMount(){this.props.onMount&&this.props.onMount(this),this.addListeners(this.player);const e=this.getPlaybackId(this.props.url);e&&(this.player.playbackId=e)}componentWillUnmount(){this.player.playbackId=null,this.removeListeners(this.player)}addListeners(e){const{playsinline:t}=this.props;e.addEventListener("play",this.onPlay),e.addEventListener("waiting",this.onBuffer),e.addEventListener("playing",this.onBufferEnd),e.addEventListener("pause",this.onPause),e.addEventListener("seeked",this.onSeek),e.addEventListener("ended",this.onEnded),e.addEventListener("error",this.onError),e.addEventListener("ratechange",this.onPlayBackRateChange),e.addEventListener("enterpictureinpicture",this.onEnablePIP),e.addEventListener("leavepictureinpicture",this.onDisablePIP),e.addEventListener("webkitpresentationmodechanged",this.onPresentationModeChange),e.addEventListener("canplay",this.onReady),t&&e.setAttribute("playsinline","")}removeListeners(e){e.removeEventListener("canplay",this.onReady),e.removeEventListener("play",this.onPlay),e.removeEventListener("waiting",this.onBuffer),e.removeEventListener("playing",this.onBufferEnd),e.removeEventListener("pause",this.onPause),e.removeEventListener("seeked",this.onSeek),e.removeEventListener("ended",this.onEnded),e.removeEventListener("error",this.onError),e.removeEventListener("ratechange",this.onPlayBackRateChange),e.removeEventListener("enterpictureinpicture",this.onEnablePIP),e.removeEventListener("leavepictureinpicture",this.onDisablePIP),e.removeEventListener("canplay",this.onReady)}async load(e){var t;const{onError:n,config:r}=this.props;if(null==(t=globalThis.customElements)||!t.get("mux-player"))try{const e=j.replace("VERSION",r.version);await P((()=>import(`${e}`)),[],import.meta.url),this.props.onLoaded()}catch(s){n(s)}const[,i]=e.match(p.MATCH_URL_MUX);this.player.playbackId=i}play(){const e=this.player.play();e&&e.catch(this.props.onError)}pause(){this.player.pause()}stop(){this.player.playbackId=null}seekTo(e,t=!0){this.player.currentTime=e,t||this.pause()}setVolume(e){this.player.volume=e}enablePIP(){this.player.requestPictureInPicture&&document.pictureInPictureElement!==this.player&&this.player.requestPictureInPicture()}disablePIP(){document.exitPictureInPicture&&document.pictureInPictureElement===this.player&&document.exitPictureInPicture()}setPlaybackRate(e){try{this.player.playbackRate=e}catch(t){this.props.onError(t)}}getDuration(){if(!this.player)return null;const{duration:e,seekable:t}=this.player;return e===1/0&&t.length>0?t.end(t.length-1):e}getCurrentTime(){return this.player?this.player.currentTime:null}getSecondsLoaded(){if(!this.player)return null;const{buffered:e}=this.player;if(0===e.length)return 0;const t=e.end(e.length-1),n=this.getDuration();return t>n?n:t}getPlaybackId(e){const[,t]=e.match(p.MATCH_URL_MUX);return t}render(){const{url:e,playing:t,loop:n,controls:r,muted:i,config:s,width:o,height:a}=this.props,l={width:"auto"===o?o:"100%",height:"auto"===a?a:"100%"};return!1===r&&(l["--controls"]="none"),f.default.createElement("mux-player",{ref:this.ref,"playback-id":this.getPlaybackId(e),style:l,preload:"auto",autoPlay:t||void 0,muted:i?"":void 0,loop:n?"":void 0,...s.attributes})}}n(l,"displayName","Mux"),n(l,"canPlay",p.canPlay.mux);const C=E(y),N=b({__proto__:null,default:C},[y]);export{N as M}; \ No newline at end of file +import{_ as P}from"./iframe-BgaKNRp_.js";import{g as E,r as g}from"./index-BP8_t0zE.js";import{p as _}from"./VideoPlayer-DllXxlDZ.js";function b(e,t){for(var n=0;nr[t]})}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}var L=Object.create,u=Object.defineProperty,I=Object.getOwnPropertyDescriptor,k=Object.getOwnPropertyNames,O=Object.getPrototypeOf,x=Object.prototype.hasOwnProperty,M=(e,t,n)=>t in e?u(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,R=(e,t)=>{for(var n in t)u(e,n,{get:t[n],enumerable:!0})},v=(e,t,n,r)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let i of k(t))!x.call(e,i)&&i!==n&&u(e,i,{get:()=>t[i],enumerable:!(r=I(t,i))||r.enumerable});return e},w=(e,t,n)=>(n=null!=e?L(O(e)):{},v(e&&e.__esModule?n:u(n,"default",{value:e,enumerable:!0}),e)),D=e=>v(u({},"__esModule",{value:!0}),e),n=(e,t,n)=>(M(e,"symbol"!=typeof t?t+"":t,n),n),m={};R(m,{default:()=>l});var y=D(m),f=w(g),p=_;const j="https://cdn.jsdelivr.net/npm/@mux/mux-player@VERSION/dist/mux-player.mjs";class l extends f.Component{constructor(){super(...arguments),n(this,"onReady",((...e)=>this.props.onReady(...e))),n(this,"onPlay",((...e)=>this.props.onPlay(...e))),n(this,"onBuffer",((...e)=>this.props.onBuffer(...e))),n(this,"onBufferEnd",((...e)=>this.props.onBufferEnd(...e))),n(this,"onPause",((...e)=>this.props.onPause(...e))),n(this,"onEnded",((...e)=>this.props.onEnded(...e))),n(this,"onError",((...e)=>this.props.onError(...e))),n(this,"onPlayBackRateChange",(e=>this.props.onPlaybackRateChange(e.target.playbackRate))),n(this,"onEnablePIP",((...e)=>this.props.onEnablePIP(...e))),n(this,"onSeek",(e=>{this.props.onSeek(e.target.currentTime)})),n(this,"onDurationChange",(()=>{const e=this.getDuration();this.props.onDuration(e)})),n(this,"mute",(()=>{this.player.muted=!0})),n(this,"unmute",(()=>{this.player.muted=!1})),n(this,"ref",(e=>{this.player=e}))}componentDidMount(){this.props.onMount&&this.props.onMount(this),this.addListeners(this.player);const e=this.getPlaybackId(this.props.url);e&&(this.player.playbackId=e)}componentWillUnmount(){this.player.playbackId=null,this.removeListeners(this.player)}addListeners(e){const{playsinline:t}=this.props;e.addEventListener("play",this.onPlay),e.addEventListener("waiting",this.onBuffer),e.addEventListener("playing",this.onBufferEnd),e.addEventListener("pause",this.onPause),e.addEventListener("seeked",this.onSeek),e.addEventListener("ended",this.onEnded),e.addEventListener("error",this.onError),e.addEventListener("ratechange",this.onPlayBackRateChange),e.addEventListener("enterpictureinpicture",this.onEnablePIP),e.addEventListener("leavepictureinpicture",this.onDisablePIP),e.addEventListener("webkitpresentationmodechanged",this.onPresentationModeChange),e.addEventListener("canplay",this.onReady),t&&e.setAttribute("playsinline","")}removeListeners(e){e.removeEventListener("canplay",this.onReady),e.removeEventListener("play",this.onPlay),e.removeEventListener("waiting",this.onBuffer),e.removeEventListener("playing",this.onBufferEnd),e.removeEventListener("pause",this.onPause),e.removeEventListener("seeked",this.onSeek),e.removeEventListener("ended",this.onEnded),e.removeEventListener("error",this.onError),e.removeEventListener("ratechange",this.onPlayBackRateChange),e.removeEventListener("enterpictureinpicture",this.onEnablePIP),e.removeEventListener("leavepictureinpicture",this.onDisablePIP),e.removeEventListener("canplay",this.onReady)}async load(e){var t;const{onError:n,config:r}=this.props;if(null==(t=globalThis.customElements)||!t.get("mux-player"))try{const e=j.replace("VERSION",r.version);await P((()=>import(`${e}`)),[],import.meta.url),this.props.onLoaded()}catch(s){n(s)}const[,i]=e.match(p.MATCH_URL_MUX);this.player.playbackId=i}play(){const e=this.player.play();e&&e.catch(this.props.onError)}pause(){this.player.pause()}stop(){this.player.playbackId=null}seekTo(e,t=!0){this.player.currentTime=e,t||this.pause()}setVolume(e){this.player.volume=e}enablePIP(){this.player.requestPictureInPicture&&document.pictureInPictureElement!==this.player&&this.player.requestPictureInPicture()}disablePIP(){document.exitPictureInPicture&&document.pictureInPictureElement===this.player&&document.exitPictureInPicture()}setPlaybackRate(e){try{this.player.playbackRate=e}catch(t){this.props.onError(t)}}getDuration(){if(!this.player)return null;const{duration:e,seekable:t}=this.player;return e===1/0&&t.length>0?t.end(t.length-1):e}getCurrentTime(){return this.player?this.player.currentTime:null}getSecondsLoaded(){if(!this.player)return null;const{buffered:e}=this.player;if(0===e.length)return 0;const t=e.end(e.length-1),n=this.getDuration();return t>n?n:t}getPlaybackId(e){const[,t]=e.match(p.MATCH_URL_MUX);return t}render(){const{url:e,playing:t,loop:n,controls:r,muted:i,config:s,width:a,height:o}=this.props,l={width:"auto"===a?a:"100%",height:"auto"===o?o:"100%"};return!1===r&&(l["--controls"]="none"),f.default.createElement("mux-player",{ref:this.ref,"playback-id":this.getPlaybackId(e),style:l,preload:"auto",autoPlay:t||void 0,muted:i?"":void 0,loop:n?"":void 0,...s.attributes})}}n(l,"displayName","Mux"),n(l,"canPlay",p.canPlay.mux);const C=E(y),N=b({__proto__:null,default:C},[y]);export{N as M}; \ No newline at end of file diff --git a/storybook-static/assets/NotificationItem-BEQLiIOf.js b/storybook-static/assets/NotificationItem-BpOS05-u.js similarity index 96% rename from storybook-static/assets/NotificationItem-BEQLiIOf.js rename to storybook-static/assets/NotificationItem-BpOS05-u.js index 83906c99d4..ad22a58239 100644 --- a/storybook-static/assets/NotificationItem-BEQLiIOf.js +++ b/storybook-static/assets/NotificationItem-BpOS05-u.js @@ -1 +1 @@ -import{j as t}from"./jsx-runtime-CexXSJP5.js";import{T as n}from"./theme-ui-core.browser.esm-CIov4Ln1.js";import{I as i}from"./Icon-BoVZOGVD.js";import{F as o,a as s}from"./theme-ui-components.esm-DCiJ1mMX.js";function u(e){return["howto_useful","research_useful"].includes(e)?"useful":["howto_approved","map_pin_approved","research_approved"].includes(e)?"check":["howto_needs_updates","map_pin_needs_updates","research_needs_updates"].includes(e)?"edit":"research_update"===e?"thunderbolt":"comment"}const r=e=>{const{type:a}=e;return t.jsx(o,{bg:"white","data-cy":"notification",sx:{flexDirection:"column",fontSize:"12px",marginBottom:2,paddingBottom:2,borderBottom:"1px solid #c7c7c7",fontFamily:"Inter, sans-serif"},children:t.jsx(n,{theme:{styles:{a:{textDecoration:"underline",color:"#61646b",display:"inline","&:hover":{textDecoration:"none"}}}},children:t.jsxs(o,{sx:{gap:1,flexDirection:"row"},children:[t.jsx(i,{glyph:u(a),size:15}),t.jsx(s,{sx:{textAlign:"left"},children:e.children})]})})})};try{r.displayName="NotificationItem",r.__docgenInfo={description:"",displayName:"NotificationItem",props:{type:{defaultValue:null,description:"",name:"type",required:!0,type:{name:"enum",value:[{value:'"new_comment"'},{value:'"howto_useful"'},{value:'"howto_mention"'},{value:'"howto_approved"'},{value:'"howto_needs_updates"'},{value:'"map_pin_approved"'},{value:'"map_pin_needs_updates"'},{value:'"new_comment_discussion"'},{value:'"new_comment_research"'},{value:'"research_useful"'},{value:'"research_mention"'},{value:'"research_update"'},{value:'"research_approved"'},{value:'"research_needs_updates"'}]}}}}}catch{}export{r as N}; \ No newline at end of file +import{j as t}from"./jsx-runtime-CexXSJP5.js";import{T as n}from"./theme-ui-core.browser.esm-CIov4Ln1.js";import{I as i}from"./Icon-BoVZOGVD.js";import{F as o,a as s}from"./theme-ui-components.esm-BngKL4Rx.js";function u(e){return["howto_useful","research_useful"].includes(e)?"useful":["howto_approved","map_pin_approved","research_approved"].includes(e)?"check":["howto_needs_updates","map_pin_needs_updates","research_needs_updates"].includes(e)?"edit":"research_update"===e?"thunderbolt":"comment"}const r=e=>{const{type:a}=e;return t.jsx(o,{bg:"white","data-cy":"notification",sx:{flexDirection:"column",fontSize:"12px",marginBottom:2,paddingBottom:2,borderBottom:"1px solid #c7c7c7",fontFamily:"Inter, sans-serif"},children:t.jsx(n,{theme:{styles:{a:{textDecoration:"underline",color:"#61646b",display:"inline","&:hover":{textDecoration:"none"}}}},children:t.jsxs(o,{sx:{gap:1,flexDirection:"row"},children:[t.jsx(i,{glyph:u(a),size:15}),t.jsx(s,{sx:{textAlign:"left"},children:e.children})]})})})};try{r.displayName="NotificationItem",r.__docgenInfo={description:"",displayName:"NotificationItem",props:{type:{defaultValue:null,description:"",name:"type",required:!0,type:{name:"enum",value:[{value:'"new_comment"'},{value:'"howto_useful"'},{value:'"howto_mention"'},{value:'"howto_approved"'},{value:'"howto_needs_updates"'},{value:'"map_pin_approved"'},{value:'"map_pin_needs_updates"'},{value:'"new_comment_discussion"'},{value:'"new_comment_research"'},{value:'"research_useful"'},{value:'"research_mention"'},{value:'"research_update"'},{value:'"research_approved"'},{value:'"research_needs_updates"'}]}}}}}catch{}export{r as N}; \ No newline at end of file diff --git a/storybook-static/assets/NotificationItem.stories-D0cQuM9z.js b/storybook-static/assets/NotificationItem.stories-BgiQ5ZN5.js similarity index 93% rename from storybook-static/assets/NotificationItem.stories-D0cQuM9z.js rename to storybook-static/assets/NotificationItem.stories-BgiQ5ZN5.js index 97db2843d6..f60dc1a01e 100644 --- a/storybook-static/assets/NotificationItem.stories-D0cQuM9z.js +++ b/storybook-static/assets/NotificationItem.stories-BgiQ5ZN5.js @@ -1 +1 @@ -import{j as t}from"./jsx-runtime-CexXSJP5.js";import{y as o}from"./index-D_kXk1yT.js";import{N as e}from"./NotificationItem-BEQLiIOf.js";import"./index-BP8_t0zE.js";import"./theme-ui-core.browser.esm-CIov4Ln1.js";import"./emotion-react.browser.esm-BYoRxRk_.js";import"./parseProps-780b287c.browser.esm-DiCerVr_.js";import"./emotion-use-insertion-effect-with-fallbacks.browser.esm-UWD3gXM2.js";import"./hoist-non-react-statics.cjs-CQI8syxn.js";import"./cjs-Clfm10Kj.js";import"./Icon-BoVZOGVD.js";import"./emotion-styled.browser.esm-Dz2BNYeh.js";import"./extends-CF3RwP-h.js";import"./supporter-D7hp958O.js";import"./icon-arrow-down-CJeToCJe.js";import"./icon-star-active-ClN6U5FF.js";import"./theme-ui-core-jsx-runtime.browser.esm-CH0qhC10.js";import"./theme-ui-components.esm-DCiJ1mMX.js";const H={title:"Components/NotificationItem",component:e},r=()=>t.jsx(e,{type:"howto_useful",children:o.lorem.sentence()}),s=()=>t.jsxs(e,{type:"new_comment",children:["(Legacy)",o.lorem.sentence()]}),m=()=>t.jsx(e,{type:"new_comment_discussion",children:o.lorem.sentence()}),n=()=>t.jsxs(e,{type:"new_comment_research",children:["(Legacy)",o.lorem.sentence()]}),c=()=>t.jsx(e,{type:"research_useful",children:o.lorem.sentence()});var a,i,p,u,f,l,d,_,y,h,N,I,g,x,w;r.parameters={...r.parameters,docs:{...null==(a=r.parameters)?void 0:a.docs,source:{originalSource:'() => \n {faker.lorem.sentence()}\n ',...null==(p=null==(i=r.parameters)?void 0:i.docs)?void 0:p.source}}},s.parameters={...s.parameters,docs:{...null==(u=s.parameters)?void 0:u.docs,source:{originalSource:'() => \n (Legacy)\n {faker.lorem.sentence()}\n ',...null==(l=null==(f=s.parameters)?void 0:f.docs)?void 0:l.source}}},m.parameters={...m.parameters,docs:{...null==(d=m.parameters)?void 0:d.docs,source:{originalSource:'() => \n {faker.lorem.sentence()}\n ',...null==(y=null==(_=m.parameters)?void 0:_.docs)?void 0:y.source}}},n.parameters={...n.parameters,docs:{...null==(h=n.parameters)?void 0:h.docs,source:{originalSource:'() => \n (Legacy)\n {faker.lorem.sentence()}\n ',...null==(I=null==(N=n.parameters)?void 0:N.docs)?void 0:I.source}}},c.parameters={...c.parameters,docs:{...null==(g=c.parameters)?void 0:g.docs,source:{originalSource:'() => \n {faker.lorem.sentence()}\n ',...null==(w=null==(x=c.parameters)?void 0:x.docs)?void 0:w.source}}};const J=["Default","Comment","CommentDiscussion","CommentResearch","UsefulResearch"];export{s as Comment,m as CommentDiscussion,n as CommentResearch,r as Default,c as UsefulResearch,J as __namedExportsOrder,H as default}; \ No newline at end of file +import{j as t}from"./jsx-runtime-CexXSJP5.js";import{y as o}from"./index-D_kXk1yT.js";import{N as e}from"./NotificationItem-BpOS05-u.js";import"./index-BP8_t0zE.js";import"./theme-ui-core.browser.esm-CIov4Ln1.js";import"./emotion-react.browser.esm-BYoRxRk_.js";import"./parseProps-780b287c.browser.esm-DiCerVr_.js";import"./emotion-use-insertion-effect-with-fallbacks.browser.esm-UWD3gXM2.js";import"./hoist-non-react-statics.cjs-CQI8syxn.js";import"./cjs-Clfm10Kj.js";import"./Icon-BoVZOGVD.js";import"./emotion-styled.browser.esm-Dz2BNYeh.js";import"./extends-CF3RwP-h.js";import"./supporter-D7hp958O.js";import"./icon-arrow-down-CJeToCJe.js";import"./icon-star-active-ClN6U5FF.js";import"./theme-ui-core-jsx-runtime.browser.esm-CH0qhC10.js";import"./theme-ui-components.esm-BngKL4Rx.js";const H={title:"Components/NotificationItem",component:e},r=()=>t.jsx(e,{type:"howto_useful",children:o.lorem.sentence()}),s=()=>t.jsxs(e,{type:"new_comment",children:["(Legacy)",o.lorem.sentence()]}),m=()=>t.jsx(e,{type:"new_comment_discussion",children:o.lorem.sentence()}),n=()=>t.jsxs(e,{type:"new_comment_research",children:["(Legacy)",o.lorem.sentence()]}),c=()=>t.jsx(e,{type:"research_useful",children:o.lorem.sentence()});var a,i,p,u,f,l,d,_,y,h,N,I,g,x,w;r.parameters={...r.parameters,docs:{...null==(a=r.parameters)?void 0:a.docs,source:{originalSource:'() => \n {faker.lorem.sentence()}\n ',...null==(p=null==(i=r.parameters)?void 0:i.docs)?void 0:p.source}}},s.parameters={...s.parameters,docs:{...null==(u=s.parameters)?void 0:u.docs,source:{originalSource:'() => \n (Legacy)\n {faker.lorem.sentence()}\n ',...null==(l=null==(f=s.parameters)?void 0:f.docs)?void 0:l.source}}},m.parameters={...m.parameters,docs:{...null==(d=m.parameters)?void 0:d.docs,source:{originalSource:'() => \n {faker.lorem.sentence()}\n ',...null==(y=null==(_=m.parameters)?void 0:_.docs)?void 0:y.source}}},n.parameters={...n.parameters,docs:{...null==(h=n.parameters)?void 0:h.docs,source:{originalSource:'() => \n (Legacy)\n {faker.lorem.sentence()}\n ',...null==(I=null==(N=n.parameters)?void 0:N.docs)?void 0:I.source}}},c.parameters={...c.parameters,docs:{...null==(g=c.parameters)?void 0:g.docs,source:{originalSource:'() => \n {faker.lorem.sentence()}\n ',...null==(w=null==(x=c.parameters)?void 0:x.docs)?void 0:w.source}}};const J=["Default","Comment","CommentDiscussion","CommentResearch","UsefulResearch"];export{s as Comment,m as CommentDiscussion,n as CommentResearch,r as Default,c as UsefulResearch,J as __namedExportsOrder,H as default}; \ No newline at end of file diff --git a/storybook-static/assets/NotificationList-B57zIKMs.js b/storybook-static/assets/NotificationList-Dv4Csxvg.js similarity index 88% rename from storybook-static/assets/NotificationList-B57zIKMs.js rename to storybook-static/assets/NotificationList-Dv4Csxvg.js index a5f33330f9..ed11b964d4 100644 --- a/storybook-static/assets/NotificationList-B57zIKMs.js +++ b/storybook-static/assets/NotificationList-Dv4Csxvg.js @@ -1,4 +1,4 @@ -import{j as t}from"./jsx-runtime-CexXSJP5.js";import{r as c}from"./index-BP8_t0zE.js";import{n as d}from"./emotion-styled.browser.esm-Dz2BNYeh.js";import{B as m}from"./Button-B7QBvkxh.js";import{N as f}from"./NotificationItem-BEQLiIOf.js";import{a as p,C as x,T as u}from"./theme-ui-components.esm-DCiJ1mMX.js";const y=d(p)` +import{j as t}from"./jsx-runtime-CexXSJP5.js";import{r as c}from"./index-BP8_t0zE.js";import{n as d}from"./emotion-styled.browser.esm-Dz2BNYeh.js";import{B as m}from"./Button-D4nxT_g_.js";import{N as f}from"./NotificationItem-BpOS05-u.js";import{a as p,C as x,T as u}from"./theme-ui-components.esm-BngKL4Rx.js";const y=d(p)` display: flex; flex-direction: column; color: #000; diff --git a/storybook-static/assets/NotificationList.stories-C5TXwp-D.js b/storybook-static/assets/NotificationList.stories-Uvgjvmk3.js similarity index 90% rename from storybook-static/assets/NotificationList.stories-C5TXwp-D.js rename to storybook-static/assets/NotificationList.stories-Uvgjvmk3.js index dad17fe494..063bb7fbfb 100644 --- a/storybook-static/assets/NotificationList.stories-C5TXwp-D.js +++ b/storybook-static/assets/NotificationList.stories-Uvgjvmk3.js @@ -1 +1 @@ -import{j as o}from"./jsx-runtime-CexXSJP5.js";import{y as r}from"./index-D_kXk1yT.js";import{I as t}from"./InternalLink-CtyTe3gy.js";import{N as n}from"./NotificationList-B57zIKMs.js";import"./index-BP8_t0zE.js";import"./theme-ui-components.esm-DCiJ1mMX.js";import"./parseProps-780b287c.browser.esm-DiCerVr_.js";import"./emotion-use-insertion-effect-with-fallbacks.browser.esm-UWD3gXM2.js";import"./theme-ui-core-jsx-runtime.browser.esm-CH0qhC10.js";import"./hoist-non-react-statics.cjs-CQI8syxn.js";import"./components-CutHIkdx.js";import"./index-BBRV8eG_.js";import"./index-BXxqJQdV.js";import"./emotion-styled.browser.esm-Dz2BNYeh.js";import"./extends-CF3RwP-h.js";import"./Button-B7QBvkxh.js";import"./Icon-BoVZOGVD.js";import"./supporter-D7hp958O.js";import"./icon-arrow-down-CJeToCJe.js";import"./icon-star-active-ClN6U5FF.js";import"./NotificationItem-BEQLiIOf.js";import"./theme-ui-core.browser.esm-CIov4Ln1.js";import"./emotion-react.browser.esm-BYoRxRk_.js";import"./cjs-Clfm10Kj.js";const J={title:"Layout/NotificationList",component:n},i=[{type:"howto_mention",children:o.jsxs(o.Fragment,{children:[r.lorem.words(4)," ",o.jsx(t,{to:"#",children:"Example Link"})]})},{type:"new_comment",children:o.jsxs(o.Fragment,{children:["(Legacy) ",r.lorem.words(4)," ",o.jsx(t,{to:"/",children:r.lorem.words(2)})]})},{type:"howto_useful",children:o.jsxs(o.Fragment,{children:[r.lorem.words(4)," ",o.jsx(t,{to:"/",children:r.lorem.words(2)})]})},{type:"new_comment_discussion",children:o.jsxs(o.Fragment,{children:["(Legacy) ",r.lorem.words(4)," ",o.jsx(t,{to:"/",children:r.lorem.words(2)})]})},{type:"new_comment_research",children:o.jsxs(o.Fragment,{children:["(Legacy) ",r.lorem.words(4)," ",o.jsx(t,{to:"/",children:r.lorem.words(2)})]})},{type:"research_useful",children:o.jsxs(o.Fragment,{children:[r.lorem.words(4)," ",o.jsx(t,{to:"/",children:r.lorem.words(2)})]})},{type:"research_update",children:o.jsxs(o.Fragment,{children:[r.lorem.words(4)," ",o.jsx(t,{to:"#",children:"Research Article link"})]})}],e=()=>o.jsx(n,{notifications:i,markAllNotified:()=>{},markAllRead:()=>{}}),s=()=>o.jsx(n,{notifications:[...i,...i,...i,...i],markAllNotified:()=>{},markAllRead:()=>{}}),a=()=>o.jsx(n,{notifications:[],markAllNotified:()=>{},markAllRead:()=>{}});var m,c,l,d,p,f,h,x,u;e.parameters={...e.parameters,docs:{...null==(m=e.parameters)?void 0:m.docs,source:{originalSource:"() => {}} markAllRead={() => {}} />",...null==(l=null==(c=e.parameters)?void 0:c.docs)?void 0:l.source}}},s.parameters={...s.parameters,docs:{...null==(d=s.parameters)?void 0:d.docs,source:{originalSource:"() => {}} markAllRead={() => {}} />",...null==(f=null==(p=s.parameters)?void 0:p.docs)?void 0:f.source}}},a.parameters={...a.parameters,docs:{...null==(h=a.parameters)?void 0:h.docs,source:{originalSource:"() => {}} markAllRead={() => {}} />",...null==(u=null==(x=a.parameters)?void 0:x.docs)?void 0:u.source}}};const K=["Default","LongList","Empty"];export{e as Default,a as Empty,s as LongList,K as __namedExportsOrder,J as default}; \ No newline at end of file +import{j as o}from"./jsx-runtime-CexXSJP5.js";import{y as r}from"./index-D_kXk1yT.js";import{I as t}from"./InternalLink-BRM7MvOa.js";import{N as n}from"./NotificationList-Dv4Csxvg.js";import"./index-BP8_t0zE.js";import"./theme-ui-components.esm-BngKL4Rx.js";import"./parseProps-780b287c.browser.esm-DiCerVr_.js";import"./emotion-use-insertion-effect-with-fallbacks.browser.esm-UWD3gXM2.js";import"./theme-ui-core-jsx-runtime.browser.esm-CH0qhC10.js";import"./hoist-non-react-statics.cjs-CQI8syxn.js";import"./components-CutHIkdx.js";import"./index-BBRV8eG_.js";import"./index-BXxqJQdV.js";import"./emotion-styled.browser.esm-Dz2BNYeh.js";import"./extends-CF3RwP-h.js";import"./Button-D4nxT_g_.js";import"./Icon-BoVZOGVD.js";import"./supporter-D7hp958O.js";import"./icon-arrow-down-CJeToCJe.js";import"./icon-star-active-ClN6U5FF.js";import"./NotificationItem-BpOS05-u.js";import"./theme-ui-core.browser.esm-CIov4Ln1.js";import"./emotion-react.browser.esm-BYoRxRk_.js";import"./cjs-Clfm10Kj.js";const J={title:"Layout/NotificationList",component:n},i=[{type:"howto_mention",children:o.jsxs(o.Fragment,{children:[r.lorem.words(4)," ",o.jsx(t,{to:"#",children:"Example Link"})]})},{type:"new_comment",children:o.jsxs(o.Fragment,{children:["(Legacy) ",r.lorem.words(4)," ",o.jsx(t,{to:"/",children:r.lorem.words(2)})]})},{type:"howto_useful",children:o.jsxs(o.Fragment,{children:[r.lorem.words(4)," ",o.jsx(t,{to:"/",children:r.lorem.words(2)})]})},{type:"new_comment_discussion",children:o.jsxs(o.Fragment,{children:["(Legacy) ",r.lorem.words(4)," ",o.jsx(t,{to:"/",children:r.lorem.words(2)})]})},{type:"new_comment_research",children:o.jsxs(o.Fragment,{children:["(Legacy) ",r.lorem.words(4)," ",o.jsx(t,{to:"/",children:r.lorem.words(2)})]})},{type:"research_useful",children:o.jsxs(o.Fragment,{children:[r.lorem.words(4)," ",o.jsx(t,{to:"/",children:r.lorem.words(2)})]})},{type:"research_update",children:o.jsxs(o.Fragment,{children:[r.lorem.words(4)," ",o.jsx(t,{to:"#",children:"Research Article link"})]})}],e=()=>o.jsx(n,{notifications:i,markAllNotified:()=>{},markAllRead:()=>{}}),s=()=>o.jsx(n,{notifications:[...i,...i,...i,...i],markAllNotified:()=>{},markAllRead:()=>{}}),a=()=>o.jsx(n,{notifications:[],markAllNotified:()=>{},markAllRead:()=>{}});var m,c,l,d,p,f,h,x,u;e.parameters={...e.parameters,docs:{...null==(m=e.parameters)?void 0:m.docs,source:{originalSource:"() => {}} markAllRead={() => {}} />",...null==(l=null==(c=e.parameters)?void 0:c.docs)?void 0:l.source}}},s.parameters={...s.parameters,docs:{...null==(d=s.parameters)?void 0:d.docs,source:{originalSource:"() => {}} markAllRead={() => {}} />",...null==(f=null==(p=s.parameters)?void 0:p.docs)?void 0:f.source}}},a.parameters={...a.parameters,docs:{...null==(h=a.parameters)?void 0:h.docs,source:{originalSource:"() => {}} markAllRead={() => {}} />",...null==(u=null==(x=a.parameters)?void 0:x.docs)?void 0:u.source}}};const K=["Default","LongList","Empty"];export{e as Default,a as Empty,s as LongList,K as __namedExportsOrder,J as default}; \ No newline at end of file diff --git a/storybook-static/assets/OsmGeocoding-Dk6lLoXi.js b/storybook-static/assets/OsmGeocoding-BSwlbkyl.js similarity index 97% rename from storybook-static/assets/OsmGeocoding-Dk6lLoXi.js rename to storybook-static/assets/OsmGeocoding-BSwlbkyl.js index 0f9a104016..d0b509009e 100644 --- a/storybook-static/assets/OsmGeocoding-Dk6lLoXi.js +++ b/storybook-static/assets/OsmGeocoding-BSwlbkyl.js @@ -1 +1 @@ -import{j as y}from"./jsx-runtime-CexXSJP5.js";import{r as e}from"./index-BP8_t0zE.js";import{S as T}from"./SearchField-BEwe93wL.js";import{a as j,T as F}from"./theme-ui-components.esm-DCiJ1mMX.js";import{j as E}from"./theme-ui-core-jsx-runtime.browser.esm-CH0qhC10.js";function B(n,r,t){var a=this,u=e.useRef(null),i=e.useRef(0),o=e.useRef(null),c=e.useRef([]),l=e.useRef(),s=e.useRef(),d=e.useRef(n),m=e.useRef(!0);e.useEffect((function(){d.current=n}),[n]);var p=!r&&0!==r&&typeof window<"u";if("function"!=typeof n)throw new TypeError("Expected a function");r=+r||0;var f=!!(t=t||{}).leading,g=!("trailing"in t)||!!t.trailing,h="maxWait"in t,y=h?Math.max(+t.maxWait||0,r):null;e.useEffect((function(){return m.current=!0,function(){m.current=!1}}),[]);var b=e.useMemo((function(){var e=function(e){var n=c.current,r=l.current;return c.current=l.current=null,i.current=e,s.current=d.current.apply(r,n)},n=function(e,n){p&&cancelAnimationFrame(o.current),o.current=p?requestAnimationFrame(e):setTimeout(e,n)},t=function(e){if(!m.current)return!1;var n=e-u.current;return!u.current||n>=r||n<0||h&&e-i.current>=y},b=function(n){return o.current=null,g&&c.current?e(n):(c.current=l.current=null,s.current)},x=function e(){var a=Date.now();if(t(a))return b(a);if(m.current){var o=r-(a-u.current),c=h?Math.min(o,y-(a-i.current)):o;n(e,c)}},v=function(){var d=Date.now(),p=t(d);if(c.current=[].slice.call(arguments),l.current=a,u.current=d,p){if(!o.current&&m.current)return i.current=u.current,n(x,r),f?e(u.current):s.current;if(h)return n(x,r),e(u.current)}return o.current||n(x,r),s.current};return v.cancel=function(){o.current&&(p?cancelAnimationFrame(o.current):clearTimeout(o.current)),i.current=0,c.current=u.current=l.current=o.current=null},v.isPending=function(){return!!o.current},v.flush=function(){return o.current?b(Date.now()):s.current},v}),[f,h,r,y,g,p]);return b}const I=()=>y.jsx(y.Fragment,{children:y.jsx(j,{sx:{background:"white",position:"relative",zIndex:1,marginTop:"-2px",paddingX:2,paddingY:1,border:"2px solid",borderColor:"black",borderTopWidth:"1px",lineHeight:1.5,borderBottomLeftRadius:1,borderBottomRightRadius:1},children:y.jsx(F,{sx:{fontSize:1},children:"Fetching results from Open Street Map"})})}),C=e=>{const{results:n,callback:r,setShowResults:t}=e;return E(j,{"data-cy":"osm-geocoding-results",as:"ul",sx:{background:"white",padding:0,position:"relative",zIndex:1,margin:"-2px 0 0",border:"2px solid black",borderTopWidth:"1px",listStyle:"none",borderRadius:0,borderBottomLeftRadius:1,borderBottomRightRadius:1},children:n.map(((e,n)=>E(j,{as:"li",sx:{paddingY:1,paddingX:2,lineHeight:1.5,"&:hover":{background:"softblue",cursor:"pointer"}},onClick:()=>{t(!1),r&&r(e)},children:null==e?void 0:e.display_name},n)))})};try{C.displayName="OsmGeocodingResultsList",C.__docgenInfo={description:"",displayName:"OsmGeocodingResultsList",props:{results:{defaultValue:null,description:"",name:"results",required:!0,type:{name:"Result[]"}},callback:{defaultValue:null,description:"",name:"callback",required:!0,type:{name:"any"}},setShowResults:{defaultValue:null,description:"",name:"setShowResults",required:!0,type:{name:"Dispatch>"}}}}}catch{}const O=({placeholder:n="Search for an address",debounceMs:r=800,callback:t,acceptLanguage:a="en",viewbox:u="",loading:i=!1})=>{const[o,c]=e.useState(""),[l,s]=e.useState([]),[d,m]=e.useState(!1),[p,f]=e.useState(i),[g,h]=e.useState(!1),b=e.useRef(null);document.addEventListener("click",(function(e){var n;(null==(n=null==b?void 0:b.current)?void 0:n.contains(e.target))||m(!1)})),document.onkeyup=function(e){"Escape"===e.key&&m(!1)};const x=!!l.length&&d&&!p,v=B((e=>function(e=""){if(0===e.length)return;f(!0);let n=`https://nominatim.openstreetmap.org/search?format=json&q=${e}&accept-language=${a}`;u.length&&(n=`${n}&viewbox=${u}&bounded=1`),fetch(n,{headers:new Headers({"User-Agent":"onearmy.earth Community Platform (https://platform.onearmy.earth)"})}).then((e=>e.json())).then((e=>{s(e),m(!0)})).catch(null).finally((()=>f(!1)))}(e)),r);return e.useEffect((()=>{g&&v(o)}),[o,g,v]),y.jsxs("div",{"data-cy":"osm-geocoding",ref:b,style:{width:"100%"},children:[y.jsx(T,{autoComplete:"off",name:"geocoding",id:"geocoding",dataCy:"osm-geocoding-input",placeHolder:n,value:o,onChange:e=>{h(!0),c(e)},onClickDelete:()=>{c(""),h(!1)},onClickSearch:()=>{h(!0),c(o)},additionalStyle:{background:"white",fontFamily:"Varela Round",fontSize:"14px",border:"2px solid black",height:"44px",display:"flex",borderRadius:x||p?"5px 5px 0 0":"5px",marginBottom:0}}),p&&y.jsx(I,{}),x&&y.jsx(C,{results:l,callback:e=>{e&&(h(!1),c(e.display_name)),t(e)},setShowResults:m})]})};try{O.displayName="OsmGeocoding",O.__docgenInfo={description:"",displayName:"OsmGeocoding",props:{placeholder:{defaultValue:{value:"Search for an address"},description:"",name:"placeholder",required:!1,type:{name:"string"}},debounceMs:{defaultValue:{value:"800"},description:"",name:"debounceMs",required:!1,type:{name:"number"}},iconUrl:{defaultValue:null,description:"",name:"iconUrl",required:!1,type:{name:"string"}},callback:{defaultValue:null,description:"",name:"callback",required:!1,type:{name:"any"}},city:{defaultValue:null,description:"",name:"city",required:!1,type:{name:"string"}},countrycodes:{defaultValue:null,description:"",name:"countrycodes",required:!1,type:{name:"string"}},acceptLanguage:{defaultValue:{value:"en"},description:"",name:"acceptLanguage",required:!1,type:{name:"string"}},viewbox:{defaultValue:{value:""},description:"",name:"viewbox",required:!1,type:{name:"string"}},loading:{defaultValue:{value:"false"},description:"",name:"loading",required:!1,type:{name:"boolean"}}}}}catch{}export{O,C as a}; \ No newline at end of file +import{j as y}from"./jsx-runtime-CexXSJP5.js";import{r as e}from"./index-BP8_t0zE.js";import{S as T}from"./SearchField-D-_Sbl66.js";import{a as j,T as F}from"./theme-ui-components.esm-BngKL4Rx.js";import{j as E}from"./theme-ui-core-jsx-runtime.browser.esm-CH0qhC10.js";function B(n,r,t){var a=this,u=e.useRef(null),i=e.useRef(0),o=e.useRef(null),c=e.useRef([]),l=e.useRef(),s=e.useRef(),d=e.useRef(n),m=e.useRef(!0);e.useEffect((function(){d.current=n}),[n]);var p=!r&&0!==r&&typeof window<"u";if("function"!=typeof n)throw new TypeError("Expected a function");r=+r||0;var f=!!(t=t||{}).leading,g=!("trailing"in t)||!!t.trailing,h="maxWait"in t,y=h?Math.max(+t.maxWait||0,r):null;e.useEffect((function(){return m.current=!0,function(){m.current=!1}}),[]);var b=e.useMemo((function(){var e=function(e){var n=c.current,r=l.current;return c.current=l.current=null,i.current=e,s.current=d.current.apply(r,n)},n=function(e,n){p&&cancelAnimationFrame(o.current),o.current=p?requestAnimationFrame(e):setTimeout(e,n)},t=function(e){if(!m.current)return!1;var n=e-u.current;return!u.current||n>=r||n<0||h&&e-i.current>=y},b=function(n){return o.current=null,g&&c.current?e(n):(c.current=l.current=null,s.current)},x=function e(){var a=Date.now();if(t(a))return b(a);if(m.current){var o=r-(a-u.current),c=h?Math.min(o,y-(a-i.current)):o;n(e,c)}},v=function(){var d=Date.now(),p=t(d);if(c.current=[].slice.call(arguments),l.current=a,u.current=d,p){if(!o.current&&m.current)return i.current=u.current,n(x,r),f?e(u.current):s.current;if(h)return n(x,r),e(u.current)}return o.current||n(x,r),s.current};return v.cancel=function(){o.current&&(p?cancelAnimationFrame(o.current):clearTimeout(o.current)),i.current=0,c.current=u.current=l.current=o.current=null},v.isPending=function(){return!!o.current},v.flush=function(){return o.current?b(Date.now()):s.current},v}),[f,h,r,y,g,p]);return b}const I=()=>y.jsx(y.Fragment,{children:y.jsx(j,{sx:{background:"white",position:"relative",zIndex:1,marginTop:"-2px",paddingX:2,paddingY:1,border:"2px solid",borderColor:"black",borderTopWidth:"1px",lineHeight:1.5,borderBottomLeftRadius:1,borderBottomRightRadius:1},children:y.jsx(F,{sx:{fontSize:1},children:"Fetching results from Open Street Map"})})}),C=e=>{const{results:n,callback:r,setShowResults:t}=e;return E(j,{"data-cy":"osm-geocoding-results",as:"ul",sx:{background:"white",padding:0,position:"relative",zIndex:1,margin:"-2px 0 0",border:"2px solid black",borderTopWidth:"1px",listStyle:"none",borderRadius:0,borderBottomLeftRadius:1,borderBottomRightRadius:1},children:n.map(((e,n)=>E(j,{as:"li",sx:{paddingY:1,paddingX:2,lineHeight:1.5,"&:hover":{background:"softblue",cursor:"pointer"}},onClick:()=>{t(!1),r&&r(e)},children:null==e?void 0:e.display_name},n)))})};try{C.displayName="OsmGeocodingResultsList",C.__docgenInfo={description:"",displayName:"OsmGeocodingResultsList",props:{results:{defaultValue:null,description:"",name:"results",required:!0,type:{name:"Result[]"}},callback:{defaultValue:null,description:"",name:"callback",required:!0,type:{name:"any"}},setShowResults:{defaultValue:null,description:"",name:"setShowResults",required:!0,type:{name:"Dispatch>"}}}}}catch{}const O=({placeholder:n="Search for an address",debounceMs:r=800,callback:t,acceptLanguage:a="en",viewbox:u="",loading:i=!1})=>{const[o,c]=e.useState(""),[l,s]=e.useState([]),[d,m]=e.useState(!1),[p,f]=e.useState(i),[g,h]=e.useState(!1),b=e.useRef(null);document.addEventListener("click",(function(e){var n;(null==(n=null==b?void 0:b.current)?void 0:n.contains(e.target))||m(!1)})),document.onkeyup=function(e){"Escape"===e.key&&m(!1)};const x=!!l.length&&d&&!p,v=B((e=>function(e=""){if(0===e.length)return;f(!0);let n=`https://nominatim.openstreetmap.org/search?format=json&q=${e}&accept-language=${a}`;u.length&&(n=`${n}&viewbox=${u}&bounded=1`),fetch(n,{headers:new Headers({"User-Agent":"onearmy.earth Community Platform (https://platform.onearmy.earth)"})}).then((e=>e.json())).then((e=>{s(e),m(!0)})).catch(null).finally((()=>f(!1)))}(e)),r);return e.useEffect((()=>{g&&v(o)}),[o,g,v]),y.jsxs("div",{"data-cy":"osm-geocoding",ref:b,style:{width:"100%"},children:[y.jsx(T,{autoComplete:"off",name:"geocoding",id:"geocoding",dataCy:"osm-geocoding-input",placeHolder:n,value:o,onChange:e=>{h(!0),c(e)},onClickDelete:()=>{c(""),h(!1)},onClickSearch:()=>{h(!0),c(o)},additionalStyle:{background:"white",fontFamily:"Varela Round",fontSize:"14px",border:"2px solid black",height:"44px",display:"flex",borderRadius:x||p?"5px 5px 0 0":"5px",marginBottom:0}}),p&&y.jsx(I,{}),x&&y.jsx(C,{results:l,callback:e=>{e&&(h(!1),c(e.display_name)),t(e)},setShowResults:m})]})};try{O.displayName="OsmGeocoding",O.__docgenInfo={description:"",displayName:"OsmGeocoding",props:{placeholder:{defaultValue:{value:"Search for an address"},description:"",name:"placeholder",required:!1,type:{name:"string"}},debounceMs:{defaultValue:{value:"800"},description:"",name:"debounceMs",required:!1,type:{name:"number"}},iconUrl:{defaultValue:null,description:"",name:"iconUrl",required:!1,type:{name:"string"}},callback:{defaultValue:null,description:"",name:"callback",required:!1,type:{name:"any"}},city:{defaultValue:null,description:"",name:"city",required:!1,type:{name:"string"}},countrycodes:{defaultValue:null,description:"",name:"countrycodes",required:!1,type:{name:"string"}},acceptLanguage:{defaultValue:{value:"en"},description:"",name:"acceptLanguage",required:!1,type:{name:"string"}},viewbox:{defaultValue:{value:""},description:"",name:"viewbox",required:!1,type:{name:"string"}},loading:{defaultValue:{value:"false"},description:"",name:"loading",required:!1,type:{name:"boolean"}}}}}catch{}export{O,C as a}; \ No newline at end of file diff --git a/storybook-static/assets/OsmGeocoding.stories-DLF8SCAE.js b/storybook-static/assets/OsmGeocoding.stories-r2d3npw2.js similarity index 96% rename from storybook-static/assets/OsmGeocoding.stories-DLF8SCAE.js rename to storybook-static/assets/OsmGeocoding.stories-r2d3npw2.js index 7e6f3ef650..a7d9b8f972 100644 --- a/storybook-static/assets/OsmGeocoding.stories-DLF8SCAE.js +++ b/storybook-static/assets/OsmGeocoding.stories-r2d3npw2.js @@ -1 +1 @@ -import{j as o}from"./jsx-runtime-CexXSJP5.js";import{O as a,a as g}from"./OsmGeocoding-Dk6lLoXi.js";import"./index-BP8_t0zE.js";import"./SearchField-BEwe93wL.js";import"./Icon-BoVZOGVD.js";import"./emotion-styled.browser.esm-Dz2BNYeh.js";import"./extends-CF3RwP-h.js";import"./parseProps-780b287c.browser.esm-DiCerVr_.js";import"./emotion-use-insertion-effect-with-fallbacks.browser.esm-UWD3gXM2.js";import"./supporter-D7hp958O.js";import"./icon-arrow-down-CJeToCJe.js";import"./icon-star-active-ClN6U5FF.js";import"./theme-ui-core-jsx-runtime.browser.esm-CH0qhC10.js";import"./hoist-non-react-statics.cjs-CQI8syxn.js";import"./theme-ui-components.esm-DCiJ1mMX.js";const j={title:"Components/OsmGeocoding",component:a},e=()=>o.jsx(a,{loading:!1}),n=()=>o.jsx(a,{loading:!0}),t=()=>o.jsx(g,{results:[{place_id:282375433,licence:"Data \xa9 OpenStreetMap contributors, ODbL 1.0. https://osm.org/copyright",osm_type:"relation",osm_id:2658749,boundingbox:["53.0035627","53.0546835","5.6146842","5.7246007"],lat:"53.033548",lon:"5.6611029",display_name:"Sneek, S\xfadwest-Frysl\xe2n, Frisia, Netherlands",class:"boundary",type:"administrative",importance:.5823870580190648,icon:"https://nominatim.openstreetmap.org/ui/mapicons//poi_boundary_administrative.p.20.png"},{place_id:79535975,licence:"Data \xa9 OpenStreetMap contributors, ODbL 1.0. https://osm.org/copyright",osm_type:"node",osm_id:7606839826,boundingbox:["53.0276201","53.0376201","5.6468895","5.6568895"],lat:"53.0326201",lon:"5.6518895",display_name:"Sneek, Doctor Boumaweg, Sneek, S\xfadwest-Frysl\xe2n, Frisia, Netherlands, 8601GG, Netherlands",class:"railway",type:"station",importance:.406301518086152,icon:"https://nominatim.openstreetmap.org/ui/mapicons//transport_train_station2.p.20.png"},{place_id:208556,licence:"Data \xa9 OpenStreetMap contributors, ODbL 1.0. https://osm.org/copyright",osm_type:"node",osm_id:47984318,boundingbox:["53.1169959","53.1170959","5.8099395","5.8100395"],lat:"53.1170459",lon:"5.8099895",display_name:"Sneek, A32, Idaerd, Leeuwarden, Frisia, Netherlands, 9007SE, Netherlands",class:"highway",type:"motorway_junction",importance:.101},{place_id:210270,licence:"Data \xa9 OpenStreetMap contributors, ODbL 1.0. https://osm.org/copyright",osm_type:"node",osm_id:47965735,boundingbox:["53.1071958","53.1072958","5.8151597","5.8152597"],lat:"53.1072458",lon:"5.8152097",display_name:"Sneek, A32, Idaerd, Leeuwarden, Frisia, Netherlands, 9007SH, Netherlands",class:"highway",type:"motorway_junction",importance:.101}],callback:void 0,setShowResults:()=>null});var s,r,i,p,m,c,d,l,u;e.parameters={...e.parameters,docs:{...null==(s=e.parameters)?void 0:s.docs,source:{originalSource:"() => ",...null==(i=null==(r=e.parameters)?void 0:r.docs)?void 0:i.source}}},n.parameters={...n.parameters,docs:{...null==(p=n.parameters)?void 0:p.docs,source:{originalSource:"() => ",...null==(c=null==(m=n.parameters)?void 0:m.docs)?void 0:c.source}}},t.parameters={...t.parameters,docs:{...null==(d=t.parameters)?void 0:d.docs,source:{originalSource:"() => null} />",...null==(u=null==(l=t.parameters)?void 0:l.docs)?void 0:u.source}}};const f=["Default","Loading","ResultsList"];export{e as Default,n as Loading,t as ResultsList,f as __namedExportsOrder,j as default}; \ No newline at end of file +import{j as o}from"./jsx-runtime-CexXSJP5.js";import{O as a,a as g}from"./OsmGeocoding-BSwlbkyl.js";import"./index-BP8_t0zE.js";import"./SearchField-D-_Sbl66.js";import"./Icon-BoVZOGVD.js";import"./emotion-styled.browser.esm-Dz2BNYeh.js";import"./extends-CF3RwP-h.js";import"./parseProps-780b287c.browser.esm-DiCerVr_.js";import"./emotion-use-insertion-effect-with-fallbacks.browser.esm-UWD3gXM2.js";import"./supporter-D7hp958O.js";import"./icon-arrow-down-CJeToCJe.js";import"./icon-star-active-ClN6U5FF.js";import"./theme-ui-core-jsx-runtime.browser.esm-CH0qhC10.js";import"./hoist-non-react-statics.cjs-CQI8syxn.js";import"./theme-ui-components.esm-BngKL4Rx.js";const j={title:"Components/OsmGeocoding",component:a},e=()=>o.jsx(a,{loading:!1}),n=()=>o.jsx(a,{loading:!0}),t=()=>o.jsx(g,{results:[{place_id:282375433,licence:"Data \xa9 OpenStreetMap contributors, ODbL 1.0. https://osm.org/copyright",osm_type:"relation",osm_id:2658749,boundingbox:["53.0035627","53.0546835","5.6146842","5.7246007"],lat:"53.033548",lon:"5.6611029",display_name:"Sneek, S\xfadwest-Frysl\xe2n, Frisia, Netherlands",class:"boundary",type:"administrative",importance:.5823870580190648,icon:"https://nominatim.openstreetmap.org/ui/mapicons//poi_boundary_administrative.p.20.png"},{place_id:79535975,licence:"Data \xa9 OpenStreetMap contributors, ODbL 1.0. https://osm.org/copyright",osm_type:"node",osm_id:7606839826,boundingbox:["53.0276201","53.0376201","5.6468895","5.6568895"],lat:"53.0326201",lon:"5.6518895",display_name:"Sneek, Doctor Boumaweg, Sneek, S\xfadwest-Frysl\xe2n, Frisia, Netherlands, 8601GG, Netherlands",class:"railway",type:"station",importance:.406301518086152,icon:"https://nominatim.openstreetmap.org/ui/mapicons//transport_train_station2.p.20.png"},{place_id:208556,licence:"Data \xa9 OpenStreetMap contributors, ODbL 1.0. https://osm.org/copyright",osm_type:"node",osm_id:47984318,boundingbox:["53.1169959","53.1170959","5.8099395","5.8100395"],lat:"53.1170459",lon:"5.8099895",display_name:"Sneek, A32, Idaerd, Leeuwarden, Frisia, Netherlands, 9007SE, Netherlands",class:"highway",type:"motorway_junction",importance:.101},{place_id:210270,licence:"Data \xa9 OpenStreetMap contributors, ODbL 1.0. https://osm.org/copyright",osm_type:"node",osm_id:47965735,boundingbox:["53.1071958","53.1072958","5.8151597","5.8152597"],lat:"53.1072458",lon:"5.8152097",display_name:"Sneek, A32, Idaerd, Leeuwarden, Frisia, Netherlands, 9007SH, Netherlands",class:"highway",type:"motorway_junction",importance:.101}],callback:void 0,setShowResults:()=>null});var s,r,i,p,m,c,d,l,u;e.parameters={...e.parameters,docs:{...null==(s=e.parameters)?void 0:s.docs,source:{originalSource:"() => ",...null==(i=null==(r=e.parameters)?void 0:r.docs)?void 0:i.source}}},n.parameters={...n.parameters,docs:{...null==(p=n.parameters)?void 0:p.docs,source:{originalSource:"() => ",...null==(c=null==(m=n.parameters)?void 0:m.docs)?void 0:c.source}}},t.parameters={...t.parameters,docs:{...null==(d=t.parameters)?void 0:d.docs,source:{originalSource:"() => null} />",...null==(u=null==(l=t.parameters)?void 0:l.docs)?void 0:u.source}}};const f=["Default","Loading","ResultsList"];export{e as Default,n as Loading,t as ResultsList,f as __namedExportsOrder,j as default}; \ No newline at end of file diff --git a/storybook-static/assets/PinProfile-Dc_LX_A4.js b/storybook-static/assets/PinProfile-Df17ks_L.js similarity index 63% rename from storybook-static/assets/PinProfile-Dc_LX_A4.js rename to storybook-static/assets/PinProfile-Df17ks_L.js index ef97970483..38584bee63 100644 --- a/storybook-static/assets/PinProfile-Dc_LX_A4.js +++ b/storybook-static/assets/PinProfile-Df17ks_L.js @@ -1 +1 @@ -import{j as i}from"./jsx-runtime-CexXSJP5.js";import{B as l}from"./Button-B7QBvkxh.js";import{B as d}from"./ButtonIcon-BjD0tDRb.js";import{C as m}from"./CardButton-QQF3n4Pb.js";import{C as c}from"./CardProfile-D6E6LGNb.js";import{I as p}from"./InternalLink-CtyTe3gy.js";import{a as o,F as x}from"./theme-ui-components.esm-DCiJ1mMX.js";const s=e=>{const{item:s,onClose:n}=e,{creator:t}=s,r="member"===(null==t?void 0:t.profileType);return i.jsxs(m,{sx:{"&:hover":"none"},"data-cy":"PinProfile",children:[i.jsx(o,{sx:{position:"absolute",right:0},children:i.jsx(o,{sx:{float:"right",marginTop:1,marginRight:"8px"},children:i.jsx(d,{"data-cy":"PinProfileCloseButton",icon:"close",onClick:()=>n(),sx:{borderWidth:0,height:"auto"}})})}),i.jsxs(o,{sx:{width:"100%",height:"100%",zIndex:2},children:[i.jsx(c,{item:s,isLink:!0}),!r&&!1!==(null==t?void 0:t.isContactableByPublic)&&i.jsx(x,{sx:{justifyContent:"flex-end"},children:i.jsx(p,{to:`/u/${null==t?void 0:t._id}`,"data-cy":"PinProfileMessageLink",children:i.jsx(l,{icon:"contact",sx:{margin:1},small:!0,children:"Send Message"})})})]})]})};try{s.displayName="PinProfile",s.__docgenInfo={description:"",displayName:"PinProfile",props:{item:{defaultValue:null,description:"",name:"item",required:!0,type:{name:"IMapPin"}},onClose:{defaultValue:null,description:"",name:"onClose",required:!0,type:{name:"() => void"}}}}}catch{}export{s as P}; \ No newline at end of file +import{j as i}from"./jsx-runtime-CexXSJP5.js";import{B as l}from"./Button-D4nxT_g_.js";import{B as d}from"./ButtonIcon-2rTJWwwt.js";import{C as m}from"./CardButton-Nj67FTo7.js";import{C as c}from"./CardProfile-DtCgLDpd.js";import{I as p}from"./InternalLink-BRM7MvOa.js";import{a as o,F as x}from"./theme-ui-components.esm-BngKL4Rx.js";const s=e=>{const{item:n,onClose:s}=e,{creator:t}=n,r="member"===(null==t?void 0:t.profileType);return i.jsxs(m,{sx:{"&:hover":"none"},"data-cy":"PinProfile",children:[i.jsx(o,{sx:{position:"absolute",right:0},children:i.jsx(o,{sx:{float:"right",marginTop:1,marginRight:"8px"},children:i.jsx(d,{"data-cy":"PinProfileCloseButton",icon:"close",onClick:()=>s(),sx:{borderWidth:0,height:"auto"}})})}),i.jsxs(o,{sx:{width:"100%",height:"100%",zIndex:2},children:[i.jsx(c,{item:n,isLink:!0}),!r&&!1!==(null==t?void 0:t.isContactableByPublic)&&i.jsx(x,{sx:{justifyContent:"flex-end"},children:i.jsx(p,{to:`/u/${null==t?void 0:t._id}`,"data-cy":"PinProfileMessageLink",children:i.jsx(l,{icon:"contact",sx:{margin:1},small:!0,children:"Send Message"})})})]})]})};try{s.displayName="PinProfile",s.__docgenInfo={description:"",displayName:"PinProfile",props:{item:{defaultValue:null,description:"",name:"item",required:!0,type:{name:"IMapPin"}},onClose:{defaultValue:null,description:"",name:"onClose",required:!0,type:{name:"() => void"}}}}}catch{}export{s as P}; \ No newline at end of file diff --git a/storybook-static/assets/PinProfile.stories-Crj5gVQg.js b/storybook-static/assets/PinProfile.stories-Crj5gVQg.js new file mode 100644 index 0000000000..865eb31edc --- /dev/null +++ b/storybook-static/assets/PinProfile.stories-Crj5gVQg.js @@ -0,0 +1 @@ +import{j as t}from"./jsx-runtime-CexXSJP5.js";import{y as c}from"./index-D_kXk1yT.js";import{P as i}from"./PinProfile-Df17ks_L.js";import"./index-BP8_t0zE.js";import"./Button-D4nxT_g_.js";import"./Icon-BoVZOGVD.js";import"./emotion-styled.browser.esm-Dz2BNYeh.js";import"./extends-CF3RwP-h.js";import"./parseProps-780b287c.browser.esm-DiCerVr_.js";import"./emotion-use-insertion-effect-with-fallbacks.browser.esm-UWD3gXM2.js";import"./supporter-D7hp958O.js";import"./icon-arrow-down-CJeToCJe.js";import"./icon-star-active-ClN6U5FF.js";import"./theme-ui-core-jsx-runtime.browser.esm-CH0qhC10.js";import"./hoist-non-react-statics.cjs-CQI8syxn.js";import"./theme-ui-components.esm-BngKL4Rx.js";import"./ButtonIcon-2rTJWwwt.js";import"./CardButton-Nj67FTo7.js";import"./CardProfile-DtCgLDpd.js";import"./Category-CVnjFQdi.js";import"./MemberBadge-DSOx4fo1.js";import"./theme-ui-core.browser.esm-CIov4Ln1.js";import"./emotion-react.browser.esm-BYoRxRk_.js";import"./cjs-Clfm10Kj.js";import"./Username-CNsNRGy2.js";import"./InternalLink-BRM7MvOa.js";import"./components-CutHIkdx.js";import"./index-BBRV8eG_.js";import"./index-BXxqJQdV.js";import"./UserBadge-XI2JdGOl.js";import"./ProfileTagsList-CnWLcFtJ.js";const H={title:"Map/PinProfile",component:i},e=()=>{const e={_deleted:!1,_id:"not-selected-onload",location:{lat:0,lng:0},moderation:"accepted",type:"member",verified:!1,creator:{_id:"member_no2",_lastActive:"string",countryCode:"br",userImage:c.image.avatar(),displayName:"member_no1",isContactableByPublic:!1,profileType:"member"}};return t.jsx("div",{style:{width:"230px",position:"fixed"},children:t.jsx(i,{item:e,onClose:()=>console.log()})})},o=()=>t.jsx("div",{style:{width:"230px",position:"fixed"},children:t.jsx(i,{item:{_deleted:!1,_id:"not-selected-onload",location:{lat:0,lng:0},moderation:"accepted",type:"workspace",verified:!1,creator:{_id:"string",_lastActive:"string",about:"Lorem ipsum odor amet, consectetuer adipiscing elit. Lorem ipsum odor amet, consectetuer adipiscing elit.",badges:{supporter:!0,verified:!1},countryCode:"uk",displayName:"user",isContactableByPublic:!0,profileType:"workspace",workspaceType:"Sheetpress"}},onClose:()=>console.log()})});var n,a,s,p,m,l;e.parameters={...e.parameters,docs:{...null==(n=e.parameters)?void 0:n.docs,source:{originalSource:"() => {\n const item = {\n _deleted: false,\n _id: 'not-selected-onload',\n location: {\n lat: 0,\n lng: 0\n },\n moderation: 'accepted' as IModerationStatus,\n type: 'member' as ProfileTypeName,\n verified: false,\n creator: {\n _id: 'member_no2',\n _lastActive: 'string',\n countryCode: 'br',\n userImage: faker.image.avatar(),\n displayName: 'member_no1',\n isContactableByPublic: false,\n profileType: 'member' as ProfileTypeName\n }\n };\n return
\n console.log()} />\n
;\n}",...null==(s=null==(a=e.parameters)?void 0:a.docs)?void 0:s.source}}},o.parameters={...o.parameters,docs:{...null==(p=o.parameters)?void 0:p.docs,source:{originalSource:"() => {\n const item = {\n _deleted: false,\n _id: 'not-selected-onload',\n location: {\n lat: 0,\n lng: 0\n },\n moderation: 'accepted' as IModerationStatus,\n type: 'workspace' as ProfileTypeName,\n verified: false,\n creator: {\n _id: 'string',\n _lastActive: 'string',\n about: 'Lorem ipsum odor amet, consectetuer adipiscing elit. Lorem ipsum odor amet, consectetuer adipiscing elit.',\n badges: {\n supporter: true,\n verified: false\n },\n countryCode: 'uk',\n displayName: 'user',\n isContactableByPublic: true,\n profileType: 'workspace' as ProfileTypeName,\n workspaceType: 'Sheetpress'\n }\n };\n return
\n console.log()} />\n
;\n}",...null==(l=null==(m=o.parameters)?void 0:m.docs)?void 0:l.source}}};const J=["DefaultMember","DefaultSpace"];export{e as DefaultMember,o as DefaultSpace,J as __namedExportsOrder,H as default}; \ No newline at end of file diff --git a/storybook-static/assets/PinProfile.stories-DxlukoxQ.js b/storybook-static/assets/PinProfile.stories-DxlukoxQ.js deleted file mode 100644 index 96ec013f8e..0000000000 --- a/storybook-static/assets/PinProfile.stories-DxlukoxQ.js +++ /dev/null @@ -1 +0,0 @@ -import{j as t}from"./jsx-runtime-CexXSJP5.js";import{y as c}from"./index-D_kXk1yT.js";import{P as i}from"./PinProfile-Dc_LX_A4.js";import"./index-BP8_t0zE.js";import"./Button-B7QBvkxh.js";import"./Icon-BoVZOGVD.js";import"./emotion-styled.browser.esm-Dz2BNYeh.js";import"./extends-CF3RwP-h.js";import"./parseProps-780b287c.browser.esm-DiCerVr_.js";import"./emotion-use-insertion-effect-with-fallbacks.browser.esm-UWD3gXM2.js";import"./supporter-D7hp958O.js";import"./icon-arrow-down-CJeToCJe.js";import"./icon-star-active-ClN6U5FF.js";import"./theme-ui-core-jsx-runtime.browser.esm-CH0qhC10.js";import"./hoist-non-react-statics.cjs-CQI8syxn.js";import"./theme-ui-components.esm-DCiJ1mMX.js";import"./ButtonIcon-BjD0tDRb.js";import"./CardButton-QQF3n4Pb.js";import"./CardProfile-D6E6LGNb.js";import"./Category-BRVyiaSI.js";import"./MemberBadge-BFCUvfGJ.js";import"./theme-ui-core.browser.esm-CIov4Ln1.js";import"./emotion-react.browser.esm-BYoRxRk_.js";import"./cjs-Clfm10Kj.js";import"./Username-iPvtw0Lg.js";import"./InternalLink-CtyTe3gy.js";import"./components-CutHIkdx.js";import"./index-BBRV8eG_.js";import"./index-BXxqJQdV.js";import"./ProfileTagsList-D6w9cXVe.js";const G={title:"Map/PinProfile",component:i},e=()=>{const e={_deleted:!1,_id:"not-selected-onload",location:{lat:0,lng:0},moderation:"accepted",type:"member",verified:!1,creator:{_id:"member_no2",_lastActive:"string",countryCode:"br",userImage:c.image.avatar(),displayName:"member_no1",isContactableByPublic:!1,profileType:"member"}};return t.jsx("div",{style:{width:"230px",position:"fixed"},children:t.jsx(i,{item:e,onClose:()=>console.log()})})},o=()=>t.jsx("div",{style:{width:"230px",position:"fixed"},children:t.jsx(i,{item:{_deleted:!1,_id:"not-selected-onload",location:{lat:0,lng:0},moderation:"accepted",type:"workspace",verified:!1,creator:{_id:"string",_lastActive:"string",about:"Lorem ipsum odor amet, consectetuer adipiscing elit. Lorem ipsum odor amet, consectetuer adipiscing elit.",badges:{supporter:!0,verified:!1},countryCode:"uk",displayName:"user",isContactableByPublic:!0,profileType:"workspace",workspaceType:"Sheetpress"}},onClose:()=>console.log()})});var n,a,s,p,m,l;e.parameters={...e.parameters,docs:{...null==(n=e.parameters)?void 0:n.docs,source:{originalSource:"() => {\n const item = {\n _deleted: false,\n _id: 'not-selected-onload',\n location: {\n lat: 0,\n lng: 0\n },\n moderation: 'accepted' as IModerationStatus,\n type: 'member' as ProfileTypeName,\n verified: false,\n creator: {\n _id: 'member_no2',\n _lastActive: 'string',\n countryCode: 'br',\n userImage: faker.image.avatar(),\n displayName: 'member_no1',\n isContactableByPublic: false,\n profileType: 'member' as ProfileTypeName\n }\n };\n return
\n console.log()} />\n
;\n}",...null==(s=null==(a=e.parameters)?void 0:a.docs)?void 0:s.source}}},o.parameters={...o.parameters,docs:{...null==(p=o.parameters)?void 0:p.docs,source:{originalSource:"() => {\n const item = {\n _deleted: false,\n _id: 'not-selected-onload',\n location: {\n lat: 0,\n lng: 0\n },\n moderation: 'accepted' as IModerationStatus,\n type: 'workspace' as ProfileTypeName,\n verified: false,\n creator: {\n _id: 'string',\n _lastActive: 'string',\n about: 'Lorem ipsum odor amet, consectetuer adipiscing elit. Lorem ipsum odor amet, consectetuer adipiscing elit.',\n badges: {\n supporter: true,\n verified: false\n },\n countryCode: 'uk',\n displayName: 'user',\n isContactableByPublic: true,\n profileType: 'workspace' as ProfileTypeName,\n workspaceType: 'Sheetpress'\n }\n };\n return
\n console.log()} />\n
;\n}",...null==(l=null==(m=o.parameters)?void 0:m.docs)?void 0:l.source}}};const H=["DefaultMember","DefaultSpace"];export{e as DefaultMember,o as DefaultSpace,H as __namedExportsOrder,G as default}; \ No newline at end of file diff --git a/storybook-static/assets/ProfileLink-Bn1AIGdm.js b/storybook-static/assets/ProfileLink-CJW6tj3G.js similarity index 95% rename from storybook-static/assets/ProfileLink-Bn1AIGdm.js rename to storybook-static/assets/ProfileLink-CJW6tj3G.js index 9cac1e36bc..7c1d337476 100644 --- a/storybook-static/assets/ProfileLink-Bn1AIGdm.js +++ b/storybook-static/assets/ProfileLink-CJW6tj3G.js @@ -1 +1 @@ -import{j as t}from"./jsx-runtime-CexXSJP5.js";import{E as i}from"./ExternalLink-CHmx7fZ7.js";import{I as n}from"./Icon-BoVZOGVD.js";import{F as c,a as v}from"./theme-ui-components.esm-DCiJ1mMX.js";const r=e=>e.charAt(0).toUpperCase()+e.slice(1),s=(e,a)=>"email"===a?`mailto:${e}`:0===e.indexOf("http")?e:`http://${e}`,d=[{pattern:new RegExp(/twitter\.com/),label:"Twitter"},{pattern:new RegExp(/facebook\.com/),label:"Facebook"},{pattern:new RegExp(/youtube\.com/),label:"Youtube"},{pattern:new RegExp(/instagram\.com/),label:"Instagram"}],p=(e,a)=>{const l=d.find((e=>e.pattern.test(a)));return l?l.label:e&&r(e)},u=e=>{const{url:a,label:l}=e;return t.jsxs(c,{sx:{justifyContent:"flex-start",alignItems:"center",flexDirection:"row",mt:0,...e.sx},children:[t.jsx(v,{children:t.jsx(n,{glyph:e.icon,size:22})}),t.jsx(i,{ml:2,color:"black","data-cy":"profile-link",href:s(a,l),children:p(l,a)})]})};try{r.displayName="capitalizeFirstLetter",r.__docgenInfo={description:"",displayName:"capitalizeFirstLetter",props:{}}}catch{}try{u.displayName="ProfileLink",u.__docgenInfo={description:"",displayName:"ProfileLink",props:{url:{defaultValue:null,description:"",name:"url",required:!0,type:{name:"string"}},label:{defaultValue:null,description:"",name:"label",required:!0,type:{name:"string"}},icon:{defaultValue:null,description:"",name:"icon",required:!0,type:{name:"enum",value:[{value:'"map"'},{value:'"menu"'},{value:'"search"'},{value:'"time"'},{value:'"filter"'},{value:'"image"'},{value:'"view"'},{value:'"email"'},{value:'"step"'},{value:'"account-circle"'},{value:'"account"'},{value:'"add"'},{value:'"arrow-curved-bottom-right"'},{value:'"arrow-back"'},{value:'"arrow-down"'},{value:'"arrow-forward"'},{value:'"arrow-full-down"'},{value:'"arrow-full-up"'},{value:'"bazar"'},{value:'"check"'},{value:'"chevron-down"'},{value:'"chevron-left"'},{value:'"chevron-right"'},{value:'"chevron-up"'},{value:'"close"'},{value:'"comment"'},{value:'"contact"'},{value:'"discord"'},{value:'"delete"'},{value:'"difficulty"'},{value:'"download"'},{value:'"download-cloud"'},{value:'"edit"'},{value:'"email-outline"'},{value:'"employee"'},{value:'"external-link"'},{value:'"external-url"'},{value:'"facebook"'},{value:'"flag-unknown"'},{value:'"hide"'},{value:'"hyperlink"'},{value:'"impact"'},{value:'"instagram"'},{value:'"loading"'},{value:'"location-on"'},{value:'"lock"'},{value:'"machine"'},{value:'"mail-outline"'},{value:'"more-vert"'},{value:'"notifications"'},{value:'"patreon"'},{value:'"pdf"'},{value:'"plastic"'},{value:'"profile"'},{value:'"revenue"'},{value:'"show"'},{value:'"slack"'},{value:'"sliders"'},{value:'"social-media"'},{value:'"star"'},{value:'"star-active"'},{value:'"supporter"'},{value:'"thunderbolt"'},{value:'"thunderbolt-grey"'},{value:'"turned-in"'},{value:'"update"'},{value:'"upload"'},{value:'"useful"'},{value:'"verified"'},{value:'"volunteer"'},{value:'"website"'},{value:'"globe"'},{value:'"gps-location"'}]}},sx:{defaultValue:null,description:"",name:"sx",required:!1,type:{name:"ThemeUICSSObject"}}}}}catch{}export{u as P}; \ No newline at end of file +import{j as t}from"./jsx-runtime-CexXSJP5.js";import{E as i}from"./ExternalLink-DC09teyd.js";import{I as n}from"./Icon-BoVZOGVD.js";import{F as c,a as v}from"./theme-ui-components.esm-BngKL4Rx.js";const r=e=>e.charAt(0).toUpperCase()+e.slice(1),s=(e,a)=>"email"===a?`mailto:${e}`:0===e.indexOf("http")?e:`http://${e}`,d=[{pattern:new RegExp(/twitter\.com/),label:"Twitter"},{pattern:new RegExp(/facebook\.com/),label:"Facebook"},{pattern:new RegExp(/youtube\.com/),label:"Youtube"},{pattern:new RegExp(/instagram\.com/),label:"Instagram"}],p=(e,a)=>{const l=d.find((e=>e.pattern.test(a)));return l?l.label:e&&r(e)},u=e=>{const{url:a,label:l}=e;return t.jsxs(c,{sx:{justifyContent:"flex-start",alignItems:"center",flexDirection:"row",mt:0,...e.sx},children:[t.jsx(v,{children:t.jsx(n,{glyph:e.icon,size:22})}),t.jsx(i,{ml:2,color:"black","data-cy":"profile-link",href:s(a,l),children:p(l,a)})]})};try{r.displayName="capitalizeFirstLetter",r.__docgenInfo={description:"",displayName:"capitalizeFirstLetter",props:{}}}catch{}try{u.displayName="ProfileLink",u.__docgenInfo={description:"",displayName:"ProfileLink",props:{url:{defaultValue:null,description:"",name:"url",required:!0,type:{name:"string"}},label:{defaultValue:null,description:"",name:"label",required:!0,type:{name:"string"}},icon:{defaultValue:null,description:"",name:"icon",required:!0,type:{name:"enum",value:[{value:'"map"'},{value:'"menu"'},{value:'"search"'},{value:'"time"'},{value:'"filter"'},{value:'"image"'},{value:'"view"'},{value:'"email"'},{value:'"step"'},{value:'"account-circle"'},{value:'"account"'},{value:'"add"'},{value:'"arrow-curved-bottom-right"'},{value:'"arrow-back"'},{value:'"arrow-down"'},{value:'"arrow-forward"'},{value:'"arrow-full-down"'},{value:'"arrow-full-up"'},{value:'"bazar"'},{value:'"check"'},{value:'"chevron-down"'},{value:'"chevron-left"'},{value:'"chevron-right"'},{value:'"chevron-up"'},{value:'"close"'},{value:'"comment"'},{value:'"contact"'},{value:'"discord"'},{value:'"delete"'},{value:'"difficulty"'},{value:'"download"'},{value:'"download-cloud"'},{value:'"edit"'},{value:'"email-outline"'},{value:'"employee"'},{value:'"external-link"'},{value:'"external-url"'},{value:'"facebook"'},{value:'"flag-unknown"'},{value:'"hide"'},{value:'"hyperlink"'},{value:'"impact"'},{value:'"instagram"'},{value:'"loading"'},{value:'"location-on"'},{value:'"lock"'},{value:'"machine"'},{value:'"mail-outline"'},{value:'"more-vert"'},{value:'"notifications"'},{value:'"patreon"'},{value:'"pdf"'},{value:'"plastic"'},{value:'"profile"'},{value:'"revenue"'},{value:'"show"'},{value:'"slack"'},{value:'"sliders"'},{value:'"social-media"'},{value:'"star"'},{value:'"star-active"'},{value:'"supporter"'},{value:'"thunderbolt"'},{value:'"thunderbolt-grey"'},{value:'"turned-in"'},{value:'"update"'},{value:'"upload"'},{value:'"useful"'},{value:'"verified"'},{value:'"volunteer"'},{value:'"website"'},{value:'"globe"'},{value:'"gps-location"'}]}},sx:{defaultValue:null,description:"",name:"sx",required:!1,type:{name:"ThemeUICSSObject"}}}}}catch{}export{u as P}; \ No newline at end of file diff --git a/storybook-static/assets/ProfileLink.stories-DJ8teJjL.js b/storybook-static/assets/ProfileLink.stories-B5vjWlQ7.js similarity index 94% rename from storybook-static/assets/ProfileLink.stories-DJ8teJjL.js rename to storybook-static/assets/ProfileLink.stories-B5vjWlQ7.js index 975af1b31b..e8528e7058 100644 --- a/storybook-static/assets/ProfileLink.stories-DJ8teJjL.js +++ b/storybook-static/assets/ProfileLink.stories-B5vjWlQ7.js @@ -1 +1 @@ -import{j as a}from"./jsx-runtime-CexXSJP5.js";import{P as e}from"./ProfileLink-Bn1AIGdm.js";import"./index-BP8_t0zE.js";import"./ExternalLink-CHmx7fZ7.js";import"./theme-ui-components.esm-DCiJ1mMX.js";import"./parseProps-780b287c.browser.esm-DiCerVr_.js";import"./emotion-use-insertion-effect-with-fallbacks.browser.esm-UWD3gXM2.js";import"./theme-ui-core-jsx-runtime.browser.esm-CH0qhC10.js";import"./hoist-non-react-statics.cjs-CQI8syxn.js";import"./Icon-BoVZOGVD.js";import"./emotion-styled.browser.esm-Dz2BNYeh.js";import"./extends-CF3RwP-h.js";import"./supporter-D7hp958O.js";import"./icon-arrow-down-CJeToCJe.js";import"./icon-star-active-ClN6U5FF.js";const K={title:"Components/ProfileLink",component:e},o=()=>a.jsx(e,{url:"https://instagram.com",label:"social media",icon:"social-media"}),r=()=>a.jsx(e,{url:"https://facebook.com",label:"social media",icon:"social-media"}),s=()=>a.jsx(e,{url:"https://youtube.com",label:"social media",icon:"social-media"}),i=()=>a.jsx(e,{url:"https://twitter.com",label:"social media",icon:"social-media"}),t=()=>a.jsx(e,{url:"info@preciousplastic.com",label:"email",icon:"email"}),c=()=>a.jsx(e,{url:"https://bazar.preciousplastic.com/abc",label:"bazar",icon:"bazar"}),m=()=>a.jsx(e,{url:"https://example.com",label:"website",icon:"website"});var l,p,n,u,d,b,f,k,x,h,g,P,L,j,w,z,S,E,_,y,B;o.parameters={...o.parameters,docs:{...null==(l=o.parameters)?void 0:l.docs,source:{originalSource:'() => ',...null==(n=null==(p=o.parameters)?void 0:p.docs)?void 0:n.source}}},r.parameters={...r.parameters,docs:{...null==(u=r.parameters)?void 0:u.docs,source:{originalSource:'() => ',...null==(b=null==(d=r.parameters)?void 0:d.docs)?void 0:b.source}}},s.parameters={...s.parameters,docs:{...null==(f=s.parameters)?void 0:f.docs,source:{originalSource:'() => ',...null==(x=null==(k=s.parameters)?void 0:k.docs)?void 0:x.source}}},i.parameters={...i.parameters,docs:{...null==(h=i.parameters)?void 0:h.docs,source:{originalSource:'() => ',...null==(P=null==(g=i.parameters)?void 0:g.docs)?void 0:P.source}}},t.parameters={...t.parameters,docs:{...null==(L=t.parameters)?void 0:L.docs,source:{originalSource:'() => ',...null==(w=null==(j=t.parameters)?void 0:j.docs)?void 0:w.source}}},c.parameters={...c.parameters,docs:{...null==(z=c.parameters)?void 0:z.docs,source:{originalSource:'() => ',...null==(E=null==(S=c.parameters)?void 0:S.docs)?void 0:E.source}}},m.parameters={...m.parameters,docs:{...null==(_=m.parameters)?void 0:_.docs,source:{originalSource:'() => ',...null==(B=null==(y=m.parameters)?void 0:y.docs)?void 0:B.source}}};const M=["Instagram","Facebook","Youtube","Twitter","Email","Bazaar","Website"];export{c as Bazaar,t as Email,r as Facebook,o as Instagram,i as Twitter,m as Website,s as Youtube,M as __namedExportsOrder,K as default}; \ No newline at end of file +import{j as a}from"./jsx-runtime-CexXSJP5.js";import{P as e}from"./ProfileLink-CJW6tj3G.js";import"./index-BP8_t0zE.js";import"./ExternalLink-DC09teyd.js";import"./theme-ui-components.esm-BngKL4Rx.js";import"./parseProps-780b287c.browser.esm-DiCerVr_.js";import"./emotion-use-insertion-effect-with-fallbacks.browser.esm-UWD3gXM2.js";import"./theme-ui-core-jsx-runtime.browser.esm-CH0qhC10.js";import"./hoist-non-react-statics.cjs-CQI8syxn.js";import"./Icon-BoVZOGVD.js";import"./emotion-styled.browser.esm-Dz2BNYeh.js";import"./extends-CF3RwP-h.js";import"./supporter-D7hp958O.js";import"./icon-arrow-down-CJeToCJe.js";import"./icon-star-active-ClN6U5FF.js";const K={title:"Components/ProfileLink",component:e},o=()=>a.jsx(e,{url:"https://instagram.com",label:"social media",icon:"social-media"}),r=()=>a.jsx(e,{url:"https://facebook.com",label:"social media",icon:"social-media"}),s=()=>a.jsx(e,{url:"https://youtube.com",label:"social media",icon:"social-media"}),i=()=>a.jsx(e,{url:"https://twitter.com",label:"social media",icon:"social-media"}),t=()=>a.jsx(e,{url:"info@preciousplastic.com",label:"email",icon:"email"}),c=()=>a.jsx(e,{url:"https://bazar.preciousplastic.com/abc",label:"bazar",icon:"bazar"}),m=()=>a.jsx(e,{url:"https://example.com",label:"website",icon:"website"});var l,p,n,u,d,b,f,k,x,h,g,P,L,j,w,z,S,E,_,y,B;o.parameters={...o.parameters,docs:{...null==(l=o.parameters)?void 0:l.docs,source:{originalSource:'() => ',...null==(n=null==(p=o.parameters)?void 0:p.docs)?void 0:n.source}}},r.parameters={...r.parameters,docs:{...null==(u=r.parameters)?void 0:u.docs,source:{originalSource:'() => ',...null==(b=null==(d=r.parameters)?void 0:d.docs)?void 0:b.source}}},s.parameters={...s.parameters,docs:{...null==(f=s.parameters)?void 0:f.docs,source:{originalSource:'() => ',...null==(x=null==(k=s.parameters)?void 0:k.docs)?void 0:x.source}}},i.parameters={...i.parameters,docs:{...null==(h=i.parameters)?void 0:h.docs,source:{originalSource:'() => ',...null==(P=null==(g=i.parameters)?void 0:g.docs)?void 0:P.source}}},t.parameters={...t.parameters,docs:{...null==(L=t.parameters)?void 0:L.docs,source:{originalSource:'() => ',...null==(w=null==(j=t.parameters)?void 0:j.docs)?void 0:w.source}}},c.parameters={...c.parameters,docs:{...null==(z=c.parameters)?void 0:z.docs,source:{originalSource:'() => ',...null==(E=null==(S=c.parameters)?void 0:S.docs)?void 0:E.source}}},m.parameters={...m.parameters,docs:{...null==(_=m.parameters)?void 0:_.docs,source:{originalSource:'() => ',...null==(B=null==(y=m.parameters)?void 0:y.docs)?void 0:B.source}}};const M=["Instagram","Facebook","Youtube","Twitter","Email","Bazaar","Website"];export{c as Bazaar,t as Email,r as Facebook,o as Instagram,i as Twitter,m as Website,s as Youtube,M as __namedExportsOrder,K as default}; \ No newline at end of file diff --git a/storybook-static/assets/ProfileTagsList-D6w9cXVe.js b/storybook-static/assets/ProfileTagsList-CnWLcFtJ.js similarity index 83% rename from storybook-static/assets/ProfileTagsList-D6w9cXVe.js rename to storybook-static/assets/ProfileTagsList-CnWLcFtJ.js index a2b799b6c0..72f7c9f6ef 100644 --- a/storybook-static/assets/ProfileTagsList-D6w9cXVe.js +++ b/storybook-static/assets/ProfileTagsList-CnWLcFtJ.js @@ -1 +1 @@ -import{j as l}from"./jsx-runtime-CexXSJP5.js";import{C as c}from"./Category-BRVyiaSI.js";import{F as t}from"./theme-ui-components.esm-DCiJ1mMX.js";const e="#999999",s=({sx:o,tags:r})=>l.jsx(t,{"data-cy":"ProfileTagsList",sx:{gap:2,flexWrap:"wrap",...o},children:r.map(((o,r)=>(null==o?void 0:o.label)&&l.jsx(c,{category:{label:o.label},sx:{borderRadius:99,border:"1px solid",borderColor:o.color?o.color:e,backgroundColor:o.color?`${o.color}20`:`${e}20`,color:o.color?o.color:e}},r)))});try{s.displayName="ProfileTagsList",s.__docgenInfo={description:"",displayName:"ProfileTagsList",props:{tags:{defaultValue:null,description:"",name:"tags",required:!0,type:{name:"IProfileTag[]"}},sx:{defaultValue:null,description:"",name:"sx",required:!1,type:{name:"ThemeUIStyleObject"}}}}}catch{}export{s as P}; \ No newline at end of file +import{j as l}from"./jsx-runtime-CexXSJP5.js";import{C as c}from"./Category-CVnjFQdi.js";import{F as t}from"./theme-ui-components.esm-BngKL4Rx.js";const e="#999999",s=({sx:o,tags:r})=>l.jsx(t,{"data-cy":"ProfileTagsList",sx:{gap:2,flexWrap:"wrap",...o},children:r.map(((o,r)=>(null==o?void 0:o.label)&&l.jsx(c,{category:{label:o.label},sx:{borderRadius:99,border:"1px solid",borderColor:o.color?o.color:e,backgroundColor:o.color?`${o.color}20`:`${e}20`,color:o.color?o.color:e}},r)))});try{s.displayName="ProfileTagsList",s.__docgenInfo={description:"",displayName:"ProfileTagsList",props:{tags:{defaultValue:null,description:"",name:"tags",required:!0,type:{name:"IProfileTag[]"}},sx:{defaultValue:null,description:"",name:"sx",required:!1,type:{name:"ThemeUIStyleObject"}}}}}catch{}export{s as P}; \ No newline at end of file diff --git a/storybook-static/assets/ProfileTagsList.stories-BcjM_4H6.js b/storybook-static/assets/ProfileTagsList.stories-B5RDTpZr.js similarity index 85% rename from storybook-static/assets/ProfileTagsList.stories-BcjM_4H6.js rename to storybook-static/assets/ProfileTagsList.stories-B5RDTpZr.js index 820e7881c5..58e4e48b63 100644 --- a/storybook-static/assets/ProfileTagsList.stories-BcjM_4H6.js +++ b/storybook-static/assets/ProfileTagsList.stories-B5RDTpZr.js @@ -1 +1 @@ -import{j as a}from"./jsx-runtime-CexXSJP5.js";import{P as s}from"./ProfileTagsList-D6w9cXVe.js";import"./index-BP8_t0zE.js";import"./Category-BRVyiaSI.js";import"./theme-ui-components.esm-DCiJ1mMX.js";import"./parseProps-780b287c.browser.esm-DiCerVr_.js";import"./emotion-use-insertion-effect-with-fallbacks.browser.esm-UWD3gXM2.js";import"./theme-ui-core-jsx-runtime.browser.esm-CH0qhC10.js";import"./hoist-non-react-statics.cjs-CQI8syxn.js";const y={title:"Components/ProfileTagsList",component:s},e=()=>a.jsx(s,{tags:[{_id:"hwh",_created:"today",_deleted:!1,color:"#20B7EB",label:"Electronics",profileType:"space"},{_id:"a45397uh",_created:"yesterday",_deleted:!1,color:"#F29195",label:"Electronics II",profileType:"space"}]});var o,r,t;e.parameters={...e.parameters,docs:{...null==(o=e.parameters)?void 0:o.docs,source:{originalSource:"() => ",...null==(t=null==(r=e.parameters)?void 0:r.docs)?void 0:t.source}}};const u=["Default"];export{e as Default,u as __namedExportsOrder,y as default}; \ No newline at end of file +import{j as a}from"./jsx-runtime-CexXSJP5.js";import{P as s}from"./ProfileTagsList-CnWLcFtJ.js";import"./index-BP8_t0zE.js";import"./Category-CVnjFQdi.js";import"./theme-ui-components.esm-BngKL4Rx.js";import"./parseProps-780b287c.browser.esm-DiCerVr_.js";import"./emotion-use-insertion-effect-with-fallbacks.browser.esm-UWD3gXM2.js";import"./theme-ui-core-jsx-runtime.browser.esm-CH0qhC10.js";import"./hoist-non-react-statics.cjs-CQI8syxn.js";const y={title:"Components/ProfileTagsList",component:s},e=()=>a.jsx(s,{tags:[{_id:"hwh",_created:"today",_deleted:!1,color:"#20B7EB",label:"Electronics",profileType:"space"},{_id:"a45397uh",_created:"yesterday",_deleted:!1,color:"#F29195",label:"Electronics II",profileType:"space"}]});var o,r,t;e.parameters={...e.parameters,docs:{...null==(o=e.parameters)?void 0:o.docs,source:{originalSource:"() => ",...null==(t=null==(r=e.parameters)?void 0:r.docs)?void 0:t.source}}};const u=["Default"];export{e as Default,u as __namedExportsOrder,y as default}; \ No newline at end of file diff --git a/storybook-static/assets/ResearchEditorOverview-DHGZ1VKA.js b/storybook-static/assets/ResearchEditorOverview-DCXr4jRB.js similarity index 94% rename from storybook-static/assets/ResearchEditorOverview-DHGZ1VKA.js rename to storybook-static/assets/ResearchEditorOverview-DCXr4jRB.js index cafe29ebe3..811eb0c384 100644 --- a/storybook-static/assets/ResearchEditorOverview-DHGZ1VKA.js +++ b/storybook-static/assets/ResearchEditorOverview-DCXr4jRB.js @@ -1 +1 @@ -import{j as e}from"./jsx-runtime-CexXSJP5.js";import{c as x,a as f,b as l}from"./index.esm-D0u3ndg0.js";import{B as n}from"./Button-B7QBvkxh.js";import{I as s}from"./InternalLink-CtyTe3gy.js";import{C as b,H as g,a as o,T as c}from"./theme-ui-components.esm-DCiJ1mMX.js";const v=x({isActive:f().required(),title:l().required(),status:l().optional(),slug:l().nullable()}),d=t=>{const{updates:a,sx:r,researchSlug:l,showCreateUpdateButton:i,showBackToResearchButton:d}=t;return e.jsxs(b,{sx:{p:4,...r},children:[e.jsx(g,{as:"h2",mb:3,variant:"small",children:"Research overview"}),null!=a&&a.length?e.jsx(o,{as:"ul",sx:{margin:0,mb:4,p:0,pl:3},children:a.filter((e=>v.isValidSync(e))).map(((t,a)=>e.jsx(o,{as:"li",sx:{mb:1},children:e.jsxs(c,{variant:"quiet",children:["draft"===t.status?e.jsx(c,{sx:{display:"inline-block",verticalAlign:"middle",color:"black",fontSize:1,whiteSpace:"nowrap",textOverflow:"ellipsis",overflow:"hidden",background:"accent.base",padding:1,borderRadius:1,borderBottomRightRadius:1,mr:1},children:"Draft"}):null,t.isActive?e.jsx("strong",{children:t.title}):e.jsxs(e.Fragment,{children:[t.title,t.slug?e.jsx(s,{to:`/research/${l}/edit-update/${t.slug}`,sx:{display:"inline-block",ml:1},children:"Edit"}):null]})]})},a)))}):null,i?e.jsx(n,{small:!0,sx:{mr:2},"data-cy":"create-update",type:"button",children:e.jsx(s,{to:`/research/${l}/new-update`,sx:{color:"black"},children:"Create update"})}):null,d?e.jsx(n,{small:!0,variant:"outline",type:"button",children:e.jsx(s,{to:`/research/${l}/edit`,sx:{color:"black"},children:"Back to research"})}):null]})};try{d.displayName="ResearchEditorOverview",d.__docgenInfo={description:"",displayName:"ResearchEditorOverview",props:{updates:{defaultValue:null,description:"",name:"updates",required:!0,type:{name:"ResearchEditorOverviewUpdate[]"}},researchSlug:{defaultValue:null,description:"",name:"researchSlug",required:!0,type:{name:"string"}},newItemTitle:{defaultValue:null,description:"",name:"newItemTitle",required:!1,type:{name:"string"}},showCreateUpdateButton:{defaultValue:null,description:"",name:"showCreateUpdateButton",required:!1,type:{name:"boolean"}},showBackToResearchButton:{defaultValue:null,description:"",name:"showBackToResearchButton",required:!1,type:{name:"boolean"}},sx:{defaultValue:null,description:"",name:"sx",required:!1,type:{name:"ThemeUIStyleObject"}}}}}catch{}export{d as R}; \ No newline at end of file +import{j as e}from"./jsx-runtime-CexXSJP5.js";import{c as x,a as f,b as l}from"./index.esm-D0u3ndg0.js";import{B as n}from"./Button-D4nxT_g_.js";import{I as s}from"./InternalLink-BRM7MvOa.js";import{C as b,H as g,a as o,T as c}from"./theme-ui-components.esm-BngKL4Rx.js";const v=x({isActive:f().required(),title:l().required(),status:l().optional(),slug:l().nullable()}),d=t=>{const{updates:a,sx:r,researchSlug:l,showCreateUpdateButton:i,showBackToResearchButton:d}=t;return e.jsxs(b,{sx:{p:4,...r},children:[e.jsx(g,{as:"h2",mb:3,variant:"small",children:"Research overview"}),null!=a&&a.length?e.jsx(o,{as:"ul",sx:{margin:0,mb:4,p:0,pl:3},children:a.filter((e=>v.isValidSync(e))).map(((t,a)=>e.jsx(o,{as:"li",sx:{mb:1},children:e.jsxs(c,{variant:"quiet",children:["draft"===t.status?e.jsx(c,{sx:{display:"inline-block",verticalAlign:"middle",color:"black",fontSize:1,whiteSpace:"nowrap",textOverflow:"ellipsis",overflow:"hidden",background:"accent.base",padding:1,borderRadius:1,borderBottomRightRadius:1,mr:1},children:"Draft"}):null,t.isActive?e.jsx("strong",{children:t.title}):e.jsxs(e.Fragment,{children:[t.title,t.slug?e.jsx(s,{to:`/research/${l}/edit-update/${t.slug}`,sx:{display:"inline-block",ml:1},children:"Edit"}):null]})]})},a)))}):null,i?e.jsx(n,{small:!0,sx:{mr:2},"data-cy":"create-update",type:"button",children:e.jsx(s,{to:`/research/${l}/new-update`,sx:{color:"black"},children:"Create update"})}):null,d?e.jsx(n,{small:!0,variant:"outline",type:"button",children:e.jsx(s,{to:`/research/${l}/edit`,sx:{color:"black"},children:"Back to research"})}):null]})};try{d.displayName="ResearchEditorOverview",d.__docgenInfo={description:"",displayName:"ResearchEditorOverview",props:{updates:{defaultValue:null,description:"",name:"updates",required:!0,type:{name:"ResearchEditorOverviewUpdate[]"}},researchSlug:{defaultValue:null,description:"",name:"researchSlug",required:!0,type:{name:"string"}},newItemTitle:{defaultValue:null,description:"",name:"newItemTitle",required:!1,type:{name:"string"}},showCreateUpdateButton:{defaultValue:null,description:"",name:"showCreateUpdateButton",required:!1,type:{name:"boolean"}},showBackToResearchButton:{defaultValue:null,description:"",name:"showBackToResearchButton",required:!1,type:{name:"boolean"}},sx:{defaultValue:null,description:"",name:"sx",required:!1,type:{name:"ThemeUIStyleObject"}}}}}catch{}export{d as R}; \ No newline at end of file diff --git a/storybook-static/assets/ResearchEditorOverview.stories-BLK3g5Q6.js b/storybook-static/assets/ResearchEditorOverview.stories-CfCWjnxr.js similarity index 89% rename from storybook-static/assets/ResearchEditorOverview.stories-BLK3g5Q6.js rename to storybook-static/assets/ResearchEditorOverview.stories-CfCWjnxr.js index 444f28f53e..870ab81691 100644 --- a/storybook-static/assets/ResearchEditorOverview.stories-BLK3g5Q6.js +++ b/storybook-static/assets/ResearchEditorOverview.stories-CfCWjnxr.js @@ -1 +1 @@ -import{j as B}from"./jsx-runtime-CexXSJP5.js";import{R as w}from"./ResearchEditorOverview-DHGZ1VKA.js";import"./index-BP8_t0zE.js";import"./index.esm-D0u3ndg0.js";import"./Button-B7QBvkxh.js";import"./Icon-BoVZOGVD.js";import"./emotion-styled.browser.esm-Dz2BNYeh.js";import"./extends-CF3RwP-h.js";import"./parseProps-780b287c.browser.esm-DiCerVr_.js";import"./emotion-use-insertion-effect-with-fallbacks.browser.esm-UWD3gXM2.js";import"./supporter-D7hp958O.js";import"./icon-arrow-down-CJeToCJe.js";import"./icon-star-active-ClN6U5FF.js";import"./theme-ui-core-jsx-runtime.browser.esm-CH0qhC10.js";import"./hoist-non-react-statics.cjs-CQI8syxn.js";import"./theme-ui-components.esm-DCiJ1mMX.js";import"./InternalLink-CtyTe3gy.js";import"./components-CutHIkdx.js";import"./index-BBRV8eG_.js";import"./index-BXxqJQdV.js";const G={title:"Layout/ResearchEditorOverview",component:w},a=e=>B.jsx(w,{...e}),e=a.bind({});e.args={updates:[{isActive:!0,title:"Update 1",slug:"update-1",status:"published"},{isActive:!1,title:"Update 2",slug:"update-2",status:"published"},{isActive:!1,title:"Update 3",slug:"update-3",status:"published"}],researchSlug:"abc",showBackToResearchButton:!0,showCreateUpdateButton:!0};const r=a.bind({});r.args={...e.args,showBackToResearchButton:!0};const t=a.bind({});t.args={...e.args,showCreateUpdateButton:!0};const s=a.bind({});var o,i,p,c,u,d,m,n,g,l,h,v;s.args={...e.args,updates:[{isActive:!1,title:"Update 1",slug:"update-1",status:"draft"}]},e.parameters={...e.parameters,docs:{...null==(o=e.parameters)?void 0:o.docs,source:{originalSource:"args => ",...null==(p=null==(i=e.parameters)?void 0:i.docs)?void 0:p.source}}},r.parameters={...r.parameters,docs:{...null==(c=r.parameters)?void 0:c.docs,source:{originalSource:"args => ",...null==(d=null==(u=r.parameters)?void 0:u.docs)?void 0:d.source}}},t.parameters={...t.parameters,docs:{...null==(m=t.parameters)?void 0:m.docs,source:{originalSource:"args => ",...null==(g=null==(n=t.parameters)?void 0:n.docs)?void 0:g.source}}},s.parameters={...s.parameters,docs:{...null==(l=s.parameters)?void 0:l.docs,source:{originalSource:"args => ",...null==(v=null==(h=s.parameters)?void 0:h.docs)?void 0:v.source}}};const H=["Default","ShowBackToResearchButton","ShowCreateUpdateButton","DraftItem"];export{e as Default,s as DraftItem,r as ShowBackToResearchButton,t as ShowCreateUpdateButton,H as __namedExportsOrder,G as default}; \ No newline at end of file +import{j as B}from"./jsx-runtime-CexXSJP5.js";import{R as w}from"./ResearchEditorOverview-DCXr4jRB.js";import"./index-BP8_t0zE.js";import"./index.esm-D0u3ndg0.js";import"./Button-D4nxT_g_.js";import"./Icon-BoVZOGVD.js";import"./emotion-styled.browser.esm-Dz2BNYeh.js";import"./extends-CF3RwP-h.js";import"./parseProps-780b287c.browser.esm-DiCerVr_.js";import"./emotion-use-insertion-effect-with-fallbacks.browser.esm-UWD3gXM2.js";import"./supporter-D7hp958O.js";import"./icon-arrow-down-CJeToCJe.js";import"./icon-star-active-ClN6U5FF.js";import"./theme-ui-core-jsx-runtime.browser.esm-CH0qhC10.js";import"./hoist-non-react-statics.cjs-CQI8syxn.js";import"./theme-ui-components.esm-BngKL4Rx.js";import"./InternalLink-BRM7MvOa.js";import"./components-CutHIkdx.js";import"./index-BBRV8eG_.js";import"./index-BXxqJQdV.js";const G={title:"Layout/ResearchEditorOverview",component:w},a=e=>B.jsx(w,{...e}),e=a.bind({});e.args={updates:[{isActive:!0,title:"Update 1",slug:"update-1",status:"published"},{isActive:!1,title:"Update 2",slug:"update-2",status:"published"},{isActive:!1,title:"Update 3",slug:"update-3",status:"published"}],researchSlug:"abc",showBackToResearchButton:!0,showCreateUpdateButton:!0};const r=a.bind({});r.args={...e.args,showBackToResearchButton:!0};const t=a.bind({});t.args={...e.args,showCreateUpdateButton:!0};const s=a.bind({});var o,i,p,c,u,d,m,n,g,l,h,v;s.args={...e.args,updates:[{isActive:!1,title:"Update 1",slug:"update-1",status:"draft"}]},e.parameters={...e.parameters,docs:{...null==(o=e.parameters)?void 0:o.docs,source:{originalSource:"args => ",...null==(p=null==(i=e.parameters)?void 0:i.docs)?void 0:p.source}}},r.parameters={...r.parameters,docs:{...null==(c=r.parameters)?void 0:c.docs,source:{originalSource:"args => ",...null==(d=null==(u=r.parameters)?void 0:u.docs)?void 0:d.source}}},t.parameters={...t.parameters,docs:{...null==(m=t.parameters)?void 0:m.docs,source:{originalSource:"args => ",...null==(g=null==(n=t.parameters)?void 0:n.docs)?void 0:g.source}}},s.parameters={...s.parameters,docs:{...null==(l=s.parameters)?void 0:l.docs,source:{originalSource:"args => ",...null==(v=null==(h=s.parameters)?void 0:h.docs)?void 0:v.source}}};const H=["Default","ShowBackToResearchButton","ShowCreateUpdateButton","DraftItem"];export{e as Default,s as DraftItem,r as ShowBackToResearchButton,t as ShowCreateUpdateButton,H as __namedExportsOrder,G as default}; \ No newline at end of file diff --git a/storybook-static/assets/SearchField-BEwe93wL.js b/storybook-static/assets/SearchField-D-_Sbl66.js similarity index 87% rename from storybook-static/assets/SearchField-BEwe93wL.js rename to storybook-static/assets/SearchField-D-_Sbl66.js index ef009f8c05..d944e96e4a 100644 --- a/storybook-static/assets/SearchField-BEwe93wL.js +++ b/storybook-static/assets/SearchField-D-_Sbl66.js @@ -1 +1 @@ -import{j as e}from"./jsx-runtime-CexXSJP5.js";import{I as n}from"./Icon-BoVZOGVD.js";import{a as t,d as h}from"./theme-ui-components.esm-DCiJ1mMX.js";const i=a=>{const{autoComplete:i="on",name:l="rand-name",id:r="rand-id",dataCy:d,placeHolder:o,value:s,onChange:u,onClickDelete:p,onClickSearch:c,additionalStyle:m={}}=a;return e.jsxs(t,{sx:{position:"relative",width:"100%",display:"flex",alignItems:"center"},children:[e.jsx(h,{autoComplete:i,name:l,id:r,variant:"inputOutline",type:"search","data-cy":d,placeholder:o,value:s,onChange:e=>u(e.target.value),sx:{paddingRight:11,"::-webkit-search-cancel-button":{display:"none"},"::-ms-clear":{display:"none"},...m}}),e.jsxs(t,{sx:{right:2,position:"absolute",display:"flex",alignItems:"center"},children:[s&&e.jsx(n,{sx:{display:"flex",alignItems:"center",marginRight:1},glyph:"close",onClick:p,size:"17"}),e.jsx(n,{sx:{display:"flex",alignItems:"center"},glyph:"search",onClick:c,size:"19"})]})]})};try{i.displayName="SearchField",i.__docgenInfo={description:"",displayName:"SearchField",props:{autoComplete:{defaultValue:null,description:"",name:"autoComplete",required:!1,type:{name:"string"}},name:{defaultValue:null,description:"",name:"name",required:!1,type:{name:"string"}},id:{defaultValue:null,description:"",name:"id",required:!1,type:{name:"string"}},dataCy:{defaultValue:null,description:"",name:"dataCy",required:!0,type:{name:"string"}},placeHolder:{defaultValue:null,description:"",name:"placeHolder",required:!0,type:{name:"string"}},value:{defaultValue:null,description:"",name:"value",required:!0,type:{name:"string"}},onChange:{defaultValue:null,description:"",name:"onChange",required:!0,type:{name:"(value: string) => void"}},onClickDelete:{defaultValue:null,description:"",name:"onClickDelete",required:!0,type:{name:"() => void"}},onClickSearch:{defaultValue:null,description:"",name:"onClickSearch",required:!0,type:{name:"() => void"}},additionalStyle:{defaultValue:null,description:"",name:"additionalStyle",required:!1,type:{name:"ThemeUIStyleObject"}}}}}catch{}export{i as S}; \ No newline at end of file +import{j as e}from"./jsx-runtime-CexXSJP5.js";import{I as n}from"./Icon-BoVZOGVD.js";import{a as t,d as h}from"./theme-ui-components.esm-BngKL4Rx.js";const i=a=>{const{autoComplete:l="on",name:i="rand-name",id:r="rand-id",dataCy:d,placeHolder:o,value:s,onChange:u,onClickDelete:p,onClickSearch:c,additionalStyle:m={}}=a;return e.jsxs(t,{sx:{position:"relative",width:"100%",display:"flex",alignItems:"center"},children:[e.jsx(h,{autoComplete:l,name:i,id:r,variant:"inputOutline",type:"search","data-cy":d,placeholder:o,value:s,onChange:e=>u(e.target.value),sx:{paddingRight:11,"::-webkit-search-cancel-button":{display:"none"},"::-ms-clear":{display:"none"},...m}}),e.jsxs(t,{sx:{right:2,position:"absolute",display:"flex",alignItems:"center"},children:[s&&e.jsx(n,{sx:{display:"flex",alignItems:"center",marginRight:1},glyph:"close",onClick:p,size:"17"}),e.jsx(n,{sx:{display:"flex",alignItems:"center"},glyph:"search",onClick:c,size:"19"})]})]})};try{i.displayName="SearchField",i.__docgenInfo={description:"",displayName:"SearchField",props:{autoComplete:{defaultValue:null,description:"",name:"autoComplete",required:!1,type:{name:"string"}},name:{defaultValue:null,description:"",name:"name",required:!1,type:{name:"string"}},id:{defaultValue:null,description:"",name:"id",required:!1,type:{name:"string"}},dataCy:{defaultValue:null,description:"",name:"dataCy",required:!0,type:{name:"string"}},placeHolder:{defaultValue:null,description:"",name:"placeHolder",required:!0,type:{name:"string"}},value:{defaultValue:null,description:"",name:"value",required:!0,type:{name:"string"}},onChange:{defaultValue:null,description:"",name:"onChange",required:!0,type:{name:"(value: string) => void"}},onClickDelete:{defaultValue:null,description:"",name:"onClickDelete",required:!0,type:{name:"() => void"}},onClickSearch:{defaultValue:null,description:"",name:"onClickSearch",required:!0,type:{name:"() => void"}},additionalStyle:{defaultValue:null,description:"",name:"additionalStyle",required:!1,type:{name:"ThemeUIStyleObject"}}}}}catch{}export{i as S}; \ No newline at end of file diff --git a/storybook-static/assets/SearchField.stories-CWzhmEu1.js b/storybook-static/assets/SearchField.stories-Dg8oCIBr.js similarity index 90% rename from storybook-static/assets/SearchField.stories-CWzhmEu1.js rename to storybook-static/assets/SearchField.stories-Dg8oCIBr.js index 05f7543dd3..0deea05294 100644 --- a/storybook-static/assets/SearchField.stories-CWzhmEu1.js +++ b/storybook-static/assets/SearchField.stories-Dg8oCIBr.js @@ -1 +1 @@ -import{j as i}from"./jsx-runtime-CexXSJP5.js";import{r as u}from"./index-BP8_t0zE.js";import{S as s}from"./SearchField-BEwe93wL.js";import"./Icon-BoVZOGVD.js";import"./emotion-styled.browser.esm-Dz2BNYeh.js";import"./extends-CF3RwP-h.js";import"./parseProps-780b287c.browser.esm-DiCerVr_.js";import"./emotion-use-insertion-effect-with-fallbacks.browser.esm-UWD3gXM2.js";import"./supporter-D7hp958O.js";import"./icon-arrow-down-CJeToCJe.js";import"./icon-star-active-ClN6U5FF.js";import"./theme-ui-core-jsx-runtime.browser.esm-CH0qhC10.js";import"./hoist-non-react-statics.cjs-CQI8syxn.js";import"./theme-ui-components.esm-DCiJ1mMX.js";const v={title:"Forms/SearchField",component:s},e=()=>{const[e,r]=u.useState("");return i.jsx(s,{dataCy:"default-search-box",placeHolder:"Default search",value:e,onChange:e=>r(e),onClickDelete:()=>r(""),onClickSearch:()=>{}})};var a,t,o;e.parameters={...e.parameters,docs:{...null==(a=e.parameters)?void 0:a.docs,source:{originalSource:"() => {\n const [searchValue, setSearchValue] = useState('');\n return setSearchValue(value)} onClickDelete={() => setSearchValue('')} onClickSearch={() => {}} />;\n}",...null==(o=null==(t=e.parameters)?void 0:t.docs)?void 0:o.source}}};const j=["Default"];export{e as Default,j as __namedExportsOrder,v as default}; \ No newline at end of file +import{j as i}from"./jsx-runtime-CexXSJP5.js";import{r as u}from"./index-BP8_t0zE.js";import{S as s}from"./SearchField-D-_Sbl66.js";import"./Icon-BoVZOGVD.js";import"./emotion-styled.browser.esm-Dz2BNYeh.js";import"./extends-CF3RwP-h.js";import"./parseProps-780b287c.browser.esm-DiCerVr_.js";import"./emotion-use-insertion-effect-with-fallbacks.browser.esm-UWD3gXM2.js";import"./supporter-D7hp958O.js";import"./icon-arrow-down-CJeToCJe.js";import"./icon-star-active-ClN6U5FF.js";import"./theme-ui-core-jsx-runtime.browser.esm-CH0qhC10.js";import"./hoist-non-react-statics.cjs-CQI8syxn.js";import"./theme-ui-components.esm-BngKL4Rx.js";const v={title:"Forms/SearchField",component:s},e=()=>{const[e,r]=u.useState("");return i.jsx(s,{dataCy:"default-search-box",placeHolder:"Default search",value:e,onChange:e=>r(e),onClickDelete:()=>r(""),onClickSearch:()=>{}})};var a,t,o;e.parameters={...e.parameters,docs:{...null==(a=e.parameters)?void 0:a.docs,source:{originalSource:"() => {\n const [searchValue, setSearchValue] = useState('');\n return setSearchValue(value)} onClickDelete={() => setSearchValue('')} onClickSearch={() => {}} />;\n}",...null==(o=null==(t=e.parameters)?void 0:t.docs)?void 0:o.source}}};const j=["Default"];export{e as Default,j as __namedExportsOrder,v as default}; \ No newline at end of file diff --git a/storybook-static/assets/Select-C5bekj-a.js b/storybook-static/assets/Select-Jv7oc3OL.js similarity index 99% rename from storybook-static/assets/Select-C5bekj-a.js rename to storybook-static/assets/Select-Jv7oc3OL.js index 216fdb1d06..a4709b55f4 100644 --- a/storybook-static/assets/Select-C5bekj-a.js +++ b/storybook-static/assets/Select-Jv7oc3OL.js @@ -1 +1 @@ -import{j}from"./jsx-runtime-CexXSJP5.js";import{_ as ee,a as Vt}from"./defineProperty-Dr9G4DxF.js";import{_ as Mt}from"./objectWithoutPropertiesLoose-CAYKN5F1.js";import{r as f}from"./index-BP8_t0zE.js";import{_ as C}from"./extends-CF3RwP-h.js";import{_ as Pt,a as xt}from"./setPrototypeOf-NYsvoNVB.js";import{_ as wt,a as De}from"./isNativeReflectConstruct-gwnEYaHE.js";import{_ as Xe}from"./typeof-QjJsDpFa.js";import{k as Dt,j as S,c as Ze}from"./emotion-react.browser.esm-BYoRxRk_.js";import{r as Lt}from"./index-BBRV8eG_.js";import{a as Rt}from"./floating-ui.dom-DtcZXcvp.js";import{I as Ft}from"./icon-arrow-down-CJeToCJe.js";import{I as Et,F as Le,T as Tt}from"./theme-ui-components.esm-DCiJ1mMX.js";import{u as kt}from"./theme-ui-core.browser.esm-CIov4Ln1.js";function be(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=Array(t);n2?n-2:0),r=2;r-1}function Jt(e){return de(e)?window.innerHeight:e.clientHeight}function et(e){return de(e)?window.pageYOffset:e.scrollTop}function le(e,t){de(e)?window.scrollTo(0,t):e.scrollTop=t}function Qt(e){var t=getComputedStyle(e),n="absolute"===t.position,o=/(auto|scroll)/;if("fixed"===t.position)return document.documentElement;for(var r=e;r=r.parentElement;)if(t=getComputedStyle(r),(!n||"static"!==t.position)&&o.test(t.overflow+t.overflowY+t.overflowX))return r;return document.documentElement}function en(e,t,n,o){return n*((e=e/o-1)*e*e+1)+t}function re(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:200,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:se,r=et(e),i=t-r,a=0;!function t(){var s=en(a+=10,r,i,n);le(e,s),an.bottom?le(e,Math.min(t.offsetTop+t.clientHeight-e.offsetHeight+r,e.scrollHeight)):o.top-r1?t-1:0),o=1;o=f)return{placement:"bottom",maxHeight:t};if(I>=f&&!a)return i&&re(l,w,x),{placement:"bottom",maxHeight:t};if(!a&&I>=o||a&&C>=o)return i&&re(l,w,x),{placement:"bottom",maxHeight:a?C-b:I-b};if("auto"===r||a){var M=t,E=a?y:S;return E>=o&&(M=Math.min(E-b-s,t)),{placement:"top",maxHeight:M}}if("bottom"===r)return i&&le(l,w),{placement:"bottom",maxHeight:t};break;case"top":if(y>=f)return{placement:"top",maxHeight:t};if(S>=f&&!a)return i&&re(l,V,x),{placement:"top",maxHeight:t};if(!a&&S>=o||a&&y>=o){var L=t;return(!a&&S>=o||a&&y>=o)&&(L=a?y-O:S-O),i&&re(l,V,x),{placement:"top",maxHeight:L}}return{placement:"bottom",maxHeight:t};default:throw new Error('Invalid placement provided "'.concat(r,'".'))}return u}function pn(e){return e?{bottom:"top",top:"bottom"}[e]:"bottom"}var ke,nt=function(e){return"auto"===e?"bottom":e},fn=function(e,t){var n,o=e.placement,r=e.theme,i=r.borderRadius,a=r.spacing,s=r.colors;return O((ee(n={label:"menu"},pn(o),"100%"),ee(n,"position","absolute"),ee(n,"width","100%"),ee(n,"zIndex",1),n),t?{}:{backgroundColor:s.neutral0,borderRadius:i,boxShadow:"0 0 0 1px hsla(0, 0%, 0%, 0.1), 0 4px 11px hsla(0, 0%, 0%, 0.1)",marginBottom:a.menuGutter,marginTop:a.menuGutter})},rt=f.createContext(null),vn=function(e){var t=e.children,n=e.minMenuHeight,o=e.maxMenuHeight,r=e.menuPlacement,i=e.menuPosition,a=e.menuShouldScrollIntoView,s=e.theme,l=(f.useContext(rt)||{}).setPortalPlacement,u=f.useRef(null),c=G(f.useState(o),2),p=c[0],d=c[1],h=G(f.useState(null),2),m=h[0],v=h[1],g=s.spacing.controlHeight;return Se((function(){var e=u.current;if(e){var t="fixed"===i,s=dn({maxHeight:o,menuEl:e,minHeight:n,placement:r,shouldScroll:a&&!t,isFixedPosition:t,controlHeight:g});d(s.maxHeight),v(s.placement),null==l||l(s.placement)}}),[o,r,i,a,n,l,g]),t({ref:u,placerProps:O(O({},e),{},{placement:m||nt(r),maxHeight:p})})},mn=function(e){var t=e.children,n=e.innerRef,o=e.innerProps;return S("div",C({},L(e,"menu",{menu:!0}),{ref:n},o),t)},hn=mn,gn=function(e,t){var n=e.maxHeight,o=e.theme.spacing.baseUnit;return O({maxHeight:n,overflowY:"auto",position:"relative",WebkitOverflowScrolling:"touch"},t?{}:{paddingBottom:o,paddingTop:o})},bn=function(e){var t=e.children,n=e.innerProps,o=e.innerRef,r=e.isMulti;return S("div",C({},L(e,"menuList",{"menu-list":!0,"menu-list--is-multi":r}),{ref:o},n),t)},ot=function(e,t){var n=e.theme,o=n.spacing.baseUnit,r=n.colors;return O({textAlign:"center"},t?{}:{color:r.neutral40,padding:"".concat(2*o,"px ").concat(3*o,"px")})},Sn=ot,On=ot,Cn=function(e){var t=e.children,n=void 0===t?"No options":t,o=e.innerProps,r=q(e,un);return S("div",C({},L(O(O({},r),{},{children:n,innerProps:o}),"noOptionsMessage",{"menu-notice":!0,"menu-notice--no-options":!0}),o),n)},yn=function(e){var t=e.children,n=void 0===t?"Loading...":t,o=e.innerProps,r=q(e,cn);return S("div",C({},L(O(O({},r),{},{children:n,innerProps:o}),"loadingMessage",{"menu-notice":!0,"menu-notice--loading":!0}),o),n)},In=function(e){var t=e.rect,n=e.offset,o=e.position;return{left:t.left,position:o,top:n,width:t.width,zIndex:1}},Vn=function(e){var t=e.appendTo,n=e.children,o=e.controlElement,r=e.innerProps,i=e.menuPlacement,a=e.menuPosition,s=f.useRef(null),l=f.useRef(null),u=G(f.useState(nt(i)),2),c=u[0],p=u[1],d=f.useMemo((function(){return{setPortalPlacement:p}}),[]),h=G(f.useState(null),2),m=h[0],v=h[1],g=f.useCallback((function(){if(o){var e=tn(o),t="fixed"===a?0:window.pageYOffset,n=e[c]+t;(n!==(null==m?void 0:m.offset)||e.left!==(null==m?void 0:m.rect.left)||e.width!==(null==m?void 0:m.rect.width))&&v({offset:n,rect:e})}}),[o,a,c,null==m?void 0:m.offset,null==m?void 0:m.rect.left,null==m?void 0:m.rect.width]);Se((function(){g()}),[g]);var b=f.useCallback((function(){"function"==typeof l.current&&(l.current(),l.current=null),o&&s.current&&(l.current=Rt(o,s.current,g,{elementResize:"ResizeObserver"in window}))}),[o,g]);Se((function(){b()}),[b]);var y=f.useCallback((function(e){s.current=e,b()}),[b]);if(!t&&"fixed"!==a||!m)return null;var I=S("div",C({ref:y},L(O(O({},e),{},{offset:m.offset,position:a,rect:m.rect}),"menuPortal",{"menu-portal":!0}),r),n);return S(rt.Provider,{value:d},t?Lt.createPortal(I,t):I)},Mn=function(e){var t=e.isDisabled;return{label:"container",direction:e.isRtl?"rtl":void 0,pointerEvents:t?"none":void 0,position:"relative"}},Pn=function(e){var t=e.children,n=e.innerProps,o=e.isDisabled,r=e.isRtl;return S("div",C({},L(e,"container",{"--is-disabled":o,"--is-rtl":r}),n),t)},xn=function(e,t){var n=e.theme.spacing,o=e.isMulti,r=e.hasValue,i=e.selectProps.controlShouldRenderValue;return O({alignItems:"center",display:o&&r&&i?"flex":"grid",flex:1,flexWrap:"wrap",WebkitOverflowScrolling:"touch",position:"relative",overflow:"hidden"},t?{}:{padding:"".concat(n.baseUnit/2,"px ").concat(2*n.baseUnit,"px")})},wn=function(e){var t=e.children,n=e.innerProps,o=e.isMulti,r=e.hasValue;return S("div",C({},L(e,"valueContainer",{"value-container":!0,"value-container--is-multi":o,"value-container--has-value":r}),n),t)},Dn=function(){return{alignItems:"center",alignSelf:"stretch",display:"flex",flexShrink:0}},Ln=function(e){var t=e.children,n=e.innerProps;return S("div",C({},L(e,"indicatorsContainer",{indicators:!0}),n),t)},Rn=["size"],Fn=["innerProps","isRtl","size"],En={name:"8mmkcg",styles:"display:inline-block;fill:currentColor;line-height:1;stroke:currentColor;stroke-width:0"},it=function(e){var t=e.size,n=q(e,Rn);return S("svg",C({height:t,width:t,viewBox:"0 0 20 20","aria-hidden":"true",focusable:"false",css:En},n))},Ve=function(e){return S(it,C({size:20},e),S("path",{d:"M14.348 14.849c-0.469 0.469-1.229 0.469-1.697 0l-2.651-3.030-2.651 3.029c-0.469 0.469-1.229 0.469-1.697 0-0.469-0.469-0.469-1.229 0-1.697l2.758-3.15-2.759-3.152c-0.469-0.469-0.469-1.228 0-1.697s1.228-0.469 1.697 0l2.652 3.031 2.651-3.031c0.469-0.469 1.228-0.469 1.697 0s0.469 1.229 0 1.697l-2.758 3.152 2.758 3.15c0.469 0.469 0.469 1.229 0 1.698z"}))},at=function(e){return S(it,C({size:20},e),S("path",{d:"M4.516 7.548c0.436-0.446 1.043-0.481 1.576 0l3.908 3.747 3.908-3.747c0.533-0.481 1.141-0.446 1.574 0 0.436 0.445 0.408 1.197 0 1.615-0.406 0.418-4.695 4.502-4.695 4.502-0.217 0.223-0.502 0.335-0.787 0.335s-0.57-0.112-0.789-0.335c0 0-4.287-4.084-4.695-4.502s-0.436-1.17 0-1.615z"}))},st=function(e,t){var n=e.isFocused,o=e.theme,r=o.spacing.baseUnit,i=o.colors;return O({label:"indicatorContainer",display:"flex",transition:"color 150ms"},t?{}:{color:n?i.neutral60:i.neutral20,padding:2*r,":hover":{color:n?i.neutral80:i.neutral40}})},Tn=st,kn=function(e){var t=e.children,n=e.innerProps;return S("div",C({},L(e,"dropdownIndicator",{indicator:!0,"dropdown-indicator":!0}),n),t||S(at,null))},An=st,Hn=function(e){var t=e.children,n=e.innerProps;return S("div",C({},L(e,"clearIndicator",{indicator:!0,"clear-indicator":!0}),n),t||S(Ve,null))},$n=function(e,t){var n=e.isDisabled,o=e.theme,r=o.spacing.baseUnit,i=o.colors;return O({label:"indicatorSeparator",alignSelf:"stretch",width:1},t?{}:{backgroundColor:n?i.neutral10:i.neutral20,marginBottom:2*r,marginTop:2*r})},_n=function(e){var t=e.innerProps;return S("span",C({},t,L(e,"indicatorSeparator",{"indicator-separator":!0})))},Un=Dt(ke||(ke=Yt(["\n 0%, 80%, 100% { opacity: 0; }\n 40% { opacity: 1; }\n"]))),jn=function(e,t){var n=e.isFocused,o=e.size,r=e.theme,i=r.colors,a=r.spacing.baseUnit;return O({label:"loadingIndicator",display:"flex",transition:"color 150ms",alignSelf:"center",fontSize:o,lineHeight:1,marginRight:o,textAlign:"center",verticalAlign:"middle"},t?{}:{color:n?i.neutral60:i.neutral20,padding:2*a})},pe=function(e){var t=e.delay,n=e.offset;return S("span",{css:Ze({animation:"".concat(Un," 1s ease-in-out ").concat(t,"ms infinite;"),backgroundColor:"currentColor",borderRadius:"1em",display:"inline-block",marginLeft:n?"1em":void 0,height:"1em",verticalAlign:"top",width:"1em"},"","")})},Nn=function(e){var t=e.innerProps,n=e.isRtl,o=e.size,r=void 0===o?4:o,i=q(e,Fn);return S("div",C({},L(O(O({},i),{},{innerProps:t,isRtl:n,size:r}),"loadingIndicator",{indicator:!0,"loading-indicator":!0}),t),S(pe,{delay:0,offset:n}),S(pe,{delay:160,offset:!0}),S(pe,{delay:320,offset:!n}))},Bn=function(e,t){var n=e.isDisabled,o=e.isFocused,r=e.theme,i=r.colors,a=r.borderRadius;return O({label:"control",alignItems:"center",cursor:"default",display:"flex",flexWrap:"wrap",justifyContent:"space-between",minHeight:r.spacing.controlHeight,outline:"0 !important",position:"relative",transition:"all 100ms"},t?{}:{backgroundColor:n?i.neutral5:i.neutral0,borderColor:n?i.neutral10:o?i.primary:i.neutral20,borderRadius:a,borderStyle:"solid",borderWidth:1,boxShadow:o?"0 0 0 1px ".concat(i.primary):void 0,"&:hover":{borderColor:o?i.primary:i.neutral30}})},zn=function(e){var t=e.children,n=e.isDisabled,o=e.isFocused,r=e.innerRef,i=e.innerProps,a=e.menuIsOpen;return S("div",C({ref:r},L(e,"control",{control:!0,"control--is-disabled":n,"control--is-focused":o,"control--menu-is-open":a}),i,{"aria-disabled":n||void 0}),t)},Wn=zn,Gn=["data"],qn=function(e,t){var n=e.theme.spacing;return t?{}:{paddingBottom:2*n.baseUnit,paddingTop:2*n.baseUnit}},Yn=function(e){var t=e.children,n=e.cx,o=e.getStyles,r=e.getClassNames,i=e.Heading,a=e.headingProps,s=e.innerProps,l=e.label,u=e.theme,c=e.selectProps;return S("div",C({},L(e,"group",{group:!0}),s),S(i,C({},a,{selectProps:c,theme:u,getStyles:o,getClassNames:r,cx:n}),l),S("div",null,t))},Kn=function(e,t){var n=e.theme,o=n.colors,r=n.spacing;return O({label:"group",cursor:"default",display:"block"},t?{}:{color:o.neutral40,fontSize:"75%",fontWeight:500,marginBottom:"0.25em",paddingLeft:3*r.baseUnit,paddingRight:3*r.baseUnit,textTransform:"uppercase"})},Xn=function(e){var t=Qe(e);t.data;var n=q(t,Gn);return S("div",C({},L(e,"groupHeading",{"group-heading":!0}),n))},Zn=Yn,Jn=["innerRef","isDisabled","isHidden","inputClassName"],Qn=function(e,t){var n=e.isDisabled,o=e.value,r=e.theme,i=r.spacing,a=r.colors;return O(O({visibility:n?"hidden":"visible",transform:o?"translateZ(0)":""},er),t?{}:{margin:i.baseUnit/2,paddingBottom:i.baseUnit/2,paddingTop:i.baseUnit/2,color:a.neutral80})},lt={gridArea:"1 / 2",font:"inherit",minWidth:"2px",border:0,margin:0,outline:0,padding:0},er={flex:"1 1 auto",display:"inline-grid",gridArea:"1 / 1 / 2 / 3",gridTemplateColumns:"0 min-content","&:after":O({content:'attr(data-value) " "',visibility:"hidden",whiteSpace:"pre"},lt)},tr=function(e){return O({label:"input",color:"inherit",background:0,opacity:e?0:1,width:"100%"},lt)},nr=function(e){var t=e.cx,n=e.value,o=Qe(e),r=o.innerRef,i=o.isDisabled,a=o.isHidden,s=o.inputClassName,l=q(o,Jn);return S("div",C({},L(e,"input",{"input-container":!0}),{"data-value":n||""}),S("input",C({className:t({input:!0},s),ref:r,style:tr(a),disabled:i},l)))},rr=nr,or=function(e,t){var n=e.theme,o=n.spacing,r=n.borderRadius,i=n.colors;return O({label:"multiValue",display:"flex",minWidth:0},t?{}:{backgroundColor:i.neutral10,borderRadius:r/2,margin:o.baseUnit/2})},ir=function(e,t){var n=e.theme,o=n.borderRadius,r=n.colors,i=e.cropWithEllipsis;return O({overflow:"hidden",textOverflow:i||void 0===i?"ellipsis":void 0,whiteSpace:"nowrap"},t?{}:{borderRadius:o/2,color:r.neutral80,fontSize:"85%",padding:3,paddingLeft:6})},ar=function(e,t){var n=e.theme,o=n.spacing,r=n.borderRadius,i=n.colors,a=e.isFocused;return O({alignItems:"center",display:"flex"},t?{}:{borderRadius:r/2,backgroundColor:a?i.dangerLight:void 0,paddingLeft:o.baseUnit,paddingRight:o.baseUnit,":hover":{backgroundColor:i.dangerLight,color:i.danger}})},ut=function(e){var t=e.children,n=e.innerProps;return S("div",n,t)},sr=ut,lr=ut;function ur(e){var t=e.children,n=e.innerProps;return S("div",C({role:"button"},n),t||S(Ve,{size:14}))}var cr=function(e){var t=e.children,n=e.components,o=e.data,r=e.innerProps,i=e.isDisabled,a=e.removeProps,s=e.selectProps,l=n.Container,u=n.Label,c=n.Remove;return S(l,{data:o,innerProps:O(O({},L(e,"multiValue",{"multi-value":!0,"multi-value--is-disabled":i})),r),selectProps:s},S(u,{data:o,innerProps:O({},L(e,"multiValueLabel",{"multi-value__label":!0})),selectProps:s},t),S(c,{data:o,innerProps:O(O({},L(e,"multiValueRemove",{"multi-value__remove":!0})),{},{"aria-label":"Remove ".concat(t||"option")},a),selectProps:s}))},dr=cr,pr=function(e,t){var n=e.isDisabled,o=e.isFocused,r=e.isSelected,i=e.theme,a=i.spacing,s=i.colors;return O({label:"option",cursor:"default",display:"block",fontSize:"inherit",width:"100%",userSelect:"none",WebkitTapHighlightColor:"rgba(0, 0, 0, 0)"},t?{}:{backgroundColor:r?s.primary:o?s.primary25:"transparent",color:n?s.neutral20:r?s.neutral0:"inherit",padding:"".concat(2*a.baseUnit,"px ").concat(3*a.baseUnit,"px"),":active":{backgroundColor:n?void 0:r?s.primary:s.primary50}})},fr=function(e){var t=e.children,n=e.isDisabled,o=e.isFocused,r=e.isSelected,i=e.innerRef,a=e.innerProps;return S("div",C({},L(e,"option",{option:!0,"option--is-disabled":n,"option--is-focused":o,"option--is-selected":r}),{ref:i,"aria-disabled":n},a),t)},vr=fr,mr=function(e,t){var n=e.theme,o=n.spacing,r=n.colors;return O({label:"placeholder",gridArea:"1 / 1 / 2 / 3"},t?{}:{color:r.neutral50,marginLeft:o.baseUnit/2,marginRight:o.baseUnit/2})},hr=function(e){var t=e.children,n=e.innerProps;return S("div",C({},L(e,"placeholder",{placeholder:!0}),n),t)},gr=hr,br=function(e,t){var n=e.isDisabled,o=e.theme,r=o.spacing,i=o.colors;return O({label:"singleValue",gridArea:"1 / 1 / 2 / 3",maxWidth:"100%",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},t?{}:{color:n?i.neutral40:i.neutral80,marginLeft:r.baseUnit/2,marginRight:r.baseUnit/2})},Sr=function(e){var t=e.children,n=e.isDisabled,o=e.innerProps;return S("div",C({},L(e,"singleValue",{"single-value":!0,"single-value--is-disabled":n}),o),t)},Or=Sr,ue={ClearIndicator:Hn,Control:Wn,DropdownIndicator:kn,DownChevron:at,CrossIcon:Ve,Group:Zn,GroupHeading:Xn,IndicatorsContainer:Ln,IndicatorSeparator:_n,Input:rr,LoadingIndicator:Nn,Menu:hn,MenuList:bn,MenuPortal:Vn,LoadingMessage:yn,NoOptionsMessage:Cn,MultiValue:dr,MultiValueContainer:sr,MultiValueLabel:lr,MultiValueRemove:ur,Option:vr,Placeholder:gr,SelectContainer:Pn,SingleValue:Or,ValueContainer:wn},Cr=function(e){return O(O({},ue),e.components)},Ae=Number.isNaN||function(e){return"number"==typeof e&&e!=e};function yr(e,t){return!!(e===t||Ae(e)&&Ae(t))}function Ir(e,t){if(e.length!==t.length)return!1;for(var n=0;n1?"s":""," ").concat(r.join(","),", selected.");case"select-option":return"option ".concat(o,i?" is disabled. Select another option.":", selected.");default:return""}},onFocus:function(e){var t=e.context,n=e.focused,o=e.options,r=e.label,i=void 0===r?"":r,a=e.selectValue,s=e.isDisabled,l=e.isSelected,u=e.isAppleDevice,c=function(e,t){return e&&e.length?"".concat(e.indexOf(t)+1," of ").concat(e.length):""};if("value"===t&&a)return"value ".concat(i," focused, ").concat(c(a,n),".");if("menu"===t&&u){var p=s?" disabled":"",d="".concat(l?" selected":"").concat(p);return"".concat(i).concat(d,", ").concat(c(o,n),".")}return""},onFilter:function(e){var t=e.inputValue,n=e.resultsMessage;return"".concat(n).concat(t?" for search term "+t:"",".")}},wr=function(e){var t=e.ariaSelection,n=e.focusedOption,o=e.focusedValue,r=e.focusableOptions,i=e.isFocused,a=e.selectValue,s=e.selectProps,l=e.id,u=e.isAppleDevice,c=s.ariaLiveMessages,p=s.getOptionLabel,d=s.inputValue,h=s.isMulti,m=s.isOptionDisabled,v=s.isSearchable,g=s.menuIsOpen,b=s.options,y=s.screenReaderStatus,C=s.tabSelectsValue,I=s.isLoading,w=s["aria-label"],V=s["aria-live"],x=f.useMemo((function(){return O(O({},xr),c||{})}),[c]),M=f.useMemo((function(){var e,n="";if(t&&x.onChange){var o=t.option,r=t.options,i=t.removedValue,s=t.removedValues,l=t.value,u=i||o||(e=l,Array.isArray(e)?null:e),c=u?p(u):"",d=r||s||void 0,f=d?d.map(p):[],h=O({isDisabled:u&&m(u,a),label:c,labels:f},t);n=x.onChange(h)}return n}),[t,x,m,a,p]),E=f.useMemo((function(){var e="",t=n||o,i=!!(n&&a&&a.includes(n));if(t&&x.onFocus){var s={focused:t,label:p(t),isDisabled:m(t,a),isSelected:i,options:r,context:t===n?"menu":"value",selectValue:a,isAppleDevice:u};e=x.onFocus(s)}return e}),[n,o,p,m,x,r,a,u]),L=f.useMemo((function(){var e="";if(g&&b.length&&!I&&x.onFilter){var t=y({count:r.length});e=x.onFilter({inputValue:d,resultsMessage:t})}return e}),[r,d,g,x,b,y,I]),D="initial-input-focus"===(null==t?void 0:t.action),P=f.useMemo((function(){var e="";if(x.guidance){var t=o?"value":g?"menu":"input";e=x.guidance({"aria-label":w,context:t,isDisabled:n&&m(n,a),isMulti:h,isSearchable:v,tabSelectsValue:C,isInitialFocus:D})}return e}),[w,n,o,h,m,v,g,x,a,C,D]),k=S(f.Fragment,null,S("span",{id:"aria-selection"},M),S("span",{id:"aria-focused"},E),S("span",{id:"aria-results"},L),S("span",{id:"aria-guidance"},P));return S(f.Fragment,null,S(He,{id:l},D&&k),S(He,{"aria-live":V,"aria-atomic":"false","aria-relevant":"additions text",role:"log"},i&&!D&&k))},Dr=wr,Oe=[{base:"A",letters:"A\u24b6\uff21\xc0\xc1\xc2\u1ea6\u1ea4\u1eaa\u1ea8\xc3\u0100\u0102\u1eb0\u1eae\u1eb4\u1eb2\u0226\u01e0\xc4\u01de\u1ea2\xc5\u01fa\u01cd\u0200\u0202\u1ea0\u1eac\u1eb6\u1e00\u0104\u023a\u2c6f"},{base:"AA",letters:"\ua732"},{base:"AE",letters:"\xc6\u01fc\u01e2"},{base:"AO",letters:"\ua734"},{base:"AU",letters:"\ua736"},{base:"AV",letters:"\ua738\ua73a"},{base:"AY",letters:"\ua73c"},{base:"B",letters:"B\u24b7\uff22\u1e02\u1e04\u1e06\u0243\u0182\u0181"},{base:"C",letters:"C\u24b8\uff23\u0106\u0108\u010a\u010c\xc7\u1e08\u0187\u023b\ua73e"},{base:"D",letters:"D\u24b9\uff24\u1e0a\u010e\u1e0c\u1e10\u1e12\u1e0e\u0110\u018b\u018a\u0189\ua779"},{base:"DZ",letters:"\u01f1\u01c4"},{base:"Dz",letters:"\u01f2\u01c5"},{base:"E",letters:"E\u24ba\uff25\xc8\xc9\xca\u1ec0\u1ebe\u1ec4\u1ec2\u1ebc\u0112\u1e14\u1e16\u0114\u0116\xcb\u1eba\u011a\u0204\u0206\u1eb8\u1ec6\u0228\u1e1c\u0118\u1e18\u1e1a\u0190\u018e"},{base:"F",letters:"F\u24bb\uff26\u1e1e\u0191\ua77b"},{base:"G",letters:"G\u24bc\uff27\u01f4\u011c\u1e20\u011e\u0120\u01e6\u0122\u01e4\u0193\ua7a0\ua77d\ua77e"},{base:"H",letters:"H\u24bd\uff28\u0124\u1e22\u1e26\u021e\u1e24\u1e28\u1e2a\u0126\u2c67\u2c75\ua78d"},{base:"I",letters:"I\u24be\uff29\xcc\xcd\xce\u0128\u012a\u012c\u0130\xcf\u1e2e\u1ec8\u01cf\u0208\u020a\u1eca\u012e\u1e2c\u0197"},{base:"J",letters:"J\u24bf\uff2a\u0134\u0248"},{base:"K",letters:"K\u24c0\uff2b\u1e30\u01e8\u1e32\u0136\u1e34\u0198\u2c69\ua740\ua742\ua744\ua7a2"},{base:"L",letters:"L\u24c1\uff2c\u013f\u0139\u013d\u1e36\u1e38\u013b\u1e3c\u1e3a\u0141\u023d\u2c62\u2c60\ua748\ua746\ua780"},{base:"LJ",letters:"\u01c7"},{base:"Lj",letters:"\u01c8"},{base:"M",letters:"M\u24c2\uff2d\u1e3e\u1e40\u1e42\u2c6e\u019c"},{base:"N",letters:"N\u24c3\uff2e\u01f8\u0143\xd1\u1e44\u0147\u1e46\u0145\u1e4a\u1e48\u0220\u019d\ua790\ua7a4"},{base:"NJ",letters:"\u01ca"},{base:"Nj",letters:"\u01cb"},{base:"O",letters:"O\u24c4\uff2f\xd2\xd3\xd4\u1ed2\u1ed0\u1ed6\u1ed4\xd5\u1e4c\u022c\u1e4e\u014c\u1e50\u1e52\u014e\u022e\u0230\xd6\u022a\u1ece\u0150\u01d1\u020c\u020e\u01a0\u1edc\u1eda\u1ee0\u1ede\u1ee2\u1ecc\u1ed8\u01ea\u01ec\xd8\u01fe\u0186\u019f\ua74a\ua74c"},{base:"OI",letters:"\u01a2"},{base:"OO",letters:"\ua74e"},{base:"OU",letters:"\u0222"},{base:"P",letters:"P\u24c5\uff30\u1e54\u1e56\u01a4\u2c63\ua750\ua752\ua754"},{base:"Q",letters:"Q\u24c6\uff31\ua756\ua758\u024a"},{base:"R",letters:"R\u24c7\uff32\u0154\u1e58\u0158\u0210\u0212\u1e5a\u1e5c\u0156\u1e5e\u024c\u2c64\ua75a\ua7a6\ua782"},{base:"S",letters:"S\u24c8\uff33\u1e9e\u015a\u1e64\u015c\u1e60\u0160\u1e66\u1e62\u1e68\u0218\u015e\u2c7e\ua7a8\ua784"},{base:"T",letters:"T\u24c9\uff34\u1e6a\u0164\u1e6c\u021a\u0162\u1e70\u1e6e\u0166\u01ac\u01ae\u023e\ua786"},{base:"TZ",letters:"\ua728"},{base:"U",letters:"U\u24ca\uff35\xd9\xda\xdb\u0168\u1e78\u016a\u1e7a\u016c\xdc\u01db\u01d7\u01d5\u01d9\u1ee6\u016e\u0170\u01d3\u0214\u0216\u01af\u1eea\u1ee8\u1eee\u1eec\u1ef0\u1ee4\u1e72\u0172\u1e76\u1e74\u0244"},{base:"V",letters:"V\u24cb\uff36\u1e7c\u1e7e\u01b2\ua75e\u0245"},{base:"VY",letters:"\ua760"},{base:"W",letters:"W\u24cc\uff37\u1e80\u1e82\u0174\u1e86\u1e84\u1e88\u2c72"},{base:"X",letters:"X\u24cd\uff38\u1e8a\u1e8c"},{base:"Y",letters:"Y\u24ce\uff39\u1ef2\xdd\u0176\u1ef8\u0232\u1e8e\u0178\u1ef6\u1ef4\u01b3\u024e\u1efe"},{base:"Z",letters:"Z\u24cf\uff3a\u0179\u1e90\u017b\u017d\u1e92\u1e94\u01b5\u0224\u2c7f\u2c6b\ua762"},{base:"a",letters:"a\u24d0\uff41\u1e9a\xe0\xe1\xe2\u1ea7\u1ea5\u1eab\u1ea9\xe3\u0101\u0103\u1eb1\u1eaf\u1eb5\u1eb3\u0227\u01e1\xe4\u01df\u1ea3\xe5\u01fb\u01ce\u0201\u0203\u1ea1\u1ead\u1eb7\u1e01\u0105\u2c65\u0250"},{base:"aa",letters:"\ua733"},{base:"ae",letters:"\xe6\u01fd\u01e3"},{base:"ao",letters:"\ua735"},{base:"au",letters:"\ua737"},{base:"av",letters:"\ua739\ua73b"},{base:"ay",letters:"\ua73d"},{base:"b",letters:"b\u24d1\uff42\u1e03\u1e05\u1e07\u0180\u0183\u0253"},{base:"c",letters:"c\u24d2\uff43\u0107\u0109\u010b\u010d\xe7\u1e09\u0188\u023c\ua73f\u2184"},{base:"d",letters:"d\u24d3\uff44\u1e0b\u010f\u1e0d\u1e11\u1e13\u1e0f\u0111\u018c\u0256\u0257\ua77a"},{base:"dz",letters:"\u01f3\u01c6"},{base:"e",letters:"e\u24d4\uff45\xe8\xe9\xea\u1ec1\u1ebf\u1ec5\u1ec3\u1ebd\u0113\u1e15\u1e17\u0115\u0117\xeb\u1ebb\u011b\u0205\u0207\u1eb9\u1ec7\u0229\u1e1d\u0119\u1e19\u1e1b\u0247\u025b\u01dd"},{base:"f",letters:"f\u24d5\uff46\u1e1f\u0192\ua77c"},{base:"g",letters:"g\u24d6\uff47\u01f5\u011d\u1e21\u011f\u0121\u01e7\u0123\u01e5\u0260\ua7a1\u1d79\ua77f"},{base:"h",letters:"h\u24d7\uff48\u0125\u1e23\u1e27\u021f\u1e25\u1e29\u1e2b\u1e96\u0127\u2c68\u2c76\u0265"},{base:"hv",letters:"\u0195"},{base:"i",letters:"i\u24d8\uff49\xec\xed\xee\u0129\u012b\u012d\xef\u1e2f\u1ec9\u01d0\u0209\u020b\u1ecb\u012f\u1e2d\u0268\u0131"},{base:"j",letters:"j\u24d9\uff4a\u0135\u01f0\u0249"},{base:"k",letters:"k\u24da\uff4b\u1e31\u01e9\u1e33\u0137\u1e35\u0199\u2c6a\ua741\ua743\ua745\ua7a3"},{base:"l",letters:"l\u24db\uff4c\u0140\u013a\u013e\u1e37\u1e39\u013c\u1e3d\u1e3b\u017f\u0142\u019a\u026b\u2c61\ua749\ua781\ua747"},{base:"lj",letters:"\u01c9"},{base:"m",letters:"m\u24dc\uff4d\u1e3f\u1e41\u1e43\u0271\u026f"},{base:"n",letters:"n\u24dd\uff4e\u01f9\u0144\xf1\u1e45\u0148\u1e47\u0146\u1e4b\u1e49\u019e\u0272\u0149\ua791\ua7a5"},{base:"nj",letters:"\u01cc"},{base:"o",letters:"o\u24de\uff4f\xf2\xf3\xf4\u1ed3\u1ed1\u1ed7\u1ed5\xf5\u1e4d\u022d\u1e4f\u014d\u1e51\u1e53\u014f\u022f\u0231\xf6\u022b\u1ecf\u0151\u01d2\u020d\u020f\u01a1\u1edd\u1edb\u1ee1\u1edf\u1ee3\u1ecd\u1ed9\u01eb\u01ed\xf8\u01ff\u0254\ua74b\ua74d\u0275"},{base:"oi",letters:"\u01a3"},{base:"ou",letters:"\u0223"},{base:"oo",letters:"\ua74f"},{base:"p",letters:"p\u24df\uff50\u1e55\u1e57\u01a5\u1d7d\ua751\ua753\ua755"},{base:"q",letters:"q\u24e0\uff51\u024b\ua757\ua759"},{base:"r",letters:"r\u24e1\uff52\u0155\u1e59\u0159\u0211\u0213\u1e5b\u1e5d\u0157\u1e5f\u024d\u027d\ua75b\ua7a7\ua783"},{base:"s",letters:"s\u24e2\uff53\xdf\u015b\u1e65\u015d\u1e61\u0161\u1e67\u1e63\u1e69\u0219\u015f\u023f\ua7a9\ua785\u1e9b"},{base:"t",letters:"t\u24e3\uff54\u1e6b\u1e97\u0165\u1e6d\u021b\u0163\u1e71\u1e6f\u0167\u01ad\u0288\u2c66\ua787"},{base:"tz",letters:"\ua729"},{base:"u",letters:"u\u24e4\uff55\xf9\xfa\xfb\u0169\u1e79\u016b\u1e7b\u016d\xfc\u01dc\u01d8\u01d6\u01da\u1ee7\u016f\u0171\u01d4\u0215\u0217\u01b0\u1eeb\u1ee9\u1eef\u1eed\u1ef1\u1ee5\u1e73\u0173\u1e77\u1e75\u0289"},{base:"v",letters:"v\u24e5\uff56\u1e7d\u1e7f\u028b\ua75f\u028c"},{base:"vy",letters:"\ua761"},{base:"w",letters:"w\u24e6\uff57\u1e81\u1e83\u0175\u1e87\u1e85\u1e98\u1e89\u2c73"},{base:"x",letters:"x\u24e7\uff58\u1e8b\u1e8d"},{base:"y",letters:"y\u24e8\uff59\u1ef3\xfd\u0177\u1ef9\u0233\u1e8f\xff\u1ef7\u1e99\u1ef5\u01b4\u024f\u1eff"},{base:"z",letters:"z\u24e9\uff5a\u017a\u1e91\u017c\u017e\u1e93\u1e95\u01b6\u0225\u0240\u2c6c\ua763"}],Lr=new RegExp("["+Oe.map((function(e){return e.letters})).join("")+"]","g"),ct={},fe=0;fe-1}},Tr=["innerRef"];function kr(e){var t=e.innerRef,n=q(e,Tr),o=ln(n,"onExited","in","enter","exit","appear");return S("input",C({ref:t},o,{css:Ze({label:"dummyInput",background:0,border:0,caretColor:"transparent",fontSize:"inherit",gridArea:"1 / 1 / 2 / 3",outline:0,padding:0,width:1,color:"transparent",left:-100,opacity:0,position:"relative",transform:"scale(.01)"},"","")}))}var Ar=function(e){e.cancelable&&e.preventDefault(),e.stopPropagation()};function Hr(e){var t=e.isEnabled,n=e.onBottomArrive,o=e.onBottomLeave,r=e.onTopArrive,i=e.onTopLeave,a=f.useRef(!1),s=f.useRef(!1),l=f.useRef(0),u=f.useRef(null),c=f.useCallback((function(e,t){if(null!==u.current){var l=u.current,c=l.scrollTop,p=l.scrollHeight,d=l.clientHeight,f=u.current,h=t>0,m=p-d-c,v=!1;m>t&&a.current&&(o&&o(e),a.current=!1),h&&s.current&&(i&&i(e),s.current=!1),h&&t>m?(n&&!a.current&&n(e),f.scrollTop=p,v=!0,a.current=!0):!h&&-t>c&&(r&&!s.current&&r(e),f.scrollTop=0,v=!0,s.current=!0),v&&Ar(e)}}),[n,o,r,i]),p=f.useCallback((function(e){c(e,e.deltaY)}),[c]),d=f.useCallback((function(e){l.current=e.changedTouches[0].clientY}),[]),h=f.useCallback((function(e){var t=l.current-e.changedTouches[0].clientY;c(e,t)}),[c]),m=f.useCallback((function(e){if(e){var t=!!on&&{passive:!1};e.addEventListener("wheel",p,t),e.addEventListener("touchstart",d,t),e.addEventListener("touchmove",h,t)}}),[h,d,p]),v=f.useCallback((function(e){e&&(e.removeEventListener("wheel",p,!1),e.removeEventListener("touchstart",d,!1),e.removeEventListener("touchmove",h,!1))}),[h,d,p]);return f.useEffect((function(){if(t){var e=u.current;return m(e),function(){v(e)}}}),[t,m,v]),function(e){u.current=e}}var _e=["boxSizing","height","overflow","paddingRight","position"],Ue={boxSizing:"border-box",overflow:"hidden",position:"relative",height:"100%"};function je(e){e.preventDefault()}function Ne(e){e.stopPropagation()}function Be(){var e=this.scrollTop,t=this.scrollHeight,n=e+this.offsetHeight;0===e?this.scrollTop=1:n===t&&(this.scrollTop=e-1)}function ze(){return"ontouchstart"in window||navigator.maxTouchPoints}var We=!!(typeof window<"u"&&window.document&&window.document.createElement),Q=0,J={capture:!1,passive:!1};function $r(e){var t=e.isEnabled,n=e.accountForScrollbars,o=void 0===n||n,r=f.useRef({}),i=f.useRef(null),a=f.useCallback((function(e){if(We){var t=document.body,n=t&&t.style;if(o&&_e.forEach((function(e){var t=n&&n[e];r.current[e]=t})),o&&Q<1){var i=parseInt(r.current.paddingRight,10)||0,a=document.body?document.body.clientWidth:0,s=window.innerWidth-a+i||0;Object.keys(Ue).forEach((function(e){var t=Ue[e];n&&(n[e]=t)})),n&&(n.paddingRight="".concat(s,"px"))}t&&ze()&&(t.addEventListener("touchmove",je,J),e&&(e.addEventListener("touchstart",Be,J),e.addEventListener("touchmove",Ne,J))),Q+=1}}),[o]),s=f.useCallback((function(e){if(We){var t=document.body,n=t&&t.style;Q=Math.max(Q-1,0),o&&Q<1&&_e.forEach((function(e){var t=r.current[e];n&&(n[e]=t)})),t&&ze()&&(t.removeEventListener("touchmove",je,J),e&&(e.removeEventListener("touchstart",Be,J),e.removeEventListener("touchmove",Ne,J)))}}),[o]);return f.useEffect((function(){if(t){var e=i.current;return a(e),function(){s(e)}}}),[t,a,s]),function(e){i.current=e}}var _r=function(e){var t=e.target;return t.ownerDocument.activeElement&&t.ownerDocument.activeElement.blur()},Ur={name:"1kfdb0e",styles:"position:fixed;left:0;bottom:0;right:0;top:0"};function jr(e){var t=e.children,n=e.lockEnabled,o=e.captureEnabled,r=Hr({isEnabled:void 0===o||o,onBottomArrive:e.onBottomArrive,onBottomLeave:e.onBottomLeave,onTopArrive:e.onTopArrive,onTopLeave:e.onTopLeave}),i=$r({isEnabled:n});return S(f.Fragment,null,n&&S("div",{onClick:_r,css:Ur}),t((function(e){r(e),i(e)})))}var Nr={name:"1a0ro4n-requiredInput",styles:"label:requiredInput;opacity:0;pointer-events:none;position:absolute;bottom:0;left:0;right:0;width:100%"},Br=function(e){var t=e.name,n=e.onFocus;return S("input",{required:!0,name:t,tabIndex:-1,"aria-hidden":"true",onFocus:n,css:Nr,value:"",onChange:function(){}})},zr=Br;function Me(e){var t;return typeof window<"u"&&null!=window.navigator&&e.test((null===(t=window.navigator.userAgentData)||void 0===t?void 0:t.platform)||window.navigator.platform)}function Wr(){return Me(/^iPhone/i)}function pt(){return Me(/^Mac/i)}function Gr(){return Me(/^iPad/i)||pt()&&navigator.maxTouchPoints>1}function qr(){return Wr()||Gr()}function Yr(){return pt()||qr()}var Kr=function(e){return e.label},Xr=function(e){return e.label},Zr=function(e){return e.value},Jr=function(e){return!!e.isDisabled},Qr={clearIndicator:An,container:Mn,control:Bn,dropdownIndicator:Tn,group:qn,groupHeading:Kn,indicatorsContainer:Dn,indicatorSeparator:$n,input:Qn,loadingIndicator:jn,loadingMessage:On,menu:fn,menuList:gn,menuPortal:In,multiValue:or,multiValueLabel:ir,multiValueRemove:ar,noOptionsMessage:Sn,option:pr,placeholder:mr,singleValue:br,valueContainer:xn},eo={primary:"#2684FF",primary75:"#4C9AFF",primary50:"#B2D4FF",primary25:"#DEEBFF",danger:"#DE350B",dangerLight:"#FFBDAD",neutral0:"hsl(0, 0%, 100%)",neutral5:"hsl(0, 0%, 95%)",neutral10:"hsl(0, 0%, 90%)",neutral20:"hsl(0, 0%, 80%)",neutral30:"hsl(0, 0%, 70%)",neutral40:"hsl(0, 0%, 60%)",neutral50:"hsl(0, 0%, 50%)",neutral60:"hsl(0, 0%, 40%)",neutral70:"hsl(0, 0%, 30%)",neutral80:"hsl(0, 0%, 20%)",neutral90:"hsl(0, 0%, 10%)"},to=4,ft=4,no=38,ro=2*ft,oo={baseUnit:ft,controlHeight:no,menuGutter:ro},he={borderRadius:to,colors:eo,spacing:oo},io={"aria-live":"polite",backspaceRemovesValue:!0,blurInputOnSelect:Te(),captureMenuScroll:!Te(),classNames:{},closeMenuOnSelect:!0,closeMenuOnScroll:!1,components:{},controlShouldRenderValue:!0,escapeClearsValue:!1,filterOption:Er(),formatGroupLabel:Kr,getOptionLabel:Xr,getOptionValue:Zr,isDisabled:!1,isLoading:!1,isMulti:!1,isRtl:!1,isSearchable:!0,isOptionDisabled:Jr,loadingMessage:function(){return"Loading..."},maxMenuHeight:300,minMenuHeight:140,menuIsOpen:!1,menuPlacement:"bottom",menuPosition:"absolute",menuShouldBlockScroll:!1,menuShouldScrollIntoView:!nn(),noOptionsMessage:function(){return"No options"},openMenuOnFocus:!1,openMenuOnClick:!0,options:[],pageSize:5,placeholder:"Select...",screenReaderStatus:function(e){var t=e.count;return"".concat(t," result").concat(1!==t?"s":""," available")},styles:{},tabIndex:0,tabSelectsValue:!0,unstyled:!1};function Ge(e,t,n,o){return{type:"option",data:t,isDisabled:ht(e,t,n),isSelected:gt(e,t,n),label:mt(e,t),value:ce(e,t),index:o}}function ae(e,t){return e.options.map((function(n,o){if("options"in n){var r=n.options.map((function(n,o){return Ge(e,n,t,o)})).filter((function(t){return Ye(e,t)}));return r.length>0?{type:"group",data:n,options:r,index:o}:void 0}var i=Ge(e,n,t,o);return Ye(e,i)?i:void 0})).filter(an)}function vt(e){return e.reduce((function(e,t){return"group"===t.type?e.push.apply(e,Ie(t.options.map((function(e){return e.data})))):e.push(t.data),e}),[])}function qe(e,t){return e.reduce((function(e,n){return"group"===n.type?e.push.apply(e,Ie(n.options.map((function(e){return{data:e.data,id:"".concat(t,"-").concat(n.index,"-").concat(e.index)}})))):e.push({data:n.data,id:"".concat(t,"-").concat(n.index)}),e}),[])}function ao(e,t){return vt(ae(e,t))}function Ye(e,t){var n=e.inputValue,o=void 0===n?"":n,r=t.data,i=t.isSelected,a=t.label,s=t.value;return(!St(e)||!i)&&bt(e,{label:a,value:s,data:r},o)}function so(e,t){var n=e.focusedValue,o=e.selectValue.indexOf(n);if(o>-1){if(t.indexOf(n)>-1)return n;if(o-1?n:t[0]}var ge=function(e,t){var n;return(null===(n=e.find((function(e){return e.data===t})))||void 0===n?void 0:n.id)||null},mt=function(e,t){return e.getOptionLabel(t)},ce=function(e,t){return e.getOptionValue(t)};function ht(e,t,n){return"function"==typeof e.isOptionDisabled&&e.isOptionDisabled(t,n)}function gt(e,t,n){if(n.indexOf(t)>-1)return!0;if("function"==typeof e.isOptionSelected)return e.isOptionSelected(t,n);var o=ce(e,t);return n.some((function(t){return ce(e,t)===o}))}function bt(e,t,n){return!e.filterOption||e.filterOption(t,n)}var St=function(e){var t=e.hideSelectedOptions,n=e.isMulti;return void 0===t?n:t},uo=1,Ot=function(){At(t,f.Component);var e=$t(t);function t(n){var o;if(_t(this,t),(o=e.call(this,n)).state={ariaSelection:null,focusedOption:null,focusedOptionId:null,focusableOptionsWithIds:[],focusedValue:null,inputIsHidden:!1,isFocused:!1,selectValue:[],clearFocusValueOnUpdate:!1,prevWasFocused:!1,inputIsHiddenAfterUpdate:void 0,prevProps:void 0,instancePrefix:""},o.blockOptionHover=!1,o.isComposing=!1,o.commonProps=void 0,o.initialTouchX=0,o.initialTouchY=0,o.openAfterFocus=!1,o.scrollToFocusedOptionOnUpdate=!1,o.userIsDragging=void 0,o.isAppleDevice=Yr(),o.controlRef=null,o.getControlRef=function(e){o.controlRef=e},o.focusedOptionRef=null,o.getFocusedOptionRef=function(e){o.focusedOptionRef=e},o.menuListRef=null,o.getMenuListRef=function(e){o.menuListRef=e},o.inputRef=null,o.getInputRef=function(e){o.inputRef=e},o.focus=o.focusInput,o.blur=o.blurInput,o.onChange=function(e,t){var n=o.props,r=n.onChange,i=n.name;t.name=i,o.ariaOnChange(e,t),r(e,t)},o.setValue=function(e,t,n){var r=o.props,i=r.closeMenuOnSelect,a=r.isMulti,s=r.inputValue;o.onInputChange("",{action:"set-value",prevInputValue:s}),i&&(o.setState({inputIsHiddenAfterUpdate:!a}),o.onMenuClose()),o.setState({clearFocusValueOnUpdate:!0}),o.onChange(e,{action:t,option:n})},o.selectOption=function(e){var t=o.props,n=t.blurInputOnSelect,r=t.isMulti,i=t.name,a=o.state.selectValue,s=r&&o.isOptionSelected(e,a),l=o.isOptionDisabled(e,a);if(s){var u=o.getOptionValue(e);o.setValue(a.filter((function(e){return o.getOptionValue(e)!==u})),"deselect-option",e)}else{if(l)return void o.ariaOnChange(e,{action:"select-option",option:e,name:i});r?o.setValue([].concat(Ie(a),[e]),"select-option",e):o.setValue(e,"select-option")}n&&o.blurInput()},o.removeValue=function(e){var t=o.props.isMulti,n=o.state.selectValue,r=o.getOptionValue(e),i=n.filter((function(e){return o.getOptionValue(e)!==r})),a=ie(t,i,i[0]||null);o.onChange(a,{action:"remove-value",removedValue:e}),o.focusInput()},o.clearValue=function(){var e=o.state.selectValue;o.onChange(ie(o.props.isMulti,[],null),{action:"clear",removedValues:e})},o.popValue=function(){var e=o.props.isMulti,t=o.state.selectValue,n=t[t.length-1],r=t.slice(0,t.length-1),i=ie(e,r,r[0]||null);n&&o.onChange(i,{action:"pop-value",removedValue:n})},o.getFocusedOptionId=function(e){return ge(o.state.focusableOptionsWithIds,e)},o.getFocusableOptionsWithIds=function(){return qe(ae(o.props,o.state.selectValue),o.getElementId("option"))},o.getValue=function(){return o.state.selectValue},o.cx=function(){for(var e=arguments.length,t=new Array(e),n=0;n5||i>5}},o.onTouchEnd=function(e){o.userIsDragging||(o.controlRef&&!o.controlRef.contains(e.target)&&o.menuListRef&&!o.menuListRef.contains(e.target)&&o.blurInput(),o.initialTouchX=0,o.initialTouchY=0)},o.onControlTouchEnd=function(e){o.userIsDragging||o.onControlMouseDown(e)},o.onClearIndicatorTouchEnd=function(e){o.userIsDragging||o.onClearIndicatorMouseDown(e)},o.onDropdownIndicatorTouchEnd=function(e){o.userIsDragging||o.onDropdownIndicatorMouseDown(e)},o.handleInputChange=function(e){var t=o.props.inputValue,n=e.currentTarget.value;o.setState({inputIsHiddenAfterUpdate:!1}),o.onInputChange(n,{action:"input-change",prevInputValue:t}),o.props.menuIsOpen||o.onMenuOpen()},o.onInputFocus=function(e){o.props.onFocus&&o.props.onFocus(e),o.setState({inputIsHiddenAfterUpdate:!1,isFocused:!0}),(o.openAfterFocus||o.props.openMenuOnFocus)&&o.openMenu("first"),o.openAfterFocus=!1},o.onInputBlur=function(e){var t=o.props.inputValue;o.menuListRef&&o.menuListRef.contains(document.activeElement)?o.inputRef.focus():(o.props.onBlur&&o.props.onBlur(e),o.onInputChange("",{action:"input-blur",prevInputValue:t}),o.onMenuClose(),o.setState({focusedValue:null,isFocused:!1}))},o.onOptionHover=function(e){if(!o.blockOptionHover&&o.state.focusedOption!==e){var t=o.getFocusableOptions().indexOf(e);o.setState({focusedOption:e,focusedOptionId:t>-1?o.getFocusedOptionId(e):null})}},o.shouldHideSelectedOptions=function(){return St(o.props)},o.onValueInputFocus=function(e){e.preventDefault(),e.stopPropagation(),o.focus()},o.onKeyDown=function(e){var t=o.props,n=t.isMulti,r=t.backspaceRemovesValue,i=t.escapeClearsValue,a=t.inputValue,s=t.isClearable,l=t.isDisabled,u=t.menuIsOpen,c=t.onKeyDown,p=t.tabSelectsValue,d=t.openMenuOnFocus,f=o.state,h=f.focusedOption,m=f.focusedValue,v=f.selectValue;if(!(l||"function"==typeof c&&(c(e),e.defaultPrevented))){switch(o.blockOptionHover=!0,e.key){case"ArrowLeft":if(!n||a)return;o.focusValue("previous");break;case"ArrowRight":if(!n||a)return;o.focusValue("next");break;case"Delete":case"Backspace":if(a)return;if(m)o.removeValue(m);else{if(!r)return;n?o.popValue():s&&o.clearValue()}break;case"Tab":if(o.isComposing||e.shiftKey||!u||!p||!h||d&&o.isOptionSelected(h,v))return;o.selectOption(h);break;case"Enter":if(229===e.keyCode)break;if(u){if(!h||o.isComposing)return;o.selectOption(h);break}return;case"Escape":u?(o.setState({inputIsHiddenAfterUpdate:!1}),o.onInputChange("",{action:"menu-close",prevInputValue:a}),o.onMenuClose()):s&&i&&o.clearValue();break;case" ":if(a)return;if(!u){o.openMenu("first");break}if(!h)return;o.selectOption(h);break;case"ArrowUp":u?o.focusOption("up"):o.openMenu("last");break;case"ArrowDown":u?o.focusOption("down"):o.openMenu("first");break;case"PageUp":if(!u)return;o.focusOption("pageup");break;case"PageDown":if(!u)return;o.focusOption("pagedown");break;case"Home":if(!u)return;o.focusOption("first");break;case"End":if(!u)return;o.focusOption("last");break;default:return}e.preventDefault()}},o.state.instancePrefix="react-select-"+(o.props.instanceId||++uo),o.state.selectValue=Fe(n.value),n.menuIsOpen&&o.state.selectValue.length){var r=o.getFocusableOptionsWithIds(),i=o.buildFocusableOptions(),a=i.indexOf(o.state.selectValue[0]);o.state.focusableOptionsWithIds=r,o.state.focusedOption=i[a],o.state.focusedOptionId=ge(r,i[a])}return o}return Vt(t,[{key:"componentDidMount",value:function(){this.startListeningComposition(),this.startListeningToTouch(),this.props.closeMenuOnScroll&&document&&document.addEventListener&&document.addEventListener("scroll",this.onScroll,!0),this.props.autoFocus&&this.focusInput(),this.props.menuIsOpen&&this.state.focusedOption&&this.menuListRef&&this.focusedOptionRef&&Ee(this.menuListRef,this.focusedOptionRef)}},{key:"componentDidUpdate",value:function(e){var t=this.props,n=t.isDisabled,o=t.menuIsOpen,r=this.state.isFocused;(r&&!n&&e.isDisabled||r&&o&&!e.menuIsOpen)&&this.focusInput(),r&&n&&!e.isDisabled?this.setState({isFocused:!1},this.onMenuClose):!r&&!n&&e.isDisabled&&this.inputRef===document.activeElement&&this.setState({isFocused:!0}),this.menuListRef&&this.focusedOptionRef&&this.scrollToFocusedOptionOnUpdate&&(Ee(this.menuListRef,this.focusedOptionRef),this.scrollToFocusedOptionOnUpdate=!1)}},{key:"componentWillUnmount",value:function(){this.stopListeningComposition(),this.stopListeningToTouch(),document.removeEventListener("scroll",this.onScroll,!0)}},{key:"onMenuOpen",value:function(){this.props.onMenuOpen()}},{key:"onMenuClose",value:function(){this.onInputChange("",{action:"menu-close",prevInputValue:this.props.inputValue}),this.props.onMenuClose()}},{key:"onInputChange",value:function(e,t){this.props.onInputChange(e,t)}},{key:"focusInput",value:function(){this.inputRef&&this.inputRef.focus()}},{key:"blurInput",value:function(){this.inputRef&&this.inputRef.blur()}},{key:"openMenu",value:function(e){var t=this,n=this.state,o=n.selectValue,r=n.isFocused,i=this.buildFocusableOptions(),a="first"===e?0:i.length-1;if(!this.props.isMulti){var s=i.indexOf(o[0]);s>-1&&(a=s)}this.scrollToFocusedOptionOnUpdate=!(r&&this.menuListRef),this.setState({inputIsHiddenAfterUpdate:!1,focusedValue:null,focusedOption:i[a],focusedOptionId:this.getFocusedOptionId(i[a])},(function(){return t.onMenuOpen()}))}},{key:"focusValue",value:function(e){var t=this.state,n=t.selectValue,o=t.focusedValue;if(this.props.isMulti){this.setState({focusedOption:null});var r=n.indexOf(o);o||(r=-1);var i=n.length-1,a=-1;if(n.length){switch(e){case"previous":a=0===r?0:-1===r?i:r-1;break;case"next":r>-1&&r0&&void 0!==arguments[0]?arguments[0]:"first",t=this.props.pageSize,n=this.state.focusedOption,o=this.getFocusableOptions();if(o.length){var r=0,i=o.indexOf(n);n||(i=-1),"up"===e?r=i>0?i-1:o.length-1:"down"===e?r=(i+1)%o.length:"pageup"===e?(r=i-t)<0&&(r=0):"pagedown"===e?(r=i+t)>o.length-1&&(r=o.length-1):"last"===e&&(r=o.length-1),this.scrollToFocusedOptionOnUpdate=!0,this.setState({focusedOption:o[r],focusedValue:null,focusedOptionId:this.getFocusedOptionId(o[r])})}}},{key:"getTheme",value:function(){return this.props.theme?"function"==typeof this.props.theme?this.props.theme(he):O(O({},he),this.props.theme):he}},{key:"getCommonProps",value:function(){var e=this.clearValue,t=this.cx,n=this.getStyles,o=this.getClassNames,r=this.getValue,i=this.selectOption,a=this.setValue,s=this.props,l=s.isMulti,u=s.isRtl,c=s.options;return{clearValue:e,cx:t,getStyles:n,getClassNames:o,getValue:r,hasValue:this.hasValue(),isMulti:l,isRtl:u,options:c,selectOption:i,selectProps:s,setValue:a,theme:this.getTheme()}}},{key:"hasValue",value:function(){return this.state.selectValue.length>0}},{key:"hasOptions",value:function(){return!!this.getFocusableOptions().length}},{key:"isClearable",value:function(){var e=this.props,t=e.isClearable,n=e.isMulti;return void 0===t?n:t}},{key:"isOptionDisabled",value:function(e,t){return ht(this.props,e,t)}},{key:"isOptionSelected",value:function(e,t){return gt(this.props,e,t)}},{key:"filterOption",value:function(e,t){return bt(this.props,e,t)}},{key:"formatOptionLabel",value:function(e,t){if("function"==typeof this.props.formatOptionLabel){var n=this.props.inputValue,o=this.state.selectValue;return this.props.formatOptionLabel(e,{context:t,inputValue:n,selectValue:o})}return this.getOptionLabel(e)}},{key:"formatGroupLabel",value:function(e){return this.props.formatGroupLabel(e)}},{key:"startListeningComposition",value:function(){document&&document.addEventListener&&(document.addEventListener("compositionstart",this.onCompositionStart,!1),document.addEventListener("compositionend",this.onCompositionEnd,!1))}},{key:"stopListeningComposition",value:function(){document&&document.removeEventListener&&(document.removeEventListener("compositionstart",this.onCompositionStart),document.removeEventListener("compositionend",this.onCompositionEnd))}},{key:"startListeningToTouch",value:function(){document&&document.addEventListener&&(document.addEventListener("touchstart",this.onTouchStart,!1),document.addEventListener("touchmove",this.onTouchMove,!1),document.addEventListener("touchend",this.onTouchEnd,!1))}},{key:"stopListeningToTouch",value:function(){document&&document.removeEventListener&&(document.removeEventListener("touchstart",this.onTouchStart),document.removeEventListener("touchmove",this.onTouchMove),document.removeEventListener("touchend",this.onTouchEnd))}},{key:"renderInput",value:function(){var e=this.props,t=e.isDisabled,n=e.isSearchable,o=e.inputId,r=e.inputValue,i=e.tabIndex,a=e.form,s=e.menuIsOpen,l=e.required,u=this.getComponents().Input,c=this.state,p=c.inputIsHidden,d=c.ariaSelection,h=this.commonProps,m=o||this.getElementId("input"),v=O(O(O({"aria-autocomplete":"list","aria-expanded":s,"aria-haspopup":!0,"aria-errormessage":this.props["aria-errormessage"],"aria-invalid":this.props["aria-invalid"],"aria-label":this.props["aria-label"],"aria-labelledby":this.props["aria-labelledby"],"aria-required":l,role:"combobox","aria-activedescendant":this.isAppleDevice?void 0:this.state.focusedOptionId||""},s&&{"aria-controls":this.getElementId("listbox")}),!n&&{"aria-readonly":!0}),this.hasValue()?"initial-input-focus"===(null==d?void 0:d.action)&&{"aria-describedby":this.getElementId("live-region")}:{"aria-describedby":this.getElementId("placeholder")});return n?f.createElement(u,C({},h,{autoCapitalize:"none",autoComplete:"off",autoCorrect:"off",id:m,innerRef:this.getInputRef,isDisabled:t,isHidden:p,onBlur:this.onInputBlur,onChange:this.handleInputChange,onFocus:this.onInputFocus,spellCheck:"false",tabIndex:i,form:a,type:"text",value:r},v)):f.createElement(kr,C({id:m,innerRef:this.getInputRef,onBlur:this.onInputBlur,onChange:se,onFocus:this.onInputFocus,disabled:t,tabIndex:i,inputMode:"none",form:a,value:""},v))}},{key:"renderPlaceholderOrValue",value:function(){var e=this,t=this.getComponents(),n=t.MultiValue,o=t.MultiValueContainer,r=t.MultiValueLabel,i=t.MultiValueRemove,a=t.SingleValue,s=t.Placeholder,l=this.commonProps,u=this.props,c=u.controlShouldRenderValue,p=u.isDisabled,d=u.isMulti,h=u.inputValue,m=u.placeholder,v=this.state,g=v.selectValue,b=v.focusedValue,O=v.isFocused;if(!this.hasValue()||!c)return h?null:f.createElement(s,C({},l,{key:"placeholder",isDisabled:p,isFocused:O,innerProps:{id:this.getElementId("placeholder")}}),m);if(d)return g.map((function(t,a){var s=t===b,u="".concat(e.getOptionLabel(t),"-").concat(e.getOptionValue(t));return f.createElement(n,C({},l,{components:{Container:o,Label:r,Remove:i},isFocused:s,isDisabled:p,key:u,index:a,removeProps:{onClick:function(){return e.removeValue(t)},onTouchEnd:function(){return e.removeValue(t)},onMouseDown:function(e){e.preventDefault()}},data:t}),e.formatOptionLabel(t,"value"))}));if(h)return null;var y=g[0];return f.createElement(a,C({},l,{data:y,isDisabled:p}),this.formatOptionLabel(y,"value"))}},{key:"renderClearIndicator",value:function(){var e=this.getComponents().ClearIndicator,t=this.commonProps,n=this.props,o=n.isDisabled,r=n.isLoading,i=this.state.isFocused;if(!this.isClearable()||!e||o||!this.hasValue()||r)return null;var a={onMouseDown:this.onClearIndicatorMouseDown,onTouchEnd:this.onClearIndicatorTouchEnd,"aria-hidden":"true"};return f.createElement(e,C({},t,{innerProps:a,isFocused:i}))}},{key:"renderLoadingIndicator",value:function(){var e=this.getComponents().LoadingIndicator,t=this.commonProps,n=this.props,o=n.isDisabled,r=n.isLoading,i=this.state.isFocused;if(!e||!r)return null;return f.createElement(e,C({},t,{innerProps:{"aria-hidden":"true"},isDisabled:o,isFocused:i}))}},{key:"renderIndicatorSeparator",value:function(){var e=this.getComponents(),t=e.DropdownIndicator,n=e.IndicatorSeparator;if(!t||!n)return null;var o=this.commonProps,r=this.props.isDisabled,i=this.state.isFocused;return f.createElement(n,C({},o,{isDisabled:r,isFocused:i}))}},{key:"renderDropdownIndicator",value:function(){var e=this.getComponents().DropdownIndicator;if(!e)return null;var t=this.commonProps,n=this.props.isDisabled,o=this.state.isFocused,r={onMouseDown:this.onDropdownIndicatorMouseDown,onTouchEnd:this.onDropdownIndicatorTouchEnd,"aria-hidden":"true"};return f.createElement(e,C({},t,{innerProps:r,isDisabled:n,isFocused:o}))}},{key:"renderMenu",value:function(){var e=this,t=this.getComponents(),n=t.Group,o=t.GroupHeading,r=t.Menu,i=t.MenuList,a=t.MenuPortal,s=t.LoadingMessage,l=t.NoOptionsMessage,u=t.Option,c=this.commonProps,p=this.state.focusedOption,d=this.props,h=d.captureMenuScroll,m=d.inputValue,v=d.isLoading,g=d.loadingMessage,b=d.minMenuHeight,O=d.maxMenuHeight,y=d.menuIsOpen,S=d.menuPlacement,I=d.menuPosition,w=d.menuPortalTarget,V=d.menuShouldBlockScroll,x=d.menuShouldScrollIntoView,M=d.noOptionsMessage,E=d.onMenuScrollToTop,L=d.onMenuScrollToBottom;if(!y)return null;var D,P=function(t,n){var o=t.type,r=t.data,i=t.isDisabled,a=t.isSelected,s=t.label,l=t.value,d=p===r,h=i?void 0:function(){return e.onOptionHover(r)},m=i?void 0:function(){return e.selectOption(r)},v="".concat(e.getElementId("option"),"-").concat(n),g={id:v,onClick:m,onMouseMove:h,onMouseOver:h,tabIndex:-1,role:"option","aria-selected":e.isAppleDevice?void 0:a};return f.createElement(u,C({},c,{innerProps:g,data:r,isDisabled:i,isSelected:a,key:v,label:s,type:o,value:l,isFocused:d,innerRef:d?e.getFocusedOptionRef:void 0}),e.formatOptionLabel(t.data,"menu"))};if(this.hasOptions())D=this.getCategorizedOptions().map((function(t){if("group"===t.type){var r=t.data,i=t.options,a=t.index,s="".concat(e.getElementId("group"),"-").concat(a),l="".concat(s,"-heading");return f.createElement(n,C({},c,{key:s,data:r,options:i,Heading:o,headingProps:{id:l,data:t.data},label:e.formatGroupLabel(t.data)}),t.options.map((function(e){return P(e,"".concat(a,"-").concat(e.index))})))}if("option"===t.type)return P(t,"".concat(t.index))}));else if(v){var k=g({inputValue:m});if(null===k)return null;D=f.createElement(s,c,k)}else{var R=M({inputValue:m});if(null===R)return null;D=f.createElement(l,c,R)}var F={minMenuHeight:b,maxMenuHeight:O,menuPlacement:S,menuPosition:I,menuShouldScrollIntoView:x},T=f.createElement(vn,C({},c,F),(function(t){var n=t.ref,o=t.placerProps,a=o.placement,s=o.maxHeight;return f.createElement(r,C({},c,F,{innerRef:n,innerProps:{onMouseDown:e.onMenuMouseDown,onMouseMove:e.onMenuMouseMove},isLoading:v,placement:a}),f.createElement(jr,{captureEnabled:h,onTopArrive:E,onBottomArrive:L,lockEnabled:V},(function(t){return f.createElement(i,C({},c,{innerRef:function(n){e.getMenuListRef(n),t(n)},innerProps:{role:"listbox","aria-multiselectable":c.isMulti,id:e.getElementId("listbox")},isLoading:v,maxHeight:s,focusedOption:p}),D)})))}));return w||"fixed"===I?f.createElement(a,C({},c,{appendTo:w,controlElement:this.controlRef,menuPlacement:S,menuPosition:I}),T):T}},{key:"renderFormField",value:function(){var e=this,t=this.props,n=t.delimiter,o=t.isDisabled,r=t.isMulti,i=t.name,a=t.required,s=this.state.selectValue;if(a&&!this.hasValue()&&!o)return f.createElement(zr,{name:i,onFocus:this.onValueInputFocus});if(i&&!o){if(r){if(n){var l=s.map((function(t){return e.getOptionValue(t)})).join(n);return f.createElement("input",{name:i,type:"hidden",value:l})}var u=s.length>0?s.map((function(t,n){return f.createElement("input",{key:"i-".concat(n),name:i,type:"hidden",value:e.getOptionValue(t)})})):f.createElement("input",{name:i,type:"hidden",value:""});return f.createElement("div",null,u)}var c=s[0]?this.getOptionValue(s[0]):"";return f.createElement("input",{name:i,type:"hidden",value:c})}}},{key:"renderLiveRegion",value:function(){var e=this.commonProps,t=this.state,n=t.ariaSelection,o=t.focusedOption,r=t.focusedValue,i=t.isFocused,a=t.selectValue,s=this.getFocusableOptions();return f.createElement(Dr,C({},e,{id:this.getElementId("live-region"),ariaSelection:n,focusedOption:o,focusedValue:r,isFocused:i,selectValue:a,focusableOptions:s,isAppleDevice:this.isAppleDevice}))}},{key:"render",value:function(){var e=this.getComponents(),t=e.Control,n=e.IndicatorsContainer,o=e.SelectContainer,r=e.ValueContainer,i=this.props,a=i.className,s=i.id,l=i.isDisabled,u=i.menuIsOpen,c=this.state.isFocused,p=this.commonProps=this.getCommonProps();return f.createElement(o,C({},p,{className:a,innerProps:{id:s,onKeyDown:this.onKeyDown},isDisabled:l,isFocused:c}),this.renderLiveRegion(),f.createElement(t,C({},p,{innerRef:this.getControlRef,innerProps:{onMouseDown:this.onControlMouseDown,onTouchEnd:this.onControlTouchEnd},isDisabled:l,isFocused:c,menuIsOpen:u}),f.createElement(r,C({},p,{isDisabled:l}),this.renderPlaceholderOrValue(),this.renderInput()),f.createElement(n,C({},p,{isDisabled:l}),this.renderClearIndicator(),this.renderLoadingIndicator(),this.renderIndicatorSeparator(),this.renderDropdownIndicator())),this.renderMenu(),this.renderFormField())}}],[{key:"getDerivedStateFromProps",value:function(e,t){var n=t.prevProps,o=t.clearFocusValueOnUpdate,r=t.inputIsHiddenAfterUpdate,i=t.ariaSelection,a=t.isFocused,s=t.prevWasFocused,l=t.instancePrefix,u=e.options,c=e.value,p=e.menuIsOpen,d=e.inputValue,f=e.isMulti,h=Fe(c),m={};if(n&&(c!==n.value||u!==n.options||p!==n.menuIsOpen||d!==n.inputValue)){var v=p?ao(e,h):[],g=p?qe(ae(e,h),"".concat(l,"-option")):[],b=o?so(t,h):null,y=lo(t,v);m={selectValue:h,focusedOption:y,focusedOptionId:ge(g,y),focusableOptionsWithIds:g,focusedValue:b,clearFocusValueOnUpdate:!1}}var C=null!=r&&e!==n?{inputIsHidden:r,inputIsHiddenAfterUpdate:void 0}:{},S=i,I=a&&s;return a&&!I&&(S={value:ie(f,h,h[0]||null),options:h,action:"initial-input-focus"},I=!s),"initial-input-focus"===(null==i?void 0:i.action)&&(S=null),O(O(O({},m),C),{},{prevProps:e,ariaSelection:S,prevWasFocused:I})}}]),t}();Ot.defaultProps=io;var co=f.forwardRef((function(e,t){var n=zt(e);return f.createElement(Ot,C({ref:t},n))})),po=co;const Ce=e=>j.jsx(ue.DropdownIndicator,{...e,children:j.jsx(Et,{loading:"lazy",src:Ft,style:{width:12}})});try{Ce.displayName="DropdownIndicator",Ce.__docgenInfo={description:"",displayName:"DropdownIndicator",props:{}}}catch{}const ye=e=>{const t=e.data;return t.imageElement?j.jsx(ue.Option,{...e,children:j.jsx(j.Fragment,{children:j.jsx(Le,{sx:{alignItems:"center",justifyContent:"space-between"},mt:"5px",children:j.jsxs(Le,{sx:{alignItems:"center"},children:[t.imageElement,j.jsxs(Tt,{sx:{fontSize:2},ml:"10px",children:[t.label,t.number&&` (${t.number})`]})]})},t.label)})}):j.jsx(ue.Option,{...e,children:e.label})};try{ye.displayName="Option",ye.__docgenInfo={description:"",displayName:"Option",props:{}}}catch{}const Ke=e=>{const{theme:t}=kt(),n={container:e=>({...e,fontSize:t.fontSizes[2]+"px",fontFamily:'"Varela Round", Arial, sans-serif'}),control:e=>({...e,border:"1px solid "+t.colors.softblue,backgroundColor:t.colors.background,minHeight:"40px",cursor:"pointer",boxShadow:"none",":focus":{border:"1px solid "+t.colors.blue,outline:"none"},":hover":{border:"1px solid "+t.colors.blue}}),option:(e,{data:n,isFocused:o,isDisabled:r})=>({...e,backgroundColor:o?t.colors.white:t.colors.background,boxShadow:"none",cursor:"pointer",color:r?t.colors.lightgrey:n.color||t.colors.black}),menu:e=>({...e,border:"1px solid "+t.colors.softblue,boxShadow:"none",backgroundColor:t.colors.background,":hover":{border:"1px solid "+t.colors.softblue}}),multiValue:(e,{data:n})=>({...e,borderRadius:n.color?99:4,backgroundColor:n.color?`${n.color}20`:t.colors.white,padding:"2px",border:"1px solid ",borderColor:n.color||t.colors.softgrey,color:n.color||t.colors.grey}),multiValueLabel:(e,{data:n})=>({...e,color:n.color||t.colors.grey}),multiValueRemove:(e,{data:n})=>({...e,borderRadius:n.color?99:4,color:n.color||t.colors.grey,":hover":{backgroundColor:n.color||t.colors.grey,color:"white"}}),indicatorSeparator:e=>({...e,display:"none"}),dropdownIndicator:(e,t)=>({...e,":hover":{opacity:t.isFocused?1:.5},opacity:t.isFocused?1:.3})},o={...n,control:e=>({...e,border:"1px solid "+t.colors.red,":focus":{border:"1px solid "+t.colors.red},":hover":{border:"1px solid "+t.colors.red}}),menu:e=>({...e,border:"1px solid "+t.colors.red,":hover":{border:"1px solid "+t.colors.red}})},r={container:e=>({...e,fontSize:t.fontSizes[2]+"px",fontFamily:'"Varela Round", Arial, sans-serif',border:"2px solid "+t.colors.black,borderRadius:"5px",color:t.colors.black}),control:e=>({...e,backgroundColor:t.colors.white,minHeight:"40px",cursor:"pointer",boxShadow:"none",":hover":{border:"1px solid "+t.colors.blue},":focus":{border:"1px solid "+t.colors.blue}}),placeholder:e=>({...e,color:t.colors.black}),option:(e,n)=>({...e,color:t.colors.black,backgroundColor:n.isFocused?t.colors.softblue:t.colors.white,cursor:"pointer",boxShadow:"none"}),menu:e=>({...e,border:"2px solid "+t.colors.black,boxShadow:"none",backgroundColor:t.colors.white,":hover":{border:"2px solid "+t.colors.black}}),multiValue:e=>({...e,backgroundColor:t.colors.softblue,padding:"2px",border:"1px solid "+t.colors.black,color:t.colors.grey}),indicatorSeparator:e=>({...e,display:"none"}),valueContainer:e=>({...e,flexWrap:"nowrap",overflow:"auto"})},i=e.options||[],a={default:r,form:n,formError:o,icons:r,tabs:r};return j.jsx(po,{classNamePrefix:"data-cy",components:{DropdownIndicator:Ce,Option:ye},defaultValue:e.defaultValue,getOptionLabel:e.getOptionLabel&&e.getOptionLabel,getOptionValue:e.getOptionValue&&e.getOptionValue,isClearable:!!e.isClearable,isMulti:!!e.isMulti,placeholder:e.placeholder,styles:a[e.variant||"default"],options:i,onChange:t=>e.onChange&&e.onChange(t),value:e.value,onInputChange:e.onInputChange,isOptionDisabled:e.isOptionDisabled})};try{Ke.displayName="Select",Ke.__docgenInfo={description:"",displayName:"Select",props:{options:{defaultValue:null,description:"Array of options that populate the select menu",name:"options",required:!0,type:{name:"OptionsOrGroups"}},value:{defaultValue:null,description:"The value of the select; reflected by the selected option",name:"value",required:!1,type:{name:"any"}},onChange:{defaultValue:null,description:"Handle change events on the select",name:"onChange",required:!1,type:{name:"((arg: any) => void)"}},placeholder:{defaultValue:null,description:"Placeholder for the select value",name:"placeholder",required:!1,type:{name:"string"}},isMulti:{defaultValue:null,description:"Support multiple selected options",name:"isMulti",required:!1,type:{name:"boolean"}},isClearable:{defaultValue:null,description:"Is the select value clearable",name:"isClearable",required:!1,type:{name:"boolean"}},getOptionLabel:{defaultValue:null,description:"Resolves option data to a string to be displayed as the label by components\n\nNote: Failure to resolve to a string type can interfere with filtering and\nscreen reader support.",name:"getOptionLabel",required:!1,type:{name:"any"}},getOptionValue:{defaultValue:null,description:"Resolves option data to a string to compare options and specify value attributes",name:"getOptionValue",required:!1,type:{name:"any"}},defaultValue:{defaultValue:null,description:"",name:"defaultValue",required:!1,type:{name:"IOption"}},variant:{defaultValue:null,description:"",name:"variant",required:!1,type:{name:"enum",value:[{value:'"form"'},{value:'"formError"'},{value:'"icons"'},{value:'"tabs"'}]}}}}}catch{}export{Ke as S}; \ No newline at end of file +import{j}from"./jsx-runtime-CexXSJP5.js";import{_ as ee,a as Vt}from"./defineProperty-Dr9G4DxF.js";import{_ as Mt}from"./objectWithoutPropertiesLoose-CAYKN5F1.js";import{r as f}from"./index-BP8_t0zE.js";import{_ as C}from"./extends-CF3RwP-h.js";import{_ as Pt,a as xt}from"./setPrototypeOf-NYsvoNVB.js";import{_ as wt,a as De}from"./isNativeReflectConstruct-gwnEYaHE.js";import{_ as Xe}from"./typeof-QjJsDpFa.js";import{k as Dt,j as S,c as Ze}from"./emotion-react.browser.esm-BYoRxRk_.js";import{r as Lt}from"./index-BBRV8eG_.js";import{a as Rt}from"./floating-ui.dom-DtcZXcvp.js";import{I as Ft}from"./icon-arrow-down-CJeToCJe.js";import{I as Et,F as Le,T as Tt}from"./theme-ui-components.esm-BngKL4Rx.js";import{u as kt}from"./theme-ui-core.browser.esm-CIov4Ln1.js";function be(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=Array(t);n2?n-2:0),r=2;r-1}function Jt(e){return de(e)?window.innerHeight:e.clientHeight}function et(e){return de(e)?window.pageYOffset:e.scrollTop}function le(e,t){de(e)?window.scrollTo(0,t):e.scrollTop=t}function Qt(e){var t=getComputedStyle(e),n="absolute"===t.position,o=/(auto|scroll)/;if("fixed"===t.position)return document.documentElement;for(var r=e;r=r.parentElement;)if(t=getComputedStyle(r),(!n||"static"!==t.position)&&o.test(t.overflow+t.overflowY+t.overflowX))return r;return document.documentElement}function en(e,t,n,o){return n*((e=e/o-1)*e*e+1)+t}function re(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:200,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:se,r=et(e),i=t-r,a=0;!function t(){var s=en(a+=10,r,i,n);le(e,s),an.bottom?le(e,Math.min(t.offsetTop+t.clientHeight-e.offsetHeight+r,e.scrollHeight)):o.top-r1?t-1:0),o=1;o=f)return{placement:"bottom",maxHeight:t};if(I>=f&&!a)return i&&re(l,w,x),{placement:"bottom",maxHeight:t};if(!a&&I>=o||a&&C>=o)return i&&re(l,w,x),{placement:"bottom",maxHeight:a?C-b:I-b};if("auto"===r||a){var M=t,E=a?y:S;return E>=o&&(M=Math.min(E-b-s,t)),{placement:"top",maxHeight:M}}if("bottom"===r)return i&&le(l,w),{placement:"bottom",maxHeight:t};break;case"top":if(y>=f)return{placement:"top",maxHeight:t};if(S>=f&&!a)return i&&re(l,V,x),{placement:"top",maxHeight:t};if(!a&&S>=o||a&&y>=o){var L=t;return(!a&&S>=o||a&&y>=o)&&(L=a?y-O:S-O),i&&re(l,V,x),{placement:"top",maxHeight:L}}return{placement:"bottom",maxHeight:t};default:throw new Error('Invalid placement provided "'.concat(r,'".'))}return u}function pn(e){return e?{bottom:"top",top:"bottom"}[e]:"bottom"}var ke,nt=function(e){return"auto"===e?"bottom":e},fn=function(e,t){var n,o=e.placement,r=e.theme,i=r.borderRadius,a=r.spacing,s=r.colors;return O((ee(n={label:"menu"},pn(o),"100%"),ee(n,"position","absolute"),ee(n,"width","100%"),ee(n,"zIndex",1),n),t?{}:{backgroundColor:s.neutral0,borderRadius:i,boxShadow:"0 0 0 1px hsla(0, 0%, 0%, 0.1), 0 4px 11px hsla(0, 0%, 0%, 0.1)",marginBottom:a.menuGutter,marginTop:a.menuGutter})},rt=f.createContext(null),vn=function(e){var t=e.children,n=e.minMenuHeight,o=e.maxMenuHeight,r=e.menuPlacement,i=e.menuPosition,a=e.menuShouldScrollIntoView,s=e.theme,l=(f.useContext(rt)||{}).setPortalPlacement,u=f.useRef(null),c=G(f.useState(o),2),p=c[0],d=c[1],h=G(f.useState(null),2),m=h[0],v=h[1],g=s.spacing.controlHeight;return Se((function(){var e=u.current;if(e){var t="fixed"===i,s=dn({maxHeight:o,menuEl:e,minHeight:n,placement:r,shouldScroll:a&&!t,isFixedPosition:t,controlHeight:g});d(s.maxHeight),v(s.placement),null==l||l(s.placement)}}),[o,r,i,a,n,l,g]),t({ref:u,placerProps:O(O({},e),{},{placement:m||nt(r),maxHeight:p})})},mn=function(e){var t=e.children,n=e.innerRef,o=e.innerProps;return S("div",C({},L(e,"menu",{menu:!0}),{ref:n},o),t)},hn=mn,gn=function(e,t){var n=e.maxHeight,o=e.theme.spacing.baseUnit;return O({maxHeight:n,overflowY:"auto",position:"relative",WebkitOverflowScrolling:"touch"},t?{}:{paddingBottom:o,paddingTop:o})},bn=function(e){var t=e.children,n=e.innerProps,o=e.innerRef,r=e.isMulti;return S("div",C({},L(e,"menuList",{"menu-list":!0,"menu-list--is-multi":r}),{ref:o},n),t)},ot=function(e,t){var n=e.theme,o=n.spacing.baseUnit,r=n.colors;return O({textAlign:"center"},t?{}:{color:r.neutral40,padding:"".concat(2*o,"px ").concat(3*o,"px")})},Sn=ot,On=ot,Cn=function(e){var t=e.children,n=void 0===t?"No options":t,o=e.innerProps,r=q(e,un);return S("div",C({},L(O(O({},r),{},{children:n,innerProps:o}),"noOptionsMessage",{"menu-notice":!0,"menu-notice--no-options":!0}),o),n)},yn=function(e){var t=e.children,n=void 0===t?"Loading...":t,o=e.innerProps,r=q(e,cn);return S("div",C({},L(O(O({},r),{},{children:n,innerProps:o}),"loadingMessage",{"menu-notice":!0,"menu-notice--loading":!0}),o),n)},In=function(e){var t=e.rect,n=e.offset,o=e.position;return{left:t.left,position:o,top:n,width:t.width,zIndex:1}},Vn=function(e){var t=e.appendTo,n=e.children,o=e.controlElement,r=e.innerProps,i=e.menuPlacement,a=e.menuPosition,s=f.useRef(null),l=f.useRef(null),u=G(f.useState(nt(i)),2),c=u[0],p=u[1],d=f.useMemo((function(){return{setPortalPlacement:p}}),[]),h=G(f.useState(null),2),m=h[0],v=h[1],g=f.useCallback((function(){if(o){var e=tn(o),t="fixed"===a?0:window.pageYOffset,n=e[c]+t;(n!==(null==m?void 0:m.offset)||e.left!==(null==m?void 0:m.rect.left)||e.width!==(null==m?void 0:m.rect.width))&&v({offset:n,rect:e})}}),[o,a,c,null==m?void 0:m.offset,null==m?void 0:m.rect.left,null==m?void 0:m.rect.width]);Se((function(){g()}),[g]);var b=f.useCallback((function(){"function"==typeof l.current&&(l.current(),l.current=null),o&&s.current&&(l.current=Rt(o,s.current,g,{elementResize:"ResizeObserver"in window}))}),[o,g]);Se((function(){b()}),[b]);var y=f.useCallback((function(e){s.current=e,b()}),[b]);if(!t&&"fixed"!==a||!m)return null;var I=S("div",C({ref:y},L(O(O({},e),{},{offset:m.offset,position:a,rect:m.rect}),"menuPortal",{"menu-portal":!0}),r),n);return S(rt.Provider,{value:d},t?Lt.createPortal(I,t):I)},Mn=function(e){var t=e.isDisabled;return{label:"container",direction:e.isRtl?"rtl":void 0,pointerEvents:t?"none":void 0,position:"relative"}},Pn=function(e){var t=e.children,n=e.innerProps,o=e.isDisabled,r=e.isRtl;return S("div",C({},L(e,"container",{"--is-disabled":o,"--is-rtl":r}),n),t)},xn=function(e,t){var n=e.theme.spacing,o=e.isMulti,r=e.hasValue,i=e.selectProps.controlShouldRenderValue;return O({alignItems:"center",display:o&&r&&i?"flex":"grid",flex:1,flexWrap:"wrap",WebkitOverflowScrolling:"touch",position:"relative",overflow:"hidden"},t?{}:{padding:"".concat(n.baseUnit/2,"px ").concat(2*n.baseUnit,"px")})},wn=function(e){var t=e.children,n=e.innerProps,o=e.isMulti,r=e.hasValue;return S("div",C({},L(e,"valueContainer",{"value-container":!0,"value-container--is-multi":o,"value-container--has-value":r}),n),t)},Dn=function(){return{alignItems:"center",alignSelf:"stretch",display:"flex",flexShrink:0}},Ln=function(e){var t=e.children,n=e.innerProps;return S("div",C({},L(e,"indicatorsContainer",{indicators:!0}),n),t)},Rn=["size"],Fn=["innerProps","isRtl","size"],En={name:"8mmkcg",styles:"display:inline-block;fill:currentColor;line-height:1;stroke:currentColor;stroke-width:0"},it=function(e){var t=e.size,n=q(e,Rn);return S("svg",C({height:t,width:t,viewBox:"0 0 20 20","aria-hidden":"true",focusable:"false",css:En},n))},Ve=function(e){return S(it,C({size:20},e),S("path",{d:"M14.348 14.849c-0.469 0.469-1.229 0.469-1.697 0l-2.651-3.030-2.651 3.029c-0.469 0.469-1.229 0.469-1.697 0-0.469-0.469-0.469-1.229 0-1.697l2.758-3.15-2.759-3.152c-0.469-0.469-0.469-1.228 0-1.697s1.228-0.469 1.697 0l2.652 3.031 2.651-3.031c0.469-0.469 1.228-0.469 1.697 0s0.469 1.229 0 1.697l-2.758 3.152 2.758 3.15c0.469 0.469 0.469 1.229 0 1.698z"}))},at=function(e){return S(it,C({size:20},e),S("path",{d:"M4.516 7.548c0.436-0.446 1.043-0.481 1.576 0l3.908 3.747 3.908-3.747c0.533-0.481 1.141-0.446 1.574 0 0.436 0.445 0.408 1.197 0 1.615-0.406 0.418-4.695 4.502-4.695 4.502-0.217 0.223-0.502 0.335-0.787 0.335s-0.57-0.112-0.789-0.335c0 0-4.287-4.084-4.695-4.502s-0.436-1.17 0-1.615z"}))},st=function(e,t){var n=e.isFocused,o=e.theme,r=o.spacing.baseUnit,i=o.colors;return O({label:"indicatorContainer",display:"flex",transition:"color 150ms"},t?{}:{color:n?i.neutral60:i.neutral20,padding:2*r,":hover":{color:n?i.neutral80:i.neutral40}})},Tn=st,kn=function(e){var t=e.children,n=e.innerProps;return S("div",C({},L(e,"dropdownIndicator",{indicator:!0,"dropdown-indicator":!0}),n),t||S(at,null))},An=st,Hn=function(e){var t=e.children,n=e.innerProps;return S("div",C({},L(e,"clearIndicator",{indicator:!0,"clear-indicator":!0}),n),t||S(Ve,null))},$n=function(e,t){var n=e.isDisabled,o=e.theme,r=o.spacing.baseUnit,i=o.colors;return O({label:"indicatorSeparator",alignSelf:"stretch",width:1},t?{}:{backgroundColor:n?i.neutral10:i.neutral20,marginBottom:2*r,marginTop:2*r})},_n=function(e){var t=e.innerProps;return S("span",C({},t,L(e,"indicatorSeparator",{"indicator-separator":!0})))},Un=Dt(ke||(ke=Yt(["\n 0%, 80%, 100% { opacity: 0; }\n 40% { opacity: 1; }\n"]))),jn=function(e,t){var n=e.isFocused,o=e.size,r=e.theme,i=r.colors,a=r.spacing.baseUnit;return O({label:"loadingIndicator",display:"flex",transition:"color 150ms",alignSelf:"center",fontSize:o,lineHeight:1,marginRight:o,textAlign:"center",verticalAlign:"middle"},t?{}:{color:n?i.neutral60:i.neutral20,padding:2*a})},pe=function(e){var t=e.delay,n=e.offset;return S("span",{css:Ze({animation:"".concat(Un," 1s ease-in-out ").concat(t,"ms infinite;"),backgroundColor:"currentColor",borderRadius:"1em",display:"inline-block",marginLeft:n?"1em":void 0,height:"1em",verticalAlign:"top",width:"1em"},"","")})},Nn=function(e){var t=e.innerProps,n=e.isRtl,o=e.size,r=void 0===o?4:o,i=q(e,Fn);return S("div",C({},L(O(O({},i),{},{innerProps:t,isRtl:n,size:r}),"loadingIndicator",{indicator:!0,"loading-indicator":!0}),t),S(pe,{delay:0,offset:n}),S(pe,{delay:160,offset:!0}),S(pe,{delay:320,offset:!n}))},Bn=function(e,t){var n=e.isDisabled,o=e.isFocused,r=e.theme,i=r.colors,a=r.borderRadius;return O({label:"control",alignItems:"center",cursor:"default",display:"flex",flexWrap:"wrap",justifyContent:"space-between",minHeight:r.spacing.controlHeight,outline:"0 !important",position:"relative",transition:"all 100ms"},t?{}:{backgroundColor:n?i.neutral5:i.neutral0,borderColor:n?i.neutral10:o?i.primary:i.neutral20,borderRadius:a,borderStyle:"solid",borderWidth:1,boxShadow:o?"0 0 0 1px ".concat(i.primary):void 0,"&:hover":{borderColor:o?i.primary:i.neutral30}})},zn=function(e){var t=e.children,n=e.isDisabled,o=e.isFocused,r=e.innerRef,i=e.innerProps,a=e.menuIsOpen;return S("div",C({ref:r},L(e,"control",{control:!0,"control--is-disabled":n,"control--is-focused":o,"control--menu-is-open":a}),i,{"aria-disabled":n||void 0}),t)},Wn=zn,Gn=["data"],qn=function(e,t){var n=e.theme.spacing;return t?{}:{paddingBottom:2*n.baseUnit,paddingTop:2*n.baseUnit}},Yn=function(e){var t=e.children,n=e.cx,o=e.getStyles,r=e.getClassNames,i=e.Heading,a=e.headingProps,s=e.innerProps,l=e.label,u=e.theme,c=e.selectProps;return S("div",C({},L(e,"group",{group:!0}),s),S(i,C({},a,{selectProps:c,theme:u,getStyles:o,getClassNames:r,cx:n}),l),S("div",null,t))},Kn=function(e,t){var n=e.theme,o=n.colors,r=n.spacing;return O({label:"group",cursor:"default",display:"block"},t?{}:{color:o.neutral40,fontSize:"75%",fontWeight:500,marginBottom:"0.25em",paddingLeft:3*r.baseUnit,paddingRight:3*r.baseUnit,textTransform:"uppercase"})},Xn=function(e){var t=Qe(e);t.data;var n=q(t,Gn);return S("div",C({},L(e,"groupHeading",{"group-heading":!0}),n))},Zn=Yn,Jn=["innerRef","isDisabled","isHidden","inputClassName"],Qn=function(e,t){var n=e.isDisabled,o=e.value,r=e.theme,i=r.spacing,a=r.colors;return O(O({visibility:n?"hidden":"visible",transform:o?"translateZ(0)":""},er),t?{}:{margin:i.baseUnit/2,paddingBottom:i.baseUnit/2,paddingTop:i.baseUnit/2,color:a.neutral80})},lt={gridArea:"1 / 2",font:"inherit",minWidth:"2px",border:0,margin:0,outline:0,padding:0},er={flex:"1 1 auto",display:"inline-grid",gridArea:"1 / 1 / 2 / 3",gridTemplateColumns:"0 min-content","&:after":O({content:'attr(data-value) " "',visibility:"hidden",whiteSpace:"pre"},lt)},tr=function(e){return O({label:"input",color:"inherit",background:0,opacity:e?0:1,width:"100%"},lt)},nr=function(e){var t=e.cx,n=e.value,o=Qe(e),r=o.innerRef,i=o.isDisabled,a=o.isHidden,s=o.inputClassName,l=q(o,Jn);return S("div",C({},L(e,"input",{"input-container":!0}),{"data-value":n||""}),S("input",C({className:t({input:!0},s),ref:r,style:tr(a),disabled:i},l)))},rr=nr,or=function(e,t){var n=e.theme,o=n.spacing,r=n.borderRadius,i=n.colors;return O({label:"multiValue",display:"flex",minWidth:0},t?{}:{backgroundColor:i.neutral10,borderRadius:r/2,margin:o.baseUnit/2})},ir=function(e,t){var n=e.theme,o=n.borderRadius,r=n.colors,i=e.cropWithEllipsis;return O({overflow:"hidden",textOverflow:i||void 0===i?"ellipsis":void 0,whiteSpace:"nowrap"},t?{}:{borderRadius:o/2,color:r.neutral80,fontSize:"85%",padding:3,paddingLeft:6})},ar=function(e,t){var n=e.theme,o=n.spacing,r=n.borderRadius,i=n.colors,a=e.isFocused;return O({alignItems:"center",display:"flex"},t?{}:{borderRadius:r/2,backgroundColor:a?i.dangerLight:void 0,paddingLeft:o.baseUnit,paddingRight:o.baseUnit,":hover":{backgroundColor:i.dangerLight,color:i.danger}})},ut=function(e){var t=e.children,n=e.innerProps;return S("div",n,t)},sr=ut,lr=ut;function ur(e){var t=e.children,n=e.innerProps;return S("div",C({role:"button"},n),t||S(Ve,{size:14}))}var cr=function(e){var t=e.children,n=e.components,o=e.data,r=e.innerProps,i=e.isDisabled,a=e.removeProps,s=e.selectProps,l=n.Container,u=n.Label,c=n.Remove;return S(l,{data:o,innerProps:O(O({},L(e,"multiValue",{"multi-value":!0,"multi-value--is-disabled":i})),r),selectProps:s},S(u,{data:o,innerProps:O({},L(e,"multiValueLabel",{"multi-value__label":!0})),selectProps:s},t),S(c,{data:o,innerProps:O(O({},L(e,"multiValueRemove",{"multi-value__remove":!0})),{},{"aria-label":"Remove ".concat(t||"option")},a),selectProps:s}))},dr=cr,pr=function(e,t){var n=e.isDisabled,o=e.isFocused,r=e.isSelected,i=e.theme,a=i.spacing,s=i.colors;return O({label:"option",cursor:"default",display:"block",fontSize:"inherit",width:"100%",userSelect:"none",WebkitTapHighlightColor:"rgba(0, 0, 0, 0)"},t?{}:{backgroundColor:r?s.primary:o?s.primary25:"transparent",color:n?s.neutral20:r?s.neutral0:"inherit",padding:"".concat(2*a.baseUnit,"px ").concat(3*a.baseUnit,"px"),":active":{backgroundColor:n?void 0:r?s.primary:s.primary50}})},fr=function(e){var t=e.children,n=e.isDisabled,o=e.isFocused,r=e.isSelected,i=e.innerRef,a=e.innerProps;return S("div",C({},L(e,"option",{option:!0,"option--is-disabled":n,"option--is-focused":o,"option--is-selected":r}),{ref:i,"aria-disabled":n},a),t)},vr=fr,mr=function(e,t){var n=e.theme,o=n.spacing,r=n.colors;return O({label:"placeholder",gridArea:"1 / 1 / 2 / 3"},t?{}:{color:r.neutral50,marginLeft:o.baseUnit/2,marginRight:o.baseUnit/2})},hr=function(e){var t=e.children,n=e.innerProps;return S("div",C({},L(e,"placeholder",{placeholder:!0}),n),t)},gr=hr,br=function(e,t){var n=e.isDisabled,o=e.theme,r=o.spacing,i=o.colors;return O({label:"singleValue",gridArea:"1 / 1 / 2 / 3",maxWidth:"100%",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},t?{}:{color:n?i.neutral40:i.neutral80,marginLeft:r.baseUnit/2,marginRight:r.baseUnit/2})},Sr=function(e){var t=e.children,n=e.isDisabled,o=e.innerProps;return S("div",C({},L(e,"singleValue",{"single-value":!0,"single-value--is-disabled":n}),o),t)},Or=Sr,ue={ClearIndicator:Hn,Control:Wn,DropdownIndicator:kn,DownChevron:at,CrossIcon:Ve,Group:Zn,GroupHeading:Xn,IndicatorsContainer:Ln,IndicatorSeparator:_n,Input:rr,LoadingIndicator:Nn,Menu:hn,MenuList:bn,MenuPortal:Vn,LoadingMessage:yn,NoOptionsMessage:Cn,MultiValue:dr,MultiValueContainer:sr,MultiValueLabel:lr,MultiValueRemove:ur,Option:vr,Placeholder:gr,SelectContainer:Pn,SingleValue:Or,ValueContainer:wn},Cr=function(e){return O(O({},ue),e.components)},Ae=Number.isNaN||function(e){return"number"==typeof e&&e!=e};function yr(e,t){return!!(e===t||Ae(e)&&Ae(t))}function Ir(e,t){if(e.length!==t.length)return!1;for(var n=0;n1?"s":""," ").concat(r.join(","),", selected.");case"select-option":return"option ".concat(o,i?" is disabled. Select another option.":", selected.");default:return""}},onFocus:function(e){var t=e.context,n=e.focused,o=e.options,r=e.label,i=void 0===r?"":r,a=e.selectValue,s=e.isDisabled,l=e.isSelected,u=e.isAppleDevice,c=function(e,t){return e&&e.length?"".concat(e.indexOf(t)+1," of ").concat(e.length):""};if("value"===t&&a)return"value ".concat(i," focused, ").concat(c(a,n),".");if("menu"===t&&u){var p=s?" disabled":"",d="".concat(l?" selected":"").concat(p);return"".concat(i).concat(d,", ").concat(c(o,n),".")}return""},onFilter:function(e){var t=e.inputValue,n=e.resultsMessage;return"".concat(n).concat(t?" for search term "+t:"",".")}},wr=function(e){var t=e.ariaSelection,n=e.focusedOption,o=e.focusedValue,r=e.focusableOptions,i=e.isFocused,a=e.selectValue,s=e.selectProps,l=e.id,u=e.isAppleDevice,c=s.ariaLiveMessages,p=s.getOptionLabel,d=s.inputValue,h=s.isMulti,m=s.isOptionDisabled,v=s.isSearchable,g=s.menuIsOpen,b=s.options,y=s.screenReaderStatus,C=s.tabSelectsValue,I=s.isLoading,w=s["aria-label"],V=s["aria-live"],x=f.useMemo((function(){return O(O({},xr),c||{})}),[c]),M=f.useMemo((function(){var e,n="";if(t&&x.onChange){var o=t.option,r=t.options,i=t.removedValue,s=t.removedValues,l=t.value,u=i||o||(e=l,Array.isArray(e)?null:e),c=u?p(u):"",d=r||s||void 0,f=d?d.map(p):[],h=O({isDisabled:u&&m(u,a),label:c,labels:f},t);n=x.onChange(h)}return n}),[t,x,m,a,p]),E=f.useMemo((function(){var e="",t=n||o,i=!!(n&&a&&a.includes(n));if(t&&x.onFocus){var s={focused:t,label:p(t),isDisabled:m(t,a),isSelected:i,options:r,context:t===n?"menu":"value",selectValue:a,isAppleDevice:u};e=x.onFocus(s)}return e}),[n,o,p,m,x,r,a,u]),L=f.useMemo((function(){var e="";if(g&&b.length&&!I&&x.onFilter){var t=y({count:r.length});e=x.onFilter({inputValue:d,resultsMessage:t})}return e}),[r,d,g,x,b,y,I]),D="initial-input-focus"===(null==t?void 0:t.action),P=f.useMemo((function(){var e="";if(x.guidance){var t=o?"value":g?"menu":"input";e=x.guidance({"aria-label":w,context:t,isDisabled:n&&m(n,a),isMulti:h,isSearchable:v,tabSelectsValue:C,isInitialFocus:D})}return e}),[w,n,o,h,m,v,g,x,a,C,D]),k=S(f.Fragment,null,S("span",{id:"aria-selection"},M),S("span",{id:"aria-focused"},E),S("span",{id:"aria-results"},L),S("span",{id:"aria-guidance"},P));return S(f.Fragment,null,S(He,{id:l},D&&k),S(He,{"aria-live":V,"aria-atomic":"false","aria-relevant":"additions text",role:"log"},i&&!D&&k))},Dr=wr,Oe=[{base:"A",letters:"A\u24b6\uff21\xc0\xc1\xc2\u1ea6\u1ea4\u1eaa\u1ea8\xc3\u0100\u0102\u1eb0\u1eae\u1eb4\u1eb2\u0226\u01e0\xc4\u01de\u1ea2\xc5\u01fa\u01cd\u0200\u0202\u1ea0\u1eac\u1eb6\u1e00\u0104\u023a\u2c6f"},{base:"AA",letters:"\ua732"},{base:"AE",letters:"\xc6\u01fc\u01e2"},{base:"AO",letters:"\ua734"},{base:"AU",letters:"\ua736"},{base:"AV",letters:"\ua738\ua73a"},{base:"AY",letters:"\ua73c"},{base:"B",letters:"B\u24b7\uff22\u1e02\u1e04\u1e06\u0243\u0182\u0181"},{base:"C",letters:"C\u24b8\uff23\u0106\u0108\u010a\u010c\xc7\u1e08\u0187\u023b\ua73e"},{base:"D",letters:"D\u24b9\uff24\u1e0a\u010e\u1e0c\u1e10\u1e12\u1e0e\u0110\u018b\u018a\u0189\ua779"},{base:"DZ",letters:"\u01f1\u01c4"},{base:"Dz",letters:"\u01f2\u01c5"},{base:"E",letters:"E\u24ba\uff25\xc8\xc9\xca\u1ec0\u1ebe\u1ec4\u1ec2\u1ebc\u0112\u1e14\u1e16\u0114\u0116\xcb\u1eba\u011a\u0204\u0206\u1eb8\u1ec6\u0228\u1e1c\u0118\u1e18\u1e1a\u0190\u018e"},{base:"F",letters:"F\u24bb\uff26\u1e1e\u0191\ua77b"},{base:"G",letters:"G\u24bc\uff27\u01f4\u011c\u1e20\u011e\u0120\u01e6\u0122\u01e4\u0193\ua7a0\ua77d\ua77e"},{base:"H",letters:"H\u24bd\uff28\u0124\u1e22\u1e26\u021e\u1e24\u1e28\u1e2a\u0126\u2c67\u2c75\ua78d"},{base:"I",letters:"I\u24be\uff29\xcc\xcd\xce\u0128\u012a\u012c\u0130\xcf\u1e2e\u1ec8\u01cf\u0208\u020a\u1eca\u012e\u1e2c\u0197"},{base:"J",letters:"J\u24bf\uff2a\u0134\u0248"},{base:"K",letters:"K\u24c0\uff2b\u1e30\u01e8\u1e32\u0136\u1e34\u0198\u2c69\ua740\ua742\ua744\ua7a2"},{base:"L",letters:"L\u24c1\uff2c\u013f\u0139\u013d\u1e36\u1e38\u013b\u1e3c\u1e3a\u0141\u023d\u2c62\u2c60\ua748\ua746\ua780"},{base:"LJ",letters:"\u01c7"},{base:"Lj",letters:"\u01c8"},{base:"M",letters:"M\u24c2\uff2d\u1e3e\u1e40\u1e42\u2c6e\u019c"},{base:"N",letters:"N\u24c3\uff2e\u01f8\u0143\xd1\u1e44\u0147\u1e46\u0145\u1e4a\u1e48\u0220\u019d\ua790\ua7a4"},{base:"NJ",letters:"\u01ca"},{base:"Nj",letters:"\u01cb"},{base:"O",letters:"O\u24c4\uff2f\xd2\xd3\xd4\u1ed2\u1ed0\u1ed6\u1ed4\xd5\u1e4c\u022c\u1e4e\u014c\u1e50\u1e52\u014e\u022e\u0230\xd6\u022a\u1ece\u0150\u01d1\u020c\u020e\u01a0\u1edc\u1eda\u1ee0\u1ede\u1ee2\u1ecc\u1ed8\u01ea\u01ec\xd8\u01fe\u0186\u019f\ua74a\ua74c"},{base:"OI",letters:"\u01a2"},{base:"OO",letters:"\ua74e"},{base:"OU",letters:"\u0222"},{base:"P",letters:"P\u24c5\uff30\u1e54\u1e56\u01a4\u2c63\ua750\ua752\ua754"},{base:"Q",letters:"Q\u24c6\uff31\ua756\ua758\u024a"},{base:"R",letters:"R\u24c7\uff32\u0154\u1e58\u0158\u0210\u0212\u1e5a\u1e5c\u0156\u1e5e\u024c\u2c64\ua75a\ua7a6\ua782"},{base:"S",letters:"S\u24c8\uff33\u1e9e\u015a\u1e64\u015c\u1e60\u0160\u1e66\u1e62\u1e68\u0218\u015e\u2c7e\ua7a8\ua784"},{base:"T",letters:"T\u24c9\uff34\u1e6a\u0164\u1e6c\u021a\u0162\u1e70\u1e6e\u0166\u01ac\u01ae\u023e\ua786"},{base:"TZ",letters:"\ua728"},{base:"U",letters:"U\u24ca\uff35\xd9\xda\xdb\u0168\u1e78\u016a\u1e7a\u016c\xdc\u01db\u01d7\u01d5\u01d9\u1ee6\u016e\u0170\u01d3\u0214\u0216\u01af\u1eea\u1ee8\u1eee\u1eec\u1ef0\u1ee4\u1e72\u0172\u1e76\u1e74\u0244"},{base:"V",letters:"V\u24cb\uff36\u1e7c\u1e7e\u01b2\ua75e\u0245"},{base:"VY",letters:"\ua760"},{base:"W",letters:"W\u24cc\uff37\u1e80\u1e82\u0174\u1e86\u1e84\u1e88\u2c72"},{base:"X",letters:"X\u24cd\uff38\u1e8a\u1e8c"},{base:"Y",letters:"Y\u24ce\uff39\u1ef2\xdd\u0176\u1ef8\u0232\u1e8e\u0178\u1ef6\u1ef4\u01b3\u024e\u1efe"},{base:"Z",letters:"Z\u24cf\uff3a\u0179\u1e90\u017b\u017d\u1e92\u1e94\u01b5\u0224\u2c7f\u2c6b\ua762"},{base:"a",letters:"a\u24d0\uff41\u1e9a\xe0\xe1\xe2\u1ea7\u1ea5\u1eab\u1ea9\xe3\u0101\u0103\u1eb1\u1eaf\u1eb5\u1eb3\u0227\u01e1\xe4\u01df\u1ea3\xe5\u01fb\u01ce\u0201\u0203\u1ea1\u1ead\u1eb7\u1e01\u0105\u2c65\u0250"},{base:"aa",letters:"\ua733"},{base:"ae",letters:"\xe6\u01fd\u01e3"},{base:"ao",letters:"\ua735"},{base:"au",letters:"\ua737"},{base:"av",letters:"\ua739\ua73b"},{base:"ay",letters:"\ua73d"},{base:"b",letters:"b\u24d1\uff42\u1e03\u1e05\u1e07\u0180\u0183\u0253"},{base:"c",letters:"c\u24d2\uff43\u0107\u0109\u010b\u010d\xe7\u1e09\u0188\u023c\ua73f\u2184"},{base:"d",letters:"d\u24d3\uff44\u1e0b\u010f\u1e0d\u1e11\u1e13\u1e0f\u0111\u018c\u0256\u0257\ua77a"},{base:"dz",letters:"\u01f3\u01c6"},{base:"e",letters:"e\u24d4\uff45\xe8\xe9\xea\u1ec1\u1ebf\u1ec5\u1ec3\u1ebd\u0113\u1e15\u1e17\u0115\u0117\xeb\u1ebb\u011b\u0205\u0207\u1eb9\u1ec7\u0229\u1e1d\u0119\u1e19\u1e1b\u0247\u025b\u01dd"},{base:"f",letters:"f\u24d5\uff46\u1e1f\u0192\ua77c"},{base:"g",letters:"g\u24d6\uff47\u01f5\u011d\u1e21\u011f\u0121\u01e7\u0123\u01e5\u0260\ua7a1\u1d79\ua77f"},{base:"h",letters:"h\u24d7\uff48\u0125\u1e23\u1e27\u021f\u1e25\u1e29\u1e2b\u1e96\u0127\u2c68\u2c76\u0265"},{base:"hv",letters:"\u0195"},{base:"i",letters:"i\u24d8\uff49\xec\xed\xee\u0129\u012b\u012d\xef\u1e2f\u1ec9\u01d0\u0209\u020b\u1ecb\u012f\u1e2d\u0268\u0131"},{base:"j",letters:"j\u24d9\uff4a\u0135\u01f0\u0249"},{base:"k",letters:"k\u24da\uff4b\u1e31\u01e9\u1e33\u0137\u1e35\u0199\u2c6a\ua741\ua743\ua745\ua7a3"},{base:"l",letters:"l\u24db\uff4c\u0140\u013a\u013e\u1e37\u1e39\u013c\u1e3d\u1e3b\u017f\u0142\u019a\u026b\u2c61\ua749\ua781\ua747"},{base:"lj",letters:"\u01c9"},{base:"m",letters:"m\u24dc\uff4d\u1e3f\u1e41\u1e43\u0271\u026f"},{base:"n",letters:"n\u24dd\uff4e\u01f9\u0144\xf1\u1e45\u0148\u1e47\u0146\u1e4b\u1e49\u019e\u0272\u0149\ua791\ua7a5"},{base:"nj",letters:"\u01cc"},{base:"o",letters:"o\u24de\uff4f\xf2\xf3\xf4\u1ed3\u1ed1\u1ed7\u1ed5\xf5\u1e4d\u022d\u1e4f\u014d\u1e51\u1e53\u014f\u022f\u0231\xf6\u022b\u1ecf\u0151\u01d2\u020d\u020f\u01a1\u1edd\u1edb\u1ee1\u1edf\u1ee3\u1ecd\u1ed9\u01eb\u01ed\xf8\u01ff\u0254\ua74b\ua74d\u0275"},{base:"oi",letters:"\u01a3"},{base:"ou",letters:"\u0223"},{base:"oo",letters:"\ua74f"},{base:"p",letters:"p\u24df\uff50\u1e55\u1e57\u01a5\u1d7d\ua751\ua753\ua755"},{base:"q",letters:"q\u24e0\uff51\u024b\ua757\ua759"},{base:"r",letters:"r\u24e1\uff52\u0155\u1e59\u0159\u0211\u0213\u1e5b\u1e5d\u0157\u1e5f\u024d\u027d\ua75b\ua7a7\ua783"},{base:"s",letters:"s\u24e2\uff53\xdf\u015b\u1e65\u015d\u1e61\u0161\u1e67\u1e63\u1e69\u0219\u015f\u023f\ua7a9\ua785\u1e9b"},{base:"t",letters:"t\u24e3\uff54\u1e6b\u1e97\u0165\u1e6d\u021b\u0163\u1e71\u1e6f\u0167\u01ad\u0288\u2c66\ua787"},{base:"tz",letters:"\ua729"},{base:"u",letters:"u\u24e4\uff55\xf9\xfa\xfb\u0169\u1e79\u016b\u1e7b\u016d\xfc\u01dc\u01d8\u01d6\u01da\u1ee7\u016f\u0171\u01d4\u0215\u0217\u01b0\u1eeb\u1ee9\u1eef\u1eed\u1ef1\u1ee5\u1e73\u0173\u1e77\u1e75\u0289"},{base:"v",letters:"v\u24e5\uff56\u1e7d\u1e7f\u028b\ua75f\u028c"},{base:"vy",letters:"\ua761"},{base:"w",letters:"w\u24e6\uff57\u1e81\u1e83\u0175\u1e87\u1e85\u1e98\u1e89\u2c73"},{base:"x",letters:"x\u24e7\uff58\u1e8b\u1e8d"},{base:"y",letters:"y\u24e8\uff59\u1ef3\xfd\u0177\u1ef9\u0233\u1e8f\xff\u1ef7\u1e99\u1ef5\u01b4\u024f\u1eff"},{base:"z",letters:"z\u24e9\uff5a\u017a\u1e91\u017c\u017e\u1e93\u1e95\u01b6\u0225\u0240\u2c6c\ua763"}],Lr=new RegExp("["+Oe.map((function(e){return e.letters})).join("")+"]","g"),ct={},fe=0;fe-1}},Tr=["innerRef"];function kr(e){var t=e.innerRef,n=q(e,Tr),o=ln(n,"onExited","in","enter","exit","appear");return S("input",C({ref:t},o,{css:Ze({label:"dummyInput",background:0,border:0,caretColor:"transparent",fontSize:"inherit",gridArea:"1 / 1 / 2 / 3",outline:0,padding:0,width:1,color:"transparent",left:-100,opacity:0,position:"relative",transform:"scale(.01)"},"","")}))}var Ar=function(e){e.cancelable&&e.preventDefault(),e.stopPropagation()};function Hr(e){var t=e.isEnabled,n=e.onBottomArrive,o=e.onBottomLeave,r=e.onTopArrive,i=e.onTopLeave,a=f.useRef(!1),s=f.useRef(!1),l=f.useRef(0),u=f.useRef(null),c=f.useCallback((function(e,t){if(null!==u.current){var l=u.current,c=l.scrollTop,p=l.scrollHeight,d=l.clientHeight,f=u.current,h=t>0,m=p-d-c,v=!1;m>t&&a.current&&(o&&o(e),a.current=!1),h&&s.current&&(i&&i(e),s.current=!1),h&&t>m?(n&&!a.current&&n(e),f.scrollTop=p,v=!0,a.current=!0):!h&&-t>c&&(r&&!s.current&&r(e),f.scrollTop=0,v=!0,s.current=!0),v&&Ar(e)}}),[n,o,r,i]),p=f.useCallback((function(e){c(e,e.deltaY)}),[c]),d=f.useCallback((function(e){l.current=e.changedTouches[0].clientY}),[]),h=f.useCallback((function(e){var t=l.current-e.changedTouches[0].clientY;c(e,t)}),[c]),m=f.useCallback((function(e){if(e){var t=!!on&&{passive:!1};e.addEventListener("wheel",p,t),e.addEventListener("touchstart",d,t),e.addEventListener("touchmove",h,t)}}),[h,d,p]),v=f.useCallback((function(e){e&&(e.removeEventListener("wheel",p,!1),e.removeEventListener("touchstart",d,!1),e.removeEventListener("touchmove",h,!1))}),[h,d,p]);return f.useEffect((function(){if(t){var e=u.current;return m(e),function(){v(e)}}}),[t,m,v]),function(e){u.current=e}}var _e=["boxSizing","height","overflow","paddingRight","position"],Ue={boxSizing:"border-box",overflow:"hidden",position:"relative",height:"100%"};function je(e){e.preventDefault()}function Ne(e){e.stopPropagation()}function Be(){var e=this.scrollTop,t=this.scrollHeight,n=e+this.offsetHeight;0===e?this.scrollTop=1:n===t&&(this.scrollTop=e-1)}function ze(){return"ontouchstart"in window||navigator.maxTouchPoints}var We=!!(typeof window<"u"&&window.document&&window.document.createElement),Q=0,J={capture:!1,passive:!1};function $r(e){var t=e.isEnabled,n=e.accountForScrollbars,o=void 0===n||n,r=f.useRef({}),i=f.useRef(null),a=f.useCallback((function(e){if(We){var t=document.body,n=t&&t.style;if(o&&_e.forEach((function(e){var t=n&&n[e];r.current[e]=t})),o&&Q<1){var i=parseInt(r.current.paddingRight,10)||0,a=document.body?document.body.clientWidth:0,s=window.innerWidth-a+i||0;Object.keys(Ue).forEach((function(e){var t=Ue[e];n&&(n[e]=t)})),n&&(n.paddingRight="".concat(s,"px"))}t&&ze()&&(t.addEventListener("touchmove",je,J),e&&(e.addEventListener("touchstart",Be,J),e.addEventListener("touchmove",Ne,J))),Q+=1}}),[o]),s=f.useCallback((function(e){if(We){var t=document.body,n=t&&t.style;Q=Math.max(Q-1,0),o&&Q<1&&_e.forEach((function(e){var t=r.current[e];n&&(n[e]=t)})),t&&ze()&&(t.removeEventListener("touchmove",je,J),e&&(e.removeEventListener("touchstart",Be,J),e.removeEventListener("touchmove",Ne,J)))}}),[o]);return f.useEffect((function(){if(t){var e=i.current;return a(e),function(){s(e)}}}),[t,a,s]),function(e){i.current=e}}var _r=function(e){var t=e.target;return t.ownerDocument.activeElement&&t.ownerDocument.activeElement.blur()},Ur={name:"1kfdb0e",styles:"position:fixed;left:0;bottom:0;right:0;top:0"};function jr(e){var t=e.children,n=e.lockEnabled,o=e.captureEnabled,r=Hr({isEnabled:void 0===o||o,onBottomArrive:e.onBottomArrive,onBottomLeave:e.onBottomLeave,onTopArrive:e.onTopArrive,onTopLeave:e.onTopLeave}),i=$r({isEnabled:n});return S(f.Fragment,null,n&&S("div",{onClick:_r,css:Ur}),t((function(e){r(e),i(e)})))}var Nr={name:"1a0ro4n-requiredInput",styles:"label:requiredInput;opacity:0;pointer-events:none;position:absolute;bottom:0;left:0;right:0;width:100%"},Br=function(e){var t=e.name,n=e.onFocus;return S("input",{required:!0,name:t,tabIndex:-1,"aria-hidden":"true",onFocus:n,css:Nr,value:"",onChange:function(){}})},zr=Br;function Me(e){var t;return typeof window<"u"&&null!=window.navigator&&e.test((null===(t=window.navigator.userAgentData)||void 0===t?void 0:t.platform)||window.navigator.platform)}function Wr(){return Me(/^iPhone/i)}function pt(){return Me(/^Mac/i)}function Gr(){return Me(/^iPad/i)||pt()&&navigator.maxTouchPoints>1}function qr(){return Wr()||Gr()}function Yr(){return pt()||qr()}var Kr=function(e){return e.label},Xr=function(e){return e.label},Zr=function(e){return e.value},Jr=function(e){return!!e.isDisabled},Qr={clearIndicator:An,container:Mn,control:Bn,dropdownIndicator:Tn,group:qn,groupHeading:Kn,indicatorsContainer:Dn,indicatorSeparator:$n,input:Qn,loadingIndicator:jn,loadingMessage:On,menu:fn,menuList:gn,menuPortal:In,multiValue:or,multiValueLabel:ir,multiValueRemove:ar,noOptionsMessage:Sn,option:pr,placeholder:mr,singleValue:br,valueContainer:xn},eo={primary:"#2684FF",primary75:"#4C9AFF",primary50:"#B2D4FF",primary25:"#DEEBFF",danger:"#DE350B",dangerLight:"#FFBDAD",neutral0:"hsl(0, 0%, 100%)",neutral5:"hsl(0, 0%, 95%)",neutral10:"hsl(0, 0%, 90%)",neutral20:"hsl(0, 0%, 80%)",neutral30:"hsl(0, 0%, 70%)",neutral40:"hsl(0, 0%, 60%)",neutral50:"hsl(0, 0%, 50%)",neutral60:"hsl(0, 0%, 40%)",neutral70:"hsl(0, 0%, 30%)",neutral80:"hsl(0, 0%, 20%)",neutral90:"hsl(0, 0%, 10%)"},to=4,ft=4,no=38,ro=2*ft,oo={baseUnit:ft,controlHeight:no,menuGutter:ro},he={borderRadius:to,colors:eo,spacing:oo},io={"aria-live":"polite",backspaceRemovesValue:!0,blurInputOnSelect:Te(),captureMenuScroll:!Te(),classNames:{},closeMenuOnSelect:!0,closeMenuOnScroll:!1,components:{},controlShouldRenderValue:!0,escapeClearsValue:!1,filterOption:Er(),formatGroupLabel:Kr,getOptionLabel:Xr,getOptionValue:Zr,isDisabled:!1,isLoading:!1,isMulti:!1,isRtl:!1,isSearchable:!0,isOptionDisabled:Jr,loadingMessage:function(){return"Loading..."},maxMenuHeight:300,minMenuHeight:140,menuIsOpen:!1,menuPlacement:"bottom",menuPosition:"absolute",menuShouldBlockScroll:!1,menuShouldScrollIntoView:!nn(),noOptionsMessage:function(){return"No options"},openMenuOnFocus:!1,openMenuOnClick:!0,options:[],pageSize:5,placeholder:"Select...",screenReaderStatus:function(e){var t=e.count;return"".concat(t," result").concat(1!==t?"s":""," available")},styles:{},tabIndex:0,tabSelectsValue:!0,unstyled:!1};function Ge(e,t,n,o){return{type:"option",data:t,isDisabled:ht(e,t,n),isSelected:gt(e,t,n),label:mt(e,t),value:ce(e,t),index:o}}function ae(e,t){return e.options.map((function(n,o){if("options"in n){var r=n.options.map((function(n,o){return Ge(e,n,t,o)})).filter((function(t){return Ye(e,t)}));return r.length>0?{type:"group",data:n,options:r,index:o}:void 0}var i=Ge(e,n,t,o);return Ye(e,i)?i:void 0})).filter(an)}function vt(e){return e.reduce((function(e,t){return"group"===t.type?e.push.apply(e,Ie(t.options.map((function(e){return e.data})))):e.push(t.data),e}),[])}function qe(e,t){return e.reduce((function(e,n){return"group"===n.type?e.push.apply(e,Ie(n.options.map((function(e){return{data:e.data,id:"".concat(t,"-").concat(n.index,"-").concat(e.index)}})))):e.push({data:n.data,id:"".concat(t,"-").concat(n.index)}),e}),[])}function ao(e,t){return vt(ae(e,t))}function Ye(e,t){var n=e.inputValue,o=void 0===n?"":n,r=t.data,i=t.isSelected,a=t.label,s=t.value;return(!St(e)||!i)&&bt(e,{label:a,value:s,data:r},o)}function so(e,t){var n=e.focusedValue,o=e.selectValue.indexOf(n);if(o>-1){if(t.indexOf(n)>-1)return n;if(o-1?n:t[0]}var ge=function(e,t){var n;return(null===(n=e.find((function(e){return e.data===t})))||void 0===n?void 0:n.id)||null},mt=function(e,t){return e.getOptionLabel(t)},ce=function(e,t){return e.getOptionValue(t)};function ht(e,t,n){return"function"==typeof e.isOptionDisabled&&e.isOptionDisabled(t,n)}function gt(e,t,n){if(n.indexOf(t)>-1)return!0;if("function"==typeof e.isOptionSelected)return e.isOptionSelected(t,n);var o=ce(e,t);return n.some((function(t){return ce(e,t)===o}))}function bt(e,t,n){return!e.filterOption||e.filterOption(t,n)}var St=function(e){var t=e.hideSelectedOptions,n=e.isMulti;return void 0===t?n:t},uo=1,Ot=function(){At(t,f.Component);var e=$t(t);function t(n){var o;if(_t(this,t),(o=e.call(this,n)).state={ariaSelection:null,focusedOption:null,focusedOptionId:null,focusableOptionsWithIds:[],focusedValue:null,inputIsHidden:!1,isFocused:!1,selectValue:[],clearFocusValueOnUpdate:!1,prevWasFocused:!1,inputIsHiddenAfterUpdate:void 0,prevProps:void 0,instancePrefix:""},o.blockOptionHover=!1,o.isComposing=!1,o.commonProps=void 0,o.initialTouchX=0,o.initialTouchY=0,o.openAfterFocus=!1,o.scrollToFocusedOptionOnUpdate=!1,o.userIsDragging=void 0,o.isAppleDevice=Yr(),o.controlRef=null,o.getControlRef=function(e){o.controlRef=e},o.focusedOptionRef=null,o.getFocusedOptionRef=function(e){o.focusedOptionRef=e},o.menuListRef=null,o.getMenuListRef=function(e){o.menuListRef=e},o.inputRef=null,o.getInputRef=function(e){o.inputRef=e},o.focus=o.focusInput,o.blur=o.blurInput,o.onChange=function(e,t){var n=o.props,r=n.onChange,i=n.name;t.name=i,o.ariaOnChange(e,t),r(e,t)},o.setValue=function(e,t,n){var r=o.props,i=r.closeMenuOnSelect,a=r.isMulti,s=r.inputValue;o.onInputChange("",{action:"set-value",prevInputValue:s}),i&&(o.setState({inputIsHiddenAfterUpdate:!a}),o.onMenuClose()),o.setState({clearFocusValueOnUpdate:!0}),o.onChange(e,{action:t,option:n})},o.selectOption=function(e){var t=o.props,n=t.blurInputOnSelect,r=t.isMulti,i=t.name,a=o.state.selectValue,s=r&&o.isOptionSelected(e,a),l=o.isOptionDisabled(e,a);if(s){var u=o.getOptionValue(e);o.setValue(a.filter((function(e){return o.getOptionValue(e)!==u})),"deselect-option",e)}else{if(l)return void o.ariaOnChange(e,{action:"select-option",option:e,name:i});r?o.setValue([].concat(Ie(a),[e]),"select-option",e):o.setValue(e,"select-option")}n&&o.blurInput()},o.removeValue=function(e){var t=o.props.isMulti,n=o.state.selectValue,r=o.getOptionValue(e),i=n.filter((function(e){return o.getOptionValue(e)!==r})),a=ie(t,i,i[0]||null);o.onChange(a,{action:"remove-value",removedValue:e}),o.focusInput()},o.clearValue=function(){var e=o.state.selectValue;o.onChange(ie(o.props.isMulti,[],null),{action:"clear",removedValues:e})},o.popValue=function(){var e=o.props.isMulti,t=o.state.selectValue,n=t[t.length-1],r=t.slice(0,t.length-1),i=ie(e,r,r[0]||null);n&&o.onChange(i,{action:"pop-value",removedValue:n})},o.getFocusedOptionId=function(e){return ge(o.state.focusableOptionsWithIds,e)},o.getFocusableOptionsWithIds=function(){return qe(ae(o.props,o.state.selectValue),o.getElementId("option"))},o.getValue=function(){return o.state.selectValue},o.cx=function(){for(var e=arguments.length,t=new Array(e),n=0;n5||i>5}},o.onTouchEnd=function(e){o.userIsDragging||(o.controlRef&&!o.controlRef.contains(e.target)&&o.menuListRef&&!o.menuListRef.contains(e.target)&&o.blurInput(),o.initialTouchX=0,o.initialTouchY=0)},o.onControlTouchEnd=function(e){o.userIsDragging||o.onControlMouseDown(e)},o.onClearIndicatorTouchEnd=function(e){o.userIsDragging||o.onClearIndicatorMouseDown(e)},o.onDropdownIndicatorTouchEnd=function(e){o.userIsDragging||o.onDropdownIndicatorMouseDown(e)},o.handleInputChange=function(e){var t=o.props.inputValue,n=e.currentTarget.value;o.setState({inputIsHiddenAfterUpdate:!1}),o.onInputChange(n,{action:"input-change",prevInputValue:t}),o.props.menuIsOpen||o.onMenuOpen()},o.onInputFocus=function(e){o.props.onFocus&&o.props.onFocus(e),o.setState({inputIsHiddenAfterUpdate:!1,isFocused:!0}),(o.openAfterFocus||o.props.openMenuOnFocus)&&o.openMenu("first"),o.openAfterFocus=!1},o.onInputBlur=function(e){var t=o.props.inputValue;o.menuListRef&&o.menuListRef.contains(document.activeElement)?o.inputRef.focus():(o.props.onBlur&&o.props.onBlur(e),o.onInputChange("",{action:"input-blur",prevInputValue:t}),o.onMenuClose(),o.setState({focusedValue:null,isFocused:!1}))},o.onOptionHover=function(e){if(!o.blockOptionHover&&o.state.focusedOption!==e){var t=o.getFocusableOptions().indexOf(e);o.setState({focusedOption:e,focusedOptionId:t>-1?o.getFocusedOptionId(e):null})}},o.shouldHideSelectedOptions=function(){return St(o.props)},o.onValueInputFocus=function(e){e.preventDefault(),e.stopPropagation(),o.focus()},o.onKeyDown=function(e){var t=o.props,n=t.isMulti,r=t.backspaceRemovesValue,i=t.escapeClearsValue,a=t.inputValue,s=t.isClearable,l=t.isDisabled,u=t.menuIsOpen,c=t.onKeyDown,p=t.tabSelectsValue,d=t.openMenuOnFocus,f=o.state,h=f.focusedOption,m=f.focusedValue,v=f.selectValue;if(!(l||"function"==typeof c&&(c(e),e.defaultPrevented))){switch(o.blockOptionHover=!0,e.key){case"ArrowLeft":if(!n||a)return;o.focusValue("previous");break;case"ArrowRight":if(!n||a)return;o.focusValue("next");break;case"Delete":case"Backspace":if(a)return;if(m)o.removeValue(m);else{if(!r)return;n?o.popValue():s&&o.clearValue()}break;case"Tab":if(o.isComposing||e.shiftKey||!u||!p||!h||d&&o.isOptionSelected(h,v))return;o.selectOption(h);break;case"Enter":if(229===e.keyCode)break;if(u){if(!h||o.isComposing)return;o.selectOption(h);break}return;case"Escape":u?(o.setState({inputIsHiddenAfterUpdate:!1}),o.onInputChange("",{action:"menu-close",prevInputValue:a}),o.onMenuClose()):s&&i&&o.clearValue();break;case" ":if(a)return;if(!u){o.openMenu("first");break}if(!h)return;o.selectOption(h);break;case"ArrowUp":u?o.focusOption("up"):o.openMenu("last");break;case"ArrowDown":u?o.focusOption("down"):o.openMenu("first");break;case"PageUp":if(!u)return;o.focusOption("pageup");break;case"PageDown":if(!u)return;o.focusOption("pagedown");break;case"Home":if(!u)return;o.focusOption("first");break;case"End":if(!u)return;o.focusOption("last");break;default:return}e.preventDefault()}},o.state.instancePrefix="react-select-"+(o.props.instanceId||++uo),o.state.selectValue=Fe(n.value),n.menuIsOpen&&o.state.selectValue.length){var r=o.getFocusableOptionsWithIds(),i=o.buildFocusableOptions(),a=i.indexOf(o.state.selectValue[0]);o.state.focusableOptionsWithIds=r,o.state.focusedOption=i[a],o.state.focusedOptionId=ge(r,i[a])}return o}return Vt(t,[{key:"componentDidMount",value:function(){this.startListeningComposition(),this.startListeningToTouch(),this.props.closeMenuOnScroll&&document&&document.addEventListener&&document.addEventListener("scroll",this.onScroll,!0),this.props.autoFocus&&this.focusInput(),this.props.menuIsOpen&&this.state.focusedOption&&this.menuListRef&&this.focusedOptionRef&&Ee(this.menuListRef,this.focusedOptionRef)}},{key:"componentDidUpdate",value:function(e){var t=this.props,n=t.isDisabled,o=t.menuIsOpen,r=this.state.isFocused;(r&&!n&&e.isDisabled||r&&o&&!e.menuIsOpen)&&this.focusInput(),r&&n&&!e.isDisabled?this.setState({isFocused:!1},this.onMenuClose):!r&&!n&&e.isDisabled&&this.inputRef===document.activeElement&&this.setState({isFocused:!0}),this.menuListRef&&this.focusedOptionRef&&this.scrollToFocusedOptionOnUpdate&&(Ee(this.menuListRef,this.focusedOptionRef),this.scrollToFocusedOptionOnUpdate=!1)}},{key:"componentWillUnmount",value:function(){this.stopListeningComposition(),this.stopListeningToTouch(),document.removeEventListener("scroll",this.onScroll,!0)}},{key:"onMenuOpen",value:function(){this.props.onMenuOpen()}},{key:"onMenuClose",value:function(){this.onInputChange("",{action:"menu-close",prevInputValue:this.props.inputValue}),this.props.onMenuClose()}},{key:"onInputChange",value:function(e,t){this.props.onInputChange(e,t)}},{key:"focusInput",value:function(){this.inputRef&&this.inputRef.focus()}},{key:"blurInput",value:function(){this.inputRef&&this.inputRef.blur()}},{key:"openMenu",value:function(e){var t=this,n=this.state,o=n.selectValue,r=n.isFocused,i=this.buildFocusableOptions(),a="first"===e?0:i.length-1;if(!this.props.isMulti){var s=i.indexOf(o[0]);s>-1&&(a=s)}this.scrollToFocusedOptionOnUpdate=!(r&&this.menuListRef),this.setState({inputIsHiddenAfterUpdate:!1,focusedValue:null,focusedOption:i[a],focusedOptionId:this.getFocusedOptionId(i[a])},(function(){return t.onMenuOpen()}))}},{key:"focusValue",value:function(e){var t=this.state,n=t.selectValue,o=t.focusedValue;if(this.props.isMulti){this.setState({focusedOption:null});var r=n.indexOf(o);o||(r=-1);var i=n.length-1,a=-1;if(n.length){switch(e){case"previous":a=0===r?0:-1===r?i:r-1;break;case"next":r>-1&&r0&&void 0!==arguments[0]?arguments[0]:"first",t=this.props.pageSize,n=this.state.focusedOption,o=this.getFocusableOptions();if(o.length){var r=0,i=o.indexOf(n);n||(i=-1),"up"===e?r=i>0?i-1:o.length-1:"down"===e?r=(i+1)%o.length:"pageup"===e?(r=i-t)<0&&(r=0):"pagedown"===e?(r=i+t)>o.length-1&&(r=o.length-1):"last"===e&&(r=o.length-1),this.scrollToFocusedOptionOnUpdate=!0,this.setState({focusedOption:o[r],focusedValue:null,focusedOptionId:this.getFocusedOptionId(o[r])})}}},{key:"getTheme",value:function(){return this.props.theme?"function"==typeof this.props.theme?this.props.theme(he):O(O({},he),this.props.theme):he}},{key:"getCommonProps",value:function(){var e=this.clearValue,t=this.cx,n=this.getStyles,o=this.getClassNames,r=this.getValue,i=this.selectOption,a=this.setValue,s=this.props,l=s.isMulti,u=s.isRtl,c=s.options;return{clearValue:e,cx:t,getStyles:n,getClassNames:o,getValue:r,hasValue:this.hasValue(),isMulti:l,isRtl:u,options:c,selectOption:i,selectProps:s,setValue:a,theme:this.getTheme()}}},{key:"hasValue",value:function(){return this.state.selectValue.length>0}},{key:"hasOptions",value:function(){return!!this.getFocusableOptions().length}},{key:"isClearable",value:function(){var e=this.props,t=e.isClearable,n=e.isMulti;return void 0===t?n:t}},{key:"isOptionDisabled",value:function(e,t){return ht(this.props,e,t)}},{key:"isOptionSelected",value:function(e,t){return gt(this.props,e,t)}},{key:"filterOption",value:function(e,t){return bt(this.props,e,t)}},{key:"formatOptionLabel",value:function(e,t){if("function"==typeof this.props.formatOptionLabel){var n=this.props.inputValue,o=this.state.selectValue;return this.props.formatOptionLabel(e,{context:t,inputValue:n,selectValue:o})}return this.getOptionLabel(e)}},{key:"formatGroupLabel",value:function(e){return this.props.formatGroupLabel(e)}},{key:"startListeningComposition",value:function(){document&&document.addEventListener&&(document.addEventListener("compositionstart",this.onCompositionStart,!1),document.addEventListener("compositionend",this.onCompositionEnd,!1))}},{key:"stopListeningComposition",value:function(){document&&document.removeEventListener&&(document.removeEventListener("compositionstart",this.onCompositionStart),document.removeEventListener("compositionend",this.onCompositionEnd))}},{key:"startListeningToTouch",value:function(){document&&document.addEventListener&&(document.addEventListener("touchstart",this.onTouchStart,!1),document.addEventListener("touchmove",this.onTouchMove,!1),document.addEventListener("touchend",this.onTouchEnd,!1))}},{key:"stopListeningToTouch",value:function(){document&&document.removeEventListener&&(document.removeEventListener("touchstart",this.onTouchStart),document.removeEventListener("touchmove",this.onTouchMove),document.removeEventListener("touchend",this.onTouchEnd))}},{key:"renderInput",value:function(){var e=this.props,t=e.isDisabled,n=e.isSearchable,o=e.inputId,r=e.inputValue,i=e.tabIndex,a=e.form,s=e.menuIsOpen,l=e.required,u=this.getComponents().Input,c=this.state,p=c.inputIsHidden,d=c.ariaSelection,h=this.commonProps,m=o||this.getElementId("input"),v=O(O(O({"aria-autocomplete":"list","aria-expanded":s,"aria-haspopup":!0,"aria-errormessage":this.props["aria-errormessage"],"aria-invalid":this.props["aria-invalid"],"aria-label":this.props["aria-label"],"aria-labelledby":this.props["aria-labelledby"],"aria-required":l,role:"combobox","aria-activedescendant":this.isAppleDevice?void 0:this.state.focusedOptionId||""},s&&{"aria-controls":this.getElementId("listbox")}),!n&&{"aria-readonly":!0}),this.hasValue()?"initial-input-focus"===(null==d?void 0:d.action)&&{"aria-describedby":this.getElementId("live-region")}:{"aria-describedby":this.getElementId("placeholder")});return n?f.createElement(u,C({},h,{autoCapitalize:"none",autoComplete:"off",autoCorrect:"off",id:m,innerRef:this.getInputRef,isDisabled:t,isHidden:p,onBlur:this.onInputBlur,onChange:this.handleInputChange,onFocus:this.onInputFocus,spellCheck:"false",tabIndex:i,form:a,type:"text",value:r},v)):f.createElement(kr,C({id:m,innerRef:this.getInputRef,onBlur:this.onInputBlur,onChange:se,onFocus:this.onInputFocus,disabled:t,tabIndex:i,inputMode:"none",form:a,value:""},v))}},{key:"renderPlaceholderOrValue",value:function(){var e=this,t=this.getComponents(),n=t.MultiValue,o=t.MultiValueContainer,r=t.MultiValueLabel,i=t.MultiValueRemove,a=t.SingleValue,s=t.Placeholder,l=this.commonProps,u=this.props,c=u.controlShouldRenderValue,p=u.isDisabled,d=u.isMulti,h=u.inputValue,m=u.placeholder,v=this.state,g=v.selectValue,b=v.focusedValue,O=v.isFocused;if(!this.hasValue()||!c)return h?null:f.createElement(s,C({},l,{key:"placeholder",isDisabled:p,isFocused:O,innerProps:{id:this.getElementId("placeholder")}}),m);if(d)return g.map((function(t,a){var s=t===b,u="".concat(e.getOptionLabel(t),"-").concat(e.getOptionValue(t));return f.createElement(n,C({},l,{components:{Container:o,Label:r,Remove:i},isFocused:s,isDisabled:p,key:u,index:a,removeProps:{onClick:function(){return e.removeValue(t)},onTouchEnd:function(){return e.removeValue(t)},onMouseDown:function(e){e.preventDefault()}},data:t}),e.formatOptionLabel(t,"value"))}));if(h)return null;var y=g[0];return f.createElement(a,C({},l,{data:y,isDisabled:p}),this.formatOptionLabel(y,"value"))}},{key:"renderClearIndicator",value:function(){var e=this.getComponents().ClearIndicator,t=this.commonProps,n=this.props,o=n.isDisabled,r=n.isLoading,i=this.state.isFocused;if(!this.isClearable()||!e||o||!this.hasValue()||r)return null;var a={onMouseDown:this.onClearIndicatorMouseDown,onTouchEnd:this.onClearIndicatorTouchEnd,"aria-hidden":"true"};return f.createElement(e,C({},t,{innerProps:a,isFocused:i}))}},{key:"renderLoadingIndicator",value:function(){var e=this.getComponents().LoadingIndicator,t=this.commonProps,n=this.props,o=n.isDisabled,r=n.isLoading,i=this.state.isFocused;if(!e||!r)return null;return f.createElement(e,C({},t,{innerProps:{"aria-hidden":"true"},isDisabled:o,isFocused:i}))}},{key:"renderIndicatorSeparator",value:function(){var e=this.getComponents(),t=e.DropdownIndicator,n=e.IndicatorSeparator;if(!t||!n)return null;var o=this.commonProps,r=this.props.isDisabled,i=this.state.isFocused;return f.createElement(n,C({},o,{isDisabled:r,isFocused:i}))}},{key:"renderDropdownIndicator",value:function(){var e=this.getComponents().DropdownIndicator;if(!e)return null;var t=this.commonProps,n=this.props.isDisabled,o=this.state.isFocused,r={onMouseDown:this.onDropdownIndicatorMouseDown,onTouchEnd:this.onDropdownIndicatorTouchEnd,"aria-hidden":"true"};return f.createElement(e,C({},t,{innerProps:r,isDisabled:n,isFocused:o}))}},{key:"renderMenu",value:function(){var e=this,t=this.getComponents(),n=t.Group,o=t.GroupHeading,r=t.Menu,i=t.MenuList,a=t.MenuPortal,s=t.LoadingMessage,l=t.NoOptionsMessage,u=t.Option,c=this.commonProps,p=this.state.focusedOption,d=this.props,h=d.captureMenuScroll,m=d.inputValue,v=d.isLoading,g=d.loadingMessage,b=d.minMenuHeight,O=d.maxMenuHeight,y=d.menuIsOpen,S=d.menuPlacement,I=d.menuPosition,w=d.menuPortalTarget,V=d.menuShouldBlockScroll,x=d.menuShouldScrollIntoView,M=d.noOptionsMessage,E=d.onMenuScrollToTop,L=d.onMenuScrollToBottom;if(!y)return null;var D,P=function(t,n){var o=t.type,r=t.data,i=t.isDisabled,a=t.isSelected,s=t.label,l=t.value,d=p===r,h=i?void 0:function(){return e.onOptionHover(r)},m=i?void 0:function(){return e.selectOption(r)},v="".concat(e.getElementId("option"),"-").concat(n),g={id:v,onClick:m,onMouseMove:h,onMouseOver:h,tabIndex:-1,role:"option","aria-selected":e.isAppleDevice?void 0:a};return f.createElement(u,C({},c,{innerProps:g,data:r,isDisabled:i,isSelected:a,key:v,label:s,type:o,value:l,isFocused:d,innerRef:d?e.getFocusedOptionRef:void 0}),e.formatOptionLabel(t.data,"menu"))};if(this.hasOptions())D=this.getCategorizedOptions().map((function(t){if("group"===t.type){var r=t.data,i=t.options,a=t.index,s="".concat(e.getElementId("group"),"-").concat(a),l="".concat(s,"-heading");return f.createElement(n,C({},c,{key:s,data:r,options:i,Heading:o,headingProps:{id:l,data:t.data},label:e.formatGroupLabel(t.data)}),t.options.map((function(e){return P(e,"".concat(a,"-").concat(e.index))})))}if("option"===t.type)return P(t,"".concat(t.index))}));else if(v){var k=g({inputValue:m});if(null===k)return null;D=f.createElement(s,c,k)}else{var R=M({inputValue:m});if(null===R)return null;D=f.createElement(l,c,R)}var F={minMenuHeight:b,maxMenuHeight:O,menuPlacement:S,menuPosition:I,menuShouldScrollIntoView:x},T=f.createElement(vn,C({},c,F),(function(t){var n=t.ref,o=t.placerProps,a=o.placement,s=o.maxHeight;return f.createElement(r,C({},c,F,{innerRef:n,innerProps:{onMouseDown:e.onMenuMouseDown,onMouseMove:e.onMenuMouseMove},isLoading:v,placement:a}),f.createElement(jr,{captureEnabled:h,onTopArrive:E,onBottomArrive:L,lockEnabled:V},(function(t){return f.createElement(i,C({},c,{innerRef:function(n){e.getMenuListRef(n),t(n)},innerProps:{role:"listbox","aria-multiselectable":c.isMulti,id:e.getElementId("listbox")},isLoading:v,maxHeight:s,focusedOption:p}),D)})))}));return w||"fixed"===I?f.createElement(a,C({},c,{appendTo:w,controlElement:this.controlRef,menuPlacement:S,menuPosition:I}),T):T}},{key:"renderFormField",value:function(){var e=this,t=this.props,n=t.delimiter,o=t.isDisabled,r=t.isMulti,i=t.name,a=t.required,s=this.state.selectValue;if(a&&!this.hasValue()&&!o)return f.createElement(zr,{name:i,onFocus:this.onValueInputFocus});if(i&&!o){if(r){if(n){var l=s.map((function(t){return e.getOptionValue(t)})).join(n);return f.createElement("input",{name:i,type:"hidden",value:l})}var u=s.length>0?s.map((function(t,n){return f.createElement("input",{key:"i-".concat(n),name:i,type:"hidden",value:e.getOptionValue(t)})})):f.createElement("input",{name:i,type:"hidden",value:""});return f.createElement("div",null,u)}var c=s[0]?this.getOptionValue(s[0]):"";return f.createElement("input",{name:i,type:"hidden",value:c})}}},{key:"renderLiveRegion",value:function(){var e=this.commonProps,t=this.state,n=t.ariaSelection,o=t.focusedOption,r=t.focusedValue,i=t.isFocused,a=t.selectValue,s=this.getFocusableOptions();return f.createElement(Dr,C({},e,{id:this.getElementId("live-region"),ariaSelection:n,focusedOption:o,focusedValue:r,isFocused:i,selectValue:a,focusableOptions:s,isAppleDevice:this.isAppleDevice}))}},{key:"render",value:function(){var e=this.getComponents(),t=e.Control,n=e.IndicatorsContainer,o=e.SelectContainer,r=e.ValueContainer,i=this.props,a=i.className,s=i.id,l=i.isDisabled,u=i.menuIsOpen,c=this.state.isFocused,p=this.commonProps=this.getCommonProps();return f.createElement(o,C({},p,{className:a,innerProps:{id:s,onKeyDown:this.onKeyDown},isDisabled:l,isFocused:c}),this.renderLiveRegion(),f.createElement(t,C({},p,{innerRef:this.getControlRef,innerProps:{onMouseDown:this.onControlMouseDown,onTouchEnd:this.onControlTouchEnd},isDisabled:l,isFocused:c,menuIsOpen:u}),f.createElement(r,C({},p,{isDisabled:l}),this.renderPlaceholderOrValue(),this.renderInput()),f.createElement(n,C({},p,{isDisabled:l}),this.renderClearIndicator(),this.renderLoadingIndicator(),this.renderIndicatorSeparator(),this.renderDropdownIndicator())),this.renderMenu(),this.renderFormField())}}],[{key:"getDerivedStateFromProps",value:function(e,t){var n=t.prevProps,o=t.clearFocusValueOnUpdate,r=t.inputIsHiddenAfterUpdate,i=t.ariaSelection,a=t.isFocused,s=t.prevWasFocused,l=t.instancePrefix,u=e.options,c=e.value,p=e.menuIsOpen,d=e.inputValue,f=e.isMulti,h=Fe(c),m={};if(n&&(c!==n.value||u!==n.options||p!==n.menuIsOpen||d!==n.inputValue)){var v=p?ao(e,h):[],g=p?qe(ae(e,h),"".concat(l,"-option")):[],b=o?so(t,h):null,y=lo(t,v);m={selectValue:h,focusedOption:y,focusedOptionId:ge(g,y),focusableOptionsWithIds:g,focusedValue:b,clearFocusValueOnUpdate:!1}}var C=null!=r&&e!==n?{inputIsHidden:r,inputIsHiddenAfterUpdate:void 0}:{},S=i,I=a&&s;return a&&!I&&(S={value:ie(f,h,h[0]||null),options:h,action:"initial-input-focus"},I=!s),"initial-input-focus"===(null==i?void 0:i.action)&&(S=null),O(O(O({},m),C),{},{prevProps:e,ariaSelection:S,prevWasFocused:I})}}]),t}();Ot.defaultProps=io;var co=f.forwardRef((function(e,t){var n=zt(e);return f.createElement(Ot,C({ref:t},n))})),po=co;const Ce=e=>j.jsx(ue.DropdownIndicator,{...e,children:j.jsx(Et,{loading:"lazy",src:Ft,style:{width:12}})});try{Ce.displayName="DropdownIndicator",Ce.__docgenInfo={description:"",displayName:"DropdownIndicator",props:{}}}catch{}const ye=e=>{const t=e.data;return t.imageElement?j.jsx(ue.Option,{...e,children:j.jsx(j.Fragment,{children:j.jsx(Le,{sx:{alignItems:"center",justifyContent:"space-between"},mt:"5px",children:j.jsxs(Le,{sx:{alignItems:"center"},children:[t.imageElement,j.jsxs(Tt,{sx:{fontSize:2},ml:"10px",children:[t.label,t.number&&` (${t.number})`]})]})},t.label)})}):j.jsx(ue.Option,{...e,children:e.label})};try{ye.displayName="Option",ye.__docgenInfo={description:"",displayName:"Option",props:{}}}catch{}const Ke=e=>{const{theme:t}=kt(),n={container:e=>({...e,fontSize:t.fontSizes[2]+"px",fontFamily:'"Varela Round", Arial, sans-serif'}),control:e=>({...e,border:"1px solid "+t.colors.softblue,backgroundColor:t.colors.background,minHeight:"40px",cursor:"pointer",boxShadow:"none",":focus":{border:"1px solid "+t.colors.blue,outline:"none"},":hover":{border:"1px solid "+t.colors.blue}}),option:(e,{data:n,isFocused:o,isDisabled:r})=>({...e,backgroundColor:o?t.colors.white:t.colors.background,boxShadow:"none",cursor:"pointer",color:r?t.colors.lightgrey:n.color||t.colors.black}),menu:e=>({...e,border:"1px solid "+t.colors.softblue,boxShadow:"none",backgroundColor:t.colors.background,":hover":{border:"1px solid "+t.colors.softblue}}),multiValue:(e,{data:n})=>({...e,borderRadius:n.color?99:4,backgroundColor:n.color?`${n.color}20`:t.colors.white,padding:"2px",border:"1px solid ",borderColor:n.color||t.colors.softgrey,color:n.color||t.colors.grey}),multiValueLabel:(e,{data:n})=>({...e,color:n.color||t.colors.grey}),multiValueRemove:(e,{data:n})=>({...e,borderRadius:n.color?99:4,color:n.color||t.colors.grey,":hover":{backgroundColor:n.color||t.colors.grey,color:"white"}}),indicatorSeparator:e=>({...e,display:"none"}),dropdownIndicator:(e,t)=>({...e,":hover":{opacity:t.isFocused?1:.5},opacity:t.isFocused?1:.3})},o={...n,control:e=>({...e,border:"1px solid "+t.colors.red,":focus":{border:"1px solid "+t.colors.red},":hover":{border:"1px solid "+t.colors.red}}),menu:e=>({...e,border:"1px solid "+t.colors.red,":hover":{border:"1px solid "+t.colors.red}})},r={container:e=>({...e,fontSize:t.fontSizes[2]+"px",fontFamily:'"Varela Round", Arial, sans-serif',border:"2px solid "+t.colors.black,borderRadius:"5px",color:t.colors.black}),control:e=>({...e,backgroundColor:t.colors.white,minHeight:"40px",cursor:"pointer",boxShadow:"none",":hover":{border:"1px solid "+t.colors.blue},":focus":{border:"1px solid "+t.colors.blue}}),placeholder:e=>({...e,color:t.colors.black}),option:(e,n)=>({...e,color:t.colors.black,backgroundColor:n.isFocused?t.colors.softblue:t.colors.white,cursor:"pointer",boxShadow:"none"}),menu:e=>({...e,border:"2px solid "+t.colors.black,boxShadow:"none",backgroundColor:t.colors.white,":hover":{border:"2px solid "+t.colors.black}}),multiValue:e=>({...e,backgroundColor:t.colors.softblue,padding:"2px",border:"1px solid "+t.colors.black,color:t.colors.grey}),indicatorSeparator:e=>({...e,display:"none"}),valueContainer:e=>({...e,flexWrap:"nowrap",overflow:"auto"})},i=e.options||[],a={default:r,form:n,formError:o,icons:r,tabs:r};return j.jsx(po,{classNamePrefix:"data-cy",components:{DropdownIndicator:Ce,Option:ye},defaultValue:e.defaultValue,getOptionLabel:e.getOptionLabel&&e.getOptionLabel,getOptionValue:e.getOptionValue&&e.getOptionValue,isClearable:!!e.isClearable,isMulti:!!e.isMulti,placeholder:e.placeholder,styles:a[e.variant||"default"],options:i,onChange:t=>e.onChange&&e.onChange(t),value:e.value,onInputChange:e.onInputChange,isOptionDisabled:e.isOptionDisabled})};try{Ke.displayName="Select",Ke.__docgenInfo={description:"",displayName:"Select",props:{options:{defaultValue:null,description:"Array of options that populate the select menu",name:"options",required:!0,type:{name:"OptionsOrGroups"}},value:{defaultValue:null,description:"The value of the select; reflected by the selected option",name:"value",required:!1,type:{name:"any"}},onChange:{defaultValue:null,description:"Handle change events on the select",name:"onChange",required:!1,type:{name:"((arg: any) => void)"}},placeholder:{defaultValue:null,description:"Placeholder for the select value",name:"placeholder",required:!1,type:{name:"string"}},isMulti:{defaultValue:null,description:"Support multiple selected options",name:"isMulti",required:!1,type:{name:"boolean"}},isClearable:{defaultValue:null,description:"Is the select value clearable",name:"isClearable",required:!1,type:{name:"boolean"}},getOptionLabel:{defaultValue:null,description:"Resolves option data to a string to be displayed as the label by components\n\nNote: Failure to resolve to a string type can interfere with filtering and\nscreen reader support.",name:"getOptionLabel",required:!1,type:{name:"any"}},getOptionValue:{defaultValue:null,description:"Resolves option data to a string to compare options and specify value attributes",name:"getOptionValue",required:!1,type:{name:"any"}},defaultValue:{defaultValue:null,description:"",name:"defaultValue",required:!1,type:{name:"IOption"}},variant:{defaultValue:null,description:"",name:"variant",required:!1,type:{name:"enum",value:[{value:'"form"'},{value:'"formError"'},{value:'"icons"'},{value:'"tabs"'}]}}}}}catch{}export{Ke as S}; \ No newline at end of file diff --git a/storybook-static/assets/Select.stories-BvanZ3sG.js b/storybook-static/assets/Select.stories-BJeW5yGY.js similarity index 97% rename from storybook-static/assets/Select.stories-BvanZ3sG.js rename to storybook-static/assets/Select.stories-BJeW5yGY.js index ec31493108..5e26b64bb8 100644 --- a/storybook-static/assets/Select.stories-BvanZ3sG.js +++ b/storybook-static/assets/Select.stories-BJeW5yGY.js @@ -1 +1 @@ -import{j as t}from"./jsx-runtime-CexXSJP5.js";import{r as i}from"./index-BP8_t0zE.js";import{S as a}from"./Select-C5bekj-a.js";import"./defineProperty-Dr9G4DxF.js";import"./typeof-QjJsDpFa.js";import"./objectWithoutPropertiesLoose-CAYKN5F1.js";import"./extends-CF3RwP-h.js";import"./setPrototypeOf-NYsvoNVB.js";import"./isNativeReflectConstruct-gwnEYaHE.js";import"./emotion-react.browser.esm-BYoRxRk_.js";import"./parseProps-780b287c.browser.esm-DiCerVr_.js";import"./emotion-use-insertion-effect-with-fallbacks.browser.esm-UWD3gXM2.js";import"./hoist-non-react-statics.cjs-CQI8syxn.js";import"./index-BBRV8eG_.js";import"./floating-ui.dom-DtcZXcvp.js";import"./icon-arrow-down-CJeToCJe.js";import"./theme-ui-components.esm-DCiJ1mMX.js";import"./theme-ui-core-jsx-runtime.browser.esm-CH0qhC10.js";import"./theme-ui-core.browser.esm-CIov4Ln1.js";import"./cjs-Clfm10Kj.js";const N={title:"Forms/Select",component:a},r=()=>t.jsx(a,{placeholder:"A placeholder value",options:[{value:"value-one",label:"Value 1"},{value:"value-two",label:"Value 2"}]}),o=()=>{const[e,l]=i.useState();return t.jsx(a,{value:e,onChange:l,placeholder:"A placeholder value",isClearable:!0,options:[{value:"value-one",label:"Value 1"},{value:"value-two",label:"Value 2"}]})},u=()=>{const[e,l]=i.useState({value:"value-three",label:"Value 3"});return t.jsx(a,{value:e,onChange:l,isMulti:!0,placeholder:"A placeholder value",options:[{value:"value-one",label:"Value 1"},{value:"value-two",label:"Value 2"},{value:"value-three",label:"Value 3"}]})},n=()=>{const[e,l]=i.useState();return t.jsx(a,{variant:"form",value:e,onChange:l,isMulti:!0,placeholder:"A placeholder value",options:[{value:"value-one",label:"Value 1"},{value:"value-two",label:"Value 2"}]})},s=()=>{const[e,l]=i.useState();return t.jsx(a,{variant:"icons",value:e,onChange:l,isMulti:!0,placeholder:"A placeholder value",options:[{label:"",options:[{imageElement:"",value:"verified",label:"Verified"}]},{label:"All Workspaces",options:[{imageElement:"",value:"verified",label:"Verified"}]},{label:"Others",options:[{imageElement:"",value:"verified",label:"Verified"}]}]})};var c,p,v,m,d,V,b,h,S,f,g,A,C,x,E;r.parameters={...r.parameters,docs:{...null==(c=r.parameters)?void 0:c.docs,source:{originalSource:"() => {\n return ;\n}",...null==(V=null==(d=o.parameters)?void 0:d.docs)?void 0:V.source}}},u.parameters={...u.parameters,docs:{...null==(b=u.parameters)?void 0:b.docs,source:{originalSource:"() => {\n const [value, setValue] = useState({\n value: 'value-three',\n label: 'Value 3'\n });\n return ;\n}",...null==(A=null==(g=n.parameters)?void 0:g.docs)?void 0:A.source}}},s.parameters={...s.parameters,docs:{...null==(C=s.parameters)?void 0:C.docs,source:{originalSource:"() => {\n const [value, setValue] = useState();\n return ;\n}",...null==(v=null==(p=r.parameters)?void 0:p.docs)?void 0:v.source}}},o.parameters={...o.parameters,docs:{...null==(m=o.parameters)?void 0:m.docs,source:{originalSource:"() => {\n const [value, setValue] = useState();\n return ;\n}",...null==(S=null==(h=u.parameters)?void 0:h.docs)?void 0:S.source}}},n.parameters={...n.parameters,docs:{...null==(f=n.parameters)?void 0:f.docs,source:{originalSource:"() => {\n const [value, setValue] = useState();\n return ;\n}",...null==(E=null==(x=s.parameters)?void 0:x.docs)?void 0:E.source}}};const P=["Default","Clearable","MultipleSelect","FormSelect","SelectWithIcons"];export{o as Clearable,r as Default,n as FormSelect,u as MultipleSelect,s as SelectWithIcons,P as __namedExportsOrder,N as default}; \ No newline at end of file diff --git a/storybook-static/assets/SettingsFormWrapper-wpFJEgrf.js b/storybook-static/assets/SettingsFormWrapper-8HI_u4j_.js similarity index 95% rename from storybook-static/assets/SettingsFormWrapper-wpFJEgrf.js rename to storybook-static/assets/SettingsFormWrapper-8HI_u4j_.js index 42c5b80028..ef691b3933 100644 --- a/storybook-static/assets/SettingsFormWrapper-wpFJEgrf.js +++ b/storybook-static/assets/SettingsFormWrapper-8HI_u4j_.js @@ -1,4 +1,4 @@ -import{j as e}from"./jsx-runtime-CexXSJP5.js";import{C as b,a as j,F as u}from"./theme-ui-components.esm-DCiJ1mMX.js";import{a as S,T,t as x,c as v,b as F}from"./TabsList-DhTEw6FA.js";import{n as g}from"./emotion-styled.browser.esm-Dz2BNYeh.js";import{I as C}from"./Icon-BoVZOGVD.js";import{I}from"./InternalLink-CtyTe3gy.js";import{S as w}from"./Select-C5bekj-a.js";import{u as L,a as N,m as V}from"./index-BXxqJQdV.js";import{r as y}from"./index-BP8_t0zE.js";function $(e){return y.forwardRef((function(t,r){const{ownerState:n,...a}=t;return y.createElement(e,{...a,ref:r})}))}const m=t=>{const{tab:r,value:n}=t,{body:a,header:s,notifications:o}=r,l={borderRadius:3,marginBottom:4,padding:[2,4],overflow:"visible"};return e.jsxs(S,{value:n,style:{display:"flex",flexDirection:"column",alignSelf:"stretch"},children:[s&&e.jsx(b,{sx:{...l,backgroundColor:"softblue",padding:[3,5]},children:s}),o&&e.jsx(j,{sx:{...l,padding:0},children:o}),e.jsx(b,{sx:l,children:a})]})};try{m.displayName="SettingsFormTab",m.__docgenInfo={description:"",displayName:"SettingsFormTab",props:{tab:{defaultValue:null,description:"",name:"tab",required:!0,type:{name:"ITab"}},value:{defaultValue:null,description:"",name:"value",required:!0,type:{name:"string"}}}}}catch{}const d=e=>`/settings/${e.toLowerCase()}`,f=t=>{var r;const{currentTab:n,tabs:a}=t,s=L(),o=g(T)` +import{j as e}from"./jsx-runtime-CexXSJP5.js";import{C as b,a as j,F as u}from"./theme-ui-components.esm-BngKL4Rx.js";import{a as S,T,t as x,c as v,b as F}from"./TabsList-DhTEw6FA.js";import{n as g}from"./emotion-styled.browser.esm-Dz2BNYeh.js";import{I as C}from"./Icon-BoVZOGVD.js";import{I}from"./InternalLink-BRM7MvOa.js";import{S as w}from"./Select-Jv7oc3OL.js";import{u as L,a as N,m as V}from"./index-BXxqJQdV.js";import{r as y}from"./index-BP8_t0zE.js";function $(e){return y.forwardRef((function(t,r){const{ownerState:n,...a}=t;return y.createElement(e,{...a,ref:r})}))}const m=t=>{const{tab:r,value:n}=t,{body:a,header:s,notifications:o}=r,l={borderRadius:3,marginBottom:4,padding:[2,4],overflow:"visible"};return e.jsxs(S,{value:n,style:{display:"flex",flexDirection:"column",alignSelf:"stretch"},children:[s&&e.jsx(b,{sx:{...l,backgroundColor:"softblue",padding:[3,5]},children:s}),o&&e.jsx(j,{sx:{...l,padding:0},children:o}),e.jsx(b,{sx:l,children:a})]})};try{m.displayName="SettingsFormTab",m.__docgenInfo={description:"",displayName:"SettingsFormTab",props:{tab:{defaultValue:null,description:"",name:"tab",required:!0,type:{name:"ITab"}},value:{defaultValue:null,description:"",name:"value",required:!0,type:{name:"string"}}}}}catch{}const d=e=>`/settings/${e.toLowerCase()}`,f=t=>{var r;const{currentTab:n,tabs:a}=t,s=L(),o=g(T)` color: grey; cursor: pointer; background-color: transparent; diff --git a/storybook-static/assets/SettingsFormWrapper.stories-v6hPU4bE.js b/storybook-static/assets/SettingsFormWrapper.stories-BcpX7m7t.js similarity index 92% rename from storybook-static/assets/SettingsFormWrapper.stories-v6hPU4bE.js rename to storybook-static/assets/SettingsFormWrapper.stories-BcpX7m7t.js index 99c50cbb06..9cf3ef75d3 100644 --- a/storybook-static/assets/SettingsFormWrapper.stories-v6hPU4bE.js +++ b/storybook-static/assets/SettingsFormWrapper.stories-BcpX7m7t.js @@ -1 +1 @@ -import{j as t}from"./jsx-runtime-CexXSJP5.js";import{S as i}from"./SettingsFormWrapper-wpFJEgrf.js";import{A as o,T as n}from"./theme-ui-components.esm-DCiJ1mMX.js";import"./index-BP8_t0zE.js";import"./TabsList-DhTEw6FA.js";import"./emotion-styled.browser.esm-Dz2BNYeh.js";import"./extends-CF3RwP-h.js";import"./parseProps-780b287c.browser.esm-DiCerVr_.js";import"./emotion-use-insertion-effect-with-fallbacks.browser.esm-UWD3gXM2.js";import"./Icon-BoVZOGVD.js";import"./supporter-D7hp958O.js";import"./icon-arrow-down-CJeToCJe.js";import"./icon-star-active-ClN6U5FF.js";import"./theme-ui-core-jsx-runtime.browser.esm-CH0qhC10.js";import"./hoist-non-react-statics.cjs-CQI8syxn.js";import"./InternalLink-CtyTe3gy.js";import"./components-CutHIkdx.js";import"./index-BBRV8eG_.js";import"./index-BXxqJQdV.js";import"./Select-C5bekj-a.js";import"./defineProperty-Dr9G4DxF.js";import"./typeof-QjJsDpFa.js";import"./objectWithoutPropertiesLoose-CAYKN5F1.js";import"./setPrototypeOf-NYsvoNVB.js";import"./isNativeReflectConstruct-gwnEYaHE.js";import"./emotion-react.browser.esm-BYoRxRk_.js";import"./floating-ui.dom-DtcZXcvp.js";import"./theme-ui-core.browser.esm-CIov4Ln1.js";import"./cjs-Clfm10Kj.js";const G={title:"Forms/SettingsFormWrapper",component:i},r=()=>t.jsxs("div",{style:{maxWidth:"900px",margin:"0 auto"},children:[t.jsx(o,{variant:"failure",sx:{marginBottom:4},children:"Only for initial render - tech debt around routing within storybook"}),t.jsx(i,{tabs:[{title:"Profile",header:t.jsxs(t.Fragment,{children:[t.jsx(n,{as:"h3",children:"\u270f\ufe0f Complete your profile"}),t.jsx(n,{children:"In order to post comments or create content, we'd like you to share something about yourself."})]}),body:t.jsx(t.Fragment,{children:"Form Body 1"}),glyph:"thunderbolt"},{title:"Notifications",body:t.jsx(t.Fragment,{children:"Form Body 2"}),notifications:t.jsx(o,{variant:"success",children:"Nice, all submitted fine."}),glyph:"account-circle"},{title:"Bad",body:t.jsx(t.Fragment,{children:"Form Body 3"}),header:t.jsx(t.Fragment,{children:"Bad thing header"}),notifications:t.jsx(o,{variant:"failure",children:"Problem! Sort it out!"}),glyph:"bazar"}]})]}),e=()=>t.jsx("div",{style:{maxWidth:"900px"},children:t.jsx(i,{tabs:[{title:"Profile",body:t.jsx(t.Fragment,{children:"Anything for the moment"}),header:t.jsx(t.Fragment,{children:"header"}),glyph:"thunderbolt"}]})});var a,s,m,l,d,p;r.parameters={...r.parameters,docs:{...null==(a=r.parameters)?void 0:a.docs,source:{originalSource:"() =>
\n \n Only for initial render - tech debt around routing within storybook\n \n \n \u270f\ufe0f Complete your profile\n \n In order to post comments or create content, we'd like you to\n share something about yourself.\n \n ,\n body: <>Form Body 1,\n glyph: 'thunderbolt'\n }, {\n title: 'Notifications',\n body: <>Form Body 2,\n notifications: Nice, all submitted fine.,\n glyph: 'account-circle'\n }, {\n title: 'Bad',\n body: <>Form Body 3,\n header: <>Bad thing header,\n notifications: Problem! Sort it out!,\n glyph: 'bazar'\n }]} />\n
",...null==(m=null==(s=r.parameters)?void 0:s.docs)?void 0:m.source}}},e.parameters={...e.parameters,docs:{...null==(l=e.parameters)?void 0:l.docs,source:{originalSource:"() =>
\n Anything for the moment,\n header: <>header,\n glyph: 'thunderbolt'\n }]} />\n
",...null==(p=null==(d=e.parameters)?void 0:d.docs)?void 0:p.source}}};const H=["Default","SingleTab"];export{r as Default,e as SingleTab,H as __namedExportsOrder,G as default}; \ No newline at end of file +import{j as t}from"./jsx-runtime-CexXSJP5.js";import{S as i}from"./SettingsFormWrapper-8HI_u4j_.js";import{A as o,T as n}from"./theme-ui-components.esm-BngKL4Rx.js";import"./index-BP8_t0zE.js";import"./TabsList-DhTEw6FA.js";import"./emotion-styled.browser.esm-Dz2BNYeh.js";import"./extends-CF3RwP-h.js";import"./parseProps-780b287c.browser.esm-DiCerVr_.js";import"./emotion-use-insertion-effect-with-fallbacks.browser.esm-UWD3gXM2.js";import"./Icon-BoVZOGVD.js";import"./supporter-D7hp958O.js";import"./icon-arrow-down-CJeToCJe.js";import"./icon-star-active-ClN6U5FF.js";import"./theme-ui-core-jsx-runtime.browser.esm-CH0qhC10.js";import"./hoist-non-react-statics.cjs-CQI8syxn.js";import"./InternalLink-BRM7MvOa.js";import"./components-CutHIkdx.js";import"./index-BBRV8eG_.js";import"./index-BXxqJQdV.js";import"./Select-Jv7oc3OL.js";import"./defineProperty-Dr9G4DxF.js";import"./typeof-QjJsDpFa.js";import"./objectWithoutPropertiesLoose-CAYKN5F1.js";import"./setPrototypeOf-NYsvoNVB.js";import"./isNativeReflectConstruct-gwnEYaHE.js";import"./emotion-react.browser.esm-BYoRxRk_.js";import"./floating-ui.dom-DtcZXcvp.js";import"./theme-ui-core.browser.esm-CIov4Ln1.js";import"./cjs-Clfm10Kj.js";const G={title:"Forms/SettingsFormWrapper",component:i},r=()=>t.jsxs("div",{style:{maxWidth:"900px",margin:"0 auto"},children:[t.jsx(o,{variant:"failure",sx:{marginBottom:4},children:"Only for initial render - tech debt around routing within storybook"}),t.jsx(i,{tabs:[{title:"Profile",header:t.jsxs(t.Fragment,{children:[t.jsx(n,{as:"h3",children:"\u270f\ufe0f Complete your profile"}),t.jsx(n,{children:"In order to post comments or create content, we'd like you to share something about yourself."})]}),body:t.jsx(t.Fragment,{children:"Form Body 1"}),glyph:"thunderbolt"},{title:"Notifications",body:t.jsx(t.Fragment,{children:"Form Body 2"}),notifications:t.jsx(o,{variant:"success",children:"Nice, all submitted fine."}),glyph:"account-circle"},{title:"Bad",body:t.jsx(t.Fragment,{children:"Form Body 3"}),header:t.jsx(t.Fragment,{children:"Bad thing header"}),notifications:t.jsx(o,{variant:"failure",children:"Problem! Sort it out!"}),glyph:"bazar"}]})]}),e=()=>t.jsx("div",{style:{maxWidth:"900px"},children:t.jsx(i,{tabs:[{title:"Profile",body:t.jsx(t.Fragment,{children:"Anything for the moment"}),header:t.jsx(t.Fragment,{children:"header"}),glyph:"thunderbolt"}]})});var a,s,m,l,d,p;r.parameters={...r.parameters,docs:{...null==(a=r.parameters)?void 0:a.docs,source:{originalSource:"() =>
\n \n Only for initial render - tech debt around routing within storybook\n \n \n \u270f\ufe0f Complete your profile\n \n In order to post comments or create content, we'd like you to\n share something about yourself.\n \n ,\n body: <>Form Body 1,\n glyph: 'thunderbolt'\n }, {\n title: 'Notifications',\n body: <>Form Body 2,\n notifications: Nice, all submitted fine.,\n glyph: 'account-circle'\n }, {\n title: 'Bad',\n body: <>Form Body 3,\n header: <>Bad thing header,\n notifications: Problem! Sort it out!,\n glyph: 'bazar'\n }]} />\n
",...null==(m=null==(s=r.parameters)?void 0:s.docs)?void 0:m.source}}},e.parameters={...e.parameters,docs:{...null==(l=e.parameters)?void 0:l.docs,source:{originalSource:"() =>
\n Anything for the moment,\n header: <>header,\n glyph: 'thunderbolt'\n }]} />\n
",...null==(p=null==(d=e.parameters)?void 0:d.docs)?void 0:p.source}}};const H=["Default","SingleTab"];export{r as Default,e as SingleTab,H as __namedExportsOrder,G as default}; \ No newline at end of file diff --git a/storybook-static/assets/SiteFooter-BzW_8Cd0.js b/storybook-static/assets/SiteFooter-BHZy9iC_.js similarity index 93% rename from storybook-static/assets/SiteFooter-BzW_8Cd0.js rename to storybook-static/assets/SiteFooter-BHZy9iC_.js index 54e38d2293..4ff102cf31 100644 --- a/storybook-static/assets/SiteFooter-BzW_8Cd0.js +++ b/storybook-static/assets/SiteFooter-BHZy9iC_.js @@ -1,4 +1,4 @@ -import{j as t}from"./jsx-runtime-CexXSJP5.js";import{n}from"./emotion-styled.browser.esm-Dz2BNYeh.js";import{E as p}from"./ExternalLink-CHmx7fZ7.js";import{I as m}from"./Icon-BoVZOGVD.js";import{F as l,T as i}from"./theme-ui-components.esm-DCiJ1mMX.js";const a=({siteName:e})=>{const r=n(p)` +import{j as t}from"./jsx-runtime-CexXSJP5.js";import{n}from"./emotion-styled.browser.esm-Dz2BNYeh.js";import{E as p}from"./ExternalLink-DC09teyd.js";import{I as m}from"./Icon-BoVZOGVD.js";import{F as l,T as i}from"./theme-ui-components.esm-BngKL4Rx.js";const a=({siteName:e})=>{const r=n(p)` color: #fff; text-decoration: underline; `,o=n(l)` diff --git a/storybook-static/assets/SiteFooter.stories-CHXKX6kl.js b/storybook-static/assets/SiteFooter.stories-DpjBAISR.js similarity index 81% rename from storybook-static/assets/SiteFooter.stories-CHXKX6kl.js rename to storybook-static/assets/SiteFooter.stories-DpjBAISR.js index ff21446e00..e5cd0bf53f 100644 --- a/storybook-static/assets/SiteFooter.stories-CHXKX6kl.js +++ b/storybook-static/assets/SiteFooter.stories-DpjBAISR.js @@ -1 +1 @@ -import{j as s}from"./jsx-runtime-CexXSJP5.js";import{S as i}from"./SiteFooter-BzW_8Cd0.js";import"./index-BP8_t0zE.js";import"./emotion-styled.browser.esm-Dz2BNYeh.js";import"./extends-CF3RwP-h.js";import"./parseProps-780b287c.browser.esm-DiCerVr_.js";import"./emotion-use-insertion-effect-with-fallbacks.browser.esm-UWD3gXM2.js";import"./ExternalLink-CHmx7fZ7.js";import"./theme-ui-components.esm-DCiJ1mMX.js";import"./theme-ui-core-jsx-runtime.browser.esm-CH0qhC10.js";import"./hoist-non-react-statics.cjs-CQI8syxn.js";import"./Icon-BoVZOGVD.js";import"./supporter-D7hp958O.js";import"./icon-arrow-down-CJeToCJe.js";import"./icon-star-active-ClN6U5FF.js";const D={title:"Layout/SiteFooter",component:i},t=()=>s.jsx(i,{siteName:"Precious Plastic"});var o,r,e;t.parameters={...t.parameters,docs:{...null==(o=t.parameters)?void 0:o.docs,source:{originalSource:'() => ',...null==(e=null==(r=t.parameters)?void 0:r.docs)?void 0:e.source}}};const E=["Default"];export{t as Default,E as __namedExportsOrder,D as default}; \ No newline at end of file +import{j as s}from"./jsx-runtime-CexXSJP5.js";import{S as i}from"./SiteFooter-BHZy9iC_.js";import"./index-BP8_t0zE.js";import"./emotion-styled.browser.esm-Dz2BNYeh.js";import"./extends-CF3RwP-h.js";import"./parseProps-780b287c.browser.esm-DiCerVr_.js";import"./emotion-use-insertion-effect-with-fallbacks.browser.esm-UWD3gXM2.js";import"./ExternalLink-DC09teyd.js";import"./theme-ui-components.esm-BngKL4Rx.js";import"./theme-ui-core-jsx-runtime.browser.esm-CH0qhC10.js";import"./hoist-non-react-statics.cjs-CQI8syxn.js";import"./Icon-BoVZOGVD.js";import"./supporter-D7hp958O.js";import"./icon-arrow-down-CJeToCJe.js";import"./icon-star-active-ClN6U5FF.js";const D={title:"Layout/SiteFooter",component:i},t=()=>s.jsx(i,{siteName:"Precious Plastic"});var o,r,e;t.parameters={...t.parameters,docs:{...null==(o=t.parameters)?void 0:o.docs,source:{originalSource:'() => ',...null==(e=null==(r=t.parameters)?void 0:r.docs)?void 0:e.source}}};const E=["Default"];export{t as Default,E as __namedExportsOrder,D as default}; \ No newline at end of file diff --git a/storybook-static/assets/SoundCloud-enihiJES.js b/storybook-static/assets/SoundCloud-yShm5C4b.js similarity index 97% rename from storybook-static/assets/SoundCloud-enihiJES.js rename to storybook-static/assets/SoundCloud-yShm5C4b.js index b8fe778369..e66518e30a 100644 --- a/storybook-static/assets/SoundCloud-enihiJES.js +++ b/storybook-static/assets/SoundCloud-yShm5C4b.js @@ -1 +1 @@ -import{g as P,r as g}from"./index-BP8_t0zE.js";import{u as b,p as v}from"./VideoPlayer-ggRAiP4x.js";function O(e,t){for(var r=0;ro[t]})}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}var S=Object.create,l=Object.defineProperty,w=Object.getOwnPropertyDescriptor,j=Object.getOwnPropertyNames,C=Object.getPrototypeOf,E=Object.prototype.hasOwnProperty,D=(e,t,r)=>t in e?l(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,L=(e,t)=>{for(var r in t)l(e,r,{get:t[r],enumerable:!0})},d=(e,t,r,o)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let s of j(t))!E.call(e,s)&&s!==r&&l(e,s,{get:()=>t[s],enumerable:!(o=w(t,s))||o.enumerable});return e},M=(e,t,r)=>(r=null!=e?S(C(e)):{},d(e&&e.__esModule?r:l(r,"default",{value:e,enumerable:!0}),e)),R=e=>d(l({},"__esModule",{value:!0}),e),a=(e,t,r)=>(D(e,"symbol"!=typeof t?t+"":t,r),r),h={};L(h,{default:()=>u});var f=R(h),p=M(g),c=b,T=v;const N="https://w.soundcloud.com/player/api.js",x="SC";class u extends p.Component{constructor(){super(...arguments),a(this,"callPlayer",c.callPlayer),a(this,"duration",null),a(this,"currentTime",null),a(this,"fractionLoaded",null),a(this,"mute",(()=>{this.setVolume(0)})),a(this,"unmute",(()=>{null!==this.props.volume&&this.setVolume(this.props.volume)})),a(this,"ref",(e=>{this.iframe=e}))}componentDidMount(){this.props.onMount&&this.props.onMount(this)}load(e,t){(0,c.getSDK)(N,x).then((r=>{if(!this.iframe)return;const{PLAY:o,PLAY_PROGRESS:s,PAUSE:a,FINISH:i,ERROR:l}=r.Widget.Events;t||(this.player=r.Widget(this.iframe),this.player.bind(o,this.props.onPlay),this.player.bind(a,(()=>{this.duration-this.currentTime<.05||this.props.onPause()})),this.player.bind(s,(e=>{this.currentTime=e.currentPosition/1e3,this.fractionLoaded=e.loadedProgress})),this.player.bind(i,(()=>this.props.onEnded())),this.player.bind(l,(e=>this.props.onError(e)))),this.player.load(e,{...this.props.config.options,callback:()=>{this.player.getDuration((e=>{this.duration=e/1e3,this.props.onReady()}))}})}))}play(){this.callPlayer("play")}pause(){this.callPlayer("pause")}stop(){}seekTo(e,t=!0){this.callPlayer("seekTo",1e3*e),t||this.pause()}setVolume(e){this.callPlayer("setVolume",100*e)}getDuration(){return this.duration}getCurrentTime(){return this.currentTime}getSecondsLoaded(){return this.fractionLoaded*this.duration}render(){const{display:e}=this.props,t={width:"100%",height:"100%",display:e};return p.default.createElement("iframe",{ref:this.ref,src:`https://w.soundcloud.com/player/?url=${encodeURIComponent(this.props.url)}`,style:t,frameBorder:0,allow:"autoplay"})}}a(u,"displayName","SoundCloud"),a(u,"canPlay",T.canPlay.soundcloud),a(u,"loopOnEnded",!0);const A=P(f),I=O({__proto__:null,default:A},[f]);export{I as S}; \ No newline at end of file +import{g as P,r as g}from"./index-BP8_t0zE.js";import{u as b,p as v}from"./VideoPlayer-DllXxlDZ.js";function O(e,t){for(var r=0;ro[t]})}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}var S=Object.create,l=Object.defineProperty,w=Object.getOwnPropertyDescriptor,j=Object.getOwnPropertyNames,C=Object.getPrototypeOf,E=Object.prototype.hasOwnProperty,D=(e,t,r)=>t in e?l(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,L=(e,t)=>{for(var r in t)l(e,r,{get:t[r],enumerable:!0})},d=(e,t,r,o)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let s of j(t))!E.call(e,s)&&s!==r&&l(e,s,{get:()=>t[s],enumerable:!(o=w(t,s))||o.enumerable});return e},M=(e,t,r)=>(r=null!=e?S(C(e)):{},d(e&&e.__esModule?r:l(r,"default",{value:e,enumerable:!0}),e)),R=e=>d(l({},"__esModule",{value:!0}),e),a=(e,t,r)=>(D(e,"symbol"!=typeof t?t+"":t,r),r),h={};L(h,{default:()=>u});var f=R(h),p=M(g),c=b,T=v;const N="https://w.soundcloud.com/player/api.js",x="SC";class u extends p.Component{constructor(){super(...arguments),a(this,"callPlayer",c.callPlayer),a(this,"duration",null),a(this,"currentTime",null),a(this,"fractionLoaded",null),a(this,"mute",(()=>{this.setVolume(0)})),a(this,"unmute",(()=>{null!==this.props.volume&&this.setVolume(this.props.volume)})),a(this,"ref",(e=>{this.iframe=e}))}componentDidMount(){this.props.onMount&&this.props.onMount(this)}load(e,t){(0,c.getSDK)(N,x).then((r=>{if(!this.iframe)return;const{PLAY:o,PLAY_PROGRESS:s,PAUSE:a,FINISH:i,ERROR:l}=r.Widget.Events;t||(this.player=r.Widget(this.iframe),this.player.bind(o,this.props.onPlay),this.player.bind(a,(()=>{this.duration-this.currentTime<.05||this.props.onPause()})),this.player.bind(s,(e=>{this.currentTime=e.currentPosition/1e3,this.fractionLoaded=e.loadedProgress})),this.player.bind(i,(()=>this.props.onEnded())),this.player.bind(l,(e=>this.props.onError(e)))),this.player.load(e,{...this.props.config.options,callback:()=>{this.player.getDuration((e=>{this.duration=e/1e3,this.props.onReady()}))}})}))}play(){this.callPlayer("play")}pause(){this.callPlayer("pause")}stop(){}seekTo(e,t=!0){this.callPlayer("seekTo",1e3*e),t||this.pause()}setVolume(e){this.callPlayer("setVolume",100*e)}getDuration(){return this.duration}getCurrentTime(){return this.currentTime}getSecondsLoaded(){return this.fractionLoaded*this.duration}render(){const{display:e}=this.props,t={width:"100%",height:"100%",display:e};return p.default.createElement("iframe",{ref:this.ref,src:`https://w.soundcloud.com/player/?url=${encodeURIComponent(this.props.url)}`,style:t,frameBorder:0,allow:"autoplay"})}}a(u,"displayName","SoundCloud"),a(u,"canPlay",T.canPlay.soundcloud),a(u,"loopOnEnded",!0);const A=P(f),I=O({__proto__:null,default:A},[f]);export{I as S}; \ No newline at end of file diff --git a/storybook-static/assets/Streamable-B90qrmSG.js b/storybook-static/assets/Streamable-Dk6kfpDA.js similarity index 97% rename from storybook-static/assets/Streamable-B90qrmSG.js rename to storybook-static/assets/Streamable-Dk6kfpDA.js index 1825eb6ccd..ecf57c60c9 100644 --- a/storybook-static/assets/Streamable-B90qrmSG.js +++ b/storybook-static/assets/Streamable-Dk6kfpDA.js @@ -1 +1 @@ -import{g as m,r as f}from"./index-BP8_t0zE.js";import{u as _,p as b}from"./VideoPlayer-ggRAiP4x.js";function P(e,t){for(var r=0;ro[t]})}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}var g=Object.create,l=Object.defineProperty,v=Object.getOwnPropertyDescriptor,O=Object.getOwnPropertyNames,S=Object.getPrototypeOf,j=Object.prototype.hasOwnProperty,L=(e,t,r)=>t in e?l(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,w=(e,t)=>{for(var r in t)l(e,r,{get:t[r],enumerable:!0})},c=(e,t,r,o)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let s of O(t))!j.call(e,s)&&s!==r&&l(e,s,{get:()=>t[s],enumerable:!(o=v(t,s))||o.enumerable});return e},M=(e,t,r)=>(r=null!=e?g(S(e)):{},c(e&&e.__esModule?r:l(r,"default",{value:e,enumerable:!0}),e)),D=e=>c(l({},"__esModule",{value:!0}),e),o=(e,t,r)=>(L(e,"symbol"!=typeof t?t+"":t,r),r),h={};w(h,{default:()=>n});var y=D(h),p=M(f),u=_,d=b;const E="https://cdn.embed.ly/player-0.1.0.min.js",T="playerjs";class n extends p.Component{constructor(){super(...arguments),o(this,"callPlayer",u.callPlayer),o(this,"duration",null),o(this,"currentTime",null),o(this,"secondsLoaded",null),o(this,"mute",(()=>{this.callPlayer("mute")})),o(this,"unmute",(()=>{this.callPlayer("unmute")})),o(this,"ref",(e=>{this.iframe=e}))}componentDidMount(){this.props.onMount&&this.props.onMount(this)}load(e){(0,u.getSDK)(E,T).then((e=>{this.iframe&&(this.player=new e.Player(this.iframe),this.player.setLoop(this.props.loop),this.player.on("ready",this.props.onReady),this.player.on("play",this.props.onPlay),this.player.on("pause",this.props.onPause),this.player.on("seeked",this.props.onSeek),this.player.on("ended",this.props.onEnded),this.player.on("error",this.props.onError),this.player.on("timeupdate",(({duration:e,seconds:t})=>{this.duration=e,this.currentTime=t})),this.player.on("buffered",(({percent:e})=>{this.duration&&(this.secondsLoaded=this.duration*e)})),this.props.muted&&this.player.mute())}),this.props.onError)}play(){this.callPlayer("play")}pause(){this.callPlayer("pause")}stop(){}seekTo(e,t=!0){this.callPlayer("setCurrentTime",e),t||this.pause()}setVolume(e){this.callPlayer("setVolume",100*e)}setLoop(e){this.callPlayer("setLoop",e)}getDuration(){return this.duration}getCurrentTime(){return this.currentTime}getSecondsLoaded(){return this.secondsLoaded}render(){const e=this.props.url.match(d.MATCH_URL_STREAMABLE)[1];return p.default.createElement("iframe",{ref:this.ref,src:`https://streamable.com/o/${e}`,frameBorder:"0",scrolling:"no",style:{width:"100%",height:"100%"},allow:"encrypted-media; autoplay; fullscreen;"})}}o(n,"displayName","Streamable"),o(n,"canPlay",d.canPlay.streamable);const x=m(y),N=P({__proto__:null,default:x},[y]);export{N as S}; \ No newline at end of file +import{g as m,r as f}from"./index-BP8_t0zE.js";import{u as _,p as b}from"./VideoPlayer-DllXxlDZ.js";function P(e,t){for(var r=0;ro[t]})}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}var g=Object.create,l=Object.defineProperty,v=Object.getOwnPropertyDescriptor,O=Object.getOwnPropertyNames,S=Object.getPrototypeOf,j=Object.prototype.hasOwnProperty,L=(e,t,r)=>t in e?l(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,w=(e,t)=>{for(var r in t)l(e,r,{get:t[r],enumerable:!0})},c=(e,t,r,o)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let s of O(t))!j.call(e,s)&&s!==r&&l(e,s,{get:()=>t[s],enumerable:!(o=v(t,s))||o.enumerable});return e},M=(e,t,r)=>(r=null!=e?g(S(e)):{},c(e&&e.__esModule?r:l(r,"default",{value:e,enumerable:!0}),e)),D=e=>c(l({},"__esModule",{value:!0}),e),o=(e,t,r)=>(L(e,"symbol"!=typeof t?t+"":t,r),r),h={};w(h,{default:()=>n});var y=D(h),p=M(f),u=_,d=b;const E="https://cdn.embed.ly/player-0.1.0.min.js",T="playerjs";class n extends p.Component{constructor(){super(...arguments),o(this,"callPlayer",u.callPlayer),o(this,"duration",null),o(this,"currentTime",null),o(this,"secondsLoaded",null),o(this,"mute",(()=>{this.callPlayer("mute")})),o(this,"unmute",(()=>{this.callPlayer("unmute")})),o(this,"ref",(e=>{this.iframe=e}))}componentDidMount(){this.props.onMount&&this.props.onMount(this)}load(e){(0,u.getSDK)(E,T).then((e=>{this.iframe&&(this.player=new e.Player(this.iframe),this.player.setLoop(this.props.loop),this.player.on("ready",this.props.onReady),this.player.on("play",this.props.onPlay),this.player.on("pause",this.props.onPause),this.player.on("seeked",this.props.onSeek),this.player.on("ended",this.props.onEnded),this.player.on("error",this.props.onError),this.player.on("timeupdate",(({duration:e,seconds:t})=>{this.duration=e,this.currentTime=t})),this.player.on("buffered",(({percent:e})=>{this.duration&&(this.secondsLoaded=this.duration*e)})),this.props.muted&&this.player.mute())}),this.props.onError)}play(){this.callPlayer("play")}pause(){this.callPlayer("pause")}stop(){}seekTo(e,t=!0){this.callPlayer("setCurrentTime",e),t||this.pause()}setVolume(e){this.callPlayer("setVolume",100*e)}setLoop(e){this.callPlayer("setLoop",e)}getDuration(){return this.duration}getCurrentTime(){return this.currentTime}getSecondsLoaded(){return this.secondsLoaded}render(){const e=this.props.url.match(d.MATCH_URL_STREAMABLE)[1];return p.default.createElement("iframe",{ref:this.ref,src:`https://streamable.com/o/${e}`,frameBorder:"0",scrolling:"no",style:{width:"100%",height:"100%"},allow:"encrypted-media; autoplay; fullscreen;"})}}o(n,"displayName","Streamable"),o(n,"canPlay",d.canPlay.streamable);const x=m(y),N=P({__proto__:null,default:x},[y]);export{N as S}; \ No newline at end of file diff --git a/storybook-static/assets/TabbedContent.stories-hD3FnE0b.js b/storybook-static/assets/TabbedContent.stories-DAjm-iwT.js similarity index 97% rename from storybook-static/assets/TabbedContent.stories-hD3FnE0b.js rename to storybook-static/assets/TabbedContent.stories-DAjm-iwT.js index 40d15c4ee4..60d487b1bb 100644 --- a/storybook-static/assets/TabbedContent.stories-hD3FnE0b.js +++ b/storybook-static/assets/TabbedContent.stories-DAjm-iwT.js @@ -1 +1 @@ -import{j as a}from"./jsx-runtime-CexXSJP5.js";import{y as n}from"./index-D_kXk1yT.js";import{T as r,a as e}from"./TabbedContent-CQ_-r_zn.js";import{b as o,c as i}from"./TabsList-DhTEw6FA.js";import{a as T}from"./theme-ui-components.esm-DCiJ1mMX.js";import"./index-BP8_t0zE.js";import"./emotion-styled.browser.esm-Dz2BNYeh.js";import"./extends-CF3RwP-h.js";import"./parseProps-780b287c.browser.esm-DiCerVr_.js";import"./emotion-use-insertion-effect-with-fallbacks.browser.esm-UWD3gXM2.js";import"./theme-ui-core-jsx-runtime.browser.esm-CH0qhC10.js";import"./hoist-non-react-statics.cjs-CQI8syxn.js";const B={title:"Components/TabbedContent"},s=()=>a.jsx(T,{sx:{background:"white",maxWidth:"1000px",margin:"0 auto",padding:6},children:a.jsxs(o,{defaultValue:0,children:[a.jsxs(i,{children:[a.jsx(r,{children:"Tab #1"}),a.jsx(r,{children:"Tab #2"}),a.jsx(r,{children:"Tab #3"}),a.jsx(r,{children:"Tab #4"}),a.jsx(r,{children:"Tab #5"})]}),a.jsxs(e,{children:[a.jsx("p",{children:"Tab Panel #1"}),a.jsx("p",{children:n.lorem.paragraphs(3)})]}),a.jsxs(e,{children:[a.jsx("p",{children:"Tab Panel #2"}),a.jsx("p",{children:n.lorem.paragraphs(3)})]}),a.jsxs(e,{children:[a.jsx("p",{children:"Tab Panel #3"}),a.jsx("p",{children:n.lorem.paragraphs(3)})]}),a.jsxs(e,{children:[a.jsx("p",{children:"Tab Panel #4"}),a.jsx("p",{children:n.lorem.paragraphs(3)})]}),a.jsxs(e,{children:[a.jsx("p",{children:"Tab Panel #5"}),a.jsx("p",{children:n.lorem.paragraphs(3)})]})]})});var p,l,b;s.parameters={...s.parameters,docs:{...null==(p=s.parameters)?void 0:p.docs,source:{originalSource:"() => {\n return \n \n \n Tab #1\n Tab #2\n Tab #3\n Tab #4\n Tab #5\n \n\n \n

Tab Panel #1

\n

{faker.lorem.paragraphs(3)}

\n
\n \n

Tab Panel #2

\n

{faker.lorem.paragraphs(3)}

\n
\n \n

Tab Panel #3

\n

{faker.lorem.paragraphs(3)}

\n
\n \n

Tab Panel #4

\n

{faker.lorem.paragraphs(3)}

\n
\n \n

Tab Panel #5

\n

{faker.lorem.paragraphs(3)}

\n
\n
\n
;\n}",...null==(b=null==(l=s.parameters)?void 0:l.docs)?void 0:b.source}}};const C=["Default"];export{s as Default,C as __namedExportsOrder,B as default}; \ No newline at end of file +import{j as a}from"./jsx-runtime-CexXSJP5.js";import{y as n}from"./index-D_kXk1yT.js";import{T as r,a as e}from"./TabbedContent-CQ_-r_zn.js";import{b as o,c as i}from"./TabsList-DhTEw6FA.js";import{a as T}from"./theme-ui-components.esm-BngKL4Rx.js";import"./index-BP8_t0zE.js";import"./emotion-styled.browser.esm-Dz2BNYeh.js";import"./extends-CF3RwP-h.js";import"./parseProps-780b287c.browser.esm-DiCerVr_.js";import"./emotion-use-insertion-effect-with-fallbacks.browser.esm-UWD3gXM2.js";import"./theme-ui-core-jsx-runtime.browser.esm-CH0qhC10.js";import"./hoist-non-react-statics.cjs-CQI8syxn.js";const B={title:"Components/TabbedContent"},s=()=>a.jsx(T,{sx:{background:"white",maxWidth:"1000px",margin:"0 auto",padding:6},children:a.jsxs(o,{defaultValue:0,children:[a.jsxs(i,{children:[a.jsx(r,{children:"Tab #1"}),a.jsx(r,{children:"Tab #2"}),a.jsx(r,{children:"Tab #3"}),a.jsx(r,{children:"Tab #4"}),a.jsx(r,{children:"Tab #5"})]}),a.jsxs(e,{children:[a.jsx("p",{children:"Tab Panel #1"}),a.jsx("p",{children:n.lorem.paragraphs(3)})]}),a.jsxs(e,{children:[a.jsx("p",{children:"Tab Panel #2"}),a.jsx("p",{children:n.lorem.paragraphs(3)})]}),a.jsxs(e,{children:[a.jsx("p",{children:"Tab Panel #3"}),a.jsx("p",{children:n.lorem.paragraphs(3)})]}),a.jsxs(e,{children:[a.jsx("p",{children:"Tab Panel #4"}),a.jsx("p",{children:n.lorem.paragraphs(3)})]}),a.jsxs(e,{children:[a.jsx("p",{children:"Tab Panel #5"}),a.jsx("p",{children:n.lorem.paragraphs(3)})]})]})});var p,l,b;s.parameters={...s.parameters,docs:{...null==(p=s.parameters)?void 0:p.docs,source:{originalSource:"() => {\n return \n \n \n Tab #1\n Tab #2\n Tab #3\n Tab #4\n Tab #5\n \n\n \n

Tab Panel #1

\n

{faker.lorem.paragraphs(3)}

\n
\n \n

Tab Panel #2

\n

{faker.lorem.paragraphs(3)}

\n
\n \n

Tab Panel #3

\n

{faker.lorem.paragraphs(3)}

\n
\n \n

Tab Panel #4

\n

{faker.lorem.paragraphs(3)}

\n
\n \n

Tab Panel #5

\n

{faker.lorem.paragraphs(3)}

\n
\n
\n
;\n}",...null==(b=null==(l=s.parameters)?void 0:l.docs)?void 0:b.source}}};const C=["Default"];export{s as Default,C as __namedExportsOrder,B as default}; \ No newline at end of file diff --git a/storybook-static/assets/Tag-Dzxf5qoT.js b/storybook-static/assets/Tag-BuO8hjpj.js similarity index 87% rename from storybook-static/assets/Tag-Dzxf5qoT.js rename to storybook-static/assets/Tag-BuO8hjpj.js index f606f1e294..545524e562 100644 --- a/storybook-static/assets/Tag-Dzxf5qoT.js +++ b/storybook-static/assets/Tag-BuO8hjpj.js @@ -1 +1 @@ -import{j as a}from"./jsx-runtime-CexXSJP5.js";import{T as l}from"./theme-ui-components.esm-DCiJ1mMX.js";const r=({tag:e,sx:t})=>e&&e.label?a.jsx(l,{sx:{fontSize:1,color:"blue",...t,"::before":{content:'"#"'}},children:e.label}):null;try{r.displayName="Tag",r.__docgenInfo={description:"",displayName:"Tag",props:{tag:{defaultValue:null,description:"",name:"tag",required:!0,type:{name:"ITag"}},sx:{defaultValue:null,description:"",name:"sx",required:!1,type:{name:"ThemeUIStyleObject"}}}}}catch{}export{r as T}; \ No newline at end of file +import{j as a}from"./jsx-runtime-CexXSJP5.js";import{T as l}from"./theme-ui-components.esm-BngKL4Rx.js";const r=({tag:e,sx:t})=>e&&e.label?a.jsx(l,{sx:{fontSize:1,color:"blue",...t,"::before":{content:'"#"'}},children:e.label}):null;try{r.displayName="Tag",r.__docgenInfo={description:"",displayName:"Tag",props:{tag:{defaultValue:null,description:"",name:"tag",required:!0,type:{name:"ITag"}},sx:{defaultValue:null,description:"",name:"sx",required:!1,type:{name:"ThemeUIStyleObject"}}}}}catch{}export{r as T}; \ No newline at end of file diff --git a/storybook-static/assets/Tag.stories--XPK_NY1.js b/storybook-static/assets/Tag.stories-Dud28Iz9.js similarity index 83% rename from storybook-static/assets/Tag.stories--XPK_NY1.js rename to storybook-static/assets/Tag.stories-Dud28Iz9.js index 7b87062840..09cbe9a465 100644 --- a/storybook-static/assets/Tag.stories--XPK_NY1.js +++ b/storybook-static/assets/Tag.stories-Dud28Iz9.js @@ -1 +1 @@ -import{j as s}from"./jsx-runtime-CexXSJP5.js";import{T as e}from"./Tag-Dzxf5qoT.js";import"./index-BP8_t0zE.js";import"./theme-ui-components.esm-DCiJ1mMX.js";import"./parseProps-780b287c.browser.esm-DiCerVr_.js";import"./emotion-use-insertion-effect-with-fallbacks.browser.esm-UWD3gXM2.js";import"./theme-ui-core-jsx-runtime.browser.esm-CH0qhC10.js";import"./hoist-non-react-statics.cjs-CQI8syxn.js";const d={title:"Components/Tag",component:e},t=()=>s.jsx(e,{tag:{label:"Label"}});var o,r,a;t.parameters={...t.parameters,docs:{...null==(o=t.parameters)?void 0:o.docs,source:{originalSource:"() => ",...null==(a=null==(r=t.parameters)?void 0:r.docs)?void 0:a.source}}};const f=["Default"];export{t as Default,f as __namedExportsOrder,d as default}; \ No newline at end of file +import{j as s}from"./jsx-runtime-CexXSJP5.js";import{T as e}from"./Tag-BuO8hjpj.js";import"./index-BP8_t0zE.js";import"./theme-ui-components.esm-BngKL4Rx.js";import"./parseProps-780b287c.browser.esm-DiCerVr_.js";import"./emotion-use-insertion-effect-with-fallbacks.browser.esm-UWD3gXM2.js";import"./theme-ui-core-jsx-runtime.browser.esm-CH0qhC10.js";import"./hoist-non-react-statics.cjs-CQI8syxn.js";const d={title:"Components/Tag",component:e},t=()=>s.jsx(e,{tag:{label:"Label"}});var o,r,a;t.parameters={...t.parameters,docs:{...null==(o=t.parameters)?void 0:o.docs,source:{originalSource:"() => ",...null==(a=null==(r=t.parameters)?void 0:r.docs)?void 0:a.source}}};const f=["Default"];export{t as Default,f as __namedExportsOrder,d as default}; \ No newline at end of file diff --git a/storybook-static/assets/TagList-C0eLtcDO.js b/storybook-static/assets/TagList-azY_z3G0.js similarity index 72% rename from storybook-static/assets/TagList-C0eLtcDO.js rename to storybook-static/assets/TagList-azY_z3G0.js index 67cb88675c..2b9a2fba1e 100644 --- a/storybook-static/assets/TagList-C0eLtcDO.js +++ b/storybook-static/assets/TagList-azY_z3G0.js @@ -1 +1 @@ -import{j as e}from"./jsx-runtime-CexXSJP5.js";import{T as s}from"./Tag-Dzxf5qoT.js";import{F as i}from"./theme-ui-components.esm-DCiJ1mMX.js";const r=({tags:a})=>e.jsx(i,{sx:{gap:1},"data-cy":"tag-list",children:a.filter((a=>!!a)).map((a=>e.jsx(s,{tag:a},a.label)))});try{r.displayName="TagList",r.__docgenInfo={description:"",displayName:"TagList",props:{tags:{defaultValue:null,description:"",name:"tags",required:!0,type:{name:"ITag[]"}}}}}catch{}export{r as T}; \ No newline at end of file +import{j as e}from"./jsx-runtime-CexXSJP5.js";import{T as s}from"./Tag-BuO8hjpj.js";import{F as i}from"./theme-ui-components.esm-BngKL4Rx.js";const r=({tags:a})=>e.jsx(i,{sx:{gap:1},"data-cy":"tag-list",children:a.filter((a=>!!a)).map((a=>e.jsx(s,{tag:a},a.label)))});try{r.displayName="TagList",r.__docgenInfo={description:"",displayName:"TagList",props:{tags:{defaultValue:null,description:"",name:"tags",required:!0,type:{name:"ITag[]"}}}}}catch{}export{r as T}; \ No newline at end of file diff --git a/storybook-static/assets/TagList.stories-DjedbwFZ.js b/storybook-static/assets/TagList.stories-PSzJp3qC.js similarity index 85% rename from storybook-static/assets/TagList.stories-DjedbwFZ.js rename to storybook-static/assets/TagList.stories-PSzJp3qC.js index 4d43cbbb74..d750dbc7c6 100644 --- a/storybook-static/assets/TagList.stories-DjedbwFZ.js +++ b/storybook-static/assets/TagList.stories-PSzJp3qC.js @@ -1 +1 @@ -import{j as e}from"./jsx-runtime-CexXSJP5.js";import{T as s}from"./TagList-C0eLtcDO.js";import"./index-BP8_t0zE.js";import"./Tag-Dzxf5qoT.js";import"./theme-ui-components.esm-DCiJ1mMX.js";import"./parseProps-780b287c.browser.esm-DiCerVr_.js";import"./emotion-use-insertion-effect-with-fallbacks.browser.esm-UWD3gXM2.js";import"./theme-ui-core-jsx-runtime.browser.esm-CH0qhC10.js";import"./hoist-non-react-statics.cjs-CQI8syxn.js";const d={title:"Components/TagList",component:s},t=()=>e.jsx(s,{tags:[{label:"Tag 1"},{label:"Tag 2"}]});var a,o,r;t.parameters={...t.parameters,docs:{...null==(a=t.parameters)?void 0:a.docs,source:{originalSource:"() => ",...null==(r=null==(o=t.parameters)?void 0:o.docs)?void 0:r.source}}};const f=["Default"];export{t as Default,f as __namedExportsOrder,d as default}; \ No newline at end of file +import{j as e}from"./jsx-runtime-CexXSJP5.js";import{T as s}from"./TagList-azY_z3G0.js";import"./index-BP8_t0zE.js";import"./Tag-BuO8hjpj.js";import"./theme-ui-components.esm-BngKL4Rx.js";import"./parseProps-780b287c.browser.esm-DiCerVr_.js";import"./emotion-use-insertion-effect-with-fallbacks.browser.esm-UWD3gXM2.js";import"./theme-ui-core-jsx-runtime.browser.esm-CH0qhC10.js";import"./hoist-non-react-statics.cjs-CQI8syxn.js";const d={title:"Components/TagList",component:s},t=()=>e.jsx(s,{tags:[{label:"Tag 1"},{label:"Tag 2"}]});var a,o,r;t.parameters={...t.parameters,docs:{...null==(a=t.parameters)?void 0:a.docs,source:{originalSource:"() => ",...null==(r=null==(o=t.parameters)?void 0:o.docs)?void 0:r.source}}};const f=["Default"];export{t as Default,f as __namedExportsOrder,d as default}; \ No newline at end of file diff --git a/storybook-static/assets/Text.stories--48DIG4W.js b/storybook-static/assets/Text.stories-CV98I21z.js similarity index 94% rename from storybook-static/assets/Text.stories--48DIG4W.js rename to storybook-static/assets/Text.stories-CV98I21z.js index dcebeaaa15..1811e76d0f 100644 --- a/storybook-static/assets/Text.stories--48DIG4W.js +++ b/storybook-static/assets/Text.stories-CV98I21z.js @@ -1 +1 @@ -import{j as c}from"./jsx-runtime-CexXSJP5.js";import{y as n}from"./index-D_kXk1yT.js";import{T as t}from"./theme-ui-components.esm-DCiJ1mMX.js";import"./index-BP8_t0zE.js";import"./parseProps-780b287c.browser.esm-DiCerVr_.js";import"./emotion-use-insertion-effect-with-fallbacks.browser.esm-UWD3gXM2.js";import"./theme-ui-core-jsx-runtime.browser.esm-CH0qhC10.js";import"./hoist-non-react-statics.cjs-CQI8syxn.js";const j={title:"Components/Text",component:t},r=()=>c.jsx(t,{children:n.lorem.paragraphs(3)}),e=()=>c.jsx(t,{variant:"quiet",children:n.lorem.paragraphs(3)});var a,o,s,p,m,i;r.parameters={...r.parameters,docs:{...null==(a=r.parameters)?void 0:a.docs,source:{originalSource:"() => {faker.lorem.paragraphs(3)}",...null==(s=null==(o=r.parameters)?void 0:o.docs)?void 0:s.source}}},e.parameters={...e.parameters,docs:{...null==(p=e.parameters)?void 0:p.docs,source:{originalSource:'() => {faker.lorem.paragraphs(3)}',...null==(i=null==(m=e.parameters)?void 0:m.docs)?void 0:i.source}}};const _=["Default","Quiet"];export{r as Default,e as Quiet,_ as __namedExportsOrder,j as default}; \ No newline at end of file +import{j as c}from"./jsx-runtime-CexXSJP5.js";import{y as n}from"./index-D_kXk1yT.js";import{T as t}from"./theme-ui-components.esm-BngKL4Rx.js";import"./index-BP8_t0zE.js";import"./parseProps-780b287c.browser.esm-DiCerVr_.js";import"./emotion-use-insertion-effect-with-fallbacks.browser.esm-UWD3gXM2.js";import"./theme-ui-core-jsx-runtime.browser.esm-CH0qhC10.js";import"./hoist-non-react-statics.cjs-CQI8syxn.js";const j={title:"Components/Text",component:t},r=()=>c.jsx(t,{children:n.lorem.paragraphs(3)}),e=()=>c.jsx(t,{variant:"quiet",children:n.lorem.paragraphs(3)});var a,o,s,p,m,i;r.parameters={...r.parameters,docs:{...null==(a=r.parameters)?void 0:a.docs,source:{originalSource:"() => {faker.lorem.paragraphs(3)}",...null==(s=null==(o=r.parameters)?void 0:o.docs)?void 0:s.source}}},e.parameters={...e.parameters,docs:{...null==(p=e.parameters)?void 0:p.docs,source:{originalSource:'() => {faker.lorem.paragraphs(3)}',...null==(i=null==(m=e.parameters)?void 0:m.docs)?void 0:i.source}}};const _=["Default","Quiet"];export{r as Default,e as Quiet,_ as __namedExportsOrder,j as default}; \ No newline at end of file diff --git a/storybook-static/assets/TextNotification-TOi5P2Z0.js b/storybook-static/assets/TextNotification-CHRBxPd1.js similarity index 93% rename from storybook-static/assets/TextNotification-TOi5P2Z0.js rename to storybook-static/assets/TextNotification-CHRBxPd1.js index 9ecd41c073..2e55ec2dae 100644 --- a/storybook-static/assets/TextNotification-TOi5P2Z0.js +++ b/storybook-static/assets/TextNotification-CHRBxPd1.js @@ -1 +1 @@ -import{j as i}from"./jsx-runtime-CexXSJP5.js";import{k as a}from"./emotion-react.browser.esm-BYoRxRk_.js";import{A as s,f as n}from"./theme-ui-components.esm-DCiJ1mMX.js";const r=a({from:{opacity:0,transform:"translateY(-50%)"},to:{opacity:1}}),t=e=>e.isVisible?i.jsxs(s,{variant:e.variant,"data-cy":`TextNotification: ${e.variant}`,sx:{width:"100%",animation:`${r} ease-out 400ms both 200ms`},children:[e.children,e.onDismiss&&i.jsx(n,{sx:{position:"absolute",top:"50%",right:2,transform:"translateY(-50%)",cursor:"pointer"},onClick:()=>e.onDismiss(!1)})]}):i.jsx(i.Fragment,{});try{t.displayName="TextNotification",t.__docgenInfo={description:"",displayName:"TextNotification",props:{variant:{defaultValue:null,description:"",name:"variant",required:!0,type:{name:"enum",value:[{value:'"success"'},{value:'"failure"'}]}},isVisible:{defaultValue:null,description:"",name:"isVisible",required:!0,type:{name:"boolean"}},onDismiss:{defaultValue:null,description:"",name:"onDismiss",required:!1,type:{name:"any"}}}}}catch{}export{t as T}; \ No newline at end of file +import{j as i}from"./jsx-runtime-CexXSJP5.js";import{k as a}from"./emotion-react.browser.esm-BYoRxRk_.js";import{A as s,f as n}from"./theme-ui-components.esm-BngKL4Rx.js";const r=a({from:{opacity:0,transform:"translateY(-50%)"},to:{opacity:1}}),t=e=>e.isVisible?i.jsxs(s,{variant:e.variant,"data-cy":`TextNotification: ${e.variant}`,sx:{width:"100%",animation:`${r} ease-out 400ms both 200ms`},children:[e.children,e.onDismiss&&i.jsx(n,{sx:{position:"absolute",top:"50%",right:2,transform:"translateY(-50%)",cursor:"pointer"},onClick:()=>e.onDismiss(!1)})]}):i.jsx(i.Fragment,{});try{t.displayName="TextNotification",t.__docgenInfo={description:"",displayName:"TextNotification",props:{variant:{defaultValue:null,description:"",name:"variant",required:!0,type:{name:"enum",value:[{value:'"success"'},{value:'"failure"'}]}},isVisible:{defaultValue:null,description:"",name:"isVisible",required:!0,type:{name:"boolean"}},onDismiss:{defaultValue:null,description:"",name:"onDismiss",required:!1,type:{name:"any"}}}}}catch{}export{t as T}; \ No newline at end of file diff --git a/storybook-static/assets/TextNotification.stories-DHnvNerz.js b/storybook-static/assets/TextNotification.stories-Dk3q_AuJ.js similarity index 90% rename from storybook-static/assets/TextNotification.stories-DHnvNerz.js rename to storybook-static/assets/TextNotification.stories-Dk3q_AuJ.js index 3c86deb9b1..c92d93fe47 100644 --- a/storybook-static/assets/TextNotification.stories-DHnvNerz.js +++ b/storybook-static/assets/TextNotification.stories-Dk3q_AuJ.js @@ -1 +1 @@ -import{j as r}from"./jsx-runtime-CexXSJP5.js";import{r as b}from"./index-BP8_t0zE.js";import{T as e}from"./TextNotification-TOi5P2Z0.js";import"./emotion-react.browser.esm-BYoRxRk_.js";import"./parseProps-780b287c.browser.esm-DiCerVr_.js";import"./emotion-use-insertion-effect-with-fallbacks.browser.esm-UWD3gXM2.js";import"./hoist-non-react-statics.cjs-CQI8syxn.js";import"./theme-ui-components.esm-DCiJ1mMX.js";import"./theme-ui-core-jsx-runtime.browser.esm-CH0qhC10.js";const E={title:"Layout/TextNotification",component:e},i=()=>r.jsx(e,{variant:"success",isVisible:!0,children:"A short snappy notification"}),s=()=>{const[s,i]=b.useState(!0);return r.jsx(e,{variant:"success",isVisible:s,onDismiss:i,children:"A short snappy notification"})},t=()=>r.jsx(e,{variant:"failure",isVisible:!0,children:"A short snappy notification"});var o,a,n,c,p,u,m,l,f;i.parameters={...i.parameters,docs:{...null==(o=i.parameters)?void 0:o.docs,source:{originalSource:'() => \n A short snappy notification\n ',...null==(n=null==(a=i.parameters)?void 0:a.docs)?void 0:n.source}}},s.parameters={...s.parameters,docs:{...null==(c=s.parameters)?void 0:c.docs,source:{originalSource:'() => {\n const [visible, setVisibility] = useState(true);\n return \n A short snappy notification\n ;\n}',...null==(u=null==(p=s.parameters)?void 0:p.docs)?void 0:u.source}}},t.parameters={...t.parameters,docs:{...null==(m=t.parameters)?void 0:m.docs,source:{originalSource:'() => \n A short snappy notification\n ',...null==(f=null==(l=t.parameters)?void 0:l.docs)?void 0:f.source}}};const D=["Success","SuccessDismissable","Error"];export{t as Error,i as Success,s as SuccessDismissable,D as __namedExportsOrder,E as default}; \ No newline at end of file +import{j as r}from"./jsx-runtime-CexXSJP5.js";import{r as b}from"./index-BP8_t0zE.js";import{T as e}from"./TextNotification-CHRBxPd1.js";import"./emotion-react.browser.esm-BYoRxRk_.js";import"./parseProps-780b287c.browser.esm-DiCerVr_.js";import"./emotion-use-insertion-effect-with-fallbacks.browser.esm-UWD3gXM2.js";import"./hoist-non-react-statics.cjs-CQI8syxn.js";import"./theme-ui-components.esm-BngKL4Rx.js";import"./theme-ui-core-jsx-runtime.browser.esm-CH0qhC10.js";const E={title:"Layout/TextNotification",component:e},i=()=>r.jsx(e,{variant:"success",isVisible:!0,children:"A short snappy notification"}),s=()=>{const[s,i]=b.useState(!0);return r.jsx(e,{variant:"success",isVisible:s,onDismiss:i,children:"A short snappy notification"})},t=()=>r.jsx(e,{variant:"failure",isVisible:!0,children:"A short snappy notification"});var o,a,n,c,p,u,m,l,f;i.parameters={...i.parameters,docs:{...null==(o=i.parameters)?void 0:o.docs,source:{originalSource:'() => \n A short snappy notification\n ',...null==(n=null==(a=i.parameters)?void 0:a.docs)?void 0:n.source}}},s.parameters={...s.parameters,docs:{...null==(c=s.parameters)?void 0:c.docs,source:{originalSource:'() => {\n const [visible, setVisibility] = useState(true);\n return \n A short snappy notification\n ;\n}',...null==(u=null==(p=s.parameters)?void 0:p.docs)?void 0:u.source}}},t.parameters={...t.parameters,docs:{...null==(m=t.parameters)?void 0:m.docs,source:{originalSource:'() => \n A short snappy notification\n ',...null==(f=null==(l=t.parameters)?void 0:l.docs)?void 0:f.source}}};const D=["Success","SuccessDismissable","Error"];export{t as Error,i as Success,s as SuccessDismissable,D as __namedExportsOrder,E as default}; \ No newline at end of file diff --git a/storybook-static/assets/Textarea.stories-BJ5u_oiF.js b/storybook-static/assets/Textarea.stories-DjC1cr2u.js similarity index 91% rename from storybook-static/assets/Textarea.stories-BJ5u_oiF.js rename to storybook-static/assets/Textarea.stories-DjC1cr2u.js index d908a75cc5..e7b27a07f1 100644 --- a/storybook-static/assets/Textarea.stories-BJ5u_oiF.js +++ b/storybook-static/assets/Textarea.stories-DjC1cr2u.js @@ -1 +1 @@ -import{j as s}from"./jsx-runtime-CexXSJP5.js";import{b as a}from"./theme-ui-components.esm-DCiJ1mMX.js";import"./index-BP8_t0zE.js";import"./parseProps-780b287c.browser.esm-DiCerVr_.js";import"./emotion-use-insertion-effect-with-fallbacks.browser.esm-UWD3gXM2.js";import"./theme-ui-core-jsx-runtime.browser.esm-CH0qhC10.js";import"./hoist-non-react-statics.cjs-CQI8syxn.js";const n={title:"Forms/Textarea",component:a},r=()=>s.jsx(a,{placeholder:"A short placeholder"});var e,o,t;r.parameters={...r.parameters,docs:{...null==(e=r.parameters)?void 0:e.docs,source:{originalSource:'() =>