@machinemetrics/mm-react-components 1.1.0 → 1.1.1-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/CHANGELOG.md CHANGED
@@ -5,7 +5,35 @@ All notable changes to this project will be documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
- ## [1.0.0] - 2025-02-04
8
+ ## [1.1.1] - 2026-02-17
9
+
10
+ ### Added
11
+
12
+ - **Badge `shape` prop:** Use `shape="pill"` for compact rounded pill badges (e.g. counts) instead of custom classes. Combines with all variants: `<Badge shape="pill" variant="secondary">12</Badge>`.
13
+
14
+ ### Fixed
15
+
16
+ - **Badge formatting / colors:** Badge `secondary` and `outline` variants now have explicit Carbide theme rules in `carbide.css`. Previously only `default` and `destructive` were themed; secondary/outline relied on Tailwind utilities and could lose colors or contrast when consumers used theme-only CSS or misconfigured setup. All four variants now use theme-driven background, text, and border.
17
+ - **Alert formatting / colors:** Alert `default` and `destructive` variants now have explicit Carbide theme rules in `carbide.css`. Previously only `success` and `warning` were themed; default/destructive relied on Tailwind utilities. All four Alert variants (default, destructive, success, warning) are now theme-driven.
18
+ - **Alert variant type:** Alert `variant` prop now correctly accepts `"success"` and `"warning"` in TypeScript (previously narrowed to `default` | `destructive` when intersecting with base component props).
19
+
20
+ ### Changed
21
+
22
+ - Badge preview uses `shape="pill"` and shows all four variants in pill form.
23
+ - Alert preview shows all four variants (default, destructive, success, warning).
24
+ - Skill and agent-docs: reference and init guides now note that Badge (and themed components) require the library styles import and a parent with class `carbide` for correct colors and contrast.
25
+
26
+ ---
27
+
28
+ ## [1.1.0] - 2026-02-13
29
+
30
+ ### Added
31
+
32
+ - **VirtualizedCombobox:** Popover + Command + ScrollArea combobox with `useLazyComboboxOptions` (lazy load on open, infinite scroll, debounced search).
33
+
34
+ ---
35
+
36
+ ## [1.0.0] - 2026-02-04
9
37
 
10
38
  Summary of changes from v0.2.x (main) to 1.0: full shadcn component set, one-command init, Carbide AI skill, zero-config default, and package/docs cleanup.
11
39
 
@@ -52,7 +52,8 @@ This directory contains comprehensive documentation and tools for AI agents work
52
52
 
53
53
  | Component | Exports | Description |
54
54
  | -------------- | --------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------- |
55
- | **Card** | `Card`, `CardHeader`, `CardTitle`, `CardDescription`, `CardContent`, `CardFooter` | Content container with sections |
55
+ | **Card** | `Card`, `CardHeader`, `CardTitle`, `CardDescription`, `CardContent`, `CardFooter` | Content container with sections (no built-in scroll) |
56
+ | **ScrollArea** | `ScrollArea`, `ScrollBar` | Scrollable region; use when content can overflow a fixed-height box |
56
57
  | **Separator** | `Separator` | Visual divider |
57
58
  | **Tabs** | `Tabs`, `TabsList`, `TabsTrigger`, `TabsContent` | Tabbed interface |
58
59
  | **Breadcrumb** | `Breadcrumb`, `BreadcrumbList`, `BreadcrumbItem`, `BreadcrumbLink`, `BreadcrumbPage`, `BreadcrumbSeparator`, `BreadcrumbEllipsis` | Navigation breadcrumbs |
@@ -123,6 +124,43 @@ All components follow shadcn/ui patterns with Carbide theme integration for indu
123
124
 
124
125
  ## Component Usage Guides
125
126
 
127
+ ### Scrolling content: Card vs ScrollArea
128
+
129
+ **There is no "Panel" component.** For a panel-like or card-like region where content may be longer than the visible area, use **ScrollArea** around the scrollable content. **Card** is a structural container (border, padding, sections) and does not add scrolling.
130
+
131
+ - **Card**: Use for layout and visual grouping (CardHeader, CardTitle, CardContent, CardFooter). Card does not scroll; overflowing content will clip or spill.
132
+ - **ScrollArea**: Use when content can exceed the box height. Give ScrollArea a fixed or max height (e.g. `className="h-[300px]"` or `max-h-[50vh]`) and put the long content inside it.
133
+
134
+ **Pattern for a scrollable card/panel:**
135
+
136
+ ```tsx
137
+ import { Card, CardHeader, CardTitle, CardContent, ScrollArea } from '@machinemetrics/mm-react-components';
138
+
139
+ <Card className="flex max-h-[80vh] flex-col">
140
+ <CardHeader>
141
+ <CardTitle>Panel title</CardTitle>
142
+ </CardHeader>
143
+ <ScrollArea className="flex-1 min-h-0">
144
+ <CardContent>
145
+ {/* Long content here scrolls inside the card */}
146
+ </CardContent>
147
+ </ScrollArea>
148
+ </Card>
149
+ ```
150
+
151
+ Or wrap only the body in ScrollArea with a fixed height:
152
+
153
+ ```tsx
154
+ <Card>
155
+ <CardHeader><CardTitle>Title</CardTitle></CardHeader>
156
+ <ScrollArea className="h-[200px] rounded-md border">
157
+ <div className="p-4">{/* long content */}</div>
158
+ </ScrollArea>
159
+ </Card>
160
+ ```
161
+
162
+ Use ScrollArea for: side panels, detail panels, card bodies with variable/long content, list regions inside dialogs or sheets. Do not rely on Card alone for scroll.
163
+
126
164
  ### DataTable: Server-Side Pagination
127
165
 
128
166
  The `DataTable` component supports both client-side and server-side pagination. When implementing server-side pagination, use the following pattern:
@@ -1,13 +1,11 @@
1
1
  import * as React from 'react';
2
2
  import { type VariantProps } from 'class-variance-authority';
3
3
  export { AlertTitle, AlertDescription } from '@/components/shadcn/alert';
4
+ import { Alert as BaseAlert } from '@/components/shadcn/alert';
4
5
  declare const alertVariants: (props?: ({
5
6
  variant?: "default" | "destructive" | "success" | "warning" | null | undefined;
6
7
  } & import("class-variance-authority/types").ClassProp) | undefined) => string;
7
- declare const Alert: React.ForwardRefExoticComponent<Omit<React.ClassAttributes<HTMLDivElement> & React.HTMLAttributes<HTMLDivElement> & VariantProps<(props?: ({
8
- variant?: "default" | "destructive" | null | undefined;
9
- } & import("class-variance-authority/types").ClassProp) | undefined) => string> & VariantProps<(props?: ({
10
- variant?: "default" | "destructive" | "success" | "warning" | null | undefined;
11
- } & import("class-variance-authority/types").ClassProp) | undefined) => string>, "ref"> & React.RefAttributes<HTMLDivElement>>;
8
+ type AlertProps = Omit<React.ComponentProps<typeof BaseAlert>, 'variant'> & VariantProps<typeof alertVariants>;
9
+ declare const Alert: React.ForwardRefExoticComponent<Omit<AlertProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
12
10
  export { Alert, alertVariants };
13
11
  //# sourceMappingURL=alert.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"alert.d.ts","sourceRoot":"","sources":["../../../src/components/ui/alert.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAKlE,OAAO,EAAE,UAAU,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAOzE,QAAA,MAAM,aAAa;;8EAiBlB,CAAC;AAGF,QAAA,MAAM,KAAK;;;;8HAcT,CAAC;AAIH,OAAO,EAAE,KAAK,EAAE,aAAa,EAAE,CAAC"}
1
+ {"version":3,"file":"alert.d.ts","sourceRoot":"","sources":["../../../src/components/ui/alert.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAKlE,OAAO,EAAE,UAAU,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAGzE,OAAO,EAAE,KAAK,IAAI,SAAS,EAAE,MAAM,2BAA2B,CAAC;AAI/D,QAAA,MAAM,aAAa;;8EAiBlB,CAAC;AAGF,KAAK,UAAU,GAAG,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,OAAO,SAAS,CAAC,EAAE,SAAS,CAAC,GACvE,YAAY,CAAC,OAAO,aAAa,CAAC,CAAC;AAErC,QAAA,MAAM,KAAK,gGAcV,CAAC;AAIF,OAAO,EAAE,KAAK,EAAE,aAAa,EAAE,CAAC"}
@@ -1,11 +1,11 @@
1
1
  import * as React from 'react';
2
+ import { type VariantProps } from 'class-variance-authority';
3
+ import { Badge as BaseBadge } from '@/components/shadcn/badge';
2
4
  declare const badgeVariants: (props?: ({
3
5
  variant?: "default" | "destructive" | "outline" | "secondary" | null | undefined;
6
+ shape?: "default" | "pill" | null | undefined;
4
7
  } & import("class-variance-authority/types").ClassProp) | undefined) => string;
5
- declare const Badge: React.ForwardRefExoticComponent<Omit<React.ClassAttributes<HTMLSpanElement> & React.HTMLAttributes<HTMLSpanElement> & import("class-variance-authority").VariantProps<(props?: ({
6
- variant?: "default" | "destructive" | "outline" | "secondary" | null | undefined;
7
- } & import("class-variance-authority/types").ClassProp) | undefined) => string> & {
8
- asChild?: boolean;
9
- }, "ref"> & React.RefAttributes<HTMLSpanElement>>;
8
+ type BadgeProps = React.ComponentProps<typeof BaseBadge> & VariantProps<typeof badgeVariants>;
9
+ declare const Badge: React.ForwardRefExoticComponent<Omit<BadgeProps, "ref"> & React.RefAttributes<HTMLSpanElement>>;
10
10
  export { Badge, badgeVariants };
11
11
  //# sourceMappingURL=badge.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"badge.d.ts","sourceRoot":"","sources":["../../../src/components/ui/badge.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAW/B,QAAA,MAAM,aAAa;;8EAoBlB,CAAC;AAGF,QAAA,MAAM,KAAK;;;;iDAeT,CAAC;AAIH,OAAO,EAAE,KAAK,EAAE,aAAa,EAAE,CAAC"}
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;AAKlE,OAAO,EAAE,KAAK,IAAI,SAAS,EAAE,MAAM,2BAA2B,CAAC;AAK/D,QAAA,MAAM,aAAa;;;8EAyBlB,CAAC;AAGF,KAAK,UAAU,GAAG,KAAK,CAAC,cAAc,CAAC,OAAO,SAAS,CAAC,GACtD,YAAY,CAAC,OAAO,aAAa,CAAC,CAAC;AAErC,QAAA,MAAM,KAAK,iGAoBV,CAAC;AAIF,OAAO,EAAE,KAAK,EAAE,aAAa,EAAE,CAAC"}
@@ -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;AAO/B,OAAO,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAG5D,QAAA,MAAM,MAAM;;;;;mDAeV,CAAC;AAIH,OAAO,EAAE,MAAM,EAAE,CAAC"}
1
+ {"version":3,"file":"button.d.ts","sourceRoot":"","sources":["../../../src/components/ui/button.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAO/B,OAAO,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAG5D,QAAA,MAAM,MAAM;;;;;mDAiBV,CAAC;AAIH,OAAO,EAAE,MAAM,EAAE,CAAC"}
@@ -1,5 +1,9 @@
1
1
  import * as React from 'react';
2
- export { MenubarPortal, MenubarMenu, MenubarTrigger, MenubarContent, MenubarGroup, MenubarSeparator, MenubarLabel, MenubarItem, MenubarShortcut, MenubarCheckboxItem, MenubarRadioGroup, MenubarRadioItem, MenubarSub, MenubarSubTrigger, MenubarSubContent, } from '@/components/shadcn/menubar';
2
+ export { MenubarPortal, MenubarMenu, MenubarTrigger, MenubarContent, MenubarGroup, MenubarSeparator, MenubarLabel, MenubarShortcut, MenubarCheckboxItem, MenubarRadioGroup, MenubarRadioItem, MenubarSub, MenubarSubTrigger, MenubarSubContent, } from '@/components/shadcn/menubar';
3
+ declare const MenubarItem: React.ForwardRefExoticComponent<Omit<import("@radix-ui/react-menubar").MenubarItemProps & React.RefAttributes<HTMLDivElement> & {
4
+ inset?: boolean;
5
+ variant?: "default" | "destructive";
6
+ }, "ref"> & React.RefAttributes<HTMLDivElement>>;
3
7
  declare const Menubar: React.ForwardRefExoticComponent<Omit<import("@radix-ui/react-menubar").MenubarProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
4
- export { Menubar };
8
+ export { Menubar, MenubarItem };
5
9
  //# sourceMappingURL=menubar.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"menubar.d.ts","sourceRoot":"","sources":["../../../src/components/ui/menubar.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAO/B,OAAO,EACL,aAAa,EACb,WAAW,EACX,cAAc,EACd,cAAc,EACd,YAAY,EACZ,gBAAgB,EAChB,YAAY,EACZ,WAAW,EACX,eAAe,EACf,mBAAmB,EACnB,iBAAiB,EACjB,gBAAgB,EAChB,UAAU,EACV,iBAAiB,EACjB,iBAAiB,GAClB,MAAM,6BAA6B,CAAC;AAGrC,QAAA,MAAM,OAAO,0KAKX,CAAC;AAIH,OAAO,EAAE,OAAO,EAAE,CAAC"}
1
+ {"version":3,"file":"menubar.d.ts","sourceRoot":"","sources":["../../../src/components/ui/menubar.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAU/B,OAAO,EACL,aAAa,EACb,WAAW,EACX,cAAc,EACd,cAAc,EACd,YAAY,EACZ,gBAAgB,EAChB,YAAY,EACZ,eAAe,EACf,mBAAmB,EACnB,iBAAiB,EACjB,gBAAgB,EAChB,UAAU,EACV,iBAAiB,EACjB,iBAAiB,GAClB,MAAM,6BAA6B,CAAC;AAGrC,QAAA,MAAM,WAAW;;;gDAKf,CAAC;AAIH,QAAA,MAAM,OAAO,0KAKX,CAAC;AAIH,OAAO,EAAE,OAAO,EAAE,WAAW,EAAE,CAAC"}
@@ -1,2 +1,6 @@
1
- export { ToggleGroup, ToggleGroupItem } from '@/components/shadcn/toggle-group';
1
+ import * as React from 'react';
2
+ import { ToggleGroup as BaseToggleGroup, ToggleGroupItem as BaseToggleGroupItem } from '@/components/shadcn/toggle-group';
3
+ declare function ToggleGroup({ variant, size, ...props }: React.ComponentProps<typeof BaseToggleGroup>): import("react/jsx-runtime").JSX.Element;
4
+ declare function ToggleGroupItem({ variant, size, ...props }: React.ComponentProps<typeof BaseToggleGroupItem>): import("react/jsx-runtime").JSX.Element;
5
+ export { ToggleGroup, ToggleGroupItem };
2
6
  //# sourceMappingURL=toggle-group.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"toggle-group.d.ts","sourceRoot":"","sources":["../../../src/components/ui/toggle-group.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,kCAAkC,CAAC"}
1
+ {"version":3,"file":"toggle-group.d.ts","sourceRoot":"","sources":["../../../src/components/ui/toggle-group.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EACL,WAAW,IAAI,eAAe,EAC9B,eAAe,IAAI,mBAAmB,EACvC,MAAM,kCAAkC,CAAC;AAG1C,iBAAS,WAAW,CAAC,EACnB,OAAO,EACP,IAAI,EACJ,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,eAAe,CAAC,2CAU9C;AAED,iBAAS,eAAe,CAAC,EACvB,OAAO,EACP,IAAI,EACJ,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,mBAAmB,CAAC,2CAUlD;AAED,OAAO,EAAE,WAAW,EAAE,eAAe,EAAE,CAAC"}
@@ -33,6 +33,8 @@ description: Generate UIs and widgets with Carbide and MachineMetrics React Comp
33
33
 
34
34
  **Avoid:** Hardcoded colors (e.g. `bg-blue-600`, `text-gray-500`); inline brand styling; non-semantic HTML; missing focus or labels on interactive elements.
35
35
 
36
+ **Scrolling:** There is no Panel component. For panel-like or card-like regions where content can be longer than the box, use **ScrollArea** with a fixed or max height (e.g. `h-[300px]` or `max-h-[50vh]`) around the scrollable content. Card is for structure only and does not scroll—wrap CardContent (or the scrollable body) in ScrollArea when content may overflow.
37
+
36
38
  ## Widget rules
37
39
 
38
40
  - **Visual, not textual**: Every widget must include at least one chart, graph, or visual data representation. Text is for titles, labels, and brief annotations only (80% visuals / 20% text max).
@@ -17,7 +17,7 @@
17
17
 
18
18
  Import from the package main entry (see `src/index.ts` in the repo for the full list).
19
19
 
20
- **Layout and structure**: PageHeader, Card (CardHeader, CardTitle, CardDescription, CardContent, CardFooter), Tabs (TabsList, TabsTrigger, TabsContent), Sidebar, Breadcrumb, Field (FieldLabel, FieldDescription, FieldError, FieldGroup, etc.), Item (ItemMedia, ItemContent, ItemActions, etc.).
20
+ **Layout and structure**: PageHeader, Card (CardHeader, CardTitle, CardDescription, CardContent, CardFooter), **ScrollArea** (ScrollBar), Tabs (TabsList, TabsTrigger, TabsContent), Sidebar, Breadcrumb, Field (FieldLabel, FieldDescription, FieldError, FieldGroup, etc.), Item (ItemMedia, ItemContent, ItemActions, etc.).
21
21
 
22
22
  **Overlays and dialogs**: Dialog (DialogTrigger, DialogContent, DialogHeader, DialogFooter, etc.), Sheet, Drawer, AlertDialog, Popover, Tooltip (TooltipTrigger, TooltipContent, TooltipProvider), DropdownMenu, HoverCard, ContextMenu.
23
23
 
@@ -27,7 +27,16 @@ Import from the package main entry (see `src/index.ts` in the repo for the full
27
27
 
28
28
  **Feedback and actions**: Button, buttonVariants, ButtonGroup; Toaster, toast; Alert, AlertTitle, AlertDescription; Spinner, SpinnerCarbide; Pagination, SimplePagination; Empty (EmptyHeader, EmptyTitle, EmptyDescription, etc.).
29
29
 
30
- **Other**: Accordion, Collapsible, Separator, ScrollArea, Dropzone, ResizablePanelGroup, Carousel, Command, CodePreview, Kbd, cn (utility). Theme: activateCarbideTheme, toggleCarbideTheme, isCarbideThemeActive, etc.
30
+ **Other**: Accordion, Collapsible, Separator, Dropzone, ResizablePanelGroup, Carousel, Command, CodePreview, Kbd, cn (utility). Theme: activateCarbideTheme, toggleCarbideTheme, isCarbideThemeActive, etc.
31
+
32
+ ## Scrolling: Card vs ScrollArea
33
+
34
+ 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
+ - Use **ScrollArea** with a fixed or max height (e.g. `className="h-[300px]"` or `max-h-[50vh]`) when content can overflow.
37
+ - 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
+
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.
31
40
 
32
41
  ## Patterns
33
42