@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.
Files changed (171) hide show
  1. package/CHANGELOG.md +231 -1
  2. package/README.md +37 -1
  3. package/dist/css/expressive.css +5111 -36
  4. package/dist/css/expressive.css.map +1 -1
  5. package/dist/css/expressive.min.css +1 -1
  6. package/dist/css/expressive.min.css.map +1 -1
  7. package/dist/fonts/material-symbols-outlined.woff2 +0 -0
  8. package/dist/fonts/material-symbols-rounded.woff2 +0 -0
  9. package/dist/fonts/material-symbols-sharp.woff2 +0 -0
  10. package/dist/js/chunks/{chunk-HLDXZ7XB.mjs → chunk-3CLXLPYS.mjs} +2 -2
  11. package/dist/js/chunks/chunk-3DHK5CZU.mjs +105 -0
  12. package/dist/js/chunks/chunk-3DHK5CZU.mjs.map +7 -0
  13. package/dist/js/chunks/chunk-4PWAPV6F.mjs +7 -0
  14. package/dist/js/chunks/chunk-4PWAPV6F.mjs.map +7 -0
  15. package/dist/js/chunks/{chunk-HB6IW7QQ.mjs → chunk-55IA2XUC.mjs} +2 -2
  16. package/dist/js/chunks/chunk-CCWDV5CR.mjs +292 -0
  17. package/dist/js/chunks/chunk-CCWDV5CR.mjs.map +7 -0
  18. package/dist/js/chunks/chunk-DTKR54I6.mjs +270 -0
  19. package/dist/js/chunks/chunk-DTKR54I6.mjs.map +7 -0
  20. package/dist/js/chunks/chunk-GVGT6MIU.mjs +47 -0
  21. package/dist/js/chunks/chunk-GVGT6MIU.mjs.map +7 -0
  22. package/dist/js/chunks/chunk-HKT2S7VM.mjs +48 -0
  23. package/dist/js/chunks/chunk-HKT2S7VM.mjs.map +7 -0
  24. package/dist/js/chunks/chunk-K4CJCRGE.mjs +262 -0
  25. package/dist/js/chunks/chunk-K4CJCRGE.mjs.map +7 -0
  26. package/dist/js/chunks/chunk-LNCCYGPC.mjs +163 -0
  27. package/dist/js/chunks/chunk-LNCCYGPC.mjs.map +7 -0
  28. package/dist/js/chunks/chunk-NQLC3YMW.mjs +1 -0
  29. package/dist/js/chunks/chunk-O5XPWXIQ.mjs +406 -0
  30. package/dist/js/chunks/chunk-O5XPWXIQ.mjs.map +7 -0
  31. package/dist/js/chunks/chunk-P3G3QHII.mjs +166 -0
  32. package/dist/js/chunks/chunk-P3G3QHII.mjs.map +7 -0
  33. package/dist/js/chunks/{chunk-H2WA4XHH.mjs → chunk-PLYXLSH3.mjs} +4 -4
  34. package/dist/js/chunks/chunk-QKWPQK5N.mjs +179 -0
  35. package/dist/js/chunks/chunk-QKWPQK5N.mjs.map +7 -0
  36. package/dist/js/chunks/chunk-RHRQKTTX.mjs +139 -0
  37. package/dist/js/chunks/chunk-RHRQKTTX.mjs.map +7 -0
  38. package/dist/js/chunks/chunk-SPETGK25.mjs +59 -0
  39. package/dist/js/chunks/chunk-SPETGK25.mjs.map +7 -0
  40. package/dist/js/chunks/{chunk-YSBCHYXP.mjs → chunk-U2OTHOTI.mjs} +116 -12
  41. package/dist/js/chunks/chunk-U2OTHOTI.mjs.map +7 -0
  42. package/dist/js/chunks/chunk-VTLBW7QS.mjs +124 -0
  43. package/dist/js/chunks/chunk-VTLBW7QS.mjs.map +7 -0
  44. package/dist/js/chunks/{chunk-RFZZCYVU.mjs → chunk-XGHORT7J.mjs} +2 -2
  45. package/dist/js/chunks/{chunk-HNFSMIBY.mjs → chunk-XH6BEEMY.mjs} +69 -16
  46. package/dist/js/chunks/chunk-XH6BEEMY.mjs.map +7 -0
  47. package/dist/js/expressive.cjs +2209 -32
  48. package/dist/js/expressive.cjs.map +4 -4
  49. package/dist/js/expressive.js +2209 -32
  50. package/dist/js/expressive.js.map +4 -4
  51. package/dist/js/expressive.min.js +10 -10
  52. package/dist/js/expressive.min.js.map +4 -4
  53. package/dist/js/expressive.mjs +68 -20
  54. package/dist/js/expressive.mjs.map +1 -1
  55. package/dist/js/internal/behaviors/forms.mjs +1 -1
  56. package/dist/js/internal/components/autocomplete.mjs +2 -2
  57. package/dist/js/internal/components/barChart.mjs +10 -0
  58. package/dist/js/internal/components/barChart.mjs.map +7 -0
  59. package/dist/js/internal/components/chips.mjs +3 -3
  60. package/dist/js/internal/components/columnChart.mjs +9 -0
  61. package/dist/js/internal/components/columnChart.mjs.map +7 -0
  62. package/dist/js/internal/components/commandPalette.mjs +9 -0
  63. package/dist/js/internal/components/commandPalette.mjs.map +7 -0
  64. package/dist/js/internal/components/datepicker.mjs +3 -3
  65. package/dist/js/internal/components/heatmapChart.mjs +9 -0
  66. package/dist/js/internal/components/heatmapChart.mjs.map +7 -0
  67. package/dist/js/internal/components/index.mjs +65 -17
  68. package/dist/js/internal/components/lineChart.mjs +12 -0
  69. package/dist/js/internal/components/lineChart.mjs.map +7 -0
  70. package/dist/js/internal/components/menu.mjs +1 -1
  71. package/dist/js/internal/components/messageScroller.mjs +9 -0
  72. package/dist/js/internal/components/messageScroller.mjs.map +7 -0
  73. package/dist/js/internal/components/mixedChart.mjs +10 -0
  74. package/dist/js/internal/components/mixedChart.mjs.map +7 -0
  75. package/dist/js/internal/components/pieChart.mjs +9 -0
  76. package/dist/js/internal/components/pieChart.mjs.map +7 -0
  77. package/dist/js/internal/components/questionnaire.mjs +9 -0
  78. package/dist/js/internal/components/questionnaire.mjs.map +7 -0
  79. package/dist/js/internal/components/radarChart.mjs +9 -0
  80. package/dist/js/internal/components/radarChart.mjs.map +7 -0
  81. package/dist/js/internal/components/radialChart.mjs +9 -0
  82. package/dist/js/internal/components/radialChart.mjs.map +7 -0
  83. package/dist/js/internal/components/registry.mjs +23 -11
  84. package/dist/js/internal/components/richTextEditor.mjs +9 -0
  85. package/dist/js/internal/components/richTextEditor.mjs.map +7 -0
  86. package/dist/js/internal/components/select.mjs +2 -2
  87. package/dist/js/modular.mjs +68 -20
  88. package/dist/types/behaviors/forms.d.ts +22 -0
  89. package/dist/types/components/barChart.d.ts +24 -0
  90. package/dist/types/components/columnChart.d.ts +21 -0
  91. package/dist/types/components/commandPalette.d.ts +96 -0
  92. package/dist/types/components/heatmapChart.d.ts +49 -0
  93. package/dist/types/components/index.d.ts +12 -0
  94. package/dist/types/components/lineChart.d.ts +134 -0
  95. package/dist/types/components/menu.d.ts +31 -0
  96. package/dist/types/components/messageScroller.d.ts +111 -0
  97. package/dist/types/components/mixedChart.d.ts +25 -0
  98. package/dist/types/components/pieChart.d.ts +40 -0
  99. package/dist/types/components/questionnaire.d.ts +96 -0
  100. package/dist/types/components/radarChart.d.ts +39 -0
  101. package/dist/types/components/radialChart.d.ts +45 -0
  102. package/dist/types/components/registry.d.ts +44 -0
  103. package/dist/types/components/richTextEditor.d.ts +71 -0
  104. package/dist/types/modular.d.ts +10 -1
  105. package/package.json +4 -1
  106. package/src/sass/README.md +3 -6
  107. package/src/sass/abstracts/_index.scss +1 -1
  108. package/src/sass/abstracts/_mixins.scss +226 -0
  109. package/src/sass/abstracts/_variables.scss +14 -0
  110. package/src/sass/base/_typography.scss +45 -0
  111. package/src/sass/components/_accordion.scss +161 -0
  112. package/src/sass/components/_aura.scss +119 -0
  113. package/src/sass/components/_avatar.scss +86 -0
  114. package/src/sass/components/_bar-chart.scss +285 -0
  115. package/src/sass/components/_bottom-sheet.scss +1 -0
  116. package/src/sass/components/_button-groups.scss +13 -3
  117. package/src/sass/components/_cards.scss +16 -13
  118. package/src/sass/components/_column-chart.scss +134 -0
  119. package/src/sass/components/_command-palette.scss +140 -0
  120. package/src/sass/components/_countdown.scss +89 -0
  121. package/src/sass/components/_data-table.scss +188 -0
  122. package/src/sass/components/_dialog.scss +1 -0
  123. package/src/sass/components/_empty-state.scss +78 -0
  124. package/src/sass/components/_expanding-card.scss +3 -0
  125. package/src/sass/components/_heatmap-chart.scss +156 -0
  126. package/src/sass/components/_index.scss +27 -0
  127. package/src/sass/components/_kpi.scss +162 -0
  128. package/src/sass/components/_line-chart.scss +102 -0
  129. package/src/sass/components/_marquee.scss +111 -0
  130. package/src/sass/components/_menu.scss +10 -0
  131. package/src/sass/components/_message-scroller.scss +66 -0
  132. package/src/sass/components/_message.scss +202 -0
  133. package/src/sass/components/_mixed-chart.scss +157 -0
  134. package/src/sass/components/_navigation-bar.scss +1 -0
  135. package/src/sass/components/_navigation-rail.scss +9 -0
  136. package/src/sass/components/_pie-chart.scss +203 -0
  137. package/src/sass/components/_popover.scss +112 -0
  138. package/src/sass/components/_questionnaire.scss +144 -0
  139. package/src/sass/components/_radar-chart.scss +205 -0
  140. package/src/sass/components/_radial-chart.scss +174 -0
  141. package/src/sass/components/_rich-text-editor.scss +99 -0
  142. package/src/sass/components/_search.scss +1 -0
  143. package/src/sass/components/_side-sheet.scss +1 -0
  144. package/src/sass/components/_skeleton.scss +81 -0
  145. package/src/sass/components/_snackbar.scss +1 -0
  146. package/src/sass/components/_stat.scss +86 -0
  147. package/src/sass/components/_stepper.scss +190 -0
  148. package/src/sass/components/_timeline.scss +114 -0
  149. package/src/sass/components/_toolbar.scss +1 -0
  150. package/src/sass/components/_tooltip.scss +2 -0
  151. package/src/sass/components/_tree.scss +139 -0
  152. package/src/sass/components/forms/_drop-zone.scss +128 -0
  153. package/src/sass/components/forms/_index.scss +2 -0
  154. package/src/sass/components/forms/_input-fields.scss +133 -2
  155. package/src/sass/components/forms/_rating.scss +165 -0
  156. package/src/sass/tokens/_reference.scss +3 -15
  157. package/src/sass/utilities/_index.scss +2 -0
  158. package/src/sass/utilities/_scroll-area.scss +35 -0
  159. package/src/sass/utilities/_shapes.scss +164 -0
  160. package/dist/js/chunks/chunk-G3I5H2U3.mjs +0 -7
  161. package/dist/js/chunks/chunk-G3I5H2U3.mjs.map +0 -7
  162. package/dist/js/chunks/chunk-HNFSMIBY.mjs.map +0 -7
  163. package/dist/js/chunks/chunk-PSSHQWCX.mjs +0 -100
  164. package/dist/js/chunks/chunk-PSSHQWCX.mjs.map +0 -7
  165. package/dist/js/chunks/chunk-WWPAPHMA.mjs +0 -1
  166. package/dist/js/chunks/chunk-YSBCHYXP.mjs.map +0 -7
  167. /package/dist/js/chunks/{chunk-HLDXZ7XB.mjs.map → chunk-3CLXLPYS.mjs.map} +0 -0
  168. /package/dist/js/chunks/{chunk-HB6IW7QQ.mjs.map → chunk-55IA2XUC.mjs.map} +0 -0
  169. /package/dist/js/chunks/{chunk-WWPAPHMA.mjs.map → chunk-NQLC3YMW.mjs.map} +0 -0
  170. /package/dist/js/chunks/{chunk-H2WA4XHH.mjs.map → chunk-PLYXLSH3.mjs.map} +0 -0
  171. /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
+ }
@@ -38,6 +38,7 @@ dialog {
38
38
  outline: none;
39
39
  overflow-wrap: anywhere;
40
40
  @include z-depth("3");
41
+ @include glass(var(--md-comp-basic-dialog-container-color));
41
42
 
42
43
  &::backdrop {
43
44
  background-color: var(--md-comp-scrim-color);
@@ -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";