@banzamel/mineralui 0.2.0 → 0.4.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 ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Rafał Polak
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,192 @@
1
+ # MineralUI
2
+
3
+ React component framework for dashboards, admin panels, documentation shells, settings screens and data-heavy internal products.
4
+
5
+ - npm: `@banzamel/mineralui`
6
+ - release version: `0.4.0`
7
+ - peer dependencies: `react >= 18`, `react-dom >= 18`
8
+ - repository: `https://github.com/Banzamel/mineralui`
9
+ - styles: plain `.css` files + CSS variables exposed as `--mineral-*`
10
+
11
+ ## Installation
12
+
13
+ ```bash
14
+ npm install @banzamel/mineralui
15
+ ```
16
+
17
+ ```tsx
18
+ import '@banzamel/mineralui/styles.css'
19
+ ```
20
+
21
+ ## Quick Start
22
+
23
+ ```tsx
24
+ import {
25
+ MThemeProvider,
26
+ MButton,
27
+ MCard,
28
+ MCardBody,
29
+ MCardHeader,
30
+ MInput,
31
+ MSelect,
32
+ MStack,
33
+ } from '@banzamel/mineralui'
34
+ import '@banzamel/mineralui/styles.css'
35
+
36
+ function AccountSettings() {
37
+ return (
38
+ <MThemeProvider mode="dark">
39
+ <MCard>
40
+ <MCardHeader title="Workspace settings" description="Basic account data and role assignment." />
41
+ <MCardBody>
42
+ <MStack gap="md">
43
+ <MInput label="Workspace name" placeholder="Banzamel Studio" fullWidth />
44
+ <MSelect
45
+ label="Default role"
46
+ fullWidth
47
+ options={[
48
+ {value: 'owner', label: 'Owner'},
49
+ {value: 'editor', label: 'Editor'},
50
+ ]}
51
+ />
52
+ <MButton>Save changes</MButton>
53
+ </MStack>
54
+ </MCardBody>
55
+ </MCard>
56
+ </MThemeProvider>
57
+ )
58
+ }
59
+ ```
60
+
61
+ ## What Is Included
62
+
63
+ ### Theme and primitives
64
+ - `MThemeProvider`, `useMTheme`
65
+ - `MPortal`, `MPopover`
66
+ - CSS variable token system for dark and light mode
67
+ - scoped theme overrides through the provider
68
+
69
+ ### Layout
70
+ - `MContainer`, `MSection`
71
+ - `MStack`, `MInline`, `MGrid`, `MGridItem`
72
+ - `MSurface`, `MDivider`
73
+ - `MHeader`, `MFooter`, `MNavbar`, `MNavs`, `MTabs`
74
+
75
+ ### Display
76
+ - `MCard`, `MCardHeader`, `MCardBody`, `MCardFooter`
77
+ - `MBadge`, `MAlert`
78
+ - `MTable`, `MTableRoot`, `MTableHead`, `MTableBody`, `MTableRow`, `MTableHeadCell`, `MTableCell`
79
+ - `MCollapsible`, `MSpinner`, `MLoader`
80
+ - `MAvatar`, `MModal`
81
+ - `MCalendarBoard`, `MCalendarDayCell`, `MCalendarEventList`, `MCalendarEventItem`, `MCalendarEventPopover`, `MCalendarTimeline`
82
+
83
+ ### Typography
84
+ - `MHeading`, `MText`, `MLink`, `MCode`, `MList`, `MListItem`
85
+
86
+ ### Controls
87
+ - `MButton`
88
+ - `MCheckbox`
89
+ - `MRadio`, `MRadioGroup`
90
+ - `MToggle`
91
+
92
+ ### Inputs
93
+ - `MInput`, `MTextarea`
94
+ - `MInputPassword`, `MInputNumber`, `MInputSearch`, `MInputEmail`
95
+ - `MInputPhone`, `MInputName`, `MInputIBAN`, `MInputTaxId`, `MInputCurrency`
96
+ - `MInputCreditCard`, `MInputPostCode`
97
+ - `MInputGroup`
98
+
99
+ ### Dropdowns
100
+ - `MSelect`
101
+ - `MAutocomplete`
102
+ - `MDatePicker`
103
+ - `MDateRangePicker`
104
+ - `MTimePicker`
105
+
106
+ ### Form and validation
107
+ - `MForm`, `useFormField`, `useFormContext`
108
+ - validators: `validateEmail`, `validatePhone`, `validateIBAN`, `validateNIP`, `validatePESEL`, `validateREGON`
109
+ - formatters: `formatIBAN`, `formatPhone`, `formatNIP`, `formatCurrency`, `parseCurrencyToNumber`
110
+ - date helpers: `formatDate`, `parseDate`, `formatTime`, `parseTime`
111
+
112
+ ### Hooks and utilities
113
+ - `mergeClasses`
114
+ - `useDebounce`, `useDebouncedCallback`
115
+ - `useOutsideClick`
116
+ - `useKeyNavigation`
117
+ - `useClickEffect`
118
+
119
+ ## Design System Notes
120
+
121
+ MineralUI is driven by CSS variables and readable class names.
122
+
123
+ ```css
124
+ :root {
125
+ --mineral-primary-rgb: 0, 165, 222;
126
+ --mineral-primary: rgba(0, 165, 222, 1);
127
+ --mineral-surface: rgba(255, 255, 255, 1);
128
+ --mineral-text: rgba(17, 24, 39, 1);
129
+ --mineral-border: rgba(203, 213, 225, 1);
130
+ }
131
+ ```
132
+
133
+ You can theme the package in four layers:
134
+ - token overrides through `--mineral-*`
135
+ - component props such as `color`, `fcolor`, `spacing`, `padding`, `fsize`
136
+ - `className` for local integration
137
+ - `MThemeProvider` for `mode` and scoped token overrides
138
+
139
+ Framework defaults:
140
+ - plain CSS, not CSS Modules
141
+ - readable local class names
142
+ - no runtime dependencies besides React peer dependencies
143
+ - dark and light mode supported through the same token system
144
+ - default scrollbar styling and typography reset come from the framework styles
145
+
146
+ ## Feature Highlights
147
+
148
+ ### Layout-first API
149
+ - `MStack`, `MInline` and `MGrid` cover the majority of internal dashboard layouts without extra utility libraries.
150
+ - `MGrid` supports equal columns by default and responsive span overrides with `sm`, `md`, `lg`, `xl`.
151
+
152
+ ### Form-heavy components
153
+ - Specialized inputs handle formatting and validation instead of pushing that logic into every application.
154
+ - `MInputCreditCard` detects brand and keeps formatting readable.
155
+ - `MInputPostCode` validates against country-specific postal code rules.
156
+
157
+ ### Date workflows
158
+ - `MDatePicker` and `MDateRangePicker` support inline and popover usage.
159
+ - `MDateRangePicker` ships with built-in presets such as `Today`, `Last 7 days`, `Last 30 days`, `This month`, and `Previous month`.
160
+ - `MCalendarBoard` covers non-form calendar surfaces such as planning, invoices, birthdays, and task density views.
161
+
162
+ ### Interaction model
163
+ - Buttons, cards, avatars, tabs and interactive inputs can share the same click effect model.
164
+ - Navigation and picker overlays render through shared popover primitives.
165
+
166
+ ## Build and Checks
167
+
168
+ ```bash
169
+ npm run format
170
+ npm run format:check
171
+ npm run build
172
+ ```
173
+
174
+ Known note:
175
+ - `vite-plugin-dts` / API Extractor currently warns about its bundled TypeScript version versus the installed project version, but the build completes successfully.
176
+
177
+ ## Local Verification Surface
178
+
179
+ The working documentation and preview site lives in the sibling project:
180
+
181
+ - `../mineralui-website`
182
+
183
+ That site is wired to the local package build through `file:../mineralui` and is the primary visual verification surface before release.
184
+
185
+ ## Repository
186
+
187
+ - GitHub: `https://github.com/Banzamel/mineralui`
188
+ - npm: `https://www.npmjs.com/package/@banzamel/mineralui`
189
+
190
+ ## License
191
+
192
+ MIT - Rafal Polak