@almadar/ui 5.26.1 → 5.27.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.
- package/dist/avl/index.cjs +2617 -2960
- package/dist/avl/index.js +1584 -1927
- package/dist/components/core/atoms/Avatar.d.ts +4 -4
- package/dist/components/core/atoms/Badge.d.ts +3 -2
- package/dist/components/core/atoms/Button.d.ts +7 -7
- package/dist/components/core/atoms/Card.d.ts +3 -0
- package/dist/components/core/atoms/Checkbox.d.ts +4 -1
- package/dist/components/core/atoms/FilterPill.d.ts +3 -2
- package/dist/components/core/atoms/Icon.d.ts +10 -1
- package/dist/components/core/atoms/Input.d.ts +9 -10
- package/dist/components/core/atoms/Select.d.ts +3 -1
- package/dist/components/core/atoms/Textarea.d.ts +3 -1
- package/dist/components/core/atoms/index.d.ts +1 -1
- package/dist/components/core/atoms/types.d.ts +2 -1
- package/dist/components/core/molecules/Breadcrumb.d.ts +3 -3
- package/dist/components/core/molecules/Card.d.ts +4 -3
- package/dist/components/core/molecules/Carousel.d.ts +2 -2
- package/dist/components/core/molecules/DataGrid.d.ts +5 -4
- package/dist/components/core/molecules/DataList.d.ts +7 -6
- package/dist/components/core/molecules/DocumentViewer.d.ts +3 -2
- package/dist/components/core/molecules/EmptyState.d.ts +2 -2
- package/dist/components/core/molecules/FloatingActionButton.d.ts +5 -5
- package/dist/components/core/molecules/FormSectionHeader.d.ts +3 -2
- package/dist/components/core/molecules/Header.d.ts +5 -4
- package/dist/components/core/molecules/Lightbox.d.ts +2 -1
- package/dist/components/core/molecules/Menu.d.ts +3 -3
- package/dist/components/core/molecules/Navigation.d.ts +2 -2
- package/dist/components/core/molecules/PageHeader.d.ts +2 -2
- package/dist/components/core/molecules/Sidebar.d.ts +5 -5
- package/dist/components/core/molecules/StatDisplay.d.ts +3 -2
- package/dist/components/core/molecules/SwipeableRow.d.ts +2 -1
- package/dist/components/core/molecules/TableView.d.ts +5 -4
- package/dist/components/core/molecules/Tabs.d.ts +2 -2
- package/dist/components/core/molecules/UploadDropZone.d.ts +3 -2
- package/dist/components/core/organisms/ComponentPatterns.d.ts +0 -306
- package/dist/components/core/organisms/CustomPattern.d.ts +3 -3
- package/dist/components/core/organisms/DataTable.d.ts +5 -5
- package/dist/components/core/organisms/DetailPanel.d.ts +3 -3
- package/dist/components/core/organisms/Form.d.ts +3 -2
- package/dist/components/core/organisms/LayoutPatterns.d.ts +0 -74
- package/dist/components/core/organisms/List.d.ts +4 -4
- package/dist/components/core/organisms/MediaGallery.d.ts +3 -3
- package/dist/components/core/organisms/StatCard.d.ts +4 -4
- package/dist/components/core/organisms/Timeline.d.ts +2 -2
- package/dist/components/core/templates/DashboardLayout.d.ts +6 -6
- package/dist/components/game/atoms/ActionButton.d.ts +2 -2
- package/dist/components/game/atoms/ControlButton.d.ts +2 -2
- package/dist/components/game/atoms/ItemSlot.d.ts +2 -2
- package/dist/components/game/atoms/ResourceCounter.d.ts +2 -2
- package/dist/components/game/atoms/ScoreDisplay.d.ts +2 -2
- package/dist/components/game/atoms/StateIndicator.d.ts +2 -1
- package/dist/components/game/atoms/StatusEffect.d.ts +3 -2
- package/dist/components/game/atoms/WaypointMarker.d.ts +2 -2
- package/dist/components/game/molecules/ActionButtons.d.ts +2 -8
- package/dist/components/game/molecules/CraftingRecipe.d.ts +3 -3
- package/dist/components/game/molecules/EnemyPlate.d.ts +2 -2
- package/dist/components/game/molecules/GameCanvas2D.d.ts +3 -2
- package/dist/components/game/molecules/GameHud.d.ts +3 -2
- package/dist/components/game/molecules/GameOverScreen.d.ts +2 -2
- package/dist/components/game/molecules/HealthPanel.d.ts +2 -2
- package/dist/components/game/molecules/InventoryGrid.d.ts +2 -2
- package/dist/components/game/molecules/IsometricCanvas.d.ts +4 -4
- package/dist/components/game/molecules/PlatformerCanvas.d.ts +5 -5
- package/dist/components/game/molecules/PowerupSlots.d.ts +2 -2
- package/dist/components/game/molecules/ResourceBar.d.ts +2 -2
- package/dist/components/game/molecules/StatBadge.d.ts +2 -2
- package/dist/components/game/molecules/TurnPanel.d.ts +2 -2
- package/dist/components/game/molecules/UnitCommandBar.d.ts +2 -2
- package/dist/components/game/organisms/BattleBoard.d.ts +2 -2
- package/dist/components/game/organisms/CanvasEffect.d.ts +3 -3
- package/dist/components/game/organisms/TraitSlot.d.ts +3 -3
- package/dist/components/game/organisms/WorldMapBoard.d.ts +2 -2
- package/dist/components/game/organisms/puzzles/builder/BuilderBoard.d.ts +2 -2
- package/dist/components/game/organisms/puzzles/classifier/ClassifierBoard.d.ts +3 -3
- package/dist/components/game/organisms/types/effects.d.ts +8 -7
- package/dist/components/game/organisms/types/isometric.d.ts +5 -4
- package/dist/components/game/organisms/types/spriteAnimation.d.ts +4 -3
- package/dist/components/game/organisms/useCanvasEffects.d.ts +2 -1
- package/dist/components/index.cjs +2663 -3006
- package/dist/components/index.js +1785 -2128
- package/dist/components/marketing/atoms/AnimatedGraphic.d.ts +2 -1
- package/dist/components/marketing/molecules/FeatureCard.d.ts +2 -2
- package/dist/components/marketing/molecules/MarketingFooter.d.ts +2 -1
- package/dist/components/marketing/molecules/StepFlow.d.ts +2 -1
- package/dist/components/marketing/molecules/TeamCard.d.ts +2 -1
- package/dist/components/marketing/organisms/book/BookCoverPage.d.ts +2 -1
- package/dist/components/marketing/templates/AboutPageTemplate.d.ts +2 -1
- package/dist/components/marketing/templates/AuthLayout.d.ts +2 -1
- package/dist/components/marketing/templates/LandingPageTemplate.d.ts +3 -2
- package/dist/docs/index.cjs +54 -11
- package/dist/docs/index.d.cts +48 -37
- package/dist/docs/index.js +54 -11
- package/dist/marketing/index.cjs +27 -13
- package/dist/marketing/index.d.cts +72 -61
- package/dist/marketing/index.js +27 -13
- package/dist/providers/index.cjs +2444 -2787
- package/dist/providers/index.js +1562 -1905
- package/dist/runtime/index.cjs +2482 -2825
- package/dist/runtime/index.js +1564 -1907
- package/package.json +2 -2
|
@@ -4,15 +4,15 @@
|
|
|
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, EventPayload } from "@almadar/core";
|
|
8
|
-
import type
|
|
7
|
+
import type { AssetUrl, EventKey, EventPayload } from "@almadar/core";
|
|
8
|
+
import { type IconInput } from "./Icon";
|
|
9
9
|
export type AvatarSize = "xs" | "sm" | "md" | "lg" | "xl";
|
|
10
10
|
export type AvatarStatus = "online" | "offline" | "away" | "busy";
|
|
11
11
|
export interface AvatarProps {
|
|
12
12
|
/**
|
|
13
13
|
* Image source URL
|
|
14
14
|
*/
|
|
15
|
-
src?:
|
|
15
|
+
src?: AssetUrl;
|
|
16
16
|
/**
|
|
17
17
|
* Alt text for the image
|
|
18
18
|
*/
|
|
@@ -31,7 +31,7 @@ export interface AvatarProps {
|
|
|
31
31
|
* directly, or a canonical kebab-case icon name string (resolved via
|
|
32
32
|
* `resolveIcon`) so trait/factory authors can pass an icon by name.
|
|
33
33
|
*/
|
|
34
|
-
icon?:
|
|
34
|
+
icon?: IconInput;
|
|
35
35
|
/**
|
|
36
36
|
* Size of the avatar
|
|
37
37
|
* @default 'md'
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
+
import { type IconInput } from "./Icon";
|
|
2
3
|
export type BadgeVariant = "default" | "primary" | "secondary" | "success" | "warning" | "danger" | "error" | "info" | "neutral";
|
|
3
4
|
export type BadgeSize = "sm" | "md" | "lg";
|
|
4
5
|
export interface BadgeProps extends React.HTMLAttributes<HTMLSpanElement> {
|
|
@@ -12,8 +13,8 @@ export interface BadgeProps extends React.HTMLAttributes<HTMLSpanElement> {
|
|
|
12
13
|
* Numeric values are auto-coerced to string for rendering — common case
|
|
13
14
|
* is unread counts, error counts, status codes, etc. */
|
|
14
15
|
label?: string | number;
|
|
15
|
-
/**
|
|
16
|
-
icon?:
|
|
16
|
+
/** Lucide icon component or canonical kebab-case icon name string */
|
|
17
|
+
icon?: IconInput;
|
|
17
18
|
/** When set, renders a small X button on the right of the badge that
|
|
18
19
|
* invokes this handler — turns the badge into a removable chip.
|
|
19
20
|
* Used by the TagInput molecule and other "list of removable values"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import type { EventKey, EventPayload } from "@almadar/core";
|
|
3
|
-
import { type
|
|
3
|
+
import { type IconInput } from "./Icon";
|
|
4
4
|
export type ButtonVariant = "primary" | "secondary" | "ghost" | "danger" | "success" | "warning" | "default";
|
|
5
5
|
export type ButtonSize = "sm" | "md" | "lg";
|
|
6
6
|
export interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
|
|
@@ -9,14 +9,14 @@ export interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElemen
|
|
|
9
9
|
variant?: ButtonVariant;
|
|
10
10
|
size?: ButtonSize;
|
|
11
11
|
isLoading?: boolean;
|
|
12
|
-
/** Left icon
|
|
13
|
-
leftIcon?:
|
|
14
|
-
/** Right icon
|
|
15
|
-
rightIcon?:
|
|
12
|
+
/** Left icon: a Lucide component or a canonical icon name string (e.g. "plus", "trash"). */
|
|
13
|
+
leftIcon?: IconInput;
|
|
14
|
+
/** Right icon: a Lucide component or a canonical icon name string. */
|
|
15
|
+
rightIcon?: IconInput;
|
|
16
16
|
/** Alias for leftIcon */
|
|
17
|
-
icon?:
|
|
17
|
+
icon?: IconInput;
|
|
18
18
|
/** Alias for rightIcon */
|
|
19
|
-
iconRight?:
|
|
19
|
+
iconRight?: IconInput;
|
|
20
20
|
/** Declarative event name — emits UI:{action} via eventBus on click */
|
|
21
21
|
action?: EventKey;
|
|
22
22
|
/** Payload to include with the action event */
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
+
import type { EventKey } from "@almadar/core";
|
|
2
3
|
export type CardShadow = "none" | "sm" | "md" | "lg";
|
|
3
4
|
/**
|
|
4
5
|
* Layer 2 visual treatment for the card pattern — orthogonal to the semantic
|
|
@@ -20,6 +21,8 @@ export interface CardProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
|
20
21
|
look?: CardLook;
|
|
21
22
|
/** Card content */
|
|
22
23
|
children?: React.ReactNode;
|
|
24
|
+
/** Declarative event key emitted on click for trait dispatch */
|
|
25
|
+
action?: EventKey;
|
|
23
26
|
}
|
|
24
27
|
export declare const Card: React.ForwardRefExoticComponent<CardProps & React.RefAttributes<HTMLDivElement>>;
|
|
25
28
|
export declare const CardHeader: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
|
|
2
|
+
import type { EventKey } from "@almadar/core";
|
|
3
|
+
export interface CheckboxProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, "type" | "onChange"> {
|
|
3
4
|
/** Additional CSS classes applied to the root element. */
|
|
4
5
|
className?: string;
|
|
5
6
|
/** Whether the checkbox is checked */
|
|
@@ -7,5 +8,7 @@ export interface CheckboxProps extends Omit<React.InputHTMLAttributes<HTMLInputE
|
|
|
7
8
|
/** Default checked state (uncontrolled) */
|
|
8
9
|
defaultChecked?: boolean;
|
|
9
10
|
label?: string;
|
|
11
|
+
/** onChange handler or declarative event key for trait dispatch */
|
|
12
|
+
onChange?: React.ChangeEventHandler<HTMLInputElement> | EventKey;
|
|
10
13
|
}
|
|
11
14
|
export declare const Checkbox: React.ForwardRefExoticComponent<CheckboxProps & React.RefAttributes<HTMLInputElement>>;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import type { EventEmit } from "@almadar/core";
|
|
3
|
+
import { type IconInput } from "./Icon";
|
|
3
4
|
export type FilterPillVariant = "default" | "primary" | "secondary" | "success" | "warning" | "danger" | "info" | "neutral";
|
|
4
5
|
export type FilterPillSize = "sm" | "md" | "lg";
|
|
5
6
|
export interface FilterPillProps extends Omit<React.HTMLAttributes<HTMLSpanElement>, "onClick"> {
|
|
@@ -9,8 +10,8 @@ export interface FilterPillProps extends Omit<React.HTMLAttributes<HTMLSpanEleme
|
|
|
9
10
|
size?: FilterPillSize;
|
|
10
11
|
/** Pill label text (alternative to children for schema-driven rendering). */
|
|
11
12
|
label?: string | number;
|
|
12
|
-
/**
|
|
13
|
-
icon?:
|
|
13
|
+
/** Lucide icon component or canonical kebab-case icon name string */
|
|
14
|
+
icon?: IconInput;
|
|
14
15
|
/** Called when the user clicks the remove (×) button */
|
|
15
16
|
onRemove?: () => void;
|
|
16
17
|
/** Disable the remove button (renders without × control) */
|
|
@@ -17,6 +17,15 @@ import type { ColorToken } from './types';
|
|
|
17
17
|
export type IconSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
18
18
|
export type IconAnimation = 'spin' | 'pulse' | 'none';
|
|
19
19
|
export type { ColorToken };
|
|
20
|
+
/**
|
|
21
|
+
* Canonical icon-input type: a Lucide component reference OR a canonical
|
|
22
|
+
* kebab-case icon name string. The single source of truth for every
|
|
23
|
+
* icon-bearing prop across `@almadar/ui` — pattern-sync's parser maps this
|
|
24
|
+
* union to the `icon` config type, so the factory inspector renders an
|
|
25
|
+
* IconPicker and a string name resolves via `resolveIcon`. Never declare an
|
|
26
|
+
* icon prop as `React.ReactNode` (it collapses to a non-editable `node`).
|
|
27
|
+
*/
|
|
28
|
+
export type IconInput = LucideIcon | string;
|
|
20
29
|
/**
|
|
21
30
|
* Resolve an icon name to a Lucide icon component.
|
|
22
31
|
* Supports all 1500+ Lucide icons via dynamic PascalCase lookup.
|
|
@@ -29,7 +38,7 @@ export interface IconProps {
|
|
|
29
38
|
* kebab-case icon name string — a string is treated exactly like `name` so
|
|
30
39
|
* trait/factory authors can pass an icon by name through the `icon` prop.
|
|
31
40
|
*/
|
|
32
|
-
icon?:
|
|
41
|
+
icon?: IconInput;
|
|
33
42
|
/** Icon name as string (resolved from iconMap) */
|
|
34
43
|
name?: string;
|
|
35
44
|
/** Size of the icon */
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import type { EventKey } from "@almadar/core";
|
|
3
|
-
import { type
|
|
3
|
+
import { type IconInput } from "./Icon";
|
|
4
4
|
export interface SelectOption {
|
|
5
5
|
value: string;
|
|
6
6
|
label: string;
|
|
@@ -19,20 +19,19 @@ export interface InputProps extends Omit<React.InputHTMLAttributes<HTMLInputElem
|
|
|
19
19
|
/** Input type - supports 'select' and 'textarea' in addition to standard types */
|
|
20
20
|
inputType?: "text" | "email" | "password" | "number" | "tel" | "url" | "search" | "date" | "datetime-local" | "time" | "checkbox" | "select" | "textarea";
|
|
21
21
|
error?: string;
|
|
22
|
-
leftIcon?:
|
|
23
|
-
rightIcon?:
|
|
24
|
-
/** Lucide icon component
|
|
25
|
-
|
|
26
|
-
icon?: LucideIcon | string;
|
|
22
|
+
leftIcon?: IconInput;
|
|
23
|
+
rightIcon?: IconInput;
|
|
24
|
+
/** Lucide icon component or canonical kebab-case icon name string for left side */
|
|
25
|
+
icon?: IconInput;
|
|
27
26
|
/** Show clear button when input has value */
|
|
28
27
|
clearable?: boolean;
|
|
29
|
-
/** Callback when clear button is clicked */
|
|
30
|
-
onClear?: () => void;
|
|
28
|
+
/** Callback or declarative event key when clear button is clicked */
|
|
29
|
+
onClear?: (() => void) | EventKey;
|
|
31
30
|
/** Options for select type */
|
|
32
31
|
options?: SelectOption[];
|
|
33
32
|
/** Rows for textarea type */
|
|
34
33
|
rows?: number;
|
|
35
|
-
/** onChange handler
|
|
36
|
-
onChange?: React.ChangeEventHandler<HTMLInputElement | HTMLSelectElement | HTMLTextAreaElement
|
|
34
|
+
/** onChange handler or declarative event key for trait dispatch */
|
|
35
|
+
onChange?: React.ChangeEventHandler<HTMLInputElement | HTMLSelectElement | HTMLTextAreaElement> | EventKey;
|
|
37
36
|
}
|
|
38
37
|
export declare const Input: React.ForwardRefExoticComponent<InputProps & React.RefAttributes<HTMLSelectElement | HTMLInputElement | HTMLTextAreaElement>>;
|
|
@@ -5,7 +5,7 @@ export interface SelectOption {
|
|
|
5
5
|
label: string;
|
|
6
6
|
disabled?: boolean;
|
|
7
7
|
}
|
|
8
|
-
export interface SelectProps extends Omit<React.SelectHTMLAttributes<HTMLSelectElement>, "children"> {
|
|
8
|
+
export interface SelectProps extends Omit<React.SelectHTMLAttributes<HTMLSelectElement>, "children" | "onChange"> {
|
|
9
9
|
/** Additional CSS classes applied to the root element. */
|
|
10
10
|
className?: string;
|
|
11
11
|
/** Select options */
|
|
@@ -18,5 +18,7 @@ export interface SelectProps extends Omit<React.SelectHTMLAttributes<HTMLSelectE
|
|
|
18
18
|
action?: EventKey;
|
|
19
19
|
/** Error message */
|
|
20
20
|
error?: string;
|
|
21
|
+
/** onChange handler or declarative event key for trait dispatch */
|
|
22
|
+
onChange?: React.ChangeEventHandler<HTMLSelectElement> | EventKey;
|
|
21
23
|
}
|
|
22
24
|
export declare const Select: React.ForwardRefExoticComponent<SelectProps & React.RefAttributes<HTMLSelectElement>>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import type { EventKey } from "@almadar/core";
|
|
3
|
-
export interface TextareaProps extends React.TextareaHTMLAttributes<HTMLTextAreaElement> {
|
|
3
|
+
export interface TextareaProps extends Omit<React.TextareaHTMLAttributes<HTMLTextAreaElement>, 'onChange'> {
|
|
4
4
|
/** Additional CSS classes applied to the root element. */
|
|
5
5
|
className?: string;
|
|
6
6
|
/** Placeholder text */
|
|
@@ -11,5 +11,7 @@ export interface TextareaProps extends React.TextareaHTMLAttributes<HTMLTextArea
|
|
|
11
11
|
action?: EventKey;
|
|
12
12
|
/** Error message */
|
|
13
13
|
error?: string;
|
|
14
|
+
/** onChange handler or declarative event key for trait dispatch */
|
|
15
|
+
onChange?: React.ChangeEventHandler<HTMLTextAreaElement> | EventKey;
|
|
14
16
|
}
|
|
15
17
|
export declare const Textarea: React.ForwardRefExoticComponent<TextareaProps & React.RefAttributes<HTMLTextAreaElement>>;
|
|
@@ -13,7 +13,7 @@ export { Avatar, type AvatarProps, type AvatarSize, type AvatarStatus, } from ".
|
|
|
13
13
|
export { Box, type BoxProps, type BoxPadding, type BoxMargin, type BoxBg, type BoxRounded, type BoxShadow, } from "./Box";
|
|
14
14
|
export { Center, type CenterProps } from "./Center";
|
|
15
15
|
export { Divider, type DividerProps, type DividerOrientation } from "./Divider";
|
|
16
|
-
export { Icon, type IconProps, type IconSize, type IconAnimation, } from "./Icon";
|
|
16
|
+
export { Icon, type IconProps, type IconSize, type IconAnimation, type IconInput, } from "./Icon";
|
|
17
17
|
export { ProgressBar, type ProgressBarProps, type ProgressBarVariant, type ProgressBarColor, } from "./ProgressBar";
|
|
18
18
|
export { Radio, type RadioProps } from "./Radio";
|
|
19
19
|
export { Sparkline, type SparklineProps, type SparklineColor } from "./Sparkline";
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Cross-cutting atom-level prop shapes shared across the design system.
|
|
3
3
|
*/
|
|
4
|
+
import type { AssetUrl } from "@almadar/core";
|
|
4
5
|
/**
|
|
5
6
|
* Canonical semantic color palette. Values are the Tailwind / CSS-var token
|
|
6
7
|
* names that every component in the design system understands. Prefer this
|
|
@@ -29,7 +30,7 @@ export type LinkAction = {
|
|
|
29
30
|
};
|
|
30
31
|
/** An image with its required alt text. */
|
|
31
32
|
export type ImageSource = {
|
|
32
|
-
src:
|
|
33
|
+
src: AssetUrl;
|
|
33
34
|
alt: string;
|
|
34
35
|
};
|
|
35
36
|
/** A 2D point in canvas/layout coordinates. */
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* Uses Button, Icon, and Typography atoms.
|
|
6
6
|
*/
|
|
7
7
|
import React from "react";
|
|
8
|
-
import type {
|
|
8
|
+
import type { IconInput } from "../atoms";
|
|
9
9
|
export interface BreadcrumbItem {
|
|
10
10
|
/**
|
|
11
11
|
* Item label
|
|
@@ -22,7 +22,7 @@ export interface BreadcrumbItem {
|
|
|
22
22
|
/**
|
|
23
23
|
* Item icon (canonical kebab-case name or LucideIcon component)
|
|
24
24
|
*/
|
|
25
|
-
icon?:
|
|
25
|
+
icon?: IconInput;
|
|
26
26
|
/**
|
|
27
27
|
* Click handler (if href not provided)
|
|
28
28
|
*/
|
|
@@ -42,7 +42,7 @@ export interface BreadcrumbProps {
|
|
|
42
42
|
/**
|
|
43
43
|
* Separator icon (canonical kebab-case name or LucideIcon component)
|
|
44
44
|
*/
|
|
45
|
-
separator?:
|
|
45
|
+
separator?: IconInput;
|
|
46
46
|
/**
|
|
47
47
|
* Maximum items to show (truncates with ellipsis)
|
|
48
48
|
*/
|
|
@@ -7,14 +7,15 @@
|
|
|
7
7
|
* @generated by Orbital Compiler
|
|
8
8
|
*/
|
|
9
9
|
import React from "react";
|
|
10
|
-
import type { EventEmit, EventKey, EventPayload } from "@almadar/core";
|
|
10
|
+
import type { AssetUrl, EventEmit, EventKey, EventPayload } from "@almadar/core";
|
|
11
|
+
import type { IconInput } from "../atoms";
|
|
11
12
|
export interface CardAction {
|
|
12
13
|
label: string;
|
|
13
14
|
onClick?: () => void;
|
|
14
15
|
/** Event name to emit when clicked (for trait state machine integration) */
|
|
15
16
|
event?: string;
|
|
16
17
|
variant?: "default" | "primary" | "danger";
|
|
17
|
-
icon?:
|
|
18
|
+
icon?: IconInput;
|
|
18
19
|
disabled?: boolean;
|
|
19
20
|
}
|
|
20
21
|
export interface CardProps {
|
|
@@ -23,7 +24,7 @@ export interface CardProps {
|
|
|
23
24
|
/** Card subtitle or description */
|
|
24
25
|
subtitle?: string;
|
|
25
26
|
/** Image URL to display at top of card */
|
|
26
|
-
image?:
|
|
27
|
+
image?: AssetUrl;
|
|
27
28
|
/** Action buttons to display in card footer */
|
|
28
29
|
actions?: CardAction[];
|
|
29
30
|
/** Card content */
|
|
@@ -6,12 +6,12 @@
|
|
|
6
6
|
* Pure UI molecule with no entity binding.
|
|
7
7
|
*/
|
|
8
8
|
import React from 'react';
|
|
9
|
-
import type { EventEmit } from '@almadar/core';
|
|
9
|
+
import type { AssetUrl, EventEmit } from '@almadar/core';
|
|
10
10
|
/** Default shape for carousel slide items when no generic is provided. */
|
|
11
11
|
export interface CarouselItem {
|
|
12
12
|
id?: string;
|
|
13
13
|
title?: string;
|
|
14
|
-
image?:
|
|
14
|
+
image?: AssetUrl;
|
|
15
15
|
}
|
|
16
16
|
export interface CarouselProps<T = CarouselItem> {
|
|
17
17
|
/** Array of items to display as slides */
|
|
@@ -12,6 +12,7 @@
|
|
|
12
12
|
*/
|
|
13
13
|
import React from 'react';
|
|
14
14
|
import type { EntityRow, EventKey } from '@almadar/core';
|
|
15
|
+
import type { IconInput } from '../atoms';
|
|
15
16
|
import { type DataDndProps } from './useDataDnd';
|
|
16
17
|
import type { UiError } from '../atoms/types';
|
|
17
18
|
export interface DataGridField {
|
|
@@ -19,8 +20,8 @@ export interface DataGridField {
|
|
|
19
20
|
name: string;
|
|
20
21
|
/** Display label (auto-generated from name if omitted) */
|
|
21
22
|
label?: string;
|
|
22
|
-
/** Lucide icon name to show beside the field */
|
|
23
|
-
icon?:
|
|
23
|
+
/** Lucide icon name or component to show beside the field */
|
|
24
|
+
icon?: IconInput;
|
|
24
25
|
/** Rendering variant: 'h3' for title, 'body' for text, 'caption' for small,
|
|
25
26
|
* 'badge' for status badge, 'progress' for progress display */
|
|
26
27
|
variant?: 'h3' | 'h4' | 'body' | 'caption' | 'badge' | 'small' | 'progress';
|
|
@@ -42,8 +43,8 @@ export interface DataGridItemAction {
|
|
|
42
43
|
label: string;
|
|
43
44
|
/** Event name to emit (dispatched as UI:{event} with { row: itemData }) */
|
|
44
45
|
event: EventKey;
|
|
45
|
-
/** Lucide icon name */
|
|
46
|
-
icon?:
|
|
46
|
+
/** Lucide icon name or component */
|
|
47
|
+
icon?: IconInput;
|
|
47
48
|
/** Button variant */
|
|
48
49
|
variant?: 'primary' | 'secondary' | 'ghost' | 'danger';
|
|
49
50
|
}
|
|
@@ -12,6 +12,7 @@
|
|
|
12
12
|
*/
|
|
13
13
|
import React from 'react';
|
|
14
14
|
import type { EntityRow, EventKey } from "@almadar/core";
|
|
15
|
+
import type { IconInput } from '../atoms';
|
|
15
16
|
import { type DataDndProps } from './useDataDnd';
|
|
16
17
|
import type { UiError } from '../atoms/types';
|
|
17
18
|
export interface DataListField {
|
|
@@ -19,8 +20,8 @@ export interface DataListField {
|
|
|
19
20
|
name: string;
|
|
20
21
|
/** Display label (auto-generated from name if omitted) */
|
|
21
22
|
label?: string;
|
|
22
|
-
/** Lucide icon name to show beside the field */
|
|
23
|
-
icon?:
|
|
23
|
+
/** Lucide icon name or component to show beside the field */
|
|
24
|
+
icon?: IconInput;
|
|
24
25
|
/** Rendering variant: 'h3'/'h4' for title, 'body' for text, 'caption' for small,
|
|
25
26
|
* 'badge' for status badge, 'progress' for progress bar */
|
|
26
27
|
variant?: 'h3' | 'h4' | 'body' | 'caption' | 'badge' | 'small' | 'progress';
|
|
@@ -32,16 +33,16 @@ export interface DataListItemAction {
|
|
|
32
33
|
label: string;
|
|
33
34
|
/** Event name to emit (dispatched as UI:{event} with { id, row: itemData }) */
|
|
34
35
|
event: EventKey;
|
|
35
|
-
/** Lucide icon name */
|
|
36
|
-
icon?:
|
|
36
|
+
/** Lucide icon name or component */
|
|
37
|
+
icon?: IconInput;
|
|
37
38
|
/** Button variant */
|
|
38
39
|
variant?: 'primary' | 'secondary' | 'ghost' | 'danger';
|
|
39
40
|
}
|
|
40
41
|
export interface DataListSwipeAction {
|
|
41
42
|
/** Button label */
|
|
42
43
|
label: string;
|
|
43
|
-
/** Lucide icon name */
|
|
44
|
-
icon?:
|
|
44
|
+
/** Lucide icon name or component */
|
|
45
|
+
icon?: IconInput;
|
|
45
46
|
/** Button variant */
|
|
46
47
|
variant?: 'primary' | 'secondary' | 'danger' | 'ghost';
|
|
47
48
|
}
|
|
@@ -11,6 +11,7 @@
|
|
|
11
11
|
* - className for external styling
|
|
12
12
|
*/
|
|
13
13
|
import React from "react";
|
|
14
|
+
import type { AssetUrl } from "@almadar/core";
|
|
14
15
|
import type { UiError } from '../atoms/types';
|
|
15
16
|
export type DocumentType = "pdf" | "text" | "html" | "markdown";
|
|
16
17
|
export interface DocumentAction {
|
|
@@ -21,7 +22,7 @@ export interface DocumentAction {
|
|
|
21
22
|
}
|
|
22
23
|
export interface DocumentItem {
|
|
23
24
|
label: string;
|
|
24
|
-
src?:
|
|
25
|
+
src?: AssetUrl;
|
|
25
26
|
content?: string;
|
|
26
27
|
documentType?: DocumentType;
|
|
27
28
|
}
|
|
@@ -29,7 +30,7 @@ export interface DocumentViewerProps {
|
|
|
29
30
|
/** Document title */
|
|
30
31
|
title?: string;
|
|
31
32
|
/** Document URL (for PDF/external documents) */
|
|
32
|
-
src?:
|
|
33
|
+
src?: AssetUrl;
|
|
33
34
|
/** Document content (for text/html/markdown) */
|
|
34
35
|
content?: string;
|
|
35
36
|
/** Document type */
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import type { EventEmit } from "@almadar/core";
|
|
3
|
-
import type {
|
|
3
|
+
import type { IconInput } from "../atoms";
|
|
4
4
|
export type EmptyStateLook = "illustrated" | "icon-only" | "text-only" | "mascot";
|
|
5
5
|
export interface EmptyStateProps {
|
|
6
6
|
/**
|
|
@@ -8,7 +8,7 @@ export interface EmptyStateProps {
|
|
|
8
8
|
* - A Lucide icon component (LucideIcon)
|
|
9
9
|
* - A string icon name (e.g., "check-circle", "x-circle")
|
|
10
10
|
*/
|
|
11
|
-
icon?:
|
|
11
|
+
icon?: IconInput;
|
|
12
12
|
/** Primary text to display - use title or message (message is alias for backwards compat) */
|
|
13
13
|
title?: string;
|
|
14
14
|
/** Alias for title - used by schema patterns */
|
|
@@ -10,8 +10,8 @@
|
|
|
10
10
|
* any other clickable surface uses.
|
|
11
11
|
*/
|
|
12
12
|
import React from "react";
|
|
13
|
-
import type { LucideIcon } from "lucide-react";
|
|
14
13
|
import type { EventKey, EventPayload } from "@almadar/core";
|
|
14
|
+
import type { IconInput } from "../atoms";
|
|
15
15
|
export interface FloatingAction {
|
|
16
16
|
/**
|
|
17
17
|
* Action ID
|
|
@@ -22,9 +22,9 @@ export interface FloatingAction {
|
|
|
22
22
|
*/
|
|
23
23
|
label: string;
|
|
24
24
|
/**
|
|
25
|
-
* Action icon
|
|
25
|
+
* Action icon — Lucide icon name or component
|
|
26
26
|
*/
|
|
27
|
-
icon:
|
|
27
|
+
icon: IconInput;
|
|
28
28
|
/**
|
|
29
29
|
* Action click handler
|
|
30
30
|
*/
|
|
@@ -53,9 +53,9 @@ export interface FloatingActionButtonProps {
|
|
|
53
53
|
*/
|
|
54
54
|
actions?: FloatingAction[];
|
|
55
55
|
/**
|
|
56
|
-
* Icon
|
|
56
|
+
* Icon: a canonical icon name string (resolved by Button) or a Lucide component.
|
|
57
57
|
*/
|
|
58
|
-
icon?:
|
|
58
|
+
icon?: IconInput;
|
|
59
59
|
/**
|
|
60
60
|
* Optional direct click handler. Runs after the action emit when both are
|
|
61
61
|
* present.
|
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
* Provides consistent styling and interaction for section headers.
|
|
6
6
|
*/
|
|
7
7
|
import React from "react";
|
|
8
|
+
import type { IconInput } from "../atoms";
|
|
8
9
|
export interface FormSectionHeaderProps {
|
|
9
10
|
/** Section title */
|
|
10
11
|
title: string;
|
|
@@ -18,8 +19,8 @@ export interface FormSectionHeaderProps {
|
|
|
18
19
|
badge?: string;
|
|
19
20
|
/** Badge variant */
|
|
20
21
|
badgeVariant?: "default" | "primary" | "success" | "warning" | "danger";
|
|
21
|
-
/**
|
|
22
|
-
icon?:
|
|
22
|
+
/** Lucide icon name or component to show before title */
|
|
23
|
+
icon?: IconInput;
|
|
23
24
|
/** Whether section has validation errors */
|
|
24
25
|
hasErrors?: boolean;
|
|
25
26
|
/** Whether section is complete */
|
|
@@ -5,19 +5,20 @@
|
|
|
5
5
|
* Styled to match the main Layout component's mobile header.
|
|
6
6
|
*/
|
|
7
7
|
import React from "react";
|
|
8
|
-
import type {
|
|
8
|
+
import type { AssetUrl } from "@almadar/core";
|
|
9
|
+
import type { IconInput } from "../atoms";
|
|
9
10
|
import type { UiError } from '../atoms/types';
|
|
10
11
|
export type HeaderLook = "hero" | "compact-bar" | "breadcrumb" | "contextual" | "editorial-banner";
|
|
11
12
|
export interface HeaderNavigationItem {
|
|
12
13
|
label: string;
|
|
13
14
|
href?: string;
|
|
14
15
|
onClick?: () => void;
|
|
15
|
-
icon?:
|
|
16
|
+
icon?: IconInput;
|
|
16
17
|
badge?: string | number;
|
|
17
18
|
active?: boolean;
|
|
18
19
|
}
|
|
19
20
|
export interface HeaderUserAvatar {
|
|
20
|
-
src?:
|
|
21
|
+
src?: AssetUrl;
|
|
21
22
|
alt?: string;
|
|
22
23
|
initials?: string;
|
|
23
24
|
}
|
|
@@ -29,7 +30,7 @@ export interface HeaderProps {
|
|
|
29
30
|
/**
|
|
30
31
|
* Logo image source
|
|
31
32
|
*/
|
|
32
|
-
logoSrc?:
|
|
33
|
+
logoSrc?: AssetUrl;
|
|
33
34
|
/**
|
|
34
35
|
* Brand/App name
|
|
35
36
|
*/
|
|
@@ -5,14 +5,14 @@
|
|
|
5
5
|
* Uses theme-aware CSS variables for styling.
|
|
6
6
|
*/
|
|
7
7
|
import React from "react";
|
|
8
|
-
import type {
|
|
8
|
+
import type { IconInput } from "../atoms";
|
|
9
9
|
export interface MenuItem {
|
|
10
10
|
/** Item ID (auto-generated from label if not provided) */
|
|
11
11
|
id?: string;
|
|
12
12
|
/** Item label */
|
|
13
13
|
label: string;
|
|
14
|
-
/** Item icon (
|
|
15
|
-
icon?:
|
|
14
|
+
/** Item icon (Lucide icon name or component) */
|
|
15
|
+
icon?: IconInput;
|
|
16
16
|
/** Item badge */
|
|
17
17
|
badge?: string | number;
|
|
18
18
|
/** Disable item */
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* Uses Menu, ButtonGroup molecules and Button, Icon, Badge, Typography, Divider atoms.
|
|
6
6
|
*/
|
|
7
7
|
import React from 'react';
|
|
8
|
-
import type {
|
|
8
|
+
import type { IconInput } from '../atoms';
|
|
9
9
|
import type { UiError } from '../atoms/types';
|
|
10
10
|
export interface NavigationItem {
|
|
11
11
|
/**
|
|
@@ -19,7 +19,7 @@ export interface NavigationItem {
|
|
|
19
19
|
/**
|
|
20
20
|
* Item icon
|
|
21
21
|
*/
|
|
22
|
-
icon?:
|
|
22
|
+
icon?: IconInput;
|
|
23
23
|
/**
|
|
24
24
|
* Item badge
|
|
25
25
|
*/
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import type { EventEmit } from "@almadar/core";
|
|
3
|
-
import {
|
|
3
|
+
import type { IconInput } from "../atoms";
|
|
4
4
|
import type { UiError } from '../atoms/types';
|
|
5
5
|
export interface PageBreadcrumb {
|
|
6
6
|
label: string;
|
|
@@ -18,7 +18,7 @@ export interface SchemaAction {
|
|
|
18
18
|
/** Event to dispatch via event bus (for trait state machine integration) */
|
|
19
19
|
event?: string;
|
|
20
20
|
variant?: "primary" | "secondary" | "ghost" | "danger";
|
|
21
|
-
icon?:
|
|
21
|
+
icon?: IconInput;
|
|
22
22
|
loading?: boolean;
|
|
23
23
|
disabled?: boolean;
|
|
24
24
|
}
|
|
@@ -10,16 +10,16 @@
|
|
|
10
10
|
* - logoClickEvent — emitted when logo/brand area clicked
|
|
11
11
|
*/
|
|
12
12
|
import React from 'react';
|
|
13
|
-
import type { EventEmit } from '@almadar/core';
|
|
14
|
-
import type {
|
|
13
|
+
import type { AssetUrl, EventEmit } from '@almadar/core';
|
|
14
|
+
import type { IconInput } from '../atoms';
|
|
15
15
|
import type { UiError } from '../atoms/types';
|
|
16
16
|
export interface SidebarItem {
|
|
17
17
|
/** Item ID */
|
|
18
18
|
id: string;
|
|
19
19
|
/** Item label */
|
|
20
20
|
label: string;
|
|
21
|
-
/** Item icon */
|
|
22
|
-
icon?:
|
|
21
|
+
/** Item icon — Lucide icon name or component */
|
|
22
|
+
icon?: IconInput;
|
|
23
23
|
/** Item badge */
|
|
24
24
|
badge?: string | number;
|
|
25
25
|
/** Item href */
|
|
@@ -43,7 +43,7 @@ export interface SidebarProps {
|
|
|
43
43
|
/** Logo/Brand content - can be a ReactNode or logo config */
|
|
44
44
|
logo?: React.ReactNode;
|
|
45
45
|
/** Logo image source */
|
|
46
|
-
logoSrc?:
|
|
46
|
+
logoSrc?: AssetUrl;
|
|
47
47
|
/** Brand/App name */
|
|
48
48
|
brandName?: string;
|
|
49
49
|
/** Navigation items */
|
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
* No entity prop, no data fetching, no hooks beyond icon resolution.
|
|
7
7
|
*/
|
|
8
8
|
import React from 'react';
|
|
9
|
+
import type { IconInput } from '../atoms';
|
|
9
10
|
import type { UiError } from '../atoms/types';
|
|
10
11
|
export type StatDisplayLook = 'elevated' | 'flat' | 'progress-backed' | 'gauge' | 'sparkline';
|
|
11
12
|
export interface StatDisplayProps {
|
|
@@ -31,8 +32,8 @@ export interface StatDisplayProps {
|
|
|
31
32
|
prefix?: string;
|
|
32
33
|
/** Suffix appended to the formatted value (e.g. " /mo", " ms"). */
|
|
33
34
|
suffix?: string;
|
|
34
|
-
/** Lucide icon name or
|
|
35
|
-
icon?:
|
|
35
|
+
/** Lucide icon name or component */
|
|
36
|
+
icon?: IconInput;
|
|
36
37
|
/** Icon background color class */
|
|
37
38
|
iconBg?: string;
|
|
38
39
|
/** Icon color class */
|