@expressivecss/expressive 0.11.0 → 0.13.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +392 -7
- package/README.md +37 -1
- package/dist/css/expressive.css +5440 -234
- 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-AYYYWUJ4.mjs → chunk-3CLXLPYS.mjs} +17 -11
- package/dist/js/chunks/chunk-3CLXLPYS.mjs.map +7 -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-IMUPRRI6.mjs → chunk-3VOK6J7U.mjs} +3 -3
- package/dist/js/chunks/chunk-4PWAPV6F.mjs +7 -0
- package/dist/js/chunks/chunk-4PWAPV6F.mjs.map +7 -0
- package/dist/js/chunks/{chunk-XFJ452AZ.mjs → chunk-55IA2XUC.mjs} +5 -6
- package/dist/js/chunks/{chunk-XFJ452AZ.mjs.map → chunk-55IA2XUC.mjs.map} +2 -2
- package/dist/js/chunks/{chunk-XDB3G6RL.mjs → chunk-6N2XAEFK.mjs} +15 -4
- package/dist/js/chunks/{chunk-XDB3G6RL.mjs.map → chunk-6N2XAEFK.mjs.map} +2 -2
- package/dist/js/chunks/{chunk-MISGHDUU.mjs → chunk-6OMRGML6.mjs} +9 -7
- package/dist/js/chunks/{chunk-MISGHDUU.mjs.map → chunk-6OMRGML6.mjs.map} +2 -2
- package/dist/js/chunks/{chunk-A3BJA7V4.mjs → chunk-6WLSDZ4O.mjs} +2 -2
- package/dist/js/chunks/chunk-CCWDV5CR.mjs +292 -0
- package/dist/js/chunks/chunk-CCWDV5CR.mjs.map +7 -0
- package/dist/js/chunks/{chunk-JODJAGFS.mjs → chunk-CKQP6P76.mjs} +31 -8
- package/dist/js/chunks/chunk-CKQP6P76.mjs.map +7 -0
- package/dist/js/chunks/{chunk-KR44BSYQ.mjs → chunk-DLWYKFEI.mjs} +3 -3
- package/dist/js/chunks/chunk-DTKR54I6.mjs +270 -0
- package/dist/js/chunks/chunk-DTKR54I6.mjs.map +7 -0
- package/dist/js/chunks/{chunk-SLFNPY5M.mjs → chunk-EC63CHXU.mjs} +2 -2
- package/dist/js/chunks/chunk-GVGT6MIU.mjs +47 -0
- package/dist/js/chunks/chunk-GVGT6MIU.mjs.map +7 -0
- package/dist/js/chunks/{chunk-LZVBJ33S.mjs → chunk-GZWPXXY6.mjs} +15 -8
- package/dist/js/chunks/chunk-GZWPXXY6.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-D4UZ4HFN.mjs → chunk-IFXVDDDH.mjs} +23 -11
- package/dist/js/chunks/chunk-IFXVDDDH.mjs.map +7 -0
- package/dist/js/chunks/chunk-K4CJCRGE.mjs +262 -0
- package/dist/js/chunks/chunk-K4CJCRGE.mjs.map +7 -0
- package/dist/js/chunks/chunk-LNCCYGPC.mjs +163 -0
- package/dist/js/chunks/chunk-LNCCYGPC.mjs.map +7 -0
- package/dist/js/chunks/{chunk-QSQ24FYT.mjs → chunk-LTWPGFBR.mjs} +2 -2
- package/dist/js/chunks/{chunk-QSQ24FYT.mjs.map → chunk-LTWPGFBR.mjs.map} +2 -2
- package/dist/js/chunks/{chunk-I5KR22BY.mjs → chunk-LWBQIX5J.mjs} +15 -15
- package/dist/js/chunks/chunk-LWBQIX5J.mjs.map +7 -0
- package/dist/js/chunks/{chunk-GY2Z5CJ2.mjs → chunk-NNYP33NB.mjs} +67 -32
- package/dist/js/chunks/chunk-NNYP33NB.mjs.map +7 -0
- package/dist/js/chunks/chunk-NQLC3YMW.mjs +1 -0
- package/dist/js/chunks/chunk-O5XPWXIQ.mjs +406 -0
- package/dist/js/chunks/chunk-O5XPWXIQ.mjs.map +7 -0
- package/dist/js/chunks/chunk-P3G3QHII.mjs +166 -0
- package/dist/js/chunks/chunk-P3G3QHII.mjs.map +7 -0
- package/dist/js/chunks/{chunk-VAS6JQ6P.mjs → chunk-PIJ2TAR3.mjs} +3 -3
- package/dist/js/chunks/{chunk-74N6U5JJ.mjs → chunk-PLYXLSH3.mjs} +38 -37
- package/dist/js/chunks/chunk-PLYXLSH3.mjs.map +7 -0
- package/dist/js/chunks/{chunk-PIIAEYAJ.mjs → chunk-QDAL4IYN.mjs} +2 -2
- package/dist/js/chunks/chunk-QKWPQK5N.mjs +179 -0
- package/dist/js/chunks/chunk-QKWPQK5N.mjs.map +7 -0
- package/dist/js/chunks/{chunk-FRB7TOCS.mjs → chunk-QV2JAWIZ.mjs} +2 -2
- package/dist/js/chunks/{chunk-N3UHGN3N.mjs → chunk-QVVEWBOF.mjs} +3 -3
- package/dist/js/chunks/chunk-RHRQKTTX.mjs +139 -0
- package/dist/js/chunks/chunk-RHRQKTTX.mjs.map +7 -0
- package/dist/js/chunks/chunk-SPETGK25.mjs +59 -0
- package/dist/js/chunks/chunk-SPETGK25.mjs.map +7 -0
- package/dist/js/chunks/{chunk-TK6PX2GC.mjs → chunk-U2OTHOTI.mjs} +131 -19
- package/dist/js/chunks/chunk-U2OTHOTI.mjs.map +7 -0
- package/dist/js/chunks/{chunk-TYM6U5DY.mjs → chunk-UAEAQBRC.mjs} +2 -2
- package/dist/js/chunks/{chunk-7UXHSYIA.mjs → chunk-UBLRRJ7N.mjs} +3 -3
- package/dist/js/chunks/{chunk-EP3CVKB5.mjs → chunk-UEZUJQ66.mjs} +8 -5
- package/dist/js/chunks/chunk-UEZUJQ66.mjs.map +7 -0
- package/dist/js/chunks/{chunk-JNPIWFJT.mjs → chunk-UNEMYWEW.mjs} +3 -3
- package/dist/js/chunks/chunk-VTLBW7QS.mjs +124 -0
- package/dist/js/chunks/chunk-VTLBW7QS.mjs.map +7 -0
- package/dist/js/chunks/{chunk-JKNPQQWY.mjs → chunk-WJXDBPXQ.mjs} +28 -12
- package/dist/js/chunks/chunk-WJXDBPXQ.mjs.map +7 -0
- package/dist/js/chunks/{chunk-CDW6WIRT.mjs → chunk-XGHORT7J.mjs} +18 -11
- package/dist/js/chunks/chunk-XGHORT7J.mjs.map +7 -0
- package/dist/js/chunks/{chunk-7GKXUG4B.mjs → chunk-XH6BEEMY.mjs} +78 -25
- package/dist/js/chunks/chunk-XH6BEEMY.mjs.map +7 -0
- package/dist/js/chunks/{chunk-XO5WX3TK.mjs → chunk-YDCS5S3J.mjs} +2 -2
- package/dist/js/expressive.cjs +2540 -233
- package/dist/js/expressive.cjs.map +4 -4
- package/dist/js/expressive.js +2540 -233
- package/dist/js/expressive.js.map +4 -4
- package/dist/js/expressive.min.js +10 -10
- package/dist/js/expressive.min.js.map +4 -4
- package/dist/js/expressive.mjs +86 -38
- 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/appBar.mjs +2 -2
- package/dist/js/internal/components/autocomplete.mjs +4 -4
- package/dist/js/internal/components/barChart.mjs +10 -0
- package/dist/js/internal/components/barChart.mjs.map +7 -0
- package/dist/js/internal/components/buttonGroup.mjs +2 -2
- package/dist/js/internal/components/buttons.mjs +3 -3
- package/dist/js/internal/components/cards.mjs +3 -3
- package/dist/js/internal/components/carousel.mjs +3 -3
- package/dist/js/internal/components/characterCounter.mjs +2 -2
- package/dist/js/internal/components/chips.mjs +5 -5
- package/dist/js/internal/components/columnChart.mjs +9 -0
- package/dist/js/internal/components/columnChart.mjs.map +7 -0
- package/dist/js/internal/components/commandPalette.mjs +9 -0
- package/dist/js/internal/components/commandPalette.mjs.map +7 -0
- package/dist/js/internal/components/datepicker.mjs +6 -6
- package/dist/js/internal/components/expandingCard.mjs +3 -3
- package/dist/js/internal/components/heatmapChart.mjs +9 -0
- package/dist/js/internal/components/heatmapChart.mjs.map +7 -0
- package/dist/js/internal/components/index.mjs +79 -31
- package/dist/js/internal/components/lightbox.mjs +3 -3
- package/dist/js/internal/components/lineChart.mjs +12 -0
- package/dist/js/internal/components/lineChart.mjs.map +7 -0
- package/dist/js/internal/components/menu.mjs +3 -3
- 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/navigationRail.mjs +2 -2
- 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 +37 -25
- 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 +2 -2
- package/dist/js/internal/components/select.mjs +4 -4
- package/dist/js/internal/components/slider.mjs +3 -3
- package/dist/js/internal/components/snackbar.mjs +2 -2
- package/dist/js/internal/components/tabs.mjs +4 -4
- package/dist/js/internal/components/timepicker.mjs +4 -4
- package/dist/js/internal/components/tooltip.mjs +3 -3
- package/dist/js/internal/core/component.mjs +1 -1
- package/dist/js/internal/core/utils.mjs +1 -1
- package/dist/js/internal/plugins/dockedDisplayPlugin.mjs +2 -2
- package/dist/js/modular.mjs +86 -38
- package/dist/types/behaviors/forms.d.ts +22 -0
- package/dist/types/components/appBar.d.ts +1 -1
- package/dist/types/components/barChart.d.ts +24 -0
- package/dist/types/components/columnChart.d.ts +21 -0
- package/dist/types/components/commandPalette.d.ts +96 -0
- package/dist/types/components/datepicker.d.ts +5 -2
- package/dist/types/components/heatmapChart.d.ts +49 -0
- package/dist/types/components/index.d.ts +12 -0
- package/dist/types/components/lineChart.d.ts +134 -0
- package/dist/types/components/menu.d.ts +32 -0
- package/dist/types/components/messageScroller.d.ts +111 -0
- package/dist/types/components/mixedChart.d.ts +25 -0
- package/dist/types/components/pieChart.d.ts +40 -0
- package/dist/types/components/questionnaire.d.ts +96 -0
- package/dist/types/components/radarChart.d.ts +39 -0
- package/dist/types/components/radialChart.d.ts +45 -0
- package/dist/types/components/registry.d.ts +44 -0
- package/dist/types/components/richTextEditor.d.ts +71 -0
- package/dist/types/components/slider.d.ts +1 -0
- package/dist/types/components/snackbar.d.ts +6 -0
- package/dist/types/components/timepicker.d.ts +4 -1
- package/dist/types/components/tooltip.d.ts +2 -1
- package/dist/types/modular.d.ts +10 -1
- package/package.json +4 -1
- package/src/sass/README.md +3 -6
- package/src/sass/abstracts/_index.scss +1 -1
- package/src/sass/abstracts/_mixins.scss +226 -0
- package/src/sass/abstracts/_variables.scss +14 -0
- package/src/sass/base/_typography.scss +45 -0
- package/src/sass/components/_accordion.scss +161 -0
- package/src/sass/components/_aura.scss +119 -0
- package/src/sass/components/_avatar.scss +86 -0
- package/src/sass/components/_bar-chart.scss +285 -0
- package/src/sass/components/_bottom-sheet.scss +1 -0
- package/src/sass/components/_button-groups.scss +13 -3
- package/src/sass/components/_cards.scss +16 -13
- package/src/sass/components/_carousel.scss +9 -7
- package/src/sass/components/_column-chart.scss +134 -0
- package/src/sass/components/_command-palette.scss +140 -0
- package/src/sass/components/_countdown.scss +89 -0
- package/src/sass/components/_data-table.scss +188 -0
- package/src/sass/components/_dialog.scss +1 -0
- package/src/sass/components/_empty-state.scss +78 -0
- package/src/sass/components/_expanding-card.scss +3 -0
- package/src/sass/components/_heatmap-chart.scss +156 -0
- package/src/sass/components/_index.scss +27 -0
- package/src/sass/components/_kpi.scss +162 -0
- package/src/sass/components/_line-chart.scss +102 -0
- package/src/sass/components/_marquee.scss +111 -0
- package/src/sass/components/_menu.scss +10 -0
- package/src/sass/components/_message-scroller.scss +66 -0
- package/src/sass/components/_message.scss +202 -0
- package/src/sass/components/_mixed-chart.scss +157 -0
- package/src/sass/components/_navbar.scss +11 -6
- package/src/sass/components/_navigation-bar.scss +1 -0
- package/src/sass/components/_navigation-rail.scss +9 -0
- package/src/sass/components/_page-footer.scss +0 -11
- package/src/sass/components/_pie-chart.scss +203 -0
- package/src/sass/components/_popover.scss +112 -0
- package/src/sass/components/_progress.scss +25 -6
- 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 +2 -1
- package/src/sass/components/_stat.scss +86 -0
- package/src/sass/components/_stepper.scss +190 -0
- package/src/sass/components/_timeline.scss +114 -0
- package/src/sass/components/_timepicker.scss +2 -2
- package/src/sass/components/_toolbar.scss +2 -1
- package/src/sass/components/_tooltip.scss +2 -0
- package/src/sass/components/_tree.scss +139 -0
- package/src/sass/components/forms/_checkboxes.scss +2 -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 +166 -15
- package/src/sass/components/forms/_radio-buttons.scss +2 -2
- package/src/sass/components/forms/_rating.scss +165 -0
- package/src/sass/components/forms/_slider.scss +51 -29
- package/src/sass/components/forms/_switches.scss +3 -3
- package/src/sass/tokens/_reference.scss +3 -15
- package/src/sass/utilities/_helpers.scss +14 -0
- 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/src/sass/utilities/_spacing.scss +29 -23
- package/src/sass/utilities/_visibility.scss +3 -2
- package/dist/js/chunks/chunk-74N6U5JJ.mjs.map +0 -7
- package/dist/js/chunks/chunk-7GKXUG4B.mjs.map +0 -7
- package/dist/js/chunks/chunk-AYYYWUJ4.mjs.map +0 -7
- package/dist/js/chunks/chunk-CDW6WIRT.mjs.map +0 -7
- package/dist/js/chunks/chunk-D4UZ4HFN.mjs.map +0 -7
- package/dist/js/chunks/chunk-EP3CVKB5.mjs.map +0 -7
- package/dist/js/chunks/chunk-GY2Z5CJ2.mjs.map +0 -7
- package/dist/js/chunks/chunk-I5KR22BY.mjs.map +0 -7
- package/dist/js/chunks/chunk-JKNPQQWY.mjs.map +0 -7
- package/dist/js/chunks/chunk-JODJAGFS.mjs.map +0 -7
- package/dist/js/chunks/chunk-JR24UB4X.mjs +0 -100
- package/dist/js/chunks/chunk-JR24UB4X.mjs.map +0 -7
- package/dist/js/chunks/chunk-LZVBJ33S.mjs.map +0 -7
- package/dist/js/chunks/chunk-PMBPAFAS.mjs +0 -7
- package/dist/js/chunks/chunk-PMBPAFAS.mjs.map +0 -7
- package/dist/js/chunks/chunk-TK6PX2GC.mjs.map +0 -7
- package/dist/js/chunks/chunk-WWPAPHMA.mjs +0 -1
- /package/dist/js/chunks/{chunk-IMUPRRI6.mjs.map → chunk-3VOK6J7U.mjs.map} +0 -0
- /package/dist/js/chunks/{chunk-A3BJA7V4.mjs.map → chunk-6WLSDZ4O.mjs.map} +0 -0
- /package/dist/js/chunks/{chunk-KR44BSYQ.mjs.map → chunk-DLWYKFEI.mjs.map} +0 -0
- /package/dist/js/chunks/{chunk-SLFNPY5M.mjs.map → chunk-EC63CHXU.mjs.map} +0 -0
- /package/dist/js/chunks/{chunk-WWPAPHMA.mjs.map → chunk-NQLC3YMW.mjs.map} +0 -0
- /package/dist/js/chunks/{chunk-VAS6JQ6P.mjs.map → chunk-PIJ2TAR3.mjs.map} +0 -0
- /package/dist/js/chunks/{chunk-PIIAEYAJ.mjs.map → chunk-QDAL4IYN.mjs.map} +0 -0
- /package/dist/js/chunks/{chunk-FRB7TOCS.mjs.map → chunk-QV2JAWIZ.mjs.map} +0 -0
- /package/dist/js/chunks/{chunk-N3UHGN3N.mjs.map → chunk-QVVEWBOF.mjs.map} +0 -0
- /package/dist/js/chunks/{chunk-TYM6U5DY.mjs.map → chunk-UAEAQBRC.mjs.map} +0 -0
- /package/dist/js/chunks/{chunk-7UXHSYIA.mjs.map → chunk-UBLRRJ7N.mjs.map} +0 -0
- /package/dist/js/chunks/{chunk-JNPIWFJT.mjs.map → chunk-UNEMYWEW.mjs.map} +0 -0
- /package/dist/js/chunks/{chunk-XO5WX3TK.mjs.map → chunk-YDCS5S3J.mjs.map} +0 -0
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
@use "sass:list";
|
|
2
2
|
@use "sass:map";
|
|
3
|
+
@use "sass:math";
|
|
3
4
|
@use "./elevation" as *;
|
|
4
5
|
@use "./variables" as *;
|
|
5
6
|
|
|
@@ -311,3 +312,228 @@ $_state-layers: ("hover", "focus", "pressed", "dragged");
|
|
|
311
312
|
box-shadow: none;
|
|
312
313
|
}
|
|
313
314
|
}
|
|
315
|
+
|
|
316
|
+
// Frosted glass for a floating surface's container. `$color` is the color the
|
|
317
|
+
// rule just set as its `background-color`.
|
|
318
|
+
//
|
|
319
|
+
// The rules always ship, behind a style query on `--expressive-glass`, so a
|
|
320
|
+
// page using the compiled CSS can turn the effect on with
|
|
321
|
+
// `:root { --expressive-glass: true; }`. `$expressive-glass` only picks the
|
|
322
|
+
// default: when it is on, the query flips to "anything but false". A style
|
|
323
|
+
// query reads the parent's value, so the switch belongs on `:root` or a
|
|
324
|
+
// wrapper, not on the surface itself.
|
|
325
|
+
//
|
|
326
|
+
// A user who asks for less transparency or more contrast gets the solid
|
|
327
|
+
// surface back. `backdrop-filter` also makes the element the containing block
|
|
328
|
+
// for its `position: fixed` descendants, so a surface that hangs a fixed scrim
|
|
329
|
+
// off itself has to opt back out (see the modal navigation rail).
|
|
330
|
+
@mixin glass($color) {
|
|
331
|
+
@if math.unit($expressive-glass-opacity) != "%" {
|
|
332
|
+
@error "$expressive-glass-opacity must be a percentage, got #{$expressive-glass-opacity}.";
|
|
333
|
+
}
|
|
334
|
+
|
|
335
|
+
$query: "style(--expressive-glass: true)";
|
|
336
|
+
@if $expressive-glass { $query: "not style(--expressive-glass: false)"; }
|
|
337
|
+
|
|
338
|
+
@container #{$query} {
|
|
339
|
+
background-color: color-mix(in oklab, #{$color} var(--expressive-glass-opacity, #{$expressive-glass-opacity}), transparent);
|
|
340
|
+
backdrop-filter: blur(var(--expressive-glass-blur, #{$expressive-glass-blur}));
|
|
341
|
+
|
|
342
|
+
@media (prefers-reduced-transparency: reduce), (prefers-contrast: more) {
|
|
343
|
+
background-color: #{$color};
|
|
344
|
+
backdrop-filter: none;
|
|
345
|
+
}
|
|
346
|
+
}
|
|
347
|
+
}
|
|
348
|
+
|
|
349
|
+
// The parts LineChart draws for every chart type, prefixed with the
|
|
350
|
+
// component's name: .#{$name}-plot, -cursor, -tooltip, -labels and -legend.
|
|
351
|
+
// Defines the --md-comp-#{$name}-height, -grid-color and -color-1..4 tokens,
|
|
352
|
+
// and --#{$name}-color on each [data-series]. Include it at the root of the
|
|
353
|
+
// component's partial; the component adds its own marks and cursor look.
|
|
354
|
+
@mixin chart($name) {
|
|
355
|
+
.#{$name} {
|
|
356
|
+
--md-comp-#{$name}-height: 240px;
|
|
357
|
+
--md-comp-#{$name}-grid-color: var(--md-sys-color-outline-variant);
|
|
358
|
+
--md-comp-#{$name}-color-1: var(--md-sys-color-primary);
|
|
359
|
+
--md-comp-#{$name}-color-2: var(--md-sys-color-tertiary);
|
|
360
|
+
--md-comp-#{$name}-color-3: var(--md-sys-color-secondary);
|
|
361
|
+
--md-comp-#{$name}-color-4: var(--md-sys-color-on-surface-variant);
|
|
362
|
+
|
|
363
|
+
display: flex;
|
|
364
|
+
flex-direction: column;
|
|
365
|
+
gap: 8px;
|
|
366
|
+
min-width: 0;
|
|
367
|
+
margin: $element-top-margin 0 $element-bottom-margin;
|
|
368
|
+
color: var(--md-sys-color-on-surface);
|
|
369
|
+
|
|
370
|
+
> figcaption {
|
|
371
|
+
color: var(--md-sys-color-on-surface-variant);
|
|
372
|
+
@include typescale("title-small");
|
|
373
|
+
}
|
|
374
|
+
|
|
375
|
+
// A table keeps its content size under visually-hidden, so anchor it
|
|
376
|
+
// here rather than at some distant positioned ancestor. A fixed layout
|
|
377
|
+
// holds it to the 1px wide it is given. Its rows still set its height, so
|
|
378
|
+
// it hangs up from the bottom edge, where the overflow cannot scroll.
|
|
379
|
+
position: relative;
|
|
380
|
+
|
|
381
|
+
&:has(> .#{$name}-plot) > table {
|
|
382
|
+
@include visually-hidden;
|
|
383
|
+
inset: auto auto 0 0;
|
|
384
|
+
table-layout: fixed;
|
|
385
|
+
}
|
|
386
|
+
}
|
|
387
|
+
|
|
388
|
+
@for $i from 1 through 4 {
|
|
389
|
+
.#{$name} [data-series="#{$i}"] {
|
|
390
|
+
--#{$name}-color: var(--md-comp-#{$name}-color-#{$i});
|
|
391
|
+
}
|
|
392
|
+
}
|
|
393
|
+
|
|
394
|
+
.#{$name}-plot {
|
|
395
|
+
position: relative;
|
|
396
|
+
height: var(--md-comp-#{$name}-height);
|
|
397
|
+
border-block-end: 1px solid var(--md-comp-#{$name}-grid-color);
|
|
398
|
+
border-radius: 2px;
|
|
399
|
+
// Four grid lines; the border is the fifth.
|
|
400
|
+
background: linear-gradient(var(--md-comp-#{$name}-grid-color) 1px, transparent 0) 0 0 / 100% 25%;
|
|
401
|
+
touch-action: pan-y;
|
|
402
|
+
@include focus-visible;
|
|
403
|
+
}
|
|
404
|
+
|
|
405
|
+
.#{$name}-cursor {
|
|
406
|
+
position: absolute;
|
|
407
|
+
inset-block: 0;
|
|
408
|
+
pointer-events: none;
|
|
409
|
+
}
|
|
410
|
+
|
|
411
|
+
// Rich tooltip surface, as in _tooltip.scss.
|
|
412
|
+
.#{$name}-tooltip {
|
|
413
|
+
--md-comp-#{$name}-tooltip-color: var(--md-sys-color-surface-container);
|
|
414
|
+
|
|
415
|
+
position: absolute;
|
|
416
|
+
top: 0;
|
|
417
|
+
z-index: 1;
|
|
418
|
+
display: grid;
|
|
419
|
+
grid-template-columns: auto auto;
|
|
420
|
+
gap: 4px 16px;
|
|
421
|
+
min-width: 120px;
|
|
422
|
+
margin: 0;
|
|
423
|
+
padding: 12px 16px;
|
|
424
|
+
border-radius: 12px;
|
|
425
|
+
background-color: var(--md-comp-#{$name}-tooltip-color);
|
|
426
|
+
color: var(--md-sys-color-on-surface-variant);
|
|
427
|
+
@include typescale("body-small");
|
|
428
|
+
white-space: nowrap;
|
|
429
|
+
font-variant-numeric: tabular-nums;
|
|
430
|
+
pointer-events: none;
|
|
431
|
+
translate: 12px 0;
|
|
432
|
+
@include z-depth("2");
|
|
433
|
+
@include glass(var(--md-comp-#{$name}-tooltip-color));
|
|
434
|
+
|
|
435
|
+
&[hidden] {
|
|
436
|
+
display: none;
|
|
437
|
+
}
|
|
438
|
+
|
|
439
|
+
&.end {
|
|
440
|
+
translate: calc(-100% - 12px) 0;
|
|
441
|
+
}
|
|
442
|
+
|
|
443
|
+
> strong {
|
|
444
|
+
grid-column: 1 / -1;
|
|
445
|
+
color: var(--md-sys-color-on-surface);
|
|
446
|
+
@include typescale("title-small");
|
|
447
|
+
}
|
|
448
|
+
|
|
449
|
+
> span {
|
|
450
|
+
display: flex;
|
|
451
|
+
align-items: center;
|
|
452
|
+
gap: 8px;
|
|
453
|
+
}
|
|
454
|
+
|
|
455
|
+
> span:nth-of-type(even) {
|
|
456
|
+
justify-content: end;
|
|
457
|
+
color: var(--md-sys-color-on-surface);
|
|
458
|
+
font-weight: 500;
|
|
459
|
+
}
|
|
460
|
+
}
|
|
461
|
+
|
|
462
|
+
.#{$name}-labels,
|
|
463
|
+
.#{$name}-legend {
|
|
464
|
+
margin: 0;
|
|
465
|
+
padding: 0;
|
|
466
|
+
list-style: none;
|
|
467
|
+
color: var(--md-sys-color-on-surface-variant);
|
|
468
|
+
@include typescale("body-small");
|
|
469
|
+
}
|
|
470
|
+
|
|
471
|
+
.#{$name}-labels {
|
|
472
|
+
display: grid;
|
|
473
|
+
grid-auto-columns: minmax(0, 1fr);
|
|
474
|
+
grid-auto-flow: column;
|
|
475
|
+
text-align: center;
|
|
476
|
+
|
|
477
|
+
> li {
|
|
478
|
+
overflow: hidden;
|
|
479
|
+
text-overflow: ellipsis;
|
|
480
|
+
white-space: nowrap;
|
|
481
|
+
}
|
|
482
|
+
}
|
|
483
|
+
|
|
484
|
+
.#{$name}-legend {
|
|
485
|
+
display: flex;
|
|
486
|
+
flex-wrap: wrap;
|
|
487
|
+
gap: 4px 16px;
|
|
488
|
+
|
|
489
|
+
> li {
|
|
490
|
+
display: flex;
|
|
491
|
+
align-items: center;
|
|
492
|
+
gap: 8px;
|
|
493
|
+
}
|
|
494
|
+
}
|
|
495
|
+
|
|
496
|
+
// Series swatches.
|
|
497
|
+
.#{$name}-legend > li::before,
|
|
498
|
+
.#{$name}-tooltip > span:nth-of-type(odd)::before {
|
|
499
|
+
content: "";
|
|
500
|
+
flex: none;
|
|
501
|
+
width: 8px;
|
|
502
|
+
height: 8px;
|
|
503
|
+
border-radius: 50%;
|
|
504
|
+
background-color: var(--#{$name}-color);
|
|
505
|
+
}
|
|
506
|
+
|
|
507
|
+
.#{$name}.sparkline {
|
|
508
|
+
--md-comp-#{$name}-height: 48px;
|
|
509
|
+
// Keep the taller hidden table from adding scrollable overflow. A
|
|
510
|
+
// sparkline has no tooltip or focus ring to clip.
|
|
511
|
+
overflow: clip;
|
|
512
|
+
|
|
513
|
+
.#{$name}-plot {
|
|
514
|
+
border: 0;
|
|
515
|
+
background: none;
|
|
516
|
+
}
|
|
517
|
+
|
|
518
|
+
.#{$name}-labels,
|
|
519
|
+
.#{$name}-legend {
|
|
520
|
+
display: none;
|
|
521
|
+
}
|
|
522
|
+
}
|
|
523
|
+
|
|
524
|
+
@media (forced-colors: active) {
|
|
525
|
+
.#{$name}-plot {
|
|
526
|
+
background: none;
|
|
527
|
+
}
|
|
528
|
+
|
|
529
|
+
.#{$name}-tooltip {
|
|
530
|
+
outline: 1px solid CanvasText;
|
|
531
|
+
}
|
|
532
|
+
|
|
533
|
+
// The marks keep their colors, so the swatches that key them must too.
|
|
534
|
+
.#{$name}-legend > li::before,
|
|
535
|
+
.#{$name}-tooltip > span:nth-of-type(odd)::before {
|
|
536
|
+
forced-color-adjust: none;
|
|
537
|
+
}
|
|
538
|
+
}
|
|
539
|
+
}
|
|
@@ -15,6 +15,9 @@ $icon: ":is(i, .material-symbols, .material-symbols-outlined, .material-symbols-
|
|
|
15
15
|
// The label beside an icon: any span that is not itself an icon.
|
|
16
16
|
$icon-label: "span:not(.material-symbols):not(.material-symbols-outlined):not(.material-symbols-rounded):not(.material-symbols-sharp):not(.material-icons)" !default;
|
|
17
17
|
|
|
18
|
+
// The up arrow on a change line (Stat, KPI). Rotate it 180deg for down.
|
|
19
|
+
$trend-arrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M11 20V7.8l-5.6 5.6L4 12l8-8 8 8-1.4 1.4L13 7.8V20z'/%3E%3C/svg%3E") !default;
|
|
20
|
+
|
|
18
21
|
// Colors
|
|
19
22
|
//
|
|
20
23
|
// The 2014 Material palette ($colors + colorFunc()) is gone. It generated 532
|
|
@@ -72,6 +75,17 @@ $font-stack: var(--md-ref-typeface-plain), var(--md-ref-typeface-fallback) !defa
|
|
|
72
75
|
// loads these families from elsewhere).
|
|
73
76
|
$expressive-font-path: "../fonts" !default;
|
|
74
77
|
$expressive-include-fonts: true !default;
|
|
78
|
+
|
|
79
|
+
// Frosted glass for floating surfaces (menus, tooltips, dialogs, sheets, the
|
|
80
|
+
// snackbar, navigation bar and rail, toolbars, the search view). Off by default.
|
|
81
|
+
// `--expressive-glass: true | false` on :root or a wrapper overrides this at
|
|
82
|
+
// runtime. The blur is the frost thickness; the opacity is the share of the
|
|
83
|
+
// surface color kept, so 100% is solid. Both are read through
|
|
84
|
+
// --expressive-glass-blur and --expressive-glass-opacity fallbacks, so a page
|
|
85
|
+
// or subtree can retune them too.
|
|
86
|
+
$expressive-glass: false !default;
|
|
87
|
+
$expressive-glass-blur: 16px !default;
|
|
88
|
+
$expressive-glass-opacity: 72% !default;
|
|
75
89
|
$text-color: var(--md-sys-color-on-background) !default;
|
|
76
90
|
|
|
77
91
|
// Modern browsers default to 16px. M3's web conversion is SP_SIZE / 16 = rem;
|
|
@@ -74,3 +74,48 @@ $_flow-intercept: math.div($_flow-min-px - ($_flow-slope * $flow-text-from), $ro
|
|
|
74
74
|
.flow-text {
|
|
75
75
|
font-size: clamp(#{$flow-text-min}, #{$_flow-intercept} + #{$_flow-slope * 100}vw, #{$flow-text-max});
|
|
76
76
|
}
|
|
77
|
+
|
|
78
|
+
// Keyboard keys. <kbd> is drawn as a keycap; a <kbd> holding other <kbd>
|
|
79
|
+
// elements is the whole combination ("Ctrl + K") and stays plain around
|
|
80
|
+
// them. Menus and lists restyle a trailing <kbd> as quiet shortcut text.
|
|
81
|
+
kbd {
|
|
82
|
+
display: inline-block;
|
|
83
|
+
box-sizing: border-box;
|
|
84
|
+
min-width: 1.6em;
|
|
85
|
+
padding: 0.1em 0.4em;
|
|
86
|
+
border: 1px solid var(--md-sys-color-outline-variant);
|
|
87
|
+
border-bottom-width: 2px;
|
|
88
|
+
border-radius: 6px;
|
|
89
|
+
background-color: var(--md-sys-color-surface-container);
|
|
90
|
+
color: var(--md-sys-color-on-surface);
|
|
91
|
+
font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, "Liberation Mono", monospace;
|
|
92
|
+
font-size: 0.85em;
|
|
93
|
+
line-height: 1.4;
|
|
94
|
+
text-align: center;
|
|
95
|
+
white-space: nowrap;
|
|
96
|
+
|
|
97
|
+
&:has(> kbd) {
|
|
98
|
+
min-width: 0;
|
|
99
|
+
padding: 0;
|
|
100
|
+
border: 0;
|
|
101
|
+
background: none;
|
|
102
|
+
font-family: inherit;
|
|
103
|
+
font-size: inherit;
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
// Highlighted text. <mark> picks out a run of text that matters to what the
|
|
108
|
+
// reader is doing, such as the matched part of a search result. It takes no
|
|
109
|
+
// padding, so a match inside a word keeps the word's letter spacing.
|
|
110
|
+
// ::highlight(mark) paints the same colors on ranges a script registers with
|
|
111
|
+
// CSS.highlights.set("mark", highlight), without changing the DOM.
|
|
112
|
+
mark {
|
|
113
|
+
border-radius: 2px;
|
|
114
|
+
background-color: var(--md-sys-color-tertiary-container);
|
|
115
|
+
color: var(--md-sys-color-on-tertiary-container);
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
::highlight(mark) {
|
|
119
|
+
background-color: var(--md-sys-color-tertiary-container);
|
|
120
|
+
color: var(--md-sys-color-on-tertiary-container);
|
|
121
|
+
}
|
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
@use "../abstracts" as *;
|
|
2
|
+
|
|
3
|
+
// Accordion. A .accordion stacks native <details> disclosures as tiles. The
|
|
4
|
+
// browser owns the toggle: <summary> is the button, `open` is the state, and
|
|
5
|
+
// a shared `name` makes the items exclusive. There is no JavaScript.
|
|
6
|
+
//
|
|
7
|
+
// The tiles join like a segmented list: outer corners take the full shape,
|
|
8
|
+
// inner corners the grouped shape, and an open item rounds every corner.
|
|
9
|
+
//
|
|
10
|
+
// Opening animates where the engine can transition to `auto` height
|
|
11
|
+
// (interpolate-size and ::details-content). Elsewhere it opens at once.
|
|
12
|
+
//
|
|
13
|
+
// Tokens:
|
|
14
|
+
// --md-comp-accordion-container-color surface-container
|
|
15
|
+
// --md-comp-accordion-shape 20px
|
|
16
|
+
// --md-comp-accordion-grouped-shape 4px (inner corners)
|
|
17
|
+
// --md-comp-accordion-gap 2px
|
|
18
|
+
// --md-comp-accordion-header-height 56px
|
|
19
|
+
// --md-comp-accordion-padding 16px
|
|
20
|
+
|
|
21
|
+
$_accordion-chevron: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 15.4 6 9.4 7.4 8l4.6 4.6L16.6 8 18 9.4z'/%3E%3C/svg%3E");
|
|
22
|
+
|
|
23
|
+
.accordion {
|
|
24
|
+
--md-comp-accordion-container-color: var(--md-sys-color-surface-container);
|
|
25
|
+
--md-comp-accordion-shape: 20px;
|
|
26
|
+
--md-comp-accordion-grouped-shape: 4px;
|
|
27
|
+
--md-comp-accordion-gap: 2px;
|
|
28
|
+
--md-comp-accordion-header-height: 56px;
|
|
29
|
+
--md-comp-accordion-padding: 16px;
|
|
30
|
+
|
|
31
|
+
display: flex;
|
|
32
|
+
flex-direction: column;
|
|
33
|
+
gap: var(--md-comp-accordion-gap);
|
|
34
|
+
margin: $element-top-margin 0 $element-bottom-margin;
|
|
35
|
+
|
|
36
|
+
> details {
|
|
37
|
+
border-radius: var(--md-comp-accordion-grouped-shape);
|
|
38
|
+
background-color: var(--md-comp-accordion-container-color);
|
|
39
|
+
color: var(--md-sys-color-on-surface);
|
|
40
|
+
// Invisible until forced colors paint it, so the tiles stay apart there.
|
|
41
|
+
outline: 1px solid transparent;
|
|
42
|
+
outline-offset: -1px;
|
|
43
|
+
transition: border-radius 200ms ease-out;
|
|
44
|
+
|
|
45
|
+
&:first-child {
|
|
46
|
+
border-start-start-radius: var(--md-comp-accordion-shape);
|
|
47
|
+
border-start-end-radius: var(--md-comp-accordion-shape);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
&:last-child {
|
|
51
|
+
border-end-start-radius: var(--md-comp-accordion-shape);
|
|
52
|
+
border-end-end-radius: var(--md-comp-accordion-shape);
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
&[open] {
|
|
56
|
+
border-radius: var(--md-comp-accordion-shape);
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
> details > summary {
|
|
61
|
+
display: flex;
|
|
62
|
+
align-items: center;
|
|
63
|
+
gap: 16px;
|
|
64
|
+
box-sizing: border-box;
|
|
65
|
+
min-height: var(--md-comp-accordion-header-height);
|
|
66
|
+
padding: 8px var(--md-comp-accordion-padding);
|
|
67
|
+
border-radius: inherit;
|
|
68
|
+
list-style: none;
|
|
69
|
+
cursor: pointer;
|
|
70
|
+
user-select: none;
|
|
71
|
+
-webkit-tap-highlight-color: transparent;
|
|
72
|
+
@include typescale("title-medium");
|
|
73
|
+
@include focus-visible;
|
|
74
|
+
|
|
75
|
+
&::-webkit-details-marker {
|
|
76
|
+
display: none;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
// The chevron trails the label and turns over when the item opens.
|
|
80
|
+
&::after {
|
|
81
|
+
content: "";
|
|
82
|
+
flex: none;
|
|
83
|
+
width: 24px;
|
|
84
|
+
height: 24px;
|
|
85
|
+
margin-inline-start: auto;
|
|
86
|
+
background-color: var(--md-sys-color-on-surface-variant);
|
|
87
|
+
mask: $_accordion-chevron center / 24px no-repeat;
|
|
88
|
+
transition: transform 200ms ease-out;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
&:hover {
|
|
92
|
+
background-color: color-mix(
|
|
93
|
+
in oklab,
|
|
94
|
+
var(--md-sys-color-on-surface) state-opacity("hover"),
|
|
95
|
+
transparent
|
|
96
|
+
);
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
> #{$icon} {
|
|
100
|
+
flex: none;
|
|
101
|
+
color: var(--md-sys-color-on-surface-variant);
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
> details[open] > summary::after {
|
|
106
|
+
transform: rotate(180deg);
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
// Everything after the summary is the panel.
|
|
110
|
+
> details > :not(summary) {
|
|
111
|
+
margin: 0 var(--md-comp-accordion-padding);
|
|
112
|
+
color: var(--md-sys-color-on-surface-variant);
|
|
113
|
+
@include typescale("body-medium");
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
> details > :not(summary) + :not(summary) {
|
|
117
|
+
margin-block-start: 8px;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
> details > :not(summary):last-child {
|
|
121
|
+
margin-block-end: var(--md-comp-accordion-padding);
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
@supports (interpolate-size: allow-keywords) and selector(::details-content) {
|
|
126
|
+
.accordion > details {
|
|
127
|
+
interpolate-size: allow-keywords;
|
|
128
|
+
|
|
129
|
+
&::details-content {
|
|
130
|
+
block-size: 0;
|
|
131
|
+
overflow: clip;
|
|
132
|
+
transition:
|
|
133
|
+
block-size 250ms cubic-bezier(0.2, 0, 0, 1),
|
|
134
|
+
content-visibility 250ms allow-discrete;
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
&[open]::details-content {
|
|
138
|
+
block-size: auto;
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
@media (prefers-reduced-motion: reduce) {
|
|
142
|
+
&::details-content {
|
|
143
|
+
transition: none;
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
@media (prefers-reduced-motion: reduce) {
|
|
150
|
+
.accordion > details,
|
|
151
|
+
.accordion > details > summary::after {
|
|
152
|
+
transition: none;
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
@media (forced-colors: active) {
|
|
157
|
+
.accordion > details > summary::after {
|
|
158
|
+
forced-color-adjust: none;
|
|
159
|
+
background-color: CanvasText;
|
|
160
|
+
}
|
|
161
|
+
}
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
@use "../abstracts" as *;
|
|
2
|
+
|
|
3
|
+
// Aura. A light that runs around the border of one element, to draw the eye
|
|
4
|
+
// to the most important button or card on a screen. Wrap the element:
|
|
5
|
+
// <div class="aura"><button class="filled">…</button></div>. The ring is a
|
|
6
|
+
// pseudo-element, so it adds nothing to the accessibility tree.
|
|
7
|
+
//
|
|
8
|
+
// Styles:
|
|
9
|
+
// (default) one light in the primary color circles a faint ring
|
|
10
|
+
// .dual two lights, primary and tertiary, on opposite sides
|
|
11
|
+
// .rainbow the full hue wheel turns around the ring
|
|
12
|
+
// .glow a blurred halo behind the element instead of a ring;
|
|
13
|
+
// the wrapped element needs an opaque container
|
|
14
|
+
//
|
|
15
|
+
// The ring follows the wrapped element's corners through
|
|
16
|
+
// --md-comp-aura-shape: 12px for cards, fully rounded around a button.
|
|
17
|
+
// Reduced motion stops the rotation and leaves the ring. Forced colors draw
|
|
18
|
+
// a solid Highlight ring. In a shadow root, which ignores @property, the light
|
|
19
|
+
// turns in 7.2deg steps and the ring rests at 0deg.
|
|
20
|
+
//
|
|
21
|
+
// Tokens:
|
|
22
|
+
// --md-comp-aura-color primary
|
|
23
|
+
// --md-comp-aura-color-2 tertiary (.dual)
|
|
24
|
+
// --md-comp-aura-width 2px
|
|
25
|
+
// --md-comp-aura-shape 12px; 9999px around a button
|
|
26
|
+
// --md-comp-aura-duration 4s
|
|
27
|
+
|
|
28
|
+
@property --md-comp-aura-angle {
|
|
29
|
+
syntax: "<angle>";
|
|
30
|
+
inherits: false;
|
|
31
|
+
initial-value: 0deg;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.aura {
|
|
35
|
+
--md-comp-aura-color: var(--md-sys-color-primary);
|
|
36
|
+
--md-comp-aura-color-2: var(--md-sys-color-tertiary);
|
|
37
|
+
--md-comp-aura-width: 2px;
|
|
38
|
+
--md-comp-aura-shape: 12px;
|
|
39
|
+
--md-comp-aura-duration: 4s;
|
|
40
|
+
|
|
41
|
+
position: relative;
|
|
42
|
+
isolation: isolate;
|
|
43
|
+
display: inline-grid;
|
|
44
|
+
vertical-align: middle;
|
|
45
|
+
padding: var(--md-comp-aura-width);
|
|
46
|
+
border-radius: calc(var(--md-comp-aura-shape) + var(--md-comp-aura-width));
|
|
47
|
+
|
|
48
|
+
&:has(> :is(button, .button, [role="button"])) {
|
|
49
|
+
--md-comp-aura-shape: 9999px;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
&::before {
|
|
53
|
+
content: "";
|
|
54
|
+
position: absolute;
|
|
55
|
+
inset: 0;
|
|
56
|
+
z-index: -1;
|
|
57
|
+
padding: inherit;
|
|
58
|
+
border-radius: inherit;
|
|
59
|
+
background: conic-gradient(
|
|
60
|
+
from var(--md-comp-aura-angle, 0deg),
|
|
61
|
+
color-mix(in oklab, var(--md-comp-aura-color) 20%, transparent) 60%,
|
|
62
|
+
var(--md-comp-aura-color) 85%,
|
|
63
|
+
color-mix(in oklab, var(--md-comp-aura-color) 20%, transparent)
|
|
64
|
+
);
|
|
65
|
+
mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
|
|
66
|
+
animation: aura-turn var(--md-comp-aura-duration) linear infinite;
|
|
67
|
+
pointer-events: none;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
&.dual::before {
|
|
71
|
+
background: conic-gradient(
|
|
72
|
+
from var(--md-comp-aura-angle, 0deg),
|
|
73
|
+
transparent 10%,
|
|
74
|
+
var(--md-comp-aura-color) 35%,
|
|
75
|
+
transparent 50% 60%,
|
|
76
|
+
var(--md-comp-aura-color-2) 85%,
|
|
77
|
+
transparent
|
|
78
|
+
);
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
&.rainbow::before {
|
|
82
|
+
background: conic-gradient(
|
|
83
|
+
from var(--md-comp-aura-angle, 0deg),
|
|
84
|
+
#f43f5e, #f59e0b, #84cc16, #06b6d4, #8b5cf6, #f43f5e
|
|
85
|
+
);
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
&.glow::before {
|
|
89
|
+
mask: none;
|
|
90
|
+
filter: blur(calc(var(--md-comp-aura-width) * 6));
|
|
91
|
+
opacity: 0.8;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
&:dir(rtl)::before {
|
|
95
|
+
animation-direction: reverse;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
@media (prefers-reduced-motion: reduce) {
|
|
99
|
+
&::before {
|
|
100
|
+
animation: none;
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
@media (forced-colors: active) {
|
|
105
|
+
&::before {
|
|
106
|
+
forced-color-adjust: none;
|
|
107
|
+
background: Highlight;
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
// Registered, the angle interpolates smoothly between these stops. A shadow
|
|
113
|
+
// root ignores @property, and an unregistered property animates discretely,
|
|
114
|
+
// so the stops are close enough to read as a turn in 7.2deg steps.
|
|
115
|
+
@keyframes aura-turn {
|
|
116
|
+
@for $i from 0 through 50 {
|
|
117
|
+
#{$i * 2}% { --md-comp-aura-angle: #{$i * 7.2}deg; }
|
|
118
|
+
}
|
|
119
|
+
}
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
@use "../abstracts" as *;
|
|
2
|
+
|
|
3
|
+
// Avatar. A person or account as a circle: an <img>, or a <span> holding
|
|
4
|
+
// initials or an icon. `small` and `large` move the size; the type and icon
|
|
5
|
+
// scale with it.
|
|
6
|
+
//
|
|
7
|
+
// A .avatar-group overlaps its avatars and rings each one in the surface
|
|
8
|
+
// color, so the edges stay readable over the neighbour underneath.
|
|
9
|
+
//
|
|
10
|
+
// Tokens:
|
|
11
|
+
// --md-comp-avatar-size 40px / small 32px / large 56px
|
|
12
|
+
// --md-comp-avatar-container-color secondary-container
|
|
13
|
+
// --md-comp-avatar-color on-secondary-container
|
|
14
|
+
// --md-comp-avatar-group-overlap 8px
|
|
15
|
+
// --md-comp-avatar-group-ring-color surface
|
|
16
|
+
|
|
17
|
+
.avatar {
|
|
18
|
+
--md-comp-avatar-size: 40px;
|
|
19
|
+
--md-comp-avatar-container-color: var(--md-sys-color-secondary-container);
|
|
20
|
+
--md-comp-avatar-color: var(--md-sys-color-on-secondary-container);
|
|
21
|
+
|
|
22
|
+
box-sizing: border-box;
|
|
23
|
+
display: inline-flex;
|
|
24
|
+
flex: none;
|
|
25
|
+
align-items: center;
|
|
26
|
+
justify-content: center;
|
|
27
|
+
width: var(--md-comp-avatar-size);
|
|
28
|
+
height: var(--md-comp-avatar-size);
|
|
29
|
+
border-radius: 50%;
|
|
30
|
+
overflow: hidden;
|
|
31
|
+
object-fit: cover;
|
|
32
|
+
vertical-align: middle;
|
|
33
|
+
background-color: var(--md-comp-avatar-container-color);
|
|
34
|
+
color: var(--md-comp-avatar-color);
|
|
35
|
+
font-family: var(--md-sys-typescale-title-medium-font-family-name);
|
|
36
|
+
font-size: calc(var(--md-comp-avatar-size) * 0.4);
|
|
37
|
+
font-weight: 500;
|
|
38
|
+
line-height: 1;
|
|
39
|
+
letter-spacing: 0;
|
|
40
|
+
text-transform: uppercase;
|
|
41
|
+
white-space: nowrap;
|
|
42
|
+
user-select: none;
|
|
43
|
+
|
|
44
|
+
&.small {
|
|
45
|
+
--md-comp-avatar-size: 32px;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
&.large {
|
|
49
|
+
--md-comp-avatar-size: 56px;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
> img {
|
|
53
|
+
width: 100%;
|
|
54
|
+
height: 100%;
|
|
55
|
+
object-fit: cover;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
> #{$icon} {
|
|
59
|
+
font-size: calc(var(--md-comp-avatar-size) * 0.6);
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
// Forced colors drop the fill, so an outline keeps the circle.
|
|
64
|
+
@media (forced-colors: active) {
|
|
65
|
+
.avatar:not(img) {
|
|
66
|
+
outline: 1px solid CanvasText;
|
|
67
|
+
outline-offset: -1px;
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
.avatar-group {
|
|
72
|
+
--md-comp-avatar-group-overlap: 8px;
|
|
73
|
+
--md-comp-avatar-group-ring-color: var(--md-sys-color-surface);
|
|
74
|
+
|
|
75
|
+
display: inline-flex;
|
|
76
|
+
align-items: center;
|
|
77
|
+
vertical-align: middle;
|
|
78
|
+
|
|
79
|
+
> .avatar {
|
|
80
|
+
box-shadow: 0 0 0 2px var(--md-comp-avatar-group-ring-color);
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
> .avatar + .avatar {
|
|
84
|
+
margin-inline-start: calc(var(--md-comp-avatar-group-overlap) * -1);
|
|
85
|
+
}
|
|
86
|
+
}
|