material-inspired-component-library 3.0.1 → 3.0.2
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 +2 -2
- package/components/appbar/index.scss +2 -2
- package/components/badge/index.scss +22 -7
- package/components/button/index.scss +2 -2
- package/components/card/README.md +9 -5
- package/components/card/index.scss +49 -22
- package/components/dialog/index.scss +3 -3
- package/components/divider/README.md +3 -3
- package/components/divider/index.scss +18 -27
- package/components/iconbutton/index.scss +2 -2
- package/components/list/index.scss +2 -2
- package/components/navigationrail/index.scss +5 -3
- package/components/radio/README.md +1 -1
- package/components/select/index.scss +5 -2
- package/components/slider/index.scss +4 -4
- package/components/stepper/index.scss +85 -0
- package/components/stepper/index.ts +163 -0
- package/components/switch/README.md +26 -4
- package/components/switch/index.scss +24 -23
- package/components/textfield/index.scss +1 -0
- package/components/textfield/index.ts +54 -20
- 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/components/stepper/index.d.ts +5 -0
- package/dist/components/textfield/index.d.ts +2 -1
- package/dist/dialog.css +1 -1
- package/dist/divider.css +1 -1
- package/dist/iconbutton.css +1 -1
- package/dist/layout.css +1 -1
- package/dist/list.css +1 -1
- package/dist/micl.css +1 -1
- package/dist/micl.js +1 -1
- package/dist/navigationrail.css +1 -1
- package/dist/select.css +1 -1
- package/dist/slider.css +1 -1
- package/dist/stepper.css +1 -0
- package/dist/stepper.js +1 -0
- package/dist/switch.css +1 -1
- package/dist/textfield.css +1 -1
- package/docs/card.html +25 -7
- package/docs/divider.html +7 -1
- package/docs/index.html +9 -10
- package/docs/micl.css +1 -1
- package/docs/micl.js +1 -1
- package/docs/navigationrail.html +2 -3
- package/docs/radio.html +1 -1
- package/docs/switch.html +41 -26
- package/layout/index.scss +9 -2
- package/micl.ts +22 -26
- package/package.json +2 -1
- package/styles.scss +1 -0
package/README.md
CHANGED
|
@@ -76,7 +76,7 @@ Copy the main `micl.js` file to your distribution folder and include it in your
|
|
|
76
76
|
```
|
|
77
77
|
This will initialize all MICL components, including those that will be added to the DOM later on.
|
|
78
78
|
|
|
79
|
-
## Foundations
|
|
79
|
+
## Foundations 🪟
|
|
80
80
|
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
81
|
|
|
82
82
|
- [x] [Layout](layout/README.md)
|
|
@@ -103,7 +103,7 @@ The library currently consists of the following components:
|
|
|
103
103
|
- [x] [Switch](components/switch/README.md)
|
|
104
104
|
- [x] [Text field](components/textfield/README.md)
|
|
105
105
|
|
|
106
|
-
## Change Log
|
|
106
|
+
## Change Log ↪️
|
|
107
107
|
|
|
108
108
|
### 3.0.0 (24.09.2025)
|
|
109
109
|
**Features**
|
|
@@ -66,7 +66,7 @@
|
|
|
66
66
|
}
|
|
67
67
|
.micl-appbar__leading-icon {
|
|
68
68
|
grid-area: appbar-leading;
|
|
69
|
-
margin-inline-start: calc(var(--md-sys-layout-window-margin) - (var(--micl-width, statelayer.$md-sys-target-size) / 2) + (24px / 2) - var(--md-sys-appbar-padding-inline));
|
|
69
|
+
margin-inline-start: calc(var(--md-sys-layout-window-margin) - (var(--micl-width, statelayer.$md-sys-target-size) / 2) + (var(--md-sys-layout-icon-size, 24px) / 2) - var(--md-sys-appbar-padding-inline));
|
|
70
70
|
color: var(--md-sys-color-on-surface);
|
|
71
71
|
}
|
|
72
72
|
.micl-appbar__headline {
|
|
@@ -103,7 +103,7 @@
|
|
|
103
103
|
}
|
|
104
104
|
.micl-appbar__trailing-icon {
|
|
105
105
|
grid-area: appbar-trailing;
|
|
106
|
-
margin-inline-end: calc(var(--md-sys-layout-window-margin) - (var(--micl-width, statelayer.$md-sys-target-size) / 2) + (24px / 2) - var(--md-sys-appbar-padding-inline));
|
|
106
|
+
margin-inline-end: calc(var(--md-sys-layout-window-margin) - (var(--micl-width, statelayer.$md-sys-target-size) / 2) + (var(--md-sys-layout-icon-size, 24px) / 2) - var(--md-sys-appbar-padding-inline));
|
|
107
107
|
color: var(--md-sys-color-on-surface-variant);
|
|
108
108
|
}
|
|
109
109
|
&.micl-appbar--medium {
|
|
@@ -25,16 +25,16 @@
|
|
|
25
25
|
--md-sys-badge-small-size: 6px;
|
|
26
26
|
--md-sys-badge-large-size: 16px;
|
|
27
27
|
--md-sys-badge-large-padding: 4px;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
.micl-badge {
|
|
31
28
|
--md-sys-badge-inline-offset: 0px;
|
|
32
29
|
--md-sys-badge-block-offset: 0px;
|
|
30
|
+
}
|
|
33
31
|
|
|
32
|
+
.micl-badge {
|
|
34
33
|
box-sizing: border-box;
|
|
35
34
|
position: fixed;
|
|
36
|
-
inset:
|
|
35
|
+
inset: 0;
|
|
37
36
|
margin: 0;
|
|
37
|
+
overflow-x: hidden;
|
|
38
38
|
background-color: var(--md-sys-color-error);
|
|
39
39
|
color: var(--md-sys-color-on-error);
|
|
40
40
|
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
inline-size: var(--md-sys-badge-small-size);
|
|
43
43
|
block-size: var(--md-sys-badge-small-size);
|
|
44
44
|
inset-block-start: calc(anchor(start) + var(--md-sys-badge-block-offset));
|
|
45
|
-
inset-inline-start: calc(anchor(end) - var(--md-sys-badge-small-size)
|
|
45
|
+
inset-inline-start: calc(anchor(end) - var(--md-sys-badge-small-size) + var(--md-sys-badge-inline-offset));
|
|
46
46
|
padding: 0;
|
|
47
47
|
border-radius: calc(var(--md-sys-badge-small-size) / 2);
|
|
48
48
|
}
|
|
@@ -53,9 +53,24 @@
|
|
|
53
53
|
max-inline-size: 34px;
|
|
54
54
|
min-inline-size: var(--md-sys-badge-large-size);
|
|
55
55
|
block-size: var(--md-sys-badge-large-size);
|
|
56
|
-
inset-block-start: calc(anchor(start) -
|
|
57
|
-
inset-inline-start: calc(anchor(end) - 12px
|
|
56
|
+
inset-block-start: calc(anchor(start) - (var(--md-sys-badge-large-size) - 14px) + var(--md-sys-badge-block-offset));
|
|
57
|
+
inset-inline-start: calc(anchor(end) - 12px + var(--md-sys-badge-inline-offset));
|
|
58
58
|
padding-inline: var(--md-sys-badge-large-padding);
|
|
59
59
|
border-radius: calc(var(--md-sys-badge-large-size) / 2);
|
|
60
60
|
}
|
|
61
61
|
}
|
|
62
|
+
|
|
63
|
+
@supports not (top: anchor(bottom)) {
|
|
64
|
+
.micl-badge {
|
|
65
|
+
position: absolute;
|
|
66
|
+
inset: 0 !important;
|
|
67
|
+
margin-block: calc(12px + var(--md-sys-badge-block-offset)) auto;
|
|
68
|
+
|
|
69
|
+
&.micl-badge--small {
|
|
70
|
+
margin-inline-start: calc(var(--md-sys-layout-icon-size) - var(--md-sys-badge-small-size) - var(--md-sys-badge-inline-offset));
|
|
71
|
+
}
|
|
72
|
+
&:not(.micl-badge--small) {
|
|
73
|
+
margin-inline-start: calc(12px - var(--md-sys-badge-inline-offset));
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
}
|
|
@@ -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.
|
|
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.
|
|
3
3
|
|
|
4
4
|
## Basic Usage
|
|
5
5
|
|
|
@@ -40,7 +40,6 @@ Cards come in **three distinct styles**:
|
|
|
40
40
|
- `micl-card-outlined`: A card with a clear border, often used for less prominent content or to indicate interactivity.
|
|
41
41
|
|
|
42
42
|
### Card Content Structure
|
|
43
|
-
|
|
44
43
|
While the card container is the only required element, the Card component provides several optional utility classes to help structure your card's content:
|
|
45
44
|
```HTML
|
|
46
45
|
<div class="micl-card-outlined" tabindex="0">
|
|
@@ -64,7 +63,7 @@ While the card container is the only required element, the Card component provid
|
|
|
64
63
|
- `micl-card__headline-m` (medium) - *Used in the example above*
|
|
65
64
|
- `micl-card__headline-l` (large)
|
|
66
65
|
|
|
67
|
-
- `micl-card__image`: Applies styling to an `<img>` element used as the primary image for the card.
|
|
66
|
+
- `micl-card__image`: Applies styling to an `<img>` element or an element with a `background-image` style used as the primary image for the card.
|
|
68
67
|
|
|
69
68
|
- `micl-card__subhead`: For secondary headings, displayed with a smaller font than the main headline.
|
|
70
69
|
|
|
@@ -93,18 +92,23 @@ Cards can also serve as containers for expandable detail areas using the `<detai
|
|
|
93
92
|
</details>
|
|
94
93
|
```
|
|
95
94
|
|
|
95
|
+
### Compact Cards
|
|
96
|
+
Add the `micl-card--compact` to the main `<div>` element (or, the `<summary>` element for expandable cards) to create a compact version of the card header.
|
|
97
|
+
|
|
96
98
|
### States
|
|
97
99
|
- **Disabled Cards**: To visually indicate a disabled card (e.g., non-interactive), add the `micl-card--disabled` class to the card container.
|
|
98
100
|
|
|
99
101
|
- **Dragging State**: When implementing drag-and-drop functionality for cards, apply the `micl-card--dragging` class to the card container to provide visual feedback during the drag operation.
|
|
100
102
|
|
|
101
103
|
## Customizations
|
|
102
|
-
You can customize the appearance of the Card 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
|
|
104
|
+
You can customize the appearance of the Card 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 cards.
|
|
103
105
|
|
|
104
106
|
| Variable name | Default Value | Description |
|
|
105
107
|
| ------------- | ----- | ----------- |
|
|
106
108
|
| --md-sys-card-margin | 8px | Sets the spacing between adjacent cards both horizontally and vertically |
|
|
107
109
|
| --md-sys-card-padding-inline | 16px | Defines the amount of space between the left and right edges of a card and its content |
|
|
110
|
+
| --md-sys-card-content-padding-block | 16px | The amount of vertical padding reserved for the content area |
|
|
111
|
+
| --md-sys-card-outlined-border-width | 1px | The width of the border of **outlined** cards |
|
|
108
112
|
|
|
109
113
|
**Example: Changing the card margins**
|
|
110
114
|
|
|
@@ -120,6 +124,6 @@ You can customize the appearance of the Card component by overriding its global
|
|
|
120
124
|
```
|
|
121
125
|
|
|
122
126
|
## Compatibility
|
|
123
|
-
This component
|
|
127
|
+
This component utilizes relative RGB color values, which may not be fully supported in your browser. Please check [Browser compatibility](https://developer.mozilla.org/en-US/docs/Web/CSS/color_value#browser_compatibility) for details.
|
|
124
128
|
|
|
125
129
|
The Card component uses the `interpolate-size` CSS property to smoothly open and close the detail area of a Details disclosure element, which might not be supported in your browser. Please check [Browser compatibility](https://developer.mozilla.org/en-US/docs/Web/CSS/interpolate-size#browser_compatibility) for details.
|
|
@@ -28,6 +28,8 @@
|
|
|
28
28
|
:root {
|
|
29
29
|
--md-sys-card-margin: 8px;
|
|
30
30
|
--md-sys-card-padding-inline: 16px;
|
|
31
|
+
--md-sys-card-content-padding-block: 16px;
|
|
32
|
+
--md-sys-card-outlined-border-width: 1px;
|
|
31
33
|
}
|
|
32
34
|
|
|
33
35
|
.micl-card-elevated,
|
|
@@ -36,9 +38,12 @@
|
|
|
36
38
|
--md-sys-card-motion-spatial: #{motion.$md-sys-motion-expressive-default-spatial};
|
|
37
39
|
--md-sys-card-motion-duration: #{motion.$md-sys-motion-expressive-default-spatial-duration};
|
|
38
40
|
|
|
39
|
-
|
|
41
|
+
display: block;
|
|
42
|
+
block-size: fit-content;
|
|
40
43
|
margin: 0;
|
|
44
|
+
padding-block-end: var(--md-sys-card-content-padding-block);
|
|
41
45
|
border-radius: var(--md-sys-shape-corner-medium);
|
|
46
|
+
outline: none;
|
|
42
47
|
overflow: hidden;
|
|
43
48
|
interpolate-size: allow-keywords;
|
|
44
49
|
|
|
@@ -66,7 +71,6 @@
|
|
|
66
71
|
|
|
67
72
|
outline: var(--md-sys-state-focus-indicator-thickness) solid var(--md-sys-color-secondary);
|
|
68
73
|
outline-offset: var(--md-sys-state-focus-indicator-outer-offset);
|
|
69
|
-
box-shadow: var(--md-sys-elevation-level1);
|
|
70
74
|
}
|
|
71
75
|
&:active {
|
|
72
76
|
--statelayer-opacity: var(--md-sys-state-pressed-state-layer-opacity);
|
|
@@ -89,21 +93,23 @@
|
|
|
89
93
|
outline-offset: var(--md-sys-state-focus-indicator-outer-offset);
|
|
90
94
|
}
|
|
91
95
|
&::details-content {
|
|
92
|
-
|
|
96
|
+
block-size: 0;
|
|
93
97
|
overflow: hidden;
|
|
94
98
|
transition:
|
|
95
|
-
|
|
99
|
+
block-size var(--md-sys-card-motion-duration) var(--md-sys-card-motion-spatial),
|
|
96
100
|
content-visibility var(--md-sys-card-motion-duration) linear allow-discrete;
|
|
97
101
|
}
|
|
98
102
|
&[open]::details-content {
|
|
99
|
-
|
|
103
|
+
block-size: auto;
|
|
100
104
|
}
|
|
101
105
|
&> summary {
|
|
102
|
-
padding-block-end: 8px;
|
|
103
106
|
outline: none;
|
|
104
107
|
list-style: none;
|
|
105
108
|
cursor: pointer
|
|
106
109
|
}
|
|
110
|
+
&:not([open]):has(> summary.micl-card--compact) {
|
|
111
|
+
padding-block-end: 0;
|
|
112
|
+
}
|
|
107
113
|
}
|
|
108
114
|
|
|
109
115
|
.micl-card-elevated {
|
|
@@ -114,9 +120,6 @@
|
|
|
114
120
|
&:hover {
|
|
115
121
|
box-shadow: var(--md-sys-elevation-level2);
|
|
116
122
|
}
|
|
117
|
-
&:active {
|
|
118
|
-
box-shadow: var(--md-sys-elevation-level1);
|
|
119
|
-
}
|
|
120
123
|
&.micl-card--dragging {
|
|
121
124
|
box-shadow: var(--md-sys-elevation-level4);
|
|
122
125
|
}
|
|
@@ -125,29 +128,18 @@
|
|
|
125
128
|
.micl-card-filled {
|
|
126
129
|
background-color: var(--md-sys-color-surface-container-highest);
|
|
127
130
|
box-shadow: var(--md-sys-elevation-level0);
|
|
128
|
-
|
|
129
|
-
&[tabindex='0']:not(.micl-card--disabled) {
|
|
130
|
-
&:focus-visible {
|
|
131
|
-
box-shadow: var(--md-sys-elevation-level0);
|
|
132
|
-
}
|
|
133
|
-
&:active {
|
|
134
|
-
box-shadow: var(--md-sys-elevation-level0);
|
|
135
|
-
}
|
|
136
|
-
}
|
|
137
131
|
}
|
|
138
132
|
.micl-card-outlined {
|
|
139
133
|
background-color: var(--md-sys-color-surface);
|
|
140
134
|
box-shadow: var(--md-sys-elevation-level0);
|
|
141
|
-
border:
|
|
135
|
+
border: var(--md-sys-card-outlined-border-width) solid var(--md-sys-color-outline-variant);
|
|
142
136
|
|
|
143
137
|
&[tabindex='0']:not(.micl-card--disabled) {
|
|
144
138
|
&:focus-visible {
|
|
145
139
|
border-color: var(--md-sys-color-on-surface);
|
|
146
|
-
box-shadow: var(--md-sys-elevation-level0);
|
|
147
140
|
}
|
|
148
141
|
&:active {
|
|
149
142
|
border-color: var(--md-sys-color-outline-variant);
|
|
150
|
-
box-shadow: var(--md-sys-elevation-level0);
|
|
151
143
|
}
|
|
152
144
|
}
|
|
153
145
|
}
|
|
@@ -167,10 +159,44 @@
|
|
|
167
159
|
border-color: rgb(from var(--md-sys-color-outline) r g b / 12%);
|
|
168
160
|
}
|
|
169
161
|
}
|
|
162
|
+
.micl-card--compact {
|
|
163
|
+
display: grid;
|
|
164
|
+
grid-template-areas:
|
|
165
|
+
"card-media card-headline"
|
|
166
|
+
"card-media card-subhead"
|
|
167
|
+
"card-media card-supporting"
|
|
168
|
+
"card-content card-content";
|
|
169
|
+
grid-template-columns: 20% 1fr;
|
|
170
|
+
|
|
171
|
+
.micl-card__image {
|
|
172
|
+
grid-area: card-media;
|
|
173
|
+
block-size: 100%;
|
|
174
|
+
object-fit: cover;
|
|
175
|
+
background-size: cover;
|
|
176
|
+
}
|
|
177
|
+
.micl-card__headline-s,
|
|
178
|
+
.micl-card__headline-m,
|
|
179
|
+
.micl-card__headline-l {
|
|
180
|
+
grid-area: card-headline;
|
|
181
|
+
}
|
|
182
|
+
.micl-card__subhead {
|
|
183
|
+
grid-area: card-subhead;
|
|
184
|
+
}
|
|
185
|
+
.micl-card__supporting-text {
|
|
186
|
+
grid-area: card-supporting;
|
|
187
|
+
}
|
|
188
|
+
.micl-card__content {
|
|
189
|
+
grid-area: card-content;
|
|
190
|
+
}
|
|
191
|
+
}
|
|
170
192
|
|
|
171
193
|
.micl-card__image {
|
|
172
|
-
|
|
194
|
+
display: block;
|
|
195
|
+
inline-size: 100%;
|
|
173
196
|
border-radius: var(--md-sys-shape-corner-medium);
|
|
197
|
+
background-position: center;
|
|
198
|
+
background-repeat: no-repeat;
|
|
199
|
+
background-size: contain;
|
|
174
200
|
}
|
|
175
201
|
|
|
176
202
|
.micl-card__headline-s,
|
|
@@ -260,6 +286,7 @@
|
|
|
260
286
|
|
|
261
287
|
.micl-card__content {
|
|
262
288
|
box-sizing: border-box;
|
|
289
|
+
padding-block: var(--md-sys-card-content-padding-block) 0;
|
|
263
290
|
padding-inline: var(--md-sys-card-padding-inline);
|
|
264
291
|
background-color: inherit;
|
|
265
292
|
overflow: hidden;
|
|
@@ -161,9 +161,9 @@ dialog.micl-dialog-fullscreen {
|
|
|
161
161
|
color: var(--md-sys-color-on-surface);
|
|
162
162
|
}
|
|
163
163
|
.micl-dialog__icon {
|
|
164
|
-
width: 24px;
|
|
165
|
-
height: 24px;
|
|
166
|
-
font-size: 24px;
|
|
164
|
+
width: var(--md-sys-layout-icon-size, 24px);
|
|
165
|
+
height: var(--md-sys-layout-icon-size, 24px);
|
|
166
|
+
font-size: var(--md-sys-layout-icon-size, 24px);
|
|
167
167
|
color: var(--md-sys-color-secondary);
|
|
168
168
|
}
|
|
169
169
|
button {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
# Divider
|
|
2
|
-
This component implements the the [Material Design 3 Expressive Divider](https://m3.material.io/components/divider/overview) design.
|
|
2
|
+
This component implements the 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
|
|
|
@@ -30,8 +30,8 @@ The Divider component offers five CSS classes for different divider styles:
|
|
|
30
30
|
| --------- | ----------- |
|
|
31
31
|
| micl-divider | A standard, full-width divider |
|
|
32
32
|
| micl-divider-inset | Indented equally on both the left and right sides |
|
|
33
|
-
| micl-divider-inset
|
|
34
|
-
| micl-divider-inset
|
|
33
|
+
| micl-divider-inset-start | Indented only on the left (start) side |
|
|
34
|
+
| micl-divider-inset-end | Indented only on the right (end) side |
|
|
35
35
|
| micl-divider-vertical | A vertical divider |
|
|
36
36
|
|
|
37
37
|
## Customizations
|
|
@@ -25,50 +25,41 @@
|
|
|
25
25
|
--md-sys-divider-space: 4px;
|
|
26
26
|
}
|
|
27
27
|
body {
|
|
28
|
-
--md-sys-divider-color: var(--md-sys-color-outline-variant);
|
|
28
|
+
--md-sys-divider-color: var(--md-sys-color-outline-variant, gray);
|
|
29
29
|
}
|
|
30
30
|
|
|
31
|
-
.micl-divider
|
|
32
|
-
|
|
33
|
-
|
|
31
|
+
.micl-divider,
|
|
32
|
+
.micl-divider-inset,
|
|
33
|
+
.micl-divider-inset-start,
|
|
34
|
+
.micl-divider-inset-end {
|
|
35
|
+
inline-size: 100%;
|
|
36
|
+
block-size: 0;
|
|
34
37
|
margin-block: calc(var(--md-sys-divider-space, 4px) - 1px) var(--md-sys-divider-space, 4px);
|
|
35
38
|
margin-inline: 0;
|
|
36
39
|
border: 0;
|
|
37
|
-
border-block-start: var(--md-sys-divider-thickness, 1px) solid var(--md-sys-divider-color);
|
|
40
|
+
border-block-start: var(--md-sys-divider-thickness, 1px) solid var(--md-sys-divider-color, gray);
|
|
38
41
|
}
|
|
39
42
|
|
|
40
43
|
.micl-divider-inset {
|
|
41
|
-
|
|
42
|
-
height: 0;
|
|
43
|
-
margin-block: calc(var(--md-sys-divider-space, 4px) - 1px) var(--md-sys-divider-space, 4px);
|
|
44
|
+
inline-size: calc(100% - 2 * var(--md-sys-divider-inset-margin, 16px));
|
|
44
45
|
margin-inline: var(--md-sys-divider-inset-margin);
|
|
45
|
-
border: 0;
|
|
46
|
-
border-block-start: var(--md-sys-divider-thickness, 1px) solid var(--md-sys-divider-color);
|
|
47
46
|
}
|
|
48
47
|
|
|
49
|
-
.micl-divider-inset
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
margin-block: calc(var(--md-sys-divider-space, 4px) - 1px) var(--md-sys-divider-space, 4px);
|
|
53
|
-
margin-inline: var(--md-sys-divider-inset-margin) 0;
|
|
54
|
-
border: 0;
|
|
55
|
-
border-block-start: var(--md-sys-divider-thickness, 1px) solid var(--md-sys-divider-color);
|
|
48
|
+
.micl-divider-inset-start {
|
|
49
|
+
inline-size: calc(100% - var(--md-sys-divider-inset-margin, 16px));
|
|
50
|
+
margin-inline-start: var(--md-sys-divider-inset-margin, 16px);
|
|
56
51
|
}
|
|
57
52
|
|
|
58
|
-
.micl-divider-inset
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
margin-block: calc(var(--md-sys-divider-space, 4px) - 1px) var(--md-sys-divider-space, 4px);
|
|
62
|
-
margin-inline: 0 var(--md-sys-divider-inset-margin);
|
|
63
|
-
border: 0;
|
|
64
|
-
border-block-start: var(--md-sys-divider-thickness, 1px) solid var(--md-sys-divider-color);
|
|
53
|
+
.micl-divider-inset-end {
|
|
54
|
+
inline-size: calc(100% - var(--md-sys-divider-inset-margin, 16px));
|
|
55
|
+
margin-inline-end: var(--md-sys-divider-inset-margin, 16px);
|
|
65
56
|
}
|
|
66
57
|
|
|
67
58
|
.micl-divider-vertical {
|
|
68
|
-
min-
|
|
69
|
-
|
|
59
|
+
min-block-size: 100%;
|
|
60
|
+
inline-size: 0;
|
|
70
61
|
margin-block: 0;
|
|
71
62
|
margin-inline: calc(2 * var(--md-sys-divider-space, 4px));
|
|
72
63
|
border: 0;
|
|
73
|
-
border-inline-start: var(--md-sys-divider-thickness, 1px) solid var(--md-sys-divider-color);
|
|
64
|
+
border-inline-start: var(--md-sys-divider-thickness, 1px) solid var(--md-sys-divider-color, gray);
|
|
74
65
|
}
|
|
@@ -151,7 +151,7 @@ button.micl-iconbutton-outlined-s {
|
|
|
151
151
|
inline-size: var(--micl-width);
|
|
152
152
|
min-inline-size: var(--micl-width);
|
|
153
153
|
block-size: var(--micl-height);
|
|
154
|
-
font-size: 24px;
|
|
154
|
+
font-size: var(--md-sys-layout-icon-size, 24px);
|
|
155
155
|
|
|
156
156
|
&::before {
|
|
157
157
|
content: "";
|
|
@@ -202,7 +202,7 @@ button.micl-iconbutton-outlined-m {
|
|
|
202
202
|
inline-size: var(--micl-width);
|
|
203
203
|
min-inline-size: var(--micl-width);
|
|
204
204
|
block-size: var(--micl-height);
|
|
205
|
-
font-size: 24px;
|
|
205
|
+
font-size: var(--md-sys-layout-icon-size, 24px);
|
|
206
206
|
|
|
207
207
|
&.micl-button--toggle.micl-button--selected {
|
|
208
208
|
border-radius: var(--md-sys-shape-corner-large);
|
|
@@ -308,8 +308,8 @@
|
|
|
308
308
|
}
|
|
309
309
|
|
|
310
310
|
.micl-list-item__icon {
|
|
311
|
-
min-width: 24px;
|
|
312
|
-
font-size: 24px;
|
|
311
|
+
min-width: var(--md-sys-layout-icon-size, 24px);
|
|
312
|
+
font-size: var(--md-sys-layout-icon-size, 24px);
|
|
313
313
|
font-variation-settings: 'FILL' 0;
|
|
314
314
|
color: var(--md-sys-color-on-surface-variant);
|
|
315
315
|
transition: font-variation-settings var(--md-sys-list-motion-duration) linear;
|
|
@@ -43,6 +43,8 @@
|
|
|
43
43
|
--md-sys-navigationrail-motion-duration-reverse: #{motion.$md-sys-motion-expressive-default-spatial-duration};
|
|
44
44
|
--md-sys-navigationrail-morph-duration: #{motion.$md-sys-motion-expressive-fast-spatial-duration};
|
|
45
45
|
--md-sys-navigationrail-morph-duration-reverse: #{motion.$md-sys-motion-expressive-fast-spatial-duration};
|
|
46
|
+
--md-sys-badge-inline-offset: -16px;
|
|
47
|
+
--md-sys-badge-block-offset: 4px;
|
|
46
48
|
|
|
47
49
|
box-sizing: border-box;
|
|
48
50
|
display: flex;
|
|
@@ -91,6 +93,7 @@
|
|
|
91
93
|
|
|
92
94
|
box-sizing: border-box;
|
|
93
95
|
display: flex;
|
|
96
|
+
position: relative;
|
|
94
97
|
flex-direction: column;
|
|
95
98
|
align-items: center;
|
|
96
99
|
block-size: var(--md-sys-navigationrail-item-height);
|
|
@@ -115,8 +118,8 @@
|
|
|
115
118
|
&> .micl-navigationrail__icon {
|
|
116
119
|
--micl-ripple: 1;
|
|
117
120
|
|
|
118
|
-
font-size: 24px;
|
|
119
|
-
inline-size: 24px;
|
|
121
|
+
font-size: var(--md-sys-layout-icon-size, 24px);
|
|
122
|
+
inline-size: var(--md-sys-layout-icon-size, 24px);
|
|
120
123
|
margin: 0;
|
|
121
124
|
padding-block: 4px;
|
|
122
125
|
padding-inline: 16px;
|
|
@@ -173,7 +176,6 @@ nav.micl-navigationrail:has(> .micl-navigationrail__headline .micl-button--toggl
|
|
|
173
176
|
row-gap: 0px;
|
|
174
177
|
|
|
175
178
|
&> label.micl-navigationrail__item {
|
|
176
|
-
position: relative;
|
|
177
179
|
flex-direction: row;
|
|
178
180
|
inline-size: fit-content;
|
|
179
181
|
|
|
@@ -29,7 +29,7 @@ A radio button can be disabled by adding the `disabled` attribute to the `<input
|
|
|
29
29
|
|
|
30
30
|
The Radio Button 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.
|
|
31
31
|
|
|
32
|
-
|
|
32
|
+
The component applies `cursor: pointer` and the color role **on surface** to the `<label>` element immediately preceding or following an `<input type="radio">` with the `micl-radio` class. You are encouraged to customize these CSS settings to match your design system.
|
|
33
33
|
|
|
34
34
|
## Customizations
|
|
35
35
|
You can customize the appearance of the Radio Button 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 radio buttons.
|
|
@@ -62,7 +62,8 @@
|
|
|
62
62
|
background-color: var(--md-sys-color-surface-container);
|
|
63
63
|
box-shadow: var(--md-sys-elevation-level2);
|
|
64
64
|
opacity: 0;
|
|
65
|
-
overflow: hidden;
|
|
65
|
+
overflow-x: hidden;
|
|
66
|
+
overflow-y: auto;
|
|
66
67
|
transform: scaleY(0);
|
|
67
68
|
transform-origin: var(--md-sys-select-picker-origin);
|
|
68
69
|
transition:
|
|
@@ -130,7 +131,9 @@
|
|
|
130
131
|
content: attr(aria-description);
|
|
131
132
|
display: block;
|
|
132
133
|
color: var(--md-sys-color-on-surface-variant);
|
|
133
|
-
|
|
134
|
+
overflow-x: hidden;
|
|
135
|
+
text-overflow: ellipsis;
|
|
136
|
+
white-space: nowrap;
|
|
134
137
|
}
|
|
135
138
|
&::checkmark {
|
|
136
139
|
color: var(--md-sys-color-on-surface-variant);
|
|
@@ -261,7 +261,7 @@ input[type=range].micl-slider-xl {
|
|
|
261
261
|
|
|
262
262
|
.micl-slider__container {
|
|
263
263
|
display: grid;
|
|
264
|
-
grid-template-areas: "
|
|
264
|
+
grid-template-areas: "slider-icon";
|
|
265
265
|
flex-shrink: 0;
|
|
266
266
|
align-items: center;
|
|
267
267
|
justify-items: flex-start;
|
|
@@ -269,16 +269,16 @@ input[type=range].micl-slider-xl {
|
|
|
269
269
|
|
|
270
270
|
&:has(> .micl-slider-m,> .micl-slider-l,> .micl-slider-xl) {
|
|
271
271
|
.micl-slider__icon {
|
|
272
|
-
grid-area:
|
|
272
|
+
grid-area: slider-icon;
|
|
273
273
|
inset: 0;
|
|
274
274
|
margin: 6px;
|
|
275
|
-
font-size: 24px;
|
|
275
|
+
font-size: var(--md-sys-layout-icon-size, 24px);
|
|
276
276
|
color: var(--md-sys-color-on-primary);
|
|
277
277
|
z-index: 1;
|
|
278
278
|
}
|
|
279
279
|
}
|
|
280
280
|
&> input[type=range] {
|
|
281
|
-
grid-area:
|
|
281
|
+
grid-area: slider-icon;
|
|
282
282
|
}
|
|
283
283
|
.micl-slider__icon:has(+ input[type=range].micl-slider-xl),
|
|
284
284
|
input[type=range].micl-slider-xl + .micl-slider__icon {
|
|
@@ -0,0 +1,85 @@
|
|
|
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 '../../layout';
|
|
23
|
+
@use '../../styles/motion';
|
|
24
|
+
|
|
25
|
+
:root {
|
|
26
|
+
--md-sys-stepper-thickness: 1px;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.micl-stepper {
|
|
30
|
+
--md-sys-stepper-motion-spatial: #{motion.$md-sys-motion-expressive-slow-spatial};
|
|
31
|
+
--md-sys-stepper-motion-duration: #{motion.$md-sys-motion-expressive-slow-spatial-duration};
|
|
32
|
+
--md-sys-stepper-motion-duration-reverse: #{motion.$md-sys-motion-expressive-default-spatial-duration};
|
|
33
|
+
|
|
34
|
+
box-sizing: border-box;
|
|
35
|
+
display: flex;
|
|
36
|
+
flex-direction: column;
|
|
37
|
+
row-gap: var(--md-sys-layout-padding-xl, 24px);
|
|
38
|
+
background-color: inherit;
|
|
39
|
+
|
|
40
|
+
.micl-stepper__steps {
|
|
41
|
+
display: grid;
|
|
42
|
+
grid-template-areas: "stepper-steps";
|
|
43
|
+
overflow-x: hidden;
|
|
44
|
+
background-color: inherit;
|
|
45
|
+
|
|
46
|
+
.micl-stepper__step {
|
|
47
|
+
grid-area: stepper-steps;
|
|
48
|
+
display: flex;
|
|
49
|
+
visibility: hidden;
|
|
50
|
+
flex-direction: column;
|
|
51
|
+
justify-content: space-between;
|
|
52
|
+
opacity: 0%;
|
|
53
|
+
background-color: inherit;
|
|
54
|
+
transform: translateX(100%);
|
|
55
|
+
transition:
|
|
56
|
+
opacity var(--md-sys-stepper-motion-duration) linear,
|
|
57
|
+
transform var(--md-sys-stepper-motion-duration) var(--md-sys-stepper-motion-spatial);
|
|
58
|
+
|
|
59
|
+
&:has(~ .micl-stepper__step--current) {
|
|
60
|
+
transform: translateX(-100%);
|
|
61
|
+
}
|
|
62
|
+
&.micl-stepper__step--tocurrent {
|
|
63
|
+
visibility: visible;
|
|
64
|
+
}
|
|
65
|
+
&.micl-stepper__step--current {
|
|
66
|
+
visibility: visible;
|
|
67
|
+
opacity: 100%;
|
|
68
|
+
transform: translateX(0%);
|
|
69
|
+
}
|
|
70
|
+
&.micl-stepper__step--fromcurrent {
|
|
71
|
+
visibility: visible;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
.micl-stepper__content {
|
|
75
|
+
box-sizing: border-box;
|
|
76
|
+
padding-inline: var(--md-sys-stepper-padding-inline);
|
|
77
|
+
background-color: inherit;
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
.micl-stepper__actions {
|
|
82
|
+
display: flex;
|
|
83
|
+
justify-content: space-between;
|
|
84
|
+
}
|
|
85
|
+
}
|