@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.
Files changed (52) hide show
  1. package/AI_USAGE.md +1 -1
  2. package/README.md +6 -5
  3. package/component-meta.json +531 -32
  4. package/dist/blocks/data-table.cjs +1 -1
  5. package/dist/blocks/data-table.d.ts +380 -196
  6. package/dist/blocks/data-table.d.ts.map +1 -1
  7. package/dist/blocks/data-table.js +452 -449
  8. package/dist/callout.cjs +1 -0
  9. package/dist/callout.d.ts +51 -0
  10. package/dist/callout.d.ts.map +1 -0
  11. package/dist/callout.js +114 -0
  12. package/dist/carousel.cjs +1 -1
  13. package/dist/carousel.d.ts +40 -4
  14. package/dist/carousel.d.ts.map +1 -1
  15. package/dist/carousel.js +156 -101
  16. package/dist/combobox.cjs +1 -1
  17. package/dist/combobox.js +2 -2
  18. package/dist/command.cjs +1 -1
  19. package/dist/command.js +27 -27
  20. package/dist/index.cjs +1 -1
  21. package/dist/index.d.ts +1 -0
  22. package/dist/index.d.ts.map +1 -1
  23. package/dist/index.js +436 -426
  24. package/dist/input-chip.cjs +1 -1
  25. package/dist/input-chip.js +1 -1
  26. package/dist/input-group.cjs +1 -1
  27. package/dist/input-group.js +1 -1
  28. package/dist/input-otp.cjs +1 -1
  29. package/dist/input-otp.js +9 -9
  30. package/dist/input.cjs +1 -1
  31. package/dist/input.d.ts.map +1 -1
  32. package/dist/input.js +6 -7
  33. package/dist/sheet.d.ts +1 -1
  34. package/dist/split-layout.cjs +1 -1
  35. package/dist/split-layout.d.ts +17 -3
  36. package/dist/split-layout.d.ts.map +1 -1
  37. package/dist/split-layout.js +86 -114
  38. package/dist/textarea.cjs +1 -1
  39. package/dist/textarea.js +6 -6
  40. package/package.json +34 -10
  41. package/src/blocks/data-table.tsx +865 -679
  42. package/src/components/callout.tsx +182 -0
  43. package/src/components/carousel.tsx +121 -3
  44. package/src/components/combobox.tsx +2 -2
  45. package/src/components/command.tsx +1 -1
  46. package/src/components/input-chip.tsx +1 -1
  47. package/src/components/input-group.tsx +1 -1
  48. package/src/components/input-otp.tsx +1 -1
  49. package/src/components/input.tsx +2 -3
  50. package/src/components/split-layout.tsx +27 -65
  51. package/src/components/textarea.tsx +1 -1
  52. 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/blocks/data-table";
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 62 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.
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/blocks/data-table";
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