@machinemetrics/mm-react-components 0.2.0 → 0.2.3-1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +73 -25
- package/dist/App.d.ts.map +1 -1
- package/dist/README.md +266 -0
- package/dist/components/ui/accordion.d.ts +10 -0
- package/dist/components/ui/accordion.d.ts.map +1 -0
- package/dist/components/ui/badge.d.ts +10 -0
- package/dist/components/ui/badge.d.ts.map +1 -0
- package/dist/components/ui/button.d.ts +4 -16
- package/dist/components/ui/button.d.ts.map +1 -1
- package/dist/components/ui/calendar.d.ts +9 -0
- package/dist/components/ui/calendar.d.ts.map +1 -0
- package/dist/components/ui/checkbox.d.ts +0 -12
- package/dist/components/ui/checkbox.d.ts.map +1 -1
- package/dist/components/ui/collapsible.d.ts +7 -0
- package/dist/components/ui/collapsible.d.ts.map +1 -0
- package/dist/components/ui/data-table/TableView.d.ts +3 -0
- package/dist/components/ui/data-table/TableView.d.ts.map +1 -0
- package/dist/components/ui/data-table/cards/ResponsiveTable.d.ts +10 -0
- package/dist/components/ui/data-table/cards/ResponsiveTable.d.ts.map +1 -0
- package/dist/components/ui/data-table/cards/RowCard.d.ts +9 -0
- package/dist/components/ui/data-table/cards/RowCard.d.ts.map +1 -0
- package/dist/components/ui/data-table/cards/index.d.ts +2 -0
- package/dist/components/ui/data-table/cards/index.d.ts.map +1 -0
- package/dist/components/ui/data-table/columnTypes/badgeColumn.d.ts +16 -0
- package/dist/components/ui/data-table/columnTypes/badgeColumn.d.ts.map +1 -0
- package/dist/components/ui/data-table/columnTypes/createColumn.d.ts +8 -0
- package/dist/components/ui/data-table/columnTypes/createColumn.d.ts.map +1 -0
- package/dist/components/ui/data-table/columnTypes/dateColumn.d.ts +13 -0
- package/dist/components/ui/data-table/columnTypes/dateColumn.d.ts.map +1 -0
- package/dist/components/ui/data-table/columnTypes/index.d.ts +8 -0
- package/dist/components/ui/data-table/columnTypes/index.d.ts.map +1 -0
- package/dist/components/ui/data-table/columnTypes/multiBadgeColumn.d.ts +16 -0
- package/dist/components/ui/data-table/columnTypes/multiBadgeColumn.d.ts.map +1 -0
- package/dist/components/ui/data-table/columnTypes/numericColumn.d.ts +15 -0
- package/dist/components/ui/data-table/columnTypes/numericColumn.d.ts.map +1 -0
- package/dist/components/ui/data-table/columnTypes/selectionColumn.d.ts +10 -0
- package/dist/components/ui/data-table/columnTypes/selectionColumn.d.ts.map +1 -0
- package/dist/components/ui/data-table/columnTypes/textColumn.d.ts +13 -0
- package/dist/components/ui/data-table/columnTypes/textColumn.d.ts.map +1 -0
- package/dist/components/ui/data-table/index.d.ts +14 -0
- package/dist/components/ui/data-table/index.d.ts.map +1 -0
- package/dist/components/ui/data-table/metadata/ColumnRegistry.d.ts +90 -0
- package/dist/components/ui/data-table/metadata/ColumnRegistry.d.ts.map +1 -0
- package/dist/components/ui/data-table/metadata/alignment.d.ts +8 -0
- package/dist/components/ui/data-table/metadata/alignment.d.ts.map +1 -0
- package/dist/components/ui/data-table/pagination.d.ts +9 -0
- package/dist/components/ui/data-table/pagination.d.ts.map +1 -0
- package/dist/components/ui/data-table/state/index.d.ts +3 -0
- package/dist/components/ui/data-table/state/index.d.ts.map +1 -0
- package/dist/components/ui/data-table/state/useBreakpoint.d.ts +2 -0
- package/dist/components/ui/data-table/state/useBreakpoint.d.ts.map +1 -0
- package/dist/components/ui/data-table/state/useDataTableState.d.ts +19 -0
- package/dist/components/ui/data-table/state/useDataTableState.d.ts.map +1 -0
- package/dist/components/ui/data-table/tokens.d.ts +10 -0
- package/dist/components/ui/data-table/tokens.d.ts.map +1 -0
- package/dist/components/ui/data-table/toolbar/ColumnVisibilityMenu.d.ts +8 -0
- package/dist/components/ui/data-table/toolbar/ColumnVisibilityMenu.d.ts.map +1 -0
- package/dist/components/ui/data-table/toolbar/DataTableToolbar.d.ts +15 -0
- package/dist/components/ui/data-table/toolbar/DataTableToolbar.d.ts.map +1 -0
- package/dist/components/ui/data-table/toolbar/MenuHeader.d.ts +8 -0
- package/dist/components/ui/data-table/toolbar/MenuHeader.d.ts.map +1 -0
- package/dist/components/ui/data-table/toolbar/SortMenu.d.ts +7 -0
- package/dist/components/ui/data-table/toolbar/SortMenu.d.ts.map +1 -0
- package/dist/components/ui/data-table/toolbar/filters/DateRangeFilter.d.ts +5 -0
- package/dist/components/ui/data-table/toolbar/filters/DateRangeFilter.d.ts.map +1 -0
- package/dist/components/ui/data-table/toolbar/filters/FilterMenu.d.ts +10 -0
- package/dist/components/ui/data-table/toolbar/filters/FilterMenu.d.ts.map +1 -0
- package/dist/components/ui/data-table/toolbar/filters/InlineDateRangePicker.d.ts +10 -0
- package/dist/components/ui/data-table/toolbar/filters/InlineDateRangePicker.d.ts.map +1 -0
- package/dist/components/ui/data-table/toolbar/filters/NumericRangeFilter.d.ts +5 -0
- package/dist/components/ui/data-table/toolbar/filters/NumericRangeFilter.d.ts.map +1 -0
- package/dist/components/ui/data-table/toolbar/filters/SelectFilter.d.ts +6 -0
- package/dist/components/ui/data-table/toolbar/filters/SelectFilter.d.ts.map +1 -0
- package/dist/components/ui/data-table/toolbar/filters/TextFilter.d.ts +5 -0
- package/dist/components/ui/data-table/toolbar/filters/TextFilter.d.ts.map +1 -0
- package/dist/components/ui/data-table/toolbar/filters/index.d.ts +9 -0
- package/dist/components/ui/data-table/toolbar/filters/index.d.ts.map +1 -0
- package/dist/components/ui/data-table/toolbar/filters/types.d.ts +26 -0
- package/dist/components/ui/data-table/toolbar/filters/types.d.ts.map +1 -0
- package/dist/components/ui/data-table/toolbar/filters/useColumnFilters.d.ts +5 -0
- package/dist/components/ui/data-table/toolbar/filters/useColumnFilters.d.ts.map +1 -0
- package/dist/components/ui/data-table/toolbar/index.d.ts +5 -0
- package/dist/components/ui/data-table/toolbar/index.d.ts.map +1 -0
- package/dist/components/ui/data-table/types.d.ts +40 -0
- package/dist/components/ui/data-table/types.d.ts.map +1 -0
- package/dist/components/ui/data-table/useTableController.d.ts +29 -0
- package/dist/components/ui/data-table/useTableController.d.ts.map +1 -0
- package/dist/components/ui/data-table/utils.d.ts +3 -0
- package/dist/components/ui/data-table/utils.d.ts.map +1 -0
- package/dist/components/ui/date-range-picker.d.ts +9 -0
- package/dist/components/ui/date-range-picker.d.ts.map +1 -0
- package/dist/components/ui/dialog.d.ts +16 -0
- package/dist/components/ui/dialog.d.ts.map +1 -0
- package/dist/components/ui/drawer.d.ts +16 -0
- package/dist/components/ui/drawer.d.ts.map +1 -0
- package/dist/components/ui/dropdown-menu.d.ts +28 -0
- package/dist/components/ui/dropdown-menu.d.ts.map +1 -0
- package/dist/components/ui/dropzone/index.d.ts +25 -0
- package/dist/components/ui/dropzone/index.d.ts.map +1 -0
- package/dist/components/ui/input.d.ts +2 -15
- package/dist/components/ui/input.d.ts.map +1 -1
- package/dist/components/ui/label.d.ts +0 -9
- package/dist/components/ui/label.d.ts.map +1 -1
- package/dist/components/ui/page-header/index.d.ts +3 -0
- package/dist/components/ui/page-header/index.d.ts.map +1 -0
- package/dist/components/ui/page-header/page-header-types.d.ts +44 -0
- package/dist/components/ui/page-header/page-header-types.d.ts.map +1 -0
- package/dist/components/ui/page-header/page-header.d.ts +5 -0
- package/dist/components/ui/page-header/page-header.d.ts.map +1 -0
- package/dist/components/ui/popover.d.ts +8 -0
- package/dist/components/ui/popover.d.ts.map +1 -0
- package/dist/components/ui/progress.d.ts +5 -0
- package/dist/components/ui/progress.d.ts.map +1 -0
- package/dist/components/ui/radio-group.d.ts +0 -19
- package/dist/components/ui/radio-group.d.ts.map +1 -1
- package/dist/components/ui/search-input.d.ts +7 -0
- package/dist/components/ui/search-input.d.ts.map +1 -0
- package/dist/components/ui/select.d.ts +16 -0
- package/dist/components/ui/select.d.ts.map +1 -0
- package/dist/components/ui/sheet.d.ts +14 -0
- package/dist/components/ui/sheet.d.ts.map +1 -0
- package/dist/components/ui/skeleton.d.ts +4 -0
- package/dist/components/ui/skeleton.d.ts.map +1 -0
- package/dist/components/ui/slider.d.ts +15 -0
- package/dist/components/ui/slider.d.ts.map +1 -0
- package/dist/components/ui/switch.d.ts +5 -0
- package/dist/components/ui/switch.d.ts.map +1 -0
- package/dist/components/ui/table/Table.d.ts +21 -0
- package/dist/components/ui/table/Table.d.ts.map +1 -0
- package/dist/components/ui/table/index.d.ts +2 -0
- package/dist/components/ui/table/index.d.ts.map +1 -0
- package/dist/components/ui/table.d.ts +11 -0
- package/dist/components/ui/table.d.ts.map +1 -0
- package/dist/components/ui/tabs.d.ts +15 -0
- package/dist/components/ui/tabs.d.ts.map +1 -0
- package/dist/components/ui/toggle.d.ts +10 -0
- package/dist/components/ui/toggle.d.ts.map +1 -0
- package/dist/components/ui/tooltip.d.ts +8 -0
- package/dist/components/ui/tooltip.d.ts.map +1 -0
- package/dist/docs/TAILWIND_SETUP.md +339 -0
- package/dist/index.css +536 -0
- package/dist/index.d.ts +26 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/lib/page-header-utils.d.ts +2 -0
- package/dist/lib/page-header-utils.d.ts.map +1 -0
- package/dist/mm-react-components.es.js +30238 -1350
- package/dist/mm-react-components.es.js.map +1 -1
- package/dist/mm-react-components.umd.js +41 -6
- package/dist/mm-react-components.umd.js.map +1 -1
- package/dist/preview/AccordionPreview.d.ts +2 -0
- package/dist/preview/AccordionPreview.d.ts.map +1 -0
- package/dist/preview/BadgePreview.d.ts +2 -0
- package/dist/preview/BadgePreview.d.ts.map +1 -0
- package/dist/preview/CalendarPreview.d.ts +2 -0
- package/dist/preview/CalendarPreview.d.ts.map +1 -0
- package/dist/preview/CollapsiblePreview.d.ts +2 -0
- package/dist/preview/CollapsiblePreview.d.ts.map +1 -0
- package/dist/preview/DataTablePreview.d.ts +9 -0
- package/dist/preview/DataTablePreview.d.ts.map +1 -0
- package/dist/preview/DateRangePickerPreview.d.ts +2 -0
- package/dist/preview/DateRangePickerPreview.d.ts.map +1 -0
- package/dist/preview/DialogPreview.d.ts +2 -0
- package/dist/preview/DialogPreview.d.ts.map +1 -0
- package/dist/preview/DrawerPreview.d.ts +2 -0
- package/dist/preview/DrawerPreview.d.ts.map +1 -0
- package/dist/preview/DropdownMenuPreview.d.ts +2 -0
- package/dist/preview/DropdownMenuPreview.d.ts.map +1 -0
- package/dist/preview/DropzonePreview.d.ts +2 -0
- package/dist/preview/DropzonePreview.d.ts.map +1 -0
- package/dist/preview/InputPreview.d.ts.map +1 -1
- package/dist/preview/PopoverPreview.d.ts +2 -0
- package/dist/preview/PopoverPreview.d.ts.map +1 -0
- package/dist/preview/ProgressPreview.d.ts +2 -0
- package/dist/preview/ProgressPreview.d.ts.map +1 -0
- package/dist/preview/SelectPreview.d.ts +2 -0
- package/dist/preview/SelectPreview.d.ts.map +1 -0
- package/dist/preview/SheetPreview.d.ts +2 -0
- package/dist/preview/SheetPreview.d.ts.map +1 -0
- package/dist/preview/SkeletonPreview.d.ts +2 -0
- package/dist/preview/SkeletonPreview.d.ts.map +1 -0
- package/dist/preview/SliderPreview.d.ts +2 -0
- package/dist/preview/SliderPreview.d.ts.map +1 -0
- package/dist/preview/SwitchPreview.d.ts +2 -0
- package/dist/preview/SwitchPreview.d.ts.map +1 -0
- package/dist/preview/TablePreview.d.ts +2 -0
- package/dist/preview/TablePreview.d.ts.map +1 -0
- package/dist/preview/TabsPreview.d.ts +2 -0
- package/dist/preview/TabsPreview.d.ts.map +1 -0
- package/dist/preview/TogglePreview.d.ts +2 -0
- package/dist/preview/TogglePreview.d.ts.map +1 -0
- package/dist/preview/TooltipPreview.d.ts +2 -0
- package/dist/preview/TooltipPreview.d.ts.map +1 -0
- package/dist/preview/data-table/data-table-preview_column-content.d.ts +18 -0
- package/dist/preview/data-table/data-table-preview_column-content.d.ts.map +1 -0
- package/dist/preview/page-header/PageHeaderPreview.d.ts +3 -0
- package/dist/preview/page-header/PageHeaderPreview.d.ts.map +1 -0
- package/dist/tailwind.config.export.js +153 -0
- package/dist/themes/carbide.css +1257 -0
- package/dist/themes/complete.css +8 -0
- package/docs/TAILWIND_SETUP.md +339 -0
- package/package.json +38 -5
- package/scripts/README.md +171 -0
- package/scripts/chakra-to-shadcn-migrator/README.md +107 -0
- package/scripts/chakra-to-shadcn-migrator/bin/chakra-to-shadcn.js +1135 -0
- package/src/index.css +536 -0
- package/src/themes/carbide.css +1257 -0
- package/src/themes/complete.css +8 -0
- package/tailwind.config.export.js +153 -0
package/README.md
CHANGED
|
@@ -19,20 +19,55 @@ npm install @machinemetrics/mm-react-components
|
|
|
19
19
|
|
|
20
20
|
## Quick Start
|
|
21
21
|
|
|
22
|
+
### 1. Install Dependencies
|
|
23
|
+
|
|
24
|
+
```bash
|
|
25
|
+
npm install @machinemetrics/mm-react-components tailwindcss postcss autoprefixer
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
### 2. Configure Tailwind CSS
|
|
29
|
+
|
|
30
|
+
Copy the Tailwind configuration to your project:
|
|
31
|
+
|
|
32
|
+
```bash
|
|
33
|
+
cp node_modules/@machinemetrics/mm-react-components/tailwind.config.export.js tailwind.config.js
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
### 3. Import Complete Theme (Recommended)
|
|
37
|
+
|
|
38
|
+
```css
|
|
39
|
+
/* In your main CSS file - one import gets everything! */
|
|
40
|
+
@import '@machinemetrics/mm-react-components/themes/complete';
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
**That's it!** This single import includes:
|
|
44
|
+
|
|
45
|
+
- ✅ Tailwind CSS reset
|
|
46
|
+
- ✅ Base theme variables (OKLCH color system)
|
|
47
|
+
- ✅ Carbide industrial theme
|
|
48
|
+
- ✅ All component styles
|
|
49
|
+
- ✅ Dark mode support
|
|
50
|
+
- ✅ Animations and utilities
|
|
51
|
+
|
|
52
|
+
### 4. Use Components
|
|
53
|
+
|
|
22
54
|
```tsx
|
|
23
55
|
import { Button, Input } from '@machinemetrics/mm-react-components';
|
|
24
|
-
import '@machinemetrics/mm-react-components/styles';
|
|
25
56
|
|
|
26
57
|
function App() {
|
|
27
58
|
return (
|
|
28
59
|
<div>
|
|
29
|
-
<Button variant=
|
|
30
|
-
<Input placeholder=
|
|
60
|
+
<Button variant="primary">Start Monitoring</Button>
|
|
61
|
+
<Input placeholder="Enter machine ID..." />
|
|
31
62
|
</div>
|
|
32
63
|
);
|
|
33
64
|
}
|
|
34
65
|
```
|
|
35
66
|
|
|
67
|
+
### 5. Complete Setup Guide
|
|
68
|
+
|
|
69
|
+
For detailed setup instructions and alternative import methods, see the [Tailwind Setup Guide](./docs/TAILWIND_SETUP.md).
|
|
70
|
+
|
|
36
71
|
## Theme System
|
|
37
72
|
|
|
38
73
|
The component library includes a comprehensive theme system with two main themes:
|
|
@@ -53,18 +88,22 @@ The component library includes a comprehensive theme system with two main themes
|
|
|
53
88
|
|
|
54
89
|
### Using Themes
|
|
55
90
|
|
|
56
|
-
#### Option 1:
|
|
91
|
+
#### Option 1: Complete Theme (Recommended)
|
|
57
92
|
|
|
58
|
-
```
|
|
59
|
-
|
|
60
|
-
import '@machinemetrics/mm-react-components/themes/
|
|
61
|
-
|
|
93
|
+
```css
|
|
94
|
+
/* One import gets everything - easiest setup */
|
|
95
|
+
@import '@machinemetrics/mm-react-components/themes/complete';
|
|
96
|
+
```
|
|
62
97
|
|
|
63
|
-
|
|
64
|
-
|
|
98
|
+
#### Option 2: Manual Theme Import
|
|
99
|
+
|
|
100
|
+
```css
|
|
101
|
+
/* Import themes separately for more control */
|
|
102
|
+
@import '@machinemetrics/mm-react-components/themes/base';
|
|
103
|
+
@import '@machinemetrics/mm-react-components/themes/carbide';
|
|
65
104
|
```
|
|
66
105
|
|
|
67
|
-
#### Option
|
|
106
|
+
#### Option 3: Use Theme Utilities
|
|
68
107
|
|
|
69
108
|
```tsx
|
|
70
109
|
import {
|
|
@@ -83,14 +122,6 @@ toggleDarkMode();
|
|
|
83
122
|
const isCarbideActive = isCarbideThemeActive();
|
|
84
123
|
```
|
|
85
124
|
|
|
86
|
-
#### Option 3: Manual CSS Import
|
|
87
|
-
|
|
88
|
-
```css
|
|
89
|
-
/* In your CSS file */
|
|
90
|
-
@import '@machinemetrics/mm-react-components/themes/base';
|
|
91
|
-
@import '@machinemetrics/mm-react-components/themes/carbide';
|
|
92
|
-
```
|
|
93
|
-
|
|
94
125
|
### Theme Classes
|
|
95
126
|
|
|
96
127
|
The theme system uses CSS classes for activation:
|
|
@@ -165,16 +196,33 @@ import { Input } from '@machinemetrics/mm-react-components';
|
|
|
165
196
|
|
|
166
197
|
## Styling
|
|
167
198
|
|
|
168
|
-
The component library uses Tailwind CSS.
|
|
199
|
+
The component library uses Tailwind CSS with a complete theme system. The easiest way to get started is with the complete theme:
|
|
169
200
|
|
|
170
|
-
```
|
|
171
|
-
import
|
|
201
|
+
```css
|
|
202
|
+
/* Recommended: One import gets everything */
|
|
203
|
+
@import '@machinemetrics/mm-react-components/themes/complete';
|
|
172
204
|
```
|
|
173
205
|
|
|
174
|
-
|
|
206
|
+
This includes:
|
|
207
|
+
|
|
208
|
+
- Tailwind CSS reset and base styles
|
|
209
|
+
- OKLCH color system with dark mode support
|
|
210
|
+
- Carbide industrial theme
|
|
211
|
+
- All component styles and animations
|
|
212
|
+
|
|
213
|
+
### Alternative Import Methods
|
|
175
214
|
|
|
176
215
|
```css
|
|
177
|
-
|
|
216
|
+
/* Import base theme only */
|
|
217
|
+
@import '@machinemetrics/mm-react-components/themes/base';
|
|
218
|
+
|
|
219
|
+
/* Import Carbide theme for industrial styling */
|
|
220
|
+
@import '@machinemetrics/mm-react-components/themes/carbide';
|
|
221
|
+
```
|
|
222
|
+
|
|
223
|
+
```tsx
|
|
224
|
+
// Import in JavaScript/TypeScript
|
|
225
|
+
import '@machinemetrics/mm-react-components/themes/complete';
|
|
178
226
|
```
|
|
179
227
|
|
|
180
228
|
## TypeScript Support
|
|
@@ -184,7 +232,7 @@ This library is built with TypeScript and provides full type definitions:
|
|
|
184
232
|
```tsx
|
|
185
233
|
import { Button, type ButtonProps } from '@machinemetrics/mm-react-components';
|
|
186
234
|
|
|
187
|
-
const CustomButton: React.FC<ButtonProps> = props => {
|
|
235
|
+
const CustomButton: React.FC<ButtonProps> = (props) => {
|
|
188
236
|
return <Button {...props} />;
|
|
189
237
|
};
|
|
190
238
|
```
|
package/dist/App.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"App.d.ts","sourceRoot":"","sources":["../src/App.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"App.d.ts","sourceRoot":"","sources":["../src/App.tsx"],"names":[],"mappings":"AAwEA,iBAAS,GAAG,4CAmPX;AAED,eAAe,GAAG,CAAC"}
|
package/dist/README.md
ADDED
|
@@ -0,0 +1,266 @@
|
|
|
1
|
+
# @machinemetrics/mm-react-components
|
|
2
|
+
|
|
3
|
+
A comprehensive React component library designed specifically for MachineMetrics industrial and manufacturing applications.
|
|
4
|
+
|
|
5
|
+
## Features
|
|
6
|
+
|
|
7
|
+
- 🏭 **Industrial-Focused**: Components designed for manufacturing and industrial environments
|
|
8
|
+
- 🎨 **Modern Design**: Built on shadcn/ui with Tailwind CSS for consistent, accessible UI
|
|
9
|
+
- 📦 **Tree-Shakable**: ES modules with full tree-shaking support
|
|
10
|
+
- 🔧 **TypeScript**: Full TypeScript support with comprehensive type definitions
|
|
11
|
+
- ♿ **Accessible**: WCAG 2.1 AA compliant components
|
|
12
|
+
- 🚀 **Performance**: Optimized for real-time data display and monitoring
|
|
13
|
+
|
|
14
|
+
## Installation
|
|
15
|
+
|
|
16
|
+
```bash
|
|
17
|
+
npm install @machinemetrics/mm-react-components
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
## Quick Start
|
|
21
|
+
|
|
22
|
+
### 1. Install Dependencies
|
|
23
|
+
|
|
24
|
+
```bash
|
|
25
|
+
npm install @machinemetrics/mm-react-components tailwindcss postcss autoprefixer
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
### 2. Configure Tailwind CSS
|
|
29
|
+
|
|
30
|
+
Copy the Tailwind configuration to your project:
|
|
31
|
+
|
|
32
|
+
```bash
|
|
33
|
+
cp node_modules/@machinemetrics/mm-react-components/tailwind.config.export.js tailwind.config.js
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
### 3. Import Complete Theme (Recommended)
|
|
37
|
+
|
|
38
|
+
```css
|
|
39
|
+
/* In your main CSS file - one import gets everything! */
|
|
40
|
+
@import '@machinemetrics/mm-react-components/themes/complete';
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
**That's it!** This single import includes:
|
|
44
|
+
|
|
45
|
+
- ✅ Tailwind CSS reset
|
|
46
|
+
- ✅ Base theme variables (OKLCH color system)
|
|
47
|
+
- ✅ Carbide industrial theme
|
|
48
|
+
- ✅ All component styles
|
|
49
|
+
- ✅ Dark mode support
|
|
50
|
+
- ✅ Animations and utilities
|
|
51
|
+
|
|
52
|
+
### 4. Use Components
|
|
53
|
+
|
|
54
|
+
```tsx
|
|
55
|
+
import { Button, Input } from '@machinemetrics/mm-react-components';
|
|
56
|
+
|
|
57
|
+
function App() {
|
|
58
|
+
return (
|
|
59
|
+
<div>
|
|
60
|
+
<Button variant="primary">Start Monitoring</Button>
|
|
61
|
+
<Input placeholder="Enter machine ID..." />
|
|
62
|
+
</div>
|
|
63
|
+
);
|
|
64
|
+
}
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
### 5. Complete Setup Guide
|
|
68
|
+
|
|
69
|
+
For detailed setup instructions and alternative import methods, see the [Tailwind Setup Guide](./docs/TAILWIND_SETUP.md).
|
|
70
|
+
|
|
71
|
+
## Theme System
|
|
72
|
+
|
|
73
|
+
The component library includes a comprehensive theme system with two main themes:
|
|
74
|
+
|
|
75
|
+
### Base Theme (OKLCH)
|
|
76
|
+
|
|
77
|
+
- Modern OKLCH color space for better perceptual uniformity
|
|
78
|
+
- Professional typography with Noto Sans and Inconsolata fonts
|
|
79
|
+
- Complete dark mode support
|
|
80
|
+
- Chart and sidebar color systems
|
|
81
|
+
|
|
82
|
+
### Carbide Theme (Industrial)
|
|
83
|
+
|
|
84
|
+
- Manufacturing-appropriate color palette
|
|
85
|
+
- MachineMetrics brand colors (green, grey)
|
|
86
|
+
- Enhanced component styling for industrial applications
|
|
87
|
+
- Complete dark mode support
|
|
88
|
+
|
|
89
|
+
### Using Themes
|
|
90
|
+
|
|
91
|
+
#### Option 1: Complete Theme (Recommended)
|
|
92
|
+
|
|
93
|
+
```css
|
|
94
|
+
/* One import gets everything - easiest setup */
|
|
95
|
+
@import '@machinemetrics/mm-react-components/themes/complete';
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
#### Option 2: Manual Theme Import
|
|
99
|
+
|
|
100
|
+
```css
|
|
101
|
+
/* Import themes separately for more control */
|
|
102
|
+
@import '@machinemetrics/mm-react-components/themes/base';
|
|
103
|
+
@import '@machinemetrics/mm-react-components/themes/carbide';
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
#### Option 3: Use Theme Utilities
|
|
107
|
+
|
|
108
|
+
```tsx
|
|
109
|
+
import {
|
|
110
|
+
activateCarbideTheme,
|
|
111
|
+
toggleDarkMode,
|
|
112
|
+
isCarbideThemeActive,
|
|
113
|
+
} from '@machinemetrics/mm-react-components';
|
|
114
|
+
|
|
115
|
+
// Activate Carbide theme
|
|
116
|
+
activateCarbideTheme();
|
|
117
|
+
|
|
118
|
+
// Toggle dark mode
|
|
119
|
+
toggleDarkMode();
|
|
120
|
+
|
|
121
|
+
// Check theme status
|
|
122
|
+
const isCarbideActive = isCarbideThemeActive();
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
### Theme Classes
|
|
126
|
+
|
|
127
|
+
The theme system uses CSS classes for activation:
|
|
128
|
+
|
|
129
|
+
- **Base theme**: Active by default
|
|
130
|
+
- **Carbide theme**: Add `carbide` class to `<html>` element
|
|
131
|
+
- **Dark mode**: Add `dark` class to `<html>` element
|
|
132
|
+
|
|
133
|
+
```html
|
|
134
|
+
<!-- Base theme -->
|
|
135
|
+
<html>
|
|
136
|
+
<!-- Carbide theme -->
|
|
137
|
+
<html class="carbide">
|
|
138
|
+
<!-- Carbide theme + dark mode -->
|
|
139
|
+
<html class="carbide dark"></html>
|
|
140
|
+
</html>
|
|
141
|
+
</html>
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
### Available Theme Utilities
|
|
145
|
+
|
|
146
|
+
```tsx
|
|
147
|
+
import {
|
|
148
|
+
// Carbide theme utilities
|
|
149
|
+
activateCarbideTheme,
|
|
150
|
+
deactivateCarbideTheme,
|
|
151
|
+
toggleCarbideTheme,
|
|
152
|
+
isCarbideThemeActive,
|
|
153
|
+
|
|
154
|
+
// Dark mode utilities
|
|
155
|
+
activateDarkMode,
|
|
156
|
+
deactivateDarkMode,
|
|
157
|
+
toggleDarkMode,
|
|
158
|
+
isDarkModeActive,
|
|
159
|
+
} from '@machinemetrics/mm-react-components';
|
|
160
|
+
```
|
|
161
|
+
|
|
162
|
+
## Components
|
|
163
|
+
|
|
164
|
+
### Button
|
|
165
|
+
|
|
166
|
+
A versatile button component with multiple variants for different use cases.
|
|
167
|
+
|
|
168
|
+
```tsx
|
|
169
|
+
import { Button } from '@machinemetrics/mm-react-components';
|
|
170
|
+
|
|
171
|
+
// Basic usage
|
|
172
|
+
<Button>Default</Button>
|
|
173
|
+
|
|
174
|
+
// Variants
|
|
175
|
+
<Button variant="primary">Primary</Button>
|
|
176
|
+
<Button variant="secondary">Secondary</Button>
|
|
177
|
+
<Button variant="outline">Outline</Button>
|
|
178
|
+
<Button variant="destructive">Destructive</Button>
|
|
179
|
+
|
|
180
|
+
// Sizes
|
|
181
|
+
<Button size="sm">Small</Button>
|
|
182
|
+
<Button size="lg">Large</Button>
|
|
183
|
+
```
|
|
184
|
+
|
|
185
|
+
### Input
|
|
186
|
+
|
|
187
|
+
Form input component with built-in validation states.
|
|
188
|
+
|
|
189
|
+
```tsx
|
|
190
|
+
import { Input } from '@machinemetrics/mm-react-components';
|
|
191
|
+
|
|
192
|
+
<Input placeholder="Enter value..." />
|
|
193
|
+
<Input type="email" placeholder="Email address" />
|
|
194
|
+
<Input type="password" placeholder="Password" />
|
|
195
|
+
```
|
|
196
|
+
|
|
197
|
+
## Styling
|
|
198
|
+
|
|
199
|
+
The component library uses Tailwind CSS with a complete theme system. The easiest way to get started is with the complete theme:
|
|
200
|
+
|
|
201
|
+
```css
|
|
202
|
+
/* Recommended: One import gets everything */
|
|
203
|
+
@import '@machinemetrics/mm-react-components/themes/complete';
|
|
204
|
+
```
|
|
205
|
+
|
|
206
|
+
This includes:
|
|
207
|
+
|
|
208
|
+
- Tailwind CSS reset and base styles
|
|
209
|
+
- OKLCH color system with dark mode support
|
|
210
|
+
- Carbide industrial theme
|
|
211
|
+
- All component styles and animations
|
|
212
|
+
|
|
213
|
+
### Alternative Import Methods
|
|
214
|
+
|
|
215
|
+
```css
|
|
216
|
+
/* Import base theme only */
|
|
217
|
+
@import '@machinemetrics/mm-react-components/themes/base';
|
|
218
|
+
|
|
219
|
+
/* Import Carbide theme for industrial styling */
|
|
220
|
+
@import '@machinemetrics/mm-react-components/themes/carbide';
|
|
221
|
+
```
|
|
222
|
+
|
|
223
|
+
```tsx
|
|
224
|
+
// Import in JavaScript/TypeScript
|
|
225
|
+
import '@machinemetrics/mm-react-components/themes/complete';
|
|
226
|
+
```
|
|
227
|
+
|
|
228
|
+
## TypeScript Support
|
|
229
|
+
|
|
230
|
+
This library is built with TypeScript and provides full type definitions:
|
|
231
|
+
|
|
232
|
+
```tsx
|
|
233
|
+
import { Button, type ButtonProps } from '@machinemetrics/mm-react-components';
|
|
234
|
+
|
|
235
|
+
const CustomButton: React.FC<ButtonProps> = (props) => {
|
|
236
|
+
return <Button {...props} />;
|
|
237
|
+
};
|
|
238
|
+
```
|
|
239
|
+
|
|
240
|
+
## Requirements
|
|
241
|
+
|
|
242
|
+
- React 18.0.0 or higher
|
|
243
|
+
- Node.js 20.0.0 or higher
|
|
244
|
+
|
|
245
|
+
## Browser Support
|
|
246
|
+
|
|
247
|
+
- Chrome (latest)
|
|
248
|
+
- Firefox (latest)
|
|
249
|
+
- Safari (latest)
|
|
250
|
+
- Edge (latest)
|
|
251
|
+
|
|
252
|
+
## Contributing
|
|
253
|
+
|
|
254
|
+
We welcome contributions! Please see our [Contributing Guide](CONTRIBUTING.md) for details.
|
|
255
|
+
|
|
256
|
+
## License
|
|
257
|
+
|
|
258
|
+
MIT License - see [LICENSE](LICENSE) file for details.
|
|
259
|
+
|
|
260
|
+
## Support
|
|
261
|
+
|
|
262
|
+
For support and questions, please contact the MachineMetrics development team.
|
|
263
|
+
|
|
264
|
+
---
|
|
265
|
+
|
|
266
|
+
Built with ❤️ by the MachineMetrics team for industrial applications.
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import * as AccordionPrimitive from '@radix-ui/react-accordion';
|
|
3
|
+
declare function Accordion({ className, ...props }: React.ComponentProps<typeof AccordionPrimitive.Root>): import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
declare function AccordionItem({ className, ...props }: React.ComponentProps<typeof AccordionPrimitive.Item>): import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
declare function AccordionTrigger({ className, children, indicatorClassName, ...props }: React.ComponentProps<typeof AccordionPrimitive.Trigger> & {
|
|
6
|
+
indicatorClassName?: string;
|
|
7
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
declare function AccordionContent({ className, children, ...props }: React.ComponentProps<typeof AccordionPrimitive.Content>): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export { Accordion, AccordionItem, AccordionTrigger, AccordionContent };
|
|
10
|
+
//# sourceMappingURL=accordion.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"accordion.d.ts","sourceRoot":"","sources":["../../../src/components/ui/accordion.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,kBAAkB,MAAM,2BAA2B,CAAC;AAKhE,iBAAS,SAAS,CAAC,EACjB,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,kBAAkB,CAAC,IAAI,CAAC,2CAQtD;AAED,iBAAS,aAAa,CAAC,EACrB,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,kBAAkB,CAAC,IAAI,CAAC,2CAQtD;AAED,iBAAS,gBAAgB,CAAC,EACxB,SAAS,EACT,QAAQ,EACR,kBAAkB,EAClB,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,kBAAkB,CAAC,OAAO,CAAC,GAAG;IAC3D,kBAAkB,CAAC,EAAE,MAAM,CAAC;CAC7B,2CAqBA;AAED,iBAAS,gBAAgB,CAAC,EACxB,SAAS,EACT,QAAQ,EACR,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,kBAAkB,CAAC,OAAO,CAAC,2CAUzD;AAED,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { type VariantProps } from 'class-variance-authority';
|
|
3
|
+
declare const badgeVariants: (props?: ({
|
|
4
|
+
variant?: "default" | "destructive" | "outline" | "secondary" | null | undefined;
|
|
5
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
6
|
+
declare function Badge({ className, variant, asChild, ...props }: React.ComponentProps<'span'> & VariantProps<typeof badgeVariants> & {
|
|
7
|
+
asChild?: boolean;
|
|
8
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export { Badge, badgeVariants };
|
|
10
|
+
//# sourceMappingURL=badge.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"badge.d.ts","sourceRoot":"","sources":["../../../src/components/ui/badge.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAIlE,QAAA,MAAM,aAAa;;8EAmBlB,CAAC;AAEF,iBAAS,KAAK,CAAC,EACb,SAAS,EACT,OAAO,EACP,OAAe,EACf,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,MAAM,CAAC,GAC7B,YAAY,CAAC,OAAO,aAAa,CAAC,GAAG;IAAE,OAAO,CAAC,EAAE,OAAO,CAAA;CAAE,2CAU3D;AAED,OAAO,EAAE,KAAK,EAAE,aAAa,EAAE,CAAC"}
|
|
@@ -1,23 +1,11 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { type VariantProps } from 'class-variance-authority';
|
|
3
3
|
declare const buttonVariants: (props?: ({
|
|
4
|
-
variant?: "
|
|
5
|
-
size?: "default" | "sm" | "lg" | "icon" | null | undefined;
|
|
4
|
+
variant?: "link" | "default" | "destructive" | "outline" | "secondary" | "ghost" | null | undefined;
|
|
5
|
+
size?: "default" | "sm" | "lg" | "icon" | "icon-sm" | "icon-lg" | null | undefined;
|
|
6
6
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
7
|
-
|
|
8
|
-
* Button component with multiple variants and sizes
|
|
9
|
-
*
|
|
10
|
-
* @example
|
|
11
|
-
* ```tsx
|
|
12
|
-
* <Button variant="default" size="lg" onClick={() => console.log('clicked')}>
|
|
13
|
-
* Click me
|
|
14
|
-
* </Button>
|
|
15
|
-
* ```
|
|
16
|
-
*/
|
|
17
|
-
export interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof buttonVariants> {
|
|
18
|
-
/** Render as a different element using Radix Slot */
|
|
7
|
+
declare function Button({ className, variant, size, asChild, ...props }: React.ComponentProps<'button'> & VariantProps<typeof buttonVariants> & {
|
|
19
8
|
asChild?: boolean;
|
|
20
|
-
}
|
|
21
|
-
declare const Button: React.ForwardRefExoticComponent<ButtonProps & React.RefAttributes<HTMLButtonElement>>;
|
|
9
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
22
10
|
export { Button, buttonVariants };
|
|
23
11
|
//# sourceMappingURL=button.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"button.d.ts","sourceRoot":"","sources":["../../../src/components/ui/button.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAIlE,QAAA,MAAM,cAAc;;;
|
|
1
|
+
{"version":3,"file":"button.d.ts","sourceRoot":"","sources":["../../../src/components/ui/button.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAIlE,QAAA,MAAM,cAAc;;;8EAgCnB,CAAC;AAEF,iBAAS,MAAM,CAAC,EACd,SAAS,EACT,OAAO,EACP,IAAI,EACJ,OAAe,EACf,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,QAAQ,CAAC,GAC/B,YAAY,CAAC,OAAO,cAAc,CAAC,GAAG;IACpC,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB,2CAYF;AAED,OAAO,EAAE,MAAM,EAAE,cAAc,EAAE,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { DayButton, DayPicker } from 'react-day-picker';
|
|
3
|
+
import { Button } from '@/components/ui/button';
|
|
4
|
+
declare function Calendar({ className, classNames, showOutsideDays, captionLayout, buttonVariant, formatters, components, ...props }: React.ComponentProps<typeof DayPicker> & {
|
|
5
|
+
buttonVariant?: React.ComponentProps<typeof Button>['variant'];
|
|
6
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
declare function CalendarDayButton({ className, day, modifiers, ...props }: React.ComponentProps<typeof DayButton>): import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export { Calendar, CalendarDayButton };
|
|
9
|
+
//# sourceMappingURL=calendar.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"calendar.d.ts","sourceRoot":"","sources":["../../../src/components/ui/calendar.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAM/B,OAAO,EAAE,SAAS,EAAE,SAAS,EAAwB,MAAM,kBAAkB,CAAC;AAG9E,OAAO,EAAE,MAAM,EAAkB,MAAM,wBAAwB,CAAC;AAEhE,iBAAS,QAAQ,CAAC,EAChB,SAAS,EACT,UAAU,EACV,eAAsB,EACtB,aAAuB,EACvB,aAAuB,EACvB,UAAU,EACV,UAAU,EACV,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,SAAS,CAAC,GAAG;IAC1C,aAAa,CAAC,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,MAAM,CAAC,CAAC,SAAS,CAAC,CAAC;CAChE,2CA2IA;AAED,iBAAS,iBAAiB,CAAC,EACzB,SAAS,EACT,GAAG,EACH,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,SAAS,CAAC,2CA4BxC;AAED,OAAO,EAAE,QAAQ,EAAE,iBAAiB,EAAE,CAAC"}
|
|
@@ -1,17 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import * as CheckboxPrimitive from '@radix-ui/react-checkbox';
|
|
3
|
-
/**
|
|
4
|
-
* Checkbox component with checked, unchecked, and indeterminate states
|
|
5
|
-
*
|
|
6
|
-
* @example
|
|
7
|
-
* ```tsx
|
|
8
|
-
* <Checkbox
|
|
9
|
-
* id="terms"
|
|
10
|
-
* checked={checked}
|
|
11
|
-
* onCheckedChange={(value) => setChecked(value)}
|
|
12
|
-
* />
|
|
13
|
-
* ```
|
|
14
|
-
*/
|
|
15
3
|
declare function Checkbox({ className, ...props }: React.ComponentProps<typeof CheckboxPrimitive.Root>): import("react/jsx-runtime").JSX.Element;
|
|
16
4
|
export { Checkbox };
|
|
17
5
|
//# sourceMappingURL=checkbox.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"checkbox.d.ts","sourceRoot":"","sources":["../../../src/components/ui/checkbox.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,iBAAiB,MAAM,0BAA0B,CAAC;AAK9D
|
|
1
|
+
{"version":3,"file":"checkbox.d.ts","sourceRoot":"","sources":["../../../src/components/ui/checkbox.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,iBAAiB,MAAM,0BAA0B,CAAC;AAK9D,iBAAS,QAAQ,CAAC,EAChB,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,iBAAiB,CAAC,IAAI,CAAC,2CAkBrD;AAED,OAAO,EAAE,QAAQ,EAAE,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import * as CollapsiblePrimitive from '@radix-ui/react-collapsible';
|
|
3
|
+
declare function Collapsible({ ...props }: React.ComponentProps<typeof CollapsiblePrimitive.Root>): import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
declare function CollapsibleTrigger({ ...props }: React.ComponentProps<typeof CollapsiblePrimitive.CollapsibleTrigger>): import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
declare function CollapsibleContent({ ...props }: React.ComponentProps<typeof CollapsiblePrimitive.CollapsibleContent>): import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
export { Collapsible, CollapsibleTrigger, CollapsibleContent };
|
|
7
|
+
//# sourceMappingURL=collapsible.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"collapsible.d.ts","sourceRoot":"","sources":["../../../src/components/ui/collapsible.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,oBAAoB,MAAM,6BAA6B,CAAC;AAEpE,iBAAS,WAAW,CAAC,EACnB,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,oBAAoB,CAAC,IAAI,CAAC,2CAExD;AAED,iBAAS,kBAAkB,CAAC,EAC1B,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,oBAAoB,CAAC,kBAAkB,CAAC,2CAOtE;AAED,iBAAS,kBAAkB,CAAC,EAC1B,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,oBAAoB,CAAC,kBAAkB,CAAC,2CAOtE;AAED,OAAO,EAAE,WAAW,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,CAAC"}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import type { DataTableProps } from './types';
|
|
2
|
+
export declare function DataTable<TData, TValue>({ columns, data, loading, columnRegistry, initialState, tableId, toolbar, emptyState, forceEmptyState, }: DataTableProps<TData, TValue>): import("react/jsx-runtime").JSX.Element;
|
|
3
|
+
//# sourceMappingURL=TableView.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TableView.d.ts","sourceRoot":"","sources":["../../../../src/components/ui/data-table/TableView.tsx"],"names":[],"mappings":"AAoCA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAkH9C,wBAAgB,SAAS,CAAC,KAAK,EAAE,MAAM,EAAE,EACvC,OAAO,EACP,IAAI,EACJ,OAAe,EACf,cAAc,EACd,YAAY,EACZ,OAAO,EACP,OAAO,EACP,UAAU,EACV,eAAe,GAChB,EAAE,cAAc,CAAC,KAAK,EAAE,MAAM,CAAC,2CAmkB/B"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { DataTableProps, DataTableToolbarOptions } from '../types';
|
|
2
|
+
export interface ResponsiveTableProps<TData, TValue> extends DataTableProps<TData, TValue> {
|
|
3
|
+
breakpoint?: string;
|
|
4
|
+
enableMobileVirtualization?: boolean;
|
|
5
|
+
virtualizeAt?: number;
|
|
6
|
+
overscan?: number;
|
|
7
|
+
toolbarOptions?: DataTableToolbarOptions;
|
|
8
|
+
}
|
|
9
|
+
export declare function ResponsiveTable<TData, TValue>({ columns, data, loading, columnRegistry, initialState, breakpoint, enableMobileVirtualization, virtualizeAt, overscan, tableId, toolbarOptions, emptyState, forceEmptyState, }: ResponsiveTableProps<TData, TValue>): import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
//# sourceMappingURL=ResponsiveTable.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ResponsiveTable.d.ts","sourceRoot":"","sources":["../../../../../src/components/ui/data-table/cards/ResponsiveTable.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,cAAc,EAAE,uBAAuB,EAAE,MAAM,UAAU,CAAC;AASxE,MAAM,WAAW,oBAAoB,CAAC,KAAK,EAAE,MAAM,CACjD,SAAQ,cAAc,CAAC,KAAK,EAAE,MAAM,CAAC;IACrC,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,0BAA0B,CAAC,EAAE,OAAO,CAAC;IACrC,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,cAAc,CAAC,EAAE,uBAAuB,CAAC;CAC1C;AAED,wBAAgB,eAAe,CAAC,KAAK,EAAE,MAAM,EAAE,EAC7C,OAAO,EACP,IAAI,EACJ,OAAO,EACP,cAAc,EACd,YAAY,EACZ,UAAiC,EACjC,0BAAiC,EACjC,YAAkB,EAClB,QAAY,EACZ,OAAO,EACP,cAAc,EACd,UAAU,EACV,eAAe,GAChB,EAAE,oBAAoB,CAAC,KAAK,EAAE,MAAM,CAAC,2CAqCrC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { type Row } from '@tanstack/react-table';
|
|
2
|
+
import type { ColumnRegistry } from '../metadata/ColumnRegistry';
|
|
3
|
+
export interface RowCardProps<TData> {
|
|
4
|
+
row: Row<TData>;
|
|
5
|
+
columnRegistry?: ColumnRegistry<TData, unknown>;
|
|
6
|
+
className?: string;
|
|
7
|
+
}
|
|
8
|
+
export declare function RowCard<TData>({ row, columnRegistry, className, }: RowCardProps<TData>): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
//# sourceMappingURL=RowCard.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RowCard.d.ts","sourceRoot":"","sources":["../../../../../src/components/ui/data-table/cards/RowCard.tsx"],"names":[],"mappings":"AACA,OAAO,EAAyB,KAAK,GAAG,EAAE,MAAM,uBAAuB,CAAC;AAExE,OAAO,KAAK,EAEV,cAAc,EACf,MAAM,4BAA4B,CAAC;AAEpC,MAAM,WAAW,YAAY,CAAC,KAAK;IACjC,GAAG,EAAE,GAAG,CAAC,KAAK,CAAC,CAAC;IAChB,cAAc,CAAC,EAAE,cAAc,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC;IAChD,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAiCD,wBAAgB,OAAO,CAAC,KAAK,EAAE,EAC7B,GAAG,EACH,cAAc,EACd,SAAS,GACV,EAAE,YAAY,CAAC,KAAK,CAAC,2CAmLrB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/ui/data-table/cards/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import type { ColumnDef } from '@tanstack/react-table';
|
|
3
|
+
import { Badge } from '@/components/ui/badge';
|
|
4
|
+
import type { ColumnDefaults, ColumnDescriptor } from '../metadata/ColumnRegistry';
|
|
5
|
+
interface BadgeConfig<TValue extends string> {
|
|
6
|
+
labelMap: Record<TValue, string>;
|
|
7
|
+
variantMap?: Record<TValue, React.ComponentProps<typeof Badge>['variant']>;
|
|
8
|
+
}
|
|
9
|
+
interface BadgeColumnOptions<TData, TValue extends string> extends Partial<ColumnDefaults>, BadgeConfig<TValue> {
|
|
10
|
+
id: string;
|
|
11
|
+
accessorKey?: string;
|
|
12
|
+
header: ColumnDef<TData, TValue>['header'];
|
|
13
|
+
}
|
|
14
|
+
export declare function createBadgeColumn<TData, TValue extends string>(options: BadgeColumnOptions<TData, TValue>): ColumnDescriptor<TData, TValue>;
|
|
15
|
+
export {};
|
|
16
|
+
//# sourceMappingURL=badgeColumn.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"badgeColumn.d.ts","sourceRoot":"","sources":["../../../../../src/components/ui/data-table/columnTypes/badgeColumn.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AACvD,OAAO,EAAE,KAAK,EAAE,MAAM,uBAAuB,CAAC;AAE9C,OAAO,KAAK,EACV,cAAc,EACd,gBAAgB,EACjB,MAAM,4BAA4B,CAAC;AAEpC,UAAU,WAAW,CAAC,MAAM,SAAS,MAAM;IACzC,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACjC,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,KAAK,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC;CAC5E;AAED,UAAU,kBAAkB,CAAC,KAAK,EAAE,MAAM,SAAS,MAAM,CACvD,SAAQ,OAAO,CAAC,cAAc,CAAC,EAC7B,WAAW,CAAC,MAAM,CAAC;IACrB,EAAE,EAAE,MAAM,CAAC;IACX,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,MAAM,EAAE,SAAS,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC,QAAQ,CAAC,CAAC;CAC5C;AAED,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,MAAM,SAAS,MAAM,EAC5D,OAAO,EAAE,kBAAkB,CAAC,KAAK,EAAE,MAAM,CAAC,GACzC,gBAAgB,CAAC,KAAK,EAAE,MAAM,CAAC,CA8BjC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { ColumnDef } from '@tanstack/react-table';
|
|
2
|
+
import type { ColumnDefaults, ColumnDescriptor } from '../metadata/ColumnRegistry';
|
|
3
|
+
export interface ColumnOptions<TData, TValue> extends Partial<ColumnDefaults> {
|
|
4
|
+
id: string;
|
|
5
|
+
column: ColumnDef<TData, TValue>;
|
|
6
|
+
}
|
|
7
|
+
export declare function createColumnDescriptor<TData, TValue>(options: ColumnOptions<TData, TValue>): ColumnDescriptor<TData, TValue>;
|
|
8
|
+
//# sourceMappingURL=createColumn.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createColumn.d.ts","sourceRoot":"","sources":["../../../../../src/components/ui/data-table/columnTypes/createColumn.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAY,MAAM,uBAAuB,CAAC;AACjE,OAAO,KAAK,EACV,cAAc,EACd,gBAAgB,EAEjB,MAAM,4BAA4B,CAAC;AAuHpC,MAAM,WAAW,aAAa,CAAC,KAAK,EAAE,MAAM,CAAE,SAAQ,OAAO,CAAC,cAAc,CAAC;IAC3E,EAAE,EAAE,MAAM,CAAC;IACX,MAAM,EAAE,SAAS,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC;CAClC;AAED,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,MAAM,EAClD,OAAO,EAAE,aAAa,CAAC,KAAK,EAAE,MAAM,CAAC,GACpC,gBAAgB,CAAC,KAAK,EAAE,MAAM,CAAC,CA8CjC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { ColumnDef } from '@tanstack/react-table';
|
|
2
|
+
import type { ColumnDefaults, ColumnDescriptor } from '../metadata/ColumnRegistry';
|
|
3
|
+
export interface DateColumnOptions<TData> extends Partial<ColumnDefaults> {
|
|
4
|
+
id: string;
|
|
5
|
+
accessorKey?: string;
|
|
6
|
+
header: ColumnDef<TData, string | Date>['header'];
|
|
7
|
+
/** Optional Intl.DateTimeFormat; defaults to en-US short date */
|
|
8
|
+
formatter?: Intl.DateTimeFormat;
|
|
9
|
+
/** Optional custom formatter override for full control */
|
|
10
|
+
format?: (date: Date) => string;
|
|
11
|
+
}
|
|
12
|
+
export declare function createDateColumn<TData>(options: DateColumnOptions<TData>): ColumnDescriptor<TData, string | Date>;
|
|
13
|
+
//# sourceMappingURL=dateColumn.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dateColumn.d.ts","sourceRoot":"","sources":["../../../../../src/components/ui/data-table/columnTypes/dateColumn.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAEvD,OAAO,KAAK,EACV,cAAc,EACd,gBAAgB,EACjB,MAAM,4BAA4B,CAAC;AAEpC,MAAM,WAAW,iBAAiB,CAAC,KAAK,CAAE,SAAQ,OAAO,CAAC,cAAc,CAAC;IACvE,EAAE,EAAE,MAAM,CAAC;IACX,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,MAAM,EAAE,SAAS,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC,CAAC,QAAQ,CAAC,CAAC;IAClD,iEAAiE;IACjE,SAAS,CAAC,EAAE,IAAI,CAAC,cAAc,CAAC;IAChC,0DAA0D;IAC1D,MAAM,CAAC,EAAE,CAAC,IAAI,EAAE,IAAI,KAAK,MAAM,CAAC;CACjC;AAED,wBAAgB,gBAAgB,CAAC,KAAK,EACpC,OAAO,EAAE,iBAAiB,CAAC,KAAK,CAAC,GAChC,gBAAgB,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC,CAkDxC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export * from './createColumn';
|
|
2
|
+
export * from './textColumn';
|
|
3
|
+
export * from './numericColumn';
|
|
4
|
+
export * from './badgeColumn';
|
|
5
|
+
export * from './selectionColumn';
|
|
6
|
+
export * from './multiBadgeColumn';
|
|
7
|
+
export * from './dateColumn';
|
|
8
|
+
//# sourceMappingURL=index.d.ts.map
|