@yamada-ui/react
Version:
React UI components of the Yamada, by the Yamada, for the Yamada built with React and Emotion
1 lines • 4.51 kB
Source Map (JSON)
{"version":3,"file":"rings.cjs","names":["withContext","Icon","styled","initialProps","superProps"],"sources":["../../../../src/components/loading/rings.tsx"],"sourcesContent":["\"use client\"\n\nimport type { LoadingProps } from \"./loading\"\nimport { styled } from \"../../core\"\nimport { isString } from \"../../utils\"\nimport { Icon } from \"../icon\"\nimport { initialProps, superProps, withContext } from \"./loading\"\n\nexport interface RingsProps extends LoadingProps {}\n\n/**\n * `Loading` is a component displayed during waiting times, such as when data is being loaded.\n *\n * @see https://yamada-ui.com/docs/components/feedback/loading\n */\nexport const Rings = withContext<\"svg\", RingsProps>(\n ({ dur = \"3s\", ...rest }) => {\n dur = isString(dur) ? parseFloat(dur) : dur\n\n return (\n <Icon stroke=\"currentColor\" viewBox=\"0 0 45 45\" {...rest}>\n <g\n fill=\"none\"\n fillRule=\"evenodd\"\n strokeWidth=\"2\"\n transform=\"translate(1 1)\"\n >\n <styled.circle\n animationDelay=\"1.5s\"\n animationDuration={`${dur}s`}\n animationIterationCount=\"infinite\"\n animationTimingFunction=\"linear\"\n cx=\"22px\"\n cy=\"22px\"\n r=\"6px\"\n strokeOpacity=\"0\"\n transformBox=\"fill-box\"\n transformOrigin=\"center\"\n _keyframes={{\n \"0%\": {\n strokeOpacity: \"1\",\n strokeWidth: \"2\",\n transform: \"scale(1)\",\n },\n \"100%\": {\n strokeOpacity: \"0\",\n strokeWidth: \"0\",\n transform: \"scale(calc(22 / 6))\",\n },\n }}\n />\n <styled.circle\n animationDelay=\"3s\"\n animationDuration={`${dur}s`}\n animationIterationCount=\"infinite\"\n animationTimingFunction=\"linear\"\n cx=\"22px\"\n cy=\"22px\"\n r=\"6px\"\n strokeOpacity=\"0\"\n transformBox=\"fill-box\"\n transformOrigin=\"center\"\n _keyframes={{\n \"0%\": {\n strokeOpacity: \"1\",\n strokeWidth: \"2\",\n transform: \"scale(1)\",\n },\n \"100%\": {\n strokeOpacity: \"0\",\n strokeWidth: \"0\",\n transform: \"scale(calc(22 / 6))\",\n },\n }}\n />\n <styled.circle\n animationDuration={`${dur / 2}s`}\n animationIterationCount=\"infinite\"\n animationTimingFunction=\"linear\"\n cx=\"22px\"\n cy=\"22px\"\n r=\"8px\"\n transformBox=\"fill-box\"\n transformOrigin=\"center\"\n _keyframes={{\n \"0%, 100%\": { transform: \"scale(calc(6 / 8))\" },\n \"16.7%\": { transform: \"scale(calc(1 / 8))\" },\n \"33.3%\": { transform: \"scale(calc(2 / 8))\" },\n \"50%\": { transform: \"scale(calc(3 / 8))\" },\n \"66.7%\": { transform: \"scale(calc(4 / 8))\" },\n \"83.3%\": { transform: \"scale(calc(5 / 8))\" },\n }}\n />\n </g>\n </Icon>\n )\n },\n)(initialProps, superProps)\n"],"mappings":";;;;;;;;;;;;;;;;;AAeA,MAAa,QAAQA,6BAClB,EAAE,MAAM,KAAM,GAAG,WAAW;AAC3B,uDAAe,IAAI,GAAG,WAAW,IAAI,GAAG;AAExC,QACE,2CAACC;EAAK,QAAO;EAAe,SAAQ;EAAY,GAAI;YAClD,4CAAC;GACC,MAAK;GACL,UAAS;GACT,aAAY;GACZ,WAAU;;IAEV,2CAACC,uBAAO;KACN,gBAAe;KACf,mBAAmB,GAAG,IAAI;KAC1B,yBAAwB;KACxB,yBAAwB;KACxB,IAAG;KACH,IAAG;KACH,GAAE;KACF,eAAc;KACd,cAAa;KACb,iBAAgB;KAChB,YAAY;MACV,MAAM;OACJ,eAAe;OACf,aAAa;OACb,WAAW;OACZ;MACD,QAAQ;OACN,eAAe;OACf,aAAa;OACb,WAAW;OACZ;MACF;MACD;IACF,2CAACA,uBAAO;KACN,gBAAe;KACf,mBAAmB,GAAG,IAAI;KAC1B,yBAAwB;KACxB,yBAAwB;KACxB,IAAG;KACH,IAAG;KACH,GAAE;KACF,eAAc;KACd,cAAa;KACb,iBAAgB;KAChB,YAAY;MACV,MAAM;OACJ,eAAe;OACf,aAAa;OACb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