@yamada-ui/react
Version:
React UI components of the Yamada, by the Yamada, for the Yamada built with React and Emotion
1 lines • 7.09 kB
Source Map (JSON)
{"version":3,"file":"timeline.style.cjs","names":["defineComponentSlotStyle"],"sources":["../../../../src/components/timeline/timeline.style.ts"],"sourcesContent":["import { defineComponentSlotStyle } from \"../../core\"\n\nexport const timelineStyle = defineComponentSlotStyle({\n base: {\n connector: {\n alignSelf: \"stretch\",\n position: \"relative\",\n transitionDuration: \"moderate\",\n transitionProperty: \"common\",\n _after: {\n borderInlineStart:\n \"{separator-width} {separator-style, solid} {separator-color}\",\n display: \"block\",\n h: \"full\",\n insetBlockStart: \"calc({indicator-size} + {separator-gap})\",\n insetInlineStart:\n \"calc(({indicator-size} / 2) - ({separator-width} / 2))\",\n maxH: `calc(full - {indicator-size} - ({separator-gap} * 2))`,\n position: \"absolute\",\n },\n },\n content: {\n display: \"flex\",\n flexDirection: \"column\",\n w: \"full\",\n },\n description: {\n color: \"fg.muted\",\n },\n indicator: {\n alignItems: \"center\",\n boxSize: \"{indicator-size}\",\n color: \"{indicator-stroke}\",\n display: \"flex\",\n fontWeight: \"medium\",\n justifyContent: \"center\",\n lineHeight: \"{indicator-size}\",\n overflow: \"hidden\",\n rounded: \"{indicator-rounded}\",\n },\n item: {\n alignItems: \"flex-start\",\n display: \"flex\",\n flexShrink: \"0\",\n _last: {\n \"& [data-connector]\": {\n _after: { display: \"none\" },\n },\n },\n },\n root: {\n \"--indicator-fill\": \"transparent\",\n \"--indicator-stroke\": \"colorScheme.solid\",\n \"--separator-color\": \"colors.border\",\n display: \"flex\",\n flexDirection: \"column\",\n w: \"full\",\n },\n title: {\n alignItems: \"center\",\n display: \"flex\",\n fontWeight: \"medium\",\n gap: \"1\",\n lineHeight: \"{indicator-size}\",\n },\n },\n\n props: {\n /**\n * The alignment of the timeline.\n *\n * @default 'start'\n */\n align: {\n center: {\n content: {\n \"&:first-of-type\": { alignItems: \"flex-end\" },\n flex: \"1\",\n },\n item: {\n \"&:has(> [data-content]:first-of-type)\": {\n \"&:not(:has(> [data-content]:last-of-type))\": {\n _after: { display: \"block\", flex: \"1\" },\n },\n },\n \"&:not(:has(> [data-content]:first-of-type))\": {\n _before: { display: \"block\", flex: \"1\" },\n },\n },\n },\n end: {\n content: { alignItems: \"flex-end\" },\n },\n start: {\n content: { alignItems: \"flex-start\" },\n },\n },\n /**\n * If `true`, the timeline will be attached.\n *\n * @default false\n */\n attached: {\n true: {\n item: {\n \"--separator-gap\": \"0px\",\n },\n },\n },\n /**\n * The shape of the timeline.\n *\n * @default 'circle'\n */\n shape: {\n circle: {\n item: { \"--indicator-rounded\": \"radii.full\" },\n },\n rounded: {\n item: { \"--indicator-rounded\": \"radii.l2\" },\n },\n square: {\n item: { \"--indicator-rounded\": \"radii.0\" },\n },\n },\n },\n\n sizes: {\n base: {\n item: {\n _last: {\n \"& [data-content]\": { pb: 0 },\n },\n },\n },\n sm: {\n content: { gap: \"1\", pb: \"8\" },\n description: { fontSize: \"xs\" },\n item: { gap: \"3\" },\n root: {\n \"--indicator-size\": \"sizes.3\",\n \"--separator-gap\": \"spaces.2\",\n \"--separator-width\": \"sizes.0.5\",\n },\n title: { fontSize: \"sm\" },\n },\n md: {\n content: { gap: \"2\", pb: \"10\" },\n description: { fontSize: \"sm\" },\n item: { gap: \"4\" },\n root: {\n \"--indicator-size\": \"sizes.5\",\n \"--separator-gap\": \"spaces.2\",\n \"--separator-width\": \"sizes.1\",\n },\n title: { fontSize: \"md\" },\n },\n lg: {\n content: { gap: \"2\", pb: \"10\" },\n description: { fontSize: \"sm\" },\n item: { gap: \"4\" },\n root: {\n \"--indicator-size\": \"sizes.7\",\n \"--separator-gap\": \"spaces.2.5\",\n \"--separator-width\": \"sizes.1\",\n },\n title: { fontSize: \"md\" },\n },\n xl: {\n content: { gap: \"2\", pb: \"12\" },\n description: { fontSize: \"md\" },\n item: { gap: \"5\" },\n root: {\n \"--indicator-size\": \"sizes.8\",\n \"--separator-gap\": \"spaces.3\",\n \"--separator-width\": \"sizes.1.5\",\n },\n title: { fontSize: \"lg\" },\n },\n },\n\n defaultProps: {\n size: \"md\",\n align: \"start\",\n shape: \"circle\",\n },\n})\n\nexport type TimelineStyle = typeof timelineStyle\n"],"mappings":";;;AAEA,MAAa,gBAAgBA,wCAAyB;CACpD,MAAM;EACJ,WAAW;GACT,WAAW;GACX,UAAU;GACV,oBAAoB;GACpB,oBAAoB;GACpB,QAAQ;IACN,mBACE;IACF,SAAS;IACT,GAAG;IACH,iBAAiB;IACjB,kBACE;IACF,MAAM;IACN,UAAU;IACX;GACF;EACD,SAAS;GACP,SAAS;GACT,eAAe;GACf,GAAG;GACJ;EACD,aAAa,EACX,OAAO,YACR;EACD,WAAW;GACT,YAAY;GACZ,SAAS;GACT,OAAO;GACP,SAAS;GACT,YAAY;GACZ,gBAAgB;GAChB,YAAY;GACZ,UAAU;GACV,SAAS;GACV;EACD,MAAM;GACJ,YAAY;GACZ,SAAS;GACT,YAAY;GACZ,OAAO,EACL,sBAAsB,EACpB,QAAQ,EAAE,SAAS,QAAQ,EAC5B,EACF;GACF;EACD,MAAM;GACJ,oBAAoB;GACpB,sBAAsB;GACtB,qBAAqB;GACrB,SAAS;GACT,eAAe;GACf,GAAG;GACJ;EACD,OAAO;GACL,YAAY;GACZ,SAAS;GACT,YAAY;GACZ,KAAK;GACL,YAAY;GACb;EACF;CAED,OAAO;EAML,OAAO;GACL,QAAQ;IACN,SAAS;KACP,mBAAmB,EAAE,YAAY,YAAY;KAC7C,MAAM;KACP;IACD,MAAM;KACJ,yCAAyC,EACvC,8CAA8C,EAC5C,QAAQ;MAAE,SAAS;MAAS,MAAM;MAAK,EACxC,EACF;KACD,+CAA+C,EAC7C,SAAS;MAAE,SAAS;MAAS,MAAM;MAAK,EACzC;KACF;IACF;GACD,KAAK,EACH,SAAS,EAAE,YAAY,YAAY,EACpC;GACD,OAAO,EACL,SAAS,EAAE,YAAY,cAAc,EACtC;GACF;EAMD,UAAU,EACR,MAAM,EACJ,MAAM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