@carefully-built/saas-kit 0.1.3 → 0.1.5

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 (2) hide show
  1. package/README.md +147 -13
  2. package/package.json +2 -2
package/README.md CHANGED
@@ -1,32 +1,166 @@
1
- # Carefully Built SaaS Kit
1
+ # @carefully-built/saas-kit
2
2
 
3
- One install for Carefully Built SaaS components and helpers.
3
+ One install for Carefully Built SaaS components, product surfaces, and helpers.
4
+
5
+ Carefully Built SaaS Kit exists so every new B2B product does not have to reinvent the same tables, forms, filters, sheets, settings, files, notifications, calendars, and dashboard patterns from scratch.
6
+
7
+ Use this package when you want managed npm imports and shared upgrades across apps. Use `@carefully-built/cli` when you want to eject editable component source into an app.
8
+
9
+ ## Component Previews
10
+
11
+ <img src="https://raw.githubusercontent.com/AlessandroDodi/carefully-built-saas-kit/main/docs/saas-kit/images/smarttable.png" alt="Smart Table" width="360" />
12
+ <img src="https://raw.githubusercontent.com/AlessandroDodi/carefully-built-saas-kit/main/docs/saas-kit/images/responsivesheet.png" alt="Responsive Sheet" width="360" />
13
+ <img src="https://raw.githubusercontent.com/AlessandroDodi/carefully-built-saas-kit/main/docs/saas-kit/images/kanban.png" alt="Kanban" width="360" />
14
+ <img src="https://raw.githubusercontent.com/AlessandroDodi/carefully-built-saas-kit/main/docs/saas-kit/images/charts.png" alt="Charts" width="360" />
15
+ <img src="https://raw.githubusercontent.com/AlessandroDodi/carefully-built-saas-kit/main/docs/saas-kit/images/notifications.png" alt="Notifications" width="360" />
16
+ <img src="https://raw.githubusercontent.com/AlessandroDodi/carefully-built-saas-kit/main/docs/saas-kit/images/search.png" alt="Search" width="360" />
17
+ <img src="https://raw.githubusercontent.com/AlessandroDodi/carefully-built-saas-kit/main/docs/saas-kit/images/calendar.png" alt="Calendar" width="360" />
18
+ <img src="https://raw.githubusercontent.com/AlessandroDodi/carefully-built-saas-kit/main/docs/saas-kit/images/maps.png" alt="Maps" width="360" />
19
+ <img src="https://raw.githubusercontent.com/AlessandroDodi/carefully-built-saas-kit/main/docs/saas-kit/images/superadmin.png" alt="Superadmin" width="360" />
20
+ <img src="https://raw.githubusercontent.com/AlessandroDodi/carefully-built-saas-kit/main/docs/saas-kit/images/widgets.png" alt="Widgets" width="360" />
21
+ <img src="https://raw.githubusercontent.com/AlessandroDodi/carefully-built-saas-kit/main/docs/saas-kit/images/file-dropper.png" alt="Files" width="360" />
22
+ <img src="https://raw.githubusercontent.com/AlessandroDodi/carefully-built-saas-kit/main/docs/saas-kit/images/theme-switcher.png" alt="Theme" width="360" />
23
+
24
+ ## Install
4
25
 
5
26
  ```bash
6
27
  bun add @carefully-built/saas-kit
7
28
  ```
8
29
 
9
30
  ```tsx
10
- import { SmartTable, ResourcePageShell, WorkosOrganizationLogo } from '@carefully-built/saas-kit';
31
+ import { Button, SmartTable, TableToolbar, ResponsiveSheet } from "@carefully-built/saas-kit";
32
+ ```
33
+
34
+ The package includes the modular Carefully Built packages as dependencies. Your app should still install the framework peer dependencies it actually uses, such as React, Next.js, Convex, WorkOS, Radix primitives, React Hook Form, TipTap, FullCalendar, and Recharts.
35
+
36
+ ## Package Modules
37
+
38
+ Import from the root for shared UI primitives, or from a subpath for a product area.
39
+
40
+ | Module | Use for |
41
+ |---|---|
42
+ | `@carefully-built/saas-kit` | Shared UI primitives, table tools, overlays, empty states, error pages, hooks, and utilities |
43
+ | `@carefully-built/saas-kit/agenda` | Calendar and agenda surfaces |
44
+ | `@carefully-built/saas-kit/app-shell` | Dashboard shell, responsive navigation, page layouts, and mobile bottom navigation |
45
+ | `@carefully-built/saas-kit/association-picker` | Searchable association selection |
46
+ | `@carefully-built/saas-kit/auth-pages` | Auth forms, controllers, pages, social login, organizations, and WorkOS auth UI |
47
+ | `@carefully-built/saas-kit/automations` | Automation builder state, canvas, options, and draft helpers |
48
+ | `@carefully-built/saas-kit/charts` | Dashboard chart widgets |
49
+ | `@carefully-built/saas-kit/convex-crud` | Convex CRUD helpers |
50
+ | `@carefully-built/saas-kit/convex-multitenant` | Convex multitenancy helpers |
51
+ | `@carefully-built/saas-kit/convex-platform` | Convex platform association helpers |
52
+ | `@carefully-built/saas-kit/convex-workos` | Convex WorkOS integration helpers |
53
+ | `@carefully-built/saas-kit/crud` | CRUD table/page state and URL filters |
54
+ | `@carefully-built/saas-kit/custom-fields` | Custom field definitions and inputs |
55
+ | `@carefully-built/saas-kit/files` | Document cards, grids, uploads, and file filtering |
56
+ | `@carefully-built/saas-kit/forms` | Schema/custom forms and user picker fields |
57
+ | `@carefully-built/saas-kit/import-export` | CSV import/export helpers and sheets |
58
+ | `@carefully-built/saas-kit/kanban` | Kanban board and pipeline helpers |
59
+ | `@carefully-built/saas-kit/legal-ui` | Legal document renderer and default legal text |
60
+ | `@carefully-built/saas-kit/maps-ui` | Google Maps Places loader helpers |
61
+ | `@carefully-built/saas-kit/notes` | Notes CRUD page and note list types |
62
+ | `@carefully-built/saas-kit/notifications` | Notification lists, buttons, and visual metadata |
63
+ | `@carefully-built/saas-kit/resource-kit` | Resource pages, entity detail shells, associated tabs, and toast helpers |
64
+ | `@carefully-built/saas-kit/rich-text` | Rich text editor and renderer |
65
+ | `@carefully-built/saas-kit/search` | Search and command palette modules |
66
+ | `@carefully-built/saas-kit/settings-ui` | Settings cards and settings tab surfaces |
67
+ | `@carefully-built/saas-kit/superadmin` | Superadmin UI, server helpers, and Next.js page factory |
68
+ | `@carefully-built/saas-kit/theme-ui` | Theme selector components |
69
+ | `@carefully-built/saas-kit/ui` | Direct access to the UI package barrel |
70
+ | `@carefully-built/saas-kit/user-picker` | User picker package barrel |
71
+ | `@carefully-built/saas-kit/widgets` | Dashboard widget wrappers |
72
+ | `@carefully-built/saas-kit/workos` | WorkOS organization UI and server helpers |
73
+ | `@carefully-built/saas-kit/server` | Server-only helpers |
74
+ | `@carefully-built/saas-kit/next` | Next.js helpers |
75
+
76
+ Example subpath imports:
77
+
78
+ ```tsx
79
+ import { DashboardPageLayout } from "@carefully-built/saas-kit/app-shell";
80
+ import { AuthLoginPage } from "@carefully-built/saas-kit/auth-pages/pages";
81
+ import { createWorkOSWidgetTokenResponse } from "@carefully-built/saas-kit/server";
82
+ import { createSuperAdminPage } from "@carefully-built/saas-kit/next";
11
83
  ```
12
84
 
13
- Use the CLI when you want editable source code copied into your app instead:
85
+ ## Full UI Registry
86
+
87
+ Every public UI module exported by `@carefully-built/ui` is available through `@carefully-built/saas-kit` and through the CLI registry.
88
+
89
+ | Registry entry | Managed import | Editable source |
90
+ |---|---|---|
91
+ | `avatar` | `import { Avatar, AvatarFallback, AvatarImage } from "@carefully-built/saas-kit"` | `bunx @carefully-built/cli add avatar` |
92
+ | `button` | `import { Button, ButtonSize, ButtonVariant, buttonVariants } from "@carefully-built/saas-kit"` | `bunx @carefully-built/cli add button` |
93
+ | `calendar` | `import { Calendar } from "@carefully-built/saas-kit"` | `bunx @carefully-built/cli add calendar` |
94
+ | `card` | `import { Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle } from "@carefully-built/saas-kit"` | `bunx @carefully-built/cli add card` |
95
+ | `chip` | `import { Chip, ChipButton } from "@carefully-built/saas-kit"` | `bunx @carefully-built/cli add chip` |
96
+ | `chip-utils` | `import { CHIP_CLASS_NAMES, ChipSize, getChipClassName } from "@carefully-built/saas-kit"` | `bunx @carefully-built/cli add chip-utils` |
97
+ | `date-display` | `import { DateDisplayValue, formatAbsoluteDate, formatDisplayDate } from "@carefully-built/saas-kit"` | `bunx @carefully-built/cli add date-display` |
98
+ | `dialog` | `import { Dialog, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay } from "@carefully-built/saas-kit"` | `bunx @carefully-built/cli add dialog` |
99
+ | `display-date` | `import { DisplayDate } from "@carefully-built/saas-kit"` | `bunx @carefully-built/cli add display-date` |
100
+ | `drawer` | `import { Drawer, DrawerContent, DrawerDescription, DrawerHeader, DrawerOverlay, DrawerPortal } from "@carefully-built/saas-kit"` | `bunx @carefully-built/cli add drawer` |
101
+ | `dropdown-menu` | `import { DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuItem, DropdownMenuLabel, DropdownMenuSeparator } from "@carefully-built/saas-kit"` | `bunx @carefully-built/cli add dropdown-menu` |
102
+ | `empty-state` | `import { CollectionEmptyState, EmptyStateCard, InitialEmptyState, NoResultsState, ResolveCollectionEmptyStateOptions, resolveCollectionEmptyState } from "@carefully-built/saas-kit"` | `bunx @carefully-built/cli add empty-state` |
103
+ | `error-page` | `import { ErrorCode, ErrorPageContent, ErrorPageKind, PostHogErrorCapturePayload, ResolveErrorPageContentOptions, SaasErrorPage } from "@carefully-built/saas-kit"` | `bunx @carefully-built/cli add error-page` |
104
+ | `field-detail-row` | `import { FieldDetailRow } from "@carefully-built/saas-kit"` | `bunx @carefully-built/cli add field-detail-row` |
105
+ | `file-dropzone` | `import { FileDropzone } from "@carefully-built/saas-kit"` | `bunx @carefully-built/cli add file-dropzone` |
106
+ | `help-info-button` | `import { HelpInfoButton } from "@carefully-built/saas-kit"` | `bunx @carefully-built/cli add help-info-button` |
107
+ | `input` | `import { Input } from "@carefully-built/saas-kit"` | `bunx @carefully-built/cli add input` |
108
+ | `keyboard-shortcut-hint` | `import { KeyboardKeycap, ShortcutModifierKeycap } from "@carefully-built/saas-kit"` | `bunx @carefully-built/cli add keyboard-shortcut-hint` |
109
+ | `label` | `import { Label } from "@carefully-built/saas-kit"` | `bunx @carefully-built/cli add label` |
110
+ | `pagination` | `import { Pagination } from "@carefully-built/saas-kit"` | `bunx @carefully-built/cli add pagination` |
111
+ | `popover` | `import { Popover, PopoverContent, PopoverTrigger } from "@carefully-built/saas-kit"` | `bunx @carefully-built/cli add popover` |
112
+ | `responsive-sheet` | `import { ResponsiveSheet, SheetOutsideInteractionGuard } from "@carefully-built/saas-kit"` | `bunx @carefully-built/cli add responsive-sheet` |
113
+ | `responsive-sheet.footer` | `import { DesktopConfirmShortcutHint, SheetActionFooter } from "@carefully-built/saas-kit"` | `bunx @carefully-built/cli add responsive-sheet.footer` |
114
+ | `responsive-sheet.shortcuts` | `import { getDesktopShortcutModifierLabel, isAllowedConfirmShortcutEvent, useDesktopConfirmShortcut, useDesktopShortcutModifierLabel } from "@carefully-built/saas-kit"` | `bunx @carefully-built/cli add responsive-sheet.shortcuts` |
115
+ | `scroll-fade-area` | `import { ScrollFadeArea } from "@carefully-built/saas-kit"` | `bunx @carefully-built/cli add scroll-fade-area` |
116
+ | `search` | `import { SearchTextPart, buildSearchText, filterAndRankBySearch, rankBySearch, scoreFuzzyMatch } from "@carefully-built/saas-kit"` | `bunx @carefully-built/cli add search` |
117
+ | `searchable-select` | `import { AUTO_SEARCHABLE_SELECT_THRESHOLD, SearchableSelect, SearchableSelectOption, getSearchableSelectPortalContainer, isSearchableSelectPointerInside } from "@carefully-built/saas-kit"` | `bunx @carefully-built/cli add searchable-select` |
118
+ | `searchable-select-position` | `import { SearchableSelectRect, resolveSearchableSelectDropdownPosition } from "@carefully-built/saas-kit"` | `bunx @carefully-built/cli add searchable-select-position` |
119
+ | `segmented-toggle` | `import { SegmentedToggle, SegmentedToggleOption } from "@carefully-built/saas-kit"` | `bunx @carefully-built/cli add segmented-toggle` |
120
+ | `select` | `import { Select, SelectContent, SelectItem, SelectScrollDownButton, SelectScrollUpButton, SelectTrigger } from "@carefully-built/saas-kit"` | `bunx @carefully-built/cli add select` |
121
+ | `sheet` | `import { Sheet, SheetContent, SheetDescription, SheetHeader, SheetTitle } from "@carefully-built/saas-kit"` | `bunx @carefully-built/cli add sheet` |
122
+ | `skeleton` | `import { Skeleton } from "@carefully-built/saas-kit"` | `bunx @carefully-built/cli add skeleton` |
123
+ | `smart-table` | `import { ActionHandlers, ActionType, Column, ColumnAlign, PaginationConfig, SmartTable } from "@carefully-built/saas-kit"` | `bunx @carefully-built/cli add smart-table` |
124
+ | `switch` | `import { Switch } from "@carefully-built/saas-kit"` | `bunx @carefully-built/cli add switch` |
125
+ | `table` | `import { Table, TableBody, TableCaption, TableCell, TableFooter, TableHead } from "@carefully-built/saas-kit"` | `bunx @carefully-built/cli add table` |
126
+ | `table-toolbar` | `import { CustomTableToolbarFilter, FilterConfig, FilterDropdown, FilterOption, SearchInput, TableToolbar } from "@carefully-built/saas-kit"` | `bunx @carefully-built/cli add table-toolbar` |
127
+ | `tabs` | `import { Tabs, TabsContent, TabsList, TabsScrollArea, TabsTrigger, tabsListVariants } from "@carefully-built/saas-kit"` | `bunx @carefully-built/cli add tabs` |
128
+ | `textarea` | `import { Textarea } from "@carefully-built/saas-kit"` | `bunx @carefully-built/cli add textarea` |
129
+ | `tooltip` | `import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from "@carefully-built/saas-kit"` | `bunx @carefully-built/cli add tooltip` |
130
+ | `use-media-query` | `import { useIsMobile, useMediaQuery } from "@carefully-built/saas-kit"` | `bunx @carefully-built/cli add use-media-query` |
131
+ | `user-picker` | `import { UserPicker } from "@carefully-built/saas-kit"` | `bunx @carefully-built/cli add user-picker` |
132
+ | `user-picker-utils` | `import { UserPickerCopy, UserPickerOption, buildUserInitials, filterSelectableUsers, filterUsersBySearch, formatSelectedUserSummary } from "@carefully-built/saas-kit"` | `bunx @carefully-built/cli add user-picker-utils` |
133
+
134
+ Some entries export several related components, hooks, helpers, and types from one module. TypeScript autocomplete will show the full API after installing the kit.
135
+
136
+ ## Editable Source With The CLI
137
+
138
+ Use the CLI when a component should become local code that you can edit directly.
14
139
 
15
140
  ```bash
16
141
  bunx @carefully-built/cli list
142
+ bunx @carefully-built/cli add button
17
143
  bunx @carefully-built/cli add smart-table
144
+ bunx @carefully-built/cli add responsive-sheet
18
145
  ```
19
146
 
20
- The package includes the modular Carefully Built packages as dependencies. Your app should still install the framework peer dependencies it actually uses, such as React, Next.js, Convex, WorkOS, shadcn/Radix primitives, React Hook Form, TipTap, FullCalendar, and Recharts.
147
+ The CLI copies the component source and its local dependency closure into your app. It reads common shadcn project conventions such as `components.json` aliases and `tsconfig.json` paths.
21
148
 
22
- For server-only helpers:
149
+ ## Import vs Eject
23
150
 
24
- ```ts
25
- import { createWorkosOrganization } from '@carefully-built/saas-kit/server';
26
- ```
151
+ Import from `@carefully-built/saas-kit` when:
27
152
 
28
- For Next.js superadmin helpers:
153
+ - you want package updates and bug fixes
154
+ - the component should stay shared across apps
155
+ - product-specific differences can be handled with props, slots, `className`, or `classes`
29
156
 
30
- ```tsx
31
- import { createSuperAdminPage } from '@carefully-built/saas-kit/next';
32
- ```
157
+ Use `@carefully-built/cli add` when:
158
+
159
+ - the component needs local product behavior
160
+ - design needs to diverge from the shared package
161
+ - you want to own and edit every line in the consuming app
162
+ - the component should follow the app's normal source-control workflow
163
+
164
+ ## Copy And Localization
165
+
166
+ SaaS kit defaults are English. Italian or other localized apps should pass app-specific copy through the component label/config props. Components with user-facing copy are designed to expose labels or configuration objects so package defaults do not force one language across all apps.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@carefully-built/saas-kit",
3
- "version": "0.1.3",
3
+ "version": "0.1.5",
4
4
  "description": "One-install Carefully Built SaaS Kit package for React, Next.js, Convex, WorkOS, and editable SaaS components.",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -285,7 +285,7 @@
285
285
  "@carefully-built/settings-ui": "0.1.5",
286
286
  "@carefully-built/superadmin": "0.1.9",
287
287
  "@carefully-built/theme-ui": "0.1.1",
288
- "@carefully-built/ui": "0.1.15",
288
+ "@carefully-built/ui": "0.1.16",
289
289
  "@carefully-built/user-picker": "0.1.2",
290
290
  "@carefully-built/widgets": "0.1.1",
291
291
  "@carefully-built/workos": "0.1.3"