@yamada-ui/react
Version:
React UI components of the Yamada, by the Yamada, for the Yamada built with React and Emotion
1 lines • 7.28 kB
Source Map (JSON)
{"version":3,"file":"calendar.style.cjs","names":["defineComponentSlotStyle","buttonStyle"],"sources":["../../../../src/components/calendar/calendar.style.ts"],"sourcesContent":["import { defineComponentSlotStyle } from \"../../core\"\nimport { buttonStyle } from \"../button\"\n\nexport const calendarStyle = defineComponentSlotStyle({\n base: {\n button: {\n ...buttonStyle.base,\n boxSize: \"{cell-size}\",\n color: \"colorScheme.outline\",\n _hover: { layerStyle: \"ghost.hover\" },\n },\n cell: {\n alignItems: \"center\",\n boxSize: \"{cell-size}\",\n display: \"inline-flex\",\n justifyContent: \"center\",\n },\n control: {\n alignItems: \"center\",\n display: \"flex\",\n gap: \"{cell-gap}\",\n gridColumn: \"span 5\",\n justifyContent: \"center\",\n },\n day: {\n ...buttonStyle.base,\n \"&[data-between]\": {\n _first: { _before: { roundedLeft: \"{cell-rounded}\" } },\n _last: { _before: { roundedRight: \"{cell-rounded}\" } },\n _notLast: {\n _before: {\n me: \"calc({cell-gap} * -1)\",\n w: \"calc({cell-size} + {cell-gap})\",\n },\n },\n },\n \"&[data-between], &[data-end]:not(:first-of-type), &[data-start]:not(:last-of-type)\":\n {\n _before: {\n layerStyle: \"ghost.hover\",\n boxSize: \"{cell-size}\",\n position: \"absolute\",\n zIndex: \"-2\",\n },\n },\n \"&[data-end]:not(:first-of-type)::before\": {\n roundedRight: \"{cell-rounded}\",\n },\n \"&[data-holiday]:not([data-selected])\": { color: \"{holiday-color}\" },\n \"&[data-outside]:not([data-selected])\": { \"& > span\": { opacity: 0.4 } },\n \"&[data-start]:not(:last-of-type)::before\": {\n me: \"calc({cell-gap} * -1)\",\n roundedLeft: \"{cell-rounded}\",\n w: \"calc({cell-size} + {cell-gap})\",\n },\n \"&[data-today]:not([data-outside], [data-selected], [data-between])\": {\n layerStyle: \"ghost.hover\",\n },\n \"&[data-weekend]:not([data-selected])\": {\n color: \"{weekend-color}\",\n },\n borderColor: \"transparent\",\n fontWeight: \"normal\",\n overflow: \"inherit\",\n rounded: \"{cell-rounded}\",\n zIndex: \"0\",\n _hover: {\n \"&:not([data-selected], [data-today], [data-between])\": {\n layerStyle: \"ghost.hover\",\n },\n },\n _selected: {\n layerStyle: \"solid\",\n _after: {\n layerStyle: \"solid\",\n boxSize: \"{cell-size}\",\n position: \"absolute\",\n rounded: \"{cell-rounded}\",\n zIndex: \"-1\",\n },\n },\n },\n month: {\n alignItems: \"stretch\",\n display: \"flex\",\n flexDirection: \"column\",\n gap: \"{cell-gap}\",\n outline: \"none\",\n },\n months: {},\n navigation: {},\n next: {},\n prev: {},\n root: {\n \"--cell-gap\": \"spaces.1\",\n \"--holiday-color\": [\"colors.red.500\", \"colors.red.400\"],\n \"--select-content-size\": \"auto\",\n \"--select-font-size\": \"{font-size}\",\n \"--select-root-size\": \"fit-content\",\n \"--weekend-color\": \"{holiday-color}\",\n alignItems: \"stretch\",\n display: \"flex\",\n flexDirection: \"column\",\n fontSize: \"{font-size}\",\n w: \"calc({cell-size} * 7 + {cell-gap} * 6)\",\n },\n row: {\n display: \"grid\",\n gap: \"{cell-gap}\",\n gridTemplateColumns: \"repeat(7, 1fr)\",\n },\n select: { minH: \"{cell-size}!\" },\n separator: { color: \"fg.muted\" },\n week: {},\n weekday: { color: \"fg.muted\", fontWeight: \"normal\" },\n weeks: {\n display: \"grid\",\n gap: \"{cell-gap}\",\n },\n years: {},\n },\n\n props: {\n /**\n * If `true`, the calendar will be fixed rows.\n *\n * @default true\n */\n fixed: {\n true: {\n weeks: {\n gridTemplateRows: \"repeat(6, 1fr)\",\n },\n },\n },\n /**\n * The shape of the cell\n *\n * @default 'circle'\n */\n shape: {\n circle: {\n root: { \"--cell-rounded\": \"radii.full\" },\n },\n rounded: {\n root: { \"--cell-rounded\": \"radii.l2\" },\n },\n square: {\n root: { \"--cell-rounded\": \"0\" },\n },\n },\n },\n\n sizes: {\n xs: {\n root: { \"--cell-size\": \"sizes.8\", \"--font-size\": \"fontSizes.xs\" },\n },\n sm: {\n root: { \"--cell-size\": \"sizes.9\", \"--font-size\": \"fontSizes.sm\" },\n },\n md: {\n root: { \"--cell-size\": \"sizes.10\", \"--font-size\": \"fontSizes.md\" },\n },\n lg: {\n root: { \"--cell-size\": \"sizes.11\", \"--font-size\": \"fontSizes.lg\" },\n },\n xl: {\n root: { \"--cell-size\": \"sizes.12\", \"--font-size\": \"fontSizes.xl\" },\n },\n \"2xl\": {\n root: { \"--cell-size\": \"sizes.14\", \"--font-size\": \"fontSizes.xl\" },\n },\n },\n\n defaultProps: {\n size: \"md\",\n fixed: true,\n shape: \"rounded\",\n },\n})\n\nexport type CalendarStyle = typeof calendarStyle\n"],"mappings":";;;;AAGA,MAAa,gBAAgBA,wCAAyB;CACpD,MAAM;EACJ,QAAQ;GACN,GAAGC,iCAAY;GACf,SAAS;GACT,OAAO;GACP,QAAQ,EAAE,YAAY,eAAe;GACtC;EACD,MAAM;GACJ,YAAY;GACZ,SAAS;GACT,SAAS;GACT,gBAAgB;GACjB;EACD,SAAS;GACP,YAAY;GACZ,SAAS;GACT,KAAK;GACL,YAAY;GACZ,gBAAgB;GACjB;EACD,KAAK;GACH,GAAGA,iCAAY;GACf,mBAAmB;IACjB,QAAQ,EAAE,SAAS,EAAE,aAAa,kBAAkB,EAAE;IACtD,OAAO,EAAE,SAAS,EAAE,cAAc,kBAAkB,EAAE;IACtD,UAAU,EACR,SAAS;KACP,IAAI;KACJ,GAAG;KACJ,EACF;IACF;GACD,sFACE,EACE,SAAS;IACP,YAAY;IACZ,SAAS;IACT,UAAU;IACV,QAAQ;IACT,EACF;GACH,2CAA2C,EACzC,cAAc,kBACf;GACD,wCAAwC,EAAE,OAAO,mBAAmB;GACpE,wCAAwC,EAAE,YAAY,EAAE,SAAS,IAAK,EAAE;GACxE,4CAA4C;IAC1C,IAAI;IACJ,aAAa;IACb,GAAG;IACJ;GACD,sEAAsE,EACpE,YAAY,eACb;GACD,wCAAwC,E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