@baseplate-dev/ui-components 0.2.0 → 0.2.2

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 +128 -0
  2. package/package.json +3 -3
package/README.md CHANGED
@@ -20,6 +20,134 @@ The ui-components package provides:
20
20
  - Includes Storybook for component documentation
21
21
  - Uses Material Design icons (react-icons/md)
22
22
 
23
+ ## Available Components
24
+
25
+ The package provides 52+ production-ready components organized into the following categories:
26
+
27
+ ### Basic Components
28
+
29
+ - **Alert** - Status/notification messages with semantic variants
30
+ - **Badge** - Status indicators and labels
31
+ - **Button** - Primary action elements with comprehensive variants
32
+ - **Button Group** - Grouped button layouts
33
+ - **Card** - Content containers with header/footer support
34
+ - **Label** - Accessible form labels
35
+ - **Separator** - Visual dividers
36
+ - **Loader** - Loading indicators
37
+ - **Circular Progress** - Progress indicators with percentages
38
+
39
+ ### Form Components
40
+
41
+ All form components are available in both standalone and React Hook Form integrated variants:
42
+
43
+ - **Input/Input Field** - Text inputs with validation
44
+ - **Textarea/Textarea Field** - Multi-line text areas
45
+ - **Select/Select Field** - Dropdown selections with search
46
+ - **Checkbox/Checkbox Field** - Boolean inputs
47
+ - **Switch/Switch Field** - Toggle switches
48
+ - **Combobox/Combobox Field** - Searchable select with custom options
49
+ - **Multi Combobox/Multi Combobox Field** - Multi-select with tags
50
+ - **Color Picker/Color Picker Field** - Color selection with palette
51
+ - **Date Picker Field** - Date selection with calendar
52
+ - **Date Time Picker Field** - Combined date and time selection
53
+ - **Form Item** - Form field wrapper with label/error display
54
+ - **Form Action Bar** - Consistent form action buttons
55
+
56
+ ### Layout Components
57
+
58
+ - **Sidebar Layout** - App layout with collapsible sidebar
59
+ - **Section List** - Organized content sections
60
+ - **Record View** - Data record display
61
+ - **Table** - Data tables with sorting/filtering
62
+ - **Tabs** - Tabbed content areas
63
+ - **Navigation Menu** - App navigation with nesting
64
+ - **Navigation Tabs** - Tab-based page navigation
65
+ - **Breadcrumb** - Navigation breadcrumbs
66
+ - **Scroll Area** - Custom scrollable areas
67
+
68
+ ### Interactive Components
69
+
70
+ - **Dialog** - Modal dialogs with focus management
71
+ - **Sheet** - Slide-out panels from any side
72
+ - **Popover** - Floating content positioned to triggers
73
+ - **Dropdown** - Dropdown menus with keyboard navigation
74
+ - **Command** - Command palette interface
75
+ - **Tooltip** - Hover information with positioning
76
+ - **Confirm Dialog** - Confirmation dialogs for destructive actions
77
+ - **Calendar** - Date calendar widget
78
+ - **Toaster** - Toast notifications with auto-dismiss
79
+
80
+ ### Display Components
81
+
82
+ - **Empty Display** - Empty state messaging with actions
83
+ - **Error Display** - Error state messaging with retry
84
+ - **Errorable Loader** - Loading states with error handling
85
+
86
+ ### Usage Example
87
+
88
+ ```typescript
89
+ import {
90
+ Button,
91
+ Card,
92
+ InputField,
93
+ FormActionBar,
94
+ useConfirmDialog,
95
+ toast
96
+ } from '@baseplate-dev/ui-components';
97
+ import { useForm } from 'react-hook-form';
98
+
99
+ const MyForm = () => {
100
+ const form = useForm();
101
+ const confirmDialog = useConfirmDialog();
102
+
103
+ const handleSubmit = async (data) => {
104
+ const confirmed = await confirmDialog({
105
+ title: 'Save Changes',
106
+ description: 'Are you sure you want to save these changes?'
107
+ });
108
+
109
+ if (confirmed) {
110
+ try {
111
+ await saveData(data);
112
+ toast.success('Changes saved successfully');
113
+ } catch (error) {
114
+ toast.error('Failed to save changes');
115
+ }
116
+ }
117
+ };
118
+
119
+ return (
120
+ <Card>
121
+ <Card.Header>
122
+ <Card.Title>User Information</Card.Title>
123
+ </Card.Header>
124
+ <Card.Content>
125
+ <form onSubmit={form.handleSubmit(handleSubmit)} className="space-y-6">
126
+ <InputField
127
+ control={form.control}
128
+ name="name"
129
+ label="Full Name"
130
+ placeholder="Enter your name"
131
+ rules={{ required: 'Name is required' }}
132
+ />
133
+
134
+ <FormActionBar>
135
+ <Button type="submit">Save Changes</Button>
136
+ <Button variant="outline" type="button">Cancel</Button>
137
+ </FormActionBar>
138
+ </form>
139
+ </Card.Content>
140
+ </Card>
141
+ );
142
+ };
143
+ ```
144
+
145
+ ## Development & Documentation
146
+
147
+ - **Storybook**: Run `pnpm storybook:dev` for interactive component documentation
148
+ - **Built Storybook**: Available at `storybook-static/index.html`
149
+ - **Component Stories**: Each component includes comprehensive Storybook stories with examples and controls
150
+
23
151
  ## CSS Files
24
152
 
25
153
  The package includes several CSS files that work together to provide theming and styling:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@baseplate-dev/ui-components",
3
- "version": "0.2.0",
3
+ "version": "0.2.2",
4
4
  "description": "Shared UI component library",
5
5
  "keywords": [
6
6
  "react",
@@ -67,7 +67,7 @@
67
67
  "sonner": "2.0.3",
68
68
  "zod": "3.24.1",
69
69
  "zustand": "5.0.3",
70
- "@baseplate-dev/utils": "0.2.0"
70
+ "@baseplate-dev/utils": "0.2.2"
71
71
  },
72
72
  "devDependencies": {
73
73
  "@storybook/addon-docs": "^8.6.4",
@@ -99,7 +99,7 @@
99
99
  "vite": "6.3.5",
100
100
  "vite-plugin-svgr": "4.3.0",
101
101
  "vitest": "3.0.7",
102
- "@baseplate-dev/tools": "0.2.0"
102
+ "@baseplate-dev/tools": "0.2.2"
103
103
  },
104
104
  "engines": {
105
105
  "node": "^22.0.0"