From f8b4e315e6bc409ff049b255ca6dbed26cfb7903 Mon Sep 17 00:00:00 2001 From: LuLaValva Date: Mon, 22 Jan 2024 15:02:55 -0800 Subject: [PATCH] 13.0.6 --- ...S4EI-rCh2FLnW.js => Color-6VNJS4EI-2sKJBn8q.js} | 2 +- ...m2nxR3.js => DocsRenderer-NNNQARDV-vrgTUQKK.js} | 2 +- ...CRHT9Pt.js => WithTooltip-V3YHNWJZ-CZ8Eb387.js} | 2 +- ...khdQ.js => building-blocks.stories-3F1Gyd2x.js} | 2 +- ...ies-oUh8kaBX.js => buttons.stories-rFynn3K1.js} | 2 +- ...VYOI-mQySm71s.js => chunk-HLWAVYOI-H2VhgzR2.js} | 12 ++++++------ ...es-vKNftdZk.js => combobox.stories-GaExYD65.js} | 10 +++++----- ...jNUB4OD.js => contributing.stories-WIkZz30K.js} | 2 +- ...ies-_wPkTNdN.js => dialogs.stories-BjWQKjWD.js} | 2 +- ...-w06SvF40.js => form-input.stories-vgJ-unYv.js} | 2 +- ...-bMS14_IU.js => formatter-SWP5E3XI-MxGObe6j.js} | 2 +- ...qgvT.js => getting-started.stories-N5Iiz57U.js} | 2 +- ...Q.js => graphics-and-icons.stories-puX6AL-K.js} | 2 +- .../{iframe-buw_4q-p.js => iframe--l1y4VEe.js} | 4 ++-- .../{index-VcvA84b4.js => index-4Ictftwa.js} | 2 +- .../{index-67XRIn5y.js => index-4jv1rO9F.js} | 2 +- ...runtime-YczOOcRK.js => jsx-runtime-g3jUguhN.js} | 2 +- ...ories-QJM_V5r_.js => media.stories-kWhMrFNo.js} | 2 +- ... navigation-and-disclosure.stories-xVK_prf6.js} | 2 +- ...Irq.js => notices-and-tips.stories-YPFyrlEb.js} | 2 +- .../{preview--i6Hzl_b.js => preview-3Ep3MoMF.js} | 2 +- .../{preview-BWk7QCIP.js => preview-CCgR9SzL.js} | 4 ++-- ...es-sGkqofG8.js => progress.stories-9sMWfnwl.js} | 2 +- ...ries-XevJfhkJ.js => select.stories-xjlF8t12.js} | 14 +++++++------- ...o.js => syntaxhighlighter-V7JZZA35-o-V-ZA-0.js} | 2 +- ...ies-nA25QrqU.js => welcome.stories-b36X4HSj.js} | 2 +- docs/iframe.html | 2 +- docs/project.json | 2 +- package-lock.json | 4 ++-- package.json | 2 +- 30 files changed, 48 insertions(+), 48 deletions(-) rename docs/assets/{Color-6VNJS4EI-rCh2FLnW.js => Color-6VNJS4EI-2sKJBn8q.js} (99%) rename docs/assets/{DocsRenderer-NNNQARDV-C-m2nxR3.js => DocsRenderer-NNNQARDV-vrgTUQKK.js} (58%) rename docs/assets/{WithTooltip-V3YHNWJZ-pCRHT9Pt.js => WithTooltip-V3YHNWJZ-CZ8Eb387.js} (62%) rename docs/assets/{building-blocks.stories-y9ZykhdQ.js => building-blocks.stories-3F1Gyd2x.js} (85%) rename docs/assets/{buttons.stories-oUh8kaBX.js => buttons.stories-rFynn3K1.js} (82%) rename docs/assets/{chunk-HLWAVYOI-mQySm71s.js => chunk-HLWAVYOI-H2VhgzR2.js} (99%) rename docs/assets/{combobox.stories-vKNftdZk.js => combobox.stories-GaExYD65.js} (50%) rename docs/assets/{contributing.stories-AjNUB4OD.js => contributing.stories-WIkZz30K.js} (98%) rename docs/assets/{dialogs.stories-_wPkTNdN.js => dialogs.stories-BjWQKjWD.js} (83%) rename docs/assets/{form-input.stories-w06SvF40.js => form-input.stories-vgJ-unYv.js} (82%) rename docs/assets/{formatter-SWP5E3XI-bMS14_IU.js => formatter-SWP5E3XI-MxGObe6j.js} (99%) rename docs/assets/{getting-started.stories-jPdZqgvT.js => getting-started.stories-N5Iiz57U.js} (96%) rename docs/assets/{graphics-and-icons.stories-gyGZEnGQ.js => graphics-and-icons.stories-puX6AL-K.js} (82%) rename docs/assets/{iframe-buw_4q-p.js => iframe--l1y4VEe.js} (92%) rename docs/assets/{index-VcvA84b4.js => index-4Ictftwa.js} (67%) rename docs/assets/{index-67XRIn5y.js => index-4jv1rO9F.js} (87%) rename docs/assets/{jsx-runtime-YczOOcRK.js => jsx-runtime-g3jUguhN.js} (93%) rename docs/assets/{media.stories-QJM_V5r_.js => media.stories-kWhMrFNo.js} (82%) rename docs/assets/{navigation-and-disclosure.stories-0dfEeTMf.js => navigation-and-disclosure.stories-xVK_prf6.js} (84%) rename docs/assets/{notices-and-tips.stories-CCCt0Irq.js => notices-and-tips.stories-YPFyrlEb.js} (83%) rename docs/assets/{preview--i6Hzl_b.js => preview-3Ep3MoMF.js} (94%) rename docs/assets/{preview-BWk7QCIP.js => preview-CCgR9SzL.js} (61%) rename docs/assets/{progress.stories-sGkqofG8.js => progress.stories-9sMWfnwl.js} (83%) rename docs/assets/{select.stories-XevJfhkJ.js => select.stories-xjlF8t12.js} (52%) rename docs/assets/{syntaxhighlighter-V7JZZA35-pXt8-oeo.js => syntaxhighlighter-V7JZZA35-o-V-ZA-0.js} (62%) rename docs/assets/{welcome.stories-nA25QrqU.js => welcome.stories-b36X4HSj.js} (97%) diff --git a/docs/assets/Color-6VNJS4EI-rCh2FLnW.js b/docs/assets/Color-6VNJS4EI-2sKJBn8q.js similarity index 99% rename from docs/assets/Color-6VNJS4EI-rCh2FLnW.js rename to docs/assets/Color-6VNJS4EI-2sKJBn8q.js index bc837ba68..0d32d31b7 100644 --- a/docs/assets/Color-6VNJS4EI-rCh2FLnW.js +++ b/docs/assets/Color-6VNJS4EI-2sKJBn8q.js @@ -1 +1 @@ -import{R as h,r as b,n as M,f as ue,T as Me,F as Ce,I as $e,g as Ne}from"./chunk-HLWAVYOI-mQySm71s.js";import{g as fe}from"./_commonjsHelpers-5-cIlDoe.js";import{_ as Oe,i as J,a as Ie}from"./index-xLzVGzoy.js";import"./iframe-buw_4q-p.js";import"../sb-preview/runtime.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";import"./index-PPLHz8o0.js";function $(){return($=Object.assign||function(e){for(var t=1;t=0||(o[n]=e[n]);return o}function K(e){var t=b.useRef(e),n=b.useRef(function(r){t.current&&t.current(r)});return t.current=e,n.current}var S=function(e,t,n){return t===void 0&&(t=0),n===void 0&&(n=1),e>n?n:e0:p.buttons>0)&&o.current?a(ne(o.current,p,l.current)):_(!1)},N=function(){return _(!1)};function _(p){var m=i.current,x=V(o.current),C=p?x.addEventListener:x.removeEventListener;C(m?"touchmove":"mousemove",k),C(m?"touchend":"mouseup",N)}return[function(p){var m=p.nativeEvent,x=o.current;if(x&&(re(m),!function(X,R){return R&&!j(X)}(m,i.current)&&x)){if(j(m)){i.current=!0;var C=m.changedTouches||[];C.length&&(l.current=C[0].identifier)}x.focus(),a(ne(x,m,l.current)),_(!0)}},function(p){var m=p.which||p.keyCode;m<37||m>40||(p.preventDefault(),s({left:m===39?.05:m===37?-.05:0,top:m===40?.05:m===38?-.05:0}))},_]},[s,a]),d=c[0],f=c[1],g=c[2];return b.useEffect(function(){return g},[g]),h.createElement("div",$({},r,{onTouchStart:d,onMouseDown:d,className:"react-colorful__interactive",ref:o,onKeyDown:f,tabIndex:0,role:"slider"}))}),z=function(e){return e.filter(Boolean).join(" ")},ee=function(e){var t=e.color,n=e.left,r=e.top,o=r===void 0?.5:r,a=z(["react-colorful__pointer",e.className]);return h.createElement("div",{className:a,style:{top:100*o+"%",left:100*n+"%"}},h.createElement("div",{className:"react-colorful__pointer-fill",style:{backgroundColor:t}}))},y=function(e,t,n){return t===void 0&&(t=0),n===void 0&&(n=Math.pow(10,t)),Math.round(n*e)/n},Se={grad:.9,turn:360,rad:360/(2*Math.PI)},Re=function(e){return ge(A(e))},A=function(e){return e[0]==="#"&&(e=e.substring(1)),e.length<6?{r:parseInt(e[0]+e[0],16),g:parseInt(e[1]+e[1],16),b:parseInt(e[2]+e[2],16),a:e.length===4?y(parseInt(e[3]+e[3],16)/255,2):1}:{r:parseInt(e.substring(0,2),16),g:parseInt(e.substring(2,4),16),b:parseInt(e.substring(4,6),16),a:e.length===8?y(parseInt(e.substring(6,8),16)/255,2):1}},Te=function(e,t){return t===void 0&&(t="deg"),Number(e)*(Se[t]||1)},je=function(e){var t=/hsla?\(?\s*(-?\d*\.?\d+)(deg|rad|grad|turn)?[,\s]+(-?\d*\.?\d+)%?[,\s]+(-?\d*\.?\d+)%?,?\s*[/\s]*(-?\d*\.?\d+)?(%)?\s*\)?/i.exec(e);return t?Fe({h:Te(t[1],t[2]),s:Number(t[3]),l:Number(t[4]),a:t[5]===void 0?1:Number(t[5])/(t[6]?100:1)}):{h:0,s:0,v:0,a:1}},Fe=function(e){var t=e.s,n=e.l;return{h:e.h,s:(t*=(n<50?n:100-n)/100)>0?2*t/(n+t)*100:0,v:n+t,a:e.a}},ze=function(e){return Pe(de(e))},he=function(e){var t=e.s,n=e.v,r=e.a,o=(200-t)*n/100;return{h:y(e.h),s:y(o>0&&o<200?t*n/100/(o<=100?o:200-o)*100:0),l:y(o/2),a:y(r,2)}},G=function(e){var t=he(e);return"hsl("+t.h+", "+t.s+"%, "+t.l+"%)"},q=function(e){var t=he(e);return"hsla("+t.h+", "+t.s+"%, "+t.l+"%, "+t.a+")"},de=function(e){var t=e.h,n=e.s,r=e.v,o=e.a;t=t/360*6,n/=100,r/=100;var a=Math.floor(t),s=r*(1-n),l=r*(1-(t-a)*n),i=r*(1-(1-t+a)*n),c=a%6;return{r:y(255*[r,l,s,s,i,r][c]),g:y(255*[i,r,r,l,s,s][c]),b:y(255*[s,s,i,r,r,l][c]),a:y(o,2)}},He=function(e){var t=/rgba?\(?\s*(-?\d*\.?\d+)(%)?[,\s]+(-?\d*\.?\d+)(%)?[,\s]+(-?\d*\.?\d+)(%)?,?\s*[/\s]*(-?\d*\.?\d+)?(%)?\s*\)?/i.exec(e);return t?ge({r:Number(t[1])/(t[2]?100/255:1),g:Number(t[3])/(t[4]?100/255:1),b:Number(t[5])/(t[6]?100/255:1),a:t[7]===void 0?1:Number(t[7])/(t[8]?100:1)}):{h:0,s:0,v:0,a:1}},H=function(e){var t=e.toString(16);return t.length<2?"0"+t:t},Pe=function(e){var t=e.r,n=e.g,r=e.b,o=e.a,a=o<1?H(y(255*o)):"";return"#"+H(t)+H(n)+H(r)+a},ge=function(e){var t=e.r,n=e.g,r=e.b,o=e.a,a=Math.max(t,n,r),s=a-Math.min(t,n,r),l=s?a===t?(n-r)/s:a===n?2+(r-t)/s:4+(t-n)/s:0;return{h:y(60*(l<0?l+6:l)),s:y(a?s/a*100:0),v:y(a/255*100),a:o}},me=h.memo(function(e){var t=e.hue,n=e.onChange,r=z(["react-colorful__hue",e.className]);return h.createElement("div",{className:r},h.createElement(Z,{onMove:function(o){n({h:360*o.left})},onKey:function(o){n({h:S(t+360*o.left,0,360)})},"aria-label":"Hue","aria-valuenow":y(t),"aria-valuemax":"360","aria-valuemin":"0"},h.createElement(ee,{className:"react-colorful__hue-pointer",left:t/360,color:G({h:t,s:100,v:100,a:1})})))}),be=h.memo(function(e){var t=e.hsva,n=e.onChange,r={backgroundColor:G({h:t.h,s:100,v:100,a:1})};return h.createElement("div",{className:"react-colorful__saturation",style:r},h.createElement(Z,{onMove:function(o){n({s:100*o.left,v:100-100*o.top})},onKey:function(o){n({s:S(t.s+100*o.left,0,100),v:S(t.v-100*o.top,0,100)})},"aria-label":"Color","aria-valuetext":"Saturation "+y(t.s)+"%, Brightness "+y(t.v)+"%"},h.createElement(ee,{className:"react-colorful__saturation-pointer",top:1-t.v/100,left:t.s/100,color:G(t)})))}),ve=function(e,t){if(e===t)return!0;for(var n in e)if(e[n]!==t[n])return!1;return!0},pe=function(e,t){return e.replace(/\s/g,"")===t.replace(/\s/g,"")},Le=function(e,t){return e.toLowerCase()===t.toLowerCase()||ve(A(e),A(t))};function ye(e,t,n){var r=K(n),o=b.useState(function(){return e.toHsva(t)}),a=o[0],s=o[1],l=b.useRef({color:t,hsva:a});b.useEffect(function(){if(!e.equal(t,l.current.color)){var c=e.toHsva(t);l.current={hsva:c,color:t},s(c)}},[t,e]),b.useEffect(function(){var c;ve(a,l.current.hsva)||e.equal(c=e.fromHsva(a),l.current.color)||(l.current={hsva:a,color:c},r(c))},[a,e,r]);var i=b.useCallback(function(c){s(function(d){return Object.assign({},d,c)})},[]);return[a,i]}var qe=typeof window<"u"?b.useLayoutEffect:b.useEffect,Be=function(){return typeof __webpack_nonce__<"u"?__webpack_nonce__:void 0},oe=new Map,xe=function(e){qe(function(){var t=e.current?e.current.ownerDocument:document;if(t!==void 0&&!oe.has(t)){var n=t.createElement("style");n.innerHTML=`.react-colorful{position:relative;display:flex;flex-direction:column;width:200px;height:200px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:default}.react-colorful__saturation{position:relative;flex-grow:1;border-color:transparent;border-bottom:12px solid #000;border-radius:8px 8px 0 0;background-image:linear-gradient(0deg,#000,transparent),linear-gradient(90deg,#fff,hsla(0,0%,100%,0))}.react-colorful__alpha-gradient,.react-colorful__pointer-fill{content:"";position:absolute;left:0;top:0;right:0;bottom:0;pointer-events:none;border-radius:inherit}.react-colorful__alpha-gradient,.react-colorful__saturation{box-shadow:inset 0 0 0 1px rgba(0,0,0,.05)}.react-colorful__alpha,.react-colorful__hue{position:relative;height:24px}.react-colorful__hue{background:linear-gradient(90deg,red 0,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,red)}.react-colorful__last-control{border-radius:0 0 8px 8px}.react-colorful__interactive{position:absolute;left:0;top:0;right:0;bottom:0;border-radius:inherit;outline:none;touch-action:none}.react-colorful__pointer{position:absolute;z-index:1;box-sizing:border-box;width:28px;height:28px;transform:translate(-50%,-50%);background-color:#fff;border:2px solid #fff;border-radius:50%;box-shadow:0 2px 4px rgba(0,0,0,.2)}.react-colorful__interactive:focus .react-colorful__pointer{transform:translate(-50%,-50%) scale(1.1)}.react-colorful__alpha,.react-colorful__alpha-pointer{background-color:#fff;background-image:url('data:image/svg+xml;charset=utf-8,')}.react-colorful__saturation-pointer{z-index:3}.react-colorful__hue-pointer{z-index:2}`,oe.set(t,n);var r=Be();r&&n.setAttribute("nonce",r),t.head.appendChild(n)}},[])},We=function(e){var t=e.className,n=e.colorModel,r=e.color,o=r===void 0?n.defaultColor:r,a=e.onChange,s=Q(e,["className","colorModel","color","onChange"]),l=b.useRef(null);xe(l);var i=ye(n,o,a),c=i[0],d=i[1],f=z(["react-colorful",t]);return h.createElement("div",$({},s,{ref:l,className:f}),h.createElement(be,{hsva:c,onChange:d}),h.createElement(me,{hue:c.h,onChange:d,className:"react-colorful__last-control"}))},Xe={defaultColor:"000",toHsva:Re,fromHsva:function(e){return ze({h:e.h,s:e.s,v:e.v,a:1})},equal:Le},De=function(e){return h.createElement(We,$({},e,{colorModel:Xe}))},Ke=function(e){var t=e.className,n=e.hsva,r=e.onChange,o={backgroundImage:"linear-gradient(90deg, "+q(Object.assign({},n,{a:0}))+", "+q(Object.assign({},n,{a:1}))+")"},a=z(["react-colorful__alpha",t]),s=y(100*n.a);return h.createElement("div",{className:a},h.createElement("div",{className:"react-colorful__alpha-gradient",style:o}),h.createElement(Z,{onMove:function(l){r({a:l.left})},onKey:function(l){r({a:S(n.a+l.left)})},"aria-label":"Alpha","aria-valuetext":s+"%","aria-valuenow":s,"aria-valuemin":"0","aria-valuemax":"100"},h.createElement(ee,{className:"react-colorful__alpha-pointer",left:n.a,color:q(n)})))},we=function(e){var t=e.className,n=e.colorModel,r=e.color,o=r===void 0?n.defaultColor:r,a=e.onChange,s=Q(e,["className","colorModel","color","onChange"]),l=b.useRef(null);xe(l);var i=ye(n,o,a),c=i[0],d=i[1],f=z(["react-colorful",t]);return h.createElement("div",$({},s,{ref:l,className:f}),h.createElement(be,{hsva:c,onChange:d}),h.createElement(me,{hue:c.h,onChange:d}),h.createElement(Ke,{hsva:c,onChange:d,className:"react-colorful__last-control"}))},Ve={defaultColor:"hsla(0, 0%, 0%, 1)",toHsva:je,fromHsva:q,equal:pe},Ae=function(e){return h.createElement(we,$({},e,{colorModel:Ve}))},Ge={defaultColor:"rgba(0, 0, 0, 1)",toHsva:He,fromHsva:function(e){var t=de(e);return"rgba("+t.r+", "+t.g+", "+t.b+", "+t.a+")"},equal:pe},Ue=function(e){return h.createElement(we,$({},e,{colorModel:Ge}))},Ye={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]};const F=Ye,ke={};for(const e of Object.keys(F))ke[F[e]]=e;const u={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},lch:{channels:3,labels:"lch"},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}};var _e=u;for(const e of Object.keys(u)){if(!("channels"in u[e]))throw new Error("missing channels property: "+e);if(!("labels"in u[e]))throw new Error("missing channel labels property: "+e);if(u[e].labels.length!==u[e].channels)throw new Error("channel and label counts mismatch: "+e);const{channels:t,labels:n}=u[e];delete u[e].channels,delete u[e].labels,Object.defineProperty(u[e],"channels",{value:t}),Object.defineProperty(u[e],"labels",{value:n})}u.rgb.hsl=function(e){const t=e[0]/255,n=e[1]/255,r=e[2]/255,o=Math.min(t,n,r),a=Math.max(t,n,r),s=a-o;let l,i;a===o?l=0:t===a?l=(n-r)/s:n===a?l=2+(r-t)/s:r===a&&(l=4+(t-n)/s),l=Math.min(l*60,360),l<0&&(l+=360);const c=(o+a)/2;return a===o?i=0:c<=.5?i=s/(a+o):i=s/(2-a-o),[l,i*100,c*100]};u.rgb.hsv=function(e){let t,n,r,o,a;const s=e[0]/255,l=e[1]/255,i=e[2]/255,c=Math.max(s,l,i),d=c-Math.min(s,l,i),f=function(g){return(c-g)/6/d+1/2};return d===0?(o=0,a=0):(a=d/c,t=f(s),n=f(l),r=f(i),s===c?o=r-n:l===c?o=1/3+t-r:i===c&&(o=2/3+n-t),o<0?o+=1:o>1&&(o-=1)),[o*360,a*100,c*100]};u.rgb.hwb=function(e){const t=e[0],n=e[1];let r=e[2];const o=u.rgb.hsl(e)[0],a=1/255*Math.min(t,Math.min(n,r));return r=1-1/255*Math.max(t,Math.max(n,r)),[o,a*100,r*100]};u.rgb.cmyk=function(e){const t=e[0]/255,n=e[1]/255,r=e[2]/255,o=Math.min(1-t,1-n,1-r),a=(1-t-o)/(1-o)||0,s=(1-n-o)/(1-o)||0,l=(1-r-o)/(1-o)||0;return[a*100,s*100,l*100,o*100]};function Je(e,t){return(e[0]-t[0])**2+(e[1]-t[1])**2+(e[2]-t[2])**2}u.rgb.keyword=function(e){const t=ke[e];if(t)return t;let n=1/0,r;for(const o of Object.keys(F)){const a=F[o],s=Je(e,a);s.04045?((t+.055)/1.055)**2.4:t/12.92,n=n>.04045?((n+.055)/1.055)**2.4:n/12.92,r=r>.04045?((r+.055)/1.055)**2.4:r/12.92;const o=t*.4124+n*.3576+r*.1805,a=t*.2126+n*.7152+r*.0722,s=t*.0193+n*.1192+r*.9505;return[o*100,a*100,s*100]};u.rgb.lab=function(e){const t=u.rgb.xyz(e);let n=t[0],r=t[1],o=t[2];n/=95.047,r/=100,o/=108.883,n=n>.008856?n**(1/3):7.787*n+16/116,r=r>.008856?r**(1/3):7.787*r+16/116,o=o>.008856?o**(1/3):7.787*o+16/116;const a=116*r-16,s=500*(n-r),l=200*(r-o);return[a,s,l]};u.hsl.rgb=function(e){const t=e[0]/360,n=e[1]/100,r=e[2]/100;let o,a,s;if(n===0)return s=r*255,[s,s,s];r<.5?o=r*(1+n):o=r+n-r*n;const l=2*r-o,i=[0,0,0];for(let c=0;c<3;c++)a=t+1/3*-(c-1),a<0&&a++,a>1&&a--,6*a<1?s=l+(o-l)*6*a:2*a<1?s=o:3*a<2?s=l+(o-l)*(2/3-a)*6:s=l,i[c]=s*255;return i};u.hsl.hsv=function(e){const t=e[0];let n=e[1]/100,r=e[2]/100,o=n;const a=Math.max(r,.01);r*=2,n*=r<=1?r:2-r,o*=a<=1?a:2-a;const s=(r+n)/2,l=r===0?2*o/(a+o):2*n/(r+n);return[t,l*100,s*100]};u.hsv.rgb=function(e){const t=e[0]/60,n=e[1]/100;let r=e[2]/100;const o=Math.floor(t)%6,a=t-Math.floor(t),s=255*r*(1-n),l=255*r*(1-n*a),i=255*r*(1-n*(1-a));switch(r*=255,o){case 0:return[r,i,s];case 1:return[l,r,s];case 2:return[s,r,i];case 3:return[s,l,r];case 4:return[i,s,r];case 5:return[r,s,l]}};u.hsv.hsl=function(e){const t=e[0],n=e[1]/100,r=e[2]/100,o=Math.max(r,.01);let a,s;s=(2-n)*r;const l=(2-n)*o;return a=n*o,a/=l<=1?l:2-l,a=a||0,s/=2,[t,a*100,s*100]};u.hwb.rgb=function(e){const t=e[0]/360;let n=e[1]/100,r=e[2]/100;const o=n+r;let a;o>1&&(n/=o,r/=o);const s=Math.floor(6*t),l=1-r;a=6*t-s,s&1&&(a=1-a);const i=n+a*(l-n);let c,d,f;switch(s){default:case 6:case 0:c=l,d=i,f=n;break;case 1:c=i,d=l,f=n;break;case 2:c=n,d=l,f=i;break;case 3:c=n,d=i,f=l;break;case 4:c=i,d=n,f=l;break;case 5:c=l,d=n,f=i;break}return[c*255,d*255,f*255]};u.cmyk.rgb=function(e){const t=e[0]/100,n=e[1]/100,r=e[2]/100,o=e[3]/100,a=1-Math.min(1,t*(1-o)+o),s=1-Math.min(1,n*(1-o)+o),l=1-Math.min(1,r*(1-o)+o);return[a*255,s*255,l*255]};u.xyz.rgb=function(e){const t=e[0]/100,n=e[1]/100,r=e[2]/100;let o,a,s;return o=t*3.2406+n*-1.5372+r*-.4986,a=t*-.9689+n*1.8758+r*.0415,s=t*.0557+n*-.204+r*1.057,o=o>.0031308?1.055*o**(1/2.4)-.055:o*12.92,a=a>.0031308?1.055*a**(1/2.4)-.055:a*12.92,s=s>.0031308?1.055*s**(1/2.4)-.055:s*12.92,o=Math.min(Math.max(0,o),1),a=Math.min(Math.max(0,a),1),s=Math.min(Math.max(0,s),1),[o*255,a*255,s*255]};u.xyz.lab=function(e){let t=e[0],n=e[1],r=e[2];t/=95.047,n/=100,r/=108.883,t=t>.008856?t**(1/3):7.787*t+16/116,n=n>.008856?n**(1/3):7.787*n+16/116,r=r>.008856?r**(1/3):7.787*r+16/116;const o=116*n-16,a=500*(t-n),s=200*(n-r);return[o,a,s]};u.lab.xyz=function(e){const t=e[0],n=e[1],r=e[2];let o,a,s;a=(t+16)/116,o=n/500+a,s=a-r/200;const l=a**3,i=o**3,c=s**3;return a=l>.008856?l:(a-16/116)/7.787,o=i>.008856?i:(o-16/116)/7.787,s=c>.008856?c:(s-16/116)/7.787,o*=95.047,a*=100,s*=108.883,[o,a,s]};u.lab.lch=function(e){const t=e[0],n=e[1],r=e[2];let o;o=Math.atan2(r,n)*360/2/Math.PI,o<0&&(o+=360);const s=Math.sqrt(n*n+r*r);return[t,s,o]};u.lch.lab=function(e){const t=e[0],n=e[1],o=e[2]/360*2*Math.PI,a=n*Math.cos(o),s=n*Math.sin(o);return[t,a,s]};u.rgb.ansi16=function(e,t=null){const[n,r,o]=e;let a=t===null?u.rgb.hsv(e)[2]:t;if(a=Math.round(a/50),a===0)return 30;let s=30+(Math.round(o/255)<<2|Math.round(r/255)<<1|Math.round(n/255));return a===2&&(s+=60),s};u.hsv.ansi16=function(e){return u.rgb.ansi16(u.hsv.rgb(e),e[2])};u.rgb.ansi256=function(e){const t=e[0],n=e[1],r=e[2];return t===n&&n===r?t<8?16:t>248?231:Math.round((t-8)/247*24)+232:16+36*Math.round(t/255*5)+6*Math.round(n/255*5)+Math.round(r/255*5)};u.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];const n=(~~(e>50)+1)*.5,r=(t&1)*n*255,o=(t>>1&1)*n*255,a=(t>>2&1)*n*255;return[r,o,a]};u.ansi256.rgb=function(e){if(e>=232){const a=(e-232)*10+8;return[a,a,a]}e-=16;let t;const n=Math.floor(e/36)/5*255,r=Math.floor((t=e%36)/6)/5*255,o=t%6/5*255;return[n,r,o]};u.rgb.hex=function(e){const n=(((Math.round(e[0])&255)<<16)+((Math.round(e[1])&255)<<8)+(Math.round(e[2])&255)).toString(16).toUpperCase();return"000000".substring(n.length)+n};u.hex.rgb=function(e){const t=e.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!t)return[0,0,0];let n=t[0];t[0].length===3&&(n=n.split("").map(l=>l+l).join(""));const r=parseInt(n,16),o=r>>16&255,a=r>>8&255,s=r&255;return[o,a,s]};u.rgb.hcg=function(e){const t=e[0]/255,n=e[1]/255,r=e[2]/255,o=Math.max(Math.max(t,n),r),a=Math.min(Math.min(t,n),r),s=o-a;let l,i;return s<1?l=a/(1-s):l=0,s<=0?i=0:o===t?i=(n-r)/s%6:o===n?i=2+(r-t)/s:i=4+(t-n)/s,i/=6,i%=1,[i*360,s*100,l*100]};u.hsl.hcg=function(e){const t=e[1]/100,n=e[2]/100,r=n<.5?2*t*n:2*t*(1-n);let o=0;return r<1&&(o=(n-.5*r)/(1-r)),[e[0],r*100,o*100]};u.hsv.hcg=function(e){const t=e[1]/100,n=e[2]/100,r=t*n;let o=0;return r<1&&(o=(n-r)/(1-r)),[e[0],r*100,o*100]};u.hcg.rgb=function(e){const t=e[0]/360,n=e[1]/100,r=e[2]/100;if(n===0)return[r*255,r*255,r*255];const o=[0,0,0],a=t%1*6,s=a%1,l=1-s;let i=0;switch(Math.floor(a)){case 0:o[0]=1,o[1]=s,o[2]=0;break;case 1:o[0]=l,o[1]=1,o[2]=0;break;case 2:o[0]=0,o[1]=1,o[2]=s;break;case 3:o[0]=0,o[1]=l,o[2]=1;break;case 4:o[0]=s,o[1]=0,o[2]=1;break;default:o[0]=1,o[1]=0,o[2]=l}return i=(1-n)*r,[(n*o[0]+i)*255,(n*o[1]+i)*255,(n*o[2]+i)*255]};u.hcg.hsv=function(e){const t=e[1]/100,n=e[2]/100,r=t+n*(1-t);let o=0;return r>0&&(o=t/r),[e[0],o*100,r*100]};u.hcg.hsl=function(e){const t=e[1]/100,r=e[2]/100*(1-t)+.5*t;let o=0;return r>0&&r<.5?o=t/(2*r):r>=.5&&r<1&&(o=t/(2*(1-r))),[e[0],o*100,r*100]};u.hcg.hwb=function(e){const t=e[1]/100,n=e[2]/100,r=t+n*(1-t);return[e[0],(r-t)*100,(1-r)*100]};u.hwb.hcg=function(e){const t=e[1]/100,r=1-e[2]/100,o=r-t;let a=0;return o<1&&(a=(r-o)/(1-o)),[e[0],o*100,a*100]};u.apple.rgb=function(e){return[e[0]/65535*255,e[1]/65535*255,e[2]/65535*255]};u.rgb.apple=function(e){return[e[0]/255*65535,e[1]/255*65535,e[2]/255*65535]};u.gray.rgb=function(e){return[e[0]/100*255,e[0]/100*255,e[0]/100*255]};u.gray.hsl=function(e){return[0,0,e[0]]};u.gray.hsv=u.gray.hsl;u.gray.hwb=function(e){return[0,100,e[0]]};u.gray.cmyk=function(e){return[0,0,0,e[0]]};u.gray.lab=function(e){return[e[0],0,0]};u.gray.hex=function(e){const t=Math.round(e[0]/100*255)&255,r=((t<<16)+(t<<8)+t).toString(16).toUpperCase();return"000000".substring(r.length)+r};u.rgb.gray=function(e){return[(e[0]+e[1]+e[2])/3/255*100]};const B=_e;function Qe(){const e={},t=Object.keys(B);for(let n=t.length,r=0;r1&&(n=r),e(n))};return"conversion"in e&&(t.conversion=e.conversion),t}function st(e){const t=function(...n){const r=n[0];if(r==null)return r;r.length>1&&(n=r);const o=e(n);if(typeof o=="object")for(let a=o.length,s=0;s{O[e]={},Object.defineProperty(O[e],"channels",{value:U[e].channels}),Object.defineProperty(O[e],"labels",{value:U[e].labels});const t=rt(e);Object.keys(t).forEach(r=>{const o=t[r];O[e][r]=st(o),O[e][r].raw=at(o)})});var lt=O;const w=fe(lt);var it=Oe,ct=function(){return it.Date.now()},ut=ct,ft=/\s/;function ht(e){for(var t=e.length;t--&&ft.test(e.charAt(t)););return t}var dt=ht,gt=dt,mt=/^\s+/;function bt(e){return e&&e.slice(0,gt(e)+1).replace(mt,"")}var vt=bt,pt=vt,ae=J,yt=Ie,se=NaN,xt=/^[-+]0x[0-9a-f]+$/i,wt=/^0b[01]+$/i,kt=/^0o[0-7]+$/i,_t=parseInt;function Et(e){if(typeof e=="number")return e;if(yt(e))return se;if(ae(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=ae(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=pt(e);var n=wt.test(e);return n||kt.test(e)?_t(e.slice(2),n?2:8):xt.test(e)?se:+e}var Mt=Et,Ct=J,D=ut,le=Mt,$t="Expected a function",Nt=Math.max,Ot=Math.min;function It(e,t,n){var r,o,a,s,l,i,c=0,d=!1,f=!1,g=!0;if(typeof e!="function")throw new TypeError($t);t=le(t)||0,Ct(n)&&(d=!!n.leading,f="maxWait"in n,a=f?Nt(le(n.maxWait)||0,t):a,g="trailing"in n?!!n.trailing:g);function k(v){var E=r,T=o;return r=o=void 0,c=v,s=e.apply(T,E),s}function N(v){return c=v,l=setTimeout(m,t),d?k(v):s}function _(v){var E=v-i,T=v-c,te=t-E;return f?Ot(te,a-T):te}function p(v){var E=v-i,T=v-c;return i===void 0||E>=t||E<0||f&&T>=a}function m(){var v=D();if(p(v))return x(v);l=setTimeout(m,_(v))}function x(v){return l=void 0,g&&r?k(v):(r=o=void 0,s)}function C(){l!==void 0&&clearTimeout(l),c=0,r=i=o=l=void 0}function X(){return l===void 0?s:x(D())}function R(){var v=D(),E=p(v);if(r=arguments,o=this,i=v,E){if(l===void 0)return N(i);if(f)return clearTimeout(l),l=setTimeout(m,t),k(i)}return l===void 0&&(l=setTimeout(m,t)),s}return R.cancel=C,R.flush=X,R}var St=It,Rt=St,Tt=J,jt="Expected a function";function Ft(e,t,n){var r=!0,o=!0;if(typeof e!="function")throw new TypeError(jt);return Tt(n)&&(r="leading"in n?!!n.leading:r,o="trailing"in n?!!n.trailing:o),Rt(e,t,{leading:r,maxWait:t,trailing:o})}var zt=Ft;const Ht=fe(zt);var Pt=M.div({position:"relative",maxWidth:250}),Lt=M(ue)({position:"absolute",zIndex:1,top:4,left:4}),qt=M.div({width:200,margin:5,".react-colorful__saturation":{borderRadius:"4px 4px 0 0"},".react-colorful__hue":{boxShadow:"inset 0 0 0 1px rgb(0 0 0 / 5%)"},".react-colorful__last-control":{borderRadius:"0 0 4px 4px"}}),Bt=M(Me)(({theme:e})=>({fontFamily:e.typography.fonts.base})),Wt=M.div({display:"grid",gridTemplateColumns:"repeat(9, 16px)",gap:6,padding:3,marginTop:5,width:200}),Xt=M.div(({theme:e,active:t})=>({width:16,height:16,boxShadow:t?`${e.appBorderColor} 0 0 0 1px inset, ${e.textMutedColor}50 0 0 0 4px`:`${e.appBorderColor} 0 0 0 1px inset`,borderRadius:e.appBorderRadius})),Dt=`url('data:image/svg+xml;charset=utf-8,')`,ie=({value:e,active:t,onClick:n,style:r,...o})=>{let a=`linear-gradient(${e}, ${e}), ${Dt}, linear-gradient(#fff, #fff)`;return h.createElement(Xt,{...o,active:t,onClick:n,style:{...r,backgroundImage:a}})},Kt=M(Ce.Input)(({theme:e})=>({width:"100%",paddingLeft:30,paddingRight:30,boxSizing:"border-box",fontFamily:e.typography.fonts.base})),Vt=M($e)(({theme:e})=>({position:"absolute",zIndex:1,top:6,right:7,width:20,height:20,padding:4,boxSizing:"border-box",cursor:"pointer",color:e.input.color})),Ee=(e=>(e.RGB="rgb",e.HSL="hsl",e.HEX="hex",e))(Ee||{}),P=Object.values(Ee),At=/\(([0-9]+),\s*([0-9]+)%?,\s*([0-9]+)%?,?\s*([0-9.]+)?\)/,Gt=/^\s*rgba?\(([0-9]+),\s*([0-9]+),\s*([0-9]+),?\s*([0-9.]+)?\)\s*$/i,Ut=/^\s*hsla?\(([0-9]+),\s*([0-9]+)%,\s*([0-9]+)%,?\s*([0-9.]+)?\)\s*$/i,Y=/^\s*#?([0-9a-f]{3}|[0-9a-f]{6})\s*$/i,Yt=/^\s*#?([0-9a-f]{3})\s*$/i,Jt={hex:De,rgb:Ue,hsl:Ae},L={hex:"transparent",rgb:"rgba(0, 0, 0, 0)",hsl:"hsla(0, 0%, 0%, 0)"},ce=e=>{let t=e==null?void 0:e.match(At);if(!t)return[0,0,0,1];let[,n,r,o,a=1]=t;return[n,r,o,a].map(Number)},I=e=>{if(!e)return;let t=!0;if(Gt.test(e)){let[s,l,i,c]=ce(e),[d,f,g]=w.rgb.hsl([s,l,i])||[0,0,0];return{valid:t,value:e,keyword:w.rgb.keyword([s,l,i]),colorSpace:"rgb",rgb:e,hsl:`hsla(${d}, ${f}%, ${g}%, ${c})`,hex:`#${w.rgb.hex([s,l,i]).toLowerCase()}`}}if(Ut.test(e)){let[s,l,i,c]=ce(e),[d,f,g]=w.hsl.rgb([s,l,i])||[0,0,0];return{valid:t,value:e,keyword:w.hsl.keyword([s,l,i]),colorSpace:"hsl",rgb:`rgba(${d}, ${f}, ${g}, ${c})`,hsl:e,hex:`#${w.hsl.hex([s,l,i]).toLowerCase()}`}}let n=e.replace("#",""),r=w.keyword.rgb(n)||w.hex.rgb(n),o=w.rgb.hsl(r),a=e;if(/[^#a-f0-9]/i.test(e)?a=n:Y.test(e)&&(a=`#${n}`),a.startsWith("#"))t=Y.test(a);else try{w.keyword.hex(a)}catch{t=!1}return{valid:t,value:a,keyword:w.rgb.keyword(r),colorSpace:"hex",rgb:`rgba(${r[0]}, ${r[1]}, ${r[2]}, 1)`,hsl:`hsla(${o[0]}, ${o[1]}%, ${o[2]}%, 1)`,hex:a}},Qt=(e,t,n)=>{if(!e||!(t!=null&&t.valid))return L[n];if(n!=="hex")return(t==null?void 0:t[n])||L[n];if(!t.hex.startsWith("#"))try{return`#${w.keyword.hex(t.hex)}`}catch{return L.hex}let r=t.hex.match(Yt);if(!r)return Y.test(t.hex)?t.hex:L.hex;let[o,a,s]=r[1].split("");return`#${o}${o}${a}${a}${s}${s}`},Zt=(e,t)=>{let[n,r]=b.useState(e||""),[o,a]=b.useState(()=>I(n)),[s,l]=b.useState((o==null?void 0:o.colorSpace)||"hex");b.useEffect(()=>{let f=e||"",g=I(f);r(f),a(g),l((g==null?void 0:g.colorSpace)||"hex")},[e]);let i=b.useMemo(()=>Qt(n,o,s).toLowerCase(),[n,o,s]),c=b.useCallback(f=>{let g=I(f),k=(g==null?void 0:g.value)||f||"";r(k),k===""&&(a(void 0),t(void 0)),g&&(a(g),l(g.colorSpace),t(g.value))},[t]),d=b.useCallback(()=>{let f=P.indexOf(s)+1;f>=P.length&&(f=0),l(P[f]);let g=(o==null?void 0:o[P[f]])||"";r(g),t(g)},[o,s,t]);return{value:n,realValue:i,updateValue:c,color:o,colorSpace:s,cycleColorSpace:d}},W=e=>e.replace(/\s*/,"").toLowerCase(),en=(e,t,n)=>{let[r,o]=b.useState(t!=null&&t.valid?[t]:[]);b.useEffect(()=>{t===void 0&&o([])},[t]);let a=b.useMemo(()=>(e||[]).map(l=>typeof l=="string"?I(l):l.title?{...I(l.color),keyword:l.title}:I(l.color)).concat(r).filter(Boolean).slice(-27),[e,r]),s=b.useCallback(l=>{l!=null&&l.valid&&(a.some(i=>W(i[n])===W(l[n]))||o(i=>i.concat(l)))},[n,a]);return{presets:a,addPreset:s}},tn=({name:e,value:t,onChange:n,onFocus:r,onBlur:o,presetColors:a,startOpen:s=!1})=>{let l=b.useCallback(Ht(n,200),[n]),{value:i,realValue:c,updateValue:d,color:f,colorSpace:g,cycleColorSpace:k}=Zt(t,l),{presets:N,addPreset:_}=en(a,f,g),p=Jt[g];return h.createElement(Pt,null,h.createElement(Lt,{startOpen:s,closeOnOutsideClick:!0,onVisibleChange:()=>_(f),tooltip:h.createElement(qt,null,h.createElement(p,{color:c==="transparent"?"#000000":c,onChange:d,onFocus:r,onBlur:o}),N.length>0&&h.createElement(Wt,null,N.map((m,x)=>h.createElement(ue,{key:`${m.value}-${x}`,hasChrome:!1,tooltip:h.createElement(Bt,{note:m.keyword||m.value})},h.createElement(ie,{value:m[g],active:f&&W(m[g])===W(f[g]),onClick:()=>d(m.value)})))))},h.createElement(ie,{value:c,style:{margin:4}})),h.createElement(Kt,{id:Ne(e),value:i,onChange:m=>d(m.target.value),onFocus:m=>m.target.select(),placeholder:"Choose color..."}),i?h.createElement(Vt,{icon:"markup",onClick:k}):null)},un=tn;export{tn as ColorControl,un as default}; +import{R as h,r as b,n as M,f as ue,T as Me,F as Ce,I as $e,g as Ne}from"./chunk-HLWAVYOI-H2VhgzR2.js";import{g as fe}from"./_commonjsHelpers-5-cIlDoe.js";import{_ as Oe,i as J,a as Ie}from"./index-xLzVGzoy.js";import"./iframe--l1y4VEe.js";import"../sb-preview/runtime.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";import"./index-PPLHz8o0.js";function $(){return($=Object.assign||function(e){for(var t=1;t=0||(o[n]=e[n]);return o}function K(e){var t=b.useRef(e),n=b.useRef(function(r){t.current&&t.current(r)});return t.current=e,n.current}var S=function(e,t,n){return t===void 0&&(t=0),n===void 0&&(n=1),e>n?n:e0:p.buttons>0)&&o.current?a(ne(o.current,p,l.current)):_(!1)},N=function(){return _(!1)};function _(p){var m=i.current,x=V(o.current),C=p?x.addEventListener:x.removeEventListener;C(m?"touchmove":"mousemove",k),C(m?"touchend":"mouseup",N)}return[function(p){var m=p.nativeEvent,x=o.current;if(x&&(re(m),!function(X,R){return R&&!j(X)}(m,i.current)&&x)){if(j(m)){i.current=!0;var C=m.changedTouches||[];C.length&&(l.current=C[0].identifier)}x.focus(),a(ne(x,m,l.current)),_(!0)}},function(p){var m=p.which||p.keyCode;m<37||m>40||(p.preventDefault(),s({left:m===39?.05:m===37?-.05:0,top:m===40?.05:m===38?-.05:0}))},_]},[s,a]),d=c[0],f=c[1],g=c[2];return b.useEffect(function(){return g},[g]),h.createElement("div",$({},r,{onTouchStart:d,onMouseDown:d,className:"react-colorful__interactive",ref:o,onKeyDown:f,tabIndex:0,role:"slider"}))}),z=function(e){return e.filter(Boolean).join(" ")},ee=function(e){var t=e.color,n=e.left,r=e.top,o=r===void 0?.5:r,a=z(["react-colorful__pointer",e.className]);return h.createElement("div",{className:a,style:{top:100*o+"%",left:100*n+"%"}},h.createElement("div",{className:"react-colorful__pointer-fill",style:{backgroundColor:t}}))},y=function(e,t,n){return t===void 0&&(t=0),n===void 0&&(n=Math.pow(10,t)),Math.round(n*e)/n},Se={grad:.9,turn:360,rad:360/(2*Math.PI)},Re=function(e){return ge(A(e))},A=function(e){return e[0]==="#"&&(e=e.substring(1)),e.length<6?{r:parseInt(e[0]+e[0],16),g:parseInt(e[1]+e[1],16),b:parseInt(e[2]+e[2],16),a:e.length===4?y(parseInt(e[3]+e[3],16)/255,2):1}:{r:parseInt(e.substring(0,2),16),g:parseInt(e.substring(2,4),16),b:parseInt(e.substring(4,6),16),a:e.length===8?y(parseInt(e.substring(6,8),16)/255,2):1}},Te=function(e,t){return t===void 0&&(t="deg"),Number(e)*(Se[t]||1)},je=function(e){var t=/hsla?\(?\s*(-?\d*\.?\d+)(deg|rad|grad|turn)?[,\s]+(-?\d*\.?\d+)%?[,\s]+(-?\d*\.?\d+)%?,?\s*[/\s]*(-?\d*\.?\d+)?(%)?\s*\)?/i.exec(e);return t?Fe({h:Te(t[1],t[2]),s:Number(t[3]),l:Number(t[4]),a:t[5]===void 0?1:Number(t[5])/(t[6]?100:1)}):{h:0,s:0,v:0,a:1}},Fe=function(e){var t=e.s,n=e.l;return{h:e.h,s:(t*=(n<50?n:100-n)/100)>0?2*t/(n+t)*100:0,v:n+t,a:e.a}},ze=function(e){return Pe(de(e))},he=function(e){var t=e.s,n=e.v,r=e.a,o=(200-t)*n/100;return{h:y(e.h),s:y(o>0&&o<200?t*n/100/(o<=100?o:200-o)*100:0),l:y(o/2),a:y(r,2)}},G=function(e){var t=he(e);return"hsl("+t.h+", "+t.s+"%, "+t.l+"%)"},q=function(e){var t=he(e);return"hsla("+t.h+", "+t.s+"%, "+t.l+"%, "+t.a+")"},de=function(e){var t=e.h,n=e.s,r=e.v,o=e.a;t=t/360*6,n/=100,r/=100;var a=Math.floor(t),s=r*(1-n),l=r*(1-(t-a)*n),i=r*(1-(1-t+a)*n),c=a%6;return{r:y(255*[r,l,s,s,i,r][c]),g:y(255*[i,r,r,l,s,s][c]),b:y(255*[s,s,i,r,r,l][c]),a:y(o,2)}},He=function(e){var t=/rgba?\(?\s*(-?\d*\.?\d+)(%)?[,\s]+(-?\d*\.?\d+)(%)?[,\s]+(-?\d*\.?\d+)(%)?,?\s*[/\s]*(-?\d*\.?\d+)?(%)?\s*\)?/i.exec(e);return t?ge({r:Number(t[1])/(t[2]?100/255:1),g:Number(t[3])/(t[4]?100/255:1),b:Number(t[5])/(t[6]?100/255:1),a:t[7]===void 0?1:Number(t[7])/(t[8]?100:1)}):{h:0,s:0,v:0,a:1}},H=function(e){var t=e.toString(16);return t.length<2?"0"+t:t},Pe=function(e){var t=e.r,n=e.g,r=e.b,o=e.a,a=o<1?H(y(255*o)):"";return"#"+H(t)+H(n)+H(r)+a},ge=function(e){var t=e.r,n=e.g,r=e.b,o=e.a,a=Math.max(t,n,r),s=a-Math.min(t,n,r),l=s?a===t?(n-r)/s:a===n?2+(r-t)/s:4+(t-n)/s:0;return{h:y(60*(l<0?l+6:l)),s:y(a?s/a*100:0),v:y(a/255*100),a:o}},me=h.memo(function(e){var t=e.hue,n=e.onChange,r=z(["react-colorful__hue",e.className]);return h.createElement("div",{className:r},h.createElement(Z,{onMove:function(o){n({h:360*o.left})},onKey:function(o){n({h:S(t+360*o.left,0,360)})},"aria-label":"Hue","aria-valuenow":y(t),"aria-valuemax":"360","aria-valuemin":"0"},h.createElement(ee,{className:"react-colorful__hue-pointer",left:t/360,color:G({h:t,s:100,v:100,a:1})})))}),be=h.memo(function(e){var t=e.hsva,n=e.onChange,r={backgroundColor:G({h:t.h,s:100,v:100,a:1})};return h.createElement("div",{className:"react-colorful__saturation",style:r},h.createElement(Z,{onMove:function(o){n({s:100*o.left,v:100-100*o.top})},onKey:function(o){n({s:S(t.s+100*o.left,0,100),v:S(t.v-100*o.top,0,100)})},"aria-label":"Color","aria-valuetext":"Saturation "+y(t.s)+"%, Brightness "+y(t.v)+"%"},h.createElement(ee,{className:"react-colorful__saturation-pointer",top:1-t.v/100,left:t.s/100,color:G(t)})))}),ve=function(e,t){if(e===t)return!0;for(var n in e)if(e[n]!==t[n])return!1;return!0},pe=function(e,t){return e.replace(/\s/g,"")===t.replace(/\s/g,"")},Le=function(e,t){return e.toLowerCase()===t.toLowerCase()||ve(A(e),A(t))};function ye(e,t,n){var r=K(n),o=b.useState(function(){return e.toHsva(t)}),a=o[0],s=o[1],l=b.useRef({color:t,hsva:a});b.useEffect(function(){if(!e.equal(t,l.current.color)){var c=e.toHsva(t);l.current={hsva:c,color:t},s(c)}},[t,e]),b.useEffect(function(){var c;ve(a,l.current.hsva)||e.equal(c=e.fromHsva(a),l.current.color)||(l.current={hsva:a,color:c},r(c))},[a,e,r]);var i=b.useCallback(function(c){s(function(d){return Object.assign({},d,c)})},[]);return[a,i]}var qe=typeof window<"u"?b.useLayoutEffect:b.useEffect,Be=function(){return typeof __webpack_nonce__<"u"?__webpack_nonce__:void 0},oe=new Map,xe=function(e){qe(function(){var t=e.current?e.current.ownerDocument:document;if(t!==void 0&&!oe.has(t)){var n=t.createElement("style");n.innerHTML=`.react-colorful{position:relative;display:flex;flex-direction:column;width:200px;height:200px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:default}.react-colorful__saturation{position:relative;flex-grow:1;border-color:transparent;border-bottom:12px solid #000;border-radius:8px 8px 0 0;background-image:linear-gradient(0deg,#000,transparent),linear-gradient(90deg,#fff,hsla(0,0%,100%,0))}.react-colorful__alpha-gradient,.react-colorful__pointer-fill{content:"";position:absolute;left:0;top:0;right:0;bottom:0;pointer-events:none;border-radius:inherit}.react-colorful__alpha-gradient,.react-colorful__saturation{box-shadow:inset 0 0 0 1px rgba(0,0,0,.05)}.react-colorful__alpha,.react-colorful__hue{position:relative;height:24px}.react-colorful__hue{background:linear-gradient(90deg,red 0,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,red)}.react-colorful__last-control{border-radius:0 0 8px 8px}.react-colorful__interactive{position:absolute;left:0;top:0;right:0;bottom:0;border-radius:inherit;outline:none;touch-action:none}.react-colorful__pointer{position:absolute;z-index:1;box-sizing:border-box;width:28px;height:28px;transform:translate(-50%,-50%);background-color:#fff;border:2px solid #fff;border-radius:50%;box-shadow:0 2px 4px rgba(0,0,0,.2)}.react-colorful__interactive:focus .react-colorful__pointer{transform:translate(-50%,-50%) scale(1.1)}.react-colorful__alpha,.react-colorful__alpha-pointer{background-color:#fff;background-image:url('data:image/svg+xml;charset=utf-8,')}.react-colorful__saturation-pointer{z-index:3}.react-colorful__hue-pointer{z-index:2}`,oe.set(t,n);var r=Be();r&&n.setAttribute("nonce",r),t.head.appendChild(n)}},[])},We=function(e){var t=e.className,n=e.colorModel,r=e.color,o=r===void 0?n.defaultColor:r,a=e.onChange,s=Q(e,["className","colorModel","color","onChange"]),l=b.useRef(null);xe(l);var i=ye(n,o,a),c=i[0],d=i[1],f=z(["react-colorful",t]);return h.createElement("div",$({},s,{ref:l,className:f}),h.createElement(be,{hsva:c,onChange:d}),h.createElement(me,{hue:c.h,onChange:d,className:"react-colorful__last-control"}))},Xe={defaultColor:"000",toHsva:Re,fromHsva:function(e){return ze({h:e.h,s:e.s,v:e.v,a:1})},equal:Le},De=function(e){return h.createElement(We,$({},e,{colorModel:Xe}))},Ke=function(e){var t=e.className,n=e.hsva,r=e.onChange,o={backgroundImage:"linear-gradient(90deg, "+q(Object.assign({},n,{a:0}))+", "+q(Object.assign({},n,{a:1}))+")"},a=z(["react-colorful__alpha",t]),s=y(100*n.a);return h.createElement("div",{className:a},h.createElement("div",{className:"react-colorful__alpha-gradient",style:o}),h.createElement(Z,{onMove:function(l){r({a:l.left})},onKey:function(l){r({a:S(n.a+l.left)})},"aria-label":"Alpha","aria-valuetext":s+"%","aria-valuenow":s,"aria-valuemin":"0","aria-valuemax":"100"},h.createElement(ee,{className:"react-colorful__alpha-pointer",left:n.a,color:q(n)})))},we=function(e){var t=e.className,n=e.colorModel,r=e.color,o=r===void 0?n.defaultColor:r,a=e.onChange,s=Q(e,["className","colorModel","color","onChange"]),l=b.useRef(null);xe(l);var i=ye(n,o,a),c=i[0],d=i[1],f=z(["react-colorful",t]);return h.createElement("div",$({},s,{ref:l,className:f}),h.createElement(be,{hsva:c,onChange:d}),h.createElement(me,{hue:c.h,onChange:d}),h.createElement(Ke,{hsva:c,onChange:d,className:"react-colorful__last-control"}))},Ve={defaultColor:"hsla(0, 0%, 0%, 1)",toHsva:je,fromHsva:q,equal:pe},Ae=function(e){return h.createElement(we,$({},e,{colorModel:Ve}))},Ge={defaultColor:"rgba(0, 0, 0, 1)",toHsva:He,fromHsva:function(e){var t=de(e);return"rgba("+t.r+", "+t.g+", "+t.b+", "+t.a+")"},equal:pe},Ue=function(e){return h.createElement(we,$({},e,{colorModel:Ge}))},Ye={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]};const F=Ye,ke={};for(const e of Object.keys(F))ke[F[e]]=e;const u={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},lch:{channels:3,labels:"lch"},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}};var _e=u;for(const e of Object.keys(u)){if(!("channels"in u[e]))throw new Error("missing channels property: "+e);if(!("labels"in u[e]))throw new Error("missing channel labels property: "+e);if(u[e].labels.length!==u[e].channels)throw new Error("channel and label counts mismatch: "+e);const{channels:t,labels:n}=u[e];delete u[e].channels,delete u[e].labels,Object.defineProperty(u[e],"channels",{value:t}),Object.defineProperty(u[e],"labels",{value:n})}u.rgb.hsl=function(e){const t=e[0]/255,n=e[1]/255,r=e[2]/255,o=Math.min(t,n,r),a=Math.max(t,n,r),s=a-o;let l,i;a===o?l=0:t===a?l=(n-r)/s:n===a?l=2+(r-t)/s:r===a&&(l=4+(t-n)/s),l=Math.min(l*60,360),l<0&&(l+=360);const c=(o+a)/2;return a===o?i=0:c<=.5?i=s/(a+o):i=s/(2-a-o),[l,i*100,c*100]};u.rgb.hsv=function(e){let t,n,r,o,a;const s=e[0]/255,l=e[1]/255,i=e[2]/255,c=Math.max(s,l,i),d=c-Math.min(s,l,i),f=function(g){return(c-g)/6/d+1/2};return d===0?(o=0,a=0):(a=d/c,t=f(s),n=f(l),r=f(i),s===c?o=r-n:l===c?o=1/3+t-r:i===c&&(o=2/3+n-t),o<0?o+=1:o>1&&(o-=1)),[o*360,a*100,c*100]};u.rgb.hwb=function(e){const t=e[0],n=e[1];let r=e[2];const o=u.rgb.hsl(e)[0],a=1/255*Math.min(t,Math.min(n,r));return r=1-1/255*Math.max(t,Math.max(n,r)),[o,a*100,r*100]};u.rgb.cmyk=function(e){const t=e[0]/255,n=e[1]/255,r=e[2]/255,o=Math.min(1-t,1-n,1-r),a=(1-t-o)/(1-o)||0,s=(1-n-o)/(1-o)||0,l=(1-r-o)/(1-o)||0;return[a*100,s*100,l*100,o*100]};function Je(e,t){return(e[0]-t[0])**2+(e[1]-t[1])**2+(e[2]-t[2])**2}u.rgb.keyword=function(e){const t=ke[e];if(t)return t;let n=1/0,r;for(const o of Object.keys(F)){const a=F[o],s=Je(e,a);s.04045?((t+.055)/1.055)**2.4:t/12.92,n=n>.04045?((n+.055)/1.055)**2.4:n/12.92,r=r>.04045?((r+.055)/1.055)**2.4:r/12.92;const o=t*.4124+n*.3576+r*.1805,a=t*.2126+n*.7152+r*.0722,s=t*.0193+n*.1192+r*.9505;return[o*100,a*100,s*100]};u.rgb.lab=function(e){const t=u.rgb.xyz(e);let n=t[0],r=t[1],o=t[2];n/=95.047,r/=100,o/=108.883,n=n>.008856?n**(1/3):7.787*n+16/116,r=r>.008856?r**(1/3):7.787*r+16/116,o=o>.008856?o**(1/3):7.787*o+16/116;const a=116*r-16,s=500*(n-r),l=200*(r-o);return[a,s,l]};u.hsl.rgb=function(e){const t=e[0]/360,n=e[1]/100,r=e[2]/100;let o,a,s;if(n===0)return s=r*255,[s,s,s];r<.5?o=r*(1+n):o=r+n-r*n;const l=2*r-o,i=[0,0,0];for(let c=0;c<3;c++)a=t+1/3*-(c-1),a<0&&a++,a>1&&a--,6*a<1?s=l+(o-l)*6*a:2*a<1?s=o:3*a<2?s=l+(o-l)*(2/3-a)*6:s=l,i[c]=s*255;return i};u.hsl.hsv=function(e){const t=e[0];let n=e[1]/100,r=e[2]/100,o=n;const a=Math.max(r,.01);r*=2,n*=r<=1?r:2-r,o*=a<=1?a:2-a;const s=(r+n)/2,l=r===0?2*o/(a+o):2*n/(r+n);return[t,l*100,s*100]};u.hsv.rgb=function(e){const t=e[0]/60,n=e[1]/100;let r=e[2]/100;const o=Math.floor(t)%6,a=t-Math.floor(t),s=255*r*(1-n),l=255*r*(1-n*a),i=255*r*(1-n*(1-a));switch(r*=255,o){case 0:return[r,i,s];case 1:return[l,r,s];case 2:return[s,r,i];case 3:return[s,l,r];case 4:return[i,s,r];case 5:return[r,s,l]}};u.hsv.hsl=function(e){const t=e[0],n=e[1]/100,r=e[2]/100,o=Math.max(r,.01);let a,s;s=(2-n)*r;const l=(2-n)*o;return a=n*o,a/=l<=1?l:2-l,a=a||0,s/=2,[t,a*100,s*100]};u.hwb.rgb=function(e){const t=e[0]/360;let n=e[1]/100,r=e[2]/100;const o=n+r;let a;o>1&&(n/=o,r/=o);const s=Math.floor(6*t),l=1-r;a=6*t-s,s&1&&(a=1-a);const i=n+a*(l-n);let c,d,f;switch(s){default:case 6:case 0:c=l,d=i,f=n;break;case 1:c=i,d=l,f=n;break;case 2:c=n,d=l,f=i;break;case 3:c=n,d=i,f=l;break;case 4:c=i,d=n,f=l;break;case 5:c=l,d=n,f=i;break}return[c*255,d*255,f*255]};u.cmyk.rgb=function(e){const t=e[0]/100,n=e[1]/100,r=e[2]/100,o=e[3]/100,a=1-Math.min(1,t*(1-o)+o),s=1-Math.min(1,n*(1-o)+o),l=1-Math.min(1,r*(1-o)+o);return[a*255,s*255,l*255]};u.xyz.rgb=function(e){const t=e[0]/100,n=e[1]/100,r=e[2]/100;let o,a,s;return o=t*3.2406+n*-1.5372+r*-.4986,a=t*-.9689+n*1.8758+r*.0415,s=t*.0557+n*-.204+r*1.057,o=o>.0031308?1.055*o**(1/2.4)-.055:o*12.92,a=a>.0031308?1.055*a**(1/2.4)-.055:a*12.92,s=s>.0031308?1.055*s**(1/2.4)-.055:s*12.92,o=Math.min(Math.max(0,o),1),a=Math.min(Math.max(0,a),1),s=Math.min(Math.max(0,s),1),[o*255,a*255,s*255]};u.xyz.lab=function(e){let t=e[0],n=e[1],r=e[2];t/=95.047,n/=100,r/=108.883,t=t>.008856?t**(1/3):7.787*t+16/116,n=n>.008856?n**(1/3):7.787*n+16/116,r=r>.008856?r**(1/3):7.787*r+16/116;const o=116*n-16,a=500*(t-n),s=200*(n-r);return[o,a,s]};u.lab.xyz=function(e){const t=e[0],n=e[1],r=e[2];let o,a,s;a=(t+16)/116,o=n/500+a,s=a-r/200;const l=a**3,i=o**3,c=s**3;return a=l>.008856?l:(a-16/116)/7.787,o=i>.008856?i:(o-16/116)/7.787,s=c>.008856?c:(s-16/116)/7.787,o*=95.047,a*=100,s*=108.883,[o,a,s]};u.lab.lch=function(e){const t=e[0],n=e[1],r=e[2];let o;o=Math.atan2(r,n)*360/2/Math.PI,o<0&&(o+=360);const s=Math.sqrt(n*n+r*r);return[t,s,o]};u.lch.lab=function(e){const t=e[0],n=e[1],o=e[2]/360*2*Math.PI,a=n*Math.cos(o),s=n*Math.sin(o);return[t,a,s]};u.rgb.ansi16=function(e,t=null){const[n,r,o]=e;let a=t===null?u.rgb.hsv(e)[2]:t;if(a=Math.round(a/50),a===0)return 30;let s=30+(Math.round(o/255)<<2|Math.round(r/255)<<1|Math.round(n/255));return a===2&&(s+=60),s};u.hsv.ansi16=function(e){return u.rgb.ansi16(u.hsv.rgb(e),e[2])};u.rgb.ansi256=function(e){const t=e[0],n=e[1],r=e[2];return t===n&&n===r?t<8?16:t>248?231:Math.round((t-8)/247*24)+232:16+36*Math.round(t/255*5)+6*Math.round(n/255*5)+Math.round(r/255*5)};u.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];const n=(~~(e>50)+1)*.5,r=(t&1)*n*255,o=(t>>1&1)*n*255,a=(t>>2&1)*n*255;return[r,o,a]};u.ansi256.rgb=function(e){if(e>=232){const a=(e-232)*10+8;return[a,a,a]}e-=16;let t;const n=Math.floor(e/36)/5*255,r=Math.floor((t=e%36)/6)/5*255,o=t%6/5*255;return[n,r,o]};u.rgb.hex=function(e){const n=(((Math.round(e[0])&255)<<16)+((Math.round(e[1])&255)<<8)+(Math.round(e[2])&255)).toString(16).toUpperCase();return"000000".substring(n.length)+n};u.hex.rgb=function(e){const t=e.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!t)return[0,0,0];let n=t[0];t[0].length===3&&(n=n.split("").map(l=>l+l).join(""));const r=parseInt(n,16),o=r>>16&255,a=r>>8&255,s=r&255;return[o,a,s]};u.rgb.hcg=function(e){const t=e[0]/255,n=e[1]/255,r=e[2]/255,o=Math.max(Math.max(t,n),r),a=Math.min(Math.min(t,n),r),s=o-a;let l,i;return s<1?l=a/(1-s):l=0,s<=0?i=0:o===t?i=(n-r)/s%6:o===n?i=2+(r-t)/s:i=4+(t-n)/s,i/=6,i%=1,[i*360,s*100,l*100]};u.hsl.hcg=function(e){const t=e[1]/100,n=e[2]/100,r=n<.5?2*t*n:2*t*(1-n);let o=0;return r<1&&(o=(n-.5*r)/(1-r)),[e[0],r*100,o*100]};u.hsv.hcg=function(e){const t=e[1]/100,n=e[2]/100,r=t*n;let o=0;return r<1&&(o=(n-r)/(1-r)),[e[0],r*100,o*100]};u.hcg.rgb=function(e){const t=e[0]/360,n=e[1]/100,r=e[2]/100;if(n===0)return[r*255,r*255,r*255];const o=[0,0,0],a=t%1*6,s=a%1,l=1-s;let i=0;switch(Math.floor(a)){case 0:o[0]=1,o[1]=s,o[2]=0;break;case 1:o[0]=l,o[1]=1,o[2]=0;break;case 2:o[0]=0,o[1]=1,o[2]=s;break;case 3:o[0]=0,o[1]=l,o[2]=1;break;case 4:o[0]=s,o[1]=0,o[2]=1;break;default:o[0]=1,o[1]=0,o[2]=l}return i=(1-n)*r,[(n*o[0]+i)*255,(n*o[1]+i)*255,(n*o[2]+i)*255]};u.hcg.hsv=function(e){const t=e[1]/100,n=e[2]/100,r=t+n*(1-t);let o=0;return r>0&&(o=t/r),[e[0],o*100,r*100]};u.hcg.hsl=function(e){const t=e[1]/100,r=e[2]/100*(1-t)+.5*t;let o=0;return r>0&&r<.5?o=t/(2*r):r>=.5&&r<1&&(o=t/(2*(1-r))),[e[0],o*100,r*100]};u.hcg.hwb=function(e){const t=e[1]/100,n=e[2]/100,r=t+n*(1-t);return[e[0],(r-t)*100,(1-r)*100]};u.hwb.hcg=function(e){const t=e[1]/100,r=1-e[2]/100,o=r-t;let a=0;return o<1&&(a=(r-o)/(1-o)),[e[0],o*100,a*100]};u.apple.rgb=function(e){return[e[0]/65535*255,e[1]/65535*255,e[2]/65535*255]};u.rgb.apple=function(e){return[e[0]/255*65535,e[1]/255*65535,e[2]/255*65535]};u.gray.rgb=function(e){return[e[0]/100*255,e[0]/100*255,e[0]/100*255]};u.gray.hsl=function(e){return[0,0,e[0]]};u.gray.hsv=u.gray.hsl;u.gray.hwb=function(e){return[0,100,e[0]]};u.gray.cmyk=function(e){return[0,0,0,e[0]]};u.gray.lab=function(e){return[e[0],0,0]};u.gray.hex=function(e){const t=Math.round(e[0]/100*255)&255,r=((t<<16)+(t<<8)+t).toString(16).toUpperCase();return"000000".substring(r.length)+r};u.rgb.gray=function(e){return[(e[0]+e[1]+e[2])/3/255*100]};const B=_e;function Qe(){const e={},t=Object.keys(B);for(let n=t.length,r=0;r1&&(n=r),e(n))};return"conversion"in e&&(t.conversion=e.conversion),t}function st(e){const t=function(...n){const r=n[0];if(r==null)return r;r.length>1&&(n=r);const o=e(n);if(typeof o=="object")for(let a=o.length,s=0;s{O[e]={},Object.defineProperty(O[e],"channels",{value:U[e].channels}),Object.defineProperty(O[e],"labels",{value:U[e].labels});const t=rt(e);Object.keys(t).forEach(r=>{const o=t[r];O[e][r]=st(o),O[e][r].raw=at(o)})});var lt=O;const w=fe(lt);var it=Oe,ct=function(){return it.Date.now()},ut=ct,ft=/\s/;function ht(e){for(var t=e.length;t--&&ft.test(e.charAt(t)););return t}var dt=ht,gt=dt,mt=/^\s+/;function bt(e){return e&&e.slice(0,gt(e)+1).replace(mt,"")}var vt=bt,pt=vt,ae=J,yt=Ie,se=NaN,xt=/^[-+]0x[0-9a-f]+$/i,wt=/^0b[01]+$/i,kt=/^0o[0-7]+$/i,_t=parseInt;function Et(e){if(typeof e=="number")return e;if(yt(e))return se;if(ae(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=ae(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=pt(e);var n=wt.test(e);return n||kt.test(e)?_t(e.slice(2),n?2:8):xt.test(e)?se:+e}var Mt=Et,Ct=J,D=ut,le=Mt,$t="Expected a function",Nt=Math.max,Ot=Math.min;function It(e,t,n){var r,o,a,s,l,i,c=0,d=!1,f=!1,g=!0;if(typeof e!="function")throw new TypeError($t);t=le(t)||0,Ct(n)&&(d=!!n.leading,f="maxWait"in n,a=f?Nt(le(n.maxWait)||0,t):a,g="trailing"in n?!!n.trailing:g);function k(v){var E=r,T=o;return r=o=void 0,c=v,s=e.apply(T,E),s}function N(v){return c=v,l=setTimeout(m,t),d?k(v):s}function _(v){var E=v-i,T=v-c,te=t-E;return f?Ot(te,a-T):te}function p(v){var E=v-i,T=v-c;return i===void 0||E>=t||E<0||f&&T>=a}function m(){var v=D();if(p(v))return x(v);l=setTimeout(m,_(v))}function x(v){return l=void 0,g&&r?k(v):(r=o=void 0,s)}function C(){l!==void 0&&clearTimeout(l),c=0,r=i=o=l=void 0}function X(){return l===void 0?s:x(D())}function R(){var v=D(),E=p(v);if(r=arguments,o=this,i=v,E){if(l===void 0)return N(i);if(f)return clearTimeout(l),l=setTimeout(m,t),k(i)}return l===void 0&&(l=setTimeout(m,t)),s}return R.cancel=C,R.flush=X,R}var St=It,Rt=St,Tt=J,jt="Expected a function";function Ft(e,t,n){var r=!0,o=!0;if(typeof e!="function")throw new TypeError(jt);return Tt(n)&&(r="leading"in n?!!n.leading:r,o="trailing"in n?!!n.trailing:o),Rt(e,t,{leading:r,maxWait:t,trailing:o})}var zt=Ft;const Ht=fe(zt);var Pt=M.div({position:"relative",maxWidth:250}),Lt=M(ue)({position:"absolute",zIndex:1,top:4,left:4}),qt=M.div({width:200,margin:5,".react-colorful__saturation":{borderRadius:"4px 4px 0 0"},".react-colorful__hue":{boxShadow:"inset 0 0 0 1px rgb(0 0 0 / 5%)"},".react-colorful__last-control":{borderRadius:"0 0 4px 4px"}}),Bt=M(Me)(({theme:e})=>({fontFamily:e.typography.fonts.base})),Wt=M.div({display:"grid",gridTemplateColumns:"repeat(9, 16px)",gap:6,padding:3,marginTop:5,width:200}),Xt=M.div(({theme:e,active:t})=>({width:16,height:16,boxShadow:t?`${e.appBorderColor} 0 0 0 1px inset, ${e.textMutedColor}50 0 0 0 4px`:`${e.appBorderColor} 0 0 0 1px inset`,borderRadius:e.appBorderRadius})),Dt=`url('data:image/svg+xml;charset=utf-8,')`,ie=({value:e,active:t,onClick:n,style:r,...o})=>{let a=`linear-gradient(${e}, ${e}), ${Dt}, linear-gradient(#fff, #fff)`;return h.createElement(Xt,{...o,active:t,onClick:n,style:{...r,backgroundImage:a}})},Kt=M(Ce.Input)(({theme:e})=>({width:"100%",paddingLeft:30,paddingRight:30,boxSizing:"border-box",fontFamily:e.typography.fonts.base})),Vt=M($e)(({theme:e})=>({position:"absolute",zIndex:1,top:6,right:7,width:20,height:20,padding:4,boxSizing:"border-box",cursor:"pointer",color:e.input.color})),Ee=(e=>(e.RGB="rgb",e.HSL="hsl",e.HEX="hex",e))(Ee||{}),P=Object.values(Ee),At=/\(([0-9]+),\s*([0-9]+)%?,\s*([0-9]+)%?,?\s*([0-9.]+)?\)/,Gt=/^\s*rgba?\(([0-9]+),\s*([0-9]+),\s*([0-9]+),?\s*([0-9.]+)?\)\s*$/i,Ut=/^\s*hsla?\(([0-9]+),\s*([0-9]+)%,\s*([0-9]+)%,?\s*([0-9.]+)?\)\s*$/i,Y=/^\s*#?([0-9a-f]{3}|[0-9a-f]{6})\s*$/i,Yt=/^\s*#?([0-9a-f]{3})\s*$/i,Jt={hex:De,rgb:Ue,hsl:Ae},L={hex:"transparent",rgb:"rgba(0, 0, 0, 0)",hsl:"hsla(0, 0%, 0%, 0)"},ce=e=>{let t=e==null?void 0:e.match(At);if(!t)return[0,0,0,1];let[,n,r,o,a=1]=t;return[n,r,o,a].map(Number)},I=e=>{if(!e)return;let t=!0;if(Gt.test(e)){let[s,l,i,c]=ce(e),[d,f,g]=w.rgb.hsl([s,l,i])||[0,0,0];return{valid:t,value:e,keyword:w.rgb.keyword([s,l,i]),colorSpace:"rgb",rgb:e,hsl:`hsla(${d}, ${f}%, ${g}%, ${c})`,hex:`#${w.rgb.hex([s,l,i]).toLowerCase()}`}}if(Ut.test(e)){let[s,l,i,c]=ce(e),[d,f,g]=w.hsl.rgb([s,l,i])||[0,0,0];return{valid:t,value:e,keyword:w.hsl.keyword([s,l,i]),colorSpace:"hsl",rgb:`rgba(${d}, ${f}, ${g}, ${c})`,hsl:e,hex:`#${w.hsl.hex([s,l,i]).toLowerCase()}`}}let n=e.replace("#",""),r=w.keyword.rgb(n)||w.hex.rgb(n),o=w.rgb.hsl(r),a=e;if(/[^#a-f0-9]/i.test(e)?a=n:Y.test(e)&&(a=`#${n}`),a.startsWith("#"))t=Y.test(a);else try{w.keyword.hex(a)}catch{t=!1}return{valid:t,value:a,keyword:w.rgb.keyword(r),colorSpace:"hex",rgb:`rgba(${r[0]}, ${r[1]}, ${r[2]}, 1)`,hsl:`hsla(${o[0]}, ${o[1]}%, ${o[2]}%, 1)`,hex:a}},Qt=(e,t,n)=>{if(!e||!(t!=null&&t.valid))return L[n];if(n!=="hex")return(t==null?void 0:t[n])||L[n];if(!t.hex.startsWith("#"))try{return`#${w.keyword.hex(t.hex)}`}catch{return L.hex}let r=t.hex.match(Yt);if(!r)return Y.test(t.hex)?t.hex:L.hex;let[o,a,s]=r[1].split("");return`#${o}${o}${a}${a}${s}${s}`},Zt=(e,t)=>{let[n,r]=b.useState(e||""),[o,a]=b.useState(()=>I(n)),[s,l]=b.useState((o==null?void 0:o.colorSpace)||"hex");b.useEffect(()=>{let f=e||"",g=I(f);r(f),a(g),l((g==null?void 0:g.colorSpace)||"hex")},[e]);let i=b.useMemo(()=>Qt(n,o,s).toLowerCase(),[n,o,s]),c=b.useCallback(f=>{let g=I(f),k=(g==null?void 0:g.value)||f||"";r(k),k===""&&(a(void 0),t(void 0)),g&&(a(g),l(g.colorSpace),t(g.value))},[t]),d=b.useCallback(()=>{let f=P.indexOf(s)+1;f>=P.length&&(f=0),l(P[f]);let g=(o==null?void 0:o[P[f]])||"";r(g),t(g)},[o,s,t]);return{value:n,realValue:i,updateValue:c,color:o,colorSpace:s,cycleColorSpace:d}},W=e=>e.replace(/\s*/,"").toLowerCase(),en=(e,t,n)=>{let[r,o]=b.useState(t!=null&&t.valid?[t]:[]);b.useEffect(()=>{t===void 0&&o([])},[t]);let a=b.useMemo(()=>(e||[]).map(l=>typeof l=="string"?I(l):l.title?{...I(l.color),keyword:l.title}:I(l.color)).concat(r).filter(Boolean).slice(-27),[e,r]),s=b.useCallback(l=>{l!=null&&l.valid&&(a.some(i=>W(i[n])===W(l[n]))||o(i=>i.concat(l)))},[n,a]);return{presets:a,addPreset:s}},tn=({name:e,value:t,onChange:n,onFocus:r,onBlur:o,presetColors:a,startOpen:s=!1})=>{let l=b.useCallback(Ht(n,200),[n]),{value:i,realValue:c,updateValue:d,color:f,colorSpace:g,cycleColorSpace:k}=Zt(t,l),{presets:N,addPreset:_}=en(a,f,g),p=Jt[g];return h.createElement(Pt,null,h.createElement(Lt,{startOpen:s,closeOnOutsideClick:!0,onVisibleChange:()=>_(f),tooltip:h.createElement(qt,null,h.createElement(p,{color:c==="transparent"?"#000000":c,onChange:d,onFocus:r,onBlur:o}),N.length>0&&h.createElement(Wt,null,N.map((m,x)=>h.createElement(ue,{key:`${m.value}-${x}`,hasChrome:!1,tooltip:h.createElement(Bt,{note:m.keyword||m.value})},h.createElement(ie,{value:m[g],active:f&&W(m[g])===W(f[g]),onClick:()=>d(m.value)})))))},h.createElement(ie,{value:c,style:{margin:4}})),h.createElement(Kt,{id:Ne(e),value:i,onChange:m=>d(m.target.value),onFocus:m=>m.target.select(),placeholder:"Choose color..."}),i?h.createElement(Vt,{icon:"markup",onClick:k}):null)},un=tn;export{tn as ColorControl,un as default}; diff --git a/docs/assets/DocsRenderer-NNNQARDV-C-m2nxR3.js b/docs/assets/DocsRenderer-NNNQARDV-vrgTUQKK.js similarity index 58% rename from docs/assets/DocsRenderer-NNNQARDV-C-m2nxR3.js rename to docs/assets/DocsRenderer-NNNQARDV-vrgTUQKK.js index b43b29173..3af1fd670 100644 --- a/docs/assets/DocsRenderer-NNNQARDV-C-m2nxR3.js +++ b/docs/assets/DocsRenderer-NNNQARDV-vrgTUQKK.js @@ -1 +1 @@ -import{D as a,d}from"./chunk-HLWAVYOI-mQySm71s.js";import"./iframe-buw_4q-p.js";import"../sb-preview/runtime.js";import"./_commonjsHelpers-5-cIlDoe.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";import"./index-xLzVGzoy.js";import"./index-PPLHz8o0.js";export{a as DocsRenderer,d as defaultComponents}; +import{D as a,d}from"./chunk-HLWAVYOI-H2VhgzR2.js";import"./iframe--l1y4VEe.js";import"../sb-preview/runtime.js";import"./_commonjsHelpers-5-cIlDoe.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";import"./index-xLzVGzoy.js";import"./index-PPLHz8o0.js";export{a as DocsRenderer,d as defaultComponents}; diff --git a/docs/assets/WithTooltip-V3YHNWJZ-pCRHT9Pt.js b/docs/assets/WithTooltip-V3YHNWJZ-CZ8Eb387.js similarity index 62% rename from docs/assets/WithTooltip-V3YHNWJZ-pCRHT9Pt.js rename to docs/assets/WithTooltip-V3YHNWJZ-CZ8Eb387.js index 416cfb4af..e36ff1ec0 100644 --- a/docs/assets/WithTooltip-V3YHNWJZ-pCRHT9Pt.js +++ b/docs/assets/WithTooltip-V3YHNWJZ-CZ8Eb387.js @@ -1 +1 @@ -import{W as T,W as e,a as h}from"./chunk-HLWAVYOI-mQySm71s.js";import"./iframe-buw_4q-p.js";import"../sb-preview/runtime.js";import"./_commonjsHelpers-5-cIlDoe.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";import"./index-xLzVGzoy.js";import"./index-PPLHz8o0.js";export{T as WithToolTipState,e as WithTooltip,h as WithTooltipPure}; +import{W as T,W as e,a as h}from"./chunk-HLWAVYOI-H2VhgzR2.js";import"./iframe--l1y4VEe.js";import"../sb-preview/runtime.js";import"./_commonjsHelpers-5-cIlDoe.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";import"./index-xLzVGzoy.js";import"./index-PPLHz8o0.js";export{T as WithToolTipState,e as WithTooltip,h as WithTooltipPure}; diff --git a/docs/assets/building-blocks.stories-y9ZykhdQ.js b/docs/assets/building-blocks.stories-3F1Gyd2x.js similarity index 85% rename from docs/assets/building-blocks.stories-y9ZykhdQ.js rename to docs/assets/building-blocks.stories-3F1Gyd2x.js index 719a976e4..0795b6b03 100644 --- a/docs/assets/building-blocks.stories-y9ZykhdQ.js +++ b/docs/assets/building-blocks.stories-3F1Gyd2x.js @@ -1,3 +1,3 @@ -import{M as a}from"./chunk-HLWAVYOI-mQySm71s.js";import{j as e}from"./jsx-runtime-YczOOcRK.js";import{u as s}from"./index-67XRIn5y.js";import"./iframe-buw_4q-p.js";import"../sb-preview/runtime.js";import"./_commonjsHelpers-5-cIlDoe.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";import"./index-xLzVGzoy.js";import"./index-PPLHz8o0.js";function r(t){const o=Object.assign({h1:"h1",p:"p"},s(),t.components);return e.jsxs(e.Fragment,{children:[e.jsx(a,{title:"building blocks/Overview"}),` +import{M as a}from"./chunk-HLWAVYOI-H2VhgzR2.js";import{j as e}from"./jsx-runtime-g3jUguhN.js";import{u as s}from"./index-4jv1rO9F.js";import"./iframe--l1y4VEe.js";import"../sb-preview/runtime.js";import"./_commonjsHelpers-5-cIlDoe.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";import"./index-xLzVGzoy.js";import"./index-PPLHz8o0.js";function r(t){const o=Object.assign({h1:"h1",p:"p"},s(),t.components);return e.jsxs(e.Fragment,{children:[e.jsx(a,{title:"building blocks/Overview"}),` `,e.jsx(o.h1,{id:"building-block-components",children:"Building Block Components"}),` `,e.jsx(o.p,{children:"These are components that were used as a part of larger, more complicated components. It is generally recommended to refrain from using these components and instead discover their fully built counterparts, but you may use these to build larger components if necessary."})]})}function i(t={}){const{wrapper:o}=Object.assign({},s(),t.components);return o?e.jsx(o,{...t,children:e.jsx(r,{...t})}):r(t)}const c=()=>{throw new Error("Docs-only story")};c.parameters={docsOnly:!0};const n={title:"building blocks/Overview",tags:["stories-mdx"],includeStories:["__page"]};n.parameters=n.parameters||{};n.parameters.docs={...n.parameters.docs||{},page:i};const f=["__page"];export{f as __namedExportsOrder,c as __page,n as default}; diff --git a/docs/assets/buttons.stories-oUh8kaBX.js b/docs/assets/buttons.stories-rFynn3K1.js similarity index 82% rename from docs/assets/buttons.stories-oUh8kaBX.js rename to docs/assets/buttons.stories-rFynn3K1.js index 984b4d8d4..e35aa4731 100644 --- a/docs/assets/buttons.stories-oUh8kaBX.js +++ b/docs/assets/buttons.stories-rFynn3K1.js @@ -1,3 +1,3 @@ -import{M as a}from"./chunk-HLWAVYOI-mQySm71s.js";import{j as t}from"./jsx-runtime-YczOOcRK.js";import{u as s}from"./index-67XRIn5y.js";import"./iframe-buw_4q-p.js";import"../sb-preview/runtime.js";import"./_commonjsHelpers-5-cIlDoe.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";import"./index-xLzVGzoy.js";import"./index-PPLHz8o0.js";function r(e){const o=Object.assign({h1:"h1",p:"p"},s(),e.components);return t.jsxs(t.Fragment,{children:[t.jsx(a,{title:"buttons/Overview"}),` +import{M as a}from"./chunk-HLWAVYOI-H2VhgzR2.js";import{j as t}from"./jsx-runtime-g3jUguhN.js";import{u as s}from"./index-4jv1rO9F.js";import"./iframe--l1y4VEe.js";import"../sb-preview/runtime.js";import"./_commonjsHelpers-5-cIlDoe.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";import"./index-xLzVGzoy.js";import"./index-PPLHz8o0.js";function r(e){const o=Object.assign({h1:"h1",p:"p"},s(),e.components);return t.jsxs(t.Fragment,{children:[t.jsx(a,{title:"buttons/Overview"}),` `,t.jsx(o.h1,{id:"button-components",children:"Button Components"}),` `,t.jsx(o.p,{children:"All components that are triggered by a button are contained within this category."})]})}function i(e={}){const{wrapper:o}=Object.assign({},s(),e.components);return o?t.jsx(o,{...e,children:t.jsx(r,{...e})}):r(e)}const m=()=>{throw new Error("Docs-only story")};m.parameters={docsOnly:!0};const n={title:"buttons/Overview",tags:["stories-mdx"],includeStories:["__page"]};n.parameters=n.parameters||{};n.parameters.docs={...n.parameters.docs||{},page:i};const _=["__page"];export{_ as __namedExportsOrder,m as __page,n as default}; diff --git a/docs/assets/chunk-HLWAVYOI-mQySm71s.js b/docs/assets/chunk-HLWAVYOI-H2VhgzR2.js similarity index 99% rename from docs/assets/chunk-HLWAVYOI-mQySm71s.js rename to docs/assets/chunk-HLWAVYOI-H2VhgzR2.js index 7741290f8..0faf8c1b4 100644 --- a/docs/assets/chunk-HLWAVYOI-mQySm71s.js +++ b/docs/assets/chunk-HLWAVYOI-H2VhgzR2.js @@ -1,4 +1,4 @@ -import{_ as Jr}from"./iframe-buw_4q-p.js";import{g as Fa,c as Uu}from"./_commonjsHelpers-5-cIlDoe.js";import{c as vl}from"./_commonjs-dynamic-modules-h-SxKiO4.js";import{b as nn,c as q2,d as T0,f as W2,g as Iv,h as G2,j as R0,k as Nv,l as jv,m as Xi,n as $0,i as el,a as K2,o as Hv,p as Zv,q as zv,r as Vv,s as Uv,t as qv,u as Y2,v as Wv,w as Gv,_ as Kv,x as Yv,y as Xv,z as X2,A as Q2,B as j1,C as Xs,S as qu}from"./index-xLzVGzoy.js";import{d as Qe}from"./index-PPLHz8o0.js";function Qv(e,t){for(var r=0;rn[a]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}var J2={exports:{}},Y={};/** +import{_ as Jr}from"./iframe--l1y4VEe.js";import{g as Fa,c as Uu}from"./_commonjsHelpers-5-cIlDoe.js";import{c as vl}from"./_commonjs-dynamic-modules-h-SxKiO4.js";import{b as nn,c as q2,d as T0,f as W2,g as Iv,h as G2,j as R0,k as Nv,l as jv,m as Xi,n as $0,i as el,a as K2,o as Hv,p as Zv,q as zv,r as Vv,s as Uv,t as qv,u as Y2,v as Wv,w as Gv,_ as Kv,x as Yv,y as Xv,z as X2,A as Q2,B as j1,C as Xs,S as qu}from"./index-xLzVGzoy.js";import{d as Qe}from"./index-PPLHz8o0.js";function Qv(e,t){for(var r=0;rn[a]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}var J2={exports:{}},Y={};/** * @license React * react.production.min.js * @@ -257,9 +257,9 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho path { fill: currentColor; } -`,We=({icon:e,useSymbol:t,...r})=>i.createElement(Gh,{viewBox:"0 0 14 14",width:"14px",height:"14px",...r},t?i.createElement("use",{xlinkHref:`#icon--${e}`}):Yo[e]),NS=x.memo(function({icons:e=Object.keys(Yo)}){return i.createElement(Gh,{viewBox:"0 0 14 14",style:{position:"absolute",width:0,height:0},"data-chromatic":"ignore"},e.map(t=>i.createElement("symbol",{id:`icon--${t}`,key:t},Yo[t])))}),jS=0,HS=e=>e.button===jS&&!e.altKey&&!e.ctrlKey&&!e.metaKey&&!e.shiftKey,ZS=(e,t)=>{HS(e)&&(e.preventDefault(),t(e))},zS=T.span(({withArrow:e})=>e?{"> svg:last-of-type":{height:"0.7em",width:"0.7em",marginRight:0,marginLeft:"0.25em",bottom:"auto",verticalAlign:"inherit"}}:{},({containsIcon:e})=>e?{svg:{height:"1em",width:"1em",verticalAlign:"middle",position:"relative",bottom:0,marginRight:0}}:{}),VS=T.a(({theme:e})=>({display:"inline-block",transition:"all 150ms ease-out",textDecoration:"none",color:e.color.secondary,"&:hover, &:focus":{cursor:"pointer",color:la(.07,e.color.secondary),"svg path:not([fill])":{fill:la(.07,e.color.secondary)}},"&:active":{color:la(.1,e.color.secondary),"svg path:not([fill])":{fill:la(.1,e.color.secondary)}},svg:{display:"inline-block",height:"1em",width:"1em",verticalAlign:"text-top",position:"relative",bottom:"-0.125em",marginRight:"0.4em","& path":{fill:e.color.secondary}}}),({theme:e,secondary:t,tertiary:r})=>{let n;return t&&(n=[e.textMutedColor,e.color.dark,e.color.darker]),r&&(n=[e.color.dark,e.color.darkest,e.textMutedColor]),n?{color:n[0],"svg path:not([fill])":{fill:n[0]},"&:hover":{color:n[1],"svg path:not([fill])":{fill:n[1]}},"&:active":{color:n[2],"svg path:not([fill])":{fill:n[2]}}}:{}},({nochrome:e})=>e?{color:"inherit","&:hover, &:active":{color:"inherit",textDecoration:"underline"}}:{},({theme:e,inverse:t})=>t?{color:e.color.lightest,":not([fill])":{fill:e.color.lightest},"&:hover":{color:e.color.lighter,"svg path:not([fill])":{fill:e.color.lighter}},"&:active":{color:e.color.light,"svg path:not([fill])":{fill:e.color.light}}}:{},({isButton:e})=>e?{border:0,borderRadius:0,background:"none",padding:0,fontSize:"inherit"}:{}),Qr=({cancel:e,children:t,onClick:r,withArrow:n,containsIcon:a,className:o,...l})=>i.createElement(VS,{...l,onClick:r&&e?s=>ZS(s,r):r,className:o},i.createElement(zS,{withArrow:n,containsIcon:a},t,n&&i.createElement(We,{icon:"arrowright"})));Qr.defaultProps={cancel:!0,className:void 0,style:void 0,onClick:void 0,withArrow:!1,containsIcon:!1};var US=T.div(({theme:e})=>({fontSize:`${e.typography.size.s2}px`,lineHeight:"1.6",h1:{fontSize:`${e.typography.size.l1}px`,fontWeight:e.typography.weight.bold},h2:{fontSize:`${e.typography.size.m2}px`,borderBottom:`1px solid ${e.appBorderColor}`},h3:{fontSize:`${e.typography.size.m1}px`},h4:{fontSize:`${e.typography.size.s3}px`},h5:{fontSize:`${e.typography.size.s2}px`},h6:{fontSize:`${e.typography.size.s2}px`,color:e.color.dark},"pre:not(.prismjs)":{background:"transparent",border:"none",borderRadius:0,padding:0,margin:0},"pre pre, pre.prismjs":{padding:15,margin:0,whiteSpace:"pre-wrap",color:"inherit",fontSize:"13px",lineHeight:"19px"},"pre pre code, pre.prismjs code":{color:"inherit",fontSize:"inherit"},"pre code":{margin:0,padding:0,whiteSpace:"pre",border:"none",background:"transparent"},"pre code, pre tt":{backgroundColor:"transparent",border:"none"},"body > *:first-of-type":{marginTop:"0 !important"},"body > *:last-child":{marginBottom:"0 !important"},a:{color:e.color.secondary,textDecoration:"none"},"a.absent":{color:"#cc0000"},"a.anchor":{display:"block",paddingLeft:30,marginLeft:-30,cursor:"pointer",position:"absolute",top:0,left:0,bottom:0},"h1, h2, h3, h4, h5, h6":{margin:"20px 0 10px",padding:0,cursor:"text",position:"relative","&:first-of-type":{marginTop:0,paddingTop:0},"&:hover a.anchor":{textDecoration:"none"},"& tt, & code":{fontSize:"inherit"}},"h1:first-of-type + h2":{marginTop:0,paddingTop:0},"p, blockquote, ul, ol, dl, li, table, pre":{margin:"15px 0"},hr:{border:"0 none",borderTop:`1px solid ${e.appBorderColor}`,height:4,padding:0},"body > h1:first-of-type, body > h2:first-of-type, body > h3:first-of-type, body > h4:first-of-type, body > h5:first-of-type, body > h6:first-of-type":{marginTop:0,paddingTop:0},"body > h1:first-of-type + h2":{marginTop:0,paddingTop:0},"a:first-of-type h1, a:first-of-type h2, a:first-of-type h3, a:first-of-type h4, a:first-of-type h5, a:first-of-type h6":{marginTop:0,paddingTop:0},"h1 p, h2 p, h3 p, h4 p, h5 p, h6 p":{marginTop:0},"li p.first":{display:"inline-block"},"ul, ol":{paddingLeft:30,"& :first-of-type":{marginTop:0},"& :last-child":{marginBottom:0}},dl:{padding:0},"dl dt":{fontSize:"14px",fontWeight:"bold",fontStyle:"italic",margin:"0 0 15px",padding:"0 15px","&:first-of-type":{padding:0},"& > :first-of-type":{marginTop:0},"& > :last-child":{marginBottom:0}},blockquote:{borderLeft:`4px solid ${e.color.medium}`,padding:"0 15px",color:e.color.dark,"& > :first-of-type":{marginTop:0},"& > :last-child":{marginBottom:0}},table:{padding:0,borderCollapse:"collapse","& tr":{borderTop:`1px solid ${e.appBorderColor}`,backgroundColor:"white",margin:0,padding:0,"& th":{fontWeight:"bold",border:`1px solid ${e.appBorderColor}`,textAlign:"left",margin:0,padding:"6px 13px"},"& td":{border:`1px solid ${e.appBorderColor}`,textAlign:"left",margin:0,padding:"6px 13px"},"&:nth-of-type(2n)":{backgroundColor:e.color.lighter},"& th :first-of-type, & td :first-of-type":{marginTop:0},"& th :last-child, & td :last-child":{marginBottom:0}}},img:{maxWidth:"100%"},"span.frame":{display:"block",overflow:"hidden","& > span":{border:`1px solid ${e.color.medium}`,display:"block",float:"left",overflow:"hidden",margin:"13px 0 0",padding:7,width:"auto"},"& span img":{display:"block",float:"left"},"& span span":{clear:"both",color:e.color.darkest,display:"block",padding:"5px 0 0"}},"span.align-center":{display:"block",overflow:"hidden",clear:"both","& > span":{display:"block",overflow:"hidden",margin:"13px auto 0",textAlign:"center"},"& span img":{margin:"0 auto",textAlign:"center"}},"span.align-right":{display:"block",overflow:"hidden",clear:"both","& > span":{display:"block",overflow:"hidden",margin:"13px 0 0",textAlign:"right"},"& span img":{margin:0,textAlign:"right"}},"span.float-left":{display:"block",marginRight:13,overflow:"hidden",float:"left","& span":{margin:"13px 0 0"}},"span.float-right":{display:"block",marginLeft:13,overflow:"hidden",float:"right","& > span":{display:"block",overflow:"hidden",margin:"13px auto 0",textAlign:"right"}},"code, tt":{margin:"0 2px",padding:"0 5px",whiteSpace:"nowrap",border:`1px solid ${e.color.mediumlight}`,backgroundColor:e.color.lighter,borderRadius:3,color:e.base==="dark"&&e.color.darkest}})),On=[],Ta=null,qS=x.lazy(async()=>{let{SyntaxHighlighter:e}=await Jr(()=>import("./syntaxhighlighter-V7JZZA35-pXt8-oeo.js"),__vite__mapDeps([0,1,2,3,4,5]),import.meta.url);return On.length>0&&(On.forEach(t=>{e.registerLanguage(...t)}),On=[]),Ta===null&&(Ta=e),{default:t=>i.createElement(e,{...t})}}),WS=x.lazy(async()=>{let[{SyntaxHighlighter:e},{formatter:t}]=await Promise.all([Jr(()=>import("./syntaxhighlighter-V7JZZA35-pXt8-oeo.js"),__vite__mapDeps([0,1,2,3,4,5]),import.meta.url),Jr(()=>import("./formatter-SWP5E3XI-bMS14_IU.js"),__vite__mapDeps([6,1,2,3,4,5]),import.meta.url)]);return On.length>0&&(On.forEach(r=>{e.registerLanguage(...r)}),On=[]),Ta===null&&(Ta=e),{default:r=>i.createElement(e,{...r,formatter:t})}}),Ou=e=>i.createElement(x.Suspense,{fallback:i.createElement("div",null)},e.format!==!1?i.createElement(WS,{...e}):i.createElement(qS,{...e}));Ou.registerLanguage=(...e)=>{if(Ta!==null){Ta.registerLanguage(...e);return}On.push(e)};var GS=e=>typeof e=="number"?e:Number(e),KS=T.div(({theme:e,col:t,row:r=1})=>t?{display:"inline-block",verticalAlign:"inherit","& > *":{marginLeft:t*e.layoutMargin,verticalAlign:"inherit"},[`& > *:first-child${t0}`]:{marginLeft:0}}:{"& > *":{marginTop:r*e.layoutMargin},[`& > *:first-child${t0}`]:{marginTop:0}},({theme:e,outer:t,col:r,row:n})=>{switch(!0){case!!(t&&r):return{marginLeft:t*e.layoutMargin,marginRight:t*e.layoutMargin};case!!(t&&n):return{marginTop:t*e.layoutMargin,marginBottom:t*e.layoutMargin};default:return{}}}),YS=({col:e,row:t,outer:r,children:n,...a})=>{let o=GS(typeof r=="number"||!r?r:e||t);return i.createElement(KS,{col:e,row:t,outer:o,...a},n)},XS=T.div(({theme:e})=>({fontWeight:e.typography.weight.bold})),QS=T.div(),JS=T.div(({theme:e})=>({padding:30,textAlign:"center",color:e.color.defaultText,fontSize:e.typography.size.s2-1})),Kh=({children:e,...t})=>{let[r,n]=x.Children.toArray(e);return i.createElement(JS,{...t},i.createElement(XS,null,r),n&&i.createElement(QS,null,n))},e9=T.div(({scale:e=1,elementHeight:t})=>({height:t||"auto",transformOrigin:"top left",transform:`scale(${1/e})`}));function t9({scale:e,children:t}){let r=x.useRef(null),[n,a]=x.useState(0),o=x.useCallback(({height:l})=>{l&&a(l/e)},[e]);return x.useEffect(()=>{r.current&&a(r.current.getBoundingClientRect().height)},[e]),wh({ref:r,onResize:o}),i.createElement(e9,{scale:e,elementHeight:n},i.createElement("div",{ref:r,className:"innerZoomElementWrapper"},t))}var r9=class extends x.Component{constructor(){super(...arguments),this.iframe=null}componentDidMount(){let{iFrameRef:e}=this.props;this.iframe=e.current}shouldComponentUpdate(e){let{scale:t,active:r}=this.props;return t!==e.scale&&this.setIframeInnerZoom(e.scale),r!==e.active&&this.iframe.setAttribute("data-is-storybook",e.active?"true":"false"),e.children.props.src!==this.props.children.props.src}setIframeInnerZoom(e){try{Object.assign(this.iframe.contentDocument.body.style,{width:`${e*100}%`,height:`${e*100}%`,transform:`scale(${1/e})`,transformOrigin:"top left"})}catch{this.setIframeZoom(e)}}setIframeZoom(e){Object.assign(this.iframe.style,{width:`${e*100}%`,height:`${e*100}%`,transform:`scale(${1/e})`,transformOrigin:"top left"})}render(){let{children:e}=this.props;return i.createElement(i.Fragment,null,e)}},Yh={Element:t9,IFrame:r9},{document:n9}=eS,a9=T.strong(({theme:e})=>({color:e.color.orange})),o9=T.strong(({theme:e})=>({color:e.color.ancillary,textDecoration:"underline"})),Zf=T.em(({theme:e})=>({color:e.textMutedColor})),l9=/(Error): (.*)\n/,i9=/at (?:(.*) )?\(?(.+)\)?/,u9=/([^@]+)?(?:\/<)?@(.+)?/,s9=/([^@]+)?@(.+)?/,Xh=({error:e})=>{if(!e)return i.createElement(x.Fragment,null,"This error has no stack or message");if(!e.stack)return i.createElement(x.Fragment,null,e.message||"This error has no stack or message");let t=e.stack.toString();t&&e.message&&!t.includes(e.message)&&(t=`Error: ${e.message} +`,We=({icon:e,useSymbol:t,...r})=>i.createElement(Gh,{viewBox:"0 0 14 14",width:"14px",height:"14px",...r},t?i.createElement("use",{xlinkHref:`#icon--${e}`}):Yo[e]),NS=x.memo(function({icons:e=Object.keys(Yo)}){return i.createElement(Gh,{viewBox:"0 0 14 14",style:{position:"absolute",width:0,height:0},"data-chromatic":"ignore"},e.map(t=>i.createElement("symbol",{id:`icon--${t}`,key:t},Yo[t])))}),jS=0,HS=e=>e.button===jS&&!e.altKey&&!e.ctrlKey&&!e.metaKey&&!e.shiftKey,ZS=(e,t)=>{HS(e)&&(e.preventDefault(),t(e))},zS=T.span(({withArrow:e})=>e?{"> svg:last-of-type":{height:"0.7em",width:"0.7em",marginRight:0,marginLeft:"0.25em",bottom:"auto",verticalAlign:"inherit"}}:{},({containsIcon:e})=>e?{svg:{height:"1em",width:"1em",verticalAlign:"middle",position:"relative",bottom:0,marginRight:0}}:{}),VS=T.a(({theme:e})=>({display:"inline-block",transition:"all 150ms ease-out",textDecoration:"none",color:e.color.secondary,"&:hover, &:focus":{cursor:"pointer",color:la(.07,e.color.secondary),"svg path:not([fill])":{fill:la(.07,e.color.secondary)}},"&:active":{color:la(.1,e.color.secondary),"svg path:not([fill])":{fill:la(.1,e.color.secondary)}},svg:{display:"inline-block",height:"1em",width:"1em",verticalAlign:"text-top",position:"relative",bottom:"-0.125em",marginRight:"0.4em","& path":{fill:e.color.secondary}}}),({theme:e,secondary:t,tertiary:r})=>{let n;return t&&(n=[e.textMutedColor,e.color.dark,e.color.darker]),r&&(n=[e.color.dark,e.color.darkest,e.textMutedColor]),n?{color:n[0],"svg path:not([fill])":{fill:n[0]},"&:hover":{color:n[1],"svg path:not([fill])":{fill:n[1]}},"&:active":{color:n[2],"svg path:not([fill])":{fill:n[2]}}}:{}},({nochrome:e})=>e?{color:"inherit","&:hover, &:active":{color:"inherit",textDecoration:"underline"}}:{},({theme:e,inverse:t})=>t?{color:e.color.lightest,":not([fill])":{fill:e.color.lightest},"&:hover":{color:e.color.lighter,"svg path:not([fill])":{fill:e.color.lighter}},"&:active":{color:e.color.light,"svg path:not([fill])":{fill:e.color.light}}}:{},({isButton:e})=>e?{border:0,borderRadius:0,background:"none",padding:0,fontSize:"inherit"}:{}),Qr=({cancel:e,children:t,onClick:r,withArrow:n,containsIcon:a,className:o,...l})=>i.createElement(VS,{...l,onClick:r&&e?s=>ZS(s,r):r,className:o},i.createElement(zS,{withArrow:n,containsIcon:a},t,n&&i.createElement(We,{icon:"arrowright"})));Qr.defaultProps={cancel:!0,className:void 0,style:void 0,onClick:void 0,withArrow:!1,containsIcon:!1};var US=T.div(({theme:e})=>({fontSize:`${e.typography.size.s2}px`,lineHeight:"1.6",h1:{fontSize:`${e.typography.size.l1}px`,fontWeight:e.typography.weight.bold},h2:{fontSize:`${e.typography.size.m2}px`,borderBottom:`1px solid ${e.appBorderColor}`},h3:{fontSize:`${e.typography.size.m1}px`},h4:{fontSize:`${e.typography.size.s3}px`},h5:{fontSize:`${e.typography.size.s2}px`},h6:{fontSize:`${e.typography.size.s2}px`,color:e.color.dark},"pre:not(.prismjs)":{background:"transparent",border:"none",borderRadius:0,padding:0,margin:0},"pre pre, pre.prismjs":{padding:15,margin:0,whiteSpace:"pre-wrap",color:"inherit",fontSize:"13px",lineHeight:"19px"},"pre pre code, pre.prismjs code":{color:"inherit",fontSize:"inherit"},"pre code":{margin:0,padding:0,whiteSpace:"pre",border:"none",background:"transparent"},"pre code, pre tt":{backgroundColor:"transparent",border:"none"},"body > *:first-of-type":{marginTop:"0 !important"},"body > *:last-child":{marginBottom:"0 !important"},a:{color:e.color.secondary,textDecoration:"none"},"a.absent":{color:"#cc0000"},"a.anchor":{display:"block",paddingLeft:30,marginLeft:-30,cursor:"pointer",position:"absolute",top:0,left:0,bottom:0},"h1, h2, h3, h4, h5, h6":{margin:"20px 0 10px",padding:0,cursor:"text",position:"relative","&:first-of-type":{marginTop:0,paddingTop:0},"&:hover a.anchor":{textDecoration:"none"},"& tt, & code":{fontSize:"inherit"}},"h1:first-of-type + h2":{marginTop:0,paddingTop:0},"p, blockquote, ul, ol, dl, li, table, pre":{margin:"15px 0"},hr:{border:"0 none",borderTop:`1px solid ${e.appBorderColor}`,height:4,padding:0},"body > h1:first-of-type, body > h2:first-of-type, body > h3:first-of-type, body > h4:first-of-type, body > h5:first-of-type, body > h6:first-of-type":{marginTop:0,paddingTop:0},"body > h1:first-of-type + h2":{marginTop:0,paddingTop:0},"a:first-of-type h1, a:first-of-type h2, a:first-of-type h3, a:first-of-type h4, a:first-of-type h5, a:first-of-type h6":{marginTop:0,paddingTop:0},"h1 p, h2 p, h3 p, h4 p, h5 p, h6 p":{marginTop:0},"li p.first":{display:"inline-block"},"ul, ol":{paddingLeft:30,"& :first-of-type":{marginTop:0},"& :last-child":{marginBottom:0}},dl:{padding:0},"dl dt":{fontSize:"14px",fontWeight:"bold",fontStyle:"italic",margin:"0 0 15px",padding:"0 15px","&:first-of-type":{padding:0},"& > :first-of-type":{marginTop:0},"& > :last-child":{marginBottom:0}},blockquote:{borderLeft:`4px solid ${e.color.medium}`,padding:"0 15px",color:e.color.dark,"& > :first-of-type":{marginTop:0},"& > :last-child":{marginBottom:0}},table:{padding:0,borderCollapse:"collapse","& tr":{borderTop:`1px solid ${e.appBorderColor}`,backgroundColor:"white",margin:0,padding:0,"& th":{fontWeight:"bold",border:`1px solid ${e.appBorderColor}`,textAlign:"left",margin:0,padding:"6px 13px"},"& td":{border:`1px solid ${e.appBorderColor}`,textAlign:"left",margin:0,padding:"6px 13px"},"&:nth-of-type(2n)":{backgroundColor:e.color.lighter},"& th :first-of-type, & td :first-of-type":{marginTop:0},"& th :last-child, & td :last-child":{marginBottom:0}}},img:{maxWidth:"100%"},"span.frame":{display:"block",overflow:"hidden","& > span":{border:`1px solid ${e.color.medium}`,display:"block",float:"left",overflow:"hidden",margin:"13px 0 0",padding:7,width:"auto"},"& span img":{display:"block",float:"left"},"& span span":{clear:"both",color:e.color.darkest,display:"block",padding:"5px 0 0"}},"span.align-center":{display:"block",overflow:"hidden",clear:"both","& > span":{display:"block",overflow:"hidden",margin:"13px auto 0",textAlign:"center"},"& span img":{margin:"0 auto",textAlign:"center"}},"span.align-right":{display:"block",overflow:"hidden",clear:"both","& > span":{display:"block",overflow:"hidden",margin:"13px 0 0",textAlign:"right"},"& span img":{margin:0,textAlign:"right"}},"span.float-left":{display:"block",marginRight:13,overflow:"hidden",float:"left","& span":{margin:"13px 0 0"}},"span.float-right":{display:"block",marginLeft:13,overflow:"hidden",float:"right","& > span":{display:"block",overflow:"hidden",margin:"13px auto 0",textAlign:"right"}},"code, tt":{margin:"0 2px",padding:"0 5px",whiteSpace:"nowrap",border:`1px solid ${e.color.mediumlight}`,backgroundColor:e.color.lighter,borderRadius:3,color:e.base==="dark"&&e.color.darkest}})),On=[],Ta=null,qS=x.lazy(async()=>{let{SyntaxHighlighter:e}=await Jr(()=>import("./syntaxhighlighter-V7JZZA35-o-V-ZA-0.js"),__vite__mapDeps([0,1,2,3,4,5]),import.meta.url);return On.length>0&&(On.forEach(t=>{e.registerLanguage(...t)}),On=[]),Ta===null&&(Ta=e),{default:t=>i.createElement(e,{...t})}}),WS=x.lazy(async()=>{let[{SyntaxHighlighter:e},{formatter:t}]=await Promise.all([Jr(()=>import("./syntaxhighlighter-V7JZZA35-o-V-ZA-0.js"),__vite__mapDeps([0,1,2,3,4,5]),import.meta.url),Jr(()=>import("./formatter-SWP5E3XI-MxGObe6j.js"),__vite__mapDeps([6,1,2,3,4,5]),import.meta.url)]);return On.length>0&&(On.forEach(r=>{e.registerLanguage(...r)}),On=[]),Ta===null&&(Ta=e),{default:r=>i.createElement(e,{...r,formatter:t})}}),Ou=e=>i.createElement(x.Suspense,{fallback:i.createElement("div",null)},e.format!==!1?i.createElement(WS,{...e}):i.createElement(qS,{...e}));Ou.registerLanguage=(...e)=>{if(Ta!==null){Ta.registerLanguage(...e);return}On.push(e)};var GS=e=>typeof e=="number"?e:Number(e),KS=T.div(({theme:e,col:t,row:r=1})=>t?{display:"inline-block",verticalAlign:"inherit","& > *":{marginLeft:t*e.layoutMargin,verticalAlign:"inherit"},[`& > *:first-child${t0}`]:{marginLeft:0}}:{"& > *":{marginTop:r*e.layoutMargin},[`& > *:first-child${t0}`]:{marginTop:0}},({theme:e,outer:t,col:r,row:n})=>{switch(!0){case!!(t&&r):return{marginLeft:t*e.layoutMargin,marginRight:t*e.layoutMargin};case!!(t&&n):return{marginTop:t*e.layoutMargin,marginBottom:t*e.layoutMargin};default:return{}}}),YS=({col:e,row:t,outer:r,children:n,...a})=>{let o=GS(typeof r=="number"||!r?r:e||t);return i.createElement(KS,{col:e,row:t,outer:o,...a},n)},XS=T.div(({theme:e})=>({fontWeight:e.typography.weight.bold})),QS=T.div(),JS=T.div(({theme:e})=>({padding:30,textAlign:"center",color:e.color.defaultText,fontSize:e.typography.size.s2-1})),Kh=({children:e,...t})=>{let[r,n]=x.Children.toArray(e);return i.createElement(JS,{...t},i.createElement(XS,null,r),n&&i.createElement(QS,null,n))},e9=T.div(({scale:e=1,elementHeight:t})=>({height:t||"auto",transformOrigin:"top left",transform:`scale(${1/e})`}));function t9({scale:e,children:t}){let r=x.useRef(null),[n,a]=x.useState(0),o=x.useCallback(({height:l})=>{l&&a(l/e)},[e]);return x.useEffect(()=>{r.current&&a(r.current.getBoundingClientRect().height)},[e]),wh({ref:r,onResize:o}),i.createElement(e9,{scale:e,elementHeight:n},i.createElement("div",{ref:r,className:"innerZoomElementWrapper"},t))}var r9=class extends x.Component{constructor(){super(...arguments),this.iframe=null}componentDidMount(){let{iFrameRef:e}=this.props;this.iframe=e.current}shouldComponentUpdate(e){let{scale:t,active:r}=this.props;return t!==e.scale&&this.setIframeInnerZoom(e.scale),r!==e.active&&this.iframe.setAttribute("data-is-storybook",e.active?"true":"false"),e.children.props.src!==this.props.children.props.src}setIframeInnerZoom(e){try{Object.assign(this.iframe.contentDocument.body.style,{width:`${e*100}%`,height:`${e*100}%`,transform:`scale(${1/e})`,transformOrigin:"top left"})}catch{this.setIframeZoom(e)}}setIframeZoom(e){Object.assign(this.iframe.style,{width:`${e*100}%`,height:`${e*100}%`,transform:`scale(${1/e})`,transformOrigin:"top left"})}render(){let{children:e}=this.props;return i.createElement(i.Fragment,null,e)}},Yh={Element:t9,IFrame:r9},{document:n9}=eS,a9=T.strong(({theme:e})=>({color:e.color.orange})),o9=T.strong(({theme:e})=>({color:e.color.ancillary,textDecoration:"underline"})),Zf=T.em(({theme:e})=>({color:e.textMutedColor})),l9=/(Error): (.*)\n/,i9=/at (?:(.*) )?\(?(.+)\)?/,u9=/([^@]+)?(?:\/<)?@(.+)?/,s9=/([^@]+)?@(.+)?/,Xh=({error:e})=>{if(!e)return i.createElement(x.Fragment,null,"This error has no stack or message");if(!e.stack)return i.createElement(x.Fragment,null,e.message||"This error has no stack or message");let t=e.stack.toString();t&&e.message&&!t.includes(e.message)&&(t=`Error: ${e.message} -${t}`);let r=t.match(l9);if(!r)return i.createElement(x.Fragment,null,t);let[,n,a]=r,o=t.split(/\n/).slice(1),[,...l]=o.map(s=>{let u=s.match(i9)||s.match(u9)||s.match(s9);return u?{name:(u[1]||"").replace("/<",""),location:u[2].replace(n9.location.origin,"")}:null}).filter(Boolean);return i.createElement(x.Fragment,null,i.createElement("span",null,n),": ",i.createElement(a9,null,a),i.createElement("br",null),l.map((s,u)=>s.name?i.createElement(x.Fragment,{key:u}," ","at ",i.createElement(o9,null,s.name)," (",i.createElement(Zf,null,s.location),")",i.createElement("br",null)):i.createElement(x.Fragment,{key:u}," ","at ",i.createElement(Zf,null,s.location),i.createElement("br",null))))},Qh=T.button(({small:e,theme:t})=>({border:0,borderRadius:"3em",cursor:"pointer",display:"inline-block",overflow:"hidden",padding:e?"8px 16px":"13px 20px",position:"relative",textAlign:"center",textDecoration:"none",transitionProperty:"background, box-shadow",transitionDuration:"150ms",transitionTimingFunction:"ease-out",verticalAlign:"top",whiteSpace:"nowrap",userSelect:"none",opacity:1,margin:0,background:"transparent",fontSize:`${e?t.typography.size.s1:t.typography.size.s2-1}px`,fontWeight:t.typography.weight.bold,lineHeight:"1",svg:{display:"inline-block",height:e?12:14,width:e?12:14,verticalAlign:"top",marginRight:e?4:6,marginTop:e?0:-1,marginBottom:e?0:-1,pointerEvents:"none",path:{fill:"currentColor"}}}),({disabled:e})=>e?{cursor:"not-allowed !important",opacity:.5,"&:hover":{transform:"none"}}:{},({containsIcon:e,small:t})=>e?{svg:{display:"block",margin:0},...t?{padding:10}:{padding:13}}:{},({theme:e,primary:t,secondary:r,gray:n})=>{let a;return n?a=e.color.mediumlight:r?a=e.color.secondary:t&&(a=e.color.primary),a?{background:a,color:n?e.color.darkest:e.color.lightest,"&:hover":{background:la(.05,a)},"&:active":{boxShadow:"rgba(0, 0, 0, 0.1) 0 0 0 3em inset"},"&:focus":{boxShadow:`${yr(a,1)} 0 1px 9px 2px`,outline:"none"},"&:focus:hover":{boxShadow:`${yr(a,.2)} 0 8px 18px 0px`}}:{}},({theme:e,tertiary:t,inForm:r,small:n})=>t?{background:e.button.background,color:e.input.color,boxShadow:`${e.button.border} 0 0 0 1px inset`,borderRadius:e.input.borderRadius,...r&&n?{padding:"10px 16px"}:{},"&:hover":{background:e.base==="light"?la(.02,e.button.background):_S(.03,e.button.background),...r?{}:{boxShadow:"rgba(0,0,0,.2) 0 2px 6px 0, rgba(0,0,0,.1) 0 0 0 1px inset"}},"&:active":{background:e.button.background},"&:focus":{boxShadow:`${yr(e.color.secondary,1)} 0 0 0 1px inset`,outline:"none"}}:{},({theme:e,outline:t})=>t?{boxShadow:`${Xe(.8,e.color.defaultText)} 0 0 0 1px inset`,color:Xe(.3,e.color.defaultText),background:"transparent","&:hover, &:focus":{boxShadow:`${Xe(.5,e.color.defaultText)} 0 0 0 1px inset`,outline:"none"},"&:active":{boxShadow:`${Xe(.5,e.color.defaultText)} 0 0 0 2px inset`,color:Xe(0,e.color.defaultText)}}:{},({theme:e,outline:t,primary:r})=>{let n=e.color.primary;return t&&r?{boxShadow:`${n} 0 0 0 1px inset`,color:n,"svg path:not([fill])":{fill:n},"&:hover":{boxShadow:`${n} 0 0 0 1px inset`,background:"transparent"},"&:active":{background:n,boxShadow:`${n} 0 0 0 1px inset`,color:e.color.tertiary},"&:focus":{boxShadow:`${n} 0 0 0 1px inset, ${yr(n,.4)} 0 1px 9px 2px`,outline:"none"},"&:focus:hover":{boxShadow:`${n} 0 0 0 1px inset, ${yr(n,.2)} 0 8px 18px 0px`}}:{}},({theme:e,outline:t,primary:r,secondary:n})=>{let a;return n?a=e.color.secondary:r&&(a=e.color.primary),t&&a?{boxShadow:`${a} 0 0 0 1px inset`,color:a,"svg path:not([fill])":{fill:a},"&:hover":{boxShadow:`${a} 0 0 0 1px inset`,background:"transparent"},"&:active":{background:a,boxShadow:`${a} 0 0 0 1px inset`,color:e.color.tertiary},"&:focus":{boxShadow:`${a} 0 0 0 1px inset, ${yr(a,.4)} 0 1px 9px 2px`,outline:"none"},"&:focus:hover":{boxShadow:`${a} 0 0 0 1px inset, ${yr(a,.2)} 0 8px 18px 0px`}}:{}}),c9=Qh.withComponent("a"),Jh=Object.assign(x.forwardRef(function({isLink:e,children:t,...r},n){return e?i.createElement(c9,{...r,ref:n},t):i.createElement(Qh,{...r,ref:n},t)}),{defaultProps:{isLink:!1}}),d9=T.label(({theme:e})=>({display:"flex",borderBottom:`1px solid ${e.appBorderColor}`,margin:"0 15px",padding:"8px 0","&:last-child":{marginBottom:"3rem"}})),p9=T.span(({theme:e})=>({minWidth:100,fontWeight:e.typography.weight.bold,marginRight:15,display:"flex",justifyContent:"flex-start",alignItems:"center",lineHeight:"16px"})),ey=({label:e,children:t,...r})=>i.createElement(d9,{...r},e?i.createElement(p9,null,i.createElement("span",null,e)):null,t);ey.defaultProps={label:void 0};function m0(){return m0=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&(r[a]=e[a]);return r}var zf=function(e,t){if(typeof e=="function"){e(t);return}e.current=t},m9=function(e,t){var r=x.useRef();return x.useCallback(function(n){e.current=n,r.current&&zf(r.current,null),r.current=t,t&&zf(t,n)},[t])},g9=m9,h9=function(){},y9=["cacheMeasurements","maxRows","minRows","onChange","onHeightChange"],v9=function(e,t){e.cacheMeasurements,e.maxRows,e.minRows;var r=e.onChange,n=r===void 0?h9:r;e.onHeightChange;var a=f9(e,y9);a.value;var o=x.useRef(null),l=g9(o,t);return x.useRef(0),x.useRef(),x.createElement("textarea",m0({},a,{onChange:n,ref:l}))},b9=x.forwardRef(v9),E9={appearance:"none",border:"0 none",boxSizing:"inherit",display:" block",margin:" 0",background:"transparent",padding:0,fontSize:"inherit",position:"relative"},l1=({theme:e})=>({...E9,transition:"box-shadow 200ms ease-out, opacity 200ms ease-out",color:e.input.color||"inherit",background:e.input.background,boxShadow:`${e.input.border} 0 0 0 1px inset`,borderRadius:e.input.borderRadius,fontSize:e.typography.size.s2-1,lineHeight:"20px",padding:"6px 10px",boxSizing:"border-box",height:32,'&[type="file"]':{height:"auto"},"&:focus":{boxShadow:`${e.color.secondary} 0 0 0 1px inset`,outline:"none"},"&[disabled]":{cursor:"not-allowed",opacity:.5},"&:-webkit-autofill":{WebkitBoxShadow:`0 0 0 3em ${e.color.lightest} inset`},"&::placeholder":{color:e.textMutedColor,opacity:1}}),Tu=({size:e})=>{switch(e){case"100%":return{width:"100%"};case"flex":return{flex:1};case"auto":default:return{display:"inline"}}},ty=({align:e})=>{switch(e){case"end":return{textAlign:"right"};case"center":return{textAlign:"center"};case"start":default:return{textAlign:"left"}}},Ru=({valid:e,theme:t})=>{switch(e){case"valid":return{boxShadow:`${t.color.positive} 0 0 0 1px inset !important`};case"error":return{boxShadow:`${t.color.negative} 0 0 0 1px inset !important`};case"warn":return{boxShadow:`${t.color.warning} 0 0 0 1px inset`};case void 0:case null:default:return{}}},x9=Object.assign(T(x.forwardRef(function({size:e,valid:t,align:r,...n},a){return i.createElement("input",{...n,ref:a})}))(l1,Tu,ty,Ru,{minHeight:32}),{displayName:"Input"}),w9=Object.assign(T(x.forwardRef(function({size:e,valid:t,align:r,...n},a){return i.createElement("select",{...n,ref:a})}))(l1,Tu,Ru,{height:32,userSelect:"none",paddingRight:20,appearance:"menulist"}),{displayName:"Select"}),S9=Object.assign(T(x.forwardRef(function({size:e,valid:t,align:r,...n},a){return i.createElement(b9,{...n,ref:a})}))(l1,Tu,ty,Ru,({height:e=400})=>({overflow:"visible",maxHeight:e})),{displayName:"Textarea"}),C9=T(x.forwardRef(function({size:e,valid:t,align:r,...n},a){return i.createElement(Jh,{...n,ref:a})}))(Tu,Ru,{userSelect:"none",overflow:"visible",zIndex:2,"&:hover":{transform:"none"}}),A9=Object.assign(x.forwardRef(function(e,t){return i.createElement(C9,{...e,tertiary:!0,small:!0,inForm:!0,ref:t})}),{displayName:"Button"}),jt=Object.assign(T.form({boxSizing:"border-box",width:"100%"}),{Field:ey,Input:x9,Select:w9,Textarea:S9,Button:A9}),k9=x.lazy(()=>Jr(()=>import("./WithTooltip-V3YHNWJZ-pCRHT9Pt.js"),__vite__mapDeps([7,1,2,3,4,5]),import.meta.url).then(e=>({default:e.WithTooltip}))),_9=e=>i.createElement(x.Suspense,{fallback:i.createElement("div",null)},i.createElement(k9,{...e})),O9=x.lazy(()=>Jr(()=>import("./WithTooltip-V3YHNWJZ-pCRHT9Pt.js"),__vite__mapDeps([7,1,2,3,4,5]),import.meta.url).then(e=>({default:e.WithTooltipPure}))),ry=e=>i.createElement(x.Suspense,{fallback:i.createElement("div",null)},i.createElement(O9,{...e})),T9=T.div(({theme:e})=>({fontWeight:e.typography.weight.bold})),R9=T.span(),$9=T.div(({theme:e})=>({marginTop:8,textAlign:"center","> *":{margin:"0 8px",fontWeight:e.typography.weight.bold}})),F9=T.div(({theme:e})=>({color:e.color.defaultText,lineHeight:"18px"})),L9=T.div({padding:15,width:280,boxSizing:"border-box"}),ny=({title:e,desc:t,links:r})=>i.createElement(L9,null,i.createElement(F9,null,e&&i.createElement(T9,null,e),t&&i.createElement(R9,null,t)),r&&i.createElement($9,null,r.map(({title:n,...a})=>i.createElement(Qr,{...a,key:n},n))));ny.defaultProps={title:null,desc:null,links:null};var D9=T.div(({theme:e})=>({padding:"2px 6px",lineHeight:"16px",fontSize:10,fontWeight:e.typography.weight.bold,color:e.color.lightest,boxShadow:"0 0 5px 0 rgba(0, 0, 0, 0.3)",borderRadius:4,whiteSpace:"nowrap",pointerEvents:"none",zIndex:-1,background:e.base==="light"?"rgba(60, 60, 60, 0.9)":"rgba(0, 0, 0, 0.95)",margin:6})),M9=({note:e,...t})=>i.createElement(D9,{...t},e),P9=T(({active:e,loading:t,disabled:r,...n})=>i.createElement("span",{...n}))(({theme:e})=>({color:e.color.defaultText,fontWeight:e.typography.weight.regular}),({active:e,theme:t})=>e?{color:t.color.secondary,fontWeight:t.typography.weight.bold}:{},({loading:e,theme:t})=>e?{display:"inline-block",flex:"none",...t.animation.inlineGlow}:{},({disabled:e,theme:t})=>e?{color:Xe(.7,t.color.defaultText)}:{}),B9=T.span({display:"flex","& svg":{height:12,width:12,margin:"3px 0",verticalAlign:"top"},"& path":{fill:"inherit"}}),I9=T.span({flex:1,textAlign:"left",display:"flex",flexDirection:"column"},({isIndented:e})=>e?{marginLeft:24}:{}),N9=T.span(({theme:e})=>({fontSize:"11px",lineHeight:"14px"}),({active:e,theme:t})=>e?{color:t.color.secondary}:{},({theme:e,disabled:t})=>t?{color:e.textMutedColor}:{}),Vf=T.span(({active:e,theme:t})=>e?{"& svg":{opacity:1},"& svg path:not([fill])":{fill:t.color.secondary}}:{},()=>({display:"flex",maxWidth:14})),j9=T.a(({theme:e})=>({fontSize:e.typography.size.s1,transition:"all 150ms ease-out",color:e.color.dark,textDecoration:"none",cursor:"pointer",justifyContent:"space-between",lineHeight:"18px",padding:"7px 10px",display:"flex",alignItems:"center","& > * + *":{paddingLeft:10},"&:hover":{background:e.background.hoverable},"&:hover svg":{opacity:1}}),({disabled:e})=>e?{cursor:"not-allowed"}:{}),H9=In(100)((e,t,r)=>{let n={};return e&&Object.assign(n,{onClick:e}),t&&Object.assign(n,{href:t}),r&&t&&Object.assign(n,{to:t,as:r}),n}),ay=({loading:e,left:t,title:r,center:n,right:a,icon:o,active:l,disabled:s,isIndented:u,href:c,onClick:d,LinkWrapper:m,...f})=>{let p=H9(d,c,m),h={active:l,disabled:s},g=typeof o=="string"&&Yo[o];return i.createElement(j9,{...h,...f,...p},o?i.createElement(Vf,{...h},g?i.createElement(We,{icon:o}):o):t&&i.createElement(Vf,{...h},t),r||n?i.createElement(I9,{isIndented:!t&&!o&&u},r&&i.createElement(P9,{...h,loading:e},r),n&&i.createElement(N9,{...h},n)):null,a&&i.createElement(B9,{...h},a))};ay.defaultProps={loading:!1,left:null,title:i.createElement("span",null,"Loading state"),center:null,right:null,active:!1,disabled:!1,href:null,LinkWrapper:null,onClick:null};var i1=ay,Z9=T.div({minWidth:180,overflow:"hidden",overflowY:"auto",maxHeight:15.5*32},({theme:e})=>({borderRadius:e.appBorderRadius})),z9=e=>{let{LinkWrapper:t,onClick:r,id:n,isIndented:a,...o}=e,{title:l,href:s,active:u}=o,c=x.useCallback(m=>{r(m,o)},[r]),d=!!r;return i.createElement(i1,{title:l,active:u,href:s,id:`list-item-${n}`,LinkWrapper:t,isIndented:a,...o,...d?{onClick:c}:{}})},u1=({links:e,LinkWrapper:t})=>{let r=e.some(n=>n.left||n.icon);return i.createElement(Z9,null,e.map(({isGatsby:n,...a})=>i.createElement(z9,{key:a.id,LinkWrapper:n?t:null,isIndented:r,...a})))};u1.defaultProps={LinkWrapper:i1.defaultProps.LinkWrapper};var s1=i.forwardRef(({children:e,...t},r)=>t.href!=null?i.createElement("a",{ref:r,...t},e):i.createElement("button",{ref:r,type:"button",...t},e));s1.displayName="ButtonOrLink";var pl=T(s1,{shouldForwardProp:Od})({whiteSpace:"normal",display:"inline-flex",overflow:"hidden",verticalAlign:"top",justifyContent:"center",alignItems:"center",textAlign:"center",textDecoration:"none","&:empty":{display:"none"}},({theme:e})=>({padding:"0 15px",transition:"color 0.2s linear, border-bottom-color 0.2s linear",height:40,lineHeight:"12px",cursor:"pointer",background:"transparent",border:"0 solid transparent",borderTop:"3px solid transparent",borderBottom:"3px solid transparent",fontWeight:"bold",fontSize:13,"&:focus":{outline:"0 none",borderBottomColor:e.color.secondary}}),({active:e,textColor:t,theme:r})=>e?{color:t||r.barSelectedColor,borderBottomColor:r.barSelectedColor}:{color:t||r.barTextColor,borderBottomColor:"transparent"});pl.displayName="TabButton";var Tn=T(s1,{shouldForwardProp:Od})(()=>({alignItems:"center",background:"transparent",border:"none",borderRadius:4,color:"inherit",cursor:"pointer",display:"inline-flex",fontSize:13,fontWeight:"bold",height:28,justifyContent:"center",marginTop:6,padding:"8px 7px","& > svg":{width:14}}),({active:e,theme:t})=>e?{backgroundColor:t.background.hoverable,color:t.barSelectedColor}:{},({disabled:e,theme:t})=>e?{opacity:.5,cursor:"not-allowed"}:{"&:hover, &:focus-visible":{background:Xe(.88,t.color.secondary),color:t.barHoverColor},"&:focus-visible":{outline:ku},"&:focus:not(:focus-visible)":{outline:"none"}});Tn.displayName="IconButton";var V9=T.div(({theme:e})=>({width:14,height:14,backgroundColor:e.appBorderColor,animation:`${e.animation.glow} 1.5s ease-in-out infinite`})),U9=T.div(()=>({marginTop:6,padding:7,height:28})),oy=()=>i.createElement(U9,null,i.createElement(V9,null)),g0=T.div({display:"flex",whiteSpace:"nowrap",flexBasis:"auto",marginLeft:3,marginRight:3},({scrollable:e})=>e?{flexShrink:0}:{},({left:e})=>e?{"& > *":{marginLeft:4}}:{},({right:e})=>e?{marginLeft:30,"& > *":{marginRight:4}}:{});g0.displayName="Side";var q9=({children:e,className:t,scrollable:r})=>r?i.createElement(Vd,{vertical:!1,className:t},e):i.createElement("div",{className:t},e),c1=T(q9)(({theme:e,scrollable:t=!0})=>({color:e.barTextColor,width:"100%",height:40,flexShrink:0,overflow:t?"auto":"hidden",overflowY:"hidden"}),({theme:e,border:t=!1})=>t?{boxShadow:`${e.appBorderColor} 0 -1px 0 0 inset`,background:e.barBg}:{});c1.displayName="Bar";var W9=T.div(({bgColor:e})=>({display:"flex",justifyContent:"space-between",position:"relative",flexWrap:"nowrap",flexShrink:0,height:40,backgroundColor:e||""})),$u=({children:e,backgroundColor:t,...r})=>{let[n,a]=x.Children.toArray(e);return i.createElement(c1,{...r},i.createElement(W9,{bgColor:t},i.createElement(g0,{scrollable:r.scrollable,left:!0},n),a?i.createElement(g0,{right:!0},a):null))};$u.displayName="FlexBar";var ly=T.div(({active:e})=>e?{display:"block"}:{display:"none"}),Uf=e=>x.Children.toArray(e).map(({props:{title:t,id:r,color:n,children:a}})=>{let o=Array.isArray(a)?a[0]:a;return{title:t,id:r,...n?{color:n}:{},render:typeof o=="function"?o:({active:l})=>i.createElement(ly,{active:l,role:"tabpanel"},o)}}),G9=T.span(({theme:e,isActive:t})=>({display:"inline-block",width:0,height:0,marginLeft:8,color:t?e.color.secondary:e.color.mediumdark,borderRight:"3px solid transparent",borderLeft:"3px solid transparent",borderTop:"3px solid",transition:"transform .1s ease-out"})),K9=T(pl)(({active:e,theme:t,preActive:r})=>` +${t}`);let r=t.match(l9);if(!r)return i.createElement(x.Fragment,null,t);let[,n,a]=r,o=t.split(/\n/).slice(1),[,...l]=o.map(s=>{let u=s.match(i9)||s.match(u9)||s.match(s9);return u?{name:(u[1]||"").replace("/<",""),location:u[2].replace(n9.location.origin,"")}:null}).filter(Boolean);return i.createElement(x.Fragment,null,i.createElement("span",null,n),": ",i.createElement(a9,null,a),i.createElement("br",null),l.map((s,u)=>s.name?i.createElement(x.Fragment,{key:u}," ","at ",i.createElement(o9,null,s.name)," (",i.createElement(Zf,null,s.location),")",i.createElement("br",null)):i.createElement(x.Fragment,{key:u}," ","at ",i.createElement(Zf,null,s.location),i.createElement("br",null))))},Qh=T.button(({small:e,theme:t})=>({border:0,borderRadius:"3em",cursor:"pointer",display:"inline-block",overflow:"hidden",padding:e?"8px 16px":"13px 20px",position:"relative",textAlign:"center",textDecoration:"none",transitionProperty:"background, box-shadow",transitionDuration:"150ms",transitionTimingFunction:"ease-out",verticalAlign:"top",whiteSpace:"nowrap",userSelect:"none",opacity:1,margin:0,background:"transparent",fontSize:`${e?t.typography.size.s1:t.typography.size.s2-1}px`,fontWeight:t.typography.weight.bold,lineHeight:"1",svg:{display:"inline-block",height:e?12:14,width:e?12:14,verticalAlign:"top",marginRight:e?4:6,marginTop:e?0:-1,marginBottom:e?0:-1,pointerEvents:"none",path:{fill:"currentColor"}}}),({disabled:e})=>e?{cursor:"not-allowed !important",opacity:.5,"&:hover":{transform:"none"}}:{},({containsIcon:e,small:t})=>e?{svg:{display:"block",margin:0},...t?{padding:10}:{padding:13}}:{},({theme:e,primary:t,secondary:r,gray:n})=>{let a;return n?a=e.color.mediumlight:r?a=e.color.secondary:t&&(a=e.color.primary),a?{background:a,color:n?e.color.darkest:e.color.lightest,"&:hover":{background:la(.05,a)},"&:active":{boxShadow:"rgba(0, 0, 0, 0.1) 0 0 0 3em inset"},"&:focus":{boxShadow:`${yr(a,1)} 0 1px 9px 2px`,outline:"none"},"&:focus:hover":{boxShadow:`${yr(a,.2)} 0 8px 18px 0px`}}:{}},({theme:e,tertiary:t,inForm:r,small:n})=>t?{background:e.button.background,color:e.input.color,boxShadow:`${e.button.border} 0 0 0 1px inset`,borderRadius:e.input.borderRadius,...r&&n?{padding:"10px 16px"}:{},"&:hover":{background:e.base==="light"?la(.02,e.button.background):_S(.03,e.button.background),...r?{}:{boxShadow:"rgba(0,0,0,.2) 0 2px 6px 0, rgba(0,0,0,.1) 0 0 0 1px inset"}},"&:active":{background:e.button.background},"&:focus":{boxShadow:`${yr(e.color.secondary,1)} 0 0 0 1px inset`,outline:"none"}}:{},({theme:e,outline:t})=>t?{boxShadow:`${Xe(.8,e.color.defaultText)} 0 0 0 1px inset`,color:Xe(.3,e.color.defaultText),background:"transparent","&:hover, &:focus":{boxShadow:`${Xe(.5,e.color.defaultText)} 0 0 0 1px inset`,outline:"none"},"&:active":{boxShadow:`${Xe(.5,e.color.defaultText)} 0 0 0 2px inset`,color:Xe(0,e.color.defaultText)}}:{},({theme:e,outline:t,primary:r})=>{let n=e.color.primary;return t&&r?{boxShadow:`${n} 0 0 0 1px inset`,color:n,"svg path:not([fill])":{fill:n},"&:hover":{boxShadow:`${n} 0 0 0 1px inset`,background:"transparent"},"&:active":{background:n,boxShadow:`${n} 0 0 0 1px inset`,color:e.color.tertiary},"&:focus":{boxShadow:`${n} 0 0 0 1px inset, ${yr(n,.4)} 0 1px 9px 2px`,outline:"none"},"&:focus:hover":{boxShadow:`${n} 0 0 0 1px inset, ${yr(n,.2)} 0 8px 18px 0px`}}:{}},({theme:e,outline:t,primary:r,secondary:n})=>{let a;return n?a=e.color.secondary:r&&(a=e.color.primary),t&&a?{boxShadow:`${a} 0 0 0 1px inset`,color:a,"svg path:not([fill])":{fill:a},"&:hover":{boxShadow:`${a} 0 0 0 1px inset`,background:"transparent"},"&:active":{background:a,boxShadow:`${a} 0 0 0 1px inset`,color:e.color.tertiary},"&:focus":{boxShadow:`${a} 0 0 0 1px inset, ${yr(a,.4)} 0 1px 9px 2px`,outline:"none"},"&:focus:hover":{boxShadow:`${a} 0 0 0 1px inset, ${yr(a,.2)} 0 8px 18px 0px`}}:{}}),c9=Qh.withComponent("a"),Jh=Object.assign(x.forwardRef(function({isLink:e,children:t,...r},n){return e?i.createElement(c9,{...r,ref:n},t):i.createElement(Qh,{...r,ref:n},t)}),{defaultProps:{isLink:!1}}),d9=T.label(({theme:e})=>({display:"flex",borderBottom:`1px solid ${e.appBorderColor}`,margin:"0 15px",padding:"8px 0","&:last-child":{marginBottom:"3rem"}})),p9=T.span(({theme:e})=>({minWidth:100,fontWeight:e.typography.weight.bold,marginRight:15,display:"flex",justifyContent:"flex-start",alignItems:"center",lineHeight:"16px"})),ey=({label:e,children:t,...r})=>i.createElement(d9,{...r},e?i.createElement(p9,null,i.createElement("span",null,e)):null,t);ey.defaultProps={label:void 0};function m0(){return m0=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&(r[a]=e[a]);return r}var zf=function(e,t){if(typeof e=="function"){e(t);return}e.current=t},m9=function(e,t){var r=x.useRef();return x.useCallback(function(n){e.current=n,r.current&&zf(r.current,null),r.current=t,t&&zf(t,n)},[t])},g9=m9,h9=function(){},y9=["cacheMeasurements","maxRows","minRows","onChange","onHeightChange"],v9=function(e,t){e.cacheMeasurements,e.maxRows,e.minRows;var r=e.onChange,n=r===void 0?h9:r;e.onHeightChange;var a=f9(e,y9);a.value;var o=x.useRef(null),l=g9(o,t);return x.useRef(0),x.useRef(),x.createElement("textarea",m0({},a,{onChange:n,ref:l}))},b9=x.forwardRef(v9),E9={appearance:"none",border:"0 none",boxSizing:"inherit",display:" block",margin:" 0",background:"transparent",padding:0,fontSize:"inherit",position:"relative"},l1=({theme:e})=>({...E9,transition:"box-shadow 200ms ease-out, opacity 200ms ease-out",color:e.input.color||"inherit",background:e.input.background,boxShadow:`${e.input.border} 0 0 0 1px inset`,borderRadius:e.input.borderRadius,fontSize:e.typography.size.s2-1,lineHeight:"20px",padding:"6px 10px",boxSizing:"border-box",height:32,'&[type="file"]':{height:"auto"},"&:focus":{boxShadow:`${e.color.secondary} 0 0 0 1px inset`,outline:"none"},"&[disabled]":{cursor:"not-allowed",opacity:.5},"&:-webkit-autofill":{WebkitBoxShadow:`0 0 0 3em ${e.color.lightest} inset`},"&::placeholder":{color:e.textMutedColor,opacity:1}}),Tu=({size:e})=>{switch(e){case"100%":return{width:"100%"};case"flex":return{flex:1};case"auto":default:return{display:"inline"}}},ty=({align:e})=>{switch(e){case"end":return{textAlign:"right"};case"center":return{textAlign:"center"};case"start":default:return{textAlign:"left"}}},Ru=({valid:e,theme:t})=>{switch(e){case"valid":return{boxShadow:`${t.color.positive} 0 0 0 1px inset !important`};case"error":return{boxShadow:`${t.color.negative} 0 0 0 1px inset !important`};case"warn":return{boxShadow:`${t.color.warning} 0 0 0 1px inset`};case void 0:case null:default:return{}}},x9=Object.assign(T(x.forwardRef(function({size:e,valid:t,align:r,...n},a){return i.createElement("input",{...n,ref:a})}))(l1,Tu,ty,Ru,{minHeight:32}),{displayName:"Input"}),w9=Object.assign(T(x.forwardRef(function({size:e,valid:t,align:r,...n},a){return i.createElement("select",{...n,ref:a})}))(l1,Tu,Ru,{height:32,userSelect:"none",paddingRight:20,appearance:"menulist"}),{displayName:"Select"}),S9=Object.assign(T(x.forwardRef(function({size:e,valid:t,align:r,...n},a){return i.createElement(b9,{...n,ref:a})}))(l1,Tu,ty,Ru,({height:e=400})=>({overflow:"visible",maxHeight:e})),{displayName:"Textarea"}),C9=T(x.forwardRef(function({size:e,valid:t,align:r,...n},a){return i.createElement(Jh,{...n,ref:a})}))(Tu,Ru,{userSelect:"none",overflow:"visible",zIndex:2,"&:hover":{transform:"none"}}),A9=Object.assign(x.forwardRef(function(e,t){return i.createElement(C9,{...e,tertiary:!0,small:!0,inForm:!0,ref:t})}),{displayName:"Button"}),jt=Object.assign(T.form({boxSizing:"border-box",width:"100%"}),{Field:ey,Input:x9,Select:w9,Textarea:S9,Button:A9}),k9=x.lazy(()=>Jr(()=>import("./WithTooltip-V3YHNWJZ-CZ8Eb387.js"),__vite__mapDeps([7,1,2,3,4,5]),import.meta.url).then(e=>({default:e.WithTooltip}))),_9=e=>i.createElement(x.Suspense,{fallback:i.createElement("div",null)},i.createElement(k9,{...e})),O9=x.lazy(()=>Jr(()=>import("./WithTooltip-V3YHNWJZ-CZ8Eb387.js"),__vite__mapDeps([7,1,2,3,4,5]),import.meta.url).then(e=>({default:e.WithTooltipPure}))),ry=e=>i.createElement(x.Suspense,{fallback:i.createElement("div",null)},i.createElement(O9,{...e})),T9=T.div(({theme:e})=>({fontWeight:e.typography.weight.bold})),R9=T.span(),$9=T.div(({theme:e})=>({marginTop:8,textAlign:"center","> *":{margin:"0 8px",fontWeight:e.typography.weight.bold}})),F9=T.div(({theme:e})=>({color:e.color.defaultText,lineHeight:"18px"})),L9=T.div({padding:15,width:280,boxSizing:"border-box"}),ny=({title:e,desc:t,links:r})=>i.createElement(L9,null,i.createElement(F9,null,e&&i.createElement(T9,null,e),t&&i.createElement(R9,null,t)),r&&i.createElement($9,null,r.map(({title:n,...a})=>i.createElement(Qr,{...a,key:n},n))));ny.defaultProps={title:null,desc:null,links:null};var D9=T.div(({theme:e})=>({padding:"2px 6px",lineHeight:"16px",fontSize:10,fontWeight:e.typography.weight.bold,color:e.color.lightest,boxShadow:"0 0 5px 0 rgba(0, 0, 0, 0.3)",borderRadius:4,whiteSpace:"nowrap",pointerEvents:"none",zIndex:-1,background:e.base==="light"?"rgba(60, 60, 60, 0.9)":"rgba(0, 0, 0, 0.95)",margin:6})),M9=({note:e,...t})=>i.createElement(D9,{...t},e),P9=T(({active:e,loading:t,disabled:r,...n})=>i.createElement("span",{...n}))(({theme:e})=>({color:e.color.defaultText,fontWeight:e.typography.weight.regular}),({active:e,theme:t})=>e?{color:t.color.secondary,fontWeight:t.typography.weight.bold}:{},({loading:e,theme:t})=>e?{display:"inline-block",flex:"none",...t.animation.inlineGlow}:{},({disabled:e,theme:t})=>e?{color:Xe(.7,t.color.defaultText)}:{}),B9=T.span({display:"flex","& svg":{height:12,width:12,margin:"3px 0",verticalAlign:"top"},"& path":{fill:"inherit"}}),I9=T.span({flex:1,textAlign:"left",display:"flex",flexDirection:"column"},({isIndented:e})=>e?{marginLeft:24}:{}),N9=T.span(({theme:e})=>({fontSize:"11px",lineHeight:"14px"}),({active:e,theme:t})=>e?{color:t.color.secondary}:{},({theme:e,disabled:t})=>t?{color:e.textMutedColor}:{}),Vf=T.span(({active:e,theme:t})=>e?{"& svg":{opacity:1},"& svg path:not([fill])":{fill:t.color.secondary}}:{},()=>({display:"flex",maxWidth:14})),j9=T.a(({theme:e})=>({fontSize:e.typography.size.s1,transition:"all 150ms ease-out",color:e.color.dark,textDecoration:"none",cursor:"pointer",justifyContent:"space-between",lineHeight:"18px",padding:"7px 10px",display:"flex",alignItems:"center","& > * + *":{paddingLeft:10},"&:hover":{background:e.background.hoverable},"&:hover svg":{opacity:1}}),({disabled:e})=>e?{cursor:"not-allowed"}:{}),H9=In(100)((e,t,r)=>{let n={};return e&&Object.assign(n,{onClick:e}),t&&Object.assign(n,{href:t}),r&&t&&Object.assign(n,{to:t,as:r}),n}),ay=({loading:e,left:t,title:r,center:n,right:a,icon:o,active:l,disabled:s,isIndented:u,href:c,onClick:d,LinkWrapper:m,...f})=>{let p=H9(d,c,m),h={active:l,disabled:s},g=typeof o=="string"&&Yo[o];return i.createElement(j9,{...h,...f,...p},o?i.createElement(Vf,{...h},g?i.createElement(We,{icon:o}):o):t&&i.createElement(Vf,{...h},t),r||n?i.createElement(I9,{isIndented:!t&&!o&&u},r&&i.createElement(P9,{...h,loading:e},r),n&&i.createElement(N9,{...h},n)):null,a&&i.createElement(B9,{...h},a))};ay.defaultProps={loading:!1,left:null,title:i.createElement("span",null,"Loading state"),center:null,right:null,active:!1,disabled:!1,href:null,LinkWrapper:null,onClick:null};var i1=ay,Z9=T.div({minWidth:180,overflow:"hidden",overflowY:"auto",maxHeight:15.5*32},({theme:e})=>({borderRadius:e.appBorderRadius})),z9=e=>{let{LinkWrapper:t,onClick:r,id:n,isIndented:a,...o}=e,{title:l,href:s,active:u}=o,c=x.useCallback(m=>{r(m,o)},[r]),d=!!r;return i.createElement(i1,{title:l,active:u,href:s,id:`list-item-${n}`,LinkWrapper:t,isIndented:a,...o,...d?{onClick:c}:{}})},u1=({links:e,LinkWrapper:t})=>{let r=e.some(n=>n.left||n.icon);return i.createElement(Z9,null,e.map(({isGatsby:n,...a})=>i.createElement(z9,{key:a.id,LinkWrapper:n?t:null,isIndented:r,...a})))};u1.defaultProps={LinkWrapper:i1.defaultProps.LinkWrapper};var s1=i.forwardRef(({children:e,...t},r)=>t.href!=null?i.createElement("a",{ref:r,...t},e):i.createElement("button",{ref:r,type:"button",...t},e));s1.displayName="ButtonOrLink";var pl=T(s1,{shouldForwardProp:Od})({whiteSpace:"normal",display:"inline-flex",overflow:"hidden",verticalAlign:"top",justifyContent:"center",alignItems:"center",textAlign:"center",textDecoration:"none","&:empty":{display:"none"}},({theme:e})=>({padding:"0 15px",transition:"color 0.2s linear, border-bottom-color 0.2s linear",height:40,lineHeight:"12px",cursor:"pointer",background:"transparent",border:"0 solid transparent",borderTop:"3px solid transparent",borderBottom:"3px solid transparent",fontWeight:"bold",fontSize:13,"&:focus":{outline:"0 none",borderBottomColor:e.color.secondary}}),({active:e,textColor:t,theme:r})=>e?{color:t||r.barSelectedColor,borderBottomColor:r.barSelectedColor}:{color:t||r.barTextColor,borderBottomColor:"transparent"});pl.displayName="TabButton";var Tn=T(s1,{shouldForwardProp:Od})(()=>({alignItems:"center",background:"transparent",border:"none",borderRadius:4,color:"inherit",cursor:"pointer",display:"inline-flex",fontSize:13,fontWeight:"bold",height:28,justifyContent:"center",marginTop:6,padding:"8px 7px","& > svg":{width:14}}),({active:e,theme:t})=>e?{backgroundColor:t.background.hoverable,color:t.barSelectedColor}:{},({disabled:e,theme:t})=>e?{opacity:.5,cursor:"not-allowed"}:{"&:hover, &:focus-visible":{background:Xe(.88,t.color.secondary),color:t.barHoverColor},"&:focus-visible":{outline:ku},"&:focus:not(:focus-visible)":{outline:"none"}});Tn.displayName="IconButton";var V9=T.div(({theme:e})=>({width:14,height:14,backgroundColor:e.appBorderColor,animation:`${e.animation.glow} 1.5s ease-in-out infinite`})),U9=T.div(()=>({marginTop:6,padding:7,height:28})),oy=()=>i.createElement(U9,null,i.createElement(V9,null)),g0=T.div({display:"flex",whiteSpace:"nowrap",flexBasis:"auto",marginLeft:3,marginRight:3},({scrollable:e})=>e?{flexShrink:0}:{},({left:e})=>e?{"& > *":{marginLeft:4}}:{},({right:e})=>e?{marginLeft:30,"& > *":{marginRight:4}}:{});g0.displayName="Side";var q9=({children:e,className:t,scrollable:r})=>r?i.createElement(Vd,{vertical:!1,className:t},e):i.createElement("div",{className:t},e),c1=T(q9)(({theme:e,scrollable:t=!0})=>({color:e.barTextColor,width:"100%",height:40,flexShrink:0,overflow:t?"auto":"hidden",overflowY:"hidden"}),({theme:e,border:t=!1})=>t?{boxShadow:`${e.appBorderColor} 0 -1px 0 0 inset`,background:e.barBg}:{});c1.displayName="Bar";var W9=T.div(({bgColor:e})=>({display:"flex",justifyContent:"space-between",position:"relative",flexWrap:"nowrap",flexShrink:0,height:40,backgroundColor:e||""})),$u=({children:e,backgroundColor:t,...r})=>{let[n,a]=x.Children.toArray(e);return i.createElement(c1,{...r},i.createElement(W9,{bgColor:t},i.createElement(g0,{scrollable:r.scrollable,left:!0},n),a?i.createElement(g0,{right:!0},a):null))};$u.displayName="FlexBar";var ly=T.div(({active:e})=>e?{display:"block"}:{display:"none"}),Uf=e=>x.Children.toArray(e).map(({props:{title:t,id:r,color:n,children:a}})=>{let o=Array.isArray(a)?a[0]:a;return{title:t,id:r,...n?{color:n}:{},render:typeof o=="function"?o:({active:l})=>i.createElement(ly,{active:l,role:"tabpanel"},o)}}),G9=T.span(({theme:e,isActive:t})=>({display:"inline-block",width:0,height:0,marginLeft:8,color:t?e.color.secondary:e.color.mediumdark,borderRight:"3px solid transparent",borderLeft:"3px solid transparent",borderTop:"3px solid",transition:"transform .1s ease-out"})),K9=T(pl)(({active:e,theme:t,preActive:r})=>` color: ${r||e?t.color.secondary:t.color.mediumdark}; &:hover { color: ${t.color.secondary}; @@ -339,7 +339,7 @@ ${t}`);let r=t.match(l9);if(!r)return i.createElement(x.Fragment,null,t);let[,n, ${Qt(.02,e.input.background)} 100%)`:`linear-gradient(to right, ${e.color.green} 0%, ${e.color.green} ${(n-t)/(r-t)*100}%, ${vn(.02,e.input.background)} ${(n-t)/(r-t)*100}%, - ${vn(.02,e.input.background)} 100%)`,boxShadow:`${e.appBorderColor} 0 0 0 1px inset`,color:"transparent",width:"100%",height:"6px",cursor:"pointer"},"&::-ms-fill-lower":{borderRadius:6},"&::-ms-fill-upper":{borderRadius:6},"&::-ms-thumb":{width:16,height:16,background:`${e.input.background}`,border:`1px solid ${br(e.appBorderColor,.2)}`,borderRadius:50,cursor:"grab",marginTop:0},"@supports (-ms-ime-align:auto)":{"input[type=range]":{margin:"0"}}})),Cv=T.span({paddingLeft:5,paddingRight:5,fontSize:12,whiteSpace:"nowrap",fontFeatureSettings:"tnum",fontVariantNumeric:"tabular-nums"}),oB=T(Cv)(({numberOFDecimalsPlaces:e,max:t})=>({width:`${e+t.toString().length*2+3}ch`,textAlign:"right",flexShrink:0})),lB=T.div({display:"flex",alignItems:"center",width:"100%"});function iB(e){let t=e.toString().match(/(?:\.(\d+))?(?:[eE]([+-]?\d+))?$/);return t?Math.max(0,(t[1]?t[1].length:0)-(t[2]?+t[2]:0)):0}var uB=({name:e,value:t,onChange:r,min:n=0,max:a=100,step:o=1,onBlur:l,onFocus:s})=>{let u=m=>{r(xP(m.target.value))},c=t!==void 0,d=x.useMemo(()=>iB(o),[o]);return i.createElement(lB,null,i.createElement(Cv,null,n),i.createElement(aB,{id:Ht(e),type:"range",onChange:u,name:e,value:t,min:n,max:a,step:o,onFocus:s,onBlur:l}),i.createElement(oB,{numberOFDecimalsPlaces:d,max:a},c?t.toFixed(d):"--"," / ",a))},sB=T.label({display:"flex"}),cB=T.div(({isMaxed:e})=>({marginLeft:"0.75rem",paddingTop:"0.35rem",color:e?"red":void 0})),dB=({name:e,value:t,onChange:r,onFocus:n,onBlur:a,maxLength:o})=>{let l=m=>{r(m.target.value)},[s,u]=x.useState(!1),c=x.useCallback(()=>{r(""),u(!0)},[u]);if(t===void 0)return i.createElement(jt.Button,{id:mu(e),onClick:c},"Set string");let d=typeof t=="string";return i.createElement(sB,null,i.createElement(jt.Textarea,{id:Ht(e),maxLength:o,onChange:l,size:"flex",placeholder:"Edit string...",autoFocus:s,valid:d?null:"error",name:e,value:d?t:"",onFocus:n,onBlur:a}),o&&i.createElement(cB,{isMaxed:(t==null?void 0:t.length)===o},(t==null?void 0:t.length)??0," / ",o))},pB=T(jt.Input)({padding:10});function fB(e){e.forEach(t=>{t.startsWith("blob:")&&URL.revokeObjectURL(t)})}var mB=({onChange:e,name:t,accept:r="image/*",value:n})=>{let a=x.useRef(null);function o(l){if(!l.target.files)return;let s=Array.from(l.target.files).map(u=>URL.createObjectURL(u));e(s),fB(n)}return x.useEffect(()=>{n==null&&a.current&&(a.current.value=null)},[n,t]),i.createElement(pB,{ref:a,id:Ht(t),type:"file",name:t,multiple:!0,onChange:o,accept:r,size:"flex"})},gB=x.lazy(()=>Jr(()=>import("./Color-6VNJS4EI-rCh2FLnW.js"),__vite__mapDeps([8,2,4,1,3,5]),import.meta.url)),hB=e=>i.createElement(x.Suspense,{fallback:i.createElement("div",null)},i.createElement(gB,{...e})),yB={array:z2,object:z2,boolean:fP,color:hB,date:bP,number:wP,check:qn,"inline-check":qn,radio:qn,"inline-radio":qn,select:qn,"multi-select":qn,range:uB,text:dB,file:mB},V2=()=>i.createElement(i.Fragment,null,"-"),vB=({row:e,arg:t,updateArgs:r,isHovered:n})=>{let{key:a,control:o}=e,[l,s]=x.useState(!1),[u,c]=x.useState({value:t});x.useEffect(()=>{l||c({value:t})},[l,t]);let d=x.useCallback(g=>(c({value:g}),r({[a]:g}),g),[r,a]),m=x.useCallback(()=>s(!1),[]),f=x.useCallback(()=>s(!0),[]);if(!o||o.disable)return n?i.createElement(Qr,{href:"https://storybook.js.org/docs/react/essentials/controls",target:"_blank",withArrow:!0},"Setup controls"):i.createElement(V2,null);let p={name:a,argType:e,value:u.value,onChange:d,onBlur:m,onFocus:f},h=yB[o.type]||V2;return i.createElement(h,{...p,...o,controlType:o.type})},bB=T.span({fontWeight:"bold"}),EB=T.span(({theme:e})=>({color:e.color.negative,fontFamily:e.typography.fonts.mono,cursor:"help"})),xB=T.div(({theme:e})=>({"&&":{p:{margin:"0 0 10px 0"},a:{color:e.color.secondary}},code:{...Rr({theme:e}),fontSize:12,fontFamily:e.typography.fonts.mono},"& code":{margin:0,display:"inline-block"},"& pre > code":{whiteSpace:"pre-wrap"}})),wB=T.div(({theme:e,hasDescription:t})=>({color:e.base==="light"?fe(.1,e.color.defaultText):fe(.2,e.color.defaultText),marginTop:t?4:0})),SB=T.div(({theme:e,hasDescription:t})=>({color:e.base==="light"?fe(.1,e.color.defaultText):fe(.2,e.color.defaultText),marginTop:t?12:0,marginBottom:12})),CB=T.td(({theme:e,expandable:t})=>({paddingLeft:t?"40px !important":"20px !important"})),zl=e=>{var g;let[t,r]=x.useState(!1),{row:n,updateArgs:a,compact:o,expandable:l,initialExpandedArgs:s}=e,{name:u,description:c}=n,d=n.table||{},m=d.type||n.type,f=d.defaultValue||n.defaultValue,p=(g=n.type)==null?void 0:g.required,h=c!=null&&c!=="";return i.createElement("tr",{onMouseEnter:()=>r(!0),onMouseLeave:()=>r(!1)},i.createElement(CB,{expandable:l},i.createElement(bB,null,u),p?i.createElement(EB,{title:"Required"},"*"):null),o?null:i.createElement("td",null,h&&i.createElement(xB,null,i.createElement(Ky,null,c)),d.jsDocTags!=null?i.createElement(i.Fragment,null,i.createElement(SB,{hasDescription:h},i.createElement(Gs,{value:m,initialExpandedArgs:s})),i.createElement(tP,{tags:d.jsDocTags})):i.createElement(wB,{hasDescription:h},i.createElement(Gs,{value:m,initialExpandedArgs:s}))),o?null:i.createElement("td",null,i.createElement(Gs,{value:f,initialExpandedArgs:s})),a?i.createElement("td",null,i.createElement(vB,{...e,isHovered:t})):null)},AB=T(We)(({theme:e})=>({marginRight:8,marginLeft:-10,marginTop:-2,height:12,width:12,color:e.base==="light"?fe(.25,e.color.defaultText):fe(.3,e.color.defaultText),border:"none",display:"inline-block"})),kB=T.span(({theme:e})=>({display:"flex",lineHeight:"20px",alignItems:"center"})),_B=T.td(({theme:e})=>({position:"relative",letterSpacing:"0.35em",textTransform:"uppercase",fontWeight:e.typography.weight.bold,fontSize:e.typography.size.s1-1,color:e.base==="light"?fe(.4,e.color.defaultText):fe(.6,e.color.defaultText),background:`${e.background.app} !important`,"& ~ td":{background:`${e.background.app} !important`}})),OB=T.td(({theme:e})=>({position:"relative",fontWeight:e.typography.weight.bold,fontSize:e.typography.size.s2-1,background:e.background.app})),TB=T.td(()=>({position:"relative"})),RB=T.tr(({theme:e})=>({"&:hover > td":{backgroundColor:`${vn(.005,e.background.app)} !important`,boxShadow:`${e.color.mediumlight} 0 - 1px 0 0 inset`,cursor:"row-resize"}})),U2=T.button(()=>({background:"none",border:"none",padding:"0",font:"inherit",position:"absolute",top:0,bottom:0,left:0,right:0,height:"100%",width:"100%",color:"transparent",cursor:"row-resize !important"})),Ys=({level:e="section",label:t,children:r,initialExpanded:n=!0,colSpan:a=3})=>{let[o,l]=x.useState(n),s=e==="subsection"?OB:_B,u=(r==null?void 0:r.length)||0,c=e==="subsection"?`${u} item${u!==1?"s":""}`:"",d=o?"arrowdown":"arrowright",m=`${o?"Hide":"Show"} ${e==="subsection"?u:t} item${u!==1?"s":""}`;return i.createElement(i.Fragment,null,i.createElement(RB,{title:m},i.createElement(s,{colSpan:1},i.createElement(U2,{onClick:f=>l(!o),tabIndex:0},m),i.createElement(kB,null,i.createElement(AB,{icon:d}),t)),i.createElement(TB,{colSpan:a-1},i.createElement(U2,{onClick:f=>l(!o),tabIndex:-1,style:{outline:"none"}},m),o?null:c)),o?r:null)},Vl=T.div(({theme:e})=>({display:"flex",gap:16,borderBottom:`1px solid ${e.appBorderColor}`,"&:last-child":{borderBottom:0}})),Ie=T.div(({numColumn:e})=>({display:"flex",flexDirection:"column",flex:e||1,gap:5,padding:"12px 20px"})),we=T.div(({theme:e,width:t,height:r})=>({animation:`${e.animation.glow} 1.5s ease-in-out infinite`,background:e.appBorderColor,width:t||"100%",height:r||16,borderRadius:3})),Ne=[2,4,2,2],$B=()=>i.createElement(i.Fragment,null,i.createElement(Vl,null,i.createElement(Ie,{numColumn:Ne[0]},i.createElement(we,{width:"60%"})),i.createElement(Ie,{numColumn:Ne[1]},i.createElement(we,{width:"30%"})),i.createElement(Ie,{numColumn:Ne[2]},i.createElement(we,{width:"60%"})),i.createElement(Ie,{numColumn:Ne[3]},i.createElement(we,{width:"60%"}))),i.createElement(Vl,null,i.createElement(Ie,{numColumn:Ne[0]},i.createElement(we,{width:"60%"})),i.createElement(Ie,{numColumn:Ne[1]},i.createElement(we,{width:"80%"}),i.createElement(we,{width:"30%"})),i.createElement(Ie,{numColumn:Ne[2]},i.createElement(we,{width:"60%"})),i.createElement(Ie,{numColumn:Ne[3]},i.createElement(we,{width:"60%"}))),i.createElement(Vl,null,i.createElement(Ie,{numColumn:Ne[0]},i.createElement(we,{width:"60%"})),i.createElement(Ie,{numColumn:Ne[1]},i.createElement(we,{width:"80%"}),i.createElement(we,{width:"30%"})),i.createElement(Ie,{numColumn:Ne[2]},i.createElement(we,{width:"60%"})),i.createElement(Ie,{numColumn:Ne[3]},i.createElement(we,{width:"60%"}))),i.createElement(Vl,null,i.createElement(Ie,{numColumn:Ne[0]},i.createElement(we,{width:"60%"})),i.createElement(Ie,{numColumn:Ne[1]},i.createElement(we,{width:"80%"}),i.createElement(we,{width:"30%"})),i.createElement(Ie,{numColumn:Ne[2]},i.createElement(we,{width:"60%"})),i.createElement(Ie,{numColumn:Ne[3]},i.createElement(we,{width:"60%"})))),FB=T.div(({inAddonPanel:e,theme:t})=>({height:e?"100%":"auto",display:"flex",border:e?"none":`1px solid ${t.appBorderColor}`,borderRadius:e?0:t.appBorderRadius,padding:e?0:40,alignItems:"center",justifyContent:"center",flexDirection:"column",gap:15,background:t.background.content,boxShadow:"rgba(0, 0, 0, 0.10) 0 1px 3px 0"})),LB=T.div({display:"flex",flexDirection:"column",gap:4,maxWidth:415}),DB=T.div(({theme:e})=>({fontWeight:e.typography.weight.bold,fontSize:e.typography.size.s2-1,textAlign:"center",color:e.textColor})),MB=T.div(({theme:e})=>({fontWeight:e.typography.weight.regular,fontSize:e.typography.size.s2-1,textAlign:"center",color:e.textMutedColor})),PB=T.div(({theme:e})=>({display:"flex",fontSize:e.typography.size.s2-1,gap:25})),BB=T.div(({theme:e})=>({width:1,height:16,backgroundColor:e.appBorderColor})),IB=({inAddonPanel:e})=>{let[t,r]=x.useState(!0);return x.useEffect(()=>{let n=setTimeout(()=>{r(!1)},100);return()=>clearTimeout(n)},[]),t?null:i.createElement(FB,{inAddonPanel:e},i.createElement(LB,null,i.createElement(DB,null,e?"Interactive story playground":"Args table with interactive controls couldn't be auto-generated"),i.createElement(MB,null,"Controls give you an easy to use interface to test your components. Set your story args and you'll see controls appearing here automatically.")),i.createElement(PB,null,e&&i.createElement(i.Fragment,null,i.createElement(Qr,{href:"https://youtu.be/0gOfS6K0x0E",target:"_blank",withArrow:!0},i.createElement(We,{icon:"video"})," Watch 5m video"),i.createElement(BB,null),i.createElement(Qr,{href:"https://storybook.js.org/docs/react/essentials/controls",target:"_blank",withArrow:!0},"Read docs")),!e&&i.createElement(Qr,{href:"https://storybook.js.org/docs/react/essentials/controls",target:"_blank",withArrow:!0},"Learn how to set that up")))},NB=T.table(({theme:e,compact:t,inAddonPanel:r})=>({"&&":{borderSpacing:0,color:e.color.defaultText,"td, th":{padding:0,border:"none",verticalAlign:"top",textOverflow:"ellipsis"},fontSize:e.typography.size.s2-1,lineHeight:"20px",textAlign:"left",width:"100%",marginTop:r?0:25,marginBottom:r?0:40,"thead th:first-of-type, td:first-of-type":{width:"25%"},"th:first-of-type, td:first-of-type":{paddingLeft:20},"th:nth-of-type(2), td:nth-of-type(2)":{...t?null:{width:"35%"}},"td:nth-of-type(3)":{...t?null:{width:"15%"}},"th:last-of-type, td:last-of-type":{paddingRight:20,...t?null:{width:"25%"}},th:{color:e.base==="light"?fe(.25,e.color.defaultText):fe(.45,e.color.defaultText),paddingTop:10,paddingBottom:10,paddingLeft:15,paddingRight:15},td:{paddingTop:"10px",paddingBottom:"10px","&:not(:first-of-type)":{paddingLeft:15,paddingRight:15},"&:last-of-type":{paddingRight:20}},marginLeft:r?0:1,marginRight:r?0:1,tbody:{...r?null:{filter:e.base==="light"?"drop-shadow(0px 1px 3px rgba(0, 0, 0, 0.10))":"drop-shadow(0px 1px 3px rgba(0, 0, 0, 0.20))"},"> tr > *":{background:e.background.content,borderTop:`1px solid ${e.appBorderColor}`},...r?null:{"> tr:first-of-type > *":{borderBlockStart:`1px solid ${e.appBorderColor}`},"> tr:last-of-type > *":{borderBlockEnd:`1px solid ${e.appBorderColor}`},"> tr > *:first-of-type":{borderInlineStart:`1px solid ${e.appBorderColor}`},"> tr > *:last-of-type":{borderInlineEnd:`1px solid ${e.appBorderColor}`},"> tr:first-of-type > td:first-of-type":{borderTopLeftRadius:e.appBorderRadius},"> tr:first-of-type > td:last-of-type":{borderTopRightRadius:e.appBorderRadius},"> tr:last-of-type > td:first-of-type":{borderBottomLeftRadius:e.appBorderRadius},"> tr:last-of-type > td:last-of-type":{borderBottomRightRadius:e.appBorderRadius}}}}})),jB=T(Tn)(({theme:e})=>({color:e.barTextColor,margin:"-4px -12px -4px 0"})),HB=T.span({display:"flex",justifyContent:"space-between"}),ZB={alpha:(e,t)=>e.name.localeCompare(t.name),requiredFirst:(e,t)=>{var r,n;return+!!((r=t.type)!=null&&r.required)-+!!((n=e.type)!=null&&n.required)||e.name.localeCompare(t.name)},none:void 0},zB=(e,t)=>{let r={ungrouped:[],ungroupedSubsections:{},sections:{}};if(!e)return r;Object.entries(e).forEach(([o,l])=>{let{category:s,subcategory:u}=(l==null?void 0:l.table)||{};if(s){let c=r.sections[s]||{ungrouped:[],subsections:{}};if(!u)c.ungrouped.push({key:o,...l});else{let d=c.subsections[u]||[];d.push({key:o,...l}),c.subsections[u]=d}r.sections[s]=c}else if(u){let c=r.ungroupedSubsections[u]||[];c.push({key:o,...l}),r.ungroupedSubsections[u]=c}else r.ungrouped.push({key:o,...l})});let n=ZB[t],a=o=>n?Object.keys(o).reduce((l,s)=>({...l,[s]:o[s].sort(n)}),{}):o;return{ungrouped:r.ungrouped.sort(n),ungroupedSubsections:a(r.ungroupedSubsections),sections:Object.keys(r.sections).reduce((o,l)=>({...o,[l]:{ungrouped:r.sections[l].ungrouped.sort(n),subsections:a(r.sections[l].subsections)}}),{})}},VB=(e,t,r)=>{try{return Jw(e,t,r)}catch(n){return wM.warn(n.message),!1}},UB=e=>{let{updateArgs:t,resetArgs:r,compact:n,inAddonPanel:a,initialExpandedArgs:o,sort:l="none",isLoading:s}=e;if("error"in e){let{error:y}=e;return i.createElement(cv,null,y," ",i.createElement(Qr,{href:"http://storybook.js.org/docs/",target:"_blank",withArrow:!0},"Read the docs"))}if(s)return i.createElement($B,null);let{rows:u,args:c,globals:d}="rows"in e&&e,m=zB(OO(u,y=>{var v;return!((v=y==null?void 0:y.table)!=null&&v.disable)&&VB(y,c||{},d||{})}),l),f=m.ungrouped.length===0,p=Object.entries(m.sections).length===0,h=Object.entries(m.ungroupedSubsections).length===0;if(f&&p&&h)return i.createElement(IB,{inAddonPanel:a});let g=1;t&&(g+=1),n||(g+=2);let S=Object.keys(m.sections).length>0,b={updateArgs:t,compact:n,inAddonPanel:a,initialExpandedArgs:o};return i.createElement(o1,null,i.createElement(NB,{compact:n,inAddonPanel:a,className:"docblock-argstable sb-unstyled"},i.createElement("thead",{className:"docblock-argstable-head"},i.createElement("tr",null,i.createElement("th",null,i.createElement("span",null,"Name")),n?null:i.createElement("th",null,i.createElement("span",null,"Description")),n?null:i.createElement("th",null,i.createElement("span",null,"Default")),t?i.createElement("th",null,i.createElement(HB,null,"Control"," ",!s&&r&&i.createElement(jB,{onClick:()=>r(),title:"Reset controls"},i.createElement(We,{icon:"undo","aria-hidden":!0})))):null)),i.createElement("tbody",{className:"docblock-argstable-body"},m.ungrouped.map(y=>i.createElement(zl,{key:y.key,row:y,arg:c&&c[y.key],...b})),Object.entries(m.ungroupedSubsections).map(([y,v])=>i.createElement(Ys,{key:y,label:y,level:"subsection",colSpan:g},v.map(E=>i.createElement(zl,{key:E.key,row:E,arg:c&&c[E.key],expandable:S,...b})))),Object.entries(m.sections).map(([y,v])=>i.createElement(Ys,{key:y,label:y,level:"section",colSpan:g},v.ungrouped.map(E=>i.createElement(zl,{key:E.key,row:E,arg:c&&c[E.key],...b})),Object.entries(v.subsections).map(([E,w])=>i.createElement(Ys,{key:E,label:E,level:"subsection",colSpan:g},w.map(C=>i.createElement(zl,{key:C.key,row:C,arg:c&&c[C.key],expandable:S,...b})))))))))};T.div(({theme:e})=>({marginRight:30,fontSize:`${e.typography.size.s1}px`,color:e.base==="light"?fe(.4,e.color.defaultText):fe(.6,e.color.defaultText)}));T.div({overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"});T.div({display:"flex",flexDirection:"row",alignItems:"baseline","&:not(:last-child)":{marginBottom:"1rem"}});T.div(me,({theme:e})=>({...Hu(e),margin:"25px 0 40px",padding:"30px 20px"}));T.div(({theme:e})=>({fontWeight:e.typography.weight.bold,color:e.color.defaultText}));T.div(({theme:e})=>({color:e.base==="light"?fe(.2,e.color.defaultText):fe(.6,e.color.defaultText)}));T.div({flex:"0 0 30%",lineHeight:"20px",marginTop:5});T.div(({theme:e})=>({flex:1,textAlign:"center",fontFamily:e.typography.fonts.mono,fontSize:e.typography.size.s1,lineHeight:1,overflow:"hidden",color:e.base==="light"?fe(.4,e.color.defaultText):fe(.6,e.color.defaultText),"> div":{display:"inline-block",overflow:"hidden",maxWidth:"100%",textOverflow:"ellipsis"},span:{display:"block",marginTop:2}}));T.div({display:"flex",flexDirection:"row"});T.div(({background:e})=>({position:"relative",flex:1,"&::before":{position:"absolute",top:0,left:0,width:"100%",height:"100%",background:e,content:'""'}}));T.div(({theme:e})=>({...Hu(e),display:"flex",flexDirection:"row",height:50,marginBottom:5,overflow:"hidden",backgroundColor:"white",backgroundImage:"repeating-linear-gradient(-45deg, #ccc, #ccc 1px, #fff 1px, #fff 16px)",backgroundClip:"padding-box"}));T.div({display:"flex",flexDirection:"column",flex:1,position:"relative",marginBottom:30});T.div({flex:1,display:"flex",flexDirection:"row"});T.div({display:"flex",alignItems:"flex-start"});T.div({flex:"0 0 30%"});T.div({flex:1});T.div(({theme:e})=>({display:"flex",flexDirection:"row",alignItems:"center",paddingBottom:20,fontWeight:e.typography.weight.bold,color:e.base==="light"?fe(.4,e.color.defaultText):fe(.6,e.color.defaultText)}));T.div(({theme:e})=>({fontSize:e.typography.size.s2,lineHeight:"20px",display:"flex",flexDirection:"column"}));T.div(({theme:e})=>({fontFamily:e.typography.fonts.base,fontSize:e.typography.size.s2,color:e.color.defaultText,marginLeft:10,lineHeight:1.2}));T.div(({theme:e})=>({...Hu(e),overflow:"hidden",height:40,width:40,display:"flex",alignItems:"center",justifyContent:"center",flex:"none","> img, > svg":{width:20,height:20}}));T.div({display:"inline-flex",flexDirection:"row",alignItems:"center",flex:"0 1 calc(20% - 10px)",minWidth:120,margin:"0px 10px 30px 0"});T.div({display:"flex",flexFlow:"row wrap"});var qB=e=>`anchor--${e}`,Av=({storyId:e,children:t})=>i.createElement("div",{id:qB(e),className:"sb-anchor"},t);wt&&wt.__DOCS_CONTEXT__===void 0&&(wt.__DOCS_CONTEXT__=x.createContext(null),wt.__DOCS_CONTEXT__.displayName="DocsContext");var lt=wt?wt.__DOCS_CONTEXT__:x.createContext(null),ml=(e,t)=>x.useContext(lt).resolveOf(e,t);function WB(e,t="start"){e.scrollIntoView({behavior:"smooth",block:t,inline:"nearest"})}function GB(e,t){let r=L1([e],t);return r&&r[0]}function L1(e,t){let[r,n]=x.useState({});return x.useEffect(()=>{Promise.all(e.map(async a=>{let o=await t.loadStory(a);n(l=>l[a]===o?l:{...l,[a]:o})}))}),e.map(a=>{if(r[a])return r[a];try{return t.storyById(a)}catch{return null}})}function kv(e){return hM(e)}var _v=x.createContext({sources:{}}),Ov="--unknown--",KB=({children:e,channel:t})=>{let[r,n]=x.useState({});return x.useEffect(()=>{let a=(o,l=null,s=!1)=>{let{id:u,args:c=void 0,source:d,format:m}=typeof o=="string"?{id:o,source:l,format:s}:o,f=c?kv(c):Ov;n(p=>({...p,[u]:{...p[u],[f]:{code:d,format:m}}}))};return t.on(j1,a),()=>t.off(j1,a)},[]),i.createElement(_v.Provider,{value:{sources:r}},e)},YB=(e=>(e.OPEN="open",e.CLOSED="closed",e.NONE="none",e))(YB||{}),XB=e=>{let t=e.map(r=>{var n,a;return(a=(n=r.parameters.docs)==null?void 0:n.source)==null?void 0:a.state}).filter(Boolean);return t.length===0?"closed":t[0]},QB=(e,t,r)=>{let{sources:n}=r,a=n==null?void 0:n[e];return(a==null?void 0:a[kv(t)])||(a==null?void 0:a[Ov])||{code:""}},JB=({snippet:e,storyContext:t,typeFromProps:r,transformFromProps:n})=>{var u,c,d,m,f,p;let{__isArgsStory:a}=t.parameters,o=((u=t.parameters.docs)==null?void 0:u.source)||{},l=r||o.type||qu.AUTO;if(o.code!==void 0)return o.code;let s=l===qu.DYNAMIC||l===qu.AUTO&&e&&a?e:o.originalSource||"";return o.transformSource&&Fe(Qe`The \`transformSource\` parameter at \`parameters.docs.source.transformSource\` is deprecated, please use \`parameters.docs.source.transform\` instead. + ${vn(.02,e.input.background)} 100%)`,boxShadow:`${e.appBorderColor} 0 0 0 1px inset`,color:"transparent",width:"100%",height:"6px",cursor:"pointer"},"&::-ms-fill-lower":{borderRadius:6},"&::-ms-fill-upper":{borderRadius:6},"&::-ms-thumb":{width:16,height:16,background:`${e.input.background}`,border:`1px solid ${br(e.appBorderColor,.2)}`,borderRadius:50,cursor:"grab",marginTop:0},"@supports (-ms-ime-align:auto)":{"input[type=range]":{margin:"0"}}})),Cv=T.span({paddingLeft:5,paddingRight:5,fontSize:12,whiteSpace:"nowrap",fontFeatureSettings:"tnum",fontVariantNumeric:"tabular-nums"}),oB=T(Cv)(({numberOFDecimalsPlaces:e,max:t})=>({width:`${e+t.toString().length*2+3}ch`,textAlign:"right",flexShrink:0})),lB=T.div({display:"flex",alignItems:"center",width:"100%"});function iB(e){let t=e.toString().match(/(?:\.(\d+))?(?:[eE]([+-]?\d+))?$/);return t?Math.max(0,(t[1]?t[1].length:0)-(t[2]?+t[2]:0)):0}var uB=({name:e,value:t,onChange:r,min:n=0,max:a=100,step:o=1,onBlur:l,onFocus:s})=>{let u=m=>{r(xP(m.target.value))},c=t!==void 0,d=x.useMemo(()=>iB(o),[o]);return i.createElement(lB,null,i.createElement(Cv,null,n),i.createElement(aB,{id:Ht(e),type:"range",onChange:u,name:e,value:t,min:n,max:a,step:o,onFocus:s,onBlur:l}),i.createElement(oB,{numberOFDecimalsPlaces:d,max:a},c?t.toFixed(d):"--"," / ",a))},sB=T.label({display:"flex"}),cB=T.div(({isMaxed:e})=>({marginLeft:"0.75rem",paddingTop:"0.35rem",color:e?"red":void 0})),dB=({name:e,value:t,onChange:r,onFocus:n,onBlur:a,maxLength:o})=>{let l=m=>{r(m.target.value)},[s,u]=x.useState(!1),c=x.useCallback(()=>{r(""),u(!0)},[u]);if(t===void 0)return i.createElement(jt.Button,{id:mu(e),onClick:c},"Set string");let d=typeof t=="string";return i.createElement(sB,null,i.createElement(jt.Textarea,{id:Ht(e),maxLength:o,onChange:l,size:"flex",placeholder:"Edit string...",autoFocus:s,valid:d?null:"error",name:e,value:d?t:"",onFocus:n,onBlur:a}),o&&i.createElement(cB,{isMaxed:(t==null?void 0:t.length)===o},(t==null?void 0:t.length)??0," / ",o))},pB=T(jt.Input)({padding:10});function fB(e){e.forEach(t=>{t.startsWith("blob:")&&URL.revokeObjectURL(t)})}var mB=({onChange:e,name:t,accept:r="image/*",value:n})=>{let a=x.useRef(null);function o(l){if(!l.target.files)return;let s=Array.from(l.target.files).map(u=>URL.createObjectURL(u));e(s),fB(n)}return x.useEffect(()=>{n==null&&a.current&&(a.current.value=null)},[n,t]),i.createElement(pB,{ref:a,id:Ht(t),type:"file",name:t,multiple:!0,onChange:o,accept:r,size:"flex"})},gB=x.lazy(()=>Jr(()=>import("./Color-6VNJS4EI-2sKJBn8q.js"),__vite__mapDeps([8,2,4,1,3,5]),import.meta.url)),hB=e=>i.createElement(x.Suspense,{fallback:i.createElement("div",null)},i.createElement(gB,{...e})),yB={array:z2,object:z2,boolean:fP,color:hB,date:bP,number:wP,check:qn,"inline-check":qn,radio:qn,"inline-radio":qn,select:qn,"multi-select":qn,range:uB,text:dB,file:mB},V2=()=>i.createElement(i.Fragment,null,"-"),vB=({row:e,arg:t,updateArgs:r,isHovered:n})=>{let{key:a,control:o}=e,[l,s]=x.useState(!1),[u,c]=x.useState({value:t});x.useEffect(()=>{l||c({value:t})},[l,t]);let d=x.useCallback(g=>(c({value:g}),r({[a]:g}),g),[r,a]),m=x.useCallback(()=>s(!1),[]),f=x.useCallback(()=>s(!0),[]);if(!o||o.disable)return n?i.createElement(Qr,{href:"https://storybook.js.org/docs/react/essentials/controls",target:"_blank",withArrow:!0},"Setup controls"):i.createElement(V2,null);let p={name:a,argType:e,value:u.value,onChange:d,onBlur:m,onFocus:f},h=yB[o.type]||V2;return i.createElement(h,{...p,...o,controlType:o.type})},bB=T.span({fontWeight:"bold"}),EB=T.span(({theme:e})=>({color:e.color.negative,fontFamily:e.typography.fonts.mono,cursor:"help"})),xB=T.div(({theme:e})=>({"&&":{p:{margin:"0 0 10px 0"},a:{color:e.color.secondary}},code:{...Rr({theme:e}),fontSize:12,fontFamily:e.typography.fonts.mono},"& code":{margin:0,display:"inline-block"},"& pre > code":{whiteSpace:"pre-wrap"}})),wB=T.div(({theme:e,hasDescription:t})=>({color:e.base==="light"?fe(.1,e.color.defaultText):fe(.2,e.color.defaultText),marginTop:t?4:0})),SB=T.div(({theme:e,hasDescription:t})=>({color:e.base==="light"?fe(.1,e.color.defaultText):fe(.2,e.color.defaultText),marginTop:t?12:0,marginBottom:12})),CB=T.td(({theme:e,expandable:t})=>({paddingLeft:t?"40px !important":"20px !important"})),zl=e=>{var g;let[t,r]=x.useState(!1),{row:n,updateArgs:a,compact:o,expandable:l,initialExpandedArgs:s}=e,{name:u,description:c}=n,d=n.table||{},m=d.type||n.type,f=d.defaultValue||n.defaultValue,p=(g=n.type)==null?void 0:g.required,h=c!=null&&c!=="";return i.createElement("tr",{onMouseEnter:()=>r(!0),onMouseLeave:()=>r(!1)},i.createElement(CB,{expandable:l},i.createElement(bB,null,u),p?i.createElement(EB,{title:"Required"},"*"):null),o?null:i.createElement("td",null,h&&i.createElement(xB,null,i.createElement(Ky,null,c)),d.jsDocTags!=null?i.createElement(i.Fragment,null,i.createElement(SB,{hasDescription:h},i.createElement(Gs,{value:m,initialExpandedArgs:s})),i.createElement(tP,{tags:d.jsDocTags})):i.createElement(wB,{hasDescription:h},i.createElement(Gs,{value:m,initialExpandedArgs:s}))),o?null:i.createElement("td",null,i.createElement(Gs,{value:f,initialExpandedArgs:s})),a?i.createElement("td",null,i.createElement(vB,{...e,isHovered:t})):null)},AB=T(We)(({theme:e})=>({marginRight:8,marginLeft:-10,marginTop:-2,height:12,width:12,color:e.base==="light"?fe(.25,e.color.defaultText):fe(.3,e.color.defaultText),border:"none",display:"inline-block"})),kB=T.span(({theme:e})=>({display:"flex",lineHeight:"20px",alignItems:"center"})),_B=T.td(({theme:e})=>({position:"relative",letterSpacing:"0.35em",textTransform:"uppercase",fontWeight:e.typography.weight.bold,fontSize:e.typography.size.s1-1,color:e.base==="light"?fe(.4,e.color.defaultText):fe(.6,e.color.defaultText),background:`${e.background.app} !important`,"& ~ td":{background:`${e.background.app} !important`}})),OB=T.td(({theme:e})=>({position:"relative",fontWeight:e.typography.weight.bold,fontSize:e.typography.size.s2-1,background:e.background.app})),TB=T.td(()=>({position:"relative"})),RB=T.tr(({theme:e})=>({"&:hover > td":{backgroundColor:`${vn(.005,e.background.app)} !important`,boxShadow:`${e.color.mediumlight} 0 - 1px 0 0 inset`,cursor:"row-resize"}})),U2=T.button(()=>({background:"none",border:"none",padding:"0",font:"inherit",position:"absolute",top:0,bottom:0,left:0,right:0,height:"100%",width:"100%",color:"transparent",cursor:"row-resize !important"})),Ys=({level:e="section",label:t,children:r,initialExpanded:n=!0,colSpan:a=3})=>{let[o,l]=x.useState(n),s=e==="subsection"?OB:_B,u=(r==null?void 0:r.length)||0,c=e==="subsection"?`${u} item${u!==1?"s":""}`:"",d=o?"arrowdown":"arrowright",m=`${o?"Hide":"Show"} ${e==="subsection"?u:t} item${u!==1?"s":""}`;return i.createElement(i.Fragment,null,i.createElement(RB,{title:m},i.createElement(s,{colSpan:1},i.createElement(U2,{onClick:f=>l(!o),tabIndex:0},m),i.createElement(kB,null,i.createElement(AB,{icon:d}),t)),i.createElement(TB,{colSpan:a-1},i.createElement(U2,{onClick:f=>l(!o),tabIndex:-1,style:{outline:"none"}},m),o?null:c)),o?r:null)},Vl=T.div(({theme:e})=>({display:"flex",gap:16,borderBottom:`1px solid ${e.appBorderColor}`,"&:last-child":{borderBottom:0}})),Ie=T.div(({numColumn:e})=>({display:"flex",flexDirection:"column",flex:e||1,gap:5,padding:"12px 20px"})),we=T.div(({theme:e,width:t,height:r})=>({animation:`${e.animation.glow} 1.5s ease-in-out infinite`,background:e.appBorderColor,width:t||"100%",height:r||16,borderRadius:3})),Ne=[2,4,2,2],$B=()=>i.createElement(i.Fragment,null,i.createElement(Vl,null,i.createElement(Ie,{numColumn:Ne[0]},i.createElement(we,{width:"60%"})),i.createElement(Ie,{numColumn:Ne[1]},i.createElement(we,{width:"30%"})),i.createElement(Ie,{numColumn:Ne[2]},i.createElement(we,{width:"60%"})),i.createElement(Ie,{numColumn:Ne[3]},i.createElement(we,{width:"60%"}))),i.createElement(Vl,null,i.createElement(Ie,{numColumn:Ne[0]},i.createElement(we,{width:"60%"})),i.createElement(Ie,{numColumn:Ne[1]},i.createElement(we,{width:"80%"}),i.createElement(we,{width:"30%"})),i.createElement(Ie,{numColumn:Ne[2]},i.createElement(we,{width:"60%"})),i.createElement(Ie,{numColumn:Ne[3]},i.createElement(we,{width:"60%"}))),i.createElement(Vl,null,i.createElement(Ie,{numColumn:Ne[0]},i.createElement(we,{width:"60%"})),i.createElement(Ie,{numColumn:Ne[1]},i.createElement(we,{width:"80%"}),i.createElement(we,{width:"30%"})),i.createElement(Ie,{numColumn:Ne[2]},i.createElement(we,{width:"60%"})),i.createElement(Ie,{numColumn:Ne[3]},i.createElement(we,{width:"60%"}))),i.createElement(Vl,null,i.createElement(Ie,{numColumn:Ne[0]},i.createElement(we,{width:"60%"})),i.createElement(Ie,{numColumn:Ne[1]},i.createElement(we,{width:"80%"}),i.createElement(we,{width:"30%"})),i.createElement(Ie,{numColumn:Ne[2]},i.createElement(we,{width:"60%"})),i.createElement(Ie,{numColumn:Ne[3]},i.createElement(we,{width:"60%"})))),FB=T.div(({inAddonPanel:e,theme:t})=>({height:e?"100%":"auto",display:"flex",border:e?"none":`1px solid ${t.appBorderColor}`,borderRadius:e?0:t.appBorderRadius,padding:e?0:40,alignItems:"center",justifyContent:"center",flexDirection:"column",gap:15,background:t.background.content,boxShadow:"rgba(0, 0, 0, 0.10) 0 1px 3px 0"})),LB=T.div({display:"flex",flexDirection:"column",gap:4,maxWidth:415}),DB=T.div(({theme:e})=>({fontWeight:e.typography.weight.bold,fontSize:e.typography.size.s2-1,textAlign:"center",color:e.textColor})),MB=T.div(({theme:e})=>({fontWeight:e.typography.weight.regular,fontSize:e.typography.size.s2-1,textAlign:"center",color:e.textMutedColor})),PB=T.div(({theme:e})=>({display:"flex",fontSize:e.typography.size.s2-1,gap:25})),BB=T.div(({theme:e})=>({width:1,height:16,backgroundColor:e.appBorderColor})),IB=({inAddonPanel:e})=>{let[t,r]=x.useState(!0);return x.useEffect(()=>{let n=setTimeout(()=>{r(!1)},100);return()=>clearTimeout(n)},[]),t?null:i.createElement(FB,{inAddonPanel:e},i.createElement(LB,null,i.createElement(DB,null,e?"Interactive story playground":"Args table with interactive controls couldn't be auto-generated"),i.createElement(MB,null,"Controls give you an easy to use interface to test your components. Set your story args and you'll see controls appearing here automatically.")),i.createElement(PB,null,e&&i.createElement(i.Fragment,null,i.createElement(Qr,{href:"https://youtu.be/0gOfS6K0x0E",target:"_blank",withArrow:!0},i.createElement(We,{icon:"video"})," Watch 5m video"),i.createElement(BB,null),i.createElement(Qr,{href:"https://storybook.js.org/docs/react/essentials/controls",target:"_blank",withArrow:!0},"Read docs")),!e&&i.createElement(Qr,{href:"https://storybook.js.org/docs/react/essentials/controls",target:"_blank",withArrow:!0},"Learn how to set that up")))},NB=T.table(({theme:e,compact:t,inAddonPanel:r})=>({"&&":{borderSpacing:0,color:e.color.defaultText,"td, th":{padding:0,border:"none",verticalAlign:"top",textOverflow:"ellipsis"},fontSize:e.typography.size.s2-1,lineHeight:"20px",textAlign:"left",width:"100%",marginTop:r?0:25,marginBottom:r?0:40,"thead th:first-of-type, td:first-of-type":{width:"25%"},"th:first-of-type, td:first-of-type":{paddingLeft:20},"th:nth-of-type(2), td:nth-of-type(2)":{...t?null:{width:"35%"}},"td:nth-of-type(3)":{...t?null:{width:"15%"}},"th:last-of-type, td:last-of-type":{paddingRight:20,...t?null:{width:"25%"}},th:{color:e.base==="light"?fe(.25,e.color.defaultText):fe(.45,e.color.defaultText),paddingTop:10,paddingBottom:10,paddingLeft:15,paddingRight:15},td:{paddingTop:"10px",paddingBottom:"10px","&:not(:first-of-type)":{paddingLeft:15,paddingRight:15},"&:last-of-type":{paddingRight:20}},marginLeft:r?0:1,marginRight:r?0:1,tbody:{...r?null:{filter:e.base==="light"?"drop-shadow(0px 1px 3px rgba(0, 0, 0, 0.10))":"drop-shadow(0px 1px 3px rgba(0, 0, 0, 0.20))"},"> tr > *":{background:e.background.content,borderTop:`1px solid ${e.appBorderColor}`},...r?null:{"> tr:first-of-type > *":{borderBlockStart:`1px solid ${e.appBorderColor}`},"> tr:last-of-type > *":{borderBlockEnd:`1px solid ${e.appBorderColor}`},"> tr > *:first-of-type":{borderInlineStart:`1px solid ${e.appBorderColor}`},"> tr > *:last-of-type":{borderInlineEnd:`1px solid ${e.appBorderColor}`},"> tr:first-of-type > td:first-of-type":{borderTopLeftRadius:e.appBorderRadius},"> tr:first-of-type > td:last-of-type":{borderTopRightRadius:e.appBorderRadius},"> tr:last-of-type > td:first-of-type":{borderBottomLeftRadius:e.appBorderRadius},"> tr:last-of-type > td:last-of-type":{borderBottomRightRadius:e.appBorderRadius}}}}})),jB=T(Tn)(({theme:e})=>({color:e.barTextColor,margin:"-4px -12px -4px 0"})),HB=T.span({display:"flex",justifyContent:"space-between"}),ZB={alpha:(e,t)=>e.name.localeCompare(t.name),requiredFirst:(e,t)=>{var r,n;return+!!((r=t.type)!=null&&r.required)-+!!((n=e.type)!=null&&n.required)||e.name.localeCompare(t.name)},none:void 0},zB=(e,t)=>{let r={ungrouped:[],ungroupedSubsections:{},sections:{}};if(!e)return r;Object.entries(e).forEach(([o,l])=>{let{category:s,subcategory:u}=(l==null?void 0:l.table)||{};if(s){let c=r.sections[s]||{ungrouped:[],subsections:{}};if(!u)c.ungrouped.push({key:o,...l});else{let d=c.subsections[u]||[];d.push({key:o,...l}),c.subsections[u]=d}r.sections[s]=c}else if(u){let c=r.ungroupedSubsections[u]||[];c.push({key:o,...l}),r.ungroupedSubsections[u]=c}else r.ungrouped.push({key:o,...l})});let n=ZB[t],a=o=>n?Object.keys(o).reduce((l,s)=>({...l,[s]:o[s].sort(n)}),{}):o;return{ungrouped:r.ungrouped.sort(n),ungroupedSubsections:a(r.ungroupedSubsections),sections:Object.keys(r.sections).reduce((o,l)=>({...o,[l]:{ungrouped:r.sections[l].ungrouped.sort(n),subsections:a(r.sections[l].subsections)}}),{})}},VB=(e,t,r)=>{try{return Jw(e,t,r)}catch(n){return wM.warn(n.message),!1}},UB=e=>{let{updateArgs:t,resetArgs:r,compact:n,inAddonPanel:a,initialExpandedArgs:o,sort:l="none",isLoading:s}=e;if("error"in e){let{error:y}=e;return i.createElement(cv,null,y," ",i.createElement(Qr,{href:"http://storybook.js.org/docs/",target:"_blank",withArrow:!0},"Read the docs"))}if(s)return i.createElement($B,null);let{rows:u,args:c,globals:d}="rows"in e&&e,m=zB(OO(u,y=>{var v;return!((v=y==null?void 0:y.table)!=null&&v.disable)&&VB(y,c||{},d||{})}),l),f=m.ungrouped.length===0,p=Object.entries(m.sections).length===0,h=Object.entries(m.ungroupedSubsections).length===0;if(f&&p&&h)return i.createElement(IB,{inAddonPanel:a});let g=1;t&&(g+=1),n||(g+=2);let S=Object.keys(m.sections).length>0,b={updateArgs:t,compact:n,inAddonPanel:a,initialExpandedArgs:o};return i.createElement(o1,null,i.createElement(NB,{compact:n,inAddonPanel:a,className:"docblock-argstable sb-unstyled"},i.createElement("thead",{className:"docblock-argstable-head"},i.createElement("tr",null,i.createElement("th",null,i.createElement("span",null,"Name")),n?null:i.createElement("th",null,i.createElement("span",null,"Description")),n?null:i.createElement("th",null,i.createElement("span",null,"Default")),t?i.createElement("th",null,i.createElement(HB,null,"Control"," ",!s&&r&&i.createElement(jB,{onClick:()=>r(),title:"Reset controls"},i.createElement(We,{icon:"undo","aria-hidden":!0})))):null)),i.createElement("tbody",{className:"docblock-argstable-body"},m.ungrouped.map(y=>i.createElement(zl,{key:y.key,row:y,arg:c&&c[y.key],...b})),Object.entries(m.ungroupedSubsections).map(([y,v])=>i.createElement(Ys,{key:y,label:y,level:"subsection",colSpan:g},v.map(E=>i.createElement(zl,{key:E.key,row:E,arg:c&&c[E.key],expandable:S,...b})))),Object.entries(m.sections).map(([y,v])=>i.createElement(Ys,{key:y,label:y,level:"section",colSpan:g},v.ungrouped.map(E=>i.createElement(zl,{key:E.key,row:E,arg:c&&c[E.key],...b})),Object.entries(v.subsections).map(([E,w])=>i.createElement(Ys,{key:E,label:E,level:"subsection",colSpan:g},w.map(C=>i.createElement(zl,{key:C.key,row:C,arg:c&&c[C.key],expandable:S,...b})))))))))};T.div(({theme:e})=>({marginRight:30,fontSize:`${e.typography.size.s1}px`,color:e.base==="light"?fe(.4,e.color.defaultText):fe(.6,e.color.defaultText)}));T.div({overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"});T.div({display:"flex",flexDirection:"row",alignItems:"baseline","&:not(:last-child)":{marginBottom:"1rem"}});T.div(me,({theme:e})=>({...Hu(e),margin:"25px 0 40px",padding:"30px 20px"}));T.div(({theme:e})=>({fontWeight:e.typography.weight.bold,color:e.color.defaultText}));T.div(({theme:e})=>({color:e.base==="light"?fe(.2,e.color.defaultText):fe(.6,e.color.defaultText)}));T.div({flex:"0 0 30%",lineHeight:"20px",marginTop:5});T.div(({theme:e})=>({flex:1,textAlign:"center",fontFamily:e.typography.fonts.mono,fontSize:e.typography.size.s1,lineHeight:1,overflow:"hidden",color:e.base==="light"?fe(.4,e.color.defaultText):fe(.6,e.color.defaultText),"> div":{display:"inline-block",overflow:"hidden",maxWidth:"100%",textOverflow:"ellipsis"},span:{display:"block",marginTop:2}}));T.div({display:"flex",flexDirection:"row"});T.div(({background:e})=>({position:"relative",flex:1,"&::before":{position:"absolute",top:0,left:0,width:"100%",height:"100%",background:e,content:'""'}}));T.div(({theme:e})=>({...Hu(e),display:"flex",flexDirection:"row",height:50,marginBottom:5,overflow:"hidden",backgroundColor:"white",backgroundImage:"repeating-linear-gradient(-45deg, #ccc, #ccc 1px, #fff 1px, #fff 16px)",backgroundClip:"padding-box"}));T.div({display:"flex",flexDirection:"column",flex:1,position:"relative",marginBottom:30});T.div({flex:1,display:"flex",flexDirection:"row"});T.div({display:"flex",alignItems:"flex-start"});T.div({flex:"0 0 30%"});T.div({flex:1});T.div(({theme:e})=>({display:"flex",flexDirection:"row",alignItems:"center",paddingBottom:20,fontWeight:e.typography.weight.bold,color:e.base==="light"?fe(.4,e.color.defaultText):fe(.6,e.color.defaultText)}));T.div(({theme:e})=>({fontSize:e.typography.size.s2,lineHeight:"20px",display:"flex",flexDirection:"column"}));T.div(({theme:e})=>({fontFamily:e.typography.fonts.base,fontSize:e.typography.size.s2,color:e.color.defaultText,marginLeft:10,lineHeight:1.2}));T.div(({theme:e})=>({...Hu(e),overflow:"hidden",height:40,width:40,display:"flex",alignItems:"center",justifyContent:"center",flex:"none","> img, > svg":{width:20,height:20}}));T.div({display:"inline-flex",flexDirection:"row",alignItems:"center",flex:"0 1 calc(20% - 10px)",minWidth:120,margin:"0px 10px 30px 0"});T.div({display:"flex",flexFlow:"row wrap"});var qB=e=>`anchor--${e}`,Av=({storyId:e,children:t})=>i.createElement("div",{id:qB(e),className:"sb-anchor"},t);wt&&wt.__DOCS_CONTEXT__===void 0&&(wt.__DOCS_CONTEXT__=x.createContext(null),wt.__DOCS_CONTEXT__.displayName="DocsContext");var lt=wt?wt.__DOCS_CONTEXT__:x.createContext(null),ml=(e,t)=>x.useContext(lt).resolveOf(e,t);function WB(e,t="start"){e.scrollIntoView({behavior:"smooth",block:t,inline:"nearest"})}function GB(e,t){let r=L1([e],t);return r&&r[0]}function L1(e,t){let[r,n]=x.useState({});return x.useEffect(()=>{Promise.all(e.map(async a=>{let o=await t.loadStory(a);n(l=>l[a]===o?l:{...l,[a]:o})}))}),e.map(a=>{if(r[a])return r[a];try{return t.storyById(a)}catch{return null}})}function kv(e){return hM(e)}var _v=x.createContext({sources:{}}),Ov="--unknown--",KB=({children:e,channel:t})=>{let[r,n]=x.useState({});return x.useEffect(()=>{let a=(o,l=null,s=!1)=>{let{id:u,args:c=void 0,source:d,format:m}=typeof o=="string"?{id:o,source:l,format:s}:o,f=c?kv(c):Ov;n(p=>({...p,[u]:{...p[u],[f]:{code:d,format:m}}}))};return t.on(j1,a),()=>t.off(j1,a)},[]),i.createElement(_v.Provider,{value:{sources:r}},e)},YB=(e=>(e.OPEN="open",e.CLOSED="closed",e.NONE="none",e))(YB||{}),XB=e=>{let t=e.map(r=>{var n,a;return(a=(n=r.parameters.docs)==null?void 0:n.source)==null?void 0:a.state}).filter(Boolean);return t.length===0?"closed":t[0]},QB=(e,t,r)=>{let{sources:n}=r,a=n==null?void 0:n[e];return(a==null?void 0:a[kv(t)])||(a==null?void 0:a[Ov])||{code:""}},JB=({snippet:e,storyContext:t,typeFromProps:r,transformFromProps:n})=>{var u,c,d,m,f,p;let{__isArgsStory:a}=t.parameters,o=((u=t.parameters.docs)==null?void 0:u.source)||{},l=r||o.type||qu.AUTO;if(o.code!==void 0)return o.code;let s=l===qu.DYNAMIC||l===qu.AUTO&&e&&a?e:o.originalSource||"";return o.transformSource&&Fe(Qe`The \`transformSource\` parameter at \`parameters.docs.source.transformSource\` is deprecated, please use \`parameters.docs.source.transform\` instead. Please refer to the migration guide: https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#source-block `),(c=t.parameters.docs)!=null&&c.transformSource&&Fe(Qe`The \`transformSource\` parameter at \`parameters.docs.transformSource\` is deprecated, please use \`parameters.docs.source.transform\` instead. @@ -392,10 +392,10 @@ ${t}`);let r=t.match(l9);if(!r)return i.createElement(x.Fragment,null,t);let[,n, `);return i.createElement(Ky,{...e,options:{forceBlock:!0,overrides:{code:Fv,a:Lv,...Mv,...(t=e==null?void 0:e.options)==null?void 0:t.overrides},...e==null?void 0:e.options}})},fI=(e=>(e.INFO="info",e.NOTES="notes",e.DOCGEN="docgen",e.AUTO="auto",e))(fI||{}),mi="https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#description-block-parametersnotes-and-parametersinfo",mI=e=>e&&(typeof e=="string"?e:Xs(e.markdown)||Xs(e.text)),gI=e=>e&&(typeof e=="string"?e:Xs(e.text)),hI=e=>null,yI=e=>{var t,r,n,a,o,l,s,u;switch(e.type){case"story":return((r=(t=e.story.parameters.docs)==null?void 0:t.description)==null?void 0:r.story)||null;case"meta":{let{parameters:c,component:d}=e.preparedMeta;return((a=(n=c.docs)==null?void 0:n.description)==null?void 0:a.component)||((l=(o=c.docs)==null?void 0:o.extractComponentDescription)==null?void 0:l.call(o,d,{component:d,parameters:c}))||null}case"component":{let{component:c,projectAnnotations:{parameters:d}}=e;return((u=(s=d.docs)==null?void 0:s.extractComponentDescription)==null?void 0:u.call(s,c,{component:c,parameters:d}))||null}default:throw new Error(`Unrecognized module type resolved from 'useOf', got: ${e.type}`)}},vI=({type:e,markdown:t,children:r},{storyById:n})=>{let{component:a,parameters:o}=n();if(r||t)return r||t;let{notes:l,info:s,docs:u}=o;(l||s)&&Fe(`Using 'parameters.notes' or 'parameters.info' properties to describe stories is deprecated. See ${mi}`);let{extractComponentDescription:c=hI,description:d}=u||{},m=d==null?void 0:d.component;if(m)return m;switch(e){case"info":return gI(s);case"notes":return mI(l);case"docgen":case"auto":default:return c(a,{component:a,...o})}},O0=e=>{let{of:t,type:r,markdown:n,children:a}=e;if("of"in e&&t===void 0)throw new Error("Unexpected `of={undefined}`, did you mistype a CSF file reference?");let o=x.useContext(lt),l=ml(t||"meta"),s;return r||n||a?s=vI(e,o):s=yI(l),r&&Fe(`Manually specifying description type is deprecated. See ${mi}`),n&&Fe(`The 'markdown' prop on the Description block is deprecated. See ${mi}`),a&&Fe(`The 'children' prop on the Description block is deprecated. See ${mi}`),s?i.createElement(pI,null,s):null},bI=T.div(({theme:e})=>({width:"10rem","@media (max-width: 768px)":{display:"none"}})),EI=T.div(({theme:e})=>({position:"fixed",bottom:0,top:0,width:"10rem",paddingTop:"4rem",paddingBottom:"2rem",overflowY:"auto",fontFamily:e.typography.fonts.base,fontSize:e.typography.size.s2,WebkitFontSmoothing:"antialiased",MozOsxFontSmoothing:"grayscale",WebkitTapHighlightColor:"rgba(0, 0, 0, 0)",WebkitOverflowScrolling:"touch","& *":{boxSizing:"border-box"},"& > .toc-wrapper > .toc-list":{paddingLeft:0,borderLeft:`solid 2px ${e.color.mediumlight}`,".toc-list":{paddingLeft:0,borderLeft:`solid 2px ${e.color.mediumlight}`,".toc-list":{paddingLeft:0,borderLeft:`solid 2px ${e.color.mediumlight}`}}},"& .toc-list-item":{position:"relative",listStyleType:"none",marginLeft:20,paddingTop:3,paddingBottom:3},"& .toc-list-item::before":{content:'""',position:"absolute",height:"100%",top:0,left:0,transform:"translateX(calc(-2px - 20px))",borderLeft:`solid 2px ${e.color.mediumdark}`,opacity:0,transition:"opacity 0.2s"},"& .toc-list-item.is-active-li::before":{opacity:1},"& .toc-list-item > a":{color:e.color.defaultText,textDecoration:"none"},"& .toc-list-item.is-active-li > a":{fontWeight:600,color:e.color.secondary,textDecoration:"none"}})),xI=T.p(({theme:e})=>({fontWeight:600,fontSize:"0.875em",color:e.textColor,textTransform:"uppercase",marginBottom:10})),wI=({title:e})=>e===null?null:typeof e=="string"?i.createElement(xI,null,e):e,SI=({title:e,disable:t,headingSelector:r,contentsSelector:n,ignoreSelector:a,unsafeTocbotOptions:o})=>(x.useEffect(()=>{let l={tocSelector:".toc-wrapper",contentSelector:n??".sbdocs-content",headingSelector:r??"h3",ignoreSelector:a??".skip-toc",headingsOffset:40,scrollSmoothOffset:-40,orderedList:!1,onClick:()=>!1,...o},s=setTimeout(()=>$2.init(l),100);return()=>{clearTimeout(s),$2.destroy()}},[t]),i.createElement(i.Fragment,null,i.createElement(bI,null,t?null:i.createElement(EI,null,i.createElement(wI,{title:e||null}),i.createElement("div",{className:"toc-wrapper"}))))),{document:CI,window:AI}=wt,kI=({context:e,theme:t,children:r})=>{var a,o,l,s,u;let n;try{n=(o=(a=e.resolveOf("meta",["meta"]).preparedMeta.parameters)==null?void 0:a.docs)==null?void 0:o.toc}catch{n=(u=(s=(l=e==null?void 0:e.projectAnnotations)==null?void 0:l.parameters)==null?void 0:s.docs)==null?void 0:u.toc}return x.useEffect(()=>{let c;try{if(c=new URL(AI.parent.location.toString()),c.hash){let d=CI.getElementById(c.hash.substring(1));d&&setTimeout(()=>{WB(d)},200)}}catch{}}),i.createElement(lt.Provider,{value:e},i.createElement(KB,{channel:e.channel},i.createElement($g,{theme:W6(t)},i.createElement(MM,{toc:n?i.createElement(SI,{className:"sbdocs sbdocs-toc--custom",...n}):null},r))))},_I=/\s*\/\s*/,OI=e=>{let t=e.trim().split(_I);return t&&t[t.length-1]||e},TI=({children:e})=>{let t=x.useContext(lt),r=e||OI(t.storyById().title);return r?i.createElement($M,{className:"sbdocs-title sb-unstyled"},r):null},RI=({children:e})=>{var n;let t=x.useContext(lt),r=e||((n=t.storyById().parameters)==null?void 0:n.componentSubtitle);return r?i.createElement(FM,{className:"sbdocs-subtitle sb-unstyled"},r):null},$I=({children:e,disableAnchor:t})=>{if(t||typeof e!="string")return i.createElement(a1,null,e);let r=e.toLowerCase().replace(/[^a-z0-9]/gi,"-");return i.createElement(M1,{as:"h3",id:r},e)},Pv=({of:e,expanded:t=!0,withToolbar:r=!1,__forceInitialArgs:n=!1,__primary:a=!1})=>{var s,u;let{story:o}=ml(e||"story",["story"]),l=((u=(s=o.parameters.docs)==null?void 0:s.canvas)==null?void 0:u.withToolbar)??r;return i.createElement(Av,{storyId:o.id},t&&i.createElement(i.Fragment,null,i.createElement($I,null,o.name),i.createElement(O0,{of:e})),i.createElement(nI,{of:e,withToolbar:l,story:{__forceInitialArgs:n,__primary:a},source:{__forceInitialArgs:n}}))},FI=e=>{let{name:t,of:r}=e;if("of"in e&&r===void 0)throw new Error("Unexpected `of={undefined}`, did you mistype a CSF file reference?");let n=x.useContext(lt),a;if(r&&(a=ml(r||"meta",["meta"]).csfFile.stories[0]||null),!a){let o=t&&n.storyIdByName(t);a=n.storyById(o)}return t&&Fe(Qe`\`name\` prop is deprecated on the Primary block. The Primary block should only be used to render the primary story, which is automatically found. - `),a?i.createElement(Pv,{of:a.moduleExport,expanded:!1,__primary:!0,withToolbar:!0}):null},LI=({children:e,disableAnchor:t,...r})=>{if(t||typeof e!="string")return i.createElement(n1,null,e);let n=e.toLowerCase().replace(/[^a-z0-9]/gi,"-");return i.createElement(M1,{as:"h2",id:n,...r},e)},DI=T(LI)(({theme:e})=>({fontSize:`${e.typography.size.s2-1}px`,fontWeight:e.typography.weight.bold,lineHeight:"16px",letterSpacing:"0.35em",textTransform:"uppercase",color:e.textMutedColor,border:0,marginBottom:"12px","&:first-of-type":{marginTop:"56px"}})),MI=({title:e="Stories",includePrimary:t=!0})=>{let{componentStories:r}=x.useContext(lt),n=r().filter(a=>{var o,l;return!((l=(o=a.parameters)==null?void 0:o.docs)!=null&&l.disable)});return t||(n=n.slice(1)),!n||n.length===0?null:i.createElement(i.Fragment,null,i.createElement(DI,null,e),n.map(a=>a&&i.createElement(Pv,{key:a.id,of:a.moduleExport,expanded:!0,__forceInitialArgs:!0})))},PI=()=>{let e=ml("meta",["meta"]),{stories:t}=e.csfFile,r=Object.keys(t).length===1;return i.createElement(i.Fragment,null,i.createElement(TI,null),i.createElement(RI,null),i.createElement(O0,{of:"meta"}),r?i.createElement(O0,{of:"story"}):null,i.createElement(FI,null),i.createElement(iI,null),r?null:i.createElement(MI,null))};function BI({context:e,docsParameter:t}){let r=t.container||kI,n=t.page||PI;return i.createElement(r,{context:e,theme:t.theme},i.createElement(n,null))}var YI=({of:e})=>{let t=x.useContext(lt);e&&t.referenceMeta(e,!0);try{let r=t.storyById();return i.createElement(Av,{storyId:r.id})}catch{return null}},II={code:Fv,a:Lv,...Mv},NI=class extends x.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:i.createElement(i.Fragment,null,t)}},XI=class{constructor(){this.render=async(e,t,r)=>{let n={...II,...t==null?void 0:t.components},a=BI;return new Promise((o,l)=>{Jr(()=>import("./index-VcvA84b4.js"),__vite__mapDeps([9,10,1,2,3,4,5]),import.meta.url).then(({MDXProvider:s})=>bb(i.createElement(NI,{showException:l,key:Math.random()},i.createElement(s,{components:n},i.createElement(a,{context:e,docsParameter:t}))),r)).then(()=>o())})},this.unmount=e=>{Eb(e)}}};export{XI as D,jt as F,We as I,YI as M,i as R,Ud as S,M9 as T,Hw as W,gt as _,xh as a,q as b,uh as c,II as d,pI as e,_9 as f,Ht as g,In as m,T as n,x as r,qI as s}; + `),a?i.createElement(Pv,{of:a.moduleExport,expanded:!1,__primary:!0,withToolbar:!0}):null},LI=({children:e,disableAnchor:t,...r})=>{if(t||typeof e!="string")return i.createElement(n1,null,e);let n=e.toLowerCase().replace(/[^a-z0-9]/gi,"-");return i.createElement(M1,{as:"h2",id:n,...r},e)},DI=T(LI)(({theme:e})=>({fontSize:`${e.typography.size.s2-1}px`,fontWeight:e.typography.weight.bold,lineHeight:"16px",letterSpacing:"0.35em",textTransform:"uppercase",color:e.textMutedColor,border:0,marginBottom:"12px","&:first-of-type":{marginTop:"56px"}})),MI=({title:e="Stories",includePrimary:t=!0})=>{let{componentStories:r}=x.useContext(lt),n=r().filter(a=>{var o,l;return!((l=(o=a.parameters)==null?void 0:o.docs)!=null&&l.disable)});return t||(n=n.slice(1)),!n||n.length===0?null:i.createElement(i.Fragment,null,i.createElement(DI,null,e),n.map(a=>a&&i.createElement(Pv,{key:a.id,of:a.moduleExport,expanded:!0,__forceInitialArgs:!0})))},PI=()=>{let e=ml("meta",["meta"]),{stories:t}=e.csfFile,r=Object.keys(t).length===1;return i.createElement(i.Fragment,null,i.createElement(TI,null),i.createElement(RI,null),i.createElement(O0,{of:"meta"}),r?i.createElement(O0,{of:"story"}):null,i.createElement(FI,null),i.createElement(iI,null),r?null:i.createElement(MI,null))};function BI({context:e,docsParameter:t}){let r=t.container||kI,n=t.page||PI;return i.createElement(r,{context:e,theme:t.theme},i.createElement(n,null))}var YI=({of:e})=>{let t=x.useContext(lt);e&&t.referenceMeta(e,!0);try{let r=t.storyById();return i.createElement(Av,{storyId:r.id})}catch{return null}},II={code:Fv,a:Lv,...Mv},NI=class extends x.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:i.createElement(i.Fragment,null,t)}},XI=class{constructor(){this.render=async(e,t,r)=>{let n={...II,...t==null?void 0:t.components},a=BI;return new Promise((o,l)=>{Jr(()=>import("./index-4Ictftwa.js"),__vite__mapDeps([9,10,1,2,3,4,5]),import.meta.url).then(({MDXProvider:s})=>bb(i.createElement(NI,{showException:l,key:Math.random()},i.createElement(s,{components:n},i.createElement(a,{context:e,docsParameter:t}))),r)).then(()=>o())})},this.unmount=e=>{Eb(e)}}};export{XI as D,jt as F,We as I,YI as M,i as R,Ud as S,M9 as T,Hw as W,gt as _,xh as a,q as b,uh as c,II as d,pI as e,_9 as f,Ht as g,In as m,T as n,x as r,qI as s}; function __vite__mapDeps(indexes) { if (!__vite__mapDeps.viteFileDeps) { - __vite__mapDeps.viteFileDeps = ["./syntaxhighlighter-V7JZZA35-pXt8-oeo.js","./iframe-buw_4q-p.js","./_commonjsHelpers-5-cIlDoe.js","./_commonjs-dynamic-modules-h-SxKiO4.js","./index-xLzVGzoy.js","./index-PPLHz8o0.js","./formatter-SWP5E3XI-bMS14_IU.js","./WithTooltip-V3YHNWJZ-pCRHT9Pt.js","./Color-6VNJS4EI-rCh2FLnW.js","./index-VcvA84b4.js","./index-67XRIn5y.js"] + __vite__mapDeps.viteFileDeps = ["./syntaxhighlighter-V7JZZA35-o-V-ZA-0.js","./iframe--l1y4VEe.js","./_commonjsHelpers-5-cIlDoe.js","./_commonjs-dynamic-modules-h-SxKiO4.js","./index-xLzVGzoy.js","./index-PPLHz8o0.js","./formatter-SWP5E3XI-MxGObe6j.js","./WithTooltip-V3YHNWJZ-CZ8Eb387.js","./Color-6VNJS4EI-2sKJBn8q.js","./index-4Ictftwa.js","./index-4jv1rO9F.js"] } return indexes.map((i) => __vite__mapDeps.viteFileDeps[i]) } \ No newline at end of file diff --git a/docs/assets/combobox.stories-vKNftdZk.js b/docs/assets/combobox.stories-GaExYD65.js similarity index 50% rename from docs/assets/combobox.stories-vKNftdZk.js rename to docs/assets/combobox.stories-GaExYD65.js index 7dbb2110d..6a502b065 100644 --- a/docs/assets/combobox.stories-vKNftdZk.js +++ b/docs/assets/combobox.stories-GaExYD65.js @@ -1,4 +1,4 @@ -import{b as se,a as le}from"./utils-NX-dnf4r.js";import{t as F}from"./index-iqhZMf16.js";import{t as R,r as N,b as P,g as c,h as ce,f as x,p as f,d as K}from"./registry-EgEQwbXk.js";/* empty css *//* empty css */import{_ as de}from"./dynamic-tag-7vXwaVzE.js";import{_ as re}from"./index-gv9zfHFq.js";import{_ as D}from"./render-tag-_0PNNh6Y.js";import"./preserve-attrs-lolIpBRv.js";import{s as me,c as ue}from"./index-QozpcpzM.js";import{s as pe}from"./index-4ijq5S5t.js";import{s as he}from"./index-l3FQEXUN.js";import{c as be,d as xe,h as fe,e as ge}from"./index--8xUDD5P.js";import{_ as ye}from"./self-iterator-6yU_KG2T.js";import"./_commonjsHelpers-5-cIlDoe.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";import"./index-eucXA0ea.js";/* empty css */import"./index-J8CKH9U9.js";import"./index-QGVtTfuc.js";import"./index-ERL0bCNR.js";const Ce=`

+import{b as se,a as le}from"./utils-NX-dnf4r.js";import{t as R}from"./index-iqhZMf16.js";import{t as N,r as P,b as K,g as c,h as ce,f as x,p as f,d as D}from"./registry-EgEQwbXk.js";/* empty css *//* empty css */import{_ as de}from"./dynamic-tag-7vXwaVzE.js";import{_ as re}from"./index-gv9zfHFq.js";import{_ as U}from"./render-tag-_0PNNh6Y.js";import"./preserve-attrs-lolIpBRv.js";import{s as me,c as ue}from"./index-QozpcpzM.js";import{s as pe}from"./index-4ijq5S5t.js";import{s as he}from"./index-l3FQEXUN.js";import{c as be,d as xe,h as fe,e as ge}from"./index--8xUDD5P.js";import{_ as ye}from"./self-iterator-6yU_KG2T.js";import"./_commonjsHelpers-5-cIlDoe.js";import"./_commonjs-dynamic-modules-h-SxKiO4.js";import"./index-eucXA0ea.js";/* empty css */import"./index-J8CKH9U9.js";import"./index-QGVtTfuc.js";import"./index-ERL0bCNR.js";const Ce=`

ebay-combobox @@ -14,7 +14,7 @@ The \`\` is a combination of a text \`\`, and a listbox (\ - [Storybook](https://ebay.github.io/ebayui-core/?path=/story/form-input-ebay-combobox) - [Storybook Docs](https://ebay.github.io/ebayui-core/?path=/docs/form-input-ebay-combobox) - [Code Examples](https://github.com/eBay/ebayui-core/tree/master/src/components/ebay-combobox/examples) -`;function Se(n=""){return new RegExp(n.trim().replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"),"i")}let ve=class extends Marko.Component{focus(){this.getEl("combobox").focus()}handleFocus(){this._emitComboboxEvent("focus")}isExpanded(){return this.expander&&this.expander.expanded}isCollapsed(){return this.expander&&!this.expander.expanded}expand(){this.isCollapsed()&&(this.expander.expanded=!0)}collapse(){this.isExpanded()&&(this.expander.expanded=!1)}handleButtonClick(e){this.buttonClicked=!0,this.emit("button-click",{originalEvent:e})}handleActiveDescendantChange(e){if(this.listSelection==="automatic"){const a=this._getVisibleOptions()[e.detail.toIndex];this.getEl("combobox").value=a.text}}setSelectedView(){const e=this._getVisibleOptions().indexOf(this._getSelectedOption());this.activeDescendant.index=e;const a=this.getEls("options")[e];a&&me(a)}handleExpand(){this.state.viewAllOptions?this.setSelectedView():(this.state.viewAllOptions=!0,this.once("update",()=>{this.setSelectedView()})),this.emit("expand")}handleCollapse(){this.activeDescendant.reset(),this.emit("collapse")}handleComboboxClick(e){e.target===document.activeElement&&this.expand()}handleComboboxKeyDown(e){be(e,()=>{e.preventDefault(),this.expand()}),xe(e,()=>{if(this.isExpanded()){const a=this.activeDescendant.index;a!==-1&&this._setSelectedText(this._getVisibleOptions()[a].text),this.input.expanded!==!0&&this.collapse()}}),fe(e,()=>{this.collapse()})}handleComboboxKeyUp(e){ge(e,()=>{this.state.currentValue=this.getEl("combobox").value,this.once("update",()=>{this.expand()}),this.state.viewAllOptions=!1,this._emitComboboxEvent("input-change")})}handleComboboxBlur(){const e=this.optionClicked;e&&this.focus(),!e&&!this.buttonClicked&&this.input.expanded!==!0&&this.collapse(),this.buttonClicked=!1;const a=this.getEl("combobox");this.listSelection==="automatic"&&a.value!==this.state.currentValue&&(this.state.currentValue=a.value),this.lastValue!==this.state.currentValue&&(this.lastValue=this.state.currentValue,this._emitComboboxEvent("change"))}handleSelectOption(e){this._setSelectedText(e)}handleFloatingLabelInit(){this._emitComboboxEvent("floating-label-init")}onInput(e){this.autocomplete=e.autocomplete==="list"?"list":"none",this.listSelection=e.listSelection==="manual"?"manual":"automatic",e.options=e.options||[],this.lastValue=e.value,this.state={currentValue:this.lastValue,viewAllOptions:this.state&&this.state.viewAllOptions||!0},this.expander&&(this.expandedChange=e.expanded!==this.expanded,this.expandedChange&&(this.expander.expanded=e.expanded)),this.expanded=e.expanded}onMount(){this._setupMakeup()}onUpdate(){this._setupMakeup()}onRender(){typeof window<"u"&&this._cleanupMakeup()}onDestroy(){this._cleanupMakeup()}_setupFloatingLabel(){this._floatingLabel?(this._floatingLabel.refresh(),this.handleFloatingLabelInit()):document.readyState==="complete"?this.el&&(this._floatingLabel=new pe(this.el),this.handleFloatingLabelInit()):this.subscribeTo(window).once("load",()=>{this._setupFloatingLabel()})}_setupMakeup(){this._hasVisibleOptions()&&(this.activeDescendant||(this.activeDescendant=ue(this.el,this.getEl("combobox"),this.getEl("listbox"),'[role="option"]',{activeDescendantClassName:"combobox__option--active",autoInit:-1,autoReset:-1,axis:"y",autoScroll:!0})),this.expander||(this.expander=new he(this.el,{autoCollapse:!this.expanded,expandOnFocus:!0,collapseOnFocusOut:!this.expanded&&!this.input.button,contentSelector:'[role="listbox"]',hostSelector:'[role="combobox"]',expandedClass:"combobox--expanded",simulateSpacebarClick:!0})),this.expandedChange&&(this.expander.expanded=this.expanded,this.expandedChange=!1)),this.input.floatingLabel&&this._setupFloatingLabel()}_cleanupMakeup(){this.activeDescendant&&(this.activeDescendant.reset(),this.activeDescendant.destroy(),this.activeDescendant=null),this.expander&&(this.expander.destroy(),this.expander=null),this._floatingLabel&&(this._floatingLabel.destroy(),this._floatingLabel=null)}_setSelectedText(e){if(this.state.currentValue!==e){const a=this.getEl("combobox");this.state.currentValue=a.value=e,a.selectionStart=a.selectionEnd=e.length,a.focus(),this._emitComboboxEvent("select")}}_getSelectedOption(){return this.input.options.find(e=>e.text===this.state.currentValue)}_getVisibleOptions(){var a;if(this.autocomplete==="none"||this.state.viewAllOptions)return this.input.options;const e=Se((a=this.state.currentValue)==null?void 0:a.toString());return this.input.options.filter(t=>e.test(t.text||"")||t.sticky)}_hasVisibleOptions(){return!this.input.disabled&&this._getVisibleOptions().length>0}_emitComboboxEvent(e){this.emit(`${e}`,{currentInputValue:this.state.currentValue,selectedOption:this._getSelectedOption(),options:this.input.options})}};const g="ypw76W2j",d=R(g),U=d;N.r(g,()=>d);const H=ve;d._=P(function(n,e,a,t,o,Z){const{class:m,id:u,button:C,disabled:z,style:Y,borderless:$,autocomplete:_e,options:Me,roledescription:j=`Use up and down arrow keys to navigate options.${t.autocomplete==="none"?"":" Options change based on text input"}`,floatingLabel:b,listSelection:Ie,expanded:Te,fluid:S,...Q}=n,{class:q,renderBody:v,...X}=C||{};var w=!!C,ee=S?"div":"span",_=u||t.getElId("input");e.be(ee,{class:c(["combobox",b&&"floating-label",S&&"combobox--fluid",m]),style:ce(Y)},"0",t,null,1,{onactiveDescendantChange:a.d("activeDescendantChange","handleActiveDescendantChange",!1),"onexpander-expand":a.d("expander-expand","handleExpand",!1),"onexpander-collapse":a.d("expander-collapse","handleCollapse",!1)}),b&&(e.be("label",{for:_,class:c(["floating-label__label",z&&"floating-label__label--disabled"])},"1",t,null,0),e.t(b,t),e.ee()),e.be("span",{class:c(["combobox__control",w&&"combobox__control--actionable",$&&"combobox__control--borderless"])},"2",t,null,1);{e.e("input",x(f(Q),{id:_,type:"text",role:"combobox",value:o.currentValue,"aria-autocomplete":t.autocomplete,"aria-roledescription":j,"aria-haspopup":"listbox",autocomplete:"off","aria-expanded":"false"}),"@combobox",t,0,4,{onblur:a.d("blur","handleComboboxBlur",!1),onclick:a.d("click","handleComboboxClick",!1),onfocus:a.d("focus","handleFocus",!1),onkeydown:a.d("keydown","handleComboboxKeyDown",!1),onkeyup:a.d("keyup","handleComboboxKeyUp",!1)});const l=w?"button":null;l?e.be(l,x(f(X),{class:c(["icon-btn","icon-btn--transparent",q])}),"@actionable",t,null,4,{onclick:a.d("click","handleButtonClick",!1)}):e.bf("f_@actionable",t),v?de(e,v,null,null,null,null,a,"3"):D(re,{},e,a,"4"),l?e.ee():e.ef()}if(e.ee(),t._hasVisibleOptions()){e.be("div",{role:"listbox",class:"combobox__listbox"},"@listbox",t,null,0);for(const l of t._getVisibleOptions()||[]){const{text:p,value:te,class:ne,...oe}=l;var ae=(te||p)===o.currentValue;const M="@options[]",ie=`[${M}]`;e.be("div",x(f(oe),{role:"option",class:c(["combobox__option",ne]),tabindex:"-1","aria-selected":ae&&"true"}),M,t,null,4,{pa:["class","tabindex"],onclick:a.d("click","handleSelectOption",!1,[p]),onmousedown:a.d("mousedown","handleSelectOption",!1,[p])}),e.be("span",null,"5"+ie,t,null,0),e.t(p,t),e.ee(),e.ee()}e.ee()}e.ee()},{t:g},H);d.Component=K(H,d._);const I=[{name:"Afghanistan",code:"AF"},{name:"Ã…landIslands",code:"AX"},{name:"Albania",code:"AL"},{name:"Algeria",code:"DZ"},{name:"AmericanSamoa",code:"AS"},{name:"AndorrA",code:"AD"},{name:"Angola",code:"AO"},{name:"Anguilla",code:"AI"},{name:"Antarctica",code:"AQ"},{name:"Antiguaand Barbuda",code:"AG"},{name:"Argentina",code:"AR"},{name:"Armenia",code:"AM"},{name:"Aruba",code:"AW"},{name:"Australia",code:"AU"},{name:"Austria",code:"AT"},{name:"Azerbaijan",code:"AZ"},{name:"Bahamas",code:"BS"},{name:"Bahrain",code:"BH"},{name:"Bangladesh",code:"BD"},{name:"Barbados",code:"BB"},{name:"Belarus",code:"BY"},{name:"Belgium",code:"BE"},{name:"Belize",code:"BZ"},{name:"Benin",code:"BJ"},{name:"Bermuda",code:"BM"},{name:"Bhutan",code:"BT"},{name:"Bolivia",code:"BO"},{name:"Bosniaand Herzegovina",code:"BA"},{name:"Botswana",code:"BW"},{name:"BouvetIsland",code:"BV"},{name:"Brazil",code:"BR"},{name:"BritishIndian Ocean Territory",code:"IO"},{name:"BruneiDarussalam",code:"BN"},{name:"Bulgaria",code:"BG"},{name:"BurkinaFaso",code:"BF"},{name:"Burundi",code:"BI"},{name:"Cambodia",code:"KH"},{name:"Cameroon",code:"CM"},{name:"Canada",code:"CA"},{name:"CapeVerde",code:"CV"},{name:"CaymanIslands",code:"KY"},{name:"CentralAfrican Republic",code:"CF"},{name:"Chad",code:"TD"},{name:"Chile",code:"CL"},{name:"China",code:"CN"},{name:"ChristmasIsland",code:"CX"},{name:"Cocos(Keeling) Islands",code:"CC"},{name:"Colombia",code:"CO"},{name:"Comoros",code:"KM"},{name:"Congo",code:"CG"},{name:"Congo The Democratic Republic of the",code:"CD"},{name:"CookIslands",code:"CK"},{name:"CostaRica",code:"CR"},{name:"CoteD'Ivoire",code:"CI"},{name:"Croatia",code:"HR"},{name:"Cuba",code:"CU"},{name:"Cyprus",code:"CY"},{name:"CzechRepublic",code:"CZ"},{name:"Denmark",code:"DK"},{name:"Djibouti",code:"DJ"},{name:"Dominica",code:"DM"},{name:"DominicanRepublic",code:"DO"},{name:"Ecuador",code:"EC"},{name:"Egypt",code:"EG"},{name:"ElSalvador",code:"SV"},{name:"EquatorialGuinea",code:"GQ"},{name:"Eritrea",code:"ER"},{name:"Estonia",code:"EE"},{name:"Ethiopia",code:"ET"},{name:"FalklandIslands (Malvinas)",code:"FK"},{name:"FaroeIslands",code:"FO"},{name:"Fiji",code:"FJ"},{name:"Finland",code:"FI"},{name:"France",code:"FR"},{name:"FrenchGuiana",code:"GF"},{name:"FrenchPolynesia",code:"PF"},{name:"FrenchSouthern Territories",code:"TF"},{name:"Gabon",code:"GA"},{name:"Gambia",code:"GM"},{name:"Georgia",code:"GE"},{name:"Germany",code:"DE"},{name:"Ghana",code:"GH"},{name:"Gibraltar",code:"GI"},{name:"Greece",code:"GR"},{name:"Greenland",code:"GL"},{name:"Grenada",code:"GD"},{name:"Guadeloupe",code:"GP"},{name:"Guam",code:"GU"},{name:"Guatemala",code:"GT"},{name:"Guernsey",code:"GG"},{name:"Guinea",code:"GN"},{name:"GuineaBissau",code:"GW"},{name:"Guyana",code:"GY"},{name:"Haiti",code:"HT"},{name:"HeardIsland and Mcdonald Islands",code:"HM"},{name:"HolySee (Vatican City State)",code:"VA"},{name:"Honduras",code:"HN"},{name:"HongKong",code:"HK"},{name:"Hungary",code:"HU"},{name:"Iceland",code:"IS"},{name:"India",code:"IN"},{name:"Indonesia",code:"ID"},{name:"Iran Islamic Republic Of",code:"IR"},{name:"Iraq",code:"IQ"},{name:"Ireland",code:"IE"},{name:"Isleof Man",code:"IM"},{name:"Israel",code:"IL"},{name:"Italy",code:"IT"},{name:"Jamaica",code:"JM"},{name:"Japan",code:"JP"},{name:"Jersey",code:"JE"},{name:"Jordan",code:"JO"},{name:"Kazakhstan",code:"KZ"},{name:"Kenya",code:"KE"},{name:"Kiribati",code:"KI"},{name:"Korea Democratic People'S Republic of",code:"KP"},{name:"Korea Republic of",code:"KR"},{name:"Kuwait",code:"KW"},{name:"Kyrgyzstan",code:"KG"},{name:"LaoPeopleS Democratic Republic",code:"LA"},{name:"Latvia",code:"LV"},{name:"Lebanon",code:"LB"},{name:"Lesotho",code:"LS"},{name:"Liberia",code:"LR"},{name:"LibyanArab Jamahiriya",code:"LY"},{name:"Liechtenstein",code:"LI"},{name:"Lithuania",code:"LT"},{name:"Luxembourg",code:"LU"},{name:"Macao",code:"MO"},{name:"Macedonia The Former Yugoslav Republic of",code:"MK"},{name:"Madagascar",code:"MG"},{name:"Malawi",code:"MW"},{name:"Malaysia",code:"MY"},{name:"Maldives",code:"MV"},{name:"Mali",code:"ML"},{name:"Malta",code:"MT"},{name:"MarshallIslands",code:"MH"},{name:"Martinique",code:"MQ"},{name:"Mauritania",code:"MR"},{name:"Mauritius",code:"MU"},{name:"Mayotte",code:"YT"},{name:"Mexico",code:"MX"},{name:"Micronesia Federated States of",code:"FM"},{name:"Moldova Republic of",code:"MD"},{name:"Monaco",code:"MC"},{name:"Mongolia",code:"MN"},{name:"Montserrat",code:"MS"},{name:"Morocco",code:"MA"},{name:"Mozambique",code:"MZ"},{name:"Myanmar",code:"MM"},{name:"Namibia",code:"NA"},{name:"Nauru",code:"NR"},{name:"Nepal",code:"NP"},{name:"Netherlands",code:"NL"},{name:"NetherlandsAntilles",code:"AN"},{name:"NewCaledonia",code:"NC"},{name:"NewZealand",code:"NZ"},{name:"Nicaragua",code:"NI"},{name:"Niger",code:"NE"},{name:"Nigeria",code:"NG"},{name:"Niue",code:"NU"},{name:"NorfolkIsland",code:"NF"},{name:"NorthernMariana Islands",code:"MP"},{name:"Norway",code:"NO"},{name:"Oman",code:"OM"},{name:"Pakistan",code:"PK"},{name:"Palau",code:"PW"},{name:"PalestinianTerritory Occupied",code:"PS"},{name:"Panama",code:"PA"},{name:"PapuaNew Guinea",code:"PG"},{name:"Paraguay",code:"PY"},{name:"Peru",code:"PE"},{name:"Philippines",code:"PH"},{name:"Pitcairn",code:"PN"},{name:"Poland",code:"PL"},{name:"Portugal",code:"PT"},{name:"PuertoRico",code:"PR"},{name:"Qatar",code:"QA"},{name:"Reunion",code:"RE"},{name:"Romania",code:"RO"},{name:"RussianFederation",code:"RU"},{name:"RWANDA",code:"RW"},{name:"SaintHelena",code:"SH"},{name:"SaintKitts and Nevis",code:"KN"},{name:"SaintLucia",code:"LC"},{name:"SaintPierre and Miquelon",code:"PM"},{name:"SaintVincent and the Grenadines",code:"VC"},{name:"Samoa",code:"WS"},{name:"SanMarino",code:"SM"},{name:"SaoTome and Principe",code:"ST"},{name:"SaudiArabia",code:"SA"},{name:"Senegal",code:"SN"},{name:"Serbiaand Montenegro",code:"CS"},{name:"Seychelles",code:"SC"},{name:"SierraLeone",code:"SL"},{name:"Singapore",code:"SG"},{name:"Slovakia",code:"SK"},{name:"Slovenia",code:"SI"},{name:"SolomonIslands",code:"SB"},{name:"Somalia",code:"SO"},{name:"SouthAfrica",code:"ZA"},{name:"SouthGeorgia and the South Sandwich Islands",code:"GS"},{name:"Spain",code:"ES"},{name:"SriLanka",code:"LK"},{name:"Sudan",code:"SD"},{name:"Suriname",code:"SR"},{name:"Svalbardand Jan Mayen",code:"SJ"},{name:"Swaziland",code:"SZ"},{name:"Sweden",code:"SE"},{name:"Switzerland",code:"CH"},{name:"SyrianArab Republic",code:"SY"},{name:"Taiwan Province of China",code:"TW"},{name:"Tajikistan",code:"TJ"},{name:"Tanzania United Republic of",code:"TZ"},{name:"Thailand",code:"TH"},{name:"TimorLeste",code:"TL"},{name:"Togo",code:"TG"},{name:"Tokelau",code:"TK"},{name:"Tonga",code:"TO"},{name:"Trinidadand Tobago",code:"TT"},{name:"Tunisia",code:"TN"},{name:"Turkey",code:"TR"},{name:"Turkmenistan",code:"TM"},{name:"Turksand Caicos Islands",code:"TC"},{name:"Tuvalu",code:"TV"},{name:"Uganda",code:"UG"},{name:"Ukraine",code:"UA"},{name:"UnitedArab Emirates",code:"AE"},{name:"UnitedKingdom",code:"GB"},{name:"United States",code:"US"},{name:"United States Minor Outlying Islands",code:"UM"},{name:"Uruguay",code:"UY"},{name:"Uzbekistan",code:"UZ"},{name:"Vanuatu",code:"VU"},{name:"Venezuela",code:"VE"},{name:"VietNam",code:"VN"},{name:"VirginIslands British",code:"VG"},{name:"VirginIslands U.S.",code:"VI"},{name:"Wallisand Futuna",code:"WF"},{name:"WesternSahara",code:"EH"},{name:"Yemen",code:"YE"},{name:"Zambia",code:"ZM"},{name:"Zimbabwe",code:"ZW"}],y="R7m3T9Fv",r=R(y);N.r(y,()=>r);const J={onCreate(){this.state={options:I,autocompleteOption:"none",value:""}},async inputChange({currentInputValue:n},{el:e,index:a,selected:t}){this.state.autocompleteOption="none",this.state.value=n;const o=await this.searchCountry(n);this.state.options=o,this.state.autocompleteOption="list"},async searchCountry(n){return new Promise(e=>{clearTimeout(this.timeout),this.timeout=setTimeout(()=>{const a=I.filter(t=>t.name.toLowerCase().startsWith(n.toLowerCase())).slice(0,10);e(a)},500)})},selected(n){console.log("selected",n)}};r._=P(function(n,e,a,t,o,Z){const m=[];for(const u of o.options||[])m.push({dataId:u.code,text:u.name,[Symbol.iterator]:ye});D(U,{...n,name:"example2text",autocomplete:o.autocompleteOption,value:o.value,options:m},e,a,"0",[["input-change","inputChange",!1],["select","selected",!1]])},{t:y},J);r.Component=K(J,r._);const we=`import countryList from './data.json'; +`;function Se(n=""){return new RegExp(n.trim().replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"),"i")}let ve=class extends Marko.Component{focus(){this.getEl("combobox").focus()}handleFocus(){this._emitComboboxEvent("focus")}isExpanded(){return this.expander&&this.expander.expanded}isCollapsed(){return this.expander&&!this.expander.expanded}expand(){this.isCollapsed()&&(this.expander.expanded=!0)}collapse(){this.isExpanded()&&(this.expander.expanded=!1)}handleButtonClick(e){this.buttonClicked=!0,this.emit("button-click",{originalEvent:e})}handleActiveDescendantChange(e){if(this.listSelection==="automatic"){const a=this._getVisibleOptions()[e.detail.toIndex];this.getEl("combobox").value=a.text}}setSelectedView(){const e=this._getVisibleOptions().indexOf(this._getSelectedOption());this.activeDescendant.index=e;const a=this.getEls("options")[e];a&&me(a)}handleExpand(){this.state.viewAllOptions?this.setSelectedView():(this.state.viewAllOptions=!0,this.once("update",()=>{this.setSelectedView()})),this.emit("expand")}handleCollapse(){this.activeDescendant.reset(),this.emit("collapse")}handleComboboxClick(e){e.target===document.activeElement&&this.expand()}handleComboboxKeyDown(e){be(e,()=>{e.preventDefault(),this.expand()}),xe(e,()=>{if(this.isExpanded()){const a=this.activeDescendant.index;a!==-1&&this._setSelectedText(this._getVisibleOptions()[a].text),this.input.expanded!==!0&&this.collapse()}}),fe(e,()=>{this.collapse()})}handleComboboxKeyUp(e){ge(e,()=>{this.state.currentValue=this.getEl("combobox").value,this.once("update",()=>{this.expand()}),this.state.viewAllOptions=!1,this._emitComboboxEvent("input-change")})}handleComboboxBlur(){const e=this.optionClicked;e&&this.focus(),!e&&!this.buttonClicked&&this.input.expanded!==!0&&this.collapse(),this.buttonClicked=!1;const a=this.getEl("combobox");this.listSelection==="automatic"&&a.value!==this.state.currentValue&&(this.state.currentValue=a.value),this.lastValue!==this.state.currentValue&&(this.lastValue=this.state.currentValue,this._emitComboboxEvent("change"))}handleSelectOption(e){this._setSelectedText(e)}handleFloatingLabelInit(){this._emitComboboxEvent("floating-label-init")}onInput(e){this.autocomplete=e.autocomplete==="list"?"list":"none",this.listSelection=e.listSelection==="manual"?"manual":"automatic",e.options=e.options||[],this.lastValue=e.value,this.state={currentValue:this.lastValue,viewAllOptions:this.state&&this.state.viewAllOptions||!0},this.expander&&(this.expandedChange=e.expanded!==this.expanded,this.expandedChange&&(this.expander.expanded=e.expanded)),this.expanded=e.expanded}onMount(){this._setupMakeup()}onUpdate(){this._setupMakeup()}onRender(){typeof window<"u"&&this._cleanupMakeup()}onDestroy(){this._cleanupMakeup()}_setupFloatingLabel(){this._floatingLabel?(this._floatingLabel.refresh(),this.handleFloatingLabelInit()):document.readyState==="complete"?this.el&&(this._floatingLabel=new pe(this.el),this.handleFloatingLabelInit()):this.subscribeTo(window).once("load",()=>{this._setupFloatingLabel()})}_setupMakeup(){this._hasVisibleOptions()&&(this.activeDescendant||(this.activeDescendant=ue(this.el,this.getEl("combobox"),this.getEl("listbox"),'[role="option"]',{activeDescendantClassName:"combobox__option--active",autoInit:-1,autoReset:-1,axis:"y",autoScroll:!0})),this.expander||(this.expander=new he(this.el,{autoCollapse:!this.expanded,expandOnFocus:!0,collapseOnFocusOut:!this.expanded&&!this.input.button,contentSelector:'[role="listbox"]',hostSelector:'[role="combobox"]',expandedClass:"combobox--expanded",simulateSpacebarClick:!0})),this.expandedChange&&(this.expander.expanded=this.expanded,this.expandedChange=!1)),this.input.floatingLabel&&this._setupFloatingLabel()}_cleanupMakeup(){this.activeDescendant&&(this.activeDescendant.reset(),this.activeDescendant.destroy(),this.activeDescendant=null),this.expander&&(this.expander.destroy(),this.expander=null),this._floatingLabel&&(this._floatingLabel.destroy(),this._floatingLabel=null)}_setSelectedText(e){if(this.state.currentValue!==e){const a=this.getEl("combobox");this.state.currentValue=a.value=e,a.selectionStart=a.selectionEnd=e.length,a.focus(),this._emitComboboxEvent("select")}}_getSelectedOption(){return this.input.options.find(e=>e.text===this.state.currentValue)}_getVisibleOptions(){var a;if(this.autocomplete==="none"||this.state.viewAllOptions)return this.input.options;const e=Se((a=this.state.currentValue)==null?void 0:a.toString());return this.input.options.filter(t=>e.test(t.text||"")||t.sticky)}_hasVisibleOptions(){return!this.input.disabled&&this._getVisibleOptions().length>0}_emitComboboxEvent(e){this.emit(`${e}`,{currentInputValue:this.state.currentValue,selectedOption:this._getSelectedOption(),options:this.input.options})}};const g="ypw76W2j",d=N(g),H=d;P.r(g,()=>d);const J=ve;d._=K(function(n,e,a,t,o,z){const{class:m,id:u,button:C,disabled:S,style:Y,borderless:$,autocomplete:_e,options:Me,roledescription:j=`Use up and down arrow keys to navigate options.${t.autocomplete==="none"?"":" Options change based on text input"}`,floatingLabel:b,listSelection:Ie,expanded:Te,fluid:v,...Q}=n,{class:q,renderBody:w,...X}=C||{};var _=!!C,ee=v?"div":"span",M=u||t.getElId("input");e.be(ee,{class:c(["combobox",b&&"floating-label",v&&"combobox--fluid",m]),style:ce(Y)},"0",t,null,1,{onactiveDescendantChange:a.d("activeDescendantChange","handleActiveDescendantChange",!1),"onexpander-expand":a.d("expander-expand","handleExpand",!1),"onexpander-collapse":a.d("expander-collapse","handleCollapse",!1)}),b&&(e.be("label",{for:M,class:c(["floating-label__label",S&&"floating-label__label--disabled"])},"1",t,null,0),e.t(b,t),e.ee()),e.be("span",{class:c(["combobox__control",_&&"combobox__control--actionable",$&&"combobox__control--borderless"])},"2",t,null,1);{e.e("input",x(f(Q),{id:M,type:"text",role:"combobox",disabled:S,value:o.currentValue,"aria-autocomplete":t.autocomplete,"aria-roledescription":j,"aria-haspopup":"listbox",autocomplete:"off","aria-expanded":"false"}),"@combobox",t,0,4,{onblur:a.d("blur","handleComboboxBlur",!1),onclick:a.d("click","handleComboboxClick",!1),onfocus:a.d("focus","handleFocus",!1),onkeydown:a.d("keydown","handleComboboxKeyDown",!1),onkeyup:a.d("keyup","handleComboboxKeyUp",!1)});const l=_?"button":null;l?e.be(l,x(f(X),{class:c(["icon-btn","icon-btn--transparent",q])}),"@actionable",t,null,4,{onclick:a.d("click","handleButtonClick",!1)}):e.bf("f_@actionable",t),w?de(e,w,null,null,null,null,a,"3"):U(re,{},e,a,"4"),l?e.ee():e.ef()}if(e.ee(),t._hasVisibleOptions()){e.be("div",{role:"listbox",class:"combobox__listbox"},"@listbox",t,null,0);for(const l of t._getVisibleOptions()||[]){const{text:p,value:te,class:ne,...oe}=l;var ae=(te||p)===o.currentValue;const I="@options[]",ie=`[${I}]`;e.be("div",x(f(oe),{role:"option",class:c(["combobox__option",ne]),tabindex:"-1","aria-selected":ae&&"true"}),I,t,null,4,{pa:["class","tabindex"],onclick:a.d("click","handleSelectOption",!1,[p]),onmousedown:a.d("mousedown","handleSelectOption",!1,[p])}),e.be("span",null,"5"+ie,t,null,0),e.t(p,t),e.ee(),e.ee()}e.ee()}e.ee()},{t:g},J);d.Component=D(J,d._);const T=[{name:"Afghanistan",code:"AF"},{name:"Ã…landIslands",code:"AX"},{name:"Albania",code:"AL"},{name:"Algeria",code:"DZ"},{name:"AmericanSamoa",code:"AS"},{name:"AndorrA",code:"AD"},{name:"Angola",code:"AO"},{name:"Anguilla",code:"AI"},{name:"Antarctica",code:"AQ"},{name:"Antiguaand Barbuda",code:"AG"},{name:"Argentina",code:"AR"},{name:"Armenia",code:"AM"},{name:"Aruba",code:"AW"},{name:"Australia",code:"AU"},{name:"Austria",code:"AT"},{name:"Azerbaijan",code:"AZ"},{name:"Bahamas",code:"BS"},{name:"Bahrain",code:"BH"},{name:"Bangladesh",code:"BD"},{name:"Barbados",code:"BB"},{name:"Belarus",code:"BY"},{name:"Belgium",code:"BE"},{name:"Belize",code:"BZ"},{name:"Benin",code:"BJ"},{name:"Bermuda",code:"BM"},{name:"Bhutan",code:"BT"},{name:"Bolivia",code:"BO"},{name:"Bosniaand Herzegovina",code:"BA"},{name:"Botswana",code:"BW"},{name:"BouvetIsland",code:"BV"},{name:"Brazil",code:"BR"},{name:"BritishIndian Ocean Territory",code:"IO"},{name:"BruneiDarussalam",code:"BN"},{name:"Bulgaria",code:"BG"},{name:"BurkinaFaso",code:"BF"},{name:"Burundi",code:"BI"},{name:"Cambodia",code:"KH"},{name:"Cameroon",code:"CM"},{name:"Canada",code:"CA"},{name:"CapeVerde",code:"CV"},{name:"CaymanIslands",code:"KY"},{name:"CentralAfrican Republic",code:"CF"},{name:"Chad",code:"TD"},{name:"Chile",code:"CL"},{name:"China",code:"CN"},{name:"ChristmasIsland",code:"CX"},{name:"Cocos(Keeling) Islands",code:"CC"},{name:"Colombia",code:"CO"},{name:"Comoros",code:"KM"},{name:"Congo",code:"CG"},{name:"Congo The Democratic Republic of the",code:"CD"},{name:"CookIslands",code:"CK"},{name:"CostaRica",code:"CR"},{name:"CoteD'Ivoire",code:"CI"},{name:"Croatia",code:"HR"},{name:"Cuba",code:"CU"},{name:"Cyprus",code:"CY"},{name:"CzechRepublic",code:"CZ"},{name:"Denmark",code:"DK"},{name:"Djibouti",code:"DJ"},{name:"Dominica",code:"DM"},{name:"DominicanRepublic",code:"DO"},{name:"Ecuador",code:"EC"},{name:"Egypt",code:"EG"},{name:"ElSalvador",code:"SV"},{name:"EquatorialGuinea",code:"GQ"},{name:"Eritrea",code:"ER"},{name:"Estonia",code:"EE"},{name:"Ethiopia",code:"ET"},{name:"FalklandIslands (Malvinas)",code:"FK"},{name:"FaroeIslands",code:"FO"},{name:"Fiji",code:"FJ"},{name:"Finland",code:"FI"},{name:"France",code:"FR"},{name:"FrenchGuiana",code:"GF"},{name:"FrenchPolynesia",code:"PF"},{name:"FrenchSouthern Territories",code:"TF"},{name:"Gabon",code:"GA"},{name:"Gambia",code:"GM"},{name:"Georgia",code:"GE"},{name:"Germany",code:"DE"},{name:"Ghana",code:"GH"},{name:"Gibraltar",code:"GI"},{name:"Greece",code:"GR"},{name:"Greenland",code:"GL"},{name:"Grenada",code:"GD"},{name:"Guadeloupe",code:"GP"},{name:"Guam",code:"GU"},{name:"Guatemala",code:"GT"},{name:"Guernsey",code:"GG"},{name:"Guinea",code:"GN"},{name:"GuineaBissau",code:"GW"},{name:"Guyana",code:"GY"},{name:"Haiti",code:"HT"},{name:"HeardIsland and Mcdonald Islands",code:"HM"},{name:"HolySee (Vatican City State)",code:"VA"},{name:"Honduras",code:"HN"},{name:"HongKong",code:"HK"},{name:"Hungary",code:"HU"},{name:"Iceland",code:"IS"},{name:"India",code:"IN"},{name:"Indonesia",code:"ID"},{name:"Iran Islamic Republic Of",code:"IR"},{name:"Iraq",code:"IQ"},{name:"Ireland",code:"IE"},{name:"Isleof Man",code:"IM"},{name:"Israel",code:"IL"},{name:"Italy",code:"IT"},{name:"Jamaica",code:"JM"},{name:"Japan",code:"JP"},{name:"Jersey",code:"JE"},{name:"Jordan",code:"JO"},{name:"Kazakhstan",code:"KZ"},{name:"Kenya",code:"KE"},{name:"Kiribati",code:"KI"},{name:"Korea Democratic People'S Republic of",code:"KP"},{name:"Korea Republic of",code:"KR"},{name:"Kuwait",code:"KW"},{name:"Kyrgyzstan",code:"KG"},{name:"LaoPeopleS Democratic Republic",code:"LA"},{name:"Latvia",code:"LV"},{name:"Lebanon",code:"LB"},{name:"Lesotho",code:"LS"},{name:"Liberia",code:"LR"},{name:"LibyanArab Jamahiriya",code:"LY"},{name:"Liechtenstein",code:"LI"},{name:"Lithuania",code:"LT"},{name:"Luxembourg",code:"LU"},{name:"Macao",code:"MO"},{name:"Macedonia The Former Yugoslav Republic of",code:"MK"},{name:"Madagascar",code:"MG"},{name:"Malawi",code:"MW"},{name:"Malaysia",code:"MY"},{name:"Maldives",code:"MV"},{name:"Mali",code:"ML"},{name:"Malta",code:"MT"},{name:"MarshallIslands",code:"MH"},{name:"Martinique",code:"MQ"},{name:"Mauritania",code:"MR"},{name:"Mauritius",code:"MU"},{name:"Mayotte",code:"YT"},{name:"Mexico",code:"MX"},{name:"Micronesia Federated States of",code:"FM"},{name:"Moldova Republic of",code:"MD"},{name:"Monaco",code:"MC"},{name:"Mongolia",code:"MN"},{name:"Montserrat",code:"MS"},{name:"Morocco",code:"MA"},{name:"Mozambique",code:"MZ"},{name:"Myanmar",code:"MM"},{name:"Namibia",code:"NA"},{name:"Nauru",code:"NR"},{name:"Nepal",code:"NP"},{name:"Netherlands",code:"NL"},{name:"NetherlandsAntilles",code:"AN"},{name:"NewCaledonia",code:"NC"},{name:"NewZealand",code:"NZ"},{name:"Nicaragua",code:"NI"},{name:"Niger",code:"NE"},{name:"Nigeria",code:"NG"},{name:"Niue",code:"NU"},{name:"NorfolkIsland",code:"NF"},{name:"NorthernMariana Islands",code:"MP"},{name:"Norway",code:"NO"},{name:"Oman",code:"OM"},{name:"Pakistan",code:"PK"},{name:"Palau",code:"PW"},{name:"PalestinianTerritory Occupied",code:"PS"},{name:"Panama",code:"PA"},{name:"PapuaNew Guinea",code:"PG"},{name:"Paraguay",code:"PY"},{name:"Peru",code:"PE"},{name:"Philippines",code:"PH"},{name:"Pitcairn",code:"PN"},{name:"Poland",code:"PL"},{name:"Portugal",code:"PT"},{name:"PuertoRico",code:"PR"},{name:"Qatar",code:"QA"},{name:"Reunion",code:"RE"},{name:"Romania",code:"RO"},{name:"RussianFederation",code:"RU"},{name:"RWANDA",code:"RW"},{name:"SaintHelena",code:"SH"},{name:"SaintKitts and Nevis",code:"KN"},{name:"SaintLucia",code:"LC"},{name:"SaintPierre and Miquelon",code:"PM"},{name:"SaintVincent and the Grenadines",code:"VC"},{name:"Samoa",code:"WS"},{name:"SanMarino",code:"SM"},{name:"SaoTome and Principe",code:"ST"},{name:"SaudiArabia",code:"SA"},{name:"Senegal",code:"SN"},{name:"Serbiaand Montenegro",code:"CS"},{name:"Seychelles",code:"SC"},{name:"SierraLeone",code:"SL"},{name:"Singapore",code:"SG"},{name:"Slovakia",code:"SK"},{name:"Slovenia",code:"SI"},{name:"SolomonIslands",code:"SB"},{name:"Somalia",code:"SO"},{name:"SouthAfrica",code:"ZA"},{name:"SouthGeorgia and the South Sandwich Islands",code:"GS"},{name:"Spain",code:"ES"},{name:"SriLanka",code:"LK"},{name:"Sudan",code:"SD"},{name:"Suriname",code:"SR"},{name:"Svalbardand Jan Mayen",code:"SJ"},{name:"Swaziland",code:"SZ"},{name:"Sweden",code:"SE"},{name:"Switzerland",code:"CH"},{name:"SyrianArab Republic",code:"SY"},{name:"Taiwan Province of China",code:"TW"},{name:"Tajikistan",code:"TJ"},{name:"Tanzania United Republic of",code:"TZ"},{name:"Thailand",code:"TH"},{name:"TimorLeste",code:"TL"},{name:"Togo",code:"TG"},{name:"Tokelau",code:"TK"},{name:"Tonga",code:"TO"},{name:"Trinidadand Tobago",code:"TT"},{name:"Tunisia",code:"TN"},{name:"Turkey",code:"TR"},{name:"Turkmenistan",code:"TM"},{name:"Turksand Caicos Islands",code:"TC"},{name:"Tuvalu",code:"TV"},{name:"Uganda",code:"UG"},{name:"Ukraine",code:"UA"},{name:"UnitedArab Emirates",code:"AE"},{name:"UnitedKingdom",code:"GB"},{name:"United States",code:"US"},{name:"United States Minor Outlying Islands",code:"UM"},{name:"Uruguay",code:"UY"},{name:"Uzbekistan",code:"UZ"},{name:"Vanuatu",code:"VU"},{name:"Venezuela",code:"VE"},{name:"VietNam",code:"VN"},{name:"VirginIslands British",code:"VG"},{name:"VirginIslands U.S.",code:"VI"},{name:"Wallisand Futuna",code:"WF"},{name:"WesternSahara",code:"EH"},{name:"Yemen",code:"YE"},{name:"Zambia",code:"ZM"},{name:"Zimbabwe",code:"ZW"}],y="R7m3T9Fv",r=N(y);P.r(y,()=>r);const W={onCreate(){this.state={options:T,autocompleteOption:"none",value:""}},async inputChange({currentInputValue:n},{el:e,index:a,selected:t}){this.state.autocompleteOption="none",this.state.value=n;const o=await this.searchCountry(n);this.state.options=o,this.state.autocompleteOption="list"},async searchCountry(n){return new Promise(e=>{clearTimeout(this.timeout),this.timeout=setTimeout(()=>{const a=T.filter(t=>t.name.toLowerCase().startsWith(n.toLowerCase())).slice(0,10);e(a)},500)})},selected(n){console.log("selected",n)}};r._=K(function(n,e,a,t,o,z){const m=[];for(const u of o.options||[])m.push({dataId:u.code,text:u.name,[Symbol.iterator]:ye});U(H,{...n,name:"example2text",autocomplete:o.autocompleteOption,value:o.value,options:m},e,a,"0",[["input-change","inputChange",!1],["select","selected",!1]])},{t:y},W);r.Component=D(W,r._);const we=`import countryList from './data.json'; class { onCreate() { this.state = { @@ -61,8 +61,8 @@ class { <@option data-id=option.code text=option.name/> -`,W=n=>({input:le(n)}),je={title:"form input/ebay-combobox",component:U,parameters:{docs:{description:{component:Ce}}},argTypes:{name:{control:{type:"text"},description:"used for the `name` attribute of the `` element"},borderless:{type:"boolean",control:{type:"boolean"},description:"whether button has borders "},disabled:{type:"boolean",control:{type:"boolean"},description:"sets the disabled attribute of the input"},expanded:{control:{type:"boolean"},description:"sets whether the listbox is expanded"},autocomplete:{control:{type:"text"},description:"default is `none`; available values are `none` or `list`. For list, will automatically filter results while typing."},listSelection:{control:{type:"text"},description:"default is `automatic`; available values are `automatic`, `manual`. If set to automatic will automatically fill in the input with the currently highlighted item when using the up/down keys."},roledescription:{control:{type:"text"},description:"The role description for accessibility. Default text is set and will be in english. Pass this to override for different locales"},"floating-label":{control:{type:"text"},description:"The label to show on the combobox which moves up when focused"},fluid:{control:{type:"boolean"},type:"boolean",description:"If true, combobox will span the entire width of it's container"},option:{name:"@option",table:{category:"@attribute tags"}},text:{description:"string to use in the option",control:{type:"text"},table:{category:"@option attributes"}},sticky:{control:{type:"boolean"},type:"boolean",table:{category:"@option attributes"},description:"If true, the option will always be shown even if it does not match the filter"},onCollapse:{action:"on-collapse",table:{category:"Events"},description:" collapsed content"},onExpand:{action:"on-expand",table:{category:"Events"},description:" expanded content"},onChange:{action:"on-change",table:{category:"Events",defaultValue:{summary:"{ el, index, selected }"}},description:"same as the `onChange` event, which fires on blur"},"onInput-change":{action:"on-input-change",table:{category:"Events",defaultValue:{summary:"{ el, index, selected }"}},description:"same as the `onInput` event, which fires with every keypress"},onSelect:{action:"on-select",table:{category:"Events",defaultValue:{summary:"{ el, index, selected }"}},description:"similar to a `` element"},borderless:{type:"boolean",control:{type:"boolean"},description:"whether button has borders "},disabled:{type:"boolean",control:{type:"boolean"},description:"sets the disabled attribute of the input"},expanded:{control:{type:"boolean"},description:"sets whether the listbox is expanded"},autocomplete:{control:{type:"text"},description:"default is `none`; available values are `none` or `list`. For list, will automatically filter results while typing."},listSelection:{control:{type:"text"},description:"default is `automatic`; available values are `automatic`, `manual`. If set to automatic will automatically fill in the input with the currently highlighted item when using the up/down keys."},roledescription:{control:{type:"text"},description:"The role description for accessibility. Default text is set and will be in english. Pass this to override for different locales"},"floating-label":{control:{type:"text"},description:"The label to show on the combobox which moves up when focused"},fluid:{control:{type:"boolean"},type:"boolean",description:"If true, combobox will span the entire width of it's container"},option:{name:"@option",table:{category:"@attribute tags"}},text:{description:"string to use in the option",control:{type:"text"},table:{category:"@option attributes"}},sticky:{control:{type:"boolean"},type:"boolean",table:{category:"@option attributes"},description:"If true, the option will always be shown even if it does not match the filter"},onCollapse:{action:"on-collapse",table:{category:"Events"},description:" collapsed content"},onExpand:{action:"on-expand",table:{category:"Events"},description:" expanded content"},onChange:{action:"on-change",table:{category:"Events",defaultValue:{summary:"{ el, index, selected }"}},description:"same as the `onChange` event, which fires on blur"},"onInput-change":{action:"on-input-change",table:{category:"Events",defaultValue:{summary:"{ el, index, selected }"}},description:"same as the `onInput` event, which fires with every keypress"},onSelect:{action:"on-select",table:{category:"Events",defaultValue:{summary:"{ el, index, selected }"}},description:"similar to a `\` form element with - [Storybook](https://ebay.github.io/ebayui-core/?path=/story/form-input-ebay-select) - [Storybook Docs](https://ebay.github.io/ebayui-core/?path=/docs/form-input-ebay-select) - [Code Examples](https://github.com/eBay/ebayui-core/tree/master/src/components/ebay-select/examples) -`;class fe extends Marko.Component{get selectId(){return this.input.id||this.getElId("select")}handleChange(e){const{selectedIndex:a}=e.target,t=this.getEls("option")[a],r=[...this.input.options][a];this.state.selectedIndex=a,this.emit("change",{index:a,selected:[String(r.value)],el:t})}handleFloatingLabelInit(){this.emit("floating-label-init")}onCreate(){this.state={selectedIndex:0}}onInput(e){const{state:a}=this;e.options=e.options||[],a.selectedIndex=Math.max(0,e.options.findIndex(t=>t.selected))}onMount(){this._setupMakeup();const e=this.el.closest("form");if(e){const{selectedIndex:a}=document.getElementById(this.selectId);this.subscribeTo(e).on("reset",()=>{this.handleChange({target:{selectedIndex:a}})})}}onUpdate(){this._setupMakeup()}_setupMakeup(){this.input.floatingLabel&&(this._floatingLabel?(this._floatingLabel.refresh(),this.handleFloatingLabelInit()):document.readyState==="complete"?this.el&&(this._floatingLabel=new ge(this.el),this.handleFloatingLabelInit()):this.subscribeTo(window).once("load",this._setupMakeup.bind(this)))}}const E="+Fi0YXtD",f=y(E),I=f;var J=["selected","optgroup"];function _e(o){return!!o.optgroup}x.r(E,()=>f);const oe=fe;f._=v(function(o,e,a,t,r,S){const{class:s,style:le,disabled:re,borderless:ie,options:D,floatingLabel:O,isLarge:W,...pe}=o;var z=[...D][r.selectedIndex],L=[],C={},A=t.selectId;for(const i of D){var b=i.optgroup;b?C[b]?C[b].options.push(i):L.push(C[b]={optgroup:b,options:[i]}):L.push(i)}const $=O&&"span";$?e.be($,{class:T(["floating-label",W&&"floating-label--large"])},"0",t,null,1):e.bf("f_0",t),O&&(e.be("label",{for:A,class:T(["floating-label__label",re&&"floating-label__label--disabled"])},"1",t,null,0),e.t(O,t),e.ee()),e.be("span",{class:T(["select",W&&"select--large",ie&&"select--borderless",s]),style:be(le)},"2",t,null,1),e.be("select",w(B(pe),{id:A}),"3",t,null,4,{onchange:a.d("change","handleChange",!1)});{let i=0;for(const p of L||[]){const ce=`[${i++}]`;if(_e(p)){e.be("optgroup",{label:p.optgroup},"4"+ce,t,null,0);for(const F of p.options||[]){const de="@option[]";e.be("option",w(B(F,J),{selected:F===z}),de,t,null,4),e.t(F.text,t),e.ee()}e.ee()}else e.be("option",w(B(p,J),{selected:p===z}),"@option[]",t,null,4),e.t(p.text,t),e.ee()}}e.ee(),c(ue,{},e,a,"5"),e.ee(),$?e.ee():e.ef()},{t:E},oe);f.Component=k(oe,f._);const M="t2cqJLhX",_=y(M),ye=te("label",{class:"field__label field__label--start",for:"select"},"1",null,1,0).t("Option");x.r(M,()=>_);const se={};_._=v(function(o,e,a,t,r,S){e.be("span",{class:"field"},"0",t,null,1);{e.n(ye,t);const s=[];s.push({value:"1",text:"Option 1",[Symbol.iterator]:n}),s.push({value:"2",text:"Option 2",[Symbol.iterator]:n}),s.push({value:"3",text:"Option 3",[Symbol.iterator]:n}),c(I,{...o,name:"formFieldName",id:"select",options:s},e,a,"2")}e.ee()},{t:M},se);_.Component=k(se,_._);const N="OhaVbIz9",d=y(N);x.r(N,()=>d);const ae={};d._=v(function(o,e,a,t,r,S){e.be("form",{style:"text-align: center"},"0",t,null,1),e.be("div",null,"1",t,null,0);{const s=[];s.push({value:"1",text:"Option 1",[Symbol.iterator]:n}),s.push({value:"2",text:"Option 2",[Symbol.iterator]:n}),s.push({value:"3",text:"Option 3",[Symbol.iterator]:n}),c(I,{...o,name:"formFieldName",options:s},e,a,"2")}e.ee(),e.be("div",{style:"padding: 1em"},"3",t,null,1),c(G,{type:"reset",renderBody:s=>{s.t("Reset",t)}},e,a,"4"),c(G,{type:"submit",renderBody:s=>{s.t("Submit",t)}},e,a,"5"),e.ee(),e.ee()},{t:N,i:!0},ae);d.Component=k(ae,d._);const V="PgmJY5WV",m=y(V),xe=te("label",{class:"field__label field__label--start field__label--disabled",for:"select"},"1",null,1,0).t("Option");x.r(V,()=>m);const ne={};m._=v(function(o,e,a,t,r,S){e.be("span",{class:"field"},"0",t,null,1);{e.n(xe,t);const s=[];s.push({value:"1",text:"Option 1",[Symbol.iterator]:n}),s.push({value:"2",text:"Option 2",[Symbol.iterator]:n}),s.push({value:"3",text:"Option 3",[Symbol.iterator]:n}),c(I,{...o,name:"formFieldName",id:"select",disabled:!0,options:s},e,a,"2")}e.ee()},{t:V},ne);m.Component=k(ne,m._);const ve=`import type { Input as SelectInput } from "" +`;class fe extends Marko.Component{get selectId(){return this.input.id||this.getElId("select")}handleChange(e){const{selectedIndex:a}=e.target,t=this.getEls("option")[a],r=[...this.input.options][a];this.state.selectedIndex=a,this.emit("change",{index:a,selected:[String(r.value)],el:t})}handleFloatingLabelInit(){this.emit("floating-label-init")}onCreate(){this.state={selectedIndex:0}}onInput(e){const{state:a}=this;e.options=e.options||[],a.selectedIndex=Math.max(0,e.options.findIndex(t=>t.selected))}onMount(){this._setupMakeup();const e=this.el.closest("form");if(e){const{selectedIndex:a}=document.getElementById(this.selectId);this.subscribeTo(e).on("reset",()=>{this.handleChange({target:{selectedIndex:a}})})}}onUpdate(){this._setupMakeup()}_setupMakeup(){this.input.floatingLabel&&(this._floatingLabel?(this._floatingLabel.refresh(),this.handleFloatingLabelInit()):document.readyState==="complete"?this.el&&(this._floatingLabel=new ge(this.el),this.handleFloatingLabelInit()):this.subscribeTo(window).once("load",this._setupMakeup.bind(this)))}}const E="+Fi0YXtD",f=y(E),I=f;var R=["selected","optgroup"];function _e(o){return!!o.optgroup}x.r(E,()=>f);const se=fe;f._=v(function(o,e,a,t,r,S){const{class:s,style:re,disabled:D,borderless:ie,options:W,floatingLabel:O,isLarge:z,...pe}=o;var A=[...W][r.selectedIndex],L=[],C={},G=t.selectId;for(const i of W){var b=i.optgroup;b?C[b]?C[b].options.push(i):L.push(C[b]={optgroup:b,options:[i]}):L.push(i)}const $=O&&"span";$?e.be($,{class:T(["floating-label",z&&"floating-label--large"])},"0",t,null,1):e.bf("f_0",t),O&&(e.be("label",{for:G,class:T(["floating-label__label",D&&"floating-label__label--disabled"])},"1",t,null,0),e.t(O,t),e.ee()),e.be("span",{class:T(["select",z&&"select--large",ie&&"select--borderless",s]),style:be(re)},"2",t,null,1),e.be("select",w(B(pe),{disabled:D,id:G}),"3",t,null,4,{onchange:a.d("change","handleChange",!1)});{let i=0;for(const p of L||[]){const ce=`[${i++}]`;if(_e(p)){e.be("optgroup",{label:p.optgroup},"4"+ce,t,null,0);for(const F of p.options||[]){const de="@option[]";e.be("option",w(B(F,R),{selected:F===A}),de,t,null,4),e.t(F.text,t),e.ee()}e.ee()}else e.be("option",w(B(p,R),{selected:p===A}),"@option[]",t,null,4),e.t(p.text,t),e.ee()}}e.ee(),c(ue,{},e,a,"5"),e.ee(),$?e.ee():e.ef()},{t:E},se);f.Component=k(se,f._);const M="t2cqJLhX",_=y(M),ye=oe("label",{class:"field__label field__label--start",for:"select"},"1",null,1,0).t("Option");x.r(M,()=>_);const ae={};_._=v(function(o,e,a,t,r,S){e.be("span",{class:"field"},"0",t,null,1);{e.n(ye,t);const s=[];s.push({value:"1",text:"Option 1",[Symbol.iterator]:n}),s.push({value:"2",text:"Option 2",[Symbol.iterator]:n}),s.push({value:"3",text:"Option 3",[Symbol.iterator]:n}),c(I,{...o,name:"formFieldName",id:"select",options:s},e,a,"2")}e.ee()},{t:M},ae);_.Component=k(ae,_._);const N="OhaVbIz9",d=y(N);x.r(N,()=>d);const ne={};d._=v(function(o,e,a,t,r,S){e.be("form",{style:"text-align: center"},"0",t,null,1),e.be("div",null,"1",t,null,0);{const s=[];s.push({value:"1",text:"Option 1",[Symbol.iterator]:n}),s.push({value:"2",text:"Option 2",[Symbol.iterator]:n}),s.push({value:"3",text:"Option 3",[Symbol.iterator]:n}),c(I,{...o,name:"formFieldName",options:s},e,a,"2")}e.ee(),e.be("div",{style:"padding: 1em"},"3",t,null,1),c(J,{type:"reset",renderBody:s=>{s.t("Reset",t)}},e,a,"4"),c(J,{type:"submit",renderBody:s=>{s.t("Submit",t)}},e,a,"5"),e.ee(),e.ee()},{t:N,i:!0},ne);d.Component=k(ne,d._);const V="PgmJY5WV",m=y(V),xe=oe("label",{class:"field__label field__label--start field__label--disabled",for:"select"},"1",null,1,0).t("Option");x.r(V,()=>m);const le={};m._=v(function(o,e,a,t,r,S){e.be("span",{class:"field"},"0",t,null,1);{e.n(xe,t);const s=[];s.push({value:"1",text:"Option 1",[Symbol.iterator]:n}),s.push({value:"2",text:"Option 2",[Symbol.iterator]:n}),s.push({value:"3",text:"Option 3",[Symbol.iterator]:n}),c(I,{...o,name:"formFieldName",id:"select",disabled:!0,options:s},e,a,"2")}e.ee()},{t:V},le);m.Component=k(le,m._);const ve=`import type { Input as SelectInput } from "" export type Input = SelectInput; class {} @@ -29,20 +29,20 @@ class {} <@option value="3" text="Option 3"/> -`,ke=o=>({input:{...o,renderBody:o.renderBody?e=>{e.html(o.renderBody)}:null}}),Ge={title:"form input/ebay-select",component:I,parameters:{docs:{description:{component:he}}},argTypes:{selected:{control:{type:"number"},description:"allows you to set the selected index option to `selected`"},floatingLabel:{type:"string",control:{type:"string"},description:"if set, then label will move up and down. Need to have first option to have a nullable value."},borderless:{type:"boolean",control:{type:"boolean"},description:"whether button has borders"},isLarge:{type:"boolean",control:{type:"boolean"},description:"to show large version"},text:{control:{type:"text"},description:"text to use in the option",table:{category:"@option attributes"}},value:{control:{type:"text"},description:"used for the `value` attribute of the native `