@gravionlabs/helix-ui 22.2.13 → 22.2.15

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gravionlabs/helix-ui",
3
- "version": "22.2.13",
3
+ "version": "22.2.15",
4
4
  "description": "Helix UI: vanilla Angular components on the Helix design tokens — plain CSS, no runtime styling engine.",
5
5
  "license": "MIT",
6
6
  "keywords": [
package/styles.css CHANGED
@@ -1453,11 +1453,15 @@
1453
1453
  -webkit-mask: var(--hx-check) center/contain no-repeat;
1454
1454
  transform: scale(0);
1455
1455
  transition: transform var(--h-checkbox-transition-duration);
1456
- --hx-check: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m3 7.5 2.8 2.8L11 4.5'/%3E%3C/svg%3E");
1456
+ --hx-check: url(
1457
+ "data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m3 7.5 2.8 2.8L11 4.5'/%3E%3C/svg%3E"
1458
+ );
1457
1459
  }
1458
1460
 
1459
1461
  .hx-checkbox:indeterminate::before {
1460
- --hx-check: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M3 7h8'/%3E%3C/svg%3E");
1462
+ --hx-check: url(
1463
+ "data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M3 7h8'/%3E%3C/svg%3E"
1464
+ );
1461
1465
  }
1462
1466
 
1463
1467
  .hx-checkbox:checked,
@@ -3484,9 +3488,7 @@
3484
3488
  }
3485
3489
 
3486
3490
  /* invalid */
3487
- .hx-float-label:has(> [aria-invalid=true],
3488
- > .ng-invalid.ng-touched,
3489
- > .hx-select-invalid) > label {
3491
+ .hx-float-label:has(> [aria-invalid=true], > .ng-invalid.ng-touched, > .hx-select-invalid) > label {
3490
3492
  color: var(--h-floatlabel-invalid-color);
3491
3493
  }
3492
3494
 
@@ -114,14 +114,6 @@ interface HxOption<V = unknown> {
114
114
  value: V;
115
115
  disabled: boolean;
116
116
  }
117
- /** How values are compared to find the chosen option: `Object.is` unless the app passes its own. */
118
- declare const compareValues$1: (a: unknown, b: unknown) => boolean;
119
- /**
120
- * Turns the `options` input of a component into `{ label, value, disabled }` entries. A primitive is its own
121
- * label and value; an object is read through the accessors (a property name or a function). A missing label is
122
- * an empty string, a missing value is the object itself, a missing `disabled` is `false`.
123
- */
124
- declare function resolveOptions<V = unknown>(options: readonly unknown[], label: Accessor<never, string>, value: Accessor<never, unknown>, disabled: Accessor<never, boolean>): HxOption<V>[];
125
117
  type HxAutoCompleteSize = 'small' | 'medium' | 'large';
126
118
  /** The event of `(complete)`: the text to find suggestions for. */
127
119
  interface HxAutoCompleteEvent {
@@ -1874,16 +1866,6 @@ interface HxDateTimeRangePreset {
1874
1866
  interface HxDateTimeRangePresetContext {
1875
1867
  firstDayOfWeek: number;
1876
1868
  }
1877
- /** The ends of a preset as a picker takes them: `null` for an empty end, `undefined` when the picker refuses one. */
1878
- type HxPresetFit = (date: Date, side: 'from' | 'to') => Date | null | undefined;
1879
- /**
1880
- * Reads a preset against the current time and fits each end with `fit` (the day only without a time, refused on a
1881
- * disabled day, ...); ends that come out reversed are ordered. `undefined` when `fit` refuses an end.
1882
- */
1883
- declare function hxResolvePreset(preset: HxDateTimeRangePreset, context: HxDateTimeRangePresetContext, fit: HxPresetFit): {
1884
- from: Date | null;
1885
- to: Date | null;
1886
- } | undefined;
1887
1869
  /** The ids of the built-in presets; `hxDateRangePresets` takes a label per id. */
1888
1870
  type HxDateRangePresetId = 'last15Minutes' | 'last1Hour' | 'last6Hours' | 'last24Hours' | 'last7Days' | 'last30Days' | 'today' | 'yesterday' | 'thisWeek' | 'thisMonth';
1889
1871
  /**
@@ -1898,27 +1880,6 @@ export declare const HX_DATE_RANGE_PRESETS: readonly HxDateTimeRangePreset[];
1898
1880
  /** The day-based built-in presets (no time of day) for a picker without time pickers: Today, Last 7 days, This month. */
1899
1881
  export declare const HX_DATE_RANGE_DAY_PRESETS: readonly HxDateTimeRangePreset[];
1900
1882
  type CalendarView = 'day' | 'month' | 'year';
1901
- interface DisabledRules {
1902
- min?: Date | null;
1903
- max?: Date | null;
1904
- disabledDates?: readonly Date[];
1905
- }
1906
- /** `2026-9-5`, the `data-date` of a day button. */
1907
- declare function dateKey(date: Date): string;
1908
- /** Whether a day lies outside `min`..`max` (by day) or is one of `disabledDates`. */
1909
- declare function isDateDisabled(date: Date, rules: DisabledRules): boolean;
1910
- /** Whether a day lies strictly between the two dates of a complete range. */
1911
- declare function isInRange(date: Date, selected: readonly Date[], mode: string): boolean;
1912
- /** The focused day after the previous (`-1`) or next (`1`) button of the header: a month, a year or 12 years. */
1913
- declare function stepFocus(view: CalendarView, current: Date, direction: 1 | -1): Date;
1914
- /** The focused day after choosing a month (`0` to `11`) in the month view. */
1915
- declare function focusMonth(current: Date, month: number): Date;
1916
- /** The focused day after choosing a year in the year view. */
1917
- declare function focusYear(current: Date, year: number): Date;
1918
- /** The 12 years of the page that holds `year`. */
1919
- declare function decadeOf(year: number): number[];
1920
- /** The day a key of the day grid moves the focus to, or `null` for a key that does nothing. */
1921
- declare function dayKeyTarget(key: string, date: Date, firstDayOfWeek: number, shift?: boolean): Date | null;
1922
1883
  type HxDatePickerSelectionMode = 'single' | 'range' | 'multiple';
1923
1884
  type HxDatePickerValue = Date | Date[] | null;
1924
1885
  /**
@@ -2262,13 +2223,10 @@ interface HxQuickSelectLabels {
2262
2223
  unitsAgo: Record<HxDateMathUnit, string>;
2263
2224
  unitsFromNow: Record<HxDateMathUnit, string>;
2264
2225
  }
2265
- declare const QUICK_SELECT_UNITS: readonly HxDateMathUnit[];
2266
2226
  /** The English texts of the quick select (the default of `quickSelectLabels`). */
2267
2227
  export declare const HX_QUICK_SELECT_LABELS: HxQuickSelectLabels;
2268
2228
  /** The default "Commonly used" list (as in Kibana). */
2269
2229
  export declare const HX_QUICK_SELECT_COMMONLY_USED: readonly HxQuickSelectRange[];
2270
- /** How many ranges the "Recently used" list keeps. */
2271
- declare const RECENT_MAX = 5;
2272
2230
  /** The state of one side (start or end) in the quick select: its tab and the fields of the Relative tab. */
2273
2231
  interface QuickSelectSide {
2274
2232
  mode: 'absolute' | 'relative' | 'now';
@@ -2282,23 +2240,9 @@ interface QuickSelectSide {
2282
2240
  /** An expression from outside that the fields cannot show (`now-1d/d+2h`); used as is until a field changes. */
2283
2241
  raw: string | null;
2284
2242
  }
2285
- declare const DEFAULT_SIDE: QuickSelectSide;
2286
2243
  /** A side of the range: `from` (Start) or `to` (End). */
2287
2244
  type Side = 'from' | 'to';
2288
2245
  type SideMode = QuickSelectSide['mode'];
2289
- /** The tabs of a side, in their order. */
2290
- declare const SIDE_MODES: readonly SideMode[];
2291
- declare const ABSOLUTE_SIDES: Readonly<Record<Side, QuickSelectSide>>;
2292
- /**
2293
- * The side state for an expression: `now` is the Now tab, `now-15m`, `now+2d/d` or `now/w` the Relative tab,
2294
- * another valid date math expression the Relative tab with `raw`; anything else (an ISO date) is absolute.
2295
- */
2296
- declare function sideFromExpression(expression: string): QuickSelectSide;
2297
- /**
2298
- * The date math expression of a relative or now side (`now-15m`, `now+2d/d`); `null` for an absolute side and for
2299
- * a relative side whose amount is empty, not a number or negative (it is not taken as `now`).
2300
- */
2301
- declare function sideExpression(side: QuickSelectSide): string | null;
2302
2246
  /**
2303
2247
  * Resolves one side: date math against `now` (rounding up for the end), else an ISO date-time; a date-only ISO
2304
2248
  * text (`2026-10-14`) is local midnight, as `new Date(2026, 9, 14)`, not UTC. `null` when unreadable.
@@ -2319,25 +2263,6 @@ export declare function hxResolveRangeExpression(range: HxDateRangeExpression, o
2319
2263
  from: Date | null;
2320
2264
  to: Date | null;
2321
2265
  };
2322
- /**
2323
- * The one-line summary of a relative or now side (`~ 15 minutes ago`, `now`, `~ 2 days from now, rounded to the
2324
- * day`); a raw expression as is, `emptySide` for an amount that gives no expression. `null` for an absolute side.
2325
- */
2326
- declare function describeSide(side: QuickSelectSide, labels: HxQuickSelectLabels): string | null;
2327
- /**
2328
- * A label for a range: the label of a commonly used range with the same expressions, `Last 15 minutes` /
2329
- * `Next 2 days`, else both sides (`now-1d/d - now`, absolute sides through `formatDate`).
2330
- */
2331
- declare function describeRange(range: HxDateRangeExpression, labels: HxQuickSelectLabels, common: readonly HxQuickSelectRange[], formatDate: (date: Date) => string, separator?: string): string;
2332
- /**
2333
- * The recently used ranges stored under `key`: empty when nothing (valid) is stored, `null` when there is no key
2334
- * or the storage cannot be read (blocked), so the caller can keep its in-memory list.
2335
- */
2336
- declare function readRecentRanges(key: string | null): HxDateRangeExpression[] | null;
2337
- /** Stores the recently used ranges; does nothing when storage is blocked or full. */
2338
- declare function writeRecentRanges(key: string | null, ranges: readonly HxDateRangeExpression[]): void;
2339
- /** Puts `range` first, drops an equal older entry and keeps at most `max` entries. */
2340
- declare function addRecentRange(ranges: readonly HxDateRangeExpression[], range: HxDateRangeExpression, max?: number): HxDateRangeExpression[];
2341
2266
  /** The value of `hx-date-range-quick-select`: the resolved start and end (`null` while a side is empty). */
2342
2267
  interface HxDateRangeQuickSelectValue {
2343
2268
  from: Date | null;
@@ -2631,48 +2556,11 @@ export declare class HxDateRangeQuickSelect implements ControlValueAccessor, For
2631
2556
  "touch": "touch";
2632
2557
  }, never, never, true, never>;
2633
2558
  }
2634
- type TimeUnit = 'hour' | 'minute' | 'second' | 'period';
2635
- interface TimeColumn {
2636
- unit: TimeUnit;
2637
- label: string;
2638
- now: number;
2639
- min: number;
2640
- max: number;
2641
- text: string;
2642
- valueText: string;
2643
- }
2644
2559
  interface TimeOfDay {
2645
2560
  hours: number;
2646
2561
  minutes: number;
2647
2562
  seconds: number;
2648
2563
  }
2649
- interface TimeColumnOptions {
2650
- hour12: boolean;
2651
- showMinutes: boolean;
2652
- showSeconds: boolean;
2653
- locale?: string;
2654
- labels: {
2655
- hour: string;
2656
- minute: string;
2657
- second: string;
2658
- period: string;
2659
- };
2660
- }
2661
- interface TimeSteps {
2662
- hour: number;
2663
- minute: number;
2664
- second: number;
2665
- }
2666
- /** The spinbutton columns of a time row: hour, minute, second, AM/PM as the options ask. */
2667
- declare function buildTimeColumns(time: TimeOfDay, options: TimeColumnOptions): TimeColumn[];
2668
- /** The values a time unit can take: from its minimum in steps, up to its maximum. */
2669
- declare function unitValues(column: TimeColumn, steps: TimeSteps): number[];
2670
- /** The next (`1`) or previous (`-1`) value of a column's steps, wrapping around. */
2671
- declare function nextUnitValue(column: TimeColumn, steps: TimeSteps, direction: 1 | -1): number;
2672
- /** The time with one unit set (in the units shown: 1 to 12 with AM/PM). */
2673
- declare function applyUnit(time: TimeOfDay, unit: TimeUnit, value: number, hour12: boolean): TimeOfDay;
2674
- /** The value a key of a spinbutton jumps to (Page Up/Down, Home, End), or `null` for another key. */
2675
- declare function jumpKeyTarget(key: string, column: TimeColumn, steps: TimeSteps): number | null;
2676
2564
  type HxDateTimePickerValue = Date | null;
2677
2565
  /**
2678
2566
  * A date and time field that opens a calendar with a time row under it (hour, minute, optionally second and AM/PM),
@@ -3487,43 +3375,6 @@ export declare class HxDateTimeRangePicker implements ControlValueAccessor, Form
3487
3375
  }, never, never, true, never>;
3488
3376
  }
3489
3377
  type HxDialogPosition = 'center' | 'top' | 'bottom' | 'left' | 'right' | 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right';
3490
- /**
3491
- * The box of a dialog: a title (the `header`, plus content marked `hxDialogHeader`), the content, a footer (content
3492
- * marked `hxDialogFooter`) and a close button. Used by `hx-dialog` and by the dialogs opened with `HxDialogService`.
3493
- * The close button comes last in the DOM, so the first control of the content gets the focus when the dialog opens.
3494
- */
3495
- declare class HxDialogFrame {
3496
- readonly header: import("@angular/core").InputSignal<string | undefined>;
3497
- readonly titleId: import("@angular/core").InputSignal<string | undefined>;
3498
- readonly closable: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
3499
- readonly closeLabel: import("@angular/core").InputSignal<string>;
3500
- readonly closeClick: import("@angular/core").OutputEmitterRef<void>;
3501
- static ɵfac: i0.ɵɵFactoryDeclaration<HxDialogFrame, never>;
3502
- static ɵcmp: i0.ɵɵComponentDeclaration<HxDialogFrame, "hx-dialog-frame", never, {
3503
- "header": {
3504
- "alias": "header";
3505
- "required": false;
3506
- "isSignal": true;
3507
- };
3508
- "titleId": {
3509
- "alias": "titleId";
3510
- "required": false;
3511
- "isSignal": true;
3512
- };
3513
- "closable": {
3514
- "alias": "closable";
3515
- "required": false;
3516
- "isSignal": true;
3517
- };
3518
- "closeLabel": {
3519
- "alias": "closeLabel";
3520
- "required": false;
3521
- "isSignal": true;
3522
- };
3523
- }, {
3524
- "closeClick": "closeClick";
3525
- }, never, ["[hxDialogHeader]", "*", "[hxDialogFooter]"], true, never>;
3526
- }
3527
3378
  /**
3528
3379
  * A modal or non-modal dialog, on `@angular/cdk/dialog`.
3529
3380
  *
@@ -3668,21 +3519,6 @@ interface HxDialogConfig<D = unknown> {
3668
3519
  /** Accessible name when there is no `header`. */
3669
3520
  ariaLabel?: string;
3670
3521
  }
3671
- interface HostData {
3672
- component: Type<unknown>;
3673
- config: HxDialogConfig;
3674
- ref: HxDialogRef;
3675
- titleId: string;
3676
- }
3677
- /** The inside of a service dialog: a frame around the component that was asked for. */
3678
- declare class HxDialogHost {
3679
- protected readonly data: HostData;
3680
- protected readonly injector: import("@angular/core").DestroyableInjector;
3681
- private readonly outlet;
3682
- constructor();
3683
- static ɵfac: i0.ɵɵFactoryDeclaration<HxDialogHost, never>;
3684
- static ɵcmp: i0.ɵɵComponentDeclaration<HxDialogHost, "hx-dialog-host", never, {}, {}, never, never, true, never>;
3685
- }
3686
3522
  /**
3687
3523
  * Opens a component in a dialog.
3688
3524
  *
@@ -5677,10 +5513,6 @@ export declare class HxRating implements ControlValueAccessor, FormValueControl<
5677
5513
  }
5678
5514
  type HxSelectSize = 'small' | 'medium' | 'large';
5679
5515
  type HxSelectVariant = 'outlined' | 'filled';
5680
- /** The class of the select's list overlay (the CDK pane): a popup holding a select treats it as its own. */
5681
- declare const HX_SELECT_OVERLAY_CLASS = "hx-select-overlay";
5682
- /** Whether `target` lies in the list overlay of an `hx-select` (a click or a focus move into an open list). */
5683
- declare function isInSelectOverlay(target: EventTarget | null | undefined): boolean;
5684
5516
  /** An option as the select works with it, after `optionLabel`/`optionValue`/`optionDisabled` are applied. */
5685
5517
  type HxSelectItem<V = unknown> = HxOption<V>;
5686
5518
  /**
@@ -6725,11 +6557,6 @@ interface HxThemeOptions {
6725
6557
  viewTransition?: boolean;
6726
6558
  }
6727
6559
  export declare const HX_THEME_OPTIONS: InjectionToken<HxThemeOptions>;
6728
- /** A class (`.app-dark`) or an attribute (`[data-theme="dark"]`) selector, split into what the DOM needs. */
6729
- declare function parseDarkSelector(selector: string): {
6730
- css: string;
6731
- apply: (el: Element, on: boolean) => void;
6732
- };
6733
6560
  /**
6734
6561
  * Switches dark mode, the primary colour and the surface scale while the app runs, with CSS custom properties
6735
6562
  * only: no styling engine, no rebuild of the tokens. `tokens.css` defines every `--h-*` token for the Helix look;
@@ -7054,13 +6881,6 @@ export declare class HxToolbar {
7054
6881
  }
7055
6882
  type HxTooltipPosition = 'top' | 'right' | 'bottom' | 'left';
7056
6883
  type HxTooltipEvent = 'hover' | 'focus' | 'both';
7057
- /** The bubble. Created by the directive in a CDK overlay. */
7058
- declare class HxTooltipBubble {
7059
- readonly text: import("@angular/core").WritableSignal<string>;
7060
- id: string;
7061
- static ɵfac: i0.ɵɵFactoryDeclaration<HxTooltipBubble, never>;
7062
- static ɵcmp: i0.ɵɵComponentDeclaration<HxTooltipBubble, "hx-tooltip-bubble", never, {}, {}, never, never, true, never>;
7063
- }
7064
6884
  /**
7065
6885
  * A short text that explains an element, shown on hover and/or keyboard focus (CDK overlay, `role="tooltip"`,
7066
6886
  * `aria-describedby` on the host). Escape closes it. It is a hint, not a place for essential information.