ng-hub-ui-forms 22.9.0 → 22.10.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -4,6 +4,7 @@ import * as i1 from '@angular/forms';
4
4
  import { FormControl, FormControlName, FormControlDirective, Validators, NgControl, ControlContainer, FormsModule, NG_VALUE_ACCESSOR } from '@angular/forms';
5
5
  import { Observable, Subject, takeUntil, tap, animationFrameScheduler, asapScheduler, fromEvent } from 'rxjs';
6
6
  import { NgTemplateOutlet, KeyValuePipe, isPlatformBrowser, DOCUMENT } from '@angular/common';
7
+ import { resolveHubAccent } from 'ng-hub-ui-utils';
7
8
  import { auditTime, tap as tap$1, debounceTime, filter, map } from 'rxjs/operators';
8
9
  import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
9
10
  import * as i1$1 from '@angular/cdk/overlay';
@@ -2017,25 +2018,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.1", ngImpor
2017
2018
  }]
2018
2019
  }] });
2019
2020
 
2020
- /**
2021
- * Resolves a user-supplied accent value to a paintable CSS colour for a `--hub-*-accent` slot.
2022
- *
2023
- * A bareword (a built-in semantic name such as `primary` / `success`, or any registered accent /
2024
- * named CSS colour) becomes a `--hub-sys-color-*` design-system token with the word itself as the
2025
- * raw fallback, so named CSS colours keep working when no token is registered. A literal colour
2026
- * (`#ff0000`, `rgb(...)`, `oklch(...)`, `var(...)`) is passed through unchanged. Empty / whitespace
2027
- * input resolves to `null` so the caller can keep its neutral default.
2028
- *
2029
- * @param value - The raw accent value (e.g. from a `color` input).
2030
- * @returns The resolved CSS colour, or `null` when no accent is provided.
2031
- */
2032
- function resolveHubAccent(value) {
2033
- const color = value?.trim();
2034
- if (!color)
2035
- return null;
2036
- return /^[a-zA-Z][\w-]*$/.test(color) ? `var(--hub-sys-color-${color}, ${color})` : color;
2037
- }
2038
-
2039
2021
  /**
2040
2022
  * Segmented button bar (`hub-segmented`): a compact group of 2..n options rendered as an inline
2041
2023
  * (or vertical) segmented control. A full `ng-hub-ui-forms` field — it extends