@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.
Files changed (171) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +149 -0
  3. package/dist/assets/stylex.css +2391 -0
  4. package/dist/favicon.svg +20 -0
  5. package/dist/icons.svg +24 -0
  6. package/dist/moul-ui.js +6662 -0
  7. package/dist/src/App.d.ts +2 -0
  8. package/dist/src/components/Alert/Alert.d.ts +14 -0
  9. package/dist/src/components/Alert/Alert.styles.d.ts +188 -0
  10. package/dist/src/components/Alert/index.d.ts +2 -0
  11. package/dist/src/components/AlertDialog/AlertDialog.d.ts +23 -0
  12. package/dist/src/components/AlertDialog/AlertDialog.styles.d.ts +35 -0
  13. package/dist/src/components/AlertDialog/index.d.ts +1 -0
  14. package/dist/src/components/AreaChart/AreaChart.d.ts +21 -0
  15. package/dist/src/components/AreaChart/AreaChart.styles.d.ts +7 -0
  16. package/dist/src/components/AreaChart/index.d.ts +2 -0
  17. package/dist/src/components/Avatar/Avatar.d.ts +10 -0
  18. package/dist/src/components/Avatar/Avatar.styles.d.ts +31 -0
  19. package/dist/src/components/Avatar/index.d.ts +2 -0
  20. package/dist/src/components/Badge/Badge.d.ts +9 -0
  21. package/dist/src/components/Badge/Badge.styles.d.ts +35 -0
  22. package/dist/src/components/Badge/index.d.ts +2 -0
  23. package/dist/src/components/BarChart/BarChart.d.ts +16 -0
  24. package/dist/src/components/BarChart/BarChart.styles.d.ts +7 -0
  25. package/dist/src/components/BarChart/index.d.ts +2 -0
  26. package/dist/src/components/Breadcrumbs/Breadcrumbs.d.ts +16 -0
  27. package/dist/src/components/Breadcrumbs/Breadcrumbs.styles.d.ts +34 -0
  28. package/dist/src/components/Breadcrumbs/index.d.ts +2 -0
  29. package/dist/src/components/Button/Button.d.ts +10 -0
  30. package/dist/src/components/Button/Button.styles.d.ts +148 -0
  31. package/dist/src/components/Button/index.d.ts +2 -0
  32. package/dist/src/components/ButtonGroup/ButtonGroup.d.ts +7 -0
  33. package/dist/src/components/ButtonGroup/ButtonGroup.styles.d.ts +9 -0
  34. package/dist/src/components/ButtonGroup/index.d.ts +2 -0
  35. package/dist/src/components/Card/Card.d.ts +19 -0
  36. package/dist/src/components/Card/Card.styles.d.ts +185 -0
  37. package/dist/src/components/Card/CardBody.d.ts +7 -0
  38. package/dist/src/components/Card/CardFooter.d.ts +7 -0
  39. package/dist/src/components/Card/CardHeader.d.ts +7 -0
  40. package/dist/src/components/Card/index.d.ts +8 -0
  41. package/dist/src/components/ChartCommon.d.ts +1 -0
  42. package/dist/src/components/ChartContainer/ChartContainer.d.ts +21 -0
  43. package/dist/src/components/ChartContainer/ChartContainer.styles.d.ts +124 -0
  44. package/dist/src/components/ChartContainer/index.d.ts +2 -0
  45. package/dist/src/components/ChartTooltip/ChartTooltip.d.ts +8 -0
  46. package/dist/src/components/ChartTooltip/ChartTooltip.styles.d.ts +61 -0
  47. package/dist/src/components/ChartTooltip/index.d.ts +2 -0
  48. package/dist/src/components/Checkbox/Checkbox.d.ts +9 -0
  49. package/dist/src/components/Checkbox/Checkbox.styles.d.ts +94 -0
  50. package/dist/src/components/Checkbox/context.d.ts +5 -0
  51. package/dist/src/components/Checkbox/index.d.ts +2 -0
  52. package/dist/src/components/CheckboxGroup/CheckboxGroup.d.ts +13 -0
  53. package/dist/src/components/CheckboxGroup/CheckboxGroup.styles.d.ts +18 -0
  54. package/dist/src/components/CheckboxGroup/index.d.ts +2 -0
  55. package/dist/src/components/ComboBox/ComboBox.d.ts +25 -0
  56. package/dist/src/components/ComboBox/ComboBox.styles.d.ts +223 -0
  57. package/dist/src/components/ComboBox/index.d.ts +2 -0
  58. package/dist/src/components/Description/Description.d.ts +8 -0
  59. package/dist/src/components/Description/Description.styles.d.ts +9 -0
  60. package/dist/src/components/Description/index.d.ts +2 -0
  61. package/dist/src/components/DoughnutChart/DoughnutChart.d.ts +15 -0
  62. package/dist/src/components/DoughnutChart/DoughnutChart.styles.d.ts +10 -0
  63. package/dist/src/components/DoughnutChart/index.d.ts +2 -0
  64. package/dist/src/components/ErrorMessage/ErrorMessage.d.ts +7 -0
  65. package/dist/src/components/ErrorMessage/ErrorMessage.styles.d.ts +9 -0
  66. package/dist/src/components/ErrorMessage/index.d.ts +2 -0
  67. package/dist/src/components/FieldError/FieldError.d.ts +9 -0
  68. package/dist/src/components/FieldError/FieldError.styles.d.ts +9 -0
  69. package/dist/src/components/FieldError/index.d.ts +2 -0
  70. package/dist/src/components/Form/Form.d.ts +8 -0
  71. package/dist/src/components/Form/Form.styles.d.ts +3 -0
  72. package/dist/src/components/Form/index.d.ts +2 -0
  73. package/dist/src/components/InputOTP/InputOTP.d.ts +25 -0
  74. package/dist/src/components/InputOTP/InputOTP.styles.d.ts +113 -0
  75. package/dist/src/components/InputOTP/index.d.ts +3 -0
  76. package/dist/src/components/Kbd/Kbd.d.ts +7 -0
  77. package/dist/src/components/Kbd/Kbd.styles.d.ts +20 -0
  78. package/dist/src/components/Kbd/index.d.ts +2 -0
  79. package/dist/src/components/Label/Label.d.ts +8 -0
  80. package/dist/src/components/Label/Label.styles.d.ts +10 -0
  81. package/dist/src/components/Label/index.d.ts +2 -0
  82. package/dist/src/components/LineChart/LineChart.d.ts +15 -0
  83. package/dist/src/components/LineChart/LineChart.styles.d.ts +7 -0
  84. package/dist/src/components/LineChart/index.d.ts +2 -0
  85. package/dist/src/components/Link/Link.d.ts +9 -0
  86. package/dist/src/components/Link/Link.styles.d.ts +92 -0
  87. package/dist/src/components/Link/index.d.ts +2 -0
  88. package/dist/src/components/Modal/Modal.d.ts +34 -0
  89. package/dist/src/components/Modal/Modal.styles.d.ts +91 -0
  90. package/dist/src/components/Modal/index.d.ts +1 -0
  91. package/dist/src/components/NumberField/NumberField.d.ts +14 -0
  92. package/dist/src/components/NumberField/NumberField.styles.d.ts +147 -0
  93. package/dist/src/components/NumberField/index.d.ts +2 -0
  94. package/dist/src/components/Percentage/Percentage.styles.d.ts +70 -0
  95. package/dist/src/components/Percentage/PercentageBar.d.ts +11 -0
  96. package/dist/src/components/Percentage/PercentageCircle.d.ts +12 -0
  97. package/dist/src/components/Percentage/index.d.ts +4 -0
  98. package/dist/src/components/Popover/Popover.d.ts +15 -0
  99. package/dist/src/components/Popover/Popover.styles.d.ts +22 -0
  100. package/dist/src/components/Popover/index.d.ts +1 -0
  101. package/dist/src/components/RadioGroup/RadioGroup.d.ts +16 -0
  102. package/dist/src/components/RadioGroup/RadioGroup.styles.d.ts +75 -0
  103. package/dist/src/components/RadioGroup/index.d.ts +2 -0
  104. package/dist/src/components/SearchField/SearchField.d.ts +14 -0
  105. package/dist/src/components/SearchField/SearchField.styles.d.ts +147 -0
  106. package/dist/src/components/SearchField/index.d.ts +2 -0
  107. package/dist/src/components/Select/Select.d.ts +30 -0
  108. package/dist/src/components/Select/Select.styles.d.ts +171 -0
  109. package/dist/src/components/Select/index.d.ts +2 -0
  110. package/dist/src/components/Separator/Separator.d.ts +8 -0
  111. package/dist/src/components/Separator/Separator.styles.d.ts +20 -0
  112. package/dist/src/components/Separator/index.d.ts +2 -0
  113. package/dist/src/components/Sidebar/Sidebar.d.ts +77 -0
  114. package/dist/src/components/Sidebar/Sidebar.styles.d.ts +326 -0
  115. package/dist/src/components/Sidebar/index.d.ts +2 -0
  116. package/dist/src/components/Skeleton/Skeleton.d.ts +7 -0
  117. package/dist/src/components/Skeleton/Skeleton.styles.d.ts +17 -0
  118. package/dist/src/components/Skeleton/index.d.ts +2 -0
  119. package/dist/src/components/Slider/Slider.d.ts +21 -0
  120. package/dist/src/components/Slider/Slider.styles.d.ts +78 -0
  121. package/dist/src/components/Slider/index.d.ts +2 -0
  122. package/dist/src/components/Spinner/Spinner.d.ts +9 -0
  123. package/dist/src/components/Spinner/Spinner.styles.d.ts +20 -0
  124. package/dist/src/components/Spinner/index.d.ts +2 -0
  125. package/dist/src/components/Stat/Stat.d.ts +15 -0
  126. package/dist/src/components/Stat/Stat.styles.d.ts +115 -0
  127. package/dist/src/components/Stat/index.d.ts +2 -0
  128. package/dist/src/components/Switch/Switch.d.ts +8 -0
  129. package/dist/src/components/Switch/Switch.styles.d.ts +66 -0
  130. package/dist/src/components/Switch/index.d.ts +2 -0
  131. package/dist/src/components/Table/Table.d.ts +33 -0
  132. package/dist/src/components/Table/Table.styles.d.ts +77 -0
  133. package/dist/src/components/Table/index.d.ts +2 -0
  134. package/dist/src/components/Tabs/Tabs.d.ts +29 -0
  135. package/dist/src/components/Tabs/Tabs.styles.d.ts +186 -0
  136. package/dist/src/components/Tabs/index.d.ts +2 -0
  137. package/dist/src/components/TagGroup/TagGroup.d.ts +27 -0
  138. package/dist/src/components/TagGroup/TagGroup.styles.d.ts +199 -0
  139. package/dist/src/components/TagGroup/index.d.ts +2 -0
  140. package/dist/src/components/TextArea/TextArea.d.ts +14 -0
  141. package/dist/src/components/TextArea/TextArea.styles.d.ts +63 -0
  142. package/dist/src/components/TextArea/index.d.ts +2 -0
  143. package/dist/src/components/TextField/TextField.d.ts +15 -0
  144. package/dist/src/components/TextField/TextField.styles.d.ts +80 -0
  145. package/dist/src/components/TextField/index.d.ts +2 -0
  146. package/dist/src/components/Toast/Toast.d.ts +28 -0
  147. package/dist/src/components/Toast/Toast.styles.d.ts +29 -0
  148. package/dist/src/components/Toast/index.d.ts +1 -0
  149. package/dist/src/components/ToggleButton/ToggleButton.d.ts +11 -0
  150. package/dist/src/components/ToggleButton/ToggleButton.styles.d.ts +223 -0
  151. package/dist/src/components/ToggleButton/index.d.ts +2 -0
  152. package/dist/src/components/ToggleButtonGroup/ToggleButtonGroup.d.ts +10 -0
  153. package/dist/src/components/ToggleButtonGroup/ToggleButtonGroup.styles.d.ts +36 -0
  154. package/dist/src/components/ToggleButtonGroup/context.d.ts +8 -0
  155. package/dist/src/components/ToggleButtonGroup/index.d.ts +2 -0
  156. package/dist/src/components/Tooltip/Tooltip.d.ts +19 -0
  157. package/dist/src/components/Tooltip/Tooltip.styles.d.ts +26 -0
  158. package/dist/src/components/Tooltip/index.d.ts +1 -0
  159. package/dist/src/components/TopList/TopList.d.ts +17 -0
  160. package/dist/src/components/TopList/TopList.styles.d.ts +43 -0
  161. package/dist/src/components/TopList/index.d.ts +2 -0
  162. package/dist/src/components/Typography/Typography.d.ts +26 -0
  163. package/dist/src/components/Typography/Typography.styles.d.ts +53 -0
  164. package/dist/src/components/Typography/index.d.ts +2 -0
  165. package/dist/src/index.d.ts +102 -0
  166. package/dist/src/main.d.ts +0 -0
  167. package/dist/src/theme/ThemeProvider.d.ts +17 -0
  168. package/dist/src/tokens/tokens.stylex.d.ts +121 -0
  169. package/dist/src/utils/mergeProps.d.ts +1 -0
  170. package/dist/src/utils/warnMissingLabel.d.ts +16 -0
  171. 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
+ [![npm version](https://img.shields.io/npm/v/@moul-dev/ui.svg)](https://www.npmjs.com/package/@moul-dev/ui)
6
+ [![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](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)