@luzmo/lucero 2.4.2 → 2.5.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.
Files changed (116) hide show
  1. package/components/action-menu/index.cjs +1 -1
  2. package/components/action-menu/index.js +1 -1
  3. package/components/{action-menu-CwzRbF61.cjs → action-menu-BNZWjeDd.cjs} +1 -1
  4. package/components/{action-menu-C0sHNsjG.js → action-menu-D1hTsg9A.js} +1 -1
  5. package/components/checkbox/index.cjs +1 -1
  6. package/components/checkbox/index.js +1 -1
  7. package/components/{checkbox-BEjvkjfc.js → checkbox-CydI9yXG.js} +1 -1
  8. package/components/{checkbox-ClVrkeLp.cjs → checkbox-JCvBro0K.cjs} +1 -1
  9. package/components/index.cjs +1 -1
  10. package/components/index.js +11 -10
  11. package/components/match-media-B_0cVVtk.cjs +18 -0
  12. package/components/match-media-C5X2OZiD.js +34 -0
  13. package/components/picker/index.cjs +1 -1
  14. package/components/picker/index.js +1 -1
  15. package/components/picker-COeWCv60.cjs +124 -0
  16. package/components/{picker-D0fMBZLb.js → picker-uKcRswTQ.js} +6 -5
  17. package/components/question-box/index.cjs +1 -1
  18. package/components/question-box/index.js +1 -1
  19. package/components/{question-box-D7YSi_6c.js → question-box-Bcm-P-UV.js} +1 -1
  20. package/components/{question-box-Bdtsgv1k.cjs → question-box-DZnuGMBB.cjs} +1 -1
  21. package/components/select/index.cjs +1 -1
  22. package/components/select/index.js +1 -1
  23. package/components/{select-BUgHi69P.js → select-B86uAHme.js} +5 -4
  24. package/components/select-CKMCEJf7.cjs +158 -0
  25. package/components/strategies-Bb7zEjrU.cjs +18 -0
  26. package/components/{strategies-Cl59wdNZ.js → strategies-COS7mShJ.js} +11 -24
  27. package/components/table/controllers/table-announcer.d.ts +12 -0
  28. package/components/table/controllers/table-column-resize.d.ts +41 -0
  29. package/components/table/controllers/table-grid-navigation.d.ts +28 -0
  30. package/components/table/controllers/table-layout.d.ts +55 -0
  31. package/components/table/controllers/table-row-expansion.d.ts +45 -0
  32. package/components/table/controllers/table-virtualizer.d.ts +42 -0
  33. package/components/table/index.cjs +18 -0
  34. package/components/table/index.d.ts +32 -0
  35. package/components/table/index.js +20 -0
  36. package/components/table/table-body.d.ts +24 -0
  37. package/components/table/table-cell.d.ts +27 -0
  38. package/components/table/table-checkbox-cell.d.ts +41 -0
  39. package/components/table/table-columns.d.ts +45 -0
  40. package/components/table/table-disclosure-cell.d.ts +21 -0
  41. package/components/table/table-head-cell.d.ts +77 -0
  42. package/components/table/table-head.d.ts +34 -0
  43. package/components/table/table-model.d.ts +56 -0
  44. package/components/table/table-row-details.d.ts +29 -0
  45. package/components/table/table-row.d.ts +64 -0
  46. package/components/table/table-styles.d.ts +9 -0
  47. package/components/table/table-templates.d.ts +41 -0
  48. package/components/table/table.d.ts +197 -0
  49. package/components/table/types.d.ts +81 -0
  50. package/components/table-B75GjBhD.js +1592 -0
  51. package/components/table-CHrAaVU1.cjs +180 -0
  52. package/custom-elements.json +1 -1
  53. package/index.d.ts +1 -0
  54. package/package.json +9 -1
  55. package/standalone/accordion.js +1 -1
  56. package/standalone/action-bar.js +1 -1
  57. package/standalone/action-button.js +1 -1
  58. package/standalone/action-menu.js +1 -1
  59. package/standalone/avatar.js +1 -1
  60. package/standalone/calendar.js +1 -1
  61. package/standalone/checkbox.js +1 -1
  62. package/standalone/chunks/{action-button-BzzPBqt5.js → action-button-FSsfXYe9.js} +1 -1
  63. package/standalone/chunks/{button-Dykw3TSO.js → button-Q1n9DH9a.js} +1 -1
  64. package/standalone/chunks/{calendar-ZwUYkzVq.js → calendar-DcFjY2tw.js} +1 -1
  65. package/standalone/chunks/{checkbox-OQtakoP8.js → checkbox-DQ4wPgG_.js} +2 -2
  66. package/standalone/chunks/{clear-button-pVGfwye8.js → clear-button-3zpCVxG5.js} +1 -1
  67. package/standalone/chunks/{close-button-RpPiwBdf.js → close-button-C96dazyi.js} +1 -1
  68. package/standalone/chunks/{color-field-CrCF4kqZ.js → color-field-BFvUGE4L.js} +1 -1
  69. package/standalone/chunks/{color-menu-B5UOMYmX.js → color-menu-BIKuitbH.js} +2 -2
  70. package/standalone/chunks/{icon-Dy6J1QeX.js → icon-BypO7M7G.js} +1 -1
  71. package/standalone/chunks/luzmo-icons-B-pCv-xg.js +13 -0
  72. package/standalone/chunks/match-media-BMi7j6hf.js +2 -0
  73. package/standalone/chunks/{menu-nolJetlp.js → menu-DSMoQt1w.js} +1 -1
  74. package/standalone/chunks/{number-field-C3DYfl1s.js → number-field-B6BDXkL7.js} +3 -3
  75. package/standalone/chunks/{options-BjRSj630.js → options-CkmITqgV.js} +5 -5
  76. package/standalone/chunks/picker-FCQK0vdE.js +108 -0
  77. package/standalone/chunks/{picker-button-BeXTIgUt.js → picker-button-BZWqDoNQ.js} +1 -1
  78. package/standalone/chunks/{segments-factory-Ch3AAizU.js → segments-factory-eS38mJRz.js} +1 -1
  79. package/standalone/chunks/strategies-C-vW4MlK.js +2 -0
  80. package/standalone/chunks/{swatch-m_4GcO2_.js → swatch-CGR_GWqO.js} +1 -1
  81. package/standalone/chunks/{text-field-BnZtyodU.js → text-field-4OKvLOXG.js} +1 -1
  82. package/standalone/chunks/{text-field-BrlDeJsx.js → text-field-C2oROxum.js} +1 -1
  83. package/standalone/clear-button.js +1 -1
  84. package/standalone/close-button.js +1 -1
  85. package/standalone/color-field.js +1 -1
  86. package/standalone/color-menu.js +1 -1
  87. package/standalone/color-picker.js +1 -1
  88. package/standalone/date-range-picker.js +1 -1
  89. package/standalone/date-time-picker.js +1 -1
  90. package/standalone/icon.js +1 -1
  91. package/standalone/manifest.json +22 -20
  92. package/standalone/menu.js +1 -1
  93. package/standalone/multi-language-field.js +1 -1
  94. package/standalone/notice.js +1 -1
  95. package/standalone/number-field.js +1 -1
  96. package/standalone/options.js +1 -1
  97. package/standalone/picker-button.js +1 -1
  98. package/standalone/picker.js +1 -1
  99. package/standalone/progress-steps.js +1 -1
  100. package/standalone/prompt-box.js +9 -9
  101. package/standalone/question-box.js +1 -1
  102. package/standalone/search.js +1 -1
  103. package/standalone/select.js +2 -2
  104. package/standalone/slider.js +1 -1
  105. package/standalone/swatch.js +1 -1
  106. package/standalone/table.js +185 -0
  107. package/standalone/tabs.js +1 -1
  108. package/standalone/tags.js +1 -1
  109. package/standalone/text-field.js +1 -1
  110. package/standalone/toast.js +1 -1
  111. package/components/picker-BliQJlY_.cjs +0 -124
  112. package/components/select-DsGVB01K.cjs +0 -158
  113. package/components/strategies-BwNbUXYS.cjs +0 -18
  114. package/standalone/chunks/luzmo-icons-CJa-aByT.js +0 -13
  115. package/standalone/chunks/picker-hbMQOkUX.js +0 -108
  116. package/standalone/chunks/strategies-kad_0dTB.js +0 -2
@@ -0,0 +1,55 @@
1
+ import type { ReactiveController, ReactiveControllerHost } from 'lit';
2
+ import type { ElementSize } from '../../../utils/sized-mixin';
3
+ import { TableColumnLayout } from '../table-columns';
4
+ import type { LuzmoTableHeadCell } from '../table-head-cell';
5
+ import { TableModel } from '../table-model';
6
+ import { TableColumn, TableItem, TableLabels, TableRenderDetails, TableSelects } from '../types';
7
+ export interface TableLayoutHost extends ReactiveControllerHost, HTMLElement {
8
+ columns: TableColumn[];
9
+ columnWidths: Record<string, number>;
10
+ items?: TableItem[];
11
+ renderDetails?: TableRenderDetails;
12
+ selects?: TableSelects;
13
+ emphasized: boolean;
14
+ size: ElementSize;
15
+ labels: TableLabels;
16
+ selectAllLabel?: string;
17
+ }
18
+ export interface TableLayoutOptions {
19
+ model: TableModel;
20
+ owns: (event: Event) => boolean;
21
+ }
22
+ /**
23
+ * Column tracks and the header/body presentation pass. Subscribes to body
24
+ * scroll so the header stays aligned, and tears that listener down on
25
+ * disconnect.
26
+ */
27
+ export declare class TableLayoutController implements ReactiveController {
28
+ private readonly host;
29
+ private readonly options;
30
+ private bodyObserver?;
31
+ private observedBody?;
32
+ constructor(host: TableLayoutHost, options: TableLayoutOptions);
33
+ hostConnected(): void;
34
+ hostDisconnected(): void;
35
+ hostUpdated(): void;
36
+ hasExpansion(): boolean;
37
+ layouts(): TableColumnLayout[];
38
+ headCells(): LuzmoTableHeadCell[];
39
+ applyGridMetrics(): void;
40
+ syncPresentation(): void;
41
+ syncHeadTabStops(): void;
42
+ private handleBodyScroll;
43
+ private syncHead;
44
+ private watchBodyScrollbar;
45
+ private syncHeadScroll;
46
+ private syncColumns;
47
+ private syncDeclarativeRows;
48
+ private syncGridColumns;
49
+ private isDataMode;
50
+ private slottedHead;
51
+ private head;
52
+ private body;
53
+ private declarativeRows;
54
+ private rows;
55
+ }
@@ -0,0 +1,45 @@
1
+ import type { ReactiveController, ReactiveControllerHost } from 'lit';
2
+ import type { LuzmoTableRowDetails } from '../table-row-details';
3
+ import type { LuzmoTableRow } from '../table-row';
4
+ import { TableLabels } from '../types';
5
+ export declare const tableDetailsClosingSymbol: unique symbol;
6
+ type ExpansionUpdateHost = ReactiveControllerHost & {
7
+ requestUpdate(name?: PropertyKey, oldValue?: unknown): void;
8
+ };
9
+ export interface TableRowExpansionHost extends ExpansionUpdateHost, HTMLElement {
10
+ expanded: string[];
11
+ labels: TableLabels;
12
+ selectAllLabel?: string;
13
+ items?: readonly unknown[];
14
+ }
15
+ export interface TableRowExpansionOptions {
16
+ owns: (event: Event) => boolean;
17
+ focusDisclosure: (element: HTMLElement) => void;
18
+ }
19
+ export declare const detailsForRow: (row: HTMLElement) => LuzmoTableRowDetails | null;
20
+ /**
21
+ * Row details open and close. Owns the closing-animation set, the cancelable
22
+ * toggle event, and the collapsed-event subscription.
23
+ */
24
+ export declare class TableRowExpansionController implements ReactiveController {
25
+ private readonly host;
26
+ private readonly options;
27
+ private closingDetails;
28
+ constructor(host: TableRowExpansionHost, options: TableRowExpansionOptions);
29
+ get closing(): ReadonlySet<string>;
30
+ hostConnected(): void;
31
+ hostDisconnected(): void;
32
+ /** Drops in-progress closing rows when the table changes mode. */
33
+ clear(): void;
34
+ toggle(row: LuzmoTableRow): void;
35
+ collapseFromPath(path: EventTarget[]): void;
36
+ private handleDetailsCollapsed;
37
+ private setClosing;
38
+ private dispatchToggle;
39
+ private expandLabel;
40
+ private rowByValue;
41
+ private isDataMode;
42
+ private declarativeRows;
43
+ private rows;
44
+ }
45
+ export {};
@@ -0,0 +1,42 @@
1
+ import { VirtualItem } from '@tanstack/virtual-core';
2
+ import type { ReactiveController, ReactiveControllerHost } from 'lit';
3
+ import { TableRangeChangedDetail } from '../types';
4
+ export declare const tableVirtualRangeUpdatedSymbol: unique symbol;
5
+ type RangeUpdateHost = ReactiveControllerHost & {
6
+ requestUpdate(name?: PropertyKey, oldValue?: unknown): void;
7
+ };
8
+ export interface TableVirtualizerOptions {
9
+ getScrollElement: () => HTMLElement | null;
10
+ getRowElements: () => HTMLElement[];
11
+ /** Whether a mounted row element has rendered and has its final height. */
12
+ isRendered: (element: HTMLElement) => boolean;
13
+ onRangeChanged: (detail: TableRangeChangedDetail) => void;
14
+ }
15
+ /**
16
+ * Mounts only the visible window of data-mode rows. The scroll element is the
17
+ * generated `luzmo-table-body`; rows are measured through `data-index`.
18
+ */
19
+ export declare class TableVirtualizerController implements ReactiveController {
20
+ private readonly host;
21
+ private readonly options;
22
+ private virtualizer?;
23
+ private cleanup?;
24
+ private connected;
25
+ private keys;
26
+ private range?;
27
+ private estimatedSize;
28
+ constructor(host: RangeUpdateHost, options: TableVirtualizerOptions);
29
+ get enabled(): boolean;
30
+ set enabled(enabled: boolean);
31
+ /** Updates the ordered row keys and returns the rows to mount. */
32
+ sync(keys: string[]): VirtualItem[];
33
+ get totalSize(): number;
34
+ scrollToIndex(index: number): void;
35
+ hostConnected(): void;
36
+ hostUpdated(): void;
37
+ hostDisconnected(): void;
38
+ private syncEstimate;
39
+ private createOptions;
40
+ private reportRange;
41
+ }
42
+ export {};
@@ -0,0 +1,18 @@
1
+ /*! * Lucero - The design system for Luzmo.
2
+ *
3
+ * Copyright © 2026 Luzmo
4
+ * All rights reserved.
5
+ * Lucero (“Luzmo Design System”) must be used according to the Luzmo Terms of Service.
6
+ * This license allows users with a current active Luzmo account to use Lucero.
7
+ * This license terminates automatically if a user no longer has an active Luzmo account.
8
+ * Please view the Luzmo Terms of Service at: https://www.luzmo.com/information-pages/terms-of-use.
9
+ *
10
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
11
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
12
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
13
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
14
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
15
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
16
+ * SOFTWARE.
17
+ * */
18
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`}),require("../tokens.cjs");const e=require("../table-CHrAaVU1.cjs");exports.DEFAULT_TABLE_LABELS=e.u,exports.LuzmoTable=e.c,exports.LuzmoTableBody=e.s,exports.LuzmoTableCell=e.o,exports.LuzmoTableCheckboxCell=e.a,exports.LuzmoTableDisclosureCell=e.n,exports.LuzmoTableHead=e.i,exports.LuzmoTableHeadCell=e.r,exports.LuzmoTableRow=e.t,exports.LuzmoTableRowDetails=e.l;
@@ -0,0 +1,32 @@
1
+ import { LuzmoTable } from './table';
2
+ import { LuzmoTableBody } from './table-body';
3
+ import { LuzmoTableCell } from './table-cell';
4
+ import { LuzmoTableCheckboxCell } from './table-checkbox-cell';
5
+ import { LuzmoTableHead } from './table-head';
6
+ import { LuzmoTableHeadCell } from './table-head-cell';
7
+ import { LuzmoTableDisclosureCell } from './table-disclosure-cell';
8
+ import { LuzmoTableRow } from './table-row';
9
+ import { LuzmoTableRowDetails } from './table-row-details';
10
+ declare global {
11
+ interface HTMLElementTagNameMap {
12
+ 'luzmo-table': LuzmoTable & HTMLElement;
13
+ 'luzmo-table-head': LuzmoTableHead & HTMLElement;
14
+ 'luzmo-table-head-cell': LuzmoTableHeadCell & HTMLElement;
15
+ 'luzmo-table-body': LuzmoTableBody & HTMLElement;
16
+ 'luzmo-table-row': LuzmoTableRow & HTMLElement;
17
+ 'luzmo-table-cell': LuzmoTableCell & HTMLElement;
18
+ 'luzmo-table-checkbox-cell': LuzmoTableCheckboxCell & HTMLElement;
19
+ 'luzmo-table-disclosure-cell': LuzmoTableDisclosureCell & HTMLElement;
20
+ 'luzmo-table-row-details': LuzmoTableRowDetails & HTMLElement;
21
+ }
22
+ }
23
+ export { LuzmoTable } from './table';
24
+ export { LuzmoTableBody } from './table-body';
25
+ export { LuzmoTableCell } from './table-cell';
26
+ export { LuzmoTableCheckboxCell } from './table-checkbox-cell';
27
+ export { LuzmoTableHead } from './table-head';
28
+ export { LuzmoTableHeadCell } from './table-head-cell';
29
+ export { LuzmoTableDisclosureCell } from './table-disclosure-cell';
30
+ export { LuzmoTableRow } from './table-row';
31
+ export { LuzmoTableRowDetails } from './table-row-details';
32
+ export * from './types';
@@ -0,0 +1,20 @@
1
+ /*! * Lucero - The design system for Luzmo.
2
+ *
3
+ * Copyright © 2026 Luzmo
4
+ * All rights reserved.
5
+ * Lucero (“Luzmo Design System”) must be used according to the Luzmo Terms of Service.
6
+ * This license allows users with a current active Luzmo account to use Lucero.
7
+ * This license terminates automatically if a user no longer has an active Luzmo account.
8
+ * Please view the Luzmo Terms of Service at: https://www.luzmo.com/information-pages/terms-of-use.
9
+ *
10
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
11
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
12
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
13
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
14
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
15
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
16
+ * SOFTWARE.
17
+ * */
18
+ import "../tokens.js";
19
+ import { a as e, c as t, i as n, l as r, n as i, o as a, r as o, s, t as c, u as l } from "../table-B75GjBhD.js";
20
+ export { l as DEFAULT_TABLE_LABELS, t as LuzmoTable, s as LuzmoTableBody, a as LuzmoTableCell, e as LuzmoTableCheckboxCell, i as LuzmoTableDisclosureCell, n as LuzmoTableHead, o as LuzmoTableHeadCell, c as LuzmoTableRow, r as LuzmoTableRowDetails };
@@ -0,0 +1,24 @@
1
+ import { CSSResultArray, TemplateResult } from 'lit';
2
+ import { LuzmoElement } from '../../utils/base';
3
+ /**
4
+ * @element luzmo-table-body
5
+ *
6
+ * Becomes a tab stop while its rows overflow, so the scroll region can be
7
+ * reached from the keyboard.
8
+ *
9
+ * @slot - `luzmo-table-row` elements.
10
+ *
11
+ * @fires luzmo-table-body-scroll - The body scroll position changed.
12
+ */
13
+ export declare class LuzmoTableBody extends LuzmoElement {
14
+ static get styles(): CSSResultArray;
15
+ role: string;
16
+ private resizeObserver?;
17
+ private mutationObserver?;
18
+ constructor();
19
+ connectedCallback(): void;
20
+ disconnectedCallback(): void;
21
+ protected render(): TemplateResult;
22
+ private _handleScroll;
23
+ private _syncTabStop;
24
+ }
@@ -0,0 +1,27 @@
1
+ import { CSSResultArray, PropertyValues, TemplateResult } from 'lit';
2
+ import { LuzmoElement } from '../../utils/base';
3
+ /**
4
+ * @element luzmo-table-cell
5
+ *
6
+ * @slot - Cell content.
7
+ *
8
+ * @attr line-clamp - Maximum number of lines before the cell truncates.
9
+ */
10
+ export declare class LuzmoTableCell extends LuzmoElement {
11
+ static get styles(): CSSResultArray;
12
+ role: string;
13
+ /**
14
+ * Maximum number of lines before the cell truncates. Unset wraps.
15
+ * Overrides the column's `lineClamp`.
16
+ */
17
+ lineClamp: number | undefined;
18
+ /**
19
+ * Spans every column. Set on the single cell of an information row.
20
+ * @internal
21
+ */
22
+ spanAll: boolean;
23
+ /** @internal Column default used when `lineClamp` is unset. */
24
+ columnLineClamp: number | undefined;
25
+ protected willUpdate(changes: PropertyValues<this>): void;
26
+ protected render(): TemplateResult;
27
+ }
@@ -0,0 +1,41 @@
1
+ import { CSSResultArray, nothing, PropertyValues, TemplateResult } from 'lit';
2
+ import '../checkbox';
3
+ import { LuzmoElement } from '../../utils/base';
4
+ import type { ElementSize } from '../../utils/sized-mixin';
5
+ /**
6
+ * @element luzmo-table-checkbox-cell
7
+ *
8
+ * Rendered by `luzmo-table-head` and `luzmo-table-row` while the table
9
+ * `selects`. Its `luzmo-checkbox` reports through the table's `change`
10
+ * event.
11
+ *
12
+ * @attr head-cell - Renders the select-all cell of the header row.
13
+ * @attr selects-single - Single selection: the cell leaves the accessibility tree and the tab order. The header renders no checkbox.
14
+ */
15
+ export declare class LuzmoTableCheckboxCell extends LuzmoElement {
16
+ static get styles(): CSSResultArray;
17
+ role: string;
18
+ /**
19
+ * Whether this is the select-all cell of the header row.
20
+ */
21
+ headCell: boolean;
22
+ checked: boolean;
23
+ indeterminate: boolean;
24
+ disabled: boolean;
25
+ selectsSingle: boolean;
26
+ emphasized: boolean;
27
+ /**
28
+ * Accessible name of the checkbox.
29
+ */
30
+ label: string;
31
+ /**
32
+ * Checkbox size, mirrored from the table.
33
+ * @internal
34
+ */
35
+ size: ElementSize;
36
+ private checkbox?;
37
+ constructor();
38
+ protected render(): TemplateResult | typeof nothing;
39
+ protected willUpdate(changes: PropertyValues<this>): void;
40
+ private handleClick;
41
+ }
@@ -0,0 +1,45 @@
1
+ import { TableColumn } from './types';
2
+ export interface TableColumnLayout {
3
+ id: string;
4
+ header: string;
5
+ width?: number;
6
+ minWidth?: number;
7
+ maxWidth?: number;
8
+ resizable?: boolean;
9
+ lineClamp?: number;
10
+ }
11
+ export declare const DEFAULT_COLUMN_MIN_WIDTH = 48;
12
+ export declare const COLUMN_RESIZE_MAX_WIDTH = 10000;
13
+ export declare const COLUMN_RESIZE_STEP = 16;
14
+ export declare const COLUMN_RESIZE_PAGE_STEP = 64;
15
+ export declare const definedNumber: (value: number | undefined) => number | undefined;
16
+ export declare const detailsElementId: (value: string) => string;
17
+ export declare const columnMinWidth: (column: TableColumnLayout) => number;
18
+ export declare const columnMaxWidth: (column: TableColumnLayout) => number;
19
+ export declare const clampColumnWidth: (width: number, column: TableColumnLayout) => number;
20
+ export declare const columnTrack: (column: TableColumnLayout, resized: number | undefined) => string;
21
+ export declare const gridTemplateColumns: (columns: TableColumnLayout[], widths: Record<string, number>, leading: {
22
+ selects: boolean;
23
+ expandable: boolean;
24
+ }) => string;
25
+ /**
26
+ * The narrowest the grid can get before its tracks overflow. The table
27
+ * scrolls horizontally below this width instead of squeezing fixed columns.
28
+ */
29
+ export declare const gridMinInlineSize: (columns: TableColumnLayout[], widths: Record<string, number>, leading: {
30
+ selects: boolean;
31
+ expandable: boolean;
32
+ }) => string;
33
+ export declare const layoutFromColumn: (column: TableColumn) => TableColumnLayout;
34
+ export type ColumnResizeAction = 'decrease' | 'increase' | 'min' | 'max';
35
+ export interface ColumnResizeCommand {
36
+ action: ColumnResizeAction;
37
+ amount: number;
38
+ }
39
+ /**
40
+ * Keyboard resizing is logical: ArrowRight grows a column in LTR and shrinks
41
+ * it in RTL. Page keys follow that axis in larger steps. Home and End jump
42
+ * to the limits.
43
+ */
44
+ export declare const columnResizeCommand: (code: string, isLTR: boolean) => ColumnResizeCommand | undefined;
45
+ export declare const resizedWidth: (current: number, command: ColumnResizeCommand, column: TableColumnLayout) => number;
@@ -0,0 +1,21 @@
1
+ import { CSSResultArray, TemplateResult } from 'lit';
2
+ import { LuzmoElement } from '../../utils/base';
3
+ /**
4
+ * @element luzmo-table-disclosure-cell
5
+ *
6
+ * Rendered by `luzmo-table-row` for an expandable row. Activate it to expand
7
+ * or collapse that row.
8
+ *
9
+ * The button carries `aria-expanded`. The owning row carries `aria-controls`
10
+ * because that id lives outside this cell's shadow tree.
11
+ */
12
+ export declare class LuzmoTableDisclosureCell extends LuzmoElement {
13
+ static get styles(): CSSResultArray;
14
+ role: string;
15
+ expanded: boolean;
16
+ /**
17
+ * Accessible name of the disclosure button.
18
+ */
19
+ label: string;
20
+ protected render(): TemplateResult;
21
+ }
@@ -0,0 +1,77 @@
1
+ import { CSSResultArray, PropertyValues, TemplateResult } from 'lit';
2
+ import { LuzmoElement } from '../../utils/base';
3
+ import { TableColumnLayout } from './table-columns';
4
+ import { TableSortDirection } from './types';
5
+ /**
6
+ * @element luzmo-table-head-cell
7
+ *
8
+ * @slot - Column header content.
9
+ *
10
+ * @fires luzmo-table-sorted - A sortable header was activated. `detail` is `{ sortKey, sortDirection }`. Cancel it in data mode to skip the client sort. Cancel it on this header to keep sibling sort directions unchanged.
11
+ *
12
+ * @attr sort-direction - Current sort direction, `asc` or `desc`.
13
+ * @attr sort-key - Item key the column sorts by.
14
+ * @attr column-id - Stable column identifier.
15
+ * @attr min-width - Minimum column width, in pixels.
16
+ * @attr max-width - Maximum column width, in pixels.
17
+ * @attr line-clamp - Maximum number of header lines before the text truncates.
18
+ */
19
+ export declare class LuzmoTableHeadCell extends LuzmoElement {
20
+ static get styles(): CSSResultArray;
21
+ role: string;
22
+ /**
23
+ * Pressed state while Space is held on a sortable header.
24
+ */
25
+ active: boolean;
26
+ /**
27
+ * Whether activating the header sorts the table.
28
+ */
29
+ sortable: boolean;
30
+ /**
31
+ * Current sort direction. Unset when the column is not sorted.
32
+ */
33
+ sortDirection: TableSortDirection | undefined;
34
+ /**
35
+ * Item key the column sorts by. Sent as `sortKey` in `luzmo-table-sorted`.
36
+ */
37
+ sortKey: string;
38
+ /**
39
+ * Stable column identifier. Defaults to `sortKey`, then the column index.
40
+ */
41
+ columnId: string;
42
+ /**
43
+ * Fixed column width, in pixels.
44
+ */
45
+ width: number | undefined;
46
+ /**
47
+ * Minimum column width, in pixels.
48
+ */
49
+ minWidth: number | undefined;
50
+ /**
51
+ * Maximum column width, in pixels.
52
+ */
53
+ maxWidth: number | undefined;
54
+ /**
55
+ * Whether the header shows a resize handle.
56
+ */
57
+ resizable: boolean;
58
+ /**
59
+ * Maximum number of header lines before the text truncates. Unset wraps.
60
+ * Also the default clamp for the column's cells.
61
+ */
62
+ lineClamp: number | undefined;
63
+ /** @internal Measured or resized width announced by the resize handle. */
64
+ currentWidth: number;
65
+ /** @internal Accessible name of the resize handle. */
66
+ resizeLabel: string;
67
+ constructor();
68
+ /** @internal Layout values read by the table. */
69
+ toLayout(index: number): TableColumnLayout;
70
+ protected render(): TemplateResult;
71
+ protected updated(changes: PropertyValues<this>): void;
72
+ private _sort;
73
+ private handleClick;
74
+ private handleKeydown;
75
+ private handleKeyup;
76
+ private handleBlur;
77
+ }
@@ -0,0 +1,34 @@
1
+ import { CSSResultArray, TemplateResult } from 'lit';
2
+ import { LuzmoElement } from '../../utils/base';
3
+ import type { ElementSize } from '../../utils/sized-mixin';
4
+ import { TableSelects } from './types';
5
+ /**
6
+ * @element luzmo-table-head
7
+ *
8
+ * @slot - `luzmo-table-head-cell` elements.
9
+ */
10
+ export declare class LuzmoTableHead extends LuzmoElement {
11
+ static get styles(): CSSResultArray;
12
+ role: string;
13
+ /**
14
+ * Whether any row is selected. Mirrored from the table.
15
+ */
16
+ selected: boolean;
17
+ /** @internal */
18
+ selects: TableSelects | undefined;
19
+ /** @internal */
20
+ checked: boolean;
21
+ /** @internal */
22
+ indeterminate: boolean;
23
+ /** @internal */
24
+ emphasized: boolean;
25
+ /** @internal */
26
+ checkboxLabel: string;
27
+ /** @internal */
28
+ checkboxSize: ElementSize;
29
+ /** @internal */
30
+ expandable: boolean;
31
+ constructor();
32
+ protected render(): TemplateResult;
33
+ private handleSorted;
34
+ }
@@ -0,0 +1,56 @@
1
+ import { TableItem, TableItemValue, TableLabels, TableSelects, TableSortDirection } from './types';
2
+ export interface TableRecord<T extends TableItem = TableItem> {
3
+ item: T;
4
+ value: string;
5
+ /** Position in the source `items` array or in the slotted rows. */
6
+ index: number;
7
+ information: boolean;
8
+ }
9
+ export interface TableSort {
10
+ key: string;
11
+ direction: TableSortDirection;
12
+ }
13
+ export declare const isInformationItem: (item: TableItem) => boolean;
14
+ export declare const toAriaSort: (direction?: TableSortDirection) => "ascending" | "descending" | "none";
15
+ export declare const nextSortDirection: (direction?: TableSortDirection) => TableSortDirection;
16
+ export declare const resolveTableLabels: (labels?: TableLabels, selectAllLabel?: string) => Required<TableLabels>;
17
+ export declare const interpolate: (template: string, replacements: Record<string, string>) => string;
18
+ export declare const parseJsonArray: (value: string | null) => unknown[] | undefined;
19
+ export declare const createRecords: <T extends TableItem>(items: T[], itemValue?: TableItemValue<T>) => TableRecord<T>[];
20
+ /**
21
+ * Wraps a headless TanStack table that owns sort order and row selection.
22
+ * The model never commits a selection itself: `toggle` and `toggleAll`
23
+ * return the next `selected` array so the element stays the single source
24
+ * of truth.
25
+ */
26
+ export declare class TableModel<T extends TableItem = TableItem> {
27
+ selects?: TableSelects;
28
+ /** BCP 47 tag used to collate string values while sorting. */
29
+ locale?: string;
30
+ private records;
31
+ private sorting;
32
+ private manualSorting;
33
+ private rowSelection;
34
+ private selectedOrder;
35
+ private columns;
36
+ private pendingSelection?;
37
+ private collator?;
38
+ private collatorLocale?;
39
+ private readonly table;
40
+ setRecords(records: TableRecord<T>[]): void;
41
+ setSelected(values: string[]): void;
42
+ setSorting(sort?: TableSort, manual?: boolean): void;
43
+ get rows(): TableRecord<T>[];
44
+ isSelected(value: string): boolean;
45
+ get allSelected(): boolean;
46
+ get someSelected(): boolean;
47
+ /** Returns the next selection, or `undefined` when the row cannot be selected. */
48
+ toggle(value: string): string[] | undefined;
49
+ toggleAll(checked: boolean): string[];
50
+ private get selectableRecords();
51
+ private findRow;
52
+ private capture;
53
+ private compare;
54
+ private createSortColumn;
55
+ private sync;
56
+ }
@@ -0,0 +1,29 @@
1
+ import { CSSResultArray, PropertyValues, TemplateResult } from 'lit';
2
+ import { LuzmoElement } from '../../utils/base';
3
+ /**
4
+ * @element luzmo-table-row-details
5
+ *
6
+ * Expanded content for the preceding `luzmo-table-row`. Place it as the row's
7
+ * next sibling. The table shows it while that row is `expanded`.
8
+ *
9
+ * @slot - Details content. A nested `luzmo-table` needs its own accessible name.
10
+ *
11
+ * @fires luzmo-table-details-collapsed - The closing animation finished and the details row is hidden.
12
+ */
13
+ export declare class LuzmoTableRowDetails extends LuzmoElement {
14
+ static get styles(): CSSResultArray;
15
+ role: string;
16
+ /**
17
+ * Whether the details row is shown. Set by the table from the owning row.
18
+ */
19
+ open: boolean;
20
+ private _phase;
21
+ private readonly reducedMotion;
22
+ private _closeFallback;
23
+ disconnectedCallback(): void;
24
+ protected willUpdate(changes: PropertyValues<this>): void;
25
+ protected render(): TemplateResult;
26
+ protected updated(changes: PropertyValues): void;
27
+ private handleAnimationEnd;
28
+ private _finishClosing;
29
+ }
@@ -0,0 +1,64 @@
1
+ import { CSSResultArray, PropertyValues, TemplateResult } from 'lit';
2
+ import { LuzmoElement } from '../../utils/base';
3
+ import type { ElementSize } from '../../utils/sized-mixin';
4
+ import './table-disclosure-cell';
5
+ /**
6
+ * @element luzmo-table-row
7
+ *
8
+ * @slot - `luzmo-table-cell` elements of the row.
9
+ */
10
+ export declare class LuzmoTableRow extends LuzmoElement {
11
+ static get styles(): CSSResultArray;
12
+ role: string;
13
+ /**
14
+ * Selection value. Defaults to the row's position when empty.
15
+ */
16
+ value: string;
17
+ /**
18
+ * Whether the row is selected. Mirrored from the table's `selected`.
19
+ */
20
+ selected: boolean;
21
+ /**
22
+ * Whether the row can be selected. Set by the table while it `selects`.
23
+ */
24
+ selectable: boolean;
25
+ /**
26
+ * Whether the row's details are shown.
27
+ */
28
+ expanded: boolean;
29
+ /**
30
+ * Whether the row has a details sibling or data-mode details renderer.
31
+ */
32
+ expandable: boolean;
33
+ /** @internal */
34
+ selectsSingle: boolean;
35
+ /** @internal */
36
+ emphasized: boolean;
37
+ /**
38
+ * Whether the table renders a selection column. Rows that cannot be
39
+ * selected keep the column's space so cells stay aligned.
40
+ * @internal
41
+ */
42
+ selectionColumn: boolean;
43
+ /**
44
+ * Whether the table renders a disclosure column. Rows that cannot expand
45
+ * keep the column's space so cells stay aligned.
46
+ * @internal
47
+ */
48
+ expansionColumn: boolean;
49
+ /**
50
+ * Spans the row's only cell across every column. Used by information rows.
51
+ * @internal
52
+ */
53
+ spanAll: boolean;
54
+ /** @internal */
55
+ checkboxLabel: string;
56
+ /** @internal */
57
+ disclosureLabel: string;
58
+ /** @internal */
59
+ detailsId: string;
60
+ /** @internal */
61
+ checkboxSize: ElementSize;
62
+ protected render(): TemplateResult;
63
+ protected updated(changes: PropertyValues<this>): void;
64
+ }
@@ -0,0 +1,9 @@
1
+ import { CSSResultArray, CSSResultGroup } from 'lit';
2
+ /**
3
+ * `LuzmoElement` declares no `styles`, so `super.styles` is `undefined` and
4
+ * cannot be spread directly. Flatten whatever is inherited so the table
5
+ * elements keep base styles if the base class starts contributing them.
6
+ *
7
+ * @internal
8
+ */
9
+ export declare function tableStyles(inherited: CSSResultGroup | undefined, styles: string): CSSResultArray;