@expressivecss/expressive 0.3.0 → 0.5.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/CHANGELOG.md +96 -0
- package/README.md +4 -9
- package/dist/css/expressive.css +3183 -2150
- package/dist/css/expressive.css.map +1 -1
- package/dist/css/expressive.min.css +1 -1
- package/dist/css/expressive.min.css.map +1 -1
- package/dist/js/expressive.cjs +1254 -1567
- package/dist/js/expressive.cjs.map +4 -4
- package/dist/js/expressive.js +1254 -1567
- package/dist/js/expressive.js.map +4 -4
- package/dist/js/expressive.min.js +12 -22
- package/dist/js/expressive.min.js.map +4 -4
- package/dist/js/expressive.mjs +1254 -1568
- package/dist/js/expressive.mjs.map +4 -4
- package/dist/types/behaviors/bottomSheets.d.ts +18 -0
- package/dist/types/behaviors/sideSheets.d.ts +18 -0
- package/dist/types/components/autocomplete.d.ts +13 -20
- package/dist/types/components/buttons.d.ts +2 -2
- package/dist/types/components/cards.d.ts +3 -6
- package/dist/types/components/carousel.d.ts +3 -3
- package/dist/types/components/characterCounter.d.ts +3 -5
- package/dist/types/components/chips.d.ts +2 -2
- package/dist/types/components/datepicker.d.ts +2 -8
- package/dist/types/components/index.d.ts +3 -6
- package/dist/types/components/lightbox.d.ts +2 -2
- package/dist/types/components/{dropdown.d.ts → menu.d.ts} +48 -38
- package/dist/types/components/navigationRail.d.ts +53 -0
- package/dist/types/components/parallax.d.ts +2 -8
- package/dist/types/components/range.d.ts +5 -2
- package/dist/types/components/registry.d.ts +7 -19
- package/dist/types/components/scrollspy.d.ts +26 -50
- package/dist/types/components/select.d.ts +28 -14
- package/dist/types/components/sidenav.d.ts +40 -55
- package/dist/types/components/slider.d.ts +2 -2
- package/dist/types/components/{toasts.d.ts → snackbar.d.ts} +28 -25
- package/dist/types/components/tabs.d.ts +2 -2
- package/dist/types/components/timepicker.d.ts +2 -4
- package/dist/types/components/tooltip.d.ts +2 -2
- package/dist/types/core/component.d.ts +4 -4
- package/dist/types/index.d.ts +3 -1
- package/package.json +4 -3
- package/src/sass/README.md +13 -15
- package/src/sass/abstracts/_breakpoints.scss +14 -19
- package/src/sass/abstracts/_mixins.scss +3 -3
- package/src/sass/abstracts/_variables.scss +27 -23
- package/src/sass/base/_global.scss +1 -1
- package/src/sass/base/_grid.scss +64 -133
- package/src/sass/base/_index.scss +1 -1
- package/src/sass/components/_badges.scss +76 -61
- package/src/sass/components/_bottom-sheet.scss +137 -0
- package/src/sass/components/_buttons.scss +22 -54
- package/src/sass/components/_cards.scss +54 -127
- package/src/sass/components/_carousel.scss +4 -6
- package/src/sass/components/_chips.scss +6 -5
- package/src/sass/components/_datepicker.scss +1 -15
- package/src/sass/components/_dialog.scss +268 -0
- package/src/sass/components/_index.scss +9 -7
- package/src/sass/components/_list.scss +253 -0
- package/src/sass/components/_menu.scss +341 -0
- package/src/sass/components/_navbar.scss +68 -117
- package/src/sass/components/_navigation-bar.scss +165 -0
- package/src/sass/components/_navigation-rail.scss +308 -0
- package/src/sass/components/_page-footer.scss +138 -15
- package/src/sass/components/_parallax.scss +7 -28
- package/src/sass/components/_preloader.scss +145 -300
- package/src/sass/components/_scrollspy.scss +18 -0
- package/src/sass/components/_side-sheet.scss +193 -0
- package/src/sass/components/_sidenav.scss +281 -146
- package/src/sass/components/{_toast.scss → _snackbar.scss} +43 -43
- package/src/sass/components/_table_of_contents.scss +30 -14
- package/src/sass/components/_tabs.scss +43 -50
- package/src/sass/components/_toolbar.scss +93 -27
- package/src/sass/components/_tooltip.scss +5 -10
- package/src/sass/components/_transitions.scss +0 -5
- package/src/sass/components/forms/_fieldset.scss +1 -1
- package/src/sass/components/forms/_index.scss +0 -5
- package/src/sass/components/forms/_input-fields.scss +52 -55
- package/src/sass/components/forms/_range.scss +423 -98
- package/src/sass/components/forms/_select.scss +177 -60
- package/src/sass/components/forms/_switches.scss +21 -8
- package/src/sass/tokens/_reference.scss +37 -13
- package/src/sass/tokens/_theme.scss +5 -13
- package/src/sass/utilities/_colors.scss +16 -74
- package/src/sass/utilities/_helpers.scss +1 -3
- package/src/sass/utilities/_typescale.scss +0 -5
- package/src/sass/utilities/_visibility.scss +10 -2
- package/dist/types/components/collapsible.d.ts +0 -96
- package/dist/types/components/modal.d.ts +0 -45
- package/dist/types/components/pushpin.d.ts +0 -51
- package/dist/types/components/tapTarget.d.ts +0 -57
- package/src/sass/components/_collapsible.scss +0 -181
- package/src/sass/components/_collection.scss +0 -198
- package/src/sass/components/_dropdown.scss +0 -129
- package/src/sass/components/_modal.scss +0 -208
- package/src/sass/components/_pushpin.scss +0 -11
- package/src/sass/components/_tapTarget.scss +0 -191
|
@@ -18,10 +18,21 @@
|
|
|
18
18
|
// and IE, and `screen` alone excludes print anyway - which these rules never
|
|
19
19
|
// wanted to do, since a hidden element should stay hidden on paper.
|
|
20
20
|
|
|
21
|
+
// Boundaries, not the size of the screen they target. Column prefixes
|
|
22
|
+
// s / m / l / xl / xxl sit on these in order; there is no `medium` key
|
|
23
|
+
// because the tablet class is `m` and the mixin name is the boundary.
|
|
24
|
+
//
|
|
25
|
+
// M3 window-size classes, for the ones that line up:
|
|
26
|
+
// compact width < 600 below "small"
|
|
27
|
+
// medium 600 ≤ width < 840 (we do not split 840 out of "small")
|
|
28
|
+
// expanded 840 ≤ width < 1200 "large" is 993, close enough
|
|
29
|
+
// large 1200 ≤ width < 1600 "xlarge"
|
|
30
|
+
// extra-large width ≥ 1600 "xxlarge"
|
|
21
31
|
$breakpoints: (
|
|
22
|
-
"small": 601px,
|
|
23
|
-
"large": 993px,
|
|
24
|
-
"xlarge": 1201px,
|
|
32
|
+
"small": 601px, // phone -> tablet
|
|
33
|
+
"large": 993px, // tablet -> desktop
|
|
34
|
+
"xlarge": 1201px, // desktop -> large desktop
|
|
35
|
+
"xxlarge": 1601px, // large -> extra-large / widescreen
|
|
25
36
|
) !default;
|
|
26
37
|
|
|
27
38
|
@function breakpoint($name) {
|
|
@@ -51,19 +62,3 @@ $breakpoints: (
|
|
|
51
62
|
@content;
|
|
52
63
|
}
|
|
53
64
|
}
|
|
54
|
-
|
|
55
|
-
// Deprecated: the interpolated-string breakpoints.
|
|
56
|
-
//
|
|
57
|
-
// Kept so a downstream `@media #{$medium-and-up}` keeps compiling - the
|
|
58
|
-
// framework itself no longer uses them. Values are now range syntax, so the
|
|
59
|
-
// queries they produce match the mixins above exactly. Prefer the mixins.
|
|
60
|
-
$small-screen-up: breakpoint("small") !default;
|
|
61
|
-
$medium-screen-up: breakpoint("large") !default;
|
|
62
|
-
$large-screen-up: breakpoint("xlarge") !default;
|
|
63
|
-
|
|
64
|
-
$medium-and-up: "(width >= #{breakpoint('small')})" !default;
|
|
65
|
-
$large-and-up: "(width >= #{breakpoint('large')})" !default;
|
|
66
|
-
$extra-large-and-up: "(width >= #{breakpoint('xlarge')})" !default;
|
|
67
|
-
$small-and-down: "(width < #{breakpoint('small')})" !default;
|
|
68
|
-
$medium-and-down: "(width < #{breakpoint('large')})" !default;
|
|
69
|
-
$medium-only: "(#{breakpoint('small')} <= width < #{breakpoint('large')})" !default;
|
|
@@ -89,18 +89,18 @@
|
|
|
89
89
|
|
|
90
90
|
@mixin btn-elevated {
|
|
91
91
|
color: var(--md-sys-color-primary);
|
|
92
|
-
background-color: var(--md-sys-color-surface);
|
|
92
|
+
background-color: var(--md-sys-color-surface-container-low);
|
|
93
93
|
@include z-depth("1");
|
|
94
94
|
|
|
95
95
|
&:hover {
|
|
96
96
|
@include z-depth("2");
|
|
97
|
-
background-color: color-mix(in oklab, var(--md-sys-color-primary) 8%, var(--md-sys-color-surface));
|
|
97
|
+
background-color: color-mix(in oklab, var(--md-sys-color-primary) 8%, var(--md-sys-color-surface-container-low));
|
|
98
98
|
}
|
|
99
99
|
|
|
100
100
|
&:active,
|
|
101
101
|
&:focus {
|
|
102
102
|
@include z-depth("1");
|
|
103
|
-
background-color: color-mix(in oklab, var(--md-sys-color-primary) 10%, var(--md-sys-color-surface));
|
|
103
|
+
background-color: color-mix(in oklab, var(--md-sys-color-primary) 10%, var(--md-sys-color-surface-container-low));
|
|
104
104
|
}
|
|
105
105
|
|
|
106
106
|
@include focus-visible();
|
|
@@ -1,6 +1,3 @@
|
|
|
1
|
-
// TypeScale
|
|
2
|
-
$md_sys_typescale_body-large_size: 16px;
|
|
3
|
-
|
|
4
1
|
@use "sass:math";
|
|
5
2
|
|
|
6
3
|
// Colors
|
|
@@ -11,23 +8,39 @@ $md_sys_typescale_body-large_size: 16px;
|
|
|
11
8
|
// value from it: this link color. Everything now comes from --md-sys-color-*.
|
|
12
9
|
$link-color: var(--md-sys-color-primary) !default;
|
|
13
10
|
|
|
14
|
-
//
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
11
|
+
// M3 Expressive color roles. The live tokens are --md-sys-color-#{role}.
|
|
12
|
+
// 26 standard roles in six groups (primary, secondary, tertiary, error,
|
|
13
|
+
// surface, outline), plus optional add-ons (fixed accents, the surface
|
|
14
|
+
// container scale) and four legacy aliases (background, on-background,
|
|
15
|
+
// surface-variant, surface-tint). Consumed by tokens/_theme.scss and
|
|
16
|
+
// utilities/_colors.scss so the token layer and the utility classes
|
|
17
|
+
// cannot drift.
|
|
18
|
+
$sys-color-roles: (
|
|
19
|
+
"primary", "on-primary", "primary-container", "on-primary-container",
|
|
20
|
+
"primary-fixed", "primary-fixed-dim", "on-primary-fixed", "on-primary-fixed-variant",
|
|
21
|
+
"secondary", "on-secondary", "secondary-container", "on-secondary-container",
|
|
22
|
+
"secondary-fixed", "secondary-fixed-dim", "on-secondary-fixed", "on-secondary-fixed-variant",
|
|
23
|
+
"tertiary", "on-tertiary", "tertiary-container", "on-tertiary-container",
|
|
24
|
+
"tertiary-fixed", "tertiary-fixed-dim", "on-tertiary-fixed", "on-tertiary-fixed-variant",
|
|
25
|
+
"error", "on-error", "error-container", "on-error-container",
|
|
26
|
+
"surface", "on-surface", "on-surface-variant",
|
|
27
|
+
"surface-dim", "surface-bright",
|
|
28
|
+
"surface-container-lowest", "surface-container-low", "surface-container",
|
|
29
|
+
"surface-container-high", "surface-container-highest",
|
|
30
|
+
"outline", "outline-variant",
|
|
31
|
+
"inverse-surface", "inverse-on-surface", "inverse-primary",
|
|
32
|
+
"scrim", "shadow",
|
|
33
|
+
"background", "on-background", "surface-variant", "surface-tint"
|
|
34
|
+
) !default;
|
|
35
|
+
|
|
36
|
+
// Menu
|
|
37
|
+
$menu-item-height: 50px !default;
|
|
24
38
|
|
|
25
39
|
// Media query ranges now live in abstracts/_breakpoints.scss, which states
|
|
26
40
|
// each boundary once and emits range syntax - see the note there about why
|
|
27
41
|
// the 600.99px / 992.99px / 1200.99px values are gone.
|
|
28
42
|
|
|
29
43
|
// Grid
|
|
30
|
-
$num-cols: 12 !default;
|
|
31
44
|
$gutter-width: 1.5rem !default;
|
|
32
45
|
$element-top-margin: math.div($gutter-width, 3) !default;
|
|
33
46
|
$element-bottom-margin: math.div($gutter-width * 2, 3) !default;
|
|
@@ -40,15 +53,6 @@ $text-color: var(--md-sys-color-on-background) !default;
|
|
|
40
53
|
// derived from it, so the two cannot drift.
|
|
41
54
|
$root-font-size: 14px !default;
|
|
42
55
|
|
|
43
|
-
// Legacy rem heading ladder. Headings now consume --md-sys-typescale-*
|
|
44
|
-
// (see base/_typography.scss). Kept so existing Sass overrides still compile.
|
|
45
|
-
$h1-fontsize: 4.2rem !default;
|
|
46
|
-
$h2-fontsize: 3.56rem !default;
|
|
47
|
-
$h3-fontsize: 2.92rem !default;
|
|
48
|
-
$h4-fontsize: 2.28rem !default;
|
|
49
|
-
$h5-fontsize: 1.64rem !default;
|
|
50
|
-
$h6-fontsize: 1.15rem !default;
|
|
51
|
-
|
|
52
56
|
// Flow text: font-size interpolates between these two across the viewport
|
|
53
57
|
// range below. This used to be a @while loop emitting 21 media queries.
|
|
54
58
|
$flow-text-min: 1.2rem !default;
|
package/src/sass/base/_grid.scss
CHANGED
|
@@ -1,166 +1,97 @@
|
|
|
1
|
-
@use "sass:math";
|
|
2
1
|
@use "../abstracts" as *;
|
|
3
2
|
|
|
3
|
+
// 12-column CSS Grid. Prefixes map onto $breakpoints; s is the mobile
|
|
4
|
+
// default (no query). xxl is M3 extra-large — the class that actually
|
|
5
|
+
// sees a 4K or ultrawide window, since xlarge starts at 1201px.
|
|
6
|
+
$grid-columns: 12;
|
|
7
|
+
$grid-prefixes: (
|
|
8
|
+
"s": null,
|
|
9
|
+
"m": "small",
|
|
10
|
+
"l": "large",
|
|
11
|
+
"xl": "xlarge",
|
|
12
|
+
"xxl": "xxlarge",
|
|
13
|
+
);
|
|
14
|
+
|
|
15
|
+
@mixin grid-spans($prefix) {
|
|
16
|
+
@for $i from 1 through $grid-columns {
|
|
17
|
+
.#{$prefix}#{$i} {
|
|
18
|
+
grid-column: auto / span $i;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
@for $i from 1 through ($grid-columns - 1) {
|
|
22
|
+
.offset-#{$prefix}#{$i} {
|
|
23
|
+
grid-column-start: $i + 1;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
|
|
4
28
|
.container {
|
|
29
|
+
--md-comp-container-max-width: 1280px;
|
|
30
|
+
--md-comp-container-width: 90%;
|
|
5
31
|
margin: 0 auto;
|
|
6
|
-
|
|
7
|
-
width:
|
|
32
|
+
width: var(--md-comp-container-width);
|
|
33
|
+
max-width: var(--md-comp-container-max-width);
|
|
8
34
|
}
|
|
9
35
|
|
|
10
36
|
@include bp-up("small") {
|
|
11
37
|
.container {
|
|
12
|
-
width: 85%;
|
|
38
|
+
--md-comp-container-width: 85%;
|
|
13
39
|
}
|
|
14
40
|
}
|
|
15
41
|
|
|
16
42
|
@include bp-up("large") {
|
|
17
43
|
.container {
|
|
18
|
-
width: 70%;
|
|
44
|
+
--md-comp-container-width: 70%;
|
|
19
45
|
}
|
|
20
46
|
}
|
|
21
47
|
|
|
22
|
-
|
|
23
|
-
|
|
48
|
+
// The 1280 cap is what made 4K look empty: 70% of 3840 is 2688, then
|
|
49
|
+
// max-width snapped it back to 1280. Extra-large lifts the cap to 1920
|
|
50
|
+
// (binds once 75% of the viewport exceeds it, around 2560) and opens
|
|
51
|
+
// the measure a little so QHD lands on that cap instead of 1792.
|
|
52
|
+
@include bp-up("xxlarge") {
|
|
53
|
+
.container {
|
|
54
|
+
--md-comp-container-width: 75%;
|
|
55
|
+
--md-comp-container-max-width: 1920px;
|
|
56
|
+
}
|
|
24
57
|
}
|
|
25
58
|
|
|
26
|
-
//
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
right: auto;
|
|
59
|
+
// Dashboards / media that should keep growing. `.wide` caps at 2400
|
|
60
|
+
// (binds around 3200). `.max` is the percentage with no cap.
|
|
61
|
+
.container.wide {
|
|
62
|
+
--md-comp-container-max-width: 2400px;
|
|
31
63
|
}
|
|
32
64
|
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
}
|
|
40
|
-
&.push-#{$size}#{$i} {
|
|
41
|
-
left: $perc;
|
|
42
|
-
}
|
|
65
|
+
.container.max {
|
|
66
|
+
--md-comp-container-max-width: none;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
.section {
|
|
70
|
+
padding: 1rem 0;
|
|
43
71
|
}
|
|
44
72
|
|
|
45
73
|
body {
|
|
46
|
-
--gap-size:
|
|
74
|
+
--gap-size: #{$gutter-width};
|
|
75
|
+
|
|
76
|
+
@include bp-up("xxlarge") {
|
|
77
|
+
--gap-size: 2rem;
|
|
78
|
+
}
|
|
47
79
|
}
|
|
48
80
|
|
|
49
81
|
.row {
|
|
50
82
|
display: grid;
|
|
51
|
-
grid-template-columns: repeat(
|
|
83
|
+
grid-template-columns: repeat(#{$grid-columns}, 1fr);
|
|
52
84
|
gap: var(--gap-size);
|
|
53
85
|
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
.s8 { grid-column: auto / span 8; }
|
|
63
|
-
.s9 { grid-column: auto / span 9; }
|
|
64
|
-
.s10 { grid-column: auto / span 10; }
|
|
65
|
-
.s11 { grid-column: auto / span 11; }
|
|
66
|
-
.s12 { grid-column: auto / span 12; }
|
|
67
|
-
|
|
68
|
-
.offset-s1 { grid-column-start: 3; }
|
|
69
|
-
.offset-s2 { grid-column-start: 2; }
|
|
70
|
-
.offset-s3 { grid-column-start: 4; }
|
|
71
|
-
.offset-s4 { grid-column-start: 5; }
|
|
72
|
-
.offset-s5 { grid-column-start: 6; }
|
|
73
|
-
.offset-s6 { grid-column-start: 7; }
|
|
74
|
-
.offset-s7 { grid-column-start: 8; }
|
|
75
|
-
.offset-s8 { grid-column-start: 9; }
|
|
76
|
-
.offset-s9 { grid-column-start: 10; }
|
|
77
|
-
.offset-s10 { grid-column-start: 11; }
|
|
78
|
-
.offset-s11 { grid-column-start: 12; }
|
|
79
|
-
|
|
80
|
-
//--- M
|
|
81
|
-
@include bp-up("small") {
|
|
82
|
-
.m1 { grid-column: auto / span 1; }
|
|
83
|
-
.m2 { grid-column: auto / span 2; }
|
|
84
|
-
.m3 { grid-column: auto / span 3; }
|
|
85
|
-
.m4 { grid-column: auto / span 4; }
|
|
86
|
-
.m5 { grid-column: auto / span 5; }
|
|
87
|
-
.m6 { grid-column: auto / span 6; }
|
|
88
|
-
.m7 { grid-column: auto / span 7; }
|
|
89
|
-
.m8 { grid-column: auto / span 8; }
|
|
90
|
-
.m9 { grid-column: auto / span 9; }
|
|
91
|
-
.m10 { grid-column: auto / span 10; }
|
|
92
|
-
.m11 { grid-column: auto / span 11; }
|
|
93
|
-
.m12 { grid-column: auto / span 12; }
|
|
94
|
-
|
|
95
|
-
.offset-m1 { grid-column-start: 2; }
|
|
96
|
-
.offset-m2 { grid-column-start: 3; }
|
|
97
|
-
.offset-m3 { grid-column-start: 4; }
|
|
98
|
-
.offset-m4 { grid-column-start: 5; }
|
|
99
|
-
.offset-m5 { grid-column-start: 6; }
|
|
100
|
-
.offset-m6 { grid-column-start: 7; }
|
|
101
|
-
.offset-m7 { grid-column-start: 8; }
|
|
102
|
-
.offset-m8 { grid-column-start: 9; }
|
|
103
|
-
.offset-m9 { grid-column-start: 10; }
|
|
104
|
-
.offset-m10 { grid-column-start: 11; }
|
|
105
|
-
.offset-m11 { grid-column-start: 12; }
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
//--- L
|
|
109
|
-
@include bp-up("large") {
|
|
110
|
-
.l1 { grid-column: auto / span 1; }
|
|
111
|
-
.l2 { grid-column: auto / span 2; }
|
|
112
|
-
.l3 { grid-column: auto / span 3; }
|
|
113
|
-
.l4 { grid-column: auto / span 4; }
|
|
114
|
-
.l5 { grid-column: auto / span 5; }
|
|
115
|
-
.l6 { grid-column: auto / span 6; }
|
|
116
|
-
.l7 { grid-column: auto / span 7; }
|
|
117
|
-
.l8 { grid-column: auto / span 8; }
|
|
118
|
-
.l9 { grid-column: auto / span 9; }
|
|
119
|
-
.l10 { grid-column: auto / span 10; }
|
|
120
|
-
.l11 { grid-column: auto / span 11; }
|
|
121
|
-
.l12 { grid-column: auto / span 12; }
|
|
122
|
-
|
|
123
|
-
.offset-l1 { grid-column-start: 2; }
|
|
124
|
-
.offset-l2 { grid-column-start: 3; }
|
|
125
|
-
.offset-l3 { grid-column-start: 4; }
|
|
126
|
-
.offset-l4 { grid-column-start: 5; }
|
|
127
|
-
.offset-l5 { grid-column-start: 6; }
|
|
128
|
-
.offset-l6 { grid-column-start: 7; }
|
|
129
|
-
.offset-l7 { grid-column-start: 8; }
|
|
130
|
-
.offset-l8 { grid-column-start: 9; }
|
|
131
|
-
.offset-l9 { grid-column-start: 10; }
|
|
132
|
-
.offset-l10 { grid-column-start: 11; }
|
|
133
|
-
.offset-l11 { grid-column-start: 12; }
|
|
86
|
+
@each $prefix, $bp in $grid-prefixes {
|
|
87
|
+
@if $bp == null {
|
|
88
|
+
@include grid-spans($prefix);
|
|
89
|
+
} @else {
|
|
90
|
+
@include bp-up($bp) {
|
|
91
|
+
@include grid-spans($prefix);
|
|
92
|
+
}
|
|
93
|
+
}
|
|
134
94
|
}
|
|
135
|
-
|
|
136
|
-
//--- XL
|
|
137
|
-
@include bp-up("xlarge") {
|
|
138
|
-
.xl1 { grid-column: auto / span 1; }
|
|
139
|
-
.xl2 { grid-column: auto / span 2; }
|
|
140
|
-
.xl3 { grid-column: auto / span 3; }
|
|
141
|
-
.xl4 { grid-column: auto / span 4; }
|
|
142
|
-
.xl5 { grid-column: auto / span 5; }
|
|
143
|
-
.xl6 { grid-column: auto / span 6; }
|
|
144
|
-
.xl7 { grid-column: auto / span 7; }
|
|
145
|
-
.xl8 { grid-column: auto / span 8; }
|
|
146
|
-
.xl9 { grid-column: auto / span 9; }
|
|
147
|
-
.xl10 { grid-column: auto / span 10; }
|
|
148
|
-
.xl11 { grid-column: auto / span 11; }
|
|
149
|
-
.xl12 { grid-column: auto / span 12; }
|
|
150
|
-
|
|
151
|
-
.offset-xl1 { grid-column-start: 2; }
|
|
152
|
-
.offset-xl2 { grid-column-start: 3; }
|
|
153
|
-
.offset-xl3 { grid-column-start: 4; }
|
|
154
|
-
.offset-xl4 { grid-column-start: 5; }
|
|
155
|
-
.offset-xl5 { grid-column-start: 6; }
|
|
156
|
-
.offset-xl6 { grid-column-start: 7; }
|
|
157
|
-
.offset-xl7 { grid-column-start: 8; }
|
|
158
|
-
.offset-xl8 { grid-column-start: 9; }
|
|
159
|
-
.offset-xl9 { grid-column-start: 10; }
|
|
160
|
-
.offset-xl10 { grid-column-start: 11; }
|
|
161
|
-
.offset-xl11 { grid-column-start: 12; }
|
|
162
|
-
}
|
|
163
|
-
|
|
164
95
|
}
|
|
165
96
|
|
|
166
97
|
//--- Gap
|
|
@@ -1,78 +1,93 @@
|
|
|
1
1
|
@use "../abstracts" as *;
|
|
2
2
|
|
|
3
|
-
//
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
3
|
+
// Badge. Notifications, counts, or status on navigation items and icons.
|
|
4
|
+
//
|
|
5
|
+
// Anatomy is the HTML: a span.badge. Empty is the small dot; text is
|
|
6
|
+
// the large labelled variant. Nest the badge in the icon to anchor it
|
|
7
|
+
// at the upper trailing edge of the 24dp glyph. In a list or drawer
|
|
8
|
+
// row, a trailing .badge stays in flow.
|
|
9
|
+
//
|
|
10
|
+
// Tokens follow https://m3.material.io/components/badges/specs
|
|
11
|
+
// color error / on-error (the default mapping)
|
|
12
|
+
// small 6dp circle, no label
|
|
13
|
+
// large 16dp stadium, label-small, 4dp inset
|
|
14
|
+
// max four characters, including +
|
|
7
15
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
height: var(--bagde-height);
|
|
16
|
-
color: var(--md-sys-color-on-surface-variant);
|
|
17
|
-
float: right;
|
|
18
|
-
box-sizing: border-box;
|
|
16
|
+
.badge {
|
|
17
|
+
--md-comp-badge-color: var(--md-sys-color-error);
|
|
18
|
+
--md-comp-badge-label-text-color: var(--md-sys-color-on-error);
|
|
19
|
+
--md-comp-badge-large-size: 16px;
|
|
20
|
+
--md-comp-badge-small-size: 6px;
|
|
21
|
+
--md-comp-badge-large-shape: 8px;
|
|
22
|
+
--md-comp-badge-icon-size: 24px;
|
|
19
23
|
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
24
|
+
box-sizing: border-box;
|
|
25
|
+
display: inline-flex;
|
|
26
|
+
flex-shrink: 0;
|
|
27
|
+
align-items: center;
|
|
28
|
+
justify-content: center;
|
|
29
|
+
min-width: var(--md-comp-badge-large-size);
|
|
30
|
+
height: var(--md-comp-badge-large-size);
|
|
31
|
+
max-width: calc(4ch + 8px);
|
|
32
|
+
margin: 0;
|
|
33
|
+
padding: 0 4px;
|
|
34
|
+
overflow: hidden;
|
|
35
|
+
border-radius: var(--md-comp-badge-large-shape);
|
|
36
|
+
background-color: var(--md-comp-badge-color);
|
|
37
|
+
color: var(--md-comp-badge-label-text-color);
|
|
38
|
+
white-space: nowrap;
|
|
39
|
+
@include typescale("label-small");
|
|
40
|
+
line-height: var(--md-comp-badge-large-size);
|
|
41
|
+
font-family: $font-stack;
|
|
30
42
|
|
|
31
|
-
|
|
32
|
-
|
|
43
|
+
// Small. No label — a 6dp dot.
|
|
44
|
+
&:empty {
|
|
45
|
+
width: var(--md-comp-badge-small-size);
|
|
46
|
+
min-width: var(--md-comp-badge-small-size);
|
|
47
|
+
max-width: var(--md-comp-badge-small-size);
|
|
48
|
+
height: var(--md-comp-badge-small-size);
|
|
49
|
+
padding: 0;
|
|
50
|
+
border-radius: 50%;
|
|
51
|
+
font-size: 0;
|
|
52
|
+
line-height: 0;
|
|
53
|
+
color: transparent;
|
|
33
54
|
}
|
|
34
55
|
}
|
|
35
56
|
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
57
|
+
// Child of an icon: sit on the upper trailing corner of the 24dp
|
|
58
|
+
// glyph, even when the <i> is a larger indicator pill.
|
|
59
|
+
:is(
|
|
60
|
+
i,
|
|
61
|
+
.material-symbols,
|
|
62
|
+
.material-symbols-outlined,
|
|
63
|
+
.material-symbols-rounded,
|
|
64
|
+
.material-symbols-sharp,
|
|
65
|
+
.material-icons
|
|
66
|
+
) {
|
|
67
|
+
position: relative;
|
|
68
|
+
overflow: visible;
|
|
41
69
|
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
-webkit-font-smoothing: auto;
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
.collection span.badge {
|
|
52
|
-
float: none;
|
|
53
|
-
margin-block: 0;
|
|
54
|
-
margin-inline-start: auto;
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
.collapsible span.badge {
|
|
58
|
-
margin-left: auto;
|
|
59
|
-
|
|
60
|
-
&.leading {
|
|
61
|
-
margin-right: 7px;
|
|
62
|
-
order: -1;
|
|
70
|
+
> .badge {
|
|
71
|
+
position: absolute;
|
|
72
|
+
z-index: 1;
|
|
73
|
+
inset-block-start: calc((100% - var(--md-comp-badge-icon-size)) / 2);
|
|
74
|
+
inset-inline-end: calc((100% - var(--md-comp-badge-icon-size)) / 2);
|
|
75
|
+
transform: translate(50%, -50%);
|
|
63
76
|
}
|
|
64
77
|
}
|
|
65
78
|
|
|
66
|
-
|
|
67
|
-
|
|
79
|
+
// Trailing count in a list or drawer row stays in flow.
|
|
80
|
+
.list .badge,
|
|
81
|
+
.sidenav .badge,
|
|
82
|
+
menu .badge {
|
|
83
|
+
position: static;
|
|
84
|
+
transform: none;
|
|
68
85
|
}
|
|
69
86
|
|
|
70
|
-
.
|
|
71
|
-
margin-
|
|
87
|
+
.list .badge {
|
|
88
|
+
margin-inline-start: auto;
|
|
72
89
|
}
|
|
73
90
|
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
float: none;
|
|
77
|
-
margin-left: auto;
|
|
91
|
+
.sidenav summary .badge {
|
|
92
|
+
margin-inline-start: 14px;
|
|
78
93
|
}
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
@use "../abstracts" as *;
|
|
2
|
+
|
|
3
|
+
// Bottom sheets.
|
|
4
|
+
//
|
|
5
|
+
// Anatomy is the HTML. A dialog.bottom-sheet (or .bottom) is the surface.
|
|
6
|
+
// showModal() is the modal variant (scrim). show() is the standard variant
|
|
7
|
+
// (no scrim, page stays interactive). ::before is the optional drag handle;
|
|
8
|
+
// an explicit .handle button replaces it. A heading, body, and trailing
|
|
9
|
+
// form[method=dialog] are the same slots as a basic dialog.
|
|
10
|
+
//
|
|
11
|
+
// Tokens follow https://m3.material.io/components/bottom-sheets
|
|
12
|
+
// container surface-container-low, 28dp top corners, elevation 1
|
|
13
|
+
// max width 640dp; 56dp inset from the small breakpoint
|
|
14
|
+
// max height viewport minus 72dp
|
|
15
|
+
// handle 32×4dp bar in a 48dp hit target, on-surface-variant
|
|
16
|
+
// scrim modal only (UA ::backdrop + the dialog scrim token)
|
|
17
|
+
//
|
|
18
|
+
// Compact and medium are the intended windows. On large screens prefer a
|
|
19
|
+
// side sheet or a basic dialog; the sheet still lays out (640 + 56).
|
|
20
|
+
|
|
21
|
+
$_handle: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='4'%3E%3Crect width='32' height='4' rx='2' fill='black'/%3E%3C/svg%3E");
|
|
22
|
+
|
|
23
|
+
dialog.bottom,
|
|
24
|
+
dialog.bottom-sheet {
|
|
25
|
+
--md-comp-bottom-sheet-container-color: var(--md-sys-color-surface-container-low);
|
|
26
|
+
--md-comp-bottom-sheet-container-shape: 28px;
|
|
27
|
+
--md-comp-bottom-sheet-container-max-width: 640px;
|
|
28
|
+
--md-comp-bottom-sheet-margin-inline: 56px;
|
|
29
|
+
--md-comp-bottom-sheet-top-inset: 72px;
|
|
30
|
+
--md-comp-bottom-sheet-drag-handle-color: color-mix(
|
|
31
|
+
in oklab,
|
|
32
|
+
var(--md-sys-color-on-surface-variant) 40%,
|
|
33
|
+
transparent
|
|
34
|
+
);
|
|
35
|
+
--md-comp-bottom-sheet-shift: 0px;
|
|
36
|
+
|
|
37
|
+
box-sizing: border-box;
|
|
38
|
+
position: fixed;
|
|
39
|
+
inset: auto 0 0;
|
|
40
|
+
width: 100%;
|
|
41
|
+
min-width: 0;
|
|
42
|
+
max-width: none;
|
|
43
|
+
height: auto;
|
|
44
|
+
max-height: calc(100dvh - var(--md-comp-bottom-sheet-top-inset));
|
|
45
|
+
margin: 0;
|
|
46
|
+
padding: 0;
|
|
47
|
+
border: none;
|
|
48
|
+
border-radius: var(--md-comp-bottom-sheet-container-shape)
|
|
49
|
+
var(--md-comp-bottom-sheet-container-shape) 0 0;
|
|
50
|
+
background-color: var(--md-comp-bottom-sheet-container-color);
|
|
51
|
+
color: var(--md-sys-color-on-surface);
|
|
52
|
+
outline: none;
|
|
53
|
+
@include z-depth("1");
|
|
54
|
+
translate: 0 var(--md-comp-bottom-sheet-shift);
|
|
55
|
+
transition: translate 280ms ease;
|
|
56
|
+
|
|
57
|
+
// Non-modal `show()` is not in the top layer — sit above page content
|
|
58
|
+
// and below snackbars (z-index 10000).
|
|
59
|
+
&:not(:modal) {
|
|
60
|
+
z-index: 1100;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
@include bp-up("small") {
|
|
64
|
+
width: min(
|
|
65
|
+
var(--md-comp-bottom-sheet-container-max-width),
|
|
66
|
+
calc(100% - 2 * var(--md-comp-bottom-sheet-margin-inline))
|
|
67
|
+
);
|
|
68
|
+
max-width: var(--md-comp-bottom-sheet-container-max-width);
|
|
69
|
+
margin-inline: auto;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
// Standard: no scrim. Modal keeps the basic-dialog backdrop.
|
|
73
|
+
&:not(:modal)::backdrop {
|
|
74
|
+
background: none;
|
|
75
|
+
backdrop-filter: none;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
// Drag handle. 32×4 bar, 48dp hit. Hidden when the author supplies .handle.
|
|
79
|
+
&::before {
|
|
80
|
+
content: "";
|
|
81
|
+
box-sizing: border-box;
|
|
82
|
+
flex: 0 0 48px;
|
|
83
|
+
width: 48px;
|
|
84
|
+
height: 48px;
|
|
85
|
+
align-self: center;
|
|
86
|
+
margin: 0;
|
|
87
|
+
padding: 0;
|
|
88
|
+
background-color: var(--md-comp-bottom-sheet-drag-handle-color);
|
|
89
|
+
mask: $_handle center / 32px 4px no-repeat;
|
|
90
|
+
pointer-events: none;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
&:has(> .handle)::before {
|
|
94
|
+
content: none;
|
|
95
|
+
display: none;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
> .handle {
|
|
99
|
+
box-sizing: border-box;
|
|
100
|
+
flex: 0 0 48px;
|
|
101
|
+
align-self: center;
|
|
102
|
+
width: 48px;
|
|
103
|
+
height: 48px;
|
|
104
|
+
margin: 0;
|
|
105
|
+
padding: 0;
|
|
106
|
+
border: 0;
|
|
107
|
+
border-radius: 0;
|
|
108
|
+
background-color: var(--md-comp-bottom-sheet-drag-handle-color);
|
|
109
|
+
mask: $_handle center / 32px 4px no-repeat;
|
|
110
|
+
cursor: grab;
|
|
111
|
+
appearance: none;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
> :is(h1, h2, h3, h4, h5, h6) {
|
|
115
|
+
padding-top: 8px;
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
dialog.bottom[open],
|
|
120
|
+
dialog.bottom-sheet[open] {
|
|
121
|
+
display: flex;
|
|
122
|
+
flex-direction: column;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
@starting-style {
|
|
126
|
+
dialog.bottom[open],
|
|
127
|
+
dialog.bottom-sheet[open] {
|
|
128
|
+
translate: 0 100%;
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
@media (prefers-reduced-motion: reduce) {
|
|
133
|
+
dialog.bottom,
|
|
134
|
+
dialog.bottom-sheet {
|
|
135
|
+
transition: none;
|
|
136
|
+
}
|
|
137
|
+
}
|