@mono-lit/helper 0.0.9 → 0.0.10

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