@yahoo/uds 3.46.0 → 3.46.2

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 (66) hide show
  1. package/dist/{Box-DCfVWPEa.d.cts → Box-BFRDyWaq.d.cts} +1 -1
  2. package/dist/{Box-DIxPS_Eb.d.cts → Box-CVbnF3KY.d.cts} +1 -1
  3. package/dist/{Box-BBZ3X-K8.d.ts → Box-KZ1-_3Y1.d.ts} +1 -1
  4. package/dist/{Box-BiOhwq4x.d.ts → Box-MHJ0-0M3.d.ts} +1 -1
  5. package/dist/{Pressable-DEJTaCX7.d.ts → Pressable-BCKijzW4.d.ts} +1 -1
  6. package/dist/{Pressable-01KD6JSM.d.cts → Pressable-DM2L9PzA.d.cts} +1 -1
  7. package/dist/{Pressable-DcVYn2Mr.d.ts → Pressable-DVLHV--n.d.ts} +1 -1
  8. package/dist/{Pressable-DDeoEy6N.d.cts → Pressable-GdByxoJg.d.cts} +1 -1
  9. package/dist/{Text-D8r6CSeV.d.ts → Text-774Va3iq.d.ts} +3 -52
  10. package/dist/{Text-YXARg6JI.d.ts → Text-Bq5NiVYm.d.cts} +3 -52
  11. package/dist/{Text-B3RX9wWS.d.cts → Text-C58YvnSu.d.cts} +3 -52
  12. package/dist/{Text-DHrq15W_.d.cts → Text-IGbWWF7a.d.ts} +3 -52
  13. package/dist/{VStack-COPzfesz.d.ts → VStack-4KrkGBKP.d.ts} +2 -2
  14. package/dist/{VStack-C0KNZJ7o.d.cts → VStack-AyF9g6Xi.d.cts} +2 -2
  15. package/dist/{VStack-M-9LUirX.d.ts → VStack-CppUZHJL.d.ts} +2 -2
  16. package/dist/{VStack-CB6Togey.d.cts → VStack-UmkAYRN1.d.cts} +2 -2
  17. package/dist/chunk-53CIH36M.js +1 -0
  18. package/dist/chunk-H2XDX4D2.cjs +1 -0
  19. package/dist/chunk-HPXOQ4QK.js +1 -0
  20. package/dist/chunk-W7AQRGI5.cjs +1 -0
  21. package/dist/client/Menu.cjs +1 -2
  22. package/dist/client/Menu.d.cts +4 -4
  23. package/dist/client/Menu.d.ts +4 -4
  24. package/dist/client/Menu.js +2 -2
  25. package/dist/client/index.cjs +1 -1
  26. package/dist/client/index.d.cts +111 -19
  27. package/dist/client/index.d.ts +111 -19
  28. package/dist/client/index.js +1 -1
  29. package/dist/defaultTokensConfig.d.cts +2 -2
  30. package/dist/defaultTokensConfig.d.ts +2 -2
  31. package/dist/experimental/client/SwitchV2.cjs +0 -1
  32. package/dist/experimental/client/SwitchV2.d.cts +1 -1
  33. package/dist/experimental/client/SwitchV2.d.ts +1 -1
  34. package/dist/{index-CEO-Oqm3.d.cts → index-BnkxCwiE.d.cts} +1 -1
  35. package/dist/{index-DMyjlCBk.d.ts → index-BtKE9zn1.d.ts} +1 -1
  36. package/dist/{index-Dcbgq7R0.d.ts → index-DPrPpHqT.d.ts} +1 -1
  37. package/dist/{index-BkNyc_q0.d.cts → index-cZ0qEwcJ.d.cts} +1 -1
  38. package/dist/index.cjs +1 -1
  39. package/dist/index.d.cts +9 -28
  40. package/dist/index.d.ts +9 -28
  41. package/dist/index.js +1 -1
  42. package/dist/metafile-cjs.json +1 -1
  43. package/dist/metafile-esm.json +1 -1
  44. package/dist/tailwind/plugin.d.cts +1 -1
  45. package/dist/tailwind/plugin.d.ts +1 -1
  46. package/dist/tailwind/purger.cjs +1 -1
  47. package/dist/tailwind/purger.js +1 -1
  48. package/dist/tailwind/utils.d.cts +1 -1
  49. package/dist/tailwind/utils.d.ts +1 -1
  50. package/dist/tokens/automation/configs.d.cts +2 -2
  51. package/dist/tokens/automation/configs.d.ts +2 -2
  52. package/dist/tokens/automation/properties.d.cts +2 -2
  53. package/dist/tokens/automation/properties.d.ts +2 -2
  54. package/dist/tokens/index.d.cts +4 -4
  55. package/dist/tokens/index.d.ts +4 -4
  56. package/dist/tokens/parseTokens.d.cts +1 -1
  57. package/dist/tokens/parseTokens.d.ts +1 -1
  58. package/dist/{types-1nwPbFUc.d.cts → types-D6kYghpa.d.cts} +1 -1
  59. package/dist/{types-1nwPbFUc.d.ts → types-D6kYghpa.d.ts} +1 -1
  60. package/dist/{types-C5YKqOg3.d.cts → types-Da_DnBJy.d.cts} +1 -1
  61. package/dist/{types-C5YKqOg3.d.ts → types-Da_DnBJy.d.ts} +1 -1
  62. package/package.json +1 -1
  63. package/dist/chunk-2VXJ6ZXC.js +0 -1
  64. package/dist/chunk-6KI6LPDE.cjs +0 -1
  65. package/dist/chunk-I4FBYECY.cjs +0 -1
  66. package/dist/chunk-YFLJTZBO.js +0 -1
@@ -1,2 +1,2 @@
1
1
  "use client";
2
- "use strict";var e=require("../chunk-6KI6LPDE.cjs"),t=require("../chunk-H5RFGJT6.cjs"),a=require("../chunk-IWTF6VT4.cjs"),n=require("../chunk-MQ5HBFA2.cjs"),o=require("../chunk-TWH2EAVG.cjs"),s=require("../chunk-3VUEFW4X.cjs"),i=require("../chunk-ZSA4T523.cjs"),r=require("../chunk-DEYTPNUJ.cjs"),c=require("../chunk-LNZSNDOV.cjs"),l=require("../chunk-QLXJH36U.cjs"),u=require("react"),d=require("react/jsx-runtime"),p=require("@yahoo/uds/fixtures"),m=require("motion/react"),h=require("@yahoo/uds/client/Menu"),x=l.__toESM(r.require_isFunction(),1),f={first:e=>e[0]??"",last:e=>e[e.length-1]??"",firstAndLast:e=>1===e.length?e[0]:`${e[0]}${e[e.length-1]}`,firstTwo:e=>e.slice(0,2).join(""),firstThree:e=>e.slice(0,3).join(""),firstOfEach:e=>e.join("")},b=(e,t="firstAndLast")=>{if(!e)return"";if((0,x.default)(t))return t(e);const a=e.trim().split(/\s+/).map(e=>e[0].toUpperCase());return f[t](a)},g=(e="md",t)=>{const{className:a,...n}=t??{};return s.getStyles({avatarSizeRoot:e,...n,className:s.cx("shrink-0","text-center","inline-flex","justify-center","items-center","overflow-visible","truncate",a)})},y=e=>{const t=e?{height:e,width:e}:{};return{root:t,contents:{...t,boxSizing:"content-box"}}},v="primary",S="md",N={primary:t.e2,secondary:t.t},I=({size:e=S,variant:t=v,customSize:a,icon:n,slotProps:o,className:i,...r})=>{const c=u.useMemo(()=>({root:g(e,{avatarIconVariantRoot:t,overflow:"hidden",className:s.cx("overflow-hidden",i)}),iconContainer:s.cx("w-full","h-full","shrink-0","overflow-hidden","text-center","inline-flex","justify-center","items-center"),icon:s.getStyles({avatarSizeIcon:e})}),[i,e,t]),l=u.useMemo(()=>y(a),[a]),p=n??N[t??"primary"];return d.jsx(s.Box,{className:c.root,style:l.root,...r,children:d.jsx(s.Box,{className:c.iconContainer,style:l.contents,children:d.jsx(s.IconSlot,{icon:p,iconProps:{variant:"fill",color:"current",...o?.icon},className:c.icon})})})};/*! © 2025 Yahoo, Inc. UDS v0.0.0-development */I.displayName="AvatarIcon";var C=({size:e=S,variant:t=v,name:a,initials:n,customSize:o,abbreviationStrategy:i,className:r,slotProps:c,...l})=>{const p=u.useMemo(()=>({root:g(e,{avatarTextVariantRoot:t,className:s.cx("overflow-hidden","truncate",r)}),text:s.cx("w-full","h-full","shrink-0","overflow-hidden","text-center","inline-flex","justify-center","items-center","truncate")}),[r,e,t]),m=u.useMemo(()=>y(o),[o]);return d.jsx(s.Box,{className:p.root,style:m.root,...l,children:d.jsx(s.Text,{color:"inherit",variant:"inherit",className:p.text,style:m.contents,...c?.text,children:n||b(a,i)})})};C.displayName="AvatarText";var j=({size:t=S,variant:a=v,src:n,srcSet:o,customSize:i,alt:r,abbreviationStrategy:c,fallback:l,className:p,imageProps:m,slotProps:h,...x})=>{const[f,b]=u.useState("loading");u.useEffect(()=>{let e=!0;if(n||o){const t=new Image;t.onload=()=>{e&&b("loaded")},t.onerror=()=>{e&&b("error")},n&&(t.src=n),o&&(t.srcset=o)}else b("error");return()=>{e=!1}},[n,o]);const N=u.useMemo(()=>({root:g(t,{avatarImageVariantRoot:a,className:s.cx("overflow-hidden",p)}),contents:s.cx("w-full","h-full","shrink-0","text-center","inline-flex","justify-center","items-center","object-cover")}),[p,t,a]),j=u.useMemo(()=>y(i),[i]);if("loaded"===f)return d.jsx(s.Box,{className:N.root,style:j.root,children:d.jsx(e.Image,{src:n,srcSet:o,alt:r,className:N.contents,style:j.contents,...m,...h?.image})});const k={...x,size:t,customSize:i,variant:a};return l||r?d.jsx(C,{name:r,initials:l,abbreviationStrategy:c,slotProps:{text:h?.text},...k}):d.jsx(I,{...k,slotProps:{icon:h?.icon}})};j.displayName="AvatarImage";var k=e=>d.jsx(j,{...e});k.displayName="Avatar";var w=u.forwardRef(function({variant:e="primary",size:t="md",minWidth:n,maxWidth:o=200,startIcon:i,endIcon:r,backgroundColor:c,color:l,iconColor:p,borderColor:m,children:h,className:x,...f},b){const g=s.getStyles({badgeSizeRoot:t,badgeVariantRoot:e,className:s.cx(["uds-badge","uds-badge-variant","uds-badge-size",x])}),y=s.getStyles({badgeVariantIcon:e,badgeSizeIcon:t,className:s.cx(["uds-badge-iconSize","uds-badge-iconColor"])}),v=u.useMemo(()=>({...n?{minWidth:`${n}px`}:{},..."full"===o?{}:{maxWidth:`${o}px`},...c?{backgroundColor:c}:{},...m?{borderColor:m}:{},...l?{color:l}:{}}),[c,m,l,o,n]),S=u.useMemo(()=>({variant:"fill",style:{...p?{color:p}:{}}}),[p]);return d.jsxs(a.HStack,{ref:b,gap:"2",display:"inline-flex",alignItems:"center",className:g,style:v,...f,children:[i&&d.jsx(s.IconSlot,{icon:i,iconProps:S,"data-testid":"start-icon",className:y}),d.jsx("span",{className:"flex-1 truncate whitespace-nowrap text-center",children:h}),r&&d.jsx(s.IconSlot,{icon:r,iconProps:S,"data-testid":"end-icon",className:y})]})});w.displayName="Badge";var V={scale:.7,opacity:0},M={scale:[.7,.7,1],opacity:[0,0,1],transition:{times:[0,.5,1]}},R={icon:M,hide:V,loading:V},P={loading:M,hide:V,icon:V},z=`var(${c.BUTTON_CSS_VAR_MAP.columnGap})`,T=`var(${c.BUTTON_CSS_VAR_MAP.iconSize})`,B={rest:{scale:`var(${c.BUTTON_CSS_VAR_MAP.effects.scale.rest})`},hover:{scale:`var(${c.BUTTON_CSS_VAR_MAP.effects.scale.hover})`},pressed:{scale:`var(${c.BUTTON_CSS_VAR_MAP.effects.scale.pressed})`},withoutIcon:{columnGap:"0px"},withIcon:{columnGap:z}},A={hide:{width:"0px",opacity:0,display:"none"},loading:{width:T,display:"flex",opacity:1},icon:{width:T,display:"flex",opacity:1}},E=u.forwardRef(function({variant:e,size:a,startIcon:n,endIcon:r,iconVariant:c,loading:l,disableEffects:h,children:x,asChild:f,type:b="button",className:g,width:y,...v},S){const N=u.useRef(null);u.useImperativeHandle(S,()=>N.current);const I=u.useMemo(()=>s.createSlot(),[]),C=u.useMemo(()=>m.m.create(I),[I]),j=r?"icon":"hide",k=(({startIcon:e,endIcon:t,loading:a})=>e||t||a?"withIcon":"withoutIcon")({startIcon:n,endIcon:r,loading:l}),w=(({loading:e,startIcon:t})=>e?"loading":t?"icon":"hide")({loading:l,startIcon:n}),{palette:V,variant:M}=u.useMemo(()=>i.parseDeprecatedButtonPaletteVariant({flatVariant:e}),[e]),z=u.useMemo(()=>({button:s.getStyles({width:y,buttonSize:a,buttonVariant:M,buttonPalette:V,className:s.cx("uds-button","uds-ring","uds-hit-target",l&&"uds-button-loading",h&&"uds-button-without-effects","withIcon"===k&&"uds-button-with-gap",g)}),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"}),[y,a,M,V,g,l,h,k]),T=m.useReducedMotion()?"smooth":"subtle",E=u.useMemo(()=>d.jsx(m.m.span,{className:z.iconContainer,initial:!1,variants:A,animate:w,children:d.jsxs(m.AnimatePresence,{initial:!1,mode:"popLayout",children:[l&&d.jsx(m.m.span,{variants:P,initial:"hide",animate:"loading",exit:"hide",children:d.jsx(s.Icon,{size:p.buttonIconSvgSize,name:t.o2,variant:c,color:"current",className:z.loading})},"loading"),n&&!l&&d.jsx(m.m.span,{variants:R,initial:"hide",animate:"icon",exit:"hide",children:d.jsx(s.IconSlot,{className:z.start,icon:n,iconProps:{size:p.buttonIconSvgSize,variant:c,color:"current"}})})]})}),[z.iconContainer,z.loading,z.start,w,l,c,n]),O=u.useMemo(()=>d.jsx(m.m.span,{className:z.iconContainer,initial:!1,variants:A,animate:j,children:d.jsx(m.AnimatePresence,{initial:!1,mode:"popLayout",children:r&&d.jsx(m.m.span,{variants:R,initial:"hide",animate:"icon",exit:"hide",children:d.jsx(s.IconSlot,{className:z.end,icon:r,iconProps:{size:p.buttonIconSvgSize,variant:c,color:"current"}})})})}),[z.iconContainer,z.end,r,j,c]),q=u.useMemo(()=>h?{...B,rest:{},hover:{},pressed:{}}:B,[h]);return f&&u.isValidElement(x)?d.jsx(o.SpringMotionConfig,{layoutSpeed:"3",layoutVariant:T,children:d.jsx(C,{type:b,className:z.button,initial:["hide",k],animate:k,variants:q,whileHover:"hover",whileTap:"pressed",...v,children:u.cloneElement(x,x.props,d.jsxs(d.Fragment,{children:[E,d.jsx("span",{className:z.content,children:x.props.children}),O]}))})}):d.jsx(o.SpringMotionConfig,{layoutSpeed:"3",layoutVariant:T,children:d.jsxs(m.m.button,{ref:N,type:b,className:z.button,initial:["hide",k],animate:k,variants:q,whileHover:"hover",whileTap:"pressed",...v,children:[E,d.jsx("span",{className:z.content,children:x}),O]})})}),O={primary:"alert",secondary:"alert-secondary"},q=e=>"indeterminate"===e,L=e=>q(e)?t.o:t.e,H=m.m.create(s.Box),_={layoutVariant:"smooth",layoutSpeed:"3"},F={layoutVariant:"veryBouncy",layoutSpeed:"4"},W=u.forwardRef(function({id:e,checked:t,defaultChecked:a,onChange:i,label:r,labelPosition:c="start",variant:l="primary",size:p="md",reduceMotion:h,disabled:x,required:f,hasError:b,className:g,layerClassNames:y,...v},S){const N=u.useId(),I=e??`uds-input-${N}`,C=u.useRef(null),j=void 0!==t,[k,w]=u.useState(j?t:a),[V,M]=u.useState(!1),[R,P]=u.useState(!1),z=u.useMemo(()=>b?O[l]:l,[b,l]),T=!x&&V,B=!x&&R,A=u.useMemo(()=>B?.9:T?1.1:1,[B,T]),E=u.useMemo(()=>k?B?"opacity-55":"opacity-100":"opacity-0",[k,B]),W=u.useMemo(()=>({scale:A}),[A]),$=u.useMemo(()=>R?F:_,[R]),D=u.useCallback(e=>{i?.(e),j||w(e.target.checked)},[j,i]),G=u.useCallback(()=>{M(!0)},[]),U=u.useCallback(()=>{M(!1)},[]),X=u.useCallback(()=>{P(!0)},[]),J=u.useCallback(()=>{P(!1)},[]),Q=e=>{C.current&&(C.current.indeterminate=q(e))},Z=h?"always":"user",K=m.useReducedMotion()||h?"duration-0":"duration-120";u.useEffect(()=>{j&&w(t)},[t,j]),u.useEffect(()=>{Q(k)},[k]);const Y=q(k)?"indeterminate":k?"checked":"unchecked",ee={root:s.getStyles({checkboxSizeRoot:p,checkboxVariantRoot:z,checkboxVariantValueRoot:Y,display:"flex",flexDirection:"start"===c?"row":"row-reverse",alignItems:"center",className:s.cx({"cursor-pointer":!x,"cursor-default":x,"opacity-50":x},g,y?.root)}),checkbox:s.getStyles({checkboxSizeCheckbox:p,checkboxVariantCheckbox:z,checkboxVariantValueCheckbox:Y,className:s.cx("border","rounded-[4px]","uds-ring","uds-ring-within",K,"transition-[background-color,border-color,box-shadow]",y?.checkbox)}),check:s.getStyles({checkboxVariantCheckboxIcon:z,checkboxVariantValueCheckboxIcon:Y,className:s.cx("pointer-events-none",E,K,"transition-opacity")}),htmlCheckbox:s.cx("cursor-[inherit]","absolute","opacity-0","top-1/2","left-1/2","w-[calc(100%+2px)]","h-[calc(100%+2px)]","transform","translate-x-[-50%]","translate-y-[-50%]"),label:s.cx("start"===c?"text-start":"text-end",y?.label)},te=r?m.m.label:m.m.div;return d.jsx(o.SpringMotionConfig,{reducedMotion:Z,...$,children:d.jsxs(te,{className:ee.root,"data-testid":"container",onHoverStart:G,onHoverEnd:U,onTapStart:X,onTap:J,onTapCancel:J,tabIndex:-1,children:[d.jsxs(H,{position:"relative",className:ee.checkbox,alignItems:"center",justifyContent:"center",flex:"none",animate:W,children:[d.jsx("input",{type:"checkbox",tabIndex:0,...v,ref:e=>{C.current=e,Q(k),"function"==typeof S?S(e):null!==S&&(S.current=e)},id:I,disabled:x,required:f,"aria-invalid":b,checked:j?!q(k)&&k:void 0,defaultChecked:j?void 0:a,onChange:D,className:ee.htmlCheckbox}),d.jsx(s.Icon,{name:L(k),size:"sm",className:ee.check})]}),r&&d.jsx(n.FormLabel,{as:"div",variant:"inherit",color:"inherit",required:f,label:r,className:ee.label})]})})});W.displayName="Checkbox";var $=(e,t,a="overwriteOriginal")=>{const n=Array.from(new Set([...Object.keys(e??{}),...Object.keys(t??{})]));return Object.fromEntries(n.map(n=>{const o=e?.[n],i=t?.[n];return o&&!i?[n,o]:i&&!o?[n,i]:"className"===n?[n,s.cx(o,i)]:"keepOriginal"===a?[n,o]:[n,i]}))},D=(e,t,a="overwriteOriginal")=>{if(!e)return t;const n=Array.from(new Set([...Object.keys(e),...Object.keys(t)]));return Object.fromEntries(n.map(n=>{const o=e[n],s=t[n];return[n,$(o,s,a)]}))},G="primary",U=u.forwardRef(function({size:e="md",minWidth:t,maxWidth:n=200,startIcon:o,endIcon:i,as:r="div",reduceMotion:c,disabled:l=!1,className:p,slotProps:h,children:x,...f},b){const g=m.useReducedMotion()||c?"duration-0":"duration-120",{className:y,...v}=h?.text??{},{className:S,...N}=h?.startIcon??{},{className:I,...C}=h?.endIcon??{},j=u.useMemo(()=>({root:s.getStyles({chipSizeRoot:e,className:s.cx({"pointer-events-none":l,"cursor-default":l,"opacity-50":l},"inline-flex","items-center","focus-visible:-outline-offset-2","uds-ring",g,"transition-[background-color,outline-color,box-shadow]",p)}),text:s.cx("truncate","whitespace-nowrap","text-center","flex-1",y),icon:s.getStyles({chipSizeIcon:e})}),[p,g,l,e,y]),k=u.useMemo(()=>({root:{maxWidth:`${n}px`,...t?{minWidth:`${t}px`}:{}}}),[n,t]);return d.jsx(a.HStack,{asChild:!0,ref:b,className:j.root,style:k.root,...f,children:d.jsxs(r,{disabled:l,children:[o&&d.jsx(s.IconSlot,{icon:o,iconProps:{variant:"fill",className:s.cx(j.icon,S),...N}}),d.jsx(s.Text,{as:"span",color:"current",variant:"inherit",className:j.text,...v,children:x}),i&&d.jsx(s.IconSlot,{icon:i,iconProps:{variant:"fill",className:s.cx(j.icon,I),...C}})]})})});U.displayName="ChipBase";var X=u.forwardRef(function({variant:e=G,slotProps:t,className:a,...n},o){const i=u.useMemo(()=>({root:s.getStyles({chipLinkVariantRoot:e,className:a}),icon:s.getStyles({chipLinkVariantIcon:e})}),[a,e]),r=D(t,{startIcon:{className:i.icon},endIcon:{className:i.icon}});return d.jsx(U,{as:"button",ref:o,tabIndex:0,className:i.root,slotProps:r,...n})});X.displayName="ChipButton";var J=u.forwardRef(function({dismissButtonAriaLabel:e,onDismiss:a,dismissIcon:n,variant:o=G,disabled:i,slotProps:r,className:c,...l},p){const m=u.useMemo(()=>({root:s.getStyles({chipDismissibleVariantRoot:o,className:c}),icon:s.getStyles({chipDismissibleVariantIcon:o}),iconPressable:s.cx("uds-chip-dismissible-button","uds-hit-target")}),[c,o]),h=u.useCallback(e=>{e.stopPropagation(),a?.()},[a]),x=D(r,{startIcon:{className:m.icon},endIcon:{className:m.icon}});return d.jsx(U,{ref:p,disabled:i,tabIndex:-1,endIcon:a=>d.jsx(t.Pressable,{"aria-label":e,className:m.iconPressable,onClick:h,disabled:i,children:d.jsx(s.IconSlot,{icon:n??t.a,iconProps:a})}),className:m.root,slotProps:x,...l})});J.displayName="ChipDismissible";var Q=u.forwardRef(function({variant:e=G,href:t,disabled:a,slotProps:n,className:o,...i},r){const c=u.useMemo(()=>({root:s.getStyles({chipLinkVariantRoot:e,className:o}),icon:s.getStyles({chipLinkVariantIcon:e})}),[o,e]),l=D(n,{startIcon:{className:c.icon},endIcon:{className:c.icon}});return d.jsx(U,{as:"a",ref:r,disabled:a,className:c.root,slotProps:l,tabIndex:0,...{...i,href:a?void 0:t}})});Q.displayName="ChipLink";var Z=u.forwardRef(function({isToggled:e=!1,onToggle:t,onClick:a,variant:n=G,slotProps:o,className:i,...r},c){const l=u.useMemo(()=>({root:s.getStyles({chipToggleVariantRoot:n,chipToggleVariantActiveRoot:e?"on":"off",className:i}),icon:s.getStyles({chipToggleVariantIcon:n})}),[i,e,n]),p=u.useCallback(n=>{t?.(!e),a?.(n)},[e,a,t]),m=D(o,{startIcon:{className:l.icon},endIcon:{className:l.icon}});return d.jsx(U,{ref:c,as:"button",onClick:p,"aria-pressed":e,className:l.root,slotProps:m,tabIndex:0,...r})});Z.displayName="ChipToggle";var K=u.forwardRef(function({onClick:e,href:t,linkProps:a,onDismiss:n,onToggle:o,isToggled:s,slotProps:i,...r},c){const{anchor:l,...u}=i??{};return n?d.jsx(J,{ref:c,onDismiss:n,slotProps:u,...r}):o?d.jsx(Z,{ref:c,onToggle:o,isToggled:s,slotProps:u,...r}):t?d.jsx(Q,{ref:c,href:t,slotProps:u,...r,...a,...l}):d.jsx(X,{ref:c,onClick:e,slotProps:u,...r})});K.displayName="Chip";var Y=u.forwardRef(function({variant:e,size:a,iconVariant:n,loading:r,disableEffects:c,name:l,type:h="button",htmlName:x,className:f,children:b,...g},y){const v=u.useRef(null);u.useImperativeHandle(y,()=>v.current);const{palette:S,variant:N}=i.parseDeprecatedButtonPaletteVariant({flatVariant:e}),I=u.useMemo(()=>({button:s.getStyles({buttonVariant:N,buttonPalette:S,iconButtonSize:a,className:s.cx("uds-icon-button","uds-button","uds-ring","uds-hit-target",r&&"uds-button-loading",c&&"uds-button-without-effects",f)}),loading:"uds-button-icon start-content animate-spin",icon:"uds-button-icon start-content"}),[S,N,f,c,a,r]),C=m.useReducedMotion(),j=u.useMemo(()=>C?"smooth":"subtle",[C]),k=u.useMemo(()=>{const{rest:e,hover:t,pressed:a}=B;return c?{rest:{},hover:{},pressed:{}}:{rest:e,hover:t,pressed:a}},[c]);return d.jsx(o.SpringMotionConfig,{layoutSpeed:"3",layoutVariant:j,reducedMotion:c?"always":"user",children:d.jsx(m.m.button,{ref:v,type:h,className:I.button,initial:"icon",variants:k,whileHover:"hover",whileTap:"pressed",name:x,...g,children:d.jsxs(m.AnimatePresence,{initial:!1,mode:"popLayout",children:[r&&d.jsx(m.m.span,{variants:P,initial:"loading",animate:"loading",exit:"hide",children:d.jsx(s.Icon,{size:p.buttonIconSvgSize,name:t.o2,variant:n,color:"current",className:I.loading})},"loading"),l&&!r&&d.jsx(m.m.span,{variants:R,initial:"icon",animate:"icon",exit:"hide",children:b||d.jsx(s.Icon,{size:p.buttonIconSvgSize,name:l,variant:n,color:"current",className:I.icon})},l.name)]})})})}),ee=l.__toESM(r.require_isFunction(),1),te=({children:e,reduceMotion:t,layoutVariant:a})=>{const n=u.useRef(null),[s,i]=u.useState("auto");return u.useEffect(()=>{if(n.current){const e=new ResizeObserver(e=>{i(e[0].contentRect.height)});return e.observe(n.current),()=>{e.disconnect()}}},[]),d.jsx(o.SpringMotionConfig,{reducedMotion:t,layoutSpeed:"4",layoutVariant:a,children:d.jsx(m.m.div,{className:"overflow-hidden",style:{height:s,opacity:0},animate:{height:s,opacity:1},children:d.jsx("div",{ref:n,children:e})})})},ae=u.memo(function({helpText:t,helperTextIcon:a,spacingStart:n,spacingTop:o,size:i,isFilled:r,...c}){return t?d.jsx(s.Box,{spacingTop:o,spacingStart:n,...c,children:d.jsx(e.InputHelpTextInternalMemo,{startIcon:a,size:i,isFilled:r,children:(0,ee.default)(t)?t():t})}):null}),ne=u.memo(function({icon:e,className:t,iconProps:a}){return e?d.jsx(s.IconSlot,{icon:e,iconProps:{variant:"outline",...a},className:t}):null}),oe=u.memo(function({icon:e,className:t,iconProps:a}){return e?d.jsx(s.IconSlot,{icon:e,iconProps:{variant:"outline",...a},className:t}):null}),se=u.forwardRef(function({id:e,label:t,type:n="text",size:o="md",startIcon:i,endIcon:r,helpText:c,helperTextIcon:l,hasError:p,width:h="full",defaultValue:x,required:f,readOnly:b,disabled:g,reduceMotion:y,onChange:v,slotProps:S,className:N,...I},C){const j=u.useId(),k=e??`uds-input-${j}`,w=`uds-input-${k}-help-text`,{className:V,...M}=S?.input??{},{className:R,...P}=S?.inputWrapper??{},z=u.useRef(null);u.useImperativeHandle(C,()=>z.current);const[T,B]=u.useState(x??""),A=u.useCallback(e=>{B(e.target.value),v?.(e)},[v]),E=m.useReducedMotion()?"smooth":"bouncy",O=y?"always":"user",q=!b&&!g,L={root:s.getStyles({inputSizeRoot:o,inputVariantRoot:"default",inputVariantValueRoot:T?"filled":"empty",className:s.cx([N,g?"opacity-50":""])}),inputWrapper:s.cx(s.getStyles({inputSizeInputWrapper:o,inputVariantInputWrapper:"default",inputVariantValueInputWrapper:T?"filled":"empty"}),"min-w-[200px]",R),input:s.getStyles({inputSizeInput:o,inputVariantInput:"default",inputVariantValueInput:T?"filled":"empty",inputVariantInputPlaceholder:"default",inputVariantValueInputPlaceholder:T?"filled":"empty",className:s.cx("grow","uds-hit-target","bg-clip-text","focus:outline-none",q?"cursor-text":"cursor-not-allowed",V)}),label:s.cx(s.getStyles({inputSizeLabel:o,inputVariantLabel:"default",inputVariantValueLabel:T?"filled":"empty"})),labelRequired:s.getStyles({inputVariantLabelRequired:"default",inputVariantValueLabelRequired:T?"filled":"empty"}),startIcon:s.getStyles({inputSizeStartIcon:o,inputVariantStartIcon:"default",inputVariantValueStartIcon:T?"filled":"empty"}),endIcon:s.getStyles({inputSizeEndIcon:o,inputVariantEndIcon:"default",inputVariantValueEndIcon:T?"filled":"empty"})};return d.jsxs(a.VStack,{width:h,className:L.root,children:[t&&d.jsxs(s.Box,{spacingBottom:"2",columnGap:"0.5",alignItems:"flex-end",className:L.label,children:[d.jsx("label",{htmlFor:k,children:(0,ee.default)(t)?t():t}),f&&d.jsx("span",{className:L.labelRequired,children:"*"})]}),d.jsxs(s.Box,{position:"relative",alignItems:"center",...P,className:L.inputWrapper,children:[d.jsx(ne,{icon:i,className:L.startIcon,iconProps:S?.startIcon}),d.jsx("input",{ref:z,id:k,type:n,value:T,required:f,readOnly:b,disabled:g,"aria-describedby":w,"aria-invalid":p,onChange:A,className:L.input,...I,...M}),r&&d.jsx(a.HStack,{alignItems:"center",gap:"1",children:d.jsx(oe,{icon:r,className:L.endIcon,iconProps:S?.endIcon})})]}),d.jsx(te,{reduceMotion:O,layoutVariant:E,children:d.jsx(ae,{id:w,helpText:c,spacingTop:"2",size:o,isFilled:!!T,helperTextIcon:l})})]})});se.displayName="Input";var ie=class e{name;value;activeCount=0;#e=new Set;constructor(e){this.name=e}onChange(e){return this.#e.add(e),()=>{this.#e.delete(e)}}setValue(e){this.value=e,this.#e.forEach(t=>t(e))}static findOrCreate(t,a){let n=t.get(a);return n||(n=new e(a),t.set(a,n)),n}},re=u.createContext(new Map),ce=e=>{const t=u.useId();return e??`uds-radio-group-${t}`},le={primary:"alert",secondary:"alert-secondary"},ue=m.m.create(s.Box),de={layoutVariant:"smooth",layoutSpeed:"3"},pe={layoutVariant:"veryBouncy",layoutSpeed:"4"},me=u.forwardRef(function({id:e,name:t,label:a,labelPosition:i="start",variant:r="primary",size:c="md",reduceMotion:l,value:p="",checked:h,defaultChecked:x,disabled:f,hasError:b,onChange:g,onFocus:y,onBlur:v,className:S,layerClassNames:N,...I},C){const j=u.useId(),k=e??`uds-radio-${j}`,w=u.useRef(null),{name:V,isControlled:M,checked:R,setGroupValue:P}=(({name:e,value:t,checked:a,defaultChecked:n})=>{const o=u.useContext(re),s=o instanceof ie,i=void 0!==a||s,r=ce(e),c=u.useMemo(()=>s?o:ie.findOrCreate(o,r),[o,s,r]),[l,d]=u.useState(c.value),p=c.name??r,m=u.useCallback(e=>{c.setValue(e),i||d(e)},[i,c]);return u.useEffect(()=>c.onChange(d),[c]),u.useEffect(()=>{!0===a&&m(t)},[a,t,m]),u.useEffect(()=>{if(s)return;const e=ie.findOrCreate(o,p);return e.activeCount+=1,o.set(p,e),()=>{const e=o.get(p);e&&(e.activeCount-=1,0===e.activeCount&&o.delete(p))}},[o,s,p]),{name:p,isControlled:i,checked:i&&!s?a:void 0!==l?t===l:n??!1,setGroupValue:m}})({name:t,value:p,checked:h,defaultChecked:x}),[z,T]=u.useState(!1),[B,A]=u.useState(!1),E=u.useMemo(()=>b?le[r]:r,[b,r]),O=u.useMemo(()=>!f&&z,[f,z]),q=u.useMemo(()=>!f&&!R&&B,[R,f,B]),L=u.useMemo(()=>q?.9:O?1.1:1,[O,q]),H=u.useMemo(()=>R?q?"opacity-55":"opacity-100":"opacity-0",[R,q]),_=u.useMemo(()=>!f&&(q&&!R||O&&R),[R,f,O,q]),F=u.useMemo(()=>({scale:L}),[L]),W=u.useMemo(()=>B?pe:de,[B]),$=u.useCallback(e=>{P(e.target.value),g?.(e)},[g,P]),D=u.useCallback(e=>{y?.(e)},[y]),G=u.useCallback(e=>{v?.(e)},[v]),U=u.useCallback(()=>{T(!0)},[]),X=u.useCallback(()=>{T(!1)},[]),J=u.useCallback(()=>{A(!0)},[]),Q=u.useCallback(()=>{A(!1)},[]),Z=l?"always":"user",K=m.useReducedMotion()||l?"duration-0":"duration-120",Y={root:s.getStyles({radioSizeRoot:c,radioVariantValueRoot:R?"checked":"unchecked",radioVariantRoot:E,display:"flex",flexDirection:"start"===i?"row":"row-reverse",alignItems:"center",className:s.cx([{"cursor-pointer":!f,"cursor-default":f,"opacity-50":f},S,N?.root])}),radio:s.getStyles({radioSizeRadio:c,radioVariantRadio:E,radioVariantValueRadio:R?"checked":"unchecked",className:s.cx(["border","uds-ring","uds-ring-within",K,"transition-[background-color,border-color]","transition-shadow",N?.radio])}),radioCircle:s.getStyles({radioVariantRadioCircle:E,radioVariantValueRadioCircle:R?"checked":"unchecked",className:s.cx(["pointer-events-none","w-[8px]","h-[8px]",H,K,"transition-opacity"])}),htmlRadio:s.cx("cursor-[inherit]","absolute","opacity-0","top-1/2","left-1/2","w-[calc(100%+2px)]","h-[calc(100%+2px)]","transform","translate-x-[-50%]","translate-y-[-50%]"),label:s.cx("start"===i?"text-start":"text-end",N?.label)},ee=a?m.m.label:m.m.div;return d.jsx(o.SpringMotionConfig,{reducedMotion:Z,...W,children:d.jsxs(ee,{className:Y.root,"data-testid":"container",onHoverStart:U,onHoverEnd:X,onTapStart:J,onTap:Q,onTapCancel:Q,tabIndex:-1,children:[d.jsxs(ue,{position:"relative",borderRadius:"full",alignItems:"center",justifyContent:"center",flex:"none",className:Y.radio,animate:F,insetShadow:_?"lg-invert":"none",children:[d.jsx("input",{type:"radio",tabIndex:0,...I,ref:e=>{w.current=e,"function"==typeof C?C(e):null!==C&&(C.current=e)},onFocus:D,onBlur:G,id:k,name:V,value:p,disabled:f,"aria-invalid":b,onChange:$,...M?{checked:R}:{defaultChecked:x},className:Y.htmlRadio}),d.jsx(s.Box,{borderRadius:"full",className:Y.radioCircle})]}),a&&d.jsx(n.FormLabel,{as:"div",variant:"inherit",color:"inherit",label:a,className:Y.label})]})})});me.displayName="Radio";var he=s.createSlot(),xe=class extends ie{onChangeCb;isControlled;constructor(e,t){super(e),this.isControlled=t}setValue(e,t=!1){this.isControlled&&!t?this.onChangeCb?.(e):super.setValue(e)}},fe=u.forwardRef(function({asChild:e,name:t,value:a,defaultValue:n,onChange:o,...s},i){const r=void 0!==a,c=ce(t),l=u.useMemo(()=>{const e=new xe(c,r);return e.value=r?a:n,e},[n,r,c,a]);u.useEffect(()=>{l.onChangeCb=o},[o,l]),u.useEffect(()=>{r&&l.setValue(a,!0)},[r,l,a]),u.useEffect(()=>l.onChange(e=>o?.(e)),[o,l]);const p=e?he:"div";return d.jsx(re.Provider,{value:l,children:d.jsx(p,{role:"radiogroup",ref:i,...s})})});fe.displayName="RadioGroupProvider";var be={md:{isOnX:20},sm:{isOnX:12}},ge=m.m.create(s.Box),ye={layoutVariant:"bouncy",layoutSpeed:"4"},ve=u.forwardRef(function({id:e,isOn:t,defaultIsOn:a,onChange:i,label:r,labelPosition:c="start",size:l="md",onIcon:p,offIcon:h,reduceMotion:x,disabled:f,required:b,onFocus:g,onBlur:y,className:v,layerClassNames:S,...N},I){const C=u.useId(),j=e??`uds-input-${C}`,k=u.useRef(null),w=void 0!==t,[V,M]=u.useState(w?t:a),[R,P]=u.useState(!1),z=u.useMemo(()=>!f&&R,[f,R]),{isOnX:T}=be[l],B=u.useMemo(()=>({initial:{scale:1,x:V?T:0},animate:{scale:z?1.05:1,x:V?T:0}}),[z,V,T]),A=u.useCallback(e=>{i?.(e),w||M(e.target.checked)},[w,i]),E=u.useCallback(e=>{g?.(e)},[g]),O=u.useCallback(e=>{y?.(e)},[y]),q=u.useCallback(()=>{P(!0)},[]),L=u.useCallback(()=>{P(!1)},[]),H=x?"always":"user",_=m.useReducedMotion()||x?"duration-0":"duration-120";u.useEffect(()=>{w&&M(t)},[t,w]);const F={root:s.getStyles({switchSizeRoot:l,switchVariantRoot:"default",switchVariantActiveRoot:V?"on":"off",display:"flex",flexDirection:"start"===c?"row":"row-reverse",alignItems:"center",className:s.cx("group",{"cursor-pointer":!f,"cursor-default":f,"opacity-50":f},S?.root,v)}),switch:s.getStyles({switchVariantSwitch:"default",switchSizeSwitch:l,switchVariantActiveSwitch:V?"on":"off",borderRadius:"full",position:"relative",alignItems:"center",className:s.cx("uds-ring","uds-ring-within",_,"transition-[background-color,box-shadow]",S?.switch)}),handle:s.getStyles({switchSizeHandle:l,className:s.cx("relative","pointer-events-none","rounded-full","overflow-hidden",S?.handle)}),handleCircle:s.getStyles({switchVariantActiveHandle:V?"on":"off",switchVariantHandle:"default",className:s.cx("absolute","top-0","left-0","right-0","bottom-0","opacity-95 group-hover:opacity-100",_,"transition-[background-color,box-shadow,opacity]")}),handleIcon:s.getStyles({switchSizeHandleIcon:l,switchVariantHandleIcon:"default",switchVariantActiveHandleIcon:V?"on":"off",className:s.cx("absolute","opacity-0","top-1/2","left-1/2","transform","translate-x-[-50%]","translate-y-[-50%]",_,"transition-opacity")}),htmlCheckbox:s.cx("cursor-[inherit]","absolute","opacity-0","top-1/2","left-1/2","w-[calc(100%+2px)]","h-[calc(100%+2px)]","transform","translate-x-[-50%]","translate-y-[-50%]"),label:s.cx("start"===c?"text-start":"text-end",S?.label)},W=r?m.m.label:m.m.div;return d.jsx(o.SpringMotionConfig,{reducedMotion:H,...ye,children:d.jsxs(W,{className:F.root,"data-testid":"container",onHoverStart:q,onHoverEnd:L,tabIndex:-1,children:[d.jsxs(ge,{className:F.switch,children:[d.jsx("input",{type:"checkbox",tabIndex:0,...N,ref:e=>{k.current=e,"function"==typeof I?I(e):null!==I&&(I.current=e)},onFocus:E,onBlur:O,id:j,disabled:f,required:b,checked:w?V:void 0,defaultChecked:w?void 0:a,onChange:A,className:F.htmlCheckbox,style:{}}),d.jsxs(ge,{className:F.handle,...B,children:[d.jsx(s.Box,{className:F.handleCircle}),p&&d.jsx(s.IconSlot,{icon:p,iconProps:{variant:"fill",size:"sm"},"data-testid":"on-icon",className:s.cx(F.handleIcon,V?"opacity-100":"opacity-0")}),h&&d.jsx(s.IconSlot,{icon:h,iconProps:{variant:"fill",size:"sm"},"data-testid":"off-icon",className:s.cx(F.handleIcon,V?"opacity-0":"opacity-100")})]})]}),r&&d.jsx(n.FormLabel,{as:"div",variant:"inherit",color:"inherit",required:b,label:r,className:F.label})]})})});ve.displayName="Switch",Object.defineProperty(exports,"Pressable",{enumerable:!0,get:function(){return t.Pressable}}),Object.defineProperty(exports,"SpringMotionConfig",{enumerable:!0,get:function(){return o.SpringMotionConfig}}),Object.defineProperty(exports,"Menu",{enumerable:!0,get:function(){return h.Menu}}),exports.Avatar=k,exports.AvatarIcon=I,exports.AvatarImage=j,exports.AvatarText=C,exports.Badge=w,exports.Button=E,exports.Checkbox=W,exports.Chip=K,exports.ChipButton=X,exports.ChipDismissible=J,exports.ChipLink=Q,exports.ChipToggle=Z,exports.IconButton=Y,exports.Input=se,exports.Radio=me,exports.RadioGroupProvider=fe,exports.Switch=ve;
2
+ "use strict";var e=require("../chunk-H2XDX4D2.cjs"),t=require("../chunk-H5RFGJT6.cjs"),a=require("../chunk-IWTF6VT4.cjs"),n=require("../chunk-MQ5HBFA2.cjs"),o=require("../chunk-TWH2EAVG.cjs"),i=require("../chunk-3VUEFW4X.cjs"),s=require("../chunk-ZSA4T523.cjs"),r=require("../chunk-DEYTPNUJ.cjs"),c=require("../chunk-LNZSNDOV.cjs"),l=require("../chunk-QLXJH36U.cjs"),u=require("react"),d=require("react/jsx-runtime"),p=require("@yahoo/uds/fixtures"),m=require("motion/react"),h=require("@yahoo/uds/client/Menu"),x=l.__toESM(r.require_isFunction(),1),f={first:e=>e[0]??"",last:e=>e[e.length-1]??"",firstAndLast:e=>1===e.length?e[0]:`${e[0]}${e[e.length-1]}`,firstTwo:e=>e.slice(0,2).join(""),firstThree:e=>e.slice(0,3).join(""),firstOfEach:e=>e.join("")},b=(e,t="firstAndLast")=>{if(!e)return"";if((0,x.default)(t))return t(e);const a=e.trim().split(/\s+/).map(e=>e[0].toUpperCase());return f[t](a)},g=(e="md",t)=>{const{className:a,...n}=t??{};return i.getStyles({avatarSizeRoot:e,...n,className:i.cx("shrink-0","text-center","inline-flex","justify-center","items-center","overflow-visible","truncate",a)})},y=e=>{const t=e?{height:e,width:e}:{};return{root:t,contents:{...t,boxSizing:"content-box"}}},v="primary",S="md",N={primary:t.e2,secondary:t.t},I=({size:e=S,variant:t=v,customSize:a,icon:n,slotProps:o,className:s,...r})=>{const c=u.useMemo(()=>({root:g(e,{avatarIconVariantRoot:t,overflow:"hidden",className:i.cx("overflow-hidden",s)}),iconContainer:i.cx("w-full","h-full","shrink-0","overflow-hidden","text-center","inline-flex","justify-center","items-center"),icon:i.getStyles({avatarSizeIcon:e})}),[s,e,t]),l=u.useMemo(()=>y(a),[a]),p=n??N[t??"primary"];return d.jsx(i.Box,{className:c.root,style:l.root,...r,children:d.jsx(i.Box,{className:c.iconContainer,style:l.contents,children:d.jsx(i.IconSlot,{icon:p,iconProps:{variant:"fill",color:"current",...o?.icon},className:c.icon})})})};/*! © 2025 Yahoo, Inc. UDS v0.0.0-development */I.displayName="AvatarIcon";var C=({size:e=S,variant:t=v,name:a,initials:n,customSize:o,abbreviationStrategy:s,className:r,slotProps:c,...l})=>{const p=u.useMemo(()=>({root:g(e,{avatarTextVariantRoot:t,className:i.cx("overflow-hidden","truncate",r)}),text:i.cx("w-full","h-full","shrink-0","overflow-hidden","text-center","inline-flex","justify-center","items-center","truncate")}),[r,e,t]),m=u.useMemo(()=>y(o),[o]);return d.jsx(i.Box,{className:p.root,style:m.root,...l,children:d.jsx(i.Text,{color:"inherit",variant:"inherit",className:p.text,style:m.contents,...c?.text,children:n||b(a,s)})})};C.displayName="AvatarText";var j=({size:t=S,variant:a=v,src:n,srcSet:o,customSize:s,alt:r,abbreviationStrategy:c,fallback:l,className:p,imageProps:m,slotProps:h,...x})=>{const[f,b]=u.useState("loading");u.useEffect(()=>{let e=!0;if(n||o){const t=new Image;t.onload=()=>{e&&b("loaded")},t.onerror=()=>{e&&b("error")},n&&(t.src=n),o&&(t.srcset=o)}else b("error");return()=>{e=!1}},[n,o]);const N=u.useMemo(()=>({root:g(t,{avatarImageVariantRoot:a,className:i.cx("overflow-hidden",p)}),contents:i.cx("w-full","h-full","shrink-0","text-center","inline-flex","justify-center","items-center","object-cover")}),[p,t,a]),j=u.useMemo(()=>y(s),[s]);if("loaded"===f)return d.jsx(i.Box,{className:N.root,style:j.root,children:d.jsx(e.Image,{src:n,srcSet:o,alt:r,className:N.contents,style:j.contents,...m,...h?.image})});const k={...x,size:t,customSize:s,variant:a};return l||r?d.jsx(C,{name:r,initials:l,abbreviationStrategy:c,slotProps:{text:h?.text},...k}):d.jsx(I,{...k,slotProps:{icon:h?.icon}})};j.displayName="AvatarImage";var k=e=>d.jsx(j,{...e});k.displayName="Avatar";var V=u.forwardRef(function({variant:e="primary",size:t="md",minWidth:n,maxWidth:o=200,startIcon:s,endIcon:r,backgroundColor:c,color:l,iconColor:p,borderColor:m,children:h,className:x,...f},b){const g=i.getStyles({badgeSizeRoot:t,badgeVariantRoot:e,className:i.cx(["uds-badge","uds-badge-variant","uds-badge-size",x])}),y=i.getStyles({badgeVariantIcon:e,badgeSizeIcon:t,className:i.cx(["uds-badge-iconSize","uds-badge-iconColor"])}),v=u.useMemo(()=>({...n?{minWidth:`${n}px`}:{},..."full"===o?{}:{maxWidth:`${o}px`},...c?{backgroundColor:c}:{},...m?{borderColor:m}:{},...l?{color:l}:{}}),[c,m,l,o,n]),S=u.useMemo(()=>({variant:"fill",style:{...p?{color:p}:{}}}),[p]);return d.jsxs(a.HStack,{ref:b,gap:"2",display:"inline-flex",alignItems:"center",className:g,style:v,...f,children:[s&&d.jsx(i.IconSlot,{icon:s,iconProps:S,"data-testid":"start-icon",className:y}),d.jsx("span",{className:"flex-1 truncate whitespace-nowrap text-center",children:h}),r&&d.jsx(i.IconSlot,{icon:r,iconProps:S,"data-testid":"end-icon",className:y})]})});V.displayName="Badge";var w={scale:.7,opacity:0},M={scale:[.7,.7,1],opacity:[0,0,1],transition:{times:[0,.5,1]}},R={icon:M,hide:w,loading:w},P={loading:M,hide:w,icon:w},z=`var(${c.BUTTON_CSS_VAR_MAP.columnGap})`,T=`var(${c.BUTTON_CSS_VAR_MAP.iconSize})`,B={rest:{scale:`var(${c.BUTTON_CSS_VAR_MAP.effects.scale.rest})`},hover:{scale:`var(${c.BUTTON_CSS_VAR_MAP.effects.scale.hover})`},pressed:{scale:`var(${c.BUTTON_CSS_VAR_MAP.effects.scale.pressed})`},withoutIcon:{columnGap:"0px"},withIcon:{columnGap:z}},H={hide:{width:"0px",opacity:0,display:"none"},loading:{width:T,display:"flex",opacity:1},icon:{width:T,display:"flex",opacity:1}},A=u.forwardRef(function({variant:e,size:a,startIcon:n,endIcon:r,iconVariant:c,loading:l,disableEffects:h,children:x,asChild:f,type:b="button",className:g,width:y,...v},S){const N=u.useRef(null);u.useImperativeHandle(S,()=>N.current);const I=u.useMemo(()=>i.createSlot(),[]),C=u.useMemo(()=>m.m.create(I),[I]),j=r?"icon":"hide",k=(({startIcon:e,endIcon:t,loading:a})=>e||t||a?"withIcon":"withoutIcon")({startIcon:n,endIcon:r,loading:l}),V=(({loading:e,startIcon:t})=>e?"loading":t?"icon":"hide")({loading:l,startIcon:n}),{palette:w,variant:M}=u.useMemo(()=>s.parseDeprecatedButtonPaletteVariant({flatVariant:e}),[e]),z=u.useMemo(()=>({button:i.getStyles({width:y,buttonSize:a,buttonVariant:M,buttonPalette:w,className:i.cx("uds-button","uds-ring","uds-hit-target",l&&"uds-button-loading",h&&"uds-button-without-effects","withIcon"===k&&"uds-button-with-gap",g)}),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"}),[y,a,M,w,g,l,h,k]),T=m.useReducedMotion()?"smooth":"subtle",A=u.useMemo(()=>d.jsx(m.m.span,{className:z.iconContainer,initial:!1,variants:H,animate:V,children:d.jsxs(m.AnimatePresence,{initial:!1,mode:"popLayout",children:[l&&d.jsx(m.m.span,{variants:P,initial:"hide",animate:"loading",exit:"hide",children:d.jsx(i.Icon,{size:p.buttonIconSvgSize,name:t.o2,variant:c,color:"current",className:z.loading})},"loading"),n&&!l&&d.jsx(m.m.span,{variants:R,initial:"hide",animate:"icon",exit:"hide",children:d.jsx(i.IconSlot,{className:z.start,icon:n,iconProps:{size:p.buttonIconSvgSize,variant:c,color:"current"}})})]})}),[z.iconContainer,z.loading,z.start,V,l,c,n]),E=u.useMemo(()=>d.jsx(m.m.span,{className:z.iconContainer,initial:!1,variants:H,animate:j,children:d.jsx(m.AnimatePresence,{initial:!1,mode:"popLayout",children:r&&d.jsx(m.m.span,{variants:R,initial:"hide",animate:"icon",exit:"hide",children:d.jsx(i.IconSlot,{className:z.end,icon:r,iconProps:{size:p.buttonIconSvgSize,variant:c,color:"current"}})})})}),[z.iconContainer,z.end,r,j,c]),O=u.useMemo(()=>h?{...B,rest:{},hover:{},pressed:{}}:B,[h]);return f&&u.isValidElement(x)?d.jsx(o.SpringMotionConfig,{layoutSpeed:"3",layoutVariant:T,children:d.jsx(C,{type:b,className:z.button,initial:["hide",k],animate:k,variants:O,whileHover:"hover",whileTap:"pressed",...v,children:u.cloneElement(x,x.props,d.jsxs(d.Fragment,{children:[A,d.jsx("span",{className:z.content,children:x.props.children}),E]}))})}):d.jsx(o.SpringMotionConfig,{layoutSpeed:"3",layoutVariant:T,children:d.jsxs(m.m.button,{ref:N,type:b,className:z.button,initial:["hide",k],animate:k,variants:O,whileHover:"hover",whileTap:"pressed",...v,children:[A,d.jsx("span",{className:z.content,children:x}),E]})})}),E={primary:"alert",secondary:"alert-secondary"},O=e=>"indeterminate"===e,q=e=>O(e)?t.o:t.e,L=m.m.create(i.Box),F={layoutVariant:"smooth",layoutSpeed:"3"},_={layoutVariant:"veryBouncy",layoutSpeed:"4"},W=u.forwardRef(function({id:e,checked:t,defaultChecked:a,onChange:s,label:r,labelPosition:c="start",variant:l="primary",size:p="md",reduceMotion:h,disabled:x,required:f,hasError:b,className:g,layerClassNames:y,...v},S){const N=u.useId(),I=e??`uds-input-${N}`,C=u.useRef(null),j=void 0!==t,[k,V]=u.useState(j?t:a),[w,M]=u.useState(!1),[R,P]=u.useState(!1),z=u.useMemo(()=>b?E[l]:l,[b,l]),T=!x&&w,B=!x&&R,H=u.useMemo(()=>B?.9:T?1.1:1,[B,T]),A=u.useMemo(()=>k?B?"opacity-55":"opacity-100":"opacity-0",[k,B]),W=u.useMemo(()=>({scale:H}),[H]),$=u.useMemo(()=>R?_:F,[R]),D=u.useCallback(e=>{s?.(e),j||V(e.target.checked)},[j,s]),G=u.useCallback(()=>{M(!0)},[]),U=u.useCallback(()=>{M(!1)},[]),X=u.useCallback(()=>{P(!0)},[]),J=u.useCallback(()=>{P(!1)},[]),Q=e=>{C.current&&(C.current.indeterminate=O(e))},Z=h?"always":"user",Y=m.useReducedMotion()||h?"duration-0":"duration-120";u.useEffect(()=>{j&&V(t)},[t,j]),u.useEffect(()=>{Q(k)},[k]);const K=O(k)?"indeterminate":k?"checked":"unchecked",ee={root:i.getStyles({checkboxSizeRoot:p,checkboxVariantRoot:z,checkboxVariantValueRoot:K,display:"flex",flexDirection:"start"===c?"row":"row-reverse",alignItems:"center",className:i.cx({"cursor-pointer":!x,"cursor-default":x,"opacity-50":x},g,y?.root)}),checkbox:i.getStyles({checkboxSizeCheckbox:p,checkboxVariantCheckbox:z,checkboxVariantValueCheckbox:K,className:i.cx("border","rounded-[4px]","uds-ring","uds-ring-within",Y,"transition-[background-color,border-color,box-shadow]",y?.checkbox)}),check:i.getStyles({checkboxVariantCheckboxIcon:z,checkboxVariantValueCheckboxIcon:K,className:i.cx("pointer-events-none",A,Y,"transition-opacity")}),htmlCheckbox:i.cx("cursor-[inherit]","absolute","opacity-0","top-1/2","left-1/2","w-[calc(100%+2px)]","h-[calc(100%+2px)]","transform","translate-x-[-50%]","translate-y-[-50%]"),label:i.cx("start"===c?"text-start":"text-end",y?.label)},te=r?m.m.label:m.m.div;return d.jsx(o.SpringMotionConfig,{reducedMotion:Z,...$,children:d.jsxs(te,{className:ee.root,"data-testid":"container",onHoverStart:G,onHoverEnd:U,onTapStart:X,onTap:J,onTapCancel:J,tabIndex:-1,children:[d.jsxs(L,{position:"relative",className:ee.checkbox,alignItems:"center",justifyContent:"center",flex:"none",animate:W,children:[d.jsx("input",{type:"checkbox",tabIndex:0,...v,ref:e=>{C.current=e,Q(k),"function"==typeof S?S(e):null!==S&&(S.current=e)},id:I,disabled:x,required:f,"aria-invalid":b,checked:j?!O(k)&&k:void 0,defaultChecked:j?void 0:a,onChange:D,className:ee.htmlCheckbox}),d.jsx(i.Icon,{name:q(k),size:"sm",className:ee.check})]}),r&&d.jsx(n.FormLabel,{as:"div",variant:"inherit",color:"inherit",required:f,label:r,className:ee.label})]})})});W.displayName="Checkbox";var $=(e,t,a="overwriteOriginal")=>{const n=Array.from(new Set([...Object.keys(e??{}),...Object.keys(t??{})]));return Object.fromEntries(n.map(n=>{const o=e?.[n],s=t?.[n];return o&&!s?[n,o]:s&&!o?[n,s]:"className"===n?[n,i.cx(o,s)]:"keepOriginal"===a?[n,o]:[n,s]}))},D=(e,t,a="overwriteOriginal")=>{if(!e)return t;const n=Array.from(new Set([...Object.keys(e),...Object.keys(t)]));return Object.fromEntries(n.map(n=>{const o=e[n],i=t[n];return[n,$(o,i,a)]}))},G="primary",U=u.forwardRef(function({size:e="md",minWidth:t,maxWidth:n=200,startIcon:o,endIcon:s,as:r="div",reduceMotion:c,disabled:l=!1,className:p,slotProps:h,children:x,...f},b){const g=m.useReducedMotion()||c?"duration-0":"duration-120",{className:y,...v}=h?.text??{},{className:S,...N}=h?.startIcon??{},{className:I,...C}=h?.endIcon??{},j=u.useMemo(()=>({root:i.getStyles({chipSizeRoot:e,className:i.cx({"pointer-events-none":l,"cursor-default":l,"opacity-50":l},"inline-flex","items-center","focus-visible:-outline-offset-2","uds-ring",g,"transition-[background-color,outline-color,box-shadow]",p)}),text:i.cx("truncate","whitespace-nowrap","text-center","flex-1",y),icon:i.getStyles({chipSizeIcon:e})}),[p,g,l,e,y]),k=u.useMemo(()=>({root:{maxWidth:`${n}px`,...t?{minWidth:`${t}px`}:{}}}),[n,t]);return d.jsx(a.HStack,{asChild:!0,ref:b,className:j.root,style:k.root,...f,children:d.jsxs(r,{disabled:l,children:[o&&d.jsx(i.IconSlot,{icon:o,iconProps:{variant:"fill",className:i.cx(j.icon,S),...N}}),d.jsx(i.Text,{as:"span",color:"current",variant:"inherit",className:j.text,...v,children:x}),s&&d.jsx(i.IconSlot,{icon:s,iconProps:{variant:"fill",className:i.cx(j.icon,I),...C}})]})})});U.displayName="ChipBase";var X=u.forwardRef(function({variant:e=G,slotProps:t,className:a,...n},o){const s=u.useMemo(()=>({root:i.getStyles({chipLinkVariantRoot:e,className:a}),icon:i.getStyles({chipLinkVariantIcon:e})}),[a,e]),r=D(t,{startIcon:{className:s.icon},endIcon:{className:s.icon}});return d.jsx(U,{as:"button",ref:o,tabIndex:0,className:s.root,slotProps:r,...n})});X.displayName="ChipButton";var J=u.forwardRef(function({dismissButtonAriaLabel:e,onDismiss:a,dismissIcon:n,variant:o=G,disabled:s,slotProps:r,className:c,...l},p){const m=u.useMemo(()=>({root:i.getStyles({chipDismissibleVariantRoot:o,className:c}),icon:i.getStyles({chipDismissibleVariantIcon:o}),iconPressable:i.cx("uds-chip-dismissible-button","uds-hit-target")}),[c,o]),h=u.useCallback(e=>{e.stopPropagation(),a?.()},[a]),x=D(r,{startIcon:{className:m.icon},endIcon:{className:m.icon}});return d.jsx(U,{ref:p,disabled:s,tabIndex:-1,endIcon:a=>d.jsx(t.Pressable,{"aria-label":e,className:m.iconPressable,onClick:h,disabled:s,children:d.jsx(i.IconSlot,{icon:n??t.a,iconProps:a})}),className:m.root,slotProps:x,...l})});J.displayName="ChipDismissible";var Q=u.forwardRef(function({variant:e=G,href:t,disabled:a,slotProps:n,className:o,...s},r){const c=u.useMemo(()=>({root:i.getStyles({chipLinkVariantRoot:e,className:o}),icon:i.getStyles({chipLinkVariantIcon:e})}),[o,e]),l=D(n,{startIcon:{className:c.icon},endIcon:{className:c.icon}});return d.jsx(U,{as:"a",ref:r,disabled:a,className:c.root,slotProps:l,tabIndex:0,...{...s,href:a?void 0:t}})});Q.displayName="ChipLink";var Z=u.forwardRef(function({isToggled:e=!1,onToggle:t,onClick:a,variant:n=G,slotProps:o,className:s,...r},c){const l=u.useMemo(()=>({root:i.getStyles({chipToggleVariantRoot:n,chipToggleVariantActiveRoot:e?"on":"off",className:s}),icon:i.getStyles({chipToggleVariantIcon:n})}),[s,e,n]),p=u.useCallback(n=>{t?.(!e),a?.(n)},[e,a,t]),m=D(o,{startIcon:{className:l.icon},endIcon:{className:l.icon}});return d.jsx(U,{ref:c,as:"button",onClick:p,"aria-pressed":e,className:l.root,slotProps:m,tabIndex:0,...r})});Z.displayName="ChipToggle";var Y=u.forwardRef(function({onClick:e,href:t,linkProps:a,onDismiss:n,onToggle:o,isToggled:i,slotProps:s,...r},c){const{anchor:l,...u}=s??{};return n?d.jsx(J,{ref:c,onDismiss:n,slotProps:u,...r}):o?d.jsx(Z,{ref:c,onToggle:o,isToggled:i,slotProps:u,...r}):t?d.jsx(Q,{ref:c,href:t,slotProps:u,...r,...a,...l}):d.jsx(X,{ref:c,onClick:e,slotProps:u,...r})});Y.displayName="Chip";var K=u.forwardRef(function({variant:e,size:a,iconVariant:n,loading:r,disableEffects:c,name:l,type:h="button",htmlName:x,className:f,children:b,...g},y){const v=u.useRef(null);u.useImperativeHandle(y,()=>v.current);const{palette:S,variant:N}=s.parseDeprecatedButtonPaletteVariant({flatVariant:e}),I=u.useMemo(()=>({button:i.getStyles({buttonVariant:N,buttonPalette:S,iconButtonSize:a,className:i.cx("uds-icon-button","uds-button","uds-ring","uds-hit-target",r&&"uds-button-loading",c&&"uds-button-without-effects",f)}),loading:"uds-button-icon start-content animate-spin",icon:"uds-button-icon start-content"}),[S,N,f,c,a,r]),C=m.useReducedMotion(),j=u.useMemo(()=>C?"smooth":"subtle",[C]),k=u.useMemo(()=>{const{rest:e,hover:t,pressed:a}=B;return c?{rest:{},hover:{},pressed:{}}:{rest:e,hover:t,pressed:a}},[c]);return d.jsx(o.SpringMotionConfig,{layoutSpeed:"3",layoutVariant:j,reducedMotion:c?"always":"user",children:d.jsx(m.m.button,{ref:v,type:h,className:I.button,initial:"icon",variants:k,whileHover:"hover",whileTap:"pressed",name:x,...g,children:d.jsxs(m.AnimatePresence,{initial:!1,mode:"popLayout",children:[r&&d.jsx(m.m.span,{variants:P,initial:"loading",animate:"loading",exit:"hide",children:d.jsx(i.Icon,{size:p.buttonIconSvgSize,name:t.o2,variant:n,color:"current",className:I.loading})},"loading"),l&&!r&&d.jsx(m.m.span,{variants:R,initial:"icon",animate:"icon",exit:"hide",children:b||d.jsx(i.Icon,{size:p.buttonIconSvgSize,name:l,variant:n,color:"current",className:I.icon})},l.name)]})})})}),ee=l.__toESM(r.require_isFunction(),1),te=({children:e,reduceMotion:t,layoutVariant:a})=>{const n=u.useRef(null),[i,s]=u.useState("auto");return u.useEffect(()=>{if(n.current){const e=new ResizeObserver(e=>{s(e[0].contentRect.height)});return e.observe(n.current),()=>{e.disconnect()}}},[]),d.jsx(o.SpringMotionConfig,{reducedMotion:t,layoutSpeed:"4",layoutVariant:a,children:d.jsx(m.m.div,{className:"overflow-hidden",style:{height:i,opacity:0},animate:{height:i,opacity:1},children:d.jsx("div",{ref:n,children:e})})})};function ae({startIcon:e,endIcon:t,iconProps:n,children:o,size:s,isFilled:r,...c}){const l={helperText:i.cx(i.getStyles({inputSizeHelperText:s,inputVariantHelperText:"default",inputVariantValueHelperText:r?"filled":"empty"})),helperIcon:i.getStyles({inputSizeHelperIcon:s,inputVariantHelperIcon:"default",inputVariantValueHelperIcon:r?"filled":"empty"})},u={variant:"outline",...n};return d.jsxs(a.HStack,{gap:"1",alignItems:"center",...c,children:[e&&d.jsx(i.IconSlot,{icon:e,...u,iconProps:n,className:l.helperIcon}),d.jsx("span",{className:l.helperText,children:o}),t&&d.jsx(i.IconSlot,{icon:t,...u,iconProps:n,className:l.helperIcon})]})}ae.displayName="InputHelpTextInternal";var ne=u.memo(ae),oe=u.memo(function({helpText:e,helperTextIcon:t,spacingStart:a,spacingTop:n,size:o,isFilled:s,...r}){return e?d.jsx(i.Box,{spacingTop:n,spacingStart:a,...r,children:d.jsx(ne,{startIcon:t,size:o,isFilled:s,children:(0,ee.default)(e)?e():e})}):null}),ie=u.memo(function({icon:e,className:t,iconProps:a}){return e?d.jsx(i.IconSlot,{icon:e,iconProps:{variant:"outline",...a},className:t}):null}),se=u.memo(function({icon:e,className:t,iconProps:a}){return e?d.jsx(i.IconSlot,{icon:e,iconProps:{variant:"outline",...a},className:t}):null}),re=u.forwardRef(function({id:e,label:t,type:n="text",size:o="md",startIcon:s,endIcon:r,helpText:c,helperTextIcon:l,hasError:p,width:h="full",defaultValue:x,required:f,readOnly:b,disabled:g,reduceMotion:y,onChange:v,slotProps:S,className:N,...I},C){const j=u.useId(),k=e??`uds-input-${j}`,V=`uds-input-${k}-help-text`,{className:w,...M}=S?.input??{},{className:R,...P}=S?.inputWrapper??{},z=u.useRef(null);u.useImperativeHandle(C,()=>z.current);const[T,B]=u.useState(x??""),H=u.useCallback(e=>{B(e.target.value),v?.(e)},[v]),A=m.useReducedMotion()?"smooth":"bouncy",E=y?"always":"user",O=!b&&!g,q={root:i.getStyles({inputSizeRoot:o,inputVariantRoot:"default",inputVariantValueRoot:T?"filled":"empty",className:i.cx([N,g?"opacity-50":""])}),inputWrapper:i.cx(i.getStyles({inputSizeInputWrapper:o,inputVariantInputWrapper:"default",inputVariantValueInputWrapper:T?"filled":"empty"}),"min-w-[200px]",R),input:i.getStyles({inputSizeInput:o,inputVariantInput:"default",inputVariantValueInput:T?"filled":"empty",inputVariantInputPlaceholder:"default",inputVariantValueInputPlaceholder:T?"filled":"empty",className:i.cx("grow","uds-hit-target","bg-clip-text","focus:outline-none",O?"cursor-text":"cursor-not-allowed",w)}),label:i.cx(i.getStyles({inputSizeLabel:o,inputVariantLabel:"default",inputVariantValueLabel:T?"filled":"empty"})),labelRequired:i.getStyles({inputVariantLabelRequired:"default",inputVariantValueLabelRequired:T?"filled":"empty"}),startIcon:i.getStyles({inputSizeStartIcon:o,inputVariantStartIcon:"default",inputVariantValueStartIcon:T?"filled":"empty"}),endIcon:i.getStyles({inputSizeEndIcon:o,inputVariantEndIcon:"default",inputVariantValueEndIcon:T?"filled":"empty"})};return d.jsxs(a.VStack,{width:h,className:q.root,children:[t&&d.jsxs(i.Box,{spacingBottom:"2",columnGap:"0.5",alignItems:"flex-end",className:q.label,children:[d.jsx("label",{htmlFor:k,children:(0,ee.default)(t)?t():t}),f&&d.jsx("span",{className:q.labelRequired,children:"*"})]}),d.jsxs(i.Box,{position:"relative",alignItems:"center",...P,className:q.inputWrapper,children:[d.jsx(ie,{icon:s,className:q.startIcon,iconProps:S?.startIcon}),d.jsx("input",{ref:z,id:k,type:n,value:T,required:f,readOnly:b,disabled:g,"aria-describedby":V,"aria-invalid":p,onChange:H,className:q.input,...I,...M}),r&&d.jsx(a.HStack,{alignItems:"center",gap:"1",children:d.jsx(se,{icon:r,className:q.endIcon,iconProps:S?.endIcon})})]}),d.jsx(te,{reduceMotion:E,layoutVariant:A,children:d.jsx(oe,{id:V,helpText:c,spacingTop:"2",size:o,isFilled:!!T,helperTextIcon:l})})]})});re.displayName="Input";var ce=({size:e="md",isFilled:t,...a})=>{const n={root:i.getStyles({inputSizeRoot:e,inputVariantRoot:"default",inputVariantValueRoot:t?"filled":"empty"})};return d.jsx(i.Box,{asChild:!0,spacingTop:"2",className:n.root,children:d.jsx(ne,{size:e,isFilled:t,...a})})};ce.displayName="InputHelpText";var le=class e{name;value;activeCount=0;#e=new Set;constructor(e){this.name=e}onChange(e){return this.#e.add(e),()=>{this.#e.delete(e)}}setValue(e){this.value=e,this.#e.forEach(t=>t(e))}static findOrCreate(t,a){let n=t.get(a);return n||(n=new e(a),t.set(a,n)),n}},ue=u.createContext(new Map),de=e=>{const t=u.useId();return e??`uds-radio-group-${t}`},pe={primary:"alert",secondary:"alert-secondary"},me=m.m.create(i.Box),he={layoutVariant:"smooth",layoutSpeed:"3"},xe={layoutVariant:"veryBouncy",layoutSpeed:"4"},fe=u.forwardRef(function({id:e,name:t,label:a,labelPosition:s="start",variant:r="primary",size:c="md",reduceMotion:l,value:p="",checked:h,defaultChecked:x,disabled:f,hasError:b,onChange:g,onFocus:y,onBlur:v,className:S,layerClassNames:N,...I},C){const j=u.useId(),k=e??`uds-radio-${j}`,V=u.useRef(null),{name:w,isControlled:M,checked:R,setGroupValue:P}=(({name:e,value:t,checked:a,defaultChecked:n})=>{const o=u.useContext(ue),i=o instanceof le,s=void 0!==a||i,r=de(e),c=u.useMemo(()=>i?o:le.findOrCreate(o,r),[o,i,r]),[l,d]=u.useState(c.value),p=c.name??r,m=u.useCallback(e=>{c.setValue(e),s||d(e)},[s,c]);return u.useEffect(()=>c.onChange(d),[c]),u.useEffect(()=>{!0===a&&m(t)},[a,t,m]),u.useEffect(()=>{if(i)return;const e=le.findOrCreate(o,p);return e.activeCount+=1,o.set(p,e),()=>{const e=o.get(p);e&&(e.activeCount-=1,0===e.activeCount&&o.delete(p))}},[o,i,p]),{name:p,isControlled:s,checked:s&&!i?a:void 0!==l?t===l:n??!1,setGroupValue:m}})({name:t,value:p,checked:h,defaultChecked:x}),[z,T]=u.useState(!1),[B,H]=u.useState(!1),A=u.useMemo(()=>b?pe[r]:r,[b,r]),E=u.useMemo(()=>!f&&z,[f,z]),O=u.useMemo(()=>!f&&!R&&B,[R,f,B]),q=u.useMemo(()=>O?.9:E?1.1:1,[E,O]),L=u.useMemo(()=>R?O?"opacity-55":"opacity-100":"opacity-0",[R,O]),F=u.useMemo(()=>!f&&(O&&!R||E&&R),[R,f,E,O]),_=u.useMemo(()=>({scale:q}),[q]),W=u.useMemo(()=>B?xe:he,[B]),$=u.useCallback(e=>{P(e.target.value),g?.(e)},[g,P]),D=u.useCallback(e=>{y?.(e)},[y]),G=u.useCallback(e=>{v?.(e)},[v]),U=u.useCallback(()=>{T(!0)},[]),X=u.useCallback(()=>{T(!1)},[]),J=u.useCallback(()=>{H(!0)},[]),Q=u.useCallback(()=>{H(!1)},[]),Z=l?"always":"user",Y=m.useReducedMotion()||l?"duration-0":"duration-120",K={root:i.getStyles({radioSizeRoot:c,radioVariantValueRoot:R?"checked":"unchecked",radioVariantRoot:A,display:"flex",flexDirection:"start"===s?"row":"row-reverse",alignItems:"center",className:i.cx([{"cursor-pointer":!f,"cursor-default":f,"opacity-50":f},S,N?.root])}),radio:i.getStyles({radioSizeRadio:c,radioVariantRadio:A,radioVariantValueRadio:R?"checked":"unchecked",className:i.cx(["border","uds-ring","uds-ring-within",Y,"transition-[background-color,border-color]","transition-shadow",N?.radio])}),radioCircle:i.getStyles({radioVariantRadioCircle:A,radioVariantValueRadioCircle:R?"checked":"unchecked",className:i.cx(["pointer-events-none","w-[8px]","h-[8px]",L,Y,"transition-opacity"])}),htmlRadio:i.cx("cursor-[inherit]","absolute","opacity-0","top-1/2","left-1/2","w-[calc(100%+2px)]","h-[calc(100%+2px)]","transform","translate-x-[-50%]","translate-y-[-50%]"),label:i.cx("start"===s?"text-start":"text-end",N?.label)},ee=a?m.m.label:m.m.div;return d.jsx(o.SpringMotionConfig,{reducedMotion:Z,...W,children:d.jsxs(ee,{className:K.root,"data-testid":"container",onHoverStart:U,onHoverEnd:X,onTapStart:J,onTap:Q,onTapCancel:Q,tabIndex:-1,children:[d.jsxs(me,{position:"relative",borderRadius:"full",alignItems:"center",justifyContent:"center",flex:"none",className:K.radio,animate:_,insetShadow:F?"lg-invert":"none",children:[d.jsx("input",{type:"radio",tabIndex:0,...I,ref:e=>{V.current=e,"function"==typeof C?C(e):null!==C&&(C.current=e)},onFocus:D,onBlur:G,id:k,name:w,value:p,disabled:f,"aria-invalid":b,onChange:$,...M?{checked:R}:{defaultChecked:x},className:K.htmlRadio}),d.jsx(i.Box,{borderRadius:"full",className:K.radioCircle})]}),a&&d.jsx(n.FormLabel,{as:"div",variant:"inherit",color:"inherit",label:a,className:K.label})]})})});fe.displayName="Radio";var be=i.createSlot(),ge=class extends le{onChangeCb;isControlled;constructor(e,t){super(e),this.isControlled=t}setValue(e,t=!1){this.isControlled&&!t?this.onChangeCb?.(e):super.setValue(e)}},ye=u.forwardRef(function({asChild:e,name:t,value:a,defaultValue:n,onChange:o,...i},s){const r=void 0!==a,c=de(t),l=u.useMemo(()=>{const e=new ge(c,r);return e.value=r?a:n,e},[n,r,c,a]);u.useEffect(()=>{l.onChangeCb=o},[o,l]),u.useEffect(()=>{r&&l.setValue(a,!0)},[r,l,a]),u.useEffect(()=>l.onChange(e=>o?.(e)),[o,l]);const p=e?be:"div";return d.jsx(ue.Provider,{value:l,children:d.jsx(p,{role:"radiogroup",ref:s,...i})})});ye.displayName="RadioGroupProvider";var ve={md:{isOnX:20},sm:{isOnX:12}},Se=m.m.create(i.Box),Ne={layoutVariant:"bouncy",layoutSpeed:"4"},Ie=u.forwardRef(function({id:e,isOn:t,defaultIsOn:a,onChange:s,label:r,labelPosition:c="start",size:l="md",onIcon:p,offIcon:h,reduceMotion:x,disabled:f,required:b,onFocus:g,onBlur:y,className:v,layerClassNames:S,...N},I){const C=u.useId(),j=e??`uds-input-${C}`,k=u.useRef(null),V=void 0!==t,[w,M]=u.useState(V?t:a),[R,P]=u.useState(!1),z=u.useMemo(()=>!f&&R,[f,R]),{isOnX:T}=ve[l],B=u.useMemo(()=>({initial:{scale:1,x:w?T:0},animate:{scale:z?1.05:1,x:w?T:0}}),[z,w,T]),H=u.useCallback(e=>{s?.(e),V||M(e.target.checked)},[V,s]),A=u.useCallback(e=>{g?.(e)},[g]),E=u.useCallback(e=>{y?.(e)},[y]),O=u.useCallback(()=>{P(!0)},[]),q=u.useCallback(()=>{P(!1)},[]),L=x?"always":"user",F=m.useReducedMotion()||x?"duration-0":"duration-120";u.useEffect(()=>{V&&M(t)},[t,V]);const _={root:i.getStyles({switchSizeRoot:l,switchVariantRoot:"default",switchVariantActiveRoot:w?"on":"off",display:"flex",flexDirection:"start"===c?"row":"row-reverse",alignItems:"center",className:i.cx("group",{"cursor-pointer":!f,"cursor-default":f,"opacity-50":f},S?.root,v)}),switch:i.getStyles({switchVariantSwitch:"default",switchSizeSwitch:l,switchVariantActiveSwitch:w?"on":"off",borderRadius:"full",position:"relative",alignItems:"center",className:i.cx("uds-ring","uds-ring-within",F,"transition-[background-color,box-shadow]",S?.switch)}),handle:i.getStyles({switchSizeHandle:l,className:i.cx("relative","pointer-events-none","rounded-full","overflow-hidden",S?.handle)}),handleCircle:i.getStyles({switchVariantActiveHandle:w?"on":"off",switchVariantHandle:"default",className:i.cx("absolute","top-0","left-0","right-0","bottom-0","opacity-95 group-hover:opacity-100",F,"transition-[background-color,box-shadow,opacity]")}),handleIcon:i.getStyles({switchSizeHandleIcon:l,switchVariantHandleIcon:"default",switchVariantActiveHandleIcon:w?"on":"off",className:i.cx("absolute","opacity-0","top-1/2","left-1/2","transform","translate-x-[-50%]","translate-y-[-50%]",F,"transition-opacity")}),htmlCheckbox:i.cx("cursor-[inherit]","absolute","opacity-0","top-1/2","left-1/2","w-[calc(100%+2px)]","h-[calc(100%+2px)]","transform","translate-x-[-50%]","translate-y-[-50%]"),label:i.cx("start"===c?"text-start":"text-end",S?.label)},W=r?m.m.label:m.m.div;return d.jsx(o.SpringMotionConfig,{reducedMotion:L,...Ne,children:d.jsxs(W,{className:_.root,"data-testid":"container",onHoverStart:O,onHoverEnd:q,tabIndex:-1,children:[d.jsxs(Se,{className:_.switch,children:[d.jsx("input",{type:"checkbox",tabIndex:0,...N,ref:e=>{k.current=e,"function"==typeof I?I(e):null!==I&&(I.current=e)},onFocus:A,onBlur:E,id:j,disabled:f,required:b,checked:V?w:void 0,defaultChecked:V?void 0:a,onChange:H,className:_.htmlCheckbox,style:{}}),d.jsxs(Se,{className:_.handle,...B,children:[d.jsx(i.Box,{className:_.handleCircle}),p&&d.jsx(i.IconSlot,{icon:p,iconProps:{variant:"fill",size:"sm"},"data-testid":"on-icon",className:i.cx(_.handleIcon,w?"opacity-100":"opacity-0")}),h&&d.jsx(i.IconSlot,{icon:h,iconProps:{variant:"fill",size:"sm"},"data-testid":"off-icon",className:i.cx(_.handleIcon,w?"opacity-0":"opacity-100")})]})]}),r&&d.jsx(n.FormLabel,{as:"div",variant:"inherit",color:"inherit",required:b,label:r,className:_.label})]})})});Ie.displayName="Switch",Object.defineProperty(exports,"Pressable",{enumerable:!0,get:function(){return t.Pressable}}),Object.defineProperty(exports,"SpringMotionConfig",{enumerable:!0,get:function(){return o.SpringMotionConfig}}),Object.defineProperty(exports,"Menu",{enumerable:!0,get:function(){return h.Menu}}),exports.Avatar=k,exports.AvatarIcon=I,exports.AvatarImage=j,exports.AvatarText=C,exports.Badge=V,exports.Button=A,exports.Checkbox=W,exports.Chip=Y,exports.ChipButton=X,exports.ChipDismissible=J,exports.ChipLink=Q,exports.ChipToggle=Z,exports.IconButton=K,exports.Input=re,exports.InputHelpText=ce,exports.Radio=fe,exports.RadioGroupProvider=ye,exports.Switch=Ie;
@@ -1,23 +1,22 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
- import { cV as UniversalAvatarIconProps, m as IconPropsWithSVGProps, cY as UniversalAvatarTextProps, cW as UniversalAvatarImageProps, y as ImagePropsWithImgProps, cZ as UniversalBadgeProps, c_ as UniversalButtonProps, c$ as UniversalCheckboxProps, d0 as UniversalChipBaseProps, d4 as UniversalChipProps, d1 as UniversalChipButtonProps, d2 as UniversalChipDismissibleProps, d3 as UniversalChipLinkProps, d5 as UniversalChipToggleProps, d6 as UniversalIconButtonProps, da as UniversalRadioProps, d9 as UniversalRadioGroupProps, c0 as MotionVariant, c1 as MotionVariantSpeed, b as UniversalSwitchProps } from '../types-C5YKqOg3.cjs';
3
- import { a as TextProps } from '../Text-DHrq15W_.cjs';
4
- export { b as Input, I as InputProps } from '../Text-DHrq15W_.cjs';
2
+ import { cT as UniversalAvatarIconProps, w as IconPropsWithSVGProps, cW as UniversalAvatarTextProps, cU as UniversalAvatarImageProps, x as ImagePropsWithImgProps, cX as UniversalBadgeProps, cY as UniversalButtonProps, cZ as UniversalCheckboxProps, c_ as UniversalChipBaseProps, d2 as UniversalChipProps, c$ as UniversalChipButtonProps, d0 as UniversalChipDismissibleProps, d1 as UniversalChipLinkProps, d3 as UniversalChipToggleProps, d4 as UniversalIconButtonProps, d8 as UniversalInputProps, d6 as UniversalIconSlot, da as UniversalRadioProps, d9 as UniversalRadioGroupProps, b_ as MotionVariant, b$ as MotionVariantSpeed, c as UniversalSwitchProps } from '../types-Da_DnBJy.cjs';
3
+ import { a as TextProps } from '../Text-Bq5NiVYm.cjs';
5
4
  import * as react from 'react';
6
- import react__default, { ForwardRefExoticComponent } from 'react';
5
+ import react__default, { ForwardRefExoticComponent, InputHTMLAttributes, PropsWithChildren } from 'react';
7
6
  import { HTMLMotionProps, MotionConfigProps, LazyFeatureBundle } from 'motion/react';
8
- export { a as Pressable, P as PressableProps } from '../Pressable-01KD6JSM.cjs';
7
+ import { B as BoxProps } from '../Box-BFRDyWaq.cjs';
8
+ export { a as Pressable, P as PressableProps } from '../Pressable-GdByxoJg.cjs';
9
9
  export { Menu, MenuContentProps, MenuDividerProps, MenuItemCheckboxProps, MenuItemProps, MenuPlacement, MenuProviderProps, MenuTriggerProps } from '@yahoo/uds/client/Menu';
10
10
  import '@yahoo/uds-icons/types';
11
11
  import 'type-fest';
12
- import '../Box-DIxPS_Eb.cjs';
13
12
 
14
- type DataAttributes$3 = {
13
+ type DataAttributes$4 = {
15
14
  [name: `data-${string}`]: string;
16
15
  };
17
16
  interface AvatarIconProps extends UniversalAvatarIconProps {
18
17
  /** Props to be passed into various slots within the component. */
19
18
  slotProps?: {
20
- icon?: Partial<IconPropsWithSVGProps & DataAttributes$3>;
19
+ icon?: Partial<IconPropsWithSVGProps & DataAttributes$4>;
21
20
  };
22
21
  }
23
22
  /**
@@ -33,13 +32,13 @@ declare const AvatarIcon: {
33
32
  displayName: string;
34
33
  };
35
34
 
36
- type DataAttributes$2 = {
35
+ type DataAttributes$3 = {
37
36
  [name: `data-${string}`]: string;
38
37
  };
39
38
  interface AvatarTextProps extends UniversalAvatarTextProps {
40
39
  /** Props to be passed into various slots within the component. */
41
40
  slotProps?: {
42
- text?: Partial<TextProps & DataAttributes$2>;
41
+ text?: Partial<TextProps & DataAttributes$3>;
43
42
  };
44
43
  }
45
44
  /**
@@ -55,13 +54,13 @@ declare const AvatarText: {
55
54
  displayName: string;
56
55
  };
57
56
 
58
- type DataAttributes$1 = {
57
+ type DataAttributes$2 = {
59
58
  [name: `data-${string}`]: string;
60
59
  };
61
60
  interface AvatarImageProps extends UniversalAvatarImageProps {
62
61
  /** Props to be passed into various slots within the component. */
63
62
  slotProps?: {
64
- image?: Partial<Omit<ImagePropsWithImgProps, 'src' | 'srcSet' | 'alt' | 'className' | 'height' | 'width'> & DataAttributes$1>;
63
+ image?: Partial<Omit<ImagePropsWithImgProps, 'src' | 'srcSet' | 'alt' | 'className' | 'height' | 'width'> & DataAttributes$2>;
65
64
  } & AvatarIconProps['slotProps'] & AvatarTextProps['slotProps'];
66
65
  }
67
66
  /**
@@ -166,8 +165,8 @@ interface ButtonProps extends HtmlButtonProps$1, UniversalButtonProps {
166
165
  **/
167
166
  declare const Button: ForwardRefExoticComponent<Omit<ButtonProps, "ref"> & react__default.RefAttributes<HTMLButtonElement>>;
168
167
 
169
- type NativeInputProps$2 = Omit<react__default.InputHTMLAttributes<HTMLInputElement>, 'type' | 'checked' | 'size' | 'height' | 'width' | 'color'>;
170
- interface CheckboxProps extends NativeInputProps$2, UniversalCheckboxProps {
168
+ type NativeInputProps$3 = Omit<react__default.InputHTMLAttributes<HTMLInputElement>, 'type' | 'checked' | 'size' | 'height' | 'width' | 'color'>;
169
+ interface CheckboxProps extends NativeInputProps$3, UniversalCheckboxProps {
171
170
  layerClassNames?: {
172
171
  root?: string;
173
172
  checkbox?: string;
@@ -201,15 +200,15 @@ interface CheckboxProps extends NativeInputProps$2, UniversalCheckboxProps {
201
200
  declare const Checkbox: react__default.ForwardRefExoticComponent<CheckboxProps & react__default.RefAttributes<HTMLInputElement>>;
202
201
 
203
202
  type HtmlDivProps$4 = Omit<react__default.HTMLAttributes<HTMLDivElement>, 'children' | 'onToggle' | 'label'>;
204
- type DataAttributes = {
203
+ type DataAttributes$1 = {
205
204
  [name: `data-${string}`]: string;
206
205
  };
207
206
  interface ChipBaseProps extends HtmlDivProps$4, Omit<UniversalChipBaseProps, 'variant'> {
208
207
  /** Props to be passed into various slots within the component. */
209
208
  slotProps?: {
210
- startIcon?: Partial<IconPropsWithSVGProps & DataAttributes>;
211
- endIcon?: Partial<IconPropsWithSVGProps & DataAttributes>;
212
- text?: Partial<TextProps & DataAttributes>;
209
+ startIcon?: Partial<IconPropsWithSVGProps & DataAttributes$1>;
210
+ endIcon?: Partial<IconPropsWithSVGProps & DataAttributes$1>;
211
+ text?: Partial<TextProps & DataAttributes$1>;
213
212
  };
214
213
  }
215
214
 
@@ -297,6 +296,99 @@ interface IconButtonProps extends HtmlButtonProps, UniversalIconButtonProps {
297
296
  **/
298
297
  declare const IconButton: react.ForwardRefExoticComponent<Omit<IconButtonProps, "ref"> & react.RefAttributes<HTMLButtonElement>>;
299
298
 
299
+ type HtmlInputProps = React.InputHTMLAttributes<HTMLInputElement> & HTMLMotionProps<'input'>;
300
+ type NativeInputProps$2 = Omit<HtmlInputProps, 'height' | 'size' | 'width' | 'color' | 'required'>;
301
+ type DataAttributes = {
302
+ [name: `data-${string}`]: string;
303
+ };
304
+ interface InputProps extends NativeInputProps$2, UniversalInputProps {
305
+ /** The type of the input element. Reduced set of options from the HTML input type attribute.
306
+ * @default 'text'
307
+ */
308
+ type?: Exclude<NativeInputProps$2['type'], 'button' | 'checkbox' | 'color' | 'file' | 'radio' | 'range' | 'reset' | 'submit' | 'search'>;
309
+ /** Props to be passed into various slots within the component. */
310
+ slotProps?: {
311
+ input?: Partial<InputHTMLAttributes<HTMLInputElement> & DataAttributes>;
312
+ inputWrapper?: Partial<BoxProps & DataAttributes>;
313
+ startIcon?: Partial<IconPropsWithSVGProps & DataAttributes>;
314
+ endIcon?: Partial<IconPropsWithSVGProps & DataAttributes>;
315
+ };
316
+ }
317
+ /**
318
+ * **📦 An input that allows users to enter text and collect data.**
319
+ *
320
+ * @componentType Client component
321
+ *
322
+ * @description
323
+ * An input field is a component that takes text typed into it. It can also serve as a way to display a selection and trigger a dropdown menu. Inputs are interactive elements that users can click, tap, or otherwise engage with to collect data and open dropdowns, or both.
324
+ *
325
+ * @see
326
+ * Check out the {@link https://uds.build/docs/components/input Input Docs} for more info
327
+ *
328
+ * @usage
329
+ * - Forms: For collecting data like names, emails, passwords, etc. (e.g., sign-up, login, or contact forms).
330
+ * - Search Bars: Allowing users to enter search queries to find content.
331
+ * - Filters/Settings: When users need to specify preferences, like selecting a date or adjusting a number value.
332
+ * - Feedback/Comments: Letting users leave reviews, comments, or feedback.
333
+ *
334
+ * @example
335
+ * ```tsx
336
+ * 'use client';
337
+ * import { Input } from "@yahoo/uds";
338
+ *
339
+ * <Input label="Name" placeholder="Enter your name" required />
340
+ *```
341
+ *
342
+ * @related [Checkbox](https://uds.build/docs/components/checkbox), [Radio](https://uds.build/docs/components/radio).
343
+ **/
344
+ declare const Input: react.ForwardRefExoticComponent<Omit<InputProps, "ref"> & react.RefAttributes<HTMLInputElement>>;
345
+
346
+ interface InputHelpTextInternalProps extends PropsWithChildren {
347
+ /** Icon to render at the start of the content */
348
+ startIcon?: UniversalIconSlot;
349
+ /** Icon to render at the end of the content */
350
+ endIcon?: UniversalIconSlot;
351
+ /**
352
+ * Props to pass to the start/end icon. If color is not provided, the icons
353
+ * will inherit the color from the `color` prop.
354
+ */
355
+ iconProps?: Pick<IconPropsWithSVGProps, 'color' | 'size' | 'variant'>;
356
+ size?: InputProps['size'];
357
+ isFilled?: boolean;
358
+ }
359
+
360
+ type InputHelpTextProps = InputHelpTextInternalProps;
361
+ /**
362
+ * **📦 A component that displays helper text for input fields.**
363
+ *
364
+ * @componentType Client component
365
+ *
366
+ * @description
367
+ * A component that displays helper text for input fields.
368
+ *
369
+ * @see
370
+ * Check out the {@link https://uds.build/docs/components/input Input Docs} for more info
371
+ *
372
+ * @usage
373
+ * - Help text that isn't tied to a specific Input.
374
+ *
375
+ * @example
376
+ * ```tsx
377
+ * 'use client';
378
+ * import { InputHelpText } from "@yahoo/uds";
379
+ *
380
+ * <InputHelpText>
381
+ * This is some helper text for the input field.
382
+ * </InputHelpText>
383
+ *```
384
+ *
385
+ * @related [Input](https://uds.build/docs/components/input).
386
+ **/
387
+ declare const InputHelpText: {
388
+ ({ size, isFilled, ...props }: InputHelpTextProps): react_jsx_runtime.JSX.Element;
389
+ displayName: string;
390
+ };
391
+
300
392
  type NativeInputProps$1 = Omit<react__default.InputHTMLAttributes<HTMLInputElement>, 'type' | 'checked' | 'value' | 'size' | 'height' | 'width' | 'color' | 'required'>;
301
393
  interface RadioProps extends NativeInputProps$1, UniversalRadioProps {
302
394
  layerClassNames?: {
@@ -436,4 +528,4 @@ interface SwitchProps extends NativeInputProps, UniversalSwitchProps {
436
528
  **/
437
529
  declare const Switch: react__default.ForwardRefExoticComponent<SwitchProps & react__default.RefAttributes<HTMLInputElement>>;
438
530
 
439
- export { Avatar, AvatarIcon, type AvatarIconProps, AvatarImage, type AvatarImageProps, type AvatarProps, AvatarText, type AvatarTextProps, Badge, type BadgeProps, Button, type ButtonProps, Checkbox, type CheckboxProps, Chip, ChipButton, type ChipButtonProps, ChipDismissible, type ChipDismissibleProps, ChipLink, type ChipLinkProps, type ChipProps, ChipToggle, type ChipToggleProps, IconButton, type IconButtonProps, Radio, RadioGroupProvider, type RadioGroupProviderProps, type RadioProps, SpringMotionConfig, type SpringMotionConfigProps, Switch, type SwitchProps };
531
+ export { Avatar, AvatarIcon, type AvatarIconProps, AvatarImage, type AvatarImageProps, type AvatarProps, AvatarText, type AvatarTextProps, Badge, type BadgeProps, Button, type ButtonProps, Checkbox, type CheckboxProps, Chip, ChipButton, type ChipButtonProps, ChipDismissible, type ChipDismissibleProps, ChipLink, type ChipLinkProps, type ChipProps, ChipToggle, type ChipToggleProps, IconButton, type IconButtonProps, Input, InputHelpText, type InputHelpTextProps, type InputProps, Radio, RadioGroupProvider, type RadioGroupProviderProps, type RadioProps, SpringMotionConfig, type SpringMotionConfigProps, Switch, type SwitchProps };
@@ -1,23 +1,22 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
- import { cV as UniversalAvatarIconProps, m as IconPropsWithSVGProps, cY as UniversalAvatarTextProps, cW as UniversalAvatarImageProps, y as ImagePropsWithImgProps, cZ as UniversalBadgeProps, c_ as UniversalButtonProps, c$ as UniversalCheckboxProps, d0 as UniversalChipBaseProps, d4 as UniversalChipProps, d1 as UniversalChipButtonProps, d2 as UniversalChipDismissibleProps, d3 as UniversalChipLinkProps, d5 as UniversalChipToggleProps, d6 as UniversalIconButtonProps, da as UniversalRadioProps, d9 as UniversalRadioGroupProps, c0 as MotionVariant, c1 as MotionVariantSpeed, b as UniversalSwitchProps } from '../types-C5YKqOg3.js';
3
- import { a as TextProps } from '../Text-YXARg6JI.js';
4
- export { b as Input, I as InputProps } from '../Text-YXARg6JI.js';
2
+ import { cT as UniversalAvatarIconProps, w as IconPropsWithSVGProps, cW as UniversalAvatarTextProps, cU as UniversalAvatarImageProps, x as ImagePropsWithImgProps, cX as UniversalBadgeProps, cY as UniversalButtonProps, cZ as UniversalCheckboxProps, c_ as UniversalChipBaseProps, d2 as UniversalChipProps, c$ as UniversalChipButtonProps, d0 as UniversalChipDismissibleProps, d1 as UniversalChipLinkProps, d3 as UniversalChipToggleProps, d4 as UniversalIconButtonProps, d8 as UniversalInputProps, d6 as UniversalIconSlot, da as UniversalRadioProps, d9 as UniversalRadioGroupProps, b_ as MotionVariant, b$ as MotionVariantSpeed, c as UniversalSwitchProps } from '../types-Da_DnBJy.js';
3
+ import { a as TextProps } from '../Text-IGbWWF7a.js';
5
4
  import * as react from 'react';
6
- import react__default, { ForwardRefExoticComponent } from 'react';
5
+ import react__default, { ForwardRefExoticComponent, InputHTMLAttributes, PropsWithChildren } from 'react';
7
6
  import { HTMLMotionProps, MotionConfigProps, LazyFeatureBundle } from 'motion/react';
8
- export { a as Pressable, P as PressableProps } from '../Pressable-DEJTaCX7.js';
7
+ import { B as BoxProps } from '../Box-MHJ0-0M3.js';
8
+ export { a as Pressable, P as PressableProps } from '../Pressable-DVLHV--n.js';
9
9
  export { Menu, MenuContentProps, MenuDividerProps, MenuItemCheckboxProps, MenuItemProps, MenuPlacement, MenuProviderProps, MenuTriggerProps } from '@yahoo/uds/client/Menu';
10
10
  import '@yahoo/uds-icons/types';
11
11
  import 'type-fest';
12
- import '../Box-BiOhwq4x.js';
13
12
 
14
- type DataAttributes$3 = {
13
+ type DataAttributes$4 = {
15
14
  [name: `data-${string}`]: string;
16
15
  };
17
16
  interface AvatarIconProps extends UniversalAvatarIconProps {
18
17
  /** Props to be passed into various slots within the component. */
19
18
  slotProps?: {
20
- icon?: Partial<IconPropsWithSVGProps & DataAttributes$3>;
19
+ icon?: Partial<IconPropsWithSVGProps & DataAttributes$4>;
21
20
  };
22
21
  }
23
22
  /**
@@ -33,13 +32,13 @@ declare const AvatarIcon: {
33
32
  displayName: string;
34
33
  };
35
34
 
36
- type DataAttributes$2 = {
35
+ type DataAttributes$3 = {
37
36
  [name: `data-${string}`]: string;
38
37
  };
39
38
  interface AvatarTextProps extends UniversalAvatarTextProps {
40
39
  /** Props to be passed into various slots within the component. */
41
40
  slotProps?: {
42
- text?: Partial<TextProps & DataAttributes$2>;
41
+ text?: Partial<TextProps & DataAttributes$3>;
43
42
  };
44
43
  }
45
44
  /**
@@ -55,13 +54,13 @@ declare const AvatarText: {
55
54
  displayName: string;
56
55
  };
57
56
 
58
- type DataAttributes$1 = {
57
+ type DataAttributes$2 = {
59
58
  [name: `data-${string}`]: string;
60
59
  };
61
60
  interface AvatarImageProps extends UniversalAvatarImageProps {
62
61
  /** Props to be passed into various slots within the component. */
63
62
  slotProps?: {
64
- image?: Partial<Omit<ImagePropsWithImgProps, 'src' | 'srcSet' | 'alt' | 'className' | 'height' | 'width'> & DataAttributes$1>;
63
+ image?: Partial<Omit<ImagePropsWithImgProps, 'src' | 'srcSet' | 'alt' | 'className' | 'height' | 'width'> & DataAttributes$2>;
65
64
  } & AvatarIconProps['slotProps'] & AvatarTextProps['slotProps'];
66
65
  }
67
66
  /**
@@ -166,8 +165,8 @@ interface ButtonProps extends HtmlButtonProps$1, UniversalButtonProps {
166
165
  **/
167
166
  declare const Button: ForwardRefExoticComponent<Omit<ButtonProps, "ref"> & react__default.RefAttributes<HTMLButtonElement>>;
168
167
 
169
- type NativeInputProps$2 = Omit<react__default.InputHTMLAttributes<HTMLInputElement>, 'type' | 'checked' | 'size' | 'height' | 'width' | 'color'>;
170
- interface CheckboxProps extends NativeInputProps$2, UniversalCheckboxProps {
168
+ type NativeInputProps$3 = Omit<react__default.InputHTMLAttributes<HTMLInputElement>, 'type' | 'checked' | 'size' | 'height' | 'width' | 'color'>;
169
+ interface CheckboxProps extends NativeInputProps$3, UniversalCheckboxProps {
171
170
  layerClassNames?: {
172
171
  root?: string;
173
172
  checkbox?: string;
@@ -201,15 +200,15 @@ interface CheckboxProps extends NativeInputProps$2, UniversalCheckboxProps {
201
200
  declare const Checkbox: react__default.ForwardRefExoticComponent<CheckboxProps & react__default.RefAttributes<HTMLInputElement>>;
202
201
 
203
202
  type HtmlDivProps$4 = Omit<react__default.HTMLAttributes<HTMLDivElement>, 'children' | 'onToggle' | 'label'>;
204
- type DataAttributes = {
203
+ type DataAttributes$1 = {
205
204
  [name: `data-${string}`]: string;
206
205
  };
207
206
  interface ChipBaseProps extends HtmlDivProps$4, Omit<UniversalChipBaseProps, 'variant'> {
208
207
  /** Props to be passed into various slots within the component. */
209
208
  slotProps?: {
210
- startIcon?: Partial<IconPropsWithSVGProps & DataAttributes>;
211
- endIcon?: Partial<IconPropsWithSVGProps & DataAttributes>;
212
- text?: Partial<TextProps & DataAttributes>;
209
+ startIcon?: Partial<IconPropsWithSVGProps & DataAttributes$1>;
210
+ endIcon?: Partial<IconPropsWithSVGProps & DataAttributes$1>;
211
+ text?: Partial<TextProps & DataAttributes$1>;
213
212
  };
214
213
  }
215
214
 
@@ -297,6 +296,99 @@ interface IconButtonProps extends HtmlButtonProps, UniversalIconButtonProps {
297
296
  **/
298
297
  declare const IconButton: react.ForwardRefExoticComponent<Omit<IconButtonProps, "ref"> & react.RefAttributes<HTMLButtonElement>>;
299
298
 
299
+ type HtmlInputProps = React.InputHTMLAttributes<HTMLInputElement> & HTMLMotionProps<'input'>;
300
+ type NativeInputProps$2 = Omit<HtmlInputProps, 'height' | 'size' | 'width' | 'color' | 'required'>;
301
+ type DataAttributes = {
302
+ [name: `data-${string}`]: string;
303
+ };
304
+ interface InputProps extends NativeInputProps$2, UniversalInputProps {
305
+ /** The type of the input element. Reduced set of options from the HTML input type attribute.
306
+ * @default 'text'
307
+ */
308
+ type?: Exclude<NativeInputProps$2['type'], 'button' | 'checkbox' | 'color' | 'file' | 'radio' | 'range' | 'reset' | 'submit' | 'search'>;
309
+ /** Props to be passed into various slots within the component. */
310
+ slotProps?: {
311
+ input?: Partial<InputHTMLAttributes<HTMLInputElement> & DataAttributes>;
312
+ inputWrapper?: Partial<BoxProps & DataAttributes>;
313
+ startIcon?: Partial<IconPropsWithSVGProps & DataAttributes>;
314
+ endIcon?: Partial<IconPropsWithSVGProps & DataAttributes>;
315
+ };
316
+ }
317
+ /**
318
+ * **📦 An input that allows users to enter text and collect data.**
319
+ *
320
+ * @componentType Client component
321
+ *
322
+ * @description
323
+ * An input field is a component that takes text typed into it. It can also serve as a way to display a selection and trigger a dropdown menu. Inputs are interactive elements that users can click, tap, or otherwise engage with to collect data and open dropdowns, or both.
324
+ *
325
+ * @see
326
+ * Check out the {@link https://uds.build/docs/components/input Input Docs} for more info
327
+ *
328
+ * @usage
329
+ * - Forms: For collecting data like names, emails, passwords, etc. (e.g., sign-up, login, or contact forms).
330
+ * - Search Bars: Allowing users to enter search queries to find content.
331
+ * - Filters/Settings: When users need to specify preferences, like selecting a date or adjusting a number value.
332
+ * - Feedback/Comments: Letting users leave reviews, comments, or feedback.
333
+ *
334
+ * @example
335
+ * ```tsx
336
+ * 'use client';
337
+ * import { Input } from "@yahoo/uds";
338
+ *
339
+ * <Input label="Name" placeholder="Enter your name" required />
340
+ *```
341
+ *
342
+ * @related [Checkbox](https://uds.build/docs/components/checkbox), [Radio](https://uds.build/docs/components/radio).
343
+ **/
344
+ declare const Input: react.ForwardRefExoticComponent<Omit<InputProps, "ref"> & react.RefAttributes<HTMLInputElement>>;
345
+
346
+ interface InputHelpTextInternalProps extends PropsWithChildren {
347
+ /** Icon to render at the start of the content */
348
+ startIcon?: UniversalIconSlot;
349
+ /** Icon to render at the end of the content */
350
+ endIcon?: UniversalIconSlot;
351
+ /**
352
+ * Props to pass to the start/end icon. If color is not provided, the icons
353
+ * will inherit the color from the `color` prop.
354
+ */
355
+ iconProps?: Pick<IconPropsWithSVGProps, 'color' | 'size' | 'variant'>;
356
+ size?: InputProps['size'];
357
+ isFilled?: boolean;
358
+ }
359
+
360
+ type InputHelpTextProps = InputHelpTextInternalProps;
361
+ /**
362
+ * **📦 A component that displays helper text for input fields.**
363
+ *
364
+ * @componentType Client component
365
+ *
366
+ * @description
367
+ * A component that displays helper text for input fields.
368
+ *
369
+ * @see
370
+ * Check out the {@link https://uds.build/docs/components/input Input Docs} for more info
371
+ *
372
+ * @usage
373
+ * - Help text that isn't tied to a specific Input.
374
+ *
375
+ * @example
376
+ * ```tsx
377
+ * 'use client';
378
+ * import { InputHelpText } from "@yahoo/uds";
379
+ *
380
+ * <InputHelpText>
381
+ * This is some helper text for the input field.
382
+ * </InputHelpText>
383
+ *```
384
+ *
385
+ * @related [Input](https://uds.build/docs/components/input).
386
+ **/
387
+ declare const InputHelpText: {
388
+ ({ size, isFilled, ...props }: InputHelpTextProps): react_jsx_runtime.JSX.Element;
389
+ displayName: string;
390
+ };
391
+
300
392
  type NativeInputProps$1 = Omit<react__default.InputHTMLAttributes<HTMLInputElement>, 'type' | 'checked' | 'value' | 'size' | 'height' | 'width' | 'color' | 'required'>;
301
393
  interface RadioProps extends NativeInputProps$1, UniversalRadioProps {
302
394
  layerClassNames?: {
@@ -436,4 +528,4 @@ interface SwitchProps extends NativeInputProps, UniversalSwitchProps {
436
528
  **/
437
529
  declare const Switch: react__default.ForwardRefExoticComponent<SwitchProps & react__default.RefAttributes<HTMLInputElement>>;
438
530
 
439
- export { Avatar, AvatarIcon, type AvatarIconProps, AvatarImage, type AvatarImageProps, type AvatarProps, AvatarText, type AvatarTextProps, Badge, type BadgeProps, Button, type ButtonProps, Checkbox, type CheckboxProps, Chip, ChipButton, type ChipButtonProps, ChipDismissible, type ChipDismissibleProps, ChipLink, type ChipLinkProps, type ChipProps, ChipToggle, type ChipToggleProps, IconButton, type IconButtonProps, Radio, RadioGroupProvider, type RadioGroupProviderProps, type RadioProps, SpringMotionConfig, type SpringMotionConfigProps, Switch, type SwitchProps };
531
+ export { Avatar, AvatarIcon, type AvatarIconProps, AvatarImage, type AvatarImageProps, type AvatarProps, AvatarText, type AvatarTextProps, Badge, type BadgeProps, Button, type ButtonProps, Checkbox, type CheckboxProps, Chip, ChipButton, type ChipButtonProps, ChipDismissible, type ChipDismissibleProps, ChipLink, type ChipLinkProps, type ChipProps, ChipToggle, type ChipToggleProps, IconButton, type IconButtonProps, Input, InputHelpText, type InputHelpTextProps, type InputProps, Radio, RadioGroupProvider, type RadioGroupProviderProps, type RadioProps, SpringMotionConfig, type SpringMotionConfigProps, Switch, type SwitchProps };