{"version":3,"file":"createTheme.cjs","sources":["../../src/themes/createTheme.ts"],"sourcesContent":["import { type CreatedBackgroundColorTheme, createBackgroundColor } from './createBackgroundColor'\nimport { type BorderProperty, type CreatedBorderTheme, createBorder } from './createBorder'\nimport {\n  type BreakpointProperty,\n  type CreatedBreakpointTheme,\n  createBreakpoint,\n} from './createBreakpoint'\nimport { type ColorProperty, type CreatedColorTheme, createColor } from './createColor'\nimport { type CreatedFontSizeTheme, type FontSizeProperty, createFontSize } from './createFontSize'\nimport {\n  type CreatedInteractionTheme,\n  type InteractionProperty,\n  createInteraction,\n} from './createInteraction'\nimport { type CreatedLeading, type LeadingProperty, createLeading } from './createLeading'\nimport {\n  type CreatedMediaQueryTheme,\n  type MediaQueryProperty,\n  createMediaQuery,\n} from './createMediaQuery'\nimport { type CreatedRadiusTheme, type RadiusProperty, createRadius } from './createRadius'\nimport { type CreatedShadowTheme, type ShadowProperty, createShadow } from './createShadow'\nimport {\n  type CreatedSpacingByCharTheme,\n  type CreatedSpacingTheme,\n  type SpacingProperty,\n  createSpacing,\n  createSpacingByChar,\n} from './createSpacing'\nimport { type CreatedTextColorTheme, createTextColor } from './createTextColor'\nimport { type CreatedZindexTheme, type ZIndexProperty, createZIndex } from './createZIndex'\n\ntype ThemeProperty = {\n  border?: BorderProperty\n  breakpoint?: BreakpointProperty\n  color?: ColorProperty\n  fontSize?: FontSizeProperty\n  interaction?: InteractionProperty\n  leading?: LeadingProperty\n  mediaQuery?: MediaQueryProperty\n  radius?: RadiusProperty\n  shadow?: ShadowProperty\n  spacing?: SpacingProperty\n  zIndex?: ZIndexProperty\n}\n\nexport type CreatedTheme = {\n  backgroundColor: CreatedBackgroundColorTheme\n  border: CreatedBorderTheme\n  breakpoint: CreatedBreakpointTheme\n  color: CreatedColorTheme\n  fontSize: CreatedFontSizeTheme\n  interaction: CreatedInteractionTheme\n  leading: CreatedLeading\n  mediaQuery: CreatedMediaQueryTheme\n  radius: CreatedRadiusTheme\n  shadow: CreatedShadowTheme\n  space: CreatedSpacingByCharTheme\n  spacing: CreatedSpacingTheme\n  spacingByChar: CreatedSpacingByCharTheme\n  textColor: CreatedTextColorTheme\n  zIndex: CreatedZindexTheme\n}\n\nexport const createTheme = (theme: ThemeProperty = {}): CreatedTheme => {\n  const colorProperty = theme.color\n  const baseSize = theme.spacing?.baseSize\n  const spacingByChar = createSpacingByChar(baseSize)\n\n  return {\n    backgroundColor: createBackgroundColor(colorProperty),\n    border: createBorder(theme.border, colorProperty),\n    breakpoint: createBreakpoint(theme.breakpoint),\n    color: createColor(colorProperty),\n    fontSize: createFontSize(theme.fontSize),\n    interaction: createInteraction(theme.interaction),\n    leading: createLeading(theme.leading),\n    mediaQuery: createMediaQuery(theme.mediaQuery),\n    radius: createRadius(theme.radius),\n    shadow: createShadow(theme.shadow, colorProperty),\n    space: spacingByChar,\n    spacing: createSpacing(baseSize),\n    spacingByChar,\n    textColor: createTextColor(colorProperty),\n    zIndex: createZIndex(theme.zIndex),\n  }\n}\n"],"names":["createSpacingByChar","createBackgroundColor","createBorder","createBreakpoint","createColor","createFontSize","createInteraction","createLeading","createMediaQuery","createRadius","createShadow","createSpacing","createTextColor","createZIndex"],"mappings":";;;;;;;;;;;;;;;;;MAgEa,WAAW,GAAG,CAAC,KAAA,GAAuB,EAAE,KAAkB;AACrE,IAAA,MAAM,aAAa,GAAG,KAAK,CAAC,KAAK;AACjC,IAAA,MAAM,QAAQ,GAAG,KAAK,CAAC,OAAO,EAAE,QAAQ;AACxC,IAAA,MAAM,aAAa,GAAGA,wCAAmB,CAAC,QAAQ,CAAC;IAEnD,OAAO;AACL,QAAA,eAAe,EAAEC,kDAAqB,CAAC,aAAa,CAAC;QACrD,MAAM,EAAEC,gCAAY,CAAC,KAAK,CAAC,MAAM,EAAE,aAAa,CAAC;AACjD,QAAA,UAAU,EAAEC,wCAAgB,CAAC,KAAK,CAAC,UAAU,CAAC;AAC9C,QAAA,KAAK,EAAEC,8BAAW,CAAC,aAAa,CAAC;AACjC,QAAA,QAAQ,EAAEC,oCAAc,CAAC,KAAK,CAAC,QAAQ,CAAC;AACxC,QAAA,WAAW,EAAEC,0CAAiB,CAAC,KAAK,CAAC,WAAW,CAAC;AACjD,QAAA,OAAO,EAAEC,kCAAa,CAAC,KAAK,CAAC,OAAO,CAAC;AACrC,QAAA,UAAU,EAAEC,wCAAgB,CAAC,KAAK,CAAC,UAAU,CAAC;AAC9C,QAAA,MAAM,EAAEC,gCAAY,CAAC,KAAK,CAAC,MAAM,CAAC;QAClC,MAAM,EAAEC,6CAAY,CAAC,KAAK,CAAC,MAAM,EAAE,aAAa,CAAC;AACjD,QAAA,KAAK,EAAE,aAAa;AACpB,QAAA,OAAO,EAAEC,kCAAa,CAAC,QAAQ,CAAC;QAChC,aAAa;AACb,QAAA,SAAS,EAAEC,sCAAe,CAAC,aAAa,CAAC;AACzC,QAAA,MAAM,EAAEC,gCAAY,CAAC,KAAK,CAAC,MAAM,CAAC;KACnC;AACH;;;;"}