@primer/components 32.1.1-rc.92743105 → 33.0.0-rc.9cc2a259
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/.devcontainer/devcontainer.json +1 -1
- package/.github/workflows/ci.yml +1 -1
- package/.github/workflows/release.yml +1 -1
- package/.github/workflows/release_canary.yml +1 -1
- package/.github/workflows/release_candidate.yml +1 -1
- package/.github/workflows/statuses.yml +32 -0
- package/.gitignore +1 -0
- package/.nvmrc +1 -1
- package/CHANGELOG.md +20 -2
- package/contributor-docs/CONTRIBUTING.md +14 -58
- package/dist/browser.esm.js +105 -108
- package/dist/browser.esm.js.map +1 -1
- package/dist/browser.umd.js +105 -108
- package/dist/browser.umd.js.map +1 -1
- package/docs/content/BranchName.md +6 -5
- package/docs/content/Details.md +4 -8
- package/docs/content/Heading.md +5 -10
- package/docs/content/Label.md +6 -7
- package/docs/content/ProgressBar.mdx +7 -6
- package/docs/content/Text.md +0 -6
- package/docs/content/{ActionList2.mdx → drafts/ActionList2.mdx} +5 -9
- package/docs/content/drafts/ActionMenu2.mdx +251 -0
- package/docs/content/status.mdx +1 -1
- package/docs/content/system-props.mdx +1 -1
- package/docs/src/@primer/gatsby-theme-doctocat/live-code-scope.js +9 -1
- package/docs/src/@primer/gatsby-theme-doctocat/nav.yml +1 -1
- package/docs/src/component-checklist.js +10 -2
- package/lib/ActionList/Item.js +1 -1
- package/lib/ActionList2/Divider.d.ts +3 -2
- package/lib/ActionList2/Divider.js +10 -5
- package/lib/ActionList2/Item.js +21 -5
- package/lib/ActionList2/List.js +11 -1
- package/lib/ActionList2/MenuContext.d.ts +10 -0
- package/lib/ActionList2/MenuContext.js +15 -0
- package/lib/ActionList2/Selection.js +14 -1
- package/lib/ActionList2/index.d.ts +1 -2
- package/lib/ActionMenu2.d.ts +313 -0
- package/lib/ActionMenu2.js +91 -0
- package/lib/Autocomplete/Autocomplete.d.ts +2 -1
- package/lib/Autocomplete/AutocompleteInput.d.ts +2 -1
- package/lib/Avatar.d.ts +1 -2
- package/lib/Avatar.js +1 -1
- package/lib/BranchName.d.ts +1 -2
- package/lib/BranchName.js +1 -1
- package/lib/Button/Button.d.ts +2 -2
- package/lib/Button/ButtonClose.d.ts +2 -2
- package/lib/Button/ButtonDanger.d.ts +2 -2
- package/lib/Button/ButtonInvisible.d.ts +2 -2
- package/lib/Button/ButtonOutline.d.ts +2 -2
- package/lib/Button/ButtonPrimary.d.ts +2 -2
- package/lib/CircleOcticon.d.ts +35 -35
- package/lib/Details.d.ts +1 -2
- package/lib/Details.js +1 -3
- package/lib/Dialog.d.ts +37 -37
- package/lib/Dropdown.d.ts +8 -72
- package/lib/DropdownMenu/DropdownButton.d.ts +6 -3
- package/lib/FilterList.d.ts +1 -1
- package/lib/Heading.d.ts +1 -2
- package/lib/Heading.js +1 -6
- package/lib/Position.d.ts +4 -4
- package/lib/ProgressBar.d.ts +16 -11
- package/lib/ProgressBar.js +6 -10
- package/lib/SelectMenu/SelectMenu.d.ts +11 -10
- package/lib/SelectMenu/SelectMenuItem.d.ts +1 -1
- package/lib/SelectMenu/SelectMenuModal.d.ts +1 -1
- package/lib/Spinner.d.ts +1 -2
- package/lib/Spinner.js +1 -3
- package/lib/TextInputWithTokens.d.ts +2 -1
- package/lib/Token/AvatarToken.d.ts +1 -1
- package/lib/Token/IssueLabelToken.d.ts +1 -1
- package/lib/Token/Token.d.ts +1 -1
- package/lib/__tests__/Avatar.test.js +4 -2
- package/lib/__tests__/Avatar.types.test.d.ts +3 -0
- package/lib/__tests__/Avatar.types.test.js +31 -0
- package/lib/__tests__/BranchName.types.test.d.ts +3 -0
- package/lib/__tests__/BranchName.types.test.js +28 -0
- package/lib/__tests__/Details.types.test.d.ts +3 -0
- package/lib/__tests__/Details.types.test.js +28 -0
- package/lib/__tests__/Heading.test.js +63 -30
- package/lib/__tests__/Heading.types.test.d.ts +3 -0
- package/lib/__tests__/Heading.types.test.js +28 -0
- package/lib/drafts.d.ts +1 -0
- package/lib/drafts.js +13 -0
- package/lib/stories/ActionMenu2.stories.js +433 -0
- package/lib-esm/ActionList/Item.js +1 -1
- package/lib-esm/ActionList2/Divider.d.ts +3 -2
- package/lib-esm/ActionList2/Divider.js +8 -5
- package/lib-esm/ActionList2/Item.js +19 -5
- package/lib-esm/ActionList2/List.js +9 -1
- package/lib-esm/ActionList2/MenuContext.d.ts +10 -0
- package/lib-esm/ActionList2/MenuContext.js +3 -0
- package/lib-esm/ActionList2/Selection.js +12 -1
- package/lib-esm/ActionList2/index.d.ts +1 -2
- package/lib-esm/ActionMenu2.d.ts +313 -0
- package/lib-esm/ActionMenu2.js +67 -0
- package/lib-esm/Autocomplete/Autocomplete.d.ts +2 -1
- package/lib-esm/Autocomplete/AutocompleteInput.d.ts +2 -1
- package/lib-esm/Avatar.d.ts +1 -2
- package/lib-esm/Avatar.js +2 -2
- package/lib-esm/BranchName.d.ts +1 -2
- package/lib-esm/BranchName.js +2 -2
- package/lib-esm/Button/Button.d.ts +2 -2
- package/lib-esm/Button/ButtonClose.d.ts +2 -2
- package/lib-esm/Button/ButtonDanger.d.ts +2 -2
- package/lib-esm/Button/ButtonInvisible.d.ts +2 -2
- package/lib-esm/Button/ButtonOutline.d.ts +2 -2
- package/lib-esm/Button/ButtonPrimary.d.ts +2 -2
- package/lib-esm/CircleOcticon.d.ts +35 -35
- package/lib-esm/Details.d.ts +1 -2
- package/lib-esm/Details.js +1 -2
- package/lib-esm/Dialog.d.ts +37 -37
- package/lib-esm/Dropdown.d.ts +8 -72
- package/lib-esm/DropdownMenu/DropdownButton.d.ts +6 -3
- package/lib-esm/FilterList.d.ts +1 -1
- package/lib-esm/Heading.d.ts +1 -2
- package/lib-esm/Heading.js +2 -6
- package/lib-esm/Position.d.ts +4 -4
- package/lib-esm/ProgressBar.d.ts +16 -11
- package/lib-esm/ProgressBar.js +7 -11
- package/lib-esm/SelectMenu/SelectMenu.d.ts +11 -10
- package/lib-esm/SelectMenu/SelectMenuItem.d.ts +1 -1
- package/lib-esm/SelectMenu/SelectMenuModal.d.ts +1 -1
- package/lib-esm/Spinner.d.ts +1 -2
- package/lib-esm/Spinner.js +1 -2
- package/lib-esm/TextInputWithTokens.d.ts +2 -1
- package/lib-esm/Token/AvatarToken.d.ts +1 -1
- package/lib-esm/Token/IssueLabelToken.d.ts +1 -1
- package/lib-esm/Token/Token.d.ts +1 -1
- package/lib-esm/__tests__/Avatar.test.js +4 -2
- package/lib-esm/__tests__/Avatar.types.test.d.ts +3 -0
- package/lib-esm/__tests__/Avatar.types.test.js +16 -0
- package/lib-esm/__tests__/BranchName.types.test.d.ts +3 -0
- package/lib-esm/__tests__/BranchName.types.test.js +13 -0
- package/lib-esm/__tests__/Details.types.test.d.ts +3 -0
- package/lib-esm/__tests__/Details.types.test.js +13 -0
- package/lib-esm/__tests__/Heading.test.js +62 -30
- package/lib-esm/__tests__/Heading.types.test.d.ts +3 -0
- package/lib-esm/__tests__/Heading.types.test.js +13 -0
- package/lib-esm/drafts.d.ts +1 -0
- package/lib-esm/drafts.js +2 -1
- package/lib-esm/stories/ActionMenu2.stories.js +376 -0
- package/package-lock.json +321 -269
- package/package.json +11 -5
- package/script/component-status-project/build.ts +100 -0
- package/script/component-status-project/deploy.rb +142 -0
- package/src/ActionList/Item.tsx +1 -0
- package/src/ActionList2/Divider.tsx +13 -8
- package/src/ActionList2/Item.tsx +13 -3
- package/src/ActionList2/List.tsx +6 -2
- package/src/ActionList2/MenuContext.tsx +6 -0
- package/src/ActionList2/Selection.tsx +11 -1
- package/src/ActionMenu2.tsx +94 -0
- package/src/Avatar.tsx +2 -4
- package/src/BranchName.tsx +3 -3
- package/src/Details.tsx +1 -5
- package/src/Heading.tsx +2 -9
- package/src/ProgressBar.tsx +11 -10
- package/src/Spinner.tsx +1 -3
- package/src/__tests__/Avatar.test.tsx +1 -1
- package/src/__tests__/Avatar.types.test.tsx +11 -0
- package/src/__tests__/BranchName.types.test.tsx +11 -0
- package/src/__tests__/Details.types.test.tsx +11 -0
- package/src/__tests__/Heading.test.tsx +71 -25
- package/src/__tests__/Heading.types.test.tsx +11 -0
- package/src/__tests__/__snapshots__/Autocomplete.test.tsx.snap +4 -0
- package/src/drafts.ts +1 -0
- package/src/stories/ActionMenu2.stories.tsx +551 -0
- package/stats.html +1 -1
- package/tsconfig.build.json +1 -1
- package/tsconfig.json +1 -1
package/dist/browser.esm.js
CHANGED
@@ -19,7 +19,7 @@ import e,{useState as t,useRef as r,useCallback as o,useEffect as a,useMemo as n
|
|
19
19
|
`,Ft=g.div`
|
20
20
|
${Nt};
|
21
21
|
${At};
|
22
|
-
`;function Dt(t){const{children:r,...o}=t;return require("focus-visible"),e.createElement(Ft,Rt({},o,{"data-portal-root":!0}),e.createElement(Lt,null),r)}Dt.displayName="BaseStyles",Dt.defaultProps={color:"fg.default",fontFamily:"normal",lineHeight:"default"};var Mt=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===Ot}(e)}(e)};var Ot="function"==typeof Symbol&&Symbol.for?Symbol.for("react.element"):60103;function Pt(e,t){return!1!==t.clone&&t.isMergeableObject(e)?Ut((r=e,Array.isArray(r)?[]:{}),e,t):e;var r}function Ht(e,t,r){return e.concat(t).map((function(e){return Pt(e,r)}))}function Wt(e){return Object.keys(e).concat(function(e){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e).filter((function(t){return e.propertyIsEnumerable(t)})):[]}(e))}function _t(e,t){try{return t in e}catch(e){return!1}}function jt(e,t,r){var o={};return r.isMergeableObject(e)&&Wt(e).forEach((function(t){o[t]=Pt(e[t],r)})),Wt(t).forEach((function(a){(function(e,t){return _t(e,t)&&!(Object.hasOwnProperty.call(e,t)&&Object.propertyIsEnumerable.call(e,t))})(e,a)||(_t(e,a)&&r.isMergeableObject(t[a])?o[a]=function(e,t){if(!t.customMerge)return Ut;var r=t.customMerge(e);return"function"==typeof r?r:Ut}(a,r)(e[a],t[a],r):o[a]=Pt(t[a],r))})),o}function Ut(e,t,r){(r=r||{}).arrayMerge=r.arrayMerge||Ht,r.isMergeableObject=r.isMergeableObject||Mt,r.cloneUnlessOtherwiseSpecified=Pt;var o=Array.isArray(t);return o===Array.isArray(e)?o?r.arrayMerge(e,t,r):jt(e,t,r):Pt(t,r)}Ut.all=function(e,t){if(!Array.isArray(e))throw new Error("first argument should be an array");return e.reduce((function(e,r){return Ut(e,r,t)}),{})};var Kt=Ut;const Vt=e.createContext({setColorMode:()=>null,setDayScheme:()=>null,setNightScheme:()=>null}),Gt=({children:t,...r})=>{var o,a,n,i,l,d,s,c;const{theme:g,colorMode:f,dayScheme:p,nightScheme:b}=qt(),h=null!==(o=null!==(a=r.theme)&&void 0!==a?a:g)&&void 0!==o?o:x,[m,v]=e.useState(null!==(n=null!==(i=r.colorMode)&&void 0!==i?i:f)&&void 0!==n?n:"day"),[y,w]=e.useState(null!==(l=null!==(d=r.dayScheme)&&void 0!==d?d:p)&&void 0!==l?l:"light"),[B,k]=e.useState(null!==(s=null!==(c=r.nightScheme)&&void 0!==c?c:b)&&void 0!==s?s:"dark"),$=function(e,t){switch(e){case"auto":return t;default:return e}}(m,function(){const[t,r]=e.useState(Yt);return e.useEffect((()=>{var e,t;const o=null===(e=window)||void 0===e||null===(t=e.matchMedia)||void 0===t?void 0:t.call(e,"(prefers-color-scheme: dark)");function a(e){const t=e.matches;r(t?"night":"day")}if(o){if(void 0!==o.addEventListener)return o.addEventListener("change",a),function(){o.removeEventListener("change",a)};if(void 0!==o.addListener)return o.addListener(a),function(){o.removeListener(a)}}}),[]),t}()),T=function(e,t,r){switch(e){case"day":return t;case"night":return r}}($,y,B),S=e.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 Kt(e,e.colorSchemes[r])}return Kt(e,e.colorSchemes[t])}(h,T)),[h,T]);return e.useEffect((()=>{var e,t;v(null!==(e=null!==(t=r.colorMode)&&void 0!==t?t:f)&&void 0!==e?e:"day")}),[r.colorMode,f]),e.useEffect((()=>{var e,t;w(null!==(e=null!==(t=r.dayScheme)&&void 0!==t?t:p)&&void 0!==e?e:"light")}),[r.dayScheme,p]),e.useEffect((()=>{var e,t;k(null!==(e=null!==(t=r.nightScheme)&&void 0!==t?t:b)&&void 0!==e?e:"dark")}),[r.nightScheme,b]),e.createElement(Vt.Provider,{value:{theme:S,colorScheme:T,colorMode:m,resolvedColorMode:$,dayScheme:y,nightScheme:B,setColorMode:v,setDayScheme:w,setNightScheme:k}},e.createElement(u,{theme:S},t))};function qt(){return e.useContext(Vt)}function Xt(e,t){var r;const{colorScheme:o=""}=qt();return null!==(r=e[o])&&void 0!==r?r:t}function Yt(){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"}Gt.displayName="ThemeProvider";var Jt=Gt;var Zt=e=>fe(e.sx);var Qt=g.div(te,O,P,D,H,_,V,U,q,re,Zt);const er=g(Qt)``;er.defaultProps={borderWidth:"1px",borderStyle:"solid",borderColor:"border.default",borderRadius:2};var tr=er;const rr=g(Qt)``;rr.defaultProps={display:"flex"};var or=rr;const ar=g(Qt)``;ar.defaultProps={display:"grid"};var nr=ar;const ir=g(Qt)``;var lr=ir;const dr=e.forwardRef(((t,r)=>e.createElement(ir,Rt({},t,{position:"absolute",ref:r}))));dr.displayName="Absolute";const sr=e.forwardRef(((t,r)=>e.createElement(ir,Rt({},t,{position:"fixed",ref:r}))));sr.displayName="Fixed";const cr=e.forwardRef(((t,r)=>e.createElement(ir,Rt({},t,{position:"relative",ref:r}))));cr.displayName="Relative";const gr=e.forwardRef(((t,r)=>e.createElement(ir,Rt({},t,{position:"sticky",ref:r}))));function fr({ref:e,closeOnOutsideClick:n,defaultOpen:i,onClickOutside:l}){const[d,s]=t(i),c=r(null),g=null!=e?e:c,f=o((e=>{const{current:t}=g;e.target.closest("details")!==t&&(l&&l(e),e.defaultPrevented||s(!1))}),[g,s,l]);a((()=>{if(d&&n)return document.addEventListener("click",f),()=>{document.removeEventListener("click",f)}}),[d,n,f]);const u=e=>{if(!e.defaultPrevented){const t=e.target;s(t.open)}};return{open:d,setOpen:s,getDetailsProps:()=>({onToggle:u,open:d,ref:g})}}function ur(){const e=r(new Set),t=o(((t,r,...o)=>{const a=window.setTimeout(t,r,...o);return e.current.add(a),a}),[]),n=o((t=>{clearTimeout(t),e.current.delete(t)}),[]);return a((()=>()=>{for(const t of e.current)clearTimeout(t)}),[]),{safeSetTimeout:t,safeClearTimeout:n}}gr.defaultProps={top:0,zIndex:1},gr.displayName="Sticky";function pr(e){if(!e.defaultPrevented)for(const t of Object.values(br).reverse())if(true===t(e)||e.defaultPrevented)break}const br={};let hr=0;const mr=({containerRef:e,ignoreClickRefs:t,onClickOutside:r})=>{const i=n((()=>hr++),[]),l=o((o=>{var a;return o instanceof MouseEvent&&o.button>0||(!(null===(a=e.current)||void 0===a||!a.contains(o.target))||(!(!t||!t.some((({current:e})=>null==e?void 0:e.contains(o.target))))||void r(o)))}),[e,t,r]);a((()=>(0===Object.keys(br).length&&document.addEventListener("mousedown",pr,{capture:!0}),function(e,t){br[e]=t}(i,l),()=>{!function(e){delete br[e]}(i),0===Object.keys(br).length&&document.removeEventListener("mousedown",pr,{capture:!0})})),[i,l])};function*vr(e,t={}){var r,o;const a=null!==(r=t.strict)&&void 0!==r&&r,n=null!==(o=t.onlyTabbable)&&void 0!==o&&o?yr:xr,i=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>e instanceof HTMLElement&&n(e,a)?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP});let l=null;if(!t.reverse&&n(e,a)&&(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,a)&&(yield e)}function xr(e,t=!1){const r=["BUTTON","INPUT","SELECT","TEXTAREA","OPTGROUP","OPTION","FIELDSET"].includes(e.tagName)&&e.disabled,o=e.hidden,a=e instanceof HTMLInputElement&&"hidden"===e.type;if(r||o||a)return!1;if(t){const t=0===e.offsetWidth||0===e.offsetHeight,r=["hidden","collapse"].includes(getComputedStyle(e).visibility),o=0===e.getClientRects().length;if(t||r||o)return!1}return null!=e.getAttribute("tabindex")||!(e instanceof HTMLAnchorElement&&null==e.getAttribute("href"))&&-1!==e.tabIndex}function yr(e,t=!1){return xr(e,t)&&"-1"!==e.getAttribute("tabindex")}function wr({initialFocusRef:e,returnFocusRef:t,containerRef:r,preventFocusOnOpen:o}){a((()=>{if(o)return;const a=t.current;if(e&&e.current)e.current.focus();else if(r.current){const e=vr(r.current).next().value;null==e||e.focus()}return function(){null==a||a.focus()}}),[e,t,r,o])}const Br=[];function kr(e){if("Escape"===e.key&&!e.defaultPrevented)for(let t=Br.length-1;t>=0&&(Br[t](e),!e.defaultPrevented);--t);}const $r=(e,t=[e])=>{const r=o(e,t);a((()=>(0===Br.length&&document.addEventListener("keydown",kr),Br.push(r),()=>{Br.splice(Br.findIndex((e=>e===r)),1),0===Br.length&&document.removeEventListener("keydown",kr)})),[r])};function Tr(t){const r=e.useRef(null);return null!=t?t:r}const Sr=({overlayRef:e,returnFocusRef:t,initialFocusRef:r,onEscape:o,ignoreClickRefs:a,onClickOutside:n,preventFocusOnOpen:i})=>{const l=Tr(e);return wr({containerRef:l,returnFocusRef:t,initialFocusRef:r,preventFocusOnOpen:i}),mr({containerRef:l,ignoreClickRefs:a,onClickOutside:n}),$r(o),{ref:l}};let Er,Cr=!1;function zr(){}try{const e=Object.create({},{signal:{get(){Cr=!0}}});window.addEventListener("test",zr,e),window.removeEventListener("test",zr,e)}catch(Gd){}function Ir(){Cr||(!function(){if("undefined"==typeof window)return;const e=EventTarget.prototype.addEventListener;EventTarget.prototype.addEventListener=function(t,r,o){return"object"==typeof o&&"signal"in o&&o.signal instanceof AbortSignal&&e.call(o.signal,"abort",(()=>{this.removeEventListener(t,r,o)})),e.call(this,t,r,o)}}(),Cr=!0)}function Ar(){return void 0===Er&&(Er=/^mac/i.test(window.navigator.platform)),Er}let Nr,Rr=1e4;function Lr(){return"__primer_id_"+Rr++}Ir(),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"}(Nr||(Nr={}));const Fr={ArrowLeft:Nr.ArrowHorizontal,ArrowDown:Nr.ArrowVertical,ArrowUp:Nr.ArrowVertical,ArrowRight:Nr.ArrowHorizontal,h:Nr.HL,j:Nr.JK,k:Nr.JK,l:Nr.HL,a:Nr.AD,s:Nr.WS,w:Nr.WS,d:Nr.AD,Tab:Nr.Tab,Home:Nr.HomeAndEnd,End:Nr.HomeAndEnd,PageUp:Nr.PageUpDown,PageDown:Nr.PageUpDown},Dr={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 Mr(e){const t=Dr[e.key];if("Tab"===e.key&&e.shiftKey)return"previous";const r=Ar();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}function Or(e,t){var r,o,a,n;const i=[],l=new WeakMap,d=null!==(r=null==t?void 0:t.bindKeys)&&void 0!==r?r:(null!=t&&t.getNextFocusable?Nr.ArrowAll:Nr.ArrowVertical)|Nr.HomeAndEnd,s=null!==(o=null==t?void 0:t.focusOutBehavior)&&void 0!==o?o:"stop",c=null!==(a=null==t?void 0:t.focusInStrategy)&&void 0!==a?a:"previous",g=null==t?void 0:t.activeDescendantControl,f=null==t?void 0:t.onActiveDescendantChanged;let u;function p(){return i[0]}function b(e,t=!1){const r=u;u=e,g?e&&document.activeElement===g?h(r,e,t):m():(r&&r!==e&&l.has(r)&&r.setAttribute("tabindex","-1"),null==e||e.setAttribute("tabindex","0"))}function h(t,r,o=!1){r.id||r.setAttribute("id",Lr()),t&&t!==r&&t.removeAttribute("data-is-active-descendant"),g&&(o||g.getAttribute("aria-activedescendant")!==r.id)&&(g.setAttribute("aria-activedescendant",r.id),e.setAttribute("data-has-active-descendant",r.id),r.setAttribute("data-is-active-descendant",o?"activated-directly":"activated-indirectly"),null==f||f(r,t,o))}function m(t=u){"first"===c&&(u=void 0),null==g||g.removeAttribute("aria-activedescendant"),e.removeAttribute("data-has-active-descendant"),null==t||t.removeAttribute("data-is-active-descendant"),null==f||f(void 0,t,!1)}function v(...e){const r=e.filter((e=>{var r,o;return null===(r=null==t||null===(o=t.focusableElementFilter)||void 0===o?void 0:o.call(t,e))||void 0===r||r}));if(0===r.length)return;const o=i.findIndex((e=>(e.compareDocumentPosition(r[0])&Node.DOCUMENT_POSITION_PRECEDING)>0));i.splice(-1===o?i.length:o,0,...r);for(const e of r)l.has(e)||l.set(e,e.getAttribute("tabindex")),e.setAttribute("tabindex","-1");u||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===u){b(p())}}}v(...vr(e)),b(p());new MutationObserver((e=>{for(const t of e)for(const e of t.removedNodes)e instanceof HTMLElement&&x(...vr(e));for(const t of e)for(const e of t.addedNodes)e instanceof HTMLElement&&v(...vr(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}),g?(e.addEventListener("focusin",(e=>{e.target instanceof HTMLElement&&i.includes(e.target)&&(g.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}),g.addEventListener("focusin",(()=>{u?h(void 0,u):b(p())})),g.addEventListener("focusout",(()=>{m()}))):e.addEventListener("focusin",(t=>{if(t.target instanceof HTMLElement)if(void 0!==B)B>=0&&i[B]!==u&&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!=g?g:e;let $;return"closest"===c&&document.addEventListener("keydown",(e=>{"Tab"===e.key&&($=Mr(e))}),{signal:w,capture:!0}),k.addEventListener("keydown",(r=>{if(r.key in Dr){const a=Fr[r.key];if(!r.defaultPrevented&&(a&d)>0&&!function(e,t){const r=e.key,o=[...r].length,a=t instanceof HTMLInputElement&&"text"===t.type||t instanceof HTMLTextAreaElement;if(a&&(1===o||"Home"===r||"End"===r))return!0;if(t instanceof HTMLSelectElement){if(1===o)return!0;if("ArrowDown"===r&&Ar()&&!e.metaKey)return!0;if("ArrowDown"===r&&!Ar()&&e.altKey)return!0}if(t instanceof HTMLTextAreaElement&&("PageUp"===r||"PageDown"===r))return!0;if(a){const e=t,o=0===e.selectionStart&&0===e.selectionEnd,a=e.selectionStart===e.value.length&&e.selectionEnd===e.value.length;if("ArrowLeft"===r&&!o)return!0;if("ArrowRight"===r&&!a)return!0;if(e instanceof HTMLTextAreaElement){if("ArrowUp"===r&&!o)return!0;if("ArrowDown"===r&&!a)return!0}}return!1}(r,document.activeElement)){const a=Mr(r);let n;var o;if(null!=t&&t.getNextFocusable)n=t.getNextFocusable(a,null!==(o=document.activeElement)&&void 0!==o?o:void 0,r);if(!n){const t=function(){if(!u)return 0;const t=i.indexOf(u);return-1!==t?t:u===e?-1:0}();let o=t;"previous"===a?o-=1:"start"===a?o=0:"next"===a?o+=1:o=i.length-1,o<0&&(o="wrap"===s&&"Tab"!==r.key?i.length-1:0),o>=i.length&&(o="wrap"===s&&"Tab"!==r.key?0:i.length-1),t!==o&&(n=i[o])}g?b(n||u,!0):n&&($=a,n.focus()),("Tab"!==r.key||n)&&r.preventDefault()}}}),{signal:w}),y}var Pr=p(["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;}"],It("fontWeights.bold"),It("radii.2"));const Hr=ue({variants:{small:{p:"4px 12px",fontSize:0},medium:{fontSize:1},large:{fontSize:2,p:"10px 20px"}}}),Wr=g.button.attrs((({disabled:e,onClick:t})=>({onClick:e?void 0:t})))`
|
22
|
+
`;function Dt(t){const{children:r,...o}=t;return require("focus-visible"),e.createElement(Ft,Rt({},o,{"data-portal-root":!0}),e.createElement(Lt,null),r)}Dt.displayName="BaseStyles",Dt.defaultProps={color:"fg.default",fontFamily:"normal",lineHeight:"default"};var Mt=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===Ot}(e)}(e)};var Ot="function"==typeof Symbol&&Symbol.for?Symbol.for("react.element"):60103;function Pt(e,t){return!1!==t.clone&&t.isMergeableObject(e)?Ut((r=e,Array.isArray(r)?[]:{}),e,t):e;var r}function Ht(e,t,r){return e.concat(t).map((function(e){return Pt(e,r)}))}function Wt(e){return Object.keys(e).concat(function(e){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e).filter((function(t){return e.propertyIsEnumerable(t)})):[]}(e))}function _t(e,t){try{return t in e}catch(e){return!1}}function jt(e,t,r){var o={};return r.isMergeableObject(e)&&Wt(e).forEach((function(t){o[t]=Pt(e[t],r)})),Wt(t).forEach((function(a){(function(e,t){return _t(e,t)&&!(Object.hasOwnProperty.call(e,t)&&Object.propertyIsEnumerable.call(e,t))})(e,a)||(_t(e,a)&&r.isMergeableObject(t[a])?o[a]=function(e,t){if(!t.customMerge)return Ut;var r=t.customMerge(e);return"function"==typeof r?r:Ut}(a,r)(e[a],t[a],r):o[a]=Pt(t[a],r))})),o}function Ut(e,t,r){(r=r||{}).arrayMerge=r.arrayMerge||Ht,r.isMergeableObject=r.isMergeableObject||Mt,r.cloneUnlessOtherwiseSpecified=Pt;var o=Array.isArray(t);return o===Array.isArray(e)?o?r.arrayMerge(e,t,r):jt(e,t,r):Pt(t,r)}Ut.all=function(e,t){if(!Array.isArray(e))throw new Error("first argument should be an array");return e.reduce((function(e,r){return Ut(e,r,t)}),{})};var Kt=Ut;const Vt=e.createContext({setColorMode:()=>null,setDayScheme:()=>null,setNightScheme:()=>null}),Gt=({children:t,...r})=>{var o,a,n,i,l,d,s,c;const{theme:g,colorMode:f,dayScheme:p,nightScheme:b}=qt(),h=null!==(o=null!==(a=r.theme)&&void 0!==a?a:g)&&void 0!==o?o:x,[m,v]=e.useState(null!==(n=null!==(i=r.colorMode)&&void 0!==i?i:f)&&void 0!==n?n:"day"),[y,w]=e.useState(null!==(l=null!==(d=r.dayScheme)&&void 0!==d?d:p)&&void 0!==l?l:"light"),[B,k]=e.useState(null!==(s=null!==(c=r.nightScheme)&&void 0!==c?c:b)&&void 0!==s?s:"dark"),$=function(e,t){switch(e){case"auto":return t;default:return e}}(m,function(){const[t,r]=e.useState(Yt);return e.useEffect((()=>{var e,t;const o=null===(e=window)||void 0===e||null===(t=e.matchMedia)||void 0===t?void 0:t.call(e,"(prefers-color-scheme: dark)");function a(e){const t=e.matches;r(t?"night":"day")}if(o){if(void 0!==o.addEventListener)return o.addEventListener("change",a),function(){o.removeEventListener("change",a)};if(void 0!==o.addListener)return o.addListener(a),function(){o.removeListener(a)}}}),[]),t}()),T=function(e,t,r){switch(e){case"day":return t;case"night":return r}}($,y,B),S=e.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 Kt(e,e.colorSchemes[r])}return Kt(e,e.colorSchemes[t])}(h,T)),[h,T]);return e.useEffect((()=>{var e,t;v(null!==(e=null!==(t=r.colorMode)&&void 0!==t?t:f)&&void 0!==e?e:"day")}),[r.colorMode,f]),e.useEffect((()=>{var e,t;w(null!==(e=null!==(t=r.dayScheme)&&void 0!==t?t:p)&&void 0!==e?e:"light")}),[r.dayScheme,p]),e.useEffect((()=>{var e,t;k(null!==(e=null!==(t=r.nightScheme)&&void 0!==t?t:b)&&void 0!==e?e:"dark")}),[r.nightScheme,b]),e.createElement(Vt.Provider,{value:{theme:S,colorScheme:T,colorMode:m,resolvedColorMode:$,dayScheme:y,nightScheme:B,setColorMode:v,setDayScheme:w,setNightScheme:k}},e.createElement(u,{theme:S},t))};function qt(){return e.useContext(Vt)}function Xt(e,t){var r;const{colorScheme:o=""}=qt();return null!==(r=e[o])&&void 0!==r?r:t}function Yt(){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"}Gt.displayName="ThemeProvider";var Jt=Gt;var Zt=e=>fe(e.sx);var Qt=g.div(te,O,P,D,H,_,V,U,q,re,Zt);const er=g(Qt)``;er.defaultProps={borderWidth:"1px",borderStyle:"solid",borderColor:"border.default",borderRadius:2};var tr=er;const rr=g(Qt)``;rr.defaultProps={display:"flex"};var or=rr;const ar=g(Qt)``;ar.defaultProps={display:"grid"};var nr=ar;const ir=g(Qt)``;var lr=ir;const dr=e.forwardRef(((t,r)=>e.createElement(ir,Rt({},t,{position:"absolute",ref:r}))));dr.displayName="Absolute";const sr=e.forwardRef(((t,r)=>e.createElement(ir,Rt({},t,{position:"fixed",ref:r}))));sr.displayName="Fixed";const cr=e.forwardRef(((t,r)=>e.createElement(ir,Rt({},t,{position:"relative",ref:r}))));cr.displayName="Relative";const gr=e.forwardRef(((t,r)=>e.createElement(ir,Rt({},t,{position:"sticky",ref:r}))));function fr({ref:e,closeOnOutsideClick:n,defaultOpen:i,onClickOutside:l}){const[d,s]=t(i),c=r(null),g=null!=e?e:c,f=o((e=>{const{current:t}=g;e.target.closest("details")!==t&&(l&&l(e),e.defaultPrevented||s(!1))}),[g,s,l]);a((()=>{if(d&&n)return document.addEventListener("click",f),()=>{document.removeEventListener("click",f)}}),[d,n,f]);const u=e=>{if(!e.defaultPrevented){const t=e.target;s(t.open)}};return{open:d,setOpen:s,getDetailsProps:()=>({onToggle:u,open:d,ref:g})}}function ur(){const e=r(new Set),t=o(((t,r,...o)=>{const a=window.setTimeout(t,r,...o);return e.current.add(a),a}),[]),n=o((t=>{clearTimeout(t),e.current.delete(t)}),[]);return a((()=>()=>{for(const t of e.current)clearTimeout(t)}),[]),{safeSetTimeout:t,safeClearTimeout:n}}gr.defaultProps={top:0,zIndex:1},gr.displayName="Sticky";function pr(e){if(!e.defaultPrevented)for(const t of Object.values(br).reverse())if(true===t(e)||e.defaultPrevented)break}const br={};let hr=0;const mr=({containerRef:e,ignoreClickRefs:t,onClickOutside:r})=>{const i=n((()=>hr++),[]),l=o((o=>{var a;return o instanceof MouseEvent&&o.button>0||(!(null===(a=e.current)||void 0===a||!a.contains(o.target))||(!(!t||!t.some((({current:e})=>null==e?void 0:e.contains(o.target))))||void r(o)))}),[e,t,r]);a((()=>(0===Object.keys(br).length&&document.addEventListener("mousedown",pr,{capture:!0}),function(e,t){br[e]=t}(i,l),()=>{!function(e){delete br[e]}(i),0===Object.keys(br).length&&document.removeEventListener("mousedown",pr,{capture:!0})})),[i,l])};function*vr(e,t={}){var r,o;const a=null!==(r=t.strict)&&void 0!==r&&r,n=null!==(o=t.onlyTabbable)&&void 0!==o&&o?yr:xr,i=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>e instanceof HTMLElement&&n(e,a)?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP});let l=null;if(!t.reverse&&n(e,a)&&(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,a)&&(yield e)}function xr(e,t=!1){const r=["BUTTON","INPUT","SELECT","TEXTAREA","OPTGROUP","OPTION","FIELDSET"].includes(e.tagName)&&e.disabled,o=e.hidden,a=e instanceof HTMLInputElement&&"hidden"===e.type;if(r||o||a)return!1;if(t){const t=0===e.offsetWidth||0===e.offsetHeight,r=["hidden","collapse"].includes(getComputedStyle(e).visibility),o=0===e.getClientRects().length;if(t||r||o)return!1}return null!=e.getAttribute("tabindex")||!(e instanceof HTMLAnchorElement&&null==e.getAttribute("href"))&&-1!==e.tabIndex}function yr(e,t=!1){return xr(e,t)&&"-1"!==e.getAttribute("tabindex")}function wr({initialFocusRef:e,returnFocusRef:t,containerRef:r,preventFocusOnOpen:o}){a((()=>{if(o)return;const a=t.current;if(e&&e.current)e.current.focus();else if(r.current){const e=vr(r.current).next().value;null==e||e.focus()}return function(){null==a||a.focus()}}),[e,t,r,o])}const Br=[];function kr(e){if("Escape"===e.key&&!e.defaultPrevented)for(let t=Br.length-1;t>=0&&(Br[t](e),!e.defaultPrevented);--t);}const $r=(e,t=[e])=>{const r=o(e,t);a((()=>(0===Br.length&&document.addEventListener("keydown",kr),Br.push(r),()=>{Br.splice(Br.findIndex((e=>e===r)),1),0===Br.length&&document.removeEventListener("keydown",kr)})),[r])};function Tr(t){const r=e.useRef(null);return null!=t?t:r}const Sr=({overlayRef:e,returnFocusRef:t,initialFocusRef:r,onEscape:o,ignoreClickRefs:a,onClickOutside:n,preventFocusOnOpen:i})=>{const l=Tr(e);return wr({containerRef:l,returnFocusRef:t,initialFocusRef:r,preventFocusOnOpen:i}),mr({containerRef:l,ignoreClickRefs:a,onClickOutside:n}),$r(o),{ref:l}};let Er,Cr=!1;function zr(){}try{const e=Object.create({},{signal:{get(){Cr=!0}}});window.addEventListener("test",zr,e),window.removeEventListener("test",zr,e)}catch(Vd){}function Ir(){Cr||(!function(){if("undefined"==typeof window)return;const e=EventTarget.prototype.addEventListener;EventTarget.prototype.addEventListener=function(t,r,o){return"object"==typeof o&&"signal"in o&&o.signal instanceof AbortSignal&&e.call(o.signal,"abort",(()=>{this.removeEventListener(t,r,o)})),e.call(this,t,r,o)}}(),Cr=!0)}function Ar(){return void 0===Er&&(Er=/^mac/i.test(window.navigator.platform)),Er}let Nr,Rr=1e4;function Lr(){return"__primer_id_"+Rr++}Ir(),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"}(Nr||(Nr={}));const Fr={ArrowLeft:Nr.ArrowHorizontal,ArrowDown:Nr.ArrowVertical,ArrowUp:Nr.ArrowVertical,ArrowRight:Nr.ArrowHorizontal,h:Nr.HL,j:Nr.JK,k:Nr.JK,l:Nr.HL,a:Nr.AD,s:Nr.WS,w:Nr.WS,d:Nr.AD,Tab:Nr.Tab,Home:Nr.HomeAndEnd,End:Nr.HomeAndEnd,PageUp:Nr.PageUpDown,PageDown:Nr.PageUpDown},Dr={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 Mr(e){const t=Dr[e.key];if("Tab"===e.key&&e.shiftKey)return"previous";const r=Ar();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}function Or(e,t){var r,o,a,n;const i=[],l=new WeakMap,d=null!==(r=null==t?void 0:t.bindKeys)&&void 0!==r?r:(null!=t&&t.getNextFocusable?Nr.ArrowAll:Nr.ArrowVertical)|Nr.HomeAndEnd,s=null!==(o=null==t?void 0:t.focusOutBehavior)&&void 0!==o?o:"stop",c=null!==(a=null==t?void 0:t.focusInStrategy)&&void 0!==a?a:"previous",g=null==t?void 0:t.activeDescendantControl,f=null==t?void 0:t.onActiveDescendantChanged;let u;function p(){return i[0]}function b(e,t=!1){const r=u;u=e,g?e&&document.activeElement===g?h(r,e,t):m():(r&&r!==e&&l.has(r)&&r.setAttribute("tabindex","-1"),null==e||e.setAttribute("tabindex","0"))}function h(t,r,o=!1){r.id||r.setAttribute("id",Lr()),t&&t!==r&&t.removeAttribute("data-is-active-descendant"),g&&(o||g.getAttribute("aria-activedescendant")!==r.id)&&(g.setAttribute("aria-activedescendant",r.id),e.setAttribute("data-has-active-descendant",r.id),r.setAttribute("data-is-active-descendant",o?"activated-directly":"activated-indirectly"),null==f||f(r,t,o))}function m(t=u){"first"===c&&(u=void 0),null==g||g.removeAttribute("aria-activedescendant"),e.removeAttribute("data-has-active-descendant"),null==t||t.removeAttribute("data-is-active-descendant"),null==f||f(void 0,t,!1)}function v(...e){const r=e.filter((e=>{var r,o;return null===(r=null==t||null===(o=t.focusableElementFilter)||void 0===o?void 0:o.call(t,e))||void 0===r||r}));if(0===r.length)return;const o=i.findIndex((e=>(e.compareDocumentPosition(r[0])&Node.DOCUMENT_POSITION_PRECEDING)>0));i.splice(-1===o?i.length:o,0,...r);for(const e of r)l.has(e)||l.set(e,e.getAttribute("tabindex")),e.setAttribute("tabindex","-1");u||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===u){b(p())}}}v(...vr(e)),b(p());new MutationObserver((e=>{for(const t of e)for(const e of t.removedNodes)e instanceof HTMLElement&&x(...vr(e));for(const t of e)for(const e of t.addedNodes)e instanceof HTMLElement&&v(...vr(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}),g?(e.addEventListener("focusin",(e=>{e.target instanceof HTMLElement&&i.includes(e.target)&&(g.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}),g.addEventListener("focusin",(()=>{u?h(void 0,u):b(p())})),g.addEventListener("focusout",(()=>{m()}))):e.addEventListener("focusin",(t=>{if(t.target instanceof HTMLElement)if(void 0!==B)B>=0&&i[B]!==u&&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!=g?g:e;let $;return"closest"===c&&document.addEventListener("keydown",(e=>{"Tab"===e.key&&($=Mr(e))}),{signal:w,capture:!0}),k.addEventListener("keydown",(r=>{if(r.key in Dr){const a=Fr[r.key];if(!r.defaultPrevented&&(a&d)>0&&!function(e,t){const r=e.key,o=[...r].length,a=t instanceof HTMLInputElement&&"text"===t.type||t instanceof HTMLTextAreaElement;if(a&&(1===o||"Home"===r||"End"===r))return!0;if(t instanceof HTMLSelectElement){if(1===o)return!0;if("ArrowDown"===r&&Ar()&&!e.metaKey)return!0;if("ArrowDown"===r&&!Ar()&&e.altKey)return!0}if(t instanceof HTMLTextAreaElement&&("PageUp"===r||"PageDown"===r))return!0;if(a){const e=t,o=0===e.selectionStart&&0===e.selectionEnd,a=e.selectionStart===e.value.length&&e.selectionEnd===e.value.length;if("ArrowLeft"===r&&!o)return!0;if("ArrowRight"===r&&!a)return!0;if(e instanceof HTMLTextAreaElement){if("ArrowUp"===r&&!o)return!0;if("ArrowDown"===r&&!a)return!0}}return!1}(r,document.activeElement)){const a=Mr(r);let n;var o;if(null!=t&&t.getNextFocusable)n=t.getNextFocusable(a,null!==(o=document.activeElement)&&void 0!==o?o:void 0,r);if(!n){const t=function(){if(!u)return 0;const t=i.indexOf(u);return-1!==t?t:u===e?-1:0}();let o=t;"previous"===a?o-=1:"start"===a?o=0:"next"===a?o+=1:o=i.length-1,o<0&&(o="wrap"===s&&"Tab"!==r.key?i.length-1:0),o>=i.length&&(o="wrap"===s&&"Tab"!==r.key?0:i.length-1),t!==o&&(n=i[o])}g?b(n||u,!0):n&&($=a,n.focus()),("Tab"!==r.key||n)&&r.preventDefault()}}}),{signal:w}),y}var Pr=p(["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;}"],It("fontWeights.bold"),It("radii.2"));const Hr=ue({variants:{small:{p:"4px 12px",fontSize:0},medium:{fontSize:1},large:{fontSize:2,p:"10px 20px"}}}),Wr=g.button.attrs((({disabled:e,onClick:t})=>({onClick:e?void 0:t})))`
|
23
23
|
${Pr}
|
24
24
|
${Hr}
|
25
25
|
`;Wr.defaultProps={variant:"medium"};var _r=Wr;var jr=g(_r)`
|
@@ -549,6 +549,7 @@ import e,{useState as t,useRef as r,useCallback as o,useEffect as a,useMemo as n
|
|
549
549
|
rect {
|
550
550
|
fill: ${({selected:e})=>It(e?"colors.accent.fg":"colors.canvas.default")};
|
551
551
|
stroke: ${({selected:e})=>It(e?"colors.accent.fg":"colors.border.default")};
|
552
|
+
shape-rendering: auto; // this is a workaround to override global style in github/github, see primer/react#1666
|
552
553
|
}
|
553
554
|
path {
|
554
555
|
fill: ${It("colors.fg.onEmphasis")};
|
@@ -659,13 +660,12 @@ import e,{useState as t,useRef as r,useCallback as o,useEffect as a,useMemo as n
|
|
659
660
|
${we}
|
660
661
|
${Za}
|
661
662
|
${Zt};
|
662
|
-
`;const en=e.forwardRef((({icon:t,block:r,className:o,contrast:a,disabled:n,sx:i,theme:l,width:d,minWidth:s,maxWidth:c,variant:g,...f},u)=>{const p=Ya(o,"TextInput-wrapper");return e.createElement(Qa,{block:r,className:p,contrast:a,disabled:n,hasIcon:!!t,sx:i,theme:l,width:d,minWidth:s,maxWidth:c,variant:g},t&&e.createElement(t,{className:"TextInput-icon"}),e.createElement(Ja,Rt({ref:u,disabled:n},f)))}));en.defaultProps={type:"text"},en.displayName="TextInput";var tn=en;const rn=e.forwardRef((({as:r=tn,onFocus:n,onBlur:i,onChange:l,onKeyDown:s,onKeyUp:c,onKeyPress:g,value:f,...u},p)=>{const b=d(Ga);if(null===b)throw new Error("AutocompleteContext returned null values");const{activeDescendantRef:h,autocompleteSuggestion:m="",id:v,inputRef:x,inputValue:y="",isMenuDirectlyActivated:w,setInputValue:B,setShowMenu:k,showMenu:$}=b,T=Do(x,p),[S,E]=t(!0),C=o((e=>{n&&n(e),k(!0)}),[n,k]),z=o((e=>{i&&i(e),setTimeout((()=>{document.activeElement!==T.current&&k(!1)}),0)}),[i,k,T]),I=o((e=>{l&&l(e),B(e.currentTarget.value),$||k(!0)}),[l,B,k,$]),A=o((e=>{var t;s&&s(e),"Backspace"===e.key&&E(!1),"Escape"===e.key&&null!==(t=x.current)&&void 0!==t&&t.value&&(B(""),x.current.value="")}),[x,B,E,s]),N=o((e=>{c&&c(e),"Backspace"===e.key&&E(!0)}),[E,c]),R=o((e=>{if(g&&g(e),$&&"Enter"===e.key&&h.current){e.preventDefault(),e.nativeEvent.stopImmediatePropagation();const t=new KeyboardEvent(e.type,e.nativeEvent);h.current.dispatchEvent(t)}}),[h,$,g]);return a((()=>{x.current&&(m||(x.current.value=y),S&&m&&(y||w)&&(x.current.value=m,0===m.toLowerCase().indexOf(y.toLowerCase())&&x.current.setSelectionRange(y.length,m.length)))}),[m,y,x,w]),a((()=>{f&&B(f.toString())}),[f,B]),e.createElement(r,Rt({onFocus:C,onBlur:z,onChange:I,onKeyDown:A,onKeyPress:R,onKeyUp:N,ref:T,"aria-controls":`${v}-listbox`,"aria-autocomplete":"both",role:"combobox","aria-expanded":$,"aria-haspopup":"listbox","aria-owns":`${v}-listbox`,autocomplete:"off"},u))}));rn.displayName="AutocompleteInput";var on=rn;const an=(e,t,r="vertical",o=8,a=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]:g,[l]:f}=t.getBoundingClientRect(),u=c>f-o;if(s<g+a){const e=s-g+t[d];t.scrollTo({behavior:n,[i]:e-a})}else if(u){const e=c-f+t[d];t.scrollTo({behavior:n,[i]:e+o})}};function nn(o){const i=d(Ga);if(null===i)throw new Error("AutocompleteContext returned null values");const{activeDescendantRef:l,id:s,inputRef:c,inputValue:g="",scrollContainerRef:f,setAutocompleteSuggestion:u,setShowMenu:p,setInputValue:b,setIsMenuDirectlyActivated:h,setSelectedItemLength:m,showMenu:v}=i,{items:x,selectedItemIds:y,sortOnCloseFn:w,emptyStateText:B,addNewItem:k,loading:$,selectionVariant:T,filterFn:S,"aria-labelledby":E,onOpenChange:C,onSelectedChange:z,customScrollContainerRef:I}=o,A=r(null),[N,R]=t(),[L,F]=t(x.map((({id:e})=>e))),D=n((()=>x.map((e=>({...e,role:"option",id:e.id,selected:"multiple"===T?y.includes(e.id):void 0,onAction:e=>{const t=y.filter((t=>t!==e.id)),r=y.includes(e.id)?t:[...t,e.id];var o,a;((z||(o=b,function(e){const{text:t=""}=Array.isArray(e)?e.slice(-1)[0]:e;o(t)}))(r.map((e=>function(e,t){return t.find((t=>t.id===e))}(e,x)))),"multiple"===T)?(b(""),u("")):(p(!1),null===(a=c.current)||void 0===a||a.setSelectionRange(c.current.value.length,c.current.value.length))}})))),[x,y,c,z,T,u,b,p]),M=n((()=>L.reduce(((e,t,r)=>(e[t]=r,e)),{})),[L]),O=n((()=>{return D.filter(S||(e=g,function(t,r){var o;return Boolean(null===(o=t.text)||void 0===o?void 0:o.toLowerCase().startsWith(e.toLowerCase()))})).sort(((e,t)=>M[e.id]-M[t.id]));var e}),[D,M,S,g]),P=n((()=>[...O,...k?[{...k,leadingVisual:()=>e.createElement(io,null),onAction:e=>{k.handleAddItem({...e,id:e.id||Lr(),leadingVisual:void 0}),"multiple"===T&&(b(""),u(""))}}]:[]]),[O,k,u,T,b]);return No({containerRef:A,focusOutBehavior:"wrap",focusableElementFilter:e=>!(e instanceof HTMLInputElement),activeDescendantFocus:c,onActiveDescendantChanged:(e,t,r)=>{if(l.current=e||null,e){const t=D.find((t=>t.id.toString()===e.getAttribute("data-id")));R(t),h(r)}e&&I&&I.current&&r?an(e,I.current):e&&f.current&&r&&an(e,f.current)}},[$]),a((()=>{var e;null!=N&&null!==(e=N.text)&&void 0!==e&&e.startsWith(g)&&!y.includes(N.id)?u(N.text):u("")}),[N,g,y,u]),a((()=>{const e=[...L].sort(w||(t=e=>((e,t)=>t.includes(e))(e,y),(e,r)=>t(e)===t(r)?0:t(e)?-1:1));var t;const r=e.length===L.length&&e.every(((e,t)=>e===L[t]));!1!==v||r||F(e),C&&C(Boolean(v))}),[v,C,y,w,L]),a((()=>{y.length&&m(y.length)}),[y,m]),e.createElement(Qt,{sx:v?{}:{position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"}},$?e.createElement(Qt,{p:3,display:"flex",justifyContent:"center"},e.createElement(
|
663
|
+
`;const en=e.forwardRef((({icon:t,block:r,className:o,contrast:a,disabled:n,sx:i,theme:l,width:d,minWidth:s,maxWidth:c,variant:g,...f},u)=>{const p=Ya(o,"TextInput-wrapper");return e.createElement(Qa,{block:r,className:p,contrast:a,disabled:n,hasIcon:!!t,sx:i,theme:l,width:d,minWidth:s,maxWidth:c,variant:g},t&&e.createElement(t,{className:"TextInput-icon"}),e.createElement(Ja,Rt({ref:u,disabled:n},f)))}));en.defaultProps={type:"text"},en.displayName="TextInput";var tn=en;const rn=e.forwardRef((({as:r=tn,onFocus:n,onBlur:i,onChange:l,onKeyDown:s,onKeyUp:c,onKeyPress:g,value:f,...u},p)=>{const b=d(Ga);if(null===b)throw new Error("AutocompleteContext returned null values");const{activeDescendantRef:h,autocompleteSuggestion:m="",id:v,inputRef:x,inputValue:y="",isMenuDirectlyActivated:w,setInputValue:B,setShowMenu:k,showMenu:$}=b,T=Do(x,p),[S,E]=t(!0),C=o((e=>{n&&n(e),k(!0)}),[n,k]),z=o((e=>{i&&i(e),setTimeout((()=>{document.activeElement!==T.current&&k(!1)}),0)}),[i,k,T]),I=o((e=>{l&&l(e),B(e.currentTarget.value),$||k(!0)}),[l,B,k,$]),A=o((e=>{var t;s&&s(e),"Backspace"===e.key&&E(!1),"Escape"===e.key&&null!==(t=x.current)&&void 0!==t&&t.value&&(B(""),x.current.value="")}),[x,B,E,s]),N=o((e=>{c&&c(e),"Backspace"===e.key&&E(!0)}),[E,c]),R=o((e=>{if(g&&g(e),$&&"Enter"===e.key&&h.current){e.preventDefault(),e.nativeEvent.stopImmediatePropagation();const t=new KeyboardEvent(e.type,e.nativeEvent);h.current.dispatchEvent(t)}}),[h,$,g]);return a((()=>{x.current&&(m||(x.current.value=y),S&&m&&(y||w)&&(x.current.value=m,0===m.toLowerCase().indexOf(y.toLowerCase())&&x.current.setSelectionRange(y.length,m.length)))}),[m,y,x,w]),a((()=>{f&&B(f.toString())}),[f,B]),e.createElement(r,Rt({onFocus:C,onBlur:z,onChange:I,onKeyDown:A,onKeyPress:R,onKeyUp:N,ref:T,"aria-controls":`${v}-listbox`,"aria-autocomplete":"both",role:"combobox","aria-expanded":$,"aria-haspopup":"listbox","aria-owns":`${v}-listbox`,autocomplete:"off"},u))}));rn.displayName="AutocompleteInput";var on=rn;const an=(e,t,r="vertical",o=8,a=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]:g,[l]:f}=t.getBoundingClientRect(),u=c>f-o;if(s<g+a){const e=s-g+t[d];t.scrollTo({behavior:n,[i]:e-a})}else if(u){const e=c-f+t[d];t.scrollTo({behavior:n,[i]:e+o})}};function nn(o){const i=d(Ga);if(null===i)throw new Error("AutocompleteContext returned null values");const{activeDescendantRef:l,id:s,inputRef:c,inputValue:g="",scrollContainerRef:f,setAutocompleteSuggestion:u,setShowMenu:p,setInputValue:b,setIsMenuDirectlyActivated:h,setSelectedItemLength:m,showMenu:v}=i,{items:x,selectedItemIds:y,sortOnCloseFn:w,emptyStateText:B,addNewItem:k,loading:$,selectionVariant:T,filterFn:S,"aria-labelledby":E,onOpenChange:C,onSelectedChange:z,customScrollContainerRef:I}=o,A=r(null),[N,R]=t(),[L,F]=t(x.map((({id:e})=>e))),D=n((()=>x.map((e=>({...e,role:"option",id:e.id,selected:"multiple"===T?y.includes(e.id):void 0,onAction:e=>{const t=y.filter((t=>t!==e.id)),r=y.includes(e.id)?t:[...t,e.id];var o,a;((z||(o=b,function(e){const{text:t=""}=Array.isArray(e)?e.slice(-1)[0]:e;o(t)}))(r.map((e=>function(e,t){return t.find((t=>t.id===e))}(e,x)))),"multiple"===T)?(b(""),u("")):(p(!1),null===(a=c.current)||void 0===a||a.setSelectionRange(c.current.value.length,c.current.value.length))}})))),[x,y,c,z,T,u,b,p]),M=n((()=>L.reduce(((e,t,r)=>(e[t]=r,e)),{})),[L]),O=n((()=>{return D.filter(S||(e=g,function(t,r){var o;return Boolean(null===(o=t.text)||void 0===o?void 0:o.toLowerCase().startsWith(e.toLowerCase()))})).sort(((e,t)=>M[e.id]-M[t.id]));var e}),[D,M,S,g]),P=n((()=>[...O,...k?[{...k,leadingVisual:()=>e.createElement(io,null),onAction:e=>{k.handleAddItem({...e,id:e.id||Lr(),leadingVisual:void 0}),"multiple"===T&&(b(""),u(""))}}]:[]]),[O,k,u,T,b]);return No({containerRef:A,focusOutBehavior:"wrap",focusableElementFilter:e=>!(e instanceof HTMLInputElement),activeDescendantFocus:c,onActiveDescendantChanged:(e,t,r)=>{if(l.current=e||null,e){const t=D.find((t=>t.id.toString()===e.getAttribute("data-id")));R(t),h(r)}e&&I&&I.current&&r?an(e,I.current):e&&f.current&&r&&an(e,f.current)}},[$]),a((()=>{var e;null!=N&&null!==(e=N.text)&&void 0!==e&&e.startsWith(g)&&!y.includes(N.id)?u(N.text):u("")}),[N,g,y,u]),a((()=>{const e=[...L].sort(w||(t=e=>((e,t)=>t.includes(e))(e,y),(e,r)=>t(e)===t(r)?0:t(e)?-1:1));var t;const r=e.length===L.length&&e.every(((e,t)=>e===L[t]));!1!==v||r||F(e),C&&C(Boolean(v))}),[v,C,y,w,L]),a((()=>{y.length&&m(y.length)}),[y,m]),e.createElement(Qt,{sx:v?{}:{position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"}},$?e.createElement(Qt,{p:3,display:"flex",justifyContent:"center"},e.createElement($l,null)):e.createElement("div",{ref:A},P.length?e.createElement(Da,{selectionVariant:"multiple",items:P,role:"listbox",id:`${s}-listbox`,"aria-labelledby":E}):e.createElement(Qt,{p:3},B)))}function ln({menuAnchorRef:t,overlayProps:r,children:a}){const n=d(Ga);if(null===n)throw new Error("AutocompleteContext returned null values");const{inputRef:i,scrollContainerRef:l,selectedItemLength:s,setShowMenu:c,showMenu:g=!1}=n,{floatingElementRef:f,position:u}=ko({side:"outside-bottom",align:"start",anchorElementRef:t||i},[g,s]),p=Do(l,f),b=o((()=>{c(!1)}),[c]);return"undefined"==typeof window?null:e.createElement(Wa,Rt({returnFocusRef:i,preventFocusOnOpen:!0,onClickOutside:b,onEscape:b,ref:p,top:null==u?void 0:u.top,left:null==u?void 0:u.left,visibility:g?"visible":"hidden",sx:{overflow:"auto"}},r),a)}nn.displayName="AutocompleteMenu",nn.defaultProps={emptyStateText:"No selectable options",selectionVariant:"single"},nn.displayName="AutocompleteMenu",ln.displayName="AutocompleteOverlay",ln.displayName="AutocompleteOverlay";const dn={inputValue:"",showMenu:!1,isMenuDirectlyActivated:!1,autocompleteSuggestion:"",selectedItemLength:0},sn=(e,t)=>{const{type:r,payload:o}=t;switch(r){case"inputValue":return{...e,inputValue:o};case"showMenu":return{...e,showMenu:o};case"isMenuDirectlyActivated":return{...e,isMenuDirectlyActivated:o};case"autocompleteSuggestion":return{...e,autocompleteSuggestion:o};case"selectedItemLength":return{...e,selectedItemLength:o};default:return e}},cn=({children:t,id:a})=>{const n=r(null),i=r(null),l=r(null),[d,s]=c(sn,dn),{inputValue:g,showMenu:f,autocompleteSuggestion:u,isMenuDirectlyActivated:p,selectedItemLength:b}=d,h=o((e=>{s({type:"inputValue",payload:e})}),[]),m=o((e=>{s({type:"showMenu",payload:e})}),[]),v=o((e=>{s({type:"autocompleteSuggestion",payload:e})}),[]),x=o((e=>{s({type:"isMenuDirectlyActivated",payload:e})}),[]),y=o((e=>{s({type:"selectedItemLength",payload:e})}),[]),w=Wo(a);return e.createElement(Ga.Provider,{value:{activeDescendantRef:n,autocompleteSuggestion:u,id:w,inputRef:l,inputValue:g,isMenuDirectlyActivated:p,scrollContainerRef:i,selectedItemLength:b,setAutocompleteSuggestion:v,setInputValue:h,setIsMenuDirectlyActivated:x,setShowMenu:m,setSelectedItemLength:y,showMenu:f}},t)};cn.displayName="Autocomplete";var gn=Object.assign(cn,{Input:on,Menu:nn,Overlay:ln});const fn=g.img.attrs((e=>({height:e.size,width:e.size})))`
|
663
664
|
display: inline-block;
|
664
665
|
overflow: hidden; // Ensure page layout in Firefox should images fail to load
|
665
666
|
line-height: ${It("lineHeights.condensedUltra")};
|
666
667
|
vertical-align: middle;
|
667
668
|
border-radius: ${e=>function({size:e,square:t}){return t?e&&e<=24?"4px":"6px":"50%"}(e)};
|
668
|
-
${At};
|
669
669
|
${Zt}
|
670
670
|
`;fn.defaultProps={size:20,alt:"",square:!1};var un=fn;const pn=g(un)`
|
671
671
|
position: absolute;
|
@@ -795,7 +795,7 @@ import e,{useState as t,useRef as r,useCallback as o,useEffect as a,useMemo as n
|
|
795
795
|
color: ${It("colors.fg.muted")};
|
796
796
|
background-color: ${It("colors.accent.subtle")};
|
797
797
|
border-radius: ${It("radii.2")};
|
798
|
-
|
798
|
+
|
799
799
|
${Zt};
|
800
800
|
`;const wn=g.li`
|
801
801
|
display: inline-block;
|
@@ -869,7 +869,6 @@ import e,{useState as t,useRef as r,useCallback as o,useEffect as a,useMemo as n
|
|
869
869
|
display: none;
|
870
870
|
}
|
871
871
|
|
872
|
-
${At}
|
873
872
|
${Zt};
|
874
873
|
`;Vn.displayName="Details";var Gn=Vn;const qn=()=>null;function Xn(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 Yn=g.span`
|
875
874
|
${Nt};
|
@@ -1126,14 +1125,12 @@ import e,{useState as t,useRef as r,useCallback as o,useEffect as a,useMemo as n
|
|
1126
1125
|
}
|
1127
1126
|
|
1128
1127
|
${Zt};
|
1129
|
-
`;Ci.displayName="Header.Link";var zi=Object.assign(Si,{Link:Ci,Item:Ei});
|
1128
|
+
`;Ci.displayName="Header.Link";var zi=Object.assign(Si,{Link:Ci,Item:Ei});var Ii=g.h2`
|
1130
1129
|
font-weight: ${It("fontWeights.bold")};
|
1131
1130
|
font-size: ${It("fontSizes.5")};
|
1132
1131
|
margin: 0;
|
1133
|
-
${Nt};
|
1134
|
-
${At};
|
1135
1132
|
${Zt};
|
1136
|
-
`;
|
1133
|
+
`;var Ai=g.span`
|
1137
1134
|
& * {
|
1138
1135
|
margin-right: ${It("space.1")};
|
1139
1136
|
}
|
@@ -1141,7 +1138,7 @@ import e,{useState as t,useRef as r,useCallback as o,useEffect as a,useMemo as n
|
|
1141
1138
|
margin-right: 0;
|
1142
1139
|
}
|
1143
1140
|
${Zt};
|
1144
|
-
`;const
|
1141
|
+
`;const Ni=p(["margin-top:-1px;margin-bottom:-1px;color:",";border:"," solid ",";box-shadow:none;",";background-color:transparent;"],It("colors.fg.muted"),It("borderWidths.1"),It("colors.border.default"),ct),Ri=ue({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"}}}),Li=g.span`
|
1145
1142
|
display: inline-block;
|
1146
1143
|
font-weight: ${It("fontWeights.semibold")};
|
1147
1144
|
color: ${It("colors.fg.onEmphasis")};
|
@@ -1152,16 +1149,16 @@ import e,{useState as t,useRef as r,useCallback as o,useEffect as a,useMemo as n
|
|
1152
1149
|
text-decoration: none;
|
1153
1150
|
}
|
1154
1151
|
|
1155
|
-
${
|
1152
|
+
${Ri}
|
1156
1153
|
${e=>e.dropshadow?"box-shadow: inset 0 -1px 0 rgba(27, 31, 35, 0.12)":""}
|
1157
|
-
${e=>e.outline?
|
1154
|
+
${e=>e.outline?Ni:""} // must be last to override other values
|
1158
1155
|
${Zt}
|
1159
|
-
`;
|
1156
|
+
`;Li.defaultProps={variant:"medium"};var Fi=Li;const Di=L({hoverColor:{property:"color",scale:"colors"}});var Mi=g.a`
|
1160
1157
|
color: ${e=>e.muted?It("colors.fg.muted")(e):It("colors.accent.fg")(e)};
|
1161
1158
|
text-decoration: ${e=>e.underline?"underline":"none"};
|
1162
1159
|
&:hover {
|
1163
1160
|
text-decoration: ${e=>e.muted?"none":"underline"};
|
1164
|
-
${e=>e.hoverColor?
|
1161
|
+
${e=>e.hoverColor?Di:e.muted?`color: ${It("colors.accent.fg")(e)}`:""};
|
1165
1162
|
}
|
1166
1163
|
&:is(button) {
|
1167
1164
|
display: inline-block;
|
@@ -1175,14 +1172,14 @@ import e,{useState as t,useRef as r,useCallback as o,useEffect as a,useMemo as n
|
|
1175
1172
|
appearance: none;
|
1176
1173
|
}
|
1177
1174
|
${Zt};
|
1178
|
-
`;var
|
1175
|
+
`;var Oi=g.div`
|
1179
1176
|
position: relative;
|
1180
1177
|
padding-top: ${It("space.4")};
|
1181
1178
|
padding-bottom: ${It("space.4")};
|
1182
1179
|
margin-bottom: ${It("space.4")};
|
1183
1180
|
border-bottom: 1px solid ${It("colors.border.default")};
|
1184
1181
|
${Zt};
|
1185
|
-
`;const
|
1182
|
+
`;const Pi=g.a`
|
1186
1183
|
display: inline-block;
|
1187
1184
|
min-width: 32px;
|
1188
1185
|
padding: 5px 10px;
|
@@ -1280,17 +1277,17 @@ import e,{useState as t,useRef as r,useCallback as o,useEffect as a,useMemo as n
|
|
1280
1277
|
);
|
1281
1278
|
}
|
1282
1279
|
}
|
1283
|
-
`;function
|
1280
|
+
`;function Hi({theme:t,pageCount:r,currentPage:o,onPageChange:a,hrefBuilder:n,marginPageCount:i,showPages:l,surroundingPageCount:d}){const s=e.useCallback((e=>t=>a(t,e)),[a]),c=e.useMemo((()=>function(e,t,r,o,a){const n=[];if(r){const r=[],i=t=>{t>=1&&t<=e&&r.push(t)};let l=t-a,d=t+a;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<=o;t++){const r=t,o=e-(t-1);r>=l?d++:i(r),o<=d?l--:i(o)}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],o=r===t;0===e?(1!==r&&n.push({type:"BREAK",num:1}),n.push({type:"NUM",num:r,selected:o})):(1==r-s[e-1]||n.push({type:"BREAK",num:r-1}),n.push({type:"NUM",num:r,selected:o}))}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]}(r,o,!!l,i,d)),[r,o,l,i,d]);return e.useMemo((()=>c.map((r=>{const{props:o,key:a,content:i}=function(e,t,r){const o={};let a="",n="";switch(e.type){case"PREV":n="page-prev",a="Previous",e.disabled?Object.assign(o,{as:"span","aria-disabled":"true"}):Object.assign(o,{rel:"prev",href:t(e.num),"aria-label":"Previous Page",onClick:r});break;case"NEXT":n="page-next",a="Next",e.disabled?Object.assign(o,{as:"span","aria-disabled":"true"}):Object.assign(o,{rel:"next",href:t(e.num),"aria-label":"Next Page",onClick:r});break;case"NUM":n=`page-${e.num}`,a=String(e.num),e.selected?Object.assign(o,{as:"em","aria-current":"page"}):Object.assign(o,{href:t(e.num),"aria-label":`Page ${e.num}`,onClick:r});break;case"BREAK":n=`page-${e.num}-break`,a="…",Object.assign(o,{as:"span","aria-disabled":!0})}return{props:o,key:n,content:a}}(r,n,s(r.num));return e.createElement(Pi,Rt({},o,{key:a,theme:t}),i)}))),[c,n,s,t])}const Wi=g.nav`
|
1284
1281
|
margin-top: 20px;
|
1285
1282
|
margin-bottom: 15px;
|
1286
1283
|
text-align: center;
|
1287
1284
|
${Zt};
|
1288
|
-
`;function
|
1285
|
+
`;function _i({theme:t,pageCount:r,currentPage:o,onPageChange:a=Ui,hrefBuilder:n=ji,marginPageCount:i=1,showPages:l=!0,surroundingPageCount:d=2,...s}){const c=Hi({theme:t,pageCount:r,currentPage:o,onPageChange:a,hrefBuilder:n,marginPageCount:i,showPages:l,surroundingPageCount:d});return e.createElement(Wi,Rt({"aria-label":"Pagination"},s,{theme:t}),e.createElement(Qt,{display:"inline-block",theme:t},c))}function ji(e){return`#${e}`}function Ui(){}function Ki(t){const{bg:r,border:o,borderColor:a,theme:n}=t,{caret:i,children:l,...d}=t,s={bg:r,borderColor:a,borderWidth:o,location:i,theme:n};return e.createElement(tr,Rt({sx:{position:"relative"}},d),l,e.createElement(Hn,s))}_i.displayName="Pagination",_i.defaultProps={hrefBuilder:ji,marginPageCount:1,onPageChange:Ui,showPages:!0,surroundingPageCount:2},Ki.displayName="PointerBox";const Vi=g.div.attrs((({className:e,caret:t})=>({className:Ya(e,`caret-pos--${t}`)})))`
|
1289
1286
|
position: ${e=>e.relative?"relative":"absolute"};
|
1290
1287
|
z-index: 100;
|
1291
1288
|
display: ${e=>e.open?"block":"none"};
|
1292
1289
|
${Zt};
|
1293
|
-
`,
|
1290
|
+
`,Gi=g.div`
|
1294
1291
|
border: 1px solid ${It("colors.border.default")};
|
1295
1292
|
border-radius: ${It("radii.2")};
|
1296
1293
|
position: relative;
|
@@ -1324,9 +1321,9 @@ import e,{useState as t,useRef as r,useCallback as o,useEffect as a,useMemo as n
|
|
1324
1321
|
}
|
1325
1322
|
|
1326
1323
|
// Bottom-oriented carets
|
1327
|
-
${
|
1328
|
-
${
|
1329
|
-
${
|
1324
|
+
${Vi}.caret-pos--bottom & ,
|
1325
|
+
${Vi}.caret-pos--bottom-right & ,
|
1326
|
+
${Vi}.caret-pos--bottom-left & {
|
1330
1327
|
&::before,
|
1331
1328
|
&::after {
|
1332
1329
|
top: auto;
|
@@ -1346,8 +1343,8 @@ import e,{useState as t,useRef as r,useCallback as o,useEffect as a,useMemo as n
|
|
1346
1343
|
}
|
1347
1344
|
|
1348
1345
|
// Top & Bottom: Right-oriented carets
|
1349
|
-
${
|
1350
|
-
${
|
1346
|
+
${Vi}.caret-pos--top-right & ,
|
1347
|
+
${Vi}.caret-pos--bottom-right & {
|
1351
1348
|
right: -9px;
|
1352
1349
|
margin-right: 0;
|
1353
1350
|
|
@@ -1367,8 +1364,8 @@ import e,{useState as t,useRef as r,useCallback as o,useEffect as a,useMemo as n
|
|
1367
1364
|
}
|
1368
1365
|
|
1369
1366
|
// Top & Bottom: Left-oriented carets
|
1370
|
-
${
|
1371
|
-
${
|
1367
|
+
${Vi}.caret-pos--top-left & ,
|
1368
|
+
${Vi}.caret-pos--bottom-left & {
|
1372
1369
|
left: -9px;
|
1373
1370
|
margin-left: 0;
|
1374
1371
|
|
@@ -1384,12 +1381,12 @@ import e,{useState as t,useRef as r,useCallback as o,useEffect as a,useMemo as n
|
|
1384
1381
|
}
|
1385
1382
|
|
1386
1383
|
// Right- & Left-oriented carets
|
1387
|
-
${
|
1388
|
-
${
|
1389
|
-
${
|
1390
|
-
${
|
1391
|
-
${
|
1392
|
-
${
|
1384
|
+
${Vi}.caret-pos--right & ,
|
1385
|
+
${Vi}.caret-pos--right-top & ,
|
1386
|
+
${Vi}.caret-pos--right-bottom & ,
|
1387
|
+
${Vi}.caret-pos--left & ,
|
1388
|
+
${Vi}.caret-pos--left-top & ,
|
1389
|
+
${Vi}.caret-pos--left-bottom & {
|
1393
1390
|
&::before,
|
1394
1391
|
&::after {
|
1395
1392
|
top: 50%;
|
@@ -1409,9 +1406,9 @@ import e,{useState as t,useRef as r,useCallback as o,useEffect as a,useMemo as n
|
|
1409
1406
|
}
|
1410
1407
|
|
1411
1408
|
// Right-oriented carets
|
1412
|
-
${
|
1413
|
-
${
|
1414
|
-
${
|
1409
|
+
${Vi}.caret-pos--right & ,
|
1410
|
+
${Vi}.caret-pos--right-top & ,
|
1411
|
+
${Vi}.caret-pos--right-bottom & {
|
1415
1412
|
&::before {
|
1416
1413
|
right: -${It("space.3")};
|
1417
1414
|
border-left-color: ${It("colors.border.default")};
|
@@ -1425,9 +1422,9 @@ import e,{useState as t,useRef as r,useCallback as o,useEffect as a,useMemo as n
|
|
1425
1422
|
}
|
1426
1423
|
|
1427
1424
|
// Left-oriented carets
|
1428
|
-
${
|
1429
|
-
${
|
1430
|
-
${
|
1425
|
+
${Vi}.caret-pos--left & ,
|
1426
|
+
${Vi}.caret-pos--left-top & ,
|
1427
|
+
${Vi}.caret-pos--left-bottom & {
|
1431
1428
|
&::before {
|
1432
1429
|
left: -${It("space.3")};
|
1433
1430
|
border-right-color: ${It("colors.border.default")};
|
@@ -1441,8 +1438,8 @@ import e,{useState as t,useRef as r,useCallback as o,useEffect as a,useMemo as n
|
|
1441
1438
|
}
|
1442
1439
|
|
1443
1440
|
// Right & Left: Top-oriented carets
|
1444
|
-
${
|
1445
|
-
${
|
1441
|
+
${Vi}.caret-pos--right-top & ,
|
1442
|
+
${Vi}.caret-pos--left-top & {
|
1446
1443
|
&::before,
|
1447
1444
|
&::after {
|
1448
1445
|
top: ${It("space.4")};
|
@@ -1450,8 +1447,8 @@ import e,{useState as t,useRef as r,useCallback as o,useEffect as a,useMemo as n
|
|
1450
1447
|
}
|
1451
1448
|
|
1452
1449
|
// Right & Left: Bottom-oriented carets
|
1453
|
-
${
|
1454
|
-
${
|
1450
|
+
${Vi}.caret-pos--right-bottom & ,
|
1451
|
+
${Vi}.caret-pos--left-bottom & {
|
1455
1452
|
&::before,
|
1456
1453
|
&::after {
|
1457
1454
|
top: auto;
|
@@ -1467,22 +1464,23 @@ import e,{useState as t,useRef as r,useCallback as o,useEffect as a,useMemo as n
|
|
1467
1464
|
}
|
1468
1465
|
|
1469
1466
|
${Zt};
|
1470
|
-
`;
|
1467
|
+
`;Vi.defaultProps={caret:"top"},Gi.displayName="Popover.Content";var qi=Object.assign(Vi,{Content:Gi});const Xi=g.span`
|
1471
1468
|
width: ${e=>e.progress?`${e.progress}%`:0};
|
1472
|
-
|
1473
|
-
|
1469
|
+
|
1470
|
+
${Zt};
|
1471
|
+
`,Yi={small:"5px",large:"10px",default:"8px"},Ji=g.span`
|
1474
1472
|
display: ${e=>e.inline?"inline-flex":"flex"};
|
1475
1473
|
overflow: hidden;
|
1476
1474
|
background-color: ${It("colors.border.default")};
|
1477
1475
|
border-radius: ${It("radii.1")};
|
1478
|
-
height: ${e=>
|
1479
|
-
|
1476
|
+
height: ${e=>Yi[e.barSize||"default"]};
|
1477
|
+
|
1480
1478
|
${me}
|
1481
1479
|
${Zt};
|
1482
|
-
`;function
|
1483
|
-
${
|
1480
|
+
`;function Zi({progress:t,bg:r,...o}){return e.createElement(Ji,o,e.createElement(Xi,{progress:t,sx:{bg:r}}))}function Qi(e,t,r){const n=o((o=>{const a=()=>{r(!0)},n=t=>{const r=Array.from(e.current.querySelectorAll('[role^="menuitem"]:not([hidden]):not([disabled]):not([aria-disabled="true"])')),o=document.activeElement,a=r.indexOf(o),n=t?r[a+1]:r[a-1],i=t?r[0]:r[r.length-1];return n||i};if(!(o instanceof KeyboardEvent))return;const i=o.target instanceof Element&&"SUMMARY"===o.target.tagName;switch(o.key){case"Escape":t&&((()=>{r(!1);const t=e.current.querySelector("summary");t&&t.focus()})(),o.preventDefault(),o.stopPropagation());break;case"ArrowDown":{i&&!t&&a();const e=n(!0);e&&e.focus(),o.preventDefault()}break;case"ArrowUp":{i&&!t&&a();const e=n(!1);e&&e.focus(),o.preventDefault()}break;case" ":case"Enter":{const t=document.activeElement;t&&(e=>{const t=e.getAttribute("role");return"menuitem"===t||"menuitemcheckbox"===t||"menuitemradio"===t})(t)&&t.closest("details")===e&&(o.preventDefault(),o.stopPropagation(),t.click())}}}),[e,t,r]);a((()=>{const t=e.current;if(t)return t.addEventListener("keydown",n),()=>{t.removeEventListener("keydown",n)}}),[e,n])}Zi.displayName="ProgressBar",Zi.defaultProps={bg:"success.emphasis",barSize:"default"};const el=s({}),tl=p(["padding:"," ",";margin:0;font-size:",";font-weight:",";color:",";background-color:",";border-bottom:"," solid ",";"],It("space.1"),It("space.3"),It("fontSizes.0"),It("fontWeights.bold"),It("colors.fg.muted"),It("colors.canvas.subtle"),It("borderWidths.1"),It("colors.border.muted")),rl=g.div`
|
1481
|
+
${tl}
|
1484
1482
|
${Zt};
|
1485
|
-
`;
|
1483
|
+
`;rl.displayName="SelectMenu.Divider";var ol=rl;const al=g.form`
|
1486
1484
|
padding: ${It("space.3")};
|
1487
1485
|
margin: 0;
|
1488
1486
|
border-bottom: ${It("borderWidths.1")} solid ${It("colors.border.muted")};
|
@@ -1493,10 +1491,10 @@ import e,{useState as t,useRef as r,useCallback as o,useEffect as a,useMemo as n
|
|
1493
1491
|
}
|
1494
1492
|
|
1495
1493
|
${Zt};
|
1496
|
-
`,
|
1497
|
-
${
|
1494
|
+
`,nl=i((({theme:t,value:o,sx:n,...i},l)=>{const s=r(null),c=null!=l?l:s,{open:g}=d(el);return a((()=>{var e;g&&(null===(e=s.current)||void 0===e||e.focus())}),[g]),e.createElement(al,{theme:t,sx:n},e.createElement(tn,Rt({theme:t,ref:c,width:"100%",block:!0,value:o,contrast:!0},i)))}));nl.displayName="SelectMenu.Filter";var il=nl;const ll=p(["margin-top:-1px;padding:"," ",";font-size:",";color:",";text-align:center;border-top:"," solid ",";@media (min-width:","){padding:"," ",";}"],It("space.2"),It("space.3"),It("fontSizes.0"),It("colors.fg.muted"),It("borderWidths.1"),It("colors.border.muted"),It("breakpoints.0"),It("space.1"),It("space.2")),dl=g.footer`
|
1495
|
+
${ll}
|
1498
1496
|
${Zt};
|
1499
|
-
`;
|
1497
|
+
`;dl.displayName="SelectMenu.Footer";var sl=dl;const cl=g.h3`
|
1500
1498
|
color: ${It("colors.fg.default")};
|
1501
1499
|
flex: auto;
|
1502
1500
|
font-size: ${It("fontSizes.1")};
|
@@ -1506,7 +1504,7 @@ import e,{useState as t,useRef as r,useCallback as o,useEffect as a,useMemo as n
|
|
1506
1504
|
@media (min-width: ${It("breakpoints.0")}) {
|
1507
1505
|
font-size: inherit;
|
1508
1506
|
}
|
1509
|
-
`,
|
1507
|
+
`,gl=g.header`
|
1510
1508
|
display: flex;
|
1511
1509
|
flex: none; // fixes header from getting squeezed in Safari iOS
|
1512
1510
|
padding: ${It("space.3")};
|
@@ -1518,13 +1516,13 @@ import e,{useState as t,useRef as r,useCallback as o,useEffect as a,useMemo as n
|
|
1518
1516
|
}
|
1519
1517
|
|
1520
1518
|
${Zt};
|
1521
|
-
`,
|
1522
|
-
${
|
1519
|
+
`,fl=({children:t,theme:r,...o})=>e.createElement(gl,Rt({theme:r},o),e.createElement(cl,{theme:r},t));fl.displayName="SelectMenuHeader",fl.displayName="SelectMenu.Header";var ul=fl;const pl=p(["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:",";}"],It("space.3"),It("colors.canvas.overlay"),It("borderWidths.1"),It("colors.border.muted"),It("colors.fg.muted"),It("fontSizes.0"),It("breakpoints.0"),It("space.2"),It("space.2"),It("space.3"),It("space.2"),It("colors.fg.default"),It("colors.neutral.subtle"),It("colors.canvas.subtle"),It("colors.selectMenu.tapHighlight")),bl=g.a.attrs((()=>({role:"menuitemcheckbox"})))`
|
1520
|
+
${pl}
|
1523
1521
|
${Zt};
|
1524
|
-
`,
|
1525
|
-
${
|
1522
|
+
`,hl=i((({children:t,selected:o,theme:a,onClick:n,...i},l)=>{const s=d(el),c=r(null),g=null!=l?l:c;return e.createElement(bl,Rt({ref:g},i,{theme:a,onClick:e=>{var t;(n&&n(e),e.defaultPrevented)||(null===(t=s.setOpen)||void 0===t||t.call(s,!1))},"aria-checked":o}),e.createElement(Ao,{theme:a,className:"SelectMenu-icon SelectMenu-selected-icon",icon:eo}),t)}));hl.defaultProps={selected:!1},hl.displayName="SelectMenu.Item";var ml=hl;const vl=p(["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:",";}}"],It("colors.canvas.overlay"),It("colors.selectMenu.tapFocusBg"),It("colors.fg.default"),It("colors.canvas.subtle"),It("colors.fg.default"),It("colors.canvas.subtle")),xl=g.div`
|
1523
|
+
${vl}
|
1526
1524
|
${Zt};
|
1527
|
-
`;
|
1525
|
+
`;xl.displayName="SelectMenu.List";var yl=xl;const wl={small:"16px",medium:"32px",large:"64px"};function Bl({size:t="medium",...r}){const o=wl[t];return e.createElement("svg",Rt({height:o,width:o,viewBox:"0 0 16 16",fill:"none"},r),e.createElement("circle",{cx:"8",cy:"8",r:"7",stroke:"currentColor",strokeOpacity:"0.25",strokeWidth:"2",vectorEffect:"non-scaling-stroke"}),e.createElement("path",{d:"M15 8a7.002 7.002 0 00-7-7",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",vectorEffect:"non-scaling-stroke"}))}Bl.displayName="Spinner";const kl=g(Bl)`
|
1528
1526
|
@keyframes rotate-keyframes {
|
1529
1527
|
100% {
|
1530
1528
|
transform: rotate(360deg);
|
@@ -1533,38 +1531,37 @@ import e,{useState as t,useRef as r,useCallback as o,useEffect as a,useMemo as n
|
|
1533
1531
|
|
1534
1532
|
animation: rotate-keyframes 1s linear infinite;
|
1535
1533
|
|
1536
|
-
${At}
|
1537
1534
|
${Zt}
|
1538
|
-
|
1535
|
+
`;kl.displayName="Spinner";var $l=kl;const Tl=g.div`
|
1539
1536
|
padding: ${It("space.6")} ${It("space.4")};
|
1540
1537
|
text-align: center;
|
1541
1538
|
background-color: ${It("colors.canvas.overlay")};
|
1542
1539
|
${Zt}
|
1543
|
-
`,
|
1544
|
-
${
|
1540
|
+
`,Sl=t=>e.createElement(Tl,t,e.createElement($l,null));Sl.displayName="SelectMenuLoadingAnimation";var El=Sl;const Cl=h(["0%{opacity:0;transform:scale(0.9);}"]),zl=p(["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":""),It("colors.canvas.overlay"),It("radii.2"),It("shadows.shadow.small"),Cl,It("breakpoints.0"),It("space.1"),It("space.3"),It("fontSizes.0"),It("borderWidths.1"),It("colors.border.default"),It("radii.2"),It("shadows.shadow.small")),Il=p(["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;}"],It("space.3"),It("colors.primer.canvas.backdrop"),It("breakpoints.0"),It("breakpoints.0"),(e=>"right"===e.align?"0":"auto")),Al=g.div`
|
1541
|
+
${zl}
|
1545
1542
|
${me}
|
1546
|
-
`,
|
1547
|
-
${
|
1543
|
+
`,Nl=g.div`
|
1544
|
+
${Il}
|
1548
1545
|
${Zt};
|
1549
|
-
`,
|
1550
|
-
${
|
1546
|
+
`,Rl=e.forwardRef((({children:t,theme:r,width:o,...a},n)=>e.createElement(Nl,Rt({theme:r},a,{role:"menu",ref:n}),e.createElement(Al,{theme:r,width:o},t))));Rl.defaultProps={align:"left",width:"300px"},Rl.displayName="SelectMenu.Modal";var Ll=Rl;const Fl=p(["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:",";}"],It("space.2"),It("space.3"),It("fontSizes.0"),It("colors.fg.muted"),It("colors.border.muted"),It("breakpoints.0"),It("space.1"),It("space.3"),It("borderWidths.1"),It("radii.2"),It("radii.2"),It("colors.text-primary"),It("colors.canvas.overlay"),It("colors.border.muted"),It("breakpoints.0"),It("colors.border.muted"),It("colors.neutral.subtle")),Dl=g.button`
|
1547
|
+
${Fl}
|
1551
1548
|
${Zt};
|
1552
|
-
`,
|
1549
|
+
`,Ml=({tabName:t="",index:r,className:o,onClick:n,...i})=>{const l=d(el);a((()=>{var e;l.selectedTab||0!==r||(null===(e=l.setSelectedTab)||void 0===e||e.call(l,t))}),[r,l,t]);const s=l.selectedTab===t;return e.createElement(Dl,Rt({role:"tab",className:Ya("SelectMenuTab",o),"aria-selected":s,onClick:e=>{var r;(n&&n(e),e.defaultPrevented)||(null===(r=l.setSelectedTab)||void 0===r||r.call(l,t))}},i),t)};Ml.displayName="SelectMenuTab",Ml.displayName="SelectMenu.Tab";var Ol=Ml;const Pl=g.div`
|
1553
1550
|
border-top: ${It("borderWidths.1")} solid ${It("colors.border.muted")};
|
1554
1551
|
${Zt};
|
1555
|
-
`,
|
1556
|
-
${
|
1552
|
+
`,Hl=({tabName:t,className:r,children:o,...a})=>{const n=d(el);return e.createElement(Pl,Rt({role:"tabpanel",className:r,hidden:n.selectedTab!==t},a),e.createElement(yl,null,o))};Hl.displayName="TabPanel",Hl.displayName="SelectMenu.TabPanel";var Wl=Hl;const _l=p(["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:",";}"],It("breakpoints.0"),It("space.2"),It("space.3")),jl=g.div`
|
1553
|
+
${_l}
|
1557
1554
|
${Zt};
|
1558
|
-
`,
|
1555
|
+
`,Ul=({children:t,...r})=>e.createElement(jl,Rt({role:"tablist"},r),t);Ul.displayName="SelectMenuTabs",Ul.displayName="SelectMenu.Tabs";var Kl=Ul;const Vl=g.details`
|
1559
1556
|
${"\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"}
|
1560
1557
|
${Zt};
|
1561
|
-
`,
|
1558
|
+
`,Gl=e.forwardRef((({children:n,initialTab:i="",as:l,...d},s)=>{const c=r(null),g=null!=s?s:c,[f,u]=t(i),[p,b]=t(!1),h={selectedTab:f,setSelectedTab:u,setOpen:b,open:p,initialTab:i},m=o((e=>{"current"in g&&g.current&&!g.current.contains(e.target)&&(e.defaultPrevented||b(!1))}),[g,b]);return a((()=>{if(p)return document.addEventListener("click",m),()=>{document.removeEventListener("click",m)}}),[p,m]),Qi(g,p,b),e.createElement(el.Provider,{value:h},e.createElement(Vl,Rt({ref:g},d,{open:p,onToggle:function(e){b(e.target.open)}}),n))}));Gl.displayName="SelectMenu";var ql=Object.assign(Gl,{MenuContext:el,List:yl,Divider:ol,Filter:il,Footer:sl,Item:ml,Modal:Ll,Tabs:Kl,Tab:Ol,TabPanel:Wl,Header:ul,LoadingAnimation:El});function Xl({variant:t,className:r,bordered:o,children:a,"aria-label":n}){const i=Ya(r,`variant-${"lightweight"===t?"lightweight":"normal"}`);return e.createElement(Qt,{borderWidth:o?"1px":0,borderStyle:"solid",borderColor:"border.default",borderRadius:2,as:"nav",className:i,"aria-label":n},a)}Xl.displayName="SideNavBase";const Yl=g(Xl)`
|
1562
1559
|
background-color: ${It("colors.canvas.subtle")};
|
1563
1560
|
|
1564
1561
|
${e=>e.bordered&&p(["& > &{border-left:0;border-right:0;border-bottom:0;}"])}
|
1565
1562
|
|
1566
1563
|
${Zt};
|
1567
|
-
`,
|
1564
|
+
`,Jl=p(["background-color:",";outline:none;text-decoration:none;"],It("colors.neutral.subtle")),Zl=p(["color:",";text-decoration:none;outline:none;"],It("colors.fg.default")),Ql=g(Mi).attrs((e=>"string"==typeof e.to||e.selected?{"aria-current":"page"}:{}))`
|
1568
1565
|
position: relative;
|
1569
1566
|
display: block;
|
1570
1567
|
${e=>"full"===e.variant&&p(["display:flex;align-items:center;justify-content:space-between;"])}
|
@@ -1572,11 +1569,11 @@ import e,{useState as t,useRef as r,useCallback as o,useEffect as a,useMemo as n
|
|
1572
1569
|
text-align: left;
|
1573
1570
|
font-size: ${It("fontSizes.1")};
|
1574
1571
|
|
1575
|
-
& > ${
|
1572
|
+
& > ${Yl} {
|
1576
1573
|
border-bottom: none;
|
1577
1574
|
}
|
1578
1575
|
|
1579
|
-
${
|
1576
|
+
${Yl}.variant-normal > & {
|
1580
1577
|
color: ${It("colors.fg.default")};
|
1581
1578
|
padding: ${It("space.3")};
|
1582
1579
|
border: 0;
|
@@ -1606,11 +1603,11 @@ import e,{useState as t,useRef as r,useCallback as o,useEffect as a,useMemo as n
|
|
1606
1603
|
}
|
1607
1604
|
|
1608
1605
|
&:hover {
|
1609
|
-
${
|
1606
|
+
${Jl}
|
1610
1607
|
}
|
1611
1608
|
|
1612
1609
|
&:focus {
|
1613
|
-
${
|
1610
|
+
${Jl}
|
1614
1611
|
box-shadow: ${It("shadows.primer.shadow.focus")};
|
1615
1612
|
z-index: 1;
|
1616
1613
|
}
|
@@ -1626,16 +1623,16 @@ import e,{useState as t,useRef as r,useCallback as o,useEffect as a,useMemo as n
|
|
1626
1623
|
}
|
1627
1624
|
}
|
1628
1625
|
|
1629
|
-
${
|
1626
|
+
${Yl}.variant-lightweight > & {
|
1630
1627
|
padding: ${It("space.1")} 0;
|
1631
1628
|
color: ${It("colors.accent.fg")};
|
1632
1629
|
|
1633
1630
|
&:hover {
|
1634
|
-
${
|
1631
|
+
${Zl}
|
1635
1632
|
}
|
1636
1633
|
|
1637
1634
|
&:focus {
|
1638
|
-
${
|
1635
|
+
${Zl}
|
1639
1636
|
box-shadow: ${It("shadows.primer.shadow.focus")};
|
1640
1637
|
z-index: 1;
|
1641
1638
|
}
|
@@ -1648,7 +1645,7 @@ import e,{useState as t,useRef as r,useCallback as o,useEffect as a,useMemo as n
|
|
1648
1645
|
}
|
1649
1646
|
|
1650
1647
|
${Zt};
|
1651
|
-
`;
|
1648
|
+
`;Yl.defaultProps={variant:"normal"},Ql.defaultProps={variant:"normal"},Ql.displayName="SideNav.Link";var ed=Object.assign(Yl,{Link:Ql});const td={issueOpened:no,pullOpened:ro,issueClosed:oo,pullClosed:ro,pullMerged:to,draft:ro,issueDraft:ao},rd=ue({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"},issueDraft:{backgroundColor:"neutral.emphasis",color:"fg.onEmphasis"}}}),od=ue({prop:"variant",variants:{small:{paddingX:2,paddingY:1,fontSize:0},normal:{paddingX:"12px",paddingY:2,fontSize:1}}}),ad=g.span`
|
1652
1649
|
display: inline-flex;
|
1653
1650
|
align-items: center;
|
1654
1651
|
font-weight: ${It("fontWeights.bold")};
|
@@ -1656,10 +1653,10 @@ import e,{useState as t,useRef as r,useCallback as o,useEffect as a,useMemo as n
|
|
1656
1653
|
color: ${It("colors.canvas.default")};
|
1657
1654
|
text-align: center;
|
1658
1655
|
border-radius: ${It("radii.3")};
|
1656
|
+
${rd};
|
1659
1657
|
${od};
|
1660
|
-
${ad};
|
1661
1658
|
${Zt};
|
1662
|
-
`;function
|
1659
|
+
`;function nd({children:t,status:r,variant:o,...a}){const n="small"===o?{width:"1em"}:{};return e.createElement(ad,Rt({},a,{variant:o,status:r}),r&&e.createElement(Ao,Rt({},n,{icon:td[r]||lo,sx:{mr:1}})),t)}nd.displayName="StateLabel",nd.defaultProps={variant:"normal"};const id=g.nav`
|
1663
1660
|
display: flex;
|
1664
1661
|
justify-content: space-between;
|
1665
1662
|
|
@@ -1681,10 +1678,10 @@ import e,{useState as t,useRef as r,useCallback as o,useEffect as a,useMemo as n
|
|
1681
1678
|
}
|
1682
1679
|
|
1683
1680
|
${Zt};
|
1684
|
-
`;function
|
1681
|
+
`;function ld({actions:t,className:r,children:o,label:a,...n}){const i=Ya(r,"SubNav");return e.createElement(id,Rt({className:i,"aria-label":a},n),e.createElement("div",{className:"SubNav-body"},o),t&&e.createElement("div",{className:"SubNav-actions"},t))}ld.displayName="SubNav";const dd=g.div`
|
1685
1682
|
display: flex;
|
1686
1683
|
${Zt};
|
1687
|
-
`,
|
1684
|
+
`,sd=g.a.attrs((e=>({activeClassName:"string"==typeof e.to?"selected":"",className:Ya("SubNav-item",e.selected&&"selected",e.className)})))`
|
1688
1685
|
padding-left: ${It("space.3")};
|
1689
1686
|
padding-right: ${It("space.3")};
|
1690
1687
|
font-weight: ${It("fontWeights.semibold")};
|
@@ -1732,15 +1729,15 @@ import e,{useState as t,useRef as r,useCallback as o,useEffect as a,useMemo as n
|
|
1732
1729
|
}
|
1733
1730
|
|
1734
1731
|
${Zt};
|
1735
|
-
`;
|
1732
|
+
`;sd.displayName="SubNav.Link",dd.displayName="SubNav.Links";var cd=Object.assign(ld,{Link:sd,Links:dd});const gd=g.div`
|
1736
1733
|
margin-top: 0;
|
1737
1734
|
border-bottom: 1px solid ${It("colors.border.default")};
|
1738
1735
|
${Zt}
|
1739
|
-
`,
|
1736
|
+
`,fd=g.nav`
|
1740
1737
|
display: flex;
|
1741
1738
|
margin-bottom: -1px;
|
1742
1739
|
overflow: auto;
|
1743
|
-
`;function
|
1740
|
+
`;function ud({children:t,"aria-label":r,...o}){return e.createElement(gd,o,e.createElement(fd,{"aria-label":r},t))}ud.displayName="TabNav";const pd=g.a.attrs((e=>({activeClassName:"string"==typeof e.to?"selected":"",className:Ya("TabNav-item",e.selected&&"selected",e.className)})))`
|
1744
1741
|
padding: 8px 12px;
|
1745
1742
|
font-size: ${It("fontSizes.1")};
|
1746
1743
|
line-height: 20px;
|
@@ -1765,18 +1762,18 @@ import e,{useState as t,useRef as r,useCallback as o,useEffect as a,useMemo as n
|
|
1765
1762
|
}
|
1766
1763
|
|
1767
1764
|
${Zt};
|
1768
|
-
`;
|
1765
|
+
`;pd.displayName="TabNav.Link";var bd=Object.assign(ud,{Link:pd}),hd=F(te,P,O,D,H,U,V,q,_,re,pe,be,he),md=new RegExp("^("+hd.propNames.join("|")+")$");const vd={small:"16px",medium:"20px",large:"24px",extralarge:"32px"},xd=({as:e="span",onClick:t,onFocus:r,tabIndex:o=-1})=>Boolean(r||t||o>-1||["a","button"].includes(e)),yd=ue({prop:"size",variants:{small:{fontSize:0,height:vd.small,lineHeight:vd.small,paddingLeft:1,paddingRight:1,paddingTop:0,paddingBottom:0},medium:{fontSize:0,height:vd.medium,lineHeight:vd.medium,paddingLeft:2,paddingRight:2,paddingTop:0,paddingBottom:0},large:{fontSize:0,height:vd.large,lineHeight:vd.large,paddingLeft:2,paddingRight:2,paddingTop:0,paddingBottom:0},extralarge:{fontSize:1,height:vd.extralarge,lineHeight:vd.extralarge,paddingLeft:3,paddingRight:3,paddingTop:0,paddingBottom:0}}}),wd=g.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})))`
|
1769
1766
|
align-items: center;
|
1770
1767
|
border-radius: 999px;
|
1771
|
-
cursor: ${e=>
|
1768
|
+
cursor: ${e=>xd(e)?"pointer":"auto"};
|
1772
1769
|
display: inline-flex;
|
1773
1770
|
font-weight: ${It("fontWeights.bold")};
|
1774
1771
|
font-family: inherit;
|
1775
1772
|
text-decoration: none;
|
1776
1773
|
white-space: nowrap;
|
1777
|
-
${
|
1774
|
+
${yd}
|
1778
1775
|
${Zt}
|
1779
|
-
`;
|
1776
|
+
`;wd.defaultProps={as:"span",size:"medium"};var Bd=wd;const kd=ue({prop:"size",variants:{small:{height:vd.small,width:vd.small},medium:{height:vd.medium,width:vd.medium},large:{height:vd.large,width:vd.large},extralarge:{height:vd.extralarge,width:vd.extralarge}}}),$d=e=>.75*parseInt(vd[e||"medium"],10),Td=g.span`
|
1780
1777
|
background-color: transparent;
|
1781
1778
|
font-family: inherit;
|
1782
1779
|
color: currentColor;
|
@@ -1806,9 +1803,9 @@ import e,{useState as t,useRef as r,useCallback as o,useEffect as a,useMemo as n
|
|
1806
1803
|
background-color: ${It("colors.neutral.subtle")};
|
1807
1804
|
}
|
1808
1805
|
|
1809
|
-
${
|
1806
|
+
${kd}
|
1810
1807
|
${Zt}
|
1811
|
-
`,
|
1808
|
+
`,Sd=({"aria-label":t,isParentInteractive:r,size:o,...a})=>(delete a.children,e.createElement(Td,Rt({as:r?"span":"button",tabIndex:r?-1:void 0,"aria-label":r?t:"Remove token",size:o},a),e.createElement(co,{size:$d(o)})));Sd.displayName="RemoveTokenButton",Sd.defaultProps={size:"medium"};var Ed=Sd;var Cd=g("span")`
|
1812
1809
|
flex-grow: 1;
|
1813
1810
|
min-width: 0;
|
1814
1811
|
overflow: hidden;
|
@@ -1849,7 +1846,7 @@ import e,{useState as t,useRef as r,useCallback as o,useEffect as a,useMemo as n
|
|
1849
1846
|
bottom: 0;
|
1850
1847
|
}
|
1851
1848
|
}
|
1852
|
-
`;const
|
1849
|
+
`;const zd=g(Bd)`
|
1853
1850
|
background-color: ${It("colors.neutral.subtle")};
|
1854
1851
|
border-color: ${e=>e.isSelected?It("colors.fg.default"):It("colors.border.subtle")};
|
1855
1852
|
border-style: solid;
|
@@ -1861,18 +1858,18 @@ import e,{useState as t,useRef as r,useCallback as o,useEffect as a,useMemo as n
|
|
1861
1858
|
${Zt}
|
1862
1859
|
|
1863
1860
|
${e=>{if(e.isTokenInteractive)return p(["&:hover{background-color:",";box-shadow:",";color:",";}"],It("colors.neutral.muted"),It("colors.shadow.medium"),It("colors.fg.default"))}}
|
1864
|
-
`,
|
1861
|
+
`,Id=g("span")`
|
1865
1862
|
flex-shrink: 0;
|
1866
1863
|
line-height: 0;
|
1867
1864
|
|
1868
1865
|
${e=>{switch(e.size){case"large":case"extralarge":return p(["margin-right:",";"],It("space.2"));default:return p(["margin-right:",";"],It("space.1"))}}}
|
1869
|
-
`,
|
1866
|
+
`,Ad=i(((t,r)=>{const{as:o,onRemove:a,id:n,leadingVisual:i,text:l,size:d,hideRemoveButton:s,href:c,onClick:g,...f}=t,u=xd(t)&&Boolean(a)&&!s,p={as:o,href:c,onClick:g};return e.createElement(zd,Rt({onRemove:a,hideRemoveButton:s||!a,id:null==n?void 0:n.toString(),text:l,size:d,isTokenInteractive:xd(t)},u?{}:p,f,{ref:r}),i?e.createElement(Id,{size:d},e.createElement(i,null)):null,e.createElement(Cd,u?p:{},l),!s&&a?e.createElement(Ed,{borderOffset:1,onClick:e=>{e.stopPropagation(),a&&a()},size:d,isParentInteractive:xd(t),"aria-hidden":u?"true":"false",sx:u?{position:"relative",zIndex:"1"}:{}}):null)}));Ad.displayName="Token",Ad.defaultProps={size:"medium"};var Nd=Ad;const Rd={small:0,medium:1,large:1,extralarge:2};function Ld({icon:o,contrast:a,className:n,block:i,disabled:l,theme:d,sx:s,tokens:c,onTokenRemove:g,tokenComponent:f,preventTokenWrapping:u,size:p,hideTokenRemoveButtons:b,maxHeight:h,width:m,minWidth:v,maxWidth:x,variant:y,visibleTokenCount:w,...B},k){const{onBlur:$,onFocus:T,onKeyDown:S,...E}=function(e){var t={};for(var r in e)md.test(r)||(t[r]=e[r]);return t}(B),C=Tr(k),z=Do(r(null),C),[I,A]=t(),[N,R]=t(Boolean(w)),{containerRef:L}=No({focusOutBehavior:"wrap",bindKeys:Nr.ArrowHorizontal|Nr.HomeAndEnd,focusableElementFilter:e=>!e.getAttributeNames().includes("aria-hidden"),getNextFocusable:e=>{var t;if(!I&&0!==I)return;let r=I+1;return"next"===e&&(r+=1),"previous"===e&&(r-=1),r>c.length||r<1?z.current||void 0:null===(t=L.current)||void 0===t?void 0:t.children[r]}},[I]),F=e=>{g(e),setTimeout((()=>{var e,t;const r=null===(e=L.current)||void 0===e?void 0:e.children[I||0],o=r&&xr(r)?r:Array.from((null===(t=L.current)||void 0===t?void 0:t.children)||[]).find((e=>xr(e)));var a;o?o.focus():null===(a=C.current)||void 0===a||a.focus()}),0)},D=()=>{A(void 0),setTimeout((()=>{var e;null!==(e=L.current)&&void 0!==e&&e.contains(document.activeElement)||!w||R(!0)}),0)},M=e=>{var t;"Escape"===e.key&&(null===(t=C.current)||void 0===t||t.focus())},O=e=>{e.stopPropagation()},P=N?c.slice(0,w):c;return e.createElement(Qa,{block:i,className:n,contrast:a,disabled:l,hasIcon:!!o,theme:d,width:m,minWidth:v,maxWidth:x,variant:y,onClick:()=>{var e;null===(e=z.current)||void 0===e||e.focus()},sx:{...i?{display:"flex",width:"100%"}:{},...h?{maxHeight:h,overflow:"auto"}:{},...u?{overflow:"auto"}:{},...s}},e.createElement(Qt,{ref:L,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"}}},e.createElement(Qt,{sx:{order:1,flexGrow:1}},o&&e.createElement(o,{className:"TextInput-icon"}),e.createElement(Ja,Rt({ref:z,disabled:l,onFocus:e=>{T&&T(e),A(void 0),w&&R(!1)},onBlur:e=>{$&&$(e),setTimeout((()=>{var e;null!==(e=L.current)&&void 0!==e&&e.contains(document.activeElement)||!w||R(!0)}),0)},onKeyDown:e=>{var t;if(S&&S(e),null!==(t=C.current)&&void 0!==t&&t.value)return;const r=c[c.length-1];"Backspace"===e.key&&r&&(F(r.id),C.current&&(C.current.value=`${r.text} `),setTimeout((()=>{var e;null===(e=C.current)||void 0===e||e.select()}),0))},type:"text",sx:{height:"100%"}},E))),f?P.map((({id:t,...r},o)=>{return e.createElement(f,Rt({key:t,onFocus:(a=o,()=>{A(a)}),onBlur:D,onKeyUp:M,onClick:O,isSelected:I===o,onRemove:()=>{F(t)},hideRemoveButton:b,size:p,tabIndex:0},r));var a})):null,N?e.createElement(Yn,{color:"fg.muted",fontSize:p&&Rd[p]},"+",c.length-P.length):null))}Ld.displayName="TextInputWithTokensInnerComponent";const Fd=e.forwardRef(Ld);Fd.defaultProps={tokenComponent:Nd,size:"extralarge",hideTokenRemoveButtons:!1,preventTokenWrapping:!1},Fd.displayName="TextInputWithTokens";var Dd=Fd;const Md=g.div`
|
1870
1867
|
display: flex;
|
1871
1868
|
flex-direction: column;
|
1872
1869
|
${e=>e.clipSidebar&&p([".Timeline-Item:first-child{padding-top:0;}.Timeline-Item:last-child{padding-bottom:0;}"])}
|
1873
1870
|
|
1874
1871
|
${Zt};
|
1875
|
-
`,
|
1872
|
+
`,Od=g.div.attrs((e=>({className:Ya("Timeline-Item",e.className)})))`
|
1876
1873
|
display: flex;
|
1877
1874
|
position: relative;
|
1878
1875
|
padding: ${It("space.3")} 0;
|
@@ -1892,7 +1889,7 @@ import e,{useState as t,useRef as r,useCallback as o,useEffect as a,useMemo as n
|
|
1892
1889
|
${e=>e.condensed&&p(["padding-top:",";padding-bottom:0;&:last-child{padding-bottom:",";}.TimelineItem-Badge{height:16px;margin-top:",";margin-bottom:",";color:",";background-color:",";border:0;}"],It("space.1"),It("space.3"),It("space.2"),It("space.2"),It("colors.fg.muted"),It("colors.canvas.default"))}
|
1893
1890
|
|
1894
1891
|
${Zt};
|
1895
|
-
`,
|
1892
|
+
`,Pd=t=>e.createElement(Qt,{position:"relative",zIndex:1},e.createElement(Qt,{display:"flex",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",sx:t.sx},t.children));Pd.displayName="TimelineBadge";const Hd=g.div`
|
1896
1893
|
min-width: 0;
|
1897
1894
|
max-width: 100%;
|
1898
1895
|
margin-top: ${It("space.1")};
|
@@ -1900,7 +1897,7 @@ import e,{useState as t,useRef as r,useCallback as o,useEffect as a,useMemo as n
|
|
1900
1897
|
flex: auto;
|
1901
1898
|
font-size: ${It("fontSizes.1")};
|
1902
1899
|
${Zt};
|
1903
|
-
`,
|
1900
|
+
`,Wd=g.div`
|
1904
1901
|
position: relative
|
1905
1902
|
z-index: 1;
|
1906
1903
|
height: 24px;
|
@@ -1911,15 +1908,15 @@ import e,{useState as t,useRef as r,useCallback as o,useEffect as a,useMemo as n
|
|
1911
1908
|
border: 0;
|
1912
1909
|
border-top: ${It("space.1")} solid ${It("colors.border.default")};
|
1913
1910
|
${Zt};
|
1914
|
-
`;
|
1911
|
+
`;Od.displayName="Timeline.Item",Pd.displayName="Timeline.Badge",Hd.displayName="Timeline.Body",Wd.displayName="Timeline.Break";var _d=Object.assign(Md,{Item:Od,Badge:Pd,Body:Hd,Break:Wd});function jd(e,t,r){return Math.min(Math.max(e,r),t)}class Ud extends Error{constructor(e){super(`Failed to parse color: "${e}"`)}}function Kd(e){if("string"!=typeof e)throw new Ud(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=Gd[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 Ud(e);return`#${r}`}(e):e;const r=Xd.exec(t);if(r){const e=Array.from(r).slice(1);return[...e.slice(0,3).map((e=>parseInt(qd(e,2),16))),parseInt(qd(e[3]||"f",2),16)/255]}const o=Yd.exec(t);if(o){const e=Array.from(o).slice(1);return[...e.slice(0,3).map((e=>parseInt(e,16))),parseInt(e[3]||"ff",16)/255]}const a=Jd.exec(t);if(a){const e=Array.from(a).slice(1);return[...e.slice(0,3).map((e=>parseInt(e,10))),parseFloat(e[3]||"1")]}const n=Zd.exec(t);if(n){const[t,r,o,a]=Array.from(n).slice(1).map(parseFloat);if(jd(0,100,r)!==r)throw new Ud(e);if(jd(0,100,o)!==o)throw new Ud(e);return[...ts(t,r,o),a||1]}throw new Ud(e)}const Vd=e=>parseInt(e.replace(/_/g,""),36),Gd="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=Vd(t.substring(0,3)),o=Vd(t.substring(3)).toString(16);let a="";for(let e=0;e<6-o.length;e++)a+="0";return e[r]=`${a}${o}`,e}),{}),qd=(e,t)=>Array.from(Array(t)).map((()=>e)).join(""),Xd=new RegExp(`^#${qd("([a-f0-9])",3)}([a-f0-9])?$`,"i"),Yd=new RegExp(`^#${qd("([a-f0-9]{2})",3)}([a-f0-9]{2})?$`,"i"),Jd=new RegExp(`^rgba?\\(\\s*(\\d+)\\s*${qd(",\\s*(\\d+)\\s*",2)}(?:,\\s*([\\d.]+))?\\s*\\)$`,"i"),Zd=/^hsla?\(\s*([\d.]+)\s*,\s*([\d.]+)%\s*,\s*([\d.]+)%(?:\s*,\s*([\d.]+))?\s*\)$/i,Qd=/^[a-z]+$/i,es=e=>Math.round(255*e),ts=(e,t,r)=>{let o=r/100;if(0===t)return[o,o,o].map(es);const a=(e%360+360)%360/60,n=(1-Math.abs(2*o-1))*(t/100),i=n*(1-Math.abs(a%2-1));let l=0,d=0,s=0;a>=0&&a<1?(l=n,d=i):a>=1&&a<2?(l=i,d=n):a>=2&&a<3?(d=n,s=i):a>=3&&a<4?(d=i,s=n):a>=4&&a<5?(l=i,s=n):a>=5&&a<6&&(l=n,s=i);const c=o-n/2;return[l+c,d+c,s+c].map(es)};const rs={"--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))"},os={"--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))"},as=i(((t,r)=>{const{as:o,fillColor:a="#999",onRemove:i,id:l,isSelected:d,text:s,size:c,hideRemoveButton:g,href:f,onClick:u,...p}=t,b={as:o,href:f,onClick:u},{colorScheme:h}=qt(),m=xd(t)&&Boolean(i)&&!g,v=n((()=>{const[e,t,r]=Kd(a),[o,n,l]=function(e){const[t,r,o,a]=Kd(e).map(((e,t)=>3===t?e:e/255)),n=Math.max(t,r,o),i=Math.min(t,r,o),l=(n+i)/2;if(n===i)return[0,0,l,a];const d=n-i;return[60*(t===n?(r-o)/d+(r<o?6:0):r===n?(o-t)/d+2:(t-r)/d+4),l>.5?d/(2-n-i):d/(n+i),l,a]}(a);return{"--label-r":String(e),"--label-g":String(t),"--label-b":String(r),"--label-h":String(Math.round(o)),"--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:g||!i?void 0:0,position:"relative",..."light"===h?rs:os,...d?{background:"light"===h?"hsl(var(--label-h), calc(var(--label-s) * 1%), calc((var(--label-l) - 5) * 1%))":os.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"===h?"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"}}:{}}}),[h,a,d,g,i]);return e.createElement(Bd,Rt({onRemove:i,id:null==l?void 0:l.toString(),isSelected:d,text:s,size:c,sx:v},m?{}:b,p,{ref:r}),e.createElement(Cd,m?b:{},s),!g&&i?e.createElement(Ed,{borderOffset:1,onClick:e=>{e.stopPropagation(),i&&i()},size:c,"aria-hidden":m?"true":"false",isParentInteractive:xd(t),sx:m?{position:"relative",zIndex:"1"}:{}}):null)}));as.defaultProps={fillColor:"#999",size:"medium"},as.displayName="IssueLabelToken";var ns=as;const is=g.span`
|
1915
1912
|
// 'space.1' is used because to match space from the left of the token to the left of the avatar
|
1916
1913
|
// '* 2' is done to account for the top and bottom
|
1917
1914
|
--spacing: calc(${It("space.1")} * 2);
|
1918
1915
|
|
1919
1916
|
display: block;
|
1920
|
-
height: ${e=>`calc(${
|
1921
|
-
width: ${e=>`calc(${
|
1922
|
-
`,
|
1917
|
+
height: ${e=>`calc(${vd[e.avatarSize]} - var(--spacing))`};
|
1918
|
+
width: ${e=>`calc(${vd[e.avatarSize]} - var(--spacing))`};
|
1919
|
+
`,ls=i((({avatarSrc:t,id:r,size:o,...a},n)=>e.createElement(Nd,Rt({leadingVisual:()=>e.createElement(is,{avatarSize:o||"medium"},e.createElement(un,{src:t,size:parseInt(vd[o||"medium"],10),sx:{width:"100%",height:"100%"}})),size:o,id:null==r?void 0:r.toString(),sx:{paddingLeft:It("space.1")}},a,{ref:n}))));ls.defaultProps={size:"medium"},ls.displayName="AvatarToken";var ds=ls;const ss=g.span`
|
1923
1920
|
position: relative;
|
1924
1921
|
|
1925
1922
|
&::before {
|
@@ -2145,7 +2142,7 @@ import e,{useState as t,useRef as r,useCallback as o,useEffect as a,useMemo as n
|
|
2145
2142
|
}
|
2146
2143
|
|
2147
2144
|
${Zt};
|
2148
|
-
`;function
|
2145
|
+
`;function cs({direction:t="n",children:r,className:o,text:a,noDelay:n,align:i,wrap:l,...d}){const s=Ya(o,`tooltipped-${t}`,i&&`tooltipped-align-${i}-2`,n&&"tooltipped-no-delay",l&&"tooltipped-multiline");return e.createElement(ss,Rt({role:"tooltip","aria-label":a},d,{className:s}),r)}cs.displayName="Tooltip",cs.alignments=["left","right"],cs.directions=["n","ne","e","se","s","sw","w","nw"];const gs=g.nav`
|
2149
2146
|
display: flex;
|
2150
2147
|
justify-content: space-between;
|
2151
2148
|
border-bottom: 1px solid ${It("colors.border.muted")};
|
@@ -2175,7 +2172,7 @@ import e,{useState as t,useRef as r,useCallback as o,useEffect as a,useMemo as n
|
|
2175
2172
|
}
|
2176
2173
|
|
2177
2174
|
${Zt};
|
2178
|
-
`;function
|
2175
|
+
`;function fs({actions:t,className:r,align:o,children:a,full:n,label:i,theme:l,...d}){const s=Ya(r,"UnderlineNav",o&&`UnderlineNav--${o}`,n&&"UnderlineNav--full");return e.createElement(gs,Rt({className:s,"aria-label":i,theme:l},d),e.createElement("div",{className:"UnderlineNav-body"},a),t&&e.createElement("div",{className:"UnderlineNav-actions"},t))}fs.displayName="UnderlineNav";const us=g.a.attrs((e=>({activeClassName:"string"==typeof e.to?"selected":"",className:Ya("UnderlineNav-item",e.selected&&"selected",e.className)})))`
|
2179
2176
|
padding: ${It("space.3")} ${It("space.2")};
|
2180
2177
|
margin-right: ${It("space.3")};
|
2181
2178
|
font-size: ${It("fontSizes.1")};
|
@@ -2207,11 +2204,11 @@ import e,{useState as t,useRef as r,useCallback as o,useEffect as a,useMemo as n
|
|
2207
2204
|
}
|
2208
2205
|
|
2209
2206
|
${Zt};
|
2210
|
-
`;
|
2207
|
+
`;us.displayName="UnderlineNav.Link";var ps=Object.assign(fs,{Link:us});const bs=g.input`
|
2211
2208
|
cursor: pointer;
|
2212
2209
|
|
2213
2210
|
${e=>e.disabled&&"cursor: not-allowed;"}
|
2214
2211
|
|
2215
2212
|
${Zt}
|
2216
|
-
`,
|
2213
|
+
`,hs=e.forwardRef((({checked:t,indeterminate:r,disabled:o,sx:a,required:n,validationStatus:i,...d},s)=>{const c=Tr(s);return l((()=>{c.current&&(c.current.indeterminate=r||!1)}),[r,t,c]),e.createElement(bs,Rt({type:"checkbox",disabled:o,"aria-disabled":o?"true":"false",ref:s||c,checked:!r&&t,"aria-checked":r?"mixed":t?"true":"false",sx:a,required:n,"aria-required":n?"true":"false","aria-invalid":"error"===i?"true":"false"},d))}));hs.displayName="Checkbox";var ms=hs;export{dr as Absolute,Da as ActionList,Va as ActionMenu,gn as Autocomplete,un as Avatar,hn as AvatarPair,xn as AvatarStack,ds as AvatarToken,Dt as BaseStyles,tr as BorderBox,Qt as Box,yn as BranchName,Sn as Breadcrumb,Tn as Breadcrumbs,jr as Button,fo as ButtonClose,Ur as ButtonDanger,Vr as ButtonGroup,Xr as ButtonInvisible,Gr as ButtonOutline,qr as ButtonPrimary,Yr as ButtonTableList,Hn as Caret,ms as Checkbox,Un as CircleBadge,Kn as CircleOcticon,fa as ConfirmationDialog,An as CounterLabel,Gn as Details,oi as Dialog,gi as Dropdown,fi as DropdownButton,ui as DropdownMenu,xi as FilterList,pi as FilteredSearch,sr as Fixed,Bi as Flash,or as Flex,Ti as FormGroup,nr as Grid,zi as Header,Ii as Heading,ns as IssueLabelToken,Fi as Label,Ai as LabelGroup,Mi as Link,Rn as NewButton,Wa as Overlay,Oi as Pagehead,_i as Pagination,Ki as PointerBox,qi as Popover,lr as Position,Zi as ProgressBar,cr as Relative,Po as SSRProvider,ql as SelectMenu,ed as SideNav,$l as Spinner,nd as StateLabel,gr as Sticky,Ao as StyledOcticon,cd as SubNav,bd as TabNav,Yn as Text,tn as TextInput,Dd as TextInputWithTokens,Jt as ThemeProvider,_d as Timeline,Nd as Token,cs as Tooltip,xa as Truncate,ps as UnderlineNav,x as theme,It as themeGet,Xt as useColorSchemeVar,ua as useConfirm,fr as useDetails,$r as useOnEscapePress,mr as useOnOutsideClick,wr as useOpenAndCloseFocus,Sr as useOverlay,Wo as useSSRSafeId,ur as useSafeTimeout,qt as useTheme};
|
2217
2214
|
//# sourceMappingURL=browser.esm.js.map
|