@mono-lit/helper 0.0.5 → 0.0.7

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 (171) hide show
  1. package/dist/{control-tooltip-C3rA_nSH.js → control-tooltip-CoPD37_h.js} +20 -11
  2. package/dist/{data-source-options-Cz9fVLK8.js → data-source-options-CS0w0wlO.js} +26 -9
  3. package/dist/{data-source-options-QjuI73g8.js → data-source-options-lDR-g9Eb.js} +26 -9
  4. package/dist/{data-source-read-FxqzQkk2.js → data-source-read-Cp_h7NIf.js} +5 -2
  5. package/dist/{data-source-read-i6CYSUEl.js → data-source-read-DTJ_Mnez.js} +5 -2
  6. package/dist/{excel-BPdDt06G.js → excel-DtRpxmxs.js} +1 -1
  7. package/dist/{export-DgomqI_3.js → export-D27RJa1w.js} +1 -1
  8. package/dist/export.js +3 -3
  9. package/dist/{field-tooltip-FyMi9vNM.js → field-tooltip-Csk4s2ve.js} +2 -3
  10. package/dist/field-tooltip-addon-B32dizW_.js +22 -0
  11. package/dist/{control-tooltip-7vegYmq3.js → field-tooltip-addon-CWCp19mJ.js} +36 -12
  12. package/dist/{field-tooltip.css_raw-DEctHXKm.js → field-tooltip.css_raw-U5UeTa2d.js} +3 -4
  13. package/dist/{field-validation-CHHQi1zl.js → field-validation-CFmUmuDx.js} +1 -1
  14. package/dist/field-validation.css_raw-Cx6SGrfP.js +178 -0
  15. package/dist/{form-control-core-CIdMLXMo.js → form-control-core-BbiACMtL.js} +1 -1
  16. package/dist/{hydration-flush-DHrl4_KK.js → hydration-flush-BaE9gN3C.js} +450 -3
  17. package/dist/index.js +11 -11
  18. package/dist/{index.node-DzCuvHLg.js → index.node-Mg0Snp0t.js} +5 -5
  19. package/dist/index.node.js +11 -11
  20. package/dist/input.css_raw-Br-T8RWv.js +5 -0
  21. package/dist/{light-slots-DdDdZ6zs.js → light-slots-B5Ck0t_E.js} +1 -1
  22. package/dist/{light-slots-4ZCjOcBg.js → light-slots-_no0r2Z-.js} +1 -1
  23. package/dist/mono-button-CLkHg3WW.js +871 -0
  24. package/dist/{mono-button.shadow-D9NdMsmH.js → mono-button.shadow-DqZMpcqY.js} +1 -2
  25. package/dist/{mono-data-chart-ChkelNT7.js → mono-data-chart-BAH9Zb3p.js} +2 -2
  26. package/dist/{mono-data-dropdown-DxpUUk2y.js → mono-data-dropdown-BsY5IuIo.js} +72 -6
  27. package/dist/{mono-data-grid-KDpu4d4_.js → mono-data-grid-CZFjpnOD.js} +125 -18
  28. package/dist/{mono-data-grid-8jmeIXUU.js → mono-data-grid-kV4jYu2g.js} +124 -17
  29. package/dist/{mono-element-C7vCschg.js → mono-element-CKcT0rwv.js} +1 -1
  30. package/dist/{mono-form-controller-BkMR8g14.js → mono-form-controller-BrA10erm.js} +12 -1
  31. package/dist/mono-ui-kvLVIf1V.js +786 -0
  32. package/dist/{popup-portal-C8ttHDRX.js → popup-portal-CINuVjNY.js} +53 -6
  33. package/dist/src/components/accordion/mono-accordion.d.ts +0 -1
  34. package/dist/src/components/alert/mono-alert.d.ts +0 -1
  35. package/dist/src/components/breadcrumb/mono-breadcrumb-list.d.ts +0 -1
  36. package/dist/src/components/breadcrumb/mono-breadcrumb.d.ts +0 -1
  37. package/dist/src/components/button/mono-button-dropdown.d.ts +0 -1
  38. package/dist/src/components/button/mono-button.d.ts +0 -1
  39. package/dist/src/components/card/mono-card.d.ts +0 -1
  40. package/dist/src/components/chart/mono-chart-presets.d.ts +0 -4
  41. package/dist/src/components/chart/mono-chart.d.ts +0 -1
  42. package/dist/src/components/checkbox/mono-checkbox.d.ts +0 -1
  43. package/dist/src/components/chip/mono-chip.d.ts +0 -1
  44. package/dist/src/components/date/mono-date.d.ts +0 -1
  45. package/dist/src/components/drawer/mono-drawer.d.ts +0 -1
  46. package/dist/src/components/dropdown/mono-dropdown.d.ts +0 -1
  47. package/dist/src/components/dropdown-table/mono-dropdown-table.d.ts +0 -1
  48. package/dist/src/components/file-upload/mono-file-upload.d.ts +0 -1
  49. package/dist/src/components/filter/mono-filter-builder.d.ts +0 -1
  50. package/dist/src/components/input/mono-input.d.ts +0 -1
  51. package/dist/src/components/menu/mono-menu.d.ts +0 -1
  52. package/dist/src/components/modal/mono-modal.d.ts +0 -1
  53. package/dist/src/components/nav/mono-nav.d.ts +0 -1
  54. package/dist/src/components/otp/mono-otp.d.ts +0 -1
  55. package/dist/src/components/radio/mono-radio.d.ts +0 -1
  56. package/dist/src/components/rich-text-editor/mono-rich-text-editor.d.ts +0 -1
  57. package/dist/src/components/select/mono-select.d.ts +0 -1
  58. package/dist/src/components/sidebar/mono-sidebar.d.ts +0 -1
  59. package/dist/src/components/slider/mono-slider.d.ts +0 -1
  60. package/dist/src/components/switch/mono-switch.d.ts +0 -1
  61. package/dist/src/components/table/column-autosize.d.ts +96 -0
  62. package/dist/src/components/table/mono-data-grid.d.ts +16 -0
  63. package/dist/src/components/table/mono-table-checkbox.d.ts +0 -1
  64. package/dist/src/components/table/mono-table-detail.d.ts +0 -1
  65. package/dist/src/components/table/mono-table-empty.d.ts +0 -1
  66. package/dist/src/components/table/mono-table-error.d.ts +0 -1
  67. package/dist/src/components/table/mono-table-info.d.ts +0 -1
  68. package/dist/src/components/table/mono-table-loading.d.ts +0 -1
  69. package/dist/src/components/table/mono-table-page-size.d.ts +0 -1
  70. package/dist/src/components/table/mono-table-paging-group.d.ts +0 -1
  71. package/dist/src/components/table/mono-table-paging.d.ts +0 -1
  72. package/dist/src/components/table/mono-table-search.d.ts +0 -1
  73. package/dist/src/components/table/mono-table-sort.d.ts +0 -1
  74. package/dist/src/components/table/mono-table-summary.d.ts +0 -1
  75. package/dist/src/components/table/mono-table-th-core.d.ts +3 -0
  76. package/dist/src/components/table/mono-table-th.d.ts +0 -1
  77. package/dist/src/components/table/table-controller-core.d.ts +2 -0
  78. package/dist/src/components/table/table-types.d.ts +8 -1
  79. package/dist/src/components/tabs/mono-tabs.d.ts +0 -1
  80. package/dist/src/components/tag-input/mono-tag-input.d.ts +12 -1
  81. package/dist/src/components/tag-input/mono-tag-input.shadow.d.ts +9 -1
  82. package/dist/src/components/tag-input/tag-input-core.d.ts +9 -1
  83. package/dist/src/components/tag-input/tag-input-types.d.ts +2 -0
  84. package/dist/src/components/textarea/mono-textarea.d.ts +0 -1
  85. package/dist/src/components/tooltip/field-tooltip-addon.d.ts +5 -0
  86. package/dist/src/composables/mono-size-attrs.d.ts +10 -0
  87. package/dist/src/composables/popup-portal.d.ts +24 -1
  88. package/dist/src/entries/index.d.ts +2 -1
  89. package/dist/src/entries/index.node.d.ts +2 -1
  90. package/dist/{styles-BODNpZV1.js → styles-D-ergrfR.js} +1 -1
  91. package/dist/{tooltip-Drekihf5.js → tooltip-Cu5IrDS9.js} +1 -2
  92. package/dist/tooltip.js +2 -3
  93. package/dist/ui/accordion.js +4 -11
  94. package/dist/ui/alert.js +3 -10
  95. package/dist/ui/breadcrumb.js +4 -14
  96. package/dist/ui/button-dropdown.js +22 -15
  97. package/dist/ui/button.js +1 -1
  98. package/dist/ui/card.js +4 -11
  99. package/dist/ui/chart.js +4 -24
  100. package/dist/ui/checkbox.js +4 -11
  101. package/dist/ui/chip.js +6 -9
  102. package/dist/ui/date.js +5 -12
  103. package/dist/ui/drawer.js +5 -12
  104. package/dist/ui/dropdown-table.js +89 -38
  105. package/dist/ui/dropdown.js +34 -21
  106. package/dist/ui/file-upload.js +4 -11
  107. package/dist/ui/filter.js +3 -10
  108. package/dist/ui/form.js +1 -1
  109. package/dist/ui/index.css +5414 -8564
  110. package/dist/ui/input.js +6 -14
  111. package/dist/ui/menu.js +4 -11
  112. package/dist/ui/modal.js +6 -13
  113. package/dist/ui/nav.js +4 -11
  114. package/dist/ui/otp.js +6 -14
  115. package/dist/ui/radio.js +4 -11
  116. package/dist/ui/rich-text-editor.js +4 -12
  117. package/dist/ui/select.js +12 -15
  118. package/dist/ui/shadow/accordion.js +1 -1
  119. package/dist/ui/shadow/alert.js +1 -1
  120. package/dist/ui/shadow/breadcrumb.js +1 -1
  121. package/dist/ui/shadow/button-dropdown.js +21 -7
  122. package/dist/ui/shadow/button.js +1 -1
  123. package/dist/ui/shadow/card.js +1 -2
  124. package/dist/ui/shadow/chart.js +3 -4
  125. package/dist/ui/shadow/checkbox.js +2 -2
  126. package/dist/ui/shadow/chip.js +1 -1
  127. package/dist/ui/shadow/date.js +4 -5
  128. package/dist/ui/shadow/drawer.js +2 -2
  129. package/dist/ui/shadow/dropdown-table.js +159 -35
  130. package/dist/ui/shadow/dropdown.js +31 -11
  131. package/dist/ui/shadow/file-upload.js +2 -2
  132. package/dist/ui/shadow/filter.js +1 -2
  133. package/dist/ui/shadow/input.js +5 -6
  134. package/dist/ui/shadow/menu.js +1 -1
  135. package/dist/ui/shadow/modal.js +3 -3
  136. package/dist/ui/shadow/nav.js +1 -1
  137. package/dist/ui/shadow/otp.js +5 -6
  138. package/dist/ui/shadow/radio.js +2 -2
  139. package/dist/ui/shadow/rich-text-editor.js +2 -3
  140. package/dist/ui/shadow/select.js +11 -7
  141. package/dist/ui/shadow/sidebar.js +2 -2
  142. package/dist/ui/shadow/slider.js +4 -5
  143. package/dist/ui/shadow/switch.js +2 -2
  144. package/dist/ui/shadow/table.js +113 -20
  145. package/dist/ui/shadow/tabs.js +1 -1
  146. package/dist/ui/shadow/tag-input.js +203 -27
  147. package/dist/ui/shadow/textarea.js +4 -5
  148. package/dist/ui/sidebar.js +4 -11
  149. package/dist/ui/slider.js +5 -13
  150. package/dist/ui/switch.js +4 -11
  151. package/dist/ui/table.js +114 -64
  152. package/dist/ui/tabs.js +4 -11
  153. package/dist/ui/tag-input.js +215 -30
  154. package/dist/ui/textarea.js +6 -14
  155. package/dist/ui/theme/luma.css +495 -495
  156. package/dist/ui/theme/lyra.css +495 -495
  157. package/dist/ui/theme/maia.css +495 -495
  158. package/dist/ui/theme/mira.css +495 -495
  159. package/dist/ui/theme/nova.css +495 -495
  160. package/dist/ui/theme/one.css +742 -742
  161. package/dist/ui/theme/rhea.css +495 -495
  162. package/dist/ui/theme/sera.css +495 -495
  163. package/dist/ui/theme/vega.css +495 -495
  164. package/package.json +2 -2
  165. package/dist/css-size-DWAPgQdT.js +0 -38
  166. package/dist/field-validation.css_raw-B3Iu33rS.js +0 -178
  167. package/dist/input.css_raw-CQu2fAsU.js +0 -5
  168. package/dist/mono-button-CeDB9khW.js +0 -878
  169. package/dist/mono-ui-BwUc0L6B.js +0 -360
  170. package/dist/tooltip-loader-3U9FTOXj.js +0 -20
  171. package/dist/tooltip-loader-Dcp9AUZn.js +0 -23
@@ -233,6 +233,8 @@ var PopupPortalController = class {
233
233
  this._classObserver = null;
234
234
  this._viewportBound = false;
235
235
  this._viewportFrame = 0;
236
+ this._wasOpen = false;
237
+ this._sizeObserver = null;
236
238
  this._onViewport = () => {
237
239
  if (!this.opts.isOpen() || this._viewportFrame) return;
238
240
  this._viewportFrame = requestAnimationFrame(() => {
@@ -254,24 +256,65 @@ var PopupPortalController = class {
254
256
  hostDisconnected() {
255
257
  this._unbindViewport();
256
258
  this._leaveStack();
259
+ this._unobserveSize();
260
+ this._wasOpen = false;
257
261
  this._classObserver?.disconnect();
258
262
  this._classObserver = null;
259
263
  if (this._portal?.parentNode) this._portal.parentNode.removeChild(this._portal);
260
264
  this._portal = null;
261
265
  this._adopted = false;
262
266
  }
267
+ /**
268
+ * Position SYNCHRONOUSLY only on the open edge; every later update of an open popup is
269
+ * coalesced into one frame (`scheduleReposition`), and the custom-property carry-over
270
+ * (`_syncPortalVars`, two `getComputedStyle`) runs on the open edge only.
271
+ *
272
+ * `reposition()` is a write-then-read forced layout, and hosts update constantly while open —
273
+ * every keystroke in a search box, every arrow-key cursor move, every controller notify — so
274
+ * running it per update cost one synchronous layout each. A frame callback still runs before
275
+ * that frame paints, so nothing visibly lags; a panel whose content resizes WITHOUT a host
276
+ * update (a consumer re-rendering its rows) is caught by the ResizeObserver instead.
277
+ */
263
278
  hostUpdated() {
264
279
  if (isServer) return;
265
280
  if (this.opts.isOpen()) {
281
+ const opening = !this._wasOpen;
282
+ this._wasOpen = true;
266
283
  this._adopt();
267
284
  this._enterStack();
268
- this._syncPortalClass();
269
- this.reposition();
285
+ if (opening) {
286
+ this._syncPortalClass();
287
+ this.reposition();
288
+ this._observeSize();
289
+ } else {
290
+ this._syncPortalClass(false);
291
+ this.scheduleReposition();
292
+ }
270
293
  } else {
294
+ this._wasOpen = false;
295
+ this._unobserveSize();
271
296
  this._leaveStack();
272
- this._syncPortalClass();
297
+ this._syncPortalClass(false);
273
298
  }
274
299
  }
300
+ /** Reposition when the panel or its anchor changes size while open (content, chips wrapping). */
301
+ _observeSize() {
302
+ if (this._sizeObserver || typeof ResizeObserver === "undefined") return;
303
+ const panel = this._panel ?? this.opts.getPanel();
304
+ const anchor = this.opts.getAnchor();
305
+ if (!panel && !anchor) return;
306
+ this._sizeObserver = new ResizeObserver(() => this.scheduleReposition());
307
+ if (panel) this._sizeObserver.observe(panel);
308
+ if (anchor) this._sizeObserver.observe(anchor);
309
+ }
310
+ _unobserveSize() {
311
+ this._sizeObserver?.disconnect();
312
+ this._sizeObserver = null;
313
+ }
314
+ /** Reposition on the next frame, coalesced with any viewport movement already pending. */
315
+ scheduleReposition() {
316
+ this._onViewport();
317
+ }
275
318
  /**
276
319
  * Only relocate to `<body>` when the host renders into light DOM
277
320
  * (`renderRoot === host`). Shadow hosts keep the panel in their shadow root.
@@ -307,8 +350,12 @@ var PopupPortalController = class {
307
350
  this._panel = panel;
308
351
  this._adopted = true;
309
352
  }
310
- /** Mirror the style-scope element's classes and `mono-*` attributes onto the portal. */
311
- _syncPortalClass() {
353
+ /**
354
+ * Mirror the style-scope element's classes and `mono-*` attributes onto the portal.
355
+ * `withVars` also carries the custom properties across — a computed-style read, so only on
356
+ * the open edge and on a scope attribute change, not on every host update.
357
+ */
358
+ _syncPortalClass(withVars = true) {
312
359
  if (!this._portal) return;
313
360
  const scope = this.opts.getStyleScope();
314
361
  const cls = scope?.getAttribute("class") ?? "";
@@ -320,7 +367,7 @@ var PopupPortalController = class {
320
367
  }
321
368
  for (const a of Array.from(this._portal.attributes)) if (mirrored(a.name) && !wanted.has(a.name)) this._portal.removeAttribute(a.name);
322
369
  for (const [name, value] of wanted) if (this._portal.getAttribute(name) !== value) this._portal.setAttribute(name, value);
323
- this._syncPortalVars(scope);
370
+ if (withVars) this._syncPortalVars(scope);
324
371
  }
325
372
  /**
326
373
  * Carry the component's public custom properties across the portal (see
@@ -15,7 +15,6 @@ declare const MonoAccordion_base: Constructor<MonoAccordionCoreInterface> & type
15
15
  * Both register `mono-accordion`, so a document loads only one.
16
16
  */
17
17
  export declare class MonoAccordion extends MonoAccordion_base {
18
- static styles: import("lit").CSSResult[];
19
18
  protected createRenderRoot(): HTMLElement;
20
19
  private _slotObserver?;
21
20
  private _slotTitle;
@@ -18,7 +18,6 @@ declare const MonoAlert_base: Constructor<MonoAlertCoreInterface> & typeof LitEl
18
18
  * rendered, and their captured nodes are parked (kept parented, invisible).
19
19
  */
20
20
  export declare class MonoAlert extends MonoAlert_base {
21
- static styles: import("lit").CSSResult[];
22
21
  protected createRenderRoot(): HTMLElement;
23
22
  private _slotsCaptured;
24
23
  private _buckets;
@@ -16,7 +16,6 @@ declare const MonoBreadcrumbList_base: Constructor<MonoBreadcrumbListCoreInterfa
16
16
  * (`@mono-lit/helper/ui/shadow/breadcrumb`) supports standalone only.
17
17
  */
18
18
  export declare class MonoBreadcrumbList extends MonoBreadcrumbList_base {
19
- static styles: import("lit").CSSResult[];
20
19
  protected createRenderRoot(): HTMLElement;
21
20
  private _parent;
22
21
  connectedCallback(): void;
@@ -18,7 +18,6 @@ declare const MonoBreadcrumb_base: Constructor<MonoBreadcrumbCoreInterface> & ty
18
18
  * so a document loads only one.
19
19
  */
20
20
  export declare class MonoBreadcrumb extends MonoBreadcrumb_base {
21
- static styles: import("lit").CSSResult[];
22
21
  protected createRenderRoot(): HTMLElement;
23
22
  private _slotsCaptured;
24
23
  private _hasBodySlot;
@@ -17,7 +17,6 @@ declare const MonoButtonDropdown_base: Constructor<MonoButtonDropdownCoreInterfa
17
17
  * build shares it and only swaps the embedded button's tag.
18
18
  */
19
19
  export declare class MonoButtonDropdown extends MonoButtonDropdown_base {
20
- static styles: import("lit").CSSResult[];
21
20
  protected createRenderRoot(): HTMLElement;
22
21
  /**
23
22
  * The panel is a STATIC element here, not something a helper returns.
@@ -22,7 +22,6 @@ declare const MonoButton_base: Constructor<MonoButtonCoreInterface> & typeof Lit
22
22
  * document loads only one.
23
23
  */
24
24
  export declare class MonoButton extends MonoButton_base {
25
- static styles: import("lit").CSSResult[];
26
25
  protected createRenderRoot(): HTMLElement;
27
26
  private _buckets;
28
27
  private _slotsCaptured;
@@ -24,7 +24,6 @@ declare const MonoCard_base: Constructor<MonoCardCoreInterface> & typeof LitElem
24
24
  * same document.
25
25
  */
26
26
  export declare class MonoCard extends MonoCard_base {
27
- static styles: import("lit").CSSResult[];
28
27
  protected createRenderRoot(): HTMLElement;
29
28
  private _slotsCaptured;
30
29
  private _buckets;
@@ -6,7 +6,6 @@ import { LitElement, TemplateResult } from "lit";
6
6
  declare const MonoChartBar_base: Constructor<MonoChartCoreInterface> & typeof LitElement;
7
7
  /** `<mono-chart-bar>` — vertical bars. */
8
8
  export declare class MonoChartBar extends MonoChartBar_base {
9
- static styles: import("lit").CSSResult[];
10
9
  protected _presetType: MonoChartType;
11
10
  protected createRenderRoot(): HTMLElement;
12
11
  protected render(): TemplateResult;
@@ -14,7 +13,6 @@ export declare class MonoChartBar extends MonoChartBar_base {
14
13
  declare const MonoChartLine_base: Constructor<MonoChartCoreInterface> & typeof LitElement;
15
14
  /** `<mono-chart-line>` — a line series. */
16
15
  export declare class MonoChartLine extends MonoChartLine_base {
17
- static styles: import("lit").CSSResult[];
18
16
  protected _presetType: MonoChartType;
19
17
  protected createRenderRoot(): HTMLElement;
20
18
  protected render(): TemplateResult;
@@ -22,7 +20,6 @@ export declare class MonoChartLine extends MonoChartLine_base {
22
20
  declare const MonoChartPie_base: Constructor<MonoChartCoreInterface> & typeof LitElement;
23
21
  /** `<mono-chart-pie>` — pie slices. */
24
22
  export declare class MonoChartPie extends MonoChartPie_base {
25
- static styles: import("lit").CSSResult[];
26
23
  protected _presetType: MonoChartType;
27
24
  protected createRenderRoot(): HTMLElement;
28
25
  protected render(): TemplateResult;
@@ -30,7 +27,6 @@ export declare class MonoChartPie extends MonoChartPie_base {
30
27
  declare const MonoChartDoughnut_base: Constructor<MonoChartCoreInterface> & typeof LitElement;
31
28
  /** `<mono-chart-doughnut>` — a pie with a hole. */
32
29
  export declare class MonoChartDoughnut extends MonoChartDoughnut_base {
33
- static styles: import("lit").CSSResult[];
34
30
  protected _presetType: MonoChartType;
35
31
  protected createRenderRoot(): HTMLElement;
36
32
  protected render(): TemplateResult;
@@ -21,7 +21,6 @@ declare const MonoChart_base: Constructor<MonoChartCoreInterface> & typeof LitEl
21
21
  * ```
22
22
  */
23
23
  export declare class MonoChart extends MonoChart_base {
24
- static styles: import("lit").CSSResult[];
25
24
  protected createRenderRoot(): HTMLElement;
26
25
  protected render(): TemplateResult;
27
26
  }
@@ -17,7 +17,6 @@ declare const MonoCheckbox_base: Constructor<MonoCheckboxCoreInterface> & typeof
17
17
  * document loads only one.
18
18
  */
19
19
  export declare class MonoCheckbox extends MonoCheckbox_base {
20
- static styles: import("lit").CSSResult[];
21
20
  protected createRenderRoot(): HTMLElement;
22
21
  private _slotsCaptured;
23
22
  private _slotIcon;
@@ -21,7 +21,6 @@ declare const MonoChip_base: Constructor<MonoChipCoreInterface> & typeof LitElem
21
21
  * only one.
22
22
  */
23
23
  export declare class MonoChip extends MonoChip_base {
24
- static styles: import("lit").CSSResult[];
25
24
  protected createRenderRoot(): HTMLElement;
26
25
  private _buckets;
27
26
  private _slotsCaptured;
@@ -14,7 +14,6 @@ declare const MonoDate_base: Constructor<MonoDateCoreInterface> & typeof LitElem
14
14
  * `mono-date`, so a document loads one.
15
15
  */
16
16
  export declare class MonoDate extends MonoDate_base {
17
- static styles: import("lit").CSSResult[];
18
17
  protected createRenderRoot(): HTMLElement;
19
18
  }
20
19
  declare global {
@@ -17,7 +17,6 @@ declare const MonoDrawer_base: Constructor<MonoDrawerCoreInterface> & typeof Lit
17
17
  * `mono-drawer.shadow.ts`; all logic is shared via `MonoDrawerCore`.
18
18
  */
19
19
  export declare class MonoDrawer extends MonoDrawer_base {
20
- static styles: import("lit").CSSResult[];
21
20
  private _portal;
22
21
  private _appliedPortalClasses;
23
22
  private _slotHeader;
@@ -15,7 +15,6 @@ declare const MonoDropdown_base: Constructor<MonoDropdownCoreInterface> & typeof
15
15
  * `<slot>`. Both register `mono-dropdown`, so a document loads only one.
16
16
  */
17
17
  export declare class MonoDropdown extends MonoDropdown_base {
18
- static styles: import("lit").CSSResult[];
19
18
  protected createRenderRoot(): HTMLElement;
20
19
  private _hasBodySlotState;
21
20
  private _slotsCaptured;
@@ -30,7 +30,6 @@ declare const MonoDropdownTable_base: Constructor<MonoDropdownTableCoreInterface
30
30
  * </mono-dropdown-table>
31
31
  */
32
32
  export declare class MonoDropdownTable extends MonoDropdownTable_base {
33
- static styles: import("lit").CSSResult[];
34
33
  protected createRenderRoot(): HTMLElement;
35
34
  private _slotsCaptured;
36
35
  private _slotSearch;
@@ -17,7 +17,6 @@ declare const MonoFileUpload_base: Constructor<MonoFileUploadCoreInterface> & ty
17
17
  * `mono-file-upload`, so a document loads only one.
18
18
  */
19
19
  export declare class MonoFileUpload extends MonoFileUpload_base {
20
- static styles: import("lit").CSSResult[];
21
20
  protected createRenderRoot(): HTMLElement;
22
21
  private _slotsCaptured;
23
22
  private _slots;
@@ -11,7 +11,6 @@ declare const MonoFilterBuilder_base: Constructor<MonoFilterBuilderCoreInterface
11
11
  * the same global `dist/ui/index.css` — so no extra stylesheet is needed here.
12
12
  */
13
13
  export declare class MonoFilterBuilder extends MonoFilterBuilder_base {
14
- static styles: import("lit").CSSResult[];
15
14
  protected createRenderRoot(): HTMLElement;
16
15
  protected renderIcon(name: FilterIconName): TemplateResult;
17
16
  }
@@ -15,7 +15,6 @@ declare const MonoInput_base: Constructor<MonoInputCoreInterface> & typeof LitEl
15
15
  * `<slot>`. Both register `mono-input`, so a document loads only one.
16
16
  */
17
17
  export declare class MonoInput extends MonoInput_base {
18
- static styles: import("lit").CSSResult[];
19
18
  protected createRenderRoot(): HTMLElement;
20
19
  private _slotPrefix;
21
20
  private _slotSuffix;
@@ -13,7 +13,6 @@ declare const MonoMenu_base: Constructor<MonoMenuCoreInterface> & typeof LitElem
13
13
  * lives in `MonoMenuCore`.
14
14
  */
15
15
  export declare class MonoMenu extends MonoMenu_base {
16
- static styles: import("lit").CSSResult[];
17
16
  protected createRenderRoot(): HTMLElement;
18
17
  private _slotsCaptured;
19
18
  private _hasBodySlot;
@@ -17,7 +17,6 @@ declare const MonoModal_base: Constructor<MonoModalCoreInterface> & typeof LitEl
17
17
  * `mono-modal.shadow.ts`; all logic is shared via `MonoModalCore`.
18
18
  */
19
19
  export declare class MonoModal extends MonoModal_base {
20
- static styles: import("lit").CSSResult[];
21
20
  private _portal;
22
21
  private _appliedPortalClasses;
23
22
  private _slotHead;
@@ -17,7 +17,6 @@ declare const MonoNav_base: Constructor<MonoNavCoreInterface> & typeof LitElemen
17
17
  * given document must load only one of the two builds.
18
18
  */
19
19
  export declare class MonoNav extends MonoNav_base {
20
- static styles: import("lit").CSSResult[];
21
20
  protected createRenderRoot(): HTMLElement;
22
21
  private _slotsCaptured;
23
22
  private _slotNodes;
@@ -12,7 +12,6 @@ declare const MonoOtp_base: Constructor<MonoOtpCoreInterface> & typeof LitElemen
12
12
  * build (`mono-shadow-otp`) shares it with native `<slot>`s.
13
13
  */
14
14
  export declare class MonoOtp extends MonoOtp_base {
15
- static styles: import("lit").CSSResult[];
16
15
  protected createRenderRoot(): HTMLElement;
17
16
  private _slots;
18
17
  private _slotObserver?;
@@ -16,7 +16,6 @@ declare const MonoRadio_base: Constructor<MonoRadioCoreInterface> & typeof LitEl
16
16
  * document loads only one.
17
17
  */
18
18
  export declare class MonoRadio extends MonoRadio_base {
19
- static styles: import("lit").CSSResult[];
20
19
  protected createRenderRoot(): HTMLElement;
21
20
  private _slotsCaptured;
22
21
  private _slotLabel;
@@ -16,7 +16,6 @@ declare const MonoRichTextEditor_base: Constructor<MonoRichTextEditorCoreInterfa
16
16
  * `MonoRichTextEditorCore`.
17
17
  */
18
18
  export declare class MonoRichTextEditor extends MonoRichTextEditor_base {
19
- static styles: import("lit").CSSResult[];
20
19
  protected createRenderRoot(): HTMLElement;
21
20
  private _slotsCaptured;
22
21
  private _slotLabel;
@@ -15,7 +15,6 @@ declare const MonoSelect_base: Constructor<MonoSelectCoreInterface> & typeof Lit
15
15
  * register `mono-select`, so a document loads only one build.
16
16
  */
17
17
  export declare class MonoSelect extends MonoSelect_base {
18
- static styles: import("lit").CSSResult[];
19
18
  protected createRenderRoot(): HTMLElement;
20
19
  private _slotsCaptured;
21
20
  private _slotLabel;
@@ -16,7 +16,6 @@ declare const MonoSidebar_base: Constructor<MonoSidebarCoreInterface> & typeof L
16
16
  * Both register `mono-sidebar`, so a document loads only one.
17
17
  */
18
18
  export declare class MonoSidebar extends MonoSidebar_base {
19
- static styles: import("lit").CSSResult[];
20
19
  protected createRenderRoot(): HTMLElement;
21
20
  private _slotsCaptured;
22
21
  private _slotHeader;
@@ -12,7 +12,6 @@ declare const MonoSlider_base: Constructor<MonoSliderCoreInterface> & typeof Lit
12
12
  * `MonoSliderCore`; the shadow build (`mono-shadow-slider`) shares it with native `<slot>`s.
13
13
  */
14
14
  export declare class MonoSlider extends MonoSlider_base {
15
- static styles: import("lit").CSSResult[];
16
15
  protected createRenderRoot(): HTMLElement;
17
16
  private _slotLabel;
18
17
  private _slotHelper;
@@ -16,7 +16,6 @@ declare const MonoSwitch_base: Constructor<MonoSwitchCoreInterface> & typeof Lit
16
16
  * Both register `mono-switch`, so a document loads only one.
17
17
  */
18
18
  export declare class MonoSwitch extends MonoSwitch_base {
19
- static styles: import("lit").CSSResult[];
20
19
  protected createRenderRoot(): HTMLElement;
21
20
  private _slotsCaptured;
22
21
  private _slotLabel;
@@ -0,0 +1,96 @@
1
+ import { CssSizeValue } from "../../composables/css-size.js";
2
+ //#region src/components/table/column-autosize.d.ts
3
+ /**
4
+ * Content-sized columns — what `mono-table-th`'s `width="auto"` drives.
5
+ *
6
+ * Under `mono-table-fixed` (`table-layout: fixed`) CSS cannot do this: an `auto` column takes
7
+ * the WHOLE surplus instead of fitting its content, and `min-width` / `max-width` on a cell are
8
+ * ignored by the table algorithm. So the column is measured here and handed a concrete px width,
9
+ * clamped to `minWidth` / `maxWidth`, written to its `<col>` (which wins under fixed layout) and
10
+ * to the header cell.
11
+ *
12
+ * Text is measured with a canvas, not read back from the cell: reading the cell's own width would
13
+ * return the width last written, and a column could then never shrink. Measuring text also keeps
14
+ * the pass free of layout reads, so re-running it on every change is cheap.
15
+ *
16
+ * What is measured: the header (caption + its icons), every body cell and every FOOTER cell of
17
+ * the column. The footer matters — a `<mono-table-summary>` total covers the whole set, so a
18
+ * virtual-scroll window that only shows small figures still sizes for the largest one.
19
+ *
20
+ * Cell content is treated as one line (what a money column is). An editor (`<input>`, including
21
+ * the one inside `mono-input`) counts with its value and its own padding / border.
22
+ */
23
+ /** The text measurer — swappable so tests can run where there is no canvas (jsdom). */
24
+ export declare const autosizeEnv: {
25
+ measure: (text: string, font: string) => number;
26
+ };
27
+ /**
28
+ * `text` as the element renders it: its `text-transform`, its `letter-spacing` (canvas ignores
29
+ * both) and its `font-variant-numeric: tabular-nums` (every digit at the widest digit's advance —
30
+ * a safe upper bound; tabular figures are wider than the proportional ones canvas measures).
31
+ */
32
+ export declare function measureStyled(text: string, style: CSSStyleDeclaration): number;
33
+ /**
34
+ * A size prop as px: a number / bare numeric string / `px` → px, `rem` → × the root font size,
35
+ * `em` → × `el`'s font size. Anything else (`%`, `auto`, a var) → `undefined`: not a bound.
36
+ */
37
+ export declare function cssLengthToPx(value: CssSizeValue | null, el?: Element): number | undefined;
38
+ /** `w` clamped to `[min, max]`; an unset bound does not clamp. `min` wins over a smaller `max`. */
39
+ export declare function clampWidth(w: number, min?: number, max?: number): number;
40
+ /**
41
+ * The grid column a header cell STARTS at — a walk over its section's rows honouring `rowspan`
42
+ * and `colspan`, so a leaf header under a band row (`<th colspan>` above it) maps to its real
43
+ * column. `cellIndex` alone would count only the cells of its own row.
44
+ */
45
+ export declare function headerColumnIndex(cell: HTMLTableCellElement): number;
46
+ /** The one-line width a cell's content needs, padding included. */
47
+ export declare function contentWidth(cell: HTMLElement): number;
48
+ /**
49
+ * One auto-sized column, owned by its `mono-table-th`. `schedule()` coalesces every trigger (a
50
+ * controller notify, a body mutation, typing in an editor) into one measurement per frame.
51
+ */
52
+ export declare class ColumnAutoSize {
53
+ private readonly host;
54
+ min?: number;
55
+ max?: number;
56
+ /**
57
+ * Never shrink — for a virtual-scroll table, whose body holds only the WINDOW of the rows: each
58
+ * window shift measured a different slice, so the column grew and shrank as the list scrolled and
59
+ * every change relaid the whole table. The column settles at the widest value seen instead, until
60
+ * `resetFloor()` (a new result set).
61
+ */
62
+ growOnly: boolean;
63
+ private _floor;
64
+ private _raf;
65
+ private _table?;
66
+ private _observer?;
67
+ private _wrote?;
68
+ private readonly _onInput;
69
+ /**
70
+ * A web font that finished loading after a measurement: canvas measured the FALLBACK face, so
71
+ * the width (and the cached digit advances) are stale — usually too narrow for the real font.
72
+ */
73
+ private readonly _onFonts;
74
+ constructor(host: HTMLElement);
75
+ /**
76
+ * Every sizer on the page shares ONE frame callback (`_flush`), which measures all of them
77
+ * first and writes all of them after.
78
+ *
79
+ * Each used to run in its own frame callback, measure-then-write: column A wrote its width,
80
+ * so column B's measurement (`getBoundingClientRect` on header icons, an SVG) forced a
81
+ * synchronous layout of the whole table — one per auto column, per frame.
82
+ */
83
+ private static _queued;
84
+ private static _frame;
85
+ private static _flush;
86
+ schedule(): void;
87
+ /** Forget the grow-only floor (new rows) and re-measure. */
88
+ resetFloor(): void;
89
+ /** Stop watching, and hand the column back to whatever width it is given next. */
90
+ stop(clear?: boolean): void;
91
+ private _watch;
92
+ private _unwatch;
93
+ /** Measure now (reads only); returns the write to apply after every sizer has measured. */
94
+ private _measure;
95
+ }
96
+ //#endregion
@@ -298,7 +298,17 @@ export interface MonoTableColumnProps {
298
298
  * @example map: (v) => formatDateTime(v)
299
299
  */
300
300
  map?: (value: any, row: any, index: number) => unknown;
301
+ /**
302
+ * Column width. Number → px; string used as-is (`'10rem'`). `'auto'` sizes the column to its
303
+ * content (header, body and footer cells), clamped to `minWidth` / `maxWidth` — also under
304
+ * `mono-table-fixed`. Money columns are the case: narrow while every figure is `0`, wider
305
+ * once a large one appears.
306
+ */
301
307
  width?: string | number;
308
+ /** Lower bound of the column width (px / `rem` / `em`). Clamps `width: 'auto'`. */
309
+ minWidth?: string | number;
310
+ /** Upper bound of the column width (px / `rem` / `em`). Clamps `width: 'auto'`. */
311
+ maxWidth?: string | number;
302
312
  height?: string | number;
303
313
  /**
304
314
  * Header alignment: `'left' | 'center' | 'right'`. Applied to the column's `<th>`.
@@ -474,6 +484,12 @@ export interface MonoCheckHandle<T = any> {
474
484
  selectAll(): Promise<void>;
475
485
  /** Empty the selection. */
476
486
  clear(): void;
487
+ /**
488
+ * Increments on every selection notify — tick, untick (even a rejected one), page / all
489
+ * select, replace, clear, and the drain's start / end. Compare it to tell "the selection
490
+ * moved" from the grid's other notifies (a load, a virtual-scroll window shift).
491
+ */
492
+ readonly version: number;
477
493
  /** Whether a `selectAll()` drain is in flight. */
478
494
  readonly pending: boolean;
479
495
  /** Every loaded row is selected (and there is at least one). */
@@ -26,7 +26,6 @@ declare const MonoTableCheckbox_base: Constructor<MonoTableCheckboxCoreInterface
26
26
  * table.check().getAll() // [{ Id: 8 }, { Id: 12 }, … ]
27
27
  */
28
28
  export declare class MonoTableCheckbox extends MonoTableCheckbox_base {
29
- static styles: import("lit").CSSResult[];
30
29
  protected createRenderRoot(): HTMLElement;
31
30
  }
32
31
  declare global {
@@ -24,7 +24,6 @@ declare const MonoTableDetail_base: Constructor<MonoTableDetailCoreInterface> &
24
24
  * </tr>
25
25
  */
26
26
  export declare class MonoTableDetail extends MonoTableDetail_base {
27
- static styles: import("lit").CSSResult[];
28
27
  protected createRenderRoot(): HTMLElement;
29
28
  }
30
29
  declare global {
@@ -22,7 +22,6 @@ declare const MonoTableEmpty_base: Constructor<MonoTableEmptyCoreInterface> & ty
22
22
  * INTO the host and would otherwise overwrite it.
23
23
  */
24
24
  export declare class MonoTableEmpty extends MonoTableEmpty_base {
25
- static styles: import("lit").CSSResult[];
26
25
  private _buckets;
27
26
  private _slotsCaptured;
28
27
  protected createRenderRoot(): HTMLElement;
@@ -20,7 +20,6 @@ declare const MonoTableError_base: Constructor<MonoTableErrorCoreInterface> & ty
20
20
  * which is exactly what a light build can use and a shadow one cannot.
21
21
  */
22
22
  export declare class MonoTableError extends MonoTableError_base {
23
- static styles: import("lit").CSSResult[];
24
23
  protected createRenderRoot(): HTMLElement;
25
24
  }
26
25
  declare global {
@@ -11,7 +11,6 @@ declare const MonoTableInfo_base: Constructor<MonoTableInfoCoreInterface> & type
11
11
  * so a document loads only one.
12
12
  */
13
13
  export declare class MonoTableInfo extends MonoTableInfo_base {
14
- static styles: import("lit").CSSResult[];
15
14
  protected createRenderRoot(): HTMLElement;
16
15
  }
17
16
  declare global {
@@ -42,7 +42,6 @@ declare const MonoTableLoading_base: Constructor<MonoTableLoadingCoreInterface>
42
42
  * </div>
43
43
  */
44
44
  export declare class MonoTableLoading extends MonoTableLoading_base {
45
- static styles: import("lit").CSSResult[];
46
45
  protected createRenderRoot(): HTMLElement;
47
46
  }
48
47
  declare global {
@@ -8,7 +8,6 @@ declare const MonoTablePageSize_base: Constructor<MonoTablePageSizeCoreInterface
8
8
  * All logic lives in `MonoTablePageSizeCore`; the shadow build shares the mixin.
9
9
  */
10
10
  export declare class MonoTablePageSize extends MonoTablePageSize_base {
11
- static styles: import("lit").CSSResult[];
12
11
  protected createRenderRoot(): HTMLElement;
13
12
  }
14
13
  declare global {
@@ -12,7 +12,6 @@ declare const MonoTablePagingGroup_base: Constructor<MonoTablePagingGroupCoreInt
12
12
  * <mono-table-paging-group :data-grid.prop="table" :group.prop="node" page-size="5" />
13
13
  */
14
14
  export declare class MonoTablePagingGroup extends MonoTablePagingGroup_base {
15
- static styles: import("lit").CSSResult[];
16
15
  protected createRenderRoot(): HTMLElement;
17
16
  }
18
17
  declare global {
@@ -8,7 +8,6 @@ declare const MonoTablePaging_base: Constructor<MonoTablePagingCoreInterface> &
8
8
  * All logic lives in `MonoTablePagingCore`; the shadow build shares the mixin.
9
9
  */
10
10
  export declare class MonoTablePaging extends MonoTablePaging_base {
11
- static styles: import("lit").CSSResult[];
12
11
  protected createRenderRoot(): HTMLElement;
13
12
  }
14
13
  declare global {
@@ -12,7 +12,6 @@ declare const MonoTableSearch_base: Constructor<MonoTableSearchCoreInterface> &
12
12
  * `dist/ui/index.css` — so no extra stylesheet is needed for the light build.
13
13
  */
14
14
  export declare class MonoTableSearch extends MonoTableSearch_base {
15
- static styles: import("lit").CSSResult[];
16
15
  protected createRenderRoot(): HTMLElement;
17
16
  /**
18
17
  * Light-DOM slot capture (mirrors `mono-dropdown-table`): a real `<slot>` can't
@@ -20,7 +20,6 @@ declare const MonoTableSort_base: Constructor<MonoTableSortCoreInterface> & type
20
20
  * <th><mono-table-sort :data-grid.prop="table" field="Nama">Name</mono-table-sort></th>
21
21
  */
22
22
  export declare class MonoTableSort extends MonoTableSort_base {
23
- static styles: import("lit").CSSResult[];
24
23
  protected createRenderRoot(): HTMLElement;
25
24
  /** The captured label nodes (the element's original light-DOM children). */
26
25
  private _buckets;
@@ -16,7 +16,6 @@ declare const MonoTableSummary_base: Constructor<MonoTableSummaryCoreInterface>
16
16
  * build shares the mixin. Both register the same tag, so a document loads one.
17
17
  */
18
18
  export declare class MonoTableSummary extends MonoTableSummary_base {
19
- static styles: import("lit").CSSResult[];
20
19
  protected createRenderRoot(): HTMLElement;
21
20
  }
22
21
  declare global {
@@ -1,4 +1,5 @@
1
1
  import { Constructor } from "../../composables/hybird-prop.js";
2
+ import { CssSizeValue } from "../../composables/css-size.js";
2
3
  import { MonoColumnSort, MonoDateFilter, MonoEditableTrigger, MonoHeaderFilter, SortOrder } from "./mono-data-grid.js";
3
4
  import { MonoTableMenuCoreInterface } from "./table-menu-core.js";
4
5
  import { LitElement, TemplateResult } from "lit";
@@ -26,6 +27,8 @@ export declare class MonoTableThCoreInterface extends MonoTableMenuCoreInterface
26
27
  dateFilter: boolean | MonoDateFilter;
27
28
  align?: TableThAlign;
28
29
  width?: string | number;
30
+ minWidth?: CssSizeValue;
31
+ maxWidth?: CssSizeValue;
29
32
  height?: string | number;
30
33
  protected renderSlot(name: TableThSlotName): TemplateResult;
31
34
  protected renderIcon(name: TableThIconName): TemplateResult;