material-inspired-component-library 1.0.0 → 1.0.3
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 +8 -8
- package/components/accordion/README.md +2 -2
- package/components/bottomsheet/README.md +2 -2
- package/components/button/README.md +2 -2
- package/components/card/README.md +1 -1
- package/components/checkbox/README.md +2 -2
- package/components/dialog/README.md +1 -1
- package/components/divider/README.md +1 -1
- package/components/iconbutton/README.md +2 -2
- package/components/list/README.md +2 -2
- package/components/menu/README.md +3 -3
- package/components/radio/README.md +1 -1
- package/components/select/README.md +4 -4
- package/components/sidesheet/README.md +1 -1
- package/components/slider/README.md +2 -2
- package/components/switch/README.md +1 -1
- package/components/textfield/README.md +2 -2
- package/package.json +3 -6
- package/styles/README.md +5 -5
- package/styles.scss +15 -15
- package/themes/README.md +1 -1
- package/webpack.config.js +1 -1
- /package/components/bottomsheet/{bottomsheet.scss → index.scss} +0 -0
- /package/components/button/{button.scss → index.scss} +0 -0
- /package/components/card/{card.scss → index.scss} +0 -0
- /package/components/checkbox/{checkbox.scss → index.scss} +0 -0
- /package/components/dialog/{dialog.scss → index.scss} +0 -0
- /package/components/divider/{divider.scss → index.scss} +0 -0
- /package/components/iconbutton/{iconbutton.scss → index.scss} +0 -0
- /package/components/list/{list.scss → index.scss} +0 -0
- /package/components/menu/{menu.scss → index.scss} +0 -0
- /package/components/radio/{radio.scss → index.scss} +0 -0
- /package/components/select/{select.scss → index.scss} +0 -0
- /package/components/sidesheet/{sidesheet.scss → index.scss} +0 -0
- /package/components/slider/{slider.scss → index.scss} +0 -0
- /package/components/switch/{switch.scss → index.scss} +0 -0
- /package/components/textfield/{textfield.scss → index.scss} +0 -0
package/README.md
CHANGED
|
@@ -21,7 +21,7 @@ Explore the components in a live environment and see how they work.
|
|
|
21
21
|
|
|
22
22
|
### 1. Install via NPM
|
|
23
23
|
```shell
|
|
24
|
-
npm install
|
|
24
|
+
npm install material-inspired-component-library
|
|
25
25
|
```
|
|
26
26
|
|
|
27
27
|
### 2. Add the CSS
|
|
@@ -30,18 +30,18 @@ npm install micl
|
|
|
30
30
|
|
|
31
31
|
To import the styles for a single component:
|
|
32
32
|
```SCSS
|
|
33
|
-
@use "
|
|
33
|
+
@use "material-inspired-component-library/components/card";
|
|
34
34
|
```
|
|
35
35
|
To import all component styles:
|
|
36
36
|
```SCSS
|
|
37
|
-
@use "
|
|
37
|
+
@use "material-inspired-component-library/styles";
|
|
38
38
|
```
|
|
39
39
|
|
|
40
40
|
**Plain CSS**
|
|
41
41
|
|
|
42
42
|
Add the main CSS file to your project:
|
|
43
43
|
```HTML
|
|
44
|
-
<link rel="stylesheet" href="node_modules/
|
|
44
|
+
<link rel="stylesheet" href="node_modules/material-inspired-component-library/dist/micl.css">
|
|
45
45
|
```
|
|
46
46
|
|
|
47
47
|
### 3. Add the HTML & JavaScript
|
|
@@ -61,22 +61,22 @@ Some components, list the **List**, require a small amount of JavaScript to hand
|
|
|
61
61
|
|
|
62
62
|
```TypeScript
|
|
63
63
|
// For components with interactive behaviour
|
|
64
|
-
import list from "
|
|
64
|
+
import list from "material-inspired-component-library/components/lists";
|
|
65
65
|
|
|
66
66
|
// To import TypeScript for all components
|
|
67
|
-
import components from "
|
|
67
|
+
import components from "material-inspired-component-library/components";
|
|
68
68
|
```
|
|
69
69
|
|
|
70
70
|
To import all the TypeScript into your project:
|
|
71
71
|
```TypeScript
|
|
72
|
-
import components from "
|
|
72
|
+
import components from "material-inspired-component-library/components";
|
|
73
73
|
```
|
|
74
74
|
|
|
75
75
|
**Plain JavaScript**
|
|
76
76
|
|
|
77
77
|
Add the main JavaScript file to your project:
|
|
78
78
|
```HTML
|
|
79
|
-
<script src="node_modules/
|
|
79
|
+
<script src="node_modules/material-inspired-component-library/dist/micl.js"></script>
|
|
80
80
|
```
|
|
81
81
|
|
|
82
82
|
## Available components ✅
|
|
@@ -31,7 +31,7 @@ The Accordion component is an extension of the [**List** component](../list/READ
|
|
|
31
31
|
Import the list styles into your project:
|
|
32
32
|
|
|
33
33
|
```CSS
|
|
34
|
-
@use "
|
|
34
|
+
@use "material-inspired-component-library/components/list";
|
|
35
35
|
```
|
|
36
36
|
|
|
37
37
|
### TypeScript
|
|
@@ -40,7 +40,7 @@ This component requires a TypeScript module to support keyboard navigation. You
|
|
|
40
40
|
To manually initialize the component:
|
|
41
41
|
|
|
42
42
|
```TypeScript
|
|
43
|
-
import miclAccordion from '
|
|
43
|
+
import miclAccordion from 'material-inspired-component-library/components/list';
|
|
44
44
|
|
|
45
45
|
miclAccordion.initialize(document.querySelector('.micl-list'));
|
|
46
46
|
```
|
|
@@ -18,7 +18,7 @@ To create a standard bottom sheet, use the `<dialog>` element with the `popover`
|
|
|
18
18
|
Import the bottom sheet styles into your project:
|
|
19
19
|
|
|
20
20
|
```CSS
|
|
21
|
-
@use "
|
|
21
|
+
@use "material-inspired-component-library/components/bottomsheet";
|
|
22
22
|
```
|
|
23
23
|
|
|
24
24
|
### TypeScript
|
|
@@ -27,7 +27,7 @@ This component requires a TypeScript module to support **modal** and **resizable
|
|
|
27
27
|
To manually initialize the component:
|
|
28
28
|
|
|
29
29
|
```TypeScript
|
|
30
|
-
import miclBottomSheet from '
|
|
30
|
+
import miclBottomSheet from 'material-inspired-component-library/components/bottomsheet';
|
|
31
31
|
|
|
32
32
|
miclBottomSheet.initialize(document.querySelector('.micl-bottomsheet'));
|
|
33
33
|
```
|
|
@@ -14,7 +14,7 @@ To create a basic button, use the `<button>` element with a class that specifies
|
|
|
14
14
|
Import the button styles into your project:
|
|
15
15
|
|
|
16
16
|
```CSS
|
|
17
|
-
@use "
|
|
17
|
+
@use "material-inspired-component-library/components/button";
|
|
18
18
|
```
|
|
19
19
|
|
|
20
20
|
### TypeScript
|
|
@@ -23,7 +23,7 @@ This component requires a TypeScript module for interactive features like the **
|
|
|
23
23
|
To manually initialize the component:
|
|
24
24
|
|
|
25
25
|
```TypeScript
|
|
26
|
-
import miclButton from '
|
|
26
|
+
import miclButton from 'material-inspired-component-library/components/button';
|
|
27
27
|
|
|
28
28
|
miclButton.initialize(document.querySelector('.micl-button-text-s'));
|
|
29
29
|
```
|
|
@@ -16,7 +16,7 @@ To add a basic card, use a `<div>` element with one of the primary card style cl
|
|
|
16
16
|
Import the card styles into your project:
|
|
17
17
|
|
|
18
18
|
```CSS
|
|
19
|
-
@use "
|
|
19
|
+
@use "material-inspired-component-library/components/card";
|
|
20
20
|
```
|
|
21
21
|
|
|
22
22
|
### TypeScript
|
|
@@ -15,7 +15,7 @@ To add a basic checkbox, use the `<input type="checkbox">` element with the `mic
|
|
|
15
15
|
Import the checkbox styles into your project:
|
|
16
16
|
|
|
17
17
|
```CSS
|
|
18
|
-
@use "
|
|
18
|
+
@use "material-inspired-component-library/components/checkbox";
|
|
19
19
|
```
|
|
20
20
|
|
|
21
21
|
### TypeScript
|
|
@@ -24,7 +24,7 @@ This component requires a TypeScript module to support checking and unchecking u
|
|
|
24
24
|
To manually initialize the component:
|
|
25
25
|
|
|
26
26
|
```TypeScript
|
|
27
|
-
import miclCheckbox from '
|
|
27
|
+
import miclCheckbox from 'material-inspired-component-library/components/checkbox';
|
|
28
28
|
|
|
29
29
|
miclCheckbox.initialize(document.querySelector('.micl-checkbox'));
|
|
30
30
|
```
|
|
@@ -25,7 +25,7 @@ To create a basic dialog, use the `<dialog>` element with the `micl-dialog` clas
|
|
|
25
25
|
Import the dialog styles into your project:
|
|
26
26
|
|
|
27
27
|
```CSS
|
|
28
|
-
@use "
|
|
28
|
+
@use "material-inspired-component-library/components/dialog";
|
|
29
29
|
```
|
|
30
30
|
|
|
31
31
|
### TypeScript
|
|
@@ -14,7 +14,7 @@ To add a basic divider, use the `<hr>` element with the `micl-divider` class:
|
|
|
14
14
|
Import the divider styles into your project:
|
|
15
15
|
|
|
16
16
|
```CSS
|
|
17
|
-
@use "
|
|
17
|
+
@use "material-inspired-component-library/components/divider";
|
|
18
18
|
```
|
|
19
19
|
|
|
20
20
|
### TypeScript
|
|
@@ -16,7 +16,7 @@ To create a basic icon button, use the `<button>` element with a class that spec
|
|
|
16
16
|
Import the icon button styles into your project:
|
|
17
17
|
|
|
18
18
|
```CSS
|
|
19
|
-
@use "
|
|
19
|
+
@use "material-inspired-component-library/components/iconbutton";
|
|
20
20
|
```
|
|
21
21
|
|
|
22
22
|
### TypeScript
|
|
@@ -25,7 +25,7 @@ This component requires a TypeScript module for interactive features like the **
|
|
|
25
25
|
To manually initialize the component:
|
|
26
26
|
|
|
27
27
|
```TypeScript
|
|
28
|
-
import miclIconButton from '
|
|
28
|
+
import miclIconButton from 'material-inspired-component-library/components/button';
|
|
29
29
|
|
|
30
30
|
miclIconButton.initialize(document.querySelector('.micl-iconbutton-standard-s'));
|
|
31
31
|
```
|
|
@@ -24,7 +24,7 @@ To create a basic list, use the `<ul>` element with the `micl-list` class and in
|
|
|
24
24
|
Import the list styles into your project:
|
|
25
25
|
|
|
26
26
|
```CSS
|
|
27
|
-
@use "
|
|
27
|
+
@use "material-inspired-component-library/components/list";
|
|
28
28
|
```
|
|
29
29
|
|
|
30
30
|
### TypeScript
|
|
@@ -33,7 +33,7 @@ This component requires a TypeScript module to support keyboard navigation. You
|
|
|
33
33
|
To manually initialize the component:
|
|
34
34
|
|
|
35
35
|
```TypeScript
|
|
36
|
-
import miclList from '
|
|
36
|
+
import miclList from 'material-inspired-component-library/components/list';
|
|
37
37
|
|
|
38
38
|
miclList.initialize(document.querySelector('.micl-list'));
|
|
39
39
|
```
|
|
@@ -24,8 +24,8 @@ The Menu component is an extension of the [List component](../list/README.md). I
|
|
|
24
24
|
Import the styles for both the menu and list components into your project:
|
|
25
25
|
|
|
26
26
|
```CSS
|
|
27
|
-
@use "
|
|
28
|
-
@use "
|
|
27
|
+
@use "material-inspired-component-library/components/list";
|
|
28
|
+
@use "material-inspired-component-library/components/menu";
|
|
29
29
|
```
|
|
30
30
|
|
|
31
31
|
### TypeScript
|
|
@@ -34,7 +34,7 @@ This component requires the **Menu** TypeScript module for functionality. You ca
|
|
|
34
34
|
To manually initialize the component:
|
|
35
35
|
|
|
36
36
|
```TypeScript
|
|
37
|
-
import miclMenu from '
|
|
37
|
+
import miclMenu from 'material-inspired-component-library/components/menu';
|
|
38
38
|
|
|
39
39
|
miclMenu.initialize(document.querySelector('.micl-menu'));
|
|
40
40
|
```
|
|
@@ -15,7 +15,7 @@ To add a basic radio button, use the `<input type="radio">` element with the `mi
|
|
|
15
15
|
Import the radio button styles into your project:
|
|
16
16
|
|
|
17
17
|
```CSS
|
|
18
|
-
@use "
|
|
18
|
+
@use "material-inspired-component-library/components/radio";
|
|
19
19
|
```
|
|
20
20
|
|
|
21
21
|
### TypeScript
|
|
@@ -24,9 +24,9 @@ The Select component is an extension of the [Text field](../textfield/README.md)
|
|
|
24
24
|
The Select component relies on styles from the text field and list components. Be sure to import all three styles into your project.
|
|
25
25
|
|
|
26
26
|
```CSS
|
|
27
|
-
@use "
|
|
28
|
-
@use "
|
|
29
|
-
@use "
|
|
27
|
+
@use "material-inspired-component-library/components/list";
|
|
28
|
+
@use "material-inspired-component-library/components/textfield";
|
|
29
|
+
@use "material-inspired-component-library/components/select";
|
|
30
30
|
```
|
|
31
31
|
|
|
32
32
|
### TypeScript
|
|
@@ -35,7 +35,7 @@ This component requires the **Text field** TypeScript module for functionality.
|
|
|
35
35
|
To manually initialize the component:
|
|
36
36
|
|
|
37
37
|
```TypeScript
|
|
38
|
-
import miclTextField from '
|
|
38
|
+
import miclTextField from 'material-inspired-component-library/components/textfield';
|
|
39
39
|
|
|
40
40
|
miclTextField.initialize(document.querySelector('.micl-textfield-filled'));
|
|
41
41
|
```
|
|
@@ -27,7 +27,7 @@ To create a standard side sheet, use the `<dialog>` element with the `popover` a
|
|
|
27
27
|
Import the side sheet styles into your project:
|
|
28
28
|
|
|
29
29
|
```CSS
|
|
30
|
-
@use "
|
|
30
|
+
@use "material-inspired-component-library/components/sidesheet";
|
|
31
31
|
```
|
|
32
32
|
|
|
33
33
|
### TypeScript
|
|
@@ -14,7 +14,7 @@ To add a basic slider, use the `<input type="range">` element with one of the pr
|
|
|
14
14
|
Import the slider styles into your project:
|
|
15
15
|
|
|
16
16
|
```CSS
|
|
17
|
-
@use "
|
|
17
|
+
@use "material-inspired-component-library/components/slider";
|
|
18
18
|
```
|
|
19
19
|
|
|
20
20
|
### TypeScript
|
|
@@ -23,7 +23,7 @@ This component requires the **Slider** TypeScript module for functionality. You
|
|
|
23
23
|
To manually initialize the component:
|
|
24
24
|
|
|
25
25
|
```TypeScript
|
|
26
|
-
import miclSlider from '
|
|
26
|
+
import miclSlider from 'material-inspired-component-library/components/slider';
|
|
27
27
|
|
|
28
28
|
miclSlider.initialize(document.querySelector('.micl-slider-m'));
|
|
29
29
|
```
|
|
@@ -15,7 +15,7 @@ To add a basic switch, use the `<input type="checkbox">` element with the `micl-
|
|
|
15
15
|
Import the switch styles into your project:
|
|
16
16
|
|
|
17
17
|
```CSS
|
|
18
|
-
@use "
|
|
18
|
+
@use "material-inspired-component-library/components/switch";
|
|
19
19
|
```
|
|
20
20
|
|
|
21
21
|
### TypeScript
|
|
@@ -17,7 +17,7 @@ A basic text field can be either `filled` or `outlined`. To create one, use the
|
|
|
17
17
|
Import the text field styles into your project:
|
|
18
18
|
|
|
19
19
|
```CSS
|
|
20
|
-
@use "
|
|
20
|
+
@use "material-inspired-component-library/components/textfield";
|
|
21
21
|
```
|
|
22
22
|
|
|
23
23
|
### TypeScript
|
|
@@ -26,7 +26,7 @@ This component requires a TypeScript module for interactive features like the **
|
|
|
26
26
|
To manually initialize the component and attach an event listener for the `input` event:
|
|
27
27
|
|
|
28
28
|
```TypeScript
|
|
29
|
-
import miclTextField from '
|
|
29
|
+
import miclTextField from 'material-inspired-component-library/components/textfield';
|
|
30
30
|
|
|
31
31
|
miclTextField.initialize(document.querySelector('.micl-textfield-filled'));
|
|
32
32
|
|
package/package.json
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "material-inspired-component-library",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.3",
|
|
4
4
|
"description": "The Material-Inspired Component Library (MICL) offers a collection of beautifully crafted components leveraging native HTML markup, designed to align with the Material Design 3 guidelines.",
|
|
5
5
|
"author": "MICL Hermana <micl.hermana@proton.me> (https://github.com/henkpb/micl)",
|
|
6
|
-
"license": "
|
|
6
|
+
"license": "MIT",
|
|
7
7
|
"keywords": [
|
|
8
8
|
"Material Design",
|
|
9
9
|
"component library",
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
},
|
|
34
34
|
"homepage": "https://github.com/henkpb/micl",
|
|
35
35
|
"bugs": {
|
|
36
|
-
"url": "https://github.com/henkpb/
|
|
36
|
+
"url": "https://github.com/henkpb/material-inspired-component-library/issues"
|
|
37
37
|
},
|
|
38
38
|
"main": "index.js",
|
|
39
39
|
"scripts": {
|
|
@@ -55,8 +55,5 @@
|
|
|
55
55
|
"typescript": "^5.8.3",
|
|
56
56
|
"webpack": "^5.99",
|
|
57
57
|
"webpack-cli": "^6.0"
|
|
58
|
-
},
|
|
59
|
-
"dependencies": {
|
|
60
|
-
"material-inspired-component-library": "file:"
|
|
61
58
|
}
|
|
62
59
|
}
|
package/styles/README.md
CHANGED
|
@@ -8,7 +8,7 @@ Elevation represents the distance between surfaces on the z-axis, creating a sen
|
|
|
8
8
|
Import the elevation styles into your project:
|
|
9
9
|
|
|
10
10
|
```CSS
|
|
11
|
-
@use "
|
|
11
|
+
@use "material-inspired-component-library/styles/elevation";
|
|
12
12
|
```
|
|
13
13
|
|
|
14
14
|
### Customizations
|
|
@@ -31,7 +31,7 @@ Motion brings your UI to life, making it expressive and intuitive to use. The mo
|
|
|
31
31
|
Import the motion styles into your project:
|
|
32
32
|
|
|
33
33
|
```CSS
|
|
34
|
-
@use "
|
|
34
|
+
@use "material-inspired-component-library/styles/motion";
|
|
35
35
|
```
|
|
36
36
|
|
|
37
37
|
|
|
@@ -42,7 +42,7 @@ Shapes add decorative flair and help emphasize elements. These styles adhere to
|
|
|
42
42
|
Import the shape styles into your project:
|
|
43
43
|
|
|
44
44
|
```CSS
|
|
45
|
-
@use "
|
|
45
|
+
@use "material-inspired-component-library/styles/shapes";
|
|
46
46
|
```
|
|
47
47
|
|
|
48
48
|
### Customizations
|
|
@@ -65,7 +65,7 @@ State layers are visual overlays that communicate the interaction status of a co
|
|
|
65
65
|
Import the state layer styles into your project:
|
|
66
66
|
|
|
67
67
|
```CSS
|
|
68
|
-
@use "
|
|
68
|
+
@use "material-inspired-component-library/styles/statelayer";
|
|
69
69
|
```
|
|
70
70
|
|
|
71
71
|
### Customizations
|
|
@@ -86,7 +86,7 @@ Typography is the foundation of text styling. The typography styles in this libr
|
|
|
86
86
|
Import the typography styles into your project:
|
|
87
87
|
|
|
88
88
|
```CSS
|
|
89
|
-
@use "
|
|
89
|
+
@use "material-inspired-component-library/styles/typography";
|
|
90
90
|
```
|
|
91
91
|
|
|
92
92
|
### Customizations
|
package/styles.scss
CHANGED
|
@@ -26,18 +26,18 @@
|
|
|
26
26
|
@use 'styles/ripple';
|
|
27
27
|
@use 'styles/statelayer';
|
|
28
28
|
|
|
29
|
-
@use 'components/divider
|
|
30
|
-
@use 'components/radio
|
|
31
|
-
@use 'components/checkbox
|
|
32
|
-
@use 'components/switch
|
|
33
|
-
@use 'components/textfield
|
|
34
|
-
@use 'components/slider
|
|
35
|
-
@use 'components/button
|
|
36
|
-
@use 'components/iconbutton
|
|
37
|
-
@use 'components/list
|
|
38
|
-
@use 'components/menu
|
|
39
|
-
@use 'components/select
|
|
40
|
-
@use 'components/card
|
|
41
|
-
@use 'components/dialog
|
|
42
|
-
@use 'components/sidesheet
|
|
43
|
-
@use 'components/bottomsheet
|
|
29
|
+
@use 'components/divider';
|
|
30
|
+
@use 'components/radio';
|
|
31
|
+
@use 'components/checkbox';
|
|
32
|
+
@use 'components/switch';
|
|
33
|
+
@use 'components/textfield';
|
|
34
|
+
@use 'components/slider';
|
|
35
|
+
@use 'components/button';
|
|
36
|
+
@use 'components/iconbutton';
|
|
37
|
+
@use 'components/list';
|
|
38
|
+
@use 'components/menu';
|
|
39
|
+
@use 'components/select';
|
|
40
|
+
@use 'components/card';
|
|
41
|
+
@use 'components/dialog';
|
|
42
|
+
@use 'components/sidesheet';
|
|
43
|
+
@use 'components/bottomsheet';
|
package/themes/README.md
CHANGED
|
@@ -48,7 +48,7 @@ The MICL package includes several example color schemes that you can use as a st
|
|
|
48
48
|
To use the "Olive Green" light theme, for instance, simply import it into your main stylesheet:
|
|
49
49
|
|
|
50
50
|
```CSS
|
|
51
|
-
@use "
|
|
51
|
+
@use "material-inspired-component-library/themes/olivegreen/light.css";
|
|
52
52
|
```
|
|
53
53
|
|
|
54
54
|
You can then apply this theme to your <body> or another root element in your application.
|
package/webpack.config.js
CHANGED
|
@@ -6,7 +6,7 @@ const distDir = path.resolve(__dirname, 'dist');
|
|
|
6
6
|
|
|
7
7
|
const scssFiles = glob.sync('./components/**/*.scss');
|
|
8
8
|
const scssEntries = scssFiles.reduce((entries, filePath) => {
|
|
9
|
-
const componentName = path.
|
|
9
|
+
const componentName = path.dirname(filePath).split('\\').pop();
|
|
10
10
|
entries[componentName] = './' + filePath;
|
|
11
11
|
return entries;
|
|
12
12
|
}, {});
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|