@yamada-ui/react
Version:
React UI components of the Yamada, by the Yamada, for the Yamada built with React and Emotion
1 lines • 4.35 kB
Source Map (JSON)
{"version":3,"file":"progress.style.cjs","names":["defineComponentSlotStyle"],"sources":["../../../../src/components/progress/progress.style.ts"],"sourcesContent":["import { defineComponentSlotStyle } from \"../../core\"\n\nexport const progressStyle = defineComponentSlotStyle({\n base: {\n range: {\n bgColor: \"{filledTrackColor}\",\n h: \"full\",\n rounded: \"inherit\",\n transitionDuration: \"slow\",\n transitionProperty: \"size\",\n w: \"{width}\",\n _indeterminate: {\n \"--animation-from-x\": \"-40%\",\n \"--animation-to-x\": \"100%\",\n animationDuration: \"{duration, 1s}\",\n animationIterationCount: \"infinite\",\n animationName: \"position\",\n animationTimingFunction: \"ease\",\n minW: \"50%\",\n position: \"absolute\",\n willChange: \"left\",\n },\n },\n root: {\n overflow: \"hidden\",\n position: \"relative\",\n w: \"full\",\n },\n },\n\n props: {\n /**\n * If `true`, the progress bar will animate.\n *\n * @default false\n */\n animated: {\n true: {\n range: {\n \"--animation-from\": \"{stripe-size}\",\n animationDuration: \"{duration, 1s}\",\n animationIterationCount: \"infinite\",\n animationName: \"bg-position\",\n animationTimingFunction: \"linear\",\n },\n },\n },\n /**\n * The shape of the progress bar.\n *\n * @default 'rounded'\n */\n shape: {\n circle: {\n root: { rounded: \"full\" },\n },\n rounded: {\n root: { rounded: \"l1\" },\n },\n square: {\n root: { rounded: \"0\" },\n },\n },\n /**\n * If `true`, the progress bar will show stripe.\n *\n * @default false\n */\n striped: {\n true: {\n range: {\n \"--stripe-angle\": \"45deg\",\n \"--stripe-color\": [\"rgba(255, 255, 255, 0.3)\", \"rgba(0, 0, 0, 0.3)\"],\n \"--stripe-size\": \"1rem\",\n bgImage: `linear-gradient(\n {stripe-angle},\n {stripe-color} 25%,\n transparent 25%,\n transparent 50%,\n {stripe-color} 50%,\n {stripe-color} 75%,\n transparent 75%,\n transparent\n )`,\n bgSize: \"{stripe-size} {stripe-size}\",\n },\n },\n },\n },\n\n variants: {\n outline: {\n range: {\n bg: \"colorScheme.solid\",\n },\n root: {\n bg: \"bg.subtle\",\n },\n },\n subtle: {\n range: {\n bg: \"colorScheme.solid/80\",\n },\n root: {\n bg: [\"colorScheme.muted\", \"colorScheme.subtle\"],\n },\n },\n },\n\n sizes: {\n xs: {\n root: { h: \"1\" },\n },\n sm: {\n root: { h: \"2\" },\n },\n md: {\n root: { h: \"3\" },\n },\n lg: {\n root: { h: \"4\" },\n },\n xl: {\n root: { h: \"5\" },\n },\n },\n\n defaultProps: {\n size: \"md\",\n variant: \"outline\",\n shape: \"rounded\",\n striped: false,\n },\n})\n\nexport type ProgressStyle = typeof progressStyle\n"],"mappings":";;;AAEA,MAAa,gBAAgBA,wCAAyB;CACpD,MAAM;EACJ,OAAO;GACL,SAAS;GACT,GAAG;GACH,SAAS;GACT,oBAAoB;GACpB,oBAAoB;GACpB,GAAG;GACH,gBAAgB;IACd,sBAAsB;IACtB,oBAAoB;IACpB,mBAAmB;IACnB,yBAAyB;IACzB,eAAe;IACf,yBAAyB;IACzB,MAAM;IACN,UAAU;IACV,YAAY;IACb;GACF;EACD,MAAM;GACJ,UAAU;GACV,UAAU;GACV,GAAG;GACJ;EACF;CAED,OAAO;EAML,UAAU,EACR,MAAM,EACJ,OAAO;GACL,oBAAoB;GACpB,mBAAmB;GACnB,yBAAyB;GACzB,eAAe;GACf,yBAAyB;GAC1B,EACF,EACF;EAMD,OAAO;GACL,QAAQ,EACN,MAAM,EAAE,SAAS,QAAQ,EAC1B;GACD,SAAS,EACP,MAAM,EAAE,SAAS,MAAM,EACxB;GACD,QAAQ,EACN,MAAM,EAAE,SAAS,KAAK,EACvB;GACF;EAMD,SAAS,EACP,MAAM,EACJ,OAAO;GACL,kBAAkB;GAClB,kBAAkB,CAAC,4BAA4B,qBAAqB;GACpE,iBAAiB;GACjB,SAAS;;;;;;;;;;GAUT,QAAQ;GACT,EACF,EACF;EACF;CAED,UAAU;EACR,SAAS;GACP,OAAO,E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