@mono-lit/helper 0.0.4 → 0.0.5

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 (133) 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/index.js +4 -3
  15. package/dist/{index.node-dvrNviMx.js → index.node-DzCuvHLg.js} +1 -1
  16. package/dist/index.node.js +4 -3
  17. package/dist/input-format-GrRCJBqV.js +251 -0
  18. package/dist/input.css_raw-CQu2fAsU.js +5 -0
  19. package/dist/{mono-data-grid-BHlo1IgR.js → mono-data-grid-KDpu4d4_.js} +5 -4
  20. package/dist/{mono-form-controller-IYn0MuUQ.js → mono-form-controller-BkMR8g14.js} +18 -3
  21. package/dist/{reactive-DFCdZbH9.js → normalize-error-BmLbgANw.js} +1 -48
  22. package/dist/nuxt.js +1 -1
  23. package/dist/{popup-portal-HWhkd7oy.js → popup-portal-C8ttHDRX.js} +17 -1
  24. package/dist/{popup-stack-De05Y-mJ.js → popup-stack-C64WCuXq.js} +21 -1
  25. package/dist/src/components/accordion/accordion-core.d.ts +4 -1
  26. package/dist/src/components/accordion/mono-accordion.shadow.d.ts +4 -1
  27. package/dist/src/components/date/date-core.d.ts +3 -0
  28. package/dist/src/components/date/date-types.d.ts +36 -1
  29. package/dist/src/components/drawer/drawer-core.d.ts +1 -0
  30. package/dist/src/components/dropdown-table/dropdown-table-core.d.ts +3 -0
  31. package/dist/src/components/dropdown-table/dropdown-table-types.d.ts +31 -0
  32. package/dist/src/components/form/form-types.d.ts +23 -5
  33. package/dist/src/components/input/index.d.ts +2 -2
  34. package/dist/src/components/input/index.shadow.d.ts +2 -2
  35. package/dist/src/components/input/input-core.d.ts +23 -3
  36. package/dist/src/components/input/input-types.d.ts +84 -9
  37. package/dist/src/components/input/mono-input.d.ts +3 -2
  38. package/dist/src/components/input/mono-input.shadow.d.ts +3 -2
  39. package/dist/src/components/modal/modal-core.d.ts +1 -0
  40. package/dist/src/components/otp/index.d.ts +5 -0
  41. package/dist/src/components/otp/index.shadow.d.ts +6 -0
  42. package/dist/src/components/otp/mono-otp.d.ts +32 -0
  43. package/dist/src/components/otp/mono-otp.shadow.d.ts +30 -0
  44. package/dist/src/components/otp/otp-core.d.ts +91 -0
  45. package/dist/src/components/otp/otp-types.d.ts +161 -0
  46. package/dist/src/components/otp/otp-utils.d.ts +41 -0
  47. package/dist/src/components/select/select-core.d.ts +3 -0
  48. package/dist/src/components/select/select-types.d.ts +31 -0
  49. package/dist/src/components/slider/index.d.ts +5 -0
  50. package/dist/src/components/slider/index.shadow.d.ts +6 -0
  51. package/dist/src/components/slider/mono-slider.d.ts +33 -0
  52. package/dist/src/components/slider/mono-slider.shadow.d.ts +29 -0
  53. package/dist/src/components/slider/slider-core.d.ts +77 -0
  54. package/dist/src/components/slider/slider-math.d.ts +102 -0
  55. package/dist/src/components/slider/slider-types.d.ts +188 -0
  56. package/dist/src/components/tag-input/tag-input-core.d.ts +3 -0
  57. package/dist/src/components/tag-input/tag-input-types.d.ts +31 -0
  58. package/dist/src/components/textarea/textarea-core.d.ts +3 -0
  59. package/dist/src/components/textarea/textarea-types.d.ts +31 -0
  60. package/dist/src/composables/field-bubble.d.ts +34 -0
  61. package/dist/src/composables/field-icons.d.ts +10 -0
  62. package/dist/src/composables/field-tooltip.d.ts +52 -0
  63. package/dist/src/composables/field-validation.d.ts +58 -0
  64. package/dist/src/composables/popup-portal.d.ts +12 -0
  65. package/dist/src/composables/popup-stack.d.ts +21 -0
  66. package/dist/src/entries/index.d.ts +1 -1
  67. package/dist/src/entries/index.node.d.ts +1 -1
  68. package/dist/ssr-lit/runtime/components/LitWrapper.vue +11 -11
  69. package/dist/ssr-lit/runtime/components/LitWrapperClient.vue +11 -11
  70. package/dist/ssr-lit/runtime/components/LitWrapperServer.vue +38 -38
  71. package/dist/ssr-lit/runtime/plugins/antiFouc.server.js +25 -25
  72. package/dist/ssr-lit/runtime/plugins/hydrateSupport.client.js +4 -4
  73. package/dist/ssr-lit/runtime/plugins/polyfill.client.js +9 -9
  74. package/dist/ssr-lit/runtime/utils/customElements.js +11 -11
  75. package/dist/ssr-lit/runtime/utils/litElementRenderer.js +28 -28
  76. package/dist/{styles-D-ergrfR.js → styles-BODNpZV1.js} +1 -1
  77. package/dist/tooltip-Drekihf5.js +102 -0
  78. package/dist/tooltip-loader-3U9FTOXj.js +20 -0
  79. package/dist/tooltip-loader-Dcp9AUZn.js +23 -0
  80. package/dist/tooltip.js +3 -1
  81. package/dist/ui/accordion.js +16 -3
  82. package/dist/ui/alert.js +2 -2
  83. package/dist/ui/breadcrumb.js +1 -1
  84. package/dist/ui/button-dropdown.js +1 -1
  85. package/dist/ui/chart.js +1 -1
  86. package/dist/ui/date.js +66 -5
  87. package/dist/ui/drawer.js +11 -2
  88. package/dist/ui/dropdown-table.js +60 -5
  89. package/dist/ui/dropdown.js +3 -2
  90. package/dist/ui/file-upload.js +1 -1
  91. package/dist/ui/form.js +1 -1
  92. package/dist/ui/index.css +8857 -3974
  93. package/dist/ui/input.js +362 -260
  94. package/dist/ui/menu.js +1 -1
  95. package/dist/ui/modal.js +11 -2
  96. package/dist/ui/otp.js +835 -0
  97. package/dist/ui/select.js +67 -3
  98. package/dist/ui/shadow/accordion.js +31 -4
  99. package/dist/ui/shadow/alert.js +1 -1
  100. package/dist/ui/shadow/button-dropdown.js +1 -1
  101. package/dist/ui/shadow/chart.js +4 -4
  102. package/dist/ui/shadow/date.js +67 -6
  103. package/dist/ui/shadow/drawer.js +11 -2
  104. package/dist/ui/shadow/dropdown-table.js +62 -7
  105. package/dist/ui/shadow/dropdown.js +3 -2
  106. package/dist/ui/shadow/input.js +367 -261
  107. package/dist/ui/shadow/modal.js +11 -2
  108. package/dist/ui/shadow/otp.js +842 -0
  109. package/dist/ui/shadow/select.js +71 -6
  110. package/dist/ui/shadow/sidebar.js +2 -2
  111. package/dist/ui/shadow/slider.js +1082 -0
  112. package/dist/ui/shadow/table.js +6 -6
  113. package/dist/ui/shadow/tag-input.js +72 -7
  114. package/dist/ui/shadow/textarea.js +63 -2
  115. package/dist/ui/sidebar.js +2 -2
  116. package/dist/ui/slider.js +1079 -0
  117. package/dist/ui/table.js +2 -2
  118. package/dist/ui/tag-input.js +67 -3
  119. package/dist/ui/textarea.js +62 -1
  120. package/dist/ui/theme/luma.css +505 -466
  121. package/dist/ui/theme/lyra.css +505 -466
  122. package/dist/ui/theme/maia.css +501 -466
  123. package/dist/ui/theme/mira.css +505 -466
  124. package/dist/ui/theme/nova.css +503 -466
  125. package/dist/ui/theme/one.css +742 -699
  126. package/dist/ui/theme/rhea.css +506 -466
  127. package/dist/ui/theme/sera.css +507 -466
  128. package/dist/ui/theme/vega.css +495 -466
  129. package/dist/{vite-DcyRlTTf.js → vite-CivRCJaf.js} +2 -0
  130. package/dist/vite.js +1 -1
  131. package/dist/vue.d.ts +10 -0
  132. package/package.json +31 -13
  133. package/dist/input.css_raw-CGESifay.js +0 -5
@@ -0,0 +1,270 @@
1
+ import { o as infoIcon } from "./field-icons-t8rXRCKs.js";
2
+ import { html, nothing } from "lit";
3
+ import { ref } from "lit/directives/ref.js";
4
+
5
+ //#region src/composables/field-bubble.ts
6
+ /** Gap between anchor and bubble, and the bubble's minimum distance to the viewport edge. */
7
+ const GAP = 8;
8
+ const EDGE = 8;
9
+ /** Grace period for moving the pointer from the anchor onto the bubble. */
10
+ const HIDE_DELAY = 120;
11
+ let _uid = 0;
12
+ var FieldBubble = class {
13
+ constructor(options = {}) {
14
+ this.id = `mono-field-bubble-${++_uid}`;
15
+ this._anchor = null;
16
+ this._bubble = null;
17
+ this._open = false;
18
+ this.setAnchor = (el) => {
19
+ this._anchor = el ?? null;
20
+ };
21
+ this.setBubble = (el) => {
22
+ if ((el ?? null) !== this._bubble) this.hide();
23
+ this._bubble = el ?? null;
24
+ };
25
+ this.show = () => {
26
+ this.cancelHide();
27
+ const bubble = this._bubble;
28
+ if (!bubble || !bubble.isConnected || !this._anchor) return;
29
+ if (!this._open) {
30
+ this._open = true;
31
+ bubble.setAttribute("mono-open", "");
32
+ try {
33
+ if (typeof bubble.showPopover === "function" && !bubble.matches(":popover-open")) bubble.showPopover();
34
+ } catch {}
35
+ window.addEventListener("scroll", this.place, true);
36
+ window.addEventListener("resize", this.place);
37
+ }
38
+ this.place();
39
+ };
40
+ this.hide = () => {
41
+ this.cancelHide();
42
+ if (!this._open) return;
43
+ this._open = false;
44
+ window.removeEventListener("scroll", this.place, true);
45
+ window.removeEventListener("resize", this.place);
46
+ const bubble = this._bubble;
47
+ if (!bubble) return;
48
+ bubble.removeAttribute("mono-open");
49
+ try {
50
+ if (typeof bubble.hidePopover === "function" && bubble.matches(":popover-open")) bubble.hidePopover();
51
+ } catch {}
52
+ };
53
+ this.scheduleHide = () => {
54
+ this.cancelHide();
55
+ this._hideTimer = setTimeout(this.hide, HIDE_DELAY);
56
+ };
57
+ this.cancelHide = () => {
58
+ if (this._hideTimer !== void 0) clearTimeout(this._hideTimer);
59
+ this._hideTimer = void 0;
60
+ };
61
+ this.onPointerLeave = (e) => {
62
+ if (e.pointerType === "touch") return;
63
+ this.scheduleHide();
64
+ };
65
+ this.onKeydown = (e) => {
66
+ if (e.key === "Escape" && this._open) {
67
+ e.stopPropagation();
68
+ this.hide();
69
+ }
70
+ };
71
+ this.place = () => {
72
+ const anchor = this._anchor;
73
+ const bubble = this._bubble;
74
+ if (!this._open || !anchor || !bubble) return;
75
+ const r = anchor.getBoundingClientRect();
76
+ const vw = document.documentElement.clientWidth || window.innerWidth;
77
+ const vh = window.innerHeight;
78
+ const bw = bubble.offsetWidth;
79
+ const bh = bubble.offsetHeight;
80
+ const above = r.top - GAP - bh;
81
+ const below = r.bottom + GAP;
82
+ const fitsAbove = above >= EDGE;
83
+ const fitsBelow = below + bh <= vh - EDGE;
84
+ const side = this._side === "top" ? fitsAbove || !fitsBelow ? "top" : "bottom" : fitsBelow || !fitsAbove ? "bottom" : "top";
85
+ const top = side === "top" ? above : below;
86
+ const target = this._align === "center" ? r.left + r.width / 2 : r.left + Math.min(16, r.width / 2);
87
+ const ideal = this._align === "center" ? target - bw / 2 : r.left;
88
+ const left = Math.min(Math.max(ideal, EDGE), Math.max(EDGE, vw - EDGE - bw));
89
+ bubble.style.top = `${Math.round(top)}px`;
90
+ bubble.style.left = `${Math.round(left)}px`;
91
+ bubble.style.setProperty("--_mono-field-tip-arrow-x", `${Math.round(target - left)}px`);
92
+ bubble.setAttribute("mono-side", side);
93
+ };
94
+ this._side = options.side ?? "top";
95
+ this._align = options.align ?? "center";
96
+ }
97
+ get isOpen() {
98
+ return this._open;
99
+ }
100
+ };
101
+
102
+ //#endregion
103
+ //#region src/composables/field-tooltip.ts
104
+ /** `controlMonoTooltip` once floating-ui is known to load, else `null`. Probed once per page. */
105
+ let _probe = null;
106
+ function probeTooltip() {
107
+ _probe ??= (async () => {
108
+ try {
109
+ const [{ loadFloatingUi }, { controlMonoTooltip }] = await Promise.all([import("./tooltip-loader-3U9FTOXj.js"), import("./control-tooltip-7vegYmq3.js")]);
110
+ await loadFloatingUi();
111
+ return controlMonoTooltip;
112
+ } catch {
113
+ return null;
114
+ }
115
+ })();
116
+ return _probe;
117
+ }
118
+ /** `string` → `{ content }`; anything without content → `null` (renders nothing). */
119
+ function normalizeFieldTooltip(value) {
120
+ if (!value) return null;
121
+ if (typeof value === "string") return value.trim() ? { content: value } : null;
122
+ if (typeof value !== "object") return null;
123
+ const { content } = value;
124
+ if (content === void 0 || content === null || content === "") return null;
125
+ return value;
126
+ }
127
+ /** Which bubble a prop value gets: the built-in one, the floating-ui addon, or none. */
128
+ function tooltipMode(value) {
129
+ if (!normalizeFieldTooltip(value)) return null;
130
+ return typeof value === "string" ? "simple" : "floating";
131
+ }
132
+ /** A click on the bubble is still inside the `<label>` and the icon: neither should react. */
133
+ const stopBubbleClick = (e) => {
134
+ e.preventDefault();
135
+ e.stopPropagation();
136
+ };
137
+ const stopLabelActivation = (e) => {
138
+ e.preventDefault();
139
+ };
140
+ var FieldTooltipController = class {
141
+ constructor(host, read) {
142
+ this.host = host;
143
+ this.read = read;
144
+ this._fn = null;
145
+ this._ctrl = null;
146
+ this._el = null;
147
+ this._applied = null;
148
+ this._raw = null;
149
+ this._connected = false;
150
+ this._bubble = new FieldBubble({
151
+ side: "top",
152
+ align: "center"
153
+ });
154
+ this._setEl = (el) => {
155
+ if ((el ?? null) !== this._el) this._unbind();
156
+ this._el = el ?? null;
157
+ this._bubble.setAnchor(this._el);
158
+ };
159
+ this._onIconClick = (e) => {
160
+ stopLabelActivation(e);
161
+ this._bubble.show();
162
+ };
163
+ host.addController(this);
164
+ }
165
+ hostConnected() {
166
+ this._connected = true;
167
+ }
168
+ hostDisconnected() {
169
+ this._connected = false;
170
+ this._bubble.hide();
171
+ this._unbind();
172
+ }
173
+ hostUpdated() {
174
+ if (tooltipMode(this.read()) === "floating") this._ensureProbe();
175
+ this._sync();
176
+ }
177
+ /** The ⓘ for the end of the label row, or `nothing`. */
178
+ render() {
179
+ const raw = this.read();
180
+ const mode = tooltipMode(raw);
181
+ if (mode === "simple") return this._renderSimple(raw);
182
+ if (mode !== "floating" || !this._fn) return nothing;
183
+ return html`<span
184
+ mono-label-tooltip
185
+ tabindex="0"
186
+ role="img"
187
+ aria-label="More information"
188
+ @click=${stopLabelActivation}
189
+ ${ref(this._setEl)}
190
+ >${this._icon()}</span>`;
191
+ }
192
+ /**
193
+ * Plain text: the icon carries its own bubble. `aria-describedby` reads the
194
+ * text to screen readers on focus; hover, focus or a tap shows it, Escape
195
+ * dismisses it, and the pointer may move onto it without it closing.
196
+ */
197
+ _renderSimple(text) {
198
+ return html`<span
199
+ mono-label-tooltip
200
+ tabindex="0"
201
+ role="img"
202
+ aria-label="More information"
203
+ aria-describedby=${this._bubble.id}
204
+ @click=${this._onIconClick}
205
+ @pointerenter=${this._bubble.show}
206
+ @pointerleave=${this._bubble.onPointerLeave}
207
+ @focus=${this._bubble.show}
208
+ @blur=${this._bubble.hide}
209
+ @keydown=${this._bubble.onKeydown}
210
+ ${ref(this._setEl)}
211
+ >${this._icon()}<span
212
+ mono-field-bubble
213
+ mono-label-tooltip-bubble
214
+ id=${this._bubble.id}
215
+ role="tooltip"
216
+ popover="manual"
217
+ @pointerenter=${this._bubble.cancelHide}
218
+ @pointerleave=${this._bubble.onPointerLeave}
219
+ @click=${stopBubbleClick}
220
+ ${ref(this._bubble.setBubble)}
221
+ >${text}</span></span>`;
222
+ }
223
+ /**
224
+ * Light build: the UnoCSS `i-mdi-information-outline` mask (shipped in
225
+ * `ui/index.css`). Shadow build: the same path inline — the page's icon CSS
226
+ * cannot reach a shadow root.
227
+ */
228
+ _icon() {
229
+ if (this.host.renderRoot instanceof ShadowRoot) return infoIcon();
230
+ return html`<span class="mono-icon i-mdi-information-outline" mono-icon aria-hidden="true"></span>`;
231
+ }
232
+ _ensureProbe() {
233
+ if (this._fn || typeof document === "undefined") return;
234
+ probeTooltip().then((fn) => {
235
+ if (!fn || this._fn) return;
236
+ this._fn = fn;
237
+ this.host.requestUpdate();
238
+ });
239
+ }
240
+ _sync() {
241
+ const raw = this.read();
242
+ if (tooltipMode(raw) !== "floating") return this._unbind();
243
+ if (this._ctrl && this._raw === raw) return;
244
+ const options = normalizeFieldTooltip(raw);
245
+ if (!this._fn || !this._connected || !this._el || !options) return this._unbind();
246
+ if (this._ctrl) {
247
+ const blanked = {};
248
+ for (const key of Object.keys(this._applied ?? {})) blanked[key] = void 0;
249
+ this._ctrl.update({
250
+ ...blanked,
251
+ ...options
252
+ });
253
+ } else this._ctrl = this._fn(this._el, options);
254
+ this._applied = options;
255
+ this._raw = raw;
256
+ }
257
+ _unbind() {
258
+ this._ctrl?.destroy();
259
+ this._ctrl = null;
260
+ this._applied = null;
261
+ this._raw = null;
262
+ }
263
+ };
264
+
265
+ //#endregion
266
+ //#region \0raw:C:\Users\VCT-DEV\Desktop\libs\packages\helper\src\components\form\field-tooltip.css?raw.js
267
+ var field_tooltip_css_raw_default = "/* =========================================\n Field tooltip — the BUILT-IN bubble behind a plain-text `tooltip=\"…\"` on\n every field control (input, select, tag-input, date, textarea,\n dropdown-table, slider). No floating-ui: composables/field-tooltip.ts\n shows it in the top layer (Popover API) and writes its fixed `top` /\n `left`, `mono-side` (top|bottom) and the arrow's x. The object form\n (`.tooltip=${{…}}`) is the tooltip addon instead and never reaches here.\n\n Looks like the addon's default `mono-tooltip`, and reads its public knobs:\n --mono-tooltip-bg / -color / -radius / -max-width / -font-size /\n -line-height / -padding-x / -padding-y.\n\n Light: imported once by entries/index.css. Shadow: appended to each\n control's shadow sheet.\n ========================================= */\n\n[mono-field-bubble] {\n --_mono-field-tip-bg: var(--mono-tooltip-bg, var(--foreground));\n --_mono-field-tip-arrow: calc(var(--mono-spacing) * 2);\n\n /* undo the [popover] UA box (inset:0; margin:auto; border; Canvas …) */\n position: fixed;\n inset: auto;\n top: 0;\n left: 0;\n z-index: var(--mono-popup-z, 1000);\n display: none;\n box-sizing: border-box;\n width: max-content;\n max-width: min(var(--mono-tooltip-max-width, 20rem), calc(100vw - 16px));\n height: auto;\n margin: 0;\n overflow: visible;\n padding: var(--mono-tooltip-padding-y, calc(var(--mono-spacing) * 1.5)) var(--mono-tooltip-padding-x, calc(var(--mono-spacing) * 3));\n border: 0;\n border-radius: var(--mono-tooltip-radius, var(--mono-radius-md));\n background: var(--_mono-field-tip-bg);\n color: var(--mono-tooltip-color, var(--background));\n box-shadow: var(--mono-tooltip-shadow, 0 0 0 0 transparent);\n\n /* it sits inside the label — drop everything the label row set */\n font-family: inherit;\n font-size: var(--mono-tooltip-font-size, var(--mono-text-xs));\n font-weight: var(--mono-font-weight-normal, 400);\n font-style: normal;\n line-height: var(--mono-tooltip-line-height, var(--mono-text-xs--lh));\n letter-spacing: normal;\n text-transform: none;\n text-align: start;\n white-space: normal;\n overflow-wrap: break-word;\n cursor: default;\n user-select: text;\n pointer-events: auto;\n}\n\n[mono-field-bubble][mono-open] {\n display: block;\n animation: mono-field-tip-in var(--mono-duration, 150ms) var(--mono-ease, ease) both;\n}\n\n/* The arrow, plus (::before) an invisible bridge over the gap so the pointer\n can travel from the icon onto the bubble without it closing. */\n[mono-field-bubble]::after {\n content: '';\n position: absolute;\n left: var(--_mono-field-tip-arrow-x, 50%);\n width: var(--_mono-field-tip-arrow);\n height: var(--_mono-field-tip-arrow);\n background: inherit;\n border-radius: 2px;\n translate: -50% 0;\n rotate: 45deg;\n}\n\n[mono-field-bubble]::before {\n content: '';\n position: absolute;\n inset-inline: 0;\n height: 8px;\n}\n\n[mono-field-bubble]:not([mono-side=\"bottom\"])::after {\n bottom: calc(var(--_mono-field-tip-arrow) / -2 + 1px);\n}\n[mono-field-bubble]:not([mono-side=\"bottom\"])::before {\n top: 100%;\n}\n[mono-field-bubble][mono-side=\"bottom\"]::after {\n top: calc(var(--_mono-field-tip-arrow) / -2 + 1px);\n}\n[mono-field-bubble][mono-side=\"bottom\"]::before {\n bottom: 100%;\n}\n\n@keyframes mono-field-tip-in {\n from {\n opacity: 0;\n }\n}\n\n@media (prefers-reduced-motion: reduce) {\n [mono-field-bubble][mono-open] {\n animation: none;\n }\n}\n";
268
+
269
+ //#endregion
270
+ export { FieldTooltipController as n, FieldBubble as r, field_tooltip_css_raw_default as t };
@@ -0,0 +1,170 @@
1
+ import { r as checkCircleIcon, t as alertCircleIcon } from "./field-icons-t8rXRCKs.js";
2
+ import { n as FieldBubble } from "./field-tooltip-FyMi9vNM.js";
3
+ import { html, nothing } from "lit";
4
+ import { ref } from "lit/directives/ref.js";
5
+
6
+ //#region src/composables/field-validation.ts
7
+ /** `default` (or no state) → `null`: a stateless message stays in the bottom row. */
8
+ function toneOf(state) {
9
+ if (state === "invalid" || state === "error") return "invalid";
10
+ if (state === "valid" || state === "success") return "valid";
11
+ if (state === "warning") return "warning";
12
+ return null;
13
+ }
14
+ var FieldValidationController = class {
15
+ constructor(host, read, getBox) {
16
+ this.host = host;
17
+ this.read = read;
18
+ this.getBox = getBox;
19
+ this._iconBubble = new FieldBubble({
20
+ side: "top",
21
+ align: "center"
22
+ });
23
+ this._floatBubble = new FieldBubble({
24
+ side: "bottom",
25
+ align: "start"
26
+ });
27
+ this._hovered = false;
28
+ this._focused = false;
29
+ this._onIconClick = (e) => {
30
+ stopEvent(e);
31
+ this._iconBubble.show();
32
+ };
33
+ this._onEnter = () => {
34
+ this._hovered = true;
35
+ this._syncFloat();
36
+ };
37
+ this._onLeave = (e) => {
38
+ if (e.pointerType === "touch") return;
39
+ this._hovered = false;
40
+ this._syncFloat();
41
+ };
42
+ this._onFocusIn = (e) => {
43
+ this._focused = true;
44
+ this._syncFloat();
45
+ if (this.notice?.position === "icon" && isFocusVisible(e)) this._iconBubble.show();
46
+ };
47
+ this._onFocusOut = (e) => {
48
+ const next = e.relatedTarget;
49
+ if (next && (next === this.host || this.host.contains(next))) return;
50
+ this._focused = false;
51
+ this._syncFloat();
52
+ this._iconBubble.hide();
53
+ };
54
+ host.addController(this);
55
+ }
56
+ /** The message that moved out of the bottom row, or `null` (bottom mode / no text). */
57
+ get notice() {
58
+ const { position, state, text } = this.read();
59
+ if (position !== "icon" && position !== "float") return null;
60
+ const message = typeof text === "string" ? text.trim() : "";
61
+ const tone = toneOf(state);
62
+ if (!message || !tone) return null;
63
+ return {
64
+ position,
65
+ tone,
66
+ text: message
67
+ };
68
+ }
69
+ /** True when the bottom row should show the helper and keep the validation text sr-only. */
70
+ get moved() {
71
+ return this.notice !== null;
72
+ }
73
+ hostConnected() {
74
+ this.host.addEventListener("pointerenter", this._onEnter);
75
+ this.host.addEventListener("pointerleave", this._onLeave);
76
+ this.host.addEventListener("focusin", this._onFocusIn);
77
+ this.host.addEventListener("focusout", this._onFocusOut);
78
+ }
79
+ hostDisconnected() {
80
+ this.host.removeEventListener("pointerenter", this._onEnter);
81
+ this.host.removeEventListener("pointerleave", this._onLeave);
82
+ this.host.removeEventListener("focusin", this._onFocusIn);
83
+ this.host.removeEventListener("focusout", this._onFocusOut);
84
+ this._iconBubble.hide();
85
+ this._floatBubble.hide();
86
+ this._hovered = false;
87
+ this._focused = false;
88
+ }
89
+ hostUpdated() {
90
+ this._floatBubble.setAnchor(this.getBox() ?? null);
91
+ if (this.notice?.position !== "icon") this._iconBubble.hide();
92
+ this._syncFloat();
93
+ this._iconBubble.place();
94
+ this._floatBubble.place();
95
+ }
96
+ /** Re-evaluate the float bubble — for popups the host opens without a re-render (date's calendar). */
97
+ refresh() {
98
+ this._syncFloat();
99
+ }
100
+ /**
101
+ * `icon` mode: the state icon for inside the box (before the clear button /
102
+ * actions). `anchored` wraps it in a zero-height `[mono-validation-anchor]`
103
+ * — for the textarea, whose box can't hold children.
104
+ */
105
+ renderIcon(options = {}) {
106
+ const notice = this.notice;
107
+ if (notice?.position !== "icon") return nothing;
108
+ const icon = html`<span
109
+ mono-validation-icon
110
+ mono-state=${notice.tone}
111
+ aria-hidden="true"
112
+ @pointerenter=${this._iconBubble.show}
113
+ @pointerleave=${this._iconBubble.onPointerLeave}
114
+ @pointerdown=${stopEvent}
115
+ @click=${this._onIconClick}
116
+ ${ref(this._iconBubble.setAnchor)}
117
+ >${this._glyph(notice.tone)}<span
118
+ mono-field-bubble
119
+ mono-validation-tip
120
+ mono-state=${notice.tone}
121
+ popover="manual"
122
+ @pointerenter=${this._iconBubble.cancelHide}
123
+ @pointerleave=${this._iconBubble.onPointerLeave}
124
+ @click=${stopEvent}
125
+ ${ref(this._iconBubble.setBubble)}
126
+ >${notice.text}</span></span>`;
127
+ return options.anchored ? html`<span mono-validation-anchor>${icon}</span>` : icon;
128
+ }
129
+ /** `float` mode: the bubble that floats under the box while the field is hovered or focused. */
130
+ renderFloat() {
131
+ const notice = this.notice;
132
+ if (notice?.position !== "float") return nothing;
133
+ return html`<span
134
+ mono-field-bubble
135
+ mono-validation-float
136
+ mono-state=${notice.tone}
137
+ aria-hidden="true"
138
+ popover="manual"
139
+ @click=${stopEvent}
140
+ ${ref(this._floatBubble.setBubble)}
141
+ >${notice.text}</span>`;
142
+ }
143
+ /** Light build: UnoCSS mask icons; shadow build: inline SVG (page icon CSS can't reach a shadow root). */
144
+ _glyph(tone) {
145
+ if (this.host.renderRoot instanceof ShadowRoot) return tone === "valid" ? checkCircleIcon() : alertCircleIcon();
146
+ return tone === "valid" ? html`<span class="mono-icon i-mdi-check-circle-outline" mono-icon aria-hidden="true"></span>` : html`<span class="mono-icon i-mdi-alert-circle-outline" mono-icon aria-hidden="true"></span>`;
147
+ }
148
+ _syncFloat() {
149
+ const notice = this.notice;
150
+ const active = this._hovered || this._focused;
151
+ if (notice?.position === "float" && active && !this.read().suppressed) this._floatBubble.show();
152
+ else if (!active) this._floatBubble.scheduleHide();
153
+ else this._floatBubble.hide();
154
+ }
155
+ };
156
+ const stopEvent = (e) => {
157
+ e.preventDefault();
158
+ e.stopPropagation();
159
+ };
160
+ function isFocusVisible(e) {
161
+ const target = e.composedPath?.()[0] ?? e.target;
162
+ try {
163
+ return !!target?.matches?.(":focus-visible");
164
+ } catch {
165
+ return false;
166
+ }
167
+ }
168
+
169
+ //#endregion
170
+ export { FieldValidationController as t };
@@ -0,0 +1,178 @@
1
+ import { r as checkCircleIcon, t as alertCircleIcon } from "./field-icons-t8rXRCKs.js";
2
+ import { r as FieldBubble } from "./field-tooltip.css_raw-DEctHXKm.js";
3
+ import { html, nothing } from "lit";
4
+ import { ref } from "lit/directives/ref.js";
5
+
6
+ //#region src/composables/field-validation.ts
7
+ /** `default` (or no state) → `null`: a stateless message stays in the bottom row. */
8
+ function toneOf(state) {
9
+ if (state === "invalid" || state === "error") return "invalid";
10
+ if (state === "valid" || state === "success") return "valid";
11
+ if (state === "warning") return "warning";
12
+ return null;
13
+ }
14
+ var FieldValidationController = class {
15
+ constructor(host, read, getBox) {
16
+ this.host = host;
17
+ this.read = read;
18
+ this.getBox = getBox;
19
+ this._iconBubble = new FieldBubble({
20
+ side: "top",
21
+ align: "center"
22
+ });
23
+ this._floatBubble = new FieldBubble({
24
+ side: "bottom",
25
+ align: "start"
26
+ });
27
+ this._hovered = false;
28
+ this._focused = false;
29
+ this._onIconClick = (e) => {
30
+ stopEvent(e);
31
+ this._iconBubble.show();
32
+ };
33
+ this._onEnter = () => {
34
+ this._hovered = true;
35
+ this._syncFloat();
36
+ };
37
+ this._onLeave = (e) => {
38
+ if (e.pointerType === "touch") return;
39
+ this._hovered = false;
40
+ this._syncFloat();
41
+ };
42
+ this._onFocusIn = (e) => {
43
+ this._focused = true;
44
+ this._syncFloat();
45
+ if (this.notice?.position === "icon" && isFocusVisible(e)) this._iconBubble.show();
46
+ };
47
+ this._onFocusOut = (e) => {
48
+ const next = e.relatedTarget;
49
+ if (next && (next === this.host || this.host.contains(next))) return;
50
+ this._focused = false;
51
+ this._syncFloat();
52
+ this._iconBubble.hide();
53
+ };
54
+ host.addController(this);
55
+ }
56
+ /** The message that moved out of the bottom row, or `null` (bottom mode / no text). */
57
+ get notice() {
58
+ const { position, state, text } = this.read();
59
+ if (position !== "icon" && position !== "float") return null;
60
+ const message = typeof text === "string" ? text.trim() : "";
61
+ const tone = toneOf(state);
62
+ if (!message || !tone) return null;
63
+ return {
64
+ position,
65
+ tone,
66
+ text: message
67
+ };
68
+ }
69
+ /** True when the bottom row should show the helper and keep the validation text sr-only. */
70
+ get moved() {
71
+ return this.notice !== null;
72
+ }
73
+ hostConnected() {
74
+ this.host.addEventListener("pointerenter", this._onEnter);
75
+ this.host.addEventListener("pointerleave", this._onLeave);
76
+ this.host.addEventListener("focusin", this._onFocusIn);
77
+ this.host.addEventListener("focusout", this._onFocusOut);
78
+ }
79
+ hostDisconnected() {
80
+ this.host.removeEventListener("pointerenter", this._onEnter);
81
+ this.host.removeEventListener("pointerleave", this._onLeave);
82
+ this.host.removeEventListener("focusin", this._onFocusIn);
83
+ this.host.removeEventListener("focusout", this._onFocusOut);
84
+ this._iconBubble.hide();
85
+ this._floatBubble.hide();
86
+ this._hovered = false;
87
+ this._focused = false;
88
+ }
89
+ hostUpdated() {
90
+ this._floatBubble.setAnchor(this.getBox() ?? null);
91
+ if (this.notice?.position !== "icon") this._iconBubble.hide();
92
+ this._syncFloat();
93
+ this._iconBubble.place();
94
+ this._floatBubble.place();
95
+ }
96
+ /** Re-evaluate the float bubble — for popups the host opens without a re-render (date's calendar). */
97
+ refresh() {
98
+ this._syncFloat();
99
+ }
100
+ /**
101
+ * `icon` mode: the state icon for inside the box (before the clear button /
102
+ * actions). `anchored` wraps it in a zero-height `[mono-validation-anchor]`
103
+ * — for the textarea, whose box can't hold children.
104
+ */
105
+ renderIcon(options = {}) {
106
+ const notice = this.notice;
107
+ if (notice?.position !== "icon") return nothing;
108
+ const icon = html`<span
109
+ mono-validation-icon
110
+ mono-state=${notice.tone}
111
+ aria-hidden="true"
112
+ @pointerenter=${this._iconBubble.show}
113
+ @pointerleave=${this._iconBubble.onPointerLeave}
114
+ @pointerdown=${stopEvent}
115
+ @click=${this._onIconClick}
116
+ ${ref(this._iconBubble.setAnchor)}
117
+ >${this._glyph(notice.tone)}<span
118
+ mono-field-bubble
119
+ mono-validation-tip
120
+ mono-state=${notice.tone}
121
+ popover="manual"
122
+ @pointerenter=${this._iconBubble.cancelHide}
123
+ @pointerleave=${this._iconBubble.onPointerLeave}
124
+ @click=${stopEvent}
125
+ ${ref(this._iconBubble.setBubble)}
126
+ >${notice.text}</span></span>`;
127
+ return options.anchored ? html`<span mono-validation-anchor>${icon}</span>` : icon;
128
+ }
129
+ /** `float` mode: the bubble that floats under the box while the field is hovered or focused. */
130
+ renderFloat() {
131
+ const notice = this.notice;
132
+ if (notice?.position !== "float") return nothing;
133
+ return html`<span
134
+ mono-field-bubble
135
+ mono-validation-float
136
+ mono-state=${notice.tone}
137
+ aria-hidden="true"
138
+ popover="manual"
139
+ @click=${stopEvent}
140
+ ${ref(this._floatBubble.setBubble)}
141
+ >${notice.text}</span>`;
142
+ }
143
+ /** Light build: UnoCSS mask icons; shadow build: inline SVG (page icon CSS can't reach a shadow root). */
144
+ _glyph(tone) {
145
+ if (this.host.renderRoot instanceof ShadowRoot) return tone === "valid" ? checkCircleIcon() : alertCircleIcon();
146
+ return tone === "valid" ? html`<span class="mono-icon i-mdi-check-circle-outline" mono-icon aria-hidden="true"></span>` : html`<span class="mono-icon i-mdi-alert-circle-outline" mono-icon aria-hidden="true"></span>`;
147
+ }
148
+ _syncFloat() {
149
+ const notice = this.notice;
150
+ const active = this._hovered || this._focused;
151
+ if (notice?.position === "float" && active && !this.read().suppressed) this._floatBubble.show();
152
+ else if (!active) this._floatBubble.scheduleHide();
153
+ else this._floatBubble.hide();
154
+ }
155
+ };
156
+ const stopEvent = (e) => {
157
+ e.preventDefault();
158
+ e.stopPropagation();
159
+ };
160
+ function isFocusVisible(e) {
161
+ const target = e.composedPath?.()[0] ?? e.target;
162
+ try {
163
+ return !!target?.matches?.(":focus-visible");
164
+ } catch {
165
+ return false;
166
+ }
167
+ }
168
+
169
+ //#endregion
170
+ //#region \0raw:C:\Users\VCT-DEV\Desktop\libs\packages\helper\src\components\form\label-position.css?raw.js
171
+ var label_position_css_raw_default = "/* =========================================\n label-position — shared by every field-like control\n (input, select, tag-input, date, textarea, dropdown-table; otp — left / right only).\n\n `top` (default) emits NO attribute, so nothing here touches it. The other\n three are layout-only: the label's type, colour and states stay with each\n component's own label rules.\n\n Each component's root writes the private slots read below:\n --_mono-lp-width left/right label column (--mono-<c>-label-width, auto)\n --_mono-lp-gap left/right column gap (--mono-<c>-label-side-gap)\n --_mono-lp-height one control row — the side label centres on it\n --_mono-lp-box-min the box's resting min-height (textarea: its rows)\n --_mono-lp-padding-x the box's inline-start padding — the notch lines up with the text\n --_mono-lp-font notched label font-size (--mono-<c>-label-notch-font-size)\n --_mono-lp-notch-bg the surface the notch is cut from (--mono-<c>-label-notch-bg)\n --_mono-lp-field-bg the box's own surface — paints the notch's lower half\n\n Light: imported once by entries/index.css. Shadow: appended to each\n component's shadow sheet (the inner root keeps its `mono-<c>` attribute).\n ========================================= */\n\n/* ── left / right — label column + field column; messages stay under the box ── */\n:is([mono-input], [mono-select], [mono-tag-input], [mono-date], [mono-textarea], [mono-dropdown-table], [mono-otp]):is([mono-label-position=\"left\"], [mono-label-position=\"right\"]) {\n display: grid;\n grid-template-columns: var(--_mono-lp-width) minmax(0, 1fr);\n column-gap: var(--_mono-lp-gap);\n align-items: start;\n}\n\n:is([mono-input], [mono-select], [mono-tag-input], [mono-date], [mono-textarea], [mono-dropdown-table], [mono-otp])[mono-label-position=\"right\"] {\n grid-template-columns: minmax(0, 1fr) var(--_mono-lp-width);\n}\n\n/* Everything but the label lives in the field column (an absolute panel then\n measures against that column too). */\n:is([mono-input], [mono-select], [mono-tag-input], [mono-date], [mono-textarea], [mono-dropdown-table], [mono-otp])[mono-label-position=\"left\"] > * {\n grid-column: 2;\n}\n:is([mono-input], [mono-select], [mono-tag-input], [mono-date], [mono-textarea], [mono-dropdown-table], [mono-otp])[mono-label-position=\"right\"] > * {\n grid-column: 1;\n}\n\n/* The label centres on the FIRST control row, so a tag-input growing chip\n rows or a tall textarea keeps it beside the top line. */\n:is([mono-input], [mono-select], [mono-tag-input], [mono-date], [mono-textarea], [mono-dropdown-table], [mono-otp]):is([mono-label-position=\"left\"], [mono-label-position=\"right\"]) > :is([mono-label], [mono-dd-label]) {\n grid-row: 1;\n grid-column: 1;\n min-height: var(--_mono-lp-height);\n margin: 0;\n}\n:is([mono-input], [mono-select], [mono-tag-input], [mono-date], [mono-textarea], [mono-dropdown-table], [mono-otp])[mono-label-position=\"right\"] > :is([mono-label], [mono-dd-label]) {\n grid-column: 2;\n}\n\n/* ── notched — shared by both looks: the label leaves the flow ── */\n:is([mono-input], [mono-select], [mono-tag-input], [mono-date], [mono-textarea], [mono-dropdown-table])[mono-label-position=\"notched\"] {\n position: relative;\n}\n\n:is([mono-input], [mono-select], [mono-tag-input], [mono-date], [mono-textarea], [mono-dropdown-table])[mono-label-position=\"notched\"] > :is([mono-label], [mono-dd-label]) {\n position: absolute;\n z-index: 1;\n max-width: calc(100% - 2 * var(--_mono-lp-padding-x) - 2 * var(--mono-spacing));\n margin: 0;\n font-size: var(--_mono-lp-font);\n line-height: 1;\n white-space: nowrap;\n}\n\n/* ── notched + outlined — the label sits ON the top border: ──Label── ──\n The \"notch\" is a background patch: page surface above the border line, the\n box's surface below it. On a non-solid parent set --mono-<c>-label-notch-bg. */\n:is([mono-input], [mono-select], [mono-tag-input], [mono-date], [mono-textarea], [mono-dropdown-table])[mono-label-position=\"notched\"]:is(:not([mono-variant]), [mono-variant=\"outlined\"]) {\n padding-top: calc(var(--_mono-lp-font) / 2);\n}\n\n:is([mono-input], [mono-select], [mono-tag-input], [mono-date], [mono-textarea], [mono-dropdown-table])[mono-label-position=\"notched\"]:is(:not([mono-variant]), [mono-variant=\"outlined\"]) > :is([mono-label], [mono-dd-label]) {\n top: 0;\n inset-inline-start: calc(var(--mono-border-width) + var(--_mono-lp-padding-x) - var(--mono-spacing));\n padding-inline: var(--mono-spacing);\n background:\n linear-gradient(var(--_mono-lp-field-bg), var(--_mono-lp-field-bg)) bottom / 100% 50% no-repeat,\n var(--_mono-lp-notch-bg);\n}\n\n/* ── notched + filled / underlined — no outline to cut, so the label insets\n into the top of the box (Material \"filled\") and the box grows by its line ── */\n:is([mono-input], [mono-select], [mono-tag-input], [mono-date], [mono-textarea], [mono-dropdown-table])[mono-label-position=\"notched\"]:is([mono-variant=\"filled\"], [mono-variant=\"underlined\"]) > :is([mono-label], [mono-dd-label]) {\n top: calc(var(--mono-border-width) + var(--_mono-lp-inset-y));\n inset-inline-start: calc(var(--mono-border-width) + var(--_mono-lp-padding-x));\n}\n\n:is([mono-input], [mono-select], [mono-tag-input], [mono-date], [mono-textarea])[mono-label-position=\"notched\"]:is([mono-variant=\"filled\"], [mono-variant=\"underlined\"]) > :is([mono-field], [mono-trigger], textarea[mono-native]),\n[mono-dropdown-table][mono-label-position=\"notched\"]:is([mono-variant=\"filled\"], [mono-variant=\"underlined\"]) > [mono-dd-control] > [mono-dd-trigger] {\n min-height: calc(var(--_mono-lp-box-min) + var(--_mono-lp-font) + var(--_mono-lp-inset-y));\n padding-top: calc(var(--_mono-lp-inset-y) + var(--_mono-lp-font) + var(--_mono-lp-padding-y, 0px));\n}\n\n/* Slots the component sheets don't need to set. */\n:is([mono-input], [mono-select], [mono-tag-input], [mono-date], [mono-textarea], [mono-dropdown-table])[mono-label-position] {\n --_mono-lp-inset-y: calc(var(--mono-spacing) * 1.5);\n}\n";
172
+
173
+ //#endregion
174
+ //#region \0raw:C:\Users\VCT-DEV\Desktop\libs\packages\helper\src\components\form\field-validation.css?raw.js
175
+ var field_validation_css_raw_default = "/* =========================================\n validation-position — `icon` and `float` (composables/field-validation.ts)\n on input, select, tag-input, date, textarea and dropdown-table.\n\n The bubbles share the [mono-field-bubble] look (field-tooltip.css); this\n sheet paints them in the state colour, and draws the state icon inside the\n box. Knobs:\n --mono-validation-invalid-bg / -color (default --destructive / -foreground)\n --mono-validation-warning-bg / -color (default --warning / -foreground)\n --mono-validation-valid-bg / -color (default --success / -foreground)\n --mono-validation-icon-size (default 1rem)\n\n Light: imported once by entries/index.css. Shadow: appended to each\n control's shadow sheet.\n ========================================= */\n\n/* ── state-coloured bubbles ── */\n[mono-field-bubble][mono-state=\"invalid\"] {\n --_mono-field-tip-bg: var(--mono-validation-invalid-bg, var(--destructive));\n color: var(--mono-validation-invalid-color, var(--destructive-foreground, #fff));\n}\n[mono-field-bubble][mono-state=\"warning\"] {\n --_mono-field-tip-bg: var(--mono-validation-warning-bg, var(--warning));\n color: var(--mono-validation-warning-color, var(--warning-foreground, #fff));\n}\n[mono-field-bubble][mono-state=\"valid\"] {\n --_mono-field-tip-bg: var(--mono-validation-valid-bg, var(--success));\n color: var(--mono-validation-valid-color, var(--success-foreground, #fff));\n}\n\n/* ── float: a compact message under the box ── */\n[mono-field-bubble][mono-validation-float] {\n max-width: min(var(--mono-validation-float-max-width, 24rem), calc(100vw - 16px));\n padding: var(--mono-validation-float-padding-y, var(--mono-spacing)) var(--mono-validation-float-padding-x, calc(var(--mono-spacing) * 2));\n font-size: var(--mono-validation-float-font-size, var(--mono-text-xs));\n /* hover-transparent: it must not steal the pointer from the field it describes */\n pointer-events: none;\n}\n[mono-field-bubble][mono-validation-float]::before {\n display: none;\n}\n\n/* ── icon: the state glyph inside the box ── */\n[mono-validation-icon] {\n position: relative;\n display: inline-flex;\n flex: none;\n align-items: center;\n justify-content: center;\n align-self: center;\n margin-inline: var(--mono-validation-icon-gap, var(--mono-spacing));\n font-size: var(--mono-validation-icon-size, 1rem);\n line-height: 1;\n cursor: help;\n /* a disabled field turns events off — the reason is exactly what to show */\n pointer-events: auto;\n}\n[mono-validation-icon] > [mono-icon] {\n width: 1em;\n height: 1em;\n}\n[mono-validation-icon][mono-state=\"invalid\"] {\n color: var(--mono-validation-invalid-bg, var(--destructive));\n}\n[mono-validation-icon][mono-state=\"warning\"] {\n color: var(--mono-validation-warning-bg, var(--warning));\n}\n[mono-validation-icon][mono-state=\"valid\"] {\n color: var(--mono-validation-valid-bg, var(--success));\n}\n\n/* textarea: the box can't hold children, so a zero-height anchor sits on the\n textarea's top edge (its negative margin cancels the flex gap it adds) and\n the icon pins to the top-right corner, over reserved inline padding. */\n[mono-textarea] > [mono-validation-anchor] {\n position: relative;\n z-index: 1;\n display: block;\n height: 0;\n margin-bottom: calc(-1 * var(--mono-textarea-gap, calc(var(--mono-spacing) * 3)));\n}\n[mono-textarea] > [mono-validation-anchor] > [mono-validation-icon] {\n position: absolute;\n top: calc(var(--mono-border-width) + var(--_mono-textarea-padding-y, var(--mono-spacing)));\n inset-inline-end: calc(var(--mono-border-width) + var(--_mono-textarea-padding-x, calc(var(--mono-spacing) * 2.5)));\n margin: 0;\n}\n[mono-textarea]:has(> [mono-validation-anchor]) > textarea[mono-native] {\n padding-inline-end: calc(var(--_mono-textarea-padding-x, calc(var(--mono-spacing) * 2.5)) + var(--mono-validation-icon-size, 1rem) + var(--mono-spacing));\n}\n/* side labels: the anchor shares the textarea's grid row */\n[mono-textarea]:is([mono-label-position=\"left\"], [mono-label-position=\"right\"]) > :is([mono-validation-anchor], textarea[mono-native]) {\n grid-row: 1;\n align-self: start;\n}\n[mono-textarea]:is([mono-label-position=\"left\"], [mono-label-position=\"right\"]) > [mono-validation-anchor] {\n margin-bottom: 0;\n}\n\n/* ── the moved message stays for assistive tech only ── */\n[mono-sr-only] {\n position: absolute !important;\n width: 1px !important;\n height: 1px !important;\n margin: -1px !important;\n padding: 0 !important;\n overflow: hidden !important;\n clip-path: inset(50%) !important;\n white-space: nowrap !important;\n border: 0 !important;\n}\n";
176
+
177
+ //#endregion
178
+ export { label_position_css_raw_default as n, FieldValidationController as r, field_validation_css_raw_default as t };
package/dist/index.js CHANGED
@@ -7,11 +7,12 @@ import { t as monoDataGrid } from "./mono-data-grid-8jmeIXUU.js";
7
7
  import { d as OPERATOR_ARITY, l as treeToArray, m as operatorsFor, n as arrayToTree, s as odataStringToArray, t as arrayToODataString, u as DEFAULT_TEXTS } from "./filter-odata-Bi27XUpQ.js";
8
8
  import { t as monoFilterBuilder } from "./filter-builder-C0T3pMx2.js";
9
9
  import { a as resetMonoUI, g as resetMonoSkeleton, i as getMonoUIStatus, n as createMonoUI, o as getMonoSkeletonStatus, r as getMonoUI, s as isMonoSsrApp } from "./mono-ui-BwUc0L6B.js";
10
- import { t as monoForm } from "./mono-form-controller-IYn0MuUQ.js";
10
+ import { t as monoForm } from "./mono-form-controller-BkMR8g14.js";
11
11
  import { t as monoModal } from "./mono-modal-controller-ClObbHUs.js";
12
12
  import { i as composeApply, n as buildChartApply, r as buildChartOdataRequest, t as monoChart } from "./mono-data-chart-ChkelNT7.js";
13
13
  import { t as monoDataDropdown } from "./mono-data-dropdown-DxpUUk2y.js";
14
- import { a as resetMonoTooltip, n as createMonoTooltip, o as controlMonoTooltip, r as destroyAllMonoTooltips, s as monoTooltip, u as getMonoTooltipGlobal } from "./tooltip-FCMRUSLi.js";
15
- import { _ as DEFAULT_FLAVOR, a as flavors, b as themePresets, c as getCurrentFlavor, d as getThemeData, f as isValidFlavor, g as themes, h as resetTheme, i as createThemeClass, l as getCurrentTheme, m as resetFlavor, n as applyTheme, o as getAllFlavors, p as isValidTheme, r as createFlavorClass, s as getAllThemes, t as applyFlavor, u as getFlavorData, v as DEFAULT_THEME, y as flavorPresets } from "./index.node-dvrNviMx.js";
14
+ import { c as getMonoTooltipGlobal, o as monoTooltip, t as controlMonoTooltip } from "./control-tooltip-C3rA_nSH.js";
15
+ import { a as resetMonoTooltip, n as createMonoTooltip, r as destroyAllMonoTooltips } from "./tooltip-Drekihf5.js";
16
+ import { _ as DEFAULT_FLAVOR, a as flavors, b as themePresets, c as getCurrentFlavor, d as getThemeData, f as isValidFlavor, g as themes, h as resetTheme, i as createThemeClass, l as getCurrentTheme, m as resetFlavor, n as applyTheme, o as getAllFlavors, p as isValidTheme, r as createFlavorClass, s as getAllThemes, t as applyFlavor, u as getFlavorData, v as DEFAULT_THEME, y as flavorPresets } from "./index.node-DzCuvHLg.js";
16
17
 
17
18
  export { DEFAULT_ERROR_MESSAGES, DEFAULT_FLAVOR, DEFAULT_SEARCH_OPERATION, DEFAULT_THEME, OPERATOR_ARITY as MONO_FILTER_OPERATOR_ARITY, DEFAULT_TEXTS as MONO_FILTER_TEXTS, MonoSourceSearch, SEARCH_FIELDS_KEYS, applyFlavor, applyTheme, arrayToODataString, arrayToTree, buildChartApply, buildChartOdataRequest, buildGroups, collectGroupPaths, composeApply, monoChart as controlMonoChart, monoChart, monoDataDropdown as controlMonoDataDropdown, monoDataDropdown, monoFilterBuilder as controlMonoFilterBuilder, monoFilterBuilder, monoForm as controlMonoForm, monoForm, monoModal as controlMonoModal, monoModal, monoDataGrid as controlMonoTable, monoDataGrid, controlMonoTooltip, createFlavorClass, createMonoTooltip, createMonoUI, createThemeClass, describeError, destroyAllMonoTooltips, errorStatus, flattenLeaves, flavorPresets, flavors, getAllFlavors, getAllThemes, getCurrentFlavor, getCurrentTheme, getFieldValue, getFlavorData, getMonoSkeletonStatus, getMonoTooltipGlobal, getMonoUI, getMonoUIStatus, getThemeData, isFoldableSearch, isGroupNode, isMonoSsrApp, isPath, isValidFlavor, isValidTheme, mergePatch, mergeSearchFields, monoArraySource, operatorsFor as monoFilterOperatorsFor, monoTooltip, normalizeError, odataStringToArray, parseFieldPath, parseSearchValue, plainSearchFields, readSearchField, resetFlavor, resetMonoSkeleton, resetMonoTooltip, resetMonoUI, resetTheme, resolveErrorMessages, resolveMaybeReactive, resolveSearchFields, searchRemoteFilter, searchRowPredicate, setErrorMessages, setFieldValue, themePresets, themes, toODataClause, toODataSelector, treeToArray };
@@ -3,7 +3,7 @@ import "./mono-data-grid-8jmeIXUU.js";
3
3
  import "./mono-ui-BwUc0L6B.js";
4
4
  import "./mono-data-chart-ChkelNT7.js";
5
5
  import "./mono-data-dropdown-DxpUUk2y.js";
6
- import "./tooltip-FCMRUSLi.js";
6
+ import "./tooltip-Drekihf5.js";
7
7
 
8
8
  //#region src/data/theme/presets.json
9
9
  var presets_default = {