buildgrid-ui 1.16.0 โ†’ 1.17.1

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 CHANGED
@@ -1,167 +1,275 @@
1
- # buildgrid-ui
1
+ <div align="center">
2
+ <h1>BuildGrid UI</h1>
3
+ <p><strong>A modern React component library built for real-world projects</strong></p>
4
+
5
+ <img src="https://adrianomaringolo.github.io/buildgrid-ui/assets/images/buildgrid-ui-launch-0df921f6559272569468298e74d3d7b8.png" alt="BuildGrid UI - Modern React Component Library" width="100%" style="max-width: 800px; border-radius: 12px; margin: 20px 0;" />
6
+
7
+ <p>
8
+ <a href="https://www.npmjs.com/package/buildgrid-ui"><img src="https://img.shields.io/npm/v/buildgrid-ui.svg" alt="npm version"></a>
9
+ <a href="https://www.npmjs.com/package/buildgrid-ui"><img src="https://img.shields.io/npm/dm/buildgrid-ui.svg" alt="npm downloads"></a>
10
+ <a href="https://github.com/adrianomaringolo/buildgrid-ui/blob/main/LICENSE"><img src="https://img.shields.io/npm/l/buildgrid-ui.svg" alt="license"></a>
11
+ <a href="https://github.com/adrianomaringolo/buildgrid-ui"><img src="https://img.shields.io/github/stars/adrianomaringolo/buildgrid-ui.svg" alt="github stars"></a>
12
+ </p>
13
+
14
+ <p>
15
+ <a href="https://adrianomaringolo.github.io/buildgrid-ui/">๐Ÿ“– Documentation</a> โ€ข
16
+ <a href="https://adrianomaringolo.github.io/buildgrid-ui/">๐ŸŽจ Storybook</a> โ€ข
17
+ <a href="https://adrianomaringolo.github.io/buildgrid-ui/changelog">๐Ÿ“‹ Changelog</a> โ€ข
18
+ <a href="https://github.com/adrianomaringolo/buildgrid-ui/discussions">๐Ÿ’ฌ Discussions</a>
19
+ </p>
20
+ </div>
2
21
 
3
- ### This lib is under construction, take a look again soon ๐Ÿšง
4
-
5
- A React component library built using [Vite](https://vitejs.dev) and [shadcn](https://ui.shadcn.com/) as the foundation. This library is designed to integrate seamlessly with React and Next.js applications and includes support for [TailwindCSS](https://tailwindcss.com). It also provides a Storybook setup to display and document the components.
22
+ ---
6
23
 
7
- ## Features
24
+ ## โœจ Features
8
25
 
9
- - **Built with Vite** for a fast development experience.
10
- - **TailwindCSS Integration** for utility-first styling.
11
- - **shadcn Components** as a robust base.
12
- - **Storybook** for component documentation and testing.
13
- - **Semantic Versioning** with automated releases using [semantic-release](https://semantic-release.gitbook.io/semantic-release/).
26
+ BuildGrid UI is a comprehensive React component library featuring **44+ components** and **12 specialized blocks**, all built with production use in mind.
14
27
 
15
- ---
28
+ - ๐ŸŽฏ **Battle-Tested** - Components refined through real-world usage
29
+ - ๐ŸŽจ **Modern Stack** - Built with React 19, TypeScript, and Tailwind CSS
30
+ - โ™ฟ **Accessible** - WCAG compliant with full keyboard navigation
31
+ - ๐Ÿ“ฑ **Responsive** - Mobile-first design approach
32
+ - ๐ŸŽญ **Customizable** - Flexible theming and styling options
33
+ - ๐Ÿ“š **Well Documented** - Comprehensive docs with interactive examples
34
+ - ๐Ÿ”ง **Developer Friendly** - Full TypeScript support with IntelliSense
35
+ - ๐Ÿš€ **Production Ready** - Used in real applications
16
36
 
17
- ## Getting Started
37
+ ## ๐Ÿš€ Quick Start
18
38
 
19
39
  ### Installation
20
40
 
21
- To install the library, run:
22
-
23
41
  ```bash
24
42
  npm install buildgrid-ui
25
43
  # or
26
44
  yarn add buildgrid-ui
45
+ # or
46
+ pnpm add buildgrid-ui
47
+ ```
48
+
49
+ ### Setup
50
+
51
+ 1. **Import the theme styles** in your app's entry point:
52
+
53
+ ```tsx
54
+ // src/main.tsx or src/index.tsx
55
+ import 'buildgrid-ui/theme'
56
+ ```
57
+
58
+ 2. **Configure Tailwind CSS** (v3):
59
+
60
+ ```js
61
+ // tailwind.config.js
62
+ module.exports = {
63
+ content: [
64
+ './src/**/*.{js,ts,jsx,tsx}',
65
+ './node_modules/buildgrid-ui/**/*.{js,ts,jsx,tsx}',
66
+ ],
67
+ theme: {
68
+ extend: {},
69
+ },
70
+ plugins: [],
71
+ }
27
72
  ```
28
73
 
29
74
  ### Usage
30
75
 
31
- 1. **Import Components**: Import components directly into your React project:
76
+ ```tsx
77
+ import { Button, Card, Input } from 'buildgrid-ui'
78
+
79
+ function App() {
80
+ return (
81
+ <Card>
82
+ <Card.Header>
83
+ <Card.Title>Welcome to BuildGrid UI</Card.Title>
84
+ </Card.Header>
85
+ <Card.Content>
86
+ <Input placeholder="Enter your name" />
87
+ </Card.Content>
88
+ <Card.Footer>
89
+ <Button>Get Started</Button>
90
+ </Card.Footer>
91
+ </Card>
92
+ )
93
+ }
94
+ ```
32
95
 
33
- ```jsx
34
- import { Button } from "buildgrid-ui";
96
+ ## ๐Ÿ“ฆ What's Included
35
97
 
36
- const App = () => <Button variant="primary">Click Me</Button>;
98
+ ### Components (44)
37
99
 
38
- export default App;
39
- ```
100
+ **Form Elements**
101
+ - Input, Textarea, Select, Checkbox, Radio Group
102
+ - Autocomplete, Multi-Select, Tag Input
103
+ - Currency Input, Password Input, Adaptive Input
104
+ - Number Stepper, Slider, Switch
40
105
 
41
- 2. **Import Theme Styles**: Import the library's theme styles. This should be done once in your application's entry point (e.g., `src/main.tsx`, `src/index.tsx`, or `pages/_app.tsx` for Next.js):
106
+ **Navigation**
107
+ - Button, Navigation Menu, Tabs
108
+ - Pagination, Dropdown Menu, Command
42
109
 
43
- ```javascript
44
- // For JavaScript/TypeScript files
45
- import 'buildgrid-ui/theme';
46
- ```
110
+ **Feedback**
111
+ - Alert, Alert Dialog, Toast/Toaster
112
+ - Progress, Spinner, Skeleton
47
113
 
48
- If you are using a CSS file for global imports, you can add:
114
+ **Layout**
115
+ - Card, Separator, Sheet, Dialog
116
+ - Popover, Tooltip, Collapsible, Accordion
49
117
 
50
- ```css
51
- /* For CSS files */
52
- @import 'buildgrid-ui/theme';
53
- ```
118
+ **Display**
119
+ - Avatar, Badge, Calendar, Carousel
120
+ - Table, Toggle, Toggle Group
54
121
 
55
- 3. **Configure TailwindCSS (for v3)**: Ensure TailwindCSS is configured in your project. Add the following content paths to your `tailwind.config.js` to include `buildgrid-ui`'s classes:
122
+ ### Blocks (12)
56
123
 
57
- ```javascript
58
- module.exports = {
59
- content: [
60
- "./src/**/*.{js,ts,jsx,tsx}",
61
- "./node_modules/buildgrid-ui/**/*.{js,ts,jsx,tsx}",
62
- ],
63
- theme: {
64
- extend: {},
65
- },
66
- plugins: [],
67
- };
68
- ```
124
+ **Complex Components**
125
+ - Data Table - Feature-rich table with sorting, filtering, and pagination
126
+ - HTML Text Editor - Rich text editor with formatting toolbar
127
+ - File Upload Dropzone - Drag-and-drop file upload with progress
128
+ - Lazy Image Gallery - Performance-optimized image gallery
129
+ - Month Navigator - Calendar navigation component
130
+ - Bento Grid - Flexible grid layout system
131
+ - Help Carousel - Interactive help/tutorial carousel
132
+ - Empty Message - Elegant empty state component
133
+ - Navigable List - Keyboard-navigable list component
134
+ - Paginated Items - Pagination wrapper for any content
135
+ - Pagination Controls - Customizable pagination UI
136
+ - Sidebar - Flexible sidebar with multiple directions
69
137
 
70
- ---
138
+ ### Utilities
71
139
 
72
- ## Development
140
+ **Hooks**
141
+ - `useLocalStorage` - Persistent state management
142
+ - `useDebounce` - Debounced values
143
+ - `useCopyToClipboard` - Copy to clipboard functionality
144
+ - `useSanitizedHtml` - Safe HTML rendering with DOMPurify
73
145
 
74
- ### Setting Up the Project
146
+ **Formatters**
147
+ - Currency formatting utilities
148
+ - Date formatting utilities
75
149
 
76
- Clone the repository and install dependencies:
150
+ **Types**
151
+ - TypeScript utility types for better DX
77
152
 
78
- ```bash
79
- git clone https://github.com/adrianomaringolo/buildgrid-ui.git
80
- cd buildgrid-ui
81
- npm install
82
- ```
153
+ ## ๐Ÿ“– Documentation
83
154
 
84
- ### Storybook
155
+ Visit our [comprehensive documentation](https://adrianomaringolo.github.io/buildgrid-ui/) for:
85
156
 
86
- Run Storybook locally to preview and develop components:
157
+ - ๐Ÿ“˜ **Component API** - Detailed props and usage examples
158
+ - ๐ŸŽจ **Interactive Examples** - Live component demos
159
+ - โ™ฟ **Accessibility Guidelines** - WCAG compliance information
160
+ - ๐Ÿ’ก **Best Practices** - Recommended usage patterns
161
+ - ๐ŸŽญ **Storybook Integration** - Visual component explorer
87
162
 
88
- ```bash
89
- npm run storybook
90
- ```
163
+ ## ๐Ÿ›  Development
91
164
 
92
- ---
165
+ ### Prerequisites
93
166
 
94
- ### Build the Library
167
+ - Node.js 18+
168
+ - npm, yarn, or pnpm
95
169
 
96
- To build the library for production:
170
+ ### Setup
97
171
 
98
172
  ```bash
173
+ # Clone the repository
174
+ git clone https://github.com/adrianomaringolo/buildgrid-ui.git
175
+ cd buildgrid-ui
176
+
177
+ # Install dependencies
178
+ npm install
179
+
180
+ # Start Storybook
181
+ npm run storybook
182
+
183
+ # Build the library
99
184
  npm run build
185
+
186
+ # Run tests
187
+ npm test
100
188
  ```
101
189
 
102
- The output will be in the `dist/` directory, ready for publishing or integration.
190
+ ### Project Structure
103
191
 
104
- ---
192
+ ```
193
+ buildgrid-ui/
194
+ โ”œโ”€โ”€ src/
195
+ โ”‚ โ”œโ”€โ”€ components/ # Basic UI components
196
+ โ”‚ โ”œโ”€โ”€ blocks/ # Complex composed components
197
+ โ”‚ โ”œโ”€โ”€ lib/
198
+ โ”‚ โ”‚ โ”œโ”€โ”€ hooks/ # Custom React hooks
199
+ โ”‚ โ”‚ โ”œโ”€โ”€ utils/ # Utility functions
200
+ โ”‚ โ”‚ โ””โ”€โ”€ types/ # TypeScript types
201
+ โ”‚ โ””โ”€โ”€ styles/ # Global styles
202
+ โ”œโ”€โ”€ website/ # Documentation site
203
+ โ””โ”€โ”€ .storybook/ # Storybook configuration
204
+ ```
105
205
 
106
- ## Semantic Releases
206
+ ## ๐Ÿค Contributing
107
207
 
108
- This project uses [semantic-release](https://semantic-release.gitbook.io/) for automated versioning and releases.
208
+ We welcome contributions from the community! This is my first open-source project, and I'm excited to see what we can build together.
109
209
 
110
- ### Steps to Create a Pre-release
210
+ ### Ways to Contribute
111
211
 
112
- 1. Push changes to the designated pre-release branch (e.g., `alpha`):
113
- ```bash
114
- git checkout -b alpha
115
- git push origin alpha
116
- ```
117
- 2. Pre-release versions (e.g., `1.0.0-alpha.1`) will be automatically created.
212
+ - ๐Ÿ› **Report bugs** - [Create an issue](https://github.com/adrianomaringolo/buildgrid-ui/issues/new?template=bug_report.yml)
213
+ - โœจ **Request features** - [Create a feature request](https://github.com/adrianomaringolo/buildgrid-ui/issues/new?template=feature_request.yml)
214
+ - ๐Ÿ“– **Improve docs** - [Create a documentation issue](https://github.com/adrianomaringolo/buildgrid-ui/issues/new?template=documentation.yml)
215
+ - ๐Ÿ”ง **Submit PRs** - Fix bugs or add features
216
+ - ๐Ÿ’ฌ **Join discussions** - [GitHub Discussions](https://github.com/adrianomaringolo/buildgrid-ui/discussions)
118
217
 
119
- ---
218
+ ### Quick Start for Contributors
120
219
 
121
- ## Contributing
220
+ 1. Fork the repository
221
+ 2. Create a feature branch: `git checkout -b feature/amazing-feature`
222
+ 3. Make your changes and test them
223
+ 4. Commit using conventional commits: `git commit -m 'feat: add amazing feature'`
224
+ 5. Push to your fork: `git push origin feature/amazing-feature`
225
+ 6. Open a Pull Request
122
226
 
123
- We welcome contributions from the community! BuildGrid UI is an open-source project and we're excited to see what you'll bring to it.
227
+ Please read our [Contributing Guide](CONTRIBUTING.md) and [Code of Conduct](CODE_OF_CONDUCT.md) before contributing.
124
228
 
125
- ### Quick Start for Contributors
229
+ ## ๐Ÿ“‹ Roadmap
126
230
 
127
- 1. **Fork the repository** on GitHub
128
- 2. **Clone your fork** locally
129
- 3. **Install dependencies**: `npm install`
130
- 4. **Start Storybook**: `npm run storybook`
131
- 5. **Make your changes** and test them
132
- 6. **Submit a pull request**
231
+ - [ ] Additional form components
232
+ - [ ] Enhanced theming system
233
+ - [ ] Dark mode improvements
234
+ - [ ] More specialized blocks
235
+ - [ ] Performance optimizations
236
+ - [ ] Accessibility improvements
237
+ - [ ] Additional utility hooks
133
238
 
134
- ### Contribution Guidelines
239
+ ## ๐Ÿ™ Acknowledgments
135
240
 
136
- Please read our [Contributing Guide](CONTRIBUTING.md) for detailed information on:
241
+ BuildGrid UI is built on the shoulders of giants:
137
242
 
138
- - ๐Ÿš€ Setting up the development environment
139
- - ๐Ÿ“ Code style and conventions
140
- - ๐Ÿงช Testing requirements
141
- - ๐Ÿ“š Documentation standards
142
- - ๐Ÿ”„ Pull request process
243
+ - [React](https://react.dev/) - The foundation
244
+ - [Radix UI](https://www.radix-ui.com/) - Accessible primitives
245
+ - [Tailwind CSS](https://tailwindcss.com/) - Utility-first styling
246
+ - [shadcn/ui](https://ui.shadcn.com/) - Design inspiration
247
+ - [Vite](https://vitejs.dev/) - Build tool
248
+ - [Storybook](https://storybook.js.org/) - Component development
249
+ - [Docusaurus](https://docusaurus.io/) - Documentation platform
143
250
 
144
- ### Code of Conduct
251
+ ## ๐Ÿ“„ License
145
252
 
146
- This project adheres to a [Code of Conduct](CODE_OF_CONDUCT.md). By participating, you are expected to uphold this code.
253
+ This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
147
254
 
148
- ### Ways to Contribute
255
+ ## ๐Ÿ”— Links
149
256
 
150
- - ๐Ÿ› **Report bugs** - [Create an issue](https://github.com/adrianomaringolo/buildgrid-ui/issues)
151
- - โœจ **Request features** - [Start a discussion](https://github.com/adrianomaringolo/buildgrid-ui/discussions)
152
- - ๐Ÿ”ง **Submit pull requests** - Fix bugs or add features
153
- - ๐Ÿ“– **Improve documentation** - Help others understand the library
154
- - ๐ŸŽจ **Design components** - Contribute new UI components
257
+ - **Documentation**: https://adrianomaringolo.github.io/buildgrid-ui/
258
+ - **NPM Package**: https://www.npmjs.com/package/buildgrid-ui
259
+ - **GitHub**: https://github.com/adrianomaringolo/buildgrid-ui
260
+ - **Storybook**: https://adrianomaringolo.github.io/buildgrid-ui/
261
+ - **Changelog**: https://adrianomaringolo.github.io/buildgrid-ui/changelog
155
262
 
156
- ### Development Resources
263
+ ## ๐Ÿ’ฌ Community & Support
157
264
 
158
- - ๐Ÿ“š [Documentation](https://adrianomaringolo.github.io/buildgrid-ui/)
159
- - ๐ŸŽจ [Storybook](https://buildgrid-ui-storybook.netlify.app/)
265
+ - ๐Ÿ› [Report Issues](https://github.com/adrianomaringolo/buildgrid-ui/issues)
266
+ - ๐Ÿ’ก [Feature Requests](https://github.com/adrianomaringolo/buildgrid-ui/issues/new?template=feature_request.yml)
160
267
  - ๐Ÿ’ฌ [Discussions](https://github.com/adrianomaringolo/buildgrid-ui/discussions)
161
- - ๐Ÿ› [Issues](https://github.com/adrianomaringolo/buildgrid-ui/issues)
268
+ - ๐Ÿ“ง Contact: [adrianomaringolo](https://github.com/adrianomaringolo)
162
269
 
163
270
  ---
164
271
 
165
- ## License
166
-
167
- This project is licensed under the [MIT License](LICENSE).
272
+ <div align="center">
273
+ <p>Built with โค๏ธ by <a href="https://adrianomaringolo.dev">Adriano Maringolo</a></p>
274
+ <p>If you find this project useful, please consider giving it a โญ๏ธ</p>
275
+ </div>
@@ -1,4 +1,23 @@
1
1
  import './unreset.css';
2
- export declare const HtmlTextArea: (props: {
2
+ export interface HtmlTextAreaProps {
3
3
  children: string;
4
- }) => import("react/jsx-runtime").JSX.Element;
4
+ /**
5
+ * Predefined sanitization preset
6
+ * @default 'full'
7
+ */
8
+ preset?: 'basic' | 'rich' | 'full' | 'comments';
9
+ /**
10
+ * Custom DOMPurify configuration options (overrides preset)
11
+ */
12
+ sanitizeOptions?: import('dompurify').Config;
13
+ /**
14
+ * Whether to allow all HTML tags and attributes (less secure)
15
+ * @default false
16
+ */
17
+ allowAll?: boolean;
18
+ /**
19
+ * Additional CSS classes for the container
20
+ */
21
+ className?: string;
22
+ }
23
+ export declare const HtmlTextArea: ({ children, preset, sanitizeOptions, allowAll, className, }: HtmlTextAreaProps) => import("react/jsx-runtime").JSX.Element;