@yahoo/uds 1.1.5 → 1.1.7

Sign up to get free protection for your applications and to get access to all the features.
Files changed (50) hide show
  1. package/cli/bin/uds-darwin-arm64-baseline +0 -0
  2. package/cli/bin/uds-linux-x64-baseline +0 -0
  3. package/dist/chunk-2BSAN6SF.js +3 -0
  4. package/dist/{chunk-D6WFGMAQ.js → chunk-2PWYNHHE.js} +2 -2
  5. package/dist/{chunk-OYIVEJ5U.js → chunk-3AXI4EKV.js} +1 -1
  6. package/dist/{chunk-7YAGRPBN.cjs → chunk-5O2UG72V.cjs} +3 -3
  7. package/dist/{chunk-GMB2Q5R6.js → chunk-BCE75B5E.js} +4 -4
  8. package/dist/{chunk-3PSQ7QO3.js → chunk-D5LOEZUM.js} +1 -1
  9. package/dist/{chunk-6G6Y2JC7.js → chunk-DIBPHB45.js} +2 -2
  10. package/dist/{chunk-OMH5EBNB.cjs → chunk-FHBEEPY7.cjs} +1 -1
  11. package/dist/{chunk-2LIQP6US.cjs → chunk-HEPNOEIN.cjs} +2 -2
  12. package/dist/chunk-KQZYAPGK.cjs +3 -0
  13. package/dist/{chunk-OM7LQJTO.cjs → chunk-ML56HUQO.cjs} +1 -1
  14. package/dist/{chunk-HGMLBC2H.cjs → chunk-OIUWGOHD.cjs} +3 -3
  15. package/dist/chunk-S3SOXK7H.js +2 -0
  16. package/dist/{chunk-3PWPCBUN.js → chunk-VK5VXZH3.js} +1 -1
  17. package/dist/{chunk-7GN7QYNC.cjs → chunk-X5YNEVVO.cjs} +1 -1
  18. package/dist/{chunk-TM3T5DQZ.js → chunk-XRHVMUMI.js} +2 -2
  19. package/dist/chunk-XTFFMKR6.cjs +2 -0
  20. package/dist/{chunk-N6H5RJN5.cjs → chunk-Z5Y2CHME.cjs} +2 -2
  21. package/dist/client/index.cjs +3 -3
  22. package/dist/client/index.js +5 -5
  23. package/dist/experimental/index.cjs +3 -3
  24. package/dist/experimental/index.js +2 -2
  25. package/dist/fixtures.cjs +1 -1
  26. package/dist/fixtures.d.cts +94 -0
  27. package/dist/fixtures.js +1 -1
  28. package/dist/index.cjs +1 -1
  29. package/dist/index.js +2 -2
  30. package/dist/metafile-cjs.json +1 -1
  31. package/dist/metafile-esm.json +1 -1
  32. package/dist/tailwind/plugin.cjs +3 -3
  33. package/dist/tailwind/plugin.js +3 -3
  34. package/dist/tailwind/purger.cjs +1 -1
  35. package/dist/tailwind/purger.js +1 -1
  36. package/dist/tailwind/tsMorph.cjs +2 -2
  37. package/dist/tailwind/tsMorph.js +2 -2
  38. package/dist/tailwind/utils.cjs +1 -1
  39. package/dist/tailwind/utils.js +1 -1
  40. package/dist/tokens/index.cjs +1 -1
  41. package/dist/tokens/index.js +1 -1
  42. package/dist/tokens/parseTokens.cjs +1 -1
  43. package/dist/tokens/parseTokens.js +1 -1
  44. package/package.json +7 -7
  45. package/dist/chunk-5B3FKOHZ.cjs +0 -3
  46. package/dist/chunk-AQCF2ALW.js +0 -2
  47. package/dist/chunk-PCPT4UDX.cjs +0 -2
  48. package/dist/chunk-QNQRTT5Y.js +0 -3
  49. /package/dist/{motionFeatures-BIX6OE6G.cjs → motionFeatures-GMXTMT2N.cjs} +0 -0
  50. /package/dist/{motionFeatures-B46A7GY7.js → motionFeatures-WXTLZ273.js} +0 -0
@@ -1,3 +1,3 @@
1
- "use strict";var e=require("../chunk-7YAGRPBN.cjs"),t=require("../chunk-5B3FKOHZ.cjs"),o=require("../chunk-N6H5RJN5.cjs"),i=require("../chunk-HGMLBC2H.cjs"),n=require("../chunk-7GN7QYNC.cjs"),r=require("../chunk-OMH5EBNB.cjs"),a=require("../chunk-OM7LQJTO.cjs"),s=require("@yahoo/uds/fixtures"),l=require("tailwindcss/plugin.js"),d=require("tailwindcss/defaultTheme.js");function u(e){return e&&e.__esModule?e:{default:e}}var c=u(l),_=u(d);var f="sm";function S(e,t,o){const i=e[t],n=o?.[i];return n?`var(${i}, ${n})`:`var(${i})`}function A(e,{type:t,value:o},i){const n="color"===e?"textColor":e;if("palette"===t)return s.alwaysPaletteAliases.includes(o)?o:i(`${n}.${o}`);{const[e,t]=o.split("-");return i(`colors.${e}.${t}`)}}function T({scale:e}){return s.scaleEffectMap[e][f]}function C({backgroundColor:e,borderColor:t,color:o,borderRadius:i,borderWidth:n},a){return{[r.BUTTON_CSS_VAR_MAP.backgroundColor]:A("backgroundColor",e,a),[r.BUTTON_CSS_VAR_MAP.borderColor]:A("borderColor",t,a),[r.BUTTON_CSS_VAR_MAP.color]:A("color",o,a),...i&&{[r.BUTTON_CSS_VAR_MAP.borderRadius]:a(`borderRadius.${i}`)},...n&&{[r.BUTTON_CSS_VAR_MAP.borderWidth]:a(`borderWidth.${n}`)}}}function g(e,t){const{spacingHorizontal:o,spacingVertical:i,gap:n,textVariant:a,iconSize:s}=e;return{[r.BUTTON_CSS_VAR_MAP.padding]:`${t(`spacing[${i}]`)} ${t(`spacing[${o}]`)}`,[r.BUTTON_CSS_VAR_MAP.columnGap]:t(`spacing[${n}]`),[r.BUTTON_CSS_VAR_MAP.fontFamily]:t(`typography.fontFamily.${a}`),[r.BUTTON_CSS_VAR_MAP.fontWeight]:t(`typography.fontWeight.${a}`),[r.BUTTON_CSS_VAR_MAP.fontSize]:t(`typography.fontSize.${a}`),[r.BUTTON_CSS_VAR_MAP.lineHeight]:t(`typography.lineHeight.${a}`),[r.BUTTON_CSS_VAR_MAP.textTransform]:t(`typography.textTransform.${a}`),[r.BUTTON_CSS_VAR_MAP.iconSize]:t(`sizing.icon.${s}`)}}function p(e,t){const o=e.palette[e.defaults.palette][e.defaults.variant],i=e.size[e.defaults.size],a=o.base.scale,l=o.effect.hover.scale.value,d=o.effect.pressed.scale.value,u={...C(o.base,t),...g(i,t),[r.BUTTON_CSS_VAR_MAP.effects.scale.rest]:T({scale:a}),[r.BUTTON_CSS_VAR_MAP.effects.scale.hover]:T({scale:l}),[r.BUTTON_CSS_VAR_MAP.effects.scale.pressed]:T({scale:d})},c={borderRadius:S(r.BUTTON_CSS_VAR_MAP,"borderRadius",u),boxShadow:`inset 0 0 0 ${S(r.BUTTON_CSS_VAR_MAP,"borderWidth",u)} ${S(r.BUTTON_CSS_VAR_MAP,"borderColor",u)}`,color:S(r.BUTTON_CSS_VAR_MAP,"color",u),backgroundColor:S(r.BUTTON_CSS_VAR_MAP,"backgroundColor",u),padding:S(r.BUTTON_CSS_VAR_MAP,"padding",u),fontFamily:S(r.BUTTON_CSS_VAR_MAP,"fontFamily",u),fontWeight:S(r.BUTTON_CSS_VAR_MAP,"fontWeight",u),fontSize:S(r.BUTTON_CSS_VAR_MAP,"fontSize",u),lineHeight:S(r.BUTTON_CSS_VAR_MAP,"lineHeight",u),textTransform:S(r.BUTTON_CSS_VAR_MAP,"textTransform",u),outline:"none",display:"inline-flex",alignItems:"center",whiteSpace:"nowrap",userSelect:"none",...u,transitionProperty:"color, background-color, border-color, text-decoration-color, fill, stroke",transitionTimingFunction:"cubic-bezier(0.4, 0, 0.2, 1)",transitionDuration:"220ms"},_=C(o.state.hover,t),f=C(o.state.pressed,t),A={cursor:"not-allowed",opacity:"0.2",[r.BUTTON_CSS_VAR_MAP.effects.scale.hover]:T({scale:"none"}),[r.BUTTON_CSS_VAR_MAP.effects.scale.pressed]:T({scale:"none"})},p={".uds-button":c,".uds-button .uds-button-icon":{width:S(r.BUTTON_CSS_VAR_MAP,"iconSize",u),height:S(r.BUTTON_CSS_VAR_MAP,"iconSize",u)},".uds-button .uds-button-spacer":{height:S(r.BUTTON_CSS_VAR_MAP,"iconSize",u)},[`.uds-button${r.PSEUDO_STYLE_SELECTOR_MAP.hover}`]:_,[`.uds-button${r.PSEUDO_STYLE_SELECTOR_MAP.pressed}`]:f,[`.uds-button${r.PSEUDO_STYLE_SELECTOR_MAP.disabled}`]:A,".disabled .uds-button":A},h={".hover":{".uds-button":_},".pressed":{".uds-button":f}};for(const[o,i]of n.entries(e.size))p[`.uds-button-${o}`]=g(i,t);function E(o,{palette:i,variant:n}){const a=e.palette[i][n],s=a.base,l=a.state,d=a.effect,u={rest:{...C(s,t)},restScale:{[r.BUTTON_CSS_VAR_MAP.effects.scale.rest]:T({scale:s.scale}),[r.BUTTON_CSS_VAR_MAP.effects.scale.hover]:T({scale:d.hover.scale.value}),[r.BUTTON_CSS_VAR_MAP.effects.scale.pressed]:T({scale:d.pressed.scale.value})},hover:C(l.hover,t),pressed:C(l.pressed,t)};p[o]=u.rest,p[`${o}${r.PSEUDO_STYLE_SELECTOR_MAP.notDisabled}`]=u.restScale,p[`${o}${r.PSEUDO_STYLE_SELECTOR_MAP.hover}`]=u.hover,p[`${o}${r.PSEUDO_STYLE_SELECTOR_MAP.pressed}`]=u.pressed,h[".hover"][o]=u.hover,h[".pressed"][o]=u.pressed}for(const t of s.buttonPalettes){E(`.uds-button-${t}`,{palette:t,variant:e.defaults.variant});for(const o of s.buttonVariants)E(`.uds-button-${t}.uds-button-${o}`,{palette:t,variant:o}),t===e.defaults.palette&&E(`.uds-button-${o}`,{palette:t,variant:o})}return{...p,...h}}var h={outlineOffset:"var(--uds-outline-offset)",outlineWidth:"var(--uds-outline-width)",outlineColor:"var(--uds-outline-color)",outlineStyle:"var(--uds-outline-style)"};var E="44px";function O(e,t){const{spacing:o,iconSize:i}=e;return{[r.ICON_BUTTON_CSS_VAR_MAP.padding]:t(`spacing[${o}]`),[r.ICON_BUTTON_CSS_VAR_MAP.iconSize]:t(`sizing.icon.${i}`)}}function M(e,t){const o=O(e.size[e.defaults.size],t),i={".uds-icon-button":{display:"inline-flex",alignItems:"center",...{padding:S(r.ICON_BUTTON_CSS_VAR_MAP,"padding",o)}},".uds-icon-button .uds-button-icon":{width:S(r.ICON_BUTTON_CSS_VAR_MAP,"iconSize",o),height:S(r.ICON_BUTTON_CSS_VAR_MAP,"iconSize",o)}};for(const[o,r]of n.entries(e.size))i[`.uds-icon-button-${o}`]=O(r,t);return i}var b={display1:"6xl",display2:"5xl",display3:"4xl",title1:"3xl",title2:"2xl",title3:"xl",title4:"lg",headline1:"base",body1:"base",label1:"sm",label2:"sm",caption1:"xs",caption2:"xs"},R={fontSize:b,lineHeight:b,borderRadius:{xs:"sm",sm:"DEFAULT",md:"md",lg:"lg",xl:"xl"},borderWidth:{thin:"DEFAULT",medium:"2",thick:"4"}};function L(e){return e.endsWith("rem")?16*parseFloat(e):parseFloat(e)}var m={...i.defaultTokensConfig.scaleMode[i.DEFAULT_SCALE_MODE],fontSize:{...i.defaultTokensConfig.scaleMode[i.DEFAULT_SCALE_MODE].fontSize,...n.mapValues(R.fontSize,(e=>L(_.default.fontSize[e][0])))},lineHeight:{...i.defaultTokensConfig.scaleMode[i.DEFAULT_SCALE_MODE].fontSize,...n.mapValues(R.lineHeight,(e=>L(_.default.fontSize[e][1].lineHeight))),display1:L(_.default.fontSize[R.fontSize.display1][0]),display2:L(_.default.fontSize[R.fontSize.display2][0])},fontWeight:n.mapValues(i.defaultTokensConfig.scaleMode[i.DEFAULT_SCALE_MODE].fontWeight,(()=>"regular")),borderRadius:{...i.defaultTokensConfig.scaleMode[i.DEFAULT_SCALE_MODE].borderRadius,...n.mapValues(R.borderRadius,(e=>L(_.default.borderRadius[e])))},borderWidth:{...i.defaultTokensConfig.scaleMode[i.DEFAULT_SCALE_MODE].borderWidth,...n.mapValues(R.borderWidth,(e=>L(_.default.borderWidth[e])))}};function v(e){return{...i.defaultTokensConfig.scaleMode[e],fontWeight:m.fontWeight,fontSize:n.mapValues(m.fontSize,((t,o)=>t+s.fontSizeRamp[e][o])),lineHeight:n.mapValues(m.lineHeight,((t,o)=>t+s.lineHeightRamp[e][o])),borderRadius:n.mapValues(m.borderRadius,((t,o)=>t+s.borderRadiusRamp[e][o])),borderWidth:n.mapValues(m.borderWidth,((t,o)=>t+s.borderWidthRamp[e][o]))}}var U={...i.defaultTokensConfig,scaleMode:{xSmall:v("xSmall"),small:v("small"),medium:v("medium"),large:v("large"),xLarge:v("xLarge"),xxLarge:v("xxLarge"),xxxLarge:v("xxxLarge")}};var P=c.default.withOptions((function({config:n=i.defaultTokensConfig,disableFontFaceDeclarations:a=!1}){return function({addBase:s,matchUtilities:l,addComponents:d,theme:u}){const c=e.parseTokens(n),_=Object.values(n.font);if(!1===a&&t.addFontFaceDeclarations(_,s),function(e,o){o({":root":t.getFontStyles(e)})}(n.font,s),
2
- /*! © 2024 Yahoo, Inc. UDS v1.1.5 */
3
- function(e,o){const n=t.getColorModeStyles(e);o({":root":n[i.DEFAULT_COLOR_MODE],[`.${r.LIGHT_COLOR_MODE_CLASSNAME}`]:n.light,[`.${r.DARK_COLOR_MODE_CLASSNAME}`]:n.dark})}(c,s),function(e,o){const n=t.getScaleModeStyles(e);o({":root":n[i.DEFAULT_SCALE_MODE],[`.${r.XSMALL_SCALE_MODE_CLASSNAME}`]:n.xSmall,[`.${r.SMALL_SCALE_MODE_CLASSNAME}`]:n.small,[`.${r.MEDIUM_SCALE_MODE_CLASSNAME}`]:n.medium,[`.${r.LARGE_SCALE_MODE_CLASSNAME}`]:n.large,[`.${r.XLARGE_SCALE_MODE_CLASSNAME}`]:n.xLarge,[`.${r.XXLARGE_SCALE_MODE_CLASSNAME}`]:n.xxLarge,[`.${r.XXXLARGE_SCALE_MODE_CLASSNAME}`]:n.xxxLarge})}(c,s),n.button){const e=function(e,t){return p(e,t)}(n.button,u);d(e)}if(n.iconButton){const e=function(e,t){return M(e,t)}(n.iconButton,u);d(e)}n.motion&&function(e,t){t({":root":o.getMotionStyles(e)})}(n.motion,s);s({".uds-hit-target":{position:"relative"},".uds-hit-target::before":{"@media (hover: none)":{content:"''",position:"absolute",top:"50%",left:"50%",width:`max(${E}, 100%)`,height:`max(${E}, 100%)`,transform:"translate(-50%, -50%)"}}});const f=function({theme:e}){return{".uds-ring":{"--uds-outline-offset":e("outlineOffset.DEFAULT"),"--uds-outline-width":e("outlineWidth.DEFAULT"),"--uds-outline-color":e("outlineColor.DEFAULT"),"--uds-outline-style":"solid"},[`.uds-ring${r.PSEUDO_STYLE_SELECTOR_MAP.focused}`]:h,".focused .uds-ring":h}}({theme:u});s(f),l({iconSize:e=>({width:e,height:e,fontSize:e,lineHeight:e})},{values:u("sizing.icon")}),l({avatarSize:e=>({width:e,height:e})},{values:u("sizing.avatar")}),l({case:e=>({"text-transform":e})},{values:u("typography.textTransform")}),l({"font-weight":e=>({"font-weight":e})},{values:u("typography.fontWeight")}),l({"font-size":e=>({"font-size":e})},{values:u("typography.fontSize")})}}),(function({config:t=i.defaultTokensConfig,safelist:o=[]}){const a=e.parseTokens(t),l=a.colorMode[i.DEFAULT_COLOR_MODE].tailwindConfig,d=a.scaleMode[i.DEFAULT_SCALE_MODE],u=n.mapValues(l.spectrum,((e,t)=>({...e,...s.tailwindColorsAsUds[t]}))),c=l.palette.core,_={...s.tailwindColorsAsUds,...u,...i.alwaysPalette,...c},f=l.palette.foreground,S=l.palette.background,A=l.palette.line,T=i.fromEntries(n.entries(R.fontSize).map((([e,t])=>[t,[`var(--${r.FONT_SIZE_PREFIX}-${e})`,{lineHeight:`var(--${r.LINE_HEIGHT_PREFIX}-${e})`}]]))),C=i.fromEntries(n.entries(R.borderRadius).map((([e,t])=>[t,`var(--${r.BORDER_RADIUS_PREFIX}-${e})`]))),g={...d.borderRadius.tailwindConfig,...C},p=i.fromEntries(n.entries(R.borderWidth).map((([e,t])=>[t,`var(--${r.BORDER_WIDTH_PREFIX}-${e})`]))),h={...d.borderWidth.tailwindConfig,...p};return{darkMode:["class",r.DARK_COLOR_MODE_CLASSNAME],safelist:[r.DARK_COLOR_MODE_CLASSNAME,...o],theme:{extend:{aria:{checked:'checked="true"',disabled:'disabled="true"',expanded:'expanded="true"',invalid:'aria-invalid="true"'},data:{active:'active="true"',"active-item":'active-item="true"',autofill:'autofill="true"',backdrop:'backdrop="true"',enter:'enter="true"',leave:'leave="true"',"focus-visible":'focus-visible="true"'},animation:{"accordion-down":"accordion-down 0.2s ease-out","accordion-up":"accordion-up 0.2s ease-out"},borderRadius:g,borderWidth:h,outlineWidth:{...h,DEFAULT:"2px"},outlineOffset:{...h,DEFAULT:"2px"},outlineColor:({theme:e})=>({...A,DEFAULT:e("colors.accent")}),fontFamily:{...Object.fromEntries(s.fontAliases.map((e=>[e,`var(--${r.FONT_FAMILY_PREFIX}-${e})`]))),...Object.fromEntries(s.textVariants.map((e=>[e,`var(--${r.FONT_FAMILY_PREFIX}-${e})`])))},fontSize:T,lineHeight:d.lineHeight.tailwindConfig,colors:_,backgroundColor:S,textColor:f,borderColor:A,fill:S,caretColor:f,placeholderColor:f,textDecorationColor:f,divideColor:A,ringColor:A,ringOffsetColor:A,stroke:A,typography:{fontFamily:d.fontFamily.tailwindConfig,fontWeight:d.fontWeight.tailwindConfig,fontSize:d.fontSize.tailwindConfig,lineHeight:d.lineHeight.tailwindConfig,textTransform:d.textTransform.tailwindConfig},sizing:{icon:d.iconSizes.tailwindConfig,avatar:d.avatarSizes.tailwindConfig}}}}}));exports.defaultTailwindThemeAsUdsConfig=U,exports.getButtonColorForProperty=A,exports.getButtonStyles=p,exports.getIconButtonStyles=M,exports.getUDSContent=()=>[a.__require.resolve("@yahoo/uds"),a.__require.resolve("@yahoo/uds/client"),a.__require.resolve("@yahoo/uds/experimental")],exports.tailwindPlugin=P,exports.udsToTailwindMap=R;
1
+ "use strict";var e=require("../chunk-5O2UG72V.cjs"),t=require("../chunk-KQZYAPGK.cjs"),o=require("../chunk-Z5Y2CHME.cjs"),i=require("../chunk-OIUWGOHD.cjs"),n=require("../chunk-X5YNEVVO.cjs"),r=require("../chunk-FHBEEPY7.cjs"),a=require("../chunk-ML56HUQO.cjs"),s=require("@yahoo/uds/fixtures"),l=require("tailwindcss/plugin"),d=require("tailwindcss/defaultTheme");function u(e){return e&&e.__esModule?e:{default:e}}var c=u(l),_=u(d);var f="sm";function S(e,t,o){const i=e[t],n=o?.[i];return n?`var(${i}, ${n})`:`var(${i})`}function A(e,{type:t,value:o},i){const n="color"===e?"textColor":e;if("palette"===t)return s.alwaysPaletteAliases.includes(o)?o:i(`${n}.${o}`);{const[e,t]=o.split("-");return i(`colors.${e}.${t}`)}}function T({scale:e}){return s.scaleEffectMap[e][f]}function C({backgroundColor:e,borderColor:t,color:o,borderRadius:i,borderWidth:n},a){return{[r.BUTTON_CSS_VAR_MAP.backgroundColor]:A("backgroundColor",e,a),[r.BUTTON_CSS_VAR_MAP.borderColor]:A("borderColor",t,a),[r.BUTTON_CSS_VAR_MAP.color]:A("color",o,a),...i&&{[r.BUTTON_CSS_VAR_MAP.borderRadius]:a(`borderRadius.${i}`)},...n&&{[r.BUTTON_CSS_VAR_MAP.borderWidth]:a(`borderWidth.${n}`)}}}function g(e,t){const{spacingHorizontal:o,spacingVertical:i,gap:n,textVariant:a,iconSize:s}=e;return{[r.BUTTON_CSS_VAR_MAP.padding]:`${t(`spacing[${i}]`)} ${t(`spacing[${o}]`)}`,[r.BUTTON_CSS_VAR_MAP.columnGap]:t(`spacing[${n}]`),[r.BUTTON_CSS_VAR_MAP.fontFamily]:t(`typography.fontFamily.${a}`),[r.BUTTON_CSS_VAR_MAP.fontWeight]:t(`typography.fontWeight.${a}`),[r.BUTTON_CSS_VAR_MAP.fontSize]:t(`typography.fontSize.${a}`),[r.BUTTON_CSS_VAR_MAP.lineHeight]:t(`typography.lineHeight.${a}`),[r.BUTTON_CSS_VAR_MAP.textTransform]:t(`typography.textTransform.${a}`),[r.BUTTON_CSS_VAR_MAP.iconSize]:t(`sizing.icon.${s}`)}}function p(e,t){const o=e.palette[e.defaults.palette][e.defaults.variant],i=e.size[e.defaults.size],a=o.base.scale,l=o.effect.hover.scale.value,d=o.effect.pressed.scale.value,u={...C(o.base,t),...g(i,t),[r.BUTTON_CSS_VAR_MAP.effects.scale.rest]:T({scale:a}),[r.BUTTON_CSS_VAR_MAP.effects.scale.hover]:T({scale:l}),[r.BUTTON_CSS_VAR_MAP.effects.scale.pressed]:T({scale:d})},c={borderRadius:S(r.BUTTON_CSS_VAR_MAP,"borderRadius",u),boxShadow:`inset 0 0 0 ${S(r.BUTTON_CSS_VAR_MAP,"borderWidth",u)} ${S(r.BUTTON_CSS_VAR_MAP,"borderColor",u)}`,color:S(r.BUTTON_CSS_VAR_MAP,"color",u),backgroundColor:S(r.BUTTON_CSS_VAR_MAP,"backgroundColor",u),padding:S(r.BUTTON_CSS_VAR_MAP,"padding",u),fontFamily:S(r.BUTTON_CSS_VAR_MAP,"fontFamily",u),fontWeight:S(r.BUTTON_CSS_VAR_MAP,"fontWeight",u),fontSize:S(r.BUTTON_CSS_VAR_MAP,"fontSize",u),lineHeight:S(r.BUTTON_CSS_VAR_MAP,"lineHeight",u),textTransform:S(r.BUTTON_CSS_VAR_MAP,"textTransform",u),display:"inline-flex",alignItems:"center",whiteSpace:"nowrap",userSelect:"none",...u,transitionProperty:"color, background-color, border-color, text-decoration-color, fill, stroke",transitionTimingFunction:"cubic-bezier(0.4, 0, 0.2, 1)",transitionDuration:"220ms"},_=C(o.state.hover,t),f=C(o.state.pressed,t),A={cursor:"not-allowed",opacity:"0.2",[r.BUTTON_CSS_VAR_MAP.effects.scale.hover]:T({scale:"none"}),[r.BUTTON_CSS_VAR_MAP.effects.scale.pressed]:T({scale:"none"})},p={".uds-button":c,".uds-button .uds-button-icon":{width:S(r.BUTTON_CSS_VAR_MAP,"iconSize",u),height:S(r.BUTTON_CSS_VAR_MAP,"iconSize",u)},".uds-button .uds-button-spacer":{height:S(r.BUTTON_CSS_VAR_MAP,"iconSize",u)},[`.uds-button${r.PSEUDO_STYLE_SELECTOR_MAP.hover}`]:_,[`.uds-button${r.PSEUDO_STYLE_SELECTOR_MAP.pressed}`]:f,[`.uds-button${r.PSEUDO_STYLE_SELECTOR_MAP.disabled}`]:A,".disabled .uds-button":A},h={".hover":{".uds-button":_},".pressed":{".uds-button":f}};for(const[o,i]of n.entries(e.size))p[`.uds-button-${o}`]=g(i,t);function E(o,{palette:i,variant:n}){const a=e.palette[i][n],s=a.base,l=a.state,d=a.effect,u={rest:{...C(s,t)},restScale:{[r.BUTTON_CSS_VAR_MAP.effects.scale.rest]:T({scale:s.scale}),[r.BUTTON_CSS_VAR_MAP.effects.scale.hover]:T({scale:d.hover.scale.value}),[r.BUTTON_CSS_VAR_MAP.effects.scale.pressed]:T({scale:d.pressed.scale.value})},hover:C(l.hover,t),pressed:C(l.pressed,t)};p[o]=u.rest,p[`${o}${r.PSEUDO_STYLE_SELECTOR_MAP.notDisabled}`]=u.restScale,p[`${o}${r.PSEUDO_STYLE_SELECTOR_MAP.hover}`]=u.hover,p[`${o}${r.PSEUDO_STYLE_SELECTOR_MAP.pressed}`]=u.pressed,h[".hover"][o]=u.hover,h[".pressed"][o]=u.pressed}for(const t of s.buttonPalettes){E(`.uds-button-${t}`,{palette:t,variant:e.defaults.variant});for(const o of s.buttonVariants)E(`.uds-button-${t}.uds-button-${o}`,{palette:t,variant:o}),t===e.defaults.palette&&E(`.uds-button-${o}`,{palette:t,variant:o})}return{...p,...h}}var h={outlineOffset:"var(--uds-outline-offset)",outlineWidth:"var(--uds-outline-width)",outlineColor:"var(--uds-outline-color)",outlineStyle:"var(--uds-outline-style)"};var E="44px";function O(e,t){const{spacing:o,iconSize:i}=e;return{[r.ICON_BUTTON_CSS_VAR_MAP.padding]:t(`spacing[${o}]`),[r.ICON_BUTTON_CSS_VAR_MAP.iconSize]:t(`sizing.icon.${i}`)}}function M(e,t){const o=O(e.size[e.defaults.size],t),i={".uds-icon-button":{display:"inline-flex",alignItems:"center",...{padding:S(r.ICON_BUTTON_CSS_VAR_MAP,"padding",o)}},".uds-icon-button .uds-button-icon":{width:S(r.ICON_BUTTON_CSS_VAR_MAP,"iconSize",o),height:S(r.ICON_BUTTON_CSS_VAR_MAP,"iconSize",o)}};for(const[o,r]of n.entries(e.size))i[`.uds-icon-button-${o}`]=O(r,t);return i}var b={display1:"6xl",display2:"5xl",display3:"4xl",title1:"3xl",title2:"2xl",title3:"xl",title4:"lg",headline1:"base",body1:"base",label1:"sm",label2:"sm",caption1:"xs",caption2:"xs"},R={fontSize:b,lineHeight:b,borderRadius:{xs:"sm",sm:"DEFAULT",md:"md",lg:"lg",xl:"xl"},borderWidth:{thin:"DEFAULT",medium:"2",thick:"4"}};function m(e){return e.endsWith("rem")?16*parseFloat(e):parseFloat(e)}var L={...i.defaultTokensConfig.scaleMode[i.DEFAULT_SCALE_MODE],fontSize:{...i.defaultTokensConfig.scaleMode[i.DEFAULT_SCALE_MODE].fontSize,...n.mapValues(R.fontSize,(e=>m(_.default.fontSize[e][0])))},lineHeight:{...i.defaultTokensConfig.scaleMode[i.DEFAULT_SCALE_MODE].fontSize,...n.mapValues(R.lineHeight,(e=>m(_.default.fontSize[e][1].lineHeight))),display1:m(_.default.fontSize[R.fontSize.display1][0]),display2:m(_.default.fontSize[R.fontSize.display2][0])},fontWeight:n.mapValues(i.defaultTokensConfig.scaleMode[i.DEFAULT_SCALE_MODE].fontWeight,(()=>"regular")),borderRadius:{...i.defaultTokensConfig.scaleMode[i.DEFAULT_SCALE_MODE].borderRadius,...n.mapValues(R.borderRadius,(e=>m(_.default.borderRadius[e])))},borderWidth:{...i.defaultTokensConfig.scaleMode[i.DEFAULT_SCALE_MODE].borderWidth,...n.mapValues(R.borderWidth,(e=>m(_.default.borderWidth[e])))}};function U(e){return{...i.defaultTokensConfig.scaleMode[e],fontWeight:L.fontWeight,fontSize:n.mapValues(L.fontSize,((t,o)=>t+s.fontSizeRamp[e][o])),lineHeight:n.mapValues(L.lineHeight,((t,o)=>t+s.lineHeightRamp[e][o])),borderRadius:n.mapValues(L.borderRadius,((t,o)=>t+s.borderRadiusRamp[e][o])),borderWidth:n.mapValues(L.borderWidth,((t,o)=>t+s.borderWidthRamp[e][o]))}}var v={...i.defaultTokensConfig,scaleMode:{xSmall:U("xSmall"),small:U("small"),medium:U("medium"),large:U("large"),xLarge:U("xLarge"),xxLarge:U("xxLarge"),xxxLarge:U("xxxLarge")}};var P=c.default.withOptions((function({config:n=i.defaultTokensConfig,disableFontFaceDeclarations:a=!1}){return function({addBase:s,matchUtilities:l,addComponents:d,theme:u}){const c=e.parseTokens(n),_=Object.values(n.font);if(!1===a&&t.addFontFaceDeclarations(_,s),function(e,o){o({":root":t.getFontStyles(e)})}(n.font,s),
2
+ /*! © 2024 Yahoo, Inc. UDS v1.1.7 */
3
+ function(e,o){const n=t.getColorModeStyles(e);o({":root":n[i.DEFAULT_COLOR_MODE],[`.${r.LIGHT_COLOR_MODE_CLASSNAME}`]:n.light,[`.${r.DARK_COLOR_MODE_CLASSNAME}`]:n.dark})}(c,s),function(e,o){const n=t.getScaleModeStyles(e);o({":root":n[i.DEFAULT_SCALE_MODE],[`.${r.XSMALL_SCALE_MODE_CLASSNAME}`]:n.xSmall,[`.${r.SMALL_SCALE_MODE_CLASSNAME}`]:n.small,[`.${r.MEDIUM_SCALE_MODE_CLASSNAME}`]:n.medium,[`.${r.LARGE_SCALE_MODE_CLASSNAME}`]:n.large,[`.${r.XLARGE_SCALE_MODE_CLASSNAME}`]:n.xLarge,[`.${r.XXLARGE_SCALE_MODE_CLASSNAME}`]:n.xxLarge,[`.${r.XXXLARGE_SCALE_MODE_CLASSNAME}`]:n.xxxLarge})}(c,s),n.button){const e=function(e,t){return p(e,t)}(n.button,u);d(e)}if(n.iconButton){const e=function(e,t){return M(e,t)}(n.iconButton,u);d(e)}n.motion&&function(e,t){t({":root":o.getMotionStyles(e)})}(n.motion,s);s({".uds-hit-target":{position:"relative"},".uds-hit-target::before":{"@media (hover: none)":{content:"''",position:"absolute",top:"50%",left:"50%",width:`max(${E}, 100%)`,height:`max(${E}, 100%)`,transform:"translate(-50%, -50%)"}}});const f=function({theme:e}){return{".uds-ring":{"--uds-outline-offset":e("outlineOffset.DEFAULT"),"--uds-outline-width":e("outlineWidth.DEFAULT"),"--uds-outline-color":e("outlineColor.DEFAULT"),"--uds-outline-style":"solid"},[`.uds-ring${r.PSEUDO_STYLE_SELECTOR_MAP.focused}`]:h,".focused .uds-ring":h}}({theme:u});s(f),l({iconSize:e=>({width:e,height:e,fontSize:e,lineHeight:e})},{values:u("sizing.icon")}),l({avatarSize:e=>({width:e,height:e})},{values:u("sizing.avatar")}),l({case:e=>({"text-transform":e})},{values:u("typography.textTransform")}),l({"font-weight":e=>({"font-weight":e})},{values:u("typography.fontWeight")}),l({"font-size":e=>({"font-size":e})},{values:u("typography.fontSize")})}}),(function({config:t=i.defaultTokensConfig,safelist:o=[]}){const a=e.parseTokens(t),l=a.colorMode[i.DEFAULT_COLOR_MODE].tailwindConfig,d=a.scaleMode[i.DEFAULT_SCALE_MODE],u=n.mapValues(l.spectrum,((e,t)=>({...e,...s.tailwindColorsAsUds[t]}))),c=l.palette.core,_={...s.tailwindColorsAsUds,...u,...i.alwaysPalette,...c},f=l.palette.foreground,S=l.palette.background,A=l.palette.line,T=i.fromEntries(n.entries(R.fontSize).map((([e,t])=>[t,[`var(--${r.FONT_SIZE_PREFIX}-${e})`,{lineHeight:`var(--${r.LINE_HEIGHT_PREFIX}-${e})`}]]))),C=i.fromEntries(n.entries(R.borderRadius).map((([e,t])=>[t,`var(--${r.BORDER_RADIUS_PREFIX}-${e})`]))),g={...d.borderRadius.tailwindConfig,...C},p=i.fromEntries(n.entries(R.borderWidth).map((([e,t])=>[t,`var(--${r.BORDER_WIDTH_PREFIX}-${e})`]))),h={...d.borderWidth.tailwindConfig,...p};return{darkMode:["class",r.DARK_COLOR_MODE_CLASSNAME],safelist:[r.DARK_COLOR_MODE_CLASSNAME,...o],theme:{extend:{aria:{checked:'checked="true"',disabled:'disabled="true"',expanded:'expanded="true"',invalid:'aria-invalid="true"'},data:{active:'active="true"',"active-item":'active-item="true"',autofill:'autofill="true"',backdrop:'backdrop="true"',enter:'enter="true"',leave:'leave="true"',"focus-visible":'focus-visible="true"'},animation:{"accordion-down":"accordion-down 0.2s ease-out","accordion-up":"accordion-up 0.2s ease-out"},borderRadius:g,borderWidth:h,outlineWidth:{...h,DEFAULT:"2px"},outlineOffset:{...h,DEFAULT:"2px"},outlineColor:({theme:e})=>({...A,DEFAULT:e("colors.accent")}),fontFamily:{...Object.fromEntries(s.fontAliases.map((e=>[e,`var(--${r.FONT_FAMILY_PREFIX}-${e})`]))),...Object.fromEntries(s.textVariants.map((e=>[e,`var(--${r.FONT_FAMILY_PREFIX}-${e})`])))},fontSize:T,lineHeight:d.lineHeight.tailwindConfig,colors:_,backgroundColor:S,textColor:f,borderColor:A,fill:S,caretColor:f,placeholderColor:f,textDecorationColor:f,divideColor:A,ringColor:A,ringOffsetColor:A,stroke:A,typography:{fontFamily:d.fontFamily.tailwindConfig,fontWeight:d.fontWeight.tailwindConfig,fontSize:d.fontSize.tailwindConfig,lineHeight:d.lineHeight.tailwindConfig,textTransform:d.textTransform.tailwindConfig},sizing:{icon:d.iconSizes.tailwindConfig,avatar:d.avatarSizes.tailwindConfig}}}}}));exports.defaultTailwindThemeAsUdsConfig=v,exports.getButtonColorForProperty=A,exports.getButtonStyles=p,exports.getIconButtonStyles=M,exports.getUDSContent=()=>[a.__require.resolve("@yahoo/uds"),a.__require.resolve("@yahoo/uds/client"),a.__require.resolve("@yahoo/uds/experimental")],exports.tailwindPlugin=P,exports.udsToTailwindMap=R;
@@ -1,3 +1,3 @@
1
- import{parseTokens as e}from"../chunk-D6WFGMAQ.js";import{addFontFaceDeclarations as t,getColorModeStyles as o,getFontStyles as i,getScaleModeStyles as n}from"../chunk-6G6Y2JC7.js";import{getMotionStyles as r}from"../chunk-AQCF2ALW.js";import{defaultTokensConfig as a,DEFAULT_SCALE_MODE as s,fromEntries as l,DEFAULT_COLOR_MODE as d,alwaysPalette as c}from"../chunk-GMB2Q5R6.js";import{mapValues as u,entries as f}from"../chunk-3PSQ7QO3.js";import{FONT_SIZE_PREFIX as h,LINE_HEIGHT_PREFIX as p,BORDER_RADIUS_PREFIX as g,BORDER_WIDTH_PREFIX as b,DARK_COLOR_MODE_CLASSNAME as m,LIGHT_COLOR_MODE_CLASSNAME as v,XSMALL_SCALE_MODE_CLASSNAME as $,SMALL_SCALE_MODE_CLASSNAME as x,MEDIUM_SCALE_MODE_CLASSNAME as z,LARGE_SCALE_MODE_CLASSNAME as S,XLARGE_SCALE_MODE_CLASSNAME as y,XXLARGE_SCALE_MODE_CLASSNAME as C,XXXLARGE_SCALE_MODE_CLASSNAME as W,BUTTON_CSS_VAR_MAP as w,PSEUDO_STYLE_SELECTOR_MAP as k,ICON_BUTTON_CSS_VAR_MAP as F,FONT_FAMILY_PREFIX as L}from"../chunk-3PWPCBUN.js";import{__require as H}from"../chunk-OYIVEJ5U.js";import{tailwindColorsAsUds as T,alwaysPaletteAliases as R,buttonPalettes as D,buttonVariants as M,fontSizeRamp as A,lineHeightRamp as E,borderRadiusRamp as U,borderWidthRamp as j,fontAliases as O,textVariants as B,scaleEffectMap as Q}from"@yahoo/uds/fixtures";import G from"tailwindcss/plugin";import P from"tailwindcss/defaultTheme";var I="sm";function V(e,t,o){const i=e[t],n=o?.[i];return n?`var(${i}, ${n})`:`var(${i})`}function J(e,{type:t,value:o},i){const n="color"===e?"textColor":e;if("palette"===t)return R.includes(o)?o:i(`${n}.${o}`);{const[e,t]=o.split("-");return i(`colors.${e}.${t}`)}}function Y({scale:e}){return Q[e][I]}function N({backgroundColor:e,borderColor:t,color:o,borderRadius:i,borderWidth:n},r){return{[w.backgroundColor]:J("backgroundColor",e,r),[w.borderColor]:J("borderColor",t,r),[w.color]:J("color",o,r),...i&&{[w.borderRadius]:r(`borderRadius.${i}`)},...n&&{[w.borderWidth]:r(`borderWidth.${n}`)}}}function q(e,t){const{spacingHorizontal:o,spacingVertical:i,gap:n,textVariant:r,iconSize:a}=e;return{[w.padding]:`${t(`spacing[${i}]`)} ${t(`spacing[${o}]`)}`,[w.columnGap]:t(`spacing[${n}]`),[w.fontFamily]:t(`typography.fontFamily.${r}`),[w.fontWeight]:t(`typography.fontWeight.${r}`),[w.fontSize]:t(`typography.fontSize.${r}`),[w.lineHeight]:t(`typography.lineHeight.${r}`),[w.textTransform]:t(`typography.textTransform.${r}`),[w.iconSize]:t(`sizing.icon.${a}`)}}function K(e,t){const o=e.palette[e.defaults.palette][e.defaults.variant],i=e.size[e.defaults.size],n=o.base.scale,r=o.effect.hover.scale.value,a=o.effect.pressed.scale.value,s={...N(o.base,t),...q(i,t),[w.effects.scale.rest]:Y({scale:n}),[w.effects.scale.hover]:Y({scale:r}),[w.effects.scale.pressed]:Y({scale:a})},l={borderRadius:V(w,"borderRadius",s),boxShadow:`inset 0 0 0 ${V(w,"borderWidth",s)} ${V(w,"borderColor",s)}`,color:V(w,"color",s),backgroundColor:V(w,"backgroundColor",s),padding:V(w,"padding",s),fontFamily:V(w,"fontFamily",s),fontWeight:V(w,"fontWeight",s),fontSize:V(w,"fontSize",s),lineHeight:V(w,"lineHeight",s),textTransform:V(w,"textTransform",s),outline:"none",display:"inline-flex",alignItems:"center",whiteSpace:"nowrap",userSelect:"none",...s,transitionProperty:"color, background-color, border-color, text-decoration-color, fill, stroke",transitionTimingFunction:"cubic-bezier(0.4, 0, 0.2, 1)",transitionDuration:"220ms"},d=N(o.state.hover,t),c=N(o.state.pressed,t),u={cursor:"not-allowed",opacity:"0.2",[w.effects.scale.hover]:Y({scale:"none"}),[w.effects.scale.pressed]:Y({scale:"none"})},h={".uds-button":l,".uds-button .uds-button-icon":{width:V(w,"iconSize",s),height:V(w,"iconSize",s)},".uds-button .uds-button-spacer":{height:V(w,"iconSize",s)},[`.uds-button${k.hover}`]:d,[`.uds-button${k.pressed}`]:c,[`.uds-button${k.disabled}`]:u,".disabled .uds-button":u},p={".hover":{".uds-button":d},".pressed":{".uds-button":c}};for(const[o,i]of f(e.size))h[`.uds-button-${o}`]=q(i,t);function g(o,{palette:i,variant:n}){const r=e.palette[i][n],a=r.base,s=r.state,l=r.effect,d={rest:{...N(a,t)},restScale:{[w.effects.scale.rest]:Y({scale:a.scale}),[w.effects.scale.hover]:Y({scale:l.hover.scale.value}),[w.effects.scale.pressed]:Y({scale:l.pressed.scale.value})},hover:N(s.hover,t),pressed:N(s.pressed,t)};h[o]=d.rest,h[`${o}${k.notDisabled}`]=d.restScale,h[`${o}${k.hover}`]=d.hover,h[`${o}${k.pressed}`]=d.pressed,p[".hover"][o]=d.hover,p[".pressed"][o]=d.pressed}for(const t of D){g(`.uds-button-${t}`,{palette:t,variant:e.defaults.variant});for(const o of M)g(`.uds-button-${t}.uds-button-${o}`,{palette:t,variant:o}),t===e.defaults.palette&&g(`.uds-button-${o}`,{palette:t,variant:o})}return{...h,...p}}var X={outlineOffset:"var(--uds-outline-offset)",outlineWidth:"var(--uds-outline-width)",outlineColor:"var(--uds-outline-color)",outlineStyle:"var(--uds-outline-style)"};var Z="44px";function _(e,t){const{spacing:o,iconSize:i}=e;return{[F.padding]:t(`spacing[${o}]`),[F.iconSize]:t(`sizing.icon.${i}`)}}function ee(e,t){const o=_(e.size[e.defaults.size],t),i={".uds-icon-button":{display:"inline-flex",alignItems:"center",...{padding:V(F,"padding",o)}},".uds-icon-button .uds-button-icon":{width:V(F,"iconSize",o),height:V(F,"iconSize",o)}};for(const[o,n]of f(e.size))i[`.uds-icon-button-${o}`]=_(n,t);return i}var te={display1:"6xl",display2:"5xl",display3:"4xl",title1:"3xl",title2:"2xl",title3:"xl",title4:"lg",headline1:"base",body1:"base",label1:"sm",label2:"sm",caption1:"xs",caption2:"xs"},oe={fontSize:te,lineHeight:te,borderRadius:{xs:"sm",sm:"DEFAULT",md:"md",lg:"lg",xl:"xl"},borderWidth:{thin:"DEFAULT",medium:"2",thick:"4"}};function ie(e){return e.endsWith("rem")?16*parseFloat(e):parseFloat(e)}var ne={...a.scaleMode[s],fontSize:{...a.scaleMode[s].fontSize,...u(oe.fontSize,(e=>ie(P.fontSize[e][0])))},lineHeight:{...a.scaleMode[s].fontSize,...u(oe.lineHeight,(e=>ie(P.fontSize[e][1].lineHeight))),display1:ie(P.fontSize[oe.fontSize.display1][0]),display2:ie(P.fontSize[oe.fontSize.display2][0])},fontWeight:u(a.scaleMode[s].fontWeight,(()=>"regular")),borderRadius:{...a.scaleMode[s].borderRadius,...u(oe.borderRadius,(e=>ie(P.borderRadius[e])))},borderWidth:{...a.scaleMode[s].borderWidth,...u(oe.borderWidth,(e=>ie(P.borderWidth[e])))}};function re(e){return{...a.scaleMode[e],fontWeight:ne.fontWeight,fontSize:u(ne.fontSize,((t,o)=>t+A[e][o])),lineHeight:u(ne.lineHeight,((t,o)=>t+E[e][o])),borderRadius:u(ne.borderRadius,((t,o)=>t+U[e][o])),borderWidth:u(ne.borderWidth,((t,o)=>t+j[e][o]))}}var ae={...a,scaleMode:{xSmall:re("xSmall"),small:re("small"),medium:re("medium"),large:re("large"),xLarge:re("xLarge"),xxLarge:re("xxLarge"),xxxLarge:re("xxxLarge")}};var se=G.withOptions((function({config:l=a,disableFontFaceDeclarations:c=!1}){return function({addBase:a,matchUtilities:u,addComponents:f,theme:h}){const p=e(l),g=Object.values(l.font);if(!1===c&&t(g,a),function(e,t){t({":root":i(e)})}(l.font,a),
2
- /*! © 2024 Yahoo, Inc. UDS v1.1.5 */
3
- function(e,t){const i=o(e);t({":root":i[d],[`.${v}`]:i.light,[`.${m}`]:i.dark})}(p,a),function(e,t){const o=n(e);t({":root":o[s],[`.${$}`]:o.xSmall,[`.${x}`]:o.small,[`.${z}`]:o.medium,[`.${S}`]:o.large,[`.${y}`]:o.xLarge,[`.${C}`]:o.xxLarge,[`.${W}`]:o.xxxLarge})}(p,a),l.button){const e=function(e,t){return K(e,t)}(l.button,h);f(e)}if(l.iconButton){const e=function(e,t){return ee(e,t)}(l.iconButton,h);f(e)}l.motion&&function(e,t){t({":root":r(e)})}(l.motion,a);a({".uds-hit-target":{position:"relative"},".uds-hit-target::before":{"@media (hover: none)":{content:"''",position:"absolute",top:"50%",left:"50%",width:`max(${Z}, 100%)`,height:`max(${Z}, 100%)`,transform:"translate(-50%, -50%)"}}});const b=function({theme:e}){return{".uds-ring":{"--uds-outline-offset":e("outlineOffset.DEFAULT"),"--uds-outline-width":e("outlineWidth.DEFAULT"),"--uds-outline-color":e("outlineColor.DEFAULT"),"--uds-outline-style":"solid"},[`.uds-ring${k.focused}`]:X,".focused .uds-ring":X}}({theme:h});a(b),u({iconSize:e=>({width:e,height:e,fontSize:e,lineHeight:e})},{values:h("sizing.icon")}),u({avatarSize:e=>({width:e,height:e})},{values:h("sizing.avatar")}),u({case:e=>({"text-transform":e})},{values:h("typography.textTransform")}),u({"font-weight":e=>({"font-weight":e})},{values:h("typography.fontWeight")}),u({"font-size":e=>({"font-size":e})},{values:h("typography.fontSize")})}}),(function({config:t=a,safelist:o=[]}){const i=e(t),n=i.colorMode[d].tailwindConfig,r=i.scaleMode[s],v=u(n.spectrum,((e,t)=>({...e,...T[t]}))),$=n.palette.core,x={...T,...v,...c,...$},z=n.palette.foreground,S=n.palette.background,y=n.palette.line,C=l(f(oe.fontSize).map((([e,t])=>[t,[`var(--${h}-${e})`,{lineHeight:`var(--${p}-${e})`}]]))),W=l(f(oe.borderRadius).map((([e,t])=>[t,`var(--${g}-${e})`]))),w={...r.borderRadius.tailwindConfig,...W},k=l(f(oe.borderWidth).map((([e,t])=>[t,`var(--${b}-${e})`]))),F={...r.borderWidth.tailwindConfig,...k};return{darkMode:["class",m],safelist:[m,...o],theme:{extend:{aria:{checked:'checked="true"',disabled:'disabled="true"',expanded:'expanded="true"',invalid:'aria-invalid="true"'},data:{active:'active="true"',"active-item":'active-item="true"',autofill:'autofill="true"',backdrop:'backdrop="true"',enter:'enter="true"',leave:'leave="true"',"focus-visible":'focus-visible="true"'},animation:{"accordion-down":"accordion-down 0.2s ease-out","accordion-up":"accordion-up 0.2s ease-out"},borderRadius:w,borderWidth:F,outlineWidth:{...F,DEFAULT:"2px"},outlineOffset:{...F,DEFAULT:"2px"},outlineColor:({theme:e})=>({...y,DEFAULT:e("colors.accent")}),fontFamily:{...Object.fromEntries(O.map((e=>[e,`var(--${L}-${e})`]))),...Object.fromEntries(B.map((e=>[e,`var(--${L}-${e})`])))},fontSize:C,lineHeight:r.lineHeight.tailwindConfig,colors:x,backgroundColor:S,textColor:z,borderColor:y,fill:S,caretColor:z,placeholderColor:z,textDecorationColor:z,divideColor:y,ringColor:y,ringOffsetColor:y,stroke:y,typography:{fontFamily:r.fontFamily.tailwindConfig,fontWeight:r.fontWeight.tailwindConfig,fontSize:r.fontSize.tailwindConfig,lineHeight:r.lineHeight.tailwindConfig,textTransform:r.textTransform.tailwindConfig},sizing:{icon:r.iconSizes.tailwindConfig,avatar:r.avatarSizes.tailwindConfig}}}}})),le=()=>[H.resolve("@yahoo/uds"),H.resolve("@yahoo/uds/client"),H.resolve("@yahoo/uds/experimental")];export{ae as defaultTailwindThemeAsUdsConfig,J as getButtonColorForProperty,K as getButtonStyles,ee as getIconButtonStyles,le as getUDSContent,se as tailwindPlugin,oe as udsToTailwindMap};
1
+ import{parseTokens as e}from"../chunk-2PWYNHHE.js";import{addFontFaceDeclarations as t,getColorModeStyles as o,getFontStyles as i,getScaleModeStyles as n}from"../chunk-DIBPHB45.js";import{getMotionStyles as r}from"../chunk-S3SOXK7H.js";import{defaultTokensConfig as a,DEFAULT_SCALE_MODE as s,fromEntries as l,DEFAULT_COLOR_MODE as d,alwaysPalette as c}from"../chunk-BCE75B5E.js";import{mapValues as u,entries as f}from"../chunk-D5LOEZUM.js";import{FONT_SIZE_PREFIX as h,LINE_HEIGHT_PREFIX as p,BORDER_RADIUS_PREFIX as g,BORDER_WIDTH_PREFIX as b,DARK_COLOR_MODE_CLASSNAME as m,LIGHT_COLOR_MODE_CLASSNAME as v,XSMALL_SCALE_MODE_CLASSNAME as $,SMALL_SCALE_MODE_CLASSNAME as x,MEDIUM_SCALE_MODE_CLASSNAME as z,LARGE_SCALE_MODE_CLASSNAME as S,XLARGE_SCALE_MODE_CLASSNAME as y,XXLARGE_SCALE_MODE_CLASSNAME as C,XXXLARGE_SCALE_MODE_CLASSNAME as W,BUTTON_CSS_VAR_MAP as w,PSEUDO_STYLE_SELECTOR_MAP as k,ICON_BUTTON_CSS_VAR_MAP as H,FONT_FAMILY_PREFIX as F}from"../chunk-VK5VXZH3.js";import{__require as L}from"../chunk-3AXI4EKV.js";import{tailwindColorsAsUds as T,alwaysPaletteAliases as E,buttonPalettes as R,buttonVariants as D,fontSizeRamp as M,lineHeightRamp as j,borderRadiusRamp as O,borderWidthRamp as U,fontAliases as A,textVariants as B,scaleEffectMap as V}from"@yahoo/uds/fixtures";import I from"tailwindcss/plugin";import K from"tailwindcss/defaultTheme";var P="sm";function X(e,t,o){const i=e[t],n=o?.[i];return n?`var(${i}, ${n})`:`var(${i})`}function Z(e,{type:t,value:o},i){const n="color"===e?"textColor":e;if("palette"===t)return E.includes(o)?o:i(`${n}.${o}`);{const[e,t]=o.split("-");return i(`colors.${e}.${t}`)}}function G({scale:e}){return V[e][P]}function N({backgroundColor:e,borderColor:t,color:o,borderRadius:i,borderWidth:n},r){return{[w.backgroundColor]:Z("backgroundColor",e,r),[w.borderColor]:Z("borderColor",t,r),[w.color]:Z("color",o,r),...i&&{[w.borderRadius]:r(`borderRadius.${i}`)},...n&&{[w.borderWidth]:r(`borderWidth.${n}`)}}}function Y(e,t){const{spacingHorizontal:o,spacingVertical:i,gap:n,textVariant:r,iconSize:a}=e;return{[w.padding]:`${t(`spacing[${i}]`)} ${t(`spacing[${o}]`)}`,[w.columnGap]:t(`spacing[${n}]`),[w.fontFamily]:t(`typography.fontFamily.${r}`),[w.fontWeight]:t(`typography.fontWeight.${r}`),[w.fontSize]:t(`typography.fontSize.${r}`),[w.lineHeight]:t(`typography.lineHeight.${r}`),[w.textTransform]:t(`typography.textTransform.${r}`),[w.iconSize]:t(`sizing.icon.${a}`)}}function q(e,t){const o=e.palette[e.defaults.palette][e.defaults.variant],i=e.size[e.defaults.size],n=o.base.scale,r=o.effect.hover.scale.value,a=o.effect.pressed.scale.value,s={...N(o.base,t),...Y(i,t),[w.effects.scale.rest]:G({scale:n}),[w.effects.scale.hover]:G({scale:r}),[w.effects.scale.pressed]:G({scale:a})},l={borderRadius:X(w,"borderRadius",s),boxShadow:`inset 0 0 0 ${X(w,"borderWidth",s)} ${X(w,"borderColor",s)}`,color:X(w,"color",s),backgroundColor:X(w,"backgroundColor",s),padding:X(w,"padding",s),fontFamily:X(w,"fontFamily",s),fontWeight:X(w,"fontWeight",s),fontSize:X(w,"fontSize",s),lineHeight:X(w,"lineHeight",s),textTransform:X(w,"textTransform",s),display:"inline-flex",alignItems:"center",whiteSpace:"nowrap",userSelect:"none",...s,transitionProperty:"color, background-color, border-color, text-decoration-color, fill, stroke",transitionTimingFunction:"cubic-bezier(0.4, 0, 0.2, 1)",transitionDuration:"220ms"},d=N(o.state.hover,t),c=N(o.state.pressed,t),u={cursor:"not-allowed",opacity:"0.2",[w.effects.scale.hover]:G({scale:"none"}),[w.effects.scale.pressed]:G({scale:"none"})},h={".uds-button":l,".uds-button .uds-button-icon":{width:X(w,"iconSize",s),height:X(w,"iconSize",s)},".uds-button .uds-button-spacer":{height:X(w,"iconSize",s)},[`.uds-button${k.hover}`]:d,[`.uds-button${k.pressed}`]:c,[`.uds-button${k.disabled}`]:u,".disabled .uds-button":u},p={".hover":{".uds-button":d},".pressed":{".uds-button":c}};for(const[o,i]of f(e.size))h[`.uds-button-${o}`]=Y(i,t);function g(o,{palette:i,variant:n}){const r=e.palette[i][n],a=r.base,s=r.state,l=r.effect,d={rest:{...N(a,t)},restScale:{[w.effects.scale.rest]:G({scale:a.scale}),[w.effects.scale.hover]:G({scale:l.hover.scale.value}),[w.effects.scale.pressed]:G({scale:l.pressed.scale.value})},hover:N(s.hover,t),pressed:N(s.pressed,t)};h[o]=d.rest,h[`${o}${k.notDisabled}`]=d.restScale,h[`${o}${k.hover}`]=d.hover,h[`${o}${k.pressed}`]=d.pressed,p[".hover"][o]=d.hover,p[".pressed"][o]=d.pressed}for(const t of R){g(`.uds-button-${t}`,{palette:t,variant:e.defaults.variant});for(const o of D)g(`.uds-button-${t}.uds-button-${o}`,{palette:t,variant:o}),t===e.defaults.palette&&g(`.uds-button-${o}`,{palette:t,variant:o})}return{...h,...p}}var J={outlineOffset:"var(--uds-outline-offset)",outlineWidth:"var(--uds-outline-width)",outlineColor:"var(--uds-outline-color)",outlineStyle:"var(--uds-outline-style)"};var Q="44px";function _(e,t){const{spacing:o,iconSize:i}=e;return{[H.padding]:t(`spacing[${o}]`),[H.iconSize]:t(`sizing.icon.${i}`)}}function ee(e,t){const o=_(e.size[e.defaults.size],t),i={".uds-icon-button":{display:"inline-flex",alignItems:"center",...{padding:X(H,"padding",o)}},".uds-icon-button .uds-button-icon":{width:X(H,"iconSize",o),height:X(H,"iconSize",o)}};for(const[o,n]of f(e.size))i[`.uds-icon-button-${o}`]=_(n,t);return i}var te={display1:"6xl",display2:"5xl",display3:"4xl",title1:"3xl",title2:"2xl",title3:"xl",title4:"lg",headline1:"base",body1:"base",label1:"sm",label2:"sm",caption1:"xs",caption2:"xs"},oe={fontSize:te,lineHeight:te,borderRadius:{xs:"sm",sm:"DEFAULT",md:"md",lg:"lg",xl:"xl"},borderWidth:{thin:"DEFAULT",medium:"2",thick:"4"}};function ie(e){return e.endsWith("rem")?16*parseFloat(e):parseFloat(e)}var ne={...a.scaleMode[s],fontSize:{...a.scaleMode[s].fontSize,...u(oe.fontSize,(e=>ie(K.fontSize[e][0])))},lineHeight:{...a.scaleMode[s].fontSize,...u(oe.lineHeight,(e=>ie(K.fontSize[e][1].lineHeight))),display1:ie(K.fontSize[oe.fontSize.display1][0]),display2:ie(K.fontSize[oe.fontSize.display2][0])},fontWeight:u(a.scaleMode[s].fontWeight,(()=>"regular")),borderRadius:{...a.scaleMode[s].borderRadius,...u(oe.borderRadius,(e=>ie(K.borderRadius[e])))},borderWidth:{...a.scaleMode[s].borderWidth,...u(oe.borderWidth,(e=>ie(K.borderWidth[e])))}};function re(e){return{...a.scaleMode[e],fontWeight:ne.fontWeight,fontSize:u(ne.fontSize,((t,o)=>t+M[e][o])),lineHeight:u(ne.lineHeight,((t,o)=>t+j[e][o])),borderRadius:u(ne.borderRadius,((t,o)=>t+O[e][o])),borderWidth:u(ne.borderWidth,((t,o)=>t+U[e][o]))}}var ae={...a,scaleMode:{xSmall:re("xSmall"),small:re("small"),medium:re("medium"),large:re("large"),xLarge:re("xLarge"),xxLarge:re("xxLarge"),xxxLarge:re("xxxLarge")}};var se=I.withOptions((function({config:l=a,disableFontFaceDeclarations:c=!1}){return function({addBase:a,matchUtilities:u,addComponents:f,theme:h}){const p=e(l),g=Object.values(l.font);if(!1===c&&t(g,a),function(e,t){t({":root":i(e)})}(l.font,a),
2
+ /*! © 2024 Yahoo, Inc. UDS v1.1.7 */
3
+ function(e,t){const i=o(e);t({":root":i[d],[`.${v}`]:i.light,[`.${m}`]:i.dark})}(p,a),function(e,t){const o=n(e);t({":root":o[s],[`.${$}`]:o.xSmall,[`.${x}`]:o.small,[`.${z}`]:o.medium,[`.${S}`]:o.large,[`.${y}`]:o.xLarge,[`.${C}`]:o.xxLarge,[`.${W}`]:o.xxxLarge})}(p,a),l.button){const e=function(e,t){return q(e,t)}(l.button,h);f(e)}if(l.iconButton){const e=function(e,t){return ee(e,t)}(l.iconButton,h);f(e)}l.motion&&function(e,t){t({":root":r(e)})}(l.motion,a);a({".uds-hit-target":{position:"relative"},".uds-hit-target::before":{"@media (hover: none)":{content:"''",position:"absolute",top:"50%",left:"50%",width:`max(${Q}, 100%)`,height:`max(${Q}, 100%)`,transform:"translate(-50%, -50%)"}}});const b=function({theme:e}){return{".uds-ring":{"--uds-outline-offset":e("outlineOffset.DEFAULT"),"--uds-outline-width":e("outlineWidth.DEFAULT"),"--uds-outline-color":e("outlineColor.DEFAULT"),"--uds-outline-style":"solid"},[`.uds-ring${k.focused}`]:J,".focused .uds-ring":J}}({theme:h});a(b),u({iconSize:e=>({width:e,height:e,fontSize:e,lineHeight:e})},{values:h("sizing.icon")}),u({avatarSize:e=>({width:e,height:e})},{values:h("sizing.avatar")}),u({case:e=>({"text-transform":e})},{values:h("typography.textTransform")}),u({"font-weight":e=>({"font-weight":e})},{values:h("typography.fontWeight")}),u({"font-size":e=>({"font-size":e})},{values:h("typography.fontSize")})}}),(function({config:t=a,safelist:o=[]}){const i=e(t),n=i.colorMode[d].tailwindConfig,r=i.scaleMode[s],v=u(n.spectrum,((e,t)=>({...e,...T[t]}))),$=n.palette.core,x={...T,...v,...c,...$},z=n.palette.foreground,S=n.palette.background,y=n.palette.line,C=l(f(oe.fontSize).map((([e,t])=>[t,[`var(--${h}-${e})`,{lineHeight:`var(--${p}-${e})`}]]))),W=l(f(oe.borderRadius).map((([e,t])=>[t,`var(--${g}-${e})`]))),w={...r.borderRadius.tailwindConfig,...W},k=l(f(oe.borderWidth).map((([e,t])=>[t,`var(--${b}-${e})`]))),H={...r.borderWidth.tailwindConfig,...k};return{darkMode:["class",m],safelist:[m,...o],theme:{extend:{aria:{checked:'checked="true"',disabled:'disabled="true"',expanded:'expanded="true"',invalid:'aria-invalid="true"'},data:{active:'active="true"',"active-item":'active-item="true"',autofill:'autofill="true"',backdrop:'backdrop="true"',enter:'enter="true"',leave:'leave="true"',"focus-visible":'focus-visible="true"'},animation:{"accordion-down":"accordion-down 0.2s ease-out","accordion-up":"accordion-up 0.2s ease-out"},borderRadius:w,borderWidth:H,outlineWidth:{...H,DEFAULT:"2px"},outlineOffset:{...H,DEFAULT:"2px"},outlineColor:({theme:e})=>({...y,DEFAULT:e("colors.accent")}),fontFamily:{...Object.fromEntries(A.map((e=>[e,`var(--${F}-${e})`]))),...Object.fromEntries(B.map((e=>[e,`var(--${F}-${e})`])))},fontSize:C,lineHeight:r.lineHeight.tailwindConfig,colors:x,backgroundColor:S,textColor:z,borderColor:y,fill:S,caretColor:z,placeholderColor:z,textDecorationColor:z,divideColor:y,ringColor:y,ringOffsetColor:y,stroke:y,typography:{fontFamily:r.fontFamily.tailwindConfig,fontWeight:r.fontWeight.tailwindConfig,fontSize:r.fontSize.tailwindConfig,lineHeight:r.lineHeight.tailwindConfig,textTransform:r.textTransform.tailwindConfig},sizing:{icon:r.iconSizes.tailwindConfig,avatar:r.avatarSizes.tailwindConfig}}}}})),le=()=>[L.resolve("@yahoo/uds"),L.resolve("@yahoo/uds/client"),L.resolve("@yahoo/uds/experimental")];export{ae as defaultTailwindThemeAsUdsConfig,Z as getButtonColorForProperty,q as getButtonStyles,ee as getIconButtonStyles,le as getUDSContent,se as tailwindPlugin,oe as udsToTailwindMap};
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
- /*! © 2024 Yahoo, Inc. UDS v1.1.5 */
2
+ /*! © 2024 Yahoo, Inc. UDS v1.1.7 */
3
3
  //! This file is generated by purgeCSS.ts from @yahoo/uds
4
4
  //! Do not edit directly
5
5
  //! If there is issue with this file please report to #ask-uds
@@ -1,4 +1,4 @@
1
- /*! © 2024 Yahoo, Inc. UDS v1.1.5 */
1
+ /*! © 2024 Yahoo, Inc. UDS v1.1.7 */
2
2
  var t=["color","placeholderColor","fontFamily","fontSize","fontWeight","lineHeight","textAlign","textTransform","spacing","spacingHorizontal","spacingVertical","spacingBottom","spacingEnd","spacingStart","spacingTop","offset","offsetVertical","offsetHorizontal","offsetBottom","offsetEnd","offsetStart","offsetTop","columnGap","rowGap","backgroundColor","borderColor","borderStartColor","borderEndColor","borderBottomColor","borderTopColor","borderRadius","borderTopStartRadius","borderTopEndRadius","borderBottomStartRadius","borderBottomEndRadius","borderWidth","borderVerticalWidth","borderHorizontalWidth","borderStartWidth","borderEndWidth","borderTopWidth","borderBottomWidth","avatarSize","iconSize","alignContent","alignItems","alignSelf","flex","flexDirection","flexGrow","flexShrink","flexWrap","justifyContent","flexBasis","display","overflow","overflowX","overflowY","position","contentFit","colorMode","scaleMode","buttonPalette","buttonVariant","buttonSize","iconButtonSize"],e={Box:[["display",["flex","block","inline-block","inline","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","contents"]],["flexDirection",["row","column"]],["rowGap",["0","1","2","3","4","5","6","7","8","9","10","11","12","14","16","20","24","28","32","36","40","44","48","52","56","60","64","72","80","96","px","0.5","1.5","2.5","3.5"]],["columnGap",["0","1","2","3","4","5","6","7","8","9","10","11","12","14","16","20","24","28","32","36","40","44","48","52","56","60","64","72","80","96","px","0.5","1.5","2.5","3.5"]],["borderColor",["accent","alert","black","brand","positive","warning","white","transparent","muted","primary","secondary","tertiary","current"]],["borderRadius",["none","xs","sm","md","lg","xl","full"]],["overflow",["auto","hidden","clip","visible","scroll"]]],Button:[["color",["accent","alert","black","brand","positive","warning","white","transparent","muted","on-color","primary","secondary","tertiary","current"]]],HStack:[["alignItems",["center"]],["justifyContent",["space-between"]]],Icon:[["color",["primary","current","tertiary","accent","alert","black","brand","positive","warning","white","transparent","muted","on-color","secondary"]]],IconButton:[],Image:[],Pressable:[["display",["flex","inline-flex"]],["flexDirection",["row"]],["alignItems",["center","flex-start"]],["justifyContent",["space-between"]],["spacingVertical",["4","2"]],["spacingHorizontal",["0","1","2","3","4","5","6","7","8","9","10","11","12","14","16","20","24","28","32","36","40","44","48","52","56","60","64","72","80","96","px","0.5","1.5","2.5","3.5"]],["borderRadius",["md","full"]],["columnGap",["2","3"]],["backgroundColor",["accent","alert","black","brand","positive","warning","white","primary","secondary","transparent","current"]],["borderColor",["muted"]],["borderBottomWidth",["thick"]],["spacingBottom",["1"]],["spacingTop",["4"]]],SpringMotionConfig:[],Text:[["color",["primary","secondary","accent","alert","black","brand","positive","warning","white","transparent","muted","on-color","tertiary","current"]],["fontSize",["display1","display2","display3","title1","title2","title3","title4","headline1","body1","label1","label2","caption1","caption2","legal1"]],["fontFamily",["sans","sans-alt","serif","serif-alt","mono","display1","display2","display3","title1","title2","title3","title4","headline1","body1","label1","label2","caption1","caption2","legal1"]],["fontWeight",["thin","extralight","light","regular","medium","semibold","bold","extrabold","black","display1","display2","display3","title1","title2","title3","title4","headline1","body1","label1","label2","caption1","caption2","legal1"]],["lineHeight",["display1","display2","display3","title1","title2","title3","title4","headline1","body1","label1","label2","caption1","caption2","legal1"]],["textTransform",["display1","display2","display3","title1","title2","title3","title4","headline1","body1","label1","label2","caption1","caption2","legal1","none","uppercase","lowercase","capitalize"]],["display",["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","contents"]],["spacing",["0","1","2","3","4","5","6","7","8","9","10","11","12","14","16","20","24","28","32","36","40","44","48","52","56","60","64","72","80","96","px","0.5","1.5","2.5","3.5"]],["borderBottomColor",["accent","alert","black","brand","positive","warning","white","transparent","muted","primary","secondary","tertiary","current"]],["borderBottomWidth",["thin"]],["spacingStart",["0.5"]]],VStack:[["overflow",["hidden","auto","clip","visible","scroll"]],["spacingHorizontal",["0","1","2","3","4","5","6","7","8","9","10","11","12","14","16","20","24","28","32","36","40","44","48","52","56","60","64","72","80","96","px","0.5","1.5","2.5","3.5"]],["alignItems",["flex-start"]],["borderRadius",["lg","md"]],["backgroundColor",["primary"]],["spacingVertical",["2"]],["position",["fixed"]],["spacing",["8"]]],Accordion:[["spacingHorizontal",["4"]]],Avatar:[],CheckBox:[],Chip:[],Dropdown:[],DropdownItem:[],DropdownItemPressable:[],DropdownItems:[["overflow",["scroll"]]],DropdownTrigger:[],Modal:[],ModalDismiss:[],ModalHeader:[],Popover:[],PopoverAnchor:[],PopoverArrow:[],PopoverDescription:[],PopoverDisclosure:[],PopoverDisclosureArrow:[],PopoverDismiss:[],PopoverHeading:[],PopoverProvider:[],Spinner:[],Tab:[],TabList:[],TabPanel:[],Table:[],Tabs:[],TextInput:[["backgroundColor",["secondary"]],["borderColor",["tertiary"]],["borderWidth",["thin"]],["borderRadius",["md"]],["color",["primary"]],["placeholderColor",["tertiary"]],["spacingVertical",["3"]],["spacingHorizontal",["4"]]],TextInputGroup:[],TextInputLabel:[],ToastContainer:[]},o={Box:"container flex border",Button:"uds-button uds-button .uds-button-icon uds-button .uds-button-spacer uds-button:hover:not([disabled]) uds-button:active:not([disabled]) uds-button:disabled disabled .uds-button hover .uds-button hover .uds-button-brand hover .uds-button-brand.uds-button-primary hover .uds-button-brand.uds-button-secondary hover .uds-button-brand.uds-button-tertiary hover .uds-button-accent hover .uds-button-accent.uds-button-primary hover .uds-button-primary hover .uds-button-accent.uds-button-secondary hover .uds-button-secondary hover .uds-button-accent.uds-button-tertiary hover .uds-button-tertiary hover .uds-button-alert hover .uds-button-alert.uds-button-primary hover .uds-button-alert.uds-button-secondary hover .uds-button-alert.uds-button-tertiary hover .uds-button-positive hover .uds-button-positive.uds-button-primary hover .uds-button-positive.uds-button-secondary hover .uds-button-positive.uds-button-tertiary hover .uds-button-warning hover .uds-button-warning.uds-button-primary hover .uds-button-warning.uds-button-secondary hover .uds-button-warning.uds-button-tertiary pressed .uds-button pressed .uds-button-brand pressed .uds-button-brand.uds-button-primary pressed .uds-button-brand.uds-button-secondary pressed .uds-button-brand.uds-button-tertiary pressed .uds-button-accent pressed .uds-button-accent.uds-button-primary pressed .uds-button-primary pressed .uds-button-accent.uds-button-secondary pressed .uds-button-secondary pressed .uds-button-accent.uds-button-tertiary pressed .uds-button-tertiary pressed .uds-button-alert pressed .uds-button-alert.uds-button-primary pressed .uds-button-alert.uds-button-secondary pressed .uds-button-alert.uds-button-tertiary pressed .uds-button-positive pressed .uds-button-positive.uds-button-primary pressed .uds-button-positive.uds-button-secondary pressed .uds-button-positive.uds-button-tertiary pressed .uds-button-warning pressed .uds-button-warning.uds-button-primary pressed .uds-button-warning.uds-button-secondary pressed .uds-button-warning.uds-button-tertiary uds-icon-button .uds-button-icon flex animate-spin overflow-hidden ring",HStack:"container ",Icon:"outline",IconButton:"uds-button uds-button .uds-button-icon uds-button .uds-button-spacer uds-button:hover:not([disabled]) uds-button:active:not([disabled]) uds-button:disabled disabled .uds-button hover .uds-button hover .uds-button-brand hover .uds-button-brand.uds-button-primary hover .uds-button-brand.uds-button-secondary hover .uds-button-brand.uds-button-tertiary hover .uds-button-accent hover .uds-button-accent.uds-button-primary hover .uds-button-primary hover .uds-button-accent.uds-button-secondary hover .uds-button-secondary hover .uds-button-accent.uds-button-tertiary hover .uds-button-tertiary hover .uds-button-alert hover .uds-button-alert.uds-button-primary hover .uds-button-alert.uds-button-secondary hover .uds-button-alert.uds-button-tertiary hover .uds-button-positive hover .uds-button-positive.uds-button-primary hover .uds-button-positive.uds-button-secondary hover .uds-button-positive.uds-button-tertiary hover .uds-button-warning hover .uds-button-warning.uds-button-primary hover .uds-button-warning.uds-button-secondary hover .uds-button-warning.uds-button-tertiary pressed .uds-button pressed .uds-button-brand pressed .uds-button-brand.uds-button-primary pressed .uds-button-brand.uds-button-secondary pressed .uds-button-brand.uds-button-tertiary pressed .uds-button-accent pressed .uds-button-accent.uds-button-primary pressed .uds-button-primary pressed .uds-button-accent.uds-button-secondary pressed .uds-button-secondary pressed .uds-button-accent.uds-button-tertiary pressed .uds-button-tertiary pressed .uds-button-alert pressed .uds-button-alert.uds-button-primary pressed .uds-button-alert.uds-button-secondary pressed .uds-button-alert.uds-button-tertiary pressed .uds-button-positive pressed .uds-button-positive.uds-button-primary pressed .uds-button-positive.uds-button-secondary pressed .uds-button-positive.uds-button-tertiary pressed .uds-button-warning pressed .uds-button-warning.uds-button-primary pressed .uds-button-warning.uds-button-secondary pressed .uds-button-warning.uds-button-tertiary uds-icon-button uds-icon-button .uds-button-icon animate-spin ring",Image:"flex border",Pressable:"flex border",SpringMotionConfig:"transition",Text:"container flex border",VStack:"container ",Accordion:"flex hidden max-h-0 max-h-full min-h-min w-full transition-\\[max-height\\] duration-500 ease-in-out hover\\:bg-secondary\\/80:hover",Avatar:"",CheckBox:"\\!max-w-0 cursor-pointer select-none opacity-0",Chip:"inline-flex",Dropdown:"",DropdownItem:"",DropdownItemPressable:"\\!disabled .uds-button disabled .uds-button flex cursor-default hover\\:bg-gray-2:hover",DropdownItems:"z-10 max-h-\\[312px\\] min-w-\\[220px\\] \\!stroke-muted \\!stroke-1 shadow-md",DropdownTrigger:"",Modal:"fixed inset-8 top-\\[250px\\] z-50 mx-auto hidden h-fit w-\\[600px\\] origin-center scale-95 opacity-0 shadow-md backdrop-blur-0 transition duration-150 data-\\[enter\\]\\:scale-100[data-enter] data-\\[enter\\]\\:bg-primary[data-enter] data-\\[enter\\]\\:opacity-100[data-enter] data-\\[enter\\]\\:opacity-60[data-enter] data-\\[enter\\]\\:backdrop-blur-sm[data-enter]",ModalDismiss:"fixed inset-8 top-\\[250px\\] z-50 mx-auto hidden h-fit w-\\[600px\\] origin-center scale-95 opacity-0 shadow-md backdrop-blur-0 transition duration-150 data-\\[enter\\]\\:scale-100[data-enter] data-\\[enter\\]\\:bg-primary[data-enter] data-\\[enter\\]\\:opacity-100[data-enter] data-\\[enter\\]\\:opacity-60[data-enter] data-\\[enter\\]\\:backdrop-blur-sm[data-enter]",ModalHeader:"fixed inset-8 top-\\[250px\\] z-50 mx-auto hidden h-fit w-\\[600px\\] origin-center scale-95 opacity-0 shadow-md backdrop-blur-0 transition duration-150 data-\\[enter\\]\\:scale-100[data-enter] data-\\[enter\\]\\:bg-primary[data-enter] data-\\[enter\\]\\:opacity-100[data-enter] data-\\[enter\\]\\:opacity-60[data-enter] data-\\[enter\\]\\:backdrop-blur-sm[data-enter]",Popover:"",PopoverAnchor:"",PopoverArrow:"",PopoverDescription:"",PopoverDisclosure:"",PopoverDisclosureArrow:"",PopoverDismiss:"",PopoverHeading:"",PopoverProvider:"",Spinner:"sr-only absolute relative left-0 right-0 animate-spin self-center fill-accent text-gray-3",Tab:'flex border-b-transparent text-current text-primary aria-selected\\:border-b-accent[aria-selected="true"] aria-selected\\:text-accent[aria-selected="true"]',TabList:'flex border-b-transparent text-current text-primary aria-selected\\:border-b-accent[aria-selected="true"] aria-selected\\:text-accent[aria-selected="true"]',TabPanel:'flex border-b-transparent text-current text-primary aria-selected\\:border-b-accent[aria-selected="true"] aria-selected\\:text-accent[aria-selected="true"]',Table:"block inline flex table table-cell table-header-group table-row-group table-row grid hidden",Tabs:'flex border-b-transparent text-current text-primary aria-selected\\:border-b-accent[aria-selected="true"] aria-selected\\:text-accent[aria-selected="true"]',TextInput:"disabled .uds-button w-full",TextInputGroup:"w-full",TextInputLabel:"",ToastContainer:"relative flex hidden cursor-pointer p-2 transition"},r={Box:[],Button:["Icon","SpringMotionConfig"],HStack:["Box"],Icon:[],IconButton:["Icon","SpringMotionConfig"],Image:[],Pressable:[],SpringMotionConfig:[],Text:[],VStack:["Box"],Accordion:["Icon","Pressable","Text","VStack"],Avatar:[],CheckBox:["CheckBox","HStack","Icon","Text"],Chip:["Icon","Pressable","Text"],Dropdown:["PopoverProvider"],DropdownItem:["DropdownItemPressable","Icon","Text","VStack"],DropdownItemPressable:["Pressable"],DropdownItems:["Popover","PopoverArrow","VStack"],DropdownTrigger:["Button","PopoverDisclosure"],Modal:["IconButton","HStack","Text","VStack"],ModalDismiss:["IconButton","HStack","Text","VStack"],ModalHeader:["IconButton","HStack","Text","VStack"],Popover:["Popover","PopoverAnchor","PopoverArrow","PopoverDescription","PopoverDisclosure","PopoverDisclosureArrow","PopoverDismiss","PopoverHeading","PopoverProvider","HStack","Text"],PopoverAnchor:["Popover","PopoverAnchor","PopoverArrow","PopoverDescription","PopoverDisclosure","PopoverDisclosureArrow","PopoverDismiss","PopoverHeading","PopoverProvider","HStack","Text"],PopoverArrow:["Popover","PopoverAnchor","PopoverArrow","PopoverDescription","PopoverDisclosure","PopoverDisclosureArrow","PopoverDismiss","PopoverHeading","PopoverProvider","HStack","Text"],PopoverDescription:["Popover","PopoverAnchor","PopoverArrow","PopoverDescription","PopoverDisclosure","PopoverDisclosureArrow","PopoverDismiss","PopoverHeading","PopoverProvider","HStack","Text"],PopoverDisclosure:["Popover","PopoverAnchor","PopoverArrow","PopoverDescription","PopoverDisclosure","PopoverDisclosureArrow","PopoverDismiss","PopoverHeading","PopoverProvider","HStack","Text"],PopoverDisclosureArrow:["Popover","PopoverAnchor","PopoverArrow","PopoverDescription","PopoverDisclosure","PopoverDisclosureArrow","PopoverDismiss","PopoverHeading","PopoverProvider","HStack","Text"],PopoverDismiss:["Popover","PopoverAnchor","PopoverArrow","PopoverDescription","PopoverDisclosure","PopoverDisclosureArrow","PopoverDismiss","PopoverHeading","PopoverProvider","HStack","Text"],PopoverHeading:["Popover","PopoverAnchor","PopoverArrow","PopoverDescription","PopoverDisclosure","PopoverDisclosureArrow","PopoverDismiss","PopoverHeading","PopoverProvider","HStack","Text"],PopoverProvider:["Popover","PopoverAnchor","PopoverArrow","PopoverDescription","PopoverDisclosure","PopoverDisclosureArrow","PopoverDismiss","PopoverHeading","PopoverProvider","HStack","Text"],Spinner:[],Tab:["Tab","TabList","TabPanel","Icon","Pressable","Text"],TabList:["Tab","TabList","TabPanel","Icon","Pressable","Text"],TabPanel:["Tab","TabList","TabPanel","Icon","Pressable","Text"],Table:["Box","Text"],Tabs:["Tab","TabList","TabPanel","Icon","Pressable","Text"],TextInput:[],TextInputGroup:["TextInput","TextInputLabel","VStack"],TextInputLabel:["Text"],ToastContainer:["IconButton","ToastContainer"]};
3
3
  //! This file is generated by purgeCSS.ts from @yahoo/uds
4
4
  //! Do not edit directly
@@ -1,3 +1,3 @@
1
- "use strict";var e=require("../chunk-2LIQP6US.cjs"),t=require("lodash-es"),n=require("ts-morph");
2
- /*! © 2024 Yahoo, Inc. UDS v1.1.5 */
1
+ "use strict";var e=require("../chunk-HEPNOEIN.cjs"),t=require("lodash-es"),n=require("ts-morph");
2
+ /*! © 2024 Yahoo, Inc. UDS v1.1.7 */
3
3
  function i(e){if(n.Node.isCallExpression(e)){const t=e.getExpression();if(n.Node.isIdentifier(t)&&"forwardRef"===t.getText())return!0;if(n.Node.isPropertyAccessExpression(t)&&"React.forwardRef"===t.getText())return!0}return!1}function r(e){let t;if(n.Node.isVariableDeclaration(e)||n.Node.isFunctionDeclaration(e)||n.Node.isClassDeclaration(e))t=e.getName();else if(n.Node.isFunctionExpression(e)||n.Node.isArrowFunction(e)){const i=e.getFirstAncestorByKind(n.SyntaxKind.VariableDeclaration);t=i?.getName()}return!!t&&/[A-Z]/.test(t.charAt(0))}function s(e){if(r(e)){if(n.Node.isFunctionDeclaration(e))return e;if(n.Node.isVariableDeclaration(e)){const t=e.getInitializer();if(t)if(i(t)){const[e]=t.getArguments();if(n.Node.isFunctionDeclaration(e)||n.Node.isFunctionExpression(e)||n.Node.isArrowFunction(e))return e}else if(n.Node.isFunctionDeclaration(t)||n.Node.isFunctionExpression(t)||n.Node.isArrowFunction(t))return t}}return null}function o(e){return e.getDescendants().filter((e=>n.Node.isJsxElement(e)||n.Node.isJsxSelfClosingElement(e)))}var a=e=>{const t=e.getParentWhile((e=>!s(e))).getParent();if(!t)return;const i=s(t);if(i){const e=i.getParameters();for(let t=0;t<e.length;t++){const i=e[t],r=i.getChildrenOfKind(n.SyntaxKind.ObjectBindingPattern)[0],s=i.getChildrenOfKind(n.SyntaxKind.Identifier)[0];if(r){const e=r.getFirstDescendantByKind(n.SyntaxKind.DotDotDotToken);if(void 0!==e){const t=e?.getParent()?.getFirstChildByKindOrThrow(n.SyntaxKind.Identifier).getText();return t}}else if(s)return s.getText()}}};exports.findReferencesAsJsxElements=function(e){const t=[];for(const i of e.findReferencesAsNodes()){const e=i.getFirstAncestor((e=>n.Node.isJsxOpeningElement(e)||n.Node.isJsxSelfClosingElement(e)));e&&t.push(e)}return t},exports.getJsxElement=function(e,t){return o(e).find((e=>e.getFirstDescendantByKindOrThrow(n.SyntaxKind.Identifier).getText()===t))},exports.getJsxElements=o,exports.getParentSpreadOrParamIdentifier=a,exports.getReactFunctionDeclaration=s,exports.getUsedPropsInReference=i=>{const r=i.getAttributes(),s=[];return r.forEach((r=>{if(n.Node.isJsxAttribute(r)){const i=r.getNameNode().getText(),o=r.getDescendantsOfKind(n.SyntaxKind.StringLiteral),a=[];0!==o.length&&o.forEach((e=>a.push(e.getLiteralText())));const d=r.getFirstChildByKindOrThrow(n.SyntaxKind.Identifier).getDefinitions().map((e=>e.getDeclarationNode()?.getChildrenOfKind(n.SyntaxKind.Identifier).pop()?.getType().getText())).pop()?.split(".").pop();d||t.isEmpty(i)?e.variants[t.camelCase(d)]&&!t.isEmpty(d)?s.push([t.camelCase(d),a]):t.isEmpty(i)||s.push([i,a]):s.push([i,a])}if(n.Node.isJsxSpreadAttribute(r)){const e=a(i),o=r.getExpression().getChildren(),d=0===o.length?r.getExpression():o.pop();if(!d||d?.getText()===e)return[];d.getType().getProperties().forEach((e=>{const i=e.getDeclarations().map((e=>{const i=e.getChildrenOfKind(n.SyntaxKind.TypeReference)[0]?.getText()??"";return t.camelCase(i)}))[0];t.isEmpty(e.getName())||s.push([e.getName(),[]]),t.isEmpty(i)||s.push([i,[]])}))}return[]})),s},exports.isForwardRefExpression=i,exports.isJsxComponent=r;
@@ -1,2 +1,2 @@
1
- import{variants as e}from"../chunk-TM3T5DQZ.js";import{isEmpty as t,camelCase as n}from"lodash-es";import{Node as i,SyntaxKind as r}from"ts-morph";
2
- /*! © 2024 Yahoo, Inc. UDS v1.1.5 */function s(e){if(i.isCallExpression(e)){const t=e.getExpression();if(i.isIdentifier(t)&&"forwardRef"===t.getText())return!0;if(i.isPropertyAccessExpression(t)&&"React.forwardRef"===t.getText())return!0}return!1}function o(e){let t;if(i.isVariableDeclaration(e)||i.isFunctionDeclaration(e)||i.isClassDeclaration(e))t=e.getName();else if(i.isFunctionExpression(e)||i.isArrowFunction(e)){const n=e.getFirstAncestorByKind(r.VariableDeclaration);t=n?.getName()}return!!t&&/[A-Z]/.test(t.charAt(0))}function c(e){if(o(e)){if(i.isFunctionDeclaration(e))return e;if(i.isVariableDeclaration(e)){const t=e.getInitializer();if(t)if(s(t)){const[e]=t.getArguments();if(i.isFunctionDeclaration(e)||i.isFunctionExpression(e)||i.isArrowFunction(e))return e}else if(i.isFunctionDeclaration(t)||i.isFunctionExpression(t)||i.isArrowFunction(t))return t}}return null}function a(e,t){return f(e).find((e=>e.getFirstDescendantByKindOrThrow(r.Identifier).getText()===t))}function f(e){return e.getDescendants().filter((e=>i.isJsxElement(e)||i.isJsxSelfClosingElement(e)))}function g(e){const t=[];for(const n of e.findReferencesAsNodes()){const e=n.getFirstAncestor((e=>i.isJsxOpeningElement(e)||i.isJsxSelfClosingElement(e)));e&&t.push(e)}return t}var l=e=>{const t=e.getParentWhile((e=>!c(e))).getParent();if(!t)return;const n=c(t);if(n){const e=n.getParameters();for(let t=0;t<e.length;t++){const n=e[t],i=n.getChildrenOfKind(r.ObjectBindingPattern)[0],s=n.getChildrenOfKind(r.Identifier)[0];if(i){const e=i.getFirstDescendantByKind(r.DotDotDotToken);if(void 0!==e){const t=e?.getParent()?.getFirstChildByKindOrThrow(r.Identifier).getText();return t}}else if(s)return s.getText()}}},u=s=>{const o=s.getAttributes(),c=[];return o.forEach((o=>{if(i.isJsxAttribute(o)){const i=o.getNameNode().getText(),s=o.getDescendantsOfKind(r.StringLiteral),a=[];0!==s.length&&s.forEach((e=>a.push(e.getLiteralText())));const f=o.getFirstChildByKindOrThrow(r.Identifier).getDefinitions().map((e=>e.getDeclarationNode()?.getChildrenOfKind(r.Identifier).pop()?.getType().getText())).pop()?.split(".").pop();f||t(i)?e[n(f)]&&!t(f)?c.push([n(f),a]):t(i)||c.push([i,a]):c.push([i,a])}if(i.isJsxSpreadAttribute(o)){const e=l(s),i=o.getExpression().getChildren(),a=0===i.length?o.getExpression():i.pop();if(!a||a?.getText()===e)return[];a.getType().getProperties().forEach((e=>{const i=e.getDeclarations().map((e=>{const t=e.getChildrenOfKind(r.TypeReference)[0]?.getText()??"";return n(t)}))[0];t(e.getName())||c.push([e.getName(),[]]),t(i)||c.push([i,[]])}))}return[]})),c};export{g as findReferencesAsJsxElements,a as getJsxElement,f as getJsxElements,l as getParentSpreadOrParamIdentifier,c as getReactFunctionDeclaration,u as getUsedPropsInReference,s as isForwardRefExpression,o as isJsxComponent};
1
+ import{variants as e}from"../chunk-XRHVMUMI.js";import{isEmpty as t,camelCase as n}from"lodash-es";import{Node as i,SyntaxKind as r}from"ts-morph";
2
+ /*! © 2024 Yahoo, Inc. UDS v1.1.7 */function s(e){if(i.isCallExpression(e)){const t=e.getExpression();if(i.isIdentifier(t)&&"forwardRef"===t.getText())return!0;if(i.isPropertyAccessExpression(t)&&"React.forwardRef"===t.getText())return!0}return!1}function o(e){let t;if(i.isVariableDeclaration(e)||i.isFunctionDeclaration(e)||i.isClassDeclaration(e))t=e.getName();else if(i.isFunctionExpression(e)||i.isArrowFunction(e)){const n=e.getFirstAncestorByKind(r.VariableDeclaration);t=n?.getName()}return!!t&&/[A-Z]/.test(t.charAt(0))}function c(e){if(o(e)){if(i.isFunctionDeclaration(e))return e;if(i.isVariableDeclaration(e)){const t=e.getInitializer();if(t)if(s(t)){const[e]=t.getArguments();if(i.isFunctionDeclaration(e)||i.isFunctionExpression(e)||i.isArrowFunction(e))return e}else if(i.isFunctionDeclaration(t)||i.isFunctionExpression(t)||i.isArrowFunction(t))return t}}return null}function a(e,t){return f(e).find((e=>e.getFirstDescendantByKindOrThrow(r.Identifier).getText()===t))}function f(e){return e.getDescendants().filter((e=>i.isJsxElement(e)||i.isJsxSelfClosingElement(e)))}function g(e){const t=[];for(const n of e.findReferencesAsNodes()){const e=n.getFirstAncestor((e=>i.isJsxOpeningElement(e)||i.isJsxSelfClosingElement(e)));e&&t.push(e)}return t}var l=e=>{const t=e.getParentWhile((e=>!c(e))).getParent();if(!t)return;const n=c(t);if(n){const e=n.getParameters();for(let t=0;t<e.length;t++){const n=e[t],i=n.getChildrenOfKind(r.ObjectBindingPattern)[0],s=n.getChildrenOfKind(r.Identifier)[0];if(i){const e=i.getFirstDescendantByKind(r.DotDotDotToken);if(void 0!==e){const t=e?.getParent()?.getFirstChildByKindOrThrow(r.Identifier).getText();return t}}else if(s)return s.getText()}}},u=s=>{const o=s.getAttributes(),c=[];return o.forEach((o=>{if(i.isJsxAttribute(o)){const i=o.getNameNode().getText(),s=o.getDescendantsOfKind(r.StringLiteral),a=[];0!==s.length&&s.forEach((e=>a.push(e.getLiteralText())));const f=o.getFirstChildByKindOrThrow(r.Identifier).getDefinitions().map((e=>e.getDeclarationNode()?.getChildrenOfKind(r.Identifier).pop()?.getType().getText())).pop()?.split(".").pop();f||t(i)?e[n(f)]&&!t(f)?c.push([n(f),a]):t(i)||c.push([i,a]):c.push([i,a])}if(i.isJsxSpreadAttribute(o)){const e=l(s),i=o.getExpression().getChildren(),a=0===i.length?o.getExpression():i.pop();if(!a||a?.getText()===e)return[];a.getType().getProperties().forEach((e=>{const i=e.getDeclarations().map((e=>{const t=e.getChildrenOfKind(r.TypeReference)[0]?.getText()??"";return n(t)}))[0];t(e.getName())||c.push([e.getName(),[]]),t(i)||c.push([i,[]])}))}return[]})),c};export{g as findReferencesAsJsxElements,a as getJsxElement,f as getJsxElements,l as getParentSpreadOrParamIdentifier,c as getReactFunctionDeclaration,u as getUsedPropsInReference,s as isForwardRefExpression,o as isJsxComponent};
@@ -1 +1 @@
1
- "use strict";var e=require("../chunk-5B3FKOHZ.cjs"),t=require("../chunk-N6H5RJN5.cjs");Object.defineProperty(exports,"addFontsPlugin",{enumerable:!0,get:function(){return e.addFontsPlugin}}),Object.defineProperty(exports,"getColorModeStyles",{enumerable:!0,get:function(){return e.getColorModeStyles}}),Object.defineProperty(exports,"getFontFaceDeclarations",{enumerable:!0,get:function(){return e.getFontFaceDeclarations}}),Object.defineProperty(exports,"getFontStyles",{enumerable:!0,get:function(){return e.getFontStyles}}),Object.defineProperty(exports,"getScaleModeStyles",{enumerable:!0,get:function(){return e.getScaleModeStyles}}),Object.defineProperty(exports,"getMotionStyles",{enumerable:!0,get:function(){return t.getMotionStyles}}),Object.defineProperty(exports,"getMotionVar",{enumerable:!0,get:function(){return t.getMotionVar}});
1
+ "use strict";var e=require("../chunk-KQZYAPGK.cjs"),t=require("../chunk-Z5Y2CHME.cjs");Object.defineProperty(exports,"addFontsPlugin",{enumerable:!0,get:function(){return e.addFontsPlugin}}),Object.defineProperty(exports,"getColorModeStyles",{enumerable:!0,get:function(){return e.getColorModeStyles}}),Object.defineProperty(exports,"getFontFaceDeclarations",{enumerable:!0,get:function(){return e.getFontFaceDeclarations}}),Object.defineProperty(exports,"getFontStyles",{enumerable:!0,get:function(){return e.getFontStyles}}),Object.defineProperty(exports,"getScaleModeStyles",{enumerable:!0,get:function(){return e.getScaleModeStyles}}),Object.defineProperty(exports,"getMotionStyles",{enumerable:!0,get:function(){return t.getMotionStyles}}),Object.defineProperty(exports,"getMotionVar",{enumerable:!0,get:function(){return t.getMotionVar}});
@@ -1 +1 @@
1
- export{addFontsPlugin,getColorModeStyles,getFontFaceDeclarations,getFontStyles,getScaleModeStyles}from"../chunk-6G6Y2JC7.js";export{getMotionStyles,getMotionVar}from"../chunk-AQCF2ALW.js";
1
+ export{addFontsPlugin,getColorModeStyles,getFontFaceDeclarations,getFontStyles,getScaleModeStyles}from"../chunk-DIBPHB45.js";export{getMotionStyles,getMotionVar}from"../chunk-S3SOXK7H.js";
@@ -1 +1 @@
1
- "use strict";var e=require("../chunk-HGMLBC2H.cjs"),t=require("../chunk-7GN7QYNC.cjs"),r=require("../chunk-2LIQP6US.cjs"),n=require("../chunk-OMH5EBNB.cjs");Object.defineProperty(exports,"DEFAULT_COLOR_MODE",{enumerable:!0,get:function(){return e.DEFAULT_COLOR_MODE}}),Object.defineProperty(exports,"DEFAULT_COLOR_MODE_FOR_APP",{enumerable:!0,get:function(){return e.DEFAULT_COLOR_MODE_FOR_APP}}),Object.defineProperty(exports,"DEFAULT_HIGH_CONTRAST_MODE",{enumerable:!0,get:function(){return e.DEFAULT_HIGH_CONTRAST_MODE}}),Object.defineProperty(exports,"DEFAULT_REGION_MODE",{enumerable:!0,get:function(){return e.DEFAULT_REGION_MODE}}),Object.defineProperty(exports,"DEFAULT_SCALE_MODE",{enumerable:!0,get:function(){return e.DEFAULT_SCALE_MODE}}),Object.defineProperty(exports,"DEFAULT_SCALE_MODE_FOR_APP",{enumerable:!0,get:function(){return e.DEFAULT_SCALE_MODE_FOR_APP}}),Object.defineProperty(exports,"FONT_DECLARATIONS_MAP",{enumerable:!0,get:function(){return e.FONT_DECLARATIONS_MAP}}),Object.defineProperty(exports,"alwaysPalette",{enumerable:!0,get:function(){return e.alwaysPalette}}),Object.defineProperty(exports,"button",{enumerable:!0,get:function(){return e.button}}),Object.defineProperty(exports,"defaultTokensConfig",{enumerable:!0,get:function(){return e.defaultTokensConfig}}),Object.defineProperty(exports,"fromEntries",{enumerable:!0,get:function(){return e.fromEntries}}),Object.defineProperty(exports,"generateConfigCombinations",{enumerable:!0,get:function(){return e.generateConfigCombinations}}),Object.defineProperty(exports,"getDefaultButtonBaseMap",{enumerable:!0,get:function(){return e.getDefaultButtonBaseMap}}),Object.defineProperty(exports,"entries",{enumerable:!0,get:function(){return t.entries}}),Object.defineProperty(exports,"fontWeightMap",{enumerable:!0,get:function(){return t.fontWeightMap}}),Object.defineProperty(exports,"mapValues",{enumerable:!0,get:function(){return t.mapValues}}),Object.defineProperty(exports,"variants",{enumerable:!0,get:function(){return r.variants}}),Object.defineProperty(exports,"AVATAR_SIZE_PREFIX",{enumerable:!0,get:function(){return n.AVATAR_SIZE_PREFIX}}),Object.defineProperty(exports,"BORDER_RADIUS_PREFIX",{enumerable:!0,get:function(){return n.BORDER_RADIUS_PREFIX}}),Object.defineProperty(exports,"BORDER_WIDTH_PREFIX",{enumerable:!0,get:function(){return n.BORDER_WIDTH_PREFIX}}),Object.defineProperty(exports,"BUTTON_CSS_VAR_MAP",{enumerable:!0,get:function(){return n.BUTTON_CSS_VAR_MAP}}),Object.defineProperty(exports,"DARK_COLOR_MODE_CLASSNAME",{enumerable:!0,get:function(){return n.DARK_COLOR_MODE_CLASSNAME}}),Object.defineProperty(exports,"DEFAULT_COLOR_MODE_CLASSNAME",{enumerable:!0,get:function(){return n.DEFAULT_COLOR_MODE_CLASSNAME}}),Object.defineProperty(exports,"DEFAULT_SCALE_MODE_CLASSNAME",{enumerable:!0,get:function(){return n.DEFAULT_SCALE_MODE_CLASSNAME}}),Object.defineProperty(exports,"FONT_FAMILY_PREFIX",{enumerable:!0,get:function(){return n.FONT_FAMILY_PREFIX}}),Object.defineProperty(exports,"FONT_SIZE_PREFIX",{enumerable:!0,get:function(){return n.FONT_SIZE_PREFIX}}),Object.defineProperty(exports,"FONT_WEIGHT_PREFIX",{enumerable:!0,get:function(){return n.FONT_WEIGHT_PREFIX}}),Object.defineProperty(exports,"ICON_BUTTON_CSS_VAR_MAP",{enumerable:!0,get:function(){return n.ICON_BUTTON_CSS_VAR_MAP}}),Object.defineProperty(exports,"ICON_SIZE_PREFIX",{enumerable:!0,get:function(){return n.ICON_SIZE_PREFIX}}),Object.defineProperty(exports,"LARGE_SCALE_MODE_CLASSNAME",{enumerable:!0,get:function(){return n.LARGE_SCALE_MODE_CLASSNAME}}),Object.defineProperty(exports,"LIGHT_COLOR_MODE_CLASSNAME",{enumerable:!0,get:function(){return n.LIGHT_COLOR_MODE_CLASSNAME}}),Object.defineProperty(exports,"LINE_HEIGHT_PREFIX",{enumerable:!0,get:function(){return n.LINE_HEIGHT_PREFIX}}),Object.defineProperty(exports,"MEDIUM_SCALE_MODE_CLASSNAME",{enumerable:!0,get:function(){return n.MEDIUM_SCALE_MODE_CLASSNAME}}),Object.defineProperty(exports,"MOTION_PREFIX",{enumerable:!0,get:function(){return n.MOTION_PREFIX}}),Object.defineProperty(exports,"PSEUDO_STYLE_SELECTOR_MAP",{enumerable:!0,get:function(){return n.PSEUDO_STYLE_SELECTOR_MAP}}),Object.defineProperty(exports,"SMALL_SCALE_MODE_CLASSNAME",{enumerable:!0,get:function(){return n.SMALL_SCALE_MODE_CLASSNAME}}),Object.defineProperty(exports,"SPECTRUM_COLOR_PREFIX",{enumerable:!0,get:function(){return n.SPECTRUM_COLOR_PREFIX}}),Object.defineProperty(exports,"TEXT_TRANSFORM_PREFIX",{enumerable:!0,get:function(){return n.TEXT_TRANSFORM_PREFIX}}),Object.defineProperty(exports,"UDS_PREFIX",{enumerable:!0,get:function(){return n.UDS_PREFIX}}),Object.defineProperty(exports,"XLARGE_SCALE_MODE_CLASSNAME",{enumerable:!0,get:function(){return n.XLARGE_SCALE_MODE_CLASSNAME}}),Object.defineProperty(exports,"XSMALL_SCALE_MODE_CLASSNAME",{enumerable:!0,get:function(){return n.XSMALL_SCALE_MODE_CLASSNAME}}),Object.defineProperty(exports,"XXLARGE_SCALE_MODE_CLASSNAME",{enumerable:!0,get:function(){return n.XXLARGE_SCALE_MODE_CLASSNAME}}),Object.defineProperty(exports,"XXXLARGE_SCALE_MODE_CLASSNAME",{enumerable:!0,get:function(){return n.XXXLARGE_SCALE_MODE_CLASSNAME}});
1
+ "use strict";var e=require("../chunk-OIUWGOHD.cjs"),t=require("../chunk-X5YNEVVO.cjs"),r=require("../chunk-HEPNOEIN.cjs"),n=require("../chunk-FHBEEPY7.cjs");Object.defineProperty(exports,"DEFAULT_COLOR_MODE",{enumerable:!0,get:function(){return e.DEFAULT_COLOR_MODE}}),Object.defineProperty(exports,"DEFAULT_COLOR_MODE_FOR_APP",{enumerable:!0,get:function(){return e.DEFAULT_COLOR_MODE_FOR_APP}}),Object.defineProperty(exports,"DEFAULT_HIGH_CONTRAST_MODE",{enumerable:!0,get:function(){return e.DEFAULT_HIGH_CONTRAST_MODE}}),Object.defineProperty(exports,"DEFAULT_REGION_MODE",{enumerable:!0,get:function(){return e.DEFAULT_REGION_MODE}}),Object.defineProperty(exports,"DEFAULT_SCALE_MODE",{enumerable:!0,get:function(){return e.DEFAULT_SCALE_MODE}}),Object.defineProperty(exports,"DEFAULT_SCALE_MODE_FOR_APP",{enumerable:!0,get:function(){return e.DEFAULT_SCALE_MODE_FOR_APP}}),Object.defineProperty(exports,"FONT_DECLARATIONS_MAP",{enumerable:!0,get:function(){return e.FONT_DECLARATIONS_MAP}}),Object.defineProperty(exports,"alwaysPalette",{enumerable:!0,get:function(){return e.alwaysPalette}}),Object.defineProperty(exports,"button",{enumerable:!0,get:function(){return e.button}}),Object.defineProperty(exports,"defaultTokensConfig",{enumerable:!0,get:function(){return e.defaultTokensConfig}}),Object.defineProperty(exports,"fromEntries",{enumerable:!0,get:function(){return e.fromEntries}}),Object.defineProperty(exports,"generateConfigCombinations",{enumerable:!0,get:function(){return e.generateConfigCombinations}}),Object.defineProperty(exports,"getDefaultButtonBaseMap",{enumerable:!0,get:function(){return e.getDefaultButtonBaseMap}}),Object.defineProperty(exports,"entries",{enumerable:!0,get:function(){return t.entries}}),Object.defineProperty(exports,"fontWeightMap",{enumerable:!0,get:function(){return t.fontWeightMap}}),Object.defineProperty(exports,"mapValues",{enumerable:!0,get:function(){return t.mapValues}}),Object.defineProperty(exports,"variants",{enumerable:!0,get:function(){return r.variants}}),Object.defineProperty(exports,"AVATAR_SIZE_PREFIX",{enumerable:!0,get:function(){return n.AVATAR_SIZE_PREFIX}}),Object.defineProperty(exports,"BORDER_RADIUS_PREFIX",{enumerable:!0,get:function(){return n.BORDER_RADIUS_PREFIX}}),Object.defineProperty(exports,"BORDER_WIDTH_PREFIX",{enumerable:!0,get:function(){return n.BORDER_WIDTH_PREFIX}}),Object.defineProperty(exports,"BUTTON_CSS_VAR_MAP",{enumerable:!0,get:function(){return n.BUTTON_CSS_VAR_MAP}}),Object.defineProperty(exports,"DARK_COLOR_MODE_CLASSNAME",{enumerable:!0,get:function(){return n.DARK_COLOR_MODE_CLASSNAME}}),Object.defineProperty(exports,"DEFAULT_COLOR_MODE_CLASSNAME",{enumerable:!0,get:function(){return n.DEFAULT_COLOR_MODE_CLASSNAME}}),Object.defineProperty(exports,"DEFAULT_SCALE_MODE_CLASSNAME",{enumerable:!0,get:function(){return n.DEFAULT_SCALE_MODE_CLASSNAME}}),Object.defineProperty(exports,"FONT_FAMILY_PREFIX",{enumerable:!0,get:function(){return n.FONT_FAMILY_PREFIX}}),Object.defineProperty(exports,"FONT_SIZE_PREFIX",{enumerable:!0,get:function(){return n.FONT_SIZE_PREFIX}}),Object.defineProperty(exports,"FONT_WEIGHT_PREFIX",{enumerable:!0,get:function(){return n.FONT_WEIGHT_PREFIX}}),Object.defineProperty(exports,"ICON_BUTTON_CSS_VAR_MAP",{enumerable:!0,get:function(){return n.ICON_BUTTON_CSS_VAR_MAP}}),Object.defineProperty(exports,"ICON_SIZE_PREFIX",{enumerable:!0,get:function(){return n.ICON_SIZE_PREFIX}}),Object.defineProperty(exports,"LARGE_SCALE_MODE_CLASSNAME",{enumerable:!0,get:function(){return n.LARGE_SCALE_MODE_CLASSNAME}}),Object.defineProperty(exports,"LIGHT_COLOR_MODE_CLASSNAME",{enumerable:!0,get:function(){return n.LIGHT_COLOR_MODE_CLASSNAME}}),Object.defineProperty(exports,"LINE_HEIGHT_PREFIX",{enumerable:!0,get:function(){return n.LINE_HEIGHT_PREFIX}}),Object.defineProperty(exports,"MEDIUM_SCALE_MODE_CLASSNAME",{enumerable:!0,get:function(){return n.MEDIUM_SCALE_MODE_CLASSNAME}}),Object.defineProperty(exports,"MOTION_PREFIX",{enumerable:!0,get:function(){return n.MOTION_PREFIX}}),Object.defineProperty(exports,"PSEUDO_STYLE_SELECTOR_MAP",{enumerable:!0,get:function(){return n.PSEUDO_STYLE_SELECTOR_MAP}}),Object.defineProperty(exports,"SMALL_SCALE_MODE_CLASSNAME",{enumerable:!0,get:function(){return n.SMALL_SCALE_MODE_CLASSNAME}}),Object.defineProperty(exports,"SPECTRUM_COLOR_PREFIX",{enumerable:!0,get:function(){return n.SPECTRUM_COLOR_PREFIX}}),Object.defineProperty(exports,"TEXT_TRANSFORM_PREFIX",{enumerable:!0,get:function(){return n.TEXT_TRANSFORM_PREFIX}}),Object.defineProperty(exports,"UDS_PREFIX",{enumerable:!0,get:function(){return n.UDS_PREFIX}}),Object.defineProperty(exports,"XLARGE_SCALE_MODE_CLASSNAME",{enumerable:!0,get:function(){return n.XLARGE_SCALE_MODE_CLASSNAME}}),Object.defineProperty(exports,"XSMALL_SCALE_MODE_CLASSNAME",{enumerable:!0,get:function(){return n.XSMALL_SCALE_MODE_CLASSNAME}}),Object.defineProperty(exports,"XXLARGE_SCALE_MODE_CLASSNAME",{enumerable:!0,get:function(){return n.XXLARGE_SCALE_MODE_CLASSNAME}}),Object.defineProperty(exports,"XXXLARGE_SCALE_MODE_CLASSNAME",{enumerable:!0,get:function(){return n.XXXLARGE_SCALE_MODE_CLASSNAME}});
@@ -1 +1 @@
1
- export{DEFAULT_COLOR_MODE,DEFAULT_COLOR_MODE_FOR_APP,DEFAULT_HIGH_CONTRAST_MODE,DEFAULT_REGION_MODE,DEFAULT_SCALE_MODE,DEFAULT_SCALE_MODE_FOR_APP,FONT_DECLARATIONS_MAP,alwaysPalette,button,defaultTokensConfig,fromEntries,generateConfigCombinations,getDefaultButtonBaseMap}from"../chunk-GMB2Q5R6.js";export{entries,fontWeightMap,mapValues}from"../chunk-3PSQ7QO3.js";export{variants}from"../chunk-TM3T5DQZ.js";export{AVATAR_SIZE_PREFIX,BORDER_RADIUS_PREFIX,BORDER_WIDTH_PREFIX,BUTTON_CSS_VAR_MAP,DARK_COLOR_MODE_CLASSNAME,DEFAULT_COLOR_MODE_CLASSNAME,DEFAULT_SCALE_MODE_CLASSNAME,FONT_FAMILY_PREFIX,FONT_SIZE_PREFIX,FONT_WEIGHT_PREFIX,ICON_BUTTON_CSS_VAR_MAP,ICON_SIZE_PREFIX,LARGE_SCALE_MODE_CLASSNAME,LIGHT_COLOR_MODE_CLASSNAME,LINE_HEIGHT_PREFIX,MEDIUM_SCALE_MODE_CLASSNAME,MOTION_PREFIX,PSEUDO_STYLE_SELECTOR_MAP,SMALL_SCALE_MODE_CLASSNAME,SPECTRUM_COLOR_PREFIX,TEXT_TRANSFORM_PREFIX,UDS_PREFIX,XLARGE_SCALE_MODE_CLASSNAME,XSMALL_SCALE_MODE_CLASSNAME,XXLARGE_SCALE_MODE_CLASSNAME,XXXLARGE_SCALE_MODE_CLASSNAME}from"../chunk-3PWPCBUN.js";
1
+ export{DEFAULT_COLOR_MODE,DEFAULT_COLOR_MODE_FOR_APP,DEFAULT_HIGH_CONTRAST_MODE,DEFAULT_REGION_MODE,DEFAULT_SCALE_MODE,DEFAULT_SCALE_MODE_FOR_APP,FONT_DECLARATIONS_MAP,alwaysPalette,button,defaultTokensConfig,fromEntries,generateConfigCombinations,getDefaultButtonBaseMap}from"../chunk-BCE75B5E.js";export{entries,fontWeightMap,mapValues}from"../chunk-D5LOEZUM.js";export{variants}from"../chunk-XRHVMUMI.js";export{AVATAR_SIZE_PREFIX,BORDER_RADIUS_PREFIX,BORDER_WIDTH_PREFIX,BUTTON_CSS_VAR_MAP,DARK_COLOR_MODE_CLASSNAME,DEFAULT_COLOR_MODE_CLASSNAME,DEFAULT_SCALE_MODE_CLASSNAME,FONT_FAMILY_PREFIX,FONT_SIZE_PREFIX,FONT_WEIGHT_PREFIX,ICON_BUTTON_CSS_VAR_MAP,ICON_SIZE_PREFIX,LARGE_SCALE_MODE_CLASSNAME,LIGHT_COLOR_MODE_CLASSNAME,LINE_HEIGHT_PREFIX,MEDIUM_SCALE_MODE_CLASSNAME,MOTION_PREFIX,PSEUDO_STYLE_SELECTOR_MAP,SMALL_SCALE_MODE_CLASSNAME,SPECTRUM_COLOR_PREFIX,TEXT_TRANSFORM_PREFIX,UDS_PREFIX,XLARGE_SCALE_MODE_CLASSNAME,XSMALL_SCALE_MODE_CLASSNAME,XXLARGE_SCALE_MODE_CLASSNAME,XXXLARGE_SCALE_MODE_CLASSNAME}from"../chunk-VK5VXZH3.js";
@@ -1 +1 @@
1
- "use strict";var e=require("../chunk-7YAGRPBN.cjs");Object.defineProperty(exports,"parseTokens",{enumerable:!0,get:function(){return e.parseTokens}});
1
+ "use strict";var e=require("../chunk-5O2UG72V.cjs");Object.defineProperty(exports,"parseTokens",{enumerable:!0,get:function(){return e.parseTokens}});
@@ -1 +1 @@
1
- export{parseTokens}from"../chunk-D6WFGMAQ.js";
1
+ export{parseTokens}from"../chunk-2PWYNHHE.js";
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@yahoo/uds",
3
3
  "description": "Yahoo Universal System",
4
- "version": "1.1.5",
4
+ "version": "1.1.7",
5
5
  "type": "module",
6
6
  "bin": {
7
7
  "uds": "./cli/uds-cli"
@@ -50,7 +50,7 @@
50
50
  "default": "./dist/fixtures.js"
51
51
  },
52
52
  "require": {
53
- "types": "./dist/fixtures.d.ts",
53
+ "types": "./dist/fixtures.d.cts",
54
54
  "default": "./dist/fixtures.cjs"
55
55
  }
56
56
  },
@@ -119,10 +119,10 @@
119
119
  "typecheck:uds": "tsc -p . --noEmit"
120
120
  },
121
121
  "dependencies": {
122
- "@ariakit/react": "^0.4.10",
122
+ "@ariakit/react": "^0.4.11",
123
123
  "bluebun": "^0.0.34",
124
124
  "clsx": "^2.1.1",
125
- "framer-motion": "^11.3.30",
125
+ "framer-motion": "^11.5.4",
126
126
  "lodash-es": "^4.17.21",
127
127
  "prompts": "^2.4.2",
128
128
  "react-toastify": "^10.0.5",
@@ -133,13 +133,13 @@
133
133
  "devDependencies": {
134
134
  "@fullhuman/postcss-purgecss": "^6.0.0",
135
135
  "@types/prompts": "^2.4.9",
136
- "@types/react": "^18.3.4",
136
+ "@types/react": "^18.3.5",
137
137
  "@types/react-dom": "^18.3.0",
138
- "@yahoo/uds-icons": "1.0.3",
138
+ "@yahoo/uds-icons": "1.0.4",
139
139
  "autoprefixer": "^10.4.20",
140
140
  "chalk": "^5.3.0",
141
141
  "concurrently": "^8.2.2",
142
- "postcss": "^8.4.41",
142
+ "postcss": "^8.4.45",
143
143
  "tailwindcss": "^3.4.10",
144
144
  "terser": "^5.31.6",
145
145
  "tsconfig": "0.0.1",
@@ -1,3 +0,0 @@
1
- "use strict";var e=require("./chunk-HGMLBC2H.cjs"),r=require("./chunk-7GN7QYNC.cjs"),t=require("./chunk-OMH5EBNB.cjs");function a(e){return e&&e.__esModule?e:{default:e}}
2
- /*! © 2024 Yahoo, Inc. UDS v1.1.5 */
3
- function o(r,t){for(const a of r){const{declarations:r}=e.FONT_DECLARATIONS_MAP[a];for(const e of r)t({"@font-face":e})}}var n=a(require("tailwindcss/plugin.js")).default.withOptions((function({fontIds:e}){return function({addBase:r}){o(e,r)}}));function s(e){return`"${e}"`}function c(e){return{...e.borderRadius._vars,...e.borderWidth._vars,...e.avatarSizes._vars,...e.iconSizes._vars,...e.fontFamily._vars,...e.fontSize._vars,...e.fontWeight._vars,...e.lineHeight._vars,...e.textTransform._vars}}exports.addFontFaceDeclarations=o,exports.addFontsPlugin=n,exports.getColorModeStyles=function(e){return{light:{colorScheme:"light",...e.colorMode.light._vars},dark:{colorScheme:"dark",...e.colorMode.dark._vars}}},exports.getFontFaceDeclarations=function(r){return r.flatMap((r=>{const{declarations:t}=e.FONT_DECLARATIONS_MAP[r];return t.map((e=>e))}))},exports.getFontStyles=function(a){return e.fromEntries(r.entries(a).map((([r,a])=>{const o=`--${t.FONT_FAMILY_PREFIX}-${r}`,n=e.FONT_DECLARATIONS_MAP[a];return[o,[n.declarations[0].fontFamily,...n.fallback].map(s).join(", ")]})))},exports.getScaleModeStyles=function(e){return{xSmall:c(e.scaleMode.xSmall),small:c(e.scaleMode.small),medium:c(e.scaleMode.medium),large:c(e.scaleMode.large),xLarge:c(e.scaleMode.xLarge),xxLarge:c(e.scaleMode.xxLarge),xxxLarge:c(e.scaleMode.xxxLarge)}};
@@ -1,2 +0,0 @@
1
- import{fromEntries as o}from"./chunk-GMB2Q5R6.js";import{entries as r}from"./chunk-3PSQ7QO3.js";import{MOTION_PREFIX as t}from"./chunk-3PWPCBUN.js";import{motionSpringConfigOptions as n}from"@yahoo/uds/fixtures";
2
- /*! © 2024 Yahoo, Inc. UDS v1.1.5 */function a({variant:o,speed:r,control:n}){return`${[`--${t}`,o,r,n].join("-")}`}function i(t){const i=r(t).flatMap((([o,t])=>r(t).flatMap((([r,t])=>n.map((n=>[a({variant:o,speed:r,control:n}),`${t[n]}`]))))));return o(i)}export{i as getMotionStyles,a as getMotionVar};
@@ -1,2 +0,0 @@
1
- "use strict";var e=require("./chunk-HGMLBC2H.cjs"),r=require("./chunk-2LIQP6US.cjs"),n=require("@yahoo/uds/fixtures"),t=require("clsx"),o=require("tailwind-merge"),s=require("react"),i=require("react/jsx-runtime");function l(e){return e&&e.__esModule?e:{default:e}}var a=l(t);
2
- /*! © 2024 Yahoo, Inc. UDS v1.1.5 */function c(e){return"boolean"==typeof e?`${e}`:0===e?"0":e}var u=o.extendTailwindMerge({cacheSize:0,extend:{theme:{borderColor:n.lineColors,borderWidth:n.borderWidths,borderRadius:n.borderRadii}},override:{classGroups:{"text-color":[{text:[...n.foregroundColors,...n.spectrumColors]}],"bg-color":[{bg:n.backgroundColors}],"font-family":[{font:["icons",...n.textVariants]}],leading:[{leading:n.textVariants}]},conflictingClassGroups:{}}}),d=(...e)=>{const r=a.default(e);return u(r)},f=e=>r=>{if(!e?.variants)return d(e?.base,r?.className);const{variants:n,defaultVariants:t}=e,o=Object.keys(n).map((e=>{const o=r?.[e],s=t?.[e],i=c(o)||c(s);return n[e][i]})),s={...t,...r&&Object.entries(r).reduce(((e,[r,n])=>void 0===n?e:{...e,[r]:n}),{})},i=e?.compoundVariants?.reduce(((e,{className:r,...n})=>Object.entries(n).every((([e,r])=>s[e]===r))?d(e,r):e),"");return d(e?.base,o,i,r?.className)},m=f({variants:r.variants}),h=s.forwardRef((function({name:r,size:n="md",variant:t="outline",color:o="primary",className:s,...l},a){const c=m({color:o,className:s}),u=e.normalIconSizes[n];return i.jsx("svg",{ref:a,xmlns:"http://www.w3.org/2000/svg",width:u,height:u,viewBox:`0 0 ${u} ${u}`,"aria-hidden":"true",focusable:"false",className:c,...l,children:i.jsx(r,{size:n,variant:t})})}));function p(...e){return r=>e.forEach((e=>function(e,r){"function"==typeof e?e(r):null!=e&&(e.current=r)}(e,r)))}exports.Icon=h,exports.createSlot=function(){const e=s.forwardRef(((e,n)=>{const{children:o,...l}=e,a=s.Children.toArray(o),c=a.find(t);if(c){const e=c.props.children,t=a.map((r=>r===c?s.Children.count(e)>1?s.Children.only(null):s.isValidElement(e)?e.props.children:null:r));return i.jsx(r,{...l,ref:n,children:s.isValidElement(e)?s.cloneElement(e,void 0,t):null})}return i.jsx(r,{...l,ref:n,children:o})}));e.displayName="Slot";const r=s.forwardRef(((e,r)=>{const{children:n,...t}=e;return s.isValidElement(n)?s.cloneElement(n,{...o(t,n.props),ref:r?p(r,n.ref):n.ref}):s.Children.count(n)>1?s.Children.only(null):null}));r.displayName="SlotClone";const n=({children:e})=>e;function t(e){return s.isValidElement(e)&&e.type===n}function o(e,r){const n={...r};for(const t in r){const o=e[t],s=r[t];/^on[A-Z]/.test(t)?o&&s?n[t]=(...e)=>{s(...e),o(...e)}:o&&(n[t]=o):"style"===t&&(n[t]={...o,...s})}return{...e,...n}}return e},exports.cva=f,exports.cx=d,exports.getStyles=m;
@@ -1,3 +0,0 @@
1
- import{normalIconSizes as r}from"./chunk-GMB2Q5R6.js";import{variants as e}from"./chunk-TM3T5DQZ.js";import{lineColors as n,borderWidths as t,borderRadii as o,foregroundColors as i,spectrumColors as s,backgroundColors as c,textVariants as a}from"@yahoo/uds/fixtures";import l from"clsx";import{extendTailwindMerge as u}from"tailwind-merge";import{forwardRef as f,Children as m,isValidElement as d,cloneElement as p}from"react";import{jsx as h}from"react/jsx-runtime";
2
- /*! © 2024 Yahoo, Inc. UDS v1.1.5 */
3
- function y(r){return"boolean"==typeof r?`${r}`:0===r?"0":r}var v=u({cacheSize:0,extend:{theme:{borderColor:n,borderWidth:t,borderRadius:o}},override:{classGroups:{"text-color":[{text:[...i,...s]}],"bg-color":[{bg:c}],"font-family":[{font:["icons",...a]}],leading:[{leading:a}]},conflictingClassGroups:{}}}),b=(...r)=>{const e=l(r);return v(e)},g=r=>e=>{if(!r?.variants)return b(r?.base,e?.className);const{variants:n,defaultVariants:t}=r,o=Object.keys(n).map((r=>{const o=e?.[r],i=t?.[r],s=y(o)||y(i);return n[r][s]})),i={...t,...e&&Object.entries(e).reduce(((r,[e,n])=>void 0===n?r:{...r,[e]:n}),{})},s=r?.compoundVariants?.reduce(((r,{className:e,...n})=>Object.entries(n).every((([r,e])=>i[r]===e))?b(r,e):r),"");return b(r?.base,o,s,e?.className)},x=g({variants:e}),N=f((function({name:e,size:n="md",variant:t="outline",color:o="primary",className:i,...s},c){const a=x({color:o,className:i}),l=r[n];return h("svg",{ref:c,xmlns:"http://www.w3.org/2000/svg",width:l,height:l,viewBox:`0 0 ${l} ${l}`,"aria-hidden":"true",focusable:"false",className:a,...s,children:h(e,{size:n,variant:t})})}));function w(...r){return e=>r.forEach((r=>function(r,e){"function"==typeof r?r(e):null!=r&&(r.current=e)}(r,e)))}function j(){const r=f(((r,n)=>{const{children:o,...i}=r,s=m.toArray(o),c=s.find(t);if(c){const r=c.props.children,t=s.map((e=>e===c?m.count(r)>1?m.only(null):d(r)?r.props.children:null:e));return h(e,{...i,ref:n,children:d(r)?p(r,void 0,t):null})}return h(e,{...i,ref:n,children:o})}));r.displayName="Slot";const e=f(((r,e)=>{const{children:n,...t}=r;return d(n)?p(n,{...o(t,n.props),ref:e?w(e,n.ref):n.ref}):m.count(n)>1?m.only(null):null}));e.displayName="SlotClone";const n=({children:r})=>r;function t(r){return d(r)&&r.type===n}function o(r,e){const n={...e};for(const t in e){const o=r[t],i=e[t];/^on[A-Z]/.test(t)?o&&i?n[t]=(...r)=>{i(...r),o(...r)}:o&&(n[t]=o):"style"===t&&(n[t]={...o,...i})}return{...r,...n}}return r}export{N as Icon,j as createSlot,g as cva,b as cx,x as getStyles};