@ojiepermana/angular 21.0.8 → 21.1.4

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 (31) hide show
  1. package/collection.json +28 -28
  2. package/etos/README.md +68 -0
  3. package/etos/package.json +4 -0
  4. package/etos/styles/index.css +15 -0
  5. package/etos/styles/layout.css +186 -0
  6. package/{theme/styles/themes/brand/etos → etos/styles}/style.css +18 -17
  7. package/fesm2022/ojiepermana-angular-etos.mjs +283 -0
  8. package/fesm2022/ojiepermana-angular-etos.mjs.map +1 -0
  9. package/fesm2022/ojiepermana-angular-layout.mjs +23 -10
  10. package/fesm2022/ojiepermana-angular-layout.mjs.map +1 -1
  11. package/fesm2022/ojiepermana-angular-navigation.mjs +32 -21
  12. package/fesm2022/ojiepermana-angular-navigation.mjs.map +1 -1
  13. package/fesm2022/ojiepermana-angular.mjs +1 -0
  14. package/fesm2022/ojiepermana-angular.mjs.map +1 -1
  15. package/generator/api/schematics/init/schema.json +17 -17
  16. package/generator/api/schematics/ng-add/schema.json +13 -13
  17. package/generator/api/schematics/sdk/schema.json +17 -17
  18. package/generator/api/sdk.config.example.json +21 -21
  19. package/generator/guide/guide.config.example.json +8 -8
  20. package/generator/guide/schematics/build/schema.json +12 -12
  21. package/generator/guide/schematics/init/schema.json +17 -17
  22. package/package.json +7 -1
  23. package/theme/styles/etos.css +3 -35
  24. package/theme/styles/themes/library/style/brutal.css +1 -0
  25. package/theme/styles/themes/library/style/default.css +1 -0
  26. package/theme/styles/themes/library/style/sharp.css +1 -0
  27. package/theme/styles/themes/library/style/soft.css +1 -0
  28. package/types/ojiepermana-angular-etos.d.ts +73 -0
  29. package/types/ojiepermana-angular-layout.d.ts +3 -2
  30. package/types/ojiepermana-angular-navigation.d.ts +2 -1
  31. /package/{theme/styles/themes/brand/etos → etos/styles}/color.css +0 -0
@@ -3,7 +3,7 @@ import { inject, DestroyRef, signal, computed, Injectable, PLATFORM_ID, input, C
3
3
  import { Router, NavigationEnd, RouterLink, RouterLinkActive } from '@angular/router';
4
4
  import { takeUntilDestroyed, toSignal } from '@angular/core/rxjs-interop';
5
5
  import { filter, map } from 'rxjs/operators';
6
- import { DOCUMENT, isPlatformBrowser, NgClass, NgTemplateOutlet } from '@angular/common';
6
+ import { DOCUMENT, isPlatformBrowser, NgTemplateOutlet } from '@angular/common';
7
7
  import { MatTooltip } from '@angular/material/tooltip';
8
8
  import { clsx } from 'clsx';
9
9
  import { twMerge } from 'tailwind-merge';
@@ -837,19 +837,20 @@ class SidebarComponent {
837
837
  role="dialog"
838
838
  aria-modal="true"
839
839
  [attr.aria-label]="ariaLabel()"
840
- class="flex h-full w-72 max-w-[85vw] flex-col bg-background text-foreground shadow-xl"
841
- [ngClass]="position() === 'right' ? 'border-l border-border' : 'border-r border-border'">
840
+ class="flex h-full w-72 max-w-[85vw] flex-col border-border bg-background text-foreground shadow-xl"
841
+ [class.border-l]="position() === 'right'"
842
+ [class.border-r]="position() !== 'right'">
842
843
  <ng-container [ngTemplateOutlet]="body" />
843
844
  </div>
844
845
  </ng-template>
845
- `, isInline: true, dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: UiNavItemComponent, selector: "ui-nav-item", inputs: ["item", "level", "compact"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
846
+ `, isInline: true, dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: UiNavItemComponent, selector: "ui-nav-item", inputs: ["item", "level", "compact"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
846
847
  }
847
848
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: SidebarComponent, decorators: [{
848
849
  type: Component,
849
850
  args: [{
850
851
  selector: 'ui-sidebar',
851
852
  changeDetection: ChangeDetectionStrategy.OnPush,
852
- imports: [NgClass, NgTemplateOutlet, UiNavItemComponent],
853
+ imports: [NgTemplateOutlet, UiNavItemComponent],
853
854
  host: {
854
855
  role: 'navigation',
855
856
  '[attr.aria-label]': 'ariaLabel()',
@@ -889,8 +890,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImpor
889
890
  role="dialog"
890
891
  aria-modal="true"
891
892
  [attr.aria-label]="ariaLabel()"
892
- class="flex h-full w-72 max-w-[85vw] flex-col bg-background text-foreground shadow-xl"
893
- [ngClass]="position() === 'right' ? 'border-l border-border' : 'border-r border-border'">
893
+ class="flex h-full w-72 max-w-[85vw] flex-col border-border bg-background text-foreground shadow-xl"
894
+ [class.border-l]="position() === 'right'"
895
+ [class.border-r]="position() !== 'right'">
894
896
  <ng-container [ngTemplateOutlet]="body" />
895
897
  </div>
896
898
  </ng-template>
@@ -922,6 +924,7 @@ class TopbarComponent {
922
924
  /** Tampilkan hamburger di `< md` yang men-toggle mobile drawer sidebar. */
923
925
  showHamburger = input(true, ...(ngDevMode ? [{ debugName: "showHamburger" }] : /* istanbul ignore next */ []));
924
926
  hamburgerLabel = input('Open navigation', ...(ngDevMode ? [{ debugName: "hamburgerLabel" }] : /* istanbul ignore next */ []));
927
+ topbarHeight = 'var(--layout-topbar-height)';
925
928
  /** Resolved items: input jika disediakan, fallback ke registry NavigationService. */
926
929
  resolvedItems = computed(() => {
927
930
  const explicit = this.items();
@@ -960,22 +963,29 @@ class TopbarComponent {
960
963
  isItemActive(id) {
961
964
  return this.nav.isActive(id);
962
965
  }
963
- megaColsClass(columns) {
966
+ megaGridClasses(columns) {
964
967
  const c = Math.min(Math.max(columns ?? 4, 1), 6);
968
+ const classes = ['grid', 'gap-6'];
965
969
  switch (c) {
966
970
  case 1:
967
- return 'grid-cols-1';
971
+ classes.push('grid-cols-1');
972
+ break;
968
973
  case 2:
969
- return 'md:grid-cols-2';
974
+ classes.push('md:grid-cols-2');
975
+ break;
970
976
  case 3:
971
- return 'md:grid-cols-3';
977
+ classes.push('md:grid-cols-3');
978
+ break;
972
979
  case 5:
973
- return 'md:grid-cols-5';
980
+ classes.push('md:grid-cols-5');
981
+ break;
974
982
  case 6:
975
- return 'md:grid-cols-6';
983
+ classes.push('md:grid-cols-6');
984
+ break;
976
985
  default:
977
- return 'md:grid-cols-4';
986
+ classes.push('md:grid-cols-4');
978
987
  }
988
+ return classes.join(' ');
979
989
  }
980
990
  toggleDropdown(trigger, item) {
981
991
  if (this.openId() === item.id)
@@ -1139,8 +1149,8 @@ class TopbarComponent {
1139
1149
  items[0]?.focus();
1140
1150
  }
1141
1151
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: TopbarComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
1142
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.9", type: TopbarComponent, isStandalone: true, selector: "ui-topbar", inputs: { items: { classPropertyName: "items", publicName: "items", isSignal: true, isRequired: false, transformFunction: null }, navigationId: { classPropertyName: "navigationId", publicName: "navigationId", isSignal: true, isRequired: false, transformFunction: null }, appearance: { classPropertyName: "appearance", publicName: "appearance", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null }, class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null }, autoRegister: { classPropertyName: "autoRegister", publicName: "autoRegister", isSignal: true, isRequired: false, transformFunction: null }, showHamburger: { classPropertyName: "showHamburger", publicName: "showHamburger", isSignal: true, isRequired: false, transformFunction: null }, hamburgerLabel: { classPropertyName: "hamburgerLabel", publicName: "hamburgerLabel", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "role": "navigation" }, properties: { "attr.aria-label": "ariaLabel()", "class": "hostClasses()", "attr.data-appearance": "appearance()" } }, viewQueries: [{ propertyName: "dropdownTpl", first: true, predicate: ["dropdownTpl"], descendants: true, isSignal: true }, { propertyName: "megaTpl", first: true, predicate: ["megaTpl"], descendants: true, isSignal: true }], ngImport: i0, template: `
1143
- <div class="flex h-14 w-full items-center gap-3 px-3">
1152
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.9", type: TopbarComponent, isStandalone: true, selector: "ui-topbar", inputs: { items: { classPropertyName: "items", publicName: "items", isSignal: true, isRequired: false, transformFunction: null }, navigationId: { classPropertyName: "navigationId", publicName: "navigationId", isSignal: true, isRequired: false, transformFunction: null }, appearance: { classPropertyName: "appearance", publicName: "appearance", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null }, class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null }, autoRegister: { classPropertyName: "autoRegister", publicName: "autoRegister", isSignal: true, isRequired: false, transformFunction: null }, showHamburger: { classPropertyName: "showHamburger", publicName: "showHamburger", isSignal: true, isRequired: false, transformFunction: null }, hamburgerLabel: { classPropertyName: "hamburgerLabel", publicName: "hamburgerLabel", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "role": "navigation" }, properties: { "attr.aria-label": "ariaLabel()", "class": "hostClasses()", "attr.data-appearance": "appearance()", "style.height": "topbarHeight" } }, viewQueries: [{ propertyName: "dropdownTpl", first: true, predicate: ["dropdownTpl"], descendants: true, isSignal: true }, { propertyName: "megaTpl", first: true, predicate: ["megaTpl"], descendants: true, isSignal: true }], ngImport: i0, template: `
1153
+ <div class="flex h-full w-full items-center gap-3 px-3">
1144
1154
  <div data-ui-topbar-slot="start" class="flex shrink-0 items-center gap-2">
1145
1155
  @if (showHamburger()) {
1146
1156
  <button
@@ -1271,7 +1281,7 @@ class TopbarComponent {
1271
1281
  role="menu"
1272
1282
  class="w-screen max-w-[min(90vw,72rem)] rounded-md border border-border bg-popover p-6 text-popover-foreground shadow-lg"
1273
1283
  (keydown)="onPanelKeydown($event)">
1274
- <div class="grid gap-6" [ngClass]="megaColsClass(item.columns)">
1284
+ <div [class]="megaGridClasses(item.columns)">
1275
1285
  @for (col of item.children; track col.id) {
1276
1286
  <div>
1277
1287
  <div class="ui-nav-heading mb-2 text-muted-foreground">
@@ -1287,22 +1297,23 @@ class TopbarComponent {
1287
1297
  </div>
1288
1298
  </div>
1289
1299
  </ng-template>
1290
- `, isInline: true, dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "directive", type: RouterLinkActive, selector: "[routerLinkActive]", inputs: ["routerLinkActiveOptions", "ariaCurrentWhenActive", "routerLinkActive"], outputs: ["isActiveChange"], exportAs: ["routerLinkActive"] }, { kind: "component", type: UiNavIconComponent, selector: "ui-nav-icon", inputs: ["name", "class", "size"] }, { kind: "component", type: UiNavItemComponent, selector: "ui-nav-item", inputs: ["item", "level", "compact"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
1300
+ `, isInline: true, dependencies: [{ kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "directive", type: RouterLinkActive, selector: "[routerLinkActive]", inputs: ["routerLinkActiveOptions", "ariaCurrentWhenActive", "routerLinkActive"], outputs: ["isActiveChange"], exportAs: ["routerLinkActive"] }, { kind: "component", type: UiNavIconComponent, selector: "ui-nav-icon", inputs: ["name", "class", "size"] }, { kind: "component", type: UiNavItemComponent, selector: "ui-nav-item", inputs: ["item", "level", "compact"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
1291
1301
  }
1292
1302
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: TopbarComponent, decorators: [{
1293
1303
  type: Component,
1294
1304
  args: [{
1295
1305
  selector: 'ui-topbar',
1296
1306
  changeDetection: ChangeDetectionStrategy.OnPush,
1297
- imports: [NgClass, RouterLink, RouterLinkActive, UiNavIconComponent, UiNavItemComponent],
1307
+ imports: [RouterLink, RouterLinkActive, UiNavIconComponent, UiNavItemComponent],
1298
1308
  host: {
1299
1309
  role: 'navigation',
1300
1310
  '[attr.aria-label]': 'ariaLabel()',
1301
1311
  '[class]': 'hostClasses()',
1302
1312
  '[attr.data-appearance]': 'appearance()',
1313
+ '[style.height]': 'topbarHeight',
1303
1314
  },
1304
1315
  template: `
1305
- <div class="flex h-14 w-full items-center gap-3 px-3">
1316
+ <div class="flex h-full w-full items-center gap-3 px-3">
1306
1317
  <div data-ui-topbar-slot="start" class="flex shrink-0 items-center gap-2">
1307
1318
  @if (showHamburger()) {
1308
1319
  <button
@@ -1433,7 +1444,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImpor
1433
1444
  role="menu"
1434
1445
  class="w-screen max-w-[min(90vw,72rem)] rounded-md border border-border bg-popover p-6 text-popover-foreground shadow-lg"
1435
1446
  (keydown)="onPanelKeydown($event)">
1436
- <div class="grid gap-6" [ngClass]="megaColsClass(item.columns)">
1447
+ <div [class]="megaGridClasses(item.columns)">
1437
1448
  @for (col of item.children; track col.id) {
1438
1449
  <div>
1439
1450
  <div class="ui-nav-heading mb-2 text-muted-foreground">