material-inspired-component-library 9.0.1 → 9.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -0
- package/components/dialog/index.scss +1 -1
- package/components/list/index.scss +4 -4
- package/components/menu/index.scss +2 -3
- package/components/navigationrail/README.md +10 -9
- package/components/select/README.md +26 -0
- package/components/select/index.scss +53 -0
- package/components/shapes/_paths.generated.scss +38 -52
- package/components/textfield/index.scss +1 -1
- package/dist/alert.css +1 -1
- package/dist/appbar.css +1 -1
- package/dist/badge.css +1 -1
- package/dist/button.css +1 -1
- package/dist/card.css +1 -1
- package/dist/chip.css +1 -1
- package/dist/datepicker.css +1 -1
- package/dist/dialog.css +1 -1
- package/dist/list.css +1 -1
- package/dist/menu.css +1 -1
- package/dist/menu.js +1 -1
- package/dist/micl.css +1 -1
- package/dist/micl.d.ts +0 -1
- package/dist/micl.js +1 -1
- package/dist/navigationbar.css +1 -1
- package/dist/navigationrail.css +1 -1
- package/dist/navigationrail.js +1 -1
- package/dist/select.css +1 -1
- package/dist/shapes.css +1 -1
- package/dist/sidesheet.css +1 -1
- package/dist/slider.css +1 -1
- package/dist/snackbar.css +1 -1
- package/dist/textfield.css +1 -1
- package/dist/textfield.js +1 -1
- package/dist/timepicker.css +1 -1
- package/package.json +3 -3
- package/styles/typography.scss +41 -278
- package/dist/components/navigationrail/index.d.ts +0 -7
package/README.md
CHANGED
|
@@ -201,6 +201,9 @@ The library currently consists of the following components:
|
|
|
201
201
|
|
|
202
202
|
## Change Log ↪️
|
|
203
203
|
|
|
204
|
+
### 9.1.0 (05.09.2026)
|
|
205
|
+
- **Navigation rail**: Dropped the JavaScript.
|
|
206
|
+
|
|
204
207
|
### 9.0.0 (20.07.2026)
|
|
205
208
|
- **BREAKING**: Renamed all CSS custom properties from --md-sys- to --md-comp-.
|
|
206
209
|
- **BREAKING**: Renamed the layout class `micl-body` and its `micl-body--*` modifiers to `micl-panes`/`micl-panes--*`, aligning with the M3 Expressive layout terminology.
|
|
@@ -66,6 +66,7 @@ dialog.micl-dialog {
|
|
|
66
66
|
min-inline-size: var(--md-comp-dialog-min-width, 280px);
|
|
67
67
|
max-inline-size: var(--md-comp-dialog-max-width, 560px);
|
|
68
68
|
max-block-size: 100vh;
|
|
69
|
+
position-anchor: auto;
|
|
69
70
|
inset-block-start: anchor(start);
|
|
70
71
|
inset-inline-start: anchor(start);
|
|
71
72
|
transform: var(--_translate) scale(50%);
|
|
@@ -153,7 +154,6 @@ dialog.micl-dialog {
|
|
|
153
154
|
}
|
|
154
155
|
|
|
155
156
|
&.micl-dialog--docked {
|
|
156
|
-
position-anchor: auto;
|
|
157
157
|
inset-block: anchor(end) auto;
|
|
158
158
|
inset-inline: anchor(start) auto;
|
|
159
159
|
transform: none;
|
|
@@ -275,12 +275,12 @@ $unselected: ':not(:checked, :has(input[type=checkbox]:checked), #{$open-accordi
|
|
|
275
275
|
-webkit-tap-highlight-color: transparent;
|
|
276
276
|
|
|
277
277
|
&:first-of-type {
|
|
278
|
-
border-start-start-radius: max(var(--_list-item-shape), var(--_list-shape));
|
|
279
|
-
border-start-end-radius: max(var(--_list-item-shape), var(--_list-shape));
|
|
278
|
+
border-start-start-radius: max(var(--_list-item-shape), var(--_list-shape, 0px));
|
|
279
|
+
border-start-end-radius: max(var(--_list-item-shape), var(--_list-shape, 0px));
|
|
280
280
|
}
|
|
281
281
|
&:last-of-type {
|
|
282
|
-
border-end-start-radius: max(var(--_list-item-shape), var(--_list-shape));
|
|
283
|
-
border-end-end-radius: max(var(--_list-item-shape), var(--_list-shape));
|
|
282
|
+
border-end-start-radius: max(var(--_list-item-shape), var(--_list-shape, 0px));
|
|
283
|
+
border-end-end-radius: max(var(--_list-item-shape), var(--_list-shape, 0px));
|
|
284
284
|
}
|
|
285
285
|
&:not(:has(> button)) {
|
|
286
286
|
--micl-ripple: 1;
|
|
@@ -200,12 +200,11 @@ $item-classes: ':is(.micl-list-item-one, .micl-list-item-two, .micl-list-item-th
|
|
|
200
200
|
|
|
201
201
|
.micl-menu[popover] {
|
|
202
202
|
flex-direction: column;
|
|
203
|
-
position:
|
|
203
|
+
position-anchor: auto;
|
|
204
204
|
inset: unset;
|
|
205
205
|
inset-block-start: anchor(end);
|
|
206
206
|
inset-inline-start: anchor(start);
|
|
207
|
-
position-try-
|
|
208
|
-
position-try-fallbacks: flip-block, flip-inline;
|
|
207
|
+
position-try-fallbacks: flip-block, flip-inline, flip-block flip-inline;
|
|
209
208
|
min-inline-size: var(--md-comp-menu-width-min, 112px);
|
|
210
209
|
max-inline-size: var(--md-comp-menu-width-max, 320px);
|
|
211
210
|
gap: var(--md-comp-menu-gap, 2px);
|
|
@@ -8,12 +8,12 @@ To create a simple navigation rail, use a `<nav>` element with the `micl-navigat
|
|
|
8
8
|
|
|
9
9
|
```HTML
|
|
10
10
|
<nav id="mynavigationrail" class="micl-navigationrail">
|
|
11
|
-
<div class="micl-navigationrail__content"
|
|
12
|
-
<a href="#" class="micl-navigationrail__item"
|
|
11
|
+
<div class="micl-navigationrail__content">
|
|
12
|
+
<a href="#" class="micl-navigationrail__item" aria-current="page">
|
|
13
13
|
<span class="micl-navigationrail__icon material-symbols-outlined" aria-hidden="true">inbox</span>
|
|
14
14
|
<span class="micl-navigationrail__text">Inbox</span>
|
|
15
15
|
</a>
|
|
16
|
-
<a href="#" class="micl-navigationrail__item"
|
|
16
|
+
<a href="#" class="micl-navigationrail__item">
|
|
17
17
|
<span class="micl-navigationrail__icon material-symbols-outlined" aria-hidden="true">outbox</span>
|
|
18
18
|
<span class="micl-navigationrail__text">Outbox</span>
|
|
19
19
|
</a>
|
|
@@ -35,11 +35,12 @@ Or import all MICL styles:
|
|
|
35
35
|
```
|
|
36
36
|
|
|
37
37
|
### JavaScript
|
|
38
|
-
|
|
38
|
+
No custom JavaScript is required for the core functionality of this component.
|
|
39
39
|
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
40
|
+
> [!NOTE]
|
|
41
|
+
> Opening and closing a modal navigation rail is handled natively by the `<dialog>` element and its invoker buttons, and the navigation items are ordinary links, activated with `Enter` like any other link.
|
|
42
|
+
>
|
|
43
|
+
> Marking the current destination is left to the application: give the item for the current page the `aria-current="page"` attribute.
|
|
43
44
|
|
|
44
45
|
### Live Demo
|
|
45
46
|
A live example of the [Navigation rail component](https://henkpb.github.io/micl/navigationrail.html) is available to interact with.
|
|
@@ -62,7 +63,7 @@ The basic example creates a **collapsed** navigation rail. Add a menu button to
|
|
|
62
63
|
aria-label="Toggle navigation rail"
|
|
63
64
|
></button>
|
|
64
65
|
</div>
|
|
65
|
-
<div class="micl-navigationrail__content"
|
|
66
|
+
<div class="micl-navigationrail__content">
|
|
66
67
|
...
|
|
67
68
|
</div>
|
|
68
69
|
</nav>
|
|
@@ -86,7 +87,7 @@ A **modal** navigation rail is hidden until the user clicks a menu button. When
|
|
|
86
87
|
autofocus
|
|
87
88
|
>menu_open</button>
|
|
88
89
|
</div>
|
|
89
|
-
<div class="micl-navigationrail__content"
|
|
90
|
+
<div class="micl-navigationrail__content">
|
|
90
91
|
...
|
|
91
92
|
</div>
|
|
92
93
|
</dialog>
|
|
@@ -133,6 +133,32 @@ Options can be grouped by using the `<optgroup>` element. Add a `<legend>` eleme
|
|
|
133
133
|
</div>
|
|
134
134
|
```
|
|
135
135
|
|
|
136
|
+
## Multiple selection
|
|
137
|
+
Adding the `multiple` attribute turns the select into an in-page listbox in which several options can be chosen at once.
|
|
138
|
+
|
|
139
|
+
By default the listbox grows with its options. To give it a fixed height with internal scrolling, set the `--md-comp-text-field-container-height` custom property.
|
|
140
|
+
|
|
141
|
+
**Example: A multiple select with a fixed height**
|
|
142
|
+
|
|
143
|
+
```HTML
|
|
144
|
+
<div class="micl-textfield-outlined" style="--md-comp-text-field-container-height:230px">
|
|
145
|
+
<label for="myselect">Countries</label>
|
|
146
|
+
<select id="myselect" multiple>
|
|
147
|
+
<option class="micl-list-item-one" value="AR" selected>
|
|
148
|
+
<span class="micl-list-item__text">Argentina</span>
|
|
149
|
+
</option>
|
|
150
|
+
<option class="micl-list-item-one" value="BO">
|
|
151
|
+
<span class="micl-list-item__text">Bolivia</span>
|
|
152
|
+
</option>
|
|
153
|
+
<option class="micl-list-item-one" value="CL" selected>
|
|
154
|
+
<span class="micl-list-item__text">Chile</span>
|
|
155
|
+
</option>
|
|
156
|
+
</select>
|
|
157
|
+
</div>
|
|
158
|
+
```
|
|
159
|
+
|
|
160
|
+
Options support the same content as in a single select: supporting text, dividers, media elements, and option groups.
|
|
161
|
+
|
|
136
162
|
## Theming
|
|
137
163
|
The Select component has no tokens of its own: the field is themed with the CSS custom properties of the [Text field](../textfield/README.md) component, and the option pick-list with those of the [Menu](../menu/README.md) and [List](../list/README.md) components. Set them on any appropriate parent element to affect its child selects.
|
|
138
164
|
|
|
@@ -106,6 +106,25 @@ $selects: ':is(.micl-textfield-filled, .micl-textfield-outlined) > select';
|
|
|
106
106
|
}
|
|
107
107
|
}
|
|
108
108
|
|
|
109
|
+
&[multiple] {
|
|
110
|
+
--md-comp-divider-space: 0.5px;
|
|
111
|
+
--_list-item-background-color: var(--md-comp-list-item-container-color, transparent);
|
|
112
|
+
--_list-item-background-opacity: 0%;
|
|
113
|
+
|
|
114
|
+
display: flex;
|
|
115
|
+
flex-direction: column;
|
|
116
|
+
gap: var(--md-comp-menu-gap, 2px);
|
|
117
|
+
block-size: var(--md-comp-text-field-container-height, auto);
|
|
118
|
+
min-block-size: var(--_height);
|
|
119
|
+
padding-block: 6px calc(4px - var(--_outline-extra, 0px));
|
|
120
|
+
padding-inline: calc(4px - var(--_outline-extra, 0px));
|
|
121
|
+
overflow-y: auto;
|
|
122
|
+
|
|
123
|
+
&::picker-icon {
|
|
124
|
+
display: none;
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
|
|
109
128
|
option {
|
|
110
129
|
line-height: normal;
|
|
111
130
|
|
|
@@ -120,6 +139,40 @@ $selects: ':is(.micl-textfield-filled, .micl-textfield-outlined) > select';
|
|
|
120
139
|
}
|
|
121
140
|
}
|
|
122
141
|
|
|
142
|
+
.micl-textfield-filled > select[multiple] {
|
|
143
|
+
padding-block: 24px calc(5px - var(--_outline-width, 1px));
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
@supports not (appearance: base-select) {
|
|
147
|
+
#{$selects}[multiple] {
|
|
148
|
+
border-radius: 0;
|
|
149
|
+
|
|
150
|
+
option {
|
|
151
|
+
--micl-ripple: 0;
|
|
152
|
+
|
|
153
|
+
appearance: none;
|
|
154
|
+
background-position: var(--micl-x, center) var(--micl-y, center), 0 0, 0 0;
|
|
155
|
+
background-size: 0%, 100%, 100%;
|
|
156
|
+
background-image:
|
|
157
|
+
radial-gradient(
|
|
158
|
+
circle at var(--micl-x, center) var(--micl-y, center),
|
|
159
|
+
transparent 0%,
|
|
160
|
+
rgb(from var(--statelayer-color) r g b / calc(var(--statelayer-opacity) * var(--md-sys-state-ripple-opacity-factor))) 10%,
|
|
161
|
+
transparent 10%
|
|
162
|
+
),
|
|
163
|
+
linear-gradient(rgb(from var(--statelayer-color) r g b / var(--statelayer-opacity))),
|
|
164
|
+
linear-gradient(rgb(from var(--_list-item-background-color) r g b / var(--_list-item-background-opacity)));
|
|
165
|
+
-webkit-text-fill-color: var(--_headline-color);
|
|
166
|
+
|
|
167
|
+
// A timed border-radius transition also re-enables the native painting —
|
|
168
|
+
// the list transition is repeated here without it.
|
|
169
|
+
transition:
|
|
170
|
+
background-size 0ms,
|
|
171
|
+
--statelayer-opacity var(--md-comp-list-motion-duration) linear;
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
|
|
123
176
|
[inert] #{$selects}::picker-icon {
|
|
124
177
|
display: none;
|
|
125
178
|
}
|