@yahoo/uds 3.17.0-beta.5 → 3.17.0-beta.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.
@@ -0,0 +1,3 @@
1
+ "use strict";var o=require("./chunk-FSOKVNOU.cjs"),r=require("@yahoo/uds/fixtures"),t=require("@yahoo/uds/flags"),e=require("clsx"),n=require("imurmurhash"),i=require("tailwind-merge"),a=require("react"),l=require("react/jsx-runtime"),s=require("lodash-es");function d(o){return o&&o.__esModule?o:{default:o}}var f=d(e),c=d(n);/*! © 2025 Yahoo, Inc. UDS v0.0.0-development */
2
+ function p(o){return"boolean"==typeof o?`${o}`:0===o?"0":o}function u(o){const r=Object.create(null),t=Object.keys(o);for(let e=0,n=t.length;e<n;e++){const n=t[e];void 0!==o[n]&&(r[n]=o[n])}return r}var b=i.extendTailwindMerge({extend:{theme:{borderColor:r.lineColors,borderWidth:r.borderWidths,borderRadius:r.borderRadii}},override:{classGroups:{"text-color":[{text:[...r.foregroundColors,...r.spectrumColors]}],"bg-color":[{bg:r.backgroundColors}],"font-family":[{font:["icons",...r.textVariants]}],leading:[{leading:r.textVariants}]},conflictingClassGroups:{}}}),h=(...o)=>{const r=f.default(o);return b(r)},m=o=>r=>{if(!o?.variants)return h(o?.base,r?.className);const{variants:t,defaultVariants:e}=o,n=Object.keys(t).map((o=>{const n=r?.[o],i=e?.[o],a=p(n)||p(i);return t[o][a]})),i={...e,...r&&u(r)},a=o?.compoundVariants?.reduce(((o,{className:r,...t})=>Object.entries(t).every((([o,r])=>i[o]===r))?h(o,r):o),"");return h(o?.base,n,a,r?.className)},g=m({variants:o.variants}),x=new Map,C=o=>{const{useGetStylesCache:r}=t.getFeatureFlags();if(r){const r=function(o){const r=Object.create(null),t=Object.keys(o).sort();for(let e=0,n=t.length;e<n;e++){const n=t[e];r[n]=o[n]}return r}(u(o)),t=(new c.default).hash(JSON.stringify(r)).result();if(x.has(t))return x.get(t);const e=g(r);return x.set(t,e),e}return g(o)};function S(...o){return r=>o.forEach((o=>function(o,r){"function"==typeof o?o(r):null!=o&&(o.current=r)}(o,r)))}function w(){const o=a.forwardRef(((o,t)=>{const{children:n,...i}=o,s=a.Children.toArray(n),d=s.find(e);if(d){const o=d.props.children,e=s.map((r=>r===d?a.Children.count(o)>1?a.Children.only(null):a.isValidElement(o)?o.props.children:null:r));return l.jsx(r,{...i,ref:t,children:a.isValidElement(o)?a.cloneElement(o,void 0,e):null})}return l.jsx(r,{...i,ref:t,children:n})}));o.displayName="Slot";const r=a.forwardRef(((o,r)=>{const{children:t,...e}=o;return a.isValidElement(t)?a.cloneElement(t,{...n(e,t.props),ref:r?S(r,t.ref):t.ref}):a.Children.count(t)>1?a.Children.only(null):null}));r.displayName="SlotClone";const t=({children:o})=>o;function e(o){return a.isValidElement(o)&&o.type===t}function n(o,r){const t={...r};for(const e in r){const n=o[e],i=r[e];/^on[A-Z]/.test(e)?n&&i?t[e]=(...o)=>{i(...o),n(...o)}:n&&(t[e]=n):"style"===e&&(t[e]={...n,...i})}return{...o,...t}}return o}var y=w(),v=a.forwardRef((function({asChild:o,className:r,backgroundColor:t,borderRadius:e,borderTopStartRadius:n,borderTopEndRadius:i,borderBottomStartRadius:a,borderBottomEndRadius:s,borderColor:d,borderStartColor:f,borderEndColor:c,borderTopColor:p,borderBottomColor:u,borderWidth:b,borderVerticalWidth:h,borderHorizontalWidth:m,borderStartWidth:g,borderEndWidth:x,borderTopWidth:S,borderBottomWidth:w,alignContent:v,alignItems:W,alignSelf:E,flex:B,flexDirection:T,flexGrow:R,flexShrink:V,flexWrap:j,justifyContent:N,flexBasis:z,display:G="flex",overflow:H,overflowX:k,overflowY:q,position:O,spacing:I,spacingHorizontal:F,spacingVertical:A,spacingBottom:D,spacingEnd:X,spacingStart:Y,spacingTop:M,offset:$,offsetVertical:_,offsetHorizontal:J,offsetBottom:K,offsetEnd:P,offsetStart:U,offsetTop:Z,columnGap:L,rowGap:Q,width:oo,height:ro,dropShadow:to,insetShadow:eo,...no},io){const ao=C({backgroundColor:t,borderRadius:e,borderTopStartRadius:n,borderTopEndRadius:i,borderBottomStartRadius:a,borderBottomEndRadius:s,borderColor:d,borderStartColor:f,borderEndColor:c,borderTopColor:p,borderBottomColor:u,borderWidth:b,borderVerticalWidth:h,borderHorizontalWidth:m,borderStartWidth:g,borderEndWidth:x,borderTopWidth:S,borderBottomWidth:w,alignContent:v,alignItems:W,alignSelf:E,flex:B,flexDirection:T,flexGrow:R,flexShrink:V,flexWrap:j,justifyContent:N,flexBasis:z,display:G,overflow:H,overflowX:k,overflowY:q,position:O,spacing:I,spacingHorizontal:F,spacingVertical:A,spacingBottom:D,spacingEnd:X,spacingStart:Y,spacingTop:M,offset:$,offsetVertical:_,offsetHorizontal:J,offsetBottom:K,offsetEnd:P,offsetStart:U,offsetTop:Z,columnGap:L,rowGap:Q,width:oo,height:ro,dropShadow:to,insetShadow:eo,className:r}),lo=o?y:"div";return l.jsx(lo,{className:ao,ref:io,...no})}));v.displayName="Box";var W=w(),E={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"},B=a.forwardRef((function({className:o,asChild:r,color:t="primary",variant:e="body1",as:n=E[e],fontFamily:i,fontSize:a,fontWeight:s,lineHeight:d,textTransform:f,textAlign:c,backgroundColor:p,borderRadius:u,borderTopStartRadius:b,borderTopEndRadius:h,borderBottomStartRadius:m,borderBottomEndRadius:g,borderColor:x,borderStartColor:S,borderEndColor:w,borderTopColor:y,borderBottomColor:v,borderWidth:B,borderVerticalWidth:T,borderHorizontalWidth:R,borderStartWidth:V,borderEndWidth:j,borderTopWidth:N,borderBottomWidth:z,alignContent:G,alignItems:H,alignSelf:k,flex:q,flexDirection:O,flexGrow:I,flexShrink:F,flexWrap:A,justifyContent:D,flexBasis:X,display:Y,overflow:M,overflowX:$,overflowY:_,position:J,spacing:K,spacingHorizontal:P,spacingVertical:U,spacingBottom:Z,spacingEnd:L,spacingStart:Q,spacingTop:oo,offset:ro,offsetVertical:to,offsetHorizontal:eo,offsetBottom:no,offsetEnd:io,offsetStart:ao,offsetTop:lo,columnGap:so,rowGap:fo,...co},po){const uo={...t&&"inherit"!==t?{color:t}:{},...e&&"inherit"!==e?{fontFamily:i??e,fontSize:a??e,fontWeight:s??e,lineHeight:d??e,textTransform:f??e}:{},textAlign:c},bo=C({className:o,...uo,backgroundColor:p,borderRadius:u,borderTopStartRadius:b,borderTopEndRadius:h,borderBottomStartRadius:m,borderBottomEndRadius:g,borderColor:x,borderStartColor:S,borderEndColor:w,borderTopColor:y,borderBottomColor:v,borderWidth:B,borderVerticalWidth:T,borderHorizontalWidth:R,borderStartWidth:V,borderEndWidth:j,borderTopWidth:N,borderBottomWidth:z,alignContent:G,alignItems:H,alignSelf:k,flex:q,flexDirection:O,flexGrow:I,flexShrink:F,flexWrap:A,justifyContent:D,flexBasis:X,display:Y,overflow:M,overflowX:$,overflowY:_,position:J,spacing:K,spacingHorizontal:P,spacingVertical:U,spacingBottom:Z,spacingEnd:L,spacingStart:Q,spacingTop:oo,offset:ro,offsetVertical:to,offsetHorizontal:eo,offsetBottom:no,offsetEnd:io,offsetStart:ao,offsetTop:lo,columnGap:so,rowGap:fo}),ho=r?W:n;return l.jsx(ho,{className:bo,ref:po,...co})}));B.displayName="Text";var T={xs:12,sm:16,md:24,lg:32},R=a.forwardRef((function({name:o,size:r="md",variant:t="outline",color:e="primary",className:n,...i},a){const s=o.metadata?.variants??[],d=s.includes(t)?t:s[0]??"fill",f="multicolor"===d,c=C({flex:"none",color:f?void 0:e,className:h(n,!f&&"[&_path]:fill-current")}),p=T[r];return l.jsx("svg",{ref:a,xmlns:"http://www.w3.org/2000/svg",width:p,height:p,viewBox:`0 0 ${p} ${p}`,"aria-hidden":"true",focusable:"false",className:c,...i,children:l.jsx(o,{size:r,variant:d})})}));R.displayName="Icon";var V=a.memo((function({icon:o,iconProps:r,...t}){if(!o)return null;const e=r??{},n=o;if(n.metadata?.isSvgIcon)return l.jsx(R,{name:n,...e,...t});if(s.isFunction(o)){const r=o(e);return a.isValidElement(r)&&a.cloneElement(r,t)}return a.isValidElement(o)&&a.cloneElement(o,{...e,...o.props,...t})}));
3
+ /*! © 2025 Yahoo, Inc. UDS v0.0.0-development */exports.Box=v,exports.Icon=R,exports.IconSlot=V,exports.Text=B,exports.createSlot=w,exports.cva=m,exports.cx=h,exports.getStyles=C;