{"version":3,"sources":["../../../src/styled/themed/dropdown.ts"],"sourcesContent":["import type { SystemThemeParams, SystemThemeReturnType } from '../index.types';\r\nimport { getBaseStyle, styleModeHandler } from './base';\r\nimport { buttonBaseStyle } from './button';\r\n\r\nimport { convertHexToRgbaHandler } from '@/helpers/theme';\r\n\r\n// @defaults\r\nexport const dropdownDefaults = {};\r\n\r\n// @themes\r\ntype DropdownSystemThemeParams = SystemThemeParams;\r\n\r\nexport const dropdownItemDefaultStyle = (\r\n  options: DropdownSystemThemeParams\r\n) => {\r\n  const { theme, type = 'web' } = options;\r\n\r\n  const { borderColor, color } = getBaseStyle(options);\r\n\r\n  const defaultStyle = buttonBaseStyle(options as any);\r\n\r\n  const padding = `${theme.space[3]} ${theme.space[4]}`;\r\n\r\n  const hoverBackgroundColor = styleModeHandler({\r\n    theme,\r\n    light: convertHexToRgbaHandler(theme.colors.gray[50], 0.5),\r\n    dark: convertHexToRgbaHandler(theme.colors.gray[800], 0.5),\r\n  });\r\n\r\n  const baseStyle = `\r\n    ${defaultStyle}\r\n    width: 100%;\r\n    border-bottom: 1px solid ${borderColor};\r\n    padding: ${padding};\r\n    color: ${color};\r\n\r\n    &:hover {\r\n      background-color: ${hoverBackgroundColor};\r\n    }\r\n  `;\r\n\r\n  const native = `\r\n    ${baseStyle}\r\n  `;\r\n\r\n  const web = `\r\n    ${baseStyle}\r\n  `;\r\n\r\n  const res: SystemThemeReturnType = {\r\n    native,\r\n    web,\r\n  };\r\n\r\n  return res[type];\r\n};\r\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAOO,IAAM,mBAAmB,CAAC;AAK1B,IAAM,2BAA2B,CACtC,YACG;AACH,QAAM,EAAE,OAAO,OAAO,MAAM,IAAI;AAEhC,QAAM,EAAE,aAAa,MAAM,IAAI,aAAa,OAAO;AAEnD,QAAM,eAAe,gBAAgB,OAAc;AAEnD,QAAM,UAAU,GAAG,MAAM,MAAM,CAAC,CAAC,IAAI,MAAM,MAAM,CAAC,CAAC;AAEnD,QAAM,uBAAuB,iBAAiB;AAAA,IAC5C;AAAA,IACA,OAAO,wBAAwB,MAAM,OAAO,KAAK,EAAE,GAAG,GAAG;AAAA,IACzD,MAAM,wBAAwB,MAAM,OAAO,KAAK,GAAG,GAAG,GAAG;AAAA,EAC3D,CAAC;AAED,QAAM,YAAY;AAAA,MACd,YAAY;AAAA;AAAA,+BAEa,WAAW;AAAA,eAC3B,OAAO;AAAA,aACT,KAAK;AAAA;AAAA;AAAA,0BAGQ,oBAAoB;AAAA;AAAA;AAI5C,QAAM,SAAS;AAAA,MACX,SAAS;AAAA;AAGb,QAAM,MAAM;AAAA,MACR,SAAS;AAAA;AAGb,QAAM,MAA6B;AAAA,IACjC;AAAA,IACA;AAAA,EACF;AAEA,SAAO,IAAI,IAAI;AACjB;","names":[]}