@yahoo/uds 3.0.5 → 3.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/client/index.cjs +2 -2
- package/dist/client/index.d.cts +2 -2
- package/dist/client/index.d.ts +2 -2
- package/dist/client/index.js +2 -2
- package/dist/metafile-cjs.json +1 -1
- package/dist/metafile-esm.json +1 -1
- package/package.json +1 -1
- package/cli/ButtonFile.mock.tsx +0 -15
- package/cli/ButtonFile2.mock.tsx +0 -11
package/dist/client/index.cjs
CHANGED
@@ -1,3 +1,3 @@
|
|
1
1
|
"use client";
|
2
|
-
"use strict";var e=require("../chunk-GXQ463ZU.cjs"),t=require("../chunk-7DDAOT2K.cjs"),a=require("../chunk-HTL6WRXY.cjs"),r=require("../chunk-NUEZVMWZ.cjs"),n=require("react"),s=require("react/jsx-runtime"),i=require("@yahoo/uds/fixtures"),o=require("motion/react"),l=require("lodash-es"),c=require("@ariakit/react/menu"),d=require("use-sync-external-store/shim/index.js"),u=require("@ariakit/react");function m(e){return e&&e.__esModule?e:{default:e}}function h(e){if(e&&e.__esModule)return e;var t=Object.create(null);return e&&Object.keys(e).forEach((function(a){if("default"!==a){var r=Object.getOwnPropertyDescriptor(e,a);Object.defineProperty(t,a,r.get?r:{enumerable:!0,get:function(){return e[a]}})}})),t.default=e,Object.freeze(t)}var p=h(n),x=m(d),f={first:e=>e[0]||"",last:e=>e[e.length-1]||"",firstAndLast:e=>1===e.length?e[0]:`${e[0]}${e[e.length-1]}`,firstTwo:e=>e.slice(0,2).join(""),firstThree:e=>e.slice(0,3).join(""),firstOfEach:e=>e.join("")},g=(e,t="firstAndLast")=>{if(!e)return"";const a=e.trim().split(/\s+/).map((e=>e[0].toUpperCase()));return"function"==typeof t?t(e):f[t](a)},b=(t="md")=>e.getStyles({avatarSizeRoot:t,flexShrink:"0",textAlign:"center",display:"inline-flex",justifyContent:"center",alignItems:"center",overflow:"visible",className:"truncate"}),v=e=>e?{height:e,width:e}:{},y=({size:e,variant:t})=>{if("outline"===t)switch(e){case"sm":return s.jsx(s.Fragment,{children:s.jsx("path",{fill:"currentColor",d:"M8.4 2.6H2.6v10.8H4V11h3v2.4h1.4zM1 15V1h9v2.524l5 1.746V15zm9.1-9.746V13.4h3.3V6.406zM4.5 4h2v2h-2zm2 3.5h-2v2h2z"})});case"md":return s.jsx(s.Fragment,{children:s.jsx("path",{fill:"currentColor",d:"M13.367 4.752H4.3v14.495h2.724v-4.533h3.619v4.533h2.714V4.762l.01.003zM21.5 21.047h-19V2.952h12.667v2.494L21.5 7.843zm-1.8-1.8V9.087L15.167 7.37v11.876zM7.929 11.095h-1.81v1.81h1.81zm-1.81-3.619h1.81v1.81h-1.81zm5.429 0h-1.81v1.81h1.81zm-1.81 3.619h1.81v1.81h-1.81z"})});case"lg":return s.jsx(s.Fragment,{children:s.jsx("path",{fill:"currentColor",d:"M17.8 4.2H4.2v23.6H8V21h6v6.8h3.8zM2 30V2h18v5.725l10 3.626V30zm18.2-19.862V27.8h7.6V12.894zM10 8H7v3h3zm-3 6h3v3H7zm5-6h3v3h-3zm3 6h-3v3h3zm7.5 1h3v3h-3zm3 6h-3v3h3z"})})}if("fill"===t)switch(e){case"sm":return s.jsx(s.Fragment,{children:s.jsx("path",{fill:"currentColor",d:"M4.5 4v2h2V4zm2 3.5h-2v2h2zM12 4l3 1.27V15h-3zM1 1h9v14H1z"})});case"md":return s.jsx(s.Fragment,{children:s.jsx("path",{fill:"currentColor",d:"M2.5 2.952h10.857v18.095H2.5zm2.714 7.238V12h1.81v-1.81zm1.81-3.619h-1.81v1.81h1.81zm1.81 0v1.81h1.809V6.57zm1.809 3.62h-1.81V12h1.81zm-4.524 4.523v4.524h3.62v-4.524zM21.5 7.843l-6.333-3.081v16.285H21.5z"})});case"lg":return s.jsx(s.Fragment,{children:s.jsx("path",{fill:"currentColor",d:"M2 2h16v28H2zm5 19v7h6v-7zM8.5 7h-3v3h3zm-3 6v3h3v-3zm9-6h-3v3h3zm-3 6v3h3v-3zM20 7l10 4.351V30H20zm3.5 8v3h3v-3z"})})}return s.jsx(s.Fragment,{})};y.metadata={name:"Building",isSvgIcon:!0,variants:["outline","fill"]};var S=({size:e,variant:t})=>{if("outline"===t)switch(e){case"sm":return s.jsx(s.Fragment,{children:s.jsx("path",{fill:"currentColor",d:"M13.5 3.89 6.951 12 2.5 7.48l.958-.993 3.394 3.447L12.452 3z"})});case"md":return s.jsx(s.Fragment,{children:s.jsx("path",{fill:"currentColor",d:"M20.264 5.852 10.37 18.366l-6.642-6.89 1.295-1.249 5.213 5.407 8.616-10.898z"})});case"lg":return s.jsx(s.Fragment,{children:s.jsx("path",{fill:"currentColor",d:"M30.19 6.341 13.677 26.276 2.803 15.509l1.688-1.706 9.012 8.922L28.341 4.81z"})})}if("fill"===t)switch(e){case"sm":return s.jsx(s.Fragment,{children:s.jsx("path",{fill:"currentColor",d:"M13.593 4.502 6.968 12.5 2.4 7.978 3.505 6.86l3.348 3.315 5.53-6.676z"})});case"md":return s.jsx(s.Fragment,{children:s.jsx("path",{fill:"currentColor",d:"m20.545 5.82-10.16 12.85-6.94-7.198 1.584-1.527 5.192 5.385L18.82 4.455z"})});case"lg":return s.jsx(s.Fragment,{children:s.jsx("path",{fill:"currentColor",d:"M30.33 6.328 13.687 26.423 2.662 15.51l1.829-1.848 9.005 8.916 14.832-17.91z"})})}return s.jsx(s.Fragment,{})};S.metadata={name:"Check",isSvgIcon:!0,variants:["outline","fill"]};var C=({size:e,variant:t})=>{if("outline"===t)switch(e){case"sm":return s.jsx(s.Fragment,{children:s.jsx("path",{fill:"currentColor",d:"m12.526 4.465-.99-.99L8 7.01 4.465 3.475l-.99.99L7.01 8l-3.535 3.536.99.99L8 8.99l3.536 3.536.99-.99L8.99 8z"})});case"md":return s.jsx(s.Fragment,{children:s.jsx("path",{fill:"currentColor",d:"m13.44 11.956 6.572-6.571L18.527 3.9l-6.571 6.57L5.385 3.9 3.9 5.385l6.57 6.57-6.57 6.572 1.485 1.485 6.57-6.571 6.572 6.57 1.485-1.484z"})});case"lg":return s.jsx(s.Fragment,{children:s.jsx("path",{fill:"currentColor",d:"M17.702 15.934 28.818 4.818 27.05 3.05 15.934 14.166 4.818 3.05 3.05 4.818l11.116 11.116L3.05 27.05l1.768 1.768 11.116-11.116L27.05 28.818l1.768-1.768z"})})}if("fill"===t)switch(e){case"sm":return s.jsx(s.Fragment,{children:s.jsx("path",{fill:"currentColor",d:"m9.131 8 3.536-3.536-1.131-1.131L8 6.869 4.464 3.333 3.333 4.464 6.869 8l-3.536 3.535 1.131 1.132L8 9.13l3.535 3.536 1.132-1.131z"})});case"md":return s.jsx(s.Fragment,{children:s.jsx("path",{fill:"currentColor",d:"m12 13.768 6.337 6.337 1.768-1.768L13.768 12l6.337-6.337-1.768-1.768L12 10.232 5.663 3.895 3.895 5.663 10.232 12l-6.337 6.337 1.768 1.768z"})});case"lg":return s.jsx(s.Fragment,{children:s.jsx("path",{fill:"currentColor",d:"M17.91 16 28.954 4.955l-1.91-1.91L16 14.091 4.955 3.045l-1.91 1.91L14.091 16 3.045 27.045l1.91 1.91L16 17.909l11.045 11.046 1.91-1.91z"})})}return s.jsx(s.Fragment,{})};C.metadata={name:"Cross",isSvgIcon:!0,variants:["outline","fill"]};var j=({size:e,variant:t})=>{if("outline"===t)switch(e){case"sm":return s.jsx(s.Fragment,{children:s.jsx("path",{fill:"currentColor",d:"M12.7 8.7H3.3V7.3h9.4z"})});case"md":return s.jsx(s.Fragment,{children:s.jsx("path",{fill:"currentColor",d:"M2.97 10.75h17.838v2.1H2.97z"})});case"lg":return s.jsx(s.Fragment,{children:s.jsx("path",{fill:"currentColor",d:"M27 17H4.7v-2.3H27z"})})}if("fill"===t)switch(e){case"sm":return s.jsx(s.Fragment,{children:s.jsx("path",{fill:"currentColor",d:"M12.8 8.8H3.2V7.2h9.6z"})});case"md":return s.jsx(s.Fragment,{children:s.jsx("path",{fill:"currentColor",d:"M2.966 10.75h18.068v2.5H2.966z"})});case"lg":return s.jsx(s.Fragment,{children:s.jsx("path",{fill:"currentColor",d:"M27.3 17.3H4.7v-2.6h22.6z"})})}return s.jsx(s.Fragment,{})};j.metadata={name:"Minus",isSvgIcon:!0,variants:["outline","fill"]};var I=({size:e,variant:t})=>{if("outline"===t)switch(e){case"sm":return s.jsx(s.Fragment,{children:s.jsx("path",{fill:"currentColor",d:"M9.2 4.5a1.2 1.2 0 1 0-2.4 0 1.2 1.2 0 0 0 2.4 0m1.8 0a3 3 0 1 1-6 0 3 3 0 0 1 6 0m.706 6.19a2.97 2.97 0 0 0-1.472-.39H5.766a2.966 2.966 0 0 0-2.912 2.4h10.292a2.97 2.97 0 0 0-1.44-2.01M1 13.267A4.766 4.766 0 0 1 5.766 8.5h4.468A4.765 4.765 0 0 1 15 13.266v1.166c0 .038-.03.068-.068.068H1.068A.07.07 0 0 1 1 14.432z"})});case"md":return s.jsx(s.Fragment,{children:s.jsx("path",{fill:"currentColor",d:"M14.25 7.95a2.25 2.25 0 1 0-4.5 0 2.25 2.25 0 0 0 4.5 0m1.8 0a4.05 4.05 0 1 1-8.1 0 4.05 4.05 0 0 1 8.1 0m.927 7.244A4.2 4.2 0 0 0 15 14.7H9a4.2 4.2 0 0 0-4.157 3.6h14.314a4.2 4.2 0 0 0-2.18-3.106M3 18.9a6 6 0 0 1 6-6h6a6 6 0 0 1 6 6v1.121a.08.08 0 0 1-.079.079H3.08a.08.08 0 0 1-.08-.08z"})});case"lg":return s.jsx(s.Fragment,{children:s.jsx("path",{fill:"currentColor",d:"M19.7 10a3.7 3.7 0 1 0-7.4 0 3.7 3.7 0 0 0 7.4 0m2.3 0a6 6 0 1 1-12 0 6 6 0 0 1 12 0m8 17.043q0-.681-.1-1.343a9.044 9.044 0 0 0-8.943-7.7h-9.914A9.04 9.04 0 0 0 2 27.043V28h28zM8.144 20.955a6.74 6.74 0 0 1 2.9-.655h9.913a6.744 6.744 0 0 1 6.608 5.4H4.435a6.74 6.74 0 0 1 3.71-4.745"})})}if("fill"===t)switch(e){case"sm":return s.jsx(s.Fragment,{children:s.jsx("path",{fill:"currentColor",d:"M8 7.5a3 3 0 1 0 0-6 3 3 0 0 0 0 6M3.401 9.128A4.77 4.77 0 0 0 1 13.266v1.166c0 .038.03.068.068.068h13.864c.038 0 .068-.03.068-.068v-1.166A4.766 4.766 0 0 0 10.234 8.5H5.766a4.76 4.76 0 0 0-2.365.628"})});case"md":return s.jsx(s.Fragment,{children:s.jsx("path",{fill:"currentColor",d:"M12 12a4.05 4.05 0 1 0 0-8.1 4.05 4.05 0 0 0 0 8.1m-5.824 1.606A6 6 0 0 0 3 18.9v1.121c0 .044.035.079.079.079H20.92a.08.08 0 0 0 .08-.08V18.9a6 6 0 0 0-6-6H9a6 6 0 0 0-2.824.706"})});case"lg":return s.jsx(s.Fragment,{children:s.jsx("path",{fill:"currentColor",d:"M16 16a6 6 0 1 0 0-12 6 6 0 0 0 0 12m-8.845 2.878A9.04 9.04 0 0 0 2 27.043V28h28v-.957A9.043 9.043 0 0 0 20.957 18h-9.914a9.05 9.05 0 0 0-3.888.878"})})}return s.jsx(s.Fragment,{})};I.metadata={name:"Person",isSvgIcon:!0,variants:["outline","fill"]};var w=({size:e,variant:t})=>{if("outline"===t)switch(e){case"sm":return s.jsx(s.Fragment,{children:s.jsx("path",{fill:"currentColor",d:"M7.9 2.7a5.2 5.2 0 1 0 5.2 5.2h1.6a6.8 6.8 0 1 1-6.8-6.8.8.8 0 1 1 0 1.6"})});case"md":return s.jsx(s.Fragment,{children:s.jsx("path",{fill:"currentColor",d:"M12 4a8 8 0 1 0 8 8h2c0 5.523-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2a1 1 0 1 1 0 2"})});case"lg":return s.jsx(s.Fragment,{children:s.jsx("path",{fill:"currentColor",d:"M16.15 4.3C9.605 4.3 4.3 9.605 4.3 16.15S9.605 28 16.15 28 28 22.695 28 16.15h2.3c0 7.815-6.335 14.15-14.15 14.15S2 23.965 2 16.15 8.335 2 16.15 2a1.15 1.15 0 0 1 0 2.3"})})}if("fill"===t)switch(e){case"sm":return s.jsx(s.Fragment,{children:s.jsx("path",{fill:"currentColor",d:"M8 2.9A5.1 5.1 0 1 0 13.1 8h1.8A6.9 6.9 0 1 1 8 1.1a.9.9 0 1 1 0 1.8"})});case"md":return s.jsx(s.Fragment,{children:s.jsx("path",{fill:"currentColor",d:"M12.15 4.3A7.85 7.85 0 1 0 20 12.15h2.3c0 5.606-4.544 10.15-10.15 10.15S2 17.756 2 12.15 6.544 2 12.15 2a1.15 1.15 0 0 1 0 2.3"})});case"lg":return s.jsx(s.Fragment,{children:s.jsx("path",{fill:"currentColor",d:"M16.35 4.7C9.916 4.7 4.7 9.916 4.7 16.35S9.916 28 16.35 28 28 22.784 28 16.35h2.7c0 7.925-6.425 14.35-14.35 14.35S2 24.275 2 16.35 8.425 2 16.35 2a1.35 1.35 0 1 1 0 2.7"})})}return s.jsx(s.Fragment,{})};w.metadata={name:"Progress",isSvgIcon:!0,variants:["outline","fill"]};var V={primary:I,secondary:y},_=({size:t,variant:a,customSize:r,icon:i,className:o})=>{const l=n.useMemo((()=>v(r)),[r]),c=n.useMemo((()=>e.cx(b(t),e.getStyles({avatarIconVariantRoot:a,overflow:"hidden"}),o)),[o,t,a]),d=n.useMemo((()=>e.getStyles({width:"full",height:"full",flexShrink:"0",overflow:"hidden",textAlign:"center",display:"inline-flex",justifyContent:"center",alignItems:"center"})),[]),u=n.useMemo((()=>({...l,boxSizing:"content-box"})),[l]),m=n.useMemo((()=>i??V[a??"primary"]),[i,a]),h=n.useMemo((()=>e.getStyles({avatarSizeIcon:t})),[t]);return s.jsx(e.Box,{className:c,style:l,children:s.jsx(e.Box,{className:d,style:u,children:s.jsx(e.Icon,{name:m,variant:"fill",color:"current",className:h,"data-testid":"avatar-icon"})})})};_.displayName="AvatarIcon";var M=({variant:t="primary",size:a="md",name:r,initials:i,customSize:o,abbreviationStrategy:l,className:c})=>{const d=n.useMemo((()=>e.cx(b(a),e.getStyles({avatarTextVariantRoot:t,overflow:"hidden"}),"truncate",c)),[c,a,t]),u=n.useMemo((()=>e.getStyles({width:"full",height:"full",flexShrink:"0",overflow:"hidden",textAlign:"center",display:"inline-flex",justifyContent:"center",alignItems:"center",className:"truncate"})),[]),m=n.useMemo((()=>v(o)),[o]),h=n.useMemo((()=>({...m,boxSizing:"content-box"})),[m]);return s.jsx(e.Box,{className:d,style:m,children:s.jsx(e.Text,{color:"inherit",variant:"inherit",className:u,style:h,"data-testid":"avatar-text",children:i||g(r,l)})})};M.displayName="AvatarText";var N=({size:t="md",variant:a="primary",src:r,srcSet:i,customSize:o,alt:l,imageProps:c,abbreviationStrategy:d,fallback:u,className:m})=>{const[h,p]=n.useState("loading");n.useEffect((()=>{let e=!0;if(r||i){const t=new Image;t.onload=()=>{e&&p("loaded")},t.onerror=()=>{e&&p("error")},r&&(t.src=r),i&&(t.srcset=i)}else p("error");return()=>{e=!1}}),[r,i]);const x=n.useMemo((()=>e.cx(b(t),e.getStyles({avatarImageVariantRoot:a,overflow:"hidden"}),m)),[m,t,a]),f=n.useMemo((()=>e.getStyles({width:"full",height:"full",flexShrink:"0",textAlign:"center",display:"inline-flex",justifyContent:"center",alignItems:"center",contentFit:"cover"})),[]),g=n.useMemo((()=>v(o)),[o]),y=n.useMemo((()=>({...g,boxSizing:"content-box"})),[g]);if("loaded"===h)return s.jsx(e.Box,{className:x,style:g,children:s.jsx(e.Image,{src:r,srcSet:i,alt:l,className:f,style:y,...c})});const S={size:t,customSize:o,variant:a};return u||l?s.jsx(M,{name:l,initials:u,abbreviationStrategy:d,...S}):s.jsx(_,{...S})};N.displayName="AvatarImage";var z=e=>s.jsx(N,{...e});z.displayName="Avatar";var k=n.forwardRef((function({variant:t="primary",size:a="md",minWidth:r,maxWidth:i=200,startIcon:o,endIcon:l,backgroundColor:c,color:d,iconColor:u,borderColor:m,children:h,...p},x){const f=e.getStyles({badgeSizeRoot:a,badgeVariantRoot:t,className:e.cx(["uds-badge","uds-badge-variant","uds-badge-size"])}),g=e.getStyles({badgeVariantIcon:t,badgeSizeIcon:a,className:e.cx(["uds-badge-iconSize","uds-badge-iconColor"])}),b=n.useMemo((()=>({...r?{minWidth:`${r}px`}:{},..."full"===i?{}:{maxWidth:`${i}px`},...c?{backgroundColor:c}:{},...m?{borderColor:m}:{},...d?{color:d}:{}})),[c,m,d,i,r]),v=n.useMemo((()=>({variant:"fill",style:{...u?{color:u}:{}}})),[u]);return s.jsxs(e.HStack,{ref:x,gap:"2",display:"inline-flex",alignItems:"center",className:f,style:b,...p,children:[o&&s.jsx(e.IconSlot,{icon:o,iconProps:v,"data-testid":"start-icon",className:g}),s.jsx("span",{className:"flex-1 truncate whitespace-nowrap text-center",children:h}),l&&s.jsx(e.IconSlot,{icon:l,iconProps:v,"data-testid":"end-icon",className:g})]})}));k.displayName="Badge";var R={scale:.7,opacity:0},T={scale:[.7,.7,1],opacity:[0,0,1],transition:{times:[0,.5,1]}},E={icon:T,hide:R,loading:R},H={loading:T,hide:R,icon:R},A=`var(${a.BUTTON_CSS_VAR_MAP.columnGap})`,F=`var(${a.BUTTON_CSS_VAR_MAP.iconSize})`,B={rest:{scale:`var(${a.BUTTON_CSS_VAR_MAP.effects.scale.rest})`},hover:{scale:`var(${a.BUTTON_CSS_VAR_MAP.effects.scale.hover})`},pressed:{scale:`var(${a.BUTTON_CSS_VAR_MAP.effects.scale.pressed})`},withoutIcon:{columnGap:"0px"},withIcon:{columnGap:A}},P={hide:{width:"0px",opacity:0,display:"none"},loading:{width:F,display:"flex",opacity:1},icon:{width:F,display:"flex",opacity:1}},L={damped:{1:{damping:20.585796264350424,stiffness:62.37968115365702},2:{damping:29.312551281312288,stiffness:126.47801753759964},3:{damping:48.92799401356162,stiffness:352.3892336537332},4:{damping:123.42690994256348,stiffness:2242.474548821137}},smooth:{1:{damping:16.46863701148034,stiffness:67.80400125397502},2:{damping:23.45004102504983,stiffness:137.47610601913004},3:{damping:39.1423952108493,stiffness:383.03177571057955},4:{damping:98.7415279540508,stiffness:2437.4723356751488}},subtle:{1:{damping:13.04316051309243,stiffness:67.80400125397502},2:{damping:18.572432491839468,stiffness:137.47610601913004},3:{damping:31.000777006992646,stiffness:383.03177571057955},4:{damping:78.20329013960823,stiffness:2437.4723356751488}},bouncy:{1:{damping:9.229712940600143,stiffness:48.880672622541795},2:{damping:12.634144343496553,stiffness:91.59092691366399},3:{damping:19.40217701790486,stiffness:216.00395877230474},4:{damping:37.541723184430275,stiffness:808.7032559422912}},veryBouncy:{1:{damping:6.902290754946187,stiffness:38.92152745126911},2:{damping:9.155550514215523,stiffness:68.48134828711234},3:{damping:13.244464908166709,stiffness:143.30858570843873},4:{damping:22.17862652876726,stiffness:401.85804919502965}}},W=()=>import("../motionFeatures-6LIGGXPL.cjs").then((({domAnimation:e})=>e));function O({reducedMotion:e="user",children:a,layoutVariant:r="subtle",layoutSpeed:i="3",colorVariant:l="smooth",colorSpeed:c="3"}){const d=L[r][i],u=L[l][c],[m,h]=n.useState(d),[p,x]=n.useState(u),f={variant:l,speed:c},g=t.getMotionVar({...f,control:"stiffness"}),b=t.getMotionVar({...f,control:"damping"}),v={variant:r,speed:i},y=t.getMotionVar({...v,control:"stiffness"}),S=t.getMotionVar({...v,control:"damping"});n.useEffect((()=>{const e=getComputedStyle(document.documentElement),t={damping:Number(e.getPropertyValue(S)),stiffness:Number(e.getPropertyValue(y))},a={damping:Number(e.getPropertyValue(b)),stiffness:Number(e.getPropertyValue(g))};h(t),x(a)}),[b,g,S,y]);const C=n.useMemo((()=>({type:"spring",mass:1,...m,layout:m,opacity:p,color:p,borderColor:p,backgroundColor:p})),[p,m]);return s.jsx(o.LazyMotion,{features:W,strict:!0,children:s.jsx(o.MotionConfig,{transition:C,reducedMotion:e,children:a})})}var q=n.forwardRef((function({variant:a,size:r,startIcon:l,endIcon:c,iconVariant:d,loading:u,disableEffects:m,children:h,asChild:p,type:x="button",className:f,width:g,...b},v){const y=n.useRef(null);n.useImperativeHandle(v,(()=>y.current));const S=n.useMemo((()=>e.createSlot()),[]),C=n.useMemo((()=>o.m.create(S)),[S]),j=c?"icon":"hide",I=(({startIcon:e,endIcon:t,loading:a})=>e||t||a?"withIcon":"withoutIcon")({startIcon:l,endIcon:c,loading:u}),V=(({loading:e,startIcon:t})=>e?"loading":t?"icon":"hide")({loading:u,startIcon:l}),{palette:_,variant:M}=n.useMemo((()=>t.parseDeprecatedButtonPaletteVariant({flatVariant:a})),[a]),N=n.useMemo((()=>({button:e.getStyles({width:g,buttonSize:r,buttonVariant:M,buttonPalette:_,className:e.cx("uds-button","uds-ring","uds-hit-target",u&&"uds-button-loading",m&&"uds-button-without-effects","withIcon"===I&&"uds-button-with-gap",f)}),content:"uds-button-content truncate",iconContainer:"uds-button-icon-container flex overflow-clip",loading:"uds-button-icon start-content animate-spin",start:"uds-button-icon start-content",end:"uds-button-icon end-content"})),[g,r,M,_,f,u,m,I]),z=o.useReducedMotion()?"smooth":"subtle",k=n.useMemo((()=>s.jsx(o.m.span,{className:N.iconContainer,initial:!1,variants:P,animate:V,children:s.jsxs(o.AnimatePresence,{initial:!1,mode:"popLayout",children:[u&&s.jsx(o.m.span,{variants:H,initial:"hide",animate:"loading",exit:"hide",children:s.jsx(e.Icon,{size:i.buttonIconSvgSize,name:w,variant:d,color:"current",className:N.loading})},"loading"),l&&!u&&s.jsx(o.m.span,{variants:E,initial:"hide",animate:"icon",exit:"hide",children:s.jsx(e.IconSlot,{className:N.start,icon:l,iconProps:{size:i.buttonIconSvgSize,variant:d,color:"current"}})})]})})),[N.iconContainer,N.loading,N.start,V,u,d,l]),R=n.useMemo((()=>s.jsx(o.m.span,{className:N.iconContainer,initial:!1,variants:P,animate:j,children:s.jsx(o.AnimatePresence,{initial:!1,mode:"popLayout",children:c&&s.jsx(o.m.span,{variants:E,initial:"hide",animate:"icon",exit:"hide",children:s.jsx(e.IconSlot,{className:N.end,icon:c,iconProps:{size:i.buttonIconSvgSize,variant:d,color:"current"}})})})})),[N.iconContainer,N.end,c,j,d]),T=n.useMemo((()=>m?{...B,rest:{},hover:{},pressed:{}}:B),[m]);return p&&n.isValidElement(h)?s.jsx(O,{layoutSpeed:"3",layoutVariant:z,children:s.jsx(C,{type:x,className:N.button,initial:["hide",I],animate:I,variants:T,whileHover:"hover",whileTap:"pressed",...b,children:n.cloneElement(h,h.props,s.jsxs(s.Fragment,{children:[k,s.jsx("span",{className:N.content,children:h.props.children}),R]}))})}):s.jsx(O,{layoutSpeed:"3",layoutVariant:z,children:s.jsxs(o.m.button,{ref:y,type:x,className:N.button,initial:["hide",I],animate:I,variants:T,whileHover:"hover",whileTap:"pressed",...b,children:[k,s.jsx("span",{className:N.content,children:h}),R]})})})),D={primary:"alert",secondary:"alert-secondary"},$=e=>"indeterminate"===e,G=e=>$(e)?j:S,U=o.m.create(e.Box),X={layoutVariant:"smooth",layoutSpeed:"3"},Y={layoutVariant:"veryBouncy",layoutSpeed:"4"},Z=n.forwardRef((function({id:t,checked:a,defaultChecked:r,onChange:i,label:l,variant:c="primary",size:d="md",reduceMotion:u,disabled:m,required:h,hasError:p,className:x,...f},g){const b=n.useId(),v=t??`uds-input-${b}`,y=n.useRef(null),S=void 0!==a,[C,j]=n.useState(S?a:r),[I,w]=n.useState(!1),[V,_]=n.useState(!1),M=n.useMemo((()=>p?D[c]:c),[p,c]),N=!m&&I,z=!m&&V,k=n.useMemo((()=>z?.9:N?1.1:1),[z,N]),R=n.useMemo((()=>C?z?"opacity-55":"opacity-100":"opacity-0"),[C,z]),T=n.useMemo((()=>({scale:k})),[k]),E=n.useMemo((()=>V?Y:X),[V]),H=n.useCallback((e=>{i?.(e),S||j(e.target.checked)}),[S,i]),A=n.useCallback((()=>{w(!0)}),[]),F=n.useCallback((()=>{w(!1)}),[]),B=n.useCallback((()=>{_(!0)}),[]),P=n.useCallback((()=>{_(!1)}),[]),L=e=>{y.current&&(y.current.indeterminate=$(e))},W=u?"always":"user",q=o.useReducedMotion()||u?"duration-0":"duration-120";n.useEffect((()=>{S&&j(a)}),[a,S]),n.useEffect((()=>{L(C)}),[C]);const Z=$(C)?"indeterminate":C?"checked":"unchecked",K={root:e.getStyles({checkboxSizeRoot:d,checkboxVariantRoot:M,checkboxVariantValueRoot:Z,display:"flex",flexDirection:"row",alignItems:"center",className:e.cx("uds-ring","uds-ring-within",{"cursor-pointer":!m,"cursor-default":m,"opacity-50":m},x)}),checkbox:e.getStyles({checkboxSizeCheckbox:d,checkboxVariantCheckbox:M,checkboxVariantValueCheckbox:Z,className:e.cx("rounded","border",q,"transition-[background-color,border-color,box-shadow]")}),check:e.getStyles({checkboxVariantCheckboxIcon:M,checkboxVariantValueCheckboxIcon:Z,className:e.cx("pointer-events-none",R,q,"transition-opacity")}),htmlCheckbox:e.cx("cursor-[inherit]","absolute","opacity-0","top-1/2","left-1/2","w-[calc(100%+2px)]","h-[calc(100%+2px)]","transform","translate-x-[-50%]","translate-y-[-50%]")},Q=l?o.m.label:o.m.div;return s.jsx(O,{reducedMotion:W,...E,children:s.jsxs(Q,{className:K.root,"data-testid":"container",onHoverStart:A,onHoverEnd:F,onTapStart:B,onTap:P,onTapCancel:P,tabIndex:-1,children:[s.jsxs(U,{position:"relative",className:K.checkbox,alignItems:"center",justifyContent:"center",flex:"none",animate:T,children:[s.jsx("input",{type:"checkbox",...f,ref:e=>{y.current=e,L(C),"function"==typeof g?g(e):null!==g&&(g.current=e)},id:v,disabled:m,required:h,"aria-invalid":p,checked:S?!$(C)&&C:void 0,defaultChecked:S?void 0:r,onChange:H,className:K.htmlCheckbox}),s.jsx(e.Icon,{name:G(C),size:"sm",className:K.check})]}),l&&s.jsx(e.FormLabel,{as:"div",variant:"inherit",color:"inherit",required:h,label:l})]})})}));Z.displayName="Checkbox";var K="primary",Q=n.forwardRef((function({size:t="md",minWidth:a,maxWidth:r=200,startIcon:i,endIcon:l,as:c="div",reduceMotion:d,className:u,layerClassNames:m,children:h,...p},x){const f=o.useReducedMotion()||d?"duration-0":"duration-120",g=n.useMemo((()=>({root:e.getStyles({chipSizeRoot:t,className:e.cx("focus-visible:-outline-offset-2","uds-ring",f,"transition-[background-color,border-color,box-shadow]",m?.root,u)}),icon:m?.icon})),[u,f,m,t]);return s.jsx(e.HStack,{asChild:!0,ref:x,display:"inline-flex",alignItems:"center",style:{maxWidth:`${r}px`,...a?{minWidth:`${a}px`}:{}},className:g.root,...p,children:s.jsxs(c,{children:[i&&s.jsx(e.IconSlot,{icon:i,iconProps:{variant:"fill",size:"sm",className:g.icon},"data-testid":"start-icon"}),s.jsx(e.Text,{as:"span",className:"truncate whitespace-nowrap",flex:"1",textAlign:"center",color:"current",variant:"inherit",children:h}),l&&s.jsx(e.IconSlot,{icon:l,iconProps:{variant:"fill",size:"sm",className:g.icon},"data-testid":"end-icon"})]})})}));Q.displayName="ChipBase";var J=n.forwardRef((function({variant:t=K,...a},r){const i=n.useMemo((()=>({root:e.getStyles({chipLinkVariantRoot:t}),icon:e.getStyles({chipLinkVariantIcon:t})})),[t]);return s.jsx(Q,{as:"button",ref:r,variant:t,layerClassNames:i,...a})}));J.displayName="ChipButton";var ee=e.createSlot(),te=n.forwardRef((function({className:t,asChild:a,onPress:r,onClick:n=r,backgroundColor:i,borderRadius:o,borderTopStartRadius:l,borderTopEndRadius:c,borderBottomStartRadius:d,borderBottomEndRadius:u,borderColor:m,borderStartColor:h,borderEndColor:p,borderTopColor:x,borderBottomColor:f,borderWidth:g,borderVerticalWidth:b,borderHorizontalWidth:v,borderStartWidth:y,borderEndWidth:S,borderTopWidth:C,borderBottomWidth:j,alignContent:I,alignItems:w,alignSelf:V,flex:_,flexDirection:M,flexGrow:N,flexShrink:z,flexWrap:k,justifyContent:R,flexBasis:T,display:E,overflow:H,overflowX:A,overflowY:F,position:B,spacing:P,spacingHorizontal:L,spacingVertical:W,spacingBottom:O,spacingEnd:q,spacingStart:D,spacingTop:$,offset:G,offsetVertical:U,offsetHorizontal:X,offsetBottom:Y,offsetEnd:Z,offsetStart:K,offsetTop:Q,columnGap:J,rowGap:te,dropShadow:ae,insetShadow:re,...ne},se){const ie=e.getStyles({backgroundColor:i,borderRadius:o,borderTopStartRadius:l,borderTopEndRadius:c,borderBottomStartRadius:d,borderBottomEndRadius:u,borderColor:m,borderStartColor:h,borderEndColor:p,borderTopColor:x,borderBottomColor:f,borderWidth:g,borderVerticalWidth:b,borderHorizontalWidth:v,borderStartWidth:y,borderEndWidth:S,borderTopWidth:C,borderBottomWidth:j,alignContent:I,alignItems:w,alignSelf:V,flex:_,flexDirection:M,flexGrow:N,flexShrink:z,flexWrap:k,justifyContent:R,flexBasis:T,display:E,overflow:H,overflowX:A,overflowY:F,position:B,spacing:P,spacingHorizontal:L,spacingVertical:W,spacingBottom:O,spacingEnd:q,spacingStart:D,spacingTop:$,offset:G,offsetVertical:U,offsetHorizontal:X,offsetBottom:Y,offsetEnd:Z,offsetStart:K,offsetTop:Q,columnGap:J,rowGap:te,dropShadow:ae,insetShadow:re,className:t}),oe=a?ee:"button";return s.jsx(oe,{className:ie,ref:se,onClick:n,...ne})})),ae=n.forwardRef((function({dismissButtonAriaLabel:t,onDismiss:a,dismissIcon:r,variant:i=K,...o},l){const c=n.useMemo((()=>({root:e.getStyles({chipDismissibleVariantRoot:i}),icon:e.getStyles({chipDismissibleVariantIcon:i})})),[i]),d=n.useCallback((e=>{e.stopPropagation(),a?.()}),[a]),u={icon:e.cx("uds-chip-dismissible-button","uds-hit-target")};return s.jsx(Q,{ref:l,variant:i,tabIndex:-1,endIcon:a=>s.jsx(te,{"aria-label":t,className:u.icon,onClick:d,children:s.jsx(e.IconSlot,{icon:r??C,iconProps:a,"data-testid":"dismiss-icon"})}),layerClassNames:c,...o})}));ae.displayName="ChipDismissible";var re=n.forwardRef((function({variant:t=K,...a},r){const i=n.useMemo((()=>({root:e.getStyles({chipLinkVariantRoot:t}),icon:e.getStyles({chipLinkVariantIcon:t})})),[t]);return s.jsx(Q,{as:"a",ref:r,variant:t,layerClassNames:i,...a})}));re.displayName="ChipLink";var ne=n.forwardRef((function({isToggled:t=!1,onToggle:a,onClick:r,variant:i=K,...o},l){const c=n.useMemo((()=>({root:e.getStyles({chipToggleVariantRoot:i,chipToggleVariantActiveRoot:t?"on":"off"}),icon:e.getStyles({chipToggleVariantIcon:i})})),[t,i]),d=n.useCallback((e=>{a?.(!t),r?.(e)}),[t,r,a]);return s.jsx(Q,{ref:l,as:"button",variant:i,onClick:d,"aria-pressed":t,layerClassNames:c,...o})}));ne.displayName="ChipToggle";var se=n.forwardRef((function({onClick:e,href:t,linkProps:a,onDismiss:r,onToggle:n,isToggled:i,...o},l){return r?s.jsx(ae,{ref:l,onDismiss:r,...o}):n?s.jsx(ne,{ref:l,onToggle:n,isToggled:i,...o}):t?s.jsx(re,{ref:l,href:t,...o,...a}):s.jsx(J,{ref:l,onClick:e,...o})}));se.displayName="Chip";var ie=n.forwardRef((function({variant:a,size:r,iconVariant:l,loading:c,disableEffects:d,name:u,type:m="button",htmlName:h,className:p,children:x,...f},g){const b=n.useRef(null);n.useImperativeHandle(g,(()=>b.current));const{palette:v,variant:y}=t.parseDeprecatedButtonPaletteVariant({flatVariant:a}),S=n.useMemo((()=>({button:e.getStyles({buttonVariant:y,buttonPalette:v,iconButtonSize:r,className:e.cx("uds-icon-button","uds-button","uds-ring","uds-hit-target",c&&"uds-button-loading",d&&"uds-button-without-effects",p)}),loading:"uds-button-icon start-content animate-spin",icon:"uds-button-icon start-content"})),[v,y,p,d,r,c]),C=o.useReducedMotion(),j=n.useMemo((()=>C?"smooth":"subtle"),[C]),I=n.useMemo((()=>{const{rest:e,hover:t,pressed:a}=B;return d?{rest:{},hover:{},pressed:{}}:{rest:e,hover:t,pressed:a}}),[d]);return s.jsx(O,{layoutSpeed:"3",layoutVariant:j,reducedMotion:d?"always":"user",children:s.jsx(o.m.button,{ref:b,type:m,className:S.button,initial:"icon",variants:I,whileHover:"hover",whileTap:"pressed",name:h,...f,children:s.jsxs(o.AnimatePresence,{initial:!1,mode:"popLayout",children:[c&&s.jsx(o.m.span,{variants:H,initial:"loading",animate:"loading",exit:"hide",children:s.jsx(e.Icon,{size:i.buttonIconSvgSize,name:w,variant:l,color:"current",className:S.loading})},"loading"),u&&!c&&s.jsx(o.m.span,{variants:E,initial:"icon",animate:"icon",exit:"hide",children:x||s.jsx(e.Icon,{size:i.buttonIconSvgSize,name:u,variant:l,color:"current",className:S.icon})},u.name)]})})})})),oe=({children:e,reduceMotion:t,layoutVariant:a})=>{const r=n.useRef(null),[i,l]=n.useState("auto");return n.useEffect((()=>{if(r.current){const e=new ResizeObserver((e=>{l(e[0].contentRect.height)}));return e.observe(r.current),()=>{e.disconnect()}}}),[]),s.jsx(O,{reducedMotion:t,layoutSpeed:"4",layoutVariant:a,children:s.jsx(o.m.div,{className:"overflow-hidden",style:{height:i,opacity:0},animate:{height:i,opacity:1},children:s.jsx("div",{ref:r,children:e})})})},le=n.memo((function({helpText:t,helperTextIcon:a,spacingStart:r,spacingTop:n,size:i,isFilled:o,...c}){return t?s.jsx(e.Box,{spacingTop:n,spacingStart:r,...c,children:s.jsx(e.InputHelpTextMemo,{startIcon:a,size:i,isFilled:o,children:l.isFunction(t)?t():t})}):null})),ce=n.memo((function({icon:t,className:a}){return t?s.jsx(e.IconSlot,{icon:t,iconProps:{variant:"outline"},className:a}):null})),de=n.memo((function({icon:t,className:a}){if(!t)return null;return s.jsx(e.IconSlot,{icon:t,iconProps:{variant:"outline"},"data-testid":"end-icon",className:a})})),ue=n.forwardRef((function({id:t,label:a,type:r="text",size:i="md",startIcon:c,endIcon:d,helpText:u,helperTextIcon:m,hasError:h,width:p="full",defaultValue:x,required:f,readOnly:g,disabled:b,reduceMotion:v,onChange:y,className:S,...C},j){const I=n.useId(),w=t??`uds-input-${I}`,V=`uds-input-${w}-help-text`,_=n.useRef(null);n.useImperativeHandle(j,(()=>_.current));const[M,N]=n.useState(x??""),z=n.useCallback((e=>{N(e.target.value),y?.(e)}),[y]),k=o.useReducedMotion()?"smooth":"bouncy",R=v?"always":"user",T=!g&&!b,E={root:e.getStyles({inputSizeRoot:i,inputVariantRoot:"default",inputVariantValueRoot:M?"filled":"empty",className:e.cx([S,b?"opacity-50":""])}),inputWrapper:e.getStyles({inputSizeInputWrapper:i,inputVariantInputWrapper:"default",inputVariantValueInputWrapper:M?"filled":"empty",className:"min-w-[200px]"}),input:e.getStyles({inputSizeInput:i,inputVariantInput:"default",inputVariantValueInput:M?"filled":"empty",inputVariantInputPlaceholder:"default",inputVariantValueInputPlaceholder:M?"filled":"empty",className:e.cx("grow","uds-hit-target","bg-clip-text","focus:outline-none",T?"cursor-text":"cursor-not-allowed")}),label:e.getStyles({inputSizeLabel:i,inputVariantLabel:"default",inputVariantValueLabel:M?"filled":"empty"}),labelRequired:e.getStyles({inputVariantLabelRequired:"default",inputVariantValueLabelRequired:M?"filled":"empty"}),startIcon:e.getStyles({inputSizeStartIcon:i,inputVariantStartIcon:"default",inputVariantValueStartIcon:M?"filled":"empty"}),endIcon:e.getStyles({inputSizeEndIcon:i,inputVariantEndIcon:"default",inputVariantValueEndIcon:M?"filled":"empty"})};return s.jsxs(e.VStack,{width:p,className:E.root,children:[a&&s.jsxs(e.Box,{spacingBottom:"2",columnGap:"0.5",alignItems:"flex-end",className:E.label,children:[s.jsx("label",{htmlFor:w,children:l.isFunction(a)?a():a}),f&&s.jsx("span",{className:E.labelRequired,children:"*"})]}),s.jsxs(e.Box,{position:"relative",alignItems:"center",className:E.inputWrapper,children:[s.jsx(ce,{icon:c,className:E.startIcon}),s.jsx("input",{ref:_,id:w,type:r,value:M,required:f,readOnly:g,disabled:b,"aria-describedby":V,"aria-invalid":h,onChange:z,className:E.input,...C}),d&&s.jsx(e.HStack,{alignItems:"center",gap:"1",children:s.jsx(de,{icon:d,className:E.endIcon})})]}),s.jsx(oe,{reduceMotion:R,layoutVariant:k,children:s.jsx(le,{id:V,helpText:u,spacingTop:"2",size:i,isFilled:!!M,helperTextIcon:m})})]})}));ue.displayName="Input";var me={};function he(e){return e}function pe(e,t){const a=e.__unstableInternals;return function(e,t){if(!e)throw new Error(t)}(a,"Invalid store"),a[t]}r.__export(me,{Content:()=>Ce,Divider:()=>je,Item:()=>_e,ItemCheckbox:()=>Me,Provider:()=>ke,Trigger:()=>Re,useMenuContext:()=>c.useMenuContext,useMenuStore:()=>c.useMenuStore,useStoreState:()=>u.useStoreState});var{useSyncExternalStore:xe}=x.default;function fe(e,t=he){const a=p.useCallback((t=>e?function(e,...t){if(e)return pe(e,"subscribe")(...t)}(e,null,t):()=>{}),[e]),r=()=>{const a="string"==typeof t?t:null,r="function"==typeof t?t:null,n=null==e?void 0:e.getState();if(r)return r(n);var s,i;if(n&&(a&&(s=n,i=a,"function"==typeof Object.hasOwn?Object.hasOwn(s,i):Object.prototype.hasOwnProperty.call(s,i))))return n[a]};return xe(a,r,r)}var ge=o.m.create(e.VStack),be=5,ve=.97,ye={top:{x:0,y:be},bottom:{x:0,y:-5},left:{x:be,y:0},right:{x:-5,y:0}},Se=e=>n.useMemo((()=>((e="bottom")=>{const[t="top"]=e?.split("-");return{closed:{...ye[t],opacity:0,scale:ve},open:{y:0,x:0,opacity:1,scale:1}}})(e)),[e]),Ce=n.forwardRef((function({gap:t,spacing:a,spacingBottom:r,spacingEnd:l,spacingStart:d,spacingTop:u,gutter:m="1",backgroundColor:h="primary",borderRadius:p="md",borderColor:x,borderWidth:f="thin",overflow:g,dropShadow:b="lg",className:v,sameWidth:y,focusable:S,children:C,portalElement:j,portal:I=!0,disableAutoBorderRadius:w,...V},_){const M=c.useMenuContext(),N=fe(M,"open"),z=fe(M,"mounted"),k=fe(M,"currentPlacement"),R=fe(M,"placement"),[T,E]=n.useState(k),[H,A]=n.useState(k);n.useEffect((()=>{R!==H&&A(R)}),[R]),n.useEffect((()=>{k!==H&&A(k)}),[k]),n.useEffect((()=>{z&&H!==T&&E(H)}),[z,H,T]);const F=n.useMemo((()=>N&&z?"open":"closed"),[N,z]),B=n.useMemo((()=>N?b:"none"),[N,b]),P=Se(H),L=(({borderRadius:e,spacing:t})=>{if(void 0===t||"0"===t)switch(e){case"xs":return"[&>*:first-child]:rounded-t-[calc(var(--uds-border-radius-xs)_-_var(--uds-border-width-thin))] [&>*:last-child]:rounded-b-[calc(var(--uds-border-radius-xs)_-_var(--uds-border-width-thin))]";case"sm":return"[&>*:first-child]:rounded-t-[calc(var(--uds-border-radius-sm)_-_var(--uds-border-width-thin))] [&>*:last-child]:rounded-b-[calc(var(--uds-border-radius-sm)_-_var(--uds-border-width-thin))]";case"md":return"[&>*:first-child]:rounded-t-[calc(var(--uds-border-radius-md)_-_var(--uds-border-width-thin))] [&>*:last-child]:rounded-b-[calc(var(--uds-border-radius-md)_-_var(--uds-border-width-thin))]";case"lg":return"[&>*:first-child]:rounded-t-[calc(var(--uds-border-radius-lg)_-_var(--uds-border-width-thin))] [&>*:last-child]:rounded-b-[calc(var(--uds-border-radius-lg)_-_var(--uds-border-width-thin))]";case"xl":return"[&>*:first-child]:rounded-t-[calc(var(--uds-border-radius-xl)_-_var(--uds-border-width-thin))] [&>*:last-child]:rounded-b-[calc(var(--uds-border-radius-xl)_-_var(--uds-border-width-thin))]"}if("px"===t||"0.5"===t)switch(e){case"xs":return"[&>*:first-child]:rounded-t-[max(1px,calc(var(--uds-border-radius-xs)_-_2px))] [&>*:last-child]:rounded-b-[max(1px,calc(var(--uds-border-radius-xs)_-_2px))]";case"sm":return"[&>*:first-child]:rounded-t-[max(2px,calc(var(--uds-border-radius-sm)_-_2px))] [&>*:last-child]:rounded-b-[max(2px,calc(var(--uds-border-radius-sm)_-_2px))]";case"md":return"[&>*:first-child]:rounded-t-[max(2px,calc(var(--uds-border-radius-md)_-_2px))] [&>*:last-child]:rounded-b-[max(2px,calc(var(--uds-border-radius-md)_-_2px))]";case"lg":return"[&>*:first-child]:rounded-t-[max(2px,calc(var(--uds-border-radius-lg)_-_2px))] [&>*:last-child]:rounded-b-[max(2px,calc(var(--uds-border-radius-lg)_-_2px))]";case"xl":return"[&>*:first-child]:rounded-t-[max(2px,calc(var(--uds-border-radius-xl)_-_2px))] [&>*:last-child]:rounded-b-[max(2px,calc(var(--uds-border-radius-xl)_-_2px))]"}if("1"===t||"1.5"===t)switch(e){case"xs":return"[&>*:first-child]:rounded-t-[max(1px,calc(var(--uds-border-radius-xs)_-_4px))] [&>*:last-child]:rounded-b-[max(1px,calc(var(--uds-border-radius-xs)_-_4px))]";case"sm":return"[&>*:first-child]:rounded-t-[max(2px,calc(var(--uds-border-radius-sm)_-_4px))] [&>*:last-child]:rounded-b-[max(2px,calc(var(--uds-border-radius-sm)_-_4px))]";case"md":return"[&>*:first-child]:rounded-t-[max(2px,calc(var(--uds-border-radius-md)_-_4px))] [&>*:last-child]:rounded-b-[max(2px,calc(var(--uds-border-radius-md)_-_4px))]";case"lg":return"[&>*:first-child]:rounded-t-[max(2px,calc(var(--uds-border-radius-lg)_-_4px))] [&>*:last-child]:rounded-b-[max(2px,calc(var(--uds-border-radius-lg)_-_4px))]";case"xl":return"[&>*:first-child]:rounded-t-[calc(var(--uds-border-radius-xl)_-_4px)] [&>*:last-child]:rounded-b-[calc(var(--uds-border-radius-xl)_-_4px)]"}if("2"===t||"2.5"===t)switch(e){case"xs":return"[&>*:first-child]:rounded-t-[max(1px,calc(var(--uds-border-radius-xs)_-_8px))] [&>*:last-child]:rounded-b-[max(1px,calc(var(--uds-border-radius-xs)_-_8px))]";case"sm":return"[&>*:first-child]:rounded-t-[max(2px,calc(var(--uds-border-radius-sm)_-_8px))] [&>*:last-child]:rounded-b-[max(2px,calc(var(--uds-border-radius-sm)_-_8px))]";case"md":return"[&>*:first-child]:rounded-t-[max(4px,calc(var(--uds-border-radius-md)_-_8px))] [&>*:last-child]:rounded-b-[max(4px,calc(var(--uds-border-radius-md)_-_8px))]";case"lg":return"[&>*:first-child]:rounded-t-[max(4px,calc(var(--uds-border-radius-lg)_-_8px))] [&>*:last-child]:rounded-b-[max(4px,calc(var(--uds-border-radius-lg)_-_8px))]";case"xl":return"[&>*:first-child]:rounded-t-[calc(var(--uds-border-radius-xl)_-_8px)] [&>*:last-child]:rounded-b-[calc(var(--uds-border-radius-xl)_-_8px)]"}if("3"===t||"3.5"===t)switch(e){case"xs":return"[&>*:first-child]:rounded-t-[max(2px,calc(var(--uds-border-radius-xs)_-_6px))] [&>*:last-child]:rounded-b-[max(2px,calc(var(--uds-border-radius-xs)_-_6px))]";case"sm":return"[&>*:first-child]:rounded-t-[max(4px,calc(var(--uds-border-radius-sm)_-_6px))] [&>*:last-child]:rounded-b-[max(4px,calc(var(--uds-border-radius-sm)_-_6px))]";case"md":return"[&>*:first-child]:rounded-t-[max(6px,calc(var(--uds-border-radius-md)_-_6px))] [&>*:last-child]:rounded-b-[max(6px,calc(var(--uds-border-radius-md)_-_6px))]";case"lg":return"[&>*:first-child]:rounded-t-[max(6px,calc(var(--uds-border-radius-lg)_-_6px))] [&>*:last-child]:rounded-b-[max(6px,calc(var(--uds-border-radius-lg)_-_6px))]";case"xl":return"[&>*:first-child]:rounded-t-[min(20px,calc(var(--uds-border-radius-xl)_-_6px))] [&>*:last-child]:rounded-b-[min(20px,calc(var(--uds-border-radius-xl)_-_6px))]"}if("4"===t)switch(e){case"xs":return"[&>*:first-child]:rounded-t-[max(1px,calc(var(--uds-border-radius-xs)_-_16px))] [&>*:last-child]:rounded-b-[max(1px,calc(var(--uds-border-radius-xs)_-_16px))]";case"sm":return"[&>*:first-child]:rounded-t-[max(2px,calc(var(--uds-border-radius-sm)_-_16px))] [&>*:last-child]:rounded-b-[max(2px,calc(var(--uds-border-radius-sm)_-_16px))]";case"md":return"[&>*:first-child]:rounded-t-[max(4px,calc(var(--uds-border-radius-md)_-_16px))] [&>*:last-child]:rounded-b-[max(4px,calc(var(--uds-border-radius-md)_-_16px))]";case"lg":return"[&>*:first-child]:rounded-t-[max(6px,calc(var(--uds-border-radius-lg)_-_16px))] [&>*:last-child]:rounded-b-[max(6px,calc(var(--uds-border-radius-lg)_-_16px))]";case"xl":return"[&>*:first-child]:rounded-t-[max(6px,calc(var(--uds-border-radius-xl)_-_16px))] [&>*:last-child]:rounded-b-[max(6px,calc(var(--uds-border-radius-xl)_-_16px))]"}switch(e){case"xs":return"[&>*:first-child]:rounded-t-[max(1px,calc(var(--uds-border-radius-xs)_-_4px))] [&>*:last-child]:rounded-b-[max(1px,calc(var(--uds-border-radius-xs)_-_4px))]";case"sm":return"[&>*:first-child]:rounded-t-[max(2px,calc(var(--uds-border-radius-sm)_-_4px))] [&>*:last-child]:rounded-b-[max(2px,calc(var(--uds-border-radius-sm)_-_4px))]";case"md":return"[&>*:first-child]:rounded-t-[max(2px,calc(var(--uds-border-radius-md)_-_4px))] [&>*:last-child]:rounded-b-[max(2px,calc(var(--uds-border-radius-md)_-_4px))]";case"lg":return"[&>*:first-child]:rounded-t-[max(2px,calc(var(--uds-border-radius-lg)_-_4px))] [&>*:last-child]:rounded-b-[max(2px,calc(var(--uds-border-radius-lg)_-_4px))]";case"xl":return"[&>*:first-child]:rounded-t-[min(18px,calc(var(--uds-border-radius-xl)_-_4px))] [&>*:last-child]:rounded-b-[min(18px,calc(var(--uds-border-radius-xl)_-_4px))]"}})({borderRadius:p,spacing:a}),W=n.useMemo((()=>i.spacingMap[m]),[m]);return s.jsx(o.AnimatePresence,{initial:!1,children:s.jsx(c.Menu,{gutter:W,sameWidth:y,focusable:S,store:M,ref:_,portalElement:j,portal:I,...V,render:s.jsx(ge,{backgroundColor:h,gap:t,spacing:a,spacingBottom:r,spacingEnd:l,spacingStart:d,spacingTop:u,borderRadius:p,borderColor:x,borderWidth:f,overflow:g,animate:F,variants:P,dropShadow:B,className:e.cx("uds-menu-content","transition-shadow","duration-200","ease-in-out","min-w-60","max-w-lg","max-h-96","overflow-auto","uds-ring","z-10","group",!w&&L,v),children:C})})})})),je=n.forwardRef((function({role:t="separator",contentPosition:a="start",gap:r="4",children:n,spacingVertical:i=(n?"2":"0"),spacingHorizontal:o=(n?"4":"0"),className:l,...c},d){const u={root:e.getStyles({menuDividerVariantRoot:"default",className:l}),text:e.getStyles({menuDividerVariantText:"default"})};return s.jsx(e.Divider,{ref:d,role:t,variant:"inherit",contentPosition:a,gap:r,spacingVertical:i,spacingHorizontal:o,className:u.root,layerClassNames:u,...c,children:n})}));je.displayName="MenuDivider";var Ie="uds-menu-item",we={visible:{scale:1,opacity:1},hidden:{scale:.7,opacity:0}},Ve=n.forwardRef((function({spacing:t="0",spacingBottom:a,spacingEnd:r,spacingHorizontal:i="4",spacingStart:l,spacingTop:c,spacingVertical:d="3.5",columnGap:u="2",className:m,children:h,endIcon:p,startIcon:x,hideEndIcon:f,active:g,disabled:b,as:v,rootProps:y,name:S,alignItems:C="center",justifyContent:j="space-between",layerClassNames:I,...w},V){const _=n.Children.count(h)>1,M=(({active:t,disabled:a,className:r})=>e.cx(Ie,"focus-visible:text-brand","focus-visible:bg-brand-secondary","focus-visible:z-10","uds-ring","!-outline-offset-2",t&&["[&:not([aria-checked])]:cursor-default"],a&&"opacity-25 cursor-not-allowed","duration-20 transition-[font-variation-settings] ease-in-out","z-0",r))({active:g,disabled:b,className:m}),N=e.getStyles({className:e.cx(`${Ie}-content truncate`,I?.text),textAlign:"start",..._&&{columnGap:u,display:"flex",alignItems:"center",width:"full",justifyContent:"space-between"}}),z=n.useMemo((()=>({root:e.getStyles({menuSizeRoot:"default",className:e.cx(I?.root,M)}),startIcon:e.getStyles({menuSizeStartIcon:"default",className:I?.startIcon}),endIcon:e.getStyles({menuSizeEndIcon:"default",className:I?.endIcon})})),[I,M]);return s.jsx(e.Box,{asChild:!0,spacing:t,spacingBottom:a,spacingEnd:r,spacingHorizontal:i,spacingStart:l,spacingTop:c,spacingVertical:d,columnGap:u,className:z.root,alignItems:C,justifyContent:j,children:s.jsxs(v,{render:s.jsx(te,{ref:V,...w}),name:S??"",disabled:b,...y,children:[s.jsxs(e.HStack,{gap:u,alignItems:"center",width:"full",children:[s.jsx(o.AnimatePresence,{initial:!1,children:x&&s.jsx(o.m.span,{variants:we,initial:"hidden",animate:"visible",exit:"hidden",className:"uds-start-icon",children:s.jsx(e.IconSlot,{icon:x,className:z.startIcon,iconProps:{size:"sm",variant:g?"fill":"outline",color:"current"}})})}),s.jsx("span",{className:N,children:h})]}),s.jsx(o.AnimatePresence,{initial:!1,mode:"popLayout",children:!f&&p&&s.jsx(o.m.span,{variants:we,initial:"hidden",animate:"visible",exit:"hidden",className:"uds-end-icon",children:s.jsx(e.IconSlot,{icon:p,className:z.endIcon,iconProps:{size:"sm",variant:g?"fill":"outline",color:"current"}})})})]})})})),_e=n.forwardRef((function({active:t,...a},r){const n={root:e.getStyles({menuItemVariantRoot:"default",menuItemVariantActiveRoot:t?"on":"off"}),text:e.getStyles({menuItemVariantText:"default",menuItemVariantActiveText:t?"on":"off"}),startIcon:e.getStyles({menuItemVariantIcon:"default",menuItemVariantActiveIcon:t?"on":"off"})};return s.jsx(Ve,{ref:r,as:c.MenuItem,active:t,layerClassNames:n,...a})}));_e.displayName="MenuItem";var Me=n.forwardRef((function({name:t,endIcon:a=S,checked:r,defaultChecked:i,className:o,...l},d){const m=t,h=n.useRef(!1),p=c.useMenuContext(),x=u.useStoreState(p);n.useEffect((()=>{!h.current&&void 0!==i&&p&&(p.setValues((e=>({...e,[m]:i}))),h.current=!0)}),[p,i,m]);const f=n.useMemo((()=>{if(void 0!==r)return r;if(x?.items?.length){const e=x?.items.find((e=>e.element?.name===m));if(e?.element)return e.element.checked}const e=x?.values[m];return"boolean"==typeof e?e:i??!1}),[x?.items,x?.values,m,r,i]),g=n.useCallback((e=>{void 0===r&&p?.setValues((t=>({...t,[m]:e.target.checked})))}),[m,p,r]),b={root:e.getStyles({menuItemCheckboxVariantRoot:"default",menuItemCheckboxVariantActiveRoot:f?"on":"off"}),text:e.getStyles({menuItemCheckboxVariantText:"default",menuItemCheckboxVariantActiveText:f?"on":"off"}),startIcon:e.getStyles({menuItemCheckboxVariantStartIcon:"default",menuItemCheckboxVariantActiveStartIcon:f?"on":"off"}),endIcon:e.getStyles({menuItemCheckboxVariantEndIcon:"default",menuItemCheckboxVariantActiveEndIcon:f?"on":"off"})};return s.jsx(Ve,{ref:d,as:c.MenuItemCheckbox,hideEndIcon:!f,endIcon:a,active:f,className:e.cx("uds-menu-item-checkbox",o),layerClassNames:b,rootProps:{name:t,onChange:g,defaultChecked:i,checked:void 0!==r?r:void 0},...l})}));Me.displayName="MenuItemCheckbox";var Ne=()=>{if("undefined"==typeof document)return!1;return"rtl"===getComputedStyle(document.documentElement).direction},ze=e=>{const[t,a]=n.useState(Ne);return n.useEffect((()=>{if(e?.explicit)return void a(e.explicit);const t=(e=>{const t=new MutationObserver((t=>{t.some((e=>"attributes"===e.type&&"dir"===e.attributeName))&&e()}));return t.observe(document.documentElement,{attributes:!0,attributeFilter:["dir"]}),t})((()=>{a(Ne())}));return()=>t.disconnect()}),[e?.explicit]),t},ke=function({placement:e="bottom",rtl:t,...a}){const r=ze({explicit:t}),n=((e,t)=>{const a=t?.rtl;if("start"===e)return a?"right":"left";if("end"===e)return a?"left":"right";if(e?.includes("-")){const[t,r]=e.split("-");if(!("start"!==t&&"end"!==t||"top"!==r&&"bottom"!==r))return`${"start"===t?a?"right":"left":a?"left":"right"}-${"bottom"===r?"end":"start"}`;if("top"===t||"bottom"===t)return`${t}-${"start"===r?a?"end":"start":a?"start":"end"}`}return e})(e,{rtl:r});return s.jsx(O,{children:s.jsx(c.MenuProvider,{placement:n,rtl:r,...a})})},Re=n.forwardRef((function({asChild:t,className:a,...r},i){const o=n.useRef(null),l=t?s.jsx(e.Box,{ref:o,className:"uds-ring h-fit w-fit"}):void 0,d=n.useCallback((()=>{const e=o.current?.firstChild;e instanceof HTMLElement&&"function"==typeof e.focus&&e.focus()}),[o]);return s.jsx(c.MenuButton,{onFocus:d,onFocusVisible:d,ref:i,render:l,className:e.cx("uds-menu-trigger",a),...r})})),Te=class e{name;value;activeCount=0;#e=new Set;constructor(e){this.name=e}onChange(e){return this.#e.add(e),()=>{this.#e.delete(e)}}setValue(e){this.value=e,this.#e.forEach((t=>t(e)))}static findOrCreate(t,a){let r=t.get(a);return r||(r=new e(a),t.set(a,r)),r}},Ee=n.createContext(new Map),He=e=>{const t=n.useId();return e??`uds-radio-group-${t}`},Ae={primary:"alert",secondary:"alert-secondary"},Fe=o.m.create(e.Box),Be={layoutVariant:"smooth",layoutSpeed:"3"},Pe={layoutVariant:"veryBouncy",layoutSpeed:"4"},Le=n.forwardRef((function({id:t,name:a,label:r,variant:i="primary",size:l="md",reduceMotion:c,value:d="",checked:u,defaultChecked:m,disabled:h,hasError:p,onChange:x,onFocus:f,onBlur:g,className:b,...v},y){const S=n.useId(),C=t??`uds-radio-${S}`,j=n.useRef(null),{name:I,isControlled:w,checked:V,setGroupValue:_}=(({name:e,value:t,checked:a,defaultChecked:r})=>{const s=n.useContext(Ee),i=s instanceof Te,o=void 0!==a||i,l=He(e),c=n.useMemo((()=>i?s:Te.findOrCreate(s,l)),[s,i,l]),[d,u]=n.useState(c.value),m=c.name??l,h=n.useCallback((e=>{c.setValue(e),o||u(e)}),[o,c]);return n.useEffect((()=>c.onChange(u)),[c]),n.useEffect((()=>{!0===a&&h(t)}),[a,t,h]),n.useEffect((()=>{if(i)return;const e=Te.findOrCreate(s,m);return e.activeCount+=1,s.set(m,e),()=>{const e=s.get(m);e&&(e.activeCount-=1,0===e.activeCount&&s.delete(m))}}),[s,i,m]),{name:m,isControlled:o,checked:o&&!i?a:void 0!==d?t===d:r??!1,setGroupValue:h}})({name:a,value:d,checked:u,defaultChecked:m}),[M,N]=n.useState(!1),[z,k]=n.useState(!1),R=n.useMemo((()=>p?Ae[i]:i),[p,i]),T=n.useMemo((()=>!h&&M),[h,M]),E=n.useMemo((()=>!h&&!V&&z),[V,h,z]),H=n.useMemo((()=>E?.9:T?1.1:1),[T,E]),A=n.useMemo((()=>V?E?"opacity-55":"opacity-100":"opacity-0"),[V,E]),F=n.useMemo((()=>!h&&(E&&!V||T&&V)),[V,h,T,E]),B=n.useMemo((()=>({scale:H})),[H]),P=n.useMemo((()=>z?Pe:Be),[z]),L=n.useCallback((e=>{_(e.target.value),x?.(e)}),[x,_]),W=n.useCallback((e=>{f?.(e)}),[f]),q=n.useCallback((e=>{g?.(e)}),[g]),D=n.useCallback((()=>{N(!0)}),[]),$=n.useCallback((()=>{N(!1)}),[]),G=n.useCallback((()=>{k(!0)}),[]),U=n.useCallback((()=>{k(!1)}),[]),X=c?"always":"user",Y=o.useReducedMotion()||c?"duration-0":"duration-120",Z={root:e.getStyles({radioSizeRoot:l,radioVariantValueRoot:V?"checked":"unchecked",radioVariantRoot:R,display:"flex",flexDirection:"row",alignItems:"center",className:e.cx(["uds-ring","uds-ring-within",{"cursor-pointer":!h,"cursor-default":h,"opacity-50":h},b])}),radio:e.getStyles({radioSizeRadio:l,radioVariantRadio:R,radioVariantValueRadio:V?"checked":"unchecked",className:e.cx(["border",Y,"transition-[background-color,border-color]","transition-shadow"])}),radioCircle:e.getStyles({radioVariantRadioCircle:R,radioVariantValueRadioCircle:V?"checked":"unchecked",className:e.cx(["pointer-events-none","w-[8px]","h-[8px]",A,Y,"transition-opacity"])}),htmlRadio:e.cx("cursor-[inherit]","absolute","opacity-0","top-1/2","left-1/2","w-[calc(100%+2px)]","h-[calc(100%+2px)]","transform","translate-x-[-50%]","translate-y-[-50%]")},K=r?o.m.label:o.m.div;return s.jsx(O,{reducedMotion:X,...P,children:s.jsxs(K,{className:Z.root,"data-testid":"container",onHoverStart:D,onHoverEnd:$,onTapStart:G,onTap:U,onTapCancel:U,tabIndex:-1,children:[s.jsxs(Fe,{position:"relative",borderRadius:"full",alignItems:"center",justifyContent:"center",flex:"none",className:Z.radio,animate:B,insetShadow:F?"lg-invert":"none",children:[s.jsx("input",{type:"radio",...v,ref:e=>{j.current=e,"function"==typeof y?y(e):null!==y&&(y.current=e)},onFocus:W,onBlur:q,id:C,name:I,value:d,disabled:h,"aria-invalid":p,onChange:L,...w?{checked:V}:{defaultChecked:m},className:Z.htmlRadio}),s.jsx(e.Box,{borderRadius:"full",className:Z.radioCircle})]}),r&&s.jsx(e.FormLabel,{as:"div",variant:"inherit",color:"inherit",label:r})]})})}));Le.displayName="Radio";var We=e.createSlot(),Oe=class extends Te{onChangeCb;isControlled;constructor(e,t){super(e),this.isControlled=t}setValue(e,t=!1){this.isControlled&&!t?this.onChangeCb?.(e):super.setValue(e)}},qe=n.forwardRef((function({asChild:e,name:t,value:a,defaultValue:r,onChange:i,...o},l){const c=void 0!==a,d=He(t),u=n.useMemo((()=>{const e=new Oe(d,c);return e.value=c?a:r,e}),[r,c,d,a]);n.useEffect((()=>{u.onChangeCb=i}),[i,u]),n.useEffect((()=>{c&&u.setValue(a,!0)}),[c,u,a]),n.useEffect((()=>u.onChange((e=>i?.(e)))),[i,u]);const m=e?We:"div";return s.jsx(Ee.Provider,{value:u,children:s.jsx(m,{role:"radiogroup",ref:l,...o})})}));qe.displayName="RadioGroupProvider";var De={md:{isOnX:20},sm:{isOnX:12}},$e=o.m.create(e.Box),Ge={layoutVariant:"bouncy",layoutSpeed:"4"},Ue=n.forwardRef((function({id:t,isOn:a,defaultIsOn:r,onChange:i,label:l,size:c="md",onIcon:d,offIcon:u,reduceMotion:m,disabled:h,required:p,onFocus:x,onBlur:f,className:g,...b},v){const y=n.useId(),S=t??`uds-input-${y}`,C=n.useRef(null),j=void 0!==a,[I,w]=n.useState(j?a:r),[V,_]=n.useState(!1),M=n.useMemo((()=>!h&&V),[h,V]),{isOnX:N}=De[c],z=n.useMemo((()=>({initial:{scale:1,x:I?N:0},animate:{scale:M?1.05:1,x:I?N:0}})),[M,I,N]),k=n.useCallback((e=>{i?.(e),j||w(e.target.checked)}),[j,i]),R=n.useCallback((e=>{x?.(e)}),[x]),T=n.useCallback((e=>{f?.(e)}),[f]),E=n.useCallback((()=>{_(!0)}),[]),H=n.useCallback((()=>{_(!1)}),[]),A=m?"always":"user",F=o.useReducedMotion()||m?"duration-0":"duration-120";n.useEffect((()=>{j&&w(a)}),[a,j]);const B={root:e.getStyles({switchSizeRoot:c,switchVariantRoot:"default",switchVariantActiveRoot:I?"on":"off",display:"flex",flexDirection:"row",alignItems:"center",className:e.cx("uds-ring","uds-ring-within","group",{"cursor-pointer":!h,"cursor-default":h,"opacity-50":h},g)}),switch:e.getStyles({switchVariantSwitch:"default",switchSizeSwitch:c,switchVariantActiveSwitch:I?"on":"off",borderRadius:"full",position:"relative",alignItems:"center",className:e.cx(F,"transition-[background-color,box-shadow]")}),handle:e.getStyles({switchSizeHandle:c,className:e.cx("relative","pointer-events-none","rounded-full","overflow-hidden")}),handleCircle:e.getStyles({switchVariantActiveHandle:I?"on":"off",switchVariantHandle:"default",className:e.cx("absolute","top-0","left-0","right-0","bottom-0","opacity-95 group-hover:opacity-100",F,"transition-[background-color,box-shadow,opacity]")}),handleIcon:e.getStyles({switchSizeHandleIcon:c,switchVariantHandleIcon:"default",switchVariantActiveHandleIcon:I?"on":"off",className:e.cx("absolute","opacity-0","top-1/2","left-1/2","transform","translate-x-[-50%]","translate-y-[-50%]",F,"transition-opacity")}),htmlCheckbox:e.cx("cursor-[inherit]","absolute","opacity-0","top-1/2","left-1/2","w-[calc(100%+2px)]","h-[calc(100%+2px)]","transform","translate-x-[-50%]","translate-y-[-50%]")},P=l?o.m.label:o.m.div;return s.jsx(O,{reducedMotion:A,...Ge,children:s.jsxs(P,{className:B.root,"data-testid":"container",onHoverStart:E,onHoverEnd:H,tabIndex:-1,children:[s.jsxs($e,{className:B.switch,children:[s.jsx("input",{type:"checkbox",...b,ref:e=>{C.current=e,"function"==typeof v?v(e):null!==v&&(v.current=e)},onFocus:R,onBlur:T,id:S,disabled:h,required:p,checked:j?I:void 0,defaultChecked:j?void 0:r,onChange:k,className:B.htmlCheckbox,style:{}}),s.jsxs($e,{className:B.handle,...z,children:[s.jsx(e.Box,{className:B.handleCircle}),d&&s.jsx(e.IconSlot,{icon:d,iconProps:{variant:"fill",size:"sm"},"data-testid":"on-icon",className:e.cx(B.handleIcon,I?"opacity-100":"opacity-0")}),u&&s.jsx(e.IconSlot,{icon:u,iconProps:{variant:"fill",size:"sm"},"data-testid":"off-icon",className:e.cx(B.handleIcon,I?"opacity-0":"opacity-100")})]})]}),l&&s.jsx(e.FormLabel,{as:"div",variant:"inherit",color:"inherit",required:p,label:l})]})})}));Ue.displayName="Switch",
|
3
|
-
/*! © 2025 Yahoo, Inc. UDS v0.0.0-development */exports.Avatar=
|
2
|
+
"use strict";var e=require("../chunk-GXQ463ZU.cjs"),t=require("../chunk-7DDAOT2K.cjs"),a=require("../chunk-HTL6WRXY.cjs"),r=require("../chunk-NUEZVMWZ.cjs"),n=require("react"),s=require("react/jsx-runtime"),i=require("@yahoo/uds/fixtures"),o=require("motion/react"),l=require("lodash-es"),c=require("@ariakit/react/menu"),d=require("use-sync-external-store/shim/index.js"),u=require("@ariakit/react");function m(e){return e&&e.__esModule?e:{default:e}}function h(e){if(e&&e.__esModule)return e;var t=Object.create(null);return e&&Object.keys(e).forEach((function(a){if("default"!==a){var r=Object.getOwnPropertyDescriptor(e,a);Object.defineProperty(t,a,r.get?r:{enumerable:!0,get:function(){return e[a]}})}})),t.default=e,Object.freeze(t)}var p=h(n),x=m(d),f={first:e=>e[0]||"",last:e=>e[e.length-1]||"",firstAndLast:e=>1===e.length?e[0]:`${e[0]}${e[e.length-1]}`,firstTwo:e=>e.slice(0,2).join(""),firstThree:e=>e.slice(0,3).join(""),firstOfEach:e=>e.join("")},g=(e,t="firstAndLast")=>{if(!e)return"";const a=e.trim().split(/\s+/).map((e=>e[0].toUpperCase()));return"function"==typeof t?t(e):f[t](a)},b=(t="md")=>e.getStyles({avatarSizeRoot:t,flexShrink:"0",textAlign:"center",display:"inline-flex",justifyContent:"center",alignItems:"center",overflow:"visible",className:"truncate"}),v=e=>e?{height:e,width:e}:{},y="primary",S="md",C=({size:e,variant:t})=>{if("outline"===t)switch(e){case"sm":return s.jsx(s.Fragment,{children:s.jsx("path",{fill:"currentColor",d:"M8.4 2.6H2.6v10.8H4V11h3v2.4h1.4zM1 15V1h9v2.524l5 1.746V15zm9.1-9.746V13.4h3.3V6.406zM4.5 4h2v2h-2zm2 3.5h-2v2h2z"})});case"md":return s.jsx(s.Fragment,{children:s.jsx("path",{fill:"currentColor",d:"M13.367 4.752H4.3v14.495h2.724v-4.533h3.619v4.533h2.714V4.762l.01.003zM21.5 21.047h-19V2.952h12.667v2.494L21.5 7.843zm-1.8-1.8V9.087L15.167 7.37v11.876zM7.929 11.095h-1.81v1.81h1.81zm-1.81-3.619h1.81v1.81h-1.81zm5.429 0h-1.81v1.81h1.81zm-1.81 3.619h1.81v1.81h-1.81z"})});case"lg":return s.jsx(s.Fragment,{children:s.jsx("path",{fill:"currentColor",d:"M17.8 4.2H4.2v23.6H8V21h6v6.8h3.8zM2 30V2h18v5.725l10 3.626V30zm18.2-19.862V27.8h7.6V12.894zM10 8H7v3h3zm-3 6h3v3H7zm5-6h3v3h-3zm3 6h-3v3h3zm7.5 1h3v3h-3zm3 6h-3v3h3z"})})}if("fill"===t)switch(e){case"sm":return s.jsx(s.Fragment,{children:s.jsx("path",{fill:"currentColor",d:"M4.5 4v2h2V4zm2 3.5h-2v2h2zM12 4l3 1.27V15h-3zM1 1h9v14H1z"})});case"md":return s.jsx(s.Fragment,{children:s.jsx("path",{fill:"currentColor",d:"M2.5 2.952h10.857v18.095H2.5zm2.714 7.238V12h1.81v-1.81zm1.81-3.619h-1.81v1.81h1.81zm1.81 0v1.81h1.809V6.57zm1.809 3.62h-1.81V12h1.81zm-4.524 4.523v4.524h3.62v-4.524zM21.5 7.843l-6.333-3.081v16.285H21.5z"})});case"lg":return s.jsx(s.Fragment,{children:s.jsx("path",{fill:"currentColor",d:"M2 2h16v28H2zm5 19v7h6v-7zM8.5 7h-3v3h3zm-3 6v3h3v-3zm9-6h-3v3h3zm-3 6v3h3v-3zM20 7l10 4.351V30H20zm3.5 8v3h3v-3z"})})}return s.jsx(s.Fragment,{})};C.metadata={name:"Building",isSvgIcon:!0,variants:["outline","fill"]};var j=({size:e,variant:t})=>{if("outline"===t)switch(e){case"sm":return s.jsx(s.Fragment,{children:s.jsx("path",{fill:"currentColor",d:"M13.5 3.89 6.951 12 2.5 7.48l.958-.993 3.394 3.447L12.452 3z"})});case"md":return s.jsx(s.Fragment,{children:s.jsx("path",{fill:"currentColor",d:"M20.264 5.852 10.37 18.366l-6.642-6.89 1.295-1.249 5.213 5.407 8.616-10.898z"})});case"lg":return s.jsx(s.Fragment,{children:s.jsx("path",{fill:"currentColor",d:"M30.19 6.341 13.677 26.276 2.803 15.509l1.688-1.706 9.012 8.922L28.341 4.81z"})})}if("fill"===t)switch(e){case"sm":return s.jsx(s.Fragment,{children:s.jsx("path",{fill:"currentColor",d:"M13.593 4.502 6.968 12.5 2.4 7.978 3.505 6.86l3.348 3.315 5.53-6.676z"})});case"md":return s.jsx(s.Fragment,{children:s.jsx("path",{fill:"currentColor",d:"m20.545 5.82-10.16 12.85-6.94-7.198 1.584-1.527 5.192 5.385L18.82 4.455z"})});case"lg":return s.jsx(s.Fragment,{children:s.jsx("path",{fill:"currentColor",d:"M30.33 6.328 13.687 26.423 2.662 15.51l1.829-1.848 9.005 8.916 14.832-17.91z"})})}return s.jsx(s.Fragment,{})};j.metadata={name:"Check",isSvgIcon:!0,variants:["outline","fill"]};var I=({size:e,variant:t})=>{if("outline"===t)switch(e){case"sm":return s.jsx(s.Fragment,{children:s.jsx("path",{fill:"currentColor",d:"m12.526 4.465-.99-.99L8 7.01 4.465 3.475l-.99.99L7.01 8l-3.535 3.536.99.99L8 8.99l3.536 3.536.99-.99L8.99 8z"})});case"md":return s.jsx(s.Fragment,{children:s.jsx("path",{fill:"currentColor",d:"m13.44 11.956 6.572-6.571L18.527 3.9l-6.571 6.57L5.385 3.9 3.9 5.385l6.57 6.57-6.57 6.572 1.485 1.485 6.57-6.571 6.572 6.57 1.485-1.484z"})});case"lg":return s.jsx(s.Fragment,{children:s.jsx("path",{fill:"currentColor",d:"M17.702 15.934 28.818 4.818 27.05 3.05 15.934 14.166 4.818 3.05 3.05 4.818l11.116 11.116L3.05 27.05l1.768 1.768 11.116-11.116L27.05 28.818l1.768-1.768z"})})}if("fill"===t)switch(e){case"sm":return s.jsx(s.Fragment,{children:s.jsx("path",{fill:"currentColor",d:"m9.131 8 3.536-3.536-1.131-1.131L8 6.869 4.464 3.333 3.333 4.464 6.869 8l-3.536 3.535 1.131 1.132L8 9.13l3.535 3.536 1.132-1.131z"})});case"md":return s.jsx(s.Fragment,{children:s.jsx("path",{fill:"currentColor",d:"m12 13.768 6.337 6.337 1.768-1.768L13.768 12l6.337-6.337-1.768-1.768L12 10.232 5.663 3.895 3.895 5.663 10.232 12l-6.337 6.337 1.768 1.768z"})});case"lg":return s.jsx(s.Fragment,{children:s.jsx("path",{fill:"currentColor",d:"M17.91 16 28.954 4.955l-1.91-1.91L16 14.091 4.955 3.045l-1.91 1.91L14.091 16 3.045 27.045l1.91 1.91L16 17.909l11.045 11.046 1.91-1.91z"})})}return s.jsx(s.Fragment,{})};I.metadata={name:"Cross",isSvgIcon:!0,variants:["outline","fill"]};var w=({size:e,variant:t})=>{if("outline"===t)switch(e){case"sm":return s.jsx(s.Fragment,{children:s.jsx("path",{fill:"currentColor",d:"M12.7 8.7H3.3V7.3h9.4z"})});case"md":return s.jsx(s.Fragment,{children:s.jsx("path",{fill:"currentColor",d:"M2.97 10.75h17.838v2.1H2.97z"})});case"lg":return s.jsx(s.Fragment,{children:s.jsx("path",{fill:"currentColor",d:"M27 17H4.7v-2.3H27z"})})}if("fill"===t)switch(e){case"sm":return s.jsx(s.Fragment,{children:s.jsx("path",{fill:"currentColor",d:"M12.8 8.8H3.2V7.2h9.6z"})});case"md":return s.jsx(s.Fragment,{children:s.jsx("path",{fill:"currentColor",d:"M2.966 10.75h18.068v2.5H2.966z"})});case"lg":return s.jsx(s.Fragment,{children:s.jsx("path",{fill:"currentColor",d:"M27.3 17.3H4.7v-2.6h22.6z"})})}return s.jsx(s.Fragment,{})};w.metadata={name:"Minus",isSvgIcon:!0,variants:["outline","fill"]};var V=({size:e,variant:t})=>{if("outline"===t)switch(e){case"sm":return s.jsx(s.Fragment,{children:s.jsx("path",{fill:"currentColor",d:"M9.2 4.5a1.2 1.2 0 1 0-2.4 0 1.2 1.2 0 0 0 2.4 0m1.8 0a3 3 0 1 1-6 0 3 3 0 0 1 6 0m.706 6.19a2.97 2.97 0 0 0-1.472-.39H5.766a2.966 2.966 0 0 0-2.912 2.4h10.292a2.97 2.97 0 0 0-1.44-2.01M1 13.267A4.766 4.766 0 0 1 5.766 8.5h4.468A4.765 4.765 0 0 1 15 13.266v1.166c0 .038-.03.068-.068.068H1.068A.07.07 0 0 1 1 14.432z"})});case"md":return s.jsx(s.Fragment,{children:s.jsx("path",{fill:"currentColor",d:"M14.25 7.95a2.25 2.25 0 1 0-4.5 0 2.25 2.25 0 0 0 4.5 0m1.8 0a4.05 4.05 0 1 1-8.1 0 4.05 4.05 0 0 1 8.1 0m.927 7.244A4.2 4.2 0 0 0 15 14.7H9a4.2 4.2 0 0 0-4.157 3.6h14.314a4.2 4.2 0 0 0-2.18-3.106M3 18.9a6 6 0 0 1 6-6h6a6 6 0 0 1 6 6v1.121a.08.08 0 0 1-.079.079H3.08a.08.08 0 0 1-.08-.08z"})});case"lg":return s.jsx(s.Fragment,{children:s.jsx("path",{fill:"currentColor",d:"M19.7 10a3.7 3.7 0 1 0-7.4 0 3.7 3.7 0 0 0 7.4 0m2.3 0a6 6 0 1 1-12 0 6 6 0 0 1 12 0m8 17.043q0-.681-.1-1.343a9.044 9.044 0 0 0-8.943-7.7h-9.914A9.04 9.04 0 0 0 2 27.043V28h28zM8.144 20.955a6.74 6.74 0 0 1 2.9-.655h9.913a6.744 6.744 0 0 1 6.608 5.4H4.435a6.74 6.74 0 0 1 3.71-4.745"})})}if("fill"===t)switch(e){case"sm":return s.jsx(s.Fragment,{children:s.jsx("path",{fill:"currentColor",d:"M8 7.5a3 3 0 1 0 0-6 3 3 0 0 0 0 6M3.401 9.128A4.77 4.77 0 0 0 1 13.266v1.166c0 .038.03.068.068.068h13.864c.038 0 .068-.03.068-.068v-1.166A4.766 4.766 0 0 0 10.234 8.5H5.766a4.76 4.76 0 0 0-2.365.628"})});case"md":return s.jsx(s.Fragment,{children:s.jsx("path",{fill:"currentColor",d:"M12 12a4.05 4.05 0 1 0 0-8.1 4.05 4.05 0 0 0 0 8.1m-5.824 1.606A6 6 0 0 0 3 18.9v1.121c0 .044.035.079.079.079H20.92a.08.08 0 0 0 .08-.08V18.9a6 6 0 0 0-6-6H9a6 6 0 0 0-2.824.706"})});case"lg":return s.jsx(s.Fragment,{children:s.jsx("path",{fill:"currentColor",d:"M16 16a6 6 0 1 0 0-12 6 6 0 0 0 0 12m-8.845 2.878A9.04 9.04 0 0 0 2 27.043V28h28v-.957A9.043 9.043 0 0 0 20.957 18h-9.914a9.05 9.05 0 0 0-3.888.878"})})}return s.jsx(s.Fragment,{})};V.metadata={name:"Person",isSvgIcon:!0,variants:["outline","fill"]};var _=({size:e,variant:t})=>{if("outline"===t)switch(e){case"sm":return s.jsx(s.Fragment,{children:s.jsx("path",{fill:"currentColor",d:"M7.9 2.7a5.2 5.2 0 1 0 5.2 5.2h1.6a6.8 6.8 0 1 1-6.8-6.8.8.8 0 1 1 0 1.6"})});case"md":return s.jsx(s.Fragment,{children:s.jsx("path",{fill:"currentColor",d:"M12 4a8 8 0 1 0 8 8h2c0 5.523-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2a1 1 0 1 1 0 2"})});case"lg":return s.jsx(s.Fragment,{children:s.jsx("path",{fill:"currentColor",d:"M16.15 4.3C9.605 4.3 4.3 9.605 4.3 16.15S9.605 28 16.15 28 28 22.695 28 16.15h2.3c0 7.815-6.335 14.15-14.15 14.15S2 23.965 2 16.15 8.335 2 16.15 2a1.15 1.15 0 0 1 0 2.3"})})}if("fill"===t)switch(e){case"sm":return s.jsx(s.Fragment,{children:s.jsx("path",{fill:"currentColor",d:"M8 2.9A5.1 5.1 0 1 0 13.1 8h1.8A6.9 6.9 0 1 1 8 1.1a.9.9 0 1 1 0 1.8"})});case"md":return s.jsx(s.Fragment,{children:s.jsx("path",{fill:"currentColor",d:"M12.15 4.3A7.85 7.85 0 1 0 20 12.15h2.3c0 5.606-4.544 10.15-10.15 10.15S2 17.756 2 12.15 6.544 2 12.15 2a1.15 1.15 0 0 1 0 2.3"})});case"lg":return s.jsx(s.Fragment,{children:s.jsx("path",{fill:"currentColor",d:"M16.35 4.7C9.916 4.7 4.7 9.916 4.7 16.35S9.916 28 16.35 28 28 22.784 28 16.35h2.7c0 7.925-6.425 14.35-14.35 14.35S2 24.275 2 16.35 8.425 2 16.35 2a1.35 1.35 0 1 1 0 2.7"})})}return s.jsx(s.Fragment,{})};_.metadata={name:"Progress",isSvgIcon:!0,variants:["outline","fill"]};var M={primary:V,secondary:C},N=({size:t=S,variant:a=y,customSize:r,icon:i,className:o})=>{const l=n.useMemo((()=>v(r)),[r]),c=n.useMemo((()=>e.cx(b(t),e.getStyles({avatarIconVariantRoot:a,overflow:"hidden"}),o)),[o,t,a]),d=n.useMemo((()=>e.getStyles({width:"full",height:"full",flexShrink:"0",overflow:"hidden",textAlign:"center",display:"inline-flex",justifyContent:"center",alignItems:"center"})),[]),u=n.useMemo((()=>({...l,boxSizing:"content-box"})),[l]),m=n.useMemo((()=>i??M[a??"primary"]),[i,a]),h=n.useMemo((()=>e.getStyles({avatarSizeIcon:t})),[t]);return s.jsx(e.Box,{className:c,style:l,children:s.jsx(e.Box,{className:d,style:u,children:s.jsx(e.Icon,{name:m,variant:"fill",color:"current",className:h,"data-testid":"avatar-icon"})})})};N.displayName="AvatarIcon";var z=({size:t=S,variant:a=y,name:r,initials:i,customSize:o,abbreviationStrategy:l,className:c})=>{const d=n.useMemo((()=>e.cx(b(t),e.getStyles({avatarTextVariantRoot:a,overflow:"hidden"}),"truncate",c)),[c,t,a]),u=n.useMemo((()=>e.getStyles({width:"full",height:"full",flexShrink:"0",overflow:"hidden",textAlign:"center",display:"inline-flex",justifyContent:"center",alignItems:"center",className:"truncate"})),[]),m=n.useMemo((()=>v(o)),[o]),h=n.useMemo((()=>({...m,boxSizing:"content-box"})),[m]);return s.jsx(e.Box,{className:d,style:m,children:s.jsx(e.Text,{color:"inherit",variant:"inherit",className:u,style:h,"data-testid":"avatar-text",children:i||g(r,l)})})};z.displayName="AvatarText";var k=({size:t=S,variant:a=y,src:r,srcSet:i,customSize:o,alt:l,imageProps:c,abbreviationStrategy:d,fallback:u,className:m})=>{const[h,p]=n.useState("loading");n.useEffect((()=>{let e=!0;if(r||i){const t=new Image;t.onload=()=>{e&&p("loaded")},t.onerror=()=>{e&&p("error")},r&&(t.src=r),i&&(t.srcset=i)}else p("error");return()=>{e=!1}}),[r,i]);const x=n.useMemo((()=>e.cx(b(t),e.getStyles({avatarImageVariantRoot:a,overflow:"hidden"}),m)),[m,t,a]),f=n.useMemo((()=>e.getStyles({width:"full",height:"full",flexShrink:"0",textAlign:"center",display:"inline-flex",justifyContent:"center",alignItems:"center",contentFit:"cover"})),[]),g=n.useMemo((()=>v(o)),[o]),C=n.useMemo((()=>({...g,boxSizing:"content-box"})),[g]);if("loaded"===h)return s.jsx(e.Box,{className:x,style:g,children:s.jsx(e.Image,{src:r,srcSet:i,alt:l,className:f,style:C,...c})});const j={size:t,customSize:o,variant:a};return u||l?s.jsx(z,{name:l,initials:u,abbreviationStrategy:d,...j}):s.jsx(N,{...j})};k.displayName="AvatarImage";var R=e=>s.jsx(k,{...e});R.displayName="Avatar";var T=n.forwardRef((function({variant:t="primary",size:a="md",minWidth:r,maxWidth:i=200,startIcon:o,endIcon:l,backgroundColor:c,color:d,iconColor:u,borderColor:m,children:h,...p},x){const f=e.getStyles({badgeSizeRoot:a,badgeVariantRoot:t,className:e.cx(["uds-badge","uds-badge-variant","uds-badge-size"])}),g=e.getStyles({badgeVariantIcon:t,badgeSizeIcon:a,className:e.cx(["uds-badge-iconSize","uds-badge-iconColor"])}),b=n.useMemo((()=>({...r?{minWidth:`${r}px`}:{},..."full"===i?{}:{maxWidth:`${i}px`},...c?{backgroundColor:c}:{},...m?{borderColor:m}:{},...d?{color:d}:{}})),[c,m,d,i,r]),v=n.useMemo((()=>({variant:"fill",style:{...u?{color:u}:{}}})),[u]);return s.jsxs(e.HStack,{ref:x,gap:"2",display:"inline-flex",alignItems:"center",className:f,style:b,...p,children:[o&&s.jsx(e.IconSlot,{icon:o,iconProps:v,"data-testid":"start-icon",className:g}),s.jsx("span",{className:"flex-1 truncate whitespace-nowrap text-center",children:h}),l&&s.jsx(e.IconSlot,{icon:l,iconProps:v,"data-testid":"end-icon",className:g})]})}));T.displayName="Badge";var E={scale:.7,opacity:0},H={scale:[.7,.7,1],opacity:[0,0,1],transition:{times:[0,.5,1]}},A={icon:H,hide:E,loading:E},F={loading:H,hide:E,icon:E},B=`var(${a.BUTTON_CSS_VAR_MAP.columnGap})`,P=`var(${a.BUTTON_CSS_VAR_MAP.iconSize})`,L={rest:{scale:`var(${a.BUTTON_CSS_VAR_MAP.effects.scale.rest})`},hover:{scale:`var(${a.BUTTON_CSS_VAR_MAP.effects.scale.hover})`},pressed:{scale:`var(${a.BUTTON_CSS_VAR_MAP.effects.scale.pressed})`},withoutIcon:{columnGap:"0px"},withIcon:{columnGap:B}},W={hide:{width:"0px",opacity:0,display:"none"},loading:{width:P,display:"flex",opacity:1},icon:{width:P,display:"flex",opacity:1}},O={damped:{1:{damping:20.585796264350424,stiffness:62.37968115365702},2:{damping:29.312551281312288,stiffness:126.47801753759964},3:{damping:48.92799401356162,stiffness:352.3892336537332},4:{damping:123.42690994256348,stiffness:2242.474548821137}},smooth:{1:{damping:16.46863701148034,stiffness:67.80400125397502},2:{damping:23.45004102504983,stiffness:137.47610601913004},3:{damping:39.1423952108493,stiffness:383.03177571057955},4:{damping:98.7415279540508,stiffness:2437.4723356751488}},subtle:{1:{damping:13.04316051309243,stiffness:67.80400125397502},2:{damping:18.572432491839468,stiffness:137.47610601913004},3:{damping:31.000777006992646,stiffness:383.03177571057955},4:{damping:78.20329013960823,stiffness:2437.4723356751488}},bouncy:{1:{damping:9.229712940600143,stiffness:48.880672622541795},2:{damping:12.634144343496553,stiffness:91.59092691366399},3:{damping:19.40217701790486,stiffness:216.00395877230474},4:{damping:37.541723184430275,stiffness:808.7032559422912}},veryBouncy:{1:{damping:6.902290754946187,stiffness:38.92152745126911},2:{damping:9.155550514215523,stiffness:68.48134828711234},3:{damping:13.244464908166709,stiffness:143.30858570843873},4:{damping:22.17862652876726,stiffness:401.85804919502965}}},q=()=>import("../motionFeatures-6LIGGXPL.cjs").then((({domAnimation:e})=>e));function D({reducedMotion:e="user",children:a,layoutVariant:r="subtle",layoutSpeed:i="3",colorVariant:l="smooth",colorSpeed:c="3"}){const d=O[r][i],u=O[l][c],[m,h]=n.useState(d),[p,x]=n.useState(u),f={variant:l,speed:c},g=t.getMotionVar({...f,control:"stiffness"}),b=t.getMotionVar({...f,control:"damping"}),v={variant:r,speed:i},y=t.getMotionVar({...v,control:"stiffness"}),S=t.getMotionVar({...v,control:"damping"});n.useEffect((()=>{const e=getComputedStyle(document.documentElement),t={damping:Number(e.getPropertyValue(S)),stiffness:Number(e.getPropertyValue(y))},a={damping:Number(e.getPropertyValue(b)),stiffness:Number(e.getPropertyValue(g))};h(t),x(a)}),[b,g,S,y]);const C=n.useMemo((()=>({type:"spring",mass:1,...m,layout:m,opacity:p,color:p,borderColor:p,backgroundColor:p})),[p,m]);return s.jsx(o.LazyMotion,{features:q,strict:!0,children:s.jsx(o.MotionConfig,{transition:C,reducedMotion:e,children:a})})}var $=n.forwardRef((function({variant:a,size:r,startIcon:l,endIcon:c,iconVariant:d,loading:u,disableEffects:m,children:h,asChild:p,type:x="button",className:f,width:g,...b},v){const y=n.useRef(null);n.useImperativeHandle(v,(()=>y.current));const S=n.useMemo((()=>e.createSlot()),[]),C=n.useMemo((()=>o.m.create(S)),[S]),j=c?"icon":"hide",I=(({startIcon:e,endIcon:t,loading:a})=>e||t||a?"withIcon":"withoutIcon")({startIcon:l,endIcon:c,loading:u}),w=(({loading:e,startIcon:t})=>e?"loading":t?"icon":"hide")({loading:u,startIcon:l}),{palette:V,variant:M}=n.useMemo((()=>t.parseDeprecatedButtonPaletteVariant({flatVariant:a})),[a]),N=n.useMemo((()=>({button:e.getStyles({width:g,buttonSize:r,buttonVariant:M,buttonPalette:V,className:e.cx("uds-button","uds-ring","uds-hit-target",u&&"uds-button-loading",m&&"uds-button-without-effects","withIcon"===I&&"uds-button-with-gap",f)}),content:"uds-button-content truncate",iconContainer:"uds-button-icon-container flex overflow-clip",loading:"uds-button-icon start-content animate-spin",start:"uds-button-icon start-content",end:"uds-button-icon end-content"})),[g,r,M,V,f,u,m,I]),z=o.useReducedMotion()?"smooth":"subtle",k=n.useMemo((()=>s.jsx(o.m.span,{className:N.iconContainer,initial:!1,variants:W,animate:w,children:s.jsxs(o.AnimatePresence,{initial:!1,mode:"popLayout",children:[u&&s.jsx(o.m.span,{variants:F,initial:"hide",animate:"loading",exit:"hide",children:s.jsx(e.Icon,{size:i.buttonIconSvgSize,name:_,variant:d,color:"current",className:N.loading})},"loading"),l&&!u&&s.jsx(o.m.span,{variants:A,initial:"hide",animate:"icon",exit:"hide",children:s.jsx(e.IconSlot,{className:N.start,icon:l,iconProps:{size:i.buttonIconSvgSize,variant:d,color:"current"}})})]})})),[N.iconContainer,N.loading,N.start,w,u,d,l]),R=n.useMemo((()=>s.jsx(o.m.span,{className:N.iconContainer,initial:!1,variants:W,animate:j,children:s.jsx(o.AnimatePresence,{initial:!1,mode:"popLayout",children:c&&s.jsx(o.m.span,{variants:A,initial:"hide",animate:"icon",exit:"hide",children:s.jsx(e.IconSlot,{className:N.end,icon:c,iconProps:{size:i.buttonIconSvgSize,variant:d,color:"current"}})})})})),[N.iconContainer,N.end,c,j,d]),T=n.useMemo((()=>m?{...L,rest:{},hover:{},pressed:{}}:L),[m]);return p&&n.isValidElement(h)?s.jsx(D,{layoutSpeed:"3",layoutVariant:z,children:s.jsx(C,{type:x,className:N.button,initial:["hide",I],animate:I,variants:T,whileHover:"hover",whileTap:"pressed",...b,children:n.cloneElement(h,h.props,s.jsxs(s.Fragment,{children:[k,s.jsx("span",{className:N.content,children:h.props.children}),R]}))})}):s.jsx(D,{layoutSpeed:"3",layoutVariant:z,children:s.jsxs(o.m.button,{ref:y,type:x,className:N.button,initial:["hide",I],animate:I,variants:T,whileHover:"hover",whileTap:"pressed",...b,children:[k,s.jsx("span",{className:N.content,children:h}),R]})})})),G={primary:"alert",secondary:"alert-secondary"},U=e=>"indeterminate"===e,X=e=>U(e)?w:j,Y=o.m.create(e.Box),Z={layoutVariant:"smooth",layoutSpeed:"3"},K={layoutVariant:"veryBouncy",layoutSpeed:"4"},Q=n.forwardRef((function({id:t,checked:a,defaultChecked:r,onChange:i,label:l,variant:c="primary",size:d="md",reduceMotion:u,disabled:m,required:h,hasError:p,className:x,...f},g){const b=n.useId(),v=t??`uds-input-${b}`,y=n.useRef(null),S=void 0!==a,[C,j]=n.useState(S?a:r),[I,w]=n.useState(!1),[V,_]=n.useState(!1),M=n.useMemo((()=>p?G[c]:c),[p,c]),N=!m&&I,z=!m&&V,k=n.useMemo((()=>z?.9:N?1.1:1),[z,N]),R=n.useMemo((()=>C?z?"opacity-55":"opacity-100":"opacity-0"),[C,z]),T=n.useMemo((()=>({scale:k})),[k]),E=n.useMemo((()=>V?K:Z),[V]),H=n.useCallback((e=>{i?.(e),S||j(e.target.checked)}),[S,i]),A=n.useCallback((()=>{w(!0)}),[]),F=n.useCallback((()=>{w(!1)}),[]),B=n.useCallback((()=>{_(!0)}),[]),P=n.useCallback((()=>{_(!1)}),[]),L=e=>{y.current&&(y.current.indeterminate=U(e))},W=u?"always":"user",O=o.useReducedMotion()||u?"duration-0":"duration-120";n.useEffect((()=>{S&&j(a)}),[a,S]),n.useEffect((()=>{L(C)}),[C]);const q=U(C)?"indeterminate":C?"checked":"unchecked",$={root:e.getStyles({checkboxSizeRoot:d,checkboxVariantRoot:M,checkboxVariantValueRoot:q,display:"flex",flexDirection:"row",alignItems:"center",className:e.cx("uds-ring","uds-ring-within",{"cursor-pointer":!m,"cursor-default":m,"opacity-50":m},x)}),checkbox:e.getStyles({checkboxSizeCheckbox:d,checkboxVariantCheckbox:M,checkboxVariantValueCheckbox:q,className:e.cx("rounded","border",O,"transition-[background-color,border-color,box-shadow]")}),check:e.getStyles({checkboxVariantCheckboxIcon:M,checkboxVariantValueCheckboxIcon:q,className:e.cx("pointer-events-none",R,O,"transition-opacity")}),htmlCheckbox:e.cx("cursor-[inherit]","absolute","opacity-0","top-1/2","left-1/2","w-[calc(100%+2px)]","h-[calc(100%+2px)]","transform","translate-x-[-50%]","translate-y-[-50%]")},Q=l?o.m.label:o.m.div;return s.jsx(D,{reducedMotion:W,...E,children:s.jsxs(Q,{className:$.root,"data-testid":"container",onHoverStart:A,onHoverEnd:F,onTapStart:B,onTap:P,onTapCancel:P,tabIndex:-1,children:[s.jsxs(Y,{position:"relative",className:$.checkbox,alignItems:"center",justifyContent:"center",flex:"none",animate:T,children:[s.jsx("input",{type:"checkbox",...f,ref:e=>{y.current=e,L(C),"function"==typeof g?g(e):null!==g&&(g.current=e)},id:v,disabled:m,required:h,"aria-invalid":p,checked:S?!U(C)&&C:void 0,defaultChecked:S?void 0:r,onChange:H,className:$.htmlCheckbox}),s.jsx(e.Icon,{name:X(C),size:"sm",className:$.check})]}),l&&s.jsx(e.FormLabel,{as:"div",variant:"inherit",color:"inherit",required:h,label:l})]})})}));Q.displayName="Checkbox";var J="primary",ee=n.forwardRef((function({size:t="md",minWidth:a,maxWidth:r=200,startIcon:i,endIcon:l,as:c="div",reduceMotion:d,className:u,layerClassNames:m,children:h,...p},x){const f=o.useReducedMotion()||d?"duration-0":"duration-120",g=n.useMemo((()=>({root:e.getStyles({chipSizeRoot:t,className:e.cx("focus-visible:-outline-offset-2","uds-ring",f,"transition-[background-color,border-color,box-shadow]",m?.root,u)}),icon:m?.icon})),[u,f,m,t]);return s.jsx(e.HStack,{asChild:!0,ref:x,display:"inline-flex",alignItems:"center",style:{maxWidth:`${r}px`,...a?{minWidth:`${a}px`}:{}},className:g.root,...p,children:s.jsxs(c,{children:[i&&s.jsx(e.IconSlot,{icon:i,iconProps:{variant:"fill",size:"sm",className:g.icon},"data-testid":"start-icon"}),s.jsx(e.Text,{as:"span",className:"truncate whitespace-nowrap",flex:"1",textAlign:"center",color:"current",variant:"inherit",children:h}),l&&s.jsx(e.IconSlot,{icon:l,iconProps:{variant:"fill",size:"sm",className:g.icon},"data-testid":"end-icon"})]})})}));ee.displayName="ChipBase";var te=n.forwardRef((function({variant:t=J,...a},r){const i=n.useMemo((()=>({root:e.getStyles({chipLinkVariantRoot:t}),icon:e.getStyles({chipLinkVariantIcon:t})})),[t]);return s.jsx(ee,{as:"button",ref:r,variant:t,layerClassNames:i,...a})}));te.displayName="ChipButton";var ae=e.createSlot(),re=n.forwardRef((function({className:t,asChild:a,onPress:r,onClick:n=r,backgroundColor:i,borderRadius:o,borderTopStartRadius:l,borderTopEndRadius:c,borderBottomStartRadius:d,borderBottomEndRadius:u,borderColor:m,borderStartColor:h,borderEndColor:p,borderTopColor:x,borderBottomColor:f,borderWidth:g,borderVerticalWidth:b,borderHorizontalWidth:v,borderStartWidth:y,borderEndWidth:S,borderTopWidth:C,borderBottomWidth:j,alignContent:I,alignItems:w,alignSelf:V,flex:_,flexDirection:M,flexGrow:N,flexShrink:z,flexWrap:k,justifyContent:R,flexBasis:T,display:E,overflow:H,overflowX:A,overflowY:F,position:B,spacing:P,spacingHorizontal:L,spacingVertical:W,spacingBottom:O,spacingEnd:q,spacingStart:D,spacingTop:$,offset:G,offsetVertical:U,offsetHorizontal:X,offsetBottom:Y,offsetEnd:Z,offsetStart:K,offsetTop:Q,columnGap:J,rowGap:ee,dropShadow:te,insetShadow:re,...ne},se){const ie=e.getStyles({backgroundColor:i,borderRadius:o,borderTopStartRadius:l,borderTopEndRadius:c,borderBottomStartRadius:d,borderBottomEndRadius:u,borderColor:m,borderStartColor:h,borderEndColor:p,borderTopColor:x,borderBottomColor:f,borderWidth:g,borderVerticalWidth:b,borderHorizontalWidth:v,borderStartWidth:y,borderEndWidth:S,borderTopWidth:C,borderBottomWidth:j,alignContent:I,alignItems:w,alignSelf:V,flex:_,flexDirection:M,flexGrow:N,flexShrink:z,flexWrap:k,justifyContent:R,flexBasis:T,display:E,overflow:H,overflowX:A,overflowY:F,position:B,spacing:P,spacingHorizontal:L,spacingVertical:W,spacingBottom:O,spacingEnd:q,spacingStart:D,spacingTop:$,offset:G,offsetVertical:U,offsetHorizontal:X,offsetBottom:Y,offsetEnd:Z,offsetStart:K,offsetTop:Q,columnGap:J,rowGap:ee,dropShadow:te,insetShadow:re,className:t}),oe=a?ae:"button";return s.jsx(oe,{className:ie,ref:se,onClick:n,...ne})})),ne=n.forwardRef((function({dismissButtonAriaLabel:t,onDismiss:a,dismissIcon:r,variant:i=J,...o},l){const c=n.useMemo((()=>({root:e.getStyles({chipDismissibleVariantRoot:i}),icon:e.getStyles({chipDismissibleVariantIcon:i})})),[i]),d=n.useCallback((e=>{e.stopPropagation(),a?.()}),[a]),u={icon:e.cx("uds-chip-dismissible-button","uds-hit-target")};return s.jsx(ee,{ref:l,variant:i,tabIndex:-1,endIcon:a=>s.jsx(re,{"aria-label":t,className:u.icon,onClick:d,children:s.jsx(e.IconSlot,{icon:r??I,iconProps:a,"data-testid":"dismiss-icon"})}),layerClassNames:c,...o})}));ne.displayName="ChipDismissible";var se=n.forwardRef((function({variant:t=J,...a},r){const i=n.useMemo((()=>({root:e.getStyles({chipLinkVariantRoot:t}),icon:e.getStyles({chipLinkVariantIcon:t})})),[t]);return s.jsx(ee,{as:"a",ref:r,variant:t,layerClassNames:i,...a})}));se.displayName="ChipLink";var ie=n.forwardRef((function({isToggled:t=!1,onToggle:a,onClick:r,variant:i=J,...o},l){const c=n.useMemo((()=>({root:e.getStyles({chipToggleVariantRoot:i,chipToggleVariantActiveRoot:t?"on":"off"}),icon:e.getStyles({chipToggleVariantIcon:i})})),[t,i]),d=n.useCallback((e=>{a?.(!t),r?.(e)}),[t,r,a]);return s.jsx(ee,{ref:l,as:"button",variant:i,onClick:d,"aria-pressed":t,layerClassNames:c,...o})}));ie.displayName="ChipToggle";var oe=n.forwardRef((function({onClick:e,href:t,linkProps:a,onDismiss:r,onToggle:n,isToggled:i,...o},l){return r?s.jsx(ne,{ref:l,onDismiss:r,...o}):n?s.jsx(ie,{ref:l,onToggle:n,isToggled:i,...o}):t?s.jsx(se,{ref:l,href:t,...o,...a}):s.jsx(te,{ref:l,onClick:e,...o})}));oe.displayName="Chip";var le=n.forwardRef((function({variant:a,size:r,iconVariant:l,loading:c,disableEffects:d,name:u,type:m="button",htmlName:h,className:p,children:x,...f},g){const b=n.useRef(null);n.useImperativeHandle(g,(()=>b.current));const{palette:v,variant:y}=t.parseDeprecatedButtonPaletteVariant({flatVariant:a}),S=n.useMemo((()=>({button:e.getStyles({buttonVariant:y,buttonPalette:v,iconButtonSize:r,className:e.cx("uds-icon-button","uds-button","uds-ring","uds-hit-target",c&&"uds-button-loading",d&&"uds-button-without-effects",p)}),loading:"uds-button-icon start-content animate-spin",icon:"uds-button-icon start-content"})),[v,y,p,d,r,c]),C=o.useReducedMotion(),j=n.useMemo((()=>C?"smooth":"subtle"),[C]),I=n.useMemo((()=>{const{rest:e,hover:t,pressed:a}=L;return d?{rest:{},hover:{},pressed:{}}:{rest:e,hover:t,pressed:a}}),[d]);return s.jsx(D,{layoutSpeed:"3",layoutVariant:j,reducedMotion:d?"always":"user",children:s.jsx(o.m.button,{ref:b,type:m,className:S.button,initial:"icon",variants:I,whileHover:"hover",whileTap:"pressed",name:h,...f,children:s.jsxs(o.AnimatePresence,{initial:!1,mode:"popLayout",children:[c&&s.jsx(o.m.span,{variants:F,initial:"loading",animate:"loading",exit:"hide",children:s.jsx(e.Icon,{size:i.buttonIconSvgSize,name:_,variant:l,color:"current",className:S.loading})},"loading"),u&&!c&&s.jsx(o.m.span,{variants:A,initial:"icon",animate:"icon",exit:"hide",children:x||s.jsx(e.Icon,{size:i.buttonIconSvgSize,name:u,variant:l,color:"current",className:S.icon})},u.name)]})})})})),ce=({children:e,reduceMotion:t,layoutVariant:a})=>{const r=n.useRef(null),[i,l]=n.useState("auto");return n.useEffect((()=>{if(r.current){const e=new ResizeObserver((e=>{l(e[0].contentRect.height)}));return e.observe(r.current),()=>{e.disconnect()}}}),[]),s.jsx(D,{reducedMotion:t,layoutSpeed:"4",layoutVariant:a,children:s.jsx(o.m.div,{className:"overflow-hidden",style:{height:i,opacity:0},animate:{height:i,opacity:1},children:s.jsx("div",{ref:r,children:e})})})},de=n.memo((function({helpText:t,helperTextIcon:a,spacingStart:r,spacingTop:n,size:i,isFilled:o,...c}){return t?s.jsx(e.Box,{spacingTop:n,spacingStart:r,...c,children:s.jsx(e.InputHelpTextMemo,{startIcon:a,size:i,isFilled:o,children:l.isFunction(t)?t():t})}):null})),ue=n.memo((function({icon:t,className:a}){return t?s.jsx(e.IconSlot,{icon:t,iconProps:{variant:"outline"},className:a}):null})),me=n.memo((function({icon:t,className:a}){if(!t)return null;return s.jsx(e.IconSlot,{icon:t,iconProps:{variant:"outline"},"data-testid":"end-icon",className:a})})),he=n.forwardRef((function({id:t,label:a,type:r="text",size:i="md",startIcon:c,endIcon:d,helpText:u,helperTextIcon:m,hasError:h,width:p="full",defaultValue:x,required:f,readOnly:g,disabled:b,reduceMotion:v,onChange:y,className:S,...C},j){const I=n.useId(),w=t??`uds-input-${I}`,V=`uds-input-${w}-help-text`,_=n.useRef(null);n.useImperativeHandle(j,(()=>_.current));const[M,N]=n.useState(x??""),z=n.useCallback((e=>{N(e.target.value),y?.(e)}),[y]),k=o.useReducedMotion()?"smooth":"bouncy",R=v?"always":"user",T=!g&&!b,E={root:e.getStyles({inputSizeRoot:i,inputVariantRoot:"default",inputVariantValueRoot:M?"filled":"empty",className:e.cx([S,b?"opacity-50":""])}),inputWrapper:e.getStyles({inputSizeInputWrapper:i,inputVariantInputWrapper:"default",inputVariantValueInputWrapper:M?"filled":"empty",className:"min-w-[200px]"}),input:e.getStyles({inputSizeInput:i,inputVariantInput:"default",inputVariantValueInput:M?"filled":"empty",inputVariantInputPlaceholder:"default",inputVariantValueInputPlaceholder:M?"filled":"empty",className:e.cx("grow","uds-hit-target","bg-clip-text","focus:outline-none",T?"cursor-text":"cursor-not-allowed")}),label:e.getStyles({inputSizeLabel:i,inputVariantLabel:"default",inputVariantValueLabel:M?"filled":"empty"}),labelRequired:e.getStyles({inputVariantLabelRequired:"default",inputVariantValueLabelRequired:M?"filled":"empty"}),startIcon:e.getStyles({inputSizeStartIcon:i,inputVariantStartIcon:"default",inputVariantValueStartIcon:M?"filled":"empty"}),endIcon:e.getStyles({inputSizeEndIcon:i,inputVariantEndIcon:"default",inputVariantValueEndIcon:M?"filled":"empty"})};return s.jsxs(e.VStack,{width:p,className:E.root,children:[a&&s.jsxs(e.Box,{spacingBottom:"2",columnGap:"0.5",alignItems:"flex-end",className:E.label,children:[s.jsx("label",{htmlFor:w,children:l.isFunction(a)?a():a}),f&&s.jsx("span",{className:E.labelRequired,children:"*"})]}),s.jsxs(e.Box,{position:"relative",alignItems:"center",className:E.inputWrapper,children:[s.jsx(ue,{icon:c,className:E.startIcon}),s.jsx("input",{ref:_,id:w,type:r,value:M,required:f,readOnly:g,disabled:b,"aria-describedby":V,"aria-invalid":h,onChange:z,className:E.input,...C}),d&&s.jsx(e.HStack,{alignItems:"center",gap:"1",children:s.jsx(me,{icon:d,className:E.endIcon})})]}),s.jsx(ce,{reduceMotion:R,layoutVariant:k,children:s.jsx(de,{id:V,helpText:u,spacingTop:"2",size:i,isFilled:!!M,helperTextIcon:m})})]})}));he.displayName="Input";var pe={};function xe(e){return e}function fe(e,t){const a=e.__unstableInternals;return function(e,t){if(!e)throw new Error(t)}(a,"Invalid store"),a[t]}r.__export(pe,{Content:()=>Ie,Divider:()=>we,Item:()=>Ne,ItemCheckbox:()=>ze,Provider:()=>Te,Trigger:()=>Ee,useMenuContext:()=>c.useMenuContext,useMenuStore:()=>c.useMenuStore,useStoreState:()=>u.useStoreState});var{useSyncExternalStore:ge}=x.default;function be(e,t=xe){const a=p.useCallback((t=>e?function(e,...t){if(e)return fe(e,"subscribe")(...t)}(e,null,t):()=>{}),[e]),r=()=>{const a="string"==typeof t?t:null,r="function"==typeof t?t:null,n=null==e?void 0:e.getState();if(r)return r(n);var s,i;if(n&&(a&&(s=n,i=a,"function"==typeof Object.hasOwn?Object.hasOwn(s,i):Object.prototype.hasOwnProperty.call(s,i))))return n[a]};return ge(a,r,r)}var ve=o.m.create(e.VStack),ye=5,Se=.97,Ce={top:{x:0,y:ye},bottom:{x:0,y:-5},left:{x:ye,y:0},right:{x:-5,y:0}},je=e=>n.useMemo((()=>((e="bottom")=>{const[t="top"]=e?.split("-");return{closed:{...Ce[t],opacity:0,scale:Se},open:{y:0,x:0,opacity:1,scale:1}}})(e)),[e]),Ie=n.forwardRef((function({gap:t,spacing:a,spacingBottom:r,spacingEnd:l,spacingStart:d,spacingTop:u,gutter:m="1",backgroundColor:h="primary",borderRadius:p="md",borderColor:x,borderWidth:f="thin",overflow:g,dropShadow:b="lg",className:v,sameWidth:y,focusable:S,children:C,portalElement:j,portal:I=!0,disableAutoBorderRadius:w,...V},_){const M=c.useMenuContext(),N=be(M,"open"),z=be(M,"mounted"),k=be(M,"currentPlacement"),R=be(M,"placement"),[T,E]=n.useState(k),[H,A]=n.useState(k);n.useEffect((()=>{R!==H&&A(R)}),[R]),n.useEffect((()=>{k!==H&&A(k)}),[k]),n.useEffect((()=>{z&&H!==T&&E(H)}),[z,H,T]);const F=n.useMemo((()=>N&&z?"open":"closed"),[N,z]),B=n.useMemo((()=>N?b:"none"),[N,b]),P=je(H),L=(({borderRadius:e,spacing:t})=>{if(void 0===t||"0"===t)switch(e){case"xs":return"[&>*:first-child]:rounded-t-[calc(var(--uds-border-radius-xs)_-_var(--uds-border-width-thin))] [&>*:last-child]:rounded-b-[calc(var(--uds-border-radius-xs)_-_var(--uds-border-width-thin))]";case"sm":return"[&>*:first-child]:rounded-t-[calc(var(--uds-border-radius-sm)_-_var(--uds-border-width-thin))] [&>*:last-child]:rounded-b-[calc(var(--uds-border-radius-sm)_-_var(--uds-border-width-thin))]";case"md":return"[&>*:first-child]:rounded-t-[calc(var(--uds-border-radius-md)_-_var(--uds-border-width-thin))] [&>*:last-child]:rounded-b-[calc(var(--uds-border-radius-md)_-_var(--uds-border-width-thin))]";case"lg":return"[&>*:first-child]:rounded-t-[calc(var(--uds-border-radius-lg)_-_var(--uds-border-width-thin))] [&>*:last-child]:rounded-b-[calc(var(--uds-border-radius-lg)_-_var(--uds-border-width-thin))]";case"xl":return"[&>*:first-child]:rounded-t-[calc(var(--uds-border-radius-xl)_-_var(--uds-border-width-thin))] [&>*:last-child]:rounded-b-[calc(var(--uds-border-radius-xl)_-_var(--uds-border-width-thin))]"}if("px"===t||"0.5"===t)switch(e){case"xs":return"[&>*:first-child]:rounded-t-[max(1px,calc(var(--uds-border-radius-xs)_-_2px))] [&>*:last-child]:rounded-b-[max(1px,calc(var(--uds-border-radius-xs)_-_2px))]";case"sm":return"[&>*:first-child]:rounded-t-[max(2px,calc(var(--uds-border-radius-sm)_-_2px))] [&>*:last-child]:rounded-b-[max(2px,calc(var(--uds-border-radius-sm)_-_2px))]";case"md":return"[&>*:first-child]:rounded-t-[max(2px,calc(var(--uds-border-radius-md)_-_2px))] [&>*:last-child]:rounded-b-[max(2px,calc(var(--uds-border-radius-md)_-_2px))]";case"lg":return"[&>*:first-child]:rounded-t-[max(2px,calc(var(--uds-border-radius-lg)_-_2px))] [&>*:last-child]:rounded-b-[max(2px,calc(var(--uds-border-radius-lg)_-_2px))]";case"xl":return"[&>*:first-child]:rounded-t-[max(2px,calc(var(--uds-border-radius-xl)_-_2px))] [&>*:last-child]:rounded-b-[max(2px,calc(var(--uds-border-radius-xl)_-_2px))]"}if("1"===t||"1.5"===t)switch(e){case"xs":return"[&>*:first-child]:rounded-t-[max(1px,calc(var(--uds-border-radius-xs)_-_4px))] [&>*:last-child]:rounded-b-[max(1px,calc(var(--uds-border-radius-xs)_-_4px))]";case"sm":return"[&>*:first-child]:rounded-t-[max(2px,calc(var(--uds-border-radius-sm)_-_4px))] [&>*:last-child]:rounded-b-[max(2px,calc(var(--uds-border-radius-sm)_-_4px))]";case"md":return"[&>*:first-child]:rounded-t-[max(2px,calc(var(--uds-border-radius-md)_-_4px))] [&>*:last-child]:rounded-b-[max(2px,calc(var(--uds-border-radius-md)_-_4px))]";case"lg":return"[&>*:first-child]:rounded-t-[max(2px,calc(var(--uds-border-radius-lg)_-_4px))] [&>*:last-child]:rounded-b-[max(2px,calc(var(--uds-border-radius-lg)_-_4px))]";case"xl":return"[&>*:first-child]:rounded-t-[calc(var(--uds-border-radius-xl)_-_4px)] [&>*:last-child]:rounded-b-[calc(var(--uds-border-radius-xl)_-_4px)]"}if("2"===t||"2.5"===t)switch(e){case"xs":return"[&>*:first-child]:rounded-t-[max(1px,calc(var(--uds-border-radius-xs)_-_8px))] [&>*:last-child]:rounded-b-[max(1px,calc(var(--uds-border-radius-xs)_-_8px))]";case"sm":return"[&>*:first-child]:rounded-t-[max(2px,calc(var(--uds-border-radius-sm)_-_8px))] [&>*:last-child]:rounded-b-[max(2px,calc(var(--uds-border-radius-sm)_-_8px))]";case"md":return"[&>*:first-child]:rounded-t-[max(4px,calc(var(--uds-border-radius-md)_-_8px))] [&>*:last-child]:rounded-b-[max(4px,calc(var(--uds-border-radius-md)_-_8px))]";case"lg":return"[&>*:first-child]:rounded-t-[max(4px,calc(var(--uds-border-radius-lg)_-_8px))] [&>*:last-child]:rounded-b-[max(4px,calc(var(--uds-border-radius-lg)_-_8px))]";case"xl":return"[&>*:first-child]:rounded-t-[calc(var(--uds-border-radius-xl)_-_8px)] [&>*:last-child]:rounded-b-[calc(var(--uds-border-radius-xl)_-_8px)]"}if("3"===t||"3.5"===t)switch(e){case"xs":return"[&>*:first-child]:rounded-t-[max(2px,calc(var(--uds-border-radius-xs)_-_6px))] [&>*:last-child]:rounded-b-[max(2px,calc(var(--uds-border-radius-xs)_-_6px))]";case"sm":return"[&>*:first-child]:rounded-t-[max(4px,calc(var(--uds-border-radius-sm)_-_6px))] [&>*:last-child]:rounded-b-[max(4px,calc(var(--uds-border-radius-sm)_-_6px))]";case"md":return"[&>*:first-child]:rounded-t-[max(6px,calc(var(--uds-border-radius-md)_-_6px))] [&>*:last-child]:rounded-b-[max(6px,calc(var(--uds-border-radius-md)_-_6px))]";case"lg":return"[&>*:first-child]:rounded-t-[max(6px,calc(var(--uds-border-radius-lg)_-_6px))] [&>*:last-child]:rounded-b-[max(6px,calc(var(--uds-border-radius-lg)_-_6px))]";case"xl":return"[&>*:first-child]:rounded-t-[min(20px,calc(var(--uds-border-radius-xl)_-_6px))] [&>*:last-child]:rounded-b-[min(20px,calc(var(--uds-border-radius-xl)_-_6px))]"}if("4"===t)switch(e){case"xs":return"[&>*:first-child]:rounded-t-[max(1px,calc(var(--uds-border-radius-xs)_-_16px))] [&>*:last-child]:rounded-b-[max(1px,calc(var(--uds-border-radius-xs)_-_16px))]";case"sm":return"[&>*:first-child]:rounded-t-[max(2px,calc(var(--uds-border-radius-sm)_-_16px))] [&>*:last-child]:rounded-b-[max(2px,calc(var(--uds-border-radius-sm)_-_16px))]";case"md":return"[&>*:first-child]:rounded-t-[max(4px,calc(var(--uds-border-radius-md)_-_16px))] [&>*:last-child]:rounded-b-[max(4px,calc(var(--uds-border-radius-md)_-_16px))]";case"lg":return"[&>*:first-child]:rounded-t-[max(6px,calc(var(--uds-border-radius-lg)_-_16px))] [&>*:last-child]:rounded-b-[max(6px,calc(var(--uds-border-radius-lg)_-_16px))]";case"xl":return"[&>*:first-child]:rounded-t-[max(6px,calc(var(--uds-border-radius-xl)_-_16px))] [&>*:last-child]:rounded-b-[max(6px,calc(var(--uds-border-radius-xl)_-_16px))]"}switch(e){case"xs":return"[&>*:first-child]:rounded-t-[max(1px,calc(var(--uds-border-radius-xs)_-_4px))] [&>*:last-child]:rounded-b-[max(1px,calc(var(--uds-border-radius-xs)_-_4px))]";case"sm":return"[&>*:first-child]:rounded-t-[max(2px,calc(var(--uds-border-radius-sm)_-_4px))] [&>*:last-child]:rounded-b-[max(2px,calc(var(--uds-border-radius-sm)_-_4px))]";case"md":return"[&>*:first-child]:rounded-t-[max(2px,calc(var(--uds-border-radius-md)_-_4px))] [&>*:last-child]:rounded-b-[max(2px,calc(var(--uds-border-radius-md)_-_4px))]";case"lg":return"[&>*:first-child]:rounded-t-[max(2px,calc(var(--uds-border-radius-lg)_-_4px))] [&>*:last-child]:rounded-b-[max(2px,calc(var(--uds-border-radius-lg)_-_4px))]";case"xl":return"[&>*:first-child]:rounded-t-[min(18px,calc(var(--uds-border-radius-xl)_-_4px))] [&>*:last-child]:rounded-b-[min(18px,calc(var(--uds-border-radius-xl)_-_4px))]"}})({borderRadius:p,spacing:a}),W=n.useMemo((()=>i.spacingMap[m]),[m]);return s.jsx(o.AnimatePresence,{initial:!1,children:s.jsx(c.Menu,{gutter:W,sameWidth:y,focusable:S,store:M,ref:_,portalElement:j,portal:I,...V,render:s.jsx(ve,{backgroundColor:h,gap:t,spacing:a,spacingBottom:r,spacingEnd:l,spacingStart:d,spacingTop:u,borderRadius:p,borderColor:x,borderWidth:f,overflow:g,animate:F,variants:P,dropShadow:B,className:e.cx("uds-menu-content","transition-shadow","duration-200","ease-in-out","min-w-60","max-w-lg","max-h-96","overflow-auto","uds-ring","z-10","group",!w&&L,v),children:C})})})})),we=n.forwardRef((function({role:t="separator",contentPosition:a="start",gap:r="4",children:n,spacingVertical:i=(n?"2":"0"),spacingHorizontal:o=(n?"4":"0"),className:l,...c},d){const u={root:e.getStyles({menuDividerVariantRoot:"default",className:l}),text:e.getStyles({menuDividerVariantText:"default"})};return s.jsx(e.Divider,{ref:d,role:t,variant:"inherit",contentPosition:a,gap:r,spacingVertical:i,spacingHorizontal:o,className:u.root,layerClassNames:u,...c,children:n})}));we.displayName="MenuDivider";var Ve="uds-menu-item",_e={visible:{scale:1,opacity:1},hidden:{scale:.7,opacity:0}},Me=n.forwardRef((function({spacing:t="0",spacingBottom:a,spacingEnd:r,spacingHorizontal:i="4",spacingStart:l,spacingTop:c,spacingVertical:d="3.5",columnGap:u="2",className:m,children:h,endIcon:p,startIcon:x,hideEndIcon:f,active:g,disabled:b,as:v,rootProps:y,name:S,alignItems:C="center",justifyContent:j="space-between",layerClassNames:I,...w},V){const _=n.Children.count(h)>1,M=(({active:t,disabled:a,className:r})=>e.cx(Ve,"focus-visible:text-brand","focus-visible:bg-brand-secondary","focus-visible:z-10","uds-ring","!-outline-offset-2",t&&["[&:not([aria-checked])]:cursor-default"],a&&"opacity-25 cursor-not-allowed","duration-20 transition-[font-variation-settings] ease-in-out","z-0",r))({active:g,disabled:b,className:m}),N=e.getStyles({className:e.cx(`${Ve}-content truncate`,I?.text),textAlign:"start",..._&&{columnGap:u,display:"flex",alignItems:"center",width:"full",justifyContent:"space-between"}}),z=n.useMemo((()=>({root:e.getStyles({menuSizeRoot:"default",className:e.cx(I?.root,M)}),startIcon:e.getStyles({menuSizeStartIcon:"default",className:I?.startIcon}),endIcon:e.getStyles({menuSizeEndIcon:"default",className:I?.endIcon})})),[I,M]);return s.jsx(e.Box,{asChild:!0,spacing:t,spacingBottom:a,spacingEnd:r,spacingHorizontal:i,spacingStart:l,spacingTop:c,spacingVertical:d,columnGap:u,className:z.root,alignItems:C,justifyContent:j,children:s.jsxs(v,{render:s.jsx(re,{ref:V,...w}),name:S??"",disabled:b,...y,children:[s.jsxs(e.HStack,{gap:u,alignItems:"center",width:"full",children:[s.jsx(o.AnimatePresence,{initial:!1,children:x&&s.jsx(o.m.span,{variants:_e,initial:"hidden",animate:"visible",exit:"hidden",className:"uds-start-icon",children:s.jsx(e.IconSlot,{icon:x,className:z.startIcon,iconProps:{size:"sm",variant:g?"fill":"outline",color:"current"}})})}),s.jsx("span",{className:N,children:h})]}),s.jsx(o.AnimatePresence,{initial:!1,mode:"popLayout",children:!f&&p&&s.jsx(o.m.span,{variants:_e,initial:"hidden",animate:"visible",exit:"hidden",className:"uds-end-icon",children:s.jsx(e.IconSlot,{icon:p,className:z.endIcon,iconProps:{size:"sm",variant:g?"fill":"outline",color:"current"}})})})]})})})),Ne=n.forwardRef((function({active:t,...a},r){const n={root:e.getStyles({menuItemVariantRoot:"default",menuItemVariantActiveRoot:t?"on":"off"}),text:e.getStyles({menuItemVariantText:"default",menuItemVariantActiveText:t?"on":"off"}),startIcon:e.getStyles({menuItemVariantIcon:"default",menuItemVariantActiveIcon:t?"on":"off"})};return s.jsx(Me,{ref:r,as:c.MenuItem,active:t,layerClassNames:n,...a})}));Ne.displayName="MenuItem";var ze=n.forwardRef((function({name:t,endIcon:a=j,checked:r,defaultChecked:i,className:o,...l},d){const m=t,h=n.useRef(!1),p=c.useMenuContext(),x=u.useStoreState(p);n.useEffect((()=>{!h.current&&void 0!==i&&p&&(p.setValues((e=>({...e,[m]:i}))),h.current=!0)}),[p,i,m]);const f=n.useMemo((()=>{if(void 0!==r)return r;if(x?.items?.length){const e=x?.items.find((e=>e.element?.name===m));if(e?.element)return e.element.checked}const e=x?.values[m];return"boolean"==typeof e?e:i??!1}),[x?.items,x?.values,m,r,i]),g=n.useCallback((e=>{void 0===r&&p?.setValues((t=>({...t,[m]:e.target.checked})))}),[m,p,r]),b={root:e.getStyles({menuItemCheckboxVariantRoot:"default",menuItemCheckboxVariantActiveRoot:f?"on":"off"}),text:e.getStyles({menuItemCheckboxVariantText:"default",menuItemCheckboxVariantActiveText:f?"on":"off"}),startIcon:e.getStyles({menuItemCheckboxVariantStartIcon:"default",menuItemCheckboxVariantActiveStartIcon:f?"on":"off"}),endIcon:e.getStyles({menuItemCheckboxVariantEndIcon:"default",menuItemCheckboxVariantActiveEndIcon:f?"on":"off"})};return s.jsx(Me,{ref:d,as:c.MenuItemCheckbox,hideEndIcon:!f,endIcon:a,active:f,className:e.cx("uds-menu-item-checkbox",o),layerClassNames:b,rootProps:{name:t,onChange:g,defaultChecked:i,checked:void 0!==r?r:void 0},...l})}));ze.displayName="MenuItemCheckbox";var ke=()=>{if("undefined"==typeof document)return!1;return"rtl"===getComputedStyle(document.documentElement).direction},Re=e=>{const[t,a]=n.useState(ke);return n.useEffect((()=>{if(e?.explicit)return void a(e.explicit);const t=(e=>{const t=new MutationObserver((t=>{t.some((e=>"attributes"===e.type&&"dir"===e.attributeName))&&e()}));return t.observe(document.documentElement,{attributes:!0,attributeFilter:["dir"]}),t})((()=>{a(ke())}));return()=>t.disconnect()}),[e?.explicit]),t},Te=function({placement:e="bottom",rtl:t,...a}){const r=Re({explicit:t}),n=((e,t)=>{const a=t?.rtl;if("start"===e)return a?"right":"left";if("end"===e)return a?"left":"right";if(e?.includes("-")){const[t,r]=e.split("-");if(!("start"!==t&&"end"!==t||"top"!==r&&"bottom"!==r))return`${"start"===t?a?"right":"left":a?"left":"right"}-${"bottom"===r?"end":"start"}`;if("top"===t||"bottom"===t)return`${t}-${"start"===r?a?"end":"start":a?"start":"end"}`}return e})(e,{rtl:r});return s.jsx(D,{children:s.jsx(c.MenuProvider,{placement:n,rtl:r,...a})})},Ee=n.forwardRef((function({asChild:t,className:a,...r},i){const o=n.useRef(null),l=t?s.jsx(e.Box,{ref:o,className:"uds-ring h-fit w-fit"}):void 0,d=n.useCallback((()=>{const e=o.current?.firstChild;e instanceof HTMLElement&&"function"==typeof e.focus&&e.focus()}),[o]);return s.jsx(c.MenuButton,{onFocus:d,onFocusVisible:d,ref:i,render:l,className:e.cx("uds-menu-trigger",a),...r})})),He=class e{name;value;activeCount=0;#e=new Set;constructor(e){this.name=e}onChange(e){return this.#e.add(e),()=>{this.#e.delete(e)}}setValue(e){this.value=e,this.#e.forEach((t=>t(e)))}static findOrCreate(t,a){let r=t.get(a);return r||(r=new e(a),t.set(a,r)),r}},Ae=n.createContext(new Map),Fe=e=>{const t=n.useId();return e??`uds-radio-group-${t}`},Be={primary:"alert",secondary:"alert-secondary"},Pe=o.m.create(e.Box),Le={layoutVariant:"smooth",layoutSpeed:"3"},We={layoutVariant:"veryBouncy",layoutSpeed:"4"},Oe=n.forwardRef((function({id:t,name:a,label:r,variant:i="primary",size:l="md",reduceMotion:c,value:d="",checked:u,defaultChecked:m,disabled:h,hasError:p,onChange:x,onFocus:f,onBlur:g,className:b,...v},y){const S=n.useId(),C=t??`uds-radio-${S}`,j=n.useRef(null),{name:I,isControlled:w,checked:V,setGroupValue:_}=(({name:e,value:t,checked:a,defaultChecked:r})=>{const s=n.useContext(Ae),i=s instanceof He,o=void 0!==a||i,l=Fe(e),c=n.useMemo((()=>i?s:He.findOrCreate(s,l)),[s,i,l]),[d,u]=n.useState(c.value),m=c.name??l,h=n.useCallback((e=>{c.setValue(e),o||u(e)}),[o,c]);return n.useEffect((()=>c.onChange(u)),[c]),n.useEffect((()=>{!0===a&&h(t)}),[a,t,h]),n.useEffect((()=>{if(i)return;const e=He.findOrCreate(s,m);return e.activeCount+=1,s.set(m,e),()=>{const e=s.get(m);e&&(e.activeCount-=1,0===e.activeCount&&s.delete(m))}}),[s,i,m]),{name:m,isControlled:o,checked:o&&!i?a:void 0!==d?t===d:r??!1,setGroupValue:h}})({name:a,value:d,checked:u,defaultChecked:m}),[M,N]=n.useState(!1),[z,k]=n.useState(!1),R=n.useMemo((()=>p?Be[i]:i),[p,i]),T=n.useMemo((()=>!h&&M),[h,M]),E=n.useMemo((()=>!h&&!V&&z),[V,h,z]),H=n.useMemo((()=>E?.9:T?1.1:1),[T,E]),A=n.useMemo((()=>V?E?"opacity-55":"opacity-100":"opacity-0"),[V,E]),F=n.useMemo((()=>!h&&(E&&!V||T&&V)),[V,h,T,E]),B=n.useMemo((()=>({scale:H})),[H]),P=n.useMemo((()=>z?We:Le),[z]),L=n.useCallback((e=>{_(e.target.value),x?.(e)}),[x,_]),W=n.useCallback((e=>{f?.(e)}),[f]),O=n.useCallback((e=>{g?.(e)}),[g]),q=n.useCallback((()=>{N(!0)}),[]),$=n.useCallback((()=>{N(!1)}),[]),G=n.useCallback((()=>{k(!0)}),[]),U=n.useCallback((()=>{k(!1)}),[]),X=c?"always":"user",Y=o.useReducedMotion()||c?"duration-0":"duration-120",Z={root:e.getStyles({radioSizeRoot:l,radioVariantValueRoot:V?"checked":"unchecked",radioVariantRoot:R,display:"flex",flexDirection:"row",alignItems:"center",className:e.cx(["uds-ring","uds-ring-within",{"cursor-pointer":!h,"cursor-default":h,"opacity-50":h},b])}),radio:e.getStyles({radioSizeRadio:l,radioVariantRadio:R,radioVariantValueRadio:V?"checked":"unchecked",className:e.cx(["border",Y,"transition-[background-color,border-color]","transition-shadow"])}),radioCircle:e.getStyles({radioVariantRadioCircle:R,radioVariantValueRadioCircle:V?"checked":"unchecked",className:e.cx(["pointer-events-none","w-[8px]","h-[8px]",A,Y,"transition-opacity"])}),htmlRadio:e.cx("cursor-[inherit]","absolute","opacity-0","top-1/2","left-1/2","w-[calc(100%+2px)]","h-[calc(100%+2px)]","transform","translate-x-[-50%]","translate-y-[-50%]")},K=r?o.m.label:o.m.div;return s.jsx(D,{reducedMotion:X,...P,children:s.jsxs(K,{className:Z.root,"data-testid":"container",onHoverStart:q,onHoverEnd:$,onTapStart:G,onTap:U,onTapCancel:U,tabIndex:-1,children:[s.jsxs(Pe,{position:"relative",borderRadius:"full",alignItems:"center",justifyContent:"center",flex:"none",className:Z.radio,animate:B,insetShadow:F?"lg-invert":"none",children:[s.jsx("input",{type:"radio",...v,ref:e=>{j.current=e,"function"==typeof y?y(e):null!==y&&(y.current=e)},onFocus:W,onBlur:O,id:C,name:I,value:d,disabled:h,"aria-invalid":p,onChange:L,...w?{checked:V}:{defaultChecked:m},className:Z.htmlRadio}),s.jsx(e.Box,{borderRadius:"full",className:Z.radioCircle})]}),r&&s.jsx(e.FormLabel,{as:"div",variant:"inherit",color:"inherit",label:r})]})})}));Oe.displayName="Radio";var qe=e.createSlot(),De=class extends He{onChangeCb;isControlled;constructor(e,t){super(e),this.isControlled=t}setValue(e,t=!1){this.isControlled&&!t?this.onChangeCb?.(e):super.setValue(e)}},$e=n.forwardRef((function({asChild:e,name:t,value:a,defaultValue:r,onChange:i,...o},l){const c=void 0!==a,d=Fe(t),u=n.useMemo((()=>{const e=new De(d,c);return e.value=c?a:r,e}),[r,c,d,a]);n.useEffect((()=>{u.onChangeCb=i}),[i,u]),n.useEffect((()=>{c&&u.setValue(a,!0)}),[c,u,a]),n.useEffect((()=>u.onChange((e=>i?.(e)))),[i,u]);const m=e?qe:"div";return s.jsx(Ae.Provider,{value:u,children:s.jsx(m,{role:"radiogroup",ref:l,...o})})}));$e.displayName="RadioGroupProvider";var Ge={md:{isOnX:20},sm:{isOnX:12}},Ue=o.m.create(e.Box),Xe={layoutVariant:"bouncy",layoutSpeed:"4"},Ye=n.forwardRef((function({id:t,isOn:a,defaultIsOn:r,onChange:i,label:l,size:c="md",onIcon:d,offIcon:u,reduceMotion:m,disabled:h,required:p,onFocus:x,onBlur:f,className:g,...b},v){const y=n.useId(),S=t??`uds-input-${y}`,C=n.useRef(null),j=void 0!==a,[I,w]=n.useState(j?a:r),[V,_]=n.useState(!1),M=n.useMemo((()=>!h&&V),[h,V]),{isOnX:N}=Ge[c],z=n.useMemo((()=>({initial:{scale:1,x:I?N:0},animate:{scale:M?1.05:1,x:I?N:0}})),[M,I,N]),k=n.useCallback((e=>{i?.(e),j||w(e.target.checked)}),[j,i]),R=n.useCallback((e=>{x?.(e)}),[x]),T=n.useCallback((e=>{f?.(e)}),[f]),E=n.useCallback((()=>{_(!0)}),[]),H=n.useCallback((()=>{_(!1)}),[]),A=m?"always":"user",F=o.useReducedMotion()||m?"duration-0":"duration-120";n.useEffect((()=>{j&&w(a)}),[a,j]);const B={root:e.getStyles({switchSizeRoot:c,switchVariantRoot:"default",switchVariantActiveRoot:I?"on":"off",display:"flex",flexDirection:"row",alignItems:"center",className:e.cx("uds-ring","uds-ring-within","group",{"cursor-pointer":!h,"cursor-default":h,"opacity-50":h},g)}),switch:e.getStyles({switchVariantSwitch:"default",switchSizeSwitch:c,switchVariantActiveSwitch:I?"on":"off",borderRadius:"full",position:"relative",alignItems:"center",className:e.cx(F,"transition-[background-color,box-shadow]")}),handle:e.getStyles({switchSizeHandle:c,className:e.cx("relative","pointer-events-none","rounded-full","overflow-hidden")}),handleCircle:e.getStyles({switchVariantActiveHandle:I?"on":"off",switchVariantHandle:"default",className:e.cx("absolute","top-0","left-0","right-0","bottom-0","opacity-95 group-hover:opacity-100",F,"transition-[background-color,box-shadow,opacity]")}),handleIcon:e.getStyles({switchSizeHandleIcon:c,switchVariantHandleIcon:"default",switchVariantActiveHandleIcon:I?"on":"off",className:e.cx("absolute","opacity-0","top-1/2","left-1/2","transform","translate-x-[-50%]","translate-y-[-50%]",F,"transition-opacity")}),htmlCheckbox:e.cx("cursor-[inherit]","absolute","opacity-0","top-1/2","left-1/2","w-[calc(100%+2px)]","h-[calc(100%+2px)]","transform","translate-x-[-50%]","translate-y-[-50%]")},P=l?o.m.label:o.m.div;return s.jsx(D,{reducedMotion:A,...Xe,children:s.jsxs(P,{className:B.root,"data-testid":"container",onHoverStart:E,onHoverEnd:H,tabIndex:-1,children:[s.jsxs(Ue,{className:B.switch,children:[s.jsx("input",{type:"checkbox",...b,ref:e=>{C.current=e,"function"==typeof v?v(e):null!==v&&(v.current=e)},onFocus:R,onBlur:T,id:S,disabled:h,required:p,checked:j?I:void 0,defaultChecked:j?void 0:r,onChange:k,className:B.htmlCheckbox,style:{}}),s.jsxs(Ue,{className:B.handle,...z,children:[s.jsx(e.Box,{className:B.handleCircle}),d&&s.jsx(e.IconSlot,{icon:d,iconProps:{variant:"fill",size:"sm"},"data-testid":"on-icon",className:e.cx(B.handleIcon,I?"opacity-100":"opacity-0")}),u&&s.jsx(e.IconSlot,{icon:u,iconProps:{variant:"fill",size:"sm"},"data-testid":"off-icon",className:e.cx(B.handleIcon,I?"opacity-0":"opacity-100")})]})]}),l&&s.jsx(e.FormLabel,{as:"div",variant:"inherit",color:"inherit",required:p,label:l})]})})}));Ye.displayName="Switch",
|
3
|
+
/*! © 2025 Yahoo, Inc. UDS v0.0.0-development */exports.Avatar=R,exports.AvatarIcon=N,exports.AvatarImage=k,exports.AvatarText=z,exports.Badge=T,exports.Button=$,exports.Checkbox=Q,exports.Chip=oe,exports.ChipButton=te,exports.ChipDismissible=ne,exports.ChipLink=se,exports.ChipToggle=ie,exports.IconButton=le,exports.Input=he,exports.Menu=pe,exports.Pressable=re,exports.Radio=Oe,exports.RadioGroupProvider=$e,exports.SpringMotionConfig=D,exports.Switch=Ye;
|
package/dist/client/index.d.cts
CHANGED
@@ -45,7 +45,7 @@ type AvatarIconProps = UniversalAvatarIconProps;
|
|
45
45
|
* @returns The AvatarIcon element.
|
46
46
|
*/
|
47
47
|
declare const AvatarIcon: {
|
48
|
-
({ size, variant, customSize, icon, className }: AvatarIconProps): react_jsx_runtime.JSX.Element;
|
48
|
+
({ size, variant, customSize, icon, className, }: AvatarIconProps): react_jsx_runtime.JSX.Element;
|
49
49
|
displayName: string;
|
50
50
|
};
|
51
51
|
|
@@ -74,7 +74,7 @@ type AvatarTextProps = UniversalAvatarTextProps;
|
|
74
74
|
* @returns The AvatarText element.
|
75
75
|
*/
|
76
76
|
declare const AvatarText: {
|
77
|
-
({
|
77
|
+
({ size, variant, name, initials, customSize, abbreviationStrategy, className, }: AvatarTextProps): react_jsx_runtime.JSX.Element;
|
78
78
|
displayName: string;
|
79
79
|
};
|
80
80
|
|
package/dist/client/index.d.ts
CHANGED
@@ -45,7 +45,7 @@ type AvatarIconProps = UniversalAvatarIconProps;
|
|
45
45
|
* @returns The AvatarIcon element.
|
46
46
|
*/
|
47
47
|
declare const AvatarIcon: {
|
48
|
-
({ size, variant, customSize, icon, className }: AvatarIconProps): react_jsx_runtime.JSX.Element;
|
48
|
+
({ size, variant, customSize, icon, className, }: AvatarIconProps): react_jsx_runtime.JSX.Element;
|
49
49
|
displayName: string;
|
50
50
|
};
|
51
51
|
|
@@ -74,7 +74,7 @@ type AvatarTextProps = UniversalAvatarTextProps;
|
|
74
74
|
* @returns The AvatarText element.
|
75
75
|
*/
|
76
76
|
declare const AvatarText: {
|
77
|
-
({
|
77
|
+
({ size, variant, name, initials, customSize, abbreviationStrategy, className, }: AvatarTextProps): react_jsx_runtime.JSX.Element;
|
78
78
|
displayName: string;
|
79
79
|
};
|
80
80
|
|