@cloudfrogger/goodui 0.0.62 → 0.0.63
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 -0
- package/ai/catalog/components/good-main-menu.json +5 -3
- package/ai/catalog/components/good-search.json +1 -1
- package/ai/catalog/index.json +3 -3
- package/ai/guides/component-discovery.md +2 -0
- package/ai/guides/layout.md +2 -0
- 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 +7 -5
- package/angular/projects/goodui/src/lib/app-layout.ts +7 -2
- package/angular/projects/goodui/src/lib/topbar.ts +3 -2
- package/design.md +2 -2
- package/fesm2022/cloudfrogger-goodui.mjs +32 -18
- package/fesm2022/cloudfrogger-goodui.mjs.map +1 -1
- package/guides/components/main-menu.md +17 -5
- package/guides/components/search.md +45 -3
- package/guides/components/topbar.md +7 -1
- package/guides/contributing/design-to-code.md +4 -0
- package/guides/layout/app-layout.md +17 -0
- package/package.json +2 -2
- package/types/cloudfrogger-goodui.d.ts +2 -2
|
@@ -1,11 +1,23 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Main menu
|
|
2
2
|
|
|
3
|
-
`
|
|
3
|
+
`good-main-menu` is the topbar action container. It owns alignment and responsive gaps. Applications compose its children in any order without adding layout CSS.
|
|
4
4
|
|
|
5
5
|
```html
|
|
6
|
-
<good-
|
|
6
|
+
<good-app-layout [sidebarSections]="navigation">
|
|
7
|
+
<good-main-menu>
|
|
8
|
+
<good-search [items]="searchItems" />
|
|
9
|
+
<good-notifications />
|
|
10
|
+
<good-theme-toggle />
|
|
11
|
+
<good-avatar-menu [user]="currentUser" [actions]="accountActions" />
|
|
12
|
+
</good-main-menu>
|
|
13
|
+
<router-outlet />
|
|
14
|
+
</good-app-layout>
|
|
7
15
|
```
|
|
8
16
|
|
|
9
|
-
|
|
17
|
+
Import `GoodMainMenuComponent` and each child component in the standalone component that declares this template. The same composition works directly inside `good-topbar`. Remove or reorder child tags to choose the available actions and their order. Settings is available as `good-settings`. Projected content replaces all generated actions; configure each child directly. Shell inputs configure only the generated default menu.
|
|
10
18
|
|
|
11
|
-
`
|
|
19
|
+
With no projected content, the existing default composition remains Search, Notifications, Theme toggle, and Avatar menu. Its inputs remain `user`, `notifications`, `searchItems`, `settingsActions`, `avatarActions`, `showSearch`, `showNotifications`, `showThemeToggle`, `showSettings`, and `showAvatar`. All visibility inputs default to true except `showSettings`, which defaults to false. AppLayout and Topbar forward `showThemeToggle` and `showSettings`.
|
|
20
|
+
|
|
21
|
+
Each action is documented separately: [Search](search.md), [Notifications](notifications.md), [Theme toggle](theme-toggle.md), [Avatar menu](avatar-menu.md), and [Settings](settings.md). Each owns its 36 × 36 px hit area and interaction. MainMenu owns spacing; actions have no external margins. Use Angular conditional blocks inside the container to control visibility. An explicitly supplied conditional block owns the content even when no actions are currently visible.
|
|
22
|
+
|
|
23
|
+
Penpot `goodui.main-menu.default` retains its stable ID and linked Search, Notifications, ThemeToggle, and AvatarMenu instances. This specimen represents the default composition, rather than a mandatory action list.
|
|
@@ -1,9 +1,51 @@
|
|
|
1
1
|
# Search
|
|
2
2
|
|
|
3
|
-
`
|
|
3
|
+
`good-search` opens a modal navigation search from a round magnifier action. It filters application-supplied link labels and descriptions locally, with automatic input focus, keyboard navigation, and an empty state. The homepage documents it at `/components/search` with a working preview and copyable examples.
|
|
4
|
+
|
|
5
|
+
## Standalone usage
|
|
6
|
+
|
|
7
|
+
Import `GoodSearchComponent` and `GoodSearchItem` from `@cloudfrogger/goodui`. Configure Angular Router through `provideRouter(routes)` in the consuming app.
|
|
8
|
+
|
|
9
|
+
```ts
|
|
10
|
+
readonly items: readonly GoodSearchItem[] = [
|
|
11
|
+
{ id: 'buttons', label: 'Buttons', description: 'Actions and icons', route: '/components/buttons' },
|
|
12
|
+
{ id: 'tables', label: 'Tables', description: 'Records and pagination', route: '/components/tables' },
|
|
13
|
+
];
|
|
14
|
+
```
|
|
4
15
|
|
|
5
16
|
```html
|
|
6
|
-
<good-search [items]="
|
|
17
|
+
<good-search [items]="items" />
|
|
7
18
|
```
|
|
8
19
|
|
|
9
|
-
|
|
20
|
+
## API
|
|
21
|
+
|
|
22
|
+
`items` is the sole component input. It accepts `readonly GoodSearchItem[]` and defaults to `[]`.
|
|
23
|
+
|
|
24
|
+
| Field | Required | Meaning |
|
|
25
|
+
| --- | --- | --- |
|
|
26
|
+
| `id` | Yes | Unique, stable result key |
|
|
27
|
+
| `label` | Yes | Visible result title, searched locally |
|
|
28
|
+
| `description` | No | Supporting result text, searched locally |
|
|
29
|
+
| `route` | Yes | Angular Router destination |
|
|
30
|
+
|
|
31
|
+
`open()` opens the native dialog and focuses its search input. `close()` closes the dialog. The `query` signal holds the search field’s current text. The `results` signal computes the matching supplied records. Matching is case-insensitive and uses a substring of the combined label and description. An empty query includes every item. An unmatched query displays **No results**.
|
|
32
|
+
|
|
33
|
+
## Shell integration
|
|
34
|
+
|
|
35
|
+
`good-app-layout`, `good-topbar`, and `good-main-menu` accept the navigation records through `searchItems`.
|
|
36
|
+
|
|
37
|
+
```html
|
|
38
|
+
<good-app-layout [searchItems]="items">
|
|
39
|
+
<router-outlet />
|
|
40
|
+
</good-app-layout>
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
MainMenu shows the action by default. A standalone MainMenu can set `[showSearch]="false"` to hide it.
|
|
44
|
+
|
|
45
|
+
## Keyboard and navigation
|
|
46
|
+
|
|
47
|
+
The native modal dialog contains focus. Tab and Shift+Tab move between the input, results, and close action. Enter activates a focused result. Escape or Close dismisses the dialog and restores focus to the trigger. Selecting a result closes the dialog and follows its `route` through Angular Router.
|
|
48
|
+
|
|
49
|
+
## Search fields within a page
|
|
50
|
+
|
|
51
|
+
Use `good-input type="search"` for a continuously visible field above a list, table, or card grid. Bind its value to application filtering. See [Input](input.md). GoodUI Table and Select also document their integrated search behavior in their respective guides.
|
|
@@ -76,8 +76,14 @@ For a standalone topbar, use `[mobileMenuMode]="'popup'"`. For a projected menu
|
|
|
76
76
|
<good-topbar-menu-item label="Home" route="/" [active]="true" />
|
|
77
77
|
<good-topbar-menu-item label="Projects" route="/projects" />
|
|
78
78
|
</good-topbar-menu-container>
|
|
79
|
-
<good-main-menu
|
|
79
|
+
<good-main-menu>
|
|
80
|
+
<good-search [items]="searchItems" />
|
|
81
|
+
<good-theme-toggle />
|
|
82
|
+
<good-avatar-menu [user]="currentUser" [actions]="accountActions" />
|
|
83
|
+
</good-main-menu>
|
|
80
84
|
</good-topbar>
|
|
81
85
|
```
|
|
82
86
|
|
|
83
87
|
The topbar owns spacing, hit areas, and responsive behavior. Apps do not need manual `flex`, `gap`, or positioning classes for this structure. `good-app-layout` wires the mobile drawer; with a standalone topbar, use `(menuToggle)` to open your own navigation.
|
|
88
|
+
|
|
89
|
+
AppLayout also accepts a direct `good-main-menu` child and forwards it to the topbar action slot. The container is excluded from the page content. See [Main menu](main-menu.md) for composition and default behavior.
|
|
@@ -259,3 +259,7 @@ The previous public names `GoodSectionNavComponent`, `GoodSectionNavItem`, `good
|
|
|
259
259
|
`goodui.world-map.selected-neighbors` (`18e25442-2c17-80b0-8008-e3fd1171966f`) maps to `good-world-map` with a selected country. Its United States specimen shows Canada and Mexico with the muted token and a brand outline on the selected country. Angular derives direct neighbors from the bundled TopoJSON arcs at build time and shades them automatically when a country is selected; the default world state remains unshaded.
|
|
260
260
|
|
|
261
261
|
`goodui.map-overlay.aggregated` (`18e25442-2c17-80b0-8008-e40193c020b5`) maps to the runtime aggregated state of `good-map-overlay`: a mean value and country-count badge. `goodui.world-map.aggregated-overlays` (`18e25442-2c17-80b0-8008-e401d4eda08a`) maps to `good-world-map` at a zoom level where nearby country details combine. Its linked aggregated overlay instances illustrate that Angular averages each numeric measure separately and recomputes groups as map size or zoom changes. The default `aggregateOverlays=true` input enables this state; false keeps individual details.
|
|
262
|
+
|
|
263
|
+
### Main menu composition
|
|
264
|
+
|
|
265
|
+
`goodui.main-menu.default` maps to `good-main-menu`, a container for application-selected action components. Its linked Search, Notifications, ThemeToggle, and AvatarMenu instances represent the default arrangement. Angular accepts custom projected children in their declared order; AppLayout forwards its direct MainMenu child to Topbar. Stable component IDs, geometry, and token bindings are unchanged. See [Main menu](../components/main-menu.md).
|
|
@@ -62,3 +62,20 @@ The homepage's **Foundation → Layout** chapter starts with **General** for the
|
|
|
62
62
|
`brand` is the accessible name for optional logo artwork. `brandLogoSrc` and `brandLogoDarkSrc` supply the light and dark wordmarks for the desktop sidebar and mobile drawer. `brandMarkSrc` and `brandMarkDarkSrc` supply the light and dark symbols for the mobile topbar and optional desktop BrandIcon. When a dark URL is omitted, the light image is used in both themes. Without a mark URL, the mobile topbar continues to show the wordmark or text, preserving existing application behavior. Without a wordmark URL, the sidebar and drawer show the text brand and generic accent mark. Put the files in your Angular application's `public/` directory (or use your own hosted URLs). GoodUI does not package an application logo or favicon.
|
|
63
63
|
|
|
64
64
|
The browser favicon belongs to the application. Set its URL in your app's `src/index.html`, for example `<link rel="icon" type="image/svg+xml" href="favicon.svg">`, and put that file in your app's `public/` directory. Replace those with your own favicon when branding a consuming app; no GoodUI API or library file needs changing.
|
|
65
|
+
|
|
66
|
+
## Choose your topbar actions
|
|
67
|
+
|
|
68
|
+
Project a `good-main-menu` directly into AppLayout to choose the actions and their order. AppLayout forwards this container into Topbar and keeps routed content in the page area. Configure projected actions directly; shell action inputs continue to configure the generated default menu when no custom container is present.
|
|
69
|
+
|
|
70
|
+
```html
|
|
71
|
+
<good-app-layout [sidebarSections]="navigation">
|
|
72
|
+
<good-main-menu>
|
|
73
|
+
<good-search [items]="searchItems" />
|
|
74
|
+
<good-theme-toggle />
|
|
75
|
+
<good-avatar-menu [user]="currentUser" [actions]="accountActions" />
|
|
76
|
+
</good-main-menu>
|
|
77
|
+
<router-outlet />
|
|
78
|
+
</good-app-layout>
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
Import MainMenu and its selected child components in the declaring standalone component. See [Main menu](../components/main-menu.md) and its linked action guides.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cloudfrogger/goodui",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.63",
|
|
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": "e0cf468b2ef9824ba4cfdd6d821a3967f314321e"
|
|
39
39
|
}
|
|
@@ -434,7 +434,7 @@ declare class GoodMainMenuComponent {
|
|
|
434
434
|
readonly showSettings: _angular_core.InputSignal<boolean>;
|
|
435
435
|
readonly showAvatar: _angular_core.InputSignal<boolean>;
|
|
436
436
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<GoodMainMenuComponent, never>;
|
|
437
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<GoodMainMenuComponent, "good-main-menu", never, { "user": { "alias": "user"; "required": false; "isSignal": true; }; "notifications": { "alias": "notifications"; "required": false; "isSignal": true; }; "searchItems": { "alias": "searchItems"; "required": false; "isSignal": true; }; "settingsActions": { "alias": "settingsActions"; "required": false; "isSignal": true; }; "avatarActions": { "alias": "avatarActions"; "required": false; "isSignal": true; }; "showSearch": { "alias": "showSearch"; "required": false; "isSignal": true; }; "showNotifications": { "alias": "showNotifications"; "required": false; "isSignal": true; }; "showThemeToggle": { "alias": "showThemeToggle"; "required": false; "isSignal": true; }; "showSettings": { "alias": "showSettings"; "required": false; "isSignal": true; }; "showAvatar": { "alias": "showAvatar"; "required": false; "isSignal": true; }; }, {}, never,
|
|
437
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<GoodMainMenuComponent, "good-main-menu", never, { "user": { "alias": "user"; "required": false; "isSignal": true; }; "notifications": { "alias": "notifications"; "required": false; "isSignal": true; }; "searchItems": { "alias": "searchItems"; "required": false; "isSignal": true; }; "settingsActions": { "alias": "settingsActions"; "required": false; "isSignal": true; }; "avatarActions": { "alias": "avatarActions"; "required": false; "isSignal": true; }; "showSearch": { "alias": "showSearch"; "required": false; "isSignal": true; }; "showNotifications": { "alias": "showNotifications"; "required": false; "isSignal": true; }; "showThemeToggle": { "alias": "showThemeToggle"; "required": false; "isSignal": true; }; "showSettings": { "alias": "showSettings"; "required": false; "isSignal": true; }; "showAvatar": { "alias": "showAvatar"; "required": false; "isSignal": true; }; }, {}, never, ["*"], true, never>;
|
|
438
438
|
}
|
|
439
439
|
|
|
440
440
|
type GoodTopbarMobileMenuMode = 'hidden' | 'popup';
|
|
@@ -3948,7 +3948,7 @@ declare class GoodAppLayoutComponent {
|
|
|
3948
3948
|
onBackdropClick(event: MouseEvent): void;
|
|
3949
3949
|
onDrawerClose(): void;
|
|
3950
3950
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<GoodAppLayoutComponent, never>;
|
|
3951
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<GoodAppLayoutComponent, "good-app-layout", never, { "brand": { "alias": "brand"; "required": false; "isSignal": true; }; "brandLogoSrc": { "alias": "brandLogoSrc"; "required": false; "isSignal": true; }; "brandLogoDarkSrc": { "alias": "brandLogoDarkSrc"; "required": false; "isSignal": true; }; "brandMarkSrc": { "alias": "brandMarkSrc"; "required": false; "isSignal": true; }; "brandMarkDarkSrc": { "alias": "brandMarkDarkSrc"; "required": false; "isSignal": true; }; "showBrandIcon": { "alias": "showBrandIcon"; "required": false; "isSignal": true; }; "showMobileBrand": { "alias": "showMobileBrand"; "required": false; "isSignal": true; }; "sidebarSections": { "alias": "sidebarSections"; "required": false; "isSignal": true; }; "topbarItems": { "alias": "topbarItems"; "required": false; "isSignal": true; }; "mobileTopbarMenuMode": { "alias": "mobileTopbarMenuMode"; "required": false; "isSignal": true; }; "user": { "alias": "user"; "required": false; "isSignal": true; }; "notifications": { "alias": "notifications"; "required": false; "isSignal": true; }; "searchItems": { "alias": "searchItems"; "required": false; "isSignal": true; }; "settingsActions": { "alias": "settingsActions"; "required": false; "isSignal": true; }; "showThemeToggle": { "alias": "showThemeToggle"; "required": false; "isSignal": true; }; "showSettings": { "alias": "showSettings"; "required": false; "isSignal": true; }; "avatarActions": { "alias": "avatarActions"; "required": false; "isSignal": true; }; }, {}, never, ["*"], true, never>;
|
|
3951
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<GoodAppLayoutComponent, "good-app-layout", never, { "brand": { "alias": "brand"; "required": false; "isSignal": true; }; "brandLogoSrc": { "alias": "brandLogoSrc"; "required": false; "isSignal": true; }; "brandLogoDarkSrc": { "alias": "brandLogoDarkSrc"; "required": false; "isSignal": true; }; "brandMarkSrc": { "alias": "brandMarkSrc"; "required": false; "isSignal": true; }; "brandMarkDarkSrc": { "alias": "brandMarkDarkSrc"; "required": false; "isSignal": true; }; "showBrandIcon": { "alias": "showBrandIcon"; "required": false; "isSignal": true; }; "showMobileBrand": { "alias": "showMobileBrand"; "required": false; "isSignal": true; }; "sidebarSections": { "alias": "sidebarSections"; "required": false; "isSignal": true; }; "topbarItems": { "alias": "topbarItems"; "required": false; "isSignal": true; }; "mobileTopbarMenuMode": { "alias": "mobileTopbarMenuMode"; "required": false; "isSignal": true; }; "user": { "alias": "user"; "required": false; "isSignal": true; }; "notifications": { "alias": "notifications"; "required": false; "isSignal": true; }; "searchItems": { "alias": "searchItems"; "required": false; "isSignal": true; }; "settingsActions": { "alias": "settingsActions"; "required": false; "isSignal": true; }; "showThemeToggle": { "alias": "showThemeToggle"; "required": false; "isSignal": true; }; "showSettings": { "alias": "showSettings"; "required": false; "isSignal": true; }; "avatarActions": { "alias": "avatarActions"; "required": false; "isSignal": true; }; }, {}, never, ["good-main-menu", "*"], true, never>;
|
|
3952
3952
|
}
|
|
3953
3953
|
|
|
3954
3954
|
export { GOODUI_OPTIONS, GOOD_CALENDAR_DEFAULT_NON_WORKING_LABELS, GOOD_CALENDAR_DEFAULT_WORKING_HOURS, GOOD_CHART_DEFAULT_COLORS, GOOD_CLASSIC_COLORS, GOOD_COUNTRY_CODES, GOOD_FONT_OPTIONS, GOOD_MARKER_COLORS, GOOD_PROGRESS_COLORS, GoodActionBarComponent, GoodActionGroupComponent, GoodActionMenuComponent, GoodAlertComponent, GoodAppLayoutComponent, GoodAssistantBodyComponent, GoodAssistantFooterComponent, GoodAssistantHeaderComponent, GoodAssistantMainComponent, GoodAssistantMobileComponent, GoodAssistantPanelComponent, GoodAvatarMenuComponent, GoodAvatarMenuItemComponent, GoodBadgeComponent, GoodBarChartComponent, GoodBrandIconComponent, GoodBreadcrumbsComponent, GoodButtonComponent, GoodCalendarComponent, GoodCalendarService, GoodCardActionsDirective, GoodCardComponent, GoodCardFooterComponent, GoodCardHeaderComponent, GoodChartAxisComponent, GoodChartBarComponent, GoodChartHistogramComponent, GoodChartLineComponent, GoodChartScatterComponent, GoodCheckboxComponent, GoodCitationComponent, GoodCodeBlockComponent, GoodColorControlsComponent, GoodColorPickerComponent, GoodColumnComponent, GoodColumnsComponent, GoodDateInputComponent, GoodDetailListComponent, GoodDetailRowDirective, GoodDropdownComponent, GoodDropdownFooterDirective, GoodDropdownHeaderDirective, GoodErrorPageComponent, GoodErrorTextComponent, GoodExpandableComponent, GoodExpandableHeaderDirective, GoodEyebrowComponent, GoodFieldLabelComponent, GoodFormDirective, GoodFormFieldComponent, GoodFormRowComponent, GoodGroupComponent, GoodHeadingComponent, GoodHeadingGroupComponent, GoodHintComponent, GoodHistogramComponent, GoodIconComponent, GoodImageInputComponent, GoodImagePreviewComponent, GoodInlineImageComponent, GoodInputComponent, GoodInputPhoneComponent, GoodLineChartComponent, GoodLinkComponent, GoodListboxComponent, GoodListboxItemDirective, GoodMainMenuComponent, GoodMainViewComponent, GoodMapColorScaleComponent, GoodMapOverlayComponent, GoodModalComponent, GoodModalFooterComponent, GoodModalHeaderComponent, GoodMonthCalendarComponent, GoodNotificationCenter, GoodNotificationHostComponent, GoodNotificationsComponent, GoodNumberInputComponent, GoodParagraphComponent, GoodPdfPreviewComponent, GoodPinInputComponent, GoodProgressComponent, GoodProseComponent, GoodRadioGroupComponent, GoodRangeSliderComponent, GoodRatingComponent, GoodResizableComponent, GoodResizablePaneComponent, GoodRichTextEditorComponent, GoodScatterChartComponent, GoodSearchComponent, GoodSectionComponent, GoodSelectComponent, GoodSelectCountryComponent, GoodSelectFontComponent, GoodSeparatorComponent, GoodSettingsComponent, GoodSidebarContainerComponent, GoodSidebarItemComponent, GoodSidebarMenuContainerComponent, GoodSidebarSubmenuGroupComponent, GoodSidebarSubmenuItemComponent, GoodSignaturePadComponent, GoodSparklineComponent, GoodStatusIconComponent, GoodSubheadingComponent, GoodSubnavComponent, GoodSummaryComponent, GoodSwitchComponent, GoodTabComponent, GoodTableCellDirective, GoodTableComponent, GoodTabsComponent, GoodTextareaComponent, GoodThemeService, GoodThemeToggleComponent, GoodTimelineComponent, GoodTimelineSectionComponent, GoodTimelineStepComponent, GoodTopbarComponent, GoodTopbarDropdownItemComponent, GoodTopbarDropdownMenuComponent, GoodTopbarMenuContainerComponent, GoodTopbarMenuItemComponent, GoodTopbarSubmenuComponent, GoodWorldMapComponent, detectAvailableFonts, goodCalendarAddDays, goodCalendarDayKey, goodCalendarMoveEvent, goodCalendarNonWorkingPeriods, goodCalendarNormalizeEvent, goodCalendarResizeEvent, goodCalendarStartOfDay, goodCalendarStartOfWeek, goodFontFamilyCss, goodItemContainsRoute, goodPinAllowedCharacters, goodRouteActive, goodSignatureInkml, goodSignaturePath, goodSignatureSvg, goodSubnavItemContainsRoute, goodTopbarItemContainsRoute, provideGoodUI, resolveChartColor, resolveChartLines, resolveChartSeries, resolveHistogram, resolveScatterSeries };
|