@helloimjolopez-pathway/pathway-components 0.10.0 → 0.10.1
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.
|
@@ -16,14 +16,14 @@
|
|
|
16
16
|
* Outline & Fill stroke v1 Subtle, Figma Strong (Neutral Bold, accents plain).
|
|
17
17
|
* Neutral Naked text v1 Neutral/Bold, Figma Neutral/Base.
|
|
18
18
|
* Stroke placement Inside the badge, which keeps its size in every style
|
|
19
|
-
* (Small 20, Medium
|
|
19
|
+
* (Small 20, Medium 22, Large 24). An inset box-shadow
|
|
20
20
|
* draws it without changing the box.
|
|
21
21
|
* Figma's default leading icon is the placeholder `error`; in code the icon is
|
|
22
22
|
* passed explicitly, so existing call sites render exactly as before.
|
|
23
23
|
*
|
|
24
24
|
* DISMISSIBLE and INTERACTIVE, every size, with or without icons:
|
|
25
25
|
* outer frame invisible, min width and height Accessibility/Touch Target/AA
|
|
26
|
-
* (44). The
|
|
26
|
+
* (44). The badge keeps its size (20 / 22 / 24) inside it.
|
|
27
27
|
* Focus Ring wraps Container.Main, padding FocusRing/Offset, ring outside
|
|
28
28
|
* when Focused.
|
|
29
29
|
* Container.Main the badge: fill, stroke inside, CornerRadius/Large;
|
|
@@ -101,8 +101,8 @@ const ACTION = (s) => {
|
|
|
101
101
|
|
|
102
102
|
export const BADGE_SIZE_SPEC = {
|
|
103
103
|
Small: { fontSize: "font-size-xs", lineHeight: "line-height-xs-single", icon: 11, ico: 12, contentMax: 200, height: 20 },
|
|
104
|
-
Medium: { fontSize: "font-size-xs", lineHeight: "line-height-xs-single", icon: 12, ico: 14, contentMax: 196 },
|
|
105
|
-
Large: { fontSize: "font-size-s", lineHeight: "line-height-xs-single", icon: 14, ico: 16, contentMax: 192 },
|
|
104
|
+
Medium: { fontSize: "font-size-xs", lineHeight: "line-height-xs-single", icon: 12, ico: 14, contentMax: 196, height: 22 },
|
|
105
|
+
Large: { fontSize: "font-size-s", lineHeight: "line-height-xs-single", icon: 14, ico: 16, contentMax: 192, height: 24 },
|
|
106
106
|
};
|
|
107
107
|
|
|
108
108
|
/** Layout constants. Static keeps v1's asymmetric padding; the other types use T.pill / T.text. */
|
|
@@ -147,7 +147,7 @@ const strokeShadow = (stroke) => (stroke ? `inset 0 0 0 ${L.border} ${stroke}` :
|
|
|
147
147
|
const focusRing = (focused) => (focused
|
|
148
148
|
? { outline: `${T.ringWidth} solid ${T.ring}`, outlineOffset: T.ringOffset }
|
|
149
149
|
: { outline: "none" });
|
|
150
|
-
/*
|
|
150
|
+
/* Every size has a fixed height (Small 20, Medium 22, Large 24) with its text centred, so none needs top and bottom padding. */
|
|
151
151
|
const fixedHeight = (spec) => (spec.height ? { height: spec.height, paddingTop: 0, paddingBottom: 0 } : {});
|
|
152
152
|
const transition = `background ${T.duration} ${T.easing}, color ${T.duration} ${T.easing}, box-shadow ${T.duration} ${T.easing}`;
|
|
153
153
|
|
|
@@ -333,7 +333,7 @@ Error generating stack: `+a.message+`
|
|
|
333
333
|
:host { display: inline-flex; }
|
|
334
334
|
:host([hidden]) { display: none; }
|
|
335
335
|
.pw-tooltip-wc-trigger { display: inline-flex; }
|
|
336
|
-
`,dm=["content","describe","purpose","side","align","arrow","persist-on-press","disabled"],cm=0,N1=class extends HTMLElement{static get observedAttributes(){return dm}constructor(){super(),this._reactRoot=null,this._descId=`pw-tooltip-desc-${++cm}`}connectedCallback(){if(!this.shadowRoot){let t=this.attachShadow({mode:"open"}),n=document.createElement("style");n.textContent=lm,t.appendChild(n),this._mount=document.createElement("span"),t.appendChild(this._mount),this._reactRoot=(0,f4.createRoot)(this._mount)}this._render()}disconnectedCallback(){let t=this._reactRoot;this._reactRoot=null,t&&Promise.resolve().then(()=>t.unmount())}attributeChangedCallback(){this._render()}_bool(t){if(!this.hasAttribute(t))return;let n=this.getAttribute(t);return n!=="false"&&n!=="0"}_wireAria(t,n,r){let o=[...this.children].find(s=>s.getAttribute("slot")!=="pw-description");if(!o)return;let a=this.querySelector(`#${this._descId}`);if(t==="label"){n&&o.setAttribute("aria-label",n),a?.remove();return}a||(a=document.createElement("span"),a.id=this._descId,a.hidden=!0,a.slot="pw-description",this.appendChild(a)),a.textContent=r||n||"";let i=new Set((o.getAttribute("aria-describedby")||"").split(/\s+/).filter(Boolean));i.add(this._descId),o.setAttribute("aria-describedby",[...i].join(" "))}_render(){if(!this._reactRoot)return;let t=this.getAttribute("content")||"",n=this.getAttribute("describe")||void 0,r=this.getAttribute("purpose")==="label"?"label":"description";this._wireAria(r,t,n);let o=this.hasAttribute("arrow")?this._bool("arrow"):void 0;this._reactRoot.render(Jl.default.createElement(ji,{content:t,purpose:r,manageAria:!1,side:this.getAttribute("side")||"top",align:this.getAttribute("align")||"center",arrow:o,persistOnPress:!!this._bool("persist-on-press"),disabled:!!this._bool("disabled")},Jl.default.createElement("span",{className:"pw-tooltip-wc-trigger"},Jl.default.createElement("slot"))))}};customElements.get("pathway-tooltip")||customElements.define("pathway-tooltip",N1);var A1=k(V(),1),x4=k(rn(),1);var we=k(V(),1);var $r=k(V(),1);var dn=k(ne(),1),de={focusOutline:"var(--contextual-layout-units-focusring-width) solid var(--semantic-color-stroke-focusring-base)",focusOffset:"0",fillCheckedBase:"var(--semantic-color-fill-action-primary-strong-rest)",fillCheckedHover:"var(--semantic-color-fill-action-primary-strong-hover)",fillCheckedFocused:"var(--semantic-color-fill-action-primary-strong-hover)",fillCheckedPressed:"var(--semantic-color-fill-action-primary-strong-pressed)",fillCheckedDisabled:"var(--semantic-color-fill-action-disabled)",borderBase:"var(--semantic-color-stroke-action-secondary-rest)",borderHover:"var(--semantic-color-stroke-action-secondary-hover)",borderFocused:"var(--semantic-color-stroke-action-secondary-hover)",borderPressed:"var(--semantic-color-stroke-action-secondary-pressed)",borderDisabled:"var(--semantic-color-stroke-action-disabled)",iconPrimary:"var(--semantic-color-foreground-action-primary-on-strong)",iconError:"var(--semantic-color-foreground-action-status-negative-on-strong)",stateLayerUncheckedHover:"var(--semantic-color-fill-action-secondary-hover)",stateLayerCheckedHover:"var(--semantic-color-fill-action-primary-subtle-hover)",stateLayerCheckedFocused:"var(--semantic-color-fill-action-primary-subtle-hover)",stateLayerCheckedPressed:"var(--semantic-color-fill-action-primary-subtle-pressed)",fillErrorBase:"var(--semantic-color-fill-action-status-negative-strong-rest)",fillErrorHover:"var(--semantic-color-fill-action-status-negative-strong-hover)",fillErrorFocused:"var(--semantic-color-fill-action-status-negative-strong-hover)",fillErrorPressed:"var(--semantic-color-fill-action-status-negative-strong-pressed)",fillErrorDisabled:"var(--semantic-color-fill-action-disabled)",borderErrorBase:"var(--semantic-color-stroke-action-status-negative-rest)",borderErrorHover:"var(--semantic-color-stroke-action-status-negative-hover)",borderErrorFocused:"var(--semantic-color-stroke-action-status-negative-hover)",borderErrorPressed:"var(--semantic-color-stroke-action-status-negative-pressed)",borderErrorDisabled:"var(--semantic-color-stroke-action-disabled)",stateLayerErrorHover:"var(--semantic-color-fill-action-status-negative-subtle-hover)",stateLayerHighlightHover:"var(--semantic-color-fill-action-primary-subtle-hover)",labelColor:"var(--semantic-color-foreground-static-neutral-base)",radius:"var(--semantic-layout-units-cornerradius-small)",radiusFull:"100px"},p4={default:18,s:16},m4=44,H1=1.5,um=16;function fm({color:e,size:t}){return(0,dn.jsx)("svg",{width:t,height:t,viewBox:"0 0 18 18",fill:"none","aria-hidden":"true",focusable:"false",children:(0,dn.jsx)("path",{d:"M4 9.5L7.5 13L14 6",stroke:e,strokeWidth:H1,strokeLinecap:"round",strokeLinejoin:"round"})})}function pm({color:e,size:t}){return(0,dn.jsx)("svg",{width:t,height:t,viewBox:"0 0 18 18",fill:"none","aria-hidden":"true",focusable:"false",children:(0,dn.jsx)("path",{d:"M5 9H13",stroke:e,strokeWidth:H1,strokeLinecap:"round"})})}function h4({checked:e=!1,indeterminate:t=!1,error:n=!1,highlight:r=!1,secondary:o=!1,disabled:a=!1,size:i="default",label:s,onChange:l,id:d,name:u,value:m,className:h="",describedBy:$}){let g=Je(),b=(0,$r.useRef)(null),[C,f]=(0,$r.useState)(!1),[c,p]=(0,$r.useState)(!1),[x,v]=(0,$r.useState)(!1),[w,P]=(0,$r.useState)(!1);(0,$r.useEffect)(()=>{b.current&&(b.current.indeterminate=t)},[t]);let S=p4[i]||p4.default,_="transparent";a&&(e||t)?_=n?de.fillErrorDisabled:de.fillCheckedDisabled:!a&&(e||t)&&(n?_=w?de.fillErrorPressed:c?de.fillErrorFocused:C?de.fillErrorHover:de.fillErrorBase:_=w?de.fillCheckedPressed:c?de.fillCheckedFocused:C?de.fillCheckedHover:de.fillCheckedBase);let E;e||t?E=_:a?E=n?de.borderErrorDisabled:de.borderDisabled:n?E=w?de.borderErrorPressed:c?de.borderErrorFocused:C?de.borderErrorHover:de.borderErrorBase:E=w?de.borderPressed:c?de.borderFocused:C?de.borderHover:de.borderBase;let D="transparent";a||(w?D=e||t?de.stateLayerCheckedPressed:n?de.stateLayerErrorHover:de.stateLayerUncheckedHover:(C||c)&&(e||t?D=n?de.stateLayerErrorHover:c?de.stateLayerCheckedFocused:de.stateLayerCheckedHover:D=n?de.stateLayerErrorHover:r?de.stateLayerHighlightHover:de.stateLayerUncheckedHover));let z=c&&n?"0 0 0 3px var(--semantic-color-fill-static-negative-subtle)":"none",H=n?de.iconError:de.iconPrimary,y=e||t;return(0,dn.jsxs)("label",{className:`pds-checkbox${i==="s"?" pds-checkbox--s":""}${n?" pds-checkbox--error":""}${r?" pds-checkbox--highlight":""}${a?" pds-checkbox--disabled":""}${h?` ${h}`:""}`,style:{display:"inline-flex",alignItems:"center",gap:s?um:0,cursor:a?"not-allowed":"pointer",userSelect:"none",fontFamily:"'Red Hat Text', sans-serif"},onMouseEnter:()=>!a&&f(!0),onMouseLeave:()=>{f(!1),P(!1)},onMouseDown:()=>!a&&P(!0),onMouseUp:()=>P(!1),children:[(0,dn.jsxs)("span",{"aria-hidden":"true",style:{position:"relative",display:"inline-flex",alignItems:"center",justifyContent:"center",width:m4,height:m4,borderRadius:de.radiusFull,backgroundColor:D,transition:g?"none":"background-color var(--motion-duration-3) var(--motion-easing-standard)",boxShadow:z,flexShrink:0},children:[(0,dn.jsx)("input",{ref:b,type:"checkbox",id:d,name:u,value:m,checked:t?!1:e,disabled:a,"aria-describedby":$,onChange:L=>l&&l(L.target.checked),onFocus:L=>{p(!0),v(L.target.matches(":focus-visible"))},onBlur:()=>{p(!1),v(!1)},style:{position:"absolute",width:S,height:S,opacity:0,margin:0,padding:0,cursor:a?"not-allowed":"pointer",zIndex:1}}),(0,dn.jsx)("span",{"aria-hidden":"true",style:{display:"inline-flex",alignItems:"center",justifyContent:"center",width:S,height:S,borderRadius:de.radius,border:`${H1}px solid ${x&&!a?"transparent":E}`,backgroundColor:_,boxSizing:"border-box",outline:x&&!a?de.focusOutline:"none",outlineOffset:de.focusOffset,transition:g?"none":"background-color var(--motion-duration-2) var(--motion-easing-decelerate), border-color var(--motion-duration-2) var(--motion-easing-decelerate)",flexShrink:0},children:y&&(t?(0,dn.jsx)(pm,{color:H,size:S}):(0,dn.jsx)(fm,{color:H,size:S}))})]}),s&&(0,dn.jsx)("span",{style:{fontSize:"var(--semantic-type-font-size-s)",lineHeight:"var(--semantic-type-line-height-s-single)",fontWeight:400,color:a?"var(--semantic-color-foreground-static-neutral-base)":de.labelColor},children:s})]})}var te=k(ne(),1),cn=e=>`var(--semantic-color-${e})`,Ae=e=>`var(--semantic-layout-units-${e})`,mm=e=>`var(--contextual-layout-units-${e})`,F1=e=>`var(--responsive-layout-${e})`,Ki=e=>`var(--semantic-type-${e})`,Ea=(e,t,n,r)=>({fontFamily:Ki("family-brand"),fontSize:Ki(`font-size-${e}`),lineHeight:Ki(`line-height-${t}`),fontWeight:Ki(`weight-${n}`),letterSpacing:Ki(`letter-spacing-${r}`)}),Z={noticeFill:cn("fill-surface-elevated"),noticeStroke:cn("stroke-static-neutral-faint"),hintFill:cn("fill-surface-overlay"),hintStroke:cn("stroke-static-neutral-bold"),messageFill:cn("fill-static-negative-subtle"),messageFg:cn("foreground-static-negative-on-subtle"),progressFill:cn("fill-static-brand-strong"),progressTrack:cn("stroke-static-neutral-faint"),sheetFill:cn("fill-surface-overlay"),scrim:cn("scrim-base"),fgStrong:cn("foreground-static-neutral-strong"),fgBase:cn("foreground-static-neutral-base"),focusRing:cn("stroke-focusring-base"),hintShadow:"var(--elevation-lift)",sheetShadow:"var(--elevation-sheet)",borderWidth:Ae("borderwidth-thin"),noticeRadius:Ae("cornerradius-base"),pillRadius:Ae("cornerradius-full"),messageRadius:Ae("cornerradius-small"),sheetRadius:F1("sheet-corner-radius-cornerradius"),focusWidth:mm("focusring-width"),focusOffset:"0",sectionGap:Ae("gap-medium"),progressGap:Ae("gap-xtight"),titleGap:Ae("gap-tight"),agreementGap:Ae("gap-xtight"),paragraphGap:Ae("gap-base"),toolbarPad:`${Ae("padding-xxtight")} ${Ae("padding-xtight")} ${Ae("padding-xxxtight")}`,contentPad:`${Ae("padding-xtight")} ${Ae("padding-base")} ${Ae("padding-base")}`,hintPad:`${Ae("padding-xxxtight")} ${Ae("padding-xtight")}`,hintGap:Ae("gap-xxtight"),hintOffset:Ae("padding-xtight"),messagePad:Ae("padding-xtight"),messageGap:Ae("gap-tight"),sheetPad:`${F1("sheet-padding-top")} ${F1("sheet-padding-horizontal")} ${Ae("padding-wide")}`,sheetGap:Ae("gap-base"),sheetHeaderPad:Ae("padding-medium"),noticeType:Ea("s","s-single","regular","spacious"),titleType:Ea("r","r-single","medium","wide"),progressType:Ea("xs","xs-single","regular","extraspacious"),hintType:Ea("xs","xs-single","semibold","extraspacious"),messageType:Ea("xs","xs-single","semibold","extraspacious"),sheetTitleType:Ea("m","m-relaxed","semibold","wide"),progressMotion:"width var(--motion-duration-2) var(--motion-easing-standard)",scrimMotion:"pds-ste-fade var(--motion-duration-3) var(--motion-easing-standard)",sheetMotion:"pds-ste-rise var(--motion-duration-4) var(--motion-easing-emphasized)",noticeHeight:200,progressHeight:4,minWidth:320,readThreshold:8,breakpoint:768,sheetFrameHeight:560},hm={scrollInline:"Scroll to the end of the notice before you continue.",readAgreement:"Read the agreement before you agree to it.",scrollSheet:"Scroll to the end of the notice to finish reading.",agree:"Check the box to confirm you have read the notice."},gm={Unread:{},Reading:{progress:.5},Read:{progress:1,read:!0},Agreed:{progress:1,read:!0,checked:!0},Blocked:{msg:"blocked"},"Agreement Missing":{progress:1,read:!0,msg:"agree",missing:!0},"Sheet Unread":{sheetOpen:!0},"Sheet Blocked":{sheetOpen:!0,progress:.4,sheetMsg:"scrollSheet"},"Sheet Read":{sheetOpen:!0,progress:1}};function vm(){if(typeof document>"u"||document.getElementById("pds-ste-styles"))return;let e=document.createElement("style");e.id="pds-ste-styles",e.textContent="@keyframes pds-ste-fade{from{opacity:0}to{opacity:1}}@keyframes pds-ste-rise{from{transform:translateY(100%)}to{transform:translateY(0)}}.pds-ste__region{outline:none}.pds-ste__region p{margin:0}",document.head.appendChild(e)}var g4=()=>typeof window<"u"&&typeof window.matchMedia=="function",v4=`(min-width: ${Z.breakpoint}px)`;function bm(e){let[t,n]=(0,we.useState)(()=>g4()?window.matchMedia(v4).matches:!0);return(0,we.useEffect)(()=>{if(e!=="auto"||!g4())return;let r=window.matchMedia(v4);n(r.matches);let o=a=>n(a.matches);return r.addEventListener("change",o),()=>r.removeEventListener("change",o)},[e]),e==="inline"||e==="sheet"?e:t?"inline":"sheet"}var To=e=>{e&&typeof e.focus=="function"&&e.focus()};function ym({value:e,labelId:t}){let n=Je(),r=Math.round(e*100);return(0,te.jsxs)("div",{className:"pds-ste__progress",style:{display:"flex",flexDirection:"column",gap:Z.progressGap},children:[(0,te.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",...Z.progressType,color:Z.fgBase},children:[(0,te.jsx)("span",{id:t,children:"Reading progress"}),(0,te.jsxs)("span",{"aria-hidden":"true",children:[r,"%"]})]}),(0,te.jsx)("div",{role:"progressbar","aria-labelledby":t,"aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":r,style:{height:Z.progressHeight,borderRadius:Z.pillRadius,background:Z.progressTrack,overflow:"hidden"},children:(0,te.jsx)("div",{style:{width:`${r}%`,height:"100%",borderRadius:Z.pillRadius,background:Z.progressFill,transition:n?"none":Z.progressMotion}})})]})}function b4({id:e,text:t,nonce:n}){return(0,te.jsx)("div",{id:e,children:t&&(0,te.jsxs)("div",{role:"alert",style:{display:"flex",alignItems:"flex-start",gap:Z.messageGap,padding:Z.messagePad,borderRadius:Z.messageRadius,background:Z.messageFill,color:Z.messageFg,...Z.messageType},children:[(0,te.jsx)(me,{name:"error",size:"M",fill:1}),(0,te.jsx)("span",{children:t})]},n)})}function $m(){return(0,te.jsx)("div",{"aria-hidden":"true",style:{position:"absolute",left:0,right:0,bottom:Z.hintOffset,display:"flex",justifyContent:"center",pointerEvents:"none"},children:(0,te.jsxs)("span",{style:{display:"inline-flex",alignItems:"center",gap:Z.hintGap,padding:Z.hintPad,borderRadius:Z.pillRadius,background:Z.hintFill,boxShadow:Z.hintShadow,border:`${Z.borderWidth} solid ${Z.hintStroke}`,...Z.hintType,color:Z.fgStrong},children:[(0,te.jsx)(me,{name:"arrow_downward",size:"M"}),"Scroll to continue"]})})}function y4({children:e,height:t,titleId:n,regionRef:r,showPrint:o,onPrint:a,showHint:i,onProgress:s,startAt:l}){let d=(0,we.useRef)(null),[u,m]=(0,we.useState)(!1),h=(0,we.useCallback)(g=>{if(!g)return;let b=g.scrollHeight-g.clientHeight;s(b<=Z.readThreshold?1:Math.min(1,g.scrollTop/(b-Z.readThreshold)))},[s]);(0,we.useLayoutEffect)(()=>{let g=d.current&&d.current.querySelector(".pds-scrollable__view");if(!g||(l!=null&&(g.scrollTop=(g.scrollHeight-g.clientHeight)*l),h(g),typeof ResizeObserver>"u"))return;let b=new ResizeObserver(()=>h(g));return b.observe(g),()=>b.disconnect()},[h,t,l]);let $=g=>{let b=!0;try{b=g.target.matches(":focus-visible")||g.target.dataset.moved==="1"}catch{}delete g.target.dataset.moved,m(b)};return(0,te.jsxs)("div",{ref:d,className:"pds-ste__notice",onScrollCapture:g=>h(g.target),style:{position:"relative",background:Z.noticeFill,border:`${Z.borderWidth} solid ${Z.noticeStroke}`,borderRadius:Z.noticeRadius,outline:u?`${Z.focusWidth} solid ${Z.focusRing}`:"none",outlineOffset:Z.focusOffset},children:[o&&(0,te.jsx)("div",{style:{padding:Z.toolbarPad},children:(0,te.jsx)(Zr,{buttonStyle:"Naked",type:"Secondary",size:"S",text:"Print",showLeadingIcon:!0,leadingIcon:"print",onClick:a})}),(0,te.jsx)(Wl,{style:{height:t},children:(0,te.jsx)("div",{ref:r,className:"pds-ste__region",role:"region",tabIndex:0,"aria-labelledby":n,onFocus:$,onBlur:()=>m(!1),style:{padding:Z.contentPad,display:"flex",flexDirection:"column",gap:Z.paragraphGap,...Z.noticeType,color:Z.fgStrong},children:e})}),i&&(0,te.jsx)($m,{})]})}function xm({title:e,titleId:t,stepLabel:n,onClose:r,children:o,footer:a,initialFocusRef:i,contained:s}){let l=Je(),d=(0,we.useRef)(null);(0,we.useEffect)(()=>{if(s)return;let m=document.body.style.overflow;document.body.style.overflow="hidden";let h=setTimeout(()=>To(i.current),0);return()=>{clearTimeout(h),document.body.style.overflow=m}},[i,s]);let u=m=>{if(m.key==="Escape"){m.stopPropagation(),r();return}if(m.key!=="Tab"||!d.current)return;let h=d.current.querySelectorAll("button, input, [tabindex='0']");if(!h.length)return;let $=h[0],g=h[h.length-1];m.shiftKey&&document.activeElement===$?(m.preventDefault(),To(g)):!m.shiftKey&&document.activeElement===g&&(m.preventDefault(),To($))};return(0,te.jsxs)("div",{className:"pds-ste-sheet",style:{position:s?"absolute":"fixed",inset:0,zIndex:s?1:1e3,display:"flex",flexDirection:"column",justifyContent:"flex-end"},children:[(0,te.jsx)("div",{className:"pds-ste-sheet__scrim",onClick:r,style:{position:"absolute",inset:0,background:Z.scrim,animation:l?"none":Z.scrimMotion}}),(0,te.jsxs)("div",{ref:d,role:"dialog","aria-modal":"true","aria-labelledby":t,onKeyDown:u,style:{position:"relative",background:Z.sheetFill,boxShadow:Z.sheetShadow,borderRadius:`${Z.sheetRadius} ${Z.sheetRadius} 0 0`,padding:Z.sheetPad,display:"flex",flexDirection:"column",gap:Z.sheetGap,maxHeight:"85vh",animation:l?"none":Z.sheetMotion},children:[(0,te.jsxs)("div",{className:"pds-ste-sheet__header",style:{display:"flex",alignItems:"center",justifyContent:"space-between",paddingLeft:Z.sheetHeaderPad,paddingRight:Z.sheetHeaderPad},children:[(0,te.jsx)("span",{style:{...Z.progressType,color:Z.fgBase},children:n}),(0,te.jsx)(Zr,{buttonStyle:"Naked",type:"Secondary",size:"S",showText:!1,showLeadingIcon:!0,leadingIcon:"close",text:"Close",ariaLabel:"Close",onClick:r})]}),(0,te.jsx)("h2",{id:t,style:{margin:0,textAlign:"center",...Z.sheetTitleType,color:Z.fgStrong},children:e}),o,a]})]})}function $4({title:e,children:t,agreementLabel:n,onContinue:r,layout:o="auto",noticeHeight:a=Z.noticeHeight,showPrint:i=!0,onPrint:s,continueLabel:l="Continue",readAgreementLabel:d="Read Agreement",readLabel:u="Agreement read",doneReadingLabel:m="Done Reading",stepLabel:h,messages:$,onAgreeChange:g,demoState:b,className:C=""}){vm();let f=bm(o),c=(0,we.useId)().replace(/:/g,""),p={title:`${c}-title`,progress:`${c}-rp`,msg:`${c}-msg`,sheetTitle:`${c}-sheet-title`,sheetMsg:`${c}-sheet-msg`,checkbox:`${c}-cb`},x={...hm,...$},v=b&&gm[b]||{},w=!!b,P=v.msg==="blocked"?f==="inline"?"scrollInline":"readAgreement":v.msg||null,[S,_]=(0,we.useState)(v.progress||0),[E,D]=(0,we.useState)(!!v.read),[z,H]=(0,we.useState)(!!v.checked),[y,L]=(0,we.useState)(P),[N,T]=(0,we.useState)(v.sheetMsg||null),[U,R]=(0,we.useState)(0),[Y,F]=(0,we.useState)(!!v.sheetOpen),[X,G]=(0,we.useState)(!!v.missing),q=(0,we.useRef)(null),se=(0,we.useRef)(null),be=(0,we.useRef)(null),ee=rt=>{L(rt),R(Dn=>Dn+1)},Ie=rt=>{rt&&(rt.dataset.moved="1",To(rt))},Q=()=>be.current&&be.current.querySelector("button"),oe=(0,we.useCallback)(rt=>{_(Dn=>Math.max(Dn,rt)),rt>=1&&(D(!0),L(Dn=>Dn==="scrollInline"?null:Dn))},[]),Xe=(0,we.useCallback)(rt=>{_(Dn=>Math.max(Dn,rt)),rt>=1&&T(null)},[]),ae=()=>{f==="inline"?(ee("scrollInline"),Ie(q.current)):(ee("readAgreement"),To(Q()))},Se=rt=>{if(!E){ae();return}H(rt),rt&&(L(null),G(!1)),g&&g(rt)},Mt=()=>{if(!E){ae();return}if(!z){G(!0),ee("agree"),To(document.getElementById(p.checkbox));return}r&&r()},nr=()=>{F(!1),T(null),setTimeout(()=>To(Q()),0)},Er=()=>{if(S<1){T("scrollSheet"),R(rt=>rt+1),Ie(se.current);return}D(!0),L(null),nr()},Oa=s||(()=>{typeof window<"u"&&window.print()}),pn=(0,te.jsxs)("div",{className:"pds-ste__agreement",style:{display:"flex",flexDirection:"column",gap:Z.agreementGap},children:[(0,te.jsx)(h4,{id:p.checkbox,checked:z,error:X&&!z,label:n,onChange:Se,describedBy:p.msg}),(0,te.jsx)(b4,{id:p.msg,text:y?x[y]:null,nonce:U})]}),za=(0,te.jsx)("div",{className:"pds-ste__actions",style:{display:"flex",justifyContent:"center"},children:(0,te.jsx)(Zr,{buttonStyle:"Fill",type:"Primary",size:"L",text:l,onClick:Mt,"aria-describedby":p.msg})}),Ao={display:"flex",flexDirection:"column",gap:Z.sectionGap,minWidth:Z.minWidth,width:"100%"};return f==="inline"?(0,te.jsxs)("div",{className:`pds-ste ${C}`,style:Ao,children:[(0,te.jsx)(ym,{value:S,labelId:p.progress}),(0,te.jsxs)("div",{className:"pds-ste__notice-group",style:{display:"flex",flexDirection:"column",gap:Z.titleGap},children:[(0,te.jsx)("div",{id:p.title,style:{...Z.titleType,color:Z.fgStrong},children:e}),(0,te.jsx)(y4,{height:a,titleId:p.title,regionRef:q,showPrint:i,onPrint:Oa,showHint:!E,onProgress:oe,startAt:v.read?1:v.progress,children:t})]}),pn,za]}):(0,te.jsxs)("div",{className:`pds-ste ${C}`,style:w&&Y?{...Ao,position:"relative",minHeight:Z.sheetFrameHeight}:Ao,children:[(0,te.jsx)("span",{ref:be,style:{display:"flex"},children:(0,te.jsx)(Zr,{buttonStyle:"Fill",type:"Tertiary",size:"M",text:E?u:d,showTrailingIcon:!0,trailingIcon:E?"check":"open_in_new","aria-haspopup":"dialog",onClick:()=>{F(!0),T(null)}})}),pn,za,Y&&(0,te.jsxs)(xm,{title:e,titleId:p.sheetTitle,stepLabel:h,onClose:nr,initialFocusRef:se,contained:w,footer:(0,te.jsx)("div",{style:{display:"flex",justifyContent:"center"},children:(0,te.jsx)(Zr,{buttonStyle:"Fill",type:"Primary",size:"L",text:m,onClick:Er,"aria-describedby":p.sheetMsg})}),children:[(0,te.jsx)(y4,{height:a,titleId:p.sheetTitle,regionRef:se,showPrint:!1,showHint:S<1,onProgress:Xe,startAt:v.sheetOpen?v.progress:void 0,children:t}),(0,te.jsx)(b4,{id:p.sheetMsg,text:N?x[N]:null,nonce:U})]})]})}var Cm=["notice-title","agreement-label","layout","notice-height","show-print","continue-label","read-agreement-label","read-label","done-reading-label","step-label"],D1=class extends HTMLElement{static get observedAttributes(){return Cm}constructor(){super(),this._reactRoot=null,this._notice=""}connectedCallback(){this._reactRoot||(this._notice=this.innerHTML,this.innerHTML="",this._mount=document.createElement("div"),this.appendChild(this._mount),this._reactRoot=(0,x4.createRoot)(this._mount)),this._render()}disconnectedCallback(){let t=this._reactRoot;this._reactRoot=null,t&&Promise.resolve().then(()=>t.unmount())}attributeChangedCallback(){this._render()}_attr(t){return this.getAttribute(t)||void 0}_emit(t,n,r=!1){return this.dispatchEvent(new CustomEvent(t,{detail:n,bubbles:!0,composed:!0,cancelable:r}))}_render(){if(!this._reactRoot)return;let t=parseInt(this.getAttribute("notice-height"),10),n=this.getAttribute("show-print");this._reactRoot.render(A1.default.createElement($4,{title:this._attr("notice-title"),agreementLabel:this._attr("agreement-label"),layout:this._attr("layout")||"auto",noticeHeight:Number.isFinite(t)?t:void 0,showPrint:n!=="false"&&n!=="0",continueLabel:this._attr("continue-label"),readAgreementLabel:this._attr("read-agreement-label"),readLabel:this._attr("read-label"),doneReadingLabel:this._attr("done-reading-label"),stepLabel:this._attr("step-label"),onContinue:()=>this._emit("pathway-continue"),onPrint:()=>{this._emit("pathway-print",void 0,!0)&&window.print()},onAgreeChange:r=>this._emit("pathway-agree",{checked:r})},A1.default.createElement("div",{dangerouslySetInnerHTML:{__html:this._notice},style:{display:"contents"}})))}};customElements.get("pathway-scroll-to-enable")||customElements.define("pathway-scroll-to-enable",D1);var O1=k(V(),1),C4=k(rn(),1);var wm=["open","sheet-title","menu","show-handle","show-back","close-label","back-label"],z1=class extends HTMLElement{static get observedAttributes(){return wm}constructor(){super(),this._reactRoot=null,this._body=""}connectedCallback(){this._reactRoot||(this._body=this.innerHTML,this.innerHTML="",this._mount=document.createElement("div"),this.appendChild(this._mount),this._reactRoot=(0,C4.createRoot)(this._mount)),this._render()}disconnectedCallback(){let t=this._reactRoot;this._reactRoot=null,t&&Promise.resolve().then(()=>t.unmount())}attributeChangedCallback(){this._render()}_emit(t,n){this.dispatchEvent(new CustomEvent(t,{detail:n,bubbles:!0,composed:!0}))}_close(){this.removeAttribute("open"),this._emit("pathway-close")}_render(){if(!this._reactRoot)return;let t=this.getAttribute("show-handle"),n=r=>{let o=r.target.closest?.('[role^="menuitem"]');!o||o.hasAttribute("disabled")||o.getAttribute("aria-disabled")==="true"||(this._emit("pathway-select",{value:o.dataset.value}),this._close())};this._reactRoot.render(O1.default.createElement(Gl,{open:this.hasAttribute("open"),onOpenChange:r=>{r||this._close()},title:this.getAttribute("sheet-title")||"",menu:this.hasAttribute("menu"),showHandle:t!=="false"&&t!=="0",showBack:this.hasAttribute("show-back"),onBack:()=>this._emit("pathway-back"),closeLabel:this.getAttribute("close-label")||void 0,backLabel:this.getAttribute("back-label")||void 0},O1.default.createElement("div",{dangerouslySetInnerHTML:{__html:this._body},onClick:n,style:{display:"contents"}})))}};customElements.get("pathway-bottom-sheet")||customElements.define("pathway-bottom-sheet",z1);var M4=k(V(),1),I4=k(rn(),1);var Zi=k(V(),1);var pt=k(ne(),1),ft=e=>`var(--semantic-color-${e})`,Xt=e=>`var(--semantic-layout-units-${e})`,w4=e=>`var(--contextual-layout-units-${e})`,ed=e=>`var(--semantic-type-${e})`;var Sm=["Neutral","Info","Positive","Negative"];var td={Neutral:{fill:"fill-static-neutral-base",strokeStrong:"stroke-static-neutral-bold",strokeSubtle:"stroke-static-neutral-bold",text:"foreground-static-neutral-bold",textNaked:"foreground-static-neutral-base"},Severe:{fill:"fill-static-severe-subtle",strokeStrong:"stroke-static-severe-strong",strokeSubtle:"stroke-static-severe-subtle",text:"foreground-static-severe-on-subtle"},Negative:{fill:"fill-static-negative-subtle",strokeStrong:"stroke-static-negative-strong",strokeSubtle:"stroke-static-negative-subtle",text:"foreground-static-negative-on-subtle"},Positive:{fill:"fill-static-positive-subtle",strokeStrong:"stroke-static-positive-strong",strokeSubtle:"stroke-static-positive-subtle",text:"foreground-static-positive-on-subtle"},Attention:{fill:"fill-static-attention-subtle",strokeStrong:"stroke-static-attention-strong",strokeSubtle:"stroke-static-attention-strong",text:"foreground-static-attention-on-subtle"},Info:{fill:"fill-static-info-subtle",strokeStrong:"stroke-static-info-strong",strokeSubtle:"stroke-static-info-subtle",text:"foreground-static-info-on-subtle"},"Accent 2":{fill:"fill-static-accent-jade-subtle",strokeStrong:"stroke-static-accent-jade",strokeSubtle:"stroke-static-accent-jade",text:"foreground-static-accent-jade-on-subtle"},"Accent 3":{fill:"fill-static-accent-mauve-subtle",strokeStrong:"stroke-static-accent-mauve",strokeSubtle:"stroke-static-accent-mauve",text:"foreground-static-accent-mauve-on-subtle"}},km=e=>{let t=(Sm.includes(e)?e:"Neutral").toLowerCase(),n=r=>ft(r.replace("$",t));return{off:{fill:{rest:n("fill-action-status-$-subtle-rest"),hover:n("fill-action-status-$-subtle-hover"),pressed:n("fill-action-status-$-subtle-pressed")},stroke:{rest:n("stroke-action-status-$-rest"),hover:n("stroke-action-status-$-hover"),pressed:n("stroke-action-status-$-pressed")},text:{rest:n("foreground-action-status-$-on-subtle-rest"),hover:n("foreground-action-status-$-on-subtle-hover"),pressed:n("foreground-action-status-$-on-subtle-pressed")}},on:{fill:{rest:n("fill-action-status-$-strong-rest"),hover:n("fill-action-status-$-strong-hover"),pressed:n("fill-action-status-$-strong-pressed")},text:n("foreground-action-status-$-on-strong")}}},S4={Small:{fontSize:"font-size-xs",lineHeight:"line-height-xs-single",icon:11,ico:12,contentMax:200,height:20},Medium:{fontSize:"font-size-xs",lineHeight:"line-height-xs-single",icon:12,ico:14,contentMax:196},Large:{fontSize:"font-size-s",lineHeight:"line-height-xs-single",icon:14,ico:16,contentMax:192}},wn={radius:Xt("cornerradius-large"),radiusX:Xt("cornerradius-full"),border:Xt("borderwidth-base"),padTop:Xt("padding-xxxxtight"),padBottom:Xt("padding-xxxxtight"),padLeft:Xt("padding-xxxtight"),padRight:Xt("padding-xxtight"),gap:Xt("gap-xxxtight")},tt={pill:Xt("padding-xxxtight"),text:Xt("padding-xxxtight"),fieldGap:Xt("gap-xxtight"),rowGap:Xt("gap-xtight"),touchW:Xt("accessibility-touch-target-aa-width"),touchH:Xt("accessibility-touch-target-aa-height"),ring:ft("stroke-focusring-base"),ringWidth:w4("focusring-width"),ringOffset:w4("focusring-offset"),fieldMax:80,badgeMax:240,duration:"var(--motion-duration-2)",easing:"var(--motion-easing-standard)"},k4=(e,t="weight-medium")=>({fontFamily:"inherit",fontSize:ed(e.fontSize),lineHeight:ed(e.lineHeight),fontWeight:ed(t),letterSpacing:ed("letter-spacing-extraspacious"),whiteSpace:"nowrap"}),B1={minWidth:0,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},E4={display:"inline-flex",alignItems:"center",justifyContent:"center",flexShrink:0,minWidth:tt.touchW,minHeight:tt.touchH,boxSizing:"border-box",padding:0,margin:0,border:0,background:"transparent",font:"inherit",color:"inherit",textDecoration:"none",outline:"none"},T4=e=>e?`inset 0 0 0 ${wn.border} ${e}`:"none",P4=e=>e?{outline:`${tt.ringWidth} solid ${tt.ring}`,outlineOffset:tt.ringOffset}:{outline:"none"},_4=e=>e.height?{height:e.height,paddingTop:0,paddingBottom:0}:{},L4=`background ${tt.duration} ${tt.easing}, color ${tt.duration} ${tt.easing}, box-shadow ${tt.duration} ${tt.easing}`;function R4({type:e="static",label:t,fieldLabel:n,showFieldLabel:r=!1,status:o="Neutral",size:a="Small",badgeStyle:i="Outline & Fill",leadingIcon:s,trailingIcon:l,showTrailingIcon:d=!1,selected:u,defaultSelected:m=!1,onChange:h,onRemove:$,href:g,disabled:b=!1,removeDisabled:C=!1,forceState:f,className:c="",style:p,...x}){let v=S4[a]||S4.Small,[w,P]=(0,Zi.useState)(m),[S,_]=(0,Zi.useState)(!1),[E,D]=(0,Zi.useState)(!1),[z,H]=(0,Zi.useState)(!1),y=S||f==="hover",L=E||f==="pressed",N=z||f==="focused",T={"Outline & Fill":{fill:!0,stroke:"strong"},Fill:{fill:!0,stroke:null},Outline:{fill:!1,stroke:"subtle"},Naked:{fill:!1,stroke:null}}[i]||{fill:!0,stroke:"strong"};if(e==="static"){let ae=td[o]||td.Neutral,Se=T.stroke==="strong"?ft(ae.strokeStrong):T.stroke==="subtle"?ft(ae.strokeSubtle):null;return(0,pt.jsxs)("span",{className:`pw-badge ${c}`,"data-type":"static","data-status":o,"data-size":a,style:{display:"inline-flex",alignItems:"center",boxSizing:"border-box",gap:wn.gap,paddingTop:wn.padTop,paddingRight:wn.padRight,paddingBottom:wn.padBottom,paddingLeft:wn.padLeft,..._4(v),borderRadius:wn.radius,background:T.fill?ft(ae.fill):"transparent",boxShadow:Se?`inset 0 0 0 ${wn.border} ${Se}`:"none",color:ft(i==="Naked"&&ae.textNaked?ae.textNaked:ae.text),...k4(v),...p},...x,children:[s&&(0,pt.jsx)(me,{name:s,size:v.icon,fill:1}),t,l&&(0,pt.jsx)(me,{name:l,size:v.icon})]})}let U={display:"inline-flex",alignItems:"center",boxSizing:"border-box",gap:0,paddingTop:wn.padTop,paddingBottom:wn.padBottom,paddingLeft:tt.pill,paddingRight:tt.pill,borderRadius:wn.radius,maxWidth:r?"none":tt.badgeMax,minWidth:0,transition:L4,...k4(v),..._4(v)},R={display:"inline-flex",minWidth:0,paddingLeft:tt.text,paddingRight:tt.text},Y=(ae,Se=0)=>(0,pt.jsx)(me,{name:ae,size:v.ico,fill:Se,style:{flexShrink:0}});if(e==="dismissible"){let ae=td[o]||td.Neutral,Se=T.stroke==="strong"?ft(ae.strokeStrong):T.stroke==="subtle"?ft(ae.strokeSubtle):null,Mt=b||C,nr=r&&n?`${n} ${t}`:t,Er=Mt?"transparent":L?ft("fill-action-secondary-pressed"):y?ft("fill-action-secondary-hover"):"transparent",Oa=ft(Mt?"foreground-action-disabled":L?"foreground-action-secondary-pressed":y?"foreground-action-secondary-hover":"foreground-action-secondary-rest");return(0,pt.jsx)("span",{className:`pw-badge pw-badge--dismissible ${c}`,"data-type":"dismissible","data-status":o,"data-size":a,style:{...E4,...p},...x,children:(0,pt.jsxs)("span",{className:"pw-badge__pill",style:{...U,background:T.fill?ft(ae.fill):"transparent",color:ft(i==="Naked"&&ae.textNaked?ae.textNaked:ae.text),boxShadow:T4(Se),...P4(N)},children:[s&&Y(s,1),(0,pt.jsxs)("span",{className:"pw-badge__label",style:{...R,gap:tt.fieldGap},children:[r&&n&&(0,pt.jsx)("span",{style:{...B1,maxWidth:tt.fieldMax},children:n}),(0,pt.jsx)("span",{style:{...B1,maxWidth:v.contentMax},children:t})]}),(0,pt.jsxs)("button",{type:"button",className:"pw-badge__remove","aria-label":`Remove ${nr}`,"aria-disabled":Mt||void 0,onClick:pn=>{if(Mt){pn.preventDefault();return}$?.(pn)},onMouseEnter:()=>!Mt&&_(!0),onMouseLeave:()=>{_(!1),D(!1)},onMouseDown:()=>!Mt&&D(!0),onMouseUp:()=>D(!1),onFocus:pn=>{pn.target.matches?.(":focus-visible")&&H(!0)},onBlur:()=>{H(!1),D(!1)},onKeyDown:pn=>{(pn.key===" "||pn.key==="Enter")&&!Mt&&D(!0)},onKeyUp:()=>D(!1),style:{position:"relative",display:"inline-flex",alignItems:"center",justifyContent:"center",width:v.ico,height:v.ico,padding:0,margin:0,border:0,outline:"none",borderRadius:wn.radiusX,background:Er,color:Oa,flexShrink:0,cursor:Mt?"not-allowed":"pointer",transition:L4},children:[(0,pt.jsx)(me,{name:"close",size:v.ico}),(0,pt.jsx)("span",{"aria-hidden":"true",style:{position:"absolute",left:"50%",top:"50%",transform:"translate(-50%, -50%)",width:tt.touchW,height:tt.touchH}})]})]})})}let F=u!==void 0?u:w,X=km(o),G=L?"pressed":y?"hover":"rest",q=T.fill||G!=="rest",se=b?ft("fill-action-disabled"):F?X.on.fill[G]:q?X.off.fill[G]:"transparent",be=b?ft("foreground-action-disabled"):F?X.on.text:X.off.text[G],ee=b||F||!T.stroke?null:X.off.stroke[G],Ie=!!g||d,Q=F?"check":s,oe=g?"a":"button",Xe={onMouseEnter:()=>!b&&_(!0),onMouseLeave:()=>{_(!1),D(!1)},onMouseDown:()=>!b&&D(!0),onMouseUp:()=>D(!1),onFocus:ae=>{ae.target.matches?.(":focus-visible")&&H(!0)},onBlur:()=>{H(!1),D(!1)},onKeyDown:ae=>{(ae.key===" "||ae.key==="Enter")&&!b&&D(!0)},onKeyUp:()=>D(!1),onClick:ae=>{if(b){ae.preventDefault();return}if(Ie){x.onClick?.(ae);return}let Se=!F;u===void 0&&P(Se),h?.(Se)}};return(0,pt.jsx)(oe,{className:`pw-badge pw-badge--interactive ${c}`,"data-type":"interactive","data-status":o,"data-size":a,...g?{href:g}:{type:"button"},...Ie?null:{"aria-pressed":F},"aria-disabled":b||void 0,...x,...Xe,style:{...E4,cursor:b?"not-allowed":"pointer",...p},children:(0,pt.jsxs)("span",{className:"pw-badge__pill",style:{...U,background:se,color:be,boxShadow:T4(ee),...P4(N)},children:[Q&&Y(Q,F?0:1),(0,pt.jsx)("span",{className:"pw-badge__label",style:R,children:(0,pt.jsx)("span",{style:{...B1,display:"block",maxWidth:v.contentMax},children:t})}),d&&Y(l||"chevron_right")]})})}var Em=["type","label","field-label","show-field-label","status","size","badge-style","leading-icon","show-trailing-icon","href","selected","disabled","remove-disabled"],V1=class extends HTMLElement{static get observedAttributes(){return Em}constructor(){super(),this._reactRoot=null}connectedCallback(){this._reactRoot||(this.style.display=this.style.display||"inline-flex",this._reactRoot=(0,I4.createRoot)(this)),this._render()}disconnectedCallback(){let t=this._reactRoot;this._reactRoot=null,t&&Promise.resolve().then(()=>t.unmount())}attributeChangedCallback(){this._render()}_bool(t){if(!this.hasAttribute(t))return;let n=this.getAttribute(t);return n!=="false"&&n!=="0"}_emit(t,n){this.dispatchEvent(new CustomEvent(t,{detail:n,bubbles:!0,composed:!0}))}_render(){if(!this._reactRoot)return;let t=this._bool("selected");this._reactRoot.render(M4.default.createElement(R4,{type:this.getAttribute("type")||"static",label:this.getAttribute("label")||"",fieldLabel:this.getAttribute("field-label")||void 0,showFieldLabel:!!this._bool("show-field-label"),status:this.getAttribute("status")||"Neutral",size:this.getAttribute("size")||"Small",badgeStyle:this.getAttribute("badge-style")||"Outline & Fill",leadingIcon:this.getAttribute("leading-icon")||void 0,showTrailingIcon:!!this._bool("show-trailing-icon"),href:this.getAttribute("href")||void 0,selected:t,disabled:!!this._bool("disabled"),removeDisabled:!!this._bool("remove-disabled"),onChange:n=>{t!==void 0&&this.toggleAttribute("selected",n),this._emit("pathway-badge-change",{selected:n})},onRemove:()=>this._emit("pathway-badge-remove",{})}))}};customElements.get("pathway-badge")||customElements.define("pathway-badge",V1);var A4=k(V(),1),D4=k(rn(),1);var Ye=k(V(),1);var lt=k(ne(),1),Sn=e=>`var(--semantic-color-${e})`,wt=e=>`var(--semantic-layout-units-${e})`,Tm=e=>`var(--contextual-layout-units-${e})`,Yi=e=>`var(--semantic-type-${e})`,nd=e=>`var(--motion-${e})`,W1=e=>`var(--primitive-unit-unit-${e})`,qr=e=>({rest:Sn(`${e}-rest`),hover:Sn(`${e}-hover`),pressed:Sn(`${e}-pressed`)}),Pm={fill:{...qr("fill-action-secondary"),disabled:Sn("fill-action-disabled")},fg:{...qr("foreground-action-secondary"),disabled:Sn("foreground-action-disabled")},stroke:null},N4={Primary:{fill:qr("fill-action-primary-strong"),fg:{rest:Sn("foreground-action-primary-on-strong"),hover:Sn("foreground-action-primary-on-strong"),pressed:Sn("foreground-action-primary-on-strong")},stroke:null},Secondary:{fill:{rest:Sn("fill-surface-elevated"),hover:Sn("fill-surface-elevated"),pressed:Sn("fill-surface-elevated")},fg:qr("foreground-action-secondary"),stroke:qr("stroke-action-secondary")},Tertiary:{fill:qr("fill-action-primary-subtle"),fg:qr("foreground-action-primary-on-subtle"),stroke:qr("stroke-action-primary-strong")}},un={gap:wt("gap-xxxtight"),border:wt("borderwidth-base"),touchW:wt("accessibility-touch-target-aa-width"),touchH:wt("accessibility-touch-target-aa-height"),focusOutline:`${Tm("focusring-width")} solid ${Sn("stroke-focusring-base")}`,focusOffset:"0",colour:`${nd("duration-2")} ${nd("easing-standard")}`,shape:`${nd("duration-4")} ${nd("easing-spring-soft")}`},rd=(e,t,n)=>({fontFamily:Yi("family-brand"),fontSize:Yi(`font-size-${e}`),fontWeight:Yi("weight-medium"),lineHeight:Yi(`line-height-${t}`),letterSpacing:Yi(`letter-spacing-${n}`)}),H4={XS:{height:28,padH:wt("padding-xtight"),inner:wt("cornerradius-small"),outer:W1(14),gap:wt("gap-xtight"),icon:14,...rd("xs","xs-single","extraspacious")},S:{height:32,padH:wt("padding-tight"),inner:wt("cornerradius-small"),outer:wt("cornerradius-xlarge"),gap:wt("gap-tight"),icon:16,...rd("s","s-single","spacious")},M:{height:40,padH:wt("padding-base"),inner:wt("cornerradius-base"),outer:W1(20),gap:wt("gap-tight"),icon:18,...rd("r","r-single","wide")},L:{height:48,padH:wt("padding-relaxed"),inner:wt("cornerradius-base"),outer:W1(24),gap:wt("gap-tight"),icon:20,...rd("m","m-single","wide")}},_m=(e,t,n)=>{if(n)return e.outer;let r=e.outer,o=e.inner;return t==="Only"?r:t==="First"?`${r} ${o} ${o} ${r}`:t==="Last"?`${o} ${r} ${r} ${o}`:o},od=(0,Ye.forwardRef)(function({toggleStyle:t="Secondary",size:n="S",selected:r=!1,position:o="Middle",label:a="Label",icon:i,showIcon:s=!0,showLabel:l=!0,disabled:d=!1,fill:u=!1,forceState:m=null,as:h="radio",onPointerEnter:$,onPointerLeave:g,onPointerDown:b,onPointerUp:C,onFocus:f,onBlur:c,onKeyDown:p,onKeyUp:x,onClick:v,className:w="",...P},S){let _=Je(),[E,D]=(0,Ye.useState)(!1),[z,H]=(0,Ye.useState)(!1),[y,L]=(0,Ye.useState)(!1),N=H4[n]||H4.S,T=r?N4[t]||N4.Secondary:Pm,U=d?"disabled":m==="pressed"||z?"pressed":m==="hover"||E?"hover":"rest",R=!d&&(m==="focused"||y),Y=s&&!l,F={display:"flex",alignItems:"center",justifyContent:"center",gap:N.gap,boxSizing:"border-box",height:N.height,minWidth:un.touchW,width:u?"100%":void 0,paddingLeft:Y?0:N.padH,paddingRight:Y?0:N.padH,borderRadius:_m(N,o,r),background:T.fill[U]||T.fill.rest,color:T.fg[U]||T.fg.rest,boxShadow:T.stroke&&!R?`inset 0 0 0 ${un.border} ${T.stroke[U]||T.stroke.rest}`:"none",outline:R?un.focusOutline:"none",outlineOffset:R?un.focusOffset:void 0,fontFamily:N.fontFamily,fontSize:N.fontSize,fontWeight:N.fontWeight,lineHeight:N.lineHeight,letterSpacing:N.letterSpacing,whiteSpace:"nowrap",transition:_?"none":`background-color ${un.colour}, color ${un.colour}, box-shadow ${un.colour}, border-radius ${un.shape}`},X={position:"relative",zIndex:R?1:void 0,display:"inline-flex",alignItems:"center",justifyContent:"center",minHeight:un.touchH,minWidth:un.touchW,flex:u?"1 1 0":"0 0 auto",padding:0,margin:0,border:0,background:"transparent",outline:"none",font:"inherit",color:"inherit",cursor:d?"not-allowed":"pointer",WebkitTapHighlightColor:"transparent"},G=h==="radio";return(0,lt.jsx)("button",{ref:S,type:"button",role:G?"radio":void 0,"aria-checked":G?r:void 0,"aria-disabled":d||void 0,"aria-label":Y?a:void 0,"data-selected":r||void 0,className:`pw-toggle-button__option ${w}`.trim(),style:X,...P,onPointerEnter:q=>{D(!0),$?.(q)},onPointerLeave:q=>{D(!1),H(!1),g?.(q)},onPointerDown:q=>{d||H(!0),b?.(q)},onPointerUp:q=>{H(!1),C?.(q)},onFocus:q=>{let se=!0;try{se=q.target.matches(":focus-visible")}catch{}L(se),f?.(q)},onBlur:q=>{L(!1),H(!1),c?.(q)},onKeyDown:q=>{!d&&(q.key===" "||q.key==="Enter")&&H(!0),p?.(q)},onKeyUp:q=>{H(!1),x?.(q)},onClick:v,children:(0,lt.jsxs)("span",{className:"pw-toggle-button__main",style:F,children:[s&&i&&(0,lt.jsx)(me,{name:i,size:N.icon,fill:r?1:0}),l&&(0,lt.jsx)("span",{className:"pw-toggle-button__label",children:a})]})})});function Lm(e,t,n,r,o,a){let i=u=>u.reduce((m,h)=>m+t[h],0)+Math.max(0,u.length-1)*a,s=e.map((u,m)=>m);if(i(s)<=r)return{visible:s,hidden:[]};let l=r-o-a,d=[...s.filter(u=>e[u].disabled).reverse(),...s.filter(u=>!e[u].disabled&&e[u].value!==n).reverse()];for(let u of d){if(i(s)<=l)break;s=s.filter(m=>m!==u)}return{visible:s,hidden:e.map((u,m)=>m).filter(u=>!s.includes(u))}}var Rm=(e,t,n)=>{if(typeof window>"u"||!e)return n;let r=parseFloat(getComputedStyle(e).getPropertyValue(t));return Number.isFinite(r)?r:n};function F4({options:e=[],value:t,defaultValue:n,onChange:r,label:o,toggleStyle:a="Secondary",size:i="S",showIcon:s=!1,showLabel:l=!0,fill:d=!1,moreLabel:u="More",className:m="",style:h}){let $=e.find(F=>!F.disabled)?.value,g=t!==void 0,[b,C]=(0,Ye.useState)(n??$),f=g?t:b,c=(0,Ye.useCallback)(F=>{let X=e.find(G=>G.value===F);!X||X.disabled||F===f||(g||C(F),r?.(F))},[e,f,g,r]),p=(0,Ye.useRef)(null),x=(0,Ye.useRef)(null),v=(0,Ye.useRef)({}),[w,P]=(0,Ye.useState)({visible:e.map((F,X)=>X),hidden:[],natural:null}),[S,_]=(0,Ye.useState)(null),E=(0,Ye.useCallback)(()=>{let F=p.current,X=x.current;if(!F||!X)return;let G=[...X.querySelectorAll("[data-measure]")],q=G.slice(0,e.length).map(oe=>oe.getBoundingClientRect().width),se=G[e.length]?.getBoundingClientRect().width||0,be=Rm(F,"--semantic-layout-units-gap-xxxtight",2),ee=q.reduce((oe,Xe)=>oe+Xe,0)+Math.max(0,q.length-1)*be,Ie=F.getBoundingClientRect().width,Q=Lm(e,q,f,Math.max(Ie,0),se,be);P(oe=>oe.natural===ee&&oe.visible.join()===Q.visible.join()?oe:{...Q,natural:ee})},[e,f]);(0,Ye.useLayoutEffect)(()=>{E()},[E,i,s,l,a]),(0,Ye.useEffect)(()=>{if(typeof ResizeObserver>"u")return;let F=new ResizeObserver(()=>E());return p.current&&F.observe(p.current),x.current&&F.observe(x.current),()=>F.disconnect()},[E]),(0,Ye.useEffect)(()=>{if(S==null)return;let F=requestAnimationFrame(()=>{v.current[S]?.focus(),_(null)});return()=>cancelAnimationFrame(F)},[S,w]);let D=w.visible.filter(F=>F<e.length),z=w.hidden.filter(F=>F<e.length),H=z.length>0,y=s&&!l,L=(F,X)=>{let G=D.indexOf(X),q=be=>{let ee=e[D[be]];v.current[ee.value]?.focus(),ee.disabled||c(ee.value)},se=D.filter(be=>!e[be].disabled);F.key==="ArrowRight"||F.key==="ArrowDown"?(F.preventDefault(),q((G+1)%D.length)):F.key==="ArrowLeft"||F.key==="ArrowUp"?(F.preventDefault(),q((G-1+D.length)%D.length)):F.key==="Home"&&se.length?(F.preventDefault(),q(D.indexOf(se[0]))):F.key==="End"&&se.length?(F.preventDefault(),q(D.indexOf(se[se.length-1]))):(F.key===" "||F.key==="Enter")&&(F.preventDefault(),c(e[X].value))},N=D.length+(H?1:0),T=F=>N===1?"Only":F===0?"First":F===N-1?"Last":"Middle",U={toggleStyle:a,size:i,showIcon:s,showLabel:l,fill:d},R=(F,X)=>{let G=e[F],q=G.value===f,se=(0,lt.jsx)(od,{ref:be=>{v.current[G.value]=be},...U,label:G.label,icon:G.icon,selected:q,disabled:!!G.disabled,position:T(X),tabIndex:q?0:-1,onClick:()=>c(G.value),onKeyDown:be=>L(be,F)},G.value);return G.disabled&&G.reason?(0,lt.jsx)(ji,{content:y?`${G.label}. ${G.reason}`:G.reason,describe:G.reason,purpose:"description",persistOnPress:!0,children:se},G.value):y?(0,lt.jsx)(ji,{content:G.label,purpose:"label",children:se},G.value):se},Y={display:d?"flex":"inline-flex",alignItems:"center",gap:un.gap,width:d?"100%":w.natural!=null?w.natural:void 0,maxWidth:"100%",minWidth:0,flexShrink:1,position:"relative",verticalAlign:"middle",...h};return(0,lt.jsxs)("div",{ref:p,className:`pw-toggle-button ${m}`.trim(),style:Y,children:[(0,lt.jsx)("div",{role:"radiogroup","aria-label":o,style:{display:"flex",alignItems:"center",gap:un.gap,flex:d?"1 1 auto":"0 0 auto",minWidth:0},children:D.map((F,X)=>R(F,X))}),H&&(0,lt.jsx)(U3,{align:"end",label:y?"More options":u,renderTrigger:({title:F,...X})=>(0,lt.jsx)(od,{...U,...X,as:"button",fill:!1,label:y?"More options":u,icon:y?"more_horiz":void 0,position:T(N-1)}),children:z.map(F=>{let X=e[F];return(0,lt.jsx)(W3,{label:X.label,icon:s?X.icon:void 0,disabled:!!X.disabled,note:X.disabled?X.reason:void 0,onSelect:()=>{c(X.value),_(X.value)}},X.value)})}),(0,lt.jsxs)("div",{ref:x,"aria-hidden":"true",inert:"",style:{position:"absolute",left:0,top:0,visibility:"hidden",pointerEvents:"none",display:"flex",gap:un.gap,whiteSpace:"nowrap"},children:[e.map(F=>(0,lt.jsx)("span",{"data-measure":"",style:{display:"inline-flex"},children:(0,lt.jsx)(od,{...U,fill:!1,label:F.label,icon:F.icon,selected:F.value===f,tabIndex:-1})},F.value)),(0,lt.jsx)("span",{"data-measure":"",style:{display:"inline-flex"},children:(0,lt.jsx)(od,{...U,fill:!1,as:"button",label:y?"More options":u,icon:y?"more_horiz":void 0,tabIndex:-1})})]})]})}var Mm=`
|
|
336
|
+
`,dm=["content","describe","purpose","side","align","arrow","persist-on-press","disabled"],cm=0,N1=class extends HTMLElement{static get observedAttributes(){return dm}constructor(){super(),this._reactRoot=null,this._descId=`pw-tooltip-desc-${++cm}`}connectedCallback(){if(!this.shadowRoot){let t=this.attachShadow({mode:"open"}),n=document.createElement("style");n.textContent=lm,t.appendChild(n),this._mount=document.createElement("span"),t.appendChild(this._mount),this._reactRoot=(0,f4.createRoot)(this._mount)}this._render()}disconnectedCallback(){let t=this._reactRoot;this._reactRoot=null,t&&Promise.resolve().then(()=>t.unmount())}attributeChangedCallback(){this._render()}_bool(t){if(!this.hasAttribute(t))return;let n=this.getAttribute(t);return n!=="false"&&n!=="0"}_wireAria(t,n,r){let o=[...this.children].find(s=>s.getAttribute("slot")!=="pw-description");if(!o)return;let a=this.querySelector(`#${this._descId}`);if(t==="label"){n&&o.setAttribute("aria-label",n),a?.remove();return}a||(a=document.createElement("span"),a.id=this._descId,a.hidden=!0,a.slot="pw-description",this.appendChild(a)),a.textContent=r||n||"";let i=new Set((o.getAttribute("aria-describedby")||"").split(/\s+/).filter(Boolean));i.add(this._descId),o.setAttribute("aria-describedby",[...i].join(" "))}_render(){if(!this._reactRoot)return;let t=this.getAttribute("content")||"",n=this.getAttribute("describe")||void 0,r=this.getAttribute("purpose")==="label"?"label":"description";this._wireAria(r,t,n);let o=this.hasAttribute("arrow")?this._bool("arrow"):void 0;this._reactRoot.render(Jl.default.createElement(ji,{content:t,purpose:r,manageAria:!1,side:this.getAttribute("side")||"top",align:this.getAttribute("align")||"center",arrow:o,persistOnPress:!!this._bool("persist-on-press"),disabled:!!this._bool("disabled")},Jl.default.createElement("span",{className:"pw-tooltip-wc-trigger"},Jl.default.createElement("slot"))))}};customElements.get("pathway-tooltip")||customElements.define("pathway-tooltip",N1);var A1=k(V(),1),x4=k(rn(),1);var we=k(V(),1);var $r=k(V(),1);var dn=k(ne(),1),de={focusOutline:"var(--contextual-layout-units-focusring-width) solid var(--semantic-color-stroke-focusring-base)",focusOffset:"0",fillCheckedBase:"var(--semantic-color-fill-action-primary-strong-rest)",fillCheckedHover:"var(--semantic-color-fill-action-primary-strong-hover)",fillCheckedFocused:"var(--semantic-color-fill-action-primary-strong-hover)",fillCheckedPressed:"var(--semantic-color-fill-action-primary-strong-pressed)",fillCheckedDisabled:"var(--semantic-color-fill-action-disabled)",borderBase:"var(--semantic-color-stroke-action-secondary-rest)",borderHover:"var(--semantic-color-stroke-action-secondary-hover)",borderFocused:"var(--semantic-color-stroke-action-secondary-hover)",borderPressed:"var(--semantic-color-stroke-action-secondary-pressed)",borderDisabled:"var(--semantic-color-stroke-action-disabled)",iconPrimary:"var(--semantic-color-foreground-action-primary-on-strong)",iconError:"var(--semantic-color-foreground-action-status-negative-on-strong)",stateLayerUncheckedHover:"var(--semantic-color-fill-action-secondary-hover)",stateLayerCheckedHover:"var(--semantic-color-fill-action-primary-subtle-hover)",stateLayerCheckedFocused:"var(--semantic-color-fill-action-primary-subtle-hover)",stateLayerCheckedPressed:"var(--semantic-color-fill-action-primary-subtle-pressed)",fillErrorBase:"var(--semantic-color-fill-action-status-negative-strong-rest)",fillErrorHover:"var(--semantic-color-fill-action-status-negative-strong-hover)",fillErrorFocused:"var(--semantic-color-fill-action-status-negative-strong-hover)",fillErrorPressed:"var(--semantic-color-fill-action-status-negative-strong-pressed)",fillErrorDisabled:"var(--semantic-color-fill-action-disabled)",borderErrorBase:"var(--semantic-color-stroke-action-status-negative-rest)",borderErrorHover:"var(--semantic-color-stroke-action-status-negative-hover)",borderErrorFocused:"var(--semantic-color-stroke-action-status-negative-hover)",borderErrorPressed:"var(--semantic-color-stroke-action-status-negative-pressed)",borderErrorDisabled:"var(--semantic-color-stroke-action-disabled)",stateLayerErrorHover:"var(--semantic-color-fill-action-status-negative-subtle-hover)",stateLayerHighlightHover:"var(--semantic-color-fill-action-primary-subtle-hover)",labelColor:"var(--semantic-color-foreground-static-neutral-base)",radius:"var(--semantic-layout-units-cornerradius-small)",radiusFull:"100px"},p4={default:18,s:16},m4=44,H1=1.5,um=16;function fm({color:e,size:t}){return(0,dn.jsx)("svg",{width:t,height:t,viewBox:"0 0 18 18",fill:"none","aria-hidden":"true",focusable:"false",children:(0,dn.jsx)("path",{d:"M4 9.5L7.5 13L14 6",stroke:e,strokeWidth:H1,strokeLinecap:"round",strokeLinejoin:"round"})})}function pm({color:e,size:t}){return(0,dn.jsx)("svg",{width:t,height:t,viewBox:"0 0 18 18",fill:"none","aria-hidden":"true",focusable:"false",children:(0,dn.jsx)("path",{d:"M5 9H13",stroke:e,strokeWidth:H1,strokeLinecap:"round"})})}function h4({checked:e=!1,indeterminate:t=!1,error:n=!1,highlight:r=!1,secondary:o=!1,disabled:a=!1,size:i="default",label:s,onChange:l,id:d,name:u,value:m,className:h="",describedBy:$}){let g=Je(),b=(0,$r.useRef)(null),[C,f]=(0,$r.useState)(!1),[c,p]=(0,$r.useState)(!1),[x,v]=(0,$r.useState)(!1),[w,P]=(0,$r.useState)(!1);(0,$r.useEffect)(()=>{b.current&&(b.current.indeterminate=t)},[t]);let S=p4[i]||p4.default,_="transparent";a&&(e||t)?_=n?de.fillErrorDisabled:de.fillCheckedDisabled:!a&&(e||t)&&(n?_=w?de.fillErrorPressed:c?de.fillErrorFocused:C?de.fillErrorHover:de.fillErrorBase:_=w?de.fillCheckedPressed:c?de.fillCheckedFocused:C?de.fillCheckedHover:de.fillCheckedBase);let E;e||t?E=_:a?E=n?de.borderErrorDisabled:de.borderDisabled:n?E=w?de.borderErrorPressed:c?de.borderErrorFocused:C?de.borderErrorHover:de.borderErrorBase:E=w?de.borderPressed:c?de.borderFocused:C?de.borderHover:de.borderBase;let D="transparent";a||(w?D=e||t?de.stateLayerCheckedPressed:n?de.stateLayerErrorHover:de.stateLayerUncheckedHover:(C||c)&&(e||t?D=n?de.stateLayerErrorHover:c?de.stateLayerCheckedFocused:de.stateLayerCheckedHover:D=n?de.stateLayerErrorHover:r?de.stateLayerHighlightHover:de.stateLayerUncheckedHover));let z=c&&n?"0 0 0 3px var(--semantic-color-fill-static-negative-subtle)":"none",H=n?de.iconError:de.iconPrimary,y=e||t;return(0,dn.jsxs)("label",{className:`pds-checkbox${i==="s"?" pds-checkbox--s":""}${n?" pds-checkbox--error":""}${r?" pds-checkbox--highlight":""}${a?" pds-checkbox--disabled":""}${h?` ${h}`:""}`,style:{display:"inline-flex",alignItems:"center",gap:s?um:0,cursor:a?"not-allowed":"pointer",userSelect:"none",fontFamily:"'Red Hat Text', sans-serif"},onMouseEnter:()=>!a&&f(!0),onMouseLeave:()=>{f(!1),P(!1)},onMouseDown:()=>!a&&P(!0),onMouseUp:()=>P(!1),children:[(0,dn.jsxs)("span",{"aria-hidden":"true",style:{position:"relative",display:"inline-flex",alignItems:"center",justifyContent:"center",width:m4,height:m4,borderRadius:de.radiusFull,backgroundColor:D,transition:g?"none":"background-color var(--motion-duration-3) var(--motion-easing-standard)",boxShadow:z,flexShrink:0},children:[(0,dn.jsx)("input",{ref:b,type:"checkbox",id:d,name:u,value:m,checked:t?!1:e,disabled:a,"aria-describedby":$,onChange:L=>l&&l(L.target.checked),onFocus:L=>{p(!0),v(L.target.matches(":focus-visible"))},onBlur:()=>{p(!1),v(!1)},style:{position:"absolute",width:S,height:S,opacity:0,margin:0,padding:0,cursor:a?"not-allowed":"pointer",zIndex:1}}),(0,dn.jsx)("span",{"aria-hidden":"true",style:{display:"inline-flex",alignItems:"center",justifyContent:"center",width:S,height:S,borderRadius:de.radius,border:`${H1}px solid ${x&&!a?"transparent":E}`,backgroundColor:_,boxSizing:"border-box",outline:x&&!a?de.focusOutline:"none",outlineOffset:de.focusOffset,transition:g?"none":"background-color var(--motion-duration-2) var(--motion-easing-decelerate), border-color var(--motion-duration-2) var(--motion-easing-decelerate)",flexShrink:0},children:y&&(t?(0,dn.jsx)(pm,{color:H,size:S}):(0,dn.jsx)(fm,{color:H,size:S}))})]}),s&&(0,dn.jsx)("span",{style:{fontSize:"var(--semantic-type-font-size-s)",lineHeight:"var(--semantic-type-line-height-s-single)",fontWeight:400,color:a?"var(--semantic-color-foreground-static-neutral-base)":de.labelColor},children:s})]})}var te=k(ne(),1),cn=e=>`var(--semantic-color-${e})`,Ae=e=>`var(--semantic-layout-units-${e})`,mm=e=>`var(--contextual-layout-units-${e})`,F1=e=>`var(--responsive-layout-${e})`,Ki=e=>`var(--semantic-type-${e})`,Ea=(e,t,n,r)=>({fontFamily:Ki("family-brand"),fontSize:Ki(`font-size-${e}`),lineHeight:Ki(`line-height-${t}`),fontWeight:Ki(`weight-${n}`),letterSpacing:Ki(`letter-spacing-${r}`)}),Z={noticeFill:cn("fill-surface-elevated"),noticeStroke:cn("stroke-static-neutral-faint"),hintFill:cn("fill-surface-overlay"),hintStroke:cn("stroke-static-neutral-bold"),messageFill:cn("fill-static-negative-subtle"),messageFg:cn("foreground-static-negative-on-subtle"),progressFill:cn("fill-static-brand-strong"),progressTrack:cn("stroke-static-neutral-faint"),sheetFill:cn("fill-surface-overlay"),scrim:cn("scrim-base"),fgStrong:cn("foreground-static-neutral-strong"),fgBase:cn("foreground-static-neutral-base"),focusRing:cn("stroke-focusring-base"),hintShadow:"var(--elevation-lift)",sheetShadow:"var(--elevation-sheet)",borderWidth:Ae("borderwidth-thin"),noticeRadius:Ae("cornerradius-base"),pillRadius:Ae("cornerradius-full"),messageRadius:Ae("cornerradius-small"),sheetRadius:F1("sheet-corner-radius-cornerradius"),focusWidth:mm("focusring-width"),focusOffset:"0",sectionGap:Ae("gap-medium"),progressGap:Ae("gap-xtight"),titleGap:Ae("gap-tight"),agreementGap:Ae("gap-xtight"),paragraphGap:Ae("gap-base"),toolbarPad:`${Ae("padding-xxtight")} ${Ae("padding-xtight")} ${Ae("padding-xxxtight")}`,contentPad:`${Ae("padding-xtight")} ${Ae("padding-base")} ${Ae("padding-base")}`,hintPad:`${Ae("padding-xxxtight")} ${Ae("padding-xtight")}`,hintGap:Ae("gap-xxtight"),hintOffset:Ae("padding-xtight"),messagePad:Ae("padding-xtight"),messageGap:Ae("gap-tight"),sheetPad:`${F1("sheet-padding-top")} ${F1("sheet-padding-horizontal")} ${Ae("padding-wide")}`,sheetGap:Ae("gap-base"),sheetHeaderPad:Ae("padding-medium"),noticeType:Ea("s","s-single","regular","spacious"),titleType:Ea("r","r-single","medium","wide"),progressType:Ea("xs","xs-single","regular","extraspacious"),hintType:Ea("xs","xs-single","semibold","extraspacious"),messageType:Ea("xs","xs-single","semibold","extraspacious"),sheetTitleType:Ea("m","m-relaxed","semibold","wide"),progressMotion:"width var(--motion-duration-2) var(--motion-easing-standard)",scrimMotion:"pds-ste-fade var(--motion-duration-3) var(--motion-easing-standard)",sheetMotion:"pds-ste-rise var(--motion-duration-4) var(--motion-easing-emphasized)",noticeHeight:200,progressHeight:4,minWidth:320,readThreshold:8,breakpoint:768,sheetFrameHeight:560},hm={scrollInline:"Scroll to the end of the notice before you continue.",readAgreement:"Read the agreement before you agree to it.",scrollSheet:"Scroll to the end of the notice to finish reading.",agree:"Check the box to confirm you have read the notice."},gm={Unread:{},Reading:{progress:.5},Read:{progress:1,read:!0},Agreed:{progress:1,read:!0,checked:!0},Blocked:{msg:"blocked"},"Agreement Missing":{progress:1,read:!0,msg:"agree",missing:!0},"Sheet Unread":{sheetOpen:!0},"Sheet Blocked":{sheetOpen:!0,progress:.4,sheetMsg:"scrollSheet"},"Sheet Read":{sheetOpen:!0,progress:1}};function vm(){if(typeof document>"u"||document.getElementById("pds-ste-styles"))return;let e=document.createElement("style");e.id="pds-ste-styles",e.textContent="@keyframes pds-ste-fade{from{opacity:0}to{opacity:1}}@keyframes pds-ste-rise{from{transform:translateY(100%)}to{transform:translateY(0)}}.pds-ste__region{outline:none}.pds-ste__region p{margin:0}",document.head.appendChild(e)}var g4=()=>typeof window<"u"&&typeof window.matchMedia=="function",v4=`(min-width: ${Z.breakpoint}px)`;function bm(e){let[t,n]=(0,we.useState)(()=>g4()?window.matchMedia(v4).matches:!0);return(0,we.useEffect)(()=>{if(e!=="auto"||!g4())return;let r=window.matchMedia(v4);n(r.matches);let o=a=>n(a.matches);return r.addEventListener("change",o),()=>r.removeEventListener("change",o)},[e]),e==="inline"||e==="sheet"?e:t?"inline":"sheet"}var To=e=>{e&&typeof e.focus=="function"&&e.focus()};function ym({value:e,labelId:t}){let n=Je(),r=Math.round(e*100);return(0,te.jsxs)("div",{className:"pds-ste__progress",style:{display:"flex",flexDirection:"column",gap:Z.progressGap},children:[(0,te.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",...Z.progressType,color:Z.fgBase},children:[(0,te.jsx)("span",{id:t,children:"Reading progress"}),(0,te.jsxs)("span",{"aria-hidden":"true",children:[r,"%"]})]}),(0,te.jsx)("div",{role:"progressbar","aria-labelledby":t,"aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":r,style:{height:Z.progressHeight,borderRadius:Z.pillRadius,background:Z.progressTrack,overflow:"hidden"},children:(0,te.jsx)("div",{style:{width:`${r}%`,height:"100%",borderRadius:Z.pillRadius,background:Z.progressFill,transition:n?"none":Z.progressMotion}})})]})}function b4({id:e,text:t,nonce:n}){return(0,te.jsx)("div",{id:e,children:t&&(0,te.jsxs)("div",{role:"alert",style:{display:"flex",alignItems:"flex-start",gap:Z.messageGap,padding:Z.messagePad,borderRadius:Z.messageRadius,background:Z.messageFill,color:Z.messageFg,...Z.messageType},children:[(0,te.jsx)(me,{name:"error",size:"M",fill:1}),(0,te.jsx)("span",{children:t})]},n)})}function $m(){return(0,te.jsx)("div",{"aria-hidden":"true",style:{position:"absolute",left:0,right:0,bottom:Z.hintOffset,display:"flex",justifyContent:"center",pointerEvents:"none"},children:(0,te.jsxs)("span",{style:{display:"inline-flex",alignItems:"center",gap:Z.hintGap,padding:Z.hintPad,borderRadius:Z.pillRadius,background:Z.hintFill,boxShadow:Z.hintShadow,border:`${Z.borderWidth} solid ${Z.hintStroke}`,...Z.hintType,color:Z.fgStrong},children:[(0,te.jsx)(me,{name:"arrow_downward",size:"M"}),"Scroll to continue"]})})}function y4({children:e,height:t,titleId:n,regionRef:r,showPrint:o,onPrint:a,showHint:i,onProgress:s,startAt:l}){let d=(0,we.useRef)(null),[u,m]=(0,we.useState)(!1),h=(0,we.useCallback)(g=>{if(!g)return;let b=g.scrollHeight-g.clientHeight;s(b<=Z.readThreshold?1:Math.min(1,g.scrollTop/(b-Z.readThreshold)))},[s]);(0,we.useLayoutEffect)(()=>{let g=d.current&&d.current.querySelector(".pds-scrollable__view");if(!g||(l!=null&&(g.scrollTop=(g.scrollHeight-g.clientHeight)*l),h(g),typeof ResizeObserver>"u"))return;let b=new ResizeObserver(()=>h(g));return b.observe(g),()=>b.disconnect()},[h,t,l]);let $=g=>{let b=!0;try{b=g.target.matches(":focus-visible")||g.target.dataset.moved==="1"}catch{}delete g.target.dataset.moved,m(b)};return(0,te.jsxs)("div",{ref:d,className:"pds-ste__notice",onScrollCapture:g=>h(g.target),style:{position:"relative",background:Z.noticeFill,border:`${Z.borderWidth} solid ${Z.noticeStroke}`,borderRadius:Z.noticeRadius,outline:u?`${Z.focusWidth} solid ${Z.focusRing}`:"none",outlineOffset:Z.focusOffset},children:[o&&(0,te.jsx)("div",{style:{padding:Z.toolbarPad},children:(0,te.jsx)(Zr,{buttonStyle:"Naked",type:"Secondary",size:"S",text:"Print",showLeadingIcon:!0,leadingIcon:"print",onClick:a})}),(0,te.jsx)(Wl,{style:{height:t},children:(0,te.jsx)("div",{ref:r,className:"pds-ste__region",role:"region",tabIndex:0,"aria-labelledby":n,onFocus:$,onBlur:()=>m(!1),style:{padding:Z.contentPad,display:"flex",flexDirection:"column",gap:Z.paragraphGap,...Z.noticeType,color:Z.fgStrong},children:e})}),i&&(0,te.jsx)($m,{})]})}function xm({title:e,titleId:t,stepLabel:n,onClose:r,children:o,footer:a,initialFocusRef:i,contained:s}){let l=Je(),d=(0,we.useRef)(null);(0,we.useEffect)(()=>{if(s)return;let m=document.body.style.overflow;document.body.style.overflow="hidden";let h=setTimeout(()=>To(i.current),0);return()=>{clearTimeout(h),document.body.style.overflow=m}},[i,s]);let u=m=>{if(m.key==="Escape"){m.stopPropagation(),r();return}if(m.key!=="Tab"||!d.current)return;let h=d.current.querySelectorAll("button, input, [tabindex='0']");if(!h.length)return;let $=h[0],g=h[h.length-1];m.shiftKey&&document.activeElement===$?(m.preventDefault(),To(g)):!m.shiftKey&&document.activeElement===g&&(m.preventDefault(),To($))};return(0,te.jsxs)("div",{className:"pds-ste-sheet",style:{position:s?"absolute":"fixed",inset:0,zIndex:s?1:1e3,display:"flex",flexDirection:"column",justifyContent:"flex-end"},children:[(0,te.jsx)("div",{className:"pds-ste-sheet__scrim",onClick:r,style:{position:"absolute",inset:0,background:Z.scrim,animation:l?"none":Z.scrimMotion}}),(0,te.jsxs)("div",{ref:d,role:"dialog","aria-modal":"true","aria-labelledby":t,onKeyDown:u,style:{position:"relative",background:Z.sheetFill,boxShadow:Z.sheetShadow,borderRadius:`${Z.sheetRadius} ${Z.sheetRadius} 0 0`,padding:Z.sheetPad,display:"flex",flexDirection:"column",gap:Z.sheetGap,maxHeight:"85vh",animation:l?"none":Z.sheetMotion},children:[(0,te.jsxs)("div",{className:"pds-ste-sheet__header",style:{display:"flex",alignItems:"center",justifyContent:"space-between",paddingLeft:Z.sheetHeaderPad,paddingRight:Z.sheetHeaderPad},children:[(0,te.jsx)("span",{style:{...Z.progressType,color:Z.fgBase},children:n}),(0,te.jsx)(Zr,{buttonStyle:"Naked",type:"Secondary",size:"S",showText:!1,showLeadingIcon:!0,leadingIcon:"close",text:"Close",ariaLabel:"Close",onClick:r})]}),(0,te.jsx)("h2",{id:t,style:{margin:0,textAlign:"center",...Z.sheetTitleType,color:Z.fgStrong},children:e}),o,a]})]})}function $4({title:e,children:t,agreementLabel:n,onContinue:r,layout:o="auto",noticeHeight:a=Z.noticeHeight,showPrint:i=!0,onPrint:s,continueLabel:l="Continue",readAgreementLabel:d="Read Agreement",readLabel:u="Agreement read",doneReadingLabel:m="Done Reading",stepLabel:h,messages:$,onAgreeChange:g,demoState:b,className:C=""}){vm();let f=bm(o),c=(0,we.useId)().replace(/:/g,""),p={title:`${c}-title`,progress:`${c}-rp`,msg:`${c}-msg`,sheetTitle:`${c}-sheet-title`,sheetMsg:`${c}-sheet-msg`,checkbox:`${c}-cb`},x={...hm,...$},v=b&&gm[b]||{},w=!!b,P=v.msg==="blocked"?f==="inline"?"scrollInline":"readAgreement":v.msg||null,[S,_]=(0,we.useState)(v.progress||0),[E,D]=(0,we.useState)(!!v.read),[z,H]=(0,we.useState)(!!v.checked),[y,L]=(0,we.useState)(P),[N,T]=(0,we.useState)(v.sheetMsg||null),[U,R]=(0,we.useState)(0),[Y,F]=(0,we.useState)(!!v.sheetOpen),[X,G]=(0,we.useState)(!!v.missing),q=(0,we.useRef)(null),se=(0,we.useRef)(null),be=(0,we.useRef)(null),ee=rt=>{L(rt),R(Dn=>Dn+1)},Ie=rt=>{rt&&(rt.dataset.moved="1",To(rt))},Q=()=>be.current&&be.current.querySelector("button"),oe=(0,we.useCallback)(rt=>{_(Dn=>Math.max(Dn,rt)),rt>=1&&(D(!0),L(Dn=>Dn==="scrollInline"?null:Dn))},[]),Xe=(0,we.useCallback)(rt=>{_(Dn=>Math.max(Dn,rt)),rt>=1&&T(null)},[]),ae=()=>{f==="inline"?(ee("scrollInline"),Ie(q.current)):(ee("readAgreement"),To(Q()))},Se=rt=>{if(!E){ae();return}H(rt),rt&&(L(null),G(!1)),g&&g(rt)},Mt=()=>{if(!E){ae();return}if(!z){G(!0),ee("agree"),To(document.getElementById(p.checkbox));return}r&&r()},nr=()=>{F(!1),T(null),setTimeout(()=>To(Q()),0)},Er=()=>{if(S<1){T("scrollSheet"),R(rt=>rt+1),Ie(se.current);return}D(!0),L(null),nr()},Oa=s||(()=>{typeof window<"u"&&window.print()}),pn=(0,te.jsxs)("div",{className:"pds-ste__agreement",style:{display:"flex",flexDirection:"column",gap:Z.agreementGap},children:[(0,te.jsx)(h4,{id:p.checkbox,checked:z,error:X&&!z,label:n,onChange:Se,describedBy:p.msg}),(0,te.jsx)(b4,{id:p.msg,text:y?x[y]:null,nonce:U})]}),za=(0,te.jsx)("div",{className:"pds-ste__actions",style:{display:"flex",justifyContent:"center"},children:(0,te.jsx)(Zr,{buttonStyle:"Fill",type:"Primary",size:"L",text:l,onClick:Mt,"aria-describedby":p.msg})}),Ao={display:"flex",flexDirection:"column",gap:Z.sectionGap,minWidth:Z.minWidth,width:"100%"};return f==="inline"?(0,te.jsxs)("div",{className:`pds-ste ${C}`,style:Ao,children:[(0,te.jsx)(ym,{value:S,labelId:p.progress}),(0,te.jsxs)("div",{className:"pds-ste__notice-group",style:{display:"flex",flexDirection:"column",gap:Z.titleGap},children:[(0,te.jsx)("div",{id:p.title,style:{...Z.titleType,color:Z.fgStrong},children:e}),(0,te.jsx)(y4,{height:a,titleId:p.title,regionRef:q,showPrint:i,onPrint:Oa,showHint:!E,onProgress:oe,startAt:v.read?1:v.progress,children:t})]}),pn,za]}):(0,te.jsxs)("div",{className:`pds-ste ${C}`,style:w&&Y?{...Ao,position:"relative",minHeight:Z.sheetFrameHeight}:Ao,children:[(0,te.jsx)("span",{ref:be,style:{display:"flex"},children:(0,te.jsx)(Zr,{buttonStyle:"Fill",type:"Tertiary",size:"M",text:E?u:d,showTrailingIcon:!0,trailingIcon:E?"check":"open_in_new","aria-haspopup":"dialog",onClick:()=>{F(!0),T(null)}})}),pn,za,Y&&(0,te.jsxs)(xm,{title:e,titleId:p.sheetTitle,stepLabel:h,onClose:nr,initialFocusRef:se,contained:w,footer:(0,te.jsx)("div",{style:{display:"flex",justifyContent:"center"},children:(0,te.jsx)(Zr,{buttonStyle:"Fill",type:"Primary",size:"L",text:m,onClick:Er,"aria-describedby":p.sheetMsg})}),children:[(0,te.jsx)(y4,{height:a,titleId:p.sheetTitle,regionRef:se,showPrint:!1,showHint:S<1,onProgress:Xe,startAt:v.sheetOpen?v.progress:void 0,children:t}),(0,te.jsx)(b4,{id:p.sheetMsg,text:N?x[N]:null,nonce:U})]})]})}var Cm=["notice-title","agreement-label","layout","notice-height","show-print","continue-label","read-agreement-label","read-label","done-reading-label","step-label"],D1=class extends HTMLElement{static get observedAttributes(){return Cm}constructor(){super(),this._reactRoot=null,this._notice=""}connectedCallback(){this._reactRoot||(this._notice=this.innerHTML,this.innerHTML="",this._mount=document.createElement("div"),this.appendChild(this._mount),this._reactRoot=(0,x4.createRoot)(this._mount)),this._render()}disconnectedCallback(){let t=this._reactRoot;this._reactRoot=null,t&&Promise.resolve().then(()=>t.unmount())}attributeChangedCallback(){this._render()}_attr(t){return this.getAttribute(t)||void 0}_emit(t,n,r=!1){return this.dispatchEvent(new CustomEvent(t,{detail:n,bubbles:!0,composed:!0,cancelable:r}))}_render(){if(!this._reactRoot)return;let t=parseInt(this.getAttribute("notice-height"),10),n=this.getAttribute("show-print");this._reactRoot.render(A1.default.createElement($4,{title:this._attr("notice-title"),agreementLabel:this._attr("agreement-label"),layout:this._attr("layout")||"auto",noticeHeight:Number.isFinite(t)?t:void 0,showPrint:n!=="false"&&n!=="0",continueLabel:this._attr("continue-label"),readAgreementLabel:this._attr("read-agreement-label"),readLabel:this._attr("read-label"),doneReadingLabel:this._attr("done-reading-label"),stepLabel:this._attr("step-label"),onContinue:()=>this._emit("pathway-continue"),onPrint:()=>{this._emit("pathway-print",void 0,!0)&&window.print()},onAgreeChange:r=>this._emit("pathway-agree",{checked:r})},A1.default.createElement("div",{dangerouslySetInnerHTML:{__html:this._notice},style:{display:"contents"}})))}};customElements.get("pathway-scroll-to-enable")||customElements.define("pathway-scroll-to-enable",D1);var O1=k(V(),1),C4=k(rn(),1);var wm=["open","sheet-title","menu","show-handle","show-back","close-label","back-label"],z1=class extends HTMLElement{static get observedAttributes(){return wm}constructor(){super(),this._reactRoot=null,this._body=""}connectedCallback(){this._reactRoot||(this._body=this.innerHTML,this.innerHTML="",this._mount=document.createElement("div"),this.appendChild(this._mount),this._reactRoot=(0,C4.createRoot)(this._mount)),this._render()}disconnectedCallback(){let t=this._reactRoot;this._reactRoot=null,t&&Promise.resolve().then(()=>t.unmount())}attributeChangedCallback(){this._render()}_emit(t,n){this.dispatchEvent(new CustomEvent(t,{detail:n,bubbles:!0,composed:!0}))}_close(){this.removeAttribute("open"),this._emit("pathway-close")}_render(){if(!this._reactRoot)return;let t=this.getAttribute("show-handle"),n=r=>{let o=r.target.closest?.('[role^="menuitem"]');!o||o.hasAttribute("disabled")||o.getAttribute("aria-disabled")==="true"||(this._emit("pathway-select",{value:o.dataset.value}),this._close())};this._reactRoot.render(O1.default.createElement(Gl,{open:this.hasAttribute("open"),onOpenChange:r=>{r||this._close()},title:this.getAttribute("sheet-title")||"",menu:this.hasAttribute("menu"),showHandle:t!=="false"&&t!=="0",showBack:this.hasAttribute("show-back"),onBack:()=>this._emit("pathway-back"),closeLabel:this.getAttribute("close-label")||void 0,backLabel:this.getAttribute("back-label")||void 0},O1.default.createElement("div",{dangerouslySetInnerHTML:{__html:this._body},onClick:n,style:{display:"contents"}})))}};customElements.get("pathway-bottom-sheet")||customElements.define("pathway-bottom-sheet",z1);var M4=k(V(),1),I4=k(rn(),1);var Zi=k(V(),1);var pt=k(ne(),1),ft=e=>`var(--semantic-color-${e})`,Xt=e=>`var(--semantic-layout-units-${e})`,w4=e=>`var(--contextual-layout-units-${e})`,ed=e=>`var(--semantic-type-${e})`;var Sm=["Neutral","Info","Positive","Negative"];var td={Neutral:{fill:"fill-static-neutral-base",strokeStrong:"stroke-static-neutral-bold",strokeSubtle:"stroke-static-neutral-bold",text:"foreground-static-neutral-bold",textNaked:"foreground-static-neutral-base"},Severe:{fill:"fill-static-severe-subtle",strokeStrong:"stroke-static-severe-strong",strokeSubtle:"stroke-static-severe-subtle",text:"foreground-static-severe-on-subtle"},Negative:{fill:"fill-static-negative-subtle",strokeStrong:"stroke-static-negative-strong",strokeSubtle:"stroke-static-negative-subtle",text:"foreground-static-negative-on-subtle"},Positive:{fill:"fill-static-positive-subtle",strokeStrong:"stroke-static-positive-strong",strokeSubtle:"stroke-static-positive-subtle",text:"foreground-static-positive-on-subtle"},Attention:{fill:"fill-static-attention-subtle",strokeStrong:"stroke-static-attention-strong",strokeSubtle:"stroke-static-attention-strong",text:"foreground-static-attention-on-subtle"},Info:{fill:"fill-static-info-subtle",strokeStrong:"stroke-static-info-strong",strokeSubtle:"stroke-static-info-subtle",text:"foreground-static-info-on-subtle"},"Accent 2":{fill:"fill-static-accent-jade-subtle",strokeStrong:"stroke-static-accent-jade",strokeSubtle:"stroke-static-accent-jade",text:"foreground-static-accent-jade-on-subtle"},"Accent 3":{fill:"fill-static-accent-mauve-subtle",strokeStrong:"stroke-static-accent-mauve",strokeSubtle:"stroke-static-accent-mauve",text:"foreground-static-accent-mauve-on-subtle"}},km=e=>{let t=(Sm.includes(e)?e:"Neutral").toLowerCase(),n=r=>ft(r.replace("$",t));return{off:{fill:{rest:n("fill-action-status-$-subtle-rest"),hover:n("fill-action-status-$-subtle-hover"),pressed:n("fill-action-status-$-subtle-pressed")},stroke:{rest:n("stroke-action-status-$-rest"),hover:n("stroke-action-status-$-hover"),pressed:n("stroke-action-status-$-pressed")},text:{rest:n("foreground-action-status-$-on-subtle-rest"),hover:n("foreground-action-status-$-on-subtle-hover"),pressed:n("foreground-action-status-$-on-subtle-pressed")}},on:{fill:{rest:n("fill-action-status-$-strong-rest"),hover:n("fill-action-status-$-strong-hover"),pressed:n("fill-action-status-$-strong-pressed")},text:n("foreground-action-status-$-on-strong")}}},S4={Small:{fontSize:"font-size-xs",lineHeight:"line-height-xs-single",icon:11,ico:12,contentMax:200,height:20},Medium:{fontSize:"font-size-xs",lineHeight:"line-height-xs-single",icon:12,ico:14,contentMax:196,height:22},Large:{fontSize:"font-size-s",lineHeight:"line-height-xs-single",icon:14,ico:16,contentMax:192,height:24}},wn={radius:Xt("cornerradius-large"),radiusX:Xt("cornerradius-full"),border:Xt("borderwidth-base"),padTop:Xt("padding-xxxxtight"),padBottom:Xt("padding-xxxxtight"),padLeft:Xt("padding-xxxtight"),padRight:Xt("padding-xxtight"),gap:Xt("gap-xxxtight")},tt={pill:Xt("padding-xxxtight"),text:Xt("padding-xxxtight"),fieldGap:Xt("gap-xxtight"),rowGap:Xt("gap-xtight"),touchW:Xt("accessibility-touch-target-aa-width"),touchH:Xt("accessibility-touch-target-aa-height"),ring:ft("stroke-focusring-base"),ringWidth:w4("focusring-width"),ringOffset:w4("focusring-offset"),fieldMax:80,badgeMax:240,duration:"var(--motion-duration-2)",easing:"var(--motion-easing-standard)"},k4=(e,t="weight-medium")=>({fontFamily:"inherit",fontSize:ed(e.fontSize),lineHeight:ed(e.lineHeight),fontWeight:ed(t),letterSpacing:ed("letter-spacing-extraspacious"),whiteSpace:"nowrap"}),B1={minWidth:0,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},E4={display:"inline-flex",alignItems:"center",justifyContent:"center",flexShrink:0,minWidth:tt.touchW,minHeight:tt.touchH,boxSizing:"border-box",padding:0,margin:0,border:0,background:"transparent",font:"inherit",color:"inherit",textDecoration:"none",outline:"none"},T4=e=>e?`inset 0 0 0 ${wn.border} ${e}`:"none",P4=e=>e?{outline:`${tt.ringWidth} solid ${tt.ring}`,outlineOffset:tt.ringOffset}:{outline:"none"},_4=e=>e.height?{height:e.height,paddingTop:0,paddingBottom:0}:{},L4=`background ${tt.duration} ${tt.easing}, color ${tt.duration} ${tt.easing}, box-shadow ${tt.duration} ${tt.easing}`;function R4({type:e="static",label:t,fieldLabel:n,showFieldLabel:r=!1,status:o="Neutral",size:a="Small",badgeStyle:i="Outline & Fill",leadingIcon:s,trailingIcon:l,showTrailingIcon:d=!1,selected:u,defaultSelected:m=!1,onChange:h,onRemove:$,href:g,disabled:b=!1,removeDisabled:C=!1,forceState:f,className:c="",style:p,...x}){let v=S4[a]||S4.Small,[w,P]=(0,Zi.useState)(m),[S,_]=(0,Zi.useState)(!1),[E,D]=(0,Zi.useState)(!1),[z,H]=(0,Zi.useState)(!1),y=S||f==="hover",L=E||f==="pressed",N=z||f==="focused",T={"Outline & Fill":{fill:!0,stroke:"strong"},Fill:{fill:!0,stroke:null},Outline:{fill:!1,stroke:"subtle"},Naked:{fill:!1,stroke:null}}[i]||{fill:!0,stroke:"strong"};if(e==="static"){let ae=td[o]||td.Neutral,Se=T.stroke==="strong"?ft(ae.strokeStrong):T.stroke==="subtle"?ft(ae.strokeSubtle):null;return(0,pt.jsxs)("span",{className:`pw-badge ${c}`,"data-type":"static","data-status":o,"data-size":a,style:{display:"inline-flex",alignItems:"center",boxSizing:"border-box",gap:wn.gap,paddingTop:wn.padTop,paddingRight:wn.padRight,paddingBottom:wn.padBottom,paddingLeft:wn.padLeft,..._4(v),borderRadius:wn.radius,background:T.fill?ft(ae.fill):"transparent",boxShadow:Se?`inset 0 0 0 ${wn.border} ${Se}`:"none",color:ft(i==="Naked"&&ae.textNaked?ae.textNaked:ae.text),...k4(v),...p},...x,children:[s&&(0,pt.jsx)(me,{name:s,size:v.icon,fill:1}),t,l&&(0,pt.jsx)(me,{name:l,size:v.icon})]})}let U={display:"inline-flex",alignItems:"center",boxSizing:"border-box",gap:0,paddingTop:wn.padTop,paddingBottom:wn.padBottom,paddingLeft:tt.pill,paddingRight:tt.pill,borderRadius:wn.radius,maxWidth:r?"none":tt.badgeMax,minWidth:0,transition:L4,...k4(v),..._4(v)},R={display:"inline-flex",minWidth:0,paddingLeft:tt.text,paddingRight:tt.text},Y=(ae,Se=0)=>(0,pt.jsx)(me,{name:ae,size:v.ico,fill:Se,style:{flexShrink:0}});if(e==="dismissible"){let ae=td[o]||td.Neutral,Se=T.stroke==="strong"?ft(ae.strokeStrong):T.stroke==="subtle"?ft(ae.strokeSubtle):null,Mt=b||C,nr=r&&n?`${n} ${t}`:t,Er=Mt?"transparent":L?ft("fill-action-secondary-pressed"):y?ft("fill-action-secondary-hover"):"transparent",Oa=ft(Mt?"foreground-action-disabled":L?"foreground-action-secondary-pressed":y?"foreground-action-secondary-hover":"foreground-action-secondary-rest");return(0,pt.jsx)("span",{className:`pw-badge pw-badge--dismissible ${c}`,"data-type":"dismissible","data-status":o,"data-size":a,style:{...E4,...p},...x,children:(0,pt.jsxs)("span",{className:"pw-badge__pill",style:{...U,background:T.fill?ft(ae.fill):"transparent",color:ft(i==="Naked"&&ae.textNaked?ae.textNaked:ae.text),boxShadow:T4(Se),...P4(N)},children:[s&&Y(s,1),(0,pt.jsxs)("span",{className:"pw-badge__label",style:{...R,gap:tt.fieldGap},children:[r&&n&&(0,pt.jsx)("span",{style:{...B1,maxWidth:tt.fieldMax},children:n}),(0,pt.jsx)("span",{style:{...B1,maxWidth:v.contentMax},children:t})]}),(0,pt.jsxs)("button",{type:"button",className:"pw-badge__remove","aria-label":`Remove ${nr}`,"aria-disabled":Mt||void 0,onClick:pn=>{if(Mt){pn.preventDefault();return}$?.(pn)},onMouseEnter:()=>!Mt&&_(!0),onMouseLeave:()=>{_(!1),D(!1)},onMouseDown:()=>!Mt&&D(!0),onMouseUp:()=>D(!1),onFocus:pn=>{pn.target.matches?.(":focus-visible")&&H(!0)},onBlur:()=>{H(!1),D(!1)},onKeyDown:pn=>{(pn.key===" "||pn.key==="Enter")&&!Mt&&D(!0)},onKeyUp:()=>D(!1),style:{position:"relative",display:"inline-flex",alignItems:"center",justifyContent:"center",width:v.ico,height:v.ico,padding:0,margin:0,border:0,outline:"none",borderRadius:wn.radiusX,background:Er,color:Oa,flexShrink:0,cursor:Mt?"not-allowed":"pointer",transition:L4},children:[(0,pt.jsx)(me,{name:"close",size:v.ico}),(0,pt.jsx)("span",{"aria-hidden":"true",style:{position:"absolute",left:"50%",top:"50%",transform:"translate(-50%, -50%)",width:tt.touchW,height:tt.touchH}})]})]})})}let F=u!==void 0?u:w,X=km(o),G=L?"pressed":y?"hover":"rest",q=T.fill||G!=="rest",se=b?ft("fill-action-disabled"):F?X.on.fill[G]:q?X.off.fill[G]:"transparent",be=b?ft("foreground-action-disabled"):F?X.on.text:X.off.text[G],ee=b||F||!T.stroke?null:X.off.stroke[G],Ie=!!g||d,Q=F?"check":s,oe=g?"a":"button",Xe={onMouseEnter:()=>!b&&_(!0),onMouseLeave:()=>{_(!1),D(!1)},onMouseDown:()=>!b&&D(!0),onMouseUp:()=>D(!1),onFocus:ae=>{ae.target.matches?.(":focus-visible")&&H(!0)},onBlur:()=>{H(!1),D(!1)},onKeyDown:ae=>{(ae.key===" "||ae.key==="Enter")&&!b&&D(!0)},onKeyUp:()=>D(!1),onClick:ae=>{if(b){ae.preventDefault();return}if(Ie){x.onClick?.(ae);return}let Se=!F;u===void 0&&P(Se),h?.(Se)}};return(0,pt.jsx)(oe,{className:`pw-badge pw-badge--interactive ${c}`,"data-type":"interactive","data-status":o,"data-size":a,...g?{href:g}:{type:"button"},...Ie?null:{"aria-pressed":F},"aria-disabled":b||void 0,...x,...Xe,style:{...E4,cursor:b?"not-allowed":"pointer",...p},children:(0,pt.jsxs)("span",{className:"pw-badge__pill",style:{...U,background:se,color:be,boxShadow:T4(ee),...P4(N)},children:[Q&&Y(Q,F?0:1),(0,pt.jsx)("span",{className:"pw-badge__label",style:R,children:(0,pt.jsx)("span",{style:{...B1,display:"block",maxWidth:v.contentMax},children:t})}),d&&Y(l||"chevron_right")]})})}var Em=["type","label","field-label","show-field-label","status","size","badge-style","leading-icon","show-trailing-icon","href","selected","disabled","remove-disabled"],V1=class extends HTMLElement{static get observedAttributes(){return Em}constructor(){super(),this._reactRoot=null}connectedCallback(){this._reactRoot||(this.style.display=this.style.display||"inline-flex",this._reactRoot=(0,I4.createRoot)(this)),this._render()}disconnectedCallback(){let t=this._reactRoot;this._reactRoot=null,t&&Promise.resolve().then(()=>t.unmount())}attributeChangedCallback(){this._render()}_bool(t){if(!this.hasAttribute(t))return;let n=this.getAttribute(t);return n!=="false"&&n!=="0"}_emit(t,n){this.dispatchEvent(new CustomEvent(t,{detail:n,bubbles:!0,composed:!0}))}_render(){if(!this._reactRoot)return;let t=this._bool("selected");this._reactRoot.render(M4.default.createElement(R4,{type:this.getAttribute("type")||"static",label:this.getAttribute("label")||"",fieldLabel:this.getAttribute("field-label")||void 0,showFieldLabel:!!this._bool("show-field-label"),status:this.getAttribute("status")||"Neutral",size:this.getAttribute("size")||"Small",badgeStyle:this.getAttribute("badge-style")||"Outline & Fill",leadingIcon:this.getAttribute("leading-icon")||void 0,showTrailingIcon:!!this._bool("show-trailing-icon"),href:this.getAttribute("href")||void 0,selected:t,disabled:!!this._bool("disabled"),removeDisabled:!!this._bool("remove-disabled"),onChange:n=>{t!==void 0&&this.toggleAttribute("selected",n),this._emit("pathway-badge-change",{selected:n})},onRemove:()=>this._emit("pathway-badge-remove",{})}))}};customElements.get("pathway-badge")||customElements.define("pathway-badge",V1);var A4=k(V(),1),D4=k(rn(),1);var Ye=k(V(),1);var lt=k(ne(),1),Sn=e=>`var(--semantic-color-${e})`,wt=e=>`var(--semantic-layout-units-${e})`,Tm=e=>`var(--contextual-layout-units-${e})`,Yi=e=>`var(--semantic-type-${e})`,nd=e=>`var(--motion-${e})`,W1=e=>`var(--primitive-unit-unit-${e})`,qr=e=>({rest:Sn(`${e}-rest`),hover:Sn(`${e}-hover`),pressed:Sn(`${e}-pressed`)}),Pm={fill:{...qr("fill-action-secondary"),disabled:Sn("fill-action-disabled")},fg:{...qr("foreground-action-secondary"),disabled:Sn("foreground-action-disabled")},stroke:null},N4={Primary:{fill:qr("fill-action-primary-strong"),fg:{rest:Sn("foreground-action-primary-on-strong"),hover:Sn("foreground-action-primary-on-strong"),pressed:Sn("foreground-action-primary-on-strong")},stroke:null},Secondary:{fill:{rest:Sn("fill-surface-elevated"),hover:Sn("fill-surface-elevated"),pressed:Sn("fill-surface-elevated")},fg:qr("foreground-action-secondary"),stroke:qr("stroke-action-secondary")},Tertiary:{fill:qr("fill-action-primary-subtle"),fg:qr("foreground-action-primary-on-subtle"),stroke:qr("stroke-action-primary-strong")}},un={gap:wt("gap-xxxtight"),border:wt("borderwidth-base"),touchW:wt("accessibility-touch-target-aa-width"),touchH:wt("accessibility-touch-target-aa-height"),focusOutline:`${Tm("focusring-width")} solid ${Sn("stroke-focusring-base")}`,focusOffset:"0",colour:`${nd("duration-2")} ${nd("easing-standard")}`,shape:`${nd("duration-4")} ${nd("easing-spring-soft")}`},rd=(e,t,n)=>({fontFamily:Yi("family-brand"),fontSize:Yi(`font-size-${e}`),fontWeight:Yi("weight-medium"),lineHeight:Yi(`line-height-${t}`),letterSpacing:Yi(`letter-spacing-${n}`)}),H4={XS:{height:28,padH:wt("padding-xtight"),inner:wt("cornerradius-small"),outer:W1(14),gap:wt("gap-xtight"),icon:14,...rd("xs","xs-single","extraspacious")},S:{height:32,padH:wt("padding-tight"),inner:wt("cornerradius-small"),outer:wt("cornerradius-xlarge"),gap:wt("gap-tight"),icon:16,...rd("s","s-single","spacious")},M:{height:40,padH:wt("padding-base"),inner:wt("cornerradius-base"),outer:W1(20),gap:wt("gap-tight"),icon:18,...rd("r","r-single","wide")},L:{height:48,padH:wt("padding-relaxed"),inner:wt("cornerradius-base"),outer:W1(24),gap:wt("gap-tight"),icon:20,...rd("m","m-single","wide")}},_m=(e,t,n)=>{if(n)return e.outer;let r=e.outer,o=e.inner;return t==="Only"?r:t==="First"?`${r} ${o} ${o} ${r}`:t==="Last"?`${o} ${r} ${r} ${o}`:o},od=(0,Ye.forwardRef)(function({toggleStyle:t="Secondary",size:n="S",selected:r=!1,position:o="Middle",label:a="Label",icon:i,showIcon:s=!0,showLabel:l=!0,disabled:d=!1,fill:u=!1,forceState:m=null,as:h="radio",onPointerEnter:$,onPointerLeave:g,onPointerDown:b,onPointerUp:C,onFocus:f,onBlur:c,onKeyDown:p,onKeyUp:x,onClick:v,className:w="",...P},S){let _=Je(),[E,D]=(0,Ye.useState)(!1),[z,H]=(0,Ye.useState)(!1),[y,L]=(0,Ye.useState)(!1),N=H4[n]||H4.S,T=r?N4[t]||N4.Secondary:Pm,U=d?"disabled":m==="pressed"||z?"pressed":m==="hover"||E?"hover":"rest",R=!d&&(m==="focused"||y),Y=s&&!l,F={display:"flex",alignItems:"center",justifyContent:"center",gap:N.gap,boxSizing:"border-box",height:N.height,minWidth:un.touchW,width:u?"100%":void 0,paddingLeft:Y?0:N.padH,paddingRight:Y?0:N.padH,borderRadius:_m(N,o,r),background:T.fill[U]||T.fill.rest,color:T.fg[U]||T.fg.rest,boxShadow:T.stroke&&!R?`inset 0 0 0 ${un.border} ${T.stroke[U]||T.stroke.rest}`:"none",outline:R?un.focusOutline:"none",outlineOffset:R?un.focusOffset:void 0,fontFamily:N.fontFamily,fontSize:N.fontSize,fontWeight:N.fontWeight,lineHeight:N.lineHeight,letterSpacing:N.letterSpacing,whiteSpace:"nowrap",transition:_?"none":`background-color ${un.colour}, color ${un.colour}, box-shadow ${un.colour}, border-radius ${un.shape}`},X={position:"relative",zIndex:R?1:void 0,display:"inline-flex",alignItems:"center",justifyContent:"center",minHeight:un.touchH,minWidth:un.touchW,flex:u?"1 1 0":"0 0 auto",padding:0,margin:0,border:0,background:"transparent",outline:"none",font:"inherit",color:"inherit",cursor:d?"not-allowed":"pointer",WebkitTapHighlightColor:"transparent"},G=h==="radio";return(0,lt.jsx)("button",{ref:S,type:"button",role:G?"radio":void 0,"aria-checked":G?r:void 0,"aria-disabled":d||void 0,"aria-label":Y?a:void 0,"data-selected":r||void 0,className:`pw-toggle-button__option ${w}`.trim(),style:X,...P,onPointerEnter:q=>{D(!0),$?.(q)},onPointerLeave:q=>{D(!1),H(!1),g?.(q)},onPointerDown:q=>{d||H(!0),b?.(q)},onPointerUp:q=>{H(!1),C?.(q)},onFocus:q=>{let se=!0;try{se=q.target.matches(":focus-visible")}catch{}L(se),f?.(q)},onBlur:q=>{L(!1),H(!1),c?.(q)},onKeyDown:q=>{!d&&(q.key===" "||q.key==="Enter")&&H(!0),p?.(q)},onKeyUp:q=>{H(!1),x?.(q)},onClick:v,children:(0,lt.jsxs)("span",{className:"pw-toggle-button__main",style:F,children:[s&&i&&(0,lt.jsx)(me,{name:i,size:N.icon,fill:r?1:0}),l&&(0,lt.jsx)("span",{className:"pw-toggle-button__label",children:a})]})})});function Lm(e,t,n,r,o,a){let i=u=>u.reduce((m,h)=>m+t[h],0)+Math.max(0,u.length-1)*a,s=e.map((u,m)=>m);if(i(s)<=r)return{visible:s,hidden:[]};let l=r-o-a,d=[...s.filter(u=>e[u].disabled).reverse(),...s.filter(u=>!e[u].disabled&&e[u].value!==n).reverse()];for(let u of d){if(i(s)<=l)break;s=s.filter(m=>m!==u)}return{visible:s,hidden:e.map((u,m)=>m).filter(u=>!s.includes(u))}}var Rm=(e,t,n)=>{if(typeof window>"u"||!e)return n;let r=parseFloat(getComputedStyle(e).getPropertyValue(t));return Number.isFinite(r)?r:n};function F4({options:e=[],value:t,defaultValue:n,onChange:r,label:o,toggleStyle:a="Secondary",size:i="S",showIcon:s=!1,showLabel:l=!0,fill:d=!1,moreLabel:u="More",className:m="",style:h}){let $=e.find(F=>!F.disabled)?.value,g=t!==void 0,[b,C]=(0,Ye.useState)(n??$),f=g?t:b,c=(0,Ye.useCallback)(F=>{let X=e.find(G=>G.value===F);!X||X.disabled||F===f||(g||C(F),r?.(F))},[e,f,g,r]),p=(0,Ye.useRef)(null),x=(0,Ye.useRef)(null),v=(0,Ye.useRef)({}),[w,P]=(0,Ye.useState)({visible:e.map((F,X)=>X),hidden:[],natural:null}),[S,_]=(0,Ye.useState)(null),E=(0,Ye.useCallback)(()=>{let F=p.current,X=x.current;if(!F||!X)return;let G=[...X.querySelectorAll("[data-measure]")],q=G.slice(0,e.length).map(oe=>oe.getBoundingClientRect().width),se=G[e.length]?.getBoundingClientRect().width||0,be=Rm(F,"--semantic-layout-units-gap-xxxtight",2),ee=q.reduce((oe,Xe)=>oe+Xe,0)+Math.max(0,q.length-1)*be,Ie=F.getBoundingClientRect().width,Q=Lm(e,q,f,Math.max(Ie,0),se,be);P(oe=>oe.natural===ee&&oe.visible.join()===Q.visible.join()?oe:{...Q,natural:ee})},[e,f]);(0,Ye.useLayoutEffect)(()=>{E()},[E,i,s,l,a]),(0,Ye.useEffect)(()=>{if(typeof ResizeObserver>"u")return;let F=new ResizeObserver(()=>E());return p.current&&F.observe(p.current),x.current&&F.observe(x.current),()=>F.disconnect()},[E]),(0,Ye.useEffect)(()=>{if(S==null)return;let F=requestAnimationFrame(()=>{v.current[S]?.focus(),_(null)});return()=>cancelAnimationFrame(F)},[S,w]);let D=w.visible.filter(F=>F<e.length),z=w.hidden.filter(F=>F<e.length),H=z.length>0,y=s&&!l,L=(F,X)=>{let G=D.indexOf(X),q=be=>{let ee=e[D[be]];v.current[ee.value]?.focus(),ee.disabled||c(ee.value)},se=D.filter(be=>!e[be].disabled);F.key==="ArrowRight"||F.key==="ArrowDown"?(F.preventDefault(),q((G+1)%D.length)):F.key==="ArrowLeft"||F.key==="ArrowUp"?(F.preventDefault(),q((G-1+D.length)%D.length)):F.key==="Home"&&se.length?(F.preventDefault(),q(D.indexOf(se[0]))):F.key==="End"&&se.length?(F.preventDefault(),q(D.indexOf(se[se.length-1]))):(F.key===" "||F.key==="Enter")&&(F.preventDefault(),c(e[X].value))},N=D.length+(H?1:0),T=F=>N===1?"Only":F===0?"First":F===N-1?"Last":"Middle",U={toggleStyle:a,size:i,showIcon:s,showLabel:l,fill:d},R=(F,X)=>{let G=e[F],q=G.value===f,se=(0,lt.jsx)(od,{ref:be=>{v.current[G.value]=be},...U,label:G.label,icon:G.icon,selected:q,disabled:!!G.disabled,position:T(X),tabIndex:q?0:-1,onClick:()=>c(G.value),onKeyDown:be=>L(be,F)},G.value);return G.disabled&&G.reason?(0,lt.jsx)(ji,{content:y?`${G.label}. ${G.reason}`:G.reason,describe:G.reason,purpose:"description",persistOnPress:!0,children:se},G.value):y?(0,lt.jsx)(ji,{content:G.label,purpose:"label",children:se},G.value):se},Y={display:d?"flex":"inline-flex",alignItems:"center",gap:un.gap,width:d?"100%":w.natural!=null?w.natural:void 0,maxWidth:"100%",minWidth:0,flexShrink:1,position:"relative",verticalAlign:"middle",...h};return(0,lt.jsxs)("div",{ref:p,className:`pw-toggle-button ${m}`.trim(),style:Y,children:[(0,lt.jsx)("div",{role:"radiogroup","aria-label":o,style:{display:"flex",alignItems:"center",gap:un.gap,flex:d?"1 1 auto":"0 0 auto",minWidth:0},children:D.map((F,X)=>R(F,X))}),H&&(0,lt.jsx)(U3,{align:"end",label:y?"More options":u,renderTrigger:({title:F,...X})=>(0,lt.jsx)(od,{...U,...X,as:"button",fill:!1,label:y?"More options":u,icon:y?"more_horiz":void 0,position:T(N-1)}),children:z.map(F=>{let X=e[F];return(0,lt.jsx)(W3,{label:X.label,icon:s?X.icon:void 0,disabled:!!X.disabled,note:X.disabled?X.reason:void 0,onSelect:()=>{c(X.value),_(X.value)}},X.value)})}),(0,lt.jsxs)("div",{ref:x,"aria-hidden":"true",inert:"",style:{position:"absolute",left:0,top:0,visibility:"hidden",pointerEvents:"none",display:"flex",gap:un.gap,whiteSpace:"nowrap"},children:[e.map(F=>(0,lt.jsx)("span",{"data-measure":"",style:{display:"inline-flex"},children:(0,lt.jsx)(od,{...U,fill:!1,label:F.label,icon:F.icon,selected:F.value===f,tabIndex:-1})},F.value)),(0,lt.jsx)("span",{"data-measure":"",style:{display:"inline-flex"},children:(0,lt.jsx)(od,{...U,fill:!1,as:"button",label:y?"More options":u,icon:y?"more_horiz":void 0,tabIndex:-1})})]})]})}var Mm=`
|
|
337
337
|
:host { display: inline-flex; max-width: 100%; min-width: 0; }
|
|
338
338
|
:host([fill]) { display: flex; width: 100%; }
|
|
339
339
|
:host([hidden]) { display: none; }
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@helloimjolopez-pathway/pathway-components",
|
|
3
|
-
"version": "0.10.
|
|
3
|
+
"version": "0.10.1",
|
|
4
4
|
"description": "Pathway Design System components for Ministry Brands products: web components (pathway-nav-shell, pathway-top-nav, pathway-sidenav, pathway-accounting-sidenav and more) and React source.",
|
|
5
5
|
"homepage": "https://potential-bassoon-voz982n.pages.github.io/storybook/",
|
|
6
6
|
"repository": {
|