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.

1 lines 56.5 kB
{"version":3,"sources":["../../../src/components/input-text/index.ts","../../../src/components/input-text/utils/render-composition-children.tsx","../../../src/utils/tv.ts","../../../src/components/input-text/components/input-text-actions/index.styles.ts","../../../src/components/input-text/components/input-text-actions/index.tsx","../../../src/components/button/namespace.ts","../../../src/components/button/button-root.tsx","../../../src/hooks/use-enhanced-children.ts","../../../src/utils/inject-props-to-children.ts","../../../src/utils/cn.ts","../../../src/components/refresh/index.tsx","../../../src/hooks/use-theme.ts","../../../src/components/theme-provider/index.tsx","../../../src/components/button/button.styles.ts","../../../src/components/button/button-icon.tsx","../../../src/components/icon/index.tsx","../../../src/components/icon-dual-color/namespace.ts","../../../src/components/icon-dual-color/icon-dual-color-root.tsx","../../../src/components/icon-dual-color/icon-dual-color-top.tsx","../../../src/components/icon-dual-color/icon-dual-color-bottom.tsx","../../../src/components/button/button-icon-dual-color.tsx","../../../src/components/input-text/components/input-text-clear-button/index.styles.ts","../../../src/components/input-text/components/input-text-clear-button/index.tsx","../../../src/components/input-text/components/input-text-field/index.tsx","../../../src/components/input-text/components/input-text-field/index.styles.ts","../../../src/components/input-text/components/input-text-helpertext/index.tsx","../../../src/components/input-text/components/input-text-helpertext/index.styles.ts","../../../src/components/input-text/components/input-text-icon/index.tsx","../../../src/components/input-text/components/input-text-label/index.styles.ts","../../../src/components/input-text/components/input-text-label/index.tsx","../../../src/components/input-text/input-text.tsx"],"sourcesContent":["export { InputText } from './input-text'\nexport type { InputTextProps } from './input-text.types'\n","import { Children, isValidElement } from 'react'\n\n// biome-ignore lint/suspicious/noExplicitAny:\ntype Child = React.JSXElementConstructor<any>\n\nexport type IValidChildComponents = {\n /**\n * Representa o filho que pode ser renderizado\n */\n child: Child\n /**\n * Representa a quantidade de vezes que esse componente pode ser renderizado\n */\n amount: number\n}\n\n/**\n *\n * @param children Filhos do componente a ser validado\n * @param validComponents Array com os componentes que podem serem realizados\n * @returns filhos validos\n */\nexport const renderCompositionChildren = (\n children: React.ReactNode,\n validComponents: IValidChildComponents[]\n) => {\n const childrenArray = Children.toArray(children)?.filter(child =>\n isValidElement(child)\n )\n\n return childrenArray.map((child, index) => {\n const validComponent = validComponents.find(\n component => child.type === component.child\n )\n\n // Representa quantos items válidos tem antes do index desse componente\n const childAmount = childrenArray.reduce<number>((acc, c, cIndex) => {\n if (c?.type === child.type && cIndex <= index) {\n return acc + 1\n }\n\n return acc\n }, 0)\n\n /**\n * Se o child for um component valido e estiver antes da quantidade\n * permitida, deve ser renderizado.\n */\n if (validComponent && childAmount <= validComponent?.amount) return child\n\n return null\n })\n}\n","import { type VariantProps, createTV } from 'tailwind-variants'\n\nexport const tv = createTV({\n twMerge: true,\n twMergeConfig: {\n extend: {\n classGroups: {\n 'font-size': [\n {\n text: ['threepulse', 'threeandhalfpulse'],\n },\n ],\n 'border-width': [\n {\n border: ['quarterpulse', 'halfpulse'],\n },\n ],\n '--tw-ring-inset': [\n {\n ring: ['none', 'quarterpulse', 'halfpulse'],\n },\n ],\n },\n },\n },\n})\n\nexport type { VariantProps }\n","import { tv } from '~/utils/tv'\n\nexport const inputTextActionsVariants = tv({\n base: `\n group flex w-[100%] items-center justify-between gap-onepulse py-threepulse duration-100 ease-in\n bg-forms-filled ring-forms-border-filled ring-quarterpulse overflow-hidden\n focus-within:ring-halfpulse focus-within:bg-forms-fill-focused min-w-[calc(var(--sizing-huge)_+_var(--sizing-tiny))]\n `,\n variants: {\n size: {\n md: 'h-medium rounded-form px-twopulse',\n ml: 'h-mediumlarge rounded-form px-threepulse',\n lg: 'h-large rounded-form px-threepulse',\n xl: 'h-extralarge rounded-largecontainer px-threepulse',\n },\n readOnly: {\n true: '',\n },\n hasError: {\n true: '',\n },\n filled: {\n true: '',\n },\n active: {\n true: '',\n },\n disabled: {\n true: 'cursor-not-allowed ring-forms-border-disabled ring-quarterpulse',\n },\n },\n compoundVariants: [\n {\n readOnly: false,\n disabled: false,\n hasError: false,\n class: `\n [&:not(:focus-within)]:has-[:placeholder-shown]:bg-forms-fill\n [&:not(:focus-within)]:has-[:placeholder-shown]:hover:bg-forms-fill-hovered\n `,\n },\n {\n hasError: false,\n readOnly: false,\n disabled: false,\n class: `\n focus-within:ring-action-border-focused hover:ring-halfpulse\n [&:not(:focus-within)]:has-[:placeholder-shown]:ring-forms-border\n [&:not(:focus-within)]:has-[:placeholder-shown]:hover:ring-forms-border-hovered\n [&:not(:focus-within)]:has-[:placeholder-shown]:ring-none\n `,\n },\n {\n readOnly: true,\n disabled: false,\n class:\n 'cursor-not-allowed bg-forms-fill-readonly ring-forms-border-readonly ring-quarterpulse',\n },\n {\n hasError: true,\n filled: true,\n active: false,\n class: 'bg-forms-fill-error ring-forms-border-error hover:ring-halfpulse',\n },\n {\n hasError: true,\n active: true,\n class:\n 'bg-forms-fill-error ring-forms-border-error ring-halfpulse hover:bg-forms-fill-error hover:ring-halfpulse',\n },\n {\n hasError: true,\n filled: false,\n active: false,\n class:\n 'bg-forms-fill ring-forms-border-error hover:bg-forms-fill-hovered hover:ring-bg-forms-hovered hover:ring-halfpulse',\n },\n ],\n defaultVariants: {\n size: 'ml',\n isFocused: false,\n hasError: false,\n readOnly: false,\n disabled: false,\n },\n})\n","import { InputText, useInputTextContext } from '../../input-text'\nimport type {\n InputTextActionsProps,\n InputTextScopedProps,\n} from '../../input-text.types'\nimport { renderCompositionChildren } from '../../utils/render-composition-children'\nimport { inputTextActionsVariants } from './index.styles'\n\nexport const InputTextActions = ({\n children,\n __scopeInputText,\n ...props\n}: InputTextScopedProps<InputTextActionsProps>) => {\n const { disabled, hasError, readOnly, size, value, isActive } =\n useInputTextContext('InputTextActions', __scopeInputText)\n\n return (\n <div\n {...props}\n className={inputTextActionsVariants({\n active: isActive,\n size,\n disabled,\n readOnly,\n hasError: !!hasError,\n filled: !!value && !!value.length,\n })}\n aria-disabled={disabled}\n data-disabled={disabled}\n >\n {renderCompositionChildren(children, [\n { child: InputText.Icon, amount: 2 },\n { child: InputText.Field, amount: 1 },\n { child: InputText.ClearButton, amount: 1 },\n ])}\n </div>\n )\n}\n","export { ButtonRoot as Root } from './button-root'\nexport { ButtonIcon as Icon } from './button-icon'\nexport { ButtonIconDualColor as IconDualColor } from './button-icon-dual-color'\n","import * as React from 'react'\n\nimport type { Assign } from '@ark-ui/react'\nimport { ark } from '@ark-ui/react/factory'\n\nimport { useEnhancedChildren } from '~/hooks/use-enhanced-children'\n\nimport { cn } from '~/utils/cn'\nimport type { VariantProps } from '~/utils/tv'\n\nimport { Refresh, type RefreshColor } from '~/components/refresh'\n\nimport { root as rootStyle } from './button.styles'\n\nexport type ButtonSharedProps = Omit<\n VariantProps<typeof rootStyle>,\n 'asIconOnly'\n> & {\n disabled?: boolean\n}\n\nexport type ButtonRootProps = Assign<\n React.ComponentProps<typeof ark.button>,\n ButtonSharedProps\n> & {\n loading?: boolean\n full?: boolean\n}\n\nexport function ButtonRoot({\n children,\n className,\n variant = 'brand-primary',\n size,\n disabled,\n loading,\n asChild,\n full,\n ...props\n}: ButtonRootProps) {\n const enhancedChildrenWithInjectProps = useEnhancedChildren(children, {\n targets: ['ButtonIcon', 'ButtonIconDualColor'],\n props: {\n variant,\n size,\n disabled,\n },\n asChild,\n })\n\n const shouldShowSpinner = !disabled && loading\n\n const refreshColorByVariant = {\n 'brand-primary': 'white',\n 'neutral-secondary': 'black',\n 'neutral-tertiary': 'black',\n } as Record<typeof variant, RefreshColor>\n\n const loadingAccessibilityProps = {\n 'aria-live': 'polite',\n 'aria-busy': true,\n } as const\n\n const isOnlyIcon = React.useCallback(() => {\n if (\n React.Children.count(children) === 1 &&\n React.isValidElement(children)\n ) {\n const displayName =\n (children.type as React.ComponentType)?.displayName ?? ''\n return ['ButtonIcon', 'ButtonIconDualColor'].includes(displayName)\n }\n\n return false\n }, [children])\n\n return (\n <ark.button\n {...props}\n {...(shouldShowSpinner && loadingAccessibilityProps)}\n className={cn(\n rootStyle({\n variant,\n size,\n asIconOnly: isOnlyIcon(),\n className: shouldShowSpinner && 'pointer-events-none',\n }),\n full && 'w-full',\n className\n )}\n disabled={disabled}\n data-scope=\"button\"\n >\n {shouldShowSpinner ? (\n <Refresh color={refreshColorByVariant[variant]} />\n ) : (\n enhancedChildrenWithInjectProps\n )}\n </ark.button>\n )\n}\n\nButtonRoot.displayName = 'ButtonRoot'\n","import * as React from 'react'\n\nimport { injectPropsToChildren } from '~/utils/inject-props-to-children'\n\nexport function useEnhancedChildren<T extends object>(\n children: React.ReactNode,\n {\n targets,\n props,\n asChild,\n }: {\n targets: string[]\n props: T\n asChild?: boolean\n }\n) {\n const keyPrefix = React.useId()\n\n return injectPropsToChildren(children, {\n targets,\n props,\n asChild,\n keyPrefix,\n })\n}\n","import * as React from 'react'\n\ntype InjectPropsToChildrenOptions<T = unknown> = {\n /**\n * List of component displayNames to match.\n * Props will only be injected into components matching these names.\n */\n targets: string[]\n\n /**\n * Props to inject into the matched components.\n */\n props: Partial<T>\n\n /**\n * Optional key prefix for cloned elements.\n */\n keyPrefix?: string\n\n /**\n * Whether to return only the first child (e.g. for Slot-like behavior).\n */\n asChild?: boolean\n}\n\n/**\n * Recursively injects props into React children whose displayName matches a list of target names.\n *\n * This is useful for compound component patterns where parent-level props need to reach\n * specific nested children without direct prop drilling.\n *\n * @param children - The children tree to traverse.\n * @param options - Match configuration and props to inject.\n * @returns The cloned React nodes with props injected into matching components.\n */\nexport function injectPropsToChildren<T = unknown>(\n children: React.ReactNode,\n options: InjectPropsToChildrenOptions<T>\n): React.ReactNode {\n const { targets, props, keyPrefix = 'inject', asChild } = options\n\n const cloned = React.Children.map(children, (child, index) => {\n if (!React.isValidElement(child)) return child\n\n const displayName = (child.type as React.ComponentType)?.displayName ?? ''\n const shouldInject = targets.includes(displayName)\n\n const childProps = child.props as {\n children?: React.ReactNode\n asChild?: boolean\n }\n\n return React.cloneElement(\n child,\n {\n ...(shouldInject ? props : {}),\n key: `${keyPrefix}-${index.toString()}`,\n },\n injectPropsToChildren(childProps?.children, {\n targets,\n props,\n keyPrefix,\n asChild: childProps?.asChild,\n })\n )\n })\n\n return asChild ? cloned?.[0] : cloned\n}\n","import { type ClassValue, clsx } from 'clsx'\nimport { twMerge } from 'tailwind-merge'\n\nexport const cn = (...input: ClassValue[]) => twMerge(clsx(...input))\n","import * as React from 'react'\n\nimport { useTheme } from '~/hooks/use-theme'\nimport { cn } from '~/utils/cn'\n\n/**\n * Conjunto de opções de cor disponíveis para o componente Refresh.\n */\nexport type RefreshColor = 'brand' | 'neutral' | 'black' | 'white'\n\n/**\n * Propriedades do componente Refresh.\n */\nexport type RefreshProps = {\n /**\n * Define a cor do ícone de carregamento com base nos tokens do tema.\n * - `brand`: usa a cor primária da marca.\n * - `neutral`: usa um tom neutro de leitura.\n * - `black`: usa a cor padrão para texto.\n * - `white`: usa a cor inversa (geralmente branco).\n *\n * @default \"brand\"\n */\n color?: RefreshColor\n\n /**\n * Texto alternativo para acessibilidade (leitores de tela).\n * É renderizado como `aria-label` e como conteúdo do elemento `<title>` do SVG.\n */\n srText?: string\n}\n\n/**\n * Componente de ícone animado de carregamento, com suporte a temas e acessibilidade.\n */\nexport function Refresh({ color = 'brand', srText }: RefreshProps) {\n const theme = useTheme()\n\n const colorMap = React.useMemo(() => {\n return {\n brand: theme.colorActionFillBrandPrimaryEnabled,\n neutral: theme.colorTextNeutralReadonly,\n black: theme.colorTextNeutralDefault,\n white: theme.colorTextNeutralInverse,\n }\n }, [theme])\n\n const fillColor = colorMap[color]\n\n return (\n <div\n role=\"status\"\n className={cn('grid size-8 place-items-center')}\n aria-label={srText}\n >\n <svg className={cn('size-6 animate-spin fill-none')} viewBox=\"0 0 24 24\">\n <path\n fillRule=\"evenodd\"\n clipRule=\"evenodd\"\n 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\"\n fill={fillColor}\n />\n <title>{srText}</title>\n </svg>\n </div>\n )\n}\n\nexport * from './deprecated'\n","import * as React from 'react'\n\nimport {\n DROGASIL_TOKENS,\n GLOBALS_TOKENS,\n PRIME_TOKENS,\n RAIA_TOKENS,\n RDSAUDESISTEMAS_TOKENS,\n SUBSCRIPTION_TOKENS,\n} from '@raiadrogasil/pulso-design-tokens'\n\nimport { ThemeContext } from '~/components/theme-provider'\n\ntype ThemeTokens = typeof RDSAUDESISTEMAS_TOKENS & typeof GLOBALS_TOKENS\n\nexport function useTheme(): ThemeTokens {\n const mappedTheme = React.useMemo(() => {\n return {\n rdsaudesistemas: RDSAUDESISTEMAS_TOKENS,\n drogasil: DROGASIL_TOKENS,\n raia: RAIA_TOKENS,\n subscription: SUBSCRIPTION_TOKENS,\n prime: PRIME_TOKENS,\n }\n }, [])\n\n const context = React.useContext(ThemeContext)\n\n if (!context) {\n throw new Error(\n '[Pulso] useTheme precisa estar dentro de um <ThemeProvider>. Verifique se o provedor está corretamente configurado na raiz da aplicação.'\n )\n }\n\n const { currentTheme } = context\n\n const result = {\n ...GLOBALS_TOKENS,\n ...mappedTheme[currentTheme],\n } as ThemeTokens\n\n return result\n}\n","import * as React from 'react'\n\nimport type { Themes } from '@raiadrogasil/pulso-design-tokens'\n\nexport const ThemeContext = React.createContext({\n currentTheme: 'rdsaudesistemas',\n} as {\n currentTheme: Themes\n})\n\ntype ThemeProviderProps = {\n children: React.ReactNode\n theme?: Themes\n}\n\nexport function ThemeProvider({\n children,\n theme = 'rdsaudesistemas',\n}: ThemeProviderProps) {\n if (typeof window !== 'undefined') {\n document.documentElement.setAttribute('class', theme)\n }\n\n return (\n <ThemeContext.Provider\n value={{\n currentTheme: theme,\n }}\n >\n {children}\n </ThemeContext.Provider>\n )\n}\n","import { tv } from '~/utils/tv'\n\nconst buttonStyles = tv({\n slots: {\n root: [\n 'inline-flex shrink-0 cursor-pointer items-center justify-center whitespace-nowrap',\n 'gap-x-[var(--spacing-inline-twopulse)] rounded-full',\n 'outline-[var(--color-action-border-focused)] outline-offset-2',\n 'font-inherit font-bold tracking-[var(--letter-spacing-default)]',\n 'focus-visible:outline-2',\n 'disabled:cursor-not-allowed disabled:text-[var(--color-text-neutral-disabled)]',\n ],\n },\n variants: {\n variant: {\n 'brand-primary': {\n root: [\n 'bg-[var(--color-action-fill-brand-primary-enabled)]',\n 'text-[var(--color-text-neutral-inverse)]',\n 'enabled:hover:bg-[var(--color-action-fill-brand-primary-hovered)]',\n 'active:bg-[var(--color-action-fill-brand-primary-pressed)]',\n 'disabled:bg-[var(--color-action-fill-brand-primary-disabled)]',\n ],\n },\n 'neutral-secondary': {\n root: [\n 'ring-[var(--color-action-border-neutral-secondary-enabled)]',\n 'ring-[length:var(--border-width-quarterpulse)]',\n 'bg-[var(--color-action-fill-neutral-secondary-enabled)]',\n 'text-[var(--color-text-neutral-default)]',\n 'enabled:hover:ring-[var(--color-action-border-neutral-secondary-hovered)]',\n 'enabled:hover:bg-[var(--color-action-fill-neutral-secondary-hovered)]',\n 'active:ring-[var(--color-action-border-neutral-secondary-pressed)]',\n 'active:bg-[var(--color-action-fill-neutral-secondary-pressed)]',\n 'disabled:ring-[var(--color-action-border-neutral-secondary-disabled)]',\n 'disabled:bg-[var(--color-action-fill-neutral-secondary-disabled)]',\n ],\n },\n 'neutral-tertiary': {\n root: [\n 'ring-[var(--color-action-border-neutral-tertiary-enabled)]',\n 'ring-[length:var(--border-width-quarterpulse)]',\n 'bg-[var(--color-action-fill-neutral-tertiary-enabled)]',\n 'text-[var(--color-text-neutral-default)]',\n 'enabled:hover:ring-[var(--color-action-border-neutral-tertiary-hovered)]',\n 'enabled:hover:bg-[var(--color-action-fill-neutral-tertiary-hovered)]',\n 'active:ring-[var(--color-action-border-neutral-tertiary-pressed)]',\n 'active:bg-[var(--color-action-fill-neutral-tertiary-pressed)]',\n 'disabled:ring-[var(--color-action-border-neutral-tertiary-disabled)]',\n 'disabled:bg-[var(--color-action-fill-neutral-tertiary-disabled)]',\n ],\n },\n },\n size: {\n md: {\n root: [\n 'h-[var(--sizing-medium)] min-w-8 px-[var(--padding-inset-fourpulse)]',\n 'text-[length:var(--font-size-threepulse)]',\n 'leading-[var(--line-height-medium)]',\n ],\n },\n ml: {\n root: [\n 'h-[var(--sizing-mediumlarge)] min-w-10 px-[var(--padding-inset-fourpulse)]',\n ],\n },\n lg: {\n root: [\n 'h-[var(--sizing-large)] min-w-12 px-[var(--padding-inset-fivepulse)]',\n ],\n },\n xl: {\n root: [\n 'h-[var(--sizing-extralarge)] min-w-14 px-[var(--padding-inset-sixpulse)]',\n ],\n },\n },\n asIconOnly: {\n true: {\n root: 'aspect-square px-0',\n },\n },\n },\n compoundVariants: [\n {\n size: ['ml', 'lg'],\n class: {\n root: [\n 'text-[length:var(--font-size-threeandhalfpulse)]',\n 'leading-[var(--line-height-small)]',\n ],\n },\n },\n ],\n defaultVariants: {\n variant: 'brand-primary',\n size: 'ml',\n asIconOnly: false,\n },\n})\n\nexport const { root } = buttonStyles()\n","import { useMemo } from 'react'\nimport { Icon, type IconProps } from '~/components/icon'\nimport type { ButtonSharedProps } from './button-root'\n\ntype ButtonIconProps = Omit<ButtonSharedProps, 'asIconOnly'> & {\n iconColor?: IconProps['color']\n symbol?: IconProps['symbol']\n}\n\nexport function ButtonIcon({\n variant,\n size,\n disabled,\n iconColor,\n symbol,\n}: ButtonIconProps) {\n const sizeToIconSize: Record<\n NonNullable<ButtonSharedProps['size']>,\n IconProps['size']\n > = {\n md: 'extra-small',\n ml: 'small',\n lg: 'small',\n xl: 'small',\n }\n\n const variantToIconColor: Record<\n NonNullable<ButtonSharedProps['variant']>,\n IconProps['color']\n > = {\n 'brand-primary': 'colorTextNeutralInverse',\n 'neutral-secondary': 'colorTextNeutralDefault',\n 'neutral-tertiary': 'colorTextNeutralDefault',\n }\n\n const color = useMemo(() => {\n if (disabled) return 'colorTextNeutralDisabled'\n if (iconColor) return iconColor\n\n return variantToIconColor[variant!]\n }, [disabled, variant])\n\n const iconSize = sizeToIconSize[size!]\n\n return <Icon color={color} size={iconSize} symbol={symbol} />\n}\n\nButtonIcon.displayName = 'ButtonIcon'\n","import * as React from 'react'\n\nimport type { RDSAUDESISTEMAS_TOKENS } from '@raiadrogasil/pulso-design-tokens'\nimport type { IconName } from '@raiadrogasil/pulso-icons'\n\nimport { useTheme } from '~/hooks/use-theme'\n\ntype IconVisualSize = 'tiny' | 'extra-small' | 'small' | 'medium'\ntype DesignTokens = typeof RDSAUDESISTEMAS_TOKENS\n\ntype TokenColorKeys = {\n [K in keyof DesignTokens as K extends `color${string}`\n ? K\n : never]: DesignTokens[K]\n}\n\n/**\n * Propriedades do componente Icon.\n */\nexport type IconProps = React.ComponentProps<'i'> & {\n /**\n * Define o ícone a ser exibido, com base na lista de nomes disponíveis em `@raiadrogasil/pulso-icons`.\n *\n * @default 'rdicon-default'\n */\n symbol?: IconName\n\n /**\n * Define o tamanho visual do ícone, controlando o `font-size` com base nos tokens de espaçamento.\n *\n * Valores possíveis: 'tiny', 'extra-small', 'small', 'medium'.\n *\n * @default 'small'\n */\n size?: IconVisualSize\n\n /**\n * Define a cor do ícone usando uma chave de token de cor do design system.\n * A cor é aplicada via `style.color`.\n *\n * @default 'colorActionFillBrandPrimaryEnabled'\n */\n color?: keyof TokenColorKeys\n}\n\nexport function Icon({\n symbol = 'rdicon-default',\n size = 'small',\n color = 'colorActionFillBrandPrimaryEnabled',\n ...props\n}: IconProps) {\n const theme = useTheme()\n\n const resolvedFontSizes = React.useMemo(() => {\n return {\n tiny: theme.sizingTiny,\n 'extra-small': theme.sizingExtrasmall,\n small: theme.sizingSmall,\n medium: theme.sizingMedium,\n }\n }, [])\n\n return (\n <i\n {...props}\n className={symbol}\n style={{\n fontSize: resolvedFontSizes[size],\n color: theme[color],\n display: 'inline-flex',\n }}\n />\n )\n}\n\nIcon.displayName = 'Icon'\n\nexport * from './deprecated'\n","export { IconDualColorRoot as Root } from './icon-dual-color-root'\nexport { IconDualColorTop as Top } from './icon-dual-color-top'\nexport { IconDualColorBottom as Bottom } from './icon-dual-color-bottom'\n","import { ark } from '@ark-ui/react/factory'\nimport { useEnhancedChildren } from '~/hooks/use-enhanced-children'\nimport type { IconProps } from '../icon'\n\nexport type IconDualColorRootProps = Omit<\n React.ComponentPropsWithRef<'div'>,\n 'className'\n> &\n Pick<IconProps, 'size'> & {\n /**\n * Quando `true`, renderiza o componente como um slot via `@radix-ui/react-slot`,\n * permitindo controle externo sobre o elemento raiz.\n */\n asChild?: boolean\n /**\n * Define se o componente está desabilitado.\n * Quando `true`, o componente não pode ser interagido.\n */\n disabled?: boolean\n }\n\nexport function IconDualColorRoot({\n children,\n size = 'small',\n disabled = false,\n asChild,\n ...props\n}: IconDualColorRootProps) {\n const enhancedChildrenWithInjectProps = useEnhancedChildren(children, {\n targets: ['IconDualColorTop', 'IconDualColorBottom'],\n props: {\n size,\n disabled,\n },\n asChild,\n })\n\n return (\n <ark.div\n data-testid=\"icon-dual-color-root\"\n aria-label=\"Ícones\"\n aria-disabled={disabled}\n asChild={asChild}\n {...props}\n className=\"relative flex [&>[data-icon=top]]:absolute\"\n >\n {enhancedChildrenWithInjectProps}\n </ark.div>\n )\n}\n\nIconDualColorRoot.displayName = 'IconDualColorRoot'\n","import { Icon, type IconProps } from '../icon'\n\ntype IconDualColorTopProps = Omit<IconProps, 'size'>\n\nexport function IconDualColorTop({\n children,\n color = 'colorActionTextOnbrandDefault',\n // @ts-expect-error size prop is taken from IconDualColorRoot\n size,\n // @ts-expect-error disabled prop is taken from IconDualColorRoot\n disabled,\n ...props\n}: IconDualColorTopProps) {\n const iconColor = disabled ? 'colorTextNeutralDisabled' : color\n\n return (\n <Icon\n data-testid=\"icon-dual-color-top\"\n data-icon=\"top\"\n data-size={size}\n color={iconColor}\n size={size}\n {...props}\n >\n {children}\n </Icon>\n )\n}\n\nIconDualColorTop.displayName = 'IconDualColorTop'\n","import { Icon, type IconProps } from '../icon'\n\ntype IconDualColorBottomProps = Omit<IconProps, 'size'>\n\nexport function IconDualColorBottom({\n children,\n color = 'colorTextNeutralDefault',\n // @ts-expect-error size prop is taken from IconDualColorRoot\n size,\n // @ts-expect-error disabled prop is taken from IconDualColorRoot\n disabled,\n ...props\n}: IconDualColorBottomProps) {\n const iconColor = disabled ? 'colorTextNeutralDisabled' : color\n\n return (\n <Icon\n data-testid=\"icon-dual-color-bottom\"\n data-icon=\"bottom\"\n data-size={size}\n color={iconColor}\n size={size}\n {...props}\n >\n {children}\n </Icon>\n )\n}\n\nIconDualColorBottom.displayName = 'IconDualColorBottom'\n","import type { Assign } from '@ark-ui/react'\nimport type { IconProps } from '../icon'\nimport { IconDualColor, type IconDualColorProps } from '../icon-dual-color'\nimport type { ButtonSharedProps } from './button-root'\n\ntype ButtonIconDualColorProps = Assign<\n IconDualColorProps,\n Omit<ButtonSharedProps, 'asIconOnly'>\n>\n\nexport function ButtonIconDualColor({\n size = 'ml',\n ...props\n}: ButtonIconDualColorProps) {\n const sizeToIconSize: Record<\n NonNullable<ButtonSharedProps['size']>,\n IconProps['size']\n > = {\n md: 'extra-small',\n ml: 'small',\n lg: 'small',\n xl: 'small',\n }\n\n return <IconDualColor.Root {...props} size={sizeToIconSize[size]} />\n}\n\nButtonIconDualColor.displayName = 'ButtonIconDualColor'\n","import { tv } from '~/utils/tv'\n\nexport const inputTextClearButtonContainerVariants = tv({\n base: 'input-text-clear-button',\n variants: {\n size: {\n md: '-mr-[6px]',\n ml: '-mr-[8px]',\n lg: '-mr-[8px]',\n xl: '-mr-[8px]',\n },\n readOnly: { true: 'invisible hidden' },\n disabled: { true: 'invisible hidden' },\n isActive: { true: 'invisible hidden' },\n filled: { false: 'invisible hidden' },\n },\n defaultVariants: {\n readOnly: false,\n disabled: false,\n },\n})\n\nexport const inputTextClearButtonVariants = tv({\n base: '!px-none',\n variants: {\n size: {\n md: '!h-medium !w-medium',\n ml: '!h-mediumlarge !min-w-mediumlarge',\n lg: '!h-mediumlarge !min-w-mediumlarge',\n xl: '!h-mediumlarge !min-w-mediumlarge',\n },\n },\n})\n","import { Button } from '~/components/button'\nimport { useInputTextContext } from '../../input-text'\nimport type {\n InputTextClearButtonProps,\n InputTextScopedProps,\n} from '../../input-text.types'\nimport {\n inputTextClearButtonContainerVariants,\n inputTextClearButtonVariants,\n} from './index.styles'\n\nexport const InputTextClearButton = ({\n __scopeInputText,\n ...props\n}: InputTextScopedProps<InputTextClearButtonProps>) => {\n const { size, disabled, readOnly, isActive, value } = useInputTextContext(\n 'InputTextClearButton',\n __scopeInputText\n )\n\n return (\n <div\n className={inputTextClearButtonContainerVariants({\n size,\n disabled,\n readOnly,\n isActive,\n filled: !!value && !!value.length,\n })}\n aria-disabled={disabled || readOnly}\n >\n <Button.Root\n {...props}\n size={size}\n disabled={disabled || readOnly}\n variant=\"neutral-tertiary\"\n className={inputTextClearButtonVariants({ size })}\n >\n <Button.Icon symbol=\"rdicon-dismiss-circle-outline\" />\n </Button.Root>\n </div>\n )\n}\n","import { forwardRef } from 'react'\nimport { useInputTextContext } from '../../input-text'\nimport type {\n InputTextFieldProps,\n InputTextScopedProps,\n} from '../../input-text.types'\nimport { inputTextFieldVariants } from './index.styles'\n\nexport const InputTextField = forwardRef<HTMLInputElement, InputTextFieldProps>(\n (\n {\n __scopeInputText,\n onFocus,\n onBlur,\n ...props\n }: InputTextScopedProps<InputTextFieldProps>,\n ref\n ) => {\n const { disabled, readOnly, size, isActive, setActive } =\n useInputTextContext('InputTextField', __scopeInputText)\n\n const handleFocus = (event: React.FocusEvent<HTMLInputElement>) => {\n setActive(true)\n onFocus?.(event)\n }\n const handleBlur = (event: React.FocusEvent<HTMLInputElement>) => {\n setActive(false)\n onBlur?.(event)\n }\n return (\n <input\n {...props}\n ref={ref}\n disabled={disabled}\n readOnly={readOnly}\n placeholder=\"Placeholder is hidden\"\n className={inputTextFieldVariants({\n disabled,\n readOnly,\n isActive,\n size,\n })}\n onFocus={handleFocus}\n onBlur={handleBlur}\n />\n )\n }\n)\n\nInputTextField.displayName = 'InputTextField'\n","import { tv } from '~/utils/tv'\n\nexport const inputTextFieldVariants = tv({\n base: `\n peer/field flex w-[100%] bg-[transparent] !font-rdmodern font-regular text-text-neutral-alternative tracking-tiny leading-small\n placeholder:opacity-transparent focus-visible:border-none focus-visible:outline-none\n `,\n variants: {\n size: {\n md: 'text-threepulse',\n ml: 'text-threeandhalfpulse',\n lg: 'text-threeandhalfpulse',\n xl: 'text-threeandhalfpulse',\n },\n readOnly: {\n true: 'text-text-neutral-readonly',\n },\n disabled: {\n true: 'cursor-not-allowed text-text-neutral-disabled',\n false: '',\n },\n isActive: {\n true: 'text-text-neutral',\n },\n },\n compoundVariants: [\n {\n readOnly: true,\n disabled: false,\n class: 'cursor-not-allowed text-text-neutral-readonly',\n },\n ],\n defaultVariants: {\n readOnly: false,\n disabled: false,\n },\n})\n","import { useMemo } from 'react'\nimport { Icon, type TIconProps } from '~/components/icon'\nimport { useInputTextContext } from '../../input-text'\nimport type {\n InputTextHelperTextProps,\n InputTextScopedProps,\n} from '../../input-text.types'\nimport { inputTextHelperTextVariants } from './index.styles'\n\nexport const InputTextHelperText = ({\n withIcon,\n iconName = 'rdicon-warning-circle',\n children,\n __scopeInputText,\n ...props\n}: InputTextScopedProps<InputTextHelperTextProps>) => {\n const { disabled, hasError, readOnly } = useInputTextContext(\n 'InputTextHelperText',\n __scopeInputText\n )\n\n const symbol = hasError ? 'rdicon-warning-circle' : iconName\n\n const iconColor = useMemo((): TIconProps['color'] => {\n if (disabled) return 'colorTextNeutralDisabled'\n if (readOnly) return 'colorTextNeutralReadonly'\n if (hasError) return 'colorTextDangerAlternative'\n return 'colorTextNeutralAlternative'\n }, [disabled, hasError, readOnly])\n\n if (!children) return null\n\n const displayIcon = hasError || withIcon\n\n return (\n <div\n {...props}\n aria-disabled={disabled}\n className={inputTextHelperTextVariants({\n hasError,\n disabled,\n readOnly,\n })}\n >\n {displayIcon && (\n <div className=\"flex items-center\">\n <Icon symbol={symbol} color={iconColor} size=\"tiny\" />\n </div>\n )}\n <span className=\"flex flex-1\">{children}</span>\n </div>\n )\n}\n","import { tv } from '~/utils/tv'\n\nexport const inputTextHelperTextVariants = tv({\n base: 'justify-star flex w-[100%] flex-wrap items-center gap-onepulse px-onepulse text-left font-rdmodern font-semibold text-text-neutral-alternative text-threepulse',\n variants: {\n hasError: {\n true: 'text-text-danger-alternative',\n false: '',\n },\n readOnly: {\n true: 'cursor-not-allowed',\n },\n disabled: {\n true: 'cursor-not-allowed text-text-neutral-disabled',\n false: '',\n },\n },\n compoundVariants: [\n {\n readOnly: true,\n disabled: false,\n class: 'text-text-neutral-readonly',\n },\n ],\n defaultVariants: {\n error: false,\n disabled: false,\n readOnly: false,\n },\n})\n","import { useMemo } from 'react'\nimport { Icon, type TIconProps } from '~/components/icon'\nimport { useInputTextContext } from '../../input-text'\nimport type {\n InputTextIconProps,\n InputTextScopedProps,\n} from '../../input-text.types'\n\nexport function InputTextIcon({\n __scopeInputText,\n color = 'colorTextNeutralDefault',\n ...props\n}: InputTextScopedProps<InputTextIconProps>) {\n const { size, disabled, readOnly } = useInputTextContext(\n 'InputTextField',\n __scopeInputText\n )\n\n const iconSize = useMemo(() => {\n const inputTextIconSizeMapper: Record<string, TIconProps['size']> = {\n md: 'extra-small',\n ml: 'small',\n lg: 'small',\n xl: 'small',\n }\n return inputTextIconSizeMapper?.[size!]\n }, [size])\n\n const iconColorMapping = (): TIconProps['color'] => {\n return disabled\n ? 'colorTextNeutralDisabled'\n : readOnly\n ? 'colorTextNeutralReadonly'\n : 'colorTextNeutralDefault'\n }\n\n return (\n <div className=\"flex items-center\">\n <Icon {...props} color={iconColorMapping()} size={iconSize} />\n </div>\n )\n}\n","import { tv } from '~/utils/tv'\n\nexport const inputTextLabelVariants = tv({\n base: `\n w-[100%] align-middle m-none p-none\n text-left font-rdmodern font-regular tracking-tiny text-text-neutral text-nowrap truncate leading\n\n `,\n variants: {\n size: {\n md: 'text-threepulse',\n ml: 'text-threeandhalfpulse',\n lg: 'text-threeandhalfpulse',\n xl: 'text-threeandhalfpulse',\n },\n\n readOnly: {\n true: '',\n false: '',\n },\n disabled: {\n true: 'cursor-not-allowed text-text-neutral-disabled',\n false: '',\n },\n },\n compoundVariants: [\n {\n readOnly: true,\n disabled: false,\n class: 'cursor-not-allowed text-text-neutral-readonly',\n },\n ],\n defaultVariants: {\n disabled: false,\n readOnly: false,\n },\n})\n","import { useInputTextContext } from '../../input-text'\nimport type {\n InputTextLabelProps,\n InputTextScopedProps,\n} from '../../input-text.types'\nimport { inputTextLabelVariants } from './index.styles'\n\nexport const InputTextLabel = (\n props: InputTextScopedProps<InputTextLabelProps>\n) => {\n const { __scopeInputText, children, ...rest } = props\n\n const { disabled, readOnly, size } = useInputTextContext(\n 'InputTextLabel',\n __scopeInputText\n )\n\n if (!children) return null\n\n return (\n <div className=\"flex h-extrasmall w-[100%] items-center rounded-none border-none px-onepulse text-left\">\n <label\n {...rest}\n className={inputTextLabelVariants({ disabled, readOnly, size })}\n aria-disabled={disabled}\n >\n {children}\n </label>\n </div>\n )\n}\n","import { InputTextActions } from './components/input-text-actions'\nimport { InputTextClearButton } from './components/input-text-clear-button'\nimport { InputTextField } from './components/input-text-field'\nimport { InputTextHelperText } from './components/input-text-helpertext'\nimport { InputTextIcon } from './components/input-text-icon'\nimport { InputTextLabel } from './components/input-text-label'\n\nimport { type Scope, createContextScope } from '@radix-ui/react-context'\n\nimport { renderCompositionChildren } from './utils/render-composition-children'\n\nimport { useState } from 'react'\nimport type {\n InputTextContext,\n InputTextProps,\n InputTextScopedProps,\n} from './input-text.types'\n\nconst DISPLAY_NAME = 'InputText'\n\nconst InputTextRoot = (props: InputTextScopedProps<InputTextProps>) => {\n const { size = 'ml', children, __scopeInputText, value } = props\n const [isActive, setActive] = useState(false)\n\n return (\n <InputTextProvider\n {...props}\n size={size}\n scope={__scopeInputText}\n isActive={isActive}\n value={value}\n setActive={setActive}\n >\n <div className=\"flex w-full flex-col gap-halfpulse \">\n {renderCompositionChildren(children, [\n { child: InputText.Label, amount: 1 },\n { child: InputText.Actions, amount: 1 },\n { child: InputText.HelperText, amount: 1 },\n ])}\n </div>\n </InputTextProvider>\n )\n}\n\nInputTextRoot.displayName = DISPLAY_NAME\n\n/*\n----------------------------------------------------------------\nScope Definition\n----------------------------------------------------------------\n*/\n\nconst [createInputTextContext] = createContextScope(DISPLAY_NAME)\n\nexport const [InputTextProvider, useInputTextContext]: readonly [\n ProviderType<InputTextContext>,\n (consumerName: string, scope: Scope) => InputTextContext,\n] = createInputTextContext<InputTextContext>(DISPLAY_NAME)\n\n/*\n----------------------------------------------------------------\nComposition Export\n----------------------------------------------------------------\n*/\n\nexport const InputText = {\n Root: InputTextRoot,\n Label: InputTextLabel,\n Field: InputTextField,\n HelperText: InputTextHelperText,\n Actions: InputTextActions,\n ClearButton: InputTextClearButton,\n Icon: InputTextIcon,\n}\n"],"mappings":"ykCAAA,IAAAA,GAAA,GAAAC,EAAAD,GAAA,eAAAE,IAAA,eAAAC,GAAAH,ICAA,IAAAI,EAAyC,iBAsB5BC,EAA4B,CACvCC,EACAC,IACG,CAzBL,IAAAC,EA0BE,IAAMC,GAAgBD,EAAA,WAAS,QAAQF,CAAQ,IAAzB,YAAAE,EAA4B,OAAOE,MACvD,kBAAeA,CAAK,GAGtB,OAAOD,EAAc,IAAI,CAACC,EAAOC,IAAU,CACzC,IAAMC,EAAiBL,EAAgB,KACrCM,GAAaH,EAAM,OAASG,EAAU,KACxC,EAGMC,EAAcL,EAAc,OAAe,CAACM,EAAK,EAAGC,KACpD,iBAAG,QAASN,EAAM,MAAQM,GAAUL,EAC/BI,EAAM,EAGRA,EACN,CAAC,EAMJ,OAAIH,GAAkBE,IAAeF,GAAA,YAAAA,EAAgB,QAAeF,EAE7D,IACT,CAAC,CACH,ECpDA,IAAAO,GAA4C,6BAE/BC,KAAK,aAAS,CACzB,QAAS,GACT,cAAe,CACb,OAAQ,CACN,YAAa,CACX,YAAa,CACX,C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AAO,SAAAH,EAAO,GACjB,EACF,CAEJ,CGhEA,IAAMK,GAAeC,EAAG,CACtB,MAAO,CACL,KAAM,CACJ,oFACA,sDACA,gEACA,kEACA,0BACA,gFACF,CACF,EACA,SAAU,CACR,QAAS,CACP,gBAAiB,CACf,KAAM,CACJ,sDACA,2CACA,oEACA,6DACA,+DACF,CACF,EACA,oBAAqB,CACnB,KAAM,CACJ,8DACA,iDACA,0DACA,2CACA,4EACA,wEACA,qEACA,iEACA,wEACA,mEACF,CACF,EACA,mBAAoB,CAClB,KAAM,CACJ,6DACA,iDACA,yDACA,2CACA,2EACA,uEACA,oEACA,gEACA,uEACA,kEACF,CACF,CACF,EACA,KAAM,CACJ,GAAI,CACF,KAAM,CACJ,uEACA,4CACA,qCACF,CACF,EACA,GAAI,CACF,KAAM,CACJ,4EACF,CACF,EACA,GAAI,CACF,KAAM,CACJ,sEACF,CACF,EACA,GAAI,CACF,KAAM,CACJ,0EACF,CACF,CACF,EACA,WAAY,CACV,KAAM,CACJ,KAAM,oBACR,CACF,CACF,EACA,iBAAkB,CAChB,CACE,KAAM,CAAC,KAAM,IAAI,EACjB,MAAO,CACL,KAAM,CACJ,mDACA,oCACF,CACF,CACF,CACF,EACA,gBAAiB,CACf,QAAS,gBACT,KAAM,KACN,WAAY,EACd,CACF,CAAC,EAEY,CAAE,KAAAC,EAAK,EAAIF,GAAa,EPP7B,IAAAG,EAAA,6BAjED,SAASC,EAAWC,EAUP,CAVO,IAAAC,EAAAD,EACzB,UAAAE,EACA,UAAAC,EACA,QAAAC,EAAU,gBACV,KAAAC,EACA,SAAAC,EACA,QAAAC,EACA,QAAAC,EACA,KAAAC,CArCF,EA6B2BR,EAStBS,EAAAC,EATsBV,EAStB,CARH,WACA,YACA,UACA,OACA,WACA,UACA,UACA,SAGA,IAAMW,EAAkCC,EAAoBX,EAAU,CACpE,QAAS,CAAC,aAAc,qBAAqB,EAC7C,MAAO,CACL,QAAAE,EACA,KAAAC,EACA,SAAAC,CACF,E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