@primer/components 0.0.0-20211090256 → 0.0.0-2021109205720
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +1 -5
- package/dist/browser.esm.js +196 -186
- package/dist/browser.esm.js.map +1 -1
- package/dist/browser.umd.js +198 -188
- package/dist/browser.umd.js.map +1 -1
- package/lib/Button/Button.d.ts +3 -2
- package/lib/Button/Button.js +6 -2
- package/lib/Button/ButtonBase.d.ts +8 -5
- package/lib/Button/ButtonBase.js +5 -1
- package/lib/Button/ButtonClose.d.ts +45 -2
- package/lib/Button/ButtonClose.js +1 -1
- package/lib/Button/ButtonDanger.d.ts +3 -2
- package/lib/Button/ButtonDanger.js +6 -2
- package/lib/Button/ButtonInvisible.d.ts +3 -2
- package/lib/Button/ButtonInvisible.js +6 -2
- package/lib/Button/ButtonOutline.d.ts +3 -2
- package/lib/Button/ButtonOutline.js +6 -2
- package/lib/Button/ButtonPrimary.d.ts +3 -2
- package/lib/Button/ButtonPrimary.js +6 -2
- package/lib/Button/ButtonTableList.d.ts +2 -1
- package/lib/Button/ButtonTableList.js +1 -1
- package/lib/Dropdown.d.ts +90 -2
- package/lib/DropdownMenu/DropdownButton.d.ts +46 -2
- package/lib-esm/Button/Button.d.ts +3 -2
- package/lib-esm/Button/Button.js +2 -2
- package/lib-esm/Button/ButtonBase.d.ts +8 -5
- package/lib-esm/Button/ButtonBase.js +3 -1
- package/lib-esm/Button/ButtonClose.d.ts +45 -2
- package/lib-esm/Button/ButtonClose.js +2 -2
- package/lib-esm/Button/ButtonDanger.d.ts +3 -2
- package/lib-esm/Button/ButtonDanger.js +2 -2
- package/lib-esm/Button/ButtonInvisible.d.ts +3 -2
- package/lib-esm/Button/ButtonInvisible.js +2 -2
- package/lib-esm/Button/ButtonOutline.d.ts +3 -2
- package/lib-esm/Button/ButtonOutline.js +2 -2
- package/lib-esm/Button/ButtonPrimary.d.ts +3 -2
- package/lib-esm/Button/ButtonPrimary.js +2 -2
- package/lib-esm/Button/ButtonTableList.d.ts +2 -1
- package/lib-esm/Button/ButtonTableList.js +2 -2
- package/lib-esm/Dropdown.d.ts +90 -2
- package/lib-esm/DropdownMenu/DropdownButton.d.ts +46 -2
- package/package.json +1 -1
package/dist/browser.umd.js
CHANGED
@@ -19,10 +19,10 @@
|
|
19
19
|
`,Ct=i.default.div`
|
20
20
|
${wt};
|
21
21
|
${yt};
|
22
|
-
`;function zt(e){const{children:t,...r}=e;return require("focus-visible"),n.default.createElement(Ct,Tt({},r,{"data-portal-root":!0}),n.default.createElement(Et,null),t)}zt.displayName="BaseStyles",zt.defaultProps={color:"fg.default",fontFamily:"normal",lineHeight:"default"};var Rt=function(e){return function(e){return!!e&&"object"==typeof e}(e)&&!function(e){var t=Object.prototype.toString.call(e);return"[object RegExp]"===t||"[object Date]"===t||function(e){return e.$$typeof===Nt}(e)}(e)};var Nt="function"==typeof Symbol&&Symbol.for?Symbol.for("react.element"):60103;function At(e,t){return!1!==t.clone&&t.isMergeableObject(e)?Pt((r=e,Array.isArray(r)?[]:{}),e,t):e;var r}function It(e,t,r){return e.concat(t).map((function(e){return At(e,r)}))}function Lt(e){return Object.keys(e).concat(function(e){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e).filter((function(t){return e.propertyIsEnumerable(t)})):[]}(e))}function Ot(e,t){try{return t in e}catch(e){return!1}}function Mt(e,t,r){var a={};return r.isMergeableObject(e)&&Lt(e).forEach((function(t){a[t]=At(e[t],r)})),Lt(t).forEach((function(o){(function(e,t){return Ot(e,t)&&!(Object.hasOwnProperty.call(e,t)&&Object.propertyIsEnumerable.call(e,t))})(e,o)||(Ot(e,o)&&r.isMergeableObject(t[o])?a[o]=function(e,t){if(!t.customMerge)return Pt;var r=t.customMerge(e);return"function"==typeof r?r:Pt}(o,r)(e[o],t[o],r):a[o]=At(t[o],r))})),a}function Pt(e,t,r){(r=r||{}).arrayMerge=r.arrayMerge||It,r.isMergeableObject=r.isMergeableObject||Rt,r.cloneUnlessOtherwiseSpecified=At;var a=Array.isArray(t);return a===Array.isArray(e)?a?r.arrayMerge(e,t,r):Mt(e,t,r):At(t,r)}Pt.all=function(e,t){if(!Array.isArray(e))throw new Error("first argument should be an array");return e.reduce((function(e,r){return Pt(e,r,t)}),{})};var Ht=Pt;const Dt="light",Wt="dark",Ft=n.default.createContext({setColorMode:()=>null,setDayScheme:()=>null,setNightScheme:()=>null}),_t=({children:e,...t})=>{var a,o,i,l,s,c,f,u;const{theme:g,colorMode:p,dayScheme:b,nightScheme:m}=jt(),h=null!==(a=null!==(o=t.theme)&&void 0!==o?o:g)&&void 0!==a?a:d,[v,x]=n.default.useState(null!==(i=null!==(l=t.colorMode)&&void 0!==l?l:p)&&void 0!==i?i:"day"),[y,w]=n.default.useState(null!==(s=null!==(c=t.dayScheme)&&void 0!==c?c:b)&&void 0!==s?s:Dt),[B,k]=n.default.useState(null!==(f=null!==(u=t.nightScheme)&&void 0!==u?u:m)&&void 0!==f?f:Wt),$=function(e,t){switch(e){case"auto":return t;default:return e}}(v,function(){const[e,t]=n.default.useState(Gt);return n.default.useEffect((()=>{var e,r;const a=null===(e=window)||void 0===e||null===(r=e.matchMedia)||void 0===r?void 0:r.call(e,"(prefers-color-scheme: dark)");function o(e){const r=e.matches;t(r?"night":"day")}if(a){if(void 0!==a.addEventListener)return a.addEventListener("change",o),function(){a.removeEventListener("change",o)};if(void 0!==a.addListener)return a.addListener(o),function(){a.removeListener(o)}}}),[]),e}()),S=function(e,t,r){switch(e){case"day":return t;case"night":return r}}($,y,B),T=n.default.useMemo((()=>function(e,t){if(!e.colorSchemes)return e;if(!e.colorSchemes[t]){console.error(`\`${t}\` scheme not defined in \`theme.colorSchemes\``);const r=Object.keys(e.colorSchemes)[0];return Ht(e,e.colorSchemes[r])}return Ht(e,e.colorSchemes[t])}(h,S)),[h,S]);return n.default.useEffect((()=>{var e,r;x(null!==(e=null!==(r=t.colorMode)&&void 0!==r?r:p)&&void 0!==e?e:"day")}),[t.colorMode,p]),n.default.useEffect((()=>{var e,r;w(null!==(e=null!==(r=t.dayScheme)&&void 0!==r?r:b)&&void 0!==e?e:Dt)}),[t.dayScheme,b]),n.default.useEffect((()=>{var e,r;k(null!==(e=null!==(r=t.nightScheme)&&void 0!==r?r:m)&&void 0!==e?e:Wt)}),[t.nightScheme,m]),n.default.createElement(Ft.Provider,{value:{theme:T,colorScheme:S,colorMode:v,resolvedColorMode:$,dayScheme:y,nightScheme:B,setColorMode:x,setDayScheme:w,setNightScheme:k}},n.default.createElement(r.ThemeProvider,{theme:T},e))};function jt(){return n.default.useContext(Ft)}function Ut(e,t){var r;const{colorScheme:a=""}=jt();return null!==(r=e[a])&&void 0!==r?r:t}function Gt(){var e,t,r;return"undefined"!=typeof window&&null!==(e=(t=window).matchMedia)&&void 0!==e&&null!==(r=e.call(t,"(prefers-color-scheme: dark)"))&&void 0!==r&&r.matches?"night":"day"}_t.displayName="ThemeProvider";var Vt=_t;var Kt=e=>te(e.sx);var qt=i.default.div(U,E,C,S,z,N,O,I,P,G,Kt);const Xt=i.default(qt)``;Xt.defaultProps={borderWidth:"1px",borderStyle:"solid",borderColor:"border.default",borderRadius:2};var Yt=Xt;const Jt=i.default(qt)``;Jt.defaultProps={display:"flex"};var Zt=Jt;const Qt=i.default(qt)``;Qt.defaultProps={display:"grid"};var er=Qt;const tr=i.default(qt)``;var rr=tr;const ar=n.default.forwardRef(((e,t)=>n.default.createElement(tr,Tt({},e,{position:"absolute",ref:t}))));ar.displayName="Absolute";const or=n.default.forwardRef(((e,t)=>n.default.createElement(tr,Tt({},e,{position:"fixed",ref:t}))));or.displayName="Fixed";const nr=n.default.forwardRef(((e,t)=>n.default.createElement(tr,Tt({},e,{position:"relative",ref:t}))));nr.displayName="Relative";const ir=n.default.forwardRef(((e,t)=>n.default.createElement(tr,Tt({},e,{position:"sticky",ref:t}))));function lr({ref:e,closeOnOutsideClick:r,defaultOpen:a,onClickOutside:o}){const[n,i]=t.useState(a),l=t.useRef(null),d=null!=e?e:l,s=t.useCallback((e=>{const{current:t}=d;e.target.closest("details")!==t&&(o&&o(e),e.defaultPrevented||i(!1))}),[d,i,o]);t.useEffect((()=>{if(n&&r)return document.addEventListener("click",s),()=>{document.removeEventListener("click",s)}}),[n,r,s]);const c=e=>{if(!e.defaultPrevented){const t=e.target;i(t.open)}};return{open:n,setOpen:i,getDetailsProps:()=>({onToggle:c,open:n,ref:d})}}ir.defaultProps={top:0,zIndex:1},ir.displayName="Sticky";const dr=!0;function sr(e){if(!e.defaultPrevented)for(const t of Object.values(cr).reverse())if(t(e)===dr||e.defaultPrevented)break}const cr={};let fr=0;const ur=({containerRef:e,ignoreClickRefs:r,onClickOutside:a})=>{const o=t.useMemo((()=>fr++),[]),n=t.useCallback((t=>{var o;return t instanceof MouseEvent&&t.button>0||null!==(o=e.current)&&void 0!==o&&o.contains(t.target)||r&&r.some((({current:e})=>null==e?void 0:e.contains(t.target)))?dr:void a(t)}),[e,r,a]);t.useEffect((()=>(0===Object.keys(cr).length&&document.addEventListener("mousedown",sr,{capture:!0}),function(e,t){cr[e]=t}(o,n),()=>{!function(e){delete cr[e]}(o),0===Object.keys(cr).length&&document.removeEventListener("mousedown",sr,{capture:!0})})),[o,n])};function*gr(e,t={}){var r,a;const o=null!==(r=t.strict)&&void 0!==r&&r,n=null!==(a=t.onlyTabbable)&&void 0!==a&&a?br:pr,i=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>e instanceof HTMLElement&&n(e,o)?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP});let l=null;if(!t.reverse&&n(e,o)&&(yield e),t.reverse){let e=i.lastChild();for(;e;)l=e,e=i.lastChild()}else l=i.firstChild();for(;l instanceof HTMLElement;)yield l,l=t.reverse?i.previousNode():i.nextNode();t.reverse&&n(e,o)&&(yield e)}function pr(e,t=!1){const r=["BUTTON","INPUT","SELECT","TEXTAREA","OPTGROUP","OPTION","FIELDSET"].includes(e.tagName)&&e.disabled,a=e.hidden,o=e instanceof HTMLInputElement&&"hidden"===e.type;if(r||a||o)return!1;if(t){const t=0===e.offsetWidth||0===e.offsetHeight,r=["hidden","collapse"].includes(getComputedStyle(e).visibility),a=0===e.getClientRects().length;if(t||r||a)return!1}return null!=e.getAttribute("tabindex")||!(e instanceof HTMLAnchorElement&&null==e.getAttribute("href"))&&-1!==e.tabIndex}function br(e,t=!1){return pr(e,t)&&"-1"!==e.getAttribute("tabindex")}function mr({initialFocusRef:e,returnFocusRef:r,containerRef:a,preventFocusOnOpen:o}){t.useEffect((()=>{if(o)return;const t=r.current;if(e&&e.current)e.current.focus();else if(a.current){const e=gr(a.current).next().value;null==e||e.focus()}return function(){null==t||t.focus()}}),[e,r,a,o])}const hr=[];function vr(e){if("Escape"===e.key&&!e.defaultPrevented)for(let t=hr.length-1;t>=0&&(hr[t](e),!e.defaultPrevented);--t);}const xr=(e,r=[e])=>{const a=t.useCallback(e,r);t.useEffect((()=>(0===hr.length&&document.addEventListener("keydown",vr),hr.push(a),()=>{hr.splice(hr.findIndex((e=>e===a)),1),0===hr.length&&document.removeEventListener("keydown",vr)})),[a])};function yr(e){const t=n.default.useRef(null);return null!=e?e:t}const wr=({overlayRef:e,returnFocusRef:t,initialFocusRef:r,onEscape:a,ignoreClickRefs:o,onClickOutside:n,preventFocusOnOpen:i})=>{const l=yr(e);return mr({containerRef:l,returnFocusRef:t,initialFocusRef:r,preventFocusOnOpen:i}),ur({containerRef:l,ignoreClickRefs:o,onClickOutside:n}),xr(a),{ref:l}};let Br,kr=!1;function $r(){}try{const e=Object.create({},{signal:{get(){kr=!0}}});window.addEventListener("test",$r,e),window.removeEventListener("test",$r,e)}catch(Wd){}function Sr(){kr||(!function(){if("undefined"==typeof window)return;const e=EventTarget.prototype.addEventListener;EventTarget.prototype.addEventListener=function(t,r,a){return"object"==typeof a&&"signal"in a&&a.signal instanceof AbortSignal&&e.call(a.signal,"abort",(()=>{this.removeEventListener(t,r,a)})),e.call(this,t,r,a)}}(),kr=!0)}function Tr(){return void 0===Br&&(Br=/^mac/i.test(window.navigator.platform)),Br}let Er,Cr=1e4;function zr(){return"__primer_id_"+Cr++}Sr(),function(e){e[e.ArrowHorizontal=1]="ArrowHorizontal",e[e.ArrowVertical=2]="ArrowVertical",e[e.JK=4]="JK",e[e.HL=8]="HL",e[e.HomeAndEnd=16]="HomeAndEnd",e[e.PageUpDown=256]="PageUpDown",e[e.WS=32]="WS",e[e.AD=64]="AD",e[e.Tab=128]="Tab",e[e.ArrowAll=e.ArrowHorizontal|e.ArrowVertical]="ArrowAll",e[e.HJKL=e.HL|e.JK]="HJKL",e[e.WASD=e.WS|e.AD]="WASD",e[e.All=e.ArrowAll|e.HJKL|e.HomeAndEnd|e.PageUpDown|e.WASD|e.Tab]="All"}(Er||(Er={}));const Rr={ArrowLeft:Er.ArrowHorizontal,ArrowDown:Er.ArrowVertical,ArrowUp:Er.ArrowVertical,ArrowRight:Er.ArrowHorizontal,h:Er.HL,j:Er.JK,k:Er.JK,l:Er.HL,a:Er.AD,s:Er.WS,w:Er.WS,d:Er.AD,Tab:Er.Tab,Home:Er.HomeAndEnd,End:Er.HomeAndEnd,PageUp:Er.PageUpDown,PageDown:Er.PageUpDown},Nr={ArrowLeft:"previous",ArrowDown:"next",ArrowUp:"previous",ArrowRight:"next",h:"previous",j:"next",k:"previous",l:"next",a:"previous",s:"next",w:"previous",d:"next",Tab:"next",Home:"start",End:"end",PageUp:"start",PageDown:"end"};function Ar(e){const t=Nr[e.key];if("Tab"===e.key&&e.shiftKey)return"previous";const r=Tr();if(r&&e.metaKey||!r&&e.ctrlKey){if("ArrowLeft"===e.key||"ArrowUp"===e.key)return"start";if("ArrowRight"===e.key||"ArrowDown"===e.key)return"end"}return t}const Ir="data-is-active-descendant",Lr="activated-directly",Or="activated-indirectly",Mr="data-has-active-descendant";function Pr(e,t){var r,a,o,n;const i=[],l=new WeakMap,d=null!==(r=null==t?void 0:t.bindKeys)&&void 0!==r?r:(null!=t&&t.getNextFocusable?Er.ArrowAll:Er.ArrowVertical)|Er.HomeAndEnd,s=null!==(a=null==t?void 0:t.focusOutBehavior)&&void 0!==a?a:"stop",c=null!==(o=null==t?void 0:t.focusInStrategy)&&void 0!==o?o:"previous",f=null==t?void 0:t.activeDescendantControl,u=null==t?void 0:t.onActiveDescendantChanged;let g;function p(){return i[0]}function b(e,t=!1){const r=g;g=e,f?e&&document.activeElement===f?m(r,e,t):h():(r&&r!==e&&l.has(r)&&r.setAttribute("tabindex","-1"),null==e||e.setAttribute("tabindex","0"))}function m(t,r,a=!1){r.id||r.setAttribute("id",zr()),t&&t!==r&&t.removeAttribute(Ir),f&&(a||f.getAttribute("aria-activedescendant")!==r.id)&&(f.setAttribute("aria-activedescendant",r.id),e.setAttribute(Mr,r.id),r.setAttribute(Ir,a?Lr:Or),null==u||u(r,t,a))}function h(t=g){"first"===c&&(g=void 0),null==f||f.removeAttribute("aria-activedescendant"),e.removeAttribute(Mr),null==t||t.removeAttribute(Ir),null==u||u(void 0,t,!1)}function v(...e){const r=e.filter((e=>{var r,a;return null===(r=null==t||null===(a=t.focusableElementFilter)||void 0===a?void 0:a.call(t,e))||void 0===r||r}));if(0===r.length)return;const a=i.findIndex((e=>(e.compareDocumentPosition(r[0])&Node.DOCUMENT_POSITION_PRECEDING)>0));i.splice(-1===a?i.length:a,0,...r);for(const e of r)l.has(e)||l.set(e,e.getAttribute("tabindex")),e.setAttribute("tabindex","-1");g||b(p())}function x(...e){for(const t of e){const e=i.indexOf(t);e>=0&&i.splice(e,1);const r=l.get(t);if(void 0!==r&&(null===r?t.removeAttribute("tabindex"):t.setAttribute("tabindex",r),l.delete(t)),t===g){b(p())}}}v(...gr(e)),b(p());new MutationObserver((e=>{for(const t of e)for(const e of t.removedNodes)e instanceof HTMLElement&&x(...gr(e));for(const t of e)for(const e of t.addedNodes)e instanceof HTMLElement&&v(...gr(e))})).observe(e,{subtree:!0,childList:!0});const y=new AbortController,w=null!==(n=null==t?void 0:t.abortSignal)&&void 0!==n?n:y.signal;let B;w.addEventListener("abort",(()=>{x(...i)})),e.addEventListener("mousedown",(e=>{e.target instanceof HTMLElement&&e.target!==document.activeElement&&(B=i.indexOf(e.target))}),{signal:w}),f?(e.addEventListener("focusin",(e=>{e.target instanceof HTMLElement&&i.includes(e.target)&&(f.focus(),b(e.target))})),e.addEventListener("mousemove",(({target:e})=>{if(!(e instanceof Node))return;const t=i.find((t=>t.contains(e)));t&&b(t)}),{signal:w,capture:!0}),f.addEventListener("focusin",(()=>{g?m(void 0,g):b(p())})),f.addEventListener("focusout",(()=>{h()}))):e.addEventListener("focusin",(t=>{if(t.target instanceof HTMLElement)if(void 0!==B)B>=0&&i[B]!==g&&b(i[B]),B=void 0;else if("previous"===c)b(t.target);else if("closest"===c||"first"===c){if(t.relatedTarget instanceof Element&&!e.contains(t.relatedTarget)){const e="previous"===$?i.length-1:0,t=i[e];return void(null==t||t.focus())}b(t.target)}else if("function"==typeof c)if(t.relatedTarget instanceof Element&&!e.contains(t.relatedTarget)){const e=c(t.relatedTarget);if((e?i.indexOf(e):-1)>=0&&e instanceof HTMLElement)return void e.focus();console.warn("Element requested is not a known focusable element.")}else b(t.target);$=void 0}),{signal:w});const k=null!=f?f:e;let $;return"closest"===c&&document.addEventListener("keydown",(e=>{"Tab"===e.key&&($=Ar(e))}),{signal:w,capture:!0}),k.addEventListener("keydown",(r=>{if(r.key in Nr){const o=Rr[r.key];if(!r.defaultPrevented&&(o&d)>0&&!function(e,t){const r=e.key,a=[...r].length,o=t instanceof HTMLInputElement&&"text"===t.type||t instanceof HTMLTextAreaElement;if(o&&(1===a||"Home"===r||"End"===r))return!0;if(t instanceof HTMLSelectElement){if(1===a)return!0;if("ArrowDown"===r&&Tr()&&!e.metaKey)return!0;if("ArrowDown"===r&&!Tr()&&e.altKey)return!0}if(t instanceof HTMLTextAreaElement&&("PageUp"===r||"PageDown"===r))return!0;if(o){const e=t,a=0===e.selectionStart&&0===e.selectionEnd,o=e.selectionStart===e.value.length&&e.selectionEnd===e.value.length;if("ArrowLeft"===r&&!a)return!0;if("ArrowRight"===r&&!o)return!0;if(e instanceof HTMLTextAreaElement){if("ArrowUp"===r&&!a)return!0;if("ArrowDown"===r&&!o)return!0}}return!1}(r,document.activeElement)){const o=Ar(r);let n;var a;if(null!=t&&t.getNextFocusable)n=t.getNextFocusable(o,null!==(a=document.activeElement)&&void 0!==a?a:void 0,r);if(!n){const t=function(){if(!g)return 0;const t=i.indexOf(g);return-1!==t?t:g===e?-1:0}();let a=t;"previous"===o?a-=1:"start"===o?a=0:"next"===o?a+=1:a=i.length-1,a<0&&(a="wrap"===s&&"Tab"!==r.key?i.length-1:0),a>=i.length&&(a="wrap"===s&&"Tab"!==r.key?0:i.length-1),t!==a&&(n=i[a])}f?b(n||g,!0):n&&($=o,n.focus()),("Tab"!==r.key||n)&&r.preventDefault()}}}),{signal:w}),y}var Hr=r.css(["position:relative;display:inline-block;padding:6px 16px;font-family:inherit;font-weight:",";line-height:20px;white-space:nowrap;vertical-align:middle;cursor:pointer;user-select:none;border-radius:",";appearance:none;text-decoration:none;text-align:center;&:hover{text-decoration:none;}&:focus{outline:none;}&:disabled{cursor:default;}&:disabled svg{opacity:0.6;}"],xt("fontWeights.bold"),xt("radii.2"));const Dr=re({variants:{small:{p:"4px 12px",fontSize:0},medium:{fontSize:1},large:{fontSize:2,p:"10px 20px"}}}),Wr=i.default.button.attrs((({disabled:e,onClick:t})=>({onClick:e?void 0:t})))`
|
22
|
+
`;function zt(e){const{children:t,...r}=e;return require("focus-visible"),n.default.createElement(Ct,Tt({},r,{"data-portal-root":!0}),n.default.createElement(Et,null),t)}zt.displayName="BaseStyles",zt.defaultProps={color:"fg.default",fontFamily:"normal",lineHeight:"default"};var Rt=function(e){return function(e){return!!e&&"object"==typeof e}(e)&&!function(e){var t=Object.prototype.toString.call(e);return"[object RegExp]"===t||"[object Date]"===t||function(e){return e.$$typeof===Nt}(e)}(e)};var Nt="function"==typeof Symbol&&Symbol.for?Symbol.for("react.element"):60103;function At(e,t){return!1!==t.clone&&t.isMergeableObject(e)?Pt((r=e,Array.isArray(r)?[]:{}),e,t):e;var r}function It(e,t,r){return e.concat(t).map((function(e){return At(e,r)}))}function Lt(e){return Object.keys(e).concat(function(e){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e).filter((function(t){return e.propertyIsEnumerable(t)})):[]}(e))}function Ot(e,t){try{return t in e}catch(e){return!1}}function Mt(e,t,r){var a={};return r.isMergeableObject(e)&&Lt(e).forEach((function(t){a[t]=At(e[t],r)})),Lt(t).forEach((function(o){(function(e,t){return Ot(e,t)&&!(Object.hasOwnProperty.call(e,t)&&Object.propertyIsEnumerable.call(e,t))})(e,o)||(Ot(e,o)&&r.isMergeableObject(t[o])?a[o]=function(e,t){if(!t.customMerge)return Pt;var r=t.customMerge(e);return"function"==typeof r?r:Pt}(o,r)(e[o],t[o],r):a[o]=At(t[o],r))})),a}function Pt(e,t,r){(r=r||{}).arrayMerge=r.arrayMerge||It,r.isMergeableObject=r.isMergeableObject||Rt,r.cloneUnlessOtherwiseSpecified=At;var a=Array.isArray(t);return a===Array.isArray(e)?a?r.arrayMerge(e,t,r):Mt(e,t,r):At(t,r)}Pt.all=function(e,t){if(!Array.isArray(e))throw new Error("first argument should be an array");return e.reduce((function(e,r){return Pt(e,r,t)}),{})};var Ht=Pt;const Dt="light",Wt="dark",Ft=n.default.createContext({setColorMode:()=>null,setDayScheme:()=>null,setNightScheme:()=>null}),_t=({children:e,...t})=>{var a,o,i,l,s,c,f,u;const{theme:g,colorMode:p,dayScheme:b,nightScheme:m}=jt(),h=null!==(a=null!==(o=t.theme)&&void 0!==o?o:g)&&void 0!==a?a:d,[v,x]=n.default.useState(null!==(i=null!==(l=t.colorMode)&&void 0!==l?l:p)&&void 0!==i?i:"day"),[y,w]=n.default.useState(null!==(s=null!==(c=t.dayScheme)&&void 0!==c?c:b)&&void 0!==s?s:Dt),[B,k]=n.default.useState(null!==(f=null!==(u=t.nightScheme)&&void 0!==u?u:m)&&void 0!==f?f:Wt),$=function(e,t){switch(e){case"auto":return t;default:return e}}(v,function(){const[e,t]=n.default.useState(Gt);return n.default.useEffect((()=>{var e,r;const a=null===(e=window)||void 0===e||null===(r=e.matchMedia)||void 0===r?void 0:r.call(e,"(prefers-color-scheme: dark)");function o(e){const r=e.matches;t(r?"night":"day")}if(a){if(void 0!==a.addEventListener)return a.addEventListener("change",o),function(){a.removeEventListener("change",o)};if(void 0!==a.addListener)return a.addListener(o),function(){a.removeListener(o)}}}),[]),e}()),S=function(e,t,r){switch(e){case"day":return t;case"night":return r}}($,y,B),T=n.default.useMemo((()=>function(e,t){if(!e.colorSchemes)return e;if(!e.colorSchemes[t]){console.error(`\`${t}\` scheme not defined in \`theme.colorSchemes\``);const r=Object.keys(e.colorSchemes)[0];return Ht(e,e.colorSchemes[r])}return Ht(e,e.colorSchemes[t])}(h,S)),[h,S]);return n.default.useEffect((()=>{var e,r;x(null!==(e=null!==(r=t.colorMode)&&void 0!==r?r:p)&&void 0!==e?e:"day")}),[t.colorMode,p]),n.default.useEffect((()=>{var e,r;w(null!==(e=null!==(r=t.dayScheme)&&void 0!==r?r:b)&&void 0!==e?e:Dt)}),[t.dayScheme,b]),n.default.useEffect((()=>{var e,r;k(null!==(e=null!==(r=t.nightScheme)&&void 0!==r?r:m)&&void 0!==e?e:Wt)}),[t.nightScheme,m]),n.default.createElement(Ft.Provider,{value:{theme:T,colorScheme:S,colorMode:v,resolvedColorMode:$,dayScheme:y,nightScheme:B,setColorMode:x,setDayScheme:w,setNightScheme:k}},n.default.createElement(r.ThemeProvider,{theme:T},e))};function jt(){return n.default.useContext(Ft)}function Ut(e,t){var r;const{colorScheme:a=""}=jt();return null!==(r=e[a])&&void 0!==r?r:t}function Gt(){var e,t,r;return"undefined"!=typeof window&&null!==(e=(t=window).matchMedia)&&void 0!==e&&null!==(r=e.call(t,"(prefers-color-scheme: dark)"))&&void 0!==r&&r.matches?"night":"day"}_t.displayName="ThemeProvider";var Vt=_t;var Kt=e=>te(e.sx);var qt=i.default.div(U,E,C,S,z,N,O,I,P,G,Kt);const Xt=i.default(qt)``;Xt.defaultProps={borderWidth:"1px",borderStyle:"solid",borderColor:"border.default",borderRadius:2};var Yt=Xt;const Jt=i.default(qt)``;Jt.defaultProps={display:"flex"};var Zt=Jt;const Qt=i.default(qt)``;Qt.defaultProps={display:"grid"};var er=Qt;const tr=i.default(qt)``;var rr=tr;const ar=n.default.forwardRef(((e,t)=>n.default.createElement(tr,Tt({},e,{position:"absolute",ref:t}))));ar.displayName="Absolute";const or=n.default.forwardRef(((e,t)=>n.default.createElement(tr,Tt({},e,{position:"fixed",ref:t}))));or.displayName="Fixed";const nr=n.default.forwardRef(((e,t)=>n.default.createElement(tr,Tt({},e,{position:"relative",ref:t}))));nr.displayName="Relative";const ir=n.default.forwardRef(((e,t)=>n.default.createElement(tr,Tt({},e,{position:"sticky",ref:t}))));function lr({ref:e,closeOnOutsideClick:r,defaultOpen:a,onClickOutside:o}){const[n,i]=t.useState(a),l=t.useRef(null),d=null!=e?e:l,s=t.useCallback((e=>{const{current:t}=d;e.target.closest("details")!==t&&(o&&o(e),e.defaultPrevented||i(!1))}),[d,i,o]);t.useEffect((()=>{if(n&&r)return document.addEventListener("click",s),()=>{document.removeEventListener("click",s)}}),[n,r,s]);const c=e=>{if(!e.defaultPrevented){const t=e.target;i(t.open)}};return{open:n,setOpen:i,getDetailsProps:()=>({onToggle:c,open:n,ref:d})}}ir.defaultProps={top:0,zIndex:1},ir.displayName="Sticky";const dr=!0;function sr(e){if(!e.defaultPrevented)for(const t of Object.values(cr).reverse())if(t(e)===dr||e.defaultPrevented)break}const cr={};let fr=0;const ur=({containerRef:e,ignoreClickRefs:r,onClickOutside:a})=>{const o=t.useMemo((()=>fr++),[]),n=t.useCallback((t=>{var o;return t instanceof MouseEvent&&t.button>0||null!==(o=e.current)&&void 0!==o&&o.contains(t.target)||r&&r.some((({current:e})=>null==e?void 0:e.contains(t.target)))?dr:void a(t)}),[e,r,a]);t.useEffect((()=>(0===Object.keys(cr).length&&document.addEventListener("mousedown",sr,{capture:!0}),function(e,t){cr[e]=t}(o,n),()=>{!function(e){delete cr[e]}(o),0===Object.keys(cr).length&&document.removeEventListener("mousedown",sr,{capture:!0})})),[o,n])};function*gr(e,t={}){var r,a;const o=null!==(r=t.strict)&&void 0!==r&&r,n=null!==(a=t.onlyTabbable)&&void 0!==a&&a?br:pr,i=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>e instanceof HTMLElement&&n(e,o)?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP});let l=null;if(!t.reverse&&n(e,o)&&(yield e),t.reverse){let e=i.lastChild();for(;e;)l=e,e=i.lastChild()}else l=i.firstChild();for(;l instanceof HTMLElement;)yield l,l=t.reverse?i.previousNode():i.nextNode();t.reverse&&n(e,o)&&(yield e)}function pr(e,t=!1){const r=["BUTTON","INPUT","SELECT","TEXTAREA","OPTGROUP","OPTION","FIELDSET"].includes(e.tagName)&&e.disabled,a=e.hidden,o=e instanceof HTMLInputElement&&"hidden"===e.type;if(r||a||o)return!1;if(t){const t=0===e.offsetWidth||0===e.offsetHeight,r=["hidden","collapse"].includes(getComputedStyle(e).visibility),a=0===e.getClientRects().length;if(t||r||a)return!1}return null!=e.getAttribute("tabindex")||!(e instanceof HTMLAnchorElement&&null==e.getAttribute("href"))&&-1!==e.tabIndex}function br(e,t=!1){return pr(e,t)&&"-1"!==e.getAttribute("tabindex")}function mr({initialFocusRef:e,returnFocusRef:r,containerRef:a,preventFocusOnOpen:o}){t.useEffect((()=>{if(o)return;const t=r.current;if(e&&e.current)e.current.focus();else if(a.current){const e=gr(a.current).next().value;null==e||e.focus()}return function(){null==t||t.focus()}}),[e,r,a,o])}const hr=[];function vr(e){if("Escape"===e.key&&!e.defaultPrevented)for(let t=hr.length-1;t>=0&&(hr[t](e),!e.defaultPrevented);--t);}const xr=(e,r=[e])=>{const a=t.useCallback(e,r);t.useEffect((()=>(0===hr.length&&document.addEventListener("keydown",vr),hr.push(a),()=>{hr.splice(hr.findIndex((e=>e===a)),1),0===hr.length&&document.removeEventListener("keydown",vr)})),[a])};function yr(e){const t=n.default.useRef(null);return null!=e?e:t}const wr=({overlayRef:e,returnFocusRef:t,initialFocusRef:r,onEscape:a,ignoreClickRefs:o,onClickOutside:n,preventFocusOnOpen:i})=>{const l=yr(e);return mr({containerRef:l,returnFocusRef:t,initialFocusRef:r,preventFocusOnOpen:i}),ur({containerRef:l,ignoreClickRefs:o,onClickOutside:n}),xr(a),{ref:l}};let Br,kr=!1;function $r(){}try{const e=Object.create({},{signal:{get(){kr=!0}}});window.addEventListener("test",$r,e),window.removeEventListener("test",$r,e)}catch(Fd){}function Sr(){kr||(!function(){if("undefined"==typeof window)return;const e=EventTarget.prototype.addEventListener;EventTarget.prototype.addEventListener=function(t,r,a){return"object"==typeof a&&"signal"in a&&a.signal instanceof AbortSignal&&e.call(a.signal,"abort",(()=>{this.removeEventListener(t,r,a)})),e.call(this,t,r,a)}}(),kr=!0)}function Tr(){return void 0===Br&&(Br=/^mac/i.test(window.navigator.platform)),Br}let Er,Cr=1e4;function zr(){return"__primer_id_"+Cr++}Sr(),function(e){e[e.ArrowHorizontal=1]="ArrowHorizontal",e[e.ArrowVertical=2]="ArrowVertical",e[e.JK=4]="JK",e[e.HL=8]="HL",e[e.HomeAndEnd=16]="HomeAndEnd",e[e.PageUpDown=256]="PageUpDown",e[e.WS=32]="WS",e[e.AD=64]="AD",e[e.Tab=128]="Tab",e[e.ArrowAll=e.ArrowHorizontal|e.ArrowVertical]="ArrowAll",e[e.HJKL=e.HL|e.JK]="HJKL",e[e.WASD=e.WS|e.AD]="WASD",e[e.All=e.ArrowAll|e.HJKL|e.HomeAndEnd|e.PageUpDown|e.WASD|e.Tab]="All"}(Er||(Er={}));const Rr={ArrowLeft:Er.ArrowHorizontal,ArrowDown:Er.ArrowVertical,ArrowUp:Er.ArrowVertical,ArrowRight:Er.ArrowHorizontal,h:Er.HL,j:Er.JK,k:Er.JK,l:Er.HL,a:Er.AD,s:Er.WS,w:Er.WS,d:Er.AD,Tab:Er.Tab,Home:Er.HomeAndEnd,End:Er.HomeAndEnd,PageUp:Er.PageUpDown,PageDown:Er.PageUpDown},Nr={ArrowLeft:"previous",ArrowDown:"next",ArrowUp:"previous",ArrowRight:"next",h:"previous",j:"next",k:"previous",l:"next",a:"previous",s:"next",w:"previous",d:"next",Tab:"next",Home:"start",End:"end",PageUp:"start",PageDown:"end"};function Ar(e){const t=Nr[e.key];if("Tab"===e.key&&e.shiftKey)return"previous";const r=Tr();if(r&&e.metaKey||!r&&e.ctrlKey){if("ArrowLeft"===e.key||"ArrowUp"===e.key)return"start";if("ArrowRight"===e.key||"ArrowDown"===e.key)return"end"}return t}const Ir="data-is-active-descendant",Lr="activated-directly",Or="activated-indirectly",Mr="data-has-active-descendant";function Pr(e,t){var r,a,o,n;const i=[],l=new WeakMap,d=null!==(r=null==t?void 0:t.bindKeys)&&void 0!==r?r:(null!=t&&t.getNextFocusable?Er.ArrowAll:Er.ArrowVertical)|Er.HomeAndEnd,s=null!==(a=null==t?void 0:t.focusOutBehavior)&&void 0!==a?a:"stop",c=null!==(o=null==t?void 0:t.focusInStrategy)&&void 0!==o?o:"previous",f=null==t?void 0:t.activeDescendantControl,u=null==t?void 0:t.onActiveDescendantChanged;let g;function p(){return i[0]}function b(e,t=!1){const r=g;g=e,f?e&&document.activeElement===f?m(r,e,t):h():(r&&r!==e&&l.has(r)&&r.setAttribute("tabindex","-1"),null==e||e.setAttribute("tabindex","0"))}function m(t,r,a=!1){r.id||r.setAttribute("id",zr()),t&&t!==r&&t.removeAttribute(Ir),f&&(a||f.getAttribute("aria-activedescendant")!==r.id)&&(f.setAttribute("aria-activedescendant",r.id),e.setAttribute(Mr,r.id),r.setAttribute(Ir,a?Lr:Or),null==u||u(r,t,a))}function h(t=g){"first"===c&&(g=void 0),null==f||f.removeAttribute("aria-activedescendant"),e.removeAttribute(Mr),null==t||t.removeAttribute(Ir),null==u||u(void 0,t,!1)}function v(...e){const r=e.filter((e=>{var r,a;return null===(r=null==t||null===(a=t.focusableElementFilter)||void 0===a?void 0:a.call(t,e))||void 0===r||r}));if(0===r.length)return;const a=i.findIndex((e=>(e.compareDocumentPosition(r[0])&Node.DOCUMENT_POSITION_PRECEDING)>0));i.splice(-1===a?i.length:a,0,...r);for(const e of r)l.has(e)||l.set(e,e.getAttribute("tabindex")),e.setAttribute("tabindex","-1");g||b(p())}function x(...e){for(const t of e){const e=i.indexOf(t);e>=0&&i.splice(e,1);const r=l.get(t);if(void 0!==r&&(null===r?t.removeAttribute("tabindex"):t.setAttribute("tabindex",r),l.delete(t)),t===g){b(p())}}}v(...gr(e)),b(p());new MutationObserver((e=>{for(const t of e)for(const e of t.removedNodes)e instanceof HTMLElement&&x(...gr(e));for(const t of e)for(const e of t.addedNodes)e instanceof HTMLElement&&v(...gr(e))})).observe(e,{subtree:!0,childList:!0});const y=new AbortController,w=null!==(n=null==t?void 0:t.abortSignal)&&void 0!==n?n:y.signal;let B;w.addEventListener("abort",(()=>{x(...i)})),e.addEventListener("mousedown",(e=>{e.target instanceof HTMLElement&&e.target!==document.activeElement&&(B=i.indexOf(e.target))}),{signal:w}),f?(e.addEventListener("focusin",(e=>{e.target instanceof HTMLElement&&i.includes(e.target)&&(f.focus(),b(e.target))})),e.addEventListener("mousemove",(({target:e})=>{if(!(e instanceof Node))return;const t=i.find((t=>t.contains(e)));t&&b(t)}),{signal:w,capture:!0}),f.addEventListener("focusin",(()=>{g?m(void 0,g):b(p())})),f.addEventListener("focusout",(()=>{h()}))):e.addEventListener("focusin",(t=>{if(t.target instanceof HTMLElement)if(void 0!==B)B>=0&&i[B]!==g&&b(i[B]),B=void 0;else if("previous"===c)b(t.target);else if("closest"===c||"first"===c){if(t.relatedTarget instanceof Element&&!e.contains(t.relatedTarget)){const e="previous"===$?i.length-1:0,t=i[e];return void(null==t||t.focus())}b(t.target)}else if("function"==typeof c)if(t.relatedTarget instanceof Element&&!e.contains(t.relatedTarget)){const e=c(t.relatedTarget);if((e?i.indexOf(e):-1)>=0&&e instanceof HTMLElement)return void e.focus();console.warn("Element requested is not a known focusable element.")}else b(t.target);$=void 0}),{signal:w});const k=null!=f?f:e;let $;return"closest"===c&&document.addEventListener("keydown",(e=>{"Tab"===e.key&&($=Ar(e))}),{signal:w,capture:!0}),k.addEventListener("keydown",(r=>{if(r.key in Nr){const o=Rr[r.key];if(!r.defaultPrevented&&(o&d)>0&&!function(e,t){const r=e.key,a=[...r].length,o=t instanceof HTMLInputElement&&"text"===t.type||t instanceof HTMLTextAreaElement;if(o&&(1===a||"Home"===r||"End"===r))return!0;if(t instanceof HTMLSelectElement){if(1===a)return!0;if("ArrowDown"===r&&Tr()&&!e.metaKey)return!0;if("ArrowDown"===r&&!Tr()&&e.altKey)return!0}if(t instanceof HTMLTextAreaElement&&("PageUp"===r||"PageDown"===r))return!0;if(o){const e=t,a=0===e.selectionStart&&0===e.selectionEnd,o=e.selectionStart===e.value.length&&e.selectionEnd===e.value.length;if("ArrowLeft"===r&&!a)return!0;if("ArrowRight"===r&&!o)return!0;if(e instanceof HTMLTextAreaElement){if("ArrowUp"===r&&!a)return!0;if("ArrowDown"===r&&!o)return!0}}return!1}(r,document.activeElement)){const o=Ar(r);let n;var a;if(null!=t&&t.getNextFocusable)n=t.getNextFocusable(o,null!==(a=document.activeElement)&&void 0!==a?a:void 0,r);if(!n){const t=function(){if(!g)return 0;const t=i.indexOf(g);return-1!==t?t:g===e?-1:0}();let a=t;"previous"===o?a-=1:"start"===o?a=0:"next"===o?a+=1:a=i.length-1,a<0&&(a="wrap"===s&&"Tab"!==r.key?i.length-1:0),a>=i.length&&(a="wrap"===s&&"Tab"!==r.key?0:i.length-1),t!==a&&(n=i[a])}f?b(n||g,!0):n&&($=o,n.focus()),("Tab"!==r.key||n)&&r.preventDefault()}}}),{signal:w}),y}var Hr=r.css(["position:relative;display:inline-block;padding:6px 16px;font-family:inherit;font-weight:",";line-height:20px;white-space:nowrap;vertical-align:middle;cursor:pointer;user-select:none;border-radius:",";appearance:none;text-decoration:none;text-align:center;&:hover{text-decoration:none;}&:focus{outline:none;}&:disabled{cursor:default;}&:disabled svg{opacity:0.6;}"],xt("fontWeights.bold"),xt("radii.2"));const Dr=$(xe,yt,kt),Wr=re({variants:{small:{p:"4px 12px",fontSize:0},medium:{fontSize:1},large:{fontSize:2,p:"10px 20px"}}}),Fr=i.default.button.attrs((({disabled:e,onClick:t})=>({onClick:e?void 0:t})))`
|
23
23
|
${Hr}
|
24
|
-
${
|
25
|
-
`;
|
24
|
+
${Wr}
|
25
|
+
`;Fr.defaultProps={variant:"medium"};var _r=Fr;var jr=i.default(_r)`
|
26
26
|
color: ${xt("colors.btn.text")};
|
27
27
|
background-color: ${xt("colors.btn.bg")};
|
28
28
|
border: 1px solid ${xt("colors.btn.border")};
|
@@ -50,8 +50,9 @@
|
|
50
50
|
border-color: ${xt("colors.btn.border")};
|
51
51
|
}
|
52
52
|
|
53
|
+
${Dr};
|
53
54
|
${Kt};
|
54
|
-
`;var
|
55
|
+
`;var Ur=i.default(_r)`
|
55
56
|
color: ${xt("colors.btn.danger.text")};
|
56
57
|
border: 1px solid ${xt("colors.btn.border")};
|
57
58
|
background-color: ${xt("colors.btn.bg")};
|
@@ -82,8 +83,9 @@
|
|
82
83
|
border-color: ${xt("colors.btn.danger.disabledBorder")};
|
83
84
|
}
|
84
85
|
|
86
|
+
${Dr};
|
85
87
|
${Kt};
|
86
|
-
`;const
|
88
|
+
`;const Gr=i.default(qt)`
|
87
89
|
vertical-align: middle;
|
88
90
|
|
89
91
|
&& > * {
|
@@ -124,7 +126,7 @@
|
|
124
126
|
}
|
125
127
|
|
126
128
|
${Kt};
|
127
|
-
`;
|
129
|
+
`;Gr.defaultProps={display:"inline-block"};var Vr=Gr;var Kr=i.default(_r)`
|
128
130
|
color: ${xt("colors.btn.outline.text")};
|
129
131
|
border: 1px solid ${xt("colors.btn.border")};
|
130
132
|
background-color: ${xt("colors.btn.bg")};
|
@@ -155,8 +157,9 @@
|
|
155
157
|
border-color: ${xt("colors.btn.border")};
|
156
158
|
}
|
157
159
|
|
160
|
+
${Dr};
|
158
161
|
${Kt};
|
159
|
-
`;var
|
162
|
+
`;var qr=i.default(_r)`
|
160
163
|
color: ${xt("colors.btn.primary.text")};
|
161
164
|
border: 1px solid ${xt("colors.btn.primary.border")};
|
162
165
|
background-color: ${xt("colors.btn.primary.bg")};
|
@@ -185,8 +188,9 @@
|
|
185
188
|
border-color: ${xt("colors.btn.primary.disabledBorder")};
|
186
189
|
}
|
187
190
|
|
191
|
+
${Dr};
|
188
192
|
${Kt};
|
189
|
-
`;var
|
193
|
+
`;var Xr=i.default(_r)`
|
190
194
|
color: ${xt("colors.accent.fg")};
|
191
195
|
background-color: transparent;
|
192
196
|
border: 0;
|
@@ -206,8 +210,9 @@
|
|
206
210
|
background-color: ${xt("colors.btn.selectedBg")};
|
207
211
|
}
|
208
212
|
|
213
|
+
${Dr};
|
209
214
|
${Kt}
|
210
|
-
`;var
|
215
|
+
`;var Yr=i.default.summary`
|
211
216
|
display: inline-block;
|
212
217
|
padding: 0;
|
213
218
|
font-size: ${xt("fontSizes.1")};
|
@@ -242,8 +247,11 @@
|
|
242
247
|
border: 4px solid transparent;
|
243
248
|
border-top-color: currentcolor;
|
244
249
|
}
|
250
|
+
${yt}
|
251
|
+
${wt}
|
252
|
+
${kt}
|
245
253
|
${Kt};
|
246
|
-
`,
|
254
|
+
`,Jr={small:16,medium:32,large:64};function Zr(e){var t=e["aria-label"],r=e.className,a=e.fill,o=void 0===a?"currentColor":a,n=e.size,i=e.verticalAlign,l=e.svgDataByHeight,d=Jr[n]||n,s=function(e,t){return e.map((function(e){return parseInt(e,10)})).reduce((function(e,r){return r<=t?r:e}),e[0])}(Object.keys(l),d),c=l[s].width;return{"aria-hidden":t?"false":"true","aria-label":t,role:"img",className:r,viewBox:"0 0 "+c+" "+s,width:d*(c/s),height:d,fill:o,style:{display:"inline-block",userSelect:"none",verticalAlign:i},dangerouslySetInnerHTML:{__html:l[s].path}}}var Qr=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(e[a]=r[a])}return e};function ea(e){return n.default.createElement("svg",Zr(Qr({},e,{svgDataByHeight:{16:{width:16,path:'<path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path>'},24:{width:24,path:'<path fill-rule="evenodd" d="M21.03 5.72a.75.75 0 010 1.06l-11.5 11.5a.75.75 0 01-1.072-.012l-5.5-5.75a.75.75 0 111.084-1.036l4.97 5.195L19.97 5.72a.75.75 0 011.06 0z"></path>'}}})))}function ta(e){return n.default.createElement("svg",Zr(Qr({},e,{svgDataByHeight:{16:{width:16,path:'<path fill-rule="evenodd" d="M5 3.254V3.25v.005a.75.75 0 110-.005v.004zm.45 1.9a2.25 2.25 0 10-1.95.218v5.256a2.25 2.25 0 101.5 0V7.123A5.735 5.735 0 009.25 9h1.378a2.251 2.251 0 100-1.5H9.25a4.25 4.25 0 01-3.8-2.346zM12.75 9a.75.75 0 100-1.5.75.75 0 000 1.5zm-8.5 4.5a.75.75 0 100-1.5.75.75 0 000 1.5z"></path>'},24:{width:24,path:'<path fill-rule="evenodd" d="M5.75 21a1.75 1.75 0 110-3.5 1.75 1.75 0 010 3.5zM2.5 19.25a3.25 3.25 0 106.5 0 3.25 3.25 0 00-6.5 0zM5.75 6.5a1.75 1.75 0 110-3.5 1.75 1.75 0 010 3.5zM2.5 4.75a3.25 3.25 0 106.5 0 3.25 3.25 0 00-6.5 0zM18.25 15a1.75 1.75 0 110-3.5 1.75 1.75 0 010 3.5zM15 13.25a3.25 3.25 0 106.5 0 3.25 3.25 0 00-6.5 0z"></path><path fill-rule="evenodd" d="M6.5 7.25c0 2.9 2.35 5.25 5.25 5.25h4.5V14h-4.5A6.75 6.75 0 015 7.25h1.5z"></path><path fill-rule="evenodd" d="M5.75 16.75A.75.75 0 006.5 16V8A.75.75 0 005 8v8c0 .414.336.75.75.75z"></path>'}}})))}function ra(e){return n.default.createElement("svg",Zr(Qr({},e,{svgDataByHeight:{16:{width:16,path:'<path fill-rule="evenodd" d="M7.177 3.073L9.573.677A.25.25 0 0110 .854v4.792a.25.25 0 01-.427.177L7.177 3.427a.25.25 0 010-.354zM3.75 2.5a.75.75 0 100 1.5.75.75 0 000-1.5zm-2.25.75a2.25 2.25 0 113 2.122v5.256a2.251 2.251 0 11-1.5 0V5.372A2.25 2.25 0 011.5 3.25zM11 2.5h-1V4h1a1 1 0 011 1v5.628a2.251 2.251 0 101.5 0V5A2.5 2.5 0 0011 2.5zm1 10.25a.75.75 0 111.5 0 .75.75 0 01-1.5 0zM3.75 12a.75.75 0 100 1.5.75.75 0 000-1.5z"></path>'},24:{width:24,path:'<path fill-rule="evenodd" d="M4.75 3a1.75 1.75 0 100 3.5 1.75 1.75 0 000-3.5zM1.5 4.75a3.25 3.25 0 116.5 0 3.25 3.25 0 01-6.5 0zM4.75 17.5a1.75 1.75 0 100 3.5 1.75 1.75 0 000-3.5zM1.5 19.25a3.25 3.25 0 116.5 0 3.25 3.25 0 01-6.5 0zm17.75-1.75a1.75 1.75 0 100 3.5 1.75 1.75 0 000-3.5zM16 19.25a3.25 3.25 0 116.5 0 3.25 3.25 0 01-6.5 0z"></path><path fill-rule="evenodd" d="M4.75 7.25A.75.75 0 015.5 8v8A.75.75 0 014 16V8a.75.75 0 01.75-.75zm8.655-5.53a.75.75 0 010 1.06L12.185 4h4.065A3.75 3.75 0 0120 7.75v8.75a.75.75 0 01-1.5 0V7.75a2.25 2.25 0 00-2.25-2.25h-4.064l1.22 1.22a.75.75 0 01-1.061 1.06l-2.5-2.5a.75.75 0 010-1.06l2.5-2.5a.75.75 0 011.06 0z"></path>'}}})))}function aa(e){return n.default.createElement("svg",Zr(Qr({},e,{svgDataByHeight:{16:{width:16,path:'<path fill-rule="evenodd" d="M1.5 8a6.5 6.5 0 0110.65-5.003.75.75 0 00.959-1.153 8 8 0 102.592 8.33.75.75 0 10-1.444-.407A6.5 6.5 0 011.5 8zM8 12a1 1 0 100-2 1 1 0 000 2zm0-8a.75.75 0 01.75.75v3.5a.75.75 0 11-1.5 0v-3.5A.75.75 0 018 4zm4.78 4.28l3-3a.75.75 0 00-1.06-1.06l-2.47 2.47-.97-.97a.749.749 0 10-1.06 1.06l1.5 1.5a.75.75 0 001.06 0z"></path>'},24:{width:24,path:'<path d="M2.5 12c0-5.24 4.288-9.5 9.593-9.5a9.608 9.608 0 017.197 3.219.75.75 0 001.12-.998A11.108 11.108 0 0012.093 1C5.973 1 1 5.919 1 12s4.973 11 11.093 11c5.403 0 9.91-3.832 10.893-8.915a.75.75 0 10-1.472-.285c-.848 4.381-4.74 7.7-9.421 7.7C6.788 21.5 2.5 17.24 2.5 12z"></path><path d="M12 17a1 1 0 100-2 1 1 0 000 2zm0-10a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0112 7zm11.28.78a.75.75 0 00-1.06-1.06l-3.47 3.47-1.47-1.47a.75.75 0 10-1.06 1.06l2 2a.75.75 0 001.06 0l4-4z"></path>'}}})))}function oa(e){return n.default.createElement("svg",Zr(Qr({},e,{svgDataByHeight:{16:{width:16,path:'<path fill-rule="evenodd" d="M8 1.5a6.5 6.5 0 100 13 6.5 6.5 0 000-13zM0 8a8 8 0 1116 0A8 8 0 010 8zm9 3a1 1 0 11-2 0 1 1 0 012 0zm-.25-6.25a.75.75 0 00-1.5 0v3.5a.75.75 0 001.5 0v-3.5z"></path>'},24:{width:24,path:'<path d="M12 7a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0112 7zm1 9a1 1 0 11-2 0 1 1 0 012 0z"></path><path fill-rule="evenodd" d="M12 1C5.925 1 1 5.925 1 12s4.925 11 11 11 11-4.925 11-11S18.075 1 12 1zM2.5 12a9.5 9.5 0 1119 0 9.5 9.5 0 01-19 0z"></path>'}}})))}function na(e){return n.default.createElement("svg",Zr(Qr({},e,{svgDataByHeight:{16:{width:16,path:'<path fill-rule="evenodd" d="M7.75 2a.75.75 0 01.75.75V7h4.25a.75.75 0 110 1.5H8.5v4.25a.75.75 0 11-1.5 0V8.5H2.75a.75.75 0 010-1.5H7V2.75A.75.75 0 017.75 2z"></path>'},24:{width:24,path:'<path fill-rule="evenodd" d="M11.75 4.5a.75.75 0 01.75.75V11h5.75a.75.75 0 010 1.5H12.5v5.75a.75.75 0 01-1.5 0V12.5H5.25a.75.75 0 010-1.5H11V5.25a.75.75 0 01.75-.75z"></path>'}}})))}function ia(e){return n.default.createElement("svg",Zr(Qr({},e,{svgDataByHeight:{16:{width:16,path:'<path fill-rule="evenodd" d="M8 1.5a6.5 6.5 0 100 13 6.5 6.5 0 000-13zM0 8a8 8 0 1116 0A8 8 0 010 8zm9 3a1 1 0 11-2 0 1 1 0 012 0zM6.92 6.085c.081-.16.19-.299.34-.398.145-.097.371-.187.74-.187.28 0 .553.087.738.225A.613.613 0 019 6.25c0 .177-.04.264-.077.318a.956.956 0 01-.277.245c-.076.051-.158.1-.258.161l-.007.004a7.728 7.728 0 00-.313.195 2.416 2.416 0 00-.692.661.75.75 0 001.248.832.956.956 0 01.276-.245 6.3 6.3 0 01.26-.16l.006-.004c.093-.057.204-.123.313-.195.222-.149.487-.355.692-.662.214-.32.329-.702.329-1.15 0-.76-.36-1.348-.863-1.725A2.76 2.76 0 008 4c-.631 0-1.155.16-1.572.438-.413.276-.68.638-.849.977a.75.75 0 101.342.67z"></path>'},24:{width:24,path:'<path d="M10.97 8.265a1.45 1.45 0 00-.487.57.75.75 0 01-1.341-.67c.2-.402.513-.826.997-1.148C10.627 6.69 11.244 6.5 12 6.5c.658 0 1.369.195 1.934.619a2.45 2.45 0 011.004 2.006c0 1.033-.513 1.72-1.027 2.215-.19.183-.399.358-.579.508l-.147.123a4.329 4.329 0 00-.435.409v1.37a.75.75 0 11-1.5 0v-1.473c0-.237.067-.504.247-.736.22-.28.486-.517.718-.714l.183-.153.001-.001c.172-.143.324-.27.47-.412.368-.355.569-.676.569-1.136a.953.953 0 00-.404-.806C12.766 8.118 12.384 8 12 8c-.494 0-.814.121-1.03.265zM13 17a1 1 0 11-2 0 1 1 0 012 0z"></path><path fill-rule="evenodd" d="M12 1C5.925 1 1 5.925 1 12s4.925 11 11 11 11-4.925 11-11S18.075 1 12 1zM2.5 12a9.5 9.5 0 1119 0 9.5 9.5 0 01-19 0z"></path>'}}})))}function la(e){return n.default.createElement("svg",Zr(Qr({},e,{svgDataByHeight:{16:{width:16,path:'<path d="M4.427 7.427l3.396 3.396a.25.25 0 00.354 0l3.396-3.396A.25.25 0 0011.396 7H4.604a.25.25 0 00-.177.427z"></path>'},24:{width:24,path:'<path d="M11.646 15.146L5.854 9.354a.5.5 0 01.353-.854h11.586a.5.5 0 01.353.854l-5.793 5.792a.5.5 0 01-.707 0z"></path>'}}})))}function da(e){return n.default.createElement("svg",Zr(Qr({},e,{svgDataByHeight:{16:{width:16,path:'<path fill-rule="evenodd" d="M3.72 3.72a.75.75 0 011.06 0L8 6.94l3.22-3.22a.75.75 0 111.06 1.06L9.06 8l3.22 3.22a.75.75 0 11-1.06 1.06L8 9.06l-3.22 3.22a.75.75 0 01-1.06-1.06L6.94 8 3.72 4.78a.75.75 0 010-1.06z"></path>'},24:{width:24,path:'<path fill-rule="evenodd" d="M5.72 5.72a.75.75 0 011.06 0L12 10.94l5.22-5.22a.75.75 0 111.06 1.06L13.06 12l5.22 5.22a.75.75 0 11-1.06 1.06L12 13.06l-5.22 5.22a.75.75 0 01-1.06-1.06L10.94 12 5.72 6.78a.75.75 0 010-1.06z"></path>'}}})))}ea.defaultProps={className:"octicon octicon-check",size:16,verticalAlign:"text-bottom"},ta.defaultProps={className:"octicon octicon-git-merge",size:16,verticalAlign:"text-bottom"},ra.defaultProps={className:"octicon octicon-git-pull-request",size:16,verticalAlign:"text-bottom"},aa.defaultProps={className:"octicon octicon-issue-closed",size:16,verticalAlign:"text-bottom"},oa.defaultProps={className:"octicon octicon-issue-opened",size:16,verticalAlign:"text-bottom"},na.defaultProps={className:"octicon octicon-plus",size:16,verticalAlign:"text-bottom"},ia.defaultProps={className:"octicon octicon-question",size:16,verticalAlign:"text-bottom"},la.defaultProps={className:"octicon octicon-triangle-down",size:16,verticalAlign:"text-bottom"},da.defaultProps={className:"octicon octicon-x",size:16,verticalAlign:"text-bottom"};const sa=i.default.button`
|
247
255
|
border: none;
|
248
256
|
padding: 0;
|
249
257
|
background: transparent;
|
@@ -259,11 +267,13 @@
|
|
259
267
|
&:hover {
|
260
268
|
color: ${xt("colors.accent.fg")};
|
261
269
|
}
|
270
|
+
${yt};
|
271
|
+
${kt};
|
262
272
|
${Kt};
|
263
|
-
`;var
|
273
|
+
`;var ca=t.forwardRef(((e,t)=>n.default.createElement(sa,Tt({ref:t,"aria-label":"Close"},e),n.default.createElement(da,null))));const fa={"outside-top":["outside-bottom","outside-right","outside-left","outside-bottom"],"outside-bottom":["outside-top","outside-right","outside-left","outside-bottom"],"outside-left":["outside-right","outside-bottom","outside-top","outside-bottom"],"outside-right":["outside-left","outside-bottom","outside-top","outside-bottom"]};function ua(e,t,r={}){const a=function(e){let t=e.parentNode;for(;null!==t;){if(t instanceof HTMLElement&&"static"!==getComputedStyle(t).position)return t;t=t.parentNode}return document.body}(e),o=function(e){let t=e;for(;null!==t&&t!==document.body;){if("visible"!==getComputedStyle(t).overflow)break;t=t.parentNode}const r=t!==document.body&&t instanceof HTMLElement?t:document.body,a=r.getBoundingClientRect(),o=getComputedStyle(r),[n,i,l,d]=[o.borderTopWidth,o.borderLeftWidth,o.borderRightWidth,o.borderBottomWidth].map((e=>parseInt(e,10)||0));return{top:a.top+n,left:a.left+i,width:a.width-l-i,height:Math.max(a.height-n-d,r===document.body?window.innerHeight:-1/0)}}(a),n=getComputedStyle(a),i=a.getBoundingClientRect(),[l,d]=[n.borderTopWidth,n.borderLeftWidth].map((e=>parseInt(e,10)||0));return function(e,t,r,a,{side:o,align:n,allowOutOfBounds:i,anchorOffset:l,alignmentOffset:d}){const s={top:e.top-t.top,left:e.left-t.left,width:e.width,height:e.height};let c=va(r,a,o,n,l,d),f=o;if(c.top-=t.top,c.left-=t.left,!i){const i=fa[o];let u=0;if(i){let e=o;for(;u<i.length&&xa(e,c,s,r);){const o=i[u++];e=o,c=va(r,a,o,n,l,d),c.top-=t.top,c.left-=t.left,f=o}}c.top<s.top&&(c.top=s.top),c.left<s.left&&(c.left=s.left),c.left+r.width>e.width+s.left&&(c.left=e.width+s.left-r.width),i&&u<i.length&&c.top+r.height>e.height+s.top&&(c.top=e.height+s.top-r.height)}return{...c,anchorSide:f}}(o,{top:i.top+l,left:i.left+d},e.getBoundingClientRect(),t instanceof Element?t.getBoundingClientRect():t,function(e={}){var t,r,a,o,n;const i=null!==(t=e.side)&&void 0!==t?t:ga,l=null!==(r=e.align)&&void 0!==r?r:pa;return{side:i,align:l,anchorOffset:null!==(a=e.anchorOffset)&&void 0!==a?a:"inside-center"===i?0:ba,alignmentOffset:null!==(o=e.alignmentOffset)&&void 0!==o?o:"center"!==l&&i.startsWith("inside")?ma:0,allowOutOfBounds:null!==(n=e.allowOutOfBounds)&&void 0!==n?n:ha}}(r))}const ga="outside-bottom",pa="start",ba=4,ma=4,ha=!1;function va(e,t,r,a,o,n){const i=t.left+t.width,l=t.top+t.height;let d=-1,s=-1;return"outside-top"===r?d=t.top-o-e.height:"outside-bottom"===r?d=l+o:"outside-left"===r?s=t.left-o-e.width:"outside-right"===r&&(s=i+o),"outside-top"!==r&&"outside-bottom"!==r||(s="start"===a?t.left+n:"center"===a?t.left-(e.width-t.width)/2+n:i-e.width-n),"outside-left"!==r&&"outside-right"!==r||(d="start"===a?t.top+n:"center"===a?t.top-(e.height-t.height)/2+n:l-e.height-n),"inside-top"===r?d=t.top+o:"inside-bottom"===r?d=l-o-e.height:"inside-left"===r?s=t.left+o:"inside-right"===r?s=i-o-e.width:"inside-center"===r&&(s=(i+t.left)/2-e.width/2+o),"inside-top"===r||"inside-bottom"===r?s="start"===a?t.left+n:"center"===a?t.left-(e.width-t.width)/2+n:i-e.width-n:"inside-left"!==r&&"inside-right"!==r&&"inside-center"!==r||(d="start"===a?t.top+n:"center"===a?t.top-(e.height-t.height)/2+n:l-e.height-n),{top:d,left:s}}function xa(e,t,r,a){return"outside-top"===e||"outside-bottom"===e?t.top<r.top||t.top+a.height>r.height+r.top:t.left<r.left||t.left+a.width>r.width+r.left}function ya(e,t=[]){const r=yr(null==e?void 0:e.floatingElementRef),a=yr(null==e?void 0:e.anchorElementRef),[o,i]=n.default.useState(void 0),l=n.default.useCallback((()=>{r.current instanceof Element&&a.current instanceof Element?i(ua(r.current,a.current,e)):i(void 0)}),[r,a,...t]);var d;return n.default.useLayoutEffect(l,[l]),d=l,n.default.useLayoutEffect((()=>{const e=new window.ResizeObserver((()=>d()));return e.observe(document.documentElement),()=>{e.disconnect()}}),[d]),{floatingElementRef:r,anchorElementRef:a,position:o}}Sr();const wa=[];let Ba;function ka(e,t=!1){return gr(e,{reverse:t,strict:!0,onlyTabbable:!0}).next().value}function $a(e,t,r){const a=new AbortController,o=null!=r?r:a.signal;let n;function i(r){if(r instanceof HTMLElement&&document.contains(e)){if(e.contains(r))return void(n=r);if(n&&br(n)&&e.contains(n))return void n.focus();if(t&&e.contains(t))return void t.focus();{const t=null===e.getAttribute("tabindex");return t&&e.setAttribute("tabindex","-1"),e.focus(),void(t&&e.addEventListener("blur",(()=>e.removeAttribute("tabindex")),{once:!0}))}}}e.setAttribute("data-focus-trap","active");const l=function(e){const t=new AbortController;return e.addEventListener("abort",(()=>{t.abort()})),t}(o);if(e.addEventListener("keydown",(t=>{if("Tab"!==t.key||t.defaultPrevented)return;const{target:r}=t,a=ka(e),o=ka(e,!0);r===a&&t.shiftKey?(t.preventDefault(),null==o||o.focus()):r!==o||t.shiftKey||(t.preventDefault(),null==a||a.focus())}),{signal:l.signal}),Ba){const e=Ba;Ba.container.setAttribute("data-focus-trap","suspended"),Ba.controller.abort(),wa.push(e)}l.signal.addEventListener("abort",(()=>{Ba=void 0})),o.addEventListener("abort",(()=>{e.removeAttribute("data-focus-trap");const t=wa.findIndex((t=>t.container===e));t>=0&&wa.splice(t,1),function(){const e=wa.pop();e&&$a(e.container,e.initialFocus,e.originalSignal)}()})),document.addEventListener("focus",(e=>{i(e.target)}),{signal:l.signal,capture:!0}),i(document.activeElement),Ba={container:e,controller:l,initialFocus:t,originalSignal:o};const d=wa.findIndex((t=>t.container===e));if(d>=0&&wa.splice(d,1),!r)return a}function Sa(e,t=[]){const r=yr(null==e?void 0:e.containerRef),a=yr(null==e?void 0:e.initialFocusRef),o=null==e?void 0:e.disabled,i=n.default.useRef(),l=n.default.useRef(null);function d(){var t;null===(t=i.current)||void 0===t||t.abort(),null!=e&&e.restoreFocusOnCleanUp&&l.current instanceof HTMLElement&&(l.current.focus(),l.current=null)}return l.current||null!=e&&e.disabled||(l.current=document.activeElement),n.default.useEffect((()=>{if(r.current instanceof HTMLElement){var e;if(!o)return i.current=$a(r.current,null!==(e=a.current)&&void 0!==e?e:void 0),()=>{d()};d()}}),[r,a,o,...t]),{containerRef:r,initialFocusRef:a}}function Ta({icon:e,...t}){return n.default.createElement(e,t)}Ta.displayName="Octicon";const Ea=i.default(Ta)`
|
264
274
|
${yt}
|
265
275
|
${Kt}
|
266
|
-
`;
|
276
|
+
`;Ea.defaultProps={size:16};var Ca=Ea;function za(e={},r=[]){const a=yr(e.containerRef),o=!!e.activeDescendantFocus,i=yr("boolean"!=typeof e.activeDescendantFocus&&e.activeDescendantFocus?e.activeDescendantFocus:void 0),l=e.disabled,d=n.default.useRef();return t.useEffect((()=>{if(a.current instanceof HTMLElement&&(!o||i.current instanceof HTMLElement)){if(!l){var t;const r={...e,activeDescendantControl:null!==(t=i.current)&&void 0!==t?t:void 0};return d.current=Pr(a.current,r),()=>{var e;null===(e=d.current)||void 0===e||e.abort()}}var r;null===(r=d.current)||void 0===r||r.abort()}}),[l,...r]),{containerRef:a,activeDescendantControlRef:i}}const Ra="__primerPortalRoot__",Na="__default__",Aa={};function Ia(){const e=Aa.__default__;if(!e||!document.body.contains(e)){let e=document.getElementById(Ra);if(!(e instanceof Element)){e=document.createElement("div"),e.setAttribute("id",Ra),e.style.position="absolute",e.style.top="0",e.style.left="0";const t=document.querySelector("[data-portal-root]");t?t.appendChild(e):document.body.appendChild(e)}!function(e,t="__default__"){Aa[t]=e}(e)}}var La=({children:e,onMount:t,containerName:r})=>{const o=document.createElement("div");o.style.position="relative",o.style.zIndex="1";const i=n.default.useRef(o);return n.default.useLayoutEffect((()=>{let e=r;void 0===e&&(e=Na,Ia());const a=Aa[e];if(!a)throw new Error(`Portal container '${r}' is not yet registered. Container must be registered with registerPortal before use.`);const o=i.current;return a.appendChild(o),null==t||t(),()=>{a.removeChild(o)}}),[i]),a.createPortal(e,i.current)};function Oa(...e){const r=t.useRef(null);return n.default.useLayoutEffect((()=>{function t(t=null){for(const r of e){if(!r)return;"function"==typeof r?r(t):r.current=t}}return t(r.current),()=>{t(r.current)}}),[...e,r.current]),r}const Ma={prefix:String(Math.round(1e10*Math.random())),current:0},Pa=n.default.createContext(Ma);let Ha=Boolean("undefined"!=typeof window&&window.document&&window.document.createElement);function Da(e){let r=t.useContext(Pa);return r!==Ma||Ha||console.warn("When server rendering, you must wrap your application in an <SSRProvider> to ensure consistent ids are generated between the client and server."),t.useMemo((()=>e||"react-aria"+r.prefix+"-"+ ++r.current),[e])}const Wa="200ms",Fa=i.default("div")`
|
267
277
|
position: fixed;
|
268
278
|
top: 0;
|
269
279
|
left: 0;
|
@@ -273,7 +283,7 @@
|
|
273
283
|
align-items: center;
|
274
284
|
justify-content: center;
|
275
285
|
background-color: rgba(0, 0, 0, 0.4);
|
276
|
-
animation: dialog-backdrop-appear ${
|
286
|
+
animation: dialog-backdrop-appear ${Wa} ${xt("animation.easeOutCubic")};
|
277
287
|
|
278
288
|
@keyframes dialog-backdrop-appear {
|
279
289
|
0% {
|
@@ -283,7 +293,7 @@
|
|
283
293
|
opacity: 1;
|
284
294
|
}
|
285
295
|
}
|
286
|
-
`,
|
296
|
+
`,_a={small:"480px",large:"640px",auto:"auto"},ja={small:"296px",medium:"320px",large:"480px",xlarge:"640px"},Ua=i.default.div`
|
287
297
|
display: flex;
|
288
298
|
flex-direction: column;
|
289
299
|
background-color: ${xt("colors.canvas.overlay")};
|
@@ -291,11 +301,11 @@
|
|
291
301
|
min-width: 296px;
|
292
302
|
max-width: calc(100vw - 64px);
|
293
303
|
max-height: calc(100vh - 64px);
|
294
|
-
width: ${e=>{var t;return
|
295
|
-
height: ${e=>{var t;return
|
304
|
+
width: ${e=>{var t;return ja[null!==(t=e.width)&&void 0!==t?t:"xlarge"]}};
|
305
|
+
height: ${e=>{var t;return _a[null!==(t=e.height)&&void 0!==t?t:"auto"]}};
|
296
306
|
border-radius: 12px;
|
297
307
|
opacity: 1;
|
298
|
-
animation: overlay--dialog-appear ${
|
308
|
+
animation: overlay--dialog-appear ${Wa} ${xt("animation.easeOutCubic")};
|
299
309
|
|
300
310
|
@keyframes overlay--dialog-appear {
|
301
311
|
0% {
|
@@ -311,23 +321,23 @@
|
|
311
321
|
${yt};
|
312
322
|
${$t};
|
313
323
|
${Kt};
|
314
|
-
`,
|
324
|
+
`,Ga=({dialogLabelId:e,title:r,subtitle:a,dialogDescriptionId:o,onClose:i})=>{const l=t.useCallback((()=>{i("close-button")}),[i]);return n.default.createElement(ao.Header,null,n.default.createElement(qt,{display:"flex"},n.default.createElement(qt,{display:"flex",px:2,py:"6px",flexDirection:"column",flexGrow:1},n.default.createElement(ao.Title,{id:e},null!=r?r:"Dialog"),a&&n.default.createElement(ao.Subtitle,{id:o},a)),n.default.createElement(ao.CloseButton,{onClose:l})))};Ga.displayName="DefaultHeader";const Va=({children:e})=>n.default.createElement(ao.Body,null,e);Va.displayName="DefaultBody";const Ka=({footerButtons:e})=>{const{containerRef:t}=za({bindKeys:Er.ArrowHorizontal|Er.Tab,focusInStrategy:"closest"});return e?n.default.createElement(ao.Footer,{ref:t},n.default.createElement(ao.Buttons,{buttons:e})):null},qa=n.default.forwardRef(((e,r)=>{const{title:a="Dialog",subtitle:o="",renderHeader:i,renderBody:l,renderFooter:d,onClose:s,role:c="dialog",width:f="xlarge",height:u="auto",footerButtons:g=[]}=e,p=Da(),b=Da(),m=t.useRef(null);for(const e of g)e.autoFocus&&(e.ref=m);const h={...e,title:a,subtitle:o,role:c,dialogLabelId:p,dialogDescriptionId:b},v=t.useRef(null),x=Oa(v,r),y=t.useRef(null);Sa({containerRef:v,restoreFocusOnCleanUp:!0,initialFocusRef:m}),xr((e=>{s("escape"),e.preventDefault()}),[s]);const w=(null!=i?i:Ga)(h),B=(null!=l?l:Va)(h),k=(null!=d?d:Ka)(h);return n.default.createElement(n.default.Fragment,null,n.default.createElement(La,null,n.default.createElement(Fa,{ref:y},n.default.createElement(Ua,{width:f,height:u,ref:x,role:c,"aria-labelledby":p,"aria-describedby":b},w,B,k))))}));qa.displayName="Dialog";const Xa=i.default(qt).attrs({as:"header"})`
|
315
325
|
box-shadow: 0 1px 0 ${xt("colors.border.default")};
|
316
326
|
padding: ${xt("space.2")};
|
317
327
|
z-index: 1;
|
318
328
|
flex-shrink: 0;
|
319
|
-
`,
|
329
|
+
`,Ya=i.default(qt)`
|
320
330
|
font-size: ${xt("fontSizes.1")};
|
321
331
|
font-weight: ${xt("fontWeights.bold")};
|
322
|
-
`,
|
332
|
+
`,Ja=i.default(qt)`
|
323
333
|
font-size: ${xt("fontSizes.0")};
|
324
334
|
margin-top: ${xt("space.1")};
|
325
335
|
color: ${xt("colors.fg.muted")};
|
326
|
-
`,
|
336
|
+
`,Za=i.default(qt)`
|
327
337
|
flex-grow: 1;
|
328
338
|
overflow: auto;
|
329
339
|
padding: ${xt("space.3")};
|
330
|
-
`,
|
340
|
+
`,Qa=i.default(qt).attrs({as:"footer"})`
|
331
341
|
box-shadow: 0 -1px 0 ${xt("colors.border.default")};
|
332
342
|
padding: ${xt("space.3")};
|
333
343
|
display: flex;
|
@@ -342,7 +352,7 @@
|
|
342
352
|
margin-left: 0;
|
343
353
|
}
|
344
354
|
}
|
345
|
-
`,
|
355
|
+
`,eo={normal:jr,primary:qr,danger:Ur},to=i.default(jr)`
|
346
356
|
border-radius: 4px;
|
347
357
|
background: transparent;
|
348
358
|
border: 0;
|
@@ -352,21 +362,21 @@
|
|
352
362
|
align-self: flex-start;
|
353
363
|
line-height: normal;
|
354
364
|
box-shadow: none;
|
355
|
-
`,
|
365
|
+
`,ro=({onClose:e})=>n.default.createElement(to,{"aria-label":"Close",onClick:e},n.default.createElement(Ca,{icon:da}));ro.displayName="CloseButton";const ao=Object.assign(qa,{Header:Xa,Title:Ya,Subtitle:Ja,Body:Za,Footer:Qa,Buttons:({buttons:e})=>{var r;const a=yr(null===(r=e.find((e=>e.autoFocus)))||void 0===r?void 0:r.ref);let o=0;const[i,l]=t.useState(0);return t.useEffect((()=>{var e;1===i?null===(e=a.current)||void 0===e||e.focus():l(i+1)}),[a,i]),n.default.createElement(n.default.Fragment,null,e.map(((e,t)=>{const{content:r,buttonType:i="normal",autoFocus:l=!1,...d}=e,s=eo[i];return n.default.createElement(s,Tt({key:t},d,{ref:l&&0===o?(o++,a):null}),r)})))},CloseButton:ro}),oo=i.default.header`
|
356
366
|
padding: ${xt("space.2")};
|
357
367
|
display: flex;
|
358
368
|
flex-direction: row;
|
359
|
-
`,
|
369
|
+
`,no=i.default(qt)`
|
360
370
|
font-size: ${xt("fontSizes.3")};
|
361
371
|
font-weight: ${xt("fontWeights.bold")};
|
362
372
|
padding: 6px ${xt("space.2")};
|
363
373
|
flex-grow: 1;
|
364
|
-
`,
|
374
|
+
`,io=({title:e,onClose:r,dialogLabelId:a})=>{const o=t.useCallback((()=>{r("close-button")}),[r]);return n.default.createElement(oo,null,n.default.createElement(no,{id:a},e),n.default.createElement(ao.CloseButton,{onClose:o}))};io.displayName="ConfirmationHeader";const lo=i.default(qt)`
|
365
375
|
font-size: ${xt("fontSizes.1")};
|
366
376
|
padding: 0 ${xt("space.3")} ${xt("space.3")} ${xt("space.3")};
|
367
377
|
color: ${xt("colors.fg.muted")};
|
368
378
|
flex-grow: 1;
|
369
|
-
`,
|
379
|
+
`,so=({children:e})=>n.default.createElement(lo,null,e);so.displayName="ConfirmationBody";const co=i.default(qt)`
|
370
380
|
display: grid;
|
371
381
|
grid-auto-flow: column;
|
372
382
|
grid-auto-columns: max-content;
|
@@ -374,7 +384,7 @@
|
|
374
384
|
align-items: end;
|
375
385
|
justify-content: end;
|
376
386
|
padding: ${xt("space.1")} ${xt("space.3")} ${xt("space.3")};
|
377
|
-
`,
|
387
|
+
`,fo=({footerButtons:e})=>{const{containerRef:t}=za({bindKeys:Er.ArrowHorizontal|Er.Tab,focusInStrategy:"closest"});return n.default.createElement(co,{ref:t},n.default.createElement(ao.Buttons,{buttons:null!=e?e:[]}))};fo.displayName="ConfirmationFooter";const uo=e=>{const{onClose:r,title:a,cancelButtonContent:o="Cancel",confirmButtonContent:i="OK",confirmButtonType:l="normal",children:d}=e,s=[{content:o,onClick:t.useCallback((()=>{r("cancel")}),[r])},{content:i,buttonType:l,onClick:t.useCallback((()=>{r("confirm")}),[r]),autoFocus:!0}];return n.default.createElement(ao,{onClose:r,title:a,footerButtons:s,role:"alertdialog",width:"medium",renderHeader:io,renderBody:so,renderFooter:fo},d)};uo.displayName="ConfirmationDialog";const go=i.default.div`
|
378
388
|
{
|
379
389
|
/* 6px vertical padding + 20px line height = 32px total height
|
380
390
|
*
|
@@ -390,9 +400,9 @@
|
|
390
400
|
${({variant:e})=>"filled"===e&&r.css(["background:",";margin:"," 0;border-top:1px solid ",";border-bottom:1px solid ",";&:first-child{margin-top:0;}"],xt("colors.canvas.subtle"),xt("space.2"),xt("colors.neutral.muted"),xt("colors.neutral.muted"))}
|
391
401
|
|
392
402
|
${Kt}
|
393
|
-
`;function
|
403
|
+
`;function po({variant:e="subtle",title:t,auxiliaryText:r,children:a,...o}){return n.default.createElement(go,Tt({role:"heading",variant:e},o),t,r&&n.default.createElement("span",null,r))}po.displayName="Header";const bo=i.default.div`
|
394
404
|
${Kt}
|
395
|
-
`;function
|
405
|
+
`;function mo({header:e,items:t,...r}){return n.default.createElement(bo,r,e&&n.default.createElement(po,e),t)}mo.displayName="Group";const ho=i.default.div`
|
396
406
|
${wt}
|
397
407
|
${yt}
|
398
408
|
display: ${e=>e.inline?"inline-block":"inherit"};
|
@@ -403,25 +413,25 @@
|
|
403
413
|
${ce}
|
404
414
|
${e=>e.expandable?"&:hover { max-width: 10000px; }":""}
|
405
415
|
${Kt};
|
406
|
-
`;
|
416
|
+
`;ho.defaultProps={expandable:!1,inline:!1,maxWidth:125};var vo=ho;const xo=i.default.div`
|
407
417
|
height: 1px;
|
408
418
|
background: ${xt("colors.border.muted")};
|
409
419
|
margin-top: calc(${xt("space.2")} - 1px);
|
410
420
|
margin-bottom: ${xt("space.2")};
|
411
|
-
`;function
|
421
|
+
`;function yo(){return n.default.createElement(xo,null)}yo.displayName="Divider",yo.renderItem=yo;const wo={default:{hover:{light:"rgba(46, 77, 108, 0.06)",dark:"rgba(201, 206, 212, 0.12)",dark_dimmed:"rgba(201, 206, 212, 0.12)"},focus:{light:"rgba(54, 77, 100, 0.16)",dark:"rgba(201, 206, 212, 0.24)",dark_dimmed:"rgba(201, 206, 212, 0.24)"}},danger:{hover:{light:"rgba(234, 74, 90, 0.08)",dark:"rgba(248, 81, 73, 0.16)",dark_dimmed:"rgba(248, 81, 73, 0.16)"},focus:{light:"rgba(234, 74, 90, 0.14)",dark:"rgba(248, 81, 73, 0.24)",dark_dimmed:"rgba(248, 81, 73, 0.24)"}}},Bo=(e="default",t)=>{if(t)return{color:xt("colors.primer.fg.disabled"),iconColor:xt("colors.primer.fg.disabled"),annotationColor:xt("colors.primer.fg.disabled"),hoverCursor:"default"};switch(e){case"danger":return{color:xt("colors.danger.fg"),iconColor:xt("colors.danger.fg"),annotationColor:xt("colors.fg.muted"),hoverCursor:"pointer"};default:return{color:xt("colors.fg.default"),iconColor:xt("colors.fg.muted"),annotationColor:xt("colors.fg.muted"),hoverCursor:"pointer"}}},ko=i.default.div`
|
412
422
|
display: flex;
|
413
423
|
min-width: 0;
|
414
424
|
|
415
425
|
/* Required for dividers */
|
416
426
|
position: relative;
|
417
427
|
flex-grow: 1;
|
418
|
-
|
428
|
+
`,$o=i.default.div`
|
419
429
|
align-items: baseline;
|
420
430
|
display: flex;
|
421
431
|
min-width: 0;
|
422
432
|
flex-direction: var(--main-content-flex-direction);
|
423
433
|
flex-grow: 1;
|
424
|
-
|
434
|
+
`,So=i.default.div`
|
425
435
|
/* 6px vertical padding + 20px line height = 32px total height
|
426
436
|
*
|
427
437
|
* TODO: When rem-based spacing on a 4px scale lands, replace
|
@@ -430,7 +440,7 @@
|
|
430
440
|
padding: 6px ${xt("space.2")};
|
431
441
|
display: flex;
|
432
442
|
border-radius: ${xt("radii.2")};
|
433
|
-
color: ${({variant:e,item:t})=>
|
443
|
+
color: ${({variant:e,item:t})=>Bo(e,null==t?void 0:t.disabled).color};
|
434
444
|
// 2 frames on a 60hz monitor
|
435
445
|
transition: background 33.333ms linear;
|
436
446
|
text-decoration: none;
|
@@ -439,15 +449,15 @@
|
|
439
449
|
:hover {
|
440
450
|
// allow override in case another item in the list is active/focused
|
441
451
|
background: var(--item-hover-bg-override, ${({hoverBackground:e})=>e});
|
442
|
-
cursor: ${({variant:e,item:t})=>
|
452
|
+
cursor: ${({variant:e,item:t})=>Bo(e,null==t?void 0:t.disabled).hoverCursor};
|
443
453
|
}
|
444
454
|
}
|
445
455
|
|
446
456
|
// Item dividers
|
447
|
-
:not(:first-of-type):not(${
|
457
|
+
:not(:first-of-type):not(${xo} + &):not(${go} + &) {
|
448
458
|
margin-top: ${({showDivider:e})=>e?"1px":"0"};
|
449
459
|
|
450
|
-
${
|
460
|
+
${ko}::before {
|
451
461
|
content: ' ';
|
452
462
|
display: block;
|
453
463
|
position: absolute;
|
@@ -461,23 +471,23 @@
|
|
461
471
|
|
462
472
|
// Item dividers should not be visible:
|
463
473
|
// - above Hovered
|
464
|
-
&:hover ${
|
474
|
+
&:hover ${ko}::before,
|
465
475
|
// - below Hovered
|
466
476
|
// '*' instead of '&' because '&' maps to separate class names depending on 'variant'
|
467
|
-
:hover + * ${
|
477
|
+
:hover + * ${ko}::before {
|
468
478
|
// allow override in case another item in the list is active/focused
|
469
479
|
border-color: var(--item-hover-divider-border-color-override, transparent) !important;
|
470
480
|
}
|
471
481
|
|
472
482
|
// - above Focused
|
473
|
-
&:focus ${
|
483
|
+
&:focus ${ko}::before,
|
474
484
|
// - below Focused
|
475
485
|
// '*' instead of '&' because '&' maps to separate class names depending on 'variant'
|
476
|
-
:focus + * ${
|
486
|
+
:focus + * ${ko}::before,
|
477
487
|
// - above Active Descendent
|
478
|
-
&[${Ir}] ${
|
488
|
+
&[${Ir}] ${ko}::before,
|
479
489
|
// - below Active Descendent
|
480
|
-
[${Ir}] + & ${
|
490
|
+
[${Ir}] + & ${ko}::before {
|
481
491
|
// '!important' because all the ':not's above give higher specificity
|
482
492
|
border-color: transparent !important;
|
483
493
|
}
|
@@ -500,32 +510,32 @@
|
|
500
510
|
}
|
501
511
|
|
502
512
|
${Kt}
|
503
|
-
`,
|
513
|
+
`,To=i.default.span``,Eo=i.default.div`
|
504
514
|
// Match visual height to adjacent text line height.
|
505
515
|
// TODO: When rem-based spacing on a 4px scale lands, replace
|
506
516
|
// hardcoded '20px' with '${xt("space.s20")}'.
|
507
517
|
height: 20px;
|
508
518
|
width: ${xt("space.3")};
|
509
519
|
margin-right: ${xt("space.2")};
|
510
|
-
`,
|
520
|
+
`,Co=i.default(Eo)`
|
511
521
|
svg {
|
512
|
-
fill: ${({variant:e,disabled:t})=>
|
522
|
+
fill: ${({variant:e,disabled:t})=>Bo(e,t).iconColor};
|
513
523
|
font-size: ${xt("fontSizes.0")};
|
514
524
|
}
|
515
|
-
`,
|
525
|
+
`,zo=i.default(Co)`
|
516
526
|
flex-shrink: 0;
|
517
527
|
display: flex;
|
518
528
|
flex-direction: column;
|
519
529
|
justify-content: center;
|
520
|
-
`,
|
521
|
-
color: ${({variant:e,disabled:t})=>
|
530
|
+
`,Ro=i.default(Co)`
|
531
|
+
color: ${({variant:e,disabled:t})=>Bo(e,t).annotationColor}};
|
522
532
|
margin-left: ${xt("space.2")};
|
523
533
|
margin-right: 0;
|
524
534
|
width: auto;
|
525
535
|
div:nth-child(2) {
|
526
536
|
margin-left: ${xt("space.2")};
|
527
537
|
}
|
528
|
-
`,
|
538
|
+
`,No=i.default.span`
|
529
539
|
color: ${xt("colors.fg.muted")};
|
530
540
|
font-size: ${xt("fontSizes.0")};
|
531
541
|
// TODO: When rem-based spacing on a 4px scale lands, replace
|
@@ -535,9 +545,9 @@
|
|
535
545
|
min-width: 0;
|
536
546
|
flex-grow: 1;
|
537
547
|
flex-basis: var(--description-container-flex-basis);
|
538
|
-
`,
|
548
|
+
`,Ao=i.default.input`
|
539
549
|
pointer-events: none;
|
540
|
-
`,
|
550
|
+
`,Io=n.default.forwardRef(((e,r)=>{const{as:a,text:o,description:i,descriptionVariant:l="inline",selected:d,selectionVariant:s,leadingVisual:c,trailingIcon:f,trailingVisual:u,trailingText:g,variant:p="default",showDivider:b,disabled:m,onAction:h,onKeyPress:v,children:x,onClick:y,id:w,...B}=e,k=Da(),$=Da(),S=t.useCallback((t=>{if(m)return;null==v||v(t);t.target instanceof HTMLInputElement&&"checkbox"===t.target.type&&" "===t.key||!t.defaultPrevented&&[" ","Enter"].includes(t.key)&&(null==h||h(e,t))}),[h,m,e,v]),T=t.useCallback((t=>{m||(null==y||y(t),t.defaultPrevented||null==h||h(e,t))}),[h,m,e,y]),E=wo[p],C=Ut(E.hover,"inherit"),z=Ut(E.focus,"inherit"),{theme:R}=jt();return n.default.createElement(So,Tt({ref:r,as:a,tabIndex:m?void 0:-1,variant:p,showDivider:b,"aria-selected":d,"aria-labelledby":o?k:void 0,"aria-describedby":i?$:void 0},B,{"data-id":w,onKeyPress:S,onClick:T,hoverBackground:m?"inherit":C,focusBackground:m?"inherit":z}),!!d===d&&n.default.createElement(Eo,null,"multiple"===s?n.default.createElement(n.default.Fragment,null,n.default.createElement(Ao,{disabled:m,tabIndex:-1,type:"checkbox",checked:d,"aria-label":o,readOnly:!0,"aria-readonly":"false"})):d&&n.default.createElement(ea,{fill:null==R?void 0:R.colors.fg.default})),c&&n.default.createElement(zo,{variant:p,disabled:m},n.default.createElement(c,null)),n.default.createElement(ko,null,n.default.createElement($o,{style:{"--main-content-flex-direction":"inline"===l?"row":"column"}},x,o?n.default.createElement(To,{id:k},o):null,i?n.default.createElement(No,{id:$,style:{"--description-container-margin-left":"inline"===l?xt("space.2")(R):0,"--description-container-flex-basis":"inline"===l?0:"auto"}},"block"===l?i:n.default.createElement(vo,{title:i,inline:!0,maxWidth:"100%"},i)):null),u?n.default.createElement(Ro,{variant:p,disabled:m},"function"==typeof u?n.default.createElement(u,null):u):f||g?n.default.createElement(Ro,{variant:p,disabled:m},g,f&&n.default.createElement(f,null)):null))}));Io.displayName="ActionList.Item";const Lo=i.default.div`
|
541
551
|
font-size: ${xt("fontSizes.1")};
|
542
552
|
/* 14px font-size * 1.428571429 = 20px line height
|
543
553
|
*
|
@@ -550,15 +560,15 @@
|
|
550
560
|
--item-hover-bg-override: none;
|
551
561
|
--item-hover-divider-border-color-override: ${xt("colors.border.muted")};
|
552
562
|
}
|
553
|
-
`;const
|
563
|
+
`;const Oo=n.default.forwardRef(((e,t)=>{const{firstGroupStyle:r,lastGroupStyle:a,headerStyle:o,itemStyle:i}=function(e="inset"){switch(e){case"full":return{headerStyle:{paddingX:xt("space.2")},itemStyle:{borderRadius:0}};default:return{firstGroupStyle:{marginTop:xt("space.2")},lastGroupStyle:{marginBottom:xt("space.2")},itemStyle:{marginX:xt("space.2")}}}}(e.variant),l=(t,r,a)=>{var o,l,d;const s="renderItem"in t&&t.renderItem||e.renderItem||Io,c=null!==(o=null!==(l="key"in t?t.key:void 0)&&void 0!==l?l:null===(d=t.id)||void 0===d?void 0:d.toString())&&void 0!==o?o:a.toString();return n.default.createElement(s,Tt({showDivider:e.showItemDividers,selectionVariant:e.selectionVariant},t,{key:c,sx:{...i,...t.sx},item:r}))};let d=[];if(function(e){return"groupMetadata"in e}(e)){const t=e.groupMetadata.reduce(((e,t)=>e.set(t.groupId,t)),new Map);for(const r of e.items){var s,c,f;const e=t.get(r.groupId),a=null!==(s=null==e||null===(c=e.items)||void 0===c?void 0:c.length)&&void 0!==s?s:0;t.set(r.groupId,{...e,items:[...null!==(f=null==e?void 0:e.items)&&void 0!==f?f:[],l({showDivider:null==e?void 0:e.showItemDividers,...e&&"renderItem"in e&&{renderItem:e.renderItem},...r},r,a)]})}d=[...t.values()]}else d=[{items:e.items.map(((e,t)=>l(e,e,t))),groupId:"0"}];return n.default.createElement(Lo,Tt({},e,{ref:t}),d.map((({header:t,...i},l)=>{const s="filled"===(null==t?void 0:t.variant),c=l>0&&!s;return n.default.createElement(n.default.Fragment,{key:i.groupId},c?n.default.createElement(yo,{key:`${i.groupId}-divider`}):null,(t=>{var r;const a=(null!==(r="renderGroup"in t&&t.renderGroup)&&void 0!==r?r:e.renderGroup)||mo;return n.default.createElement(a,Tt({},t,{key:t.groupId}))})({sx:{...0===l&&r,...l===d.length-1&&a,...l>0&&!c&&{mt:2}},...t&&{header:{...t,sx:{...o,...t.sx}}},...i}))})))}));Oo.displayName="ActionList";const Mo=Object.assign(Oo,{Group:mo,Item:Io,Divider:yo}),Po={xsmall:"192px",small:"256px",medium:"320px",large:"432px",xlarge:"600px",auto:"auto",initial:"auto"},Ho={small:"256px",medium:"320px",large:"480px",xlarge:"640px",xxlarge:"960px",auto:"auto"};const Do=i.default.div`
|
554
564
|
background-color: ${xt("colors.canvas.overlay")};
|
555
565
|
box-shadow: ${xt("shadows.overlay.shadow")};
|
556
566
|
position: absolute;
|
557
567
|
min-width: 192px;
|
558
568
|
max-width: 640px;
|
559
|
-
height: ${e=>
|
560
|
-
max-height: ${e=>e.maxHeight&&
|
561
|
-
width: ${e=>
|
569
|
+
height: ${e=>Po[e.height||"auto"]};
|
570
|
+
max-height: ${e=>e.maxHeight&&Po[e.maxHeight]};
|
571
|
+
width: ${e=>Ho[e.width||"auto"]};
|
562
572
|
border-radius: 12px;
|
563
573
|
overflow: hidden;
|
564
574
|
animation: overlay-appear ${200}ms ${xt("animation.easeOutCubic")};
|
@@ -577,12 +587,12 @@
|
|
577
587
|
}
|
578
588
|
${yt};
|
579
589
|
${Kt};
|
580
|
-
`,
|
590
|
+
`,Wo=n.default.forwardRef((({onClickOutside:e,role:r="none",initialFocusRef:a,returnFocusRef:o,ignoreClickRefs:i,onEscape:l,visibility:d="visible",height:s,top:c,left:f,anchorSide:u,portalContainerName:g,preventFocusOnOpen:p,...b},m)=>{const h=t.useRef(null),v=Oa(h,m),{theme:x}=jt(),y=parseInt(xt("space.2")(x).replace("px","")),w=xt("animation.easeOutCubic")(x);return wr({overlayRef:h,returnFocusRef:o,onEscape:l,ignoreClickRefs:i,onClickOutside:e,initialFocusRef:a,preventFocusOnOpen:p}),t.useEffect((()=>{var e;"initial"===s&&null!==(e=v.current)&&void 0!==e&&e.clientHeight&&(v.current.style.height=`${v.current.clientHeight}px`)}),[s,v]),t.useLayoutEffect((()=>{var e;const{x:t,y:r}=function(e){return null!=e&&e.endsWith("bottom")?{x:0,y:-1}:null!=e&&e.endsWith("top")?{x:0,y:1}:null!=e&&e.endsWith("right")?{x:-1,y:0}:null!=e&&e.endsWith("left")?{x:1,y:0}:{x:0,y:0}}(u);(t||r)&&null!==(e=h.current)&&void 0!==e&&e.animate&&"hidden"!==d&&h.current.animate({transform:[`translate(${y*t}px, ${y*r}px)`,"translate(0, 0)"]},{duration:200,easing:w})}),[u,y,w,d]),n.default.createElement(La,{containerName:g},n.default.createElement(Do,Tt({height:s,role:r},b,{ref:v,style:{top:`${c||0}px`,left:`${f||0}px`,...b.style,"--styled-overlay-visibility":d}})))}));Wo.defaultProps={height:"auto",width:"auto"};var Fo=Wo;const _o=({renderAnchor:e,anchorRef:r,children:a,open:o,onOpen:i,onClose:l,height:d,width:s,overlayProps:c,focusTrapSettings:f,focusZoneSettings:u,side:g,align:p})=>{const b=yr(r),[m,h]=function(){const[e,r]=t.useState(null),a=t.useRef(null);a.current=e;const o=t.useCallback((e=>{a.current=e,r(e)}),[a]);return[a,o]}(),v=Da(),x=t.useCallback((()=>null==l?void 0:l("click-outside")),[l]),y=t.useCallback((()=>null==l?void 0:l("escape")),[l]),w=t.useCallback((e=>{e.defaultPrevented||!o&&["ArrowDown","ArrowUp"," ","Enter"].includes(e.key)&&(null==i||i("anchor-key-press"),e.preventDefault())}),[o,i]),B=t.useCallback((e=>{e.defaultPrevented||0!==e.button||(o?null==l||l("anchor-click"):null==i||i("anchor-click"))}),[o,i,l]),{position:k}=ya({anchorElementRef:b,floatingElementRef:m,side:g,align:p},[m.current]);return t.useEffect((()=>{!o&&m.current&&h(null)}),[o,m,h]),za({containerRef:m,disabled:!o||!k,...u}),Sa({containerRef:m,disabled:!o||!k,...f}),n.default.createElement(n.default.Fragment,null,e&&e({ref:b,id:v,"aria-labelledby":v,"aria-haspopup":"true",tabIndex:0,onClick:B,onKeyDown:w}),o?n.default.createElement(Fo,Tt({returnFocusRef:b,onClickOutside:x,ignoreClickRefs:[b],onEscape:y,ref:h,role:"none",visibility:k?"visible":"hidden",height:d,width:s,top:(null==k?void 0:k.top)||0,left:(null==k?void 0:k.left)||0,anchorSide:null==k?void 0:k.anchorSide},c),a):null)};function jo(e,r,a){const[o,n]=t.useState(a);return[null!=e?e:o,t.useCallback((e=>{n(e),r&&r(e)}),[r])]}_o.displayName="AnchoredOverlay",_o.defaultProps={side:"outside-bottom",align:"start"};const Uo=e=>n.default.createElement(Io,Tt({role:"menuitem"},e));Uo.displayName="ActionMenuItem",Uo.displayName="ActionMenu.Item";const Go=({anchorContent:e,renderAnchor:r=(e=>n.default.createElement(jr,e)),anchorRef:a,onAction:o,open:i,setOpen:l,overlayProps:d,items:s,...c})=>{const[f,u]=jo(i,l,!1),g=yr(a),p=t.useCallback((()=>u(!0)),[u]),b=t.useCallback((()=>u(!1)),[u]),m=t.useMemo((()=>null===r?null:t=>r({"aria-label":"menu",children:e,...t})),[e,r]),h=t.useMemo((()=>s.map((e=>({...e,role:"menuitem",onAction:(t,r)=>{var a;const n=null!==(a=e.onAction)&&void 0!==a?a:o;null==n||n(t,r),r.defaultPrevented||b()}})))),[s,o,b]);return n.default.createElement(_o,{renderAnchor:m,anchorRef:g,open:f,onOpen:p,onClose:b,overlayProps:d},n.default.createElement(Oo,Tt({},c,{role:"menu",items:h})))};Go.displayName="ActionMenuBase",Go.displayName="ActionMenu";const Vo=Object.assign(Go,{Divider:yo,Item:Uo}),Ko=t.createContext(null);var qo={exports:{}};
|
581
591
|
/*!
|
582
592
|
Copyright (c) 2018 Jed Watson.
|
583
593
|
Licensed under the MIT License (MIT), see
|
584
594
|
http://jedwatson.github.io/classnames
|
585
|
-
*/!function(e){!function(){var t={}.hasOwnProperty;function r(){for(var e=[],a=0;a<arguments.length;a++){var o=arguments[a];if(o){var n=typeof o;if("string"===n||"number"===n)e.push(o);else if(Array.isArray(o)){if(o.length){var i=r.apply(null,o);i&&e.push(i)}}else if("object"===n)if(o.toString===Object.prototype.toString)for(var l in o)t.call(o,l)&&o[l]&&e.push(l);else e.push(o.toString())}}return e.join(" ")}e.exports?(r.default=r,e.exports=r):window.classNames=r}()}(
|
595
|
+
*/!function(e){!function(){var t={}.hasOwnProperty;function r(){for(var e=[],a=0;a<arguments.length;a++){var o=arguments[a];if(o){var n=typeof o;if("string"===n||"number"===n)e.push(o);else if(Array.isArray(o)){if(o.length){var i=r.apply(null,o);i&&e.push(i)}}else if("object"===n)if(o.toString===Object.prototype.toString)for(var l in o)t.call(o,l)&&o[l]&&e.push(l);else e.push(o.toString())}}return e.join(" ")}e.exports?(r.default=r,e.exports=r):window.classNames=r}()}(qo);var Xo=qo.exports;var Yo=i.default.input`
|
586
596
|
border: 0;
|
587
597
|
font-size: inherit;
|
588
598
|
font-family: inherit;
|
@@ -595,7 +605,7 @@
|
|
595
605
|
}
|
596
606
|
|
597
607
|
${Kt};
|
598
|
-
`;const
|
608
|
+
`;const Jo=re({variants:{small:{minHeight:"28px",px:2,py:"3px",fontSize:0,lineHeight:"20px"},large:{px:2,py:"10px",fontSize:3}}});var Zo=i.default.span`
|
599
609
|
display: inline-flex;
|
600
610
|
align-items: stretch;
|
601
611
|
min-height: 34px;
|
@@ -638,9 +648,9 @@
|
|
638
648
|
${ie}
|
639
649
|
${de}
|
640
650
|
${ce}
|
641
|
-
${
|
651
|
+
${Jo}
|
642
652
|
${Kt};
|
643
|
-
`;const
|
653
|
+
`;const Qo=n.default.forwardRef((({icon:e,block:t,className:r,contrast:a,disabled:o,sx:i,theme:l,width:d,minWidth:s,maxWidth:c,variant:f,...u},g)=>{const p=Xo(r,"TextInput-wrapper");return n.default.createElement(Zo,{block:t,className:p,contrast:a,disabled:o,hasIcon:!!e,sx:i,theme:l,width:d,minWidth:s,maxWidth:c,variant:f},e&&n.default.createElement(e,{className:"TextInput-icon"}),n.default.createElement(Yo,Tt({ref:g,disabled:o},u)))}));Qo.defaultProps={type:"text"},Qo.displayName="TextInput";var en=Qo;const tn=n.default.forwardRef((({as:e=en,onFocus:r,onBlur:a,onChange:o,onKeyDown:i,onKeyUp:l,onKeyPress:d,value:s,...c},f)=>{const u=t.useContext(Ko);if(null===u)throw new Error("AutocompleteContext returned null values");const{activeDescendantRef:g,autocompleteSuggestion:p="",id:b,inputRef:m,inputValue:h="",isMenuDirectlyActivated:v,setInputValue:x,setShowMenu:y,showMenu:w}=u,B=Oa(m,f),[k,$]=t.useState(!0),S=t.useCallback((e=>{r&&r(e),y(!0)}),[r,y]),T=t.useCallback((e=>{a&&a(e),setTimeout((()=>{document.activeElement!==B.current&&y(!1)}),0)}),[a,y,B]),E=t.useCallback((e=>{o&&o(e),x(e.currentTarget.value),w||y(!0)}),[o,x,y,w]),C=t.useCallback((e=>{var t;i&&i(e),"Backspace"===e.key&&$(!1),"Escape"===e.key&&null!==(t=m.current)&&void 0!==t&&t.value&&(x(""),m.current.value="")}),[m,x,$,i]),z=t.useCallback((e=>{l&&l(e),"Backspace"===e.key&&$(!0)}),[$,l]),R=t.useCallback((e=>{if(d&&d(e),w&&"Enter"===e.key&&g.current){e.preventDefault(),e.nativeEvent.stopImmediatePropagation();const t=new KeyboardEvent(e.type,e.nativeEvent);g.current.dispatchEvent(t)}}),[g,w,d]);return t.useEffect((()=>{m.current&&(p||(m.current.value=h),k&&p&&(h||v)&&(m.current.value=p,0===p.toLowerCase().indexOf(h.toLowerCase())&&m.current.setSelectionRange(h.length,p.length)))}),[p,h,m,v]),t.useEffect((()=>{s&&x(s.toString())}),[s,x]),n.default.createElement(e,Tt({onFocus:S,onBlur:T,onChange:E,onKeyDown:C,onKeyPress:R,onKeyUp:z,ref:B,"aria-controls":`${b}-listbox`,"aria-autocomplete":"both",role:"combobox","aria-expanded":w,"aria-haspopup":"listbox","aria-owns":`${b}-listbox`,autocomplete:"off"},c))}));tn.displayName="AutocompleteInput";var rn=tn;const an=(e,t,r="vertical",a=8,o=0,n="smooth")=>{const i="vertical"===r?"top":"left",l="vertical"===r?"bottom":"right",d="vertical"===r?"scrollTop":"scrollLeft",{[i]:s,[l]:c}=e.getBoundingClientRect(),{[i]:f,[l]:u}=t.getBoundingClientRect(),g=c>u-a;if(s<f+o){const e=s-f+t[d];t.scrollTo({behavior:n,[i]:e-o})}else if(g){const e=c-u+t[d];t.scrollTo({behavior:n,[i]:e+a})}};function on(e){const r=t.useContext(Ko);if(null===r)throw new Error("AutocompleteContext returned null values");const{activeDescendantRef:a,id:o,inputRef:i,inputValue:l="",scrollContainerRef:d,setAutocompleteSuggestion:s,setShowMenu:c,setInputValue:f,setIsMenuDirectlyActivated:u,setSelectedItemLength:g,showMenu:p}=r,{items:b,selectedItemIds:m,sortOnCloseFn:h,emptyStateText:v,addNewItem:x,loading:y,selectionVariant:w,filterFn:B,"aria-labelledby":k,onOpenChange:$,onSelectedChange:S,customScrollContainerRef:T}=e,E=t.useRef(null),[C,z]=t.useState(),[R,N]=t.useState(b.map((({id:e})=>e))),A=t.useMemo((()=>b.map((e=>({...e,role:"option",id:e.id,selected:"multiple"===w?m.includes(e.id):void 0,onAction:e=>{const t=m.filter((t=>t!==e.id)),r=m.includes(e.id)?t:[...t,e.id];var a,o;((S||(a=f,function(e){const{text:t=""}=Array.isArray(e)?e.slice(-1)[0]:e;a(t)}))(r.map((e=>function(e,t){return t.find((t=>t.id===e))}(e,b)))),"multiple"===w)?(f(""),s("")):(c(!1),null===(o=i.current)||void 0===o||o.setSelectionRange(i.current.value.length,i.current.value.length))}})))),[b,m,i,S,w,s,f,c]),I=t.useMemo((()=>R.reduce(((e,t,r)=>(e[t]=r,e)),{})),[R]),L=t.useMemo((()=>{return A.filter(B||(e=l,function(t,r){var a;return Boolean(null===(a=t.text)||void 0===a?void 0:a.toLowerCase().startsWith(e.toLowerCase()))})).sort(((e,t)=>I[e.id]-I[t.id]));var e}),[A,I,B,l]),O=t.useMemo((()=>[...L,...x?[{...x,leadingVisual:()=>n.default.createElement(na,null),onAction:e=>{x.handleAddItem({...e,id:e.id||zr(),leadingVisual:void 0}),"multiple"===w&&(f(""),s(""))}}]:[]]),[L,x,s,w,f]);return za({containerRef:E,focusOutBehavior:"wrap",focusableElementFilter:e=>!(e instanceof HTMLInputElement),activeDescendantFocus:i,onActiveDescendantChanged:(e,t,r)=>{if(a.current=e||null,e){const t=A.find((t=>t.id.toString()===e.getAttribute("data-id")));z(t),u(r)}e&&T&&T.current&&r?an(e,T.current):e&&d.current&&r&&an(e,d.current)}},[y]),t.useEffect((()=>{var e;null!=C&&null!==(e=C.text)&&void 0!==e&&e.startsWith(l)&&!m.includes(C.id)?s(C.text):s("")}),[C,l,m,s]),t.useEffect((()=>{const e=[...R].sort(h||(t=e=>((e,t)=>t.includes(e))(e,m),(e,r)=>t(e)===t(r)?0:t(e)?-1:1));var t;const r=e.length===R.length&&e.every(((e,t)=>e===R[t]));!1!==p||r||N(e),$&&$(Boolean(p))}),[p,$,m,h,R]),t.useEffect((()=>{m.length&&g(m.length)}),[m,g]),n.default.createElement(qt,{sx:p?{}:{position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"}},y?n.default.createElement(qt,{p:3,display:"flex",justifyContent:"center"},n.default.createElement(vl,null)):n.default.createElement("div",{ref:E},O.length?n.default.createElement(Mo,{selectionVariant:"multiple",items:O,role:"listbox",id:`${o}-listbox`,"aria-labelledby":k}):n.default.createElement(qt,{p:3},v)))}function nn({menuAnchorRef:e,overlayProps:r,children:a}){const o=t.useContext(Ko);if(null===o)throw new Error("AutocompleteContext returned null values");const{inputRef:i,scrollContainerRef:l,selectedItemLength:d,setShowMenu:s,showMenu:c=!1}=o,{floatingElementRef:f,position:u}=ya({side:"outside-bottom",align:"start",anchorElementRef:e||i},[c,d]),g=Oa(l,f),p=t.useCallback((()=>{s(!1)}),[s]);return"undefined"==typeof window?null:n.default.createElement(Fo,Tt({returnFocusRef:i,preventFocusOnOpen:!0,onClickOutside:p,onEscape:p,ref:g,top:null==u?void 0:u.top,left:null==u?void 0:u.left,visibility:c?"visible":"hidden",sx:{overflow:"auto"}},r),a)}on.displayName="AutocompleteMenu",on.defaultProps={emptyStateText:"No selectable options",selectionVariant:"single"},on.displayName="AutocompleteMenu",nn.displayName="AutocompleteOverlay",nn.displayName="AutocompleteOverlay";const ln={inputValue:"",showMenu:!1,isMenuDirectlyActivated:!1,autocompleteSuggestion:"",selectedItemLength:0},dn=(e,t)=>{const{type:r,payload:a}=t;switch(r){case"inputValue":return{...e,inputValue:a};case"showMenu":return{...e,showMenu:a};case"isMenuDirectlyActivated":return{...e,isMenuDirectlyActivated:a};case"autocompleteSuggestion":return{...e,autocompleteSuggestion:a};case"selectedItemLength":return{...e,selectedItemLength:a};default:return e}},sn=({children:e,id:r})=>{const a=t.useRef(null),o=t.useRef(null),i=t.useRef(null),[l,d]=t.useReducer(dn,ln),{inputValue:s,showMenu:c,autocompleteSuggestion:f,isMenuDirectlyActivated:u,selectedItemLength:g}=l,p=t.useCallback((e=>{d({type:"inputValue",payload:e})}),[]),b=t.useCallback((e=>{d({type:"showMenu",payload:e})}),[]),m=t.useCallback((e=>{d({type:"autocompleteSuggestion",payload:e})}),[]),h=t.useCallback((e=>{d({type:"isMenuDirectlyActivated",payload:e})}),[]),v=t.useCallback((e=>{d({type:"selectedItemLength",payload:e})}),[]),x=Da(r);return n.default.createElement(Ko.Provider,{value:{activeDescendantRef:a,autocompleteSuggestion:f,id:x,inputRef:i,inputValue:s,isMenuDirectlyActivated:u,scrollContainerRef:o,selectedItemLength:g,setAutocompleteSuggestion:m,setInputValue:p,setIsMenuDirectlyActivated:h,setShowMenu:b,setSelectedItemLength:v,showMenu:c}},e)};sn.displayName="Autocomplete";var cn=Object.assign(sn,{Input:rn,Menu:on,Overlay:nn});const fn=i.default.img.attrs((e=>({height:e.size,width:e.size})))`
|
644
654
|
display: inline-block;
|
645
655
|
overflow: hidden; // Ensure page layout in Firefox should images fail to load
|
646
656
|
line-height: ${xt("lineHeights.condensedUltra")};
|
@@ -648,12 +658,12 @@
|
|
648
658
|
border-radius: ${e=>function({size:e,square:t}){return t?e&&e<=24?"4px":"6px":"50%"}(e)};
|
649
659
|
${yt};
|
650
660
|
${Kt}
|
651
|
-
`;
|
661
|
+
`;fn.defaultProps={size:20,alt:"",square:!1};var un=fn;const gn=i.default(un)`
|
652
662
|
position: absolute;
|
653
663
|
right: -15%;
|
654
664
|
bottom: -9%;
|
655
665
|
box-shadow: ${xt("shadows.avatar.childShadow")};
|
656
|
-
`,
|
666
|
+
`,pn=({children:e,...t})=>{const r=n.default.Children.map(e,((e,t)=>n.default.isValidElement(e)?0===t?n.default.cloneElement(e,{size:40}):n.default.createElement(gn,Tt({bg:"canvas.default"},e.props,{size:20})):e));return n.default.createElement(qt,Tt({position:"relative",display:"inline-flex"},t),r)};pn.displayName="AvatarPair",pn.displayName="AvatarPair";var bn=pn;const mn=i.default.span`
|
657
667
|
display: flex;
|
658
668
|
position: relative;
|
659
669
|
height: 20px;
|
@@ -768,7 +778,7 @@
|
|
768
778
|
}
|
769
779
|
|
770
780
|
${Kt};
|
771
|
-
`,
|
781
|
+
`,hn=({children:e,alignRight:t,sx:r})=>{const a=n.default.Children.count(e),o=Xo({"pc-AvatarStack--two":2===a,"pc-AvatarStack--three-plus":a>2,"pc-AvatarStack--right":t});return n.default.createElement(mn,{count:a,className:o,sx:r},n.default.createElement(qt,{position:"absolute",display:"flex",width:"38px",className:"pc-AvatarStackBody"},(e=>n.default.Children.map(e,((e,t)=>n.default.isValidElement(e)?n.default.cloneElement(e,{className:Xo(e.props.className,"pc-AvatarItem"),sx:{zIndex:10-t,...e.props.sx}}):e)))(e)))};hn.displayName="AvatarStack";var vn=hn;var xn=i.default.a`
|
772
782
|
display: inline-block;
|
773
783
|
padding: 2px 6px;
|
774
784
|
font-size: ${xt("fontSizes.0")};
|
@@ -778,7 +788,7 @@
|
|
778
788
|
border-radius: ${xt("radii.2")};
|
779
789
|
${yt};
|
780
790
|
${Kt};
|
781
|
-
`;const
|
791
|
+
`;const yn=i.default.li`
|
782
792
|
display: inline-block;
|
783
793
|
white-space: nowrap;
|
784
794
|
list-style: none;
|
@@ -797,13 +807,13 @@
|
|
797
807
|
content: none;
|
798
808
|
}
|
799
809
|
}
|
800
|
-
`,
|
810
|
+
`,wn=i.default.nav`
|
801
811
|
display: flex;
|
802
812
|
justify-content: space-between;
|
803
813
|
${yt};
|
804
814
|
${St};
|
805
815
|
${Kt};
|
806
|
-
`;function
|
816
|
+
`;function Bn({className:e,children:t,theme:r,...a}){const o=n.default.Children.map(t,(e=>n.default.createElement(yn,{theme:r},e)));return n.default.createElement(wn,Tt({className:e,"aria-label":"Breadcrumbs",theme:r},a),n.default.createElement(qt,{as:"ol",my:0,pl:0},o))}Bn.displayName="Breadcrumbs";const kn=i.default.a.attrs((e=>({activeClassName:"string"==typeof e.to?"selected":"",className:Xo(e.selected&&"selected",e.className),"aria-current":e.selected?"page":null})))`
|
807
817
|
color: ${xt("colors.accent.fg")};
|
808
818
|
display: inline-block;
|
809
819
|
font-size: ${xt("fontSizes.1")};
|
@@ -817,7 +827,7 @@
|
|
817
827
|
}
|
818
828
|
${yt}
|
819
829
|
${Kt};
|
820
|
-
`;
|
830
|
+
`;Bn.displayName="Breadcrumbs",kn.displayName="Breadcrumbs.Item";var $n=Object.assign(Bn,{Item:kn});const Sn=Object.assign(Bn,{Item:kn}),Tn={top:"Bottom",right:"Left",bottom:"Top",left:"Right"},En={top:"Left",right:"Top",bottom:"Left",left:"Top"};function Cn(e,t,r){const a=Tn[e].toLowerCase(),o=En[e].toLowerCase();return{[a]:"100%",[t||o]:t?r:"50%"}}const zn=pt({prop:"bg",key:"colors"}),Rn=pt({prop:"borderColor",key:"colors"}),Nn=pt({prop:"borderWidth",key:"borderWidths",scale:[0,1]});function An(e){var t;const a=n.default.useContext(r.ThemeContext),o={...e,theme:null!==(t=e.theme)&&void 0!==t?t:a},{bg:i}=zn(o),{borderColor:l}=Rn(o),{borderWidth:d}=Nn(o),{size:s=8,location:c="bottom"}=e,[f,u]=function(e){const[t,r]=e.split("-");return[t,r]}(c),g=En[f],p=[-s,0],b=[0,s],m=[s,0],h=`M${p}L${b}L${m}L${p}Z`,v=`M${p}L${b}L${m}`,x={top:`translate(${[s,2*s]}) rotate(180)`,right:`translate(${[0,s]}) rotate(-90)`,bottom:`translate(${[s,0]})`,left:`translate(${[2*s,s]}) rotate(90)`}[f];return n.default.createElement("svg",{width:2*s,height:2*s,style:{pointerEvents:"none",position:"absolute",...Cn(f,u,s),[`margin${g}`]:u?null:-s}},n.default.createElement("g",{transform:x},n.default.createElement("path",{d:h,fill:i}),n.default.createElement("path",{d:v,fill:"none",stroke:l,strokeWidth:d})))}An.displayName="Caret",An.locations=["top","top-left","top-right","right","right-top","right-bottom","bottom","bottom-left","bottom-right","left","left-top","left-bottom"],An.defaultProps={bg:"canvas.default",borderColor:"border.default",borderWidth:1};const In={small:56,medium:96,large:128},Ln=i.default.div`
|
821
831
|
display: ${e=>e.inline?"inline-flex":"flex"};
|
822
832
|
align-items: center;
|
823
833
|
justify-content: center;
|
@@ -825,13 +835,13 @@
|
|
825
835
|
border-radius: 50%;
|
826
836
|
box-shadow: ${xt("shadows.shadow.medium")};
|
827
837
|
${yt};
|
828
|
-
${({size:e,variant:t="medium"})=>{const r=function(e){return!isNaN(parseFloat(e))&&isFinite(e)}(e)?e:
|
838
|
+
${({size:e,variant:t="medium"})=>{const r=function(e){return!isNaN(parseFloat(e))&&isFinite(e)}(e)?e:In[t];return{width:r,height:r}}};
|
829
839
|
${Kt};
|
830
|
-
`,
|
840
|
+
`,On=i.default(Ca)`
|
831
841
|
height: auto;
|
832
842
|
max-width: 60%;
|
833
843
|
max-height: 55%;
|
834
|
-
`;
|
844
|
+
`;Ln.defaultProps={inline:!1},On.displayName="CircleBadge.Icon";var Mn=Object.assign(Ln,{Icon:On});function Pn(e){const{size:t,as:r}=e,{icon:a,bg:o,...i}=e;return n.default.createElement(qt,{as:r,bg:o,overflow:"hidden",borderWidth:0,size:t,borderRadius:"50%",borderStyle:"solid",borderColor:"border.default"},n.default.createElement(qt,Tt({display:"flex"},i,{alignItems:"center",justifyContent:"center"}),n.default.createElement(a,{size:t})))}Pn.displayName="CircleOcticon",Pn.defaultProps={...qt.defaultProps,size:32};var Hn=i.default.span`
|
835
845
|
display: inline-block;
|
836
846
|
padding: 2px 5px;
|
837
847
|
font-size: ${xt("fontSizes.0")};
|
@@ -847,7 +857,7 @@
|
|
847
857
|
}
|
848
858
|
|
849
859
|
${Kt};
|
850
|
-
`;const
|
860
|
+
`;const Dn=i.default.details`
|
851
861
|
& > summary {
|
852
862
|
list-style: none;
|
853
863
|
}
|
@@ -857,11 +867,11 @@
|
|
857
867
|
|
858
868
|
${yt}
|
859
869
|
${Kt};
|
860
|
-
`;
|
870
|
+
`;Dn.displayName="Details";var Wn=Dn;const Fn=()=>null;function _n(e){const t=e;return t.tabIndex>=0&&!t.disabled&&function(e){return!e.hidden&&(!e.type||"hidden"!==e.type)&&(e.offsetWidth>0||e.offsetHeight>0)}(t)}var jn=i.default.span`
|
861
871
|
${wt};
|
862
872
|
${yt};
|
863
873
|
${Kt};
|
864
|
-
`;const
|
874
|
+
`;const Un=()=>null,Gn=i.default.div`
|
865
875
|
box-shadow: ${xt("shadows.shadow.large")};
|
866
876
|
border-radius: ${xt("radii.2")};
|
867
877
|
position: fixed;
|
@@ -885,7 +895,7 @@
|
|
885
895
|
${kt};
|
886
896
|
${yt};
|
887
897
|
${Kt};
|
888
|
-
`,
|
898
|
+
`,Vn=i.default(qt)`
|
889
899
|
border-radius: ${xt("radii.2")} ${xt("radii.2")} 0px 0px;
|
890
900
|
border-bottom: 1px solid ${xt("colors.border.default")};
|
891
901
|
display: flex;
|
@@ -895,7 +905,7 @@
|
|
895
905
|
}
|
896
906
|
|
897
907
|
${Kt};
|
898
|
-
`;function
|
908
|
+
`;function Kn({theme:e,children:t,backgroundColor:r="gray.1",...a}){return n.default.Children.toArray(t).every((e=>"string"==typeof e))&&(t=n.default.createElement(jn,{theme:e,color:"fg.default",fontSize:1,fontWeight:"bold",fontFamily:"sans-serif"},t)),n.default.createElement(Vn,Tt({theme:e,p:3,backgroundColor:r},a),t)}Kn.displayName="DialogHeader";const qn=i.default.span`
|
899
909
|
&:before {
|
900
910
|
position: fixed;
|
901
911
|
top: 0;
|
@@ -909,10 +919,10 @@
|
|
909
919
|
z-index: 99;
|
910
920
|
background: ${xt("colors.primer.canvas.backdrop")};
|
911
921
|
}
|
912
|
-
`,
|
922
|
+
`,Xn=t.forwardRef((({children:e,onDismiss:r=Un,isOpen:a,initialFocusRef:o,returnFocusRef:i,...l},d)=>{const s=t.useRef(null),c=Oa(d),f=t.useRef(null),u=()=>{r(),i&&i.current&&i.current.focus()},{getDialogProps:g}=function({modalRef:e,overlayRef:r,isOpen:a,onDismiss:o=Fn,initialFocusRef:n,closeButtonRef:i}){const l=t.useCallback((t=>{e.current&&r.current&&!e.current.contains(t.target)&&r.current.contains(t.target)&&o()}),[o,e,r]);t.useEffect((()=>{if(a)return document.addEventListener("click",l),()=>{document.removeEventListener("click",l)}}),[a,l]),t.useEffect((()=>{a&&(n&&n.current?n.current.focus():i&&i.current&&i.current.focus())}),[a,n,i]);const d=t.useCallback(((t,r)=>{if(e.current){const a=Array.from(e.current.querySelectorAll("*")).filter(_n);if(0===a.length)return;t.preventDefault();const o=document.activeElement;if(!o)return;const n=a.indexOf(o)+r,i=1===r?0:a.length-1;return a[n]||a[i]}}),[e]),s=t.useCallback((e=>{const t=e.shiftKey?-1:1,r=d(e,t);r&&r.focus()}),[d]),c=t.useCallback((e=>{switch(e.key){case"Tab":s(e);break;case"Escape":o(),e.stopPropagation()}}),[s,o]);return{getDialogProps:()=>({onKeyDown:c})}}({modalRef:c,onDismiss:u,isOpen:a,initialFocusRef:o,closeButtonRef:f,returnFocusRef:i,overlayRef:s});return a?n.default.createElement(n.default.Fragment,null,n.default.createElement(qn,{ref:s}),n.default.createElement(Gn,Tt({tabIndex:-1,ref:c,role:"dialog","aria-modal":"true"},l,g()),n.default.createElement(ca,{ref:f,onClick:u,sx:{position:"absolute",top:"16px",right:"16px"}}),e)):null}));Kn.defaultProps={backgroundColor:"canvas.subtle"},Kn.propTypes={...qt.propTypes},Kn.displayName="Dialog.Header",Xn.displayName="Dialog";var Yn=Object.assign(Xn,{Header:Kn});var Jn=(e,t)=>({w:`\n top: 0;\n right: 100%;\n left: auto;\n width: auto;\n margin-top: 0;\n margin-right: 10px;\n\n &::before {\n top: 10px;\n right: -16px;\n left: auto;\n border-color: transparent;\n border-left-color: ${xt("colors.border.default")(e)};\n }\n\n &::after {\n top: 11px;\n right: -14px;\n left: auto;\n border-color: transparent;\n border-left-color: ${xt("colors.border.default")(e)};\n }\n `,e:`\n top: 0;\n left: 100%;\n width: auto;\n margin-top: 0;\n margin-left: 10px;\n\n &::before {\n top: 10px;\n left: -16px;\n border-color: transparent;\n border-right-color: ${xt("colors.border.default")(e)};\n }\n\n &::after {\n top: 11px;\n left: -14px;\n border-color: transparent;\n border-right-color: ${xt("colors.border.default")(e)};\n }\n `,ne:`\n top: auto;\n bottom: 100%;\n left: 0;\n margin-bottom: 3px;\n\n &::before,\n &::after {\n top: auto;\n right: auto;\n }\n\n &::before {\n bottom: -8px;\n left: 9px;\n border-top: 8px solid ${xt("colors.border.default")(e)};\n border-bottom: 0;\n border-left: 8px solid transparent;\n }\n\n &::after {\n bottom: -7px;\n left: 10px;\n border-top: 7px solid ${xt("colors.border.default")(e)};\n border-right: 7px solid transparent;\n border-bottom: 0;\n border-left: 7px solid transparent;\n }\n `,s:"\n right: 50%;\n left: auto;\n transform: translateX(50%);\n\n &::before {\n top: -16px;\n right: 50%;\n transform: translateX(50%);\n }\n\n &::after {\n top: -14px;\n right: 50%;\n transform: translateX(50%);\n }\n ",sw:"\n right: 0;\n left: auto;\n\n &::before {\n top: -16px;\n right: 9px;\n left: auto;\n }\n\n &::after {\n top: -14px;\n right: 10px;\n left: auto;\n }\n ",se:"\n &::before {\n top: -16px;\n left: 9px;\n }\n\n &::after {\n top: -14px;\n left: 10px;\n }\n "}[t]);const Zn=i.default(Wn)`
|
913
923
|
position: relative;
|
914
924
|
display: inline-block;
|
915
|
-
`,
|
925
|
+
`,Qn=({children:e,className:t,...r})=>{const{getDetailsProps:a}=lr({closeOnOutsideClick:!0});return n.default.createElement(Zn,Tt({className:t},a(),r),e)};Qn.displayName="Dropdown";const ei=({children:e,...t})=>n.default.createElement(jr,Tt({as:"summary","aria-haspopup":"true"},t),e,n.default.createElement(ti,null));ei.displayName="DropdownButton";const ti=i.default.div`
|
916
926
|
border: 4px solid transparent;
|
917
927
|
margin-left: 12px;
|
918
928
|
border-top-color: currentcolor;
|
@@ -924,7 +934,7 @@
|
|
924
934
|
width: 0;
|
925
935
|
${yt};
|
926
936
|
${Kt};
|
927
|
-
`,
|
937
|
+
`,ri=i.default.ul`
|
928
938
|
background-clip: padding-box;
|
929
939
|
background-color: ${xt("colors.canvas.overlay")};
|
930
940
|
border: 1px solid ${xt("colors.border.default")};
|
@@ -965,10 +975,10 @@
|
|
965
975
|
> ul {
|
966
976
|
list-style: none;
|
967
977
|
}
|
968
|
-
${e=>e.direction?
|
978
|
+
${e=>e.direction?Jn(e.theme,e.direction):""};
|
969
979
|
${yt};
|
970
980
|
${Kt};
|
971
|
-
`,
|
981
|
+
`,ai=i.default.li`
|
972
982
|
display: block;
|
973
983
|
padding: ${xt("space.1")} 10px ${xt("space.1")} 15px;
|
974
984
|
overflow: hidden;
|
@@ -1001,7 +1011,7 @@
|
|
1001
1011
|
}
|
1002
1012
|
${yt};
|
1003
1013
|
${Kt};
|
1004
|
-
`;
|
1014
|
+
`;ri.defaultProps={direction:"sw"},ri.displayName="Dropdown.Menu",ai.displayName="Dropdown.Item",ei.defaultProps=jr.defaultProps,ei.displayName="Dropdown.Button",ti.displayName="Dropdown.Caret",Qn.defaultProps=Wn.defaultProps;var oi=Object.assign(Qn,{Caret:ti,Menu:ri,Item:ai,Button:ei});const ni=n.default.forwardRef((({children:e,...t},r)=>n.default.createElement(jr,Tt({ref:r,type:"button"},t),e,n.default.createElement(Ca,{icon:la,ml:1}))));function ii({renderAnchor:e=(e=>n.default.createElement(ni,e)),anchorRef:r,placeholder:a,selectedItem:o,onChange:i,overlayProps:l,items:d,open:s,onOpenChange:c,...f}){const[u,g]=jo(s,c,!1),p=t.useCallback((()=>g(!0)),[g]),b=t.useCallback((()=>g(!1)),[g]),m=yr(r),h=t.useMemo((()=>null===e?null:t=>{var r;return e({...t,children:null!==(r=null==o?void 0:o.text)&&void 0!==r?r:a})}),[a,e,null==o?void 0:o.text]),v=t.useMemo((()=>d.map((e=>({...e,role:"option",selected:e===o,onAction:(t,r)=>{var a;null===(a=e.onAction)||void 0===a||a.call(e,t,r),r.defaultPrevented||(b(),null==i||i(e===o?void 0:e))}})))),[d,i,b,o]);return n.default.createElement(_o,{renderAnchor:h,anchorRef:m,open:u,onOpen:p,onClose:b,overlayProps:l},n.default.createElement(Oo,Tt({},f,{role:"listbox",items:v})))}ii.displayName="DropdownMenu",ii.displayName="DropdownMenu";var li=i.default.div`
|
1005
1015
|
${yt};
|
1006
1016
|
display: flex;
|
1007
1017
|
align-items: stretch;
|
@@ -1020,11 +1030,11 @@
|
|
1020
1030
|
}
|
1021
1031
|
|
1022
1032
|
${Kt}
|
1023
|
-
`;const
|
1033
|
+
`;const di=i.default.ul`
|
1024
1034
|
list-style-type: none;
|
1025
1035
|
${yt};
|
1026
1036
|
${Kt};
|
1027
|
-
`,
|
1037
|
+
`,si=({children:e,...t})=>{const r=n.default.Children.map(e,(e=>n.default.createElement("li",null,e)));return n.default.createElement(di,t,r)};si.displayName="FilterList";const ci=i.default.a`
|
1028
1038
|
position: relative;
|
1029
1039
|
display: block;
|
1030
1040
|
padding: ${e=>e.small?`${xt("space.1")(e)} 10px`:`${xt("space.2")(e)} 11px`};
|
@@ -1052,7 +1062,7 @@
|
|
1052
1062
|
}
|
1053
1063
|
${yt};
|
1054
1064
|
${Kt};
|
1055
|
-
`;function
|
1065
|
+
`;function fi({children:e,count:t,...r}){return n.default.createElement(ci,r,t&&n.default.createElement("span",{title:"results",className:"count"},t),e)}fi.displayName="FilterListItem",si.defaultProps={m:0,p:0},fi.displayName="FilterList.Item";var ui=Object.assign(si,{Item:fi});const gi=re({variants:{default:{color:"fg.default",backgroundColor:"accent.subtle",borderColor:"accent.muted",svg:{color:"accent.fg"}},success:{color:"fg.default",backgroundColor:"success.subtle",borderColor:"success.muted",svg:{color:"success.fg"}},danger:{color:"fg.default",backgroundColor:"danger.subtle",borderColor:"danger.muted",svg:{color:"danger.fg"}},warning:{color:"fg.default",backgroundColor:"attention.subtle",borderColor:"attention.muted",svg:{color:"attention.fg"}}}}),pi=i.default.div`
|
1056
1066
|
position: relative;
|
1057
1067
|
color: ${xt("colors.fg.default")};
|
1058
1068
|
padding: ${xt("space.3")};
|
@@ -1070,14 +1080,14 @@
|
|
1070
1080
|
}
|
1071
1081
|
|
1072
1082
|
${yt};
|
1073
|
-
${
|
1083
|
+
${gi};
|
1074
1084
|
${Kt};
|
1075
|
-
`;
|
1085
|
+
`;pi.defaultProps={variant:"default"};var bi=pi;const mi=i.default.div`
|
1076
1086
|
margin: ${xt("space.3")} 0;
|
1077
1087
|
font-weight: ${xt("fontWeights.normal")};
|
1078
1088
|
${yt};
|
1079
1089
|
${Kt};
|
1080
|
-
`,
|
1090
|
+
`,hi=i.default.label`
|
1081
1091
|
display: block;
|
1082
1092
|
margin: 0 0 ${xt("space.2")};
|
1083
1093
|
font-size: ${xt("fontSizes.1")};
|
@@ -1085,7 +1095,7 @@
|
|
1085
1095
|
${wt};
|
1086
1096
|
${yt};
|
1087
1097
|
${Kt};
|
1088
|
-
`;
|
1098
|
+
`;hi.displayName="FormGroup.Label";var vi=Object.assign(mi,{Label:hi});const xi=i.default.div`
|
1089
1099
|
z-index: 32;
|
1090
1100
|
display: flex;
|
1091
1101
|
padding: ${xt("space.3")};
|
@@ -1099,7 +1109,7 @@
|
|
1099
1109
|
${yt}
|
1100
1110
|
${Bt}
|
1101
1111
|
${Kt};
|
1102
|
-
`,
|
1112
|
+
`,yi=i.default.div`
|
1103
1113
|
display: flex;
|
1104
1114
|
margin-right: ${xt("space.3")};
|
1105
1115
|
align-self: stretch;
|
@@ -1111,7 +1121,7 @@
|
|
1111
1121
|
${yt};
|
1112
1122
|
${Bt};
|
1113
1123
|
${Kt};
|
1114
|
-
`;
|
1124
|
+
`;yi.displayName="Header.Item";const wi=i.default.a.attrs((({to:e})=>"string"==typeof e?{"aria-current":"page"}:{}))`
|
1115
1125
|
font-weight: ${xt("fontWeights.bold")};
|
1116
1126
|
color: ${xt("colors.header.logo")};
|
1117
1127
|
white-space: nowrap;
|
@@ -1129,14 +1139,14 @@
|
|
1129
1139
|
${Bt};
|
1130
1140
|
${wt};
|
1131
1141
|
${Kt};
|
1132
|
-
`;
|
1142
|
+
`;wi.displayName="Header.Link";var Bi=Object.assign(xi,{Link:wi,Item:yi});const ki=i.default.h2`
|
1133
1143
|
font-weight: ${xt("fontWeights.bold")};
|
1134
1144
|
font-size: ${xt("fontSizes.5")};
|
1135
1145
|
margin: 0;
|
1136
1146
|
${wt};
|
1137
1147
|
${yt};
|
1138
1148
|
${Kt};
|
1139
|
-
`;
|
1149
|
+
`;ki.defaultProps={theme:d};var $i=ki;var Si=i.default.span`
|
1140
1150
|
${yt}
|
1141
1151
|
& * {
|
1142
1152
|
margin-right: ${xt("space.1")};
|
@@ -1145,7 +1155,7 @@
|
|
1145
1155
|
margin-right: 0;
|
1146
1156
|
}
|
1147
1157
|
${Kt};
|
1148
|
-
`;const
|
1158
|
+
`;const Ti=r.css(["margin-top:-1px;margin-bottom:-1px;color:",";border:"," solid ",";box-shadow:none;",";",";background-color:transparent;"],xt("colors.fg.muted"),xt("borderWidths.1"),xt("colors.border.default"),Qe,yt),Ei=re({variants:{small:{fontSize:0,lineHeight:"16px",padding:"0px 8px"},medium:{fontSize:0,lineHeight:"20px",padding:"0 8px"},large:{fontSize:0,lineHeight:"24px",padding:"0 12px"},xl:{fontSize:1,lineHeight:"16px",padding:"8px 12px"}}}),Ci=i.default.span`
|
1149
1159
|
display: inline-block;
|
1150
1160
|
font-weight: ${xt("fontWeights.semibold")};
|
1151
1161
|
color: ${xt("colors.fg.onEmphasis")};
|
@@ -1155,17 +1165,17 @@
|
|
1155
1165
|
text-decoration: none;
|
1156
1166
|
}
|
1157
1167
|
|
1158
|
-
${
|
1168
|
+
${Ei}
|
1159
1169
|
${yt}
|
1160
1170
|
${e=>e.dropshadow?"box-shadow: inset 0 -1px 0 rgba(27, 31, 35, 0.12)":""}
|
1161
|
-
${e=>e.outline?
|
1171
|
+
${e=>e.outline?Ti:""} // must be last to override other values
|
1162
1172
|
${Kt}
|
1163
|
-
`;
|
1173
|
+
`;Ci.defaultProps={bg:"neutral.emphasis",variant:"medium"};var zi=Ci;const Ri=k({hoverColor:{property:"color",scale:"colors"}});var Ni=i.default.a`
|
1164
1174
|
color: ${e=>e.muted?xt("colors.fg.muted")(e):xt("colors.accent.fg")(e)};
|
1165
1175
|
text-decoration: ${e=>e.underline?"underline":"none"};
|
1166
1176
|
&:hover {
|
1167
1177
|
text-decoration: ${e=>e.muted?"none":"underline"};
|
1168
|
-
${e=>e.hoverColor?
|
1178
|
+
${e=>e.hoverColor?Ri:e.muted?`color: ${xt("colors.accent.fg")(e)}`:""};
|
1169
1179
|
}
|
1170
1180
|
&:is(button) {
|
1171
1181
|
display: inline-block;
|
@@ -1181,7 +1191,7 @@
|
|
1181
1191
|
${wt};
|
1182
1192
|
${yt};
|
1183
1193
|
${Kt};
|
1184
|
-
`;var
|
1194
|
+
`;var Ai=i.default.div`
|
1185
1195
|
position: relative;
|
1186
1196
|
padding-top: ${xt("space.4")};
|
1187
1197
|
padding-bottom: ${xt("space.4")};
|
@@ -1189,7 +1199,7 @@
|
|
1189
1199
|
border-bottom: 1px solid ${xt("colors.border.default")};
|
1190
1200
|
${yt};
|
1191
1201
|
${Kt};
|
1192
|
-
`;const
|
1202
|
+
`;const Ii=i.default.a`
|
1193
1203
|
display: inline-block;
|
1194
1204
|
min-width: 32px;
|
1195
1205
|
padding: 5px 10px;
|
@@ -1289,12 +1299,12 @@
|
|
1289
1299
|
}
|
1290
1300
|
|
1291
1301
|
${yt};
|
1292
|
-
`;function
|
1302
|
+
`;function Li({theme:e,pageCount:t,currentPage:r,onPageChange:a,hrefBuilder:o,marginPageCount:i,showPages:l,surroundingPageCount:d}){const s=n.default.useCallback((e=>t=>a(t,e)),[a]),c=n.default.useMemo((()=>function(e,t,r,a,o){const n=[];if(r){const r=[],i=t=>{t>=1&&t<=e&&r.push(t)};let l=t-o,d=t+o;if(l<1&&d>e)l=1,d=e;else if(l<1)for(;l<1;)l++,d++;else if(d>e)for(;d>e;)l--,d--;for(let t=1;t<=a;t++){const r=t,a=e-(t-1);r>=l?d++:i(r),a<=d?l--:i(a)}for(let e=l;e<=d;e++)i(e);const s=r.slice().sort(((e,t)=>e-t)).filter(((e,t,r)=>!t||e!==r[t-1]));for(let e=0;e<s.length;e++){const r=s[e],a=r===t;0===e?(1!==r&&n.push({type:"BREAK",num:1}),n.push({type:"NUM",num:r,selected:a})):(1==r-s[e-1]||n.push({type:"BREAK",num:r-1}),n.push({type:"NUM",num:r,selected:a}))}const c=n[n.length-1];"NUM"===c.type&&c.num!==e&&n.push({type:"BREAK",num:e})}const i={type:"NEXT",num:t+1,disabled:t===e};return[{type:"PREV",num:t-1,disabled:1===t},...n,i]}(t,r,!!l,i,d)),[t,r,l,i,d]);return n.default.useMemo((()=>c.map((t=>{const{props:r,key:a,content:i}=function(e,t,r){const a={};let o="",n="";switch(e.type){case"PREV":n="page-prev",o="Previous",e.disabled?Object.assign(a,{as:"span","aria-disabled":"true"}):Object.assign(a,{rel:"prev",href:t(e.num),"aria-label":"Previous Page",onClick:r});break;case"NEXT":n="page-next",o="Next",e.disabled?Object.assign(a,{as:"span","aria-disabled":"true"}):Object.assign(a,{rel:"next",href:t(e.num),"aria-label":"Next Page",onClick:r});break;case"NUM":n=`page-${e.num}`,o=String(e.num),e.selected?Object.assign(a,{as:"em","aria-current":"page"}):Object.assign(a,{href:t(e.num),"aria-label":`Page ${e.num}`,onClick:r});break;case"BREAK":n=`page-${e.num}-break`,o="…",Object.assign(a,{as:"span","aria-disabled":!0})}return{props:a,key:n,content:o}}(t,o,s(t.num));return n.default.createElement(Ii,Tt({},r,{key:a,theme:e}),i)}))),[c,o,s,e])}const Oi=i.default.nav`
|
1293
1303
|
margin-top: 20px;
|
1294
1304
|
margin-bottom: 15px;
|
1295
1305
|
text-align: center;
|
1296
1306
|
${Kt};
|
1297
|
-
`;function
|
1307
|
+
`;function Mi({theme:e,pageCount:t,currentPage:r,onPageChange:a=Hi,hrefBuilder:o=Pi,marginPageCount:i=1,showPages:l=!0,surroundingPageCount:d=2,...s}){const c=Li({theme:e,pageCount:t,currentPage:r,onPageChange:a,hrefBuilder:o,marginPageCount:i,showPages:l,surroundingPageCount:d});return n.default.createElement(Oi,Tt({"aria-label":"Pagination"},s,{theme:e}),n.default.createElement(qt,{display:"inline-block",theme:e},c))}function Pi(e){return`#${e}`}function Hi(){}function Di(e){const{bg:t,border:r,borderColor:a,theme:o}=e,{caret:i,children:l,...d}=e,s={bg:t,borderColor:a,borderWidth:r,location:i,theme:o};return n.default.createElement(Yt,Tt({sx:{position:"relative"}},d),l,n.default.createElement(An,s))}Mi.displayName="Pagination",Mi.defaultProps={hrefBuilder:Pi,marginPageCount:1,onPageChange:Hi,showPages:!0,surroundingPageCount:2},Di.displayName="PointerBox";const Wi=i.default.div.attrs((({className:e,caret:t})=>({className:Xo(e,`caret-pos--${t}`)})))`
|
1298
1308
|
position: ${e=>e.relative?"relative":"absolute"};
|
1299
1309
|
z-index: 100;
|
1300
1310
|
display: ${e=>e.open?"block":"none"};
|
@@ -1303,7 +1313,7 @@
|
|
1303
1313
|
${kt};
|
1304
1314
|
${$t};
|
1305
1315
|
${Kt};
|
1306
|
-
`,
|
1316
|
+
`,Fi=i.default(qt)`
|
1307
1317
|
border: 1px solid ${xt("colors.border.default")};
|
1308
1318
|
border-radius: ${xt("radii.2")};
|
1309
1319
|
position: relative;
|
@@ -1340,9 +1350,9 @@
|
|
1340
1350
|
}
|
1341
1351
|
|
1342
1352
|
// Bottom-oriented carets
|
1343
|
-
${
|
1344
|
-
${
|
1345
|
-
${
|
1353
|
+
${Wi}.caret-pos--bottom & ,
|
1354
|
+
${Wi}.caret-pos--bottom-right & ,
|
1355
|
+
${Wi}.caret-pos--bottom-left & {
|
1346
1356
|
&::before,
|
1347
1357
|
&::after {
|
1348
1358
|
top: auto;
|
@@ -1362,8 +1372,8 @@
|
|
1362
1372
|
}
|
1363
1373
|
|
1364
1374
|
// Top & Bottom: Right-oriented carets
|
1365
|
-
${
|
1366
|
-
${
|
1375
|
+
${Wi}.caret-pos--top-right & ,
|
1376
|
+
${Wi}.caret-pos--bottom-right & {
|
1367
1377
|
right: -9px;
|
1368
1378
|
margin-right: 0;
|
1369
1379
|
|
@@ -1383,8 +1393,8 @@
|
|
1383
1393
|
}
|
1384
1394
|
|
1385
1395
|
// Top & Bottom: Left-oriented carets
|
1386
|
-
${
|
1387
|
-
${
|
1396
|
+
${Wi}.caret-pos--top-left & ,
|
1397
|
+
${Wi}.caret-pos--bottom-left & {
|
1388
1398
|
left: -9px;
|
1389
1399
|
margin-left: 0;
|
1390
1400
|
|
@@ -1400,12 +1410,12 @@
|
|
1400
1410
|
}
|
1401
1411
|
|
1402
1412
|
// Right- & Left-oriented carets
|
1403
|
-
${
|
1404
|
-
${
|
1405
|
-
${
|
1406
|
-
${
|
1407
|
-
${
|
1408
|
-
${
|
1413
|
+
${Wi}.caret-pos--right & ,
|
1414
|
+
${Wi}.caret-pos--right-top & ,
|
1415
|
+
${Wi}.caret-pos--right-bottom & ,
|
1416
|
+
${Wi}.caret-pos--left & ,
|
1417
|
+
${Wi}.caret-pos--left-top & ,
|
1418
|
+
${Wi}.caret-pos--left-bottom & {
|
1409
1419
|
&::before,
|
1410
1420
|
&::after {
|
1411
1421
|
top: 50%;
|
@@ -1425,9 +1435,9 @@
|
|
1425
1435
|
}
|
1426
1436
|
|
1427
1437
|
// Right-oriented carets
|
1428
|
-
${
|
1429
|
-
${
|
1430
|
-
${
|
1438
|
+
${Wi}.caret-pos--right & ,
|
1439
|
+
${Wi}.caret-pos--right-top & ,
|
1440
|
+
${Wi}.caret-pos--right-bottom & {
|
1431
1441
|
&::before {
|
1432
1442
|
right: -${xt("space.3")};
|
1433
1443
|
border-left-color: ${xt("colors.border.default")};
|
@@ -1441,9 +1451,9 @@
|
|
1441
1451
|
}
|
1442
1452
|
|
1443
1453
|
// Left-oriented carets
|
1444
|
-
${
|
1445
|
-
${
|
1446
|
-
${
|
1454
|
+
${Wi}.caret-pos--left & ,
|
1455
|
+
${Wi}.caret-pos--left-top & ,
|
1456
|
+
${Wi}.caret-pos--left-bottom & {
|
1447
1457
|
&::before {
|
1448
1458
|
left: -${xt("space.3")};
|
1449
1459
|
border-right-color: ${xt("colors.border.default")};
|
@@ -1457,8 +1467,8 @@
|
|
1457
1467
|
}
|
1458
1468
|
|
1459
1469
|
// Right & Left: Top-oriented carets
|
1460
|
-
${
|
1461
|
-
${
|
1470
|
+
${Wi}.caret-pos--right-top & ,
|
1471
|
+
${Wi}.caret-pos--left-top & {
|
1462
1472
|
&::before,
|
1463
1473
|
&::after {
|
1464
1474
|
top: ${xt("space.4")};
|
@@ -1466,8 +1476,8 @@
|
|
1466
1476
|
}
|
1467
1477
|
|
1468
1478
|
// Right & Left: Bottom-oriented carets
|
1469
|
-
${
|
1470
|
-
${
|
1479
|
+
${Wi}.caret-pos--right-bottom & ,
|
1480
|
+
${Wi}.caret-pos--left-bottom & {
|
1471
1481
|
&::before,
|
1472
1482
|
&::after {
|
1473
1483
|
top: auto;
|
@@ -1483,23 +1493,23 @@
|
|
1483
1493
|
}
|
1484
1494
|
|
1485
1495
|
${Kt};
|
1486
|
-
`;
|
1496
|
+
`;Wi.defaultProps={caret:"top"},Fi.displayName="Popover.Content";var _i=Object.assign(Wi,{Content:Fi});const ji=i.default.span`
|
1487
1497
|
width: ${e=>e.progress?`${e.progress}%`:0};
|
1488
1498
|
${yt}
|
1489
|
-
`,
|
1499
|
+
`,Ui={small:"5px",large:"10px",default:"8px"},Gi=i.default.span`
|
1490
1500
|
display: ${e=>e.inline?"inline-flex":"flex"};
|
1491
1501
|
overflow: hidden;
|
1492
1502
|
background-color: ${xt("colors.border.default")};
|
1493
1503
|
border-radius: ${xt("radii.1")};
|
1494
|
-
height: ${e=>
|
1504
|
+
height: ${e=>Ui[e.barSize||"default"]};
|
1495
1505
|
${yt}
|
1496
1506
|
${ie}
|
1497
1507
|
${Kt};
|
1498
|
-
`;function
|
1499
|
-
${
|
1508
|
+
`;function Vi({progress:e,bg:t,theme:r,...a}){return n.default.createElement(Gi,Tt({theme:r},a),n.default.createElement(ji,{progress:e,bg:t,theme:r}))}function Ki(e,r,a){const o=t.useCallback((t=>{const o=()=>{a(!0)},n=t=>{const r=Array.from(e.current.querySelectorAll('[role^="menuitem"]:not([hidden]):not([disabled]):not([aria-disabled="true"])')),a=document.activeElement,o=r.indexOf(a),n=t?r[o+1]:r[o-1],i=t?r[0]:r[r.length-1];return n||i};if(!(t instanceof KeyboardEvent))return;const i=t.target instanceof Element&&"SUMMARY"===t.target.tagName;switch(t.key){case"Escape":r&&((()=>{a(!1);const t=e.current.querySelector("summary");t&&t.focus()})(),t.preventDefault(),t.stopPropagation());break;case"ArrowDown":{i&&!r&&o();const e=n(!0);e&&e.focus(),t.preventDefault()}break;case"ArrowUp":{i&&!r&&o();const e=n(!1);e&&e.focus(),t.preventDefault()}break;case" ":case"Enter":{const r=document.activeElement;r&&(e=>{const t=e.getAttribute("role");return"menuitem"===t||"menuitemcheckbox"===t||"menuitemradio"===t})(r)&&r.closest("details")===e&&(t.preventDefault(),t.stopPropagation(),r.click())}}}),[e,r,a]);t.useEffect((()=>{const t=e.current;if(t)return t.addEventListener("keydown",o),()=>{t.removeEventListener("keydown",o)}}),[e,o])}Vi.displayName="ProgressBar",Vi.defaultProps={bg:"success.emphasis",barSize:"default"};const qi=t.createContext({}),Xi=r.css(["padding:"," ",";margin:0;font-size:",";font-weight:",";color:",";background-color:",";border-bottom:"," solid ",";"],xt("space.1"),xt("space.3"),xt("fontSizes.0"),xt("fontWeights.bold"),xt("colors.fg.muted"),xt("colors.canvas.subtle"),xt("borderWidths.1"),xt("colors.border.muted")),Yi=i.default.div`
|
1509
|
+
${Xi}
|
1500
1510
|
${yt}
|
1501
1511
|
${Kt};
|
1502
|
-
`;
|
1512
|
+
`;Yi.displayName="SelectMenu.Divider";var Ji=Yi;const Zi=i.default.form`
|
1503
1513
|
padding: ${xt("space.3")};
|
1504
1514
|
margin: 0;
|
1505
1515
|
border-bottom: ${xt("borderWidths.1")} solid ${xt("colors.border.muted")};
|
@@ -1511,11 +1521,11 @@
|
|
1511
1521
|
}
|
1512
1522
|
|
1513
1523
|
${Kt};
|
1514
|
-
`,
|
1515
|
-
${
|
1524
|
+
`,Qi=t.forwardRef((({theme:e,value:r,sx:a,...o},i)=>{const l=t.useRef(null),d=null!=i?i:l,{open:s}=t.useContext(qi);return t.useEffect((()=>{var e;s&&(null===(e=l.current)||void 0===e||e.focus())}),[s]),n.default.createElement(Zi,{theme:e,sx:a},n.default.createElement(en,Tt({theme:e,ref:d,width:"100%",block:!0,value:r,contrast:!0},o)))}));Qi.displayName="SelectMenu.Filter";var el=Qi;const tl=r.css(["margin-top:-1px;padding:"," ",";font-size:",";color:",";text-align:center;border-top:"," solid ",";@media (min-width:","){padding:"," ",";}"],xt("space.2"),xt("space.3"),xt("fontSizes.0"),xt("colors.fg.muted"),xt("borderWidths.1"),xt("colors.border.muted"),xt("breakpoints.0"),xt("space.1"),xt("space.2")),rl=i.default.footer`
|
1525
|
+
${tl}
|
1516
1526
|
${yt}
|
1517
1527
|
${Kt};
|
1518
|
-
`;
|
1528
|
+
`;rl.displayName="SelectMenu.Footer";var al=rl;const ol=i.default.h3`
|
1519
1529
|
color: ${xt("colors.fg.default")};
|
1520
1530
|
flex: auto;
|
1521
1531
|
font-size: ${xt("fontSizes.1")};
|
@@ -1525,7 +1535,7 @@
|
|
1525
1535
|
@media (min-width: ${xt("breakpoints.0")}) {
|
1526
1536
|
font-size: inherit;
|
1527
1537
|
}
|
1528
|
-
`,
|
1538
|
+
`,nl=i.default.header`
|
1529
1539
|
display: flex;
|
1530
1540
|
flex: none; // fixes header from getting squeezed in Safari iOS
|
1531
1541
|
padding: ${xt("space.3")};
|
@@ -1539,15 +1549,15 @@
|
|
1539
1549
|
}
|
1540
1550
|
|
1541
1551
|
${Kt};
|
1542
|
-
`,
|
1543
|
-
${
|
1552
|
+
`,il=({children:e,theme:t,...r})=>n.default.createElement(nl,Tt({theme:t},r),n.default.createElement(ol,{theme:t},e));il.displayName="SelectMenuHeader",il.displayName="SelectMenu.Header";var ll=il;const dl=r.css(["display:flex;align-items:center;padding:",";overflow:hidden;text-align:left;cursor:pointer;background-color:",";border:0;border-bottom:"," solid ",";color:",";text-decoration:none;font-size:",";font-family:inherit;width:100%;&:hover{text-decoration:none;}&:focus{outline:none;}&[hidden]{display:none !important;}@media (min-width:","){padding-top:",";padding-bottom:",";}.SelectMenu-icon{width:",";margin-right:",";flex-shrink:0;}.SelectMenu-selected-icon{visibility:hidden;transition:transform 0.12s cubic-bezier(0.5,0.1,1,0.5),visibility 0s 0.12s linear;transform:scale(0);}&[aria-checked='true']{font-weight:500;color:",";.SelectMenu-selected-icon{visibility:visible;transition:transform 0.12s cubic-bezier(0,0,0.2,1),visibility 0s linear;transform:scale(1);}}@media (hover:hover){&:hover,&:active,&:focus{background-color:",";}}@media (hover:none){&:focus,&:active{background-color:",";}-webkit-tap-highlight-color:",";}"],xt("space.3"),xt("colors.canvas.overlay"),xt("borderWidths.1"),xt("colors.border.muted"),xt("colors.fg.muted"),xt("fontSizes.0"),xt("breakpoints.0"),xt("space.2"),xt("space.2"),xt("space.3"),xt("space.2"),xt("colors.fg.default"),xt("colors.neutral.subtle"),xt("colors.canvas.subtle"),xt("colors.selectMenu.tapHighlight")),sl=i.default.a.attrs((()=>({role:"menuitemcheckbox"})))`
|
1553
|
+
${dl}
|
1544
1554
|
${yt}
|
1545
1555
|
${Kt};
|
1546
|
-
`,
|
1547
|
-
${
|
1556
|
+
`,cl=t.forwardRef((({children:e,selected:r,theme:a,onClick:o,...i},l)=>{const d=t.useContext(qi),s=t.useRef(null),c=null!=l?l:s;return n.default.createElement(sl,Tt({ref:c},i,{theme:a,onClick:e=>{var t;(o&&o(e),e.defaultPrevented)||(null===(t=d.setOpen)||void 0===t||t.call(d,!1))},"aria-checked":r}),n.default.createElement(Ca,{theme:a,className:"SelectMenu-icon SelectMenu-selected-icon",icon:ea}),e)}));cl.defaultProps={selected:!1},cl.displayName="SelectMenu.Item";var fl=cl;const ul=r.css(["position:relative;padding:0;margin:0;flex:auto;overflow-x:hidden;overflow-y:auto;background-color:",";-webkit-overflow-scrolling:touch;@media (hover:hover){.SelectMenuTab:focus{background-color:",";}.SelectMenuTab:not([aria-checked='true']):hover{color:",";background-color:",";}.SelectMenuTab:not([aria-checked='true']):active{color:",";background-color:",";}}"],xt("colors.canvas.overlay"),xt("colors.selectMenu.tapFocusBg"),xt("colors.fg.default"),xt("colors.canvas.subtle"),xt("colors.fg.default"),xt("colors.canvas.subtle")),gl=i.default.div`
|
1557
|
+
${ul}
|
1548
1558
|
${yt}
|
1549
1559
|
${Kt};
|
1550
|
-
`;
|
1560
|
+
`;gl.displayName="SelectMenu.List";var pl=gl;const bl={small:"16px",medium:"32px",large:"64px"};function ml({size:e="medium",...t}){const r=bl[e];return n.default.createElement("svg",Tt({height:r,width:r,viewBox:"0 0 16 16",fill:"none"},t),n.default.createElement("circle",{cx:"8",cy:"8",r:"7",stroke:"currentColor",strokeOpacity:"0.25",strokeWidth:"2",vectorEffect:"non-scaling-stroke"}),n.default.createElement("path",{d:"M15 8a7.002 7.002 0 00-7-7",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",vectorEffect:"non-scaling-stroke"}))}ml.displayName="Spinner";const hl=i.default(ml)`
|
1551
1561
|
@keyframes rotate-keyframes {
|
1552
1562
|
100% {
|
1553
1563
|
transform: rotate(360deg);
|
@@ -1558,42 +1568,42 @@
|
|
1558
1568
|
|
1559
1569
|
${yt}
|
1560
1570
|
${Kt}
|
1561
|
-
`;
|
1571
|
+
`;hl.displayName="Spinner";var vl=hl;const xl=i.default.div`
|
1562
1572
|
padding: ${xt("space.6")} ${xt("space.4")};
|
1563
1573
|
text-align: center;
|
1564
1574
|
background-color: ${xt("colors.canvas.overlay")};
|
1565
1575
|
${yt}
|
1566
|
-
`,
|
1567
|
-
${Bl}
|
1568
|
-
${ie}
|
1569
|
-
`,Sl=i.default.div`
|
1576
|
+
`,yl=e=>n.default.createElement(xl,e,n.default.createElement(vl,null));yl.displayName="SelectMenuLoadingAnimation";var wl=yl;const Bl=r.keyframes(["0%{opacity:0;transform:scale(0.9);}"]),kl=r.css(["position:relative;z-index:99;display:flex;",";max-height:",";margin:auto 0;",";overflow:hidden;pointer-events:auto;flex-direction:column;background-color:",";border-radius:",";box-shadow:",";animation:"," 0.12s cubic-bezier(0,0.1,0.1,1) backwards;@media (min-width:","){height:auto;max-height:350px;margin:"," 0 "," 0;font-size:",";border:"," solid ",";border-radius:",";box-shadow:",";}"],(e=>e.filter?"height: 80%":""),(e=>e.filter?"none":"66%"),(e=>e.filter?"margin-top: 0":""),xt("colors.canvas.overlay"),xt("radii.2"),xt("shadows.shadow.small"),Bl,xt("breakpoints.0"),xt("space.1"),xt("space.3"),xt("fontSizes.0"),xt("borderWidths.1"),xt("colors.border.default"),xt("radii.2"),xt("shadows.shadow.small")),$l=r.css(["position:fixed;top:0;right:0;bottom:0;left:0;z-index:99;display:flex;padding:",";pointer-events:none;flex-direction:column;&::before{position:absolute;top:0;right:0;bottom:0;left:0;pointer-events:none;content:'';background-color:",";@media (min-width:","){display:none;}}@media (min-width:","){position:absolute;top:auto;right:",";bottom:auto;left:auto;padding:0;}"],xt("space.3"),xt("colors.primer.canvas.backdrop"),xt("breakpoints.0"),xt("breakpoints.0"),(e=>"right"===e.align?"0":"auto")),Sl=i.default.div`
|
1570
1577
|
${kl}
|
1578
|
+
${ie}
|
1579
|
+
`,Tl=i.default.div`
|
1580
|
+
${$l}
|
1571
1581
|
${yt}
|
1572
1582
|
${Kt};
|
1573
|
-
`,
|
1574
|
-
${
|
1583
|
+
`,El=n.default.forwardRef((({children:e,theme:t,width:r,...a},o)=>n.default.createElement(Tl,Tt({theme:t},a,{role:"menu",ref:o}),n.default.createElement(Sl,{theme:t,width:r},e))));El.defaultProps={align:"left",width:"300px"},El.displayName="SelectMenu.Modal";var Cl=El;const zl=r.css(["flex:1;padding:"," ",";font-size:",";font-weight:500;color:",";text-align:center;background-color:transparent;border:0;box-shadow:inset 0 -1px 0 ",";@media (min-width:","){flex:none;padding:"," ",";border:"," solid transparent;border-bottom-width:0;border-top-left-radius:",";border-top-right-radius:",";}&[aria-selected='true']{z-index:1;color:",";background-color:",";box-shadow:0 0 0 1px ",";@media (min-width:","){border-color:",";box-shadow:none;}}&:focus{background-color:",";}"],xt("space.2"),xt("space.3"),xt("fontSizes.0"),xt("colors.fg.muted"),xt("colors.border.muted"),xt("breakpoints.0"),xt("space.1"),xt("space.3"),xt("borderWidths.1"),xt("radii.2"),xt("radii.2"),xt("colors.text-primary"),xt("colors.canvas.overlay"),xt("colors.border.muted"),xt("breakpoints.0"),xt("colors.border.muted"),xt("colors.neutral.subtle")),Rl=i.default.button`
|
1584
|
+
${zl}
|
1575
1585
|
${yt}
|
1576
1586
|
${Kt};
|
1577
|
-
`,
|
1587
|
+
`,Nl=({tabName:e="",index:r,className:a,onClick:o,...i})=>{const l=t.useContext(qi);t.useEffect((()=>{var t;l.selectedTab||0!==r||(null===(t=l.setSelectedTab)||void 0===t||t.call(l,e))}),[r,l,e]);const d=l.selectedTab===e;return n.default.createElement(Rl,Tt({role:"tab",className:Xo("SelectMenuTab",a),"aria-selected":d,onClick:t=>{var r;(o&&o(t),t.defaultPrevented)||(null===(r=l.setSelectedTab)||void 0===r||r.call(l,e))}},i),e)};Nl.displayName="SelectMenuTab",Nl.displayName="SelectMenu.Tab";var Al=Nl;const Il=i.default.div`
|
1578
1588
|
border-top: ${xt("borderWidths.1")} solid ${xt("colors.border.muted")};
|
1579
1589
|
${yt}
|
1580
1590
|
${Kt};
|
1581
|
-
`,
|
1582
|
-
${
|
1591
|
+
`,Ll=({tabName:e,className:r,children:a,...o})=>{const i=t.useContext(qi);return n.default.createElement(Il,Tt({role:"tabpanel",className:r,hidden:i.selectedTab!==e},o),n.default.createElement(pl,null,a))};Ll.displayName="TabPanel",Ll.displayName="SelectMenu.TabPanel";var Ol=Ll;const Ml=r.css(["display:flex;flex-shrink:0;margin-bottom:-1px;-webkit-overflow-scrolling:touch;overflow-x:auto;overflow-y:hidden;&::-webkit-scrollbar{display:none;}@media (min-width:","){padding:0 ",";margin-top:",";}"],xt("breakpoints.0"),xt("space.2"),xt("space.3")),Pl=i.default.div`
|
1592
|
+
${Ml}
|
1583
1593
|
${yt}
|
1584
1594
|
${Kt};
|
1585
|
-
`,
|
1595
|
+
`,Hl=({children:e,...t})=>n.default.createElement(Pl,Tt({role:"tablist"},t),e);Hl.displayName="SelectMenuTabs",Hl.displayName="SelectMenu.Tabs";var Dl=Hl;const Wl=i.default.details`
|
1586
1596
|
${"\n // Remove marker added by the display: list-item browser default\n > summary {\n list-style: none;\n }\n // Remove marker added by details polyfill\n > summary::before {\n display: none;\n }\n // Remove marker added by Chrome\n > summary::-webkit-details-marker {\n display: none;\n }\n"}
|
1587
1597
|
${yt}
|
1588
1598
|
${Kt};
|
1589
|
-
`,
|
1599
|
+
`,Fl=n.default.forwardRef((({children:e,initialTab:r="",as:a,...o},i)=>{const l=t.useRef(null),d=null!=i?i:l,[s,c]=t.useState(r),[f,u]=t.useState(!1),g={selectedTab:s,setSelectedTab:c,setOpen:u,open:f,initialTab:r},p=t.useCallback((e=>{"current"in d&&d.current&&!d.current.contains(e.target)&&(e.defaultPrevented||u(!1))}),[d,u]);return t.useEffect((()=>{if(f)return document.addEventListener("click",p),()=>{document.removeEventListener("click",p)}}),[f,p]),Ki(d,f,u),n.default.createElement(qi.Provider,{value:g},n.default.createElement(Wl,Tt({ref:d},o,{open:f,onToggle:function(e){u(e.target.open)}}),e))}));Fl.displayName="SelectMenu";var _l=Object.assign(Fl,{MenuContext:qi,List:pl,Divider:Ji,Filter:el,Footer:al,Item:fl,Modal:Cl,Tabs:Dl,Tab:Al,TabPanel:Ol,Header:ll,LoadingAnimation:wl});function jl({variant:e,className:t,bordered:r,children:a,...o}){const i=Xo(t,`variant-${"lightweight"===e?"lightweight":"normal"}`);return r||(o={...o,borderWidth:0}),n.default.createElement(qt,Tt({borderWidth:"1px",borderStyle:"solid",borderColor:"border.default",borderRadius:2,as:"nav",className:i},o),a)}jl.displayName="SideNavBase";const Ul=i.default(jl)`
|
1590
1600
|
background-color: ${xt("colors.canvas.subtle")};
|
1591
1601
|
|
1592
1602
|
${e=>e.bordered&&r.css(["& > &{border-left:0;border-right:0;border-bottom:0;}"])}
|
1593
1603
|
|
1594
1604
|
${yt};
|
1595
1605
|
${Kt};
|
1596
|
-
`,
|
1606
|
+
`,Gl=r.css(["background-color:",";outline:none;text-decoration:none;"],xt("colors.neutral.subtle")),Vl=r.css(["color:",";text-decoration:none;outline:none;"],xt("colors.fg.default")),Kl=i.default(Ni).attrs((e=>"string"==typeof e.to||e.selected?{"aria-current":"page"}:{}))`
|
1597
1607
|
position: relative;
|
1598
1608
|
display: block;
|
1599
1609
|
${e=>"full"===e.variant&&r.css(["display:flex;align-items:center;justify-content:space-between;"])}
|
@@ -1601,11 +1611,11 @@
|
|
1601
1611
|
text-align: left;
|
1602
1612
|
font-size: ${xt("fontSizes.1")};
|
1603
1613
|
|
1604
|
-
& > ${
|
1614
|
+
& > ${Ul} {
|
1605
1615
|
border-bottom: none;
|
1606
1616
|
}
|
1607
1617
|
|
1608
|
-
${
|
1618
|
+
${Ul}.variant-normal > & {
|
1609
1619
|
color: ${xt("colors.fg.default")};
|
1610
1620
|
padding: ${xt("space.3")};
|
1611
1621
|
border: 0;
|
@@ -1635,11 +1645,11 @@
|
|
1635
1645
|
}
|
1636
1646
|
|
1637
1647
|
&:hover {
|
1638
|
-
${
|
1648
|
+
${Gl}
|
1639
1649
|
}
|
1640
1650
|
|
1641
1651
|
&:focus {
|
1642
|
-
${
|
1652
|
+
${Gl}
|
1643
1653
|
box-shadow: ${xt("shadows.primer.shadow.focus")};
|
1644
1654
|
z-index: 1;
|
1645
1655
|
}
|
@@ -1655,16 +1665,16 @@
|
|
1655
1665
|
}
|
1656
1666
|
}
|
1657
1667
|
|
1658
|
-
${
|
1668
|
+
${Ul}.variant-lightweight > & {
|
1659
1669
|
padding: ${xt("space.1")} 0;
|
1660
1670
|
color: ${xt("colors.accent.fg")};
|
1661
1671
|
|
1662
1672
|
&:hover {
|
1663
|
-
${
|
1673
|
+
${Vl}
|
1664
1674
|
}
|
1665
1675
|
|
1666
1676
|
&:focus {
|
1667
|
-
${
|
1677
|
+
${Vl}
|
1668
1678
|
box-shadow: ${xt("shadows.primer.shadow.focus")};
|
1669
1679
|
z-index: 1;
|
1670
1680
|
}
|
@@ -1677,7 +1687,7 @@
|
|
1677
1687
|
}
|
1678
1688
|
|
1679
1689
|
${Kt};
|
1680
|
-
`;
|
1690
|
+
`;Ul.defaultProps={variant:"normal"},Kl.defaultProps={variant:"normal"},Kl.displayName="SideNav.Link";var ql=Object.assign(Ul,{Link:Kl});const Xl={issueOpened:oa,pullOpened:ra,issueClosed:aa,pullClosed:ra,pullMerged:ta,draft:ra},Yl=re({prop:"status",variants:{issueClosed:{backgroundColor:"danger.emphasis",color:"fg.onEmphasis"},pullClosed:{backgroundColor:"danger.emphasis",color:"fg.onEmphasis"},pullMerged:{backgroundColor:"done.emphasis",color:"fg.onEmphasis"},issueOpened:{backgroundColor:"success.emphasis",color:"fg.onEmphasis"},pullOpened:{backgroundColor:"success.emphasis",color:"fg.onEmphasis"},draft:{backgroundColor:"neutral.emphasis",color:"fg.onEmphasis"}}}),Jl=re({prop:"variant",variants:{small:{paddingX:2,paddingY:1,fontSize:0},normal:{paddingX:"12px",paddingY:2,fontSize:1}}}),Zl=i.default.span`
|
1681
1691
|
display: inline-flex;
|
1682
1692
|
align-items: center;
|
1683
1693
|
font-weight: ${xt("fontWeights.bold")};
|
@@ -1685,11 +1695,11 @@
|
|
1685
1695
|
color: ${xt("colors.canvas.default")};
|
1686
1696
|
text-align: center;
|
1687
1697
|
border-radius: ${xt("radii.3")};
|
1688
|
-
${Xl};
|
1689
1698
|
${Yl};
|
1699
|
+
${Jl};
|
1690
1700
|
${yt};
|
1691
1701
|
${Kt};
|
1692
|
-
`;function
|
1702
|
+
`;function Ql({children:e,status:t,variant:r,...a}){const o="small"===r?{width:"1em"}:{};return n.default.createElement(Zl,Tt({},a,{variant:r,status:t}),t&&n.default.createElement(Ca,Tt({mr:1},o,{icon:Xl[t]||ia})),e)}Ql.displayName="StateLabel",Ql.defaultProps={variant:"normal"};const ed=i.default.nav`
|
1693
1703
|
display: flex;
|
1694
1704
|
justify-content: space-between;
|
1695
1705
|
|
@@ -1713,7 +1723,7 @@
|
|
1713
1723
|
${yt};
|
1714
1724
|
${St};
|
1715
1725
|
${Kt};
|
1716
|
-
`;function
|
1726
|
+
`;function td({actions:e,className:t,children:r,label:a,...o}){const i=Xo(t,"SubNav");return n.default.createElement(ed,Tt({className:i,"aria-label":a},o),n.default.createElement("div",{className:"SubNav-body"},r),e&&n.default.createElement("div",{className:"SubNav-actions"},e))}function rd(e){return n.default.createElement(qt,Tt({display:"flex"},e))}td.displayName="SubNav",rd.displayName="SubNavLinks";const ad=i.default.a.attrs((e=>({activeClassName:"string"==typeof e.to?"selected":"",className:Xo("SubNav-item",e.selected&&"selected",e.className)})))`
|
1717
1727
|
padding-left: ${xt("space.3")};
|
1718
1728
|
padding-right: ${xt("space.3")};
|
1719
1729
|
font-weight: ${xt("fontWeights.semibold")};
|
@@ -1762,16 +1772,16 @@
|
|
1762
1772
|
|
1763
1773
|
${yt};
|
1764
1774
|
${Kt};
|
1765
|
-
`;
|
1775
|
+
`;ad.displayName="SubNav.Link",rd.displayName="SubNav.Links";var od=Object.assign(td,{Link:ad,Links:rd});const nd=i.default.div`
|
1766
1776
|
margin-top: 0;
|
1767
1777
|
border-bottom: 1px solid ${xt("colors.border.default")};
|
1768
1778
|
${yt}
|
1769
1779
|
${Kt}
|
1770
|
-
`,
|
1780
|
+
`,id=i.default.nav`
|
1771
1781
|
display: flex;
|
1772
1782
|
margin-bottom: -1px;
|
1773
1783
|
overflow: auto;
|
1774
|
-
`;function
|
1784
|
+
`;function ld({children:e,"aria-label":t,...r}){return n.default.createElement(nd,r,n.default.createElement(id,{"aria-label":t},e))}ld.displayName="TabNav";const dd=i.default.a.attrs((e=>({activeClassName:"string"==typeof e.to?"selected":"",className:Xo("TabNav-item",e.selected&&"selected",e.className)})))`
|
1775
1785
|
padding: 8px 12px;
|
1776
1786
|
font-size: ${xt("fontSizes.1")};
|
1777
1787
|
line-height: 20px;
|
@@ -1797,18 +1807,18 @@
|
|
1797
1807
|
|
1798
1808
|
${yt};
|
1799
1809
|
${Kt};
|
1800
|
-
`;
|
1810
|
+
`;dd.displayName="TabNav.Link";var sd=Object.assign(ld,{Link:dd}),cd=$(U,C,E,S,z,I,O,P,N,G,ae,oe,ne),fd=new RegExp("^("+cd.propNames.join("|")+")$");const ud={small:"16px",medium:"20px",large:"24px",extralarge:"32px"},gd="medium",pd=({as:e="span",onClick:t,onFocus:r,tabIndex:a=-1})=>Boolean(r||t||a>-1||["a","button"].includes(e)),bd=re({prop:"size",variants:{small:{fontSize:0,height:ud.small,lineHeight:ud.small,paddingLeft:1,paddingRight:1,paddingTop:0,paddingBottom:0},medium:{fontSize:0,height:ud.medium,lineHeight:ud.medium,paddingLeft:2,paddingRight:2,paddingTop:0,paddingBottom:0},large:{fontSize:0,height:ud.large,lineHeight:ud.large,paddingLeft:2,paddingRight:2,paddingTop:0,paddingBottom:0},extralarge:{fontSize:1,height:ud.extralarge,lineHeight:ud.extralarge,paddingLeft:3,paddingRight:3,paddingTop:0,paddingBottom:0}}}),md=i.default.span.attrs((({text:e,onRemove:t,onKeyDown:r})=>({onKeyDown:e=>{r&&r(e),"Backspace"!==e.key&&"Delete"!==e.key||!t||t()},"aria-label":t?`${e}, press backspace or delete to remove`:void 0})))`
|
1801
1811
|
align-items: center;
|
1802
1812
|
border-radius: 999px;
|
1803
|
-
cursor: ${e=>
|
1813
|
+
cursor: ${e=>pd(e)?"pointer":"auto"};
|
1804
1814
|
display: inline-flex;
|
1805
1815
|
font-weight: ${xt("fontWeights.bold")};
|
1806
1816
|
font-family: inherit;
|
1807
1817
|
text-decoration: none;
|
1808
1818
|
white-space: nowrap;
|
1809
|
-
${
|
1819
|
+
${bd}
|
1810
1820
|
${Kt}
|
1811
|
-
`;
|
1821
|
+
`;md.defaultProps={as:"span",size:gd};var hd=md;const vd=re({prop:"size",variants:{small:{height:ud.small,width:ud.small},medium:{height:ud.medium,width:ud.medium},large:{height:ud.large,width:ud.large},extralarge:{height:ud.extralarge,width:ud.extralarge}}}),xd=e=>.75*parseInt(ud[e||gd],10),yd=i.default.span`
|
1812
1822
|
background-color: transparent;
|
1813
1823
|
font-family: inherit;
|
1814
1824
|
color: currentColor;
|
@@ -1838,9 +1848,9 @@
|
|
1838
1848
|
background-color: ${xt("colors.neutral.subtle")};
|
1839
1849
|
}
|
1840
1850
|
|
1841
|
-
${
|
1851
|
+
${vd}
|
1842
1852
|
${Kt}
|
1843
|
-
`,
|
1853
|
+
`,wd=({"aria-label":e,isParentInteractive:t,size:r,...a})=>(delete a.children,n.default.createElement(yd,Tt({as:t?"span":"button",tabIndex:t?-1:void 0,"aria-label":t?e:"Remove token",size:r},a),n.default.createElement(da,{size:xd(r)})));wd.displayName="RemoveTokenButton",wd.defaultProps={size:gd};var Bd=wd;var kd=i.default("span")`
|
1844
1854
|
flex-grow: 1;
|
1845
1855
|
min-width: 0;
|
1846
1856
|
overflow: hidden;
|
@@ -1881,7 +1891,7 @@
|
|
1881
1891
|
bottom: 0;
|
1882
1892
|
}
|
1883
1893
|
}
|
1884
|
-
`;const
|
1894
|
+
`;const $d=i.default(hd)`
|
1885
1895
|
background-color: ${xt("colors.neutral.subtle")};
|
1886
1896
|
border-color: ${e=>e.isSelected?xt("colors.fg.default"):xt("colors.border.subtle")};
|
1887
1897
|
border-style: solid;
|
@@ -1893,18 +1903,18 @@
|
|
1893
1903
|
${Kt}
|
1894
1904
|
|
1895
1905
|
${e=>{if(e.isTokenInteractive)return r.css(["&:hover{background-color:",";box-shadow:",";color:",";}"],xt("colors.neutral.muted"),xt("colors.shadow.medium"),xt("colors.fg.default"))}}
|
1896
|
-
|
1906
|
+
`,Sd=i.default("span")`
|
1897
1907
|
flex-shrink: 0;
|
1898
1908
|
line-height: 0;
|
1899
1909
|
|
1900
1910
|
${e=>{switch(e.size){case"large":case"extralarge":return r.css(["margin-right:",";"],xt("space.2"));default:return r.css(["margin-right:",";"],xt("space.1"))}}}
|
1901
|
-
`,
|
1911
|
+
`,Td=t.forwardRef(((e,t)=>{const{as:r,onRemove:a,id:o,leadingVisual:i,text:l,size:d,hideRemoveButton:s,href:c,onClick:f,...u}=e,g=pd(e)&&Boolean(a)&&!s,p={as:r,href:c,onClick:f};return n.default.createElement($d,Tt({onRemove:a,hideRemoveButton:s||!a,id:null==o?void 0:o.toString(),text:l,size:d,isTokenInteractive:pd(e)},g?{}:p,u,{ref:t}),i?n.default.createElement(Sd,{size:d},n.default.createElement(i,null)):null,n.default.createElement(kd,g?p:{},l),!s&&a?n.default.createElement(Bd,{borderOffset:1,onClick:e=>{e.stopPropagation(),a&&a()},size:d,isParentInteractive:pd(e),"aria-hidden":g?"true":"false",sx:g?{position:"relative",zIndex:"1"}:{}}):null)}));Td.displayName="Token",Td.defaultProps={size:gd};var Ed=Td;const Cd={small:0,medium:1,large:1,extralarge:2};function zd({icon:e,contrast:r,className:a,block:o,disabled:i,theme:l,sx:d,tokens:s,onTokenRemove:c,tokenComponent:f,preventTokenWrapping:u,size:g,hideTokenRemoveButtons:p,maxHeight:b,width:m,minWidth:h,maxWidth:v,variant:x,visibleTokenCount:y,...w},B){const{onBlur:k,onFocus:$,onKeyDown:S,...T}=function(e){var t={};for(var r in e)fd.test(r)||(t[r]=e[r]);return t}(w),E=yr(B),C=Oa(t.useRef(null),E),[z,R]=t.useState(),[N,A]=t.useState(Boolean(y)),{containerRef:I}=za({focusOutBehavior:"wrap",bindKeys:Er.ArrowHorizontal|Er.HomeAndEnd,focusableElementFilter:e=>!e.getAttributeNames().includes("aria-hidden"),getNextFocusable:e=>{var t;if(!z&&0!==z)return;let r=z+1;return"next"===e&&(r+=1),"previous"===e&&(r-=1),r>s.length||r<1?C.current||void 0:null===(t=I.current)||void 0===t?void 0:t.children[r]}},[z]),L=e=>{c(e),setTimeout((()=>{var e,t;const r=null===(e=I.current)||void 0===e?void 0:e.children[z||0],a=r&&pr(r)?r:Array.from((null===(t=I.current)||void 0===t?void 0:t.children)||[]).find((e=>pr(e)));var o;a?a.focus():null===(o=E.current)||void 0===o||o.focus()}),0)},O=()=>{R(void 0),setTimeout((()=>{var e;null!==(e=I.current)&&void 0!==e&&e.contains(document.activeElement)||!y||A(!0)}),0)},M=e=>{var t;"Escape"===e.key&&(null===(t=E.current)||void 0===t||t.focus())},P=e=>{e.stopPropagation()},H=N?s.slice(0,y):s;return n.default.createElement(Zo,{block:o,className:a,contrast:r,disabled:i,hasIcon:!!e,theme:l,width:m,minWidth:h,maxWidth:v,variant:x,onClick:()=>{var e;null===(e=C.current)||void 0===e||e.focus()},sx:{...o?{display:"flex",width:"100%"}:{},...b?{maxHeight:b,overflow:"auto"}:{},...u?{overflow:"auto"}:{},...d}},n.default.createElement(qt,{ref:I,display:"flex",sx:{alignItems:"center",flexWrap:u?"nowrap":"wrap",marginLeft:"-0.25rem",marginBottom:"-0.25rem",flexGrow:1,"> *":{flexShrink:0,marginLeft:"0.25rem",marginBottom:"0.25rem"}}},n.default.createElement(qt,{sx:{order:1,flexGrow:1}},e&&n.default.createElement(e,{className:"TextInput-icon"}),n.default.createElement(Yo,Tt({ref:C,disabled:i,onFocus:e=>{$&&$(e),R(void 0),y&&A(!1)},onBlur:e=>{k&&k(e),setTimeout((()=>{var e;null!==(e=I.current)&&void 0!==e&&e.contains(document.activeElement)||!y||A(!0)}),0)},onKeyDown:e=>{var t;if(S&&S(e),null!==(t=E.current)&&void 0!==t&&t.value)return;const r=s[s.length-1];"Backspace"===e.key&&r&&(L(r.id),E.current&&(E.current.value=`${r.text} `),setTimeout((()=>{var e;null===(e=E.current)||void 0===e||e.select()}),0))},type:"text",sx:{height:"100%"}},T))),f?H.map((({id:e,...t},r)=>{return n.default.createElement(f,Tt({key:e,onFocus:(a=r,()=>{R(a)}),onBlur:O,onKeyUp:M,onClick:P,isSelected:z===r,onRemove:()=>{L(e)},hideRemoveButton:p,size:g,tabIndex:0},t));var a})):null,N?n.default.createElement(jn,{color:"fg.muted",fontSize:g&&Cd[g]},"+",s.length-H.length):null))}zd.displayName="TextInputWithTokensInnerComponent";const Rd=n.default.forwardRef(zd);Rd.defaultProps={tokenComponent:Ed,size:"extralarge",hideTokenRemoveButtons:!1,preventTokenWrapping:!1},Rd.displayName="TextInputWithTokens";var Nd=Rd;const Ad=i.default(qt)`
|
1902
1912
|
display: flex;
|
1903
1913
|
flex-direction: column;
|
1904
1914
|
${e=>e.clipSidebar&&r.css([".Timeline-Item:first-child{padding-top:0;}.Timeline-Item:last-child{padding-bottom:0;}"])}
|
1905
1915
|
|
1906
1916
|
${Kt};
|
1907
|
-
`,
|
1917
|
+
`,Id=i.default(qt).attrs((e=>({className:Xo("Timeline-Item",e.className)})))`
|
1908
1918
|
display: flex;
|
1909
1919
|
position: relative;
|
1910
1920
|
padding: ${xt("space.3")} 0;
|
@@ -1925,7 +1935,7 @@
|
|
1925
1935
|
|
1926
1936
|
${yt};
|
1927
1937
|
${Kt};
|
1928
|
-
`,
|
1938
|
+
`,Ld=e=>n.default.createElement(qt,{position:"relative",zIndex:1},n.default.createElement(qt,Tt({display:"flex",className:Xo(e.className,"TimelineItem-Badge"),flexShrink:0,borderRadius:"50%",borderWidth:"2px",borderStyle:"solid",borderColor:"canvas.default",overflow:"hidden",color:"fg.muted",bg:"timeline.badgeBg",width:"32px",height:"32px",mr:2,ml:"-15px",alignItems:"center",justifyContent:"center"},e),e.children));Ld.displayName="TimelineBadge";const Od=i.default(qt)`
|
1929
1939
|
min-width: 0;
|
1930
1940
|
max-width: 100%;
|
1931
1941
|
margin-top: ${xt("space.1")};
|
@@ -1933,7 +1943,7 @@
|
|
1933
1943
|
flex: auto;
|
1934
1944
|
font-size: ${xt("fontSizes.1")};
|
1935
1945
|
${Kt};
|
1936
|
-
`,
|
1946
|
+
`,Md=i.default(qt)`
|
1937
1947
|
position: relative
|
1938
1948
|
z-index: 1;
|
1939
1949
|
height: 24px;
|
@@ -1944,15 +1954,15 @@
|
|
1944
1954
|
border: 0;
|
1945
1955
|
border-top: ${xt("space.1")} solid ${xt("colors.border.default")};
|
1946
1956
|
${Kt};
|
1947
|
-
`;
|
1957
|
+
`;Id.displayName="Timeline.Item",Ld.displayName="Timeline.Badge",Od.displayName="Timeline.Body",Md.displayName="Timeline.Break";var Pd=Object.assign(Ad,{Item:Id,Badge:Ld,Body:Od,Break:Md});function Hd(e,t,r){return Math.min(Math.max(e,r),t)}class Dd extends Error{constructor(e){super(`Failed to parse color: "${e}"`)}}function Wd(e){if("string"!=typeof e)throw new Dd(e);if("transparent"===e.trim().toLowerCase())return[0,0,0,0];let t=e.trim();t=qd.test(e)?function(e){const t=e.toLowerCase().trim(),r=_d[function(e){let t=5381,r=e.length;for(;r;)t=33*t^e.charCodeAt(--r);return(t>>>0)%2341}(t)];if(!r)throw new Dd(e);return`#${r}`}(e):e;const r=Ud.exec(t);if(r){const e=Array.from(r).slice(1);return[...e.slice(0,3).map((e=>parseInt(jd(e,2),16))),parseInt(jd(e[3]||"f",2),16)/255]}const a=Gd.exec(t);if(a){const e=Array.from(a).slice(1);return[...e.slice(0,3).map((e=>parseInt(e,16))),parseInt(e[3]||"ff",16)/255]}const o=Vd.exec(t);if(o){const e=Array.from(o).slice(1);return[...e.slice(0,3).map((e=>parseInt(e,10))),parseFloat(e[3]||"1")]}const n=Kd.exec(t);if(n){const[t,r,a,o]=Array.from(n).slice(1).map(parseFloat);if(Hd(0,100,r)!==r)throw new Dd(e);if(Hd(0,100,a)!==a)throw new Dd(e);return[...Yd(t,r,a),o||1]}throw new Dd(e)}const Fd=e=>parseInt(e.replace(/_/g,""),36),_d="1q29ehhb 1n09sgk7 1kl1ekf_ _yl4zsno 16z9eiv3 1p29lhp8 _bd9zg04 17u0____ _iw9zhe5 _to73___ _r45e31e _7l6g016 _jh8ouiv _zn3qba8 1jy4zshs 11u87k0u 1ro9yvyo 1aj3xael 1gz9zjz0 _3w8l4xo 1bf1ekf_ _ke3v___ _4rrkb__ 13j776yz _646mbhl _nrjr4__ _le6mbhl 1n37ehkb _m75f91n _qj3bzfz 1939yygw 11i5z6x8 _1k5f8xs 1509441m 15t5lwgf _ae2th1n _tg1ugcv 1lp1ugcv 16e14up_ _h55rw7n _ny9yavn _7a11xb_ 1ih442g9 _pv442g9 1mv16xof 14e6y7tu 1oo9zkds 17d1cisi _4v9y70f _y98m8kc 1019pq0v 12o9zda8 _348j4f4 1et50i2o _8epa8__ _ts6senj 1o350i2o 1mi9eiuo 1259yrp0 1ln80gnw _632xcoy 1cn9zldc _f29edu4 1n490c8q _9f9ziet 1b94vk74 _m49zkct 1kz6s73a 1eu9dtog _q58s1rz 1dy9sjiq __u89jo3 _aj5nkwg _ld89jo3 13h9z6wx _qa9z2ii _l119xgq _bs5arju 1hj4nwk9 1qt4nwk9 1ge6wau6 14j9zlcw 11p1edc_ _ms1zcxe _439shk6 _jt9y70f _754zsow 1la40eju _oq5p___ _x279qkz 1fa5r3rv _yd2d9ip _424tcku _8y1di2_ _zi2uabw _yy7rn9h 12yz980_ __39ljp6 1b59zg0x _n39zfzp 1fy9zest _b33k___ _hp9wq92 1il50hz4 _io472ub _lj9z3eo 19z9ykg0 _8t8iu3a 12b9bl4a 1ak5yw0o _896v4ku _tb8k8lv _s59zi6t _c09ze0p 1lg80oqn 1id9z8wb _238nba5 1kq6wgdi _154zssg _tn3zk49 _da9y6tc 1sg7cv4f _r12jvtt 1gq5fmkz 1cs9rvci _lp9jn1c _xw1tdnb 13f9zje6 16f6973h _vo7ir40 _bt5arjf _rc45e4t _hr4e100 10v4e100 _hc9zke2 _w91egv_ _sj2r1kk 13c87yx8 _vqpds__ _ni8ggk8 _tj9yqfb 1ia2j4r4 _7x9b10u 1fc9ld4j 1eq9zldr _5j9lhpx _ez9zl6o _md61fzm".split(" ").reduce(((e,t)=>{const r=Fd(t.substring(0,3)),a=Fd(t.substring(3)).toString(16);let o="";for(let e=0;e<6-a.length;e++)o+="0";return e[r]=`${o}${a}`,e}),{}),jd=(e,t)=>Array.from(Array(t)).map((()=>e)).join(""),Ud=new RegExp(`^#${jd("([a-f0-9])",3)}([a-f0-9])?$`,"i"),Gd=new RegExp(`^#${jd("([a-f0-9]{2})",3)}([a-f0-9]{2})?$`,"i"),Vd=new RegExp(`^rgba?\\(\\s*(\\d+)\\s*${jd(",\\s*(\\d+)\\s*",2)}(?:,\\s*([\\d.]+))?\\s*\\)$`,"i"),Kd=/^hsla?\(\s*([\d.]+)\s*,\s*([\d.]+)%\s*,\s*([\d.]+)%(?:\s*,\s*([\d.]+))?\s*\)$/i,qd=/^[a-z]+$/i,Xd=e=>Math.round(255*e),Yd=(e,t,r)=>{let a=r/100;if(0===t)return[a,a,a].map(Xd);const o=(e%360+360)%360/60,n=(1-Math.abs(2*a-1))*(t/100),i=n*(1-Math.abs(o%2-1));let l=0,d=0,s=0;o>=0&&o<1?(l=n,d=i):o>=1&&o<2?(l=i,d=n):o>=2&&o<3?(d=n,s=i):o>=3&&o<4?(d=i,s=n):o>=4&&o<5?(l=i,s=n):o>=5&&o<6&&(l=n,s=i);const c=a-n/2;return[l+c,d+c,s+c].map(Xd)};const Jd={"--lightness-threshold":"0.453","--border-threshold":"0.96","--border-alpha":"max(0, min(calc((var(--perceived-lightness) - var(--border-threshold)) * 100), 1))",background:"rgb(var(--label-r), var(--label-g), var(--label-b))",color:"hsl(0, 0%, calc(var(--lightness-switch) * 100%))",borderWidth:1,borderStyle:"solid",borderColor:"hsla(var(--label-h),calc(var(--label-s) * 1%),calc((var(--label-l) - 25) * 1%),var(--border-alpha))"},Zd={"--lightness-threshold":"0.6","--background-alpha":"0.18","--border-alpha":"0.3","--lighten-by":"calc(((var(--lightness-threshold) - var(--perceived-lightness)) * 100) * var(--lightness-switch))",borderWidth:1,borderStyle:"solid",background:"rgba(var(--label-r), var(--label-g), var(--label-b), var(--background-alpha))",color:"hsl(var(--label-h), calc(var(--label-s) * 1%), calc((var(--label-l) + var(--lighten-by)) * 1%))",borderColor:"hsla(var(--label-h), calc(var(--label-s) * 1%),calc((var(--label-l) + var(--lighten-by)) * 1%),var(--border-alpha))"},Qd=t.forwardRef(((e,r)=>{const{as:a,fillColor:o="#999",onRemove:i,id:l,isSelected:d,text:s,size:c,hideRemoveButton:f,href:u,onClick:g,...p}=e,b={as:a,href:u,onClick:g},{colorScheme:m}=jt(),h=pd(e)&&Boolean(i)&&!f,v=t.useMemo((()=>{const[e,t,r]=Wd(o),[a,n,l]=function(e){const[t,r,a,o]=Wd(e).map(((e,t)=>3===t?e:e/255)),n=Math.max(t,r,a),i=Math.min(t,r,a),l=(n+i)/2;if(n===i)return[0,0,l,o];const d=n-i;return[60*(t===n?(r-a)/d+(r<a?6:0):r===n?(a-t)/d+2:(t-r)/d+4),l>.5?d/(2-n-i):d/(n+i),l,o]}(o);return{"--label-r":String(e),"--label-g":String(t),"--label-b":String(r),"--label-h":String(Math.round(a)),"--label-s":String(Math.round(100*n)),"--label-l":String(Math.round(100*l)),"--perceived-lightness":"calc(((var(--label-r) * 0.2126) + (var(--label-g) * 0.7152) + (var(--label-b) * 0.0722)) / 255)","--lightness-switch":"max(0, min(calc((var(--perceived-lightness) - var(--lightness-threshold)) * -1000), 1))",paddingRight:f||!i?void 0:0,position:"relative",..."light"===m?Jd:Zd,...d?{background:"light"===m?"hsl(var(--label-h), calc(var(--label-s) * 1%), calc((var(--label-l) - 5) * 1%))":Zd.background,":focus":{outline:"none"},":after":{content:'""',position:"absolute",zIndex:1,top:"-2px",right:"-2px",bottom:"-2px",left:"-2px",display:"block",pointerEvents:"none",boxShadow:"0 0 0 2px "+("light"===m?"rgb(var(--label-r), var(--label-g), var(--label-b))":"hsl(var(--label-h), calc(var(--label-s) * 1%), calc((var(--label-l) + var(--lighten-by)) * 1%))"),borderRadius:"999px"}}:{}}}),[m,o,d,f,i]);return n.default.createElement(hd,Tt({onRemove:i,id:null==l?void 0:l.toString(),isSelected:d,text:s,size:c,sx:v},h?{}:b,p,{ref:r}),n.default.createElement(kd,h?b:{},s),!f&&i?n.default.createElement(Bd,{borderOffset:1,onClick:e=>{e.stopPropagation(),i&&i()},size:c,"aria-hidden":h?"true":"false",isParentInteractive:pd(e),sx:h?{position:"relative",zIndex:"1"}:{}}):null)}));Qd.defaultProps={fillColor:"#999",size:gd},Qd.displayName="IssueLabelToken";var es=Qd;const ts=i.default.span`
|
1948
1958
|
// 'space.1' is used because to match space from the left of the token to the left of the avatar
|
1949
1959
|
// '* 2' is done to account for the top and bottom
|
1950
1960
|
--spacing: calc(${xt("space.1")} * 2);
|
1951
1961
|
|
1952
1962
|
display: block;
|
1953
|
-
height: ${e=>`calc(${
|
1954
|
-
width: ${e=>`calc(${
|
1955
|
-
`,
|
1963
|
+
height: ${e=>`calc(${ud[e.avatarSize]} - var(--spacing))`};
|
1964
|
+
width: ${e=>`calc(${ud[e.avatarSize]} - var(--spacing))`};
|
1965
|
+
`,rs=t.forwardRef((({avatarSrc:e,id:t,size:r,...a},o)=>n.default.createElement(Ed,Tt({leadingVisual:()=>n.default.createElement(ts,{avatarSize:r||gd},n.default.createElement(un,{src:e,size:parseInt(ud[r||gd],10),sx:{width:"100%",height:"100%"}})),size:r,id:null==t?void 0:t.toString(),sx:{paddingLeft:xt("space.1")}},a,{ref:o}))));rs.defaultProps={size:gd},rs.displayName="AvatarToken";var as=rs;const os=i.default.span`
|
1956
1966
|
position: relative;
|
1957
1967
|
|
1958
1968
|
&::before {
|
@@ -2178,7 +2188,7 @@
|
|
2178
2188
|
}
|
2179
2189
|
${yt};
|
2180
2190
|
${Kt};
|
2181
|
-
`;function
|
2191
|
+
`;function ns({direction:e="n",children:t,className:r,text:a,noDelay:o,align:i,wrap:l,...d}){const s=Xo(r,`tooltipped-${e}`,i&&`tooltipped-align-${i}-2`,o&&"tooltipped-no-delay",l&&"tooltipped-multiline");return n.default.createElement(os,Tt({role:"tooltip","aria-label":a},d,{className:s}),t)}ns.displayName="Tooltip",ns.alignments=["left","right"],ns.directions=["n","ne","e","se","s","sw","w","nw"];const is=i.default.nav`
|
2182
2192
|
display: flex;
|
2183
2193
|
justify-content: space-between;
|
2184
2194
|
border-bottom: 1px solid ${xt("colors.border.muted")};
|
@@ -2209,7 +2219,7 @@
|
|
2209
2219
|
|
2210
2220
|
${yt};
|
2211
2221
|
${Kt};
|
2212
|
-
`;function
|
2222
|
+
`;function ls({actions:e,className:t,align:r,children:a,full:o,label:i,theme:l,...d}){const s=Xo(t,"UnderlineNav",r&&`UnderlineNav--${r}`,o&&"UnderlineNav--full");return n.default.createElement(is,Tt({className:s,"aria-label":i,theme:l},d),n.default.createElement("div",{className:"UnderlineNav-body"},a),e&&n.default.createElement("div",{className:"UnderlineNav-actions"},e))}ls.displayName="UnderlineNav";const ds=i.default.a.attrs((e=>({activeClassName:"string"==typeof e.to?"selected":"",className:Xo("UnderlineNav-item",e.selected&&"selected",e.className)})))`
|
2213
2223
|
padding: ${xt("space.3")} ${xt("space.2")};
|
2214
2224
|
margin-right: ${xt("space.3")};
|
2215
2225
|
font-size: ${xt("fontSizes.1")};
|
@@ -2242,5 +2252,5 @@
|
|
2242
2252
|
|
2243
2253
|
${yt};
|
2244
2254
|
${Kt};
|
2245
|
-
`;
|
2255
|
+
`;ds.displayName="UnderlineNav.Link";var ss=Object.assign(ls,{Link:ds});e.Absolute=ar,e.ActionList=Mo,e.ActionMenu=Vo,e.Autocomplete=cn,e.Avatar=un,e.AvatarPair=bn,e.AvatarStack=vn,e.AvatarToken=as,e.BaseStyles=zt,e.BorderBox=Yt,e.Box=qt,e.BranchName=xn,e.Breadcrumb=Sn,e.Breadcrumbs=$n,e.Button=jr,e.ButtonClose=ca,e.ButtonDanger=Ur,e.ButtonGroup=Vr,e.ButtonInvisible=Xr,e.ButtonOutline=Kr,e.ButtonPrimary=qr,e.ButtonTableList=Yr,e.Caret=An,e.CircleBadge=Mn,e.CircleOcticon=Pn,e.ConfirmationDialog=uo,e.CounterLabel=Hn,e.Details=Wn,e.Dialog=Yn,e.Dropdown=oi,e.DropdownButton=ni,e.DropdownMenu=ii,e.FilterList=ui,e.FilteredSearch=li,e.Fixed=or,e.Flash=bi,e.Flex=Zt,e.FormGroup=vi,e.Grid=er,e.Header=Bi,e.Heading=$i,e.IssueLabelToken=es,e.Label=zi,e.LabelGroup=Si,e.Link=Ni,e.Overlay=Fo,e.Pagehead=Ai,e.Pagination=Mi,e.PointerBox=Di,e.Popover=_i,e.Position=rr,e.ProgressBar=Vi,e.Relative=nr,e.SSRProvider=function(e){let r=t.useContext(Pa),a=t.useMemo((()=>({prefix:r===Ma?"":r.prefix+"-"+ ++r.current,current:0})),[r]);return n.default.createElement(Pa.Provider,{value:a},e.children)},e.SelectMenu=_l,e.SideNav=ql,e.Spinner=vl,e.StateLabel=Ql,e.Sticky=ir,e.StyledOcticon=Ca,e.SubNav=od,e.TabNav=sd,e.Text=jn,e.TextInput=en,e.TextInputWithTokens=Nd,e.ThemeProvider=Vt,e.Timeline=Pd,e.Token=Ed,e.Tooltip=ns,e.Truncate=vo,e.UnderlineNav=ss,e.theme=d,e.themeGet=xt,e.useColorSchemeVar=Ut,e.useConfirm=function(){const{theme:e,colorMode:r,dayScheme:a,nightScheme:o}=jt();return t.useCallback((t=>async function(e,t){const{content:r,...a}=t;return new Promise((t=>{const o=document.createElement("div");l.default.render(n.default.createElement(_t,e,n.default.createElement(uo,Tt({},a,{onClose:e=>{l.default.unmountComponentAtNode(o),t("confirm"===e)}}),r)),o)}))}({theme:e,colorMode:r,dayScheme:a,nightScheme:o},t)),[e,r,a,o])},e.useDetails=lr,e.useOnEscapePress=xr,e.useOnOutsideClick=ur,e.useOpenAndCloseFocus=mr,e.useOverlay=wr,e.useSSRSafeId=Da,e.useSafeTimeout=function(){const e=t.useRef(new Set),r=t.useCallback(((t,r,...a)=>{const o=window.setTimeout(t,r,...a);return e.current.add(o),o}),[]),a=t.useCallback((t=>{clearTimeout(t),e.current.delete(t)}),[]);return t.useEffect((()=>()=>{for(const t of e.current)clearTimeout(t)}),[]),{safeSetTimeout:r,safeClearTimeout:a}},e.useTheme=jt,Object.defineProperty(e,"__esModule",{value:!0})}));
|
2246
2256
|
//# sourceMappingURL=browser.umd.js.map
|