@rainbow-robotics/muscat-plugin-kit 1.3.0 → 1.3.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cli/storybook-dist/assets/{Color-YHDXOIA2-DixbmWSF.js → Color-YHDXOIA2-CRNvRzJD.js} +1 -1
- package/cli/storybook-dist/assets/{Docs-D6oFYDre.js → Docs-80l_9VTs.js} +1 -1
- package/cli/storybook-dist/assets/{Docs-DcUa4nGr.js → Docs-BV0FgAF_.js} +1 -1
- package/cli/storybook-dist/assets/{Docs-Blx_41TT.js → Docs-BgDx9SSn.js} +1 -1
- package/cli/storybook-dist/assets/{Docs-Dv-5qjF4.js → Docs-C4S_Kfa9.js} +1 -1
- package/cli/storybook-dist/assets/{Docs-CMEiBjLz.js → Docs-DurNQvJo.js} +1 -1
- package/cli/storybook-dist/assets/{Docs-C0E3mHmn.js → Docs-axk94PIl.js} +1 -1
- package/cli/storybook-dist/assets/{DocsRenderer-CFRXHY34-GwWANrWN.js → DocsRenderer-CFRXHY34-CEdKXElc.js} +1 -1
- package/cli/storybook-dist/assets/{entry-preview-NpzneD8a.js → entry-preview-COJgWzHb.js} +1 -1
- package/cli/storybook-dist/assets/{iframe-DsvRKHwc.js → iframe-DQEjJuXA.js} +2 -2
- package/cli/storybook-dist/assets/{index-BzvSJzrT.js → index-DEgQqQ_-.js} +3 -3
- package/cli/storybook-dist/assets/{preview-yXaYuZ78.js → preview-BZ5PpEp_.js} +2 -2
- package/cli/storybook-dist/assets/preview-CmCb8Xea.js +3 -0
- package/cli/storybook-dist/assets/preview-zuAvMksL.css +1 -0
- package/cli/storybook-dist/iframe.html +1 -1
- package/cli/storybook-dist/project.json +1 -1
- package/package.json +3 -3
- package/cli/storybook-dist/assets/preview-BXXleNPp.css +0 -1
- package/cli/storybook-dist/assets/preview-BXxjLQ9M.js +0 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
import{d as ce,Z as Y,g as he,v as M,s as fe,Q as de,M as ge,_ as be,a as q}from"./index-BzvSJzrT.js";import{r as p,R as m}from"./index-Dmy2JGbm.js";import"./iframe-DsvRKHwc.js";import"./jsx-runtime-BTJTZTIL.js";import"./index-ChsGqxH_.js";import"./index-CT3U1fyk.js";import"./index-BRq5TIsn.js";import"./index-DgH-xKnr.js";import"./index-DrFu-skq.js";var me=q({"../../node_modules/color-name/index.js"(n,o){o.exports={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]}}}),Z=q({"../../node_modules/color-convert/conversions.js"(n,o){var c=me(),h={};for(let e of Object.keys(c))h[c[e]]=e;var i={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"]}};o.exports=i;for(let e of Object.keys(i)){if(!("channels"in i[e]))throw new Error("missing channels property: "+e);if(!("labels"in i[e]))throw new Error("missing channel labels property: "+e);if(i[e].labels.length!==i[e].channels)throw new Error("channel and label counts mismatch: "+e);let{channels:t,labels:r}=i[e];delete i[e].channels,delete i[e].labels,Object.defineProperty(i[e],"channels",{value:t}),Object.defineProperty(i[e],"labels",{value:r})}i.rgb.hsl=function(e){let t=e[0]/255,r=e[1]/255,a=e[2]/255,l=Math.min(t,r,a),u=Math.max(t,r,a),s=u-l,f,g;u===l?f=0:t===u?f=(r-a)/s:r===u?f=2+(a-t)/s:a===u&&(f=4+(t-r)/s),f=Math.min(f*60,360),f<0&&(f+=360);let b=(l+u)/2;return u===l?g=0:b<=.5?g=s/(u+l):g=s/(2-u-l),[f,g*100,b*100]},i.rgb.hsv=function(e){let t,r,a,l,u,s=e[0]/255,f=e[1]/255,g=e[2]/255,b=Math.max(s,f,g),y=b-Math.min(s,f,g),v=function(w){return(b-w)/6/y+1/2};return y===0?(l=0,u=0):(u=y/b,t=v(s),r=v(f),a=v(g),s===b?l=a-r:f===b?l=1/3+t-a:g===b&&(l=2/3+r-t),l<0?l+=1:l>1&&(l-=1)),[l*360,u*100,b*100]},i.rgb.hwb=function(e){let t=e[0],r=e[1],a=e[2],l=i.rgb.hsl(e)[0],u=1/255*Math.min(t,Math.min(r,a));return a=1-1/255*Math.max(t,Math.max(r,a)),[l,u*100,a*100]},i.rgb.cmyk=function(e){let t=e[0]/255,r=e[1]/255,a=e[2]/255,l=Math.min(1-t,1-r,1-a),u=(1-t-l)/(1-l)||0,s=(1-r-l)/(1-l)||0,f=(1-a-l)/(1-l)||0;return[u*100,s*100,f*100,l*100]};function d(e,t){return(e[0]-t[0])**2+(e[1]-t[1])**2+(e[2]-t[2])**2}i.rgb.keyword=function(e){let t=h[e];if(t)return t;let r=1/0,a;for(let l of Object.keys(c)){let u=c[l],s=d(e,u);s<r&&(r=s,a=l)}return a},i.keyword.rgb=function(e){return c[e]},i.rgb.xyz=function(e){let t=e[0]/255,r=e[1]/255,a=e[2]/255;t=t>.04045?((t+.055)/1.055)**2.4:t/12.92,r=r>.04045?((r+.055)/1.055)**2.4:r/12.92,a=a>.04045?((a+.055)/1.055)**2.4:a/12.92;let l=t*.4124+r*.3576+a*.1805,u=t*.2126+r*.7152+a*.0722,s=t*.0193+r*.1192+a*.9505;return[l*100,u*100,s*100]},i.rgb.lab=function(e){let t=i.rgb.xyz(e),r=t[0],a=t[1],l=t[2];r/=95.047,a/=100,l/=108.883,r=r>.008856?r**(1/3):7.787*r+16/116,a=a>.008856?a**(1/3):7.787*a+16/116,l=l>.008856?l**(1/3):7.787*l+16/116;let u=116*a-16,s=500*(r-a),f=200*(a-l);return[u,s,f]},i.hsl.rgb=function(e){let t=e[0]/360,r=e[1]/100,a=e[2]/100,l,u,s;if(r===0)return s=a*255,[s,s,s];a<.5?l=a*(1+r):l=a+r-a*r;let f=2*a-l,g=[0,0,0];for(let b=0;b<3;b++)u=t+1/3*-(b-1),u<0&&u++,u>1&&u--,6*u<1?s=f+(l-f)*6*u:2*u<1?s=l:3*u<2?s=f+(l-f)*(2/3-u)*6:s=f,g[b]=s*255;return g},i.hsl.hsv=function(e){let t=e[0],r=e[1]/100,a=e[2]/100,l=r,u=Math.max(a,.01);a*=2,r*=a<=1?a:2-a,l*=u<=1?u:2-u;let s=(a+r)/2,f=a===0?2*l/(u+l):2*r/(a+r);return[t,f*100,s*100]},i.hsv.rgb=function(e){let t=e[0]/60,r=e[1]/100,a=e[2]/100,l=Math.floor(t)%6,u=t-Math.floor(t),s=255*a*(1-r),f=255*a*(1-r*u),g=255*a*(1-r*(1-u));switch(a*=255,l){case 0:return[a,g,s];case 1:return[f,a,s];case 2:return[s,a,g];case 3:return[s,f,a];case 4:return[g,s,a];case 5:return[a,s,f]}},i.hsv.hsl=function(e){let t=e[0],r=e[1]/100,a=e[2]/100,l=Math.max(a,.01),u,s;s=(2-r)*a;let f=(2-r)*l;return u=r*l,u/=f<=1?f:2-f,u=u||0,s/=2,[t,u*100,s*100]},i.hwb.rgb=function(e){let t=e[0]/360,r=e[1]/100,a=e[2]/100,l=r+a,u;l>1&&(r/=l,a/=l);let s=Math.floor(6*t),f=1-a;u=6*t-s,(s&1)!==0&&(u=1-u);let g=r+u*(f-r),b,y,v;switch(s){default:case 6:case 0:b=f,y=g,v=r;break;case 1:b=g,y=f,v=r;break;case 2:b=r,y=f,v=g;break;case 3:b=r,y=g,v=f;break;case 4:b=g,y=r,v=f;break;case 5:b=f,y=r,v=g;break}return[b*255,y*255,v*255]},i.cmyk.rgb=function(e){let t=e[0]/100,r=e[1]/100,a=e[2]/100,l=e[3]/100,u=1-Math.min(1,t*(1-l)+l),s=1-Math.min(1,r*(1-l)+l),f=1-Math.min(1,a*(1-l)+l);return[u*255,s*255,f*255]},i.xyz.rgb=function(e){let t=e[0]/100,r=e[1]/100,a=e[2]/100,l,u,s;return l=t*3.2406+r*-1.5372+a*-.4986,u=t*-.9689+r*1.8758+a*.0415,s=t*.0557+r*-.204+a*1.057,l=l>.0031308?1.055*l**(1/2.4)-.055:l*12.92,u=u>.0031308?1.055*u**(1/2.4)-.055:u*12.92,s=s>.0031308?1.055*s**(1/2.4)-.055:s*12.92,l=Math.min(Math.max(0,l),1),u=Math.min(Math.max(0,u),1),s=Math.min(Math.max(0,s),1),[l*255,u*255,s*255]},i.xyz.lab=function(e){let t=e[0],r=e[1],a=e[2];t/=95.047,r/=100,a/=108.883,t=t>.008856?t**(1/3):7.787*t+16/116,r=r>.008856?r**(1/3):7.787*r+16/116,a=a>.008856?a**(1/3):7.787*a+16/116;let l=116*r-16,u=500*(t-r),s=200*(r-a);return[l,u,s]},i.lab.xyz=function(e){let t=e[0],r=e[1],a=e[2],l,u,s;u=(t+16)/116,l=r/500+u,s=u-a/200;let f=u**3,g=l**3,b=s**3;return u=f>.008856?f:(u-16/116)/7.787,l=g>.008856?g:(l-16/116)/7.787,s=b>.008856?b:(s-16/116)/7.787,l*=95.047,u*=100,s*=108.883,[l,u,s]},i.lab.lch=function(e){let t=e[0],r=e[1],a=e[2],l;l=Math.atan2(a,r)*360/2/Math.PI,l<0&&(l+=360);let u=Math.sqrt(r*r+a*a);return[t,u,l]},i.lch.lab=function(e){let t=e[0],r=e[1],a=e[2]/360*2*Math.PI,l=r*Math.cos(a),u=r*Math.sin(a);return[t,l,u]},i.rgb.ansi16=function(e,t=null){let[r,a,l]=e,u=t===null?i.rgb.hsv(e)[2]:t;if(u=Math.round(u/50),u===0)return 30;let s=30+(Math.round(l/255)<<2|Math.round(a/255)<<1|Math.round(r/255));return u===2&&(s+=60),s},i.hsv.ansi16=function(e){return i.rgb.ansi16(i.hsv.rgb(e),e[2])},i.rgb.ansi256=function(e){let t=e[0],r=e[1],a=e[2];return t===r&&r===a?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(a/255*5)},i.ansi16.rgb=function(e){let t=e%10;if(t===0||t===7)return e>50&&(t+=3.5),t=t/10.5*255,[t,t,t];let r=(~~(e>50)+1)*.5,a=(t&1)*r*255,l=(t>>1&1)*r*255,u=(t>>2&1)*r*255;return[a,l,u]},i.ansi256.rgb=function(e){if(e>=232){let u=(e-232)*10+8;return[u,u,u]}e-=16;let t,r=Math.floor(e/36)/5*255,a=Math.floor((t=e%36)/6)/5*255,l=t%6/5*255;return[r,a,l]},i.rgb.hex=function(e){let t=(((Math.round(e[0])&255)<<16)+((Math.round(e[1])&255)<<8)+(Math.round(e[2])&255)).toString(16).toUpperCase();return"000000".substring(t.length)+t},i.hex.rgb=function(e){let t=e.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!t)return[0,0,0];let r=t[0];t[0].length===3&&(r=r.split("").map(f=>f+f).join(""));let a=parseInt(r,16),l=a>>16&255,u=a>>8&255,s=a&255;return[l,u,s]},i.rgb.hcg=function(e){let t=e[0]/255,r=e[1]/255,a=e[2]/255,l=Math.max(Math.max(t,r),a),u=Math.min(Math.min(t,r),a),s=l-u,f,g;return s<1?f=u/(1-s):f=0,s<=0?g=0:l===t?g=(r-a)/s%6:l===r?g=2+(a-t)/s:g=4+(t-r)/s,g/=6,g%=1,[g*360,s*100,f*100]},i.hsl.hcg=function(e){let t=e[1]/100,r=e[2]/100,a=r<.5?2*t*r:2*t*(1-r),l=0;return a<1&&(l=(r-.5*a)/(1-a)),[e[0],a*100,l*100]},i.hsv.hcg=function(e){let t=e[1]/100,r=e[2]/100,a=t*r,l=0;return a<1&&(l=(r-a)/(1-a)),[e[0],a*100,l*100]},i.hcg.rgb=function(e){let t=e[0]/360,r=e[1]/100,a=e[2]/100;if(r===0)return[a*255,a*255,a*255];let l=[0,0,0],u=t%1*6,s=u%1,f=1-s,g=0;switch(Math.floor(u)){case 0:l[0]=1,l[1]=s,l[2]=0;break;case 1:l[0]=f,l[1]=1,l[2]=0;break;case 2:l[0]=0,l[1]=1,l[2]=s;break;case 3:l[0]=0,l[1]=f,l[2]=1;break;case 4:l[0]=s,l[1]=0,l[2]=1;break;default:l[0]=1,l[1]=0,l[2]=f}return g=(1-r)*a,[(r*l[0]+g)*255,(r*l[1]+g)*255,(r*l[2]+g)*255]},i.hcg.hsv=function(e){let t=e[1]/100,r=e[2]/100,a=t+r*(1-t),l=0;return a>0&&(l=t/a),[e[0],l*100,a*100]},i.hcg.hsl=function(e){let t=e[1]/100,r=e[2]/100*(1-t)+.5*t,a=0;return r>0&&r<.5?a=t/(2*r):r>=.5&&r<1&&(a=t/(2*(1-r))),[e[0],a*100,r*100]},i.hcg.hwb=function(e){let t=e[1]/100,r=e[2]/100,a=t+r*(1-t);return[e[0],(a-t)*100,(1-a)*100]},i.hwb.hcg=function(e){let t=e[1]/100,r=1-e[2]/100,a=r-t,l=0;return a<1&&(l=(r-a)/(1-a)),[e[0],a*100,l*100]},i.apple.rgb=function(e){return[e[0]/65535*255,e[1]/65535*255,e[2]/65535*255]},i.rgb.apple=function(e){return[e[0]/255*65535,e[1]/255*65535,e[2]/255*65535]},i.gray.rgb=function(e){return[e[0]/100*255,e[0]/100*255,e[0]/100*255]},i.gray.hsl=function(e){return[0,0,e[0]]},i.gray.hsv=i.gray.hsl,i.gray.hwb=function(e){return[0,100,e[0]]},i.gray.cmyk=function(e){return[0,0,0,e[0]]},i.gray.lab=function(e){return[e[0],0,0]},i.gray.hex=function(e){let t=Math.round(e[0]/100*255)&255,r=((t<<16)+(t<<8)+t).toString(16).toUpperCase();return"000000".substring(r.length)+r},i.rgb.gray=function(e){return[(e[0]+e[1]+e[2])/3/255*100]}}}),ve=q({"../../node_modules/color-convert/route.js"(n,o){var c=Z();function h(){let t={},r=Object.keys(c);for(let a=r.length,l=0;l<a;l++)t[r[l]]={distance:-1,parent:null};return t}function i(t){let r=h(),a=[t];for(r[t].distance=0;a.length;){let l=a.pop(),u=Object.keys(c[l]);for(let s=u.length,f=0;f<s;f++){let g=u[f],b=r[g];b.distance===-1&&(b.distance=r[l].distance+1,b.parent=l,a.unshift(g))}}return r}function d(t,r){return function(a){return r(t(a))}}function e(t,r){let a=[r[t].parent,t],l=c[r[t].parent][t],u=r[t].parent;for(;r[u].parent;)a.unshift(r[u].parent),l=d(c[r[u].parent][u],l),u=r[u].parent;return l.conversion=a,l}o.exports=function(t){let r=i(t),a={},l=Object.keys(r);for(let u=l.length,s=0;s<u;s++){let f=l[s];r[f].parent!==null&&(a[f]=e(f,r))}return a}}}),pe=q({"../../node_modules/color-convert/index.js"(n,o){var c=Z(),h=ve(),i={},d=Object.keys(c);function e(r){let a=function(...l){let u=l[0];return u==null?u:(u.length>1&&(l=u),r(l))};return"conversion"in r&&(a.conversion=r.conversion),a}function t(r){let a=function(...l){let u=l[0];if(u==null)return u;u.length>1&&(l=u);let s=r(l);if(typeof s=="object")for(let f=s.length,g=0;g<f;g++)s[g]=Math.round(s[g]);return s};return"conversion"in r&&(a.conversion=r.conversion),a}d.forEach(r=>{i[r]={},Object.defineProperty(i[r],"channels",{value:c[r].channels}),Object.defineProperty(i[r],"labels",{value:c[r].labels});let a=h(r);Object.keys(a).forEach(l=>{let u=a[l];i[r][l]=t(u),i[r][l].raw=e(u)})}),o.exports=i}}),_=be(pe());function C(){return(C=Object.assign||function(n){for(var o=1;o<arguments.length;o++){var c=arguments[o];for(var h in c)Object.prototype.hasOwnProperty.call(c,h)&&(n[h]=c[h])}return n}).apply(this,arguments)}function V(n,o){if(n==null)return{};var c,h,i={},d=Object.keys(n);for(h=0;h<d.length;h++)o.indexOf(c=d[h])>=0||(i[c]=n[c]);return i}function L(n){var o=p.useRef(n),c=p.useRef(function(h){o.current&&o.current(h)});return o.current=n,c.current}var O=function(n,o,c){return o===void 0&&(o=0),c===void 0&&(c=1),n>c?c:n<o?o:n},S=function(n){return"touches"in n},B=function(n){return n&&n.ownerDocument.defaultView||self},T=function(n,o,c){var h=n.getBoundingClientRect(),i=S(o)?(function(d,e){for(var t=0;t<d.length;t++)if(d[t].identifier===e)return d[t];return d[0]})(o.touches,c):o;return{left:O((i.pageX-(h.left+B(n).pageXOffset))/h.width),top:O((i.pageY-(h.top+B(n).pageYOffset))/h.height)}},W=function(n){!S(n)&&n.preventDefault()},G=m.memo(function(n){var o=n.onMove,c=n.onKey,h=V(n,["onMove","onKey"]),i=p.useRef(null),d=L(o),e=L(c),t=p.useRef(null),r=p.useRef(!1),a=p.useMemo(function(){var f=function(y){W(y),(S(y)?y.touches.length>0:y.buttons>0)&&i.current?d(T(i.current,y,t.current)):b(!1)},g=function(){return b(!1)};function b(y){var v=r.current,w=B(i.current),E=y?w.addEventListener:w.removeEventListener;E(v?"touchmove":"mousemove",f),E(v?"touchend":"mouseup",g)}return[function(y){var v=y.nativeEvent,w=i.current;if(w&&(W(v),!(function(k,P){return P&&!S(k)})(v,r.current)&&w)){if(S(v)){r.current=!0;var E=v.changedTouches||[];E.length&&(t.current=E[0].identifier)}w.focus(),d(T(w,v,t.current)),b(!0)}},function(y){var v=y.which||y.keyCode;v<37||v>40||(y.preventDefault(),e({left:v===39?.05:v===37?-.05:0,top:v===40?.05:v===38?-.05:0}))},b]},[e,d]),l=a[0],u=a[1],s=a[2];return p.useEffect(function(){return s},[s]),m.createElement("div",C({},h,{onTouchStart:l,onMouseDown:l,className:"react-colorful__interactive",ref:i,onKeyDown:u,tabIndex:0,role:"slider"}))}),N=function(n){return n.filter(Boolean).join(" ")},F=function(n){var o=n.color,c=n.left,h=n.top,i=h===void 0?.5:h,d=N(["react-colorful__pointer",n.className]);return m.createElement("div",{className:d,style:{top:100*i+"%",left:100*c+"%"}},m.createElement("div",{className:"react-colorful__pointer-fill",style:{backgroundColor:o}}))},x=function(n,o,c){return o===void 0&&(o=0),c===void 0&&(c=Math.pow(10,o)),Math.round(c*n)/c},ye={grad:.9,turn:360,rad:360/(2*Math.PI)},xe=function(n){return re(X(n))},X=function(n){return n[0]==="#"&&(n=n.substring(1)),n.length<6?{r:parseInt(n[0]+n[0],16),g:parseInt(n[1]+n[1],16),b:parseInt(n[2]+n[2],16),a:n.length===4?x(parseInt(n[3]+n[3],16)/255,2):1}:{r:parseInt(n.substring(0,2),16),g:parseInt(n.substring(2,4),16),b:parseInt(n.substring(4,6),16),a:n.length===8?x(parseInt(n.substring(6,8),16)/255,2):1}},we=function(n,o){return o===void 0&&(o="deg"),Number(n)*(ye[o]||1)},ke=function(n){var o=/hsla?\(?\s*(-?\d*\.?\d+)(deg|rad|grad|turn)?[,\s]+(-?\d*\.?\d+)%?[,\s]+(-?\d*\.?\d+)%?,?\s*[/\s]*(-?\d*\.?\d+)?(%)?\s*\)?/i.exec(n);return o?_e({h:we(o[1],o[2]),s:Number(o[3]),l:Number(o[4]),a:o[5]===void 0?1:Number(o[5])/(o[6]?100:1)}):{h:0,s:0,v:0,a:1}},_e=function(n){var o=n.s,c=n.l;return{h:n.h,s:(o*=(c<50?c:100-c)/100)>0?2*o/(c+o)*100:0,v:c+o,a:n.a}},Ee=function(n){return Ce(ee(n))},J=function(n){var o=n.s,c=n.v,h=n.a,i=(200-o)*c/100;return{h:x(n.h),s:x(i>0&&i<200?o*c/100/(i<=100?i:200-i)*100:0),l:x(i/2),a:x(h,2)}},K=function(n){var o=J(n);return"hsl("+o.h+", "+o.s+"%, "+o.l+"%)"},I=function(n){var o=J(n);return"hsla("+o.h+", "+o.s+"%, "+o.l+"%, "+o.a+")"},ee=function(n){var o=n.h,c=n.s,h=n.v,i=n.a;o=o/360*6,c/=100,h/=100;var d=Math.floor(o),e=h*(1-c),t=h*(1-(o-d)*c),r=h*(1-(1-o+d)*c),a=d%6;return{r:x(255*[h,t,e,e,r,h][a]),g:x(255*[r,h,h,t,e,e][a]),b:x(255*[e,e,r,h,h,t][a]),a:x(i,2)}},Me=function(n){var o=/rgba?\(?\s*(-?\d*\.?\d+)(%)?[,\s]+(-?\d*\.?\d+)(%)?[,\s]+(-?\d*\.?\d+)(%)?,?\s*[/\s]*(-?\d*\.?\d+)?(%)?\s*\)?/i.exec(n);return o?re({r:Number(o[1])/(o[2]?100/255:1),g:Number(o[3])/(o[4]?100/255:1),b:Number(o[5])/(o[6]?100/255:1),a:o[7]===void 0?1:Number(o[7])/(o[8]?100:1)}):{h:0,s:0,v:0,a:1}},j=function(n){var o=n.toString(16);return o.length<2?"0"+o:o},Ce=function(n){var o=n.r,c=n.g,h=n.b,i=n.a,d=i<1?j(x(255*i)):"";return"#"+j(o)+j(c)+j(h)+d},re=function(n){var o=n.r,c=n.g,h=n.b,i=n.a,d=Math.max(o,c,h),e=d-Math.min(o,c,h),t=e?d===o?(c-h)/e:d===c?2+(h-o)/e:4+(o-c)/e:0;return{h:x(60*(t<0?t+6:t)),s:x(d?e/d*100:0),v:x(d/255*100),a:i}},te=m.memo(function(n){var o=n.hue,c=n.onChange,h=N(["react-colorful__hue",n.className]);return m.createElement("div",{className:h},m.createElement(G,{onMove:function(i){c({h:360*i.left})},onKey:function(i){c({h:O(o+360*i.left,0,360)})},"aria-label":"Hue","aria-valuenow":x(o),"aria-valuemax":"360","aria-valuemin":"0"},m.createElement(F,{className:"react-colorful__hue-pointer",left:o/360,color:K({h:o,s:100,v:100,a:1})})))}),ne=m.memo(function(n){var o=n.hsva,c=n.onChange,h={backgroundColor:K({h:o.h,s:100,v:100,a:1})};return m.createElement("div",{className:"react-colorful__saturation",style:h},m.createElement(G,{onMove:function(i){c({s:100*i.left,v:100-100*i.top})},onKey:function(i){c({s:O(o.s+100*i.left,0,100),v:O(o.v-100*i.top,0,100)})},"aria-label":"Color","aria-valuetext":"Saturation "+x(o.s)+"%, Brightness "+x(o.v)+"%"},m.createElement(F,{className:"react-colorful__saturation-pointer",top:1-o.v/100,left:o.s/100,color:K(o)})))}),ae=function(n,o){if(n===o)return!0;for(var c in n)if(n[c]!==o[c])return!1;return!0},le=function(n,o){return n.replace(/\s/g,"")===o.replace(/\s/g,"")},$e=function(n,o){return n.toLowerCase()===o.toLowerCase()||ae(X(n),X(o))};function oe(n,o,c){var h=L(c),i=p.useState(function(){return n.toHsva(o)}),d=i[0],e=i[1],t=p.useRef({color:o,hsva:d});p.useEffect(function(){if(!n.equal(o,t.current.color)){var a=n.toHsva(o);t.current={hsva:a,color:o},e(a)}},[o,n]),p.useEffect(function(){var a;ae(d,t.current.hsva)||n.equal(a=n.fromHsva(d),t.current.color)||(t.current={hsva:d,color:a},h(a))},[d,n,h]);var r=p.useCallback(function(a){e(function(l){return Object.assign({},l,a)})},[]);return[d,r]}var Oe=typeof window<"u"?p.useLayoutEffect:p.useEffect,Se=function(){return typeof __webpack_nonce__<"u"?__webpack_nonce__:void 0},A=new Map,ue=function(n){Oe(function(){var o=n.current?n.current.ownerDocument:document;if(o!==void 0&&!A.has(o)){var c=o.createElement("style");c.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,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill-opacity=".05"><path d="M8 0h8v8H8zM0 8h8v8H0z"/></svg>')}.react-colorful__saturation-pointer{z-index:3}.react-colorful__hue-pointer{z-index:2}`,A.set(o,c);var h=Se();h&&c.setAttribute("nonce",h),o.head.appendChild(c)}},[])},Ne=function(n){var o=n.className,c=n.colorModel,h=n.color,i=h===void 0?c.defaultColor:h,d=n.onChange,e=V(n,["className","colorModel","color","onChange"]),t=p.useRef(null);ue(t);var r=oe(c,i,d),a=r[0],l=r[1],u=N(["react-colorful",o]);return m.createElement("div",C({},e,{ref:t,className:u}),m.createElement(ne,{hsva:a,onChange:l}),m.createElement(te,{hue:a.h,onChange:l,className:"react-colorful__last-control"}))},je={defaultColor:"000",toHsva:xe,fromHsva:function(n){return Ee({h:n.h,s:n.s,v:n.v,a:1})},equal:$e},Re=function(n){return m.createElement(Ne,C({},n,{colorModel:je}))},ze=function(n){var o=n.className,c=n.hsva,h=n.onChange,i={backgroundImage:"linear-gradient(90deg, "+I(Object.assign({},c,{a:0}))+", "+I(Object.assign({},c,{a:1}))+")"},d=N(["react-colorful__alpha",o]),e=x(100*c.a);return m.createElement("div",{className:d},m.createElement("div",{className:"react-colorful__alpha-gradient",style:i}),m.createElement(G,{onMove:function(t){h({a:t.left})},onKey:function(t){h({a:O(c.a+t.left)})},"aria-label":"Alpha","aria-valuetext":e+"%","aria-valuenow":e,"aria-valuemin":"0","aria-valuemax":"100"},m.createElement(F,{className:"react-colorful__alpha-pointer",left:c.a,color:I(c)})))},ie=function(n){var o=n.className,c=n.colorModel,h=n.color,i=h===void 0?c.defaultColor:h,d=n.onChange,e=V(n,["className","colorModel","color","onChange"]),t=p.useRef(null);ue(t);var r=oe(c,i,d),a=r[0],l=r[1],u=N(["react-colorful",o]);return m.createElement("div",C({},e,{ref:t,className:u}),m.createElement(ne,{hsva:a,onChange:l}),m.createElement(te,{hue:a.h,onChange:l}),m.createElement(ze,{hsva:a,onChange:l,className:"react-colorful__last-control"}))},Ie={defaultColor:"hsla(0, 0%, 0%, 1)",toHsva:ke,fromHsva:I,equal:le},He=function(n){return m.createElement(ie,C({},n,{colorModel:Ie}))},qe={defaultColor:"rgba(0, 0, 0, 1)",toHsva:Me,fromHsva:function(n){var o=ee(n);return"rgba("+o.r+", "+o.g+", "+o.b+", "+o.a+")"},equal:le},Pe=function(n){return m.createElement(ie,C({},n,{colorModel:qe}))},Le=M.div({position:"relative",maxWidth:250,'&[aria-readonly="true"]':{opacity:.5}}),Be=M(Y)({position:"absolute",zIndex:1,top:4,left:4,"[aria-readonly=true] &":{cursor:"not-allowed"}}),Xe=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"}}),Ke=M(fe)(({theme:n})=>({fontFamily:n.typography.fonts.base})),De=M.div({display:"grid",gridTemplateColumns:"repeat(9, 16px)",gap:6,padding:3,marginTop:5,width:200}),Ve=M.div(({theme:n,active:o})=>({width:16,height:16,boxShadow:o?`${n.appBorderColor} 0 0 0 1px inset, ${n.textMutedColor}50 0 0 0 4px`:`${n.appBorderColor} 0 0 0 1px inset`,borderRadius:n.appBorderRadius})),Ge=`url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill-opacity=".05"><path d="M8 0h8v8H8zM0 8h8v8H0z"/></svg>')`,Q=({value:n,style:o,...c})=>{let h=`linear-gradient(${n}, ${n}), ${Ge}, linear-gradient(#fff, #fff)`;return m.createElement(Ve,{...c,style:{...o,backgroundImage:h}})},Fe=M(de.Input)(({theme:n,readOnly:o})=>({width:"100%",paddingLeft:30,paddingRight:30,boxSizing:"border-box",fontFamily:n.typography.fonts.base})),Te=M(ge)(({theme:n})=>({position:"absolute",zIndex:1,top:6,right:7,width:20,height:20,padding:4,boxSizing:"border-box",cursor:"pointer",color:n.input.color})),se=(n=>(n.RGB="rgb",n.HSL="hsl",n.HEX="hex",n))(se||{}),R=Object.values(se),We=/\(([0-9]+),\s*([0-9]+)%?,\s*([0-9]+)%?,?\s*([0-9.]+)?\)/,Ae=/^\s*rgba?\(([0-9]+),\s*([0-9]+),\s*([0-9]+),?\s*([0-9.]+)?\)\s*$/i,Qe=/^\s*hsla?\(([0-9]+),\s*([0-9]+)%,\s*([0-9]+)%,?\s*([0-9.]+)?\)\s*$/i,D=/^\s*#?([0-9a-f]{3}|[0-9a-f]{6})\s*$/i,Ue=/^\s*#?([0-9a-f]{3})\s*$/i,Ye={hex:Re,rgb:Pe,hsl:He},z={hex:"transparent",rgb:"rgba(0, 0, 0, 0)",hsl:"hsla(0, 0%, 0%, 0)"},U=n=>{let o=n==null?void 0:n.match(We);if(!o)return[0,0,0,1];let[,c,h,i,d=1]=o;return[c,h,i,d].map(Number)},$=n=>{if(!n)return;let o=!0;if(Ae.test(n)){let[e,t,r,a]=U(n),[l,u,s]=_.default.rgb.hsl([e,t,r])||[0,0,0];return{valid:o,value:n,keyword:_.default.rgb.keyword([e,t,r]),colorSpace:"rgb",rgb:n,hsl:`hsla(${l}, ${u}%, ${s}%, ${a})`,hex:`#${_.default.rgb.hex([e,t,r]).toLowerCase()}`}}if(Qe.test(n)){let[e,t,r,a]=U(n),[l,u,s]=_.default.hsl.rgb([e,t,r])||[0,0,0];return{valid:o,value:n,keyword:_.default.hsl.keyword([e,t,r]),colorSpace:"hsl",rgb:`rgba(${l}, ${u}, ${s}, ${a})`,hsl:n,hex:`#${_.default.hsl.hex([e,t,r]).toLowerCase()}`}}let c=n.replace("#",""),h=_.default.keyword.rgb(c)||_.default.hex.rgb(c),i=_.default.rgb.hsl(h),d=n;if(/[^#a-f0-9]/i.test(n)?d=c:D.test(n)&&(d=`#${c}`),d.startsWith("#"))o=D.test(d);else try{_.default.keyword.hex(d)}catch{o=!1}return{valid:o,value:d,keyword:_.default.rgb.keyword(h),colorSpace:"hex",rgb:`rgba(${h[0]}, ${h[1]}, ${h[2]}, 1)`,hsl:`hsla(${i[0]}, ${i[1]}%, ${i[2]}%, 1)`,hex:d}},Ze=(n,o,c)=>{if(!n||!(o!=null&&o.valid))return z[c];if(c!=="hex")return(o==null?void 0:o[c])||z[c];if(!o.hex.startsWith("#"))try{return`#${_.default.keyword.hex(o.hex)}`}catch{return z.hex}let h=o.hex.match(Ue);if(!h)return D.test(o.hex)?o.hex:z.hex;let[i,d,e]=h[1].split("");return`#${i}${i}${d}${d}${e}${e}`},Je=(n,o)=>{let[c,h]=p.useState(n||""),[i,d]=p.useState(()=>$(c)),[e,t]=p.useState((i==null?void 0:i.colorSpace)||"hex");p.useEffect(()=>{let u=n||"",s=$(u);h(u),d(s),t((s==null?void 0:s.colorSpace)||"hex")},[n]);let r=p.useMemo(()=>Ze(c,i,e).toLowerCase(),[c,i,e]),a=p.useCallback(u=>{let s=$(u),f=(s==null?void 0:s.value)||u||"";h(f),f===""&&(d(void 0),o(void 0)),s&&(d(s),t(s.colorSpace),o(s.value))},[o]),l=p.useCallback(()=>{let u=R.indexOf(e)+1;u>=R.length&&(u=0),t(R[u]);let s=(i==null?void 0:i[R[u]])||"";h(s),o(s)},[i,e,o]);return{value:c,realValue:r,updateValue:a,color:i,colorSpace:e,cycleColorSpace:l}},H=n=>n.replace(/\s*/,"").toLowerCase(),er=(n,o,c)=>{let[h,i]=p.useState(o!=null&&o.valid?[o]:[]);p.useEffect(()=>{o===void 0&&i([])},[o]);let d=p.useMemo(()=>(n||[]).map(t=>typeof t=="string"?$(t):t.title?{...$(t.color),keyword:t.title}:$(t.color)).concat(h).filter(Boolean).slice(-27),[n,h]),e=p.useCallback(t=>{t!=null&&t.valid&&(d.some(r=>H(r[c])===H(t[c]))||i(r=>r.concat(t)))},[c,d]);return{presets:d,addPreset:e}},rr=({name:n,value:o,onChange:c,onFocus:h,onBlur:i,presetColors:d,startOpen:e=!1,argType:t})=>{var E;let r=p.useCallback(ce(c,200),[c]),{value:a,realValue:l,updateValue:u,color:s,colorSpace:f,cycleColorSpace:g}=Je(o,r),{presets:b,addPreset:y}=er(d,s,f),v=Ye[f],w=!!((E=t==null?void 0:t.table)!=null&&E.readonly);return m.createElement(Le,{"aria-readonly":w},m.createElement(Be,{startOpen:e,trigger:w?[null]:void 0,closeOnOutsideClick:!0,onVisibleChange:()=>y(s),tooltip:m.createElement(Xe,null,m.createElement(v,{color:l==="transparent"?"#000000":l,onChange:u,onFocus:h,onBlur:i}),b.length>0&&m.createElement(De,null,b.map((k,P)=>m.createElement(Y,{key:`${k.value}-${P}`,hasChrome:!1,tooltip:m.createElement(Ke,{note:k.keyword||k.value})},m.createElement(Q,{value:k[f],active:s&&H(k[f])===H(s[f]),onClick:()=>u(k.value)})))))},m.createElement(Q,{value:l,style:{margin:4}})),m.createElement(Fe,{id:he(n),value:a,onChange:k=>u(k.target.value),onFocus:k=>k.target.select(),readOnly:w,placeholder:"Choose color..."}),a?m.createElement(Te,{onClick:g}):null)},hr=rr;export{rr as ColorControl,hr as default};
|
|
1
|
+
import{d as ce,Z as Y,g as he,v as M,s as fe,Q as de,M as ge,_ as be,a as q}from"./index-DEgQqQ_-.js";import{r as p,R as m}from"./index-Dmy2JGbm.js";import"./iframe-DQEjJuXA.js";import"./jsx-runtime-BTJTZTIL.js";import"./index-ChsGqxH_.js";import"./index-CT3U1fyk.js";import"./index-BRq5TIsn.js";import"./index-DgH-xKnr.js";import"./index-DrFu-skq.js";var me=q({"../../node_modules/color-name/index.js"(n,o){o.exports={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]}}}),Z=q({"../../node_modules/color-convert/conversions.js"(n,o){var c=me(),h={};for(let e of Object.keys(c))h[c[e]]=e;var i={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"]}};o.exports=i;for(let e of Object.keys(i)){if(!("channels"in i[e]))throw new Error("missing channels property: "+e);if(!("labels"in i[e]))throw new Error("missing channel labels property: "+e);if(i[e].labels.length!==i[e].channels)throw new Error("channel and label counts mismatch: "+e);let{channels:t,labels:r}=i[e];delete i[e].channels,delete i[e].labels,Object.defineProperty(i[e],"channels",{value:t}),Object.defineProperty(i[e],"labels",{value:r})}i.rgb.hsl=function(e){let t=e[0]/255,r=e[1]/255,a=e[2]/255,l=Math.min(t,r,a),u=Math.max(t,r,a),s=u-l,f,g;u===l?f=0:t===u?f=(r-a)/s:r===u?f=2+(a-t)/s:a===u&&(f=4+(t-r)/s),f=Math.min(f*60,360),f<0&&(f+=360);let b=(l+u)/2;return u===l?g=0:b<=.5?g=s/(u+l):g=s/(2-u-l),[f,g*100,b*100]},i.rgb.hsv=function(e){let t,r,a,l,u,s=e[0]/255,f=e[1]/255,g=e[2]/255,b=Math.max(s,f,g),y=b-Math.min(s,f,g),v=function(w){return(b-w)/6/y+1/2};return y===0?(l=0,u=0):(u=y/b,t=v(s),r=v(f),a=v(g),s===b?l=a-r:f===b?l=1/3+t-a:g===b&&(l=2/3+r-t),l<0?l+=1:l>1&&(l-=1)),[l*360,u*100,b*100]},i.rgb.hwb=function(e){let t=e[0],r=e[1],a=e[2],l=i.rgb.hsl(e)[0],u=1/255*Math.min(t,Math.min(r,a));return a=1-1/255*Math.max(t,Math.max(r,a)),[l,u*100,a*100]},i.rgb.cmyk=function(e){let t=e[0]/255,r=e[1]/255,a=e[2]/255,l=Math.min(1-t,1-r,1-a),u=(1-t-l)/(1-l)||0,s=(1-r-l)/(1-l)||0,f=(1-a-l)/(1-l)||0;return[u*100,s*100,f*100,l*100]};function d(e,t){return(e[0]-t[0])**2+(e[1]-t[1])**2+(e[2]-t[2])**2}i.rgb.keyword=function(e){let t=h[e];if(t)return t;let r=1/0,a;for(let l of Object.keys(c)){let u=c[l],s=d(e,u);s<r&&(r=s,a=l)}return a},i.keyword.rgb=function(e){return c[e]},i.rgb.xyz=function(e){let t=e[0]/255,r=e[1]/255,a=e[2]/255;t=t>.04045?((t+.055)/1.055)**2.4:t/12.92,r=r>.04045?((r+.055)/1.055)**2.4:r/12.92,a=a>.04045?((a+.055)/1.055)**2.4:a/12.92;let l=t*.4124+r*.3576+a*.1805,u=t*.2126+r*.7152+a*.0722,s=t*.0193+r*.1192+a*.9505;return[l*100,u*100,s*100]},i.rgb.lab=function(e){let t=i.rgb.xyz(e),r=t[0],a=t[1],l=t[2];r/=95.047,a/=100,l/=108.883,r=r>.008856?r**(1/3):7.787*r+16/116,a=a>.008856?a**(1/3):7.787*a+16/116,l=l>.008856?l**(1/3):7.787*l+16/116;let u=116*a-16,s=500*(r-a),f=200*(a-l);return[u,s,f]},i.hsl.rgb=function(e){let t=e[0]/360,r=e[1]/100,a=e[2]/100,l,u,s;if(r===0)return s=a*255,[s,s,s];a<.5?l=a*(1+r):l=a+r-a*r;let f=2*a-l,g=[0,0,0];for(let b=0;b<3;b++)u=t+1/3*-(b-1),u<0&&u++,u>1&&u--,6*u<1?s=f+(l-f)*6*u:2*u<1?s=l:3*u<2?s=f+(l-f)*(2/3-u)*6:s=f,g[b]=s*255;return g},i.hsl.hsv=function(e){let t=e[0],r=e[1]/100,a=e[2]/100,l=r,u=Math.max(a,.01);a*=2,r*=a<=1?a:2-a,l*=u<=1?u:2-u;let s=(a+r)/2,f=a===0?2*l/(u+l):2*r/(a+r);return[t,f*100,s*100]},i.hsv.rgb=function(e){let t=e[0]/60,r=e[1]/100,a=e[2]/100,l=Math.floor(t)%6,u=t-Math.floor(t),s=255*a*(1-r),f=255*a*(1-r*u),g=255*a*(1-r*(1-u));switch(a*=255,l){case 0:return[a,g,s];case 1:return[f,a,s];case 2:return[s,a,g];case 3:return[s,f,a];case 4:return[g,s,a];case 5:return[a,s,f]}},i.hsv.hsl=function(e){let t=e[0],r=e[1]/100,a=e[2]/100,l=Math.max(a,.01),u,s;s=(2-r)*a;let f=(2-r)*l;return u=r*l,u/=f<=1?f:2-f,u=u||0,s/=2,[t,u*100,s*100]},i.hwb.rgb=function(e){let t=e[0]/360,r=e[1]/100,a=e[2]/100,l=r+a,u;l>1&&(r/=l,a/=l);let s=Math.floor(6*t),f=1-a;u=6*t-s,(s&1)!==0&&(u=1-u);let g=r+u*(f-r),b,y,v;switch(s){default:case 6:case 0:b=f,y=g,v=r;break;case 1:b=g,y=f,v=r;break;case 2:b=r,y=f,v=g;break;case 3:b=r,y=g,v=f;break;case 4:b=g,y=r,v=f;break;case 5:b=f,y=r,v=g;break}return[b*255,y*255,v*255]},i.cmyk.rgb=function(e){let t=e[0]/100,r=e[1]/100,a=e[2]/100,l=e[3]/100,u=1-Math.min(1,t*(1-l)+l),s=1-Math.min(1,r*(1-l)+l),f=1-Math.min(1,a*(1-l)+l);return[u*255,s*255,f*255]},i.xyz.rgb=function(e){let t=e[0]/100,r=e[1]/100,a=e[2]/100,l,u,s;return l=t*3.2406+r*-1.5372+a*-.4986,u=t*-.9689+r*1.8758+a*.0415,s=t*.0557+r*-.204+a*1.057,l=l>.0031308?1.055*l**(1/2.4)-.055:l*12.92,u=u>.0031308?1.055*u**(1/2.4)-.055:u*12.92,s=s>.0031308?1.055*s**(1/2.4)-.055:s*12.92,l=Math.min(Math.max(0,l),1),u=Math.min(Math.max(0,u),1),s=Math.min(Math.max(0,s),1),[l*255,u*255,s*255]},i.xyz.lab=function(e){let t=e[0],r=e[1],a=e[2];t/=95.047,r/=100,a/=108.883,t=t>.008856?t**(1/3):7.787*t+16/116,r=r>.008856?r**(1/3):7.787*r+16/116,a=a>.008856?a**(1/3):7.787*a+16/116;let l=116*r-16,u=500*(t-r),s=200*(r-a);return[l,u,s]},i.lab.xyz=function(e){let t=e[0],r=e[1],a=e[2],l,u,s;u=(t+16)/116,l=r/500+u,s=u-a/200;let f=u**3,g=l**3,b=s**3;return u=f>.008856?f:(u-16/116)/7.787,l=g>.008856?g:(l-16/116)/7.787,s=b>.008856?b:(s-16/116)/7.787,l*=95.047,u*=100,s*=108.883,[l,u,s]},i.lab.lch=function(e){let t=e[0],r=e[1],a=e[2],l;l=Math.atan2(a,r)*360/2/Math.PI,l<0&&(l+=360);let u=Math.sqrt(r*r+a*a);return[t,u,l]},i.lch.lab=function(e){let t=e[0],r=e[1],a=e[2]/360*2*Math.PI,l=r*Math.cos(a),u=r*Math.sin(a);return[t,l,u]},i.rgb.ansi16=function(e,t=null){let[r,a,l]=e,u=t===null?i.rgb.hsv(e)[2]:t;if(u=Math.round(u/50),u===0)return 30;let s=30+(Math.round(l/255)<<2|Math.round(a/255)<<1|Math.round(r/255));return u===2&&(s+=60),s},i.hsv.ansi16=function(e){return i.rgb.ansi16(i.hsv.rgb(e),e[2])},i.rgb.ansi256=function(e){let t=e[0],r=e[1],a=e[2];return t===r&&r===a?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(a/255*5)},i.ansi16.rgb=function(e){let t=e%10;if(t===0||t===7)return e>50&&(t+=3.5),t=t/10.5*255,[t,t,t];let r=(~~(e>50)+1)*.5,a=(t&1)*r*255,l=(t>>1&1)*r*255,u=(t>>2&1)*r*255;return[a,l,u]},i.ansi256.rgb=function(e){if(e>=232){let u=(e-232)*10+8;return[u,u,u]}e-=16;let t,r=Math.floor(e/36)/5*255,a=Math.floor((t=e%36)/6)/5*255,l=t%6/5*255;return[r,a,l]},i.rgb.hex=function(e){let t=(((Math.round(e[0])&255)<<16)+((Math.round(e[1])&255)<<8)+(Math.round(e[2])&255)).toString(16).toUpperCase();return"000000".substring(t.length)+t},i.hex.rgb=function(e){let t=e.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!t)return[0,0,0];let r=t[0];t[0].length===3&&(r=r.split("").map(f=>f+f).join(""));let a=parseInt(r,16),l=a>>16&255,u=a>>8&255,s=a&255;return[l,u,s]},i.rgb.hcg=function(e){let t=e[0]/255,r=e[1]/255,a=e[2]/255,l=Math.max(Math.max(t,r),a),u=Math.min(Math.min(t,r),a),s=l-u,f,g;return s<1?f=u/(1-s):f=0,s<=0?g=0:l===t?g=(r-a)/s%6:l===r?g=2+(a-t)/s:g=4+(t-r)/s,g/=6,g%=1,[g*360,s*100,f*100]},i.hsl.hcg=function(e){let t=e[1]/100,r=e[2]/100,a=r<.5?2*t*r:2*t*(1-r),l=0;return a<1&&(l=(r-.5*a)/(1-a)),[e[0],a*100,l*100]},i.hsv.hcg=function(e){let t=e[1]/100,r=e[2]/100,a=t*r,l=0;return a<1&&(l=(r-a)/(1-a)),[e[0],a*100,l*100]},i.hcg.rgb=function(e){let t=e[0]/360,r=e[1]/100,a=e[2]/100;if(r===0)return[a*255,a*255,a*255];let l=[0,0,0],u=t%1*6,s=u%1,f=1-s,g=0;switch(Math.floor(u)){case 0:l[0]=1,l[1]=s,l[2]=0;break;case 1:l[0]=f,l[1]=1,l[2]=0;break;case 2:l[0]=0,l[1]=1,l[2]=s;break;case 3:l[0]=0,l[1]=f,l[2]=1;break;case 4:l[0]=s,l[1]=0,l[2]=1;break;default:l[0]=1,l[1]=0,l[2]=f}return g=(1-r)*a,[(r*l[0]+g)*255,(r*l[1]+g)*255,(r*l[2]+g)*255]},i.hcg.hsv=function(e){let t=e[1]/100,r=e[2]/100,a=t+r*(1-t),l=0;return a>0&&(l=t/a),[e[0],l*100,a*100]},i.hcg.hsl=function(e){let t=e[1]/100,r=e[2]/100*(1-t)+.5*t,a=0;return r>0&&r<.5?a=t/(2*r):r>=.5&&r<1&&(a=t/(2*(1-r))),[e[0],a*100,r*100]},i.hcg.hwb=function(e){let t=e[1]/100,r=e[2]/100,a=t+r*(1-t);return[e[0],(a-t)*100,(1-a)*100]},i.hwb.hcg=function(e){let t=e[1]/100,r=1-e[2]/100,a=r-t,l=0;return a<1&&(l=(r-a)/(1-a)),[e[0],a*100,l*100]},i.apple.rgb=function(e){return[e[0]/65535*255,e[1]/65535*255,e[2]/65535*255]},i.rgb.apple=function(e){return[e[0]/255*65535,e[1]/255*65535,e[2]/255*65535]},i.gray.rgb=function(e){return[e[0]/100*255,e[0]/100*255,e[0]/100*255]},i.gray.hsl=function(e){return[0,0,e[0]]},i.gray.hsv=i.gray.hsl,i.gray.hwb=function(e){return[0,100,e[0]]},i.gray.cmyk=function(e){return[0,0,0,e[0]]},i.gray.lab=function(e){return[e[0],0,0]},i.gray.hex=function(e){let t=Math.round(e[0]/100*255)&255,r=((t<<16)+(t<<8)+t).toString(16).toUpperCase();return"000000".substring(r.length)+r},i.rgb.gray=function(e){return[(e[0]+e[1]+e[2])/3/255*100]}}}),ve=q({"../../node_modules/color-convert/route.js"(n,o){var c=Z();function h(){let t={},r=Object.keys(c);for(let a=r.length,l=0;l<a;l++)t[r[l]]={distance:-1,parent:null};return t}function i(t){let r=h(),a=[t];for(r[t].distance=0;a.length;){let l=a.pop(),u=Object.keys(c[l]);for(let s=u.length,f=0;f<s;f++){let g=u[f],b=r[g];b.distance===-1&&(b.distance=r[l].distance+1,b.parent=l,a.unshift(g))}}return r}function d(t,r){return function(a){return r(t(a))}}function e(t,r){let a=[r[t].parent,t],l=c[r[t].parent][t],u=r[t].parent;for(;r[u].parent;)a.unshift(r[u].parent),l=d(c[r[u].parent][u],l),u=r[u].parent;return l.conversion=a,l}o.exports=function(t){let r=i(t),a={},l=Object.keys(r);for(let u=l.length,s=0;s<u;s++){let f=l[s];r[f].parent!==null&&(a[f]=e(f,r))}return a}}}),pe=q({"../../node_modules/color-convert/index.js"(n,o){var c=Z(),h=ve(),i={},d=Object.keys(c);function e(r){let a=function(...l){let u=l[0];return u==null?u:(u.length>1&&(l=u),r(l))};return"conversion"in r&&(a.conversion=r.conversion),a}function t(r){let a=function(...l){let u=l[0];if(u==null)return u;u.length>1&&(l=u);let s=r(l);if(typeof s=="object")for(let f=s.length,g=0;g<f;g++)s[g]=Math.round(s[g]);return s};return"conversion"in r&&(a.conversion=r.conversion),a}d.forEach(r=>{i[r]={},Object.defineProperty(i[r],"channels",{value:c[r].channels}),Object.defineProperty(i[r],"labels",{value:c[r].labels});let a=h(r);Object.keys(a).forEach(l=>{let u=a[l];i[r][l]=t(u),i[r][l].raw=e(u)})}),o.exports=i}}),_=be(pe());function C(){return(C=Object.assign||function(n){for(var o=1;o<arguments.length;o++){var c=arguments[o];for(var h in c)Object.prototype.hasOwnProperty.call(c,h)&&(n[h]=c[h])}return n}).apply(this,arguments)}function V(n,o){if(n==null)return{};var c,h,i={},d=Object.keys(n);for(h=0;h<d.length;h++)o.indexOf(c=d[h])>=0||(i[c]=n[c]);return i}function L(n){var o=p.useRef(n),c=p.useRef(function(h){o.current&&o.current(h)});return o.current=n,c.current}var O=function(n,o,c){return o===void 0&&(o=0),c===void 0&&(c=1),n>c?c:n<o?o:n},S=function(n){return"touches"in n},B=function(n){return n&&n.ownerDocument.defaultView||self},T=function(n,o,c){var h=n.getBoundingClientRect(),i=S(o)?(function(d,e){for(var t=0;t<d.length;t++)if(d[t].identifier===e)return d[t];return d[0]})(o.touches,c):o;return{left:O((i.pageX-(h.left+B(n).pageXOffset))/h.width),top:O((i.pageY-(h.top+B(n).pageYOffset))/h.height)}},W=function(n){!S(n)&&n.preventDefault()},G=m.memo(function(n){var o=n.onMove,c=n.onKey,h=V(n,["onMove","onKey"]),i=p.useRef(null),d=L(o),e=L(c),t=p.useRef(null),r=p.useRef(!1),a=p.useMemo(function(){var f=function(y){W(y),(S(y)?y.touches.length>0:y.buttons>0)&&i.current?d(T(i.current,y,t.current)):b(!1)},g=function(){return b(!1)};function b(y){var v=r.current,w=B(i.current),E=y?w.addEventListener:w.removeEventListener;E(v?"touchmove":"mousemove",f),E(v?"touchend":"mouseup",g)}return[function(y){var v=y.nativeEvent,w=i.current;if(w&&(W(v),!(function(k,P){return P&&!S(k)})(v,r.current)&&w)){if(S(v)){r.current=!0;var E=v.changedTouches||[];E.length&&(t.current=E[0].identifier)}w.focus(),d(T(w,v,t.current)),b(!0)}},function(y){var v=y.which||y.keyCode;v<37||v>40||(y.preventDefault(),e({left:v===39?.05:v===37?-.05:0,top:v===40?.05:v===38?-.05:0}))},b]},[e,d]),l=a[0],u=a[1],s=a[2];return p.useEffect(function(){return s},[s]),m.createElement("div",C({},h,{onTouchStart:l,onMouseDown:l,className:"react-colorful__interactive",ref:i,onKeyDown:u,tabIndex:0,role:"slider"}))}),N=function(n){return n.filter(Boolean).join(" ")},F=function(n){var o=n.color,c=n.left,h=n.top,i=h===void 0?.5:h,d=N(["react-colorful__pointer",n.className]);return m.createElement("div",{className:d,style:{top:100*i+"%",left:100*c+"%"}},m.createElement("div",{className:"react-colorful__pointer-fill",style:{backgroundColor:o}}))},x=function(n,o,c){return o===void 0&&(o=0),c===void 0&&(c=Math.pow(10,o)),Math.round(c*n)/c},ye={grad:.9,turn:360,rad:360/(2*Math.PI)},xe=function(n){return re(X(n))},X=function(n){return n[0]==="#"&&(n=n.substring(1)),n.length<6?{r:parseInt(n[0]+n[0],16),g:parseInt(n[1]+n[1],16),b:parseInt(n[2]+n[2],16),a:n.length===4?x(parseInt(n[3]+n[3],16)/255,2):1}:{r:parseInt(n.substring(0,2),16),g:parseInt(n.substring(2,4),16),b:parseInt(n.substring(4,6),16),a:n.length===8?x(parseInt(n.substring(6,8),16)/255,2):1}},we=function(n,o){return o===void 0&&(o="deg"),Number(n)*(ye[o]||1)},ke=function(n){var o=/hsla?\(?\s*(-?\d*\.?\d+)(deg|rad|grad|turn)?[,\s]+(-?\d*\.?\d+)%?[,\s]+(-?\d*\.?\d+)%?,?\s*[/\s]*(-?\d*\.?\d+)?(%)?\s*\)?/i.exec(n);return o?_e({h:we(o[1],o[2]),s:Number(o[3]),l:Number(o[4]),a:o[5]===void 0?1:Number(o[5])/(o[6]?100:1)}):{h:0,s:0,v:0,a:1}},_e=function(n){var o=n.s,c=n.l;return{h:n.h,s:(o*=(c<50?c:100-c)/100)>0?2*o/(c+o)*100:0,v:c+o,a:n.a}},Ee=function(n){return Ce(ee(n))},J=function(n){var o=n.s,c=n.v,h=n.a,i=(200-o)*c/100;return{h:x(n.h),s:x(i>0&&i<200?o*c/100/(i<=100?i:200-i)*100:0),l:x(i/2),a:x(h,2)}},K=function(n){var o=J(n);return"hsl("+o.h+", "+o.s+"%, "+o.l+"%)"},I=function(n){var o=J(n);return"hsla("+o.h+", "+o.s+"%, "+o.l+"%, "+o.a+")"},ee=function(n){var o=n.h,c=n.s,h=n.v,i=n.a;o=o/360*6,c/=100,h/=100;var d=Math.floor(o),e=h*(1-c),t=h*(1-(o-d)*c),r=h*(1-(1-o+d)*c),a=d%6;return{r:x(255*[h,t,e,e,r,h][a]),g:x(255*[r,h,h,t,e,e][a]),b:x(255*[e,e,r,h,h,t][a]),a:x(i,2)}},Me=function(n){var o=/rgba?\(?\s*(-?\d*\.?\d+)(%)?[,\s]+(-?\d*\.?\d+)(%)?[,\s]+(-?\d*\.?\d+)(%)?,?\s*[/\s]*(-?\d*\.?\d+)?(%)?\s*\)?/i.exec(n);return o?re({r:Number(o[1])/(o[2]?100/255:1),g:Number(o[3])/(o[4]?100/255:1),b:Number(o[5])/(o[6]?100/255:1),a:o[7]===void 0?1:Number(o[7])/(o[8]?100:1)}):{h:0,s:0,v:0,a:1}},j=function(n){var o=n.toString(16);return o.length<2?"0"+o:o},Ce=function(n){var o=n.r,c=n.g,h=n.b,i=n.a,d=i<1?j(x(255*i)):"";return"#"+j(o)+j(c)+j(h)+d},re=function(n){var o=n.r,c=n.g,h=n.b,i=n.a,d=Math.max(o,c,h),e=d-Math.min(o,c,h),t=e?d===o?(c-h)/e:d===c?2+(h-o)/e:4+(o-c)/e:0;return{h:x(60*(t<0?t+6:t)),s:x(d?e/d*100:0),v:x(d/255*100),a:i}},te=m.memo(function(n){var o=n.hue,c=n.onChange,h=N(["react-colorful__hue",n.className]);return m.createElement("div",{className:h},m.createElement(G,{onMove:function(i){c({h:360*i.left})},onKey:function(i){c({h:O(o+360*i.left,0,360)})},"aria-label":"Hue","aria-valuenow":x(o),"aria-valuemax":"360","aria-valuemin":"0"},m.createElement(F,{className:"react-colorful__hue-pointer",left:o/360,color:K({h:o,s:100,v:100,a:1})})))}),ne=m.memo(function(n){var o=n.hsva,c=n.onChange,h={backgroundColor:K({h:o.h,s:100,v:100,a:1})};return m.createElement("div",{className:"react-colorful__saturation",style:h},m.createElement(G,{onMove:function(i){c({s:100*i.left,v:100-100*i.top})},onKey:function(i){c({s:O(o.s+100*i.left,0,100),v:O(o.v-100*i.top,0,100)})},"aria-label":"Color","aria-valuetext":"Saturation "+x(o.s)+"%, Brightness "+x(o.v)+"%"},m.createElement(F,{className:"react-colorful__saturation-pointer",top:1-o.v/100,left:o.s/100,color:K(o)})))}),ae=function(n,o){if(n===o)return!0;for(var c in n)if(n[c]!==o[c])return!1;return!0},le=function(n,o){return n.replace(/\s/g,"")===o.replace(/\s/g,"")},$e=function(n,o){return n.toLowerCase()===o.toLowerCase()||ae(X(n),X(o))};function oe(n,o,c){var h=L(c),i=p.useState(function(){return n.toHsva(o)}),d=i[0],e=i[1],t=p.useRef({color:o,hsva:d});p.useEffect(function(){if(!n.equal(o,t.current.color)){var a=n.toHsva(o);t.current={hsva:a,color:o},e(a)}},[o,n]),p.useEffect(function(){var a;ae(d,t.current.hsva)||n.equal(a=n.fromHsva(d),t.current.color)||(t.current={hsva:d,color:a},h(a))},[d,n,h]);var r=p.useCallback(function(a){e(function(l){return Object.assign({},l,a)})},[]);return[d,r]}var Oe=typeof window<"u"?p.useLayoutEffect:p.useEffect,Se=function(){return typeof __webpack_nonce__<"u"?__webpack_nonce__:void 0},A=new Map,ue=function(n){Oe(function(){var o=n.current?n.current.ownerDocument:document;if(o!==void 0&&!A.has(o)){var c=o.createElement("style");c.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,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill-opacity=".05"><path d="M8 0h8v8H8zM0 8h8v8H0z"/></svg>')}.react-colorful__saturation-pointer{z-index:3}.react-colorful__hue-pointer{z-index:2}`,A.set(o,c);var h=Se();h&&c.setAttribute("nonce",h),o.head.appendChild(c)}},[])},Ne=function(n){var o=n.className,c=n.colorModel,h=n.color,i=h===void 0?c.defaultColor:h,d=n.onChange,e=V(n,["className","colorModel","color","onChange"]),t=p.useRef(null);ue(t);var r=oe(c,i,d),a=r[0],l=r[1],u=N(["react-colorful",o]);return m.createElement("div",C({},e,{ref:t,className:u}),m.createElement(ne,{hsva:a,onChange:l}),m.createElement(te,{hue:a.h,onChange:l,className:"react-colorful__last-control"}))},je={defaultColor:"000",toHsva:xe,fromHsva:function(n){return Ee({h:n.h,s:n.s,v:n.v,a:1})},equal:$e},Re=function(n){return m.createElement(Ne,C({},n,{colorModel:je}))},ze=function(n){var o=n.className,c=n.hsva,h=n.onChange,i={backgroundImage:"linear-gradient(90deg, "+I(Object.assign({},c,{a:0}))+", "+I(Object.assign({},c,{a:1}))+")"},d=N(["react-colorful__alpha",o]),e=x(100*c.a);return m.createElement("div",{className:d},m.createElement("div",{className:"react-colorful__alpha-gradient",style:i}),m.createElement(G,{onMove:function(t){h({a:t.left})},onKey:function(t){h({a:O(c.a+t.left)})},"aria-label":"Alpha","aria-valuetext":e+"%","aria-valuenow":e,"aria-valuemin":"0","aria-valuemax":"100"},m.createElement(F,{className:"react-colorful__alpha-pointer",left:c.a,color:I(c)})))},ie=function(n){var o=n.className,c=n.colorModel,h=n.color,i=h===void 0?c.defaultColor:h,d=n.onChange,e=V(n,["className","colorModel","color","onChange"]),t=p.useRef(null);ue(t);var r=oe(c,i,d),a=r[0],l=r[1],u=N(["react-colorful",o]);return m.createElement("div",C({},e,{ref:t,className:u}),m.createElement(ne,{hsva:a,onChange:l}),m.createElement(te,{hue:a.h,onChange:l}),m.createElement(ze,{hsva:a,onChange:l,className:"react-colorful__last-control"}))},Ie={defaultColor:"hsla(0, 0%, 0%, 1)",toHsva:ke,fromHsva:I,equal:le},He=function(n){return m.createElement(ie,C({},n,{colorModel:Ie}))},qe={defaultColor:"rgba(0, 0, 0, 1)",toHsva:Me,fromHsva:function(n){var o=ee(n);return"rgba("+o.r+", "+o.g+", "+o.b+", "+o.a+")"},equal:le},Pe=function(n){return m.createElement(ie,C({},n,{colorModel:qe}))},Le=M.div({position:"relative",maxWidth:250,'&[aria-readonly="true"]':{opacity:.5}}),Be=M(Y)({position:"absolute",zIndex:1,top:4,left:4,"[aria-readonly=true] &":{cursor:"not-allowed"}}),Xe=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"}}),Ke=M(fe)(({theme:n})=>({fontFamily:n.typography.fonts.base})),De=M.div({display:"grid",gridTemplateColumns:"repeat(9, 16px)",gap:6,padding:3,marginTop:5,width:200}),Ve=M.div(({theme:n,active:o})=>({width:16,height:16,boxShadow:o?`${n.appBorderColor} 0 0 0 1px inset, ${n.textMutedColor}50 0 0 0 4px`:`${n.appBorderColor} 0 0 0 1px inset`,borderRadius:n.appBorderRadius})),Ge=`url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill-opacity=".05"><path d="M8 0h8v8H8zM0 8h8v8H0z"/></svg>')`,Q=({value:n,style:o,...c})=>{let h=`linear-gradient(${n}, ${n}), ${Ge}, linear-gradient(#fff, #fff)`;return m.createElement(Ve,{...c,style:{...o,backgroundImage:h}})},Fe=M(de.Input)(({theme:n,readOnly:o})=>({width:"100%",paddingLeft:30,paddingRight:30,boxSizing:"border-box",fontFamily:n.typography.fonts.base})),Te=M(ge)(({theme:n})=>({position:"absolute",zIndex:1,top:6,right:7,width:20,height:20,padding:4,boxSizing:"border-box",cursor:"pointer",color:n.input.color})),se=(n=>(n.RGB="rgb",n.HSL="hsl",n.HEX="hex",n))(se||{}),R=Object.values(se),We=/\(([0-9]+),\s*([0-9]+)%?,\s*([0-9]+)%?,?\s*([0-9.]+)?\)/,Ae=/^\s*rgba?\(([0-9]+),\s*([0-9]+),\s*([0-9]+),?\s*([0-9.]+)?\)\s*$/i,Qe=/^\s*hsla?\(([0-9]+),\s*([0-9]+)%,\s*([0-9]+)%,?\s*([0-9.]+)?\)\s*$/i,D=/^\s*#?([0-9a-f]{3}|[0-9a-f]{6})\s*$/i,Ue=/^\s*#?([0-9a-f]{3})\s*$/i,Ye={hex:Re,rgb:Pe,hsl:He},z={hex:"transparent",rgb:"rgba(0, 0, 0, 0)",hsl:"hsla(0, 0%, 0%, 0)"},U=n=>{let o=n==null?void 0:n.match(We);if(!o)return[0,0,0,1];let[,c,h,i,d=1]=o;return[c,h,i,d].map(Number)},$=n=>{if(!n)return;let o=!0;if(Ae.test(n)){let[e,t,r,a]=U(n),[l,u,s]=_.default.rgb.hsl([e,t,r])||[0,0,0];return{valid:o,value:n,keyword:_.default.rgb.keyword([e,t,r]),colorSpace:"rgb",rgb:n,hsl:`hsla(${l}, ${u}%, ${s}%, ${a})`,hex:`#${_.default.rgb.hex([e,t,r]).toLowerCase()}`}}if(Qe.test(n)){let[e,t,r,a]=U(n),[l,u,s]=_.default.hsl.rgb([e,t,r])||[0,0,0];return{valid:o,value:n,keyword:_.default.hsl.keyword([e,t,r]),colorSpace:"hsl",rgb:`rgba(${l}, ${u}, ${s}, ${a})`,hsl:n,hex:`#${_.default.hsl.hex([e,t,r]).toLowerCase()}`}}let c=n.replace("#",""),h=_.default.keyword.rgb(c)||_.default.hex.rgb(c),i=_.default.rgb.hsl(h),d=n;if(/[^#a-f0-9]/i.test(n)?d=c:D.test(n)&&(d=`#${c}`),d.startsWith("#"))o=D.test(d);else try{_.default.keyword.hex(d)}catch{o=!1}return{valid:o,value:d,keyword:_.default.rgb.keyword(h),colorSpace:"hex",rgb:`rgba(${h[0]}, ${h[1]}, ${h[2]}, 1)`,hsl:`hsla(${i[0]}, ${i[1]}%, ${i[2]}%, 1)`,hex:d}},Ze=(n,o,c)=>{if(!n||!(o!=null&&o.valid))return z[c];if(c!=="hex")return(o==null?void 0:o[c])||z[c];if(!o.hex.startsWith("#"))try{return`#${_.default.keyword.hex(o.hex)}`}catch{return z.hex}let h=o.hex.match(Ue);if(!h)return D.test(o.hex)?o.hex:z.hex;let[i,d,e]=h[1].split("");return`#${i}${i}${d}${d}${e}${e}`},Je=(n,o)=>{let[c,h]=p.useState(n||""),[i,d]=p.useState(()=>$(c)),[e,t]=p.useState((i==null?void 0:i.colorSpace)||"hex");p.useEffect(()=>{let u=n||"",s=$(u);h(u),d(s),t((s==null?void 0:s.colorSpace)||"hex")},[n]);let r=p.useMemo(()=>Ze(c,i,e).toLowerCase(),[c,i,e]),a=p.useCallback(u=>{let s=$(u),f=(s==null?void 0:s.value)||u||"";h(f),f===""&&(d(void 0),o(void 0)),s&&(d(s),t(s.colorSpace),o(s.value))},[o]),l=p.useCallback(()=>{let u=R.indexOf(e)+1;u>=R.length&&(u=0),t(R[u]);let s=(i==null?void 0:i[R[u]])||"";h(s),o(s)},[i,e,o]);return{value:c,realValue:r,updateValue:a,color:i,colorSpace:e,cycleColorSpace:l}},H=n=>n.replace(/\s*/,"").toLowerCase(),er=(n,o,c)=>{let[h,i]=p.useState(o!=null&&o.valid?[o]:[]);p.useEffect(()=>{o===void 0&&i([])},[o]);let d=p.useMemo(()=>(n||[]).map(t=>typeof t=="string"?$(t):t.title?{...$(t.color),keyword:t.title}:$(t.color)).concat(h).filter(Boolean).slice(-27),[n,h]),e=p.useCallback(t=>{t!=null&&t.valid&&(d.some(r=>H(r[c])===H(t[c]))||i(r=>r.concat(t)))},[c,d]);return{presets:d,addPreset:e}},rr=({name:n,value:o,onChange:c,onFocus:h,onBlur:i,presetColors:d,startOpen:e=!1,argType:t})=>{var E;let r=p.useCallback(ce(c,200),[c]),{value:a,realValue:l,updateValue:u,color:s,colorSpace:f,cycleColorSpace:g}=Je(o,r),{presets:b,addPreset:y}=er(d,s,f),v=Ye[f],w=!!((E=t==null?void 0:t.table)!=null&&E.readonly);return m.createElement(Le,{"aria-readonly":w},m.createElement(Be,{startOpen:e,trigger:w?[null]:void 0,closeOnOutsideClick:!0,onVisibleChange:()=>y(s),tooltip:m.createElement(Xe,null,m.createElement(v,{color:l==="transparent"?"#000000":l,onChange:u,onFocus:h,onBlur:i}),b.length>0&&m.createElement(De,null,b.map((k,P)=>m.createElement(Y,{key:`${k.value}-${P}`,hasChrome:!1,tooltip:m.createElement(Ke,{note:k.keyword||k.value})},m.createElement(Q,{value:k[f],active:s&&H(k[f])===H(s[f]),onClick:()=>u(k.value)})))))},m.createElement(Q,{value:l,style:{margin:4}})),m.createElement(Fe,{id:he(n),value:a,onChange:k=>u(k.target.value),onFocus:k=>k.target.select(),readOnly:w,placeholder:"Choose color..."}),a?m.createElement(Te,{onClick:g}):null)},hr=rr;export{rr as ColorControl,hr as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as d}from"./jsx-runtime-BTJTZTIL.js";import{useMDXComponents as t}from"./index-B4FGfHer.js";import{b as n,U as a}from"./index-
|
|
1
|
+
import{j as d}from"./jsx-runtime-BTJTZTIL.js";import{useMDXComponents as t}from"./index-B4FGfHer.js";import{b as n,U as a}from"./index-DEgQqQ_-.js";import{c as u}from"./browserUtils-CQM9Za7e.js";import"./index-ChsGqxH_.js";import"./index-Dmy2JGbm.js";import"./iframe-DQEjJuXA.js";import"./index-CT3U1fyk.js";import"./index-BRq5TIsn.js";import"./index-DgH-xKnr.js";import"./index-DrFu-skq.js";const i={"rounded-full":{$type:"borderRadius",$value:9999},"rounded-4xl":{$type:"borderRadius",$value:32},"rounded-3xl":{$type:"borderRadius",$value:24},"rounded-2xl":{$type:"borderRadius",$value:16},"rounded-xl":{$type:"borderRadius",$value:12},"rounded-sm":{$type:"borderRadius",$value:4},"rounded-lg":{$type:"borderRadius",$value:8},"rounded-md":{$type:"borderRadius",$value:6},"rounded-xs":{$type:"borderRadius",$value:2}},l={rounded:i},c=e=>`${e/16}rem`,m=Object.entries(l.rounded).map(([e,r])=>({token:e,value:c(r.$value)})),p=e=>{u({text:e}),alert("복사가 완료되었습니다.")},o=()=>d.jsx("div",{className:"grid gap-3 md:grid-cols-3",children:m.map(({token:e,value:r})=>d.jsxs("button",{type:"button",className:"border-default bg-default text-default cursor-copy rounded-md border p-3 text-left",onClick:()=>p(e),title:`Copy ${e}`,children:[d.jsx("div",{className:"border-subtle bg-fill-subtler h-16 border",style:{borderRadius:r}}),d.jsx("p",{className:"text-subtle mt-2 text-sm",children:e}),d.jsx("p",{className:"text-subtler mt-1 text-sm",children:r})]},e))});o.__docgenInfo={description:"",methods:[],displayName:"RadiusPreview"};function s(e){const r={code:"code",h1:"h1",p:"p",pre:"pre",...t(),...e.components};return d.jsxs(d.Fragment,{children:[d.jsx(n,{title:"1.foundations/radius"}),`
|
|
2
2
|
`,d.jsx(r.h1,{id:"radius",children:"Radius"}),`
|
|
3
3
|
`,d.jsxs(r.p,{children:[d.jsx(r.code,{children:"--radius-*"})," 전체 토큰을 미리보기에서 확인합니다."]}),`
|
|
4
4
|
`,d.jsx(r.pre,{children:d.jsx(r.code,{className:"language-tsx",children:`<div className="rounded-xs" />
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as e}from"./jsx-runtime-BTJTZTIL.js";import{useMDXComponents as r}from"./index-B4FGfHer.js";import{b as a,U as l}from"./index-
|
|
1
|
+
import{j as e}from"./jsx-runtime-BTJTZTIL.js";import{useMDXComponents as r}from"./index-B4FGfHer.js";import{b as a,U as l}from"./index-DEgQqQ_-.js";import{I as d}from"./index-DKFBREX_.js";import{c as p}from"./browserUtils-CQM9Za7e.js";import"./index-ChsGqxH_.js";import"./index-Dmy2JGbm.js";import"./iframe-DQEjJuXA.js";import"./index-CT3U1fyk.js";import"./index-BRq5TIsn.js";import"./index-DgH-xKnr.js";import"./index-DrFu-skq.js";const m=t=>{p({text:t}),alert("복사가 완료되었습니다.")},n=t=>`<${t} className="size-5" />`,c=()=>{const t=Object.entries(d).filter(([,o])=>typeof o=="function");return e.jsx("div",{className:"grid grid-cols-3 gap-3 md:grid-cols-6 xl:grid-cols-8",children:t.map(([o,i])=>e.jsxs("button",{type:"button",className:"border-default bg-default text-default flex cursor-copy flex-col items-center gap-2 rounded-lg border p-3",onClick:()=>m(n(o)),title:`Copy ${n(o)}`,children:[e.jsx(i,{className:"size-5"}),e.jsx("span",{className:"text-subtle text-center text-sm break-all",children:n(o)})]},o))})};c.__docgenInfo={description:"",methods:[],displayName:"IconPreview"};function s(t){const o={code:"code",h1:"h1",p:"p",pre:"pre",...r(),...t.components};return e.jsxs(e.Fragment,{children:[e.jsx(a,{title:"1.foundations/icon"}),`
|
|
2
2
|
`,e.jsx(o.h1,{id:"icon",children:"Icon"}),`
|
|
3
3
|
`,e.jsxs(o.p,{children:[e.jsx(o.code,{children:"@repo/rb-components/icons"}),"의 아이콘 전체를 미리보기에서 확인합니다."]}),`
|
|
4
4
|
`,e.jsx(o.pre,{children:e.jsx(o.code,{className:"language-tsx",children:`import { SvgIcoSearch } from '@repo/rb-components/icons';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as x}from"./jsx-runtime-BTJTZTIL.js";import{useMDXComponents as t}from"./index-B4FGfHer.js";import{b as n,U as l}from"./index-
|
|
1
|
+
import{j as x}from"./jsx-runtime-BTJTZTIL.js";import{useMDXComponents as t}from"./index-B4FGfHer.js";import{b as n,U as l}from"./index-DEgQqQ_-.js";import{c as i}from"./browserUtils-CQM9Za7e.js";import"./index-ChsGqxH_.js";import"./index-Dmy2JGbm.js";import"./iframe-DQEjJuXA.js";import"./index-CT3U1fyk.js";import"./index-BRq5TIsn.js";import"./index-DgH-xKnr.js";import"./index-DrFu-skq.js";const c={"down-2xs":{$type:"shadow",$value:"0px 0px 1px 0px rgba(9, 9, 11, 0.2), 0px 1px 4px 0px rgba(9, 9, 11, 0.188)"},"down-xs":{$type:"shadow",$value:"0px 0px 1px 0px rgba(9, 9, 11, 0.2), 0px 4px 10px 0px rgba(9, 9, 11, 0.18)"},"down-sm":{$type:"shadow",$value:"0px 0px 1px 0px rgba(9, 9, 11, 0.2), 0px 10px 16px 0px rgba(9, 9, 11, 0.169)"},"down-md":{$type:"shadow",$value:"0px 0px 2px 0px rgba(9, 9, 11, 0.2), 0px 20px 32px 0px rgba(9, 9, 11, 0.161)"},"down-lg":{$type:"shadow",$value:"0px 0px 1px 0px rgba(9, 9, 11, 0.2), 0px 34px 48px 0px rgba(9, 9, 11, 0.149)"},"down-xl":{$type:"shadow",$value:"0px 0px 1px 0px rgba(9, 9, 11, 0.2), 0px 52px 64px 0px rgba(9, 9, 11, 0.141)"},"up-2xs":{$type:"shadow",$value:"0px 0px 1px 0px rgba(9, 9, 11, 0.2), 0px -1px 4px 0px rgba(9, 9, 11, 0.188)"},"up-xs":{$type:"shadow",$value:"0px 0px 1px 0px rgba(9, 9, 11, 0.2), 0px -4px 10px 0px rgba(9, 9, 11, 0.18)"},"up-sm":{$type:"shadow",$value:"0px 0px 1px 0px rgba(9, 9, 11, 0.2), 0px -10px 16px 0px rgba(9, 9, 11, 0.169)"},"up-md":{$type:"shadow",$value:"0px 0px 2px 0px rgba(9, 9, 11, 0.2), 0px -20px 32px 0px rgba(9, 9, 11, 0.161)"},"up-lg":{$type:"shadow",$value:"0px 0px 1px 0px rgba(9, 9, 11, 0.2), 0px -34px 48px 0px rgba(9, 9, 11, 0.149)"},"up-xl":{$type:"shadow",$value:"0px 0px 1px 0px rgba(9, 9, 11, 0.2), 0px -52px 64px 0px rgba(9, 9, 11, 0.141)"}},h={shadow:c},u=Object.entries(h.shadow).map(([e,p])=>({token:`shadow-${e}`,value:p.$value})),m=e=>{i({text:e}),alert("복사가 완료되었습니다.")},w=e=>{const p=[];let a="",s=0;for(const o of e){if(o==="("&&(s+=1),o===")"&&(s-=1),o===","&&s===0){p.push(a.trim()),a="";continue}a+=o}return a.trim()&&p.push(a.trim()),p},d=()=>x.jsx("div",{className:"grid gap-4 md:grid-cols-3",children:u.map(({token:e,value:p})=>x.jsxs("button",{type:"button",className:"border-default bg-default text-default cursor-copy rounded-lg border p-4 text-left",style:{boxShadow:p},onClick:()=>m(e),title:`Copy ${e}`,children:[x.jsx("p",{className:"text-sm font-medium",children:e}),w(p).map((a,s)=>x.jsx("p",{className:"text-subtle mt-1 text-sm",children:`Layer ${s+1}: ${a}`},`${e}-${s}`))]},e))});d.__docgenInfo={description:"",methods:[],displayName:"ShadowPreview"};function r(e){const p={code:"code",h1:"h1",li:"li",p:"p",pre:"pre",ul:"ul",...t(),...e.components};return x.jsxs(x.Fragment,{children:[x.jsx(n,{title:"1.foundations/shadow"}),`
|
|
2
2
|
`,x.jsx(p.h1,{id:"shadow",children:"Shadow"}),`
|
|
3
3
|
`,x.jsxs(p.p,{children:[x.jsx(p.code,{children:"--shadow-*"})," 토큰은 2개의 레이어를 합성해서 만듭니다."]}),`
|
|
4
4
|
`,x.jsxs(p.ul,{children:[`
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as a}from"./jsx-runtime-BTJTZTIL.js";import{useMDXComponents as c}from"./index-B4FGfHer.js";import{b as l,U as r}from"./index-
|
|
1
|
+
import{j as a}from"./jsx-runtime-BTJTZTIL.js";import{useMDXComponents as c}from"./index-B4FGfHer.js";import{b as l,U as r}from"./index-DEgQqQ_-.js";import{c as o}from"./browserUtils-CQM9Za7e.js";import"./index-ChsGqxH_.js";import"./index-Dmy2JGbm.js";import"./iframe-DQEjJuXA.js";import"./index-CT3U1fyk.js";import"./index-BRq5TIsn.js";import"./index-DgH-xKnr.js";import"./index-DrFu-skq.js";const $={0:{$type:"spacing",$value:0},1:{$type:"spacing",$value:4},2:{$type:"spacing",$value:8},3:{$type:"spacing",$value:12},4:{$type:"spacing",$value:16},5:{$type:"spacing",$value:20},6:{$type:"spacing",$value:24},7:{$type:"spacing",$value:28},8:{$type:"spacing",$value:32},9:{$type:"spacing",$value:36},10:{$type:"spacing",$value:40},11:{$type:"spacing",$value:44},12:{$type:"spacing",$value:48},14:{$type:"spacing",$value:56},16:{$type:"spacing",$value:64},20:{$type:"spacing",$value:80},24:{$type:"spacing",$value:96},28:{$type:"spacing",$value:112},32:{$type:"spacing",$value:128},36:{$type:"spacing",$value:144},40:{$type:"spacing",$value:160},44:{$type:"spacing",$value:176},48:{$type:"spacing",$value:192},50:{$type:"spacing",$value:200},"3_5":{$type:"spacing",$value:14},"1_5":{$type:"spacing",$value:6},"0_5":{$type:"spacing",$value:2},"2_5":{$type:"spacing",$value:10}},u={spacing:$},d=e=>`${e/16}rem`,n=e=>Number(e.replace("_",".")),g=Object.entries(u.spacing).sort(([e],[s])=>n(e)-n(s)).map(([e,s])=>({token:`spacing-${e}`,utility:`p-${e}`,value:d(s.$value)})),m=e=>{o({text:e}),alert("복사가 완료되었습니다.")},i=()=>a.jsx("div",{className:"border-default bg-default text-default space-y-2 rounded-lg border p-4",children:g.map(({token:e,utility:s,value:t})=>a.jsxs("button",{type:"button",className:"border-subtle grid w-full cursor-copy grid-cols-[180px_1fr] items-center gap-3 rounded-md border p-2 text-left",onClick:()=>m(s),title:`Copy ${s}`,children:[a.jsx("p",{className:"text-subtle text-xs",children:s}),a.jsxs("div",{className:"flex items-center gap-2",children:[a.jsx("div",{className:"bg-fill-brand h-2 rounded-full",style:{width:t}}),a.jsx("span",{className:"text-subtle text-sm",children:t})]})]},e))});i.__docgenInfo={description:"",methods:[],displayName:"SpacingPreview"};function p(e){const s={code:"code",h1:"h1",p:"p",pre:"pre",...c(),...e.components};return a.jsxs(a.Fragment,{children:[a.jsx(l,{title:"1.foundations/spacing"}),`
|
|
2
2
|
`,a.jsx(s.h1,{id:"spacing",children:"Spacing"}),`
|
|
3
3
|
`,a.jsxs(s.p,{children:[a.jsx(s.code,{children:"--spacing-*"})," 전체 토큰을 미리보기에서 확인합니다."]}),`
|
|
4
4
|
`,a.jsx(s.pre,{children:a.jsx(s.code,{className:"language-tsx",children:`<div className="p-4 gap-2" />
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as l}from"./jsx-runtime-BTJTZTIL.js";import{useMDXComponents as y}from"./index-B4FGfHer.js";import{b as g,U as b}from"./index-BzvSJzrT.js";import{d as p,e as n,f as c,g as t}from"./react-resizable-panels.browser-CYcsrUgg.js";import"./index-Dmy2JGbm.js";import{c as f}from"./browserUtils-CQM9Za7e.js";import"./index-ChsGqxH_.js";import"./iframe-DsvRKHwc.js";import"./index-CT3U1fyk.js";import"./index-BRq5TIsn.js";import"./index-DgH-xKnr.js";import"./index-DrFu-skq.js";const k={"scale color":{red:{500:{$type:"color",$value:"#fb2c36"},600:{$type:"color",$value:"#e7000b"},"alpha-50p":{$type:"color",$value:"#fb2c3680"},"alpha-30p":{$type:"color",$value:"#fb2c364d"},"alpha-10p":{$type:"color",$value:"#fb2c361a"},"alpha-20p":{$type:"color",$value:"#fb2c3633"}},orange:{500:{$type:"color",$value:"#ff6900"},600:{$type:"color",$value:"#f54a00"},"alpha-50p":{$type:"color",$value:"#ff690080"},"alpha-30p":{$type:"color",$value:"#ff69004d"},"alpha-10p":{$type:"color",$value:"#ff69001a"},"alpha-20p":{$type:"color",$value:"#ff690033"}},green:{500:{$type:"color",$value:"#00c951"},600:{$type:"color",$value:"#00a63e"},"alpha-50p":{$type:"color",$value:"#00c95180"},"alpha-30p":{$type:"color",$value:"#00c9514d"},"alpha-10p":{$type:"color",$value:"#00c9511a"},"alpha-20p":{$type:"color",$value:"#00c95133"}},blue:{500:{$type:"color",$value:"#2b7fff"},600:{$type:"color",$value:"#155dfc"},"alpha-50p":{$type:"color",$value:"#2b7fff80"},"alpha-30p":{$type:"color",$value:"#2b7fff4d"},"alpha-10p":{$type:"color",$value:"#2b7fff1a"},"alpha-20p":{$type:"color",$value:"#2b7fff33"}},"zinc-950-alpha":{5:{$type:"color",$value:"#09090b0d"},10:{$type:"color",$value:"#09090b1a"},15:{$type:"color",$value:"#09090b26"},20:{$type:"color",$value:"#09090b33"},25:{$type:"color",$value:"#09090b40"},30:{$type:"color",$value:"#09090b4d"},40:{$type:"color",$value:"#09090b66"},50:{$type:"color",$value:"#09090b80"},60:{$type:"color",$value:"#09090b99"},70:{$type:"color",$value:"#09090bb3"},75:{$type:"color",$value:"#09090bbf"},80:{$type:"color",$value:"#09090bcc"},85:{$type:"color",$value:"#09090bd9"},90:{$type:"color",$value:"#09090be6"},95:{$type:"color",$value:"#09090bf2"}},"zinc-50-alpha":{5:{$type:"color",$value:"#fafafa0d"},10:{$type:"color",$value:"#fafafa1a"},15:{$type:"color",$value:"#fafafa26"},20:{$type:"color",$value:"#fafafa33"},25:{$type:"color",$value:"#fafafa40"},30:{$type:"color",$value:"#fafafa4d"},40:{$type:"color",$value:"#fafafa66"},50:{$type:"color",$value:"#fafafa80"},60:{$type:"color",$value:"#fafafa99"},70:{$type:"color",$value:"#fafafab3"},75:{$type:"color",$value:"#fafafabf"},80:{$type:"color",$value:"#fafafacc"},85:{$type:"color",$value:"#fafafad9"},90:{$type:"color",$value:"#fafafae6"},95:{$type:"color",$value:"#fafafaf2"}},zinc:{50:{$type:"color",$value:"#fafafa"},100:{$type:"color",$value:"#f4f4f5"},200:{$type:"color",$value:"#e4e4e7"},300:{$type:"color",$value:"#d4d4d8"},400:{$type:"color",$value:"#9f9fa9"},500:{$type:"color",$value:"#71717b"},600:{$type:"color",$value:"#52525c"},700:{$type:"color",$value:"#3f3f46"},800:{$type:"color",$value:"#232326"},900:{$type:"color",$value:"#18181b"},950:{$type:"color",$value:"#09090b"}},base:{black:{$type:"color",$value:"#000000"},transparent:{$type:"color",$value:"#ffffff00"},white:{$type:"color",$value:"#ffffff"}},yellow:{400:{$type:"color",$value:"#fcc800"},500:{$type:"color",$value:"#efb100"},"alpha-50p":{$type:"color",$value:"#fcc80080"},"alpha-30p":{$type:"color",$value:"#fcc8004d"},"alpha-10p":{$type:"color",$value:"#fcc8001a"},"alpha-20p":{$type:"color",$value:"#fcc80033"}},primary:{"alpha-10p":{$type:"color",$value:"#155dfc1a"},"alpha-30p":{$type:"color",$value:"#155dfc4d"},stronger:{$type:"color",$value:"#003baf"},strong:{$type:"color",$value:"#154dd0"},"alpha-50p":{$type:"color",$value:"#155dfc80"},normal:{$type:"color",$value:"#155dfc"}},custom:{"gray-100":{$type:"color",$value:"#18181a"},"gray-200":{$type:"color",$value:"#1f1f22"},"gray-300":{$type:"color",$value:"#2a2a2d"}},violet:{500:{$type:"color",$value:"#8e51ff"},600:{$type:"color",$value:"#7f22fe"},"alpha-50p":{$type:"color",$value:"#8e51ff80"},"alpha-30p":{$type:"color",$value:"#8e51ff4d"},"alpha-20p":{$type:"color",$value:"#8e51ff33"},"alpha-10p":{$type:"color",$value:"#8e51ff1a"}},rainbow:{normal:{$type:"color",$value:"#e6331b"},strong:{$type:"color",$value:"#cf2d18"},stronger:{$type:"color",$value:"#b82815"},"alpha-50p":{$type:"color",$value:"#e6331b80"},"alpha-30p":{$type:"color",$value:"#e6331b4d"},"alpha-10p":{$type:"color",$value:"#e6331b1a"}},"icon-primary":{$type:"color",$value:"#5c9cff"},navy:{normal:{$type:"color",$value:"#0b558c"},strong:{$type:"color",$value:"#094a7a"},stronger:{$type:"color",$value:"#073e67"},"alpha-50p":{$type:"color",$value:"#0b558c80"},"alpha-30p":{$type:"color",$value:"#082a6c4d"},"alpha-10p":{$type:"color",$value:"#082a6c1a"},"alpha-20p":{$type:"color",$value:"#0b558c33"},"alpha-15p":{$type:"color",$value:"#0b558c26"}}}},L={"semantic color":JSON.parse('{"fg":{"default":{"$type":"color","$value":{"Dark":"{color.scale.zinc.50}","Light":"{color.scale.zinc.950}"}},"danger-subtle":{"$type":"color","$value":{"Dark":"{color.scale.red.alpha-30p}","Light":"{color.scale.red.alpha-50p}"}},"danger":{"$type":"color","$value":{"Dark":"{color.scale.red.500}","Light":"{color.scale.red.500}"}},"warning-subtle":{"$type":"color","$value":{"Dark":"{color.scale.orange.alpha-50p}","Light":"{color.scale.orange.alpha-50p}"}},"warning":{"$type":"color","$value":{"Dark":"{color.scale.orange.500}","Light":"{color.scale.orange.500}"}},"success-subtle":{"$type":"color","$value":{"Dark":"{color.scale.green.alpha-50p}","Light":"{color.scale.green.alpha-50p}"}},"success":{"$type":"color","$value":{"Dark":"{color.scale.green.500}","Light":"{color.scale.green.600}"}},"information-subtle":{"$type":"color","$value":{"Dark":"{color.scale.blue.alpha-50p}","Light":"{color.scale.blue.alpha-50p}"}},"information":{"$type":"color","$value":{"Dark":"{color.scale.blue.500}","Light":"{color.scale.blue.500}"}},"disabled":{"$type":"color","$value":{"Dark":"{color.scale.zinc-50-alpha.20}","Light":"{color.scale.zinc-950-alpha.25}"}},"inverse":{"$type":"color","$value":{"Dark":"{color.scale.zinc.950}","Light":"{color.scale.zinc.50}"}},"subtlest":{"$type":"color","$value":{"Dark":"{color.scale.zinc-50-alpha.30}","Light":"{color.scale.zinc-950-alpha.40}"}},"subtle":{"$type":"color","$value":{"Dark":"{color.scale.zinc-50-alpha.60}","Light":"{color.scale.zinc-950-alpha.70}"}},"subtler":{"$type":"color","$value":{"Dark":"{color.scale.zinc-50-alpha.40}","Light":"{color.scale.zinc-950-alpha.60}"}},"inverse-disabled":{"$type":"color","$value":{"Dark":"{color.scale.zinc-950-alpha.15}","Light":"{color.scale.zinc-50-alpha.20}"}},"brand":{"$type":"color","$value":{"Dark":"{color.scale.primary.normal}","Light":"{color.scale.primary.normal}"}},"brand-subtle":{"$type":"color","$value":{"Dark":"{color.scale.primary.alpha-50p}","Light":"{color.scale.primary.alpha-50p}"}},"default-hovered":{"$type":"color","$value":{"Dark":"{color.scale.zinc-50-alpha.80}","Light":"{color.scale.zinc-950-alpha.80}"}},"brand-hovered":{"$type":"color","$value":{"Dark":"{color.scale.primary.strong}","Light":"{color.scale.primary.strong}"}},"caution":{"$type":"color","$value":{"Dark":"{color.scale.yellow.400}","Light":"{color.scale.yellow.400}"}},"caution-subtle":{"$type":"color","$value":{"Dark":"{color.scale.yellow.alpha-50p}","Light":"{color.scale.yellow.alpha-50p}"}},"static-white":{"$type":"color","$value":{"Dark":"{color.scale.base.white}","Light":"{color.scale.base.white}"}},"static-white-subtle":{"$type":"color","$value":{"Dark":"{color.scale.zinc.500}","Light":"{color.scale.zinc.500}"}},"debug":{"$type":"color","$value":{"Dark":"{color.scale.violet.500}","Light":"{color.scale.violet.500}"}},"debug-subtle":{"$type":"color","$value":{"Dark":"{color.scale.violet.alpha-50p}","Light":"{color.scale.violet.alpha-50p}"}},"rb":{"$type":"color","$value":{"Dark":"{color.scale.rainbow.normal}","Light":"{color.scale.rainbow.normal}"}},"rb-subtle":{"$type":"color","$value":{"Dark":"{color.scale.rainbow.alpha-50p}","Light":"{color.scale.rainbow.alpha-50p}"}},"navy":{"$type":"color","$value":{"Dark":"{color.scale.navy.normal}","Light":"{color.scale.navy.normal}"}},"navy-subtle":{"$type":"color","$value":{"Dark":"{color.scale.navy.alpha-50p}","Light":"{color.scale.navy.alpha-50p}"}},"navy-hovered":{"$type":"color","$value":{"Dark":"{color.scale.navy.strong}","Light":"{color.scale.navy.strong}"}}},"border":{"default":{"$type":"color","$value":{"Dark":"{color.scale.zinc-50-alpha.30}","Light":"{color.scale.zinc-950-alpha.20}"}},"danger-stronger":{"$type":"color","$value":{"Dark":"{color.scale.red.500}","Light":"{color.scale.red.500}"}},"warning-stronger":{"$type":"color","$value":{"Dark":"{color.scale.orange.500}","Light":"{color.scale.orange.500}"}},"success-stronger":{"$type":"color","$value":{"Dark":"{color.scale.green.500}","Light":"{color.scale.green.500}"}},"information-stronger":{"$type":"color","$value":{"Dark":"{color.scale.blue.500}","Light":"{color.scale.blue.500}"}},"disabled":{"$type":"color","$value":{"Dark":"{color.scale.zinc-50-alpha.5}","Light":"{color.scale.zinc-950-alpha.5}"}},"inverse-stronger":{"$type":"color","$value":{"Dark":"{color.scale.zinc-950-alpha.90}","Light":"{color.scale.zinc-50-alpha.90}"}},"stronger":{"$type":"color","$value":{"Dark":"{color.scale.zinc-50-alpha.90}","Light":"{color.scale.zinc-950-alpha.90}"}},"inverse":{"$type":"color","$value":{"Dark":"{color.scale.zinc-950-alpha.20}","Light":"{color.scale.zinc-50-alpha.30}"}},"danger":{"$type":"color","$value":{"Dark":"{color.scale.red.alpha-50p}","Light":"{color.scale.red.alpha-50p}"}},"warning":{"$type":"color","$value":{"Dark":"{color.scale.orange.alpha-50p}","Light":"{color.scale.orange.alpha-50p}"}},"information":{"$type":"color","$value":{"Dark":"{color.scale.blue.alpha-50p}","Light":"{color.scale.blue.alpha-50p}"}},"success":{"$type":"color","$value":{"Dark":"{color.scale.green.alpha-50p}","Light":"{color.scale.green.alpha-50p}"}},"subtle":{"$type":"color","$value":{"Dark":"{color.scale.zinc-50-alpha.15}","Light":"{color.scale.zinc-950-alpha.15}"}},"input-focused":{"$type":"color","$value":{"Dark":"{color.scale.zinc-50-alpha.90}","Light":"{color.scale.zinc-950-alpha.90}"}},"inverse-disabled":{"$type":"color","$value":{"Dark":"{color.scale.zinc-950-alpha.10}","Light":"{color.scale.zinc-50-alpha.10}"}},"brand-stronger":{"$type":"color","$value":{"Dark":"{color.scale.primary.normal}","Light":"{color.scale.primary.normal}"}},"brand":{"$type":"color","$value":{"Dark":"{color.scale.primary.alpha-50p}","Light":"{color.scale.primary.alpha-50p}"}},"caution-stronger":{"$type":"color","$value":{"Dark":"{color.scale.yellow.400}","Light":"{color.scale.yellow.400}"}},"caution":{"$type":"color","$value":{"Dark":"{color.scale.yellow.alpha-50p}","Light":"{color.scale.yellow.alpha-50p}"}},"debug-stronger":{"$type":"color","$value":{"Dark":"{color.scale.violet.500}","Light":"{color.scale.violet.500}"}},"debug":{"$type":"color","$value":{"Dark":"{color.scale.violet.alpha-50p}","Light":"{color.scale.violet.alpha-50p}"}},"subtler":{"$type":"color","$value":{"Dark":"{color.scale.zinc-50-alpha.10}","Light":"{color.scale.zinc-950-alpha.10}"}},"rb-stronger":{"$type":"color","$value":{"Dark":"{color.scale.rainbow.normal}","Light":"{color.scale.rainbow.normal}"}},"rb":{"$type":"color","$value":{"Dark":"{color.scale.rainbow.alpha-50p}","Light":"{color.scale.rainbow.alpha-50p}"}},"navy-stronger":{"$type":"color","$value":{"Dark":"{color.scale.navy.normal}","Light":"{color.scale.navy.normal}"}},"navy":{"$type":"color","$value":{"Dark":"{color.scale.navy.alpha-50p}","Light":"{color.scale.navy.alpha-50p}"}}},"fill":{"danger-subtle":{"$type":"color","$value":{"Dark":"{color.scale.red.alpha-30p}","Light":"{color.scale.red.alpha-30p}"}},"danger":{"$type":"color","$value":{"Dark":"{color.scale.red.500}","Light":"{color.scale.red.500}"}},"warning-subtle":{"$type":"color","$value":{"Dark":"{color.scale.orange.alpha-30p}","Light":"{color.scale.orange.alpha-30p}"}},"warning":{"$type":"color","$value":{"Dark":"{color.scale.orange.500}","Light":"{color.scale.orange.500}"}},"success-subtle":{"$type":"color","$value":{"Dark":"{color.scale.green.alpha-30p}","Light":"{color.scale.green.alpha-30p}"}},"success":{"$type":"color","$value":{"Dark":"{color.scale.green.500}","Light":"{color.scale.green.500}"}},"information-subtle":{"$type":"color","$value":{"Dark":"{color.scale.blue.alpha-30p}","Light":"{color.scale.blue.alpha-30p}"}},"information":{"$type":"color","$value":{"Dark":"{color.scale.blue.500}","Light":"{color.scale.blue.500}"}},"disabled":{"$type":"color","$value":{"Dark":"{color.scale.zinc-50-alpha.5}","Light":"{color.scale.zinc-950-alpha.5}"}},"control surface":{"$type":"color","$value":{"Dark":"{color.scale.zinc-950-alpha.50}","Light":"{color.scale.zinc.50}"}},"inverse":{"$type":"color","$value":{"Dark":"{color.scale.zinc.900}","Light":"{color.scale.zinc.100}"}},"inverse-hovered":{"$type":"color","$value":{"Dark":"{color.scale.zinc.700}","Light":"{color.scale.zinc.300}"}},"subtle":{"$type":"color","$value":{"Dark":"{color.scale.zinc-50-alpha.40}","Light":"{color.scale.zinc-950-alpha.40}"}},"subtle-hovered":{"$type":"color","$value":{"Dark":"{color.scale.zinc-50-alpha.30}","Light":"{color.scale.zinc-950-alpha.30}"}},"transparent":{"$type":"color","$value":{"Dark":"{color.scale.base.transparent}","Light":"{color.scale.base.transparent}"}},"transparent-hovered":{"$type":"color","$value":{"Dark":"{color.scale.zinc-50-alpha.5}","Light":"{color.scale.zinc-950-alpha.5}"}},"default":{"$type":"color","$value":{"Dark":"{color.scale.zinc.100}","Light":"{color.scale.zinc.900}"}},"default-hovered":{"$type":"color","$value":{"Dark":"{color.scale.zinc.300}","Light":"{color.scale.zinc.700}"}},"inverse-subtle":{"$type":"color","$value":{"Dark":"{color.scale.zinc-950-alpha.40}","Light":"{color.scale.zinc-50-alpha.40}"}},"inverse-subtle-hovered":{"$type":"color","$value":{"Dark":"{color.scale.zinc-950-alpha.30}","Light":"{color.scale.zinc-50-alpha.30}"}},"inverse-disabled":{"$type":"color","$value":{"Dark":"{color.scale.zinc-950-alpha.10}","Light":"{color.scale.zinc-50-alpha.10}"}},"brand":{"$type":"color","$value":{"Dark":"{color.scale.primary.normal}","Light":"{color.scale.primary.normal}"}},"brand-subtle":{"$type":"color","$value":{"Dark":"{color.scale.primary.alpha-50p}","Light":"{color.scale.primary.alpha-50p}"}},"subtler":{"$type":"color","$value":{"Dark":"{color.scale.zinc-50-alpha.20}","Light":"{color.scale.zinc-950-alpha.20}"}},"subtler-hovered":{"$type":"color","$value":{"Dark":"{color.scale.zinc-50-alpha.15}","Light":"{color.scale.zinc-950-alpha.15}"}},"brand-hovered":{"$type":"color","$value":{"Dark":"{color.scale.primary.strong}","Light":"{color.scale.primary.strong}"}},"control surface-hovered":{"$type":"color","$value":{"Dark":"{color.scale.zinc-950-alpha.30}","Light":"{color.scale.zinc.100}"}},"caution-subtle":{"$type":"color","$value":{"Dark":"{color.scale.yellow.alpha-30p}","Light":"{color.scale.yellow.alpha-30p}"}},"caution":{"$type":"color","$value":{"Dark":"{color.scale.yellow.400}","Light":"{color.scale.yellow.400}"}},"danger-subtler":{"$type":"color","$value":{"Dark":"{color.scale.red.alpha-20p}","Light":"{color.scale.red.alpha-20p}"}},"warning-subtler":{"$type":"color","$value":{"Dark":"{color.scale.orange.alpha-20p}","Light":"{color.scale.orange.alpha-20p}"}},"caution-subtler":{"$type":"color","$value":{"Dark":"{color.scale.yellow.alpha-20p}","Light":"{color.scale.yellow.alpha-20p}"}},"success-subtler":{"$type":"color","$value":{"Dark":"{color.scale.green.alpha-20p}","Light":"{color.scale.green.alpha-20p}"}},"information-subtler":{"$type":"color","$value":{"Dark":"{color.scale.blue.alpha-20p}","Light":"{color.scale.blue.alpha-20p}"}},"subtlest":{"$type":"color","$value":{"Dark":"{color.scale.zinc-50-alpha.10}","Light":"{color.scale.zinc-950-alpha.10}"}},"subtlest-hovered":{"$type":"color","$value":{"Dark":"{color.scale.zinc-50-alpha.5}","Light":"{color.scale.zinc-950-alpha.5}"}},"warning-subtlest":{"$type":"color","$value":{"Dark":"{color.scale.orange.alpha-10p}","Light":"{color.scale.orange.alpha-10p}"}},"caution-subtlest":{"$type":"color","$value":{"Dark":"{color.scale.yellow.alpha-10p}","Light":"{color.scale.yellow.alpha-10p}"}},"information-subtlest":{"$type":"color","$value":{"Dark":"{color.scale.blue.alpha-10p}","Light":"{color.scale.blue.alpha-10p}"}},"success-subtlest":{"$type":"color","$value":{"Dark":"{color.scale.green.alpha-10p}","Light":"{color.scale.green.alpha-10p}"}},"danger-subtlest":{"$type":"color","$value":{"Dark":"{color.scale.red.alpha-10p}","Light":"{color.scale.red.alpha-10p}"}},"danger-hovered":{"$type":"color","$value":{"Dark":"{color.scale.red.600}","Light":"{color.scale.red.600}"}},"warning-hovered":{"$type":"color","$value":{"Dark":"{color.scale.orange.600}","Light":"{color.scale.orange.600}"}},"caution-hovered":{"$type":"color","$value":{"Dark":"{color.scale.yellow.500}","Light":"{color.scale.yellow.500}"}},"information-hovered":{"$type":"color","$value":{"Dark":"{color.scale.blue.600}","Light":"{color.scale.blue.600}"}},"success-hovered":{"$type":"color","$value":{"Dark":"{color.scale.green.600}","Light":"{color.scale.green.600}"}},"debug":{"$type":"color","$value":{"Dark":"{color.scale.violet.500}","Light":"{color.scale.violet.500}"}},"debug-hovered":{"$type":"color","$value":{"Dark":"{color.scale.violet.600}","Light":"{color.scale.violet.600}"}},"debug-subtle":{"$type":"color","$value":{"Dark":"{color.scale.violet.alpha-30p}","Light":"{color.scale.violet.alpha-30p}"}},"debug-subtler":{"$type":"color","$value":{"Dark":"{color.scale.violet.alpha-20p}","Light":"{color.scale.violet.alpha-20p}"}},"debug-subtlest":{"$type":"color","$value":{"Dark":"{color.scale.violet.alpha-10p}","Light":"{color.scale.violet.alpha-10p}"}},"control surface-disabled":{"$type":"color","$value":{"Dark":"{color.scale.zinc-950-alpha.25}","Light":"{color.scale.zinc.50}"}},"brand-subtler":{"$type":"color","$value":{"Dark":"{color.scale.primary.alpha-30p}","Light":"{color.scale.primary.alpha-30p}"}},"rb":{"$type":"color","$value":{"Dark":"{color.scale.rainbow.normal}","Light":"{color.scale.rainbow.normal}"}},"rb-hovered":{"$type":"color","$value":{"Dark":"{color.scale.rainbow.strong}","Light":"{color.scale.rainbow.strong}"}},"rb-subtle":{"$type":"color","$value":{"Dark":"{color.scale.rainbow.alpha-50p}","Light":"{color.scale.rainbow.alpha-50p}"}},"rb-subtler":{"$type":"color","$value":{"Dark":"{color.scale.rainbow.alpha-30p}","Light":"{color.scale.rainbow.alpha-30p}"}},"rb-subtlest":{"$type":"color","$value":{"Dark":"{color.scale.rainbow.alpha-10p}","Light":"{color.scale.rainbow.alpha-10p}"}},"icon-program":{"$type":"color","$value":{"Dark":"{color.scale.icon-primary}","Light":"{color.scale.icon-primary}"}},"brand-subtlest":{"$type":"color","$value":{"Dark":"{color.scale.primary.alpha-10p}","Light":"{color.scale.primary.alpha-10p}"}},"navy":{"$type":"color","$value":{"Dark":"{color.scale.navy.normal}","Light":"{color.scale.navy.normal}"}},"navy-hovered":{"$type":"color","$value":{"Dark":"{color.scale.navy.strong}","Light":"{color.scale.navy.strong}"}},"navy-subtle":{"$type":"color","$value":{"Dark":"{color.scale.navy.alpha-50p}","Light":"{color.scale.navy.alpha-50p}"}},"navy-subtler":{"$type":"color","$value":{"Dark":"{color.scale.navy.alpha-20p}","Light":"{color.scale.navy.alpha-20p}"}},"navy-subtlest":{"$type":"color","$value":{"Dark":"{color.scale.navy.alpha-15p}","Light":"{color.scale.navy.alpha-15p}"}}},"bg":{"dim":{"$type":"color","$value":{"Dark":"{color.scale.zinc-950-alpha.80}","Light":"{color.scale.zinc-950-alpha.50}"}},"default":{"$type":"color","$value":{"Dark":"{color.scale.zinc.950}","Light":"{color.scale.zinc.50}"}},"overlay":{"$type":"color","$value":{"Dark":"{color.scale.zinc.700}","Light":"{color.scale.zinc.100}"}},"inverse":{"$type":"color","$value":{"Dark":"{color.scale.base.white}","Light":"{color.scale.zinc.950}"}},"raised":{"$type":"color","$value":{"Dark":"{color.scale.custom.gray-300}","Light":"{color.scale.zinc.100}"}},"card":{"$type":"color","$value":{"Dark":"{color.scale.zinc-50-alpha.10}","Light":"{color.scale.base.white}"}},"alt-1":{"$type":"color","$value":{"Dark":"{color.scale.zinc.900}","Light":"{color.scale.zinc.200}"}},"alt-2":{"$type":"color","$value":{"Dark":"{color.scale.zinc.800}","Light":"{color.scale.zinc.300}"}},"translucent":{"$type":"color","$value":{"Dark":"{color.scale.zinc-950-alpha.60}","Light":"{color.scale.zinc-50-alpha.50}"}},"overlay-high":{"$type":"color","$value":{"Dark":"{color.scale.zinc.600}","Light":"{color.scale.zinc.200}"}},"tooltip":{"$type":"color","$value":{"Dark":"{color.scale.zinc.50}","Light":"{color.scale.zinc.900}"}}}}')},m=e=>{f({text:e}),alert("복사가 완료되었습니다.")},D=e=>typeof e=="object"&&e!==null&&"$value"in e,h=(e,a=[])=>{if(D(e))return[a.join("-")];const o=[];return Object.entries(e).forEach(([r,s])=>{r.startsWith("$")||o.push(...h(s,[...a,r]))}),o},z=()=>{const e=k["scale color"];return Object.entries(e).map(([a,o])=>{const r=h(o,[a]);return{title:a,tokens:r.map(s=>`bg-scale-${s}`)}})},x=()=>{const e=L["semantic color"];return Object.entries(e).map(([a,o])=>{const r=h(o,[a]);return{title:a,tokens:r}})},i=z(),$=x(),j={backgroundColor:"#f1f1f4",backgroundImage:"linear-gradient(45deg, #bfbfc7 25%, transparent 25%), linear-gradient(-45deg, #bfbfc7 25%, transparent 25%), linear-gradient(45deg, transparent 75%, #bfbfc7 75%), linear-gradient(-45deg, transparent 75%, #bfbfc7 75%)",backgroundSize:"10px 10px",backgroundPosition:"0 0, 0 5px, 5px -5px, -5px 0px"},w=e=>e.includes("alpha")||e.includes("transparent"),C=e=>e.startsWith("bg-scale-")?`--color-scale-${e.replace(/^bg-scale-/,"")}`:`--color-${e}`,N=({utility:e})=>{const a=C(e),o=w(e);return l.jsxs("button",{type:"button",className:"border-default bg-default cursor-copy rounded-md border p-2 text-left",onClick:()=>m(e),title:`Copy ${e}`,children:[l.jsx("div",{className:"border-subtle relative h-10 overflow-hidden rounded border",style:o?j:void 0,children:l.jsx("div",{className:"absolute inset-0",style:{backgroundColor:`var(${a})`}})}),l.jsx("p",{className:"text-subtle mt-2 text-sm break-all",children:e}),l.jsx("p",{className:"text-subtler mt-1 text-sm break-all",children:a})]})},u=({title:e,tokens:a})=>l.jsxs("section",{className:"border-default bg-default text-default space-y-2 rounded-lg border p-4",children:[l.jsx("h4",{className:"text-base font-semibold capitalize",children:e}),l.jsx("div",{className:"grid gap-2 sm:grid-cols-2 xl:grid-cols-3",children:a.map(o=>l.jsx(N,{utility:o},o))})]}),d=()=>{var e,a;return l.jsxs(p,{defaultValue:"scale",className:"w-full",children:[l.jsxs(n,{className:"border-default bg-default text-default supports-[backdrop-filter]:bg-default sticky top-2 z-20 mb-3 rounded-lg border p-1 shadow-sm backdrop-blur",children:[l.jsx(c,{value:"scale",children:"Scale"}),l.jsx(c,{value:"semantic",children:"Semantic"})]}),l.jsx(t,{value:"scale",className:"text-default",children:l.jsxs(p,{defaultValue:((e=i[0])==null?void 0:e.title)||"",className:"w-full",children:[l.jsx(n,{className:"border-default bg-default text-default supports-[backdrop-filter]:bg-default sticky top-14 z-10 mb-3 rounded-lg border p-1 shadow-sm backdrop-blur",children:i.map(o=>l.jsx(c,{value:o.title,children:o.title},o.title))}),i.map(o=>l.jsx(t,{value:o.title,className:"text-default",children:l.jsx(u,{title:o.title,tokens:o.tokens})},o.title))]})}),l.jsx(t,{value:"semantic",className:"text-default",children:l.jsxs(p,{defaultValue:((a=$[0])==null?void 0:a.title)||"",className:"w-full",children:[l.jsx(n,{className:"border-default bg-default text-default supports-[backdrop-filter]:bg-default sticky top-14 z-10 mb-3 rounded-lg border p-1 shadow-sm backdrop-blur",children:$.map(o=>l.jsx(c,{value:o.title,children:o.title},o.title))}),$.map(o=>l.jsx(t,{value:o.title,className:"text-default",children:l.jsx(u,{title:o.title,tokens:o.tokens})},o.title))]})})]})};d.__docgenInfo={description:"",methods:[],displayName:"ColorPreview"};function v(e){const a={code:"code",h1:"h1",h3:"h3",li:"li",p:"p",pre:"pre",ul:"ul",...y(),...e.components};return l.jsxs(l.Fragment,{children:[l.jsx(g,{title:"1.foundations/color"}),`
|
|
1
|
+
import{j as l}from"./jsx-runtime-BTJTZTIL.js";import{useMDXComponents as y}from"./index-B4FGfHer.js";import{b as g,U as b}from"./index-DEgQqQ_-.js";import{d as p,e as n,f as c,g as t}from"./react-resizable-panels.browser-CYcsrUgg.js";import"./index-Dmy2JGbm.js";import{c as f}from"./browserUtils-CQM9Za7e.js";import"./index-ChsGqxH_.js";import"./iframe-DQEjJuXA.js";import"./index-CT3U1fyk.js";import"./index-BRq5TIsn.js";import"./index-DgH-xKnr.js";import"./index-DrFu-skq.js";const k={"scale color":{red:{500:{$type:"color",$value:"#fb2c36"},600:{$type:"color",$value:"#e7000b"},"alpha-50p":{$type:"color",$value:"#fb2c3680"},"alpha-30p":{$type:"color",$value:"#fb2c364d"},"alpha-10p":{$type:"color",$value:"#fb2c361a"},"alpha-20p":{$type:"color",$value:"#fb2c3633"}},orange:{500:{$type:"color",$value:"#ff6900"},600:{$type:"color",$value:"#f54a00"},"alpha-50p":{$type:"color",$value:"#ff690080"},"alpha-30p":{$type:"color",$value:"#ff69004d"},"alpha-10p":{$type:"color",$value:"#ff69001a"},"alpha-20p":{$type:"color",$value:"#ff690033"}},green:{500:{$type:"color",$value:"#00c951"},600:{$type:"color",$value:"#00a63e"},"alpha-50p":{$type:"color",$value:"#00c95180"},"alpha-30p":{$type:"color",$value:"#00c9514d"},"alpha-10p":{$type:"color",$value:"#00c9511a"},"alpha-20p":{$type:"color",$value:"#00c95133"}},blue:{500:{$type:"color",$value:"#2b7fff"},600:{$type:"color",$value:"#155dfc"},"alpha-50p":{$type:"color",$value:"#2b7fff80"},"alpha-30p":{$type:"color",$value:"#2b7fff4d"},"alpha-10p":{$type:"color",$value:"#2b7fff1a"},"alpha-20p":{$type:"color",$value:"#2b7fff33"}},"zinc-950-alpha":{5:{$type:"color",$value:"#09090b0d"},10:{$type:"color",$value:"#09090b1a"},15:{$type:"color",$value:"#09090b26"},20:{$type:"color",$value:"#09090b33"},25:{$type:"color",$value:"#09090b40"},30:{$type:"color",$value:"#09090b4d"},40:{$type:"color",$value:"#09090b66"},50:{$type:"color",$value:"#09090b80"},60:{$type:"color",$value:"#09090b99"},70:{$type:"color",$value:"#09090bb3"},75:{$type:"color",$value:"#09090bbf"},80:{$type:"color",$value:"#09090bcc"},85:{$type:"color",$value:"#09090bd9"},90:{$type:"color",$value:"#09090be6"},95:{$type:"color",$value:"#09090bf2"}},"zinc-50-alpha":{5:{$type:"color",$value:"#fafafa0d"},10:{$type:"color",$value:"#fafafa1a"},15:{$type:"color",$value:"#fafafa26"},20:{$type:"color",$value:"#fafafa33"},25:{$type:"color",$value:"#fafafa40"},30:{$type:"color",$value:"#fafafa4d"},40:{$type:"color",$value:"#fafafa66"},50:{$type:"color",$value:"#fafafa80"},60:{$type:"color",$value:"#fafafa99"},70:{$type:"color",$value:"#fafafab3"},75:{$type:"color",$value:"#fafafabf"},80:{$type:"color",$value:"#fafafacc"},85:{$type:"color",$value:"#fafafad9"},90:{$type:"color",$value:"#fafafae6"},95:{$type:"color",$value:"#fafafaf2"}},zinc:{50:{$type:"color",$value:"#fafafa"},100:{$type:"color",$value:"#f4f4f5"},200:{$type:"color",$value:"#e4e4e7"},300:{$type:"color",$value:"#d4d4d8"},400:{$type:"color",$value:"#9f9fa9"},500:{$type:"color",$value:"#71717b"},600:{$type:"color",$value:"#52525c"},700:{$type:"color",$value:"#3f3f46"},800:{$type:"color",$value:"#232326"},900:{$type:"color",$value:"#18181b"},950:{$type:"color",$value:"#09090b"}},base:{black:{$type:"color",$value:"#000000"},transparent:{$type:"color",$value:"#ffffff00"},white:{$type:"color",$value:"#ffffff"}},yellow:{400:{$type:"color",$value:"#fcc800"},500:{$type:"color",$value:"#efb100"},"alpha-50p":{$type:"color",$value:"#fcc80080"},"alpha-30p":{$type:"color",$value:"#fcc8004d"},"alpha-10p":{$type:"color",$value:"#fcc8001a"},"alpha-20p":{$type:"color",$value:"#fcc80033"}},primary:{"alpha-10p":{$type:"color",$value:"#155dfc1a"},"alpha-30p":{$type:"color",$value:"#155dfc4d"},stronger:{$type:"color",$value:"#003baf"},strong:{$type:"color",$value:"#154dd0"},"alpha-50p":{$type:"color",$value:"#155dfc80"},normal:{$type:"color",$value:"#155dfc"}},custom:{"gray-100":{$type:"color",$value:"#18181a"},"gray-200":{$type:"color",$value:"#1f1f22"},"gray-300":{$type:"color",$value:"#2a2a2d"}},violet:{500:{$type:"color",$value:"#8e51ff"},600:{$type:"color",$value:"#7f22fe"},"alpha-50p":{$type:"color",$value:"#8e51ff80"},"alpha-30p":{$type:"color",$value:"#8e51ff4d"},"alpha-20p":{$type:"color",$value:"#8e51ff33"},"alpha-10p":{$type:"color",$value:"#8e51ff1a"}},rainbow:{normal:{$type:"color",$value:"#e6331b"},strong:{$type:"color",$value:"#cf2d18"},stronger:{$type:"color",$value:"#b82815"},"alpha-50p":{$type:"color",$value:"#e6331b80"},"alpha-30p":{$type:"color",$value:"#e6331b4d"},"alpha-10p":{$type:"color",$value:"#e6331b1a"}},"icon-primary":{$type:"color",$value:"#5c9cff"},navy:{normal:{$type:"color",$value:"#0b558c"},strong:{$type:"color",$value:"#094a7a"},stronger:{$type:"color",$value:"#073e67"},"alpha-50p":{$type:"color",$value:"#0b558c80"},"alpha-30p":{$type:"color",$value:"#082a6c4d"},"alpha-10p":{$type:"color",$value:"#082a6c1a"},"alpha-20p":{$type:"color",$value:"#0b558c33"},"alpha-15p":{$type:"color",$value:"#0b558c26"}}}},L={"semantic color":JSON.parse('{"fg":{"default":{"$type":"color","$value":{"Dark":"{color.scale.zinc.50}","Light":"{color.scale.zinc.950}"}},"danger-subtle":{"$type":"color","$value":{"Dark":"{color.scale.red.alpha-30p}","Light":"{color.scale.red.alpha-50p}"}},"danger":{"$type":"color","$value":{"Dark":"{color.scale.red.500}","Light":"{color.scale.red.500}"}},"warning-subtle":{"$type":"color","$value":{"Dark":"{color.scale.orange.alpha-50p}","Light":"{color.scale.orange.alpha-50p}"}},"warning":{"$type":"color","$value":{"Dark":"{color.scale.orange.500}","Light":"{color.scale.orange.500}"}},"success-subtle":{"$type":"color","$value":{"Dark":"{color.scale.green.alpha-50p}","Light":"{color.scale.green.alpha-50p}"}},"success":{"$type":"color","$value":{"Dark":"{color.scale.green.500}","Light":"{color.scale.green.600}"}},"information-subtle":{"$type":"color","$value":{"Dark":"{color.scale.blue.alpha-50p}","Light":"{color.scale.blue.alpha-50p}"}},"information":{"$type":"color","$value":{"Dark":"{color.scale.blue.500}","Light":"{color.scale.blue.500}"}},"disabled":{"$type":"color","$value":{"Dark":"{color.scale.zinc-50-alpha.20}","Light":"{color.scale.zinc-950-alpha.25}"}},"inverse":{"$type":"color","$value":{"Dark":"{color.scale.zinc.950}","Light":"{color.scale.zinc.50}"}},"subtlest":{"$type":"color","$value":{"Dark":"{color.scale.zinc-50-alpha.30}","Light":"{color.scale.zinc-950-alpha.40}"}},"subtle":{"$type":"color","$value":{"Dark":"{color.scale.zinc-50-alpha.60}","Light":"{color.scale.zinc-950-alpha.70}"}},"subtler":{"$type":"color","$value":{"Dark":"{color.scale.zinc-50-alpha.40}","Light":"{color.scale.zinc-950-alpha.60}"}},"inverse-disabled":{"$type":"color","$value":{"Dark":"{color.scale.zinc-950-alpha.15}","Light":"{color.scale.zinc-50-alpha.20}"}},"brand":{"$type":"color","$value":{"Dark":"{color.scale.primary.normal}","Light":"{color.scale.primary.normal}"}},"brand-subtle":{"$type":"color","$value":{"Dark":"{color.scale.primary.alpha-50p}","Light":"{color.scale.primary.alpha-50p}"}},"default-hovered":{"$type":"color","$value":{"Dark":"{color.scale.zinc-50-alpha.80}","Light":"{color.scale.zinc-950-alpha.80}"}},"brand-hovered":{"$type":"color","$value":{"Dark":"{color.scale.primary.strong}","Light":"{color.scale.primary.strong}"}},"caution":{"$type":"color","$value":{"Dark":"{color.scale.yellow.400}","Light":"{color.scale.yellow.400}"}},"caution-subtle":{"$type":"color","$value":{"Dark":"{color.scale.yellow.alpha-50p}","Light":"{color.scale.yellow.alpha-50p}"}},"static-white":{"$type":"color","$value":{"Dark":"{color.scale.base.white}","Light":"{color.scale.base.white}"}},"static-white-subtle":{"$type":"color","$value":{"Dark":"{color.scale.zinc.500}","Light":"{color.scale.zinc.500}"}},"debug":{"$type":"color","$value":{"Dark":"{color.scale.violet.500}","Light":"{color.scale.violet.500}"}},"debug-subtle":{"$type":"color","$value":{"Dark":"{color.scale.violet.alpha-50p}","Light":"{color.scale.violet.alpha-50p}"}},"rb":{"$type":"color","$value":{"Dark":"{color.scale.rainbow.normal}","Light":"{color.scale.rainbow.normal}"}},"rb-subtle":{"$type":"color","$value":{"Dark":"{color.scale.rainbow.alpha-50p}","Light":"{color.scale.rainbow.alpha-50p}"}},"navy":{"$type":"color","$value":{"Dark":"{color.scale.navy.normal}","Light":"{color.scale.navy.normal}"}},"navy-subtle":{"$type":"color","$value":{"Dark":"{color.scale.navy.alpha-50p}","Light":"{color.scale.navy.alpha-50p}"}},"navy-hovered":{"$type":"color","$value":{"Dark":"{color.scale.navy.strong}","Light":"{color.scale.navy.strong}"}}},"border":{"default":{"$type":"color","$value":{"Dark":"{color.scale.zinc-50-alpha.30}","Light":"{color.scale.zinc-950-alpha.20}"}},"danger-stronger":{"$type":"color","$value":{"Dark":"{color.scale.red.500}","Light":"{color.scale.red.500}"}},"warning-stronger":{"$type":"color","$value":{"Dark":"{color.scale.orange.500}","Light":"{color.scale.orange.500}"}},"success-stronger":{"$type":"color","$value":{"Dark":"{color.scale.green.500}","Light":"{color.scale.green.500}"}},"information-stronger":{"$type":"color","$value":{"Dark":"{color.scale.blue.500}","Light":"{color.scale.blue.500}"}},"disabled":{"$type":"color","$value":{"Dark":"{color.scale.zinc-50-alpha.5}","Light":"{color.scale.zinc-950-alpha.5}"}},"inverse-stronger":{"$type":"color","$value":{"Dark":"{color.scale.zinc-950-alpha.90}","Light":"{color.scale.zinc-50-alpha.90}"}},"stronger":{"$type":"color","$value":{"Dark":"{color.scale.zinc-50-alpha.90}","Light":"{color.scale.zinc-950-alpha.90}"}},"inverse":{"$type":"color","$value":{"Dark":"{color.scale.zinc-950-alpha.20}","Light":"{color.scale.zinc-50-alpha.30}"}},"danger":{"$type":"color","$value":{"Dark":"{color.scale.red.alpha-50p}","Light":"{color.scale.red.alpha-50p}"}},"warning":{"$type":"color","$value":{"Dark":"{color.scale.orange.alpha-50p}","Light":"{color.scale.orange.alpha-50p}"}},"information":{"$type":"color","$value":{"Dark":"{color.scale.blue.alpha-50p}","Light":"{color.scale.blue.alpha-50p}"}},"success":{"$type":"color","$value":{"Dark":"{color.scale.green.alpha-50p}","Light":"{color.scale.green.alpha-50p}"}},"subtle":{"$type":"color","$value":{"Dark":"{color.scale.zinc-50-alpha.15}","Light":"{color.scale.zinc-950-alpha.15}"}},"input-focused":{"$type":"color","$value":{"Dark":"{color.scale.zinc-50-alpha.90}","Light":"{color.scale.zinc-950-alpha.90}"}},"inverse-disabled":{"$type":"color","$value":{"Dark":"{color.scale.zinc-950-alpha.10}","Light":"{color.scale.zinc-50-alpha.10}"}},"brand-stronger":{"$type":"color","$value":{"Dark":"{color.scale.primary.normal}","Light":"{color.scale.primary.normal}"}},"brand":{"$type":"color","$value":{"Dark":"{color.scale.primary.alpha-50p}","Light":"{color.scale.primary.alpha-50p}"}},"caution-stronger":{"$type":"color","$value":{"Dark":"{color.scale.yellow.400}","Light":"{color.scale.yellow.400}"}},"caution":{"$type":"color","$value":{"Dark":"{color.scale.yellow.alpha-50p}","Light":"{color.scale.yellow.alpha-50p}"}},"debug-stronger":{"$type":"color","$value":{"Dark":"{color.scale.violet.500}","Light":"{color.scale.violet.500}"}},"debug":{"$type":"color","$value":{"Dark":"{color.scale.violet.alpha-50p}","Light":"{color.scale.violet.alpha-50p}"}},"subtler":{"$type":"color","$value":{"Dark":"{color.scale.zinc-50-alpha.10}","Light":"{color.scale.zinc-950-alpha.10}"}},"rb-stronger":{"$type":"color","$value":{"Dark":"{color.scale.rainbow.normal}","Light":"{color.scale.rainbow.normal}"}},"rb":{"$type":"color","$value":{"Dark":"{color.scale.rainbow.alpha-50p}","Light":"{color.scale.rainbow.alpha-50p}"}},"navy-stronger":{"$type":"color","$value":{"Dark":"{color.scale.navy.normal}","Light":"{color.scale.navy.normal}"}},"navy":{"$type":"color","$value":{"Dark":"{color.scale.navy.alpha-50p}","Light":"{color.scale.navy.alpha-50p}"}}},"fill":{"danger-subtle":{"$type":"color","$value":{"Dark":"{color.scale.red.alpha-30p}","Light":"{color.scale.red.alpha-30p}"}},"danger":{"$type":"color","$value":{"Dark":"{color.scale.red.500}","Light":"{color.scale.red.500}"}},"warning-subtle":{"$type":"color","$value":{"Dark":"{color.scale.orange.alpha-30p}","Light":"{color.scale.orange.alpha-30p}"}},"warning":{"$type":"color","$value":{"Dark":"{color.scale.orange.500}","Light":"{color.scale.orange.500}"}},"success-subtle":{"$type":"color","$value":{"Dark":"{color.scale.green.alpha-30p}","Light":"{color.scale.green.alpha-30p}"}},"success":{"$type":"color","$value":{"Dark":"{color.scale.green.500}","Light":"{color.scale.green.500}"}},"information-subtle":{"$type":"color","$value":{"Dark":"{color.scale.blue.alpha-30p}","Light":"{color.scale.blue.alpha-30p}"}},"information":{"$type":"color","$value":{"Dark":"{color.scale.blue.500}","Light":"{color.scale.blue.500}"}},"disabled":{"$type":"color","$value":{"Dark":"{color.scale.zinc-50-alpha.5}","Light":"{color.scale.zinc-950-alpha.5}"}},"control surface":{"$type":"color","$value":{"Dark":"{color.scale.zinc-950-alpha.50}","Light":"{color.scale.zinc.50}"}},"inverse":{"$type":"color","$value":{"Dark":"{color.scale.zinc.900}","Light":"{color.scale.zinc.100}"}},"inverse-hovered":{"$type":"color","$value":{"Dark":"{color.scale.zinc.700}","Light":"{color.scale.zinc.300}"}},"subtle":{"$type":"color","$value":{"Dark":"{color.scale.zinc-50-alpha.40}","Light":"{color.scale.zinc-950-alpha.40}"}},"subtle-hovered":{"$type":"color","$value":{"Dark":"{color.scale.zinc-50-alpha.30}","Light":"{color.scale.zinc-950-alpha.30}"}},"transparent":{"$type":"color","$value":{"Dark":"{color.scale.base.transparent}","Light":"{color.scale.base.transparent}"}},"transparent-hovered":{"$type":"color","$value":{"Dark":"{color.scale.zinc-50-alpha.5}","Light":"{color.scale.zinc-950-alpha.5}"}},"default":{"$type":"color","$value":{"Dark":"{color.scale.zinc.100}","Light":"{color.scale.zinc.900}"}},"default-hovered":{"$type":"color","$value":{"Dark":"{color.scale.zinc.300}","Light":"{color.scale.zinc.700}"}},"inverse-subtle":{"$type":"color","$value":{"Dark":"{color.scale.zinc-950-alpha.40}","Light":"{color.scale.zinc-50-alpha.40}"}},"inverse-subtle-hovered":{"$type":"color","$value":{"Dark":"{color.scale.zinc-950-alpha.30}","Light":"{color.scale.zinc-50-alpha.30}"}},"inverse-disabled":{"$type":"color","$value":{"Dark":"{color.scale.zinc-950-alpha.10}","Light":"{color.scale.zinc-50-alpha.10}"}},"brand":{"$type":"color","$value":{"Dark":"{color.scale.primary.normal}","Light":"{color.scale.primary.normal}"}},"brand-subtle":{"$type":"color","$value":{"Dark":"{color.scale.primary.alpha-50p}","Light":"{color.scale.primary.alpha-50p}"}},"subtler":{"$type":"color","$value":{"Dark":"{color.scale.zinc-50-alpha.20}","Light":"{color.scale.zinc-950-alpha.20}"}},"subtler-hovered":{"$type":"color","$value":{"Dark":"{color.scale.zinc-50-alpha.15}","Light":"{color.scale.zinc-950-alpha.15}"}},"brand-hovered":{"$type":"color","$value":{"Dark":"{color.scale.primary.strong}","Light":"{color.scale.primary.strong}"}},"control surface-hovered":{"$type":"color","$value":{"Dark":"{color.scale.zinc-950-alpha.30}","Light":"{color.scale.zinc.100}"}},"caution-subtle":{"$type":"color","$value":{"Dark":"{color.scale.yellow.alpha-30p}","Light":"{color.scale.yellow.alpha-30p}"}},"caution":{"$type":"color","$value":{"Dark":"{color.scale.yellow.400}","Light":"{color.scale.yellow.400}"}},"danger-subtler":{"$type":"color","$value":{"Dark":"{color.scale.red.alpha-20p}","Light":"{color.scale.red.alpha-20p}"}},"warning-subtler":{"$type":"color","$value":{"Dark":"{color.scale.orange.alpha-20p}","Light":"{color.scale.orange.alpha-20p}"}},"caution-subtler":{"$type":"color","$value":{"Dark":"{color.scale.yellow.alpha-20p}","Light":"{color.scale.yellow.alpha-20p}"}},"success-subtler":{"$type":"color","$value":{"Dark":"{color.scale.green.alpha-20p}","Light":"{color.scale.green.alpha-20p}"}},"information-subtler":{"$type":"color","$value":{"Dark":"{color.scale.blue.alpha-20p}","Light":"{color.scale.blue.alpha-20p}"}},"subtlest":{"$type":"color","$value":{"Dark":"{color.scale.zinc-50-alpha.10}","Light":"{color.scale.zinc-950-alpha.10}"}},"subtlest-hovered":{"$type":"color","$value":{"Dark":"{color.scale.zinc-50-alpha.5}","Light":"{color.scale.zinc-950-alpha.5}"}},"warning-subtlest":{"$type":"color","$value":{"Dark":"{color.scale.orange.alpha-10p}","Light":"{color.scale.orange.alpha-10p}"}},"caution-subtlest":{"$type":"color","$value":{"Dark":"{color.scale.yellow.alpha-10p}","Light":"{color.scale.yellow.alpha-10p}"}},"information-subtlest":{"$type":"color","$value":{"Dark":"{color.scale.blue.alpha-10p}","Light":"{color.scale.blue.alpha-10p}"}},"success-subtlest":{"$type":"color","$value":{"Dark":"{color.scale.green.alpha-10p}","Light":"{color.scale.green.alpha-10p}"}},"danger-subtlest":{"$type":"color","$value":{"Dark":"{color.scale.red.alpha-10p}","Light":"{color.scale.red.alpha-10p}"}},"danger-hovered":{"$type":"color","$value":{"Dark":"{color.scale.red.600}","Light":"{color.scale.red.600}"}},"warning-hovered":{"$type":"color","$value":{"Dark":"{color.scale.orange.600}","Light":"{color.scale.orange.600}"}},"caution-hovered":{"$type":"color","$value":{"Dark":"{color.scale.yellow.500}","Light":"{color.scale.yellow.500}"}},"information-hovered":{"$type":"color","$value":{"Dark":"{color.scale.blue.600}","Light":"{color.scale.blue.600}"}},"success-hovered":{"$type":"color","$value":{"Dark":"{color.scale.green.600}","Light":"{color.scale.green.600}"}},"debug":{"$type":"color","$value":{"Dark":"{color.scale.violet.500}","Light":"{color.scale.violet.500}"}},"debug-hovered":{"$type":"color","$value":{"Dark":"{color.scale.violet.600}","Light":"{color.scale.violet.600}"}},"debug-subtle":{"$type":"color","$value":{"Dark":"{color.scale.violet.alpha-30p}","Light":"{color.scale.violet.alpha-30p}"}},"debug-subtler":{"$type":"color","$value":{"Dark":"{color.scale.violet.alpha-20p}","Light":"{color.scale.violet.alpha-20p}"}},"debug-subtlest":{"$type":"color","$value":{"Dark":"{color.scale.violet.alpha-10p}","Light":"{color.scale.violet.alpha-10p}"}},"control surface-disabled":{"$type":"color","$value":{"Dark":"{color.scale.zinc-950-alpha.25}","Light":"{color.scale.zinc.50}"}},"brand-subtler":{"$type":"color","$value":{"Dark":"{color.scale.primary.alpha-30p}","Light":"{color.scale.primary.alpha-30p}"}},"rb":{"$type":"color","$value":{"Dark":"{color.scale.rainbow.normal}","Light":"{color.scale.rainbow.normal}"}},"rb-hovered":{"$type":"color","$value":{"Dark":"{color.scale.rainbow.strong}","Light":"{color.scale.rainbow.strong}"}},"rb-subtle":{"$type":"color","$value":{"Dark":"{color.scale.rainbow.alpha-50p}","Light":"{color.scale.rainbow.alpha-50p}"}},"rb-subtler":{"$type":"color","$value":{"Dark":"{color.scale.rainbow.alpha-30p}","Light":"{color.scale.rainbow.alpha-30p}"}},"rb-subtlest":{"$type":"color","$value":{"Dark":"{color.scale.rainbow.alpha-10p}","Light":"{color.scale.rainbow.alpha-10p}"}},"icon-program":{"$type":"color","$value":{"Dark":"{color.scale.icon-primary}","Light":"{color.scale.icon-primary}"}},"brand-subtlest":{"$type":"color","$value":{"Dark":"{color.scale.primary.alpha-10p}","Light":"{color.scale.primary.alpha-10p}"}},"navy":{"$type":"color","$value":{"Dark":"{color.scale.navy.normal}","Light":"{color.scale.navy.normal}"}},"navy-hovered":{"$type":"color","$value":{"Dark":"{color.scale.navy.strong}","Light":"{color.scale.navy.strong}"}},"navy-subtle":{"$type":"color","$value":{"Dark":"{color.scale.navy.alpha-50p}","Light":"{color.scale.navy.alpha-50p}"}},"navy-subtler":{"$type":"color","$value":{"Dark":"{color.scale.navy.alpha-20p}","Light":"{color.scale.navy.alpha-20p}"}},"navy-subtlest":{"$type":"color","$value":{"Dark":"{color.scale.navy.alpha-15p}","Light":"{color.scale.navy.alpha-15p}"}}},"bg":{"dim":{"$type":"color","$value":{"Dark":"{color.scale.zinc-950-alpha.80}","Light":"{color.scale.zinc-950-alpha.50}"}},"default":{"$type":"color","$value":{"Dark":"{color.scale.zinc.950}","Light":"{color.scale.zinc.50}"}},"overlay":{"$type":"color","$value":{"Dark":"{color.scale.zinc.700}","Light":"{color.scale.zinc.100}"}},"inverse":{"$type":"color","$value":{"Dark":"{color.scale.base.white}","Light":"{color.scale.zinc.950}"}},"raised":{"$type":"color","$value":{"Dark":"{color.scale.custom.gray-300}","Light":"{color.scale.zinc.100}"}},"card":{"$type":"color","$value":{"Dark":"{color.scale.zinc-50-alpha.10}","Light":"{color.scale.base.white}"}},"alt-1":{"$type":"color","$value":{"Dark":"{color.scale.zinc.900}","Light":"{color.scale.zinc.200}"}},"alt-2":{"$type":"color","$value":{"Dark":"{color.scale.zinc.800}","Light":"{color.scale.zinc.300}"}},"translucent":{"$type":"color","$value":{"Dark":"{color.scale.zinc-950-alpha.60}","Light":"{color.scale.zinc-50-alpha.50}"}},"overlay-high":{"$type":"color","$value":{"Dark":"{color.scale.zinc.600}","Light":"{color.scale.zinc.200}"}},"tooltip":{"$type":"color","$value":{"Dark":"{color.scale.zinc.50}","Light":"{color.scale.zinc.900}"}}}}')},m=e=>{f({text:e}),alert("복사가 완료되었습니다.")},D=e=>typeof e=="object"&&e!==null&&"$value"in e,h=(e,a=[])=>{if(D(e))return[a.join("-")];const o=[];return Object.entries(e).forEach(([r,s])=>{r.startsWith("$")||o.push(...h(s,[...a,r]))}),o},z=()=>{const e=k["scale color"];return Object.entries(e).map(([a,o])=>{const r=h(o,[a]);return{title:a,tokens:r.map(s=>`bg-scale-${s}`)}})},x=()=>{const e=L["semantic color"];return Object.entries(e).map(([a,o])=>{const r=h(o,[a]);return{title:a,tokens:r}})},i=z(),$=x(),j={backgroundColor:"#f1f1f4",backgroundImage:"linear-gradient(45deg, #bfbfc7 25%, transparent 25%), linear-gradient(-45deg, #bfbfc7 25%, transparent 25%), linear-gradient(45deg, transparent 75%, #bfbfc7 75%), linear-gradient(-45deg, transparent 75%, #bfbfc7 75%)",backgroundSize:"10px 10px",backgroundPosition:"0 0, 0 5px, 5px -5px, -5px 0px"},w=e=>e.includes("alpha")||e.includes("transparent"),C=e=>e.startsWith("bg-scale-")?`--color-scale-${e.replace(/^bg-scale-/,"")}`:`--color-${e}`,N=({utility:e})=>{const a=C(e),o=w(e);return l.jsxs("button",{type:"button",className:"border-default bg-default cursor-copy rounded-md border p-2 text-left",onClick:()=>m(e),title:`Copy ${e}`,children:[l.jsx("div",{className:"border-subtle relative h-10 overflow-hidden rounded border",style:o?j:void 0,children:l.jsx("div",{className:"absolute inset-0",style:{backgroundColor:`var(${a})`}})}),l.jsx("p",{className:"text-subtle mt-2 text-sm break-all",children:e}),l.jsx("p",{className:"text-subtler mt-1 text-sm break-all",children:a})]})},u=({title:e,tokens:a})=>l.jsxs("section",{className:"border-default bg-default text-default space-y-2 rounded-lg border p-4",children:[l.jsx("h4",{className:"text-base font-semibold capitalize",children:e}),l.jsx("div",{className:"grid gap-2 sm:grid-cols-2 xl:grid-cols-3",children:a.map(o=>l.jsx(N,{utility:o},o))})]}),d=()=>{var e,a;return l.jsxs(p,{defaultValue:"scale",className:"w-full",children:[l.jsxs(n,{className:"border-default bg-default text-default supports-[backdrop-filter]:bg-default sticky top-2 z-20 mb-3 rounded-lg border p-1 shadow-sm backdrop-blur",children:[l.jsx(c,{value:"scale",children:"Scale"}),l.jsx(c,{value:"semantic",children:"Semantic"})]}),l.jsx(t,{value:"scale",className:"text-default",children:l.jsxs(p,{defaultValue:((e=i[0])==null?void 0:e.title)||"",className:"w-full",children:[l.jsx(n,{className:"border-default bg-default text-default supports-[backdrop-filter]:bg-default sticky top-14 z-10 mb-3 rounded-lg border p-1 shadow-sm backdrop-blur",children:i.map(o=>l.jsx(c,{value:o.title,children:o.title},o.title))}),i.map(o=>l.jsx(t,{value:o.title,className:"text-default",children:l.jsx(u,{title:o.title,tokens:o.tokens})},o.title))]})}),l.jsx(t,{value:"semantic",className:"text-default",children:l.jsxs(p,{defaultValue:((a=$[0])==null?void 0:a.title)||"",className:"w-full",children:[l.jsx(n,{className:"border-default bg-default text-default supports-[backdrop-filter]:bg-default sticky top-14 z-10 mb-3 rounded-lg border p-1 shadow-sm backdrop-blur",children:$.map(o=>l.jsx(c,{value:o.title,children:o.title},o.title))}),$.map(o=>l.jsx(t,{value:o.title,className:"text-default",children:l.jsx(u,{title:o.title,tokens:o.tokens})},o.title))]})})]})};d.__docgenInfo={description:"",methods:[],displayName:"ColorPreview"};function v(e){const a={code:"code",h1:"h1",h3:"h3",li:"li",p:"p",pre:"pre",ul:"ul",...y(),...e.components};return l.jsxs(l.Fragment,{children:[l.jsx(g,{title:"1.foundations/color"}),`
|
|
2
2
|
`,l.jsx(a.h1,{id:"color",children:"Color"}),`
|
|
3
3
|
`,l.jsxs(a.p,{children:[l.jsx(a.code,{children:"rb-token.css"}),"에 정의된 색상 토큰 전체를 미리보기에서 확인합니다."]}),`
|
|
4
4
|
`,l.jsx(a.pre,{children:l.jsx(a.code,{className:"language-tsx",children:`<div className="bg-default text-default border border-default" />
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as e}from"./jsx-runtime-BTJTZTIL.js";import{useMDXComponents as g}from"./index-B4FGfHer.js";import{b as S,U as $}from"./index-BzvSJzrT.js";import{d as u,e as s,f as c,g as b}from"./react-resizable-panels.browser-CYcsrUgg.js";import"./index-Dmy2JGbm.js";import{c as v}from"./browserUtils-CQM9Za7e.js";import"./index-ChsGqxH_.js";import"./iframe-DsvRKHwc.js";import"./index-CT3U1fyk.js";import"./index-BRq5TIsn.js";import"./index-DgH-xKnr.js";import"./index-DrFu-skq.js";const F=JSON.parse('{"title":{"01":{"normal":{"$type":"typography","$value":{"fontSize":16,"lineHeight":24,"letterSpacing":0,"fontWeight":400,"fontFamily":"Pretendard Variable"}},"medium":{"$type":"typography","$value":{"fontSize":16,"lineHeight":24,"letterSpacing":0,"fontWeight":500,"fontFamily":"Pretendard Variable"}},"bold":{"$type":"typography","$value":{"fontSize":16,"lineHeight":24,"letterSpacing":0,"fontWeight":700,"fontFamily":"Pretendard Variable"}}},"02":{"normal":{"$type":"typography","$value":{"fontSize":18,"lineHeight":28,"letterSpacing":0,"fontWeight":400,"fontFamily":"Pretendard Variable"}},"medium":{"$type":"typography","$value":{"fontSize":18,"lineHeight":28,"letterSpacing":0,"fontWeight":500,"fontFamily":"Pretendard Variable"}},"bold":{"$type":"typography","$value":{"fontSize":18,"lineHeight":28,"letterSpacing":0,"fontWeight":700,"fontFamily":"Pretendard Variable"}}},"03":{"normal":{"$type":"typography","$value":{"fontSize":20,"lineHeight":32,"letterSpacing":0,"fontWeight":400,"fontFamily":"Pretendard Variable"}},"medium":{"$type":"typography","$value":{"fontSize":20,"lineHeight":32,"letterSpacing":0,"fontWeight":500,"fontFamily":"Pretendard Variable"}},"bold":{"$type":"typography","$value":{"fontSize":20,"lineHeight":32,"letterSpacing":0,"fontWeight":700,"fontFamily":"Pretendard Variable"}}},"04":{"normal":{"$type":"typography","$value":{"fontSize":24,"lineHeight":36,"letterSpacing":0,"fontWeight":400,"fontFamily":"Pretendard Variable"}},"medium":{"$type":"typography","$value":{"fontSize":24,"lineHeight":36,"letterSpacing":0,"fontWeight":500,"fontFamily":"Pretendard Variable"}},"bold":{"$type":"typography","$value":{"fontSize":24,"lineHeight":36,"letterSpacing":0,"fontWeight":700,"fontFamily":"Pretendard Variable"}}},"05":{"normal":{"$type":"typography","$value":{"fontSize":30,"lineHeight":44,"letterSpacing":0,"fontWeight":400,"fontFamily":"Pretendard Variable"}},"medium":{"$type":"typography","$value":{"fontSize":30,"lineHeight":44,"letterSpacing":0,"fontWeight":500,"fontFamily":"Pretendard Variable"}},"bold":{"$type":"typography","$value":{"fontSize":30,"lineHeight":44,"letterSpacing":0,"fontWeight":700,"fontFamily":"Pretendard Variable"}}},"06":{"normal":{"$type":"typography","$value":{"fontSize":36,"lineHeight":54,"letterSpacing":0,"fontWeight":400,"fontFamily":"Pretendard Variable"}},"medium":{"$type":"typography","$value":{"fontSize":36,"lineHeight":54,"letterSpacing":0,"fontWeight":500,"fontFamily":"Pretendard Variable"}},"bold":{"$type":"typography","$value":{"fontSize":36,"lineHeight":54,"letterSpacing":0,"fontWeight":700,"fontFamily":"Pretendard Variable"}}}},"body":{"lg":{"normal":{"$type":"typography","$value":{"fontSize":18,"lineHeight":32,"letterSpacing":0,"fontWeight":400,"fontFamily":"Pretendard Variable"}},"medium":{"$type":"typography","$value":{"fontSize":18,"lineHeight":32,"letterSpacing":0,"fontWeight":500,"fontFamily":"Pretendard Variable"}},"semibold":{"$type":"typography","$value":{"fontSize":18,"lineHeight":32,"letterSpacing":0,"fontWeight":600,"fontFamily":"Pretendard Variable"}}},"md":{"normal":{"$type":"typography","$value":{"fontSize":16,"lineHeight":28,"letterSpacing":0,"fontWeight":400,"fontFamily":"Pretendard Variable"}},"medium":{"$type":"typography","$value":{"fontSize":16,"lineHeight":28,"letterSpacing":0,"fontWeight":500,"fontFamily":"Pretendard Variable"}},"semibold":{"$type":"typography","$value":{"fontSize":16,"lineHeight":28,"letterSpacing":0,"fontWeight":600,"fontFamily":"Pretendard Variable"}}},"sm2":{"normal":{"$type":"typography","$value":{"fontSize":15,"lineHeight":26,"letterSpacing":0,"fontWeight":400,"fontFamily":"Pretendard Variable"}},"medium":{"$type":"typography","$value":{"fontSize":15,"lineHeight":26,"letterSpacing":0,"fontWeight":500,"fontFamily":"Pretendard Variable"}},"semibold":{"$type":"typography","$value":{"fontSize":15,"lineHeight":26,"letterSpacing":0,"fontWeight":600,"fontFamily":"Pretendard Variable"}}},"sm":{"normal":{"$type":"typography","$value":{"fontSize":14,"lineHeight":24,"letterSpacing":0,"fontWeight":400,"fontFamily":"Pretendard Variable"}},"medium":{"$type":"typography","$value":{"fontSize":14,"lineHeight":24,"letterSpacing":0,"fontWeight":500,"fontFamily":"Pretendard Variable"}},"semibold":{"$type":"typography","$value":{"fontSize":14,"lineHeight":24,"letterSpacing":0,"fontWeight":600,"fontFamily":"Pretendard Variable"}}},"xs2":{"normal":{"$type":"typography","$value":{"fontSize":13,"lineHeight":22,"letterSpacing":0,"fontWeight":400,"fontFamily":"Pretendard Variable"}},"medium":{"$type":"typography","$value":{"fontSize":13,"lineHeight":22,"letterSpacing":0,"fontWeight":500,"fontFamily":"Pretendard Variable"}},"semibold":{"$type":"typography","$value":{"fontSize":13,"lineHeight":22,"letterSpacing":0,"fontWeight":600,"fontFamily":"Pretendard Variable"}}},"xs":{"normal":{"$type":"typography","$value":{"fontSize":12,"lineHeight":20,"letterSpacing":0,"fontWeight":400,"fontFamily":"Pretendard Variable"}},"medium":{"$type":"typography","$value":{"fontSize":12,"lineHeight":20,"letterSpacing":0,"fontWeight":500,"fontFamily":"Pretendard Variable"}},"semibold":{"$type":"typography","$value":{"fontSize":12,"lineHeight":20,"letterSpacing":0,"fontWeight":600,"fontFamily":"Pretendard Variable"}}},"2xs":{"normal":{"$type":"typography","$value":{"fontSize":10,"lineHeight":16,"letterSpacing":0,"fontWeight":400,"fontFamily":"Pretendard Variable"}},"medium":{"$type":"typography","$value":{"fontSize":10,"lineHeight":16,"letterSpacing":0,"fontWeight":500,"fontFamily":"Pretendard Variable"}},"semibold":{"$type":"typography","$value":{"fontSize":10,"lineHeight":16,"letterSpacing":0,"fontWeight":600,"fontFamily":"Pretendard Variable"}}}},"compact":{"lg":{"normal":{"$type":"typography","$value":{"fontSize":18,"lineHeight":28,"letterSpacing":0,"fontWeight":400,"fontFamily":"Pretendard Variable"}},"medium":{"$type":"typography","$value":{"fontSize":18,"lineHeight":28,"letterSpacing":0,"fontWeight":500,"fontFamily":"Pretendard Variable"}},"semibold":{"$type":"typography","$value":{"fontSize":18,"lineHeight":28,"letterSpacing":0,"fontWeight":600,"fontFamily":"Pretendard Variable"}}},"md":{"normal":{"$type":"typography","$value":{"fontSize":16,"lineHeight":24,"letterSpacing":0,"fontWeight":400,"fontFamily":"Pretendard Variable"}},"medium":{"$type":"typography","$value":{"fontSize":16,"lineHeight":24,"letterSpacing":0,"fontWeight":500,"fontFamily":"Pretendard Variable"}},"semibold":{"$type":"typography","$value":{"fontSize":16,"lineHeight":24,"letterSpacing":0,"fontWeight":600,"fontFamily":"Pretendard Variable"}}},"sm2":{"normal":{"$type":"typography","$value":{"fontSize":15,"lineHeight":22,"letterSpacing":0,"fontWeight":400,"fontFamily":"Pretendard Variable"}},"medium":{"$type":"typography","$value":{"fontSize":15,"lineHeight":22,"letterSpacing":0,"fontWeight":500,"fontFamily":"Pretendard Variable"}},"semibold":{"$type":"typography","$value":{"fontSize":15,"lineHeight":22,"letterSpacing":0,"fontWeight":600,"fontFamily":"Pretendard Variable"}}},"sm":{"normal":{"$type":"typography","$value":{"fontSize":14,"lineHeight":20,"letterSpacing":0,"fontWeight":400,"fontFamily":"Pretendard Variable"}},"medium":{"$type":"typography","$value":{"fontSize":14,"lineHeight":20,"letterSpacing":0,"fontWeight":500,"fontFamily":"Pretendard Variable"}},"semibold":{"$type":"typography","$value":{"fontSize":14,"lineHeight":20,"letterSpacing":0,"fontWeight":600,"fontFamily":"Pretendard Variable"}}},"xs2":{"normal":{"$type":"typography","$value":{"fontSize":13,"lineHeight":18,"letterSpacing":0,"fontWeight":400,"fontFamily":"Pretendard Variable"}},"medium":{"$type":"typography","$value":{"fontSize":13,"lineHeight":18,"letterSpacing":0,"fontWeight":500,"fontFamily":"Pretendard Variable"}},"semibold":{"$type":"typography","$value":{"fontSize":13,"lineHeight":18,"letterSpacing":0,"fontWeight":600,"fontFamily":"Pretendard Variable"}}},"xs":{"normal":{"$type":"typography","$value":{"fontSize":12,"lineHeight":16,"letterSpacing":0,"fontWeight":400,"fontFamily":"Pretendard Variable"}},"medium":{"$type":"typography","$value":{"fontSize":12,"lineHeight":16,"letterSpacing":0,"fontWeight":500,"fontFamily":"Pretendard Variable"}},"semibold":{"$type":"typography","$value":{"fontSize":12,"lineHeight":16,"letterSpacing":0,"fontWeight":600,"fontFamily":"Pretendard Variable"}}},"2xs":{"normal":{"$type":"typography","$value":{"fontSize":10,"lineHeight":12,"letterSpacing":0,"fontWeight":400,"fontFamily":"Pretendard Variable"}},"medium":{"$type":"typography","$value":{"fontSize":10,"lineHeight":12,"letterSpacing":0,"fontWeight":500,"fontFamily":"Pretendard Variable"}},"semibold":{"$type":"typography","$value":{"fontSize":10,"lineHeight":12,"letterSpacing":0,"fontWeight":600,"fontFamily":"Pretendard Variable"}}}},"code":{"2xs":{"normal":{"$type":"typography","$value":{"fontSize":10,"lineHeight":12,"letterSpacing":0,"fontWeight":400,"fontFamily":"Oxanium"}},"medium":{"$type":"typography","$value":{"fontSize":10,"lineHeight":12,"letterSpacing":0,"fontWeight":500,"fontFamily":"Oxanium"}},"semibold":{"$type":"typography","$value":{"fontSize":10,"lineHeight":12,"letterSpacing":0,"fontWeight":600,"fontFamily":"Oxanium"}}},"xs":{"normal":{"$type":"typography","$value":{"fontSize":12,"lineHeight":14,"letterSpacing":0,"fontWeight":400,"fontFamily":"Oxanium"}},"medium":{"$type":"typography","$value":{"fontSize":12,"lineHeight":14,"letterSpacing":0,"fontWeight":500,"fontFamily":"Oxanium"}},"semibold":{"$type":"typography","$value":{"fontSize":12,"lineHeight":14,"letterSpacing":0,"fontWeight":600,"fontFamily":"Oxanium"}}},"xs2":{"semibold":{"$type":"typography","$value":{"fontSize":13,"lineHeight":18,"letterSpacing":0,"fontWeight":600,"fontFamily":"Oxanium"}},"medium":{"$type":"typography","$value":{"fontSize":13,"lineHeight":18,"letterSpacing":0,"fontWeight":500,"fontFamily":"Oxanium"}},"normal":{"$type":"typography","$value":{"fontSize":13,"lineHeight":18,"letterSpacing":0,"fontWeight":400,"fontFamily":"Oxanium"}}},"sm":{"semibold":{"$type":"typography","$value":{"fontSize":14,"lineHeight":20,"letterSpacing":0,"fontWeight":600,"fontFamily":"Oxanium"}},"medium":{"$type":"typography","$value":{"fontSize":14,"lineHeight":20,"letterSpacing":0,"fontWeight":500,"fontFamily":"Oxanium"}},"normal":{"$type":"typography","$value":{"fontSize":14,"lineHeight":20,"letterSpacing":0,"fontWeight":400,"fontFamily":"Oxanium"}}},"sm2":{"semibold":{"$type":"typography","$value":{"fontSize":15,"lineHeight":22,"letterSpacing":0,"fontWeight":600,"fontFamily":"Oxanium"}},"medium":{"$type":"typography","$value":{"fontSize":15,"lineHeight":22,"letterSpacing":0,"fontWeight":500,"fontFamily":"Oxanium"}},"normal":{"$type":"typography","$value":{"fontSize":15,"lineHeight":22,"letterSpacing":0,"fontWeight":400,"fontFamily":"Oxanium"}}},"md":{"semibold":{"$type":"typography","$value":{"fontSize":16,"lineHeight":24,"letterSpacing":0,"fontWeight":600,"fontFamily":"Oxanium"}},"medium":{"$type":"typography","$value":{"fontSize":16,"lineHeight":24,"letterSpacing":0,"fontWeight":500,"fontFamily":"Oxanium"}},"normal":{"$type":"typography","$value":{"fontSize":16,"lineHeight":24,"letterSpacing":0,"fontWeight":400,"fontFamily":"Oxanium"}}},"lg":{"semibold":{"$type":"typography","$value":{"fontSize":18,"lineHeight":28,"letterSpacing":0,"fontWeight":600,"fontFamily":"Oxanium"}},"medium":{"$type":"typography","$value":{"fontSize":18,"lineHeight":28,"letterSpacing":0,"fontWeight":500,"fontFamily":"Oxanium"}},"normal":{"$type":"typography","$value":{"fontSize":18,"lineHeight":28,"letterSpacing":0,"fontWeight":400,"fontFamily":"Oxanium"}}}}}'),z={text:F},H=({scale:t,weight:i,fontFamilyToken:a})=>[`font-${a??"sans"}`,`text-${t}`,`leading-${t}`,`tracking-${t}`,`font-${i}`].join(" + "),W=t=>{v({text:t}),alert("복사가 완료되었습니다.")},l=Object.entries(z.text??{}),f=()=>{var i;const t=(i=l[0])==null?void 0:i[0];return t?e.jsxs(u,{defaultValue:t,className:"w-full",children:[e.jsx(s,{className:"border-default bg-default text-fg-default supports-[backdrop-filter]:bg-default sticky top-2 z-20 mb-3 rounded-lg border p-1 shadow-sm backdrop-blur",children:l.map(([a])=>e.jsx(c,{value:a,children:a},a))}),l.map(([a,h])=>e.jsx(b,{value:a,children:e.jsx("div",{className:"border-default bg-default text-default space-y-2 rounded-lg border p-4",children:Object.entries(h).flatMap(([o,m])=>Object.entries(m).map(([r,d])=>{var p;const n=`typo-${a}-${o}-${r}`;return e.jsx("button",{type:"button",className:"border-subtle hover:bg-overlay/30 block w-full cursor-copy rounded-md border p-3 text-left transition-colors",onClick:()=>W(n),title:`Copy ${n}`,children:e.jsx("div",{className:"flex items-start justify-between gap-3",children:e.jsxs("div",{className:"min-w-0 flex-1",children:[e.jsxs("p",{className:n,children:["Rainbow Robotics UI Typography Test",e.jsx("br",{}),"ABCDEFGHIJKLMNOPQRSTUVWXYZ 0123456789"]}),e.jsxs("p",{className:"text-subtle mt-1 text-sm",children:[".",n]}),e.jsx("p",{className:"text-subtler mt-1 text-sm",children:H({scale:o,weight:r,fontFamilyToken:(p=d.$value)==null?void 0:p.fontFamilyToken})})]})})},n)}))})},a))]}):null};f.__docgenInfo={description:"",methods:[],displayName:"TextStylePreview"};function y(t){const i={code:"code",h1:"h1",p:"p",pre:"pre",...g(),...t.components};return e.jsxs(e.Fragment,{children:[e.jsx(S,{title:"1.foundations/text-style"}),`
|
|
1
|
+
import{j as e}from"./jsx-runtime-BTJTZTIL.js";import{useMDXComponents as g}from"./index-B4FGfHer.js";import{b as S,U as $}from"./index-DEgQqQ_-.js";import{d as u,e as s,f as c,g as b}from"./react-resizable-panels.browser-CYcsrUgg.js";import"./index-Dmy2JGbm.js";import{c as v}from"./browserUtils-CQM9Za7e.js";import"./index-ChsGqxH_.js";import"./iframe-DQEjJuXA.js";import"./index-CT3U1fyk.js";import"./index-BRq5TIsn.js";import"./index-DgH-xKnr.js";import"./index-DrFu-skq.js";const F=JSON.parse('{"title":{"01":{"normal":{"$type":"typography","$value":{"fontSize":16,"lineHeight":24,"letterSpacing":0,"fontWeight":400,"fontFamily":"Pretendard Variable"}},"medium":{"$type":"typography","$value":{"fontSize":16,"lineHeight":24,"letterSpacing":0,"fontWeight":500,"fontFamily":"Pretendard Variable"}},"bold":{"$type":"typography","$value":{"fontSize":16,"lineHeight":24,"letterSpacing":0,"fontWeight":700,"fontFamily":"Pretendard Variable"}}},"02":{"normal":{"$type":"typography","$value":{"fontSize":18,"lineHeight":28,"letterSpacing":0,"fontWeight":400,"fontFamily":"Pretendard Variable"}},"medium":{"$type":"typography","$value":{"fontSize":18,"lineHeight":28,"letterSpacing":0,"fontWeight":500,"fontFamily":"Pretendard Variable"}},"bold":{"$type":"typography","$value":{"fontSize":18,"lineHeight":28,"letterSpacing":0,"fontWeight":700,"fontFamily":"Pretendard Variable"}}},"03":{"normal":{"$type":"typography","$value":{"fontSize":20,"lineHeight":32,"letterSpacing":0,"fontWeight":400,"fontFamily":"Pretendard Variable"}},"medium":{"$type":"typography","$value":{"fontSize":20,"lineHeight":32,"letterSpacing":0,"fontWeight":500,"fontFamily":"Pretendard Variable"}},"bold":{"$type":"typography","$value":{"fontSize":20,"lineHeight":32,"letterSpacing":0,"fontWeight":700,"fontFamily":"Pretendard Variable"}}},"04":{"normal":{"$type":"typography","$value":{"fontSize":24,"lineHeight":36,"letterSpacing":0,"fontWeight":400,"fontFamily":"Pretendard Variable"}},"medium":{"$type":"typography","$value":{"fontSize":24,"lineHeight":36,"letterSpacing":0,"fontWeight":500,"fontFamily":"Pretendard Variable"}},"bold":{"$type":"typography","$value":{"fontSize":24,"lineHeight":36,"letterSpacing":0,"fontWeight":700,"fontFamily":"Pretendard Variable"}}},"05":{"normal":{"$type":"typography","$value":{"fontSize":30,"lineHeight":44,"letterSpacing":0,"fontWeight":400,"fontFamily":"Pretendard Variable"}},"medium":{"$type":"typography","$value":{"fontSize":30,"lineHeight":44,"letterSpacing":0,"fontWeight":500,"fontFamily":"Pretendard Variable"}},"bold":{"$type":"typography","$value":{"fontSize":30,"lineHeight":44,"letterSpacing":0,"fontWeight":700,"fontFamily":"Pretendard Variable"}}},"06":{"normal":{"$type":"typography","$value":{"fontSize":36,"lineHeight":54,"letterSpacing":0,"fontWeight":400,"fontFamily":"Pretendard Variable"}},"medium":{"$type":"typography","$value":{"fontSize":36,"lineHeight":54,"letterSpacing":0,"fontWeight":500,"fontFamily":"Pretendard Variable"}},"bold":{"$type":"typography","$value":{"fontSize":36,"lineHeight":54,"letterSpacing":0,"fontWeight":700,"fontFamily":"Pretendard Variable"}}}},"body":{"lg":{"normal":{"$type":"typography","$value":{"fontSize":18,"lineHeight":32,"letterSpacing":0,"fontWeight":400,"fontFamily":"Pretendard Variable"}},"medium":{"$type":"typography","$value":{"fontSize":18,"lineHeight":32,"letterSpacing":0,"fontWeight":500,"fontFamily":"Pretendard Variable"}},"semibold":{"$type":"typography","$value":{"fontSize":18,"lineHeight":32,"letterSpacing":0,"fontWeight":600,"fontFamily":"Pretendard Variable"}}},"md":{"normal":{"$type":"typography","$value":{"fontSize":16,"lineHeight":28,"letterSpacing":0,"fontWeight":400,"fontFamily":"Pretendard Variable"}},"medium":{"$type":"typography","$value":{"fontSize":16,"lineHeight":28,"letterSpacing":0,"fontWeight":500,"fontFamily":"Pretendard Variable"}},"semibold":{"$type":"typography","$value":{"fontSize":16,"lineHeight":28,"letterSpacing":0,"fontWeight":600,"fontFamily":"Pretendard Variable"}}},"sm2":{"normal":{"$type":"typography","$value":{"fontSize":15,"lineHeight":26,"letterSpacing":0,"fontWeight":400,"fontFamily":"Pretendard Variable"}},"medium":{"$type":"typography","$value":{"fontSize":15,"lineHeight":26,"letterSpacing":0,"fontWeight":500,"fontFamily":"Pretendard Variable"}},"semibold":{"$type":"typography","$value":{"fontSize":15,"lineHeight":26,"letterSpacing":0,"fontWeight":600,"fontFamily":"Pretendard Variable"}}},"sm":{"normal":{"$type":"typography","$value":{"fontSize":14,"lineHeight":24,"letterSpacing":0,"fontWeight":400,"fontFamily":"Pretendard Variable"}},"medium":{"$type":"typography","$value":{"fontSize":14,"lineHeight":24,"letterSpacing":0,"fontWeight":500,"fontFamily":"Pretendard Variable"}},"semibold":{"$type":"typography","$value":{"fontSize":14,"lineHeight":24,"letterSpacing":0,"fontWeight":600,"fontFamily":"Pretendard Variable"}}},"xs2":{"normal":{"$type":"typography","$value":{"fontSize":13,"lineHeight":22,"letterSpacing":0,"fontWeight":400,"fontFamily":"Pretendard Variable"}},"medium":{"$type":"typography","$value":{"fontSize":13,"lineHeight":22,"letterSpacing":0,"fontWeight":500,"fontFamily":"Pretendard Variable"}},"semibold":{"$type":"typography","$value":{"fontSize":13,"lineHeight":22,"letterSpacing":0,"fontWeight":600,"fontFamily":"Pretendard Variable"}}},"xs":{"normal":{"$type":"typography","$value":{"fontSize":12,"lineHeight":20,"letterSpacing":0,"fontWeight":400,"fontFamily":"Pretendard Variable"}},"medium":{"$type":"typography","$value":{"fontSize":12,"lineHeight":20,"letterSpacing":0,"fontWeight":500,"fontFamily":"Pretendard Variable"}},"semibold":{"$type":"typography","$value":{"fontSize":12,"lineHeight":20,"letterSpacing":0,"fontWeight":600,"fontFamily":"Pretendard Variable"}}},"2xs":{"normal":{"$type":"typography","$value":{"fontSize":10,"lineHeight":16,"letterSpacing":0,"fontWeight":400,"fontFamily":"Pretendard Variable"}},"medium":{"$type":"typography","$value":{"fontSize":10,"lineHeight":16,"letterSpacing":0,"fontWeight":500,"fontFamily":"Pretendard Variable"}},"semibold":{"$type":"typography","$value":{"fontSize":10,"lineHeight":16,"letterSpacing":0,"fontWeight":600,"fontFamily":"Pretendard Variable"}}}},"compact":{"lg":{"normal":{"$type":"typography","$value":{"fontSize":18,"lineHeight":28,"letterSpacing":0,"fontWeight":400,"fontFamily":"Pretendard Variable"}},"medium":{"$type":"typography","$value":{"fontSize":18,"lineHeight":28,"letterSpacing":0,"fontWeight":500,"fontFamily":"Pretendard Variable"}},"semibold":{"$type":"typography","$value":{"fontSize":18,"lineHeight":28,"letterSpacing":0,"fontWeight":600,"fontFamily":"Pretendard Variable"}}},"md":{"normal":{"$type":"typography","$value":{"fontSize":16,"lineHeight":24,"letterSpacing":0,"fontWeight":400,"fontFamily":"Pretendard Variable"}},"medium":{"$type":"typography","$value":{"fontSize":16,"lineHeight":24,"letterSpacing":0,"fontWeight":500,"fontFamily":"Pretendard Variable"}},"semibold":{"$type":"typography","$value":{"fontSize":16,"lineHeight":24,"letterSpacing":0,"fontWeight":600,"fontFamily":"Pretendard Variable"}}},"sm2":{"normal":{"$type":"typography","$value":{"fontSize":15,"lineHeight":22,"letterSpacing":0,"fontWeight":400,"fontFamily":"Pretendard Variable"}},"medium":{"$type":"typography","$value":{"fontSize":15,"lineHeight":22,"letterSpacing":0,"fontWeight":500,"fontFamily":"Pretendard Variable"}},"semibold":{"$type":"typography","$value":{"fontSize":15,"lineHeight":22,"letterSpacing":0,"fontWeight":600,"fontFamily":"Pretendard Variable"}}},"sm":{"normal":{"$type":"typography","$value":{"fontSize":14,"lineHeight":20,"letterSpacing":0,"fontWeight":400,"fontFamily":"Pretendard Variable"}},"medium":{"$type":"typography","$value":{"fontSize":14,"lineHeight":20,"letterSpacing":0,"fontWeight":500,"fontFamily":"Pretendard Variable"}},"semibold":{"$type":"typography","$value":{"fontSize":14,"lineHeight":20,"letterSpacing":0,"fontWeight":600,"fontFamily":"Pretendard Variable"}}},"xs2":{"normal":{"$type":"typography","$value":{"fontSize":13,"lineHeight":18,"letterSpacing":0,"fontWeight":400,"fontFamily":"Pretendard Variable"}},"medium":{"$type":"typography","$value":{"fontSize":13,"lineHeight":18,"letterSpacing":0,"fontWeight":500,"fontFamily":"Pretendard Variable"}},"semibold":{"$type":"typography","$value":{"fontSize":13,"lineHeight":18,"letterSpacing":0,"fontWeight":600,"fontFamily":"Pretendard Variable"}}},"xs":{"normal":{"$type":"typography","$value":{"fontSize":12,"lineHeight":16,"letterSpacing":0,"fontWeight":400,"fontFamily":"Pretendard Variable"}},"medium":{"$type":"typography","$value":{"fontSize":12,"lineHeight":16,"letterSpacing":0,"fontWeight":500,"fontFamily":"Pretendard Variable"}},"semibold":{"$type":"typography","$value":{"fontSize":12,"lineHeight":16,"letterSpacing":0,"fontWeight":600,"fontFamily":"Pretendard Variable"}}},"2xs":{"normal":{"$type":"typography","$value":{"fontSize":10,"lineHeight":12,"letterSpacing":0,"fontWeight":400,"fontFamily":"Pretendard Variable"}},"medium":{"$type":"typography","$value":{"fontSize":10,"lineHeight":12,"letterSpacing":0,"fontWeight":500,"fontFamily":"Pretendard Variable"}},"semibold":{"$type":"typography","$value":{"fontSize":10,"lineHeight":12,"letterSpacing":0,"fontWeight":600,"fontFamily":"Pretendard Variable"}}}},"code":{"2xs":{"normal":{"$type":"typography","$value":{"fontSize":10,"lineHeight":12,"letterSpacing":0,"fontWeight":400,"fontFamily":"Oxanium"}},"medium":{"$type":"typography","$value":{"fontSize":10,"lineHeight":12,"letterSpacing":0,"fontWeight":500,"fontFamily":"Oxanium"}},"semibold":{"$type":"typography","$value":{"fontSize":10,"lineHeight":12,"letterSpacing":0,"fontWeight":600,"fontFamily":"Oxanium"}}},"xs":{"normal":{"$type":"typography","$value":{"fontSize":12,"lineHeight":14,"letterSpacing":0,"fontWeight":400,"fontFamily":"Oxanium"}},"medium":{"$type":"typography","$value":{"fontSize":12,"lineHeight":14,"letterSpacing":0,"fontWeight":500,"fontFamily":"Oxanium"}},"semibold":{"$type":"typography","$value":{"fontSize":12,"lineHeight":14,"letterSpacing":0,"fontWeight":600,"fontFamily":"Oxanium"}}},"xs2":{"semibold":{"$type":"typography","$value":{"fontSize":13,"lineHeight":18,"letterSpacing":0,"fontWeight":600,"fontFamily":"Oxanium"}},"medium":{"$type":"typography","$value":{"fontSize":13,"lineHeight":18,"letterSpacing":0,"fontWeight":500,"fontFamily":"Oxanium"}},"normal":{"$type":"typography","$value":{"fontSize":13,"lineHeight":18,"letterSpacing":0,"fontWeight":400,"fontFamily":"Oxanium"}}},"sm":{"semibold":{"$type":"typography","$value":{"fontSize":14,"lineHeight":20,"letterSpacing":0,"fontWeight":600,"fontFamily":"Oxanium"}},"medium":{"$type":"typography","$value":{"fontSize":14,"lineHeight":20,"letterSpacing":0,"fontWeight":500,"fontFamily":"Oxanium"}},"normal":{"$type":"typography","$value":{"fontSize":14,"lineHeight":20,"letterSpacing":0,"fontWeight":400,"fontFamily":"Oxanium"}}},"sm2":{"semibold":{"$type":"typography","$value":{"fontSize":15,"lineHeight":22,"letterSpacing":0,"fontWeight":600,"fontFamily":"Oxanium"}},"medium":{"$type":"typography","$value":{"fontSize":15,"lineHeight":22,"letterSpacing":0,"fontWeight":500,"fontFamily":"Oxanium"}},"normal":{"$type":"typography","$value":{"fontSize":15,"lineHeight":22,"letterSpacing":0,"fontWeight":400,"fontFamily":"Oxanium"}}},"md":{"semibold":{"$type":"typography","$value":{"fontSize":16,"lineHeight":24,"letterSpacing":0,"fontWeight":600,"fontFamily":"Oxanium"}},"medium":{"$type":"typography","$value":{"fontSize":16,"lineHeight":24,"letterSpacing":0,"fontWeight":500,"fontFamily":"Oxanium"}},"normal":{"$type":"typography","$value":{"fontSize":16,"lineHeight":24,"letterSpacing":0,"fontWeight":400,"fontFamily":"Oxanium"}}},"lg":{"semibold":{"$type":"typography","$value":{"fontSize":18,"lineHeight":28,"letterSpacing":0,"fontWeight":600,"fontFamily":"Oxanium"}},"medium":{"$type":"typography","$value":{"fontSize":18,"lineHeight":28,"letterSpacing":0,"fontWeight":500,"fontFamily":"Oxanium"}},"normal":{"$type":"typography","$value":{"fontSize":18,"lineHeight":28,"letterSpacing":0,"fontWeight":400,"fontFamily":"Oxanium"}}}}}'),z={text:F},H=({scale:t,weight:i,fontFamilyToken:a})=>[`font-${a??"sans"}`,`text-${t}`,`leading-${t}`,`tracking-${t}`,`font-${i}`].join(" + "),W=t=>{v({text:t}),alert("복사가 완료되었습니다.")},l=Object.entries(z.text??{}),f=()=>{var i;const t=(i=l[0])==null?void 0:i[0];return t?e.jsxs(u,{defaultValue:t,className:"w-full",children:[e.jsx(s,{className:"border-default bg-default text-fg-default supports-[backdrop-filter]:bg-default sticky top-2 z-20 mb-3 rounded-lg border p-1 shadow-sm backdrop-blur",children:l.map(([a])=>e.jsx(c,{value:a,children:a},a))}),l.map(([a,h])=>e.jsx(b,{value:a,children:e.jsx("div",{className:"border-default bg-default text-default space-y-2 rounded-lg border p-4",children:Object.entries(h).flatMap(([o,m])=>Object.entries(m).map(([r,d])=>{var p;const n=`typo-${a}-${o}-${r}`;return e.jsx("button",{type:"button",className:"border-subtle hover:bg-overlay/30 block w-full cursor-copy rounded-md border p-3 text-left transition-colors",onClick:()=>W(n),title:`Copy ${n}`,children:e.jsx("div",{className:"flex items-start justify-between gap-3",children:e.jsxs("div",{className:"min-w-0 flex-1",children:[e.jsxs("p",{className:n,children:["Rainbow Robotics UI Typography Test",e.jsx("br",{}),"ABCDEFGHIJKLMNOPQRSTUVWXYZ 0123456789"]}),e.jsxs("p",{className:"text-subtle mt-1 text-sm",children:[".",n]}),e.jsx("p",{className:"text-subtler mt-1 text-sm",children:H({scale:o,weight:r,fontFamilyToken:(p=d.$value)==null?void 0:p.fontFamilyToken})})]})})},n)}))})},a))]}):null};f.__docgenInfo={description:"",methods:[],displayName:"TextStylePreview"};function y(t){const i={code:"code",h1:"h1",p:"p",pre:"pre",...g(),...t.components};return e.jsxs(e.Fragment,{children:[e.jsx(S,{title:"1.foundations/text-style"}),`
|
|
2
2
|
`,e.jsx(i.h1,{id:"text-style",children:"Text Style"}),`
|
|
3
3
|
`,e.jsxs(i.p,{children:[e.jsx(i.code,{children:"rb-token.css"}),"의 타이포그래피 유틸리티 전체를 미리보기에서 확인합니다."]}),`
|
|
4
4
|
`,e.jsx(i.pre,{children:e.jsx(i.code,{className:"language-tsx",children:`<p className="typo-body-sm-normal text-default">본문</p>
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./index-B4FGfHer.js","./index-Dmy2JGbm.js","./index-ChsGqxH_.js"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{_ as l}from"./iframe-
|
|
2
|
+
import{_ as l}from"./iframe-DQEjJuXA.js";import{r as s,R as n}from"./index-Dmy2JGbm.js";import{H as p,A as h,C as E,D as d}from"./index-DEgQqQ_-.js";import{c as R}from"./client-DTf7SId2.js";import"./index-ChsGqxH_.js";import"./jsx-runtime-BTJTZTIL.js";import"./index-CT3U1fyk.js";import"./index-BRq5TIsn.js";import"./index-DgH-xKnr.js";import"./index-DrFu-skq.js";var i=new Map;function v(){return globalThis.IS_REACT_ACT_ENVIRONMENT}var f=({callback:e,children:t})=>{let r=s.useRef();return s.useLayoutEffect(()=>{r.current!==e&&(r.current=e,e())},[e]),t};typeof Promise.withResolvers>"u"&&(Promise.withResolvers=()=>{let e=null,t=null;return{promise:new Promise((r,o)=>{e=r,t=o}),resolve:e,reject:t}});var w=async(e,t,r)=>{let o=await x(t,r);if(v()){o.render(e);return}let{promise:a,resolve:m}=Promise.withResolvers();return o.render(s.createElement(f,{callback:m},e)),a},_=(e,t)=>{let r=i.get(e);r&&(r.unmount(),i.delete(e))},x=async(e,t)=>{let r=i.get(e);return r||(r=R.createRoot(e,t),i.set(e,r)),r},g={code:E,a:h,...p},y=class extends s.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:e}=this.state,{children:t}=this.props;return e?null:n.createElement(n.Fragment,null,t)}},F=class{constructor(){this.render=async(e,t,r)=>{let o={...g,...t==null?void 0:t.components},a=d;return new Promise((m,c)=>{l(async()=>{const{MDXProvider:u}=await import("./index-B4FGfHer.js");return{MDXProvider:u}},__vite__mapDeps([0,1,2]),import.meta.url).then(({MDXProvider:u})=>w(n.createElement(y,{showException:c,key:Math.random()},n.createElement(u,{components:o},n.createElement(a,{context:e,docsParameter:t}))),r)).then(()=>m())})},this.unmount=e=>{_(e)}}};export{F as DocsRenderer,g as defaultComponents};
|