@almadar/ui 1.0.34 → 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.
Files changed (241) hide show
  1. package/LICENSE +21 -72
  2. package/dist/components/atoms/Avatar.d.ts +58 -0
  3. package/dist/components/atoms/Badge.d.ts +8 -0
  4. package/dist/components/atoms/Box.d.ts +57 -0
  5. package/dist/components/atoms/Button.d.ts +24 -0
  6. package/dist/components/atoms/Card.d.ts +18 -0
  7. package/dist/components/atoms/Center.d.ts +33 -0
  8. package/dist/components/atoms/Checkbox.d.ts +5 -0
  9. package/dist/components/atoms/ConditionalWrapper.d.ts +68 -0
  10. package/dist/components/atoms/Divider.d.ts +29 -0
  11. package/dist/components/atoms/Icon.d.ts +38 -0
  12. package/dist/components/atoms/Input.d.ts +26 -0
  13. package/dist/components/atoms/Label.d.ts +5 -0
  14. package/dist/components/atoms/LawReferenceTooltip.d.ts +48 -0
  15. package/dist/components/atoms/Overlay.d.ts +16 -0
  16. package/dist/components/atoms/ProgressBar.d.ts +63 -0
  17. package/dist/components/atoms/Radio.d.ts +26 -0
  18. package/dist/components/atoms/Select.d.ts +12 -0
  19. package/dist/components/atoms/Spacer.d.ts +25 -0
  20. package/dist/components/atoms/Spinner.d.ts +6 -0
  21. package/dist/components/atoms/Stack.d.ts +64 -0
  22. package/dist/components/atoms/Switch.d.ts +12 -0
  23. package/dist/components/atoms/TextHighlight.d.ts +53 -0
  24. package/dist/components/atoms/Textarea.d.ts +5 -0
  25. package/dist/components/atoms/ThemeSelector.d.ts +21 -0
  26. package/dist/components/atoms/ThemeToggle.d.ts +33 -0
  27. package/dist/components/atoms/Typography.d.ts +57 -0
  28. package/dist/components/atoms/game/ControlButton.d.ts +31 -0
  29. package/dist/components/atoms/game/HealthBar.d.ts +18 -0
  30. package/dist/components/atoms/game/ScoreDisplay.d.ts +21 -0
  31. package/dist/components/atoms/game/Sprite.d.ts +63 -0
  32. package/dist/components/atoms/game/StateIndicator.d.ts +31 -0
  33. package/dist/components/atoms/game/index.d.ts +12 -0
  34. package/dist/components/atoms/index.d.ts +27 -0
  35. package/dist/components/index.css +11 -9
  36. package/dist/components/index.d.ts +6 -6951
  37. package/dist/components/index.js +5 -5
  38. package/dist/components/molecules/Accordion.d.ts +67 -0
  39. package/dist/components/molecules/Alert.d.ts +24 -0
  40. package/dist/components/molecules/Breadcrumb.d.ts +55 -0
  41. package/dist/components/molecules/ButtonGroup.d.ts +67 -0
  42. package/dist/components/molecules/Card.d.ts +44 -0
  43. package/dist/components/molecules/Container.d.ts +30 -0
  44. package/dist/components/molecules/Drawer.d.ts +46 -0
  45. package/dist/components/molecules/EmptyState.d.ts +25 -0
  46. package/dist/components/molecules/ErrorBoundary.d.ts +55 -0
  47. package/dist/components/molecules/ErrorState.d.ts +13 -0
  48. package/dist/components/molecules/FilterGroup.d.ts +54 -0
  49. package/dist/components/molecules/Flex.d.ts +43 -0
  50. package/dist/components/molecules/FloatingActionButton.d.ts +69 -0
  51. package/dist/components/molecules/FormField.d.ts +16 -0
  52. package/dist/components/molecules/FormSectionHeader.d.ts +30 -0
  53. package/dist/components/molecules/Grid.d.ts +54 -0
  54. package/dist/components/molecules/InputGroup.d.ts +24 -0
  55. package/dist/components/molecules/LoadingState.d.ts +7 -0
  56. package/dist/components/molecules/Menu.d.ts +40 -0
  57. package/dist/components/molecules/Modal.d.ts +26 -0
  58. package/dist/components/molecules/Pagination.d.ts +66 -0
  59. package/dist/components/molecules/Popover.d.ts +39 -0
  60. package/dist/components/molecules/QuizBlock.d.ts +20 -0
  61. package/dist/components/molecules/RelationSelect.d.ts +48 -0
  62. package/dist/components/molecules/RepeatableFormSection.d.ts +58 -0
  63. package/dist/components/molecules/ScaledDiagram.d.ts +20 -0
  64. package/dist/components/molecules/SearchInput.d.ts +60 -0
  65. package/dist/components/molecules/SidePanel.d.ts +47 -0
  66. package/dist/components/molecules/SimpleGrid.d.ts +27 -0
  67. package/dist/components/molecules/Skeleton.d.ts +35 -0
  68. package/dist/components/molecules/Tabs.d.ts +45 -0
  69. package/dist/components/molecules/Toast.d.ts +35 -0
  70. package/dist/components/molecules/Tooltip.d.ts +25 -0
  71. package/dist/components/molecules/ViolationAlert.d.ts +49 -0
  72. package/dist/components/molecules/WizardNavigation.d.ts +51 -0
  73. package/dist/components/molecules/WizardProgress.d.ts +42 -0
  74. package/dist/components/molecules/game/StatBadge.d.ts +27 -0
  75. package/dist/components/molecules/index.d.ts +38 -0
  76. package/dist/components/molecules/markdown/CodeBlock.d.ts +25 -0
  77. package/dist/components/molecules/markdown/MarkdownContent.d.ts +26 -0
  78. package/dist/components/organisms/CardGrid.d.ts +72 -0
  79. package/dist/components/organisms/Chart.d.ts +59 -0
  80. package/dist/components/organisms/CodeViewer.d.ts +67 -0
  81. package/dist/components/organisms/ComponentPatterns.d.ts +441 -0
  82. package/dist/components/organisms/ConfirmDialog.d.ts +50 -0
  83. package/dist/components/organisms/ContentRenderer.d.ts +23 -0
  84. package/dist/components/organisms/CustomPattern.d.ts +104 -0
  85. package/dist/components/organisms/DataTable.d.ts +63 -0
  86. package/dist/components/organisms/DetailPanel.d.ts +71 -0
  87. package/dist/components/organisms/DocumentViewer.d.ts +60 -0
  88. package/dist/components/organisms/DrawerSlot.d.ts +39 -0
  89. package/dist/components/organisms/Form.d.ts +203 -0
  90. package/dist/components/organisms/FormSection.d.ts +59 -0
  91. package/dist/components/organisms/GraphCanvas.d.ts +69 -0
  92. package/dist/components/organisms/Header.d.ts +110 -0
  93. package/dist/components/organisms/JazariStateMachine.d.ts +60 -0
  94. package/dist/components/organisms/LayoutPatterns.d.ts +181 -0
  95. package/dist/components/organisms/List.d.ts +76 -0
  96. package/dist/components/organisms/MasterDetail.d.ts +43 -0
  97. package/dist/components/organisms/MediaGallery.d.ts +66 -0
  98. package/dist/components/organisms/Meter.d.ts +58 -0
  99. package/dist/components/organisms/ModalSlot.d.ts +35 -0
  100. package/dist/components/organisms/Navigation.d.ts +68 -0
  101. package/dist/components/organisms/OrbitalVisualization.d.ts +48 -0
  102. package/dist/components/organisms/PageHeader.d.ts +59 -0
  103. package/dist/components/organisms/Section.d.ts +44 -0
  104. package/dist/components/organisms/Sidebar.d.ts +65 -0
  105. package/dist/components/organisms/SignaturePad.d.ts +44 -0
  106. package/dist/components/organisms/Split.d.ts +42 -0
  107. package/dist/components/organisms/StatCard.d.ts +66 -0
  108. package/dist/components/organisms/StateMachineView.d.ts +36 -0
  109. package/dist/components/organisms/Table.d.ts +99 -0
  110. package/dist/components/organisms/Timeline.d.ts +58 -0
  111. package/dist/components/organisms/ToastSlot.d.ts +38 -0
  112. package/dist/components/organisms/UISlotRenderer.d.ts +112 -0
  113. package/dist/components/organisms/WizardContainer.d.ts +160 -0
  114. package/dist/components/organisms/book/BookChapterView.d.ts +17 -0
  115. package/dist/components/organisms/book/BookCoverPage.d.ts +19 -0
  116. package/dist/components/organisms/book/BookNavBar.d.ts +18 -0
  117. package/dist/components/organisms/book/BookTableOfContents.d.ts +18 -0
  118. package/dist/components/organisms/book/BookViewer.d.ts +28 -0
  119. package/dist/components/organisms/book/index.d.ts +7 -0
  120. package/dist/components/organisms/book/types.d.ts +77 -0
  121. package/dist/components/organisms/game/BattleBoard.d.ts +167 -0
  122. package/dist/components/organisms/game/CanvasEffect.d.ts +68 -0
  123. package/dist/components/organisms/game/CastleBoard.d.ts +85 -0
  124. package/dist/components/organisms/game/DialogueBox.d.ts +73 -0
  125. package/dist/components/organisms/game/GameAudioProvider.d.ts +47 -0
  126. package/dist/components/organisms/game/GameAudioToggle.d.ts +28 -0
  127. package/dist/components/organisms/game/GameHud.d.ts +40 -0
  128. package/dist/components/organisms/game/GameMenu.d.ts +43 -0
  129. package/dist/components/organisms/game/GameOverScreen.d.ts +56 -0
  130. package/dist/components/organisms/game/InventoryPanel.d.ts +67 -0
  131. package/dist/components/organisms/game/IsometricCanvas.d.ts +123 -0
  132. package/dist/components/organisms/game/TraitSlot.d.ts +86 -0
  133. package/dist/components/organisms/game/TraitStateViewer.d.ts +53 -0
  134. package/dist/components/organisms/game/UncontrolledBattleBoard.d.ts +26 -0
  135. package/dist/components/organisms/game/WorldMapBoard.d.ts +147 -0
  136. package/dist/components/organisms/game/editor/editorUtils.d.ts +109 -0
  137. package/dist/components/organisms/game/editor/index.d.ts +9 -0
  138. package/dist/components/organisms/game/hooks/useBattleState.d.ts +35 -0
  139. package/dist/components/organisms/game/hooks/useCamera.d.ts +41 -0
  140. package/dist/components/organisms/game/hooks/useGameAudio.d.ts +47 -0
  141. package/dist/components/organisms/game/hooks/useImageCache.d.ts +16 -0
  142. package/dist/components/organisms/game/hooks/usePhysics2D.d.ts +45 -0
  143. package/dist/components/organisms/game/hooks/useSpriteAnimations.d.ts +43 -0
  144. package/dist/components/organisms/game/index.d.ts +36 -0
  145. package/dist/components/organisms/game/managers/PhysicsManager.d.ts +103 -0
  146. package/dist/components/organisms/game/types/effects.d.ts +253 -0
  147. package/dist/{isometric-ynNHVPZx.d.ts → components/organisms/game/types/isometric.d.ts} +4 -6
  148. package/dist/components/organisms/game/types/spriteAnimation.d.ts +73 -0
  149. package/dist/components/organisms/game/utils/canvasEffects.d.ts +50 -0
  150. package/dist/components/organisms/game/utils/combatPresets.d.ts +15 -0
  151. package/dist/components/organisms/game/utils/isometric.d.ts +61 -0
  152. package/dist/components/organisms/game/utils/spriteAnimation.d.ts +57 -0
  153. package/dist/components/organisms/game/utils/spriteSheetConstants.d.ts +16 -0
  154. package/dist/components/organisms/index.d.ts +37 -0
  155. package/dist/components/organisms/layout/DashboardGrid.d.ts +34 -0
  156. package/dist/components/organisms/layout/MasterDetail.d.ts +32 -0
  157. package/dist/components/organisms/layout/SplitPane.d.ts +34 -0
  158. package/dist/components/organisms/layout/TabbedContainer.d.ts +42 -0
  159. package/dist/components/organisms/layout/index.d.ts +9 -0
  160. package/dist/components/organisms/types.d.ts +65 -0
  161. package/dist/components/templates/AuthLayout.d.ts +14 -0
  162. package/dist/components/templates/BattleTemplate.d.ts +25 -0
  163. package/dist/components/templates/CastleTemplate.d.ts +23 -0
  164. package/dist/components/templates/CounterTemplate.d.ts +44 -0
  165. package/dist/components/templates/DashboardLayout.d.ts +32 -0
  166. package/dist/components/templates/GameShell.d.ts +33 -0
  167. package/dist/components/templates/GameTemplate.d.ts +36 -0
  168. package/dist/components/templates/GenericAppTemplate.d.ts +30 -0
  169. package/dist/components/templates/WorldMapTemplate.d.ts +29 -0
  170. package/dist/components/templates/index.d.ts +10 -0
  171. package/dist/components/templates/types.d.ts +17 -0
  172. package/dist/context/DesignThemeContext.d.ts +21 -0
  173. package/dist/{ThemeContext-D9xUORq5.d.ts → context/ThemeContext.d.ts} +15 -16
  174. package/dist/context/UISlotContext.d.ts +75 -0
  175. package/dist/context/UserContext.d.ts +111 -0
  176. package/dist/context/index.d.ts +6 -206
  177. package/dist/{event-bus-types-CjJduURa.d.ts → hooks/event-bus-types.d.ts} +4 -6
  178. package/dist/hooks/index.d.ts +24 -1090
  179. package/dist/hooks/useAgentChat.d.ts +104 -0
  180. package/dist/hooks/useAuthContext.d.ts +25 -0
  181. package/dist/hooks/useCompile.d.ts +22 -0
  182. package/dist/hooks/useDeepAgentGeneration.d.ts +46 -0
  183. package/dist/hooks/useEntities.d.ts +52 -0
  184. package/dist/hooks/useEntityData.d.ts +155 -0
  185. package/dist/hooks/useEntityMutations.d.ts +80 -0
  186. package/dist/hooks/useEventBus.d.ts +96 -0
  187. package/dist/hooks/useExtensions.d.ts +32 -0
  188. package/dist/hooks/useFileEditor.d.ts +32 -0
  189. package/dist/hooks/useFileSystem.d.ts +40 -0
  190. package/dist/hooks/useGitHub.d.ts +58 -0
  191. package/dist/hooks/useOrbitalHistory.d.ts +39 -0
  192. package/dist/hooks/useOrbitalMutations.d.ts +95 -0
  193. package/dist/hooks/usePreview.d.ts +57 -0
  194. package/dist/hooks/useQuerySingleton.d.ts +78 -0
  195. package/dist/hooks/useResolvedEntity.d.ts +32 -0
  196. package/dist/hooks/useTranslate.d.ts +35 -0
  197. package/dist/hooks/useUIEvents.d.ts +35 -0
  198. package/dist/{useUISlots-D0mttBSP.d.ts → hooks/useUISlots.d.ts} +8 -9
  199. package/dist/hooks/useValidation.d.ts +46 -0
  200. package/dist/lib/api-client.d.ts +42 -0
  201. package/dist/lib/cn.d.ts +6 -0
  202. package/dist/lib/debug.d.ts +43 -0
  203. package/dist/lib/debugRegistry.d.ts +29 -0
  204. package/dist/lib/debugUtils.d.ts +27 -0
  205. package/dist/lib/entityDebug.d.ts +38 -0
  206. package/dist/lib/getNestedValue.d.ts +33 -0
  207. package/dist/lib/guardRegistry.d.ts +32 -0
  208. package/dist/lib/index.d.ts +17 -426
  209. package/dist/lib/jazari/svg-paths.d.ts +61 -0
  210. package/dist/lib/parseContentSegments.d.ts +41 -0
  211. package/dist/lib/tickRegistry.d.ts +40 -0
  212. package/dist/lib/traitRegistry.d.ts +34 -0
  213. package/dist/lib/verificationRegistry.d.ts +107 -0
  214. package/dist/{cn-BoBXsxuX.d.ts → lib/visualizer/index.d.ts} +18 -69
  215. package/dist/locales/index.d.ts +5 -7
  216. package/dist/providers/EventBusProvider.d.ts +60 -0
  217. package/dist/providers/FetchedDataProvider.d.ts +105 -0
  218. package/dist/providers/OfflineModeProvider.d.ts +79 -0
  219. package/dist/providers/OrbitalProvider.d.ts +101 -0
  220. package/dist/providers/SelectionProvider.d.ts +81 -0
  221. package/dist/providers/VerificationProvider.d.ts +63 -0
  222. package/dist/providers/index.css +11 -9
  223. package/dist/providers/index.d.ts +16 -464
  224. package/dist/providers/index.js +3 -3
  225. package/dist/renderer/client-effect-executor.d.ts +68 -0
  226. package/dist/renderer/data-resolver.d.ts +68 -0
  227. package/dist/renderer/index.d.ts +22 -519
  228. package/dist/renderer/index.js +1 -1
  229. package/dist/renderer/init.d.ts +14 -0
  230. package/dist/renderer/navigation.d.ts +142 -0
  231. package/dist/{offline-executor-CHr4uAhf.d.ts → renderer/offline-executor.d.ts} +9 -172
  232. package/dist/renderer/pattern-resolver.d.ts +91 -0
  233. package/dist/renderer/slot-definitions.d.ts +45 -0
  234. package/dist/renderer/types.d.ts +160 -0
  235. package/dist/renderer/useClientEffects.d.ts +88 -0
  236. package/dist/stores/entityStore.d.ts +99 -0
  237. package/dist/stores/filtering.d.ts +51 -0
  238. package/dist/stores/index.d.ts +4 -148
  239. package/package.json +12 -10
  240. package/dist/components/organisms/game/three/index.d.ts +0 -1162
  241. package/dist/{chunk-FZJ73RDM.js → chunk-RIZ76XRF.js} +1 -1
package/LICENSE CHANGED
@@ -1,72 +1,21 @@
1
- Business Source License 1.1
2
-
3
- Parameters
4
-
5
- Licensor: Almadar FZE
6
- Licensed Work: KFlow Builder / Almadar
7
- The Licensed Work is (c) 2025-2026 Almadar FZE.
8
- Additional Use Grant: You may make production use of the Licensed Work for
9
- non-commercial purposes and for internal evaluation.
10
- Production use for commercial purposes requires a
11
- commercial license from the Licensor.
12
- Change Date: 2030-02-01
13
- Change License: Apache License, Version 2.0
14
-
15
- Terms
16
-
17
- The Licensor hereby grants you the right to copy, modify, create derivative
18
- works, redistribute, and make non-production use of the Licensed Work. The
19
- Licensor may make an Additional Use Grant, above, permitting limited
20
- production use.
21
-
22
- Effective on the Change Date, or the fourth anniversary of the first publicly
23
- available distribution of a specific version of the Licensed Work under this
24
- License, whichever comes first, the Licensor hereby grants you rights under
25
- the terms of the Change License, and the rights granted in the paragraph
26
- above terminate.
27
-
28
- If your use of the Licensed Work does not comply with the requirements
29
- currently in effect as described in this License, you must purchase a
30
- commercial license from the Licensor, its affiliated entities, or authorized
31
- resellers, or you must refrain from using the Licensed Work.
32
-
33
- All copies of the original and modified Licensed Work, and derivative works
34
- of the Licensed Work, are subject to this License. This License applies
35
- separately for each version of the Licensed Work and the Change Date may vary
36
- for each version of the Licensed Work released by Licensor.
37
-
38
- You must conspicuously display this License on each original or modified copy
39
- of the Licensed Work. If you receive the Licensed Work in original or
40
- modified form from a third party, the terms and conditions set forth in this
41
- License apply to your use of that work.
42
-
43
- Any use of the Licensed Work in violation of this License will automatically
44
- terminate your rights under this License for the current and all other
45
- versions of the Licensed Work.
46
-
47
- This License does not grant you any right in any trademark or logo of
48
- Licensor or its affiliates (provided that you may use a trademark or logo of
49
- Licensor as expressly required by this License).
50
-
51
- TO THE EXTENT PERMITTED BY APPLICABLE LAW, THE LICENSED WORK IS PROVIDED ON
52
- AN "AS IS" BASIS. LICENSOR HEREBY DISCLAIMS ALL WARRANTIES AND CONDITIONS,
53
- EXPRESS OR IMPLIED, INCLUDING (WITHOUT LIMITATION) WARRANTIES OF
54
- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, NON-INFRINGEMENT, AND
55
- TITLE.
56
-
57
- ---
58
-
59
- License text copyright (c) 2017 MariaDB Corporation Ab, All Rights Reserved.
60
- "Business Source License" is a trademark of MariaDB Corporation Ab.
61
-
62
- ADDITIONAL TERMS:
63
-
64
- Documentation (builder/packages/website/docs/) is licensed under CC BY 4.0.
65
-
66
- TRADEMARKS:
67
-
68
- "Orbital", "KFlow", "Almadar", and the Almadar logo are trademarks of
69
- Almadar FZE. You may not use these trademarks without prior written
70
- permission from Almadar FZE.
71
-
72
- For licensing inquiries: licensing@almadar.io
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Almadar Team
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -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,5 @@
1
+ import React from "react";
2
+ export interface CheckboxProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, "type"> {
3
+ label?: string;
4
+ }
5
+ export declare const Checkbox: React.ForwardRefExoticComponent<CheckboxProps & React.RefAttributes<HTMLInputElement>>;
@@ -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,5 @@
1
+ import React from "react";
2
+ export interface LabelProps extends React.LabelHTMLAttributes<HTMLLabelElement> {
3
+ required?: boolean;
4
+ }
5
+ export declare const Label: React.ForwardRefExoticComponent<LabelProps & React.RefAttributes<HTMLLabelElement>>;
@@ -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>>;