bonsaif-ui 0.1.8 → 0.1.10

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 (37) hide show
  1. package/README.md +72 -6
  2. package/dist/bonsaif-ui.js +2855 -1719
  3. package/dist/bonsaif-ui.umd.cjs +1 -1
  4. package/dist/components/ui/Alert.d.ts +14 -0
  5. package/dist/components/ui/Alert.d.ts.map +1 -0
  6. package/dist/components/ui/Button.d.ts.map +1 -1
  7. package/dist/components/ui/Checkbox.d.ts +10 -0
  8. package/dist/components/ui/Checkbox.d.ts.map +1 -0
  9. package/dist/components/ui/CodeBlock.d.ts +14 -0
  10. package/dist/components/ui/CodeBlock.d.ts.map +1 -0
  11. package/dist/components/ui/CopyButton.d.ts.map +1 -1
  12. package/dist/components/ui/DropdownMenu.d.ts +23 -0
  13. package/dist/components/ui/DropdownMenu.d.ts.map +1 -0
  14. package/dist/components/ui/EmptyState.d.ts +14 -0
  15. package/dist/components/ui/EmptyState.d.ts.map +1 -0
  16. package/dist/components/ui/FormField.d.ts +13 -0
  17. package/dist/components/ui/FormField.d.ts.map +1 -0
  18. package/dist/components/ui/MultiSelect.d.ts +20 -0
  19. package/dist/components/ui/MultiSelect.d.ts.map +1 -0
  20. package/dist/components/ui/Pagination.d.ts +10 -0
  21. package/dist/components/ui/Pagination.d.ts.map +1 -0
  22. package/dist/components/ui/RadioGroup.d.ts +20 -0
  23. package/dist/components/ui/RadioGroup.d.ts.map +1 -0
  24. package/dist/components/ui/SectionPanel.d.ts +13 -0
  25. package/dist/components/ui/SectionPanel.d.ts.map +1 -0
  26. package/dist/components/ui/StatusBadge.d.ts +14 -0
  27. package/dist/components/ui/StatusBadge.d.ts.map +1 -0
  28. package/dist/components/ui/Tabs.d.ts +22 -0
  29. package/dist/components/ui/Tabs.d.ts.map +1 -0
  30. package/dist/components/ui/Textarea.d.ts +20 -0
  31. package/dist/components/ui/Textarea.d.ts.map +1 -0
  32. package/dist/components/ui/TextareaField.d.ts +12 -0
  33. package/dist/components/ui/TextareaField.d.ts.map +1 -0
  34. package/dist/components/ui/index.d.ts +27 -0
  35. package/dist/components/ui/index.d.ts.map +1 -1
  36. package/dist/components/users/UserAvatar.d.ts.map +1 -1
  37. package/package.json +2 -2
package/README.md CHANGED
@@ -21,16 +21,82 @@ export function Example() {
21
21
 
22
22
  ## Components
23
23
 
24
- The package includes reusable components migrated from `prime-auth`:
24
+ The package includes reusable components migrated from `prime-auth` and new shared primitives for Bonsaif apps.
25
25
 
26
- - UI: `Button`, `CalendarPicker`, `CompactFilterSelect`, `CompactSearchInput`, `ConfirmDialog`, `CopyButton`, `CopyLinkButton`, `DataTable`, `DateRangePicker`, `Drawer`, `InputField`, `LoadingState`, `Modal`, `MouseTooltip`, `SearchableSelect`, `StepWizard`, `TextInput`, `Toggle`.
27
- - Composition: `DynamicDetailTabs`.
28
- - Layout: `AuthShell`, `GlobalScrollbars`, `PageHeader`, `PageSearchInput`, `PrimeAuthRouteShell`.
29
- - Messaging and services: `PrimeSuiteChatFrame`, `MicroserviceFrame`.
30
- - Notifications and users: `PrimeAuthToaster`, `UserAvatar`.
26
+ ### Layout
27
+
28
+ - `AuthShell`, `PrimeAuthRouteShell`: authenticated application shells.
29
+ - `PageHeader`, `PageSearchInput`: page title, breadcrumbs, metadata, actions, and page-level search.
30
+ - `GlobalScrollbars`: global OverlayScrollbars setup.
31
+ - `SectionPanel`: reusable section container with header, actions, body, and footer.
32
+
33
+ ### Forms
34
+
35
+ - `InputField`, `TextInput`, `Textarea`: text inputs with Bonsaif styling.
36
+ - `SearchableSelect`, `CompactFilterSelect`, `CompactSearchInput`: select and filter controls.
37
+ - `CalendarPicker`, `DateRangePicker`: single-date and range selection.
38
+ - `Checkbox`, `RadioGroup`, `Toggle`: boolean and option controls.
39
+ - `FormField`: label, helper, error, and required wrapper for custom controls.
40
+
41
+ ### Actions And Overlays
42
+
43
+ - `Button`, `BonsaifButton`: action buttons.
44
+ - `DropdownMenu`: contextual action menu.
45
+ - `CopyButton`, `CopyLinkButton`: clipboard utilities.
46
+ - `Modal`, `Drawer`, `ConfirmDialog`: overlays and confirmations.
47
+ - `MouseTooltip`: lightweight hover tooltip.
48
+
49
+ ### Feedback And Data
50
+
51
+ - `Alert`, `StatusBadge`, `EmptyState`, `LoadingState`: visible states and feedback.
52
+ - `DataTable`, `Pagination`: tabular data and standalone pagination.
53
+ - `Tabs`, `StepWizard`: local navigation and guided flows.
54
+
55
+ ### Composition And Services
56
+
57
+ - `DynamicDetailTabs`: parent-detail layout with lazy loaded child modules.
58
+ - `MicroserviceFrame`, `PrimeSuiteChatFrame`: embedded service frames.
59
+ - `PrimeAuthToaster`: Sonner toaster configured for Bonsaif themes.
60
+ - `UserAvatar`: user and bot avatars with tooltip support.
31
61
 
32
62
  App-coupled components were adapted to receive routing, session, and navigation data through props so the library does not import private `prime-auth` modules.
33
63
 
64
+ ## Playground Documentation
65
+
66
+ Run the playground to browse the components by category. Each code example includes a copy action powered by `CopyButton`.
67
+
68
+ ```bash
69
+ npm run playground
70
+ ```
71
+
72
+ ## UI Primitives
73
+
74
+ Small primitives cover common product UI patterns while keeping the same Bonsaif visual tokens.
75
+
76
+ ```tsx
77
+ import {
78
+ Alert,
79
+ EmptyState,
80
+ SectionPanel,
81
+ StatusBadge,
82
+ Tabs,
83
+ } from "bonsaif-ui";
84
+
85
+ <StatusBadge tone="success" dot>
86
+ Activo
87
+ </StatusBadge>
88
+
89
+ <Alert variant="warning" title="Revision pendiente">
90
+ Hay cambios sin publicar.
91
+ </Alert>
92
+
93
+ <SectionPanel title="Actividad" actions={<Button>Revisar</Button>}>
94
+ <Tabs activeTabId={tab} onTabChange={setTab} tabs={tabs} />
95
+ </SectionPanel>
96
+
97
+ <EmptyState title="Sin registros" action={<Button>Crear</Button>} />
98
+ ```
99
+
34
100
  ## Copy Buttons
35
101
 
36
102
  `CopyButton` copies any text value. `CopyLinkButton` copies URLs and accepts `resolveUrl` when an app needs to convert relative paths into public absolute URLs.