@yamada-ui/react
Version:
React UI components of the Yamada, by the Yamada, for the Yamada built with React and Emotion
1 lines • 3.19 kB
Source Map (JSON)
{"version":3,"file":"circles.cjs","names":["withContext","Icon","styled","initialProps","superProps"],"sources":["../../../../src/components/loading/circles.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 CirclesProps 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 Circles = withContext<\"svg\", CirclesProps>(\n ({ dur = \"3s\", ...rest }) => {\n dur = isString(dur) ? parseFloat(dur) : dur\n\n return (\n <Icon stroke=\"currentColor\" viewBox=\"0 0 58 58\" {...rest}>\n <g fill=\"none\" fillRule=\"evenodd\">\n <g stroke=\"currentColor\" strokeWidth=\"1.5\" transform=\"translate(2 1)\">\n {[\n { cx: \"42.601px\", cy: \"11.462px\" },\n { animationDelay: \"0.375s\", cx: \"49.063px\", cy: \"27.063px\" },\n { animationDelay: \"0.75s\", cx: \"42.601px\", cy: \"42.663px\" },\n { animationDelay: \"1.125s\", cx: \"27px\", cy: \"49.125px\" },\n { animationDelay: \"1.5s\", cx: \"11.399px\", cy: \"42.663px\" },\n { animationDelay: \"1.875s\", cx: \"4.938px\", cy: \"27.063px\" },\n { animationDelay: \"2.25s\", cx: \"11.399px\", cy: \"11.462px\" },\n { animationDelay: \"2.625s\", cx: \"27px\", cy: \"5px\" },\n ].map((props, index) => (\n <styled.circle\n key={index}\n {...props}\n animationDuration={`${dur}s`}\n animationIterationCount=\"infinite\"\n animationTimingFunction=\"linear\"\n fill=\"currentColor\"\n fillOpacity={!index ? \"1\" : \"0\"}\n r=\"5px\"\n _keyframes={{\n \"0%, 25%, 100%\": { fillOpacity: 0 },\n \"12.5%\": { fillOpacity: 1 },\n }}\n />\n ))}\n </g>\n </g>\n </Icon>\n )\n },\n)(initialProps, superProps)\n"],"mappings":";;;;;;;;;;;;;;;;;AAeA,MAAa,UAAUA,6BACpB,EAAE,MAAM,KAAM,GAAG,WAAW;AAC3B,uDAAe,IAAI,GAAG,WAAW,IAAI,GAAG;AAExC,QACE,2CAACC;EAAK,QAAO;EAAe,SAAQ;EAAY,GAAI;YAClD,2CAAC;GAAE,MAAK;GAAO,UAAS;aACtB,2CAAC;IAAE,QAAO;IAAe,aAAY;IAAM,WAAU;cAClD;KACC;MAAE,IAAI;MAAY,IAAI;MAAY;KAClC;MAAE,gBAAgB;MAAU,IAAI;MAAY,IAAI;MAAY;KAC5D;MAAE,gBAAgB;MAAS,IAAI;MAAY,IAAI;MAAY;KAC3D;MAAE,gBAAgB;MAAU,IAAI;MAAQ,IAAI;MAAY;KACxD;MAAE,gBAAgB;MAAQ,IAAI;MAAY,IAAI;MAAY;KAC1D;MAAE,gBAAgB;MAAU,IAAI;MAAW,IAAI;MAAY;KAC3D;MAAE,gBAAgB;MAAS,IAAI;MAAY,IAAI;MAAY;KAC3D;MAAE,gBAAgB;MAAU,IAAI;MAAQ,IAAI;MAAO;KACpD,CAAC,KAAK,OAAO,UACZ,2CAACC,uBAAO;KAEN,GAAI;KACJ,mBAAmB,GAAG,IAAI;KAC1B,yBAAwB;KACxB,yBAAwB;KACxB,MAAK;KACL,aAAa,CAAC,QAAQ,MAAM;KAC5B,GAAE;KACF,YAAY;MACV,iBAAiB,EAAE,aAAa,GAAG;MACnC,SAAS,EAAE,aAAa,GAAG;MAC5B;OAXI,MAYL,CACF;KACA;IACF;GACC;EAGZ,CAACC,8BAAcC,2BAAW"}