@expressivecss/expressive 0.4.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 +2309 -948
- 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 +643 -804
- package/dist/js/expressive.cjs.map +4 -4
- package/dist/js/expressive.js +643 -804
- package/dist/js/expressive.js.map +4 -4
- package/dist/js/expressive.min.js +11 -11
- package/dist/js/expressive.min.js.map +4 -4
- package/dist/js/expressive.mjs +643 -804
- 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 +11 -11
- package/dist/types/components/index.d.ts +3 -5
- package/dist/types/components/{dropdown.d.ts → menu.d.ts} +38 -37
- package/dist/types/components/navigationRail.d.ts +53 -0
- package/dist/types/components/range.d.ts +3 -0
- package/dist/types/components/registry.d.ts +7 -15
- package/dist/types/components/select.d.ts +12 -12
- package/dist/types/components/{toasts.d.ts → snackbar.d.ts} +28 -25
- package/dist/types/index.d.ts +3 -1
- package/package.json +3 -2
- package/src/sass/README.md +13 -11
- package/src/sass/abstracts/_breakpoints.scss +14 -3
- package/src/sass/abstracts/_mixins.scss +3 -3
- package/src/sass/abstracts/_variables.scss +27 -2
- package/src/sass/base/_global.scss +1 -1
- package/src/sass/base/_grid.scss +66 -116
- 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/_cards.scss +4 -4
- package/src/sass/components/_chips.scss +6 -5
- package/src/sass/components/_dialog.scss +268 -0
- package/src/sass/components/_index.scss +8 -7
- package/src/sass/components/_list.scss +253 -0
- package/src/sass/components/_menu.scss +341 -0
- package/src/sass/components/_navbar.scss +65 -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 +7 -3
- package/src/sass/components/_side-sheet.scss +193 -0
- package/src/sass/components/_sidenav.scss +78 -49
- package/src/sass/components/{_toast.scss → _snackbar.scss} +35 -34
- package/src/sass/components/_tabs.scss +1 -27
- package/src/sass/components/_toolbar.scss +91 -25
- package/src/sass/components/_tooltip.scss +1 -1
- package/src/sass/components/forms/_fieldset.scss +1 -1
- package/src/sass/components/forms/_input-fields.scss +3 -3
- package/src/sass/components/forms/_range.scss +423 -98
- package/src/sass/components/forms/_select.scss +19 -17
- 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/_visibility.scss +8 -0
- package/dist/types/components/collapsible.d.ts +0 -79
- 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 -179
- package/src/sass/components/_collection.scss +0 -180
- package/src/sass/components/_dropdown.scss +0 -225
- package/src/sass/components/_modal.scss +0 -190
- package/src/sass/components/_pushpin.scss +0 -11
- package/src/sass/components/_tapTarget.scss +0 -187
|
@@ -1,190 +0,0 @@
|
|
|
1
|
-
@use "../abstracts" as *;
|
|
2
|
-
|
|
3
|
-
// Dialogs.
|
|
4
|
-
//
|
|
5
|
-
// Anatomy is the HTML. A <dialog> is a basic dialog. A heading is the
|
|
6
|
-
// headline, a <p> (or a wrapping <div>) is supporting text, and the last
|
|
7
|
-
// child <form method="dialog"> or <nav> is the action row.
|
|
8
|
-
//
|
|
9
|
-
// Tokens follow https://m3.material.io/components/dialogs/specs
|
|
10
|
-
// container surface, 28dp corners, 280–560dp, elevation 3
|
|
11
|
-
// headline headline-small / on-surface
|
|
12
|
-
// body body-medium / on-surface-variant
|
|
13
|
-
// icon 24dp, on-secondary
|
|
14
|
-
// actions end-aligned, 8dp gap
|
|
15
|
-
// scrim 32% + 12px blur
|
|
16
|
-
// padding 24dp
|
|
17
|
-
|
|
18
|
-
dialog {
|
|
19
|
-
--md-comp-basic-dialog-container-color: var(--md-sys-color-surface);
|
|
20
|
-
--md-comp-basic-dialog-container-shape: 28px;
|
|
21
|
-
--md-comp-basic-dialog-container-min-width: 280px;
|
|
22
|
-
--md-comp-basic-dialog-container-max-width: 560px;
|
|
23
|
-
--md-comp-basic-dialog-sheet-width: 400px;
|
|
24
|
-
--md-comp-basic-dialog-scrim-blur: 12px;
|
|
25
|
-
|
|
26
|
-
box-sizing: border-box;
|
|
27
|
-
width: min(var(--md-comp-basic-dialog-container-max-width), calc(100% - 48px));
|
|
28
|
-
min-width: min(var(--md-comp-basic-dialog-container-min-width), calc(100% - 48px));
|
|
29
|
-
max-height: min(70vh, calc(100% - 48px));
|
|
30
|
-
margin: auto;
|
|
31
|
-
padding: 0;
|
|
32
|
-
border: none;
|
|
33
|
-
border-radius: var(--md-comp-basic-dialog-container-shape);
|
|
34
|
-
background-color: var(--md-comp-basic-dialog-container-color);
|
|
35
|
-
color: var(--md-sys-color-on-surface);
|
|
36
|
-
outline: none;
|
|
37
|
-
@include z-depth("3");
|
|
38
|
-
|
|
39
|
-
&::backdrop {
|
|
40
|
-
background-color: color-mix(in oklab, var(--md-sys-color-scrim) 32%, transparent);
|
|
41
|
-
backdrop-filter: blur(var(--md-comp-basic-dialog-scrim-blur));
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
// showModal() puts the dialog in the top layer but does not lock the
|
|
46
|
-
// document scroller. :modal is the modal-only match — a modeless
|
|
47
|
-
// dialog.show() must not freeze the page.
|
|
48
|
-
html:has(dialog:modal) {
|
|
49
|
-
overflow: hidden;
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
dialog[open] {
|
|
53
|
-
display: flex;
|
|
54
|
-
flex-direction: column;
|
|
55
|
-
overflow: hidden;
|
|
56
|
-
overscroll-behavior: contain;
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
// Optional leading icon (M3 basic dialog).
|
|
60
|
-
dialog > i:first-child {
|
|
61
|
-
flex: 0 0 auto;
|
|
62
|
-
align-self: center;
|
|
63
|
-
margin: 24px 24px 0;
|
|
64
|
-
font-size: 24px;
|
|
65
|
-
width: 24px;
|
|
66
|
-
height: 24px;
|
|
67
|
-
line-height: 24px;
|
|
68
|
-
color: var(--md-sys-color-secondary);
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
dialog > :is(h1, h2, h3, h4, h5, h6) {
|
|
72
|
-
flex: 0 0 auto;
|
|
73
|
-
margin: 0;
|
|
74
|
-
padding: 24px 24px 16px;
|
|
75
|
-
font-family: var(--md-sys-typescale-headline-small-font-family-name);
|
|
76
|
-
font-size: var(--md-sys-typescale-headline-small-font-size);
|
|
77
|
-
font-weight: var(--md-sys-typescale-headline-small-font-weight);
|
|
78
|
-
line-height: var(--md-sys-typescale-headline-small-line-height);
|
|
79
|
-
letter-spacing: var(--md-sys-typescale-headline-small-letter-spacing);
|
|
80
|
-
color: var(--md-sys-color-on-surface);
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
dialog > i:first-child + :is(h1, h2, h3, h4, h5, h6) {
|
|
84
|
-
padding-top: 16px;
|
|
85
|
-
text-align: center;
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
dialog > p,
|
|
89
|
-
dialog > div {
|
|
90
|
-
flex: 1 1 auto;
|
|
91
|
-
min-height: 0;
|
|
92
|
-
overflow: auto;
|
|
93
|
-
overscroll-behavior: contain;
|
|
94
|
-
margin: 0;
|
|
95
|
-
padding: 0 24px 16px;
|
|
96
|
-
font-family: var(--md-sys-typescale-body-medium-font-family-name);
|
|
97
|
-
font-size: var(--md-sys-typescale-body-medium-font-size);
|
|
98
|
-
font-weight: var(--md-sys-typescale-body-medium-font-weight);
|
|
99
|
-
line-height: var(--md-sys-typescale-body-medium-line-height);
|
|
100
|
-
letter-spacing: var(--md-sys-typescale-body-medium-letter-spacing);
|
|
101
|
-
color: color-mix(in oklab, currentColor 72%, transparent);
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
dialog > :is(h1, h2, h3, h4, h5, h6) + p {
|
|
105
|
-
padding-top: 0;
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
// Action row. form[method=dialog] is the native close mechanism.
|
|
109
|
-
dialog > :is(form, nav):last-child {
|
|
110
|
-
display: flex;
|
|
111
|
-
flex-wrap: wrap;
|
|
112
|
-
justify-content: flex-end;
|
|
113
|
-
align-items: center;
|
|
114
|
-
gap: 8px;
|
|
115
|
-
flex: 0 0 auto;
|
|
116
|
-
margin: 0;
|
|
117
|
-
padding: 8px 16px 16px;
|
|
118
|
-
border: 0;
|
|
119
|
-
background: none;
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
// Full-screen (M3). Takes the viewport; no corners.
|
|
123
|
-
// UA `dialog:modal` sets max-width: calc(100% - 2em - 6px). Without
|
|
124
|
-
// clearing it, width: 100% is capped and a strip of scrim shows on the
|
|
125
|
-
// right. Bottom sheet already overrides this.
|
|
126
|
-
dialog.max {
|
|
127
|
-
width: 100%;
|
|
128
|
-
max-width: none;
|
|
129
|
-
height: 100%;
|
|
130
|
-
min-width: 0;
|
|
131
|
-
max-height: none;
|
|
132
|
-
margin: 0;
|
|
133
|
-
border-radius: 0;
|
|
134
|
-
}
|
|
135
|
-
|
|
136
|
-
// Sheets. Docked to one edge; the inner corners keep the dialog shape,
|
|
137
|
-
// the edge against the viewport is square. `left` / `right` also float
|
|
138
|
-
// via the helper utilities (`!important`), so sheets reset that.
|
|
139
|
-
dialog.bottom,
|
|
140
|
-
dialog.bottom-sheet {
|
|
141
|
-
width: 100%;
|
|
142
|
-
min-width: 0;
|
|
143
|
-
max-width: none;
|
|
144
|
-
max-height: 50%;
|
|
145
|
-
margin: auto 0 0;
|
|
146
|
-
border-radius: var(--md-comp-basic-dialog-container-shape)
|
|
147
|
-
var(--md-comp-basic-dialog-container-shape) 0 0;
|
|
148
|
-
}
|
|
149
|
-
|
|
150
|
-
dialog.top,
|
|
151
|
-
dialog.top-sheet {
|
|
152
|
-
width: 100%;
|
|
153
|
-
min-width: 0;
|
|
154
|
-
max-width: none;
|
|
155
|
-
max-height: 50%;
|
|
156
|
-
margin: 0 0 auto;
|
|
157
|
-
border-radius: 0 0 var(--md-comp-basic-dialog-container-shape)
|
|
158
|
-
var(--md-comp-basic-dialog-container-shape);
|
|
159
|
-
}
|
|
160
|
-
|
|
161
|
-
dialog.left,
|
|
162
|
-
dialog.left-sheet,
|
|
163
|
-
dialog.right,
|
|
164
|
-
dialog.right-sheet {
|
|
165
|
-
float: none !important;
|
|
166
|
-
width: min(var(--md-comp-basic-dialog-sheet-width), 85%);
|
|
167
|
-
max-width: none;
|
|
168
|
-
height: auto;
|
|
169
|
-
max-height: none;
|
|
170
|
-
min-width: 0;
|
|
171
|
-
min-height: 0;
|
|
172
|
-
margin: 0;
|
|
173
|
-
inset-block: 0;
|
|
174
|
-
}
|
|
175
|
-
|
|
176
|
-
dialog.left,
|
|
177
|
-
dialog.left-sheet {
|
|
178
|
-
inset-inline-start: 0;
|
|
179
|
-
inset-inline-end: auto;
|
|
180
|
-
border-radius: 0 var(--md-comp-basic-dialog-container-shape)
|
|
181
|
-
var(--md-comp-basic-dialog-container-shape) 0;
|
|
182
|
-
}
|
|
183
|
-
|
|
184
|
-
dialog.right,
|
|
185
|
-
dialog.right-sheet {
|
|
186
|
-
inset-inline-start: auto;
|
|
187
|
-
inset-inline-end: 0;
|
|
188
|
-
border-radius: var(--md-comp-basic-dialog-container-shape) 0 0
|
|
189
|
-
var(--md-comp-basic-dialog-container-shape);
|
|
190
|
-
}
|
|
@@ -1,187 +0,0 @@
|
|
|
1
|
-
@use "../abstracts" as *;
|
|
2
|
-
|
|
3
|
-
// Tap target (Feature Discovery). A circular spotlight centered on an
|
|
4
|
-
// origin. JS writes --md-comp-tap-target-x/y/origin-size and data-edge;
|
|
5
|
-
// this file does the rest.
|
|
6
|
-
//
|
|
7
|
-
// Tokens:
|
|
8
|
-
// --md-comp-tap-target-size 480px
|
|
9
|
-
// --md-comp-tap-target-z 1000
|
|
10
|
-
// --md-comp-tap-target-container-color
|
|
11
|
-
// --md-comp-tap-target-supporting-color
|
|
12
|
-
// --md-comp-tap-target-duration 300ms
|
|
13
|
-
// --md-comp-tap-target-easing soft ease-in-out
|
|
14
|
-
|
|
15
|
-
.tap-target-wrapper {
|
|
16
|
-
--md-comp-tap-target-size: 480px;
|
|
17
|
-
--md-comp-tap-target-z: 1000;
|
|
18
|
-
--md-comp-tap-target-container-color: var(--md-sys-color-primary-container);
|
|
19
|
-
--md-comp-tap-target-supporting-color: var(--md-sys-color-on-primary-container);
|
|
20
|
-
--md-comp-tap-target-duration: 300ms;
|
|
21
|
-
--md-comp-tap-target-easing: cubic-bezier(0.65, 0, 0.35, 1);
|
|
22
|
-
--md-comp-tap-target-x: 50%;
|
|
23
|
-
--md-comp-tap-target-y: 50%;
|
|
24
|
-
--md-comp-tap-target-origin-size: 56px;
|
|
25
|
-
|
|
26
|
-
box-sizing: border-box;
|
|
27
|
-
position: fixed;
|
|
28
|
-
inset: auto;
|
|
29
|
-
left: var(--md-comp-tap-target-x);
|
|
30
|
-
top: var(--md-comp-tap-target-y);
|
|
31
|
-
translate: -50% -50%;
|
|
32
|
-
width: var(--md-comp-tap-target-size);
|
|
33
|
-
height: var(--md-comp-tap-target-size);
|
|
34
|
-
margin: 0;
|
|
35
|
-
padding: 0;
|
|
36
|
-
overflow: visible;
|
|
37
|
-
border: 0;
|
|
38
|
-
background: transparent;
|
|
39
|
-
color: var(--md-comp-tap-target-supporting-color);
|
|
40
|
-
visibility: hidden;
|
|
41
|
-
pointer-events: none;
|
|
42
|
-
z-index: var(--md-comp-tap-target-z);
|
|
43
|
-
transition:
|
|
44
|
-
visibility 0s var(--md-comp-tap-target-duration),
|
|
45
|
-
overlay var(--md-comp-tap-target-duration) allow-discrete,
|
|
46
|
-
display var(--md-comp-tap-target-duration) allow-discrete;
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
.tap-target-wrapper:is(.open, :popover-open) {
|
|
50
|
-
visibility: visible;
|
|
51
|
-
pointer-events: none;
|
|
52
|
-
transition-delay: 0s;
|
|
53
|
-
|
|
54
|
-
.tap-target {
|
|
55
|
-
transform: scale(1);
|
|
56
|
-
opacity: 1;
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
.tap-target-wave::before {
|
|
60
|
-
transform: scale(1);
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
.tap-target-wave::after {
|
|
64
|
-
visibility: visible;
|
|
65
|
-
animation: pulse-animation 1s cubic-bezier(0.24, 0, 0.38, 1) infinite;
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
.tap-target {
|
|
70
|
-
position: absolute;
|
|
71
|
-
inset: 0;
|
|
72
|
-
display: grid;
|
|
73
|
-
box-sizing: border-box;
|
|
74
|
-
width: 100%;
|
|
75
|
-
height: 100%;
|
|
76
|
-
overflow: hidden;
|
|
77
|
-
border-radius: 50%;
|
|
78
|
-
background-color: var(--md-comp-tap-target-container-color);
|
|
79
|
-
color: var(--md-comp-tap-target-supporting-color);
|
|
80
|
-
opacity: 0;
|
|
81
|
-
transform: scale(0);
|
|
82
|
-
transition:
|
|
83
|
-
transform var(--md-comp-tap-target-duration) var(--md-comp-tap-target-easing),
|
|
84
|
-
opacity var(--md-comp-tap-target-duration) var(--md-comp-tap-target-easing);
|
|
85
|
-
@include z-depth("3");
|
|
86
|
-
@include typescale("body-medium");
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
.tap-target-content {
|
|
90
|
-
position: relative;
|
|
91
|
-
z-index: 1;
|
|
92
|
-
display: grid;
|
|
93
|
-
align-content: start;
|
|
94
|
-
gap: 8px;
|
|
95
|
-
box-sizing: border-box;
|
|
96
|
-
max-width: min(18rem, 52%);
|
|
97
|
-
padding: calc(var(--md-comp-tap-target-origin-size) * 0.5 + 20px);
|
|
98
|
-
pointer-events: auto;
|
|
99
|
-
|
|
100
|
-
> :is(h1, h2, h3, h4, h5, h6) {
|
|
101
|
-
margin: 0;
|
|
102
|
-
color: inherit;
|
|
103
|
-
@include typescale("title-medium");
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
> p {
|
|
107
|
-
margin: 0;
|
|
108
|
-
color: inherit;
|
|
109
|
-
}
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
.tap-target-wrapper[data-edge^="top"] .tap-target-content {
|
|
113
|
-
align-self: end;
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
.tap-target-wrapper[data-edge^="bottom"] .tap-target-content {
|
|
117
|
-
align-self: start;
|
|
118
|
-
}
|
|
119
|
-
|
|
120
|
-
.tap-target-wrapper[data-edge$="left"] .tap-target-content {
|
|
121
|
-
justify-self: end;
|
|
122
|
-
}
|
|
123
|
-
|
|
124
|
-
.tap-target-wrapper[data-edge$="right"] .tap-target-content {
|
|
125
|
-
justify-self: start;
|
|
126
|
-
}
|
|
127
|
-
|
|
128
|
-
.tap-target-wrapper[data-edge$="center"] .tap-target-content {
|
|
129
|
-
justify-self: center;
|
|
130
|
-
max-width: min(22rem, 80%);
|
|
131
|
-
text-align: center;
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
.tap-target-wave {
|
|
135
|
-
position: absolute;
|
|
136
|
-
top: 50%;
|
|
137
|
-
left: 50%;
|
|
138
|
-
z-index: 0;
|
|
139
|
-
width: calc(var(--md-comp-tap-target-origin-size) * 2);
|
|
140
|
-
height: calc(var(--md-comp-tap-target-origin-size) * 2);
|
|
141
|
-
translate: -50% -50%;
|
|
142
|
-
border-radius: 50%;
|
|
143
|
-
pointer-events: none;
|
|
144
|
-
|
|
145
|
-
&::before,
|
|
146
|
-
&::after {
|
|
147
|
-
content: "";
|
|
148
|
-
position: absolute;
|
|
149
|
-
inset: 0;
|
|
150
|
-
display: block;
|
|
151
|
-
border-radius: 50%;
|
|
152
|
-
background-color: var(--md-sys-color-surface);
|
|
153
|
-
}
|
|
154
|
-
|
|
155
|
-
&::before {
|
|
156
|
-
transform: scale(0);
|
|
157
|
-
transition: transform var(--md-comp-tap-target-duration)
|
|
158
|
-
var(--md-comp-tap-target-easing);
|
|
159
|
-
}
|
|
160
|
-
|
|
161
|
-
&::after {
|
|
162
|
-
visibility: hidden;
|
|
163
|
-
z-index: -1;
|
|
164
|
-
}
|
|
165
|
-
}
|
|
166
|
-
|
|
167
|
-
// Raised only on the non-popover path so a static origin stays above the
|
|
168
|
-
// circle. Never set position here — a FAB may already be fixed.
|
|
169
|
-
.tap-target-origin {
|
|
170
|
-
z-index: calc(var(--md-comp-tap-target-z, 1000) + 2);
|
|
171
|
-
}
|
|
172
|
-
|
|
173
|
-
@include bp-down("small") {
|
|
174
|
-
.tap-target-wrapper {
|
|
175
|
-
--md-comp-tap-target-size: 360px;
|
|
176
|
-
}
|
|
177
|
-
}
|
|
178
|
-
|
|
179
|
-
@media (prefers-reduced-motion: reduce) {
|
|
180
|
-
.tap-target-wrapper {
|
|
181
|
-
--md-comp-tap-target-duration: 0s;
|
|
182
|
-
}
|
|
183
|
-
|
|
184
|
-
.tap-target-wrapper:is(.open, :popover-open) .tap-target-wave::after {
|
|
185
|
-
animation: none;
|
|
186
|
-
}
|
|
187
|
-
}
|