@cloudfrogger/goodui 0.0.72 → 0.0.73
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/ai/catalog/components/good-header-themetoggle.json +1 -8
- package/ai/catalog/index.json +3 -3
- package/ai/manifest.json +2 -2
- package/angular/projects/goodui/package.json +1 -1
- package/angular/projects/goodui/src/lib/actions.ts +4 -4
- package/angular/projects/goodui/src/lib/theme.ts +1 -2
- package/design/component-map.json +0 -7
- package/fesm2022/cloudfrogger-goodui.mjs +7 -8
- package/fesm2022/cloudfrogger-goodui.mjs.map +1 -1
- package/guides/components/header-themetoggle.md +3 -3
- package/guides/contributing/design-to-code.md +1 -1
- package/package.json +2 -2
- package/types/cloudfrogger-goodui.d.ts +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Header theme toggle
|
|
2
2
|
|
|
3
|
-
`goodui.theme-toggle` maps to `good-header-themetoggle`. It is an optional 36 × 36 px topbar action. One click
|
|
3
|
+
`goodui.theme-toggle` maps to `good-header-themetoggle`. It is an optional 36 × 36 px topbar action. One click switches **Light ↔ Dark** without opening a menu. The icon shows the currently active theme: sun for Light or moon for Dark, including when the initial theme follows the system. The accessible button label names both the current and next mode; keyboard users activate it with Enter or Space.
|
|
4
4
|
|
|
5
5
|
```html
|
|
6
6
|
<good-app-shell [showThemeToggle]="true">
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
|
|
11
11
|
Set `[showThemeToggle]="false"` to remove it. `good-header-actions` and `good-app-header` accept the same input. A custom composition can place `<good-header-themetoggle />` directly. The main menu owns spacing, while the control owns its hit area and hover style.
|
|
12
12
|
|
|
13
|
-
`GoodThemeService.preference()` is `light`, `system`, or `dark`; `theme()` remains the resolved `light` or `dark` value used for colors and theme-aware artwork. Explicit Light and Dark choices are stored in the `goodui-theme` cookie for one year. System mode removes the cookie and follows `prefers-color-scheme`, including changes while the page is open. Apps can
|
|
13
|
+
`GoodThemeService.preference()` is `light`, `system`, or `dark`; `theme()` remains the resolved `light` or `dark` value used for colors and theme-aware artwork. Explicit Light and Dark choices are stored in the `goodui-theme` cookie for one year. System mode removes the cookie and follows `prefers-color-scheme`, including changes while the page is open. System remains an initialization fallback and a programmatic preference, not a third selector state. Apps can restore it with `theme.setTheme('system')`. Both `theme.cycle()` and `theme.toggle()` switch from the resolved theme directly to its opposite and persist that explicit choice. Older `localStorage` values are ignored.
|
|
14
14
|
|
|
15
15
|
To apply the correct color before Angular and its CSS load, put this script and critical background in the consuming app's `src/index.html` head, before other styles or scripts. The fallback colors match GoodUI's default `color.canvas` token; update them if your app overrides that token.
|
|
16
16
|
|
|
@@ -30,4 +30,4 @@ To apply the correct color before Angular and its CSS load, put this script and
|
|
|
30
30
|
</style>
|
|
31
31
|
```
|
|
32
32
|
|
|
33
|
-
Penpot `01 Components` publishes `goodui.theme-toggle.light
|
|
33
|
+
Penpot `01 Components` publishes `goodui.theme-toggle.light` and `.dark`, bound to `control.action-size`, `radius.action`, `color.surface`, and `color.icon`. They represent the active theme, including a theme resolved from the device setting. The former System specimen has been removed; the Light and Dark library IDs are preserved. HeaderActions uses the Light instance as its representative composition.
|
|
@@ -51,7 +51,7 @@ File ID: `a552d28a-7556-80e4-8008-d3392c96c899`. Dedicated control pages include
|
|
|
51
51
|
| `goodui.app-header.help-submenu-open` | `521fe58c-da62-80e2-8008-d3cb522ee751` |
|
|
52
52
|
| `goodui.app-shell.help-submenu-open` | `521fe58c-da62-80e2-8008-d3cb84e00368` |
|
|
53
53
|
| `goodui.main-menu.default` | `521fe58c-da62-80e2-8008-d33f6619a524` |
|
|
54
|
-
| `goodui.theme-toggle.light` / `.
|
|
54
|
+
| `goodui.theme-toggle.light` / `.dark` | `f52a309e-8b45-80e4-8008-d86c7ab97196` / `f52a309e-8b45-80e4-8008-d86c7c8f020f` |
|
|
55
55
|
| `goodui.search` (`hotkey=false`) / `.open` | `521fe58c-da62-80e2-8008-d33f6563524e` / `521fe58c-da62-80e2-8008-d33ffe1c4f79` |
|
|
56
56
|
| `goodui.notifications.default` / `.open` | `521fe58c-da62-80e2-8008-d33f65811a2c` / `521fe58c-da62-80e2-8008-d33fff9a20ba` |
|
|
57
57
|
| `goodui.notifications.unread` | `5fd6a355-e255-80dc-8008-d81d121a0160` (linked bell and destructive Badge with 16 px `notification.count.*` overrides) |
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cloudfrogger/goodui",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.73",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public",
|
|
@@ -35,5 +35,5 @@
|
|
|
35
35
|
"module": "fesm2022/cloudfrogger-goodui.mjs",
|
|
36
36
|
"typings": "types/cloudfrogger-goodui.d.ts",
|
|
37
37
|
"type": "module",
|
|
38
|
-
"gitHead": "
|
|
38
|
+
"gitHead": "e97aa9c98d68a156a00e3cc6e3c8d96fe9f0d57f"
|
|
39
39
|
}
|
|
@@ -581,7 +581,7 @@ declare class GoodHeaderNotificationComponent {
|
|
|
581
581
|
}
|
|
582
582
|
declare class GoodHeaderThemeToggleComponent {
|
|
583
583
|
readonly theme: GoodThemeService;
|
|
584
|
-
readonly icon: _angular_core.Signal<"sun" | "moon"
|
|
584
|
+
readonly icon: _angular_core.Signal<"sun" | "moon">;
|
|
585
585
|
readonly label: _angular_core.Signal<string>;
|
|
586
586
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<GoodHeaderThemeToggleComponent, never>;
|
|
587
587
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<GoodHeaderThemeToggleComponent, "good-header-themetoggle", never, {}, {}, never, never, true, never>;
|