@almadar/ui 2.0.0 → 2.0.1
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/components/atoms/Avatar.d.ts +58 -0
- package/dist/components/atoms/Badge.d.ts +8 -0
- package/dist/components/atoms/Box.d.ts +57 -0
- package/dist/components/atoms/Button.d.ts +24 -0
- package/dist/components/atoms/Card.d.ts +18 -0
- package/dist/components/atoms/Center.d.ts +33 -0
- package/dist/components/atoms/Checkbox.d.ts +5 -0
- package/dist/components/atoms/ConditionalWrapper.d.ts +68 -0
- package/dist/components/atoms/Divider.d.ts +29 -0
- package/dist/components/atoms/Icon.d.ts +38 -0
- package/dist/components/atoms/Input.d.ts +26 -0
- package/dist/components/atoms/Label.d.ts +5 -0
- package/dist/components/atoms/LawReferenceTooltip.d.ts +48 -0
- package/dist/components/atoms/Overlay.d.ts +16 -0
- package/dist/components/atoms/ProgressBar.d.ts +63 -0
- package/dist/components/atoms/Radio.d.ts +26 -0
- package/dist/components/atoms/Select.d.ts +12 -0
- package/dist/components/atoms/Spacer.d.ts +25 -0
- package/dist/components/atoms/Spinner.d.ts +6 -0
- package/dist/components/atoms/Stack.d.ts +64 -0
- package/dist/components/atoms/Switch.d.ts +12 -0
- package/dist/components/atoms/TextHighlight.d.ts +53 -0
- package/dist/components/atoms/Textarea.d.ts +5 -0
- package/dist/components/atoms/ThemeSelector.d.ts +21 -0
- package/dist/components/atoms/ThemeToggle.d.ts +33 -0
- package/dist/components/atoms/Typography.d.ts +57 -0
- package/dist/components/atoms/game/ControlButton.d.ts +31 -0
- package/dist/components/atoms/game/HealthBar.d.ts +18 -0
- package/dist/components/atoms/game/ScoreDisplay.d.ts +21 -0
- package/dist/components/atoms/game/Sprite.d.ts +63 -0
- package/dist/components/atoms/game/StateIndicator.d.ts +31 -0
- package/dist/components/atoms/game/index.d.ts +12 -0
- package/dist/components/atoms/index.d.ts +27 -0
- package/dist/components/index.d.ts +6 -0
- package/dist/components/index.js +5 -5
- package/dist/components/molecules/Accordion.d.ts +67 -0
- package/dist/components/molecules/Alert.d.ts +24 -0
- package/dist/components/molecules/Breadcrumb.d.ts +55 -0
- package/dist/components/molecules/ButtonGroup.d.ts +67 -0
- package/dist/components/molecules/Card.d.ts +44 -0
- package/dist/components/molecules/Container.d.ts +30 -0
- package/dist/components/molecules/Drawer.d.ts +46 -0
- package/dist/components/molecules/EmptyState.d.ts +25 -0
- package/dist/components/molecules/ErrorBoundary.d.ts +55 -0
- package/dist/components/molecules/ErrorState.d.ts +13 -0
- package/dist/components/molecules/FilterGroup.d.ts +54 -0
- package/dist/components/molecules/Flex.d.ts +43 -0
- package/dist/components/molecules/FloatingActionButton.d.ts +69 -0
- package/dist/components/molecules/FormField.d.ts +16 -0
- package/dist/components/molecules/FormSectionHeader.d.ts +30 -0
- package/dist/components/molecules/Grid.d.ts +54 -0
- package/dist/components/molecules/InputGroup.d.ts +24 -0
- package/dist/components/molecules/LoadingState.d.ts +7 -0
- package/dist/components/molecules/Menu.d.ts +40 -0
- package/dist/components/molecules/Modal.d.ts +26 -0
- package/dist/components/molecules/Pagination.d.ts +66 -0
- package/dist/components/molecules/Popover.d.ts +39 -0
- package/dist/components/molecules/QuizBlock.d.ts +20 -0
- package/dist/components/molecules/RelationSelect.d.ts +48 -0
- package/dist/components/molecules/RepeatableFormSection.d.ts +58 -0
- package/dist/components/molecules/ScaledDiagram.d.ts +20 -0
- package/dist/components/molecules/SearchInput.d.ts +60 -0
- package/dist/components/molecules/SidePanel.d.ts +47 -0
- package/dist/components/molecules/SimpleGrid.d.ts +27 -0
- package/dist/components/molecules/Skeleton.d.ts +35 -0
- package/dist/components/molecules/Tabs.d.ts +45 -0
- package/dist/components/molecules/Toast.d.ts +35 -0
- package/dist/components/molecules/Tooltip.d.ts +25 -0
- package/dist/components/molecules/ViolationAlert.d.ts +49 -0
- package/dist/components/molecules/WizardNavigation.d.ts +51 -0
- package/dist/components/molecules/WizardProgress.d.ts +42 -0
- package/dist/components/molecules/game/StatBadge.d.ts +27 -0
- package/dist/components/molecules/index.d.ts +38 -0
- package/dist/components/molecules/markdown/CodeBlock.d.ts +25 -0
- package/dist/components/molecules/markdown/MarkdownContent.d.ts +26 -0
- package/dist/components/organisms/CardGrid.d.ts +72 -0
- package/dist/components/organisms/Chart.d.ts +59 -0
- package/dist/components/organisms/CodeViewer.d.ts +67 -0
- package/dist/components/organisms/ComponentPatterns.d.ts +441 -0
- package/dist/components/organisms/ConfirmDialog.d.ts +50 -0
- package/dist/components/organisms/ContentRenderer.d.ts +23 -0
- package/dist/components/organisms/CustomPattern.d.ts +104 -0
- package/dist/components/organisms/DataTable.d.ts +63 -0
- package/dist/components/organisms/DetailPanel.d.ts +71 -0
- package/dist/components/organisms/DocumentViewer.d.ts +60 -0
- package/dist/components/organisms/DrawerSlot.d.ts +39 -0
- package/dist/components/organisms/Form.d.ts +203 -0
- package/dist/components/organisms/FormSection.d.ts +59 -0
- package/dist/components/organisms/GraphCanvas.d.ts +69 -0
- package/dist/components/organisms/Header.d.ts +110 -0
- package/dist/components/organisms/JazariStateMachine.d.ts +60 -0
- package/dist/components/organisms/LayoutPatterns.d.ts +181 -0
- package/dist/components/organisms/List.d.ts +76 -0
- package/dist/components/organisms/MasterDetail.d.ts +43 -0
- package/dist/components/organisms/MediaGallery.d.ts +66 -0
- package/dist/components/organisms/Meter.d.ts +58 -0
- package/dist/components/organisms/ModalSlot.d.ts +35 -0
- package/dist/components/organisms/Navigation.d.ts +68 -0
- package/dist/components/organisms/OrbitalVisualization.d.ts +48 -0
- package/dist/components/organisms/PageHeader.d.ts +59 -0
- package/dist/components/organisms/Section.d.ts +44 -0
- package/dist/components/organisms/Sidebar.d.ts +65 -0
- package/dist/components/organisms/SignaturePad.d.ts +44 -0
- package/dist/components/organisms/Split.d.ts +42 -0
- package/dist/components/organisms/StatCard.d.ts +66 -0
- package/dist/components/organisms/StateMachineView.d.ts +36 -0
- package/dist/components/organisms/Table.d.ts +99 -0
- package/dist/components/organisms/Timeline.d.ts +58 -0
- package/dist/components/organisms/ToastSlot.d.ts +38 -0
- package/dist/components/organisms/UISlotRenderer.d.ts +112 -0
- package/dist/components/organisms/WizardContainer.d.ts +160 -0
- package/dist/components/organisms/book/BookChapterView.d.ts +17 -0
- package/dist/components/organisms/book/BookCoverPage.d.ts +19 -0
- package/dist/components/organisms/book/BookNavBar.d.ts +18 -0
- package/dist/components/organisms/book/BookTableOfContents.d.ts +18 -0
- package/dist/components/organisms/book/BookViewer.d.ts +28 -0
- package/dist/components/organisms/book/index.d.ts +7 -0
- package/dist/components/organisms/book/types.d.ts +77 -0
- package/dist/components/organisms/game/BattleBoard.d.ts +167 -0
- package/dist/components/organisms/game/CanvasEffect.d.ts +68 -0
- package/dist/components/organisms/game/CastleBoard.d.ts +85 -0
- package/dist/components/organisms/game/DialogueBox.d.ts +73 -0
- package/dist/components/organisms/game/GameAudioProvider.d.ts +47 -0
- package/dist/components/organisms/game/GameAudioToggle.d.ts +28 -0
- package/dist/components/organisms/game/GameHud.d.ts +40 -0
- package/dist/components/organisms/game/GameMenu.d.ts +43 -0
- package/dist/components/organisms/game/GameOverScreen.d.ts +56 -0
- package/dist/components/organisms/game/InventoryPanel.d.ts +67 -0
- package/dist/components/organisms/game/IsometricCanvas.d.ts +123 -0
- package/dist/components/organisms/game/TraitSlot.d.ts +86 -0
- package/dist/components/organisms/game/TraitStateViewer.d.ts +53 -0
- package/dist/components/organisms/game/UncontrolledBattleBoard.d.ts +26 -0
- package/dist/components/organisms/game/WorldMapBoard.d.ts +147 -0
- package/dist/components/organisms/game/editor/editorUtils.d.ts +109 -0
- package/dist/components/organisms/game/editor/index.d.ts +9 -0
- package/dist/components/organisms/game/hooks/useBattleState.d.ts +35 -0
- package/dist/components/organisms/game/hooks/useCamera.d.ts +41 -0
- package/dist/components/organisms/game/hooks/useGameAudio.d.ts +47 -0
- package/dist/components/organisms/game/hooks/useImageCache.d.ts +16 -0
- package/dist/components/organisms/game/hooks/usePhysics2D.d.ts +45 -0
- package/dist/components/organisms/game/hooks/useSpriteAnimations.d.ts +43 -0
- package/dist/components/organisms/game/index.d.ts +36 -0
- package/dist/components/organisms/game/managers/PhysicsManager.d.ts +103 -0
- package/dist/components/organisms/game/types/effects.d.ts +253 -0
- package/dist/components/organisms/game/types/isometric.d.ts +109 -0
- package/dist/components/organisms/game/types/spriteAnimation.d.ts +73 -0
- package/dist/components/organisms/game/utils/canvasEffects.d.ts +50 -0
- package/dist/components/organisms/game/utils/combatPresets.d.ts +15 -0
- package/dist/components/organisms/game/utils/isometric.d.ts +61 -0
- package/dist/components/organisms/game/utils/spriteAnimation.d.ts +57 -0
- package/dist/components/organisms/game/utils/spriteSheetConstants.d.ts +16 -0
- package/dist/components/organisms/index.d.ts +37 -0
- package/dist/components/organisms/layout/DashboardGrid.d.ts +34 -0
- package/dist/components/organisms/layout/MasterDetail.d.ts +32 -0
- package/dist/components/organisms/layout/SplitPane.d.ts +34 -0
- package/dist/components/organisms/layout/TabbedContainer.d.ts +42 -0
- package/dist/components/organisms/layout/index.d.ts +9 -0
- package/dist/components/organisms/types.d.ts +65 -0
- package/dist/components/templates/AuthLayout.d.ts +14 -0
- package/dist/components/templates/BattleTemplate.d.ts +25 -0
- package/dist/components/templates/CastleTemplate.d.ts +23 -0
- package/dist/components/templates/CounterTemplate.d.ts +44 -0
- package/dist/components/templates/DashboardLayout.d.ts +32 -0
- package/dist/components/templates/GameShell.d.ts +33 -0
- package/dist/components/templates/GameTemplate.d.ts +36 -0
- package/dist/components/templates/GenericAppTemplate.d.ts +30 -0
- package/dist/components/templates/WorldMapTemplate.d.ts +29 -0
- package/dist/components/templates/index.d.ts +10 -0
- package/dist/components/templates/types.d.ts +17 -0
- package/dist/context/DesignThemeContext.d.ts +21 -0
- package/dist/context/ThemeContext.d.ts +104 -0
- package/dist/context/UISlotContext.d.ts +75 -0
- package/dist/context/UserContext.d.ts +111 -0
- package/dist/context/index.d.ts +8 -0
- package/dist/hooks/event-bus-types.d.ts +71 -0
- package/dist/hooks/index.d.ts +25 -0
- package/dist/hooks/useAgentChat.d.ts +104 -0
- package/dist/hooks/useAuthContext.d.ts +25 -0
- package/dist/hooks/useCompile.d.ts +22 -0
- package/dist/hooks/useDeepAgentGeneration.d.ts +46 -0
- package/dist/hooks/useEntities.d.ts +52 -0
- package/dist/hooks/useEntityData.d.ts +155 -0
- package/dist/hooks/useEntityMutations.d.ts +80 -0
- package/dist/hooks/useEventBus.d.ts +96 -0
- package/dist/hooks/useExtensions.d.ts +32 -0
- package/dist/hooks/useFileEditor.d.ts +32 -0
- package/dist/hooks/useFileSystem.d.ts +40 -0
- package/dist/hooks/useGitHub.d.ts +58 -0
- package/dist/hooks/useOrbitalHistory.d.ts +39 -0
- package/dist/hooks/useOrbitalMutations.d.ts +95 -0
- package/dist/hooks/usePreview.d.ts +57 -0
- package/dist/hooks/useQuerySingleton.d.ts +78 -0
- package/dist/hooks/useResolvedEntity.d.ts +32 -0
- package/dist/hooks/useTranslate.d.ts +35 -0
- package/dist/hooks/useUIEvents.d.ts +35 -0
- package/dist/hooks/useUISlots.d.ts +84 -0
- package/dist/hooks/useValidation.d.ts +46 -0
- package/dist/lib/api-client.d.ts +42 -0
- package/dist/lib/cn.d.ts +6 -0
- package/dist/lib/debug.d.ts +43 -0
- package/dist/lib/debugRegistry.d.ts +29 -0
- package/dist/lib/debugUtils.d.ts +27 -0
- package/dist/lib/entityDebug.d.ts +38 -0
- package/dist/lib/getNestedValue.d.ts +33 -0
- package/dist/lib/guardRegistry.d.ts +32 -0
- package/dist/lib/index.d.ts +18 -0
- package/dist/lib/jazari/svg-paths.d.ts +61 -0
- package/dist/lib/parseContentSegments.d.ts +41 -0
- package/dist/lib/tickRegistry.d.ts +40 -0
- package/dist/lib/traitRegistry.d.ts +34 -0
- package/dist/lib/verificationRegistry.d.ts +107 -0
- package/dist/lib/visualizer/index.d.ts +143 -0
- package/dist/locales/index.d.ts +20 -0
- package/dist/providers/EventBusProvider.d.ts +60 -0
- package/dist/providers/FetchedDataProvider.d.ts +105 -0
- package/dist/providers/OfflineModeProvider.d.ts +79 -0
- package/dist/providers/OrbitalProvider.d.ts +101 -0
- package/dist/providers/SelectionProvider.d.ts +81 -0
- package/dist/providers/VerificationProvider.d.ts +63 -0
- package/dist/providers/index.d.ts +17 -0
- package/dist/providers/index.js +3 -3
- package/dist/renderer/client-effect-executor.d.ts +68 -0
- package/dist/renderer/data-resolver.d.ts +68 -0
- package/dist/renderer/index.d.ts +28 -0
- package/dist/renderer/index.js +1 -1
- package/dist/renderer/init.d.ts +14 -0
- package/dist/renderer/navigation.d.ts +142 -0
- package/dist/renderer/offline-executor.d.ts +238 -0
- package/dist/renderer/pattern-resolver.d.ts +91 -0
- package/dist/renderer/slot-definitions.d.ts +45 -0
- package/dist/renderer/types.d.ts +160 -0
- package/dist/renderer/useClientEffects.d.ts +88 -0
- package/dist/stores/entityStore.d.ts +99 -0
- package/dist/stores/filtering.d.ts +51 -0
- package/dist/stores/index.d.ts +7 -0
- package/package.json +4 -3
- package/dist/{chunk-YNP2OBK4.js → chunk-RIZ76XRF.js} +1 -1
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Avatar Atom Component
|
|
3
|
+
*
|
|
4
|
+
* A versatile avatar component supporting images, initials, icons, and status indicators.
|
|
5
|
+
*/
|
|
6
|
+
import React from "react";
|
|
7
|
+
import type { LucideIcon } from "lucide-react";
|
|
8
|
+
export type AvatarSize = "xs" | "sm" | "md" | "lg" | "xl";
|
|
9
|
+
export type AvatarStatus = "online" | "offline" | "away" | "busy";
|
|
10
|
+
export interface AvatarProps {
|
|
11
|
+
/**
|
|
12
|
+
* Image source URL
|
|
13
|
+
*/
|
|
14
|
+
src?: string;
|
|
15
|
+
/**
|
|
16
|
+
* Alt text for the image
|
|
17
|
+
*/
|
|
18
|
+
alt?: string;
|
|
19
|
+
/**
|
|
20
|
+
* Full name - initials will be generated automatically
|
|
21
|
+
*/
|
|
22
|
+
name?: string;
|
|
23
|
+
/**
|
|
24
|
+
* Initials to display (e.g., "JD" for John Doe)
|
|
25
|
+
* If not provided but name is, initials will be auto-generated
|
|
26
|
+
*/
|
|
27
|
+
initials?: string;
|
|
28
|
+
/**
|
|
29
|
+
* Icon to display when no image or initials
|
|
30
|
+
*/
|
|
31
|
+
icon?: LucideIcon;
|
|
32
|
+
/**
|
|
33
|
+
* Size of the avatar
|
|
34
|
+
* @default 'md'
|
|
35
|
+
*/
|
|
36
|
+
size?: AvatarSize;
|
|
37
|
+
/**
|
|
38
|
+
* Status indicator
|
|
39
|
+
*/
|
|
40
|
+
status?: AvatarStatus;
|
|
41
|
+
/**
|
|
42
|
+
* Badge content (e.g., notification count)
|
|
43
|
+
*/
|
|
44
|
+
badge?: string | number;
|
|
45
|
+
/**
|
|
46
|
+
* Additional CSS classes
|
|
47
|
+
*/
|
|
48
|
+
className?: string;
|
|
49
|
+
/**
|
|
50
|
+
* Click handler
|
|
51
|
+
*/
|
|
52
|
+
onClick?: () => void;
|
|
53
|
+
/** Declarative event name — emits UI:{action} via eventBus on click */
|
|
54
|
+
action?: string;
|
|
55
|
+
/** Payload to include with the action event */
|
|
56
|
+
actionPayload?: Record<string, unknown>;
|
|
57
|
+
}
|
|
58
|
+
export declare const Avatar: React.FC<AvatarProps>;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
export type BadgeVariant = "default" | "primary" | "secondary" | "success" | "warning" | "danger" | "error" | "info" | "neutral";
|
|
3
|
+
export type BadgeSize = "sm" | "md" | "lg";
|
|
4
|
+
export interface BadgeProps extends React.HTMLAttributes<HTMLSpanElement> {
|
|
5
|
+
variant?: BadgeVariant;
|
|
6
|
+
size?: BadgeSize;
|
|
7
|
+
}
|
|
8
|
+
export declare const Badge: React.ForwardRefExoticComponent<BadgeProps & React.RefAttributes<HTMLSpanElement>>;
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Box Component
|
|
3
|
+
*
|
|
4
|
+
* A versatile layout primitive that provides spacing, background, border, and shadow controls.
|
|
5
|
+
* Think of it as a styled div with consistent design tokens.
|
|
6
|
+
*/
|
|
7
|
+
import React from "react";
|
|
8
|
+
export type BoxPadding = "none" | "xs" | "sm" | "md" | "lg" | "xl" | "2xl";
|
|
9
|
+
export type BoxMargin = "none" | "xs" | "sm" | "md" | "lg" | "xl" | "2xl" | "auto";
|
|
10
|
+
export type BoxBg = "transparent" | "primary" | "secondary" | "muted" | "accent" | "surface" | "overlay";
|
|
11
|
+
export type BoxRounded = "none" | "sm" | "md" | "lg" | "xl" | "2xl" | "full";
|
|
12
|
+
export type BoxShadow = "none" | "sm" | "md" | "lg" | "xl";
|
|
13
|
+
export interface BoxProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
14
|
+
/** Padding on all sides */
|
|
15
|
+
padding?: BoxPadding;
|
|
16
|
+
/** Horizontal padding (overrides padding for x-axis) */
|
|
17
|
+
paddingX?: BoxPadding;
|
|
18
|
+
/** Vertical padding (overrides padding for y-axis) */
|
|
19
|
+
paddingY?: BoxPadding;
|
|
20
|
+
/** Margin on all sides */
|
|
21
|
+
margin?: BoxMargin;
|
|
22
|
+
/** Horizontal margin */
|
|
23
|
+
marginX?: BoxMargin;
|
|
24
|
+
/** Vertical margin */
|
|
25
|
+
marginY?: BoxMargin;
|
|
26
|
+
/** Background color */
|
|
27
|
+
bg?: BoxBg;
|
|
28
|
+
/** Show border */
|
|
29
|
+
border?: boolean;
|
|
30
|
+
/** Border radius */
|
|
31
|
+
rounded?: BoxRounded;
|
|
32
|
+
/** Box shadow */
|
|
33
|
+
shadow?: BoxShadow;
|
|
34
|
+
/** Display type */
|
|
35
|
+
display?: "block" | "inline" | "inline-block" | "flex" | "inline-flex" | "grid";
|
|
36
|
+
/** Fill available width */
|
|
37
|
+
fullWidth?: boolean;
|
|
38
|
+
/** Fill available height */
|
|
39
|
+
fullHeight?: boolean;
|
|
40
|
+
/** Overflow behavior */
|
|
41
|
+
overflow?: "auto" | "hidden" | "visible" | "scroll";
|
|
42
|
+
/** Position */
|
|
43
|
+
position?: "relative" | "absolute" | "fixed" | "sticky";
|
|
44
|
+
/** HTML element to render as */
|
|
45
|
+
as?: React.ElementType;
|
|
46
|
+
/** Declarative event name — emits UI:{action} via eventBus on click */
|
|
47
|
+
action?: string;
|
|
48
|
+
/** Payload to include with the action event */
|
|
49
|
+
actionPayload?: Record<string, unknown>;
|
|
50
|
+
/** Declarative hover event — emits UI:{hoverEvent} with { hovered: true/false } on mouseEnter/mouseLeave */
|
|
51
|
+
hoverEvent?: string;
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* Box - Versatile container component with design tokens
|
|
55
|
+
*/
|
|
56
|
+
export declare const Box: React.ForwardRefExoticComponent<BoxProps & React.RefAttributes<HTMLDivElement>>;
|
|
57
|
+
export default Box;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { type LucideIcon } from "lucide-react";
|
|
3
|
+
export type ButtonVariant = "primary" | "secondary" | "ghost" | "danger" | "success" | "warning" | "default";
|
|
4
|
+
export type ButtonSize = "sm" | "md" | "lg";
|
|
5
|
+
export interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
|
|
6
|
+
variant?: ButtonVariant;
|
|
7
|
+
size?: ButtonSize;
|
|
8
|
+
isLoading?: boolean;
|
|
9
|
+
/** Left icon as ReactNode (preferred) */
|
|
10
|
+
leftIcon?: React.ReactNode;
|
|
11
|
+
/** Right icon as ReactNode (preferred) */
|
|
12
|
+
rightIcon?: React.ReactNode;
|
|
13
|
+
/** Left icon as Lucide icon component (convenience prop, renders with default size) */
|
|
14
|
+
icon?: LucideIcon;
|
|
15
|
+
/** Right icon as Lucide icon component (convenience prop) */
|
|
16
|
+
iconRight?: LucideIcon;
|
|
17
|
+
/** Declarative event name — emits UI:{action} via eventBus on click */
|
|
18
|
+
action?: string;
|
|
19
|
+
/** Payload to include with the action event */
|
|
20
|
+
actionPayload?: Record<string, unknown>;
|
|
21
|
+
/** Button label text (alternative to children for schema-driven rendering) */
|
|
22
|
+
label?: string;
|
|
23
|
+
}
|
|
24
|
+
export declare const Button: React.ForwardRefExoticComponent<ButtonProps & React.RefAttributes<HTMLButtonElement>>;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
export type CardShadow = "none" | "sm" | "md" | "lg";
|
|
3
|
+
export interface CardProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
4
|
+
variant?: "default" | "bordered" | "elevated" | "interactive";
|
|
5
|
+
padding?: "none" | "sm" | "md" | "lg";
|
|
6
|
+
/** Card title - renders in header if provided */
|
|
7
|
+
title?: string;
|
|
8
|
+
/** Card subtitle - renders below title */
|
|
9
|
+
subtitle?: string;
|
|
10
|
+
/** Shadow size override */
|
|
11
|
+
shadow?: CardShadow;
|
|
12
|
+
}
|
|
13
|
+
export declare const Card: React.ForwardRefExoticComponent<CardProps & React.RefAttributes<HTMLDivElement>>;
|
|
14
|
+
export declare const CardHeader: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
|
|
15
|
+
export declare const CardTitle: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLHeadingElement> & React.RefAttributes<HTMLHeadingElement>>;
|
|
16
|
+
export declare const CardContent: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
|
|
17
|
+
export declare const CardBody: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
|
|
18
|
+
export declare const CardFooter: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Center Component
|
|
3
|
+
*
|
|
4
|
+
* A layout utility that centers its children horizontally and/or vertically.
|
|
5
|
+
*/
|
|
6
|
+
import React from 'react';
|
|
7
|
+
export interface CenterProps {
|
|
8
|
+
/** Center inline (width fits content) vs block (full width) */
|
|
9
|
+
inline?: boolean;
|
|
10
|
+
/** Center only horizontally */
|
|
11
|
+
horizontal?: boolean;
|
|
12
|
+
/** Center only vertically */
|
|
13
|
+
vertical?: boolean;
|
|
14
|
+
/** Minimum height (useful for vertical centering) */
|
|
15
|
+
minHeight?: string | number;
|
|
16
|
+
/** Fill available height */
|
|
17
|
+
fullHeight?: boolean;
|
|
18
|
+
/** Fill available width */
|
|
19
|
+
fullWidth?: boolean;
|
|
20
|
+
/** Custom class name */
|
|
21
|
+
className?: string;
|
|
22
|
+
/** Inline styles */
|
|
23
|
+
style?: React.CSSProperties;
|
|
24
|
+
/** Children elements */
|
|
25
|
+
children: React.ReactNode;
|
|
26
|
+
/** HTML element to render as */
|
|
27
|
+
as?: React.ElementType;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Center - Centers content horizontally and/or vertically
|
|
31
|
+
*/
|
|
32
|
+
export declare const Center: React.FC<CenterProps>;
|
|
33
|
+
export default Center;
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ConditionalWrapper Atom Component
|
|
3
|
+
*
|
|
4
|
+
* A wrapper component that conditionally renders its children based on
|
|
5
|
+
* S-expression evaluation. Used for dynamic field visibility in inspection forms.
|
|
6
|
+
*/
|
|
7
|
+
import React from 'react';
|
|
8
|
+
import { type SExpr } from '@almadar/evaluator';
|
|
9
|
+
/**
|
|
10
|
+
* Context for conditional evaluation
|
|
11
|
+
*/
|
|
12
|
+
export interface ConditionalContext {
|
|
13
|
+
formValues: Record<string, unknown>;
|
|
14
|
+
globalVariables: Record<string, unknown>;
|
|
15
|
+
localVariables?: Record<string, unknown>;
|
|
16
|
+
entity?: Record<string, unknown>;
|
|
17
|
+
}
|
|
18
|
+
export interface ConditionalWrapperProps {
|
|
19
|
+
/** The S-expression condition to evaluate */
|
|
20
|
+
condition?: SExpr;
|
|
21
|
+
/** Context for evaluating the condition */
|
|
22
|
+
context: ConditionalContext;
|
|
23
|
+
/** Children to render when condition is true (or when no condition is provided) */
|
|
24
|
+
children: React.ReactNode;
|
|
25
|
+
/** Optional fallback to render when condition is false */
|
|
26
|
+
fallback?: React.ReactNode;
|
|
27
|
+
/** Whether to animate the transition (uses CSS transitions) */
|
|
28
|
+
animate?: boolean;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* ConditionalWrapper conditionally renders children based on S-expression evaluation.
|
|
32
|
+
*
|
|
33
|
+
* Supported bindings:
|
|
34
|
+
* - @entity.formValues.fieldId - Access form field values
|
|
35
|
+
* - @entity.globalVariables.HG_VAR - Access global inspection variables
|
|
36
|
+
* - @entity.localVariables.H_VAR - Access document-local variables
|
|
37
|
+
* - @state - Current state machine state
|
|
38
|
+
* - @now - Current timestamp
|
|
39
|
+
*
|
|
40
|
+
* @example
|
|
41
|
+
* // Simple condition - show field when another field equals a value
|
|
42
|
+
* <ConditionalWrapper
|
|
43
|
+
* condition={["=", "@entity.formValues.vehicleType", "commercial"]}
|
|
44
|
+
* context={{ formValues: { vehicleType: "commercial" }, globalVariables: {} }}
|
|
45
|
+
* >
|
|
46
|
+
* <Input name="commercialLicenseNumber" />
|
|
47
|
+
* </ConditionalWrapper>
|
|
48
|
+
*
|
|
49
|
+
* @example
|
|
50
|
+
* // With fallback - show message when condition not met
|
|
51
|
+
* <ConditionalWrapper
|
|
52
|
+
* condition={[">=", "@entity.formValues.loadWeight", 3500]}
|
|
53
|
+
* context={formContext}
|
|
54
|
+
* fallback={<Typography variant="small">Load weight must be at least 3500kg</Typography>}
|
|
55
|
+
* >
|
|
56
|
+
* <HeavyVehicleFields />
|
|
57
|
+
* </ConditionalWrapper>
|
|
58
|
+
*
|
|
59
|
+
* @example
|
|
60
|
+
* // Using global variables for cross-form conditions
|
|
61
|
+
* <ConditionalWrapper
|
|
62
|
+
* condition={["=", "@entity.globalVariables.HG_POTROSNIKI", "DA"]}
|
|
63
|
+
* context={{ formValues: {}, globalVariables: { HG_POTROSNIKI: "DA" } }}
|
|
64
|
+
* >
|
|
65
|
+
* <PriceMarkingSection />
|
|
66
|
+
* </ConditionalWrapper>
|
|
67
|
+
*/
|
|
68
|
+
export declare const ConditionalWrapper: React.FC<ConditionalWrapperProps>;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Divider Atom Component
|
|
3
|
+
*
|
|
4
|
+
* A divider component for separating content sections.
|
|
5
|
+
*/
|
|
6
|
+
import React from "react";
|
|
7
|
+
export type DividerOrientation = "horizontal" | "vertical";
|
|
8
|
+
export type DividerVariant = "solid" | "dashed" | "dotted";
|
|
9
|
+
export interface DividerProps {
|
|
10
|
+
/**
|
|
11
|
+
* Orientation of the divider
|
|
12
|
+
* @default 'horizontal'
|
|
13
|
+
*/
|
|
14
|
+
orientation?: DividerOrientation;
|
|
15
|
+
/**
|
|
16
|
+
* Text label to display in the divider
|
|
17
|
+
*/
|
|
18
|
+
label?: string;
|
|
19
|
+
/**
|
|
20
|
+
* Line style variant
|
|
21
|
+
* @default 'solid'
|
|
22
|
+
*/
|
|
23
|
+
variant?: DividerVariant;
|
|
24
|
+
/**
|
|
25
|
+
* Additional CSS classes
|
|
26
|
+
*/
|
|
27
|
+
className?: string;
|
|
28
|
+
}
|
|
29
|
+
export declare const Divider: React.FC<DividerProps>;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Icon Atom Component
|
|
3
|
+
*
|
|
4
|
+
* A wrapper component for Lucide icons with consistent sizing and styling.
|
|
5
|
+
* Uses theme-aware CSS variables for stroke width and color.
|
|
6
|
+
*
|
|
7
|
+
* Supports two APIs:
|
|
8
|
+
* - `icon` prop: Pass a LucideIcon component directly
|
|
9
|
+
* - `name` prop: Pass a string icon name (resolved from iconMap)
|
|
10
|
+
*/
|
|
11
|
+
import React from 'react';
|
|
12
|
+
import type { LucideIcon } from 'lucide-react';
|
|
13
|
+
export type IconSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
14
|
+
export type IconAnimation = 'spin' | 'pulse' | 'none';
|
|
15
|
+
/**
|
|
16
|
+
* Resolve an icon name to a Lucide icon component.
|
|
17
|
+
* Falls back to HelpCircle if not found.
|
|
18
|
+
*/
|
|
19
|
+
export declare function resolveIcon(name: string): LucideIcon;
|
|
20
|
+
export interface IconProps {
|
|
21
|
+
/** Lucide icon component (preferred for type-safe usage) */
|
|
22
|
+
icon?: LucideIcon;
|
|
23
|
+
/** Icon name as string (resolved from iconMap) */
|
|
24
|
+
name?: string;
|
|
25
|
+
/** Size of the icon */
|
|
26
|
+
size?: IconSize;
|
|
27
|
+
/** Color class (Tailwind color class) or 'inherit' for theme default */
|
|
28
|
+
color?: string;
|
|
29
|
+
/** Animation type */
|
|
30
|
+
animation?: IconAnimation;
|
|
31
|
+
/** Additional CSS classes */
|
|
32
|
+
className?: string;
|
|
33
|
+
/** Icon stroke width - uses theme default if not specified */
|
|
34
|
+
strokeWidth?: number;
|
|
35
|
+
/** Inline style */
|
|
36
|
+
style?: React.CSSProperties;
|
|
37
|
+
}
|
|
38
|
+
export declare const Icon: React.FC<IconProps>;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { type LucideIcon } from "lucide-react";
|
|
3
|
+
export interface SelectOption {
|
|
4
|
+
value: string;
|
|
5
|
+
label: string;
|
|
6
|
+
}
|
|
7
|
+
export interface InputProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, "onChange"> {
|
|
8
|
+
/** Input type - supports 'select' and 'textarea' in addition to standard types */
|
|
9
|
+
inputType?: "text" | "email" | "password" | "number" | "tel" | "url" | "search" | "date" | "datetime-local" | "time" | "checkbox" | "select" | "textarea";
|
|
10
|
+
error?: string;
|
|
11
|
+
leftIcon?: React.ReactNode;
|
|
12
|
+
rightIcon?: React.ReactNode;
|
|
13
|
+
/** Lucide icon component for left side (convenience prop) */
|
|
14
|
+
icon?: LucideIcon;
|
|
15
|
+
/** Show clear button when input has value */
|
|
16
|
+
clearable?: boolean;
|
|
17
|
+
/** Callback when clear button is clicked */
|
|
18
|
+
onClear?: () => void;
|
|
19
|
+
/** Options for select type */
|
|
20
|
+
options?: SelectOption[];
|
|
21
|
+
/** Rows for textarea type */
|
|
22
|
+
rows?: number;
|
|
23
|
+
/** onChange handler - accepts events from input, select, or textarea */
|
|
24
|
+
onChange?: React.ChangeEventHandler<HTMLInputElement | HTMLSelectElement | HTMLTextAreaElement>;
|
|
25
|
+
}
|
|
26
|
+
export declare const Input: React.ForwardRefExoticComponent<InputProps & React.RefAttributes<HTMLInputElement | HTMLSelectElement | HTMLTextAreaElement>>;
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* LawReferenceTooltip Atom Component
|
|
3
|
+
*
|
|
4
|
+
* A specialized tooltip for displaying law references in inspection forms.
|
|
5
|
+
* Shows law name, article number, and relevant clause text.
|
|
6
|
+
*/
|
|
7
|
+
import React from "react";
|
|
8
|
+
/**
|
|
9
|
+
* Law reference definition
|
|
10
|
+
*/
|
|
11
|
+
export interface LawReference {
|
|
12
|
+
/** Law identifier (e.g., "VVO", "TPED") */
|
|
13
|
+
law: string;
|
|
14
|
+
/** Full name of the law */
|
|
15
|
+
lawName?: string;
|
|
16
|
+
/** Article number (e.g., "§8", "Artikel 5") */
|
|
17
|
+
article: string;
|
|
18
|
+
/** Clause or paragraph text */
|
|
19
|
+
clause?: string;
|
|
20
|
+
/** Optional link to full law text */
|
|
21
|
+
link?: string;
|
|
22
|
+
}
|
|
23
|
+
export interface LawReferenceTooltipProps {
|
|
24
|
+
/** The law reference to display */
|
|
25
|
+
reference: LawReference;
|
|
26
|
+
/** Children element that triggers the tooltip */
|
|
27
|
+
children: React.ReactNode;
|
|
28
|
+
/** Tooltip position */
|
|
29
|
+
position?: "top" | "bottom" | "left" | "right";
|
|
30
|
+
/** Additional CSS classes */
|
|
31
|
+
className?: string;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* LawReferenceTooltip displays legal references with structured formatting.
|
|
35
|
+
*
|
|
36
|
+
* @example
|
|
37
|
+
* <LawReferenceTooltip
|
|
38
|
+
* reference={{
|
|
39
|
+
* law: "VVO",
|
|
40
|
+
* lawName: "Verkehrsverordnung",
|
|
41
|
+
* article: "§8 Abs. 3",
|
|
42
|
+
* clause: "Die zulässige Gesamtmasse darf 3500 kg nicht überschreiten."
|
|
43
|
+
* }}
|
|
44
|
+
* >
|
|
45
|
+
* <Typography variant="small" className="text-blue-600 underline cursor-help">VVO §8</Typography>
|
|
46
|
+
* </LawReferenceTooltip>
|
|
47
|
+
*/
|
|
48
|
+
export declare const LawReferenceTooltip: React.FC<LawReferenceTooltipProps>;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Overlay Atom Component
|
|
3
|
+
*
|
|
4
|
+
* A fixed backdrop for modals and drawers.
|
|
5
|
+
*/
|
|
6
|
+
import React from "react";
|
|
7
|
+
export interface OverlayProps {
|
|
8
|
+
isVisible?: boolean;
|
|
9
|
+
onClick?: (e: React.MouseEvent) => void;
|
|
10
|
+
className?: string;
|
|
11
|
+
blur?: boolean;
|
|
12
|
+
/** Declarative event name — emits UI:{action} via eventBus on click */
|
|
13
|
+
action?: string;
|
|
14
|
+
}
|
|
15
|
+
export declare const Overlay: React.FC<OverlayProps>;
|
|
16
|
+
export default Overlay;
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ProgressBar Atom Component
|
|
3
|
+
*
|
|
4
|
+
* A progress bar component with linear, circular, and stepped variants.
|
|
5
|
+
*/
|
|
6
|
+
import React from "react";
|
|
7
|
+
export type ProgressBarType = "linear" | "circular" | "stepped";
|
|
8
|
+
export type ProgressBarVariant = "default" | "primary" | "success" | "warning" | "danger";
|
|
9
|
+
export type ProgressBarColor = ProgressBarVariant;
|
|
10
|
+
export interface ProgressBarProps {
|
|
11
|
+
/**
|
|
12
|
+
* Progress value (0-100)
|
|
13
|
+
*/
|
|
14
|
+
value: number;
|
|
15
|
+
/**
|
|
16
|
+
* Maximum value (for calculating percentage)
|
|
17
|
+
* @default 100
|
|
18
|
+
*/
|
|
19
|
+
max?: number;
|
|
20
|
+
/**
|
|
21
|
+
* Type of the progress bar (linear, circular, stepped)
|
|
22
|
+
* @default 'linear'
|
|
23
|
+
*/
|
|
24
|
+
progressType?: ProgressBarType;
|
|
25
|
+
/**
|
|
26
|
+
* Variant/color of the progress bar
|
|
27
|
+
* @default 'primary'
|
|
28
|
+
*/
|
|
29
|
+
variant?: ProgressBarVariant;
|
|
30
|
+
/**
|
|
31
|
+
* Color variant (alias for variant)
|
|
32
|
+
* @default 'primary'
|
|
33
|
+
*/
|
|
34
|
+
color?: ProgressBarColor;
|
|
35
|
+
/**
|
|
36
|
+
* Show percentage text
|
|
37
|
+
* @default false
|
|
38
|
+
*/
|
|
39
|
+
showPercentage?: boolean;
|
|
40
|
+
/**
|
|
41
|
+
* Alias for showPercentage (pattern compatibility)
|
|
42
|
+
*/
|
|
43
|
+
showLabel?: boolean;
|
|
44
|
+
/**
|
|
45
|
+
* Label text
|
|
46
|
+
*/
|
|
47
|
+
label?: string;
|
|
48
|
+
/**
|
|
49
|
+
* Size (for circular variant)
|
|
50
|
+
* @default 'md'
|
|
51
|
+
*/
|
|
52
|
+
size?: "sm" | "md" | "lg";
|
|
53
|
+
/**
|
|
54
|
+
* Number of steps (for stepped variant)
|
|
55
|
+
* @default 5
|
|
56
|
+
*/
|
|
57
|
+
steps?: number;
|
|
58
|
+
/**
|
|
59
|
+
* Additional CSS classes
|
|
60
|
+
*/
|
|
61
|
+
className?: string;
|
|
62
|
+
}
|
|
63
|
+
export declare const ProgressBar: React.FC<ProgressBarProps>;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Radio Atom Component
|
|
3
|
+
*
|
|
4
|
+
* A radio button component with label support and accessibility.
|
|
5
|
+
*/
|
|
6
|
+
import React from "react";
|
|
7
|
+
export interface RadioProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, "type" | "size"> {
|
|
8
|
+
/**
|
|
9
|
+
* Label text displayed next to the radio button
|
|
10
|
+
*/
|
|
11
|
+
label?: string;
|
|
12
|
+
/**
|
|
13
|
+
* Helper text displayed below the radio button
|
|
14
|
+
*/
|
|
15
|
+
helperText?: string;
|
|
16
|
+
/**
|
|
17
|
+
* Error message displayed below the radio button
|
|
18
|
+
*/
|
|
19
|
+
error?: string;
|
|
20
|
+
/**
|
|
21
|
+
* Size of the radio button
|
|
22
|
+
* @default 'md'
|
|
23
|
+
*/
|
|
24
|
+
size?: "sm" | "md" | "lg";
|
|
25
|
+
}
|
|
26
|
+
export declare const Radio: React.ForwardRefExoticComponent<RadioProps & React.RefAttributes<HTMLInputElement>>;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
export interface SelectOption {
|
|
3
|
+
value: string;
|
|
4
|
+
label: string;
|
|
5
|
+
disabled?: boolean;
|
|
6
|
+
}
|
|
7
|
+
export interface SelectProps extends Omit<React.SelectHTMLAttributes<HTMLSelectElement>, "children"> {
|
|
8
|
+
options: SelectOption[];
|
|
9
|
+
placeholder?: string;
|
|
10
|
+
error?: string;
|
|
11
|
+
}
|
|
12
|
+
export declare const Select: React.ForwardRefExoticComponent<SelectProps & React.RefAttributes<HTMLSelectElement>>;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Spacer Component
|
|
3
|
+
*
|
|
4
|
+
* A flexible spacer that expands to fill available space in a flex container.
|
|
5
|
+
* Useful for pushing elements apart or creating consistent spacing.
|
|
6
|
+
*/
|
|
7
|
+
import React from 'react';
|
|
8
|
+
export type SpacerSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl' | '2xl' | 'auto';
|
|
9
|
+
export interface SpacerProps {
|
|
10
|
+
/** Fixed size (auto = flex grow) */
|
|
11
|
+
size?: SpacerSize;
|
|
12
|
+
/** Orientation (for fixed sizes) */
|
|
13
|
+
axis?: 'horizontal' | 'vertical';
|
|
14
|
+
/** Custom class name */
|
|
15
|
+
className?: string;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Spacer - Flexible spacing element for flex layouts
|
|
19
|
+
*
|
|
20
|
+
* Usage:
|
|
21
|
+
* - size="auto" (default): Expands to fill available space (flex: 1)
|
|
22
|
+
* - size="md": Fixed size spacing
|
|
23
|
+
*/
|
|
24
|
+
export declare const Spacer: React.FC<SpacerProps>;
|
|
25
|
+
export default Spacer;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
export type SpinnerSize = "xs" | "sm" | "md" | "lg";
|
|
3
|
+
export interface SpinnerProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
4
|
+
size?: SpinnerSize;
|
|
5
|
+
}
|
|
6
|
+
export declare const Spinner: React.ForwardRefExoticComponent<SpinnerProps & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Stack Component
|
|
3
|
+
*
|
|
4
|
+
* A layout primitive for arranging children in a vertical or horizontal stack with consistent spacing.
|
|
5
|
+
* Includes convenience exports VStack and HStack for common use cases.
|
|
6
|
+
*/
|
|
7
|
+
import React from "react";
|
|
8
|
+
export type StackDirection = "horizontal" | "vertical";
|
|
9
|
+
export type StackGap = "none" | "xs" | "sm" | "md" | "lg" | "xl" | "2xl";
|
|
10
|
+
export type StackAlign = "start" | "center" | "end" | "stretch" | "baseline";
|
|
11
|
+
export type StackJustify = "start" | "center" | "end" | "between" | "around" | "evenly";
|
|
12
|
+
export interface StackProps {
|
|
13
|
+
/** Stack direction */
|
|
14
|
+
direction?: StackDirection;
|
|
15
|
+
/** Gap between children */
|
|
16
|
+
gap?: StackGap;
|
|
17
|
+
/** Align items on the cross axis */
|
|
18
|
+
align?: StackAlign;
|
|
19
|
+
/** Justify items on the main axis */
|
|
20
|
+
justify?: StackJustify;
|
|
21
|
+
/** Allow items to wrap */
|
|
22
|
+
wrap?: boolean;
|
|
23
|
+
/** Reverse the order of children */
|
|
24
|
+
reverse?: boolean;
|
|
25
|
+
/** Fill available space (flex: 1) */
|
|
26
|
+
flex?: boolean;
|
|
27
|
+
/** Custom class name */
|
|
28
|
+
className?: string;
|
|
29
|
+
/** Inline styles */
|
|
30
|
+
style?: React.CSSProperties;
|
|
31
|
+
/** Children elements */
|
|
32
|
+
children?: React.ReactNode;
|
|
33
|
+
/** HTML element to render as */
|
|
34
|
+
as?: React.ElementType;
|
|
35
|
+
/** Click handler */
|
|
36
|
+
onClick?: (e: React.MouseEvent) => void;
|
|
37
|
+
/** Keyboard handler */
|
|
38
|
+
onKeyDown?: (e: React.KeyboardEvent) => void;
|
|
39
|
+
/** Role for accessibility */
|
|
40
|
+
role?: string;
|
|
41
|
+
/** Tab index for focus management */
|
|
42
|
+
tabIndex?: number;
|
|
43
|
+
/** Declarative event name — emits UI:{action} via eventBus on click */
|
|
44
|
+
action?: string;
|
|
45
|
+
/** Payload to include with the action event */
|
|
46
|
+
actionPayload?: Record<string, unknown>;
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* Stack - Flexible layout component for arranging children
|
|
50
|
+
*/
|
|
51
|
+
export declare const Stack: React.FC<StackProps>;
|
|
52
|
+
/**
|
|
53
|
+
* VStack - Vertical stack shorthand
|
|
54
|
+
*/
|
|
55
|
+
export interface VStackProps extends Omit<StackProps, "direction"> {
|
|
56
|
+
}
|
|
57
|
+
export declare const VStack: React.FC<VStackProps>;
|
|
58
|
+
/**
|
|
59
|
+
* HStack - Horizontal stack shorthand
|
|
60
|
+
*/
|
|
61
|
+
export interface HStackProps extends Omit<StackProps, "direction"> {
|
|
62
|
+
}
|
|
63
|
+
export declare const HStack: React.FC<HStackProps>;
|
|
64
|
+
export default Stack;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
export interface SwitchProps {
|
|
3
|
+
checked?: boolean;
|
|
4
|
+
defaultChecked?: boolean;
|
|
5
|
+
onChange?: (checked: boolean) => void;
|
|
6
|
+
disabled?: boolean;
|
|
7
|
+
label?: string;
|
|
8
|
+
id?: string;
|
|
9
|
+
name?: string;
|
|
10
|
+
className?: string;
|
|
11
|
+
}
|
|
12
|
+
export declare const Switch: React.ForwardRefExoticComponent<SwitchProps & React.RefAttributes<HTMLButtonElement>>;
|