@assistanz/carbideui 1.3.0 → 1.4.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 +58 -8
- package/fesm2022/assistanz-carbideui.mjs +2742 -223
- package/fesm2022/assistanz-carbideui.mjs.map +1 -1
- package/index.d.ts +996 -71
- package/package.json +1 -1
- package/styles/_content-switcher.scss +50 -0
- package/styles/_theme-button-align.scss +22 -0
- package/styles/_theme-corners.scss +117 -0
- package/styles/carbon.scss +5 -0
package/index.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import * as _angular_core from '@angular/core';
|
|
2
|
-
import { OnChanges, SimpleChanges, EventEmitter, AfterViewInit, InjectionToken, ElementRef, AfterContentInit, QueryList, OnDestroy, TemplateRef, OnInit, Renderer2, ChangeDetectorRef,
|
|
2
|
+
import { OnChanges, SimpleChanges, EventEmitter, AfterViewInit, InjectionToken, ElementRef, AfterContentInit, QueryList, OnDestroy, TemplateRef, OnInit, Renderer2, ChangeDetectorRef, EnvironmentProviders, PipeTransform } from '@angular/core';
|
|
3
3
|
import { DomSanitizer, SafeHtml } from '@angular/platform-browser';
|
|
4
4
|
import { ControlValueAccessor, NgControl } from '@angular/forms';
|
|
5
|
-
import { Chart, BarChartOptions, StackedBarChartOptions, LineChartOptions, AreaChartOptions, PieChartOptions, DonutChartOptions, GaugeChartOptions } from '@carbon/charts';
|
|
6
5
|
import * as _assistanz_carbideui from '@assistanz/carbideui';
|
|
6
|
+
import { Chart, BarChartOptions, StackedBarChartOptions, LineChartOptions, AreaChartOptions, StackedAreaChartOptions, ComboChartOptions, HeatmapChartOptions, PieChartOptions, DonutChartOptions, GaugeChartOptions } from '@carbon/charts';
|
|
7
7
|
|
|
8
8
|
declare const ICONS: {
|
|
9
9
|
readonly add: {
|
|
@@ -1248,6 +1248,10 @@ declare class NgccTabHeaders extends NgccBaseTabHeader implements OnInit, OnChan
|
|
|
1248
1248
|
private destroyEffect?;
|
|
1249
1249
|
private readonly activatedRoute;
|
|
1250
1250
|
constructor();
|
|
1251
|
+
/**
|
|
1252
|
+
* Shows the full label as a tooltip only when it is cut off.
|
|
1253
|
+
*/
|
|
1254
|
+
protected onTabHover(event: MouseEvent, tab: NgccTab): void;
|
|
1251
1255
|
ngOnInit(): void;
|
|
1252
1256
|
ngAfterViewInit(): void;
|
|
1253
1257
|
ngAfterContentInit(): void;
|
|
@@ -1322,7 +1326,88 @@ declare class NgccTabsSkeleton implements OnChanges {
|
|
|
1322
1326
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<NgccTabsSkeleton, "ngcc-tabs-skeleton", never, { "numOftabs": { "alias": "numOftabs"; "required": false; }; }, {}, never, never, true, never>;
|
|
1323
1327
|
}
|
|
1324
1328
|
|
|
1325
|
-
|
|
1329
|
+
/** The four Carbon color themes. */
|
|
1330
|
+
type NgccCarbonThemeName = 'white' | 'g10' | 'g90' | 'g100';
|
|
1331
|
+
/** Pre-v1.3 "themes" that were really shape/alignment variants. Still accepted, then migrated. */
|
|
1332
|
+
type NgccLegacyThemeName = 'rounded' | 'curved' | 'centered';
|
|
1333
|
+
/** Everything `setTheme()` accepts. Only the Carbon four are ever applied as the color theme. */
|
|
1334
|
+
type BaseThemeNamesType = NgccCarbonThemeName | NgccLegacyThemeName;
|
|
1335
|
+
/** Shape of controls and containers. Applied as `data-corner-style`. */
|
|
1336
|
+
type NgccCornerStyle = 'square' | 'rounded' | 'curved';
|
|
1337
|
+
/** Button label alignment. Applied as `data-button-align`. */
|
|
1338
|
+
type NgccButtonAlign = 'left' | 'centered';
|
|
1339
|
+
type NgccThemeStorage = 'local' | 'session' | 'none';
|
|
1340
|
+
interface NgccThemeOption {
|
|
1341
|
+
value: NgccCarbonThemeName;
|
|
1342
|
+
label: string;
|
|
1343
|
+
description: string;
|
|
1344
|
+
isDark: boolean;
|
|
1345
|
+
/** Preview colors: page background, surface, text */
|
|
1346
|
+
preview: {
|
|
1347
|
+
background: string;
|
|
1348
|
+
surface: string;
|
|
1349
|
+
text: string;
|
|
1350
|
+
};
|
|
1351
|
+
}
|
|
1352
|
+
interface NgccCornerStyleOption {
|
|
1353
|
+
value: NgccCornerStyle;
|
|
1354
|
+
label: string;
|
|
1355
|
+
description: string;
|
|
1356
|
+
/** Preview radii in px: [control, container] */
|
|
1357
|
+
preview: {
|
|
1358
|
+
control: string;
|
|
1359
|
+
container: string;
|
|
1360
|
+
};
|
|
1361
|
+
}
|
|
1362
|
+
interface NgccButtonAlignOption {
|
|
1363
|
+
value: NgccButtonAlign;
|
|
1364
|
+
label: string;
|
|
1365
|
+
description: string;
|
|
1366
|
+
}
|
|
1367
|
+
interface NgccThemeConfig {
|
|
1368
|
+
/** Color theme used when nothing is persisted. Default: 'white' */
|
|
1369
|
+
defaultTheme: NgccCarbonThemeName;
|
|
1370
|
+
/** Corner style used when nothing is persisted. Default: 'square' (Carbon) */
|
|
1371
|
+
defaultCornerStyle: NgccCornerStyle;
|
|
1372
|
+
/** Button label alignment used when nothing is persisted. Default: 'left' (Carbon) */
|
|
1373
|
+
defaultButtonAlign: NgccButtonAlign;
|
|
1374
|
+
/** Where the user's choices are persisted. Default: 'local' */
|
|
1375
|
+
storage: NgccThemeStorage;
|
|
1376
|
+
/** Storage key. Default: 'ngcc-theme' */
|
|
1377
|
+
storageKey: string;
|
|
1378
|
+
/** Follow the OS light/dark preference until the user picks a color theme. Default: false */
|
|
1379
|
+
followSystem: boolean;
|
|
1380
|
+
/** Color theme applied when the OS is in light mode and followSystem is on. Default: 'white' */
|
|
1381
|
+
systemLightTheme: NgccCarbonThemeName;
|
|
1382
|
+
/** Color theme applied when the OS is in dark mode and followSystem is on. Default: 'g100' */
|
|
1383
|
+
systemDarkTheme: NgccCarbonThemeName;
|
|
1384
|
+
/** Keep multiple browser tabs in sync. Default: true */
|
|
1385
|
+
syncAcrossTabs: boolean;
|
|
1386
|
+
}
|
|
1387
|
+
declare const NGCC_THEME_DEFAULTS: NgccThemeConfig;
|
|
1388
|
+
declare const NGCC_THEME_CONFIG: InjectionToken<NgccThemeConfig>;
|
|
1389
|
+
declare const NGCC_THEME_OPTIONS: readonly NgccThemeOption[];
|
|
1390
|
+
declare const NGCC_CORNER_STYLE_OPTIONS: readonly NgccCornerStyleOption[];
|
|
1391
|
+
declare const NGCC_BUTTON_ALIGN_OPTIONS: readonly NgccButtonAlignOption[];
|
|
1392
|
+
declare const NGCC_THEME_NAMES: readonly NgccCarbonThemeName[];
|
|
1393
|
+
declare const NGCC_CORNER_STYLES: readonly NgccCornerStyle[];
|
|
1394
|
+
declare const NGCC_BUTTON_ALIGNS: readonly NgccButtonAlign[];
|
|
1395
|
+
/** Valid for `setTheme()`: the Carbon four plus the legacy shape names. */
|
|
1396
|
+
declare function isNgccThemeName(value: unknown): value is BaseThemeNamesType;
|
|
1397
|
+
declare function isNgccCornerStyle(value: unknown): value is NgccCornerStyle;
|
|
1398
|
+
declare function isNgccButtonAlign(value: unknown): value is NgccButtonAlign;
|
|
1399
|
+
declare function isNgccThemeDark(theme: BaseThemeNamesType): boolean;
|
|
1400
|
+
interface NgccResolvedLegacyTheme {
|
|
1401
|
+
theme: NgccCarbonThemeName;
|
|
1402
|
+
cornerStyle?: NgccCornerStyle;
|
|
1403
|
+
buttonAlign?: NgccButtonAlign;
|
|
1404
|
+
}
|
|
1405
|
+
/**
|
|
1406
|
+
* Splits an old combined theme name into the new independent settings:
|
|
1407
|
+
* rounded → white + rounded corners, curved → white + curved corners,
|
|
1408
|
+
* centered → white + centered button labels. Carbon names pass through.
|
|
1409
|
+
*/
|
|
1410
|
+
declare function resolveNgccThemeName(name: BaseThemeNamesType): NgccResolvedLegacyTheme;
|
|
1326
1411
|
|
|
1327
1412
|
/**
|
|
1328
1413
|
* Sets the initial theme on the HTML element.
|
|
@@ -1330,6 +1415,198 @@ type BaseThemeNamesType = 'white' | 'g10' | 'g90' | 'g100' | 'rounded' | 'curved
|
|
|
1330
1415
|
*/
|
|
1331
1416
|
declare function initNgccTheme(theme?: BaseThemeNamesType): void;
|
|
1332
1417
|
|
|
1418
|
+
/**
|
|
1419
|
+
* Single owner of the global theme attributes on `<html>`:
|
|
1420
|
+
*
|
|
1421
|
+
* | Setting | Attribute | Values |
|
|
1422
|
+
* | -------------- | -------------------- | ------------------------------- |
|
|
1423
|
+
* | Color theme | `data-carbon-theme` | white · g10 · g90 · g100 |
|
|
1424
|
+
* | Corner style | `data-corner-style` | square · rounded · curved |
|
|
1425
|
+
* | Button align | `data-button-align` | left · centered |
|
|
1426
|
+
*
|
|
1427
|
+
* The three settings are independent; any combination is valid. Components are never
|
|
1428
|
+
* touched: global CSS reads these attributes (see `styles/_theme-corners.scss`).
|
|
1429
|
+
*
|
|
1430
|
+
* - Signal based: bind to `theme()`, `cornerStyle()`, `buttonAlign()`, `isDark()`.
|
|
1431
|
+
* - Persists choices (local/session storage, configurable) and migrates older formats.
|
|
1432
|
+
* - Optionally follows the OS light/dark preference in real time.
|
|
1433
|
+
* - Keeps other browser tabs in sync. SSR safe.
|
|
1434
|
+
*/
|
|
1435
|
+
declare class NgccThemeService {
|
|
1436
|
+
private readonly doc;
|
|
1437
|
+
private readonly config;
|
|
1438
|
+
private readonly isBrowser;
|
|
1439
|
+
private readonly selectedTheme;
|
|
1440
|
+
private readonly _followSystem;
|
|
1441
|
+
private readonly _cornerStyle;
|
|
1442
|
+
private readonly _buttonAlign;
|
|
1443
|
+
private readonly systemDark;
|
|
1444
|
+
/** True while the color theme is driven by the OS preference */
|
|
1445
|
+
readonly followSystem: _angular_core.Signal<boolean>;
|
|
1446
|
+
readonly cornerStyle: _angular_core.Signal<NgccCornerStyle>;
|
|
1447
|
+
readonly buttonAlign: _angular_core.Signal<NgccButtonAlign>;
|
|
1448
|
+
/** The Carbon color theme currently applied to the document */
|
|
1449
|
+
readonly theme: _angular_core.Signal<NgccCarbonThemeName>;
|
|
1450
|
+
readonly isDark: _angular_core.Signal<boolean>;
|
|
1451
|
+
constructor();
|
|
1452
|
+
/**
|
|
1453
|
+
* Pick an explicit color theme. This turns off "follow system".
|
|
1454
|
+
*
|
|
1455
|
+
* For backwards compatibility the old combined names still work and are split into the
|
|
1456
|
+
* independent settings: `'rounded'`/`'curved'` also set the corner style,
|
|
1457
|
+
* `'centered'` also sets button alignment (the color theme becomes `'white'`).
|
|
1458
|
+
*/
|
|
1459
|
+
setTheme(theme: BaseThemeNamesType): void;
|
|
1460
|
+
getTheme(): NgccCarbonThemeName;
|
|
1461
|
+
setCornerStyle(style: NgccCornerStyle): void;
|
|
1462
|
+
setButtonAlign(align: NgccButtonAlign): void;
|
|
1463
|
+
/** Follow (or stop following) the OS light/dark preference. */
|
|
1464
|
+
setFollowSystem(enabled: boolean): void;
|
|
1465
|
+
/** Flip between the configured light and dark color themes. */
|
|
1466
|
+
toggleDarkMode(): void;
|
|
1467
|
+
/** Forget the persisted choices and return to configured defaults. */
|
|
1468
|
+
reset(): void;
|
|
1469
|
+
private applyDefaults;
|
|
1470
|
+
private apply;
|
|
1471
|
+
private store;
|
|
1472
|
+
private persist;
|
|
1473
|
+
/**
|
|
1474
|
+
* Understands every format ever written under the storage key:
|
|
1475
|
+
* - v2 JSON `{ version: 2, theme, followSystem, cornerStyle, buttonAlign }`
|
|
1476
|
+
* - v1 JSON `{ theme, followSystem }` where theme may be rounded|curved|centered
|
|
1477
|
+
* - a bare theme name (original format)
|
|
1478
|
+
* Anything invalid is ignored (returns null) so a bad value can never break theming.
|
|
1479
|
+
*/
|
|
1480
|
+
private read;
|
|
1481
|
+
private adopt;
|
|
1482
|
+
private restore;
|
|
1483
|
+
/**
|
|
1484
|
+
* Pre-v1.3 builds stored a bare theme name in sessionStorage under the same key.
|
|
1485
|
+
* Adopt it once into the configured store so existing users keep their theme.
|
|
1486
|
+
*/
|
|
1487
|
+
private migrateLegacy;
|
|
1488
|
+
private watchSystemPreference;
|
|
1489
|
+
private watchOtherTabs;
|
|
1490
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<NgccThemeService, never>;
|
|
1491
|
+
static ɵprov: _angular_core.ɵɵInjectableDeclaration<NgccThemeService>;
|
|
1492
|
+
}
|
|
1493
|
+
|
|
1494
|
+
declare class NgccThemeSwitcher {
|
|
1495
|
+
private readonly themeService;
|
|
1496
|
+
protected readonly uid: string;
|
|
1497
|
+
/** Heading text. Set to an empty string to hide it. */
|
|
1498
|
+
readonly heading: _angular_core.InputSignal<string>;
|
|
1499
|
+
/** Restrict the color themes offered, e.g. `['white', 'g100']`. Defaults to all four. */
|
|
1500
|
+
readonly themes: _angular_core.InputSignal<readonly NgccCarbonThemeName[]>;
|
|
1501
|
+
/** Show the "Match system" toggle */
|
|
1502
|
+
readonly showFollowSystem: _angular_core.InputSignal<boolean>;
|
|
1503
|
+
/** Show the Corner style category */
|
|
1504
|
+
readonly showCornerStyle: _angular_core.InputSignal<boolean>;
|
|
1505
|
+
/** Show the Button label alignment category */
|
|
1506
|
+
readonly showButtonAlign: _angular_core.InputSignal<boolean>;
|
|
1507
|
+
/** Compact layout (swatch only, name as tooltip) */
|
|
1508
|
+
readonly compact: _angular_core.InputSignal<boolean>;
|
|
1509
|
+
/** Emits the resolved color theme whenever it changes through this control */
|
|
1510
|
+
readonly themeChange: _angular_core.OutputEmitterRef<NgccCarbonThemeName>;
|
|
1511
|
+
readonly cornerStyleChange: _angular_core.OutputEmitterRef<NgccCornerStyle>;
|
|
1512
|
+
readonly buttonAlignChange: _angular_core.OutputEmitterRef<NgccButtonAlign>;
|
|
1513
|
+
protected readonly currentTheme: _angular_core.Signal<NgccCarbonThemeName>;
|
|
1514
|
+
protected readonly followSystem: _angular_core.Signal<boolean>;
|
|
1515
|
+
protected readonly currentCorner: _angular_core.Signal<NgccCornerStyle>;
|
|
1516
|
+
protected readonly currentAlign: _angular_core.Signal<NgccButtonAlign>;
|
|
1517
|
+
protected readonly cornerOptions: readonly _assistanz_carbideui.NgccCornerStyleOption[];
|
|
1518
|
+
protected readonly alignOptions: readonly _assistanz_carbideui.NgccButtonAlignOption[];
|
|
1519
|
+
protected readonly cornerValues: NgccCornerStyle[];
|
|
1520
|
+
protected readonly alignValues: NgccButtonAlign[];
|
|
1521
|
+
protected readonly options: _angular_core.Signal<NgccThemeOption[]>;
|
|
1522
|
+
private readonly themeValues;
|
|
1523
|
+
protected readonly currentLabel: _angular_core.Signal<string>;
|
|
1524
|
+
protected readonly statusMessage: _angular_core.Signal<string>;
|
|
1525
|
+
protected selectTheme(theme: NgccCarbonThemeName): void;
|
|
1526
|
+
protected selectCorner(style: NgccCornerStyle): void;
|
|
1527
|
+
protected selectAlign(align: NgccButtonAlign): void;
|
|
1528
|
+
protected onFollowSystemChange(enabled: boolean): void;
|
|
1529
|
+
protected onThemeKeydown(event: KeyboardEvent): void;
|
|
1530
|
+
protected onCornerKeydown(event: KeyboardEvent): void;
|
|
1531
|
+
protected onAlignKeydown(event: KeyboardEvent): void;
|
|
1532
|
+
/** Roving tabindex: only the checked radio (or the first, if none) is tabbable. */
|
|
1533
|
+
protected tabIndex<T>(values: readonly T[], current: T, value: T): number;
|
|
1534
|
+
protected themeValuesList(): readonly NgccCarbonThemeName[];
|
|
1535
|
+
/** Arrow/Home/End navigation across a radio group. */
|
|
1536
|
+
private navigate;
|
|
1537
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<NgccThemeSwitcher, never>;
|
|
1538
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<NgccThemeSwitcher, "ngcc-theme-switcher", never, { "heading": { "alias": "heading"; "required": false; "isSignal": true; }; "themes": { "alias": "themes"; "required": false; "isSignal": true; }; "showFollowSystem": { "alias": "showFollowSystem"; "required": false; "isSignal": true; }; "showCornerStyle": { "alias": "showCornerStyle"; "required": false; "isSignal": true; }; "showButtonAlign": { "alias": "showButtonAlign"; "required": false; "isSignal": true; }; "compact": { "alias": "compact"; "required": false; "isSignal": true; }; }, { "themeChange": "themeChange"; "cornerStyleChange": "cornerStyleChange"; "buttonAlignChange": "buttonAlignChange"; }, never, never, true, never>;
|
|
1539
|
+
}
|
|
1540
|
+
|
|
1541
|
+
/**
|
|
1542
|
+
* Carbon Theme Metadata
|
|
1543
|
+
*
|
|
1544
|
+
* Minimal metadata for each Carbon theme. All actual base token values
|
|
1545
|
+
* are applied by Carbon's SCSS via the [data-carbon-theme] attribute selector
|
|
1546
|
+
* in custom-themes.scss. This metadata provides only what the service
|
|
1547
|
+
* needs for WCAG contrast calculations.
|
|
1548
|
+
*/
|
|
1549
|
+
type CarbonThemeName = 'white' | 'g10' | 'g90' | 'g100';
|
|
1550
|
+
interface NgccThemeMetadata {
|
|
1551
|
+
name: CarbonThemeName;
|
|
1552
|
+
isDark: boolean;
|
|
1553
|
+
background: string;
|
|
1554
|
+
/** Secondary button background color (needed for text-on-button WCAG check) */
|
|
1555
|
+
secondaryButtonBg: string;
|
|
1556
|
+
}
|
|
1557
|
+
declare const themeMetadata: Record<CarbonThemeName, NgccThemeMetadata>;
|
|
1558
|
+
declare function isThemeDark(theme: CarbonThemeName): boolean;
|
|
1559
|
+
declare function getThemeBackground(theme: CarbonThemeName): string;
|
|
1560
|
+
declare function getThemeSecondaryButtonBg(theme: CarbonThemeName): string;
|
|
1561
|
+
declare function getAvailableThemes(): CarbonThemeName[];
|
|
1562
|
+
/**
|
|
1563
|
+
* Colors written straight to CSS per base theme (Carbon has a fixed value for each, so
|
|
1564
|
+
* "reset" has a known target).
|
|
1565
|
+
*/
|
|
1566
|
+
type NgccStaticThemeColorToken = 'background' | 'layer-01' | 'layer-02' | 'text-primary' | 'text-secondary' | 'border-subtle' | 'border-strong';
|
|
1567
|
+
/**
|
|
1568
|
+
* Colors the service turns into a whole family of tokens (hover states, text-on-color, …) and
|
|
1569
|
+
* contrast-adjusts for the active base theme. Their default is derived from the brand color.
|
|
1570
|
+
*/
|
|
1571
|
+
type NgccDerivedThemeColorToken = 'support-error' | 'support-warning' | 'support-success' | 'support-info' | 'link' | 'focus';
|
|
1572
|
+
/** Every color a user may adjust. */
|
|
1573
|
+
type NgccThemeColorToken = NgccStaticThemeColorToken | NgccDerivedThemeColorToken;
|
|
1574
|
+
type NgccThemeColorCategoryId = 'surface' | 'text' | 'border' | 'status' | 'interactive';
|
|
1575
|
+
interface NgccThemeColorCategory {
|
|
1576
|
+
id: NgccThemeColorCategoryId;
|
|
1577
|
+
label: string;
|
|
1578
|
+
description: string;
|
|
1579
|
+
}
|
|
1580
|
+
interface NgccThemeColorTokenDef {
|
|
1581
|
+
key: NgccThemeColorToken;
|
|
1582
|
+
label: string;
|
|
1583
|
+
description: string;
|
|
1584
|
+
category: NgccThemeColorCategoryId;
|
|
1585
|
+
/** Derived tokens are contrast-adjusted by the service instead of written verbatim. */
|
|
1586
|
+
derived: boolean;
|
|
1587
|
+
/** CSS custom properties this color drives. */
|
|
1588
|
+
cssVars: readonly string[];
|
|
1589
|
+
}
|
|
1590
|
+
declare const NGCC_THEME_COLOR_CATEGORIES: readonly NgccThemeColorCategory[];
|
|
1591
|
+
/** Brand color: the single input that derives buttons, interactive tokens and charts. */
|
|
1592
|
+
declare const NGCC_BRAND_TOKEN_NAMES: readonly string[];
|
|
1593
|
+
/** Overrides, kept per theme so switching theme switches to that theme's customizations. */
|
|
1594
|
+
type NgccThemeColorOverrides = Partial<Record<CarbonThemeName, Partial<Record<NgccThemeColorToken, string>>>>;
|
|
1595
|
+
/** Carbon's own values for each theme (what "Reset" returns to). Static tokens only. */
|
|
1596
|
+
declare const themeBaseColors: Record<CarbonThemeName, Record<NgccStaticThemeColorToken, string>>;
|
|
1597
|
+
declare function getThemeBaseColor(theme: CarbonThemeName, token: NgccStaticThemeColorToken): string;
|
|
1598
|
+
declare function isDerivedThemeColorToken(value: unknown): value is NgccDerivedThemeColorToken;
|
|
1599
|
+
declare function isThemeColorToken(value: unknown): value is NgccThemeColorToken;
|
|
1600
|
+
declare function isCarbonThemeName(value: unknown): value is CarbonThemeName;
|
|
1601
|
+
/**
|
|
1602
|
+
* CSS custom properties a *static* color writes verbatim; related tokens move together.
|
|
1603
|
+
* Derived colors return `{}`: the service generates (and contrast-adjusts) their tokens.
|
|
1604
|
+
*/
|
|
1605
|
+
declare function themeColorCssVars(token: NgccThemeColorToken, color: string): Record<string, string>;
|
|
1606
|
+
declare const NGCC_THEME_COLOR_TOKENS: readonly NgccThemeColorTokenDef[];
|
|
1607
|
+
/** Colors written verbatim per base theme (what presets and the audit cover). */
|
|
1608
|
+
declare const NGCC_STATIC_THEME_COLOR_TOKENS: readonly NgccThemeColorTokenDef[];
|
|
1609
|
+
|
|
1333
1610
|
/**
|
|
1334
1611
|
* WCAG 2.1 Color Accessibility Utilities
|
|
1335
1612
|
*
|
|
@@ -1490,6 +1767,54 @@ interface NgccDerivedColorPalette {
|
|
|
1490
1767
|
*/
|
|
1491
1768
|
declare function derivePaletteFromBrand(brandColor: string): NgccDerivedColorPalette;
|
|
1492
1769
|
|
|
1770
|
+
/**
|
|
1771
|
+
* Ready-made color themes. Each defines a brand color plus tinted neutrals for all four
|
|
1772
|
+
* Carbon base themes, so switching white / g10 / g90 / g100 keeps the palette's character.
|
|
1773
|
+
*
|
|
1774
|
+
* Contrast (checked in the spec for every preset × theme):
|
|
1775
|
+
* - text and secondary text on background and on layers: at least 7:1 (WCAG AAA)
|
|
1776
|
+
* - strong (control) border on background and layer 01: at least 3:1 (AA non-text)
|
|
1777
|
+
* The brand color itself is contrast-adjusted per theme by NgccColorThemeService.
|
|
1778
|
+
*/
|
|
1779
|
+
interface NgccColorThemePreset {
|
|
1780
|
+
id: string;
|
|
1781
|
+
name: string;
|
|
1782
|
+
description: string;
|
|
1783
|
+
brandColor: string;
|
|
1784
|
+
themeColors: NgccThemeColorOverrides;
|
|
1785
|
+
}
|
|
1786
|
+
declare const NGCC_COLOR_THEME_PRESETS: readonly NgccColorThemePreset[];
|
|
1787
|
+
interface NgccColorThemeOptions {
|
|
1788
|
+
/**
|
|
1789
|
+
* Color theme the app starts with: a built-in preset id ('ocean' | 'royal' | 'ember') or your
|
|
1790
|
+
* own preset object. It is used only when the user has no saved customization, and it is what
|
|
1791
|
+
* "Reset to Defaults" returns to.
|
|
1792
|
+
*/
|
|
1793
|
+
defaultPreset?: string | NgccColorThemePreset;
|
|
1794
|
+
}
|
|
1795
|
+
declare const NGCC_COLOR_THEME_OPTIONS: InjectionToken<NgccColorThemeOptions>;
|
|
1796
|
+
interface NgccPresetAuditIssue {
|
|
1797
|
+
theme: CarbonThemeName;
|
|
1798
|
+
check: string;
|
|
1799
|
+
foreground: string;
|
|
1800
|
+
background: string;
|
|
1801
|
+
/** Measured contrast ratio (0 when a color is not valid hex). */
|
|
1802
|
+
ratio: number;
|
|
1803
|
+
required: number;
|
|
1804
|
+
}
|
|
1805
|
+
/**
|
|
1806
|
+
* Checks a preset's neutrals against WCAG for every base theme. Tokens you leave out fall back
|
|
1807
|
+
* to Carbon's value, so partial presets are audited as they will render.
|
|
1808
|
+
*
|
|
1809
|
+
* - text and secondary text on the background and on layer 01 / 02: 4.5:1 (AA) or 7:1 (AAA)
|
|
1810
|
+
* - control (strong) border on the background and on layer 01: 3:1 (non-text)
|
|
1811
|
+
*
|
|
1812
|
+
* Returns the failures; an empty array means the preset passes. The brand color and the status,
|
|
1813
|
+
* link and focus colors are not audited here: NgccColorThemeService contrast-adjusts them for
|
|
1814
|
+
* each base theme.
|
|
1815
|
+
*/
|
|
1816
|
+
declare function auditNgccColorThemePreset(preset: NgccColorThemePreset, level?: WCAGLevel): NgccPresetAuditIssue[];
|
|
1817
|
+
|
|
1493
1818
|
interface NgccWCAGConfig {
|
|
1494
1819
|
/** Target WCAG compliance level */
|
|
1495
1820
|
level: WCAGLevel;
|
|
@@ -1541,28 +1866,22 @@ interface NgccColorThemeConfig {
|
|
|
1541
1866
|
/** Generated color scale for secondary */
|
|
1542
1867
|
secondaryScale?: NgccColorScale;
|
|
1543
1868
|
}
|
|
1544
|
-
|
|
1545
|
-
|
|
1546
|
-
|
|
1547
|
-
|
|
1548
|
-
|
|
1549
|
-
|
|
1550
|
-
|
|
1551
|
-
|
|
1552
|
-
*/
|
|
1553
|
-
type CarbonThemeName = 'white' | 'g10' | 'g90' | 'g100';
|
|
1554
|
-
interface NgccThemeMetadata {
|
|
1555
|
-
name: CarbonThemeName;
|
|
1556
|
-
isDark: boolean;
|
|
1557
|
-
background: string;
|
|
1558
|
-
/** Secondary button background color (needed for text-on-button WCAG check) */
|
|
1559
|
-
secondaryButtonBg: string;
|
|
1869
|
+
/** Persisted / exportable color settings */
|
|
1870
|
+
interface NgccColorThemeSnapshot {
|
|
1871
|
+
version: 1;
|
|
1872
|
+
brandColor: string;
|
|
1873
|
+
wcagLevel: WCAGLevel;
|
|
1874
|
+
autoAdjust: boolean;
|
|
1875
|
+
/** Per-theme base color overrides. Omitted when nothing is customized. */
|
|
1876
|
+
themeColors?: NgccThemeColorOverrides;
|
|
1560
1877
|
}
|
|
1561
|
-
|
|
1562
|
-
|
|
1563
|
-
|
|
1564
|
-
|
|
1565
|
-
declare
|
|
1878
|
+
interface NgccBrandPreset {
|
|
1879
|
+
name: string;
|
|
1880
|
+
color: string;
|
|
1881
|
+
}
|
|
1882
|
+
declare const NGCC_BRAND_PRESETS: readonly NgccBrandPreset[];
|
|
1883
|
+
/** Returns lowercase #rrggbb for a valid #rgb / #rrggbb string, otherwise null. */
|
|
1884
|
+
declare function normalizeHexColor(value: string): string | null;
|
|
1566
1885
|
|
|
1567
1886
|
/**
|
|
1568
1887
|
* Color Theme Service with WCAG 2.1 Compliance
|
|
@@ -1572,8 +1891,20 @@ declare function getAvailableThemes(): CarbonThemeName[];
|
|
|
1572
1891
|
* Dynamic tokens (interactive, button, link, etc.) are applied as inline CSS overrides.
|
|
1573
1892
|
*/
|
|
1574
1893
|
declare class NgccColorThemeService {
|
|
1894
|
+
private static readonly DEFAULT_WCAG;
|
|
1575
1895
|
private static readonly FALLBACK_BRAND_COLOR;
|
|
1576
|
-
readonly
|
|
1896
|
+
private readonly themeService;
|
|
1897
|
+
private readonly doc;
|
|
1898
|
+
private readonly isBrowser;
|
|
1899
|
+
private readonly themeConfig;
|
|
1900
|
+
private readonly colorOptions;
|
|
1901
|
+
/** Customizations of the app's default preset (empty without one); what reset returns to. */
|
|
1902
|
+
private defaultThemeColors;
|
|
1903
|
+
/**
|
|
1904
|
+
* Carbon base theme. Owned by NgccThemeService (single source of truth for
|
|
1905
|
+
* `data-carbon-theme`). Corner style and button alignment don't affect color tokens.
|
|
1906
|
+
*/
|
|
1907
|
+
readonly baseTheme: _angular_core.Signal<CarbonThemeName>;
|
|
1577
1908
|
readonly brandColor: _angular_core.WritableSignal<string>;
|
|
1578
1909
|
private readonly defaultBrandColor;
|
|
1579
1910
|
/** WCAG configuration */
|
|
@@ -1585,15 +1916,26 @@ declare class NgccColorThemeService {
|
|
|
1585
1916
|
/** Convenience accessors derived from palette */
|
|
1586
1917
|
readonly primaryColor: _angular_core.Signal<string>;
|
|
1587
1918
|
readonly secondaryColor: _angular_core.Signal<string>;
|
|
1919
|
+
/** Status colors: the user's override for the active theme, else derived from the brand. */
|
|
1588
1920
|
readonly dangerColor: _angular_core.Signal<string>;
|
|
1589
1921
|
readonly successColor: _angular_core.Signal<string>;
|
|
1922
|
+
readonly warningColor: _angular_core.Signal<string>;
|
|
1923
|
+
/** @deprecated Misspelled; use warningColor. */
|
|
1590
1924
|
readonly warningccolor: _angular_core.Signal<string>;
|
|
1591
1925
|
readonly infoColor: _angular_core.Signal<string>;
|
|
1592
1926
|
readonly isDarkMode: _angular_core.Signal<boolean>;
|
|
1927
|
+
/** Effective page background of the active theme, including user customization. */
|
|
1593
1928
|
readonly backgroundColor: _angular_core.Signal<string>;
|
|
1594
1929
|
readonly primaryScale: _angular_core.Signal<_assistanz_carbideui.NgccColorScale>;
|
|
1595
1930
|
readonly secondaryScale: _angular_core.Signal<_assistanz_carbideui.NgccColorScale>;
|
|
1596
1931
|
readonly availableThemes: _angular_core.WritableSignal<CarbonThemeName[]>;
|
|
1932
|
+
/**
|
|
1933
|
+
* User adjustments to the base themes (white, g10, g90, g100), kept per theme.
|
|
1934
|
+
* Emitted as `:root[data-carbon-theme='…']` token blocks: global CSS, no component edits.
|
|
1935
|
+
*/
|
|
1936
|
+
readonly themeColorOverrides: _angular_core.WritableSignal<Partial<Record<CarbonThemeName, Partial<Record<NgccThemeColorToken, string>>>>>;
|
|
1937
|
+
/** CSS custom properties currently applied to :root (for inspection / copy). */
|
|
1938
|
+
readonly appliedTokens: _angular_core.WritableSignal<Record<string, string>>;
|
|
1597
1939
|
/**
|
|
1598
1940
|
* Chart color configuration for Carbon Charts integration
|
|
1599
1941
|
*/
|
|
@@ -1604,8 +1946,39 @@ declare class NgccColorThemeService {
|
|
|
1604
1946
|
constructor();
|
|
1605
1947
|
private generateChartColorScale;
|
|
1606
1948
|
setBaseTheme(theme: CarbonThemeName): void;
|
|
1607
|
-
/**
|
|
1608
|
-
|
|
1949
|
+
/** Effective color of a base-theme token: the user's override, else Carbon's value. */
|
|
1950
|
+
getThemeColor(theme: CarbonThemeName, token: NgccThemeColorToken): string;
|
|
1951
|
+
/**
|
|
1952
|
+
* What a token is without an override: Carbon's value for surfaces, text and borders; derived
|
|
1953
|
+
* from the brand color for status, link and focus (those are contrast-adjusted when applied).
|
|
1954
|
+
*/
|
|
1955
|
+
defaultThemeColor(theme: CarbonThemeName, token: NgccThemeColorToken): string;
|
|
1956
|
+
isThemeColorOverridden(theme: CarbonThemeName, token: NgccThemeColorToken): boolean;
|
|
1957
|
+
/**
|
|
1958
|
+
* Customize one color of one base theme. Accepts #rgb / #rrggbb; returns false for anything
|
|
1959
|
+
* else. Setting a token back to Carbon's own value removes the override.
|
|
1960
|
+
*/
|
|
1961
|
+
setThemeColor(theme: CarbonThemeName, token: NgccThemeColorToken, color: string): boolean;
|
|
1962
|
+
/**
|
|
1963
|
+
* Apply a ready-made color theme (brand color + tinted neutrals for all four base themes).
|
|
1964
|
+
* Replaces current customizations. Accepts a preset or its id; returns false if unknown/invalid.
|
|
1965
|
+
*/
|
|
1966
|
+
applyPreset(preset: NgccColorThemePreset | string): boolean;
|
|
1967
|
+
/** Plain Carbon: Carbon's blue and no customization, whatever default the app configured. */
|
|
1968
|
+
resetToCarbon(): void;
|
|
1969
|
+
/**
|
|
1970
|
+
* Which starting point the current colors match: a preset id, `'carbon'` for plain Carbon, or
|
|
1971
|
+
* `''` once customized. Follows the real state, so it is right on load and after a reload.
|
|
1972
|
+
*/
|
|
1973
|
+
readonly activePresetId: _angular_core.Signal<string>;
|
|
1974
|
+
/** Remove one override (token given) or every override of a theme. */
|
|
1975
|
+
resetThemeColors(theme: CarbonThemeName, token?: NgccThemeColorToken): void;
|
|
1976
|
+
private withTheme;
|
|
1977
|
+
/**
|
|
1978
|
+
* Set the brand color. All other colors are derived automatically.
|
|
1979
|
+
* Accepts #rgb or #rrggbb; returns false (and changes nothing) for anything else.
|
|
1980
|
+
*/
|
|
1981
|
+
updateBrandColor(color: string): boolean;
|
|
1609
1982
|
/** Set the default brand color used on initialization and reset. */
|
|
1610
1983
|
setDefaultBrandColor(color: string): void;
|
|
1611
1984
|
/** @deprecated Use updateBrandColor() instead. */
|
|
@@ -1617,7 +1990,29 @@ declare class NgccColorThemeService {
|
|
|
1617
1990
|
private styleElement;
|
|
1618
1991
|
private applyTheme;
|
|
1619
1992
|
private updateThemeStyleTag;
|
|
1993
|
+
/** Brand tokens on :root, then one block per customized base theme. */
|
|
1994
|
+
private renderCss;
|
|
1995
|
+
/** Restore the default brand color and WCAG settings. Base theme is left alone. */
|
|
1620
1996
|
resetOverrides(): void;
|
|
1997
|
+
private persistTimer;
|
|
1998
|
+
private hasPersisted;
|
|
1999
|
+
private get storageKey();
|
|
2000
|
+
private snapshot;
|
|
2001
|
+
/** Serializable settings, e.g. to save to a user profile on your backend. */
|
|
2002
|
+
exportConfig(): NgccColorThemeSnapshot;
|
|
2003
|
+
/** Apply settings from exportConfig(). Returns false if the payload is invalid. */
|
|
2004
|
+
importConfig(input: string | Partial<NgccColorThemeSnapshot>): boolean;
|
|
2005
|
+
/** Start from the app's default preset (provideNgccColorTheme). Saved user choices load after. */
|
|
2006
|
+
private initDefaultPreset;
|
|
2007
|
+
private sameOverrides;
|
|
2008
|
+
/** Persisted/imported data is untrusted: keep only known themes, tokens and valid hex colors. */
|
|
2009
|
+
private sanitizeOverrides;
|
|
2010
|
+
/** Applied tokens as a ready-to-paste CSS block. */
|
|
2011
|
+
toCss(): string;
|
|
2012
|
+
private restore;
|
|
2013
|
+
/** Debounced so dragging the color picker doesn't write storage on every frame. */
|
|
2014
|
+
private schedulePersist;
|
|
2015
|
+
private clearPersisted;
|
|
1621
2016
|
private generateWcagCompliantTokens;
|
|
1622
2017
|
private generateAccessibilityReport;
|
|
1623
2018
|
private getVisitedLinkColor;
|
|
@@ -1656,15 +2051,19 @@ declare abstract class NgccBaseChart<TOptions extends object> implements OnDestr
|
|
|
1656
2051
|
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<NgccBaseChart<any>, never, never, { "data": { "alias": "data"; "required": false; }; "options": { "alias": "options"; "required": false; }; "loading": { "alias": "loading"; "required": false; }; "noDataMessage": { "alias": "noDataMessage"; "required": false; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; }; }, {}, never, never, true, never>;
|
|
1657
2052
|
}
|
|
1658
2053
|
|
|
1659
|
-
type NgccChartType = 'bar' | 'stackedBar' | 'line' | 'area' | 'pie' | 'donut';
|
|
2054
|
+
type NgccChartType = 'bar' | 'horizontalBar' | 'stackedBar' | 'line' | 'area' | 'stackedArea' | 'combo' | 'heatmap' | 'pie' | 'donut';
|
|
1660
2055
|
/**
|
|
1661
2056
|
* Automatically maps each chart type to its Carbon option type.
|
|
1662
2057
|
*/
|
|
1663
2058
|
interface NgccChartOptionMap {
|
|
1664
2059
|
bar: BarChartOptions;
|
|
2060
|
+
horizontalBar: BarChartOptions;
|
|
1665
2061
|
stackedBar: StackedBarChartOptions;
|
|
1666
2062
|
line: LineChartOptions;
|
|
1667
2063
|
area: AreaChartOptions;
|
|
2064
|
+
stackedArea: StackedAreaChartOptions;
|
|
2065
|
+
combo: ComboChartOptions;
|
|
2066
|
+
heatmap: HeatmapChartOptions;
|
|
1668
2067
|
pie: PieChartOptions;
|
|
1669
2068
|
donut: DonutChartOptions;
|
|
1670
2069
|
}
|
|
@@ -1672,17 +2071,105 @@ interface NgccChartOptionMap {
|
|
|
1672
2071
|
* A type-safe way to get the right options type for the given chart type.
|
|
1673
2072
|
*/
|
|
1674
2073
|
type NgccChartOptions<T extends NgccChartType = NgccChartType> = NgccChartOptionMap[T];
|
|
2074
|
+
interface NgccChartsArgs {
|
|
2075
|
+
type: NgccChartType;
|
|
2076
|
+
data: Record<string, unknown>[];
|
|
2077
|
+
options: NgccChartOptions;
|
|
2078
|
+
loading?: boolean;
|
|
2079
|
+
noDataMessage?: string;
|
|
2080
|
+
thresholds?: readonly NgccChartThreshold[];
|
|
2081
|
+
sort?: NgccChartSort;
|
|
2082
|
+
limit?: number | null;
|
|
2083
|
+
}
|
|
2084
|
+
/**
|
|
2085
|
+
* A reference line on the value axis: a limit to stay under (capacity, quota) or a goal to reach.
|
|
2086
|
+
* `kind` only picks the default color: limit is red, goal is green. `color` overrides it.
|
|
2087
|
+
*/
|
|
2088
|
+
interface NgccChartThreshold {
|
|
2089
|
+
value: number;
|
|
2090
|
+
label: string;
|
|
2091
|
+
kind?: 'limit' | 'goal';
|
|
2092
|
+
color?: string;
|
|
2093
|
+
}
|
|
2094
|
+
/** Converts thresholds to Carbon Charts' axis `thresholds` option. */
|
|
2095
|
+
declare function toCarbonThresholds(thresholds: readonly NgccChartThreshold[]): {
|
|
2096
|
+
value: number;
|
|
2097
|
+
label: string;
|
|
2098
|
+
fillColor: string;
|
|
2099
|
+
}[];
|
|
2100
|
+
type NgccChartSort = 'none' | 'asc' | 'desc';
|
|
2101
|
+
/** Sorts rows by their `value` and keeps the first `limit`, for top-N charts. */
|
|
2102
|
+
declare function rankChartData(rows: readonly Record<string, unknown>[], sort: NgccChartSort, limit?: number | null): Record<string, unknown>[];
|
|
2103
|
+
/**
|
|
2104
|
+
* Builds Carbon's `comboChartTypes` from series names: which groups draw as bars and which as
|
|
2105
|
+
* lines. Example: `ngccComboChartTypes({ bars: ['Revenue'], lines: ['Capacity'] })`.
|
|
2106
|
+
*/
|
|
2107
|
+
declare function ngccComboChartTypes(series: {
|
|
2108
|
+
bars: readonly string[];
|
|
2109
|
+
lines: readonly string[];
|
|
2110
|
+
}): ComboChartOptions['comboChartTypes'];
|
|
1675
2111
|
|
|
1676
2112
|
declare class NgccCharts<T extends NgccChartType = 'bar'> extends NgccBaseChart<NgccChartOptions<T>> implements OnChanges {
|
|
1677
2113
|
type: T;
|
|
2114
|
+
/**
|
|
2115
|
+
* Reference lines on the value axis: limits (capacity, quota) and goals. Applies to bar, line,
|
|
2116
|
+
* area and combo charts; for `horizontalBar` the line is vertical.
|
|
2117
|
+
*/
|
|
2118
|
+
thresholds: readonly NgccChartThreshold[];
|
|
2119
|
+
/** Sort rows by `value` before drawing (top-N / ranked charts). Default: keep input order. */
|
|
2120
|
+
sort: NgccChartSort;
|
|
2121
|
+
/** Keep only the first N rows after sorting. */
|
|
2122
|
+
limit: number | null;
|
|
1678
2123
|
private readonly _type;
|
|
2124
|
+
private readonly _thresholds;
|
|
2125
|
+
private readonly _sort;
|
|
2126
|
+
private readonly _limit;
|
|
1679
2127
|
ngOnChanges(changes: SimpleChanges): void;
|
|
2128
|
+
/** The rows actually drawn: input data, ranked when `sort` / `limit` are set. */
|
|
2129
|
+
protected preparedData(): Record<string, unknown>[];
|
|
1680
2130
|
constructor();
|
|
1681
2131
|
protected initChart(el: HTMLElement): void;
|
|
1682
2132
|
private getMergedOptions;
|
|
2133
|
+
/**
|
|
2134
|
+
* Ranked list: categories on the left (first row on top), values along the bottom. Data is
|
|
2135
|
+
* `{ group, value }`.
|
|
2136
|
+
* Unlike the other axis charts, user `axes` are merged per axis rather than replacing ours.
|
|
2137
|
+
*/
|
|
2138
|
+
private horizontalBarOptions;
|
|
2139
|
+
/** Category labels in the order they should read from the top: the order of the (ranked) rows. */
|
|
2140
|
+
private groupsTopDown;
|
|
2141
|
+
/**
|
|
2142
|
+
* Heat map. Data is `{ x, y, value }`: x along the bottom, y up the side, `value` as the color.
|
|
2143
|
+
* Carbon draws a color legend; the legend title defaults to "Value".
|
|
2144
|
+
*/
|
|
2145
|
+
private heatmapOptions;
|
|
2146
|
+
/** Adds the `thresholds` input to the value axis, after any thresholds the options define. */
|
|
2147
|
+
private withThresholds;
|
|
2148
|
+
/**
|
|
2149
|
+
* Combo charts need to know which series are bars and which are lines. Without
|
|
2150
|
+
* `comboChartTypes` in the options, the first series draws as bars and the rest as lines.
|
|
2151
|
+
*/
|
|
2152
|
+
private defaultComboTypes;
|
|
1683
2153
|
getType(): T;
|
|
1684
2154
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<NgccCharts<any>, never>;
|
|
1685
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<NgccCharts<any>, "ngcc-charts", never, { "type": { "alias": "type"; "required": false; }; }, {}, never, never, true, never>;
|
|
2155
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<NgccCharts<any>, "ngcc-charts", never, { "type": { "alias": "type"; "required": false; }; "thresholds": { "alias": "thresholds"; "required": false; }; "sort": { "alias": "sort"; "required": false; }; "limit": { "alias": "limit"; "required": false; }; }, {}, never, never, true, never>;
|
|
2156
|
+
}
|
|
2157
|
+
|
|
2158
|
+
/**
|
|
2159
|
+
* The loading and empty placeholder shared by every chart panel, so they look and announce the
|
|
2160
|
+
* same: the library skeleton while loading, a "no data" message (same height, so the layout does
|
|
2161
|
+
* not jump) when there is nothing to draw. Renders nothing when neither applies.
|
|
2162
|
+
*
|
|
2163
|
+
* Use it for your own chart wrappers too:
|
|
2164
|
+
* `<ngcc-chart-state [loading]="loading" [empty]="!rows.length" height="300px" />`
|
|
2165
|
+
*/
|
|
2166
|
+
declare class NgccChartState {
|
|
2167
|
+
readonly loading: _angular_core.InputSignal<boolean>;
|
|
2168
|
+
readonly empty: _angular_core.InputSignal<boolean>;
|
|
2169
|
+
readonly message: _angular_core.InputSignal<string>;
|
|
2170
|
+
readonly height: _angular_core.InputSignal<string>;
|
|
2171
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<NgccChartState, never>;
|
|
2172
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<NgccChartState, "ngcc-chart-state", never, { "loading": { "alias": "loading"; "required": false; "isSignal": true; }; "empty": { "alias": "empty"; "required": false; "isSignal": true; }; "message": { "alias": "message"; "required": false; "isSignal": true; }; "height": { "alias": "height"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
1686
2173
|
}
|
|
1687
2174
|
|
|
1688
2175
|
declare class NgccGaugeChart extends NgccBaseChart<GaugeChartOptions> {
|
|
@@ -2002,6 +2489,35 @@ declare class ToastService {
|
|
|
2002
2489
|
static ɵprov: _angular_core.ɵɵInjectableDeclaration<ToastService>;
|
|
2003
2490
|
}
|
|
2004
2491
|
|
|
2492
|
+
type NgccTagType = 'red' | 'magenta' | 'purple' | 'blue' | 'cyan' | 'teal' | 'green' | 'gray' | 'cool-gray' | 'warm-gray' | 'high-contrast' | 'outline';
|
|
2493
|
+
type NgccTagSize = 'sm' | 'md' | 'lg';
|
|
2494
|
+
/** Convenience map for status badges: `<ngcc-tag [type]="NGCC_STATUS_TAG.running">`. */
|
|
2495
|
+
declare const NGCC_STATUS_TAG: {
|
|
2496
|
+
readonly running: "green";
|
|
2497
|
+
readonly success: "green";
|
|
2498
|
+
readonly pending: "blue";
|
|
2499
|
+
readonly warning: "purple";
|
|
2500
|
+
readonly error: "red";
|
|
2501
|
+
readonly stopped: "gray";
|
|
2502
|
+
readonly unknown: "cool-gray";
|
|
2503
|
+
};
|
|
2504
|
+
/**
|
|
2505
|
+
* Tag / status badge. `dot` adds a leading status dot (status-badge look).
|
|
2506
|
+
* `dismissible` shows a close button and emits `dismissed`.
|
|
2507
|
+
*/
|
|
2508
|
+
declare class NgccTag {
|
|
2509
|
+
readonly type: _angular_core.InputSignal<NgccTagType>;
|
|
2510
|
+
readonly size: _angular_core.InputSignal<NgccTagSize>;
|
|
2511
|
+
readonly dot: _angular_core.InputSignal<boolean>;
|
|
2512
|
+
readonly dismissible: _angular_core.InputSignal<boolean>;
|
|
2513
|
+
readonly disabled: _angular_core.InputSignal<boolean>;
|
|
2514
|
+
readonly dismissLabel: _angular_core.InputSignal<string>;
|
|
2515
|
+
readonly dismissed: _angular_core.OutputEmitterRef<void>;
|
|
2516
|
+
protected readonly classes: _angular_core.Signal<string>;
|
|
2517
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<NgccTag, never>;
|
|
2518
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<NgccTag, "ngcc-tag", never, { "type": { "alias": "type"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "dot": { "alias": "dot"; "required": false; "isSignal": true; }; "dismissible": { "alias": "dismissible"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "dismissLabel": { "alias": "dismissLabel"; "required": false; "isSignal": true; }; }, { "dismissed": "dismissed"; }, never, ["*"], true, never>;
|
|
2519
|
+
}
|
|
2520
|
+
|
|
2005
2521
|
type SortDirection = 'asc' | 'desc';
|
|
2006
2522
|
interface NgccTableColumn<_T = unknown> {
|
|
2007
2523
|
key: string;
|
|
@@ -2009,17 +2525,36 @@ interface NgccTableColumn<_T = unknown> {
|
|
|
2009
2525
|
sortable?: boolean;
|
|
2010
2526
|
width?: string | number;
|
|
2011
2527
|
align?: 'start' | 'center' | 'end';
|
|
2528
|
+
/**
|
|
2529
|
+
* `status` renders the value as a status tag (dot + text, so color is never the only signal).
|
|
2530
|
+
* Default `text`.
|
|
2531
|
+
*/
|
|
2532
|
+
cell?: 'text' | 'status';
|
|
2533
|
+
/** For `cell: 'status'`: value -> tag color. Unmapped values use the built-in status names
|
|
2534
|
+
* (running, success, pending, warning, error, stopped) and fall back to gray. */
|
|
2535
|
+
statusMap?: Record<string, NgccTagType>;
|
|
2012
2536
|
}
|
|
2013
2537
|
interface NgccTableConfig {
|
|
2014
2538
|
pagination?: boolean;
|
|
2015
2539
|
pageSize?: number;
|
|
2016
2540
|
rowSelection?: 'single' | 'multiple' | 'none';
|
|
2541
|
+
/** Set to `false` to hide the expand column even when an expanded-row template is provided. */
|
|
2542
|
+
expandable?: boolean;
|
|
2017
2543
|
search?: {
|
|
2018
2544
|
enabled?: boolean;
|
|
2019
2545
|
mode?: 'static' | 'dynamic';
|
|
2020
2546
|
};
|
|
2021
2547
|
}
|
|
2022
2548
|
|
|
2549
|
+
/**
|
|
2550
|
+
* Marks the template shown under an expanded row:
|
|
2551
|
+
* `<ng-template ngccTableExpandedRow let-row let-index="index">...</ng-template>`
|
|
2552
|
+
*/
|
|
2553
|
+
declare class NgccTableExpandedRowDirective {
|
|
2554
|
+
readonly template: TemplateRef<unknown>;
|
|
2555
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<NgccTableExpandedRowDirective, never>;
|
|
2556
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<NgccTableExpandedRowDirective, "ng-template[ngccTableExpandedRow]", never, {}, {}, never, never, true, never>;
|
|
2557
|
+
}
|
|
2023
2558
|
declare class NgccTable<T = unknown> implements OnInit, OnChanges {
|
|
2024
2559
|
private readonly searchService;
|
|
2025
2560
|
columns: NgccTableColumn<T>[];
|
|
@@ -2040,6 +2575,14 @@ declare class NgccTable<T = unknown> implements OnInit, OnChanges {
|
|
|
2040
2575
|
} | null>;
|
|
2041
2576
|
rowSelect: EventEmitter<T[]>;
|
|
2042
2577
|
searchChange: EventEmitter<string>;
|
|
2578
|
+
/** Emits when a row is expanded or collapsed. */
|
|
2579
|
+
rowExpand: EventEmitter<{
|
|
2580
|
+
row: T;
|
|
2581
|
+
expanded: boolean;
|
|
2582
|
+
}>;
|
|
2583
|
+
/** Template for the content under an expanded row. Its presence turns on the expand column. */
|
|
2584
|
+
protected readonly expandedTemplate: _angular_core.Signal<NgccTableExpandedRowDirective | undefined>;
|
|
2585
|
+
protected readonly expanded: _angular_core.WritableSignal<Set<number>>;
|
|
2043
2586
|
private readonly _sortState;
|
|
2044
2587
|
private readonly _columns;
|
|
2045
2588
|
private readonly _rows;
|
|
@@ -2066,8 +2609,19 @@ declare class NgccTable<T = unknown> implements OnInit, OnChanges {
|
|
|
2066
2609
|
protected readonly totalPages: _angular_core.Signal<number>;
|
|
2067
2610
|
constructor();
|
|
2068
2611
|
ngOnInit(): void;
|
|
2069
|
-
|
|
2070
|
-
|
|
2612
|
+
/** Position of a row in the original `rows` input (selection and expansion key on this). */
|
|
2613
|
+
private readonly rowIndexMap;
|
|
2614
|
+
protected absIndex(row: T): number;
|
|
2615
|
+
protected isSelected(row: T): boolean;
|
|
2616
|
+
protected isExpandable(): boolean;
|
|
2617
|
+
protected isExpanded(row: T): boolean;
|
|
2618
|
+
protected toggleExpand(row: T): void;
|
|
2619
|
+
/** Columns the body spans: data + selection + expand. */
|
|
2620
|
+
protected columnCount(): number;
|
|
2621
|
+
protected statusType(col: NgccTableColumn<T>, value: unknown): NgccTagType;
|
|
2622
|
+
/** A click on the row selects it, unless it landed on a control inside the row. */
|
|
2623
|
+
protected onRowClick(event: Event, row: T): void;
|
|
2624
|
+
protected toggleRowSelect(row: T): void;
|
|
2071
2625
|
protected isAllSelected(): boolean;
|
|
2072
2626
|
protected toggleAllRowsSelected(): void;
|
|
2073
2627
|
protected readonly isIndeterminate: _angular_core.Signal<boolean>;
|
|
@@ -2085,7 +2639,7 @@ declare class NgccTable<T = unknown> implements OnInit, OnChanges {
|
|
|
2085
2639
|
width?: number | string;
|
|
2086
2640
|
}): string | null;
|
|
2087
2641
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<NgccTable<any>, never>;
|
|
2088
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<NgccTable<any>, "ngcc-table", never, { "columns": { "alias": "columns"; "required": false; }; "rows": { "alias": "rows"; "required": false; }; "loading": { "alias": "loading"; "required": false; }; "config": { "alias": "config"; "required": false; }; "sortState": { "alias": "sortState"; "required": false; }; }, { "sortStateChange": "sortStateChange"; "rowSelect": "rowSelect"; "searchChange": "searchChange"; },
|
|
2642
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<NgccTable<any>, "ngcc-table", never, { "columns": { "alias": "columns"; "required": false; }; "rows": { "alias": "rows"; "required": false; }; "loading": { "alias": "loading"; "required": false; }; "config": { "alias": "config"; "required": false; }; "sortState": { "alias": "sortState"; "required": false; }; }, { "sortStateChange": "sortStateChange"; "rowSelect": "rowSelect"; "searchChange": "searchChange"; "rowExpand": "rowExpand"; }, ["expandedTemplate"], ["ngcc-table-toolbar"], true, never>;
|
|
2089
2643
|
}
|
|
2090
2644
|
|
|
2091
2645
|
declare class NgccTableToolbar implements OnChanges {
|
|
@@ -2200,31 +2754,136 @@ declare class NgccPagination implements OnChanges {
|
|
|
2200
2754
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<NgccPagination, "ngcc-pagination", never, { "page": { "alias": "page"; "required": false; }; "totalItems": { "alias": "totalItems"; "required": false; }; "pageSizes": { "alias": "pageSizes"; "required": false; }; "pageSize": { "alias": "pageSize"; "required": false; }; "loopNavigation": { "alias": "loopNavigation"; "required": false; }; }, { "pageChange": "pageChange"; "pageSizeChange": "pageSizeChange"; }, never, never, true, never>;
|
|
2201
2755
|
}
|
|
2202
2756
|
|
|
2757
|
+
type NgccColorThemeTab = 'colors' | 'brand' | 'a11y' | 'output';
|
|
2203
2758
|
declare class NgccColorThemeSwitcher {
|
|
2204
2759
|
private readonly colorService;
|
|
2205
2760
|
/** Optional default brand color provided by the consumer */
|
|
2206
2761
|
readonly defaultColor: _angular_core.InputSignal<string | undefined>;
|
|
2762
|
+
/** Quick-pick brand colors. Pass an empty array to hide. */
|
|
2763
|
+
readonly presets: _angular_core.InputSignal<readonly NgccBrandPreset[]>;
|
|
2764
|
+
/** Show the WCAG compliance panel */
|
|
2765
|
+
readonly showAccessibility: _angular_core.InputSignal<boolean>;
|
|
2766
|
+
/** Show the applied-token preview and copy/import/export tools */
|
|
2767
|
+
readonly showAdvanced: _angular_core.InputSignal<boolean>;
|
|
2768
|
+
/** Show the editor for the active base theme's colors (background, layers, text, borders) */
|
|
2769
|
+
readonly showThemeColors: _angular_core.InputSignal<boolean>;
|
|
2207
2770
|
constructor();
|
|
2208
|
-
|
|
2209
|
-
protected readonly
|
|
2210
|
-
protected readonly
|
|
2211
|
-
|
|
2771
|
+
protected readonly brandColor: _angular_core.WritableSignal<string>;
|
|
2772
|
+
protected readonly baseTheme: _angular_core.Signal<CarbonThemeName>;
|
|
2773
|
+
protected readonly wcag: _angular_core.WritableSignal<_assistanz_carbideui.NgccWCAGConfig>;
|
|
2774
|
+
protected readonly report: _angular_core.WritableSignal<_assistanz_carbideui.NgccThemeAccessibilityReport | null>;
|
|
2212
2775
|
protected readonly primaryColor: _angular_core.Signal<string>;
|
|
2213
2776
|
protected readonly secondaryColor: _angular_core.Signal<string>;
|
|
2214
2777
|
protected readonly dangerColor: _angular_core.Signal<string>;
|
|
2215
2778
|
protected readonly successColor: _angular_core.Signal<string>;
|
|
2216
|
-
protected readonly
|
|
2779
|
+
protected readonly warningColor: _angular_core.Signal<string>;
|
|
2217
2780
|
protected readonly infoColor: _angular_core.Signal<string>;
|
|
2218
|
-
|
|
2219
|
-
|
|
2220
|
-
|
|
2221
|
-
protected
|
|
2222
|
-
protected
|
|
2781
|
+
protected readonly themes: readonly CarbonThemeName[];
|
|
2782
|
+
/** Built-in color themes offered as one-click starting points. */
|
|
2783
|
+
protected readonly colorPresets: readonly NgccColorThemePreset[];
|
|
2784
|
+
protected readonly activePreset: _angular_core.Signal<string>;
|
|
2785
|
+
protected readonly brandTokens: readonly string[];
|
|
2786
|
+
/** Search over color names, descriptions and CSS token names. */
|
|
2787
|
+
protected readonly filter: _angular_core.WritableSignal<string>;
|
|
2788
|
+
protected readonly tab: _angular_core.WritableSignal<NgccColorThemeTab>;
|
|
2789
|
+
protected readonly tabs: _angular_core.Signal<{
|
|
2790
|
+
id: NgccColorThemeTab;
|
|
2791
|
+
label: string;
|
|
2792
|
+
show: boolean;
|
|
2793
|
+
}[]>;
|
|
2794
|
+
/** The chosen tab, or the first one still shown if it was switched off. */
|
|
2795
|
+
protected readonly activeTab: _angular_core.Signal<NgccColorThemeTab>;
|
|
2796
|
+
/** Every customizable color of the active base theme, with whether it has been changed. */
|
|
2797
|
+
private readonly allRows;
|
|
2798
|
+
/** Categories with their rows, narrowed by the search box. Empty categories are dropped. */
|
|
2799
|
+
protected readonly categories: _angular_core.Signal<{
|
|
2800
|
+
rows: {
|
|
2801
|
+
value: string;
|
|
2802
|
+
overridden: boolean;
|
|
2803
|
+
key: NgccThemeColorToken;
|
|
2804
|
+
label: string;
|
|
2805
|
+
description: string;
|
|
2806
|
+
category: _assistanz_carbideui.NgccThemeColorCategoryId;
|
|
2807
|
+
derived: boolean;
|
|
2808
|
+
cssVars: readonly string[];
|
|
2809
|
+
}[];
|
|
2810
|
+
modified: number;
|
|
2811
|
+
id: _assistanz_carbideui.NgccThemeColorCategoryId;
|
|
2812
|
+
label: string;
|
|
2813
|
+
description: string;
|
|
2814
|
+
}[]>;
|
|
2815
|
+
protected readonly nothingMatches: _angular_core.Signal<boolean>;
|
|
2816
|
+
protected readonly modifiedCount: _angular_core.Signal<number>;
|
|
2817
|
+
protected readonly themeHasOverrides: _angular_core.Signal<boolean>;
|
|
2818
|
+
/** The color being edited on the right. Falls back to the first listed color. */
|
|
2819
|
+
protected readonly selectedKey: _angular_core.WritableSignal<NgccThemeColorToken | null>;
|
|
2820
|
+
protected readonly selectedRow: _angular_core.Signal<{
|
|
2821
|
+
value: string;
|
|
2822
|
+
overridden: boolean;
|
|
2823
|
+
key: NgccThemeColorToken;
|
|
2824
|
+
label: string;
|
|
2825
|
+
description: string;
|
|
2826
|
+
category: _assistanz_carbideui.NgccThemeColorCategoryId;
|
|
2827
|
+
derived: boolean;
|
|
2828
|
+
cssVars: readonly string[];
|
|
2829
|
+
}>;
|
|
2830
|
+
/** A paste-ready override for the selected color (static colors only). */
|
|
2831
|
+
protected readonly selectedSnippet: _angular_core.Signal<string>;
|
|
2832
|
+
/** Arrow keys move between tabs (roving tabindex). */
|
|
2833
|
+
protected onTabKeydown(event: KeyboardEvent): void;
|
|
2834
|
+
/** Text field draft; follows the real brand color whenever it changes elsewhere. */
|
|
2835
|
+
protected readonly hexDraft: _angular_core.WritableSignal<string>;
|
|
2836
|
+
protected readonly hexInvalid: _angular_core.Signal<boolean>;
|
|
2837
|
+
protected readonly errorCount: _angular_core.Signal<number>;
|
|
2838
|
+
protected readonly warningCount: _angular_core.Signal<number>;
|
|
2839
|
+
/** Screen-reader announcement for the last action */
|
|
2840
|
+
protected readonly announcement: _angular_core.WritableSignal<string>;
|
|
2841
|
+
protected readonly transferText: _angular_core.WritableSignal<string>;
|
|
2842
|
+
protected readonly transferError: _angular_core.WritableSignal<boolean>;
|
|
2843
|
+
protected onPickerInput(value: string): void;
|
|
2844
|
+
protected onHexInput(value: string): void;
|
|
2845
|
+
protected selectPreset(preset: NgccBrandPreset): void;
|
|
2846
|
+
protected isActivePreset(preset: NgccBrandPreset): boolean;
|
|
2847
|
+
protected onBaseThemeChange(theme: CarbonThemeName): void;
|
|
2848
|
+
/** Live while dragging the picker. */
|
|
2849
|
+
protected onThemeColorInput(token: NgccThemeColorToken, value: string): void;
|
|
2850
|
+
/** Typed hex applies on commit (blur/Enter); an invalid value is reverted. */
|
|
2851
|
+
protected onThemeColorCommit(token: NgccThemeColorToken, event: Event): void;
|
|
2852
|
+
protected resetThemeColor(token: NgccThemeColorToken): void;
|
|
2853
|
+
protected resetThemeColors(): void;
|
|
2854
|
+
protected onWcagLevelChange(level: string): void;
|
|
2855
|
+
protected onAutoAdjustChange(enabled: boolean): void;
|
|
2223
2856
|
protected resetOverrides(): void;
|
|
2857
|
+
protected selectCarbon(): void;
|
|
2858
|
+
protected applyColorPreset(preset: NgccColorThemePreset): void;
|
|
2859
|
+
protected copyToken(name: string): Promise<void>;
|
|
2860
|
+
protected copySnippet(): Promise<void>;
|
|
2861
|
+
protected copyCss(): Promise<void>;
|
|
2862
|
+
protected copyConfig(): Promise<void>;
|
|
2863
|
+
protected applyConfig(): void;
|
|
2864
|
+
private copy;
|
|
2865
|
+
private announce;
|
|
2224
2866
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<NgccColorThemeSwitcher, never>;
|
|
2225
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<NgccColorThemeSwitcher, "ngcc-color-theme-switcher", never, { "defaultColor": { "alias": "defaultColor"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
2867
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<NgccColorThemeSwitcher, "ngcc-color-theme-switcher", never, { "defaultColor": { "alias": "defaultColor"; "required": false; "isSignal": true; }; "presets": { "alias": "presets"; "required": false; "isSignal": true; }; "showAccessibility": { "alias": "showAccessibility"; "required": false; "isSignal": true; }; "showAdvanced": { "alias": "showAdvanced"; "required": false; "isSignal": true; }; "showThemeColors": { "alias": "showThemeColors"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
2226
2868
|
}
|
|
2227
2869
|
|
|
2870
|
+
/**
|
|
2871
|
+
* Configure theming app-wide, in `app.config.ts`:
|
|
2872
|
+
* `providers: [provideNgccTheme({ defaultTheme: 'g10', defaultCornerStyle: 'rounded' })]`
|
|
2873
|
+
*
|
|
2874
|
+
* The theme is applied at app start-up. You don't need a switcher on the page, nothing has to
|
|
2875
|
+
* inject the service first.
|
|
2876
|
+
*/
|
|
2877
|
+
declare function provideNgccTheme(config?: Partial<NgccThemeConfig>): EnvironmentProviders;
|
|
2878
|
+
/**
|
|
2879
|
+
* Choose the app's color theme, in `app.config.ts`:
|
|
2880
|
+
* `providers: [provideNgccColorTheme({ defaultPreset: 'ocean' })]`
|
|
2881
|
+
*
|
|
2882
|
+
* Applied at app start-up. A user's saved customization still wins, and "Reset to Defaults"
|
|
2883
|
+
* returns to this preset.
|
|
2884
|
+
*/
|
|
2885
|
+
declare function provideNgccColorTheme(options?: NgccColorThemeOptions): EnvironmentProviders;
|
|
2886
|
+
|
|
2228
2887
|
/**
|
|
2229
2888
|
* Signals-based, SSR-safe i18n service for Angular applications.
|
|
2230
2889
|
* Provides translation functionality with lazy loading, caching, fallback language support,
|
|
@@ -3126,6 +3785,12 @@ declare class NgccTile {
|
|
|
3126
3785
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<NgccTile, "ngcc-tile", never, { "heading": { "alias": "heading"; "required": false; "isSignal": true; }; "href": { "alias": "href"; "required": false; "isSignal": true; }; "clickable": { "alias": "clickable"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "light": { "alias": "light"; "required": false; "isSignal": true; }; }, { "activated": "activated"; }, never, ["[ngccTileHeader]", "[ngccTileAction]", "*", "[ngccTileFooter]"], true, never>;
|
|
3127
3786
|
}
|
|
3128
3787
|
|
|
3788
|
+
type NgccSparklineType = 'line' | 'area' | 'bar';
|
|
3789
|
+
type NgccSparklineStatus = 'none' | 'success' | 'warning' | 'error' | 'info';
|
|
3790
|
+
/** Whether a rising series is good (revenue), bad (cost, errors) or has no judgement. */
|
|
3791
|
+
type NgccSparklineSentiment = 'positive-up' | 'positive-down' | 'neutral';
|
|
3792
|
+
type NgccSparklineTrend = 'up' | 'down' | 'flat';
|
|
3793
|
+
|
|
3129
3794
|
type NgccStatTrend = 'up' | 'down' | 'flat';
|
|
3130
3795
|
type NgccStatStatus = 'none' | 'success' | 'warning' | 'error' | 'info';
|
|
3131
3796
|
/** Whether a rising value is good (revenue) or bad (cost, errors). */
|
|
@@ -3144,42 +3809,302 @@ declare class NgccStatTile {
|
|
|
3144
3809
|
readonly trend: _angular_core.InputSignal<NgccStatTrend | undefined>;
|
|
3145
3810
|
readonly trendSentiment: _angular_core.InputSignal<NgccStatTrendSentiment>;
|
|
3146
3811
|
readonly status: _angular_core.InputSignal<NgccStatStatus>;
|
|
3812
|
+
/** A short series (oldest first) drawn under the value as a trend. */
|
|
3813
|
+
readonly sparkline: _angular_core.InputSignal<readonly number[]>;
|
|
3814
|
+
readonly sparklineType: _angular_core.InputSignal<NgccSparklineType>;
|
|
3815
|
+
/** Overrides the generated text alternative (e.g. "Last 12 months, revenue"). */
|
|
3816
|
+
readonly sparklineLabel: _angular_core.InputSignal<string>;
|
|
3817
|
+
readonly sparklineWidth: _angular_core.InputSignal<number>;
|
|
3818
|
+
readonly sparklineHeight: _angular_core.InputSignal<number>;
|
|
3819
|
+
protected readonly hasSparkline: _angular_core.Signal<boolean>;
|
|
3147
3820
|
protected readonly hasDelta: _angular_core.Signal<boolean>;
|
|
3148
3821
|
protected readonly resolvedTrend: _angular_core.Signal<NgccStatTrend>;
|
|
3149
3822
|
protected readonly accentColor: _angular_core.Signal<string | null>;
|
|
3150
3823
|
protected readonly deltaColor: _angular_core.Signal<"var(--cds-support-success)" | "var(--cds-support-error)" | null>;
|
|
3151
3824
|
protected readonly deltaAriaLabel: _angular_core.Signal<string>;
|
|
3152
3825
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<NgccStatTile, never>;
|
|
3153
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<NgccStatTile, "ngcc-stat-tile", never, { "label": { "alias": "label"; "required": true; "isSignal": true; }; "value": { "alias": "value"; "required": true; "isSignal": true; }; "unit": { "alias": "unit"; "required": false; "isSignal": true; }; "delta": { "alias": "delta"; "required": false; "isSignal": true; }; "deltaCaption": { "alias": "deltaCaption"; "required": false; "isSignal": true; }; "trend": { "alias": "trend"; "required": false; "isSignal": true; }; "trendSentiment": { "alias": "trendSentiment"; "required": false; "isSignal": true; }; "status": { "alias": "status"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
3826
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<NgccStatTile, "ngcc-stat-tile", never, { "label": { "alias": "label"; "required": true; "isSignal": true; }; "value": { "alias": "value"; "required": true; "isSignal": true; }; "unit": { "alias": "unit"; "required": false; "isSignal": true; }; "delta": { "alias": "delta"; "required": false; "isSignal": true; }; "deltaCaption": { "alias": "deltaCaption"; "required": false; "isSignal": true; }; "trend": { "alias": "trend"; "required": false; "isSignal": true; }; "trendSentiment": { "alias": "trendSentiment"; "required": false; "isSignal": true; }; "status": { "alias": "status"; "required": false; "isSignal": true; }; "sparkline": { "alias": "sparkline"; "required": false; "isSignal": true; }; "sparklineType": { "alias": "sparklineType"; "required": false; "isSignal": true; }; "sparklineLabel": { "alias": "sparklineLabel"; "required": false; "isSignal": true; }; "sparklineWidth": { "alias": "sparklineWidth"; "required": false; "isSignal": true; }; "sparklineHeight": { "alias": "sparklineHeight"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
3154
3827
|
}
|
|
3155
3828
|
|
|
3156
|
-
|
|
3157
|
-
|
|
3158
|
-
|
|
3159
|
-
|
|
3160
|
-
|
|
3161
|
-
|
|
3162
|
-
readonly pending: "blue";
|
|
3163
|
-
readonly warning: "purple";
|
|
3164
|
-
readonly error: "red";
|
|
3165
|
-
readonly stopped: "gray";
|
|
3166
|
-
readonly unknown: "cool-gray";
|
|
3167
|
-
};
|
|
3829
|
+
interface NgccSparklineBar {
|
|
3830
|
+
x: number;
|
|
3831
|
+
y: number;
|
|
3832
|
+
width: number;
|
|
3833
|
+
height: number;
|
|
3834
|
+
}
|
|
3168
3835
|
/**
|
|
3169
|
-
*
|
|
3170
|
-
*
|
|
3836
|
+
* A tiny trend graphic for KPI tiles and table rows. Pure SVG (no chart library), so dozens can
|
|
3837
|
+
* sit on one dashboard cheaply. It has a text alternative generated from the data, a loading
|
|
3838
|
+
* skeleton, and an explicit "no data" state.
|
|
3839
|
+
*
|
|
3840
|
+
* Color: `color` wins, then `status`, then `sentiment` (up/down from the first to the last
|
|
3841
|
+
* value), then the theme's interactive color, so it follows any color theme.
|
|
3171
3842
|
*/
|
|
3172
|
-
declare class
|
|
3173
|
-
|
|
3174
|
-
readonly
|
|
3175
|
-
readonly
|
|
3176
|
-
|
|
3177
|
-
readonly
|
|
3178
|
-
readonly
|
|
3179
|
-
|
|
3180
|
-
|
|
3181
|
-
|
|
3182
|
-
|
|
3843
|
+
declare class NgccSparkline {
|
|
3844
|
+
/** The series, oldest first. Non-finite values are ignored. */
|
|
3845
|
+
readonly data: _angular_core.InputSignal<readonly number[]>;
|
|
3846
|
+
readonly type: _angular_core.InputSignal<NgccSparklineType>;
|
|
3847
|
+
/** Drawing width in px; the graphic shrinks to fit narrower containers. */
|
|
3848
|
+
readonly width: _angular_core.InputSignal<number>;
|
|
3849
|
+
readonly height: _angular_core.InputSignal<number>;
|
|
3850
|
+
/** Fix the scale (e.g. 0–100 for percentages). Defaults to the data range. */
|
|
3851
|
+
readonly min: _angular_core.InputSignal<number | undefined>;
|
|
3852
|
+
readonly max: _angular_core.InputSignal<number | undefined>;
|
|
3853
|
+
readonly status: _angular_core.InputSignal<NgccSparklineStatus>;
|
|
3854
|
+
readonly sentiment: _angular_core.InputSignal<NgccSparklineSentiment>;
|
|
3855
|
+
/** Any CSS color; overrides status and sentiment. */
|
|
3856
|
+
readonly color: _angular_core.InputSignal<string>;
|
|
3857
|
+
/** Dot on the latest value (line and area). */
|
|
3858
|
+
readonly showLastPoint: _angular_core.InputSignal<boolean>;
|
|
3859
|
+
/** Accessible name. Defaults to a summary built from the data. */
|
|
3860
|
+
readonly label: _angular_core.InputSignal<string>;
|
|
3861
|
+
/** Hide from assistive technology, e.g. when the surrounding text already says it. */
|
|
3862
|
+
readonly decorative: _angular_core.InputSignal<boolean>;
|
|
3863
|
+
readonly loading: _angular_core.InputSignal<boolean>;
|
|
3864
|
+
readonly emptyLabel: _angular_core.InputSignal<string>;
|
|
3865
|
+
protected readonly values: _angular_core.Signal<number[]>;
|
|
3866
|
+
protected readonly isEmpty: _angular_core.Signal<boolean>;
|
|
3867
|
+
protected readonly trend: _angular_core.Signal<NgccSparklineTrend>;
|
|
3868
|
+
protected readonly resolvedColor: _angular_core.Signal<string>;
|
|
3869
|
+
private readonly domain;
|
|
3870
|
+
private y;
|
|
3871
|
+
private x;
|
|
3872
|
+
private readonly coords;
|
|
3873
|
+
private static round;
|
|
3874
|
+
protected readonly linePath: _angular_core.Signal<string>;
|
|
3875
|
+
protected readonly areaPath: _angular_core.Signal<string>;
|
|
3876
|
+
protected readonly lastPoint: _angular_core.Signal<{
|
|
3877
|
+
x: number;
|
|
3878
|
+
y: number;
|
|
3879
|
+
} | null>;
|
|
3880
|
+
protected readonly bars: _angular_core.Signal<NgccSparklineBar[]>;
|
|
3881
|
+
protected readonly baselineY: _angular_core.Signal<number>;
|
|
3882
|
+
/** Text alternative: the label, or a summary of the series. */
|
|
3883
|
+
protected readonly accessibleName: _angular_core.Signal<string>;
|
|
3884
|
+
protected readonly widthPx: _angular_core.Signal<string>;
|
|
3885
|
+
protected readonly heightPx: _angular_core.Signal<string>;
|
|
3886
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<NgccSparkline, never>;
|
|
3887
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<NgccSparkline, "ngcc-sparkline", never, { "data": { "alias": "data"; "required": false; "isSignal": true; }; "type": { "alias": "type"; "required": false; "isSignal": true; }; "width": { "alias": "width"; "required": false; "isSignal": true; }; "height": { "alias": "height"; "required": false; "isSignal": true; }; "min": { "alias": "min"; "required": false; "isSignal": true; }; "max": { "alias": "max"; "required": false; "isSignal": true; }; "status": { "alias": "status"; "required": false; "isSignal": true; }; "sentiment": { "alias": "sentiment"; "required": false; "isSignal": true; }; "color": { "alias": "color"; "required": false; "isSignal": true; }; "showLastPoint": { "alias": "showLastPoint"; "required": false; "isSignal": true; }; "label": { "alias": "label"; "required": false; "isSignal": true; }; "decorative": { "alias": "decorative"; "required": false; "isSignal": true; }; "loading": { "alias": "loading"; "required": false; "isSignal": true; }; "emptyLabel": { "alias": "emptyLabel"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
3888
|
+
}
|
|
3889
|
+
|
|
3890
|
+
/**
|
|
3891
|
+
* Page header: breadcrumbs, the page's one `<h1>`, a description and an action area.
|
|
3892
|
+
*
|
|
3893
|
+
* Slots (content projection):
|
|
3894
|
+
* - `[ngccPageActions]` — buttons on the right of the title (stack under it on narrow screens)
|
|
3895
|
+
* - `[ngccPageMeta]` — extra line under the description (status tag, last updated…)
|
|
3896
|
+
* - `[ngccPageTabs]` — tabs along the bottom edge
|
|
3897
|
+
*
|
|
3898
|
+
* Every module page should render exactly one of these, so each page has one heading and a
|
|
3899
|
+
* consistent place for its primary action.
|
|
3900
|
+
*/
|
|
3901
|
+
declare class NgccPageHeader {
|
|
3902
|
+
readonly title: _angular_core.InputSignal<string>;
|
|
3903
|
+
readonly description: _angular_core.InputSignal<string>;
|
|
3904
|
+
readonly breadcrumbs: _angular_core.InputSignal<NgccBreadcrumbItem[]>;
|
|
3905
|
+
readonly breadcrumbLabel: _angular_core.InputSignal<string>;
|
|
3906
|
+
/** Shows a skeleton in place of the title while it is being fetched. */
|
|
3907
|
+
readonly loading: _angular_core.InputSignal<boolean>;
|
|
3908
|
+
/** Set when you project `[ngccPageTabs]`, so the header drops its bottom padding. */
|
|
3909
|
+
readonly hasTabs: _angular_core.InputSignal<boolean>;
|
|
3910
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<NgccPageHeader, never>;
|
|
3911
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<NgccPageHeader, "ngcc-page-header", never, { "title": { "alias": "title"; "required": true; "isSignal": true; }; "description": { "alias": "description"; "required": false; "isSignal": true; }; "breadcrumbs": { "alias": "breadcrumbs"; "required": false; "isSignal": true; }; "breadcrumbLabel": { "alias": "breadcrumbLabel"; "required": false; "isSignal": true; }; "loading": { "alias": "loading"; "required": false; "isSignal": true; }; "hasTabs": { "alias": "hasTabs"; "required": false; "isSignal": true; }; }, {}, never, ["[ngccPageMeta]", "[ngccPageActions]", "[ngccPageTabs]"], true, never>;
|
|
3912
|
+
}
|
|
3913
|
+
|
|
3914
|
+
interface NgccStep {
|
|
3915
|
+
/** Stable id, used to track the step across re-renders. Defaults to the index. */
|
|
3916
|
+
id?: string;
|
|
3917
|
+
label: string;
|
|
3918
|
+
/** Small text under the label, e.g. "Optional". */
|
|
3919
|
+
secondaryLabel?: string;
|
|
3920
|
+
/** Marks the step as having an error; shown instead of "complete". */
|
|
3921
|
+
invalid?: boolean;
|
|
3922
|
+
disabled?: boolean;
|
|
3923
|
+
}
|
|
3924
|
+
type NgccStepState = 'complete' | 'current' | 'incomplete' | 'invalid';
|
|
3925
|
+
|
|
3926
|
+
interface NgccStepView {
|
|
3927
|
+
step: NgccStep;
|
|
3928
|
+
index: number;
|
|
3929
|
+
state: NgccStepState;
|
|
3930
|
+
reachable: boolean;
|
|
3931
|
+
stateLabel: string;
|
|
3932
|
+
key: string | number;
|
|
3933
|
+
}
|
|
3934
|
+
/**
|
|
3935
|
+
* Stepper / progress indicator for multi-step create flows.
|
|
3936
|
+
*
|
|
3937
|
+
* `current` is the zero-based index of the active step (two-way bindable). Steps before it are
|
|
3938
|
+
* complete, steps after it incomplete; a step marked `invalid` shows the error state. By default
|
|
3939
|
+
* (`linear`) only completed steps and the current one can be clicked; set `linear` to `false` to
|
|
3940
|
+
* allow jumping anywhere.
|
|
3941
|
+
*
|
|
3942
|
+
* An `invalid` step stays reachable even when it is behind the current one, so users can go back
|
|
3943
|
+
* and fix it. Each reachable step is a normal button in the tab order (no roving tabindex).
|
|
3944
|
+
*
|
|
3945
|
+
* Accessible: an ordered list in a labelled `nav`, `aria-current="step"` on the active step, and
|
|
3946
|
+
* each state is spelled out in hidden text (never color alone).
|
|
3947
|
+
*/
|
|
3948
|
+
declare class NgccStepper {
|
|
3949
|
+
readonly steps: _angular_core.InputSignal<readonly NgccStep[]>;
|
|
3950
|
+
/** Zero-based index of the active step. */
|
|
3951
|
+
readonly current: _angular_core.ModelSignal<number>;
|
|
3952
|
+
readonly vertical: _angular_core.InputSignal<boolean>;
|
|
3953
|
+
/** Only completed steps and the current one are clickable. Turn off to allow any step. */
|
|
3954
|
+
readonly linear: _angular_core.InputSignal<boolean>;
|
|
3955
|
+
readonly ariaLabel: _angular_core.InputSignal<string>;
|
|
3956
|
+
/** Emits the step navigated to, whether by clicking it or through `next()` / `previous()`. */
|
|
3957
|
+
readonly stepChange: _angular_core.OutputEmitterRef<{
|
|
3958
|
+
index: number;
|
|
3959
|
+
step: NgccStep;
|
|
3960
|
+
}>;
|
|
3961
|
+
protected readonly views: _angular_core.Signal<NgccStepView[]>;
|
|
3962
|
+
/** 1-based "Step 2 of 4" text, handy for a live region or a mobile summary. */
|
|
3963
|
+
readonly summary: _angular_core.Signal<string>;
|
|
3964
|
+
protected go(view: NgccStepView): void;
|
|
3965
|
+
next(): void;
|
|
3966
|
+
previous(): void;
|
|
3967
|
+
private moveTo;
|
|
3968
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<NgccStepper, never>;
|
|
3969
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<NgccStepper, "ngcc-stepper", never, { "steps": { "alias": "steps"; "required": true; "isSignal": true; }; "current": { "alias": "current"; "required": false; "isSignal": true; }; "vertical": { "alias": "vertical"; "required": false; "isSignal": true; }; "linear": { "alias": "linear"; "required": false; "isSignal": true; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; "isSignal": true; }; }, { "current": "currentChange"; "stepChange": "stepChange"; }, never, never, true, never>;
|
|
3970
|
+
}
|
|
3971
|
+
|
|
3972
|
+
type NgccAvatarSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
3973
|
+
type NgccAvatarShape = 'circle' | 'square';
|
|
3974
|
+
/** Diameter in px for each size. */
|
|
3975
|
+
declare const NGCC_AVATAR_SIZES: Record<NgccAvatarSize, number>;
|
|
3976
|
+
/** "Ada Lovelace" -> "AL", "ada" -> "A", "" -> "". */
|
|
3977
|
+
declare function ngccInitials(name: string): string;
|
|
3978
|
+
|
|
3979
|
+
/**
|
|
3980
|
+
* User or client avatar: a photo when `src` loads, otherwise initials on a color that is stable
|
|
3981
|
+
* for that name, otherwise a person icon.
|
|
3982
|
+
*
|
|
3983
|
+
* Accessible name is the `name`. Set `decorative` when the name is printed next to it.
|
|
3984
|
+
*/
|
|
3985
|
+
declare class NgccAvatar {
|
|
3986
|
+
readonly name: _angular_core.InputSignal<string>;
|
|
3987
|
+
readonly src: _angular_core.InputSignal<string>;
|
|
3988
|
+
readonly size: _angular_core.InputSignal<NgccAvatarSize>;
|
|
3989
|
+
readonly shape: _angular_core.InputSignal<NgccAvatarShape>;
|
|
3990
|
+
/** Hide from assistive technology, e.g. when the name is shown beside the avatar. */
|
|
3991
|
+
readonly decorative: _angular_core.InputSignal<boolean>;
|
|
3992
|
+
protected readonly failed: _angular_core.WritableSignal<boolean>;
|
|
3993
|
+
protected readonly px: _angular_core.Signal<number>;
|
|
3994
|
+
protected readonly fontPx: _angular_core.Signal<number>;
|
|
3995
|
+
protected readonly iconSize: _angular_core.Signal<"sm" | "lg">;
|
|
3996
|
+
protected readonly initials: _angular_core.Signal<string>;
|
|
3997
|
+
protected readonly showImage: _angular_core.Signal<boolean>;
|
|
3998
|
+
protected readonly background: _angular_core.Signal<"#8a3ffc" | "#6929c4" | "#9f1853" | "#005d5d" | "#0043ce" | "#00539a" | "#0e6027" | "#a2191f" | "var(--cds-icon-secondary, #525252)">;
|
|
3999
|
+
protected readonly accessibleName: _angular_core.Signal<string>;
|
|
4000
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<NgccAvatar, never>;
|
|
4001
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<NgccAvatar, "ngcc-avatar", never, { "name": { "alias": "name"; "required": false; "isSignal": true; }; "src": { "alias": "src"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "shape": { "alias": "shape"; "required": false; "isSignal": true; }; "decorative": { "alias": "decorative"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
4002
|
+
}
|
|
4003
|
+
|
|
4004
|
+
type NgccPopoverPlacement = 'top' | 'top-start' | 'top-end' | 'bottom' | 'bottom-start' | 'bottom-end' | 'left' | 'left-start' | 'left-end' | 'right' | 'right-start' | 'right-end';
|
|
4005
|
+
/** `click` toggles on click; `hover` opens on hover and keyboard focus. */
|
|
4006
|
+
type NgccPopoverTrigger = 'click' | 'hover';
|
|
4007
|
+
|
|
4008
|
+
/**
|
|
4009
|
+
* Non-modal popover for detail panels: anchored to a trigger, no backdrop, the page stays usable.
|
|
4010
|
+
*
|
|
4011
|
+
* ```html
|
|
4012
|
+
* <ngcc-popover label="Cluster details" placement="bottom-start">
|
|
4013
|
+
* <button ngccPopoverTrigger class="cds--btn cds--btn--ghost">Details</button>
|
|
4014
|
+
* <p>Region eu-west-1, 12 nodes</p>
|
|
4015
|
+
* </ngcc-popover>
|
|
4016
|
+
* ```
|
|
4017
|
+
*
|
|
4018
|
+
* The element marked `ngccPopoverTrigger` gets `aria-expanded`, `aria-controls` and
|
|
4019
|
+
* `aria-haspopup="dialog"`. Escape and a click outside close it (Escape returns focus to the
|
|
4020
|
+
* trigger). The content follows the trigger in tab order, so keyboard users reach it naturally.
|
|
4021
|
+
* With `trigger="hover"` it also opens on keyboard focus, and the content stays open while the
|
|
4022
|
+
* pointer is over it.
|
|
4023
|
+
*/
|
|
4024
|
+
declare class NgccPopover {
|
|
4025
|
+
private readonly host;
|
|
4026
|
+
/** Two-way: whether the popover is showing. */
|
|
4027
|
+
readonly open: _angular_core.ModelSignal<boolean>;
|
|
4028
|
+
readonly placement: _angular_core.InputSignal<NgccPopoverPlacement>;
|
|
4029
|
+
readonly trigger: _angular_core.InputSignal<NgccPopoverTrigger>;
|
|
4030
|
+
/** Accessible name of the popover content (what it is about). */
|
|
4031
|
+
readonly label: _angular_core.InputSignal<string>;
|
|
4032
|
+
readonly caret: _angular_core.InputSignal<boolean>;
|
|
4033
|
+
readonly closeOnOutsideClick: _angular_core.InputSignal<boolean>;
|
|
4034
|
+
protected readonly contentId: string;
|
|
4035
|
+
protected readonly hostClasses: _angular_core.Signal<string>;
|
|
4036
|
+
constructor();
|
|
4037
|
+
private triggerEl;
|
|
4038
|
+
private fromTrigger;
|
|
4039
|
+
protected onHostClick(event: Event): void;
|
|
4040
|
+
protected onEnter(): void;
|
|
4041
|
+
protected onLeave(): void;
|
|
4042
|
+
protected onFocusIn(): void;
|
|
4043
|
+
protected onFocusOut(event: FocusEvent): void;
|
|
4044
|
+
protected onEscape(event: Event): void;
|
|
4045
|
+
protected onDocumentClick(event: Event): void;
|
|
4046
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<NgccPopover, never>;
|
|
4047
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<NgccPopover, "ngcc-popover", never, { "open": { "alias": "open"; "required": false; "isSignal": true; }; "placement": { "alias": "placement"; "required": false; "isSignal": true; }; "trigger": { "alias": "trigger"; "required": false; "isSignal": true; }; "label": { "alias": "label"; "required": false; "isSignal": true; }; "caret": { "alias": "caret"; "required": false; "isSignal": true; }; "closeOnOutsideClick": { "alias": "closeOnOutsideClick"; "required": false; "isSignal": true; }; }, { "open": "openChange"; }, never, ["[ngccPopoverTrigger]", "*"], true, never>;
|
|
4048
|
+
}
|
|
4049
|
+
|
|
4050
|
+
/** Space between grid cells: condensed 0.5rem, default 1rem, wide 2rem. */
|
|
4051
|
+
type NgccGridGap = 'condensed' | 'default' | 'wide';
|
|
4052
|
+
declare const NGCC_GRID_GAPS: Record<NgccGridGap, string>;
|
|
4053
|
+
|
|
4054
|
+
/**
|
|
4055
|
+
* Page grid on Carbon's breakpoints: 4 columns below 672px, 8 up to 1055px, 12 above. Direct
|
|
4056
|
+
* children span the full row unless they carry `ngccGridSpan`.
|
|
4057
|
+
*
|
|
4058
|
+
* ```html
|
|
4059
|
+
* <ngcc-page-grid>
|
|
4060
|
+
* <ngcc-stat-tile ngccGridSpan [sm]="4" [md]="4" [lg]="3" .../>
|
|
4061
|
+
* <section ngccGridSpan [lg]="8">chart</section>
|
|
4062
|
+
* <aside ngccGridSpan [lg]="4">activity</aside>
|
|
4063
|
+
* </ngcc-page-grid>
|
|
4064
|
+
* ```
|
|
4065
|
+
*/
|
|
4066
|
+
declare class NgccPageGrid {
|
|
4067
|
+
readonly gap: _angular_core.InputSignal<NgccGridGap>;
|
|
4068
|
+
protected readonly gapValue: _angular_core.Signal<string>;
|
|
4069
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<NgccPageGrid, never>;
|
|
4070
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<NgccPageGrid, "ngcc-page-grid", never, { "gap": { "alias": "gap"; "required": false; "isSignal": true; }; }, {}, never, ["*"], true, never>;
|
|
4071
|
+
}
|
|
4072
|
+
/**
|
|
4073
|
+
* How many columns an item spans at each breakpoint (4 / 8 / 12 column grid). Omitted
|
|
4074
|
+
* breakpoints span the full row. `start` pins the first column at the large breakpoint.
|
|
4075
|
+
*/
|
|
4076
|
+
declare class NgccGridSpanDirective {
|
|
4077
|
+
readonly sm: _angular_core.InputSignal<number | undefined>;
|
|
4078
|
+
readonly md: _angular_core.InputSignal<number | undefined>;
|
|
4079
|
+
readonly lg: _angular_core.InputSignal<number | undefined>;
|
|
4080
|
+
/** 1-based column the item starts at on large screens. */
|
|
4081
|
+
readonly start: _angular_core.InputSignal<number | undefined>;
|
|
4082
|
+
protected cell(span: number | undefined, start?: number): string | null;
|
|
4083
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<NgccGridSpanDirective, never>;
|
|
4084
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<NgccGridSpanDirective, "[ngccGridSpan]", never, { "sm": { "alias": "sm"; "required": false; "isSignal": true; }; "md": { "alias": "md"; "required": false; "isSignal": true; }; "lg": { "alias": "lg"; "required": false; "isSignal": true; }; "start": { "alias": "start"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
4085
|
+
}
|
|
4086
|
+
|
|
4087
|
+
/**
|
|
4088
|
+
* Responsive grid of panels (tiles, stat tiles, charts) that are as tall as the tallest panel in
|
|
4089
|
+
* their row. Columns wrap by themselves: each panel is at least `min` wide, and there are at most
|
|
4090
|
+
* `columns` per row.
|
|
4091
|
+
*
|
|
4092
|
+
* ```html
|
|
4093
|
+
* <ngcc-panel-grid [columns]="3" min="16rem">
|
|
4094
|
+
* <ngcc-tile>…</ngcc-tile>
|
|
4095
|
+
* <ngcc-stat-tile …/>
|
|
4096
|
+
* </ngcc-panel-grid>
|
|
4097
|
+
* ```
|
|
4098
|
+
*/
|
|
4099
|
+
declare class NgccPanelGrid {
|
|
4100
|
+
/** Most panels per row. */
|
|
4101
|
+
readonly columns: _angular_core.InputSignal<number>;
|
|
4102
|
+
/** Narrowest a panel may get before it wraps to the next row. */
|
|
4103
|
+
readonly min: _angular_core.InputSignal<string>;
|
|
4104
|
+
readonly gap: _angular_core.InputSignal<NgccGridGap>;
|
|
4105
|
+
protected readonly gapValue: _angular_core.Signal<string>;
|
|
4106
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<NgccPanelGrid, never>;
|
|
4107
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<NgccPanelGrid, "ngcc-panel-grid", never, { "columns": { "alias": "columns"; "required": false; "isSignal": true; }; "min": { "alias": "min"; "required": false; "isSignal": true; }; "gap": { "alias": "gap"; "required": false; "isSignal": true; }; }, {}, never, ["*"], true, never>;
|
|
3183
4108
|
}
|
|
3184
4109
|
|
|
3185
4110
|
type NgccProgressBarLevel = 'normal' | 'warning' | 'critical' | 'finished';
|
|
@@ -3444,5 +4369,5 @@ declare class NgccOverflowMenu {
|
|
|
3444
4369
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<NgccOverflowMenu, "ngcc-overflow-menu", never, { "items": { "alias": "items"; "required": false; "isSignal": true; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; "isSignal": true; }; "align": { "alias": "align"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "orientation": { "alias": "orientation"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; }, { "itemSelected": "itemSelected"; }, never, never, true, never>;
|
|
3445
4370
|
}
|
|
3446
4371
|
|
|
3447
|
-
export { HttpNgccI18nLoader, ICONS, NGCC_ACCORDION_ALIGN, NGCC_CONTENT_SWITCHER, NGCC_DEFAULT_DATE_PRESETS, NGCC_I18N_CONFIG, NGCC_RADIO_GROUP_TOKEN, NGCC_SIDE_NAV_CONTEXT, NGCC_STATUS_TAG, NgccAccordion, NgccAccordionItem, NgccActivityFeed, NgccBreadcrumbComponent, NgccBreadcrumbItemComponent, NgccButton, NgccCharts, NgccCheckbox, NgccCodeSnippetComponent, NgccColorThemeService, NgccColorThemeSwitcher, NgccContainedList, NgccContainedListActionDirective, NgccContainedListItem, NgccContainedListItemActionDirective, NgccContentSwitcher, NgccContentSwitcherOption, NgccDatePicker, NgccDatePickerCalendar, NgccDateRangePicker, NgccDropdown, NgccEmptyState, NgccFilterBar, NgccGaugeChart, NgccHamburger, NgccHeader, NgccHeaderAction, NgccHeaderGlobal, NgccHeaderItem, NgccHeaderMenu, NgccHeaderMenuItem, NgccHeaderName, NgccHeaderNavigation, NgccHeaderPanel, NgccI18nPipe, NgccI18nService, NgccIcon, NgccInput, NgccLink, NgccModal, NgccNotification, NgccNotificationContainer, NgccNotificationList, NgccOverflowMenu, NgccPagination, NgccProgressBar, NgccRadio, NgccRadioGroup, NgccSideNav, NgccSideNavDivider, NgccSideNavItem, NgccSideNavMenu, NgccSideNavMenuItem, NgccSideNavSection, NgccSkeleton, NgccStatTile, NgccStructuredList, NgccTab, NgccTabHeaders, NgccTable, NgccTableSearchDirective, NgccTableSearchService, NgccTableService, NgccTableSkeleton, NgccTableToolbar, NgccTabs, NgccTabsSkeleton, NgccTag, NgccTextAreaComponent, NgccTile, NgccToast, NgccToastContainer, NgccToggle, NgccTooltip, NotificationService, ToastService, WCAG_CONTRAST, adjustColorForContrast, checkContrast, createAccessibleColorPair, derivePaletteFromBrand, generateColorScale, generateInteractiveStates, getAccessibleTextColor, getAvailableThemes, getContrastRatio, getFocusIndicatorColor, getRelativeLuminance, getThemeBackground, getThemeSecondaryButtonBg, hexToHsl, hexToRgb, hslToHex, hslToRgb, initNgccTheme, isThemeDark, ngccResolveDatePreset, provideNgccI18n, rgbToHex, rgbToHsl, themeMetadata, validateColorToken };
|
|
3448
|
-
export type { AccordionAlign, AccordionSize, CarbonThemeName, DropdownSize, NgccAccessibilityIssue, NgccAccessibleColorPair, NgccActivityFeedVariant, NgccActivityItem, NgccActivityStatus, NgccBreadcrumbItem, NgccBreadcrumbSize, NgccCalendarCell, NgccCodeSnippetType, NgccColorScale, NgccColorThemeConfig, NgccContainedListKind, NgccContainedListSize, NgccContentSwitcherContext, NgccContrastResult, NgccDateFormat, NgccDatePreset, NgccDateRange, NgccDerivedColorPalette, NgccDropdownItem, NgccEmptyStateSize, NgccFilterBarValue, NgccFilterField, NgccFilterOption, NgccHSL, NgccHeaderMenuTrigger, NgccHeaderNavItem, NgccI18nConfig, NgccI18nLoader, NgccIconNameType, NgccInputNumberSize, NgccInputSize, NgccInputType, NgccLinkAriaCurrent, NgccLinkSize, NgccLinkTarget, NgccNotificationConfig, NgccNotificationItem, NgccNotificationSeverity, NgccOverflowMenuItem, NgccOverflowMenuSize, NgccProgressBarLevel, NgccRGB, NgccRadioChange, NgccRadioGroupContext, NgccRadioLabelPlacement, NgccRadioOrientation, NgccSideNavContext, NgccSideNavVariant, NgccStatStatus, NgccStatTrend, NgccStatTrendSentiment, NgccStructuredListColumn, NgccStructuredListRow, NgccTableColumn, NgccTableConfig, NgccTagSize, NgccTagType, NgccTextAreaSize, NgccThemeAccessibilityReport, NgccThemeMetadata, NgccToastConfig, NgccToggleSize, NgccTokenValidationResult, NgccWCAGConfig, NotificationType, SortDirection, TextSize, ToastType, WCAGLevel };
|
|
4372
|
+
export { HttpNgccI18nLoader, ICONS, NGCC_ACCORDION_ALIGN, NGCC_AVATAR_SIZES, NGCC_BRAND_PRESETS, NGCC_BRAND_TOKEN_NAMES, NGCC_BUTTON_ALIGNS, NGCC_BUTTON_ALIGN_OPTIONS, NGCC_COLOR_THEME_OPTIONS, NGCC_COLOR_THEME_PRESETS, NGCC_CONTENT_SWITCHER, NGCC_CORNER_STYLES, NGCC_CORNER_STYLE_OPTIONS, NGCC_DEFAULT_DATE_PRESETS, NGCC_GRID_GAPS, NGCC_I18N_CONFIG, NGCC_RADIO_GROUP_TOKEN, NGCC_SIDE_NAV_CONTEXT, NGCC_STATIC_THEME_COLOR_TOKENS, NGCC_STATUS_TAG, NGCC_THEME_COLOR_CATEGORIES, NGCC_THEME_COLOR_TOKENS, NGCC_THEME_CONFIG, NGCC_THEME_DEFAULTS, NGCC_THEME_NAMES, NGCC_THEME_OPTIONS, NgccAccordion, NgccAccordionItem, NgccActivityFeed, NgccAvatar, NgccBreadcrumbComponent, NgccBreadcrumbItemComponent, NgccButton, NgccChartState, NgccCharts, NgccCheckbox, NgccCodeSnippetComponent, NgccColorThemeService, NgccColorThemeSwitcher, NgccContainedList, NgccContainedListActionDirective, NgccContainedListItem, NgccContainedListItemActionDirective, NgccContentSwitcher, NgccContentSwitcherOption, NgccDatePicker, NgccDatePickerCalendar, NgccDateRangePicker, NgccDropdown, NgccEmptyState, NgccFilterBar, NgccGaugeChart, NgccGridSpanDirective, NgccHamburger, NgccHeader, NgccHeaderAction, NgccHeaderGlobal, NgccHeaderItem, NgccHeaderMenu, NgccHeaderMenuItem, NgccHeaderName, NgccHeaderNavigation, NgccHeaderPanel, NgccI18nPipe, NgccI18nService, NgccIcon, NgccInput, NgccLink, NgccModal, NgccNotification, NgccNotificationContainer, NgccNotificationList, NgccOverflowMenu, NgccPageGrid, NgccPageHeader, NgccPagination, NgccPanelGrid, NgccPopover, NgccProgressBar, NgccRadio, NgccRadioGroup, NgccSideNav, NgccSideNavDivider, NgccSideNavItem, NgccSideNavMenu, NgccSideNavMenuItem, NgccSideNavSection, NgccSkeleton, NgccSparkline, NgccStatTile, NgccStepper, NgccStructuredList, NgccTab, NgccTabHeaders, NgccTable, NgccTableExpandedRowDirective, NgccTableSearchDirective, NgccTableSearchService, NgccTableService, NgccTableSkeleton, NgccTableToolbar, NgccTabs, NgccTabsSkeleton, NgccTag, NgccTextAreaComponent, NgccThemeService, NgccThemeSwitcher, NgccTile, NgccToast, NgccToastContainer, NgccToggle, NgccTooltip, NotificationService, ToastService, WCAG_CONTRAST, adjustColorForContrast, auditNgccColorThemePreset, checkContrast, createAccessibleColorPair, derivePaletteFromBrand, generateColorScale, generateInteractiveStates, getAccessibleTextColor, getAvailableThemes, getContrastRatio, getFocusIndicatorColor, getRelativeLuminance, getThemeBackground, getThemeBaseColor, getThemeSecondaryButtonBg, hexToHsl, hexToRgb, hslToHex, hslToRgb, initNgccTheme, isCarbonThemeName, isDerivedThemeColorToken, isNgccButtonAlign, isNgccCornerStyle, isNgccThemeDark, isNgccThemeName, isThemeColorToken, isThemeDark, ngccComboChartTypes, ngccInitials, ngccResolveDatePreset, normalizeHexColor, provideNgccColorTheme, provideNgccI18n, provideNgccTheme, rankChartData, resolveNgccThemeName, rgbToHex, rgbToHsl, themeBaseColors, themeColorCssVars, themeMetadata, toCarbonThresholds, validateColorToken };
|
|
4373
|
+
export type { AccordionAlign, AccordionSize, BaseThemeNamesType, CarbonThemeName, DropdownSize, NgccAccessibilityIssue, NgccAccessibleColorPair, NgccActivityFeedVariant, NgccActivityItem, NgccActivityStatus, NgccAvatarShape, NgccAvatarSize, NgccBrandPreset, NgccBreadcrumbItem, NgccBreadcrumbSize, NgccButtonAlign, NgccButtonAlignOption, NgccCalendarCell, NgccCarbonThemeName, NgccChartOptionMap, NgccChartOptions, NgccChartSort, NgccChartThreshold, NgccChartType, NgccChartsArgs, NgccCodeSnippetType, NgccColorScale, NgccColorThemeConfig, NgccColorThemeOptions, NgccColorThemePreset, NgccColorThemeSnapshot, NgccContainedListKind, NgccContainedListSize, NgccContentSwitcherContext, NgccContrastResult, NgccCornerStyle, NgccCornerStyleOption, NgccDateFormat, NgccDatePreset, NgccDateRange, NgccDerivedColorPalette, NgccDerivedThemeColorToken, NgccDropdownItem, NgccEmptyStateSize, NgccFilterBarValue, NgccFilterField, NgccFilterOption, NgccGridGap, NgccHSL, NgccHeaderMenuTrigger, NgccHeaderNavItem, NgccI18nConfig, NgccI18nLoader, NgccIconNameType, NgccInputNumberSize, NgccInputSize, NgccInputType, NgccLegacyThemeName, NgccLinkAriaCurrent, NgccLinkSize, NgccLinkTarget, NgccNotificationConfig, NgccNotificationItem, NgccNotificationSeverity, NgccOverflowMenuItem, NgccOverflowMenuSize, NgccPopoverPlacement, NgccPopoverTrigger, NgccPresetAuditIssue, NgccProgressBarLevel, NgccRGB, NgccRadioChange, NgccRadioGroupContext, NgccRadioLabelPlacement, NgccRadioOrientation, NgccResolvedLegacyTheme, NgccSideNavContext, NgccSideNavVariant, NgccSparklineSentiment, NgccSparklineStatus, NgccSparklineTrend, NgccSparklineType, NgccStatStatus, NgccStatTrend, NgccStatTrendSentiment, NgccStaticThemeColorToken, NgccStep, NgccStepState, NgccStructuredListColumn, NgccStructuredListRow, NgccTableColumn, NgccTableConfig, NgccTagSize, NgccTagType, NgccTextAreaSize, NgccThemeAccessibilityReport, NgccThemeColorCategory, NgccThemeColorCategoryId, NgccThemeColorOverrides, NgccThemeColorToken, NgccThemeColorTokenDef, NgccThemeConfig, NgccThemeMetadata, NgccThemeOption, NgccThemeStorage, NgccToastConfig, NgccToggleSize, NgccTokenValidationResult, NgccWCAGConfig, NotificationType, SortDirection, TextSize, ToastType, WCAGLevel };
|