@yamada-ui/react
Version:
React UI components of the Yamada, by the Yamada, for the Yamada built with React and Emotion
1 lines • 2.56 kB
Source Map (JSON)
{"version":3,"file":"oval.cjs","names":["withContext","Icon","styled","initialProps","superProps","varAttr"],"sources":["../../../../src/components/loading/oval.tsx"],"sourcesContent":["\"use client\"\n\nimport type { LoadingProps } from \"./loading\"\nimport { styled, varAttr } from \"../../core\"\nimport { isString } from \"../../utils\"\nimport { Icon } from \"../icon\"\nimport { initialProps, superProps, withContext } from \"./loading\"\n\nexport interface OvalProps 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 Oval = withContext<\"svg\", OvalProps>(\n ({ dur = \"1s\", secondaryColor, ...rest }) => {\n dur = isString(dur) ? parseFloat(dur) : dur\n\n return (\n <Icon stroke=\"currentColor\" viewBox=\"0 0 38 38\" {...rest}>\n <g fill=\"none\" fillRule=\"evenodd\">\n <g strokeWidth=\"2\" transform=\"translate(1 1)\">\n <styled.circle\n {...(secondaryColor\n ? { stroke: \"{secondary-color}\" }\n : { strokeOpacity: \".5\" })}\n cx=\"18px\"\n cy=\"18px\"\n r=\"18px\"\n />\n <styled.path\n animationDuration={`${dur}s`}\n animationIterationCount=\"infinite\"\n animationName=\"spin\"\n animationTimingFunction=\"linear\"\n asChild\n transformOrigin=\"18px 18px\"\n >\n <path d=\"M36 18c0-9.94-8.06-18-18-18\" />\n </styled.path>\n </g>\n </g>\n </Icon>\n )\n },\n)(initialProps, ({ secondaryColor, ...props }) => {\n const rest = superProps(props)\n\n return {\n \"--secondary-color\": varAttr(secondaryColor, \"colors\"),\n secondaryColor,\n ...rest,\n }\n})\n"],"mappings":";;;;;;;;;;;;;;;;;;AAeA,MAAa,OAAOA,6BACjB,EAAE,MAAM,MAAM,eAAgB,GAAG,WAAW;AAC3C,uDAAe,IAAI,GAAG,WAAW,IAAI,GAAG;AAExC,QACE,2CAACC;EAAK,QAAO;EAAe,SAAQ;EAAY,GAAI;YAClD,2CAAC;GAAE,MAAK;GAAO,UAAS;aACtB,4CAAC;IAAE,aAAY;IAAI,WAAU;eAC3B,2CAACC,uBAAO;KACN,GAAK,iBACD,EAAE,QAAQ,qBAAqB,GAC/B,EAAE,eAAe,MAAM;KAC3B,IAAG;KACH,IAAG;KACH,GAAE;MACF,EACF,2CAACA,uBAAO;KACN,mBAAmB,GAAG,IAAI;KAC1B,yBAAwB;KACxB,eAAc;KACd,yBAAwB;KACxB;KACA,iBAAgB;eAEhB,2CAAC,UAAK,GAAE,gCAAgC;MAC5B;KACZ;IACF;GACC;EAGZ,CAACC,+BAAe,EAAE,eAAgB,GAAG,YAAY;CAChD,MAAM,OAAOC,2BAAW,MAAM;AAE9B,QAAO;EACL,qBAAqBC,oBAAQ,gBAAgB,SAAS;EACtD;EACA,GAAG;EACJ;EACD"}