feat: migrate visual fixtures to storybook
This commit is contained in:
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -0,0 +1,28 @@
|
||||
const u={title:"Molecules/ListingCard"},r={args:{listing:{id:"listing-1",productName:"Charizard ex",askingPriceMinor:2499,status:"AVAILABLE"}}},s={args:{listing:{id:"listing-2",productName:"Pikachu World Collection",askingPriceMinor:8200,status:"PENDING"}}},a={args:{listing:{id:"listing-3",productName:"Gengar holo promo",askingPriceMinor:4500,status:"SOLD"}}};var i,n,e;r.parameters={...r.parameters,docs:{...(i=r.parameters)==null?void 0:i.docs,source:{originalSource:`{
|
||||
args: {
|
||||
listing: {
|
||||
id: 'listing-1',
|
||||
productName: 'Charizard ex',
|
||||
askingPriceMinor: 2499,
|
||||
status: 'AVAILABLE'
|
||||
}
|
||||
}
|
||||
}`,...(e=(n=r.parameters)==null?void 0:n.docs)==null?void 0:e.source}}};var o,t,c;s.parameters={...s.parameters,docs:{...(o=s.parameters)==null?void 0:o.docs,source:{originalSource:`{
|
||||
args: {
|
||||
listing: {
|
||||
id: 'listing-2',
|
||||
productName: 'Pikachu World Collection',
|
||||
askingPriceMinor: 8200,
|
||||
status: 'PENDING'
|
||||
}
|
||||
}
|
||||
}`,...(c=(t=s.parameters)==null?void 0:t.docs)==null?void 0:c.source}}};var d,g,l;a.parameters={...a.parameters,docs:{...(d=a.parameters)==null?void 0:d.docs,source:{originalSource:`{
|
||||
args: {
|
||||
listing: {
|
||||
id: 'listing-3',
|
||||
productName: 'Gengar holo promo',
|
||||
askingPriceMinor: 4500,
|
||||
status: 'SOLD'
|
||||
}
|
||||
}
|
||||
}`,...(l=(g=a.parameters)==null?void 0:g.docs)==null?void 0:l.source}}};const p=["available","pending","sold"];export{p as __namedExportsOrder,r as available,u as default,s as pending,a as sold};
|
||||
@@ -0,0 +1 @@
|
||||
function e(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}export{e as g};
|
||||
File diff suppressed because one or more lines are too long
@@ -0,0 +1 @@
|
||||
import{h as p,c as y,i as h,r as d,a as w}from"./vue.esm-bundler-c7-UdoSZ.js";var v=Object.defineProperty,P=(r,t)=>{for(var e in t)v(r,e,{get:t[e],enumerable:!0})};const{sanitizeStoryContextUpdate:U}=__STORYBOOK_MODULE_PREVIEW_API__;var b={};P(b,{applyDecorators:()=>z,mount:()=>A,parameters:()=>C,render:()=>j,renderToCanvas:()=>N});var j=(r,t)=>{let{id:e,component:i}=t;if(!i)throw new Error(`Unable to render story ${e} as the component annotation is missing from the default export`);return()=>p(i,r,E(r,t))},I=async(r,t)=>{globalThis&&globalThis.PLUGINS_SETUP_FUNCTIONS&&await Promise.all([...globalThis.PLUGINS_SETUP_FUNCTIONS].map(e=>e(r,t)))},f=new Map;async function N({storyFn:r,forceRemount:t,showMain:e,showException:i,storyContext:n,id:a},s){let o=f.get(s);if(o&&!t){let l=r(),c=S(l,n);return R(o.reactiveArgs,c),()=>{g(o.vueApp,s)}}o&&t&&g(o.vueApp,s);let u=y({setup(){n.args=d(n.args);let l=r(),c=S(l,n),_={vueApp:u,reactiveArgs:d(c)};return f.set(s,_),()=>p(l)}});return u.config.errorHandler=(l,c,_)=>{var m;(m=window.__STORYBOOK_PREVIEW__)!=null&&m.storyRenders.some(O=>O.id===a&&O.phase==="playing")?setTimeout(()=>{throw l},0):i(l)},await I(u,n),u.mount(s),e(),()=>{g(u,s)}}function E(r,t){let{argTypes:e}=t,i=Object.entries(r).filter(([n])=>{var a,s;return((s=(a=e[n])==null?void 0:a.table)==null?void 0:s.category)==="slots"}).map(([n,a])=>[n,typeof a=="function"?a:()=>a]);return Object.fromEntries(i)}function S(r,t){return r.props&&h(r)?r.props:t.args}function R(r,t){if(Object.keys(t).length===0)return;let e=w(r)?r:d(r);Object.keys(e).forEach(i=>{i in t||delete e[i]}),Object.assign(e,t)}function g(r,t){r==null||r.unmount(),f.has(t)&&f.delete(t)}function F(r){return typeof r=="function"?{render:r,name:r.name}:r}function T(r,t){let e=r;return e===null?null:typeof e=="function"?e:t?{...F(e),components:{...e.components||{},story:t}}:{render(){return p(e)}}}function z(r,t){return t.reduce((e,i)=>n=>{let a,s=i(o=>{let u=U(o);return o&&(u.args=Object.assign(n.args,u.args)),a=e({...n,...u}),a},n);return a||(a=e(n)),s===a?a:T(s,()=>p(a))},e=>T(r(e)))}var A=r=>async(t,e)=>(t&&(r.originalStoryFn=()=>()=>p(t,e==null?void 0:e.props,e==null?void 0:e.slots)),await r.renderToCanvas(),r.canvas),C={renderer:"vue3"};export{z as applyDecorators,A as mount,C as parameters,j as render,N as renderToCanvas};
|
||||
@@ -0,0 +1,16 @@
|
||||
import{c as _,n as C,z as j,o as v,g as $,b as N,y as A}from"./index-8_2S3kac.js";import{w as E,i as O}from"./vue.esm-bundler-c7-UdoSZ.js";const{addons:T}=__STORYBOOK_MODULE_PREVIEW_API__;var V=["props","events","slots","exposed","expose"],D=e=>{if(!j(e))return null;let t="exposed"in e.__docgenInfo?"vue-component-meta":"vue-docgen-api",a={};return V.forEach(r=>{v(e,r).forEach(n=>{let l;if(t==="vue-docgen-api"){let u=n.docgenInfo;l=M(u,r,n)}else{let u=n.docgenInfo;l=q(u,r)}!l||a[l.name]||(["events","expose","exposed"].includes(r)&&(l.control={disable:!0}),a[l.name]=l)})}),a},M=(e,t,a)=>{var u,s,i;let r,n;if(t==="events"&&(r=(u=e.type)==null?void 0:u.names.join(),n={name:"other",value:r??"",required:!1}),t==="slots"){let o=(s=e.bindings)==null?void 0:s.filter(m=>!!m.name).map(m=>{var p;return`${m.name}: ${((p=m.type)==null?void 0:p.name)??"unknown"}`}).join("; ");r=o?`{ ${o} }`:void 0,n={name:"other",value:r??"",required:!1}}if(t==="props"){let o=e;if(r=(i=o.type)==null?void 0:i.name,n=a?N(a.docgenInfo):{name:"other",value:r},o.type&&"elements"in o.type&&Array.isArray(o.type.elements)&&o.type.elements.length>0){let m=o.type.elements.map(p=>p.name);r==="Array"&&(r=`${m.length===1?m[0]:`(${m.join(" | ")})`}[]`),r==="union"?r=m.join(" | "):r==="intersection"&&(r=m.join(" & "))}}let l="required"in e?e.required??!1:!1;return{name:e.name,description:e.description,type:n?{...n,required:l}:{name:"other",value:r??""},table:{type:r?{summary:r}:void 0,defaultValue:(a==null?void 0:a.propDef.defaultValue)??void 0,jsDocTags:a==null?void 0:a.propDef.jsDocTags,category:t}}},q=(e,t)=>{if("global"in e&&e.global)return;let a={summary:e.type.replace(" | undefined","")};if(t==="props"){let r=e,n=r.default?{summary:r.default}:void 0;return{name:r.name,description:w(r.description,r.tags),defaultValue:n,type:f(r),table:{type:a,defaultValue:n,category:t}}}else return{name:e.name,description:"description"in e?e.description:"",type:{name:"other",value:e.type},table:{type:a,category:t}}},f=e=>{var l,u;let t=e.schema,a=e.required,r={name:"other",value:e.type,required:a},n=["string","number","function","boolean","symbol"];if(typeof t=="string")return n.includes(t)?{name:t,required:a}:r;switch(t.kind){case"enum":{let s=((l=t.schema)==null?void 0:l.filter(i=>i!=="undefined"))??[];return W(s)?{name:"boolean",required:a}:F(s)||B(s)?{name:"enum",value:s.map(i=>i.replace(/"/g,"")),required:a}:s.length===1?f({schema:s[0],type:e.type,required:a}):(s.length>2&&s.includes("true")&&s.includes("false")&&(s=s.filter(i=>i!=="true"&&i!=="false"),s.push("boolean")),{name:"union",value:s.map(i=>f(typeof i=="object"?{schema:i,type:i.type,required:!1}:{schema:i,type:i,required:!1})),required:a})}case"array":{let s=((u=t.schema)==null?void 0:u.filter(i=>i!=="undefined"))??[];return s.length===0?r:s.length===1?{name:"array",value:f({schema:s[0],type:e.type,required:!1}),required:a}:{name:"union",value:s.map(i=>f(typeof i=="object"?{schema:i,type:i.type,required:!1}:{schema:i,type:i,required:!1})),required:a}}case"object":return{name:"object",value:{},required:a};default:return r}},w=(e,t)=>!(t!=null&&t.length)||!e?e??"":`${t.map(a=>`@${a.name}: ${a.text}`).join("<br>")}<br><br>${e}`,F=e=>e.every(t=>typeof t=="string"&&t.startsWith('"')&&t.endsWith('"')),B=e=>e.every(t=>typeof t=="string"&&t.includes(".")),W=e=>e.length===2&&e.includes("true")&&e.includes("false"),y=Symbol("DEEP_ACCESS_SYMBOL"),k=e=>!!(e&&typeof e=="object"&&y in e),R=(e,t)=>{let a=e();if(Y(t))return a;let r=T.getChannel();return E(()=>t.args,()=>{let n=I(t);r.emit(A,{id:t.id,args:t.args,source:n,format:"vue"})},{immediate:!0,deep:!0}),a},I=e=>{let t={imports:{},scriptVariables:{}},{displayName:a,slotNames:r,eventNames:n}=G(e.component),l=h(e.args,r,n,t),u=b(e.args,r,t),s=a||e.title.split("/").at(-1),i=u?`<${s} ${l}> ${u} </${s}>`:`<${s} ${l} />`,o=Object.entries(t.scriptVariables).map(([d,c])=>`const ${d} = ${c};`).join(`
|
||||
|
||||
`),m=Object.entries(t.imports).map(([d,c])=>`import { ${Array.from(c.values()).sort().join(", ")} } from "${d}";`).join(`
|
||||
`),p=`<template>
|
||||
${i}
|
||||
</template>`;return!m&&!o?p:`<script lang="ts" setup>
|
||||
${m?`${m}
|
||||
|
||||
${o}`:o}
|
||||
<\/script>
|
||||
|
||||
${p}`},Y=e=>{var a;let t=(a=e==null?void 0:e.parameters.docs)==null?void 0:a.source;return(t==null?void 0:t.type)===$.DYNAMIC?!1:!(e!=null&&e.parameters.__isArgsStory)||(t==null?void 0:t.code)||(t==null?void 0:t.type)===$.CODE},G=e=>{if(!e||!("__docgenInfo"in e)||!e.__docgenInfo||typeof e.__docgenInfo!="object")return{displayName:e==null?void 0:e.__name,eventNames:[],slotNames:[]};let t=e.__docgenInfo,a="displayName"in t&&typeof t.displayName=="string"?t.displayName:void 0,r=n=>!(n in t)||!Array.isArray(t[n])?[]:t[n].map(l=>l&&typeof l=="object"&&"name"in l?l.name:void 0).filter(l=>typeof l=="string");return{displayName:a||e.__name,slotNames:r("slots").sort((n,l)=>n==="default"?-1:l==="default"?1:n.localeCompare(l)),eventNames:r("events")}},h=(e,t,a,r)=>{let n=[];Object.entries(e).forEach(([u,s])=>{if(!t.includes(u)&&s!=null)switch(k(s)&&(s=s.toString()),typeof s){case"string":if(s==="")return;n.push({name:u,value:s.includes('"')?`'${s}'`:`"${s}"`,templateFn:(i,o)=>`${i}=${o}`});break;case"number":n.push({name:u,value:s.toString(),templateFn:(i,o)=>`:${i}="${o}"`});break;case"bigint":n.push({name:u,value:`BigInt(${s.toString()})`,templateFn:(i,o)=>`:${i}="${o}"`});break;case"boolean":n.push({name:u,value:s?"true":"false",templateFn:(i,o)=>o==="true"?i:`:${i}="false"`});break;case"symbol":n.push({name:u,value:`Symbol(${s.description?`'${s.description}'`:""})`,templateFn:(i,o)=>`:${i}="${o}"`});break;case"object":{n.push({name:u,value:U(s??{}),templateFn:void 0});break}}}),n.sort((u,s)=>u.name.localeCompare(s.name));let l=[];return n.forEach(u=>{let s=a.includes(`update:${u.name}`);if(!s&&u.templateFn){l.push(u.templateFn(u.name,u.value));return}let i=u.name;if(i in r.scriptVariables){let o=1;do i=`${u.name}${o}`,o++;while(i in r.scriptVariables)}if(!s){r.scriptVariables[i]=u.value,l.push(`:${u.name}="${i}"`);return}r.scriptVariables[i]=`ref(${u.value})`,r.imports.vue||(r.imports.vue=new Set),r.imports.vue.add("ref"),u.name==="modelValue"?l.push(`v-model="${i}"`):l.push(`v-model:${u.name}="${i}"`)}),l.join(" ")},b=(e,t,a)=>{let r=[];return t.forEach(n=>{let l=e[n];if(!l)return;let u=g([l],a);if(!u)return;let s=typeof l=="function"?S(l):[];n==="default"&&!s.length?r.push(u):r.push(`<template ${J(n,s)}>${u}</template>`)}),r.join(`
|
||||
|
||||
`)},g=(e,t)=>{let a=[],r=n=>{if(O(n))return K(n,t);switch(typeof n){case"string":case"number":case"boolean":return n.toString();case"object":return n===null?"":Array.isArray(n)?n.map(r).filter(l=>l!=="").join(`
|
||||
`):JSON.stringify(n);case"function":{let l=S(n).filter(i=>!["{","}"].includes(i)),u={};l.forEach(i=>{u[i]=new Proxy({[y]:!0},{get:(o,m)=>m===y?o[y]:[Symbol.toPrimitive,Symbol.toStringTag,"toString"].includes(m)?()=>`{{ ${i} }}`:m==="v-bind"?`${i}`:`{{ ${i}.${m.toString()} }}`,ownKeys:()=>["v-bind"],getOwnPropertyDescriptor:()=>({configurable:!0,enumerable:!0,value:i,writable:!0})})});let s=n(u);return g([s],t).replaceAll(/ (\S+)="{{ (\S+) }}"/g,' :$1="$2"')}case"bigint":return`{{ BigInt(${n.toString()}) }}`;default:return""}};return e.forEach(n=>{let l=r(n);l!==""&&a.push(l)}),a.join(`
|
||||
`)},K=(e,t)=>{let a=L(e),r="";typeof e.children=="string"?r=e.children:Array.isArray(e.children)?r=g(e.children,t):e.children&&(r=b(e.children,Object.keys(e.children).filter(l=>l!=="$stable"),t));let n=e.props?h(e.props,[],[],t):"";return r?`<${a}${n?` ${n}`:""}>${r}</${a}>`:`<${a}${n?` ${n}`:""} />`},L=e=>{if(typeof e.type=="string")return e.type;if(typeof e.type=="object"){if("name"in e.type&&e.type.name)return e.type.name;if("__name"in e.type&&e.type.__name)return e.type.__name}return"component"},S=e=>{let t=/((\/\/.*$)|(\/\*[\s\S]*?\*\/))/gm,a=/([^\s,]+)/g,r=e.toString().replace(t,""),n=r.slice(r.indexOf("(")+1,r.indexOf(")")).match(a);return n?n.flatMap(l=>{if(["{","}"].includes(l))return l;let u=l.split(":")[0].trim();return u.startsWith("{")?["{",u.substring(1)]:l.endsWith("}")&&!u.endsWith("}")?[u,"}"]:u}):[]},J=(e,t)=>t.length?t.length===1?`#${e}="${t[0]}"`:`#${e}="{ ${t.filter(a=>!["{","}"].includes(a)).join(", ")} }"`:`#${e}`,U=e=>Object.values(e).every(t=>t==null||typeof t!="object")?JSON.stringify(e):JSON.stringify(e,null,2),Q={docs:{story:{inline:!0},extractArgTypes:D,extractComponentDescription:C}},X=[R],Z=[_];export{Z as argTypesEnhancers,X as decorators,Q as parameters};
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -0,0 +1,6 @@
|
||||
function l(i){for(var f=[],c=1;c<arguments.length;c++)f[c-1]=arguments[c];var n=Array.from(typeof i=="string"?[i]:i);n[n.length-1]=n[n.length-1].replace(/\r?\n([\t ]*)$/,"");var s=n.reduce(function(t,g){var a=g.match(/\n([\t ]+|(?!\s).)/g);return a?t.concat(a.map(function(u){var r,e;return(e=(r=u.match(/[\t ]/g))===null||r===void 0?void 0:r.length)!==null&&e!==void 0?e:0})):t},[]);if(s.length){var d=new RegExp(`
|
||||
[ ]{`.concat(Math.min.apply(Math,s),"}"),"g");n=n.map(function(t){return t.replace(d,`
|
||||
`)})}n[0]=n[0].replace(/^\r?\n/,"");var o=n[0];return f.forEach(function(t,g){var a=o.match(/(?:^|\n)( *)$/),u=a?a[1]:"",r=t;typeof t=="string"&&t.includes(`
|
||||
`)&&(r=String(t).split(`
|
||||
`).map(function(e,h){return h===0?e:"".concat(u).concat(e)}).join(`
|
||||
`)),o+=r+n[g+1]}),o}export{l as d};
|
||||
@@ -0,0 +1 @@
|
||||
import{R as o}from"./DocsRenderer-CFRXHY34-BZ6DD22w.js";import"./iframe-BYP-OqC3.js";import"./_commonjsHelpers-CqkleIqs.js";import"./index-8_2S3kac.js";import"./index-Bhqu_tAV.js";const e={},c=o.createContext(e);function m(t){const n=o.useContext(c);return o.useMemo(function(){return typeof t=="function"?t(n):{...n,...t}},[n,t])}function a(t){let n;return t.disableParentContext?n=typeof t.components=="function"?t.components(e):t.components||e:n=m(t.components),o.createElement(c.Provider,{value:n},t.children)}export{a as MDXProvider,m as useMDXComponents};
|
||||
File diff suppressed because one or more lines are too long
@@ -0,0 +1,34 @@
|
||||
import{d as P}from"./index-Bhqu_tAV.js";const{useEffect:_,useMemo:h}=__STORYBOOK_MODULE_PREVIEW_API__,{global:j}=__STORYBOOK_MODULE_GLOBAL__,{logger:X}=__STORYBOOK_MODULE_CLIENT_LOGGER__;var p="backgrounds",U={light:{name:"light",value:"#F8F8F8"},dark:{name:"dark",value:"#333"}},{document:b,window:O}=j,D=()=>{var r;return!!((r=O==null?void 0:O.matchMedia("(prefers-reduced-motion: reduce)"))!=null&&r.matches)},A=r=>{(Array.isArray(r)?r:[r]).forEach(N)},N=r=>{var t;let e=b.getElementById(r);e&&((t=e.parentElement)==null||t.removeChild(e))},F=(r,e)=>{let t=b.getElementById(r);if(t)t.innerHTML!==e&&(t.innerHTML=e);else{let o=b.createElement("style");o.setAttribute("id",r),o.innerHTML=e,b.head.appendChild(o)}},Y=(r,e,t)=>{var a;let o=b.getElementById(r);if(o)o.innerHTML!==e&&(o.innerHTML=e);else{let d=b.createElement("style");d.setAttribute("id",r),d.innerHTML=e;let i=`addon-backgrounds-grid${t?`-docs-${t}`:""}`,n=b.getElementById(i);n?(a=n.parentElement)==null||a.insertBefore(d,n):b.head.appendChild(d)}},W={cellSize:100,cellAmount:10,opacity:.8},w="addon-backgrounds",R="addon-backgrounds-grid",q=D()?"":"transition: background-color 0.3s;",J=(r,e)=>{let{globals:t,parameters:o,viewMode:a,id:d}=e,{options:i=U,disable:n,grid:s=W}=o[p]||{},c=t[p]||{},u=c.value,l=u?i[u]:void 0,$=(l==null?void 0:l.value)||"transparent",f=c.grid||!1,y=!!l&&!n,m=a==="docs"?`#anchor--${d} .docs-story`:".sb-show-main",E=a==="docs"?`#anchor--${d} .docs-story`:".sb-show-main",H=o.layout===void 0||o.layout==="padded",L=a==="docs"?20:H?16:0,{cellAmount:k,cellSize:g,opacity:x,offsetX:v=L,offsetY:S=L}=s,B=a==="docs"?`${w}-docs-${d}`:`${w}-color`,G=a==="docs"?d:null;_(()=>{let M=`
|
||||
${m} {
|
||||
background: ${$} !important;
|
||||
${q}
|
||||
}`;if(!y){A(B);return}Y(B,M,G)},[m,B,G,y,$]);let T=a==="docs"?`${R}-docs-${d}`:`${R}`;return _(()=>{if(!f){A(T);return}let M=[`${g*k}px ${g*k}px`,`${g*k}px ${g*k}px`,`${g}px ${g}px`,`${g}px ${g}px`].join(", "),K=`
|
||||
${E} {
|
||||
background-size: ${M} !important;
|
||||
background-position: ${v}px ${S}px, ${v}px ${S}px, ${v}px ${S}px, ${v}px ${S}px !important;
|
||||
background-blend-mode: difference !important;
|
||||
background-image: linear-gradient(rgba(130, 130, 130, ${x}) 1px, transparent 1px),
|
||||
linear-gradient(90deg, rgba(130, 130, 130, ${x}) 1px, transparent 1px),
|
||||
linear-gradient(rgba(130, 130, 130, ${x/2}) 1px, transparent 1px),
|
||||
linear-gradient(90deg, rgba(130, 130, 130, ${x/2}) 1px, transparent 1px) !important;
|
||||
}
|
||||
`;F(T,K)},[k,g,E,T,f,v,S,x]),r()},Q=(r,e=[],t)=>{if(r==="transparent")return"transparent";if(e.find(a=>a.value===r)||r)return r;let o=e.find(a=>a.name===t);if(o)return o.value;if(t){let a=e.map(d=>d.name).join(", ");X.warn(P`
|
||||
Backgrounds Addon: could not find the default color "${t}".
|
||||
These are the available colors for your story based on your configuration:
|
||||
${a}.
|
||||
`)}return"transparent"},Z=(r,e)=>{var u;let{globals:t,parameters:o}=e,a=(u=t[p])==null?void 0:u.value,d=o[p],i=h(()=>d.disable?"transparent":Q(a,d.values,d.default),[d,a]),n=h(()=>i&&i!=="transparent",[i]),s=e.viewMode==="docs"?`#anchor--${e.id} .docs-story`:".sb-show-main",c=h(()=>`
|
||||
${s} {
|
||||
background: ${i} !important;
|
||||
${D()?"":"transition: background-color 0.3s;"}
|
||||
}
|
||||
`,[i,s]);return _(()=>{let l=e.viewMode==="docs"?`addon-backgrounds-docs-${e.id}`:"addon-backgrounds-color";if(!n){A(l);return}Y(l,c,e.viewMode==="docs"?e.id:null)},[n,c,e]),r()},V=(r,e)=>{var y;let{globals:t,parameters:o}=e,a=o[p].grid,d=((y=t[p])==null?void 0:y.grid)===!0&&a.disable!==!0,{cellAmount:i,cellSize:n,opacity:s}=a,c=e.viewMode==="docs",u=o.layout===void 0||o.layout==="padded"?16:0,l=a.offsetX??(c?20:u),$=a.offsetY??(c?20:u),f=h(()=>{let m=e.viewMode==="docs"?`#anchor--${e.id} .docs-story`:".sb-show-main",E=[`${n*i}px ${n*i}px`,`${n*i}px ${n*i}px`,`${n}px ${n}px`,`${n}px ${n}px`].join(", ");return`
|
||||
${m} {
|
||||
background-size: ${E} !important;
|
||||
background-position: ${l}px ${$}px, ${l}px ${$}px, ${l}px ${$}px, ${l}px ${$}px !important;
|
||||
background-blend-mode: difference !important;
|
||||
background-image: linear-gradient(rgba(130, 130, 130, ${s}) 1px, transparent 1px),
|
||||
linear-gradient(90deg, rgba(130, 130, 130, ${s}) 1px, transparent 1px),
|
||||
linear-gradient(rgba(130, 130, 130, ${s/2}) 1px, transparent 1px),
|
||||
linear-gradient(90deg, rgba(130, 130, 130, ${s/2}) 1px, transparent 1px) !important;
|
||||
}
|
||||
`},[n]);return _(()=>{let m=e.viewMode==="docs"?`addon-backgrounds-grid-docs-${e.id}`:"addon-backgrounds-grid";if(!d){A(m);return}F(m,f)},[d,f,e]),r()},C,ae=(C=globalThis.FEATURES)!=null&&C.backgroundsStoryGlobals?[J]:[V,Z],I,oe={[p]:{grid:{cellSize:20,opacity:.5,cellAmount:5},disable:!1,...!((I=globalThis.FEATURES)!=null&&I.backgroundsStoryGlobals)&&{values:Object.values(U)}}},ee={[p]:{value:void 0,grid:!1}},z,de=(z=globalThis.FEATURES)!=null&&z.backgroundsStoryGlobals?ee:{[p]:null};export{ae as decorators,de as initialGlobals,oe as parameters};
|
||||
File diff suppressed because one or more lines are too long
@@ -0,0 +1,2 @@
|
||||
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./DocsRenderer-CFRXHY34-BZ6DD22w.js","./iframe-BYP-OqC3.js","./_commonjsHelpers-CqkleIqs.js","./index-8_2S3kac.js","./index-Bhqu_tAV.js"])))=>i.map(i=>d[i]);
|
||||
import{_ as a}from"./iframe-BYP-OqC3.js";var i=Object.defineProperty,s=(e,r)=>{for(var t in r)i(e,t,{get:r[t],enumerable:!0})},_={};s(_,{parameters:()=>d});var p=Object.entries(globalThis.TAGS_OPTIONS??{}).reduce((e,r)=>{let[t,o]=r;return o.excludeFromDocsStories&&(e[t]=!0),e},{}),d={docs:{renderer:async()=>{let{DocsRenderer:e}=await a(()=>import("./DocsRenderer-CFRXHY34-BZ6DD22w.js").then(r=>r.D),__vite__mapDeps([0,1,2,3,4]),import.meta.url);return new e},stories:{filter:e=>{var r;return(e.tags||[]).filter(t=>p[t]).length===0&&!((r=e.parameters.docs)!=null&&r.disable)}}}};export{d as parameters};
|
||||
@@ -0,0 +1,396 @@
|
||||
import{d as $}from"./index-Bhqu_tAV.js";const{useMemo:x,useEffect:f}=__STORYBOOK_MODULE_PREVIEW_API__,{global:p}=__STORYBOOK_MODULE_GLOBAL__;var m="outline",u=i=>{(Array.isArray(i)?i:[i]).forEach(r)},r=i=>{let t=typeof i=="string"?i:i.join(""),o=p.document.getElementById(t);o&&o.parentElement&&o.parentElement.removeChild(o)},b=(i,t)=>{let o=p.document.getElementById(i);if(o)o.innerHTML!==t&&(o.innerHTML=t);else{let n=p.document.createElement("style");n.setAttribute("id",i),n.innerHTML=t,p.document.head.appendChild(n)}};function s(i){return $`
|
||||
${i} body {
|
||||
outline: 1px solid #2980b9 !important;
|
||||
}
|
||||
|
||||
${i} article {
|
||||
outline: 1px solid #3498db !important;
|
||||
}
|
||||
|
||||
${i} nav {
|
||||
outline: 1px solid #0088c3 !important;
|
||||
}
|
||||
|
||||
${i} aside {
|
||||
outline: 1px solid #33a0ce !important;
|
||||
}
|
||||
|
||||
${i} section {
|
||||
outline: 1px solid #66b8da !important;
|
||||
}
|
||||
|
||||
${i} header {
|
||||
outline: 1px solid #99cfe7 !important;
|
||||
}
|
||||
|
||||
${i} footer {
|
||||
outline: 1px solid #cce7f3 !important;
|
||||
}
|
||||
|
||||
${i} h1 {
|
||||
outline: 1px solid #162544 !important;
|
||||
}
|
||||
|
||||
${i} h2 {
|
||||
outline: 1px solid #314e6e !important;
|
||||
}
|
||||
|
||||
${i} h3 {
|
||||
outline: 1px solid #3e5e85 !important;
|
||||
}
|
||||
|
||||
${i} h4 {
|
||||
outline: 1px solid #449baf !important;
|
||||
}
|
||||
|
||||
${i} h5 {
|
||||
outline: 1px solid #c7d1cb !important;
|
||||
}
|
||||
|
||||
${i} h6 {
|
||||
outline: 1px solid #4371d0 !important;
|
||||
}
|
||||
|
||||
${i} main {
|
||||
outline: 1px solid #2f4f90 !important;
|
||||
}
|
||||
|
||||
${i} address {
|
||||
outline: 1px solid #1a2c51 !important;
|
||||
}
|
||||
|
||||
${i} div {
|
||||
outline: 1px solid #036cdb !important;
|
||||
}
|
||||
|
||||
${i} p {
|
||||
outline: 1px solid #ac050b !important;
|
||||
}
|
||||
|
||||
${i} hr {
|
||||
outline: 1px solid #ff063f !important;
|
||||
}
|
||||
|
||||
${i} pre {
|
||||
outline: 1px solid #850440 !important;
|
||||
}
|
||||
|
||||
${i} blockquote {
|
||||
outline: 1px solid #f1b8e7 !important;
|
||||
}
|
||||
|
||||
${i} ol {
|
||||
outline: 1px solid #ff050c !important;
|
||||
}
|
||||
|
||||
${i} ul {
|
||||
outline: 1px solid #d90416 !important;
|
||||
}
|
||||
|
||||
${i} li {
|
||||
outline: 1px solid #d90416 !important;
|
||||
}
|
||||
|
||||
${i} dl {
|
||||
outline: 1px solid #fd3427 !important;
|
||||
}
|
||||
|
||||
${i} dt {
|
||||
outline: 1px solid #ff0043 !important;
|
||||
}
|
||||
|
||||
${i} dd {
|
||||
outline: 1px solid #e80174 !important;
|
||||
}
|
||||
|
||||
${i} figure {
|
||||
outline: 1px solid #ff00bb !important;
|
||||
}
|
||||
|
||||
${i} figcaption {
|
||||
outline: 1px solid #bf0032 !important;
|
||||
}
|
||||
|
||||
${i} table {
|
||||
outline: 1px solid #00cc99 !important;
|
||||
}
|
||||
|
||||
${i} caption {
|
||||
outline: 1px solid #37ffc4 !important;
|
||||
}
|
||||
|
||||
${i} thead {
|
||||
outline: 1px solid #98daca !important;
|
||||
}
|
||||
|
||||
${i} tbody {
|
||||
outline: 1px solid #64a7a0 !important;
|
||||
}
|
||||
|
||||
${i} tfoot {
|
||||
outline: 1px solid #22746b !important;
|
||||
}
|
||||
|
||||
${i} tr {
|
||||
outline: 1px solid #86c0b2 !important;
|
||||
}
|
||||
|
||||
${i} th {
|
||||
outline: 1px solid #a1e7d6 !important;
|
||||
}
|
||||
|
||||
${i} td {
|
||||
outline: 1px solid #3f5a54 !important;
|
||||
}
|
||||
|
||||
${i} col {
|
||||
outline: 1px solid #6c9a8f !important;
|
||||
}
|
||||
|
||||
${i} colgroup {
|
||||
outline: 1px solid #6c9a9d !important;
|
||||
}
|
||||
|
||||
${i} button {
|
||||
outline: 1px solid #da8301 !important;
|
||||
}
|
||||
|
||||
${i} datalist {
|
||||
outline: 1px solid #c06000 !important;
|
||||
}
|
||||
|
||||
${i} fieldset {
|
||||
outline: 1px solid #d95100 !important;
|
||||
}
|
||||
|
||||
${i} form {
|
||||
outline: 1px solid #d23600 !important;
|
||||
}
|
||||
|
||||
${i} input {
|
||||
outline: 1px solid #fca600 !important;
|
||||
}
|
||||
|
||||
${i} keygen {
|
||||
outline: 1px solid #b31e00 !important;
|
||||
}
|
||||
|
||||
${i} label {
|
||||
outline: 1px solid #ee8900 !important;
|
||||
}
|
||||
|
||||
${i} legend {
|
||||
outline: 1px solid #de6d00 !important;
|
||||
}
|
||||
|
||||
${i} meter {
|
||||
outline: 1px solid #e8630c !important;
|
||||
}
|
||||
|
||||
${i} optgroup {
|
||||
outline: 1px solid #b33600 !important;
|
||||
}
|
||||
|
||||
${i} option {
|
||||
outline: 1px solid #ff8a00 !important;
|
||||
}
|
||||
|
||||
${i} output {
|
||||
outline: 1px solid #ff9619 !important;
|
||||
}
|
||||
|
||||
${i} progress {
|
||||
outline: 1px solid #e57c00 !important;
|
||||
}
|
||||
|
||||
${i} select {
|
||||
outline: 1px solid #e26e0f !important;
|
||||
}
|
||||
|
||||
${i} textarea {
|
||||
outline: 1px solid #cc5400 !important;
|
||||
}
|
||||
|
||||
${i} details {
|
||||
outline: 1px solid #33848f !important;
|
||||
}
|
||||
|
||||
${i} summary {
|
||||
outline: 1px solid #60a1a6 !important;
|
||||
}
|
||||
|
||||
${i} command {
|
||||
outline: 1px solid #438da1 !important;
|
||||
}
|
||||
|
||||
${i} menu {
|
||||
outline: 1px solid #449da6 !important;
|
||||
}
|
||||
|
||||
${i} del {
|
||||
outline: 1px solid #bf0000 !important;
|
||||
}
|
||||
|
||||
${i} ins {
|
||||
outline: 1px solid #400000 !important;
|
||||
}
|
||||
|
||||
${i} img {
|
||||
outline: 1px solid #22746b !important;
|
||||
}
|
||||
|
||||
${i} iframe {
|
||||
outline: 1px solid #64a7a0 !important;
|
||||
}
|
||||
|
||||
${i} embed {
|
||||
outline: 1px solid #98daca !important;
|
||||
}
|
||||
|
||||
${i} object {
|
||||
outline: 1px solid #00cc99 !important;
|
||||
}
|
||||
|
||||
${i} param {
|
||||
outline: 1px solid #37ffc4 !important;
|
||||
}
|
||||
|
||||
${i} video {
|
||||
outline: 1px solid #6ee866 !important;
|
||||
}
|
||||
|
||||
${i} audio {
|
||||
outline: 1px solid #027353 !important;
|
||||
}
|
||||
|
||||
${i} source {
|
||||
outline: 1px solid #012426 !important;
|
||||
}
|
||||
|
||||
${i} canvas {
|
||||
outline: 1px solid #a2f570 !important;
|
||||
}
|
||||
|
||||
${i} track {
|
||||
outline: 1px solid #59a600 !important;
|
||||
}
|
||||
|
||||
${i} map {
|
||||
outline: 1px solid #7be500 !important;
|
||||
}
|
||||
|
||||
${i} area {
|
||||
outline: 1px solid #305900 !important;
|
||||
}
|
||||
|
||||
${i} a {
|
||||
outline: 1px solid #ff62ab !important;
|
||||
}
|
||||
|
||||
${i} em {
|
||||
outline: 1px solid #800b41 !important;
|
||||
}
|
||||
|
||||
${i} strong {
|
||||
outline: 1px solid #ff1583 !important;
|
||||
}
|
||||
|
||||
${i} i {
|
||||
outline: 1px solid #803156 !important;
|
||||
}
|
||||
|
||||
${i} b {
|
||||
outline: 1px solid #cc1169 !important;
|
||||
}
|
||||
|
||||
${i} u {
|
||||
outline: 1px solid #ff0430 !important;
|
||||
}
|
||||
|
||||
${i} s {
|
||||
outline: 1px solid #f805e3 !important;
|
||||
}
|
||||
|
||||
${i} small {
|
||||
outline: 1px solid #d107b2 !important;
|
||||
}
|
||||
|
||||
${i} abbr {
|
||||
outline: 1px solid #4a0263 !important;
|
||||
}
|
||||
|
||||
${i} q {
|
||||
outline: 1px solid #240018 !important;
|
||||
}
|
||||
|
||||
${i} cite {
|
||||
outline: 1px solid #64003c !important;
|
||||
}
|
||||
|
||||
${i} dfn {
|
||||
outline: 1px solid #b4005a !important;
|
||||
}
|
||||
|
||||
${i} sub {
|
||||
outline: 1px solid #dba0c8 !important;
|
||||
}
|
||||
|
||||
${i} sup {
|
||||
outline: 1px solid #cc0256 !important;
|
||||
}
|
||||
|
||||
${i} time {
|
||||
outline: 1px solid #d6606d !important;
|
||||
}
|
||||
|
||||
${i} code {
|
||||
outline: 1px solid #e04251 !important;
|
||||
}
|
||||
|
||||
${i} kbd {
|
||||
outline: 1px solid #5e001f !important;
|
||||
}
|
||||
|
||||
${i} samp {
|
||||
outline: 1px solid #9c0033 !important;
|
||||
}
|
||||
|
||||
${i} var {
|
||||
outline: 1px solid #d90047 !important;
|
||||
}
|
||||
|
||||
${i} mark {
|
||||
outline: 1px solid #ff0053 !important;
|
||||
}
|
||||
|
||||
${i} bdi {
|
||||
outline: 1px solid #bf3668 !important;
|
||||
}
|
||||
|
||||
${i} bdo {
|
||||
outline: 1px solid #6f1400 !important;
|
||||
}
|
||||
|
||||
${i} ruby {
|
||||
outline: 1px solid #ff7b93 !important;
|
||||
}
|
||||
|
||||
${i} rt {
|
||||
outline: 1px solid #ff2f54 !important;
|
||||
}
|
||||
|
||||
${i} rp {
|
||||
outline: 1px solid #803e49 !important;
|
||||
}
|
||||
|
||||
${i} span {
|
||||
outline: 1px solid #cc2643 !important;
|
||||
}
|
||||
|
||||
${i} br {
|
||||
outline: 1px solid #db687d !important;
|
||||
}
|
||||
|
||||
${i} wbr {
|
||||
outline: 1px solid #db175b !important;
|
||||
}`}var e=(i,t)=>{let{globals:o}=t,n=[!0,"true"].includes(o[m]),d=t.viewMode==="docs",l=x(()=>s(d?'[data-story-block="true"]':".sb-show-main"),[t]);return f(()=>{let a=d?`addon-outline-docs-${t.id}`:"addon-outline";return n?b(a,l):u(a),()=>{u(a)}},[n,l,t]),i()},h=[e],g={[m]:!1};export{h as decorators,g as initialGlobals};
|
||||
@@ -0,0 +1 @@
|
||||
const o={theme:{description:"Global color theme",defaultValue:"light",toolbar:{icon:"paintbrush",items:["light","dark"],dynamicTitle:!0}}},l=[(e,t)=>(document.documentElement.dataset.theme=t.globals.theme,e())],a={controls:{expanded:!0},a11y:{test:"todo"},layout:"fullscreen"};export{l as decorators,o as globalTypes,a as parameters};
|
||||
@@ -0,0 +1 @@
|
||||
var o="viewport",a={[o]:{value:void 0,isRotated:!1}},t={viewport:"reset",viewportRotated:!1},e,l=(e=globalThis.FEATURES)!=null&&e.viewportStoryGlobals?a:t;export{l as initialGlobals};
|
||||
@@ -0,0 +1 @@
|
||||
let p;const S=new Uint8Array(16);function A(){if(!p&&(p=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!p))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return p(S)}const o=[];for(let e=0;e<256;++e)o.push((e+256).toString(16).slice(1));function D(e,t=0){return o[e[t+0]]+o[e[t+1]]+o[e[t+2]]+o[e[t+3]]+"-"+o[e[t+4]]+o[e[t+5]]+"-"+o[e[t+6]]+o[e[t+7]]+"-"+o[e[t+8]]+o[e[t+9]]+"-"+o[e[t+10]]+o[e[t+11]]+o[e[t+12]]+o[e[t+13]]+o[e[t+14]]+o[e[t+15]]}const I=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),h={randomUUID:I};function f(e,t,r){if(h.randomUUID&&!e)return h.randomUUID();e=e||{};const n=e.random||(e.rng||A)();return n[6]=n[6]&15|64,n[8]=n[8]&63|128,D(n)}const{addons:v}=__STORYBOOK_MODULE_PREVIEW_API__,{ImplicitActionsDuringRendering:U}=__STORYBOOK_MODULE_CORE_EVENTS_PREVIEW_ERRORS__,{global:d}=__STORYBOOK_MODULE_GLOBAL__;var w="storybook/actions",j=`${w}/action-event`,V={depth:10,clearOnStoryChange:!0,limit:50},E=(e,t)=>{let r=Object.getPrototypeOf(e);return!r||t(r)?r:E(r,t)},C=e=>!!(typeof e=="object"&&e&&E(e,t=>/^Synthetic(?:Base)?Event$/.test(t.constructor.name))&&typeof e.persist=="function"),K=e=>{if(C(e)){let t=Object.create(e.constructor.prototype,Object.getOwnPropertyDescriptors(e));t.persist();let r=Object.getOwnPropertyDescriptor(t,"view"),n=r==null?void 0:r.value;return typeof n=="object"&&(n==null?void 0:n.constructor.name)==="Window"&&Object.defineProperty(t,"view",{...r,value:Object.create(n.constructor.prototype)}),t}return e},L=()=>typeof crypto=="object"&&typeof crypto.getRandomValues=="function"?f():Date.now().toString(36)+Math.random().toString(36).substring(2);function _(e,t={}){let r={...V,...t},n=function(...s){var g,O;if(t.implicit){let y=(g="__STORYBOOK_PREVIEW__"in d?d.__STORYBOOK_PREVIEW__:void 0)==null?void 0:g.storyRenders.find(l=>l.phase==="playing"||l.phase==="rendering");if(y){let l=!((O=globalThis==null?void 0:globalThis.FEATURES)!=null&&O.disallowImplicitActionsInRenderV8),R=new U({phase:y.phase,name:e,deprecated:l});if(l)console.warn(R);else throw R}}let i=v.getChannel(),c=L(),a=5,u=s.map(K),b=s.length>1?u:u[0],x={id:c,count:0,data:{name:e,args:b},options:{...r,maxDepth:a+(r.depth||3),allowFunction:r.allowFunction||!1}};i.emit(j,x)};return n.isAction=!0,n.implicit=t.implicit,n}var T=(e,t)=>typeof t[e]>"u"&&!(e in t),B=e=>{let{initialArgs:t,argTypes:r,id:n,parameters:{actions:s}}=e;if(!s||s.disable||!s.argTypesRegex||!r)return{};let i=new RegExp(s.argTypesRegex);return Object.entries(r).filter(([c])=>!!i.test(c)).reduce((c,[a,u])=>(T(a,t)&&(c[a]=_(a,{implicit:!0,id:n})),c),{})},M=e=>{let{initialArgs:t,argTypes:r,parameters:{actions:n}}=e;return n!=null&&n.disable||!r?{}:Object.entries(r).filter(([s,i])=>!!i.action).reduce((s,[i,c])=>(T(i,t)&&(s[i]=_(typeof c.action=="string"?c.action:i)),s),{})},Y=[M,B],m=!1,P=e=>{let{parameters:{actions:t}}=e;if(!(t!=null&&t.disable)&&!m&&"__STORYBOOK_TEST_ON_MOCK_CALL__"in d&&typeof d.__STORYBOOK_TEST_ON_MOCK_CALL__=="function"){let r=d.__STORYBOOK_TEST_ON_MOCK_CALL__;r((n,s)=>{let i=n.getMockName();i!=="spy"&&(!/^next\/.*::/.test(i)||["next/router::useRouter()","next/navigation::useRouter()","next/navigation::redirect","next/cache::","next/headers::cookies().set","next/headers::cookies().delete","next/headers::headers().set","next/headers::headers().delete"].some(c=>i.startsWith(c)))&&_(i)(s)}),m=!0}},N=[P];export{Y as argsEnhancers,N as loaders};
|
||||
@@ -0,0 +1,7 @@
|
||||
const{STORY_CHANGED:r}=__STORYBOOK_MODULE_CORE_EVENTS__,{addons:s}=__STORYBOOK_MODULE_PREVIEW_API__,{global:O}=__STORYBOOK_MODULE_GLOBAL__;var d="storybook/highlight",i="storybookHighlight",g=`${d}/add`,E=`${d}/reset`,{document:l}=O,H=(e="#FF4785",t="dashed")=>`
|
||||
outline: 2px ${t} ${e};
|
||||
outline-offset: 2px;
|
||||
box-shadow: 0 0 0 6px rgba(255,255,255,0.6);
|
||||
`,h=s.getChannel(),T=e=>{let t=i;n();let o=Array.from(new Set(e.elements)),_=l.createElement("style");_.setAttribute("id",t),_.innerHTML=o.map(a=>`${a}{
|
||||
${H(e.color,e.style)}
|
||||
}`).join(" "),l.head.appendChild(_)},n=()=>{var o;let e=i,t=l.getElementById(e);t&&((o=t.parentNode)==null||o.removeChild(t))};h.on(r,n);h.on(E,n);h.on(g,T);
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user