@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,89 @@
|
|
|
1
|
+
@use "../abstracts" as *;
|
|
2
|
+
|
|
3
|
+
// Countdown. A number from 0 to 999 whose digits roll to the new value when
|
|
4
|
+
// it changes: <span class="countdown" style="--md-comp-countdown-value: 42">42</span>.
|
|
5
|
+
// Set the property and the text together. The text is the accessible value;
|
|
6
|
+
// it stays in the accessibility tree but text-indent pushes it past the
|
|
7
|
+
// clipped edge. The visible digits are two strips in ::before (00 to 99, the
|
|
8
|
+
// leading two digits) and ::after (0 to 9), moved up one line per step, with
|
|
9
|
+
// empty alt text so screen readers skip them.
|
|
10
|
+
//
|
|
11
|
+
// inline-flex, not inline-block: WebKit puts a clipped inline-block's
|
|
12
|
+
// baseline at its bottom edge, which lifted the digits off the line. A flex
|
|
13
|
+
// container takes the baseline of its text in every engine.
|
|
14
|
+
//
|
|
15
|
+
// The box is 1, 2 or 3ch wide, as many digits as the value has, or at least
|
|
16
|
+
// --md-comp-countdown-digits, which pads with leading zeros. Values clamp
|
|
17
|
+
// to 0–999. Size and color come from the surrounding text.
|
|
18
|
+
//
|
|
19
|
+
// Tokens, read with fallbacks so a page or container can set them too:
|
|
20
|
+
// --md-comp-countdown-value the number shown, set per element 0
|
|
21
|
+
// --md-comp-countdown-digits minimum digits, 1 to 3 1
|
|
22
|
+
// --md-comp-countdown-duration roll duration 400ms
|
|
23
|
+
// --md-comp-countdown-easing roll easing cubic-bezier(0.2, 0, 0, 1)
|
|
24
|
+
|
|
25
|
+
$_timing: var(--md-comp-countdown-duration, 400ms) var(--md-comp-countdown-easing, cubic-bezier(0.2, 0, 0, 1));
|
|
26
|
+
$_tens: "";
|
|
27
|
+
$_ones: "";
|
|
28
|
+
@for $i from 0 through 99 {
|
|
29
|
+
@if $i < 10 {
|
|
30
|
+
$_tens: $_tens + "0#{$i}\A ";
|
|
31
|
+
$_ones: $_ones + "#{$i}\A ";
|
|
32
|
+
} @else {
|
|
33
|
+
$_tens: $_tens + "#{$i}\A ";
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.countdown {
|
|
38
|
+
--_value: clamp(0, var(--md-comp-countdown-value, 0), 999);
|
|
39
|
+
--_lead: round(down, var(--_value) / 10);
|
|
40
|
+
--_digits: calc(
|
|
41
|
+
1
|
|
42
|
+
+ clamp(0, max(var(--md-comp-countdown-digits, 1) - 1, var(--_lead)), 1)
|
|
43
|
+
+ clamp(0, max(var(--md-comp-countdown-digits, 1) - 2, round(down, var(--_value) / 100)), 1)
|
|
44
|
+
);
|
|
45
|
+
|
|
46
|
+
position: relative;
|
|
47
|
+
display: inline-flex;
|
|
48
|
+
width: calc(var(--_digits) * 1ch);
|
|
49
|
+
height: 1em;
|
|
50
|
+
overflow: clip;
|
|
51
|
+
direction: ltr;
|
|
52
|
+
font-variant-numeric: tabular-nums;
|
|
53
|
+
line-height: 1em;
|
|
54
|
+
text-indent: 3ch;
|
|
55
|
+
white-space: nowrap;
|
|
56
|
+
transition: width $_timing;
|
|
57
|
+
|
|
58
|
+
&::before,
|
|
59
|
+
&::after {
|
|
60
|
+
position: absolute;
|
|
61
|
+
top: 0;
|
|
62
|
+
text-indent: 0;
|
|
63
|
+
white-space: pre;
|
|
64
|
+
transition: translate $_timing;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
// The left of this strip hangs past the box when the value is short.
|
|
68
|
+
&::before {
|
|
69
|
+
content: $_tens / "";
|
|
70
|
+
right: 1ch;
|
|
71
|
+
width: 2ch;
|
|
72
|
+
translate: 0 calc(var(--_lead) * -1em);
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
&::after {
|
|
76
|
+
content: $_ones / "";
|
|
77
|
+
right: 0;
|
|
78
|
+
width: 1ch;
|
|
79
|
+
translate: 0 calc(mod(var(--_value), 10) * -1em);
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
@media (prefers-reduced-motion: reduce) {
|
|
83
|
+
&,
|
|
84
|
+
&::before,
|
|
85
|
+
&::after {
|
|
86
|
+
transition: none;
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
}
|
|
@@ -0,0 +1,188 @@
|
|
|
1
|
+
@use "../abstracts" as *;
|
|
2
|
+
|
|
3
|
+
// Data table. A .data-table wraps one native <table> and is its scroll
|
|
4
|
+
// container, so the table keeps its element semantics: a <table> set to
|
|
5
|
+
// display:block can lose its table role in some engines.
|
|
6
|
+
//
|
|
7
|
+
// The header row sticks to the top of the wrapper. That only shows once the
|
|
8
|
+
// wrapper scrolls vertically, so give it a max-block-size. Cells use the
|
|
9
|
+
// separate border model because collapsed borders do not travel with a
|
|
10
|
+
// sticky header.
|
|
11
|
+
//
|
|
12
|
+
// Sorting and selection are page state written into the markup:
|
|
13
|
+
// th[aria-sort] a <button> in the header cell shows the sort arrow
|
|
14
|
+
// row checkbox a checked box in the first cell selects the row
|
|
15
|
+
// The framework only draws them; the page reorders rows.
|
|
16
|
+
//
|
|
17
|
+
// Tokens:
|
|
18
|
+
// --md-comp-data-table-container-color surface
|
|
19
|
+
// --md-comp-data-table-shape 12px
|
|
20
|
+
// --md-comp-data-table-outline-color outline-variant
|
|
21
|
+
// --md-comp-data-table-header-height 56px / dense 48px
|
|
22
|
+
// --md-comp-data-table-row-height 52px / dense 40px
|
|
23
|
+
// --md-comp-data-table-cell-padding 16px
|
|
24
|
+
// --md-comp-data-table-selected-container-color secondary-container
|
|
25
|
+
|
|
26
|
+
$_data-table-arrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M11 20V7.8l-5.6 5.6L4 12l8-8 8 8-1.4 1.4L13 7.8V20z'/%3E%3C/svg%3E");
|
|
27
|
+
|
|
28
|
+
.data-table {
|
|
29
|
+
--md-comp-data-table-container-color: var(--md-sys-color-surface);
|
|
30
|
+
--md-comp-data-table-shape: 12px;
|
|
31
|
+
--md-comp-data-table-outline-color: var(--md-sys-color-outline-variant);
|
|
32
|
+
--md-comp-data-table-header-height: 56px;
|
|
33
|
+
--md-comp-data-table-row-height: 52px;
|
|
34
|
+
--md-comp-data-table-cell-padding: 16px;
|
|
35
|
+
--md-comp-data-table-selected-container-color: var(--md-sys-color-secondary-container);
|
|
36
|
+
|
|
37
|
+
box-sizing: border-box;
|
|
38
|
+
max-width: 100%;
|
|
39
|
+
margin: $element-top-margin 0 $element-bottom-margin;
|
|
40
|
+
overflow: auto;
|
|
41
|
+
border: 1px solid var(--md-comp-data-table-outline-color);
|
|
42
|
+
border-radius: var(--md-comp-data-table-shape);
|
|
43
|
+
background-color: var(--md-comp-data-table-container-color);
|
|
44
|
+
color: var(--md-sys-color-on-surface);
|
|
45
|
+
@include focus-visible;
|
|
46
|
+
|
|
47
|
+
&.dense {
|
|
48
|
+
--md-comp-data-table-header-height: 48px;
|
|
49
|
+
--md-comp-data-table-row-height: 40px;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
> table {
|
|
53
|
+
width: 100%;
|
|
54
|
+
border-collapse: separate;
|
|
55
|
+
border-spacing: 0;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
> table > caption {
|
|
59
|
+
padding: 16px var(--md-comp-data-table-cell-padding) 8px;
|
|
60
|
+
text-align: start;
|
|
61
|
+
color: var(--md-sys-color-on-surface);
|
|
62
|
+
@include typescale("title-medium");
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
tr {
|
|
66
|
+
border: 0;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
:is(th, td) {
|
|
70
|
+
box-sizing: border-box;
|
|
71
|
+
height: var(--md-comp-data-table-row-height);
|
|
72
|
+
padding: 0 var(--md-comp-data-table-cell-padding);
|
|
73
|
+
border-bottom: 1px solid var(--md-comp-data-table-outline-color);
|
|
74
|
+
text-align: start;
|
|
75
|
+
vertical-align: middle;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
td {
|
|
79
|
+
@include typescale("body-medium");
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
tbody th {
|
|
83
|
+
@include typescale("body-medium");
|
|
84
|
+
font-weight: 500;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
> table > :is(tbody, tfoot):last-child > tr:last-child > :is(th, td) {
|
|
88
|
+
border-bottom: 0;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
> table > thead th {
|
|
92
|
+
position: sticky;
|
|
93
|
+
top: 0;
|
|
94
|
+
z-index: 1;
|
|
95
|
+
height: var(--md-comp-data-table-header-height);
|
|
96
|
+
background-color: var(--md-comp-data-table-container-color);
|
|
97
|
+
color: var(--md-sys-color-on-surface-variant);
|
|
98
|
+
white-space: nowrap;
|
|
99
|
+
@include typescale("title-small");
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
.numeric {
|
|
103
|
+
text-align: end;
|
|
104
|
+
font-variant-numeric: tabular-nums;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
> table > tbody > tr {
|
|
108
|
+
transition: background-color 0.2s ease-out;
|
|
109
|
+
|
|
110
|
+
&:hover {
|
|
111
|
+
background-color: color-mix(
|
|
112
|
+
in oklab,
|
|
113
|
+
var(--md-sys-color-on-surface) state-opacity("hover"),
|
|
114
|
+
transparent
|
|
115
|
+
);
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
&:has(> :first-child input[type="checkbox"]:checked) {
|
|
119
|
+
background-color: var(--md-comp-data-table-selected-container-color);
|
|
120
|
+
color: var(--md-sys-color-on-secondary-container);
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
// A checkbox cell hugs its box rather than taking a text column's width.
|
|
125
|
+
:is(th, td):has(> label > input[type="checkbox"]:only-child) {
|
|
126
|
+
width: 1px;
|
|
127
|
+
padding-inline-end: 0;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
// The sort control fills the header text and carries a trailing arrow.
|
|
131
|
+
th > button {
|
|
132
|
+
display: inline-flex;
|
|
133
|
+
align-items: center;
|
|
134
|
+
gap: 4px;
|
|
135
|
+
min-height: 40px;
|
|
136
|
+
margin: 0;
|
|
137
|
+
padding: 0;
|
|
138
|
+
border: 0;
|
|
139
|
+
border-radius: 4px;
|
|
140
|
+
background: none;
|
|
141
|
+
color: inherit;
|
|
142
|
+
font: inherit;
|
|
143
|
+
letter-spacing: inherit;
|
|
144
|
+
text-align: inherit;
|
|
145
|
+
cursor: pointer;
|
|
146
|
+
appearance: none;
|
|
147
|
+
@include focus-visible;
|
|
148
|
+
|
|
149
|
+
&::after {
|
|
150
|
+
content: "";
|
|
151
|
+
flex: none;
|
|
152
|
+
width: 18px;
|
|
153
|
+
height: 18px;
|
|
154
|
+
background-color: currentColor;
|
|
155
|
+
mask: $_data-table-arrow center / 18px no-repeat;
|
|
156
|
+
opacity: 0;
|
|
157
|
+
transition: opacity 0.2s ease-out, transform 0.2s ease-out;
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
&:hover::after {
|
|
161
|
+
opacity: 0.38;
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
// Numbers line up on their end edge, so the arrow leads their label.
|
|
166
|
+
th.numeric > button {
|
|
167
|
+
flex-direction: row-reverse;
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
th:is([aria-sort="ascending"], [aria-sort="descending"]) {
|
|
171
|
+
color: var(--md-sys-color-on-surface);
|
|
172
|
+
|
|
173
|
+
> button::after {
|
|
174
|
+
opacity: 1;
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
th[aria-sort="descending"] > button::after {
|
|
179
|
+
transform: rotate(180deg);
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
@media (forced-colors: active) {
|
|
184
|
+
.data-table th > button::after {
|
|
185
|
+
forced-color-adjust: none;
|
|
186
|
+
background-color: CanvasText;
|
|
187
|
+
}
|
|
188
|
+
}
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
@use "../abstracts" as *;
|
|
2
|
+
|
|
3
|
+
// Empty state. What a view shows when it has nothing to list yet, no search
|
|
4
|
+
// results, or no access: an optional icon or image, a heading, supporting
|
|
5
|
+
// text and actions, centered in the space the content would fill.
|
|
6
|
+
//
|
|
7
|
+
// Anatomy is the HTML, in order:
|
|
8
|
+
// icon or <img> a leading icon sits in a tonal circle; an image keeps its ratio
|
|
9
|
+
// h1–h6 the headline; pick the level the page outline needs
|
|
10
|
+
// <p> supporting text
|
|
11
|
+
// .empty-state-actions buttons or links
|
|
12
|
+
//
|
|
13
|
+
// Tokens:
|
|
14
|
+
// --md-comp-empty-state-padding 48px 24px
|
|
15
|
+
// --md-comp-empty-state-max-width 40ch (text)
|
|
16
|
+
// --md-comp-empty-state-icon-size 48px
|
|
17
|
+
// --md-comp-empty-state-icon-container-size 96px
|
|
18
|
+
// --md-comp-empty-state-icon-container-color surface-container-high
|
|
19
|
+
// --md-comp-empty-state-image-max-width 240px
|
|
20
|
+
|
|
21
|
+
.empty-state {
|
|
22
|
+
--md-comp-empty-state-padding: 48px 24px;
|
|
23
|
+
--md-comp-empty-state-max-width: 40ch;
|
|
24
|
+
--md-comp-empty-state-icon-size: 48px;
|
|
25
|
+
--md-comp-empty-state-icon-container-size: 96px;
|
|
26
|
+
--md-comp-empty-state-icon-container-color: var(--md-sys-color-surface-container-high);
|
|
27
|
+
--md-comp-empty-state-image-max-width: 240px;
|
|
28
|
+
|
|
29
|
+
box-sizing: border-box;
|
|
30
|
+
display: flex;
|
|
31
|
+
flex-direction: column;
|
|
32
|
+
align-items: center;
|
|
33
|
+
gap: 8px;
|
|
34
|
+
padding: var(--md-comp-empty-state-padding);
|
|
35
|
+
text-align: center;
|
|
36
|
+
color: var(--md-sys-color-on-surface);
|
|
37
|
+
|
|
38
|
+
> #{$icon}:first-child {
|
|
39
|
+
display: inline-flex;
|
|
40
|
+
align-items: center;
|
|
41
|
+
justify-content: center;
|
|
42
|
+
width: var(--md-comp-empty-state-icon-container-size);
|
|
43
|
+
height: var(--md-comp-empty-state-icon-container-size);
|
|
44
|
+
margin-block-end: 16px;
|
|
45
|
+
border-radius: 50%;
|
|
46
|
+
background-color: var(--md-comp-empty-state-icon-container-color);
|
|
47
|
+
color: var(--md-sys-color-on-surface-variant);
|
|
48
|
+
font-size: var(--md-comp-empty-state-icon-size);
|
|
49
|
+
--md-icon-optical-size: 48;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
> img:first-child {
|
|
53
|
+
max-width: min(100%, var(--md-comp-empty-state-image-max-width));
|
|
54
|
+
height: auto;
|
|
55
|
+
margin-block-end: 16px;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
> :is(h1, h2, h3, h4, h5, h6) {
|
|
59
|
+
max-width: var(--md-comp-empty-state-max-width);
|
|
60
|
+
margin: 0;
|
|
61
|
+
@include typescale("headline-small");
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
> p {
|
|
65
|
+
max-width: var(--md-comp-empty-state-max-width);
|
|
66
|
+
margin: 0;
|
|
67
|
+
color: var(--md-sys-color-on-surface-variant);
|
|
68
|
+
@include typescale("body-medium");
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
> .empty-state-actions {
|
|
72
|
+
display: flex;
|
|
73
|
+
flex-wrap: wrap;
|
|
74
|
+
justify-content: center;
|
|
75
|
+
gap: 8px;
|
|
76
|
+
margin-block-start: 16px;
|
|
77
|
+
}
|
|
78
|
+
}
|
|
@@ -43,6 +43,9 @@ dialog.expanding-card-dialog {
|
|
|
43
43
|
overflow-y: auto;
|
|
44
44
|
overscroll-behavior: contain;
|
|
45
45
|
background-color: var(--md-comp-expanding-card-container-color);
|
|
46
|
+
// Opaque, so the frost inherited from `dialog` would only cost a blur on
|
|
47
|
+
// every frame of the morph.
|
|
48
|
+
backdrop-filter: none;
|
|
46
49
|
color: var(--md-sys-color-on-surface);
|
|
47
50
|
border: 0;
|
|
48
51
|
border-radius: var(--md-comp-expanding-card-expanded-shape);
|
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
@use "../abstracts" as *;
|
|
2
|
+
|
|
3
|
+
// Heatmap chart. The same <figure>, <figcaption> and <table> as a line
|
|
4
|
+
// chart; HeatmapChart draws every cell of the table as a square of a grid,
|
|
5
|
+
// with the row headers at the inline start and the column headers below.
|
|
6
|
+
// The plot, tooltip and legend come from chart(); the plot is as tall as
|
|
7
|
+
// its rows, so --md-comp-heatmap-chart-height does not apply.
|
|
8
|
+
//
|
|
9
|
+
// Each cell carries --level, 0 for the lowest value and 1 for the highest,
|
|
10
|
+
// and mixes the color into the empty color by that much. A .gap cell has no
|
|
11
|
+
// value and draws no fill. Value text is black or white, whichever
|
|
12
|
+
// contrasts more with the cell's mix, in any theme.
|
|
13
|
+
//
|
|
14
|
+
// Modifiers: .values writes each cell's text on it.
|
|
15
|
+
//
|
|
16
|
+
// Tokens:
|
|
17
|
+
// --md-comp-heatmap-chart-row-height 32px
|
|
18
|
+
// --md-comp-heatmap-chart-gap 3px between cells
|
|
19
|
+
// --md-comp-heatmap-chart-shape 4px, the cell's corner radius
|
|
20
|
+
// --md-comp-heatmap-chart-color primary, the highest value
|
|
21
|
+
// --md-comp-heatmap-chart-empty-color surface-container-highest, the lowest
|
|
22
|
+
|
|
23
|
+
@include chart("heatmap-chart");
|
|
24
|
+
|
|
25
|
+
.heatmap-chart {
|
|
26
|
+
--md-comp-heatmap-chart-row-height: 32px;
|
|
27
|
+
--md-comp-heatmap-chart-gap: 3px;
|
|
28
|
+
--md-comp-heatmap-chart-shape: 4px;
|
|
29
|
+
--md-comp-heatmap-chart-color: var(--md-sys-color-primary);
|
|
30
|
+
--md-comp-heatmap-chart-empty-color: var(--md-sys-color-surface-container-highest);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
// The cells and the tooltip swatch share the mix.
|
|
34
|
+
.heatmap-chart-cell,
|
|
35
|
+
.heatmap-chart-tooltip > span {
|
|
36
|
+
--heatmap-chart-color: color-mix(
|
|
37
|
+
in oklab,
|
|
38
|
+
var(--md-comp-heatmap-chart-color) calc(var(--level, 0) * 100%),
|
|
39
|
+
var(--md-comp-heatmap-chart-empty-color)
|
|
40
|
+
);
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.heatmap-chart-plot {
|
|
44
|
+
height: auto;
|
|
45
|
+
border: 0;
|
|
46
|
+
background: none;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
.heatmap-chart-grid {
|
|
50
|
+
display: grid;
|
|
51
|
+
// Row labels take up to 40% of the width and end in an ellipsis past it.
|
|
52
|
+
grid-template-columns: fit-content(40%) repeat(var(--columns, 1), minmax(0, 1fr));
|
|
53
|
+
grid-template-rows: repeat(var(--rows, 1), var(--md-comp-heatmap-chart-row-height));
|
|
54
|
+
gap: var(--md-comp-heatmap-chart-gap);
|
|
55
|
+
color: var(--md-sys-color-on-surface-variant);
|
|
56
|
+
@include typescale("body-small");
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
.heatmap-chart-row,
|
|
60
|
+
.heatmap-chart-column {
|
|
61
|
+
overflow: hidden;
|
|
62
|
+
text-overflow: ellipsis;
|
|
63
|
+
white-space: nowrap;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
.heatmap-chart-row {
|
|
67
|
+
align-self: center;
|
|
68
|
+
padding-inline-end: 8px;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
.heatmap-chart-column {
|
|
72
|
+
padding-block-start: 4px;
|
|
73
|
+
text-align: center;
|
|
74
|
+
|
|
75
|
+
// A label that runs on over empty ones starts at its own column.
|
|
76
|
+
&.run {
|
|
77
|
+
text-align: start;
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
.heatmap-chart-cell {
|
|
82
|
+
display: flex;
|
|
83
|
+
align-items: center;
|
|
84
|
+
justify-content: center;
|
|
85
|
+
overflow: hidden;
|
|
86
|
+
min-width: 0;
|
|
87
|
+
border-radius: var(--md-comp-heatmap-chart-shape);
|
|
88
|
+
background-color: var(--heatmap-chart-color);
|
|
89
|
+
// White or black, whichever contrasts more. Y in XYZ D65 is the WCAG
|
|
90
|
+
// relative luminance; below 0.1791 white wins. The steep clamp leaves no
|
|
91
|
+
// gray between the two, and the white is D65 white.
|
|
92
|
+
--heatmap-chart-white: clamp(0, (0.1791 - y) * 1000000, 1);
|
|
93
|
+
|
|
94
|
+
color: color(
|
|
95
|
+
from var(--heatmap-chart-color) xyz-d65
|
|
96
|
+
calc(var(--heatmap-chart-white) * 0.9505) var(--heatmap-chart-white) calc(var(--heatmap-chart-white) * 1.089)
|
|
97
|
+
);
|
|
98
|
+
@include typescale("label-small");
|
|
99
|
+
font-variant-numeric: tabular-nums;
|
|
100
|
+
white-space: nowrap;
|
|
101
|
+
|
|
102
|
+
&.gap {
|
|
103
|
+
background: none;
|
|
104
|
+
box-shadow: inset 0 0 0 1px var(--md-comp-heatmap-chart-grid-color);
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
// Set by HeatmapChart.show().
|
|
108
|
+
&.active {
|
|
109
|
+
outline: 2px solid var(--md-sys-color-on-surface);
|
|
110
|
+
outline-offset: 1px;
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
.heatmap-chart-tooltip {
|
|
115
|
+
// A gap's swatch, outlined like its cell.
|
|
116
|
+
> span.gap::before {
|
|
117
|
+
background: none;
|
|
118
|
+
box-shadow: inset 0 0 0 1px var(--md-comp-heatmap-chart-grid-color);
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
translate: 8px 0;
|
|
122
|
+
|
|
123
|
+
&.end {
|
|
124
|
+
translate: calc(-100% - 8px) 0;
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
.heatmap-chart-legend {
|
|
129
|
+
align-items: center;
|
|
130
|
+
justify-content: end;
|
|
131
|
+
gap: 8px;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
.heatmap-chart-scale {
|
|
135
|
+
width: 96px;
|
|
136
|
+
height: 8px;
|
|
137
|
+
border-radius: 4px;
|
|
138
|
+
// From the lowest cell's shade to the highest's, set by HeatmapChart.
|
|
139
|
+
background: linear-gradient(
|
|
140
|
+
in oklab to var(--heatmap-chart-to, right),
|
|
141
|
+
color-mix(in oklab, var(--md-comp-heatmap-chart-color) calc(var(--low, 0) * 100%), var(--md-comp-heatmap-chart-empty-color)),
|
|
142
|
+
color-mix(in oklab, var(--md-comp-heatmap-chart-color) calc(var(--high, 1) * 100%), var(--md-comp-heatmap-chart-empty-color))
|
|
143
|
+
);
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
@media (forced-colors: active) {
|
|
147
|
+
// The shades are the data, so they keep their colors.
|
|
148
|
+
.heatmap-chart-cell,
|
|
149
|
+
.heatmap-chart-scale {
|
|
150
|
+
forced-color-adjust: none;
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
.heatmap-chart-cell.active {
|
|
154
|
+
outline-color: Highlight;
|
|
155
|
+
}
|
|
156
|
+
}
|
|
@@ -47,3 +47,30 @@
|
|
|
47
47
|
@forward "search";
|
|
48
48
|
@forward "drag-handle";
|
|
49
49
|
@forward "scrim";
|
|
50
|
+
@forward "message";
|
|
51
|
+
@forward "message-scroller";
|
|
52
|
+
@forward "rich-text-editor";
|
|
53
|
+
@forward "accordion";
|
|
54
|
+
@forward "data-table";
|
|
55
|
+
@forward "avatar";
|
|
56
|
+
@forward "skeleton";
|
|
57
|
+
@forward "empty-state";
|
|
58
|
+
@forward "countdown";
|
|
59
|
+
@forward "popover";
|
|
60
|
+
@forward "stepper";
|
|
61
|
+
@forward "timeline";
|
|
62
|
+
@forward "tree";
|
|
63
|
+
@forward "stat";
|
|
64
|
+
@forward "command-palette";
|
|
65
|
+
@forward "questionnaire";
|
|
66
|
+
@forward "line-chart";
|
|
67
|
+
@forward "column-chart";
|
|
68
|
+
@forward "bar-chart";
|
|
69
|
+
@forward "pie-chart";
|
|
70
|
+
@forward "heatmap-chart";
|
|
71
|
+
@forward "radar-chart";
|
|
72
|
+
@forward "radial-chart";
|
|
73
|
+
@forward "mixed-chart";
|
|
74
|
+
@forward "aura";
|
|
75
|
+
@forward "kpi";
|
|
76
|
+
@forward "marquee";
|