@yamada-ui/react
Version:
React UI components of the Yamada, by the Yamada, for the Yamada built with React and Emotion
154 lines (152 loc) • 4.08 kB
JavaScript
const require_config = require('../../core/system/config.cjs');
const require_button_style = require('../button/button.style.cjs');
//#region src/components/calendar/calendar.style.ts
const calendarStyle = require_config.defineComponentSlotStyle({
base: {
button: {
...require_button_style.buttonStyle.base,
boxSize: "{cell-size}",
color: "colorScheme.outline",
_hover: { layerStyle: "ghost.hover" }
},
cell: {
alignItems: "center",
boxSize: "{cell-size}",
display: "inline-flex",
justifyContent: "center"
},
control: {
alignItems: "center",
display: "flex",
gap: "{cell-gap}",
gridColumn: "span 5",
justifyContent: "center"
},
day: {
...require_button_style.buttonStyle.base,
"&[data-between]": {
_first: { _before: { roundedLeft: "{cell-rounded}" } },
_last: { _before: { roundedRight: "{cell-rounded}" } },
_notLast: { _before: {
me: "calc({cell-gap} * -1)",
w: "calc({cell-size} + {cell-gap})"
} }
},
"&[data-between], &[data-end]:not(:first-of-type), &[data-start]:not(:last-of-type)": { _before: {
layerStyle: "ghost.hover",
boxSize: "{cell-size}",
position: "absolute",
zIndex: "-2"
} },
"&[data-end]:not(:first-of-type)::before": { roundedRight: "{cell-rounded}" },
"&[data-holiday]:not([data-selected])": { color: "{holiday-color}" },
"&[data-outside]:not([data-selected])": { "& > span": { opacity: .4 } },
"&[data-start]:not(:last-of-type)::before": {
me: "calc({cell-gap} * -1)",
roundedLeft: "{cell-rounded}",
w: "calc({cell-size} + {cell-gap})"
},
"&[data-today]:not([data-outside], [data-selected], [data-between])": { layerStyle: "ghost.hover" },
"&[data-weekend]:not([data-selected])": { color: "{weekend-color}" },
borderColor: "transparent",
fontWeight: "normal",
overflow: "inherit",
rounded: "{cell-rounded}",
zIndex: "0",
_hover: { "&:not([data-selected], [data-today], [data-between])": { layerStyle: "ghost.hover" } },
_selected: {
layerStyle: "solid",
_after: {
layerStyle: "solid",
boxSize: "{cell-size}",
position: "absolute",
rounded: "{cell-rounded}",
zIndex: "-1"
}
}
},
month: {
alignItems: "stretch",
display: "flex",
flexDirection: "column",
gap: "{cell-gap}",
outline: "none"
},
months: {},
navigation: {},
next: {},
prev: {},
root: {
"--cell-gap": "spaces.1",
"--holiday-color": ["colors.red.500", "colors.red.400"],
"--select-content-size": "auto",
"--select-font-size": "{font-size}",
"--select-root-size": "fit-content",
"--weekend-color": "{holiday-color}",
alignItems: "stretch",
display: "flex",
flexDirection: "column",
fontSize: "{font-size}",
w: "calc({cell-size} * 7 + {cell-gap} * 6)"
},
row: {
display: "grid",
gap: "{cell-gap}",
gridTemplateColumns: "repeat(7, 1fr)"
},
select: { minH: "{cell-size}!" },
separator: { color: "fg.muted" },
week: {},
weekday: {
color: "fg.muted",
fontWeight: "normal"
},
weeks: {
display: "grid",
gap: "{cell-gap}"
},
years: {}
},
props: {
fixed: { true: { weeks: { gridTemplateRows: "repeat(6, 1fr)" } } },
shape: {
circle: { root: { "--cell-rounded": "radii.full" } },
rounded: { root: { "--cell-rounded": "radii.l2" } },
square: { root: { "--cell-rounded": "0" } }
}
},
sizes: {
xs: { root: {
"--cell-size": "sizes.8",
"--font-size": "fontSizes.xs"
} },
sm: { root: {
"--cell-size": "sizes.9",
"--font-size": "fontSizes.sm"
} },
md: { root: {
"--cell-size": "sizes.10",
"--font-size": "fontSizes.md"
} },
lg: { root: {
"--cell-size": "sizes.11",
"--font-size": "fontSizes.lg"
} },
xl: { root: {
"--cell-size": "sizes.12",
"--font-size": "fontSizes.xl"
} },
"2xl": { root: {
"--cell-size": "sizes.14",
"--font-size": "fontSizes.xl"
} }
},
defaultProps: {
size: "md",
fixed: true,
shape: "rounded"
}
});
//#endregion
exports.calendarStyle = calendarStyle;
//# sourceMappingURL=calendar.style.cjs.map