@expressivecss/expressive 0.12.0 → 0.14.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 (258) hide show
  1. package/CHANGELOG.md +339 -1
  2. package/README.md +38 -1
  3. package/dist/css/expressive.css +5342 -105
  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-3DHK5CZU.mjs +105 -0
  11. package/dist/js/chunks/chunk-3DHK5CZU.mjs.map +7 -0
  12. package/dist/js/chunks/{chunk-HB6IW7QQ.mjs → chunk-3GVFZ4XO.mjs} +3 -3
  13. package/dist/js/chunks/{chunk-HLDXZ7XB.mjs → chunk-4HZMB7LI.mjs} +22 -8
  14. package/dist/js/chunks/chunk-4HZMB7LI.mjs.map +7 -0
  15. package/dist/js/chunks/chunk-4KMNFIFZ.mjs +270 -0
  16. package/dist/js/chunks/chunk-4KMNFIFZ.mjs.map +7 -0
  17. package/dist/js/chunks/chunk-4TKTLGEM.mjs +262 -0
  18. package/dist/js/chunks/chunk-4TKTLGEM.mjs.map +7 -0
  19. package/dist/js/chunks/{chunk-3VOK6J7U.mjs → chunk-5BKHWHYY.mjs} +13 -6
  20. package/dist/js/chunks/chunk-5BKHWHYY.mjs.map +7 -0
  21. package/dist/js/chunks/{chunk-H2WA4XHH.mjs → chunk-5HQSGDZ5.mjs} +16 -7
  22. package/dist/js/chunks/chunk-5HQSGDZ5.mjs.map +7 -0
  23. package/dist/js/chunks/{chunk-LWBQIX5J.mjs → chunk-A7ALMYUR.mjs} +41 -44
  24. package/dist/js/chunks/chunk-A7ALMYUR.mjs.map +7 -0
  25. package/dist/js/chunks/chunk-BG6ZRB5H.mjs +154 -0
  26. package/dist/js/chunks/chunk-BG6ZRB5H.mjs.map +7 -0
  27. package/dist/js/chunks/{chunk-DLWYKFEI.mjs → chunk-CUQPB25U.mjs} +3 -3
  28. package/dist/js/chunks/{chunk-6WLSDZ4O.mjs → chunk-DAIU5SLG.mjs} +2 -2
  29. package/dist/js/chunks/chunk-FS7XY3HT.mjs +124 -0
  30. package/dist/js/chunks/chunk-FS7XY3HT.mjs.map +7 -0
  31. package/dist/js/chunks/{chunk-WJXDBPXQ.mjs → chunk-GIW4K4SE.mjs} +8 -12
  32. package/dist/js/chunks/chunk-GIW4K4SE.mjs.map +7 -0
  33. package/dist/js/chunks/chunk-GUB3TNO2.mjs +164 -0
  34. package/dist/js/chunks/chunk-GUB3TNO2.mjs.map +7 -0
  35. package/dist/js/chunks/chunk-GVGT6MIU.mjs +47 -0
  36. package/dist/js/chunks/chunk-GVGT6MIU.mjs.map +7 -0
  37. package/dist/js/chunks/{chunk-HNFSMIBY.mjs → chunk-GZKEFWPM.mjs} +83 -22
  38. package/dist/js/chunks/chunk-GZKEFWPM.mjs.map +7 -0
  39. package/dist/js/chunks/chunk-HKT2S7VM.mjs +48 -0
  40. package/dist/js/chunks/chunk-HKT2S7VM.mjs.map +7 -0
  41. package/dist/js/chunks/chunk-ILP3PDTL.mjs +187 -0
  42. package/dist/js/chunks/chunk-ILP3PDTL.mjs.map +7 -0
  43. package/dist/js/chunks/{chunk-YSBCHYXP.mjs → chunk-JIDMQGK6.mjs} +118 -13
  44. package/dist/js/chunks/chunk-JIDMQGK6.mjs.map +7 -0
  45. package/dist/js/chunks/chunk-KBNN3QDH.mjs +7 -0
  46. package/dist/js/chunks/chunk-KBNN3QDH.mjs.map +7 -0
  47. package/dist/js/chunks/{chunk-NNYP33NB.mjs → chunk-KHV6DZXX.mjs} +5 -4
  48. package/dist/js/chunks/chunk-KHV6DZXX.mjs.map +7 -0
  49. package/dist/js/chunks/{chunk-RFZZCYVU.mjs → chunk-KY6U46SM.mjs} +3 -3
  50. package/dist/js/chunks/{chunk-CKQP6P76.mjs → chunk-LRZMJZ3T.mjs} +4 -3
  51. package/dist/js/chunks/chunk-LRZMJZ3T.mjs.map +7 -0
  52. package/dist/js/chunks/{chunk-6OMRGML6.mjs → chunk-MNPROCZF.mjs} +4 -4
  53. package/dist/js/chunks/{chunk-6OMRGML6.mjs.map → chunk-MNPROCZF.mjs.map} +2 -2
  54. package/dist/js/chunks/{chunk-QV2JAWIZ.mjs → chunk-MZ6Z24BX.mjs} +3 -2
  55. package/dist/js/chunks/{chunk-QV2JAWIZ.mjs.map → chunk-MZ6Z24BX.mjs.map} +2 -2
  56. package/dist/js/chunks/chunk-NS2UMNZV.mjs +292 -0
  57. package/dist/js/chunks/chunk-NS2UMNZV.mjs.map +7 -0
  58. package/dist/js/chunks/chunk-O5XPWXIQ.mjs +406 -0
  59. package/dist/js/chunks/chunk-O5XPWXIQ.mjs.map +7 -0
  60. package/dist/js/chunks/{chunk-UBLRRJ7N.mjs → chunk-PM655FXL.mjs} +2 -2
  61. package/dist/js/chunks/{chunk-IFXVDDDH.mjs → chunk-QERLECVU.mjs} +3 -3
  62. package/dist/js/chunks/{chunk-GZWPXXY6.mjs → chunk-QJABDLSD.mjs} +5 -2
  63. package/dist/js/chunks/chunk-QJABDLSD.mjs.map +7 -0
  64. package/dist/js/chunks/chunk-RHRQKTTX.mjs +139 -0
  65. package/dist/js/chunks/chunk-RHRQKTTX.mjs.map +7 -0
  66. package/dist/js/chunks/{chunk-UNEMYWEW.mjs → chunk-S3XDFGSZ.mjs} +2 -2
  67. package/dist/js/chunks/chunk-SPETGK25.mjs +59 -0
  68. package/dist/js/chunks/chunk-SPETGK25.mjs.map +7 -0
  69. package/dist/js/chunks/chunk-TBM3FT7G.mjs +398 -0
  70. package/dist/js/chunks/chunk-TBM3FT7G.mjs.map +7 -0
  71. package/dist/js/chunks/chunk-UEXCIMJZ.mjs +214 -0
  72. package/dist/js/chunks/chunk-UEXCIMJZ.mjs.map +7 -0
  73. package/dist/js/chunks/chunk-VGZSAFTX.mjs +173 -0
  74. package/dist/js/chunks/chunk-VGZSAFTX.mjs.map +7 -0
  75. package/dist/js/chunks/{chunk-UAEAQBRC.mjs → chunk-X7OCHZVF.mjs} +2 -2
  76. package/dist/js/chunks/{chunk-EC63CHXU.mjs → chunk-YMSXJON6.mjs} +7 -6
  77. package/dist/js/chunks/chunk-YMSXJON6.mjs.map +7 -0
  78. package/dist/js/chunks/{chunk-QVVEWBOF.mjs → chunk-Z2NRKI7R.mjs} +2 -2
  79. package/dist/js/chunks/{chunk-PIJ2TAR3.mjs → chunk-ZAS25YFD.mjs} +2 -2
  80. package/dist/js/chunks/chunk-ZKZKNSLC.mjs +1 -0
  81. package/dist/js/expressive.cjs +3113 -148
  82. package/dist/js/expressive.cjs.map +4 -4
  83. package/dist/js/expressive.js +3113 -148
  84. package/dist/js/expressive.js.map +4 -4
  85. package/dist/js/expressive.min.js +11 -11
  86. package/dist/js/expressive.min.js.map +4 -4
  87. package/dist/js/expressive.mjs +95 -35
  88. package/dist/js/expressive.mjs.map +1 -1
  89. package/dist/js/internal/behaviors/bottomSheets.mjs +3 -3
  90. package/dist/js/internal/behaviors/dialogs.mjs +2 -2
  91. package/dist/js/internal/behaviors/forms.mjs +2 -2
  92. package/dist/js/internal/behaviors/sheetDrag.mjs +2 -2
  93. package/dist/js/internal/behaviors/sideSheets.mjs +3 -3
  94. package/dist/js/internal/components/autocomplete.mjs +3 -3
  95. package/dist/js/internal/components/barChart.mjs +10 -0
  96. package/dist/js/internal/components/barChart.mjs.map +7 -0
  97. package/dist/js/internal/components/buttons.mjs +2 -2
  98. package/dist/js/internal/components/cards.mjs +2 -2
  99. package/dist/js/internal/components/carousel.mjs +2 -2
  100. package/dist/js/internal/components/chips.mjs +4 -4
  101. package/dist/js/internal/components/columnChart.mjs +9 -0
  102. package/dist/js/internal/components/columnChart.mjs.map +7 -0
  103. package/dist/js/internal/components/commandPalette.mjs +9 -0
  104. package/dist/js/internal/components/commandPalette.mjs.map +7 -0
  105. package/dist/js/internal/components/confetti.mjs +8 -0
  106. package/dist/js/internal/components/confetti.mjs.map +7 -0
  107. package/dist/js/internal/components/datepicker.mjs +5 -5
  108. package/dist/js/internal/components/expandingCard.mjs +2 -2
  109. package/dist/js/internal/components/heatmapChart.mjs +9 -0
  110. package/dist/js/internal/components/heatmapChart.mjs.map +7 -0
  111. package/dist/js/internal/components/index.mjs +88 -28
  112. package/dist/js/internal/components/lightbox.mjs +2 -2
  113. package/dist/js/internal/components/lineChart.mjs +12 -0
  114. package/dist/js/internal/components/lineChart.mjs.map +7 -0
  115. package/dist/js/internal/components/mapView.mjs +9 -0
  116. package/dist/js/internal/components/mapView.mjs.map +7 -0
  117. package/dist/js/internal/components/menu.mjs +2 -2
  118. package/dist/js/internal/components/messageScroller.mjs +9 -0
  119. package/dist/js/internal/components/messageScroller.mjs.map +7 -0
  120. package/dist/js/internal/components/mixedChart.mjs +10 -0
  121. package/dist/js/internal/components/mixedChart.mjs.map +7 -0
  122. package/dist/js/internal/components/particles.mjs +8 -0
  123. package/dist/js/internal/components/particles.mjs.map +7 -0
  124. package/dist/js/internal/components/pieChart.mjs +9 -0
  125. package/dist/js/internal/components/pieChart.mjs.map +7 -0
  126. package/dist/js/internal/components/questionnaire.mjs +9 -0
  127. package/dist/js/internal/components/questionnaire.mjs.map +7 -0
  128. package/dist/js/internal/components/radarChart.mjs +9 -0
  129. package/dist/js/internal/components/radarChart.mjs.map +7 -0
  130. package/dist/js/internal/components/radialChart.mjs +9 -0
  131. package/dist/js/internal/components/radialChart.mjs.map +7 -0
  132. package/dist/js/internal/components/registry.mjs +35 -20
  133. package/dist/js/internal/components/richTextEditor.mjs +9 -0
  134. package/dist/js/internal/components/richTextEditor.mjs.map +7 -0
  135. package/dist/js/internal/components/scrollspy.mjs +1 -1
  136. package/dist/js/internal/components/select.mjs +3 -3
  137. package/dist/js/internal/components/slider.mjs +2 -2
  138. package/dist/js/internal/components/snackbar.mjs +2 -2
  139. package/dist/js/internal/components/tabs.mjs +3 -3
  140. package/dist/js/internal/components/timepicker.mjs +3 -3
  141. package/dist/js/internal/components/tooltip.mjs +2 -2
  142. package/dist/js/internal/core/utils.mjs +1 -1
  143. package/dist/js/internal/plugins/dockedDisplayPlugin.mjs +2 -2
  144. package/dist/js/modular.mjs +95 -35
  145. package/dist/types/behaviors/forms.d.ts +27 -0
  146. package/dist/types/components/barChart.d.ts +24 -0
  147. package/dist/types/components/carousel.d.ts +2 -0
  148. package/dist/types/components/columnChart.d.ts +21 -0
  149. package/dist/types/components/commandPalette.d.ts +96 -0
  150. package/dist/types/components/confetti.d.ts +103 -0
  151. package/dist/types/components/datepicker.d.ts +2 -0
  152. package/dist/types/components/heatmapChart.d.ts +49 -0
  153. package/dist/types/components/index.d.ts +15 -0
  154. package/dist/types/components/lineChart.d.ts +134 -0
  155. package/dist/types/components/mapView.d.ts +151 -0
  156. package/dist/types/components/menu.d.ts +31 -0
  157. package/dist/types/components/messageScroller.d.ts +111 -0
  158. package/dist/types/components/mixedChart.d.ts +25 -0
  159. package/dist/types/components/particles.d.ts +72 -0
  160. package/dist/types/components/pieChart.d.ts +43 -0
  161. package/dist/types/components/questionnaire.d.ts +96 -0
  162. package/dist/types/components/radarChart.d.ts +39 -0
  163. package/dist/types/components/radialChart.d.ts +45 -0
  164. package/dist/types/components/registry.d.ts +52 -0
  165. package/dist/types/components/richTextEditor.d.ts +71 -0
  166. package/dist/types/components/slider.d.ts +1 -1
  167. package/dist/types/components/snackbar.d.ts +2 -0
  168. package/dist/types/components/tabs.d.ts +1 -1
  169. package/dist/types/modular.d.ts +10 -1
  170. package/dist/types/plugins/dockedDisplayPlugin.d.ts +3 -3
  171. package/package.json +5 -1
  172. package/src/sass/README.md +3 -6
  173. package/src/sass/abstracts/_index.scss +1 -1
  174. package/src/sass/abstracts/_mixins.scss +226 -0
  175. package/src/sass/abstracts/_variables.scss +14 -0
  176. package/src/sass/base/_typography.scss +45 -0
  177. package/src/sass/components/_accordion.scss +161 -0
  178. package/src/sass/components/_aura.scss +119 -0
  179. package/src/sass/components/_avatar.scss +86 -0
  180. package/src/sass/components/_bar-chart.scss +285 -0
  181. package/src/sass/components/_bottom-sheet.scss +1 -0
  182. package/src/sass/components/_button-groups.scss +13 -3
  183. package/src/sass/components/_buttons.scss +1 -1
  184. package/src/sass/components/_cards.scss +16 -13
  185. package/src/sass/components/_column-chart.scss +134 -0
  186. package/src/sass/components/_command-palette.scss +140 -0
  187. package/src/sass/components/_confetti.scss +14 -0
  188. package/src/sass/components/_countdown.scss +89 -0
  189. package/src/sass/components/_data-table.scss +188 -0
  190. package/src/sass/components/_dialog.scss +1 -0
  191. package/src/sass/components/_empty-state.scss +78 -0
  192. package/src/sass/components/_expanding-card.scss +3 -0
  193. package/src/sass/components/_heatmap-chart.scss +156 -0
  194. package/src/sass/components/_index.scss +30 -0
  195. package/src/sass/components/_kpi.scss +162 -0
  196. package/src/sass/components/_line-chart.scss +102 -0
  197. package/src/sass/components/_map.scss +188 -0
  198. package/src/sass/components/_marquee.scss +111 -0
  199. package/src/sass/components/_menu.scss +10 -0
  200. package/src/sass/components/_message-scroller.scss +66 -0
  201. package/src/sass/components/_message.scss +202 -0
  202. package/src/sass/components/_mixed-chart.scss +157 -0
  203. package/src/sass/components/_navigation-bar.scss +1 -0
  204. package/src/sass/components/_navigation-rail.scss +9 -0
  205. package/src/sass/components/_particles.scss +14 -0
  206. package/src/sass/components/_pie-chart.scss +203 -0
  207. package/src/sass/components/_popover.scss +112 -0
  208. package/src/sass/components/_questionnaire.scss +144 -0
  209. package/src/sass/components/_radar-chart.scss +205 -0
  210. package/src/sass/components/_radial-chart.scss +174 -0
  211. package/src/sass/components/_rich-text-editor.scss +99 -0
  212. package/src/sass/components/_search.scss +1 -0
  213. package/src/sass/components/_side-sheet.scss +1 -0
  214. package/src/sass/components/_skeleton.scss +81 -0
  215. package/src/sass/components/_snackbar.scss +1 -0
  216. package/src/sass/components/_stat.scss +86 -0
  217. package/src/sass/components/_stepper.scss +190 -0
  218. package/src/sass/components/_table_of_contents.scss +3 -1
  219. package/src/sass/components/_timeline.scss +114 -0
  220. package/src/sass/components/_toolbar.scss +1 -0
  221. package/src/sass/components/_tooltip.scss +2 -0
  222. package/src/sass/components/_tree.scss +139 -0
  223. package/src/sass/components/forms/_checkboxes.scss +7 -2
  224. package/src/sass/components/forms/_drop-zone.scss +128 -0
  225. package/src/sass/components/forms/_index.scss +2 -0
  226. package/src/sass/components/forms/_input-fields.scss +133 -2
  227. package/src/sass/components/forms/_rating.scss +165 -0
  228. package/src/sass/tokens/_reference.scss +3 -15
  229. package/src/sass/utilities/_index.scss +2 -0
  230. package/src/sass/utilities/_scroll-area.scss +35 -0
  231. package/src/sass/utilities/_shapes.scss +164 -0
  232. package/dist/js/chunks/chunk-3VOK6J7U.mjs.map +0 -7
  233. package/dist/js/chunks/chunk-CKQP6P76.mjs.map +0 -7
  234. package/dist/js/chunks/chunk-EC63CHXU.mjs.map +0 -7
  235. package/dist/js/chunks/chunk-G3I5H2U3.mjs +0 -7
  236. package/dist/js/chunks/chunk-G3I5H2U3.mjs.map +0 -7
  237. package/dist/js/chunks/chunk-GZWPXXY6.mjs.map +0 -7
  238. package/dist/js/chunks/chunk-H2WA4XHH.mjs.map +0 -7
  239. package/dist/js/chunks/chunk-HLDXZ7XB.mjs.map +0 -7
  240. package/dist/js/chunks/chunk-HNFSMIBY.mjs.map +0 -7
  241. package/dist/js/chunks/chunk-LWBQIX5J.mjs.map +0 -7
  242. package/dist/js/chunks/chunk-NNYP33NB.mjs.map +0 -7
  243. package/dist/js/chunks/chunk-PSSHQWCX.mjs +0 -100
  244. package/dist/js/chunks/chunk-PSSHQWCX.mjs.map +0 -7
  245. package/dist/js/chunks/chunk-WJXDBPXQ.mjs.map +0 -7
  246. package/dist/js/chunks/chunk-WWPAPHMA.mjs +0 -1
  247. package/dist/js/chunks/chunk-YSBCHYXP.mjs.map +0 -7
  248. /package/dist/js/chunks/{chunk-HB6IW7QQ.mjs.map → chunk-3GVFZ4XO.mjs.map} +0 -0
  249. /package/dist/js/chunks/{chunk-DLWYKFEI.mjs.map → chunk-CUQPB25U.mjs.map} +0 -0
  250. /package/dist/js/chunks/{chunk-6WLSDZ4O.mjs.map → chunk-DAIU5SLG.mjs.map} +0 -0
  251. /package/dist/js/chunks/{chunk-RFZZCYVU.mjs.map → chunk-KY6U46SM.mjs.map} +0 -0
  252. /package/dist/js/chunks/{chunk-UBLRRJ7N.mjs.map → chunk-PM655FXL.mjs.map} +0 -0
  253. /package/dist/js/chunks/{chunk-IFXVDDDH.mjs.map → chunk-QERLECVU.mjs.map} +0 -0
  254. /package/dist/js/chunks/{chunk-UNEMYWEW.mjs.map → chunk-S3XDFGSZ.mjs.map} +0 -0
  255. /package/dist/js/chunks/{chunk-UAEAQBRC.mjs.map → chunk-X7OCHZVF.mjs.map} +0 -0
  256. /package/dist/js/chunks/{chunk-QVVEWBOF.mjs.map → chunk-Z2NRKI7R.mjs.map} +0 -0
  257. /package/dist/js/chunks/{chunk-PIJ2TAR3.mjs.map → chunk-ZAS25YFD.mjs.map} +0 -0
  258. /package/dist/js/chunks/{chunk-WWPAPHMA.mjs.map → chunk-ZKZKNSLC.mjs.map} +0 -0
@@ -0,0 +1,202 @@
1
+ @use "../abstracts" as *;
2
+
3
+ // Message. One message in a conversation: an optional avatar, header and
4
+ // footer around a single surface. The surface is every other child, normally
5
+ // one .message-bubble; wrap several elements in a <div> to keep them on one
6
+ // surface. `.end` moves the row to the sender's side.
7
+ //
8
+ // The parts are divs, not <header>/<footer>: outside sectioning content those
9
+ // elements become banner and contentinfo landmarks, one per message.
10
+ //
11
+ // The grid puts the avatar in the surface row, so it lines up with the bottom
12
+ // of the bubble and a footer below never pushes it down.
13
+ //
14
+ // Tokens:
15
+ // --md-comp-message-avatar-size 32px
16
+ // --md-comp-message-gap 8px (avatar to surface)
17
+ // --md-comp-message-surface-max-width 80%
18
+ // --md-comp-message-bubble-shape 20px
19
+ // --md-comp-message-bubble-grouped-shape 4px (joined corners in a group)
20
+ // --md-comp-message-bubble-container-color surface-container-high / end: primary-container
21
+ // --md-comp-message-bubble-color on-surface / end: on-primary-container
22
+ // --md-comp-message-group-gap 2px
23
+
24
+ .message {
25
+ --md-comp-message-avatar-size: 32px;
26
+ --md-comp-message-gap: 8px;
27
+ --md-comp-message-surface-max-width: 80%;
28
+ --md-comp-message-bubble-shape: 20px;
29
+ --md-comp-message-bubble-grouped-shape: 4px;
30
+ --md-comp-message-bubble-container-color: var(--md-sys-color-surface-container-high);
31
+ --md-comp-message-bubble-color: var(--md-sys-color-on-surface);
32
+
33
+ display: grid;
34
+ grid-template-columns: auto minmax(0, 1fr);
35
+ grid-template-areas:
36
+ ". header"
37
+ "avatar surface"
38
+ ". footer";
39
+ align-items: end;
40
+ justify-items: start;
41
+ color: var(--md-sys-color-on-surface);
42
+
43
+ > .message-avatar {
44
+ grid-area: avatar;
45
+ margin-inline-end: var(--md-comp-message-gap);
46
+ }
47
+
48
+ > .message-header {
49
+ grid-area: header;
50
+ }
51
+
52
+ > .message-footer {
53
+ grid-area: footer;
54
+ }
55
+
56
+ > :not(.message-avatar, .message-header, .message-footer) {
57
+ grid-area: surface;
58
+ min-width: 0;
59
+ max-width: var(--md-comp-message-surface-max-width);
60
+ }
61
+
62
+ &.end {
63
+ --md-comp-message-bubble-container-color: var(--md-sys-color-primary-container);
64
+ --md-comp-message-bubble-color: var(--md-sys-color-on-primary-container);
65
+
66
+ grid-template-columns: minmax(0, 1fr) auto;
67
+ grid-template-areas:
68
+ "header ."
69
+ "surface avatar"
70
+ "footer .";
71
+ justify-items: end;
72
+
73
+ > .message-avatar {
74
+ margin-inline: var(--md-comp-message-gap) 0;
75
+ }
76
+ }
77
+ }
78
+
79
+ // An <img>, or a box holding initials, an icon or an <img>. An empty one is a
80
+ // spacer that keeps earlier messages in a group in line with the last.
81
+ .message-avatar {
82
+ box-sizing: border-box;
83
+ display: inline-flex;
84
+ align-items: center;
85
+ justify-content: center;
86
+ width: var(--md-comp-message-avatar-size);
87
+ height: var(--md-comp-message-avatar-size);
88
+ border-radius: 50%;
89
+ overflow: hidden;
90
+ object-fit: cover;
91
+ @include typescale("label-medium");
92
+
93
+ &:not(img):not(:empty) {
94
+ background-color: var(--md-sys-color-secondary-container);
95
+ color: var(--md-sys-color-on-secondary-container);
96
+ }
97
+
98
+ > img {
99
+ width: 100%;
100
+ height: 100%;
101
+ object-fit: cover;
102
+ }
103
+
104
+ > #{$icon} {
105
+ font-size: 20px;
106
+ }
107
+ }
108
+
109
+ .message-header,
110
+ .message-footer {
111
+ display: flex;
112
+ flex-wrap: wrap;
113
+ align-items: center;
114
+ gap: 4px;
115
+ padding-inline: 12px;
116
+ color: var(--md-sys-color-on-surface-variant);
117
+ @include typescale("label-medium");
118
+ }
119
+
120
+ .message-header {
121
+ margin-block-end: 4px;
122
+ }
123
+
124
+ .message-footer {
125
+ margin-block-start: 4px;
126
+
127
+ // Icon buttons carry their own inset; drop the text inset so the first
128
+ // icon sits under the bubble edge rather than past it.
129
+ &:has(> .icon-button:first-child) {
130
+ padding-inline: 0;
131
+ }
132
+ }
133
+
134
+ .message-bubble {
135
+ box-sizing: border-box;
136
+ margin: 0;
137
+ padding: 10px 16px;
138
+ border-radius: var(--md-comp-message-bubble-shape);
139
+ background-color: var(--md-comp-message-bubble-container-color);
140
+ color: var(--md-comp-message-bubble-color);
141
+ overflow-wrap: anywhere;
142
+ @include typescale("body-large");
143
+
144
+ > * {
145
+ margin-block: 0;
146
+ }
147
+
148
+ > * + * {
149
+ margin-block-start: 8px;
150
+ }
151
+
152
+ // Attachments and rich content: no fill, an outline-variant border.
153
+ &.outlined {
154
+ --md-comp-message-bubble-container-color: transparent;
155
+ --md-comp-message-bubble-color: var(--md-sys-color-on-surface);
156
+
157
+ border: 1px solid var(--md-sys-color-outline-variant);
158
+ }
159
+
160
+ // A bubble holding only an image or video frames it with a thin inset.
161
+ &:has(> :is(img, video, picture):only-child) {
162
+ padding: 4px;
163
+ }
164
+
165
+ > :is(img, video),
166
+ > picture > img {
167
+ display: block;
168
+ max-width: 100%;
169
+ height: auto;
170
+ border-radius: calc(var(--md-comp-message-bubble-shape) - 4px);
171
+ }
172
+ }
173
+
174
+ // Consecutive messages from one sender. The bubbles join on the sender's
175
+ // side: inner corners shrink to the grouped shape.
176
+ .message-group {
177
+ --md-comp-message-group-gap: 2px;
178
+
179
+ display: flex;
180
+ flex-direction: column;
181
+ gap: var(--md-comp-message-group-gap);
182
+
183
+ > .message:not(.end) {
184
+ &:not(:first-child) .message-bubble {
185
+ border-start-start-radius: var(--md-comp-message-bubble-grouped-shape);
186
+ }
187
+
188
+ &:not(:last-child) .message-bubble {
189
+ border-end-start-radius: var(--md-comp-message-bubble-grouped-shape);
190
+ }
191
+ }
192
+
193
+ > .message.end {
194
+ &:not(:first-child) .message-bubble {
195
+ border-start-end-radius: var(--md-comp-message-bubble-grouped-shape);
196
+ }
197
+
198
+ &:not(:last-child) .message-bubble {
199
+ border-end-end-radius: var(--md-comp-message-bubble-grouped-shape);
200
+ }
201
+ }
202
+ }
@@ -0,0 +1,157 @@
1
+ @use "../abstracts" as *;
2
+
3
+ // Mixed chart. The same <figure>, <figcaption> and <table> as a line
4
+ // chart; MixedChart draws each series by its header cell's class: `column`
5
+ // as columns from zero, `area` as a line over a fading fill, and anything
6
+ // else as a line. `dashed` dashes a line. A series with `end` is drawn
7
+ // against a second scale, set by data-end-min and data-end-max on the
8
+ // figure. The plot, tooltip, labels and legend come from chart().
9
+ //
10
+ // Columns are full-height spans clipped to their value, as in the column
11
+ // chart, behind an SVG of the lines and areas, as in the line chart.
12
+ // Points on the cursor mark each line; the cursor bands the whole row.
13
+ //
14
+ // Tokens:
15
+ // --md-comp-mixed-chart-height 240px (sparkline 48px)
16
+ // --md-comp-mixed-chart-column-width 50% of each row's width
17
+ // --md-comp-mixed-chart-shape 4px, the column's end radius
18
+ // --md-comp-mixed-chart-line-width 3px (sparkline 2px)
19
+ // --md-comp-mixed-chart-grid-color outline-variant
20
+ // --md-comp-mixed-chart-color-1..4 primary, tertiary, secondary,
21
+ // on-surface-variant
22
+
23
+ @include chart("mixed-chart");
24
+
25
+ .mixed-chart {
26
+ --md-comp-mixed-chart-column-width: 50%;
27
+ --md-comp-mixed-chart-shape: 4px;
28
+ --md-comp-mixed-chart-line-width: 3px;
29
+
30
+ &.sparkline {
31
+ --md-comp-mixed-chart-line-width: 2px;
32
+ }
33
+ }
34
+
35
+ .mixed-chart-plot {
36
+ isolation: isolate;
37
+ }
38
+
39
+ .mixed-chart-marks,
40
+ .mixed-chart-marks > * {
41
+ position: absolute;
42
+ inset: 0;
43
+ }
44
+
45
+ .mixed-chart-marks > svg {
46
+ width: 100%;
47
+ height: 100%;
48
+ overflow: visible;
49
+ }
50
+
51
+ .mixed-chart-columns {
52
+ display: grid;
53
+ grid-auto-columns: minmax(0, 1fr);
54
+ grid-auto-flow: column;
55
+
56
+ // A row: its columns side by side.
57
+ > div {
58
+ display: grid;
59
+ grid-auto-columns: minmax(0, 1fr);
60
+ grid-auto-flow: column;
61
+ gap: 2px;
62
+ justify-self: center;
63
+ width: var(--md-comp-mixed-chart-column-width);
64
+ }
65
+
66
+ > div > span {
67
+ --mixed-chart-ends: var(--md-comp-mixed-chart-shape) var(--md-comp-mixed-chart-shape) 0 0;
68
+
69
+ background-color: var(--mixed-chart-color);
70
+ clip-path: inset(var(--top, 100%) 0 var(--bottom, 0%) round var(--mixed-chart-ends));
71
+
72
+ // A column below zero has its tip at the bottom.
73
+ &.negative {
74
+ --mixed-chart-ends: 0 0 var(--md-comp-mixed-chart-shape) var(--md-comp-mixed-chart-shape);
75
+ }
76
+ }
77
+
78
+ @media (prefers-reduced-motion: no-preference) {
79
+ > div > span {
80
+ transition: clip-path 400ms cubic-bezier(0.2, 0, 0, 1);
81
+
82
+ @starting-style {
83
+ clip-path: inset(var(--zero, 100%) 0 calc(100% - var(--zero, 100%)) round var(--mixed-chart-ends));
84
+ }
85
+ }
86
+ }
87
+ }
88
+
89
+ .mixed-chart-line {
90
+ fill: none;
91
+ stroke: var(--mixed-chart-color);
92
+ stroke-width: var(--md-comp-mixed-chart-line-width);
93
+ stroke-linecap: round;
94
+ stroke-linejoin: round;
95
+ vector-effect: non-scaling-stroke;
96
+ }
97
+
98
+ .mixed-chart-series.dashed .mixed-chart-line {
99
+ stroke-dasharray: 2 8;
100
+ }
101
+
102
+ .mixed-chart-series:not(.area) .mixed-chart-area {
103
+ display: none;
104
+ }
105
+
106
+ .mixed-chart-series stop {
107
+ stop-color: var(--mixed-chart-color);
108
+ stop-opacity: 0;
109
+
110
+ &:first-child {
111
+ stop-opacity: 0.24;
112
+ }
113
+ }
114
+
115
+ // A band behind the highlighted row, with a point over each line. The
116
+ // cursor makes no stacking context, so the band can go behind the marks
117
+ // and the points in front of them.
118
+ .mixed-chart-cursor {
119
+ width: calc(100% / var(--rows, 1));
120
+ margin-left: calc(-50% / var(--rows, 1));
121
+
122
+ &::before {
123
+ content: "";
124
+ position: absolute;
125
+ inset: 0;
126
+ z-index: -1;
127
+ border-radius: var(--md-comp-mixed-chart-shape);
128
+ background-color: color-mix(in srgb, var(--md-sys-color-on-surface) state-opacity("hover"), transparent);
129
+ }
130
+
131
+ > span {
132
+ position: absolute;
133
+ left: 50%;
134
+ z-index: 1;
135
+ width: 10px;
136
+ height: 10px;
137
+ border: 2px solid var(--md-sys-color-surface);
138
+ border-radius: 50%;
139
+ background-color: var(--mixed-chart-color);
140
+ translate: -50% -50%;
141
+ }
142
+
143
+ > .column {
144
+ display: none;
145
+ }
146
+ }
147
+
148
+ @media (forced-colors: active) {
149
+ .mixed-chart-columns > div > span,
150
+ .mixed-chart-cursor > span {
151
+ forced-color-adjust: none;
152
+ }
153
+
154
+ .mixed-chart-cursor::before {
155
+ outline: 1px solid CanvasText;
156
+ }
157
+ }
@@ -47,6 +47,7 @@
47
47
  padding-bottom: max(6px, env(safe-area-inset-bottom, 0px));
48
48
  background-color: var(--md-comp-nav-bar-container-color);
49
49
  color: var(--md-sys-color-on-surface);
50
+ @include glass(var(--md-comp-nav-bar-container-color));
50
51
 
51
52
  > :is(a, button) {
52
53
  position: relative;
@@ -57,6 +57,7 @@
57
57
  transition: width var(--md-comp-nav-rail-duration) ease,
58
58
  min-width var(--md-comp-nav-rail-duration) ease,
59
59
  padding var(--md-comp-nav-rail-duration) ease;
60
+ @include glass(var(--md-sys-color-surface-container));
60
61
 
61
62
  // Menu toggle.
62
63
  > button:not(.button, .icon-button):first-child {
@@ -282,6 +283,11 @@
282
283
  z-index: 998;
283
284
  @include z-depth("1");
284
285
 
286
+ // A blurred rail would become the containing block of the fixed scrim
287
+ // below and clip it to the rail, so a modal rail stays solid.
288
+ background-color: var(--md-sys-color-surface-container);
289
+ backdrop-filter: none;
290
+
285
291
  &::before {
286
292
  content: "";
287
293
  position: fixed;
@@ -298,6 +304,9 @@
298
304
  z-index: 998;
299
305
  @include z-depth("1");
300
306
 
307
+ background-color: var(--md-sys-color-surface-container);
308
+ backdrop-filter: none;
309
+
301
310
  &::before {
302
311
  content: "";
303
312
  position: fixed;
@@ -0,0 +1,14 @@
1
+ @use "../abstracts" as *;
2
+
3
+ // Particles. A <canvas class="particles"> covers its nearest positioned
4
+ // ancestor and lets clicks through to what is under it. The Particles script
5
+ // paints the dots in the canvas's `color`.
6
+
7
+ canvas.particles {
8
+ position: absolute;
9
+ inset: 0;
10
+ width: 100%;
11
+ height: 100%;
12
+ color: var(--md-sys-color-on-surface);
13
+ pointer-events: none;
14
+ }
@@ -0,0 +1,203 @@
1
+ @use "../abstracts" as *;
2
+
3
+ // Pie chart. The same <figure>, <figcaption> and <table> as a line chart;
4
+ // PieChart draws the first value column as slices of the whole, clockwise
5
+ // from the top, with a legend of every row, its cell and its share. The
6
+ // plot, tooltip and legend swatches come from chart(); the plot is a square
7
+ // as wide as --md-comp-pie-chart-height.
8
+ //
9
+ // The slices are SVG in a -50 to 50 box with a radius of 46, under a mask
10
+ // whose lines cut the gaps and whose circle, scaled here, cuts the donut's
11
+ // hole. The value labels and the tooltip sit on a slice's middle from the
12
+ // --turn PieChart sets, a fraction of a turn clockwise from the top.
13
+ //
14
+ // Modifiers: .donut cuts a hole and shows a <tfoot> total in it, .values
15
+ // writes each slice's share on it, .sparkline is a small pie with no
16
+ // legend or tooltip.
17
+ //
18
+ // Tokens:
19
+ // --md-comp-pie-chart-height 240px, the pie's diameter (sparkline 48px)
20
+ // --md-comp-pie-chart-hole 0.6, the donut hole's share of the diameter
21
+ // --md-comp-pie-chart-gap 1.5, the gap between slices in hundredths
22
+ // of the plot's width
23
+ // --md-comp-pie-chart-color-1..6 primary, tertiary, secondary,
24
+ // on-surface-variant, primary-container,
25
+ // tertiary-container
26
+ // --md-comp-pie-chart-on-color-1..6 on-primary, on-tertiary, on-secondary,
27
+ // surface, on-primary-container,
28
+ // on-tertiary-container; .values text
29
+
30
+ @include chart("pie-chart");
31
+
32
+ .pie-chart {
33
+ --md-comp-pie-chart-hole: 0.6;
34
+ --md-comp-pie-chart-gap: 1.5;
35
+ --md-comp-pie-chart-color-5: var(--md-sys-color-primary-container);
36
+ --md-comp-pie-chart-color-6: var(--md-sys-color-tertiary-container);
37
+ --md-comp-pie-chart-on-color-1: var(--md-sys-color-on-primary);
38
+ --md-comp-pie-chart-on-color-2: var(--md-sys-color-on-tertiary);
39
+ --md-comp-pie-chart-on-color-3: var(--md-sys-color-on-secondary);
40
+ --md-comp-pie-chart-on-color-4: var(--md-sys-color-surface);
41
+ --md-comp-pie-chart-on-color-5: var(--md-sys-color-on-primary-container);
42
+ --md-comp-pie-chart-on-color-6: var(--md-sys-color-on-tertiary-container);
43
+ // Where labels and the tooltip sit, as a share of the radius.
44
+ --pie-chart-label-at: 0.62;
45
+
46
+ gap: 16px;
47
+
48
+ &.donut {
49
+ // The middle of the ring.
50
+ --pie-chart-label-at: calc((1 + var(--md-comp-pie-chart-hole)) / 2);
51
+ }
52
+ }
53
+
54
+ @for $i from 1 through 6 {
55
+ .pie-chart [data-series="#{$i}"] {
56
+ --pie-chart-color: var(--md-comp-pie-chart-color-#{$i});
57
+ --pie-chart-on-color: var(--md-comp-pie-chart-on-color-#{$i});
58
+ }
59
+ }
60
+
61
+ .pie-chart-plot {
62
+ width: min(100%, var(--md-comp-pie-chart-height));
63
+ height: auto;
64
+ aspect-ratio: 1;
65
+ margin-inline: auto;
66
+ border: 0;
67
+ border-radius: 50%;
68
+ background: none;
69
+ }
70
+
71
+ .pie-chart-pie {
72
+ position: absolute;
73
+ inset: 0;
74
+
75
+ > svg {
76
+ display: block;
77
+ width: 100%;
78
+ height: 100%;
79
+ }
80
+ }
81
+
82
+ // The origin of an SVG transform is the box's middle, (0, 0).
83
+ .pie-chart-hole {
84
+ transform: scale(0);
85
+ }
86
+
87
+ .pie-chart.donut .pie-chart-hole {
88
+ transform: scale(var(--md-comp-pie-chart-hole));
89
+ }
90
+
91
+ .pie-chart-gaps {
92
+ stroke-width: var(--md-comp-pie-chart-gap);
93
+ }
94
+
95
+ .pie-chart-slice {
96
+ fill: var(--pie-chart-color);
97
+
98
+ // GROWN in pieChart.ts.
99
+ &.active {
100
+ transform: scale(1.06);
101
+ }
102
+
103
+ @media (prefers-reduced-motion: no-preference) {
104
+ transition: transform 200ms cubic-bezier(0.2, 0, 0, 1), opacity 400ms cubic-bezier(0.2, 0, 0, 1);
105
+
106
+ @starting-style {
107
+ opacity: 0;
108
+ transform: scale(0.8);
109
+ }
110
+ }
111
+ }
112
+
113
+ .pie-chart-values > span,
114
+ .pie-chart-tooltip {
115
+ --pie-chart-angle: calc(var(--turn, 0) * 1turn);
116
+
117
+ position: absolute;
118
+ left: calc(50% + sin(var(--pie-chart-angle)) * var(--pie-chart-label-at) * 46%);
119
+ top: calc(50% - cos(var(--pie-chart-angle)) * var(--pie-chart-label-at) * 46%);
120
+ }
121
+
122
+ .pie-chart-values > span {
123
+ translate: -50% -50%;
124
+ color: var(--pie-chart-on-color);
125
+ @include typescale("label-medium");
126
+ font-variant-numeric: tabular-nums;
127
+ white-space: nowrap;
128
+ }
129
+
130
+ .pie-chart-tooltip {
131
+ translate: 12px -50%;
132
+
133
+ &.end {
134
+ translate: calc(-100% - 12px) -50%;
135
+ }
136
+ }
137
+
138
+ .pie-chart-total {
139
+ position: absolute;
140
+ inset: 0;
141
+ display: none;
142
+ flex-direction: column;
143
+ align-items: center;
144
+ justify-content: center;
145
+ text-align: center;
146
+
147
+ > * {
148
+ max-width: calc(80% * var(--md-comp-pie-chart-hole));
149
+ overflow-wrap: anywhere;
150
+ }
151
+
152
+ > strong {
153
+ color: var(--md-sys-color-on-surface);
154
+ @include typescale("headline-small");
155
+ }
156
+
157
+ > span {
158
+ color: var(--md-sys-color-on-surface-variant);
159
+ @include typescale("body-small");
160
+ }
161
+ }
162
+
163
+ .pie-chart.donut .pie-chart-total {
164
+ display: flex;
165
+ }
166
+
167
+ // One row per slice: swatch, name, cell and share in aligned columns.
168
+ .pie-chart-legend {
169
+ display: grid;
170
+ grid-template-columns: auto minmax(0, 1fr) auto auto;
171
+ align-items: center;
172
+ gap: 8px;
173
+
174
+ > li {
175
+ display: contents;
176
+ }
177
+
178
+ > li > span:first-child {
179
+ overflow: hidden;
180
+ text-overflow: ellipsis;
181
+ white-space: nowrap;
182
+ }
183
+
184
+ > li > span:not(:first-child) {
185
+ text-align: end;
186
+ font-variant-numeric: tabular-nums;
187
+ }
188
+
189
+ > li > span:nth-child(2) {
190
+ color: var(--md-sys-color-on-surface);
191
+ font-weight: 500;
192
+ }
193
+ }
194
+
195
+ .pie-chart.sparkline .pie-chart-plot {
196
+ margin-inline: 0;
197
+ }
198
+
199
+ @media (forced-colors: active) {
200
+ .pie-chart-pie {
201
+ forced-color-adjust: none;
202
+ }
203
+ }