@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.
Files changed (52) hide show
  1. package/README.md +1 -0
  2. package/agent-docs/agent-documentation-reference.md +6 -2
  3. package/agent-docs/cursor-skill-mm-carbide.md +3 -1
  4. package/agent-docs/lovable.md +96 -0
  5. package/dist/README.md +1 -0
  6. package/dist/components/ui/aspect-ratio.d.ts +3 -1
  7. package/dist/components/ui/aspect-ratio.d.ts.map +1 -1
  8. package/dist/components/ui/calendar.d.ts +6 -0
  9. package/dist/components/ui/calendar.d.ts.map +1 -1
  10. package/dist/components/ui/data-table/TableView.d.ts +3 -0
  11. package/dist/components/ui/data-table/TableView.d.ts.map +1 -1
  12. package/dist/components/ui/data-table/cards/ResponsiveTable.d.ts +3 -0
  13. package/dist/components/ui/data-table/cards/ResponsiveTable.d.ts.map +1 -1
  14. package/dist/components/ui/data-table/pagination.d.ts +3 -0
  15. package/dist/components/ui/data-table/pagination.d.ts.map +1 -1
  16. package/dist/components/ui/data-table/toolbar/DataTableToolbar.d.ts +3 -0
  17. package/dist/components/ui/data-table/toolbar/DataTableToolbar.d.ts.map +1 -1
  18. package/dist/components/ui/date-picker.d.ts +3 -0
  19. package/dist/components/ui/date-picker.d.ts.map +1 -1
  20. package/dist/components/ui/date-range-picker.d.ts +3 -0
  21. package/dist/components/ui/date-range-picker.d.ts.map +1 -1
  22. package/dist/components/ui/dropzone/index.d.ts +12 -3
  23. package/dist/components/ui/dropzone/index.d.ts.map +1 -1
  24. package/dist/components/ui/kbd.d.ts +11 -1
  25. package/dist/components/ui/kbd.d.ts.map +1 -1
  26. package/dist/components/ui/label.d.ts +3 -1
  27. package/dist/components/ui/label.d.ts.map +1 -1
  28. package/dist/components/ui/radio-group.d.ts +2 -2
  29. package/dist/components/ui/radio-group.d.ts.map +1 -1
  30. package/dist/components/ui/scroll-area.d.ts +6 -0
  31. package/dist/components/ui/scroll-area.d.ts.map +1 -1
  32. package/dist/components/ui/simple-pagination.d.ts +3 -0
  33. package/dist/components/ui/simple-pagination.d.ts.map +1 -1
  34. package/dist/components/ui/skeleton.d.ts +7 -1
  35. package/dist/components/ui/skeleton.d.ts.map +1 -1
  36. package/dist/components/ui/slider.d.ts +6 -0
  37. package/dist/components/ui/slider.d.ts.map +1 -1
  38. package/dist/components/ui/spinner-carbide.d.ts +3 -0
  39. package/dist/components/ui/spinner-carbide.d.ts.map +1 -1
  40. package/dist/components/ui/spinner.d.ts +7 -1
  41. package/dist/components/ui/spinner.d.ts.map +1 -1
  42. package/dist/components/ui/textarea.d.ts +3 -1
  43. package/dist/components/ui/textarea.d.ts.map +1 -1
  44. package/dist/components/ui/toggle.d.ts +7 -1
  45. package/dist/components/ui/toggle.d.ts.map +1 -1
  46. package/dist/cursor-skill/mm-carbide/SKILL.md +14 -1
  47. package/dist/cursor-skill/mm-carbide/reference.md +4 -2
  48. package/dist/mm-react-components.es.js +693 -689
  49. package/dist/mm-react-components.es.js.map +1 -1
  50. package/dist/mm-react-components.umd.js +1 -1
  51. package/dist/mm-react-components.umd.js.map +1 -1
  52. 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
- - Use **ScrollArea** with a fixed or max height (e.g. `className="h-[300px]"` or `max-h-[50vh]`) when content can overflow.
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
- Example: scrollable card body wrap the body in ScrollArea with a height so the card doesn’t grow past the viewport; the content inside scrolls.
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