{"version":3,"file":"createBackgroundColor.cjs","sources":["../../src/themes/createBackgroundColor.ts"],"sourcesContent":["import { darken } from 'polished'\n\nimport { merge } from '../libs/lodash'\n\nimport { type ColorProperty, defaultColor } from './createColor'\n\nexport type CreatedBackgroundColorTheme = {\n  black: string\n  white: string\n  'white-darken': string\n  background: string\n  border: string\n  brand: string\n  column: string\n  'column-darken': string\n  'base-grey': string\n  'over-background': string\n  head: string\n  'head-darken': string\n  'action-background': string\n  main: string\n  'main-darken': string\n  danger: string\n  'danger-darken': string\n  'warning-yellow': string\n  'warning-yellow-darken': string\n  overlay: string\n  scrim: string\n  green: string\n  grey: {\n    9: string\n    '9-darken': string\n  }\n  inherit: 'inherit'\n  transparent: 'transparent'\n}\n\nexport const defaultBackgroundColor: CreatedBackgroundColorTheme = {\n  black: defaultColor.GREY_100,\n  white: defaultColor.WHITE,\n  'white-darken': darken(0.05, defaultColor.WHITE),\n  background: defaultColor.BACKGROUND,\n  border: defaultColor.GREY_20,\n  brand: defaultColor.BRAND,\n  column: defaultColor.COLUMN,\n  'column-darken': darken(0.05, defaultColor.COLUMN),\n  'base-grey': defaultColor.BASE_GREY,\n  'over-background': defaultColor.OVER_BACKGROUND,\n  head: defaultColor.HEAD,\n  'head-darken': darken(0.05, defaultColor.HEAD),\n  'action-background': defaultColor.ACTION_BACKGROUND,\n  main: defaultColor.MAIN,\n  'main-darken': darken(0.05, defaultColor.MAIN),\n  danger: defaultColor.DANGER,\n  'danger-darken': darken(0.05, defaultColor.DANGER),\n  'warning-yellow': defaultColor.WARNING_YELLOW,\n  'warning-yellow-darken': darken(0.05, defaultColor.WARNING_YELLOW),\n  overlay: defaultColor.OVERLAY,\n  scrim: defaultColor.SCRIM,\n  green: '#0f7f85',\n  grey: {\n    9: defaultColor.GREY_9,\n    '9-darken': darken(0.05, defaultColor.GREY_9),\n  },\n  inherit: 'inherit',\n  transparent: 'transparent',\n}\n\nexport const createBackgroundColor = (userColor?: ColorProperty): CreatedBackgroundColorTheme => {\n  if (!userColor) {\n    return defaultBackgroundColor\n  }\n\n  // userColorでマージされた色パレットを取得し、背景色を再生成\n  const color = merge(defaultColor, userColor)\n\n  return {\n    black: color.GREY_100,\n    white: color.WHITE,\n    'white-darken': darken(0.05, color.WHITE),\n    background: color.BACKGROUND,\n    border: color.GREY_20,\n    brand: color.BRAND,\n    column: color.COLUMN,\n    'column-darken': darken(0.05, color.COLUMN),\n    'base-grey': color.BASE_GREY,\n    'over-background': color.OVER_BACKGROUND,\n    head: color.HEAD,\n    'head-darken': darken(0.05, color.HEAD),\n    'action-background': color.ACTION_BACKGROUND,\n    main: color.MAIN,\n    'main-darken': darken(0.05, color.MAIN),\n    danger: color.DANGER,\n    'danger-darken': darken(0.05, color.DANGER),\n    'warning-yellow': color.WARNING_YELLOW,\n    'warning-yellow-darken': darken(0.05, color.WARNING_YELLOW),\n    overlay: color.OVERLAY,\n    scrim: color.SCRIM,\n    green: '#0f7f85',\n    grey: {\n      9: color.GREY_9,\n      '9-darken': darken(0.05, color.GREY_9),\n    },\n    inherit: 'inherit' as const,\n    transparent: 'transparent' as const,\n  }\n}\n"],"names":["defaultColor","darken","merge"],"mappings":";;;;;;AAqCO,MAAM,sBAAsB,GAAgC;IACjE,KAAK,EAAEA,+BAAY,CAAC,QAAQ;IAC5B,KAAK,EAAEA,+BAAY,CAAC,KAAK;IACzB,cAAc,EAAEC,mBAAM,CAAC,IAAI,EAAED,+BAAY,CAAC,KAAK,CAAC;IAChD,UAAU,EAAEA,+BAAY,CAAC,UAAU;IACnC,MAAM,EAAEA,+BAAY,CAAC,OAAO;IAC5B,KAAK,EAAEA,+BAAY,CAAC,KAAK;IACzB,MAAM,EAAEA,+BAAY,CAAC,MAAM;IAC3B,eAAe,EAAEC,mBAAM,CAAC,IAAI,EAAED,+BAAY,CAAC,MAAM,CAAC;IAClD,WAAW,EAAEA,+BAAY,CAAC,SAAS;IACnC,iBAAiB,EAAEA,+BAAY,CAAC,eAAe;IAC/C,IAAI,EAAEA,+B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