@ojiepermana/angular 22.2.14 → 22.2.18

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.
Files changed (56) hide show
  1. package/README.md +2 -2
  2. package/SUPPORT.md +23 -9
  3. package/component/composer/README.md +3 -0
  4. package/component/editor/README.md +3 -0
  5. package/fesm2022/ojiepermana-angular-chart-primitives.mjs +9 -1
  6. package/fesm2022/ojiepermana-angular-component-alert.mjs +4 -2
  7. package/fesm2022/ojiepermana-angular-component-button.mjs +1 -1
  8. package/fesm2022/ojiepermana-angular-component-composer.mjs +68 -19
  9. package/fesm2022/ojiepermana-angular-component-dropdown-menu.mjs +1 -1
  10. package/fesm2022/ojiepermana-angular-component-editor.mjs +68 -12
  11. package/fesm2022/ojiepermana-angular-component-form.mjs +2 -2
  12. package/fesm2022/ojiepermana-angular-component-input-group.mjs +1 -1
  13. package/fesm2022/ojiepermana-angular-component-input-otp.mjs +1 -1
  14. package/fesm2022/ojiepermana-angular-component-input.mjs +1 -1
  15. package/fesm2022/ojiepermana-angular-component-native-select.mjs +1 -1
  16. package/fesm2022/ojiepermana-angular-component-pillbox.mjs +1 -1
  17. package/fesm2022/ojiepermana-angular-component-select.mjs +2 -2
  18. package/fesm2022/ojiepermana-angular-component-textarea.mjs +1 -1
  19. package/fesm2022/ojiepermana-angular-component-utils-core.mjs +7 -1
  20. package/fesm2022/{ojiepermana-angular-navigation-navigation-badge-count.component-Bx89vXtg.mjs → ojiepermana-angular-navigation-navigation-badge-count.component-RkecLYjX.mjs} +28 -18
  21. package/fesm2022/{ojiepermana-angular-navigation-navigation-dockbar-menu.component-B2o_omfJ.mjs → ojiepermana-angular-navigation-navigation-dockbar-menu.component-Dl7VAyfV.mjs} +3 -3
  22. package/fesm2022/{ojiepermana-angular-navigation-navigation-entry-grid.component-CJGBKA8c.mjs → ojiepermana-angular-navigation-navigation-entry-grid.component-2Jw-868m.mjs} +6 -4
  23. package/fesm2022/{ojiepermana-angular-navigation-navigation-flyout-menu.component-CHVjP7ew.mjs → ojiepermana-angular-navigation-navigation-flyout-menu.component-QHUdqD1N.mjs} +8 -8
  24. package/fesm2022/{ojiepermana-angular-navigation-navigation-horizontal.component-znRwi38r.mjs → ojiepermana-angular-navigation-navigation-horizontal.component-CoX6X3C2.mjs} +5 -5
  25. package/fesm2022/{ojiepermana-angular-navigation-navigation-item.component-CIy9MVBy.mjs → ojiepermana-angular-navigation-navigation-item.component-DTVh0wjc.mjs} +15 -5
  26. package/fesm2022/{ojiepermana-angular-navigation-navigation-list.component-BIQM2uf1.mjs → ojiepermana-angular-navigation-navigation-list.component-CRRaXJz4.mjs} +1 -1
  27. package/fesm2022/ojiepermana-angular-navigation.mjs +45 -23
  28. package/fesm2022/ojiepermana-angular-theme-component-settings.mjs +17 -5
  29. package/fesm2022/ojiepermana-angular-theme-layout-wrapper.mjs +72 -18
  30. package/fesm2022/ojiepermana-angular-theme-page-core.mjs +160 -92
  31. package/fesm2022/ojiepermana-angular-theme-page-filter.mjs +9 -17
  32. package/fesm2022/ojiepermana-angular-theme-page-root.mjs +16 -6
  33. package/fesm2022/ojiepermana-angular-theme-page-side.mjs +10 -18
  34. package/fesm2022/ojiepermana-angular-theme-shell.mjs +2 -0
  35. package/fesm2022/ojiepermana-angular-theme-styles.mjs +22 -3
  36. package/navigation/README.md +17 -0
  37. package/package.json +5 -5
  38. package/sdk/README.md +15 -4
  39. package/sdk/schematics/sdk/index.js +84 -12
  40. package/theme/layout/README.md +2 -1
  41. package/theme/page/README.md +5 -3
  42. package/theme/styles/css/base/components.css +90 -0
  43. package/theme/styles/css/base/prefers-dark.css +1 -0
  44. package/theme/styles/css/base/tailwind.css +6 -0
  45. package/theme/styles/css/base/theme.css +3 -0
  46. package/theme/styles/css/base/tokens.css +13 -0
  47. package/theme/styles/css/color/brand.css +16 -0
  48. package/types/ojiepermana-angular-component-composer.d.ts +5 -1
  49. package/types/ojiepermana-angular-component-editor.d.ts +4 -0
  50. package/types/ojiepermana-angular-navigation-types.d.ts +6 -0
  51. package/types/ojiepermana-angular-navigation.d.ts +13 -3
  52. package/types/ojiepermana-angular-theme-component-settings.d.ts +10 -0
  53. package/types/ojiepermana-angular-theme-layout-wrapper.d.ts +24 -1
  54. package/types/ojiepermana-angular-theme-page-core.d.ts +8 -9
  55. package/types/ojiepermana-angular-theme-page-root.d.ts +1 -0
  56. package/types/ojiepermana-angular-theme-styles.d.ts +3 -2
@@ -1,3 +1,4 @@
1
+ import { DOCUMENT } from "@angular/common";
1
2
  import * as i0 from "@angular/core";
2
3
  import { Component, booleanAttribute, computed, contentChild, effect, inject, input, output } from "@angular/core";
3
4
  import { Grip } from "lucide";
@@ -11,7 +12,7 @@ import { PageFilterComponent } from "@ojiepermana/angular/theme/page/filter";
11
12
  import { PageOverviewComponent } from "@ojiepermana/angular/theme/page/overview";
12
13
  import { PageHeaderComponent } from "@ojiepermana/angular/theme/page/slots";
13
14
  import { PageSideComponent } from "@ojiepermana/angular/theme/page/side";
14
- import { PAGE_DEFAULT_APPEARANCE, PAGE_DEFAULT_FILTER_PLACEMENT, PAGE_DEFAULT_FILTER_WIDTH, PAGE_DEFAULT_HEIGHT, PAGE_DEFAULT_SCROLL, PAGE_DEFAULT_SIDE_MODE, PAGE_DEFAULT_SIDE_POSITION, PAGE_DEFAULT_SIDE_WIDTH, PAGE_DEFAULT_VARIANT, PageStateService } from "@ojiepermana/angular/theme/page/core";
15
+ import { PAGE_DEFAULT_APPEARANCE, PAGE_DEFAULT_FILTER_PLACEMENT, PAGE_DEFAULT_FILTER_WIDTH, PAGE_DEFAULT_HEIGHT, PAGE_DEFAULT_SCROLL, PAGE_DEFAULT_SIDE_MODE, PAGE_DEFAULT_SIDE_POSITION, PAGE_DEFAULT_SIDE_WIDTH, PAGE_DEFAULT_VARIANT, PageStateService, ɵisActivePageOverlay } from "@ojiepermana/angular/theme/page/core";
15
16
  const OVERVIEW_STACKED_ROWS = [
16
17
  "grid-rows-[auto_auto_minmax(0,1fr)]",
17
18
  "[&>[data-page-slot=filter]]:row-start-1",
@@ -28,6 +29,7 @@ const OVERVIEW_ROWS = [
28
29
  let pageAppsLauncherInstanceId = 0;
29
30
  var PageComponent = class PageComponent {
30
31
  page = inject(PageStateService);
32
+ document = inject(DOCUMENT);
31
33
  layout = inject(LayoutService, { optional: true });
32
34
  navigation = inject(NAVIGATION_ADAPTER, { optional: true });
33
35
  identity = inject(LayoutIdentityService, { optional: true });
@@ -77,7 +79,7 @@ var PageComponent = class PageComponent {
77
79
  appsBrand = computed(() => this.identity?.brand() ?? null, ...ngDevMode ? [{ debugName: "appsBrand" }] : /* istanbul ignore next */ []);
78
80
  appsUser = computed(() => this.identity?.user() ?? null, ...ngDevMode ? [{ debugName: "appsUser" }] : /* istanbul ignore next */ []);
79
81
  hostClasses = computed(() => cn("relative block h-full min-h-0 w-full min-w-0 overflow-hidden text-foreground", this.class()), ...ngDevMode ? [{ debugName: "hostClasses" }] : /* istanbul ignore next */ []);
80
- shellClasses = computed(() => cn("relative z-10 h-full min-h-0 w-full min-w-0", this.scroll() === "content" && "grid grid-rows-[auto_minmax(0,1fr)_auto]", this.scroll() === "page" && "overflow-auto"), ...ngDevMode ? [{ debugName: "shellClasses" }] : /* istanbul ignore next */ []);
82
+ shellClasses = computed(() => cn("relative h-full min-h-0 w-full min-w-0", !this.showsOverlayBackdrop() && "z-10", this.scroll() === "content" && "grid grid-rows-[auto_minmax(0,1fr)_auto]", this.scroll() === "page" && "overflow-auto"), ...ngDevMode ? [{ debugName: "shellClasses" }] : /* istanbul ignore next */ []);
81
83
  bodyClasses = computed(() => {
82
84
  if (this.variant() !== "side") return cn("relative min-w-0", this.scroll() === "content" && "min-h-0");
83
85
  const sideMode = this.resolvedSideMode();
@@ -132,8 +134,8 @@ var PageComponent = class PageComponent {
132
134
  });
133
135
  }
134
136
  handleBackdropClick() {
135
- if (this.showsSideOverlayBackdrop()) this.page.closeSide();
136
- if (this.showsFilterOverlayBackdrop()) this.page.closeFilter();
137
+ if (ɵisActivePageOverlay(this.document, this.page.sideId())) this.page.closeSide();
138
+ else if (ɵisActivePageOverlay(this.document, this.page.filterId())) this.page.closeFilter();
137
139
  }
138
140
  static ɵfac = i0.ɵɵngDeclareFactory({
139
141
  minVersion: "12.0.0",
@@ -319,9 +321,12 @@ var PageComponent = class PageComponent {
319
321
  @if (showsOverlayBackdrop()) {
320
322
  <button
321
323
  type="button"
324
+ tabindex="-1"
325
+ aria-hidden="true"
322
326
  [attr.aria-label]="overlayCloseLabel()"
323
327
  data-page-overlay-backdrop
324
- class="absolute inset-0 z-20 bg-[hsl(var(--overlay-backdrop))]"
328
+ class="absolute inset-0 z-20 overflow-hidden overscroll-contain bg-[hsl(var(--overlay-backdrop))]"
329
+ (mousedown)="$event.preventDefault()"
325
330
  (click)="handleBackdropClick()"
326
331
  ></button>
327
332
  }
@@ -388,6 +393,7 @@ var PageComponent = class PageComponent {
388
393
  "compact",
389
394
  "collapse-tree",
390
395
  "rail",
396
+ "badge-indicator",
391
397
  "class",
392
398
  "itemClass",
393
399
  "nav-group-class",
@@ -444,6 +450,7 @@ var PageComponent = class PageComponent {
444
450
  "show-initial",
445
451
  "show-email",
446
452
  "show-theme-settings",
453
+ "show-logout",
447
454
  "logoutLabel",
448
455
  "logoutIcon"
449
456
  ],
@@ -495,9 +502,12 @@ i0.ɵɵngDeclareClassMetadata({
495
502
  @if (showsOverlayBackdrop()) {
496
503
  <button
497
504
  type="button"
505
+ tabindex="-1"
506
+ aria-hidden="true"
498
507
  [attr.aria-label]="overlayCloseLabel()"
499
508
  data-page-overlay-backdrop
500
- class="absolute inset-0 z-20 bg-[hsl(var(--overlay-backdrop))]"
509
+ class="absolute inset-0 z-20 overflow-hidden overscroll-contain bg-[hsl(var(--overlay-backdrop))]"
510
+ (mousedown)="$event.preventDefault()"
501
511
  (click)="handleBackdropClick()"
502
512
  ></button>
503
513
  }
@@ -1,8 +1,8 @@
1
1
  import { DOCUMENT } from "@angular/common";
2
2
  import * as i0 from "@angular/core";
3
- import { Component, ElementRef, computed, effect, inject, input, output, untracked } from "@angular/core";
3
+ import { Component, ElementRef, computed, effect, inject, input, output } from "@angular/core";
4
4
  import { cn } from "@ojiepermana/angular/component/utils/core";
5
- import { PAGE_DEFAULT_SCROLL, PAGE_DEFAULT_SIDE_WIDTH, PageStateService, ɵsetupOverlayFocusManagement } from "@ojiepermana/angular/theme/page/core";
5
+ import { PAGE_DEFAULT_SCROLL, PAGE_DEFAULT_SIDE_WIDTH, PageStateService, ɵPAGE_PANEL_OVERLAY_PROVIDERS, ɵsetupOverlayFocusManagement } from "@ojiepermana/angular/theme/page/core";
6
6
  let nextPageSideId = 0;
7
7
  var PageSideComponent = class PageSideComponent {
8
8
  document = inject(DOCUMENT, { optional: true });
@@ -32,15 +32,17 @@ var PageSideComponent = class PageSideComponent {
32
32
  classes = computed(() => {
33
33
  const position = this.resolvedPosition();
34
34
  const sideOpen = this.page.sideOpen();
35
- return cn("block min-h-0 border-border bg-background", this.resolvedScroll() === "content" && "h-full overflow-auto", this.resolvedScroll() === "page" && "overflow-visible", this.isSticky() && "shrink-0 w-[var(--page-side-width)]", this.isSticky() && position === "left" && "border-r", this.isSticky() && position === "right" && "order-last border-l", this.isDrawer() && "absolute inset-y-0 z-20 w-[var(--page-side-width)] border shadow-sm transition-transform duration-normal ease-out motion-reduce:transition-none", this.isDrawer() && position === "left" && (sideOpen ? "left-0 translate-x-0" : "left-0 -translate-x-full"), this.isDrawer() && position === "right" && (sideOpen ? "right-0 translate-x-0" : "right-0 translate-x-full"), this.isOverlay() && "absolute inset-y-0 z-30 w-[var(--page-side-width)] border shadow-md transition-transform duration-normal ease-out motion-reduce:transition-none", this.isOverlay() && position === "left" && (sideOpen ? "left-0 translate-x-0" : "left-0 -translate-x-full"), this.isOverlay() && position === "right" && (sideOpen ? "right-0 translate-x-0" : "right-0 translate-x-full"), this.class());
35
+ return cn("block min-h-0 border-border bg-background", this.resolvedScroll() === "content" && "h-full overflow-auto", this.resolvedScroll() === "page" && "overflow-visible", this.isSticky() && "shrink-0 w-[var(--page-side-width)]", this.isSticky() && position === "left" && "border-r", this.isSticky() && position === "right" && "order-last border-l", this.isDrawer() && "absolute inset-y-0 z-20 w-[var(--page-side-width)] border shadow-sm transition-transform duration-normal ease-out motion-reduce:transition-none", this.isDrawer() && position === "left" && (sideOpen ? "left-0 translate-x-0" : "left-0 -translate-x-full"), this.isDrawer() && position === "right" && (sideOpen ? "right-0 translate-x-0" : "right-0 translate-x-full"), this.isOverlay() && "overflow-auto overscroll-contain [&:not([inert])]:z-40 [&[inert]>.cdk-overlay-container]:hidden", this.isOverlay() && "absolute inset-y-0 z-30 w-[var(--page-side-width)] border shadow-md transition-transform duration-normal ease-out motion-reduce:transition-none", this.isOverlay() && position === "left" && (sideOpen ? "left-0 translate-x-0" : "left-0 -translate-x-full"), this.isOverlay() && position === "right" && (sideOpen ? "right-0 translate-x-0" : "right-0 translate-x-full"), this.class());
36
36
  }, ...ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []);
37
37
  constructor() {
38
38
  ɵsetupOverlayFocusManagement({
39
39
  document: this.document,
40
40
  host: this.host.nativeElement,
41
- isOpen: this.page.sideOpen,
41
+ isOpen: computed(() => this.page.variant() === "side" && this.page.sideOpen()),
42
42
  isInteractive: this.isInteractive,
43
43
  isModal: this.isOverlay,
44
+ closeOnEsc: this.closeOnEsc,
45
+ close: () => this.page.closeSide(),
44
46
  takeReturnFocus: () => this.page.takeSideReturnFocus()
45
47
  });
46
48
  effect(() => {
@@ -51,20 +53,6 @@ var PageSideComponent = class PageSideComponent {
51
53
  id: this.resolvedId
52
54
  });
53
55
  });
54
- effect((onCleanup) => {
55
- if (!this.closeOnEsc() || this.isSticky()) return;
56
- const defaultView = this.document?.defaultView;
57
- if (!defaultView) return;
58
- const handler = (event) => {
59
- if (event.key !== "Escape") return;
60
- if (!untracked(() => this.page.sideOpen())) return;
61
- untracked(() => {
62
- this.page.closeSide();
63
- });
64
- };
65
- defaultView.addEventListener("keydown", handler);
66
- onCleanup(() => defaultView.removeEventListener("keydown", handler));
67
- });
68
56
  }
69
57
  static ɵfac = i0.ɵɵngDeclareFactory({
70
58
  minVersion: "12.0.0",
@@ -137,8 +125,10 @@ var PageSideComponent = class PageSideComponent {
137
125
  "attr.aria-modal": "ariaModal()",
138
126
  "attr.aria-label": "dialogLabel()",
139
127
  "attr.tabindex": "dialogTabindex()",
128
+ "style.translate": "isOverlay() && page.sideOpen() ? \"none\" : null",
140
129
  "style.--page-side-width": "resolvedWidth()"
141
130
  } },
131
+ providers: ɵPAGE_PANEL_OVERLAY_PROVIDERS,
142
132
  ngImport: i0,
143
133
  template: `<ng-content />`,
144
134
  isInline: true
@@ -153,6 +143,7 @@ i0.ɵɵngDeclareClassMetadata({
153
143
  type: Component,
154
144
  args: [{
155
145
  selector: "PageSide",
146
+ providers: ɵPAGE_PANEL_OVERLAY_PROVIDERS,
156
147
  host: {
157
148
  "[class]": "classes()",
158
149
  "[attr.id]": "resolvedId",
@@ -166,6 +157,7 @@ i0.ɵɵngDeclareClassMetadata({
166
157
  "[attr.aria-modal]": "ariaModal()",
167
158
  "[attr.aria-label]": "dialogLabel()",
168
159
  "[attr.tabindex]": "dialogTabindex()",
160
+ "[style.translate]": "isOverlay() && page.sideOpen() ? \"none\" : null",
169
161
  "[style.--page-side-width]": "resolvedWidth()"
170
162
  },
171
163
  template: `<ng-content />`
@@ -120,6 +120,7 @@ var ShellNavigationFlyoutComponent = class ShellNavigationFlyoutComponent {
120
120
  "compact",
121
121
  "collapse-tree",
122
122
  "rail",
123
+ "badge-indicator",
123
124
  "class",
124
125
  "itemClass",
125
126
  "nav-group-class",
@@ -176,6 +177,7 @@ var ShellNavigationFlyoutComponent = class ShellNavigationFlyoutComponent {
176
177
  "show-initial",
177
178
  "show-email",
178
179
  "show-theme-settings",
180
+ "show-logout",
179
181
  "logoutLabel",
180
182
  "logoutIcon"
181
183
  ],
@@ -202,6 +202,18 @@ function brandRing(color, background) {
202
202
  from: parsed.l
203
203
  }) ?? color;
204
204
  }
205
+ function brandInk(color, background) {
206
+ const parsed = parseHslTriplet(color);
207
+ if (!parsed) return null;
208
+ if (contrastRatio(color, background) >= TEXT_CONTRAST_MIN) return color;
209
+ return solveLightnessNearest({
210
+ h: parsed.h,
211
+ s: parsed.s,
212
+ against: [background],
213
+ min: TEXT_CONTRAST_MIN,
214
+ from: parsed.l
215
+ }) ?? color;
216
+ }
205
217
  function brandPatternHueSaturation(color) {
206
218
  const parsed = parseHslTriplet(color);
207
219
  return parsed ? `${parsed.h} ${parsed.s}%` : null;
@@ -240,14 +252,21 @@ var ThemeBrandService = class ThemeBrandService {
240
252
  "--brand-foreground": null,
241
253
  "--brand-pattern-hs": null,
242
254
  "--brand-ring-light": null,
243
- "--brand-ring-dark": null
255
+ "--brand-ring-dark": null,
256
+ "--brand-ink-light": null,
257
+ "--brand-ink-dark": null,
258
+ "--brand-ink-dark-foreground": null
244
259
  };
260
+ const inkDark = brandInk(brand.color, RING_BACKGROUNDS.dark);
245
261
  return {
246
262
  "--brand": brand.color,
247
263
  "--brand-foreground": brand.foreground,
248
264
  "--brand-pattern-hs": brandPatternHueSaturation(brand.color),
249
265
  "--brand-ring-light": brandRing(brand.color, RING_BACKGROUNDS.light),
250
- "--brand-ring-dark": brandRing(brand.color, RING_BACKGROUNDS.dark)
266
+ "--brand-ring-dark": brandRing(brand.color, RING_BACKGROUNDS.dark),
267
+ "--brand-ink-light": brandInk(brand.color, RING_BACKGROUNDS.light),
268
+ "--brand-ink-dark": inkDark,
269
+ "--brand-ink-dark-foreground": inkDark ? foregroundFor$1(inkDark, "dark") : null
251
270
  };
252
271
  }
253
272
  parseStored(raw) {
@@ -448,7 +467,7 @@ i0.ɵɵngDeclareClassMetadata({
448
467
  type: ThemeSpaceService,
449
468
  decorators: [{ type: Service }]
450
469
  });
451
- const UI_THEME_RELEASE_VERSION = "22.2.14";
470
+ const UI_THEME_RELEASE_VERSION = "22.2.18";
452
471
  const THEME_STORAGE_VERSION_KEY = "theme-storage-version";
453
472
  function validateThemeStorageReset(options) {
454
473
  if ("storageVersion" in options) throw new Error("storageVersion was removed. Migrate to storageReset: { preserveKeys: [] }; the package supplies the version.");
@@ -63,6 +63,22 @@ Type dipilih lewat komponen anak deklaratif (`NavigationSidebar`, `NavigationDoc
63
63
  - `badge-context` on `Navigation` supplies one reactive badge registry for every navigation type, keyed by
64
64
  `NavigationItem.badge.source` (and route `data.navigationBadge` for the dockbar header).
65
65
  `NavigationDockbar` also accepts `badge-context`; its legacy `dockbar-badge` input remains supported.
66
+ - `badge-indicator` on `Navigation` accepts `chevron` (default) or `dot`. With `dot`, a collapsible
67
+ target that shows a visible count badge drops its chevron, the badge takes the chevron's place at
68
+ the end of the row, and a small dot sits on the badge's bottom-right corner: filled while closed,
69
+ outlined while open. It applies to sidebar and drawer items (every level), the dockbar side panel,
70
+ a collapsed sidebar while its hover/focus preview is expanded, flyout tabs (including descendant
71
+ totals), and navbar/flyout grid entries. Compact rails and the minidock render no chevron and are
72
+ untouched. A badge that drops to zero brings the chevron back. The dot is a decorative
73
+ pseudo-element; `aria-expanded` and the badge's `aria-label` are unchanged. The dot takes the
74
+ item's own text color in its current state (foreground at rest, accent foreground on hover,
75
+ primary foreground when active), so it keeps that text's contrast on every surface. The ring
76
+ around the dot is a transparent cutout in the badge, so it always shows the item's real surface
77
+ (rest, hover, active, light or dark). Tune it with `--nav-badge-dot-size`,
78
+ `--nav-badge-dot-offset`, `--nav-badge-dot-color` (default `currentColor`),
79
+ `--nav-badge-dot-ring`, `--nav-badge-dot-ring-color` (default `transparent`, which keeps the
80
+ cutout), and `--nav-badge-dot-stroke` (the open-state outline).
81
+ `LayoutWrapperDefault` forwards it to its desktop and mobile navigation as `nav-badge-indicator`.
66
82
  - `ariaLabel` overrides the host navigation label and defaults to `Primary navigation`.
67
83
  - `label` on `NavigationFlyout` sets the single trigger label and defaults to `Menu`.
68
84
  - `icon` on `NavigationFlyout` renders a Lucide icon on the trigger (the name must be registered with `provideIcons()`); `icon-position` (`start`/`end`) sets its placement and `icon-only` hides the label visually while keeping it as the accessible name (compact mode is always icon-only and falls back to the `menu` icon).
@@ -131,6 +147,7 @@ Inputs pada `<Navigation>` (container):
131
147
  | `ariaLabel` | `string` | Accessible label on the host navigation landmark. |
132
148
  | `compact` | `boolean` | Compatibility alias for collapsed-rail item layout. |
133
149
  | `rail` | `default \| rail-active` | Extent of parent to child connectors in sidebar and dockbar. |
150
+ | `badge-indicator` | `chevron \| dot` | Swap a collapsible's chevron for a dot on its visible count badge. |
134
151
  | `collapse-tree` | `stairs \| straight` | Controls nested connector styling for collapsible items. |
135
152
  | `class` | `string` | Extra classes for the host `nav`. |
136
153
  | `itemClass` | `string` | Shared classes applied to rendered nav items. |
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ojiepermana/angular",
3
- "version": "22.2.14",
3
+ "version": "22.2.18",
4
4
  "description": "Accessible, tree-shakable Angular 22 design system from ojiepermana: UI components, charts, navigation shells, theme tokens, and an OpenAPI SDK generator.",
5
5
  "license": "MIT",
6
6
  "keywords": [
@@ -27,12 +27,12 @@
27
27
  },
28
28
  "repository": {
29
29
  "type": "git",
30
- "url": "git+https://github.com/ojiepermana/angular.git",
30
+ "url": "git+https://github.com/ojiepermana/angular-ui.git",
31
31
  "directory": "packages/angular"
32
32
  },
33
- "homepage": "https://github.com/ojiepermana/angular#readme",
33
+ "homepage": "https://github.com/ojiepermana/angular-ui#readme",
34
34
  "bugs": {
35
- "url": "https://github.com/ojiepermana/angular/issues",
35
+ "url": "https://github.com/ojiepermana/angular-ui/issues",
36
36
  "email": "me@ojiepermana.com"
37
37
  },
38
38
  "peerDependencies": {
@@ -508,5 +508,5 @@
508
508
  "module": "fesm2022/ojiepermana-angular.mjs",
509
509
  "typings": "types/ojiepermana-angular.d.ts",
510
510
  "type": "module",
511
- "gitHead": "6543e9e47023dace11af78cd9bcd430406df3e0a"
511
+ "gitHead": "dcf3ef89367ad01320ae66bca71b4031bd1015b6"
512
512
  }
package/sdk/README.md CHANGED
@@ -186,10 +186,21 @@ sdk.config.json → loader → spec (YAML/JSON) → IR → emitters → layout
186
186
 
187
187
  ### Output ownership and safe cleanup
188
188
 
189
- Each generated output directory contains `.ojiepermana-sdk-manifest.json` with
190
- the relative files owned by the generator. A later run deletes stale files only
191
- when they were recorded in that manifest; unrelated source and documentation in
192
- the same directory are preserved.
189
+ Each generated output directory contains an ownership manifest named after the
190
+ package scope, `.<scope>-sdk-manifest.json` (for this package, the scope of
191
+ `@ojiepermana/angular`), listing the relative files owned by the generator. A later
192
+ run deletes stale files only when they were recorded in that manifest; unrelated
193
+ source and documentation in the same directory are preserved.
194
+
195
+ Releases before brand aware manifests wrote `.ojiepermana-sdk-manifest.json` for
196
+ every brand. The generator migrates that file, or another brand's manifest after
197
+ a brand switch, automatically: it validates the old manifest, uses it to clean up
198
+ stale SDK files, writes the new manifest, and deletes the old one in the same Tree
199
+ transaction. If several manifests exist they must all be valid and record the
200
+ same files; otherwise the run stops with a `conflicting ownership manifests`
201
+ error and changes nothing. Keep the manifest that matches the generated files and
202
+ delete the other. Every `.<scope>-sdk-manifest.json` name is reserved and can
203
+ never be emitted or recorded as an SDK file.
193
204
 
194
205
  The schematic rejects output at the workspace root, outside the workspace, or
195
206
  inside `.git`/`node_modules`, and rejects absolute, traversing, duplicate, and
@@ -1,12 +1,25 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.sdk = sdk;
4
+ exports.sdkManifestName = sdkManifestName;
4
5
  exports.writeResult = writeResult;
5
6
  const node_path_1 = require("node:path");
6
7
  const loader_1 = require("../../src/config/loader");
7
8
  const engine_1 = require("../../src/engine");
8
- const OUTPUT_MANIFEST = '.ojiepermana-sdk-manifest.json';
9
+ /**
10
+ * The package name token. A branded release substitutes it, so the manifest
11
+ * name below follows the brand (`@acme/angular` → `.acme-sdk-manifest.json`)
12
+ * without any brand specific code.
13
+ */
14
+ const PACKAGE_NAME = '@ojiepermana/angular';
9
15
  const OUTPUT_MANIFEST_VERSION = 1;
16
+ /**
17
+ * Any brand's ownership manifest at the output root. Every release before
18
+ * brand aware manifests wrote `.ojiepermana-sdk-manifest.json`, whatever the
19
+ * brand; a consumer who switches brands carries the previous brand's name.
20
+ * Both are migrated to the current brand's manifest automatically.
21
+ */
22
+ const BRAND_MANIFEST_PATTERN = /^\.([a-z0-9][a-z0-9._-]*)-sdk-manifest\.json$/;
10
23
  /**
11
24
  * Schematic factory. Reads `sdk.config.json` at the workspace root, runs the
12
25
  * pure generator, and writes each emitted file into the Tree. Angular CLI
@@ -39,17 +52,31 @@ function selectTargets(targets, selector) {
39
52
  t.output.toLowerCase().includes(lc) ||
40
53
  t.packageName.toLowerCase() === lc);
41
54
  }
42
- function writeResult(tree, workspaceRoot, result, context) {
55
+ /** The ownership manifest file name for a package name such as `@acme/angular`. */
56
+ function sdkManifestName(packageName = PACKAGE_NAME) {
57
+ const scope = /^@([a-z0-9][a-z0-9._-]*)\//.exec(packageName)?.[1];
58
+ if (!scope) {
59
+ throw new Error(`Cannot derive an SDK manifest name from package "${packageName}".`);
60
+ }
61
+ return `.${scope}-sdk-manifest.json`;
62
+ }
63
+ function writeResult(tree, workspaceRoot, result, context, options = {}) {
64
+ const manifestName = sdkManifestName(options.packageName);
43
65
  const outputRoot = validateOutputDirectory(workspaceRoot, result.outputDir);
44
- const files = validateGeneratedFiles(result);
66
+ const files = validateGeneratedFiles(result, manifestName);
45
67
  const relOutput = (0, node_path_1.relative)((0, node_path_1.resolve)(workspaceRoot), (0, node_path_1.resolve)(result.outputDir));
46
68
  context.logger.info(`[sdk] ${result.target.mode} → ${relOutput} ` +
47
69
  `(schemas=${result.stats.schemas}, operations=${result.stats.operations}, ` +
48
70
  `tags=${result.stats.tags}, files=${result.stats.files})`);
49
- const manifestPath = `${outputRoot}/${OUTPUT_MANIFEST}`;
50
- const previousFiles = readManifest(tree, manifestPath);
71
+ // Every check runs before the first mutation, so a rejected run leaves the
72
+ // Tree (and therefore the disk) untouched.
73
+ const manifestPath = `${outputRoot}/${manifestName}`;
74
+ const { previousFiles, foreignManifests } = resolveOwnership(tree, outputRoot, manifestName);
51
75
  const nextFiles = new Set(files.map((file) => file.path));
52
- assertWritableFiles(tree, outputRoot, files, previousFiles);
76
+ assertWritableFiles(tree, outputRoot, files, previousFiles, manifestName);
77
+ for (const foreign of foreignManifests) {
78
+ context.logger.info(`[sdk] migrating ownership manifest ${relOutput}/${foreign} → ${relOutput}/${manifestName}`);
79
+ }
53
80
  removeStaleFiles(tree, outputRoot, previousFiles, nextFiles);
54
81
  for (const file of files) {
55
82
  const treePath = `${outputRoot}/${file.path}`;
@@ -72,6 +99,51 @@ function writeResult(tree, workspaceRoot, result, context) {
72
99
  else {
73
100
  tree.create(manifestPath, manifestBuffer);
74
101
  }
102
+ for (const foreign of foreignManifests) {
103
+ tree.delete(`${outputRoot}/${foreign}`);
104
+ }
105
+ }
106
+ /**
107
+ * Decide which files the generator owned before this run.
108
+ *
109
+ * The current brand's manifest wins when it is alone. Other brands'
110
+ * manifests (the pre brand `.ojiepermana-` name included) are migrated: each
111
+ * must be valid, and when more than one manifest exists they must all record
112
+ * the same version and the same file set. Ownership is never merged and an
113
+ * invalid manifest is never skipped in favour of another one.
114
+ */
115
+ function resolveOwnership(tree, outputRoot, manifestName) {
116
+ const foreignManifests = tree
117
+ .getDir(outputRoot)
118
+ .subfiles.map(String)
119
+ .filter((name) => name !== manifestName && isReservedManifestName(name))
120
+ .sort();
121
+ const candidates = [
122
+ ...(tree.exists(`${outputRoot}/${manifestName}`) ? [manifestName] : []),
123
+ ...foreignManifests,
124
+ ];
125
+ if (candidates.length === 0) {
126
+ return { previousFiles: new Set(), foreignManifests };
127
+ }
128
+ const manifests = candidates.map((name) => ({
129
+ name,
130
+ files: readManifest(tree, `${outputRoot}/${name}`),
131
+ }));
132
+ const [primary, ...others] = manifests;
133
+ for (const other of others) {
134
+ if (!sameFiles(primary.files, other.files)) {
135
+ throw new Error(`SDK output "${outputRoot.slice(1)}" holds conflicting ownership manifests ` +
136
+ `"${primary.name}" and "${other.name}". Nothing was changed. Keep the manifest ` +
137
+ `that matches the generated files, delete the other, and run the generator again.`);
138
+ }
139
+ }
140
+ return { previousFiles: primary.files, foreignManifests };
141
+ }
142
+ function isReservedManifestName(name) {
143
+ return BRAND_MANIFEST_PATTERN.test(name);
144
+ }
145
+ function sameFiles(a, b) {
146
+ return a.size === b.size && [...a].every((file) => b.has(file));
75
147
  }
76
148
  function validateOutputDirectory(workspaceRoot, outputDir) {
77
149
  const workspace = (0, node_path_1.resolve)(workspaceRoot);
@@ -94,12 +166,12 @@ function validateOutputDirectory(workspaceRoot, outputDir) {
94
166
  }
95
167
  return `/${posix}`;
96
168
  }
97
- function validateGeneratedFiles(result) {
169
+ function validateGeneratedFiles(result, manifestName) {
98
170
  const seen = new Set();
99
171
  return result.files.map((file) => {
100
172
  const path = normalizeVirtualPath(file.path);
101
- if (path === OUTPUT_MANIFEST) {
102
- throw new Error(`Generated SDK output cannot use the reserved path "${OUTPUT_MANIFEST}".`);
173
+ if (path === manifestName || isReservedManifestName(path)) {
174
+ throw new Error(`Generated SDK output cannot use the reserved path "${path}".`);
103
175
  }
104
176
  if (seen.has(path)) {
105
177
  throw new Error(`Generated SDK output contains the duplicate path "${path}".`);
@@ -136,7 +208,7 @@ function readManifest(tree, manifestPath) {
136
208
  const files = new Set();
137
209
  for (const file of manifest.files) {
138
210
  const path = normalizeVirtualPath(file);
139
- if (path === OUTPUT_MANIFEST || files.has(path)) {
211
+ if (isReservedManifestName(path) || files.has(path)) {
140
212
  throw new Error(`SDK output manifest contains an invalid or duplicate path: "${file}".`);
141
213
  }
142
214
  files.add(path);
@@ -161,7 +233,7 @@ function removeStaleFiles(tree, outputRoot, previousFiles, nextFiles) {
161
233
  }
162
234
  }
163
235
  }
164
- function assertWritableFiles(tree, outputRoot, files, previousFiles) {
236
+ function assertWritableFiles(tree, outputRoot, files, previousFiles, manifestName) {
165
237
  for (const file of files) {
166
238
  const treePath = `${outputRoot}/${file.path}`;
167
239
  if (!tree.exists(treePath) || previousFiles.has(file.path))
@@ -169,7 +241,7 @@ function assertWritableFiles(tree, outputRoot, files, previousFiles) {
169
241
  const nextContent = Buffer.from(file.content, 'utf8');
170
242
  if (!tree.read(treePath)?.equals(nextContent)) {
171
243
  throw new Error(`Refusing to overwrite unmanaged SDK output "${file.path}". ` +
172
- `Move the file or add it to ${OUTPUT_MANIFEST} only if the generator owns it.`);
244
+ `Move the file or add it to ${manifestName} only if the generator owns it.`);
173
245
  }
174
246
  }
175
247
  }
@@ -390,11 +390,12 @@ export const appConfig = {
390
390
  | `detailed` | `boolean` | `false` | Tampilkan identitas pada semua surface, termasuk navbar/flyout. |
391
391
  | `showEmail` | `boolean` | `true` | Render `user.email` di bawah nama. |
392
392
  | `showThemeSettings` | `boolean` | `true` | Render shortcut `ThemeSettings` di samping logout. |
393
+ | `showLogout` | `boolean` | `true` | Render tombol logout; matikan bila aplikasi tanpa sesi login. |
393
394
  | `logoutLabel` | `string` | `'Logout'` | Accessible name tombol logout. |
394
395
  | `logoutIcon` | `string` | `'log-out'` | Nama ikon Lucide; nama lain didaftarkan lewat `provideIcons()`. |
395
396
 
396
397
  Input pada `<LayoutUser>` sendiri (`detailed`, `show-initial`, `show-email`,
397
- `show-theme-settings`, `logoutLabel`, `logoutIcon`) selalu menang atas opsi
398
+ `show-theme-settings`, `show-logout`, `logoutLabel`, `logoutIcon`) selalu menang atas opsi
398
399
  tersebut; nilai yang tidak diikat jatuh ke opsi, lalu ke default di atas.
399
400
  `show-initial` ada untuk surface yang sudah menampilkan inisial di tempat lain,
400
401
  seperti aside dockbar yang menampilkan inisialnya di rail. Nama panjang
@@ -144,9 +144,11 @@ Latar `PageFilter` memakai token neutral tema yang dilembutkan, `bg-surface/50 t
144
144
  Aksesibilitas: pada mode `drawer`/`overlay`, panel menjadi `role="dialog"` (dengan `aria-modal`
145
145
  khusus `overlay`), fokus dipindahkan ke panel saat terbuka dan dikembalikan ke pemicu saat
146
146
  tertutup, dan saat tertutup panel diberi `inert` sehingga isinya keluar dari tab order.
147
- `overlay` juga men-trap fokus, membuat background Page inert, dan mengunci scroll document;
148
- `drawer` sengaja tetap non-modal. `PageSide` memakai pola yang sama. Menekan `Esc` (atau
149
- mengklik backdrop overlay) menutup panel mengambang yang sedang terbuka.
147
+ `overlay` membatasi fokus ke modal teratas, membuat konten lain di dokumen inert, dan mengunci
148
+ scroll dokumen. Panel dan backdrop tetap mengikuti geometri `Page`. Saat beberapa overlay Page
149
+ terbuka, backdrop dan `Esc` hanya menutup overlay teratas. `PageSide` memakai pola yang sama.
150
+ Mode `drawer` tetap nonmodal. Jika `closeOnEsc` dimatikan, sertakan kontrol tutup yang dapat
151
+ diakses dengan keyboard di dalam panel, misalnya `PageFilterToggle` atau `PageSideToggle`.
150
152
 
151
153
  ### `PageFilterToggle`
152
154
 
@@ -192,6 +192,96 @@
192
192
  z-index: 20;
193
193
  }
194
194
 
195
+ /* Navigation[badge-indicator='dot'] — a collapsible target that shows BOTH its
196
+ * chevron and a visible count badge trades the chevron for a dot on the badge.
197
+ * Everything is keyed on what is rendered, so a badge that drops to zero (the
198
+ * badge element leaves the DOM) brings the chevron straight back, and compact
199
+ * targets, which render no chevron, are never matched.
200
+ *
201
+ * The dot is painted by the badge's slot, not the badge, so `currentColor` is
202
+ * the item's own text color in every state (rest, hover accent, active
203
+ * primary): text that already meets contrast on the item's surface. A color
204
+ * captured on the trigger could not reach a pseudo-element inside the badge,
205
+ * because currentColor inherits as a keyword and re-resolves against the
206
+ * badge's own text color.
207
+ *
208
+ * The ring is not painted either: the badge's mask cuts a hole the size of the
209
+ * dot plus the ring, so the item's real surface (rest, hover, active, layout
210
+ * patterns, light or dark) shows through it. --nav-badge-dot-ring-color paints
211
+ * it instead when a consumer wants an explicit color. */
212
+ [data-navigation-badge-indicator='dot']
213
+ :is(.nav-trigger, [data-navigation-flyout-tab], [data-navigation-flyout-entry]):has(
214
+ > [data-navigation-chevron]
215
+ ):has([data-navigation-badge])
216
+ > [data-navigation-chevron] {
217
+ /* The Icon carries a display utility, and @layer utilities outranks this
218
+ * layer however specific the selector is. */
219
+ display: none !important;
220
+ }
221
+
222
+ [data-navigation-badge-indicator='dot']
223
+ :is(.nav-trigger, [data-navigation-flyout-tab], [data-navigation-flyout-entry]):has(
224
+ > [data-navigation-chevron]
225
+ )
226
+ [data-navigation-badge-slot] {
227
+ --nav-badge-dot-radius: calc(var(--nav-badge-dot-size) / 2);
228
+ --nav-badge-dot-center: calc(var(--nav-badge-dot-offset) + var(--nav-badge-dot-radius));
229
+ /* The slot takes over the badge's place in the row. `contents` is a
230
+ * utility, so only an important declaration in this earlier layer wins. */
231
+ display: inline-flex !important;
232
+ position: relative;
233
+ flex-shrink: 0;
234
+ align-self: center;
235
+ margin-inline-start: auto;
236
+ }
237
+
238
+ [data-navigation-badge-indicator='dot']
239
+ :is(.nav-trigger, [data-navigation-flyout-tab], [data-navigation-flyout-entry]):has(
240
+ > [data-navigation-chevron]
241
+ )
242
+ [data-navigation-badge] {
243
+ --nav-badge-dot-hole: calc(var(--nav-badge-dot-radius) + var(--nav-badge-dot-ring));
244
+ --nav-badge-dot-mask: radial-gradient(
245
+ circle at calc(100% - var(--nav-badge-dot-center)) calc(100% - var(--nav-badge-dot-center)),
246
+ transparent var(--nav-badge-dot-hole),
247
+ #000 var(--nav-badge-dot-hole)
248
+ );
249
+ -webkit-mask-image: var(--nav-badge-dot-mask);
250
+ mask-image: var(--nav-badge-dot-mask);
251
+ }
252
+
253
+ /* Closed: a filled dot. */
254
+ [data-navigation-badge-indicator='dot']
255
+ :is(.nav-trigger, [data-navigation-flyout-tab], [data-navigation-flyout-entry]):has(
256
+ > [data-navigation-chevron]
257
+ )
258
+ [data-navigation-badge-slot]::after {
259
+ content: '';
260
+ position: absolute;
261
+ right: var(--nav-badge-dot-offset);
262
+ bottom: var(--nav-badge-dot-offset);
263
+ box-sizing: border-box;
264
+ width: var(--nav-badge-dot-size);
265
+ height: var(--nav-badge-dot-size);
266
+ border-radius: 9999px;
267
+ border: var(--nav-badge-dot-stroke) solid var(--nav-badge-dot-color);
268
+ background-color: var(--nav-badge-dot-color);
269
+ box-shadow: 0 0 0 var(--nav-badge-dot-ring) var(--nav-badge-dot-ring-color);
270
+ pointer-events: none;
271
+ }
272
+
273
+ /* Open: an outlined dot. The badge's hole already spans the dot, so the
274
+ * hollow shows the item surface rather than the badge fill behind it. */
275
+ [data-navigation-badge-indicator='dot']
276
+ :is(
277
+ .nav-trigger,
278
+ [data-navigation-flyout-tab],
279
+ [data-navigation-flyout-entry]
280
+ )[aria-expanded='true']:has(> [data-navigation-chevron])
281
+ [data-navigation-badge-slot]::after {
282
+ background-color: transparent;
283
+ }
284
+
195
285
  /* Modal overlay backdrop shared by Dialog, Sheet, and Drawer. The element is
196
286
  * rendered inside the CDK overlay container (outside component view
197
287
  * encapsulation), so its styles must live in this global layer. The default
@@ -15,6 +15,7 @@
15
15
  :root:not([data-mode='light']) {
16
16
  --destructive: 0 62% 45%;
17
17
  --destructive-foreground: 0 0% 95%;
18
+ --destructive-ink: 0 72% 64%;
18
19
  --overlay-backdrop: 0 0% 0% / 0.64;
19
20
  --overlay-backdrop-strong: 0 0% 0% / 0.5;
20
21
  --editor-highlight: 48 70% 30%;
@@ -27,6 +27,9 @@
27
27
 
28
28
  --color-primary: hsl(var(--primary));
29
29
  --color-primary-foreground: hsl(var(--primary-foreground));
30
+ /* The primary as text and icons. Only the brand accent sets --primary-ink
31
+ (a per-mode readable variant, spec 0013); every other accent is its primary. */
32
+ --color-primary-ink: hsl(var(--primary-ink, var(--primary)));
30
33
 
31
34
  --color-brand: hsl(var(--brand));
32
35
  --color-brand-foreground: hsl(var(--brand-foreground));
@@ -36,6 +39,9 @@
36
39
 
37
40
  --color-destructive: hsl(var(--destructive));
38
41
  --color-destructive-foreground: hsl(var(--destructive-foreground));
42
+ /* Destructive as text and icons. Only dark mode sets --destructive-ink
43
+ (spec 0014); in light mode it is the destructive fill. */
44
+ --color-destructive-ink: hsl(var(--destructive-ink, var(--destructive)));
39
45
 
40
46
  --color-success: hsl(var(--success));
41
47
  --color-success-foreground: hsl(var(--success-foreground));