@almadar/ui 3.3.1 → 3.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -4,6 +4,7 @@
4
4
  * A versatile avatar component supporting images, initials, icons, and status indicators.
5
5
  */
6
6
  import React from "react";
7
+ import type { EventKey } from "@almadar/core";
7
8
  import type { LucideIcon } from "lucide-react";
8
9
  export type AvatarSize = "xs" | "sm" | "md" | "lg" | "xl";
9
10
  export type AvatarStatus = "online" | "offline" | "away" | "busy";
@@ -51,7 +52,7 @@ export interface AvatarProps {
51
52
  */
52
53
  onClick?: () => void;
53
54
  /** Declarative event name — emits UI:{action} via eventBus on click */
54
- action?: string;
55
+ action?: EventKey;
55
56
  /** Payload to include with the action event */
56
57
  actionPayload?: Record<string, unknown>;
57
58
  }
@@ -5,6 +5,7 @@
5
5
  * Think of it as a styled div with consistent design tokens.
6
6
  */
7
7
  import React from "react";
8
+ import type { EventKey } from "@almadar/core";
8
9
  export type BoxPadding = "none" | "xs" | "sm" | "md" | "lg" | "xl" | "2xl";
9
10
  export type BoxMargin = "none" | "xs" | "sm" | "md" | "lg" | "xl" | "2xl" | "auto";
10
11
  export type BoxBg = "transparent" | "primary" | "secondary" | "muted" | "accent" | "surface" | "overlay";
@@ -44,7 +45,7 @@ export interface BoxProps extends React.HTMLAttributes<HTMLDivElement> {
44
45
  /** HTML element to render as */
45
46
  as?: React.ElementType;
46
47
  /** Declarative event name — emits UI:{action} via eventBus on click */
47
- action?: string;
48
+ action?: EventKey;
48
49
  /** Payload to include with the action event */
49
50
  actionPayload?: Record<string, unknown>;
50
51
  /** Declarative hover event — emits UI:{hoverEvent} with { hovered: true/false } on mouseEnter/mouseLeave */
@@ -1,4 +1,5 @@
1
1
  import React from "react";
2
+ import type { EventKey } from "@almadar/core";
2
3
  import { type LucideIcon } from "lucide-react";
3
4
  export type ButtonVariant = "primary" | "secondary" | "ghost" | "danger" | "success" | "warning" | "default";
4
5
  export type ButtonSize = "sm" | "md" | "lg";
@@ -15,7 +16,7 @@ export interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElemen
15
16
  /** Alias for rightIcon */
16
17
  iconRight?: React.ReactNode | LucideIcon | string;
17
18
  /** Declarative event name — emits UI:{action} via eventBus on click */
18
- action?: string;
19
+ action?: EventKey;
19
20
  /** Payload to include with the action event */
20
21
  actionPayload?: Record<string, unknown>;
21
22
  /** Button label text (alternative to children for schema-driven rendering) */
@@ -1,4 +1,5 @@
1
1
  import React from "react";
2
+ import type { EventKey } from "@almadar/core";
2
3
  import { type LucideIcon } from "lucide-react";
3
4
  export interface SelectOption {
4
5
  value: string;
@@ -12,7 +13,7 @@ export interface InputProps extends Omit<React.InputHTMLAttributes<HTMLInputElem
12
13
  /** Whether input is disabled */
13
14
  disabled?: boolean;
14
15
  /** Declarative event name for trait dispatch */
15
- action?: string;
16
+ action?: EventKey;
16
17
  /** Input type - supports 'select' and 'textarea' in addition to standard types */
17
18
  inputType?: "text" | "email" | "password" | "number" | "tel" | "url" | "search" | "date" | "datetime-local" | "time" | "checkbox" | "select" | "textarea";
18
19
  error?: string;
@@ -31,4 +32,4 @@ export interface InputProps extends Omit<React.InputHTMLAttributes<HTMLInputElem
31
32
  /** onChange handler - accepts events from input, select, or textarea */
32
33
  onChange?: React.ChangeEventHandler<HTMLInputElement | HTMLSelectElement | HTMLTextAreaElement>;
33
34
  }
34
- export declare const Input: React.ForwardRefExoticComponent<InputProps & React.RefAttributes<HTMLInputElement | HTMLTextAreaElement | HTMLSelectElement>>;
35
+ export declare const Input: React.ForwardRefExoticComponent<InputProps & React.RefAttributes<HTMLInputElement | HTMLSelectElement | HTMLTextAreaElement>>;
@@ -4,13 +4,14 @@
4
4
  * A fixed backdrop for modals and drawers.
5
5
  */
6
6
  import React from "react";
7
+ import type { EventKey } from "@almadar/core";
7
8
  export interface OverlayProps {
8
9
  isVisible?: boolean;
9
10
  onClick?: (e: React.MouseEvent) => void;
10
11
  className?: string;
11
12
  blur?: boolean;
12
13
  /** Declarative event name — emits UI:{action} via eventBus on click */
13
- action?: string;
14
+ action?: EventKey;
14
15
  }
15
16
  export declare const Overlay: React.FC<OverlayProps>;
16
17
  export default Overlay;
@@ -4,13 +4,14 @@
4
4
  * A radio button component with label support and accessibility.
5
5
  */
6
6
  import React from "react";
7
+ import type { EventKey } from "@almadar/core";
7
8
  export interface RadioProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, "type" | "size"> {
8
9
  /** Radio options (string array or SelectOption array) */
9
10
  options?: string[];
10
11
  /** Current selected value */
11
12
  value?: string;
12
13
  /** Declarative event name for trait dispatch */
13
- action?: string;
14
+ action?: EventKey;
14
15
  /**
15
16
  * Label text displayed next to the radio button
16
17
  */
@@ -1,4 +1,5 @@
1
1
  import React from "react";
2
+ import type { EventKey } from "@almadar/core";
2
3
  export type RangeSliderSize = "sm" | "md" | "lg";
3
4
  export interface RangeSliderProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "onChange"> {
4
5
  /** Minimum value */
@@ -20,7 +21,7 @@ export interface RangeSliderProps extends Omit<React.HTMLAttributes<HTMLDivEleme
20
21
  /** Disabled state */
21
22
  disabled?: boolean;
22
23
  /** Declarative event name for value changes */
23
- action?: string;
24
+ action?: EventKey;
24
25
  /** Payload to include with the action event */
25
26
  actionPayload?: Record<string, unknown>;
26
27
  /** Direct onChange callback */
@@ -1,4 +1,5 @@
1
1
  import React from "react";
2
+ import type { EventKey } from "@almadar/core";
2
3
  export interface SelectOption {
3
4
  value: string;
4
5
  label: string;
@@ -12,7 +13,7 @@ export interface SelectProps extends Omit<React.SelectHTMLAttributes<HTMLSelectE
12
13
  /** Current value */
13
14
  value?: string;
14
15
  /** Declarative event name for trait dispatch */
15
- action?: string;
16
+ action?: EventKey;
16
17
  /** Error message */
17
18
  error?: string;
18
19
  }
@@ -5,6 +5,7 @@
5
5
  * Includes convenience exports VStack and HStack for common use cases.
6
6
  */
7
7
  import React from "react";
8
+ import type { EventKey } from "@almadar/core";
8
9
  export type StackDirection = "horizontal" | "vertical";
9
10
  export type StackGap = "none" | "xs" | "sm" | "md" | "lg" | "xl" | "2xl";
10
11
  export type StackAlign = "start" | "center" | "end" | "stretch" | "baseline";
@@ -41,7 +42,7 @@ export interface StackProps {
41
42
  /** Tab index for focus management */
42
43
  tabIndex?: number;
43
44
  /** Declarative event name — emits UI:{action} via eventBus on click */
44
- action?: string;
45
+ action?: EventKey;
45
46
  /** Payload to include with the action event */
46
47
  actionPayload?: Record<string, unknown>;
47
48
  /** When true, horizontal stacks flip to vertical below the md breakpoint (768px) */
@@ -7,6 +7,7 @@
7
7
  * - Notes: Yellow highlight
8
8
  */
9
9
  import React from "react";
10
+ import type { EventKey } from "@almadar/core";
10
11
  export type HighlightType = "question" | "note";
11
12
  export interface TextHighlightProps {
12
13
  /**
@@ -43,7 +44,7 @@ export interface TextHighlightProps {
43
44
  */
44
45
  children: React.ReactNode;
45
46
  /** Declarative event name — emits UI:{action} via eventBus on click */
46
- action?: string;
47
+ action?: EventKey;
47
48
  /** Declarative hover event — emits UI:{hoverEvent} with { hovered: true/false } */
48
49
  hoverEvent?: string;
49
50
  }
@@ -1,11 +1,12 @@
1
1
  import React from "react";
2
+ import type { EventKey } from "@almadar/core";
2
3
  export interface TextareaProps extends React.TextareaHTMLAttributes<HTMLTextAreaElement> {
3
4
  /** Placeholder text */
4
5
  placeholder?: string;
5
6
  /** Number of visible rows */
6
7
  rows?: number;
7
8
  /** Declarative event name for trait dispatch */
8
- action?: string;
9
+ action?: EventKey;
9
10
  /** Error message */
10
11
  error?: string;
11
12
  }
@@ -4,6 +4,7 @@
4
4
  * Renders a single frame from a spritesheet with transform support.
5
5
  */
6
6
  import React from 'react';
7
+ import type { EventKey } from "@almadar/core";
7
8
  export interface SpriteProps {
8
9
  /** Spritesheet image URL */
9
10
  spritesheet: string;
@@ -36,7 +37,7 @@ export interface SpriteProps {
36
37
  /** Optional onClick handler */
37
38
  onClick?: () => void;
38
39
  /** Declarative event name emitted on click via useEventBus */
39
- action?: string;
40
+ action?: EventKey;
40
41
  }
41
42
  /**
42
43
  * Sprite component for rendering spritesheet frames
@@ -7,6 +7,7 @@
7
7
  * @generated by Orbital Compiler
8
8
  */
9
9
  import React from "react";
10
+ import type { EventKey } from "@almadar/core";
10
11
  export interface CardAction {
11
12
  label: string;
12
13
  onClick?: () => void;
@@ -32,7 +33,7 @@ export interface CardProps {
32
33
  /** Additional CSS classes */
33
34
  className?: string;
34
35
  /** Declarative event name — emits UI:{action} via eventBus on card click */
35
- action?: string;
36
+ action?: EventKey;
36
37
  /** Whether the card is selected (highlighted state) */
37
38
  isSelected?: boolean;
38
39
  /** Card name (alias for title) */
@@ -11,6 +11,7 @@
11
11
  * Uses atoms only internally: Box, VStack, HStack, Typography, Badge, Button, Icon.
12
12
  */
13
13
  import React from 'react';
14
+ import type { EventKey } from '@almadar/core';
14
15
  export interface DataGridField {
15
16
  /** Entity field name (dot-notation supported) */
16
17
  name: string;
@@ -28,7 +29,7 @@ export interface DataGridItemAction {
28
29
  /** Button label */
29
30
  label: string;
30
31
  /** Event name to emit (dispatched as UI:{event} with { row: itemData }) */
31
- event: string;
32
+ event: EventKey;
32
33
  /** Lucide icon name */
33
34
  icon?: string;
34
35
  /** Button variant */
@@ -11,6 +11,7 @@
11
11
  * Uses atoms only internally: Box, VStack, HStack, Typography, Badge, Button, Icon.
12
12
  */
13
13
  import React from 'react';
14
+ import type { EventKey } from "@almadar/core";
14
15
  export interface DataListField {
15
16
  /** Entity field name (dot-notation supported) */
16
17
  name: string;
@@ -28,7 +29,7 @@ export interface DataListItemAction {
28
29
  /** Button label */
29
30
  label: string;
30
31
  /** Event name to emit (dispatched as UI:{event} with { id, row: itemData }) */
31
- event: string;
32
+ event: EventKey;
32
33
  /** Lucide icon name */
33
34
  icon?: string;
34
35
  /** Button variant */
@@ -1,4 +1,5 @@
1
1
  import React from "react";
2
+ import type { EventKey } from "@almadar/core";
2
3
  export type NumberStepperSize = "sm" | "md" | "lg";
3
4
  export interface NumberStepperProps {
4
5
  /** Current value */
@@ -16,7 +17,7 @@ export interface NumberStepperProps {
16
17
  /** Direct onChange callback */
17
18
  onChange?: (value: number) => void;
18
19
  /** Declarative event name for value changes */
19
- action?: string;
20
+ action?: EventKey;
20
21
  /** Payload to include with the action event */
21
22
  actionPayload?: Record<string, unknown>;
22
23
  /** Additional CSS classes */
@@ -1,4 +1,5 @@
1
1
  import React from "react";
2
+ import type { EventKey } from "@almadar/core";
2
3
  export type StarRatingSize = "sm" | "md" | "lg";
3
4
  export type StarRatingPrecision = "full" | "half";
4
5
  export interface StarRatingProps {
@@ -13,7 +14,7 @@ export interface StarRatingProps {
13
14
  /** Star size */
14
15
  size?: StarRatingSize;
15
16
  /** Declarative event name for rating changes */
16
- action?: string;
17
+ action?: EventKey;
17
18
  /** Payload to include with the action event */
18
19
  actionPayload?: Record<string, unknown>;
19
20
  /** Direct onChange callback */
@@ -6,11 +6,12 @@
6
6
  * Uses useSwipeGesture for gesture detection and useEventBus for event emission.
7
7
  */
8
8
  import React from 'react';
9
+ import type { EventKey } from "@almadar/core";
9
10
  export interface SwipeAction {
10
11
  label: string;
11
12
  icon?: string;
12
13
  variant?: 'primary' | 'secondary' | 'danger' | 'ghost';
13
- event: string;
14
+ event: EventKey;
14
15
  eventPayload?: Record<string, unknown>;
15
16
  }
16
17
  export interface SwipeableRowProps {
@@ -1,4 +1,5 @@
1
1
  import React from "react";
2
+ import type { EventKey } from "@almadar/core";
2
3
  export interface UploadDropZoneProps {
3
4
  /** Accepted MIME types (e.g., "image/*", "application/pdf") */
4
5
  accept?: string;
@@ -15,7 +16,7 @@ export interface UploadDropZoneProps {
15
16
  /** Disabled state */
16
17
  disabled?: boolean;
17
18
  /** Declarative event name for file selection */
18
- action?: string;
19
+ action?: EventKey;
19
20
  /** Payload to include with the action event */
20
21
  actionPayload?: Record<string, unknown>;
21
22
  /** Direct onFiles callback */
@@ -1,3 +1,4 @@
1
+ import type { EventKey } from "@almadar/core";
1
2
  import { type EventBusContextType } from "../../../hooks/useEventBus";
2
3
  export interface MenuOption {
3
4
  /** Optional ID (generated from index if not provided) */
@@ -15,7 +16,7 @@ export interface MenuOption {
15
16
  /** Sub-label or description */
16
17
  subLabel?: string;
17
18
  /** Action identifier (alternative to event) */
18
- action?: string;
19
+ action?: EventKey;
19
20
  }
20
21
  export interface GameMenuProps {
21
22
  /** Menu title */
@@ -9,6 +9,7 @@
9
9
  * for pagination, filtering, or search. All state is owned by the trait state machine.
10
10
  */
11
11
  import React from 'react';
12
+ import type { EventKey } from "@almadar/core";
12
13
  import type { EntityDisplayProps } from './types';
13
14
  export type CardGridGap = 'none' | 'sm' | 'md' | 'lg' | 'xl';
14
15
  /**
@@ -18,13 +19,13 @@ export interface CardItemAction {
18
19
  /** Action button label */
19
20
  label: string;
20
21
  /** Event to dispatch on click (schema metadata) */
21
- event?: string;
22
+ event?: EventKey;
22
23
  /** Navigation URL - supports template interpolation like "/products/{{row.id}}" */
23
24
  navigatesTo?: string;
24
25
  /** Callback on click */
25
26
  onClick?: (item: unknown) => void;
26
27
  /** Action used by generated code - alternative to event */
27
- action?: string;
28
+ action?: EventKey;
28
29
  /** Action placement - accepts string for compatibility with generated code */
29
30
  placement?: 'card' | 'footer' | 'row' | string;
30
31
  /** Button variant - accepts string for compatibility with generated code */
@@ -8,6 +8,7 @@
8
8
  * @packageDocumentation
9
9
  */
10
10
  import React from "react";
11
+ import type { EventKey } from "@almadar/core";
11
12
  /**
12
13
  * Allowed element types for custom patterns.
13
14
  */
@@ -31,7 +32,7 @@ export interface CustomPatternProps {
31
32
  /** Text content (for leaf elements) */
32
33
  content?: string;
33
34
  /** Event to emit on click (REQUIRED for interactive elements) */
34
- action?: string;
35
+ action?: EventKey;
35
36
  /** Event payload */
36
37
  payload?: Record<string, unknown>;
37
38
  /** Nested children patterns */
@@ -81,7 +82,7 @@ export interface CustomPatternConfig {
81
82
  className?: string;
82
83
  token?: string | string[];
83
84
  content?: string;
84
- action?: string;
85
+ action?: EventKey;
85
86
  payload?: Record<string, unknown>;
86
87
  children?: CustomPatternConfig[];
87
88
  src?: string;
@@ -1,4 +1,5 @@
1
1
  import React from "react";
2
+ import type { EventKey } from "@almadar/core";
2
3
  import { LucideIcon } from "lucide-react";
3
4
  import { EntityDisplayProps } from "./types";
4
5
  import type { EntityRow } from "@almadar/core";
@@ -33,7 +34,7 @@ export interface DataTableProps<T extends EntityRow & {
33
34
  label: string;
34
35
  event?: string;
35
36
  navigatesTo?: string;
36
- action?: string;
37
+ action?: EventKey;
37
38
  placement?: "row" | "bulk" | string;
38
39
  icon?: LucideIcon;
39
40
  variant?: "default" | "primary" | "secondary" | "ghost" | "danger" | string;
@@ -12,6 +12,7 @@
12
12
  * - Nested sections with collapsible support
13
13
  */
14
14
  import React from "react";
15
+ import type { EventKey } from "@almadar/core";
15
16
  import { type SelectOption } from "../atoms/Select";
16
17
  import { type RelationOption } from "../molecules/RelationSelect";
17
18
  import type { OrbitalEntity } from "@almadar/core";
@@ -173,9 +174,9 @@ export interface FormProps extends Omit<React.FormHTMLAttributes<HTMLFormElement
173
174
  /** Form title (used by ModalSlot to extract title) */
174
175
  title?: string;
175
176
  /** Event to dispatch on successful submit (defaults to 'SAVE') */
176
- submitEvent?: string;
177
+ submitEvent?: EventKey;
177
178
  /** Event to dispatch on cancel (defaults to 'CANCEL') */
178
- cancelEvent?: string;
179
+ cancelEvent?: EventKey;
179
180
  /** Entity ID binding for edit mode (triggers initialData from selectedEntity in compiled code) */
180
181
  entityId?: string;
181
182
  /** Data for relation fields: { fieldName: RelationOption[] } */
@@ -17,6 +17,7 @@
17
17
  * - No internal search/filter state — trait provides filtered data
18
18
  */
19
19
  import React from "react";
20
+ import type { EventKey } from "@almadar/core";
20
21
  import type { LucideIcon } from "lucide-react";
21
22
  import { type MenuItem } from "../molecules/Menu";
22
23
  import type { EntityDisplayProps } from "./types";
@@ -41,11 +42,12 @@ export interface ListItem {
41
42
  export interface SchemaItemAction {
42
43
  label: string;
43
44
  /** Event to dispatch on click */
44
- event?: string;
45
+ event?: EventKey;
45
46
  navigatesTo?: string;
46
47
  /** Action placement - accepts all common placement values */
47
48
  placement?: "row" | "bulk" | "card" | "footer" | string;
48
- action?: string;
49
+ /** Alternate event-dispatch field (same semantics as `event`) — generated code emits `UI:{action}` on click */
50
+ action?: EventKey;
49
51
  variant?: "primary" | "secondary" | "ghost" | "danger" | "default";
50
52
  /** Click handler from generated code */
51
53
  onClick?: (row: unknown) => void;
@@ -11,6 +11,7 @@
11
11
  * - className for external styling
12
12
  */
13
13
  import React from "react";
14
+ import type { EventKey } from "@almadar/core";
14
15
  import type { EntityRow } from "@almadar/core";
15
16
  import type { LucideIcon } from "lucide-react";
16
17
  export type TimelineItemStatus = "complete" | "active" | "pending" | "error";
@@ -32,7 +33,7 @@ export interface TimelineItem {
32
33
  }
33
34
  export interface TimelineAction {
34
35
  label: string;
35
- event?: string;
36
+ event?: EventKey;
36
37
  navigatesTo?: string;
37
38
  variant?: "primary" | "secondary" | "ghost";
38
39
  }
@@ -1,4 +1,5 @@
1
1
  import React from 'react';
2
+ import { EventKey } from '@almadar/core';
2
3
  import { LucideIcon } from 'lucide-react';
3
4
  import * as react_jsx_runtime from 'react/jsx-runtime';
4
5
 
@@ -48,7 +49,7 @@ interface BoxProps extends React.HTMLAttributes<HTMLDivElement> {
48
49
  /** HTML element to render as */
49
50
  as?: React.ElementType;
50
51
  /** Declarative event name — emits UI:{action} via eventBus on click */
51
- action?: string;
52
+ action?: EventKey;
52
53
  /** Payload to include with the action event */
53
54
  actionPayload?: Record<string, unknown>;
54
55
  /** Declarative hover event — emits UI:{hoverEvent} with { hovered: true/false } on mouseEnter/mouseLeave */
@@ -106,7 +107,7 @@ interface StackProps {
106
107
  /** Tab index for focus management */
107
108
  tabIndex?: number;
108
109
  /** Declarative event name — emits UI:{action} via eventBus on click */
109
- action?: string;
110
+ action?: EventKey;
110
111
  /** Payload to include with the action event */
111
112
  actionPayload?: Record<string, unknown>;
112
113
  /** When true, horizontal stacks flip to vertical below the md breakpoint (768px) */
@@ -180,7 +181,7 @@ interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
180
181
  /** Alias for rightIcon */
181
182
  iconRight?: React.ReactNode | LucideIcon | string;
182
183
  /** Declarative event name — emits UI:{action} via eventBus on click */
183
- action?: string;
184
+ action?: EventKey;
184
185
  /** Payload to include with the action event */
185
186
  actionPayload?: Record<string, unknown>;
186
187
  /** Button label text (alternative to children for schema-driven rendering) */
@@ -276,7 +277,7 @@ interface InputProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, "
276
277
  /** Whether input is disabled */
277
278
  disabled?: boolean;
278
279
  /** Declarative event name for trait dispatch */
279
- action?: string;
280
+ action?: EventKey;
280
281
  /** Input type - supports 'select' and 'textarea' in addition to standard types */
281
282
  inputType?: "text" | "email" | "password" | "number" | "tel" | "url" | "search" | "date" | "datetime-local" | "time" | "checkbox" | "select" | "textarea";
282
283
  error?: string;
@@ -295,7 +296,7 @@ interface InputProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, "
295
296
  /** onChange handler - accepts events from input, select, or textarea */
296
297
  onChange?: React.ChangeEventHandler<HTMLInputElement | HTMLSelectElement | HTMLTextAreaElement>;
297
298
  }
298
- declare const Input: React.ForwardRefExoticComponent<InputProps & React.RefAttributes<HTMLInputElement | HTMLTextAreaElement | HTMLSelectElement>>;
299
+ declare const Input: React.ForwardRefExoticComponent<InputProps & React.RefAttributes<HTMLInputElement | HTMLSelectElement | HTMLTextAreaElement>>;
299
300
 
300
301
  /**
301
302
  * DocSidebar Molecule Component
@@ -1,4 +1,5 @@
1
1
  import React from 'react';
2
+ import { EventKey } from '@almadar/core';
2
3
  import { LucideIcon } from 'lucide-react';
3
4
 
4
5
  /**
@@ -47,7 +48,7 @@ interface BoxProps extends React.HTMLAttributes<HTMLDivElement> {
47
48
  /** HTML element to render as */
48
49
  as?: React.ElementType;
49
50
  /** Declarative event name — emits UI:{action} via eventBus on click */
50
- action?: string;
51
+ action?: EventKey;
51
52
  /** Payload to include with the action event */
52
53
  actionPayload?: Record<string, unknown>;
53
54
  /** Declarative hover event — emits UI:{hoverEvent} with { hovered: true/false } on mouseEnter/mouseLeave */
@@ -105,7 +106,7 @@ interface StackProps {
105
106
  /** Tab index for focus management */
106
107
  tabIndex?: number;
107
108
  /** Declarative event name — emits UI:{action} via eventBus on click */
108
- action?: string;
109
+ action?: EventKey;
109
110
  /** Payload to include with the action event */
110
111
  actionPayload?: Record<string, unknown>;
111
112
  /** When true, horizontal stacks flip to vertical below the md breakpoint (768px) */
@@ -179,7 +180,7 @@ interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
179
180
  /** Alias for rightIcon */
180
181
  iconRight?: React.ReactNode | LucideIcon | string;
181
182
  /** Declarative event name — emits UI:{action} via eventBus on click */
182
- action?: string;
183
+ action?: EventKey;
183
184
  /** Payload to include with the action event */
184
185
  actionPayload?: Record<string, unknown>;
185
186
  /** Button label text (alternative to children for schema-driven rendering) */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@almadar/ui",
3
- "version": "3.3.1",
3
+ "version": "3.4.0",
4
4
  "description": "React UI components, hooks, and providers for Almadar",
5
5
  "type": "module",
6
6
  "main": "./dist/components/index.js",
@@ -118,9 +118,9 @@
118
118
  "access": "public"
119
119
  },
120
120
  "dependencies": {
121
- "@almadar/core": ">=5.5.0",
121
+ "@almadar/core": ">=5.6.0",
122
122
  "@almadar/evaluator": ">=2.9.2",
123
- "@almadar/patterns": ">=2.14.1",
123
+ "@almadar/patterns": ">=2.16.0",
124
124
  "@almadar/runtime": ">=4.3.0",
125
125
  "@almadar/std": ">=6.4.1",
126
126
  "@almadar/syntax": ">=1.3.1",