@rdsaude/pulso-react-components
Advanced tools
Comparing version 1.0.0 to 1.1.0
import * as react_jsx_runtime from 'react/jsx-runtime'; | ||
import * as react from 'react'; | ||
import { InputHTMLAttributes } from 'react'; | ||
import { TThemes, TPulsoTokens } from '@raiadrogasil/pulso-design-tokens'; | ||
@@ -8,2 +9,3 @@ import { IconName } from '@raiadrogasil/pulso-icons'; | ||
import * as tailwind_variants_dist_config_js from 'tailwind-variants/dist/config.js'; | ||
import { Scope } from '@radix-ui/react-context'; | ||
@@ -96,2 +98,5 @@ type TThemeContextData = { | ||
}[]; | ||
'--tw-ring-inset': { | ||
ring: string[]; | ||
}[]; | ||
}; | ||
@@ -216,2 +221,87 @@ }; | ||
export { Button, type ButtonProps, Icon, Refresh, type TIconProps, type TRefreshProps, ThemeContext, ThemeProvider }; | ||
/** | ||
* Representa as props para o componente InputText. | ||
*/ | ||
interface InputTextProps extends Pick<InputHTMLAttributes<HTMLInputElement>, 'disabled' | 'readOnly' | 'children'> { | ||
/** | ||
* Se o input tem um error. | ||
*/ | ||
hasError?: boolean; | ||
/** | ||
* Variante do tamanho do input | ||
*/ | ||
size?: 'md' | 'ml' | 'lg' | 'xl'; | ||
} | ||
/** | ||
* Representa as props para o componente InputText.Label. | ||
*/ | ||
interface InputTextLabelProps extends Omit<React.LabelHTMLAttributes<HTMLLabelElement>, 'className' | 'aria-disable'> { | ||
/** | ||
* Elementos filho a ser renderizado dentro do componente. | ||
*/ | ||
children?: React.ReactNode; | ||
} | ||
/** | ||
* Representa as props para o componente InputText.Field. | ||
*/ | ||
interface InputTextFieldProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'size' | 'disabled' | 'readOnly' | 'className'> { | ||
} | ||
/** | ||
* Representa as props para o componente InputText.HelperText. | ||
*/ | ||
interface InputTextHelperTextProps extends Omit<React.HTMLProps<HTMLDivElement>, 'className'> { | ||
/** | ||
* Se o componente deve renderizar o icone. | ||
*/ | ||
withIcon?: boolean; | ||
/** | ||
* Icone apresentado no feedback. | ||
*/ | ||
iconName?: TIconProps['symbol']; | ||
/** | ||
* Elementos filho a ser renderizado dentro do componente. | ||
*/ | ||
children?: React.ReactNode; | ||
} | ||
/** | ||
* Representa as props para o componente InputText.Actions. | ||
*/ | ||
interface InputTextActionsProps { | ||
/** | ||
* Elementos filho a ser renderizado dentro do componente. | ||
*/ | ||
children: React.ReactNode; | ||
} | ||
/** | ||
* Representa as props para o componente InputText.ClearButton. | ||
*/ | ||
interface InputTextClearButtonProps extends Omit<ButtonProps, 'variant' | 'children' | 'className'> { | ||
} | ||
/** | ||
* Representa as props para o componente InputText.Icon. | ||
*/ | ||
interface InputTextIconProps extends Pick<TIconProps, 'symbol' | 'color'> { | ||
} | ||
/** | ||
* Define o scope do radix-context | ||
*/ | ||
type InputTextScopedProps<P> = P & { | ||
__scopeInputText?: Scope; | ||
}; | ||
declare function InputTextIcon({ __scopeInputText, color, ...props }: InputTextScopedProps<InputTextIconProps>): react_jsx_runtime.JSX.Element; | ||
declare const InputText: { | ||
Root: { | ||
(props: InputTextScopedProps<InputTextProps>): react_jsx_runtime.JSX.Element; | ||
displayName: string; | ||
}; | ||
Label: (props: InputTextScopedProps<InputTextLabelProps>) => react_jsx_runtime.JSX.Element | null; | ||
Field: react.ForwardRefExoticComponent<InputTextFieldProps & react.RefAttributes<HTMLInputElement>>; | ||
HelperText: ({ withIcon, iconName, children, __scopeInputText, ...props }: InputTextScopedProps<InputTextHelperTextProps>) => react_jsx_runtime.JSX.Element | null; | ||
Actions: ({ children, __scopeInputText, ...props }: InputTextScopedProps<InputTextActionsProps>) => react_jsx_runtime.JSX.Element; | ||
ClearButton: ({ __scopeInputText, ...props }: InputTextScopedProps<InputTextClearButtonProps>) => react_jsx_runtime.JSX.Element; | ||
Icon: typeof InputTextIcon; | ||
}; | ||
export { Button, type ButtonProps, Icon, InputText, type InputTextProps, Refresh, type TIconProps, type TRefreshProps, ThemeContext, ThemeProvider }; |
@@ -1,2 +0,2 @@ | ||
var D=Object.defineProperty,A=Object.defineProperties;var O=Object.getOwnPropertyDescriptors;var u=Object.getOwnPropertySymbols;var v=Object.prototype.hasOwnProperty,g=Object.prototype.propertyIsEnumerable;var P=(e,t,o)=>t in e?D(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o,l=(e,t)=>{for(var o in t||(t={}))v.call(t,o)&&P(e,o,t[o]);if(u)for(var o of u(t))g.call(t,o)&&P(e,o,t[o]);return e},i=(e,t)=>A(e,O(t));var c=(e,t)=>{var o={};for(var r in e)v.call(e,r)&&t.indexOf(r)<0&&(o[r]=e[r]);if(e!=null&&u)for(var r of u(e))t.indexOf(r)<0&&g.call(e,r)&&(o[r]=e[r]);return o};import{createContext as M,useEffect as L}from"react";import{jsx as q}from"react/jsx-runtime";var y=M({});function re({children:e,theme:t}){let{documentElement:o}=document;return L(()=>(t&&o.classList.add(t),()=>{o.classList.remove(t)}),[o,t]),q(y.Provider,{value:{currentTheme:t},children:e})}import{DROGASIL_TOKENS as F,RAIA_TOKENS as G,RDSAUDESISTEMAS_TOKENS as H}from"@raiadrogasil/pulso-design-tokens";import{useContext as K}from"react";function d(){let{currentTheme:e}=K(y);return{rdsaudesistemas:H,drogasil:F,raia:G}[e]}function B(e){let t=d();return Object.keys(t).reduce((s,n)=>{if(n.includes("color")){let a=n;s[a]=t[a]}return s},{})[e]}var R={tiny:"var(--sizing-tiny)","extra-small":"var(--sizing-extrasmall)",small:"var(--sizing-small)",medium:"var(--sizing-medium)"};import{jsx as U}from"react/jsx-runtime";function I(s){var n=s,{symbol:e="rdicon-default",size:t="small",color:o="colorActionFillBrandPrimaryEnabled"}=n,r=c(n,["symbol","size","color"]);let a=e.replace("rdicon","").trim();return U("i",i(l({},r),{title:a,className:e,style:{fontSize:R[t],color:B(o)}}))}function C(e){let t=d();return{brand:t.colorActionFillBrandPrimaryEnabled,neutral:t.colorTextNeutralReadonly,black:t.colorTextNeutralDefault,white:t.colorTextNeutralInverse}[e]}import{jsx as x,jsxs as Y}from"react/jsx-runtime";function S({color:e="brand",srText:t}){return x("div",{role:"status",className:"grid size-eightpulse place-items-center","aria-label":t,children:Y("svg",{className:"size-sixpulse animate-spin fill-none",viewBox:"0 0 24 24",children:[x("path",{fillRule:"evenodd",d:"M0 12c0 6.627 5.373 12 12 12s12-5.373 12-12S18.627 0 12 0v2c5.523 0 10 4.477 10 10s-4.477 10-10 10S2 17.523 2 12H0z",clipRule:"evenodd",fill:C(e)}),x("title",{children:t})]})})}import{forwardRef as X}from"react";import{createContextScope as Z}from"@radix-ui/react-context";import{createTV as J}from"tailwind-variants";var z=J({twMergeConfig:{extend:{classGroups:{"font-size":[{text:["threepulse","threeandhalfpulse"]}],"border-width":[{border:["quarterpulse"]}]}}}});var N=z({base:` | ||
var se=Object.defineProperty,ae=Object.defineProperties;var le=Object.getOwnPropertyDescriptors;var b=Object.getOwnPropertySymbols;var A=Object.prototype.hasOwnProperty,E=Object.prototype.propertyIsEnumerable;var O=(e,t,r)=>t in e?se(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,l=(e,t)=>{for(var r in t||(t={}))A.call(t,r)&&O(e,r,t[r]);if(b)for(var r of b(t))E.call(t,r)&&O(e,r,t[r]);return e},i=(e,t)=>ae(e,le(t));var u=(e,t)=>{var r={};for(var o in e)A.call(e,o)&&t.indexOf(o)<0&&(r[o]=e[o]);if(e!=null&&b)for(var o of b(e))t.indexOf(o)<0&&E.call(e,o)&&(r[o]=e[o]);return r};import{createContext as ie,useEffect as pe}from"react";import{jsx as de}from"react/jsx-runtime";var C=ie({});function De({children:e,theme:t}){let{documentElement:r}=document;return pe(()=>(t&&r.classList.add(t),()=>{r.classList.remove(t)}),[r,t]),de(C.Provider,{value:{currentTheme:t},children:e})}import{DROGASIL_TOKENS as ue,RAIA_TOKENS as ce,RDSAUDESISTEMAS_TOKENS as me}from"@raiadrogasil/pulso-design-tokens";import{useContext as fe}from"react";function h(){let{currentTheme:e}=fe(C);return{rdsaudesistemas:me,drogasil:ue,raia:ce}[e]}function _(e){let t=h();return Object.keys(t).reduce((n,s)=>{if(s.includes("color")){let a=s;n[a]=t[a]}return n},{})[e]}var k={tiny:"var(--sizing-tiny)","extra-small":"var(--sizing-extrasmall)",small:"var(--sizing-small)",medium:"var(--sizing-medium)"};import{jsx as xe}from"react/jsx-runtime";function T(n){var s=n,{symbol:e="rdicon-default",size:t="small",color:r="colorActionFillBrandPrimaryEnabled"}=s,o=u(s,["symbol","size","color"]);let a=e.replace("rdicon","").trim();return xe("i",i(l({},o),{title:a,className:e,style:{fontSize:k[t],color:_(r)}}))}function D(e){let t=h();return{brand:t.colorActionFillBrandPrimaryEnabled,neutral:t.colorTextNeutralReadonly,black:t.colorTextNeutralDefault,white:t.colorTextNeutralInverse}[e]}import{jsx as B,jsxs as Te}from"react/jsx-runtime";function L({color:e="brand",srText:t}){return B("div",{role:"status",className:"grid size-eightpulse place-items-center","aria-label":t,children:Te("svg",{className:"size-sixpulse animate-spin fill-none",viewBox:"0 0 24 24",children:[B("path",{fillRule:"evenodd",d:"M0 12c0 6.627 5.373 12 12 12s12-5.373 12-12S18.627 0 12 0v2c5.523 0 10 4.477 10 10s-4.477 10-10 10S2 17.523 2 12H0z",clipRule:"evenodd",fill:D(e)}),B("title",{children:t})]})})}import{forwardRef as Ie}from"react";import{createContextScope as ge}from"@radix-ui/react-context";import{createTV as be}from"tailwind-variants";var c=be({twMergeConfig:{extend:{classGroups:{"font-size":[{text:["threepulse","threeandhalfpulse"]}],"border-width":[{border:["quarterpulse","halfpulse"]}],"--tw-ring-inset":[{ring:["none","quarterpulse","halfpulse"]}]}}}});var F=c({base:` | ||
tracking inline-flex items-center justify-center gap-twopulse rounded-pill | ||
@@ -6,3 +6,21 @@ border-quarterpulse border-[transparent] font-bold font-rdmodern text-threeandhalfpulse truncate`,variants:{variant:{"brand-primary":`bg-action-fill-brand-primary-enabled text-text-neutral-inverse | ||
enabled:active:border-action-border-neutral-secondary-pressed enabled:active:bg-action-fill-neutral-secondary-pressed enabled:hover:bg-action-fill-neutral-secondary-hovered`,"neutral-tertiary":`border-action-border-neutral-tertiary-enabled bg-action-fill-neutral-tertiary-enabled text-text-neutral | ||
enabled:active:bg-action-fill-neutral-tertiary-pressed enabled:hover:bg-action-fill-neutral-tertiary-hovered`},size:{md:"h-medium min-w-medium px-fourpulse text-threepulse leading-medium",ml:"h-mediumlarge min-w-mediumlarge px-fourpulse leading-small",lg:"h-large min-w-large px-fivepulse leading-small",xl:"h-extralarge min-w-extralarge px-sixpulse leading-small"},disabled:{true:"cursor-not-allowed text-text-neutral-disabled outline-none",false:"outline-action-border-focused outline-offset-4 focus-visible:outline-1"},full:{true:"w-[100%]"},asIconOnly:{true:"aspect-square px-none"}},compoundVariants:[{variant:"brand-primary",disabled:!0,class:"border-action-border-brand-primary-disabled bg-action-fill-brand-primary-disabled"},{variant:"neutral-secondary",disabled:!0,class:"border-action-border-neutral-secondary-disabled bg-action-fill-neutral-secondary-disabled"},{variant:"neutral-tertiary",disabled:!0,class:"border-action-fill-neutral-tertiary-disabled bg-action-fill-neutral-tertiary-enabled"}],defaultVariants:{variant:"brand-primary",size:"ml"}});import{jsx as Q}from"react/jsx-runtime";function m(e){let p=e,{__scopeButton:t}=p,o=c(p,["__scopeButton"]),{variant:r,size:s,disabled:n}=f("ButtonIcon",t),a={"brand-primary":"colorTextNeutralInverse","neutral-secondary":"colorTextNeutralDefault","neutral-tertiary":"colorTextNeutralDefault"},b={md:"extra-small",ml:"small",lg:"small",xl:"small"};return Q(I,i(l({},o),{color:n?"colorTextNeutralDisabled":a[r],size:b[s]}))}import{jsx as W}from"react/jsx-runtime";function k(e){let n=e,{__scopeButton:t}=n,o=c(n,["__scopeButton"]),{variant:r}=f("ButtonRefresh",t),s={"brand-primary":"white","neutral-secondary":"neutral","neutral-tertiary":"black"};return W(S,i(l({},o),{color:s[r]}))}import w from"react";function E(e){return w.Children.count(e)===1&&w.isValidElement(e)?e.type===m:!1}import{jsx as T}from"react/jsx-runtime";var h="Button",V=X((e,t)=>{let{children:o,variant:r,size:s,loading:n,disabled:a,full:b,__scopeButton:p}=e,_=n||a;return T(j,{scope:p,variant:r,size:s,disabled:a,children:T("button",i(l({},e),{ref:t,className:N({variant:r,size:s,disabled:a,full:b,asIconOnly:E(o)}),disabled:_,"aria-disabled":a,children:n?T(k,{}):o}))})});V.displayName=h;var[$]=Z(h),[j,f]=$(h),ee={Root:V,Icon:m};export{ee as Button,I as Icon,S as Refresh,y as ThemeContext,re as ThemeProvider}; | ||
enabled:active:bg-action-fill-neutral-tertiary-pressed enabled:hover:bg-action-fill-neutral-tertiary-hovered`},size:{md:"h-medium min-w-medium px-fourpulse text-threepulse leading-medium",ml:"h-mediumlarge min-w-mediumlarge px-fourpulse leading-small",lg:"h-mediumlarge min-w-mediumlarge px-fivepulse leading-small",xl:"h-mediumlarge min-w-mediumlarge px-sixpulse leading-small"},disabled:{true:"cursor-not-allowed text-text-neutral-disabled outline-none",false:"outline-action-border-focused outline-offset-4 focus-visible:outline-1"},full:{true:"w-[100%]"},asIconOnly:{true:"aspect-square px-none"}},compoundVariants:[{variant:"brand-primary",disabled:!0,class:"border-action-border-brand-primary-disabled bg-action-fill-brand-primary-disabled"},{variant:"neutral-secondary",disabled:!0,class:"border-action-border-neutral-secondary-disabled bg-action-fill-neutral-secondary-disabled"},{variant:"neutral-tertiary",disabled:!0,class:"border-action-fill-neutral-tertiary-disabled bg-action-fill-neutral-tertiary-enabled"}],defaultVariants:{variant:"brand-primary",size:"ml"}});import{jsx as he}from"react/jsx-runtime";function y(e){let p=e,{__scopeButton:t}=p,r=u(p,["__scopeButton"]),{variant:o,size:n,disabled:s}=I("ButtonIcon",t),a={"brand-primary":"colorTextNeutralInverse","neutral-secondary":"colorTextNeutralDefault","neutral-tertiary":"colorTextNeutralDefault"},d={md:"extra-small",ml:"small",lg:"small",xl:"small"};return he(T,i(l({},r),{color:s?"colorTextNeutralDisabled":a[o],size:d[n]}))}import{jsx as ye}from"react/jsx-runtime";function H(e){let s=e,{__scopeButton:t}=s,r=u(s,["__scopeButton"]),{variant:o}=I("ButtonRefresh",t),n={"brand-primary":"white","neutral-secondary":"neutral","neutral-tertiary":"black"};return ye(L,i(l({},r),{color:n[o]}))}import M from"react";function q(e){return M.Children.count(e)===1&&M.isValidElement(e)?e.type===y:!1}import{jsx as w}from"react/jsx-runtime";var R="Button",G=Ie((e,t)=>{let{children:r,variant:o,size:n,loading:s,disabled:a,full:d,__scopeButton:p}=e,f=s||a;return w(Pe,{scope:p,variant:o,size:n,disabled:a,children:w("button",i(l({},e),{ref:t,className:F({variant:o,size:n,disabled:a,full:d,asIconOnly:q(r)}),disabled:f,"aria-disabled":a,children:s?w(H,{}):r}))})});G.displayName=R;var[ve]=ge(R),[Pe,I]=ve(R),g={Root:G,Icon:y};import{useMemo as Ce}from"react";var K=c({base:"justify-star flex w-[100%] flex-wrap items-center gap-onepulse px-twopulse text-left font-rdmodern font-semibold text-text-neutral-alternative text-threepulse",variants:{hasError:{true:"text-text-danger-alternative",false:""},readOnly:{true:"cursor-not-allowed"},disabled:{true:"cursor-not-allowed text-text-neutral-disabled",false:""}},compoundVariants:[{readOnly:!0,disabled:!1,class:"text-text-neutral-readonly"}],defaultVariants:{error:!1,disabled:!1,readOnly:!1}});import{jsx as S,jsxs as Be}from"react/jsx-runtime";var Y=s=>{var a=s,{withIcon:e,iconName:t="rdicon-warning-circle",children:r,__scopeInputText:o}=a,n=u(a,["withIcon","iconName","children","__scopeInputText"]);let{disabled:d,hasError:p,readOnly:f}=m("InputTextHelperText",o),P=p?"rdicon-warning-circle":t,ne=Ce(()=>d?"colorTextNeutralDisabled":f?"colorTextNeutralReadonly":p?"colorTextDangerAlternative":"colorTextNeutralAlternative",[d,p,f]);return r?Be("div",i(l({},n),{"aria-disabled":d,className:K({hasError:p,disabled:d,readOnly:f}),children:[e&&S("div",{className:"flex items-center",children:S(T,{symbol:P,color:ne,size:"tiny"})}),S("span",{className:"flex flex-1",children:r})]})):null};var J=c({base:"input-text-clear-button hidden",variants:{size:{md:"-mr-[6px]",ml:"-mr-[8px]",lg:"-mr-[8px]",xl:"-mr-[8px]"},readOnly:{true:""},disabled:{true:""}},compoundVariants:[{readOnly:!1,disabled:!1,class:"peer-focus/field:peer-[:not(:placeholder-shown)]/field:flex group-hover:peer-[:not(:placeholder-shown)]/field:flex"}],defaultVariants:{readOnly:!1,disabled:!1}});import{jsx as z}from"react/jsx-runtime";var U=r=>{var o=r,{__scopeInputText:e}=o,t=u(o,["__scopeInputText"]);let{size:n,disabled:s,readOnly:a}=m("InputTextClearButton",e);return z("div",{className:J({size:n,disabled:s,readOnly:a}),"aria-disabled":s||a,children:z(g.Root,i(l({},t),{size:n,disabled:s||a,variant:"neutral-tertiary",children:z(g.Icon,{symbol:"rdicon-dismiss-circle-outline"})}))})};import{Children as we,isValidElement as Re}from"react";var v=(e,t)=>{var o;let r=(o=we.toArray(e))==null?void 0:o.filter(n=>Re(n));return r.map((n,s)=>{let a=t.find(p=>n.type===p.child),d=r.reduce((p,f,P)=>(f==null?void 0:f.type)===n.type&&P<=s?p+1:p,0);return a&&d<=(a==null?void 0:a.amount)?n:null})};var X=c({base:` | ||
group flex w-[100%] items-center justify-between gap-onepulse py-threepulse duration-100 ease-in | ||
bg-forms-fill-filled ring-forms-border-filled ring-quarterpulse overflow-hidden | ||
focus-within:ring-halfpulse focus-within:bg-forms-fill-focused min-w-[calc(var(--sizing-huge)_+_var(--sizing-tiny))] | ||
`,variants:{size:{md:"h-medium rounded-form px-twopulse",ml:"h-mediumlarge rounded-form px-threepulse",lg:"h-large rounded-form px-threepulse",xl:"h-extralarge rounded-largecontainer px-threepulse"},hasError:{true:"ring-forms-border-error"},readOnly:{true:""},disabled:{true:"cursor-not-allowed ring-forms-border-disabled ring-quarterpulse"}},compoundVariants:[{readOnly:!1,disabled:!1,class:` | ||
[&:not(:focus-within)]:has-[:placeholder-shown]:bg-forms-fill | ||
[&:not(:focus-within)]:has-[:placeholder-shown]:hover:bg-forms-fill-hovered | ||
`},{hasError:!1,readOnly:!1,disabled:!1,class:` | ||
focus-within:ring-action-border-focused hover:ring-halfpulse | ||
[&:not(:focus-within)]:has-[:placeholder-shown]:ring-forms-border | ||
[&:not(:focus-within)]:has-[:placeholder-shown]:hover:ring-forms-border-hovered | ||
[&:not(:focus-within)]:has-[:placeholder-shown]:ring-none | ||
`},{readOnly:!0,disabled:!1,class:"cursor-not-allowed bg-forms-fill-readonly ring-forms-border-readonly ring-quarterpulse"}],defaultVariants:{size:"ml",isFocused:!1,hasError:!1,readOnly:!1,disabled:!1}});import{jsx as Se}from"react/jsx-runtime";var Q=o=>{var n=o,{children:e,__scopeInputText:t}=n,r=u(n,["children","__scopeInputText"]);let{disabled:s,hasError:a,readOnly:d,size:p}=m("InputTextActions",t);return Se("div",i(l({},r),{className:X({size:p,disabled:s,readOnly:d,hasError:a}),"aria-disabled":s,"data-disabled":s,children:v(e,[{child:x.Icon,amount:2},{child:x.Field,amount:1},{child:x.ClearButton,amount:1}])}))};import{forwardRef as ze}from"react";var W=c({base:` | ||
peer/field flex w-[100%] bg-[transparent] !font-rdmodern font-regular text-text-neutral tracking-tiny leading-small | ||
placeholder:opacity-transparent focus-visible:border-none focus-visible:outline-none | ||
`,variants:{size:{md:"text-threepulse",ml:"text-threeandhalfpulse",lg:"text-threeandhalfpulse",xl:"text-threeandhalfpulse"},readOnly:{true:""},disabled:{true:"cursor-not-allowed text-text-neutral-disabled",false:""}},compoundVariants:[{readOnly:!0,disabled:!1,class:"cursor-not-allowed text-text-neutral-readonly"}],defaultVariants:{readOnly:!1,disabled:!1}});import{jsx as Ne}from"react/jsx-runtime";var N=ze((o,r)=>{var n=o,{__scopeInputText:e}=n,t=u(n,["__scopeInputText"]);let{disabled:s,readOnly:a,size:d}=m("InputTextField",e);return Ne("input",i(l({},t),{ref:r,disabled:s,readOnly:a,placeholder:"Placeholder is hidden",className:W({disabled:s,readOnly:a,size:d})}))});N.displayName="InputTextField";var Z=c({base:` | ||
w-[100%] align-middle m-none p-none | ||
text-left font-rdmodern font-semibold tracking-tiny text-text-neutral text-nowrap truncate leading | ||
`,variants:{size:{md:"text-threepulse",ml:"text-threeandhalfpulse",lg:"text-threeandhalfpulse",xl:"text-threeandhalfpulse"},readOnly:{true:"",false:""},disabled:{true:"cursor-not-allowed text-text-neutral-disabled",false:""}},compoundVariants:[{readOnly:!0,disabled:!1,class:"cursor-not-allowed text-text-neutral-readonly"}],defaultVariants:{disabled:!1,readOnly:!1}});import{jsx as $}from"react/jsx-runtime";var j=e=>{let d=e,{__scopeInputText:t,children:r}=d,o=u(d,["__scopeInputText","children"]),{disabled:n,readOnly:s,size:a}=m("InputTextLabel",t);return r?$("div",{className:"flex h-extrasmall w-[100%] items-center rounded-none rounded-none border-none px-twopulse text-left",children:$("label",i(l({},o),{className:Z({disabled:n,readOnly:s,size:a}),"aria-disabled":n,children:r}))}):null};import{useMemo as Ve}from"react";import{jsx as ee}from"react/jsx-runtime";function te(o){var n=o,{__scopeInputText:e,color:t="colorTextNeutralDefault"}=n,r=u(n,["__scopeInputText","color"]);let{size:s,hasError:a}=m("InputTextField",e),d=Ve(()=>{let p={md:"extra-small",ml:"small",lg:"small",xl:"small"};return p==null?void 0:p[s]},[s]);return ee("div",{className:"flex items-center",children:ee(T,i(l({},r),{color:a?"colorTextDangerAlternative":t,size:d}))})}import{createContextScope as Oe}from"@radix-ui/react-context";import{jsx as re}from"react/jsx-runtime";var V="InputText",oe=e=>{let{size:t="ml",children:r,__scopeInputText:o}=e;return re(Ee,i(l({},e),{size:t,scope:o,children:re("div",{className:"flex w-full flex-col gap-halfpulse",children:v(r,[{child:x.Label,amount:1},{child:x.Actions,amount:1},{child:x.HelperText,amount:1}])})}))};oe.displayName=V;var[Ae]=Oe(V),[Ee,m]=Ae(V),x={Root:oe,Label:j,Field:N,HelperText:Y,Actions:Q,ClearButton:U,Icon:te};export{g as Button,T as Icon,x as InputText,L as Refresh,C as ThemeContext,De as ThemeProvider}; | ||
//# sourceMappingURL=index.js.map |
{ | ||
"name": "@rdsaude/pulso-react-components", | ||
"version": "1.0.0", | ||
"version": "1.1.0", | ||
"description": "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.", | ||
@@ -5,0 +5,0 @@ "author": { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
180583
1840