@eagami/ui 5.25.0 → 5.26.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eagami/ui",
3
- "version": "5.25.0",
3
+ "version": "5.26.0",
4
4
  "description": "Lightweight, accessible, themeable Angular UI component library and icon set built on CSS custom properties",
5
5
  "author": "Michal Wiraszka <michal@eagami.com>",
6
6
  "license": "MIT",
@@ -166,7 +166,7 @@ $target-size-min: 24px;
166
166
  inset-inline-end: 0;
167
167
  inset-inline-start: 0;
168
168
  height: var(--border-width-thin);
169
- background-color: var(--color-border-default);
169
+ background-color: var(--color-divider);
170
170
  content: '';
171
171
  }
172
172
  }
@@ -115,7 +115,9 @@
115
115
  --color-border-subtle: var(--color-neutral-200);
116
116
  --color-border-default: var(--color-neutral-200);
117
117
  --color-border-strong: var(--color-neutral-400);
118
- --color-divider: var(--color-border-subtle);
118
+ // Dividers are a translucent wash, like the state fills, so hairline rules
119
+ // inside a surface read evenly on base, elevated, and hover tones alike.
120
+ --color-divider: rgba(0, 0, 0, 0.1);
119
121
  --color-border-focus: var(--color-primary-500);
120
122
 
121
123
  // brand-default/-hover/-active are the brand colour as a surface (solid bg
@@ -220,9 +222,8 @@
220
222
  );
221
223
  --color-border-default: var(--color-neutral-400);
222
224
  --color-border-strong: var(--color-neutral-300);
223
- // Dividers read as barely-there against dark surfaces at border-subtle, so
224
- // they step one neutral lighter for a visible-but-quiet rule.
225
- --color-divider: var(--color-neutral-600);
225
+ // Dividers flip to a light wash so the rule stays visible on every dark tier
226
+ --color-divider: rgba(255, 255, 255, 0.12);
226
227
 
227
228
  // Surface roles step one shade lighter than light mode so the button clears
228
229
  // WCAG 1.4.11 (3:1) on the near-black canvas while keeping a white label
@@ -67,7 +67,6 @@ interface EagamiMessages {
67
67
  dialogLabel: string;
68
68
  searchPlaceholder: string;
69
69
  empty: string;
70
- clear: string;
71
70
  };
72
71
  colorPicker: {
73
72
  dialogLabel: string;
@@ -1136,6 +1135,69 @@ declare class CheckboxComponent implements ControlValueAccessor {
1136
1135
  static ɵcmp: _angular_core.ɵɵComponentDeclaration<CheckboxComponent, "ea-checkbox", never, { "label": { "alias": "label"; "required": false; "isSignal": true; }; "count": { "alias": "count"; "required": false; "isSignal": true; }; "hint": { "alias": "hint"; "required": false; "isSignal": true; }; "errorMsg": { "alias": "errorMsg"; "required": false; "isSignal": true; }; "errorMessages": { "alias": "errorMessages"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "required": { "alias": "required"; "required": false; "isSignal": true; }; "indeterminate": { "alias": "indeterminate"; "required": false; "isSignal": true; }; "ariaLabel": { "alias": "aria-label"; "required": false; "isSignal": true; }; "id": { "alias": "id"; "required": false; "isSignal": true; }; "checked": { "alias": "checked"; "required": false; "isSignal": true; }; }, { "checked": "checkedChange"; "changed": "changed"; }, never, never, true, never>;
1137
1136
  }
1138
1137
 
1138
+ /**
1139
+ * Primary classification for an icon component. Every icon ships with a single
1140
+ * `category` (read off the component's `static readonly category` field) plus
1141
+ * a separate `static readonly isBrand` flag for whether it also depicts a
1142
+ * recognisable brand mark.
1143
+ *
1144
+ * `feather`: derived from the upstream Feather Icons set (MIT). Uses Feather's
1145
+ * canonical slug and design.
1146
+ * `eagami`: Eagami UI additions beyond the Feather set: the brand mark, the
1147
+ * basic shape set and household icons, brand-filled variants of
1148
+ * Feather outlines, the coloured brand marks (`isBrand`), and line
1149
+ * icons adapted from Lucide (ISC).
1150
+ */
1151
+ type IconCategory = 'feather' | 'eagami';
1152
+ /**
1153
+ * Shape of the static metadata that every `ea-icon-*` component carries
1154
+ * alongside its template. Read these fields directly off the component class
1155
+ * (e.g. `GithubIconComponent.tags`) to build catalogues, search indices, or
1156
+ * documentation tables without pulling in any other icon as a transitive
1157
+ * dependency.
1158
+ */
1159
+ interface IconMeta {
1160
+ readonly slug: string;
1161
+ readonly category: IconCategory;
1162
+ /** True when the icon depicts a recognisable third-party or Eagami brand mark. */
1163
+ readonly isBrand?: boolean;
1164
+ readonly tags: ReadonlyArray<string>;
1165
+ }
1166
+ /** An icon component class augmented with its static metadata. */
1167
+ type IconComponentType = Type<unknown> & IconMeta;
1168
+ /**
1169
+ * Abstract base class for every `ea-icon-*` component. Provides the shared
1170
+ * host bindings that make icons render as inline-flex 1em squares, so
1171
+ * individual icon components don't need to repeat the `host: { style: '...' }`
1172
+ * config in their `@Component` decorator. Brand icons with their own host
1173
+ * bindings (e.g. a colour binding tied to a `brand` input) layer those onto
1174
+ * this base via additional `@HostBinding` getters.
1175
+ *
1176
+ * Feather-derived icons read the `strokeWidth` input via `[attr.stroke-width]`
1177
+ * in their SVG template, so consumers can thin or thicken any icon at the
1178
+ * call site (e.g. `<ea-icon-star [strokeWidth]="1.5" />`). Subclasses can
1179
+ * change the default by setting `static override readonly defaultStrokeWidth`,
1180
+ * used by icons whose dense paths read better at a different default
1181
+ * (e.g. camera, upload at 1.5).
1182
+ */
1183
+ declare abstract class IconComponentBase {
1184
+ readonly display = "inline-flex";
1185
+ readonly width = "1em";
1186
+ readonly height = "1em";
1187
+ static readonly defaultStrokeWidth: number;
1188
+ readonly strokeWidth: _angular_core.InputSignal<number>;
1189
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<IconComponentBase, never>;
1190
+ static ɵdir: _angular_core.ɵɵDirectiveDeclaration<IconComponentBase, never, never, { "strokeWidth": { "alias": "strokeWidth"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
1191
+ }
1192
+
1193
+ declare class SearchIconComponent extends IconComponentBase {
1194
+ static readonly slug = "search";
1195
+ static readonly category: IconCategory;
1196
+ static readonly tags: ReadonlyArray<string>;
1197
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<SearchIconComponent, never>;
1198
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<SearchIconComponent, "ea-icon-search", never, {}, {}, never, never, true, never>;
1199
+ }
1200
+
1139
1201
  /**
1140
1202
  * A single executable command in an `<ea-command-palette>`.
1141
1203
  *
@@ -1196,11 +1258,17 @@ declare class CommandPaletteComponent {
1196
1258
  readonly open: _angular_core.ModelSignal<boolean>;
1197
1259
  readonly placeholder: _angular_core.InputSignal<string>;
1198
1260
  readonly emptyMessage: _angular_core.InputSignal<string>;
1261
+ /**
1262
+ * Optional predicate that disables every item it returns `true` for, in
1263
+ * addition to each item's own `disabled` flag.
1264
+ */
1265
+ readonly disabledWhen: _angular_core.InputSignal<((item: CommandPaletteItem) => boolean) | undefined>;
1199
1266
  readonly execute: _angular_core.OutputEmitterRef<CommandPaletteItem<unknown>>;
1200
1267
  protected readonly messages: _angular_core.Signal<_eagami_ui.EagamiMessages>;
1201
1268
  protected readonly resolvedPlaceholder: _angular_core.Signal<string>;
1202
1269
  private readonly dialogEl;
1203
1270
  private readonly searchEl;
1271
+ protected readonly searchIcon: typeof SearchIconComponent;
1204
1272
  protected readonly query: _angular_core.WritableSignal<string>;
1205
1273
  protected readonly listboxId: string;
1206
1274
  /**
@@ -1232,6 +1300,7 @@ declare class CommandPaletteComponent {
1232
1300
  protected readonly activeId: _angular_core.Signal<string | null>;
1233
1301
  constructor();
1234
1302
  protected itemDomId(item: CommandPaletteItem): string;
1303
+ protected isItemDisabled(item: CommandPaletteItem): boolean;
1235
1304
  protected isActive(flatIndex: number): boolean;
1236
1305
  /**
1237
1306
  * Whether the active row should render its highlighted background right
@@ -1240,8 +1309,7 @@ declare class CommandPaletteComponent {
1240
1309
  * next-click target).
1241
1310
  */
1242
1311
  protected showActiveHighlight(flatIndex: number): boolean;
1243
- protected onQueryInput(event: Event): void;
1244
- protected clearQuery(): void;
1312
+ protected onQueryChange(value: string): void;
1245
1313
  protected onSearchKeydown(event: KeyboardEvent): void;
1246
1314
  /** Wrapping arrow-key move that skips disabled items. */
1247
1315
  private moveActive;
@@ -1256,7 +1324,7 @@ declare class CommandPaletteComponent {
1256
1324
  private executeItem;
1257
1325
  private scrollActiveIntoView;
1258
1326
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<CommandPaletteComponent, never>;
1259
- static ɵcmp: _angular_core.ɵɵComponentDeclaration<CommandPaletteComponent, "ea-command-palette", never, { "items": { "alias": "items"; "required": true; "isSignal": true; }; "open": { "alias": "open"; "required": false; "isSignal": true; }; "placeholder": { "alias": "placeholder"; "required": false; "isSignal": true; }; "emptyMessage": { "alias": "emptyMessage"; "required": false; "isSignal": true; }; }, { "open": "openChange"; "execute": "execute"; }, never, never, true, never>;
1327
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<CommandPaletteComponent, "ea-command-palette", never, { "items": { "alias": "items"; "required": true; "isSignal": true; }; "open": { "alias": "open"; "required": false; "isSignal": true; }; "placeholder": { "alias": "placeholder"; "required": false; "isSignal": true; }; "emptyMessage": { "alias": "emptyMessage"; "required": false; "isSignal": true; }; "disabledWhen": { "alias": "disabledWhen"; "required": false; "isSignal": true; }; }, { "open": "openChange"; "execute": "execute"; }, never, never, true, never>;
1260
1328
  }
1261
1329
 
1262
1330
  /** Visual size of the color picker trigger. */
@@ -2254,12 +2322,24 @@ declare class InputComponent implements ControlValueAccessor {
2254
2322
  readonly label: _angular_core.InputSignal<string | undefined>;
2255
2323
  /** Accessible name for the control when no visible `label` is set. */
2256
2324
  readonly ariaLabel: _angular_core.InputSignal<string | undefined>;
2325
+ /** ARIA role applied to the native input, e.g. `combobox` for a typeahead host. */
2326
+ readonly role: _angular_core.InputSignal<string | undefined>;
2327
+ /** Expanded state of a controlled popup, forwarded as `aria-expanded`. */
2328
+ readonly ariaExpanded: _angular_core.InputSignal<boolean | undefined>;
2329
+ /** `id` of the popup element the input controls, forwarded as `aria-controls`. */
2330
+ readonly ariaControls: _angular_core.InputSignal<string | undefined>;
2331
+ /** `id` of the active option in a controlled popup, forwarded as `aria-activedescendant`. */
2332
+ readonly ariaActivedescendant: _angular_core.InputSignal<string | null | undefined>;
2333
+ /** Autocomplete behavior hint, forwarded as `aria-autocomplete`. */
2334
+ readonly ariaAutocomplete: _angular_core.InputSignal<"none" | "inline" | "list" | "both" | undefined>;
2257
2335
  /** Native input type; `password` adds a built-in show/hide toggle. */
2258
2336
  readonly type: _angular_core.InputSignal<InputType>;
2259
2337
  /** Placeholder shown while the field is empty. */
2260
2338
  readonly placeholder: _angular_core.InputSignal<string>;
2261
2339
  /** Leading icon component rendered before the text, e.g. a search or filter glyph. */
2262
2340
  readonly icon: _angular_core.InputSignal<Type<unknown> | undefined>;
2341
+ /** Keeps the leading icon while the field has a value; when false it shows only alongside the placeholder. */
2342
+ readonly keepIcon: _angular_core.InputSignal<boolean>;
2263
2343
  /** Visual size of the field. */
2264
2344
  readonly size: _angular_core.InputSignal<EaSize>;
2265
2345
  /** Helper text shown below the field; hidden while an error is showing. */
@@ -2346,7 +2426,7 @@ declare class InputComponent implements ControlValueAccessor {
2346
2426
  /** Moves keyboard focus to the underlying native input element. */
2347
2427
  focus(): void;
2348
2428
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<InputComponent, never>;
2349
- static ɵcmp: _angular_core.ɵɵComponentDeclaration<InputComponent, "ea-input", never, { "label": { "alias": "label"; "required": false; "isSignal": true; }; "ariaLabel": { "alias": "aria-label"; "required": false; "isSignal": true; }; "type": { "alias": "type"; "required": false; "isSignal": true; }; "placeholder": { "alias": "placeholder"; "required": false; "isSignal": true; }; "icon": { "alias": "icon"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "hint": { "alias": "hint"; "required": false; "isSignal": true; }; "errorMsg": { "alias": "errorMsg"; "required": false; "isSignal": true; }; "errorMessages": { "alias": "errorMessages"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "readonly": { "alias": "readonly"; "required": false; "isSignal": true; }; "required": { "alias": "required"; "required": false; "isSignal": true; }; "autocomplete": { "alias": "autocomplete"; "required": false; "isSignal": true; }; "list": { "alias": "list"; "required": false; "isSignal": true; }; "min": { "alias": "min"; "required": false; "isSignal": true; }; "max": { "alias": "max"; "required": false; "isSignal": true; }; "step": { "alias": "step"; "required": false; "isSignal": true; }; "maxLength": { "alias": "maxLength"; "required": false; "isSignal": true; }; "minLength": { "alias": "minLength"; "required": false; "isSignal": true; }; "autofocus": { "alias": "autofocus"; "required": false; "isSignal": true; }; "showPasswordToggle": { "alias": "showPasswordToggle"; "required": false; "isSignal": true; }; "clearable": { "alias": "clearable"; "required": false; "isSignal": true; }; "id": { "alias": "id"; "required": false; "isSignal": true; }; "value": { "alias": "value"; "required": false; "isSignal": true; }; }, { "value": "valueChange"; "focused": "focused"; "blurred": "blurred"; }, never, ["[slot=prefix]", "[slot=suffix]"], true, never>;
2429
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<InputComponent, "ea-input", never, { "label": { "alias": "label"; "required": false; "isSignal": true; }; "ariaLabel": { "alias": "aria-label"; "required": false; "isSignal": true; }; "role": { "alias": "role"; "required": false; "isSignal": true; }; "ariaExpanded": { "alias": "aria-expanded"; "required": false; "isSignal": true; }; "ariaControls": { "alias": "aria-controls"; "required": false; "isSignal": true; }; "ariaActivedescendant": { "alias": "aria-activedescendant"; "required": false; "isSignal": true; }; "ariaAutocomplete": { "alias": "aria-autocomplete"; "required": false; "isSignal": true; }; "type": { "alias": "type"; "required": false; "isSignal": true; }; "placeholder": { "alias": "placeholder"; "required": false; "isSignal": true; }; "icon": { "alias": "icon"; "required": false; "isSignal": true; }; "keepIcon": { "alias": "keepIcon"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "hint": { "alias": "hint"; "required": false; "isSignal": true; }; "errorMsg": { "alias": "errorMsg"; "required": false; "isSignal": true; }; "errorMessages": { "alias": "errorMessages"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "readonly": { "alias": "readonly"; "required": false; "isSignal": true; }; "required": { "alias": "required"; "required": false; "isSignal": true; }; "autocomplete": { "alias": "autocomplete"; "required": false; "isSignal": true; }; "list": { "alias": "list"; "required": false; "isSignal": true; }; "min": { "alias": "min"; "required": false; "isSignal": true; }; "max": { "alias": "max"; "required": false; "isSignal": true; }; "step": { "alias": "step"; "required": false; "isSignal": true; }; "maxLength": { "alias": "maxLength"; "required": false; "isSignal": true; }; "minLength": { "alias": "minLength"; "required": false; "isSignal": true; }; "autofocus": { "alias": "autofocus"; "required": false; "isSignal": true; }; "showPasswordToggle": { "alias": "showPasswordToggle"; "required": false; "isSignal": true; }; "clearable": { "alias": "clearable"; "required": false; "isSignal": true; }; "id": { "alias": "id"; "required": false; "isSignal": true; }; "value": { "alias": "value"; "required": false; "isSignal": true; }; }, { "value": "valueChange"; "focused": "focused"; "blurred": "blurred"; }, never, ["[slot=prefix]", "[slot=suffix]"], true, never>;
2350
2430
  }
2351
2431
 
2352
2432
  /** Placement of the menu list relative to its trigger. */
@@ -4354,61 +4434,6 @@ declare class VirtualListComponent {
4354
4434
  static ɵcmp: _angular_core.ɵɵComponentDeclaration<VirtualListComponent, "ea-virtual-list", never, { "items": { "alias": "items"; "required": true; "isSignal": true; }; "itemHeight": { "alias": "itemHeight"; "required": true; "isSignal": true; }; "viewportHeight": { "alias": "viewportHeight"; "required": true; "isSignal": true; }; "overscan": { "alias": "overscan"; "required": false; "isSignal": true; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; "isSignal": true; }; }, { "scrollIndexChange": "scrollIndexChange"; }, ["itemTemplate"], never, true, never>;
4355
4435
  }
4356
4436
 
4357
- /**
4358
- * Primary classification for an icon component. Every icon ships with a single
4359
- * `category` (read off the component's `static readonly category` field) plus
4360
- * a separate `static readonly isBrand` flag for whether it also depicts a
4361
- * recognisable brand mark.
4362
- *
4363
- * `feather`: derived from the upstream Feather Icons set (MIT). Uses Feather's
4364
- * canonical slug and design.
4365
- * `eagami`: Eagami UI additions beyond the Feather set: the brand mark, the
4366
- * basic shape set and household icons, brand-filled variants of
4367
- * Feather outlines, the coloured brand marks (`isBrand`), and line
4368
- * icons adapted from Lucide (ISC).
4369
- */
4370
- type IconCategory = 'feather' | 'eagami';
4371
- /**
4372
- * Shape of the static metadata that every `ea-icon-*` component carries
4373
- * alongside its template. Read these fields directly off the component class
4374
- * (e.g. `GithubIconComponent.tags`) to build catalogues, search indices, or
4375
- * documentation tables without pulling in any other icon as a transitive
4376
- * dependency.
4377
- */
4378
- interface IconMeta {
4379
- readonly slug: string;
4380
- readonly category: IconCategory;
4381
- /** True when the icon depicts a recognisable third-party or Eagami brand mark. */
4382
- readonly isBrand?: boolean;
4383
- readonly tags: ReadonlyArray<string>;
4384
- }
4385
- /** An icon component class augmented with its static metadata. */
4386
- type IconComponentType = Type<unknown> & IconMeta;
4387
- /**
4388
- * Abstract base class for every `ea-icon-*` component. Provides the shared
4389
- * host bindings that make icons render as inline-flex 1em squares, so
4390
- * individual icon components don't need to repeat the `host: { style: '...' }`
4391
- * config in their `@Component` decorator. Brand icons with their own host
4392
- * bindings (e.g. a colour binding tied to a `brand` input) layer those onto
4393
- * this base via additional `@HostBinding` getters.
4394
- *
4395
- * Feather-derived icons read the `strokeWidth` input via `[attr.stroke-width]`
4396
- * in their SVG template, so consumers can thin or thicken any icon at the
4397
- * call site (e.g. `<ea-icon-star [strokeWidth]="1.5" />`). Subclasses can
4398
- * change the default by setting `static override readonly defaultStrokeWidth`,
4399
- * used by icons whose dense paths read better at a different default
4400
- * (e.g. camera, upload at 1.5).
4401
- */
4402
- declare abstract class IconComponentBase {
4403
- readonly display = "inline-flex";
4404
- readonly width = "1em";
4405
- readonly height = "1em";
4406
- static readonly defaultStrokeWidth: number;
4407
- readonly strokeWidth: _angular_core.InputSignal<number>;
4408
- static ɵfac: _angular_core.ɵɵFactoryDeclaration<IconComponentBase, never>;
4409
- static ɵdir: _angular_core.ɵɵDirectiveDeclaration<IconComponentBase, never, never, { "strokeWidth": { "alias": "strokeWidth"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
4410
- }
4411
-
4412
4437
  /**
4413
4438
  * Resolves an icon's human-readable display name. Pass the component class
4414
4439
  * (`iconDisplayName(GithubIconComponent)` returns `'GitHub'`) or its slug
@@ -6928,14 +6953,6 @@ declare class ScissorsIconComponent extends IconComponentBase {
6928
6953
  static ɵcmp: _angular_core.ɵɵComponentDeclaration<ScissorsIconComponent, "ea-icon-scissors", never, {}, {}, never, never, true, never>;
6929
6954
  }
6930
6955
 
6931
- declare class SearchIconComponent extends IconComponentBase {
6932
- static readonly slug = "search";
6933
- static readonly category: IconCategory;
6934
- static readonly tags: ReadonlyArray<string>;
6935
- static ɵfac: _angular_core.ɵɵFactoryDeclaration<SearchIconComponent, never>;
6936
- static ɵcmp: _angular_core.ɵɵComponentDeclaration<SearchIconComponent, "ea-icon-search", never, {}, {}, never, never, true, never>;
6937
- }
6938
-
6939
6956
  declare class SendIconComponent extends IconComponentBase {
6940
6957
  static readonly slug = "send";
6941
6958
  static readonly category: IconCategory;