@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
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
@use "../abstracts" as *;
|
|
2
|
+
|
|
3
|
+
// Skeleton. An empty block that holds the place of content still loading,
|
|
4
|
+
// with a shimmer passing across it. The block has no text and nothing to
|
|
5
|
+
// announce: mark the region being filled with aria-busy="true", and report
|
|
6
|
+
// the wait through a status such as a loading indicator.
|
|
7
|
+
//
|
|
8
|
+
// Shapes:
|
|
9
|
+
// (default) a box; size it with width and height
|
|
10
|
+
// .text one line of body text; the last of several runs shorter
|
|
11
|
+
// .circle an avatar-sized circle
|
|
12
|
+
//
|
|
13
|
+
// Reduced motion stops the shimmer and leaves the shapes.
|
|
14
|
+
//
|
|
15
|
+
// Tokens:
|
|
16
|
+
// --md-comp-skeleton-color surface-container-highest
|
|
17
|
+
// --md-comp-skeleton-shimmer-color surface at 50%
|
|
18
|
+
// --md-comp-skeleton-shape 8px (text 4px)
|
|
19
|
+
// --md-comp-skeleton-circle-size 40px
|
|
20
|
+
|
|
21
|
+
.skeleton {
|
|
22
|
+
--md-comp-skeleton-color: var(--md-sys-color-surface-container-highest);
|
|
23
|
+
--md-comp-skeleton-shimmer-color: color-mix(
|
|
24
|
+
in oklab,
|
|
25
|
+
var(--md-sys-color-surface) 50%,
|
|
26
|
+
transparent
|
|
27
|
+
);
|
|
28
|
+
--md-comp-skeleton-shape: 8px;
|
|
29
|
+
--md-comp-skeleton-circle-size: 40px;
|
|
30
|
+
|
|
31
|
+
display: block;
|
|
32
|
+
box-sizing: border-box;
|
|
33
|
+
border-radius: var(--md-comp-skeleton-shape);
|
|
34
|
+
background-color: var(--md-comp-skeleton-color);
|
|
35
|
+
background-image: linear-gradient(
|
|
36
|
+
90deg,
|
|
37
|
+
transparent 0%,
|
|
38
|
+
var(--md-comp-skeleton-shimmer-color) 50%,
|
|
39
|
+
transparent 100%
|
|
40
|
+
);
|
|
41
|
+
background-repeat: no-repeat;
|
|
42
|
+
background-size: 50% 100%;
|
|
43
|
+
animation: skeleton-shimmer 1.5s linear infinite;
|
|
44
|
+
|
|
45
|
+
&:dir(rtl) {
|
|
46
|
+
animation-direction: reverse;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
&.text {
|
|
50
|
+
--md-comp-skeleton-shape: 4px;
|
|
51
|
+
|
|
52
|
+
width: 100%;
|
|
53
|
+
height: 1em;
|
|
54
|
+
margin-block: 0.25em;
|
|
55
|
+
|
|
56
|
+
&:last-child:not(:first-child) {
|
|
57
|
+
width: 60%;
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
&.circle {
|
|
62
|
+
width: var(--md-comp-skeleton-circle-size);
|
|
63
|
+
height: var(--md-comp-skeleton-circle-size);
|
|
64
|
+
flex: none;
|
|
65
|
+
border-radius: 50%;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
@media (prefers-reduced-motion: reduce) {
|
|
69
|
+
animation: none;
|
|
70
|
+
background-image: none;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
@media (forced-colors: active) {
|
|
74
|
+
border: 1px solid GrayText;
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
@keyframes skeleton-shimmer {
|
|
79
|
+
from { background-position: -100% 0; }
|
|
80
|
+
to { background-position: 200% 0; }
|
|
81
|
+
}
|
|
@@ -99,6 +99,7 @@ $_bar: ".snackbar";
|
|
|
99
99
|
@include typescale("body-medium");
|
|
100
100
|
@include z-depth("3");
|
|
101
101
|
cursor: default;
|
|
102
|
+
@include glass(var(--md-comp-snackbar-container-color));
|
|
102
103
|
|
|
103
104
|
@include bp-up("medium") {
|
|
104
105
|
width: max-content;
|
|
@@ -120,7 +121,7 @@ $_bar: ".snackbar";
|
|
|
120
121
|
overflow: hidden;
|
|
121
122
|
}
|
|
122
123
|
|
|
123
|
-
// Optional leading icon
|
|
124
|
+
// Optional leading icon. M3 snackbars have no leading icon.
|
|
124
125
|
> #{$icon}:first-child {
|
|
125
126
|
flex: 0 0 auto;
|
|
126
127
|
font-size: 24px;
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
@use "../abstracts" as *;
|
|
2
|
+
|
|
3
|
+
// Stat. A <dl class="stats"> of key figures, such as a dashboard summary.
|
|
4
|
+
// Each figure is a <div> tile holding a <dt> label, a <dd> value and an
|
|
5
|
+
// optional <dd class="stat-change"> comparison. A description list keeps
|
|
6
|
+
// each value paired with its label for assistive technology.
|
|
7
|
+
//
|
|
8
|
+
// .stat-change takes .up or .down for the arrow and .negative when the
|
|
9
|
+
// change is bad news. The arrow is decoration: say the direction in the
|
|
10
|
+
// text, as in "+12% from last month".
|
|
11
|
+
//
|
|
12
|
+
// Tokens:
|
|
13
|
+
// --md-comp-stat-container-color surface-container-low
|
|
14
|
+
// --md-comp-stat-shape 16px
|
|
15
|
+
// --md-comp-stat-min-width 160px (tiles wrap below this)
|
|
16
|
+
|
|
17
|
+
.stats {
|
|
18
|
+
--md-comp-stat-container-color: var(--md-sys-color-surface-container-low);
|
|
19
|
+
--md-comp-stat-shape: 16px;
|
|
20
|
+
--md-comp-stat-min-width: 160px;
|
|
21
|
+
|
|
22
|
+
display: grid;
|
|
23
|
+
grid-template-columns: repeat(auto-fit, minmax(min(100%, var(--md-comp-stat-min-width)), 1fr));
|
|
24
|
+
gap: 12px;
|
|
25
|
+
margin: $element-top-margin 0 $element-bottom-margin;
|
|
26
|
+
padding: 0;
|
|
27
|
+
|
|
28
|
+
> div {
|
|
29
|
+
display: flex;
|
|
30
|
+
flex-direction: column;
|
|
31
|
+
gap: 4px;
|
|
32
|
+
min-width: 0;
|
|
33
|
+
padding: 16px;
|
|
34
|
+
border-radius: var(--md-comp-stat-shape);
|
|
35
|
+
background-color: var(--md-comp-stat-container-color);
|
|
36
|
+
color: var(--md-sys-color-on-surface);
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
dt {
|
|
40
|
+
color: var(--md-sys-color-on-surface-variant);
|
|
41
|
+
@include typescale("title-small");
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
dd {
|
|
45
|
+
margin: 0;
|
|
46
|
+
overflow-wrap: anywhere;
|
|
47
|
+
font-variant-numeric: tabular-nums;
|
|
48
|
+
@include typescale("headline-large");
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
dd.stat-change {
|
|
52
|
+
display: inline-flex;
|
|
53
|
+
align-items: center;
|
|
54
|
+
gap: 4px;
|
|
55
|
+
color: var(--md-sys-color-on-surface-variant);
|
|
56
|
+
@include typescale("label-large");
|
|
57
|
+
|
|
58
|
+
&:is(.up, .down)::before {
|
|
59
|
+
content: "";
|
|
60
|
+
flex: none;
|
|
61
|
+
width: 18px;
|
|
62
|
+
height: 18px;
|
|
63
|
+
background-color: currentColor;
|
|
64
|
+
mask: $trend-arrow center / 18px no-repeat;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
&.down::before {
|
|
68
|
+
transform: rotate(180deg);
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
&.negative {
|
|
72
|
+
color: var(--md-sys-color-error);
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
@media (forced-colors: active) {
|
|
78
|
+
.stats > div {
|
|
79
|
+
outline: 1px solid CanvasText;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
.stats dd.stat-change::before {
|
|
83
|
+
forced-color-adjust: none;
|
|
84
|
+
background-color: CanvasText;
|
|
85
|
+
}
|
|
86
|
+
}
|
|
@@ -0,0 +1,190 @@
|
|
|
1
|
+
@use "../abstracts" as *;
|
|
2
|
+
|
|
3
|
+
// Stepper. An <ol class="stepper"> shows where the user is in a fixed
|
|
4
|
+
// sequence of steps, such as a checkout. Each <li> is a step; its text, or a
|
|
5
|
+
// link back to a finished step, is the label. The list numbers the steps.
|
|
6
|
+
//
|
|
7
|
+
// State is markup the page keeps current:
|
|
8
|
+
// aria-current="step" the step the user is on
|
|
9
|
+
// .complete a finished step: the number becomes a check
|
|
10
|
+
// .invalid a step that needs attention: the number becomes "!"
|
|
11
|
+
// The check and "!" are also spoken, through the alt text of the indicator;
|
|
12
|
+
// the two labels are tokens so a page can translate them.
|
|
13
|
+
//
|
|
14
|
+
// Each step is a small grid: indicator, label and connector on the first row,
|
|
15
|
+
// an optional <small> supporting line under the label, and in .vertical an
|
|
16
|
+
// optional .stepper-content panel under that.
|
|
17
|
+
//
|
|
18
|
+
// Tokens:
|
|
19
|
+
// --md-comp-stepper-indicator-size 24px
|
|
20
|
+
// --md-comp-stepper-connector-color outline-variant / complete: primary
|
|
21
|
+
// --md-comp-stepper-active-color primary
|
|
22
|
+
// --md-comp-stepper-complete-label "Completed"
|
|
23
|
+
// --md-comp-stepper-error-label "Error"
|
|
24
|
+
|
|
25
|
+
$_stepper-check: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M9.55 18 3.85 12.3l1.43-1.43 4.27 4.28 9.17-9.18 1.43 1.43z'/%3E%3C/svg%3E");
|
|
26
|
+
$_stepper-alert: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M11 14V6h2v8zm0 4v-2h2v2z'/%3E%3C/svg%3E");
|
|
27
|
+
|
|
28
|
+
.stepper {
|
|
29
|
+
--md-comp-stepper-indicator-size: 24px;
|
|
30
|
+
--md-comp-stepper-connector-color: var(--md-sys-color-outline-variant);
|
|
31
|
+
--md-comp-stepper-active-color: var(--md-sys-color-primary);
|
|
32
|
+
--md-comp-stepper-complete-label: "Completed";
|
|
33
|
+
--md-comp-stepper-error-label: "Error";
|
|
34
|
+
|
|
35
|
+
// Steps never squeeze below their label; a row too narrow for all of them
|
|
36
|
+
// wraps rather than overlapping. Use .vertical where that is the norm.
|
|
37
|
+
display: flex;
|
|
38
|
+
flex-wrap: wrap;
|
|
39
|
+
gap: 8px;
|
|
40
|
+
margin: $element-top-margin 0 $element-bottom-margin;
|
|
41
|
+
padding: 0;
|
|
42
|
+
list-style: none;
|
|
43
|
+
counter-reset: stepper;
|
|
44
|
+
|
|
45
|
+
> li {
|
|
46
|
+
display: grid;
|
|
47
|
+
flex: 1 1 auto;
|
|
48
|
+
grid-template-columns: auto auto minmax(16px, 1fr);
|
|
49
|
+
grid-template-rows: auto auto;
|
|
50
|
+
column-gap: 8px;
|
|
51
|
+
align-items: center;
|
|
52
|
+
margin: 0;
|
|
53
|
+
counter-increment: stepper;
|
|
54
|
+
color: var(--md-sys-color-on-surface-variant);
|
|
55
|
+
@include typescale("title-small");
|
|
56
|
+
|
|
57
|
+
// The number is already the list position, so it is not spoken again.
|
|
58
|
+
&::before {
|
|
59
|
+
content: counter(stepper) / "";
|
|
60
|
+
grid-column: 1;
|
|
61
|
+
grid-row: 1;
|
|
62
|
+
box-sizing: border-box;
|
|
63
|
+
display: inline-flex;
|
|
64
|
+
align-items: center;
|
|
65
|
+
justify-content: center;
|
|
66
|
+
width: var(--md-comp-stepper-indicator-size);
|
|
67
|
+
height: var(--md-comp-stepper-indicator-size);
|
|
68
|
+
border: 1px solid var(--md-sys-color-outline);
|
|
69
|
+
border-radius: 50%;
|
|
70
|
+
@include typescale("label-medium");
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
&::after {
|
|
74
|
+
content: "";
|
|
75
|
+
grid-column: 3;
|
|
76
|
+
grid-row: 1;
|
|
77
|
+
height: 1px;
|
|
78
|
+
min-width: 16px;
|
|
79
|
+
background-color: var(--md-comp-stepper-connector-color);
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
&:last-child {
|
|
83
|
+
flex: none;
|
|
84
|
+
|
|
85
|
+
&::after {
|
|
86
|
+
content: none;
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
// Supporting text may run under the connector rather than wrap word by word.
|
|
91
|
+
> small {
|
|
92
|
+
grid-column: 2 / -1;
|
|
93
|
+
grid-row: 2;
|
|
94
|
+
color: var(--md-sys-color-on-surface-variant);
|
|
95
|
+
@include typescale("body-small");
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
> a {
|
|
99
|
+
color: inherit;
|
|
100
|
+
border-radius: 4px;
|
|
101
|
+
text-decoration: underline;
|
|
102
|
+
text-underline-offset: 2px;
|
|
103
|
+
@include focus-visible;
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
> li[aria-current="step"] {
|
|
108
|
+
color: var(--md-sys-color-on-surface);
|
|
109
|
+
|
|
110
|
+
&::before {
|
|
111
|
+
border-color: var(--md-comp-stepper-active-color);
|
|
112
|
+
background-color: var(--md-comp-stepper-active-color);
|
|
113
|
+
color: var(--md-sys-color-on-primary);
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
// The glyph is knocked out of the filled circle, so it takes the color of
|
|
118
|
+
// whatever surface the stepper sits on.
|
|
119
|
+
> li:is(.complete, .invalid)::before {
|
|
120
|
+
border: 0;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
> li.complete {
|
|
124
|
+
--md-comp-stepper-connector-color: var(--md-comp-stepper-active-color);
|
|
125
|
+
|
|
126
|
+
color: var(--md-sys-color-on-surface);
|
|
127
|
+
|
|
128
|
+
&::before {
|
|
129
|
+
content: "" / var(--md-comp-stepper-complete-label);
|
|
130
|
+
background-color: var(--md-comp-stepper-active-color);
|
|
131
|
+
mask: $_stepper-check center / 18px no-repeat exclude, linear-gradient(#000 0 0);
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
> li.invalid {
|
|
136
|
+
color: var(--md-sys-color-error);
|
|
137
|
+
|
|
138
|
+
&::before {
|
|
139
|
+
content: "" / var(--md-comp-stepper-error-label);
|
|
140
|
+
background-color: var(--md-sys-color-error);
|
|
141
|
+
mask: $_stepper-alert center / 18px no-repeat exclude, linear-gradient(#000 0 0);
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
&.vertical {
|
|
146
|
+
flex-direction: column;
|
|
147
|
+
gap: 0;
|
|
148
|
+
|
|
149
|
+
> li {
|
|
150
|
+
flex: none;
|
|
151
|
+
grid-template-columns: auto minmax(0, 1fr);
|
|
152
|
+
grid-template-rows: auto auto 1fr;
|
|
153
|
+
|
|
154
|
+
> small {
|
|
155
|
+
grid-column: 2;
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
&::after {
|
|
159
|
+
grid-column: 1;
|
|
160
|
+
grid-row: 2 / -1;
|
|
161
|
+
justify-self: center;
|
|
162
|
+
width: 1px;
|
|
163
|
+
height: auto;
|
|
164
|
+
min-width: 0;
|
|
165
|
+
min-height: 16px;
|
|
166
|
+
margin-block: 4px;
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
&:last-child::after {
|
|
170
|
+
content: none;
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
> .stepper-content {
|
|
174
|
+
grid-column: 2;
|
|
175
|
+
grid-row: 3;
|
|
176
|
+
padding-block: 8px 16px;
|
|
177
|
+
color: var(--md-sys-color-on-surface-variant);
|
|
178
|
+
@include typescale("body-medium");
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
@media (forced-colors: active) {
|
|
185
|
+
.stepper > li:is([aria-current="step"], .complete, .invalid)::before {
|
|
186
|
+
forced-color-adjust: none;
|
|
187
|
+
background-color: Highlight;
|
|
188
|
+
color: HighlightText;
|
|
189
|
+
}
|
|
190
|
+
}
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
@use "../abstracts" as *;
|
|
2
|
+
|
|
3
|
+
// Timeline. An <ol class="timeline"> lists events in order, newest first or
|
|
4
|
+
// oldest first as the page decides. Each <li> is an event: an optional
|
|
5
|
+
// <time>, a heading and supporting text. A dot marks each event and a line
|
|
6
|
+
// joins it to the next.
|
|
7
|
+
//
|
|
8
|
+
// A leading icon as the first child replaces the dot with a tonal circle.
|
|
9
|
+
//
|
|
10
|
+
// Tokens:
|
|
11
|
+
// --md-comp-timeline-marker-color primary
|
|
12
|
+
// --md-comp-timeline-connector-color outline-variant
|
|
13
|
+
// --md-comp-timeline-gap 24px (between events)
|
|
14
|
+
|
|
15
|
+
.timeline {
|
|
16
|
+
--md-comp-timeline-marker-color: var(--md-sys-color-primary);
|
|
17
|
+
--md-comp-timeline-connector-color: var(--md-sys-color-outline-variant);
|
|
18
|
+
--md-comp-timeline-gap: 24px;
|
|
19
|
+
|
|
20
|
+
margin: $element-top-margin 0 $element-bottom-margin;
|
|
21
|
+
padding: 0;
|
|
22
|
+
list-style: none;
|
|
23
|
+
|
|
24
|
+
> li {
|
|
25
|
+
position: relative;
|
|
26
|
+
margin: 0;
|
|
27
|
+
padding-block-end: var(--md-comp-timeline-gap);
|
|
28
|
+
padding-inline-start: 32px;
|
|
29
|
+
color: var(--md-sys-color-on-surface);
|
|
30
|
+
|
|
31
|
+
// The dot sits level with the first line of text.
|
|
32
|
+
&::before {
|
|
33
|
+
content: "";
|
|
34
|
+
position: absolute;
|
|
35
|
+
inset-block-start: 4px;
|
|
36
|
+
inset-inline-start: 4px;
|
|
37
|
+
box-sizing: border-box;
|
|
38
|
+
width: 12px;
|
|
39
|
+
height: 12px;
|
|
40
|
+
border-radius: 50%;
|
|
41
|
+
background-color: var(--md-comp-timeline-marker-color);
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
&::after {
|
|
45
|
+
content: "";
|
|
46
|
+
position: absolute;
|
|
47
|
+
inset-block: 20px 0;
|
|
48
|
+
inset-inline-start: 9.5px;
|
|
49
|
+
width: 1px;
|
|
50
|
+
background-color: var(--md-comp-timeline-connector-color);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
&:last-child {
|
|
54
|
+
padding-block-end: 0;
|
|
55
|
+
|
|
56
|
+
&::after {
|
|
57
|
+
content: none;
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
> time {
|
|
62
|
+
display: block;
|
|
63
|
+
color: var(--md-sys-color-on-surface-variant);
|
|
64
|
+
@include typescale("label-medium");
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
> :is(h1, h2, h3, h4, h5, h6) {
|
|
68
|
+
margin: 0;
|
|
69
|
+
@include typescale("title-small");
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
> p {
|
|
73
|
+
margin: 4px 0 0;
|
|
74
|
+
color: var(--md-sys-color-on-surface-variant);
|
|
75
|
+
@include typescale("body-medium");
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
// A leading icon takes the dot's place in a 32px tonal circle.
|
|
80
|
+
> li:has(> #{$icon}:first-child) {
|
|
81
|
+
padding-inline-start: 48px;
|
|
82
|
+
|
|
83
|
+
&::before {
|
|
84
|
+
content: none;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
&::after {
|
|
88
|
+
inset-block-start: 36px;
|
|
89
|
+
inset-inline-start: 15.5px;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
> #{$icon}:first-child {
|
|
93
|
+
position: absolute;
|
|
94
|
+
inset-block-start: 0;
|
|
95
|
+
inset-inline-start: 0;
|
|
96
|
+
display: inline-flex;
|
|
97
|
+
align-items: center;
|
|
98
|
+
justify-content: center;
|
|
99
|
+
width: 32px;
|
|
100
|
+
height: 32px;
|
|
101
|
+
border-radius: 50%;
|
|
102
|
+
background-color: var(--md-sys-color-secondary-container);
|
|
103
|
+
color: var(--md-sys-color-on-secondary-container);
|
|
104
|
+
font-size: 18px;
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
@media (forced-colors: active) {
|
|
110
|
+
.timeline > li::before {
|
|
111
|
+
forced-color-adjust: none;
|
|
112
|
+
background-color: CanvasText;
|
|
113
|
+
}
|
|
114
|
+
}
|
|
@@ -101,7 +101,7 @@ input[type=text]:is(.timepicker-input-minutes, .time-picker-input-minutes) {
|
|
|
101
101
|
:is(.timepicker-container, .time-picker-container) .pm-btn {
|
|
102
102
|
width: 3.6rem;
|
|
103
103
|
height: 50%;
|
|
104
|
-
// --btn-padding is a
|
|
104
|
+
// --btn-padding is a retired variable that no longer exists, so this
|
|
105
105
|
// was invalid at computed-value time and the padding resolved to 0 - not
|
|
106
106
|
// to the base button's inline space, which the invalid declaration still
|
|
107
107
|
// beat in the cascade. Written as the 0 it has always rendered as.
|
|
@@ -278,7 +278,7 @@ input[type=text]:is(.timepicker-input-minutes, .time-picker-input-minutes) {
|
|
|
278
278
|
:is(.timepicker-container, .time-picker-container) .pm-btn {
|
|
279
279
|
flex-grow: 1;
|
|
280
280
|
/*width: auto;*/
|
|
281
|
-
// Same two
|
|
281
|
+
// Same two retired variables as above; both declarations
|
|
282
282
|
// rendered as 0. The corner rules that follow square off the inner
|
|
283
283
|
// edges, so the outer ones are the only radius in play.
|
|
284
284
|
padding-inline: 0;
|
|
@@ -57,7 +57,7 @@
|
|
|
57
57
|
// already, in $_bar.
|
|
58
58
|
$_toolbar: ".toolbar";
|
|
59
59
|
|
|
60
|
-
// The two axes. `.max` is
|
|
60
|
+
// The two axes. `.max` is an alias for docked; `.filled` is the older
|
|
61
61
|
// name for vibrant. Both stay in the :is() lists.
|
|
62
62
|
$_floating: "#{$_toolbar}:is(.floating, :not(.docked, .max))";
|
|
63
63
|
$_docked: "#{$_toolbar}:is(.docked, .max)";
|
|
@@ -87,6 +87,7 @@ $_vibrant: "#{$_toolbar}:is(.vibrant, .filled)";
|
|
|
87
87
|
border-radius: var(--md-comp-toolbar-container-shape);
|
|
88
88
|
background-color: var(--md-comp-toolbar-container-color);
|
|
89
89
|
color: var(--md-comp-toolbar-color);
|
|
90
|
+
@include glass(var(--md-comp-toolbar-container-color));
|
|
90
91
|
|
|
91
92
|
& + & {
|
|
92
93
|
margin-block-start: 16px;
|
|
@@ -41,6 +41,7 @@
|
|
|
41
41
|
overflow-wrap: anywhere;
|
|
42
42
|
pointer-events: auto;
|
|
43
43
|
z-index: 2000;
|
|
44
|
+
@include glass(var(--md-comp-plain-tooltip-container-color));
|
|
44
45
|
}
|
|
45
46
|
|
|
46
47
|
// CSS-only: a child of the activator. Default sits above (M3 preferred).
|
|
@@ -137,6 +138,7 @@ body > .tooltip {
|
|
|
137
138
|
white-space: normal;
|
|
138
139
|
pointer-events: auto;
|
|
139
140
|
@include z-depth("2");
|
|
141
|
+
@include glass(var(--md-comp-rich-tooltip-container-color));
|
|
140
142
|
|
|
141
143
|
> :is(h1, h2, h3, h4, h5, h6) {
|
|
142
144
|
margin: 0;
|
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
@use "../abstracts" as *;
|
|
2
|
+
|
|
3
|
+
// Tree. A <ul class="tree"> of nested lists, for file browsers and deep
|
|
4
|
+
// navigation. A branch is an <li> holding a <details>: its <summary> is the
|
|
5
|
+
// row and its nested <ul> the children. A leaf is an <li> holding a link or
|
|
6
|
+
// a span. aria-current marks the selected row.
|
|
7
|
+
//
|
|
8
|
+
// It is a set of disclosures and links, not role="tree": every row is a Tab
|
|
9
|
+
// stop and the browser owns opening a branch. A tree role would promise
|
|
10
|
+
// arrow-key navigation that native disclosures do not provide.
|
|
11
|
+
//
|
|
12
|
+
// Tokens:
|
|
13
|
+
// --md-comp-tree-row-height 40px
|
|
14
|
+
// --md-comp-tree-row-shape 100px (pill)
|
|
15
|
+
// --md-comp-tree-guide-color outline-variant
|
|
16
|
+
// --md-comp-tree-selected-container-color secondary-container
|
|
17
|
+
|
|
18
|
+
$_tree-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");
|
|
19
|
+
|
|
20
|
+
.tree {
|
|
21
|
+
--md-comp-tree-row-height: 40px;
|
|
22
|
+
--md-comp-tree-row-shape: 100px;
|
|
23
|
+
--md-comp-tree-guide-color: var(--md-sys-color-outline-variant);
|
|
24
|
+
--md-comp-tree-selected-container-color: var(--md-sys-color-secondary-container);
|
|
25
|
+
|
|
26
|
+
margin: $element-top-margin 0 $element-bottom-margin;
|
|
27
|
+
padding: 0;
|
|
28
|
+
list-style: none;
|
|
29
|
+
color: var(--md-sys-color-on-surface-variant);
|
|
30
|
+
|
|
31
|
+
// Each level hangs a guide line from the centre of its parent's chevron
|
|
32
|
+
// (12px inset + half the 20px chevron) and indents past it.
|
|
33
|
+
ul {
|
|
34
|
+
margin: 0;
|
|
35
|
+
margin-inline-start: 22px;
|
|
36
|
+
padding: 0;
|
|
37
|
+
padding-inline-start: 6px;
|
|
38
|
+
border-inline-start: 1px solid var(--md-comp-tree-guide-color);
|
|
39
|
+
list-style: none;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
li {
|
|
43
|
+
margin: 0;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
li > :is(a, span),
|
|
47
|
+
li > details > summary {
|
|
48
|
+
box-sizing: border-box;
|
|
49
|
+
display: flex;
|
|
50
|
+
align-items: center;
|
|
51
|
+
gap: 8px;
|
|
52
|
+
min-height: var(--md-comp-tree-row-height);
|
|
53
|
+
padding-inline: 12px 16px;
|
|
54
|
+
border-radius: var(--md-comp-tree-row-shape);
|
|
55
|
+
color: inherit;
|
|
56
|
+
text-decoration: none;
|
|
57
|
+
@include typescale("label-large");
|
|
58
|
+
|
|
59
|
+
> #{$icon} {
|
|
60
|
+
flex: none;
|
|
61
|
+
font-size: 20px;
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
// A leaf lines its text up with a branch's text, after the chevron.
|
|
66
|
+
li > :is(a, span) {
|
|
67
|
+
padding-inline-start: calc(12px + 20px + 8px);
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
li > a,
|
|
71
|
+
li > details > summary {
|
|
72
|
+
cursor: pointer;
|
|
73
|
+
@include focus-visible;
|
|
74
|
+
|
|
75
|
+
&:hover {
|
|
76
|
+
background-color: color-mix(
|
|
77
|
+
in oklab,
|
|
78
|
+
var(--md-sys-color-on-surface) state-opacity("hover"),
|
|
79
|
+
transparent
|
|
80
|
+
);
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
li > details > summary {
|
|
85
|
+
list-style: none;
|
|
86
|
+
user-select: none;
|
|
87
|
+
|
|
88
|
+
&::-webkit-details-marker {
|
|
89
|
+
display: none;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
// Points to the end edge while closed and down once open.
|
|
93
|
+
&::before {
|
|
94
|
+
content: "";
|
|
95
|
+
flex: none;
|
|
96
|
+
width: 20px;
|
|
97
|
+
height: 20px;
|
|
98
|
+
background-color: currentColor;
|
|
99
|
+
mask: $_tree-chevron center / 20px no-repeat;
|
|
100
|
+
transform: rotate(-90deg);
|
|
101
|
+
transition: transform 150ms ease-out;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
&:dir(rtl)::before {
|
|
105
|
+
transform: rotate(90deg);
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
li > details[open] > summary::before {
|
|
110
|
+
transform: none;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
:is(li > a, li > span, li > details > summary)[aria-current]:not([aria-current="false"]) {
|
|
114
|
+
background-color: var(--md-comp-tree-selected-container-color);
|
|
115
|
+
color: var(--md-sys-color-on-secondary-container);
|
|
116
|
+
|
|
117
|
+
> #{$icon} {
|
|
118
|
+
--md-icon-fill: 1;
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
@media (prefers-reduced-motion: reduce) {
|
|
123
|
+
li > details > summary::before {
|
|
124
|
+
transition: none;
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
@media (forced-colors: active) {
|
|
129
|
+
li > details > summary::before {
|
|
130
|
+
forced-color-adjust: none;
|
|
131
|
+
background-color: CanvasText;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
[aria-current]:not([aria-current="false"]) {
|
|
135
|
+
outline: 2px solid Highlight;
|
|
136
|
+
outline-offset: -2px;
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
}
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
//
|
|
5
5
|
// Anatomy is the HTML. A <label> wrapping <input type="checkbox"> is
|
|
6
6
|
// the control. The label text is a sibling of the input — no extra class,
|
|
7
|
-
// no required <span>. input + span still works (legacy /
|
|
7
|
+
// no required <span>. input + span still works (legacy / Select).
|
|
8
8
|
// label.switch is a switch, not a checkbox — leave it alone.
|
|
9
9
|
//
|
|
10
10
|
// Tokens follow https://m3.material.io/components/checkbox/specs
|
|
@@ -206,7 +206,7 @@ label:has(> [type="checkbox"]:disabled):not(.switch),
|
|
|
206
206
|
cursor: default;
|
|
207
207
|
}
|
|
208
208
|
|
|
209
|
-
// Legacy /
|
|
209
|
+
// Legacy / Select / Autocomplete: input + span draws the same
|
|
210
210
|
// 18dp anatomy. Exclude .switch — that file paints the track on a span.
|
|
211
211
|
$_cb-span: "*:not(.switch) > [type='checkbox'] + span:not(.lever, .supporting-text, .character-counter, .file-path)";
|
|
212
212
|
|