@cloudfrogger/goodui 0.0.63 → 0.0.65
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-app-layout.json +2 -2
- package/ai/catalog/components/good-avatar-menu-item.json +2 -2
- package/ai/catalog/components/{good-main-menu.json → good-header-actions.json} +9 -9
- package/ai/catalog/components/{good-avatar-menu.json → good-header-avatar.json} +5 -5
- package/ai/catalog/components/{good-notifications.json → good-header-notification.json} +5 -5
- package/ai/catalog/components/{good-search.json → good-header-search.json} +5 -5
- package/ai/catalog/components/{good-theme-toggle.json → good-header-themetoggle.json} +5 -5
- package/ai/catalog/components/good-notification-host.json +1 -1
- package/ai/catalog/components/good-settings.json +1 -1
- package/ai/catalog/components/good-topbar.json +2 -2
- package/ai/catalog/index.json +65 -65
- package/ai/guides/component-discovery.md +1 -1
- package/ai/guides/layout.md +1 -1
- package/ai/manifest.json +2 -2
- package/ai/skill/goodui/SKILL.md +1 -1
- package/angular/projects/goodui/package.json +1 -1
- package/angular/projects/goodui/src/lib/actions.ts +20 -20
- package/angular/projects/goodui/src/lib/app-layout.ts +4 -4
- package/angular/projects/goodui/src/lib/topbar.ts +4 -5
- package/angular/projects/goodui/src/styles.css +4 -4
- package/design/component-map.json +21 -14
- package/design.md +5 -5
- package/fesm2022/cloudfrogger-goodui.mjs +55 -56
- package/fesm2022/cloudfrogger-goodui.mjs.map +1 -1
- package/guides/README.md +1 -0
- package/guides/components/header-actions.md +29 -0
- package/guides/components/{avatar-menu.md → header-avatar.md} +4 -4
- package/guides/components/header-notification.md +13 -0
- package/guides/components/{search.md → header-search.md} +6 -6
- package/guides/components/{theme-toggle.md → header-themetoggle.md} +4 -4
- package/guides/components/notifications.md +2 -2
- package/guides/components/settings.md +2 -2
- package/guides/components/submenus.md +1 -1
- package/guides/components/topbar.md +8 -8
- package/guides/contributing/design-to-code.md +2 -2
- package/guides/foundations/tokens.md +4 -4
- package/guides/layout/app-layout.md +9 -9
- package/guides/layout/layout-rules.md +1 -1
- package/guides/migrations/header-actions.md +17 -0
- package/package.json +2 -2
- package/styles.css +1 -1
- package/types/cloudfrogger-goodui.d.ts +145 -146
- package/guides/components/main-menu.md +0 -23
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ChangeDetectionStrategy, Component, ElementRef, HostListener, OnDestroy, computed, contentChild, forwardRef, inject, input, output, signal, viewChild } from '@angular/core';
|
|
2
2
|
import { RouterLink } from '@angular/router';
|
|
3
|
-
import {
|
|
3
|
+
import { GoodHeaderActionsComponent } from './actions';
|
|
4
4
|
import { GoodIconComponent } from './icon';
|
|
5
5
|
import { GoodMenuAction, GoodNotification, GoodSearchItem, GoodTopbarItem, GoodUser, goodRouteActive, goodTopbarItemContainsRoute } from './models';
|
|
6
6
|
|
|
@@ -352,7 +352,7 @@ export class GoodTopbarMenuContainerComponent {
|
|
|
352
352
|
@Component({
|
|
353
353
|
selector: 'good-topbar',
|
|
354
354
|
standalone: true,
|
|
355
|
-
imports: [GoodIconComponent, GoodBrandIconComponent, GoodTopbarMenuContainerComponent,
|
|
355
|
+
imports: [GoodIconComponent, GoodBrandIconComponent, GoodTopbarMenuContainerComponent, GoodHeaderActionsComponent],
|
|
356
356
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
357
357
|
template: `
|
|
358
358
|
<div class="good-topbar-left">
|
|
@@ -373,8 +373,8 @@ export class GoodTopbarMenuContainerComponent {
|
|
|
373
373
|
@if (!projectedMenu()) { <good-topbar-menu-container [items]="items()" [activeRoute]="activeRoute()" [mobileMode]="mobileMenuMode()" /> }
|
|
374
374
|
<ng-content select="good-topbar-menu-container" />
|
|
375
375
|
</div>
|
|
376
|
-
<ng-content select="good-
|
|
377
|
-
<good-
|
|
376
|
+
<ng-content select="good-header-actions">
|
|
377
|
+
<good-header-actions [user]="user()" [notifications]="notifications()" [searchItems]="searchItems()" [settingsActions]="settingsActions()" [avatarActions]="avatarActions()" [showThemeToggle]="showThemeToggle()" [showSettings]="showSettings()" />
|
|
378
378
|
</ng-content>
|
|
379
379
|
`,
|
|
380
380
|
host: { class: 'good-topbar', '[attr.data-mobile-menu]': 'mobileMenuMode()' },
|
|
@@ -399,5 +399,4 @@ export class GoodTopbarComponent {
|
|
|
399
399
|
readonly avatarActions = input<readonly GoodMenuAction[]>([]);
|
|
400
400
|
readonly menuToggle = output<void>();
|
|
401
401
|
readonly projectedMenu = contentChild(GoodTopbarMenuContainerComponent);
|
|
402
|
-
readonly projectedMainMenu = contentChild(GoodMainMenuComponent);
|
|
403
402
|
}
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
good-app-layout, good-sidebar-container, good-sidebar-menu-container, good-sidebar-item,
|
|
24
24
|
good-sidebar-submenu-group, good-sidebar-submenu-item, good-topbar, good-topbar-menu-container,
|
|
25
25
|
good-topbar-menu-item, good-topbar-dropdown-menu, good-topbar-dropdown-item, good-topbar-submenu,
|
|
26
|
-
good-
|
|
26
|
+
good-header-actions, good-header-themetoggle, good-main-view, good-subnav, good-button, good-action-group, good-action-bar, good-assistant-panel, good-switch, good-checkbox, good-radio-group, good-rating, good-table, good-calendar, good-month-calendar, good-line-chart, good-bar-chart, good-scatter-chart, good-histogram, good-sparkline, good-chart-axis, good-chart-line, good-chart-bar, good-chart-scatter, good-chart-histogram, good-progress, good-timeline, good-timeline-step, good-range-slider, good-signature-pad, good-color-controls, good-color-picker, good-select-font, good-rich-text-editor, good-pdf-preview, good-error-page, good-link, good-card, good-card-header, good-card-footer, good-group, good-form-row, good-expandable, good-code-block, good-modal, good-modal-header, good-modal-footer, good-input, good-textarea, good-number-input, good-pin-input, good-input-phone, good-select, good-select-country, good-listbox, good-tabs, good-tab, good-date-input, good-image-input, good-image-preview, good-dropdown, good-breadcrumbs, good-badge, good-alert, good-notification-host,
|
|
27
27
|
good-heading-group, good-eyebrow, good-heading, good-summary, good-section, good-prose, good-detail-list, good-columns, good-column, good-paragraph, good-subheading, good-citation, good-separator, good-inline-image, good-form-field, good-field-label, good-hint, good-error-text { box-sizing: border-box; }
|
|
28
28
|
|
|
29
29
|
.good-heading-group { display: flex; flex-direction: column; align-items: flex-start; gap: var(--good-typography-heading-eyebrow-gap); min-width: 0; font-family: var(--good-typography-font-family), ui-sans-serif, system-ui, sans-serif; }
|
|
@@ -432,8 +432,8 @@ good-heading-group, good-eyebrow, good-heading, good-summary, good-section, good
|
|
|
432
432
|
.good-topbar-submenu .good-dropdown-panel { width: 218px; padding: 8px; }
|
|
433
433
|
.good-mobile-menu-button, .good-mobile-brand { display: none !important; }
|
|
434
434
|
|
|
435
|
-
.good-
|
|
436
|
-
.good-search, .good-
|
|
435
|
+
.good-header-actions { display: flex; align-items: center; gap: var(--good-main-menu-gap); flex: none; }
|
|
436
|
+
.good-header-search, .good-header-notification, .good-header-themetoggle, .good-settings, .good-header-avatar { position: relative; display: inline-flex; }
|
|
437
437
|
.good-action-button, .good-avatar-button { position: relative; display: inline-flex; align-items: center; justify-content: center; flex: none; width: var(--good-control-action-size); height: var(--good-control-action-size); padding: 0; border: 0; border-radius: var(--good-radius-action); background: transparent; color: var(--good-icon); cursor: pointer; }
|
|
438
438
|
.good-action-button:hover, .good-avatar-button:hover { background: var(--good-selected); color: var(--good-text); }
|
|
439
439
|
.good-avatar-button { overflow: hidden; background: var(--good-selected); color: var(--good-text); font-size: 11px; font-weight: 700; }
|
|
@@ -1076,7 +1076,7 @@ good-heading-group, good-eyebrow, good-heading, good-summary, good-section, good
|
|
|
1076
1076
|
.good-subnav-track { gap: 8px; padding: 0 24px; }
|
|
1077
1077
|
.good-subnav-actions { padding: 0 24px 0 8px; }
|
|
1078
1078
|
.good-subnav-link, .good-subnav-chevron { min-height: 44px; }
|
|
1079
|
-
.good-
|
|
1079
|
+
.good-header-actions { gap: 4px; }
|
|
1080
1080
|
}
|
|
1081
1081
|
@media (max-width: 360px) {
|
|
1082
1082
|
.good-topbar[data-mobile-menu="popup"] .good-mobile-brand { display: none !important; }
|
|
@@ -270,28 +270,28 @@
|
|
|
270
270
|
{
|
|
271
271
|
"penpotName": "goodui.avatar-menu.account-open",
|
|
272
272
|
"penpotId": "521fe58c-da62-80e2-8008-d3e0a9a60899",
|
|
273
|
-
"angularSelector": "good-avatar
|
|
273
|
+
"angularSelector": "good-header-avatar",
|
|
274
274
|
"kind": "component",
|
|
275
275
|
"state": "account-open"
|
|
276
276
|
},
|
|
277
277
|
{
|
|
278
278
|
"penpotName": "goodui.avatar-menu.default",
|
|
279
279
|
"penpotId": "521fe58c-da62-80e2-8008-d33f65e8aeea",
|
|
280
|
-
"angularSelector": "good-avatar
|
|
280
|
+
"angularSelector": "good-header-avatar",
|
|
281
281
|
"kind": "component",
|
|
282
282
|
"state": "default"
|
|
283
283
|
},
|
|
284
284
|
{
|
|
285
285
|
"penpotName": "goodui.avatar-menu.open",
|
|
286
286
|
"penpotId": "521fe58c-da62-80e2-8008-d3400143c866",
|
|
287
|
-
"angularSelector": "good-avatar
|
|
287
|
+
"angularSelector": "good-header-avatar",
|
|
288
288
|
"kind": "component",
|
|
289
289
|
"state": "open"
|
|
290
290
|
},
|
|
291
291
|
{
|
|
292
292
|
"penpotName": "goodui.avatar-submenu.default",
|
|
293
293
|
"penpotId": "521fe58c-da62-80e2-8008-d3e0a96714b4",
|
|
294
|
-
"angularSelector": "good-avatar
|
|
294
|
+
"angularSelector": "good-header-avatar",
|
|
295
295
|
"kind": "internal-part",
|
|
296
296
|
"owner": "goodui.avatar-menu",
|
|
297
297
|
"state": "default"
|
|
@@ -967,7 +967,7 @@
|
|
|
967
967
|
{
|
|
968
968
|
"penpotName": "goodui.main-menu.default",
|
|
969
969
|
"penpotId": "521fe58c-da62-80e2-8008-d33f6619a524",
|
|
970
|
-
"angularSelector": "good-
|
|
970
|
+
"angularSelector": "good-header-actions",
|
|
971
971
|
"kind": "component",
|
|
972
972
|
"state": "default"
|
|
973
973
|
},
|
|
@@ -1058,21 +1058,21 @@
|
|
|
1058
1058
|
{
|
|
1059
1059
|
"penpotName": "goodui.notifications.default",
|
|
1060
1060
|
"penpotId": "521fe58c-da62-80e2-8008-d33f65811a2c",
|
|
1061
|
-
"angularSelector": "good-
|
|
1061
|
+
"angularSelector": "good-header-notification",
|
|
1062
1062
|
"kind": "component",
|
|
1063
1063
|
"state": "default"
|
|
1064
1064
|
},
|
|
1065
1065
|
{
|
|
1066
1066
|
"penpotName": "goodui.notifications.open",
|
|
1067
1067
|
"penpotId": "521fe58c-da62-80e2-8008-d33fff9a20ba",
|
|
1068
|
-
"angularSelector": "good-
|
|
1068
|
+
"angularSelector": "good-header-notification",
|
|
1069
1069
|
"kind": "component",
|
|
1070
1070
|
"state": "open"
|
|
1071
1071
|
},
|
|
1072
1072
|
{
|
|
1073
1073
|
"penpotName": "goodui.notifications.unread",
|
|
1074
1074
|
"penpotId": "5fd6a355-e255-80dc-8008-d81d121a0160",
|
|
1075
|
-
"angularSelector": "good-
|
|
1075
|
+
"angularSelector": "good-header-notification",
|
|
1076
1076
|
"kind": "component",
|
|
1077
1077
|
"state": "unread"
|
|
1078
1078
|
},
|
|
@@ -1136,14 +1136,14 @@
|
|
|
1136
1136
|
{
|
|
1137
1137
|
"penpotName": "goodui.search.default",
|
|
1138
1138
|
"penpotId": "521fe58c-da62-80e2-8008-d33f6563524e",
|
|
1139
|
-
"angularSelector": "good-search",
|
|
1139
|
+
"angularSelector": "good-header-search",
|
|
1140
1140
|
"kind": "component",
|
|
1141
1141
|
"state": "default"
|
|
1142
1142
|
},
|
|
1143
1143
|
{
|
|
1144
1144
|
"penpotName": "goodui.search.open",
|
|
1145
1145
|
"penpotId": "521fe58c-da62-80e2-8008-d33ffe1c4f79",
|
|
1146
|
-
"angularSelector": "good-search",
|
|
1146
|
+
"angularSelector": "good-header-search",
|
|
1147
1147
|
"kind": "component",
|
|
1148
1148
|
"state": "open"
|
|
1149
1149
|
},
|
|
@@ -1236,21 +1236,21 @@
|
|
|
1236
1236
|
{
|
|
1237
1237
|
"penpotName": "goodui.theme-toggle.light",
|
|
1238
1238
|
"penpotId": "f52a309e-8b45-80e4-8008-d86c7ab97196",
|
|
1239
|
-
"angularSelector": "good-
|
|
1239
|
+
"angularSelector": "good-header-themetoggle",
|
|
1240
1240
|
"kind": "component",
|
|
1241
1241
|
"state": "light"
|
|
1242
1242
|
},
|
|
1243
1243
|
{
|
|
1244
1244
|
"penpotName": "goodui.theme-toggle.system",
|
|
1245
1245
|
"penpotId": "f52a309e-8b45-80e4-8008-d86c7bab8421",
|
|
1246
|
-
"angularSelector": "good-
|
|
1246
|
+
"angularSelector": "good-header-themetoggle",
|
|
1247
1247
|
"kind": "component",
|
|
1248
1248
|
"state": "system"
|
|
1249
1249
|
},
|
|
1250
1250
|
{
|
|
1251
1251
|
"penpotName": "goodui.theme-toggle.dark",
|
|
1252
1252
|
"penpotId": "f52a309e-8b45-80e4-8008-d86c7c8f020f",
|
|
1253
|
-
"angularSelector": "good-
|
|
1253
|
+
"angularSelector": "good-header-themetoggle",
|
|
1254
1254
|
"kind": "component",
|
|
1255
1255
|
"state": "dark"
|
|
1256
1256
|
},
|
|
@@ -2229,5 +2229,12 @@
|
|
|
2229
2229
|
"design/rich-text-contract.json",
|
|
2230
2230
|
"design/color-controls-contract.json",
|
|
2231
2231
|
"design/world-map-contract.json"
|
|
2232
|
-
]
|
|
2232
|
+
],
|
|
2233
|
+
"angularSelectorOverrides": {
|
|
2234
|
+
"main-menu": "good-header-actions",
|
|
2235
|
+
"search": "good-header-search",
|
|
2236
|
+
"notifications": "good-header-notification",
|
|
2237
|
+
"theme-toggle": "good-header-themetoggle",
|
|
2238
|
+
"avatar-menu": "good-header-avatar"
|
|
2239
|
+
}
|
|
2233
2240
|
}
|
package/design.md
CHANGED
|
@@ -13,13 +13,13 @@ The nested sidebar lets “My Account” expand to “Account Home,” which exp
|
|
|
13
13
|
| Area | Current baseline | GoodUI owner |
|
|
14
14
|
| --- | --- | --- |
|
|
15
15
|
| Sidebar | 280 px wide, fixed at left, white, right border | `SidebarContainer` owns width, scrolling, brand area, and menu spacing |
|
|
16
|
-
| Topbar | 70 px tall, fixed beside sidebar | `Topbar` arranges navigation and `
|
|
16
|
+
| Topbar | 70 px tall, fixed beside sidebar | `Topbar` arranges navigation and `HeaderActions` |
|
|
17
17
|
| Topbar content | 30 px horizontal padding | Topbar owns padding |
|
|
18
18
|
| Sidebar menu | About 20 px left padding, 4 px between rows | `SidebarMenuContainer` owns heading and item list |
|
|
19
19
|
| Active sidebar item | 8 px radius, neutral background | `SidebarItem` owns active state |
|
|
20
20
|
| Expanded sidebar | About 34 px parent row; 36 px child rows with 4 px gap and indentation | `SidebarItem` owns open state; `SidebarSubmenuGroup` owns guide lines and layout |
|
|
21
21
|
| Cards and panels | 12 px radius, subtle neutral border | `radius.card` and `color.border` |
|
|
22
|
-
| Topbar actions | 36 × 36 px circular hit areas | `
|
|
22
|
+
| Topbar actions | 36 × 36 px circular hit areas | `HeaderActions` owns alignment and 10 px gaps between projected actions |
|
|
23
23
|
| Topbar dropdown | Help panel 220 px wide under topbar; 34 px rows, 2 px row gap, 6 px radius | `TopbarDropdownMenu` owns panel, divider, and rows |
|
|
24
24
|
| Topbar submenu | Support Forum panel 218 × 124 px; 4 px gap from parent, aligned with trigger row | `TopbarSubmenu` owns the next level and flips at the viewport edge |
|
|
25
25
|
| Avatar menu | About 250 × 384 px account panel under the avatar; 40 px rows, 36 px identity image, 8 px panel radius | `AvatarMenu` owns identity, row spacing, nested menus, appearance switch, and sign-out area |
|
|
@@ -93,7 +93,7 @@ AppLayout
|
|
|
93
93
|
│ │ ├─ TopbarDropdownItem (link or expandable parent)
|
|
94
94
|
│ │ └─ TopbarSubmenu (optional and recursive)
|
|
95
95
|
│ │ └─ TopbarDropdownItem (repeatable)
|
|
96
|
-
│ └─
|
|
96
|
+
│ └─ HeaderActions
|
|
97
97
|
│ ├─ Search
|
|
98
98
|
│ ├─ Notifications
|
|
99
99
|
│ ├─ ThemeToggle (optional; direct Light → System → Dark cycle)
|
|
@@ -393,7 +393,7 @@ Shared `layout` dimensions: `space.1`, `.2`, `.2_5`, `.3`, `.5`, `.6`, `.7_5` =
|
|
|
393
393
|
|
|
394
394
|
Angular Switch, the avatar appearance switch, and all 36 Penpot Switch variants place their thumbs with flex alignment while retaining the same track sizes and on/off positions. `switch.thumb-inset` binds the four track paddings in Penpot and CSS. Absolute positioning remains appropriate for popovers, fixed submenus, and invisible native input overlays.
|
|
395
395
|
|
|
396
|
-
The live Penpot file uses version 2.17.0 of the plugin API. Shell responsive and open states are separate main components; Button is a registered 45-combination Penpot variant group. The existing color tokens remain bound to fills and strokes. Semantic aliases in `layout` bind `topbar.padding-inline` to topbar flex padding, `main-menu.gap` to
|
|
396
|
+
The live Penpot file uses version 2.17.0 of the plugin API. Shell responsive and open states are separate main components; Button is a registered 45-combination Penpot variant group. The existing color tokens remain bound to fills and strokes. Semantic aliases in `layout` bind `topbar.padding-inline` to topbar flex padding, `main-menu.gap` to HeaderActions flex column gap, and `sidebar.menu-gap` to the sidebar menu flex row gap. Sizing tokens bind sidebar width, desktop/mobile topbar height, subnav height, sidebar row height, the four 36 px action controls, and Button heights and icon sizes. `radius.item` binds sidebar item corners; `radius.card` binds MainView content border corners; `radius.button` binds Button corners. Main component IDs and intentionally different instance values remain unchanged.
|
|
397
397
|
|
|
398
398
|
The Penpot token catalog supports `spacing` on flex/grid gaps and padding, `sizing` on width/height, and `borderRadius` on corners. The account MainView, subnavigation track, and mobile topbar use absolute positioning rather than Penpot flex layout, so their placement offsets and mobile topbar padding cannot receive spacing-token bindings without changing layout behavior. They remain explicit geometry; the corresponding runtime CSS values are documented. Nested sidebar menu copies with a different flex gap are not rebound to the main component's gap token.
|
|
399
399
|
|
|
@@ -424,7 +424,7 @@ Shell compositions use nested component instances. Keep IDs when a component ret
|
|
|
424
424
|
- The mobile sidebar opens from the topbar trigger and closes through the scrim or Escape. Desktop sidebar collapse exists as a design variant but is not yet exposed as an Angular API state.
|
|
425
425
|
- `MainView` accepts page content without imposing a card layout. The heading and actions are optional; content grows and scrolls.
|
|
426
426
|
- `Subnav` owns its horizontal viewport and child menu. Apps provide route data and do not add custom wrapping or page offsets.
|
|
427
|
-
- `
|
|
427
|
+
- `HeaderActions` accepts projected action components in application-defined order; AppLayout forwards a direct HeaderActions child to Topbar. With no projected content it supplies the existing default actions. `HeaderActions` can hide its generated ThemeToggle and other actions independently. ThemeToggle is shown by default; Settings is a separate optional menu. Apps may project a custom `good-header-actions` into `Topbar`; the container still owns spacing and hit areas.
|
|
428
428
|
- Tailwind CSS 4 theme variables provide colors; the shipped component CSS provides geometry. Apps do not add `margin-left` or `padding-top` to align the shell.
|
|
429
429
|
|
|
430
430
|
## Maintenance workflow
|