@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 • 54.6 kB
Source Map (JSON)
{"version":3,"sources":["../../../src/components/input-password/index.ts","../../../src/components/input-password/namespace.ts","../../../src/components/input-password/input-password-root.tsx","../../../src/hooks/use-enhanced-children.ts","../../../src/utils/inject-props-to-children.ts","../../../src/utils/cn.ts","../../../src/utils/tv.ts","../../../src/components/input-password/input-password.styles.ts","../../../src/components/input-password/input-password-input.tsx","../../../src/components/button/namespace.ts","../../../src/components/button/button-root.tsx","../../../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-password/input-password-tag.tsx","../../../src/components/input-password/input-password-label.tsx","../../../src/components/label/index.tsx","../../../src/components/label/label.styles.tsx","../../../src/components/input-password/input-password-helper-text.tsx","../../../src/components/helper-text/index.tsx","../../../src/components/helper-text/helper-text.styles.tsx"],"sourcesContent":["export * as InputPassword from './namespace'\nexport type { InputPasswordRootProps as InputPasswordProps } from './input-password-root'\n","export { InputPasswordRoot as Root } from './input-password-root'\nexport { InputPasswordInput as Input } from './input-password-input'\nexport { InputPasswordLabel as Label } from './input-password-label'\nexport { InputPasswordHelperText as HelperText } from './input-password-helper-text'\n","import type { Assign } from '@ark-ui/react'\nimport {\n PasswordInput as ArkPasswordInput,\n usePasswordInput,\n} from '@ark-ui/react/password-input'\n\nimport { useEnhancedChildren } from '~/hooks/use-enhanced-children'\n\nimport { cn } from '~/utils/cn'\nimport type { VariantProps } from '~/utils/tv'\n\nimport { root as rootStyles } from './input-password.styles'\n\nexport type InputPasswordSharedProps = Omit<\n VariantProps<typeof rootStyles>,\n 'isDisabled' | 'isReadOnly' | 'isError'\n>\n\nexport type InputPasswordRootProps = Assign<\n React.ComponentProps<typeof ArkPasswordInput.Root>,\n InputPasswordSharedProps\n> & {\n readOnly: boolean\n}\n\nexport function InputPasswordRoot({\n children,\n size,\n asChild,\n disabled,\n readOnly,\n invalid,\n onVisibilityChange,\n ...props\n}: InputPasswordRootProps) {\n const passwordInput = usePasswordInput({\n disabled,\n invalid,\n onVisibilityChange,\n })\n\n const enhancedChildrenWithInjectProps = useEnhancedChildren(children, {\n targets: [\n 'InputPasswordInput',\n 'InputPasswordLabel',\n 'InputPasswordHelperText',\n ],\n props: {\n size,\n readOnly,\n },\n asChild,\n })\n\n return (\n <ArkPasswordInput.RootProvider\n {...props}\n className={cn(\n rootStyles({\n size,\n })\n )}\n value={passwordInput}\n >\n {enhancedChildrenWithInjectProps}\n </ArkPasswordInput.RootProvider>\n )\n}\n\nInputPasswordRoot.displayName = 'InputPasswordRoot'\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 { 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\nconst inputPasswordStyles = tv({\n slots: {\n root: ['w-full min-w-[14rem] space-y-[var(--spacing-stack-halfpulse)]'],\n control: [\n // Structure\n 'ring-[var(--color-forms-border-default)]',\n 'inline-flex w-full items-center',\n 'gap-x-[var(--spacing-inline-onepulse)]',\n 'rounded-[var(--border-radius-form)]',\n 'bg-[var(--color-forms-fill-default)]',\n 'px-[var(--padding-inset-threepulse)]',\n\n // Filled state\n '[&:has(input:not(:focus-within,:placeholder-shown))]:bg-[var(--color-forms-fill-filled)]',\n '[&:has(input:not(:focus-within,:placeholder-shown))]:ring-[length:var(--border-width-quarterpulse)]',\n ],\n input: [\n 'min-w-0 flex-1 bg-transparent caret-[var(--color-text-neutral-default)] outline-0',\n 'placeholder:invisible',\n 'font-sans text-[var(--color-text-neutral-default)]',\n ],\n },\n variants: {\n size: {\n md: {\n control: ['h-[var(--sizing-medium)]'],\n input: ['text-[length:var(--font-size-threepulse)]'],\n },\n ml: {\n control: ['h-[var(--sizing-mediumlarge)]'],\n },\n lg: {\n control: ['h-[var(--sizing-large)]'],\n },\n xl: {\n control: [\n 'h-[var(--sizing-extralarge)] rounded-[var(--border-radius-largecontainer)]',\n ],\n },\n },\n isDisabled: {\n true: {\n control: [\n 'cursor-not-allowed bg-[var(--color-forms-fill-disabled)]! ring-[length:var(--border-width-quarterpulse)] ring-[var(--color-forms-border-disabled)]',\n '*:cursor-not-allowed',\n\n // Filled state\n '[&:has(input:not(:focus-within,:placeholder-shown))]:bg-[var(--color-forms-fill-disabled)]',\n ],\n input: ['text-[var(--color-text-neutral-disabled)]'],\n },\n },\n isReadOnly: {\n true: {\n control: [\n 'pointer-events-none bg-[var(--color-forms-fill-readonly)] ring-[length:var(--border-width-quarterpulse)] ring-[var(--color-forms-border-readonly)]',\n\n // Filled state\n '[&:has(input:not(:focus-within,:placeholder-shown))]:bg-[var(--color-forms-fill-readonly)]',\n ],\n input: ['text-[var(--color-text-neutral-readonly)]'],\n },\n },\n isError: {\n true: {\n control: [\n // Error ring\n 'ring-[length:var(--border-width-quarterpulse)]',\n 'ring-[var(--color-forms-border-error)]',\n\n // Hover when error\n '[&:not(:focus-within,[data-disabled])]:hover:ring-[length:var(--border-width-halfpulse)]',\n\n // Focus when error\n 'focus-within:bg-[var(--color-forms-fill-error)]',\n 'focus-within:ring-[length:var(--border-width-halfpulse)]',\n ],\n },\n false: {\n control: [\n // Focus when not error\n 'focus-within:bg-[var(--color-forms-fill-focused)]',\n 'focus-within:ring-[length:var(--border-width-halfpulse)]',\n 'focus-within:ring-[var(--color-forms-border-focused)]',\n\n // Filled ring color\n '[&:has(input:not(:focus-within,:placeholder-shown))]:ring-[var(--color-forms-border-filled)]',\n ],\n },\n },\n },\n compoundVariants: [\n {\n size: ['ml', 'lg', 'xl'],\n class: {\n input: ['text-[length:var(--font-size-threeandhalfpulse)]'],\n },\n },\n {\n isDisabled: false,\n isReadOnly: false,\n isError: false,\n class: {\n control: [\n // Hover\n '[&:not(:focus-within)]:hover:bg-[var(--color-forms-fill-hovered)] [&:not(:focus-within)]:hover:ring-[var(--color-forms-border-hovered)]',\n\n // Filled hover\n '[&:has(input:not(:focus-within,:placeholder-shown))]:hover:bg-[var(--color-forms-fill-filled)] [&:has(input:not(:focus-within,:placeholder-shown))]:hover:ring-[var(--color-forms-border-filled)]',\n '[&:has(input:not(:focus-within,:placeholder-shown))]:hover:ring-[length:var(--border-width-halfpulse)]',\n ],\n },\n },\n ],\n defaultVariants: {\n size: 'ml',\n isDisabled: false,\n isReadOnly: false,\n isError: false,\n },\n})\n\nexport const { root, control, input } = inputPasswordStyles()\n","import * as React from 'react'\n\nimport type { Assign } from '@ark-ui/react'\nimport {\n PasswordInput as ArkPasswordInput,\n usePasswordInputContext,\n} from '@ark-ui/react/password-input'\n\nimport { Button } from '~/components/button'\nimport { cn } from '~/utils/cn'\n\nimport { Icon, type IconProps } from '~/components/icon'\n\nimport {\n InputPasswordTag,\n type InputPasswordTagProps,\n} from './input-password-tag'\n\nimport {\n control as controlStyles,\n input as inputStyles,\n} from './input-password.styles'\n\nimport type { InputPasswordSharedProps } from './input-password-root'\n\ntype InputPasswordInputProps = Assign<\n React.ComponentProps<typeof ArkPasswordInput.Input>,\n InputPasswordSharedProps\n> & {\n // Usamos o nome \"prefix\" para deixar o componente pronto para futuras extensões a novos casos de uso.\n prefix?: IconProps['symbol']\n strengthRules: Record<NonNullable<InputPasswordTagProps['variant']>, RegExp>\n}\n\nexport function InputPasswordInput({\n prefix,\n strengthRules,\n size = 'ml',\n onChange,\n readOnly,\n ...props\n}: InputPasswordInputProps) {\n const {\n visible: isPasswordVisible,\n disabled,\n invalid,\n } = usePasswordInputContext()\n\n const [strengthLevel, setStrengthLevel] = React.useState<\n InputPasswordTagProps['variant'] | null\n >(null)\n\n const isInteractive = !disabled && !readOnly\n const shouldShowStrengthLevel = strengthLevel && isInteractive\n const shouldShowVisibilityTrigger = isInteractive\n\n function getColorPrefix(): IconProps['color'] {\n if (disabled) return 'colorTextNeutralDisabled'\n if (readOnly) return 'colorTextNeutralReadonly'\n\n return 'colorTextNeutralDefault'\n }\n\n const onStrengthLevel = React.useCallback(\n (event: React.ChangeEvent<HTMLInputElement>) => {\n const value = event.target.value\n\n for (const level of Object.keys(strengthRules)) {\n const _level = level as InputPasswordTagProps['variant']\n const rule = strengthRules[_level!]\n\n if (rule.test(value)) {\n setStrengthLevel(_level)\n break\n }\n }\n\n if (value.length === 0) {\n setStrengthLevel(null)\n }\n\n onChange?.(event)\n },\n []\n )\n\n return (\n <ArkPasswordInput.Control\n className={cn(\n controlStyles({\n size,\n isDisabled: disabled,\n isReadOnly: readOnly,\n isError: invalid,\n className: 'overflow-red-500',\n })\n )}\n >\n {prefix && (\n <Icon\n size={size === 'md' ? 'extra-small' : 'small'}\n color={getColorPrefix()}\n symbol={prefix}\n />\n )}\n\n <ArkPasswordInput.Input\n {...props}\n className={cn(\n inputStyles({\n size,\n isDisabled: disabled,\n isReadOnly: readOnly,\n })\n )}\n placeholder=\"Hidden placeholder\"\n onChange={onStrengthLevel}\n readOnly={readOnly}\n />\n\n {shouldShowStrengthLevel && <InputPasswordTag variant={strengthLevel} />}\n\n {shouldShowVisibilityTrigger && (\n <ArkPasswordInput.VisibilityTrigger asChild>\n <Button.Root\n variant=\"neutral-tertiary\"\n size={size === 'md' ? 'md' : 'ml'}\n >\n <Button.Icon\n symbol={isPasswordVisible ? 'rdicon-eye-off' : 'rdicon-eye'}\n />\n </Button.Root>\n </ArkPasswordInput.VisibilityTrigger>\n )}\n </ArkPasswordInput.Control>\n )\n}\n\nInputPasswordInput.displayName = 'InputPasswordInput'\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 { 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 { cn } from '~/utils/cn'\nimport { type VariantProps, tv } from '~/utils/tv'\n\nconst inputPasswordTag = tv({\n base: [\n 'inline-flex h-[var(--sizing-extrasmall)] select-none items-center rounded-[var(--border-radius-pill)] px-[var(--padding-inset-twopulse)]',\n 'font-semibold text-[length:var(--font-size-threepulse)]',\n ],\n variants: {\n variant: {\n strong: [\n '[--color-labeling-fill-strong-default:#ABF7CD] [--color-labeling-text-strong-default:#18492E]',\n 'bg-[var(--color-labeling-fill-strong-default)] text-[var(--color-labeling-text-strong-default)]',\n ],\n average: [\n '[--color-labeling-fill-average-default:#FBEBD0] [--color-labeling-text-average-default:#55350C]',\n 'bg-[var(--color-labeling-fill-average-default)] text-[var(--color-labeling-text-average-default)]',\n ],\n weak: [\n '[--color-labeling-fill-weak-default:#FCCFEA] [--color-labeling-text-weak-default:#642049]',\n 'bg-[var(--color-labeling-fill-weak-default)] text-[var(--color-labeling-text-weak-default)]',\n ],\n },\n },\n})\n\nexport type InputPasswordTagProps = VariantProps<typeof inputPasswordTag>\n\nexport function InputPasswordTag({ variant = 'weak' }: InputPasswordTagProps) {\n const passwordStrengthLabels = {\n strong: 'Forte',\n average: 'Média',\n weak: 'Fraca',\n } as Record<typeof variant, string>\n\n return (\n <span\n className={cn(\n inputPasswordTag({\n variant,\n })\n )}\n >\n {passwordStrengthLabels[variant]}\n </span>\n )\n}\n","import type { Assign } from '@ark-ui/react'\nimport { PasswordInput as ArkPasswordInput } from '@ark-ui/react/password-input'\n\nimport { cn } from '~/utils/cn'\n\nimport { Label } from '~/components/label'\n\nimport type { InputPasswordSharedProps } from './input-password-root'\n\ntype InputPasswordLabelProps = Assign<\n React.ComponentProps<typeof ArkPasswordInput.Label>,\n InputPasswordSharedProps\n> & {\n readOnly?: boolean\n}\n\nexport function InputPasswordLabel({\n children,\n size,\n readOnly,\n ...props\n}: InputPasswordLabelProps) {\n return (\n <ArkPasswordInput.Label\n {...props}\n className={cn(\n 'px-[var(--padding-inset-onepulse)]',\n readOnly && 'text-[var(--color-text-neutral-readonly)]'\n )}\n asChild\n >\n <Label size={size} className={cn(size === 'md' && 'leading-0')}>\n {children}\n </Label>\n </ArkPasswordInput.Label>\n )\n}\n\nInputPasswordLabel.displayName = 'InputPasswordLabel'\n","import { ark } from '@ark-ui/react/factory'\n\nimport { cn } from '~/utils/cn'\nimport type { VariantProps } from '~/utils/tv'\n\nimport { labelStyles } from './label.styles'\n\nexport type LabelProps = React.ComponentProps<typeof ark.span> &\n VariantProps<typeof labelStyles>\n\nexport function Label({ className, size, ...props }: LabelProps) {\n return (\n <ark.span\n {...props}\n className={cn(\n labelStyles({\n className,\n size,\n })\n )}\n />\n )\n}\n","import { tv } from '~/utils/tv'\n\nexport const labelStyles = tv({\n base: [\n 'line-clamp-1 max-w-full truncate',\n 'font-normal font-sans text-[var(--color-text-neutral-default)] data-[disabled]:text-[var(--color-text-neutral-disabled)]',\n ],\n variants: {\n size: {\n md: 'text-[length:var(--font-size-threepulse)] leading-[var(--line-height-medium)]',\n ml: null,\n lg: null,\n xl: null,\n },\n },\n compoundVariants: [\n {\n size: ['ml', 'lg', 'xl'],\n class:\n 'text-[length:var(--font-size-threeandhalfpulse)] leading-[var(--line-height-small)]',\n },\n ],\n defaultVariants: {\n size: 'ml',\n },\n})\n","import { usePasswordInputContext } from '@ark-ui/react/password-input'\n\nimport { HelperText, type HelperTextProps } from '~/components/helper-text'\n\ntype InputPasswordHelperTextProps = Pick<HelperTextProps, 'prefix'> & {\n children: React.ReactNode\n readOnly?: boolean\n}\n\nexport function InputPasswordHelperText({\n children,\n readOnly,\n ...props\n}: InputPasswordHelperTextProps) {\n const { invalid, disabled } = usePasswordInputContext()\n\n return (\n <HelperText\n {...props}\n isError={invalid}\n isDisabled={disabled}\n isReadOnly={readOnly}\n >\n {children}\n </HelperText>\n )\n}\n\nInputPasswordHelperText.displayName = 'InputPasswordHelperText'\n","import { Field as ArkField } from '@ark-ui/react/field'\n\nimport type { IconName } from '@raiadrogasil/pulso-icons'\n\nimport { Icon } from '~/components/icon'\n\nimport { cn } from '~/utils/cn'\nimport type { VariantProps } from '~/utils/tv'\n\nimport { helperTextStyles } from './helper-text.styles'\n\ntype IconColor = React.ComponentProps<typeof Icon>['color']\n\ntype HelperTextBaseProps = Omit<\n React.ComponentProps<typeof ArkField.HelperText>,\n 'asChild'\n> & {\n prefix?: IconName\n}\n\nexport type HelperTextProps = HelperTextBaseProps &\n VariantProps<typeof helperTextStyles>\n\nexport function HelperText({\n children,\n className,\n prefix,\n isError,\n isDisabled,\n isReadOnly,\n ...props\n}: HelperTextProps) {\n const shouldShowPrefix = isError || !!prefix\n\n function getColorPrefix(): IconColor {\n const stateColorMap = [\n [isError, 'colorTextDangerAlternative'],\n [isDisabled, 'colorTextNeutralDisabled'],\n [isReadOnly, 'colorTextNeutralReadonly'],\n ] as Array<[boolean, IconColor]>\n\n for (const [condition, color] of stateColorMap) {\n if (condition) return color\n }\n\n return 'colorTextNeutralAlternative'\n }\n\n return (\n <ArkField.HelperText\n {...props}\n className={cn(\n helperTextStyles({\n className,\n isError,\n isDisabled,\n isReadOnly,\n })\n )}\n >\n {shouldShowPrefix && (\n <Icon\n symbol={isError ? 'rdicon-warning-circle' : prefix}\n size=\"tiny\"\n color={getColorPrefix()}\n />\n )}\n\n <div className={cn('line-clamp-2 text-ellipsis')}>{children}</div>\n </ArkField.HelperText>\n )\n}\n","import { tv } from '~/utils/tv'\n\nexport const helperTextStyles = tv({\n base: [\n 'flex w-full items-start gap-x-[var(--spacing-inline-onepulse)] px-[var(--padding-inset-onepulse)]',\n 'font-semibold text-[length:var(--font-size-threepulse)] text-[var(--color-text-neutral-alternative)]',\n ],\n variants: {\n isError: {\n true: 'text-[var(--color-text-danger-alternative)]',\n },\n isDisabled: {\n true: 'text-[var(--color-text-neutral-disabled)]',\n },\n isReadOnly: {\n true: 'text-[var(--color-text-neutral-readonly)]',\n },\n },\n defaultVariants: {\n isError: false,\n isDisabled: false,\n isReadOnly: false,\n },\n})\n"],"mappings":"ykCAAA,IAAAA,GAAA,GAAAC,EAAAD,GAAA,mBAAAE,IAAA,eAAAC,GAAAH,ICAA,IAAAI,EAAA,GAAAC,EAAAD,EAAA,gBAAAE,GAAA,UAAAC,GAAA,UAAAC,GAAA,SAAAC,ICCA,IAAAC,EAGO,wCCJP,IAAAC,GAAuB,sBCAvB,IAAAC,EAAuB,sBAmChB,SAASC,EACdC,EACAC,EACiB,CACjB,GAAM,CAAE,QAAAC,EAAS,MAAAC,EAAO,UAAAC,EAAY,SAAU,QAAAC,CAAQ,EAAIJ,EAEpDK,EAAe,WAAS,IAAIN,EAAU,CAACO,EAAOC,IAAU,CAzChE,IAAAC,EAAAC,EA0CI,GAAI,CAAO,iB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oBAAC,OAAI,UAAWI,EAAG,+BAA+B,EAAG,QAAQ,YAC3D,oBAAC,QACC,SAAS,UACT,SAAS,UACT,EAAE,sHACF,KAAMD,EACR,KACA,OAAC,SAAO,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,EJP7B,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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