Saltar al contenido
Neshel-UI
Animaciones (experimental)Referencia

@neshel-ui/animations/feedback

Todas las exportaciones de @neshel-ui/animations/feedback, generadas desde sus declaraciones.

Experimental y no disponible en npm

@neshel-ui/animations es un paquete privado (0.0.0). No se puede instalar y su API puede cambiar antes de una primera publicación. Estas páginas documentan lo que existe en el repositorio.

Firmas, miembros y valores por defecto, generados desde las declaraciones compiladas. Las explicaciones y los ejemplos están en la guía.

Las descripciones de esta referencia se generan desde el código fuente del paquete y se muestran en inglés; las guías y el catálogo están en español.

  • DotsPulse component

    F04 — three pulsing dots (indeterminate); slow opacity under reduced motion.

    ({ label, decorative, size, className, style, ...rest }: IndicatorProps): Element
  • EnterExit component

    F06 — enter/exit motion for the items of a list another component owns (`data-state` + `neshel-exit`, see `createEnterExit`). Renders no element of its own; content, roles, timers and focus stay with the owner.

    ({ children, from, exitTo, distance, duration, selector, reducedMotion, }: EnterExitProps): Element
  • LoadingButton component

    F07 — loading morph on the single button child (same element, name and focus; no double activation).

    ({ loading, children, controlRef }: LoadingButtonProps): Element
  • OptimisticPulse component

    F08 — pending/confirmed/failed states on the single child; `failed` calls `onRollback`.

    ({ status, onRollback, children, controlRef, }: OptimisticPulseProps): Element
  • PendingText component

    F10 — the text stays one readable text; a light band sweeps while `pending`.

    ({ pending, className, children, ...rest }: PendingTextProps): Element
  • ProgressBar component

    F03 — progress bar: determinate with a real value, indeterminate sweep otherwise.

    ({ label, value, max, valueText, className, style, ...rest }: ProgressBarProps): Element
  • ProgressRing component

    F09 — progress ring (`pathLength`-normalised SVG; transitions are package CSS).

    (props: ProgressRingProps): Element
  • Shimmer component

    F02 — adds the `shimmer` token to the single child (e.g. a Components `Skeleton`); `::after` sweep.

    ({ children }: { children: ReactElement<unknown, string | JSXElementConstructor<any>>; }): Element
  • SkeletonShimmer component

    F02 — a decorative placeholder with a shimmer (`aria-hidden`; mark the region `aria-busy`).

    ({ width, height, shape, className, style, ...rest }: SkeletonShimmerProps): Element
  • Spinner component

    F01 — indeterminate spinner (`role="progressbar"`, no value); slow pulse under reduced motion.

    ({ label, decorative, size, className, style, ...rest }: IndicatorProps): Element
  • SuccessMark component

    F05 — success check drawn when `show` becomes true (shape shared with S10 through core).

    ({ show, label, size, circle, className, ...rest }: SuccessMarkProps): Element
  • createEnterExit function

    Animate the items of a keyed list on enter and exit. The container keeps its own semantics; F06 never moves focus, never announces and never removes an item.

    (container: HTMLElement, options?: EnterExitOptions | undefined): EnterExitControl
  • createLoadingButton function

    F07 — keep the same button (identity, accessible name, focus) while an operation runs: `aria-disabled`, activation blocked in the capture phase (click, Enter/Space and implicit submission all arrive as a click), width locked from one measurement, label hidden visually (still in the DOM), spinner on the `::after` layer.

    (button: HTMLElement, options?: LoadingButtonOptions | undefined): LoadingButtonControl
  • createOptimisticPulse function

    F08 — an optimistic change is shown as pending (soft `::before` pulse, `aria-busy`), never as confirmed until the caller says so; `failed` shows a distinct static state and calls `onRollback`.

    (element: HTMLElement, options?: OptimisticPulseOptions | undefined): OptimisticPulseControl
  • getFeedbackDebugInfo function

    Live feedback counters (tests, lab).

    (): FeedbackDebugInfo
  • EnterExitControl interface

    EnterExitControl

    EnterExitControl
    PropTipoPredeterminadoDescripción
    destroy(obligatoria)() => void—Idempotent: stops observing and restores every item's styles.
    size(obligatoria)number—Items currently tracked.
    update(obligatoria)(options: EnterExitOptions) => void——
  • EnterExitOptions interface

    EnterExitOptions

    EnterExitOptions
    PropTipoPredeterminadoDescripción
    distancenumber—Recorrido en px (0–200, por defecto 12).
    durationnumber | DurationPreset220Duración en ms o un preset de motionDefaults.duration (por defecto 220).
    exitToEnterExitSide"end"Lado hacia el que salen los elementos (por defecto "end").
    fromEnterExitSide"bottom"Lado desde el que entran los elementos (por defecto "bottom"; start/end siguen la dirección de escritura).
    reducedMotionReducedMotion"user"Política de movimiento reducido (por defecto "user"): reducido → solo opacidad.
    selectorstring"[data-state]"Elementos que se animan dentro del contenedor (por defecto "[data-state]").
  • FeedbackDebugInfo interface

    FeedbackDebugInfo

    FeedbackDebugInfo
    PropTipoPredeterminadoDescripción
    enterExit(obligatoria)number——
    loadingButtons(obligatoria)number——
    optimistic(obligatoria)number——
  • LoadingButtonControl interface

    LoadingButtonControl

    LoadingButtonControl
    PropTipoPredeterminadoDescripción
    destroy(obligatoria)() => void——
    loading(obligatoria)boolean——
    set(obligatoria)(loading: boolean) => void——
  • LoadingButtonOptions interface

    LoadingButtonOptions

    LoadingButtonOptions
    PropTipoPredeterminadoDescripción
    loadingbooleanfalseEstado inicial (por defecto false).
  • NeshelExitDetail interface

    NeshelExitDetail

    Detail of the neshel-exit event a list owner dispatches on an item before removing it.

    NeshelExitDetail
    PropTipoPredeterminadoDescripción
    waitUntil(obligatoria)(promise: Promise<unknown>) => void——
  • OptimisticPulseControl interface

    OptimisticPulseControl

    OptimisticPulseControl
    PropTipoPredeterminadoDescripción
    destroy(obligatoria)() => void——
    set(obligatoria)(status: OptimisticStatus) => void——
    status(obligatoria)OptimisticStatus——
  • OptimisticPulseOptions interface

    OptimisticPulseOptions

    OptimisticPulseOptions
    PropTipoPredeterminadoDescripción
    onRollback() => void—Se llama cuando el estado pasa a failed (deshaz el cambio optimista).
    statusOptimisticStatus——
  • ProgressSource interface

    ProgressSource

    Any 0–1 progress source (the 011 ScrollProgress and motion values fit).

    ProgressSource
    PropTipoPredeterminadoDescripción
    get(obligatoria)() => number——
    subscribe(obligatoria)(listener: (progress: number) => void) => () => void——
  • EnterExitProps type

    EnterExitProps

    EnterExitProps
    PropTipoPredeterminadoDescripción
    children(obligatoria)ReactElement—One element: the list container (e.g. a Components <Toaster motion="none">).
    distancenumber—Recorrido en px (0–200, por defecto 12).
    durationnumber | DurationPreset220Duración en ms o un preset de motionDefaults.duration (por defecto 220).
    exitToEnterExitSide"end"Lado hacia el que salen los elementos (por defecto "end").
    fromEnterExitSide"bottom"Lado desde el que entran los elementos (por defecto "bottom"; start/end siguen la dirección de escritura).
    reducedMotionReducedMotion"user"Política de movimiento reducido (por defecto "user"): reducido → solo opacidad.
    selectorstring"[data-state]"Elementos que se animan dentro del contenedor (por defecto "[data-state]").
  • EnterExitSide type
    "bottom" | "top" | "start" | "end"
  • LoadingButtonProps type

    LoadingButtonProps

    LoadingButtonProps
    PropTipoPredeterminadoDescripción
    children(obligatoria)ReactElement—One button element (e.g. a Components Button without its loading prop).
    controlRefRefObject<LoadingButtonControl | null>——
    loading(obligatoria)boolean——
  • OptimisticPulseProps type

    OptimisticPulseProps

    OptimisticPulseProps
    PropTipoPredeterminadoDescripción
    children(obligatoria)ReactElement——
    controlRefRefObject<OptimisticPulseControl | null>——
    onRollback() => void——
    status(obligatoria)OptimisticStatus——
  • OptimisticStatus type
    "idle" | "pending" | "confirmed" | "failed"
  • PendingTextProps type

    PendingTextProps

    PendingTextProps
    PropTipoPredeterminadoDescripción
    children(obligatoria)ReactNode——
    pendingboolean——

    También acepta las props de: React DOM attributes.

  • ProgressBarProps type

    ProgressBarProps

    ProgressBarProps
    PropTipoPredeterminadoDescripción
    label(obligatoria)string—Nombre accesible (obligatorio).
    maxnumber——
    valuenumber—Progreso conocido; omítelo para un indicador indeterminado (sin aria-valuenow).
    valueTextstring—Valor legible (aria-valuetext).

    También acepta las props de: React DOM attributes.

  • ProgressRingProps type

    ProgressRingProps

    ProgressRingProps
    PropTipoPredeterminadoDescripción
    label(obligatoria)string—Nombre accesible (obligatorio).
    maxnumber——
    progressProgressSource—Fuente de 0 a 1 (línea de tiempo, scroll…): dibujo en cada fotograma, aria-valuenow en cambios enteros.
    sizestring2.5emLongitud CSS (por defecto 2.5em).
    valuenumber—Progreso conocido; omítelo para un indicador indeterminado (sin aria-valuenow).
    valueTextstring—Valor legible (aria-valuetext).

    También acepta las props de: React DOM attributes.

  • SkeletonShimmerProps type

    SkeletonShimmerProps

    SkeletonShimmerProps
    PropTipoPredeterminadoDescripción
    heightstring——
    shape"line" | "rect" | "circle"——
    widthstring——

    También acepta las props de: React DOM attributes.

  • SuccessMarkProps type

    SuccessMarkProps

    SuccessMarkProps
    PropTipoPredeterminadoDescripción
    circleboolean——
    labelstring—Nombre accesible; omitido → decorativo. Nunca anuncia (sin región en vivo).
    show(obligatoria)boolean—Traza la marca (solo cuando la operación ha terminado bien de verdad).
    sizenumber40px (por defecto 40).

    También acepta las props de: React DOM attributes.

Editar en GitHub