@yahoo/uds 3.4.5 → 3.4.7

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 (53) hide show
  1. package/dist/{VStack-CmraVolm.d.ts → VStack-CWaR6qMk.d.ts} +8 -3
  2. package/dist/{VStack-dT3EJCu4.d.cts → VStack-VYrQbFmE.d.cts} +8 -3
  3. package/dist/chunk-4ZPWHOWH.js +3 -0
  4. package/dist/chunk-EIEARPEE.js +2 -0
  5. package/dist/chunk-MT7B3OK6.cjs +2 -0
  6. package/dist/chunk-TH6RUZ5W.cjs +3 -0
  7. package/dist/client/index.cjs +2 -2
  8. package/dist/client/index.d.cts +2 -2
  9. package/dist/client/index.d.ts +2 -2
  10. package/dist/client/index.js +3 -3
  11. package/dist/{index-BOfq14yW.d.ts → index-5FbcDtke.d.ts} +39 -6
  12. package/dist/{index-D1poGuo1.d.cts → index-D9eJ0LWw.d.cts} +39 -6
  13. package/dist/index.cjs +1 -1
  14. package/dist/index.d.cts +3 -3
  15. package/dist/index.d.ts +3 -3
  16. package/dist/index.js +1 -1
  17. package/dist/metafile-cjs.json +1 -1
  18. package/dist/metafile-esm.json +1 -1
  19. package/dist/tailwind/plugin.cjs +1 -1
  20. package/dist/tailwind/plugin.js +1 -1
  21. package/dist/tailwind/purger.cjs +1 -1
  22. package/dist/tailwind/purger.js +1 -1
  23. package/dist/tailwind/utils.cjs +1 -1
  24. package/dist/tailwind/utils.js +1 -1
  25. package/dist/tokens/automation/configs.cjs +1 -1
  26. package/dist/tokens/automation/configs.d.cts +1 -1
  27. package/dist/tokens/automation/configs.d.ts +1 -1
  28. package/dist/tokens/automation/configs.js +1 -1
  29. package/dist/tokens/automation/properties.cjs +1 -1
  30. package/dist/tokens/automation/properties.d.cts +1 -1
  31. package/dist/tokens/automation/properties.d.ts +1 -1
  32. package/dist/tokens/automation/properties.js +1 -1
  33. package/dist/tokens/index.cjs +1 -1
  34. package/dist/tokens/index.d.cts +2 -2
  35. package/dist/tokens/index.d.ts +2 -2
  36. package/dist/tokens/index.js +1 -1
  37. package/package.json +1 -1
  38. package/dist/VStack-BD6BARE0.d.cts +0 -145
  39. package/dist/VStack-CTUNBjyE.d.ts +0 -145
  40. package/dist/chunk-3HJAKD7X.cjs +0 -3
  41. package/dist/chunk-CNAKHAWF.cjs +0 -2
  42. package/dist/chunk-EE3DM7SS.js +0 -2
  43. package/dist/chunk-HBZLHJEI.js +0 -2
  44. package/dist/chunk-IQ4HRDIM.cjs +0 -3
  45. package/dist/chunk-IRHJ7DWJ.js +0 -2
  46. package/dist/chunk-KSHOOD3K.js +0 -3
  47. package/dist/chunk-P4XGJJCM.cjs +0 -2
  48. package/dist/chunk-PLGFYRZJ.js +0 -3
  49. package/dist/chunk-YTMZSL6D.cjs +0 -1
  50. package/dist/index-CJkW3rKr.d.cts +0 -208
  51. package/dist/index-DQL36m4I.d.ts +0 -208
  52. package/dist/types-DE_O6y5z.d.cts +0 -10302
  53. package/dist/types-DE_O6y5z.d.ts +0 -10302
@@ -32,15 +32,20 @@ interface BoxProps extends UniversalBoxProps, DivProps {
32
32
  */
33
33
  declare const Box: react.ForwardRefExoticComponent<BoxProps & react.RefAttributes<HTMLDivElement>>;
34
34
 
35
- type VariantWithInherit = Exclude<UniversalDividerProps['variant'], undefined> | 'inherit';
36
- interface DividerProps extends Omit<BoxProps, 'color' | 'borderColor' | 'borderWidth'>, Omit<UniversalStackProps, 'separator' | 'asChild'>, Omit<UniversalDividerProps, 'variant'> {
37
- variant?: VariantWithInherit;
35
+ interface DividerCoreProps extends Omit<BoxProps, 'color' | 'borderColor' | 'borderWidth'>, Omit<UniversalStackProps, 'separator' | 'asChild'>, Omit<UniversalDividerProps, 'variant'> {
38
36
  layerClassNames?: {
39
37
  root?: string;
40
38
  text?: string;
41
39
  line?: string;
42
40
  };
43
41
  }
42
+
43
+ type VariantWithInherit = Exclude<UniversalDividerProps['variant'], undefined> | 'inherit';
44
+ interface DividerInternalProps extends DividerCoreProps {
45
+ variant?: VariantWithInherit;
46
+ }
47
+
48
+ type DividerProps = Omit<DividerInternalProps, 'layerClassNames'>;
44
49
  /**
45
50
  * **📦 A divider component that can be used to visually separate components**
46
51
  *
@@ -32,15 +32,20 @@ interface BoxProps extends UniversalBoxProps, DivProps {
32
32
  */
33
33
  declare const Box: react.ForwardRefExoticComponent<BoxProps & react.RefAttributes<HTMLDivElement>>;
34
34
 
35
- type VariantWithInherit = Exclude<UniversalDividerProps['variant'], undefined> | 'inherit';
36
- interface DividerProps extends Omit<BoxProps, 'color' | 'borderColor' | 'borderWidth'>, Omit<UniversalStackProps, 'separator' | 'asChild'>, Omit<UniversalDividerProps, 'variant'> {
37
- variant?: VariantWithInherit;
35
+ interface DividerCoreProps extends Omit<BoxProps, 'color' | 'borderColor' | 'borderWidth'>, Omit<UniversalStackProps, 'separator' | 'asChild'>, Omit<UniversalDividerProps, 'variant'> {
38
36
  layerClassNames?: {
39
37
  root?: string;
40
38
  text?: string;
41
39
  line?: string;
42
40
  };
43
41
  }
42
+
43
+ type VariantWithInherit = Exclude<UniversalDividerProps['variant'], undefined> | 'inherit';
44
+ interface DividerInternalProps extends DividerCoreProps {
45
+ variant?: VariantWithInherit;
46
+ }
47
+
48
+ type DividerProps = Omit<DividerInternalProps, 'layerClassNames'>;
44
49
  /**
45
50
  * **📦 A divider component that can be used to visually separate components**
46
51
  *
@@ -0,0 +1,3 @@
1
+ import{variants as o}from"./chunk-GSO3MC65.js";import{textVariants as r,backgroundColors as t,foregroundColors as e,spectrumColors as i,borderRadii as n,borderWidths as a,lineColors as l}from"@yahoo/uds/fixtures";import{getFeatureFlags as s}from"@yahoo/uds/flags";import d from"clsx";import c from"imurmurhash";import{extendTailwindMerge as f}from"tailwind-merge";import{forwardRef as p,memo as u,isValidElement as h,cloneElement as b,useMemo as m,Children as g}from"react";import{jsx as x,jsxs as S}from"react/jsx-runtime";import{isFunction as v}from"lodash-es";/*! © 2025 Yahoo, Inc. UDS v0.0.0-development */
2
+ function C(o){return"boolean"==typeof o?`${o}`:0===o?"0":o}function y(o){const r=Object.create(null),t=Object.keys(o);for(let e=0,i=t.length;e<i;e++){const i=t[e];void 0!==o[i]&&(r[i]=o[i])}return r}var W=f({extend:{theme:{borderColor:l,borderWidth:a,borderRadius:n}},override:{classGroups:{"text-color":[{text:[...e,...i]}],"bg-color":[{bg:t}],"font-family":[{font:["icons",...r]}],leading:[{leading:r}]},conflictingClassGroups:{}}}),w=(...o)=>{const r=d(o);return W(r)},B=o=>r=>{if(!o?.variants)return w(o?.base,r?.className);const{variants:t,defaultVariants:e}=o,i=Object.keys(t).map((o=>{const i=r?.[o],n=e?.[o],a=C(i)||C(n);return t[o][a]})),n={...e,...r&&y(r)},a=o?.compoundVariants?.reduce(((o,{className:r,...t})=>Object.entries(t).every((([o,r])=>n[o]===r))?w(o,r):o),"");return w(o?.base,i,a,r?.className)},T=B({variants:o}),E=new Map,N=o=>{const{useGetStylesCache:r}=s();if(r){const r=function(o){const r=Object.create(null),t=Object.keys(o).sort();for(let e=0,i=t.length;e<i;e++){const i=t[e];r[i]=o[i]}return r}(y(o)),t=(new c).hash(JSON.stringify(r)).result();if(E.has(t))return E.get(t);const e=T(r);return E.set(t,e),e}return T(o)};function R(...o){return r=>o.forEach((o=>function(o,r){"function"==typeof o?o(r):null!=o&&(o.current=r)}(o,r)))}function V(){const o=p(((o,t)=>{const{children:i,...n}=o,a=g.toArray(i),l=a.find(e);if(l){const o=l.props.children,e=a.map((r=>r===l?g.count(o)>1?g.only(null):h(o)?o.props.children:null:r));return x(r,{...n,ref:t,children:h(o)?b(o,void 0,e):null})}return x(r,{...n,ref:t,children:i})}));o.displayName="Slot";const r=p(((o,r)=>{const{children:t,...e}=o;return h(t)?b(t,{...i(e,t.props),ref:r?R(r,t.ref):t.ref}):g.count(t)>1?g.only(null):null}));r.displayName="SlotClone";const t=({children:o})=>o;function e(o){return h(o)&&o.type===t}function i(o,r){const t={...r};for(const e in r){const i=o[e],n=r[e];/^on[A-Z]/.test(e)?i&&n?t[e]=(...o)=>{n(...o),i(...o)}:i&&(t[e]=i):"style"===e&&(t[e]={...i,...n})}return{...o,...t}}return o}var z=V(),H=p((function({asChild:o,className:r,backgroundColor:t,borderRadius:e,borderTopStartRadius:i,borderTopEndRadius:n,borderBottomStartRadius:a,borderBottomEndRadius:l,borderColor:s,borderStartColor:d,borderEndColor:c,borderTopColor:f,borderBottomColor:p,borderWidth:u,borderVerticalWidth:h,borderHorizontalWidth:b,borderStartWidth:m,borderEndWidth:g,borderTopWidth:S,borderBottomWidth:v,alignContent:C,alignItems:y,alignSelf:W,flex:w,flexDirection:B,flexGrow:T,flexShrink:E,flexWrap:R,justifyContent:V,flexBasis:H,display:G="flex",overflow:k,overflowX:I,overflowY:j,position:D,spacing:O,spacingHorizontal:F,spacingVertical:A,spacingBottom:X,spacingEnd:Y,spacingStart:P,spacingTop:$,offset:L,offsetVertical:M,offsetHorizontal:q,offsetBottom:J,offsetEnd:Z,offsetStart:_,offsetTop:K,columnGap:Q,rowGap:U,width:oo,height:ro,dropShadow:to,insetShadow:eo,...io},no){const ao=N({backgroundColor:t,borderRadius:e,borderTopStartRadius:i,borderTopEndRadius:n,borderBottomStartRadius:a,borderBottomEndRadius:l,borderColor:s,borderStartColor:d,borderEndColor:c,borderTopColor:f,borderBottomColor:p,borderWidth:u,borderVerticalWidth:h,borderHorizontalWidth:b,borderStartWidth:m,borderEndWidth:g,borderTopWidth:S,borderBottomWidth:v,alignContent:C,alignItems:y,alignSelf:W,flex:w,flexDirection:B,flexGrow:T,flexShrink:E,flexWrap:R,justifyContent:V,flexBasis:H,display:G,overflow:k,overflowX:I,overflowY:j,position:D,spacing:O,spacingHorizontal:F,spacingVertical:A,spacingBottom:X,spacingEnd:Y,spacingStart:P,spacingTop:$,offset:L,offsetVertical:M,offsetHorizontal:q,offsetBottom:J,offsetEnd:Z,offsetStart:_,offsetTop:K,columnGap:Q,rowGap:U,width:oo,height:ro,dropShadow:to,insetShadow:eo,className:r});return x(o?z:"div",{className:ao,ref:no,...io})}));H.displayName="Box";var G=(o,r)=>((o,r)=>{const t=v(r)?r:()=>r;return o.flatMap(((o,r)=>0!==r?[t(r),o]:[o]))})(g.toArray(o),(o=>{const t=v(r)?r(o):r;return h(t)?b(t,{...t.props,key:t.key??`interspersed-${o}`}):null})),k=p((function({gap:o,children:r,separator:t,...e},i){return x(H,{ref:i,flexDirection:"row",rowGap:o,columnGap:o,...e,children:t?G(r,t):r})}));k.displayName="HStack";var I=V(),j={display1:"h1",display2:"h1",display3:"h1",title1:"h1",title2:"h2",title3:"h3",title4:"h4",headline1:"h5",body1:"p",label1:"p",label2:"p",label3:"p",label4:"p",caption1:"p",caption2:"p",legal1:"p",inherit:"p"},D=p((function({className:o,asChild:r,color:t="primary",variant:e="body1",as:i=j[e],fontFamily:n,fontSize:a,fontWeight:l,lineHeight:s,textTransform:d,textAlign:c,backgroundColor:f,borderRadius:p,borderTopStartRadius:u,borderTopEndRadius:h,borderBottomStartRadius:b,borderBottomEndRadius:m,borderColor:g,borderStartColor:S,borderEndColor:v,borderTopColor:C,borderBottomColor:y,borderWidth:W,borderVerticalWidth:w,borderHorizontalWidth:B,borderStartWidth:T,borderEndWidth:E,borderTopWidth:R,borderBottomWidth:V,alignContent:z,alignItems:H,alignSelf:G,flex:k,flexDirection:D,flexGrow:O,flexShrink:F,flexWrap:A,justifyContent:X,flexBasis:Y,display:P,overflow:$,overflowX:L,overflowY:M,position:q,spacing:J,spacingHorizontal:Z,spacingVertical:_,spacingBottom:K,spacingEnd:Q,spacingStart:U,spacingTop:oo,offset:ro,offsetVertical:to,offsetHorizontal:eo,offsetBottom:io,offsetEnd:no,offsetStart:ao,offsetTop:lo,columnGap:so,rowGap:co,...fo},po){const uo={...t&&"inherit"!==t?{color:t}:{},...e&&"inherit"!==e?{fontFamily:n??e,fontSize:a??e,fontWeight:l??e,lineHeight:s??e,textTransform:d??e}:{},textAlign:c},ho=N({className:o,...uo,backgroundColor:f,borderRadius:p,borderTopStartRadius:u,borderTopEndRadius:h,borderBottomStartRadius:b,borderBottomEndRadius:m,borderColor:g,borderStartColor:S,borderEndColor:v,borderTopColor:C,borderBottomColor:y,borderWidth:W,borderVerticalWidth:w,borderHorizontalWidth:B,borderStartWidth:T,borderEndWidth:E,borderTopWidth:R,borderBottomWidth:V,alignContent:z,alignItems:H,alignSelf:G,flex:k,flexDirection:D,flexGrow:O,flexShrink:F,flexWrap:A,justifyContent:X,flexBasis:Y,display:P,overflow:$,overflowX:L,overflowY:M,position:q,spacing:J,spacingHorizontal:Z,spacingVertical:_,spacingBottom:K,spacingEnd:Q,spacingStart:U,spacingTop:oo,offset:ro,offsetVertical:to,offsetHorizontal:eo,offsetBottom:io,offsetEnd:no,offsetStart:ao,offsetTop:lo,columnGap:so,rowGap:co});return x(r?I:i,{className:ho,ref:po,...fo})}));D.displayName="Text";var O=p((function({gap:o,children:r,separator:t,...e},i){return x(H,{ref:i,flexDirection:"column",columnGap:o,rowGap:o,...e,children:t?G(r,t):r})}));O.displayName="VStack";var F=({htmlFor:o,required:r,label:t,children:e,color:i="muted",variant:n="label3",hasError:a=!1,showRequiredAsterisk:l=!1,as:s="label",className:d,...c})=>{const f=t?v(t)?t():t:e;return f?S(D,{variant:n,color:i,as:s,htmlFor:o,className:w("cursor-[inherit]",d),...c,children:[f,r&&l&&x(D,{as:"sup",color:a?"alert":"inherit",variant:"inherit",spacingStart:"0.5","aria-hidden":!0,children:"*"})]}):null},A={sm:16,md:24,lg:32},X=p((function({name:o,size:r="md",variant:t="outline",color:e="primary",className:i,...n},a){const l=o.metadata?.variants??[],s=l.includes(t)?t:l[0]??"fill",d="multicolor"===s,c=N({flex:"none",color:d?void 0:e,className:w(i,!d&&"[&_path]:fill-current")}),f=A[r];return x("svg",{ref:a,xmlns:"http://www.w3.org/2000/svg",width:f,height:f,viewBox:`0 0 ${f} ${f}`,"aria-hidden":"true",focusable:"false",className:c,...n,children:x(o,{size:r,variant:s})})}));function Y({width:o,height:r,src:t,alt:e,contentFit:i,backgroundColor:n,borderRadius:a,borderTopStartRadius:l,borderTopEndRadius:s,borderBottomStartRadius:d,borderBottomEndRadius:c,borderColor:f,borderStartColor:p,borderEndColor:u,borderTopColor:h,borderBottomColor:b,borderWidth:m,borderVerticalWidth:g,borderHorizontalWidth:S,borderStartWidth:v,borderEndWidth:C,borderTopWidth:y,borderBottomWidth:W,alignContent:w,alignItems:B,alignSelf:T,flex:E,flexDirection:R,flexGrow:V,flexShrink:z,flexWrap:H,justifyContent:G,flexBasis:k,display:I,overflow:j,overflowX:D,overflowY:O,position:F,spacing:A,spacingHorizontal:X,spacingVertical:Y,spacingBottom:P,spacingEnd:$,spacingStart:L,spacingTop:M,offset:q,offsetVertical:J,offsetHorizontal:Z,offsetBottom:_,offsetEnd:K,offsetStart:Q,offsetTop:U,columnGap:oo,rowGap:ro,...to}){const eo=N({contentFit:i,backgroundColor:n,borderRadius:a,borderTopStartRadius:l,borderTopEndRadius:s,borderBottomStartRadius:d,borderBottomEndRadius:c,borderColor:f,borderStartColor:p,borderEndColor:u,borderTopColor:h,borderBottomColor:b,borderWidth:m,borderVerticalWidth:g,borderHorizontalWidth:S,borderStartWidth:v,borderEndWidth:C,borderTopWidth:y,borderBottomWidth:W,alignContent:w,alignItems:B,alignSelf:T,flex:E,flexDirection:R,flexGrow:V,flexShrink:z,flexWrap:H,justifyContent:G,flexBasis:k,display:I,overflow:j,overflowX:D,overflowY:O,position:F,spacing:A,spacingHorizontal:X,spacingVertical:Y,spacingBottom:P,spacingEnd:$,spacingStart:L,spacingTop:M,offset:q,offsetVertical:J,offsetHorizontal:Z,offsetBottom:_,offsetEnd:K,offsetStart:Q,offsetTop:U,columnGap:oo,rowGap:ro});return x("img",{src:t,alt:e,className:eo,style:{width:o,height:r},...to})}X.displayName="Icon";var P=u((function({icon:o,iconProps:r,...t}){if(!o)return null;const e=r??{},i=o;if(i.metadata?.isSvgIcon)return x(X,{name:i,...e,...t});if(v(o)){const r=o(e);return h(r)&&b(r,t)}return h(o)&&b(o,{...e,...o.props,...t})}));var $=u((function({startIcon:o,endIcon:r,iconProps:t,children:e,size:i,isFilled:n,...a}){const l={helperText:N({inputSizeHelperText:i,inputVariantHelperText:"default",inputVariantValueHelperText:n?"filled":"empty"}),helperIcon:N({inputSizeHelperIcon:i,inputVariantHelperIcon:"default",inputVariantValueHelperIcon:n?"filled":"empty"})},s={variant:"outline",...t};return S(k,{gap:"1",alignItems:"center",...a,children:[o&&x(P,{icon:o,...s,iconProps:t,className:l.helperIcon}),x("span",{className:l.helperText,children:e}),r&&x(P,{icon:r,...s,iconProps:t,className:l.helperIcon})]})})),L={horizontal:"w-full",vertical:""},M=p((function({vertical:o=!1,contentPosition:r="center",className:t,layerClassNames:e,children:i,...n},a){const l=o?"vertical":"horizontal",s=o?O:k,d=m((()=>({root:w(L[l],t,e?.root),label:e?.text,line:e?.line})),[t,l,e?.root,e?.text,e?.line]),c=m((()=>"vertical"===l?{borderTopWidth:0,borderRightWidth:0,borderBottomWidth:0}:{borderLeftWidth:0,borderRightWidth:0,borderBottomWidth:0}),[l]),f=()=>x(H,{flex:"1",className:d.line,style:c});return i?S(s,{flex:"1",alignItems:"center",className:d.root,ref:a,...n,children:["start"!==r&&x(f,{}),x(H,{flex:"none",children:x(D,{color:"inherit",variant:"inherit",className:d.label,children:i})}),"end"!==r&&x(f,{})]}):x(H,{display:"flex",flex:"none",className:d.root,ref:a,...n,children:x(f,{})})}));M.displayName="DividerCore";var q=p((function({variant:o="primary",layerClassNames:r,...t},e){const i=m((()=>({root:w("inherit"!==o&&N({dividerVariantRoot:o}),r?.root),text:w("inherit"!==o?N({dividerVariantLabel:o}):void 0,r?.text),line:w("inherit"!==o&&N({dividerVariantLine:o}),r?.line)})),[r?.line,r?.root,r?.text,o]);return x(M,{ref:e,layerClassNames:i,...t})}));q.displayName="DividerInternal";
3
+ /*! © 2025 Yahoo, Inc. UDS v0.0.0-development */export{H as Box,q as DividerInternal,F as FormLabel,k as HStack,X as Icon,P as IconSlot,Y as Image,$ as InputHelpTextMemo,D as Text,O as VStack,V as createSlot,B as cva,w as cx,N as getStyles};