@expressivecss/expressive 0.12.0 → 0.13.1
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 +231 -1
- package/README.md +37 -1
- package/dist/css/expressive.css +5111 -36
- 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/fonts/material-symbols-outlined.woff2 +0 -0
- package/dist/fonts/material-symbols-rounded.woff2 +0 -0
- package/dist/fonts/material-symbols-sharp.woff2 +0 -0
- package/dist/js/chunks/{chunk-HLDXZ7XB.mjs → chunk-3CLXLPYS.mjs} +2 -2
- package/dist/js/chunks/chunk-3DHK5CZU.mjs +105 -0
- package/dist/js/chunks/chunk-3DHK5CZU.mjs.map +7 -0
- package/dist/js/chunks/chunk-4PWAPV6F.mjs +7 -0
- package/dist/js/chunks/chunk-4PWAPV6F.mjs.map +7 -0
- package/dist/js/chunks/{chunk-HB6IW7QQ.mjs → chunk-55IA2XUC.mjs} +2 -2
- package/dist/js/chunks/chunk-CCWDV5CR.mjs +292 -0
- package/dist/js/chunks/chunk-CCWDV5CR.mjs.map +7 -0
- package/dist/js/chunks/chunk-DTKR54I6.mjs +270 -0
- package/dist/js/chunks/chunk-DTKR54I6.mjs.map +7 -0
- package/dist/js/chunks/chunk-GVGT6MIU.mjs +47 -0
- package/dist/js/chunks/chunk-GVGT6MIU.mjs.map +7 -0
- package/dist/js/chunks/chunk-HKT2S7VM.mjs +48 -0
- package/dist/js/chunks/chunk-HKT2S7VM.mjs.map +7 -0
- package/dist/js/chunks/chunk-K4CJCRGE.mjs +262 -0
- package/dist/js/chunks/chunk-K4CJCRGE.mjs.map +7 -0
- package/dist/js/chunks/chunk-LNCCYGPC.mjs +163 -0
- package/dist/js/chunks/chunk-LNCCYGPC.mjs.map +7 -0
- package/dist/js/chunks/chunk-NQLC3YMW.mjs +1 -0
- package/dist/js/chunks/chunk-O5XPWXIQ.mjs +406 -0
- package/dist/js/chunks/chunk-O5XPWXIQ.mjs.map +7 -0
- package/dist/js/chunks/chunk-P3G3QHII.mjs +166 -0
- package/dist/js/chunks/chunk-P3G3QHII.mjs.map +7 -0
- package/dist/js/chunks/{chunk-H2WA4XHH.mjs → chunk-PLYXLSH3.mjs} +4 -4
- package/dist/js/chunks/chunk-QKWPQK5N.mjs +179 -0
- package/dist/js/chunks/chunk-QKWPQK5N.mjs.map +7 -0
- package/dist/js/chunks/chunk-RHRQKTTX.mjs +139 -0
- package/dist/js/chunks/chunk-RHRQKTTX.mjs.map +7 -0
- package/dist/js/chunks/chunk-SPETGK25.mjs +59 -0
- package/dist/js/chunks/chunk-SPETGK25.mjs.map +7 -0
- package/dist/js/chunks/{chunk-YSBCHYXP.mjs → chunk-U2OTHOTI.mjs} +116 -12
- package/dist/js/chunks/chunk-U2OTHOTI.mjs.map +7 -0
- package/dist/js/chunks/chunk-VTLBW7QS.mjs +124 -0
- package/dist/js/chunks/chunk-VTLBW7QS.mjs.map +7 -0
- package/dist/js/chunks/{chunk-RFZZCYVU.mjs → chunk-XGHORT7J.mjs} +2 -2
- package/dist/js/chunks/{chunk-HNFSMIBY.mjs → chunk-XH6BEEMY.mjs} +69 -16
- package/dist/js/chunks/chunk-XH6BEEMY.mjs.map +7 -0
- package/dist/js/expressive.cjs +2209 -32
- package/dist/js/expressive.cjs.map +4 -4
- package/dist/js/expressive.js +2209 -32
- package/dist/js/expressive.js.map +4 -4
- package/dist/js/expressive.min.js +10 -10
- package/dist/js/expressive.min.js.map +4 -4
- package/dist/js/expressive.mjs +68 -20
- package/dist/js/expressive.mjs.map +1 -1
- package/dist/js/internal/behaviors/forms.mjs +1 -1
- package/dist/js/internal/components/autocomplete.mjs +2 -2
- package/dist/js/internal/components/barChart.mjs +10 -0
- package/dist/js/internal/components/barChart.mjs.map +7 -0
- package/dist/js/internal/components/chips.mjs +3 -3
- package/dist/js/internal/components/columnChart.mjs +9 -0
- package/dist/js/internal/components/columnChart.mjs.map +7 -0
- package/dist/js/internal/components/commandPalette.mjs +9 -0
- package/dist/js/internal/components/commandPalette.mjs.map +7 -0
- package/dist/js/internal/components/datepicker.mjs +3 -3
- package/dist/js/internal/components/heatmapChart.mjs +9 -0
- package/dist/js/internal/components/heatmapChart.mjs.map +7 -0
- package/dist/js/internal/components/index.mjs +65 -17
- package/dist/js/internal/components/lineChart.mjs +12 -0
- package/dist/js/internal/components/lineChart.mjs.map +7 -0
- package/dist/js/internal/components/menu.mjs +1 -1
- package/dist/js/internal/components/messageScroller.mjs +9 -0
- package/dist/js/internal/components/messageScroller.mjs.map +7 -0
- package/dist/js/internal/components/mixedChart.mjs +10 -0
- package/dist/js/internal/components/mixedChart.mjs.map +7 -0
- package/dist/js/internal/components/pieChart.mjs +9 -0
- package/dist/js/internal/components/pieChart.mjs.map +7 -0
- package/dist/js/internal/components/questionnaire.mjs +9 -0
- package/dist/js/internal/components/questionnaire.mjs.map +7 -0
- package/dist/js/internal/components/radarChart.mjs +9 -0
- package/dist/js/internal/components/radarChart.mjs.map +7 -0
- package/dist/js/internal/components/radialChart.mjs +9 -0
- package/dist/js/internal/components/radialChart.mjs.map +7 -0
- package/dist/js/internal/components/registry.mjs +23 -11
- package/dist/js/internal/components/richTextEditor.mjs +9 -0
- package/dist/js/internal/components/richTextEditor.mjs.map +7 -0
- package/dist/js/internal/components/select.mjs +2 -2
- package/dist/js/modular.mjs +68 -20
- package/dist/types/behaviors/forms.d.ts +22 -0
- package/dist/types/components/barChart.d.ts +24 -0
- package/dist/types/components/columnChart.d.ts +21 -0
- package/dist/types/components/commandPalette.d.ts +96 -0
- package/dist/types/components/heatmapChart.d.ts +49 -0
- package/dist/types/components/index.d.ts +12 -0
- package/dist/types/components/lineChart.d.ts +134 -0
- package/dist/types/components/menu.d.ts +31 -0
- package/dist/types/components/messageScroller.d.ts +111 -0
- package/dist/types/components/mixedChart.d.ts +25 -0
- package/dist/types/components/pieChart.d.ts +40 -0
- package/dist/types/components/questionnaire.d.ts +96 -0
- package/dist/types/components/radarChart.d.ts +39 -0
- package/dist/types/components/radialChart.d.ts +45 -0
- package/dist/types/components/registry.d.ts +44 -0
- package/dist/types/components/richTextEditor.d.ts +71 -0
- package/dist/types/modular.d.ts +10 -1
- package/package.json +4 -1
- package/src/sass/README.md +3 -6
- package/src/sass/abstracts/_index.scss +1 -1
- package/src/sass/abstracts/_mixins.scss +226 -0
- package/src/sass/abstracts/_variables.scss +14 -0
- package/src/sass/base/_typography.scss +45 -0
- package/src/sass/components/_accordion.scss +161 -0
- package/src/sass/components/_aura.scss +119 -0
- package/src/sass/components/_avatar.scss +86 -0
- package/src/sass/components/_bar-chart.scss +285 -0
- package/src/sass/components/_bottom-sheet.scss +1 -0
- package/src/sass/components/_button-groups.scss +13 -3
- package/src/sass/components/_cards.scss +16 -13
- package/src/sass/components/_column-chart.scss +134 -0
- package/src/sass/components/_command-palette.scss +140 -0
- package/src/sass/components/_countdown.scss +89 -0
- package/src/sass/components/_data-table.scss +188 -0
- package/src/sass/components/_dialog.scss +1 -0
- package/src/sass/components/_empty-state.scss +78 -0
- package/src/sass/components/_expanding-card.scss +3 -0
- package/src/sass/components/_heatmap-chart.scss +156 -0
- package/src/sass/components/_index.scss +27 -0
- package/src/sass/components/_kpi.scss +162 -0
- package/src/sass/components/_line-chart.scss +102 -0
- package/src/sass/components/_marquee.scss +111 -0
- package/src/sass/components/_menu.scss +10 -0
- package/src/sass/components/_message-scroller.scss +66 -0
- package/src/sass/components/_message.scss +202 -0
- package/src/sass/components/_mixed-chart.scss +157 -0
- package/src/sass/components/_navigation-bar.scss +1 -0
- package/src/sass/components/_navigation-rail.scss +9 -0
- package/src/sass/components/_pie-chart.scss +203 -0
- package/src/sass/components/_popover.scss +112 -0
- package/src/sass/components/_questionnaire.scss +144 -0
- package/src/sass/components/_radar-chart.scss +205 -0
- package/src/sass/components/_radial-chart.scss +174 -0
- package/src/sass/components/_rich-text-editor.scss +99 -0
- package/src/sass/components/_search.scss +1 -0
- package/src/sass/components/_side-sheet.scss +1 -0
- package/src/sass/components/_skeleton.scss +81 -0
- package/src/sass/components/_snackbar.scss +1 -0
- package/src/sass/components/_stat.scss +86 -0
- package/src/sass/components/_stepper.scss +190 -0
- package/src/sass/components/_timeline.scss +114 -0
- package/src/sass/components/_toolbar.scss +1 -0
- package/src/sass/components/_tooltip.scss +2 -0
- package/src/sass/components/_tree.scss +139 -0
- package/src/sass/components/forms/_drop-zone.scss +128 -0
- package/src/sass/components/forms/_index.scss +2 -0
- package/src/sass/components/forms/_input-fields.scss +133 -2
- package/src/sass/components/forms/_rating.scss +165 -0
- package/src/sass/tokens/_reference.scss +3 -15
- package/src/sass/utilities/_index.scss +2 -0
- package/src/sass/utilities/_scroll-area.scss +35 -0
- package/src/sass/utilities/_shapes.scss +164 -0
- package/dist/js/chunks/chunk-G3I5H2U3.mjs +0 -7
- package/dist/js/chunks/chunk-G3I5H2U3.mjs.map +0 -7
- package/dist/js/chunks/chunk-HNFSMIBY.mjs.map +0 -7
- package/dist/js/chunks/chunk-PSSHQWCX.mjs +0 -100
- package/dist/js/chunks/chunk-PSSHQWCX.mjs.map +0 -7
- package/dist/js/chunks/chunk-WWPAPHMA.mjs +0 -1
- package/dist/js/chunks/chunk-YSBCHYXP.mjs.map +0 -7
- /package/dist/js/chunks/{chunk-HLDXZ7XB.mjs.map → chunk-3CLXLPYS.mjs.map} +0 -0
- /package/dist/js/chunks/{chunk-HB6IW7QQ.mjs.map → chunk-55IA2XUC.mjs.map} +0 -0
- /package/dist/js/chunks/{chunk-WWPAPHMA.mjs.map → chunk-NQLC3YMW.mjs.map} +0 -0
- /package/dist/js/chunks/{chunk-H2WA4XHH.mjs.map → chunk-PLYXLSH3.mjs.map} +0 -0
- /package/dist/js/chunks/{chunk-RFZZCYVU.mjs.map → chunk-XGHORT7J.mjs.map} +0 -0
|
@@ -0,0 +1,190 @@
|
|
|
1
|
+
@use "../abstracts" as *;
|
|
2
|
+
|
|
3
|
+
// Stepper. An <ol class="stepper"> shows where the user is in a fixed
|
|
4
|
+
// sequence of steps, such as a checkout. Each <li> is a step; its text, or a
|
|
5
|
+
// link back to a finished step, is the label. The list numbers the steps.
|
|
6
|
+
//
|
|
7
|
+
// State is markup the page keeps current:
|
|
8
|
+
// aria-current="step" the step the user is on
|
|
9
|
+
// .complete a finished step: the number becomes a check
|
|
10
|
+
// .invalid a step that needs attention: the number becomes "!"
|
|
11
|
+
// The check and "!" are also spoken, through the alt text of the indicator;
|
|
12
|
+
// the two labels are tokens so a page can translate them.
|
|
13
|
+
//
|
|
14
|
+
// Each step is a small grid: indicator, label and connector on the first row,
|
|
15
|
+
// an optional <small> supporting line under the label, and in .vertical an
|
|
16
|
+
// optional .stepper-content panel under that.
|
|
17
|
+
//
|
|
18
|
+
// Tokens:
|
|
19
|
+
// --md-comp-stepper-indicator-size 24px
|
|
20
|
+
// --md-comp-stepper-connector-color outline-variant / complete: primary
|
|
21
|
+
// --md-comp-stepper-active-color primary
|
|
22
|
+
// --md-comp-stepper-complete-label "Completed"
|
|
23
|
+
// --md-comp-stepper-error-label "Error"
|
|
24
|
+
|
|
25
|
+
$_stepper-check: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M9.55 18 3.85 12.3l1.43-1.43 4.27 4.28 9.17-9.18 1.43 1.43z'/%3E%3C/svg%3E");
|
|
26
|
+
$_stepper-alert: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M11 14V6h2v8zm0 4v-2h2v2z'/%3E%3C/svg%3E");
|
|
27
|
+
|
|
28
|
+
.stepper {
|
|
29
|
+
--md-comp-stepper-indicator-size: 24px;
|
|
30
|
+
--md-comp-stepper-connector-color: var(--md-sys-color-outline-variant);
|
|
31
|
+
--md-comp-stepper-active-color: var(--md-sys-color-primary);
|
|
32
|
+
--md-comp-stepper-complete-label: "Completed";
|
|
33
|
+
--md-comp-stepper-error-label: "Error";
|
|
34
|
+
|
|
35
|
+
// Steps never squeeze below their label; a row too narrow for all of them
|
|
36
|
+
// wraps rather than overlapping. Use .vertical where that is the norm.
|
|
37
|
+
display: flex;
|
|
38
|
+
flex-wrap: wrap;
|
|
39
|
+
gap: 8px;
|
|
40
|
+
margin: $element-top-margin 0 $element-bottom-margin;
|
|
41
|
+
padding: 0;
|
|
42
|
+
list-style: none;
|
|
43
|
+
counter-reset: stepper;
|
|
44
|
+
|
|
45
|
+
> li {
|
|
46
|
+
display: grid;
|
|
47
|
+
flex: 1 1 auto;
|
|
48
|
+
grid-template-columns: auto auto minmax(16px, 1fr);
|
|
49
|
+
grid-template-rows: auto auto;
|
|
50
|
+
column-gap: 8px;
|
|
51
|
+
align-items: center;
|
|
52
|
+
margin: 0;
|
|
53
|
+
counter-increment: stepper;
|
|
54
|
+
color: var(--md-sys-color-on-surface-variant);
|
|
55
|
+
@include typescale("title-small");
|
|
56
|
+
|
|
57
|
+
// The number is already the list position, so it is not spoken again.
|
|
58
|
+
&::before {
|
|
59
|
+
content: counter(stepper) / "";
|
|
60
|
+
grid-column: 1;
|
|
61
|
+
grid-row: 1;
|
|
62
|
+
box-sizing: border-box;
|
|
63
|
+
display: inline-flex;
|
|
64
|
+
align-items: center;
|
|
65
|
+
justify-content: center;
|
|
66
|
+
width: var(--md-comp-stepper-indicator-size);
|
|
67
|
+
height: var(--md-comp-stepper-indicator-size);
|
|
68
|
+
border: 1px solid var(--md-sys-color-outline);
|
|
69
|
+
border-radius: 50%;
|
|
70
|
+
@include typescale("label-medium");
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
&::after {
|
|
74
|
+
content: "";
|
|
75
|
+
grid-column: 3;
|
|
76
|
+
grid-row: 1;
|
|
77
|
+
height: 1px;
|
|
78
|
+
min-width: 16px;
|
|
79
|
+
background-color: var(--md-comp-stepper-connector-color);
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
&:last-child {
|
|
83
|
+
flex: none;
|
|
84
|
+
|
|
85
|
+
&::after {
|
|
86
|
+
content: none;
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
// Supporting text may run under the connector rather than wrap word by word.
|
|
91
|
+
> small {
|
|
92
|
+
grid-column: 2 / -1;
|
|
93
|
+
grid-row: 2;
|
|
94
|
+
color: var(--md-sys-color-on-surface-variant);
|
|
95
|
+
@include typescale("body-small");
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
> a {
|
|
99
|
+
color: inherit;
|
|
100
|
+
border-radius: 4px;
|
|
101
|
+
text-decoration: underline;
|
|
102
|
+
text-underline-offset: 2px;
|
|
103
|
+
@include focus-visible;
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
> li[aria-current="step"] {
|
|
108
|
+
color: var(--md-sys-color-on-surface);
|
|
109
|
+
|
|
110
|
+
&::before {
|
|
111
|
+
border-color: var(--md-comp-stepper-active-color);
|
|
112
|
+
background-color: var(--md-comp-stepper-active-color);
|
|
113
|
+
color: var(--md-sys-color-on-primary);
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
// The glyph is knocked out of the filled circle, so it takes the color of
|
|
118
|
+
// whatever surface the stepper sits on.
|
|
119
|
+
> li:is(.complete, .invalid)::before {
|
|
120
|
+
border: 0;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
> li.complete {
|
|
124
|
+
--md-comp-stepper-connector-color: var(--md-comp-stepper-active-color);
|
|
125
|
+
|
|
126
|
+
color: var(--md-sys-color-on-surface);
|
|
127
|
+
|
|
128
|
+
&::before {
|
|
129
|
+
content: "" / var(--md-comp-stepper-complete-label);
|
|
130
|
+
background-color: var(--md-comp-stepper-active-color);
|
|
131
|
+
mask: $_stepper-check center / 18px no-repeat exclude, linear-gradient(#000 0 0);
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
> li.invalid {
|
|
136
|
+
color: var(--md-sys-color-error);
|
|
137
|
+
|
|
138
|
+
&::before {
|
|
139
|
+
content: "" / var(--md-comp-stepper-error-label);
|
|
140
|
+
background-color: var(--md-sys-color-error);
|
|
141
|
+
mask: $_stepper-alert center / 18px no-repeat exclude, linear-gradient(#000 0 0);
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
&.vertical {
|
|
146
|
+
flex-direction: column;
|
|
147
|
+
gap: 0;
|
|
148
|
+
|
|
149
|
+
> li {
|
|
150
|
+
flex: none;
|
|
151
|
+
grid-template-columns: auto minmax(0, 1fr);
|
|
152
|
+
grid-template-rows: auto auto 1fr;
|
|
153
|
+
|
|
154
|
+
> small {
|
|
155
|
+
grid-column: 2;
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
&::after {
|
|
159
|
+
grid-column: 1;
|
|
160
|
+
grid-row: 2 / -1;
|
|
161
|
+
justify-self: center;
|
|
162
|
+
width: 1px;
|
|
163
|
+
height: auto;
|
|
164
|
+
min-width: 0;
|
|
165
|
+
min-height: 16px;
|
|
166
|
+
margin-block: 4px;
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
&:last-child::after {
|
|
170
|
+
content: none;
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
> .stepper-content {
|
|
174
|
+
grid-column: 2;
|
|
175
|
+
grid-row: 3;
|
|
176
|
+
padding-block: 8px 16px;
|
|
177
|
+
color: var(--md-sys-color-on-surface-variant);
|
|
178
|
+
@include typescale("body-medium");
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
@media (forced-colors: active) {
|
|
185
|
+
.stepper > li:is([aria-current="step"], .complete, .invalid)::before {
|
|
186
|
+
forced-color-adjust: none;
|
|
187
|
+
background-color: Highlight;
|
|
188
|
+
color: HighlightText;
|
|
189
|
+
}
|
|
190
|
+
}
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
@use "../abstracts" as *;
|
|
2
|
+
|
|
3
|
+
// Timeline. An <ol class="timeline"> lists events in order, newest first or
|
|
4
|
+
// oldest first as the page decides. Each <li> is an event: an optional
|
|
5
|
+
// <time>, a heading and supporting text. A dot marks each event and a line
|
|
6
|
+
// joins it to the next.
|
|
7
|
+
//
|
|
8
|
+
// A leading icon as the first child replaces the dot with a tonal circle.
|
|
9
|
+
//
|
|
10
|
+
// Tokens:
|
|
11
|
+
// --md-comp-timeline-marker-color primary
|
|
12
|
+
// --md-comp-timeline-connector-color outline-variant
|
|
13
|
+
// --md-comp-timeline-gap 24px (between events)
|
|
14
|
+
|
|
15
|
+
.timeline {
|
|
16
|
+
--md-comp-timeline-marker-color: var(--md-sys-color-primary);
|
|
17
|
+
--md-comp-timeline-connector-color: var(--md-sys-color-outline-variant);
|
|
18
|
+
--md-comp-timeline-gap: 24px;
|
|
19
|
+
|
|
20
|
+
margin: $element-top-margin 0 $element-bottom-margin;
|
|
21
|
+
padding: 0;
|
|
22
|
+
list-style: none;
|
|
23
|
+
|
|
24
|
+
> li {
|
|
25
|
+
position: relative;
|
|
26
|
+
margin: 0;
|
|
27
|
+
padding-block-end: var(--md-comp-timeline-gap);
|
|
28
|
+
padding-inline-start: 32px;
|
|
29
|
+
color: var(--md-sys-color-on-surface);
|
|
30
|
+
|
|
31
|
+
// The dot sits level with the first line of text.
|
|
32
|
+
&::before {
|
|
33
|
+
content: "";
|
|
34
|
+
position: absolute;
|
|
35
|
+
inset-block-start: 4px;
|
|
36
|
+
inset-inline-start: 4px;
|
|
37
|
+
box-sizing: border-box;
|
|
38
|
+
width: 12px;
|
|
39
|
+
height: 12px;
|
|
40
|
+
border-radius: 50%;
|
|
41
|
+
background-color: var(--md-comp-timeline-marker-color);
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
&::after {
|
|
45
|
+
content: "";
|
|
46
|
+
position: absolute;
|
|
47
|
+
inset-block: 20px 0;
|
|
48
|
+
inset-inline-start: 9.5px;
|
|
49
|
+
width: 1px;
|
|
50
|
+
background-color: var(--md-comp-timeline-connector-color);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
&:last-child {
|
|
54
|
+
padding-block-end: 0;
|
|
55
|
+
|
|
56
|
+
&::after {
|
|
57
|
+
content: none;
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
> time {
|
|
62
|
+
display: block;
|
|
63
|
+
color: var(--md-sys-color-on-surface-variant);
|
|
64
|
+
@include typescale("label-medium");
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
> :is(h1, h2, h3, h4, h5, h6) {
|
|
68
|
+
margin: 0;
|
|
69
|
+
@include typescale("title-small");
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
> p {
|
|
73
|
+
margin: 4px 0 0;
|
|
74
|
+
color: var(--md-sys-color-on-surface-variant);
|
|
75
|
+
@include typescale("body-medium");
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
// A leading icon takes the dot's place in a 32px tonal circle.
|
|
80
|
+
> li:has(> #{$icon}:first-child) {
|
|
81
|
+
padding-inline-start: 48px;
|
|
82
|
+
|
|
83
|
+
&::before {
|
|
84
|
+
content: none;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
&::after {
|
|
88
|
+
inset-block-start: 36px;
|
|
89
|
+
inset-inline-start: 15.5px;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
> #{$icon}:first-child {
|
|
93
|
+
position: absolute;
|
|
94
|
+
inset-block-start: 0;
|
|
95
|
+
inset-inline-start: 0;
|
|
96
|
+
display: inline-flex;
|
|
97
|
+
align-items: center;
|
|
98
|
+
justify-content: center;
|
|
99
|
+
width: 32px;
|
|
100
|
+
height: 32px;
|
|
101
|
+
border-radius: 50%;
|
|
102
|
+
background-color: var(--md-sys-color-secondary-container);
|
|
103
|
+
color: var(--md-sys-color-on-secondary-container);
|
|
104
|
+
font-size: 18px;
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
@media (forced-colors: active) {
|
|
110
|
+
.timeline > li::before {
|
|
111
|
+
forced-color-adjust: none;
|
|
112
|
+
background-color: CanvasText;
|
|
113
|
+
}
|
|
114
|
+
}
|
|
@@ -87,6 +87,7 @@ $_vibrant: "#{$_toolbar}:is(.vibrant, .filled)";
|
|
|
87
87
|
border-radius: var(--md-comp-toolbar-container-shape);
|
|
88
88
|
background-color: var(--md-comp-toolbar-container-color);
|
|
89
89
|
color: var(--md-comp-toolbar-color);
|
|
90
|
+
@include glass(var(--md-comp-toolbar-container-color));
|
|
90
91
|
|
|
91
92
|
& + & {
|
|
92
93
|
margin-block-start: 16px;
|
|
@@ -41,6 +41,7 @@
|
|
|
41
41
|
overflow-wrap: anywhere;
|
|
42
42
|
pointer-events: auto;
|
|
43
43
|
z-index: 2000;
|
|
44
|
+
@include glass(var(--md-comp-plain-tooltip-container-color));
|
|
44
45
|
}
|
|
45
46
|
|
|
46
47
|
// CSS-only: a child of the activator. Default sits above (M3 preferred).
|
|
@@ -137,6 +138,7 @@ body > .tooltip {
|
|
|
137
138
|
white-space: normal;
|
|
138
139
|
pointer-events: auto;
|
|
139
140
|
@include z-depth("2");
|
|
141
|
+
@include glass(var(--md-comp-rich-tooltip-container-color));
|
|
140
142
|
|
|
141
143
|
> :is(h1, h2, h3, h4, h5, h6) {
|
|
142
144
|
margin: 0;
|
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
@use "../abstracts" as *;
|
|
2
|
+
|
|
3
|
+
// Tree. A <ul class="tree"> of nested lists, for file browsers and deep
|
|
4
|
+
// navigation. A branch is an <li> holding a <details>: its <summary> is the
|
|
5
|
+
// row and its nested <ul> the children. A leaf is an <li> holding a link or
|
|
6
|
+
// a span. aria-current marks the selected row.
|
|
7
|
+
//
|
|
8
|
+
// It is a set of disclosures and links, not role="tree": every row is a Tab
|
|
9
|
+
// stop and the browser owns opening a branch. A tree role would promise
|
|
10
|
+
// arrow-key navigation that native disclosures do not provide.
|
|
11
|
+
//
|
|
12
|
+
// Tokens:
|
|
13
|
+
// --md-comp-tree-row-height 40px
|
|
14
|
+
// --md-comp-tree-row-shape 100px (pill)
|
|
15
|
+
// --md-comp-tree-guide-color outline-variant
|
|
16
|
+
// --md-comp-tree-selected-container-color secondary-container
|
|
17
|
+
|
|
18
|
+
$_tree-chevron: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 15.4 6 9.4 7.4 8l4.6 4.6L16.6 8 18 9.4z'/%3E%3C/svg%3E");
|
|
19
|
+
|
|
20
|
+
.tree {
|
|
21
|
+
--md-comp-tree-row-height: 40px;
|
|
22
|
+
--md-comp-tree-row-shape: 100px;
|
|
23
|
+
--md-comp-tree-guide-color: var(--md-sys-color-outline-variant);
|
|
24
|
+
--md-comp-tree-selected-container-color: var(--md-sys-color-secondary-container);
|
|
25
|
+
|
|
26
|
+
margin: $element-top-margin 0 $element-bottom-margin;
|
|
27
|
+
padding: 0;
|
|
28
|
+
list-style: none;
|
|
29
|
+
color: var(--md-sys-color-on-surface-variant);
|
|
30
|
+
|
|
31
|
+
// Each level hangs a guide line from the centre of its parent's chevron
|
|
32
|
+
// (12px inset + half the 20px chevron) and indents past it.
|
|
33
|
+
ul {
|
|
34
|
+
margin: 0;
|
|
35
|
+
margin-inline-start: 22px;
|
|
36
|
+
padding: 0;
|
|
37
|
+
padding-inline-start: 6px;
|
|
38
|
+
border-inline-start: 1px solid var(--md-comp-tree-guide-color);
|
|
39
|
+
list-style: none;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
li {
|
|
43
|
+
margin: 0;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
li > :is(a, span),
|
|
47
|
+
li > details > summary {
|
|
48
|
+
box-sizing: border-box;
|
|
49
|
+
display: flex;
|
|
50
|
+
align-items: center;
|
|
51
|
+
gap: 8px;
|
|
52
|
+
min-height: var(--md-comp-tree-row-height);
|
|
53
|
+
padding-inline: 12px 16px;
|
|
54
|
+
border-radius: var(--md-comp-tree-row-shape);
|
|
55
|
+
color: inherit;
|
|
56
|
+
text-decoration: none;
|
|
57
|
+
@include typescale("label-large");
|
|
58
|
+
|
|
59
|
+
> #{$icon} {
|
|
60
|
+
flex: none;
|
|
61
|
+
font-size: 20px;
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
// A leaf lines its text up with a branch's text, after the chevron.
|
|
66
|
+
li > :is(a, span) {
|
|
67
|
+
padding-inline-start: calc(12px + 20px + 8px);
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
li > a,
|
|
71
|
+
li > details > summary {
|
|
72
|
+
cursor: pointer;
|
|
73
|
+
@include focus-visible;
|
|
74
|
+
|
|
75
|
+
&:hover {
|
|
76
|
+
background-color: color-mix(
|
|
77
|
+
in oklab,
|
|
78
|
+
var(--md-sys-color-on-surface) state-opacity("hover"),
|
|
79
|
+
transparent
|
|
80
|
+
);
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
li > details > summary {
|
|
85
|
+
list-style: none;
|
|
86
|
+
user-select: none;
|
|
87
|
+
|
|
88
|
+
&::-webkit-details-marker {
|
|
89
|
+
display: none;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
// Points to the end edge while closed and down once open.
|
|
93
|
+
&::before {
|
|
94
|
+
content: "";
|
|
95
|
+
flex: none;
|
|
96
|
+
width: 20px;
|
|
97
|
+
height: 20px;
|
|
98
|
+
background-color: currentColor;
|
|
99
|
+
mask: $_tree-chevron center / 20px no-repeat;
|
|
100
|
+
transform: rotate(-90deg);
|
|
101
|
+
transition: transform 150ms ease-out;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
&:dir(rtl)::before {
|
|
105
|
+
transform: rotate(90deg);
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
li > details[open] > summary::before {
|
|
110
|
+
transform: none;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
:is(li > a, li > span, li > details > summary)[aria-current]:not([aria-current="false"]) {
|
|
114
|
+
background-color: var(--md-comp-tree-selected-container-color);
|
|
115
|
+
color: var(--md-sys-color-on-secondary-container);
|
|
116
|
+
|
|
117
|
+
> #{$icon} {
|
|
118
|
+
--md-icon-fill: 1;
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
@media (prefers-reduced-motion: reduce) {
|
|
123
|
+
li > details > summary::before {
|
|
124
|
+
transition: none;
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
@media (forced-colors: active) {
|
|
129
|
+
li > details > summary::before {
|
|
130
|
+
forced-color-adjust: none;
|
|
131
|
+
background-color: CanvasText;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
[aria-current]:not([aria-current="false"]) {
|
|
135
|
+
outline: 2px solid Highlight;
|
|
136
|
+
outline-offset: -2px;
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
}
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
@use "../../abstracts" as *;
|
|
2
|
+
|
|
3
|
+
// Drop zone. A .drop-zone is a large target for choosing files: a <label>
|
|
4
|
+
// holding an icon, a prompt and a native <input type="file">, with an
|
|
5
|
+
// optional .drop-zone-files list after it.
|
|
6
|
+
//
|
|
7
|
+
// The input is stretched invisibly over the whole label, so the browser
|
|
8
|
+
// takes a click, a keypress or a dropped file exactly as it does on a plain
|
|
9
|
+
// file input. The Forms behavior adds .dragover while files are dragged over
|
|
10
|
+
// it and fills .drop-zone-files with each chosen file's name and size.
|
|
11
|
+
//
|
|
12
|
+
// Tokens:
|
|
13
|
+
// --md-comp-drop-zone-shape 16px
|
|
14
|
+
// --md-comp-drop-zone-outline-color outline
|
|
15
|
+
// --md-comp-drop-zone-dragover-container-color primary-container
|
|
16
|
+
// --md-comp-drop-zone-dragover-color on-primary-container
|
|
17
|
+
|
|
18
|
+
.drop-zone {
|
|
19
|
+
--md-comp-drop-zone-shape: 16px;
|
|
20
|
+
--md-comp-drop-zone-outline-color: var(--md-sys-color-outline);
|
|
21
|
+
--md-comp-drop-zone-dragover-container-color: var(--md-sys-color-primary-container);
|
|
22
|
+
--md-comp-drop-zone-dragover-color: var(--md-sys-color-on-primary-container);
|
|
23
|
+
|
|
24
|
+
margin: $element-top-margin 0 $element-bottom-margin;
|
|
25
|
+
|
|
26
|
+
> label {
|
|
27
|
+
position: relative;
|
|
28
|
+
box-sizing: border-box;
|
|
29
|
+
display: flex;
|
|
30
|
+
flex-direction: column;
|
|
31
|
+
align-items: center;
|
|
32
|
+
gap: 4px;
|
|
33
|
+
padding: 32px 24px;
|
|
34
|
+
border: 1px dashed var(--md-comp-drop-zone-outline-color);
|
|
35
|
+
border-radius: var(--md-comp-drop-zone-shape);
|
|
36
|
+
text-align: center;
|
|
37
|
+
color: var(--md-sys-color-on-surface-variant);
|
|
38
|
+
cursor: pointer;
|
|
39
|
+
transition: background-color 0.2s ease-out, border-color 0.2s ease-out;
|
|
40
|
+
@include typescale("body-large");
|
|
41
|
+
|
|
42
|
+
> #{$icon} {
|
|
43
|
+
margin-block-end: 8px;
|
|
44
|
+
font-size: 32px;
|
|
45
|
+
color: var(--md-sys-color-primary);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
> small {
|
|
49
|
+
@include typescale("body-small");
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
> input[type="file"] {
|
|
53
|
+
position: absolute;
|
|
54
|
+
inset: 0;
|
|
55
|
+
width: 100%;
|
|
56
|
+
height: 100%;
|
|
57
|
+
margin: 0;
|
|
58
|
+
padding: 0;
|
|
59
|
+
opacity: 0;
|
|
60
|
+
cursor: pointer;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
&:hover {
|
|
64
|
+
background-color: color-mix(
|
|
65
|
+
in oklab,
|
|
66
|
+
var(--md-sys-color-on-surface) state-opacity("hover"),
|
|
67
|
+
transparent
|
|
68
|
+
);
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
&:has(> input:focus-visible) {
|
|
72
|
+
@include focus-ring;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
&:has(> input:disabled) {
|
|
76
|
+
opacity: 0.38;
|
|
77
|
+
cursor: default;
|
|
78
|
+
pointer-events: none;
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
&.dragover > label {
|
|
83
|
+
border-style: solid;
|
|
84
|
+
border-color: var(--md-sys-color-primary);
|
|
85
|
+
background-color: var(--md-comp-drop-zone-dragover-container-color);
|
|
86
|
+
color: var(--md-comp-drop-zone-dragover-color);
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
> .drop-zone-files {
|
|
90
|
+
display: flex;
|
|
91
|
+
flex-direction: column;
|
|
92
|
+
gap: 2px;
|
|
93
|
+
margin: 8px 0 0;
|
|
94
|
+
padding: 0;
|
|
95
|
+
list-style: none;
|
|
96
|
+
|
|
97
|
+
> li {
|
|
98
|
+
display: flex;
|
|
99
|
+
justify-content: space-between;
|
|
100
|
+
gap: 16px;
|
|
101
|
+
padding: 8px 16px;
|
|
102
|
+
border-radius: 8px;
|
|
103
|
+
background-color: var(--md-sys-color-surface-container);
|
|
104
|
+
color: var(--md-sys-color-on-surface);
|
|
105
|
+
@include typescale("body-medium");
|
|
106
|
+
|
|
107
|
+
> :first-child {
|
|
108
|
+
min-width: 0;
|
|
109
|
+
overflow-wrap: anywhere;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
> :last-child:not(:first-child) {
|
|
113
|
+
flex: none;
|
|
114
|
+
color: var(--md-sys-color-on-surface-variant);
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
&:empty {
|
|
119
|
+
display: none;
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
@media (prefers-reduced-motion: reduce) {
|
|
125
|
+
.drop-zone > label {
|
|
126
|
+
transition: none;
|
|
127
|
+
}
|
|
128
|
+
}
|