@bestow-ui/react 0.8.2 → 0.8.3
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 +130 -0
- package/package.json +21 -4
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Dev-BestOW
|
|
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,130 @@
|
|
|
1
|
+
# @bestow-ui/react
|
|
2
|
+
|
|
3
|
+
[](https://www.npmjs.com/package/@bestow-ui/react)
|
|
4
|
+
[](https://github.com/Dev-BestOW/BestOW-UI/blob/main/LICENSE)
|
|
5
|
+
|
|
6
|
+
React components and theming for **BestOW UI**, a design system built on [vanilla-extract](https://vanilla-extract.style) and [Radix UI](https://www.radix-ui.com).
|
|
7
|
+
|
|
8
|
+
- **Zero-runtime styles** — CSS is extracted at build time into a single stylesheet. Works with Next.js App Router and React Server Components.
|
|
9
|
+
- **Light / dark mode and brand themes** — switch modes with one prop, generate an accessible color set from a single brand color.
|
|
10
|
+
- **Accessible by default** — keyboard and screen reader support via Radix primitives. Every story is checked with axe in both light and dark themes.
|
|
11
|
+
- **Tree-shakable** — import only what you use (a single `Button` is about 2.4 kB, minified + brotli).
|
|
12
|
+
|
|
13
|
+
📖 **Docs & live examples:** [Storybook](https://dev-bestow.github.io/BestOW-UI/) · [Next.js example app](https://dev-bestow.github.io/BestOW-UI/playground/)
|
|
14
|
+
|
|
15
|
+
> 🇰🇷 한국어 안내는 [아래](#한국어)에 있어요.
|
|
16
|
+
|
|
17
|
+
## Install
|
|
18
|
+
|
|
19
|
+
```bash
|
|
20
|
+
npm install @bestow-ui/react
|
|
21
|
+
# pnpm add @bestow-ui/react / yarn add @bestow-ui/react
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
Requires React 18 or later. [`@bestow-ui/icons`](https://www.npmjs.com/package/@bestow-ui/icons) and [`@bestow-ui/tokens`](https://www.npmjs.com/package/@bestow-ui/tokens) are installed as dependencies.
|
|
25
|
+
|
|
26
|
+
## Quick start
|
|
27
|
+
|
|
28
|
+
```tsx
|
|
29
|
+
import '@bestow-ui/react/styles.css'; // once, at your app entry
|
|
30
|
+
import { ThemeProvider, ToastProvider, Button, useToast } from '@bestow-ui/react';
|
|
31
|
+
|
|
32
|
+
export function App() {
|
|
33
|
+
return (
|
|
34
|
+
<ThemeProvider theme="light">
|
|
35
|
+
<ToastProvider>
|
|
36
|
+
<SaveButton />
|
|
37
|
+
</ToastProvider>
|
|
38
|
+
</ThemeProvider>
|
|
39
|
+
);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
function SaveButton() {
|
|
43
|
+
const { toast } = useToast();
|
|
44
|
+
return <Button onClick={() => toast({ title: 'Saved', variant: 'success' })}>Save</Button>;
|
|
45
|
+
}
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
With the Next.js App Router, put the providers in a `'use client'` file and wrap them in `app/layout.tsx`. See the [Introduction](https://dev-bestow.github.io/BestOW-UI/) page for the full setup.
|
|
49
|
+
|
|
50
|
+
## Dark mode
|
|
51
|
+
|
|
52
|
+
```tsx
|
|
53
|
+
const [mode, setMode] = useState<ThemeName>('light');
|
|
54
|
+
|
|
55
|
+
<ThemeProvider theme={mode}>…</ThemeProvider>;
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
Portal content (Modal, Tooltip, Select, Toast, …) follows the theme automatically.
|
|
59
|
+
|
|
60
|
+
## Brand themes
|
|
61
|
+
|
|
62
|
+
```tsx
|
|
63
|
+
import { ThemeProvider, createTheme, createIntentColors } from '@bestow-ui/react';
|
|
64
|
+
|
|
65
|
+
const brand = createTheme(
|
|
66
|
+
createIntentColors('primary', '#7c3aed'), // light + dark color sets, WCAG 4.5:1 contrast guaranteed
|
|
67
|
+
{ common: { radius: { md: '6px' } } },
|
|
68
|
+
);
|
|
69
|
+
|
|
70
|
+
<ThemeProvider theme={mode} overrides={brand}>…</ThemeProvider>;
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
All tokens are plain CSS variables with stable names, so you can also override them in CSS:
|
|
74
|
+
|
|
75
|
+
```css
|
|
76
|
+
:root {
|
|
77
|
+
--bestow-color-primary-solid: #7c3aed;
|
|
78
|
+
}
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
## Components
|
|
82
|
+
|
|
83
|
+
| Category | Components |
|
|
84
|
+
|---|---|
|
|
85
|
+
| Layout | `Stack`, `Divider`, `Card` |
|
|
86
|
+
| Typography | `Typography` |
|
|
87
|
+
| Actions | `Button` |
|
|
88
|
+
| Forms | `Input`, `TextField`, `Textarea`, `Select`, `Checkbox`, `RadioGroup`, `Switch` |
|
|
89
|
+
| Feedback | `ToastProvider` + `useToast`, `Spinner`, `Skeleton`, `Badge` |
|
|
90
|
+
| Overlays | `Modal`, `Popover`, `Tooltip`, `DropdownMenu` |
|
|
91
|
+
| Navigation | `Tabs`, `Accordion`, `Pagination` |
|
|
92
|
+
| Display | `Avatar` |
|
|
93
|
+
| Theming | `ThemeProvider`, `createTheme`, `createIntentColors`, `vars`, `useTheme`, `usePortalProps` |
|
|
94
|
+
|
|
95
|
+
## Links
|
|
96
|
+
|
|
97
|
+
- [Storybook](https://dev-bestow.github.io/BestOW-UI/) — docs, design tokens, all components
|
|
98
|
+
- [GitHub](https://github.com/Dev-BestOW/BestOW-UI) — source, [issues](https://github.com/Dev-BestOW/BestOW-UI/issues), [contributing guide](https://github.com/Dev-BestOW/BestOW-UI/blob/main/CONTRIBUTING.md)
|
|
99
|
+
- [Changelog](https://github.com/Dev-BestOW/BestOW-UI/blob/main/packages/react/CHANGELOG.md)
|
|
100
|
+
|
|
101
|
+
## License
|
|
102
|
+
|
|
103
|
+
[MIT](https://github.com/Dev-BestOW/BestOW-UI/blob/main/LICENSE) © Dev-BestOW
|
|
104
|
+
|
|
105
|
+
---
|
|
106
|
+
|
|
107
|
+
## 한국어
|
|
108
|
+
|
|
109
|
+
**BestOW UI** 의 React 컴포넌트와 테마 패키지예요. [vanilla-extract](https://vanilla-extract.style) 와 [Radix UI](https://www.radix-ui.com) 위에 만들었어요.
|
|
110
|
+
|
|
111
|
+
- **런타임 비용 없는 스타일** — 빌드 때 CSS 파일 하나로 뽑혀서, Next.js App Router·서버 컴포넌트에서도 그대로 써요.
|
|
112
|
+
- **라이트·다크 모드와 브랜드 테마** — prop 하나로 모드를 바꾸고, 대표색 하나로 대비 4.5:1 을 지키는 색 세트를 만들어요.
|
|
113
|
+
- **기본으로 접근성 지원** — Radix 기반 키보드·스크린리더 지원. 모든 스토리를 라이트·다크 두 테마에서 axe 로 검사해요.
|
|
114
|
+
- **tree-shaking** — 쓰는 것만 번들에 들어가요 (`Button` 하나 약 2.4 kB).
|
|
115
|
+
|
|
116
|
+
```bash
|
|
117
|
+
npm install @bestow-ui/react
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
```tsx
|
|
121
|
+
import '@bestow-ui/react/styles.css';
|
|
122
|
+
import { ThemeProvider, Button } from '@bestow-ui/react';
|
|
123
|
+
|
|
124
|
+
<ThemeProvider theme="light">
|
|
125
|
+
<Button>확인</Button>
|
|
126
|
+
</ThemeProvider>;
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
설치·설정·다크 모드·브랜드 테마·아이콘 사용법은 [Storybook 시작하기](https://dev-bestow.github.io/BestOW-UI/) 에 자세히 정리돼 있어요.
|
|
130
|
+
버그 제보·제안은 [GitHub Issues](https://github.com/Dev-BestOW/BestOW-UI/issues), 기여 방법은 [CONTRIBUTING.md](https://github.com/Dev-BestOW/BestOW-UI/blob/main/CONTRIBUTING.md) 를 봐 주세요.
|
package/package.json
CHANGED
|
@@ -1,14 +1,31 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bestow-ui/react",
|
|
3
|
-
"version": "0.8.
|
|
4
|
-
"description": "BestOW UI
|
|
3
|
+
"version": "0.8.3",
|
|
4
|
+
"description": "React components and theming for BestOW UI — vanilla-extract + Radix, light/dark and brand themes, accessible by default",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"bestow-ui",
|
|
7
|
+
"design-system",
|
|
8
|
+
"react",
|
|
9
|
+
"components",
|
|
10
|
+
"ui",
|
|
11
|
+
"vanilla-extract",
|
|
12
|
+
"radix-ui",
|
|
13
|
+
"dark-mode",
|
|
14
|
+
"theming",
|
|
15
|
+
"accessibility",
|
|
16
|
+
"nextjs"
|
|
17
|
+
],
|
|
5
18
|
"license": "MIT",
|
|
19
|
+
"author": "Dev-BestOW",
|
|
6
20
|
"repository": {
|
|
7
21
|
"type": "git",
|
|
8
22
|
"url": "git+https://github.com/Dev-BestOW/BestOW-UI.git",
|
|
9
23
|
"directory": "packages/react"
|
|
10
24
|
},
|
|
11
25
|
"homepage": "https://dev-bestow.github.io/BestOW-UI/",
|
|
26
|
+
"bugs": {
|
|
27
|
+
"url": "https://github.com/Dev-BestOW/BestOW-UI/issues"
|
|
28
|
+
},
|
|
12
29
|
"publishConfig": {
|
|
13
30
|
"access": "public"
|
|
14
31
|
},
|
|
@@ -35,8 +52,8 @@
|
|
|
35
52
|
"react-dom": "^18.0.0 || ^19.0.0"
|
|
36
53
|
},
|
|
37
54
|
"dependencies": {
|
|
38
|
-
"@bestow-ui/icons": "^0.1.
|
|
39
|
-
"@bestow-ui/tokens": "^0.8.
|
|
55
|
+
"@bestow-ui/icons": "^0.1.1",
|
|
56
|
+
"@bestow-ui/tokens": "^0.8.3",
|
|
40
57
|
"@radix-ui/react-accordion": "^1.3.1",
|
|
41
58
|
"@radix-ui/react-avatar": "^1.3.1",
|
|
42
59
|
"@radix-ui/react-dialog": "^1.3.1",
|