@yahoo/uds 3.17.0-beta.9 → 3.17.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{Input-e2pY17EK.d.cts → Input-Bi0k9lK1.d.cts} +1 -1
- package/dist/{Input-CvRyzNVR.d.ts → Input-Bp3nGfpd.d.ts} +1 -1
- package/dist/{Pressable-BOC8hkDG.d.ts → Pressable-CLPkQKQ5.d.ts} +1 -1
- package/dist/{Pressable-Bv89U3Fn.d.cts → Pressable-vjs_c2ir.d.cts} +1 -1
- package/dist/{VStack-pKvwSSPi.d.ts → VStack-BPTqS-dY.d.ts} +1 -1
- package/dist/{VStack-CilB4ecq.d.cts → VStack-D5H0I8mo.d.cts} +1 -1
- package/dist/chunk-CJQWF4E7.cjs +1 -0
- package/dist/chunk-GDB25UGP.js +2 -0
- package/dist/chunk-HT3GLDSF.js +2 -0
- package/dist/chunk-WGG66FKO.cjs +1 -0
- package/dist/client/Menu.d.cts +3 -3
- package/dist/client/Menu.d.ts +3 -3
- package/dist/client/index.cjs +1 -1
- package/dist/client/index.d.cts +3 -3
- package/dist/client/index.d.ts +3 -3
- package/dist/client/index.js +1 -1
- package/dist/experimental/client/SwitchV2.cjs +0 -1
- package/dist/experimental/client/SwitchV2.d.cts +1 -1
- package/dist/experimental/client/SwitchV2.d.ts +1 -1
- package/dist/experimental/client/SwitchV2.js +0 -1
- package/dist/{index-COgCIWKh.d.ts → index-B2IMnWzt.d.ts} +1 -1
- package/dist/{index-CyBAWBkc.d.cts → index-DyPB0-IK.d.cts} +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +7 -7
- package/dist/index.d.ts +7 -7
- package/dist/index.js +1 -1
- package/dist/metafile-cjs.json +1 -1
- package/dist/metafile-esm.json +1 -1
- package/dist/tailwind/plugin.cjs +1 -1
- package/dist/tailwind/plugin.d.cts +1 -1
- package/dist/tailwind/plugin.d.ts +1 -1
- package/dist/tailwind/plugin.js +2 -2
- package/dist/tailwind/utils.cjs +1 -1
- package/dist/tailwind/utils.d.cts +1 -1
- package/dist/tailwind/utils.d.ts +1 -1
- package/dist/tailwind/utils.js +1 -1
- package/dist/tokens/automation/configs.cjs +1 -1
- package/dist/tokens/automation/configs.d.cts +2 -2
- package/dist/tokens/automation/configs.d.ts +2 -2
- package/dist/tokens/automation/configs.js +1 -1
- package/dist/tokens/automation/properties.cjs +1 -1
- package/dist/tokens/automation/properties.d.cts +2 -2
- package/dist/tokens/automation/properties.d.ts +2 -2
- package/dist/tokens/automation/properties.js +1 -1
- package/dist/tokens/index.cjs +1 -1
- package/dist/tokens/index.d.cts +8799 -5
- package/dist/tokens/index.d.ts +8799 -5
- package/dist/tokens/index.js +1 -1
- package/dist/tokens/parseTokens.d.cts +1 -1
- package/dist/tokens/parseTokens.d.ts +1 -1
- package/dist/{types-D7ORnlRf.d.cts → types-DQT6xsrl.d.cts} +1 -1
- package/dist/{types-D7ORnlRf.d.ts → types-DQT6xsrl.d.ts} +1 -1
- package/package.json +1 -1
- package/dist/chunk-2L2IUH4B.js +0 -2
- package/dist/chunk-FUTH4TDA.cjs +0 -1
- package/dist/chunk-IVM7AINV.js +0 -2
- package/dist/chunk-L4PNT44K.js +0 -2
- package/dist/chunk-Q25TMUYD.cjs +0 -1
- package/dist/chunk-ZYDZ7ZC3.cjs +0 -1
package/dist/tokens/index.js
CHANGED
@@ -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,cartesianProduct,coalesceConfigVariant,createComponentStateConfig,createComponentStates,createConfigurableProperty,createLayerConfig,createSubComponentConfig,createVariantConfig,createVariantConfigWithComponentStates,createVariantConfigWithProperties,findFixtureType,fontWeightMap,fromEntries,generateClassName,generateDeclaration,generateKeyFromFlatConfigPath,generateSchemaKey,generateStyles,getConfigDefaultValue,getConfigPseudoStateVariables,getConfigPseudoStateVariablesWithSetter,getConfigSubcomponents,getConfigVariantComponentStates,getConfigVariantComponentStatesMatrix,getConfigVariantProperties,getConfigVariantPseudoStates,getConfigVariants,getDefaultButtonBaseMap,isConfigDefaultValue,parseButtonVariantFlat,parseDeprecatedButtonPaletteVariant,setConfigPseudoStateVariable,shadow,statePseudoMapDocsMode,toMinimalDbConfigObject}from"../chunk-
|
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,cartesianProduct,coalesceConfigVariant,configurableProperties,createComponentStateConfig,createComponentStates,createConfigurableProperty,createLayerConfig,createSubComponentConfig,createVariantConfig,createVariantConfigWithComponentStates,createVariantConfigWithProperties,defaultTokensConfig,defaultUniversalTokensConfigAuto,findFixtureType,fontWeightMap,fromEntries,generateClassName,generateDeclaration,generateKeyFromFlatConfigPath,generateSchemaKey,generateStyles,getConfigDefaultValue,getConfigPseudoStateVariables,getConfigPseudoStateVariablesWithSetter,getConfigSubcomponents,getConfigVariantComponentStates,getConfigVariantComponentStatesMatrix,getConfigVariantProperties,getConfigVariantPseudoStates,getConfigVariants,getDefaultButtonBaseMap,isConfigDefaultValue,parseButtonVariantFlat,parseDeprecatedButtonPaletteVariant,setConfigPseudoStateVariable,shadow,statePseudoMapDocsMode,toMinimalDbConfigObject}from"../chunk-HT3GLDSF.js";export{entries,mapValues}from"../chunk-EWJ3J526.js";export{variants}from"../chunk-NYAQO47N.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_SLANT_PREFIX,FONT_WEIGHT_PREFIX,FONT_WIDTH_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_RESPONSIVE_CLASSNAME,TEXT_TRANSFORM_PREFIX,UDS_PREFIX,XLARGE_SCALE_MODE_CLASSNAME,XSMALL_SCALE_MODE_CLASSNAME,XXLARGE_SCALE_MODE_CLASSNAME,XXXLARGE_SCALE_MODE_CLASSNAME}from"../chunk-N4FHPR6Q.js";
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { c as UniversalTokensConfig, C as ColorMode, d as ColorsConfig, H as Hue, e as HueStep, P as PaletteType, f as PaletteConfig, S as ScaleMode } from '../types-
|
1
|
+
import { c as UniversalTokensConfig, C as ColorMode, d as ColorsConfig, H as Hue, e as HueStep, P as PaletteType, f as PaletteConfig, S as ScaleMode } from '../types-DQT6xsrl.cjs';
|
2
2
|
import '@yahoo/uds-icons/types';
|
3
3
|
import 'motion/react';
|
4
4
|
import 'react';
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { c as UniversalTokensConfig, C as ColorMode, d as ColorsConfig, H as Hue, e as HueStep, P as PaletteType, f as PaletteConfig, S as ScaleMode } from '../types-
|
1
|
+
import { c as UniversalTokensConfig, C as ColorMode, d as ColorsConfig, H as Hue, e as HueStep, P as PaletteType, f as PaletteConfig, S as ScaleMode } from '../types-DQT6xsrl.js';
|
2
2
|
import '@yahoo/uds-icons/types';
|
3
3
|
import 'motion/react';
|
4
4
|
import 'react';
|
@@ -10462,4 +10462,4 @@ interface UniversalMenuItemProps extends Omit<UniversalPressableProps, 'asChild'
|
|
10462
10462
|
disabled?: boolean;
|
10463
10463
|
}
|
10464
10464
|
|
10465
|
-
export {
|
10465
|
+
export { MEDIUM_SCALE_MODE_CLASSNAME as $, UDS_PREFIX as A, type ButtonConfig as B, type ColorMode as C, AVATAR_SIZE_PREFIX as D, BORDER_RADIUS_PREFIX as E, type FontID as F, BORDER_WIDTH_PREFIX as G, type Hue as H, type IconButtonClassMap as I, FONT_FAMILY_PREFIX as J, FONT_SIZE_PREFIX as K, FONT_WEIGHT_PREFIX as L, type MotionConfig as M, FONT_SLANT_PREFIX as N, FONT_WIDTH_PREFIX as O, type PaletteType as P, ICON_SIZE_PREFIX as Q, LINE_HEIGHT_PREFIX as R, type ScaleMode as S, MOTION_PREFIX as T, type UniversalInputProps as U, SPECTRUM_COLOR_PREFIX as V, TEXT_TRANSFORM_PREFIX as W, DARK_COLOR_MODE_CLASSNAME as X, LIGHT_COLOR_MODE_CLASSNAME as Y, XSMALL_SCALE_MODE_CLASSNAME as Z, SMALL_SCALE_MODE_CLASSNAME as _, type UniversalPressableProps as a, type CheckboxVariant as a$, LARGE_SCALE_MODE_CLASSNAME as a0, XLARGE_SCALE_MODE_CLASSNAME as a1, XXLARGE_SCALE_MODE_CLASSNAME as a2, XXXLARGE_SCALE_MODE_CLASSNAME as a3, DEFAULT_COLOR_MODE_CLASSNAME as a4, DEFAULT_SCALE_MODE_CLASSNAME as a5, TEXT_RESPONSIVE_CLASSNAME as a6, BUTTON_CSS_VAR_MAP as a7, ICON_BUTTON_CSS_VAR_MAP as a8, PSEUDO_STYLE_SELECTOR_MAP as a9, type Breakpoint as aA, type BreakpointsConfig as aB, type ButtonBaseConfig as aC, type ButtonClassName as aD, type ButtonColorConfig as aE, type ButtonColorEffect as aF, type ButtonColorEffectConfig as aG, type ButtonKind as aH, type ButtonMotionEffect as aI, type ButtonMotionProperty as aJ, type ButtonMotionPropertyConfig as aK, type ButtonPalette as aL, type ButtonPaletteColor as aM, type ButtonPaletteConfig as aN, type ButtonShadowPropertyConfig as aO, type ButtonSize as aP, type ButtonSizeConfig as aQ, type ButtonSizeProperty as aR, type ButtonSpectrumColor as aS, type ButtonState as aT, type ButtonStateConfig as aU, type ButtonStateEffectConfig as aV, type ButtonVariant as aW, type ButtonVariantConfig as aX, type ButtonVariantFlat as aY, type CheckboxSize as aZ, type CheckboxValue as a_, FONT_DECLARATIONS_MAP as aa, type FontAxisConfig as ab, type FontDeclarationConfig as ac, type FontDeclarationMap as ad, type FontWeightForFont as ae, type AlwaysPalette as af, type AlwaysPaletteAlias as ag, type AlwaysPaletteColor as ah, type Animation as ai, type AriaAttribute as aj, type AvatarAbbreviationStrategy as ak, type AvatarShape as al, type AvatarSize as am, type AvatarSizeConfig as an, type AvatarVariant as ao, type BackgroundColor as ap, type BackgroundPalette as aq, type BackgroundPaletteAlias as ar, type BackgroundStyleProps as as, type BadgeSize as at, type BadgeVariant as au, type BorderRadius as av, type BorderRadiusConfig as aw, type BorderStyleProps as ax, type BorderWidth as ay, type BorderWidthConfig as az, type UniversalSwitchProps as b, type Pixels as b$, type ChipSize as b0, type ChipVariant as b1, type ColorModeConfig as b2, type ColorModeForApp as b3, type ConfigurableDropShadowValues as b4, type ConfigurableInsetShadowValues as b5, type CustomSizingStyleProps as b6, type DataAttribute as b7, type Display as b8, type DividerVariant as b9, type GlobalDefaultsConfig as bA, type HighContrastMode as bB, type IconButtonClassName as bC, type IconButtonConfig as bD, type IconButtonDefaultsConfig as bE, type IconButtonSize as bF, type IconSizeConfig as bG, type ImageStyleProps as bH, type InputSize as bI, type LayoutStyleProps as bJ, type LetterSpacing as bK, type LineClampAlias as bL, type LineColor as bM, type LineHeight as bN, type LineHeightConfig as bO, type LinePalette as bP, type LinePaletteAlias as bQ, type Modes as bR, type MotionCssVar as bS, type MotionSpringConfig as bT, type MotionSpringConfigOptions as bU, type MotionVariant as bV, type MotionVariantSpeed as bW, type MotionVariantValues as bX, type Overflow as bY, type Palette as bZ, type PaletteValue as b_, type Flex as ba, type FlexAlignContent as bb, type FlexAlignItems as bc, type FlexAlignSelf as bd, type FlexBasis as be, type FlexDirection as bf, type FlexGrow as bg, type FlexJustifyContent as bh, type FlexShrink as bi, type FlexStyleProps as bj, type FlexWrap as bk, type FontAlias as bl, type FontCssVar as bm, type FontFamilyCDNUrl as bn, type FontFamilyConfig as bo, type FontSize as bp, type FontSizeConfig as bq, type FontSlantConfig as br, type FontType as bs, type FontWeightConfig as bt, type FontWeightDescriptive as bu, type FontWeightNumeric as bv, type FontWidthConfig as bw, type ForegroundColor as bx, type ForegroundPalette as by, type ForegroundPaletteAlias as bz, type UniversalTokensConfig as c, type UniversalChipProps as c$, type PlatformMode as c0, type Position as c1, type PropertyToPaletteAliasMap as c2, type RadioSize as c3, type RadioValue as c4, type RadioVariant as c5, type RegionMode as c6, type Rems as c7, type ScaleConfig as c8, type ScaleEffectMap as c9, type TextStyleProps as cA, type TextTransform as cB, type TextTransformConfig as cC, type TextVariant as cD, type TransitionDelay as cE, type TransitionDuration as cF, type TransitionTiming as cG, type TShirtSize as cH, type TShirtSizeCommon as cI, type TypographyConfig as cJ, type TypographyResponsiveProperty as cK, type TypographyStyle as cL, type TypographyStyleProperty as cM, type TypographyUnitValue as cN, type UdsCssVar as cO, type Unitless as cP, type UniversalAvatarIconProps as cQ, type UniversalAvatarImageProps as cR, type UniversalAvatarProps as cS, type UniversalAvatarTextProps as cT, type UniversalBadgeProps as cU, type UniversalButtonProps as cV, type UniversalCheckboxProps as cW, type UniversalChipBaseProps as cX, type UniversalChipButtonProps as cY, type UniversalChipDismissibleProps as cZ, type UniversalChipLinkProps as c_, type ScaleModeConfig as ca, type ScaleModeForApp as cb, type ShadowColor as cc, type ShadowColorConfig as cd, type ShadowConfig as ce, type ShadowOffset as cf, type ShadowOpacity as cg, type ShadowPalette as ch, type ShadowPaletteAlias as ci, type ShadowSpreadRadius as cj, type ShadowStyleProps as ck, type ShadowTypeConfig as cl, type ShadowVariant as cm, type ShadowVariantConfig as cn, type ShadowVariantInvert as co, type ShadowVariantWithInvert as cp, type SharedPaletteAlias as cq, type SpacingConfig as cr, type SpacingStyleProps as cs, type SpectrumColor as ct, type SpectrumConfig as cu, type StateStyleProps as cv, type StyleProps as cw, type SwitchSize as cx, type TextDecorationLine as cy, type TextProperty as cz, type ColorsConfig as d, type UniversalChipToggleProps as d0, type UniversalIconButtonProps as d1, type UniversalIconProps as d2, type UniversalImageProps as d3, type UniversalRadioGroupProps as d4, type UniversalRadioProps as d5, type UniversalTokensConfigAuto as d6, type HueStep as e, type PaletteConfig as f, type ShadowPreset as g, type UniversalBoxProps as h, type UniversalStackProps as i, type UniversalDividerProps as j, type ButtonClassMap as k, type ButtonColorProperty as l, type ButtonColorPropertyConfig as m, type SpacingAlias as n, type UniversalMenuItemProps as o, type FontDeclarationItemConfig as p, type FontConfig as q, type ShadowType as r, type UniversalFormLabelProps as s, type IconPropsWithSVGProps as t, type ImagePropsWithImgProps as u, type UniversalIconSlot as v, type UniversalLinkProps as w, type UniversalTextProps as x, alwaysPalette as y, defaultUniversalTokensConfigAuto as z };
|
@@ -10462,4 +10462,4 @@ interface UniversalMenuItemProps extends Omit<UniversalPressableProps, 'asChild'
|
|
10462
10462
|
disabled?: boolean;
|
10463
10463
|
}
|
10464
10464
|
|
10465
|
-
export {
|
10465
|
+
export { MEDIUM_SCALE_MODE_CLASSNAME as $, UDS_PREFIX as A, type ButtonConfig as B, type ColorMode as C, AVATAR_SIZE_PREFIX as D, BORDER_RADIUS_PREFIX as E, type FontID as F, BORDER_WIDTH_PREFIX as G, type Hue as H, type IconButtonClassMap as I, FONT_FAMILY_PREFIX as J, FONT_SIZE_PREFIX as K, FONT_WEIGHT_PREFIX as L, type MotionConfig as M, FONT_SLANT_PREFIX as N, FONT_WIDTH_PREFIX as O, type PaletteType as P, ICON_SIZE_PREFIX as Q, LINE_HEIGHT_PREFIX as R, type ScaleMode as S, MOTION_PREFIX as T, type UniversalInputProps as U, SPECTRUM_COLOR_PREFIX as V, TEXT_TRANSFORM_PREFIX as W, DARK_COLOR_MODE_CLASSNAME as X, LIGHT_COLOR_MODE_CLASSNAME as Y, XSMALL_SCALE_MODE_CLASSNAME as Z, SMALL_SCALE_MODE_CLASSNAME as _, type UniversalPressableProps as a, type CheckboxVariant as a$, LARGE_SCALE_MODE_CLASSNAME as a0, XLARGE_SCALE_MODE_CLASSNAME as a1, XXLARGE_SCALE_MODE_CLASSNAME as a2, XXXLARGE_SCALE_MODE_CLASSNAME as a3, DEFAULT_COLOR_MODE_CLASSNAME as a4, DEFAULT_SCALE_MODE_CLASSNAME as a5, TEXT_RESPONSIVE_CLASSNAME as a6, BUTTON_CSS_VAR_MAP as a7, ICON_BUTTON_CSS_VAR_MAP as a8, PSEUDO_STYLE_SELECTOR_MAP as a9, type Breakpoint as aA, type BreakpointsConfig as aB, type ButtonBaseConfig as aC, type ButtonClassName as aD, type ButtonColorConfig as aE, type ButtonColorEffect as aF, type ButtonColorEffectConfig as aG, type ButtonKind as aH, type ButtonMotionEffect as aI, type ButtonMotionProperty as aJ, type ButtonMotionPropertyConfig as aK, type ButtonPalette as aL, type ButtonPaletteColor as aM, type ButtonPaletteConfig as aN, type ButtonShadowPropertyConfig as aO, type ButtonSize as aP, type ButtonSizeConfig as aQ, type ButtonSizeProperty as aR, type ButtonSpectrumColor as aS, type ButtonState as aT, type ButtonStateConfig as aU, type ButtonStateEffectConfig as aV, type ButtonVariant as aW, type ButtonVariantConfig as aX, type ButtonVariantFlat as aY, type CheckboxSize as aZ, type CheckboxValue as a_, FONT_DECLARATIONS_MAP as aa, type FontAxisConfig as ab, type FontDeclarationConfig as ac, type FontDeclarationMap as ad, type FontWeightForFont as ae, type AlwaysPalette as af, type AlwaysPaletteAlias as ag, type AlwaysPaletteColor as ah, type Animation as ai, type AriaAttribute as aj, type AvatarAbbreviationStrategy as ak, type AvatarShape as al, type AvatarSize as am, type AvatarSizeConfig as an, type AvatarVariant as ao, type BackgroundColor as ap, type BackgroundPalette as aq, type BackgroundPaletteAlias as ar, type BackgroundStyleProps as as, type BadgeSize as at, type BadgeVariant as au, type BorderRadius as av, type BorderRadiusConfig as aw, type BorderStyleProps as ax, type BorderWidth as ay, type BorderWidthConfig as az, type UniversalSwitchProps as b, type Pixels as b$, type ChipSize as b0, type ChipVariant as b1, type ColorModeConfig as b2, type ColorModeForApp as b3, type ConfigurableDropShadowValues as b4, type ConfigurableInsetShadowValues as b5, type CustomSizingStyleProps as b6, type DataAttribute as b7, type Display as b8, type DividerVariant as b9, type GlobalDefaultsConfig as bA, type HighContrastMode as bB, type IconButtonClassName as bC, type IconButtonConfig as bD, type IconButtonDefaultsConfig as bE, type IconButtonSize as bF, type IconSizeConfig as bG, type ImageStyleProps as bH, type InputSize as bI, type LayoutStyleProps as bJ, type LetterSpacing as bK, type LineClampAlias as bL, type LineColor as bM, type LineHeight as bN, type LineHeightConfig as bO, type LinePalette as bP, type LinePaletteAlias as bQ, type Modes as bR, type MotionCssVar as bS, type MotionSpringConfig as bT, type MotionSpringConfigOptions as bU, type MotionVariant as bV, type MotionVariantSpeed as bW, type MotionVariantValues as bX, type Overflow as bY, type Palette as bZ, type PaletteValue as b_, type Flex as ba, type FlexAlignContent as bb, type FlexAlignItems as bc, type FlexAlignSelf as bd, type FlexBasis as be, type FlexDirection as bf, type FlexGrow as bg, type FlexJustifyContent as bh, type FlexShrink as bi, type FlexStyleProps as bj, type FlexWrap as bk, type FontAlias as bl, type FontCssVar as bm, type FontFamilyCDNUrl as bn, type FontFamilyConfig as bo, type FontSize as bp, type FontSizeConfig as bq, type FontSlantConfig as br, type FontType as bs, type FontWeightConfig as bt, type FontWeightDescriptive as bu, type FontWeightNumeric as bv, type FontWidthConfig as bw, type ForegroundColor as bx, type ForegroundPalette as by, type ForegroundPaletteAlias as bz, type UniversalTokensConfig as c, type UniversalChipProps as c$, type PlatformMode as c0, type Position as c1, type PropertyToPaletteAliasMap as c2, type RadioSize as c3, type RadioValue as c4, type RadioVariant as c5, type RegionMode as c6, type Rems as c7, type ScaleConfig as c8, type ScaleEffectMap as c9, type TextStyleProps as cA, type TextTransform as cB, type TextTransformConfig as cC, type TextVariant as cD, type TransitionDelay as cE, type TransitionDuration as cF, type TransitionTiming as cG, type TShirtSize as cH, type TShirtSizeCommon as cI, type TypographyConfig as cJ, type TypographyResponsiveProperty as cK, type TypographyStyle as cL, type TypographyStyleProperty as cM, type TypographyUnitValue as cN, type UdsCssVar as cO, type Unitless as cP, type UniversalAvatarIconProps as cQ, type UniversalAvatarImageProps as cR, type UniversalAvatarProps as cS, type UniversalAvatarTextProps as cT, type UniversalBadgeProps as cU, type UniversalButtonProps as cV, type UniversalCheckboxProps as cW, type UniversalChipBaseProps as cX, type UniversalChipButtonProps as cY, type UniversalChipDismissibleProps as cZ, type UniversalChipLinkProps as c_, type ScaleModeConfig as ca, type ScaleModeForApp as cb, type ShadowColor as cc, type ShadowColorConfig as cd, type ShadowConfig as ce, type ShadowOffset as cf, type ShadowOpacity as cg, type ShadowPalette as ch, type ShadowPaletteAlias as ci, type ShadowSpreadRadius as cj, type ShadowStyleProps as ck, type ShadowTypeConfig as cl, type ShadowVariant as cm, type ShadowVariantConfig as cn, type ShadowVariantInvert as co, type ShadowVariantWithInvert as cp, type SharedPaletteAlias as cq, type SpacingConfig as cr, type SpacingStyleProps as cs, type SpectrumColor as ct, type SpectrumConfig as cu, type StateStyleProps as cv, type StyleProps as cw, type SwitchSize as cx, type TextDecorationLine as cy, type TextProperty as cz, type ColorsConfig as d, type UniversalChipToggleProps as d0, type UniversalIconButtonProps as d1, type UniversalIconProps as d2, type UniversalImageProps as d3, type UniversalRadioGroupProps as d4, type UniversalRadioProps as d5, type UniversalTokensConfigAuto as d6, type HueStep as e, type PaletteConfig as f, type ShadowPreset as g, type UniversalBoxProps as h, type UniversalStackProps as i, type UniversalDividerProps as j, type ButtonClassMap as k, type ButtonColorProperty as l, type ButtonColorPropertyConfig as m, type SpacingAlias as n, type UniversalMenuItemProps as o, type FontDeclarationItemConfig as p, type FontConfig as q, type ShadowType as r, type UniversalFormLabelProps as s, type IconPropsWithSVGProps as t, type ImagePropsWithImgProps as u, type UniversalIconSlot as v, type UniversalLinkProps as w, type UniversalTextProps as x, alwaysPalette as y, defaultUniversalTokensConfigAuto as z };
|
package/package.json
CHANGED
package/dist/chunk-2L2IUH4B.js
DELETED
@@ -1,2 +0,0 @@
|
|
1
|
-
import{configurableProperties as e}from"./chunk-L4PNT44K.js";import{mapValues as t}from"./chunk-EWJ3J526.js";import{entries as o,cloneDeep as a,lowerCase as r,isFunction as l,mergeWith as n}from"lodash-es";/*! © 2025 Yahoo, Inc. UDS v0.0.0-development */
|
2
|
-
function s({variantKey:e,variantValue:t,layer:o,subComponentName:a,stateKey:r,stateValue:l}){return a?r&&l?`${a}/${e}/${t}/${r}/${l}/${o}`:`${a}/${e}/${t}/${o}`:r&&l?`${e}/${t}/${r}/${l}/${o}`:`${e}/${t}/${o}`}var i=e=>e.reduce(((e,t)=>e.flatMap((e=>t.map((t=>[e,t].flat()))))));function p(e,o){const a=e.variants?.[o];if(a)return{type:"no-sub-components",variant:a};const r=C(e);if(!r)return{type:"no-variants"};return{type:"has-sub-components",variants:t(r,(e=>e.variants[o]))}}function f(e,t,o){const a=e[t]?.defaults?.[o];if(void 0===a)throw new Error(`The variant default for "${o}" is not defined for the component "${t}"`);return a}function u(e,t,o,a){return f(e,t,o)===a}function c(e){let t=e;return t=t.replaceAll(".","/"),["root/","variables/","variant/","/value"].forEach((e=>{t=t.replaceAll(e,"")})),t}function d(e,t,o){const a=p(e,t);switch(a.type){case"no-variants":return null;case"no-sub-components":return a.variant;case"has-sub-components":if(!o)throw new Error("subComponentName argument name is required for configs with subcomponents");return a.variants[o]}}var v=e=>!!e?.layers,y=e=>!!e?.componentStates;function b(e,t,o){const a=d(e,t,o);return a&&y(a)?a?.componentStates??null:null}function m(e,t,a){const r=b(e,t,a);if(!r)return null;return i(o(r).map((([e,t])=>t.options.map((t=>({[e]:t})))))).map((e=>Array.isArray(e)?e.reduce(((e,t)=>({...e,...t})),{}):e))}function h(e){if(!e||!v(e))return null;const o=t(e.layers,(e=>e.properties));for(const e in o){const t=o[e];t&&0!==Object.keys(t).length||delete o[e]}return 0===Object.keys(o).length?null:o}var g=["rest"];function w(e,t,o,a){const r=d(e,t,a);if(!r)return null;return[...v(r)?Object.entries(r?.layers??{}):[],...y(r)&&o?Object.entries(r.componentStates[o].layers??{}):[]].flatMap((([e,t])=>Object.entries(t.properties).map((([t,o])=>[e,t,o])))).flatMap((([e,t,o])=>[...g,...o.pseudoStates??[]].map((a=>[e,t,o,a])))).reduce(((e,[t,o,a,r])=>{e[r]=e[r]??[];const l=[t,o,a];return e[r].push(l),e}),{})}function C(e){return e.subComponents?0===Object.keys(e.subComponents).length?null:e.subComponents:null}function S(e,t="variant"){const a=p(e,t);if("no-variants"===a.type)return{type:"no-variants",description:"No variants"};if("no-sub-components"===a.type){if(C(e))throw new Error("A config with a root variants.variant defintion cannot have subcomponents");return{type:"no-sub-components",description:a.variant.description,variantNames:[...a.variant.options]}}const r=o(a.variants).reduce(((e,[t,o])=>{for(const a of o.options)e[a]??=[],e[a].includes(t)||e[a].push(t);return e}),{});return{type:"has-sub-components",description:Object.values(a.variants).map((e=>e.description)).filter((e=>e))[0]??"",variantNames:Object.keys(r),variantToSubcomponentNames:r}}function $(e,t,o,a,r){const l=e[o].variables[t];if(!l)throw new Error(`No layer variables found for ${t}.`);const n=l[a];if(!n)throw new Error(`No property variables found for ${a}.`);const s=n[r];if(!s)throw new Error(`No pseudoState variables found for ${r}.`);return s}function k(e,t,o,r,l,n){const s=a(e),i=$(s,t,o,r,l);return void 0!==n.type&&(i.type=n.type),void 0!==n.value&&(i.value=n.value),s}function W(e,t,o,a,r){return[$(e,t,o,a,r),l=>k(e,t,o,a,r,l)]}var x={rest:"",hover:":hover:not(:has(:disabled))",pressed:":active:not(:has(:disabled))",focused:":focus","focus-within":":focus-within",invalid:':has(input[aria-invalid="true"])',"focused-keyboard":":focus-visible",visited:":visited",readonly:":has(input:read-only)",disabled:":has(:disabled)","invalid&hover":':has(input[aria-invalid="true"]):hover:not(:has(:disabled))',"invalid&pressed":':has(input[aria-invalid="true"]):active:not(:has(:disabled))'},V={rest:"",hover:"hover",pressed:"active",focused:"focus","focus-within":"focus-within",invalid:"has-input-invalid","focused-keyboard":"focus-visible",visited:"visited",readonly:"input-readonly",disabled:"has-disabled","invalid&hover":"has-input-invalid-and-hover","invalid&pressed":"has-input-invalid-and-active"};function N(e,t){const o=e.defaults[t],a=e.typeOfFixture;let r=0;return e.values.forEach(((e,t)=>{e.includes(o)&&(r=t)})),a[r]}function Y(e){const t={},o={};for(const t in e.variants){const a=e.variants[t];o[t]=a.default}t.defaults=o,t.variables={};for(const o in e.variants){const a=e.variants[o];for(const e of a.options)if(a.componentStates){const r=a.componentStates;for(const a in r){const l=r[a];for(const r of l.options)for(const n in l.layers){const i=l.layers[n],p=s({variantKey:o,variantValue:e,stateKey:a,stateValue:r,layer:n});t.variables[p]={};for(const o in i.properties){const a=i.properties[o],r={[o]:{rest:{type:N(a,e),valueType:"alias",value:a.defaults[e]}}};if(a.pseudoStates)for(const t of a.pseudoStates)r[o][t]={type:N(a,e),valueType:"alias",value:a.defaults[e]};t.variables[p]={...t.variables[p],...r}}}}}else for(const r in a.layers){const l=a.layers[r],n=s({variantKey:o,variantValue:e,layer:r});t.variables[n]={};for(const o in l.properties){const a=l.properties[o],r={[o]:{rest:{type:N(a,e),valueType:"alias",value:a.defaults[e]}}};if(a.pseudoStates)for(const t of a.pseudoStates)r[o][t]={type:N(a,e),valueType:"alias",value:a.defaults[e]};t.variables[n]={...t.variables[n],...r}}}}if(e.subComponents){const{subComponents:o}=e;for(const e in o)for(const a in o[e].variants){const r=o[e].variants[a];t.defaults[a]=r.default;for(const o of r.options)if(r.componentStates){const l=r.componentStates;for(const r in l){const n=l[r];for(const l of n.options)for(const i in n.layers){const p=n.layers[i],f=s({variantKey:a,variantValue:o,stateKey:r,stateValue:l,layer:i,subComponentName:e});t.variables[f]={};for(const e in p.properties){const a=p.properties[e],r={[e]:{rest:{type:N(a,o),valueType:"alias",value:a.defaults[o]}}};if(a.pseudoStates)for(const t of a.pseudoStates)r[e][t]={type:N(a,o),valueType:"alias",value:a.defaults[o]};t.variables[f]={...t.variables[f],...r}}}}}else for(const l in r.layers){const n=r.layers[l],i=s({variantKey:a,variantValue:o,layer:l,subComponentName:e});t.variables[i]={};for(const e in n.properties){const a=n.properties[e],r={[e]:{rest:{type:N(a,o),valueType:"alias",value:a.defaults[o]}}};if(a.pseudoStates)for(const t of a.pseudoStates)r[e][t]={type:N(a,o),valueType:"alias",value:a.defaults[o]};t.variables[i]={...t.variables[i],...r}}}}}return t}function K({componentName:e,variantKey:t,variantValue:o,layer:a,layerOptionalPseudoSelector:l,subComponentName:n,stateKey:s,stateValue:i}){let p="";return p=n?`uds-${r(e)}-${r(n)}-${r(t)}`:`uds-${r(e)}-${r(t)}`,o&&(p=`${p}-${r(o)}`),s&&i&&(p=`${p}-${r(s)}-${r(i)}`),p=`${p}-${r(a)}`,l&&(p=`${p}${l}`),p.replaceAll(/\s+/g,"-")}function X({componentName:t,variantKey:o,variantValue:a,layer:r,layerOptionalPseudoSelector:n,subComponentName:i,stateKey:p,stateValue:f,schema:u,propertyKey:c,originalPropertyDefinition:d,theme:v,currentStyles:y,previewOptions:b}){const m=s({variantKey:o,variantValue:a,layer:r,subComponentName:i,stateKey:p,stateValue:f});let h=K({componentName:t,variantKey:o,variantValue:a,layer:r,subComponentName:i,stateKey:p,stateValue:f});const g=u.variables[m][c];if(!g)throw"size/md/root"===m&&"spacingHorizontal"===c&&console.log({componentName:t,schemaKey:m,propertyKey:c},u.variables),new Error(`Prop definition (${t} - ${m} - ${c}) not found, this is not expected, please report the bug to the UDS team`);const w={};for(const s in g){const m=x[s]??"";let C="";if("root"===r)if(p&&f){const e=K({componentName:t,variantKey:o,variantValue:a,layer:r,subComponentName:i});h=K({componentName:t,variantKey:o,layer:r,subComponentName:i,stateKey:p,stateValue:f}),C=`.${e}${m}.${h}`}else C=`.${h}${m}`;else{const e=K({componentName:t,variantKey:o,variantValue:a,layer:"root",subComponentName:i});if(p&&f){const l=K({componentName:t,variantKey:o,layer:"root",subComponentName:i,stateKey:p,stateValue:f});h=K({componentName:t,variantKey:o,variantValue:a,layer:r,layerOptionalPseudoSelector:n,subComponentName:i}),C=`.${e}${m}.${l} .${h}`}else C=`.${e}${m} .${h}`}const S=(t,o,a,r)=>{const{value:l,type:n}=t,s=e[o];let i;if(e[o].customValueRenderer)i=e[o].customValueRenderer(t,u,a);else{i=a(e[o].twThemePath(n,String(l)))}if(s.concatenate&&r){return`${r}${s.concatenationDelimiter||", "}${i}`}return i},{cssProperties:$,extendedProperties:k}=e[d.name],W={},N=l(k),Y=N?k({componentName:t,subComponentName:i,layer:r,propertyKey:c}):k;if(Y&&Y.length){if(!N&&("string"==typeof $||Array.isArray($)&&$.length>0))throw new Error("Invalid configuration: cssProperties should not be configured when extendedProperties are defined. Please update your property configuration accordingly.");for(const t of Y){const o=e[t].cssProperties;if("string"==typeof o){const e=y?.[C]?.[o];W[o]=S(g[s],t,v,e)}else if(Array.isArray(o))for(const e of o){const o=y?.[C]?.[e];W[e]=S(g[s],t,v,o)}}}else if("string"==typeof $){const e=y?.[C]?.[$];W[$]=S(g[s],d.name,v,e)}else if(Array.isArray($))for(const e of $){const t=y?.[C]?.[e];W[e]=S(g[s],d.name,v,t)}if(w[C]||(w[C]={...W,...w[C]}),b?.generatePseudoStateClassModifier){const e=V[s]??"";e.length>0&&"root"!==s&&(w[`.${e}${C}`.replace(m,"")]={...W,...w[`.${e}${C}`.replace(m,"")]})}}return w}function P(e,t,o,a){function r(e,t){return n({},e,t)}let l=e.label.toLowerCase();e.overrideComponentName&&(l=e.overrideComponentName.toLowerCase());let s={};for(const n in e.variants){const i=e.variants[n];for(const e of i.options)if(i.componentStates){const p=i.componentStates;for(const i in p){const f=p[i];for(const p of f.options)for(const u in f.layers){const c=f.layers[u];for(const f in c.properties){const d=c.properties[f];s=r(s,X({componentName:l,variantKey:n,variantValue:e,stateKey:i,stateValue:p,layer:u,layerOptionalPseudoSelector:c.pseudoSelector,propertyKey:f,originalPropertyDefinition:d,theme:o,schema:t,currentStyles:s,previewOptions:a}))}}}}else for(const p in i.layers){const f=i.layers[p];for(const i in f.properties){const u=f.properties[i];s=r(s,X({componentName:l,variantKey:n,variantValue:e,layer:p,layerOptionalPseudoSelector:f.pseudoSelector,propertyKey:i,originalPropertyDefinition:u,theme:o,schema:t,currentStyles:s,previewOptions:a}))}}}if(e.subComponents){const{subComponents:n}=e;for(const e in n)for(const i in n[e].variants){const p=n[e].variants[i];for(const n of p.options)if(p.componentStates){const f=p.componentStates;for(const p in f){const u=f[p];for(const f of u.options)for(const c in u.layers){const d=u.layers[c];for(const u in d.properties){const v=d.properties[u];s=r(s,X({componentName:l,variantKey:i,variantValue:n,stateKey:p,stateValue:f,subComponentName:e,layer:c,layerOptionalPseudoSelector:d.pseudoSelector,propertyKey:u,originalPropertyDefinition:v,theme:o,schema:t,currentStyles:s,previewOptions:a}))}}}}else for(const f in p.layers){const u=p.layers[f];for(const p in u.properties){const c=u.properties[p];s=r(s,X({componentName:l,subComponentName:e,variantKey:i,variantValue:n,layer:f,layerOptionalPseudoSelector:u.pseudoSelector,propertyKey:p,originalPropertyDefinition:c,theme:o,schema:t,currentStyles:s,previewOptions:a}))}}}}return s}function F(e){return e}function B(e){return e}function E(e){return e}function O(e){return e}function T(e){return e}function R(e){return e}function M(e){return e}function A(e){return e}var L=["none","custom"],j=["none","up","down"],z={hover:{backgroundColor:{value:"none",options:L},borderColor:{value:"none",options:L},color:{value:"none",options:L},scale:{value:"up",options:j}},pressed:{backgroundColor:{value:"none",options:L},borderColor:{value:"none",options:L},color:{value:"none",options:L},scale:{value:"down",options:j}}},D={hover:{backgroundColor:{value:"none",options:L},borderColor:{value:"none",options:L},color:{value:"none",options:L},scale:{value:"up",options:j}},pressed:{backgroundColor:{value:"none",options:L},borderColor:{value:"none",options:L},color:{value:"none",options:L},scale:{value:"down",options:j}}},H={hover:{backgroundColor:{value:"none",options:L},borderColor:{value:"none",options:L},color:{value:"none",options:L},scale:{value:"up",options:j}},pressed:{backgroundColor:{value:"none",options:L},borderColor:{value:"none",options:L},color:{value:"none",options:L},scale:{value:"down",options:j}}},I={dropShadow:{value:"none",config:null},insetShadow:{value:"none",config:null}};function _(e){return{borderWidth:"none",borderRadius:"full",borderColor:{type:"palette",value:"transparent"},backgroundColor:{type:"palette",value:e},color:{type:"palette",value:"on-color"},scale:"none",...I}}function J(e){return{borderWidth:"thin",borderRadius:"full",backgroundColor:{type:"palette",value:"transparent"},borderColor:{type:"palette",value:e},color:{type:"palette",value:e},scale:"none",...I}}function U(e){return{borderWidth:"none",borderRadius:"full",backgroundColor:{type:"palette",value:"transparent"},borderColor:{type:"palette",value:"transparent"},color:{type:"palette",value:e},scale:"none",...I}}var q={fill:_,outline:J,ghost:U},G={defaults:{palette:"accent",variant:"primary",size:"md"},size:{sm:{spacingHorizontal:"4",spacingVertical:"1",gap:"2",iconSize:"sm",textVariant:"label1"},md:{spacingHorizontal:"6",spacingVertical:"3",gap:"2",iconSize:"sm",textVariant:"label1"},lg:{spacingHorizontal:"7",spacingVertical:"4",gap:"2",iconSize:"md",textVariant:"headline1"}},palette:{info:{primary:{kind:"fill",effect:z,base:_("info"),state:{hover:{scale:"up",backgroundColor:{type:"spectrum",value:"blue-10"},borderColor:{type:"palette",value:"transparent"},color:{type:"palette",value:"on-color"},...I},pressed:{scale:"down",backgroundColor:{type:"spectrum",value:"blue-11"},borderColor:{type:"palette",value:"transparent"},color:{type:"palette",value:"on-color"},...I}}},secondary:{kind:"outline",effect:D,base:J("info"),state:{hover:{scale:"up",backgroundColor:{type:"palette",value:"transparent"},borderColor:{type:"spectrum",value:"blue-10"},color:{type:"spectrum",value:"blue-10"},...I},pressed:{scale:"down",backgroundColor:{type:"palette",value:"transparent"},borderColor:{type:"spectrum",value:"blue-11"},color:{type:"spectrum",value:"blue-11"},...I}}},tertiary:{kind:"ghost",effect:H,base:U("info"),state:{hover:{scale:"up",backgroundColor:{type:"spectrum",value:"blue-2"},borderColor:{type:"palette",value:"transparent"},color:{type:"palette",value:"info"},...I},pressed:{scale:"down",backgroundColor:{type:"spectrum",value:"blue-4"},borderColor:{type:"palette",value:"transparent"},color:{type:"palette",value:"info"},...I}}}},accent:{primary:{kind:"fill",effect:z,base:_("accent"),state:{hover:{scale:"up",backgroundColor:{type:"spectrum",value:"carbon-10"},borderColor:{type:"palette",value:"transparent"},color:{type:"palette",value:"on-color"},...I},pressed:{scale:"down",backgroundColor:{type:"spectrum",value:"carbon-11"},borderColor:{type:"palette",value:"transparent"},color:{type:"palette",value:"on-color"},...I}}},secondary:{kind:"outline",effect:D,base:J("accent"),state:{hover:{scale:"up",backgroundColor:{type:"palette",value:"transparent"},borderColor:{type:"spectrum",value:"carbon-10"},color:{type:"spectrum",value:"carbon-10"},...I},pressed:{scale:"down",backgroundColor:{type:"palette",value:"transparent"},borderColor:{type:"spectrum",value:"carbon-11"},color:{type:"spectrum",value:"carbon-11"},...I}}},tertiary:{kind:"ghost",effect:H,base:U("accent"),state:{hover:{scale:"up",backgroundColor:{type:"spectrum",value:"carbon-2"},borderColor:{type:"palette",value:"transparent"},color:{type:"palette",value:"accent"},...I},pressed:{scale:"down",backgroundColor:{type:"spectrum",value:"carbon-4"},borderColor:{type:"palette",value:"transparent"},color:{type:"palette",value:"accent"},...I}}}},brand:{primary:{kind:"fill",effect:z,base:_("brand"),state:{hover:{scale:"up",backgroundColor:{type:"spectrum",value:"purple-10"},borderColor:{type:"palette",value:"transparent"},color:{type:"palette",value:"on-color"},...I},pressed:{scale:"down",backgroundColor:{type:"spectrum",value:"purple-11"},borderColor:{type:"palette",value:"transparent"},color:{type:"palette",value:"on-color"},...I}}},secondary:{kind:"outline",effect:D,base:J("brand"),state:{hover:{scale:"up",backgroundColor:{type:"palette",value:"transparent"},borderColor:{type:"spectrum",value:"purple-10"},color:{type:"spectrum",value:"purple-10"},...I},pressed:{scale:"down",backgroundColor:{type:"palette",value:"transparent"},borderColor:{type:"spectrum",value:"purple-11"},color:{type:"spectrum",value:"purple-11"},...I}}},tertiary:{kind:"ghost",effect:H,base:U("brand"),state:{hover:{scale:"up",backgroundColor:{type:"spectrum",value:"purple-2"},borderColor:{type:"palette",value:"transparent"},color:{type:"palette",value:"brand"},...I},pressed:{scale:"down",backgroundColor:{type:"spectrum",value:"purple-4"},borderColor:{type:"palette",value:"transparent"},color:{type:"palette",value:"brand"},...I}}}},alert:{primary:{kind:"fill",effect:z,base:_("alert"),state:{hover:{scale:"up",backgroundColor:{type:"spectrum",value:"red-10"},borderColor:{type:"palette",value:"transparent"},color:{type:"palette",value:"on-color"},...I},pressed:{scale:"down",backgroundColor:{type:"spectrum",value:"red-11"},borderColor:{type:"palette",value:"transparent"},color:{type:"palette",value:"on-color"},...I}}},secondary:{kind:"outline",effect:D,base:J("alert"),state:{hover:{scale:"up",backgroundColor:{type:"palette",value:"transparent"},borderColor:{type:"spectrum",value:"red-10"},color:{type:"spectrum",value:"red-10"},...I},pressed:{scale:"down",backgroundColor:{type:"palette",value:"transparent"},borderColor:{type:"spectrum",value:"red-11"},color:{type:"spectrum",value:"red-11"},...I}}},tertiary:{kind:"ghost",effect:H,base:U("alert"),state:{hover:{scale:"up",backgroundColor:{type:"spectrum",value:"red-2"},borderColor:{type:"palette",value:"transparent"},color:{type:"palette",value:"alert"},...I},pressed:{scale:"down",backgroundColor:{type:"spectrum",value:"red-4"},borderColor:{type:"palette",value:"transparent"},color:{type:"palette",value:"alert"},...I}}}},positive:{primary:{kind:"fill",effect:z,base:_("positive"),state:{hover:{scale:"up",backgroundColor:{type:"spectrum",value:"green-10"},borderColor:{type:"palette",value:"transparent"},color:{type:"palette",value:"on-color"},...I},pressed:{scale:"down",backgroundColor:{type:"spectrum",value:"green-11"},borderColor:{type:"palette",value:"transparent"},color:{type:"palette",value:"on-color"},...I}}},secondary:{kind:"outline",effect:D,base:J("positive"),state:{hover:{scale:"up",backgroundColor:{type:"palette",value:"transparent"},borderColor:{type:"spectrum",value:"green-10"},color:{type:"spectrum",value:"green-10"},...I},pressed:{scale:"down",backgroundColor:{type:"palette",value:"transparent"},borderColor:{type:"spectrum",value:"green-11"},color:{type:"spectrum",value:"green-11"},...I}}},tertiary:{kind:"ghost",effect:H,base:U("positive"),state:{hover:{scale:"up",backgroundColor:{type:"spectrum",value:"green-2"},borderColor:{type:"palette",value:"transparent"},color:{type:"palette",value:"positive"},...I},pressed:{scale:"down",backgroundColor:{type:"spectrum",value:"green-4"},borderColor:{type:"palette",value:"transparent"},color:{type:"palette",value:"positive"},...I}}}},warning:{primary:{kind:"fill",effect:z,base:_("warning"),state:{hover:{scale:"up",backgroundColor:{type:"spectrum",value:"orange-10"},borderColor:{type:"palette",value:"transparent"},color:{type:"palette",value:"on-color"},...I},pressed:{scale:"down",backgroundColor:{type:"spectrum",value:"orange-11"},borderColor:{type:"palette",value:"transparent"},color:{type:"palette",value:"on-color"},...I}}},secondary:{kind:"outline",effect:D,base:J("warning"),state:{hover:{scale:"up",backgroundColor:{type:"palette",value:"transparent"},borderColor:{type:"spectrum",value:"orange-10"},color:{type:"spectrum",value:"orange-10"},...I},pressed:{scale:"down",backgroundColor:{type:"palette",value:"transparent"},borderColor:{type:"spectrum",value:"orange-11"},color:{type:"spectrum",value:"orange-11"},...I}}},tertiary:{kind:"ghost",effect:H,base:U("warning"),state:{hover:{scale:"up",backgroundColor:{type:"spectrum",value:"orange-2"},borderColor:{type:"palette",value:"transparent"},color:{type:"palette",value:"warning"},...I},pressed:{scale:"down",backgroundColor:{type:"spectrum",value:"orange-4"},borderColor:{type:"palette",value:"transparent"},color:{type:"palette",value:"warning"},...I}}}}}},Q={white:"#ffffff",black:"#000000",transparent:"transparent",current:"currentColor"},Z={drop:{none:[],xs:[{offsetX:"0",offsetY:"px",blur:"0.5",spread:"0",opacity:"5",color:{type:"palette",value:"primary"}}],sm:[{offsetX:"0",offsetY:"px",blur:"0.5",spread:"0",opacity:"10",color:{type:"palette",value:"primary"}},{offsetX:"0",offsetY:"px",blur:"1",spread:"0",opacity:"10",color:{type:"palette",value:"primary"}}],md:[{offsetX:"0",offsetY:"1",blur:"1.5",spread:"-px",opacity:"10",color:{type:"palette",value:"primary"}},{offsetX:"0",offsetY:"0.5",blur:"1",spread:"-0.5",opacity:"10",color:{type:"palette",value:"primary"}}],lg:[{offsetX:"0",offsetY:"1",blur:"1.5",spread:"-1",opacity:"10",color:{type:"palette",value:"primary"}},{offsetX:"0",offsetY:"2.5",blur:"3.5",spread:"-0.5",opacity:"10",color:{type:"palette",value:"primary"}}],xl:[{offsetX:"0",offsetY:"2",blur:"2.5",spread:"-1.5",opacity:"10",color:{type:"palette",value:"primary"}},{offsetX:"0",offsetY:"5",blur:"6",spread:"-1",opacity:"10",color:{type:"palette",value:"primary"}}],"2xl":[{offsetX:"0",offsetY:"6",blur:"12",spread:"-3",opacity:"25",color:{type:"palette",value:"primary"}}]},inset:{none:[],xs:[{offsetX:"0",offsetY:"px",blur:"0.5",spread:"0",opacity:"5",color:{type:"palette",value:"primary"}}],sm:[{offsetX:"0",offsetY:"px",blur:"0.5",spread:"0",opacity:"10",color:{type:"palette",value:"primary"}},{offsetX:"0",offsetY:"px",blur:"1",spread:"0",opacity:"10",color:{type:"palette",value:"primary"}}],md:[{offsetX:"0",offsetY:"1",blur:"1.5",spread:"-px",opacity:"10",color:{type:"palette",value:"primary"}},{offsetX:"0",offsetY:"0.5",blur:"1",spread:"-0.5",opacity:"10",color:{type:"palette",value:"primary"}}],lg:[{offsetX:"0",offsetY:"1",blur:"1.5",spread:"-1",opacity:"10",color:{type:"palette",value:"primary"}},{offsetX:"0",offsetY:"2.5",blur:"3.5",spread:"-0.5",opacity:"10",color:{type:"palette",value:"primary"}}],xl:[{offsetX:"0",offsetY:"2",blur:"2.5",spread:"-1.5",opacity:"10",color:{type:"palette",value:"primary"}},{offsetX:"0",offsetY:"5",blur:"6",spread:"-1",opacity:"10",color:{type:"palette",value:"primary"}}],"2xl":[{offsetX:"0",offsetY:"6",blur:"12",spread:"-3",opacity:"25",color:{type:"palette",value:"primary"}}],"xs-invert":[{offsetX:"0",offsetY:"px",blur:"0.5",spread:"0",opacity:"5",color:{type:"always",value:"white"}}],"sm-invert":[{offsetX:"0",offsetY:"px",blur:"0.5",spread:"0",opacity:"10",color:{type:"always",value:"white"}},{offsetX:"0",offsetY:"px",blur:"1",spread:"0",opacity:"10",color:{type:"always",value:"white"}}],"md-invert":[{offsetX:"0",offsetY:"1",blur:"1.5",spread:"-px",opacity:"10",color:{type:"always",value:"white"}},{offsetX:"0",offsetY:"0.5",blur:"1",spread:"-0.5",opacity:"10",color:{type:"always",value:"white"}}],"lg-invert":[{offsetX:"0",offsetY:"1",blur:"1.5",spread:"-1",opacity:"10",color:{type:"always",value:"white"}},{offsetX:"0",offsetY:"2.5",blur:"3.5",spread:"-0.5",opacity:"10",color:{type:"always",value:"white"}}],"xl-invert":[{offsetX:"0",offsetY:"2",blur:"2.5",spread:"-1.5",opacity:"10",color:{type:"always",value:"white"}},{offsetX:"0",offsetY:"5",blur:"6",spread:"-1",opacity:"10",color:{type:"always",value:"white"}}],"2xl-invert":[{offsetX:"0",offsetY:"6",blur:"12",spread:"-3",opacity:"25",color:{type:"always",value:"white"}}]}},ee={thin:"100",extralight:"200",light:"300",regular:"400",medium:"500",semibold:"600",bold:"700",extrabold:"800",black:"900"},te="system",oe="system",ae="light",re="large",le=!1,ne="🇺🇸 US",se="https://s.yimg.com/bw/fonts",ie=["Helvetica Neue","Helvetica","Arial","sans-serif"],pe=["Georgia","Times","Times New Roman","serif"],fe={"centra-no2":{fallback:ie,type:"sans",fontFamily:"Centra No2",isVariableFont:!1,fontSlants:void 0,fontWidths:void 0,fontWeights:[{label:"Hairline",value:50},{label:"Thin",value:100},{label:"Light",value:300},{label:"Book",value:400},{label:"Medium",value:500},{label:"Bold",value:700},{label:"ExtraBold",value:800},{label:"Black",value:900}],defaults:{fontSlant:void 0,fontWidth:void 0,fontWeight:400},declarations:[{fontStyle:"normal",fontWeight:"50",src:`url('${se}/centra-no2-hairline.woff2') format('woff2')`},{fontStyle:"italic",fontWeight:"50",src:`url('${se}/centra-no2-hairline-italic.woff2') format('woff2')`},{fontStyle:"normal",fontWeight:"100",src:`url('${se}/centra-no2-thin.woff2') format('woff2')`},{fontStyle:"italic",fontWeight:"100",src:`url('${se}/centra-no2-thin-italic.woff2') format('woff2')`},{fontStyle:"normal",fontWeight:"300",src:`url('${se}/centra-no2-light.woff2') format('woff2')`},{fontStyle:"italic",fontWeight:"300",src:`url('${se}/centra-no2-light-italic.woff2') format('woff2')`},{fontStyle:"normal",fontWeight:"400",src:`url('${se}/centra-no2-book.woff2') format('woff2')`},{fontStyle:"italic",fontWeight:"400",src:`url('${se}/centra-no2-book-italic.woff2') format('woff2')`},{fontStyle:"normal",fontWeight:"500",src:`url('${se}/centra-no2-medium.woff2') format('woff2')`},{fontStyle:"italic",fontWeight:"500",src:`url('${se}/centra-no2-medium-italic.woff2') format('woff2')`},{fontStyle:"normal",fontWeight:"700",src:`url('${se}/centra-no2-bold.woff2') format('woff2')`},{fontStyle:"italic",fontWeight:"700",src:`url('${se}/centra-no2-bold-italic.woff2') format('woff2')`},{fontStyle:"normal",fontWeight:"800",src:`url('${se}/centra-no2-extrabold.woff2') format('woff2')`},{fontStyle:"italic",fontWeight:"800",src:`url('${se}/centra-no2-extrabold-italic.woff2') format('woff2')`},{fontStyle:"normal",fontWeight:"900",src:`url('${se}/centra-no2-black.woff2') format('woff2')`},{fontStyle:"italic",fontWeight:"900",src:`url('${se}/centra-no2-black-italic.woff2') format('woff2')`}]},inter:{fallback:ie,type:"sans",fontFamily:"Inter",isVariableFont:!0,fontSlants:[{label:"Italic",value:-10},{label:"None",value:0}],fontWidths:void 0,fontWeights:[{label:"Thin",value:100},{label:"Extra Light",value:200},{label:"Light",value:300},{label:"Regular",value:400},{label:"Medium",value:500},{label:"Semi Bold",value:600},{label:"Bold",value:700},{label:"Extra Bold",value:800},{label:"Black",value:900}],defaults:{fontSlant:0,fontWidth:void 0,fontWeight:400},declarations:[{fontWeight:"1 1000",src:`url('${se}/inter-vf.woff2') format('woff2')`}]},"roboto-mono":{fallback:["ui-monospace","SFMono-Regular","Menlo","Monaco","Consolas","Liberation Mono","Courier New","monospace"],type:"mono",fontFamily:"Roboto Mono",isVariableFont:!1,fontSlants:void 0,fontWidths:void 0,fontWeights:[{label:"Thin",value:100},{label:"Light",value:300},{label:"Regular",value:400},{label:"Medium",value:500},{label:"Bold",value:700}],defaults:{fontSlant:void 0,fontWidth:void 0,fontWeight:400},declarations:[{fontStyle:"normal",fontWeight:"100",src:`url('${se}/roboto-mono-100.woff2') format('woff2')`},{fontStyle:"italic",fontWeight:"100",src:`url('${se}/roboto-mono-100-italic.woff2') format('woff2')`},{fontStyle:"normal",fontWeight:"300",src:`url('${se}/roboto-mono-300.woff2') format('woff2')`},{fontStyle:"italic",fontWeight:"300",src:`url('${se}/roboto-mono-300-italic.woff2') format('woff2')`},{fontStyle:"normal",fontWeight:"400",src:`url('${se}/roboto-mono-400.woff2') format('woff2')`},{fontStyle:"italic",fontWeight:"400",src:`url('${se}/roboto-mono-400-italic.woff2') format('woff2')`},{fontStyle:"normal",fontWeight:"500",src:`url('${se}/roboto-mono-500.woff2') format('woff2')`},{fontStyle:"italic",fontWeight:"500",src:`url('${se}/roboto-mono-500-italic.woff2') format('woff2')`},{fontStyle:"normal",fontWeight:"700",src:`url('${se}/roboto-mono-700.woff2') format('woff2')`},{fontStyle:"italic",fontWeight:"700",src:`url('${se}/roboto-mono-700-italic.woff2') format('woff2')`}]},"yahoo-sans":{fallback:ie,type:"sans",fontFamily:"Yahoo Sans",isVariableFont:!0,fontSlants:void 0,fontWidths:void 0,fontWeights:[{label:"ExtraLight",value:200},{label:"Light",value:300},{label:"Regular",value:400},{label:"Medium",value:500},{label:"Semibold",value:585},{label:"Bold",value:700},{label:"ExtraBold",value:810},{label:"Black",value:900}],defaults:{fontSlant:void 0,fontWidth:void 0,fontWeight:400},declarations:[{fontWeight:"1 1000",src:`url('${se}/yahoo-sans-vf.woff2') format('woff2')`}]},"yahoo-sans-cr4":{fallback:ie,type:"sans",fontFamily:"Yahoo CR4 BETA VF",isVariableFont:!0,fontSlants:void 0,fontWidths:void 0,fontWeights:[{label:"Regular",value:400},{label:"Medium",value:500},{label:"Bold",value:700}],defaults:{fontSlant:void 0,fontWidth:void 0,fontWeight:450},declarations:[{fontWeight:"1 1000",src:`url('${se}/yahoo-sans-cr4-vf.woff2') format('woff2')`}]},"yahoo-product-sans":{fallback:ie,type:"sans",fontFamily:"Yahoo Product Sans VF",isVariableFont:!0,fontSlants:void 0,fontWidths:void 0,fontWeights:[{label:"Regular",value:400},{label:"Medium",value:500},{label:"Bold",value:700}],defaults:{fontSlant:void 0,fontWidth:void 0,fontWeight:450},declarations:[{fontWeight:"1 1000",src:`url('${se}/yahoo-product-sans-vf.woff2') format('woff2-variations')`}]},"yahoo-product-sans-extended":{fallback:ie,type:"sans",fontFamily:"YahooPd_Eval202412",isVariableFont:!0,fontSlants:[{label:"Italic",value:9},{label:"None",value:0}],fontWidths:[{label:"Cond",value:50},{label:"Normal",value:75},{label:"Ext",value:100}],fontWeights:[{label:"Light",value:300},{label:"Regular",value:450},{label:"Medium",value:500},{label:"Semibold",value:600},{label:"Bold",value:700},{label:"Black",value:850}],defaults:{fontSlant:0,fontWidth:75,fontWeight:450},declarations:[{fontWeight:"1 1000",src:`url('${se}/YahooPd_Eval202412-v1.1.0.woff2') format("woff2 supports variations"), url('${se}/YahooPd_Eval202412-v1.1.0.woff2') format('woff2-variations')`}]},"yahoo-sans-condensed":{fallback:ie,type:"sans",fontFamily:"Yahoo Sans Cond",isVariableFont:!0,fontSlants:void 0,fontWidths:void 0,fontWeights:[{label:"Light",value:300},{label:"Regular",value:400},{label:"Medium",value:500},{label:"Bold",value:718},{label:"XBold",value:800},{label:"Black",value:900}],defaults:{fontSlant:void 0,fontWidth:void 0,fontWeight:400},declarations:[{fontWeight:"1 1000",src:`url('${se}/yahoo-sans-condensed-vf.woff2') format('woff2')`}]},"yahoo-serif-display":{fallback:pe,type:"serif",fontFamily:"Yahoo Serif Display",isVariableFont:!1,fontSlants:void 0,fontWidths:void 0,fontWeights:[{label:"Light",value:300},{label:"Regular",value:400},{label:"Bold",value:700},{label:"Extrabold",value:800},{label:"Black",value:900}],defaults:{fontSlant:void 0,fontWidth:void 0,fontWeight:400},declarations:[{fontStyle:"normal",fontWeight:"300",src:`url('${se}/yahoo-serif-display-light.woff2') format('woff2')`},{fontStyle:"normal",fontWeight:"400",src:`url('${se}/yahoo-serif-display-regular.woff2') format('woff2')`},{fontStyle:"normal",fontWeight:"700",src:`url('${se}/yahoo-serif-display-bold.woff2') format('woff2')`},{fontStyle:"normal",fontWeight:"800",src:`url('${se}/yahoo-serif-display-extrabold.woff2') format('woff2')`},{fontStyle:"normal",fontWeight:"900",src:`url('${se}/yahoo-serif-display-black.woff2') format('woff2')`}]},"yahoo-serif-text":{fallback:pe,type:"serif",fontFamily:"Yahoo Serif Text",isVariableFont:!1,fontSlants:void 0,fontWidths:void 0,fontWeights:[{label:"Regular",value:400},{label:"Bold",value:700}],defaults:{fontSlant:void 0,fontWidth:void 0,fontWeight:400},declarations:[{fontStyle:"normal",fontWeight:"400",src:`url('${se}/yahoo-serif-text-regular.woff2') format('woff2')`},{fontStyle:"italic",fontWeight:"400",src:`url('${se}/yahoo-serif-text-italic.woff2') format('woff2')`},{fontStyle:"normal",fontWeight:"700",src:`url('${se}/yahoo-serif-text-bold.woff2') format('woff2')`},{fontStyle:"italic",fontWeight:"700",src:`url('${se}/yahoo-serif-text-bold-italic.woff2') format('woff2')`}]}};function ue({palette:e="accent",variant:t="primary"}){return"accent"===e?t:"primary"===t?e:`${e}-${t}`}function ce({flatVariant:e}){if(!e)return{palette:void 0,variant:void 0};const[t,o]=e.split("-");return o?{palette:t,variant:o}:["primary","secondary","tertiary"].includes(e)?{palette:"accent",variant:e}:{palette:e,variant:"primary"}}function de(e){return Object.fromEntries(e)}export{ae as DEFAULT_COLOR_MODE,te as DEFAULT_COLOR_MODE_FOR_APP,le as DEFAULT_HIGH_CONTRAST_MODE,ne as DEFAULT_REGION_MODE,re as DEFAULT_SCALE_MODE,oe as DEFAULT_SCALE_MODE_FOR_APP,fe as FONT_DECLARATIONS_MAP,Q as alwaysPalette,G as button,i as cartesianProduct,p as coalesceConfigVariant,E as createComponentStateConfig,R as createComponentStates,F as createConfigurableProperty,M as createLayerConfig,A as createSubComponentConfig,B as createVariantConfig,T as createVariantConfigWithComponentStates,O as createVariantConfigWithProperties,N as findFixtureType,ee as fontWeightMap,de as fromEntries,K as generateClassName,X as generateDeclaration,c as generateKeyFromFlatConfigPath,s as generateSchemaKey,P as generateStyles,f as getConfigDefaultValue,$ as getConfigPseudoStateVariables,W as getConfigPseudoStateVariablesWithSetter,C as getConfigSubcomponents,b as getConfigVariantComponentStates,m as getConfigVariantComponentStatesMatrix,h as getConfigVariantProperties,w as getConfigVariantPseudoStates,S as getConfigVariants,q as getDefaultButtonBaseMap,u as isConfigDefaultValue,ue as parseButtonVariantFlat,ce as parseDeprecatedButtonPaletteVariant,k as setConfigPseudoStateVariable,Z as shadow,V as statePseudoMapDocsMode,Y as toMinimalDbConfigObject};
|
package/dist/chunk-FUTH4TDA.cjs
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
"use strict";var e=require("./chunk-ZYDZ7ZC3.cjs"),t=require("./chunk-J7PUOUXC.cjs"),o=require("lodash-es");/*! © 2025 Yahoo, Inc. UDS v0.0.0-development */function a({variantKey:e,variantValue:t,layer:o,subComponentName:a,stateKey:r,stateValue:l}){return a?r&&l?`${a}/${e}/${t}/${r}/${l}/${o}`:`${a}/${e}/${t}/${o}`:r&&l?`${e}/${t}/${r}/${l}/${o}`:`${e}/${t}/${o}`}var r=e=>e.reduce(((e,t)=>e.flatMap((e=>t.map((t=>[e,t].flat()))))));function l(e,o){const a=e.variants?.[o];if(a)return{type:"no-sub-components",variant:a};const r=c(e);if(!r)return{type:"no-variants"};return{type:"has-sub-components",variants:t.mapValues(r,(e=>e.variants[o]))}}function n(e,t,o){const a=e[t]?.defaults?.[o];if(void 0===a)throw new Error(`The variant default for "${o}" is not defined for the component "${t}"`);return a}function s(e,t,o){const a=l(e,t);switch(a.type){case"no-variants":return null;case"no-sub-components":return a.variant;case"has-sub-components":if(!o)throw new Error("subComponentName argument name is required for configs with subcomponents");return a.variants[o]}}var i=e=>!!e?.layers,p=e=>!!e?.componentStates;function f(e,t,o){const a=s(e,t,o);return a&&p(a)?a?.componentStates??null:null}var u=["rest"];function c(e){return e.subComponents?0===Object.keys(e.subComponents).length?null:e.subComponents:null}function d(e,t,o,a,r){const l=e[o].variables[t];if(!l)throw new Error(`No layer variables found for ${t}.`);const n=l[a];if(!n)throw new Error(`No property variables found for ${a}.`);const s=n[r];if(!s)throw new Error(`No pseudoState variables found for ${r}.`);return s}function v(e,t,a,r,l,n){const s=o.cloneDeep(e),i=d(s,t,a,r,l);return void 0!==n.type&&(i.type=n.type),void 0!==n.value&&(i.value=n.value),s}var y={rest:"",hover:":hover:not(:has(:disabled))",pressed:":active:not(:has(:disabled))",focused:":focus","focus-within":":focus-within",invalid:':has(input[aria-invalid="true"])',"focused-keyboard":":focus-visible",visited:":visited",readonly:":has(input:read-only)",disabled:":has(:disabled)","invalid&hover":':has(input[aria-invalid="true"]):hover:not(:has(:disabled))',"invalid&pressed":':has(input[aria-invalid="true"]):active:not(:has(:disabled))'},b={rest:"",hover:"hover",pressed:"active",focused:"focus","focus-within":"focus-within",invalid:"has-input-invalid","focused-keyboard":"focus-visible",visited:"visited",readonly:"input-readonly",disabled:"has-disabled","invalid&hover":"has-input-invalid-and-hover","invalid&pressed":"has-input-invalid-and-active"};function m(e,t){const o=e.defaults[t],a=e.typeOfFixture;let r=0;return e.values.forEach(((e,t)=>{e.includes(o)&&(r=t)})),a[r]}function h({componentName:e,variantKey:t,variantValue:a,layer:r,layerOptionalPseudoSelector:l,subComponentName:n,stateKey:s,stateValue:i}){let p="";return p=n?`uds-${o.lowerCase(e)}-${o.lowerCase(n)}-${o.lowerCase(t)}`:`uds-${o.lowerCase(e)}-${o.lowerCase(t)}`,a&&(p=`${p}-${o.lowerCase(a)}`),s&&i&&(p=`${p}-${o.lowerCase(s)}-${o.lowerCase(i)}`),p=`${p}-${o.lowerCase(r)}`,l&&(p=`${p}${l}`),p.replaceAll(/\s+/g,"-")}function g({componentName:t,variantKey:r,variantValue:l,layer:n,layerOptionalPseudoSelector:s,subComponentName:i,stateKey:p,stateValue:f,schema:u,propertyKey:c,originalPropertyDefinition:d,theme:v,currentStyles:m,previewOptions:g}){const w=a({variantKey:r,variantValue:l,layer:n,subComponentName:i,stateKey:p,stateValue:f});let C=h({componentName:t,variantKey:r,variantValue:l,layer:n,subComponentName:i,stateKey:p,stateValue:f});const S=u.variables[w][c];if(!S)throw"size/md/root"===w&&"spacingHorizontal"===c&&console.log({componentName:t,schemaKey:w,propertyKey:c},u.variables),new Error(`Prop definition (${t} - ${w} - ${c}) not found, this is not expected, please report the bug to the UDS team`);const $={};for(const a in S){const w=y[a]??"";let k="";if("root"===n)if(p&&f){const e=h({componentName:t,variantKey:r,variantValue:l,layer:n,subComponentName:i});C=h({componentName:t,variantKey:r,layer:n,subComponentName:i,stateKey:p,stateValue:f}),k=`.${e}${w}.${C}`}else k=`.${C}${w}`;else{const e=h({componentName:t,variantKey:r,variantValue:l,layer:"root",subComponentName:i});if(p&&f){const o=h({componentName:t,variantKey:r,layer:"root",subComponentName:i,stateKey:p,stateValue:f});C=h({componentName:t,variantKey:r,variantValue:l,layer:n,layerOptionalPseudoSelector:s,subComponentName:i}),k=`.${e}${w}.${o} .${C}`}else k=`.${e}${w} .${C}`}const x=(t,o,a,r)=>{const{value:l,type:n}=t,s=e.configurableProperties[o];let i;if(e.configurableProperties[o].customValueRenderer)i=e.configurableProperties[o].customValueRenderer(t,u,a);else{i=a(e.configurableProperties[o].twThemePath(n,String(l)))}if(s.concatenate&&r){return`${r}${s.concatenationDelimiter||", "}${i}`}return i},{cssProperties:W,extendedProperties:V}=e.configurableProperties[d.name],N={},P=o.isFunction(V),O=P?V({componentName:t,subComponentName:i,layer:n,propertyKey:c}):V;if(O&&O.length){if(!P&&("string"==typeof W||Array.isArray(W)&&W.length>0))throw new Error("Invalid configuration: cssProperties should not be configured when extendedProperties are defined. Please update your property configuration accordingly.");for(const t of O){const o=e.configurableProperties[t].cssProperties;if("string"==typeof o){const e=m?.[k]?.[o];N[o]=x(S[a],t,v,e)}else if(Array.isArray(o))for(const e of o){const o=m?.[k]?.[e];N[e]=x(S[a],t,v,o)}}}else if("string"==typeof W){const e=m?.[k]?.[W];N[W]=x(S[a],d.name,v,e)}else if(Array.isArray(W))for(const e of W){const t=m?.[k]?.[e];N[e]=x(S[a],d.name,v,t)}if($[k]||($[k]={...N,...$[k]}),g?.generatePseudoStateClassModifier){const e=b[a]??"";e.length>0&&"root"!==a&&($[`.${e}${k}`.replace(w,"")]={...N,...$[`.${e}${k}`.replace(w,"")]})}}return $}var w=["none","custom"],C=["none","up","down"],S={hover:{backgroundColor:{value:"none",options:w},borderColor:{value:"none",options:w},color:{value:"none",options:w},scale:{value:"up",options:C}},pressed:{backgroundColor:{value:"none",options:w},borderColor:{value:"none",options:w},color:{value:"none",options:w},scale:{value:"down",options:C}}},$={hover:{backgroundColor:{value:"none",options:w},borderColor:{value:"none",options:w},color:{value:"none",options:w},scale:{value:"up",options:C}},pressed:{backgroundColor:{value:"none",options:w},borderColor:{value:"none",options:w},color:{value:"none",options:w},scale:{value:"down",options:C}}},k={hover:{backgroundColor:{value:"none",options:w},borderColor:{value:"none",options:w},color:{value:"none",options:w},scale:{value:"up",options:C}},pressed:{backgroundColor:{value:"none",options:w},borderColor:{value:"none",options:w},color:{value:"none",options:w},scale:{value:"down",options:C}}},x={dropShadow:{value:"none",config:null},insetShadow:{value:"none",config:null}};function W(e){return{borderWidth:"none",borderRadius:"full",borderColor:{type:"palette",value:"transparent"},backgroundColor:{type:"palette",value:e},color:{type:"palette",value:"on-color"},scale:"none",...x}}function V(e){return{borderWidth:"thin",borderRadius:"full",backgroundColor:{type:"palette",value:"transparent"},borderColor:{type:"palette",value:e},color:{type:"palette",value:e},scale:"none",...x}}function N(e){return{borderWidth:"none",borderRadius:"full",backgroundColor:{type:"palette",value:"transparent"},borderColor:{type:"palette",value:"transparent"},color:{type:"palette",value:e},scale:"none",...x}}var P={fill:W,outline:V,ghost:N},O={defaults:{palette:"accent",variant:"primary",size:"md"},size:{sm:{spacingHorizontal:"4",spacingVertical:"1",gap:"2",iconSize:"sm",textVariant:"label1"},md:{spacingHorizontal:"6",spacingVertical:"3",gap:"2",iconSize:"sm",textVariant:"label1"},lg:{spacingHorizontal:"7",spacingVertical:"4",gap:"2",iconSize:"md",textVariant:"headline1"}},palette:{info:{primary:{kind:"fill",effect:S,base:W("info"),state:{hover:{scale:"up",backgroundColor:{type:"spectrum",value:"blue-10"},borderColor:{type:"palette",value:"transparent"},color:{type:"palette",value:"on-color"},...x},pressed:{scale:"down",backgroundColor:{type:"spectrum",value:"blue-11"},borderColor:{type:"palette",value:"transparent"},color:{type:"palette",value:"on-color"},...x}}},secondary:{kind:"outline",effect:$,base:V("info"),state:{hover:{scale:"up",backgroundColor:{type:"palette",value:"transparent"},borderColor:{type:"spectrum",value:"blue-10"},color:{type:"spectrum",value:"blue-10"},...x},pressed:{scale:"down",backgroundColor:{type:"palette",value:"transparent"},borderColor:{type:"spectrum",value:"blue-11"},color:{type:"spectrum",value:"blue-11"},...x}}},tertiary:{kind:"ghost",effect:k,base:N("info"),state:{hover:{scale:"up",backgroundColor:{type:"spectrum",value:"blue-2"},borderColor:{type:"palette",value:"transparent"},color:{type:"palette",value:"info"},...x},pressed:{scale:"down",backgroundColor:{type:"spectrum",value:"blue-4"},borderColor:{type:"palette",value:"transparent"},color:{type:"palette",value:"info"},...x}}}},accent:{primary:{kind:"fill",effect:S,base:W("accent"),state:{hover:{scale:"up",backgroundColor:{type:"spectrum",value:"carbon-10"},borderColor:{type:"palette",value:"transparent"},color:{type:"palette",value:"on-color"},...x},pressed:{scale:"down",backgroundColor:{type:"spectrum",value:"carbon-11"},borderColor:{type:"palette",value:"transparent"},color:{type:"palette",value:"on-color"},...x}}},secondary:{kind:"outline",effect:$,base:V("accent"),state:{hover:{scale:"up",backgroundColor:{type:"palette",value:"transparent"},borderColor:{type:"spectrum",value:"carbon-10"},color:{type:"spectrum",value:"carbon-10"},...x},pressed:{scale:"down",backgroundColor:{type:"palette",value:"transparent"},borderColor:{type:"spectrum",value:"carbon-11"},color:{type:"spectrum",value:"carbon-11"},...x}}},tertiary:{kind:"ghost",effect:k,base:N("accent"),state:{hover:{scale:"up",backgroundColor:{type:"spectrum",value:"carbon-2"},borderColor:{type:"palette",value:"transparent"},color:{type:"palette",value:"accent"},...x},pressed:{scale:"down",backgroundColor:{type:"spectrum",value:"carbon-4"},borderColor:{type:"palette",value:"transparent"},color:{type:"palette",value:"accent"},...x}}}},brand:{primary:{kind:"fill",effect:S,base:W("brand"),state:{hover:{scale:"up",backgroundColor:{type:"spectrum",value:"purple-10"},borderColor:{type:"palette",value:"transparent"},color:{type:"palette",value:"on-color"},...x},pressed:{scale:"down",backgroundColor:{type:"spectrum",value:"purple-11"},borderColor:{type:"palette",value:"transparent"},color:{type:"palette",value:"on-color"},...x}}},secondary:{kind:"outline",effect:$,base:V("brand"),state:{hover:{scale:"up",backgroundColor:{type:"palette",value:"transparent"},borderColor:{type:"spectrum",value:"purple-10"},color:{type:"spectrum",value:"purple-10"},...x},pressed:{scale:"down",backgroundColor:{type:"palette",value:"transparent"},borderColor:{type:"spectrum",value:"purple-11"},color:{type:"spectrum",value:"purple-11"},...x}}},tertiary:{kind:"ghost",effect:k,base:N("brand"),state:{hover:{scale:"up",backgroundColor:{type:"spectrum",value:"purple-2"},borderColor:{type:"palette",value:"transparent"},color:{type:"palette",value:"brand"},...x},pressed:{scale:"down",backgroundColor:{type:"spectrum",value:"purple-4"},borderColor:{type:"palette",value:"transparent"},color:{type:"palette",value:"brand"},...x}}}},alert:{primary:{kind:"fill",effect:S,base:W("alert"),state:{hover:{scale:"up",backgroundColor:{type:"spectrum",value:"red-10"},borderColor:{type:"palette",value:"transparent"},color:{type:"palette",value:"on-color"},...x},pressed:{scale:"down",backgroundColor:{type:"spectrum",value:"red-11"},borderColor:{type:"palette",value:"transparent"},color:{type:"palette",value:"on-color"},...x}}},secondary:{kind:"outline",effect:$,base:V("alert"),state:{hover:{scale:"up",backgroundColor:{type:"palette",value:"transparent"},borderColor:{type:"spectrum",value:"red-10"},color:{type:"spectrum",value:"red-10"},...x},pressed:{scale:"down",backgroundColor:{type:"palette",value:"transparent"},borderColor:{type:"spectrum",value:"red-11"},color:{type:"spectrum",value:"red-11"},...x}}},tertiary:{kind:"ghost",effect:k,base:N("alert"),state:{hover:{scale:"up",backgroundColor:{type:"spectrum",value:"red-2"},borderColor:{type:"palette",value:"transparent"},color:{type:"palette",value:"alert"},...x},pressed:{scale:"down",backgroundColor:{type:"spectrum",value:"red-4"},borderColor:{type:"palette",value:"transparent"},color:{type:"palette",value:"alert"},...x}}}},positive:{primary:{kind:"fill",effect:S,base:W("positive"),state:{hover:{scale:"up",backgroundColor:{type:"spectrum",value:"green-10"},borderColor:{type:"palette",value:"transparent"},color:{type:"palette",value:"on-color"},...x},pressed:{scale:"down",backgroundColor:{type:"spectrum",value:"green-11"},borderColor:{type:"palette",value:"transparent"},color:{type:"palette",value:"on-color"},...x}}},secondary:{kind:"outline",effect:$,base:V("positive"),state:{hover:{scale:"up",backgroundColor:{type:"palette",value:"transparent"},borderColor:{type:"spectrum",value:"green-10"},color:{type:"spectrum",value:"green-10"},...x},pressed:{scale:"down",backgroundColor:{type:"palette",value:"transparent"},borderColor:{type:"spectrum",value:"green-11"},color:{type:"spectrum",value:"green-11"},...x}}},tertiary:{kind:"ghost",effect:k,base:N("positive"),state:{hover:{scale:"up",backgroundColor:{type:"spectrum",value:"green-2"},borderColor:{type:"palette",value:"transparent"},color:{type:"palette",value:"positive"},...x},pressed:{scale:"down",backgroundColor:{type:"spectrum",value:"green-4"},borderColor:{type:"palette",value:"transparent"},color:{type:"palette",value:"positive"},...x}}}},warning:{primary:{kind:"fill",effect:S,base:W("warning"),state:{hover:{scale:"up",backgroundColor:{type:"spectrum",value:"orange-10"},borderColor:{type:"palette",value:"transparent"},color:{type:"palette",value:"on-color"},...x},pressed:{scale:"down",backgroundColor:{type:"spectrum",value:"orange-11"},borderColor:{type:"palette",value:"transparent"},color:{type:"palette",value:"on-color"},...x}}},secondary:{kind:"outline",effect:$,base:V("warning"),state:{hover:{scale:"up",backgroundColor:{type:"palette",value:"transparent"},borderColor:{type:"spectrum",value:"orange-10"},color:{type:"spectrum",value:"orange-10"},...x},pressed:{scale:"down",backgroundColor:{type:"palette",value:"transparent"},borderColor:{type:"spectrum",value:"orange-11"},color:{type:"spectrum",value:"orange-11"},...x}}},tertiary:{kind:"ghost",effect:k,base:N("warning"),state:{hover:{scale:"up",backgroundColor:{type:"spectrum",value:"orange-2"},borderColor:{type:"palette",value:"transparent"},color:{type:"palette",value:"warning"},...x},pressed:{scale:"down",backgroundColor:{type:"spectrum",value:"orange-4"},borderColor:{type:"palette",value:"transparent"},color:{type:"palette",value:"warning"},...x}}}}}},Y="https://s.yimg.com/bw/fonts",E=["Helvetica Neue","Helvetica","Arial","sans-serif"],K=["Georgia","Times","Times New Roman","serif"],F={"centra-no2":{fallback:E,type:"sans",fontFamily:"Centra No2",isVariableFont:!1,fontSlants:void 0,fontWidths:void 0,fontWeights:[{label:"Hairline",value:50},{label:"Thin",value:100},{label:"Light",value:300},{label:"Book",value:400},{label:"Medium",value:500},{label:"Bold",value:700},{label:"ExtraBold",value:800},{label:"Black",value:900}],defaults:{fontSlant:void 0,fontWidth:void 0,fontWeight:400},declarations:[{fontStyle:"normal",fontWeight:"50",src:`url('${Y}/centra-no2-hairline.woff2') format('woff2')`},{fontStyle:"italic",fontWeight:"50",src:`url('${Y}/centra-no2-hairline-italic.woff2') format('woff2')`},{fontStyle:"normal",fontWeight:"100",src:`url('${Y}/centra-no2-thin.woff2') format('woff2')`},{fontStyle:"italic",fontWeight:"100",src:`url('${Y}/centra-no2-thin-italic.woff2') format('woff2')`},{fontStyle:"normal",fontWeight:"300",src:`url('${Y}/centra-no2-light.woff2') format('woff2')`},{fontStyle:"italic",fontWeight:"300",src:`url('${Y}/centra-no2-light-italic.woff2') format('woff2')`},{fontStyle:"normal",fontWeight:"400",src:`url('${Y}/centra-no2-book.woff2') format('woff2')`},{fontStyle:"italic",fontWeight:"400",src:`url('${Y}/centra-no2-book-italic.woff2') format('woff2')`},{fontStyle:"normal",fontWeight:"500",src:`url('${Y}/centra-no2-medium.woff2') format('woff2')`},{fontStyle:"italic",fontWeight:"500",src:`url('${Y}/centra-no2-medium-italic.woff2') format('woff2')`},{fontStyle:"normal",fontWeight:"700",src:`url('${Y}/centra-no2-bold.woff2') format('woff2')`},{fontStyle:"italic",fontWeight:"700",src:`url('${Y}/centra-no2-bold-italic.woff2') format('woff2')`},{fontStyle:"normal",fontWeight:"800",src:`url('${Y}/centra-no2-extrabold.woff2') format('woff2')`},{fontStyle:"italic",fontWeight:"800",src:`url('${Y}/centra-no2-extrabold-italic.woff2') format('woff2')`},{fontStyle:"normal",fontWeight:"900",src:`url('${Y}/centra-no2-black.woff2') format('woff2')`},{fontStyle:"italic",fontWeight:"900",src:`url('${Y}/centra-no2-black-italic.woff2') format('woff2')`}]},inter:{fallback:E,type:"sans",fontFamily:"Inter",isVariableFont:!0,fontSlants:[{label:"Italic",value:-10},{label:"None",value:0}],fontWidths:void 0,fontWeights:[{label:"Thin",value:100},{label:"Extra Light",value:200},{label:"Light",value:300},{label:"Regular",value:400},{label:"Medium",value:500},{label:"Semi Bold",value:600},{label:"Bold",value:700},{label:"Extra Bold",value:800},{label:"Black",value:900}],defaults:{fontSlant:0,fontWidth:void 0,fontWeight:400},declarations:[{fontWeight:"1 1000",src:`url('${Y}/inter-vf.woff2') format('woff2')`}]},"roboto-mono":{fallback:["ui-monospace","SFMono-Regular","Menlo","Monaco","Consolas","Liberation Mono","Courier New","monospace"],type:"mono",fontFamily:"Roboto Mono",isVariableFont:!1,fontSlants:void 0,fontWidths:void 0,fontWeights:[{label:"Thin",value:100},{label:"Light",value:300},{label:"Regular",value:400},{label:"Medium",value:500},{label:"Bold",value:700}],defaults:{fontSlant:void 0,fontWidth:void 0,fontWeight:400},declarations:[{fontStyle:"normal",fontWeight:"100",src:`url('${Y}/roboto-mono-100.woff2') format('woff2')`},{fontStyle:"italic",fontWeight:"100",src:`url('${Y}/roboto-mono-100-italic.woff2') format('woff2')`},{fontStyle:"normal",fontWeight:"300",src:`url('${Y}/roboto-mono-300.woff2') format('woff2')`},{fontStyle:"italic",fontWeight:"300",src:`url('${Y}/roboto-mono-300-italic.woff2') format('woff2')`},{fontStyle:"normal",fontWeight:"400",src:`url('${Y}/roboto-mono-400.woff2') format('woff2')`},{fontStyle:"italic",fontWeight:"400",src:`url('${Y}/roboto-mono-400-italic.woff2') format('woff2')`},{fontStyle:"normal",fontWeight:"500",src:`url('${Y}/roboto-mono-500.woff2') format('woff2')`},{fontStyle:"italic",fontWeight:"500",src:`url('${Y}/roboto-mono-500-italic.woff2') format('woff2')`},{fontStyle:"normal",fontWeight:"700",src:`url('${Y}/roboto-mono-700.woff2') format('woff2')`},{fontStyle:"italic",fontWeight:"700",src:`url('${Y}/roboto-mono-700-italic.woff2') format('woff2')`}]},"yahoo-sans":{fallback:E,type:"sans",fontFamily:"Yahoo Sans",isVariableFont:!0,fontSlants:void 0,fontWidths:void 0,fontWeights:[{label:"ExtraLight",value:200},{label:"Light",value:300},{label:"Regular",value:400},{label:"Medium",value:500},{label:"Semibold",value:585},{label:"Bold",value:700},{label:"ExtraBold",value:810},{label:"Black",value:900}],defaults:{fontSlant:void 0,fontWidth:void 0,fontWeight:400},declarations:[{fontWeight:"1 1000",src:`url('${Y}/yahoo-sans-vf.woff2') format('woff2')`}]},"yahoo-sans-cr4":{fallback:E,type:"sans",fontFamily:"Yahoo CR4 BETA VF",isVariableFont:!0,fontSlants:void 0,fontWidths:void 0,fontWeights:[{label:"Regular",value:400},{label:"Medium",value:500},{label:"Bold",value:700}],defaults:{fontSlant:void 0,fontWidth:void 0,fontWeight:450},declarations:[{fontWeight:"1 1000",src:`url('${Y}/yahoo-sans-cr4-vf.woff2') format('woff2')`}]},"yahoo-product-sans":{fallback:E,type:"sans",fontFamily:"Yahoo Product Sans VF",isVariableFont:!0,fontSlants:void 0,fontWidths:void 0,fontWeights:[{label:"Regular",value:400},{label:"Medium",value:500},{label:"Bold",value:700}],defaults:{fontSlant:void 0,fontWidth:void 0,fontWeight:450},declarations:[{fontWeight:"1 1000",src:`url('${Y}/yahoo-product-sans-vf.woff2') format('woff2-variations')`}]},"yahoo-product-sans-extended":{fallback:E,type:"sans",fontFamily:"YahooPd_Eval202412",isVariableFont:!0,fontSlants:[{label:"Italic",value:9},{label:"None",value:0}],fontWidths:[{label:"Cond",value:50},{label:"Normal",value:75},{label:"Ext",value:100}],fontWeights:[{label:"Light",value:300},{label:"Regular",value:450},{label:"Medium",value:500},{label:"Semibold",value:600},{label:"Bold",value:700},{label:"Black",value:850}],defaults:{fontSlant:0,fontWidth:75,fontWeight:450},declarations:[{fontWeight:"1 1000",src:`url('${Y}/YahooPd_Eval202412-v1.1.0.woff2') format("woff2 supports variations"), url('${Y}/YahooPd_Eval202412-v1.1.0.woff2') format('woff2-variations')`}]},"yahoo-sans-condensed":{fallback:E,type:"sans",fontFamily:"Yahoo Sans Cond",isVariableFont:!0,fontSlants:void 0,fontWidths:void 0,fontWeights:[{label:"Light",value:300},{label:"Regular",value:400},{label:"Medium",value:500},{label:"Bold",value:718},{label:"XBold",value:800},{label:"Black",value:900}],defaults:{fontSlant:void 0,fontWidth:void 0,fontWeight:400},declarations:[{fontWeight:"1 1000",src:`url('${Y}/yahoo-sans-condensed-vf.woff2') format('woff2')`}]},"yahoo-serif-display":{fallback:K,type:"serif",fontFamily:"Yahoo Serif Display",isVariableFont:!1,fontSlants:void 0,fontWidths:void 0,fontWeights:[{label:"Light",value:300},{label:"Regular",value:400},{label:"Bold",value:700},{label:"Extrabold",value:800},{label:"Black",value:900}],defaults:{fontSlant:void 0,fontWidth:void 0,fontWeight:400},declarations:[{fontStyle:"normal",fontWeight:"300",src:`url('${Y}/yahoo-serif-display-light.woff2') format('woff2')`},{fontStyle:"normal",fontWeight:"400",src:`url('${Y}/yahoo-serif-display-regular.woff2') format('woff2')`},{fontStyle:"normal",fontWeight:"700",src:`url('${Y}/yahoo-serif-display-bold.woff2') format('woff2')`},{fontStyle:"normal",fontWeight:"800",src:`url('${Y}/yahoo-serif-display-extrabold.woff2') format('woff2')`},{fontStyle:"normal",fontWeight:"900",src:`url('${Y}/yahoo-serif-display-black.woff2') format('woff2')`}]},"yahoo-serif-text":{fallback:K,type:"serif",fontFamily:"Yahoo Serif Text",isVariableFont:!1,fontSlants:void 0,fontWidths:void 0,fontWeights:[{label:"Regular",value:400},{label:"Bold",value:700}],defaults:{fontSlant:void 0,fontWidth:void 0,fontWeight:400},declarations:[{fontStyle:"normal",fontWeight:"400",src:`url('${Y}/yahoo-serif-text-regular.woff2') format('woff2')`},{fontStyle:"italic",fontWeight:"400",src:`url('${Y}/yahoo-serif-text-italic.woff2') format('woff2')`},{fontStyle:"normal",fontWeight:"700",src:`url('${Y}/yahoo-serif-text-bold.woff2') format('woff2')`},{fontStyle:"italic",fontWeight:"700",src:`url('${Y}/yahoo-serif-text-bold-italic.woff2') format('woff2')`}]}};exports.DEFAULT_COLOR_MODE="light",exports.DEFAULT_COLOR_MODE_FOR_APP="system",exports.DEFAULT_HIGH_CONTRAST_MODE=!1,exports.DEFAULT_REGION_MODE="🇺🇸 US",exports.DEFAULT_SCALE_MODE="large",exports.DEFAULT_SCALE_MODE_FOR_APP="system",exports.FONT_DECLARATIONS_MAP=F,exports.alwaysPalette={white:"#ffffff",black:"#000000",transparent:"transparent",current:"currentColor"},exports.button=O,exports.cartesianProduct=r,exports.coalesceConfigVariant=l,exports.createComponentStateConfig=function(e){return e},exports.createComponentStates=function(e){return e},exports.createConfigurableProperty=function(e){return e},exports.createLayerConfig=function(e){return e},exports.createSubComponentConfig=function(e){return e},exports.createVariantConfig=function(e){return e},exports.createVariantConfigWithComponentStates=function(e){return e},exports.createVariantConfigWithProperties=function(e){return e},exports.findFixtureType=m,exports.fontWeightMap={thin:"100",extralight:"200",light:"300",regular:"400",medium:"500",semibold:"600",bold:"700",extrabold:"800",black:"900"},exports.fromEntries=function(e){return Object.fromEntries(e)},exports.generateClassName=h,exports.generateDeclaration=g,exports.generateKeyFromFlatConfigPath=function(e){let t=e;return t=t.replaceAll(".","/"),["root/","variables/","variant/","/value"].forEach((e=>{t=t.replaceAll(e,"")})),t},exports.generateSchemaKey=a,exports.generateStyles=function(e,t,a,r){function l(e,t){return o.mergeWith({},e,t)}let n=e.label.toLowerCase();e.overrideComponentName&&(n=e.overrideComponentName.toLowerCase());let s={};for(const o in e.variants){const i=e.variants[o];for(const e of i.options)if(i.componentStates){const p=i.componentStates;for(const i in p){const f=p[i];for(const p of f.options)for(const u in f.layers){const c=f.layers[u];for(const f in c.properties){const d=c.properties[f];s=l(s,g({componentName:n,variantKey:o,variantValue:e,stateKey:i,stateValue:p,layer:u,layerOptionalPseudoSelector:c.pseudoSelector,propertyKey:f,originalPropertyDefinition:d,theme:a,schema:t,currentStyles:s,previewOptions:r}))}}}}else for(const p in i.layers){const f=i.layers[p];for(const i in f.properties){const u=f.properties[i];s=l(s,g({componentName:n,variantKey:o,variantValue:e,layer:p,layerOptionalPseudoSelector:f.pseudoSelector,propertyKey:i,originalPropertyDefinition:u,theme:a,schema:t,currentStyles:s,previewOptions:r}))}}}if(e.subComponents){const{subComponents:o}=e;for(const e in o)for(const i in o[e].variants){const p=o[e].variants[i];for(const o of p.options)if(p.componentStates){const f=p.componentStates;for(const p in f){const u=f[p];for(const f of u.options)for(const c in u.layers){const d=u.layers[c];for(const u in d.properties){const v=d.properties[u];s=l(s,g({componentName:n,variantKey:i,variantValue:o,stateKey:p,stateValue:f,subComponentName:e,layer:c,layerOptionalPseudoSelector:d.pseudoSelector,propertyKey:u,originalPropertyDefinition:v,theme:a,schema:t,currentStyles:s,previewOptions:r}))}}}}else for(const f in p.layers){const u=p.layers[f];for(const p in u.properties){const c=u.properties[p];s=l(s,g({componentName:n,subComponentName:e,variantKey:i,variantValue:o,layer:f,layerOptionalPseudoSelector:u.pseudoSelector,propertyKey:p,originalPropertyDefinition:c,theme:a,schema:t,currentStyles:s,previewOptions:r}))}}}}return s},exports.getConfigDefaultValue=n,exports.getConfigPseudoStateVariables=d,exports.getConfigPseudoStateVariablesWithSetter=function(e,t,o,a,r){return[d(e,t,o,a,r),l=>v(e,t,o,a,r,l)]},exports.getConfigSubcomponents=c,exports.getConfigVariantComponentStates=f,exports.getConfigVariantComponentStatesMatrix=function(e,t,a){const l=f(e,t,a);return l?r(o.entries(l).map((([e,t])=>t.options.map((t=>({[e]:t})))))).map((e=>Array.isArray(e)?e.reduce(((e,t)=>({...e,...t})),{}):e)):null},exports.getConfigVariantProperties=function(e){if(!e||!i(e))return null;const o=t.mapValues(e.layers,(e=>e.properties));for(const e in o){const t=o[e];t&&0!==Object.keys(t).length||delete o[e]}return 0===Object.keys(o).length?null:o},exports.getConfigVariantPseudoStates=function(e,t,o,a){const r=s(e,t,a);return r?[...i(r)?Object.entries(r?.layers??{}):[],...p(r)&&o?Object.entries(r.componentStates[o].layers??{}):[]].flatMap((([e,t])=>Object.entries(t.properties).map((([t,o])=>[e,t,o])))).flatMap((([e,t,o])=>[...u,...o.pseudoStates??[]].map((a=>[e,t,o,a])))).reduce(((e,[t,o,a,r])=>{e[r]=e[r]??[];const l=[t,o,a];return e[r].push(l),e}),{}):null},exports.getConfigVariants=function(e,t="variant"){const a=l(e,t);if("no-variants"===a.type)return{type:"no-variants",description:"No variants"};if("no-sub-components"===a.type){if(c(e))throw new Error("A config with a root variants.variant defintion cannot have subcomponents");return{type:"no-sub-components",description:a.variant.description,variantNames:[...a.variant.options]}}const r=o.entries(a.variants).reduce(((e,[t,o])=>{for(const a of o.options)e[a]??=[],e[a].includes(t)||e[a].push(t);return e}),{});return{type:"has-sub-components",description:Object.values(a.variants).map((e=>e.description)).filter((e=>e))[0]??"",variantNames:Object.keys(r),variantToSubcomponentNames:r}},exports.getDefaultButtonBaseMap=P,exports.isConfigDefaultValue=function(e,t,o,a){return n(e,t,o)===a},exports.parseButtonVariantFlat=function({palette:e="accent",variant:t="primary"}){return"accent"===e?t:"primary"===t?e:`${e}-${t}`},exports.parseDeprecatedButtonPaletteVariant=function({flatVariant:e}){if(!e)return{palette:void 0,variant:void 0};const[t,o]=e.split("-");return o?{palette:t,variant:o}:["primary","secondary","tertiary"].includes(e)?{palette:"accent",variant:e}:{palette:e,variant:"primary"}},exports.setConfigPseudoStateVariable=v,exports.shadow={drop:{none:[],xs:[{offsetX:"0",offsetY:"px",blur:"0.5",spread:"0",opacity:"5",color:{type:"palette",value:"primary"}}],sm:[{offsetX:"0",offsetY:"px",blur:"0.5",spread:"0",opacity:"10",color:{type:"palette",value:"primary"}},{offsetX:"0",offsetY:"px",blur:"1",spread:"0",opacity:"10",color:{type:"palette",value:"primary"}}],md:[{offsetX:"0",offsetY:"1",blur:"1.5",spread:"-px",opacity:"10",color:{type:"palette",value:"primary"}},{offsetX:"0",offsetY:"0.5",blur:"1",spread:"-0.5",opacity:"10",color:{type:"palette",value:"primary"}}],lg:[{offsetX:"0",offsetY:"1",blur:"1.5",spread:"-1",opacity:"10",color:{type:"palette",value:"primary"}},{offsetX:"0",offsetY:"2.5",blur:"3.5",spread:"-0.5",opacity:"10",color:{type:"palette",value:"primary"}}],xl:[{offsetX:"0",offsetY:"2",blur:"2.5",spread:"-1.5",opacity:"10",color:{type:"palette",value:"primary"}},{offsetX:"0",offsetY:"5",blur:"6",spread:"-1",opacity:"10",color:{type:"palette",value:"primary"}}],"2xl":[{offsetX:"0",offsetY:"6",blur:"12",spread:"-3",opacity:"25",color:{type:"palette",value:"primary"}}]},inset:{none:[],xs:[{offsetX:"0",offsetY:"px",blur:"0.5",spread:"0",opacity:"5",color:{type:"palette",value:"primary"}}],sm:[{offsetX:"0",offsetY:"px",blur:"0.5",spread:"0",opacity:"10",color:{type:"palette",value:"primary"}},{offsetX:"0",offsetY:"px",blur:"1",spread:"0",opacity:"10",color:{type:"palette",value:"primary"}}],md:[{offsetX:"0",offsetY:"1",blur:"1.5",spread:"-px",opacity:"10",color:{type:"palette",value:"primary"}},{offsetX:"0",offsetY:"0.5",blur:"1",spread:"-0.5",opacity:"10",color:{type:"palette",value:"primary"}}],lg:[{offsetX:"0",offsetY:"1",blur:"1.5",spread:"-1",opacity:"10",color:{type:"palette",value:"primary"}},{offsetX:"0",offsetY:"2.5",blur:"3.5",spread:"-0.5",opacity:"10",color:{type:"palette",value:"primary"}}],xl:[{offsetX:"0",offsetY:"2",blur:"2.5",spread:"-1.5",opacity:"10",color:{type:"palette",value:"primary"}},{offsetX:"0",offsetY:"5",blur:"6",spread:"-1",opacity:"10",color:{type:"palette",value:"primary"}}],"2xl":[{offsetX:"0",offsetY:"6",blur:"12",spread:"-3",opacity:"25",color:{type:"palette",value:"primary"}}],"xs-invert":[{offsetX:"0",offsetY:"px",blur:"0.5",spread:"0",opacity:"5",color:{type:"always",value:"white"}}],"sm-invert":[{offsetX:"0",offsetY:"px",blur:"0.5",spread:"0",opacity:"10",color:{type:"always",value:"white"}},{offsetX:"0",offsetY:"px",blur:"1",spread:"0",opacity:"10",color:{type:"always",value:"white"}}],"md-invert":[{offsetX:"0",offsetY:"1",blur:"1.5",spread:"-px",opacity:"10",color:{type:"always",value:"white"}},{offsetX:"0",offsetY:"0.5",blur:"1",spread:"-0.5",opacity:"10",color:{type:"always",value:"white"}}],"lg-invert":[{offsetX:"0",offsetY:"1",blur:"1.5",spread:"-1",opacity:"10",color:{type:"always",value:"white"}},{offsetX:"0",offsetY:"2.5",blur:"3.5",spread:"-0.5",opacity:"10",color:{type:"always",value:"white"}}],"xl-invert":[{offsetX:"0",offsetY:"2",blur:"2.5",spread:"-1.5",opacity:"10",color:{type:"always",value:"white"}},{offsetX:"0",offsetY:"5",blur:"6",spread:"-1",opacity:"10",color:{type:"always",value:"white"}}],"2xl-invert":[{offsetX:"0",offsetY:"6",blur:"12",spread:"-3",opacity:"25",color:{type:"always",value:"white"}}]}},exports.statePseudoMapDocsMode=b,exports.toMinimalDbConfigObject=function(e){const t={},o={};for(const t in e.variants){const a=e.variants[t];o[t]=a.default}t.defaults=o,t.variables={};for(const o in e.variants){const r=e.variants[o];for(const e of r.options)if(r.componentStates){const l=r.componentStates;for(const r in l){const n=l[r];for(const l of n.options)for(const s in n.layers){const i=n.layers[s],p=a({variantKey:o,variantValue:e,stateKey:r,stateValue:l,layer:s});t.variables[p]={};for(const o in i.properties){const a=i.properties[o],r={[o]:{rest:{type:m(a,e),valueType:"alias",value:a.defaults[e]}}};if(a.pseudoStates)for(const t of a.pseudoStates)r[o][t]={type:m(a,e),valueType:"alias",value:a.defaults[e]};t.variables[p]={...t.variables[p],...r}}}}}else for(const l in r.layers){const n=r.layers[l],s=a({variantKey:o,variantValue:e,layer:l});t.variables[s]={};for(const o in n.properties){const a=n.properties[o],r={[o]:{rest:{type:m(a,e),valueType:"alias",value:a.defaults[e]}}};if(a.pseudoStates)for(const t of a.pseudoStates)r[o][t]={type:m(a,e),valueType:"alias",value:a.defaults[e]};t.variables[s]={...t.variables[s],...r}}}}if(e.subComponents){const{subComponents:o}=e;for(const e in o)for(const r in o[e].variants){const l=o[e].variants[r];t.defaults[r]=l.default;for(const o of l.options)if(l.componentStates){const n=l.componentStates;for(const l in n){const s=n[l];for(const n of s.options)for(const i in s.layers){const p=s.layers[i],f=a({variantKey:r,variantValue:o,stateKey:l,stateValue:n,layer:i,subComponentName:e});t.variables[f]={};for(const e in p.properties){const a=p.properties[e],r={[e]:{rest:{type:m(a,o),valueType:"alias",value:a.defaults[o]}}};if(a.pseudoStates)for(const t of a.pseudoStates)r[e][t]={type:m(a,o),valueType:"alias",value:a.defaults[o]};t.variables[f]={...t.variables[f],...r}}}}}else for(const n in l.layers){const s=l.layers[n],i=a({variantKey:r,variantValue:o,layer:n,subComponentName:e});t.variables[i]={};for(const e in s.properties){const a=s.properties[e],r={[e]:{rest:{type:m(a,o),valueType:"alias",value:a.defaults[o]}}};if(a.pseudoStates)for(const t of a.pseudoStates)r[e][t]={type:m(a,o),valueType:"alias",value:a.defaults[o]};t.variables[i]={...t.variables[i],...r}}}}}return t};
|
package/dist/chunk-IVM7AINV.js
DELETED
@@ -1,2 +0,0 @@
|
|
1
|
-
import{getMotionVar as r}from"./chunk-T7G5JTDY.js";import{FONT_DECLARATIONS_MAP as t,fromEntries as a}from"./chunk-2L2IUH4B.js";import{entries as o}from"./chunk-L4PNT44K.js";import{entries as n}from"./chunk-EWJ3J526.js";import{TEXT_TRANSFORM_PREFIX as e,LINE_HEIGHT_PREFIX as s,FONT_SIZE_PREFIX as i,FONT_WIDTH_PREFIX as d,FONT_SLANT_PREFIX as c,FONT_WEIGHT_PREFIX as f,FONT_FAMILY_PREFIX as l,TEXT_RESPONSIVE_CLASSNAME as u,UDS_PREFIX as m}from"./chunk-N4FHPR6Q.js";import{textVariants as p,motionSpringConfigOptions as h}from"@yahoo/uds/fixtures";import{isString as $}from"lodash-es";import g from"tailwindcss/plugin.js";/*! © 2025 Yahoo, Inc. UDS v0.0.0-development */
|
2
|
-
var v=r=>{throw new Error("Didn't expect to get here")},w=(r,t,a,o)=>{const n=r.typography[t]?.[a];if(!n)throw new Error(`Missing typography data for variant "${t}" and key "${a}"`);const e="base"===o?n.base:n.breakpoints?.[o];if(!e)throw new Error(`Missing value for variant "${t}", key "${a}", and breakpoint "${o}"`);if($(e))return e;switch(e.type){case"px":return e.value/16+"rem";case"unitless":return String(e.value)}return v()},x=(r,t)=>t in r.font?`var(--${l}-${t})`:t,b=(r,t)=>Object.fromEntries(p.flatMap((a=>[[`--${l}-${a}`,x(r,w(r,a,"fontFamily",t))],[`--${i}-${a}`,w(r,a,"fontSize",t)],[`--${f}-${a}`,w(r,a,"fontWeight",t)],[`--${s}-${a}`,w(r,a,"lineHeight",t)],[`--${e}-${a}`,w(r,a,"textTransform",t)]]))),k=r=>Object.fromEntries(p.map((t=>[t,`var(--${r}-${t})`]))),y={fontFamily:k(l),fontWeight:k(f),fontSlant:k(c),fontWidth:k(d),fontSize:k(i),lineHeight:k(s),textTransform:k(e)},M=r=>({":root":b(r,"base")}),j=r=>{const t=o(r.breakpoints).sort((([,{value:r}],[,{value:t}])=>r-t));return{[`.${u}`]:Object.fromEntries(t.map((([t,{value:a}])=>[`@media (min-width: ${a}px)`,b(r,t)]))),".uds-text-base":b(r,"base"),...Object.fromEntries(t.map((([t])=>[`.uds-text-${t}`,b(r,t)])))}};function S(r,t){const a=F(r);for(const r of a)t({"@font-face":r})}var E=g.withOptions((function({fontIds:r}){return function({addBase:t}){S(r,t)}}));function L(r){return{light:{colorScheme:"light","--uds-light-mode-icon":"inline","--uds-dark-mode-icon":"none",...r.colorMode.light._vars},dark:{colorScheme:"dark","--uds-light-mode-icon":"none","--uds-dark-mode-icon":"inline",...r.colorMode.dark._vars}}}function F(r){return r.flatMap((r=>{const{declarations:a,fontFamily:o}=t[r];return a.map((r=>({fontFamily:o,fontDisplay:"swap",...r})))}))}function T(r){return`"${r}"`}function _(r){return a(n(r).map((([r,a])=>{const o=`--${l}-${r}`,n=t[a];return[o,[n.fontFamily,...n.fallback].map(T).join(", ")]})))}function O(t){const o=n(t).flatMap((([t,a])=>n(a).flatMap((([a,o])=>h.map((n=>[r({variant:t,speed:a,control:n}),`${o[n]}`]))))));return a(o)}function W(r){return{...r.borderRadius._vars,...r.borderWidth._vars,...r.avatarSizes._vars,...r.iconSizes._vars}}function z(r){return{xSmall:W(r.scaleMode.xSmall),small:W(r.scaleMode.small),medium:W(r.scaleMode.medium),large:W(r.scaleMode.large),xLarge:W(r.scaleMode.xLarge),xxLarge:W(r.scaleMode.xxLarge),xxxLarge:W(r.scaleMode.xxxLarge)}}function H({config:r,shadowType:t}){const o=r.shadow[t],e=n(o).map((([r])=>[`.uds-${t}-shadow-${r}`,{[`--uds-${t}-shadow`]:`var(--${m}-${t}-shadow-${r})`,boxShadow:`var(--${m}-drop-shadow, 0 0 transparent), var(--${m}-inset-shadow, 0 0 transparent), var(--tw-ring-offset-shadow, 0 0 transparent), var(--tw-ring-shadow, 0 0 transparent), var(--tw-shadow, 0 0 transparent)`}]));return a(e)}export{y as RESPONSIVE_TAILWIND_CONFIG_MAP,S as addFontFaceDeclarations,E as addFontsPlugin,v as assertUnreachable,M as getBaseTextStyles,L as getColorModeStyles,F as getFontFaceDeclarations,_ as getFontStyles,O as getMotionStyles,j as getResponsiveTextStyles,z as getScaleModeStyles,H as getShadowStyles};
|
package/dist/chunk-L4PNT44K.js
DELETED
@@ -1,2 +0,0 @@
|
|
1
|
-
import{shadowOffsetMap as e,spacingMap as t,shadowSpreadRadiusMap as s}from"@yahoo/uds/fixtures";/*! © 2025 Yahoo, Inc. UDS v0.0.0-development */
|
2
|
-
function r(e){return Object.entries(e)}var o={black:"0 0 0",white:"255 255 255"};function i({preset:r,prefix:i,shadowType:a}){const n=`--uds-${a}-shadow-`,l="palette"===r.color?.type,p="always"===r.color?.type;let u=`var(--uds-${l?"shadow":"spectrum"}-color-${r?.color?.value})`;p&&(u=o[r.color.value]);const d=`var(${n}${i?`${i}-`:""}color, ${u})`;return`${"inset"===a?"inset ":""}${[`${e[r.offsetX]}px`,`${e[r.offsetY]}px`,`${t[r.blur]}px`,`${s[r.spread]}px`].map((e=>e)).join(" ")} ${`rgb(${d} / var(${n}${i?`${i}-`:""}opacity, ${Number(r.opacity)/100}))`}`}function a({config:e,shadowType:t}){const s=e?.shadow?.[t];if(!s)return{};const o={};return r(s).forEach((([e,s])=>{if("none"===e)return void(o[`--uds-${t}-shadow-${e}`]="0 0 transparent");const r=s.map(((e,s)=>i({preset:e,prefix:s>0?`${s+1}`:void 0,shadowType:t})));o[`--uds-${t}-shadow-${e}`]=`${r.join(", ")}`})),o}var n=({componentName:e,layer:t,propertyKey:s})=>!("chip"!==e||"root"!==t||!["borderColor","borderWidth"].includes(s))||!("input"!==e||"inputWrapper"!==t||!["borderColor","borderWidth"].includes(s)),l={...{backgroundColor:{name:"backgroundColor",cssProperties:"background-color",twThemePath:(e,t)=>{if("spectrumColors"===e){const[e,s]=t.split("-");return`colors.${e}.${s}`}return"backgroundPaletteColors"===e||"alwaysPaletteAliases"===e?`backgroundColor.${t}`:"Error"},possibleFixtures:["backgroundPaletteColors","spectrumColors","alwaysPaletteAliases"]},borderWidth:{name:"borderWidth",cssProperties:"border-width",twThemePath:(e,t)=>"borderWidths"===e?`borderWidth[${t}]`:`spacing[${t}]`,possibleFixtures:["borderWidths","spacingAliases"],extendedProperties:e=>n(e)&&["outlineWidth","insetOutlineOffset","solidOutline"]},borderRadius:{name:"borderRadius",cssProperties:"border-radius",twThemePath:(e,t)=>`borderRadius.${t}`,possibleFixtures:["borderRadii"]},borderColor:{name:"borderColor",cssProperties:"border-color",twThemePath:(e,t)=>{if("alwaysPaletteAliases"===e||"linePaletteColors"===e)return`borderColor.${t}`;if("spectrumColors"===e){const[e,s]=t.split("-");return`borderColor.${e}.${s}`}return"Error"},possibleFixtures:["alwaysPaletteAliases","spectrumColors","linePaletteColors"],extendedProperties:e=>n(e)&&["outlineColor"]},fontFamily:{name:"fontFamily",cssProperties:"font-family",twThemePath:(e,t)=>`typography.fontFamily.${t}`,possibleFixtures:["textVariants"]},fontSize:{name:"fontSize",cssProperties:"font-size",twThemePath:(e,t)=>`typography.fontSize.${t}`,possibleFixtures:["textVariants"]},lineHeight:{name:"lineHeight",cssProperties:"line-height",twThemePath:(e,t)=>`typography.lineHeight.${t}`,possibleFixtures:["textVariants"]},textTransform:{name:"textTransform",cssProperties:"text-transform",twThemePath:(e,t)=>`typography.textTransform.${t}`,possibleFixtures:["textVariants"]},padding:{name:"padding",cssProperties:"padding",twThemePath:(e,t)=>`spacing[${t}]`,possibleFixtures:["spacingAliases"]},gap:{name:"gap",cssProperties:"gap",twThemePath:(e,t)=>`spacing[${t}]`,possibleFixtures:["spacingAliases"]},color:{name:"color",cssProperties:"color",twThemePath:(e,t)=>{if("alwaysPaletteAliases"===e||"foregroundPaletteColors"===e)return`textColor.${t}`;if("spectrumColors"===e){const[e,s]=t.split("-");return`textColor.${e}.${s}`}return"Error"},possibleFixtures:["alwaysPaletteAliases","spectrumColors","foregroundPaletteColors"]},fontWeight:{name:"fontWeight",cssProperties:"font-variation-settings",twThemePath:()=>"",possibleFixtures:["textVariants"],customValueRenderer:e=>{const{value:t}=e;return`"wght" var(--uds-font-weight-${t}), "slnt" var(--uds-font-slant-${t}), "wdth" var(--uds-font-width-${t});`}},iconSize:{name:"iconSize",cssProperties:["width","height"],twThemePath:(e,t)=>`sizing.icon.${t}`,possibleFixtures:["iconSizes"]},spacingHorizontal:{name:"spacingHorizontal",cssProperties:["padding-right","padding-left"],twThemePath:(e,t)=>`spacing[${t}]`,possibleFixtures:["spacingAliases"]},spacingVertical:{name:"spacingVertical",cssProperties:["padding-top","padding-bottom"],twThemePath:(e,t)=>`spacing[${t}]`,possibleFixtures:["spacingAliases"]},textVariant:{name:"textVariant",cssProperties:[],twThemePath:()=>"",possibleFixtures:["textVariants"],extendedProperties:["fontSize","fontWeight","fontFamily","lineHeight","textTransform"]},textDecorationLine:{name:"textDecorationLine",cssProperties:"text-decoration-line",possibleFixtures:["textDecorationLines"],twThemePath:()=>"",customValueRenderer:e=>String(e.value)},shadow:{name:"drop shadow",cssProperties:"box-shadow",twThemePath:()=>"",concatenate:!0,customValueRenderer:e=>{const t="drop";if("alias"===e.valueType){const s="0 0 0 transparent";if("none"===e.value)return s;if("custom"!==e.value)return`var(--uds-${t}-shadow-${e.value})`}else if("custom"===e.valueType){const s=e.value.map(((e,s)=>i({preset:e,shadowType:t,prefix:s>0?`${s+1}`:void 0})));return s?.join(", ")||"0 0 0 transparent"}throw new Error("Invalid valueType")},possibleFixtures:["shadowVariants"]},insetShadow:{name:"inset shadow",cssProperties:"box-shadow",twThemePath:()=>"",concatenate:!0,customValueRenderer:e=>{const t="inset";if("alias"===e.valueType){const s="0 0 0 transparent";if("none"===e.value)return s;if("custom"!==e.value)return`var(--uds-${t}-shadow-${e.value})`}else if("custom"===e.valueType){const s=e.value.map(((e,s)=>i({preset:e,shadowType:t,prefix:s>0?`${s+1}`:void 0})));return s?.join(", ")||"0 0 0 transparent"}throw new Error("Invalid valueType")},possibleFixtures:["shadowVariantsWithInvert"]},height:{name:"height",cssProperties:"height",twThemePath:(e,t)=>`height[${t}]`,possibleFixtures:["spacingAliases"]},width:{name:"width",cssProperties:"width",twThemePath:(e,t)=>`width[${t}]`,possibleFixtures:["spacingAliases"]}},...{outlineWidth:{name:"outlineWidth",cssProperties:"outline-width",twThemePath:(e,t)=>"borderWidths"===e?`borderWidth[${t}]`:`spacing[${t}]`,possibleFixtures:["borderWidths","spacingAliases"]},outlineColor:{name:"outlineColor",cssProperties:"outline-color",twThemePath:(e,t)=>{if("alwaysPaletteAliases"===e||"linePaletteColors"===e)return`borderColor.${t}`;if("spectrumColors"===e){const[e,s]=t.split("-");return`borderColor.${e}.${s}`}return"Error"},possibleFixtures:["alwaysPaletteAliases","spectrumColors","linePaletteColors"]},insetOutlineOffset:{name:"insetOutlineOffset",cssProperties:"outline-offset",twThemePath:()=>"",customValueRenderer:({value:e,type:t},s,r)=>`calc(-1 * ${r("borderWidths"===t?`borderWidth[${e}]`:`spacing[${e}]`)})`,possibleFixtures:["borderWidths","spacingAliases"]},solidOutline:{name:"solidOutline",cssProperties:"outline-style",twThemePath:()=>"",customValueRenderer:()=>"solid",possibleFixtures:[]}}};export{l as configurableProperties,r as entries,i as getShadowLayerValue,a as getShadowPresetValues};
|
package/dist/chunk-Q25TMUYD.cjs
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
"use strict";var e=require("./chunk-YMQMU4E2.cjs"),t=require("./chunk-FUTH4TDA.cjs"),r=require("./chunk-ZYDZ7ZC3.cjs"),n=require("./chunk-J7PUOUXC.cjs"),a=require("./chunk-4NZKRK55.cjs"),o=require("@yahoo/uds/fixtures"),s=require("lodash-es");function i(e){return e&&e.__esModule?e:{default:e}}var l=i(require("tailwindcss/plugin.js")),c=e=>{throw new Error("Didn't expect to get here")},d=(e,t,r,n)=>{const a=e.typography[t]?.[r];if(!a)throw new Error(`Missing typography data for variant "${t}" and key "${r}"`);const o="base"===n?a.base:a.breakpoints?.[n];if(!o)throw new Error(`Missing value for variant "${t}", key "${r}", and breakpoint "${n}"`);if(s.isString(o))return o;switch(o.type){case"px":return o.value/16+"rem";case"unitless":return String(o.value)}return c()},u=(e,t)=>t in e.font?`var(--${a.FONT_FAMILY_PREFIX}-${t})`:t,f=(e,t)=>Object.fromEntries(o.textVariants.flatMap((r=>[[`--${a.FONT_FAMILY_PREFIX}-${r}`,u(e,d(e,r,"fontFamily",t))],[`--${a.FONT_SIZE_PREFIX}-${r}`,d(e,r,"fontSize",t)],[`--${a.FONT_WEIGHT_PREFIX}-${r}`,d(e,r,"fontWeight",t)],[`--${a.LINE_HEIGHT_PREFIX}-${r}`,d(e,r,"lineHeight",t)],[`--${a.TEXT_TRANSFORM_PREFIX}-${r}`,d(e,r,"textTransform",t)]]))),p=e=>Object.fromEntries(o.textVariants.map((t=>[t,`var(--${e}-${t})`]))),F={fontFamily:p(a.FONT_FAMILY_PREFIX),fontWeight:p(a.FONT_WEIGHT_PREFIX),fontSlant:p(a.FONT_SLANT_PREFIX),fontWidth:p(a.FONT_WIDTH_PREFIX),fontSize:p(a.FONT_SIZE_PREFIX),lineHeight:p(a.LINE_HEIGHT_PREFIX),textTransform:p(a.TEXT_TRANSFORM_PREFIX)};/*! © 2025 Yahoo, Inc. UDS v0.0.0-development */function _(e,t){const r=h(e);for(const e of r)t({"@font-face":e})}var E=l.default.withOptions((function({fontIds:e}){return function({addBase:t}){_(e,t)}}));function h(e){return e.flatMap((e=>{const{declarations:r,fontFamily:n}=t.FONT_DECLARATIONS_MAP[e];return r.map((e=>({fontFamily:n,fontDisplay:"swap",...e})))}))}function g(e){return`"${e}"`}function m(e){return{...e.borderRadius._vars,...e.borderWidth._vars,...e.avatarSizes._vars,...e.iconSizes._vars}}exports.RESPONSIVE_TAILWIND_CONFIG_MAP=F,exports.addFontFaceDeclarations=_,exports.addFontsPlugin=E,exports.assertUnreachable=c,exports.getBaseTextStyles=e=>({":root":f(e,"base")}),exports.getColorModeStyles=function(e){return{light:{colorScheme:"light","--uds-light-mode-icon":"inline","--uds-dark-mode-icon":"none",...e.colorMode.light._vars},dark:{colorScheme:"dark","--uds-light-mode-icon":"none","--uds-dark-mode-icon":"inline",...e.colorMode.dark._vars}}},exports.getFontFaceDeclarations=h,exports.getFontStyles=function(e){return t.fromEntries(n.entries(e).map((([e,r])=>{const n=`--${a.FONT_FAMILY_PREFIX}-${e}`,o=t.FONT_DECLARATIONS_MAP[r];return[n,[o.fontFamily,...o.fallback].map(g).join(", ")]})))},exports.getMotionStyles=function(r){const a=n.entries(r).flatMap((([t,r])=>n.entries(r).flatMap((([r,n])=>o.motionSpringConfigOptions.map((a=>[e.getMotionVar({variant:t,speed:r,control:a}),`${n[a]}`]))))));return t.fromEntries(a)},exports.getResponsiveTextStyles=e=>{const t=r.entries(e.breakpoints).sort((([,{value:e}],[,{value:t}])=>e-t));return{[`.${a.TEXT_RESPONSIVE_CLASSNAME}`]:Object.fromEntries(t.map((([t,{value:r}])=>[`@media (min-width: ${r}px)`,f(e,t)]))),".uds-text-base":f(e,"base"),...Object.fromEntries(t.map((([t])=>[`.uds-text-${t}`,f(e,t)])))}},exports.getScaleModeStyles=function(e){return{xSmall:m(e.scaleMode.xSmall),small:m(e.scaleMode.small),medium:m(e.scaleMode.medium),large:m(e.scaleMode.large),xLarge:m(e.scaleMode.xLarge),xxLarge:m(e.scaleMode.xxLarge),xxxLarge:m(e.scaleMode.xxxLarge)}},exports.getShadowStyles=function({config:e,shadowType:r}){const o=e.shadow[r],s=n.entries(o).map((([e])=>[`.uds-${r}-shadow-${e}`,{[`--uds-${r}-shadow`]:`var(--${a.UDS_PREFIX}-${r}-shadow-${e})`,boxShadow:`var(--${a.UDS_PREFIX}-drop-shadow, 0 0 transparent), var(--${a.UDS_PREFIX}-inset-shadow, 0 0 transparent), var(--tw-ring-offset-shadow, 0 0 transparent), var(--tw-ring-shadow, 0 0 transparent), var(--tw-shadow, 0 0 transparent)`}]));return t.fromEntries(s)};
|
package/dist/chunk-ZYDZ7ZC3.cjs
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
"use strict";var e=require("@yahoo/uds/fixtures");/*! © 2025 Yahoo, Inc. UDS v0.0.0-development */function t(e){return Object.entries(e)}var s={black:"0 0 0",white:"255 255 255"};function r({preset:t,prefix:r,shadowType:o}){const i=`--uds-${o}-shadow-`,a="palette"===t.color?.type,n="always"===t.color?.type;let l=`var(--uds-${a?"shadow":"spectrum"}-color-${t?.color?.value})`;n&&(l=s[t.color.value]);const p=`var(${i}${r?`${r}-`:""}color, ${l})`;return`${"inset"===o?"inset ":""}${[`${e.shadowOffsetMap[t.offsetX]}px`,`${e.shadowOffsetMap[t.offsetY]}px`,`${e.spacingMap[t.blur]}px`,`${e.shadowSpreadRadiusMap[t.spread]}px`].map((e=>e)).join(" ")} ${`rgb(${p} / var(${i}${r?`${r}-`:""}opacity, ${Number(t.opacity)/100}))`}`}var o=({componentName:e,layer:t,propertyKey:s})=>!("chip"!==e||"root"!==t||!["borderColor","borderWidth"].includes(s))||!("input"!==e||"inputWrapper"!==t||!["borderColor","borderWidth"].includes(s)),i={...{backgroundColor:{name:"backgroundColor",cssProperties:"background-color",twThemePath:(e,t)=>{if("spectrumColors"===e){const[e,s]=t.split("-");return`colors.${e}.${s}`}return"backgroundPaletteColors"===e||"alwaysPaletteAliases"===e?`backgroundColor.${t}`:"Error"},possibleFixtures:["backgroundPaletteColors","spectrumColors","alwaysPaletteAliases"]},borderWidth:{name:"borderWidth",cssProperties:"border-width",twThemePath:(e,t)=>"borderWidths"===e?`borderWidth[${t}]`:`spacing[${t}]`,possibleFixtures:["borderWidths","spacingAliases"],extendedProperties:e=>o(e)&&["outlineWidth","insetOutlineOffset","solidOutline"]},borderRadius:{name:"borderRadius",cssProperties:"border-radius",twThemePath:(e,t)=>`borderRadius.${t}`,possibleFixtures:["borderRadii"]},borderColor:{name:"borderColor",cssProperties:"border-color",twThemePath:(e,t)=>{if("alwaysPaletteAliases"===e||"linePaletteColors"===e)return`borderColor.${t}`;if("spectrumColors"===e){const[e,s]=t.split("-");return`borderColor.${e}.${s}`}return"Error"},possibleFixtures:["alwaysPaletteAliases","spectrumColors","linePaletteColors"],extendedProperties:e=>o(e)&&["outlineColor"]},fontFamily:{name:"fontFamily",cssProperties:"font-family",twThemePath:(e,t)=>`typography.fontFamily.${t}`,possibleFixtures:["textVariants"]},fontSize:{name:"fontSize",cssProperties:"font-size",twThemePath:(e,t)=>`typography.fontSize.${t}`,possibleFixtures:["textVariants"]},lineHeight:{name:"lineHeight",cssProperties:"line-height",twThemePath:(e,t)=>`typography.lineHeight.${t}`,possibleFixtures:["textVariants"]},textTransform:{name:"textTransform",cssProperties:"text-transform",twThemePath:(e,t)=>`typography.textTransform.${t}`,possibleFixtures:["textVariants"]},padding:{name:"padding",cssProperties:"padding",twThemePath:(e,t)=>`spacing[${t}]`,possibleFixtures:["spacingAliases"]},gap:{name:"gap",cssProperties:"gap",twThemePath:(e,t)=>`spacing[${t}]`,possibleFixtures:["spacingAliases"]},color:{name:"color",cssProperties:"color",twThemePath:(e,t)=>{if("alwaysPaletteAliases"===e||"foregroundPaletteColors"===e)return`textColor.${t}`;if("spectrumColors"===e){const[e,s]=t.split("-");return`textColor.${e}.${s}`}return"Error"},possibleFixtures:["alwaysPaletteAliases","spectrumColors","foregroundPaletteColors"]},fontWeight:{name:"fontWeight",cssProperties:"font-variation-settings",twThemePath:()=>"",possibleFixtures:["textVariants"],customValueRenderer:e=>{const{value:t}=e;return`"wght" var(--uds-font-weight-${t}), "slnt" var(--uds-font-slant-${t}), "wdth" var(--uds-font-width-${t});`}},iconSize:{name:"iconSize",cssProperties:["width","height"],twThemePath:(e,t)=>`sizing.icon.${t}`,possibleFixtures:["iconSizes"]},spacingHorizontal:{name:"spacingHorizontal",cssProperties:["padding-right","padding-left"],twThemePath:(e,t)=>`spacing[${t}]`,possibleFixtures:["spacingAliases"]},spacingVertical:{name:"spacingVertical",cssProperties:["padding-top","padding-bottom"],twThemePath:(e,t)=>`spacing[${t}]`,possibleFixtures:["spacingAliases"]},textVariant:{name:"textVariant",cssProperties:[],twThemePath:()=>"",possibleFixtures:["textVariants"],extendedProperties:["fontSize","fontWeight","fontFamily","lineHeight","textTransform"]},textDecorationLine:{name:"textDecorationLine",cssProperties:"text-decoration-line",possibleFixtures:["textDecorationLines"],twThemePath:()=>"",customValueRenderer:e=>String(e.value)},shadow:{name:"drop shadow",cssProperties:"box-shadow",twThemePath:()=>"",concatenate:!0,customValueRenderer:e=>{const t="drop";if("alias"===e.valueType){const s="0 0 0 transparent";if("none"===e.value)return s;if("custom"!==e.value)return`var(--uds-${t}-shadow-${e.value})`}else if("custom"===e.valueType){const s=e.value.map(((e,s)=>r({preset:e,shadowType:t,prefix:s>0?`${s+1}`:void 0})));return s?.join(", ")||"0 0 0 transparent"}throw new Error("Invalid valueType")},possibleFixtures:["shadowVariants"]},insetShadow:{name:"inset shadow",cssProperties:"box-shadow",twThemePath:()=>"",concatenate:!0,customValueRenderer:e=>{const t="inset";if("alias"===e.valueType){const s="0 0 0 transparent";if("none"===e.value)return s;if("custom"!==e.value)return`var(--uds-${t}-shadow-${e.value})`}else if("custom"===e.valueType){const s=e.value.map(((e,s)=>r({preset:e,shadowType:t,prefix:s>0?`${s+1}`:void 0})));return s?.join(", ")||"0 0 0 transparent"}throw new Error("Invalid valueType")},possibleFixtures:["shadowVariantsWithInvert"]},height:{name:"height",cssProperties:"height",twThemePath:(e,t)=>`height[${t}]`,possibleFixtures:["spacingAliases"]},width:{name:"width",cssProperties:"width",twThemePath:(e,t)=>`width[${t}]`,possibleFixtures:["spacingAliases"]}},...{outlineWidth:{name:"outlineWidth",cssProperties:"outline-width",twThemePath:(e,t)=>"borderWidths"===e?`borderWidth[${t}]`:`spacing[${t}]`,possibleFixtures:["borderWidths","spacingAliases"]},outlineColor:{name:"outlineColor",cssProperties:"outline-color",twThemePath:(e,t)=>{if("alwaysPaletteAliases"===e||"linePaletteColors"===e)return`borderColor.${t}`;if("spectrumColors"===e){const[e,s]=t.split("-");return`borderColor.${e}.${s}`}return"Error"},possibleFixtures:["alwaysPaletteAliases","spectrumColors","linePaletteColors"]},insetOutlineOffset:{name:"insetOutlineOffset",cssProperties:"outline-offset",twThemePath:()=>"",customValueRenderer:({value:e,type:t},s,r)=>`calc(-1 * ${r("borderWidths"===t?`borderWidth[${e}]`:`spacing[${e}]`)})`,possibleFixtures:["borderWidths","spacingAliases"]},solidOutline:{name:"solidOutline",cssProperties:"outline-style",twThemePath:()=>"",customValueRenderer:()=>"solid",possibleFixtures:[]}}};exports.configurableProperties=i,exports.entries=t,exports.getShadowLayerValue=r,exports.getShadowPresetValues=function({config:e,shadowType:s}){const o=e?.shadow?.[s];if(!o)return{};const i={};return t(o).forEach((([e,t])=>{if("none"===e)return void(i[`--uds-${s}-shadow-${e}`]="0 0 transparent");const o=t.map(((e,t)=>r({preset:e,prefix:t>0?`${t+1}`:void 0,shadowType:s})));i[`--uds-${s}-shadow-${e}`]=`${o.join(", ")}`})),i};
|