UNPKG

@yamada-ui/react

Version:

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

1 lines 2.95 kB
{"version":3,"file":"puff.cjs","names":["withContext","Icon","styled","initialProps","superProps"],"sources":["../../../../src/components/loading/puff.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 PuffProps 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 Puff = withContext<\"svg\", PuffProps>(\n ({ dur = \"1.8s\", ...rest }) => {\n dur = isString(dur) ? parseFloat(dur) : dur\n\n return (\n <Icon stroke=\"currentColor\" viewBox=\"0 0 44 44\" {...rest}>\n <g fill=\"none\" fillRule=\"evenodd\" strokeWidth=\"2\">\n <styled.circle\n animationDuration={`${dur}s`}\n animationIterationCount=\"infinite\"\n animationTimingFunction=\"cubic-bezier(0.3, 0.61, 0.355, 1)\"\n cx=\"22px\"\n cy=\"22px\"\n r=\"1px\"\n transformBox=\"fill-box\"\n transformOrigin=\"center\"\n vectorEffect=\"non-scaling-stroke\"\n _keyframes={{\n \"0%\": { strokeOpacity: 1, transform: \"scale(1)\" },\n \"100%\": { strokeOpacity: 0, transform: \"scale(20)\" },\n }}\n />\n <styled.circle\n animationDelay=\"-0.9s\"\n animationDuration={`${dur}s`}\n animationIterationCount=\"infinite\"\n animationTimingFunction=\"cubic-bezier(0.3, 0.61, 0.355, 1)\"\n cx=\"22px\"\n cy=\"22px\"\n r=\"1px\"\n transformBox=\"fill-box\"\n transformOrigin=\"center\"\n vectorEffect=\"non-scaling-stroke\"\n _keyframes={{\n \"0%\": { strokeOpacity: 1, transform: \"scale(1)\" },\n \"100%\": { strokeOpacity: 0, transform: \"scale(20)\" },\n }}\n />\n </g>\n </Icon>\n )\n },\n)(initialProps, superProps)\n"],"mappings":";;;;;;;;;;;;;;;;;AAeA,MAAa,OAAOA,6BACjB,EAAE,MAAM,OAAQ,GAAG,WAAW;AAC7B,uDAAe,IAAI,GAAG,WAAW,IAAI,GAAG;AAExC,QACE,2CAACC;EAAK,QAAO;EAAe,SAAQ;EAAY,GAAI;YAClD,4CAAC;GAAE,MAAK;GAAO,UAAS;GAAU,aAAY;cAC5C,2CAACC,uBAAO;IACN,mBAAmB,GAAG,IAAI;IAC1B,yBAAwB;IACxB,yBAAwB;IACxB,IAAG;IACH,IAAG;IACH,GAAE;IACF,cAAa;IACb,iBAAgB;IAChB,cAAa;IACb,YAAY;KACV,MAAM;MAAE,eAAe;MAAG,WAAW;MAAY;KACjD,QAAQ;MAAE,eAAe;MAAG,WAAW;MAAa;KACrD;KACD,EACF,2CAACA,uBAAO;IACN,gBAAe;IACf,mBAAmB,GAAG,IAAI;IAC1B,yBAAwB;IACxB,yBAAwB;IACxB,IAAG;IACH,IAAG;IACH,GAAE;IACF,cAAa;IACb,iBAAgB;IAChB,cAAa;IACb,YAAY;KACV,MAAM;MAAE,eAAe;MAAG,WAAW;MAAY;KACjD,QAAQ;MAAE,eAAe;MAAG,WAAW;MAAa;KACrD;KACD;IACA;GACC;EAGZ,CAACC,8BAAcC,2BAAW"}