@hakit/components
Version:
A series of components to work with @hakit/core
3 lines (2 loc) • 2.56 kB
JavaScript
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../../../../../emotion-react-jsx-runtime.browser.esm-CgJouFLh.cjs"),c=require("../../../../../emotion-styled-base.browser.esm-D0rcP917.cjs"),m=require("@hakit/core");function p(){return"You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."}const u=c.createStyled("div",process.env.NODE_ENV==="production"?{target:"eih3n4n0"}:{target:"eih3n4n0",label:"StyledBigNumber"})(process.env.NODE_ENV==="production"?{name:"1nj368h",styles:"font-size:57px;line-height:1.12;letter-spacing:-0.25px;.value{display:flex;margin:0;direction:ltr;}.displayed-value{display:inline-flex;flex-direction:row;align-items:flex-end;}.addon{display:flex;flex-direction:column-reverse;padding:4px 0;height:100%;}.addon.bottom{flex-direction:column;align-items:baseline;}.addon.bottom .unit{margin-bottom:4px;margin-left:2px;}.value .decimal{font-size:0.42em;line-height:1.33;}.value .unit{font-size:0.33em;line-height:1.26;}.visually-hidden{position:absolute;overflow:hidden;clip:rect(0 0 0 0);height:1px;width:1px;margin:-1px;padding:0;border:0;}"}:{name:"1nj368h",styles:"font-size:57px;line-height:1.12;letter-spacing:-0.25px;.value{display:flex;margin:0;direction:ltr;}.displayed-value{display:inline-flex;flex-direction:row;align-items:flex-end;}.addon{display:flex;flex-direction:column-reverse;padding:4px 0;height:100%;}.addon.bottom{flex-direction:column;align-items:baseline;}.addon.bottom .unit{margin-bottom:4px;margin-left:2px;}.value .decimal{font-size:0.42em;line-height:1.33;}.value .unit{font-size:0.33em;line-height:1.26;}.visually-hidden{position:absolute;overflow:hidden;clip:rect(0 0 0 0);height:1px;width:1px;margin:-1px;padding:0;border:0;}",toString:p});function h({value:n,unit:t,unitPosition:o="top",formatOptions:s={}}){const i=m.formatNumber(n,s),[l]=i.includes(".")?i.split("."):i.split(","),a=i.replace(l,""),d=`${n}${t?`${t}`:""}`,r=o==="bottom";return e.jsx(u,{children:e.jsxs("p",{className:"value",children:[e.jsxs("span",{"aria-hidden":"true",className:"displayed-value",children:[e.jsx("span",{children:l}),e.jsxs("span",{className:`addon ${r?"bottom":""}`,children:[e.jsx("span",{className:"decimal",children:a}),e.jsx("span",{className:"unit",children:t})]})]}),e.jsx("span",{className:"visually-hidden",children:d})]})})}exports.BigNumber=h;
//# sourceMappingURL=BigNumber.js.map