@machinemetrics/mm-react-components 1.1.3 → 1.2.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 +1 -0
- package/agent-docs/agent-documentation-reference.md +6 -2
- package/agent-docs/cursor-skill-mm-carbide.md +3 -1
- package/agent-docs/lovable.md +96 -0
- package/dist/README.md +1 -0
- package/dist/components/ui/aspect-ratio.d.ts +3 -1
- package/dist/components/ui/aspect-ratio.d.ts.map +1 -1
- package/dist/components/ui/calendar.d.ts +6 -0
- package/dist/components/ui/calendar.d.ts.map +1 -1
- package/dist/components/ui/data-table/TableView.d.ts +3 -0
- package/dist/components/ui/data-table/TableView.d.ts.map +1 -1
- package/dist/components/ui/data-table/cards/ResponsiveTable.d.ts +3 -0
- package/dist/components/ui/data-table/cards/ResponsiveTable.d.ts.map +1 -1
- package/dist/components/ui/data-table/pagination.d.ts +3 -0
- package/dist/components/ui/data-table/pagination.d.ts.map +1 -1
- package/dist/components/ui/data-table/toolbar/DataTableToolbar.d.ts +3 -0
- package/dist/components/ui/data-table/toolbar/DataTableToolbar.d.ts.map +1 -1
- package/dist/components/ui/date-picker.d.ts +3 -0
- package/dist/components/ui/date-picker.d.ts.map +1 -1
- package/dist/components/ui/date-range-picker.d.ts +3 -0
- package/dist/components/ui/date-range-picker.d.ts.map +1 -1
- package/dist/components/ui/dropzone/index.d.ts +12 -3
- package/dist/components/ui/dropzone/index.d.ts.map +1 -1
- package/dist/components/ui/kbd.d.ts +11 -1
- package/dist/components/ui/kbd.d.ts.map +1 -1
- package/dist/components/ui/label.d.ts +3 -1
- package/dist/components/ui/label.d.ts.map +1 -1
- package/dist/components/ui/radio-group.d.ts +2 -2
- package/dist/components/ui/radio-group.d.ts.map +1 -1
- package/dist/components/ui/scroll-area.d.ts +6 -0
- package/dist/components/ui/scroll-area.d.ts.map +1 -1
- package/dist/components/ui/simple-pagination.d.ts +3 -0
- package/dist/components/ui/simple-pagination.d.ts.map +1 -1
- package/dist/components/ui/skeleton.d.ts +7 -1
- package/dist/components/ui/skeleton.d.ts.map +1 -1
- package/dist/components/ui/slider.d.ts +6 -0
- package/dist/components/ui/slider.d.ts.map +1 -1
- package/dist/components/ui/spinner-carbide.d.ts +3 -0
- package/dist/components/ui/spinner-carbide.d.ts.map +1 -1
- package/dist/components/ui/spinner.d.ts +7 -1
- package/dist/components/ui/spinner.d.ts.map +1 -1
- package/dist/components/ui/textarea.d.ts +3 -1
- package/dist/components/ui/textarea.d.ts.map +1 -1
- package/dist/components/ui/toggle.d.ts +7 -1
- package/dist/components/ui/toggle.d.ts.map +1 -1
- package/dist/cursor-skill/mm-carbide/SKILL.md +14 -1
- package/dist/cursor-skill/mm-carbide/reference.md +4 -2
- package/dist/mm-react-components.es.js +693 -689
- package/dist/mm-react-components.es.js.map +1 -1
- package/dist/mm-react-components.umd.js +1 -1
- package/dist/mm-react-components.umd.js.map +1 -1
- package/package.json +3 -2
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
- **Colors and tokens:** Use only CSS variables / semantic tokens (e.g. `bg-background`, `text-foreground`, `text-muted-foreground`, `border-border`, `bg-primary`, `text-destructive`). Never use raw Tailwind color classes like `bg-blue-600` or `text-gray-500`.
|
|
6
6
|
- **Variants and sizes:** Use component props: `variant="default"|"destructive"|"outline"|"secondary"|"ghost"|"link"`, `size="sm"|"md"|"lg"|"icon"` where supported. Same variant names apply across Button, Badge, and other components.
|
|
7
7
|
- **Layout:** Use `flex`, `grid`, and `gap-*` for spacing; avoid ad-hoc margins between siblings.
|
|
8
|
+
- **Converting to Carbide:** Remove existing inline styles and component CSS; map to library components and use variants/tokens. See SKILL.md section “Converting to Carbide.”
|
|
8
9
|
- **Setup:** Import library styles (e.g. `import '@machinemetrics/mm-react-components/styles'`) and wrap the app (or Carbide root) in `<div className="carbide">` so the theme and fonts apply.
|
|
9
10
|
|
|
10
11
|
## Component discovery
|
|
@@ -33,10 +34,11 @@ Import from the package main entry (see `src/index.ts` in the repo for the full
|
|
|
33
34
|
|
|
34
35
|
There is no "Panel" component. For panel-like or card-like regions where content may be longer than the visible area, use **ScrollArea** for the scrollable region. **Card** is structure only (border, sections) and does not scroll.
|
|
35
36
|
|
|
36
|
-
-
|
|
37
|
+
- **ScrollArea only scrolls when it has a constrained height.** Without a height (or max-height) on the ScrollArea root, the container grows with content and no scrollbar appears. Always set an explicit height: e.g. `className="h-[300px]"` or `max-h-[50vh]`.
|
|
38
|
+
- In a **flex column** (e.g. Card with `flex flex-col max-h-[80vh]`), use `ScrollArea className="flex-1 min-h-0"`. The `min-h-0` is required so the flex item can shrink below its content size; without it, ScrollArea won’t scroll.
|
|
37
39
|
- Put long content inside ScrollArea; use Card for the outer container and ScrollArea inside CardContent (or as the body) when the body should scroll.
|
|
38
40
|
|
|
39
|
-
|
|
41
|
+
**If ScrollArea doesn’t scroll:** Ensure the ScrollArea element has a bounded height (fixed height, max-height, or `flex-1 min-h-0` inside a constrained flex container). Never use ScrollArea without one of these.
|
|
40
42
|
|
|
41
43
|
## Patterns
|
|
42
44
|
|