@ojiepermana/angular 0.1.0 → 21.0.0

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 (91) hide show
  1. package/README.md +41 -246
  2. package/chart/README.md +0 -0
  3. package/fesm2022/ojiepermana-angular-chart.mjs +3714 -0
  4. package/fesm2022/ojiepermana-angular-chart.mjs.map +1 -0
  5. package/fesm2022/ojiepermana-angular-component.mjs +3463 -0
  6. package/fesm2022/ojiepermana-angular-component.mjs.map +1 -0
  7. package/fesm2022/ojiepermana-angular-layout.mjs +272 -401
  8. package/fesm2022/ojiepermana-angular-layout.mjs.map +1 -1
  9. package/fesm2022/ojiepermana-angular-navigation.mjs +2225 -135
  10. package/fesm2022/ojiepermana-angular-navigation.mjs.map +1 -1
  11. package/fesm2022/ojiepermana-angular-theme.mjs +381 -1
  12. package/fesm2022/ojiepermana-angular-theme.mjs.map +1 -1
  13. package/fesm2022/ojiepermana-angular.mjs +15 -1
  14. package/fesm2022/ojiepermana-angular.mjs.map +1 -1
  15. package/package.json +49 -36
  16. package/theme/styles/etos.css +38 -0
  17. package/theme/styles/index.css +32 -8
  18. package/theme/styles/themes/brand/etos/color.css +21 -0
  19. package/theme/styles/themes/brand/etos/style.css +50 -0
  20. package/theme/styles/themes/library/_components.css +63 -0
  21. package/theme/styles/themes/library/_layers.css +15 -0
  22. package/theme/styles/themes/library/_material-overrides.css +254 -0
  23. package/theme/styles/themes/library/_tokens.css +54 -0
  24. package/theme/styles/themes/library/color/amber.css +18 -0
  25. package/theme/styles/themes/library/color/blue.css +23 -0
  26. package/theme/styles/themes/library/color/green.css +18 -0
  27. package/theme/styles/themes/library/color/index.css +9 -0
  28. package/theme/styles/themes/library/color/purple.css +18 -0
  29. package/theme/styles/themes/library/color/red.css +18 -0
  30. package/theme/styles/themes/library/style/brutal.css +47 -0
  31. package/theme/styles/themes/library/style/default.css +51 -0
  32. package/theme/styles/themes/library/style/index.css +8 -0
  33. package/theme/styles/themes/library/style/sharp.css +47 -0
  34. package/theme/styles/themes/library/style/soft.css +47 -0
  35. package/theme/styles/themes/mode/dark.css +20 -0
  36. package/theme/styles/themes/mode/index.css +6 -0
  37. package/theme/styles/themes/mode/light.css +24 -0
  38. package/theme/styles/themes/taildwind.css +109 -0
  39. package/types/ojiepermana-angular-chart.d.ts +1094 -0
  40. package/types/ojiepermana-angular-component.d.ts +1174 -0
  41. package/types/ojiepermana-angular-layout.d.ts +123 -76
  42. package/types/ojiepermana-angular-navigation.d.ts +257 -71
  43. package/types/ojiepermana-angular-theme.d.ts +170 -1
  44. package/types/ojiepermana-angular.d.ts +2 -1
  45. package/fesm2022/ojiepermana-angular-internal.mjs +0 -473
  46. package/fesm2022/ojiepermana-angular-internal.mjs.map +0 -1
  47. package/fesm2022/ojiepermana-angular-navigation-horizontal.mjs +0 -785
  48. package/fesm2022/ojiepermana-angular-navigation-horizontal.mjs.map +0 -1
  49. package/fesm2022/ojiepermana-angular-navigation-vertical.mjs +0 -1568
  50. package/fesm2022/ojiepermana-angular-navigation-vertical.mjs.map +0 -1
  51. package/fesm2022/ojiepermana-angular-shell.mjs +0 -14
  52. package/fesm2022/ojiepermana-angular-shell.mjs.map +0 -1
  53. package/fesm2022/ojiepermana-angular-theme-component.mjs +0 -235
  54. package/fesm2022/ojiepermana-angular-theme-component.mjs.map +0 -1
  55. package/fesm2022/ojiepermana-angular-theme-directive.mjs +0 -29
  56. package/fesm2022/ojiepermana-angular-theme-directive.mjs.map +0 -1
  57. package/fesm2022/ojiepermana-angular-theme-service.mjs +0 -241
  58. package/fesm2022/ojiepermana-angular-theme-service.mjs.map +0 -1
  59. package/layout/README.md +0 -144
  60. package/navigation/README.md +0 -215
  61. package/shell/README.md +0 -37
  62. package/styles/index.css +0 -2
  63. package/styles/resets.css +0 -22
  64. package/theme/README.md +0 -379
  65. package/theme/styles/adapters/material-ui/index.css +0 -205
  66. package/theme/styles/layout/horizontal.css +0 -109
  67. package/theme/styles/layout/index.css +0 -19
  68. package/theme/styles/layout/vertical.css +0 -75
  69. package/theme/styles/modes/dark.css +0 -84
  70. package/theme/styles/presets/colors/blue.css +0 -45
  71. package/theme/styles/presets/colors/brand.css +0 -52
  72. package/theme/styles/presets/colors/cyan.css +0 -45
  73. package/theme/styles/presets/colors/green.css +0 -45
  74. package/theme/styles/presets/colors/index.css +0 -7
  75. package/theme/styles/presets/colors/orange.css +0 -45
  76. package/theme/styles/presets/colors/purple.css +0 -45
  77. package/theme/styles/presets/colors/red.css +0 -45
  78. package/theme/styles/presets/styles/flat.css +0 -61
  79. package/theme/styles/presets/styles/glass.css +0 -28
  80. package/theme/styles/presets/styles/index.css +0 -2
  81. package/theme/styles/roles/index.css +0 -67
  82. package/theme/styles/tokens/foundation.css +0 -136
  83. package/theme/styles/tokens/semantic.css +0 -87
  84. package/theme/styles/utilities/index.css +0 -88
  85. package/types/ojiepermana-angular-internal.d.ts +0 -89
  86. package/types/ojiepermana-angular-navigation-horizontal.d.ts +0 -77
  87. package/types/ojiepermana-angular-navigation-vertical.d.ts +0 -260
  88. package/types/ojiepermana-angular-shell.d.ts +0 -12
  89. package/types/ojiepermana-angular-theme-component.d.ts +0 -46
  90. package/types/ojiepermana-angular-theme-directive.d.ts +0 -10
  91. package/types/ojiepermana-angular-theme-service.d.ts +0 -68
@@ -1,260 +0,0 @@
1
- import * as i0 from '@angular/core';
2
- import { OnChanges, OnInit, AfterViewInit, OnDestroy, ChangeDetectorRef, ElementRef, Renderer2, EventEmitter, SimpleChanges } from '@angular/core';
3
- import { NavigationService, VerticalNavigationMode, NavigationItem, VerticalNavigationPosition, VerticalNavigationAppearance, NavigationAsideItem, shouldRenderNavigationItem, NavigationBasicItem, NavigationCollapsableItem, NavigationGroupItem } from '@ojiepermana/angular/navigation';
4
- import { Router, IsActiveMatchOptions } from '@angular/router';
5
- import { ReplaySubject, Subject } from 'rxjs';
6
- import { trackNavigationTreeItem } from '@ojiepermana/angular/internal';
7
-
8
- declare abstract class VerticalNavigationBaseComponent implements OnChanges, OnInit, AfterViewInit, OnDestroy {
9
- protected _changeDetectorRef: ChangeDetectorRef;
10
- protected _document: Document;
11
- protected _elementRef: ElementRef<any>;
12
- protected _renderer2: Renderer2;
13
- protected _router: Router;
14
- protected _navigationService: NavigationService;
15
- autoCollapse: boolean;
16
- inner: boolean;
17
- mode: VerticalNavigationMode;
18
- navigation: NavigationItem[];
19
- opened: boolean;
20
- position: VerticalNavigationPosition;
21
- transparentOverlay: boolean;
22
- readonly appearanceChanged: EventEmitter<VerticalNavigationAppearance>;
23
- readonly modeChanged: EventEmitter<VerticalNavigationMode>;
24
- readonly openedChanged: EventEmitter<boolean>;
25
- readonly positionChanged: EventEmitter<VerticalNavigationPosition>;
26
- protected _navigationContentEl?: ElementRef;
27
- activeAsideItemId: string | null;
28
- onCollapsableItemCollapsed: ReplaySubject<NavigationItem>;
29
- onCollapsableItemExpanded: ReplaySubject<NavigationItem>;
30
- onRefreshed: ReplaySubject<boolean>;
31
- protected _animationsEnabled: boolean;
32
- protected _asideOverlay: HTMLElement | null;
33
- protected _hovered: boolean;
34
- protected _mutationObserver?: MutationObserver;
35
- protected _overlay: HTMLElement | null;
36
- protected _pendingTimeouts: ReturnType<typeof setTimeout>[];
37
- protected _unsubscribeAll: Subject<void>;
38
- protected abstract _componentPrefix: string;
39
- protected abstract _asideWrapperClass: string;
40
- private readonly _overlayClickHandler;
41
- private readonly _asideOverlayClickHandler;
42
- abstract appearance: VerticalNavigationAppearance;
43
- get hostClasses(): Record<string, boolean>;
44
- get asideWrapperClass(): string;
45
- activeAsideNavigationItem(): NavigationAsideItem | null;
46
- shouldRenderItem(item: NavigationItem): boolean;
47
- onMouseenter(): void;
48
- onMouseleave(): void;
49
- ngOnChanges(changes: SimpleChanges): void;
50
- ngOnInit(): void;
51
- ngAfterViewInit(): void;
52
- ngOnDestroy(): void;
53
- refresh(): void;
54
- open(): void;
55
- close(): void;
56
- toggle(): void;
57
- openAside(item: NavigationItem): void;
58
- closeAside(): void;
59
- toggleAside(item: NavigationItem): void;
60
- trackByFn(index: number, item: NavigationItem): string | number | undefined;
61
- protected _enableAnimations(): void;
62
- protected _disableAnimations(): void;
63
- protected _showOverlay(): void;
64
- protected _hideOverlay(): void;
65
- protected _showAsideOverlay(): void;
66
- protected _hideAsideOverlay(): void;
67
- protected _setTimeout(fn: () => void, delay?: number): void;
68
- private _removeOverlayElement;
69
- protected _toggleOpened(open: boolean): void;
70
- static ɵfac: i0.ɵɵFactoryDeclaration<VerticalNavigationBaseComponent, never>;
71
- static ɵdir: i0.ɵɵDirectiveDeclaration<VerticalNavigationBaseComponent, never, never, { "autoCollapse": { "alias": "autoCollapse"; "required": false; }; "inner": { "alias": "inner"; "required": false; }; "mode": { "alias": "mode"; "required": false; }; "navigation": { "alias": "navigation"; "required": false; }; "opened": { "alias": "opened"; "required": false; }; "position": { "alias": "position"; "required": false; }; "transparentOverlay": { "alias": "transparentOverlay"; "required": false; }; }, { "appearanceChanged": "appearanceChanged"; "modeChanged": "modeChanged"; "openedChanged": "openedChanged"; "positionChanged": "positionChanged"; }, never, never, true, never>;
72
- }
73
-
74
- declare class VerticalNavigationDefaultComponent extends VerticalNavigationBaseComponent implements OnChanges, OnInit, AfterViewInit, OnDestroy {
75
- protected _componentPrefix: string;
76
- protected _asideWrapperClass: string;
77
- appearance: VerticalNavigationAppearance;
78
- static ɵfac: i0.ɵɵFactoryDeclaration<VerticalNavigationDefaultComponent, never>;
79
- static ɵcmp: i0.ɵɵComponentDeclaration<VerticalNavigationDefaultComponent, "vertical-navigation", ["verticalNavigationDefault"], { "appearance": { "alias": "appearance"; "required": false; }; }, {}, never, ["[verticalNavigationHeader]", "[verticalNavigationContentHeader]", "[verticalNavigationContentFooter]", "[verticalNavigationFooter]"], true, never>;
80
- }
81
-
82
- declare class VerticalNavigationCompactComponent extends VerticalNavigationBaseComponent implements OnChanges, OnInit, AfterViewInit, OnDestroy {
83
- protected _componentPrefix: string;
84
- protected _asideWrapperClass: string;
85
- appearance: VerticalNavigationAppearance;
86
- static ɵfac: i0.ɵɵFactoryDeclaration<VerticalNavigationCompactComponent, never>;
87
- static ɵcmp: i0.ɵɵComponentDeclaration<VerticalNavigationCompactComponent, "vertical-navigation-compact", ["verticalNavigationCompact"], { "appearance": { "alias": "appearance"; "required": false; }; }, {}, never, ["[verticalNavigationHeader]", "[verticalNavigationContentHeader]", "[verticalNavigationContentFooter]", "[verticalNavigationFooter]"], true, never>;
88
- }
89
-
90
- declare class VerticalNavigationDenseComponent extends VerticalNavigationBaseComponent implements OnChanges, OnInit, AfterViewInit, OnDestroy {
91
- protected _componentPrefix: string;
92
- protected _asideWrapperClass: string;
93
- appearance: VerticalNavigationAppearance;
94
- static ɵfac: i0.ɵɵFactoryDeclaration<VerticalNavigationDenseComponent, never>;
95
- static ɵcmp: i0.ɵɵComponentDeclaration<VerticalNavigationDenseComponent, "vertical-navigation-dense", ["verticalNavigationDense"], { "appearance": { "alias": "appearance"; "required": false; }; }, {}, never, ["[verticalNavigationHeader]", "[verticalNavigationContentHeader]", "[verticalNavigationContentFooter]", "[verticalNavigationFooter]"], true, never>;
96
- }
97
-
98
- declare class VerticalNavigationThinComponent extends VerticalNavigationBaseComponent implements OnChanges, OnInit, AfterViewInit, OnDestroy {
99
- protected _componentPrefix: string;
100
- protected _asideWrapperClass: string;
101
- appearance: VerticalNavigationAppearance;
102
- static ɵfac: i0.ɵɵFactoryDeclaration<VerticalNavigationThinComponent, never>;
103
- static ɵcmp: i0.ɵɵComponentDeclaration<VerticalNavigationThinComponent, "vertical-navigation-thin", ["verticalNavigationThin"], { "appearance": { "alias": "appearance"; "required": false; }; }, {}, never, ["[verticalNavigationHeader]", "[verticalNavigationContentHeader]", "[verticalNavigationContentFooter]", "[verticalNavigationFooter]"], true, never>;
104
- }
105
-
106
- declare class VerticalNavigationAsideItemComponent implements OnChanges, OnInit, OnDestroy {
107
- private _changeDetectorRef;
108
- private _navigationComponent;
109
- private _router;
110
- activeItemId?: string | null;
111
- autoCollapse: boolean;
112
- item: NavigationAsideItem;
113
- skipChildren: boolean;
114
- active: boolean;
115
- readonly treeTrackByFn: typeof trackNavigationTreeItem;
116
- readonly treeShouldRenderItemFn: typeof shouldRenderNavigationItem;
117
- private _unsubscribeAll;
118
- /**
119
- * On changes
120
- */
121
- ngOnChanges(changes: SimpleChanges): void;
122
- /**
123
- * On init
124
- */
125
- ngOnInit(): void;
126
- /**
127
- * On destroy
128
- */
129
- ngOnDestroy(): void;
130
- /**
131
- * Track by function for ngFor loops
132
- */
133
- trackByFn(index: number, item: NavigationItem): string | number | undefined;
134
- shouldRenderItem(item: NavigationItem): boolean;
135
- get treeTemplateData(): {
136
- autoCollapse: boolean;
137
- };
138
- /**
139
- * Check if the given item has the given url in one of its children
140
- */
141
- private _hasActiveChild;
142
- /**
143
- * Decide and mark if the item is active
144
- */
145
- private _markIfActive;
146
- static ɵfac: i0.ɵɵFactoryDeclaration<VerticalNavigationAsideItemComponent, never>;
147
- static ɵcmp: i0.ɵɵComponentDeclaration<VerticalNavigationAsideItemComponent, "vertical-navigation-aside-item", never, { "activeItemId": { "alias": "activeItemId"; "required": false; }; "autoCollapse": { "alias": "autoCollapse"; "required": false; }; "item": { "alias": "item"; "required": false; }; "skipChildren": { "alias": "skipChildren"; "required": false; }; }, {}, never, never, true, never>;
148
- }
149
-
150
- declare class VerticalNavigationBasicItemComponent implements OnInit, OnDestroy {
151
- private _changeDetectorRef;
152
- private _navigationComponent;
153
- item: NavigationBasicItem;
154
- isActiveMatchOptions: IsActiveMatchOptions;
155
- private _unsubscribeAll;
156
- /**
157
- * On init
158
- */
159
- ngOnInit(): void;
160
- /**
161
- * On destroy
162
- */
163
- ngOnDestroy(): void;
164
- hasAction(): boolean;
165
- triggerAction(): void;
166
- static ɵfac: i0.ɵɵFactoryDeclaration<VerticalNavigationBasicItemComponent, never>;
167
- static ɵcmp: i0.ɵɵComponentDeclaration<VerticalNavigationBasicItemComponent, "vertical-navigation-basic-item", never, { "item": { "alias": "item"; "required": false; }; }, {}, never, never, true, never>;
168
- }
169
-
170
- declare class VerticalNavigationCollapsableItemComponent implements OnInit, OnDestroy {
171
- private _changeDetectorRef;
172
- private _navigationComponent;
173
- private _navigationService;
174
- private _router;
175
- autoCollapse: boolean;
176
- item: NavigationCollapsableItem;
177
- isCollapsed: boolean;
178
- readonly treeTrackByFn: typeof trackNavigationTreeItem;
179
- readonly treeShouldRenderItemFn: typeof shouldRenderNavigationItem;
180
- get isExpanded(): boolean;
181
- private _unsubscribeAll;
182
- /**
183
- * On init
184
- */
185
- ngOnInit(): void;
186
- /**
187
- * On destroy
188
- */
189
- ngOnDestroy(): void;
190
- /**
191
- * Collapse
192
- */
193
- collapse(): void;
194
- /**
195
- * Expand
196
- */
197
- expand(): void;
198
- /**
199
- * Toggle collapsable
200
- */
201
- toggleCollapsable(): void;
202
- /**
203
- * Track by function for ngFor loops
204
- */
205
- trackByFn(index: number, item: NavigationItem): string | number | undefined;
206
- shouldRenderItem(item: NavigationItem): boolean;
207
- get treeTemplateData(): {
208
- autoCollapse: boolean;
209
- };
210
- /**
211
- * Check if the given item has the given url in one of its children
212
- */
213
- private _hasActiveChild;
214
- /**
215
- * Check if this is a children of the given item
216
- */
217
- private _isChildrenOf;
218
- static ɵfac: i0.ɵɵFactoryDeclaration<VerticalNavigationCollapsableItemComponent, never>;
219
- static ɵcmp: i0.ɵɵComponentDeclaration<VerticalNavigationCollapsableItemComponent, "vertical-navigation-collapsable-item", never, { "autoCollapse": { "alias": "autoCollapse"; "required": false; }; "item": { "alias": "item"; "required": false; }; }, {}, never, never, true, never>;
220
- }
221
-
222
- declare class VerticalNavigationDividerItemComponent {
223
- static ɵfac: i0.ɵɵFactoryDeclaration<VerticalNavigationDividerItemComponent, never>;
224
- static ɵcmp: i0.ɵɵComponentDeclaration<VerticalNavigationDividerItemComponent, "vertical-navigation-divider-item", never, {}, {}, never, never, true, never>;
225
- }
226
-
227
- declare class VerticalNavigationGroupItemComponent implements OnInit, OnDestroy {
228
- private _changeDetectorRef;
229
- private _navigationComponent;
230
- autoCollapse: boolean;
231
- item: NavigationGroupItem;
232
- private _unsubscribeAll;
233
- readonly treeTrackByFn: typeof trackNavigationTreeItem;
234
- readonly treeShouldRenderItemFn: typeof shouldRenderNavigationItem;
235
- /**
236
- * On init
237
- */
238
- ngOnInit(): void;
239
- /**
240
- * On destroy
241
- */
242
- ngOnDestroy(): void;
243
- /**
244
- * Track by function for ngFor loops
245
- */
246
- trackByFn(index: number, item: NavigationItem): string | number | undefined;
247
- shouldRenderItem(item: NavigationItem): boolean;
248
- get treeTemplateData(): {
249
- autoCollapse: boolean;
250
- };
251
- static ɵfac: i0.ɵɵFactoryDeclaration<VerticalNavigationGroupItemComponent, never>;
252
- static ɵcmp: i0.ɵɵComponentDeclaration<VerticalNavigationGroupItemComponent, "vertical-navigation-group-item", never, { "autoCollapse": { "alias": "autoCollapse"; "required": false; }; "item": { "alias": "item"; "required": false; }; }, {}, never, never, true, never>;
253
- }
254
-
255
- declare class VerticalNavigationSpacerItemComponent {
256
- static ɵfac: i0.ɵɵFactoryDeclaration<VerticalNavigationSpacerItemComponent, never>;
257
- static ɵcmp: i0.ɵɵComponentDeclaration<VerticalNavigationSpacerItemComponent, "vertical-navigation-spacer-item", never, {}, {}, never, never, true, never>;
258
- }
259
-
260
- export { VerticalNavigationAsideItemComponent, VerticalNavigationBasicItemComponent, VerticalNavigationCollapsableItemComponent, VerticalNavigationCompactComponent, VerticalNavigationDefaultComponent, VerticalNavigationDenseComponent, VerticalNavigationDividerItemComponent, VerticalNavigationGroupItemComponent, VerticalNavigationSpacerItemComponent, VerticalNavigationThinComponent };
@@ -1,12 +0,0 @@
1
- import { EnvironmentProviders } from '@angular/core';
2
- import { NgLayoutConfig } from '@ojiepermana/angular/layout';
3
- import { NgThemeConfig } from '@ojiepermana/angular/theme/service';
4
-
5
- interface NgShellConfig {
6
- readonly theme?: Partial<NgThemeConfig>;
7
- readonly layout?: Partial<NgLayoutConfig>;
8
- }
9
- declare function provideNgShell(config?: NgShellConfig): EnvironmentProviders;
10
-
11
- export { provideNgShell };
12
- export type { NgShellConfig };
@@ -1,46 +0,0 @@
1
- import * as i0 from '@angular/core';
2
- import * as _ojiepermana_angular_theme_service from '@ojiepermana/angular/theme/service';
3
- import { ThemeService } from '@ojiepermana/angular/theme/service';
4
-
5
- declare class StyleSwitcherComponent {
6
- protected readonly theme: ThemeService;
7
- protected readonly label: i0.Signal<"Glass style enabled" | "Glass style disabled">;
8
- protected toggle(): void;
9
- static ɵfac: i0.ɵɵFactoryDeclaration<StyleSwitcherComponent, never>;
10
- static ɵcmp: i0.ɵɵComponentDeclaration<StyleSwitcherComponent, "style-switcher", never, {}, {}, never, never, true, never>;
11
- }
12
-
13
- declare class ColorPickerComponent {
14
- protected readonly theme: ThemeService;
15
- protected readonly colors: i0.Signal<readonly _ojiepermana_angular_theme_service.ThemeColorOption[]>;
16
- static ɵfac: i0.ɵɵFactoryDeclaration<ColorPickerComponent, never>;
17
- static ɵcmp: i0.ɵɵComponentDeclaration<ColorPickerComponent, "color-picker", never, {}, {}, never, never, true, never>;
18
- }
19
-
20
- declare class SchemeSwitcherComponent {
21
- protected readonly theme: ThemeService;
22
- protected readonly options: ({
23
- value: "light";
24
- label: string;
25
- } | {
26
- value: "dark";
27
- label: string;
28
- } | {
29
- value: "system";
30
- label: string;
31
- })[];
32
- protected readonly currentOption: i0.Signal<{
33
- value: "light";
34
- label: string;
35
- } | {
36
- value: "dark";
37
- label: string;
38
- } | {
39
- value: "system";
40
- label: string;
41
- }>;
42
- static ɵfac: i0.ɵɵFactoryDeclaration<SchemeSwitcherComponent, never>;
43
- static ɵcmp: i0.ɵɵComponentDeclaration<SchemeSwitcherComponent, "scheme-switcher", never, {}, {}, never, never, true, never>;
44
- }
45
-
46
- export { ColorPickerComponent, SchemeSwitcherComponent, StyleSwitcherComponent };
@@ -1,10 +0,0 @@
1
- import { ThemeService } from '@ojiepermana/angular/theme/service';
2
- import * as i0 from '@angular/core';
3
-
4
- declare class ThemeHostDirective {
5
- protected readonly theme: ThemeService;
6
- static ɵfac: i0.ɵɵFactoryDeclaration<ThemeHostDirective, never>;
7
- static ɵdir: i0.ɵɵDirectiveDeclaration<ThemeHostDirective, "[ngtThemeHost]", never, {}, {}, never, never, true, never>;
8
- }
9
-
10
- export { ThemeHostDirective };
@@ -1,68 +0,0 @@
1
- import * as _angular_core from '@angular/core';
2
- import { EnvironmentProviders, InjectionToken } from '@angular/core';
3
-
4
- declare const THEME_SCHEMES: readonly ["light", "dark", "system"];
5
- type ThemeScheme = (typeof THEME_SCHEMES)[number];
6
- declare const THEME_COLORS: readonly ["brand", "blue", "green", "red", "cyan", "purple", "orange"];
7
- type ThemeColor = (typeof THEME_COLORS)[number];
8
- declare const THEME_STYLES: readonly ["flat", "glass"];
9
- type ThemeStyle = (typeof THEME_STYLES)[number];
10
- interface ThemeColorOption {
11
- readonly value: ThemeColor;
12
- readonly label: string;
13
- }
14
- type ThemeColorLabels = Partial<Record<ThemeColor, string>>;
15
- interface NgThemeConfig {
16
- defaultScheme: ThemeScheme;
17
- defaultColor: ThemeColor;
18
- defaultStyle: ThemeStyle;
19
- colors?: readonly ThemeColor[];
20
- colorLabels?: ThemeColorLabels;
21
- }
22
-
23
- declare class ThemeService {
24
- private readonly config;
25
- private readonly document;
26
- private readonly destroyRef;
27
- private readonly isBrowser;
28
- private readonly storage;
29
- private readonly mediaQuery;
30
- private readonly systemPrefersDark;
31
- private readonly availableColorOptions;
32
- readonly scheme: _angular_core.WritableSignal<"light" | "dark" | "system">;
33
- readonly color: _angular_core.WritableSignal<"brand" | "blue" | "green" | "red" | "cyan" | "purple" | "orange">;
34
- readonly style: _angular_core.WritableSignal<"flat" | "glass">;
35
- readonly colorOptions: _angular_core.Signal<readonly ThemeColorOption[]>;
36
- readonly resolvedScheme: _angular_core.Signal<"light" | "dark">;
37
- constructor();
38
- /**
39
- * Updates the selected theme scheme and persists the choice for future sessions.
40
- */
41
- setScheme(value: ThemeScheme): void;
42
- /**
43
- * Updates the active theme color when it is part of the configured preset list.
44
- */
45
- setColor(value: ThemeColor): void;
46
- /**
47
- * Updates the active style preset and persists it to local storage.
48
- */
49
- setStyle(value: ThemeStyle): void;
50
- /**
51
- * Cycles the scheme through light, dark, and system while keeping the DOM contract in sync.
52
- */
53
- toggleScheme(): void;
54
- /**
55
- * Clears persisted theme state and restores the configured defaults for all theme axes.
56
- */
57
- reset(): void;
58
- private applyToDOM;
59
- static ɵfac: _angular_core.ɵɵFactoryDeclaration<ThemeService, never>;
60
- static ɵprov: _angular_core.ɵɵInjectableDeclaration<ThemeService>;
61
- }
62
-
63
- declare function provideNgTheme(config?: Partial<NgThemeConfig>): EnvironmentProviders;
64
-
65
- declare const NG_THEME_CONFIG: InjectionToken<NgThemeConfig>;
66
-
67
- export { NG_THEME_CONFIG, ThemeService, provideNgTheme };
68
- export type { NgThemeConfig, ThemeColor, ThemeColorLabels, ThemeColorOption, ThemeScheme, ThemeStyle };