@akcelik/strct 6.0.1 → 6.0.2

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": "@akcelik/strct",
3
- "version": "6.0.1",
3
+ "version": "6.0.2",
4
4
  "description": "UIStruct — a standalone Angular component library with a tokenised, multi-palette theme system, built for datacenter / infrastructure management UIs.",
5
5
  "author": "Serkan Akcelik <serkan.akcelik@gmail.com>",
6
6
  "license": "MIT",
package/styles/_base.scss CHANGED
@@ -197,8 +197,14 @@ kbd,
197
197
  it, an instruction a pointer user never needs. In flow and 1x1, so it never
198
198
  extends a page's scrollable area the way an out-of-flow box can. The
199
199
  library had this inlined in five components. */
200
+ /* Read, never seen — and never in the layout. It was an inline-block 1x1
201
+ box, which is still a box: in a flex or grid container it took a slot and
202
+ moved what was beside it (a hidden heading shifted the landing page's
203
+ cards; the datagrid's announcer had to carry its own copy of this rule for
204
+ the same reason). Out of flow it costs the layout nothing, and the clip
205
+ keeps it unseen. */
200
206
  .strct-sr-only {
201
- display: inline-block;
207
+ position: absolute;
202
208
  width: 1px;
203
209
  height: 1px;
204
210
  overflow: hidden;
@@ -667,7 +667,12 @@ export declare class StrctHeaderAction {
667
667
  };
668
668
  }, {}, never, never, true, never>;
669
669
  }
670
- /** Top application bar. Holds brand on the left and actions on the right. */
670
+ /**
671
+ * Top application bar. Holds brand on the left and actions on the right.
672
+ *
673
+ * It is the page's `banner` landmark, so the brand and header actions are
674
+ * inside a landmark a screen reader can jump to. Use one per page.
675
+ */
671
676
  export declare class StrctHeader {
672
677
  /** Accessible label of the mobile drawer toggle. */
673
678
  readonly drawerToggleAriaLabel: import("@angular/core").InputSignal<string>;
@@ -722,7 +727,10 @@ export declare class StrctHeader {
722
727
  };
723
728
  }, {}, ["actions"], ["*"], true, never>;
724
729
  }
725
- /** Bottom status bar. */
730
+ /**
731
+ * Bottom status bar. It is the page's `contentinfo` landmark, so its text is
732
+ * inside a landmark a screen reader can jump to. Use one per page.
733
+ */
726
734
  export declare class StrctFooter {
727
735
  static ɵfac: i0.ɵɵFactoryDeclaration<StrctFooter, never>;
728
736
  static ɵcmp: i0.ɵɵComponentDeclaration<StrctFooter, "strct-footer", never, {}, {}, never, ["*"], true, never>;
@@ -4169,8 +4177,18 @@ export declare class StrctSearchbox implements ControlValueAccessor {
4169
4177
  readonly trigger: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
4170
4178
  /** Show the × clear button when there is a value. */
4171
4179
  readonly clearable: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
4172
- /** Accessible label; falls back to `placeholder`. */
4180
+ /**
4181
+ * Accessible label; falls back to `placeholder`.
4182
+ *
4183
+ * In trigger mode the button's name always starts with what it shows — the
4184
+ * label, then the hint chip — and this is added after them as the spoken
4185
+ * form ("Search ⌘K, Ctrl or Cmd K"). An ariaLabel that already starts with
4186
+ * the label is taken as the full name. WCAG 2.5.3 (label in name): a voice
4187
+ * user says the words they see, so those words must be in the name.
4188
+ */
4173
4189
  readonly ariaLabel: import("@angular/core").InputSignal<string>;
4190
+ /** The trigger button's name: the visible text first, then the extra words. */
4191
+ protected readonly triggerName: import("@angular/core").Signal<string>;
4174
4192
  /** Accessible label of the clear button (localizable). */
4175
4193
  readonly clearLabel: import("@angular/core").InputSignal<string>;
4176
4194
  /** Current text (two-way; also drives the CVA value). */
@@ -4256,7 +4274,11 @@ export declare class StrctCopy {
4256
4274
  readonly text: import("@angular/core").InputSignal<string>;
4257
4275
  /** Optional visible label next to the icon (icon-only by default). */
4258
4276
  readonly label: import("@angular/core").InputSignal<string>;
4259
- /** Accessible label; falls back to `copyLabel`. */
4277
+ /**
4278
+ * Accessible label; falls back to the visible `label`, then `copyLabel`.
4279
+ * With a visible label, keep it in the name (WCAG 2.5.3, label in name): a
4280
+ * button that shows "Copy UUID" but is named "Copy" cannot be voice-clicked.
4281
+ */
4260
4282
  readonly ariaLabel: import("@angular/core").InputSignal<string>;
4261
4283
  /** Localizable strings. */
4262
4284
  readonly copyLabel: import("@angular/core").InputSignal<string>;
@@ -5381,6 +5403,23 @@ export declare class StrctRating implements ControlValueAccessor {
5381
5403
  export declare class StrctChips implements ControlValueAccessor {
5382
5404
  /** Placeholder text when empty. */
5383
5405
  readonly placeholder: import("@angular/core").InputSignal<string>;
5406
+ /**
5407
+ * Accessible name of the text field. Outside a `strct-field` it falls back
5408
+ * to `placeholder`; inside one, the field's `<label for>` names it and the
5409
+ * placeholder stays a placeholder.
5410
+ */
5411
+ readonly ariaLabel: import("@angular/core").InputSignal<string>;
5412
+ /**
5413
+ * Inside a `strct-field`, whose `<label for>` names the text field.
5414
+ *
5415
+ * Asked through DI rather than with `closest('strct-field')`: projected
5416
+ * content is not under the field in the DOM yet when this class is built,
5417
+ * so the DOM answered no while the template said yes — and the fallback
5418
+ * below then overrode the field's visible label with the placeholder's
5419
+ * wording (WCAG 2.5.3). The element injector follows the template the
5420
+ * consumer wrote, so it answers correctly even in a view inserted later.
5421
+ */
5422
+ protected readonly inField: boolean;
5384
5423
  /** Allow duplicate tags. */
5385
5424
  readonly allowDuplicates: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
5386
5425
  readonly value: import("@angular/core").WritableSignal<string[]>;
@@ -5403,6 +5442,11 @@ export declare class StrctChips implements ControlValueAccessor {
5403
5442
  "required": false;
5404
5443
  "isSignal": true;
5405
5444
  };
5445
+ "ariaLabel": {
5446
+ "alias": "ariaLabel";
5447
+ "required": false;
5448
+ "isSignal": true;
5449
+ };
5406
5450
  "allowDuplicates": {
5407
5451
  "alias": "allowDuplicates";
5408
5452
  "required": false;
@@ -6538,7 +6582,10 @@ export type SortDir = 'asc' | 'desc';
6538
6582
  /** Every user-visible / assistive string in the grid, overridable for i18n. */
6539
6583
  export interface StrctDatagridLabels {
6540
6584
  row: string;
6585
+ /** Name of the scrolling rows region (prefixed with `caption`, if any). */
6541
6586
  rows: string;
6587
+ /** Name of the pager's navigation landmark (prefixed with `caption`, if any). */
6588
+ pagination: string;
6542
6589
  selected: string;
6543
6590
  selectAll: string;
6544
6591
  /** Base row-checkbox label; superseded by {@link selectRowFor}, which
@@ -6928,7 +6975,12 @@ export declare class StrctDatagrid {
6928
6975
  */
6929
6976
  /** No outer border, radius or shadow — for a grid inside a bordered panel. */
6930
6977
  readonly flush: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
6931
- /** The grid's title, rendered above the header and used as its accessible name. */
6978
+ /**
6979
+ * The grid's title, rendered above the header and used as its accessible
6980
+ * name. It also names the grid's landmarks — "<caption> rows" and
6981
+ * "<caption> pagination" — so several grids on one page are told apart in a
6982
+ * screen reader's landmark list.
6983
+ */
6932
6984
  readonly caption: import("@angular/core").InputSignal<string>;
6933
6985
  /** The user asked for the next slice. */
6934
6986
  readonly loadMore: import("@angular/core").OutputEmitterRef<void>;
@@ -6958,6 +7010,7 @@ export declare class StrctDatagrid {
6958
7010
  protected readonly L: import("@angular/core").Signal<{
6959
7011
  row: string;
6960
7012
  rows: string;
7013
+ pagination: string;
6961
7014
  selected: string;
6962
7015
  selectAll: string;
6963
7016
  selectRow: string;
@@ -6997,6 +7050,8 @@ export declare class StrctDatagrid {
6997
7050
  pageOf: (page: number, pages: number) => string;
6998
7051
  rowsMatch: (shown: number, total: number) => string;
6999
7052
  }>;
7053
+ /** A landmark's name, prefixed with the caption when the grid has one. */
7054
+ protected regionName(base: string): string;
7000
7055
  /**
7001
7056
  * Show a pencil on an editable cell when it is hovered or focused. A mouse
7002
7057
  * user finds an editable cell by double-clicking one; nothing said so.
@@ -7839,12 +7894,24 @@ export declare class StrctStack {
7839
7894
  static ɵfac: i0.ɵɵFactoryDeclaration<StrctStack, never>;
7840
7895
  static ɵcmp: i0.ɵɵComponentDeclaration<StrctStack, "strct-stack", never, {}, {}, never, ["*"], true, never>;
7841
7896
  }
7842
- /** A label + value row. The value is projected content. */
7897
+ /**
7898
+ * A label + value row. The value is projected content.
7899
+ *
7900
+ * Use **`<div strctStackItem>`** inside `strct-stack`: `<dl>` allows only
7901
+ * `dt` / `dd` pairs or `<div>` wrappers as children, so a custom element
7902
+ * between the list and its `dt` / `dd` breaks the content model (axe
7903
+ * `definition-list` / `dlitem`, both serious) — the BUG-49-05 fix
7904
+ * `strct-desc` got in 5.0.1. The element form still renders identically.
7905
+ *
7906
+ * <strct-stack>
7907
+ * <div strctStackItem label="Cluster">Prod-B</div>
7908
+ * </strct-stack>
7909
+ */
7843
7910
  export declare class StrctStackItem {
7844
7911
  /** Label text. */
7845
7912
  readonly label: import("@angular/core").InputSignal<string>;
7846
7913
  static ɵfac: i0.ɵɵFactoryDeclaration<StrctStackItem, never>;
7847
- static ɵcmp: i0.ɵɵComponentDeclaration<StrctStackItem, "strct-stack-item", never, {
7914
+ static ɵcmp: i0.ɵɵComponentDeclaration<StrctStackItem, "strct-stack-item, div[strctStackItem]", never, {
7848
7915
  "label": {
7849
7916
  "alias": "label";
7850
7917
  "required": true;
@@ -9933,6 +10000,15 @@ export declare class StrctSplitter {
9933
10000
  readonly vertical: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
9934
10001
  /** Accessible name of the separator (localizable). */
9935
10002
  readonly gutterLabel: import("@angular/core").InputSignal<string>;
10003
+ /**
10004
+ * What the separator announces while the pane is collapsed (localizable).
10005
+ * A `separator` may not carry `aria-expanded` (axe `aria-allowed-attr`,
10006
+ * critical), so the state is its value text, beside a value of 0. For CSS
10007
+ * the gutter carries `data-collapsed`; the collapsed pane keeps its
10008
+ * `.strct-split__pane--collapsed` class, which is what this component
10009
+ * styles by.
10010
+ */
10011
+ readonly collapsedLabel: import("@angular/core").InputSignal<string>;
9936
10012
  /** Keyboard nudge step in percent. */
9937
10013
  readonly step: import("@angular/core").InputSignal<number>;
9938
10014
  /** The effective bounds, in whichever unit the splitter is measured in. */
@@ -10004,6 +10080,11 @@ export declare class StrctSplitter {
10004
10080
  "required": false;
10005
10081
  "isSignal": true;
10006
10082
  };
10083
+ "collapsedLabel": {
10084
+ "alias": "collapsedLabel";
10085
+ "required": false;
10086
+ "isSignal": true;
10087
+ };
10007
10088
  "step": {
10008
10089
  "alias": "step";
10009
10090
  "required": false;
@@ -10040,6 +10121,8 @@ export declare class StrctResizeHandle {
10040
10121
  readonly collapsible: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
10041
10122
  /** Whether it is collapsed (two-way). */
10042
10123
  readonly collapsed: import("@angular/core").ModelSignal<boolean>;
10124
+ /** What the handle announces while collapsed (localizable). */
10125
+ readonly collapsedLabel: import("@angular/core").InputSignal<string>;
10043
10126
  /**
10044
10127
  * Which side of the handle the sized pane is on. `'before'` (default) grows
10045
10128
  * the pane as the pointer moves toward the inline/block end.
@@ -10096,6 +10179,11 @@ export declare class StrctResizeHandle {
10096
10179
  "required": false;
10097
10180
  "isSignal": true;
10098
10181
  };
10182
+ "collapsedLabel": {
10183
+ "alias": "collapsedLabel";
10184
+ "required": false;
10185
+ "isSignal": true;
10186
+ };
10099
10187
  "side": {
10100
10188
  "alias": "side";
10101
10189
  "required": false;
@@ -10744,6 +10832,8 @@ export declare class StrctReorderItem {
10744
10832
  protected readonly list: StrctReorder;
10745
10833
  private readonly el;
10746
10834
  private readonly hadOwnTabindex;
10835
+ /** Whether the element's role takes aria-posinset / aria-setsize. */
10836
+ protected readonly inSet: boolean;
10747
10837
  protected hostTabindex(): number | null;
10748
10838
  /** The keys that apply: the sideways pair only when there is somewhere to go. */
10749
10839
  protected shortcuts(): string;