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.
- package/README.md +72 -6
- package/dist/bonsaif-ui.js +2855 -1719
- package/dist/bonsaif-ui.umd.cjs +1 -1
- package/dist/components/ui/Alert.d.ts +14 -0
- package/dist/components/ui/Alert.d.ts.map +1 -0
- package/dist/components/ui/Button.d.ts.map +1 -1
- package/dist/components/ui/Checkbox.d.ts +10 -0
- package/dist/components/ui/Checkbox.d.ts.map +1 -0
- package/dist/components/ui/CodeBlock.d.ts +14 -0
- package/dist/components/ui/CodeBlock.d.ts.map +1 -0
- package/dist/components/ui/CopyButton.d.ts.map +1 -1
- package/dist/components/ui/DropdownMenu.d.ts +23 -0
- package/dist/components/ui/DropdownMenu.d.ts.map +1 -0
- package/dist/components/ui/EmptyState.d.ts +14 -0
- package/dist/components/ui/EmptyState.d.ts.map +1 -0
- package/dist/components/ui/FormField.d.ts +13 -0
- package/dist/components/ui/FormField.d.ts.map +1 -0
- package/dist/components/ui/MultiSelect.d.ts +20 -0
- package/dist/components/ui/MultiSelect.d.ts.map +1 -0
- package/dist/components/ui/Pagination.d.ts +10 -0
- package/dist/components/ui/Pagination.d.ts.map +1 -0
- package/dist/components/ui/RadioGroup.d.ts +20 -0
- package/dist/components/ui/RadioGroup.d.ts.map +1 -0
- package/dist/components/ui/SectionPanel.d.ts +13 -0
- package/dist/components/ui/SectionPanel.d.ts.map +1 -0
- package/dist/components/ui/StatusBadge.d.ts +14 -0
- package/dist/components/ui/StatusBadge.d.ts.map +1 -0
- package/dist/components/ui/Tabs.d.ts +22 -0
- package/dist/components/ui/Tabs.d.ts.map +1 -0
- package/dist/components/ui/Textarea.d.ts +20 -0
- package/dist/components/ui/Textarea.d.ts.map +1 -0
- package/dist/components/ui/TextareaField.d.ts +12 -0
- package/dist/components/ui/TextareaField.d.ts.map +1 -0
- package/dist/components/ui/index.d.ts +27 -0
- package/dist/components/ui/index.d.ts.map +1 -1
- package/dist/components/users/UserAvatar.d.ts.map +1 -1
- 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
|
-
|
|
27
|
-
|
|
28
|
-
-
|
|
29
|
-
-
|
|
30
|
-
-
|
|
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.
|