{"version":3,"file":"createTextColor.cjs","sources":["../../src/themes/createTextColor.ts"],"sourcesContent":["import { darken } from 'polished'\n\nimport { merge } from '../libs/lodash'\n\nimport { type ColorProperty, defaultColor } from './createColor'\n\nexport type CreatedTextColorTheme = {\n  main: string\n  black: string\n  white: string\n  'white-darken': string\n  disabled: string\n  link: string\n  'link-darken': string\n  grey: string\n  danger: string\n  'warning-yellow': string\n  brand: string\n  green: string\n  'color-inherit': 'inherit'\n  transparent: 'transparent'\n}\n\nexport const defaultTextColor: CreatedTextColorTheme = {\n  main: defaultColor.MAIN,\n  black: defaultColor.TEXT_BLACK,\n  white: defaultColor.TEXT_WHITE,\n  'white-darken': darken(0.05, defaultColor.TEXT_WHITE),\n  disabled: defaultColor.TEXT_DISABLED,\n  link: defaultColor.TEXT_LINK,\n  'link-darken': darken(0.062, defaultColor.TEXT_LINK),\n  grey: defaultColor.TEXT_GREY,\n  danger: defaultColor.DANGER,\n  'warning-yellow': defaultColor.WARNING_YELLOW,\n  brand: defaultColor.BRAND,\n  green: '#0f7f85',\n  'color-inherit': 'inherit',\n  transparent: 'transparent',\n}\n\nexport const createTextColor = (userColor?: ColorProperty): CreatedTextColorTheme => {\n  if (!userColor) {\n    return defaultTextColor\n  }\n\n  // userColorでマージされた色パレットを取得\n  const color = merge(defaultColor, userColor)\n\n  // 更新された色からテキスト色を再生成\n  return {\n    main: color.MAIN,\n    black: color.TEXT_BLACK,\n    white: color.TEXT_WHITE,\n    'white-darken': darken(0.05, color.TEXT_WHITE),\n    disabled: color.TEXT_DISABLED,\n    link: color.TEXT_LINK,\n    'link-darken': darken(0.062, color.TEXT_LINK),\n    grey: color.TEXT_GREY,\n    danger: color.DANGER,\n    'warning-yellow': color.WARNING_YELLOW,\n    brand: color.BRAND,\n    green: '#0f7f85',\n    'color-inherit': 'inherit' as const,\n    transparent: 'transparent' as const,\n  }\n}\n"],"names":["defaultColor","darken","merge"],"mappings":";;;;;;AAuBO,MAAM,gBAAgB,GAA0B;IACrD,I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