@minimorphism/mds-ui 1.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 +675 -0
- package/Readme.md +114 -0
- package/dist/index.css +1965 -0
- package/dist/index.css.map +1 -0
- package/dist/index.d.ts +408 -0
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -0
- package/package.json +60 -0
package/Readme.md
ADDED
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
# MDS-UI
|
|
2
|
+
|
|
3
|
+
## Description
|
|
4
|
+
**MDS-UI** is a package of basic components for implementing ***minimorphism*** style interfaces. Created specifically for fintech products in the ***minimorphism ecosystem***, where premium tactility, physicality of objects, and a strict monochrome aesthetic are essential.
|
|
5
|
+
|
|
6
|
+
---
|
|
7
|
+
## Manifest
|
|
8
|
+
Before you start working with components, be sure to familiarize yourself with our *philosophy*:
|
|
9
|
+
|
|
10
|
+
**[minimorphism manifesto](./Manifest/Manifest.md)**
|
|
11
|
+
|
|
12
|
+
---
|
|
13
|
+
## Architecture
|
|
14
|
+
The main technical difference between **MDS** and classic **UI** libraries is the separation of physical form and its optical properties.
|
|
15
|
+
|
|
16
|
+
To achieve volume without sacrificing performance, a *two-layer* architecture is used:
|
|
17
|
+
|
|
18
|
+
```
|
|
19
|
+
┌────────────────────────────────────────────────────────┐
|
|
20
|
+
DOM Layer (React / Web Components)
|
|
21
|
+
↳ Buttons, inputs, cards (content and logic)
|
|
22
|
+
└───────────────────────────┬────────────────────────────┘
|
|
23
|
+
│ Registration of coordinates and geometry
|
|
24
|
+
▼
|
|
25
|
+
┌────────────────────────────────────────────────────────┐
|
|
26
|
+
WebGLCanvas Layer (Bottom canvas layer)
|
|
27
|
+
↳ Drawing Inner Shadows, Inner Glow, Drop Shadows
|
|
28
|
+
└────────────────────────────────────────────────────────┘
|
|
29
|
+
|
|
30
|
+
````
|
|
31
|
+
|
|
32
|
+
### How it works:
|
|
33
|
+
1. **Top Layer (DOM)**: Regular **HTML** elements. These are responsible for clicks, focuses, and text.
|
|
34
|
+
2. **Synchronization**: When widgets are mounted or resized, their coordinates are passed to the global bottom layer.
|
|
35
|
+
3. **Bottom Layer (WebGLCanvas)**: A single, high-performance Canvas that renders accurate, physically based shadows and glows for all **UI** elements simultaneously using shaders.
|
|
36
|
+
|
|
37
|
+
---
|
|
38
|
+
## Use MDS-UI
|
|
39
|
+
|
|
40
|
+
Before implementing *components* in your projects, you must complete several steps. Detailed documentation for each component is available in **StoryBook**.
|
|
41
|
+
|
|
42
|
+
### Install
|
|
43
|
+
|
|
44
|
+
1. Install npm package
|
|
45
|
+
```bash
|
|
46
|
+
npm install ...
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
### Init Singleton WebGL Canvas layer
|
|
50
|
+
|
|
51
|
+
```js
|
|
52
|
+
import React, { useEffect } from "react";
|
|
53
|
+
import { initWebGL, WebGLCanvas } from "@minimorphism/mds-ui";
|
|
54
|
+
import "@minimorphism/mds-ui/dist/index.css";
|
|
55
|
+
|
|
56
|
+
initWebGL();
|
|
57
|
+
|
|
58
|
+
export default function App() {
|
|
59
|
+
return (
|
|
60
|
+
<React.Fragment>
|
|
61
|
+
<WebGLCanvas />
|
|
62
|
+
</React.Fragment>
|
|
63
|
+
);
|
|
64
|
+
}
|
|
65
|
+
```
|
|
66
|
+
---
|
|
67
|
+
## Development
|
|
68
|
+
|
|
69
|
+
We use **Storybook** for isolated development and testing of components in various scenarios.
|
|
70
|
+
### Preparation
|
|
71
|
+
|
|
72
|
+
1. **Clone the repository and install dependencies:**
|
|
73
|
+
```bash
|
|
74
|
+
cd mds-ui
|
|
75
|
+
npm install
|
|
76
|
+
```
|
|
77
|
+
### Run and Build Storybook
|
|
78
|
+
|
|
79
|
+
1. **Run Storybook in local development mode:**
|
|
80
|
+
```bash
|
|
81
|
+
npm run story
|
|
82
|
+
```
|
|
83
|
+
*After this, the interface will open at `http://localhost:6006`.*
|
|
84
|
+
|
|
85
|
+
2. **Build a static version of Storybook for production:**
|
|
86
|
+
```bash
|
|
87
|
+
npm run build:story
|
|
88
|
+
```
|
|
89
|
+
*The static files will be compiled into the `storybook-static/` directory, ready for deployment.
|
|
90
|
+
### Assembly and packaging MDS-UI
|
|
91
|
+
|
|
92
|
+
1. **Build**
|
|
93
|
+
```bash
|
|
94
|
+
npm run build
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
2. Packaging
|
|
98
|
+
```bash
|
|
99
|
+
npm pack
|
|
100
|
+
```
|
|
101
|
+
### Tests
|
|
102
|
+
Command for run Unit-Tests
|
|
103
|
+
```bash
|
|
104
|
+
npm run test
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
---
|
|
108
|
+
## LICENSE
|
|
109
|
+
|
|
110
|
+
Distributed under the **GPLv3** license. The full license text is available in the [LICENSE](./LICENSE) file in the repository root.
|
|
111
|
+
|
|
112
|
+
***
|
|
113
|
+
|
|
114
|
+
*© 2026 minimorphism. All rights reserved.*
|