Big News: Socket raises $60M Series C at a $1B valuation to secure software supply chains for AI-driven development.Announcement
Sign In

@enonic/ui

Package Overview
Dependencies
Maintainers
4
Versions
107
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@enonic/ui - npm Package Compare versions

Comparing version
1.0.0-beta.4
to
1.0.0-beta.5
+9
-3
dist/types/components/input/input.d.ts

@@ -1,2 +0,2 @@

import { ComponentPropsWithoutRef, ReactNode } from 'react';
import { ComponentPropsWithoutRef, ReactNode, Ref } from 'react';
export type InputAddonProps = ComponentPropsWithoutRef<'div'>;

@@ -22,10 +22,16 @@ export type InputProps = {

highlight?: boolean;
/**
* Ref to the field's container element — the one that wears the blink ring. Pass the same ref
* to `useBlinkAttention` so the hook can restart the CSS animation directly via the DOM. When
* provided, `highlight` becomes optional; the hook drives the class on its own.
*/
highlightRef?: Ref<HTMLDivElement>;
className?: string;
} & ComponentPropsWithoutRef<'input'>;
export declare const Input: import('preact').FunctionalComponent<import('preact/compat').PropsWithoutRef<InputProps> & {
ref?: import('preact').Ref<HTMLInputElement> | undefined;
ref?: Ref<HTMLInputElement> | undefined;
}> & {
Addon: import('preact').FunctionalComponent<import('preact/compat').PropsWithoutRef<InputAddonProps> & {
ref?: import('preact').Ref<HTMLDivElement> | undefined;
ref?: Ref<HTMLDivElement> | undefined;
}>;
};

@@ -1,2 +0,2 @@

import { ComponentPropsWithoutRef, ReactNode } from 'react';
import { ComponentPropsWithoutRef, ReactNode, Ref } from 'react';
export type TextAreaProps = {

@@ -20,2 +20,8 @@ label?: string;

highlight?: boolean;
/**
* Ref to the field's container element — the one that wears the blink ring. Pass the same ref
* to `useBlinkAttention` so the hook can restart the CSS animation directly via the DOM. When
* provided, `highlight` becomes optional; the hook drives the class on its own.
*/
highlightRef?: Ref<HTMLDivElement>;
resizable?: boolean;

@@ -32,3 +38,3 @@ /**

export declare const TextArea: import('preact').FunctionalComponent<import('preact/compat').PropsWithoutRef<TextAreaProps> & {
ref?: import('preact').Ref<HTMLTextAreaElement> | undefined;
ref?: Ref<HTMLTextAreaElement> | undefined;
}>;

@@ -8,6 +8,12 @@ import { RefObject } from 'react';

* Draws attention to an element by scrolling it into view and pulsing a one-shot ring around it.
* Returns a boolean — apply the `input-blink-attention` utility class while it's `true`.
* The hook owns the `input-blink-attention` class on the ref'd element — the ref must point to
* the element that wears the ring (typically a field's container, e.g. `Input.highlightRef` /
* `TextArea.highlightRef`). A boolean is also returned for callers that need to react to the
* blink in their own UI.
*
* The trigger is edge-driven: every time `trigger` flips to truthy, the animation restarts.
* The trigger is edge-driven: every time `trigger` flips to truthy, the animation restarts —
* even when the previous blink is still in progress. Restarts go through a class-remove → reflow
* → class-add cycle rather than React state alone, because React can coalesce a false→true
* toggle into a single commit and the browser would then see one uninterrupted animation.
*/
export declare const useBlinkAttention: <T extends HTMLElement>(ref: RefObject<T | null>, trigger: unknown, { scrollIntoView }?: UseBlinkAttentionConfig) => boolean;
{
"name": "@enonic/ui",
"version": "1.0.0-beta.4",
"version": "1.0.0-beta.5",
"description": "Enonic UI Component Library",

@@ -5,0 +5,0 @@ "author": "Enonic",

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display