@edsis/ui 21.3.8 → 21.3.10

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/README.md CHANGED
@@ -27,6 +27,8 @@ Untuk komponen atau utilitas spesifik, gunakan subpath secondary entry point:
27
27
  ```bash
28
28
  @edsis/ui/button
29
29
  @edsis/ui/chart/bar
30
+ @edsis/ui/icon
31
+ @edsis/ui/theme
30
32
  ```
31
33
 
32
34
  ## Unit Test
@@ -0,0 +1,78 @@
1
+ import * as i0 from '@angular/core';
2
+ import { inject, PLATFORM_ID, Injectable, input, computed, ChangeDetectionStrategy, Component } from '@angular/core';
3
+ import { DOCUMENT, isPlatformBrowser } from '@angular/common';
4
+
5
+ const UI_MATERIAL_SYMBOLS_FONT_ATTR = 'data-ui-icon-font';
6
+ const UI_MATERIAL_SYMBOLS_FONT_ID = 'material-symbols-outlined';
7
+ const UI_MATERIAL_SYMBOLS_FONT_HREF = 'https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@24,400,0,0';
8
+ class UiMaterialSymbolsService {
9
+ documentRef = inject(DOCUMENT, { optional: true });
10
+ platformId = inject(PLATFORM_ID);
11
+ ensureLoaded() {
12
+ const head = this.documentRef?.head;
13
+ if (!isPlatformBrowser(this.platformId) || !head) {
14
+ return;
15
+ }
16
+ const existing = head.querySelector(`link[${UI_MATERIAL_SYMBOLS_FONT_ATTR}="${UI_MATERIAL_SYMBOLS_FONT_ID}"]`);
17
+ if (existing) {
18
+ return;
19
+ }
20
+ const link = this.documentRef.createElement('link');
21
+ link.rel = 'stylesheet';
22
+ link.href = UI_MATERIAL_SYMBOLS_FONT_HREF;
23
+ link.setAttribute(UI_MATERIAL_SYMBOLS_FONT_ATTR, UI_MATERIAL_SYMBOLS_FONT_ID);
24
+ head.appendChild(link);
25
+ }
26
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.15", ngImport: i0, type: UiMaterialSymbolsService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
27
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.15", ngImport: i0, type: UiMaterialSymbolsService, providedIn: 'root' });
28
+ }
29
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.15", ngImport: i0, type: UiMaterialSymbolsService, decorators: [{
30
+ type: Injectable,
31
+ args: [{ providedIn: 'root' }]
32
+ }] });
33
+
34
+ class UiIconComponent {
35
+ materialSymbols = inject(UiMaterialSymbolsService);
36
+ name = input('', ...(ngDevMode ? [{ debugName: "name" }] : /* istanbul ignore next */ []));
37
+ class = input('', { ...(ngDevMode ? { debugName: "class" } : /* istanbul ignore next */ {}), alias: 'class' });
38
+ size = input(null, ...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
39
+ fill = input(0, ...(ngDevMode ? [{ debugName: "fill" }] : /* istanbul ignore next */ []));
40
+ weight = input(400, ...(ngDevMode ? [{ debugName: "weight" }] : /* istanbul ignore next */ []));
41
+ grade = input(0, ...(ngDevMode ? [{ debugName: "grade" }] : /* istanbul ignore next */ []));
42
+ opticalSize = input(24, ...(ngDevMode ? [{ debugName: "opticalSize" }] : /* istanbul ignore next */ []));
43
+ resolvedSize = computed(() => this.size() ?? this.opticalSize(), ...(ngDevMode ? [{ debugName: "resolvedSize" }] : /* istanbul ignore next */ []));
44
+ fontVariationSettings = computed(() => `"FILL" ${this.fill()}, "wght" ${this.weight()}, "GRAD" ${this.grade()}, "opsz" ${this.opticalSize()}`, ...(ngDevMode ? [{ debugName: "fontVariationSettings" }] : /* istanbul ignore next */ []));
45
+ classes = computed(() => {
46
+ const base = 'material-symbols-outlined inline-flex items-center justify-center leading-none select-none';
47
+ const extra = this.class();
48
+ return extra ? `${base} ${extra}` : base;
49
+ }, ...(ngDevMode ? [{ debugName: "classes" }] : /* istanbul ignore next */ []));
50
+ constructor() {
51
+ this.materialSymbols.ensureLoaded();
52
+ }
53
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.15", ngImport: i0, type: UiIconComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
54
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.15", type: UiIconComponent, isStandalone: true, selector: "ui-icon", inputs: { name: { classPropertyName: "name", publicName: "name", isSignal: true, isRequired: false, transformFunction: null }, class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, fill: { classPropertyName: "fill", publicName: "fill", isSignal: true, isRequired: false, transformFunction: null }, weight: { classPropertyName: "weight", publicName: "weight", isSignal: true, isRequired: false, transformFunction: null }, grade: { classPropertyName: "grade", publicName: "grade", isSignal: true, isRequired: false, transformFunction: null }, opticalSize: { classPropertyName: "opticalSize", publicName: "opticalSize", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "aria-hidden": "true", "translate": "no" }, properties: { "class": "classes()", "style.font-size.px": "resolvedSize()", "style.line-height.px": "resolvedSize()", "style.font-variation-settings": "fontVariationSettings()" } }, ngImport: i0, template: `{{ name() }}`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
55
+ }
56
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.15", ngImport: i0, type: UiIconComponent, decorators: [{
57
+ type: Component,
58
+ args: [{
59
+ selector: 'ui-icon',
60
+ changeDetection: ChangeDetectionStrategy.OnPush,
61
+ host: {
62
+ '[class]': 'classes()',
63
+ '[style.font-size.px]': 'resolvedSize()',
64
+ '[style.line-height.px]': 'resolvedSize()',
65
+ '[style.font-variation-settings]': 'fontVariationSettings()',
66
+ 'aria-hidden': 'true',
67
+ translate: 'no',
68
+ },
69
+ template: `{{ name() }}`,
70
+ }]
71
+ }], ctorParameters: () => [], propDecorators: { name: [{ type: i0.Input, args: [{ isSignal: true, alias: "name", required: false }] }], class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], fill: [{ type: i0.Input, args: [{ isSignal: true, alias: "fill", required: false }] }], weight: [{ type: i0.Input, args: [{ isSignal: true, alias: "weight", required: false }] }], grade: [{ type: i0.Input, args: [{ isSignal: true, alias: "grade", required: false }] }], opticalSize: [{ type: i0.Input, args: [{ isSignal: true, alias: "opticalSize", required: false }] }] } });
72
+
73
+ /**
74
+ * Generated bundle index. Do not edit.
75
+ */
76
+
77
+ export { UI_MATERIAL_SYMBOLS_FONT_ATTR, UI_MATERIAL_SYMBOLS_FONT_HREF, UI_MATERIAL_SYMBOLS_FONT_ID, UiIconComponent, UiMaterialSymbolsService };
78
+ //# sourceMappingURL=edsis-ui-icon.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"edsis-ui-icon.mjs","sources":["../../../library/ui/icon/material-symbols.service.ts","../../../library/ui/icon/icon.component.ts","../../../library/ui/icon/edsis-ui-icon.ts"],"sourcesContent":["import { DOCUMENT, isPlatformBrowser } from '@angular/common';\nimport { Injectable, PLATFORM_ID, inject } from '@angular/core';\n\nexport const UI_MATERIAL_SYMBOLS_FONT_ATTR = 'data-ui-icon-font';\nexport const UI_MATERIAL_SYMBOLS_FONT_ID = 'material-symbols-outlined';\nexport const UI_MATERIAL_SYMBOLS_FONT_HREF =\n 'https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@24,400,0,0';\n\n@Injectable({ providedIn: 'root' })\nexport class UiMaterialSymbolsService {\n private readonly documentRef = inject(DOCUMENT, { optional: true });\n private readonly platformId = inject(PLATFORM_ID);\n\n ensureLoaded(): void {\n const head = this.documentRef?.head;\n\n if (!isPlatformBrowser(this.platformId) || !head) {\n return;\n }\n\n const existing = head.querySelector(`link[${UI_MATERIAL_SYMBOLS_FONT_ATTR}=\"${UI_MATERIAL_SYMBOLS_FONT_ID}\"]`);\n if (existing) {\n return;\n }\n\n const link = this.documentRef.createElement('link');\n link.rel = 'stylesheet';\n link.href = UI_MATERIAL_SYMBOLS_FONT_HREF;\n link.setAttribute(UI_MATERIAL_SYMBOLS_FONT_ATTR, UI_MATERIAL_SYMBOLS_FONT_ID);\n head.appendChild(link);\n }\n}\n","import { ChangeDetectionStrategy, Component, computed, inject, input } from '@angular/core';\nimport { UiMaterialSymbolsService } from './material-symbols.service';\n\n@Component({\n selector: 'ui-icon',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n '[class]': 'classes()',\n '[style.font-size.px]': 'resolvedSize()',\n '[style.line-height.px]': 'resolvedSize()',\n '[style.font-variation-settings]': 'fontVariationSettings()',\n 'aria-hidden': 'true',\n translate: 'no',\n },\n template: `{{ name() }}`,\n})\nexport class UiIconComponent {\n private readonly materialSymbols = inject(UiMaterialSymbolsService);\n\n readonly name = input('');\n readonly class = input('', { alias: 'class' });\n readonly size = input<number | null>(null);\n readonly fill = input(0);\n readonly weight = input(400);\n readonly grade = input(0);\n readonly opticalSize = input(24);\n\n protected readonly resolvedSize = computed(() => this.size() ?? this.opticalSize());\n protected readonly fontVariationSettings = computed(\n () => `\"FILL\" ${this.fill()}, \"wght\" ${this.weight()}, \"GRAD\" ${this.grade()}, \"opsz\" ${this.opticalSize()}`,\n );\n protected readonly classes = computed(() => {\n const base = 'material-symbols-outlined inline-flex items-center justify-center leading-none select-none';\n const extra = this.class();\n return extra ? `${base} ${extra}` : base;\n });\n\n constructor() {\n this.materialSymbols.ensureLoaded();\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;AAGO,MAAM,6BAA6B,GAAG;AACtC,MAAM,2BAA2B,GAAG;AACpC,MAAM,6BAA6B,GACxC;MAGW,wBAAwB,CAAA;IAClB,WAAW,GAAG,MAAM,CAAC,QAAQ,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;AAClD,IAAA,UAAU,GAAG,MAAM,C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QAAA,EAAA,IAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA;;4FAEb,eAAe,EAAA,UAAA,EAAA,CAAA;kBAb3B,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,SAAS;oBACnB,eAAe,EAAE,uBAAuB,CAAC,MAAM;AAC/C,oBAAA,IAAI,EAAE;AACJ,wBAAA,SAAS,EAAE,WAAW;AACtB,wBAAA,sBAAsB,EAAE,gBAAgB;AACxC,wBAAA,wBAAwB,EAAE,gBAAgB;AAC1C,wBAAA,iCAAiC,EAAE,yBAAyB;AAC5D,wBAAA,aAAa,EAAE,MAAM;AACrB,wBAAA,SAAS,EAAE,IAAI;AAChB,qBAAA;AACD,oBAAA,QAAQ,EAAE,CAAA,YAAA,CAAc;AACzB,iBAAA;;;ACfD;;AAEG;;;;"}
@@ -4,6 +4,7 @@ import { cn } from '@edsis/ui/utils';
4
4
  import { DOCUMENT, NgTemplateOutlet } from '@angular/common';
5
5
  import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
6
6
  import { Router, NavigationEnd, RouterLink, RouterLinkActive } from '@angular/router';
7
+ import { UiIconComponent } from '@edsis/ui/icon';
7
8
 
8
9
  class NavIconDirective {
9
10
  template = inject(TemplateRef);
@@ -487,11 +488,8 @@ class NavItemContentComponent {
487
488
  subtitleClasses = computed(() => cn('block truncate text-xs font-normal text-muted-foreground', this.item().classes?.subtitle), ...(ngDevMode ? [{ debugName: "subtitleClasses" }] : /* istanbul ignore next */ []));
488
489
  compactFallbackClasses = computed(() => cn('inline-flex h-5 min-w-5 items-center justify-center text-xs font-semibold uppercase'), ...(ngDevMode ? [{ debugName: "compactFallbackClasses" }] : /* istanbul ignore next */ []));
489
490
  defaultBadgeClasses = computed(() => cn('ml-auto inline-flex h-5 shrink-0 items-center rounded-full px-2 text-xs font-medium', this.active() ? 'bg-background text-foreground' : 'bg-muted text-muted-foreground'), ...(ngDevMode ? [{ debugName: "defaultBadgeClasses" }] : /* istanbul ignore next */ []));
490
- defaultIconClasses = computed(() => cn('inline-flex h-4 w-4 shrink-0 rounded-full border', this.usesStraightVerticalSurface()
491
- ? 'border-transparent bg-transparent'
492
- : this.active()
493
- ? 'border-primary'
494
- : 'border-border bg-muted', this.item().classes?.icon), ...(ngDevMode ? [{ debugName: "defaultIconClasses" }] : /* istanbul ignore next */ []));
491
+ defaultIconSize = computed(() => (this.usesStraightVerticalSurface() ? 18 : 16), ...(ngDevMode ? [{ debugName: "defaultIconSize" }] : /* istanbul ignore next */ []));
492
+ defaultIconClasses = computed(() => cn('text-current', this.item().classes?.icon), ...(ngDevMode ? [{ debugName: "defaultIconClasses" }] : /* istanbul ignore next */ []));
495
493
  iconContext = computed(() => this.nav.iconContext(this.item(), this.active(), this.level(), this.orientation()), ...(ngDevMode ? [{ debugName: "iconContext" }] : /* istanbul ignore next */ []));
496
494
  compactFallback() {
497
495
  return this.nav.compactFallback(this.item());
@@ -501,12 +499,12 @@ class NavItemContentComponent {
501
499
  }
502
500
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.15", ngImport: i0, type: NavItemContentComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
503
501
  static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.15", type: NavItemContentComponent, isStandalone: true, selector: "ui-nav-item-content", inputs: { item: { classPropertyName: "item", publicName: "item", isSignal: true, isRequired: true, transformFunction: null }, active: { classPropertyName: "active", publicName: "active", isSignal: true, isRequired: false, transformFunction: null }, compact: { classPropertyName: "compact", publicName: "compact", isSignal: true, isRequired: false, transformFunction: null }, orientation: { classPropertyName: "orientation", publicName: "orientation", isSignal: true, isRequired: false, transformFunction: null }, level: { classPropertyName: "level", publicName: "level", isSignal: true, isRequired: false, transformFunction: null }, collapseTree: { classPropertyName: "collapseTree", publicName: "collapseTree", isSignal: true, isRequired: false, transformFunction: null }, iconTemplate: { classPropertyName: "iconTemplate", publicName: "iconTemplate", isSignal: true, isRequired: false, transformFunction: null } }, host: { classAttribute: "contents" }, ngImport: i0, template: `
504
- @if (item().icon) {
502
+ @if (item().icon; as iconName) {
505
503
  <span data-ui-nav-icon-slot="true" [class]="iconSlotClasses()">
506
504
  @if (iconTemplate(); as customIcon) {
507
505
  <ng-container [ngTemplateOutlet]="customIcon.template" [ngTemplateOutletContext]="iconContext()" />
508
506
  } @else {
509
- <span aria-hidden="true" [class]="defaultIconClasses()" [attr.data-icon]="item().icon"></span>
507
+ <ui-icon [name]="iconName" [class]="defaultIconClasses()" [size]="defaultIconSize()" />
510
508
  }
511
509
  </span>
512
510
  }
@@ -527,24 +525,24 @@ class NavItemContentComponent {
527
525
  @if (compact() && !item().icon) {
528
526
  <span aria-hidden="true" [class]="compactFallbackClasses()">{{ compactFallback() }}</span>
529
527
  }
530
- `, isInline: true, dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
528
+ `, isInline: true, dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: UiIconComponent, selector: "ui-icon", inputs: ["name", "class", "size", "fill", "weight", "grade", "opticalSize"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
531
529
  }
532
530
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.15", ngImport: i0, type: NavItemContentComponent, decorators: [{
533
531
  type: Component,
534
532
  args: [{
535
533
  selector: 'ui-nav-item-content',
536
534
  changeDetection: ChangeDetectionStrategy.OnPush,
537
- imports: [NgTemplateOutlet],
535
+ imports: [NgTemplateOutlet, UiIconComponent],
538
536
  host: {
539
537
  class: 'contents',
540
538
  },
541
539
  template: `
542
- @if (item().icon) {
540
+ @if (item().icon; as iconName) {
543
541
  <span data-ui-nav-icon-slot="true" [class]="iconSlotClasses()">
544
542
  @if (iconTemplate(); as customIcon) {
545
543
  <ng-container [ngTemplateOutlet]="customIcon.template" [ngTemplateOutletContext]="iconContext()" />
546
544
  } @else {
547
- <span aria-hidden="true" [class]="defaultIconClasses()" [attr.data-icon]="item().icon"></span>
545
+ <ui-icon [name]="iconName" [class]="defaultIconClasses()" [size]="defaultIconSize()" />
548
546
  }
549
547
  </span>
550
548
  }
@@ -2056,23 +2054,18 @@ class UiNavHeaderComponent {
2056
2054
  [attr.title]="toggleAriaLabel()"
2057
2055
  data-ui-nav-header-toggle="true"
2058
2056
  (click)="toggleCollapsed()">
2059
- <span
2060
- aria-hidden="true"
2061
- data-ui-nav-header-toggle-icon="true"
2062
- class="material-symbols-outlined leading-none"
2063
- style="font-size: 18px; line-height: 18px;">
2064
- {{ toggleIconName() }}
2065
- </span>
2057
+ <ui-icon data-ui-nav-header-toggle-icon="true" [name]="toggleIconName()" [size]="18" />
2066
2058
  </button>
2067
2059
  }
2068
2060
  </div>
2069
- `, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
2061
+ `, isInline: true, dependencies: [{ kind: "component", type: UiIconComponent, selector: "ui-icon", inputs: ["name", "class", "size", "fill", "weight", "grade", "opticalSize"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
2070
2062
  }
2071
2063
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.15", ngImport: i0, type: UiNavHeaderComponent, decorators: [{
2072
2064
  type: Component,
2073
2065
  args: [{
2074
2066
  selector: 'ui-nav-header',
2075
2067
  changeDetection: ChangeDetectionStrategy.OnPush,
2068
+ imports: [UiIconComponent],
2076
2069
  host: {
2077
2070
  '[class]': 'hostClasses()',
2078
2071
  '[attr.data-collapsed]': 'displayCollapsed()',
@@ -2091,13 +2084,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.15", ngImpo
2091
2084
  [attr.title]="toggleAriaLabel()"
2092
2085
  data-ui-nav-header-toggle="true"
2093
2086
  (click)="toggleCollapsed()">
2094
- <span
2095
- aria-hidden="true"
2096
- data-ui-nav-header-toggle-icon="true"
2097
- class="material-symbols-outlined leading-none"
2098
- style="font-size: 18px; line-height: 18px;">
2099
- {{ toggleIconName() }}
2100
- </span>
2087
+ <ui-icon data-ui-nav-header-toggle-icon="true" [name]="toggleIconName()" [size]="18" />
2101
2088
  </button>
2102
2089
  }
2103
2090
  </div>