@moul-dev/ui 2026.8.17
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 +149 -0
- package/dist/assets/stylex.css +2391 -0
- package/dist/favicon.svg +20 -0
- package/dist/icons.svg +24 -0
- package/dist/moul-ui.js +6662 -0
- package/dist/src/App.d.ts +2 -0
- package/dist/src/components/Alert/Alert.d.ts +14 -0
- package/dist/src/components/Alert/Alert.styles.d.ts +188 -0
- package/dist/src/components/Alert/index.d.ts +2 -0
- package/dist/src/components/AlertDialog/AlertDialog.d.ts +23 -0
- package/dist/src/components/AlertDialog/AlertDialog.styles.d.ts +35 -0
- package/dist/src/components/AlertDialog/index.d.ts +1 -0
- package/dist/src/components/AreaChart/AreaChart.d.ts +21 -0
- package/dist/src/components/AreaChart/AreaChart.styles.d.ts +7 -0
- package/dist/src/components/AreaChart/index.d.ts +2 -0
- package/dist/src/components/Avatar/Avatar.d.ts +10 -0
- package/dist/src/components/Avatar/Avatar.styles.d.ts +31 -0
- package/dist/src/components/Avatar/index.d.ts +2 -0
- package/dist/src/components/Badge/Badge.d.ts +9 -0
- package/dist/src/components/Badge/Badge.styles.d.ts +35 -0
- package/dist/src/components/Badge/index.d.ts +2 -0
- package/dist/src/components/BarChart/BarChart.d.ts +16 -0
- package/dist/src/components/BarChart/BarChart.styles.d.ts +7 -0
- package/dist/src/components/BarChart/index.d.ts +2 -0
- package/dist/src/components/Breadcrumbs/Breadcrumbs.d.ts +16 -0
- package/dist/src/components/Breadcrumbs/Breadcrumbs.styles.d.ts +34 -0
- package/dist/src/components/Breadcrumbs/index.d.ts +2 -0
- package/dist/src/components/Button/Button.d.ts +10 -0
- package/dist/src/components/Button/Button.styles.d.ts +148 -0
- package/dist/src/components/Button/index.d.ts +2 -0
- package/dist/src/components/ButtonGroup/ButtonGroup.d.ts +7 -0
- package/dist/src/components/ButtonGroup/ButtonGroup.styles.d.ts +9 -0
- package/dist/src/components/ButtonGroup/index.d.ts +2 -0
- package/dist/src/components/Card/Card.d.ts +19 -0
- package/dist/src/components/Card/Card.styles.d.ts +185 -0
- package/dist/src/components/Card/CardBody.d.ts +7 -0
- package/dist/src/components/Card/CardFooter.d.ts +7 -0
- package/dist/src/components/Card/CardHeader.d.ts +7 -0
- package/dist/src/components/Card/index.d.ts +8 -0
- package/dist/src/components/ChartCommon.d.ts +1 -0
- package/dist/src/components/ChartContainer/ChartContainer.d.ts +21 -0
- package/dist/src/components/ChartContainer/ChartContainer.styles.d.ts +124 -0
- package/dist/src/components/ChartContainer/index.d.ts +2 -0
- package/dist/src/components/ChartTooltip/ChartTooltip.d.ts +8 -0
- package/dist/src/components/ChartTooltip/ChartTooltip.styles.d.ts +61 -0
- package/dist/src/components/ChartTooltip/index.d.ts +2 -0
- package/dist/src/components/Checkbox/Checkbox.d.ts +9 -0
- package/dist/src/components/Checkbox/Checkbox.styles.d.ts +94 -0
- package/dist/src/components/Checkbox/context.d.ts +5 -0
- package/dist/src/components/Checkbox/index.d.ts +2 -0
- package/dist/src/components/CheckboxGroup/CheckboxGroup.d.ts +13 -0
- package/dist/src/components/CheckboxGroup/CheckboxGroup.styles.d.ts +18 -0
- package/dist/src/components/CheckboxGroup/index.d.ts +2 -0
- package/dist/src/components/ComboBox/ComboBox.d.ts +25 -0
- package/dist/src/components/ComboBox/ComboBox.styles.d.ts +223 -0
- package/dist/src/components/ComboBox/index.d.ts +2 -0
- package/dist/src/components/Description/Description.d.ts +8 -0
- package/dist/src/components/Description/Description.styles.d.ts +9 -0
- package/dist/src/components/Description/index.d.ts +2 -0
- package/dist/src/components/DoughnutChart/DoughnutChart.d.ts +15 -0
- package/dist/src/components/DoughnutChart/DoughnutChart.styles.d.ts +10 -0
- package/dist/src/components/DoughnutChart/index.d.ts +2 -0
- package/dist/src/components/ErrorMessage/ErrorMessage.d.ts +7 -0
- package/dist/src/components/ErrorMessage/ErrorMessage.styles.d.ts +9 -0
- package/dist/src/components/ErrorMessage/index.d.ts +2 -0
- package/dist/src/components/FieldError/FieldError.d.ts +9 -0
- package/dist/src/components/FieldError/FieldError.styles.d.ts +9 -0
- package/dist/src/components/FieldError/index.d.ts +2 -0
- package/dist/src/components/Form/Form.d.ts +8 -0
- package/dist/src/components/Form/Form.styles.d.ts +3 -0
- package/dist/src/components/Form/index.d.ts +2 -0
- package/dist/src/components/InputOTP/InputOTP.d.ts +25 -0
- package/dist/src/components/InputOTP/InputOTP.styles.d.ts +113 -0
- package/dist/src/components/InputOTP/index.d.ts +3 -0
- package/dist/src/components/Kbd/Kbd.d.ts +7 -0
- package/dist/src/components/Kbd/Kbd.styles.d.ts +20 -0
- package/dist/src/components/Kbd/index.d.ts +2 -0
- package/dist/src/components/Label/Label.d.ts +8 -0
- package/dist/src/components/Label/Label.styles.d.ts +10 -0
- package/dist/src/components/Label/index.d.ts +2 -0
- package/dist/src/components/LineChart/LineChart.d.ts +15 -0
- package/dist/src/components/LineChart/LineChart.styles.d.ts +7 -0
- package/dist/src/components/LineChart/index.d.ts +2 -0
- package/dist/src/components/Link/Link.d.ts +9 -0
- package/dist/src/components/Link/Link.styles.d.ts +92 -0
- package/dist/src/components/Link/index.d.ts +2 -0
- package/dist/src/components/Modal/Modal.d.ts +34 -0
- package/dist/src/components/Modal/Modal.styles.d.ts +91 -0
- package/dist/src/components/Modal/index.d.ts +1 -0
- package/dist/src/components/NumberField/NumberField.d.ts +14 -0
- package/dist/src/components/NumberField/NumberField.styles.d.ts +147 -0
- package/dist/src/components/NumberField/index.d.ts +2 -0
- package/dist/src/components/Percentage/Percentage.styles.d.ts +70 -0
- package/dist/src/components/Percentage/PercentageBar.d.ts +11 -0
- package/dist/src/components/Percentage/PercentageCircle.d.ts +12 -0
- package/dist/src/components/Percentage/index.d.ts +4 -0
- package/dist/src/components/Popover/Popover.d.ts +15 -0
- package/dist/src/components/Popover/Popover.styles.d.ts +22 -0
- package/dist/src/components/Popover/index.d.ts +1 -0
- package/dist/src/components/RadioGroup/RadioGroup.d.ts +16 -0
- package/dist/src/components/RadioGroup/RadioGroup.styles.d.ts +75 -0
- package/dist/src/components/RadioGroup/index.d.ts +2 -0
- package/dist/src/components/SearchField/SearchField.d.ts +14 -0
- package/dist/src/components/SearchField/SearchField.styles.d.ts +147 -0
- package/dist/src/components/SearchField/index.d.ts +2 -0
- package/dist/src/components/Select/Select.d.ts +30 -0
- package/dist/src/components/Select/Select.styles.d.ts +171 -0
- package/dist/src/components/Select/index.d.ts +2 -0
- package/dist/src/components/Separator/Separator.d.ts +8 -0
- package/dist/src/components/Separator/Separator.styles.d.ts +20 -0
- package/dist/src/components/Separator/index.d.ts +2 -0
- package/dist/src/components/Sidebar/Sidebar.d.ts +77 -0
- package/dist/src/components/Sidebar/Sidebar.styles.d.ts +326 -0
- package/dist/src/components/Sidebar/index.d.ts +2 -0
- package/dist/src/components/Skeleton/Skeleton.d.ts +7 -0
- package/dist/src/components/Skeleton/Skeleton.styles.d.ts +17 -0
- package/dist/src/components/Skeleton/index.d.ts +2 -0
- package/dist/src/components/Slider/Slider.d.ts +21 -0
- package/dist/src/components/Slider/Slider.styles.d.ts +78 -0
- package/dist/src/components/Slider/index.d.ts +2 -0
- package/dist/src/components/Spinner/Spinner.d.ts +9 -0
- package/dist/src/components/Spinner/Spinner.styles.d.ts +20 -0
- package/dist/src/components/Spinner/index.d.ts +2 -0
- package/dist/src/components/Stat/Stat.d.ts +15 -0
- package/dist/src/components/Stat/Stat.styles.d.ts +115 -0
- package/dist/src/components/Stat/index.d.ts +2 -0
- package/dist/src/components/Switch/Switch.d.ts +8 -0
- package/dist/src/components/Switch/Switch.styles.d.ts +66 -0
- package/dist/src/components/Switch/index.d.ts +2 -0
- package/dist/src/components/Table/Table.d.ts +33 -0
- package/dist/src/components/Table/Table.styles.d.ts +77 -0
- package/dist/src/components/Table/index.d.ts +2 -0
- package/dist/src/components/Tabs/Tabs.d.ts +29 -0
- package/dist/src/components/Tabs/Tabs.styles.d.ts +186 -0
- package/dist/src/components/Tabs/index.d.ts +2 -0
- package/dist/src/components/TagGroup/TagGroup.d.ts +27 -0
- package/dist/src/components/TagGroup/TagGroup.styles.d.ts +199 -0
- package/dist/src/components/TagGroup/index.d.ts +2 -0
- package/dist/src/components/TextArea/TextArea.d.ts +14 -0
- package/dist/src/components/TextArea/TextArea.styles.d.ts +63 -0
- package/dist/src/components/TextArea/index.d.ts +2 -0
- package/dist/src/components/TextField/TextField.d.ts +15 -0
- package/dist/src/components/TextField/TextField.styles.d.ts +80 -0
- package/dist/src/components/TextField/index.d.ts +2 -0
- package/dist/src/components/Toast/Toast.d.ts +28 -0
- package/dist/src/components/Toast/Toast.styles.d.ts +29 -0
- package/dist/src/components/Toast/index.d.ts +1 -0
- package/dist/src/components/ToggleButton/ToggleButton.d.ts +11 -0
- package/dist/src/components/ToggleButton/ToggleButton.styles.d.ts +223 -0
- package/dist/src/components/ToggleButton/index.d.ts +2 -0
- package/dist/src/components/ToggleButtonGroup/ToggleButtonGroup.d.ts +10 -0
- package/dist/src/components/ToggleButtonGroup/ToggleButtonGroup.styles.d.ts +36 -0
- package/dist/src/components/ToggleButtonGroup/context.d.ts +8 -0
- package/dist/src/components/ToggleButtonGroup/index.d.ts +2 -0
- package/dist/src/components/Tooltip/Tooltip.d.ts +19 -0
- package/dist/src/components/Tooltip/Tooltip.styles.d.ts +26 -0
- package/dist/src/components/Tooltip/index.d.ts +1 -0
- package/dist/src/components/TopList/TopList.d.ts +17 -0
- package/dist/src/components/TopList/TopList.styles.d.ts +43 -0
- package/dist/src/components/TopList/index.d.ts +2 -0
- package/dist/src/components/Typography/Typography.d.ts +26 -0
- package/dist/src/components/Typography/Typography.styles.d.ts +53 -0
- package/dist/src/components/Typography/index.d.ts +2 -0
- package/dist/src/index.d.ts +102 -0
- package/dist/src/main.d.ts +0 -0
- package/dist/src/theme/ThemeProvider.d.ts +17 -0
- package/dist/src/tokens/tokens.stylex.d.ts +121 -0
- package/dist/src/utils/mergeProps.d.ts +1 -0
- package/dist/src/utils/warnMissingLabel.d.ts +16 -0
- package/package.json +94 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Moul (moul.dev)
|
|
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,149 @@
|
|
|
1
|
+
# @moul-dev/ui
|
|
2
|
+
|
|
3
|
+
> Accessible, zero-runtime React component library built on React Aria and StyleX.
|
|
4
|
+
|
|
5
|
+
[](https://www.npmjs.com/package/@moul-dev/ui)
|
|
6
|
+
[](https://opensource.org/licenses/MIT)
|
|
7
|
+
|
|
8
|
+
**Moul UI** is a modular component library designed for product engineers who want a modern, consistent, and highly accessible baseline for React applications.
|
|
9
|
+
|
|
10
|
+
By merging the robust, accessible interaction primitives of **React Aria** with the compile-time type safety and efficiency of **StyleX**, Moul UI delivers beautiful default styles with zero runtime styling overhead.
|
|
11
|
+
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
## ✨ Features
|
|
15
|
+
|
|
16
|
+
- ♿ **Accessible by Default**: Full keyboard navigation, screen reader support, ARIA semantics, and robust interaction states powered by React Aria.
|
|
17
|
+
- ⚡ **Zero-Runtime Styling**: Built with StyleX. Atomic CSS is extracted at build time, eliminating CSS-in-JS runtime overhead.
|
|
18
|
+
- 🎨 **Dynamic OKLCH Theming**: Perceptually uniform color tokens with runtime hue and chroma customization for instant white-labeling.
|
|
19
|
+
- 🌐 **RTL & Logical Properties**: Full bidirectional support using CSS logical properties (`marginBlock`, `paddingInline`, `insetInlineEnd`, etc.).
|
|
20
|
+
- 🚀 **Server Component (RSC) Ready**: Fully compatible with modern React frameworks like Next.js, Remix, Waku, and Vite.
|
|
21
|
+
- 📊 **Rich Analytics & Charts**: Production-grade data visualizations (AreaChart, BarChart, LineChart, DoughnutChart, TopList, Stat, Percentage) built on Recharts.
|
|
22
|
+
|
|
23
|
+
---
|
|
24
|
+
|
|
25
|
+
## 📦 Installation
|
|
26
|
+
|
|
27
|
+
Install `@moul-dev/ui` and its peer dependencies in your React project:
|
|
28
|
+
|
|
29
|
+
```bash
|
|
30
|
+
# Bun
|
|
31
|
+
bun add @moul-dev/ui @stylexjs/stylex
|
|
32
|
+
|
|
33
|
+
# npm
|
|
34
|
+
npm install @moul-dev/ui @stylexjs/stylex
|
|
35
|
+
|
|
36
|
+
# pnpm
|
|
37
|
+
pnpm add @moul-dev/ui @stylexjs/stylex
|
|
38
|
+
|
|
39
|
+
# yarn
|
|
40
|
+
yarn add @moul-dev/ui @stylexjs/stylex
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
---
|
|
44
|
+
|
|
45
|
+
## 🚀 Quick Start
|
|
46
|
+
|
|
47
|
+
### 1. Import the Stylesheet
|
|
48
|
+
|
|
49
|
+
Import the compiled StyleX CSS at the root of your application (e.g. `main.tsx`, `index.tsx`, or `globals.css`):
|
|
50
|
+
|
|
51
|
+
```tsx
|
|
52
|
+
import '@moul-dev/ui/style.css';
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
### 2. (Optional) Wrap with `ThemeProvider`
|
|
56
|
+
|
|
57
|
+
Wrap your application tree or sections with `ThemeProvider` to control color schemes and custom brand variables:
|
|
58
|
+
|
|
59
|
+
```tsx
|
|
60
|
+
import { ThemeProvider } from '@moul-dev/ui';
|
|
61
|
+
|
|
62
|
+
export function App({ children }: { children: React.ReactNode }) {
|
|
63
|
+
return (
|
|
64
|
+
<ThemeProvider colorScheme="light dark">
|
|
65
|
+
{children}
|
|
66
|
+
</ThemeProvider>
|
|
67
|
+
);
|
|
68
|
+
}
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
### 3. Use Components
|
|
72
|
+
|
|
73
|
+
```tsx
|
|
74
|
+
import { Button, Alert, Stat, LineChart, ChartContainer } from '@moul-dev/ui';
|
|
75
|
+
|
|
76
|
+
export function Dashboard() {
|
|
77
|
+
const chartData = [
|
|
78
|
+
{ time: '09:00', ActiveUsers: 120 },
|
|
79
|
+
{ time: '12:00', ActiveUsers: 450 },
|
|
80
|
+
{ time: '15:00', ActiveUsers: 890 },
|
|
81
|
+
];
|
|
82
|
+
|
|
83
|
+
return (
|
|
84
|
+
<div style={{ display: 'flex', flexDirection: 'column', gap: '1rem', padding: '2rem' }}>
|
|
85
|
+
<Alert variant="info" title="System Notice">
|
|
86
|
+
Moul UI is running with zero runtime overhead.
|
|
87
|
+
</Alert>
|
|
88
|
+
|
|
89
|
+
<div style={{ display: 'grid', gridTemplateColumns: 'repeat(auto-fit, minmax(200px, 1fr))', gap: '1rem' }}>
|
|
90
|
+
<Stat
|
|
91
|
+
label="Total Revenue"
|
|
92
|
+
value="$45,231.89"
|
|
93
|
+
trend={{ direction: 'up', value: '+20.1% from last month' }}
|
|
94
|
+
/>
|
|
95
|
+
</div>
|
|
96
|
+
|
|
97
|
+
<ChartContainer title="User Activity">
|
|
98
|
+
<LineChart
|
|
99
|
+
data={chartData}
|
|
100
|
+
indexKey="time"
|
|
101
|
+
categories={['ActiveUsers']}
|
|
102
|
+
height={260}
|
|
103
|
+
/>
|
|
104
|
+
</ChartContainer>
|
|
105
|
+
|
|
106
|
+
<Button variant="primary" onPress={() => alert('Clicked!')}>
|
|
107
|
+
Get Started
|
|
108
|
+
</Button>
|
|
109
|
+
</div>
|
|
110
|
+
);
|
|
111
|
+
}
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
---
|
|
115
|
+
|
|
116
|
+
## 📚 Documentation
|
|
117
|
+
|
|
118
|
+
For complete documentation, interactive previews, and component API references, visit:
|
|
119
|
+
|
|
120
|
+
📖 **[https://moul.dev/ui](https://moul.dev/ui)**
|
|
121
|
+
|
|
122
|
+
---
|
|
123
|
+
|
|
124
|
+
## 🛠️ Monorepo & Development
|
|
125
|
+
|
|
126
|
+
This repository is managed with **Bun**:
|
|
127
|
+
|
|
128
|
+
```bash
|
|
129
|
+
# Install dependencies
|
|
130
|
+
bun install
|
|
131
|
+
|
|
132
|
+
# Run UI sandbox
|
|
133
|
+
bun run dev:ui
|
|
134
|
+
|
|
135
|
+
# Run documentation website
|
|
136
|
+
bun run dev:docs
|
|
137
|
+
|
|
138
|
+
# Run test suite
|
|
139
|
+
bun --cwd ui test
|
|
140
|
+
|
|
141
|
+
# Build library
|
|
142
|
+
bun run build:ui
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
---
|
|
146
|
+
|
|
147
|
+
## 📄 License
|
|
148
|
+
|
|
149
|
+
MIT © [Moul](https://moul.dev)
|