@banzamel/mineralui 0.5.0 → 0.7.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/README.md +95 -54
- package/dist/index.cjs +2 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +488 -59
- package/dist/index.js +2793 -1146
- package/dist/index.js.map +1 -1
- package/dist/styles.css +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -3,10 +3,10 @@
|
|
|
3
3
|
React component framework for dashboards, admin panels, documentation shells, settings screens and data-heavy internal products.
|
|
4
4
|
|
|
5
5
|
- npm: `@banzamel/mineralui`
|
|
6
|
-
- release version: `0.
|
|
7
|
-
- peer dependencies: `react >=
|
|
6
|
+
- release version: `0.7.0`
|
|
7
|
+
- peer dependencies: `react >= 19`, `react-dom >= 19`
|
|
8
8
|
- repository: `https://github.com/Banzamel/mineralui`
|
|
9
|
-
- styles:
|
|
9
|
+
- styles: auto-injected — CSS is bundled into JS and applied automatically on import
|
|
10
10
|
|
|
11
11
|
## Installation
|
|
12
12
|
|
|
@@ -14,9 +14,7 @@ React component framework for dashboards, admin panels, documentation shells, se
|
|
|
14
14
|
npm install @banzamel/mineralui
|
|
15
15
|
```
|
|
16
16
|
|
|
17
|
-
|
|
18
|
-
import '@banzamel/mineralui/styles.css'
|
|
19
|
-
```
|
|
17
|
+
No separate CSS import needed. Styles are auto-injected when you import any component.
|
|
20
18
|
|
|
21
19
|
## Quick Start
|
|
22
20
|
|
|
@@ -31,7 +29,6 @@ import {
|
|
|
31
29
|
MSelect,
|
|
32
30
|
MStack,
|
|
33
31
|
} from '@banzamel/mineralui'
|
|
34
|
-
import '@banzamel/mineralui/styles.css'
|
|
35
32
|
|
|
36
33
|
function AccountSettings() {
|
|
37
34
|
return (
|
|
@@ -74,36 +71,52 @@ function AccountSettings() {
|
|
|
74
71
|
- `MHeader`, `MFooter`, `MNavbar`, `MNavs`, `MTabs`
|
|
75
72
|
- `MSidebar`, `MSidebarItem`, `MSidebarGroup`, `MSidebarDivider`
|
|
76
73
|
- `MSubNav`
|
|
74
|
+
- `MBreadcrumb` — path-based navigation with collapsible middle items
|
|
75
|
+
- `MPagination` — numbered and simple page navigation
|
|
76
|
+
- `MAppShell`, `MBody` — top-level app structure (sidebar + content)
|
|
77
77
|
|
|
78
78
|
### Display
|
|
79
|
-
- `MCard`, `MCardHeader`, `MCardBody`, `MCardFooter`
|
|
79
|
+
- `MCard`, `MCardHeader`, `MCardBody`, `MCardFooter`, `MCardPayment`
|
|
80
80
|
- `MBadge`, `MAlert`, `MBanner`
|
|
81
|
-
- `
|
|
81
|
+
- `MTag` — interactive tags with close buttons and outlined variant
|
|
82
|
+
- `MTooltip` — hover/focus tooltip with 4 placements and delay
|
|
83
|
+
- `MToastProvider`, `useToast` — toast notification system with auto-dismiss and animations
|
|
84
|
+
- `MDataTable` — data-driven table with sorting, filtering, pagination and row selection
|
|
85
|
+
- `MAccordion`, `MAccordionItem` — disclosure group with single or multiple open state
|
|
82
86
|
- `MCollapsible`, `MSpinner`, `MLoader`
|
|
83
87
|
- `MAvatar`, `MModal`
|
|
88
|
+
- `MDrawer` — slide-out panel from any edge of the screen
|
|
89
|
+
- `MPopconfirm` — confirmation popover built on MPopover
|
|
84
90
|
- `MImage`, `MGallery`
|
|
85
91
|
- `MCarousel`
|
|
86
92
|
- `MProgressBar`
|
|
87
93
|
- `MRating`
|
|
88
94
|
- `MCountUp`
|
|
95
|
+
- `MColorPicker` — visual color picker with hue/saturation area, hex/rgb/hsl input and swatches
|
|
96
|
+
- `MTreeView` — hierarchical tree list with expand/collapse and selection
|
|
89
97
|
- `MTaskList`, `MTaskItem`
|
|
90
98
|
- `MDropdownMenu`, `MDropdownMenuItem`, `MDropdownMenuDivider`
|
|
91
99
|
- `MCalendarBoard`, `MCalendarDayCell`, `MCalendarEventList`, `MCalendarEventItem`, `MCalendarEventPopover`, `MCalendarTimeline`
|
|
92
100
|
|
|
93
101
|
### Typography
|
|
94
102
|
- `MHeading`, `MText`, `MSubText`, `MLink`, `MCode`, `MList`, `MListItem`
|
|
103
|
+
- `MKbd` — inline keyboard key indicator for shortcuts and key combinations
|
|
95
104
|
|
|
96
105
|
### Controls
|
|
97
106
|
- `MButton`
|
|
98
107
|
- `MCheckbox`
|
|
99
108
|
- `MRadio`, `MRadioGroup`
|
|
100
109
|
- `MToggle`
|
|
110
|
+
- `MSlider` — drag-based range input with marks and labels
|
|
101
111
|
|
|
102
112
|
### Inputs
|
|
103
113
|
- `MInput`, `MTextarea`
|
|
104
114
|
- `MInputPassword`, `MInputNumber`, `MInputSearch`, `MInputEmail`
|
|
105
115
|
- `MInputPhone`, `MInputName`, `MInputIBAN`, `MInputTaxId`, `MInputCurrency`
|
|
106
116
|
- `MInputCreditCard`, `MInputPostCode`
|
|
117
|
+
- `MInputOTP` — one-time password input with auto-focus and paste support
|
|
118
|
+
- `MInputSlider` — combined slider track with numeric input field
|
|
119
|
+
- `MInputFile` — file upload dropzone with drag-and-drop, thumbnails and image cropping
|
|
107
120
|
- `MInputGroup`
|
|
108
121
|
|
|
109
122
|
### Dropdowns
|
|
@@ -120,39 +133,14 @@ function AccountSettings() {
|
|
|
120
133
|
- date helpers: `formatDate`, `parseDate`, `formatTime`, `parseTime`
|
|
121
134
|
|
|
122
135
|
### Hooks and utilities
|
|
136
|
+
- `useReveal` — viewport reveal animation with IntersectionObserver
|
|
137
|
+
- `useGhostText` — inline ghost text suggestions for any text input
|
|
123
138
|
- `mergeClasses`
|
|
124
139
|
- `useDebounce`, `useDebouncedCallback`
|
|
125
140
|
- `useOutsideClick`
|
|
126
141
|
- `useKeyNavigation`
|
|
127
142
|
- `useClickEffect`
|
|
128
143
|
|
|
129
|
-
## Design System Notes
|
|
130
|
-
|
|
131
|
-
MineralUI is driven by CSS variables and readable class names.
|
|
132
|
-
|
|
133
|
-
```css
|
|
134
|
-
:root {
|
|
135
|
-
--mineral-primary-rgb: 0, 165, 222;
|
|
136
|
-
--mineral-primary: rgba(0, 165, 222, 1);
|
|
137
|
-
--mineral-surface: rgba(255, 255, 255, 1);
|
|
138
|
-
--mineral-text: rgba(17, 24, 39, 1);
|
|
139
|
-
--mineral-border: rgba(203, 213, 225, 1);
|
|
140
|
-
}
|
|
141
|
-
```
|
|
142
|
-
|
|
143
|
-
You can theme the package in four layers:
|
|
144
|
-
- token overrides through `--mineral-*`
|
|
145
|
-
- component props such as `color`, `fcolor`, `spacing`, `padding`, `fsize`
|
|
146
|
-
- `className` for local integration
|
|
147
|
-
- `MThemeProvider` for `mode` and scoped token overrides
|
|
148
|
-
|
|
149
|
-
Framework defaults:
|
|
150
|
-
- plain CSS, not CSS Modules
|
|
151
|
-
- readable local class names
|
|
152
|
-
- no runtime dependencies besides React peer dependencies
|
|
153
|
-
- dark and light mode supported through the same token system
|
|
154
|
-
- default scrollbar styling and typography reset come from the framework styles
|
|
155
|
-
|
|
156
144
|
## Feature Highlights
|
|
157
145
|
|
|
158
146
|
### Layout-first API
|
|
@@ -160,16 +148,40 @@ Framework defaults:
|
|
|
160
148
|
- `MGrid` supports equal columns by default and responsive span overrides with `sm`, `md`, `lg`, `xl`.
|
|
161
149
|
- `MSidebar` provides collapsible, nested navigation with grouped items and dividers.
|
|
162
150
|
|
|
151
|
+
### Reveal animations
|
|
152
|
+
- `reveal` prop on `MCard`, `MStack`, `MInline`, `MSurface`, `MSection` — elements animate into view when they enter the viewport.
|
|
153
|
+
- Supports custom delay with `reveal={0.2}` for staggered effects.
|
|
154
|
+
- Respects `prefers-reduced-motion` automatically.
|
|
155
|
+
|
|
156
|
+
### Ghost text suggestions
|
|
157
|
+
- `ghostOptions` prop on `MInput` and `MTextarea` — shows inline ghost text as the user types.
|
|
158
|
+
- Tab or Enter accepts the suggestion, arrow keys cycle through matches.
|
|
159
|
+
- `useGhostText` hook is exported for use in custom components like chat inputs or search bars.
|
|
160
|
+
|
|
161
|
+
### Toast notifications
|
|
162
|
+
- `MToastProvider` wraps your app, `useToast()` fires notifications from anywhere.
|
|
163
|
+
- 6 positions, 7 color variants, auto-dismiss with configurable duration.
|
|
164
|
+
- Enter/exit animations and manual close button.
|
|
165
|
+
|
|
163
166
|
### Form-heavy components
|
|
164
167
|
- Specialized inputs handle formatting and validation instead of pushing that logic into every application.
|
|
165
168
|
- `MInputCreditCard` detects brand and keeps formatting readable.
|
|
166
169
|
- `MInputPostCode` validates against country-specific postal code rules.
|
|
170
|
+
- `MInputFile` supports drag-and-drop, file type filtering, size limits, image thumbnails and built-in crop editor.
|
|
171
|
+
- `MInputOTP` splits a code into individual digit fields with auto-focus and paste support.
|
|
172
|
+
- `MInputSlider` combines a slider track with a numeric input, keeping both in sync.
|
|
167
173
|
|
|
168
174
|
### Date workflows
|
|
169
175
|
- `MDatePicker` and `MDateRangePicker` support inline and popover usage.
|
|
170
176
|
- `MDateRangePicker` ships with 12 built-in presets and a toggleable `presetsSidebar` for quick range selection.
|
|
171
177
|
- `MCalendarBoard` covers non-form calendar surfaces such as planning, invoices, birthdays, and task density views.
|
|
172
178
|
|
|
179
|
+
### Data and navigation
|
|
180
|
+
- `MDataTable` — sortable, filterable, paginated table with row selection and custom cell rendering.
|
|
181
|
+
- `MBreadcrumb` — path navigation with automatic ellipsis collapsing for deep hierarchies.
|
|
182
|
+
- `MPagination` — numbered and simple page controls with dot collapsing.
|
|
183
|
+
- `MTreeView` — hierarchical tree with expand/collapse and node selection.
|
|
184
|
+
|
|
173
185
|
### Rich display components
|
|
174
186
|
- `MCarousel` for image and content slideshows.
|
|
175
187
|
- `MImage` with aspect ratio, fallback and lazy loading. `MGallery` for responsive image grids.
|
|
@@ -179,35 +191,64 @@ Framework defaults:
|
|
|
179
191
|
- `MTaskList` for checklist-style task tracking.
|
|
180
192
|
- `MDropdownMenu` for context menus and action lists.
|
|
181
193
|
- `MBanner` for page-level messaging.
|
|
194
|
+
- `MTooltip` for contextual hints on hover or focus.
|
|
195
|
+
- `MDrawer` — slide-out panel from any screen edge for secondary content and navigation.
|
|
196
|
+
- `MPopconfirm` — confirmation popover for destructive actions.
|
|
197
|
+
- `MAccordion` — disclosure group with single or multiple open panels.
|
|
198
|
+
- `MColorPicker` — visual color selection with hue/saturation, hex/rgb/hsl input and swatches.
|
|
199
|
+
- `MTag` — interactive labels with close buttons for filters, chips and categorization.
|
|
200
|
+
- `MKbd` — inline keyboard shortcut display.
|
|
182
201
|
|
|
183
202
|
### Interaction model
|
|
184
203
|
- Buttons, cards, avatars, tabs and interactive inputs can share the same click effect model.
|
|
185
204
|
- Navigation and picker overlays render through shared popover primitives.
|
|
186
205
|
|
|
187
|
-
##
|
|
188
|
-
|
|
189
|
-
```bash
|
|
190
|
-
npm run format
|
|
191
|
-
npm run format:check
|
|
192
|
-
npm run build
|
|
193
|
-
```
|
|
194
|
-
|
|
195
|
-
Known note:
|
|
196
|
-
- `vite-plugin-dts` / API Extractor currently warns about its bundled TypeScript version versus the installed project version, but the build completes successfully.
|
|
206
|
+
## Design System Notes
|
|
197
207
|
|
|
198
|
-
|
|
208
|
+
MineralUI is driven by CSS variables and readable class names.
|
|
199
209
|
|
|
200
|
-
|
|
210
|
+
```css
|
|
211
|
+
:root {
|
|
212
|
+
/* Brand — override only *-rgb, the rest is auto-generated */
|
|
213
|
+
--mineral-primary-rgb: 0, 165, 222;
|
|
214
|
+
--mineral-primary: rgba(var(--mineral-primary-rgb), 1);
|
|
215
|
+
|
|
216
|
+
/* Status palette */
|
|
217
|
+
--mineral-success-rgb: 22, 163, 74;
|
|
218
|
+
--mineral-error-rgb: 220, 38, 38;
|
|
219
|
+
--mineral-warning-rgb: 234, 124, 0;
|
|
220
|
+
--mineral-info-rgb: 59, 130, 246;
|
|
221
|
+
|
|
222
|
+
/* Surface (dark mode default) */
|
|
223
|
+
--mineral-surface: rgba(21, 29, 46, 1);
|
|
224
|
+
--mineral-page-bg: rgba(15, 23, 42, 1);
|
|
225
|
+
--mineral-input-bg: rgba(37, 51, 71, 1);
|
|
226
|
+
|
|
227
|
+
/* Text */
|
|
228
|
+
--mineral-text: rgba(226, 232, 240, 1);
|
|
229
|
+
--mineral-text-secondary: rgba(100, 116, 139, 1);
|
|
230
|
+
|
|
231
|
+
/* Borders */
|
|
232
|
+
--mineral-border: rgba(255, 255, 255, 0.15);
|
|
233
|
+
--mineral-border-hover: rgba(255, 255, 255, 0.25);
|
|
234
|
+
--mineral-border-focus: var(--mineral-primary);
|
|
235
|
+
}
|
|
236
|
+
```
|
|
201
237
|
|
|
202
|
-
|
|
238
|
+
You can theme the package in four layers:
|
|
239
|
+
- token overrides through `--mineral-*`
|
|
240
|
+
- component props such as `color`, `fcolor`, `spacing`, `padding`, `fsize`
|
|
241
|
+
- `className` for local integration
|
|
242
|
+
- `MThemeProvider` for `mode` and scoped token overrides
|
|
203
243
|
|
|
204
|
-
|
|
244
|
+
Framework defaults:
|
|
245
|
+
- plain CSS, not CSS Modules
|
|
246
|
+
- readable local class names
|
|
247
|
+
- no runtime dependencies besides React peer dependencies
|
|
248
|
+
- dark and light mode supported through the same token system
|
|
249
|
+
- default scrollbar styling and typography reset come from the framework styles
|
|
205
250
|
|
|
206
251
|
## Repository
|
|
207
252
|
|
|
208
253
|
- GitHub: `https://github.com/Banzamel/mineralui`
|
|
209
254
|
- npm: `https://www.npmjs.com/package/@banzamel/mineralui`
|
|
210
|
-
|
|
211
|
-
## License
|
|
212
|
-
|
|
213
|
-
MIT - Rafal Polak
|