material-inspired-component-library 3.0.2 → 4.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.
Files changed (90) hide show
  1. package/README.md +16 -14
  2. package/components/README.md +1 -1
  3. package/components/accordion/README.md +8 -3
  4. package/components/alert/README.md +76 -0
  5. package/components/alert/index.scss +121 -0
  6. package/components/appbar/README.md +9 -4
  7. package/components/appbar/index.scss +1 -1
  8. package/components/badge/README.md +8 -3
  9. package/components/badge/index.scss +1 -0
  10. package/components/bottomsheet/README.md +8 -3
  11. package/components/button/README.md +8 -3
  12. package/components/button/index.scss +7 -0
  13. package/components/card/README.md +10 -4
  14. package/components/card/index.scss +1 -1
  15. package/components/checkbox/README.md +56 -13
  16. package/components/checkbox/index.scss +148 -183
  17. package/components/checkbox/index.ts +148 -0
  18. package/components/dialog/README.md +8 -3
  19. package/components/dialog/index.scss +1 -0
  20. package/components/divider/README.md +8 -3
  21. package/components/iconbutton/README.md +8 -3
  22. package/components/iconbutton/index.scss +3 -1
  23. package/components/list/README.md +8 -3
  24. package/components/list/index.scss +2 -0
  25. package/components/list/index.ts +2 -3
  26. package/components/menu/README.md +7 -2
  27. package/components/menu/index.ts +2 -2
  28. package/components/navigationrail/README.md +8 -3
  29. package/components/navigationrail/index.scss +1 -0
  30. package/components/radio/README.md +8 -3
  31. package/components/radio/index.scss +8 -24
  32. package/components/select/README.md +3 -3
  33. package/components/sidesheet/README.md +8 -3
  34. package/components/slider/README.md +8 -3
  35. package/components/slider/index.scss +1 -0
  36. package/components/slider/index.ts +9 -10
  37. package/components/stepper/README.md +190 -0
  38. package/components/stepper/index.scss +93 -14
  39. package/components/stepper/index.ts +169 -88
  40. package/components/switch/README.md +8 -3
  41. package/components/switch/index.scss +2 -0
  42. package/components/textfield/README.md +8 -3
  43. package/components/textfield/index.ts +8 -41
  44. package/dist/alert.css +1 -0
  45. package/dist/alert.js +1 -0
  46. package/dist/badge.css +1 -1
  47. package/dist/button.css +1 -1
  48. package/dist/card.css +1 -1
  49. package/dist/checkbox.css +1 -1
  50. package/dist/components/checkbox/index.d.ts +5 -0
  51. package/dist/components/textfield/index.d.ts +0 -1
  52. package/dist/dialog.css +1 -1
  53. package/dist/foundations/form/index.d.ts +5 -0
  54. package/dist/iconbutton.css +1 -1
  55. package/dist/list.css +1 -1
  56. package/dist/micl.css +1 -1
  57. package/dist/micl.js +1 -1
  58. package/dist/navigationrail.css +1 -1
  59. package/dist/radio.css +1 -1
  60. package/dist/slider.css +1 -1
  61. package/dist/stepper.css +1 -1
  62. package/dist/switch.css +1 -1
  63. package/docs/accordion.html +1 -1
  64. package/docs/alert.html +176 -0
  65. package/docs/bottomsheet.html +2 -2
  66. package/docs/button.html +2 -2
  67. package/docs/card.html +7 -7
  68. package/docs/checkbox.html +33 -9
  69. package/docs/dialog.html +2 -2
  70. package/docs/divider.html +8 -8
  71. package/docs/iconbutton.html +2 -2
  72. package/docs/index.html +43 -32
  73. package/docs/list.html +2 -2
  74. package/docs/menu.html +2 -2
  75. package/docs/micl.css +1 -1
  76. package/docs/micl.js +1 -1
  77. package/docs/radio.html +2 -2
  78. package/docs/select.html +2 -2
  79. package/docs/sidesheet.html +2 -2
  80. package/docs/slider.html +2 -2
  81. package/docs/stepper.html +318 -0
  82. package/docs/switch.html +8 -4
  83. package/docs/textfield.html +2 -2
  84. package/foundations/form/index.ts +174 -0
  85. package/{layout → foundations/layout}/README.md +5 -0
  86. package/{layout → foundations/layout}/index.scss +1 -1
  87. package/micl.ts +3 -3
  88. package/package.json +3 -1
  89. package/styles.scss +2 -1
  90. 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
- To import all component styles:
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,11 +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)
89
+ - [x] [Alert](components/alert/README.md)
87
90
  - [x] [App Bar](components/appbar/README.md)
88
91
  - [x] [Badge](components/badge/README.md)
89
92
  - [x] [Bottom sheet](components/bottomsheet/README.md)
@@ -100,39 +103,38 @@ The library currently consists of the following components:
100
103
  - [x] [Select](components/select/README.md)
101
104
  - [x] [Side sheet](components/sidesheet/README.md)
102
105
  - [x] [Slider](components/slider/README.md)
106
+ - [x] [Stepper](components/stepper/README.md)
103
107
  - [x] [Switch](components/switch/README.md)
104
108
  - [x] [Text field](components/textfield/README.md)
105
109
 
106
110
  ## Change Log ↪️
107
111
 
108
- ### 3.0.0 (24.09.2025)
109
- **Features**
112
+ ### 4.0.0 (27.10.2025)
113
+ - **BREAKING**: Moved layout.scss til sub-folder.
114
+ - **Alert**: New component.
115
+ - **Stepper**: New component.
110
116
 
117
+ ### 3.1.0 (19.10.2025)
118
+ - **Checkbox**: Refactoring + added support for checkbox groups.
119
+
120
+ ### 3.0.0 (24.09.2025)
121
+ - **BREAKING:** Use `<nav>` instead of `<div>` for Navigation rail.
111
122
  - **App Bar**: New component.
112
123
  - **Layout**: Support for adaptive layout.
113
- - Improved handling of target area for small buttons.
114
- - **BREAKING:** Use `<nav>` instead of `<div>` for Navigation rail.
124
+ - **Buttons**: Improved handling of target area for small buttons.
115
125
 
116
126
  ### 2.0.0 (04.09.2025)
117
- **Features**
118
-
119
127
  - **Navigation rail**: New component.
120
128
  - **Badge**: New component.
121
129
  - **Ripple**: Now uses custom CSS properties.
122
130
 
123
131
  ### 1.3.0 (23.08.2025)
124
- **Features**
125
-
126
132
  - **Menu**: Added support for submenus.
127
133
  - **Ripple**: The ripple-effect does not use a pseudo-element anymore.
128
134
  - **State layer**: Rewrite for simpler styling.
129
135
 
130
136
  ### 1.2.0 (17.08.2025)
131
- **Features**
132
-
133
137
  - **List**: Added support for switches inside list items.
134
138
 
135
139
  ### 1.1.0 (12.08.2025)
136
- **Features**
137
-
138
140
  - **Text field**: Added support for multi-line text fields.
@@ -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 the [Material Design 3 Expressive Expandable Lists](https://m3.material.io/components/lists/overview) design. Accordions are vertically stacked lists that allow you to show and hide sections of content.
2
+ This component implements the [Material Design 3 Expressive Expandable Lists](https://m3.material.io/components/lists/overview) 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
 
@@ -43,8 +48,8 @@ import micl from "material-inspired-component-library/dist/micl";
43
48
 
44
49
  This will initialize any List 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 for you to interact with.
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.
@@ -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
+ ```
@@ -0,0 +1,121 @@
1
+ //
2
+ // Copyright © 2025 Hermana AS
3
+ //
4
+ // Permission is hereby granted, free of charge, to any person obtaining a copy
5
+ // of this software and associated documentation files (the "Software"), to deal
6
+ // in the Software without restriction, including without limitation the rights
7
+ // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8
+ // copies of the Software, and to permit persons to whom the Software is
9
+ // furnished to do so, subject to the following conditions:
10
+ //
11
+ // The above copyright notice and this permission notice shall be included in all
12
+ // copies or substantial portions of the Software.
13
+ //
14
+ // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15
+ // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16
+ // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17
+ // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18
+ // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19
+ // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20
+ // SOFTWARE.
21
+
22
+ @use '../../foundations/layout';
23
+ @use '../../styles/shapes';
24
+ @use '../../styles/typography';
25
+
26
+ :root {
27
+ --md-sys-alert-padding: 16px;
28
+ --md-sys-alert-space: 16px;
29
+ }
30
+
31
+ .micl-alert-filled,
32
+ .micl-alert-tonal,
33
+ .micl-alert-outlined {
34
+ --md-sys-alert-background-color: inherit;
35
+ --md-sys-alert-color: inherit;
36
+
37
+ box-sizing: border-box;
38
+ display: flex;
39
+ inline-size: 100%;
40
+ padding: var(--md-sys-alert-padding, 16px);
41
+ column-gap: var(--md-sys-alert-space, 8px);
42
+ border: none;
43
+ outline: none;
44
+ border-radius: var(--md-sys-shape-corner-small, 8px);
45
+ background-color: var(--md-sys-alert-background-color);
46
+ color: var(--md-sys-alert-color);
47
+
48
+ .micl-alert__icon {
49
+ block-size: var(--md-sys-layout-icon-size, 24px);
50
+ inline-size: var(--md-sys-layout-icon-size, 24px);
51
+ font-size: var(--md-sys-layout-icon-size, 24px);
52
+ }
53
+ .micl-alert__text {
54
+ display: flex;
55
+ flex-direction: column;
56
+ row-gap: 8px;
57
+
58
+ h1, h2, h3, h4, h5, h6, .micl-heading {
59
+ @include typography.title-medium;
60
+
61
+ margin: 0;
62
+ }
63
+ .micl-alert__supporting-text {
64
+ @include typography.body-medium;
65
+
66
+ margin: 0;
67
+ }
68
+ }
69
+ }
70
+
71
+ .micl-alert-filled {
72
+ --md-sys-alert-background-color: var(--md-sys-color-error);
73
+ --md-sys-alert-color: var(--md-sys-color-on-error);
74
+
75
+ &.micl-alert--primary {
76
+ --md-sys-alert-background-color: var(--md-sys-color-primary);
77
+ --md-sys-alert-color: var(--md-sys-color-on-primary);
78
+ }
79
+ &.micl-alert--secondary {
80
+ --md-sys-alert-background-color: var(--md-sys-color-secondary);
81
+ --md-sys-alert-color: var(--md-sys-color-on-secondary);
82
+ }
83
+ &.micl-alert--tertiary {
84
+ --md-sys-alert-background-color: var(--md-sys-color-tertiary);
85
+ --md-sys-alert-color: var(--md-sys-color-on-tertiary);
86
+ }
87
+ }
88
+
89
+ .micl-alert-tonal {
90
+ --md-sys-alert-background-color: var(--md-sys-color-error-container);
91
+ --md-sys-alert-color: var(--md-sys-color-on-error-container);
92
+
93
+ &.micl-alert--primary {
94
+ --md-sys-alert-background-color: var(--md-sys-color-primary-container);
95
+ --md-sys-alert-color: var(--md-sys-color-on-primary-container);
96
+ }
97
+ &.micl-alert--secondary {
98
+ --md-sys-alert-background-color: var(--md-sys-color-secondary-container);
99
+ --md-sys-alert-color: var(--md-sys-color-on-secondary-container);
100
+ }
101
+ &.micl-alert--tertiary {
102
+ --md-sys-alert-background-color: var(--md-sys-color-tertiary-container);
103
+ --md-sys-alert-color: var(--md-sys-color-on-tertiary-container);
104
+ }
105
+ }
106
+
107
+ .micl-alert-outlined {
108
+ --md-sys-alert-color: var(--md-sys-color-error);
109
+
110
+ border: 1px solid var(--md-sys-alert-color);
111
+
112
+ &.micl-alert--primary {
113
+ --md-sys-alert-color: var(--md-sys-color-primary);
114
+ }
115
+ &.micl-alert--secondary {
116
+ --md-sys-alert-color: var(--md-sys-color-secondary);
117
+ }
118
+ &.micl-alert--tertiary {
119
+ --md-sys-alert-color: var(--md-sys-color-tertiary);
120
+ }
121
+ }
@@ -1,5 +1,5 @@
1
1
  # App Bar
2
- This component implements the 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.
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 for you to interact with.
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 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.
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 for you to interact with.
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`.
@@ -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/typography';
23
24
 
24
25
  :root {
@@ -1,5 +1,5 @@
1
1
  # Bottom sheet
2
- This component implements the 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.
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 for you to interact with.
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 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.
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 for you to interact with.
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 the [Material Design 3 Expressive Card](https://m3.material.io/components/cards/overview) design. Cards display content and actions about a single subject.
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 for you to interact with.
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 come in **three distinct styles**:
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">
@@ -289,5 +289,5 @@
289
289
  padding-block: var(--md-sys-card-content-padding-block) 0;
290
290
  padding-inline: var(--md-sys-card-padding-inline);
291
291
  background-color: inherit;
292
- overflow: hidden;
292
+ overflow: clip visible;
293
293
  }
@@ -1,5 +1,5 @@
1
1
  # Checkbox
2
- This component implements the the [Material Design 3 Expressive Checkbox](https://m3.material.io/components/checkbox/overview) design.
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
 
@@ -7,7 +7,7 @@ This component implements the the [Material Design 3 Expressive Checkbox](https:
7
7
  To add a basic checkbox, use the `<input type="checkbox">` element with the `micl-checkbox` class, paired with a `<label>` element:
8
8
 
9
9
  ```HTML
10
- <input type="checkbox" id="mycheckbox" class="micl-checkbox" value="foo">
10
+ <input type="checkbox" id="mycheckbox" class="micl-checkbox">
11
11
  <label for="mycheckbox">Bar</label>
12
12
  ```
13
13
 
@@ -18,17 +18,20 @@ 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
- This component requires JavaScript to support checking and unchecking using a keyboard:
27
+ This component requires JavaScript to support checkbox groups:
23
28
 
24
- ```JavaScript
25
- import micl from "material-inspired-component-library/dist/micl";
26
- ```
29
+ `import micl from "material-inspired-component-library/dist/micl";`
27
30
 
28
- This will initialize any Checkbox component, including those that will be added to the DOM later on.
31
+ This will initialize any checkbox group, including those that will be added to the DOM later on.
29
32
 
30
- ### Demo
31
- A live example of the [Checkbox component](https://henkpb.github.io/micl/checkbox.html) is available for you to interact with.
33
+ ### Live Demo
34
+ A live example of the [Checkbox component](https://henkpb.github.io/micl/checkbox.html) is available to interact with.
32
35
 
33
36
  ## Variants
34
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.
@@ -37,20 +40,60 @@ A checkbox can be disabled by adding the `disabled` attribute to the `<input>` e
37
40
 
38
41
  The Checkbox component respects the `dir` global attribute, automatically adjusting its layout for right-to-left (RTL) languages when `dir="rtl"` is applied to an ancestor element.
39
42
 
43
+ The component applies `cursor: pointer` and the color role **on surface** to the `<label>` element immediately preceding or following an `<input type="checkbox">` with the `micl-checkbox` class. You are encouraged to customize these CSS settings to match your design system.
44
+
45
+ ## Checkbox group
46
+ You can establish a parent-child relationship among checkboxes. To do this, wrap the entire set of related checkboxes in an element using the `micl-checkbox-group` class. The designated parent checkbox must also include the `micl-checkbox__parent` class.
47
+
48
+ ```HTML
49
+ <div class="micl-checkbox-group">
50
+ <input type="checkbox" id="cb0" class="micl-checkbox micl-checkbox__parent" value="c0">
51
+ <label for="cb0">Choices</label>
52
+ <input type="checkbox" id="cb1" class="micl-checkbox" value="c1">
53
+ <label for="cb1">First Choice</label>
54
+ <input type="checkbox" id="cb2" class="micl-checkbox" checked value="c2">
55
+ <label for="cb2">Second Choice</label>
56
+ ...
57
+ </div>
58
+ ```
59
+
60
+ To visually improve the layout, such as by indenting child checkboxes, use wrapper elements and utility classes:
61
+
62
+ ```HTML
63
+ <div class="micl-checkbox-group">
64
+ <div class="micl-flex--vcenter">
65
+ <input type="checkbox" id="cb0" class="micl-checkbox micl-checkbox__parent" value="c0">
66
+ <label for="cb0">Choices</label>
67
+ </div>
68
+ <div style="padding-inline-start:16px">
69
+ <div class="micl-flex--vcenter">
70
+ <input type="checkbox" id="cb1" class="micl-checkbox" value="c1">
71
+ <label for="cb1">First Choice</label>
72
+ </div>
73
+ <div class="micl-flex--vcenter">
74
+ <input type="checkbox" id="cb2" class="micl-checkbox" checked value="c2">
75
+ <label for="cb2">Second Choice</label>
76
+ </div>
77
+ ...
78
+ </div>
79
+ </div>
80
+ ```
81
+
82
+ Note that checkbox groups support **nesting**, allowing a `micl-checkbox-group` to contain other `micl-checkbox-group` elements for multi-level hierarchies.
83
+
40
84
  ## Customizations
41
85
  You can customize the appearance of the Checkbox 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 checkboxes.
42
86
 
43
87
  | Variable name | Default Value | Description |
44
88
  | ------------- | ------------- | ----------- |
45
89
  | --md-sys-checkbox-border-width | 2px | Controls the thickness of the checkbox's border |
90
+ | --md-sys-checkbox-check-thickness | 2px | The thickness of the checkmark |
46
91
  | --md-sys-checkbox-container-size | 18px | Defines the size of the checkbox itself |
47
- | --md-sys-checkbox-selected-icon | \2A3D | The character used as the checkmark for the checkbox |
48
- | --md-sys-checkbox-state-layer-radius | 20px | Sets the radius of the interactive area that indicates the component's current state (e.g., hover, focus, press) |
49
92
 
50
- **Example: Changing the size of the interactive area**
93
+ **Example: Changing the border width of a checkbox**
51
94
 
52
95
  ```HTML
53
- <div style="--md-sys-checkbox-state-layer-radius:24px">
96
+ <div style="--md-sys-checkbox-border-width:1px">
54
97
  <input type="checkbox" id="mycheckbox" class="micl-checkbox">
55
98
  <label for="mycheckbox">Checkbox</label>
56
99
  </div>