@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
@@ -0,0 +1,102 @@
1
+ import { SliderFill } from "./slider-types.js";
2
+ //#region src/components/slider/slider-math.d.ts
3
+ export interface SliderScale {
4
+ min: number;
5
+ max: number;
6
+ /** Snap interval; 0 = continuous. Ignored when `stops` is set. */
7
+ step: number;
8
+ /** Sorted, de-duplicated, inside [min, max]; null when the slider snaps to `step`. */
9
+ stops: number[] | null;
10
+ minGap: number;
11
+ }
12
+ export interface SliderScaleInput {
13
+ min?: unknown;
14
+ max?: unknown;
15
+ step?: unknown;
16
+ stops?: unknown;
17
+ minGap?: unknown;
18
+ }
19
+ /** One stretch of track between two boundaries (the ends, or a thumb). */
20
+ export interface SliderPiece {
21
+ /** Start / end along the track, 0–100. */
22
+ from: number;
23
+ to: number;
24
+ /** True when that end is a THUMB (so a `track-gap` cuts it back), false at the track's ends. */
25
+ cutStart: boolean;
26
+ cutEnd: boolean;
27
+ filled: boolean;
28
+ }
29
+ export interface SliderMarkPoint {
30
+ value: number;
31
+ /** 0–100 along the track. */
32
+ pct: number;
33
+ /** The mark's own label; undefined means "format the value" (when labels are shown at all). */
34
+ label?: string;
35
+ /** True when the mark carried a label (or was given as an object). */
36
+ labelled: boolean;
37
+ }
38
+ /** Strip float noise (0.1 + 0.2) without losing a fractional step. */
39
+ export declare function stripNoise(n: number): number;
40
+ /**
41
+ * Anything a consumer (or a framework) might hand over as a value — a number, an array, a JSON
42
+ * string (`"[20,80]"`, what an SSR attribute carries), a comma list (`"20,80"`), a numeric string —
43
+ * as a list of finite numbers. Non-numbers are dropped. `null` when nothing usable is left.
44
+ */
45
+ export declare function coerceNumbers(value: unknown): number[] | null;
46
+ /** The scale from raw props: defaults 0 / 100 / 1, `max` never below `min`, stops cleaned. */
47
+ export declare function resolveScale(input: SliderScaleInput): SliderScale;
48
+ /** The allowed value nearest to `v` (a stop, a grid point, or `v` itself when continuous). */
49
+ export declare function snap(v: number, scale: SliderScale): number;
50
+ /** The smallest allowed value ≥ x (or `max` when none is). */
51
+ export declare function ceilTo(x: number, scale: SliderScale): number;
52
+ /** The largest allowed value ≤ x (or `min` when none is). */
53
+ export declare function floorTo(x: number, scale: SliderScale): number;
54
+ /**
55
+ * The values, made valid: each clamped and snapped, sorted, then spread so neighbours are at least
56
+ * `minGap` apart. Thumbs are never dropped — when the gap cannot fit every thumb, they pack
57
+ * against the ends (the forward pass pushes right, the backward pass pulls back under `max`).
58
+ */
59
+ export declare function normalise(values: number[], scale: SliderScale): number[];
60
+ /** The range thumb `i` may move in: its neighbours ± `minGap` (the BLOCK rule). */
61
+ export declare function thumbBounds(values: number[], i: number, scale: SliderScale): {
62
+ lo: number;
63
+ hi: number;
64
+ };
65
+ /**
66
+ * Move thumb `i` toward `v`: snap, then stop at the neighbours (± gap). Returns a NEW array when
67
+ * the thumb actually moved, the SAME array otherwise — callers use identity to skip no-op events.
68
+ */
69
+ export declare function moveThumb(values: number[], i: number, v: number, scale: SliderScale): number[];
70
+ /**
71
+ * Shift a whole run of thumbs `[from..to]` by `delta`, keeping their spacing — the drag of a filled
72
+ * segment between two thumbs. The run stops at the track ends and at the thumbs outside it.
73
+ */
74
+ export declare function moveRun(values: number[], from: number, to: number, delta: number, scale: SliderScale): number[];
75
+ /**
76
+ * The thumb a press at `v` should grab: the nearest one. Thumbs sitting on the same spot (`[2, 2,
77
+ * 3]`) tie — then the press picks by SIDE: a press above the stack takes its LAST thumb, below it
78
+ * the FIRST, so stacked thumbs can always be pulled apart. `dir` (+1 / -1) breaks an exact hit,
79
+ * once the drag has shown which way it is heading.
80
+ */
81
+ export declare function nearestThumb(values: number[], v: number, dir?: number): number;
82
+ /** True when several thumbs share position `values[i]` (a stack the next drag must split). */
83
+ export declare function isStacked(values: number[], i: number): boolean;
84
+ /** `v` as a 0–100 position along the track. */
85
+ export declare function toPercent(v: number, scale: SliderScale): number;
86
+ /** A 0–1 position along the track as a raw (unsnapped) value. */
87
+ export declare function fromRatio(ratio: number, scale: SliderScale): number;
88
+ /**
89
+ * The track as pieces between its boundaries (the two ends and every thumb), each flagged filled
90
+ * or not by the `fill` mode. Rendering every stretch as its own piece is what lets `track-gap` cut
91
+ * the track back around each thumb, and lets a consumer colour segments one by one.
92
+ */
93
+ export declare function trackPieces(values: number[], scale: SliderScale, fill: SliderFill): SliderPiece[];
94
+ /** The marks to draw. `true` = one per stop, or per step (only the two ends past ~26 — denser is a texture, not ticks). */
95
+ export declare function markPoints(marks: unknown, scale: SliderScale): SliderMarkPoint[];
96
+ /**
97
+ * One keyboard step from `v`: `dir` ±1, `big` for PageUp/PageDown. With stops it walks the list
98
+ * (big = a tenth of it, at least one); with a grid it moves a step (big = ten); continuous moves
99
+ * 1% (big = 10%).
100
+ */
101
+ export declare function stepFrom(v: number, dir: 1 | -1, big: boolean, scale: SliderScale): number;
102
+ //#endregion
@@ -0,0 +1,188 @@
1
+ import { VisibilityProps } from "../../composables/visibility.js";
2
+ import { MonoTooltipOptions } from "../tooltip/tooltip-types.js";
3
+ import { InputFormat, InputFormatCtx } from "../input/input-format.js";
4
+ //#region src/components/slider/slider-types.d.ts
5
+ export type SliderSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl' | 'xxl';
6
+ export type SliderColor = 'primary' | 'secondary' | 'success' | 'danger' | 'warning' | 'info' | 'teal' | 'purple' | 'neutral' | 'dark';
7
+ /** Which way the track runs. Vertical puts `min` at the bottom. */
8
+ export type SliderType = 'horizontal' | 'vertical';
9
+ /**
10
+ * What the coloured part of the track covers.
11
+ * - `auto`: from `min` to the thumb with one thumb; between the first and last thumb with several.
12
+ * - `start`: from `min` to the FIRST thumb.
13
+ * - `end`: from the LAST thumb to `max`.
14
+ * - `none`: no fill.
15
+ */
16
+ export type SliderFill = 'auto' | 'start' | 'end' | 'none';
17
+ /** When each thumb shows its value bubble. */
18
+ export type SliderValueTooltip = 'auto' | 'always' | 'never';
19
+ export type SliderValidationState = 'default' | 'valid' | 'invalid' | 'warning';
20
+ /** A slider value: one thumb is a number, several thumbs are an array (its length = the thumb count). */
21
+ export type SliderValue = number | number[];
22
+ /** One tick on the track. A bare number is a tick without a label. */
23
+ export type SliderMark = number | {
24
+ value: number;
25
+ label?: string;
26
+ };
27
+ export type SliderModelEventDetail = {
28
+ /** The value in the shape it came in: a number for a single-number model, an array otherwise. */
29
+ modelValue: SliderValue;
30
+ currentValue: SliderValue;
31
+ oldValue: SliderValue;
32
+ value: SliderValue;
33
+ /** Always an array, whatever the model's shape. */
34
+ values: number[];
35
+ /** The thumb that moved (-1 when the whole value was replaced, e.g. a segment drag moves two). */
36
+ index: number;
37
+ name?: string;
38
+ sourceEvent?: Event;
39
+ };
40
+ export type SliderModelEvent = CustomEvent<SliderModelEventDetail>;
41
+ export interface SliderCssClass {
42
+ root?: string;
43
+ label?: string;
44
+ required?: string;
45
+ value?: string;
46
+ control?: string;
47
+ track?: string;
48
+ fill?: string;
49
+ thumb?: string;
50
+ tooltip?: string;
51
+ marks?: string;
52
+ mark?: string;
53
+ markLabel?: string;
54
+ messageWrap?: string;
55
+ message?: string;
56
+ }
57
+ export interface SliderProps extends VisibilityProps {
58
+ /**
59
+ * The value: a number for one thumb, an array for several (`[20, 80]` is a range, `[2, 2, 3]`
60
+ * is three thumbs). The shape you pass is the shape you get back. A JSON string is accepted.
61
+ */
62
+ modelValue?: SliderValue | string;
63
+ 'model-value'?: SliderValue | string;
64
+ modelvalue?: SliderValue | string;
65
+ /** The same as `modelValue`. */
66
+ value?: SliderValue | string;
67
+ /** Lowest value. Default 0. */
68
+ min?: number | string;
69
+ /** Highest value. Default 100. */
70
+ max?: number | string;
71
+ /** Snap interval. Default 1; `0` slides continuously. Ignored when `stops` is set. */
72
+ step?: number | string;
73
+ /**
74
+ * Discrete snap points: the thumb can only land on these values (`[0, 10, 25, 50, 100]`).
75
+ * Replaces `step`. A JSON string is accepted.
76
+ */
77
+ stops?: number[] | string;
78
+ /** Smallest distance kept between neighbouring thumbs. Default 0 (thumbs may stack). */
79
+ minGap?: number | string;
80
+ 'min-gap'?: number | string;
81
+ mingap?: number | string;
82
+ /** `vertical` runs the track bottom (min) to top (max). Give it a `height`. */
83
+ type?: SliderType;
84
+ /**
85
+ * Tick marks: `true` for one at every step (or every stop), or a list of values / `{ value, label }`.
86
+ * Labels render under the track (beside it when vertical), drawn through `format-display` when
87
+ * a mark has no label of its own. A JSON string is accepted.
88
+ */
89
+ marks?: boolean | SliderMark[] | string;
90
+ /** What the coloured part of the track covers. Default `auto`. */
91
+ fill?: SliderFill;
92
+ /** Empty space cut out of the track around each thumb, in px (Material 3 style). Default 0. */
93
+ trackGap?: number | string;
94
+ 'track-gap'?: number | string;
95
+ trackgap?: number | string;
96
+ /** When each thumb shows its value bubble. Default `auto` (hover, focus or drag). */
97
+ valueTooltip?: SliderValueTooltip;
98
+ 'value-tooltip'?: SliderValueTooltip;
99
+ valuetooltip?: SliderValueTooltip;
100
+ /** Show the value at the end of the label row. Default `true`; `show-value="false"` hides it. */
101
+ showValue?: boolean;
102
+ 'show-value'?: boolean;
103
+ showvalue?: boolean;
104
+ /** Joins the values in the label-row readout. Default `" – "`. */
105
+ valueSeparator?: string;
106
+ 'value-separator'?: string;
107
+ valueseparator?: string;
108
+ /**
109
+ * How a value is DISPLAYED (readout, bubbles, mark labels, `aria-valuetext`): a pattern
110
+ * (`"{}%"`, `'"Rp "#,##0'`) or a function `({ value }) => string`. The model stays a number.
111
+ */
112
+ formatDisplay?: InputFormat;
113
+ 'format-display'?: InputFormat;
114
+ formatdisplay?: InputFormat;
115
+ /** Locale a numeric `format-display` pattern is drawn with. */
116
+ formatLocale?: string;
117
+ 'format-locale'?: string;
118
+ formatlocale?: string;
119
+ /** Visual size: scales the track, thumb and type. */
120
+ size?: SliderSize;
121
+ /** Accent colour of the fill and thumb. */
122
+ color?: SliderColor;
123
+ /** Label text above the slider. */
124
+ label?: string;
125
+ /** Helper text under the slider. */
126
+ helperText?: string;
127
+ 'helper-text'?: string;
128
+ helpertext?: string;
129
+ /**
130
+ * Info icon at the end of the label; hovering, focusing or tapping it shows this text.
131
+ * Plain text → a small built-in bubble (no dependency). Full tooltip options
132
+ * (`:tooltip.prop="{ content, placement, color }"`) → a `mono-tooltip`, which needs the
133
+ * optional `@floating-ui/dom` + `@floating-ui/core` peers (without them that form renders
134
+ * no icon). Shown only beside a label.
135
+ * This is NOT the thumb's value bubble — that is `value-tooltip`.
136
+ */
137
+ tooltip?: string | MonoTooltipOptions;
138
+ validationState?: SliderValidationState;
139
+ 'validation-state'?: SliderValidationState;
140
+ validationstate?: SliderValidationState;
141
+ validationMessage?: string;
142
+ 'validation-message'?: string;
143
+ validationmessage?: string;
144
+ error?: boolean;
145
+ errorMessage?: string;
146
+ 'error-message'?: string;
147
+ errormessage?: string;
148
+ success?: boolean;
149
+ successMessage?: string;
150
+ 'success-message'?: string;
151
+ successmessage?: string;
152
+ /** Disables interaction and dims the slider. */
153
+ disabled?: boolean;
154
+ /** Focusable, but the value cannot be changed. */
155
+ readonly?: boolean;
156
+ /** Marks the field required (asterisk + `aria-required`). */
157
+ required?: boolean;
158
+ /**
159
+ * Form field name. The element writes one hidden `<input>` per thumb, so a native `<form>`
160
+ * submits it (`name` for one thumb, `name[]` repeated for several).
161
+ */
162
+ name?: string;
163
+ /** Accessible label (each thumb adds "minimum" / "maximum" / its position). */
164
+ ariaLabelText?: string;
165
+ ariaLabel?: string;
166
+ 'aria-label'?: string;
167
+ arialabel?: string;
168
+ /** Track length when vertical (CSS length or px number). Default 200px. */
169
+ height?: string | number;
170
+ /** Width of the whole field (CSS length or px number). */
171
+ width?: string | number;
172
+ /** Per-part class overrides for internal elements. */
173
+ cssClass?: SliderCssClass;
174
+ /** Simple root class. */
175
+ 'css-class'?: string;
176
+ }
177
+ export interface SliderEvents {
178
+ /** While dragging / on every key press. */
179
+ input: SliderModelEvent;
180
+ /** On release / when keyboard interaction ends. */
181
+ change: SliderModelEvent;
182
+ 'mno-input': SliderModelEvent;
183
+ mnoInput: SliderModelEvent;
184
+ 'mno-change': SliderModelEvent;
185
+ mnoChange: SliderModelEvent;
186
+ }
187
+ //#endregion
188
+ export type { InputFormat as SliderFormat, InputFormatCtx as SliderFormatCtx };
@@ -0,0 +1,74 @@
1
+ import { CssSizeValue } from "../../composables/css-size.js";
2
+ //#region src/components/table/column-autosize.d.ts
3
+ /**
4
+ * Content-sized columns — what `mono-table-th`'s `width="auto"` drives.
5
+ *
6
+ * Under `mono-table-fixed` (`table-layout: fixed`) CSS cannot do this: an `auto` column takes
7
+ * the WHOLE surplus instead of fitting its content, and `min-width` / `max-width` on a cell are
8
+ * ignored by the table algorithm. So the column is measured here and handed a concrete px width,
9
+ * clamped to `minWidth` / `maxWidth`, written to its `<col>` (which wins under fixed layout) and
10
+ * to the header cell.
11
+ *
12
+ * Text is measured with a canvas, not read back from the cell: reading the cell's own width would
13
+ * return the width last written, and a column could then never shrink. Measuring text also keeps
14
+ * the pass free of layout reads, so re-running it on every change is cheap.
15
+ *
16
+ * What is measured: the header (caption + its icons), every body cell and every FOOTER cell of
17
+ * the column. The footer matters — a `<mono-table-summary>` total covers the whole set, so a
18
+ * virtual-scroll window that only shows small figures still sizes for the largest one.
19
+ *
20
+ * Cell content is treated as one line (what a money column is). An editor (`<input>`, including
21
+ * the one inside `mono-input`) counts with its value and its own padding / border.
22
+ */
23
+ /** The text measurer — swappable so tests can run where there is no canvas (jsdom). */
24
+ export declare const autosizeEnv: {
25
+ measure: (text: string, font: string) => number;
26
+ };
27
+ /**
28
+ * `text` as the element renders it: its `text-transform`, its `letter-spacing` (canvas ignores
29
+ * both) and its `font-variant-numeric: tabular-nums` (every digit at the widest digit's advance —
30
+ * a safe upper bound; tabular figures are wider than the proportional ones canvas measures).
31
+ */
32
+ export declare function measureStyled(text: string, style: CSSStyleDeclaration): number;
33
+ /**
34
+ * A size prop as px: a number / bare numeric string / `px` → px, `rem` → × the root font size,
35
+ * `em` → × `el`'s font size. Anything else (`%`, `auto`, a var) → `undefined`: not a bound.
36
+ */
37
+ export declare function cssLengthToPx(value: CssSizeValue | null, el?: Element): number | undefined;
38
+ /** `w` clamped to `[min, max]`; an unset bound does not clamp. `min` wins over a smaller `max`. */
39
+ export declare function clampWidth(w: number, min?: number, max?: number): number;
40
+ /**
41
+ * The grid column a header cell STARTS at — a walk over its section's rows honouring `rowspan`
42
+ * and `colspan`, so a leaf header under a band row (`<th colspan>` above it) maps to its real
43
+ * column. `cellIndex` alone would count only the cells of its own row.
44
+ */
45
+ export declare function headerColumnIndex(cell: HTMLTableCellElement): number;
46
+ /** The one-line width a cell's content needs, padding included. */
47
+ export declare function contentWidth(cell: HTMLElement): number;
48
+ /**
49
+ * One auto-sized column, owned by its `mono-table-th`. `schedule()` coalesces every trigger (a
50
+ * controller notify, a body mutation, typing in an editor) into one measurement per frame.
51
+ */
52
+ export declare class ColumnAutoSize {
53
+ private readonly host;
54
+ min?: number;
55
+ max?: number;
56
+ private _raf;
57
+ private _table?;
58
+ private _observer?;
59
+ private _wrote?;
60
+ private readonly _onInput;
61
+ /**
62
+ * A web font that finished loading after a measurement: canvas measured the FALLBACK face, so
63
+ * the width (and the cached digit advances) are stale — usually too narrow for the real font.
64
+ */
65
+ private readonly _onFonts;
66
+ constructor(host: HTMLElement);
67
+ schedule(): void;
68
+ /** Stop watching, and hand the column back to whatever width it is given next. */
69
+ stop(clear?: boolean): void;
70
+ private _watch;
71
+ private _unwatch;
72
+ private _run;
73
+ }
74
+ //#endregion
@@ -298,7 +298,17 @@ export interface MonoTableColumnProps {
298
298
  * @example map: (v) => formatDateTime(v)
299
299
  */
300
300
  map?: (value: any, row: any, index: number) => unknown;
301
+ /**
302
+ * Column width. Number → px; string used as-is (`'10rem'`). `'auto'` sizes the column to its
303
+ * content (header, body and footer cells), clamped to `minWidth` / `maxWidth` — also under
304
+ * `mono-table-fixed`. Money columns are the case: narrow while every figure is `0`, wider
305
+ * once a large one appears.
306
+ */
301
307
  width?: string | number;
308
+ /** Lower bound of the column width (px / `rem` / `em`). Clamps `width: 'auto'`. */
309
+ minWidth?: string | number;
310
+ /** Upper bound of the column width (px / `rem` / `em`). Clamps `width: 'auto'`. */
311
+ maxWidth?: string | number;
302
312
  height?: string | number;
303
313
  /**
304
314
  * Header alignment: `'left' | 'center' | 'right'`. Applied to the column's `<th>`.
@@ -1,4 +1,5 @@
1
1
  import { Constructor } from "../../composables/hybird-prop.js";
2
+ import { CssSizeValue } from "../../composables/css-size.js";
2
3
  import { MonoColumnSort, MonoDateFilter, MonoEditableTrigger, MonoHeaderFilter, SortOrder } from "./mono-data-grid.js";
3
4
  import { MonoTableMenuCoreInterface } from "./table-menu-core.js";
4
5
  import { LitElement, TemplateResult } from "lit";
@@ -26,6 +27,8 @@ export declare class MonoTableThCoreInterface extends MonoTableMenuCoreInterface
26
27
  dateFilter: boolean | MonoDateFilter;
27
28
  align?: TableThAlign;
28
29
  width?: string | number;
30
+ minWidth?: CssSizeValue;
31
+ maxWidth?: CssSizeValue;
29
32
  height?: string | number;
30
33
  protected renderSlot(name: TableThSlotName): TemplateResult;
31
34
  protected renderIcon(name: TableThIconName): TemplateResult;
@@ -305,8 +305,15 @@ export interface TableThProps extends TableControlBase {
305
305
  * `<td>` loop so the two sides cannot drift.
306
306
  */
307
307
  align?: 'left' | 'center' | 'right';
308
- /** Column width, applied to the parent `<th>`. Number → px; string used as-is (`'10rem'`, `'40%'`). */
308
+ /**
309
+ * Column width, applied to the parent `<th>`. Number → px; string used as-is (`'10rem'`, `'40%'`).
310
+ * `'auto'` measures the column's content and writes the px to its `<col>` + `<th>`.
311
+ */
309
312
  width?: string | number;
313
+ /** Lower bound of the column width — clamps `width="auto"`. Number → px; `rem` / `em` too. */
314
+ minWidth?: string | number;
315
+ /** Upper bound of the column width — clamps `width="auto"`. */
316
+ maxWidth?: string | number;
310
317
  /** Header-cell height, applied to the parent `<th>`. Number → px; string used as-is. */
311
318
  height?: string | number;
312
319
  }
@@ -27,6 +27,8 @@ export declare class MonoTagInput extends MonoTagInput_base {
27
27
  * `insertBefore(node, anchor)` against the sibling that mono had moved away.
28
28
  */
29
29
  private _slotList;
30
+ /** The consumer's `slot="select-all"` wrapper — held and placed as one node, like `_slotList`. */
31
+ private _slotSelectAll;
30
32
  connectedCallback(): void;
31
33
  protected updated(changed: Map<string, unknown>): void;
32
34
  /**
@@ -46,6 +48,14 @@ export declare class MonoTagInput extends MonoTagInput_base {
46
48
  * the consumer's scroll position and focus.
47
49
  */
48
50
  private _placeListSlot;
51
+ /**
52
+ * Move the select-all wrapper into the "All" row, once that row exists.
53
+ *
54
+ * The row only renders while the panel is open and has rows to select, so the target comes and
55
+ * goes. When Lit drops it the wrapper leaves WITH it, still inside the detached placeholder — it
56
+ * always keeps a parent, which is what the consumer's framework needs to keep patching it.
57
+ */
58
+ private _placeSelectAllSlot;
49
59
  private _captureSlots;
50
60
  /**
51
61
  * Adopt a wrapper that appeared after `connectedCallback` — see `LateSlotWatcher`.
@@ -59,6 +69,8 @@ export declare class MonoTagInput extends MonoTagInput_base {
59
69
  * anchors that are its OWN children, and those move with it.
60
70
  */
61
71
  protected _onLateListSlot(): void;
72
+ /** Adopt a late `slot="select-all"` wrapper — parked out of the host first, as above. */
73
+ protected _onLateSelectAllSlot(): void;
62
74
  private _placeSlot;
63
75
  }
64
76
  declare global {
@@ -22,7 +22,9 @@ export declare class MonoTagInputShadow extends MonoTagInputShadow_base {
22
22
  private _onSlotChange;
23
23
  /** A wrapper appeared after connect — the flag is all this build needs, projection does the rest. */
24
24
  protected _onLateListSlot(): void;
25
- /** Reconcile the 3 slot-presence flags from their slots' assigned content. */
25
+ /** Same for `slot="select-all"` — the flag swaps the row to its slotted shape. */
26
+ protected _onLateSelectAllSlot(): void;
27
+ /** Reconcile the 4 slot-presence flags from their slots' assigned content. */
26
28
  private _scanSlots;
27
29
  /**
28
30
  * The consumer's list wrapper, PROJECTED rather than moved.
@@ -32,6 +34,12 @@ export declare class MonoTagInputShadow extends MonoTagInputShadow_base {
32
34
  * would cut them off from it — the same reason this build inlines SVGs instead of icon classes.
33
35
  */
34
36
  protected renderListSlot(): TemplateResult;
37
+ /**
38
+ * The select-all content, projected — the panel stays in this shadow root, so a native `<slot>`
39
+ * reaches it and the page's CSS still styles what the consumer put there. Presence is read off
40
+ * the light child, never `slotchange` — see `_scanSlots`.
41
+ */
42
+ protected renderSelectAllSlot(): TemplateResult;
35
43
  /** Native `<slot>` carrying the prop fallback as native slot content. */
36
44
  protected _slotOutlet(name: TagInputSlotName, fallback?: unknown): TemplateResult;
37
45
  /** Inline SVG — the global `.mono-icon`/`i-mdi-close` UnoCSS icon can't reach a
@@ -1,12 +1,13 @@
1
1
  import { Constructor } from "../../composables/hybird-prop.js";
2
2
  import { CssSizeValue } from "../../composables/css-size.js";
3
3
  import { MonoSearchValue } from "../../search/data-search.js";
4
+ import { FieldTooltipController, FieldTooltipValue } from "../../composables/field-tooltip.js";
4
5
  import { TagInputChipProps, TagInputColor, TagInputCssClass, TagInputDataSource, TagInputDisplayGroup, TagInputDisplayValue, TagInputDropdownOptions, TagInputItem, TagInputLoadMore, TagInputSize, TagInputValidationState, TagInputValue, TagInputVariant } from "./tag-input-types.js";
5
6
  import { LateSlotWatcher } from "../../composables/light-slots.js";
6
7
  import { LitElement, TemplateResult } from "lit";
7
8
  //#region src/components/tag-input/tag-input-core.d.ts
8
9
  /** Named slots projected by `mono-tag-input` (light: captured; shadow: native). */
9
- export type TagInputSlotName = 'label' | 'helper' | 'list';
10
+ export type TagInputSlotName = 'label' | 'helper' | 'list' | 'select-all';
10
11
  /**
11
12
  * `MonoTagInputCore` — render-mode-agnostic logic for `mono-tag-input` (props,
12
13
  * hybrid aliases, array value/model sync, DataSource paging, search, grouping,
@@ -33,6 +34,14 @@ export declare class MonoTagInputCoreInterface {
33
34
  protected _onListSlotClick: (event: Event) => void;
34
35
  /** The list wrapper's parking spot, portal-aware. */
35
36
  protected readonly _listSlotTarget: HTMLElement | null;
37
+ /** True once a build has found a `slot="select-all"`; swaps the "All" label for it. */
38
+ protected _hasSelectAllSlotState: boolean;
39
+ protected _lateSelectAllSlot: LateSlotWatcher;
40
+ protected _onLateSelectAllSlot(): void;
41
+ /** Per-build render point for the consumer's select-all content. */
42
+ protected renderSelectAllSlot(): TemplateResult;
43
+ /** The select-all wrapper's target inside the "All" row, portal-aware. */
44
+ protected readonly _selectAllSlotTarget: HTMLElement | null;
36
45
  size: TagInputSize;
37
46
  color: TagInputColor;
38
47
  variant: TagInputVariant;
@@ -43,6 +52,8 @@ export declare class MonoTagInputCoreInterface {
43
52
  label: string;
44
53
  placeholder: string;
45
54
  helperText: string;
55
+ tooltip: FieldTooltipValue;
56
+ protected readonly _tooltip: FieldTooltipController;
46
57
  validationState: TagInputValidationState;
47
58
  validationMessage: string;
48
59
  errorMessage: string;
@@ -4,11 +4,16 @@ import { LoadMoreMode, MonoDataSource } from "../../composables/data-source-cont
4
4
  import { VisibilityProps } from "../../composables/visibility.js";
5
5
  import { MonoSearchValue } from "../../search/data-search.js";
6
6
  import { ChipBehaviour, ChipColor, ChipCssClass, ChipRounded, ChipSize, ChipVariant } from "../chip/chip-types.js";
7
+ import { MonoTooltipOptions } from "../tooltip/tooltip-types.js";
7
8
  import { ChipLimitProps } from "../../composables/chip-limits.js";
8
9
  //#region src/components/tag-input/tag-input-types.d.ts
9
10
  export type TagInputSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl' | 'xxl';
10
11
  export type TagInputColor = 'primary' | 'secondary' | 'success' | 'danger' | 'warning' | 'info' | 'teal' | 'purple' | 'neutral' | 'dark';
11
12
  export type TagInputVariant = 'outlined' | 'filled' | 'underlined';
13
+ /** Where the label sits: above the box (default), notched into its top border (inset for filled / underlined), or beside it. */
14
+ export type TagInputLabelPosition = 'top' | 'notched' | 'left' | 'right';
15
+ /** Where the validation message shows: under the box (default), behind a state icon inside it, or floating under it on hover / focus. */
16
+ export type TagInputValidationPosition = 'bottom' | 'icon' | 'float';
12
17
  /**
13
18
  * Configuration for the tag chips inside the field, passed as one object:
14
19
  * `<mono-tag-input :chip.prop="{ size: 'md', shape: 'rounded', dot: true }">`.
@@ -115,6 +120,8 @@ export interface TagInputCssClass {
115
120
  groupLabel?: string;
116
121
  /** The leading "All" row. Sits alongside `item`, which it also carries. */
117
122
  selectAll?: string;
123
+ /** The box beside the "All" checkbox holding the consumer's `slot="select-all"` content. */
124
+ selectAllSlot?: string;
118
125
  item?: string;
119
126
  itemActive?: string;
120
127
  itemSelected?: string;
@@ -270,6 +277,24 @@ export interface TagInputProps extends VisibilityProps {
270
277
  color?: TagInputColor;
271
278
  /** Visual style of the tag input. */
272
279
  variant?: TagInputVariant;
280
+ /**
281
+ * Where the label sits: `top` (above the box, default), `notched` (on the top
282
+ * border for outlined; inset inside the box for filled / underlined), or
283
+ * `left` / `right` of the box. Knobs: `--mono-tag-input-label-width`, `-label-side-gap`,
284
+ * `-label-notch-font-size`, `-label-notch-bg`.
285
+ */
286
+ labelPosition?: TagInputLabelPosition;
287
+ 'label-position'?: TagInputLabelPosition;
288
+ labelposition?: TagInputLabelPosition;
289
+ /**
290
+ * Where the validation message shows. `bottom` (default): the row under the box.
291
+ * `icon`: a state icon inside the box; hover / tap / keyboard focus shows the message in
292
+ * a state-coloured bubble. `float`: the message floats under the box only while the field
293
+ * is hovered or focused. In `icon` / `float` the row under the box keeps the helper text.
294
+ */
295
+ validationPosition?: TagInputValidationPosition;
296
+ 'validation-position'?: TagInputValidationPosition;
297
+ validationposition?: TagInputValidationPosition;
273
298
  /**
274
299
  * Tag chip configuration — the `mono-chip` props to apply to every tag.
275
300
  * Bind it as a real property (`:chip.prop="{ size: 'md' }"`); a plain
@@ -284,6 +309,14 @@ export interface TagInputProps extends VisibilityProps {
284
309
  helperText?: string;
285
310
  'helper-text'?: string;
286
311
  helpertext?: string;
312
+ /**
313
+ * Info icon at the end of the label; hovering, focusing or tapping it shows this text.
314
+ * Plain text → a small built-in bubble (no dependency). Full tooltip options
315
+ * (`:tooltip.prop="{ content, placement, color }"`) → a `mono-tooltip`, which needs the
316
+ * optional `@floating-ui/dom` + `@floating-ui/core` peers (without them that form renders
317
+ * no icon). Shown only beside a label.
318
+ */
319
+ tooltip?: string | MonoTooltipOptions;
287
320
  /** Validation state controlling field styling. */
288
321
  validationState?: TagInputValidationState;
289
322
  'validation-state'?: TagInputValidationState;
@@ -1,5 +1,6 @@
1
1
  import { Constructor } from "../../composables/hybird-prop.js";
2
2
  import { CssSizeValue } from "../../composables/css-size.js";
3
+ import { FieldTooltipController, FieldTooltipValue } from "../../composables/field-tooltip.js";
3
4
  import { TextareaColor, TextareaCssClass, TextareaSize, TextareaValidationState, TextareaVariant } from "./textarea-types.js";
4
5
  import { LitElement, TemplateResult } from "lit";
5
6
  //#region src/components/textarea/textarea-core.d.ts
@@ -25,6 +26,8 @@ export declare class MonoTextareaCoreInterface {
25
26
  placeholder: string;
26
27
  label: string;
27
28
  helperText: string;
29
+ tooltip: FieldTooltipValue;
30
+ protected readonly _tooltip: FieldTooltipController;
28
31
  validationState: TextareaValidationState;
29
32
  validationMessage: string;
30
33
  errorMessage: string;
@@ -1,8 +1,13 @@
1
1
  import { VisibilityProps } from "../../composables/visibility.js";
2
+ import { MonoTooltipOptions } from "../tooltip/tooltip-types.js";
2
3
  //#region src/components/textarea/textarea-types.d.ts
3
4
  export type TextareaSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl' | 'xxl';
4
5
  export type TextareaColor = 'primary' | 'secondary' | 'success' | 'danger' | 'warning' | 'info' | 'teal' | 'purple' | 'neutral' | 'dark';
5
6
  export type TextareaVariant = 'outlined' | 'filled' | 'underlined';
7
+ /** Where the label sits: above the box (default), notched into its top border (inset for filled / underlined), or beside it. */
8
+ export type TextareaLabelPosition = 'top' | 'notched' | 'left' | 'right';
9
+ /** Where the validation message shows: under the box (default), behind a state icon inside it, or floating under it on hover / focus. */
10
+ export type TextareaValidationPosition = 'bottom' | 'icon' | 'float';
6
11
  export type TextareaValidationState = 'default' | 'valid' | 'invalid' | 'warning';
7
12
  export interface TextareaCssClass {
8
13
  root?: string;
@@ -40,6 +45,14 @@ export interface TextareaProps extends VisibilityProps {
40
45
  helperText?: string;
41
46
  'helper-text'?: string;
42
47
  helpertext?: string;
48
+ /**
49
+ * Info icon at the end of the label; hovering, focusing or tapping it shows this text.
50
+ * Plain text → a small built-in bubble (no dependency). Full tooltip options
51
+ * (`:tooltip.prop="{ content, placement, color }"`) → a `mono-tooltip`, which needs the
52
+ * optional `@floating-ui/dom` + `@floating-ui/core` peers (without them that form renders
53
+ * no icon). Shown only beside a label.
54
+ */
55
+ tooltip?: string | MonoTooltipOptions;
43
56
  /** Validation state controlling field styling. */
44
57
  validationState?: TextareaValidationState;
45
58
  'validation-state'?: TextareaValidationState;
@@ -62,6 +75,24 @@ export interface TextareaProps extends VisibilityProps {
62
75
  color?: TextareaColor;
63
76
  /** Visual style of the textarea. */
64
77
  variant?: TextareaVariant;
78
+ /**
79
+ * Where the label sits: `top` (above the box, default), `notched` (on the top
80
+ * border for outlined; inset inside the box for filled / underlined), or
81
+ * `left` / `right` of the box. Knobs: `--mono-textarea-label-width`, `-label-side-gap`,
82
+ * `-label-notch-font-size`, `-label-notch-bg`.
83
+ */
84
+ labelPosition?: TextareaLabelPosition;
85
+ 'label-position'?: TextareaLabelPosition;
86
+ labelposition?: TextareaLabelPosition;
87
+ /**
88
+ * Where the validation message shows. `bottom` (default): the row under the box.
89
+ * `icon`: a state icon inside the box; hover / tap / keyboard focus shows the message in
90
+ * a state-coloured bubble. `float`: the message floats under the box only while the field
91
+ * is hovered or focused. In `icon` / `float` the row under the box keeps the helper text.
92
+ */
93
+ validationPosition?: TextareaValidationPosition;
94
+ 'validation-position'?: TextareaValidationPosition;
95
+ validationposition?: TextareaValidationPosition;
65
96
  /** Disables interaction with the textarea. */
66
97
  disabled?: boolean;
67
98
  /** Makes the textarea read-only. */