@rdsaude/pulso-react-components
Advanced tools
Comparing version 1.3.0 to 1.4.0
import * as react_jsx_runtime from 'react/jsx-runtime'; | ||
import * as react from 'react'; | ||
import react__default, { InputHTMLAttributes } from 'react'; | ||
import * as React$1 from 'react'; | ||
import React__default, { InputHTMLAttributes } from 'react'; | ||
import { TThemes, TPulsoTokens } from '@raiadrogasil/pulso-design-tokens'; | ||
@@ -18,3 +18,3 @@ import { IconName } from '@raiadrogasil/pulso-icons'; | ||
} | ||
declare const ThemeContext: react.Context<TThemeContextData>; | ||
declare const ThemeContext: React$1.Context<TThemeContextData>; | ||
declare function ThemeProvider({ children, theme }: IThemeProviderProps): react_jsx_runtime.JSX.Element; | ||
@@ -216,7 +216,111 @@ | ||
declare const Button: { | ||
Root: react.ForwardRefExoticComponent<Omit<ButtonProps, "ref"> & react.RefAttributes<HTMLButtonElement>>; | ||
Root: React$1.ForwardRefExoticComponent<Omit<ButtonProps, "ref"> & React$1.RefAttributes<HTMLButtonElement>>; | ||
Icon: typeof ButtonIcon; | ||
}; | ||
type TRadioSizes = 'xl' | 'lg' | 'ml' | 'md'; | ||
type TRadioGroupProps = React.FieldsetHTMLAttributes<HTMLFieldSetElement> & { | ||
/** | ||
* Valor inicial do Grupo de Radios. | ||
*/ | ||
defaultValue?: string; | ||
/** | ||
* Acessibilidade do componente. | ||
*/ | ||
ariaLabel?: string; | ||
/** | ||
* Legenda do componente Grupo de Radios. | ||
*/ | ||
legend?: string; | ||
/** | ||
* Action para o evento onChange. | ||
*/ | ||
onChange: (e: React.ChangeEvent<HTMLInputElement>) => void; | ||
}; | ||
type TRadioLabelProps = React.LabelHTMLAttributes<HTMLLabelElement> & { | ||
/** | ||
* Elementos a ser renderizado dentro do componente. | ||
*/ | ||
children: React.ReactNode; | ||
/** | ||
* Acessibilidade do componente. | ||
*/ | ||
ariaDisabled?: boolean; | ||
}; | ||
interface TRadioProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'size' | 'testID'> { | ||
/** | ||
* Propriedade Id do Radio. | ||
*/ | ||
id: string; | ||
/** | ||
* Propriedade name do Radio. | ||
*/ | ||
name: string; | ||
/** | ||
* Propriedade value do Radio. | ||
*/ | ||
value: string; | ||
/** | ||
* Conteúdo do Radio. | ||
*/ | ||
children?: React.ReactNode; | ||
/** | ||
* Opções de tamanho para o componente Radio. | ||
*/ | ||
size?: TRadioSizes; | ||
/** | ||
* Propriedade para indicar se o Radio está selecionado. | ||
*/ | ||
checked?: boolean; | ||
/** | ||
* Propriedade para exibição de erro. | ||
*/ | ||
error?: boolean; | ||
/** | ||
* Propriedade para desabilitar o Radio. | ||
*/ | ||
disabled?: boolean; | ||
/** | ||
* Propriedade para indicar somente ícone. | ||
*/ | ||
iconOnly?: boolean; | ||
} | ||
interface RadioHelperTextProps extends Omit<React.HTMLProps<HTMLDivElement>, 'className'> { | ||
/** | ||
* Se o componente exibe icone. | ||
*/ | ||
withIcon?: boolean; | ||
/** | ||
* Icone apresentado no feedback. | ||
*/ | ||
iconName?: TIconProps['symbol']; | ||
/** | ||
* Texto do . | ||
*/ | ||
children?: React.ReactNode; | ||
} | ||
/** | ||
* radix-context | ||
*/ | ||
type RadioContext = TRadioProps & TRadioGroupProps & { | ||
selectedValue?: string; | ||
}; | ||
/** | ||
* Define o scope do radix-context | ||
*/ | ||
type RadioScopedProps<P> = P & { | ||
__scopeRadio?: Scope; | ||
}; | ||
declare const Radio: { | ||
Root: { | ||
(props: RadioScopedProps<TRadioProps & TRadioGroupProps>): react_jsx_runtime.JSX.Element; | ||
displayName: string; | ||
}; | ||
Button: (props: RadioScopedProps<TRadioProps>) => react_jsx_runtime.JSX.Element; | ||
Label: (props: RadioScopedProps<TRadioLabelProps>) => react_jsx_runtime.JSX.Element | null; | ||
Helper: ({ withIcon, iconName, children, __scopeRadio, ...props }: RadioScopedProps<RadioHelperTextProps>) => react_jsx_runtime.JSX.Element | null; | ||
}; | ||
/** | ||
* Representa as props para o componente InputText. | ||
@@ -299,3 +403,3 @@ */ | ||
Label: (props: InputTextScopedProps<InputTextLabelProps>) => react_jsx_runtime.JSX.Element | null; | ||
Field: react.ForwardRefExoticComponent<InputTextFieldProps & react.RefAttributes<HTMLInputElement>>; | ||
Field: React$1.ForwardRefExoticComponent<InputTextFieldProps & React$1.RefAttributes<HTMLInputElement>>; | ||
HelperText: ({ withIcon, iconName, children, __scopeInputText, ...props }: InputTextScopedProps<InputTextHelperTextProps>) => react_jsx_runtime.JSX.Element | null; | ||
@@ -353,6 +457,6 @@ Actions: ({ children, __scopeInputText, ...props }: InputTextScopedProps<InputTextActionsProps>) => react_jsx_runtime.JSX.Element; | ||
htmlFor: string; | ||
children: react__default.ReactNode; | ||
children: React__default.ReactNode; | ||
} | ||
interface SelectFieldContainerProps { | ||
children: react__default.ReactNode; | ||
children: React__default.ReactNode; | ||
} | ||
@@ -371,3 +475,3 @@ /** | ||
iconName?: TIconProps['symbol']; | ||
children: react__default.ReactNode; | ||
children: React__default.ReactNode; | ||
} | ||
@@ -378,3 +482,3 @@ /** | ||
interface SelectActionsProps { | ||
children?: react__default.ReactNode; | ||
children?: React__default.ReactNode; | ||
} | ||
@@ -403,6 +507,6 @@ /** | ||
Icon: typeof SelectIcon; | ||
Field: react.ForwardRefExoticComponent<Omit<react.SelectHTMLAttributes<HTMLSelectElement>, "size"> & { | ||
children: react.ReactNode; | ||
} & react.RefAttributes<HTMLDivElement>>; | ||
Actions: react.FC<SelectActionsProps>; | ||
Field: React$1.ForwardRefExoticComponent<Omit<React$1.SelectHTMLAttributes<HTMLSelectElement>, "size"> & { | ||
children: React.ReactNode; | ||
} & React$1.RefAttributes<HTMLDivElement>>; | ||
Actions: React$1.FC<SelectActionsProps>; | ||
HelperText: ({ withIcon, iconName, __scopeInputSelect, children, ...props }: SelectScopedProps<SelectHelperTextProps>) => react_jsx_runtime.JSX.Element | null; | ||
@@ -431,3 +535,3 @@ }; | ||
type GroupProps = { | ||
children: react__default.ReactNode; | ||
children: React__default.ReactNode; | ||
title?: string; | ||
@@ -438,3 +542,3 @@ }; | ||
type ListProps = { | ||
children: react__default.ReactNode; | ||
children: React__default.ReactNode; | ||
testID?: string; | ||
@@ -511,2 +615,2 @@ }; | ||
export { Button, type ButtonProps, Icon, InputText, type InputTextProps, OptionMenu, type OptionMenuProps, Pagination, type PaginationProps, Refresh, Select, type SelectProps, type TIconProps, type TRefreshProps, ThemeContext, ThemeProvider }; | ||
export { Button, type ButtonProps, Icon, InputText, type InputTextProps, OptionMenu, type OptionMenuProps, Pagination, type PaginationProps, Radio, type RadioContext, Refresh, Select, type SelectProps, type TIconProps, type TRadioGroupProps, type TRadioProps, type TRefreshProps, ThemeContext, ThemeProvider }; |
@@ -1,2 +0,2 @@ | ||
var dt=Object.defineProperty,ct=Object.defineProperties;var ut=Object.getOwnPropertyDescriptors;var E=Object.getOwnPropertySymbols;var pe=Object.prototype.hasOwnProperty,de=Object.prototype.propertyIsEnumerable;var ie=(e,t,r)=>t in e?dt(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,p=(e,t)=>{for(var r in t||(t={}))pe.call(t,r)&&ie(e,r,t[r]);if(E)for(var r of E(t))de.call(t,r)&&ie(e,r,t[r]);return e},d=(e,t)=>ct(e,ut(t));var m=(e,t)=>{var r={};for(var o in e)pe.call(e,o)&&t.indexOf(o)<0&&(r[o]=e[o]);if(e!=null&&E)for(var o of E(e))t.indexOf(o)<0&&de.call(e,o)&&(r[o]=e[o]);return r};import{createContext as mt,useEffect as ft}from"react";import{jsx as xt}from"react/jsx-runtime";var H=mt({});function ur({children:e,theme:t}){return ft(()=>{var r,o;return t&&document&&((o=(r=document==null?void 0:document.documentElement)==null?void 0:r.classList)==null||o.add(t)),()=>{var n,l;(l=(n=document==null?void 0:document.documentElement)==null?void 0:n.classList)==null||l.remove(t)}},[t]),xt(H.Provider,{value:{currentTheme:t},children:e})}import{DROGASIL_TOKENS as bt,RAIA_TOKENS as yt,RDSAUDESISTEMAS_TOKENS as ht}from"@raiadrogasil/pulso-design-tokens";import{useContext as gt}from"react";function C(){let{currentTheme:e}=gt(H);return{rdsaudesistemas:ht,drogasil:bt,raia:yt}[e]}function ce(e){let t=C();return Object.keys(t).reduce((n,l)=>{if(l.includes("color")){let a=l;n[a]=t[a]}return n},{})[e]}var ue={tiny:"var(--sizing-tiny)","extra-small":"var(--sizing-extrasmall)",small:"var(--sizing-small)",medium:"var(--sizing-medium)"};import{jsx as vt}from"react/jsx-runtime";function b(n){var l=n,{symbol:e="rdicon-default",size:t="small",color:r="colorActionFillBrandPrimaryEnabled"}=l,o=m(l,["symbol","size","color"]);let a=e.replace("rdicon","").trim();return vt("i",d(p({},o),{title:a,className:e,style:{fontSize:ue[t],color:ce(r)}}))}function me(e){let t=C();return{brand:t.colorActionFillBrandPrimaryEnabled,neutral:t.colorTextNeutralReadonly,black:t.colorTextNeutralDefault,white:t.colorTextNeutralInverse}[e]}import{jsx as q,jsxs as Tt}from"react/jsx-runtime";function fe({color:e="brand",srText:t}){return q("div",{role:"status",className:"grid size-eightpulse place-items-center","aria-label":t,children:Tt("svg",{className:"size-sixpulse animate-spin fill-none",viewBox:"0 0 24 24",children:[q("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:me(e)}),q("title",{children:t})]})})}import{forwardRef as Ct}from"react";import{createContextScope as Nt}from"@radix-ui/react-context";import{createTV as Pt}from"tailwind-variants";var c=Pt({twMergeConfig:{extend:{classGroups:{"font-size":[{text:["threepulse","threeandhalfpulse"]}],"border-width":[{border:["quarterpulse","halfpulse"]}],"--tw-ring-inset":[{ring:["none","quarterpulse","halfpulse"]}]}}}});var xe=c({base:` | ||
var wt=Object.defineProperty,Nt=Object.defineProperties;var Ot=Object.getOwnPropertyDescriptors;var D=Object.getOwnPropertySymbols;var xe=Object.prototype.hasOwnProperty,be=Object.prototype.propertyIsEnumerable;var fe=(e,t,r)=>t in e?wt(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,d=(e,t)=>{for(var r in t||(t={}))xe.call(t,r)&&fe(e,r,t[r]);if(D)for(var r of D(t))be.call(t,r)&&fe(e,r,t[r]);return e},u=(e,t)=>Nt(e,Ot(t));var f=(e,t)=>{var r={};for(var o in e)xe.call(e,o)&&t.indexOf(o)<0&&(r[o]=e[o]);if(e!=null&&D)for(var o of D(e))t.indexOf(o)<0&&be.call(e,o)&&(r[o]=e[o]);return r};import{createContext as Vt,useEffect as zt}from"react";import{jsx as Bt}from"react/jsx-runtime";var $=Vt({});function Fr({children:e,theme:t}){return zt(()=>{var r,o;return t&&document&&((o=(r=document==null?void 0:document.documentElement)==null?void 0:r.classList)==null||o.add(t)),()=>{var n,l;(l=(n=document==null?void 0:document.documentElement)==null?void 0:n.classList)==null||l.remove(t)}},[t]),Bt($.Provider,{value:{currentTheme:t},children:e})}import{DROGASIL_TOKENS as Et,RAIA_TOKENS as Mt,RDSAUDESISTEMAS_TOKENS as kt}from"@raiadrogasil/pulso-design-tokens";import{useContext as Dt}from"react";function C(){let{currentTheme:e}=Dt($);return{rdsaudesistemas:kt,drogasil:Et,raia:Mt}[e]}function ye(e){let t=C();return Object.keys(t).reduce((n,l)=>{if(l.includes("color")){let s=l;n[s]=t[s]}return n},{})[e]}var he={tiny:"var(--sizing-tiny)","extra-small":"var(--sizing-extrasmall)",small:"var(--sizing-small)",medium:"var(--sizing-medium)"};import{jsx as Lt}from"react/jsx-runtime";function b(n){var l=n,{symbol:e="rdicon-default",size:t="small",color:r="colorActionFillBrandPrimaryEnabled"}=l,o=f(l,["symbol","size","color"]);let s=e.replace("rdicon","").trim();return Lt("i",u(d({},o),{title:s,className:e,style:{fontSize:he[t],color:ye(r)}}))}function ge(e){let t=C();return{brand:t.colorActionFillBrandPrimaryEnabled,neutral:t.colorTextNeutralReadonly,black:t.colorTextNeutralDefault,white:t.colorTextNeutralInverse}[e]}import{jsx as U,jsxs as At}from"react/jsx-runtime";function ve({color:e="brand",srText:t}){return U("div",{role:"status",className:"grid size-eightpulse place-items-center","aria-label":t,children:At("svg",{className:"size-sixpulse animate-spin fill-none",viewBox:"0 0 24 24",children:[U("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:ge(e)}),U("title",{children:t})]})})}import{forwardRef as qt}from"react";import{createContextScope as Gt}from"@radix-ui/react-context";import{createTV as Ft}from"tailwind-variants";var c=Ft({twMergeConfig:{extend:{classGroups:{"font-size":[{text:["threepulse","threeandhalfpulse"]}],"border-width":[{border:["quarterpulse","halfpulse"]}],"--tw-ring-inset":[{ring:["none","quarterpulse","halfpulse"]}]}}}});var Te=c({base:` | ||
tracking inline-flex items-center justify-center gap-twopulse rounded-pill | ||
@@ -6,3 +6,35 @@ 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 It}from"react/jsx-runtime";function z(e){let i=e,{__scopeButton:t}=i,r=m(i,["__scopeButton"]),{variant:o,size:n,disabled:l}=M("ButtonIcon",t),a={"brand-primary":"colorTextNeutralInverse","neutral-secondary":"colorTextNeutralDefault","neutral-tertiary":"colorTextNeutralDefault"},s={md:"extra-small",ml:"small",lg:"small",xl:"small"};return It(b,d(p({},r),{color:l?"colorTextNeutralDisabled":a[o],size:s[n]}))}import{jsx as St}from"react/jsx-runtime";function be(e){let l=e,{__scopeButton:t}=l,r=m(l,["__scopeButton"]),{variant:o}=M("ButtonRefresh",t),n={"brand-primary":"white","neutral-secondary":"neutral","neutral-tertiary":"black"};return St(fe,d(p({},r),{color:n[o]}))}import ye from"react";function he(e){return ye.Children.count(e)===1&&ye.isValidElement(e)?e.type===z:!1}import{jsx as G}from"react/jsx-runtime";var $="Button",ge=Ct((e,t)=>{let{children:r,variant:o,size:n,loading:l,disabled:a,full:s,className:i,__scopeButton:f}=e,u=l||a;return G(Rt,{scope:f,variant:o,size:n,disabled:a,children:G("button",d(p({},e),{ref:t,className:xe({variant:o,size:n,disabled:a,full:s,className:i,asIconOnly:he(r)}),disabled:u,"aria-disabled":a,children:l?G(be,{}):r}))})});ge.displayName=$;var[wt]=Nt($),[Rt,M]=wt($),h={Root:ge,Icon:z};import{Children as Ot,isValidElement as Bt}from"react";var k=(e,t)=>{var o;let r=(o=Ot.toArray(e))==null?void 0:o.filter(n=>Bt(n));return r.map((n,l)=>{let a=t.find(i=>n.type===i.child),s=r.reduce((i,f,u)=>(f==null?void 0:f.type)===n.type&&u<=l?i+1:i,0);return a&&s<=(a==null?void 0:a.amount)?n:null})};var ve=c({base:` | ||
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 _t}from"react/jsx-runtime";function L(e){let i=e,{__scopeButton:t}=i,r=f(i,["__scopeButton"]),{variant:o,size:n,disabled:l}=A("ButtonIcon",t),s={"brand-primary":"colorTextNeutralInverse","neutral-secondary":"colorTextNeutralDefault","neutral-tertiary":"colorTextNeutralDefault"},a={md:"extra-small",ml:"small",lg:"small",xl:"small"};return _t(b,u(d({},r),{color:l?"colorTextNeutralDisabled":s[o],size:a[n]}))}import{jsx as Ht}from"react/jsx-runtime";function Pe(e){let l=e,{__scopeButton:t}=l,r=f(l,["__scopeButton"]),{variant:o}=A("ButtonRefresh",t),n={"brand-primary":"white","neutral-secondary":"neutral","neutral-tertiary":"black"};return Ht(ve,u(d({},r),{color:n[o]}))}import Ie from"react";function Se(e){return Ie.Children.count(e)===1&&Ie.isValidElement(e)?e.type===L:!1}import{jsx as Y}from"react/jsx-runtime";var K="Button",Re=qt((e,t)=>{let{children:r,variant:o,size:n,loading:l,disabled:s,full:a,className:i,__scopeButton:p}=e,m=l||s;return Y(Ut,{scope:p,variant:o,size:n,disabled:s,children:Y("button",u(d({},e),{ref:t,className:Te({variant:o,size:n,disabled:s,full:a,className:i,asIconOnly:Se(r)}),disabled:m,"aria-disabled":s,children:l?Y(Pe,{}):r}))})});Re.displayName=K;var[$t]=Gt(K),[Ut,A]=$t(K),v={Root:Re,Icon:L};import{createContextScope as Zt}from"@radix-ui/react-context";import{useRef as Kt}from"react";import{useState as Yt}from"react";function W(){let[e,t]=Yt("");return{UseRadio:W,selectedValue:e,setSelectedValue:t,isChecked:(n,l)=>l||e===n,iconSizeMapping:{md:"tiny",ml:"small",lg:"medium",xl:"medium"}}}var Ce=c({base:` | ||
flex items-center justify-center rounded-pill min-width-size-huge p-[4px] | ||
active:border-focused focus:border-focused w-[fit-content] mb-twopulse | ||
`,variants:{hasError:{true:"border-forms-border-error border-halfpulse"},readOnly:{true:""},disabled:{true:"cursor-not-allowed border-[transparent]"},hasIconOnly:{true:`justify-center overflow-hidden | ||
`}},compoundVariants:[{readOnly:!0,disabled:!1,class:"cursor-not-allowed"},{hasIconOnly:!0,size:"md",class:""},{hasIconOnly:!0,size:"ml",class:""},{hasIconOnly:!0,size:"lg",class:""},{hasIconOnly:!0,size:"xl",class:""}],defaultVariants:{size:"xl",hasError:!1,readOnly:!1,disabled:!1,hasIconOnly:!1}}),we=c({base:` | ||
group flex items-center justify-start rounded-pill min-w-[128px] relative font-wheight-regular | ||
font-rdmodern font-regular bg-action-fill-neutral-tertiary-enabled border-action-border-neutral-tertiary-enabled | ||
hover:bg-action-fill-neutral-tertiary-hovered hover:border-action-border-neutral-tertiary-hovered active:bg-action-fill-neutral-tertiary-pressed active:border-action-border-focused cursor:pointer | ||
has-[:focus]:border-action-border-focused border-halfpulse focus:border-action-border-focused focus-visible:border-action-border-focused | ||
`,variants:{size:{md:"min-h-medium gap-onepulse px-fourpulse py-onepulse text-threepulse leading-medium",ml:"min-h-mediumlarge gap-twopulse px-fourpulse py-twopulse text-threeandhalfpulse leading-small",lg:"min-h-large gap-twopulse px-fivepulse py-twopulse text-fourpulse leading-small",xl:"min-h-extralarge gap-twopulse px-sixpulse py-threepulse text-fourpulse leading-small"},hasError:{true:` | ||
bg-action-fill-neutral-tertiary-enabled border-action-border-neutral-tertiary-enabled focus:border-action-border-neutral-tertiary-enabled hover:bg-action-fill-neutral-tertiary-hovered | ||
active:border-action-border-neutral-tertiary-enabled has-[:unchecked]:border-none focus-visible:border-action-border-neutral-tertiary-enabled | ||
`},readOnly:{true:""},disabled:{true:` | ||
cursor-not-allowed border-action-fill-neutral-tertiary-disabled bg-action-fill-neutral-tertiary-disabled hover:bg-action-fill-neutral-tertiary-disabled | ||
active:bg-action-fill-neutral-tertiary-disabled active:border-action-border-neutral-tertiary-disabled focus:bg-action-fill-neutral-tertiary-disabled | ||
focus:border-action-border-neutral-tertiary-disabled focus-visible:bg-action-fill-neutral-tertiary-disabled | ||
`},hasIconOnly:{true:`justify-center min-w-[auto] gap-none | ||
`}},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:` | ||
`},{readOnly:!0,disabled:!1,class:"cursor-not-allowed bg-forms-fill-readonly ring-forms-border-readonly ring-quarterpulse"},{hasIconOnly:!0,size:"xl",class:"h-extralarge w-extralarge px-threepulse py-threepulse"},{hasIconOnly:!0,size:"lg",class:"h-large w-large px-twopulse py-twopulse"},{hasIconOnly:!0,size:"ml",class:"h-mediumlarge w-mediumlarge px-twopulse py-twopulse"},{hasIconOnly:!0,size:"md",class:"h-medium w-medium px-twopulse py-twopulse"}],defaultVariants:{size:"xl",hasError:!1,readOnly:!1,disabled:!1,hasIconOnly:!1}}),Ne=c({base:` | ||
flex justify-start items-center font-rdmodern text-text-neutral tracking-tiny font-wheight-regular text-left min-h-small line-clamp-4 mt-[5px] | ||
`,variants:{size:{md:"min-h-medium text-threepulse leading-medium",ml:"text-threeandhalfpulse leading-small",lg:"text-fourpulse leading-small",xl:"text-fourpulse leading-small"},readOnly:{true:""},disabled:{true:"cursor-not-allowed text-text-neutral-disabled",false:""},hasIconOnly:{true:"hidden"}},compoundVariants:[{readOnly:!0,disabled:!1,class:"cursor-not-allowed text-text-neutral-readonly"}],defaultVariants:{readOnly:!1,disabled:!1,hasIconOnly:!1}}),Oe=c({base:` | ||
hidden | ||
`}),Ve=c({base:` | ||
group-has-[:checked]:hidden | ||
`,variants:{size:{md:"h-tiny",ml:"h-small",lg:"h-medium",xl:"h-medium"},readOnly:{true:""},disabled:{true:"cursor-not-allowed text-text-neutral-disabled"}}}),ze=c({base:` | ||
hidden group-has-[:checked]:block | ||
`,variants:{size:{md:"h-tiny",ml:"h-small",lg:"h-medium",xl:"h-medium"},readOnly:{true:""},disabled:{true:"cursor-not-allowed text-text-neutral-disabled"}}});import{jsx as w,jsxs as Wt}from"react/jsx-runtime";var Be=e=>{let{__scopeRadio:t,name:r,value:o,checked:n,children:l,onChange:s,iconOnly:a}=e,{disabled:i,size:p="lg",id:m,readOnly:x,error:h,selectedValue:g}=N("RadioButton",t),{iconSizeMapping:S}=W(),V=Kt(null),z=n||o===g;return w("div",{className:Ce({disabled:i,readOnly:x,hasIconOnly:a,hasError:h}),children:Wt("label",{className:we({disabled:i,readOnly:x,size:p,hasIconOnly:a,hasError:h}),"aria-disabled":i,children:[w("input",{ref:V,type:"radio",className:Oe(),id:m,disabled:i,name:r,value:o,checked:z,onChange:s,defaultChecked:z}),w("span",{className:Ve({size:p}),children:w(b,{size:S[p],symbol:"rdicon-radio-button-unselected",color:i?"colorTextNeutralDisabled":"colorTextNeutralDefault"})}),w("span",{className:ze({size:p}),children:w(b,{size:S[p],symbol:"rdicon-radio-button-selected",color:i?"colorTextNeutralDisabled":"colorTextNeutralDefault"})}),!a&&l]})})};import{useMemo as Jt}from"react";var Ee=c({base:`flex w-[100%] flex-wrap items-center justify-star | ||
gap-onepulse text-left font-rdmodern font-semibold text-text-neutral-alternative text-threepulse | ||
`,variants:{size:{md:"px-fourpulse",ml:"px-fourpulse",lg:"px-fivepulse",xl:"px-sixpulse"},error:{true:"text-text-danger-alternative",false:""},readOnly:{true:"cursor-not-allowed"},disabled:{true:"hidden",false:""},iconOnly:{true:"hidden",false:""}},compoundVariants:[{readOnly:!0,disabled:!1,class:"text-text-neutral-readonly"}],defaultVariants:{error:!1,disabled:!1,readOnly:!1}});import{jsx as J,jsxs as Xt}from"react/jsx-runtime";var Me=l=>{var s=l,{withIcon:e,iconName:t="rdicon-warning-circle",children:r,__scopeRadio:o}=s,n=f(s,["withIcon","iconName","children","__scopeRadio"]);let{disabled:a,error:i,readOnly:p,size:m="lg",iconOnly:x}=N("RadioHelperText",o),h=i?"rdicon-warning-circle":t,g=Jt(()=>a?"colorTextNeutralDisabled":p?"colorTextNeutralReadonly":i?"colorTextDangerAlternative":"colorTextNeutralAlternative",[a,i,p]);return!r||!i?null:Xt("div",u(d({},n),{"aria-disabled":a,className:Ee({error:i,disabled:a,readOnly:p,size:m,iconOnly:x}),children:[e&&J("div",{className:"flex items-center",children:J(b,{symbol:h,color:g,size:"tiny"})}),J("span",{className:"flex flex-1",children:r})]}))};import{jsx as Qt}from"react/jsx-runtime";var ke=e=>{let{children:t,__scopeRadio:r}=e,{disabled:o,readOnly:n,size:l}=N("RadioLabel",r),s=a=>{let i=String(a);return i.length>=101?`${i.substring(0,100)}...`:a};return t?Qt("span",{className:Ne({disabled:o,readOnly:n,size:l}),children:s(t)}):null};import{jsx as De}from"react/jsx-runtime";var X="Radio",Le=e=>{let m=e,{size:t,children:r,disabled:o,defaultValue:n,legend:l,error:s,iconOnly:a,__scopeRadio:i}=m,p=f(m,["size","children","disabled","defaultValue","legend","error","iconOnly","__scopeRadio"]);return De(er,u(d({},e),{size:t,disabled:o,error:s,scope:i,iconOnly:a,selectedValue:n,children:De("fieldset",u(d({},p),{className:"flex flex-col border-none",children:r}))}))};Le.displayName=X;var[jt]=Zt(X),[er,N]=jt(X),tr={Root:Le,Button:Be,Label:ke,Helper:Me};import{Children as rr,isValidElement as or}from"react";var F=(e,t)=>{var o;let r=(o=rr.toArray(e))==null?void 0:o.filter(n=>or(n));return r.map((n,l)=>{let s=t.find(i=>n.type===i.child),a=r.reduce((i,p,m)=>(p==null?void 0:p.type)===n.type&&m<=l?i+1:i,0);return s&&a<=(s==null?void 0:s.amount)?n:null})};var Ae=c({base:` | ||
group flex w-[100%] items-center justify-between gap-onepulse py-threepulse duration-100 ease-in | ||
@@ -19,18 +51,18 @@ bg-forms-fill-filled ring-forms-border-filled ring-quarterpulse overflow-hidden | ||
[&: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 Vt}from"react/jsx-runtime";var Te=o=>{var n=o,{children:e,__scopeInputText:t}=n,r=m(n,["children","__scopeInputText"]);let{disabled:l,hasError:a,readOnly:s,size:i}=y("InputTextActions",t);return Vt("div",d(p({},r),{className:ve({size:i,disabled:l,readOnly:s,hasError:a}),"aria-disabled":l,"data-disabled":l,children:k(e,[{child:T.Icon,amount:2},{child:T.Field,amount:1},{child:T.ClearButton,amount:1}])}))};var Pe=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}}),Ie=c({base:"!px-none",variants:{size:{md:"!h-medium !w-medium",ml:"!h-mediumlarge !min-w-mediumlarge",lg:"!h-mediumlarge !min-w-mediumlarge",xl:"!h-mediumlarge !min-w-mediumlarge"}}});import{jsx as Y}from"react/jsx-runtime";var Se=r=>{var o=r,{__scopeInputText:e}=o,t=m(o,["__scopeInputText"]);let{size:n,disabled:l,readOnly:a}=y("InputTextClearButton",e);return Y("div",{className:Pe({size:n,disabled:l,readOnly:a}),"aria-disabled":l||a,children:Y(h.Root,d(p({},t),{size:n,disabled:l||a,variant:"neutral-tertiary",className:Ie({size:n}),children:Y(h.Icon,{symbol:"rdicon-dismiss-circle-outline"})}))})};import{forwardRef as Et}from"react";var Ce=c({base:` | ||
`},{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 nr}from"react/jsx-runtime";var Fe=o=>{var n=o,{children:e,__scopeInputText:t}=n,r=f(n,["children","__scopeInputText"]);let{disabled:l,hasError:s,readOnly:a,size:i}=y("InputTextActions",t);return nr("div",u(d({},r),{className:Ae({size:i,disabled:l,readOnly:a,hasError:s}),"aria-disabled":l,"data-disabled":l,children:F(e,[{child:I.Icon,amount:2},{child:I.Field,amount:1},{child:I.ClearButton,amount:1}])}))};var _e=c({base:"input-text-clear-button hidden invisible",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 peer-focus/field:peer-[:not(:placeholder-shown)]/field:visible group-hover:peer-[:not(:placeholder-shown)]/field:flex"}],defaultVariants:{readOnly:!1,disabled:!1}}),He=c({base:"!px-none",variants:{size:{md:"!h-medium !w-medium",ml:"!h-mediumlarge !min-w-mediumlarge",lg:"!h-mediumlarge !min-w-mediumlarge",xl:"!h-mediumlarge !min-w-mediumlarge"}}});import{jsx as Q}from"react/jsx-runtime";var qe=r=>{var o=r,{__scopeInputText:e}=o,t=f(o,["__scopeInputText"]);let{size:n,disabled:l,readOnly:s}=y("InputTextClearButton",e);return Q("div",{className:_e({size:n,disabled:l,readOnly:s}),"aria-disabled":l||s,children:Q(v.Root,u(d({},t),{size:n,disabled:l||s,variant:"neutral-tertiary",className:He({size:n}),children:Q(v.Icon,{symbol:"rdicon-dismiss-circle-outline"})}))})};import{forwardRef as ar}from"react";var Ge=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 zt}from"react/jsx-runtime";var K=Et((o,r)=>{var n=o,{__scopeInputText:e}=n,t=m(n,["__scopeInputText"]);let{disabled:l,readOnly:a,size:s}=y("InputTextField",e);return zt("input",d(p({},t),{ref:r,disabled:l,readOnly:a,placeholder:"Placeholder is hidden",className:Ce({disabled:l,readOnly:a,size:s})}))});K.displayName="InputTextField";import{useMemo as Mt}from"react";var Ne=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 U,jsxs as kt}from"react/jsx-runtime";var we=l=>{var a=l,{withIcon:e,iconName:t="rdicon-warning-circle",children:r,__scopeInputText:o}=a,n=m(a,["withIcon","iconName","children","__scopeInputText"]);let{disabled:s,hasError:i,readOnly:f}=y("InputTextHelperText",o),u=i?"rdicon-warning-circle":t,x=Mt(()=>s?"colorTextNeutralDisabled":f?"colorTextNeutralReadonly":i?"colorTextDangerAlternative":"colorTextNeutralAlternative",[s,i,f]);return r?kt("div",d(p({},n),{"aria-disabled":s,className:Ne({hasError:i,disabled:s,readOnly:f}),children:[e&&U("div",{className:"flex items-center",children:U(b,{symbol:u,color:x,size:"tiny"})}),U("span",{className:"flex flex-1",children:r})]})):null};import{useMemo as At}from"react";import{jsx as Re}from"react/jsx-runtime";function Oe(o){var n=o,{__scopeInputText:e,color:t="colorTextNeutralDefault"}=n,r=m(n,["__scopeInputText","color"]);let{size:l,hasError:a}=y("InputTextField",e),s=At(()=>{let i={md:"extra-small",ml:"small",lg:"small",xl:"small"};return i==null?void 0:i[l]},[l]);return Re("div",{className:"flex items-center",children:Re(b,d(p({},r),{color:a?"colorTextDangerAlternative":t,size:s}))})}var Be=c({base:` | ||
`,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 lr}from"react/jsx-runtime";var Z=ar((o,r)=>{var n=o,{__scopeInputText:e}=n,t=f(n,["__scopeInputText"]);let{disabled:l,readOnly:s,size:a}=y("InputTextField",e);return lr("input",u(d({},t),{ref:r,disabled:l,readOnly:s,placeholder:"Placeholder is hidden",className:Ge({disabled:l,readOnly:s,size:a})}))});Z.displayName="InputTextField";import{useMemo as sr}from"react";var $e=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 j,jsxs as ir}from"react/jsx-runtime";var Ue=l=>{var s=l,{withIcon:e,iconName:t="rdicon-warning-circle",children:r,__scopeInputText:o}=s,n=f(s,["withIcon","iconName","children","__scopeInputText"]);let{disabled:a,hasError:i,readOnly:p}=y("InputTextHelperText",o),m=i?"rdicon-warning-circle":t,x=sr(()=>a?"colorTextNeutralDisabled":p?"colorTextNeutralReadonly":i?"colorTextDangerAlternative":"colorTextNeutralAlternative",[a,i,p]);return r?ir("div",u(d({},n),{"aria-disabled":a,className:$e({hasError:i,disabled:a,readOnly:p}),children:[e&&j("div",{className:"flex items-center",children:j(b,{symbol:m,color:x,size:"tiny"})}),j("span",{className:"flex flex-1",children:r})]})):null};import{useMemo as dr}from"react";import{jsx as Ye}from"react/jsx-runtime";function Ke(o){var n=o,{__scopeInputText:e,color:t="colorTextNeutralDefault"}=n,r=f(n,["__scopeInputText","color"]);let{size:l,hasError:s}=y("InputTextField",e),a=dr(()=>{let i={md:"extra-small",ml:"small",lg:"small",xl:"small"};return i==null?void 0:i[l]},[l]);return Ye("div",{className:"flex items-center",children:Ye(b,u(d({},r),{color:s?"colorTextDangerAlternative":t,size:a}))})}var We=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 Ve}from"react/jsx-runtime";var Ee=e=>{let s=e,{__scopeInputText:t,children:r}=s,o=m(s,["__scopeInputText","children"]),{disabled:n,readOnly:l,size:a}=y("InputTextLabel",t);return r?Ve("div",{className:"flex h-extrasmall w-[100%] items-center rounded-none rounded-none border-none px-twopulse text-left",children:Ve("label",d(p({},o),{className:Be({disabled:n,readOnly:l,size:a}),"aria-disabled":n,children:r}))}):null};import{createContextScope as Ft}from"@radix-ui/react-context";import{jsx as ze}from"react/jsx-runtime";var W="InputText",Me=e=>{let{size:t="ml",children:r,__scopeInputText:o}=e;return ze(Lt,d(p({},e),{size:t,scope:o,children:ze("div",{className:"flex w-full flex-col gap-halfpulse",children:k(r,[{child:T.Label,amount:1},{child:T.Actions,amount:1},{child:T.HelperText,amount:1}])})}))};Me.displayName=W;var[Dt]=Ft(W),[Lt,y]=Dt(W),T={Root:Me,Label:Ee,Field:K,HelperText:we,Actions:Te,ClearButton:Se,Icon:Oe};import{jsx as _t}from"react/jsx-runtime";var ke=({children:e})=>_t("div",{className:"input-select-actions","data-testid":"input-name-actions",children:e});import{forwardRef as Ht,useEffect as qt,useRef as Gt,useState as Fe}from"react";var Ae=c({base:` | ||
`,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 Je}from"react/jsx-runtime";var Xe=e=>{let a=e,{__scopeInputText:t,children:r}=a,o=f(a,["__scopeInputText","children"]),{disabled:n,readOnly:l,size:s}=y("InputTextLabel",t);return r?Je("div",{className:"flex h-extrasmall w-[100%] items-center rounded-none rounded-none border-none px-twopulse text-left",children:Je("label",u(d({},o),{className:We({disabled:n,readOnly:l,size:s}),"aria-disabled":n,children:r}))}):null};import{createContextScope as pr}from"@radix-ui/react-context";import{jsx as Qe}from"react/jsx-runtime";var ee="InputText",Ze=e=>{let{size:t="ml",children:r,__scopeInputText:o}=e;return Qe(cr,u(d({},e),{size:t,scope:o,children:Qe("div",{className:"flex w-full flex-col gap-halfpulse",children:F(r,[{child:I.Label,amount:1},{child:I.Actions,amount:1},{child:I.HelperText,amount:1}])})}))};Ze.displayName=ee;var[ur]=pr(ee),[cr,y]=ur(ee),I={Root:Ze,Label:Xe,Field:Z,HelperText:Ue,Actions:Fe,ClearButton:qe,Icon:Ke};import{jsx as mr}from"react/jsx-runtime";var je=({children:e})=>mr("div",{className:"input-select-actions","data-testid":"input-name-actions",children:e});import{forwardRef as fr,useEffect as xr,useRef as br,useState as tt}from"react";var et=c({base:` | ||
flex justify-between w-full h-extrasmall p-none px-twopulse items-center text-text-neutral font-rdmodern flex-1 rounded-none leading-small z-80 | ||
placeholder:opacity-transparent focus-visible:border-none focus-visible:outline-none tracking-onepulse | ||
`,variants:{size:{md:"text-threepulse",ml:"text-threeandhalfpulse",lg:"text-threeandhalfpulse",xl:"text-threeandhalfpulse"},readOnly:{true:"text-text-neutral-readonly",false:""},disabled:{true:"text-text-neutral-disabled",false:""},hasError:{true:"bg-forms-fill-error",false:"bg-forms-fill-filled"}},defaultVariants:{size:"md",readOnly:!1,disabled:!1,hasError:!1}});import{jsx as w,jsxs as De}from"react/jsx-runtime";var J=Ht((n,o)=>{var l=n,{children:e,__scopeInputSelect:t}=l,r=m(l,["children","__scopeInputSelect"]);var se;let{size:a,hasError:s,disabled:i,readOnly:f,options:u=[{label:"teste1"},{label:"teste2"},{label:"teste3"}]}=g("InputSelectField",t),[x,S]=Fe(!1),[P,V]=Fe(u[0]),L=Gt(null);qt(()=>{function v(_){L.current&&!L.current.contains(_.target)&&S(!1)}return document.addEventListener("mousedown",v),()=>{document.removeEventListener("mousedown",v)}},[]);let pt=v=>{V(v),S(!1)},ae=()=>{!i&&!f&&S(!x)};return De("div",{ref:L,className:"relative flex w-full flex-col",children:[De("div",{className:Ae(p({size:a,hasError:s,readOnly:f,disabled:i},r)),onClick:()=>ae(),onKeyUp:()=>ae(),"data-testid":"select-field",children:[P?P.label:(se=u[0])==null?void 0:se.label,w(X.Icon,{symbol:x?"rdicon-chevron-up":"rdicon-chevron-down",color:i?"colorTextNeutralDisabled":f?"colorTextNeutralReadonly":"colorTextNeutralDefault"})]}),x&&w("div",{className:"x-full absolute top-full left-0 z-10 w-full py-fivepulse",children:w(R.Root,d(p({type:"single"},r),{children:w(R.List,{children:u==null?void 0:u.map((v,_)=>w(R.Item,{content:{label:v.label},onPress:()=>pt(v),disabled:i},`${v.label}-${_}`))})}))})]})});J.displayName="InputSelectField";var Le=c({base:` | ||
`,variants:{size:{md:"text-threepulse",ml:"text-threeandhalfpulse",lg:"text-threeandhalfpulse",xl:"text-threeandhalfpulse"},readOnly:{true:"text-text-neutral-readonly",false:""},disabled:{true:"text-text-neutral-disabled",false:""},hasError:{true:"bg-forms-fill-error",false:"bg-forms-fill-filled"}},defaultVariants:{size:"md",readOnly:!1,disabled:!1,hasError:!1}});import{jsx as B,jsxs as rt}from"react/jsx-runtime";var te=fr((n,o)=>{var l=n,{children:e,__scopeInputSelect:t}=l,r=f(l,["children","__scopeInputSelect"]);var me;let{size:s,hasError:a,disabled:i,readOnly:p,options:m=[{label:"teste1"},{label:"teste2"},{label:"teste3"}]}=T("InputSelectField",t),[x,h]=tt(!1),[g,S]=tt(m[0]),V=br(null);xr(()=>{function P(G){V.current&&!V.current.contains(G.target)&&h(!1)}return document.addEventListener("mousedown",P),()=>{document.removeEventListener("mousedown",P)}},[]);let ce=P=>{S(P),h(!1)},z=()=>{!i&&!p&&h(!x)};return rt("div",{ref:V,className:"relative flex w-full flex-col",children:[rt("div",{className:et(d({size:s,hasError:a,readOnly:p,disabled:i},r)),onClick:()=>z(),onKeyUp:()=>z(),"data-testid":"select-field",children:[g?g.label:(me=m[0])==null?void 0:me.label,B(re.Icon,{symbol:x?"rdicon-chevron-up":"rdicon-chevron-down",color:i?"colorTextNeutralDisabled":p?"colorTextNeutralReadonly":"colorTextNeutralDefault"})]}),x&&B("div",{className:"x-full absolute top-full left-0 z-10 w-full py-fivepulse",children:B(E.Root,u(d({type:"single"},r),{children:B(E.List,{children:m==null?void 0:m.map((P,G)=>B(E.Item,{content:{label:P.label},onPress:()=>ce(P),disabled:i},`${P.label}-${G}`))})}))})]})});te.displayName="InputSelectField";var ot=c({base:` | ||
flex w-full bg-forms-fill-filled border-forms-border-filled px-onepulse py-threepulse items-center gap-none self-stretch rounded-form border opacity-opaque group hover:border-halfpulse | ||
`,variants:{size:{md:"text-threepulse h-medium",ml:"text-threeandhalfpulse h-mediumlarge",lg:"text-hreeandhalfpulse h-large",xl:"text-threeandhalfpulse h-extralarge"},readOnly:{true:"text-text-neutral-readonly bg-forms-fill-readonly border-forms-border-readonly hover:border-quarterpulse",false:""},disabled:{true:"text-text-neutral-disabled bg-forms-fill-disabled border-forms-border-disabled hover:border-quarterpulse",false:""},hasError:{true:"border-quarterpulse bg-forms-fill-error border-forms-border-error",false:"border-quarterpulse"}},defaultVariants:{}});import{jsx as $t}from"react/jsx-runtime";var _e=({__scopeInputSelect:e,children:t})=>{let{hasError:r,size:o,disabled:n,readOnly:l}=g("InputSelectHelperText",e);return $t("div",{"data-testid":"select-field-container",className:Le({hasError:r,size:o,disabled:n,readOnly:l}),children:t})};import{useMemo as Yt}from"react";var He=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 tracking-inline-onepulse",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 Q,jsxs as Kt}from"react/jsx-runtime";var qe=l=>{var a=l,{withIcon:e,iconName:t="rdicon-warning-circle",__scopeInputSelect:r,children:o}=a,n=m(a,["withIcon","iconName","__scopeInputSelect","children"]);let{hasError:s,readOnly:i,disabled:f}=g("InputSelectHelperText",r),u=s?"rdicon-warning-circle":t,x=Yt(()=>f?"colorTextNeutralDisabled":i?"colorTextNeutralReadonly":s?"colorTextDangerAlternative":"colorTextNeutralAlternative",[f,s,i]);return o?Kt("div",d(p({},n),{"aria-disabled":f,className:He({hasError:s,disabled:f,readOnly:i}),children:[e&&Q("div",{className:"flex items-center",children:Q(b,{symbol:u,color:x,size:"tiny"})}),Q("span",{className:"flex flex-1",children:o})]})):null};import Ut from"react";import{jsx as Ge}from"react/jsx-runtime";function $e(o){var n=o,{__scopeInputSelect:e,color:t="colorTextNeutralDefault"}=n,r=m(n,["__scopeInputSelect","color"]);let{size:l,hasError:a,disabled:s,readOnly:i}=g("InputSelectField",e),f=Ut.useMemo(()=>{let u={md:"small",ml:"small",lg:"small",xl:"small"};return u==null?void 0:u[l]},[l]);return Ge("div",{className:"flex w-6 h-6 justify-center items-center rounded-none opacity-100 h-small",children:Ge(b,d(p({},r),{size:f,color:a?"colorTextDangerAlternative":s?"colorTextNeutralDisabled":i?"colorTextNeutralReadonly":"colorTextNeutralDefault"}))})}var Ye=c({base:` | ||
`,variants:{size:{md:"text-threepulse h-medium",ml:"text-threeandhalfpulse h-mediumlarge",lg:"text-hreeandhalfpulse h-large",xl:"text-threeandhalfpulse h-extralarge"},readOnly:{true:"text-text-neutral-readonly bg-forms-fill-readonly border-forms-border-readonly hover:border-quarterpulse",false:""},disabled:{true:"text-text-neutral-disabled bg-forms-fill-disabled border-forms-border-disabled hover:border-quarterpulse",false:""},hasError:{true:"border-quarterpulse bg-forms-fill-error border-forms-border-error",false:"border-quarterpulse"}},defaultVariants:{}});import{jsx as yr}from"react/jsx-runtime";var nt=({__scopeInputSelect:e,children:t})=>{let{hasError:r,size:o,disabled:n,readOnly:l}=T("InputSelectHelperText",e);return yr("div",{"data-testid":"select-field-container",className:ot({hasError:r,size:o,disabled:n,readOnly:l}),children:t})};import{useMemo as hr}from"react";var at=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 tracking-inline-onepulse",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 oe,jsxs as gr}from"react/jsx-runtime";var lt=l=>{var s=l,{withIcon:e,iconName:t="rdicon-warning-circle",__scopeInputSelect:r,children:o}=s,n=f(s,["withIcon","iconName","__scopeInputSelect","children"]);let{hasError:a,readOnly:i,disabled:p}=T("InputSelectHelperText",r),m=a?"rdicon-warning-circle":t,x=hr(()=>p?"colorTextNeutralDisabled":i?"colorTextNeutralReadonly":a?"colorTextDangerAlternative":"colorTextNeutralAlternative",[p,a,i]);return o?gr("div",u(d({},n),{"aria-disabled":p,className:at({hasError:a,disabled:p,readOnly:i}),children:[e&&oe("div",{className:"flex items-center",children:oe(b,{symbol:m,color:x,size:"tiny"})}),oe("span",{className:"flex flex-1",children:o})]})):null};import vr from"react";import{jsx as st}from"react/jsx-runtime";function it(o){var n=o,{__scopeInputSelect:e,color:t="colorTextNeutralDefault"}=n,r=f(n,["__scopeInputSelect","color"]);let{size:l,hasError:s,disabled:a,readOnly:i}=T("InputSelectField",e),p=vr.useMemo(()=>{let m={md:"small",ml:"small",lg:"small",xl:"small"};return m==null?void 0:m[l]},[l]);return st("div",{className:"flex w-6 h-6 justify-center items-center rounded-none opacity-100 h-small",children:st(b,u(d({},r),{size:p,color:s?"colorTextDangerAlternative":a?"colorTextNeutralDisabled":i?"colorTextNeutralReadonly":"colorTextNeutralDefault"}))})}var dt=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 Ke}from"react/jsx-runtime";var Ue=({htmlFor:e,__scopeInputSelect:t,children:r})=>{let{size:o,disabled:n,readOnly:l}=g("InputSelectLabel",t);return Ke("div",{className:"flex h-extrasmall w-[100%] items-center rounded-none rounded-none border-none px-twopulse text-left",children:Ke("label",{htmlFor:e,className:Ye({disabled:n,readOnly:l,size:o}),"data-testid":"testid-label",children:r})})};import{createContextScope as Wt}from"@radix-ui/react-context";import{jsx as We}from"react/jsx-runtime";var Z="Select",Je=e=>{let{size:t="md",hasError:r=!1,disabled:o=!1,__scopeInputSelect:n,options:l,children:a}=e;return We(Xt,d(p({},e),{size:t,scope:n,hasError:r,disabled:o,options:l,children:We("div",{className:`flex w-[244px] min-w-[80px] p-none flex-col items-start gap-halfpulse flex-shrink-0 rounded-none border-none opacity-opaque bg-transparent font-rdmodern text-align-center | ||
size-${t}`,children:a})}))};Je.displayName=Z;var[Jt]=Wt(Z),[Xt,g]=Jt(Z),X={Root:Je,Label:Ue,FieldContainer:_e,Icon:$e,Field:J,Actions:ke,HelperText:qe};import{jsx as Xe}from"react/jsx-runtime";var N=()=>Xe("div",{className:"x-full flex py-onepulse","data-testid":"separator",children:Xe("div",{className:"flex-1 border-border-neutral border-hairline","data-testid":"divider-line"})});import{jsx as Qe}from"react/jsx-runtime";var j=({controls:e,testID:t})=>Qe("div",{"data-testid":t,className:"x-full flex items-center gap-threepulse border-border-neutral border-t-hairline bg-fill-neutral p-threepulse ",children:e.slice(0,2).map((r,o)=>{let n=r.type==="confirm"?"brand-primary":"neutral-tertiary";return Qe(h.Root,{size:"lg",variant:n,onClick:r.handler,children:r.label},String(o))})});import{createContextScope as rr}from"@radix-ui/react-context";import oe from"react";import{jsx as ee,jsxs as Qt}from"react/jsx-runtime";function A({children:e,title:t}){let r=!!(t!=null&&t.length);return Qt("div",{className:"flex flex-col",children:[ee(N,{}),ee("div",{className:"px-fivepulse py-twopulse",children:r&&ee("h2",{className:"font-bold text-rdmodern text-text-neutral-readonly text-threeandhalfpulse leading-small",children:t})}),e]})}import{useCallback as et,useState as Zt}from"react";var Ze=c({base:"flex items-center space-x-2",variants:{type:{single:"px-twopulse py-onepulse",multi:"px-twopulse py-onepulse"}}}),vl=c({base:"p-onepulse gap-onepulse"}),je=c({base:["bg-action-fill-neutral-tertiary-enabled","border-border-neutral-tertiary-enabled","border-none","duration-100 ease-in","focus:border-x-halfpulse","focus:border-y-halfpulse","focus:border-action-border-focused","focus:rounded-pill","hover:bg-action-fill-neutral-tertiary-hovered","hover:border-action-border-neutral-tertiary-hovered","hover:rounded-pill","disabled:cursor-not-allowed","disabled:bg-action-fill-neutral-tertiary-disabled","disabled:border-action-border-neutral-tertiary-disabled","disabled:border-none","active:bg-action-fill-neutral-tertiary-pressed","active:border-action-border-neutral-tertiary-pressed","active:rounded-pill","px-twopulse","py-onepulse"]});import{jsx as I,jsxs as tt}from"react/jsx-runtime";function F({type:e="single",content:t,checked:r,disabled:o,testID:n,onPress:l}){let[a,s]=Zt(!1),i=!!t.prefixIcon,f=!!t.description,u=et(()=>s(!0),[]),x=et(()=>s(!1),[]),S=P=>{let V=i?23:25;return P&&P.length>V?`${P.substr(0,V)}...`:P};return I("button",{onMouseDown:u,onMouseUp:x,onClick:l,"data-testid":n,disabled:o,type:"button",className:je(),children:tt("div",{className:Ze({type:e}),children:[e==="multi"&&I("div",{className:"flex items-center p-onepulse",children:I(b,{symbol:r?"rdicon-checkbox-checked":"rdicon-checkbox-unchecked",color:o?"colorTextNeutralDisabled":r?"colorActionFillBrandPrimaryEnabled":"colorTextNeutralDefault",size:"small"})}),i&&I(b,{symbol:t.prefixIcon,color:o?"colorTextNeutralDisabled":"colorTextNeutralDefault",size:"small"}),tt("div",{className:"flex flex-1 flex-col items-start gap-halfpulse p-onepulse ",children:[I("p",{className:`tracking font-rdmodern font-regular text-threeandhalfpulse leading-small ${o?"text-text-neutral-disabled":"text-text-neutral"}`,children:t.label}),f&&I("p",{className:`tracking font-rdmodern font-regular text-threepulse leading-small ${o?"text-text-neutral-disabled":"text-text-neutral-placeholder"}`,children:S(t.description)})]}),e==="single"&&r&&I(b,{symbol:"rdicon-checkmark",color:"colorTextSuccessAlternative",size:"small"})]})})}import D from"react";import jt from"react";function te(e){return jt.isValidElement(e)&&e.type===F}import{jsx as tr}from"react/jsx-runtime";var er="Only Fragment, OptionMenu.Item and Group components are allowed as children of OptionMenu.List. Please remove or replace any other elements.";function re(e){let{__scopeOptionMenu:t,children:r,testID:o}=e,n=C(),{type:l}=rt("OptionMenuList",t),a=[];return D.Children.forEach(r,s=>{if(D.isValidElement(s)){if(s.type===D.Fragment){let i=s.props.children;a.push(i);return}if(te(s)||s.type===A||s.type===N)a.push(s);else throw new Error(er)}}),a=a.map(s=>te(s)?D.cloneElement(s,{key:((1+Math.random())*65536|0).toString(16).substring(1),type:l}):s),tr("div",{className:`flex flex-col py-onepulse overflow-y-scroll max-h-[480px] px-onepulse ${n.spacingInlineOnepulse}`,"data-testid":o,children:a})}import{jsx as O}from"react/jsx-runtime";var ot="OptionMenu",or=e=>{let{type:t,children:r,customEmptyMessage:o="N\xE3o foi encontrado nenhum resultado.",testID:n,__scopeOptionMenu:l}=e,a=oe.Children.map(r,s=>{if(oe.isValidElement(s)&&(s.type===re||s.type===j))return s});return O(lr,{scope:l,type:t,"data-testid":n,children:O("div",{className:"rounded-form border-border-neutral border-quarterpulse bg-fill-neutral py-onepulse ",children:oe.Children.count(r)>0?O("div",{className:"flex-grow",children:a}):O("div",{className:"flex items-start justify-center",children:O("p",{className:"tracking px-onepulse py-twopulse font-regular text-rdmodern text-text-neutral text-threeandhalfpulse leading-small",children:o})})})})},[nr]=rr(ot),[lr,rt]=nr(ot),R={Root:or,Footer:j,Divider:N,Item:F,List:re,Group:A};import{useMemo as sr}from"react";import{jsx as nt}from"react/jsx-runtime";var ne=n=>{var l=n,{control:e,children:t,disabled:r}=l,o=m(l,["control","children","disabled"]);return nt("a",d(p({},o),{"aria-disabled":r,href:e==null?void 0:e.href,children:nt(h.Root,{type:"button",disabled:r,variant:"neutral-secondary",size:"lg",onClick:e==null?void 0:e.onClickEvent,children:t})}))};var lt=c({base:["flex h-large w-medium items-center justify-center max-sm:hidden","text-center font-bold font-rdmodern text-threeandhalfpulse leading-small tracking-default"]});import{jsx as ar}from"react/jsx-runtime";var at=()=>ar("li",{className:lt(),children:"..."});var st=c({base:"flex p-none",variants:{hasCurrent:{false:"max-sm:hidden"}},defaultVariants:{hasCurrent:!1}});import{jsx as le}from"react/jsx-runtime";var it=l=>{var a=l,{children:e,hasCurrent:t,href:r,item:o}=a,n=m(a,["children","hasCurrent","href","item"]);return le("li",{className:st({hasCurrent:t}),children:le("a",{href:r,"aria-label":`P\xE1gina ${o}`,"aria-current":t,children:le(h.Root,d(p({},n),{type:"button",variant:"neutral-tertiary",size:"lg","data-active":t,className:"data-[active=true]:bg-action-fill-neutral-tertiary-activated",children:o}))})})};import{jsx as B,jsxs as pr}from"react/jsx-runtime";var ir=({current:e,total:t,pagesMapper:r,onPageClick:o,prevControl:n,nextControl:l})=>{let a=sr(()=>{var f;let s=new Set([1,Number(e),Number(t)]),i=(f=Array.from(s))==null?void 0:f.map(u=>({id:u,page:r==null?void 0:r[u-1]}));return i==null?void 0:i.filter(u=>{var x;return!!((x=u==null?void 0:u.page)!=null&&x.href)})},[e,t,r]);return pr("nav",{className:"flex flex-row items-center gap-[var(--spacing-inline-twopulse)] max-sm:gap-[var(--spacing-inline-threepulse)]",children:[B(ne,{control:n,disabled:e===1,"aria-label":"Anterior",children:"Anterior"}),B("ol",{className:"flex flex-row items-center justify-start gap-[var(--spacing-inline-onepulse)]",children:a.map(({id:s,page:i},f)=>{let u=s===e,x=a==null?void 0:a[f-1];return[!!x&&s-(x==null?void 0:x.id)>1&&B(at,{},`${s}-ellipse`),B(it,{item:s,hasCurrent:u,href:i==null?void 0:i.href,onClick:o},s)]})}),B(ne,{control:l,disabled:e===t,"aria-label":"Pr\xF3ximo",children:"Pr\xF3ximo"})]})};export{h as Button,b as Icon,T as InputText,R as OptionMenu,ir as Pagination,fe as Refresh,X as Select,H as ThemeContext,ur as ThemeProvider}; | ||
`,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 pt}from"react/jsx-runtime";var ut=({htmlFor:e,__scopeInputSelect:t,children:r})=>{let{size:o,disabled:n,readOnly:l}=T("InputSelectLabel",t);return pt("div",{className:"flex h-extrasmall w-[100%] items-center rounded-none rounded-none border-none px-twopulse text-left",children:pt("label",{htmlFor:e,className:dt({disabled:n,readOnly:l,size:o}),"data-testid":"testid-label",children:r})})};import{createContextScope as Tr}from"@radix-ui/react-context";import{jsx as ct}from"react/jsx-runtime";var ne="Select",mt=e=>{let{size:t="md",hasError:r=!1,disabled:o=!1,__scopeInputSelect:n,options:l,children:s}=e;return ct(Ir,u(d({},e),{size:t,scope:n,hasError:r,disabled:o,options:l,children:ct("div",{className:`flex w-[244px] min-w-[80px] p-none flex-col items-start gap-halfpulse flex-shrink-0 rounded-none border-none opacity-opaque bg-transparent font-rdmodern text-align-center | ||
size-${t}`,children:s})}))};mt.displayName=ne;var[Pr]=Tr(ne),[Ir,T]=Pr(ne),re={Root:mt,Label:ut,FieldContainer:nt,Icon:it,Field:te,Actions:je,HelperText:lt};import{jsx as ft}from"react/jsx-runtime";var O=()=>ft("div",{className:"x-full flex py-onepulse","data-testid":"separator",children:ft("div",{className:"flex-1 border-border-neutral border-hairline","data-testid":"divider-line"})});import{jsx as xt}from"react/jsx-runtime";var ae=({controls:e,testID:t})=>xt("div",{"data-testid":t,className:"x-full flex items-center gap-threepulse border-border-neutral border-t-hairline bg-fill-neutral p-threepulse ",children:e.slice(0,2).map((r,o)=>{let n=r.type==="confirm"?"brand-primary":"neutral-tertiary";return xt(v.Root,{size:"lg",variant:n,onClick:r.handler,children:r.label},String(o))})});import{createContextScope as Or}from"@radix-ui/react-context";import de from"react";import{jsx as le,jsxs as Sr}from"react/jsx-runtime";function _({children:e,title:t}){let r=!!(t!=null&&t.length);return Sr("div",{className:"flex flex-col",children:[le(O,{}),le("div",{className:"px-fivepulse py-twopulse",children:r&&le("h2",{className:"font-bold text-rdmodern text-text-neutral-readonly text-threeandhalfpulse leading-small",children:t})}),e]})}import{useCallback as ht,useState as Rr}from"react";var bt=c({base:"flex items-center space-x-2",variants:{type:{single:"px-twopulse py-onepulse",multi:"px-twopulse py-onepulse"}}}),Cl=c({base:"p-onepulse gap-onepulse"}),yt=c({base:["bg-action-fill-neutral-tertiary-enabled","border-border-neutral-tertiary-enabled","border-none","duration-100 ease-in","focus:border-x-halfpulse","focus:border-y-halfpulse","focus:border-action-border-focused","focus:rounded-pill","hover:bg-action-fill-neutral-tertiary-hovered","hover:border-action-border-neutral-tertiary-hovered","hover:rounded-pill","disabled:cursor-not-allowed","disabled:bg-action-fill-neutral-tertiary-disabled","disabled:border-action-border-neutral-tertiary-disabled","disabled:border-none","active:bg-action-fill-neutral-tertiary-pressed","active:border-action-border-neutral-tertiary-pressed","active:rounded-pill","px-twopulse","py-onepulse"]});import{jsx as R,jsxs as gt}from"react/jsx-runtime";function H({type:e="single",content:t,checked:r,disabled:o,testID:n,onPress:l}){let[s,a]=Rr(!1),i=!!t.prefixIcon,p=!!t.description,m=ht(()=>a(!0),[]),x=ht(()=>a(!1),[]),h=g=>{let S=i?23:25;return g&&g.length>S?`${g.substr(0,S)}...`:g};return R("button",{onMouseDown:m,onMouseUp:x,onClick:l,"data-testid":n,disabled:o,type:"button",className:yt(),children:gt("div",{className:bt({type:e}),children:[e==="multi"&&R("div",{className:"flex items-center p-onepulse",children:R(b,{symbol:r?"rdicon-checkbox-checked":"rdicon-checkbox-unchecked",color:o?"colorTextNeutralDisabled":r?"colorActionFillBrandPrimaryEnabled":"colorTextNeutralDefault",size:"small"})}),i&&R(b,{symbol:t.prefixIcon,color:o?"colorTextNeutralDisabled":"colorTextNeutralDefault",size:"small"}),gt("div",{className:"flex flex-1 flex-col items-start gap-halfpulse p-onepulse ",children:[R("p",{className:`tracking font-rdmodern font-regular text-threeandhalfpulse leading-small ${o?"text-text-neutral-disabled":"text-text-neutral"}`,children:t.label}),p&&R("p",{className:`tracking font-rdmodern font-regular text-threepulse leading-small ${o?"text-text-neutral-disabled":"text-text-neutral-placeholder"}`,children:h(t.description)})]}),e==="single"&&r&&R(b,{symbol:"rdicon-checkmark",color:"colorTextSuccessAlternative",size:"small"})]})})}import q from"react";import Cr from"react";function se(e){return Cr.isValidElement(e)&&e.type===H}import{jsx as Nr}from"react/jsx-runtime";var wr="Only Fragment, OptionMenu.Item and Group components are allowed as children of OptionMenu.List. Please remove or replace any other elements.";function ie(e){let{__scopeOptionMenu:t,children:r,testID:o}=e,n=C(),{type:l}=vt("OptionMenuList",t),s=[];return q.Children.forEach(r,a=>{if(q.isValidElement(a)){if(a.type===q.Fragment){let i=a.props.children;s.push(i);return}if(se(a)||a.type===_||a.type===O)s.push(a);else throw new Error(wr)}}),s=s.map(a=>se(a)?q.cloneElement(a,{key:((1+Math.random())*65536|0).toString(16).substring(1),type:l}):a),Nr("div",{className:`flex flex-col py-onepulse overflow-y-scroll max-h-[480px] px-onepulse ${n.spacingInlineOnepulse}`,"data-testid":o,children:s})}import{jsx as M}from"react/jsx-runtime";var Tt="OptionMenu",Vr=e=>{let{type:t,children:r,customEmptyMessage:o="N\xE3o foi encontrado nenhum resultado.",testID:n,__scopeOptionMenu:l}=e,s=de.Children.map(r,a=>{if(de.isValidElement(a)&&(a.type===ie||a.type===ae))return a});return M(Br,{scope:l,type:t,"data-testid":n,children:M("div",{className:"rounded-form border-border-neutral border-quarterpulse bg-fill-neutral py-onepulse ",children:de.Children.count(r)>0?M("div",{className:"flex-grow",children:s}):M("div",{className:"flex items-start justify-center",children:M("p",{className:"tracking px-onepulse py-twopulse font-regular text-rdmodern text-text-neutral text-threeandhalfpulse leading-small",children:o})})})})},[zr]=Or(Tt),[Br,vt]=zr(Tt),E={Root:Vr,Footer:ae,Divider:O,Item:H,List:ie,Group:_};import{useMemo as Mr}from"react";import{jsx as Pt}from"react/jsx-runtime";var pe=n=>{var l=n,{control:e,children:t,disabled:r}=l,o=f(l,["control","children","disabled"]);return Pt("a",u(d({},o),{"aria-disabled":r,href:e==null?void 0:e.href,children:Pt(v.Root,{type:"button",disabled:r,variant:"neutral-secondary",size:"lg",onClick:e==null?void 0:e.onClickEvent,children:t})}))};var It=c({base:["flex h-large w-medium items-center justify-center max-sm:hidden","text-center font-bold font-rdmodern text-threeandhalfpulse leading-small tracking-default"]});import{jsx as Er}from"react/jsx-runtime";var St=()=>Er("li",{className:It(),children:"..."});var Rt=c({base:"flex p-none",variants:{hasCurrent:{false:"max-sm:hidden"}},defaultVariants:{hasCurrent:!1}});import{jsx as ue}from"react/jsx-runtime";var Ct=l=>{var s=l,{children:e,hasCurrent:t,href:r,item:o}=s,n=f(s,["children","hasCurrent","href","item"]);return ue("li",{className:Rt({hasCurrent:t}),children:ue("a",{href:r,"aria-label":`P\xE1gina ${o}`,"aria-current":t,children:ue(v.Root,u(d({},n),{type:"button",variant:"neutral-tertiary",size:"lg","data-active":t,className:"data-[active=true]:bg-action-fill-neutral-tertiary-activated",children:o}))})})};import{jsx as k,jsxs as Dr}from"react/jsx-runtime";var kr=({current:e,total:t,pagesMapper:r,onPageClick:o,prevControl:n,nextControl:l})=>{let s=Mr(()=>{var p;let a=new Set([1,Number(e),Number(t)]),i=(p=Array.from(a))==null?void 0:p.map(m=>({id:m,page:r==null?void 0:r[m-1]}));return i==null?void 0:i.filter(m=>{var x;return!!((x=m==null?void 0:m.page)!=null&&x.href)})},[e,t,r]);return Dr("nav",{className:"flex flex-row items-center gap-[var(--spacing-inline-twopulse)] max-sm:gap-[var(--spacing-inline-threepulse)]",children:[k(pe,{control:n,disabled:e===1,"aria-label":"Anterior",children:"Anterior"}),k("ol",{className:"flex flex-row items-center justify-start gap-[var(--spacing-inline-onepulse)]",children:s.map(({id:a,page:i},p)=>{let m=a===e,x=s==null?void 0:s[p-1];return[!!x&&a-(x==null?void 0:x.id)>1&&k(St,{},`${a}-ellipse`),k(Ct,{item:a,hasCurrent:m,href:i==null?void 0:i.href,onClick:o},a)]})}),k(pe,{control:l,disabled:e===t,"aria-label":"Pr\xF3ximo",children:"Pr\xF3ximo"})]})};export{v as Button,b as Icon,I as InputText,E as OptionMenu,kr as Pagination,tr as Radio,ve as Refresh,re as Select,$ as ThemeContext,Fr as ThemeProvider}; | ||
//# sourceMappingURL=index.js.map |
{ | ||
"name": "@rdsaude/pulso-react-components", | ||
"version": "1.3.0", | ||
"version": "1.4.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
386985
2727