@filip.mazev/blocks 1.4.3 → 1.4.5
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 +1 -1
- package/_index.scss +1 -1
- package/core/styles/_field-state.scss +16 -4
- package/core/styles/_index.scss +0 -1
- package/core/styles/_mixins.scss +2 -2
- package/core/styles/_motion.scss +1 -1
- package/core/styles/_palettes.scss +127 -132
- package/core/styles/_slider.scss +158 -40
- package/core/styles/_theme-engine.scss +43 -63
- package/core/styles/_utilities.scss +3 -4
- package/core/styles/_validation.scss +6 -1
- package/core/styles/_variables.scss +24 -14
- package/core/styles/themes/_cyberpunk-theme.scss +1 -1
- package/core/styles/themes/_green-theme.scss +1 -1
- package/core/styles/themes/_high-contrast-theme.scss +152 -133
- package/core/styles/themes/_orange-theme.scss +1 -1
- package/core/styles/themes/_purple-theme.scss +1 -1
- package/core/styles/themes/_red-theme.scss +1 -1
- package/core/styles/themes/_white-theme.scss +26 -20
- package/effects/README.md +5 -9
- package/effects/effects.css +200 -121
- package/effects/runtime/README.md +19 -11
- package/fesm2022/filip.mazev-blocks-core.mjs +27 -22
- package/fesm2022/filip.mazev-blocks-core.mjs.map +1 -1
- package/fesm2022/filip.mazev-blocks-effects-runtime.mjs +887 -67
- package/fesm2022/filip.mazev-blocks-effects-runtime.mjs.map +1 -1
- package/fesm2022/filip.mazev-blocks-effects.mjs +8 -48
- package/fesm2022/filip.mazev-blocks-effects.mjs.map +1 -1
- package/fesm2022/filip.mazev-blocks-forms.mjs +65 -61
- package/fesm2022/filip.mazev-blocks-forms.mjs.map +1 -1
- package/fesm2022/filip.mazev-blocks-modal.mjs +29 -32
- package/fesm2022/filip.mazev-blocks-modal.mjs.map +1 -1
- package/fesm2022/filip.mazev-blocks-navigation.mjs +35 -1
- package/fesm2022/filip.mazev-blocks-navigation.mjs.map +1 -1
- package/fesm2022/filip.mazev-blocks-primitives.mjs +106 -32
- package/fesm2022/filip.mazev-blocks-primitives.mjs.map +1 -1
- package/fesm2022/filip.mazev-blocks-toastr.mjs +5 -7
- package/fesm2022/filip.mazev-blocks-toastr.mjs.map +1 -1
- package/fesm2022/filip.mazev-blocks.mjs +1 -1
- package/fesm2022/filip.mazev-blocks.mjs.map +1 -1
- package/navigation/README.md +44 -0
- package/package.json +1 -1
- package/schematics/ng-add/index.js +4 -1
- package/types/filip.mazev-blocks-core.d.ts +3 -4
- package/types/filip.mazev-blocks-effects-runtime.d.ts +10 -8
- package/types/filip.mazev-blocks-effects.d.ts +5 -17
- package/types/filip.mazev-blocks-forms.d.ts +13 -11
- package/types/filip.mazev-blocks-modal.d.ts +1 -0
- package/types/filip.mazev-blocks-navigation.d.ts +20 -4
- package/types/filip.mazev-blocks-primitives.d.ts +12 -2
- package/types/filip.mazev-blocks-toastr.d.ts +4 -4
- package/types/filip.mazev-blocks.d.ts +1 -1
|
@@ -50,7 +50,10 @@ function injectStyles(tree, context, options) {
|
|
|
50
50
|
context.logger.warn('Could not locate a global .scss or .sass file. Please configure the Blocks theme manually.');
|
|
51
51
|
return;
|
|
52
52
|
}
|
|
53
|
-
const
|
|
53
|
+
const targetStyle = tree.read(targetStylePath);
|
|
54
|
+
if (!targetStyle)
|
|
55
|
+
return;
|
|
56
|
+
const content = targetStyle.toString('utf-8');
|
|
54
57
|
// Existing themes still receive the effects stylesheet above.
|
|
55
58
|
if (content.includes('@filip.mazev/blocks')) {
|
|
56
59
|
context.logger.info('Blocks SCSS configuration already exists. Skipping style injection.');
|
|
@@ -39,6 +39,7 @@ export declare class DeviceTypeService {
|
|
|
39
39
|
isPortraitOrientation(): boolean;
|
|
40
40
|
getDeviceState(): IDeviceState;
|
|
41
41
|
private get userAgent();
|
|
42
|
+
private toDeviceOrientation;
|
|
42
43
|
private get isDesktopDevice();
|
|
43
44
|
private isMobileDevice;
|
|
44
45
|
private isTabletDevice;
|
|
@@ -129,9 +130,8 @@ export type DefaultValidatorKey = 'required' | 'minlength' | 'maxlength' | 'emai
|
|
|
129
130
|
export type ValidatorKey = DefaultValidatorKey | keyof BxCustomValidators;
|
|
130
131
|
/** Application-wide material preferences, inherited by components and overlays. */
|
|
131
132
|
export interface BxAppearanceConfig {
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
tint: number;
|
|
133
|
+
/** 0 is lightly blurred and nearly clear; 1 is richly tinted, retaining translucency. */
|
|
134
|
+
glassiness: number;
|
|
135
135
|
quality: 'auto' | 'baseline' | 'enhanced';
|
|
136
136
|
reducedTransparency: boolean;
|
|
137
137
|
}
|
|
@@ -146,7 +146,6 @@ export declare class ThemingService implements OnDestroy {
|
|
|
146
146
|
private readonly document;
|
|
147
147
|
private readonly a11y;
|
|
148
148
|
private readonly _appearance;
|
|
149
|
-
/** Application-wide material settings, including overlays. */
|
|
150
149
|
readonly appearance: import("@angular/core").Signal<BxAppearanceConfig>;
|
|
151
150
|
readonly palettes: readonly {
|
|
152
151
|
id: BxThemeId;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
type GlassMaterial = 'glass' | 'frosted' | 'solid';
|
|
2
1
|
type GlassQuality = 'auto' | 'baseline' | 'enhanced';
|
|
3
2
|
interface SurfaceOptions {
|
|
4
|
-
|
|
3
|
+
/** 0–1 glassiness; omitted values inherit the application's balanced default. */
|
|
4
|
+
glassiness?: number;
|
|
5
5
|
/** Override automatic action/control detection for interaction lighting and press deformation. */
|
|
6
6
|
interactive?: boolean;
|
|
7
7
|
/** Override the default theme accent/error color emitted on interaction or an active ARIA state. */
|
|
@@ -10,10 +10,6 @@ interface SurfaceOptions {
|
|
|
10
10
|
focusEmission?: string;
|
|
11
11
|
reducedMotion?: boolean;
|
|
12
12
|
reducedTransparency?: boolean;
|
|
13
|
-
/** Backdrop blur in CSS pixels, clamped to 0–40. */
|
|
14
|
-
blur?: number;
|
|
15
|
-
/** Tint opacity, clamped to 0–1. */
|
|
16
|
-
tint?: number;
|
|
17
13
|
}
|
|
18
14
|
interface AppearanceConfiguration extends Omit<SurfaceOptions, 'interactive' | 'emission' | 'focusEmission'> {
|
|
19
15
|
quality?: GlassQuality;
|
|
@@ -74,6 +70,8 @@ interface GlassReflector {
|
|
|
74
70
|
depth?: number;
|
|
75
71
|
}
|
|
76
72
|
interface GlassSceneOptions {
|
|
73
|
+
/** Reuse receiver measurements for frequent light-only updates. refresh() still invalidates them. */
|
|
74
|
+
reuseGeometry?: boolean;
|
|
77
75
|
/** At most four lights and four reflectors are evaluated per scene. */
|
|
78
76
|
lights?: readonly GlassLight[];
|
|
79
77
|
reflectors?: readonly GlassReflector[];
|
|
@@ -95,6 +93,8 @@ interface LightContribution {
|
|
|
95
93
|
color: string;
|
|
96
94
|
strength: number;
|
|
97
95
|
edgeStrength: number;
|
|
96
|
+
ambient?: boolean;
|
|
97
|
+
spread?: number;
|
|
98
98
|
}
|
|
99
99
|
interface Lighting {
|
|
100
100
|
x: number;
|
|
@@ -112,8 +112,10 @@ interface Lighting {
|
|
|
112
112
|
export declare function observeGlassLighting(element: HTMLElement, light: (value: Lighting) => void, hitTarget?: HTMLElement): () => void;
|
|
113
113
|
/** Invalidate a receiver after an application changes its geometry. */
|
|
114
114
|
export declare function refreshGlassLighting(element: HTMLElement): void;
|
|
115
|
-
/**
|
|
115
|
+
/** Light fields are explicit; surfaces also sample nearby visual sources for ambient edge color. */
|
|
116
116
|
export declare function mountGlassScene(root: HTMLElement, options?: GlassSceneOptions): GlassScene;
|
|
117
|
+
/** Let a passive overlay receive light from its trigger's context. Register before mounting its surfaces. */
|
|
118
|
+
export declare function inheritGlassLighting(overlay: HTMLElement, origin: HTMLElement): () => void;
|
|
117
119
|
/** Fade a positioned overlay without changing the geometry of its content. */
|
|
118
120
|
export declare function createGlassTransition(origin: HTMLElement, target: HTMLElement, options?: GlassTransitionOptions): GlassTransition;
|
|
119
121
|
/** @deprecated Use createGlassTransition. */
|
|
@@ -136,4 +138,4 @@ export declare class Spring {
|
|
|
136
138
|
step(deltaSeconds: number): boolean;
|
|
137
139
|
snap(value: number): void;
|
|
138
140
|
}
|
|
139
|
-
export type { AppearanceConfiguration, AppearanceConfigurationController, GlassLight, Lighting as GlassLighting,
|
|
141
|
+
export type { AppearanceConfiguration, AppearanceConfigurationController, GlassLight, Lighting as GlassLighting, GlassQuality, GlassReflector, GlassScene, GlassSceneOptions, GlassSurface, GlassTransition, GlassTransitionOptions, LiquidTransition, LiquidTransitionOptions, MotionResult, SpringOptions, SurfaceOptions };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as i0 from "@angular/core";
|
|
2
2
|
import { AfterViewInit } from "@angular/core";
|
|
3
|
-
import { GlassLight,
|
|
3
|
+
import { GlassLight, SurfaceOptions, SurfaceOptions as SurfaceOptions$1 } from "@filip.mazev/blocks/effects/runtime";
|
|
4
4
|
/** Adds a decorative material without replacing native controls or their content. */
|
|
5
5
|
export declare class BxSurfaceDirective implements AfterViewInit {
|
|
6
6
|
private readonly element;
|
|
@@ -8,10 +8,8 @@ export declare class BxSurfaceDirective implements AfterViewInit {
|
|
|
8
8
|
private readonly a11y;
|
|
9
9
|
private readonly zone;
|
|
10
10
|
private readonly isBrowser;
|
|
11
|
-
readonly bxSurface: import("@angular/core").InputSignalWithTransform<GlassMaterial$1 | undefined, "" | GlassMaterial$1 | undefined>;
|
|
12
11
|
readonly bxSurfaceInteractive: import("@angular/core").InputSignalWithTransform<boolean | undefined, unknown>;
|
|
13
|
-
readonly
|
|
14
|
-
readonly bxSurfaceTint: import("@angular/core").InputSignalWithTransform<number | undefined, unknown>;
|
|
12
|
+
readonly bxSurfaceGlassiness: import("@angular/core").InputSignalWithTransform<number | undefined, unknown>;
|
|
15
13
|
readonly bxSurfaceEmission: import("@angular/core").InputSignal<string | undefined>;
|
|
16
14
|
readonly bxSurfaceFocusEmission: import("@angular/core").InputSignal<string | undefined>;
|
|
17
15
|
readonly bxReducedTransparency: import("@angular/core").InputSignalWithTransform<boolean | undefined, unknown>;
|
|
@@ -21,23 +19,13 @@ export declare class BxSurfaceDirective implements AfterViewInit {
|
|
|
21
19
|
private options;
|
|
22
20
|
static ɵfac: i0.ɵɵFactoryDeclaration<BxSurfaceDirective, never>;
|
|
23
21
|
static ɵdir: i0.ɵɵDirectiveDeclaration<BxSurfaceDirective, "[bxSurface]", ["bxSurface"], {
|
|
24
|
-
"bxSurface": {
|
|
25
|
-
"alias": "bxSurface";
|
|
26
|
-
"required": false;
|
|
27
|
-
"isSignal": true;
|
|
28
|
-
};
|
|
29
22
|
"bxSurfaceInteractive": {
|
|
30
23
|
"alias": "bxSurfaceInteractive";
|
|
31
24
|
"required": false;
|
|
32
25
|
"isSignal": true;
|
|
33
26
|
};
|
|
34
|
-
"
|
|
35
|
-
"alias": "
|
|
36
|
-
"required": false;
|
|
37
|
-
"isSignal": true;
|
|
38
|
-
};
|
|
39
|
-
"bxSurfaceTint": {
|
|
40
|
-
"alias": "bxSurfaceTint";
|
|
27
|
+
"bxSurfaceGlassiness": {
|
|
28
|
+
"alias": "bxSurfaceGlassiness";
|
|
41
29
|
"required": false;
|
|
42
30
|
"isSignal": true;
|
|
43
31
|
};
|
|
@@ -72,4 +60,4 @@ export declare class BxGlassLightingService {
|
|
|
72
60
|
static ɵfac: i0.ɵɵFactoryDeclaration<BxGlassLightingService, never>;
|
|
73
61
|
static ɵprov: i0.ɵɵInjectableDeclaration<any>;
|
|
74
62
|
}
|
|
75
|
-
export type {
|
|
63
|
+
export type { SurfaceOptions };
|
|
@@ -119,10 +119,12 @@ export declare class FormField {
|
|
|
119
119
|
};
|
|
120
120
|
}, {}, ["projectedError"], ["*", "bx-error"], true, never>;
|
|
121
121
|
}
|
|
122
|
-
export declare class InputField extends BxBaseControl<
|
|
122
|
+
export declare class InputField extends BxBaseControl<string | number | null> {
|
|
123
123
|
private readonly i18n;
|
|
124
124
|
protected readonly inputId: import("@angular/core").Signal<string>;
|
|
125
125
|
protected readonly isFocused: import("@angular/core").WritableSignal<boolean>;
|
|
126
|
+
protected readonly isSpinDownDisabled: import("@angular/core").Signal<boolean>;
|
|
127
|
+
protected readonly isSpinUpDisabled: import("@angular/core").Signal<boolean>;
|
|
126
128
|
protected readonly isFloating: import("@angular/core").Signal<boolean>;
|
|
127
129
|
protected readonly resolvedPlaceholder: import("@angular/core").Signal<string>;
|
|
128
130
|
protected readonly resolvedLabel: import("@angular/core").Signal<string>;
|
|
@@ -130,9 +132,9 @@ export declare class InputField extends BxBaseControl<any> {
|
|
|
130
132
|
readonly min: import("@angular/core").InputSignal<number | undefined>;
|
|
131
133
|
readonly max: import("@angular/core").InputSignal<number | undefined>;
|
|
132
134
|
readonly step: import("@angular/core").InputSignal<number>;
|
|
133
|
-
constructor();
|
|
134
135
|
private spinTimeout?;
|
|
135
136
|
private spinInterval?;
|
|
137
|
+
constructor();
|
|
136
138
|
startSpin(direction: number, event: MouseEvent | TouchEvent): void;
|
|
137
139
|
stopSpin(): void;
|
|
138
140
|
protected onInput(event: Event): void;
|
|
@@ -163,13 +165,13 @@ export declare class InputField extends BxBaseControl<any> {
|
|
|
163
165
|
};
|
|
164
166
|
}, {}, never, never, true, never>;
|
|
165
167
|
}
|
|
166
|
-
export declare class Radio extends BxBaseControl<
|
|
168
|
+
export declare class Radio extends BxBaseControl<unknown> {
|
|
167
169
|
private readonly registry;
|
|
168
170
|
private readonly element;
|
|
169
171
|
private readonly i18n;
|
|
170
172
|
protected readonly inputId: import("@angular/core").Signal<string>;
|
|
171
173
|
protected readonly resolvedLabel: import("@angular/core").Signal<string | undefined>;
|
|
172
|
-
readonly value: import("@angular/core").InputSignal<
|
|
174
|
+
readonly value: import("@angular/core").InputSignal<unknown>;
|
|
173
175
|
readonly name: import("@angular/core").InputSignal<string>;
|
|
174
176
|
protected showTooltip: boolean;
|
|
175
177
|
constructor();
|
|
@@ -238,20 +240,20 @@ export declare class Select<T> extends BxBaseControl<T> implements OnInit, OnDes
|
|
|
238
240
|
icon?: import("@filip.mazev/blocks/icons").IconName;
|
|
239
241
|
}[]>;
|
|
240
242
|
protected readonly selectedOptionLabel: import("@angular/core").Signal<string>;
|
|
243
|
+
protected readonly resolvedSearchPlaceholder: import("@angular/core").Signal<string>;
|
|
244
|
+
protected readonly resolvedEmptyMessage: import("@angular/core").Signal<string>;
|
|
241
245
|
readonly options: import("@angular/core").InputSignal<BxSelectOption<T>[]>;
|
|
242
246
|
readonly isSearchable: import("@angular/core").InputSignal<boolean>;
|
|
243
247
|
readonly externalFiltering: import("@angular/core").InputSignal<boolean>;
|
|
248
|
+
readonly searchPlaceholder: import("@angular/core").InputSignal<ResolvableText>;
|
|
249
|
+
readonly emptyMessage: import("@angular/core").InputSignal<ResolvableText>;
|
|
250
|
+
readonly search: import("@angular/core").OutputEmitterRef<string>;
|
|
251
|
+
readonly isOpen: import("@angular/core").WritableSignal<boolean>;
|
|
244
252
|
private transition?;
|
|
245
253
|
private disconnectTheme?;
|
|
246
254
|
private transitionRevision;
|
|
247
|
-
protected readonly resolvedSearchPlaceholder: import("@angular/core").Signal<string>;
|
|
248
255
|
private focusOnOpen;
|
|
249
|
-
protected readonly resolvedEmptyMessage: import("@angular/core").Signal<string>;
|
|
250
256
|
private connectedOverlay?;
|
|
251
|
-
readonly searchPlaceholder: import("@angular/core").InputSignal<ResolvableText>;
|
|
252
|
-
readonly emptyMessage: import("@angular/core").InputSignal<ResolvableText>;
|
|
253
|
-
readonly search: import("@angular/core").OutputEmitterRef<string>;
|
|
254
|
-
readonly isOpen: import("@angular/core").WritableSignal<boolean>;
|
|
255
257
|
private searchInputRef?;
|
|
256
258
|
private originRef?;
|
|
257
259
|
private searchSubject;
|
|
@@ -313,7 +315,7 @@ export declare class SlideToggle extends BxBaseControl<boolean> {
|
|
|
313
315
|
}
|
|
314
316
|
export declare class BxError {
|
|
315
317
|
static ɵfac: i0.ɵɵFactoryDeclaration<BxError, never>;
|
|
316
|
-
static
|
|
318
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<BxError, "bx-error", never, {}, {}, never, ["*"], true, never>;
|
|
317
319
|
}
|
|
318
320
|
/** Glass styling for a native range, including reactive forms and programmatic values. */
|
|
319
321
|
export declare class SliderDirective {
|
|
@@ -386,6 +386,7 @@ export declare class ModalBottomSheet<D = unknown, R = unknown> implements OnIni
|
|
|
386
386
|
private globalResizeCleanup;
|
|
387
387
|
ngOnInit(): void;
|
|
388
388
|
ngOnDestroy(): void;
|
|
389
|
+
protected onDismissClick(event: MouseEvent): void;
|
|
389
390
|
private startVerticalSwipeDetection;
|
|
390
391
|
private stopVerticalSwipeDetection;
|
|
391
392
|
private initBottomSheetModalParams;
|
|
@@ -34,11 +34,11 @@ export interface INavContext {
|
|
|
34
34
|
snapshot?: ActivatedRouteSnapshot;
|
|
35
35
|
}
|
|
36
36
|
export type NavText = ResolvableText | ((ctx: INavContext) => ResolvableText);
|
|
37
|
-
export interface INavMeta {
|
|
37
|
+
export interface INavMeta<TSection extends string = string> {
|
|
38
38
|
label?: NavText;
|
|
39
39
|
breadcrumb?: NavText;
|
|
40
40
|
icon?: IconData;
|
|
41
|
-
section?:
|
|
41
|
+
section?: TSection;
|
|
42
42
|
menu?: boolean;
|
|
43
43
|
hidden?: boolean;
|
|
44
44
|
order?: number;
|
|
@@ -68,14 +68,29 @@ export interface INavigationSectionConfig {
|
|
|
68
68
|
order?: number;
|
|
69
69
|
}
|
|
70
70
|
export interface INavigationConfig {
|
|
71
|
-
sections?: INavigationSectionConfig[];
|
|
71
|
+
sections?: readonly INavigationSectionConfig[];
|
|
72
72
|
includeHiddenInBreadcrumbs?: boolean;
|
|
73
73
|
sortItems?: (a: INavigationItem, b: INavigationItem) => number;
|
|
74
74
|
}
|
|
75
|
+
/** A UI section containing flat, visible menu entries. */
|
|
76
|
+
export interface INavigationGroup {
|
|
77
|
+
id: string;
|
|
78
|
+
title: string;
|
|
79
|
+
items: INavigationItem[];
|
|
80
|
+
}
|
|
75
81
|
export interface IResolvedNavigation {
|
|
76
82
|
current?: INavigationItem;
|
|
77
83
|
breadcrumbs: IBreadcrumbItem[];
|
|
78
84
|
}
|
|
85
|
+
/** Declares UI sections and binds route metadata to their literal IDs. */
|
|
86
|
+
export declare function defineNavigation<const TSections extends readonly INavigationSectionConfig[]>(config: Omit<INavigationConfig, 'sections'> & {
|
|
87
|
+
sections: TSections;
|
|
88
|
+
}): {
|
|
89
|
+
config: Omit<INavigationConfig, "sections"> & {
|
|
90
|
+
sections: TSections;
|
|
91
|
+
};
|
|
92
|
+
withNav<T extends INavMeta<TSections[number]["id"]>>(route: Route, nav: Strict<T, INavMeta<TSections[number]["id"]>>): Route;
|
|
93
|
+
};
|
|
79
94
|
/**
|
|
80
95
|
*
|
|
81
96
|
* @param config
|
|
@@ -96,7 +111,7 @@ export declare function provideNavigation(config: INavigationConfig): {
|
|
|
96
111
|
* The function returns a new `Route` object with the provided navigation metadata merged into the existing route data under the 'nav' property.
|
|
97
112
|
* This allows you to easily associate navigation information with your routes, which can then be used by navigation components to generate menus, breadcrumbs, etc.
|
|
98
113
|
*/
|
|
99
|
-
export declare function withNav<T>(route: Route, nav: Strict<T, INavMeta>): Route;
|
|
114
|
+
export declare function withNav<T extends INavMeta>(route: Route, nav: Strict<T, INavMeta>): Route;
|
|
100
115
|
export declare class NavigationService {
|
|
101
116
|
private readonly router;
|
|
102
117
|
private readonly config;
|
|
@@ -108,6 +123,7 @@ export declare class NavigationService {
|
|
|
108
123
|
readonly routes: Signal<INavigationItem[]>;
|
|
109
124
|
readonly baseRoute: Signal<string | undefined>;
|
|
110
125
|
readonly menu: Signal<INavigationItem[]>;
|
|
126
|
+
readonly menuGroups: Signal<INavigationGroup[]>;
|
|
111
127
|
navigateBack(): void;
|
|
112
128
|
private extractRoutes;
|
|
113
129
|
private resolveCurrent;
|