@patternfly/patternfly-doc-core 1.8.3 → 1.9.0
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/.github/workflows/add-new-issues-to-project.yml +38 -0
- package/cli/cli.ts +9 -1
- package/cli/convertToMDX.ts +32 -0
- package/dist/cli/cli.js +7 -0
- package/dist/cli/convertToMDX.js +20 -0
- package/dist/cli/tsconfig.tsbuildinfo +1 -1
- package/dist/client/_astro/Button.BQCwQ5pE.js +9 -0
- package/dist/client/_astro/CSSTable.DC79W1Ct.js +1 -0
- package/dist/client/_astro/{Content.Dv9vgAns.js → Content.B4M2qzJY.js} +1 -1
- package/dist/client/_astro/DropdownList.cxp03sS4.js +1 -0
- package/dist/client/_astro/LiveExample.CxJsMvEq.css +1 -0
- package/dist/client/_astro/LiveExample.DZkxbJA_.js +259 -0
- package/dist/client/_astro/Navigation.C0WYsqBi.js +1 -0
- package/dist/client/_astro/{PageContext.ipir86Hm.js → PageContext.miTsIqVo.js} +1 -1
- package/dist/client/_astro/PageSidebarBody.B0AJe8Hg.js +1 -0
- package/dist/client/_astro/PageToggle.CMZ3C1v1.js +1 -0
- package/dist/client/_astro/SearchInput.DhHo7yPx.js +1 -0
- package/dist/client/_astro/SectionGallery.3ABpQwE4.js +1 -0
- package/dist/client/_astro/Toolbar.Db10BzwI.js +1 -0
- package/dist/client/_astro/{ToolbarContent.Cd-kqxku.js → ToolbarContent.UH3ZRlHp.js} +1 -1
- package/dist/client/_astro/{angle-left-icon.C3MzYN3k.js → angle-left-icon.teo8GC0v.js} +1 -1
- package/dist/client/_astro/bars-icon.Dk6ua1rr.js +1 -0
- package/dist/client/_astro/{divider.O4WEhuBq.js → divider.tlrBPkzg.js} +1 -1
- package/dist/client/_astro/github-icon.ByC5XEPt.js +1 -0
- package/dist/client/_astro/{index.BkswdOFP.js → index.DYVB4vTo.js} +12 -12
- package/dist/client/_astro/{CSSTable.V4xaGXjj.js → link-icon.BNHnRn73.js} +30 -23
- package/dist/client/components/accordion/index.html +12 -12
- package/dist/client/components/accordion/react/index.html +12 -12
- package/dist/client/components/all-components/index.html +7 -7
- package/dist/client/design-foundations/typography/index.html +8 -8
- package/dist/client/design-foundations/usage-and-behavior/index.html +8 -8
- package/dist/client/get-started/contribute/index.html +8 -8
- package/dist/client/index.html +2 -2
- package/dist/server/entry.mjs +1 -1
- package/dist/server/{manifest_DQIsYSvX.mjs → manifest_B1s28mIS.mjs} +1 -1
- package/package.json +5 -1
- package/src/components/LiveExample.tsx +23 -4
- package/src/components/NavEntry.tsx +7 -9
- package/src/components/NavSection.tsx +1 -2
- package/src/content.ts +1 -1
- package/src/pages/[section]/[...page].astro +58 -15
- package/src/pages/[section]/[page]/[...tab].astro +1 -1
- package/src/utils/case.ts +16 -0
- package/src/utils/index.ts +1 -0
- package/dist/client/_astro/Button.IBWho7ny.js +0 -9
- package/dist/client/_astro/DropdownGroup.DmTizX-Q.js +0 -1
- package/dist/client/_astro/DropdownList.BUcpBUVP.js +0 -1
- package/dist/client/_astro/LiveExample.B7IM_dLQ.css +0 -1
- package/dist/client/_astro/LiveExample.CiM2pGMB.js +0 -18
- package/dist/client/_astro/Navigation.zYUnVsp7.js +0 -1
- package/dist/client/_astro/PageSidebarBody.vGxFk_DU.js +0 -1
- package/dist/client/_astro/PageToggle.C6_rp-Bm.js +0 -1
- package/dist/client/_astro/PageToggleButton.CagcouJB.js +0 -1
- package/dist/client/_astro/SearchInput.BwWsXfyf.js +0 -1
- package/dist/client/_astro/SectionGallery.DqD5bUWQ.js +0 -1
- package/dist/client/_astro/Toolbar.BmilfRHR.js +0 -1
- package/dist/client/_astro/help-icon.Du6t7nyh.js +0 -8
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import{a as he,r as z}from"./index.eCxJ45ll.js";/* empty css */var A={exports:{}},v={};/**
|
|
2
|
-
* @license React
|
|
3
|
-
* react-jsx-runtime.production.min.js
|
|
4
|
-
*
|
|
5
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
6
|
-
*
|
|
7
|
-
* This source code is licensed under the MIT license found in the
|
|
8
|
-
* LICENSE file in the root directory of this source tree.
|
|
9
|
-
*/var J;function xe(){if(J)return v;J=1;var e=he(),n=Symbol.for("react.element"),s=Symbol.for("react.fragment"),t=Object.prototype.hasOwnProperty,i=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,a={key:!0,ref:!0,__self:!0,__source:!0};function o(r,l,u){var c,p={},x=null,m=null;u!==void 0&&(x=""+u),l.key!==void 0&&(x=""+l.key),l.ref!==void 0&&(m=l.ref);for(c in l)t.call(l,c)&&!a.hasOwnProperty(c)&&(p[c]=l[c]);if(r&&r.defaultProps)for(c in l=r.defaultProps,l)p[c]===void 0&&(p[c]=l[c]);return{$$typeof:n,type:r,key:x,ref:m,props:p,_owner:i.current}}return v.Fragment=s,v.jsx=o,v.jsxs=o,v}var K;function ye(){return K||(K=1,A.exports=xe()),A.exports}var f=ye();function $(e,n){var s={};for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&n.indexOf(t)<0&&(s[t]=e[t]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,t=Object.getOwnPropertySymbols(e);i<t.length;i++)n.indexOf(t[i])<0&&Object.prototype.propertyIsEnumerable.call(e,t[i])&&(s[t[i]]=e[t[i]]);return s}function Xe(e,n,s,t){function i(a){return a instanceof s?a:new s(function(o){o(a)})}return new(s||(s=Promise))(function(a,o){function r(c){try{u(t.next(c))}catch(p){o(p)}}function l(c){try{u(t.throw(c))}catch(p){o(p)}}function u(c){c.done?a(c.value):i(c.value).then(r,l)}u((t=t.apply(e,n||[])).next())})}function h(...e){const n=[],s={}.hasOwnProperty;return e.filter(Boolean).forEach(t=>{const i=typeof t;if(i==="string"||i==="number")n.push(t);else if(Array.isArray(t)&&t.length){const a=h(...t);a&&n.push(a)}else if(i==="object")for(const a in t)s.call(t,a)&&t[a]&&n.push(a)}),n.join(" ")}const ve={value:"36rem"},_e={value:"48rem"},Ie={value:"62rem"},Oe={value:"75rem"},we={value:"90.625rem"},Ce={value:"0rem"},Re={value:"40rem"},je={value:"48rem"},Ee={value:"60rem"},$e={value:"80rem"};let Be=0;function w({name:e,xOffset:n=0,yOffset:s=0,width:t,height:i,svgPath:a}){var o;return o=class extends z.Component{constructor(){super(...arguments),this.id=`icon-title-${Be++}`}render(){const l=this.props,{title:u,className:c}=l,p=$(l,["title","className"]),x=c?`pf-v6-svg ${c}`:"pf-v6-svg",m=!!u,B=[n,s,t,i].join(" ");return f.jsxs("svg",Object.assign({className:x,viewBox:B,fill:"currentColor","aria-labelledby":m?this.id:null,"aria-hidden":m?null:!0,role:"img",width:"1em",height:"1em"},p,{children:[m&&f.jsx("title",{id:this.id,children:u}),f.jsx("path",{d:a})]}))}},o.displayName=e,o}const Le={name:"CheckCircleIcon",height:512,width:512,svgPath:"M504 256c0 136.967-111.033 248-248 248S8 392.967 8 256 119.033 8 256 8s248 111.033 248 248zM227.314 387.314l184-184c6.248-6.248 6.248-16.379 0-22.627l-22.627-22.627c-6.248-6.249-16.379-6.249-22.628 0L216 308.118l-70.059-70.059c-6.248-6.248-16.379-6.248-22.628 0l-22.627 22.627c-6.248 6.248-6.248 16.379 0 22.627l104 104c6.249 6.249 16.379 6.249 22.628.001z",yOffset:0,xOffset:0},ke=w(Le),Ne={name:"ExclamationCircleIcon",height:512,width:512,svgPath:"M504 256c0 136.997-111.043 248-248 248S8 392.997 8 256C8 119.083 119.043 8 256 8s248 111.083 248 248zm-248 50c-25.405 0-46 20.595-46 46s20.595 46 46 46 46-20.595 46-46-20.595-46-46-46zm-43.673-165.346l7.418 136c.347 6.364 5.609 11.346 11.982 11.346h48.546c6.373 0 11.635-4.982 11.982-11.346l7.418-136c.375-6.874-5.098-12.654-11.982-12.654h-63.383c-6.884 0-12.356 5.78-11.981 12.654z",yOffset:0,xOffset:0},Ae=w(Ne),Te={name:"ExclamationTriangleIcon",height:512,width:576,svgPath:"M569.517 440.013C587.975 472.007 564.806 512 527.94 512H48.054c-36.937 0-59.999-40.055-41.577-71.987L246.423 23.985c18.467-32.009 64.72-31.951 83.154 0l239.94 416.028zM288 354c-25.405 0-46 20.595-46 46s20.595 46 46 46 46-20.595 46-46-20.595-46-46-46zm-43.673-165.346l7.418 136c.347 6.364 5.609 11.346 11.982 11.346h48.546c6.373 0 11.635-4.982 11.982-11.346l7.418-136c.375-6.874-5.098-12.654-11.982-12.654h-63.383c-6.884 0-12.356 5.78-11.981 12.654z",yOffset:0,xOffset:0},Pe=w(Te),Se={name:"InfoCircleIcon",height:512,width:512,svgPath:"M256 8C119.043 8 8 119.083 8 256c0 136.997 111.043 248 248 248s248-111.003 248-248C504 119.083 392.957 8 256 8zm0 110c23.196 0 42 18.804 42 42s-18.804 42-42 42-42-18.804-42-42 18.804-42 42-42zm56 254c0 6.627-5.373 12-12 12h-88c-6.627 0-12-5.373-12-12v-24c0-6.627 5.373-12 12-12h12v-64h-12c-6.627 0-12-5.373-12-12v-24c0-6.627 5.373-12 12-12h64c6.627 0 12 5.373 12 12v100h12c6.627 0 12 5.373 12 12v24z",yOffset:0,xOffset:0},De=w(Se),Me={name:"BellIcon",height:1024,width:896,svgPath:"M448,0 C465.333333,0 480.333333,6.33333333 493,19 C505.666667,31.6666667 512,46.6666667 512,64 L512,106 L514.23,106.45 C587.89,121.39 648.48,157.24 696,214 C744,271.333333 768,338.666667 768,416 C768,500 780,568.666667 804,622 C818.666667,652.666667 841.333333,684 872,716 C873.773676,718.829136 875.780658,721.505113 878,724 C890,737.333333 896,752.333333 896,769 C896,785.666667 890,800.333333 878,813 C866,825.666667 850.666667,832 832,832 L63.3,832 C44.9533333,831.84 29.8533333,825.506667 18,813 C6,800.333333 0,785.666667 0,769 C0,752.333333 6,737.333333 18,724 L24,716 L25.06,714.9 C55.1933333,683.28 77.5066667,652.313333 92,622 C116,568.666667 128,500 128,416 C128,338.666667 152,271.333333 200,214 C248,156.666667 309.333333,120.666667 384,106 L384,63.31 C384.166667,46.27 390.5,31.5 403,19 C415.666667,6.33333333 430.666667,0 448,0 Z M576,896 L576,897.08 C575.74,932.6 563.073333,962.573333 538,987 C512.666667,1011.66667 482.666667,1024 448,1024 C413.333333,1024 383.333333,1011.66667 358,987 C332.666667,962.333333 320,932 320,896 L576,896 Z",yOffset:0,xOffset:0},ze=w(Me),R={RIGHT:"right",LEFT:"left",BOTH:"both",NONE:"none"},tt={UP:"up",DOWN:"down",RIGHT:"right",LEFT:"left"};var V;(function(e){e.success="success",e.error="error",e.warning="warning",e.default="default"})(V||(V={}));const nt={Tab:"Tab",Space:" ",Escape:"Escape",Enter:"Enter",ArrowUp:"ArrowUp",ArrowDown:"ArrowDown",ArrowLeft:"ArrowLeft",ArrowRight:"ArrowRight"},_={sm:parseInt(ve.value)*16,md:parseInt(_e.value)*16,lg:parseInt(Ie.value)*16,xl:parseInt(Oe.value)*16,"2xl":parseInt(we.value)*16},I={sm:parseInt(Ce.value)*16,md:parseInt(Re.value)*16,lg:parseInt(je.value)*16,xl:parseInt(Ee.value)*16,"2xl":parseInt($e.value)*16},st={success:ke,danger:Ae,warning:Pe,info:De,custom:ze};function at(e){return e[0].toUpperCase()+e.substring(1)}function rt(e="pf"){const n=new Date().getTime()+Math.random().toString(36).slice(2);return`${e}-${n}`}function it(e,n){let s;return(...t)=>{clearTimeout(s),s=setTimeout(()=>e.apply(this,t),n)}}function lt(e,n,s,t=!1){if(!e||!n)return!1;const i=e.getBoundingClientRect(),a=n.getBoundingClientRect(),o=Math.ceil(i.left),r=Math.floor(i.right),l=Math.ceil(a.left),u=Math.floor(a.right),c=l>=o&&u<=r,p=(s||!t&&i.width<a.width)&&(l<o&&u>o||u>r&&l<r);return c||p}function ot(e,n){const s=e.getBoundingClientRect(),t=n.getBoundingClientRect(),i=Math.floor(s.left),a=Math.floor(s.right),o=Math.floor(t.left),r=Math.floor(t.right),l=o<i,u=r>a;let c=R.NONE;return u&&l?c=R.BOTH:u?c=R.RIGHT:l&&(c=R.LEFT),c}function ct(e,n){return e.replace(/\${(.*?)}/g,(s,t)=>n[t]||"")}function Fe(e,n,s,t,i,a=!1){if(!Array.isArray(i))return;const o=t.filter(u=>u)[0].constructor===Array;let r=e,l=n;s==="up"?e===0?r=i.length-1:r=e-1:s==="down"?e===i.length-1?r=0:r=e+1:s==="left"?n===0?l=t[e].length-1:l=n-1:s==="right"&&(n===t[e].length-1?l=0:l=n+1),t[r]===null||t[r]===void 0||o&&(t[r][l]===null||t[r][l]===void 0)?Fe(r,l,s,t,i,a):a?(t[r].focus&&t[r].focus(),t[r].focus()):s!=="tab"&&(o?t[r][l].focus():t[r].focus())}function ut(e,n){const s=e.current.querySelectorAll(n);return Array.prototype.filter.call(s,function(i){return i.tabIndex>="0"})}function Ue(e,n,s){let t;return n==="up"?e===0?t=s.length-1:t=e-1:e===s.length-1?t=0:t=e+1,s[t]===void 0||s[t][0]===null?Ue(t,n,s):t}function ft(e,n,s){return s||(s=`${n}s`),`${e||0} ${e===1?n:s}`}const dt=(e,n)=>Object.entries(e||{}).reduce((s,[t,i])=>t==="default"?Object.assign(Object.assign({},s),{[n]:i}):Object.assign(Object.assign({},s),{[`${n}-on-${t}`]:i}),{}),pt=(e,n,s="",t,i)=>{if(!e)return"";if(t&&!i){if(t in e)return n.modifiers[T(`${s}${e[t]}`)];const a=["2xl","xl","lg","md","sm","default"],o=a.indexOf(t);for(let r=o;r<a.length;r++)if(a[r]in e)return n.modifiers[T(`${s}${e[a[r]]}`)];return""}return Object.entries(e||{}).map(([a,o])=>`${s}${o}${a!=="default"?`-on-${a}`:""}${i&&a!=="default"?"-height":""}`).map(T).map(a=>a.replace(/-?(\dxl)/gi,(o,r)=>`_${r}`)).map(a=>n.modifiers[a]).filter(Boolean).join(" ")},mt=e=>e===null?null:e>=I["2xl"]?"2xl":e>=I.xl?"xl":e>=I.lg?"lg":e>=I.md?"md":e>=I.sm?"sm":"default",gt=e=>e===null?null:e>=_["2xl"]?"2xl":e>=_.xl?"xl":e>=_.lg?"lg":e>=_.md?"md":e>=_.sm?"sm":"default",He=e=>e.toUpperCase().replace("-","").replace("_",""),T=e=>e.replace(/([-_][a-z])/gi,He),bt=!!(typeof window<"u"&&window.document&&window.document.createElement),Y=(e,n)=>{const s=getComputedStyle(n),t=()=>{let o="";const r={"50%":"ultra-condensed","62.5%":"extra-condensed","75%":"condensed","87.5%":"semi-condensed","100%":"normal","112.5%":"semi-expanded","125%":"expanded","150%":"extra-expanded","200%":"ultra-expanded"};let l;return s.fontStretch in r?l=r[s.fontStretch]:l="normal",o=s.fontStyle+" "+s.fontVariant+" "+s.fontWeight+" "+l+" "+s.fontSize+"/"+s.lineHeight+" "+s.fontFamily,o},a=document.createElement("canvas").getContext("2d");return a.font=s.font||t(),a.measureText(e).width},qe=e=>{const n=getComputedStyle(e);let s=e.clientWidth,t=e.clientHeight;return t-=parseFloat(n.paddingTop)+parseFloat(n.paddingBottom),s-=parseFloat(n.paddingLeft)+parseFloat(n.paddingRight),{height:t,width:s}},ht=(e,n)=>{const s=qe(e).width;let t=n;if(Y(n,e)>s){for(;Y(`...${t}`,e)>s;)t=t.substring(1);e.value?e.value=`...${t}`:e.innerText=`...${t}`}else e.value?e.value=n:e.innerText=n},xt=e=>e.reduce((n,s)=>Object.assign(Object.assign({},n),{[s]:t=>{t.preventDefault()}}),{}),yt=e=>{e.forEach(n=>{n.current&&clearTimeout(n.current)})},vt=(e,n="ltr")=>{if(!e)return n;const s=getComputedStyle(e).getPropertyValue("direction");return["ltr","rtl"].includes(s)?s:n};let We=0;const Z="OUIA-Generated-",P={};function _t(e,n,s=!0){return{"data-ouia-component-type":`PF6/${e}`,"data-ouia-safe":s,"data-ouia-component-id":n}}const Ge=(e,n,s=!0,t)=>({"data-ouia-component-type":`PF6/${e}`,"data-ouia-safe":s,"data-ouia-component-id":Je(e,n,t)}),Je=(e,n,s)=>{const t=z.useMemo(()=>Ke(e,s),[e,s]);return n??t};function Ke(e,n){try{let s;return typeof window<"u"?s=`${window.location.href}-${e}-${n||""}`:s=`${e}-${n||""}`,P[s]||(P[s]=0),`${Z}${e}-${n?`${n}-`:""}${++P[s]}`}catch{return`${Z}${e}-${n?`${n}-`:""}${++We}`}}const d={button:"pf-v6-c-button",buttonCount:"pf-v6-c-button__count",buttonIcon:"pf-v6-c-button__icon",buttonProgress:"pf-v6-c-button__progress",modifiers:{primary:"pf-m-primary",unread:"pf-m-unread",secondary:"pf-m-secondary",danger:"pf-m-danger",tertiary:"pf-m-tertiary",link:"pf-m-link",inline:"pf-m-inline",displayLg:"pf-m-display-lg",warning:"pf-m-warning",control:"pf-m-control",stateful:"pf-m-stateful",read:"pf-m-read",attention:"pf-m-attention",plain:"pf-m-plain",noPadding:"pf-m-no-padding",block:"pf-m-block",small:"pf-m-small",favorite:"pf-m-favorite",favorited:"pf-m-favorited",clicked:"pf-m-clicked",disabled:"pf-m-disabled",ariaDisabled:"pf-m-aria-disabled",progress:"pf-m-progress",inProgress:"pf-m-in-progress",notify:"pf-m-notify",start:"pf-m-start",end:"pf-m-end"}},j={modifiers:{inline:"pf-m-inline",sm:"pf-m-sm",md:"pf-m-md",lg:"pf-m-lg",xl:"pf-m-xl"},spinner:"pf-v6-c-spinner",spinnerPath:"pf-v6-c-spinner__path"},Ve={name:"--pf-v6-c-spinner--diameter"};var S;(function(e){e.sm="sm",e.md="md",e.lg="lg",e.xl="xl"})(S||(S={}));const Q=e=>{var{className:n="",size:s="xl","aria-valuetext":t="Loading...",diameter:i,isInline:a=!1,"aria-label":o,"aria-labelledBy":r}=e,l=$(e,["className","size","aria-valuetext","diameter","isInline","aria-label","aria-labelledBy"]);return f.jsx("svg",Object.assign({className:h(j.spinner,a?j.modifiers.inline:j.modifiers[s],n),role:"progressbar","aria-valuetext":t,viewBox:"0 0 100 100"},i&&{style:{[Ve.name]:i}},o&&{"aria-label":o},r&&{"aria-labelledBy":r},!o&&!r&&{"aria-label":"Contents"},l,{children:f.jsx("circle",{className:j.spinnerPath,cx:"50",cy:"50",r:"45",fill:"none"})}))};Q.displayName="Spinner";const E={badge:"pf-v6-c-badge",modifiers:{read:"pf-m-read",unread:"pf-m-unread",disabled:"pf-m-disabled"}},X=e=>{var{isRead:n=!1,isDisabled:s=!1,className:t="",children:i="",screenReaderText:a}=e,o=$(e,["isRead","isDisabled","className","children","screenReaderText"]);return f.jsxs("span",Object.assign({},o,{className:h(E.badge,n?E.modifiers.read:E.modifiers.unread,s&&E.modifiers.disabled,t),children:[i,a&&f.jsx("span",{className:"pf-v6-screen-reader",children:a})]}))};X.displayName="Badge";var g;(function(e){e.primary="primary",e.secondary="secondary",e.tertiary="tertiary",e.danger="danger",e.warning="warning",e.link="link",e.plain="plain",e.control="control",e.stateful="stateful"})(g||(g={}));var D;(function(e){e.button="button",e.submit="submit",e.reset="reset"})(D||(D={}));var O;(function(e){e.default="default",e.sm="sm",e.lg="lg"})(O||(O={}));var M;(function(e){e.read="read",e.unread="unread",e.attention="attention"})(M||(M={}));const Ye=e=>{var{children:n=null,className:s="",component:t="button",isClicked:i=!1,isBlock:a=!1,isDisabled:o=!1,isAriaDisabled:r=!1,isLoading:l=null,isDanger:u=!1,spinnerAriaValueText:c,spinnerAriaLabelledBy:p,spinnerAriaLabel:x,size:m=O.default,inoperableEvents:B=["onClick","onKeyPress"],isInline:L=!1,type:te=D.button,variant:b=g.primary,state:ne=M.unread,hasNoPadding:se=!1,iconPosition:F="start","aria-label":ae=null,icon:U=null,role:re,ouiaId:ie,ouiaSafe:le=!0,tabIndex:H=null,innerRef:oe,countOptions:C}=e,ce=$(e,["children","className","component","isClicked","isBlock","isDisabled","isAriaDisabled","isLoading","isDanger","spinnerAriaValueText","spinnerAriaLabelledBy","spinnerAriaLabel","size","inoperableEvents","isInline","type","variant","state","hasNoPadding","iconPosition","aria-label","icon","role","ouiaId","ouiaSafe","tabIndex","innerRef","countOptions"]);const ue=Ge(ee.displayName,ie,le,b),k=t,y=k==="button",N=L&&k==="span",q=F==="end"||F==="right",fe=B.reduce((me,ge)=>Object.assign(Object.assign({},me),{[ge]:be=>{be.preventDefault()}}),{}),de=()=>{if(o)return y?null:-1;if(r)return null;if(N)return 0},W=U&&f.jsx("span",{className:h(d.buttonIcon,n&&d.modifiers[q?"end":"start"]),children:U}),G=n&&f.jsx("span",{className:h("pf-v6-c-button__text"),children:n}),pe=r||!y&&o;return f.jsxs(k,Object.assign({},ce,r?fe:null,pe&&{"aria-disabled":!0},{"aria-label":ae,className:h(d.button,d.modifiers[b],a&&d.modifiers.block,o&&!y&&d.modifiers.disabled,r&&d.modifiers.ariaDisabled,i&&d.modifiers.clicked,L&&b===g.link&&d.modifiers.inline,u&&(b===g.secondary||b===g.link)&&d.modifiers.danger,l!==null&&b!==g.plain&&d.modifiers.progress,l&&d.modifiers.inProgress,se&&b===g.plain&&d.modifiers.noPadding,b===g.stateful&&d.modifiers[ne],m===O.sm&&d.modifiers.small,m===O.lg&&d.modifiers.displayLg,s),disabled:y?o:null,tabIndex:H!==null?H:de(),type:y||N?te:null,role:N?"button":re,ref:oe},ue,{children:[l&&f.jsx("span",{className:h(d.buttonProgress),children:f.jsx(Q,{size:S.md,isInline:L,"aria-valuetext":c,"aria-label":x,"aria-labelledby":p})}),q?f.jsxs(f.Fragment,{children:[G,W]}):f.jsxs(f.Fragment,{children:[W,G]}),C&&f.jsx("span",{className:h(d.buttonCount,C.className),children:f.jsx(X,{isRead:C.isRead,isDisabled:o,children:C.count})})]}))},ee=z.forwardRef((e,n)=>f.jsx(Ye,Object.assign({innerRef:n},e)));ee.displayName="Button";export{Je as $,ft as A,ee as B,ke as C,lt as D,Pe as E,T as F,Ie as G,O as H,De as I,M as J,nt as K,D as L,tt as M,R as N,yt as O,ut as P,Ue as Q,Y as R,Q as S,I as T,qe as U,V,Fe as W,xt as X,ot as Y,ht as Z,$ as _,h as a,we as a0,_e as a1,Ke as b,w as c,it as d,bt as e,at as f,_t as g,ze as h,Ae as i,f as j,g as k,rt as l,pt as m,vt as n,X as o,st as p,S as q,Xe as r,dt as s,ct as t,Ge as u,d as v,_ as w,Oe as x,mt as y,gt as z};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as a,_ as c,a as o}from"./Button.IBWho7ny.js";import{r as b}from"./index.eCxJ45ll.js";import{m as t}from"./angle-left-icon.C3MzYN3k.js";const f=e=>{var{children:l,className:r="",label:s="",titleId:n,innerRef:i,labelHeadingLevel:d="h1"}=e,m=c(e,["children","className","label","titleId","innerRef","labelHeadingLevel"]);const u=typeof s=="function"?s:d;return a.jsx("section",Object.assign({},m,{className:o(t.menuGroup,r),ref:i,children:a.jsxs(a.Fragment,{children:[["function","string"].includes(typeof s)?a.jsx(u,{className:o(t.menuGroupTitle),id:n,children:s}):s,l]})}))},p=b.forwardRef((e,l)=>a.jsx(f,Object.assign({},e,{innerRef:l})));p.displayName="MenuGroup";const g=e=>{var{children:l,className:r,label:s,labelHeadingLevel:n="h1"}=e,i=c(e,["children","className","label","labelHeadingLevel"]);return a.jsx(p,Object.assign({className:o(r),label:s,labelHeadingLevel:n},i,{children:l}))};g.displayName="DropdownGroup";export{g as D,p as M};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{e as ee,j as e,b as _e,_ as K,a as h,g as Re,c as ye,B as Je,i as Qe,E as Ye,C as et,u as ke}from"./Button.IBWho7ny.js";import{r as b}from"./index.eCxJ45ll.js";/* empty css */import{G as tt,C as nt,T as it,k as st}from"./SearchInput.BwWsXfyf.js";import{u as at,A as lt,P as ot}from"./divider.O4WEhuBq.js";import{m as o,A as rt}from"./angle-left-icon.C3MzYN3k.js";const ct=(n,t,i=x=>document.activeElement.contains(x),l=x=>x,a=["A","BUTTON","INPUT"],s=!1,f=!1,p=!0,N=!0)=>{const x=document.activeElement,d=n.key;let m=null;if(!s&&["ArrowUp","ArrowDown"].includes(d)){n.preventDefault(),n.stopImmediatePropagation();let c=-1;t.forEach((y,v)=>{if(i(y)){let g=0;for(;!m&&g<t.length&&g*-1<t.length;)d==="ArrowUp"?g--:g++,c=v+g,c>=t.length&&(c=0),c<0&&(c=t.length-1),m=l(t[c])}})}if(!f&&["ArrowLeft","ArrowRight"].includes(d)){n.preventDefault(),n.stopImmediatePropagation();let c=-1;t.forEach((y,v)=>{if(i(y)){const g=t[v].querySelectorAll(a.join(","));if(!g.length||N){let u=x;for(;u;){const E=u.parentElement===y?u:u.parentElement;if(u=d==="ArrowLeft"?E.previousElementSibling:E.nextElementSibling,u){if(a.includes(u.tagName)){m=u;break}if(a.includes(u.children[0].tagName)){m=u.children[0];break}}}}else g.forEach((u,T)=>{n.target===u&&(c=T+(d==="ArrowLeft"?-1:1),c>=g.length&&(c=0),c<0&&(c=g.length-1),m=g[c])})}})}m&&(p&&(x.tabIndex=-1,m.tabIndex=0),m.focus())},kt=n=>{n&&n.length>0&&(n.forEach(t=>{t.tabIndex=-1}),n[0].tabIndex=0)},dt=(n,t)=>{var i;if(n.key!=="ArrowDown"&&n.key!=="ArrowUp")return;n.preventDefault();const a=Array.from((i=t.current)===null||i===void 0?void 0:i.querySelectorAll("li")).map(f=>f.querySelector('button:not(:disabled),input:not(:disabled),a:not([aria-disabled="true"])')).filter(f=>f!==null);let s;n.key==="ArrowDown"?s=a[0]:s=a[a.length-1],s&&s.focus()};class Ie extends b.Component{constructor(){super(...arguments),this.keyHandler=t=>{const{isEventFromContainer:i}=this.props;if(i?!i(t):!this._isEventFromContainer(t))return;const{isActiveElement:l,getFocusableElement:a,noVerticalArrowHandling:s,noHorizontalArrowHandling:f,noEnterHandling:p,noSpaceHandling:N,updateTabIndex:x,validSiblingTags:d,additionalKeyHandler:m,createNavigableElements:c,onlyTraverseSiblings:y}=this.props;m&&m(t);const v=c();if(!v){console.warn("No navigable elements have been passed to the KeyboardHandler. Keyboard navigation provided by this component will be ignored.");return}const g=t.key;p||g==="Enter"&&(t.preventDefault(),t.stopImmediatePropagation(),document.activeElement.click()),N||g===" "&&(t.preventDefault(),t.stopImmediatePropagation(),document.activeElement.click()),ct(t,v,l,a,d,s,f,x,y)},this._isEventFromContainer=t=>{const{containerRef:i}=this.props;return i.current&&i.current.contains(t.target)}}componentDidMount(){ee&&window.addEventListener("keydown",this.keyHandler)}componentWillUnmount(){ee&&window.removeEventListener("keydown",this.keyHandler)}render(){return null}}Ie.displayName="KeyboardHandler";Ie.defaultProps={containerRef:null,createNavigableElements:()=>null,isActiveElement:n=>document.activeElement===n,getFocusableElement:n=>n,validSiblingTags:["BUTTON","A"],onlyTraverseSiblings:!0,updateTabIndex:!0,noHorizontalArrowHandling:!1,noVerticalArrowHandling:!1,noEnterHandling:!1,noSpaceHandling:!1};const he={breadcrumb:"pf-v6-c-breadcrumb",breadcrumbDropdown:"pf-v6-c-breadcrumb__dropdown",breadcrumbHeading:"pf-v6-c-breadcrumb__heading",breadcrumbItem:"pf-v6-c-breadcrumb__item",breadcrumbItemDivider:"pf-v6-c-breadcrumb__item-divider",breadcrumbLink:"pf-v6-c-breadcrumb__link",breadcrumbList:"pf-v6-c-breadcrumb__list",modifiers:{current:"pf-m-current"}},G=b.createContext({menuId:null,parentMenu:null,onActionClick:()=>null,onSelect:()=>null,activeItemId:null,selected:null,drilledInMenus:[],drilldownItemPath:[],onDrillIn:null,onDrillOut:null,onGetMenuHeight:()=>null,flyoutRef:null,setFlyoutRef:()=>null,disableHover:!1,role:"menu"}),Oe=b.createContext({itemId:null,isDisabled:!1});class le extends b.Component{constructor(t){super(t),this.menuRef=b.createRef(),this.activeMenu=null,this.state={ouiaStateId:_e(ae.displayName),transitionMoveTarget:null,flyoutRef:null,disableHover:!1,currentDrilldownMenuId:this.props.id},this.handleDrilldownTransition=i=>{const l=this.menuRef.current;if(!(!l||l!==i.target.closest(`.${o.menu}`)&&!Array.from(l.getElementsByClassName(o.menu)).includes(i.target.closest(`.${o.menu}`))))if(this.state.transitionMoveTarget)this.state.transitionMoveTarget.focus(),this.setState({transitionMoveTarget:null});else{const a=l.querySelector("#"+this.props.activeMenu)||l||null,s=a.getElementsByTagName("UL");if(s.length===0)return;const f=Array.from(s[0].children);if(!this.state.currentDrilldownMenuId||a.id!==this.state.currentDrilldownMenuId)this.setState({currentDrilldownMenuId:a.id});else return;const p=f.filter(N=>!(N.classList.contains("pf-m-disabled")||N.classList.contains(o.divider)))[0].firstChild;p.focus(),p.tabIndex=0}},this.handleExtraKeys=i=>{const l=this.props.containsDrilldown,a=document.activeElement;if(i.target.closest(`.${o.menu}`)!==this.activeMenu&&!i.target.classList.contains(he.breadcrumbLink)&&(this.activeMenu=i.target.closest(`.${o.menu}`),this.setState({disableHover:!0})),i.target.tagName==="INPUT")return;const s=this.activeMenu,f=i.key,p=a.classList.contains(he.breadcrumbLink);if(f===" "||f==="Enter"){if(i.preventDefault(),l&&!p){if(a.closest("li").classList.contains("pf-m-current-path")&&s.parentElement.tagName==="LI")a.tabIndex=-1,s.parentElement.firstChild.tabIndex=0,this.setState({transitionMoveTarget:s.parentElement.firstChild});else if(a.nextElementSibling&&a.nextElementSibling.classList.contains(o.menu)){const x=Array.from(a.nextElementSibling.getElementsByTagName("UL")[0].children).filter(d=>!(d.classList.contains("pf-m-disabled")||d.classList.contains(o.divider)));a.tabIndex=-1,x[0].firstChild.tabIndex=0,this.setState({transitionMoveTarget:x[0].firstChild})}}document.activeElement.click()}},this.createNavigableElements=()=>this.props.containsDrilldown?this.activeMenu?Array.from(this.activeMenu.getElementsByTagName("UL")[0].children).filter(l=>!(l.classList.contains("pf-m-disabled")||l.classList.contains(o.divider))):[]:this.menuRef.current?Array.from(this.menuRef.current.getElementsByTagName("LI")).filter(l=>!(l.classList.contains("pf-m-disabled")||l.classList.contains(o.divider))):[],t.innerRef&&(this.menuRef=t.innerRef)}allowTabFirstItem(){const t=this.menuRef.current;if(t){const i=t.querySelector("ul button:not(:disabled), ul a:not(:disabled)");i&&(i.tabIndex=0)}}componentDidMount(){this.context&&this.setState({disableHover:this.context.disableHover}),ee&&this.props.containsDrilldown&&window.addEventListener("transitionend",this.props.isRootMenu?this.handleDrilldownTransition:null),this.allowTabFirstItem()}componentWillUnmount(){ee&&this.props.containsDrilldown&&window.removeEventListener("transitionend",this.handleDrilldownTransition)}componentDidUpdate(t){t.children!==this.props.children&&this.allowTabFirstItem()}render(){const t=this.props,{id:i,children:l,className:a,onSelect:s,selected:f=null,onActionClick:p,ouiaId:N,ouiaSafe:x,containsFlyout:d,containsDrilldown:m,isMenuDrilledIn:c,isPlain:y,isScrollable:v,drilldownItemPath:g,drilledInMenus:u,onDrillIn:T,onDrillOut:E,onGetMenuHeight:k,parentMenu:z=null,activeItemId:O=null,innerRef:$,isRootMenu:H,activeMenu:S,role:R,isNavFlyout:j}=t,M=K(t,["id","children","className","onSelect","selected","onActionClick","ouiaId","ouiaSafe","containsFlyout","containsDrilldown","isMenuDrilledIn","isPlain","isScrollable","drilldownItemPath","drilledInMenus","onDrillIn","onDrillOut","onGetMenuHeight","parentMenu","activeItemId","innerRef","isRootMenu","activeMenu","role","isNavFlyout"]),P=c||u&&u.includes(i)||!1;return e.jsxs(G.Provider,{value:{menuId:i,parentMenu:z||i,onSelect:s,onActionClick:p,activeItemId:O,selected:f,drilledInMenus:u,drilldownItemPath:g,onDrillIn:T,onDrillOut:E,onGetMenuHeight:k,flyoutRef:this.state.flyoutRef,setFlyoutRef:w=>this.setState({flyoutRef:w}),disableHover:this.state.disableHover,role:R},children:[H&&e.jsx(Ie,{containerRef:this.menuRef||null,additionalKeyHandler:this.handleExtraKeys,createNavigableElements:this.createNavigableElements,isActiveElement:w=>document.activeElement.closest("li")===w||document.activeElement.parentElement===w||document.activeElement.closest(`.${o.menuSearch}`)===w||document.activeElement.closest("ol")&&document.activeElement.closest("ol").firstChild===w,getFocusableElement:w=>{var A,L;return w?.tagName==="DIV"&&w.querySelector("input")||((A=w.firstChild)===null||A===void 0?void 0:A.tagName)==="LABEL"&&w.querySelector("input")||((L=w.firstChild)===null||L===void 0?void 0:L.tagName)==="DIV"&&w.querySelector("a, button, input")||w.firstChild},noHorizontalArrowHandling:document.activeElement&&(document.activeElement.classList.contains(he.breadcrumbLink)||document.activeElement.tagName==="INPUT"),noEnterHandling:!0,noSpaceHandling:!0}),e.jsx("div",Object.assign({id:i,className:h(o.menu,y&&o.modifiers.plain,v&&o.modifiers.scrollable,d&&o.modifiers.flyout,j&&"pf-m-nav",m&&o.modifiers.drilldown,P&&o.modifiers.drilledIn,a),ref:this.menuRef},Re(ae.displayName,N!==void 0?N:this.state.ouiaStateId,x),M,{children:l}))]})}}le.displayName="Menu";le.contextType=G;le.defaultProps={ouiaSafe:!0,isRootMenu:!0,isPlain:!1,isScrollable:!1,role:"menu"};const ae=b.forwardRef((n,t)=>e.jsx(le,Object.assign({},n,{innerRef:t})));ae.displayName="Menu";const ut={name:"--pf-v6-c-menu__content--Height"},ft={name:"--pf-v6-c-menu__content--MaxHeight"},Ae=b.forwardRef((n,t)=>{const{getHeight:i,children:l,menuHeight:a,maxMenuHeight:s}=n,f=K(n,["getHeight","children","menuHeight","maxMenuHeight"]),p=b.createRef(),N=(x,d,m)=>{if(x){let c=x.clientHeight,y=null,v=x.closest(`.${o.menuList}`);for(;v!==null&&v.nodeType===1;)v.classList.contains(o.menuList)&&(y=v),v=v.parentElement;if(y){const g=getComputedStyle(y),u=parseFloat(g.getPropertyValue("padding-top").replace(/px/g,""))+parseFloat(g.getPropertyValue("padding-bottom").replace(/px/g,""))+parseFloat(getComputedStyle(y.parentElement).getPropertyValue("border-bottom-width").replace(/px/g,""));c=c+u}m&&m(d,c),i&&i(c.toString())}return t||p};return e.jsx(G.Consumer,{children:({menuId:x,onGetMenuHeight:d})=>e.jsx("div",Object.assign({},f,{className:h(o.menuContent,n.className),ref:m=>{N(m,x,d)},style:Object.assign(Object.assign({},a&&{[ut.name]:a}),s&&{[ft.name]:s}),children:l}))})});Ae.displayName="MenuContent";const mt={name:"--pf-v6-c-menu--m-flyout__menu--top-offset"},pt={name:"--pf-v6-c-menu--m-flyout__menu--m-left--right-offset"},gt={name:"--pf-v6-c-menu--m-flyout__menu--left-offset"},ht={name:"ExternalLinkAltIcon",height:512,width:512,svgPath:"M432,320H400a16,16,0,0,0-16,16V448H64V128H208a16,16,0,0,0,16-16V80a16,16,0,0,0-16-16H48A48,48,0,0,0,0,112V464a48,48,0,0,0,48,48H400a48,48,0,0,0,48-48V336A16,16,0,0,0,432,320ZM488,0h-128c-21.37,0-32.05,25.91-17,41l35.73,35.73L135,320.37a24,24,0,0,0,0,34L157.67,377a24,24,0,0,0,34,0L435.28,133.32,471,169c15,15,41,4.5,41-17V24A24,24,0,0,0,488,0Z",yOffset:0,xOffset:0},bt=ye(ht),xt={name:"CheckIcon",height:512,width:512,svgPath:"M173.898 439.404l-166.4-166.4c-9.997-9.997-9.997-26.206 0-36.204l36.203-36.204c9.997-9.998 26.207-9.998 36.204 0L192 312.69 432.095 72.596c9.997-9.997 26.207-9.997 36.204 0l36.203 36.204c9.997 9.997 9.997 26.206 0 36.204l-294.4 294.401c-9.998 9.997-26.207 9.997-36.204-.001z",yOffset:0,xOffset:0},yt=ye(xt),It={name:"StarIcon",height:512,width:576,svgPath:"M259.3 17.8L194 150.2 47.9 171.5c-26.2 3.8-36.7 36.1-17.7 54.6l105.7 103-25 145.5c-4.5 26.3 23.2 46 46.4 33.7L288 439.6l130.7 68.7c23.2 12.2 50.9-7.4 46.4-33.7l-25-145.5 105.7-103c19-18.5 8.5-50.8-17.7-54.6L382 150.2 316.7 17.8c-11.7-23.6-45.6-23.9-57.4 0z",yOffset:0,xOffset:0},vt=ye(It),wt=n=>{var{className:t,icon:i,onClick:l,"aria-label":a,isFavorited:s=null,isDisabled:f,actionId:p,innerRef:N}=n,x=K(n,["className","icon","onClick","aria-label","isFavorited","isDisabled","actionId","innerRef"]);return e.jsx(G.Consumer,{children:({onActionClick:d})=>e.jsx(Oe.Consumer,{children:({itemId:m,isDisabled:c})=>{const y=v=>{l&&l(v),d&&d(v,m,p)};return e.jsx("div",Object.assign({className:h(o.menuItemAction,s!==null&&"pf-m-favorite",s&&o.modifiers.favorited,t)},x,{children:e.jsx(Je,{"aria-label":a,onClick:y,ref:N,role:"menuitem",variant:"plain",tabIndex:-1,isDisabled:f||c,icon:i==="favorites"||s!==null?e.jsx(vt,{}):i})}))}})})},He=b.forwardRef((n,t)=>e.jsx(wt,Object.assign({},n,{innerRef:t})));He.displayName="MenuItemAction";const Se=b.createContext({direction:"right"}),Nt=n=>{var{children:t,className:i,itemId:l=null,to:a,hasCheckbox:s=!1,isActive:f=null,isFavorited:p=null,isLoadButton:N=!1,isLoading:x=!1,flyoutMenu:d,direction:m,description:c=null,onClick:y=()=>{},component:v="button",isDisabled:g=!1,isAriaDisabled:u=!1,isExternalLink:T=!1,isSelected:E=null,isFocused:k,isDanger:z=!1,icon:O,actions:$,onShowFlyout:H,drilldownMenu:S,isOnPath:R,innerRef:j,id:M,"aria-label":P,tooltipProps:w,rel:A,target:L,download:F}=n,D=K(n,["children","className","itemId","to","hasCheckbox","isActive","isFavorited","isLoadButton","isLoading","flyoutMenu","direction","description","onClick","component","isDisabled","isAriaDisabled","isExternalLink","isSelected","isFocused","isDanger","icon","actions","onShowFlyout","drilldownMenu","isOnPath","innerRef","id","aria-label","tooltipProps","rel","target","download"]);const{menuId:B,parentMenu:U,onSelect:X,onActionClick:Q,activeItemId:ve,selected:te,drilldownItemPath:we,onDrillIn:Ne,onDrillOut:Ce,flyoutRef:Ke,setFlyoutRef:oe,disableHover:je,role:ze}=b.useContext(G);let ne=a?"a":v;s&&!a&&(ne="label");const[ie,qe]=b.useState(null),re=b.useContext(Se),[Me,ce]=b.useState(re.direction),q=b.useRef(void 0),$e=b.useRef(void 0),Ee=j||$e,V=q===Ke,de=d!==void 0,ue=r=>{!V&&r?oe(q):V&&!r&&oe(null),H&&r&&H()};at(()=>{if(de&&q.current&&ee){const r=q.current.lastElementChild;if(r&&r.classList.contains(o.menu)){const I=q.current.getClientRects()[0],_=r.getClientRects()[0];if(I&&_){const W=I.x-_.width,me=window.innerWidth-I.x-I.width-_.width;let J=Me;me<0&&J!=="left"?(ce("left"),J="left"):W<0&&J!=="right"&&(ce("right"),J="right");let pe=0;W<0&&me<0&&(pe=J==="right"?-me:-W),J==="left"?(r.classList.add(o.modifiers.left),r.style.setProperty(pt.name,`-${pe}px`)):r.style.setProperty(gt.name,`-${pe}px`);const ge=window.innerHeight-I.y-_.height;window.innerHeight-_.height<0&&ge<0||ge<0&&r.style.setProperty(mt.name,`${ge}px`)}}}},[V,d]),b.useEffect(()=>{ce(re.direction)},[re]),b.useEffect(()=>{if(ie)if(V){const r=ie.nextElementSibling;Array.from(r.getElementsByTagName("UL")[0].children).filter(_=>!(_.classList.contains("pf-m-disabled")||_.classList.contains(o.divider)))[0].firstChild.focus()}else ie.focus()},[V,ie]);const De=r=>{const I=r.key,_=r.target,W=r.type;(I===" "||I==="Enter"||I==="ArrowRight"||W==="click")&&(r.stopPropagation(),r.preventDefault(),V||(ue(!0),qe(_))),(I==="Escape"||I==="ArrowLeft")&&V&&(r.stopPropagation(),ue(!1))},Te=(r,I)=>{u||(I&&I(r,l),y&&y(r))},We=R&&R||we&&we.includes(l)||!1;let se;m&&(m==="down"?se=r=>Ne&&Ne(r,B,typeof S=="function"?S().props.id:S.props.id,l):se=r=>Ce&&Ce(r,U,l));let Z={};ne==="a"?Z={href:a,"aria-disabled":g||u?!0:null,disabled:null,target:T?"_blank":L,rel:A,download:F}:ne==="button"&&(Z={type:"button","aria-disabled":u?!0:null}),R?Z["aria-expanded"]=!0:de&&(Z["aria-haspopup"]="menu",Z["aria-expanded"]=V);const Ge=()=>f!==null?f?"page":null:l!==null&&ve!==null?l===ve:null,fe=()=>E!==null?E:te!==null&&l!==null?Array.isArray(te)&&te.includes(l)||l===te:!1,Xe=()=>{je||(de?ue(!0):oe(null))};b.useEffect(()=>{if(k&&q.current){const r=q.current,I=r.parentElement;if(I){const _=r.offsetTop-I.offsetTop<I.scrollTop,W=r.offsetTop-I.offsetTop+r.clientHeight;(_||W)&&r.scrollIntoView({behavior:"auto",block:"nearest"})}}},[k]);const Le=ze==="listbox",Ze=e.jsxs(e.Fragment,{children:[e.jsx(tt,{children:r=>e.jsxs(ne,Object.assign({id:M,tabIndex:-1,className:h(o.menuItem,fe()&&!s&&o.modifiers.selected,i),"aria-current":Ge()},!s&&{disabled:g,"aria-label":P},!s&&!d&&{role:Le?"option":"menuitem"},!s&&!d&&Le&&{"aria-selected":fe()},{ref:Ee},!s&&{onClick:I=>{u?I.preventDefault():(Te(I,X),se&&se(I),d&&De(I))}},s&&{htmlFor:r},Z,{children:[e.jsxs("span",{className:h(o.menuItemMain),children:[m==="up"&&e.jsx("span",{className:h(o.menuItemToggleIcon),children:e.jsx(rt,{})}),O&&e.jsx("span",{className:h(o.menuItemIcon),children:O}),s&&e.jsx("span",{className:h(o.menuItemCheck),children:e.jsx(nt,{id:r,component:"span",isChecked:E||!1,onChange:I=>Te(I,X),isDisabled:g,"aria-disabled":u})}),e.jsx("span",{className:h(o.menuItemText),children:t}),T&&e.jsx("span",{className:h(o.menuItemExternalIcon),children:e.jsx(bt,{})}),(d||m==="down")&&e.jsx("span",{className:h(o.menuItemToggleIcon),children:e.jsx(lt,{})}),fe()&&e.jsx("span",{className:h(o.menuItemSelectIcon),children:e.jsx(yt,{})})]}),c&&m!=="up"&&e.jsx("span",{className:h(o.menuItemDescription),children:e.jsx("span",{children:c})})]}))}),V&&e.jsx(G.Provider,{value:{disableHover:je},children:e.jsx(Se.Provider,{value:{direction:Me},children:d})}),typeof S=="function"?S():S,e.jsxs(Oe.Provider,{value:{itemId:l,isDisabled:g},children:[$,p!==null&&e.jsx(He,{icon:"favorites",isFavorited:p,"aria-label":p?"starred":"not starred",onClick:r=>Q(r,l),tabIndex:-1,actionId:"fav"})]})]});return e.jsxs(e.Fragment,{children:[e.jsx("li",Object.assign({className:h(o.menuListItem,g&&o.modifiers.disabled,u&&o.modifiers.ariaDisabled,We&&o.modifiers.currentPath,N&&o.modifiers.load,x&&o.modifiers.loading,k&&"pf-m-focus",z&&o.modifiers.danger,i),onMouseOver:()=>{u||Xe()}},d&&!u&&{onKeyDown:De},{ref:q,role:s?"menuitem":"none"},s&&{"aria-label":P},D,{children:Ze})),w&&e.jsx(it,Object.assign({},w,{triggerRef:Ee}))]})},Pe=b.forwardRef((n,t)=>e.jsx(Nt,Object.assign({},n,{innerRef:t})));Pe.displayName="MenuItem";const Fe=n=>{var{children:t=null,className:i,isAriaMultiselectable:l=!1,"aria-label":a}=n,s=K(n,["children","className","isAriaMultiselectable","aria-label"]);const{role:f}=b.useContext(G);return e.jsx("ul",Object.assign({role:f},f==="listbox"&&{"aria-multiselectable":l},{className:h(o.menuList,i),"aria-label":a},s,{children:t}))};Fe.displayName="MenuList";const C={menuToggle:"pf-v6-c-menu-toggle",menuToggleButton:"pf-v6-c-menu-toggle__button",menuToggleControls:"pf-v6-c-menu-toggle__controls",menuToggleCount:"pf-v6-c-menu-toggle__count",menuToggleIcon:"pf-v6-c-menu-toggle__icon",menuToggleStatusIcon:"pf-v6-c-menu-toggle__status-icon",menuToggleText:"pf-v6-c-menu-toggle__text",menuToggleToggleIcon:"pf-v6-c-menu-toggle__toggle-icon",modifiers:{primary:"pf-m-primary",secondary:"pf-m-secondary",fullHeight:"pf-m-full-height",fullWidth:"pf-m-full-width",plain:"pf-m-plain",expanded:"pf-m-expanded",disabled:"pf-m-disabled",small:"pf-m-small",success:"pf-m-success",warning:"pf-m-warning",danger:"pf-m-danger",placeholder:"pf-m-placeholder",splitButton:"pf-m-split-button",standalone:"pf-m-standalone",typeahead:"pf-m-typeahead",text:"pf-m-text",avatar:"pf-m-avatar"}};var Y;(function(n){n.success="success",n.danger="danger",n.warning="warning"})(Y||(Y={}));var be;(function(n){n.default="default",n.sm="sm"})(be||(be={}));class Be extends b.Component{constructor(){super(...arguments),this.displayName="MenuToggleBase",this.state={ouiaStateId:_e(xe.displayName,this.props.variant)}}render(){const t=this.props,{children:i,className:l,icon:a,badge:s,isExpanded:f,isDisabled:p,isFullHeight:N,isFullWidth:x,isPlaceholder:d,splitButtonItems:m,variant:c,status:y,statusIcon:v,innerRef:g,onClick:u,"aria-label":T,ouiaId:E,ouiaSafe:k,size:z}=t,O=K(t,["children","className","icon","badge","isExpanded","isDisabled","isFullHeight","isFullWidth","isPlaceholder","splitButtonItems","variant","status","statusIcon","innerRef","onClick","aria-label","ouiaId","ouiaSafe","size"]),$=c==="plain",H=c==="plainText",S=c==="typeahead",R=Re(xe.displayName,E??this.state.ouiaStateId,k);let j=v;if(!v)switch(y){case Y.success:j=e.jsx(et,{});break;case Y.warning:j=e.jsx(Ye,{});break;case Y.danger:j=e.jsx(Qe,{});break}const M=e.jsxs("span",{className:h(C.menuToggleControls),children:[y!==void 0&&e.jsx("span",{className:h(C.menuToggleStatusIcon),children:j}),e.jsx("span",{className:h(C.menuToggleToggleIcon),children:e.jsx(st,{})})]}),P=e.jsxs(e.Fragment,{children:[a&&e.jsx("span",{className:h(C.menuToggleIcon),children:a}),S?i:i&&e.jsx("span",{className:h(C.menuToggleText),children:i}),b.isValidElement(s)&&e.jsx("span",{className:h(C.menuToggleCount),children:s}),S?e.jsx("button",Object.assign({type:"button",className:h(C.menuToggleButton),"aria-expanded":f,onClick:u,"aria-label":T||"Menu toggle",tabIndex:-1},R,{children:M})):!$&&M]}),w=h(C.menuToggle,f&&C.modifiers.expanded,c==="primary"&&C.modifiers.primary,c==="secondary"&&C.modifiers.secondary,y&&C.modifiers[y],($||H)&&C.modifiers.plain,H&&"pf-m-text",N&&C.modifiers.fullHeight,x&&C.modifiers.fullWidth,p&&C.modifiers.disabled,d&&C.modifiers.placeholder,z===be.sm&&C.modifiers.small,l),A=Object.assign(Object.assign({children:P},p&&{disabled:!0}),O);return S?e.jsx("div",Object.assign({ref:g,className:h(w,C.modifiers.typeahead)},A)):m?e.jsxs("div",{ref:g,className:h(w,C.modifiers.splitButton),children:[m,e.jsxs("button",Object.assign({className:h(C.menuToggleButton,i&&C.modifiers.text),type:"button","aria-expanded":f,"aria-label":T,disabled:p,onClick:u},O,R,{children:[i&&e.jsx("span",{className:h(C.menuToggleText),children:i}),M]}))]}):e.jsx("button",Object.assign({className:h(w),type:"button","aria-label":T,"aria-expanded":f,ref:g,disabled:p,onClick:u},A,R))}}Be.defaultProps={className:"",isExpanded:!1,isDisabled:!1,isFullWidth:!1,isFullHeight:!1,isPlaceholder:!1,size:"default",ouiaSafe:!0};const xe=b.forwardRef((n,t)=>e.jsx(Be,Object.assign({innerRef:t},n)));xe.displayName="MenuToggle";const Ct=n=>{var{children:t,className:i,onSelect:l,isOpen:a,toggle:s,shouldFocusToggleOnSelect:f=!1,onOpenChange:p,onToggleKeydown:N,isPlain:x,isScrollable:d,innerRef:m,ouiaId:c,ouiaSafe:y=!0,zIndex:v=9999,popperProps:g,onOpenChangeKeys:u=["Escape","Tab"],menuHeight:T,maxMenuHeight:E,shouldFocusFirstItemOnOpen:k=!1,shouldPreventScrollOnItemFocus:z=!0,focusTimeoutDelay:O=0}=n,$=K(n,["children","className","onSelect","isOpen","toggle","shouldFocusToggleOnSelect","onOpenChange","onToggleKeydown","isPlain","isScrollable","innerRef","ouiaId","ouiaSafe","zIndex","popperProps","onOpenChangeKeys","menuHeight","maxMenuHeight","shouldFocusFirstItemOnOpen","shouldPreventScrollOnItemFocus","focusTimeoutDelay"]);const H=b.useRef(void 0),S=b.useRef(void 0),R=ke(Ue.displayName,c,y),j=m||H,M=typeof s=="function"||typeof s!="function"&&!s.toggleRef?S:s?.toggleRef,P=b.useRef(a);b.useEffect(()=>{P.current===!1&&a===!0&&k&&setTimeout(()=>{var L;const F=(L=j?.current)===null||L===void 0?void 0:L.querySelector('li button:not(:disabled),li input:not(:disabled),li a:not([aria-disabled="true"])');F&&F.focus({preventScroll:z})},O),P.current=a},[a]),b.useEffect(()=>{const L=D=>{var B,U,X,Q;a&&p&&(!((B=j.current)===null||B===void 0)&&B.contains(D.target)||!((U=M.current)===null||U===void 0)&&U.contains(D.target))&&u.includes(D.key)&&(p(!1),(X=M.current)===null||X===void 0||X.focus()),!((Q=M.current)===null||Q===void 0)&&Q.contains(D.target)&&(N?N(D):a&&dt(D,j))},F=D=>{var B,U;a&&p&&!(!((B=M?.current)===null||B===void 0)&&B.contains(D.target))&&a&&!(!((U=j.current)===null||U===void 0)&&U.contains(D.target))&&p(!1)};return window.addEventListener("keydown",L),window.addEventListener("click",F),()=>{window.removeEventListener("keydown",L),window.removeEventListener("click",F)}},[a,j,M,p,u,N,z,k,O]);const w=E!==void 0||T!==void 0||d,A=e.jsx(ae,Object.assign({className:h(i),ref:j,onSelect:(L,F)=>{var D;l&&l(L,F),f&&((D=M.current)===null||D===void 0||D.focus())},isPlain:x,isScrollable:w},$,R,{children:e.jsx(Ae,{menuHeight:T,maxMenuHeight:E,children:t})}));return e.jsx(ot,Object.assign({trigger:typeof s=="function"?s(M):s.toggleNode,triggerRef:M,popper:A,popperRef:j,isVisible:a,zIndex:v},g))},Ue=b.forwardRef((n,t)=>e.jsx(Ct,Object.assign({innerRef:t},n)));Ue.displayName="Dropdown";const jt=n=>{var{children:t,className:i,description:l,isDisabled:a,isAriaDisabled:s,value:f,onClick:p,ouiaId:N,ouiaSafe:x,innerRef:d,tooltipProps:m}=n,c=K(n,["children","className","description","isDisabled","isAriaDisabled","value","onClick","ouiaId","ouiaSafe","innerRef","tooltipProps"]);const y=ke(Ve.displayName,N,x);return e.jsx(Pe,Object.assign({className:h(i),description:l,isDisabled:a,isAriaDisabled:s,itemId:f,onClick:p,tooltipProps:m,ref:d},y,c,{children:t}))},Ve=b.forwardRef((n,t)=>e.jsx(jt,Object.assign({},n,{innerRef:t})));Ve.displayName="DropdownItem";const Mt=n=>{var{children:t,className:i}=n,l=K(n,["children","className"]);return e.jsx(Fe,Object.assign({className:h(i)},l,{children:t}))};Mt.displayName="DropdownList";export{yt as C,Ue as D,bt as E,Ie as K,xe as M,vt as S,Mt as a,Ve as b,he as c,G as d,ae as e,Ae as f,Fe as g,ct as h,Pe as i,C as j,He as k,be as l,Y as m,dt as o,kt as s};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
.pf-v6-c-code-editor{--pf-v6-c-code-editor__controls--PaddingInlineStart: var(--pf-t--global--spacer--sm);--pf-v6-c-code-editor__controls--Gap: var(--pf-t--global--spacer--gap--action-to-action--plain);--pf-v6-c-code-editor__header--before--BorderBlockEndWidth: var(--pf-t--global--border--width--box--default);--pf-v6-c-code-editor__header--before--BorderBlockEndColor: var(--pf-t--global--border--color--default);--pf-v6-c-code-editor__header-content--BackgroundColor: var(--pf-t--global--background--color--secondary--default);--pf-v6-c-code-editor__header-content--m-plain--BackgroundColor: var(--pf-t--global--background--color--primary--default);--pf-v6-c-code-editor__header-content--PaddingBlockStart: var(--pf-t--global--spacer--xs);--pf-v6-c-code-editor__header-content--PaddingBlockEnd: var(--pf-t--global--spacer--xs);--pf-v6-c-code-editor__header-content--PaddingInlineStart: var(--pf-t--global--spacer--sm);--pf-v6-c-code-editor__header-content--PaddingInlineEnd: var(--pf-t--global--spacer--sm);--pf-v6-c-code-editor__header-content--BorderStartStartRadius: var(--pf-t--global--border--radius--medium);--pf-v6-c-code-editor__header-content--BorderStartEndRadius: var(--pf-t--global--border--radius--medium);--pf-v6-c-code-editor__upload--PaddingInlineStart: var(--pf-t--global--spacer--md);--pf-v6-c-code-editor__upload--PaddingInlineEnd: var(--pf-t--global--spacer--md);--pf-v6-c-code-editor__upload--PaddingBlockStart: var(--pf-t--global--spacer--md);--pf-v6-c-code-editor__upload--PaddingBlockEnd: var(--pf-t--global--spacer--md);--pf-v6-c-code-editor__upload--BorderRadius: var(--pf-t--global--border--radius--medium);--pf-v6-c-code-editor__main--BorderColor: var(--pf-t--global--border--color--default);--pf-v6-c-code-editor__main--BorderWidth: var(--pf-t--global--border--width--box--default);--pf-v6-c-code-editor__main--BorderEndStartRadius: var(--pf-t--global--border--radius--medium);--pf-v6-c-code-editor__main--BorderEndEndRadius: var(--pf-t--global--border--radius--medium);--pf-v6-c-code-editor__main--BackgroundColor: var(--pf-t--global--background--color--primary--default);--pf-v6-c-code-editor--m-read-only__main--BackgroundColor: var(--pf-t--global--background--color--secondary--default);--pf-v6-c-code-editor__upload--before--BorderWidth: 0;--pf-v6-c-code-editor__upload--before--BorderColor: transparent;--pf-v6-c-code-editor__main--m-drag-hover--before--BorderWidth: var(--pf-t--global--border--width--divider--hover);--pf-v6-c-code-editor__main--m-drag-hover--before--BorderColor: var( --pf-t--global--border--color--clicked);--pf-v6-c-code-editor__main--m-drag-hover--after--BackgroundColor: var(--pf-t--global--background--color--primary--default);--pf-v6-c-code-editor__main--m-drag-hover--after--Opacity: .1;--pf-v6-c-code-editor__code--PaddingBlockStart: var(--pf-t--global--spacer--sm);--pf-v6-c-code-editor__code--PaddingInlineEnd: var(--pf-t--global--spacer--sm);--pf-v6-c-code-editor__code--PaddingBlockEnd: var(--pf-t--global--spacer--sm);--pf-v6-c-code-editor__code--PaddingInlineStart: var(--pf-t--global--spacer--sm);--pf-v6-c-code-editor__code-pre--FontSize: var(--pf-t--global--font--size--sm);--pf-v6-c-code-editor__code-pre--FontFamily: var(--pf-t--global--font--family--mono);--pf-v6-c-code-editor__header-main--PaddingInlineEnd: var(--pf-t--global--spacer--sm);--pf-v6-c-code-editor__header-main--PaddingInlineStart: var(--pf-t--global--spacer--sm);--pf-v6-c-code-editor__tab--BackgroundColor: var(--pf-t--global--background--color--primary--default);--pf-v6-c-code-editor__tab--Color: var(--pf-t--global--text--color--subtle);--pf-v6-c-code-editor__tab--PaddingBlockStart: var(--pf-t--global--spacer--sm);--pf-v6-c-code-editor__tab--PaddingInlineEnd: var( --pf-t--global--spacer--sm);--pf-v6-c-code-editor__tab--PaddingBlockEnd: var(--pf-t--global--spacer--sm);--pf-v6-c-code-editor__tab--PaddingInlineStart: var( --pf-t--global--spacer--sm);--pf-v6-c-code-editor__tab--BorderBlockStartWidth: var(--pf-t--global--border--width--box--default);--pf-v6-c-code-editor__tab--BorderInlineEndWidth: var(--pf-t--global--border--width--box--default);--pf-v6-c-code-editor__tab--BorderBlockEndWidth: 0;--pf-v6-c-code-editor__tab--BorderInlineStartWidth: var(--pf-t--global--border--width--box--default);--pf-v6-c-code-editor__tab--BorderColor: var(--pf-t--global--border--color--default);--pf-v6-c-code-editor__tab--BorderStartEndRadius: var(--pf-t--global--border--radius--medium);--pf-v6-c-code-editor__tab-icon--text--MarginInlineStart: var(--pf-t--global--spacer--sm)}.pf-v6-c-code-editor{display:flex;flex-direction:column}.pf-v6-c-code-editor.pf-m-read-only{--pf-v6-c-code-editor__main--BackgroundColor: var(--pf-v6-c-code-editor--m-read-only__main--BackgroundColor)}.pf-v6-c-code-editor.pf-m-full-height{height:100%}.pf-v6-c-code-editor__container{display:flex;flex-direction:column;flex-grow:1}.pf-v6-c-code-editor__header{position:relative;display:flex}.pf-v6-c-code-editor__header:before{position:absolute;inset-block-end:0;inset-inline-start:0;inset-inline-end:0;pointer-events:none;content:"";border-block-end:var(--pf-v6-c-code-editor__header--before--BorderBlockEndWidth) solid var(--pf-v6-c-code-editor__header--before--BorderBlockEndColor)}.pf-v6-c-code-editor__header.pf-m-plain{--pf-v6-c-code-editor__header-content--BackgroundColor: var(--pf-v6-c-code-editor__header-content--m-plain--BackgroundColor)}.pf-v6-c-code-editor__header-content{display:flex;flex:1;align-items:flex-end;padding-block-start:var(--pf-v6-c-code-editor__header-content--PaddingBlockStart);padding-block-end:var(--pf-v6-c-code-editor__header-content--PaddingBlockEnd);padding-inline-start:var(--pf-v6-c-code-editor__header-content--PaddingInlineStart);padding-inline-end:var(--pf-v6-c-code-editor__header-content--PaddingInlineEnd);background-color:var(--pf-v6-c-code-editor__header-content--BackgroundColor);border-start-start-radius:var(--pf-v6-c-code-editor__header-content--BorderStartStartRadius)}.pf-v6-c-code-editor__header-content:last-child{border-start-end-radius:var(--pf-v6-c-code-editor__header-content--BorderStartEndRadius)}.pf-v6-c-code-editor__controls{display:flex;gap:var(--pf-v6-c-code-editor__controls--Gap);align-items:flex-start}.pf-v6-c-code-editor__header-main{flex-grow:1;align-self:center;padding-inline-start:var(--pf-v6-c-code-editor__header-main--PaddingInlineStart);padding-inline-end:var(--pf-v6-c-code-editor__header-main--PaddingInlineEnd)}.pf-v6-c-code-editor__upload{position:relative;padding-block-start:var(--pf-v6-c-code-editor__upload--PaddingBlockStart);padding-block-end:var(--pf-v6-c-code-editor__upload--PaddingBlockEnd);padding-inline-start:var(--pf-v6-c-code-editor__upload--PaddingInlineStart);padding-inline-end:var(--pf-v6-c-code-editor__upload--PaddingInlineEnd)}.pf-v6-c-code-editor__upload:before{position:absolute;inset-block-start:var(--pf-v6-c-code-editor__upload--PaddingBlockStart);inset-block-end:var(--pf-v6-c-code-editor__upload--PaddingBlockEnd);inset-inline-start:var(--pf-v6-c-code-editor__upload--PaddingInlineStart);inset-inline-end:var(--pf-v6-c-code-editor__upload--PaddingInlineEnd);content:"";border:var(--pf-v6-c-code-editor__upload--before--BorderWidth) dashed var(--pf-v6-c-code-editor__upload--before--BorderColor);border-radius:var(--pf-v6-c-code-editor__upload--BorderRadius)}.pf-v6-c-code-editor__main{position:relative;flex-grow:1;color:var(--pf-v6-c-code-editor__main--Color, inherit);background-color:var(--pf-v6-c-code-editor__main--BackgroundColor);border:var(--pf-v6-c-code-editor__main--BorderWidth) solid;border-color:var(--pf-v6-c-code-editor__main--BorderColor);border-end-start-radius:var(--pf-v6-c-code-editor__main--BorderEndStartRadius);border-end-end-radius:var(--pf-v6-c-code-editor__main--BorderEndEndRadius)}.pf-v6-c-code-editor__main.pf-m-drag-hover{--pf-v6-c-code-editor__upload--before--BorderWidth: var(--pf-v6-c-code-editor__main--m-drag-hover--before--BorderWidth);--pf-v6-c-code-editor__upload--before--BorderColor: var(--pf-v6-c-code-editor__main--m-drag-hover--before--BorderColor)}.pf-v6-c-code-editor__main .monaco-editor{background-color:var(--pf-v6-c-code-editor__main--BackgroundColor)}.pf-v6-c-code-editor__main a.label-name{text-decoration-line:none}.pf-v6-c-code-editor__header+.pf-v6-c-code-editor__main{border-block-start-width:0}.pf-v6-c-code-editor__code{position:relative;height:100%;padding-block-start:var(--pf-v6-c-code-editor__code--PaddingBlockStart);padding-block-end:var(--pf-v6-c-code-editor__code--PaddingBlockEnd);padding-inline-start:var(--pf-v6-c-code-editor__code--PaddingInlineStart);padding-inline-end:var(--pf-v6-c-code-editor__code--PaddingInlineEnd)}.pf-v6-c-code-editor__code .pf-v6-c-code-editor__code-pre{font-family:var(--pf-v6-c-code-editor__code-pre--FontFamily);font-size:var(--pf-v6-c-code-editor__code-pre--FontSize);white-space:pre-wrap}.pf-v6-c-code-editor__tab{position:relative;display:flex;align-items:center;padding-block-start:var(--pf-v6-c-code-editor__tab--PaddingBlockStart);padding-block-end:var(--pf-v6-c-code-editor__tab--PaddingBlockEnd);padding-inline-start:var(--pf-v6-c-code-editor__tab--PaddingInlineStart);padding-inline-end:var(--pf-v6-c-code-editor__tab--PaddingInlineEnd);color:var(--pf-v6-c-code-editor__tab--Color);background-color:var(--pf-v6-c-code-editor__tab--BackgroundColor);border-color:var(--pf-v6-c-code-editor__tab--BorderColor);border-style:solid;border-block-start-width:var(--pf-v6-c-code-editor__tab--BorderBlockStartWidth);border-block-end-width:var(--pf-v6-c-code-editor__tab--BorderBlockEndWidth);border-inline-start-width:var(--pf-v6-c-code-editor__tab--BorderInlineStartWidth);border-inline-end-width:var(--pf-v6-c-code-editor__tab--BorderInlineEndWidth);border-start-end-radius:var(--pf-v6-c-code-editor__tab--BorderStartEndRadius)}.pf-v6-c-code-editor__tab-icon+.pf-v6-c-code-editor__tab-text{margin-inline-start:var(--pf-v6-c-code-editor__tab-icon--text--MarginInlineStart)}
|