@yahoo/uds 3.4.6 → 3.4.8

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.
Files changed (37) hide show
  1. package/dist/chunk-6GA7YVZ6.js +2 -0
  2. package/dist/chunk-B6TJHTZE.js +2 -0
  3. package/dist/chunk-NFM3LOGK.cjs +2 -0
  4. package/dist/chunk-XF3ISQLE.cjs +2 -0
  5. package/dist/client/index.cjs +2 -2
  6. package/dist/client/index.js +3 -3
  7. package/dist/{index-BOfq14yW.d.ts → index-5FbcDtke.d.ts} +39 -6
  8. package/dist/{index-CJkW3rKr.d.cts → index-5tZk1dA6.d.cts} +39 -6
  9. package/dist/{index-DQL36m4I.d.ts → index-Byllc0JJ.d.ts} +39 -6
  10. package/dist/{index-D1poGuo1.d.cts → index-D9eJ0LWw.d.cts} +39 -6
  11. package/dist/index.cjs +1 -1
  12. package/dist/index.d.cts +1 -1
  13. package/dist/index.d.ts +1 -1
  14. package/dist/index.js +1 -1
  15. package/dist/metafile-cjs.json +1 -1
  16. package/dist/metafile-esm.json +1 -1
  17. package/dist/tailwind/plugin.cjs +1 -1
  18. package/dist/tailwind/plugin.js +2 -2
  19. package/dist/tailwind/utils.cjs +1 -1
  20. package/dist/tailwind/utils.js +1 -1
  21. package/dist/tokens/automation/configs.cjs +1 -1
  22. package/dist/tokens/automation/configs.d.cts +1 -1
  23. package/dist/tokens/automation/configs.d.ts +1 -1
  24. package/dist/tokens/automation/configs.js +1 -1
  25. package/dist/tokens/automation/properties.cjs +1 -1
  26. package/dist/tokens/automation/properties.d.cts +1 -1
  27. package/dist/tokens/automation/properties.d.ts +1 -1
  28. package/dist/tokens/automation/properties.js +1 -1
  29. package/dist/tokens/index.cjs +1 -1
  30. package/dist/tokens/index.d.cts +2 -2
  31. package/dist/tokens/index.d.ts +2 -2
  32. package/dist/tokens/index.js +1 -1
  33. package/package.json +1 -1
  34. package/dist/chunk-CNAKHAWF.cjs +0 -2
  35. package/dist/chunk-EE3DM7SS.js +0 -2
  36. package/dist/chunk-IRHJ7DWJ.js +0 -2
  37. package/dist/chunk-P4XGJJCM.cjs +0 -2
@@ -1,4 +1,4 @@
1
1
  "use client";
2
- import{getStyles as e,cx as a,HStack as t,IconSlot as r,createSlot as n,Icon as i,Box as o,FormLabel as s,Text as l,InputHelpTextMemo as d,VStack as c,DividerInternal as u,Image as h}from"../chunk-4ZPWHOWH.js";import{parseDeprecatedButtonPaletteVariant as m,getMotionVar as p}from"../chunk-EE3DM7SS.js";import{BUTTON_CSS_VAR_MAP as f}from"../chunk-4G4TBHHL.js";import{__export as v}from"../chunk-S5UKKXRV.js";import*as b from"react";import{forwardRef as x,useMemo as g,useRef as y,useImperativeHandle as C,isValidElement as w,cloneElement as N,useId as V,useState as I,useCallback as z,useEffect as _,memo as S,Children as k,createContext as M,useContext as R}from"react";import{jsxs as H,jsx as T,Fragment as E}from"react/jsx-runtime";import{buttonIconSvgSize as L,spacingMap as P}from"@yahoo/uds/fixtures";import{m as A,useReducedMotion as W,AnimatePresence as B,LazyMotion as j,MotionConfig as $}from"motion/react";import{isFunction as O}from"lodash-es";import{useMenuStore as G,useMenuContext as D,Menu as q,MenuItem as F,MenuItemCheckbox as X,MenuProvider as K,MenuButton as U}from"@ariakit/react/menu";import Y from"use-sync-external-store/shim/index.js";import{useStoreState as J}from"@ariakit/react";/*! © 2025 Yahoo, Inc. UDS v0.0.0-development */
3
- var Q={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("")},Z=(e,a="firstAndLast")=>{if(!e)return"";const t=e.trim().split(/\s+/).map((e=>e[0].toUpperCase()));return"function"==typeof a?a(e):Q[a](t)},ee=(a="md")=>e({avatarSizeRoot:a,flexShrink:"0",textAlign:"center",display:"inline-flex",justifyContent:"center",alignItems:"center",overflow:"visible",className:"truncate"}),ae=e=>e?{height:e,width:e}:{},te="primary",re="md",ne=({size:e,variant:a})=>{if("outline"===a)switch(e){case"sm":return T(E,{children:T("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 T(E,{children:T("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 T(E,{children:T("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"===a)switch(e){case"sm":return T(E,{children:T("path",{fill:"currentColor",d:"M4.5 4v2h2V4zm2 3.5h-2v2h2zM12 4l3 1.27V15h-3zM1 1h9v14H1z"})});case"md":return T(E,{children:T("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 T(E,{children:T("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 T(E,{})};ne.metadata={name:"Building",isSvgIcon:!0,variants:["outline","fill"]};var ie=({size:e,variant:a})=>{if("outline"===a)switch(e){case"sm":return T(E,{children:T("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 T(E,{children:T("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 T(E,{children:T("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"===a)switch(e){case"sm":return T(E,{children:T("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 T(E,{children:T("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 T(E,{children:T("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 T(E,{})};ie.metadata={name:"Check",isSvgIcon:!0,variants:["outline","fill"]};var oe=({size:e,variant:a})=>{if("outline"===a)switch(e){case"sm":return T(E,{children:T("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 T(E,{children:T("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 T(E,{children:T("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"===a)switch(e){case"sm":return T(E,{children:T("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 T(E,{children:T("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 T(E,{children:T("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 T(E,{})};oe.metadata={name:"Cross",isSvgIcon:!0,variants:["outline","fill"]};var se=({size:e,variant:a})=>{if("outline"===a)switch(e){case"sm":return T(E,{children:T("path",{fill:"currentColor",d:"M12.7 8.7H3.3V7.3h9.4z"})});case"md":return T(E,{children:T("path",{fill:"currentColor",d:"M2.97 10.75h17.838v2.1H2.97z"})});case"lg":return T(E,{children:T("path",{fill:"currentColor",d:"M27 17H4.7v-2.3H27z"})})}if("fill"===a)switch(e){case"sm":return T(E,{children:T("path",{fill:"currentColor",d:"M12.8 8.8H3.2V7.2h9.6z"})});case"md":return T(E,{children:T("path",{fill:"currentColor",d:"M2.966 10.75h18.068v2.5H2.966z"})});case"lg":return T(E,{children:T("path",{fill:"currentColor",d:"M27.3 17.3H4.7v-2.6h22.6z"})})}return T(E,{})};se.metadata={name:"Minus",isSvgIcon:!0,variants:["outline","fill"]};var le=({size:e,variant:a})=>{if("outline"===a)switch(e){case"sm":return T(E,{children:T("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 T(E,{children:T("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 T(E,{children:T("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"===a)switch(e){case"sm":return T(E,{children:T("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 T(E,{children:T("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 T(E,{children:T("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 T(E,{})};le.metadata={name:"Person",isSvgIcon:!0,variants:["outline","fill"]};var de=({size:e,variant:a})=>{if("outline"===a)switch(e){case"sm":return T(E,{children:T("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 T(E,{children:T("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 T(E,{children:T("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"===a)switch(e){case"sm":return T(E,{children:T("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 T(E,{children:T("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 T(E,{children:T("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 T(E,{})};de.metadata={name:"Progress",isSvgIcon:!0,variants:["outline","fill"]};var ce={primary:le,secondary:ne},ue=({size:t=re,variant:r=te,customSize:n,icon:s,className:l})=>{const d=g((()=>ae(n)),[n]),c=g((()=>a(ee(t),e({avatarIconVariantRoot:r,overflow:"hidden"}),l)),[l,t,r]),u=g((()=>e({width:"full",height:"full",flexShrink:"0",overflow:"hidden",textAlign:"center",display:"inline-flex",justifyContent:"center",alignItems:"center"})),[]),h=g((()=>({...d,boxSizing:"content-box"})),[d]),m=g((()=>s??ce[r??"primary"]),[s,r]),p=g((()=>e({avatarSizeIcon:t})),[t]);return T(o,{className:c,style:d,children:T(o,{className:u,style:h,children:T(i,{name:m,variant:"fill",color:"current",className:p,"data-testid":"avatar-icon"})})})};ue.displayName="AvatarIcon";var he=({size:t=re,variant:r=te,name:n,initials:i,customSize:s,abbreviationStrategy:d,className:c})=>{const u=g((()=>a(ee(t),e({avatarTextVariantRoot:r,overflow:"hidden"}),"truncate",c)),[c,t,r]),h=g((()=>e({width:"full",height:"full",flexShrink:"0",overflow:"hidden",textAlign:"center",display:"inline-flex",justifyContent:"center",alignItems:"center",className:"truncate"})),[]),m=g((()=>ae(s)),[s]),p=g((()=>({...m,boxSizing:"content-box"})),[m]);return T(o,{className:u,style:m,children:T(l,{color:"inherit",variant:"inherit",className:h,style:p,"data-testid":"avatar-text",children:i||Z(n,d)})})};he.displayName="AvatarText";var me=({size:t=re,variant:r=te,src:n,srcSet:i,customSize:s,alt:l,imageProps:d,abbreviationStrategy:c,fallback:u,className:m})=>{const[p,f]=I("loading");_((()=>{let e=!0;if(n||i){const a=new Image;a.onload=()=>{e&&f("loaded")},a.onerror=()=>{e&&f("error")},n&&(a.src=n),i&&(a.srcset=i)}else f("error");return()=>{e=!1}}),[n,i]);const v=g((()=>a(ee(t),e({avatarImageVariantRoot:r,overflow:"hidden"}),m)),[m,t,r]),b=g((()=>e({width:"full",height:"full",flexShrink:"0",textAlign:"center",display:"inline-flex",justifyContent:"center",alignItems:"center",contentFit:"cover"})),[]),x=g((()=>ae(s)),[s]),y=g((()=>({...x,boxSizing:"content-box"})),[x]);if("loaded"===p)return T(o,{className:v,style:x,children:T(h,{src:n,srcSet:i,alt:l,className:b,style:y,...d})});const C={size:t,customSize:s,variant:r};return u||l?T(he,{name:l,initials:u,abbreviationStrategy:c,...C}):T(ue,{...C})};me.displayName="AvatarImage";var pe=e=>T(me,{...e});pe.displayName="Avatar";var fe=x((function({variant:n="primary",size:i="md",minWidth:o,maxWidth:s=200,startIcon:l,endIcon:d,backgroundColor:c,color:u,iconColor:h,borderColor:m,children:p,...f},v){const b=e({badgeSizeRoot:i,badgeVariantRoot:n,className:a(["uds-badge","uds-badge-variant","uds-badge-size"])}),x=e({badgeVariantIcon:n,badgeSizeIcon:i,className:a(["uds-badge-iconSize","uds-badge-iconColor"])}),y=g((()=>({...o?{minWidth:`${o}px`}:{},..."full"===s?{}:{maxWidth:`${s}px`},...c?{backgroundColor:c}:{},...m?{borderColor:m}:{},...u?{color:u}:{}})),[c,m,u,s,o]),C=g((()=>({variant:"fill",style:{...h?{color:h}:{}}})),[h]);return H(t,{ref:v,gap:"2",display:"inline-flex",alignItems:"center",className:b,style:y,...f,children:[l&&T(r,{icon:l,iconProps:C,"data-testid":"start-icon",className:x}),T("span",{className:"flex-1 truncate whitespace-nowrap text-center",children:p}),d&&T(r,{icon:d,iconProps:C,"data-testid":"end-icon",className:x})]})}));fe.displayName="Badge";var ve={scale:.7,opacity:0},be={scale:[.7,.7,1],opacity:[0,0,1],transition:{times:[0,.5,1]}},xe={icon:be,hide:ve,loading:ve},ge={loading:be,hide:ve,icon:ve},ye=`var(${f.columnGap})`,Ce=`var(${f.iconSize})`,we={rest:{scale:`var(${f.effects.scale.rest})`},hover:{scale:`var(${f.effects.scale.hover})`},pressed:{scale:`var(${f.effects.scale.pressed})`},withoutIcon:{columnGap:"0px"},withIcon:{columnGap:ye}},Ne={hide:{width:"0px",opacity:0,display:"none"},loading:{width:Ce,display:"flex",opacity:1},icon:{width:Ce,display:"flex",opacity:1}},Ve={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}}},Ie=()=>import("../motionFeatures-SJISLQ4M.js").then((({domAnimation:e})=>e));function ze({reducedMotion:e="user",children:a,layoutVariant:t="subtle",layoutSpeed:r="3",colorVariant:n="smooth",colorSpeed:i="3"}){const o=Ve[t][r],s=Ve[n][i],[l,d]=I(o),[c,u]=I(s),h={variant:n,speed:i},m=p({...h,control:"stiffness"}),f=p({...h,control:"damping"}),v={variant:t,speed:r},b=p({...v,control:"stiffness"}),x=p({...v,control:"damping"});_((()=>{const e=getComputedStyle(document.documentElement),a={damping:Number(e.getPropertyValue(x)),stiffness:Number(e.getPropertyValue(b))},t={damping:Number(e.getPropertyValue(f)),stiffness:Number(e.getPropertyValue(m))};d(a),u(t)}),[f,m,x,b]);const y=g((()=>({type:"spring",mass:1,...l,layout:l,opacity:c,color:c,borderColor:c,backgroundColor:c})),[c,l]);return T(j,{features:Ie,strict:!0,children:T($,{transition:y,reducedMotion:e,children:a})})}var _e=x((function({variant:t,size:o,startIcon:s,endIcon:l,iconVariant:d,loading:c,disableEffects:u,children:h,asChild:p,type:f="button",className:v,width:b,...x},V){const I=y(null);C(V,(()=>I.current));const z=g((()=>n()),[]),_=g((()=>A.create(z)),[z]),S=l?"icon":"hide",k=(({startIcon:e,endIcon:a,loading:t})=>e||a||t?"withIcon":"withoutIcon")({startIcon:s,endIcon:l,loading:c}),M=(({loading:e,startIcon:a})=>e?"loading":a?"icon":"hide")({loading:c,startIcon:s}),{palette:R,variant:P}=g((()=>m({flatVariant:t})),[t]),j=g((()=>({button:e({width:b,buttonSize:o,buttonVariant:P,buttonPalette:R,className:a("uds-button","uds-ring","uds-hit-target",c&&"uds-button-loading",u&&"uds-button-without-effects","withIcon"===k&&"uds-button-with-gap",v)}),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"})),[b,o,P,R,v,c,u,k]),$=W()?"smooth":"subtle",O=g((()=>T(A.span,{className:j.iconContainer,initial:!1,variants:Ne,animate:M,children:H(B,{initial:!1,mode:"popLayout",children:[c&&T(A.span,{variants:ge,initial:"hide",animate:"loading",exit:"hide",children:T(i,{size:L,name:de,variant:d,color:"current",className:j.loading})},"loading"),s&&!c&&T(A.span,{variants:xe,initial:"hide",animate:"icon",exit:"hide",children:T(r,{className:j.start,icon:s,iconProps:{size:L,variant:d,color:"current"}})})]})})),[j.iconContainer,j.loading,j.start,M,c,d,s]),G=g((()=>T(A.span,{className:j.iconContainer,initial:!1,variants:Ne,animate:S,children:T(B,{initial:!1,mode:"popLayout",children:l&&T(A.span,{variants:xe,initial:"hide",animate:"icon",exit:"hide",children:T(r,{className:j.end,icon:l,iconProps:{size:L,variant:d,color:"current"}})})})})),[j.iconContainer,j.end,l,S,d]),D=g((()=>u?{...we,rest:{},hover:{},pressed:{}}:we),[u]);return p&&w(h)?T(ze,{layoutSpeed:"3",layoutVariant:$,children:T(_,{type:f,className:j.button,initial:["hide",k],animate:k,variants:D,whileHover:"hover",whileTap:"pressed",...x,children:N(h,h.props,H(E,{children:[O,T("span",{className:j.content,children:h.props.children}),G]}))})}):T(ze,{layoutSpeed:"3",layoutVariant:$,children:H(A.button,{ref:I,type:f,className:j.button,initial:["hide",k],animate:k,variants:D,whileHover:"hover",whileTap:"pressed",...x,children:[O,T("span",{className:j.content,children:h}),G]})})})),Se={primary:"alert",secondary:"alert-secondary"},ke=e=>"indeterminate"===e,Me=e=>ke(e)?se:ie,Re=A.create(o),He={layoutVariant:"smooth",layoutSpeed:"3"},Te={layoutVariant:"veryBouncy",layoutSpeed:"4"},Ee=x((function({id:t,checked:r,defaultChecked:n,onChange:o,label:l,labelPosition:d="start",variant:c="primary",size:u="md",reduceMotion:h,disabled:m,required:p,hasError:f,className:v,layerClassNames:b,...x},C){const w=V(),N=t??`uds-input-${w}`,S=y(null),k=void 0!==r,[M,R]=I(k?r:n),[E,L]=I(!1),[P,B]=I(!1),j=g((()=>f?Se[c]:c),[f,c]),$=!m&&E,O=!m&&P,G=g((()=>O?.9:$?1.1:1),[O,$]),D=g((()=>M?O?"opacity-55":"opacity-100":"opacity-0"),[M,O]),q=g((()=>({scale:G})),[G]),F=g((()=>P?Te:He),[P]),X=z((e=>{o?.(e),k||R(e.target.checked)}),[k,o]),K=z((()=>{L(!0)}),[]),U=z((()=>{L(!1)}),[]),Y=z((()=>{B(!0)}),[]),J=z((()=>{B(!1)}),[]),Q=e=>{S.current&&(S.current.indeterminate=ke(e))},Z=h?"always":"user",ee=W()||h?"duration-0":"duration-120";_((()=>{k&&R(r)}),[r,k]),_((()=>{Q(M)}),[M]);const ae=ke(M)?"indeterminate":M?"checked":"unchecked",te={root:e({checkboxSizeRoot:u,checkboxVariantRoot:j,checkboxVariantValueRoot:ae,display:"flex",flexDirection:"start"===d?"row":"row-reverse",alignItems:"center",className:a({"cursor-pointer":!m,"cursor-default":m,"opacity-50":m},v,b?.root)}),checkbox:e({checkboxSizeCheckbox:u,checkboxVariantCheckbox:j,checkboxVariantValueCheckbox:ae,className:a("border","rounded-[4px]","uds-ring","uds-ring-within",ee,"transition-[background-color,border-color,box-shadow]",b?.checkbox)}),check:e({checkboxVariantCheckboxIcon:j,checkboxVariantValueCheckboxIcon:ae,className:a("pointer-events-none",D,ee,"transition-opacity")}),htmlCheckbox:a("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%]"),label:a("start"===d?"text-start":"text-end",b?.label)},re=l?A.label:A.div;return T(ze,{reducedMotion:Z,...F,children:H(re,{className:te.root,"data-testid":"container",onHoverStart:K,onHoverEnd:U,onTapStart:Y,onTap:J,onTapCancel:J,tabIndex:-1,children:[H(Re,{position:"relative",className:te.checkbox,alignItems:"center",justifyContent:"center",flex:"none",animate:q,children:[T("input",{type:"checkbox",...x,ref:e=>{S.current=e,Q(M),"function"==typeof C?C(e):null!==C&&(C.current=e)},id:N,disabled:m,required:p,"aria-invalid":f,checked:k?!ke(M)&&M:void 0,defaultChecked:k?void 0:n,onChange:X,className:te.htmlCheckbox}),T(i,{name:Me(M),size:"sm",className:te.check})]}),l&&T(s,{as:"div",variant:"inherit",color:"inherit",required:p,label:l,className:te.label})]})})}));Ee.displayName="Checkbox";var Le="primary",Pe=x((function({size:n="md",minWidth:i,maxWidth:o=200,startIcon:s,endIcon:d,as:c="div",reduceMotion:u,disabled:h=!1,className:m,layerClassNames:p,children:f,...v},b){const x=W()||u?"duration-0":"duration-120",y=g((()=>({root:e({chipSizeRoot:n,className:a({"pointer-events-none":h,"cursor-default":h,"opacity-50":h},"focus-visible:-outline-offset-2","uds-ring",x,"transition-[background-color,border-color,box-shadow]",p?.root,m)}),icon:p?.icon})),[m,x,h,p?.icon,p?.root,n]);return T(t,{asChild:!0,ref:b,display:"inline-flex",alignItems:"center",style:{maxWidth:`${o}px`,...i?{minWidth:`${i}px`}:{}},className:y.root,...v,children:H(c,{disabled:h,children:[s&&T(r,{icon:s,iconProps:{variant:"fill",size:"sm",className:y.icon},"data-testid":"start-icon"}),T(l,{as:"span",className:"truncate whitespace-nowrap",flex:"1",textAlign:"center",color:"current",variant:"inherit",children:f}),d&&T(r,{icon:d,iconProps:{variant:"fill",size:"sm",className:y.icon},"data-testid":"end-icon"})]})})}));Pe.displayName="ChipBase";var Ae=x((function({variant:a=Le,...t},r){const n=g((()=>({root:e({chipLinkVariantRoot:a}),icon:e({chipLinkVariantIcon:a})})),[a]);return T(Pe,{as:"button",ref:r,variant:a,layerClassNames:n,...t})}));Ae.displayName="ChipButton";var We=n(),Be=x((function({className:a,asChild:t,onPress:r,onClick:n=r,backgroundColor:i,borderRadius:o,borderTopStartRadius:s,borderTopEndRadius:l,borderBottomStartRadius:d,borderBottomEndRadius:c,borderColor:u,borderStartColor:h,borderEndColor:m,borderTopColor:p,borderBottomColor:f,borderWidth:v,borderVerticalWidth:b,borderHorizontalWidth:x,borderStartWidth:g,borderEndWidth:y,borderTopWidth:C,borderBottomWidth:w,alignContent:N,alignItems:V,alignSelf:I,flex:z,flexDirection:_,flexGrow:S,flexShrink:k,flexWrap:M,justifyContent:R,flexBasis:H,display:E,overflow:L,overflowX:P,overflowY:A,position:W,spacing:B,spacingHorizontal:j,spacingVertical:$,spacingBottom:O,spacingEnd:G,spacingStart:D,spacingTop:q,offset:F,offsetVertical:X,offsetHorizontal:K,offsetBottom:U,offsetEnd:Y,offsetStart:J,offsetTop:Q,columnGap:Z,rowGap:ee,dropShadow:ae,insetShadow:te,...re},ne){const ie=e({backgroundColor:i,borderRadius:o,borderTopStartRadius:s,borderTopEndRadius:l,borderBottomStartRadius:d,borderBottomEndRadius:c,borderColor:u,borderStartColor:h,borderEndColor:m,borderTopColor:p,borderBottomColor:f,borderWidth:v,borderVerticalWidth:b,borderHorizontalWidth:x,borderStartWidth:g,borderEndWidth:y,borderTopWidth:C,borderBottomWidth:w,alignContent:N,alignItems:V,alignSelf:I,flex:z,flexDirection:_,flexGrow:S,flexShrink:k,flexWrap:M,justifyContent:R,flexBasis:H,display:E,overflow:L,overflowX:P,overflowY:A,position:W,spacing:B,spacingHorizontal:j,spacingVertical:$,spacingBottom:O,spacingEnd:G,spacingStart:D,spacingTop:q,offset:F,offsetVertical:X,offsetHorizontal:K,offsetBottom:U,offsetEnd:Y,offsetStart:J,offsetTop:Q,columnGap:Z,rowGap:ee,dropShadow:ae,insetShadow:te,className:a});return T(t?We:"button",{className:ie,ref:ne,onClick:n,...re})})),je=x((function({dismissButtonAriaLabel:t,onDismiss:n,dismissIcon:i,variant:o=Le,disabled:s,...l},d){const c=g((()=>({root:e({chipDismissibleVariantRoot:o}),icon:e({chipDismissibleVariantIcon:o})})),[o]),u=z((e=>{e.stopPropagation(),n?.()}),[n]),h={icon:a("uds-chip-dismissible-button","uds-hit-target")};return T(Pe,{ref:d,variant:o,disabled:s,tabIndex:-1,endIcon:e=>T(Be,{"aria-label":t,className:h.icon,onClick:u,disabled:s,children:T(r,{icon:i??oe,iconProps:e,"data-testid":"dismiss-icon"})}),layerClassNames:c,...l})}));je.displayName="ChipDismissible";var $e=x((function({variant:a=Le,href:t,disabled:r,...n},i){const o=g((()=>({root:e({chipLinkVariantRoot:a}),icon:e({chipLinkVariantIcon:a})})),[a]);return T(Pe,{as:"a",ref:i,variant:a,disabled:r,layerClassNames:o,...{...n,href:r?void 0:t}})}));$e.displayName="ChipLink";var Oe=x((function({isToggled:a=!1,onToggle:t,onClick:r,variant:n=Le,...i},o){const s=g((()=>({root:e({chipToggleVariantRoot:n,chipToggleVariantActiveRoot:a?"on":"off"}),icon:e({chipToggleVariantIcon:n})})),[a,n]),l=z((e=>{t?.(!a),r?.(e)}),[a,r,t]);return T(Pe,{ref:o,as:"button",variant:n,onClick:l,"aria-pressed":a,layerClassNames:s,...i})}));Oe.displayName="ChipToggle";var Ge=x((function({onClick:e,href:a,linkProps:t,onDismiss:r,onToggle:n,isToggled:i,...o},s){return r?T(je,{ref:s,onDismiss:r,...o}):n?T(Oe,{ref:s,onToggle:n,isToggled:i,...o}):a?T($e,{ref:s,href:a,...o,...t}):T(Ae,{ref:s,onClick:e,...o})}));Ge.displayName="Chip";var De=x((function({variant:t,size:r,iconVariant:n,loading:o,disableEffects:s,name:l,type:d="button",htmlName:c,className:u,children:h,...p},f){const v=y(null);C(f,(()=>v.current));const{palette:b,variant:x}=m({flatVariant:t}),w=g((()=>({button:e({buttonVariant:x,buttonPalette:b,iconButtonSize:r,className:a("uds-icon-button","uds-button","uds-ring","uds-hit-target",o&&"uds-button-loading",s&&"uds-button-without-effects",u)}),loading:"uds-button-icon start-content animate-spin",icon:"uds-button-icon start-content"})),[b,x,u,s,r,o]),N=W(),V=g((()=>N?"smooth":"subtle"),[N]),I=g((()=>{const{rest:e,hover:a,pressed:t}=we;return s?{rest:{},hover:{},pressed:{}}:{rest:e,hover:a,pressed:t}}),[s]);return T(ze,{layoutSpeed:"3",layoutVariant:V,reducedMotion:s?"always":"user",children:T(A.button,{ref:v,type:d,className:w.button,initial:"icon",variants:I,whileHover:"hover",whileTap:"pressed",name:c,...p,children:H(B,{initial:!1,mode:"popLayout",children:[o&&T(A.span,{variants:ge,initial:"loading",animate:"loading",exit:"hide",children:T(i,{size:L,name:de,variant:n,color:"current",className:w.loading})},"loading"),l&&!o&&T(A.span,{variants:xe,initial:"icon",animate:"icon",exit:"hide",children:h||T(i,{size:L,name:l,variant:n,color:"current",className:w.icon})},l.name)]})})})})),qe=({children:e,reduceMotion:a,layoutVariant:t})=>{const r=y(null),[n,i]=I("auto");return _((()=>{if(r.current){const e=new ResizeObserver((e=>{i(e[0].contentRect.height)}));return e.observe(r.current),()=>{e.disconnect()}}}),[]),T(ze,{reducedMotion:a,layoutSpeed:"4",layoutVariant:t,children:T(A.div,{className:"overflow-hidden",style:{height:n,opacity:0},animate:{height:n,opacity:1},children:T("div",{ref:r,children:e})})})},Fe=S((function({helpText:e,helperTextIcon:a,spacingStart:t,spacingTop:r,size:n,isFilled:i,...s}){return e?T(o,{spacingTop:r,spacingStart:t,...s,children:T(d,{startIcon:a,size:n,isFilled:i,children:O(e)?e():e})}):null})),Xe=S((function({icon:e,className:a}){return e?T(r,{icon:e,iconProps:{variant:"outline"},className:a}):null})),Ke=S((function({icon:e,className:a}){if(!e)return null;return T(r,{icon:e,iconProps:{variant:"outline"},"data-testid":"end-icon",className:a})})),Ue=x((function({id:r,label:n,type:i="text",size:s="md",startIcon:l,endIcon:d,helpText:u,helperTextIcon:h,hasError:m,width:p="full",defaultValue:f,required:v,readOnly:b,disabled:x,reduceMotion:g,onChange:w,className:N,..._},S){const k=V(),M=r??`uds-input-${k}`,R=`uds-input-${M}-help-text`,E=y(null);C(S,(()=>E.current));const[L,P]=I(f??""),A=z((e=>{P(e.target.value),w?.(e)}),[w]),B=W()?"smooth":"bouncy",j=g?"always":"user",$=!b&&!x,G={root:e({inputSizeRoot:s,inputVariantRoot:"default",inputVariantValueRoot:L?"filled":"empty",className:a([N,x?"opacity-50":""])}),inputWrapper:e({inputSizeInputWrapper:s,inputVariantInputWrapper:"default",inputVariantValueInputWrapper:L?"filled":"empty",className:"min-w-[200px]"}),input:e({inputSizeInput:s,inputVariantInput:"default",inputVariantValueInput:L?"filled":"empty",inputVariantInputPlaceholder:"default",inputVariantValueInputPlaceholder:L?"filled":"empty",className:a("grow","uds-hit-target","bg-clip-text","focus:outline-none",$?"cursor-text":"cursor-not-allowed")}),label:e({inputSizeLabel:s,inputVariantLabel:"default",inputVariantValueLabel:L?"filled":"empty"}),labelRequired:e({inputVariantLabelRequired:"default",inputVariantValueLabelRequired:L?"filled":"empty"}),startIcon:e({inputSizeStartIcon:s,inputVariantStartIcon:"default",inputVariantValueStartIcon:L?"filled":"empty"}),endIcon:e({inputSizeEndIcon:s,inputVariantEndIcon:"default",inputVariantValueEndIcon:L?"filled":"empty"})};return H(c,{width:p,className:G.root,children:[n&&H(o,{spacingBottom:"2",columnGap:"0.5",alignItems:"flex-end",className:G.label,children:[T("label",{htmlFor:M,children:O(n)?n():n}),v&&T("span",{className:G.labelRequired,children:"*"})]}),H(o,{position:"relative",alignItems:"center",className:G.inputWrapper,children:[T(Xe,{icon:l,className:G.startIcon}),T("input",{ref:E,id:M,type:i,value:L,required:v,readOnly:b,disabled:x,"aria-describedby":R,"aria-invalid":m,onChange:A,className:G.input,..._}),d&&T(t,{alignItems:"center",gap:"1",children:T(Ke,{icon:d,className:G.endIcon})})]}),T(qe,{reduceMotion:j,layoutVariant:B,children:T(Fe,{id:R,helpText:u,spacingTop:"2",size:s,isFilled:!!L,helperTextIcon:h})})]})}));Ue.displayName="Input";var Ye={};function Je(e){return e}function Qe(e,a){const t=e.__unstableInternals;return function(e,a){if(!e)throw new Error(a)}(t,"Invalid store"),t[a]}v(Ye,{Content:()=>oa,Divider:()=>sa,Item:()=>ua,ItemCheckbox:()=>ha,Provider:()=>fa,Trigger:()=>va,useMenuContext:()=>D,useMenuStore:()=>G,useStoreState:()=>J});var{useSyncExternalStore:Ze}=Y;function ea(e,a=Je){const t=b.useCallback((a=>e?function(e,...a){if(e)return Qe(e,"subscribe")(...a)}(e,null,a):()=>{}),[e]),r=()=>{const t="string"==typeof a?a:null,r="function"==typeof a?a:null,n=null==e?void 0:e.getState();if(r)return r(n);var i,o;if(n&&(t&&(i=n,o=t,"function"==typeof Object.hasOwn?Object.hasOwn(i,o):Object.prototype.hasOwnProperty.call(i,o))))return n[t]};return Ze(t,r,r)}var aa=A.create(c),ta=5,ra=.97,na={top:{x:0,y:ta},bottom:{x:0,y:-5},left:{x:ta,y:0},right:{x:-5,y:0}},ia=e=>g((()=>((e="bottom")=>{const[a="top"]=e?.split("-");return{closed:{...na[a],opacity:0,scale:ra},open:{y:0,x:0,opacity:1,scale:1}}})(e)),[e]),oa=x((function({gap:e,spacing:t,spacingBottom:r,spacingEnd:n,spacingStart:i,spacingTop:o,gutter:s="1",backgroundColor:l="primary",borderRadius:d="md",borderColor:c,borderWidth:u="thin",overflow:h,dropShadow:m="lg",className:p,sameWidth:f,focusable:v,children:b,portalElement:x,portal:y=!0,disableAutoBorderRadius:C,...w},N){const V=D(),z=ea(V,"open"),S=ea(V,"mounted"),k=ea(V,"currentPlacement"),M=ea(V,"placement"),[R,H]=I(k),[E,L]=I(k);_((()=>{M!==E&&L(M)}),[M]),_((()=>{k!==E&&L(k)}),[k]),_((()=>{S&&E!==R&&H(E)}),[S,E,R]);const A=g((()=>z&&S?"open":"closed"),[z,S]),W=g((()=>z?m:"none"),[z,m]),j=ia(E),$=(({borderRadius:e,spacing:a})=>{if(void 0===a||"0"===a)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"===a||"0.5"===a)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"===a||"1.5"===a)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"===a||"2.5"===a)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"===a||"3.5"===a)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"===a)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:d,spacing:t}),O=g((()=>P[s]),[s]);return T(B,{initial:!1,children:T(q,{gutter:O,sameWidth:f,focusable:v,store:V,ref:N,portalElement:x,portal:y,...w,render:T(aa,{backgroundColor:l,gap:e,spacing:t,spacingBottom:r,spacingEnd:n,spacingStart:i,spacingTop:o,borderRadius:d,borderColor:c,borderWidth:u,overflow:h,animate:A,variants:j,dropShadow:W,className:a("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",!C&&$,p),children:b})})})})),sa=x((function({role:a="separator",contentPosition:t="start",gap:r="4",children:n,spacingVertical:i=(n?"2":"0"),spacingHorizontal:o=(n?"4":"0"),className:s,...l},d){const c={root:e({menuDividerVariantRoot:"default",className:s}),text:e({menuDividerVariantText:"default"})};return T(u,{ref:d,role:a,variant:"inherit",contentPosition:t,gap:r,spacingVertical:i,spacingHorizontal:o,className:c.root,layerClassNames:c,...l,children:n})}));sa.displayName="MenuDivider";var la="uds-menu-item",da={visible:{scale:1,opacity:1},hidden:{scale:.7,opacity:0}},ca=x((function({spacing:n="0",spacingBottom:i,spacingEnd:s,spacingHorizontal:l="4",spacingStart:d,spacingTop:c,spacingVertical:u="3.5",columnGap:h="2",className:m,children:p,endIcon:f,startIcon:v,hideEndIcon:b,active:x,disabled:y,as:C,rootProps:w,name:N,alignItems:V="center",justifyContent:I="space-between",layerClassNames:z,..._},S){const M=k.count(p)>1,R=(({active:e,disabled:t,className:r})=>a(la,"focus-visible:text-brand","focus-visible:bg-brand-secondary","focus-visible:z-10","uds-ring","!-outline-offset-2",e&&["[&:not([aria-checked])]:cursor-default"],t&&"opacity-25 cursor-not-allowed","duration-20 transition-[font-variation-settings] ease-in-out","z-0",r))({active:x,disabled:y,className:m}),E=e({className:a(`${la}-content truncate`,z?.text),textAlign:"start",...M&&{columnGap:h,display:"flex",alignItems:"center",width:"full",justifyContent:"space-between"}}),L=g((()=>({root:e({menuSizeRoot:"default",className:a(z?.root,R)}),startIcon:e({menuSizeStartIcon:"default",className:z?.startIcon}),endIcon:e({menuSizeEndIcon:"default",className:z?.endIcon})})),[z,R]);return T(o,{asChild:!0,spacing:n,spacingBottom:i,spacingEnd:s,spacingHorizontal:l,spacingStart:d,spacingTop:c,spacingVertical:u,columnGap:h,className:L.root,alignItems:V,justifyContent:I,children:H(C,{render:T(Be,{ref:S,..._}),name:N??"",disabled:y,...w,children:[H(t,{gap:h,alignItems:"center",width:"full",children:[T(B,{initial:!1,children:v&&T(A.span,{variants:da,initial:"hidden",animate:"visible",exit:"hidden",className:"uds-start-icon",children:T(r,{icon:v,className:L.startIcon,iconProps:{size:"sm",variant:x?"fill":"outline",color:"current"}})})}),T("span",{className:E,children:p})]}),T(B,{initial:!1,mode:"popLayout",children:!b&&f&&T(A.span,{variants:da,initial:"hidden",animate:"visible",exit:"hidden",className:"uds-end-icon",children:T(r,{icon:f,className:L.endIcon,iconProps:{size:"sm",variant:x?"fill":"outline",color:"current"}})})})]})})})),ua=x((function({active:a,...t},r){const n={root:e({menuItemVariantRoot:"default",menuItemVariantActiveRoot:a?"on":"off"}),text:e({menuItemVariantText:"default",menuItemVariantActiveText:a?"on":"off"}),startIcon:e({menuItemVariantIcon:"default",menuItemVariantActiveIcon:a?"on":"off"})};return T(ca,{ref:r,as:F,active:a,layerClassNames:n,...t})}));ua.displayName="MenuItem";var ha=x((function({name:t,endIcon:r=ie,checked:n,defaultChecked:i,className:o,...s},l){const d=t,c=y(!1),u=D(),h=J(u);_((()=>{!c.current&&void 0!==i&&u&&(u.setValues((e=>({...e,[d]:i}))),c.current=!0)}),[u,i,d]);const m=g((()=>{if(void 0!==n)return n;if(h?.items?.length){const e=h?.items.find((e=>e.element?.name===d));if(e?.element)return e.element.checked}const e=h?.values[d];return"boolean"==typeof e?e:i??!1}),[h?.items,h?.values,d,n,i]),p=z((e=>{void 0===n&&u?.setValues((a=>({...a,[d]:e.target.checked})))}),[d,u,n]),f={root:e({menuItemCheckboxVariantRoot:"default",menuItemCheckboxVariantActiveRoot:m?"on":"off"}),text:e({menuItemCheckboxVariantText:"default",menuItemCheckboxVariantActiveText:m?"on":"off"}),startIcon:e({menuItemCheckboxVariantStartIcon:"default",menuItemCheckboxVariantActiveStartIcon:m?"on":"off"}),endIcon:e({menuItemCheckboxVariantEndIcon:"default",menuItemCheckboxVariantActiveEndIcon:m?"on":"off"})};return T(ca,{ref:l,as:X,hideEndIcon:!m,endIcon:r,active:m,className:a("uds-menu-item-checkbox",o),layerClassNames:f,rootProps:{name:t,onChange:p,defaultChecked:i,checked:void 0!==n?n:void 0},...s})}));ha.displayName="MenuItemCheckbox";var ma=()=>{if("undefined"==typeof document)return!1;return"rtl"===getComputedStyle(document.documentElement).direction},pa=e=>{const[a,t]=I(ma);return _((()=>{if(e?.explicit)return void t(e.explicit);const a=(e=>{const a=new MutationObserver((a=>{a.some((e=>"attributes"===e.type&&"dir"===e.attributeName))&&e()}));return a.observe(document.documentElement,{attributes:!0,attributeFilter:["dir"]}),a})((()=>{t(ma())}));return()=>a.disconnect()}),[e?.explicit]),a},fa=function({placement:e="bottom",rtl:a,...t}){const r=pa({explicit:a}),n=((e,a)=>{const t=a?.rtl;if("start"===e)return t?"right":"left";if("end"===e)return t?"left":"right";if(e?.includes("-")){const[a,r]=e.split("-");if(!("start"!==a&&"end"!==a||"top"!==r&&"bottom"!==r))return`${"start"===a?t?"right":"left":t?"left":"right"}-${"bottom"===r?"end":"start"}`;if("top"===a||"bottom"===a)return`${a}-${"start"===r?t?"end":"start":t?"start":"end"}`}return e})(e,{rtl:r});return T(ze,{children:T(K,{placement:n,rtl:r,...t})})},va=x((function({asChild:e,className:t,...r},n){const i=y(null),s=e?T(o,{ref:i,className:"uds-ring h-fit w-fit"}):void 0,l=z((()=>{const e=i.current?.firstChild;e instanceof HTMLElement&&"function"==typeof e.focus&&e.focus()}),[i]);return T(U,{onFocus:l,onFocusVisible:l,ref:n,render:s,className:a("uds-menu-trigger",t),...r})})),ba=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((a=>a(e)))}static findOrCreate(a,t){let r=a.get(t);return r||(r=new e(t),a.set(t,r)),r}},xa=M(new Map),ga=e=>{const a=V();return e??`uds-radio-group-${a}`},ya={primary:"alert",secondary:"alert-secondary"},Ca=A.create(o),wa={layoutVariant:"smooth",layoutSpeed:"3"},Na={layoutVariant:"veryBouncy",layoutSpeed:"4"},Va=x((function({id:t,name:r,label:n,labelPosition:i="start",variant:l="primary",size:d="md",reduceMotion:c,value:u="",checked:h,defaultChecked:m,disabled:p,hasError:f,onChange:v,onFocus:b,onBlur:x,className:C,layerClassNames:w,...N},S){const k=V(),M=t??`uds-radio-${k}`,E=y(null),{name:L,isControlled:P,checked:B,setGroupValue:j}=(({name:e,value:a,checked:t,defaultChecked:r})=>{const n=R(xa),i=n instanceof ba,o=void 0!==t||i,s=ga(e),l=g((()=>i?n:ba.findOrCreate(n,s)),[n,i,s]),[d,c]=I(l.value),u=l.name??s,h=z((e=>{l.setValue(e),o||c(e)}),[o,l]);return _((()=>l.onChange(c)),[l]),_((()=>{!0===t&&h(a)}),[t,a,h]),_((()=>{if(i)return;const e=ba.findOrCreate(n,u);return e.activeCount+=1,n.set(u,e),()=>{const e=n.get(u);e&&(e.activeCount-=1,0===e.activeCount&&n.delete(u))}}),[n,i,u]),{name:u,isControlled:o,checked:o&&!i?t:void 0!==d?a===d:r??!1,setGroupValue:h}})({name:r,value:u,checked:h,defaultChecked:m}),[$,O]=I(!1),[G,D]=I(!1),q=g((()=>f?ya[l]:l),[f,l]),F=g((()=>!p&&$),[p,$]),X=g((()=>!p&&!B&&G),[B,p,G]),K=g((()=>X?.9:F?1.1:1),[F,X]),U=g((()=>B?X?"opacity-55":"opacity-100":"opacity-0"),[B,X]),Y=g((()=>!p&&(X&&!B||F&&B)),[B,p,F,X]),J=g((()=>({scale:K})),[K]),Q=g((()=>G?Na:wa),[G]),Z=z((e=>{j(e.target.value),v?.(e)}),[v,j]),ee=z((e=>{b?.(e)}),[b]),ae=z((e=>{x?.(e)}),[x]),te=z((()=>{O(!0)}),[]),re=z((()=>{O(!1)}),[]),ne=z((()=>{D(!0)}),[]),ie=z((()=>{D(!1)}),[]),oe=c?"always":"user",se=W()||c?"duration-0":"duration-120",le={root:e({radioSizeRoot:d,radioVariantValueRoot:B?"checked":"unchecked",radioVariantRoot:q,display:"flex",flexDirection:"start"===i?"row":"row-reverse",alignItems:"center",className:a([{"cursor-pointer":!p,"cursor-default":p,"opacity-50":p},C,w?.root])}),radio:e({radioSizeRadio:d,radioVariantRadio:q,radioVariantValueRadio:B?"checked":"unchecked",className:a(["border","uds-ring","uds-ring-within",se,"transition-[background-color,border-color]","transition-shadow",w?.radio])}),radioCircle:e({radioVariantRadioCircle:q,radioVariantValueRadioCircle:B?"checked":"unchecked",className:a(["pointer-events-none","w-[8px]","h-[8px]",U,se,"transition-opacity"])}),htmlRadio:a("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%]"),label:a("start"===i?"text-start":"text-end",w?.label)},de=n?A.label:A.div;return T(ze,{reducedMotion:oe,...Q,children:H(de,{className:le.root,"data-testid":"container",onHoverStart:te,onHoverEnd:re,onTapStart:ne,onTap:ie,onTapCancel:ie,tabIndex:-1,children:[H(Ca,{position:"relative",borderRadius:"full",alignItems:"center",justifyContent:"center",flex:"none",className:le.radio,animate:J,insetShadow:Y?"lg-invert":"none",children:[T("input",{type:"radio",...N,ref:e=>{E.current=e,"function"==typeof S?S(e):null!==S&&(S.current=e)},onFocus:ee,onBlur:ae,id:M,name:L,value:u,disabled:p,"aria-invalid":f,onChange:Z,...P?{checked:B}:{defaultChecked:m},className:le.htmlRadio}),T(o,{borderRadius:"full",className:le.radioCircle})]}),n&&T(s,{as:"div",variant:"inherit",color:"inherit",label:n,className:le.label})]})})}));Va.displayName="Radio";var Ia=n(),za=class extends ba{onChangeCb;isControlled;constructor(e,a){super(e),this.isControlled=a}setValue(e,a=!1){this.isControlled&&!a?this.onChangeCb?.(e):super.setValue(e)}},_a=x((function({asChild:e,name:a,value:t,defaultValue:r,onChange:n,...i},o){const s=void 0!==t,l=ga(a),d=g((()=>{const e=new za(l,s);return e.value=s?t:r,e}),[r,s,l,t]);_((()=>{d.onChangeCb=n}),[n,d]),_((()=>{s&&d.setValue(t,!0)}),[s,d,t]),_((()=>d.onChange((e=>n?.(e)))),[n,d]);const c=e?Ia:"div";return T(xa.Provider,{value:d,children:T(c,{role:"radiogroup",ref:o,...i})})}));_a.displayName="RadioGroupProvider";var Sa={md:{isOnX:20},sm:{isOnX:12}},ka=A.create(o),Ma={layoutVariant:"bouncy",layoutSpeed:"4"},Ra=x((function({id:t,isOn:n,defaultIsOn:i,onChange:l,label:d,labelPosition:c="start",size:u="md",onIcon:h,offIcon:m,reduceMotion:p,disabled:f,required:v,onFocus:b,onBlur:x,className:C,layerClassNames:w,...N},S){const k=V(),M=t??`uds-input-${k}`,R=y(null),E=void 0!==n,[L,P]=I(E?n:i),[B,j]=I(!1),$=g((()=>!f&&B),[f,B]),{isOnX:O}=Sa[u],G=g((()=>({initial:{scale:1,x:L?O:0},animate:{scale:$?1.05:1,x:L?O:0}})),[$,L,O]),D=z((e=>{l?.(e),E||P(e.target.checked)}),[E,l]),q=z((e=>{b?.(e)}),[b]),F=z((e=>{x?.(e)}),[x]),X=z((()=>{j(!0)}),[]),K=z((()=>{j(!1)}),[]),U=p?"always":"user",Y=W()||p?"duration-0":"duration-120";_((()=>{E&&P(n)}),[n,E]);const J={root:e({switchSizeRoot:u,switchVariantRoot:"default",switchVariantActiveRoot:L?"on":"off",display:"flex",flexDirection:"start"===c?"row":"row-reverse",alignItems:"center",className:a("group",{"cursor-pointer":!f,"cursor-default":f,"opacity-50":f},w?.root,C)}),switch:e({switchVariantSwitch:"default",switchSizeSwitch:u,switchVariantActiveSwitch:L?"on":"off",borderRadius:"full",position:"relative",alignItems:"center",className:a("uds-ring","uds-ring-within",Y,"transition-[background-color,box-shadow]",w?.switch)}),handle:e({switchSizeHandle:u,className:a("relative","pointer-events-none","rounded-full","overflow-hidden",w?.handle)}),handleCircle:e({switchVariantActiveHandle:L?"on":"off",switchVariantHandle:"default",className:a("absolute","top-0","left-0","right-0","bottom-0","opacity-95 group-hover:opacity-100",Y,"transition-[background-color,box-shadow,opacity]")}),handleIcon:e({switchSizeHandleIcon:u,switchVariantHandleIcon:"default",switchVariantActiveHandleIcon:L?"on":"off",className:a("absolute","opacity-0","top-1/2","left-1/2","transform","translate-x-[-50%]","translate-y-[-50%]",Y,"transition-opacity")}),htmlCheckbox:a("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%]"),label:a("start"===c?"text-start":"text-end",w?.label)},Q=d?A.label:A.div;return T(ze,{reducedMotion:U,...Ma,children:H(Q,{className:J.root,"data-testid":"container",onHoverStart:X,onHoverEnd:K,tabIndex:-1,children:[H(ka,{className:J.switch,children:[T("input",{type:"checkbox",...N,ref:e=>{R.current=e,"function"==typeof S?S(e):null!==S&&(S.current=e)},onFocus:q,onBlur:F,id:M,disabled:f,required:v,checked:E?L:void 0,defaultChecked:E?void 0:i,onChange:D,className:J.htmlCheckbox,style:{}}),H(ka,{className:J.handle,...G,children:[T(o,{className:J.handleCircle}),h&&T(r,{icon:h,iconProps:{variant:"fill",size:"sm"},"data-testid":"on-icon",className:a(J.handleIcon,L?"opacity-100":"opacity-0")}),m&&T(r,{icon:m,iconProps:{variant:"fill",size:"sm"},"data-testid":"off-icon",className:a(J.handleIcon,L?"opacity-0":"opacity-100")})]})]}),d&&T(s,{as:"div",variant:"inherit",color:"inherit",required:v,label:d,className:J.label})]})})}));Ra.displayName="Switch";
4
- /*! © 2025 Yahoo, Inc. UDS v0.0.0-development */export{pe as Avatar,ue as AvatarIcon,me as AvatarImage,he as AvatarText,fe as Badge,_e as Button,Ee as Checkbox,Ge as Chip,Ae as ChipButton,je as ChipDismissible,$e as ChipLink,Oe as ChipToggle,De as IconButton,Ue as Input,Ye as Menu,Be as Pressable,Va as Radio,_a as RadioGroupProvider,ze as SpringMotionConfig,Ra as Switch};
2
+ import{getStyles as e,cx as a,HStack as t,IconSlot as r,createSlot as n,Icon as i,Box as o,FormLabel as s,Text as l,InputHelpTextMemo as d,VStack as c,DividerInternal as u,Image as h}from"../chunk-4ZPWHOWH.js";import{parseDeprecatedButtonPaletteVariant as m,getMotionVar as p}from"../chunk-6GA7YVZ6.js";import{BUTTON_CSS_VAR_MAP as f}from"../chunk-4G4TBHHL.js";import{__export as v}from"../chunk-S5UKKXRV.js";import*as b from"react";import{forwardRef as x,useMemo as g,useRef as y,useImperativeHandle as C,isValidElement as w,cloneElement as N,useId as V,useState as I,useCallback as z,useEffect as _,memo as S,Children as k,createContext as M,useContext as R}from"react";import{jsxs as H,jsx as T,Fragment as L}from"react/jsx-runtime";import{buttonIconSvgSize as E,spacingMap as A}from"@yahoo/uds/fixtures";import{m as P,useReducedMotion as W,AnimatePresence as B,LazyMotion as j,MotionConfig as $}from"motion/react";import{isFunction as O}from"lodash-es";import{useMenuStore as G,useMenuContext as D,Menu as q,MenuItem as F,MenuItemCheckbox as X,MenuProvider as Y,MenuButton as K}from"@ariakit/react/menu";import U from"use-sync-external-store/shim/index.js";import{useStoreState as Z}from"@ariakit/react";/*! © 2025 Yahoo, Inc. UDS v0.0.0-development */
3
+ var J={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("")},Q=(e,a="firstAndLast")=>{if(!e)return"";const t=e.trim().split(/\s+/).map((e=>e[0].toUpperCase()));return"function"==typeof a?a(e):J[a](t)},ee=(a="md")=>e({avatarSizeRoot:a,flexShrink:"0",textAlign:"center",display:"inline-flex",justifyContent:"center",alignItems:"center",overflow:"visible",className:"truncate"}),ae=e=>e?{height:e,width:e}:{},te="primary",re="md",ne=({size:e,variant:a})=>{if("outline"===a)switch(e){case"sm":return T(L,{children:T("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 T(L,{children:T("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 T(L,{children:T("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"===a)switch(e){case"sm":return T(L,{children:T("path",{fill:"currentColor",d:"M4.5 4v2h2V4zm2 3.5h-2v2h2zM12 4l3 1.27V15h-3zM1 1h9v14H1z"})});case"md":return T(L,{children:T("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 T(L,{children:T("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 T(L,{})};ne.metadata={name:"Building",isSvgIcon:!0,variants:["outline","fill"]};var ie=({size:e,variant:a})=>{if("outline"===a)switch(e){case"sm":return T(L,{children:T("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 T(L,{children:T("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 T(L,{children:T("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"===a)switch(e){case"sm":return T(L,{children:T("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 T(L,{children:T("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 T(L,{children:T("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 T(L,{})};ie.metadata={name:"Check",isSvgIcon:!0,variants:["outline","fill"]};var oe=({size:e,variant:a})=>{if("outline"===a)switch(e){case"sm":return T(L,{children:T("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 T(L,{children:T("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 T(L,{children:T("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"===a)switch(e){case"sm":return T(L,{children:T("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 T(L,{children:T("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 T(L,{children:T("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 T(L,{})};oe.metadata={name:"Cross",isSvgIcon:!0,variants:["outline","fill"]};var se=({size:e,variant:a})=>{if("outline"===a)switch(e){case"sm":return T(L,{children:T("path",{fill:"currentColor",d:"M12.7 8.7H3.3V7.3h9.4z"})});case"md":return T(L,{children:T("path",{fill:"currentColor",d:"M2.97 10.75h17.838v2.1H2.97z"})});case"lg":return T(L,{children:T("path",{fill:"currentColor",d:"M27 17H4.7v-2.3H27z"})})}if("fill"===a)switch(e){case"sm":return T(L,{children:T("path",{fill:"currentColor",d:"M12.8 8.8H3.2V7.2h9.6z"})});case"md":return T(L,{children:T("path",{fill:"currentColor",d:"M2.966 10.75h18.068v2.5H2.966z"})});case"lg":return T(L,{children:T("path",{fill:"currentColor",d:"M27.3 17.3H4.7v-2.6h22.6z"})})}return T(L,{})};se.metadata={name:"Minus",isSvgIcon:!0,variants:["outline","fill"]};var le=({size:e,variant:a})=>{if("outline"===a)switch(e){case"sm":return T(L,{children:T("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 T(L,{children:T("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 T(L,{children:T("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"===a)switch(e){case"sm":return T(L,{children:T("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 T(L,{children:T("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 T(L,{children:T("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 T(L,{})};le.metadata={name:"Person",isSvgIcon:!0,variants:["outline","fill"]};var de=({size:e,variant:a})=>{if("outline"===a)switch(e){case"sm":return T(L,{children:T("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 T(L,{children:T("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 T(L,{children:T("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"===a)switch(e){case"sm":return T(L,{children:T("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 T(L,{children:T("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 T(L,{children:T("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 T(L,{})};de.metadata={name:"Progress",isSvgIcon:!0,variants:["outline","fill"]};var ce={primary:le,secondary:ne},ue=({size:t=re,variant:r=te,customSize:n,icon:s,className:l})=>{const d=g((()=>ae(n)),[n]),c=g((()=>a(ee(t),e({avatarIconVariantRoot:r,overflow:"hidden"}),l)),[l,t,r]),u=g((()=>e({width:"full",height:"full",flexShrink:"0",overflow:"hidden",textAlign:"center",display:"inline-flex",justifyContent:"center",alignItems:"center"})),[]),h=g((()=>({...d,boxSizing:"content-box"})),[d]),m=g((()=>s??ce[r??"primary"]),[s,r]),p=g((()=>e({avatarSizeIcon:t})),[t]);return T(o,{className:c,style:d,children:T(o,{className:u,style:h,children:T(i,{name:m,variant:"fill",color:"current",className:p,"data-testid":"avatar-icon"})})})};ue.displayName="AvatarIcon";var he=({size:t=re,variant:r=te,name:n,initials:i,customSize:s,abbreviationStrategy:d,className:c})=>{const u=g((()=>a(ee(t),e({avatarTextVariantRoot:r,overflow:"hidden"}),"truncate",c)),[c,t,r]),h=g((()=>e({width:"full",height:"full",flexShrink:"0",overflow:"hidden",textAlign:"center",display:"inline-flex",justifyContent:"center",alignItems:"center",className:"truncate"})),[]),m=g((()=>ae(s)),[s]),p=g((()=>({...m,boxSizing:"content-box"})),[m]);return T(o,{className:u,style:m,children:T(l,{color:"inherit",variant:"inherit",className:h,style:p,"data-testid":"avatar-text",children:i||Q(n,d)})})};he.displayName="AvatarText";var me=({size:t=re,variant:r=te,src:n,srcSet:i,customSize:s,alt:l,imageProps:d,abbreviationStrategy:c,fallback:u,className:m})=>{const[p,f]=I("loading");_((()=>{let e=!0;if(n||i){const a=new Image;a.onload=()=>{e&&f("loaded")},a.onerror=()=>{e&&f("error")},n&&(a.src=n),i&&(a.srcset=i)}else f("error");return()=>{e=!1}}),[n,i]);const v=g((()=>a(ee(t),e({avatarImageVariantRoot:r,overflow:"hidden"}),m)),[m,t,r]),b=g((()=>e({width:"full",height:"full",flexShrink:"0",textAlign:"center",display:"inline-flex",justifyContent:"center",alignItems:"center",contentFit:"cover"})),[]),x=g((()=>ae(s)),[s]),y=g((()=>({...x,boxSizing:"content-box"})),[x]);if("loaded"===p)return T(o,{className:v,style:x,children:T(h,{src:n,srcSet:i,alt:l,className:b,style:y,...d})});const C={size:t,customSize:s,variant:r};return u||l?T(he,{name:l,initials:u,abbreviationStrategy:c,...C}):T(ue,{...C})};me.displayName="AvatarImage";var pe=e=>T(me,{...e});pe.displayName="Avatar";var fe=x((function({variant:n="primary",size:i="md",minWidth:o,maxWidth:s=200,startIcon:l,endIcon:d,backgroundColor:c,color:u,iconColor:h,borderColor:m,children:p,...f},v){const b=e({badgeSizeRoot:i,badgeVariantRoot:n,className:a(["uds-badge","uds-badge-variant","uds-badge-size"])}),x=e({badgeVariantIcon:n,badgeSizeIcon:i,className:a(["uds-badge-iconSize","uds-badge-iconColor"])}),y=g((()=>({...o?{minWidth:`${o}px`}:{},..."full"===s?{}:{maxWidth:`${s}px`},...c?{backgroundColor:c}:{},...m?{borderColor:m}:{},...u?{color:u}:{}})),[c,m,u,s,o]),C=g((()=>({variant:"fill",style:{...h?{color:h}:{}}})),[h]);return H(t,{ref:v,gap:"2",display:"inline-flex",alignItems:"center",className:b,style:y,...f,children:[l&&T(r,{icon:l,iconProps:C,"data-testid":"start-icon",className:x}),T("span",{className:"flex-1 truncate whitespace-nowrap text-center",children:p}),d&&T(r,{icon:d,iconProps:C,"data-testid":"end-icon",className:x})]})}));fe.displayName="Badge";var ve={scale:.7,opacity:0},be={scale:[.7,.7,1],opacity:[0,0,1],transition:{times:[0,.5,1]}},xe={icon:be,hide:ve,loading:ve},ge={loading:be,hide:ve,icon:ve},ye=`var(${f.columnGap})`,Ce=`var(${f.iconSize})`,we={rest:{scale:`var(${f.effects.scale.rest})`},hover:{scale:`var(${f.effects.scale.hover})`},pressed:{scale:`var(${f.effects.scale.pressed})`},withoutIcon:{columnGap:"0px"},withIcon:{columnGap:ye}},Ne={hide:{width:"0px",opacity:0,display:"none"},loading:{width:Ce,display:"flex",opacity:1},icon:{width:Ce,display:"flex",opacity:1}},Ve={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}}},Ie=()=>import("../motionFeatures-SJISLQ4M.js").then((({domAnimation:e})=>e));function ze({reducedMotion:e="user",children:a,layoutVariant:t="subtle",layoutSpeed:r="3",colorVariant:n="smooth",colorSpeed:i="3"}){const o=Ve[t][r],s=Ve[n][i],[l,d]=I(o),[c,u]=I(s),h={variant:n,speed:i},m=p({...h,control:"stiffness"}),f=p({...h,control:"damping"}),v={variant:t,speed:r},b=p({...v,control:"stiffness"}),x=p({...v,control:"damping"});_((()=>{const e=getComputedStyle(document.documentElement),a={damping:Number(e.getPropertyValue(x)),stiffness:Number(e.getPropertyValue(b))},t={damping:Number(e.getPropertyValue(f)),stiffness:Number(e.getPropertyValue(m))};d(a),u(t)}),[f,m,x,b]);const y=g((()=>({type:"spring",mass:1,...l,layout:l,opacity:c,color:c,borderColor:c,backgroundColor:c})),[c,l]);return T(j,{features:Ie,strict:!0,children:T($,{transition:y,reducedMotion:e,children:a})})}var _e=x((function({variant:t,size:o,startIcon:s,endIcon:l,iconVariant:d,loading:c,disableEffects:u,children:h,asChild:p,type:f="button",className:v,width:b,...x},V){const I=y(null);C(V,(()=>I.current));const z=g((()=>n()),[]),_=g((()=>P.create(z)),[z]),S=l?"icon":"hide",k=(({startIcon:e,endIcon:a,loading:t})=>e||a||t?"withIcon":"withoutIcon")({startIcon:s,endIcon:l,loading:c}),M=(({loading:e,startIcon:a})=>e?"loading":a?"icon":"hide")({loading:c,startIcon:s}),{palette:R,variant:A}=g((()=>m({flatVariant:t})),[t]),j=g((()=>({button:e({width:b,buttonSize:o,buttonVariant:A,buttonPalette:R,className:a("uds-button","uds-ring","uds-hit-target",c&&"uds-button-loading",u&&"uds-button-without-effects","withIcon"===k&&"uds-button-with-gap",v)}),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"})),[b,o,A,R,v,c,u,k]),$=W()?"smooth":"subtle",O=g((()=>T(P.span,{className:j.iconContainer,initial:!1,variants:Ne,animate:M,children:H(B,{initial:!1,mode:"popLayout",children:[c&&T(P.span,{variants:ge,initial:"hide",animate:"loading",exit:"hide",children:T(i,{size:E,name:de,variant:d,color:"current",className:j.loading})},"loading"),s&&!c&&T(P.span,{variants:xe,initial:"hide",animate:"icon",exit:"hide",children:T(r,{className:j.start,icon:s,iconProps:{size:E,variant:d,color:"current"}})})]})})),[j.iconContainer,j.loading,j.start,M,c,d,s]),G=g((()=>T(P.span,{className:j.iconContainer,initial:!1,variants:Ne,animate:S,children:T(B,{initial:!1,mode:"popLayout",children:l&&T(P.span,{variants:xe,initial:"hide",animate:"icon",exit:"hide",children:T(r,{className:j.end,icon:l,iconProps:{size:E,variant:d,color:"current"}})})})})),[j.iconContainer,j.end,l,S,d]),D=g((()=>u?{...we,rest:{},hover:{},pressed:{}}:we),[u]);return p&&w(h)?T(ze,{layoutSpeed:"3",layoutVariant:$,children:T(_,{type:f,className:j.button,initial:["hide",k],animate:k,variants:D,whileHover:"hover",whileTap:"pressed",...x,children:N(h,h.props,H(L,{children:[O,T("span",{className:j.content,children:h.props.children}),G]}))})}):T(ze,{layoutSpeed:"3",layoutVariant:$,children:H(P.button,{ref:I,type:f,className:j.button,initial:["hide",k],animate:k,variants:D,whileHover:"hover",whileTap:"pressed",...x,children:[O,T("span",{className:j.content,children:h}),G]})})})),Se={primary:"alert",secondary:"alert-secondary"},ke=e=>"indeterminate"===e,Me=e=>ke(e)?se:ie,Re=P.create(o),He={layoutVariant:"smooth",layoutSpeed:"3"},Te={layoutVariant:"veryBouncy",layoutSpeed:"4"},Le=x((function({id:t,checked:r,defaultChecked:n,onChange:o,label:l,labelPosition:d="start",variant:c="primary",size:u="md",reduceMotion:h,disabled:m,required:p,hasError:f,className:v,layerClassNames:b,...x},C){const w=V(),N=t??`uds-input-${w}`,S=y(null),k=void 0!==r,[M,R]=I(k?r:n),[L,E]=I(!1),[A,B]=I(!1),j=g((()=>f?Se[c]:c),[f,c]),$=!m&&L,O=!m&&A,G=g((()=>O?.9:$?1.1:1),[O,$]),D=g((()=>M?O?"opacity-55":"opacity-100":"opacity-0"),[M,O]),q=g((()=>({scale:G})),[G]),F=g((()=>A?Te:He),[A]),X=z((e=>{o?.(e),k||R(e.target.checked)}),[k,o]),Y=z((()=>{E(!0)}),[]),K=z((()=>{E(!1)}),[]),U=z((()=>{B(!0)}),[]),Z=z((()=>{B(!1)}),[]),J=e=>{S.current&&(S.current.indeterminate=ke(e))},Q=h?"always":"user",ee=W()||h?"duration-0":"duration-120";_((()=>{k&&R(r)}),[r,k]),_((()=>{J(M)}),[M]);const ae=ke(M)?"indeterminate":M?"checked":"unchecked",te={root:e({checkboxSizeRoot:u,checkboxVariantRoot:j,checkboxVariantValueRoot:ae,display:"flex",flexDirection:"start"===d?"row":"row-reverse",alignItems:"center",className:a({"cursor-pointer":!m,"cursor-default":m,"opacity-50":m},v,b?.root)}),checkbox:e({checkboxSizeCheckbox:u,checkboxVariantCheckbox:j,checkboxVariantValueCheckbox:ae,className:a("border","rounded-[4px]","uds-ring","uds-ring-within",ee,"transition-[background-color,border-color,box-shadow]",b?.checkbox)}),check:e({checkboxVariantCheckboxIcon:j,checkboxVariantValueCheckboxIcon:ae,className:a("pointer-events-none",D,ee,"transition-opacity")}),htmlCheckbox:a("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%]"),label:a("start"===d?"text-start":"text-end",b?.label)},re=l?P.label:P.div;return T(ze,{reducedMotion:Q,...F,children:H(re,{className:te.root,"data-testid":"container",onHoverStart:Y,onHoverEnd:K,onTapStart:U,onTap:Z,onTapCancel:Z,tabIndex:-1,children:[H(Re,{position:"relative",className:te.checkbox,alignItems:"center",justifyContent:"center",flex:"none",animate:q,children:[T("input",{type:"checkbox",...x,ref:e=>{S.current=e,J(M),"function"==typeof C?C(e):null!==C&&(C.current=e)},id:N,disabled:m,required:p,"aria-invalid":f,checked:k?!ke(M)&&M:void 0,defaultChecked:k?void 0:n,onChange:X,className:te.htmlCheckbox}),T(i,{name:Me(M),size:"sm",className:te.check})]}),l&&T(s,{as:"div",variant:"inherit",color:"inherit",required:p,label:l,className:te.label})]})})}));Le.displayName="Checkbox";var Ee="primary",Ae=x((function({size:n="md",minWidth:i,maxWidth:o=200,startIcon:s,endIcon:d,as:c="div",reduceMotion:u,disabled:h=!1,className:m,layerClassNames:p,children:f,...v},b){const x=W()||u?"duration-0":"duration-120",y=g((()=>({root:e({chipSizeRoot:n,className:a({"pointer-events-none":h,"cursor-default":h,"opacity-50":h},"focus-visible:-outline-offset-2","uds-ring",x,"transition-[background-color,outline-color,box-shadow]",p?.root,m)}),icon:p?.icon})),[m,x,h,p?.icon,p?.root,n]);return T(t,{asChild:!0,ref:b,display:"inline-flex",alignItems:"center",style:{maxWidth:`${o}px`,...i?{minWidth:`${i}px`}:{}},className:y.root,...v,children:H(c,{disabled:h,children:[s&&T(r,{icon:s,iconProps:{variant:"fill",size:"sm",className:y.icon},"data-testid":"start-icon"}),T(l,{as:"span",className:"truncate whitespace-nowrap",flex:"1",textAlign:"center",color:"current",variant:"inherit",children:f}),d&&T(r,{icon:d,iconProps:{variant:"fill",size:"sm",className:y.icon},"data-testid":"end-icon"})]})})}));Ae.displayName="ChipBase";var Pe=x((function({variant:a=Ee,...t},r){const n=g((()=>({root:e({chipLinkVariantRoot:a}),icon:e({chipLinkVariantIcon:a})})),[a]);return T(Ae,{as:"button",ref:r,variant:a,layerClassNames:n,...t})}));Pe.displayName="ChipButton";var We=n(),Be=x((function({className:a,asChild:t,onPress:r,onClick:n=r,backgroundColor:i,borderRadius:o,borderTopStartRadius:s,borderTopEndRadius:l,borderBottomStartRadius:d,borderBottomEndRadius:c,borderColor:u,borderStartColor:h,borderEndColor:m,borderTopColor:p,borderBottomColor:f,borderWidth:v,borderVerticalWidth:b,borderHorizontalWidth:x,borderStartWidth:g,borderEndWidth:y,borderTopWidth:C,borderBottomWidth:w,alignContent:N,alignItems:V,alignSelf:I,flex:z,flexDirection:_,flexGrow:S,flexShrink:k,flexWrap:M,justifyContent:R,flexBasis:H,display:L,overflow:E,overflowX:A,overflowY:P,position:W,spacing:B,spacingHorizontal:j,spacingVertical:$,spacingBottom:O,spacingEnd:G,spacingStart:D,spacingTop:q,offset:F,offsetVertical:X,offsetHorizontal:Y,offsetBottom:K,offsetEnd:U,offsetStart:Z,offsetTop:J,columnGap:Q,rowGap:ee,dropShadow:ae,insetShadow:te,...re},ne){const ie=e({backgroundColor:i,borderRadius:o,borderTopStartRadius:s,borderTopEndRadius:l,borderBottomStartRadius:d,borderBottomEndRadius:c,borderColor:u,borderStartColor:h,borderEndColor:m,borderTopColor:p,borderBottomColor:f,borderWidth:v,borderVerticalWidth:b,borderHorizontalWidth:x,borderStartWidth:g,borderEndWidth:y,borderTopWidth:C,borderBottomWidth:w,alignContent:N,alignItems:V,alignSelf:I,flex:z,flexDirection:_,flexGrow:S,flexShrink:k,flexWrap:M,justifyContent:R,flexBasis:H,display:L,overflow:E,overflowX:A,overflowY:P,position:W,spacing:B,spacingHorizontal:j,spacingVertical:$,spacingBottom:O,spacingEnd:G,spacingStart:D,spacingTop:q,offset:F,offsetVertical:X,offsetHorizontal:Y,offsetBottom:K,offsetEnd:U,offsetStart:Z,offsetTop:J,columnGap:Q,rowGap:ee,dropShadow:ae,insetShadow:te,className:a});return T(t?We:"button",{className:ie,ref:ne,onClick:n,...re})})),je=x((function({dismissButtonAriaLabel:t,onDismiss:n,dismissIcon:i,variant:o=Ee,disabled:s,...l},d){const c=g((()=>({root:e({chipDismissibleVariantRoot:o}),icon:e({chipDismissibleVariantIcon:o})})),[o]),u=z((e=>{e.stopPropagation(),n?.()}),[n]),h={icon:a("uds-chip-dismissible-button","uds-hit-target")};return T(Ae,{ref:d,variant:o,disabled:s,tabIndex:-1,endIcon:e=>T(Be,{"aria-label":t,className:h.icon,onClick:u,disabled:s,children:T(r,{icon:i??oe,iconProps:e,"data-testid":"dismiss-icon"})}),layerClassNames:c,...l})}));je.displayName="ChipDismissible";var $e=x((function({variant:a=Ee,href:t,disabled:r,...n},i){const o=g((()=>({root:e({chipLinkVariantRoot:a}),icon:e({chipLinkVariantIcon:a})})),[a]);return T(Ae,{as:"a",ref:i,variant:a,disabled:r,layerClassNames:o,...{...n,href:r?void 0:t}})}));$e.displayName="ChipLink";var Oe=x((function({isToggled:a=!1,onToggle:t,onClick:r,variant:n=Ee,...i},o){const s=g((()=>({root:e({chipToggleVariantRoot:n,chipToggleVariantActiveRoot:a?"on":"off"}),icon:e({chipToggleVariantIcon:n})})),[a,n]),l=z((e=>{t?.(!a),r?.(e)}),[a,r,t]);return T(Ae,{ref:o,as:"button",variant:n,onClick:l,"aria-pressed":a,layerClassNames:s,...i})}));Oe.displayName="ChipToggle";var Ge=x((function({onClick:e,href:a,linkProps:t,onDismiss:r,onToggle:n,isToggled:i,...o},s){return r?T(je,{ref:s,onDismiss:r,...o}):n?T(Oe,{ref:s,onToggle:n,isToggled:i,...o}):a?T($e,{ref:s,href:a,...o,...t}):T(Pe,{ref:s,onClick:e,...o})}));Ge.displayName="Chip";var De=x((function({variant:t,size:r,iconVariant:n,loading:o,disableEffects:s,name:l,type:d="button",htmlName:c,className:u,children:h,...p},f){const v=y(null);C(f,(()=>v.current));const{palette:b,variant:x}=m({flatVariant:t}),w=g((()=>({button:e({buttonVariant:x,buttonPalette:b,iconButtonSize:r,className:a("uds-icon-button","uds-button","uds-ring","uds-hit-target",o&&"uds-button-loading",s&&"uds-button-without-effects",u)}),loading:"uds-button-icon start-content animate-spin",icon:"uds-button-icon start-content"})),[b,x,u,s,r,o]),N=W(),V=g((()=>N?"smooth":"subtle"),[N]),I=g((()=>{const{rest:e,hover:a,pressed:t}=we;return s?{rest:{},hover:{},pressed:{}}:{rest:e,hover:a,pressed:t}}),[s]);return T(ze,{layoutSpeed:"3",layoutVariant:V,reducedMotion:s?"always":"user",children:T(P.button,{ref:v,type:d,className:w.button,initial:"icon",variants:I,whileHover:"hover",whileTap:"pressed",name:c,...p,children:H(B,{initial:!1,mode:"popLayout",children:[o&&T(P.span,{variants:ge,initial:"loading",animate:"loading",exit:"hide",children:T(i,{size:E,name:de,variant:n,color:"current",className:w.loading})},"loading"),l&&!o&&T(P.span,{variants:xe,initial:"icon",animate:"icon",exit:"hide",children:h||T(i,{size:E,name:l,variant:n,color:"current",className:w.icon})},l.name)]})})})})),qe=({children:e,reduceMotion:a,layoutVariant:t})=>{const r=y(null),[n,i]=I("auto");return _((()=>{if(r.current){const e=new ResizeObserver((e=>{i(e[0].contentRect.height)}));return e.observe(r.current),()=>{e.disconnect()}}}),[]),T(ze,{reducedMotion:a,layoutSpeed:"4",layoutVariant:t,children:T(P.div,{className:"overflow-hidden",style:{height:n,opacity:0},animate:{height:n,opacity:1},children:T("div",{ref:r,children:e})})})},Fe=S((function({helpText:e,helperTextIcon:a,spacingStart:t,spacingTop:r,size:n,isFilled:i,...s}){return e?T(o,{spacingTop:r,spacingStart:t,...s,children:T(d,{startIcon:a,size:n,isFilled:i,children:O(e)?e():e})}):null})),Xe=S((function({icon:e,className:a}){return e?T(r,{icon:e,iconProps:{variant:"outline"},className:a}):null})),Ye=S((function({icon:e,className:a}){if(!e)return null;return T(r,{icon:e,iconProps:{variant:"outline"},"data-testid":"end-icon",className:a})})),Ke=x((function({id:r,label:n,type:i="text",size:s="md",startIcon:l,endIcon:d,helpText:u,helperTextIcon:h,hasError:m,width:p="full",defaultValue:f,required:v,readOnly:b,disabled:x,reduceMotion:g,onChange:w,className:N,..._},S){const k=V(),M=r??`uds-input-${k}`,R=`uds-input-${M}-help-text`,L=y(null);C(S,(()=>L.current));const[E,A]=I(f??""),P=z((e=>{A(e.target.value),w?.(e)}),[w]),B=W()?"smooth":"bouncy",j=g?"always":"user",$=!b&&!x,G={root:e({inputSizeRoot:s,inputVariantRoot:"default",inputVariantValueRoot:E?"filled":"empty",className:a([N,x?"opacity-50":""])}),inputWrapper:e({inputSizeInputWrapper:s,inputVariantInputWrapper:"default",inputVariantValueInputWrapper:E?"filled":"empty",className:"min-w-[200px]"}),input:e({inputSizeInput:s,inputVariantInput:"default",inputVariantValueInput:E?"filled":"empty",inputVariantInputPlaceholder:"default",inputVariantValueInputPlaceholder:E?"filled":"empty",className:a("grow","uds-hit-target","bg-clip-text","focus:outline-none",$?"cursor-text":"cursor-not-allowed")}),label:e({inputSizeLabel:s,inputVariantLabel:"default",inputVariantValueLabel:E?"filled":"empty"}),labelRequired:e({inputVariantLabelRequired:"default",inputVariantValueLabelRequired:E?"filled":"empty"}),startIcon:e({inputSizeStartIcon:s,inputVariantStartIcon:"default",inputVariantValueStartIcon:E?"filled":"empty"}),endIcon:e({inputSizeEndIcon:s,inputVariantEndIcon:"default",inputVariantValueEndIcon:E?"filled":"empty"})};return H(c,{width:p,className:G.root,children:[n&&H(o,{spacingBottom:"2",columnGap:"0.5",alignItems:"flex-end",className:G.label,children:[T("label",{htmlFor:M,children:O(n)?n():n}),v&&T("span",{className:G.labelRequired,children:"*"})]}),H(o,{position:"relative",alignItems:"center",className:G.inputWrapper,children:[T(Xe,{icon:l,className:G.startIcon}),T("input",{ref:L,id:M,type:i,value:E,required:v,readOnly:b,disabled:x,"aria-describedby":R,"aria-invalid":m,onChange:P,className:G.input,..._}),d&&T(t,{alignItems:"center",gap:"1",children:T(Ye,{icon:d,className:G.endIcon})})]}),T(qe,{reduceMotion:j,layoutVariant:B,children:T(Fe,{id:R,helpText:u,spacingTop:"2",size:s,isFilled:!!E,helperTextIcon:h})})]})}));Ke.displayName="Input";var Ue={};function Ze(e){return e}function Je(e,a){const t=e.__unstableInternals;return function(e,a){if(!e)throw new Error(a)}(t,"Invalid store"),t[a]}v(Ue,{Content:()=>oa,Divider:()=>sa,Item:()=>ua,ItemCheckbox:()=>ha,Provider:()=>fa,Trigger:()=>va,useMenuContext:()=>D,useMenuStore:()=>G,useStoreState:()=>Z});var{useSyncExternalStore:Qe}=U;function ea(e,a=Ze){const t=b.useCallback((a=>e?function(e,...a){if(e)return Je(e,"subscribe")(...a)}(e,null,a):()=>{}),[e]),r=()=>{const t="string"==typeof a?a:null,r="function"==typeof a?a:null,n=null==e?void 0:e.getState();if(r)return r(n);var i,o;if(n&&(t&&(i=n,o=t,"function"==typeof Object.hasOwn?Object.hasOwn(i,o):Object.prototype.hasOwnProperty.call(i,o))))return n[t]};return Qe(t,r,r)}var aa=P.create(c),ta=5,ra=.97,na={top:{x:0,y:ta},bottom:{x:0,y:-5},left:{x:ta,y:0},right:{x:-5,y:0}},ia=e=>g((()=>((e="bottom")=>{const[a="top"]=e?.split("-");return{closed:{...na[a],opacity:0,scale:ra},open:{y:0,x:0,opacity:1,scale:1}}})(e)),[e]),oa=x((function({gap:e,spacing:t,spacingBottom:r,spacingEnd:n,spacingStart:i,spacingTop:o,gutter:s="1",backgroundColor:l="primary",borderRadius:d="md",borderColor:c,borderWidth:u="thin",overflow:h,dropShadow:m="lg",className:p,sameWidth:f,focusable:v,children:b,portalElement:x,portal:y=!0,disableAutoBorderRadius:C,...w},N){const V=D(),z=ea(V,"open"),S=ea(V,"mounted"),k=ea(V,"currentPlacement"),M=ea(V,"placement"),[R,H]=I(k),[L,E]=I(k);_((()=>{M!==L&&E(M)}),[M]),_((()=>{k!==L&&E(k)}),[k]),_((()=>{S&&L!==R&&H(L)}),[S,L,R]);const P=g((()=>z&&S?"open":"closed"),[z,S]),W=g((()=>z?m:"none"),[z,m]),j=ia(L),$=(({borderRadius:e,spacing:a})=>{if(void 0===a||"0"===a)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"===a||"0.5"===a)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"===a||"1.5"===a)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"===a||"2.5"===a)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"===a||"3.5"===a)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"===a)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:d,spacing:t}),O=g((()=>A[s]),[s]);return T(B,{initial:!1,children:T(q,{gutter:O,sameWidth:f,focusable:v,store:V,ref:N,portalElement:x,portal:y,...w,render:T(aa,{backgroundColor:l,gap:e,spacing:t,spacingBottom:r,spacingEnd:n,spacingStart:i,spacingTop:o,borderRadius:d,borderColor:c,borderWidth:u,overflow:h,animate:P,variants:j,dropShadow:W,className:a("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",!C&&$,p),children:b})})})})),sa=x((function({role:a="separator",contentPosition:t="start",gap:r="4",children:n,spacingVertical:i=(n?"2":"0"),spacingHorizontal:o=(n?"4":"0"),className:s,...l},d){const c={root:e({menuDividerVariantRoot:"default",className:s}),text:e({menuDividerVariantText:"default"})};return T(u,{ref:d,role:a,variant:"inherit",contentPosition:t,gap:r,spacingVertical:i,spacingHorizontal:o,className:c.root,layerClassNames:c,...l,children:n})}));sa.displayName="MenuDivider";var la="uds-menu-item",da={visible:{scale:1,opacity:1},hidden:{scale:.7,opacity:0}},ca=x((function({spacing:n="0",spacingBottom:i,spacingEnd:s,spacingHorizontal:l="4",spacingStart:d,spacingTop:c,spacingVertical:u="3.5",columnGap:h="2",className:m,children:p,endIcon:f,startIcon:v,hideEndIcon:b,active:x,disabled:y,as:C,rootProps:w,name:N,alignItems:V="center",justifyContent:I="space-between",layerClassNames:z,..._},S){const M=k.count(p)>1,R=(({active:e,disabled:t,className:r})=>a(la,"focus-visible:text-brand","focus-visible:bg-brand-secondary","focus-visible:z-10","uds-ring","!-outline-offset-2",e&&["[&:not([aria-checked])]:cursor-default"],t&&"opacity-25 cursor-not-allowed","duration-20 transition-[font-variation-settings] ease-in-out","z-0",r))({active:x,disabled:y,className:m}),L=e({className:a(`${la}-content truncate`,z?.text),textAlign:"start",...M&&{columnGap:h,display:"flex",alignItems:"center",width:"full",justifyContent:"space-between"}}),E=g((()=>({root:e({menuSizeRoot:"default",className:a(z?.root,R)}),startIcon:e({menuSizeStartIcon:"default",className:z?.startIcon}),endIcon:e({menuSizeEndIcon:"default",className:z?.endIcon})})),[z,R]);return T(o,{asChild:!0,spacing:n,spacingBottom:i,spacingEnd:s,spacingHorizontal:l,spacingStart:d,spacingTop:c,spacingVertical:u,columnGap:h,className:E.root,alignItems:V,justifyContent:I,children:H(C,{render:T(Be,{ref:S,..._}),name:N??"",disabled:y,...w,children:[H(t,{gap:h,alignItems:"center",width:"full",children:[T(B,{initial:!1,children:v&&T(P.span,{variants:da,initial:"hidden",animate:"visible",exit:"hidden",className:"uds-start-icon",children:T(r,{icon:v,className:E.startIcon,iconProps:{size:"sm",variant:x?"fill":"outline",color:"current"}})})}),T("span",{className:L,children:p})]}),T(B,{initial:!1,mode:"popLayout",children:!b&&f&&T(P.span,{variants:da,initial:"hidden",animate:"visible",exit:"hidden",className:"uds-end-icon",children:T(r,{icon:f,className:E.endIcon,iconProps:{size:"sm",variant:x?"fill":"outline",color:"current"}})})})]})})})),ua=x((function({active:a,...t},r){const n={root:e({menuItemVariantRoot:"default",menuItemVariantActiveRoot:a?"on":"off"}),text:e({menuItemVariantText:"default",menuItemVariantActiveText:a?"on":"off"}),startIcon:e({menuItemVariantIcon:"default",menuItemVariantActiveIcon:a?"on":"off"})};return T(ca,{ref:r,as:F,active:a,layerClassNames:n,...t})}));ua.displayName="MenuItem";var ha=x((function({name:t,endIcon:r=ie,checked:n,defaultChecked:i,className:o,...s},l){const d=t,c=y(!1),u=D(),h=Z(u);_((()=>{!c.current&&void 0!==i&&u&&(u.setValues((e=>({...e,[d]:i}))),c.current=!0)}),[u,i,d]);const m=g((()=>{if(void 0!==n)return n;if(h?.items?.length){const e=h?.items.find((e=>e.element?.name===d));if(e?.element)return e.element.checked}const e=h?.values[d];return"boolean"==typeof e?e:i??!1}),[h?.items,h?.values,d,n,i]),p=z((e=>{void 0===n&&u?.setValues((a=>({...a,[d]:e.target.checked})))}),[d,u,n]),f={root:e({menuItemCheckboxVariantRoot:"default",menuItemCheckboxVariantActiveRoot:m?"on":"off"}),text:e({menuItemCheckboxVariantText:"default",menuItemCheckboxVariantActiveText:m?"on":"off"}),startIcon:e({menuItemCheckboxVariantStartIcon:"default",menuItemCheckboxVariantActiveStartIcon:m?"on":"off"}),endIcon:e({menuItemCheckboxVariantEndIcon:"default",menuItemCheckboxVariantActiveEndIcon:m?"on":"off"})};return T(ca,{ref:l,as:X,hideEndIcon:!m,endIcon:r,active:m,className:a("uds-menu-item-checkbox",o),layerClassNames:f,rootProps:{name:t,onChange:p,defaultChecked:i,checked:void 0!==n?n:void 0},...s})}));ha.displayName="MenuItemCheckbox";var ma=()=>{if("undefined"==typeof document)return!1;return"rtl"===getComputedStyle(document.documentElement).direction},pa=e=>{const[a,t]=I(ma);return _((()=>{if(e?.explicit)return void t(e.explicit);const a=(e=>{const a=new MutationObserver((a=>{a.some((e=>"attributes"===e.type&&"dir"===e.attributeName))&&e()}));return a.observe(document.documentElement,{attributes:!0,attributeFilter:["dir"]}),a})((()=>{t(ma())}));return()=>a.disconnect()}),[e?.explicit]),a},fa=function({placement:e="bottom",rtl:a,...t}){const r=pa({explicit:a}),n=((e,a)=>{const t=a?.rtl;if("start"===e)return t?"right":"left";if("end"===e)return t?"left":"right";if(e?.includes("-")){const[a,r]=e.split("-");if(!("start"!==a&&"end"!==a||"top"!==r&&"bottom"!==r))return`${"start"===a?t?"right":"left":t?"left":"right"}-${"bottom"===r?"end":"start"}`;if("top"===a||"bottom"===a)return`${a}-${"start"===r?t?"end":"start":t?"start":"end"}`}return e})(e,{rtl:r});return T(ze,{children:T(Y,{placement:n,rtl:r,...t})})},va=x((function({asChild:e,className:t,...r},n){const i=y(null),s=e?T(o,{ref:i,className:"uds-ring h-fit w-fit"}):void 0,l=z((()=>{const e=i.current?.firstChild;e instanceof HTMLElement&&"function"==typeof e.focus&&e.focus()}),[i]);return T(K,{onFocus:l,onFocusVisible:l,ref:n,render:s,className:a("uds-menu-trigger",t),...r})})),ba=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((a=>a(e)))}static findOrCreate(a,t){let r=a.get(t);return r||(r=new e(t),a.set(t,r)),r}},xa=M(new Map),ga=e=>{const a=V();return e??`uds-radio-group-${a}`},ya={primary:"alert",secondary:"alert-secondary"},Ca=P.create(o),wa={layoutVariant:"smooth",layoutSpeed:"3"},Na={layoutVariant:"veryBouncy",layoutSpeed:"4"},Va=x((function({id:t,name:r,label:n,labelPosition:i="start",variant:l="primary",size:d="md",reduceMotion:c,value:u="",checked:h,defaultChecked:m,disabled:p,hasError:f,onChange:v,onFocus:b,onBlur:x,className:C,layerClassNames:w,...N},S){const k=V(),M=t??`uds-radio-${k}`,L=y(null),{name:E,isControlled:A,checked:B,setGroupValue:j}=(({name:e,value:a,checked:t,defaultChecked:r})=>{const n=R(xa),i=n instanceof ba,o=void 0!==t||i,s=ga(e),l=g((()=>i?n:ba.findOrCreate(n,s)),[n,i,s]),[d,c]=I(l.value),u=l.name??s,h=z((e=>{l.setValue(e),o||c(e)}),[o,l]);return _((()=>l.onChange(c)),[l]),_((()=>{!0===t&&h(a)}),[t,a,h]),_((()=>{if(i)return;const e=ba.findOrCreate(n,u);return e.activeCount+=1,n.set(u,e),()=>{const e=n.get(u);e&&(e.activeCount-=1,0===e.activeCount&&n.delete(u))}}),[n,i,u]),{name:u,isControlled:o,checked:o&&!i?t:void 0!==d?a===d:r??!1,setGroupValue:h}})({name:r,value:u,checked:h,defaultChecked:m}),[$,O]=I(!1),[G,D]=I(!1),q=g((()=>f?ya[l]:l),[f,l]),F=g((()=>!p&&$),[p,$]),X=g((()=>!p&&!B&&G),[B,p,G]),Y=g((()=>X?.9:F?1.1:1),[F,X]),K=g((()=>B?X?"opacity-55":"opacity-100":"opacity-0"),[B,X]),U=g((()=>!p&&(X&&!B||F&&B)),[B,p,F,X]),Z=g((()=>({scale:Y})),[Y]),J=g((()=>G?Na:wa),[G]),Q=z((e=>{j(e.target.value),v?.(e)}),[v,j]),ee=z((e=>{b?.(e)}),[b]),ae=z((e=>{x?.(e)}),[x]),te=z((()=>{O(!0)}),[]),re=z((()=>{O(!1)}),[]),ne=z((()=>{D(!0)}),[]),ie=z((()=>{D(!1)}),[]),oe=c?"always":"user",se=W()||c?"duration-0":"duration-120",le={root:e({radioSizeRoot:d,radioVariantValueRoot:B?"checked":"unchecked",radioVariantRoot:q,display:"flex",flexDirection:"start"===i?"row":"row-reverse",alignItems:"center",className:a([{"cursor-pointer":!p,"cursor-default":p,"opacity-50":p},C,w?.root])}),radio:e({radioSizeRadio:d,radioVariantRadio:q,radioVariantValueRadio:B?"checked":"unchecked",className:a(["border","uds-ring","uds-ring-within",se,"transition-[background-color,border-color]","transition-shadow",w?.radio])}),radioCircle:e({radioVariantRadioCircle:q,radioVariantValueRadioCircle:B?"checked":"unchecked",className:a(["pointer-events-none","w-[8px]","h-[8px]",K,se,"transition-opacity"])}),htmlRadio:a("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%]"),label:a("start"===i?"text-start":"text-end",w?.label)},de=n?P.label:P.div;return T(ze,{reducedMotion:oe,...J,children:H(de,{className:le.root,"data-testid":"container",onHoverStart:te,onHoverEnd:re,onTapStart:ne,onTap:ie,onTapCancel:ie,tabIndex:-1,children:[H(Ca,{position:"relative",borderRadius:"full",alignItems:"center",justifyContent:"center",flex:"none",className:le.radio,animate:Z,insetShadow:U?"lg-invert":"none",children:[T("input",{type:"radio",...N,ref:e=>{L.current=e,"function"==typeof S?S(e):null!==S&&(S.current=e)},onFocus:ee,onBlur:ae,id:M,name:E,value:u,disabled:p,"aria-invalid":f,onChange:Q,...A?{checked:B}:{defaultChecked:m},className:le.htmlRadio}),T(o,{borderRadius:"full",className:le.radioCircle})]}),n&&T(s,{as:"div",variant:"inherit",color:"inherit",label:n,className:le.label})]})})}));Va.displayName="Radio";var Ia=n(),za=class extends ba{onChangeCb;isControlled;constructor(e,a){super(e),this.isControlled=a}setValue(e,a=!1){this.isControlled&&!a?this.onChangeCb?.(e):super.setValue(e)}},_a=x((function({asChild:e,name:a,value:t,defaultValue:r,onChange:n,...i},o){const s=void 0!==t,l=ga(a),d=g((()=>{const e=new za(l,s);return e.value=s?t:r,e}),[r,s,l,t]);_((()=>{d.onChangeCb=n}),[n,d]),_((()=>{s&&d.setValue(t,!0)}),[s,d,t]),_((()=>d.onChange((e=>n?.(e)))),[n,d]);const c=e?Ia:"div";return T(xa.Provider,{value:d,children:T(c,{role:"radiogroup",ref:o,...i})})}));_a.displayName="RadioGroupProvider";var Sa={md:{isOnX:20},sm:{isOnX:12}},ka=P.create(o),Ma={layoutVariant:"bouncy",layoutSpeed:"4"},Ra=x((function({id:t,isOn:n,defaultIsOn:i,onChange:l,label:d,labelPosition:c="start",size:u="md",onIcon:h,offIcon:m,reduceMotion:p,disabled:f,required:v,onFocus:b,onBlur:x,className:C,layerClassNames:w,...N},S){const k=V(),M=t??`uds-input-${k}`,R=y(null),L=void 0!==n,[E,A]=I(L?n:i),[B,j]=I(!1),$=g((()=>!f&&B),[f,B]),{isOnX:O}=Sa[u],G=g((()=>({initial:{scale:1,x:E?O:0},animate:{scale:$?1.05:1,x:E?O:0}})),[$,E,O]),D=z((e=>{l?.(e),L||A(e.target.checked)}),[L,l]),q=z((e=>{b?.(e)}),[b]),F=z((e=>{x?.(e)}),[x]),X=z((()=>{j(!0)}),[]),Y=z((()=>{j(!1)}),[]),K=p?"always":"user",U=W()||p?"duration-0":"duration-120";_((()=>{L&&A(n)}),[n,L]);const Z={root:e({switchSizeRoot:u,switchVariantRoot:"default",switchVariantActiveRoot:E?"on":"off",display:"flex",flexDirection:"start"===c?"row":"row-reverse",alignItems:"center",className:a("group",{"cursor-pointer":!f,"cursor-default":f,"opacity-50":f},w?.root,C)}),switch:e({switchVariantSwitch:"default",switchSizeSwitch:u,switchVariantActiveSwitch:E?"on":"off",borderRadius:"full",position:"relative",alignItems:"center",className:a("uds-ring","uds-ring-within",U,"transition-[background-color,box-shadow]",w?.switch)}),handle:e({switchSizeHandle:u,className:a("relative","pointer-events-none","rounded-full","overflow-hidden",w?.handle)}),handleCircle:e({switchVariantActiveHandle:E?"on":"off",switchVariantHandle:"default",className:a("absolute","top-0","left-0","right-0","bottom-0","opacity-95 group-hover:opacity-100",U,"transition-[background-color,box-shadow,opacity]")}),handleIcon:e({switchSizeHandleIcon:u,switchVariantHandleIcon:"default",switchVariantActiveHandleIcon:E?"on":"off",className:a("absolute","opacity-0","top-1/2","left-1/2","transform","translate-x-[-50%]","translate-y-[-50%]",U,"transition-opacity")}),htmlCheckbox:a("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%]"),label:a("start"===c?"text-start":"text-end",w?.label)},J=d?P.label:P.div;return T(ze,{reducedMotion:K,...Ma,children:H(J,{className:Z.root,"data-testid":"container",onHoverStart:X,onHoverEnd:Y,tabIndex:-1,children:[H(ka,{className:Z.switch,children:[T("input",{type:"checkbox",...N,ref:e=>{R.current=e,"function"==typeof S?S(e):null!==S&&(S.current=e)},onFocus:q,onBlur:F,id:M,disabled:f,required:v,checked:L?E:void 0,defaultChecked:L?void 0:i,onChange:D,className:Z.htmlCheckbox,style:{}}),H(ka,{className:Z.handle,...G,children:[T(o,{className:Z.handleCircle}),h&&T(r,{icon:h,iconProps:{variant:"fill",size:"sm"},"data-testid":"on-icon",className:a(Z.handleIcon,E?"opacity-100":"opacity-0")}),m&&T(r,{icon:m,iconProps:{variant:"fill",size:"sm"},"data-testid":"off-icon",className:a(Z.handleIcon,E?"opacity-0":"opacity-100")})]})]}),d&&T(s,{as:"div",variant:"inherit",color:"inherit",required:v,label:d,className:Z.label})]})})}));Ra.displayName="Switch";
4
+ /*! © 2025 Yahoo, Inc. UDS v0.0.0-development */export{pe as Avatar,ue as AvatarIcon,me as AvatarImage,he as AvatarText,fe as Badge,_e as Button,Le as Checkbox,Ge as Chip,Pe as ChipButton,je as ChipDismissible,$e as ChipLink,Oe as ChipToggle,De as IconButton,Ke as Input,Ue as Menu,Be as Pressable,Va as Radio,_a as RadioGroupProvider,ze as SpringMotionConfig,Ra as Switch};
@@ -1,17 +1,23 @@
1
1
  import * as properties from '@yahoo/uds/fixtures';
2
2
  import { d as ShadowPreset, U as UniversalTokensConfig } from './types-B_jakWRK.js';
3
3
 
4
+ type DispatchContext = {
5
+ componentName: string;
6
+ subComponentName?: string;
7
+ propertyKey: string;
8
+ layer: string;
9
+ };
4
10
  interface ConfigurableProperty<T extends AllPossibleProperties, CVR = unknown> {
5
11
  name: string;
6
12
  cssProperties: string | string[];
7
13
  twThemePath: (selected: T, value: string) => string;
8
14
  possibleFixtures: T[];
9
- extendedProperties?: ConfigurablePropertiesName[];
10
- customValueRenderer?: (schemaStateValue: SchemaStateValue<CVR>, schema: unknown) => string;
15
+ extendedProperties?: ExtendablePropertiesName[] | ((context: DispatchContext) => ExtendablePropertiesName[] | undefined | false);
16
+ customValueRenderer?: (schemaStateValue: SchemaStateValue<CVR>, schema: unknown, themeGetter: (path: string) => string) => string;
11
17
  concatenate?: boolean;
12
18
  concatenationDelimiter?: string;
13
19
  }
14
- declare const configurableProperties: {
20
+ declare const publicProperties: {
15
21
  readonly backgroundColor: ConfigurableProperty<"backgroundPaletteColors" | "spectrumColors" | "alwaysPaletteAliases", unknown>;
16
22
  readonly borderWidth: ConfigurableProperty<"spacingAliases" | "borderWidths", unknown>;
17
23
  readonly borderRadius: ConfigurableProperty<"borderRadii", unknown>;
@@ -33,8 +39,35 @@ declare const configurableProperties: {
33
39
  readonly height: ConfigurableProperty<"spacingAliases", unknown>;
34
40
  readonly width: ConfigurableProperty<"spacingAliases", unknown>;
35
41
  };
36
- type ConfigurablePropertiesName = keyof typeof configurableProperties;
37
- interface SelectedConfigurableProperty<C extends ConfigurablePropertiesName, O extends string, T extends (typeof configurableProperties)[C]['possibleFixtures'] = (typeof configurableProperties)[C]['possibleFixtures'], V extends readonly (readonly string[])[] = readonly (readonly string[])[]> {
42
+ declare const configurableProperties: {
43
+ outlineWidth: ConfigurableProperty<"spacingAliases" | "borderWidths", unknown>;
44
+ outlineColor: ConfigurableProperty<"linePaletteColors" | "spectrumColors" | "alwaysPaletteAliases", unknown>;
45
+ insetOutlineOffset: ConfigurableProperty<"spacingAliases" | "borderWidths", unknown>;
46
+ solidOutline: ConfigurableProperty<never, unknown>;
47
+ backgroundColor: ConfigurableProperty<"backgroundPaletteColors" | "spectrumColors" | "alwaysPaletteAliases", unknown>;
48
+ borderWidth: ConfigurableProperty<"spacingAliases" | "borderWidths", unknown>;
49
+ borderRadius: ConfigurableProperty<"borderRadii", unknown>;
50
+ borderColor: ConfigurableProperty<"linePaletteColors" | "spectrumColors" | "alwaysPaletteAliases", unknown>;
51
+ fontFamily: ConfigurableProperty<"textVariants", unknown>;
52
+ fontSize: ConfigurableProperty<"textVariants", unknown>;
53
+ lineHeight: ConfigurableProperty<"textVariants", unknown>;
54
+ textTransform: ConfigurableProperty<"textVariants", unknown>;
55
+ padding: ConfigurableProperty<"spacingAliases", unknown>;
56
+ gap: ConfigurableProperty<"spacingAliases", unknown>;
57
+ color: ConfigurableProperty<"foregroundPaletteColors" | "spectrumColors" | "alwaysPaletteAliases", unknown>;
58
+ fontWeight: ConfigurableProperty<"textVariants", unknown>;
59
+ iconSize: ConfigurableProperty<"iconSizes", unknown>;
60
+ spacingHorizontal: ConfigurableProperty<"spacingAliases", unknown>;
61
+ spacingVertical: ConfigurableProperty<"spacingAliases", unknown>;
62
+ textVariant: ConfigurableProperty<"textVariants", unknown>;
63
+ shadow: ConfigurableProperty<"shadowVariants", string | [] | [ShadowPreset] | [ShadowPreset, ShadowPreset] | [ShadowPreset, ShadowPreset, ShadowPreset]>;
64
+ insetShadow: ConfigurableProperty<"shadowVariantsWithInvert", string | [] | [ShadowPreset] | [ShadowPreset, ShadowPreset] | [ShadowPreset, ShadowPreset, ShadowPreset]>;
65
+ height: ConfigurableProperty<"spacingAliases", unknown>;
66
+ width: ConfigurableProperty<"spacingAliases", unknown>;
67
+ };
68
+ type ExtendablePropertiesName = keyof typeof configurableProperties;
69
+ type ConfigurablePropertiesName = keyof typeof publicProperties;
70
+ interface SelectedConfigurableProperty<C extends ConfigurablePropertiesName, O extends string, T extends (typeof publicProperties)[C]['possibleFixtures'] = (typeof publicProperties)[C]['possibleFixtures'], V extends readonly (readonly string[])[] = readonly (readonly string[])[]> {
38
71
  label: string;
39
72
  name: C;
40
73
  typeOfFixture: T;
@@ -205,4 +238,4 @@ declare function createSubComponentConfig(config: {
205
238
  variants: Record<string, VariantConfigWithProperties | VariantConfigWithComponentStates>;
206
239
  }): SubComponentConfig;
207
240
 
208
- export { type AllPossibleProperties as A, type ConfigurablePropertiesName as C, type LayerConfig as L, type PossibleStates as P, type SelectedConfigurableProperty as S, type VariantConfig as V, type PossibleStatesWithRest as a, type ComponentStateConfig as b, configurableProperties as c, type SubComponentConfig as d, type VariantConfigWithProperties as e, type VariantConfigWithComponentStates as f, type ComponentConfig as g, type AutoComponents as h, type AutoComponentName as i, type AllVariantKeys as j, type SchemaStateValue as k, findFixtureType as l, generateClassName as m, generateDeclaration as n, generateStyles as o, createConfigurableProperty as p, createVariantConfig as q, createComponentStateConfig as r, statePseudoMapDocsMode as s, toMinimalDbConfigObject as t, createVariantConfigWithProperties as u, createVariantConfigWithComponentStates as v, createComponentStates as w, createLayerConfig as x, createSubComponentConfig as y };
241
+ export { type AllPossibleProperties as A, type ConfigurablePropertiesName as C, type ExtendablePropertiesName as E, type LayerConfig as L, type PossibleStates as P, type SelectedConfigurableProperty as S, type VariantConfig as V, type PossibleStatesWithRest as a, type ComponentStateConfig as b, configurableProperties as c, type SubComponentConfig as d, type VariantConfigWithProperties as e, type VariantConfigWithComponentStates as f, type ComponentConfig as g, type AutoComponents as h, type AutoComponentName as i, type AllVariantKeys as j, type SchemaStateValue as k, findFixtureType as l, generateClassName as m, generateDeclaration as n, generateStyles as o, createConfigurableProperty as p, createVariantConfig as q, createComponentStateConfig as r, statePseudoMapDocsMode as s, toMinimalDbConfigObject as t, createVariantConfigWithProperties as u, createVariantConfigWithComponentStates as v, createComponentStates as w, createLayerConfig as x, createSubComponentConfig as y };
@@ -1,17 +1,23 @@
1
1
  import * as properties from '@yahoo/uds/fixtures';
2
2
  import { d as ShadowPreset, U as UniversalTokensConfig } from './types-DE_O6y5z.cjs';
3
3
 
4
+ type DispatchContext = {
5
+ componentName: string;
6
+ subComponentName?: string;
7
+ propertyKey: string;
8
+ layer: string;
9
+ };
4
10
  interface ConfigurableProperty<T extends AllPossibleProperties, CVR = unknown> {
5
11
  name: string;
6
12
  cssProperties: string | string[];
7
13
  twThemePath: (selected: T, value: string) => string;
8
14
  possibleFixtures: T[];
9
- extendedProperties?: ConfigurablePropertiesName[];
10
- customValueRenderer?: (schemaStateValue: SchemaStateValue<CVR>, schema: unknown) => string;
15
+ extendedProperties?: ExtendablePropertiesName[] | ((context: DispatchContext) => ExtendablePropertiesName[] | undefined | false);
16
+ customValueRenderer?: (schemaStateValue: SchemaStateValue<CVR>, schema: unknown, themeGetter: (path: string) => string) => string;
11
17
  concatenate?: boolean;
12
18
  concatenationDelimiter?: string;
13
19
  }
14
- declare const configurableProperties: {
20
+ declare const publicProperties: {
15
21
  readonly backgroundColor: ConfigurableProperty<"backgroundPaletteColors" | "spectrumColors" | "alwaysPaletteAliases", unknown>;
16
22
  readonly borderWidth: ConfigurableProperty<"spacingAliases" | "borderWidths", unknown>;
17
23
  readonly borderRadius: ConfigurableProperty<"borderRadii", unknown>;
@@ -33,8 +39,35 @@ declare const configurableProperties: {
33
39
  readonly height: ConfigurableProperty<"spacingAliases", unknown>;
34
40
  readonly width: ConfigurableProperty<"spacingAliases", unknown>;
35
41
  };
36
- type ConfigurablePropertiesName = keyof typeof configurableProperties;
37
- interface SelectedConfigurableProperty<C extends ConfigurablePropertiesName, O extends string, T extends (typeof configurableProperties)[C]['possibleFixtures'] = (typeof configurableProperties)[C]['possibleFixtures'], V extends readonly (readonly string[])[] = readonly (readonly string[])[]> {
42
+ declare const configurableProperties: {
43
+ outlineWidth: ConfigurableProperty<"spacingAliases" | "borderWidths", unknown>;
44
+ outlineColor: ConfigurableProperty<"linePaletteColors" | "spectrumColors" | "alwaysPaletteAliases", unknown>;
45
+ insetOutlineOffset: ConfigurableProperty<"spacingAliases" | "borderWidths", unknown>;
46
+ solidOutline: ConfigurableProperty<never, unknown>;
47
+ backgroundColor: ConfigurableProperty<"backgroundPaletteColors" | "spectrumColors" | "alwaysPaletteAliases", unknown>;
48
+ borderWidth: ConfigurableProperty<"spacingAliases" | "borderWidths", unknown>;
49
+ borderRadius: ConfigurableProperty<"borderRadii", unknown>;
50
+ borderColor: ConfigurableProperty<"linePaletteColors" | "spectrumColors" | "alwaysPaletteAliases", unknown>;
51
+ fontFamily: ConfigurableProperty<"textVariants", unknown>;
52
+ fontSize: ConfigurableProperty<"textVariants", unknown>;
53
+ lineHeight: ConfigurableProperty<"textVariants", unknown>;
54
+ textTransform: ConfigurableProperty<"textVariants", unknown>;
55
+ padding: ConfigurableProperty<"spacingAliases", unknown>;
56
+ gap: ConfigurableProperty<"spacingAliases", unknown>;
57
+ color: ConfigurableProperty<"foregroundPaletteColors" | "spectrumColors" | "alwaysPaletteAliases", unknown>;
58
+ fontWeight: ConfigurableProperty<"textVariants", unknown>;
59
+ iconSize: ConfigurableProperty<"iconSizes", unknown>;
60
+ spacingHorizontal: ConfigurableProperty<"spacingAliases", unknown>;
61
+ spacingVertical: ConfigurableProperty<"spacingAliases", unknown>;
62
+ textVariant: ConfigurableProperty<"textVariants", unknown>;
63
+ shadow: ConfigurableProperty<"shadowVariants", string | [] | [ShadowPreset] | [ShadowPreset, ShadowPreset] | [ShadowPreset, ShadowPreset, ShadowPreset]>;
64
+ insetShadow: ConfigurableProperty<"shadowVariantsWithInvert", string | [] | [ShadowPreset] | [ShadowPreset, ShadowPreset] | [ShadowPreset, ShadowPreset, ShadowPreset]>;
65
+ height: ConfigurableProperty<"spacingAliases", unknown>;
66
+ width: ConfigurableProperty<"spacingAliases", unknown>;
67
+ };
68
+ type ExtendablePropertiesName = keyof typeof configurableProperties;
69
+ type ConfigurablePropertiesName = keyof typeof publicProperties;
70
+ interface SelectedConfigurableProperty<C extends ConfigurablePropertiesName, O extends string, T extends (typeof publicProperties)[C]['possibleFixtures'] = (typeof publicProperties)[C]['possibleFixtures'], V extends readonly (readonly string[])[] = readonly (readonly string[])[]> {
38
71
  label: string;
39
72
  name: C;
40
73
  typeOfFixture: T;
@@ -205,4 +238,4 @@ declare function createSubComponentConfig(config: {
205
238
  variants: Record<string, VariantConfigWithProperties | VariantConfigWithComponentStates>;
206
239
  }): SubComponentConfig;
207
240
 
208
- export { type AllPossibleProperties as A, type ConfigurablePropertiesName as C, type LayerConfig as L, type PossibleStates as P, type SelectedConfigurableProperty as S, type VariantConfig as V, type PossibleStatesWithRest as a, type ComponentStateConfig as b, configurableProperties as c, type SubComponentConfig as d, type VariantConfigWithProperties as e, type VariantConfigWithComponentStates as f, type ComponentConfig as g, type AutoComponents as h, type AutoComponentName as i, type AllVariantKeys as j, type SchemaStateValue as k, findFixtureType as l, generateClassName as m, generateDeclaration as n, generateStyles as o, createConfigurableProperty as p, createVariantConfig as q, createComponentStateConfig as r, statePseudoMapDocsMode as s, toMinimalDbConfigObject as t, createVariantConfigWithProperties as u, createVariantConfigWithComponentStates as v, createComponentStates as w, createLayerConfig as x, createSubComponentConfig as y };
241
+ export { type AllPossibleProperties as A, type ConfigurablePropertiesName as C, type ExtendablePropertiesName as E, type LayerConfig as L, type PossibleStates as P, type SelectedConfigurableProperty as S, type VariantConfig as V, type PossibleStatesWithRest as a, type ComponentStateConfig as b, configurableProperties as c, type SubComponentConfig as d, type VariantConfigWithProperties as e, type VariantConfigWithComponentStates as f, type ComponentConfig as g, type AutoComponents as h, type AutoComponentName as i, type AllVariantKeys as j, type SchemaStateValue as k, findFixtureType as l, generateClassName as m, generateDeclaration as n, generateStyles as o, createConfigurableProperty as p, createVariantConfig as q, createComponentStateConfig as r, statePseudoMapDocsMode as s, toMinimalDbConfigObject as t, createVariantConfigWithProperties as u, createVariantConfigWithComponentStates as v, createComponentStates as w, createLayerConfig as x, createSubComponentConfig as y };
@@ -1,17 +1,23 @@
1
1
  import * as properties from '@yahoo/uds/fixtures';
2
2
  import { d as ShadowPreset, U as UniversalTokensConfig } from './types-DE_O6y5z.js';
3
3
 
4
+ type DispatchContext = {
5
+ componentName: string;
6
+ subComponentName?: string;
7
+ propertyKey: string;
8
+ layer: string;
9
+ };
4
10
  interface ConfigurableProperty<T extends AllPossibleProperties, CVR = unknown> {
5
11
  name: string;
6
12
  cssProperties: string | string[];
7
13
  twThemePath: (selected: T, value: string) => string;
8
14
  possibleFixtures: T[];
9
- extendedProperties?: ConfigurablePropertiesName[];
10
- customValueRenderer?: (schemaStateValue: SchemaStateValue<CVR>, schema: unknown) => string;
15
+ extendedProperties?: ExtendablePropertiesName[] | ((context: DispatchContext) => ExtendablePropertiesName[] | undefined | false);
16
+ customValueRenderer?: (schemaStateValue: SchemaStateValue<CVR>, schema: unknown, themeGetter: (path: string) => string) => string;
11
17
  concatenate?: boolean;
12
18
  concatenationDelimiter?: string;
13
19
  }
14
- declare const configurableProperties: {
20
+ declare const publicProperties: {
15
21
  readonly backgroundColor: ConfigurableProperty<"backgroundPaletteColors" | "spectrumColors" | "alwaysPaletteAliases", unknown>;
16
22
  readonly borderWidth: ConfigurableProperty<"spacingAliases" | "borderWidths", unknown>;
17
23
  readonly borderRadius: ConfigurableProperty<"borderRadii", unknown>;
@@ -33,8 +39,35 @@ declare const configurableProperties: {
33
39
  readonly height: ConfigurableProperty<"spacingAliases", unknown>;
34
40
  readonly width: ConfigurableProperty<"spacingAliases", unknown>;
35
41
  };
36
- type ConfigurablePropertiesName = keyof typeof configurableProperties;
37
- interface SelectedConfigurableProperty<C extends ConfigurablePropertiesName, O extends string, T extends (typeof configurableProperties)[C]['possibleFixtures'] = (typeof configurableProperties)[C]['possibleFixtures'], V extends readonly (readonly string[])[] = readonly (readonly string[])[]> {
42
+ declare const configurableProperties: {
43
+ outlineWidth: ConfigurableProperty<"spacingAliases" | "borderWidths", unknown>;
44
+ outlineColor: ConfigurableProperty<"linePaletteColors" | "spectrumColors" | "alwaysPaletteAliases", unknown>;
45
+ insetOutlineOffset: ConfigurableProperty<"spacingAliases" | "borderWidths", unknown>;
46
+ solidOutline: ConfigurableProperty<never, unknown>;
47
+ backgroundColor: ConfigurableProperty<"backgroundPaletteColors" | "spectrumColors" | "alwaysPaletteAliases", unknown>;
48
+ borderWidth: ConfigurableProperty<"spacingAliases" | "borderWidths", unknown>;
49
+ borderRadius: ConfigurableProperty<"borderRadii", unknown>;
50
+ borderColor: ConfigurableProperty<"linePaletteColors" | "spectrumColors" | "alwaysPaletteAliases", unknown>;
51
+ fontFamily: ConfigurableProperty<"textVariants", unknown>;
52
+ fontSize: ConfigurableProperty<"textVariants", unknown>;
53
+ lineHeight: ConfigurableProperty<"textVariants", unknown>;
54
+ textTransform: ConfigurableProperty<"textVariants", unknown>;
55
+ padding: ConfigurableProperty<"spacingAliases", unknown>;
56
+ gap: ConfigurableProperty<"spacingAliases", unknown>;
57
+ color: ConfigurableProperty<"foregroundPaletteColors" | "spectrumColors" | "alwaysPaletteAliases", unknown>;
58
+ fontWeight: ConfigurableProperty<"textVariants", unknown>;
59
+ iconSize: ConfigurableProperty<"iconSizes", unknown>;
60
+ spacingHorizontal: ConfigurableProperty<"spacingAliases", unknown>;
61
+ spacingVertical: ConfigurableProperty<"spacingAliases", unknown>;
62
+ textVariant: ConfigurableProperty<"textVariants", unknown>;
63
+ shadow: ConfigurableProperty<"shadowVariants", string | [] | [ShadowPreset] | [ShadowPreset, ShadowPreset] | [ShadowPreset, ShadowPreset, ShadowPreset]>;
64
+ insetShadow: ConfigurableProperty<"shadowVariantsWithInvert", string | [] | [ShadowPreset] | [ShadowPreset, ShadowPreset] | [ShadowPreset, ShadowPreset, ShadowPreset]>;
65
+ height: ConfigurableProperty<"spacingAliases", unknown>;
66
+ width: ConfigurableProperty<"spacingAliases", unknown>;
67
+ };
68
+ type ExtendablePropertiesName = keyof typeof configurableProperties;
69
+ type ConfigurablePropertiesName = keyof typeof publicProperties;
70
+ interface SelectedConfigurableProperty<C extends ConfigurablePropertiesName, O extends string, T extends (typeof publicProperties)[C]['possibleFixtures'] = (typeof publicProperties)[C]['possibleFixtures'], V extends readonly (readonly string[])[] = readonly (readonly string[])[]> {
38
71
  label: string;
39
72
  name: C;
40
73
  typeOfFixture: T;
@@ -205,4 +238,4 @@ declare function createSubComponentConfig(config: {
205
238
  variants: Record<string, VariantConfigWithProperties | VariantConfigWithComponentStates>;
206
239
  }): SubComponentConfig;
207
240
 
208
- export { type AllPossibleProperties as A, type ConfigurablePropertiesName as C, type LayerConfig as L, type PossibleStates as P, type SelectedConfigurableProperty as S, type VariantConfig as V, type PossibleStatesWithRest as a, type ComponentStateConfig as b, configurableProperties as c, type SubComponentConfig as d, type VariantConfigWithProperties as e, type VariantConfigWithComponentStates as f, type ComponentConfig as g, type AutoComponents as h, type AutoComponentName as i, type AllVariantKeys as j, type SchemaStateValue as k, findFixtureType as l, generateClassName as m, generateDeclaration as n, generateStyles as o, createConfigurableProperty as p, createVariantConfig as q, createComponentStateConfig as r, statePseudoMapDocsMode as s, toMinimalDbConfigObject as t, createVariantConfigWithProperties as u, createVariantConfigWithComponentStates as v, createComponentStates as w, createLayerConfig as x, createSubComponentConfig as y };
241
+ export { type AllPossibleProperties as A, type ConfigurablePropertiesName as C, type ExtendablePropertiesName as E, type LayerConfig as L, type PossibleStates as P, type SelectedConfigurableProperty as S, type VariantConfig as V, type PossibleStatesWithRest as a, type ComponentStateConfig as b, configurableProperties as c, type SubComponentConfig as d, type VariantConfigWithProperties as e, type VariantConfigWithComponentStates as f, type ComponentConfig as g, type AutoComponents as h, type AutoComponentName as i, type AllVariantKeys as j, type SchemaStateValue as k, findFixtureType as l, generateClassName as m, generateDeclaration as n, generateStyles as o, createConfigurableProperty as p, createVariantConfig as q, createComponentStateConfig as r, statePseudoMapDocsMode as s, toMinimalDbConfigObject as t, createVariantConfigWithProperties as u, createVariantConfigWithComponentStates as v, createComponentStates as w, createLayerConfig as x, createSubComponentConfig as y };
@@ -1,17 +1,23 @@
1
1
  import * as properties from '@yahoo/uds/fixtures';
2
2
  import { d as ShadowPreset, U as UniversalTokensConfig } from './types-B_jakWRK.cjs';
3
3
 
4
+ type DispatchContext = {
5
+ componentName: string;
6
+ subComponentName?: string;
7
+ propertyKey: string;
8
+ layer: string;
9
+ };
4
10
  interface ConfigurableProperty<T extends AllPossibleProperties, CVR = unknown> {
5
11
  name: string;
6
12
  cssProperties: string | string[];
7
13
  twThemePath: (selected: T, value: string) => string;
8
14
  possibleFixtures: T[];
9
- extendedProperties?: ConfigurablePropertiesName[];
10
- customValueRenderer?: (schemaStateValue: SchemaStateValue<CVR>, schema: unknown) => string;
15
+ extendedProperties?: ExtendablePropertiesName[] | ((context: DispatchContext) => ExtendablePropertiesName[] | undefined | false);
16
+ customValueRenderer?: (schemaStateValue: SchemaStateValue<CVR>, schema: unknown, themeGetter: (path: string) => string) => string;
11
17
  concatenate?: boolean;
12
18
  concatenationDelimiter?: string;
13
19
  }
14
- declare const configurableProperties: {
20
+ declare const publicProperties: {
15
21
  readonly backgroundColor: ConfigurableProperty<"backgroundPaletteColors" | "spectrumColors" | "alwaysPaletteAliases", unknown>;
16
22
  readonly borderWidth: ConfigurableProperty<"spacingAliases" | "borderWidths", unknown>;
17
23
  readonly borderRadius: ConfigurableProperty<"borderRadii", unknown>;
@@ -33,8 +39,35 @@ declare const configurableProperties: {
33
39
  readonly height: ConfigurableProperty<"spacingAliases", unknown>;
34
40
  readonly width: ConfigurableProperty<"spacingAliases", unknown>;
35
41
  };
36
- type ConfigurablePropertiesName = keyof typeof configurableProperties;
37
- interface SelectedConfigurableProperty<C extends ConfigurablePropertiesName, O extends string, T extends (typeof configurableProperties)[C]['possibleFixtures'] = (typeof configurableProperties)[C]['possibleFixtures'], V extends readonly (readonly string[])[] = readonly (readonly string[])[]> {
42
+ declare const configurableProperties: {
43
+ outlineWidth: ConfigurableProperty<"spacingAliases" | "borderWidths", unknown>;
44
+ outlineColor: ConfigurableProperty<"linePaletteColors" | "spectrumColors" | "alwaysPaletteAliases", unknown>;
45
+ insetOutlineOffset: ConfigurableProperty<"spacingAliases" | "borderWidths", unknown>;
46
+ solidOutline: ConfigurableProperty<never, unknown>;
47
+ backgroundColor: ConfigurableProperty<"backgroundPaletteColors" | "spectrumColors" | "alwaysPaletteAliases", unknown>;
48
+ borderWidth: ConfigurableProperty<"spacingAliases" | "borderWidths", unknown>;
49
+ borderRadius: ConfigurableProperty<"borderRadii", unknown>;
50
+ borderColor: ConfigurableProperty<"linePaletteColors" | "spectrumColors" | "alwaysPaletteAliases", unknown>;
51
+ fontFamily: ConfigurableProperty<"textVariants", unknown>;
52
+ fontSize: ConfigurableProperty<"textVariants", unknown>;
53
+ lineHeight: ConfigurableProperty<"textVariants", unknown>;
54
+ textTransform: ConfigurableProperty<"textVariants", unknown>;
55
+ padding: ConfigurableProperty<"spacingAliases", unknown>;
56
+ gap: ConfigurableProperty<"spacingAliases", unknown>;
57
+ color: ConfigurableProperty<"foregroundPaletteColors" | "spectrumColors" | "alwaysPaletteAliases", unknown>;
58
+ fontWeight: ConfigurableProperty<"textVariants", unknown>;
59
+ iconSize: ConfigurableProperty<"iconSizes", unknown>;
60
+ spacingHorizontal: ConfigurableProperty<"spacingAliases", unknown>;
61
+ spacingVertical: ConfigurableProperty<"spacingAliases", unknown>;
62
+ textVariant: ConfigurableProperty<"textVariants", unknown>;
63
+ shadow: ConfigurableProperty<"shadowVariants", string | [] | [ShadowPreset] | [ShadowPreset, ShadowPreset] | [ShadowPreset, ShadowPreset, ShadowPreset]>;
64
+ insetShadow: ConfigurableProperty<"shadowVariantsWithInvert", string | [] | [ShadowPreset] | [ShadowPreset, ShadowPreset] | [ShadowPreset, ShadowPreset, ShadowPreset]>;
65
+ height: ConfigurableProperty<"spacingAliases", unknown>;
66
+ width: ConfigurableProperty<"spacingAliases", unknown>;
67
+ };
68
+ type ExtendablePropertiesName = keyof typeof configurableProperties;
69
+ type ConfigurablePropertiesName = keyof typeof publicProperties;
70
+ interface SelectedConfigurableProperty<C extends ConfigurablePropertiesName, O extends string, T extends (typeof publicProperties)[C]['possibleFixtures'] = (typeof publicProperties)[C]['possibleFixtures'], V extends readonly (readonly string[])[] = readonly (readonly string[])[]> {
38
71
  label: string;
39
72
  name: C;
40
73
  typeOfFixture: T;
@@ -205,4 +238,4 @@ declare function createSubComponentConfig(config: {
205
238
  variants: Record<string, VariantConfigWithProperties | VariantConfigWithComponentStates>;
206
239
  }): SubComponentConfig;
207
240
 
208
- export { type AllPossibleProperties as A, type ConfigurablePropertiesName as C, type LayerConfig as L, type PossibleStates as P, type SelectedConfigurableProperty as S, type VariantConfig as V, type PossibleStatesWithRest as a, type ComponentStateConfig as b, configurableProperties as c, type SubComponentConfig as d, type VariantConfigWithProperties as e, type VariantConfigWithComponentStates as f, type ComponentConfig as g, type AutoComponents as h, type AutoComponentName as i, type AllVariantKeys as j, type SchemaStateValue as k, findFixtureType as l, generateClassName as m, generateDeclaration as n, generateStyles as o, createConfigurableProperty as p, createVariantConfig as q, createComponentStateConfig as r, statePseudoMapDocsMode as s, toMinimalDbConfigObject as t, createVariantConfigWithProperties as u, createVariantConfigWithComponentStates as v, createComponentStates as w, createLayerConfig as x, createSubComponentConfig as y };
241
+ export { type AllPossibleProperties as A, type ConfigurablePropertiesName as C, type ExtendablePropertiesName as E, type LayerConfig as L, type PossibleStates as P, type SelectedConfigurableProperty as S, type VariantConfig as V, type PossibleStatesWithRest as a, type ComponentStateConfig as b, configurableProperties as c, type SubComponentConfig as d, type VariantConfigWithProperties as e, type VariantConfigWithComponentStates as f, type ComponentConfig as g, type AutoComponents as h, type AutoComponentName as i, type AllVariantKeys as j, type SchemaStateValue as k, findFixtureType as l, generateClassName as m, generateDeclaration as n, generateStyles as o, createConfigurableProperty as p, createVariantConfig as q, createComponentStateConfig as r, statePseudoMapDocsMode as s, toMinimalDbConfigObject as t, createVariantConfigWithProperties as u, createVariantConfigWithComponentStates as v, createComponentStates as w, createLayerConfig as x, createSubComponentConfig as y };