@mono-lit/helper 0.0.4 → 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.
Files changed (173) hide show
  1. package/dist/control-tooltip-7vegYmq3.js +678 -0
  2. package/dist/{tooltip-FCMRUSLi.js → control-tooltip-C3rA_nSH.js} +12 -119
  3. package/dist/{data-source-controller-Cf_sMxEh.js → data-source-controller-C6C4ej_M.js} +1 -1
  4. package/dist/{data-source-options-Bk-UoaZV.js → data-source-options-Cz9fVLK8.js} +3 -2
  5. package/dist/{data-source-read-Cuqw3LcP.js → data-source-read-i6CYSUEl.js} +2 -1
  6. package/dist/{excel-DtRpxmxs.js → excel-BPdDt06G.js} +1 -1
  7. package/dist/{export-B91P6J1y.js → export-DgomqI_3.js} +2 -2
  8. package/dist/export.js +2 -2
  9. package/dist/{field-icons-FmyBWa0g.js → field-icons-t8rXRCKs.js} +50 -1
  10. package/dist/field-tooltip-FyMi9vNM.js +266 -0
  11. package/dist/field-tooltip.css_raw-DEctHXKm.js +270 -0
  12. package/dist/field-validation-CHHQi1zl.js +170 -0
  13. package/dist/field-validation.css_raw-B3Iu33rS.js +178 -0
  14. package/dist/{form-control-core-CIdMLXMo.js → form-control-core-rW2WvOcb.js} +1 -1
  15. package/dist/{hydration-flush-DHrl4_KK.js → hydration-flush-9AJE8FRl.js} +398 -1
  16. package/dist/index.js +6 -5
  17. package/dist/{index.node-dvrNviMx.js → index.node-tTkISFn2.js} +2 -2
  18. package/dist/index.node.js +6 -5
  19. package/dist/input-format-GrRCJBqV.js +251 -0
  20. package/dist/input.css_raw-CQu2fAsU.js +5 -0
  21. package/dist/{light-slots-DdDdZ6zs.js → light-slots-BnBR29E7.js} +1 -1
  22. package/dist/{light-slots-4ZCjOcBg.js → light-slots-Cb6e-LU3.js} +1 -1
  23. package/dist/{mono-button-CeDB9khW.js → mono-button-Cy5-Y0At.js} +3 -3
  24. package/dist/{mono-button.shadow-D9NdMsmH.js → mono-button.shadow-CIBGisyo.js} +1 -2
  25. package/dist/{mono-data-grid-BHlo1IgR.js → mono-data-grid-KDpu4d4_.js} +5 -4
  26. package/dist/{mono-element-C7vCschg.js → mono-element-Bc9wElPy.js} +1 -1
  27. package/dist/{mono-form-controller-IYn0MuUQ.js → mono-form-controller-BkMR8g14.js} +18 -3
  28. package/dist/mono-ui-KOBJcnXk.js +758 -0
  29. package/dist/{reactive-DFCdZbH9.js → normalize-error-BmLbgANw.js} +1 -48
  30. package/dist/nuxt.js +1 -1
  31. package/dist/{popup-portal-HWhkd7oy.js → popup-portal-C8ttHDRX.js} +17 -1
  32. package/dist/{popup-stack-De05Y-mJ.js → popup-stack-C64WCuXq.js} +21 -1
  33. package/dist/src/components/accordion/accordion-core.d.ts +4 -1
  34. package/dist/src/components/accordion/mono-accordion.shadow.d.ts +4 -1
  35. package/dist/src/components/date/date-core.d.ts +3 -0
  36. package/dist/src/components/date/date-types.d.ts +36 -1
  37. package/dist/src/components/drawer/drawer-core.d.ts +1 -0
  38. package/dist/src/components/dropdown-table/dropdown-table-core.d.ts +3 -0
  39. package/dist/src/components/dropdown-table/dropdown-table-types.d.ts +31 -0
  40. package/dist/src/components/form/form-types.d.ts +23 -5
  41. package/dist/src/components/input/index.d.ts +2 -2
  42. package/dist/src/components/input/index.shadow.d.ts +2 -2
  43. package/dist/src/components/input/input-core.d.ts +23 -3
  44. package/dist/src/components/input/input-types.d.ts +84 -9
  45. package/dist/src/components/input/mono-input.d.ts +3 -2
  46. package/dist/src/components/input/mono-input.shadow.d.ts +3 -2
  47. package/dist/src/components/modal/modal-core.d.ts +1 -0
  48. package/dist/src/components/otp/index.d.ts +5 -0
  49. package/dist/src/components/otp/index.shadow.d.ts +6 -0
  50. package/dist/src/components/otp/mono-otp.d.ts +32 -0
  51. package/dist/src/components/otp/mono-otp.shadow.d.ts +30 -0
  52. package/dist/src/components/otp/otp-core.d.ts +91 -0
  53. package/dist/src/components/otp/otp-types.d.ts +161 -0
  54. package/dist/src/components/otp/otp-utils.d.ts +41 -0
  55. package/dist/src/components/select/select-core.d.ts +3 -0
  56. package/dist/src/components/select/select-types.d.ts +31 -0
  57. package/dist/src/components/slider/index.d.ts +5 -0
  58. package/dist/src/components/slider/index.shadow.d.ts +6 -0
  59. package/dist/src/components/slider/mono-slider.d.ts +33 -0
  60. package/dist/src/components/slider/mono-slider.shadow.d.ts +29 -0
  61. package/dist/src/components/slider/slider-core.d.ts +77 -0
  62. package/dist/src/components/slider/slider-math.d.ts +102 -0
  63. package/dist/src/components/slider/slider-types.d.ts +188 -0
  64. package/dist/src/components/table/column-autosize.d.ts +74 -0
  65. package/dist/src/components/table/mono-data-grid.d.ts +10 -0
  66. package/dist/src/components/table/mono-table-th-core.d.ts +3 -0
  67. package/dist/src/components/table/table-types.d.ts +8 -1
  68. package/dist/src/components/tag-input/mono-tag-input.d.ts +12 -0
  69. package/dist/src/components/tag-input/mono-tag-input.shadow.d.ts +9 -1
  70. package/dist/src/components/tag-input/tag-input-core.d.ts +12 -1
  71. package/dist/src/components/tag-input/tag-input-types.d.ts +33 -0
  72. package/dist/src/components/textarea/textarea-core.d.ts +3 -0
  73. package/dist/src/components/textarea/textarea-types.d.ts +31 -0
  74. package/dist/src/composables/field-bubble.d.ts +34 -0
  75. package/dist/src/composables/field-icons.d.ts +10 -0
  76. package/dist/src/composables/field-tooltip.d.ts +52 -0
  77. package/dist/src/composables/field-validation.d.ts +58 -0
  78. package/dist/src/composables/mono-size-attrs.d.ts +10 -0
  79. package/dist/src/composables/popup-portal.d.ts +12 -0
  80. package/dist/src/composables/popup-stack.d.ts +21 -0
  81. package/dist/src/entries/index.d.ts +3 -2
  82. package/dist/src/entries/index.node.d.ts +3 -2
  83. package/dist/ssr-lit/runtime/components/LitWrapper.vue +11 -11
  84. package/dist/ssr-lit/runtime/components/LitWrapperClient.vue +11 -11
  85. package/dist/ssr-lit/runtime/components/LitWrapperServer.vue +38 -38
  86. package/dist/ssr-lit/runtime/plugins/antiFouc.server.js +25 -25
  87. package/dist/ssr-lit/runtime/plugins/hydrateSupport.client.js +4 -4
  88. package/dist/ssr-lit/runtime/plugins/polyfill.client.js +9 -9
  89. package/dist/ssr-lit/runtime/utils/customElements.js +11 -11
  90. package/dist/ssr-lit/runtime/utils/litElementRenderer.js +28 -28
  91. package/dist/{styles-D-ergrfR.js → styles-BODNpZV1.js} +1 -1
  92. package/dist/tooltip-Drekihf5.js +102 -0
  93. package/dist/tooltip-loader-3U9FTOXj.js +20 -0
  94. package/dist/tooltip-loader-Dcp9AUZn.js +23 -0
  95. package/dist/tooltip.js +3 -1
  96. package/dist/ui/accordion.js +19 -6
  97. package/dist/ui/alert.js +3 -3
  98. package/dist/ui/breadcrumb.js +3 -3
  99. package/dist/ui/button-dropdown.js +3 -3
  100. package/dist/ui/button.js +1 -1
  101. package/dist/ui/card.js +3 -3
  102. package/dist/ui/chart.js +3 -4
  103. package/dist/ui/checkbox.js +3 -3
  104. package/dist/ui/chip.js +2 -2
  105. package/dist/ui/date.js +68 -7
  106. package/dist/ui/drawer.js +14 -5
  107. package/dist/ui/dropdown-table.js +63 -9
  108. package/dist/ui/dropdown.js +6 -5
  109. package/dist/ui/file-upload.js +3 -3
  110. package/dist/ui/filter.js +2 -2
  111. package/dist/ui/form.js +1 -1
  112. package/dist/ui/index.css +4276 -2543
  113. package/dist/ui/input.js +365 -264
  114. package/dist/ui/menu.js +3 -3
  115. package/dist/ui/modal.js +15 -6
  116. package/dist/ui/nav.js +3 -3
  117. package/dist/ui/otp.js +834 -0
  118. package/dist/ui/radio.js +3 -3
  119. package/dist/ui/rich-text-editor.js +3 -4
  120. package/dist/ui/select.js +70 -7
  121. package/dist/ui/shadow/accordion.js +31 -4
  122. package/dist/ui/shadow/alert.js +2 -2
  123. package/dist/ui/shadow/breadcrumb.js +1 -1
  124. package/dist/ui/shadow/button-dropdown.js +3 -3
  125. package/dist/ui/shadow/button.js +1 -1
  126. package/dist/ui/shadow/card.js +1 -2
  127. package/dist/ui/shadow/chart.js +5 -6
  128. package/dist/ui/shadow/checkbox.js +2 -2
  129. package/dist/ui/shadow/chip.js +1 -1
  130. package/dist/ui/shadow/date.js +69 -9
  131. package/dist/ui/shadow/drawer.js +12 -3
  132. package/dist/ui/shadow/dropdown-table.js +64 -10
  133. package/dist/ui/shadow/dropdown.js +4 -3
  134. package/dist/ui/shadow/file-upload.js +2 -2
  135. package/dist/ui/shadow/filter.js +1 -2
  136. package/dist/ui/shadow/input.js +369 -264
  137. package/dist/ui/shadow/menu.js +1 -1
  138. package/dist/ui/shadow/modal.js +13 -4
  139. package/dist/ui/shadow/nav.js +1 -1
  140. package/dist/ui/shadow/otp.js +841 -0
  141. package/dist/ui/shadow/radio.js +2 -2
  142. package/dist/ui/shadow/rich-text-editor.js +2 -3
  143. package/dist/ui/shadow/select.js +74 -10
  144. package/dist/ui/shadow/sidebar.js +3 -3
  145. package/dist/ui/shadow/slider.js +1081 -0
  146. package/dist/ui/shadow/switch.js +2 -2
  147. package/dist/ui/shadow/table.js +40 -11
  148. package/dist/ui/shadow/tabs.js +1 -1
  149. package/dist/ui/shadow/tag-input.js +160 -15
  150. package/dist/ui/shadow/textarea.js +65 -5
  151. package/dist/ui/sidebar.js +5 -5
  152. package/dist/ui/slider.js +1078 -0
  153. package/dist/ui/switch.js +3 -3
  154. package/dist/ui/table.js +36 -7
  155. package/dist/ui/tabs.js +3 -3
  156. package/dist/ui/tag-input.js +167 -7
  157. package/dist/ui/textarea.js +65 -5
  158. package/dist/ui/theme/luma.css +505 -466
  159. package/dist/ui/theme/lyra.css +505 -466
  160. package/dist/ui/theme/maia.css +501 -466
  161. package/dist/ui/theme/mira.css +505 -466
  162. package/dist/ui/theme/nova.css +503 -466
  163. package/dist/ui/theme/one.css +742 -699
  164. package/dist/ui/theme/rhea.css +506 -466
  165. package/dist/ui/theme/sera.css +507 -466
  166. package/dist/ui/theme/vega.css +495 -466
  167. package/dist/{vite-DcyRlTTf.js → vite-CivRCJaf.js} +2 -0
  168. package/dist/vite.js +1 -1
  169. package/dist/vue.d.ts +10 -0
  170. package/package.json +31 -13
  171. package/dist/css-size-DWAPgQdT.js +0 -38
  172. package/dist/input.css_raw-CGESifay.js +0 -5
  173. package/dist/mono-ui-BwUc0L6B.js +0 -360
package/dist/ui/switch.js CHANGED
@@ -1,8 +1,8 @@
1
- import { l as monoHostChildNodes } from "../mono-ui-BwUc0L6B.js";
2
- import { t as customElement } from "../mono-element-C7vCschg.js";
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, i as defineHybridPropAlias, r as booleanStringConverter, t as __decorate } from "../decorate-DbYFpi8R.js";
4
4
  import { t as dispatchMonoEvent } from "../mono-event-BPku9HpS.js";
5
- import { s as placeSlotNode } from "../light-slots-DdDdZ6zs.js";
5
+ import { s as placeSlotNode } from "../light-slots-BnBR29E7.js";
6
6
  import { t as MonoFormControlCore } from "../form-control-core-CRZPZ1ru.js";
7
7
  import { LitElement, html, nothing, unsafeCSS } from "lit";
8
8
  import { property, state } from "lit/decorators.js";
package/dist/ui/table.js CHANGED
@@ -3,15 +3,14 @@ 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 { c as monoApplyPhantomOptions, d as monoPendingActive, f as monoPendingGrace, p as monoPhantomOptions, u as monoHostChildren } from "../mono-ui-BwUc0L6B.js";
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-C7vCschg.js";
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
- import { n as bucketHasContent, o as placeLightSlots, r as captureLightSlots, s as placeSlotNode } from "../light-slots-DdDdZ6zs.js";
12
- import { t as buildSizeStyle } from "../css-size-DWAPgQdT.js";
13
- import { t as PopupPortalController } from "../popup-portal-HWhkd7oy.js";
14
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-BnBR29E7.js";
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";
17
16
  import { property, query, state } from "lit/decorators.js";
@@ -2254,7 +2253,11 @@ const MonoTableThCore = (superClass) => {
2254
2253
  this._valuesError = false;
2255
2254
  this._search = "";
2256
2255
  this._fromIcon = false;
2257
- defineHybridPropAliases(this, ["editableTrigger"]);
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
- if (this.width != null && this.width !== "") cell.style.width = toCssSize(this.width);
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 { l as monoHostChildNodes } from "../mono-ui-BwUc0L6B.js";
2
- import { t as customElement } from "../mono-element-C7vCschg.js";
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-DdDdZ6zs.js";
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";