UNPKG

@rdsaude/pulso-react-components

Version:

Biblioteca de componentes React do Pulso Design System da RD Saúde oferece componentes consistentes e de alto desempenho, alinhados com os padrões da RDSaúde. Ideal para desenvolver aplicações modernas e acessíveis.

8 lines 1.76 kB
import{a as m}from"./chunk-RYNVOGVN.js";import{a as s}from"./chunk-V5IX4U5J.js";import{a as c,b as l,c as T}from"./chunk-UABQX4UA.js";import{createContextScope as b}from"@radix-ui/react-context";import{forwardRef as D}from"react";var d=s({base:` text-text-neutral !font-rdmodern font-regular text-threeandhalfpulse leading-small truncate `,variants:{}});import{jsx as y}from"react/jsx-runtime";var f=t=>{let{children:o}=t;return y("span",{className:d(),"data-testid":"toast-description","aria-label":`${o==null?void 0:o.toString()}`,children:o})};import{useCallback as g}from"react";import{jsx as I}from"react/jsx-runtime";var x=t=>{let{symbol:o,__scopeToast:e}=t,{type:r}=u(a,e),n={success:"colorTextSuccessAlternative",informative:"colorTextInformativeAlternative",warning:"colorTextWarningAlternative",danger:"colorTextDangerAlternative",neutral:"colorTextNeutralDefault"},p=g(()=>n[r],[r]);return I(m,{symbol:o,size:"small",color:p(),"data-testid":"toast-icon"})};var P=s({base:` flex flex-row h-large min-w-[256px] max-w-[768px] items-center border-quarterpulse border-border-neutral rounded-pill px-fourpulse gap-twopulse `,variants:{type:{neutral:"bg-fill-neutral-alternative ",informative:"bg-fill-informative-alternative ",success:"bg-fill-success-alternative ",warning:"bg-fill-warning-alternative ",danger:"bg-fill-danger-alternative "}}});import{jsx as v}from"react/jsx-runtime";var a="Toast",R=D((t,o)=>{let i=t,{type:e,children:r,__scopeToast:n}=i,p=T(i,["type","children","__scopeToast"]);return v(C,l(c({type:e,scope:n},p),{children:v("div",{"data-testid":"toast-root",className:P({type:e}),ref:o,children:r})}))}),[S]=b(a),[C,u]=S(a),w={Root:R,Icon:x,Description:f};export{w as a}; //# sourceMappingURL=chunk-DX3HQZKA.js.map