@raintonic/formaui 0.2.0 → 0.3.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.
Files changed (186) hide show
  1. package/CHANGELOG.md +104 -7
  2. package/LICENSE +21 -0
  3. package/README.md +199 -145
  4. package/fesm2022/raintonic-formaui-cdk-drag-drop.mjs.map +1 -1
  5. package/fesm2022/raintonic-formaui-cdk-form-field.mjs.map +1 -1
  6. package/fesm2022/raintonic-formaui-cdk-overlay.mjs +0 -26
  7. package/fesm2022/raintonic-formaui-cdk-overlay.mjs.map +1 -1
  8. package/fesm2022/raintonic-formaui-cdk-virtual-scroll.mjs +2 -2
  9. package/fesm2022/raintonic-formaui-cdk-virtual-scroll.mjs.map +1 -1
  10. package/fesm2022/raintonic-formaui-components-accordion.mjs +2 -2
  11. package/fesm2022/raintonic-formaui-components-accordion.mjs.map +1 -1
  12. package/fesm2022/raintonic-formaui-components-alert.mjs +24 -5
  13. package/fesm2022/raintonic-formaui-components-alert.mjs.map +1 -1
  14. package/fesm2022/raintonic-formaui-components-autocomplete.mjs +38 -9
  15. package/fesm2022/raintonic-formaui-components-autocomplete.mjs.map +1 -1
  16. package/fesm2022/raintonic-formaui-components-avatar.mjs.map +1 -1
  17. package/fesm2022/raintonic-formaui-components-badge.mjs +45 -31
  18. package/fesm2022/raintonic-formaui-components-badge.mjs.map +1 -1
  19. package/fesm2022/raintonic-formaui-components-big-menu.mjs +23 -5
  20. package/fesm2022/raintonic-formaui-components-big-menu.mjs.map +1 -1
  21. package/fesm2022/raintonic-formaui-components-breadcrumb.mjs +24 -7
  22. package/fesm2022/raintonic-formaui-components-breadcrumb.mjs.map +1 -1
  23. package/fesm2022/raintonic-formaui-components-button-group.mjs +6 -6
  24. package/fesm2022/raintonic-formaui-components-button-group.mjs.map +1 -1
  25. package/fesm2022/raintonic-formaui-components-button.mjs +63 -17
  26. package/fesm2022/raintonic-formaui-components-button.mjs.map +1 -1
  27. package/fesm2022/raintonic-formaui-components-card.mjs +8 -8
  28. package/fesm2022/raintonic-formaui-components-card.mjs.map +1 -1
  29. package/fesm2022/raintonic-formaui-components-checkbox.mjs +2 -2
  30. package/fesm2022/raintonic-formaui-components-checkbox.mjs.map +1 -1
  31. package/fesm2022/raintonic-formaui-components-data-table.mjs +67 -9
  32. package/fesm2022/raintonic-formaui-components-data-table.mjs.map +1 -1
  33. package/fesm2022/raintonic-formaui-components-date-picker.mjs +63 -16
  34. package/fesm2022/raintonic-formaui-components-date-picker.mjs.map +1 -1
  35. package/fesm2022/raintonic-formaui-components-divider.mjs +2 -2
  36. package/fesm2022/raintonic-formaui-components-divider.mjs.map +1 -1
  37. package/fesm2022/raintonic-formaui-components-drawer.mjs +19 -4
  38. package/fesm2022/raintonic-formaui-components-drawer.mjs.map +1 -1
  39. package/fesm2022/raintonic-formaui-components-empty-state.mjs +2 -2
  40. package/fesm2022/raintonic-formaui-components-empty-state.mjs.map +1 -1
  41. package/fesm2022/raintonic-formaui-components-file-upload.mjs +25 -5
  42. package/fesm2022/raintonic-formaui-components-file-upload.mjs.map +1 -1
  43. package/fesm2022/raintonic-formaui-components-form-field.mjs +21 -6
  44. package/fesm2022/raintonic-formaui-components-form-field.mjs.map +1 -1
  45. package/fesm2022/raintonic-formaui-components-icon.mjs +2 -2
  46. package/fesm2022/raintonic-formaui-components-icon.mjs.map +1 -1
  47. package/fesm2022/raintonic-formaui-components-input.mjs +1 -1
  48. package/fesm2022/raintonic-formaui-components-input.mjs.map +1 -1
  49. package/fesm2022/raintonic-formaui-components-list.mjs +4 -4
  50. package/fesm2022/raintonic-formaui-components-list.mjs.map +1 -1
  51. package/fesm2022/raintonic-formaui-components-menu.mjs +4 -4
  52. package/fesm2022/raintonic-formaui-components-menu.mjs.map +1 -1
  53. package/fesm2022/raintonic-formaui-components-number-input.mjs +20 -5
  54. package/fesm2022/raintonic-formaui-components-number-input.mjs.map +1 -1
  55. package/fesm2022/raintonic-formaui-components-paginator.mjs +27 -7
  56. package/fesm2022/raintonic-formaui-components-paginator.mjs.map +1 -1
  57. package/fesm2022/raintonic-formaui-components-password-input.mjs +23 -5
  58. package/fesm2022/raintonic-formaui-components-password-input.mjs.map +1 -1
  59. package/fesm2022/raintonic-formaui-components-popover.mjs +2 -2
  60. package/fesm2022/raintonic-formaui-components-popover.mjs.map +1 -1
  61. package/fesm2022/raintonic-formaui-components-progressbar.mjs +32 -7
  62. package/fesm2022/raintonic-formaui-components-progressbar.mjs.map +1 -1
  63. package/fesm2022/raintonic-formaui-components-radio.mjs +4 -4
  64. package/fesm2022/raintonic-formaui-components-radio.mjs.map +1 -1
  65. package/fesm2022/raintonic-formaui-components-select.mjs +41 -26
  66. package/fesm2022/raintonic-formaui-components-select.mjs.map +1 -1
  67. package/fesm2022/raintonic-formaui-components-side-panel.mjs +19 -4
  68. package/fesm2022/raintonic-formaui-components-side-panel.mjs.map +1 -1
  69. package/fesm2022/raintonic-formaui-components-sidebar.mjs +23 -5
  70. package/fesm2022/raintonic-formaui-components-sidebar.mjs.map +1 -1
  71. package/fesm2022/raintonic-formaui-components-skeleton.mjs +2 -2
  72. package/fesm2022/raintonic-formaui-components-skeleton.mjs.map +1 -1
  73. package/fesm2022/raintonic-formaui-components-slider.mjs +23 -5
  74. package/fesm2022/raintonic-formaui-components-slider.mjs.map +1 -1
  75. package/fesm2022/raintonic-formaui-components-spinner.mjs +24 -7
  76. package/fesm2022/raintonic-formaui-components-spinner.mjs.map +1 -1
  77. package/fesm2022/raintonic-formaui-components-stepper.mjs +2 -2
  78. package/fesm2022/raintonic-formaui-components-stepper.mjs.map +1 -1
  79. package/fesm2022/raintonic-formaui-components-tab.mjs +10 -10
  80. package/fesm2022/raintonic-formaui-components-tab.mjs.map +1 -1
  81. package/fesm2022/raintonic-formaui-components-tag.mjs +21 -4
  82. package/fesm2022/raintonic-formaui-components-tag.mjs.map +1 -1
  83. package/fesm2022/raintonic-formaui-components-time-picker.mjs +26 -7
  84. package/fesm2022/raintonic-formaui-components-time-picker.mjs.map +1 -1
  85. package/fesm2022/raintonic-formaui-components-toggle.mjs +2 -2
  86. package/fesm2022/raintonic-formaui-components-toggle.mjs.map +1 -1
  87. package/fesm2022/raintonic-formaui-components-toolbar.mjs +41 -7
  88. package/fesm2022/raintonic-formaui-components-toolbar.mjs.map +1 -1
  89. package/fesm2022/raintonic-formaui-components-tooltip.mjs +2 -2
  90. package/fesm2022/raintonic-formaui-components-tooltip.mjs.map +1 -1
  91. package/fesm2022/raintonic-formaui-components-tree-select.mjs +2 -2
  92. package/fesm2022/raintonic-formaui-components-tree-select.mjs.map +1 -1
  93. package/fesm2022/raintonic-formaui-components-tree-table.mjs +35 -6
  94. package/fesm2022/raintonic-formaui-components-tree-table.mjs.map +1 -1
  95. package/fesm2022/raintonic-formaui-components-tree.mjs +25 -7
  96. package/fesm2022/raintonic-formaui-components-tree.mjs.map +1 -1
  97. package/fesm2022/raintonic-formaui-core.mjs +25 -1
  98. package/fesm2022/raintonic-formaui-core.mjs.map +1 -1
  99. package/fesm2022/raintonic-formaui-services-dialog.mjs +37 -37
  100. package/fesm2022/raintonic-formaui-services-dialog.mjs.map +1 -1
  101. package/fesm2022/raintonic-formaui-services-notification.mjs +2 -2
  102. package/fesm2022/raintonic-formaui-services-notification.mjs.map +1 -1
  103. package/fesm2022/raintonic-formaui-services-theme.mjs +3 -3
  104. package/fesm2022/raintonic-formaui-services-theme.mjs.map +1 -1
  105. package/fesm2022/raintonic-formaui-test-utils.mjs +21 -16
  106. package/fesm2022/raintonic-formaui-test-utils.mjs.map +1 -1
  107. package/fesm2022/raintonic-formaui.mjs +1 -1
  108. package/fesm2022/raintonic-formaui.mjs.map +1 -1
  109. package/llms-full.txt +36 -122
  110. package/llms.txt +4 -5
  111. package/package.json +1 -5
  112. package/styles/index.scss +5 -5
  113. package/styles/partials/_motion.scss +25 -0
  114. package/styles/partials/_theme.scss +6 -5
  115. package/styles/partials/components/_button.scss +361 -0
  116. package/styles/partials/components/_dialog.scss +180 -0
  117. package/styles/partials/components/_overlay.scss +87 -0
  118. package/styles/partials/themes/_dark.scss +14 -0
  119. package/styles/partials/themes/_light.scss +14 -0
  120. package/types/raintonic-formaui-cdk-overlay.d.ts +0 -1
  121. package/types/raintonic-formaui-cdk-overlay.d.ts.map +1 -1
  122. package/types/raintonic-formaui-components-alert.d.ts +11 -1
  123. package/types/raintonic-formaui-components-alert.d.ts.map +1 -1
  124. package/types/raintonic-formaui-components-autocomplete.d.ts +25 -7
  125. package/types/raintonic-formaui-components-autocomplete.d.ts.map +1 -1
  126. package/types/raintonic-formaui-components-badge.d.ts +20 -9
  127. package/types/raintonic-formaui-components-badge.d.ts.map +1 -1
  128. package/types/raintonic-formaui-components-big-menu.d.ts +12 -1
  129. package/types/raintonic-formaui-components-big-menu.d.ts.map +1 -1
  130. package/types/raintonic-formaui-components-breadcrumb.d.ts +11 -2
  131. package/types/raintonic-formaui-components-breadcrumb.d.ts.map +1 -1
  132. package/types/raintonic-formaui-components-button-group.d.ts +6 -6
  133. package/types/raintonic-formaui-components-button.d.ts +9 -7
  134. package/types/raintonic-formaui-components-button.d.ts.map +1 -1
  135. package/types/raintonic-formaui-components-card.d.ts +4 -4
  136. package/types/raintonic-formaui-components-checkbox.d.ts +1 -1
  137. package/types/raintonic-formaui-components-data-table.d.ts +56 -16
  138. package/types/raintonic-formaui-components-data-table.d.ts.map +1 -1
  139. package/types/raintonic-formaui-components-date-picker.d.ts +32 -4
  140. package/types/raintonic-formaui-components-date-picker.d.ts.map +1 -1
  141. package/types/raintonic-formaui-components-drawer.d.ts +10 -1
  142. package/types/raintonic-formaui-components-drawer.d.ts.map +1 -1
  143. package/types/raintonic-formaui-components-file-upload.d.ts +12 -1
  144. package/types/raintonic-formaui-components-file-upload.d.ts.map +1 -1
  145. package/types/raintonic-formaui-components-form-field.d.ts +12 -2
  146. package/types/raintonic-formaui-components-form-field.d.ts.map +1 -1
  147. package/types/raintonic-formaui-components-input.d.ts +1 -1
  148. package/types/raintonic-formaui-components-number-input.d.ts +11 -2
  149. package/types/raintonic-formaui-components-number-input.d.ts.map +1 -1
  150. package/types/raintonic-formaui-components-paginator.d.ts +13 -1
  151. package/types/raintonic-formaui-components-paginator.d.ts.map +1 -1
  152. package/types/raintonic-formaui-components-password-input.d.ts +12 -2
  153. package/types/raintonic-formaui-components-password-input.d.ts.map +1 -1
  154. package/types/raintonic-formaui-components-progressbar.d.ts +14 -1
  155. package/types/raintonic-formaui-components-progressbar.d.ts.map +1 -1
  156. package/types/raintonic-formaui-components-select.d.ts.map +1 -1
  157. package/types/raintonic-formaui-components-side-panel.d.ts +10 -1
  158. package/types/raintonic-formaui-components-side-panel.d.ts.map +1 -1
  159. package/types/raintonic-formaui-components-sidebar.d.ts +12 -1
  160. package/types/raintonic-formaui-components-sidebar.d.ts.map +1 -1
  161. package/types/raintonic-formaui-components-slider.d.ts +12 -1
  162. package/types/raintonic-formaui-components-slider.d.ts.map +1 -1
  163. package/types/raintonic-formaui-components-spinner.d.ts +12 -2
  164. package/types/raintonic-formaui-components-spinner.d.ts.map +1 -1
  165. package/types/raintonic-formaui-components-tag.d.ts +10 -1
  166. package/types/raintonic-formaui-components-tag.d.ts.map +1 -1
  167. package/types/raintonic-formaui-components-time-picker.d.ts +14 -2
  168. package/types/raintonic-formaui-components-time-picker.d.ts.map +1 -1
  169. package/types/raintonic-formaui-components-toggle.d.ts +1 -1
  170. package/types/raintonic-formaui-components-toolbar.d.ts +22 -4
  171. package/types/raintonic-formaui-components-toolbar.d.ts.map +1 -1
  172. package/types/raintonic-formaui-components-tree-table.d.ts +29 -4
  173. package/types/raintonic-formaui-components-tree-table.d.ts.map +1 -1
  174. package/types/raintonic-formaui-components-tree.d.ts +12 -1
  175. package/types/raintonic-formaui-components-tree.d.ts.map +1 -1
  176. package/types/raintonic-formaui-core.d.ts +19 -2
  177. package/types/raintonic-formaui-core.d.ts.map +1 -1
  178. package/types/raintonic-formaui-services-dialog.d.ts +1 -1
  179. package/types/raintonic-formaui-services-theme.d.ts +3 -3
  180. package/types/raintonic-formaui-test-utils.d.ts +15 -2
  181. package/types/raintonic-formaui-test-utils.d.ts.map +1 -1
  182. package/types/raintonic-formaui.d.ts +1 -1
  183. package/fesm2022/raintonic-formaui-components-dynamic-form.mjs +0 -266
  184. package/fesm2022/raintonic-formaui-components-dynamic-form.mjs.map +0 -1
  185. package/types/raintonic-formaui-components-dynamic-form.d.ts +0 -412
  186. package/types/raintonic-formaui-components-dynamic-form.d.ts.map +0 -1
package/CHANGELOG.md CHANGED
@@ -1,7 +1,104 @@
1
- # Changelog
2
-
3
- All notable changes to FormaUI will be documented in this file.
4
-
5
- ## [0.1.0] - Unreleased
6
-
7
- - Initial standalone release
1
+ # Changelog
2
+
3
+ All notable changes to FormaUI are documented in this file.
4
+
5
+ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
6
+ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
+
8
+ ## [Unreleased]
9
+
10
+ ### Changed
11
+
12
+ - **BREAKING** `FuiButtonDirective` variant set reduced to the Figma spec: `primary | secondary | tertiary | tertiary-violet | link | destructive`.
13
+ - `variant="ghost"` → use `variant="tertiary"`.
14
+ - `variant="outline"` → use `variant="secondary"`.
15
+ - `variant="danger"` → use `variant="destructive"`.
16
+ - `variant="icon"` → use `iconOnly` combined with a variant (typically `tertiary`).
17
+ - **BREAKING** Button `loading` behavior: text is now visible during loading; the spinner occupies a leading slot; user-supplied icons (leading and trailing) are hidden during loading. Previously the entire label was hidden via `color: transparent`.
18
+
19
+ ### Added
20
+
21
+ - Semantic alias tokens: `--fui-destructive-default`, `--fui-destructive-hover`, `--fui-destructive-text`, `--fui-tertiary-text`, `--fui-tertiary-hover-bg`, `--fui-tertiary-violet-text`, `--fui-tertiary-violet-hover-bg`.
22
+
23
+ ### Fixed
24
+
25
+ - Destructive variant now uses a saturated red (`--fui-danger-90` = `#e5484d`) instead of the pastel `--fui-danger-60` (`#fdbdbe`) that was incorrectly wired as the button's `danger` background.
26
+
27
+ ## [1.0.0] - YYYY-MM-DD (placeholder — release script will set the date)
28
+
29
+ First stable release. API is now locked under SemVer from this version forward.
30
+
31
+ ### Breaking
32
+ - Removed experimental `dynamic-form` component and its entry point (`@raintonic/formaui/components/dynamic-form`). No direct migration path — consumers should use reactive forms directly.
33
+
34
+ ### Added
35
+ - Pre-publication component audit (see `.claude/docs/reviews/`)
36
+ - Bundle size budget enforced via `size-limit`
37
+ - Coverage threshold enforced at 60% in CI
38
+ - Explicit `.browserslistrc` for library
39
+ - GitHub Pages deploy for docs at https://formaui.raintonic.com
40
+ - PR validation CI workflow
41
+ - Theming guide page in docs app
42
+ - `.meta.md` metadata for flagship components
43
+ - LICENSE, SECURITY.md, CONTRIBUTING.md
44
+ - Tests for 8 previously uncovered components: breadcrumb, empty-state, list, radio, skeleton, spinner, tag, toggle
45
+ - Auto-sync of `FORMAUI_VERSION` from `package.json` at build time
46
+ - Syntax highlighting in docs code blocks (Prism.js)
47
+ - Custom color support for badges via hex strings or explicit color pairs
48
+ - Type declaration for `AdvancedDataTableHeader.type`
49
+
50
+ ### Fixed
51
+ - README package name in install and import examples (was `formaui/*`, now `@raintonic/formaui/*`)
52
+ - Cross-entry-point import in tree-table (ng-packagr rootDir violation)
53
+ - Topbar layout on mobile viewport (< 768px)
54
+ - Nav panel position on mobile
55
+ - API viewer type-column overflow for long union types
56
+ - Select component keyboard navigation (added PageUp/PageDown)
57
+ - JSDoc examples with stale `rtButton` references
58
+ - Card header spacing handling
59
+ - Checkbox label position when set to `before`
60
+ - Toggle label position when set to `before`
61
+
62
+ ## [0.2.1] - 2026-03-31
63
+
64
+ ### Fixed
65
+ - Dialog padding on overlay and CSS compile pipeline
66
+ - README npm badge link
67
+
68
+ ## [0.2.0] - 2026-03-31
69
+
70
+ ### Added
71
+ - Initial public npm publication as `@raintonic/formaui`
72
+ - Comprehensive README for npm
73
+ - `llms.txt` generator for AI-readable component metadata
74
+ - ESLint strict + Prettier configuration
75
+ - Upgrade to Jest 30 + Angular 21.2.6
76
+ - Publish script with safety checks
77
+ - Playground code generation from knob values
78
+ - Copy-to-clipboard on code blocks
79
+ - Collapsible code panel in playground viewer
80
+
81
+ ### Fixed
82
+ - Number input behavior
83
+ - Module name mapper for publication
84
+ - Package name for publication
85
+ - Test suite alignment with new code
86
+ - Icon config exports aligned with Fui naming
87
+
88
+ ### Changed
89
+ - Standardized all class names to `Fui` prefix (internal rename — no external API was called `Rt*`)
90
+ - Replaced direct `document` access with `DOCUMENT` injection token (SSR groundwork)
91
+ - Overlay subscription cleanup (memory leak fix)
92
+ - Replaced global `@HostListener('document:click')` with conditional subscriptions (performance)
93
+ - Icon CDN made configurable with SRI support via InjectionToken
94
+ - Data table now has generic type parameter and trackBy support
95
+ - Extracted shared form control utilities (11 components simplified)
96
+ - Size tokens normalized (`sm|md|lg`), `readonly` casing normalized, ARIA attributes enriched, live announcements added
97
+
98
+ ### Removed
99
+ - Legacy `holiday`/`RainTonic` references in JSDoc
100
+ - `data-rt*` HTML attributes (renamed to `data-fui*`)
101
+
102
+ ## [0.1.0] - Pre-release (internal)
103
+
104
+ Initial standalone release.
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Rain Tonic S.r.l.
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.
package/README.md CHANGED
@@ -1,145 +1,199 @@
1
- # FormaUI
2
-
3
- A modern, standalone Angular UI component library with built-in theming, CDK primitives, and tree-shakable imports.
4
-
5
- [![npm version](https://img.shields.io/npm/v/formaui.svg)](https://www.npmjs.com/package/formaui)
6
- [![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT)
7
- [![Angular](https://img.shields.io/badge/Angular-21+-dd0031.svg)](https://angular.dev)
8
-
9
- ## Features
10
-
11
- - **45 standalone components** — no NgModules, just import and use
12
- - **Tree-shakable** — secondary entry points via ng-packagr, import only what you need
13
- - **Theming system** — CSS custom properties with light/dark themes out of the box
14
- - **CDK layer** — overlay/portal system, drag-drop, virtual-scroll, form-field primitives
15
- - **Signals-first** — reactive state management with Angular signals
16
- - **Accessible** — built-in a11y support with testing utilities (axe-core)
17
- - **Form integration** — components implement `RtFormFieldControl` for seamless `fui-form-field` integration
18
-
19
- ## Installation
20
-
21
- ```bash
22
- npm install formaui
23
- ```
24
-
25
- ### Peer Dependencies
26
-
27
- ```json
28
- {
29
- "@angular/common": "^21.0.0",
30
- "@angular/core": "^21.0.0",
31
- "@angular/forms": "^21.0.0"
32
- }
33
- ```
34
-
35
- ## Setup
36
-
37
- Import the base styles in your `styles.scss`:
38
-
39
- ```scss
40
- @use '@raintonic/formaui/styles' as fui;
41
- ```
42
-
43
- ## Usage
44
-
45
- All imports use secondary entry points:
46
-
47
- ```typescript
48
- import { ButtonDirective } from '@raintonic/formaui/components/button';
49
- import { RtFormFieldComponent } from '@raintonic/formaui/components/form-field';
50
- import { InputDirective } from '@raintonic/formaui/components/input';
51
- import { ThemeService } from '@raintonic/formaui/services/theme';
52
- ```
53
-
54
- ### Button
55
-
56
- ```html
57
- <button fui-button variant="primary">Save</button>
58
- <button fui-button variant="outlined">Cancel</button>
59
- ```
60
-
61
- ### Form Field
62
-
63
- ```html
64
- <fui-form-field>
65
- <fui-label>Email</fui-label>
66
- <input fuiInput type="email" />
67
- </fui-form-field>
68
- ```
69
-
70
- ### Theme Switching
71
-
72
- ```typescript
73
- import { ThemeService } from '@raintonic/formaui/services/theme';
74
-
75
- export class AppComponent {
76
- private theme = inject(ThemeService);
77
-
78
- toggleDark() {
79
- this.theme.toggleTheme();
80
- }
81
- }
82
- ```
83
-
84
- ## Components
85
-
86
- All components use the `fui` prefix and are standalone.
87
-
88
- | Category | Components |
89
- |---|---|
90
- | **Forms** | `autocomplete` `checkbox` `date-picker` `dynamic-form` `file-upload` `form-field` `input` `number-input` `password-input` `radio` `select` `slider` `time-picker` `toggle` `tree-select` |
91
- | **Data** | `data-table` `list` `paginator` `tree` `tree-table` |
92
- | **Layout** | `accordion` `card` `divider` `sidebar` `side-panel` `tab` `toolbar` |
93
- | **Navigation** | `breadcrumb` `menu` `big-menu` `stepper` |
94
- | **Feedback** | `alert` `badge` `empty-state` `progressbar` `skeleton` `spinner` `tag` `tooltip` |
95
- | **Actions** | `button` `button-group` `drawer` `popover` |
96
- | **Display** | `avatar` `icon` |
97
-
98
- ### Import Pattern
99
-
100
- ```typescript
101
- import { <Component> } from '@raintonic/formaui/components/<name>';
102
- ```
103
-
104
- ## CDK
105
-
106
- Low-level primitives for building custom components.
107
-
108
- | Module | Description |
109
- |---|---|
110
- | `formaui/cdk/overlay` | Overlay and portal positioning system |
111
- | `formaui/cdk/drag-drop` | Drag and drop functionality |
112
- | `formaui/cdk/virtual-scroll` | Virtual scrolling for large lists |
113
- | `formaui/cdk/form-field` | Form field infrastructure and control interface |
114
-
115
- ## Services
116
-
117
- | Service | Import | Description |
118
- |---|---|---|
119
- | **Dialog** | `formaui/services/dialog` | Modal dialog management |
120
- | **Notification** | `formaui/services/notification` | Toast notifications |
121
- | **Theme** | `formaui/services/theme` | Runtime theme switching |
122
-
123
- ## Theming
124
-
125
- FormaUI uses CSS custom properties (`--fui-*`) for all design tokens. Two themes are included:
126
-
127
- - **Light** (default) — applied to `:root`
128
- - **Dark** — toggled via `ThemeService`
129
-
130
- Tokens cover spacing, typography, colors, motion, and elevation. Override any `--fui-*` variable to customize.
131
-
132
- ## Development
133
-
134
- ```bash
135
- npm run build:lib # Build the library
136
- npm test # Run tests (Jest)
137
- npm run lint # Lint
138
- npm run serve:docs # Serve docs app locally
139
- ```
140
-
141
- Requires Node >= 22.16.0.
142
-
143
- ## License
144
-
145
- [MIT](https://opensource.org/licenses/MIT)
1
+ <p align="center">
2
+ <img src="https://raw.githubusercontent.com/RainTonic/formaui/main/resources/logo_black.svg" alt="FormaUI" width="360">
3
+ </p>
4
+
5
+ <h1 align="center">FormaUI</h1>
6
+
7
+ <p align="center">A modern, standalone Angular UI component library with built-in theming, CDK primitives, and tree-shakable imports.</p>
8
+
9
+ [![npm version](https://img.shields.io/npm/v/@raintonic/formaui.svg)](https://www.npmjs.com/package/@raintonic/formaui)
10
+ [![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT)
11
+ [![Angular](https://img.shields.io/badge/Angular-21+-dd0031.svg)](https://angular.dev)
12
+
13
+ ## Features
14
+
15
+ - **44 standalone components** — no NgModules, just import and use
16
+ - **Tree-shakable** — secondary entry points via ng-packagr, import only what you need
17
+ - **Theming system** — CSS custom properties with light/dark themes out of the box
18
+ - **CDK layer** — overlay/portal system, drag-drop, virtual-scroll, form-field primitives
19
+ - **Signals-first** — reactive state management with Angular signals
20
+ - **Accessible** — built-in a11y support with testing utilities (axe-core)
21
+ - **Form integration** — components implement `FuiFormFieldControl` for seamless `fui-form-field` integration
22
+
23
+ ## Installation
24
+
25
+ ```bash
26
+ npm install @raintonic/formaui
27
+ ```
28
+
29
+ ### Peer Dependencies
30
+
31
+ ```json
32
+ {
33
+ "@angular/common": "^21.0.0",
34
+ "@angular/core": "^21.0.0",
35
+ "@angular/forms": "^21.0.0"
36
+ }
37
+ ```
38
+
39
+ ## Browser support
40
+
41
+ FormaUI supports the last 2 versions of Chrome, Firefox, Safari, Edge, and iOS Safari. Internet Explorer is not supported.
42
+
43
+ Exact matrix: see `.browserslistrc`.
44
+
45
+ ## Versioning
46
+
47
+ FormaUI follows [Semantic Versioning](https://semver.org/). From v1.0.0 onwards:
48
+
49
+ - **MAJOR** breaking API changes
50
+ - **MINOR** new features, backwards-compatible
51
+ - **PATCH** bug fixes, backwards-compatible
52
+
53
+ Versions prior to 1.0.0 (`0.x.x`) did not carry a stability guarantee.
54
+
55
+ ## Quick start
56
+
57
+ Install:
58
+
59
+ ```bash
60
+ npm install @raintonic/formaui
61
+ ```
62
+
63
+ Import base styles in `src/styles.scss`:
64
+
65
+ ```scss
66
+ @use '@raintonic/formaui/styles' as fui;
67
+ ```
68
+
69
+ Use components in a standalone component:
70
+
71
+ ```typescript
72
+ import { Component } from '@angular/core';
73
+ import { FuiButtonDirective } from '@raintonic/formaui/components/button';
74
+ import { FuiFormFieldComponent, FuiLabelComponent } from '@raintonic/formaui/components/form-field';
75
+ import { FuiInputDirective } from '@raintonic/formaui/components/input';
76
+
77
+ @Component({
78
+ standalone: true,
79
+ imports: [FuiButtonDirective, FuiFormFieldComponent, FuiLabelComponent, FuiInputDirective],
80
+ template: `
81
+ <fui-form-field>
82
+ <fui-label>Email</fui-label>
83
+ <input fuiInput type="email" />
84
+ </fui-form-field>
85
+ <button fuiButton variant="primary">Save</button>
86
+ `,
87
+ })
88
+ export class MyFormComponent {}
89
+ ```
90
+
91
+ See the full docs at [formaui.raintonic.com](https://formaui.raintonic.com).
92
+
93
+ ## Usage
94
+
95
+ All imports use secondary entry points:
96
+
97
+ ```typescript
98
+ import { FuiButtonDirective } from '@raintonic/formaui/components/button';
99
+ import { FuiFormFieldComponent } from '@raintonic/formaui/components/form-field';
100
+ import { FuiInputDirective } from '@raintonic/formaui/components/input';
101
+ import { FuiThemeService } from '@raintonic/formaui/services/theme';
102
+ ```
103
+
104
+ ### Button
105
+
106
+ ```html
107
+ <button fuiButton variant="primary">Save</button>
108
+ <button fuiButton variant="secondary">Cancel</button>
109
+ ```
110
+
111
+ ### Form Field
112
+
113
+ ```html
114
+ <fui-form-field>
115
+ <fui-label>Email</fui-label>
116
+ <input fuiInput type="email" />
117
+ </fui-form-field>
118
+ ```
119
+
120
+ ### Theme Switching
121
+
122
+ ```typescript
123
+ import { FuiThemeService } from '@raintonic/formaui/services/theme';
124
+
125
+ export class AppComponent {
126
+ private theme = inject(FuiThemeService);
127
+
128
+ toggleDark() {
129
+ this.theme.toggleTheme();
130
+ }
131
+ }
132
+ ```
133
+
134
+ ## Components
135
+
136
+ All components use the `fui` prefix and are standalone.
137
+
138
+ | Category | Components |
139
+ |---|---|
140
+ | **Forms** | `autocomplete` `checkbox` `date-picker` `file-upload` `form-field` `input` `number-input` `password-input` `radio` `select` `slider` `time-picker` `toggle` `tree-select` |
141
+ | **Data** | `data-table` `list` `paginator` `tree` `tree-table` |
142
+ | **Layout** | `accordion` `card` `divider` `sidebar` `side-panel` `tab` `toolbar` |
143
+ | **Navigation** | `breadcrumb` `menu` `big-menu` `stepper` |
144
+ | **Feedback** | `alert` `badge` `empty-state` `progressbar` `skeleton` `spinner` `tag` `tooltip` |
145
+ | **Actions** | `button` `button-group` `drawer` `popover` |
146
+ | **Display** | `avatar` `icon` |
147
+
148
+ ### Import Pattern
149
+
150
+ ```typescript
151
+ import { Fui<Component> } from '@raintonic/formaui/components/<name>';
152
+ ```
153
+
154
+ ## CDK
155
+
156
+ Low-level primitives for building custom components.
157
+
158
+ | Module | Description |
159
+ |---|---|
160
+ | `@raintonic/formaui/cdk/overlay` | Overlay and portal positioning system |
161
+ | `@raintonic/formaui/cdk/drag-drop` | Drag and drop functionality |
162
+ | `@raintonic/formaui/cdk/virtual-scroll` | Virtual scrolling for large lists |
163
+ | `@raintonic/formaui/cdk/form-field` | Form field infrastructure and control interface |
164
+
165
+ ## Services
166
+
167
+ | Service | Import | Description |
168
+ |---|---|---|
169
+ | **Dialog** | `@raintonic/formaui/services/dialog` | Modal dialog management |
170
+ | **Notification** | `@raintonic/formaui/services/notification` | Toast notifications |
171
+ | **Theme** | `@raintonic/formaui/services/theme` | Runtime theme switching |
172
+
173
+ ## Theming
174
+
175
+ FormaUI uses CSS custom properties (`--fui-*`) for all design tokens. Two themes are included:
176
+
177
+ - **Light** (default) — applied to `:root`
178
+ - **Dark** — toggled via `FuiThemeService`
179
+
180
+ Tokens cover spacing, typography, colors, motion, and elevation. Override any `--fui-*` variable to customize.
181
+
182
+ ## Development
183
+
184
+ ```bash
185
+ npm run build:lib # Build the library
186
+ npm test # Run tests (Jest)
187
+ npm run lint # Lint
188
+ npm run serve:docs # Serve docs app locally
189
+ ```
190
+
191
+ Requires Node >= 22.16.0.
192
+
193
+ ## Documentation
194
+
195
+ Full documentation and live component demos at [formaui.raintonic.com](https://formaui.raintonic.com).
196
+
197
+ ## License
198
+
199
+ [MIT](https://opensource.org/licenses/MIT) — Copyright © Rain Tonic S.r.l.