@filip.mazev/blocks 1.4.14 → 1.4.16
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 +5 -5
- package/core/styles/_a11y.scss +5 -0
- package/core/styles/_field-state.scss +12 -3
- package/core/styles/_helpers.scss +1 -0
- package/core/styles/_index.scss +4 -9
- package/core/styles/_palettes.scss +54 -10
- package/core/styles/_slider.scss +116 -6
- package/core/styles/_text-overflow.scss +7 -0
- package/core/styles/_text.scss +5 -0
- package/core/styles/_validation.scss +48 -0
- package/core/styles/themes/_azure-ember-theme.scss +4 -0
- package/core/styles/themes/_brick-rose-cyan-theme.scss +4 -0
- package/core/styles/themes/_carbon-cobalt-theme.scss +4 -0
- package/fesm2022/filip.mazev-blocks-core.mjs +102 -48
- package/fesm2022/filip.mazev-blocks-core.mjs.map +1 -1
- package/fesm2022/filip.mazev-blocks-effects-runtime.mjs +14 -3
- package/fesm2022/filip.mazev-blocks-effects-runtime.mjs.map +1 -1
- package/fesm2022/filip.mazev-blocks-effects.mjs +16 -8
- package/fesm2022/filip.mazev-blocks-effects.mjs.map +1 -1
- package/fesm2022/filip.mazev-blocks-forms.mjs +5004 -1078
- package/fesm2022/filip.mazev-blocks-forms.mjs.map +1 -1
- package/fesm2022/filip.mazev-blocks-primitives.mjs +2373 -1294
- package/fesm2022/filip.mazev-blocks-primitives.mjs.map +1 -1
- package/fesm2022/filip.mazev-blocks.mjs +1 -1
- package/fesm2022/filip.mazev-blocks.mjs.map +1 -1
- package/forms/README.md +80 -0
- package/package.json +1 -1
- package/schematics/ng-add/index.d.ts +1 -10
- package/schematics/ng-add/index.js +4 -13
- package/schematics/ng-add/schema.json +11 -17
- package/types/filip.mazev-blocks-core.d.ts +26 -15
- package/types/filip.mazev-blocks-effects.d.ts +1 -1
- package/types/filip.mazev-blocks-forms.d.ts +1216 -76
- package/types/filip.mazev-blocks-primitives.d.ts +304 -6
- package/types/filip.mazev-blocks.d.ts +1 -1
- package/core/styles/themes/_azure-coral-theme.scss +0 -4
- package/core/styles/themes/_blue-theme.scss +0 -5
- package/core/styles/themes/_graphite-sky-blue-theme.scss +0 -19
- package/core/styles/themes/_green-theme.scss +0 -5
- package/core/styles/themes/_orange-theme.scss +0 -5
- package/core/styles/themes/_purple-theme.scss +0 -5
- package/core/styles/themes/_red-theme.scss +0 -5
- package/core/styles/themes/_scarlet-cyan-theme.scss +0 -4
- package/core/styles/themes/_white-theme.scss +0 -5
package/forms/README.md
ADDED
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
# Forms
|
|
2
|
+
|
|
3
|
+
Blocks fields use Angular 22 native signal control contracts and support Signal Forms, Reactive Forms, Template-driven Forms and standalone models. The library supplies presentation, interaction and accessible feedback; Angular owns validation and submission.
|
|
4
|
+
|
|
5
|
+
## Import and basic usage
|
|
6
|
+
|
|
7
|
+
```ts
|
|
8
|
+
import { signal } from '@angular/core';
|
|
9
|
+
import { form, FormField as SignalFormField, FormRoot, required, email } from '@angular/forms/signals';
|
|
10
|
+
import { Button, InputField } from '@filip.mazev/blocks/forms';
|
|
11
|
+
|
|
12
|
+
readonly accountModel = signal({ email: '' });
|
|
13
|
+
readonly account = form(this.accountModel, (p) => {
|
|
14
|
+
required(p.email, { message: 'Email is required.' });
|
|
15
|
+
email(p.email, { message: 'Enter a valid email address.' });
|
|
16
|
+
}, {
|
|
17
|
+
submission: {
|
|
18
|
+
ignoreValidators: 'none',
|
|
19
|
+
action: async (field) => { await this.api.save(field().value()); }
|
|
20
|
+
}
|
|
21
|
+
});
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
Import `SignalFormField`, `FormRoot`, and the used Blocks controls into the standalone component. Alias Angular's directive because Blocks also exports its frame component as `FormField`.
|
|
25
|
+
|
|
26
|
+
```html
|
|
27
|
+
<form [formRoot]="account">
|
|
28
|
+
<bx-input-field label="Email" type="email" [formField]="account.email" />
|
|
29
|
+
<button bx-button type="submit" [disabled]="!account().valid()" [loading]="account().submitting()">Save</button>
|
|
30
|
+
</form>
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
## Validation and state
|
|
34
|
+
|
|
35
|
+
Schema validation supplies `required`, numeric and length limits, pattern metadata, errors, pending, disabled and readonly state to compatible controls. `valid()` is false while asynchronous validation is pending; `!invalid()` alone does not guarantee readiness.
|
|
36
|
+
|
|
37
|
+
Use `ignoreValidators: 'none'` to gate the submission handler as well as the visible button while async validation is pending. Submission marks interactive fields touched, prevents duplicate submissions, and applies returned server errors to their target fields.
|
|
38
|
+
|
|
39
|
+
Read field state through the Angular field tree. Derive UI with `computed()` and use `effect()` for side effects when validity or pending state changes. Cross-field validators belong in the schema and can read related values. Blocks does not implement a second validation engine.
|
|
40
|
+
|
|
41
|
+
## Custom messages and visibility
|
|
42
|
+
|
|
43
|
+
Shared inputs include `errorMessages`, `errorPriority`, `errorMode` (`first` or `all`), and `errorPolicy` (`touched`, `dirty`, `submitted`, `always`, or a function receiving `IErrorState`). The default reveals invalid fields after touch or submission. A function can include custom group or application state. The submitted policy tracks native form submission; when invoking submission programmatically outside the form element, pass the shared `submitted` input from application state.
|
|
44
|
+
|
|
45
|
+
Message resolution prefers projected `bx-error` content, then field message overrides, schema messages, and configured defaults. `minlength`/`maxlength` Reactive Forms keys and `minLength`/`maxLength` Signal Forms kinds are recognized. Resolvers receive the original error plus its parameter payload.
|
|
46
|
+
|
|
47
|
+
```ts
|
|
48
|
+
readonly messages: ValidationMessages = {
|
|
49
|
+
minLength: ({ params }) => `Use at least ${params['minLength'] ?? params['requiredLength']} characters.`,
|
|
50
|
+
required: { key: 'validation.required' }
|
|
51
|
+
};
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
Put this declaration in the appropriate constants or types-supporting module according to the house rules. Translation-key overrides receive error parameters through the existing adapter. Default messages can be replaced application-wide using `FormSettingsService.update()`; instance inputs take precedence. No error-message map is mandatory when the schema supplies messages.
|
|
55
|
+
|
|
56
|
+
Projected `bx-error` supports rich content. `bx-hint`, `hint`, `hintEnd`, `bxPrefix`, and `bxSuffix` provide composable support and adornments. Supporting text and errors are associated automatically through `aria-describedby`. Custom error regions announce changes politely.
|
|
57
|
+
|
|
58
|
+
## Compatibility and migration
|
|
59
|
+
|
|
60
|
+
Existing `[formControl]`, `formControlName`, and `[(ngModel)]` component bindings remain supported. Text edits honor Reactive Forms blur and submit update strategies. `reset()` on the owning field/form clears component interaction and parse state. Standalone value controls expose `[(value)]`; checkbox-style controls expose `[(checked)]`.
|
|
61
|
+
|
|
62
|
+
`BxBaseControl` remains available for existing external CVA subclasses; repeated touch reporting and schema error-message handling are corrected. New Blocks controls use native signal contracts, without implementing CVA on the same component. The legacy individually bound radio remains available, while new forms should bind a `RadioGroup` once around its options.
|
|
63
|
+
|
|
64
|
+
Native `input`, `textarea` and `select` elements can use `bxInput` inside `bx-form-field`. Consumer components can provide `BX_FORM_FIELD_CONTROL` with `IFormFieldControl` to integrate their own state and focus behavior.
|
|
65
|
+
|
|
66
|
+
## Asynchronous options
|
|
67
|
+
|
|
68
|
+
Single select and multiselect support application-owned requests, comparison, templates, incremental loading and error/retry behavior. Their scroll wrappers use `LoadMoreDirective`, which can also be used by future paginated components. See the [load-more guide](directives/load-more/README.md) and [multiselect guide](components/multi-select/README.md).
|
|
69
|
+
|
|
70
|
+
## Appearance and accessibility
|
|
71
|
+
|
|
72
|
+
Controls follow Blocks semantic tokens, global theme/appearance configuration, reduced motion through `BxA11yService`, and reactive text resolution through `BX_I18N`. Configuration supports filled/outlined appearance, label placement, required markers, floating-label behavior and supporting-text sizing. Readonly and disabled states remain distinct in form state. All applicable controls accept `readOnly` as well as Angular Signal Forms' lowercase `readonly` contract. Either true value prevents edits while retaining focusability. Readonly controls use the default cursor and suppress pointer hover/click highlights and interactive glass lighting while preserving their static appearance and keyboard focus styling. Focus origin uses the shared Angular CDK focus monitor. Changes to readonly state update mounted surfaces, including projected native controls and grouped radios. Native select integration prevents interaction without binding a nonexistent native readOnly property.
|
|
73
|
+
|
|
74
|
+
All existing form ellipsis and full-selection fit measurement use the public `TruncateDirective` from `@filip.mazev/blocks/primitives`. Set `[tooltipOnTruncate]="false"` on an input, search, select, or multiselect to retain truncation while supplying your own tooltip. `FormSettingsService.update({ tooltipOnTruncate: false })` changes the application default; instance inputs take precedence. Tag and menu controls expose the same opt-out. The public `TruncatedTextPipe` (`bxTruncatedText`) and `truncatedText()` helper support custom feedback. See the [shared truncation guide](../primitives/directives/truncate/README.md).
|
|
75
|
+
|
|
76
|
+
## Playground
|
|
77
|
+
|
|
78
|
+
Open `/components/signal-forms` for multiple controls, sync/async/cross-field rules, pending state, custom messages, server errors, disabled submission, dynamic disabled/readonly, reset and reactive validation status. Use Fill valid data to exercise submission, or an email containing `server-error` to see a server rejection.
|
|
79
|
+
|
|
80
|
+
The load-more and selection pages include fake APIs, failed requests, retry and small pages without scrollbars.
|
package/package.json
CHANGED
|
@@ -1,14 +1,5 @@
|
|
|
1
1
|
import { Rule } from '@angular-devkit/schematics';
|
|
2
|
-
declare const LEGACY_PALETTES: {
|
|
3
|
-
readonly white: "graphite-sky-blue";
|
|
4
|
-
readonly blue: "azure-coral";
|
|
5
|
-
readonly purple: "violet-teal";
|
|
6
|
-
readonly orange: "tangerine-indigo";
|
|
7
|
-
readonly red: "scarlet-cyan";
|
|
8
|
-
readonly green: "lime-violet";
|
|
9
|
-
};
|
|
10
2
|
export interface NgAddOptions {
|
|
11
|
-
theme?: '
|
|
3
|
+
theme?: 'carbon-cobalt' | 'azure-ember' | 'violet-teal' | 'tangerine-indigo' | 'brick-rose-cyan' | 'lime-violet' | 'cyberpunk';
|
|
12
4
|
}
|
|
13
5
|
export declare function ngAdd(options: NgAddOptions): Rule;
|
|
14
|
-
export {};
|
|
@@ -1,19 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.ngAdd = ngAdd;
|
|
4
|
-
const LEGACY_PALETTES = {
|
|
5
|
-
white: 'graphite-sky-blue',
|
|
6
|
-
blue: 'azure-coral',
|
|
7
|
-
purple: 'violet-teal',
|
|
8
|
-
orange: 'tangerine-indigo',
|
|
9
|
-
red: 'scarlet-cyan',
|
|
10
|
-
green: 'lime-violet'
|
|
11
|
-
};
|
|
12
4
|
function ngAdd(options) {
|
|
13
5
|
return (tree, context) => {
|
|
14
6
|
var _a;
|
|
15
|
-
const
|
|
16
|
-
const theme = Object.prototype.hasOwnProperty.call(LEGACY_PALETTES, selected) ? LEGACY_PALETTES[selected] : selected;
|
|
7
|
+
const theme = (_a = options.theme) !== null && _a !== void 0 ? _a : 'carbon-cobalt';
|
|
17
8
|
injectStyles(tree, context, { theme });
|
|
18
9
|
return tree;
|
|
19
10
|
};
|
|
@@ -70,8 +61,8 @@ function injectStyles(tree, context, options) {
|
|
|
70
61
|
context.logger.info('Blocks SCSS configuration already exists. Skipping style injection.');
|
|
71
62
|
return;
|
|
72
63
|
}
|
|
73
|
-
const lightThemeVar = `$${(_f = options.theme) !== null && _f !== void 0 ? _f : '
|
|
74
|
-
const darkThemeVar = `$${(_g = options.theme) !== null && _g !== void 0 ? _g : '
|
|
64
|
+
const lightThemeVar = `$${(_f = options.theme) !== null && _f !== void 0 ? _f : 'carbon-cobalt'}-light-theme`;
|
|
65
|
+
const darkThemeVar = `$${(_g = options.theme) !== null && _g !== void 0 ? _g : 'carbon-cobalt'}-dark-theme`;
|
|
75
66
|
const blocksThemeSnippet = `
|
|
76
67
|
@use '@filip.mazev/blocks' as *;
|
|
77
68
|
|
|
@@ -86,5 +77,5 @@ function injectStyles(tree, context, options) {
|
|
|
86
77
|
}
|
|
87
78
|
`;
|
|
88
79
|
tree.overwrite(targetStylePath, blocksThemeSnippet + '\n' + content);
|
|
89
|
-
context.logger.info(`Successfully injected the ${(_h = options.theme) !== null && _h !== void 0 ? _h : '
|
|
80
|
+
context.logger.info(`Successfully injected the ${(_h = options.theme) !== null && _h !== void 0 ? _h : 'carbon-cobalt'} Blocks theme configuration into ${targetStylePath}.`);
|
|
90
81
|
}
|
|
@@ -8,31 +8,25 @@
|
|
|
8
8
|
"type": "string",
|
|
9
9
|
"description": "Select a Blocks palette for your UI.",
|
|
10
10
|
"enum": [
|
|
11
|
-
"
|
|
12
|
-
"azure-
|
|
11
|
+
"carbon-cobalt",
|
|
12
|
+
"azure-ember",
|
|
13
13
|
"violet-teal",
|
|
14
14
|
"tangerine-indigo",
|
|
15
|
-
"
|
|
15
|
+
"brick-rose-cyan",
|
|
16
16
|
"lime-violet",
|
|
17
|
-
"cyberpunk"
|
|
18
|
-
"white",
|
|
19
|
-
"blue",
|
|
20
|
-
"purple",
|
|
21
|
-
"orange",
|
|
22
|
-
"red",
|
|
23
|
-
"green"
|
|
17
|
+
"cyberpunk"
|
|
24
18
|
],
|
|
25
19
|
"x-prompt": {
|
|
26
20
|
"message": "Which palette would you like to use?",
|
|
27
21
|
"type": "list",
|
|
28
22
|
"items": [
|
|
29
23
|
{
|
|
30
|
-
"value": "
|
|
31
|
-
"label": "
|
|
24
|
+
"value": "carbon-cobalt",
|
|
25
|
+
"label": "Carbon / Cobalt"
|
|
32
26
|
},
|
|
33
27
|
{
|
|
34
|
-
"value": "azure-
|
|
35
|
-
"label": "Azure /
|
|
28
|
+
"value": "azure-ember",
|
|
29
|
+
"label": "Azure / Ember"
|
|
36
30
|
},
|
|
37
31
|
{
|
|
38
32
|
"value": "violet-teal",
|
|
@@ -43,8 +37,8 @@
|
|
|
43
37
|
"label": "Tangerine / Indigo"
|
|
44
38
|
},
|
|
45
39
|
{
|
|
46
|
-
"value": "
|
|
47
|
-
"label": "
|
|
40
|
+
"value": "brick-rose-cyan",
|
|
41
|
+
"label": "Brick Rose / Cyan"
|
|
48
42
|
},
|
|
49
43
|
{
|
|
50
44
|
"value": "lime-violet",
|
|
@@ -56,7 +50,7 @@
|
|
|
56
50
|
}
|
|
57
51
|
]
|
|
58
52
|
},
|
|
59
|
-
"default": "
|
|
53
|
+
"default": "carbon-cobalt"
|
|
60
54
|
}
|
|
61
55
|
}
|
|
62
56
|
}
|
|
@@ -136,16 +136,7 @@ export interface BxAppearanceConfig {
|
|
|
136
136
|
reducedTransparency: boolean;
|
|
137
137
|
}
|
|
138
138
|
export declare const DEFAULT_APPEARANCE_CONFIG: Readonly<BxAppearanceConfig>;
|
|
139
|
-
export type BxThemeId = '
|
|
140
|
-
export declare const LEGACY_THEME_IDS: {
|
|
141
|
-
readonly white: "graphite-sky-blue";
|
|
142
|
-
readonly blue: "azure-coral";
|
|
143
|
-
readonly purple: "violet-teal";
|
|
144
|
-
readonly orange: "tangerine-indigo";
|
|
145
|
-
readonly red: "scarlet-cyan";
|
|
146
|
-
readonly green: "lime-violet";
|
|
147
|
-
};
|
|
148
|
-
export type LegacyBxThemeId = keyof typeof LEGACY_THEME_IDS;
|
|
139
|
+
export type BxThemeId = 'carbon-cobalt' | 'azure-ember' | 'violet-teal' | 'tangerine-indigo' | 'brick-rose-cyan' | 'lime-violet' | 'cyberpunk';
|
|
149
140
|
export declare const THEME_PALETTES: ReadonlyArray<{
|
|
150
141
|
id: BxThemeId;
|
|
151
142
|
label: string;
|
|
@@ -183,7 +174,7 @@ export declare class ThemingService implements OnDestroy {
|
|
|
183
174
|
constructor();
|
|
184
175
|
ngOnDestroy(): void;
|
|
185
176
|
setApplicationTheme(theme: DeviceTheme): void;
|
|
186
|
-
setPalette(palette: BxThemeId
|
|
177
|
+
setPalette(palette: BxThemeId): void;
|
|
187
178
|
setHighContrast(enabled: boolean): void;
|
|
188
179
|
setAppearance(settings: Partial<BxAppearanceConfig>): void;
|
|
189
180
|
resetAppearance(): void;
|
|
@@ -225,10 +216,13 @@ export declare class BxShortcutService {
|
|
|
225
216
|
static ɵprov: i0.ɵɵInjectableDeclaration<any>;
|
|
226
217
|
}
|
|
227
218
|
export declare abstract class BxBaseControl<T> implements ControlValueAccessor, OnInit {
|
|
228
|
-
|
|
219
|
+
private readonly focusMonitor;
|
|
220
|
+
private readonly focusElement;
|
|
221
|
+
private readonly destroyRef;
|
|
229
222
|
protected readonly internalValue: import("@angular/core").WritableSignal<T | null>;
|
|
230
223
|
protected readonly isTouched: import("@angular/core").WritableSignal<boolean>;
|
|
231
224
|
protected readonly isDisabled: import("@angular/core").WritableSignal<boolean>;
|
|
225
|
+
protected readonly keyboardFocused: import("@angular/core").WritableSignal<boolean>;
|
|
232
226
|
readonly ngControl: NgControl | null;
|
|
233
227
|
readonly label: import("@angular/core").InputSignal<ResolvableText | undefined>;
|
|
234
228
|
readonly placeholder: import("@angular/core").InputSignal<ResolvableText | undefined>;
|
|
@@ -237,6 +231,9 @@ export declare abstract class BxBaseControl<T> implements ControlValueAccessor,
|
|
|
237
231
|
readonly ariaLabel: import("@angular/core").InputSignal<string | undefined>;
|
|
238
232
|
readonly errorMessages: import("@angular/core").InputSignal<Partial<Record<ValidatorKey, ResolvableText>>>;
|
|
239
233
|
readonly required: import("@angular/core").InputSignal<boolean>;
|
|
234
|
+
readonly readonly: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
|
|
235
|
+
readonly readOnly: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
|
|
236
|
+
readonly isReadonly: import("@angular/core").Signal<boolean>;
|
|
240
237
|
readonly loading: import("@angular/core").InputSignal<boolean>;
|
|
241
238
|
readonly disabled: import("@angular/core").InputSignal<boolean>;
|
|
242
239
|
protected onChange: (value: T | null) => void;
|
|
@@ -249,6 +246,8 @@ export declare abstract class BxBaseControl<T> implements ControlValueAccessor,
|
|
|
249
246
|
setDisabledState(isDisabled: boolean): void;
|
|
250
247
|
protected updateValue(value: T | null): void;
|
|
251
248
|
protected markAsTouched(): void;
|
|
249
|
+
protected onControlPointerDown(): void;
|
|
250
|
+
protected isFieldRequired(): boolean;
|
|
252
251
|
protected get errorMessage(): ResolvableText | undefined;
|
|
253
252
|
static ɵfac: i0.ɵɵFactoryDeclaration<BxBaseControl<any>, never>;
|
|
254
253
|
static ɵdir: i0.ɵɵDirectiveDeclaration<BxBaseControl<any>, never, never, {
|
|
@@ -287,6 +286,16 @@ export declare abstract class BxBaseControl<T> implements ControlValueAccessor,
|
|
|
287
286
|
"required": false;
|
|
288
287
|
"isSignal": true;
|
|
289
288
|
};
|
|
289
|
+
"readonly": {
|
|
290
|
+
"alias": "readonly";
|
|
291
|
+
"required": false;
|
|
292
|
+
"isSignal": true;
|
|
293
|
+
};
|
|
294
|
+
"readOnly": {
|
|
295
|
+
"alias": "readOnly";
|
|
296
|
+
"required": false;
|
|
297
|
+
"isSignal": true;
|
|
298
|
+
};
|
|
290
299
|
"loading": {
|
|
291
300
|
"alias": "loading";
|
|
292
301
|
"required": false;
|
|
@@ -306,7 +315,7 @@ export interface IBxI18nAdapter {
|
|
|
306
315
|
export declare const DEFAULT_DEBOUNCE_TIME = 300;
|
|
307
316
|
export declare const SCROLL_LOCK_INSTANCE_IDENTIFIER = "scroll_lock_instance_";
|
|
308
317
|
export type SemanticColorToken = 'bg-canvas' | 'bg-surface' | 'bg-surface-alt' | 'bg-element' | 'bg-element-hover' | 'bg-element-active' | 'bg-neutral' | 'bg-neutral-hover' | 'bg-neutral-active' | 'primary' | 'primary-hover' | 'primary-active' | 'primary-subtle' | 'on-primary' | 'on-primary-hover' | 'on-primary-active' | 'accent' | 'accent-hover' | 'accent-active' | 'accent-subtle' | 'on-accent' | 'on-accent-hover' | 'on-accent-active' | 'text-accent' | 'border-accent' | 'text-heading' | 'text-primary' | 'text-secondary' | 'text-brand' | 'text-inverse' | 'text-info' | 'text-warn' | 'text-success' | 'text-danger' | 'border-subtle' | 'border-default' | 'border-strong' | 'border-brand' | 'border-info' | 'border-success' | 'border-warn' | 'border-danger' | 'bg-info' | 'bg-info-hover' | 'bg-info-active' | 'bg-info-disabled' | 'bg-info-subtle' | 'bg-success' | 'bg-success-hover' | 'bg-success-active' | 'bg-success-disabled' | 'bg-success-subtle' | 'bg-warn' | 'bg-warn-hover' | 'bg-warn-active' | 'bg-warn-disabled' | 'bg-warn-subtle' | 'bg-danger' | 'bg-danger-hover' | 'bg-danger-active' | 'bg-danger-disabled' | 'bg-danger-subtle' | 'scroll-bg' | 'scroll-thumb' | 'scroll-thumb-hover' | 'meta-brand-palette' | 'meta-accent-palette';
|
|
309
|
-
export declare const PALETTE_NAMES: readonly ["primary", "accent", "
|
|
318
|
+
export declare const PALETTE_NAMES: readonly ["primary", "accent", "carbon", "cobalt", "ember", "brick-rose", "azure", "violet", "teal", "tangerine", "indigo", "cyan", "lime", "cool-violet", "cyber-yellow", "cyber-slate", "blue", "orange", "purple", "red", "green", "danger", "warn", "success", "information", "neutral"];
|
|
310
319
|
export declare const SHADE_NUMBERS: readonly [50, 100, 200, 300, 400, 500, 600, 700, 800, 900, 1000];
|
|
311
320
|
export declare const TOKEN_PREFIX = "bx";
|
|
312
321
|
export declare const TOKEN_DELIMITER = "-";
|
|
@@ -358,8 +367,10 @@ export declare function getComplementaryToken(token: Color): Color;
|
|
|
358
367
|
* Provides the inverted value of a given token color
|
|
359
368
|
*/
|
|
360
369
|
export declare function invertPaletteToken(token: Color): Color;
|
|
361
|
-
/**
|
|
370
|
+
/** Accept only current palette IDs when restoring a saved selection. */
|
|
362
371
|
export declare function resolveThemeId(value: string | null | undefined): BxThemeId | undefined;
|
|
363
372
|
export declare function uuidv4(): string;
|
|
364
373
|
export declare function inheritOverlayTheme(source: HTMLElement, pane: HTMLElement): () => void;
|
|
365
|
-
export declare function trackOverlayOrigin(overlay: OverlayRef, origin: HTMLElement): () => void;
|
|
374
|
+
export declare function trackOverlayOrigin(overlay: OverlayRef, origin: HTMLElement): () => void;
|
|
375
|
+
/** Resolves text and tracks the adapter's language signal in the calling computation. */
|
|
376
|
+
export declare function resolveText(text: ResolvableText | undefined, adapter: IBxI18nAdapter | null, params?: Record<string, unknown>): string;
|
|
@@ -47,7 +47,7 @@ export declare class BxSurfaceDirective implements AfterViewInit {
|
|
|
47
47
|
}, {}, never, never, true, never>;
|
|
48
48
|
}
|
|
49
49
|
/** Internal component integration. An explicit bxSurface directive takes precedence. */
|
|
50
|
-
export declare function injectComponentSurface(options?: () => SurfaceOptions$1): void;
|
|
50
|
+
export declare function injectComponentSurface(options?: () => SurfaceOptions$1, enabled?: () => boolean): void;
|
|
51
51
|
export interface BxGlassLight {
|
|
52
52
|
update(light: GlassLight): void;
|
|
53
53
|
destroy(): void;
|