@mono-lit/helper 0.0.9 → 0.1.0

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 (164) hide show
  1. package/dist/accordion-core-DaNyPWRr.js +277 -0
  2. package/dist/alert-core-DWtHbX_-.js +134 -0
  3. package/dist/breadcrumb-list-core-Dh68T8Cf.js +747 -0
  4. package/dist/{mono-button-CLkHg3WW.js → button-core-DerXg84Q.js} +3 -276
  5. package/dist/button-dropdown-core-DKYEOyjy.js +654 -0
  6. package/dist/button-utils-D5-66M02.js +63 -0
  7. package/dist/card-utils-l80qAmrN.js +312 -0
  8. package/dist/chart-core-DV7hD3ZY.js +801 -0
  9. package/dist/checkbox-utils-DKdrhAzF.js +337 -0
  10. package/dist/chip-utils-DpRrd7Zj.js +403 -0
  11. package/dist/{data-source-controller-C6C4ej_M.js → data-source-controller-DS_JLrmS.js} +1 -1
  12. package/dist/{data-source-options-fxT5QIX4.js → data-source-options-DJUNU26C.js} +6 -6
  13. package/dist/{data-source-read-BL266IW0.js → data-source-read-uKJpRAzx.js} +2 -2
  14. package/dist/date-core-CyuSyvvG.js +734 -0
  15. package/dist/drawer-core-DbFWvNln.js +759 -0
  16. package/dist/dropdown-core-BCH1pK14.js +511 -0
  17. package/dist/dropdown-table-core-SfHUJVFq.js +1342 -0
  18. package/dist/export.js +1 -1
  19. package/dist/{field-path-BabiMrrA.js → field-path-DK2VBWHl.js} +1 -1
  20. package/dist/field-tooltip.css_raw-DVblekCl.js +5 -0
  21. package/dist/{field-validation.css_raw-Cx6SGrfP.js → field-validation.css_raw-BU7C6173.js} +1 -170
  22. package/dist/file-upload-core-Cz_dBQMx.js +624 -0
  23. package/dist/filter-builder-core-DyWjbBP7.js +381 -0
  24. package/dist/{filter-builder-B6Y2mmbM.js → filter-builder-vbqIuPhX.js} +1 -1
  25. package/dist/{filter-eval-ChDSaAUH.js → filter-eval-CqeBnMYh.js} +1 -1
  26. package/dist/{filter-odata-Bi27XUpQ.js → filter-odata-GsczYKNC.js} +1 -1
  27. package/dist/{hydration-flush-BaE9gN3C.js → hydration-flush-Volt9X7Q.js} +2 -1071
  28. package/dist/index.js +11 -11
  29. package/dist/{index.node-DTqDBca7.js → index.node-Csy9zrr1.js} +4 -4
  30. package/dist/index.node.js +11 -11
  31. package/dist/input-utils-BglY-k0H.js +1145 -0
  32. package/dist/menu-core-DkAYuCZ2.js +831 -0
  33. package/dist/modal-core-CSBSPN_m.js +844 -0
  34. package/dist/mono-button-DVvZ03P-.js +280 -0
  35. package/dist/{mono-button.shadow-DqZMpcqY.js → mono-button.shadow-BANxMGln.js} +6 -594
  36. package/dist/{mono-data-chart-NKPdAgVq.js → mono-data-chart-ChF4J9RT.js} +6 -6
  37. package/dist/{mono-data-dropdown-B2iRpJuI.js → mono-data-dropdown-Bgj2PDfm.js} +1 -1
  38. package/dist/{mono-data-grid-llJCX9MC.js → mono-data-grid-DJkp96N-.js} +144 -46
  39. package/dist/{mono-event-BPku9HpS.js → mono-event-CAZf0F_k.js} +14 -9
  40. package/dist/{mono-form-controller-BrA10erm.js → mono-form-controller-DxZLvyg6.js} +2 -1
  41. package/dist/mono-table-checkbox-core-BKOMx8R5.js +5288 -0
  42. package/dist/nav-core-B5qU2dzn.js +225 -0
  43. package/dist/{normalize-error-D93O4q8g.js → normalize-error-BEcd1tmS.js} +2 -2
  44. package/dist/nuxt.js +1 -1
  45. package/dist/otp-core-DXg3vFLh.js +758 -0
  46. package/dist/radio-utils-Dk9Tl1jz.js +319 -0
  47. package/dist/rich-text-editor-core-Ddd_QaLn.js +1280 -0
  48. package/dist/select-utils-BgArYHk8.js +2140 -0
  49. package/dist/sidebar-core-CD6txDo3.js +583 -0
  50. package/dist/slider-core-vcWr321-.js +1014 -0
  51. package/dist/src/components/dropdown-table/dropdown-table-core.d.ts +2 -2
  52. package/dist/src/components/dropdown-table/dropdown-table-types.d.ts +1 -1
  53. package/dist/src/components/dropdown-table/index.d.ts +1 -1
  54. package/dist/src/components/dropdown-table/index.shadow.d.ts +1 -1
  55. package/dist/src/components/dropdown-table/mono-data-dropdown.d.ts +1 -1
  56. package/dist/src/components/form/form-types.d.ts +9 -3
  57. package/dist/src/components/input/input-core.d.ts +1 -1
  58. package/dist/src/components/input/input-types.d.ts +1 -1
  59. package/dist/src/components/otp/otp-core.d.ts +1 -1
  60. package/dist/src/components/select/select-core.d.ts +1 -1
  61. package/dist/src/components/select/select-types.d.ts +1 -1
  62. package/dist/src/components/slider/slider-core.d.ts +1 -1
  63. package/dist/src/components/slider/slider-types.d.ts +1 -1
  64. package/dist/src/components/table/filter-suggestion.d.ts +171 -0
  65. package/dist/src/components/table/index.d.ts +5 -4
  66. package/dist/src/components/table/index.shadow.d.ts +5 -4
  67. package/dist/src/components/table/mono-data-grid.d.ts +22 -3
  68. package/dist/src/components/table/mono-table-empty-core.d.ts +37 -0
  69. package/dist/src/components/table/mono-table-search-core.d.ts +22 -3
  70. package/dist/src/components/table/table-types.d.ts +74 -4
  71. package/dist/src/components/tag-input/tag-input-core.d.ts +1 -1
  72. package/dist/src/components/tag-input/tag-input-types.d.ts +1 -1
  73. package/dist/src/components/textarea/textarea-core.d.ts +1 -1
  74. package/dist/src/composables/mono-event.d.ts +7 -1
  75. package/dist/src/entries/index.d.ts +8 -6
  76. package/dist/src/entries/index.node.d.ts +8 -6
  77. package/dist/src/search/index.d.ts +1 -1
  78. package/dist/src/utils/group-count.d.ts +36 -0
  79. package/dist/switch-utils-CTZ4id2V.js +338 -0
  80. package/dist/tabs-core-r5-B8k_N.js +317 -0
  81. package/dist/tag-input-utils-D2JA90DQ.js +3060 -0
  82. package/dist/textarea-utils-VU1KeXm8.js +821 -0
  83. package/dist/ui/accordion.js +2 -274
  84. package/dist/ui/alert.js +2 -131
  85. package/dist/ui/breadcrumb.js +4 -745
  86. package/dist/ui/button-dropdown.js +4 -652
  87. package/dist/ui/button.js +2 -63
  88. package/dist/ui/card.js +2 -310
  89. package/dist/ui/chart.js +4 -800
  90. package/dist/ui/checkbox.js +4 -335
  91. package/dist/ui/chip.js +4 -402
  92. package/dist/ui/date.js +3 -732
  93. package/dist/ui/drawer.js +3 -757
  94. package/dist/ui/dropdown-table.js +5 -1341
  95. package/dist/ui/dropdown.js +4 -509
  96. package/dist/ui/file-upload.js +3 -622
  97. package/dist/ui/filter.js +5 -380
  98. package/dist/ui/form.js +1 -1
  99. package/dist/ui/index.css +118 -1
  100. package/dist/ui/input.js +3 -1141
  101. package/dist/ui/menu.js +4 -828
  102. package/dist/ui/modal.js +4 -843
  103. package/dist/ui/nav.js +4 -223
  104. package/dist/ui/otp.js +4 -756
  105. package/dist/ui/radio.js +4 -317
  106. package/dist/ui/rich-text-editor.js +4 -1278
  107. package/dist/ui/select.js +5 -2138
  108. package/dist/ui/shadow/accordion.js +4 -273
  109. package/dist/ui/shadow/alert.js +4 -130
  110. package/dist/ui/shadow/breadcrumb.js +5 -744
  111. package/dist/ui/shadow/button-dropdown.js +6 -652
  112. package/dist/ui/shadow/button.js +3 -63
  113. package/dist/ui/shadow/card.js +4 -309
  114. package/dist/ui/shadow/chart.js +6 -1576
  115. package/dist/ui/shadow/checkbox.js +4 -334
  116. package/dist/ui/shadow/chip.js +4 -396
  117. package/dist/ui/shadow/date.js +7 -731
  118. package/dist/ui/shadow/drawer.js +4 -756
  119. package/dist/ui/shadow/dropdown-table.js +8 -1762
  120. package/dist/ui/shadow/dropdown.js +4 -508
  121. package/dist/ui/shadow/file-upload.js +4 -620
  122. package/dist/ui/shadow/filter.js +7 -379
  123. package/dist/ui/shadow/input.js +6 -1140
  124. package/dist/ui/shadow/menu.js +5 -828
  125. package/dist/ui/shadow/modal.js +6 -1063
  126. package/dist/ui/shadow/nav.js +5 -223
  127. package/dist/ui/shadow/otp.js +6 -754
  128. package/dist/ui/shadow/radio.js +4 -316
  129. package/dist/ui/shadow/rich-text-editor.js +4 -1276
  130. package/dist/ui/shadow/select.js +6 -2136
  131. package/dist/ui/shadow/sidebar.js +5 -581
  132. package/dist/ui/shadow/slider.js +5 -1010
  133. package/dist/ui/shadow/switch.js +4 -335
  134. package/dist/ui/shadow/table.js +10 -4501
  135. package/dist/ui/shadow/tabs.js +6 -315
  136. package/dist/ui/shadow/tag-input.js +7 -3057
  137. package/dist/ui/shadow/textarea.js +6 -817
  138. package/dist/ui/sidebar.js +3 -581
  139. package/dist/ui/slider.js +4 -1012
  140. package/dist/ui/switch.js +4 -336
  141. package/dist/ui/table.js +9 -4502
  142. package/dist/ui/tabs.js +4 -315
  143. package/dist/ui/tag-input.js +5 -3058
  144. package/dist/ui/textarea.js +4 -819
  145. package/dist/{vite-CivRCJaf.js → vite-CfW7z2wn.js} +21 -14
  146. package/dist/vite.js +1 -1
  147. package/dist/vue.d.ts +3 -2
  148. package/package.json +10 -11
  149. package/dist/chip-strip-bNfLn52Z.js +0 -215
  150. package/dist/data-source-controller-Dx6IQ2CN.js +0 -243
  151. package/dist/data-source-options-BM4r4PRw.js +0 -558
  152. package/dist/data-source-read-HyBCRg1t.js +0 -242
  153. package/dist/excel-BXzr3uI1.js +0 -784
  154. package/dist/export-ixRdCS2y.js +0 -2388
  155. package/dist/field-tooltip-addon-CWCp19mJ.js +0 -702
  156. package/dist/field-tooltip.css_raw-U5UeTa2d.js +0 -269
  157. package/dist/filter-builder-C0T3pMx2.js +0 -208
  158. package/dist/form-control-core-BbiACMtL.js +0 -226
  159. package/dist/icon-ClxnYhBG.js +0 -19
  160. package/dist/import-Dc4eXC02.js +0 -612
  161. package/dist/light-slots-_no0r2Z-.js +0 -246
  162. package/dist/markdown-uGlE_OfJ.js +0 -20191
  163. package/dist/mono-data-grid-e9ZVBlNN.js +0 -4240
  164. package/dist/normalize-error-BmLbgANw.js +0 -1048
@@ -0,0 +1,225 @@
1
+ import { r as booleanStringConverter, t as __decorate } from "./decorate-DbYFpi8R.js";
2
+ import { n as cssPart, r as defineCssClassAliases, t as applyCssClass } from "./css-class-B6Tc_MAx.js";
3
+ import { a as validateColorProp, i as isThemeColorToken, n as colorClassToken, r as customColorStyle, t as CUSTOM_COLOR_CLASS } from "./color-CEYYtRX-.js";
4
+ import { n as releaseLayoutVar, t as claimLayoutVar } from "./layout-var-BSBKY49k.js";
5
+ import { html, nothing } from "lit";
6
+ import { property } from "lit/decorators.js";
7
+
8
+ //#region src/components/nav/nav-utils.ts
9
+ const DENSITY_HEIGHTS = {
10
+ compact: 48,
11
+ comfortable: 56,
12
+ default: 64
13
+ };
14
+ function getNavHeight(density) {
15
+ return DENSITY_HEIGHTS[density] ?? DENSITY_HEIGHTS.default;
16
+ }
17
+ function generateNavRootClasses(props) {
18
+ return [
19
+ "mono-nav",
20
+ props.density,
21
+ colorClassToken(props.color),
22
+ props.variant,
23
+ props.sticky ? "sticky" : "",
24
+ props.extension ? "has-extension" : "",
25
+ props.cssClassName ?? "",
26
+ props.rootExtra ?? ""
27
+ ].filter(Boolean).join(" ");
28
+ }
29
+ function validateNavProps(props) {
30
+ const errors = [];
31
+ if (props.density && ![
32
+ "compact",
33
+ "comfortable",
34
+ "default"
35
+ ].includes(props.density)) errors.push(`Invalid density: ${String(props.density)}`);
36
+ const colorError = validateColorProp(props.color);
37
+ if (colorError) errors.push(colorError);
38
+ if (props.variant && ![
39
+ "flat",
40
+ "elevated",
41
+ "outlined"
42
+ ].includes(props.variant)) errors.push(`Invalid variant: ${String(props.variant)}`);
43
+ return errors;
44
+ }
45
+
46
+ //#endregion
47
+ //#region src/components/nav/nav-core.ts
48
+ /**
49
+ * `MonoNavCore` — every render-mode-agnostic concern for `mono-nav`:
50
+ * reactive props, the `css-class`/`cssclass` hybrid aliases, attribute
51
+ * observation, layout-var side effects, and the chrome `render()`.
52
+ *
53
+ * What it deliberately does NOT decide:
54
+ * - `createRenderRoot()` (light vs shadow) — set by each wrapper.
55
+ * - how styles apply (global sheet vs `static styles`) — set by each wrapper.
56
+ * - the slot strategy — `renderSlot()` is a hook each wrapper overrides
57
+ * (light: empty, nodes are captured/placed; shadow: native `<slot>`).
58
+ */
59
+ const MonoNavCore = (superClass) => {
60
+ class MonoNavCoreClass extends superClass {
61
+ constructor(...args) {
62
+ super(...args);
63
+ this.density = "comfortable";
64
+ this.color = "surface";
65
+ this.variant = "elevated";
66
+ this.sticky = true;
67
+ this.extension = false;
68
+ this.cssClass = {};
69
+ this.cssClassName = "";
70
+ defineCssClassAliases(this, (value) => this._setCssClass(value));
71
+ }
72
+ static get observedAttributes() {
73
+ return [
74
+ ...super.observedAttributes ?? [],
75
+ "css-class",
76
+ "cssclass"
77
+ ];
78
+ }
79
+ attributeChangedCallback(name, oldValue, newValue) {
80
+ super.attributeChangedCallback(name, oldValue, newValue);
81
+ if (oldValue === newValue) return;
82
+ if (name === "css-class" || name === "cssclass") this._setCssClass(newValue);
83
+ }
84
+ connectedCallback() {
85
+ super.connectedCallback();
86
+ this._writeLayoutVar();
87
+ }
88
+ disconnectedCallback() {
89
+ super.disconnectedCallback();
90
+ this._clearLayoutVar();
91
+ }
92
+ willUpdate(changed) {
93
+ if (changed.has("density") && this.isConnected) this._writeLayoutVar();
94
+ super.willUpdate?.(changed);
95
+ }
96
+ _setCssClass(value) {
97
+ applyCssClass(this, value);
98
+ }
99
+ _cls(base, key) {
100
+ return cssPart(this.cssClass, base, key);
101
+ }
102
+ get _rootClasses() {
103
+ return generateNavRootClasses({
104
+ density: this.density,
105
+ color: this.color,
106
+ variant: this.variant,
107
+ sticky: this.sticky,
108
+ extension: this.extension,
109
+ cssClassName: this.cssClassName,
110
+ rootExtra: this.cssClass?.root
111
+ });
112
+ }
113
+ /**
114
+ * Resolved bar height in pixels. Includes the extension row when enabled.
115
+ * Public so consumers can size their main content imperatively if they
116
+ * prefer JS over the `--mono-nav-height` CSS variable.
117
+ */
118
+ getHeight() {
119
+ const base = getNavHeight(this.density);
120
+ if (!this.extension) return base;
121
+ return base + (this.density === "compact" ? 36 : this.density === "default" ? 48 : 44);
122
+ }
123
+ /**
124
+ * `--mono-nav-height` is a DOCUMENT-level property, so every mounted nav writes
125
+ * the same one. Claiming it through the shared refcount means unmounting one nav
126
+ * no longer blanks the height for a nav that is still on screen — which is what
127
+ * a route transition that mounts the new nav before unmounting the old one does.
128
+ * See `composables/layout-var.ts`; `mono-sidebar` had the identical bug.
129
+ */
130
+ _writeLayoutVar() {
131
+ if (typeof document === "undefined") return;
132
+ claimLayoutVar("--mono-nav-height", this, `${this.getHeight()}px`);
133
+ }
134
+ _clearLayoutVar() {
135
+ if (typeof document === "undefined") return;
136
+ releaseLayoutVar("--mono-nav-height", this);
137
+ }
138
+ /**
139
+ * Per-region slot content. Overridden by each build:
140
+ * - light DOM: returns nothing — children are captured and appended into
141
+ * the `[data-mono-slot]` targets imperatively.
142
+ * - shadow DOM: returns a native `<slot>` (unnamed for `default`).
143
+ */
144
+ renderSlot(_slotName) {
145
+ return html``;
146
+ }
147
+ /**
148
+
149
+ * Carries a literal `color` (`#7c3aed`, `rgb(…)`) that no stylesheet can know about.
150
+ * Empty for a palette slot, which resolves entirely through the `.mono-nav.<token>`
151
+ * rules instead.
152
+ *
153
+ * Must land on the ROOT element, not the host: a class-based `-preset` declared on
154
+ * the root beats an inherited one, so a host-level write would silently lose. If a
155
+ * `_syncRootFromState`-style attribute re-assert is ever added here (sidebar has one),
156
+ * it has to serialize from THIS getter or it will wipe the colour.
157
+ */
158
+ get _inlineRootStyle() {
159
+ const raw = isThemeColorToken(this.color) || this.color === "surface" ? "" : this.color;
160
+ return customColorStyle(raw, "nav");
161
+ }
162
+ /**
163
+ * The Basecoat styling attributes, mirroring the props one for one. A prop
164
+ * at its DEFAULT emits nothing — `:not([mono-density])` is comfortable,
165
+ * `:not([mono-color])` is surface, `:not([mono-variant])` is elevated —
166
+ * so the rendered DOM is also the shortest hand-written markup that paints
167
+ * the same (see nav.css).
168
+ *
169
+ * `sticky` is the exception: it defaults to TRUE, so it is the negative
170
+ * that carries information and `mono-static` is what a non-sticky bar says.
171
+ */
172
+ get _densityAttr() {
173
+ return this.density === "comfortable" ? nothing : this.density;
174
+ }
175
+ /** A literal colour cannot be an attribute VALUE any more than it could be a
176
+ * class token, so it collapses to the same `custom` marker and the colour
177
+ * itself arrives inline (see `_inlineRootStyle`). */
178
+ get _colorAttr() {
179
+ if (!this.color || this.color === "surface") return nothing;
180
+ return isThemeColorToken(this.color) ? this.color : CUSTOM_COLOR_CLASS;
181
+ }
182
+ get _variantAttr() {
183
+ return this.variant === "elevated" ? nothing : this.variant;
184
+ }
185
+ render() {
186
+ return html`
187
+ <header
188
+ class=${this._rootClasses}
189
+ style=${this._inlineRootStyle}
190
+ role="banner"
191
+ mono-nav
192
+ mono-density=${this._densityAttr}
193
+ mono-color=${this._colorAttr}
194
+ mono-variant=${this._variantAttr}
195
+ ?mono-static=${!this.sticky}
196
+ ?mono-has-extension=${this.extension}
197
+ >
198
+ <div class=${this._cls("mono-nav-inner", "inner")} mono-inner>
199
+ <div class=${this._cls("mono-nav-start", "start")} mono-start data-mono-slot="start">${this.renderSlot("start")}</div>
200
+ <div class=${this._cls("mono-nav-center", "center")} mono-center data-mono-slot="default">${this.renderSlot("default")}</div>
201
+ <div class=${this._cls("mono-nav-end", "end")} mono-end data-mono-slot="end">${this.renderSlot("end")}</div>
202
+ </div>
203
+ <div class=${this._cls("mono-nav-extension", "extension")} mono-extension data-mono-slot="extension">${this.renderSlot("extension")}</div>
204
+ </header>
205
+ `;
206
+ }
207
+ }
208
+ __decorate([property({ type: String })], MonoNavCoreClass.prototype, "density", void 0);
209
+ __decorate([property({ type: String })], MonoNavCoreClass.prototype, "color", void 0);
210
+ __decorate([property({ type: String })], MonoNavCoreClass.prototype, "variant", void 0);
211
+ __decorate([property({
212
+ reflect: true,
213
+ converter: booleanStringConverter
214
+ })], MonoNavCoreClass.prototype, "sticky", void 0);
215
+ __decorate([property({
216
+ reflect: true,
217
+ converter: booleanStringConverter
218
+ })], MonoNavCoreClass.prototype, "extension", void 0);
219
+ __decorate([property({ attribute: false })], MonoNavCoreClass.prototype, "cssClass", void 0);
220
+ __decorate([property({ attribute: false })], MonoNavCoreClass.prototype, "cssClassName", void 0);
221
+ return MonoNavCoreClass;
222
+ };
223
+
224
+ //#endregion
225
+ export { validateNavProps as i, generateNavRootClasses as n, getNavHeight as r, MonoNavCore as t };
@@ -1,5 +1,5 @@
1
- import { a as parseFieldPath, c as toODataClause, n as isPath, t as getFieldValue } from "./field-path-BabiMrrA.js";
2
- import { i as joinFilters, r as compileFilterPredicate, t as andFilters } from "./filter-eval-ChDSaAUH.js";
1
+ import { a as parseFieldPath, c as toODataClause, n as isPath, t as getFieldValue } from "./field-path-DK2VBWHl.js";
2
+ import { i as joinFilters, r as compileFilterPredicate, t as andFilters } from "./filter-eval-CqeBnMYh.js";
3
3
 
4
4
  //#region src/search/search-expr.ts
5
5
  /**
package/dist/nuxt.js CHANGED
@@ -1,4 +1,4 @@
1
- import { t as monoSsr } from "./vite-CivRCJaf.js";
1
+ import { t as monoSsr } from "./vite-CfW7z2wn.js";
2
2
  import { join } from "node:path";
3
3
  import { pathToFileURL } from "node:url";
4
4
  import { addComponent, addPlugin, addPluginTemplate, addVitePlugin, createResolver, defineNuxtModule, extendViteConfig, hasNuxtModule, tryResolveModule, useLogger } from "@nuxt/kit";