@enonic/ui
Advanced tools
@@ -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; |
+1
-1
| { | ||
| "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
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
808969
0.17%8311
0.22%