Skip to content

Commit 4cf88d6

Browse files
author
github-actions[bot]
committed
Update: a45406f60b97b5d76b39174dc27d5486622b6cac
1 parent 580310e commit 4cf88d6

10 files changed

Lines changed: 15 additions & 15 deletions
Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ import{j as e}from"./jsx-runtime-CLpGMVip.js";import{n as h}from"./emotion-style
9393
ul li pre {
9494
white-space: pre-line;
9595
}
96-
`,x=l=>{var j;const{t:r}=S(),{variant:O="text",error:v}=l,i=v,[s,m]=f.useState(void 0);if(f.useEffect(()=>{if(typeof i=="object"&&i!==null&&i.data instanceof Blob)i.data.text().then(n=>{try{const o=JSON.parse(n);m({...i,data:o})}catch{m({...i,data:n})}});else{if(i===void 0)throw new Error("Invalid input");m(i)}},[i]),s===void 0)return e.jsx(k,{variant:"medium"});if(typeof s=="string")return e.jsx(d,{children:e.jsx(c,{children:e.jsxs(a,{children:[e.jsx("h2",{children:r("error-title")}),e.jsx("p",{children:s})]})})});if(typeof s=="object"&&s!==null)if(T(s.data)){const t=s.data,n=t.data;let o=e.jsx(e.Fragment,{});if(E(n)){const _=window.location.href.replace(location.hash,"");o=e.jsx("a",{href:`${_}#${n.block_id}`,children:r("go-to-error")})}return e.jsx(d,{children:e.jsxs(c,{children:[e.jsxs(a,{children:[e.jsxs("h2",{children:[r("error-title")," ",s.status,": ",t.title]}),e.jsx("p",{children:t.message})]}),e.jsx(p,{children:t.source&&e.jsxs("details",{children:[e.jsx("summary",{children:r("show-error-source")}),e.jsx("ul",{children:e.jsx("li",{children:e.jsx("pre",{children:t.source})})})]})}),t.data&&e.jsx(a,{children:o})]})})}else if(s.isAxiosError){const t=s,n=(j=t.response)==null?void 0:j.data,o=typeof n=="object"&&n!==null&&"message"in n?n.message:void 0;return e.jsx(d,{children:e.jsxs(c,{children:[e.jsxs(a,{children:[e.jsxs("h2",{children:[r("error-title"),": ",t.message]}),o&&e.jsx("p",{children:o})]}),e.jsx(p,{children:!!n&&e.jsxs("details",{children:[e.jsx("summary",{children:r("show-error-source")}),e.jsx("ul",{children:e.jsx("li",{children:e.jsx("pre",{children:JSON.stringify(n,void 0,2)})})})]})})]})})}else{if(s.status!==void 0&&s.statusText!==void 0&&typeof s.request=="object"&&s.request.responseURL!==void 0)return e.jsx(d,{children:e.jsxs(c,{children:[e.jsxs(a,{children:[e.jsxs("h2",{children:[r("error-title")," ",s.status,": ",s.statusText]}),e.jsx("p",{children:s.request.responseURL})]}),e.jsx(p,{children:s.data&&e.jsxs("details",{children:[e.jsx("summary",{children:r("show-error-source")}),e.jsx("ul",{children:e.jsx("li",{children:e.jsx("pre",{children:JSON.stringify(s.data,void 0,2)})})})]})})]})});if(s instanceof Error)return e.jsx(d,{children:e.jsxs(c,{children:[e.jsx(a,{children:e.jsxs("h2",{children:[r("error-title"),s.message&&`: ${s.message}`]})}),e.jsx(p,{children:e.jsxs("details",{children:[e.jsx("summary",{children:r("show-error-source")}),e.jsx("ul",{children:e.jsx("li",{children:e.jsxs("pre",{children:[s.toString(),e.jsx("br",{}),s.stack]})})})]})})]})})}return e.jsx(d,{children:e.jsxs(c,{children:[e.jsx(a,{children:e.jsx("h2",{children:r("error-title")})}),e.jsx(p,{children:e.jsxs("details",{children:[e.jsx("summary",{children:r("show-error-source")}),e.jsx("ul",{children:e.jsx("li",{children:e.jsx("pre",{children:JSON.stringify(s,void 0,2)})})})]})})]})})};try{x.displayName="ErrorBanner",x.__docgenInfo={description:"",displayName:"ErrorBanner",props:{variant:{defaultValue:null,description:"",name:"variant",required:!1,type:{name:"enum",value:[{value:'"link"'},{value:'"text"'},{value:'"readOnly"'}]}},error:{defaultValue:null,description:"",name:"error",required:!0,type:{name:"unknown"}}}}}catch{}const U={component:x,parameters:{docs:{description:{component:"Use this component to display an error banner. The error can be either a string or an Error object."}}}},u={args:{error:"This is an error message."}};var y,b,w;u.parameters={...u.parameters,docs:{...(y=u.parameters)==null?void 0:y.docs,source:{originalSource:`{
96+
`,x=l=>{var j;const{t:r}=S(),{variant:O="text",error:v}=l,i=v,[s,m]=f.useState(void 0);if(f.useEffect(()=>{if(typeof i=="object"&&i!==null&&i.data instanceof Blob)i.data.text().then(n=>{try{const o=JSON.parse(n);m({...i,data:o})}catch{m({...i,data:n})}});else{if(i===void 0)throw new Error("Invalid input");m(i)}},[i]),s===void 0)return e.jsx(k,{variant:"medium"});if(typeof s=="string")return e.jsx(d,{children:e.jsx(c,{children:e.jsxs(a,{children:[e.jsx("h2",{children:r("error-title")}),e.jsx("p",{children:s})]})})});if(typeof s=="object"&&s!==null)if(T(s.data)){const t=s.data,n=t.data;let o=e.jsx(e.Fragment,{});if(E(n)){const _=window.location.href.replace(location.hash,"");o=e.jsx("a",{href:`${_}#${n.block_id}`,children:r("go-to-error")})}return e.jsx(d,{children:e.jsxs(c,{children:[e.jsxs(a,{children:[e.jsxs("h2",{children:[r("error-title")," ",s.status,": ",t.title]}),e.jsx("p",{children:t.message})]}),e.jsx(p,{children:t.source&&e.jsxs("details",{children:[e.jsx("summary",{children:r("show-error-source")}),e.jsx("ul",{children:e.jsx("li",{children:e.jsx("pre",{children:t.source})})})]})}),t.data&&e.jsx(a,{children:o})]})})}else if(s.isAxiosError){const t=s,n=(j=t.response)==null?void 0:j.data,o=typeof n=="object"&&n!==null&&"message"in n?n.message:void 0;return e.jsx(d,{children:e.jsxs(c,{children:[e.jsxs(a,{children:[e.jsxs("h2",{children:[r("error-title"),": ",t.message]}),o&&e.jsx("p",{children:o})]}),e.jsx(p,{children:!!n&&e.jsxs("details",{children:[e.jsx("summary",{children:r("show-error-source")}),e.jsx("ul",{children:e.jsx("li",{children:e.jsx("pre",{children:JSON.stringify(n,void 0,2)})})})]})})]})})}else{if(s.status!==void 0&&s.statusText!==void 0&&typeof s.request=="object"&&s.request.responseURL!==void 0)return e.jsx(d,{children:e.jsxs(c,{children:[e.jsxs(a,{children:[e.jsxs("h2",{children:[r("error-title")," ",s.status,": ",s.statusText]}),e.jsx("p",{children:s.request.responseURL})]}),e.jsx(p,{children:s.data&&e.jsxs("details",{children:[e.jsx("summary",{children:r("show-error-source")}),e.jsx("ul",{children:e.jsx("li",{children:e.jsx("pre",{children:JSON.stringify(s.data,void 0,2)})})})]})})]})});if(s instanceof Error)return e.jsx(d,{children:e.jsxs(c,{children:[e.jsx(a,{children:e.jsxs("h2",{children:[r("error-title"),s.message&&`: ${s.message}`]})}),e.jsx(p,{children:e.jsxs("details",{children:[e.jsx("summary",{children:r("show-error-source")}),e.jsx("ul",{children:e.jsx("li",{children:e.jsxs("pre",{children:[s.toString(),e.jsx("br",{}),s.stack]})})})]})})]})})}return e.jsx(d,{children:e.jsxs(c,{children:[e.jsx(a,{children:e.jsx("h2",{children:r("error-title")})}),e.jsx(p,{children:e.jsxs("details",{children:[e.jsx("summary",{children:r("show-error-source")}),e.jsx("ul",{children:e.jsx("li",{children:e.jsx("pre",{children:JSON.stringify(s,void 0,2)})})})]})})]})})};try{x.displayName="ErrorBanner",x.__docgenInfo={description:"",displayName:"ErrorBanner",props:{variant:{defaultValue:null,description:"",name:"variant",required:!1,type:{name:"enum",value:[{value:'"readOnly"'},{value:'"text"'},{value:'"link"'}]}},error:{defaultValue:null,description:"",name:"error",required:!0,type:{name:"unknown"}}}}}catch{}const U={component:x,parameters:{docs:{description:{component:"Use this component to display an error banner. The error can be either a string or an Error object."}}}},u={args:{error:"This is an error message."}};var y,b,w;u.parameters={...u.parameters,docs:{...(y=u.parameters)==null?void 0:y.docs,source:{originalSource:`{
9797
args: {
9898
error: "This is an error message."
9999
}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ import{j as l}from"./jsx-runtime-CLpGMVip.js";import{c as t,a as d}from"./emotio
4141
${r&&"cursor: not-allowed;"}
4242
`,e.labelStyle),children:[e.label&&l.jsxs(l.Fragment,{children:[e.label," ",e.required===!0&&" *"]}),l.jsx(V,{id:e.id,name:e.name,disabled:r,colorField:e.type==="color","aria-errormessage":`${e.id??e.label}_error`,"aria-invalid":o!==void 0,onChange:b,defaultValue:e.defaultValue,error:c(o)??void 0,ref:g,...e})]}),l.jsx("span",{className:o?d(F):t`
4343
visibility: hidden;
44-
`,id:`${e.id??e.label}_error`,role:"alert",children:c(o)})]})});i.displayName="TextField";try{i.displayName="TextField",i.__docgenInfo={description:"",displayName:"TextField",props:{type:{defaultValue:null,description:"",name:"type",required:!1,type:{name:"enum",value:[{value:'"number"'},{value:'"color"'},{value:'"text"'},{value:'"email"'},{value:'"password"'}]}},label:{defaultValue:null,description:"",name:"label",required:!1,type:{name:"string"}},labelStyle:{defaultValue:null,description:"",name:"labelStyle",required:!1,type:{name:"string"}},hint:{defaultValue:null,description:"",name:"hint",required:!1,type:{name:"string"}},error:{defaultValue:null,description:"",name:"error",required:!1,type:{name:"any"}},onChangeByValue:{defaultValue:null,description:"",name:"onChangeByValue",required:!1,type:{name:"((value: string, name?: string) => void)"}}}}}catch{}const M={component:i,parameters:{docs:{description:{component:"Extends the native HTML input type='text' element with some additional props, such as label. All props available on the regular HTML input also work with this component. See: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/text."}}}},n={args:{label:"Example",placeholder:"Placeholder",onChange:a=>{console.log("Textfield changed to"+a.target.value)},value:void 0,defaultValue:void 0,required:!1}};var m,f,x;n.parameters={...n.parameters,docs:{...(m=n.parameters)==null?void 0:m.docs,source:{originalSource:`{
44+
`,id:`${e.id??e.label}_error`,role:"alert",children:c(o)})]})});i.displayName="TextField";try{i.displayName="TextField",i.__docgenInfo={description:"",displayName:"TextField",props:{type:{defaultValue:null,description:"",name:"type",required:!1,type:{name:"enum",value:[{value:'"number"'},{value:'"color"'},{value:'"email"'},{value:'"password"'},{value:'"text"'}]}},label:{defaultValue:null,description:"",name:"label",required:!1,type:{name:"string"}},labelStyle:{defaultValue:null,description:"",name:"labelStyle",required:!1,type:{name:"string"}},hint:{defaultValue:null,description:"",name:"hint",required:!1,type:{name:"string"}},error:{defaultValue:null,description:"",name:"error",required:!1,type:{name:"any"}},onChangeByValue:{defaultValue:null,description:"",name:"onChangeByValue",required:!1,type:{name:"((value: string, name?: string) => void)"}}}}}catch{}const M={component:i,parameters:{docs:{description:{component:"Extends the native HTML input type='text' element with some additional props, such as label. All props available on the regular HTML input also work with this component. See: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/text."}}}},n={args:{label:"Example",placeholder:"Placeholder",onChange:a=>{console.log("Textfield changed to"+a.target.value)},value:void 0,defaultValue:void 0,required:!1}};var m,f,x;n.parameters={...n.parameters,docs:{...(m=n.parameters)==null?void 0:m.docs,source:{originalSource:`{
4545
args: {
4646
label: "Example",
4747
placeholder: "Placeholder",
Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)