UNPKG

fui-fancyui

Version:
58 lines (51 loc) 1.72 kB
import { css as c, styled as d } from "styled-components"; import { disabledStyle as i } from "../../../design/designFunctions/disabledStyle/disableStyle.js"; import { getTextColor as l } from "../../../design/designFunctions/colorCalculatorForComponent/colorCalculatorForComponent.js"; const p = d.button` cursor: pointer; box-sizing: border-box; justify-content: center; align-items: center; border-radius: ${({ theme: o }) => o.borderRadius.complete}; color: ${({ $isCurrentDay: o, theme: r, $themeType: t = "secondary", $layer: e }) => o ? r.color.accent[0] : l({ $themeType: t, $textLayer: e, theme: r })}; border: ${({ $selected: o, theme: r }) => o ? `1px solid ${r.color.accent[0]}` : "none"}; background-color: transparent; padding: 0; min-height: 24px; aspect-ratio: 1/1; max-width: 40px; position: relative; overflow: hidden; display: flex; align-items: center; justify-content: center; &:before { content: ''; display: block; padding-top: 100%; } &:hover, &:active { border: 1px solid ${({ theme: o }) => o.color.accent[0]}; } ${({ $range: o, theme: r }) => (o == null ? void 0 : o.start) && c` border-radius: 40% 5px 5px 40%; background-color: ${r.color.accent[0]}; color: ${r.color.secondary[0]}; `} ${({ $range: o, theme: r }) => (o == null ? void 0 : o.inRange) && c` background-color: ${r.color.accent[0]}; color: ${r.color.secondary[0]}; `} ${({ $range: o, theme: r }) => (o == null ? void 0 : o.end) && c` border-radius: 5px 40% 40% 5px; background-color: ${r.color.accent[0]}; color: ${r.color.secondary[0]}; `} &:disabled { ${i} } `; export { p as StyledDay };