plainframe-ui 0.1.92 → 0.1.93
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/LICENSE +21 -0
- package/README.md +184 -0
- package/dist/index.d.ts +0 -5
- package/package.json +4 -4
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 Plainframe
|
|
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
ADDED
|
@@ -0,0 +1,184 @@
|
|
|
1
|
+
# plainframe-ui
|
|
2
|
+
|
|
3
|
+
Token-driven React UI components with built-in theming, color modes, and accessible primitives.
|
|
4
|
+
|
|
5
|
+
Plainframe UI is a practical component library for apps that need consistent styling without fighting the system.
|
|
6
|
+
You get a theme with spacing/radius/typography + neutral/primary scales, plus components that are keyboard-safe by default.
|
|
7
|
+
|
|
8
|
+
## Install
|
|
9
|
+
|
|
10
|
+
npm:
|
|
11
|
+
```bash
|
|
12
|
+
npm install plainframe-ui @emotion/react
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
pnpm:
|
|
16
|
+
```bash
|
|
17
|
+
pnpm add plainframe-ui @emotion/react
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
yarn:
|
|
21
|
+
```bash
|
|
22
|
+
yarn add plainframe-ui @emotion/react
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
## Requirements
|
|
26
|
+
|
|
27
|
+
- React 18 / 19
|
|
28
|
+
- @emotion/react 11+
|
|
29
|
+
|
|
30
|
+
## Quick start
|
|
31
|
+
|
|
32
|
+
```tsx
|
|
33
|
+
import { ThemeProvider, CssBaseline, Button } from "plainframe-ui";
|
|
34
|
+
|
|
35
|
+
export default function App() {
|
|
36
|
+
return (
|
|
37
|
+
<ThemeProvider>
|
|
38
|
+
<CssBaseline />
|
|
39
|
+
<Button variant="filled">Hello</Button>
|
|
40
|
+
</ThemeProvider>
|
|
41
|
+
);
|
|
42
|
+
}
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
## What you get
|
|
46
|
+
|
|
47
|
+
- **Theme tokens**: spacing, radius, typography, neutral scale, primary palettes
|
|
48
|
+
- **Color modes**: light/dark + system-friendly patterns
|
|
49
|
+
- **Accessible defaults**: focus states, keyboard behavior, sensible ARIA patterns
|
|
50
|
+
- **TypeScript-first**: predictable prop typing, good autocomplete
|
|
51
|
+
- **Composable primitives**: easy to build custom UI on top without rewriting everything
|
|
52
|
+
|
|
53
|
+
## Theming
|
|
54
|
+
|
|
55
|
+
### Default mode
|
|
56
|
+
|
|
57
|
+
```tsx
|
|
58
|
+
<ThemeProvider defaultMode="dark">
|
|
59
|
+
{/* ... */}
|
|
60
|
+
</ThemeProvider>
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
### Read the theme inside components
|
|
64
|
+
|
|
65
|
+
```tsx
|
|
66
|
+
/** @jsxImportSource @emotion/react */
|
|
67
|
+
import { css } from "@emotion/react";
|
|
68
|
+
import { Button, usePlainframeUITheme } from "plainframe-ui";
|
|
69
|
+
|
|
70
|
+
export function Example() {
|
|
71
|
+
const theme = usePlainframeUITheme();
|
|
72
|
+
|
|
73
|
+
return (
|
|
74
|
+
<Button
|
|
75
|
+
css={css({
|
|
76
|
+
borderRadius: theme.radius.lg,
|
|
77
|
+
paddingInline: theme.spacing.md,
|
|
78
|
+
})}
|
|
79
|
+
>
|
|
80
|
+
Styled by tokens
|
|
81
|
+
</Button>
|
|
82
|
+
);
|
|
83
|
+
}
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
### Change primary palette
|
|
87
|
+
|
|
88
|
+
```tsx
|
|
89
|
+
<ThemeProvider theme={{ primaryKey: "indigo" }}>
|
|
90
|
+
{/* components use theme.palette[primaryKey] */}
|
|
91
|
+
</ThemeProvider>
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
### Override tokens (spacing / radius)
|
|
95
|
+
|
|
96
|
+
```tsx
|
|
97
|
+
<ThemeProvider
|
|
98
|
+
theme={{
|
|
99
|
+
spacing: {
|
|
100
|
+
xxs: "0.25rem",
|
|
101
|
+
xs: "0.4rem",
|
|
102
|
+
sm: "0.6rem",
|
|
103
|
+
md: "0.85rem",
|
|
104
|
+
lg: "1.2rem",
|
|
105
|
+
xl: "1.8rem",
|
|
106
|
+
},
|
|
107
|
+
radius: {
|
|
108
|
+
xxs: "0.2rem",
|
|
109
|
+
xs: "0.35rem",
|
|
110
|
+
sm: "0.55rem",
|
|
111
|
+
md: "0.75rem",
|
|
112
|
+
lg: "1rem",
|
|
113
|
+
xl: "1.5rem",
|
|
114
|
+
full: "9999px",
|
|
115
|
+
},
|
|
116
|
+
}}
|
|
117
|
+
>
|
|
118
|
+
{/* ... */}
|
|
119
|
+
</ThemeProvider>
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
## Components
|
|
123
|
+
|
|
124
|
+
Grouped so it’s easier to scan.
|
|
125
|
+
|
|
126
|
+
### Foundation & layout
|
|
127
|
+
- Container
|
|
128
|
+
- Flex
|
|
129
|
+
- Divider
|
|
130
|
+
- Typography
|
|
131
|
+
- Kbd
|
|
132
|
+
- Image
|
|
133
|
+
- Quote
|
|
134
|
+
- Card
|
|
135
|
+
- CardGroup
|
|
136
|
+
- ContextZone
|
|
137
|
+
- ActionBar
|
|
138
|
+
|
|
139
|
+
### Inputs
|
|
140
|
+
- Button
|
|
141
|
+
- ButtonGroup
|
|
142
|
+
- Checkbox
|
|
143
|
+
- Switch
|
|
144
|
+
- Slider
|
|
145
|
+
- RadioGroup
|
|
146
|
+
- TextField
|
|
147
|
+
- TextArea
|
|
148
|
+
- Select
|
|
149
|
+
- Autocomplete
|
|
150
|
+
- CodeField
|
|
151
|
+
- Chip
|
|
152
|
+
|
|
153
|
+
### Navigation
|
|
154
|
+
- Menu
|
|
155
|
+
- DropdownMenu
|
|
156
|
+
- Tabs
|
|
157
|
+
- Pagination
|
|
158
|
+
- Breadcrumbs
|
|
159
|
+
- Stepper
|
|
160
|
+
|
|
161
|
+
### Overlay
|
|
162
|
+
- Modal
|
|
163
|
+
- Drawer
|
|
164
|
+
- Popover
|
|
165
|
+
- Tooltip
|
|
166
|
+
- Backdrop
|
|
167
|
+
|
|
168
|
+
### Feedback
|
|
169
|
+
- Alert
|
|
170
|
+
- Toast
|
|
171
|
+
- Progress
|
|
172
|
+
- Skeleton
|
|
173
|
+
- Badge
|
|
174
|
+
|
|
175
|
+
### Transitions
|
|
176
|
+
- Fade
|
|
177
|
+
- Grow
|
|
178
|
+
- Slide
|
|
179
|
+
- Rotate
|
|
180
|
+
- Swap
|
|
181
|
+
|
|
182
|
+
## License
|
|
183
|
+
|
|
184
|
+
MIT
|
package/dist/index.d.ts
CHANGED
|
@@ -810,10 +810,6 @@ type KbdProps = Omit<React.HTMLAttributes<HTMLElement>, "style"> & {
|
|
|
810
810
|
radius?: number | string;
|
|
811
811
|
mono?: boolean;
|
|
812
812
|
uppercase?: boolean;
|
|
813
|
-
/**
|
|
814
|
-
* Extra px to boost symbol-only content in mono fonts.
|
|
815
|
-
* Set to 0 to disable.
|
|
816
|
-
*/
|
|
817
813
|
symbolBoost?: number;
|
|
818
814
|
css?: Interpolation<Theme>;
|
|
819
815
|
className?: string;
|
|
@@ -1383,7 +1379,6 @@ type TextFieldProps = WithCss & {
|
|
|
1383
1379
|
readOnly?: boolean;
|
|
1384
1380
|
required?: boolean;
|
|
1385
1381
|
maxLength?: number;
|
|
1386
|
-
/** Called when the surface (wrapper) is clicked, excluding buttons/icons with role="button" */
|
|
1387
1382
|
onSurfaceClick?: (e: React.MouseEvent) => void;
|
|
1388
1383
|
};
|
|
1389
1384
|
declare const TextField: React.ForwardRefExoticComponent<TextFieldProps & React.RefAttributes<HTMLInputElement>>;
|
package/package.json
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "plainframe-ui",
|
|
3
|
-
"version": "0.1.
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "0.1.93",
|
|
4
|
+
"description": "A modern React component library with theming, accessibility, and motion-ready primitives.",
|
|
5
5
|
"author": "Plainframe",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"repository": {
|
|
8
8
|
"type": "git",
|
|
9
|
-
"url": "https://github.com/
|
|
9
|
+
"url": "https://github.com/milkevich/plainframe-ui"
|
|
10
10
|
},
|
|
11
|
-
"homepage": "https://plainframe.com",
|
|
11
|
+
"homepage": "https://plainframe-ui.com",
|
|
12
12
|
"keywords": [
|
|
13
13
|
"react",
|
|
14
14
|
"components",
|