@nysds/components 1.16.0-alpha-2 → 1.16.0-alpha3

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.
@@ -25,8 +25,10 @@ export declare class NysGlobalHeader extends LitElement {
25
25
  agencyName: string;
26
26
  /** URL for the header title link. If empty, title is not clickable. */
27
27
  homepageLink: string;
28
- private isMobileMenuOpen;
29
- private hasLinkContent;
28
+ /** Internal state to track mobile menu open/closed status. */
29
+ private _isMobileMenuOpen;
30
+ /** Internal state to track if any navigation links are present in the slot. */
31
+ private _hasLinkContent;
30
32
  /**
31
33
  * Lifecycle Methods
32
34
  * --------------------------------------------------------------------------
@@ -6,6 +6,8 @@ import { LitElement } from "lit";
6
6
  * @slot - Accepts a `<table>` element. Only the first table is rendered.
7
7
  *
8
8
  * @fires nys-click - Fired when the download button or sortable headers are clicked.
9
+ * @fires nys-column-sort - Fired when a sortable column header is clicked. Can be prevented by calling `event.preventDefault()` to override default sort behavior.
10
+ * Detail: { columnIndex: number, columnLabel: string, sortDirection: "asc" | "desc" | "none" }
9
11
  *
10
12
  * @method downloadFile - Triggers download of the CSV file if `download` is set.
11
13
  */
@@ -30,10 +32,19 @@ export declare class NysTable extends LitElement {
30
32
  willUpdate(): void;
31
33
  _addSortIcons(table: HTMLTableElement): void;
32
34
  _updateSortIcons(table: HTMLTableElement): void;
33
- _onSortClick(columnIndex: number, table: HTMLTableElement): void;
35
+ private _onSortClick;
34
36
  _sortTable(table: HTMLTableElement, columnIndex: number, direction: "asc" | "desc"): void;
35
37
  _updateSortedColumnStyles(table: HTMLTableElement): void;
36
38
  downloadFile(): void;
37
39
  /****************** Event Handlers ******************/
40
+ /**
41
+ * Dispatches the `nys-column-sort` custom event.
42
+ *
43
+ * @param columnIndex - Zero-based index of the sorted column.
44
+ * @param columnLabel - The text label of the sorted column header.
45
+ * @param sortDirection - The new sort direction: "asc", "desc", or "none".
46
+ */
47
+ private _emitColumnSortEvent;
48
+ /****************** Render ******************/
38
49
  render(): import("lit-html").TemplateResult<1>;
39
50
  }