@brightlocal/ui-components 2.2.0 → 2.4.0
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/AI_USAGE.md +1 -1
- package/README.md +6 -5
- package/component-meta.json +531 -32
- package/dist/blocks/data-table.cjs +1 -1
- package/dist/blocks/data-table.d.ts +380 -196
- package/dist/blocks/data-table.d.ts.map +1 -1
- package/dist/blocks/data-table.js +452 -449
- package/dist/callout.cjs +1 -0
- package/dist/callout.d.ts +51 -0
- package/dist/callout.d.ts.map +1 -0
- package/dist/callout.js +114 -0
- package/dist/carousel.cjs +1 -1
- package/dist/carousel.d.ts +40 -4
- package/dist/carousel.d.ts.map +1 -1
- package/dist/carousel.js +156 -101
- package/dist/combobox.cjs +1 -1
- package/dist/combobox.js +2 -2
- package/dist/command.cjs +1 -1
- package/dist/command.js +27 -27
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +436 -426
- package/dist/input-chip.cjs +1 -1
- package/dist/input-chip.js +1 -1
- package/dist/input-group.cjs +1 -1
- package/dist/input-group.js +1 -1
- package/dist/input-otp.cjs +1 -1
- package/dist/input-otp.js +9 -9
- package/dist/input.cjs +1 -1
- package/dist/input.d.ts.map +1 -1
- package/dist/input.js +6 -7
- package/dist/sheet.d.ts +1 -1
- package/dist/split-layout.cjs +1 -1
- package/dist/split-layout.d.ts +17 -3
- package/dist/split-layout.d.ts.map +1 -1
- package/dist/split-layout.js +86 -114
- package/dist/textarea.cjs +1 -1
- package/dist/textarea.js +6 -6
- package/package.json +34 -10
- package/src/blocks/data-table.tsx +865 -679
- package/src/components/callout.tsx +182 -0
- package/src/components/carousel.tsx +121 -3
- package/src/components/combobox.tsx +2 -2
- package/src/components/command.tsx +1 -1
- package/src/components/input-chip.tsx +1 -1
- package/src/components/input-group.tsx +1 -1
- package/src/components/input-otp.tsx +1 -1
- package/src/components/input.tsx +2 -3
- package/src/components/split-layout.tsx +27 -65
- package/src/components/textarea.tsx +1 -1
- package/src/index.ts +1 -0
package/AI_USAGE.md
CHANGED
|
@@ -63,7 +63,7 @@ import { Input } from "@brightlocal/ui-components/input";
|
|
|
63
63
|
import { Dialog, DialogContent, DialogTrigger, DialogTitle } from "@brightlocal/ui-components/dialog";
|
|
64
64
|
import { Card, CardHeader, CardContent } from "@brightlocal/ui-components/card";
|
|
65
65
|
import { cn } from "@brightlocal/ui-components/lib/utils";
|
|
66
|
-
import { DataTable } from "@brightlocal/ui-components/
|
|
66
|
+
import { DataTable, useDataTable } from "@brightlocal/ui-components/data-table";
|
|
67
67
|
```
|
|
68
68
|
|
|
69
69
|
### Wrong — Barrel imports
|
package/README.md
CHANGED
|
@@ -24,7 +24,7 @@ pnpm add @brightlocal/tokens
|
|
|
24
24
|
|
|
25
25
|
## Components
|
|
26
26
|
|
|
27
|
-
This package includes
|
|
27
|
+
This package includes 63 components and 3 blocks built on Radix UI primitives and other React libraries. All components are fully typed with TypeScript and follow BrightLocal's design system patterns.
|
|
28
28
|
|
|
29
29
|
### Layout Components
|
|
30
30
|
|
|
@@ -91,7 +91,7 @@ This package includes 62 components and 3 blocks built on Radix UI primitives an
|
|
|
91
91
|
|
|
92
92
|
### Block Components
|
|
93
93
|
|
|
94
|
-
- **DataTable** - Complex data table with sorting, filtering, and pagination
|
|
94
|
+
- **DataTable** - Complex data table with sorting, filtering, and pagination (composable `useDataTable` hook + `DataTable` renderer + helpers)
|
|
95
95
|
- **InputList** - Editable list of text items with add/remove, paste support, and validation
|
|
96
96
|
- **Sidebar** - Complex sidebar navigation with collapsible support
|
|
97
97
|
|
|
@@ -333,15 +333,16 @@ Components are exported per-file (not barrel imports). Use the component name in
|
|
|
333
333
|
```tsx
|
|
334
334
|
import { Button } from "@brightlocal/ui-components/button";
|
|
335
335
|
import { Dialog, DialogContent, DialogTrigger } from "@brightlocal/ui-components/dialog";
|
|
336
|
-
import { DataTable } from "@brightlocal/ui-components/
|
|
336
|
+
import { DataTable } from "@brightlocal/ui-components/data-table";
|
|
337
337
|
import { useIsMobile } from "@brightlocal/ui-components/hooks/use-mobile";
|
|
338
338
|
import { cn } from "@brightlocal/ui-components/lib/utils";
|
|
339
339
|
```
|
|
340
340
|
|
|
341
|
+
> **Avoid** barrel imports like `import { Button } from "@brightlocal/ui-components"` — this loads all ui-components and hurts bundle size. Always use the direct path.
|
|
342
|
+
|
|
341
343
|
| Path pattern | Example |
|
|
342
344
|
|---|---|
|
|
343
|
-
| `@brightlocal/ui-components/{component}` | `/button`, `/input`, `/dialog`, `/select` |
|
|
344
|
-
| `@brightlocal/ui-components/blocks/{block}` | `/blocks/data-table`, `/blocks/sidebar` |
|
|
345
|
+
| `@brightlocal/ui-components/{component}` | `/button`, `/input`, `/dialog`, `/select`, `/data-table`, `/sidebar`, `/input-list` |
|
|
345
346
|
| `@brightlocal/ui-components/hooks/{hook}` | `/hooks/use-mobile` |
|
|
346
347
|
| `@brightlocal/ui-components/lib/{util}` | `/lib/utils` |
|
|
347
348
|
|