@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,205 @@
1
+ @use "../abstracts" as *;
2
+
3
+ // Radar chart. The same <figure>, <figcaption> and <table> as a line chart;
4
+ // RadarChart draws each row as a spoke, clockwise from the top, and each
5
+ // series as a shape joining its values on the spokes, from zero in the
6
+ // middle to the scale's top at the rim. The tooltip, legend and swatches
7
+ // come from chart(); the plot is a square as wide as
8
+ // --md-comp-radar-chart-height, with room round it for the row labels.
9
+ //
10
+ // The grid and shapes are SVG in a -50 to 50 box whose edge is the rim.
11
+ // Strokes and points keep their pixel widths at any size. The axis labels,
12
+ // the cursor spoke and the tooltip are HTML placed by the --turn RadarChart
13
+ // sets, a fraction of a turn clockwise from the top.
14
+ //
15
+ // Modifiers: .area fills each shape, .points marks each value, .sparkline
16
+ // is a small chart with no labels, legend or tooltip.
17
+ // A series header cell's classes reach its shape: <th class="dashed">.
18
+ //
19
+ // Tokens:
20
+ // --md-comp-radar-chart-height 240px, the rim's diameter (sparkline 48px)
21
+ // --md-comp-radar-chart-line-width 2px (sparkline 1.5px)
22
+ // --md-comp-radar-chart-label-room 80px, the labels' width beside the rim
23
+ // --md-comp-radar-chart-grid-color outline-variant
24
+ // --md-comp-radar-chart-color-1..4 primary, tertiary, secondary,
25
+ // on-surface-variant
26
+
27
+ @include chart("radar-chart");
28
+
29
+ .radar-chart {
30
+ --md-comp-radar-chart-line-width: 2px;
31
+ --md-comp-radar-chart-label-room: 80px;
32
+ // How far past the rim a label starts.
33
+ --radar-chart-label-offset: 8px;
34
+
35
+ &.sparkline {
36
+ --md-comp-radar-chart-line-width: 1.5px;
37
+ --md-comp-radar-chart-label-room: 0px;
38
+ --radar-chart-label-offset: 0px;
39
+ }
40
+ }
41
+
42
+ .radar-chart-plot {
43
+ width: min(
44
+ 100% - 2 * (var(--md-comp-radar-chart-label-room) + var(--radar-chart-label-offset)),
45
+ var(--md-comp-radar-chart-height)
46
+ );
47
+ height: auto;
48
+ aspect-ratio: 1;
49
+ // Two lines of label above the top spoke and below the bottom one.
50
+ margin:
51
+ min(
52
+ var(--md-comp-radar-chart-label-room),
53
+ 2 * var(--md-sys-typescale-body-small-line-height) + var(--radar-chart-label-offset)
54
+ )
55
+ auto;
56
+ border: 0;
57
+ border-radius: 50%;
58
+ background: none;
59
+ }
60
+
61
+ .radar-chart-web {
62
+ position: absolute;
63
+ inset: 0;
64
+
65
+ > svg {
66
+ display: block;
67
+ width: 100%;
68
+ height: 100%;
69
+ overflow: visible;
70
+ }
71
+ }
72
+
73
+ .radar-chart-grid {
74
+ fill: none;
75
+ stroke: var(--md-comp-radar-chart-grid-color);
76
+ stroke-width: 1px;
77
+ vector-effect: non-scaling-stroke;
78
+ }
79
+
80
+ .radar-chart-shape,
81
+ .radar-chart-points {
82
+ stroke: var(--radar-chart-color);
83
+ stroke-linecap: round;
84
+ stroke-linejoin: round;
85
+ vector-effect: non-scaling-stroke;
86
+ }
87
+
88
+ .radar-chart-shape {
89
+ fill: var(--radar-chart-color);
90
+ fill-opacity: 0;
91
+ stroke-width: var(--md-comp-radar-chart-line-width);
92
+
93
+ @media (prefers-reduced-motion: no-preference) {
94
+ transition: opacity 400ms cubic-bezier(0.2, 0, 0, 1), scale 400ms cubic-bezier(0.2, 0, 0, 1);
95
+
96
+ @starting-style {
97
+ opacity: 0;
98
+ scale: 0.6;
99
+ }
100
+ }
101
+ }
102
+
103
+ .radar-chart.area .radar-chart-shape {
104
+ fill-opacity: 0.24;
105
+ }
106
+
107
+ .radar-chart-series.dashed .radar-chart-shape {
108
+ stroke-dasharray: 2 6;
109
+ }
110
+
111
+ .radar-chart-points {
112
+ fill: none;
113
+ stroke-width: calc(var(--md-comp-radar-chart-line-width) * 3);
114
+ }
115
+
116
+ // Each label sits just past its spoke's tip and leans away from the middle:
117
+ // right of a spoke on the right, above the top one, and so on.
118
+ .radar-chart-axes {
119
+ margin: 0;
120
+ padding: 0;
121
+ list-style: none;
122
+ color: var(--md-sys-color-on-surface-variant);
123
+ @include typescale("body-small");
124
+
125
+ > li {
126
+ --radar-chart-angle: calc(var(--turn, 0) * 1turn);
127
+
128
+ position: absolute;
129
+ left: calc(50% + sin(var(--radar-chart-angle)) * (50% + var(--radar-chart-label-offset)));
130
+ top: calc(50% - cos(var(--radar-chart-angle)) * (50% + var(--radar-chart-label-offset)));
131
+ width: max-content;
132
+ max-width: var(--md-comp-radar-chart-label-room);
133
+ translate:
134
+ calc(-50% + sin(var(--radar-chart-angle)) * 50%)
135
+ calc(-50% - cos(var(--radar-chart-angle)) * 50%);
136
+ text-align: center;
137
+ }
138
+ }
139
+
140
+ // A spoke from the middle to the rim, turned about the middle. LineChart
141
+ // places the points on it by their share of its length from the rim.
142
+ .radar-chart-cursor {
143
+ inset: auto auto 50% 50%;
144
+ width: 1px;
145
+ height: 50%;
146
+ background-color: var(--md-sys-color-outline);
147
+ transform-origin: bottom;
148
+ rotate: calc(var(--turn, 0) * 1turn);
149
+
150
+ > span {
151
+ position: absolute;
152
+ left: 0;
153
+ width: 10px;
154
+ height: 10px;
155
+ border: 2px solid var(--md-sys-color-surface);
156
+ border-radius: 50%;
157
+ background-color: var(--radar-chart-color);
158
+ translate: -50% -50%;
159
+ }
160
+ }
161
+
162
+ // Past the spoke's tip, on the side away from the middle.
163
+ .radar-chart-tooltip {
164
+ --radar-chart-angle: calc(var(--turn, 0) * 1turn);
165
+
166
+ left: calc(50% + sin(var(--radar-chart-angle)) * 50%);
167
+ top: calc(50% - cos(var(--radar-chart-angle)) * 50%);
168
+ translate: 12px -50%;
169
+
170
+ &.end {
171
+ translate: calc(-100% - 12px) -50%;
172
+ }
173
+ }
174
+
175
+ .radar-chart-legend {
176
+ justify-content: center;
177
+ }
178
+
179
+ .radar-chart.sparkline {
180
+ .radar-chart-plot {
181
+ margin: 0;
182
+ }
183
+
184
+ .radar-chart-axes {
185
+ display: none;
186
+ }
187
+ }
188
+
189
+ @media (forced-colors: active) {
190
+ .radar-chart-web {
191
+ forced-color-adjust: none;
192
+ }
193
+
194
+ .radar-chart-axes {
195
+ forced-color-adjust: auto;
196
+ }
197
+
198
+ .radar-chart-cursor {
199
+ background-color: CanvasText;
200
+ }
201
+
202
+ .radar-chart-cursor > span {
203
+ forced-color-adjust: none;
204
+ }
205
+ }
@@ -0,0 +1,174 @@
1
+ @use "../abstracts" as *;
2
+
3
+ // Radial chart. The same <figure>, <figcaption> and <table> as a line chart;
4
+ // RadialChart draws each row of the first value column as a ring, outermost
5
+ // first, filled clockwise from the top as a share of data-max. The plot,
6
+ // tooltip and legend swatches come from chart(); the plot is a square as
7
+ // wide as --md-comp-radial-chart-height, or half of one for a gauge.
8
+ //
9
+ // The rings are SVG circles in a -50 to 50 box, turned to start at the top
10
+ // (or at nine o'clock for a gauge). Each fill's dash is its share of the
11
+ // circle, from the --radial-chart-dash RadialChart sets, so it can grow in;
12
+ // --radial-chart-offset moves a round-capped dash in by half the width.
13
+ //
14
+ // Modifiers: .gauge draws half circles over the middle, .sparkline is a
15
+ // small chart with no legend or tooltip. A <tfoot> row shows in the middle.
16
+ //
17
+ // Tokens:
18
+ // --md-comp-radial-chart-height 240px, the rings' diameter (sparkline 48px)
19
+ // --md-comp-radial-chart-thickness 8, a ring's width in hundredths of the
20
+ // diameter; thinner when rings crowd
21
+ // --md-comp-radial-chart-gap 2, the gap between rings, in the same units
22
+ // --md-comp-radial-chart-track-color surface-container-highest; transparent
23
+ // hides the tracks
24
+ // --md-comp-radial-chart-color-1..4 primary, tertiary, secondary,
25
+ // on-surface-variant
26
+
27
+ @include chart("radial-chart");
28
+
29
+ .radial-chart {
30
+ --md-comp-radial-chart-thickness: 8;
31
+ --md-comp-radial-chart-gap: 2;
32
+ --md-comp-radial-chart-track-color: var(--md-sys-color-surface-container-highest);
33
+
34
+ gap: 16px;
35
+ }
36
+
37
+ .radial-chart-plot {
38
+ width: min(100%, var(--md-comp-radial-chart-height));
39
+ height: auto;
40
+ aspect-ratio: 1;
41
+ margin-inline: auto;
42
+ border: 0;
43
+ border-radius: 50%;
44
+ background: none;
45
+ }
46
+
47
+ .radial-chart.gauge .radial-chart-plot {
48
+ aspect-ratio: 2;
49
+ border-radius: 50% 50% 0 0 / 100% 100% 0 0;
50
+ }
51
+
52
+ .radial-chart-rings {
53
+ position: absolute;
54
+ inset: 0;
55
+
56
+ > svg {
57
+ display: block;
58
+ width: 100%;
59
+ height: 100%;
60
+ }
61
+ }
62
+
63
+ .radial-chart-track,
64
+ .radial-chart-ring {
65
+ fill: none;
66
+ stroke-dasharray: var(--radial-chart-dash, none);
67
+ stroke-dashoffset: var(--radial-chart-offset, 0);
68
+ }
69
+
70
+ .radial-chart-track {
71
+ stroke: var(--md-comp-radial-chart-track-color);
72
+ }
73
+
74
+ // A gauge's track ends where its fill would, so it ends round too.
75
+ .radial-chart.gauge .radial-chart-track {
76
+ stroke-linecap: round;
77
+ }
78
+
79
+ .radial-chart-ring {
80
+ stroke: var(--radial-chart-color);
81
+ stroke-linecap: round;
82
+
83
+ &.empty {
84
+ visibility: hidden;
85
+ }
86
+
87
+ // The rings beside the active one fade.
88
+ .radial-chart-rings:has(.active) &:not(.active) {
89
+ opacity: 0.38;
90
+ }
91
+
92
+ @media (prefers-reduced-motion: no-preference) {
93
+ transition: stroke-dasharray 600ms cubic-bezier(0.2, 0, 0, 1), opacity 200ms cubic-bezier(0.2, 0, 0, 1);
94
+
95
+ @starting-style {
96
+ stroke-dasharray: 0 1000;
97
+ }
98
+ }
99
+ }
100
+
101
+ .radial-chart-tooltip {
102
+ translate: 12px -50%;
103
+
104
+ &.end {
105
+ translate: calc(-100% - 12px) -50%;
106
+ }
107
+ }
108
+
109
+ // The middle, inside the innermost ring; a gauge's sits on its base line.
110
+ .radial-chart-total {
111
+ position: absolute;
112
+ inset: 0;
113
+ display: flex;
114
+ flex-direction: column;
115
+ align-items: center;
116
+ justify-content: center;
117
+ text-align: center;
118
+
119
+ > * {
120
+ max-width: calc(var(--radial-chart-middle, 100%) * 0.8);
121
+ overflow-wrap: anywhere;
122
+ }
123
+
124
+ > strong {
125
+ color: var(--md-sys-color-on-surface);
126
+ @include typescale("headline-small");
127
+ }
128
+
129
+ > span {
130
+ color: var(--md-sys-color-on-surface-variant);
131
+ @include typescale("body-small");
132
+ }
133
+ }
134
+
135
+ .radial-chart.gauge .radial-chart-total {
136
+ justify-content: end;
137
+ }
138
+
139
+ // One row per ring: swatch, name and cell in aligned columns.
140
+ .radial-chart-legend {
141
+ display: grid;
142
+ grid-template-columns: auto minmax(0, 1fr) auto;
143
+ align-items: center;
144
+ gap: 8px;
145
+
146
+ > li {
147
+ display: contents;
148
+ }
149
+
150
+ > li > span:first-child {
151
+ overflow: hidden;
152
+ text-overflow: ellipsis;
153
+ white-space: nowrap;
154
+ }
155
+
156
+ > li > span:last-child {
157
+ text-align: end;
158
+ color: var(--md-sys-color-on-surface);
159
+ font-weight: 500;
160
+ font-variant-numeric: tabular-nums;
161
+ }
162
+ }
163
+
164
+ .radial-chart.sparkline .radial-chart-plot {
165
+ // A set width, so the chart keeps its size as a flex item.
166
+ width: var(--md-comp-radial-chart-height);
167
+ margin-inline: 0;
168
+ }
169
+
170
+ @media (forced-colors: active) {
171
+ .radial-chart-rings {
172
+ forced-color-adjust: none;
173
+ }
174
+ }
@@ -0,0 +1,99 @@
1
+ @use "../abstracts" as *;
2
+
3
+ // Rich text editor. An outlined frame around a docked .toolbar and the
4
+ // Tiptap editor, which the script mounts in .rich-text-editor-content after
5
+ // the hidden <textarea>. The outline thickens to primary while the editor has
6
+ // focus, as an outlined text field does. Without the script the textarea
7
+ // stays visible and the toolbar, which could do nothing, is hidden.
8
+ //
9
+ // Tokens:
10
+ // --md-comp-rich-text-editor-min-height 160px (editable area)
11
+ // --md-comp-rich-text-editor-shape 16px (frame corners)
12
+
13
+ .rich-text-editor {
14
+ --md-comp-rich-text-editor-min-height: 160px;
15
+ --md-comp-rich-text-editor-shape: 16px;
16
+
17
+ display: flex;
18
+ flex-direction: column;
19
+ overflow: hidden;
20
+ border: 1px solid var(--md-sys-color-outline);
21
+ border-radius: var(--md-comp-rich-text-editor-shape);
22
+ background-color: var(--md-sys-color-surface);
23
+ color: var(--md-sys-color-on-surface);
24
+
25
+ &:has(> .rich-text-editor-content :focus) {
26
+ outline: 1px solid var(--md-sys-color-primary);
27
+ border-color: var(--md-sys-color-primary);
28
+ }
29
+
30
+ &:not(:has(> .rich-text-editor-content)) > .toolbar {
31
+ display: none;
32
+ }
33
+
34
+ > textarea {
35
+ min-height: var(--md-comp-rich-text-editor-min-height);
36
+ border: none;
37
+ }
38
+
39
+ // A docked bar spaces its actions across the full width; formatting
40
+ // buttons read better packed at the start and wrapped.
41
+ > .toolbar {
42
+ --md-comp-toolbar-container-height: 56px;
43
+ --md-comp-toolbar-leading-space: 4px;
44
+ --md-comp-toolbar-trailing-space: 4px;
45
+
46
+ flex-wrap: wrap;
47
+ justify-content: flex-start;
48
+ gap: var(--md-comp-toolbar-between-space);
49
+ padding-block: 4px;
50
+ border-block-end: 1px solid var(--md-sys-color-outline-variant);
51
+ }
52
+ }
53
+
54
+ .rich-text-editor-content {
55
+ display: flex;
56
+ flex: 1;
57
+ flex-direction: column;
58
+ @include typescale("body-large");
59
+
60
+ // The element Tiptap makes editable.
61
+ > [contenteditable] {
62
+ flex: 1;
63
+ min-height: var(--md-comp-rich-text-editor-min-height);
64
+ padding: 16px;
65
+ outline: none;
66
+ overflow-wrap: break-word;
67
+ white-space: pre-wrap;
68
+
69
+ > :first-child {
70
+ margin-block-start: 0;
71
+ }
72
+
73
+ > :last-child {
74
+ margin-block-end: 0;
75
+ }
76
+
77
+ :not(pre) > code,
78
+ pre {
79
+ border-radius: 8px;
80
+ background-color: var(--md-sys-color-surface-container-highest);
81
+ font-family: ui-monospace, monospace;
82
+ }
83
+
84
+ :not(pre) > code {
85
+ padding: 0 4px;
86
+ }
87
+
88
+ pre {
89
+ padding: 12px 16px;
90
+ overflow-x: auto;
91
+ white-space: pre;
92
+ }
93
+
94
+ hr {
95
+ border: none;
96
+ border-block-start: 1px solid var(--md-sys-color-outline-variant);
97
+ }
98
+ }
99
+ }
@@ -194,6 +194,7 @@ $_bar: ":is(.search-bar, .searchbar)";
194
194
  background-color: var(--md-comp-search-view-container-color);
195
195
  color: var(--md-sys-color-on-surface);
196
196
  @include z-depth("3");
197
+ @include glass(var(--md-comp-search-view-container-color));
197
198
 
198
199
  // Two ways this surface is closed, and an author `display` beats both of the
199
200
  // UA rules that do the hiding - `[hidden] { display: none }` for the docked
@@ -49,6 +49,7 @@ $_sheet: "dialog.side-sheet, dialog.right, dialog.right-sheet, dialog.left, dial
49
49
  outline: none;
50
50
  translate: var(--md-comp-side-sheet-shift) 0;
51
51
  transition: translate 280ms ease, border-radius 200ms ease;
52
+ @include glass(var(--md-comp-side-sheet-container-color));
52
53
 
53
54
  &:not(:modal) {
54
55
  z-index: 1100;
@@ -0,0 +1,81 @@
1
+ @use "../abstracts" as *;
2
+
3
+ // Skeleton. An empty block that holds the place of content still loading,
4
+ // with a shimmer passing across it. The block has no text and nothing to
5
+ // announce: mark the region being filled with aria-busy="true", and report
6
+ // the wait through a status such as a loading indicator.
7
+ //
8
+ // Shapes:
9
+ // (default) a box; size it with width and height
10
+ // .text one line of body text; the last of several runs shorter
11
+ // .circle an avatar-sized circle
12
+ //
13
+ // Reduced motion stops the shimmer and leaves the shapes.
14
+ //
15
+ // Tokens:
16
+ // --md-comp-skeleton-color surface-container-highest
17
+ // --md-comp-skeleton-shimmer-color surface at 50%
18
+ // --md-comp-skeleton-shape 8px (text 4px)
19
+ // --md-comp-skeleton-circle-size 40px
20
+
21
+ .skeleton {
22
+ --md-comp-skeleton-color: var(--md-sys-color-surface-container-highest);
23
+ --md-comp-skeleton-shimmer-color: color-mix(
24
+ in oklab,
25
+ var(--md-sys-color-surface) 50%,
26
+ transparent
27
+ );
28
+ --md-comp-skeleton-shape: 8px;
29
+ --md-comp-skeleton-circle-size: 40px;
30
+
31
+ display: block;
32
+ box-sizing: border-box;
33
+ border-radius: var(--md-comp-skeleton-shape);
34
+ background-color: var(--md-comp-skeleton-color);
35
+ background-image: linear-gradient(
36
+ 90deg,
37
+ transparent 0%,
38
+ var(--md-comp-skeleton-shimmer-color) 50%,
39
+ transparent 100%
40
+ );
41
+ background-repeat: no-repeat;
42
+ background-size: 50% 100%;
43
+ animation: skeleton-shimmer 1.5s linear infinite;
44
+
45
+ &:dir(rtl) {
46
+ animation-direction: reverse;
47
+ }
48
+
49
+ &.text {
50
+ --md-comp-skeleton-shape: 4px;
51
+
52
+ width: 100%;
53
+ height: 1em;
54
+ margin-block: 0.25em;
55
+
56
+ &:last-child:not(:first-child) {
57
+ width: 60%;
58
+ }
59
+ }
60
+
61
+ &.circle {
62
+ width: var(--md-comp-skeleton-circle-size);
63
+ height: var(--md-comp-skeleton-circle-size);
64
+ flex: none;
65
+ border-radius: 50%;
66
+ }
67
+
68
+ @media (prefers-reduced-motion: reduce) {
69
+ animation: none;
70
+ background-image: none;
71
+ }
72
+
73
+ @media (forced-colors: active) {
74
+ border: 1px solid GrayText;
75
+ }
76
+ }
77
+
78
+ @keyframes skeleton-shimmer {
79
+ from { background-position: -100% 0; }
80
+ to { background-position: 200% 0; }
81
+ }
@@ -99,6 +99,7 @@ $_bar: ".snackbar";
99
99
  @include typescale("body-medium");
100
100
  @include z-depth("3");
101
101
  cursor: default;
102
+ @include glass(var(--md-comp-snackbar-container-color));
102
103
 
103
104
  @include bp-up("medium") {
104
105
  width: max-content;
@@ -0,0 +1,86 @@
1
+ @use "../abstracts" as *;
2
+
3
+ // Stat. A <dl class="stats"> of key figures, such as a dashboard summary.
4
+ // Each figure is a <div> tile holding a <dt> label, a <dd> value and an
5
+ // optional <dd class="stat-change"> comparison. A description list keeps
6
+ // each value paired with its label for assistive technology.
7
+ //
8
+ // .stat-change takes .up or .down for the arrow and .negative when the
9
+ // change is bad news. The arrow is decoration: say the direction in the
10
+ // text, as in "+12% from last month".
11
+ //
12
+ // Tokens:
13
+ // --md-comp-stat-container-color surface-container-low
14
+ // --md-comp-stat-shape 16px
15
+ // --md-comp-stat-min-width 160px (tiles wrap below this)
16
+
17
+ .stats {
18
+ --md-comp-stat-container-color: var(--md-sys-color-surface-container-low);
19
+ --md-comp-stat-shape: 16px;
20
+ --md-comp-stat-min-width: 160px;
21
+
22
+ display: grid;
23
+ grid-template-columns: repeat(auto-fit, minmax(min(100%, var(--md-comp-stat-min-width)), 1fr));
24
+ gap: 12px;
25
+ margin: $element-top-margin 0 $element-bottom-margin;
26
+ padding: 0;
27
+
28
+ > div {
29
+ display: flex;
30
+ flex-direction: column;
31
+ gap: 4px;
32
+ min-width: 0;
33
+ padding: 16px;
34
+ border-radius: var(--md-comp-stat-shape);
35
+ background-color: var(--md-comp-stat-container-color);
36
+ color: var(--md-sys-color-on-surface);
37
+ }
38
+
39
+ dt {
40
+ color: var(--md-sys-color-on-surface-variant);
41
+ @include typescale("title-small");
42
+ }
43
+
44
+ dd {
45
+ margin: 0;
46
+ overflow-wrap: anywhere;
47
+ font-variant-numeric: tabular-nums;
48
+ @include typescale("headline-large");
49
+ }
50
+
51
+ dd.stat-change {
52
+ display: inline-flex;
53
+ align-items: center;
54
+ gap: 4px;
55
+ color: var(--md-sys-color-on-surface-variant);
56
+ @include typescale("label-large");
57
+
58
+ &:is(.up, .down)::before {
59
+ content: "";
60
+ flex: none;
61
+ width: 18px;
62
+ height: 18px;
63
+ background-color: currentColor;
64
+ mask: $trend-arrow center / 18px no-repeat;
65
+ }
66
+
67
+ &.down::before {
68
+ transform: rotate(180deg);
69
+ }
70
+
71
+ &.negative {
72
+ color: var(--md-sys-color-error);
73
+ }
74
+ }
75
+ }
76
+
77
+ @media (forced-colors: active) {
78
+ .stats > div {
79
+ outline: 1px solid CanvasText;
80
+ }
81
+
82
+ .stats dd.stat-change::before {
83
+ forced-color-adjust: none;
84
+ background-color: CanvasText;
85
+ }
86
+ }