@expressivecss/expressive 0.2.0 → 0.4.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 +8 -8
- package/dist/css/expressive.css +1915 -1566
- 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 +1338 -1528
- package/dist/js/expressive.cjs.map +4 -4
- package/dist/js/expressive.js +1338 -1528
- package/dist/js/expressive.js.map +4 -4
- package/dist/js/expressive.min.js +10 -20
- package/dist/js/expressive.min.js.map +4 -4
- package/dist/js/expressive.mjs +1338 -1529
- package/dist/js/expressive.mjs.map +4 -4
- package/dist/types/components/autocomplete.d.ts +2 -9
- package/dist/types/components/buttons.d.ts +19 -43
- package/dist/types/components/cards.d.ts +3 -6
- package/dist/types/components/carousel.d.ts +42 -48
- package/dist/types/components/characterCounter.d.ts +3 -5
- package/dist/types/components/chips.d.ts +4 -4
- package/dist/types/components/collapsible.d.ts +28 -23
- package/dist/types/components/datepicker.d.ts +2 -8
- package/dist/types/components/dropdown.d.ts +11 -2
- package/dist/types/components/index.d.ts +0 -1
- package/dist/types/components/lightbox.d.ts +2 -2
- package/dist/types/components/parallax.d.ts +7 -37
- package/dist/types/components/pushpin.d.ts +2 -2
- package/dist/types/components/range.d.ts +2 -2
- package/dist/types/components/registry.d.ts +0 -4
- package/dist/types/components/scrollspy.d.ts +26 -50
- package/dist/types/components/select.d.ts +20 -6
- package/dist/types/components/sidenav.d.ts +40 -55
- package/dist/types/components/slider.d.ts +2 -2
- package/dist/types/components/tabs.d.ts +2 -2
- package/dist/types/components/tapTarget.d.ts +25 -26
- 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 +1 -1
- package/package.json +2 -2
- package/src/sass/README.md +3 -6
- package/src/sass/abstracts/_breakpoints.scss +0 -16
- package/src/sass/abstracts/_variables.scss +0 -21
- package/src/sass/base/_grid.scss +0 -19
- package/src/sass/components/_badges.scss +6 -5
- package/src/sass/components/_breadcrumb.scss +93 -16
- package/src/sass/components/_buttons.scss +212 -145
- package/src/sass/components/_cards.scss +50 -123
- package/src/sass/components/_carousel.scss +128 -63
- package/src/sass/components/_chips.scss +1 -1
- package/src/sass/components/_collapsible.scss +158 -60
- package/src/sass/components/_collection.scss +146 -80
- package/src/sass/components/_datepicker.scss +1 -15
- package/src/sass/components/_dropdown.scss +110 -14
- package/src/sass/components/_icons-material-design.scss +77 -4
- package/src/sass/components/_index.scss +1 -0
- package/src/sass/components/_lightbox.scss +4 -0
- package/src/sass/components/_modal.scss +13 -31
- package/src/sass/components/_navbar.scss +24 -6
- package/src/sass/components/_page-footer.scss +134 -15
- package/src/sass/components/_pagination.scss +131 -25
- package/src/sass/components/_parallax.scss +96 -21
- package/src/sass/components/_preloader.scss +145 -300
- package/src/sass/components/_scrollspy.scss +18 -0
- package/src/sass/components/_sidenav.scss +230 -119
- package/src/sass/components/_slider.scss +8 -0
- package/src/sass/components/_table_of_contents.scss +30 -14
- package/src/sass/components/_tabs.scss +54 -35
- package/src/sass/components/_tapTarget.scss +128 -45
- package/src/sass/components/_toast.scss +10 -11
- package/src/sass/components/_toolbar.scss +2 -2
- package/src/sass/components/_tooltip.scss +4 -9
- package/src/sass/components/_transitions.scss +0 -5
- package/src/sass/components/forms/_index.scss +0 -5
- package/src/sass/components/forms/_input-fields.scss +49 -52
- package/src/sass/components/forms/_select.scss +175 -60
- package/src/sass/components/forms/_switches.scss +21 -8
- package/src/sass/utilities/_helpers.scss +1 -3
- package/src/sass/utilities/_typescale.scss +0 -5
- package/src/sass/utilities/_visibility.scss +2 -2
- package/dist/types/components/modal.d.ts +0 -45
|
@@ -1,46 +1,152 @@
|
|
|
1
1
|
@use "../abstracts" as *;
|
|
2
2
|
|
|
3
|
+
// Pagination. Anatomy is the HTML: a nav.pagination whose child is an
|
|
4
|
+
// <ol> (or <ul>) of page links. The current page is aria-current="page".
|
|
5
|
+
// A bare <ul class="pagination"> stays as an alias.
|
|
6
|
+
//
|
|
7
|
+
// .active / .disabled / .prev / .next / .pages still work.
|
|
8
|
+
// .nowrap (or the old li.pages nest) scrolls a long run instead of wrapping.
|
|
9
|
+
//
|
|
10
|
+
// Tokens (defaults match the original compact pager):
|
|
11
|
+
// --md-comp-pagination-size 2rem
|
|
12
|
+
// --md-comp-pagination-shape 2rem (stadium / disc)
|
|
13
|
+
// --md-comp-pagination-gap 0
|
|
14
|
+
// --md-comp-pagination-padding 0.66rem
|
|
15
|
+
// --md-comp-pagination-icon-size 2rem
|
|
16
|
+
// --md-comp-pagination-selected-color primary
|
|
17
|
+
// --md-comp-pagination-selected-on-color on-primary
|
|
18
|
+
//
|
|
19
|
+
// Nest descendants inside this block.
|
|
20
|
+
|
|
3
21
|
.pagination {
|
|
22
|
+
--md-comp-pagination-size: 2rem;
|
|
23
|
+
--md-comp-pagination-shape: 2rem;
|
|
24
|
+
--md-comp-pagination-gap: 0px;
|
|
25
|
+
--md-comp-pagination-padding: 0.66rem;
|
|
26
|
+
--md-comp-pagination-icon-size: 2rem;
|
|
27
|
+
--md-comp-pagination-selected-color: var(--md-sys-color-primary);
|
|
28
|
+
--md-comp-pagination-selected-on-color: var(--md-sys-color-on-primary);
|
|
29
|
+
|
|
30
|
+
box-sizing: border-box;
|
|
31
|
+
margin: 0;
|
|
32
|
+
padding: 0;
|
|
33
|
+
color: var(--md-sys-color-on-surface);
|
|
34
|
+
font-size: 1.2rem;
|
|
35
|
+
line-height: 1;
|
|
36
|
+
|
|
37
|
+
&,
|
|
38
|
+
> :is(ul, ol) {
|
|
39
|
+
display: flex;
|
|
40
|
+
flex-wrap: wrap;
|
|
41
|
+
align-items: center;
|
|
42
|
+
gap: var(--md-comp-pagination-gap);
|
|
43
|
+
list-style: none;
|
|
44
|
+
margin: 0;
|
|
45
|
+
padding: 0;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
&.nowrap,
|
|
49
|
+
&.nowrap > :is(ul, ol) {
|
|
50
|
+
flex-wrap: nowrap;
|
|
51
|
+
min-width: 0;
|
|
52
|
+
overflow-x: auto;
|
|
53
|
+
scrollbar-width: none;
|
|
54
|
+
|
|
55
|
+
&::-webkit-scrollbar {
|
|
56
|
+
display: none;
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
|
|
4
60
|
li {
|
|
5
|
-
display:
|
|
6
|
-
|
|
61
|
+
display: flex;
|
|
62
|
+
flex-shrink: 0;
|
|
63
|
+
margin: 0;
|
|
64
|
+
padding: 0;
|
|
65
|
+
}
|
|
7
66
|
|
|
8
|
-
|
|
9
|
-
|
|
67
|
+
:is(a, button) {
|
|
68
|
+
box-sizing: border-box;
|
|
69
|
+
display: inline-flex;
|
|
70
|
+
align-items: center;
|
|
71
|
+
justify-content: center;
|
|
72
|
+
gap: 4px;
|
|
73
|
+
min-width: var(--md-comp-pagination-size);
|
|
74
|
+
height: var(--md-comp-pagination-size);
|
|
75
|
+
padding: 0 var(--md-comp-pagination-padding);
|
|
76
|
+
border: 0;
|
|
77
|
+
border-radius: var(--md-comp-pagination-shape);
|
|
78
|
+
background: transparent;
|
|
79
|
+
color: inherit;
|
|
80
|
+
font: inherit;
|
|
81
|
+
line-height: inherit;
|
|
82
|
+
text-decoration: none;
|
|
83
|
+
cursor: pointer;
|
|
84
|
+
-webkit-tap-highlight-color: transparent;
|
|
85
|
+
transition: background-color 0.2s ease-out;
|
|
86
|
+
@include focus-visible;
|
|
87
|
+
|
|
88
|
+
&:hover {
|
|
89
|
+
background-color: color-mix(in oklab, var(--md-sys-color-on-surface) 8%, transparent);
|
|
10
90
|
}
|
|
11
91
|
|
|
12
|
-
|
|
13
|
-
|
|
92
|
+
&:has(> span) {
|
|
93
|
+
width: auto;
|
|
14
94
|
}
|
|
15
95
|
|
|
16
|
-
|
|
17
|
-
|
|
96
|
+
> i {
|
|
97
|
+
font-size: var(--md-comp-pagination-icon-size);
|
|
98
|
+
width: var(--md-comp-pagination-icon-size);
|
|
99
|
+
height: var(--md-comp-pagination-icon-size);
|
|
100
|
+
line-height: 1;
|
|
18
101
|
}
|
|
102
|
+
}
|
|
19
103
|
|
|
20
|
-
|
|
21
|
-
|
|
104
|
+
:is(a, button)[aria-current="page"],
|
|
105
|
+
.active > :is(a, button),
|
|
106
|
+
li:has(> [aria-current="page"]) > :is(a, button) {
|
|
107
|
+
background-color: var(--md-comp-pagination-selected-color);
|
|
108
|
+
color: var(--md-comp-pagination-selected-on-color);
|
|
109
|
+
|
|
110
|
+
&:hover {
|
|
111
|
+
background-color: color-mix(
|
|
112
|
+
in oklab,
|
|
113
|
+
var(--md-comp-pagination-selected-on-color) 8%,
|
|
114
|
+
var(--md-comp-pagination-selected-color)
|
|
115
|
+
);
|
|
22
116
|
}
|
|
23
117
|
}
|
|
24
118
|
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
119
|
+
:is(a, button)[aria-disabled="true"],
|
|
120
|
+
.disabled > :is(a, button) {
|
|
121
|
+
color: color-mix(in oklab, var(--md-sys-color-on-surface) 38%, transparent);
|
|
122
|
+
background-color: transparent;
|
|
123
|
+
pointer-events: none;
|
|
124
|
+
cursor: default;
|
|
28
125
|
}
|
|
29
|
-
}
|
|
30
126
|
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
127
|
+
li > span {
|
|
128
|
+
box-sizing: border-box;
|
|
129
|
+
display: inline-flex;
|
|
130
|
+
align-items: center;
|
|
131
|
+
justify-content: center;
|
|
132
|
+
min-width: var(--md-comp-pagination-size);
|
|
133
|
+
height: var(--md-comp-pagination-size);
|
|
134
|
+
color: var(--md-sys-color-on-surface-variant);
|
|
135
|
+
}
|
|
34
136
|
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
}
|
|
137
|
+
// Old nested-pages markup. Scroll, do not clip to 80%.
|
|
138
|
+
.pages {
|
|
139
|
+
min-width: 0;
|
|
39
140
|
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
141
|
+
> :is(ul, ol) {
|
|
142
|
+
display: flex;
|
|
143
|
+
flex-wrap: inherit;
|
|
144
|
+
align-items: center;
|
|
145
|
+
gap: var(--md-comp-pagination-gap);
|
|
146
|
+
list-style: none;
|
|
147
|
+
min-width: 0;
|
|
148
|
+
margin: 0;
|
|
149
|
+
padding: 0;
|
|
44
150
|
}
|
|
45
151
|
}
|
|
46
152
|
}
|
|
@@ -1,29 +1,104 @@
|
|
|
1
1
|
@use "../abstracts" as *;
|
|
2
2
|
|
|
3
|
-
//
|
|
3
|
+
// Parallax. Anatomy is the HTML: a .parallax (or <figure class="parallax">)
|
|
4
|
+
// clips an <img>, <picture>, or <video>. A heading / <p> / <figcaption> is
|
|
5
|
+
// the overlay.
|
|
6
|
+
//
|
|
7
|
+
// Motion is CSS. A named view timeline on the clip drives the image; without
|
|
8
|
+
// animation-timeline the image is just object-fit: cover. JS does not scroll.
|
|
9
|
+
//
|
|
10
|
+
// Tokens:
|
|
11
|
+
// --md-comp-parallax-height visible window (500px)
|
|
12
|
+
// --md-comp-parallax-travel how far the image moves (64px)
|
|
13
|
+
// --md-comp-parallax-shape 12px, same as media / lightbox / slider
|
|
14
|
+
|
|
15
|
+
.parallax {
|
|
16
|
+
--md-comp-parallax-height: 500px;
|
|
17
|
+
--md-comp-parallax-travel: 120px;
|
|
18
|
+
--md-comp-parallax-shape: 12px;
|
|
4
19
|
|
|
5
|
-
.parallax-container {
|
|
6
20
|
position: relative;
|
|
21
|
+
isolation: isolate;
|
|
7
22
|
overflow: hidden;
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
23
|
+
box-sizing: border-box;
|
|
24
|
+
height: var(--md-comp-parallax-height);
|
|
25
|
+
margin: 0;
|
|
26
|
+
border-radius: var(--md-comp-parallax-shape);
|
|
27
|
+
view-timeline-name: --parallax;
|
|
28
|
+
view-timeline-axis: block;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.parallax > :is(img, video),
|
|
32
|
+
.parallax > picture {
|
|
33
|
+
position: absolute;
|
|
34
|
+
inset: 0;
|
|
35
|
+
display: block;
|
|
36
|
+
width: 100%;
|
|
37
|
+
height: 100%;
|
|
38
|
+
border: 0;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
.parallax > picture img {
|
|
42
|
+
display: block;
|
|
43
|
+
width: 100%;
|
|
44
|
+
height: 100%;
|
|
45
|
+
border: 0;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
.parallax > :is(img, video),
|
|
49
|
+
.parallax > picture img {
|
|
50
|
+
object-fit: cover;
|
|
51
|
+
object-position: center;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
// Overlay. A heading or <p> is a centered hero; figcaption docks to the
|
|
55
|
+
// bottom on a translucent surface, same idea as a card figure.
|
|
56
|
+
.parallax > :is(h1, h2, h3, h4, h5, h6),
|
|
57
|
+
.parallax > p {
|
|
58
|
+
position: absolute;
|
|
59
|
+
inset: 0;
|
|
60
|
+
z-index: 1;
|
|
61
|
+
display: grid;
|
|
62
|
+
place-items: center;
|
|
63
|
+
margin: 0;
|
|
64
|
+
padding: 24px;
|
|
65
|
+
color: var(--md-sys-color-on-surface);
|
|
66
|
+
text-align: center;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
.parallax > figcaption {
|
|
70
|
+
position: absolute;
|
|
71
|
+
inset: auto 0 0;
|
|
72
|
+
z-index: 1;
|
|
73
|
+
margin: 0;
|
|
74
|
+
padding: 16px 24px;
|
|
75
|
+
color: var(--md-sys-color-on-surface);
|
|
76
|
+
background: color-mix(in oklab, var(--md-sys-color-surface) 72%, transparent);
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
// Full-bleed hero. Meets the viewport edges; no corners.
|
|
80
|
+
.parallax.max {
|
|
81
|
+
height: 100vh;
|
|
82
|
+
height: 100dvh;
|
|
83
|
+
border-radius: 0;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
// Progressive enhancement: without animation-timeline the image stays a
|
|
87
|
+
// static cover. Named timeline is the clip, not the (taller) image.
|
|
88
|
+
@supports (animation-timeline: view()) {
|
|
89
|
+
@media (prefers-reduced-motion: no-preference) {
|
|
90
|
+
.parallax > :is(img, video),
|
|
91
|
+
.parallax > picture img {
|
|
92
|
+
height: calc(100% + 2 * var(--md-comp-parallax-travel));
|
|
93
|
+
inset: calc(-1 * var(--md-comp-parallax-travel)) 0 auto;
|
|
94
|
+
animation: parallax-shift linear both;
|
|
95
|
+
animation-timeline: --parallax;
|
|
96
|
+
animation-range: cover;
|
|
27
97
|
}
|
|
28
98
|
}
|
|
29
99
|
}
|
|
100
|
+
|
|
101
|
+
@keyframes parallax-shift {
|
|
102
|
+
from { transform: translateY(var(--md-comp-parallax-travel)); }
|
|
103
|
+
to { transform: translateY(calc(-1 * var(--md-comp-parallax-travel))); }
|
|
104
|
+
}
|