UNPKG

@yamada-ui/react

Version:

React UI components of the Yamada, by the Yamada, for the Yamada built with React and Emotion

1 lines 5.43 kB
{"version":3,"file":"circle-progress.style.cjs","names":["defineComponentSlotStyle"],"sources":["../../../../src/components/circle-progress/circle-progress.style.ts"],"sourcesContent":["import { defineComponentSlotStyle } from \"../../core\"\n\nexport const circleProgressStyle = defineComponentSlotStyle({\n base: {\n circle: {\n \"--c\": \"calc(2 * 3.14159 * {r})\",\n \"--cx\": \"calc({size} / 2)\",\n \"--cy\": \"calc({size} / 2)\",\n \"--r\": \"calc({size} / 2 - {thickness} / 2)\",\n boxSize: \"{size}\",\n _indeterminate: {\n animationDuration: \"2s\",\n animationIterationCount: \"infinite\",\n animationName: \"spin\",\n animationTimingFunction: \"linear\",\n },\n },\n label: {\n fontWeight: \"medium\",\n left: \"50%\",\n letterSpacing: \"tight\",\n lineHeight: \"1\",\n position: \"absolute\",\n textAlign: \"center\",\n top: \"50%\",\n transform: \"translate(-50%, -50%)\",\n },\n range: {\n cx: \"{cx}\",\n cy: \"{cy}\",\n fill: \"transparent\",\n r: \"{r}\",\n strokeDasharray: \"{c}\",\n strokeDashoffset: \"calc({c} * ((100 - {percent}) / 100))\",\n strokeWidth: \"{thickness}\",\n transform: \"rotate(-90deg)\",\n transformOrigin: \"center center\",\n transitionDuration: \"slow\",\n transitionProperty: \"stroke-dashoffset, stroke-dasharray\",\n _indeterminate: {\n animationDuration: \"{duration, 1.5s}\",\n animationIterationCount: \"infinite\",\n animationTimingFunction: \"linear\",\n _keyframes: {\n \"0%\": {\n strokeDasharray: \"1, 400\",\n strokeDashoffset: \"0\",\n },\n \"50%\": {\n strokeDasharray: \"400, 400\",\n strokeDashoffset: \"-100%\",\n },\n \"100%\": {\n strokeDasharray: \"400, 400\",\n strokeDashoffset: \"-260%\",\n },\n },\n },\n },\n root: {\n display: \"inline-flex\",\n position: \"relative\",\n },\n track: {\n cx: \"{cx}\",\n cy: \"{cy}\",\n fill: \"transparent\",\n r: \"{r}\",\n strokeWidth: \"{thickness}\",\n },\n },\n\n props: {\n /**\n * The shape of the progress bar.\n *\n * @default 'rounded'\n */\n shape: {\n rounded: {\n range: {\n strokeLinecap: \"round\",\n _indeterminate: { strokeLinecap: \"butt\" },\n },\n },\n square: {\n range: { strokeLinecap: \"butt\" },\n },\n },\n },\n\n variants: {\n outline: {\n range: {\n stroke: \"colorScheme.solid\",\n },\n track: {\n stroke: \"bg.subtle\",\n },\n },\n subtle: {\n range: {\n stroke: \"colorScheme.solid/80\",\n },\n track: {\n stroke: [\"colorScheme.muted\", \"colorScheme.subtle\"],\n },\n },\n },\n\n sizes: {\n xs: {\n label: { fontSize: \"2xs\" },\n root: {\n \"--size\": \"{sizes.6}\",\n \"--thickness\": \"{sizes.1}\",\n },\n },\n sm: {\n label: { fontSize: \"2xs\" },\n root: {\n \"--size\": \"{sizes.8}\",\n \"--thickness\": \"{sizes.1.5}\",\n },\n },\n md: {\n label: { fontSize: \"2xs\" },\n root: {\n \"--size\": \"{sizes.10}\",\n \"--thickness\": \"{sizes.1.5}\",\n },\n },\n lg: {\n label: { fontSize: \"xs\" },\n root: {\n \"--size\": \"{sizes.12}\",\n \"--thickness\": \"{sizes.2}\",\n },\n },\n xl: {\n label: { fontSize: \"sm\" },\n root: {\n \"--size\": \"{sizes.14}\",\n \"--thickness\": \"{sizes.2}\",\n },\n },\n },\n\n defaultProps: {\n size: \"md\",\n variant: \"outline\",\n shape: \"rounded\",\n },\n})\n\nexport type CircleProgressStyle = typeof circleProgressStyle\n"],"mappings":";;;AAEA,MAAa,sBAAsBA,wCAAyB;CAC1D,MAAM;EACJ,QAAQ;GACN,OAAO;GACP,QAAQ;GACR,QAAQ;GACR,OAAO;GACP,SAAS;GACT,gBAAgB;IACd,mBAAmB;IACnB,yBAAyB;IACzB,eAAe;IACf,yBAAyB;IAC1B;GACF;EACD,OAAO;GACL,YAAY;GACZ,MAAM;GACN,eAAe;GACf,YAAY;GACZ,UAAU;GACV,WAAW;GACX,KAAK;GAC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