@yuva-devlab/ui 0.1.0 โ†’ 0.1.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.
Files changed (3) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +151 -41
  3. package/package.json +7 -7
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 Yuva Devlab
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,50 +1,117 @@
1
1
  # ๐Ÿ“ฆ @yuva-devlab/ui
2
2
 
3
- A fully-typed, themeable, **Vanilla Extract** powered component library built on
4
- top of:
3
+ [![npm version](https://img.shields.io/npm/v/@yuva-devlab/ui.svg)](https://www.npmjs.com/package/@yuva-devlab/ui)
4
+ [![npm downloads](https://img.shields.io/npm/dm/@yuva-devlab/ui.svg)](https://www.npmjs.com/package/@yuva-devlab/ui)
5
+ [![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](LICENSE)
5
6
 
6
- - `@yuva-devlab/tokens` (design tokens)
7
- - `@yuva-devlab/primitives` (headless logic)
8
- - Full TypeScript support
7
+ > A production-ready, fully-typed React component library built with Vanilla
8
+ > Extract, featuring a natural design system and comprehensive accessibility
9
+ > support.
9
10
 
10
- This is the main **consumer-facing** UI library.
11
+ ## Features
11
12
 
12
- ---
13
+ - ๐ŸŽจ **Natural Design System** - Organic color palettes inspired by Material
14
+ Design 3
15
+ - ๐Ÿ”’ **Type-Safe** - Full TypeScript support with comprehensive type definitions
16
+ - ๐ŸŽญ **Zero-Runtime CSS** - Vanilla Extract compiles styles at build time
17
+ - โ™ฟ **Accessible** - Built on Radix UI primitives with ARIA compliance
18
+ - ๐Ÿงฉ **Polymorphic** - Components support `as` prop for semantic flexibility
19
+ - ๐ŸŽฏ **Tree-Shakeable** - Import only what you need
20
+ - ๐Ÿ“ฆ **Monorepo Architecture** - Clean separation of tokens, primitives, and
21
+ components
13
22
 
14
- ## โœจ Features
23
+ ## Installation
15
24
 
16
- - **Atomic Foundation**: Components like Button, Input, and Typography.
17
- - **Layout System**: High-level primitives for `Box`, `Flex`, `Grid`, and
18
- `Stack`.
19
- - **Vanilla Extract**: Type-safe, zero-runtime CSS with deep token integration.
20
- - **Natural Theme**: Organic-inspired aesthetics with "MD3" influence.
21
- - **Polymorphism**: Components support the `as` prop for semantic flexibility.
22
-
23
- ---
25
+ ```bash
26
+ npm install @yuva-devlab/ui
27
+ ```
24
28
 
25
- ## ๐Ÿ“ Folder Structure
29
+ ### Peer Dependencies
26
30
 
27
31
  ```bash
28
- packages/ui/
29
- โ”œโ”€โ”€ src/
30
- โ”‚ โ”œโ”€โ”€ components/
31
- โ”‚ โ”‚ โ”œโ”€โ”€ button/
32
- โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ button.tsx
33
- โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ button.styles.css.ts # Vanilla Extract styles
34
- โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ button.types.ts
35
- โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ index.ts
36
- โ”‚ โ”‚ โ”œโ”€โ”€ layout/ # Box, Flex, Grid, Stack, Container
37
- โ”‚ โ”‚ โ””โ”€โ”€ ...
38
- โ”‚ โ””โ”€โ”€ index.ts
39
- โ””โ”€โ”€ README.md
32
+ npm install react@^19.2.0 react-dom@^19.2.0
33
+ ```
34
+
35
+ ## Quick Start
36
+
37
+ ```tsx
38
+ import { Button, Input, Stack, Container } from "@yuva-devlab/ui";
39
+ import "@yuva-devlab/ui/styles.css";
40
+
41
+ function App() {
42
+ return (
43
+ <Container size="lg">
44
+ <Stack gap="md">
45
+ <Input
46
+ label="Email"
47
+ placeholder="you@example.com"
48
+ type="email"
49
+ />
50
+ <Button
51
+ variant="primary"
52
+ size="md"
53
+ >
54
+ Sign In
55
+ </Button>
56
+ </Stack>
57
+ </Container>
58
+ );
59
+ }
40
60
  ```
41
61
 
42
- ---
62
+ ## Available Components
63
+
64
+ ### Form Components
65
+
66
+ - **Button** - Primary, secondary, tertiary variants with loading states
67
+ - **Input** - Text input with label, error states, and helper text
68
+
69
+ ### Typography
70
+
71
+ - **Typography** - Polymorphic text component supporting h1-h6, p, span, etc.
72
+
73
+ ### Layout Components
74
+
75
+ - **Box** - Polymorphic container with spacing utilities
76
+ - **Flex** - Flexbox layout with alignment and gap props
77
+ - **Grid** - CSS Grid layout with responsive columns
78
+ - **Stack** - Vertical/horizontal stacking with consistent spacing
79
+ - **Container** - Responsive max-width wrapper (sm, md, lg, xl, 2xl)
80
+
81
+ ### Coming Soon
82
+
83
+ - Select (Radix UI based)
84
+ - Switch (Radix UI based)
85
+ - Checkbox (Radix UI based)
86
+ - Radio (Radix UI based)
87
+ - InputNumber
88
+
89
+ ## Component Examples
90
+
91
+ ### Button
92
+
93
+ ```tsx
94
+ import { Button } from "@yuva-devlab/ui";
95
+
96
+ // Variants
97
+ <Button variant="primary">Primary Action</Button>
98
+ <Button variant="secondary">Secondary Action</Button>
99
+ <Button variant="tertiary">Tertiary Action</Button>
100
+
101
+ // Sizes
102
+ <Button size="sm">Small</Button>
103
+ <Button size="md">Medium</Button>
104
+ <Button size="lg">Large</Button>
43
105
 
44
- ## ๐ŸŽจ Layout System
106
+ // States
107
+ <Button loading>Loading...</Button>
108
+ <Button disabled>Disabled</Button>
45
109
 
46
- We provide a specialized set of components to handle all structural needs
47
- without custom CSS:
110
+ // Polymorphic
111
+ <Button as="a" href="/home">Link Button</Button>
112
+ ```
113
+
114
+ ### Layout System
48
115
 
49
116
  ```tsx
50
117
  import { Container, Stack, Flex, Box } from "@yuva-devlab/ui";
@@ -55,24 +122,67 @@ import { Container, Stack, Flex, Box } from "@yuva-devlab/ui";
55
122
  align="center"
56
123
  justify="between"
57
124
  >
58
- <Box p="md">Brand</Box>
59
- <Box>Menu</Box>
125
+ <Box p="md">Logo</Box>
126
+ <Box>Navigation</Box>
60
127
  </Flex>
128
+
129
+ <Grid
130
+ cols={{ base: 1, md: 2, lg: 3 }}
131
+ gap="md"
132
+ >
133
+ <Box p="lg">Card 1</Box>
134
+ <Box p="lg">Card 2</Box>
135
+ <Box p="lg">Card 3</Box>
136
+ </Grid>
61
137
  </Stack>
62
138
  </Container>;
63
139
  ```
64
140
 
65
- ---
141
+ ## Styling
142
+
143
+ This library uses Vanilla Extract for type-safe, zero-runtime CSS. All styles
144
+ are compiled at build time.
145
+
146
+ ### Importing Styles
66
147
 
67
- ## ๐Ÿงช Testing
148
+ ```tsx
149
+ // Import global styles once in your app entry point
150
+ import "@yuva-devlab/ui/styles.css";
151
+ ```
68
152
 
69
- Run tests across the UI library:
153
+ ### Theming
154
+
155
+ The library includes a natural theme by default. Custom theming support coming
156
+ soon.
157
+
158
+ ## Development
70
159
 
71
160
  ```bash
161
+ # Install dependencies
162
+ pnpm install
163
+
164
+ # Build the library
165
+ pnpm --filter @yuva-devlab/ui build
166
+
167
+ # Run tests
72
168
  pnpm --filter @yuva-devlab/ui test
169
+
170
+ # Type check
171
+ pnpm --filter @yuva-devlab/ui type-check
73
172
  ```
74
173
 
75
- ## ๐Ÿ“š Documentation
174
+ ## Documentation
175
+
176
+ - **Storybook**: Run `pnpm dev:docs` to view interactive component documentation
177
+ - **Playground**: Run `pnpm dev:playground` to test components in a live
178
+ environment
179
+
180
+ ## Related Packages
181
+
182
+ - [@yuva-devlab/primitives](../primitives) - Headless component logic
183
+ - [@yuva-devlab/tokens](../tokens) - Design system tokens
184
+ - [@yuva-devlab/colors](../colors) - Color palette generation
185
+
186
+ ## License
76
187
 
77
- UI components are documented in `apps/docs` using Storybook and can be previewed
78
- in real-time in `apps/playground`.
188
+ MIT ยฉ Yuva Devlab
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yuva-devlab/ui",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "type": "module",
5
5
  "main": "./dist/index.cjs",
6
6
  "module": "./dist/index.js",
@@ -24,9 +24,9 @@
24
24
  "dependencies": {
25
25
  "@vanilla-extract/css": "^1.17.4",
26
26
  "clsx": "^2.1.1",
27
- "@yuva-devlab/colors": "0.1.0",
28
- "@yuva-devlab/primitives": "0.1.0",
29
- "@yuva-devlab/tokens": "0.1.0"
27
+ "@yuva-devlab/colors": "0.1.1",
28
+ "@yuva-devlab/primitives": "0.1.1",
29
+ "@yuva-devlab/tokens": "0.1.1"
30
30
  },
31
31
  "devDependencies": {
32
32
  "@testing-library/jest-dom": "^6.9.1",
@@ -41,9 +41,9 @@
41
41
  "vite": "^7.2.4",
42
42
  "vite-plugin-dts": "^4.5.4",
43
43
  "vitest": "^4.0.13",
44
- "@yuva-devlab/eslint-config": "0.1.0",
45
- "@yuva-devlab/prettier-config": "0.1.0",
46
- "@yuva-devlab/typescript-config": "0.1.0"
44
+ "@yuva-devlab/eslint-config": "0.1.1",
45
+ "@yuva-devlab/prettier-config": "0.1.1",
46
+ "@yuva-devlab/typescript-config": "0.1.1"
47
47
  },
48
48
  "peerDependencies": {
49
49
  "react": "^19.2.0",