@machinemetrics/mm-react-components 0.2.3-3 → 0.2.3-30
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/README.md +89 -30
- package/agent-docs/agent-documentation-reference.md +401 -0
- package/agent-docs/ai-agent-guide.md +558 -0
- package/agent-docs/ai-agent-init-guide.md +465 -0
- package/agent-docs/chakra-migration-readme.md +265 -0
- package/agent-docs/chakra-migration-troubleshooting.md +649 -0
- package/agent-docs/component-mapping-reference.md +466 -0
- package/agent-docs/init-readme.md +283 -0
- package/agent-docs/init-troubleshooting.md +550 -0
- package/agent-docs/setup-reference.md +365 -0
- package/dist/App.d.ts.map +1 -1
- package/dist/README.md +89 -30
- package/dist/components/shadcn/accordion.d.ts +8 -0
- package/dist/components/shadcn/accordion.d.ts.map +1 -0
- package/dist/components/shadcn/alert-dialog.d.ts +15 -0
- package/dist/components/shadcn/alert-dialog.d.ts.map +1 -0
- package/dist/components/shadcn/alert.d.ts +10 -0
- package/dist/components/shadcn/alert.d.ts.map +1 -0
- package/dist/components/shadcn/avatar.d.ts +7 -0
- package/dist/components/shadcn/avatar.d.ts.map +1 -0
- package/dist/components/shadcn/badge.d.ts +10 -0
- package/dist/components/shadcn/badge.d.ts.map +1 -0
- package/dist/components/shadcn/breadcrumb.d.ts +12 -0
- package/dist/components/shadcn/breadcrumb.d.ts.map +1 -0
- package/dist/components/shadcn/button.d.ts +11 -0
- package/dist/components/shadcn/button.d.ts.map +1 -0
- package/dist/components/shadcn/calendar.d.ts +9 -0
- package/dist/components/shadcn/calendar.d.ts.map +1 -0
- package/dist/components/shadcn/card.d.ts +10 -0
- package/dist/components/shadcn/card.d.ts.map +1 -0
- package/dist/components/shadcn/chart.d.ts +41 -0
- package/dist/components/shadcn/chart.d.ts.map +1 -0
- package/dist/components/shadcn/checkbox.d.ts +5 -0
- package/dist/components/shadcn/checkbox.d.ts.map +1 -0
- package/dist/components/shadcn/collapsible.d.ts +7 -0
- package/dist/components/shadcn/collapsible.d.ts.map +1 -0
- package/dist/components/shadcn/command.d.ts +19 -0
- package/dist/components/shadcn/command.d.ts.map +1 -0
- package/dist/components/shadcn/dialog.d.ts +16 -0
- package/dist/components/shadcn/dialog.d.ts.map +1 -0
- package/dist/components/shadcn/drawer.d.ts +14 -0
- package/dist/components/shadcn/drawer.d.ts.map +1 -0
- package/dist/components/shadcn/dropdown-menu.d.ts +26 -0
- package/dist/components/shadcn/dropdown-menu.d.ts.map +1 -0
- package/dist/components/shadcn/form.d.ts +25 -0
- package/dist/components/shadcn/form.d.ts.map +1 -0
- package/dist/components/shadcn/input.d.ts +4 -0
- package/dist/components/shadcn/input.d.ts.map +1 -0
- package/dist/components/shadcn/label.d.ts +5 -0
- package/dist/components/shadcn/label.d.ts.map +1 -0
- package/dist/components/shadcn/pagination.d.ts +14 -0
- package/dist/components/shadcn/pagination.d.ts.map +1 -0
- package/dist/components/shadcn/popover.d.ts +8 -0
- package/dist/components/shadcn/popover.d.ts.map +1 -0
- package/dist/components/shadcn/progress.d.ts +5 -0
- package/dist/components/shadcn/progress.d.ts.map +1 -0
- package/dist/components/shadcn/radio-group.d.ts +6 -0
- package/dist/components/shadcn/radio-group.d.ts.map +1 -0
- package/dist/components/shadcn/select.d.ts +16 -0
- package/dist/components/shadcn/select.d.ts.map +1 -0
- package/dist/components/shadcn/separator.d.ts +5 -0
- package/dist/components/shadcn/separator.d.ts.map +1 -0
- package/dist/components/shadcn/sheet.d.ts +14 -0
- package/dist/components/shadcn/sheet.d.ts.map +1 -0
- package/dist/components/shadcn/skeleton.d.ts +4 -0
- package/dist/components/shadcn/skeleton.d.ts.map +1 -0
- package/dist/components/shadcn/slider.d.ts +5 -0
- package/dist/components/shadcn/slider.d.ts.map +1 -0
- package/dist/components/shadcn/sonner.d.ts +4 -0
- package/dist/components/shadcn/sonner.d.ts.map +1 -0
- package/dist/components/shadcn/spinner.d.ts +4 -0
- package/dist/components/shadcn/spinner.d.ts.map +1 -0
- package/dist/components/shadcn/switch.d.ts +5 -0
- package/dist/components/shadcn/switch.d.ts.map +1 -0
- package/dist/components/shadcn/table.d.ts +11 -0
- package/dist/components/shadcn/table.d.ts.map +1 -0
- package/dist/components/shadcn/tabs.d.ts +8 -0
- package/dist/components/shadcn/tabs.d.ts.map +1 -0
- package/dist/components/shadcn/textarea.d.ts +4 -0
- package/dist/components/shadcn/textarea.d.ts.map +1 -0
- package/dist/components/shadcn/toggle.d.ts +10 -0
- package/dist/components/shadcn/toggle.d.ts.map +1 -0
- package/dist/components/shadcn/tooltip.d.ts +8 -0
- package/dist/components/shadcn/tooltip.d.ts.map +1 -0
- package/dist/components/ui/accordion.d.ts +5 -6
- package/dist/components/ui/accordion.d.ts.map +1 -1
- package/dist/components/ui/alert-dialog.d.ts +7 -11
- package/dist/components/ui/alert-dialog.d.ts.map +1 -1
- package/dist/components/ui/alert.d.ts +8 -5
- package/dist/components/ui/alert.d.ts.map +1 -1
- package/dist/components/ui/avatar.d.ts +1 -6
- package/dist/components/ui/avatar.d.ts.map +1 -1
- package/dist/components/ui/badge.d.ts +4 -3
- package/dist/components/ui/badge.d.ts.map +1 -1
- package/dist/components/ui/breadcrumb.d.ts +1 -11
- package/dist/components/ui/breadcrumb.d.ts.map +1 -1
- package/dist/components/ui/button.d.ts +6 -6
- package/dist/components/ui/button.d.ts.map +1 -1
- package/dist/components/ui/calendar.d.ts +1 -1
- package/dist/components/ui/calendar.d.ts.map +1 -1
- package/dist/components/ui/card.d.ts +1 -9
- package/dist/components/ui/card.d.ts.map +1 -1
- package/dist/components/ui/checkbox.d.ts +1 -1
- package/dist/components/ui/checkbox.d.ts.map +1 -1
- package/dist/components/ui/collapsible.d.ts +1 -6
- package/dist/components/ui/collapsible.d.ts.map +1 -1
- package/dist/components/ui/command.d.ts +19 -0
- package/dist/components/ui/command.d.ts.map +1 -0
- package/dist/components/ui/data-table/TableView.d.ts +2 -1
- package/dist/components/ui/data-table/TableView.d.ts.map +1 -1
- package/dist/components/ui/data-table/cards/ResponsiveTable.d.ts +1 -1
- package/dist/components/ui/data-table/cards/ResponsiveTable.d.ts.map +1 -1
- package/dist/components/ui/data-table/cards/RowCard.d.ts +2 -1
- package/dist/components/ui/data-table/cards/RowCard.d.ts.map +1 -1
- package/dist/components/ui/data-table/index.d.ts +3 -1
- package/dist/components/ui/data-table/index.d.ts.map +1 -1
- package/dist/components/ui/data-table/pagination.d.ts +14 -1
- package/dist/components/ui/data-table/pagination.d.ts.map +1 -1
- package/dist/components/ui/data-table/parts/BatchActionsToolbar.d.ts +7 -0
- package/dist/components/ui/data-table/parts/BatchActionsToolbar.d.ts.map +1 -0
- package/dist/components/ui/data-table/parts/CellContent.d.ts +7 -0
- package/dist/components/ui/data-table/parts/CellContent.d.ts.map +1 -0
- package/dist/components/ui/data-table/parts/ColGroup.d.ts +7 -0
- package/dist/components/ui/data-table/parts/ColGroup.d.ts.map +1 -0
- package/dist/components/ui/data-table/parts/SortableHeader.d.ts +13 -0
- package/dist/components/ui/data-table/parts/SortableHeader.d.ts.map +1 -0
- package/dist/components/ui/data-table/parts/TableBody.d.ts +22 -0
- package/dist/components/ui/data-table/parts/TableBody.d.ts.map +1 -0
- package/dist/components/ui/data-table/parts/TableHeader.d.ts +15 -0
- package/dist/components/ui/data-table/parts/TableHeader.d.ts.map +1 -0
- package/dist/components/ui/data-table/toolbar/DataTableToolbar.d.ts +2 -1
- package/dist/components/ui/data-table/toolbar/DataTableToolbar.d.ts.map +1 -1
- package/dist/components/ui/data-table/types.d.ts +61 -11
- package/dist/components/ui/data-table/types.d.ts.map +1 -1
- package/dist/components/ui/data-table/useDragAndDrop.d.ts +23 -0
- package/dist/components/ui/data-table/useDragAndDrop.d.ts.map +1 -0
- package/dist/components/ui/data-table/useTableController.d.ts +24 -1
- package/dist/components/ui/data-table/useTableController.d.ts.map +1 -1
- package/dist/components/ui/data-table/utils.d.ts +2 -0
- package/dist/components/ui/data-table/utils.d.ts.map +1 -1
- package/dist/components/ui/date-picker.d.ts +36 -0
- package/dist/components/ui/date-picker.d.ts.map +1 -0
- package/dist/components/ui/dialog.d.ts +6 -10
- package/dist/components/ui/dialog.d.ts.map +1 -1
- package/dist/components/ui/drawer.d.ts +3 -11
- package/dist/components/ui/drawer.d.ts.map +1 -1
- package/dist/components/ui/dropdown-menu.d.ts +15 -23
- package/dist/components/ui/dropdown-menu.d.ts.map +1 -1
- package/dist/components/ui/hero-metric-card/HeroMetricCard.d.ts +4 -0
- package/dist/components/ui/hero-metric-card/HeroMetricCard.d.ts.map +1 -0
- package/dist/components/ui/hero-metric-card/HeroMetricCardItem.d.ts +4 -0
- package/dist/components/ui/hero-metric-card/HeroMetricCardItem.d.ts.map +1 -0
- package/dist/components/ui/hero-metric-card/constants.d.ts +13 -0
- package/dist/components/ui/hero-metric-card/constants.d.ts.map +1 -0
- package/dist/components/ui/hero-metric-card/grid.d.ts +4 -0
- package/dist/components/ui/hero-metric-card/grid.d.ts.map +1 -0
- package/dist/components/ui/hero-metric-card/hooks.d.ts +6 -0
- package/dist/components/ui/hero-metric-card/hooks.d.ts.map +1 -0
- package/dist/components/ui/hero-metric-card/index.d.ts +5 -0
- package/dist/components/ui/hero-metric-card/index.d.ts.map +1 -0
- package/dist/components/ui/hero-metric-card/parsing.d.ts +11 -0
- package/dist/components/ui/hero-metric-card/parsing.d.ts.map +1 -0
- package/dist/components/ui/hero-metric-card/refs.d.ts +3 -0
- package/dist/components/ui/hero-metric-card/refs.d.ts.map +1 -0
- package/dist/components/ui/hero-metric-card/trend.d.ts +4 -0
- package/dist/components/ui/hero-metric-card/trend.d.ts.map +1 -0
- package/dist/components/ui/hero-metric-card/types.d.ts +60 -0
- package/dist/components/ui/hero-metric-card/types.d.ts.map +1 -0
- package/dist/components/ui/hero-metric-card/utils.d.ts +10 -0
- package/dist/components/ui/hero-metric-card/utils.d.ts.map +1 -0
- package/dist/components/ui/input.d.ts +3 -2
- package/dist/components/ui/input.d.ts.map +1 -1
- package/dist/components/ui/label.d.ts +1 -4
- package/dist/components/ui/label.d.ts.map +1 -1
- package/dist/components/ui/pagination.d.ts +14 -0
- package/dist/components/ui/pagination.d.ts.map +1 -0
- package/dist/components/ui/popover.d.ts +3 -5
- package/dist/components/ui/popover.d.ts.map +1 -1
- package/dist/components/ui/progress.d.ts +2 -1
- package/dist/components/ui/progress.d.ts.map +1 -1
- package/dist/components/ui/radio-group.d.ts +3 -3
- package/dist/components/ui/radio-group.d.ts.map +1 -1
- package/dist/components/ui/select.d.ts +6 -13
- package/dist/components/ui/select.d.ts.map +1 -1
- package/dist/components/ui/separator.d.ts +1 -4
- package/dist/components/ui/separator.d.ts.map +1 -1
- package/dist/components/ui/sheet-banner.d.ts +10 -0
- package/dist/components/ui/sheet-banner.d.ts.map +1 -0
- package/dist/components/ui/sheet.d.ts +18 -9
- package/dist/components/ui/sheet.d.ts.map +1 -1
- package/dist/components/ui/simple-pagination.d.ts +8 -0
- package/dist/components/ui/simple-pagination.d.ts.map +1 -0
- package/dist/components/ui/skeleton.d.ts +1 -3
- package/dist/components/ui/skeleton.d.ts.map +1 -1
- package/dist/components/ui/sonner.d.ts +2 -1
- package/dist/components/ui/sonner.d.ts.map +1 -1
- package/dist/components/ui/spinner-carbide.d.ts +5 -0
- package/dist/components/ui/spinner-carbide.d.ts.map +1 -0
- package/dist/components/ui/spinner.d.ts +2 -0
- package/dist/components/ui/spinner.d.ts.map +1 -0
- package/dist/components/ui/switch.d.ts +1 -1
- package/dist/components/ui/switch.d.ts.map +1 -1
- package/dist/components/ui/table/Table.d.ts.map +1 -1
- package/dist/components/ui/table.d.ts +4 -9
- package/dist/components/ui/table.d.ts.map +1 -1
- package/dist/components/ui/tabs.d.ts +16 -2
- package/dist/components/ui/tabs.d.ts.map +1 -1
- package/dist/components/ui/textarea.d.ts +1 -3
- package/dist/components/ui/textarea.d.ts.map +1 -1
- package/dist/components/ui/toggle.d.ts +1 -9
- package/dist/components/ui/toggle.d.ts.map +1 -1
- package/dist/components/ui/tooltip.d.ts +1 -7
- package/dist/components/ui/tooltip.d.ts.map +1 -1
- package/dist/docs/GETTING_STARTED.md +13 -5
- package/dist/index.d.ts +16 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/lib/mm-react-components.css +1 -0
- package/dist/main.d.ts +1 -2
- package/dist/main.d.ts.map +1 -1
- package/dist/mm-react-components.es.js +8015 -5939
- package/dist/mm-react-components.es.js.map +1 -1
- package/dist/mm-react-components.umd.js +13 -13
- package/dist/mm-react-components.umd.js.map +1 -1
- package/dist/preview/ColorsPreview.d.ts +7 -0
- package/dist/preview/ColorsPreview.d.ts.map +1 -0
- package/dist/preview/CommandPreview.d.ts +2 -0
- package/dist/preview/CommandPreview.d.ts.map +1 -0
- package/dist/preview/DataTablePreview.d.ts +1 -1
- package/dist/preview/DataTablePreview.d.ts.map +1 -1
- package/dist/preview/DatePickerPreview.d.ts +2 -0
- package/dist/preview/DatePickerPreview.d.ts.map +1 -0
- package/dist/preview/DateRangePickerPreview.d.ts.map +1 -1
- package/dist/preview/HeroMetricCardPreview.d.ts +2 -0
- package/dist/preview/HeroMetricCardPreview.d.ts.map +1 -0
- package/dist/preview/PaginationPreview.d.ts +2 -0
- package/dist/preview/PaginationPreview.d.ts.map +1 -0
- package/dist/preview/SheetBannerPreview.d.ts +2 -0
- package/dist/preview/SheetBannerPreview.d.ts.map +1 -0
- package/dist/preview/SheetPreview.d.ts.map +1 -1
- package/dist/preview/SpinnerPreview.d.ts +2 -0
- package/dist/preview/SpinnerPreview.d.ts.map +1 -0
- package/dist/preview/TabsPreview.d.ts.map +1 -1
- package/dist/scripts/chakra-to-shadcn-migrator/chakra-to-shadcn.config.json +577 -0
- package/dist/scripts/chakra-to-shadcn-migrator/lib/args.js +63 -0
- package/dist/scripts/chakra-to-shadcn-migrator/lib/colors.js +14 -0
- package/dist/scripts/chakra-to-shadcn-migrator/lib/config.js +15 -0
- package/dist/scripts/chakra-to-shadcn-migrator/lib/deps.js +125 -0
- package/dist/scripts/chakra-to-shadcn-migrator/lib/file-io.js +44 -0
- package/dist/scripts/chakra-to-shadcn-migrator/lib/render.js +89 -0
- package/dist/scripts/chakra-to-shadcn-migrator/lib/transform.js +550 -0
- package/dist/scripts/chakra-to-shadcn-migrator/package.json +11 -0
- package/dist/scripts/init.cjs +216 -0
- package/dist/scripts/npx-init.cjs +418 -0
- package/dist/tailwind.base.config.js +89 -0
- package/dist/themes/carbide.css +462 -88
- package/package.json +35 -11
- package/src/index.css +111 -489
- package/dist/index.css +0 -527
- package/dist/themes/base.css +0 -536
- package/dist/themes/complete.css +0 -8
- package/scripts/README.md +0 -171
- package/scripts/chakra-to-shadcn-migrator/README.md +0 -107
- package/src/themes/base.css +0 -536
- package/src/themes/carbide.css +0 -1257
- package/src/themes/complete.css +0 -8
- /package/{scripts → dist/scripts}/chakra-to-shadcn-migrator/bin/chakra-to-shadcn.js +0 -0
package/README.md
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
# @machinemetrics/mm-react-components
|
|
2
2
|
|
|
3
|
+
> **🤖 FOR AI AGENTS:** This library has [extensive AI agent documentation](./agent-docs/agent-documentation-reference.md) for setup and Chakra UI migration. See the [`agent-docs/`](./agent-docs/) folder for comprehensive guides.
|
|
4
|
+
|
|
3
5
|
A comprehensive React component library designed specifically for MachineMetrics industrial and manufacturing applications.
|
|
4
6
|
|
|
5
7
|
## Features
|
|
@@ -10,6 +12,7 @@ A comprehensive React component library designed specifically for MachineMetrics
|
|
|
10
12
|
- 🔧 **TypeScript**: Full TypeScript support with comprehensive type definitions
|
|
11
13
|
- ♿ **Accessible**: WCAG 2.1 AA compliant components
|
|
12
14
|
- 🚀 **Performance**: Optimized for real-time data display and monitoring
|
|
15
|
+
- 🤖 **AI-Agent Ready**: [Comprehensive AI agent documentation](./agent-docs/) with automated setup and migration tools
|
|
13
16
|
|
|
14
17
|
## Installation
|
|
15
18
|
|
|
@@ -17,6 +20,37 @@ A comprehensive React component library designed specifically for MachineMetrics
|
|
|
17
20
|
npm install @machinemetrics/mm-react-components
|
|
18
21
|
```
|
|
19
22
|
|
|
23
|
+
**Required Dependencies:**
|
|
24
|
+
|
|
25
|
+
- React 19+
|
|
26
|
+
- React DOM 19+
|
|
27
|
+
|
|
28
|
+
**Optional Dependencies (only if using `/themes/carbide`):**
|
|
29
|
+
|
|
30
|
+
- Tailwind CSS 4.0+
|
|
31
|
+
- PostCSS 8.5+
|
|
32
|
+
- Autoprefixer 10+
|
|
33
|
+
|
|
34
|
+
> 💡 **Note:** When using `/styles` (recommended), no build tools are required! The CSS is fully compiled.
|
|
35
|
+
|
|
36
|
+
## 🤖 For AI Agents
|
|
37
|
+
|
|
38
|
+
**This library has comprehensive documentation for AI-assisted development!**
|
|
39
|
+
|
|
40
|
+
- **New Project Setup:** [`agent-docs/ai-agent-init-guide.md`](./agent-docs/ai-agent-init-guide.md)
|
|
41
|
+
- **Chakra UI Migration:** [`agent-docs/ai-agent-guide.md`](./agent-docs/ai-agent-guide.md)
|
|
42
|
+
- **Component Mappings (83 components):** [`agent-docs/component-mapping-summary.md`](./agent-docs/component-mapping-summary.md)
|
|
43
|
+
- **Full Documentation Index:** [`agent-docs/agent-documentation-reference.md`](./agent-docs/agent-documentation-reference.md)
|
|
44
|
+
|
|
45
|
+
**Automated Tools:**
|
|
46
|
+
|
|
47
|
+
- ✅ Init script: `npx @machinemetrics/mm-react-components init`
|
|
48
|
+
- ✅ Migration script: `npx @machinemetrics/mm-react-components chakra-to-shadcn`
|
|
49
|
+
- ✅ 98% automation rate for Chakra UI conversion
|
|
50
|
+
- ✅ Zero-config setup option (no build tools needed!)
|
|
51
|
+
|
|
52
|
+
---
|
|
53
|
+
|
|
20
54
|
## Quick Start
|
|
21
55
|
|
|
22
56
|
### 🚀 Automated Setup (Recommended)
|
|
@@ -43,13 +77,23 @@ This will automatically:
|
|
|
43
77
|
|
|
44
78
|
If you prefer manual setup:
|
|
45
79
|
|
|
46
|
-
#### 1. Install
|
|
80
|
+
#### 1. Install the Library
|
|
47
81
|
|
|
48
82
|
```bash
|
|
49
|
-
npm install @machinemetrics/mm-react-components
|
|
83
|
+
npm install @machinemetrics/mm-react-components
|
|
50
84
|
```
|
|
51
85
|
|
|
52
|
-
|
|
86
|
+
**Optional:** Only install Tailwind if you want to use `/themes/carbide` instead of `/styles`:
|
|
87
|
+
|
|
88
|
+
```bash
|
|
89
|
+
npm install -D tailwindcss postcss autoprefixer
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
#### 2. (Optional) Configure Tailwind CSS
|
|
93
|
+
|
|
94
|
+
> 💡 Skip this step if using `/styles` - Tailwind configuration is not needed!
|
|
95
|
+
|
|
96
|
+
**Only if using `/themes/carbide`:**
|
|
53
97
|
|
|
54
98
|
```bash
|
|
55
99
|
cp node_modules/@machinemetrics/mm-react-components/tailwind.config.export.js tailwind.config.js
|
|
@@ -57,29 +101,22 @@ cp node_modules/@machinemetrics/mm-react-components/tailwind.config.export.js ta
|
|
|
57
101
|
|
|
58
102
|
Note: The exported config is the main config (no preview-only utilities). The preview app in this repo uses a separate `tailwind.preview.config.js` that imports the main config and adds preview utilities.
|
|
59
103
|
|
|
60
|
-
#### 3. Import
|
|
104
|
+
#### 3. Import Styles
|
|
61
105
|
|
|
62
|
-
|
|
106
|
+
Import the complete styles including Tailwind CSS, base styles, and Carbide theme:
|
|
63
107
|
|
|
64
108
|
```ts
|
|
65
109
|
// In your main entry (e.g., src/main.tsx)
|
|
66
110
|
import '@machinemetrics/mm-react-components/styles';
|
|
67
|
-
import '@machinemetrics/mm-react-components/themes/carbide';
|
|
68
111
|
document.documentElement.classList.add('carbide');
|
|
69
112
|
```
|
|
70
113
|
|
|
71
|
-
|
|
114
|
+
**What's included in `/styles` (118 KB, 18 KB gzipped):**
|
|
72
115
|
|
|
73
|
-
|
|
74
|
-
@import '@machinemetrics/mm-react-components/themes/complete';
|
|
75
|
-
```
|
|
76
|
-
|
|
77
|
-
**What's included:**
|
|
78
|
-
|
|
79
|
-
- ✅ Tailwind CSS reset
|
|
116
|
+
- ✅ Tailwind CSS reset and utilities (compiled)
|
|
80
117
|
- ✅ Base theme variables (OKLCH color system)
|
|
81
118
|
- ✅ Carbide industrial theme
|
|
82
|
-
- ✅ All component styles
|
|
119
|
+
- ✅ All component styles (focus states, rings, borders, etc.)
|
|
83
120
|
- ✅ Dark mode support
|
|
84
121
|
- ✅ Animations and utilities
|
|
85
122
|
|
|
@@ -100,9 +137,18 @@ function App() {
|
|
|
100
137
|
|
|
101
138
|
### 📚 Documentation
|
|
102
139
|
|
|
140
|
+
**For AI Agents:**
|
|
141
|
+
|
|
142
|
+
- [AI Agent Documentation Hub](./agent-docs/agent-documentation-reference.md) - Start here!
|
|
143
|
+
- [Setup Guide for AI Agents](./agent-docs/ai-agent-init-guide.md)
|
|
144
|
+
- [Chakra Migration for AI Agents](./agent-docs/ai-agent-guide.md)
|
|
145
|
+
|
|
146
|
+
**For Developers:**
|
|
147
|
+
|
|
103
148
|
- [Getting Started Guide](./docs/GETTING_STARTED.md) - Complete setup guide
|
|
104
149
|
- [Tailwind Setup Guide](./docs/TAILWIND_SETUP.md) - Detailed configuration
|
|
105
|
-
- [
|
|
150
|
+
- [Chakra Migration Guide](./docs/CHAKRA_MIGRATION_GUIDE.md) - Detailed migration reference
|
|
151
|
+
- [Component Mapping Summary](./docs/COMPONENT_MAPPING_SUMMARY.md) - All 83 component mappings
|
|
106
152
|
|
|
107
153
|
## Theme System
|
|
108
154
|
|
|
@@ -122,24 +168,40 @@ The component library includes a comprehensive theme system with two main themes
|
|
|
122
168
|
- Enhanced component styling for industrial applications
|
|
123
169
|
- Complete dark mode support
|
|
124
170
|
|
|
125
|
-
###
|
|
171
|
+
### Import Options
|
|
172
|
+
|
|
173
|
+
#### Option 1: Complete Styles (Recommended - 118 KB gzipped)
|
|
126
174
|
|
|
127
|
-
|
|
175
|
+
Import everything including Tailwind utilities, theme, and animations:
|
|
128
176
|
|
|
129
177
|
```ts
|
|
130
178
|
import '@machinemetrics/mm-react-components/styles';
|
|
131
|
-
import '@machinemetrics/mm-react-components/themes/carbide';
|
|
132
179
|
document.documentElement.classList.add('carbide');
|
|
133
180
|
```
|
|
134
181
|
|
|
135
|
-
|
|
182
|
+
**Includes:**
|
|
136
183
|
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
184
|
+
- ✅ All Tailwind utilities (compiled)
|
|
185
|
+
- ✅ Carbide theme variables
|
|
186
|
+
- ✅ Component styles with focus states
|
|
187
|
+
- ✅ Dark mode support
|
|
188
|
+
- ✅ Animations
|
|
189
|
+
|
|
190
|
+
#### Option 2: Theme Only (41 KB - if you already have Tailwind)
|
|
191
|
+
|
|
192
|
+
Import just the Carbide theme variables and component overrides:
|
|
193
|
+
|
|
194
|
+
```ts
|
|
195
|
+
import '@machinemetrics/mm-react-components/themes/carbide';
|
|
196
|
+
document.documentElement.classList.add('carbide');
|
|
141
197
|
```
|
|
142
198
|
|
|
199
|
+
**Use this if:**
|
|
200
|
+
|
|
201
|
+
- You already have Tailwind CSS in your project
|
|
202
|
+
- You want to minimize bundle size
|
|
203
|
+
- You're using our components with your own Tailwind config
|
|
204
|
+
|
|
143
205
|
#### Option 3: Use Theme Utilities
|
|
144
206
|
|
|
145
207
|
```tsx
|
|
@@ -250,16 +312,13 @@ This includes:
|
|
|
250
312
|
### Alternative Import Methods
|
|
251
313
|
|
|
252
314
|
```css
|
|
253
|
-
/* Import
|
|
254
|
-
@import '@machinemetrics/mm-react-components/
|
|
255
|
-
|
|
256
|
-
/* Import Carbide theme for industrial styling */
|
|
257
|
-
@import '@machinemetrics/mm-react-components/themes/carbide';
|
|
315
|
+
/* Import complete styles including Carbide theme */
|
|
316
|
+
@import '@machinemetrics/mm-react-components/styles';
|
|
258
317
|
```
|
|
259
318
|
|
|
260
319
|
```tsx
|
|
261
320
|
// Import in JavaScript/TypeScript
|
|
262
|
-
import '@machinemetrics/mm-react-components/
|
|
321
|
+
import '@machinemetrics/mm-react-components/styles';
|
|
263
322
|
```
|
|
264
323
|
|
|
265
324
|
## TypeScript Support
|
|
@@ -0,0 +1,401 @@
|
|
|
1
|
+
# AI Agent Documentation Reference
|
|
2
|
+
|
|
3
|
+
> **🤖 AI AGENT NOTE:** This documentation is designed to be automatically discoverable. AI agents should find this via:
|
|
4
|
+
>
|
|
5
|
+
> - The main `README.md` with prominent AI agent section at the top
|
|
6
|
+
> - This `agent-docs/` folder with descriptive naming
|
|
7
|
+
> - Package.json exports this folder as `./agent-docs`
|
|
8
|
+
|
|
9
|
+
## Library Foundation
|
|
10
|
+
|
|
11
|
+
**@machinemetrics/mm-react-components** is a **traditional npm package** built on **[shadcn/ui](https://ui.shadcn.com/)** components (Radix UI + Tailwind CSS) with the Carbide industrial theme.
|
|
12
|
+
|
|
13
|
+
**What this means for you:**
|
|
14
|
+
|
|
15
|
+
- ✅ **Standard npm install**: `npm install @machinemetrics/mm-react-components`
|
|
16
|
+
- ✅ **Import components**: `import { Button, DataTable } from '@machinemetrics/mm-react-components'`
|
|
17
|
+
- ✅ **Pre-packaged & themed**: All components ready with Carbide industrial design
|
|
18
|
+
- ✅ **Zero-config option**: Pre-compiled CSS included (no build tools required)
|
|
19
|
+
- ✅ **Accessible & typed**: Full TypeScript support with Radix UI accessibility
|
|
20
|
+
|
|
21
|
+
### Key Technologies
|
|
22
|
+
|
|
23
|
+
- **React 19**: Latest React with modern patterns
|
|
24
|
+
- **TypeScript 5**: Strict type safety throughout
|
|
25
|
+
- **Tailwind CSS v4**: Modern CSS-first configuration (pre-compiled in distributed CSS)
|
|
26
|
+
- **Radix UI**: Headless, accessible component primitives
|
|
27
|
+
- **shadcn/ui**: Component foundation and patterns
|
|
28
|
+
- **Carbide**: Industrial design system for manufacturing contexts
|
|
29
|
+
|
|
30
|
+
## Overview
|
|
31
|
+
|
|
32
|
+
This directory contains comprehensive documentation and tools for AI agents working with the MachineMetrics React Components library. The documentation is organized into two main categories: **Initialization Setup** and **Chakra UI Migration**.
|
|
33
|
+
|
|
34
|
+
## Component Quick Reference
|
|
35
|
+
|
|
36
|
+
### Core Components (shadcn/ui based)
|
|
37
|
+
|
|
38
|
+
| Component | Exports | Description |
|
|
39
|
+
| --------------- | ------------------------------ | ----------------------------------------- |
|
|
40
|
+
| **Button** | `Button`, `buttonVariants` | Primary interactive element with variants |
|
|
41
|
+
| **Input** | `Input` | Text input field |
|
|
42
|
+
| **SearchInput** | `SearchInput` | Search-specific input with icon |
|
|
43
|
+
| **Label** | `Label` | Form label component |
|
|
44
|
+
| **Checkbox** | `Checkbox` | Checkbox input |
|
|
45
|
+
| **RadioGroup** | `RadioGroup`, `RadioGroupItem` | Radio button groups |
|
|
46
|
+
| **Switch** | `Switch` | Toggle switch control |
|
|
47
|
+
| **Slider** | `Slider`, `LabeledSlider` | Range slider with optional label |
|
|
48
|
+
| **Toggle** | `Toggle` | Toggle button |
|
|
49
|
+
| **Textarea** | `Textarea` | Multi-line text input |
|
|
50
|
+
|
|
51
|
+
### Layout & Navigation
|
|
52
|
+
|
|
53
|
+
| Component | Exports | Description |
|
|
54
|
+
| -------------- | --------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------- |
|
|
55
|
+
| **Card** | `Card`, `CardHeader`, `CardTitle`, `CardDescription`, `CardContent`, `CardFooter` | Content container with sections |
|
|
56
|
+
| **Separator** | `Separator` | Visual divider |
|
|
57
|
+
| **Tabs** | `Tabs`, `TabsList`, `TabsTrigger`, `TabsContent` | Tabbed interface |
|
|
58
|
+
| **Breadcrumb** | `Breadcrumb`, `BreadcrumbList`, `BreadcrumbItem`, `BreadcrumbLink`, `BreadcrumbPage`, `BreadcrumbSeparator`, `BreadcrumbEllipsis` | Navigation breadcrumbs |
|
|
59
|
+
| **PageHeader** | `PageHeader` (+ types) | Application page header with actions/tabs |
|
|
60
|
+
|
|
61
|
+
### Overlays & Modals
|
|
62
|
+
|
|
63
|
+
| Component | Exports | Description |
|
|
64
|
+
| --------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------- |
|
|
65
|
+
| **Dialog** | `Dialog`, `DialogClose`, `DialogContent`, `DialogDescription`, `DialogFooter`, `DialogHeader`, `DialogOverlay`, `DialogPortal`, `DialogTitle`, `DialogTrigger` | Modal dialog |
|
|
66
|
+
| **AlertDialog** | `AlertDialog`, `AlertDialogPortal`, `AlertDialogOverlay`, `AlertDialogTrigger`, `AlertDialogContent`, `AlertDialogHeader`, `AlertDialogFooter`, `AlertDialogTitle`, `AlertDialogDescription`, `AlertDialogAction`, `AlertDialogCancel` | Confirmation dialog |
|
|
67
|
+
| **Sheet** | `Sheet`, `SheetTrigger`, `SheetClose`, `SheetContent`, `SheetHeader`, `SheetFooter`, `SheetTitle`, `SheetDescription` | Slide-out panel |
|
|
68
|
+
| **Drawer** | `Drawer`, `DrawerTrigger`, `DrawerClose`, `DrawerPortal`, `DrawerOverlay`, `DrawerContent`, `DrawerHeader`, `DrawerFooter`, `DrawerTitle`, `DrawerDescription`, `DrawerHandle` | Bottom drawer (mobile-friendly) |
|
|
69
|
+
| **Popover** | `Popover`, `PopoverTrigger`, `PopoverContent` | Floating content container |
|
|
70
|
+
| **Tooltip** | `Tooltip`, `TooltipTrigger`, `TooltipContent`, `TooltipProvider` | Hover tooltips |
|
|
71
|
+
|
|
72
|
+
### Menus & Dropdowns
|
|
73
|
+
|
|
74
|
+
| Component | Exports | Description |
|
|
75
|
+
| ---------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------- |
|
|
76
|
+
| **DropdownMenu** | `DropdownMenu`, `DropdownMenuPortal`, `DropdownMenuTrigger`, `DropdownMenuContent`, `DropdownMenuGroup`, `DropdownMenuLabel`, `DropdownMenuItem`, `DropdownMenuCheckboxItem`, `DropdownMenuRadioGroup`, `DropdownMenuRadioItem`, `DropdownMenuSeparator`, `DropdownMenuShortcut`, `DropdownMenuSub`, `DropdownMenuSubTrigger`, `DropdownMenuSubContent` | Dropdown menu system |
|
|
77
|
+
| **Select** | `Select`, `SelectContent`, `SelectGroup`, `SelectItem`, `SelectLabel`, `SelectScrollDownButton`, `SelectScrollUpButton`, `SelectSeparator`, `SelectTrigger`, `SelectValue` | Select dropdown |
|
|
78
|
+
|
|
79
|
+
### Data Display
|
|
80
|
+
|
|
81
|
+
| Component | Exports | Description |
|
|
82
|
+
| ------------------ | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------- |
|
|
83
|
+
| **Badge** | `Badge`, `badgeVariants` | Status/label badges |
|
|
84
|
+
| **Avatar** | `Avatar`, `AvatarImage`, `AvatarFallback` | User avatar with fallback |
|
|
85
|
+
| **Alert** | `Alert`, `AlertTitle`, `AlertDescription` | Alert messages |
|
|
86
|
+
| **Table** | `Table`, `TableHeader`, `TableBody`, `TableFooter`, `TableHead`, `TableRow`, `TableCell`, `TableCaption` | Basic table structure |
|
|
87
|
+
| **Skeleton** | `Skeleton` | Loading placeholder |
|
|
88
|
+
| **Progress** | `Progress` | Progress bar |
|
|
89
|
+
| **Spinner** | `Spinner` | Basic loading spinner |
|
|
90
|
+
| **SpinnerCarbide** | `SpinnerCarbide` | Industrial-themed loading spinner with Carbide semantics |
|
|
91
|
+
|
|
92
|
+
### Advanced Components
|
|
93
|
+
|
|
94
|
+
| Component | Exports | Description |
|
|
95
|
+
| ------------------- | --------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- |
|
|
96
|
+
| **DataTable** | `DataTable`, `DataTablePagination`, `ResponsiveTable`, `TABLE_TOKENS`, column creators, hooks, toolbar, CSV export (+ types) | Full-featured data table with sorting, filtering, pagination (client-side & server-side) |
|
|
97
|
+
| **HeroMetricCard** | `HeroMetricCard`, `HeroMetricCardItem` (+ types) | Metrics dashboard card with trends |
|
|
98
|
+
| **Calendar** | `Calendar` | Date picker calendar |
|
|
99
|
+
| **DatePicker** | `DatePicker` | Single date selection with label and placeholder |
|
|
100
|
+
| **DateRangePicker** | `DateRangePicker` | Date range selection |
|
|
101
|
+
| **Dropzone** | `Dropzone`, `DropzoneContent`, `DropzoneEmptyState` | File upload drag-drop |
|
|
102
|
+
| **Chart** | `ChartContainer`, `ChartTooltip`, `ChartTooltipContent`, `ChartLegend`, `ChartLegendContent`, `ChartStyle` (+ `ChartConfig` type) | Recharts integration |
|
|
103
|
+
|
|
104
|
+
### Interactive Elements
|
|
105
|
+
|
|
106
|
+
| Component | Exports | Description |
|
|
107
|
+
| --------------- | ------------------------------------------------------------------------------------------------------------- | ---------------------------- |
|
|
108
|
+
| **Accordion** | `Accordion`, `AccordionItem`, `AccordionTrigger`, `AccordionContent` | Collapsible sections |
|
|
109
|
+
| **Collapsible** | `Collapsible`, `CollapsibleTrigger`, `CollapsibleContent` | Simple collapse/expand |
|
|
110
|
+
| **Form** | `useFormField`, `Form`, `FormItem`, `FormLabel`, `FormControl`, `FormDescription`, `FormMessage`, `FormField` | React Hook Form integration |
|
|
111
|
+
| **Toaster** | `Toaster` | Toast notifications (Sonner) |
|
|
112
|
+
|
|
113
|
+
### Utilities
|
|
114
|
+
|
|
115
|
+
| Export | Description |
|
|
116
|
+
| --------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
117
|
+
| `cn` | Class name utility for merging Tailwind classes |
|
|
118
|
+
| **Theme Utils** | `activateCarbideTheme`, `deactivateCarbideTheme`, `toggleCarbideTheme`, `isCarbideThemeActive`, `activateDarkMode`, `deactivateDarkMode`, `toggleDarkMode`, `isDarkModeActive` |
|
|
119
|
+
|
|
120
|
+
### Total: 42+ Components
|
|
121
|
+
|
|
122
|
+
All components follow shadcn/ui patterns with Carbide theme integration for industrial/manufacturing contexts.
|
|
123
|
+
|
|
124
|
+
## Component Usage Guides
|
|
125
|
+
|
|
126
|
+
### DataTable: Server-Side Pagination
|
|
127
|
+
|
|
128
|
+
The `DataTable` component supports both client-side and server-side pagination. When implementing server-side pagination, use the following pattern:
|
|
129
|
+
|
|
130
|
+
**Key Props for Server-Side Pagination:**
|
|
131
|
+
|
|
132
|
+
- `manualPagination={true}` - Enables server-side pagination mode
|
|
133
|
+
- `pageCount={number}` - **Required** when `manualPagination` is true. Total number of pages from server
|
|
134
|
+
- `totalRowCount={number}` - **Recommended** for accurate display. Total rows across all pages
|
|
135
|
+
- `onPaginationChange={(pageIndex, pageSize) => void}` - Callback to fetch new page data
|
|
136
|
+
|
|
137
|
+
**Implementation Pattern:**
|
|
138
|
+
|
|
139
|
+
```tsx
|
|
140
|
+
<DataTable
|
|
141
|
+
columns={columns}
|
|
142
|
+
data={currentPageData} // Only current page's data
|
|
143
|
+
manualPagination={true}
|
|
144
|
+
pageCount={totalPages} // From server response
|
|
145
|
+
totalRowCount={totalRows} // From server response (recommended)
|
|
146
|
+
onPaginationChange={(pageIndex, pageSize) => {
|
|
147
|
+
// Fetch new page from server
|
|
148
|
+
fetchPage(pageIndex, pageSize);
|
|
149
|
+
}}
|
|
150
|
+
/>
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
**Important Notes for AI Agents:**
|
|
154
|
+
|
|
155
|
+
1. When `manualPagination` is true, the `data` prop should contain **only the current page's data**, not all data
|
|
156
|
+
2. `pageCount` is required when using server-side pagination
|
|
157
|
+
3. `totalRowCount` is recommended for accurate "Showing X to Y of Z items" display
|
|
158
|
+
4. The component automatically handles edge cases (empty data, partial last page, etc.)
|
|
159
|
+
5. See component README at `src/components/ui/data-table/README.md` for detailed examples
|
|
160
|
+
|
|
161
|
+
## Directory Structure
|
|
162
|
+
|
|
163
|
+
```
|
|
164
|
+
agent-docs/
|
|
165
|
+
├── agent-documentation-reference.md # This reference file
|
|
166
|
+
├── ai-agent-init-guide.md # Main init setup guide
|
|
167
|
+
├── setup-reference.md # Detailed setup reference
|
|
168
|
+
├── init-troubleshooting.md # Init setup troubleshooting
|
|
169
|
+
├── init-readme.md # Init setup overview
|
|
170
|
+
├── ai-agent-guide.md # Chakra migration guide
|
|
171
|
+
├── component-mapping-reference.md # Chakra migration reference
|
|
172
|
+
├── chakra-migration-troubleshooting.md # Chakra migration troubleshooting
|
|
173
|
+
└── chakra-migration-readme.md # Chakra migration overview
|
|
174
|
+
```
|
|
175
|
+
|
|
176
|
+
## Documentation Categories
|
|
177
|
+
|
|
178
|
+
### 1. Initialization Setup Documentation
|
|
179
|
+
|
|
180
|
+
#### **ai-agent-init-guide.md**
|
|
181
|
+
|
|
182
|
+
- **Purpose**: Comprehensive guide for AI agents on library setup
|
|
183
|
+
- **Use Case**: When AI agents need to initialize the MachineMetrics React Components library
|
|
184
|
+
- **Key Features**:
|
|
185
|
+
- Zero-config setup (no build tools required)
|
|
186
|
+
- Automated setup procedures
|
|
187
|
+
- Framework-specific instructions (React, Next.js, Vite)
|
|
188
|
+
- Troubleshooting guidance
|
|
189
|
+
- Validation checklists
|
|
190
|
+
- **Target Audience**: AI agents performing automated setup
|
|
191
|
+
- **When to Use**: Primary resource for init script setup
|
|
192
|
+
|
|
193
|
+
#### **setup-reference.md**
|
|
194
|
+
|
|
195
|
+
- **Purpose**: Detailed reference for setup procedures
|
|
196
|
+
- **Use Case**: When AI agents need specific technical details about setup
|
|
197
|
+
- **Key Features**:
|
|
198
|
+
- Complete dependency list
|
|
199
|
+
- Configuration file templates
|
|
200
|
+
- Framework-specific setup instructions
|
|
201
|
+
- Component usage patterns
|
|
202
|
+
- Performance optimization
|
|
203
|
+
- **Target Audience**: AI agents needing technical reference
|
|
204
|
+
- **When to Use**: Technical reference during setup or troubleshooting
|
|
205
|
+
|
|
206
|
+
#### **init-troubleshooting.md**
|
|
207
|
+
|
|
208
|
+
- **Purpose**: Common issues and solutions for init script problems
|
|
209
|
+
- **Use Case**: When the init script fails or encounters issues
|
|
210
|
+
- **Key Features**:
|
|
211
|
+
- Script execution issues
|
|
212
|
+
- Dependency installation problems
|
|
213
|
+
- Configuration issues
|
|
214
|
+
- Build and runtime problems
|
|
215
|
+
- Framework-specific troubleshooting
|
|
216
|
+
- **Target Audience**: AI agents debugging setup issues
|
|
217
|
+
- **When to Use**: When automated setup fails or encounters errors
|
|
218
|
+
|
|
219
|
+
#### **init-readme.md**
|
|
220
|
+
|
|
221
|
+
- **Purpose**: Overview and usage instructions for init setup
|
|
222
|
+
- **Use Case**: Quick reference for init setup process
|
|
223
|
+
- **Key Features**:
|
|
224
|
+
- Quick start instructions
|
|
225
|
+
- File descriptions
|
|
226
|
+
- Usage examples
|
|
227
|
+
- Validation steps
|
|
228
|
+
- **Target Audience**: AI agents needing quick overview
|
|
229
|
+
- **When to Use**: Initial understanding of init setup process
|
|
230
|
+
|
|
231
|
+
### 2. Chakra UI Migration Documentation
|
|
232
|
+
|
|
233
|
+
#### **ai-agent-guide.md**
|
|
234
|
+
|
|
235
|
+
- **Purpose**: Comprehensive guide for AI agents on Chakra UI to MachineMetrics migration
|
|
236
|
+
- **Use Case**: When AI agents need to migrate existing Chakra UI components
|
|
237
|
+
- **Key Features**:
|
|
238
|
+
- Automated migration procedures
|
|
239
|
+
- Manual conversion steps
|
|
240
|
+
- Component mapping instructions
|
|
241
|
+
- Icon migration guidance
|
|
242
|
+
- Validation checklists
|
|
243
|
+
- **Target Audience**: AI agents performing Chakra UI migration
|
|
244
|
+
- **When to Use**: Primary resource for Chakra UI migration
|
|
245
|
+
|
|
246
|
+
#### **component-mapping-reference.md**
|
|
247
|
+
|
|
248
|
+
- **Purpose**: Detailed reference of component mappings for Chakra UI migration
|
|
249
|
+
- **Use Case**: When AI agents need specific component mapping information
|
|
250
|
+
- **Key Features**:
|
|
251
|
+
- Complete component mapping tables
|
|
252
|
+
- Prop mapping references
|
|
253
|
+
- Styling conversion guides
|
|
254
|
+
- Icon mapping tables
|
|
255
|
+
- Migration patterns
|
|
256
|
+
- **Target Audience**: AI agents needing component mapping details
|
|
257
|
+
- **When to Use**: Technical reference during Chakra UI migration
|
|
258
|
+
|
|
259
|
+
#### **chakra-migration-troubleshooting.md**
|
|
260
|
+
|
|
261
|
+
- **Purpose**: Common issues and solutions for Chakra UI migration problems
|
|
262
|
+
- **Use Case**: When Chakra UI migration encounters issues
|
|
263
|
+
- **Key Features**:
|
|
264
|
+
- Import errors and solutions
|
|
265
|
+
- Theme and styling issues
|
|
266
|
+
- Layout problems
|
|
267
|
+
- API changes
|
|
268
|
+
- Icon issues
|
|
269
|
+
- Form component problems
|
|
270
|
+
- **Target Audience**: AI agents debugging migration issues
|
|
271
|
+
- **When to Use**: When Chakra UI migration fails or encounters errors
|
|
272
|
+
|
|
273
|
+
#### **chakra-migration-readme.md**
|
|
274
|
+
|
|
275
|
+
- **Purpose**: Overview and usage instructions for Chakra UI migration
|
|
276
|
+
- **Use Case**: Quick reference for Chakra UI migration process
|
|
277
|
+
- **Key Features**:
|
|
278
|
+
- Migration overview
|
|
279
|
+
- File descriptions
|
|
280
|
+
- Usage examples
|
|
281
|
+
- Troubleshooting tips
|
|
282
|
+
- **Target Audience**: AI agents needing quick migration overview
|
|
283
|
+
- **When to Use**: Initial understanding of Chakra UI migration process
|
|
284
|
+
|
|
285
|
+
## Usage Patterns
|
|
286
|
+
|
|
287
|
+
### For AI Agents
|
|
288
|
+
|
|
289
|
+
#### **Initialization Setup Workflow**
|
|
290
|
+
|
|
291
|
+
1. **Start with**: `ai-agent-init-guide.md` for comprehensive setup instructions
|
|
292
|
+
2. **Reference**: `setup-reference.md` for technical details
|
|
293
|
+
3. **Troubleshoot**: `init-troubleshooting.md` if issues arise
|
|
294
|
+
4. **Overview**: `init-readme.md` for quick reference
|
|
295
|
+
|
|
296
|
+
#### **Chakra UI Migration Workflow**
|
|
297
|
+
|
|
298
|
+
1. **Start with**: `ai-agent-guide.md` for comprehensive migration instructions
|
|
299
|
+
2. **Reference**: `component-mapping-reference.md` for component details
|
|
300
|
+
3. **Troubleshoot**: `chakra-migration-troubleshooting.md` if issues arise
|
|
301
|
+
4. **Overview**: `chakra-migration-readme.md` for quick reference
|
|
302
|
+
|
|
303
|
+
### For Developers
|
|
304
|
+
|
|
305
|
+
#### **Quick Start**
|
|
306
|
+
|
|
307
|
+
- Use `init-readme.md` for setup overview
|
|
308
|
+
- Use `chakra-migration-readme.md` for migration overview
|
|
309
|
+
|
|
310
|
+
#### **Detailed Implementation**
|
|
311
|
+
|
|
312
|
+
- Use `ai-agent-init-guide.md` for setup implementation
|
|
313
|
+
- Use `ai-agent-guide.md` for migration implementation
|
|
314
|
+
|
|
315
|
+
#### **Troubleshooting**
|
|
316
|
+
|
|
317
|
+
- Use `init-troubleshooting.md` for setup issues
|
|
318
|
+
- Use `chakra-migration-troubleshooting.md` for migration issues
|
|
319
|
+
|
|
320
|
+
## File Relationships
|
|
321
|
+
|
|
322
|
+
### **Init Setup Files**
|
|
323
|
+
|
|
324
|
+
```
|
|
325
|
+
ai-agent-init-guide.md (main guide)
|
|
326
|
+
├── setup-reference.md (technical reference)
|
|
327
|
+
├── init-troubleshooting.md (issue resolution)
|
|
328
|
+
└── init-readme.md (overview)
|
|
329
|
+
```
|
|
330
|
+
|
|
331
|
+
### **Chakra Migration Files**
|
|
332
|
+
|
|
333
|
+
```
|
|
334
|
+
ai-agent-guide.md (main guide)
|
|
335
|
+
├── component-mapping-reference.md (technical reference)
|
|
336
|
+
├── chakra-migration-troubleshooting.md (issue resolution)
|
|
337
|
+
└── chakra-migration-readme.md (overview)
|
|
338
|
+
```
|
|
339
|
+
|
|
340
|
+
## Package.json Exports
|
|
341
|
+
|
|
342
|
+
The following files are exported via package.json for AI agent access:
|
|
343
|
+
|
|
344
|
+
### **Init Setup Exports**
|
|
345
|
+
|
|
346
|
+
- `./init/guide` → `ai-agent-init-guide.md`
|
|
347
|
+
- `./init/reference` → `setup-reference.md`
|
|
348
|
+
- `./init/troubleshooting` → `init-troubleshooting.md`
|
|
349
|
+
- `./init/readme` → `init-readme.md`
|
|
350
|
+
|
|
351
|
+
### **Chakra Migration Exports**
|
|
352
|
+
|
|
353
|
+
- `./migration/config` → `chakra-to-shadcn.config.json`
|
|
354
|
+
- `./migration/guide` → `ai-agent-guide.md`
|
|
355
|
+
- `./migration/reference` → `component-mapping-reference.md`
|
|
356
|
+
- `./migration/troubleshooting` → `chakra-migration-troubleshooting.md`
|
|
357
|
+
- `./migration/readme` → `chakra-migration-readme.md`
|
|
358
|
+
|
|
359
|
+
## Best Practices
|
|
360
|
+
|
|
361
|
+
### **For AI Agents**
|
|
362
|
+
|
|
363
|
+
1. **Always start with the main guide** for comprehensive instructions
|
|
364
|
+
2. **Use reference files** for technical details and specific information
|
|
365
|
+
3. **Check troubleshooting guides** when issues arise
|
|
366
|
+
4. **Use fallback scripts** when automated tools fail
|
|
367
|
+
5. **Validate setup** using provided checklists
|
|
368
|
+
|
|
369
|
+
### **For Documentation Maintenance**
|
|
370
|
+
|
|
371
|
+
1. **Keep guides updated** with new components and features
|
|
372
|
+
2. **Update troubleshooting guides** with new issues and solutions
|
|
373
|
+
3. **Maintain reference files** with current dependency versions
|
|
374
|
+
4. **Test fallback scripts** regularly to ensure they work
|
|
375
|
+
5. **Update package.json exports** when adding new files
|
|
376
|
+
|
|
377
|
+
## Support and Resources
|
|
378
|
+
|
|
379
|
+
### **Documentation**
|
|
380
|
+
|
|
381
|
+
- [Component Library Docs](https://components.machinemetrics.com)
|
|
382
|
+
- [API Reference](https://components.machinemetrics.com/api)
|
|
383
|
+
- [Getting Started Guide](https://components.machinemetrics.com/getting-started)
|
|
384
|
+
|
|
385
|
+
### **Community Support**
|
|
386
|
+
|
|
387
|
+
- [GitHub Issues](https://github.com/machinemetrics/mm-react-components/issues)
|
|
388
|
+
- [Discord Community](https://discord.gg/machinemetrics)
|
|
389
|
+
- [Stack Overflow](https://stackoverflow.com/questions/tagged/machinemetrics)
|
|
390
|
+
|
|
391
|
+
### **Professional Support**
|
|
392
|
+
|
|
393
|
+
- [MachineMetrics Support](https://support.machinemetrics.com)
|
|
394
|
+
- [Enterprise Support](https://enterprise.machinemetrics.com)
|
|
395
|
+
- [Consulting Services](https://consulting.machinemetrics.com)
|
|
396
|
+
|
|
397
|
+
## Conclusion
|
|
398
|
+
|
|
399
|
+
This documentation reference provides a comprehensive overview of all AI agent documentation and tools available for the MachineMetrics React Components library. Use this as a guide to understand which files to use for specific tasks and how they relate to each other.
|
|
400
|
+
|
|
401
|
+
For AI agents, this reference ensures you have access to all necessary documentation and tools to successfully set up and migrate components. For developers, this reference provides a clear understanding of the available resources and how to use them effectively.
|