@ojiepermana/angular 22.1.14 → 22.2.1
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 +8 -6
- package/SUPPORT.md +3 -3
- package/chart/README.md +1 -1
- package/component/README.md +2 -2
- package/component/calendar/README.md +3 -15
- package/component/drawer/README.md +1 -2
- package/fesm2022/ojiepermana-angular-chart-area.mjs +352 -137
- package/fesm2022/ojiepermana-angular-chart-bar.mjs +744 -524
- package/fesm2022/ojiepermana-angular-chart-core.mjs +1140 -1344
- package/fesm2022/ojiepermana-angular-chart-line.mjs +393 -147
- package/fesm2022/ojiepermana-angular-chart-pie.mjs +408 -179
- package/fesm2022/ojiepermana-angular-chart-primitives.mjs +1262 -920
- package/fesm2022/ojiepermana-angular-chart-radar.mjs +473 -205
- package/fesm2022/ojiepermana-angular-chart-radial.mjs +425 -182
- package/fesm2022/ojiepermana-angular-chart-scatter.mjs +386 -210
- package/fesm2022/ojiepermana-angular-chart.mjs +3 -19
- package/fesm2022/ojiepermana-angular-component-accordion.mjs +485 -243
- package/fesm2022/ojiepermana-angular-component-alert-dialog.mjs +963 -325
- package/fesm2022/ojiepermana-angular-component-alert.mjs +266 -103
- package/fesm2022/ojiepermana-angular-component-aspect-ratio.mjs +80 -35
- package/fesm2022/ojiepermana-angular-component-avatar.mjs +402 -135
- package/fesm2022/ojiepermana-angular-component-badge.mjs +109 -59
- package/fesm2022/ojiepermana-angular-component-breadcrumb.mjs +410 -142
- package/fesm2022/ojiepermana-angular-component-button-group.mjs +249 -96
- package/fesm2022/ojiepermana-angular-component-button.mjs +153 -75
- package/fesm2022/ojiepermana-angular-component-calendar.mjs +531 -418
- package/fesm2022/ojiepermana-angular-component-card.mjs +457 -171
- package/fesm2022/ojiepermana-angular-component-carousel.mjs +642 -272
- package/fesm2022/ojiepermana-angular-component-checkbox.mjs +312 -108
- package/fesm2022/ojiepermana-angular-component-collapsible.mjs +299 -115
- package/fesm2022/ojiepermana-angular-component-combobox.mjs +396 -183
- package/fesm2022/ojiepermana-angular-component-command.mjs +807 -347
- package/fesm2022/ojiepermana-angular-component-composer.mjs +807 -330
- package/fesm2022/ojiepermana-angular-component-context-menu.mjs +196 -161
- package/fesm2022/ojiepermana-angular-component-date-picker.mjs +650 -338
- package/fesm2022/ojiepermana-angular-component-dialog.mjs +710 -316
- package/fesm2022/ojiepermana-angular-component-drawer.mjs +1 -5
- package/fesm2022/ojiepermana-angular-component-dropdown-menu.mjs +1212 -646
- package/fesm2022/ojiepermana-angular-component-editor.mjs +987 -502
- package/fesm2022/ojiepermana-angular-component-empty.mjs +350 -137
- package/fesm2022/ojiepermana-angular-component-form.mjs +813 -434
- package/fesm2022/ojiepermana-angular-component-hover-card.mjs +486 -277
- package/fesm2022/ojiepermana-angular-component-icon.mjs +241 -140
- package/fesm2022/ojiepermana-angular-component-input-group.mjs +449 -176
- package/fesm2022/ojiepermana-angular-component-input-otp.mjs +891 -488
- package/fesm2022/ojiepermana-angular-component-input.mjs +86 -55
- package/fesm2022/ojiepermana-angular-component-item.mjs +713 -261
- package/fesm2022/ojiepermana-angular-component-kanban.mjs +714 -216
- package/fesm2022/ojiepermana-angular-component-kbd.mjs +124 -52
- package/fesm2022/ojiepermana-angular-component-label.mjs +82 -31
- package/fesm2022/ojiepermana-angular-component-menubar.mjs +479 -329
- package/fesm2022/ojiepermana-angular-component-native-select.mjs +167 -65
- package/fesm2022/ojiepermana-angular-component-navigation-menu.mjs +683 -380
- package/fesm2022/ojiepermana-angular-component-pagination.mjs +277 -94
- package/fesm2022/ojiepermana-angular-component-pillbox.mjs +1283 -607
- package/fesm2022/ojiepermana-angular-component-popover.mjs +291 -204
- package/fesm2022/ojiepermana-angular-component-progress.mjs +176 -53
- package/fesm2022/ojiepermana-angular-component-radio.mjs +449 -142
- package/fesm2022/ojiepermana-angular-component-resizable.mjs +659 -453
- package/fesm2022/ojiepermana-angular-component-scroll-area.mjs +117 -39
- package/fesm2022/ojiepermana-angular-component-segmented-control.mjs +351 -172
- package/fesm2022/ojiepermana-angular-component-select.mjs +475 -345
- package/fesm2022/ojiepermana-angular-component-separator.mjs +102 -35
- package/fesm2022/ojiepermana-angular-component-sheet.mjs +797 -347
- package/fesm2022/ojiepermana-angular-component-skeleton.mjs +62 -29
- package/fesm2022/ojiepermana-angular-component-slider.mjs +592 -376
- package/fesm2022/ojiepermana-angular-component-spinner.mjs +135 -38
- package/fesm2022/ojiepermana-angular-component-switch.mjs +315 -103
- package/fesm2022/ojiepermana-angular-component-table.mjs +440 -153
- package/fesm2022/ojiepermana-angular-component-tabs.mjs +590 -317
- package/fesm2022/ojiepermana-angular-component-textarea.mjs +85 -50
- package/fesm2022/ojiepermana-angular-component-timeline.mjs +609 -231
- package/fesm2022/ojiepermana-angular-component-toast.mjs +229 -243
- package/fesm2022/ojiepermana-angular-component-toggle-group.mjs +573 -288
- package/fesm2022/ojiepermana-angular-component-toggle.mjs +187 -78
- package/fesm2022/ojiepermana-angular-component-tooltip.mjs +798 -517
- package/fesm2022/ojiepermana-angular-component-utils-core.mjs +159 -292
- package/fesm2022/ojiepermana-angular-component-utils-overlay.mjs +46 -58
- package/fesm2022/ojiepermana-angular-component-utils-scale.mjs +76 -38
- package/fesm2022/ojiepermana-angular-component-utils.mjs +2 -8
- package/fesm2022/ojiepermana-angular-component.mjs +0 -10
- package/fesm2022/ojiepermana-angular-navigation-core.mjs +13 -23
- package/fesm2022/ojiepermana-angular-navigation-icon.mjs +35 -24
- package/fesm2022/ojiepermana-angular-navigation-navigation-badge-count.component-DYuysKVf.mjs +129 -0
- package/fesm2022/ojiepermana-angular-navigation-navigation-dockbar-menu.component-COiTaw34.mjs +812 -0
- package/fesm2022/{ojiepermana-angular-navigation-navigation-entry-grid.component-COQ-60DS.mjs → ojiepermana-angular-navigation-navigation-entry-grid.component-YIz0IsIb.mjs} +392 -207
- package/fesm2022/ojiepermana-angular-navigation-navigation-flyout-menu.component-D2vwEwBY.mjs +650 -0
- package/fesm2022/ojiepermana-angular-navigation-navigation-horizontal.component-B5D7yXfb.mjs +662 -0
- package/fesm2022/ojiepermana-angular-navigation-navigation-item.component-CUb68MZH.mjs +1219 -0
- package/fesm2022/ojiepermana-angular-navigation-navigation-list.component-CrK16trj.mjs +327 -0
- package/fesm2022/ojiepermana-angular-navigation-service.mjs +544 -724
- package/fesm2022/ojiepermana-angular-navigation-types.mjs +139 -56
- package/fesm2022/ojiepermana-angular-navigation.mjs +3256 -4
- package/fesm2022/ojiepermana-angular-sdk.mjs +91 -201
- package/fesm2022/ojiepermana-angular-theme-component-settings.mjs +1125 -737
- package/fesm2022/ojiepermana-angular-theme-layout-services.mjs +245 -328
- package/fesm2022/ojiepermana-angular-theme-layout-types.mjs +35 -38
- package/fesm2022/ojiepermana-angular-theme-layout-wrapper.mjs +1928 -553
- package/fesm2022/ojiepermana-angular-theme-layout.mjs +847 -496
- package/fesm2022/ojiepermana-angular-theme-page-core.mjs +288 -358
- package/fesm2022/ojiepermana-angular-theme-page-filter.mjs +362 -224
- package/fesm2022/ojiepermana-angular-theme-page-overview.mjs +88 -0
- package/fesm2022/ojiepermana-angular-theme-page-root.mjs +576 -254
- package/fesm2022/ojiepermana-angular-theme-page-side.mjs +317 -177
- package/fesm2022/ojiepermana-angular-theme-page-slots.mjs +256 -112
- package/fesm2022/ojiepermana-angular-theme-page.mjs +7 -12
- package/fesm2022/ojiepermana-angular-theme-shell-services.mjs +215 -326
- package/fesm2022/ojiepermana-angular-theme-shell-types.mjs +68 -129
- package/fesm2022/ojiepermana-angular-theme-shell.mjs +907 -378
- package/fesm2022/ojiepermana-angular-theme-styles.mjs +521 -720
- package/fesm2022/ojiepermana-angular-theme.mjs +0 -10
- package/fesm2022/ojiepermana-angular.mjs +5 -24
- package/navigation/README.md +69 -18
- package/package.json +16 -12
- package/sdk/README.md +1 -1
- package/sdk/src/writer/index.js +2 -2
- package/theme/README.md +1 -1
- package/theme/layout/README.md +2 -4
- package/theme/page/README.md +50 -0
- package/theme/styles/README.md +10 -10
- package/theme/styles/css/base/prefers-dark.css +1 -1
- package/theme/styles/css/base/status.css +1 -1
- package/theme/styles/css/color/amber.css +1 -1
- package/theme/styles/css/color/blue.css +1 -1
- package/theme/styles/css/color/cyan.css +1 -1
- package/theme/styles/css/color/emerald.css +1 -1
- package/theme/styles/css/color/fuchsia.css +1 -1
- package/theme/styles/css/color/green.css +1 -1
- package/theme/styles/css/color/indigo.css +1 -1
- package/theme/styles/css/color/lime.css +1 -1
- package/theme/styles/css/color/orange.css +1 -1
- package/theme/styles/css/color/pink.css +1 -1
- package/theme/styles/css/color/purple.css +1 -1
- package/theme/styles/css/color/red.css +1 -1
- package/theme/styles/css/color/rose.css +1 -1
- package/theme/styles/css/color/sky.css +1 -1
- package/theme/styles/css/color/teal.css +1 -1
- package/theme/styles/css/color/violet.css +1 -1
- package/theme/styles/css/color/yellow.css +1 -1
- package/theme/styles/css/neutral/gray.css +1 -1
- package/theme/styles/css/neutral/mauve.css +1 -1
- package/theme/styles/css/neutral/mist.css +1 -1
- package/theme/styles/css/neutral/neutral.css +1 -1
- package/theme/styles/css/neutral/olive.css +1 -1
- package/theme/styles/css/neutral/slate.css +1 -1
- package/theme/styles/css/neutral/stone.css +1 -1
- package/theme/styles/css/neutral/taupe.css +1 -1
- package/theme/styles/css/neutral/zinc.css +1 -1
- package/types/ojiepermana-angular-chart-area.d.ts +126 -63
- package/types/ojiepermana-angular-chart-bar.d.ts +244 -154
- package/types/ojiepermana-angular-chart-core.d.ts +409 -398
- package/types/ojiepermana-angular-chart-line.d.ts +141 -68
- package/types/ojiepermana-angular-chart-pie.d.ts +192 -121
- package/types/ojiepermana-angular-chart-primitives.d.ts +283 -214
- package/types/ojiepermana-angular-chart-radar.d.ts +189 -108
- package/types/ojiepermana-angular-chart-radial.d.ts +177 -106
- package/types/ojiepermana-angular-chart-scatter.d.ts +166 -110
- package/types/ojiepermana-angular-chart.d.ts +3 -2
- package/types/ojiepermana-angular-component-accordion.d.ts +135 -81
- package/types/ojiepermana-angular-component-alert-dialog.d.ts +271 -123
- package/types/ojiepermana-angular-component-alert.d.ts +69 -39
- package/types/ojiepermana-angular-component-aspect-ratio.d.ts +20 -12
- package/types/ojiepermana-angular-component-avatar.d.ts +103 -49
- package/types/ojiepermana-angular-component-badge.d.ts +36 -24
- package/types/ojiepermana-angular-component-breadcrumb.d.ts +79 -40
- package/types/ojiepermana-angular-component-button-group.d.ts +48 -24
- package/types/ojiepermana-angular-component-button.d.ts +44 -27
- package/types/ojiepermana-angular-component-calendar.d.ts +145 -107
- package/types/ojiepermana-angular-component-card.d.ts +112 -63
- package/types/ojiepermana-angular-component-carousel.d.ts +150 -81
- package/types/ojiepermana-angular-component-checkbox.d.ts +96 -38
- package/types/ojiepermana-angular-component-collapsible.d.ts +65 -39
- package/types/ojiepermana-angular-component-combobox.d.ts +100 -55
- package/types/ojiepermana-angular-component-command.d.ts +206 -121
- package/types/ojiepermana-angular-component-composer.d.ts +184 -84
- package/types/ojiepermana-angular-component-context-menu.d.ts +51 -41
- package/types/ojiepermana-angular-component-date-picker.d.ts +199 -109
- package/types/ojiepermana-angular-component-dialog.d.ts +200 -105
- package/types/ojiepermana-angular-component-drawer.d.ts +2 -1
- package/types/ojiepermana-angular-component-dropdown-menu.d.ts +324 -202
- package/types/ojiepermana-angular-component-editor.d.ts +215 -117
- package/types/ojiepermana-angular-component-empty.d.ts +80 -45
- package/types/ojiepermana-angular-component-form.d.ts +185 -121
- package/types/ojiepermana-angular-component-hover-card.d.ts +130 -72
- package/types/ojiepermana-angular-component-icon.d.ts +87 -57
- package/types/ojiepermana-angular-component-input-group.d.ts +93 -46
- package/types/ojiepermana-angular-component-input-otp.d.ts +243 -150
- package/types/ojiepermana-angular-component-input.d.ts +27 -17
- package/types/ojiepermana-angular-component-item.d.ts +160 -84
- package/types/ojiepermana-angular-component-kanban.d.ts +157 -62
- package/types/ojiepermana-angular-component-kbd.d.ts +24 -15
- package/types/ojiepermana-angular-component-label.d.ts +19 -11
- package/types/ojiepermana-angular-component-menubar.d.ts +120 -90
- package/types/ojiepermana-angular-component-native-select.d.ts +37 -24
- package/types/ojiepermana-angular-component-navigation-menu.d.ts +157 -98
- package/types/ojiepermana-angular-component-pagination.d.ts +78 -28
- package/types/ojiepermana-angular-component-pillbox.d.ts +361 -204
- package/types/ojiepermana-angular-component-popover.d.ts +94 -64
- package/types/ojiepermana-angular-component-progress.d.ts +45 -17
- package/types/ojiepermana-angular-component-radio.d.ts +129 -53
- package/types/ojiepermana-angular-component-resizable.d.ts +160 -112
- package/types/ojiepermana-angular-component-scroll-area.d.ts +33 -15
- package/types/ojiepermana-angular-component-segmented-control.d.ts +94 -50
- package/types/ojiepermana-angular-component-select.d.ts +94 -77
- package/types/ojiepermana-angular-component-separator.d.ts +26 -14
- package/types/ojiepermana-angular-component-sheet.d.ts +226 -116
- package/types/ojiepermana-angular-component-skeleton.d.ts +13 -10
- package/types/ojiepermana-angular-component-slider.d.ts +140 -75
- package/types/ojiepermana-angular-component-spinner.d.ts +31 -13
- package/types/ojiepermana-angular-component-switch.d.ts +97 -40
- package/types/ojiepermana-angular-component-table.d.ts +102 -50
- package/types/ojiepermana-angular-component-tabs.d.ts +174 -115
- package/types/ojiepermana-angular-component-textarea.d.ts +27 -17
- package/types/ojiepermana-angular-component-timeline.d.ts +141 -59
- package/types/ojiepermana-angular-component-toast.d.ts +51 -55
- package/types/ojiepermana-angular-component-toggle-group.d.ts +159 -88
- package/types/ojiepermana-angular-component-toggle.d.ts +47 -25
- package/types/ojiepermana-angular-component-tooltip.d.ts +222 -132
- package/types/ojiepermana-angular-component-utils-core.d.ts +81 -90
- package/types/ojiepermana-angular-component-utils-overlay.d.ts +7 -11
- package/types/ojiepermana-angular-component-utils-scale.d.ts +20 -12
- package/types/ojiepermana-angular-component-utils.d.ts +2 -2
- package/types/ojiepermana-angular-component.d.ts +1 -2
- package/types/ojiepermana-angular-navigation-core.d.ts +46 -50
- package/types/ojiepermana-angular-navigation-icon.d.ts +9 -12
- package/types/ojiepermana-angular-navigation-service.d.ts +112 -115
- package/types/ojiepermana-angular-navigation-types.d.ts +166 -125
- package/types/ojiepermana-angular-navigation.d.ts +708 -375
- package/types/ojiepermana-angular-sdk.d.ts +69 -71
- package/types/ojiepermana-angular-theme-component-settings.d.ts +120 -86
- package/types/ojiepermana-angular-theme-layout-services.d.ts +119 -124
- package/types/ojiepermana-angular-theme-layout-types.d.ts +27 -31
- package/types/ojiepermana-angular-theme-layout-wrapper.d.ts +446 -187
- package/types/ojiepermana-angular-theme-layout.d.ts +201 -113
- package/types/ojiepermana-angular-theme-page-core.d.ts +136 -142
- package/types/ojiepermana-angular-theme-page-filter.d.ts +112 -62
- package/types/ojiepermana-angular-theme-page-overview.d.ts +28 -0
- package/types/ojiepermana-angular-theme-page-root.d.ts +172 -88
- package/types/ojiepermana-angular-theme-page-side.d.ts +89 -49
- package/types/ojiepermana-angular-theme-page-slots.d.ts +58 -37
- package/types/ojiepermana-angular-theme-page.d.ts +7 -5
- package/types/ojiepermana-angular-theme-shell-services.d.ts +119 -125
- package/types/ojiepermana-angular-theme-shell-types.d.ts +38 -41
- package/types/ojiepermana-angular-theme-shell.d.ts +139 -61
- package/types/ojiepermana-angular-theme-styles.d.ts +184 -196
- package/types/ojiepermana-angular-theme.d.ts +1 -2
- package/types/ojiepermana-angular.d.ts +5 -5
- package/fesm2022/ojiepermana-angular-navigation-navigation-badge-count.component-Be3IqzG4.mjs +0 -91
- package/fesm2022/ojiepermana-angular-navigation-navigation-dockbar-menu.component-Bc7DWK3R.mjs +0 -522
- package/fesm2022/ojiepermana-angular-navigation-navigation-flyout-menu.component-DA8VPEn7.mjs +0 -404
- package/fesm2022/ojiepermana-angular-navigation-navigation-horizontal.component-U2TJTzlW.mjs +0 -466
- package/fesm2022/ojiepermana-angular-navigation-ojiepermana-angular-navigation-CIUhmytH.mjs +0 -2668
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import * as i0 from
|
|
2
|
-
import {
|
|
3
|
-
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import { EnvironmentProviders, InjectionToken, Signal, WritableSignal } from "@angular/core";
|
|
4
3
|
/**
|
|
5
4
|
* One place for the "a preference that lives in localStorage and shows up as an
|
|
6
5
|
* attribute on `<html>`" pattern that every theme axis needs.
|
|
@@ -28,60 +27,60 @@ import { Signal, WritableSignal, InjectionToken, EnvironmentProviders } from '@a
|
|
|
28
27
|
* - the effect writes on its FIRST run, so storage holds the resolved default
|
|
29
28
|
* immediately after construction even when nothing was stored.
|
|
30
29
|
*/
|
|
31
|
-
declare function persistedSignal<T>(options: {
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
30
|
+
export declare function persistedSignal<T>(options: {
|
|
31
|
+
readonly key: string;
|
|
32
|
+
/** Turn the raw stored string (or `null`) into a value. Must always succeed. */
|
|
33
|
+
readonly parse: (raw: string | null) => T;
|
|
34
|
+
/** Serialize for storage. Returning `null` REMOVES the key. */
|
|
35
|
+
readonly serialize: (value: T) => string | null;
|
|
36
|
+
/** Defaults to `inject(DOCUMENT, { optional: true })`. */
|
|
37
|
+
readonly documentRef?: Document | null;
|
|
39
38
|
}): WritableSignal<T>;
|
|
40
39
|
/**
|
|
41
40
|
* Mirror a reactive string onto one or more `<html>` attributes. A `null` value
|
|
42
41
|
* removes them.
|
|
43
42
|
*/
|
|
44
|
-
declare function htmlAttributeEffect(options: {
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
43
|
+
export declare function htmlAttributeEffect(options: {
|
|
44
|
+
readonly attribute: string | readonly string[];
|
|
45
|
+
readonly source: () => string | null;
|
|
46
|
+
readonly documentRef?: Document | null;
|
|
48
47
|
}): void;
|
|
49
48
|
/** Mirror reactive inline custom properties onto `<html>`. A `null` value removes one. */
|
|
50
|
-
declare function htmlStylePropertyEffect(options: {
|
|
51
|
-
|
|
52
|
-
|
|
49
|
+
export declare function htmlStylePropertyEffect(options: {
|
|
50
|
+
readonly source: () => Readonly<Record<string, string | null>>;
|
|
51
|
+
readonly documentRef?: Document | null;
|
|
53
52
|
}): void;
|
|
54
|
-
interface PersistedHtmlAttribute<T extends string> {
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
53
|
+
export interface PersistedHtmlAttribute<T extends string> {
|
|
54
|
+
/** The persisted value. Correct immediately, before any effect has run. */
|
|
55
|
+
readonly value: Signal<T>;
|
|
56
|
+
/** What actually reaches the DOM. Same as {@link value} unless `resolveAttributeValue` is given. */
|
|
57
|
+
readonly attributeValue: Signal<string>;
|
|
58
|
+
set(next: T): void;
|
|
60
59
|
}
|
|
61
|
-
interface PersistedHtmlAttributeOptions<T extends string> {
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
60
|
+
export interface PersistedHtmlAttributeOptions<T extends string> {
|
|
61
|
+
/** localStorage key. */
|
|
62
|
+
readonly key: string;
|
|
63
|
+
/** The `<html>` attribute, or several when one value drives more than one. */
|
|
64
|
+
readonly attribute: string | readonly string[];
|
|
65
|
+
/**
|
|
66
|
+
* Union guard plus fallback. Applied to the stored string AND to `initial`,
|
|
67
|
+
* which is what the services do today: a junk stored value and a junk
|
|
68
|
+
* configured default both land on the same known-good value.
|
|
69
|
+
*/
|
|
70
|
+
readonly normalize: (value: string | null | undefined) => T;
|
|
71
|
+
/**
|
|
72
|
+
* The configured default, already resolved by the caller. It is a caller
|
|
73
|
+
* concern because one axis derives it from another option, and this helper
|
|
74
|
+
* must not know that.
|
|
75
|
+
*/
|
|
76
|
+
readonly initial?: string | null | undefined;
|
|
77
|
+
/**
|
|
78
|
+
* What to WRITE when it differs from what is PERSISTED. Called inside the
|
|
79
|
+
* effect, so reading a signal here is tracked: that is how a `'system'` mode
|
|
80
|
+
* keeps following the operating system while still persisting `'system'`.
|
|
81
|
+
*/
|
|
82
|
+
readonly resolveAttributeValue?: (value: T) => string;
|
|
83
|
+
readonly documentRef?: Document | null;
|
|
85
84
|
}
|
|
86
85
|
/**
|
|
87
86
|
* A persisted preference that also shows up as an attribute on `<html>`.
|
|
@@ -89,7 +88,7 @@ interface PersistedHtmlAttributeOptions<T extends string> {
|
|
|
89
88
|
* The stored value wins over the configured default, which is the rule every
|
|
90
89
|
* axis already followed.
|
|
91
90
|
*/
|
|
92
|
-
declare function persistedHtmlAttributeSignal<T extends string>(options: PersistedHtmlAttributeOptions<T>): PersistedHtmlAttribute<T>;
|
|
91
|
+
export declare function persistedHtmlAttributeSignal<T extends string>(options: PersistedHtmlAttributeOptions<T>): PersistedHtmlAttribute<T>;
|
|
93
92
|
/**
|
|
94
93
|
* `(prefers-color-scheme: dark)` as a signal, torn down with the injection
|
|
95
94
|
* context that created it.
|
|
@@ -98,12 +97,11 @@ declare function persistedHtmlAttributeSignal<T extends string>(options: Persist
|
|
|
98
97
|
* PERSISTED value is `'system'` still has to write a concrete `light` or `dark`
|
|
99
98
|
* to the DOM, and this is what makes that reactive.
|
|
100
99
|
*/
|
|
101
|
-
declare function prefersDarkSignal(documentRef?: Document | null): Signal<boolean>;
|
|
102
|
-
|
|
100
|
+
export declare function prefersDarkSignal(documentRef?: Document | null): Signal<boolean>;
|
|
103
101
|
/** Resolved brand color. Both fields are HSL triplets `H S% L%`. */
|
|
104
|
-
interface ThemeBrand {
|
|
105
|
-
|
|
106
|
-
|
|
102
|
+
export interface ThemeBrand {
|
|
103
|
+
readonly color: string;
|
|
104
|
+
readonly foreground: string;
|
|
107
105
|
}
|
|
108
106
|
/**
|
|
109
107
|
* Consumer-configurable brand color. Writes `--brand`, `--brand-foreground`, the
|
|
@@ -115,49 +113,48 @@ interface ThemeBrand {
|
|
|
115
113
|
* Default comes from `provideUiTheme({ brand })`; `setBrand()` overrides at
|
|
116
114
|
* runtime and persists. When unset, `--brand` falls back to `var(--primary)`.
|
|
117
115
|
*/
|
|
118
|
-
declare class ThemeBrandService {
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
116
|
+
export declare class ThemeBrandService {
|
|
117
|
+
private readonly options;
|
|
118
|
+
/**
|
|
119
|
+
* Storage half shared with the other axes; the DOM half is custom, because the
|
|
120
|
+
* brand paints a set of inline custom properties rather than setting an
|
|
121
|
+
* attribute. `serialize` returning `null` is what clears the stored key.
|
|
122
|
+
*/
|
|
123
|
+
private readonly brandState;
|
|
124
|
+
readonly brand: import("@angular/core").Signal<ThemeBrand | null>;
|
|
125
|
+
constructor();
|
|
126
|
+
/**
|
|
127
|
+
* Set the brand color. `color`/`foreground` are HSL triplets (e.g.
|
|
128
|
+
* `'221 83% 53%'`); a hex color is converted, since that is what a native
|
|
129
|
+
* picker hands back. The fill is kept exactly as chosen — `--brand-foreground`
|
|
130
|
+
* is moved until text on it clears 4.5 to 1, and the focus ring is solved
|
|
131
|
+
* separately per mode, so a pale brand can never leave the ring invisible.
|
|
132
|
+
*/
|
|
133
|
+
setBrand(color: string, foreground?: string): void;
|
|
134
|
+
/** Clear the consumer brand → `--brand` falls back to `var(--primary)`. */
|
|
135
|
+
clearBrand(): void;
|
|
136
|
+
private normalizeOption;
|
|
137
|
+
/** The custom properties the brand paints. `null` removes one. */
|
|
138
|
+
private brandProperties;
|
|
139
|
+
/** Stored brands are JSON. Anything unparsable reads as "no stored brand". */
|
|
140
|
+
private parseStored;
|
|
141
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ThemeBrandService, never>;
|
|
142
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<any>;
|
|
145
143
|
}
|
|
146
|
-
|
|
147
|
-
declare const
|
|
148
|
-
declare const RESOLVED_THEME_MODES: readonly ["light", "dark"];
|
|
144
|
+
export declare const THEME_MODES: readonly ["light", "dark", "system"];
|
|
145
|
+
export declare const RESOLVED_THEME_MODES: readonly ["light", "dark"];
|
|
149
146
|
/**
|
|
150
147
|
* FluxUI-style accent palettes (axis `theme-color`). `base` = core theme (no
|
|
151
148
|
* override); `brand` = the consumer's `--brand` color. Others re-tint the full
|
|
152
149
|
* palette. Order mirrors the FluxUI accent picker (base…rose) + `brand`.
|
|
153
150
|
*/
|
|
154
|
-
declare const THEME_COLORS: readonly ["base", "red", "orange", "amber", "yellow", "lime", "green", "emerald", "teal", "cyan", "sky", "blue", "indigo", "violet", "purple", "fuchsia", "pink", "rose", "brand"];
|
|
151
|
+
export declare const THEME_COLORS: readonly ["base", "red", "orange", "amber", "yellow", "lime", "green", "emerald", "teal", "cyan", "sky", "blue", "indigo", "violet", "purple", "fuchsia", "pink", "rose", "brand"];
|
|
155
152
|
/**
|
|
156
153
|
* Neutral families (axis `theme-neutral`). `base` = core theme neutrals and lets
|
|
157
154
|
* Layout patterns follow the accent. Non-base values override both the gray
|
|
158
155
|
* family and Layout's decorative pattern hue, while composing with any accent.
|
|
159
156
|
*/
|
|
160
|
-
declare const THEME_NEUTRALS: readonly ["base", "slate", "gray", "zinc", "neutral", "stone", "mauve", "olive", "mist", "taupe"];
|
|
157
|
+
export declare const THEME_NEUTRALS: readonly ["base", "slate", "gray", "zinc", "neutral", "stone", "mauve", "olive", "mist", "taupe"];
|
|
161
158
|
/**
|
|
162
159
|
* Corner radius presets (axis `theme-radius`). Each drives the single
|
|
163
160
|
* `--radius-base` knob; the whole `--radius-*` scale + `rounded-*` utilities
|
|
@@ -165,42 +162,41 @@ declare const THEME_NEUTRALS: readonly ["base", "slate", "gray", "zinc", "neutra
|
|
|
165
162
|
* `xs` 0.125rem, `sm` 0.25rem, `md` 0.375rem (the default), `xl` 0.75rem — and
|
|
166
163
|
* `full` is the pill extreme.
|
|
167
164
|
*/
|
|
168
|
-
declare const THEME_RADII: readonly ["none", "xs", "sm", "md", "xl", "full"];
|
|
165
|
+
export declare const THEME_RADII: readonly ["none", "xs", "sm", "md", "xl", "full"];
|
|
169
166
|
/**
|
|
170
167
|
* Spacing density presets (axis `theme-space`). Each drives the single
|
|
171
168
|
* `--spacing-base` knob; every `p-*`/`m-*`/`gap-*`/`w-*`/`h-*` utility follows.
|
|
172
169
|
* `normal` = the 0.25rem default (no-op baseline).
|
|
173
170
|
*/
|
|
174
|
-
declare const THEME_SPACES: readonly ["compact", "normal"];
|
|
175
|
-
type ThemeMode = (typeof THEME_MODES)[number];
|
|
176
|
-
type ResolvedThemeMode = (typeof RESOLVED_THEME_MODES)[number];
|
|
177
|
-
type ThemeColor = (typeof THEME_COLORS)[number];
|
|
178
|
-
type ThemeNeutral = (typeof THEME_NEUTRALS)[number];
|
|
179
|
-
type ThemeRadius = (typeof THEME_RADII)[number];
|
|
180
|
-
type ThemeSpace = (typeof THEME_SPACES)[number];
|
|
181
|
-
declare const DEFAULT_THEME_MODE: ThemeMode;
|
|
182
|
-
declare const DEFAULT_THEME_COLOR: ThemeColor;
|
|
183
|
-
declare const DEFAULT_THEME_NEUTRAL: ThemeNeutral;
|
|
184
|
-
declare const DEFAULT_THEME_RADIUS: ThemeRadius;
|
|
185
|
-
declare const DEFAULT_THEME_SPACE: ThemeSpace;
|
|
186
|
-
declare const THEME_MODE_STORAGE_KEY = "theme-mode";
|
|
187
|
-
declare const THEME_COLOR_STORAGE_KEY = "theme-color";
|
|
188
|
-
declare const THEME_NEUTRAL_STORAGE_KEY = "theme-neutral";
|
|
189
|
-
declare const THEME_BRAND_STORAGE_KEY = "theme-brand";
|
|
190
|
-
declare const THEME_RADIUS_STORAGE_KEY = "theme-radius";
|
|
191
|
-
declare const THEME_SPACE_STORAGE_KEY = "theme-space";
|
|
192
|
-
declare function isThemeMode(value: string | null | undefined): value is ThemeMode;
|
|
193
|
-
declare function isResolvedThemeMode(value: string | null | undefined): value is ResolvedThemeMode;
|
|
194
|
-
declare function isThemeColor(value: string | null | undefined): value is ThemeColor;
|
|
195
|
-
declare function isThemeNeutral(value: string | null | undefined): value is ThemeNeutral;
|
|
196
|
-
declare function isThemeRadius(value: string | null | undefined): value is ThemeRadius;
|
|
197
|
-
declare function isThemeSpace(value: string | null | undefined): value is ThemeSpace;
|
|
198
|
-
declare function normalizeThemeMode(value: string | null | undefined): ThemeMode;
|
|
199
|
-
declare function normalizeThemeColor(value: string | null | undefined): ThemeColor;
|
|
200
|
-
declare function normalizeThemeNeutral(value: string | null | undefined): ThemeNeutral;
|
|
201
|
-
declare function normalizeThemeRadius(value: string | null | undefined): ThemeRadius;
|
|
202
|
-
declare function normalizeThemeSpace(value: string | null | undefined): ThemeSpace;
|
|
203
|
-
|
|
171
|
+
export declare const THEME_SPACES: readonly ["compact", "normal"];
|
|
172
|
+
export type ThemeMode = (typeof THEME_MODES)[number];
|
|
173
|
+
export type ResolvedThemeMode = (typeof RESOLVED_THEME_MODES)[number];
|
|
174
|
+
export type ThemeColor = (typeof THEME_COLORS)[number];
|
|
175
|
+
export type ThemeNeutral = (typeof THEME_NEUTRALS)[number];
|
|
176
|
+
export type ThemeRadius = (typeof THEME_RADII)[number];
|
|
177
|
+
export type ThemeSpace = (typeof THEME_SPACES)[number];
|
|
178
|
+
export declare const DEFAULT_THEME_MODE: ThemeMode;
|
|
179
|
+
export declare const DEFAULT_THEME_COLOR: ThemeColor;
|
|
180
|
+
export declare const DEFAULT_THEME_NEUTRAL: ThemeNeutral;
|
|
181
|
+
export declare const DEFAULT_THEME_RADIUS: ThemeRadius;
|
|
182
|
+
export declare const DEFAULT_THEME_SPACE: ThemeSpace;
|
|
183
|
+
export declare const THEME_MODE_STORAGE_KEY = "theme-mode";
|
|
184
|
+
export declare const THEME_COLOR_STORAGE_KEY = "theme-color";
|
|
185
|
+
export declare const THEME_NEUTRAL_STORAGE_KEY = "theme-neutral";
|
|
186
|
+
export declare const THEME_BRAND_STORAGE_KEY = "theme-brand";
|
|
187
|
+
export declare const THEME_RADIUS_STORAGE_KEY = "theme-radius";
|
|
188
|
+
export declare const THEME_SPACE_STORAGE_KEY = "theme-space";
|
|
189
|
+
export declare function isThemeMode(value: string | null | undefined): value is ThemeMode;
|
|
190
|
+
export declare function isResolvedThemeMode(value: string | null | undefined): value is ResolvedThemeMode;
|
|
191
|
+
export declare function isThemeColor(value: string | null | undefined): value is ThemeColor;
|
|
192
|
+
export declare function isThemeNeutral(value: string | null | undefined): value is ThemeNeutral;
|
|
193
|
+
export declare function isThemeRadius(value: string | null | undefined): value is ThemeRadius;
|
|
194
|
+
export declare function isThemeSpace(value: string | null | undefined): value is ThemeSpace;
|
|
195
|
+
export declare function normalizeThemeMode(value: string | null | undefined): ThemeMode;
|
|
196
|
+
export declare function normalizeThemeColor(value: string | null | undefined): ThemeColor;
|
|
197
|
+
export declare function normalizeThemeNeutral(value: string | null | undefined): ThemeNeutral;
|
|
198
|
+
export declare function normalizeThemeRadius(value: string | null | undefined): ThemeRadius;
|
|
199
|
+
export declare function normalizeThemeSpace(value: string | null | undefined): ThemeSpace;
|
|
204
200
|
/**
|
|
205
201
|
* Drives the two FluxUI-style color axes:
|
|
206
202
|
* - accent → `<html theme-color>` (full tinted palette per color)
|
|
@@ -210,18 +206,17 @@ declare function normalizeThemeSpace(value: string | null | undefined): ThemeSpa
|
|
|
210
206
|
* (a persisted choice wins over the configured default). `base` on either axis
|
|
211
207
|
* means "no override" — the core base theme applies.
|
|
212
208
|
*/
|
|
213
|
-
declare class ThemeColorService {
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
209
|
+
export declare class ThemeColorService {
|
|
210
|
+
private readonly options;
|
|
211
|
+
private readonly colorAxis;
|
|
212
|
+
private readonly neutralAxis;
|
|
213
|
+
readonly color: import("@angular/core").Signal<"red" | "green" | "blue" | "base" | "orange" | "amber" | "yellow" | "lime" | "emerald" | "teal" | "cyan" | "sky" | "indigo" | "violet" | "purple" | "fuchsia" | "pink" | "rose" | "brand">;
|
|
214
|
+
readonly neutral: import("@angular/core").Signal<"base" | "slate" | "gray" | "zinc" | "neutral" | "stone" | "mauve" | "olive" | "mist" | "taupe">;
|
|
215
|
+
setColor(color: ThemeColor): void;
|
|
216
|
+
setNeutral(neutral: ThemeNeutral): void;
|
|
217
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ThemeColorService, never>;
|
|
218
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<any>;
|
|
223
219
|
}
|
|
224
|
-
|
|
225
220
|
/**
|
|
226
221
|
* Color mode axis. Writes both `<html theme-mode>` and `<html data-mode>`.
|
|
227
222
|
*
|
|
@@ -229,36 +224,34 @@ declare class ThemeColorService {
|
|
|
229
224
|
* point of the axis: `'system'` is what gets stored, while `light` or `dark` is
|
|
230
225
|
* what reaches the DOM, and it keeps following the operating system live.
|
|
231
226
|
*/
|
|
232
|
-
declare class ThemeModeService {
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
227
|
+
export declare class ThemeModeService {
|
|
228
|
+
private readonly options;
|
|
229
|
+
private readonly systemPrefersDark;
|
|
230
|
+
private readonly axis;
|
|
231
|
+
readonly mode: import("@angular/core").Signal<"light" | "dark" | "system">;
|
|
232
|
+
readonly resolvedMode: import("@angular/core").Signal<"light" | "dark">;
|
|
233
|
+
readonly isDark: import("@angular/core").Signal<boolean>;
|
|
234
|
+
setMode(mode: ThemeMode): void;
|
|
235
|
+
toggle(): void;
|
|
236
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ThemeModeService, never>;
|
|
237
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<any>;
|
|
243
238
|
}
|
|
244
|
-
|
|
245
239
|
/**
|
|
246
240
|
* Corner radius axis. Writes `<html theme-radius>`; each preset CSS sets the
|
|
247
241
|
* single `--radius-base` knob so the whole `--radius-*` scale + `rounded-*`
|
|
248
242
|
* utilities rescale. Persists to localStorage and seeds from
|
|
249
243
|
* `provideUiTheme({ radius })` (a persisted choice wins over the default).
|
|
250
244
|
*/
|
|
251
|
-
declare class ThemeRadiusService {
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
245
|
+
export declare class ThemeRadiusService {
|
|
246
|
+
private readonly options;
|
|
247
|
+
private readonly axis;
|
|
248
|
+
readonly radius: import("@angular/core").Signal<"none" | "xs" | "sm" | "md" | "xl" | "full">;
|
|
249
|
+
/** Active preset in px @ 16px root. */
|
|
250
|
+
readonly radiusPx: import("@angular/core").Signal<number>;
|
|
251
|
+
setRadius(radius: ThemeRadius): void;
|
|
252
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ThemeRadiusService, never>;
|
|
253
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<any>;
|
|
260
254
|
}
|
|
261
|
-
|
|
262
255
|
/**
|
|
263
256
|
* Spacing density axis. Writes `<html theme-space>`; each preset CSS sets the
|
|
264
257
|
* single `--spacing-base` knob, which Tailwind's `--spacing` derives from, so
|
|
@@ -266,54 +259,49 @@ declare class ThemeRadiusService {
|
|
|
266
259
|
* localStorage and seeds from `provideUiTheme({ space })` (a persisted choice
|
|
267
260
|
* wins over the default).
|
|
268
261
|
*/
|
|
269
|
-
declare class ThemeSpaceService {
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
262
|
+
export declare class ThemeSpaceService {
|
|
263
|
+
private readonly options;
|
|
264
|
+
private readonly axis;
|
|
265
|
+
readonly space: import("@angular/core").Signal<"compact" | "normal">;
|
|
266
|
+
setSpace(space: ThemeSpace): void;
|
|
267
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ThemeSpaceService, never>;
|
|
268
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<any>;
|
|
276
269
|
}
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
readonly materialSymbols?: boolean;
|
|
270
|
+
export interface ThemeIconOptions {
|
|
271
|
+
/**
|
|
272
|
+
* Load the Material Symbols icon font from Google Fonts at startup.
|
|
273
|
+
*
|
|
274
|
+
* Default: `false` (opt-in). Left off, `provideUiTheme()` makes no external
|
|
275
|
+
* network request — better for privacy, offline, and strict CSP. Set to
|
|
276
|
+
* `true` to fetch `https://fonts.googleapis.com/css2`, or self-host the font
|
|
277
|
+
* and import it in your own stylesheet instead.
|
|
278
|
+
*/
|
|
279
|
+
readonly materialSymbols?: boolean;
|
|
288
280
|
}
|
|
289
281
|
/** Consumer brand color. HSL triplets `H S% L%` consumed by `hsl(var(--brand))`. */
|
|
290
|
-
interface ThemeBrandOptions {
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
282
|
+
export interface ThemeBrandOptions {
|
|
283
|
+
/** Brand color, e.g. `'221 83% 53%'`. */
|
|
284
|
+
readonly color: string;
|
|
285
|
+
/** Foreground on solid brand fills. Defaults to white. */
|
|
286
|
+
readonly foreground?: string;
|
|
295
287
|
}
|
|
296
|
-
interface ThemeOptions {
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
288
|
+
export interface ThemeOptions {
|
|
289
|
+
readonly mode?: ThemeMode;
|
|
290
|
+
/** Initial accent palette (`theme-color`). Persisted choice wins over this. */
|
|
291
|
+
readonly color?: ThemeColor;
|
|
292
|
+
/** Initial neutral family (`theme-neutral`). Persisted choice wins over this. */
|
|
293
|
+
readonly neutral?: ThemeNeutral;
|
|
294
|
+
/** Initial corner radius preset (`theme-radius`). Persisted choice wins over this. */
|
|
295
|
+
readonly radius?: ThemeRadius;
|
|
296
|
+
/** Initial spacing density preset (`theme-space`). Persisted choice wins over this. */
|
|
297
|
+
readonly space?: ThemeSpace;
|
|
298
|
+
/**
|
|
299
|
+
* Consumer brand color → `--brand` / `bg-brand`, and the `brand` accent preset.
|
|
300
|
+
* Pass an HSL triplet string, or `{ color, foreground }`. Persisted/runtime
|
|
301
|
+
* changes (ThemeBrandService.setBrand) win over this default.
|
|
302
|
+
*/
|
|
303
|
+
readonly brand?: string | ThemeBrandOptions;
|
|
304
|
+
readonly icons?: ThemeIconOptions;
|
|
313
305
|
}
|
|
314
|
-
declare const THEME_OPTIONS: InjectionToken<Readonly<ThemeOptions>>;
|
|
315
|
-
|
|
316
|
-
declare function provideUiTheme(options?: ThemeOptions): EnvironmentProviders;
|
|
317
|
-
|
|
318
|
-
export { DEFAULT_THEME_COLOR, DEFAULT_THEME_MODE, DEFAULT_THEME_NEUTRAL, DEFAULT_THEME_RADIUS, DEFAULT_THEME_SPACE, RESOLVED_THEME_MODES, THEME_BRAND_STORAGE_KEY, THEME_COLORS, THEME_COLOR_STORAGE_KEY, THEME_MODES, THEME_MODE_STORAGE_KEY, THEME_NEUTRALS, THEME_NEUTRAL_STORAGE_KEY, THEME_OPTIONS, THEME_RADII, THEME_RADIUS_STORAGE_KEY, THEME_SPACES, THEME_SPACE_STORAGE_KEY, ThemeBrandService, ThemeColorService, ThemeModeService, ThemeRadiusService, ThemeSpaceService, htmlAttributeEffect, htmlStylePropertyEffect, isResolvedThemeMode, isThemeColor, isThemeMode, isThemeNeutral, isThemeRadius, isThemeSpace, normalizeThemeColor, normalizeThemeMode, normalizeThemeNeutral, normalizeThemeRadius, normalizeThemeSpace, persistedHtmlAttributeSignal, persistedSignal, prefersDarkSignal, provideUiTheme };
|
|
319
|
-
export type { PersistedHtmlAttribute, PersistedHtmlAttributeOptions, ResolvedThemeMode, ThemeBrand, ThemeBrandOptions, ThemeColor, ThemeIconOptions, ThemeMode, ThemeNeutral, ThemeOptions, ThemeRadius, ThemeSpace };
|
|
306
|
+
export declare const THEME_OPTIONS: InjectionToken<Readonly<ThemeOptions>>;
|
|
307
|
+
export declare function provideUiTheme(options?: ThemeOptions): EnvironmentProviders;
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export { };
|
|
1
|
+
export {}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export * from
|
|
2
|
-
export * from
|
|
3
|
-
export * from
|
|
4
|
-
export * from
|
|
5
|
-
export * from
|
|
1
|
+
export * from "@ojiepermana/angular/chart";
|
|
2
|
+
export * from "@ojiepermana/angular/component";
|
|
3
|
+
export * from "@ojiepermana/angular/navigation";
|
|
4
|
+
export * from "@ojiepermana/angular/sdk";
|
|
5
|
+
export * from "@ojiepermana/angular/theme";
|
package/fesm2022/ojiepermana-angular-navigation-navigation-badge-count.component-Be3IqzG4.mjs
DELETED
|
@@ -1,91 +0,0 @@
|
|
|
1
|
-
import * as i0 from '@angular/core';
|
|
2
|
-
import { input, computed, isSignal, Component } from '@angular/core';
|
|
3
|
-
import { toSignal, toObservable } from '@angular/core/rxjs-interop';
|
|
4
|
-
import { cn } from '@ojiepermana/angular/component/utils/core';
|
|
5
|
-
import { formatNavigationBadgeCount } from '@ojiepermana/angular/navigation/types';
|
|
6
|
-
import { isObservable, of, switchMap, catchError } from 'rxjs';
|
|
7
|
-
|
|
8
|
-
class NavigationBadgeCountComponent {
|
|
9
|
-
badge = input(null, /* @ts-ignore */
|
|
10
|
-
...(ngDevMode ? [{ debugName: "badge" }] : /* istanbul ignore next */ []));
|
|
11
|
-
class = input('', /* @ts-ignore */
|
|
12
|
-
...(ngDevMode ? [{ debugName: "class" }] : /* istanbul ignore next */ []));
|
|
13
|
-
observableSource = computed(() => {
|
|
14
|
-
const value = this.badge()?.value;
|
|
15
|
-
return isObservable(value) ? value : of(null);
|
|
16
|
-
}, /* @ts-ignore */
|
|
17
|
-
...(ngDevMode ? [{ debugName: "observableSource" }] : /* istanbul ignore next */ []));
|
|
18
|
-
observableValue = toSignal(toObservable(this.observableSource).pipe(switchMap((source) => source.pipe(catchError(() => of(null))))), { initialValue: null });
|
|
19
|
-
rawValue() {
|
|
20
|
-
const value = this.badge()?.value;
|
|
21
|
-
if (isObservable(value)) {
|
|
22
|
-
return this.observableValue();
|
|
23
|
-
}
|
|
24
|
-
if (isSignal(value)) {
|
|
25
|
-
return value();
|
|
26
|
-
}
|
|
27
|
-
if (typeof value === 'function') {
|
|
28
|
-
return value();
|
|
29
|
-
}
|
|
30
|
-
return value;
|
|
31
|
-
}
|
|
32
|
-
resolvedBadge() {
|
|
33
|
-
const value = this.rawValue();
|
|
34
|
-
const count = value === null || value === undefined || !Number.isFinite(value)
|
|
35
|
-
? 0
|
|
36
|
-
: Math.max(Math.trunc(value), 0);
|
|
37
|
-
const display = formatNavigationBadgeCount(count);
|
|
38
|
-
if (display === null) {
|
|
39
|
-
return null;
|
|
40
|
-
}
|
|
41
|
-
const label = this.badge()?.ariaLabel;
|
|
42
|
-
const accessibleLabel = typeof label === 'function' ? label(count) : label;
|
|
43
|
-
return {
|
|
44
|
-
count,
|
|
45
|
-
display,
|
|
46
|
-
accessibleLabel: accessibleLabel?.trim() || `${count} items`,
|
|
47
|
-
};
|
|
48
|
-
}
|
|
49
|
-
badgeClasses = computed(() => cn('nav-badge inline-flex h-5 min-w-5 items-center justify-center rounded-full bg-destructive px-1 text-xs font-semibold text-destructive-foreground', this.badge()?.classes, this.class()), /* @ts-ignore */
|
|
50
|
-
...(ngDevMode ? [{ debugName: "badgeClasses" }] : /* istanbul ignore next */ []));
|
|
51
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: NavigationBadgeCountComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
52
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.6", type: NavigationBadgeCountComponent, isStandalone: true, selector: "NavigationBadgeCount", inputs: { badge: { classPropertyName: "badge", publicName: "badge", isSignal: true, isRequired: false, transformFunction: null }, class: { classPropertyName: "class", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, host: { classAttribute: "contents" }, ngImport: i0, template: `
|
|
53
|
-
@if (resolvedBadge(); as resolved) {
|
|
54
|
-
<span
|
|
55
|
-
role="status"
|
|
56
|
-
aria-atomic="true"
|
|
57
|
-
data-navigation-badge="true"
|
|
58
|
-
[attr.data-navigation-badge-count]="resolved.count"
|
|
59
|
-
[attr.aria-label]="resolved.accessibleLabel"
|
|
60
|
-
[class]="badgeClasses()"
|
|
61
|
-
>
|
|
62
|
-
{{ resolved.display }}
|
|
63
|
-
</span>
|
|
64
|
-
}
|
|
65
|
-
`, isInline: true });
|
|
66
|
-
}
|
|
67
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.6", ngImport: i0, type: NavigationBadgeCountComponent, decorators: [{
|
|
68
|
-
type: Component,
|
|
69
|
-
args: [{
|
|
70
|
-
selector: 'NavigationBadgeCount',
|
|
71
|
-
host: {
|
|
72
|
-
class: 'contents',
|
|
73
|
-
},
|
|
74
|
-
template: `
|
|
75
|
-
@if (resolvedBadge(); as resolved) {
|
|
76
|
-
<span
|
|
77
|
-
role="status"
|
|
78
|
-
aria-atomic="true"
|
|
79
|
-
data-navigation-badge="true"
|
|
80
|
-
[attr.data-navigation-badge-count]="resolved.count"
|
|
81
|
-
[attr.aria-label]="resolved.accessibleLabel"
|
|
82
|
-
[class]="badgeClasses()"
|
|
83
|
-
>
|
|
84
|
-
{{ resolved.display }}
|
|
85
|
-
</span>
|
|
86
|
-
}
|
|
87
|
-
`,
|
|
88
|
-
}]
|
|
89
|
-
}], propDecorators: { badge: [{ type: i0.Input, args: [{ isSignal: true, alias: "badge", required: false }] }], class: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }] } });
|
|
90
|
-
|
|
91
|
-
export { NavigationBadgeCountComponent };
|