@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
@@ -1045,51 +1045,4 @@ function isCanceled(err) {
1045
1045
  }
1046
1046
 
1047
1047
  //#endregion
1048
- //#region src/composables/reactive.ts
1049
- /**
1050
- * Unwrap a `ref()` / `computed()` wrapper and a `reactive()` proxy to the raw
1051
- * target underneath. Returns the value unchanged when it isn't reactive.
1052
- */
1053
- function unwrapReactive(value) {
1054
- let out = value;
1055
- if (out && typeof out === "object" && out.__v_isRef) out = out.value;
1056
- if (out && typeof out === "object" && out.__v_raw) out = out.__v_raw;
1057
- return out;
1058
- }
1059
- /**
1060
- * Read a {@link MaybeReactive} option: call a getter, unwrap a ref/computed or a
1061
- * reactive proxy, unbox a plain `{ value }`. Never caches — the caller decides
1062
- * when "now" is.
1063
- */
1064
- function resolveMaybeReactive(option) {
1065
- if (option === void 0 || option === null) return void 0;
1066
- if (typeof option === "function") return option();
1067
- const raw = unwrapReactive(option);
1068
- if (raw && typeof raw === "object") {
1069
- const keys = Object.keys(raw);
1070
- if (keys.length === 1 && keys[0] === "value") return unwrapReactive(raw.value);
1071
- }
1072
- return raw;
1073
- }
1074
- /**
1075
- * {@link unwrapReactive}, then — for an **array** — unwrap each element too.
1076
- *
1077
- * Reading an index off a deep-reactive array yields a proxy of that element, so
1078
- * unwrapping only the container still leaves proxies inside. One level of
1079
- * elements is all the value models here need; this deliberately does not recurse
1080
- * into nested objects, which would rewrite data the consumer owns.
1081
- */
1082
- function unwrapReactiveDeep(value) {
1083
- const out = unwrapReactive(value);
1084
- if (!Array.isArray(out)) return out;
1085
- let changed = false;
1086
- const items = out.map((item) => {
1087
- const raw = unwrapReactive(item);
1088
- if (raw !== item) changed = true;
1089
- return raw;
1090
- });
1091
- return changed ? items : out;
1092
- }
1093
-
1094
- //#endregion
1095
- export { compileFilterPredicate as A, isWildcardPattern as C, searchEntryFor as D, resolveSearchEntries as E, andFilters as O, hasWildcardSearch as S, plainSearchColumns as T, searchRowPredicate as _, describeError as a, expandWildcard as b, errorTitle as c, resolveErrorMessages as d, setErrorMessages as f, resolveSearchFields as g, mergeSearchFields as h, DEFAULT_ERROR_MESSAGES as i, joinFilters as j, andPredicates as k, isCanceled as l, MonoSourceSearch as m, unwrapReactive as n, errorStatus as o, DEFAULT_SEARCH_FIELDS as p, unwrapReactiveDeep as r, errorText as s, resolveMaybeReactive as t, normalizeError as u, customPredicate as v, normalizeSearchExpr as w, hasCustomSearch as x, customRemoteClause as y };
1048
+ export { resolveSearchEntries as C, compileFilterPredicate as D, andPredicates as E, joinFilters as O, plainSearchColumns as S, andFilters as T, expandWildcard as _, errorTitle as a, isWildcardPattern as b, resolveErrorMessages as c, MonoSourceSearch as d, mergeSearchFields as f, customRemoteClause as g, customPredicate as h, errorText as i, setErrorMessages as l, searchRowPredicate as m, describeError as n, isCanceled as o, resolveSearchFields as p, errorStatus as r, normalizeError as s, DEFAULT_ERROR_MESSAGES as t, DEFAULT_SEARCH_FIELDS as u, hasCustomSearch as v, searchEntryFor as w, normalizeSearchExpr as x, hasWildcardSearch as y };
package/dist/nuxt.js CHANGED
@@ -1,4 +1,4 @@
1
- import { t as monoSsr } from "./vite-DcyRlTTf.js";
1
+ import { t as monoSsr } from "./vite-CivRCJaf.js";
2
2
  import { join } from "node:path";
3
3
  import { pathToFileURL } from "node:url";
4
4
  import { addComponent, addPlugin, addPluginTemplate, addVitePlugin, createResolver, defineNuxtModule, extendViteConfig, hasNuxtModule, tryResolveModule, useLogger } from "@nuxt/kit";
@@ -1,4 +1,4 @@
1
- import { a as unregisterPopupLayer, r as registerPopupLayer } from "./popup-stack-De05Y-mJ.js";
1
+ import { i as registerPopupLayer, n as pathInLayerAbove, o as unregisterPopupLayer } from "./popup-stack-C64WCuXq.js";
2
2
  import { isServer } from "lit";
3
3
 
4
4
  //#region src/composables/popup-portal.ts
@@ -388,10 +388,26 @@ var PopupPortalController = class {
388
388
  * in the library asks this method.
389
389
  */
390
390
  containsInPath(path) {
391
+ return this.containsEventPath(path) || this.inLayerAbove(path);
392
+ }
393
+ /**
394
+ * PopupLayer hook — this popup's OWN containment: its portaled panel or a popup
395
+ * opened from inside it. Never the layers above (that is `inLayerAbove`), so
396
+ * `pathInLayerAbove` walking the stack does not recurse.
397
+ */
398
+ containsEventPath(path) {
391
399
  if (this._portal && path.includes(this._portal)) return true;
392
400
  return this.ownsNestedInPath(path);
393
401
  }
394
402
  /**
403
+ * True when the path lands in a layer opened ABOVE this popup while it is open
404
+ * — a modal opened from a figure in this panel, say. That layer is on top of the
405
+ * panel, not outside it, so its clicks, focus and Escape are not a dismiss.
406
+ */
407
+ inLayerAbove(path) {
408
+ return this._registered && pathInLayerAbove(this, path);
409
+ }
410
+ /**
395
411
  * True when the path passes through a popup opened from INSIDE this one
396
412
  * (at any depth) — not this popup's own panel.
397
413
  *
@@ -187,6 +187,26 @@ function setExternalScrollLock(owner, wanted) {
187
187
  function getOpenPopupLayers() {
188
188
  return stack;
189
189
  }
190
+ /**
191
+ * True when an event's composed path lands inside a layer opened AFTER `layer`
192
+ * — one stacked above it.
193
+ *
194
+ * The other half of the "topmost only" rule modal and drawer apply to their own
195
+ * outside click. A dropdown open under a dialog that was opened from its panel
196
+ * (a figure in a tag-input option opening a breakdown modal) must not read a
197
+ * click or focus in that dialog as "outside": the dialog is not behind the
198
+ * panel, it is on top of it. Ownership (`pathOwnedBy`) cannot tell, because the
199
+ * dialog's element usually lives elsewhere on the page, not inside the panel.
200
+ *
201
+ * A layer opened BEFORE `layer` (the modal a dropdown sits in) is below it and
202
+ * does not count, so a click in that modal's body still closes the dropdown.
203
+ */
204
+ function pathInLayerAbove(layer, path) {
205
+ const idx = stack.indexOf(layer);
206
+ if (idx === -1) return false;
207
+ for (let i = idx + 1; i < stack.length; i++) if (stack[i].containsEventPath?.(path)) return true;
208
+ return false;
209
+ }
190
210
 
191
211
  //#endregion
192
- export { unregisterPopupLayer as a, setExternalScrollLock as i, refreshPopupStack as n, registerPopupLayer as r, getOpenPopupLayers as t };
212
+ export { setExternalScrollLock as a, registerPopupLayer as i, pathInLayerAbove as n, unregisterPopupLayer as o, refreshPopupStack as r, getOpenPopupLayers as t };
@@ -1,6 +1,6 @@
1
1
  import { AccordionColor, AccordionCssClass, AccordionSize } from "./accordion-types.js";
2
2
  import { Constructor } from "../../composables/hybird-prop.js";
3
- import { LitElement } from "lit";
3
+ import { LitElement, TemplateResult, nothing } from "lit";
4
4
  //#region src/components/accordion/accordion-core.d.ts
5
5
  /**
6
6
  * Slot regions the accordion lays out. `default` is the unnamed body region.
@@ -21,6 +21,8 @@ export declare class MonoAccordionCoreInterface {
21
21
  label: string;
22
22
  /** @deprecated alias of `subtitle` */
23
23
  description: string;
24
+ /** Leading icon — an iconify class or plain text. `slot="icon"` wins over it. */
25
+ icon: string;
24
26
  modelValue: boolean;
25
27
  disabled: boolean;
26
28
  cssClass: AccordionCssClass;
@@ -46,6 +48,7 @@ export declare class MonoAccordionCoreInterface {
46
48
  protected get _hasTitleContent(): boolean;
47
49
  protected get _hasSubtitleContent(): boolean;
48
50
  protected get _hasIconContent(): boolean;
51
+ protected _renderIconGlyph(): TemplateResult | typeof nothing;
49
52
  protected _setCssClass(value: unknown): void;
50
53
  protected _handleClick(event: Event): void;
51
54
  }
@@ -1,6 +1,6 @@
1
1
  import { Constructor } from "../../composables/hybird-prop.js";
2
2
  import { MonoAccordionCoreInterface } from "./accordion-core.js";
3
- import { LitElement, TemplateResult } from "lit";
3
+ import { LitElement, TemplateResult, nothing } from "lit";
4
4
  //#region src/components/accordion/mono-accordion.shadow.d.ts
5
5
  declare const MonoAccordionShadow_base: Constructor<MonoAccordionCoreInterface> & typeof LitElement;
6
6
  /**
@@ -23,6 +23,9 @@ export declare class MonoAccordionShadow extends MonoAccordionShadow_base {
23
23
  static styles: import("lit").CSSResult[];
24
24
  connectedCallback(): void;
25
25
  firstUpdated(changed: Map<string, unknown>): void;
26
+ protected updated(changed: Map<string, unknown>): void;
27
+ /** Iconify classes are drawn as inline SVG — page utility CSS cannot reach here. */
28
+ protected _renderIconGlyph(): TemplateResult | typeof nothing;
26
29
  /**
27
30
  * Presence of a region that may also answer to an old name (`label` →
28
31
  * `title`, `description` → `subtitle`): the union of both slots.
@@ -1,6 +1,7 @@
1
1
  import { Constructor } from "../../composables/hybird-prop.js";
2
2
  import { CssSizeValue } from "../../composables/css-size.js";
3
3
  import { DateColor, DateCssClass, DateMode, DateSize, DateType, DateValidationState, DateVariant } from "./date-types.js";
4
+ import { FieldTooltipController, FieldTooltipValue } from "../../composables/field-tooltip.js";
4
5
  import { LitElement, TemplateResult } from "lit";
5
6
  import { Options } from "flatpickr/dist/types/options";
6
7
  //#region src/components/date/date-core.d.ts
@@ -29,6 +30,8 @@ export declare class MonoDateCoreInterface {
29
30
  label?: string;
30
31
  placeholder?: string;
31
32
  helperText?: string;
33
+ tooltip: FieldTooltipValue;
34
+ protected readonly _tooltip: FieldTooltipController;
32
35
  validationState?: DateValidationState;
33
36
  validationMessage?: string;
34
37
  error: boolean;
@@ -1,4 +1,5 @@
1
1
  import { VisibilityProps } from "../../composables/visibility.js";
2
+ import { MonoTooltipOptions } from "../tooltip/tooltip-types.js";
2
3
  import { Options } from "flatpickr/dist/types/options";
3
4
  //#region src/components/date/date-types.d.ts
4
5
  /** Picker mode — drives flatpickr's calendar/time configuration. */
@@ -6,7 +7,15 @@ export type DateType = 'date' | 'datetime' | 'time';
6
7
  export type DateSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl' | 'xxl';
7
8
  export type DateColor = 'primary' | 'secondary' | 'success' | 'danger' | 'warning' | 'info' | 'teal' | 'purple' | 'neutral' | 'dark';
8
9
  export type DateVariant = 'outlined' | 'filled' | 'underlined';
9
- export type DateValidationState = 'default' | 'error' | 'success';
10
+ /** Where the label sits: above the box (default), notched into its top border (inset for filled / underlined), or beside it. */
11
+ export type DateLabelPosition = 'top' | 'notched' | 'left' | 'right';
12
+ /** Where the validation message shows: under the box (default), behind a state icon inside it, or floating under it on hover / focus. */
13
+ export type DateValidationPosition = 'bottom' | 'icon' | 'float';
14
+ /**
15
+ * `error` / `success` are the date's own names; `invalid` / `valid` are accepted as
16
+ * aliases — the names every other control (and `controlMonoForm`) uses.
17
+ */
18
+ export type DateValidationState = 'default' | 'error' | 'success' | 'invalid' | 'valid';
10
19
  /** flatpickr selection mode. */
11
20
  export type DateMode = 'single' | 'multiple' | 'range';
12
21
  export interface DateCssClass {
@@ -64,11 +73,37 @@ export interface DateProps extends VisibilityProps {
64
73
  size?: DateSize;
65
74
  color?: DateColor;
66
75
  variant?: DateVariant;
76
+ /**
77
+ * Where the label sits: `top` (above the box, default), `notched` (on the top
78
+ * border for outlined; inset inside the box for filled / underlined), or
79
+ * `left` / `right` of the box. Knobs: `--mono-date-label-width`, `-label-side-gap`,
80
+ * `-label-notch-font-size`, `-label-notch-bg`.
81
+ */
82
+ labelPosition?: DateLabelPosition;
83
+ 'label-position'?: DateLabelPosition;
84
+ labelposition?: DateLabelPosition;
85
+ /**
86
+ * Where the validation message shows. `bottom` (default): the row under the box.
87
+ * `icon`: a state icon inside the box; hover / tap / keyboard focus shows the message in
88
+ * a state-coloured bubble. `float`: the message floats under the box only while the field
89
+ * is hovered or focused. In `icon` / `float` the row under the box keeps the helper text.
90
+ */
91
+ validationPosition?: DateValidationPosition;
92
+ 'validation-position'?: DateValidationPosition;
93
+ validationposition?: DateValidationPosition;
67
94
  /** Field label + helper / validation messaging. */
68
95
  label?: string;
69
96
  placeholder?: string;
70
97
  helperText?: string;
71
98
  'helper-text'?: string;
99
+ /**
100
+ * Info icon at the end of the label; hovering, focusing or tapping it shows this text.
101
+ * Plain text → a small built-in bubble (no dependency). Full tooltip options
102
+ * (`:tooltip.prop="{ content, placement, color }"`) → a `mono-tooltip`, which needs the
103
+ * optional `@floating-ui/dom` + `@floating-ui/core` peers (without them that form renders
104
+ * no icon). Shown only beside a label.
105
+ */
106
+ tooltip?: string | MonoTooltipOptions;
72
107
  validationState?: DateValidationState;
73
108
  'validation-state'?: DateValidationState;
74
109
  validationMessage?: string;
@@ -56,6 +56,7 @@ export declare class MonoDrawerCoreInterface implements PopupLayer {
56
56
  get hasBackdrop(): boolean;
57
57
  get pinnedZ(): number | undefined;
58
58
  onStackEscape(event: KeyboardEvent): void;
59
+ containsEventPath(path: EventTarget[]): boolean;
59
60
  setStackZ(z: number, isTopBackdrop: boolean): void;
60
61
  protected _slotsCaptured: boolean;
61
62
  protected _hasHeaderSlotState: boolean;
@@ -1,6 +1,7 @@
1
1
  import { Constructor } from "../../composables/hybird-prop.js";
2
2
  import { CssSizeValue } from "../../composables/css-size.js";
3
3
  import { DropdownPlacement } from "../dropdown/dropdown-types.js";
4
+ import { FieldTooltipController, FieldTooltipValue } from "../../composables/field-tooltip.js";
4
5
  import { PopupPortalController } from "../../composables/popup-portal.js";
5
6
  import { DropdownPanelOptions, DropdownTableChipProps, DropdownTableColor, DropdownTableCssClass, DropdownTableSize, DropdownTableValidationState, DropdownTableVariant } from "./dropdown-table-types.js";
6
7
  import { MonoDropdownController } from "./mono-data-dropdown.js";
@@ -15,6 +16,8 @@ export declare class MonoDropdownTableCoreInterface {
15
16
  label: string;
16
17
  placeholder: string;
17
18
  helperText: string;
19
+ tooltip: FieldTooltipValue;
20
+ protected readonly _tooltip: FieldTooltipController;
18
21
  validationState: DropdownTableValidationState;
19
22
  validationMessage: string;
20
23
  errorMessage: string;
@@ -2,6 +2,7 @@ import { CssSizeValue, PanelSizeProps } from "../../composables/css-size.js";
2
2
  import { DropdownPlacement } from "../dropdown/dropdown-types.js";
3
3
  import { VisibilityProps } from "../../composables/visibility.js";
4
4
  import { ChipBehaviour, ChipColor, ChipCssClass, ChipRounded, ChipSize, ChipVariant } from "../chip/chip-types.js";
5
+ import { MonoTooltipOptions } from "../tooltip/tooltip-types.js";
5
6
  import { ChipLimitProps } from "../../composables/chip-limits.js";
6
7
  import { MonoDropdownController, MonoDropdownItem } from "./mono-data-dropdown.js";
7
8
  //#region src/components/dropdown-table/dropdown-table-types.d.ts
@@ -62,6 +63,10 @@ export type DropdownTableSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl' | 'xxl';
62
63
  export type DropdownTableColor = 'primary' | 'secondary' | 'success' | 'danger' | 'warning' | 'info' | 'teal' | 'purple' | 'neutral' | 'dark';
63
64
  /** Field style variant. */
64
65
  export type DropdownTableVariant = 'outlined' | 'filled' | 'underlined';
66
+ /** Where the label sits: above the box (default), notched into its top border (inset for filled / underlined), or beside it. */
67
+ export type DropdownTableLabelPosition = 'top' | 'notched' | 'left' | 'right';
68
+ /** Where the validation message shows: under the box (default), behind a state icon inside it, or floating under it on hover / focus. */
69
+ export type DropdownTableValidationPosition = 'bottom' | 'icon' | 'float';
65
70
  /** Validation appearance. */
66
71
  export type DropdownTableValidationState = 'default' | 'valid' | 'invalid' | 'warning';
67
72
  /**
@@ -133,6 +138,24 @@ export interface DropdownTableProps extends VisibilityProps {
133
138
  color?: DropdownTableColor;
134
139
  /** Field style variant. */
135
140
  variant?: DropdownTableVariant;
141
+ /**
142
+ * Where the label sits: `top` (above the box, default), `notched` (on the top
143
+ * border for outlined; inset inside the box for filled / underlined), or
144
+ * `left` / `right` of the box. Knobs: `--mono-dropdown-table-label-width`, `-label-side-gap`,
145
+ * `-label-notch-font-size`, `-label-notch-bg`.
146
+ */
147
+ labelPosition?: DropdownTableLabelPosition;
148
+ 'label-position'?: DropdownTableLabelPosition;
149
+ labelposition?: DropdownTableLabelPosition;
150
+ /**
151
+ * Where the validation message shows. `bottom` (default): the row under the box.
152
+ * `icon`: a state icon inside the box; hover / tap / keyboard focus shows the message in
153
+ * a state-coloured bubble. `float`: the message floats under the box only while the field
154
+ * is hovered or focused. In `icon` / `float` the row under the box keeps the helper text.
155
+ */
156
+ validationPosition?: DropdownTableValidationPosition;
157
+ 'validation-position'?: DropdownTableValidationPosition;
158
+ validationposition?: DropdownTableValidationPosition;
136
159
  /** Text label shown above the field. */
137
160
  label?: string;
138
161
  /** Placeholder shown in the field when nothing is selected. */
@@ -140,6 +163,14 @@ export interface DropdownTableProps extends VisibilityProps {
140
163
  /** Helper text shown below the field. */
141
164
  helperText?: string;
142
165
  'helper-text'?: string;
166
+ /**
167
+ * Info icon at the end of the label; hovering, focusing or tapping it shows this text.
168
+ * Plain text → a small built-in bubble (no dependency). Full tooltip options
169
+ * (`:tooltip.prop="{ content, placement, color }"`) → a `mono-tooltip`, which needs the
170
+ * optional `@floating-ui/dom` + `@floating-ui/core` peers (without them that form renders
171
+ * no icon). Shown only beside a label.
172
+ */
173
+ tooltip?: string | MonoTooltipOptions;
143
174
  /** Validation state controlling the field's appearance. */
144
175
  validationState?: DropdownTableValidationState;
145
176
  'validation-state'?: DropdownTableValidationState;
@@ -10,6 +10,8 @@ import { RichTextEditorEvents, RichTextEditorProps } from "../rich-text-editor/r
10
10
  import { TagInputEvents, TagInputProps } from "../tag-input/tag-input-types.js";
11
11
  import { RadioEvents, RadioProps } from "../radio/radio-types.js";
12
12
  import { SwitchEvents, SwitchProps } from "../switch/switch-types.js";
13
+ import { SliderEvents, SliderProps } from "../slider/slider-types.js";
14
+ import { OtpEvents, OtpProps } from "../otp/otp-types.js";
13
15
  //#region src/components/form/form-types.d.ts
14
16
  /**
15
17
  * Tag name → its props, so `inputs[key].props` and `setProp()` autocomplete against the
@@ -32,6 +34,8 @@ export interface MonoFormComponentProps {
32
34
  'mono-checkbox': Partial<CheckboxProps> & MonoEventProps<CheckboxEvents>;
33
35
  'mono-radio': Partial<RadioProps> & MonoEventProps<RadioEvents>;
34
36
  'mono-switch': Partial<SwitchProps> & MonoEventProps<SwitchEvents>;
37
+ 'mono-slider': Partial<SliderProps> & MonoEventProps<SliderEvents>;
38
+ 'mono-otp': Partial<OtpProps> & MonoEventProps<OtpEvents>;
35
39
  }
36
40
  /** Every component `monoForm` can drive. */
37
41
  export type MonoFormComponent = keyof MonoFormComponentProps;
@@ -52,13 +56,27 @@ export interface MonoFormRuleCtx<V = unknown> {
52
56
  key: string;
53
57
  }
54
58
  /**
55
- * Anything schema-shaped — yup and friends. Duck-typed on purpose: @mono-lit/helper
56
- * takes no validation dependency, so any object exposing `validateSync` (or an
57
- * async `validate`) works, and the thrown error's `message` becomes the message.
59
+ * Anything schema-shaped. Duck-typed on purpose: @mono-lit/helper takes no
60
+ * validation dependency. Two shapes are accepted:
61
+ * - yup-shaped: `validateSync` (or an async `validate`) that throws; the
62
+ * error's `errors[0]` / `message` becomes the message.
63
+ * - Standard Schema v1 (Valibot, Zod, ArkType, …): `['~standard'].validate`;
64
+ * the first issue's `message` becomes the message.
58
65
  */
59
66
  export interface MonoFormSchemaLike {
60
- validateSync?: (value: unknown, options?: unknown) => unknown;
61
- validate?: (value: unknown, options?: unknown) => unknown;
67
+ validateSync?: (value: unknown, options?: any) => unknown;
68
+ validate?: (value: unknown, options?: any) => unknown;
69
+ readonly '~standard'?: {
70
+ readonly validate: (value: unknown) => {
71
+ readonly issues?: ReadonlyArray<{
72
+ readonly message: string;
73
+ }> | undefined;
74
+ } | Promise<{
75
+ readonly issues?: ReadonlyArray<{
76
+ readonly message: string;
77
+ }> | undefined;
78
+ }>;
79
+ };
62
80
  }
63
81
  interface MonoFormRuleBase {
64
82
  /** Overrides the form-level `validation.type` for this rule only. */
@@ -1,6 +1,6 @@
1
1
  /// <reference path="../../../vue.d.ts" />
2
2
  import { InputFormat, InputFormatCtx, InputFormatDescriptor, InputFormatOn, applyFormat, caretAfterFormat, localeSeparators, normaliseValue, parseFormat, resolveFormat, significantFor, stripFormat } from "./input-format.js";
3
- import { InputColor, InputEvents, InputProps, InputSize, InputType, InputVariant } from "./input-types.js";
3
+ import { InputColor, InputEvents, InputFileErrorEventDetail, InputModelEventDetail, InputModelValue, InputProps, InputSize, InputType, InputVariant } from "./input-types.js";
4
4
  import { MonoInput } from "./mono-input.js";
5
5
  import { generateInputAriaAttributes, generateInputAttributes, getInputIcon, validateInputProps } from "./input-utils.js";
6
- export { type InputColor, type InputEvents, type InputFormat, type InputFormatCtx, type InputFormatDescriptor, type InputFormatOn, type InputProps, type InputSize, type InputType, type InputVariant, MonoInput, applyFormat, caretAfterFormat, generateInputAriaAttributes, generateInputAttributes, getInputIcon, localeSeparators, normaliseValue, parseFormat, resolveFormat, significantFor, stripFormat, validateInputProps };
6
+ export { type InputColor, type InputEvents, type InputFileErrorEventDetail, type InputFormat, type InputFormatCtx, type InputFormatDescriptor, type InputFormatOn, type InputModelEventDetail, type InputModelValue, type InputProps, type InputSize, type InputType, type InputVariant, MonoInput, applyFormat, caretAfterFormat, generateInputAriaAttributes, generateInputAttributes, getInputIcon, localeSeparators, normaliseValue, parseFormat, resolveFormat, significantFor, stripFormat, validateInputProps };
@@ -1,7 +1,7 @@
1
1
  /// <reference path="../../../vue.d.ts" />
2
2
  import { InputFormat, InputFormatCtx, InputFormatDescriptor, InputFormatOn, applyFormat, caretAfterFormat, localeSeparators, normaliseValue, parseFormat, resolveFormat, significantFor, stripFormat } from "./input-format.js";
3
- import { InputColor, InputEvents, InputProps, InputSize, InputType, InputVariant } from "./input-types.js";
3
+ import { InputColor, InputEvents, InputFileErrorEventDetail, InputModelEventDetail, InputModelValue, InputProps, InputSize, InputType, InputVariant } from "./input-types.js";
4
4
  import { InputSlotName, MonoInputCore } from "./input-core.js";
5
5
  import { generateInputAriaAttributes, generateInputAttributes, getInputIcon, validateInputProps } from "./input-utils.js";
6
6
  import { MonoInputShadow } from "./mono-input.shadow.js";
7
- export { type InputColor, type InputEvents, type InputFormat, type InputFormatCtx, type InputFormatDescriptor, type InputFormatOn, type InputProps, type InputSize, type InputSlotName, type InputType, type InputVariant, MonoInputCore, MonoInputShadow, applyFormat, caretAfterFormat, generateInputAriaAttributes, generateInputAttributes, getInputIcon, localeSeparators, normaliseValue, parseFormat, resolveFormat, significantFor, stripFormat, validateInputProps };
7
+ export { type InputColor, type InputEvents, type InputFileErrorEventDetail, type InputFormat, type InputFormatCtx, type InputFormatDescriptor, type InputFormatOn, type InputModelEventDetail, type InputModelValue, type InputProps, type InputSize, type InputSlotName, type InputType, type InputVariant, MonoInputCore, MonoInputShadow, applyFormat, caretAfterFormat, generateInputAriaAttributes, generateInputAttributes, getInputIcon, localeSeparators, normaliseValue, parseFormat, resolveFormat, significantFor, stripFormat, validateInputProps };
@@ -1,7 +1,9 @@
1
1
  import { Constructor } from "../../composables/hybird-prop.js";
2
2
  import { CssSizeValue, buildSizeStyle } from "../../composables/css-size.js";
3
+ import { FieldTooltipController, FieldTooltipValue } from "../../composables/field-tooltip.js";
3
4
  import { InputFormat, InputFormatOn } from "./input-format.js";
4
- import { InputColor, InputCssClass, InputSize, InputType, InputValidationState, InputVariant } from "./input-types.js";
5
+ import { InputColor, InputCssClass, InputModelValue, InputSize, InputType, InputValidationState, InputVariant } from "./input-types.js";
6
+ import { FieldValidationController } from "../../composables/field-validation.js";
5
7
  import { LitElement, TemplateResult, nothing } from "lit";
6
8
  //#region src/components/input/input-core.d.ts
7
9
  export declare const numberStringConverter: {
@@ -9,6 +11,8 @@ export declare const numberStringConverter: {
9
11
  toAttribute(value: number | undefined): string | null;
10
12
  };
11
13
  export type InputSlotName = 'prefix' | 'suffix' | 'label' | 'helper';
14
+ /** Glyphs the builds draw: the clear `×`, and the `type="file"` upload cloud. */
15
+ export type InputIconName = 'close' | 'upload';
12
16
  /** Public surface added by the core mixin (for typing the wrappers + tag map). */
13
17
  export declare class MonoInputCoreInterface {
14
18
  cssClass: InputCssClass;
@@ -17,7 +21,11 @@ export declare class MonoInputCoreInterface {
17
21
  size: InputSize;
18
22
  color: InputColor;
19
23
  variant: InputVariant;
20
- modelValue: string;
24
+ modelValue: InputModelValue;
25
+ accept: string;
26
+ multiple: boolean;
27
+ maxFileSize?: number;
28
+ showValue: boolean;
21
29
  formatDisplay?: InputFormat;
22
30
  formatValue?: InputFormat;
23
31
  formatOn: InputFormatOn;
@@ -27,6 +35,14 @@ export declare class MonoInputCoreInterface {
27
35
  placeholder: string;
28
36
  label: string;
29
37
  helperText: string;
38
+ tooltip: FieldTooltipValue;
39
+ protected readonly _tooltip: FieldTooltipController;
40
+ protected readonly _validation: FieldValidationController;
41
+ protected get _validationNotice(): {
42
+ state: string;
43
+ text: string;
44
+ } | null;
45
+ protected _renderMovedMessage(): TemplateResult;
30
46
  validationState: InputValidationState;
31
47
  validationMessage: string;
32
48
  error: boolean;
@@ -69,12 +85,16 @@ export declare class MonoInputCoreInterface {
69
85
  protected readonly _resolvedValidationState: InputValidationState;
70
86
  protected readonly _wrapperClasses: string;
71
87
  protected readonly _fieldClasses: string;
88
+ protected readonly _isFile: boolean;
89
+ protected readonly _isRange: boolean;
72
90
  protected _cls(base: string, key: keyof InputCssClass): string;
73
91
  protected _sizeStyle(): ReturnType<typeof buildSizeStyle>;
74
92
  protected _renderWrapper(inner: TemplateResult): TemplateResult;
75
93
  protected _renderNative(): TemplateResult;
76
94
  protected _renderClear(): TemplateResult | typeof nothing;
77
- protected renderIcon(name: 'close'): TemplateResult;
95
+ protected _renderFileIcon(): TemplateResult | typeof nothing;
96
+ protected _renderRangeValue(where: 'label' | 'field'): TemplateResult | typeof nothing;
97
+ protected renderIcon(name: InputIconName): TemplateResult;
78
98
  }
79
99
  /**
80
100
  * `MonoInputCore` — all render-mode-agnostic logic for `mono-input`: reactive
@@ -1,17 +1,29 @@
1
1
  import { VisibilityProps } from "../../composables/visibility.js";
2
+ import { MonoTooltipOptions } from "../tooltip/tooltip-types.js";
2
3
  import { InputFormat, InputFormatCtx, InputFormatOn } from "./input-format.js";
3
4
  //#region src/components/input/input-types.d.ts
4
- export type InputType = 'text' | 'email' | 'password' | 'number' | 'tel' | 'url' | 'date' | 'time' | 'month' | 'week' | 'search';
5
+ export type InputType = 'text' | 'email' | 'password' | 'number' | 'tel' | 'url' | 'date' | 'time' | 'month' | 'week' | 'search' | 'file' | 'range';
5
6
  export type InputSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl' | 'xxl';
6
7
  export type InputVariant = 'outlined' | 'filled' | 'underlined';
8
+ /** Where the label sits: above the box (default), notched into its top border (inset for filled / underlined), or beside it. */
9
+ export type InputLabelPosition = 'top' | 'notched' | 'left' | 'right';
10
+ /** Where the validation message shows: under the box (default), behind a state icon inside it, or floating under it on hover / focus. */
11
+ export type InputValidationPosition = 'bottom' | 'icon' | 'float';
7
12
  export type InputColor = 'primary' | 'secondary' | 'success' | 'danger' | 'warning' | 'info' | 'teal' | 'purple' | 'neutral' | 'dark';
8
13
  export type InputValidationState = 'default' | 'valid' | 'invalid' | 'warning';
14
+ /**
15
+ * What `modelValue` holds: the text for every text-like type; for `type="file"` the picked
16
+ * `File` (`null` when empty), or `File[]` with `multiple`.
17
+ */
18
+ export type InputModelValue = string | File | File[] | null;
9
19
  export type InputModelEventDetail = {
10
- modelValue: string;
11
- currentValue: string;
12
- oldValue: string;
13
- value: string;
20
+ modelValue: InputModelValue;
21
+ currentValue: InputModelValue;
22
+ oldValue: InputModelValue;
23
+ value: InputModelValue;
14
24
  name?: string;
25
+ /** `type="file"` only — the picked files, always as an array. */
26
+ files?: File[];
15
27
  sourceEvent?: Event;
16
28
  /** What the field is SHOWING — differs from `value` once a `format-display` is set. */
17
29
  displayValue?: string;
@@ -25,10 +37,23 @@ export interface InputCssClass {
25
37
  native?: string;
26
38
  clear?: string;
27
39
  suffix?: string;
40
+ /** `type="file"` — the upload icon at the end of the field. */
41
+ fileIcon?: string;
42
+ /** `type="range"` — the value readout (end of the label row, or after the slider). */
43
+ rangeValue?: string;
28
44
  messageWrap?: string;
29
45
  message?: string;
30
46
  }
31
47
  export type InputModelEvent = CustomEvent<InputModelEventDetail>;
48
+ /** `type="file"` — a picked file was rejected (same shape as `mono-file-upload`'s `error`). */
49
+ export type InputFileErrorEventDetail = {
50
+ message: string;
51
+ reason: 'max-file-size';
52
+ file?: File;
53
+ maxFileSize?: number;
54
+ sourceEvent?: Event;
55
+ };
56
+ export type InputFileErrorEvent = CustomEvent<InputFileErrorEventDetail>;
32
57
  export interface InputProps extends VisibilityProps {
33
58
  /** Native input type controlling the field's behavior and keyboard. */
34
59
  type?: InputType;
@@ -38,16 +63,54 @@ export interface InputProps extends VisibilityProps {
38
63
  color?: InputColor;
39
64
  /** Visual style of the field (outlined, filled, or underlined). */
40
65
  variant?: InputVariant;
66
+ /**
67
+ * Where the label sits: `top` (above the box, default), `notched` (on the top
68
+ * border for outlined; inset inside the box for filled / underlined), or
69
+ * `left` / `right` of the box. Knobs: `--mono-input-label-width`, `-label-side-gap`,
70
+ * `-label-notch-font-size`, `-label-notch-bg`.
71
+ */
72
+ labelPosition?: InputLabelPosition;
73
+ 'label-position'?: InputLabelPosition;
74
+ labelposition?: InputLabelPosition;
75
+ /**
76
+ * Where the validation message shows. `bottom` (default): the row under the box.
77
+ * `icon`: a state icon inside the box; hover / tap / keyboard focus shows the message in
78
+ * a state-coloured bubble. `float`: the message floats under the box only while the field
79
+ * is hovered or focused. In `icon` / `float` the row under the box keeps the helper text.
80
+ */
81
+ validationPosition?: InputValidationPosition;
82
+ 'validation-position'?: InputValidationPosition;
83
+ validationposition?: InputValidationPosition;
41
84
  /** Placeholder text shown when the field is empty. */
42
85
  placeholder?: string;
43
86
  /** Current input value. */
44
87
  value?: string | number;
45
88
  /** Form field name submitted with the input. */
46
89
  name?: string;
47
- /** Two-way bound value for v-model-style usage. */
48
- modelValue?: string;
49
- 'model-value'?: string;
50
- modelvalue?: string;
90
+ /**
91
+ * Two-way bound value for v-model-style usage. For `type="file"` it is the picked `File`
92
+ * (`null` when empty), or `File[]` with `multiple`.
93
+ */
94
+ modelValue?: InputModelValue;
95
+ 'model-value'?: InputModelValue;
96
+ modelvalue?: InputModelValue;
97
+ /** `type="file"` — the native `accept` filter (`"image/*,.pdf"`). */
98
+ accept?: string;
99
+ /** `type="file"` — allow picking several files; `modelValue` becomes `File[]`. */
100
+ multiple?: boolean;
101
+ /** `type="file"` — reject files larger than this many bytes (emits `error`). */
102
+ maxFileSize?: number;
103
+ 'max-file-size'?: number;
104
+ maxfilesize?: number;
105
+ /**
106
+ * `type="range"` — show the current value beside the slider (default `true`): at the end of
107
+ * the label row, or after the slider when there is no label. It is drawn through
108
+ * `format-display`, so `format-display="Rp {}"` or a function shapes it. `show-value="false"`
109
+ * hides it.
110
+ */
111
+ showValue?: boolean;
112
+ 'show-value'?: boolean;
113
+ showvalue?: boolean;
51
114
  /**
52
115
  * How the field is DISPLAYED — a pattern (`#,##0.##`, `{}@gmail.com`) or a function.
53
116
  * Never changes the value. A numeric pattern requires `type="text"`.
@@ -86,6 +149,14 @@ export interface InputProps extends VisibilityProps {
86
149
  helperText?: string;
87
150
  'helper-text'?: string;
88
151
  helpertext?: string;
152
+ /**
153
+ * Info icon at the end of the label; hovering, focusing or tapping it shows this text.
154
+ * Plain text → a small built-in bubble (no dependency). Full tooltip options
155
+ * (`:tooltip.prop="{ content, placement, color }"`) → a `mono-tooltip`, which needs the
156
+ * optional `@floating-ui/dom` + `@floating-ui/core` peers (without them that form renders
157
+ * no icon). Shown only beside a label.
158
+ */
159
+ tooltip?: string | MonoTooltipOptions;
89
160
  /** Explicit validation state for styling and messaging. */
90
161
  validationState?: InputValidationState;
91
162
  'validation-state'?: InputValidationState;
@@ -170,12 +241,16 @@ export interface InputEvents {
170
241
  input: InputModelEvent;
171
242
  change: InputModelEvent;
172
243
  clear: InputModelEvent;
244
+ /** `type="file"` — a picked file was rejected. */
245
+ error: InputFileErrorEvent;
173
246
  'mno-input': InputModelEvent;
174
247
  mnoInput: InputModelEvent;
175
248
  'mno-change': InputModelEvent;
176
249
  mnoChange: InputModelEvent;
177
250
  'mno-clear': InputModelEvent;
178
251
  mnoClear: InputModelEvent;
252
+ 'mno-error': InputFileErrorEvent;
253
+ mnoError: InputFileErrorEvent;
179
254
  }
180
255
  //#endregion
181
256
  export type { InputFormat, InputFormatCtx, InputFormatOn };
@@ -1,5 +1,5 @@
1
1
  import { Constructor } from "../../composables/hybird-prop.js";
2
- import { MonoInputCoreInterface } from "./input-core.js";
2
+ import { InputIconName, MonoInputCoreInterface } from "./input-core.js";
3
3
  import { LitElement, TemplateResult } from "lit";
4
4
  //#region src/components/input/mono-input.d.ts
5
5
  declare const MonoInput_base: Constructor<MonoInputCoreInterface> & typeof LitElement;
@@ -36,9 +36,10 @@ export declare class MonoInput extends MonoInput_base {
36
36
  disconnectedCallback(): void;
37
37
  protected updated(changed: Map<string, unknown>): void;
38
38
  private _placeSlot;
39
- protected renderIcon(_name: 'close'): TemplateResult;
39
+ protected renderIcon(name: InputIconName): TemplateResult;
40
40
  private _renderLabel;
41
41
  private _renderHelper;
42
+ private _renderHelperText;
42
43
  protected render(): TemplateResult;
43
44
  }
44
45
  declare global {