@geomak/ui 6.34.0 → 7.0.0
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 +85 -76
- package/dist/index.cjs +148 -124
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +32 -20
- package/dist/index.d.ts +32 -20
- package/dist/index.js +148 -125
- package/dist/index.js.map +1 -1
- package/package.json +4 -2
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 G-MAKROGLOU
|
|
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,79 +1,101 @@
|
|
|
1
|
-
|
|
1
|
+
<div align="center">
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
<img src="./public/oxygen-logo.svg" alt="oxygen-ui" width="96" height="96" />
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
# @geomak/ui · Oxygen Design System
|
|
6
|
+
|
|
7
|
+
**60+ production-grade React components for enterprise apps** — dashboards, CRMs, internal tools, and landing pages. Token-driven, accessible, light/dark first-class, and properly tree-shakeable.
|
|
8
|
+
|
|
9
|
+
[](https://www.npmjs.com/package/@geomak/ui)
|
|
10
|
+
[](https://www.npmjs.com/package/@geomak/ui)
|
|
11
|
+
[](./LICENSE)
|
|
12
|
+
[](https://react.dev)
|
|
13
|
+
[](https://oxygen-ui.netlify.app)
|
|
14
|
+
|
|
15
|
+
### ▶ [Browse the live, interactive demo →](https://oxygen-ui.netlify.app)
|
|
16
|
+
|
|
17
|
+
<!-- Tip: drop a Storybook screen-recording here for the launch — docs/assets/preview.gif -->
|
|
18
|
+
|
|
19
|
+
</div>
|
|
20
|
+
|
|
21
|
+
Built on **React 19**, **Radix UI** (accessibility + behaviour), **Tailwind CSS**, and **Framer Motion**. Ships as ESM + CJS + TypeScript declarations, with a CSS-variable token layer you can re-theme at runtime.
|
|
6
22
|
|
|
7
23
|
---
|
|
8
24
|
|
|
9
|
-
##
|
|
25
|
+
## Why oxygen-ui
|
|
26
|
+
|
|
27
|
+
- **Token-driven, dark mode first-class.** Every colour, radius, shadow, and motion value is a CSS variable. Light and dark aren't an afterthought — both are designed. Re-theme the whole system with one override.
|
|
28
|
+
- **Accessible by default.** Behaviour comes from Radix (focus traps, keyboard nav, ARIA); icons are `aria-hidden`, controls are labelled.
|
|
29
|
+
- **Genuinely tree-shakeable.** Import one icon and ship **0.45 KB** (not the whole set). The entire library is **~76 KB gzipped** with deps external — and a CI guard keeps it from regressing.
|
|
30
|
+
- **Strict and tested.** `strict` TypeScript, ESLint at zero warnings, 360+ unit tests, per-export bundle budgets in CI.
|
|
31
|
+
- **Batteries included.** Not just buttons — a `Scheduler`, a real-time `Chat` (WebSocket-ready), `Table` with pagination, a `Form` engine, an e-commerce `Cart`, and a full **Marketing** kit (hero, pricing, testimonials, lead capture) to build the landing page too.
|
|
32
|
+
|
|
33
|
+
---
|
|
34
|
+
|
|
35
|
+
## Quick start
|
|
10
36
|
|
|
11
37
|
```bash
|
|
12
|
-
npm install @geomak/ui
|
|
13
|
-
# or
|
|
14
|
-
yarn add @geomak/ui
|
|
38
|
+
npm install @geomak/ui # peer deps: react@19, react-dom@19
|
|
15
39
|
```
|
|
16
40
|
|
|
17
|
-
Import the stylesheet once at your app root:
|
|
18
|
-
|
|
19
41
|
```tsx
|
|
20
|
-
import '@geomak/ui/styles'
|
|
42
|
+
import '@geomak/ui/styles' // 1. tokens + component styles, once at the root
|
|
43
|
+
import { ThemeProvider, Button, Badge } from '@geomak/ui'
|
|
44
|
+
|
|
45
|
+
export default function App() {
|
|
46
|
+
return (
|
|
47
|
+
<ThemeProvider> {/* 2. light/dark + token theming */}
|
|
48
|
+
<Button content="Get started" />
|
|
49
|
+
<Badge tone="accent">New</Badge>
|
|
50
|
+
</ThemeProvider>
|
|
51
|
+
)
|
|
52
|
+
}
|
|
21
53
|
```
|
|
22
54
|
|
|
23
|
-
|
|
55
|
+
Tree-shakeable icons live on their own subpath:
|
|
24
56
|
|
|
25
57
|
```tsx
|
|
26
|
-
import {
|
|
27
|
-
|
|
28
|
-
function App() {
|
|
29
|
-
return (
|
|
30
|
-
<NotificationProvider>
|
|
31
|
-
<TooltipProvider>
|
|
32
|
-
{/* your app */}
|
|
33
|
-
</TooltipProvider>
|
|
34
|
-
</NotificationProvider>
|
|
35
|
-
)
|
|
36
|
-
}
|
|
58
|
+
import { ChevronDown, Search, createIcon } from '@geomak/ui/icons'
|
|
37
59
|
```
|
|
38
60
|
|
|
39
|
-
Optional providers
|
|
61
|
+
> Optional providers wrap only the features you use: `NotificationProvider`, `TooltipProvider`, `CartProvider`.
|
|
40
62
|
|
|
41
63
|
---
|
|
42
64
|
|
|
43
65
|
## Components
|
|
44
66
|
|
|
45
|
-
60+ components across
|
|
67
|
+
60+ components across these groups — all with **live controls and a written guide** in [Storybook](https://oxygen-ui.netlify.app).
|
|
46
68
|
|
|
47
69
|
| Group | Components |
|
|
48
70
|
|---|---|
|
|
49
|
-
| **Layout** | AppShell · Box · Flex · Grid · Portal · ScalableContainer
|
|
50
|
-
| **Navigation** | TopBar · Sidebar · Breadcrumbs · ContextMenu · MegaMenu |
|
|
71
|
+
| **Layout** | AppShell · Box · Flex · Grid · Portal · ScalableContainer |
|
|
72
|
+
| **Navigation** | TopBar · Sidebar · Breadcrumbs · ContextMenu · MegaMenu · MenuButton |
|
|
51
73
|
| **Buttons** | Button · IconButton · FAB |
|
|
52
74
|
| **Inputs** | TextInput · NumberInput · Password · SearchInput · TextArea · Checkbox · Switch · RadioGroup · SegmentedControl · Dropdown · AutoComplete · TreeSelect · TagsInput · Slider · Rating · OtpInput · FileInput · ColorPicker · DatePicker · DateRangePicker · TimePicker |
|
|
53
|
-
| **Forms** | Form (`useForm`
|
|
54
|
-
| **Data Display** | Table · List · Tree · Tabs · Accordion · Card · CardCarousel · Statistic · Avatar · Badge · Kbd ·
|
|
55
|
-
| **Feedback** | Modal · Drawer · Tooltip · Notification · PopConfirm · Wizard |
|
|
75
|
+
| **Forms** | Form (`useForm`) · CreditCardForm |
|
|
76
|
+
| **Data Display** | Table · List · Tree · Tabs · Accordion · Card · CardCarousel · Statistic · Avatar · Badge · Kbd · Typography · **Chat** · **Scheduler** · Timeline · Stepper |
|
|
77
|
+
| **Feedback** | Modal · Drawer · Tooltip · Notification · PopConfirm · Wizard · LogoutTimer |
|
|
56
78
|
| **Progress** | LoadingSpinner · Skeleton |
|
|
57
79
|
| **E-Commerce** | Cart · CartProvider / `useCart` · CartButton · EmptyCart · Checkout |
|
|
80
|
+
| **Marketing** | Jumbotron · FeatureGrid · PricingPlans · Testimonials · SlideShow · Video · Parallax · Blog · Socials · CookieConsent · LeadCapture |
|
|
81
|
+
| **Icons** | `Icon.*` namespace · `@geomak/ui/icons` (tree-shakeable) · `createIcon` |
|
|
58
82
|
| **Theming** | ThemeProvider · ThemeSwitch |
|
|
83
|
+
| **Hooks** | useForm · useJwt · useBreakpoint · useLocalStorage |
|
|
59
84
|
|
|
60
85
|
---
|
|
61
86
|
|
|
62
87
|
## Design tokens
|
|
63
88
|
|
|
64
|
-
Every visual decision is
|
|
89
|
+
Every visual decision is a CSS variable (colour, radius, shadow, typography, density, motion, z-index). Tokens are also exported as JS for canvas / email / SSR:
|
|
65
90
|
|
|
66
91
|
```tsx
|
|
67
|
-
import {
|
|
92
|
+
import { vars, semanticTokens, palette } from '@geomak/ui/tokens'
|
|
68
93
|
|
|
69
|
-
// CSS-var
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
// Resolved hex/px values
|
|
73
|
-
semanticTokens.dark.accent // '#2d88ff'
|
|
94
|
+
<div style={{ background: vars.color.surface, borderRadius: vars.radius.lg }} /> // CSS-var refs (auto light/dark)
|
|
95
|
+
semanticTokens.dark.accent // resolved hex
|
|
74
96
|
```
|
|
75
97
|
|
|
76
|
-
Override globally after importing the stylesheet:
|
|
98
|
+
Override globally, after importing the stylesheet:
|
|
77
99
|
|
|
78
100
|
```css
|
|
79
101
|
:root { --color-accent: #7c3aed; }
|
|
@@ -83,63 +105,50 @@ See the **Tokens**, **Palette**, and **Parameterization** guides in Storybook.
|
|
|
83
105
|
|
|
84
106
|
---
|
|
85
107
|
|
|
86
|
-
## Tailwind setup (
|
|
108
|
+
## Tailwind setup (optional)
|
|
87
109
|
|
|
88
|
-
|
|
110
|
+
The shipped `@geomak/ui/styles` already covers the components. This step is only needed if you want the same brand palette + token utilities in *your own* markup:
|
|
89
111
|
|
|
90
112
|
```js
|
|
91
|
-
|
|
113
|
+
// tailwind.config.cjs
|
|
114
|
+
const { palette } = require('@geomak/ui/tokens')
|
|
92
115
|
|
|
93
116
|
module.exports = {
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
extend: {
|
|
98
|
-
colors: PALETTE,
|
|
99
|
-
// semantic utilities map to the CSS vars, e.g.:
|
|
100
|
-
// background: 'var(--color-background)', surface: 'var(--color-surface)', …
|
|
101
|
-
},
|
|
102
|
-
},
|
|
117
|
+
content: ['./src/**/*.{ts,tsx}', './node_modules/@geomak/ui/dist/**/*.js'],
|
|
118
|
+
darkMode: 'class',
|
|
119
|
+
theme: { extend: { colors: palette } },
|
|
103
120
|
}
|
|
104
121
|
```
|
|
105
122
|
|
|
106
|
-
The
|
|
123
|
+
The standard **gray / slate / zinc** ramps and **black** stay available alongside the brand palette.
|
|
107
124
|
|
|
108
125
|
---
|
|
109
126
|
|
|
110
|
-
##
|
|
127
|
+
## Package exports
|
|
111
128
|
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
yarn test # run unit tests (Vitest)
|
|
119
|
-
yarn ci # typecheck + lint + test
|
|
120
|
-
```
|
|
129
|
+
| Import | What |
|
|
130
|
+
|---|---|
|
|
131
|
+
| `@geomak/ui` | All components, providers, hooks, the `Icon` namespace, `cx` |
|
|
132
|
+
| `@geomak/ui/icons` | Tree-shakeable named icons + `createIcon` |
|
|
133
|
+
| `@geomak/ui/styles` | Compiled CSS (tokens + components) |
|
|
134
|
+
| `@geomak/ui/tokens` | `palette`, `semanticTokens`, `vars` as JS |
|
|
121
135
|
|
|
122
136
|
---
|
|
123
137
|
|
|
124
|
-
##
|
|
125
|
-
|
|
126
|
-
Uses [semantic-release](https://github.com/semantic-release/semantic-release) with [Conventional Commits](https://www.conventionalcommits.org/).
|
|
138
|
+
## Development
|
|
127
139
|
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
140
|
+
```bash
|
|
141
|
+
yarn # install
|
|
142
|
+
yarn storybook # interactive catalog + guides
|
|
143
|
+
yarn build # ESM + CJS + .d.ts + styles
|
|
144
|
+
yarn ci # typecheck + lint + test + bundle-size guard
|
|
145
|
+
yarn size # report per-export gzip sizes against budgets
|
|
146
|
+
```
|
|
133
147
|
|
|
134
|
-
|
|
148
|
+
Releases are automated with [semantic-release](https://github.com/semantic-release/semantic-release) + [Conventional Commits](https://www.conventionalcommits.org/): merging to `main` lints, type-checks, tests, publishes to npm, and deploys Storybook.
|
|
135
149
|
|
|
136
150
|
---
|
|
137
151
|
|
|
138
|
-
##
|
|
152
|
+
## License
|
|
139
153
|
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
```bash
|
|
143
|
-
yarn build
|
|
144
|
-
npm publish --access public
|
|
145
|
-
```
|
|
154
|
+
[MIT](./LICENSE) © G-MAKROGLOU
|