@mono-lit/helper 0.0.5 → 0.0.6
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/dist/{form-control-core-CIdMLXMo.js → form-control-core-rW2WvOcb.js} +1 -1
- package/dist/{hydration-flush-DHrl4_KK.js → hydration-flush-9AJE8FRl.js} +398 -1
- package/dist/index.js +3 -3
- package/dist/{index.node-DzCuvHLg.js → index.node-tTkISFn2.js} +1 -1
- package/dist/index.node.js +3 -3
- package/dist/{light-slots-DdDdZ6zs.js → light-slots-BnBR29E7.js} +1 -1
- package/dist/{light-slots-4ZCjOcBg.js → light-slots-Cb6e-LU3.js} +1 -1
- package/dist/{mono-button-CeDB9khW.js → mono-button-Cy5-Y0At.js} +3 -3
- package/dist/{mono-button.shadow-D9NdMsmH.js → mono-button.shadow-CIBGisyo.js} +1 -2
- package/dist/{mono-element-C7vCschg.js → mono-element-Bc9wElPy.js} +1 -1
- package/dist/mono-ui-KOBJcnXk.js +758 -0
- package/dist/src/components/table/column-autosize.d.ts +74 -0
- package/dist/src/components/table/mono-data-grid.d.ts +10 -0
- package/dist/src/components/table/mono-table-th-core.d.ts +3 -0
- package/dist/src/components/table/table-types.d.ts +8 -1
- package/dist/src/components/tag-input/mono-tag-input.d.ts +12 -0
- package/dist/src/components/tag-input/mono-tag-input.shadow.d.ts +9 -1
- package/dist/src/components/tag-input/tag-input-core.d.ts +9 -1
- package/dist/src/components/tag-input/tag-input-types.d.ts +2 -0
- package/dist/src/composables/mono-size-attrs.d.ts +10 -0
- package/dist/src/entries/index.d.ts +2 -1
- package/dist/src/entries/index.node.d.ts +2 -1
- package/dist/ui/accordion.js +3 -3
- package/dist/ui/alert.js +2 -2
- package/dist/ui/breadcrumb.js +3 -3
- package/dist/ui/button-dropdown.js +2 -2
- package/dist/ui/button.js +1 -1
- package/dist/ui/card.js +3 -3
- package/dist/ui/chart.js +2 -3
- package/dist/ui/checkbox.js +3 -3
- package/dist/ui/chip.js +2 -2
- package/dist/ui/date.js +2 -2
- package/dist/ui/drawer.js +3 -3
- package/dist/ui/dropdown-table.js +3 -4
- package/dist/ui/dropdown.js +3 -3
- package/dist/ui/file-upload.js +3 -3
- package/dist/ui/filter.js +2 -2
- package/dist/ui/index.css +1665 -4815
- package/dist/ui/input.js +3 -4
- package/dist/ui/menu.js +3 -3
- package/dist/ui/modal.js +4 -4
- package/dist/ui/nav.js +3 -3
- package/dist/ui/otp.js +3 -4
- package/dist/ui/radio.js +3 -3
- package/dist/ui/rich-text-editor.js +3 -4
- package/dist/ui/select.js +3 -4
- package/dist/ui/shadow/accordion.js +1 -1
- package/dist/ui/shadow/alert.js +1 -1
- package/dist/ui/shadow/breadcrumb.js +1 -1
- package/dist/ui/shadow/button-dropdown.js +2 -2
- package/dist/ui/shadow/button.js +1 -1
- package/dist/ui/shadow/card.js +1 -2
- package/dist/ui/shadow/chart.js +1 -2
- package/dist/ui/shadow/checkbox.js +2 -2
- package/dist/ui/shadow/chip.js +1 -1
- package/dist/ui/shadow/date.js +2 -3
- package/dist/ui/shadow/drawer.js +1 -1
- package/dist/ui/shadow/dropdown-table.js +2 -3
- package/dist/ui/shadow/dropdown.js +1 -1
- package/dist/ui/shadow/file-upload.js +2 -2
- package/dist/ui/shadow/filter.js +1 -2
- package/dist/ui/shadow/input.js +2 -3
- package/dist/ui/shadow/menu.js +1 -1
- package/dist/ui/shadow/modal.js +2 -2
- package/dist/ui/shadow/nav.js +1 -1
- package/dist/ui/shadow/otp.js +2 -3
- package/dist/ui/shadow/radio.js +2 -2
- package/dist/ui/shadow/rich-text-editor.js +2 -3
- package/dist/ui/shadow/select.js +3 -4
- package/dist/ui/shadow/sidebar.js +1 -1
- package/dist/ui/shadow/slider.js +2 -3
- package/dist/ui/shadow/switch.js +2 -2
- package/dist/ui/shadow/table.js +34 -5
- package/dist/ui/shadow/tabs.js +1 -1
- package/dist/ui/shadow/tag-input.js +89 -9
- package/dist/ui/shadow/textarea.js +2 -3
- package/dist/ui/sidebar.js +3 -3
- package/dist/ui/slider.js +3 -4
- package/dist/ui/switch.js +3 -3
- package/dist/ui/table.js +35 -6
- package/dist/ui/tabs.js +3 -3
- package/dist/ui/tag-input.js +101 -5
- package/dist/ui/textarea.js +3 -4
- package/package.json +2 -2
- package/dist/css-size-DWAPgQdT.js +0 -38
- package/dist/mono-ui-BwUc0L6B.js +0 -360
package/dist/ui/table.js
CHANGED
|
@@ -3,14 +3,13 @@ import { a as buildGroups, c as isGroupNode, o as collectGroupPaths, s as flatte
|
|
|
3
3
|
import { A as resolveSearchEntries, D as isWildcardPattern, O as normalizeSearchExpr, c as resolveErrorMessages, h as mergeSearchFields, k as plainSearchColumns, l as setErrorMessages, n as describeError, r as errorStatus, s as normalizeError, t as DEFAULT_ERROR_MESSAGES, w as expandWildcard } from "../normalize-error-D93O4q8g.js";
|
|
4
4
|
import { h as monoArraySource } from "../data-source-options-QjuI73g8.js";
|
|
5
5
|
import { a as seedFromRanges, i as minimize, n as buildDateTree, o as setAllChecked, r as checkState, s as setChecked, t as monoDataGrid } from "../mono-data-grid-8jmeIXUU.js";
|
|
6
|
-
import {
|
|
6
|
+
import { _ as monoHostChildren, b as monoPhantomOptions, d as buildSizeStyle, h as monoApplyPhantomOptions, l as ColumnAutoSize, s as startMonoSizeAttributes, u as cssLengthToPx, v as monoPendingActive, y as monoPendingGrace } from "../mono-ui-KOBJcnXk.js";
|
|
7
7
|
import { n as detachEventHandlers, t as applyProps } from "../element-props-xvw0EB7H.js";
|
|
8
|
-
import { t as customElement } from "../mono-element-
|
|
8
|
+
import { t as customElement } from "../mono-element-Bc9wElPy.js";
|
|
9
9
|
import { a as defineHybridPropAliases, i as defineHybridPropAlias, o as numberStringConverter, r as booleanStringConverter, t as __decorate } from "../decorate-DbYFpi8R.js";
|
|
10
10
|
import { t as dispatchMonoEvent } from "../mono-event-BPku9HpS.js";
|
|
11
11
|
import { t as isIconifyClass } from "../icon-ClxnYhBG.js";
|
|
12
|
-
import { n as bucketHasContent, o as placeLightSlots, r as captureLightSlots, s as placeSlotNode } from "../light-slots-
|
|
13
|
-
import { t as buildSizeStyle } from "../css-size-DWAPgQdT.js";
|
|
12
|
+
import { n as bucketHasContent, o as placeLightSlots, r as captureLightSlots, s as placeSlotNode } from "../light-slots-BnBR29E7.js";
|
|
14
13
|
import { t as PopupPortalController } from "../popup-portal-C8ttHDRX.js";
|
|
15
14
|
import { n as cssPart } from "../css-class-B6Tc_MAx.js";
|
|
16
15
|
import { LitElement, html, isServer, nothing, unsafeCSS } from "lit";
|
|
@@ -2254,7 +2253,11 @@ const MonoTableThCore = (superClass) => {
|
|
|
2254
2253
|
this._valuesError = false;
|
|
2255
2254
|
this._search = "";
|
|
2256
2255
|
this._fromIcon = false;
|
|
2257
|
-
defineHybridPropAliases(this, [
|
|
2256
|
+
defineHybridPropAliases(this, [
|
|
2257
|
+
"editableTrigger",
|
|
2258
|
+
"minWidth",
|
|
2259
|
+
"maxWidth"
|
|
2260
|
+
]);
|
|
2258
2261
|
}
|
|
2259
2262
|
/** The sort config as an object: `true` → `{}`, `false` → `undefined`. */
|
|
2260
2263
|
get _sortObj() {
|
|
@@ -2266,9 +2269,11 @@ const MonoTableThCore = (superClass) => {
|
|
|
2266
2269
|
connectedCallback() {
|
|
2267
2270
|
super.connectedCallback();
|
|
2268
2271
|
this._register();
|
|
2272
|
+
if (!isServer) startMonoSizeAttributes();
|
|
2269
2273
|
}
|
|
2270
2274
|
disconnectedCallback() {
|
|
2271
2275
|
this.dataGrid?.unregisterColumn(this);
|
|
2276
|
+
this._autoSize?.stop();
|
|
2272
2277
|
super.disconnectedCallback();
|
|
2273
2278
|
}
|
|
2274
2279
|
willUpdate(changed) {
|
|
@@ -2280,6 +2285,28 @@ const MonoTableThCore = (superClass) => {
|
|
|
2280
2285
|
this.dataGrid.registerColumn(this);
|
|
2281
2286
|
this._seedSort();
|
|
2282
2287
|
}
|
|
2288
|
+
/**
|
|
2289
|
+
* `width="auto"` → hand the column to the auto-sizer (re-run on every update: each controller
|
|
2290
|
+
* notify lands here). A fixed width → written as before, and an auto-sizer left over from an
|
|
2291
|
+
* earlier `'auto'` is stopped with its px cleared. The bounds go onto the cell either way —
|
|
2292
|
+
* the auto-sizer clamps with them, an auto-layout table honours them.
|
|
2293
|
+
*/
|
|
2294
|
+
_syncWidth(cell) {
|
|
2295
|
+
if (String(this.width ?? "").trim().toLowerCase() === "auto") {
|
|
2296
|
+
const sizer = this._autoSize ??= new ColumnAutoSize(this);
|
|
2297
|
+
sizer.min = cssLengthToPx(this.minWidth ?? null, cell);
|
|
2298
|
+
sizer.max = cssLengthToPx(this.maxWidth ?? null, cell);
|
|
2299
|
+
sizer.schedule();
|
|
2300
|
+
} else {
|
|
2301
|
+
if (this._autoSize) {
|
|
2302
|
+
this._autoSize.stop(true);
|
|
2303
|
+
this._autoSize = void 0;
|
|
2304
|
+
}
|
|
2305
|
+
if (this.width != null && this.width !== "") cell.style.width = toCssSize(this.width);
|
|
2306
|
+
}
|
|
2307
|
+
cell.style.minWidth = this.minWidth != null && this.minWidth !== "" ? toCssSize(this.minWidth) : "";
|
|
2308
|
+
cell.style.maxWidth = this.maxWidth != null && this.maxWidth !== "" ? toCssSize(this.maxWidth) : "";
|
|
2309
|
+
}
|
|
2283
2310
|
/** Apply `sort.order` once, unless THIS column is already sorted (don't fight a user sort). */
|
|
2284
2311
|
_seedSort() {
|
|
2285
2312
|
if (this._seededSort) return;
|
|
@@ -2296,7 +2323,7 @@ const MonoTableThCore = (superClass) => {
|
|
|
2296
2323
|
const cell = this.closest("th, td");
|
|
2297
2324
|
if (cell) {
|
|
2298
2325
|
cell.setAttribute("aria-sort", ariaSort(this._current));
|
|
2299
|
-
|
|
2326
|
+
this._syncWidth(cell);
|
|
2300
2327
|
if (this.height != null && this.height !== "") cell.style.height = toCssSize(this.height);
|
|
2301
2328
|
cell.style.textAlign = this.align ?? "";
|
|
2302
2329
|
}
|
|
@@ -2936,6 +2963,8 @@ const MonoTableThCore = (superClass) => {
|
|
|
2936
2963
|
__decorate([state()], MonoTableThCoreClass.prototype, "_tree", void 0);
|
|
2937
2964
|
__decorate([state()], MonoTableThCoreClass.prototype, "_expanded", void 0);
|
|
2938
2965
|
__decorate([property()], MonoTableThCoreClass.prototype, "width", void 0);
|
|
2966
|
+
__decorate([property({ attribute: "min-width" })], MonoTableThCoreClass.prototype, "minWidth", void 0);
|
|
2967
|
+
__decorate([property({ attribute: "max-width" })], MonoTableThCoreClass.prototype, "maxWidth", void 0);
|
|
2939
2968
|
__decorate([property({ reflect: true })], MonoTableThCoreClass.prototype, "align", void 0);
|
|
2940
2969
|
__decorate([property()], MonoTableThCoreClass.prototype, "height", void 0);
|
|
2941
2970
|
__decorate([state()], MonoTableThCoreClass.prototype, "_filterOpen", void 0);
|
package/dist/ui/tabs.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { t as customElement } from "../mono-element-
|
|
1
|
+
import { g as monoHostChildNodes } from "../mono-ui-KOBJcnXk.js";
|
|
2
|
+
import { t as customElement } from "../mono-element-Bc9wElPy.js";
|
|
3
3
|
import { a as defineHybridPropAliases, n as arrayHasChanged, r as booleanStringConverter, t as __decorate } from "../decorate-DbYFpi8R.js";
|
|
4
4
|
import { t as dispatchMonoEvent } from "../mono-event-BPku9HpS.js";
|
|
5
|
-
import { a as parkDetachedNodes, s as placeSlotNode } from "../light-slots-
|
|
5
|
+
import { a as parkDetachedNodes, s as placeSlotNode } from "../light-slots-BnBR29E7.js";
|
|
6
6
|
import { LitElement, html, nothing, unsafeCSS } from "lit";
|
|
7
7
|
import { ref } from "lit/directives/ref.js";
|
|
8
8
|
import { property, state } from "lit/decorators.js";
|