material-inspired-component-library 3.1.0 → 4.0.1
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 +12 -5
- package/components/README.md +1 -1
- package/components/accordion/README.md +29 -5
- package/components/alert/README.md +76 -0
- package/components/alert/index.scss +1 -0
- package/components/appbar/README.md +9 -4
- package/components/appbar/index.scss +1 -1
- package/components/badge/README.md +8 -3
- package/components/badge/index.scss +1 -0
- package/components/bottomsheet/README.md +8 -3
- package/components/button/README.md +8 -3
- package/components/button/index.scss +7 -0
- package/components/card/README.md +10 -4
- package/components/card/index.scss +1 -1
- package/components/checkbox/README.md +8 -3
- package/components/checkbox/index.scss +2 -0
- package/components/dialog/README.md +8 -3
- package/components/dialog/index.scss +1 -0
- package/components/divider/README.md +8 -3
- package/components/divider/index.scss +2 -2
- package/components/iconbutton/README.md +8 -3
- package/components/iconbutton/index.scss +3 -1
- package/components/list/README.md +26 -19
- package/components/list/index.scss +95 -68
- package/components/menu/README.md +9 -3
- package/components/menu/index.scss +6 -18
- package/components/navigationrail/README.md +8 -3
- package/components/navigationrail/index.scss +1 -0
- package/components/radio/README.md +8 -3
- package/components/radio/index.scss +2 -0
- package/components/select/README.md +10 -5
- package/components/select/index.scss +2 -3
- package/components/sidesheet/README.md +21 -22
- package/components/sidesheet/index.scss +15 -16
- package/components/slider/README.md +8 -3
- package/components/slider/index.scss +1 -0
- package/components/stepper/README.md +190 -0
- package/components/stepper/index.scss +93 -14
- package/components/stepper/index.ts +138 -120
- package/components/switch/README.md +8 -3
- package/components/switch/index.scss +2 -0
- package/components/textfield/README.md +8 -3
- package/components/textfield/index.ts +8 -40
- package/dist/alert.css +1 -1
- package/dist/badge.css +1 -1
- package/dist/button.css +1 -1
- package/dist/card.css +1 -1
- package/dist/checkbox.css +1 -1
- package/dist/components/textfield/index.d.ts +0 -1
- package/dist/dialog.css +1 -1
- package/dist/divider.css +1 -1
- package/dist/foundations/form/index.d.ts +5 -0
- package/dist/iconbutton.css +1 -1
- package/dist/list.css +1 -1
- package/dist/menu.css +1 -1
- package/dist/micl.css +1 -1
- package/dist/micl.js +1 -1
- package/dist/navigationrail.css +1 -1
- package/dist/radio.css +1 -1
- package/dist/select.css +1 -1
- package/dist/sidesheet.css +1 -1
- package/dist/slider.css +1 -1
- package/dist/stepper.css +1 -1
- package/dist/switch.css +1 -1
- package/docs/accordion.html +31 -17
- package/docs/alert.html +3 -8
- package/docs/bottomsheet.html +2 -2
- package/docs/button.html +2 -2
- package/docs/card.html +7 -7
- package/docs/checkbox.html +2 -2
- package/docs/dialog.html +2 -2
- package/docs/divider.html +8 -8
- package/docs/iconbutton.html +2 -2
- package/docs/index.html +53 -39
- package/docs/list.html +54 -46
- package/docs/menu.html +4 -3
- package/docs/micl.css +1 -1
- package/docs/micl.js +1 -1
- package/docs/radio.html +2 -2
- package/docs/select.html +2 -2
- package/docs/sidesheet.html +5 -4
- package/docs/slider.html +2 -2
- package/docs/stepper.html +318 -0
- package/docs/switch.html +8 -4
- package/docs/textfield.html +2 -2
- package/foundations/form/index.ts +174 -0
- package/{layout → foundations/layout}/README.md +5 -0
- package/{layout → foundations/layout}/index.scss +1 -1
- package/micl.ts +1 -3
- package/package.json +4 -4
- package/styles.scss +1 -1
- package/webpack.config.js +1 -1
package/README.md
CHANGED
|
@@ -32,10 +32,12 @@ To import the styles for a single component (e.g., the [Card component](componen
|
|
|
32
32
|
```SCSS
|
|
33
33
|
@use "material-inspired-component-library/dist/card";
|
|
34
34
|
```
|
|
35
|
-
|
|
35
|
+
|
|
36
|
+
To import all MICL styles:
|
|
36
37
|
```SCSS
|
|
37
38
|
@use "material-inspired-component-library/styles";
|
|
38
39
|
```
|
|
40
|
+
|
|
39
41
|
Remember to import your [theme file](themes/README.md) as well:
|
|
40
42
|
```SCSS
|
|
41
43
|
@use "path/to/mytheme";
|
|
@@ -79,12 +81,12 @@ This will initialize all MICL components, including those that will be added to
|
|
|
79
81
|
## Foundations 🪟
|
|
80
82
|
A separate CSS file, based on the [Material Design Layout Foundation](https://m3.material.io/foundations/layout/understanding-layout/overview), provides styles for an adaptive layout. It includes styles for the **window frame**, **body region** and **panes** that adjust to the available screen space, ensuring your layout follows Material Design's responsive guidelines.
|
|
81
83
|
|
|
82
|
-
- [x] [Layout](layout/README.md)
|
|
84
|
+
- [x] [Layout](foundations/layout/README.md)
|
|
83
85
|
|
|
84
86
|
## Available components ✅
|
|
85
87
|
The library currently consists of the following components:
|
|
86
88
|
- [x] [Accordion](components/accordion/README.md)
|
|
87
|
-
- [
|
|
89
|
+
- [x] [Alert](components/alert/README.md)
|
|
88
90
|
- [x] [App Bar](components/appbar/README.md)
|
|
89
91
|
- [x] [Badge](components/badge/README.md)
|
|
90
92
|
- [x] [Bottom sheet](components/bottomsheet/README.md)
|
|
@@ -101,14 +103,19 @@ The library currently consists of the following components:
|
|
|
101
103
|
- [x] [Select](components/select/README.md)
|
|
102
104
|
- [x] [Side sheet](components/sidesheet/README.md)
|
|
103
105
|
- [x] [Slider](components/slider/README.md)
|
|
104
|
-
- [
|
|
106
|
+
- [x] [Stepper](components/stepper/README.md)
|
|
105
107
|
- [x] [Switch](components/switch/README.md)
|
|
106
108
|
- [x] [Text field](components/textfield/README.md)
|
|
107
109
|
|
|
108
110
|
## Change Log ↪️
|
|
109
111
|
|
|
112
|
+
### 4.0.0 (27.10.2025)
|
|
113
|
+
- **BREAKING**: Moved layout.scss til sub-folder.
|
|
114
|
+
- **Alert**: New component.
|
|
115
|
+
- **Stepper**: New component.
|
|
116
|
+
|
|
110
117
|
### 3.1.0 (19.10.2025)
|
|
111
|
-
- **Checkbox**: Refactoring +
|
|
118
|
+
- **Checkbox**: Refactoring + added support for checkbox groups.
|
|
112
119
|
|
|
113
120
|
### 3.0.0 (24.09.2025)
|
|
114
121
|
- **BREAKING:** Use `<nav>` instead of `<div>` for Navigation rail.
|
package/components/README.md
CHANGED
|
@@ -11,4 +11,4 @@ Each component is self-contained in a separate folder, making it easy to find wh
|
|
|
11
11
|
|
|
12
12
|
Most components are standalone, but some are built on top of others. For example, the [Menu component](./menu/README.md) extends the [List component](./list/README.md), so it requires the styles and functionality of both. Always check the documentation for each component to see which dependencies you need to import. This ensures everything works as expected.
|
|
13
13
|
|
|
14
|
-
A [separate CSS file](../layout/README.md), based on the [Material Design Layout Foundation](https://m3.material.io/foundations/layout/understanding-layout/overview), provides styles for an adaptive layout. It includes styles for the **window frame**, **body region** and **panes** that adjust to the available screen space, ensuring your layout follows Material Design's responsive guidelines.
|
|
14
|
+
A [separate CSS file](../foundations/layout/README.md), based on the [Material Design Layout Foundation](https://m3.material.io/foundations/layout/understanding-layout/overview), provides styles for an adaptive layout. It includes styles for the **window frame**, **body region** and **panes** that adjust to the available screen space, ensuring your layout follows Material Design's responsive guidelines.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
# Accordion
|
|
2
|
-
This component implements the
|
|
2
|
+
This component implements the [Material Design 3 Expressive Expandable Lists](https://m3.material.io/components/lists/guidelines#b5697cef-6e9f-4699-ae10-c3f49649593e) design. Accordions are vertically stacked lists that allow you to show and hide sections of content.
|
|
3
3
|
|
|
4
4
|
## Basic Usage
|
|
5
5
|
|
|
@@ -34,6 +34,11 @@ Import the list styles into your project:
|
|
|
34
34
|
@use "material-inspired-component-library/dist/list";
|
|
35
35
|
```
|
|
36
36
|
|
|
37
|
+
Or import all MICL styles:
|
|
38
|
+
```CSS
|
|
39
|
+
@use "material-inspired-component-library/styles";
|
|
40
|
+
```
|
|
41
|
+
|
|
37
42
|
### JavaScript
|
|
38
43
|
This component requires JavaScript to support keyboard navigation:
|
|
39
44
|
|
|
@@ -41,10 +46,10 @@ This component requires JavaScript to support keyboard navigation:
|
|
|
41
46
|
import micl from "material-inspired-component-library/dist/micl";
|
|
42
47
|
```
|
|
43
48
|
|
|
44
|
-
This will initialize any
|
|
49
|
+
This will initialize any Accordion component, including those that will be added to the DOM later on.
|
|
45
50
|
|
|
46
|
-
### Demo
|
|
47
|
-
A live example of the [Accordion component](https://henkpb.github.io/micl/accordion.html) is available
|
|
51
|
+
### Live Demo
|
|
52
|
+
A live example of the [Accordion component](https://henkpb.github.io/micl/accordion.html) is available to interact with.
|
|
48
53
|
|
|
49
54
|
## Variants
|
|
50
55
|
To ensure that only one accordion item within a group can be open at a time, add a matching `name` attribute to all the `<details>` elements you want to group together.
|
|
@@ -65,6 +70,7 @@ To ensure that only one accordion item within a group can be open at a time, add
|
|
|
65
70
|
</div>
|
|
66
71
|
</div>
|
|
67
72
|
</details>
|
|
73
|
+
<hr class="micl-divider">
|
|
68
74
|
<details name="mygroup">
|
|
69
75
|
<summary class="micl-list-item-two" tabindex="-1">
|
|
70
76
|
<span class="micl-list-item__text">
|
|
@@ -82,9 +88,27 @@ To ensure that only one accordion item within a group can be open at a time, add
|
|
|
82
88
|
</div>
|
|
83
89
|
```
|
|
84
90
|
|
|
91
|
+
Add a trailing icon to an accordion item to indicate that the item can be expanded. If you add the `micl-list-item__icon--expander` class to the icon, the icon will rotate 180 degrees when the accordion panel is opened or closed.
|
|
92
|
+
|
|
93
|
+
```HTML
|
|
94
|
+
<div class="micl-list" role="listbox">
|
|
95
|
+
<details>
|
|
96
|
+
<summary class="micl-list-item-one">
|
|
97
|
+
<span class="micl-list-item__text">
|
|
98
|
+
<span class="micl-list-item__headline">Heading</span>
|
|
99
|
+
</span>
|
|
100
|
+
<span class="micl-list-item__icon micl-list-item__icon--expander material-symbols-outlined" aria-hidden="true">keyboard_arrow_down</span>
|
|
101
|
+
</summary>
|
|
102
|
+
<div class="micl-list-item__content">
|
|
103
|
+
...content...
|
|
104
|
+
</div>
|
|
105
|
+
</details>
|
|
106
|
+
</div>
|
|
107
|
+
```
|
|
108
|
+
|
|
85
109
|
Adding the `micl-list-item--disabled` class to the `<summary>` element causes the accordion item to be displayed in a disabled state.
|
|
86
110
|
|
|
87
|
-
|
|
111
|
+
Use a [Divider component](../divider/README.md) to separate neighbouring accordion items by a divider.
|
|
88
112
|
|
|
89
113
|
Since the Accordion is based on the List component, you can use the same utility classes for content structure and styling. Refer to the [List component documentation](../list/README.md) for details on how to add icons, avatars, images, and other features to your accordion items.
|
|
90
114
|
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
# Alert
|
|
2
|
+
This component is an Alert component inspired by [Material Design 3 Expressive](https://m3.material.io/components). Alerts are used to inform the user of important changes in a prominent way.
|
|
3
|
+
|
|
4
|
+
## Basic Usage
|
|
5
|
+
|
|
6
|
+
### HTML
|
|
7
|
+
To add a basic alert, use a `<div>` element with one of the primary alert style classes: `micl-alert-filled`, `micl-alert-tonal` or `micl-alert-outlined`.
|
|
8
|
+
|
|
9
|
+
```HTML
|
|
10
|
+
<div class="micl-alert-tonal" role="alert">
|
|
11
|
+
<span class="micl-alert__icon material-symbols-outlined">error</span>
|
|
12
|
+
<div class="micl-alert__text">
|
|
13
|
+
<h4>An error has occurred</h4>
|
|
14
|
+
<span class="micl-alert__supporting-text">Keyboard not responding. Press any key to continue.</span>
|
|
15
|
+
</div>
|
|
16
|
+
</div>
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
### CSS
|
|
20
|
+
Import the alert styles into your project:
|
|
21
|
+
|
|
22
|
+
```CSS
|
|
23
|
+
@use "material-inspired-component-library/dist/alert";
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
Or import all MICL styles:
|
|
27
|
+
```CSS
|
|
28
|
+
@use "material-inspired-component-library/styles";
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
### JavaScript
|
|
32
|
+
No custom JavaScript is required for the core functionality of this component.
|
|
33
|
+
|
|
34
|
+
### Live Demo
|
|
35
|
+
A live example of the [Alert component](https://henkpb.github.io/micl/alert.html) is available to interact with.
|
|
36
|
+
|
|
37
|
+
## Variants
|
|
38
|
+
Alerts are available in **three distinct styles**:
|
|
39
|
+
|
|
40
|
+
- `micl-alert-filled`: An alert with a solid background color that stands out prominently.
|
|
41
|
+
```HTML
|
|
42
|
+
<div class="micl-alert-filled" role="alert">
|
|
43
|
+
...
|
|
44
|
+
</div>
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
- `micl-alert-tonal`: An alert with a lighter background color. This is the style shown in the Basic Usage section.
|
|
48
|
+
|
|
49
|
+
- `micl-alert-outlined`: An alert with a clear border, typically used for less prominent content.
|
|
50
|
+
|
|
51
|
+
### Alert Content Structure
|
|
52
|
+
The alert in the Basic Usage section shows all available structural elements:
|
|
53
|
+
|
|
54
|
+
- `micl-alert__icon`: An optional icon that appears before the alert text.
|
|
55
|
+
|
|
56
|
+
- `micl-alert__text`: A container for the main alert heading (`<h1>`-`<h6>`) and the supporting text.
|
|
57
|
+
|
|
58
|
+
- `micl-alert__supporting-text`: Intended for a short description or supplementary information, and displayed in a smaller font.
|
|
59
|
+
|
|
60
|
+
## Customizations
|
|
61
|
+
You can customize the appearance of the Alert component by overriding its global CSS variables. These variables are declared on the `:root` pseudo-class and can be changed on any appropriate parent element to affect its child alert.
|
|
62
|
+
|
|
63
|
+
| Variable name | Default Value | Description |
|
|
64
|
+
| ------------- | ------------- | ----------- |
|
|
65
|
+
| --md-sys-alert-padding | 16px | The inner padding between the alert's edge and its content |
|
|
66
|
+
| --md-sys-alert-space | 16px | Sets the spacing between the icon and the text |
|
|
67
|
+
|
|
68
|
+
**Example: Changing the padding**
|
|
69
|
+
|
|
70
|
+
```HTML
|
|
71
|
+
<div style="--md-sys-alert-padding:24px">
|
|
72
|
+
<div class="micl-alert-filled" role="alert">
|
|
73
|
+
...
|
|
74
|
+
</div>
|
|
75
|
+
</div>
|
|
76
|
+
```
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
# App Bar
|
|
2
|
-
This component implements the
|
|
2
|
+
This component implements the [Material Design 3 Expressive App Bar](https://m3.material.io/components/app-bars/overview) design. The app bar serves as the top container for a page, displaying the page title, primary actions, and navigation options.
|
|
3
3
|
|
|
4
4
|
## Basic Usage
|
|
5
5
|
|
|
@@ -22,11 +22,16 @@ Import the app bar styles into your project:
|
|
|
22
22
|
@use "material-inspired-component-library/dist/appbar";
|
|
23
23
|
```
|
|
24
24
|
|
|
25
|
+
Or import all MICL styles:
|
|
26
|
+
```CSS
|
|
27
|
+
@use "material-inspired-component-library/styles";
|
|
28
|
+
```
|
|
29
|
+
|
|
25
30
|
### JavaScript
|
|
26
31
|
No custom JavaScript is required for the core functionality of this component.
|
|
27
32
|
|
|
28
|
-
### Demo
|
|
29
|
-
A live example of the [App Bar component](https://henkpb.github.io/micl/index.html) is available
|
|
33
|
+
### Live Demo
|
|
34
|
+
A live example of the [App Bar component](https://henkpb.github.io/micl/index.html) is available to interact with.
|
|
30
35
|
|
|
31
36
|
## Variants
|
|
32
37
|
The app bar component supports three sizes: **small**, **medium** (flexible), and **large** (flexible). Use a modifier class to specify a size other than the default small size.
|
|
@@ -81,7 +86,7 @@ Use the `micl-appbar__trailing` (or: `micl-appbar__trailing-icon`) class for ele
|
|
|
81
86
|
### Sticky app bar
|
|
82
87
|
The app bar is 'glued' to the top of the page when one of the following conditions is met:
|
|
83
88
|
|
|
84
|
-
- The [body region](../../layout/README.md) contains only one pane.
|
|
89
|
+
- The [body region](../../foundations/layout/README.md) contains only one pane.
|
|
85
90
|
- The body region contains two or more panes and the page has a compact size.
|
|
86
91
|
- The body region contains two or more panes, has the `micl-body--stacked-to-expanded` class and the page has a compact or medium size.
|
|
87
92
|
- The body region contains two or more panes, has the `micl-body--stacked-to-large` class and the page has a compact, medium or expanded size.
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
20
20
|
// SOFTWARE.
|
|
21
21
|
|
|
22
|
-
@use '../../layout';
|
|
22
|
+
@use '../../foundations/layout';
|
|
23
23
|
@use '../../styles/elevation';
|
|
24
24
|
@use '../../styles/shapes';
|
|
25
25
|
@use '../../styles/statelayer';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
# Badge
|
|
2
|
-
This component implements the
|
|
2
|
+
This component implements the [Material Design 3 Expressive Badge](https://m3.material.io/components/badges/overview) design. Badges are small status indicators that can show a count or simply signal new information.
|
|
3
3
|
|
|
4
4
|
## Basic Usage
|
|
5
5
|
|
|
@@ -19,11 +19,16 @@ Import the badge styles into your project:
|
|
|
19
19
|
@use "material-inspired-component-library/dist/badge";
|
|
20
20
|
```
|
|
21
21
|
|
|
22
|
+
Or import all MICL styles:
|
|
23
|
+
```CSS
|
|
24
|
+
@use "material-inspired-component-library/styles";
|
|
25
|
+
```
|
|
26
|
+
|
|
22
27
|
### JavaScript
|
|
23
28
|
No custom JavaScript is required for the core functionality of this component.
|
|
24
29
|
|
|
25
|
-
### Demo
|
|
26
|
-
A live example of the [Badge component](https://henkpb.github.io/micl/index.html) is available
|
|
30
|
+
### Live Demo
|
|
31
|
+
A live example of the [Badge component](https://henkpb.github.io/micl/index.html) is available to interact with.
|
|
27
32
|
|
|
28
33
|
## Anchoring
|
|
29
34
|
Badges are typically placed on top of other elements, like icons. To anchor a badge to a specific element, use CSS `anchor positioning`.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
# Bottom sheet
|
|
2
|
-
This component implements the
|
|
2
|
+
This component implements the [Material Design 3 Expressive Bottom sheet](https://m3.material.io/components/bottom-sheets/overview) design. Bottom sheets show secondary content anchored to the bottom of the screen.
|
|
3
3
|
|
|
4
4
|
## Basic Usage
|
|
5
5
|
|
|
@@ -21,6 +21,11 @@ Import the bottom sheet styles into your project:
|
|
|
21
21
|
@use "material-inspired-component-library/dist/bottomsheet";
|
|
22
22
|
```
|
|
23
23
|
|
|
24
|
+
Or import all MICL styles:
|
|
25
|
+
```CSS
|
|
26
|
+
@use "material-inspired-component-library/styles";
|
|
27
|
+
```
|
|
28
|
+
|
|
24
29
|
### JavaScript
|
|
25
30
|
This component requires JavaScript to support **resizable** bottom sheets. The library will automatically initialize new components as they're added to the DOM.
|
|
26
31
|
|
|
@@ -28,8 +33,8 @@ This component requires JavaScript to support **resizable** bottom sheets. The l
|
|
|
28
33
|
import micl from "material-inspired-component-library/dist/micl";
|
|
29
34
|
```
|
|
30
35
|
|
|
31
|
-
### Demo
|
|
32
|
-
A live example of the [Bottom sheet component](https://henkpb.github.io/micl/bottomsheet.html) is available
|
|
36
|
+
### Live Demo
|
|
37
|
+
A live example of the [Bottom sheet component](https://henkpb.github.io/micl/bottomsheet.html) is available to interact with.
|
|
33
38
|
|
|
34
39
|
## Variants
|
|
35
40
|
Setting the `popover` attribute to `manual` lets a bottom sheet co-exist and be interactive with the rest of the page.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
# Button
|
|
2
|
-
This component implements the
|
|
2
|
+
This component implements the [Material Design 3 Expressive Button](https://m3.material.io/components/buttons/overview) design. Buttons are interactive elements that enable users to trigger actions or navigate.
|
|
3
3
|
|
|
4
4
|
## Basic Usage
|
|
5
5
|
|
|
@@ -17,6 +17,11 @@ Import the button styles into your project:
|
|
|
17
17
|
@use "material-inspired-component-library/dist/button";
|
|
18
18
|
```
|
|
19
19
|
|
|
20
|
+
Or import all MICL styles:
|
|
21
|
+
```CSS
|
|
22
|
+
@use "material-inspired-component-library/styles";
|
|
23
|
+
```
|
|
24
|
+
|
|
20
25
|
### JavaScript
|
|
21
26
|
This component requires JavaScript for interactive features like the **toggle logic**:
|
|
22
27
|
|
|
@@ -26,8 +31,8 @@ import micl from "material-inspired-component-library/dist/micl";
|
|
|
26
31
|
|
|
27
32
|
This will initialize any Button component, including those that will be added to the DOM later on.
|
|
28
33
|
|
|
29
|
-
### Demo
|
|
30
|
-
A live example of the [Button component](https://henkpb.github.io/micl/button.html) is available
|
|
34
|
+
### Live Demo
|
|
35
|
+
A live example of the [Button component](https://henkpb.github.io/micl/button.html) is available to interact with.
|
|
31
36
|
|
|
32
37
|
## Variants
|
|
33
38
|
Buttons come in **five sizes**: extra small (`xs`), small (`s`), medium (`m`), large (`l`), and extra large (`xl`). To specify a size, append the appropriate postfix to the button's style class:
|
|
@@ -19,6 +19,7 @@
|
|
|
19
19
|
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
20
20
|
// SOFTWARE.
|
|
21
21
|
|
|
22
|
+
@use '../../foundations/layout';
|
|
22
23
|
@use '../../styles/elevation';
|
|
23
24
|
@use '../../styles/motion';
|
|
24
25
|
@use '../../styles/shapes';
|
|
@@ -70,6 +71,7 @@ button.micl-button-outlined-xl {
|
|
|
70
71
|
linear-gradient(rgb(from var(--statelayer-color) r g b / var(--statelayer-opacity)));
|
|
71
72
|
background-repeat: no-repeat;
|
|
72
73
|
background-size: 10000%, 100%;
|
|
74
|
+
-webkit-tap-highlight-color: transparent;
|
|
73
75
|
cursor: pointer;
|
|
74
76
|
transition:
|
|
75
77
|
border-radius var(--md-sys-button-motion-duration) var(--md-sys-button-motion-effects),
|
|
@@ -112,6 +114,7 @@ button.micl-button-outlined-xs {
|
|
|
112
114
|
position: relative;
|
|
113
115
|
min-inline-size: var(--micl-width);
|
|
114
116
|
block-size: var(--micl-height);
|
|
117
|
+
min-block-size: var(--micl-height);
|
|
115
118
|
column-gap: 8px;
|
|
116
119
|
padding-inline: 12px;
|
|
117
120
|
|
|
@@ -157,6 +160,7 @@ button.micl-button-outlined-s {
|
|
|
157
160
|
|
|
158
161
|
min-inline-size: var(--micl-width);
|
|
159
162
|
block-size: var(--micl-height);
|
|
163
|
+
min-block-size: var(--micl-height);
|
|
160
164
|
column-gap: 8px;
|
|
161
165
|
padding-inline: 16px;
|
|
162
166
|
|
|
@@ -202,6 +206,7 @@ button.micl-button-outlined-m {
|
|
|
202
206
|
|
|
203
207
|
min-inline-size: var(--micl-width);
|
|
204
208
|
block-size: var(--micl-height);
|
|
209
|
+
min-block-size: var(--micl-height);
|
|
205
210
|
column-gap: 8px;
|
|
206
211
|
padding-inline: 24px;
|
|
207
212
|
|
|
@@ -238,6 +243,7 @@ button.micl-button-outlined-l {
|
|
|
238
243
|
|
|
239
244
|
min-inline-size: var(--micl-width);
|
|
240
245
|
block-size: var(--micl-height);
|
|
246
|
+
min-block-size: var(--micl-height);
|
|
241
247
|
column-gap: 12px;
|
|
242
248
|
padding-inline: 48px;
|
|
243
249
|
|
|
@@ -274,6 +280,7 @@ button.micl-button-outlined-xl {
|
|
|
274
280
|
|
|
275
281
|
min-inline-size: var(--micl-width);
|
|
276
282
|
block-size: var(--micl-height);
|
|
283
|
+
min-block-size: var(--micl-height);
|
|
277
284
|
column-gap: 16px;
|
|
278
285
|
padding-inline: 64px;
|
|
279
286
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
# Card
|
|
2
|
-
This component implements the
|
|
2
|
+
This component implements the [Material Design 3 Expressive Card](https://m3.material.io/components/cards/overview) design. Cards display content and actions about a single subject.
|
|
3
3
|
|
|
4
4
|
## Basic Usage
|
|
5
5
|
|
|
@@ -19,14 +19,19 @@ Import the card styles into your project:
|
|
|
19
19
|
@use "material-inspired-component-library/dist/card";
|
|
20
20
|
```
|
|
21
21
|
|
|
22
|
+
Or import all MICL styles:
|
|
23
|
+
```CSS
|
|
24
|
+
@use "material-inspired-component-library/styles";
|
|
25
|
+
```
|
|
26
|
+
|
|
22
27
|
### JavaScript
|
|
23
28
|
No custom JavaScript is required for the core functionality of this component.
|
|
24
29
|
|
|
25
|
-
### Demo
|
|
26
|
-
A live example of the [Card component](https://henkpb.github.io/micl/card.html) is available
|
|
30
|
+
### Live Demo
|
|
31
|
+
A live example of the [Card component](https://henkpb.github.io/micl/card.html) is available to interact with.
|
|
27
32
|
|
|
28
33
|
## Variants
|
|
29
|
-
Cards
|
|
34
|
+
Cards are available in **three distinct styles**:
|
|
30
35
|
|
|
31
36
|
- `micl-card-elevated`: A card with a subtle shadow, visually lifted from the background. This is the style shown in Basic Usage.
|
|
32
37
|
|
|
@@ -41,6 +46,7 @@ Cards come in **three distinct styles**:
|
|
|
41
46
|
|
|
42
47
|
### Card Content Structure
|
|
43
48
|
While the card container is the only required element, the Card component provides several optional utility classes to help structure your card's content:
|
|
49
|
+
|
|
44
50
|
```HTML
|
|
45
51
|
<div class="micl-card-outlined" tabindex="0">
|
|
46
52
|
<img alt="Descriptive image text" class="micl-card__image" src="/path/to/your/image.jpg">
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
# Checkbox
|
|
2
|
-
This component implements the
|
|
2
|
+
This component implements the [Material Design 3 Expressive Checkbox](https://m3.material.io/components/checkbox/overview) design. A checkbox allows a user to select one or more options from a number of choices.
|
|
3
3
|
|
|
4
4
|
## Basic Usage
|
|
5
5
|
|
|
@@ -18,6 +18,11 @@ Import the checkbox styles into your project:
|
|
|
18
18
|
@use "material-inspired-component-library/dist/checkbox";
|
|
19
19
|
```
|
|
20
20
|
|
|
21
|
+
Or import all MICL styles:
|
|
22
|
+
```CSS
|
|
23
|
+
@use "material-inspired-component-library/styles";
|
|
24
|
+
```
|
|
25
|
+
|
|
21
26
|
### JavaScript
|
|
22
27
|
This component requires JavaScript to support checkbox groups:
|
|
23
28
|
|
|
@@ -25,8 +30,8 @@ This component requires JavaScript to support checkbox groups:
|
|
|
25
30
|
|
|
26
31
|
This will initialize any checkbox group, including those that will be added to the DOM later on.
|
|
27
32
|
|
|
28
|
-
### Demo
|
|
29
|
-
A live example of the [Checkbox component](https://henkpb.github.io/micl/checkbox.html) is available
|
|
33
|
+
### Live Demo
|
|
34
|
+
A live example of the [Checkbox component](https://henkpb.github.io/micl/checkbox.html) is available to interact with.
|
|
30
35
|
|
|
31
36
|
## Variants
|
|
32
37
|
Adding the `micl-checkbox--error` CSS class to the `<input>` element will create an error-checkbox as specified by the Material Design 3 specification.
|
|
@@ -48,6 +48,7 @@ input[type=checkbox].micl-checkbox {
|
|
|
48
48
|
border: calc((var(--md-sys-target-size) - var(--md-sys-checkbox-state-layer-size)) / 2) solid transparent;
|
|
49
49
|
background-clip: content-box;
|
|
50
50
|
background-color: transparent;
|
|
51
|
+
-webkit-tap-highlight-color: transparent;
|
|
51
52
|
border-radius: var(--md-sys-shape-corner-full);
|
|
52
53
|
outline-offset: -4px;
|
|
53
54
|
|
|
@@ -218,6 +219,7 @@ input[type=checkbox].micl-checkbox {
|
|
|
218
219
|
|
|
219
220
|
input[type=checkbox].micl-checkbox:not(:disabled) + label,
|
|
220
221
|
label:has(+ input[type=checkbox].micl-checkbox:not(:disabled)) {
|
|
222
|
+
-webkit-tap-highlight-color: transparent;
|
|
221
223
|
cursor: pointer;
|
|
222
224
|
}
|
|
223
225
|
input[type=checkbox].micl-checkbox + label,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
# Dialog
|
|
2
|
-
This component implements the
|
|
2
|
+
This component implements the [Material Design 3 Expressive Dialog](https://m3.material.io/components/dialogs/overview) design.
|
|
3
3
|
|
|
4
4
|
## Basic Usage
|
|
5
5
|
|
|
@@ -28,11 +28,16 @@ Import the dialog styles into your project:
|
|
|
28
28
|
@use "material-inspired-component-library/dist/dialog";
|
|
29
29
|
```
|
|
30
30
|
|
|
31
|
+
Or import all MICL styles:
|
|
32
|
+
```CSS
|
|
33
|
+
@use "material-inspired-component-library/styles";
|
|
34
|
+
```
|
|
35
|
+
|
|
31
36
|
### JavaScript
|
|
32
37
|
No custom JavaScript is required for the core functionality of this component, as the native popover attribute handles the open/close behavior.
|
|
33
38
|
|
|
34
|
-
### Demo
|
|
35
|
-
A live example of the [Dialog component](https://henkpb.github.io/micl/dialog.html) is available
|
|
39
|
+
### Live Demo
|
|
40
|
+
A live example of the [Dialog component](https://henkpb.github.io/micl/dialog.html) is available to interact with.
|
|
36
41
|
|
|
37
42
|
## Variants
|
|
38
43
|
When dialogs with the `popover` attribute are opened, they animate from the control element to the center of the screen. They can be easily dismissed by clicking outside or pressing <kbd>Esc</kbd>.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
# Divider
|
|
2
|
-
This component implements the
|
|
2
|
+
This component implements the [Material Design 3 Expressive Divider](https://m3.material.io/components/divider/overview) design. Dividers are thin lines that separate content into distinct sections.
|
|
3
3
|
|
|
4
4
|
## Basic Usage
|
|
5
5
|
|
|
@@ -17,11 +17,16 @@ Import the divider styles into your project:
|
|
|
17
17
|
@use "material-inspired-component-library/dist/divider";
|
|
18
18
|
```
|
|
19
19
|
|
|
20
|
+
Or import all MICL styles:
|
|
21
|
+
```CSS
|
|
22
|
+
@use "material-inspired-component-library/styles";
|
|
23
|
+
```
|
|
24
|
+
|
|
20
25
|
### JavaScript
|
|
21
26
|
No custom JavaScript is required for the core functionality of this component.
|
|
22
27
|
|
|
23
|
-
### Demo
|
|
24
|
-
A live example of the [Divider component](https://henkpb.github.io/micl/divider.html) is available
|
|
28
|
+
### Live Demo
|
|
29
|
+
A live example of the [Divider component](https://henkpb.github.io/micl/divider.html) is available to interact with.
|
|
25
30
|
|
|
26
31
|
## Variants
|
|
27
32
|
The Divider component offers five CSS classes for different divider styles:
|
|
@@ -36,7 +36,7 @@ body {
|
|
|
36
36
|
block-size: 0;
|
|
37
37
|
margin-block: calc(var(--md-sys-divider-space, 4px) - 1px) var(--md-sys-divider-space, 4px);
|
|
38
38
|
margin-inline: 0;
|
|
39
|
-
border:
|
|
39
|
+
border: none;
|
|
40
40
|
border-block-start: var(--md-sys-divider-thickness, 1px) solid var(--md-sys-divider-color, gray);
|
|
41
41
|
}
|
|
42
42
|
|
|
@@ -60,6 +60,6 @@ body {
|
|
|
60
60
|
inline-size: 0;
|
|
61
61
|
margin-block: 0;
|
|
62
62
|
margin-inline: calc(2 * var(--md-sys-divider-space, 4px));
|
|
63
|
-
border:
|
|
63
|
+
border: none;
|
|
64
64
|
border-inline-start: var(--md-sys-divider-thickness, 1px) solid var(--md-sys-divider-color, gray);
|
|
65
65
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
# Icon button
|
|
2
|
-
This component implements the
|
|
2
|
+
This component implements the [Material Design 3 Expressive Icon button](https://m3.material.io/components/icon-buttons/overview) design. Icon buttons allow users to perform a single action with a minimal visual footprint.
|
|
3
3
|
|
|
4
4
|
## Basic Usage
|
|
5
5
|
|
|
@@ -19,6 +19,11 @@ Import the icon button styles into your project:
|
|
|
19
19
|
@use "material-inspired-component-library/dist/iconbutton";
|
|
20
20
|
```
|
|
21
21
|
|
|
22
|
+
Or import all MICL styles:
|
|
23
|
+
```CSS
|
|
24
|
+
@use "material-inspired-component-library/styles";
|
|
25
|
+
```
|
|
26
|
+
|
|
22
27
|
### JavaScript
|
|
23
28
|
This component requires JavaScript for interactive features like the **toggle logic**:
|
|
24
29
|
|
|
@@ -28,8 +33,8 @@ import micl from "material-inspired-component-library/dist/micl";
|
|
|
28
33
|
|
|
29
34
|
This will initialize any Icon button component, including those that will be added to the DOM later on.
|
|
30
35
|
|
|
31
|
-
### Demo
|
|
32
|
-
A live example of the [Icon button component](https://henkpb.github.io/micl/iconbutton.html) is available
|
|
36
|
+
### Live Demo
|
|
37
|
+
A live example of the [Icon button component](https://henkpb.github.io/micl/iconbutton.html) is available to interact with.
|
|
33
38
|
|
|
34
39
|
## Variants
|
|
35
40
|
Icon buttons come in **five sizes**: extra small (`xs`), small (`s`), medium (`m`), large (`l`), and extra large (`xl`). To specify a size, append the appropriate postfix to the button's style class:
|
|
@@ -19,6 +19,7 @@
|
|
|
19
19
|
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
20
20
|
// SOFTWARE.
|
|
21
21
|
|
|
22
|
+
@use '../../foundations/layout';
|
|
22
23
|
@use '../../styles/elevation';
|
|
23
24
|
@use '../../styles/motion';
|
|
24
25
|
@use '../../styles/shapes';
|
|
@@ -61,9 +62,10 @@ button.micl-iconbutton-outlined-xl {
|
|
|
61
62
|
linear-gradient(rgb(from var(--statelayer-color) r g b / var(--statelayer-opacity)));
|
|
62
63
|
background-repeat: no-repeat;
|
|
63
64
|
background-size: 10000%, 100%;
|
|
65
|
+
-webkit-tap-highlight-color: transparent;
|
|
64
66
|
color: var(--md-sys-color-on-surface-variant);
|
|
65
|
-
cursor: pointer;
|
|
66
67
|
font-variation-settings: 'FILL' 0;
|
|
68
|
+
cursor: pointer;
|
|
67
69
|
transition:
|
|
68
70
|
border-radius var(--md-sys-iconbutton-motion-duration) var(--md-sys-iconbutton-motion-effects),
|
|
69
71
|
font-variation-settings var(--md-sys-iconbutton-motion-duration) linear,
|