@nxgt/material 3.10.2 → 3.12.0
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 +96 -0
- package/README.md +10 -11
- package/dist/{async-slice-DDjaJY_F.js → async-slice-4qbER86I.js} +1 -1
- package/dist/button-BNjw-pnE.js +327 -0
- package/dist/button-group-context-CaP0X5p_.js +5 -0
- package/dist/{button-tones-BgZJ1tkD.js → button-tones-BwuVvAmd.js} +9 -1
- package/dist/{callout-view-DdJPdFrP.js → callout-view-C6voDS00.js} +1 -1
- package/dist/charts.js +5 -5
- package/dist/{chip-DpySRqCy.js → chip-DLgQTJBZ.js} +4 -4
- package/dist/{code-editor-BiA14xua.js → code-editor-BZbaYLvo.js} +8 -8
- package/dist/code-editor.js +7 -7
- package/dist/{code-language-items-C_dJ6GVs.js → code-language-items-BT5BO5w6.js} +2 -2
- package/dist/components/base.css +21 -6
- package/dist/components/components.css +6 -2
- package/dist/components/type-scale.css +194 -0
- package/dist/components/ui/actions/button/button.css +156 -0
- package/dist/components/ui/actions/button-group/button-group-standard.css +131 -0
- package/dist/components/ui/actions/button-group/button-group.css +4 -1
- package/dist/components/ui/actions/icon-button/icon-button.css +115 -0
- package/dist/components/ui/actions/morph-fill.css +62 -0
- package/dist/components/ui/feedback/toast/toast-expressive.css +17 -0
- package/dist/components/ui/layout/app-shell/activity-backdrop-shapes.css +49 -0
- package/dist/components/ui/layout/app-shell/activity-backdrop.css +0 -17
- package/dist/components/ui/layout/sidebar/sidebar-tokens.css +7 -2
- package/dist/{components-BkF9N-Yx.js → components-yx1t_5_P.js} +13740 -13422
- package/dist/components.js +24 -24
- package/dist/{dialog-CkIYpJXk.js → dialog-BQp5IdFl.js} +147 -147
- package/dist/dnd.js +1 -1
- package/dist/{dropdown-menu-BC5Tbhb9.js → dropdown-menu-BsH9W_3C.js} +3 -3
- package/dist/editor-viewer.js +1 -1
- package/dist/editor.js +13 -13
- package/dist/{empty-state-SeAg2TOX.js → empty-state-WaU4-T2c.js} +5 -5
- package/dist/escape-owner-C4W_sOAU.js +116 -0
- package/dist/{field-blur-DPLsMufs.js → field-blur-CJHzVSh9.js} +1 -1
- package/dist/{field-blur-context-1ZwJgsHE.js → field-blur-context-Cft9s7Hg.js} +2 -2
- package/dist/{hover-card-Cox-tPDz.js → hover-card-C0fw2kLK.js} +72 -71
- package/dist/i18n.js +12 -12
- package/dist/{icon-badge-q3Ve8gra.js → icon-badge-DUAq9f7H.js} +4 -4
- package/dist/icon-button-ifTpXt0A.js +355 -0
- package/dist/{illustration-BfHRpVzM.js → illustration-BmQmvW_4.js} +1 -1
- package/dist/illustrations.js +2 -2
- package/dist/lib/components/ui/actions/button/button-tones.d.ts +16 -0
- package/dist/lib/components/ui/actions/button/button.d.ts +13 -0
- package/dist/lib/components/ui/actions/button/button.variants.d.ts +4 -3
- package/dist/lib/components/ui/actions/button-group/button-group-context.d.ts +16 -0
- package/dist/lib/components/ui/actions/button-group/button-group-reset.d.ts +13 -0
- package/dist/lib/components/ui/actions/button-group/button-group.d.ts +19 -2
- package/dist/lib/components/ui/actions/icon-button/icon-button-shape.d.ts +3 -2
- package/dist/lib/components/ui/actions/icon-button/icon-button.d.ts +18 -4
- package/dist/lib/components/ui/actions/icon-button/icon-button.variants.d.ts +34 -4
- package/dist/lib/components/ui/display/badge/badge.d.ts +7 -2
- package/dist/lib/components/ui/display/entity-header/entity-header.d.ts +9 -1
- package/dist/lib/components/ui/display/entity-header/entity-stats.d.ts +16 -0
- package/dist/lib/components/ui/display/entity-header/partials/entity-header-actions.d.ts +6 -0
- package/dist/lib/components/ui/display/entity-header/partials/entity-header-body.d.ts +14 -0
- package/dist/lib/components/ui/display/entity-header/partials/entity-header-icon.d.ts +6 -0
- package/dist/lib/components/ui/display/entity-header/partials/shown.d.ts +2 -0
- package/dist/lib/components/ui/display/list-tile/list-tile.d.ts +8 -1
- package/dist/lib/components/ui/display/list-tile/partials/list-tile-body.d.ts +2 -1
- package/dist/lib/components/ui/display/stat-card/index.d.ts +1 -1
- package/dist/lib/components/ui/display/stat-card/partials/stat-card-compact.d.ts +12 -0
- package/dist/lib/components/ui/display/stat-card/stat-card-classes.d.ts +3 -2
- package/dist/lib/components/ui/display/stat-card/stat-card.d.ts +2 -2
- package/dist/lib/components/ui/display/stat-card/types.d.ts +9 -0
- package/dist/lib/components/ui/feedback/alert/alert-variants.d.ts +18 -0
- package/dist/lib/components/ui/feedback/alert/alert.d.ts +2 -6
- package/dist/lib/components/ui/feedback/typing-indicator/typing-indicator.d.ts +1 -1
- package/dist/lib/components/ui/fields/slider/split-slider-props.d.ts +1 -1
- package/dist/lib/components/ui/fields/slider/use-slider-control.d.ts +1 -1
- package/dist/lib/components/ui/layout/app-shell/activity-column.d.ts +17 -0
- package/dist/lib/components/ui/layout/app-shell/activity-layout.d.ts +3 -106
- package/dist/lib/components/ui/layout/app-shell/activity-layout.types.d.ts +113 -0
- package/dist/lib/components/ui/layout/app-shell/app-breadcrumb.d.ts +2 -1
- package/dist/lib/components/ui/layout/app-shell/app-sidebar-icon-item.d.ts +13 -0
- package/dist/lib/components/ui/layout/app-shell/app-sidebar-label-item.d.ts +11 -0
- package/dist/lib/components/ui/layout/app-shell/keep-shapes-inside.d.ts +6 -0
- package/dist/lib/components/ui/layout/app-shell/observe-layout.d.ts +11 -0
- package/dist/lib/components/ui/layout/app-shell/shape-units.d.ts +16 -0
- package/dist/lib/components/ui/layout/app-shell/shapes-clear-content.d.ts +13 -0
- package/dist/lib/components/ui/layout/app-shell/types.d.ts +10 -0
- package/dist/lib/components/ui/layout/app-shell/use-keep-shapes-inside.d.ts +14 -0
- package/dist/lib/components/ui/layout/app-shell/watch-content.d.ts +19 -0
- package/dist/lib/components/ui/overlays/dialog/dialog-variants.d.ts +1 -1
- package/dist/lib/components/ui/primitives/toggle/toggle.d.ts +1 -1
- package/dist/lib/components/ui/primitives/typography/typography.d.ts +17 -7
- package/dist/lib/components/ui/primitives/typography/typography.variants.d.ts +55 -0
- package/dist/lib/components/ui/selection/choice-group/use-choice-group-field.d.ts +2 -2
- package/dist/lib/components/ui/tones.d.ts +1 -1
- package/dist/lib/i18n/translator.d.ts +1 -1
- package/dist/lib.js +2 -2
- package/dist/{line-path-BQeLQZ-P.js → line-path-C5pZGC49.js} +1 -1
- package/dist/main.js +29 -29
- package/dist/map.js +9 -9
- package/dist/material.css +1 -1
- package/dist/pdf-reader.js +1 -1
- package/dist/print.js +1 -1
- package/dist/{public-CtpsxV4I.js → public-B0Nq_yYV.js} +524 -524
- package/dist/{render-json-DyFYFIkZ.js → render-json-BOhvPnSv.js} +1 -1
- package/dist/{rich-code-block-C2Fp_FDU.js → rich-code-block-v7WmeZp9.js} +5 -5
- package/dist/{rich-text-viewer-LO1IZCWs.js → rich-text-viewer-W15XIwah.js} +2 -2
- package/dist/{skeleton-Bmp4gWAH.js → skeleton-DSdtr2qc.js} +1 -1
- package/dist/{sortable-provider-pVaEZzty.js → sortable-provider-CgDTolQR.js} +3 -3
- package/dist/{spinner-CsHcmcpF.js → spinner-BtSIYVrC.js} +3 -3
- package/dist/{state-scenes-SGNyZjTz.js → state-scenes-BX03WmSu.js} +1 -1
- package/dist/styles.css +2 -0
- package/dist/theme-picker.js +3 -3
- package/dist/{theme-toggle-oU-fh6WE.js → theme-toggle-B2Pehdhn.js} +2 -2
- package/dist/{toggle-group-j8zaxEg1.js → toggle-group-BMJNcFAC.js} +1 -1
- package/dist/{toolbar-items-CqHvlTU8.js → toolbar-items-rUHdVqAq.js} +399 -398
- package/dist/{tooltip-rhbqNmr3.js → tooltip-CkttDIab.js} +1 -1
- package/dist/{translate-material-CGZljjp1.js → translate-material-Bd_KgfB8.js} +1 -1
- package/dist/{translator-DCYO4Ij3.js → translator-Dje8HrNz.js} +5 -5
- package/dist/{use-chat-composer-nWWfVyrK.js → use-chat-composer-B0_STpQN.js} +4173 -4173
- package/dist/{use-material-translation-DkxcLbLM.js → use-material-translation-B3V_bz-5.js} +1 -1
- package/dist/{utils-Bcd2Z3ea.js → utils-BLfntITJ.js} +14 -1
- package/docs/components/buttons-and-actions.md +64 -15
- package/docs/components/data-display.md +40 -9
- package/docs/components/feedback-and-status.md +12 -1
- package/docs/components/navigation-and-layout.md +4 -3
- package/docs/components/primitives.md +52 -10
- package/docs/guides/app-shell.md +52 -8
- package/docs/guides/backgrounds.md +2 -0
- package/docs/guides/theming.md +55 -3
- package/docs/previews/buttons-actions-button.webp +0 -0
- package/docs/previews/buttons-actions-iconbutton.webp +0 -0
- package/docs/previews/data-display-badge.webp +0 -0
- package/docs/previews/data-display-entityheader.webp +0 -0
- package/docs/previews/data-display-listtile.webp +0 -0
- package/docs/previews/data-display-statcard.webp +0 -0
- package/docs/previews/feedback-status-banner.webp +0 -0
- package/docs/previews/navigation-layout-appshell-footer-icon.webp +0 -0
- package/docs/previews/navigation-layout-appshell-menu-badge.webp +0 -0
- package/docs/previews/navigation-layout-appshell.webp +0 -0
- package/docs/previews/navigation-layout-sidebar.webp +0 -0
- package/docs/previews/primitives-typography.webp +0 -0
- package/docs/roadmap.md +53 -4
- package/docs/troubleshooting.md +75 -4
- package/lib/components/base.css +21 -6
- package/lib/components/components.css +6 -2
- package/lib/components/type-scale.css +194 -0
- package/lib/components/ui/actions/button/button.css +156 -0
- package/lib/components/ui/actions/button-group/button-group-standard.css +131 -0
- package/lib/components/ui/actions/button-group/button-group.css +4 -1
- package/lib/components/ui/actions/icon-button/icon-button.css +115 -0
- package/lib/components/ui/actions/morph-fill.css +62 -0
- package/lib/components/ui/feedback/toast/toast-expressive.css +17 -0
- package/lib/components/ui/layout/app-shell/activity-backdrop-shapes.css +49 -0
- package/lib/components/ui/layout/app-shell/activity-backdrop.css +0 -17
- package/lib/components/ui/layout/sidebar/sidebar-tokens.css +7 -2
- package/lib/styles.css +2 -0
- package/package.json +2 -1
- package/dist/button-DbfdITBB.js +0 -322
- package/dist/components/ui/actions/icon-button/icon-button-morph-media.css +0 -65
- package/dist/components/ui/actions/icon-button/icon-button-morph.css +0 -152
- package/dist/escape-owner-CripBce_.js +0 -57
- package/dist/icon-button-DJcWpIhu.js +0 -319
- package/lib/components/ui/actions/icon-button/icon-button-morph-media.css +0 -65
- package/lib/components/ui/actions/icon-button/icon-button-morph.css +0 -152
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
/* IconButton on the shared Button look (button.css: radius from the height,
|
|
2
|
+
* press morph, 2px focus outline, disabled fill, 44px hit area; morph-fill.css:
|
|
3
|
+
* the selected fill). This file is what is IconButton's own:
|
|
4
|
+
*
|
|
5
|
+
* - a toggle (`aria-pressed`, `data-morph`): `pill` widens by `--ib-morph`
|
|
6
|
+
* (14px from 600px wide, none below, where only the colour changes), `round`
|
|
7
|
+
* stays a circle; both stay round when selected and square when pressed;
|
|
8
|
+
* `none` has no `data-morph` and keeps the look its classes give it. The
|
|
9
|
+
* widening is the host's own width, which springs on `spatial-fast`.
|
|
10
|
+
* - a disabled icon's line (`stroke`) is as dim as its text (the outlined variant's
|
|
11
|
+
* inset line is Button's, button.css and morph-fill.css clear it).
|
|
12
|
+
*
|
|
13
|
+
* A shaped IconButton (`data-shape`, an expressive shape) and a Toolbar item
|
|
14
|
+
* keep their own looks: they have no `nxgt-btn`, or are excluded below. */
|
|
15
|
+
@layer utilities {
|
|
16
|
+
/* A selected toggle stays round (the pill or the circle is its other shape). */
|
|
17
|
+
[data-icon-button][data-morph] {
|
|
18
|
+
--btn-flip: var(--btn-round);
|
|
19
|
+
}
|
|
20
|
+
@media (min-width: 600px) {
|
|
21
|
+
[data-icon-button][data-morph="pill"] {
|
|
22
|
+
--ib-morph: 14px;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
[data-icon-button][data-morph="pill"][data-selected]:not(
|
|
26
|
+
.nxgt-toolbar-item,
|
|
27
|
+
[data-toolbar-item]
|
|
28
|
+
) {
|
|
29
|
+
width: calc(var(--btn-h) * var(--ib-k, 1) + var(--ib-morph, 0px));
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
/* Pressed, the corners squeeze; a selected toggle too (button.css sends it
|
|
33
|
+
* back to the rest radius, which for a toggle is the shape it already has). */
|
|
34
|
+
[data-icon-button][data-morph][data-selected]:is(:active, .is-press):not(
|
|
35
|
+
:disabled,
|
|
36
|
+
[aria-busy="true"]
|
|
37
|
+
) {
|
|
38
|
+
--btn-rad: var(--btn-square);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
/* Selected: the fill replaces the line, the icon's line follows the text. */
|
|
42
|
+
[data-icon-button][data-selected]:not(.nxgt-toolbar-item, [data-toolbar-item])
|
|
43
|
+
svg {
|
|
44
|
+
stroke: var(--morph-on-fg, var(--color-primary-foreground));
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
/* Disabled: the line of the icon as dim as its text. */
|
|
48
|
+
[data-icon-button]:disabled:is(
|
|
49
|
+
[data-variant="filled"],
|
|
50
|
+
[data-variant="tonal"],
|
|
51
|
+
[data-variant="outlined"],
|
|
52
|
+
[data-variant="link"],
|
|
53
|
+
[data-variant="ghost"]:is(
|
|
54
|
+
[data-color="secondary"],
|
|
55
|
+
[data-color="success"],
|
|
56
|
+
[data-color="info"],
|
|
57
|
+
[data-color="warning"],
|
|
58
|
+
[data-color="error"]
|
|
59
|
+
)
|
|
60
|
+
):not(.nxgt-toolbar-item, [data-toolbar-item]) svg {
|
|
61
|
+
stroke: color-mix(in oklab, var(--color-foreground) 40%, transparent);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
/* An IconButton slotted into a Toolbar (`data-toolbar-item`, ToolbarItemSlot)
|
|
65
|
+
* has no `.nxgt-toolbar-item` rules of its own: it keeps the Toolbar's
|
|
66
|
+
* focus outline and a dimmed disabled look, which the shared rules leave out. */
|
|
67
|
+
[data-icon-button][data-toolbar-item]:focus-visible {
|
|
68
|
+
outline: 2px solid var(--tb-focus, var(--color-primary-text));
|
|
69
|
+
outline-offset: 2px;
|
|
70
|
+
}
|
|
71
|
+
[data-icon-button][data-toolbar-item]:disabled {
|
|
72
|
+
opacity: 0.4;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
/* Reduced motion: colour and fill only. The widening is instant and a
|
|
76
|
+
* pressed toggle keeps its shape. */
|
|
77
|
+
@media (prefers-reduced-motion: reduce) {
|
|
78
|
+
[data-icon-button][data-morph]:not(
|
|
79
|
+
.nxgt-toolbar-item,
|
|
80
|
+
[data-toolbar-item]
|
|
81
|
+
) {
|
|
82
|
+
transition:
|
|
83
|
+
background-color var(--nxgt-motion-effects-fast-duration)
|
|
84
|
+
var(--nxgt-motion-effects-fast),
|
|
85
|
+
color var(--nxgt-motion-effects-fast-duration)
|
|
86
|
+
var(--nxgt-motion-effects-fast);
|
|
87
|
+
}
|
|
88
|
+
[data-icon-button][data-morph][data-selected]:is(:active, .is-press):not(
|
|
89
|
+
:disabled,
|
|
90
|
+
[aria-busy="true"]
|
|
91
|
+
) {
|
|
92
|
+
--btn-rad: var(--btn-flip);
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
/* Forced colours (the selected toggle is morph-fill.css's). */
|
|
97
|
+
@media (forced-colors: active) {
|
|
98
|
+
/* The outlined line is an inset shadow, which forced colours remove. */
|
|
99
|
+
[data-icon-button][data-variant="outlined"]:not(
|
|
100
|
+
.nxgt-toolbar-item,
|
|
101
|
+
[data-toolbar-item],
|
|
102
|
+
:disabled,
|
|
103
|
+
:focus-visible
|
|
104
|
+
) {
|
|
105
|
+
outline: 1.5px solid ButtonText;
|
|
106
|
+
outline-offset: -1.5px;
|
|
107
|
+
}
|
|
108
|
+
[data-icon-button]:focus-visible:not(
|
|
109
|
+
.nxgt-toolbar-item,
|
|
110
|
+
[data-toolbar-item]
|
|
111
|
+
) {
|
|
112
|
+
outline-color: Highlight;
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
/* The fill of a selected morph control, shared (#1106: it was copied into
|
|
2
|
+
* Toolbar, IconButton and RichChatComposer). A host with the class
|
|
3
|
+
* `nxgt-morph-fill` and `data-selected` is filled with `--morph-on` and reads
|
|
4
|
+
* `--morph-on-fg` on it; its colour sets both (`toneVars`, button-tones.ts).
|
|
5
|
+
* Button and IconButton use it; the toggle's shape change is the host's own
|
|
6
|
+
* (button.css, icon-button.css); Toolbar items keep the Toolbar's own fill.
|
|
7
|
+
* A ghost control without a `color` (no `data-color`) is neutral when selected
|
|
8
|
+
* too, for Button and IconButton alike: a 12 % tint of the text colour, label
|
|
9
|
+
* and icon in full text colour (primary only with a `color`).
|
|
10
|
+
* Doubled class: it must beat the colour
|
|
11
|
+
* utilities of the variant (`bg-primary`, `hover:bg-…`). */
|
|
12
|
+
@layer utilities {
|
|
13
|
+
.nxgt-morph-fill[data-variant="ghost"]:not([data-color]) {
|
|
14
|
+
--morph-on: color-mix(in oklab, var(--color-foreground) 12%, transparent);
|
|
15
|
+
--morph-on-fg: var(--color-foreground);
|
|
16
|
+
}
|
|
17
|
+
.nxgt-morph-fill.nxgt-morph-fill[data-selected]:not(
|
|
18
|
+
.nxgt-toolbar-item,
|
|
19
|
+
[data-toolbar-item]
|
|
20
|
+
) {
|
|
21
|
+
background-color: var(--morph-on, var(--color-primary));
|
|
22
|
+
color: var(--morph-on-fg, var(--color-primary-foreground));
|
|
23
|
+
box-shadow: none;
|
|
24
|
+
}
|
|
25
|
+
.nxgt-morph-fill.nxgt-morph-fill[data-selected]:not(
|
|
26
|
+
.nxgt-toolbar-item,
|
|
27
|
+
[data-toolbar-item]
|
|
28
|
+
)
|
|
29
|
+
svg {
|
|
30
|
+
color: var(--morph-on-fg, var(--color-primary-foreground));
|
|
31
|
+
}
|
|
32
|
+
.nxgt-morph-fill.nxgt-morph-fill[data-selected]:not(
|
|
33
|
+
.nxgt-toolbar-item,
|
|
34
|
+
[data-toolbar-item]
|
|
35
|
+
):hover:not(:disabled) {
|
|
36
|
+
background-color: color-mix(
|
|
37
|
+
in oklab,
|
|
38
|
+
var(--morph-on-fg, var(--color-primary-foreground)) 10%,
|
|
39
|
+
var(--morph-on, var(--color-primary))
|
|
40
|
+
);
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
/* Forced colours: the selected control is the system's selected item. */
|
|
44
|
+
@media (forced-colors: active) {
|
|
45
|
+
.nxgt-morph-fill.nxgt-morph-fill[data-selected]:not(
|
|
46
|
+
.nxgt-toolbar-item,
|
|
47
|
+
[data-toolbar-item]
|
|
48
|
+
) {
|
|
49
|
+
background-color: SelectedItem;
|
|
50
|
+
color: SelectedItemText;
|
|
51
|
+
forced-color-adjust: none;
|
|
52
|
+
}
|
|
53
|
+
.nxgt-morph-fill.nxgt-morph-fill[data-selected]:not(
|
|
54
|
+
.nxgt-toolbar-item,
|
|
55
|
+
[data-toolbar-item]
|
|
56
|
+
)
|
|
57
|
+
svg {
|
|
58
|
+
color: SelectedItemText;
|
|
59
|
+
stroke: SelectedItemText;
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
}
|
|
@@ -107,6 +107,23 @@
|
|
|
107
107
|
gap: 8px;
|
|
108
108
|
margin-inline-start: auto;
|
|
109
109
|
}
|
|
110
|
+
/* A stacked toast behind the front one (`data-expanded="false"`,
|
|
111
|
+
* `data-front="false"`) sits under it, scaled and offset by a few pixels:
|
|
112
|
+
* its buttons are covered, so a tap lands on the front toast, and a covered,
|
|
113
|
+
* scaled close button fails axe's `target-size` (#1480). Its buttons are
|
|
114
|
+
* hidden until the stack opens (sonner opens it on hover, not on focus) or
|
|
115
|
+
* focus is inside the toaster, so a Tab from the front toast still reaches
|
|
116
|
+
* them. Sonner's own `opacity: 0` for these does not apply to our unstyled
|
|
117
|
+
* (`data-styled="false"`) toasts. */
|
|
118
|
+
[data-sonner-toast][data-expanded="false"][data-front="false"]
|
|
119
|
+
.nxgt-toast-buttons {
|
|
120
|
+
visibility: hidden;
|
|
121
|
+
}
|
|
122
|
+
[data-sonner-toaster]:focus-within
|
|
123
|
+
[data-sonner-toast][data-expanded="false"][data-front="false"]
|
|
124
|
+
.nxgt-toast-buttons {
|
|
125
|
+
visibility: visible;
|
|
126
|
+
}
|
|
110
127
|
.nxgt-toast-title {
|
|
111
128
|
color: var(--toast-fg);
|
|
112
129
|
}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
/* Which shapes of the backdrop show (observe-layout.ts, watch-content.ts).
|
|
2
|
+
* Plain CSS in `@layer components`, beside activity-backdrop.css. */
|
|
3
|
+
@layer components {
|
|
4
|
+
/* The theme's backdrop keeps its shapes whole (keep-shapes-inside.ts):
|
|
5
|
+
* the scene waits for the first pass, then a shape that would cross the
|
|
6
|
+
* layer's edge or reach the header band is hidden, never cut. */
|
|
7
|
+
[data-keep-inside]:not([data-checked]) .mo,
|
|
8
|
+
[data-slot="activity-layout-backdrop"]
|
|
9
|
+
[data-background]:not([data-checked])
|
|
10
|
+
.mo {
|
|
11
|
+
visibility: hidden;
|
|
12
|
+
}
|
|
13
|
+
[data-keep-inside] .mo > [data-outside],
|
|
14
|
+
[data-slot="activity-layout-backdrop"]
|
|
15
|
+
[data-background]
|
|
16
|
+
.mo
|
|
17
|
+
> [data-outside] {
|
|
18
|
+
visibility: hidden;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
/* A shape over the page's text or controls fades out and comes back once
|
|
22
|
+
* clear (watch-content.ts): it is hidden, never moved. A compound body (the
|
|
23
|
+
* moon, the planet, the eclipse: `.pt.mg`) is hidden whole, with its halo
|
|
24
|
+
* (`.pt.mh`). The scene stays invisible until the first check, so nothing
|
|
25
|
+
* flashes over the content. */
|
|
26
|
+
[data-keep-inside] .mo > *,
|
|
27
|
+
[data-keep-inside] .pt,
|
|
28
|
+
[data-slot="activity-layout-backdrop"] [data-background] .mo > *,
|
|
29
|
+
[data-slot="activity-layout-backdrop"] [data-background] .pt {
|
|
30
|
+
transition: opacity 150ms ease;
|
|
31
|
+
}
|
|
32
|
+
/* Important: a preset sets its own opacity on a body (`.md`, the dark
|
|
33
|
+
* moon's, a celestial body's); in a layer, `!important` beats every normal
|
|
34
|
+
* declaration of those. The 150 ms transition still runs. */
|
|
35
|
+
[data-keep-inside] .mo > [data-hidden],
|
|
36
|
+
[data-keep-inside] .pt[data-hidden],
|
|
37
|
+
[data-slot="activity-layout-backdrop"] [data-background] .mo > [data-hidden],
|
|
38
|
+
[data-slot="activity-layout-backdrop"] [data-background] .pt[data-hidden] {
|
|
39
|
+
opacity: 0 !important;
|
|
40
|
+
}
|
|
41
|
+
@media (prefers-reduced-motion: reduce) {
|
|
42
|
+
[data-keep-inside] .mo > *,
|
|
43
|
+
[data-keep-inside] .pt,
|
|
44
|
+
[data-slot="activity-layout-backdrop"] [data-background] .mo > *,
|
|
45
|
+
[data-slot="activity-layout-backdrop"] [data-background] .pt {
|
|
46
|
+
transition: none;
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
}
|
|
@@ -77,23 +77,6 @@
|
|
|
77
77
|
display: none;
|
|
78
78
|
}
|
|
79
79
|
|
|
80
|
-
/* The theme's backdrop keeps its shapes whole (use-keep-shapes-inside.ts):
|
|
81
|
-
* the scene waits for the first pass, then a shape that would cross the
|
|
82
|
-
* layer's edge or reach the header band is hidden, never cut. */
|
|
83
|
-
[data-keep-inside]:not([data-checked]) .mo,
|
|
84
|
-
[data-slot="activity-layout-backdrop"]
|
|
85
|
-
[data-background]:not([data-checked])
|
|
86
|
-
.mo {
|
|
87
|
-
visibility: hidden;
|
|
88
|
-
}
|
|
89
|
-
[data-keep-inside] .mo > [data-outside],
|
|
90
|
-
[data-slot="activity-layout-backdrop"]
|
|
91
|
-
[data-background]
|
|
92
|
-
.mo
|
|
93
|
-
> [data-outside] {
|
|
94
|
-
visibility: hidden;
|
|
95
|
-
}
|
|
96
|
-
|
|
97
80
|
/* A preset fills the layer: the layer's size, not `100lvw x 100lvh`, which
|
|
98
81
|
* counts the scrollbar and a phone's toolbar. */
|
|
99
82
|
[data-slot="activity-layout-backdrop"] > [data-background] {
|
|
@@ -3,13 +3,18 @@
|
|
|
3
3
|
:root {
|
|
4
4
|
/* The active entry of the sidebar and the navigation rail: its tint, the
|
|
5
5
|
* tint hovered, the start bar (the label's colour), and the icon and label drawn on it. Translucent primary
|
|
6
|
-
* (these shares, 15 % and 20 % hovered); the label is primary
|
|
6
|
+
* (these shares, 15 % and 20 % hovered); the label is primary at 85 % of its lightness in light (a lavender of its hue in dark). The
|
|
7
7
|
* utilities (`bg-sidebar-active`...) derive them on the element, so they
|
|
8
8
|
* follow a `--primary` set below :root. To theme the rail set
|
|
9
9
|
* `--sidebar-active`, `--sidebar-active-hover` and
|
|
10
10
|
* `--sidebar-active-foreground` (all three, or the first two and the
|
|
11
11
|
* foreground); the derived colours are not declared here, on purpose. */
|
|
12
12
|
--nxgt-sidebar-active-share: 15%;
|
|
13
|
+
/* Light: primary itself reads 4.5:1 on the page but not on its own 15 % pill
|
|
14
|
+
* for every preset (corail 3.7:1), so the label is primary darkened to 85 %
|
|
15
|
+
* of its lightness (4.99:1 on the worst preset, hovered). The preset spec
|
|
16
|
+
* (sidebar-active-contrast.test.ts) reads this number back. */
|
|
17
|
+
--nxgt-sidebar-active-l: calc(l * 0.85);
|
|
13
18
|
/* The height of the app bar and of the rail's header from `md` up, so the
|
|
14
19
|
* rail's logo and the bar's title share one centre line. Phones keep the
|
|
15
20
|
* bar alone at this height; the menu sheet's header is unconstrained. */
|
|
@@ -24,7 +29,7 @@
|
|
|
24
29
|
/* The dark theme's primary is too dark to read on its surfaces (2.5:1), so
|
|
25
30
|
* the rail's label is a saturated lavender of its hue (5.3:1: lightness
|
|
26
31
|
* 0.72, chroma 0.15) on a denser pill (30 %, 35 % hovered). Light keeps the
|
|
27
|
-
*
|
|
32
|
+
* chroma of primary and 85 % of its lightness. */
|
|
28
33
|
--nxgt-sidebar-active-share: 30%;
|
|
29
34
|
--nxgt-sidebar-active-hover-share: 35%;
|
|
30
35
|
--nxgt-sidebar-active-l: 0.72;
|