@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.
- package/CHANGELOG.md +339 -1
- package/README.md +38 -1
- package/dist/css/expressive.css +5342 -105
- package/dist/css/expressive.css.map +1 -1
- package/dist/css/expressive.min.css +1 -1
- package/dist/css/expressive.min.css.map +1 -1
- package/dist/fonts/material-symbols-outlined.woff2 +0 -0
- package/dist/fonts/material-symbols-rounded.woff2 +0 -0
- package/dist/fonts/material-symbols-sharp.woff2 +0 -0
- package/dist/js/chunks/chunk-3DHK5CZU.mjs +105 -0
- package/dist/js/chunks/chunk-3DHK5CZU.mjs.map +7 -0
- package/dist/js/chunks/{chunk-HB6IW7QQ.mjs → chunk-3GVFZ4XO.mjs} +3 -3
- package/dist/js/chunks/{chunk-HLDXZ7XB.mjs → chunk-4HZMB7LI.mjs} +22 -8
- package/dist/js/chunks/chunk-4HZMB7LI.mjs.map +7 -0
- package/dist/js/chunks/chunk-4KMNFIFZ.mjs +270 -0
- package/dist/js/chunks/chunk-4KMNFIFZ.mjs.map +7 -0
- package/dist/js/chunks/chunk-4TKTLGEM.mjs +262 -0
- package/dist/js/chunks/chunk-4TKTLGEM.mjs.map +7 -0
- package/dist/js/chunks/{chunk-3VOK6J7U.mjs → chunk-5BKHWHYY.mjs} +13 -6
- package/dist/js/chunks/chunk-5BKHWHYY.mjs.map +7 -0
- package/dist/js/chunks/{chunk-H2WA4XHH.mjs → chunk-5HQSGDZ5.mjs} +16 -7
- package/dist/js/chunks/chunk-5HQSGDZ5.mjs.map +7 -0
- package/dist/js/chunks/{chunk-LWBQIX5J.mjs → chunk-A7ALMYUR.mjs} +41 -44
- package/dist/js/chunks/chunk-A7ALMYUR.mjs.map +7 -0
- package/dist/js/chunks/chunk-BG6ZRB5H.mjs +154 -0
- package/dist/js/chunks/chunk-BG6ZRB5H.mjs.map +7 -0
- package/dist/js/chunks/{chunk-DLWYKFEI.mjs → chunk-CUQPB25U.mjs} +3 -3
- package/dist/js/chunks/{chunk-6WLSDZ4O.mjs → chunk-DAIU5SLG.mjs} +2 -2
- package/dist/js/chunks/chunk-FS7XY3HT.mjs +124 -0
- package/dist/js/chunks/chunk-FS7XY3HT.mjs.map +7 -0
- package/dist/js/chunks/{chunk-WJXDBPXQ.mjs → chunk-GIW4K4SE.mjs} +8 -12
- package/dist/js/chunks/chunk-GIW4K4SE.mjs.map +7 -0
- package/dist/js/chunks/chunk-GUB3TNO2.mjs +164 -0
- package/dist/js/chunks/chunk-GUB3TNO2.mjs.map +7 -0
- package/dist/js/chunks/chunk-GVGT6MIU.mjs +47 -0
- package/dist/js/chunks/chunk-GVGT6MIU.mjs.map +7 -0
- package/dist/js/chunks/{chunk-HNFSMIBY.mjs → chunk-GZKEFWPM.mjs} +83 -22
- package/dist/js/chunks/chunk-GZKEFWPM.mjs.map +7 -0
- package/dist/js/chunks/chunk-HKT2S7VM.mjs +48 -0
- package/dist/js/chunks/chunk-HKT2S7VM.mjs.map +7 -0
- package/dist/js/chunks/chunk-ILP3PDTL.mjs +187 -0
- package/dist/js/chunks/chunk-ILP3PDTL.mjs.map +7 -0
- package/dist/js/chunks/{chunk-YSBCHYXP.mjs → chunk-JIDMQGK6.mjs} +118 -13
- package/dist/js/chunks/chunk-JIDMQGK6.mjs.map +7 -0
- package/dist/js/chunks/chunk-KBNN3QDH.mjs +7 -0
- package/dist/js/chunks/chunk-KBNN3QDH.mjs.map +7 -0
- package/dist/js/chunks/{chunk-NNYP33NB.mjs → chunk-KHV6DZXX.mjs} +5 -4
- package/dist/js/chunks/chunk-KHV6DZXX.mjs.map +7 -0
- package/dist/js/chunks/{chunk-RFZZCYVU.mjs → chunk-KY6U46SM.mjs} +3 -3
- package/dist/js/chunks/{chunk-CKQP6P76.mjs → chunk-LRZMJZ3T.mjs} +4 -3
- package/dist/js/chunks/chunk-LRZMJZ3T.mjs.map +7 -0
- package/dist/js/chunks/{chunk-6OMRGML6.mjs → chunk-MNPROCZF.mjs} +4 -4
- package/dist/js/chunks/{chunk-6OMRGML6.mjs.map → chunk-MNPROCZF.mjs.map} +2 -2
- package/dist/js/chunks/{chunk-QV2JAWIZ.mjs → chunk-MZ6Z24BX.mjs} +3 -2
- package/dist/js/chunks/{chunk-QV2JAWIZ.mjs.map → chunk-MZ6Z24BX.mjs.map} +2 -2
- package/dist/js/chunks/chunk-NS2UMNZV.mjs +292 -0
- package/dist/js/chunks/chunk-NS2UMNZV.mjs.map +7 -0
- package/dist/js/chunks/chunk-O5XPWXIQ.mjs +406 -0
- package/dist/js/chunks/chunk-O5XPWXIQ.mjs.map +7 -0
- package/dist/js/chunks/{chunk-UBLRRJ7N.mjs → chunk-PM655FXL.mjs} +2 -2
- package/dist/js/chunks/{chunk-IFXVDDDH.mjs → chunk-QERLECVU.mjs} +3 -3
- package/dist/js/chunks/{chunk-GZWPXXY6.mjs → chunk-QJABDLSD.mjs} +5 -2
- package/dist/js/chunks/chunk-QJABDLSD.mjs.map +7 -0
- package/dist/js/chunks/chunk-RHRQKTTX.mjs +139 -0
- package/dist/js/chunks/chunk-RHRQKTTX.mjs.map +7 -0
- package/dist/js/chunks/{chunk-UNEMYWEW.mjs → chunk-S3XDFGSZ.mjs} +2 -2
- package/dist/js/chunks/chunk-SPETGK25.mjs +59 -0
- package/dist/js/chunks/chunk-SPETGK25.mjs.map +7 -0
- package/dist/js/chunks/chunk-TBM3FT7G.mjs +398 -0
- package/dist/js/chunks/chunk-TBM3FT7G.mjs.map +7 -0
- package/dist/js/chunks/chunk-UEXCIMJZ.mjs +214 -0
- package/dist/js/chunks/chunk-UEXCIMJZ.mjs.map +7 -0
- package/dist/js/chunks/chunk-VGZSAFTX.mjs +173 -0
- package/dist/js/chunks/chunk-VGZSAFTX.mjs.map +7 -0
- package/dist/js/chunks/{chunk-UAEAQBRC.mjs → chunk-X7OCHZVF.mjs} +2 -2
- package/dist/js/chunks/{chunk-EC63CHXU.mjs → chunk-YMSXJON6.mjs} +7 -6
- package/dist/js/chunks/chunk-YMSXJON6.mjs.map +7 -0
- package/dist/js/chunks/{chunk-QVVEWBOF.mjs → chunk-Z2NRKI7R.mjs} +2 -2
- package/dist/js/chunks/{chunk-PIJ2TAR3.mjs → chunk-ZAS25YFD.mjs} +2 -2
- package/dist/js/chunks/chunk-ZKZKNSLC.mjs +1 -0
- package/dist/js/expressive.cjs +3113 -148
- package/dist/js/expressive.cjs.map +4 -4
- package/dist/js/expressive.js +3113 -148
- package/dist/js/expressive.js.map +4 -4
- package/dist/js/expressive.min.js +11 -11
- package/dist/js/expressive.min.js.map +4 -4
- package/dist/js/expressive.mjs +95 -35
- package/dist/js/expressive.mjs.map +1 -1
- package/dist/js/internal/behaviors/bottomSheets.mjs +3 -3
- package/dist/js/internal/behaviors/dialogs.mjs +2 -2
- package/dist/js/internal/behaviors/forms.mjs +2 -2
- package/dist/js/internal/behaviors/sheetDrag.mjs +2 -2
- package/dist/js/internal/behaviors/sideSheets.mjs +3 -3
- package/dist/js/internal/components/autocomplete.mjs +3 -3
- package/dist/js/internal/components/barChart.mjs +10 -0
- package/dist/js/internal/components/barChart.mjs.map +7 -0
- package/dist/js/internal/components/buttons.mjs +2 -2
- package/dist/js/internal/components/cards.mjs +2 -2
- package/dist/js/internal/components/carousel.mjs +2 -2
- package/dist/js/internal/components/chips.mjs +4 -4
- package/dist/js/internal/components/columnChart.mjs +9 -0
- package/dist/js/internal/components/columnChart.mjs.map +7 -0
- package/dist/js/internal/components/commandPalette.mjs +9 -0
- package/dist/js/internal/components/commandPalette.mjs.map +7 -0
- package/dist/js/internal/components/confetti.mjs +8 -0
- package/dist/js/internal/components/confetti.mjs.map +7 -0
- package/dist/js/internal/components/datepicker.mjs +5 -5
- package/dist/js/internal/components/expandingCard.mjs +2 -2
- package/dist/js/internal/components/heatmapChart.mjs +9 -0
- package/dist/js/internal/components/heatmapChart.mjs.map +7 -0
- package/dist/js/internal/components/index.mjs +88 -28
- package/dist/js/internal/components/lightbox.mjs +2 -2
- package/dist/js/internal/components/lineChart.mjs +12 -0
- package/dist/js/internal/components/lineChart.mjs.map +7 -0
- package/dist/js/internal/components/mapView.mjs +9 -0
- package/dist/js/internal/components/mapView.mjs.map +7 -0
- package/dist/js/internal/components/menu.mjs +2 -2
- package/dist/js/internal/components/messageScroller.mjs +9 -0
- package/dist/js/internal/components/messageScroller.mjs.map +7 -0
- package/dist/js/internal/components/mixedChart.mjs +10 -0
- package/dist/js/internal/components/mixedChart.mjs.map +7 -0
- package/dist/js/internal/components/particles.mjs +8 -0
- package/dist/js/internal/components/particles.mjs.map +7 -0
- package/dist/js/internal/components/pieChart.mjs +9 -0
- package/dist/js/internal/components/pieChart.mjs.map +7 -0
- package/dist/js/internal/components/questionnaire.mjs +9 -0
- package/dist/js/internal/components/questionnaire.mjs.map +7 -0
- package/dist/js/internal/components/radarChart.mjs +9 -0
- package/dist/js/internal/components/radarChart.mjs.map +7 -0
- package/dist/js/internal/components/radialChart.mjs +9 -0
- package/dist/js/internal/components/radialChart.mjs.map +7 -0
- package/dist/js/internal/components/registry.mjs +35 -20
- package/dist/js/internal/components/richTextEditor.mjs +9 -0
- package/dist/js/internal/components/richTextEditor.mjs.map +7 -0
- package/dist/js/internal/components/scrollspy.mjs +1 -1
- package/dist/js/internal/components/select.mjs +3 -3
- package/dist/js/internal/components/slider.mjs +2 -2
- package/dist/js/internal/components/snackbar.mjs +2 -2
- package/dist/js/internal/components/tabs.mjs +3 -3
- package/dist/js/internal/components/timepicker.mjs +3 -3
- package/dist/js/internal/components/tooltip.mjs +2 -2
- package/dist/js/internal/core/utils.mjs +1 -1
- package/dist/js/internal/plugins/dockedDisplayPlugin.mjs +2 -2
- package/dist/js/modular.mjs +95 -35
- package/dist/types/behaviors/forms.d.ts +27 -0
- package/dist/types/components/barChart.d.ts +24 -0
- package/dist/types/components/carousel.d.ts +2 -0
- package/dist/types/components/columnChart.d.ts +21 -0
- package/dist/types/components/commandPalette.d.ts +96 -0
- package/dist/types/components/confetti.d.ts +103 -0
- package/dist/types/components/datepicker.d.ts +2 -0
- package/dist/types/components/heatmapChart.d.ts +49 -0
- package/dist/types/components/index.d.ts +15 -0
- package/dist/types/components/lineChart.d.ts +134 -0
- package/dist/types/components/mapView.d.ts +151 -0
- package/dist/types/components/menu.d.ts +31 -0
- package/dist/types/components/messageScroller.d.ts +111 -0
- package/dist/types/components/mixedChart.d.ts +25 -0
- package/dist/types/components/particles.d.ts +72 -0
- package/dist/types/components/pieChart.d.ts +43 -0
- package/dist/types/components/questionnaire.d.ts +96 -0
- package/dist/types/components/radarChart.d.ts +39 -0
- package/dist/types/components/radialChart.d.ts +45 -0
- package/dist/types/components/registry.d.ts +52 -0
- package/dist/types/components/richTextEditor.d.ts +71 -0
- package/dist/types/components/slider.d.ts +1 -1
- package/dist/types/components/snackbar.d.ts +2 -0
- package/dist/types/components/tabs.d.ts +1 -1
- package/dist/types/modular.d.ts +10 -1
- package/dist/types/plugins/dockedDisplayPlugin.d.ts +3 -3
- package/package.json +5 -1
- package/src/sass/README.md +3 -6
- package/src/sass/abstracts/_index.scss +1 -1
- package/src/sass/abstracts/_mixins.scss +226 -0
- package/src/sass/abstracts/_variables.scss +14 -0
- package/src/sass/base/_typography.scss +45 -0
- package/src/sass/components/_accordion.scss +161 -0
- package/src/sass/components/_aura.scss +119 -0
- package/src/sass/components/_avatar.scss +86 -0
- package/src/sass/components/_bar-chart.scss +285 -0
- package/src/sass/components/_bottom-sheet.scss +1 -0
- package/src/sass/components/_button-groups.scss +13 -3
- package/src/sass/components/_buttons.scss +1 -1
- package/src/sass/components/_cards.scss +16 -13
- package/src/sass/components/_column-chart.scss +134 -0
- package/src/sass/components/_command-palette.scss +140 -0
- package/src/sass/components/_confetti.scss +14 -0
- package/src/sass/components/_countdown.scss +89 -0
- package/src/sass/components/_data-table.scss +188 -0
- package/src/sass/components/_dialog.scss +1 -0
- package/src/sass/components/_empty-state.scss +78 -0
- package/src/sass/components/_expanding-card.scss +3 -0
- package/src/sass/components/_heatmap-chart.scss +156 -0
- package/src/sass/components/_index.scss +30 -0
- package/src/sass/components/_kpi.scss +162 -0
- package/src/sass/components/_line-chart.scss +102 -0
- package/src/sass/components/_map.scss +188 -0
- package/src/sass/components/_marquee.scss +111 -0
- package/src/sass/components/_menu.scss +10 -0
- package/src/sass/components/_message-scroller.scss +66 -0
- package/src/sass/components/_message.scss +202 -0
- package/src/sass/components/_mixed-chart.scss +157 -0
- package/src/sass/components/_navigation-bar.scss +1 -0
- package/src/sass/components/_navigation-rail.scss +9 -0
- package/src/sass/components/_particles.scss +14 -0
- package/src/sass/components/_pie-chart.scss +203 -0
- package/src/sass/components/_popover.scss +112 -0
- package/src/sass/components/_questionnaire.scss +144 -0
- package/src/sass/components/_radar-chart.scss +205 -0
- package/src/sass/components/_radial-chart.scss +174 -0
- package/src/sass/components/_rich-text-editor.scss +99 -0
- package/src/sass/components/_search.scss +1 -0
- package/src/sass/components/_side-sheet.scss +1 -0
- package/src/sass/components/_skeleton.scss +81 -0
- package/src/sass/components/_snackbar.scss +1 -0
- package/src/sass/components/_stat.scss +86 -0
- package/src/sass/components/_stepper.scss +190 -0
- package/src/sass/components/_table_of_contents.scss +3 -1
- package/src/sass/components/_timeline.scss +114 -0
- package/src/sass/components/_toolbar.scss +1 -0
- package/src/sass/components/_tooltip.scss +2 -0
- package/src/sass/components/_tree.scss +139 -0
- package/src/sass/components/forms/_checkboxes.scss +7 -2
- package/src/sass/components/forms/_drop-zone.scss +128 -0
- package/src/sass/components/forms/_index.scss +2 -0
- package/src/sass/components/forms/_input-fields.scss +133 -2
- package/src/sass/components/forms/_rating.scss +165 -0
- package/src/sass/tokens/_reference.scss +3 -15
- package/src/sass/utilities/_index.scss +2 -0
- package/src/sass/utilities/_scroll-area.scss +35 -0
- package/src/sass/utilities/_shapes.scss +164 -0
- package/dist/js/chunks/chunk-3VOK6J7U.mjs.map +0 -7
- package/dist/js/chunks/chunk-CKQP6P76.mjs.map +0 -7
- package/dist/js/chunks/chunk-EC63CHXU.mjs.map +0 -7
- package/dist/js/chunks/chunk-G3I5H2U3.mjs +0 -7
- package/dist/js/chunks/chunk-G3I5H2U3.mjs.map +0 -7
- package/dist/js/chunks/chunk-GZWPXXY6.mjs.map +0 -7
- package/dist/js/chunks/chunk-H2WA4XHH.mjs.map +0 -7
- package/dist/js/chunks/chunk-HLDXZ7XB.mjs.map +0 -7
- package/dist/js/chunks/chunk-HNFSMIBY.mjs.map +0 -7
- package/dist/js/chunks/chunk-LWBQIX5J.mjs.map +0 -7
- package/dist/js/chunks/chunk-NNYP33NB.mjs.map +0 -7
- package/dist/js/chunks/chunk-PSSHQWCX.mjs +0 -100
- package/dist/js/chunks/chunk-PSSHQWCX.mjs.map +0 -7
- package/dist/js/chunks/chunk-WJXDBPXQ.mjs.map +0 -7
- package/dist/js/chunks/chunk-WWPAPHMA.mjs +0 -1
- package/dist/js/chunks/chunk-YSBCHYXP.mjs.map +0 -7
- /package/dist/js/chunks/{chunk-HB6IW7QQ.mjs.map → chunk-3GVFZ4XO.mjs.map} +0 -0
- /package/dist/js/chunks/{chunk-DLWYKFEI.mjs.map → chunk-CUQPB25U.mjs.map} +0 -0
- /package/dist/js/chunks/{chunk-6WLSDZ4O.mjs.map → chunk-DAIU5SLG.mjs.map} +0 -0
- /package/dist/js/chunks/{chunk-RFZZCYVU.mjs.map → chunk-KY6U46SM.mjs.map} +0 -0
- /package/dist/js/chunks/{chunk-UBLRRJ7N.mjs.map → chunk-PM655FXL.mjs.map} +0 -0
- /package/dist/js/chunks/{chunk-IFXVDDDH.mjs.map → chunk-QERLECVU.mjs.map} +0 -0
- /package/dist/js/chunks/{chunk-UNEMYWEW.mjs.map → chunk-S3XDFGSZ.mjs.map} +0 -0
- /package/dist/js/chunks/{chunk-UAEAQBRC.mjs.map → chunk-X7OCHZVF.mjs.map} +0 -0
- /package/dist/js/chunks/{chunk-QVVEWBOF.mjs.map → chunk-Z2NRKI7R.mjs.map} +0 -0
- /package/dist/js/chunks/{chunk-PIJ2TAR3.mjs.map → chunk-ZAS25YFD.mjs.map} +0 -0
- /package/dist/js/chunks/{chunk-WWPAPHMA.mjs.map → chunk-ZKZKNSLC.mjs.map} +0 -0
|
@@ -47,3 +47,33 @@
|
|
|
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 "map";
|
|
54
|
+
@forward "accordion";
|
|
55
|
+
@forward "data-table";
|
|
56
|
+
@forward "avatar";
|
|
57
|
+
@forward "skeleton";
|
|
58
|
+
@forward "empty-state";
|
|
59
|
+
@forward "countdown";
|
|
60
|
+
@forward "popover";
|
|
61
|
+
@forward "stepper";
|
|
62
|
+
@forward "timeline";
|
|
63
|
+
@forward "tree";
|
|
64
|
+
@forward "stat";
|
|
65
|
+
@forward "command-palette";
|
|
66
|
+
@forward "questionnaire";
|
|
67
|
+
@forward "line-chart";
|
|
68
|
+
@forward "column-chart";
|
|
69
|
+
@forward "bar-chart";
|
|
70
|
+
@forward "pie-chart";
|
|
71
|
+
@forward "heatmap-chart";
|
|
72
|
+
@forward "radar-chart";
|
|
73
|
+
@forward "radial-chart";
|
|
74
|
+
@forward "mixed-chart";
|
|
75
|
+
@forward "aura";
|
|
76
|
+
@forward "kpi";
|
|
77
|
+
@forward "marquee";
|
|
78
|
+
@forward "confetti";
|
|
79
|
+
@forward "particles";
|
|
@@ -0,0 +1,162 @@
|
|
|
1
|
+
@use "../abstracts" as *;
|
|
2
|
+
|
|
3
|
+
// KPI. One key figure in a card: an <article class="kpi"> holding a <dl>
|
|
4
|
+
// with a <dt> label, a <dd class="kpi-value"> and an optional
|
|
5
|
+
// <dd class="kpi-trend"> chip. The article is a card, so filled and
|
|
6
|
+
// outlined work as they do there.
|
|
7
|
+
//
|
|
8
|
+
// Optional parts, in source order after the <dl>:
|
|
9
|
+
// .kpi-icon a tonal icon box, written inside the <dt>
|
|
10
|
+
// .kpi-actions a button or menu, placed at the end of the label row
|
|
11
|
+
// a chart a sparkline .line-chart or .column-chart figure
|
|
12
|
+
// .progress a <progress> bar toward a goal
|
|
13
|
+
// <p> supporting text
|
|
14
|
+
// .kpi-footer details or links under a divider
|
|
15
|
+
//
|
|
16
|
+
// .kpi-trend takes .up or .down for the arrow and .negative when the change
|
|
17
|
+
// is bad news; .negative also turns a line, column, bar or mixed chart's
|
|
18
|
+
// first series to the error color. The arrow is decoration: say the
|
|
19
|
+
// direction in the text, as in "+12%".
|
|
20
|
+
//
|
|
21
|
+
// Tokens:
|
|
22
|
+
// --md-comp-kpi-icon-container-color primary-container
|
|
23
|
+
// --md-comp-kpi-icon-color on-primary-container
|
|
24
|
+
// --md-comp-kpi-trend-container-color secondary-container
|
|
25
|
+
// --md-comp-kpi-trend-color on-secondary-container
|
|
26
|
+
|
|
27
|
+
$_trend-charts: "line-chart", "column-chart", "bar-chart", "mixed-chart";
|
|
28
|
+
|
|
29
|
+
.kpi {
|
|
30
|
+
--md-comp-kpi-icon-container-color: var(--md-sys-color-primary-container);
|
|
31
|
+
--md-comp-kpi-icon-color: var(--md-sys-color-on-primary-container);
|
|
32
|
+
--md-comp-kpi-trend-container-color: var(--md-sys-color-secondary-container);
|
|
33
|
+
--md-comp-kpi-trend-color: var(--md-sys-color-on-secondary-container);
|
|
34
|
+
|
|
35
|
+
display: flex;
|
|
36
|
+
flex-direction: column;
|
|
37
|
+
gap: 12px;
|
|
38
|
+
padding: var(--md-comp-card-content-padding, 16px);
|
|
39
|
+
|
|
40
|
+
> * {
|
|
41
|
+
min-width: 0;
|
|
42
|
+
margin: 0;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
> dl {
|
|
46
|
+
display: flex;
|
|
47
|
+
flex-wrap: wrap;
|
|
48
|
+
align-items: center;
|
|
49
|
+
gap: 8px;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
&:has(> .kpi-actions) > dl {
|
|
53
|
+
padding-inline-end: 40px;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
// The card is the containing block, so the button sits in its corner
|
|
57
|
+
// without making the label row taller.
|
|
58
|
+
> .kpi-actions {
|
|
59
|
+
position: absolute;
|
|
60
|
+
inset-block-start: 8px;
|
|
61
|
+
inset-inline-end: 8px;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
dt {
|
|
65
|
+
display: flex;
|
|
66
|
+
flex-basis: 100%;
|
|
67
|
+
align-items: center;
|
|
68
|
+
gap: 12px;
|
|
69
|
+
color: var(--md-sys-color-on-surface-variant);
|
|
70
|
+
@include typescale("title-small");
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
dd {
|
|
74
|
+
margin: 0;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
.kpi-icon {
|
|
78
|
+
display: grid;
|
|
79
|
+
flex: none;
|
|
80
|
+
place-items: center;
|
|
81
|
+
width: 40px;
|
|
82
|
+
height: 40px;
|
|
83
|
+
border-radius: 12px;
|
|
84
|
+
background-color: var(--md-comp-kpi-icon-container-color);
|
|
85
|
+
color: var(--md-comp-kpi-icon-color);
|
|
86
|
+
font-size: 24px;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
.kpi-value {
|
|
90
|
+
min-width: 0;
|
|
91
|
+
overflow-wrap: anywhere;
|
|
92
|
+
color: var(--md-sys-color-on-surface);
|
|
93
|
+
font-variant-numeric: tabular-nums;
|
|
94
|
+
@include typescale("headline-large");
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
.kpi-trend {
|
|
98
|
+
display: inline-flex;
|
|
99
|
+
align-items: center;
|
|
100
|
+
gap: 2px;
|
|
101
|
+
padding: 2px 8px;
|
|
102
|
+
border-radius: 8px;
|
|
103
|
+
background-color: var(--md-comp-kpi-trend-container-color);
|
|
104
|
+
color: var(--md-comp-kpi-trend-color);
|
|
105
|
+
font-variant-numeric: tabular-nums;
|
|
106
|
+
@include typescale("label-large");
|
|
107
|
+
|
|
108
|
+
&:is(.up, .down) {
|
|
109
|
+
padding-inline-start: 4px;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
&:is(.up, .down)::before {
|
|
113
|
+
content: "";
|
|
114
|
+
flex: none;
|
|
115
|
+
width: 18px;
|
|
116
|
+
height: 18px;
|
|
117
|
+
background-color: currentColor;
|
|
118
|
+
mask: $trend-arrow center / 18px no-repeat;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
&.down::before {
|
|
122
|
+
transform: rotate(180deg);
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
&.negative {
|
|
126
|
+
--md-comp-kpi-trend-container-color: var(--md-sys-color-error-container);
|
|
127
|
+
--md-comp-kpi-trend-color: var(--md-sys-color-on-error-container);
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
> p {
|
|
132
|
+
padding: 0;
|
|
133
|
+
color: var(--md-sys-color-on-surface-variant);
|
|
134
|
+
@include typescale("body-medium");
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
> .kpi-footer {
|
|
138
|
+
// Auto top margin keeps the footer at the bottom of a stretched card.
|
|
139
|
+
margin: auto calc(-1 * var(--md-comp-card-content-padding, 16px)) calc(-1 * var(--md-comp-card-content-padding, 16px));
|
|
140
|
+
padding: 12px var(--md-comp-card-content-padding, 16px);
|
|
141
|
+
border-top: 1px solid var(--md-sys-color-outline-variant);
|
|
142
|
+
color: var(--md-sys-color-on-surface-variant);
|
|
143
|
+
@include typescale("body-medium");
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
@each $chart in $_trend-charts {
|
|
148
|
+
.kpi:has(.kpi-trend.negative) > .#{$chart} {
|
|
149
|
+
--md-comp-#{$chart}-color-1: var(--md-sys-color-error);
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
@media (forced-colors: active) {
|
|
154
|
+
.kpi-trend {
|
|
155
|
+
outline: 1px solid CanvasText;
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
.kpi-trend::before {
|
|
159
|
+
forced-color-adjust: none;
|
|
160
|
+
background-color: CanvasText;
|
|
161
|
+
}
|
|
162
|
+
}
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
@use "../abstracts" as *;
|
|
2
|
+
|
|
3
|
+
// Line chart. A <figure class="line-chart"> holds a <figcaption> and a
|
|
4
|
+
// <table> of data: the first column labels the x axis, each further column
|
|
5
|
+
// is a series named by its header cell. Without JavaScript the table shows.
|
|
6
|
+
// LineChart draws an SVG from the table and hides the table visually, so a
|
|
7
|
+
// screen reader still reads the data as a table. The plot, tooltip, labels
|
|
8
|
+
// and legend are shared with the column chart through chart().
|
|
9
|
+
//
|
|
10
|
+
// The SVG stretches to the plot (preserveAspectRatio="none") and strokes
|
|
11
|
+
// stay a constant width, so resizing needs no script. Points, the cursor
|
|
12
|
+
// and the tooltip are HTML positioned in percentages for the same reason.
|
|
13
|
+
//
|
|
14
|
+
// Modifiers: .area fills under each line, .stacked stacks each series on
|
|
15
|
+
// the ones before it and fills between them, .fade fades the line ends,
|
|
16
|
+
// .sparkline is a small chart with no axis, grid, legend or tooltip.
|
|
17
|
+
// A series header cell's classes reach its line: <th class="dashed">.
|
|
18
|
+
//
|
|
19
|
+
// Tokens:
|
|
20
|
+
// --md-comp-line-chart-height 240px (sparkline 48px)
|
|
21
|
+
// --md-comp-line-chart-line-width 3px (sparkline 2px)
|
|
22
|
+
// --md-comp-line-chart-grid-color outline-variant
|
|
23
|
+
// --md-comp-line-chart-color-1..4 primary, tertiary, secondary,
|
|
24
|
+
// on-surface-variant
|
|
25
|
+
|
|
26
|
+
@include chart("line-chart");
|
|
27
|
+
|
|
28
|
+
.line-chart {
|
|
29
|
+
--md-comp-line-chart-line-width: 3px;
|
|
30
|
+
|
|
31
|
+
&.sparkline {
|
|
32
|
+
--md-comp-line-chart-line-width: 2px;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.line-chart-plot > svg {
|
|
37
|
+
position: absolute;
|
|
38
|
+
inset: 0;
|
|
39
|
+
width: 100%;
|
|
40
|
+
height: 100%;
|
|
41
|
+
overflow: visible;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
.line-chart-line {
|
|
45
|
+
fill: none;
|
|
46
|
+
stroke: var(--line-chart-color);
|
|
47
|
+
stroke-width: var(--md-comp-line-chart-line-width);
|
|
48
|
+
stroke-linecap: round;
|
|
49
|
+
stroke-linejoin: round;
|
|
50
|
+
vector-effect: non-scaling-stroke;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
.line-chart-series.dashed .line-chart-line {
|
|
54
|
+
stroke-dasharray: 2 8;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
.line-chart-area {
|
|
58
|
+
display: none;
|
|
59
|
+
|
|
60
|
+
.line-chart:is(.area, .stacked) & {
|
|
61
|
+
display: inline;
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
.line-chart-series stop {
|
|
66
|
+
stop-color: var(--line-chart-color);
|
|
67
|
+
stop-opacity: 0;
|
|
68
|
+
|
|
69
|
+
&:first-child {
|
|
70
|
+
stop-opacity: 0.24;
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
.line-chart.fade .line-chart-plot > svg {
|
|
75
|
+
mask-image: linear-gradient(to right, transparent, #000 15% 85%, transparent);
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
.line-chart-cursor {
|
|
79
|
+
width: 1px;
|
|
80
|
+
background-color: var(--md-sys-color-outline);
|
|
81
|
+
|
|
82
|
+
> span {
|
|
83
|
+
position: absolute;
|
|
84
|
+
left: 0;
|
|
85
|
+
width: 10px;
|
|
86
|
+
height: 10px;
|
|
87
|
+
border: 2px solid var(--md-sys-color-surface);
|
|
88
|
+
border-radius: 50%;
|
|
89
|
+
background-color: var(--line-chart-color);
|
|
90
|
+
translate: -50% -50%;
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
@media (forced-colors: active) {
|
|
95
|
+
.line-chart-cursor {
|
|
96
|
+
background-color: CanvasText;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
.line-chart-cursor > span {
|
|
100
|
+
forced-color-adjust: none;
|
|
101
|
+
}
|
|
102
|
+
}
|
|
@@ -0,0 +1,188 @@
|
|
|
1
|
+
@use "sass:map";
|
|
2
|
+
@use "../abstracts" as *;
|
|
3
|
+
|
|
4
|
+
// Map. A MapLibre map in a .map frame. The page loads maplibre-gl.css; these
|
|
5
|
+
// rules restyle what MapLibre draws and add the ExpressiveCSS parts:
|
|
6
|
+
//
|
|
7
|
+
// .map-marker a point at data-lng-lat. With no content of its own it is
|
|
8
|
+
// a primary dot; anything else inside replaces the dot.
|
|
9
|
+
// A .map-marker-label shows below it (.top: above), and a
|
|
10
|
+
// child .tooltip works as on any button.
|
|
11
|
+
// .map-popup moved into a MapLibre popup, drawn as a surface card.
|
|
12
|
+
// .map-controls a corner stack of .icon-button controls, top right
|
|
13
|
+
// unless .top-left, .bottom-left or .bottom-right. A
|
|
14
|
+
// .map-control-group joins buttons on one surface.
|
|
15
|
+
//
|
|
16
|
+
// Until the script starts the map, markers, popups and controls are hidden.
|
|
17
|
+
// MapLibre moves markers and popups out of the frame, so the hiding rules
|
|
18
|
+
// stop matching them once the map runs.
|
|
19
|
+
//
|
|
20
|
+
// Tokens:
|
|
21
|
+
// --md-comp-map-height 400px
|
|
22
|
+
// --md-comp-map-shape 16px
|
|
23
|
+
// --md-comp-map-marker-color primary
|
|
24
|
+
// --md-comp-map-marker-ring-color surface
|
|
25
|
+
// --md-comp-map-route-color primary
|
|
26
|
+
// --md-comp-map-arc-color tertiary
|
|
27
|
+
// --md-comp-map-cluster-color primary
|
|
28
|
+
// --md-comp-map-cluster-label-color on-primary
|
|
29
|
+
// --md-comp-map-popup-max-width 280px
|
|
30
|
+
// --md-comp-map-control-offset 12px
|
|
31
|
+
//
|
|
32
|
+
// The script sets --md-comp-map-bearing, so a [data-action="compass"] icon
|
|
33
|
+
// points north.
|
|
34
|
+
|
|
35
|
+
.map {
|
|
36
|
+
--md-comp-map-height: 400px;
|
|
37
|
+
--md-comp-map-shape: 16px;
|
|
38
|
+
--md-comp-map-marker-color: var(--md-sys-color-primary);
|
|
39
|
+
--md-comp-map-marker-ring-color: var(--md-sys-color-surface);
|
|
40
|
+
--md-comp-map-route-color: var(--md-sys-color-primary);
|
|
41
|
+
--md-comp-map-arc-color: var(--md-sys-color-tertiary);
|
|
42
|
+
--md-comp-map-cluster-color: var(--md-sys-color-primary);
|
|
43
|
+
--md-comp-map-cluster-label-color: var(--md-sys-color-on-primary);
|
|
44
|
+
--md-comp-map-popup-max-width: 280px;
|
|
45
|
+
--md-comp-map-control-offset: 12px;
|
|
46
|
+
|
|
47
|
+
position: relative;
|
|
48
|
+
overflow: hidden;
|
|
49
|
+
block-size: var(--md-comp-map-height);
|
|
50
|
+
border-radius: var(--md-comp-map-shape);
|
|
51
|
+
background-color: var(--md-sys-color-surface-container);
|
|
52
|
+
|
|
53
|
+
&:fullscreen {
|
|
54
|
+
border-radius: 0;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
> :is(.map-marker, .map-popup),
|
|
58
|
+
&:not(.maplibregl-map) > .map-controls {
|
|
59
|
+
display: none;
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
// Absolute, as MapLibre places it; a child .tooltip would otherwise make
|
|
64
|
+
// the marker relative.
|
|
65
|
+
.map .map-marker {
|
|
66
|
+
position: absolute;
|
|
67
|
+
display: grid;
|
|
68
|
+
place-items: center;
|
|
69
|
+
padding: 0;
|
|
70
|
+
border: none;
|
|
71
|
+
background: none;
|
|
72
|
+
color: inherit;
|
|
73
|
+
cursor: pointer;
|
|
74
|
+
@include focus-visible;
|
|
75
|
+
|
|
76
|
+
&:not(:has(> :not(.tooltip, .map-marker-label))) {
|
|
77
|
+
inline-size: 16px;
|
|
78
|
+
block-size: 16px;
|
|
79
|
+
border: 2px solid var(--md-comp-map-marker-ring-color);
|
|
80
|
+
border-radius: 50%;
|
|
81
|
+
background-color: var(--md-comp-map-marker-color);
|
|
82
|
+
@include z-depth(1);
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
&.location {
|
|
86
|
+
--md-comp-map-marker-color: var(--md-sys-color-tertiary);
|
|
87
|
+
|
|
88
|
+
box-shadow: 0 0 0 8px color-mix(in srgb, var(--md-comp-map-marker-color) 24%, transparent);
|
|
89
|
+
cursor: default;
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
.map-marker-label {
|
|
94
|
+
position: absolute;
|
|
95
|
+
inset-block-start: calc(100% + 4px);
|
|
96
|
+
padding: 2px 8px;
|
|
97
|
+
border-radius: 8px;
|
|
98
|
+
background-color: var(--md-sys-color-surface-container-highest);
|
|
99
|
+
color: var(--md-sys-color-on-surface);
|
|
100
|
+
@include typescale("label-medium");
|
|
101
|
+
white-space: nowrap;
|
|
102
|
+
pointer-events: none;
|
|
103
|
+
|
|
104
|
+
&.top {
|
|
105
|
+
inset-block: auto calc(100% + 4px);
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
// MapLibre's popup, as an M3 surface card. The tip is dropped; the offset
|
|
110
|
+
// keeps the card clear of its marker.
|
|
111
|
+
//
|
|
112
|
+
// maplibre-gl.css is unlayered, so it beats this layer wherever both set a
|
|
113
|
+
// property. Those declarations are !important; an important declaration in
|
|
114
|
+
// a layer outranks a normal unlayered one.
|
|
115
|
+
.map {
|
|
116
|
+
.maplibregl-popup-content {
|
|
117
|
+
max-inline-size: var(--md-comp-map-popup-max-width);
|
|
118
|
+
padding: 12px 16px !important;
|
|
119
|
+
border-radius: 12px !important;
|
|
120
|
+
background: var(--md-sys-color-surface-container-low) !important;
|
|
121
|
+
color: var(--md-sys-color-on-surface);
|
|
122
|
+
@include typescale("body-medium");
|
|
123
|
+
box-shadow: map.get($elevations, "2") !important;
|
|
124
|
+
|
|
125
|
+
&:has(> .maplibregl-popup-close-button) {
|
|
126
|
+
padding-inline-end: 44px;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
:is(h1, h2, h3, h4, h5, h6) {
|
|
130
|
+
margin: 0 0 4px;
|
|
131
|
+
@include typescale("title-small");
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
p {
|
|
135
|
+
margin: 0;
|
|
136
|
+
font: inherit;
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
.maplibregl-popup-tip {
|
|
141
|
+
display: none;
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
.maplibregl-popup-close-button {
|
|
145
|
+
inset: 4px 4px auto auto !important;
|
|
146
|
+
inline-size: 32px;
|
|
147
|
+
block-size: 32px;
|
|
148
|
+
border-radius: 50% !important;
|
|
149
|
+
color: var(--md-sys-color-on-surface-variant);
|
|
150
|
+
font-size: 20px;
|
|
151
|
+
line-height: 1;
|
|
152
|
+
|
|
153
|
+
&:hover {
|
|
154
|
+
background-color: color-mix(in srgb, currentColor 8%, transparent) !important;
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
@include focus-visible;
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
.map-controls {
|
|
162
|
+
position: absolute;
|
|
163
|
+
inset: var(--md-comp-map-control-offset) var(--md-comp-map-control-offset) auto auto;
|
|
164
|
+
z-index: 2;
|
|
165
|
+
display: flex;
|
|
166
|
+
flex-direction: column;
|
|
167
|
+
gap: 8px;
|
|
168
|
+
|
|
169
|
+
&.top-left { inset: var(--md-comp-map-control-offset) auto auto var(--md-comp-map-control-offset); }
|
|
170
|
+
&.bottom-left { inset: auto auto var(--md-comp-map-control-offset) var(--md-comp-map-control-offset); }
|
|
171
|
+
&.bottom-right { inset: auto var(--md-comp-map-control-offset) var(--md-comp-map-control-offset) auto; }
|
|
172
|
+
|
|
173
|
+
> .icon-button,
|
|
174
|
+
> .map-control-group {
|
|
175
|
+
border-radius: 9999px;
|
|
176
|
+
background-color: var(--md-sys-color-surface-container-low);
|
|
177
|
+
@include z-depth(2);
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
[data-action="compass"] > .material-symbols {
|
|
181
|
+
rotate: var(--md-comp-map-bearing, 0deg);
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
.map-control-group {
|
|
186
|
+
display: flex;
|
|
187
|
+
flex-direction: column;
|
|
188
|
+
}
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
@use "../abstracts" as *;
|
|
2
|
+
|
|
3
|
+
// Marquee. A strip of logos, images or text that scrolls without end:
|
|
4
|
+
// <div class="marquee"> holding two identical <ul class="marquee-content">
|
|
5
|
+
// groups. The second is a copy that fills the gap as the first scrolls
|
|
6
|
+
// out. Mark it aria-hidden="true" and give each link or button in it
|
|
7
|
+
// tabindex="-1", so screen readers and the Tab key meet each item once and
|
|
8
|
+
// a click on the copy still works. Each group is at least as wide as the
|
|
9
|
+
// strip and spreads short content out, so one copy is always enough.
|
|
10
|
+
//
|
|
11
|
+
// Both groups move one group's length plus the gap per cycle, then jump
|
|
12
|
+
// back to where they started, which looks the same.
|
|
13
|
+
//
|
|
14
|
+
// Modifiers:
|
|
15
|
+
// .vertical scroll up; the strip is 320px tall unless the page sets a height
|
|
16
|
+
// .reverse scroll toward the inline end, or down
|
|
17
|
+
// .fade fade the items out at both edges
|
|
18
|
+
// .paused stop; toggle it from a pause button
|
|
19
|
+
//
|
|
20
|
+
// Hover or focus inside the strip also pauses it, so a link holds still
|
|
21
|
+
// while it is read or tabbed to. Horizontal strips scroll toward the inline
|
|
22
|
+
// start, so right to left pages scroll right. Reduced motion stops the
|
|
23
|
+
// scroll, drops the copy and lets the strip scroll by hand.
|
|
24
|
+
//
|
|
25
|
+
// Tokens:
|
|
26
|
+
// --md-comp-marquee-duration one cycle 20s
|
|
27
|
+
// --md-comp-marquee-gap space between items and groups 32px
|
|
28
|
+
// --md-comp-marquee-fade-size length of each edge fade (.fade) 48px
|
|
29
|
+
|
|
30
|
+
.marquee {
|
|
31
|
+
--md-comp-marquee-duration: 20s;
|
|
32
|
+
--md-comp-marquee-gap: 32px;
|
|
33
|
+
--md-comp-marquee-fade-size: 48px;
|
|
34
|
+
--_sign: 1;
|
|
35
|
+
|
|
36
|
+
display: flex;
|
|
37
|
+
gap: var(--md-comp-marquee-gap);
|
|
38
|
+
overflow: hidden;
|
|
39
|
+
|
|
40
|
+
&:dir(rtl) {
|
|
41
|
+
--_sign: -1;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
&.vertical {
|
|
45
|
+
flex-direction: column;
|
|
46
|
+
height: 320px;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
&.fade {
|
|
50
|
+
--_fade: transparent, #000 var(--md-comp-marquee-fade-size), #000 calc(100% - var(--md-comp-marquee-fade-size)), transparent;
|
|
51
|
+
mask-image: linear-gradient(to right, var(--_fade));
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
&.vertical.fade {
|
|
55
|
+
mask-image: linear-gradient(to bottom, var(--_fade));
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
.marquee-content {
|
|
60
|
+
display: flex;
|
|
61
|
+
flex: none;
|
|
62
|
+
align-items: center;
|
|
63
|
+
justify-content: space-around;
|
|
64
|
+
gap: var(--md-comp-marquee-gap);
|
|
65
|
+
min-width: 100%;
|
|
66
|
+
margin: 0;
|
|
67
|
+
padding: 0;
|
|
68
|
+
list-style: none;
|
|
69
|
+
animation: marquee-x var(--md-comp-marquee-duration) linear infinite;
|
|
70
|
+
|
|
71
|
+
> * {
|
|
72
|
+
flex: none;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
.vertical > & {
|
|
76
|
+
flex-direction: column;
|
|
77
|
+
min-width: 0;
|
|
78
|
+
min-height: 100%;
|
|
79
|
+
animation-name: marquee-y;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
.reverse > & {
|
|
83
|
+
animation-direction: reverse;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
.marquee:is(:hover, :focus-within, .paused) > & {
|
|
87
|
+
animation-play-state: paused;
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
@media (prefers-reduced-motion: reduce) {
|
|
92
|
+
.marquee {
|
|
93
|
+
overflow: auto;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
.marquee-content {
|
|
97
|
+
animation: none;
|
|
98
|
+
|
|
99
|
+
&[aria-hidden="true"] {
|
|
100
|
+
display: none;
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
@keyframes marquee-x {
|
|
106
|
+
to { translate: calc((100% + var(--md-comp-marquee-gap)) * var(--_sign) * -1) 0; }
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
@keyframes marquee-y {
|
|
110
|
+
to { translate: 0 calc(-100% - var(--md-comp-marquee-gap)); }
|
|
111
|
+
}
|
|
@@ -78,6 +78,7 @@ $_menu-chevron: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg
|
|
|
78
78
|
color: var(--md-comp-menu-item-label-text-color);
|
|
79
79
|
@include z-depth("2");
|
|
80
80
|
transition: border-radius 200ms ease;
|
|
81
|
+
@include glass(var(--md-comp-menu-container-color));
|
|
81
82
|
|
|
82
83
|
// The [vibrant] arms are not a second mapping - they are the statement that
|
|
83
84
|
// a menu on a vibrant surface IS a vibrant menu. Without them the foundation
|
|
@@ -360,6 +361,10 @@ $_menu-chevron: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg
|
|
|
360
361
|
filter: drop-shadow(0 3px 3px rgba(0, 0, 0, 0.14))
|
|
361
362
|
drop-shadow(0 1px 4px rgba(0, 0, 0, 0.12));
|
|
362
363
|
|
|
364
|
+
// The drop-shadow filter is the items' backdrop root, so they could only
|
|
365
|
+
// blur the menu itself. Grouped menus stay solid.
|
|
366
|
+
backdrop-filter: none;
|
|
367
|
+
|
|
363
368
|
> li:not(.divider, .optgroup, .gap, .label) {
|
|
364
369
|
padding-inline: var(--md-comp-menu-group-padding);
|
|
365
370
|
background-color: var(--md-comp-menu-container-color);
|
|
@@ -605,6 +610,11 @@ menu[id].grouped
|
|
|
605
610
|
.menu-trigger {
|
|
606
611
|
cursor: pointer;
|
|
607
612
|
|
|
613
|
+
// A context menu's trigger is a region of content, not a control.
|
|
614
|
+
&[data-context-menu] {
|
|
615
|
+
cursor: auto;
|
|
616
|
+
}
|
|
617
|
+
|
|
608
618
|
// The trigger stays in its pressed state for as long as its menu is open.
|
|
609
619
|
&[aria-expanded="true"] {
|
|
610
620
|
background-image: linear-gradient(
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
@use "../abstracts" as *;
|
|
2
|
+
|
|
3
|
+
// Message scroller. A chat frame around one scrolling viewport of messages
|
|
4
|
+
// and a scroll-to-latest button. The frame fills its parent, so the parent
|
|
5
|
+
// sets the height. The script owns scroll position; this partial only lays
|
|
6
|
+
// out the parts.
|
|
7
|
+
//
|
|
8
|
+
// The script turns off native scroll anchoring on the viewport and keeps the
|
|
9
|
+
// reader's place itself, so all engines behave the same. It writes
|
|
10
|
+
// --md-comp-message-scroller-spacer (blank space after the last message) so a
|
|
11
|
+
// newly anchored turn can reach the top of the viewport.
|
|
12
|
+
//
|
|
13
|
+
// Tokens:
|
|
14
|
+
// --md-comp-message-scroller-padding 16px (viewport inset)
|
|
15
|
+
// --md-comp-message-scroller-gap 16px (between messages)
|
|
16
|
+
|
|
17
|
+
.message-scroller {
|
|
18
|
+
--md-comp-message-scroller-padding: 16px;
|
|
19
|
+
--md-comp-message-scroller-gap: 16px;
|
|
20
|
+
|
|
21
|
+
position: relative;
|
|
22
|
+
display: flex;
|
|
23
|
+
flex-direction: column;
|
|
24
|
+
min-height: 0;
|
|
25
|
+
height: 100%;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.message-scroller-viewport {
|
|
29
|
+
box-sizing: border-box;
|
|
30
|
+
flex: 1;
|
|
31
|
+
min-height: 0;
|
|
32
|
+
overflow-y: auto;
|
|
33
|
+
overflow-anchor: none;
|
|
34
|
+
overscroll-behavior: contain;
|
|
35
|
+
padding: var(--md-comp-message-scroller-padding);
|
|
36
|
+
padding-block-end: calc(var(--md-comp-message-scroller-padding) + var(--md-comp-message-scroller-spacer, 0px));
|
|
37
|
+
|
|
38
|
+
@include focus-visible;
|
|
39
|
+
|
|
40
|
+
> * + * {
|
|
41
|
+
margin-block-start: var(--md-comp-message-scroller-gap);
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
// Centered over the bottom of the viewport. Inert while there is nothing
|
|
46
|
+
// below; it fades out instead of leaving a hidden tab stop.
|
|
47
|
+
.message-scroller-button {
|
|
48
|
+
position: absolute;
|
|
49
|
+
inset-block-end: 16px;
|
|
50
|
+
inset-inline: 0;
|
|
51
|
+
width: fit-content;
|
|
52
|
+
margin-inline: auto;
|
|
53
|
+
@include z-depth("2");
|
|
54
|
+
transition: opacity .15s ease-out, scale .15s ease-out;
|
|
55
|
+
|
|
56
|
+
&[inert] {
|
|
57
|
+
opacity: 0;
|
|
58
|
+
scale: .8;
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
@media (prefers-reduced-motion: reduce) {
|
|
63
|
+
.message-scroller-button {
|
|
64
|
+
transition: none;
|
|
65
|
+
}
|
|
66
|
+
}
|