@mintplayer/web-components 2.13.0 → 2.15.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 (54) hide show
  1. package/README.md +15 -0
  2. package/badge/src/styles/badge.styles.d.ts +2 -0
  3. package/chunks/install-light-styles-DbCAGFOC.mjs +209 -0
  4. package/chunks/{mp-datatable-GmKqaN8y.mjs → mp-datatable-UJI8E73X.mjs} +484 -476
  5. package/chunks/{mp-splitter-LszuRDbR.mjs → mp-splitter-Ckn1kN4v.mjs} +33 -19
  6. package/chunks/{mp-treeview-tkWu28iF.mjs → mp-treeview-C8iltDbq.mjs} +61 -63
  7. package/datatable/index.mjs +2 -2
  8. package/datatable/src/components/mp-datatable.d.ts +9 -1
  9. package/datatable/src/index.d.ts +1 -1
  10. package/datatable/src/styles/datatable.light.styles.d.ts +2 -0
  11. package/datatable/src/styles/index.d.ts +1 -1
  12. package/dock/index.mjs +917 -921
  13. package/dock/src/components/mint-dock-manager.element.d.ts +16 -42
  14. package/dock/src/core/geometry.d.ts +36 -0
  15. package/dock/src/core/index.d.ts +6 -0
  16. package/dock/src/core/intersection-sizing.d.ts +83 -0
  17. package/dock/src/core/layout-tree.d.ts +105 -0
  18. package/dock/src/core/resize.d.ts +83 -0
  19. package/dock/src/core/sizes.d.ts +31 -0
  20. package/dock/src/core/types.d.ts +58 -0
  21. package/file-manager/index.mjs +31 -30
  22. package/file-manager/src/components/mp-file-manager.d.ts +2 -0
  23. package/light-dom/index.d.ts +1 -0
  24. package/light-dom/index.mjs +11 -0
  25. package/light-dom/src/index.d.ts +2 -0
  26. package/light-dom/src/install-light-styles.d.ts +25 -0
  27. package/light-dom/src/scoped-html.d.ts +26 -0
  28. package/navbar/index.mjs +71 -44
  29. package/navbar/src/components/mp-navbar.d.ts +17 -1
  30. package/package.json +5 -1
  31. package/query-builder/index.mjs +1472 -2651
  32. package/query-builder/src/index.d.ts +4 -0
  33. package/query-builder/src/mp-query-builder.element.d.ts +1 -1
  34. package/query-builder/src/mp-query-builder.light.styles.d.ts +2 -0
  35. package/query-builder/src/mp-query-condition.element.d.ts +1 -1
  36. package/query-builder/src/mp-query-condition.light.styles.d.ts +2 -0
  37. package/query-builder/src/mp-query-group.element.d.ts +1 -1
  38. package/query-builder/src/mp-query-group.light.styles.d.ts +2 -0
  39. package/query-builder/src/mp-query-subquery.element.d.ts +1 -1
  40. package/query-builder/src/mp-query-subquery.light.styles.d.ts +2 -0
  41. package/ribbon/index.mjs +7 -3
  42. package/ribbon/src/mp-quick-access-toolbar.element.d.ts +11 -0
  43. package/splitter/index.mjs +1 -1
  44. package/splitter/src/state/splitter-state.d.ts +9 -0
  45. package/tree-select/index.mjs +60 -58
  46. package/tree-select/src/components/mp-tree-select.d.ts +1 -1
  47. package/tree-select/src/index.d.ts +1 -1
  48. package/tree-select/src/styles/index.d.ts +1 -1
  49. package/tree-select/src/styles/tree-select.light.styles.d.ts +2 -0
  50. package/treeview/index.mjs +3 -3
  51. package/treeview/src/components/mp-treeview.d.ts +1 -1
  52. package/treeview/src/index.d.ts +1 -1
  53. package/treeview/src/styles/index.d.ts +1 -1
  54. package/treeview/src/styles/treeview.light.styles.d.ts +2 -0
@@ -16,6 +16,10 @@ export type { TreeVisitor, VisitorContext, VisitTreeOptions, } from './visitor/v
16
16
  export { visitTree } from './visitor/visit-tree';
17
17
  export { renderExpression } from './preview/render-expression';
18
18
  export type { RenderExpressionOptions } from './preview/render-expression';
19
+ export { queryBuilderLightStyles } from './mp-query-builder.light.styles';
20
+ export { queryConditionLightStyles } from './mp-query-condition.light.styles';
21
+ export { queryGroupLightStyles } from './mp-query-group.light.styles';
22
+ export { querySubqueryLightStyles } from './mp-query-subquery.light.styles';
19
23
  export { MpQueryBuilderElement } from './mp-query-builder.element';
20
24
  export { MpQueryGroupElement } from './mp-query-group.element';
21
25
  export { MpQueryConditionElement } from './mp-query-condition.element';
@@ -6,7 +6,7 @@ import { EditorRegistry } from './model/editor';
6
6
  import { QueryBuilderMessages } from './model/messages';
7
7
  import { SavedQuery } from './model/saved-query';
8
8
  export declare class MpQueryBuilderElement extends LitElement {
9
- static styles: import('lit').CSSResult[];
9
+ protected createRenderRoot(): HTMLElement;
10
10
  static properties: {
11
11
  query: {
12
12
  attribute: boolean;
@@ -0,0 +1,2 @@
1
+ export declare const queryBuilderLightStyles: import('lit').CSSResult;
2
+ export default queryBuilderLightStyles;
@@ -2,7 +2,7 @@ import { LitElement, nothing, PropertyValues, TemplateResult } from 'lit';
2
2
  import { Condition } from './model/expression';
3
3
  import { EntitySchema } from './model/field-def';
4
4
  export declare class MpQueryConditionElement extends LitElement {
5
- static styles: import('lit').CSSResult[];
5
+ protected createRenderRoot(): HTMLElement;
6
6
  static properties: {
7
7
  node: {
8
8
  attribute: boolean;
@@ -0,0 +1,2 @@
1
+ export declare const queryConditionLightStyles: import('lit').CSSResult;
2
+ export default queryConditionLightStyles;
@@ -2,7 +2,7 @@ import { LitElement, nothing, TemplateResult } from 'lit';
2
2
  import { Group } from './model/expression';
3
3
  import { EntitySchema } from './model/field-def';
4
4
  export declare class MpQueryGroupElement extends LitElement {
5
- static styles: import('lit').CSSResult[];
5
+ protected createRenderRoot(): HTMLElement;
6
6
  static properties: {
7
7
  node: {
8
8
  attribute: boolean;
@@ -0,0 +1,2 @@
1
+ export declare const queryGroupLightStyles: import('lit').CSSResult;
2
+ export default queryGroupLightStyles;
@@ -2,7 +2,7 @@ import { LitElement, nothing, TemplateResult } from 'lit';
2
2
  import { SubQueryCondition } from './model/expression';
3
3
  import { EntitySchema } from './model/field-def';
4
4
  export declare class MpQuerySubqueryElement extends LitElement {
5
- static styles: import('lit').CSSResult[];
5
+ protected createRenderRoot(): HTMLElement;
6
6
  static properties: {
7
7
  node: {
8
8
  attribute: boolean;
@@ -0,0 +1,2 @@
1
+ export declare const querySubqueryLightStyles: import('lit').CSSResult;
2
+ export default querySubqueryLightStyles;
package/ribbon/index.mjs CHANGED
@@ -1206,7 +1206,7 @@ var ae = Object.defineProperty, Z = (s, e, i, r) => {
1206
1206
  };
1207
1207
  class N extends k {
1208
1208
  constructor() {
1209
- super(...arguments), this.label = "Quick Access Toolbar", this.touchMode = "auto", this.onKeyDown = (e) => {
1209
+ super(...arguments), this.label = "Quick Access Toolbar", this.touchMode = "auto", this.lastAppliedLabel = null, this.onKeyDown = (e) => {
1210
1210
  const { key: i } = e;
1211
1211
  if (i !== "ArrowLeft" && i !== "ArrowRight" && i !== "Home" && i !== "End")
1212
1212
  return;
@@ -1282,13 +1282,17 @@ class N extends k {
1282
1282
  `;
1283
1283
  }
1284
1284
  connectedCallback() {
1285
- super.connectedCallback(), this.setAttribute("role", "toolbar"), this.hasAttribute("aria-label") || this.setAttribute("aria-label", this.label), this.addEventListener("keydown", this.onKeyDown);
1285
+ super.connectedCallback(), this.setAttribute("role", "toolbar"), this.applyLabel(), this.addEventListener("keydown", this.onKeyDown);
1286
1286
  }
1287
1287
  disconnectedCallback() {
1288
1288
  super.disconnectedCallback(), this.removeEventListener("keydown", this.onKeyDown);
1289
1289
  }
1290
1290
  updated(e) {
1291
- e.has("label") && this.setAttribute("aria-label", this.label);
1291
+ e.has("label") && this.applyLabel();
1292
+ }
1293
+ applyLabel() {
1294
+ const e = this.getAttribute("aria-label");
1295
+ e !== null && e !== this.lastAppliedLabel && e !== this.label || (this.setAttribute("aria-label", this.label), this.lastAppliedLabel = this.label);
1292
1296
  }
1293
1297
  render() {
1294
1298
  return d`
@@ -26,9 +26,20 @@ export declare class MpQuickAccessToolbar extends LitElement {
26
26
  * typically bind the same value to both for consistency.
27
27
  */
28
28
  touchMode: 'on' | 'off' | 'auto';
29
+ /**
30
+ * The last `aria-label` this element wrote itself, so it can tell its own
31
+ * value apart from a consumer's. Without it, `connectedCallback`'s
32
+ * "don't clobber" guard is dead code: `updated()` runs whenever `label` is in
33
+ * the changed set, and a Lit property with a class-field default IS in that
34
+ * set on the very first update — so a consumer's own, typically localized,
35
+ * label was replaced before the first paint. Same rule as `mp-ribbon`'s
36
+ * `applyRegionLabel`.
37
+ */
38
+ private lastAppliedLabel;
29
39
  connectedCallback(): void;
30
40
  disconnectedCallback(): void;
31
41
  updated(changed: Map<string, unknown>): void;
42
+ private applyLabel;
32
43
  render(): TemplateResult;
33
44
  private onKeyDown;
34
45
  private collectItems;
@@ -1,4 +1,4 @@
1
- import { I as t, M as s, R as r, a as n, S as i, n as l, s as p } from "../chunks/mp-splitter-LszuRDbR.mjs";
1
+ import { I as t, M as s, R as r, a as n, S as i, n as l, s as p } from "../chunks/mp-splitter-Ckn1kN4v.mjs";
2
2
  export {
3
3
  t as InputHandler,
4
4
  s as MpSplitter,
@@ -10,6 +10,15 @@ export declare class SplitterStateManager {
10
10
  private state;
11
11
  private listeners;
12
12
  constructor(initialState?: Partial<SplitterState>);
13
+ /**
14
+ * A snapshot no caller can write back through.
15
+ *
16
+ * The arrays are copied, not just the envelope: every setter here already
17
+ * copies on the way IN, and a shallow spread on the way out quietly undid
18
+ * that — a subscriber holding `panelSizes` was holding the store's own array,
19
+ * so sorting or splicing it reordered the panels with no notification to
20
+ * anyone. The asymmetry is the bug; this is the other half of it.
21
+ */
13
22
  getState(): SplitterState;
14
23
  subscribe(listener: SplitterStateListener): () => void;
15
24
  private notifyListeners;
@@ -1,11 +1,12 @@
1
- import { unsafeCSS as c, LitElement as u, html as a, nothing as o } from "lit";
2
- import { repeat as p } from "lit/directives/repeat.js";
3
- import { O as b } from "../chunks/overlay-controller-D6agzzOI.mjs";
4
- import { L as m } from "../chunks/live-announcer-Bi0orG4n.mjs";
5
- import { d as _ } from "../chunks/focus-restore-DxuP1Oe2.mjs";
6
- import { H as f } from "../chunks/host-aria-WSGs7SPQ.mjs";
7
- import "../chunks/mp-treeview-tkWu28iF.mjs";
8
- const v = c(`:host {
1
+ import { unsafeCSS as p, LitElement as u, nothing as o } from "lit";
2
+ import { s as m, i as b, d } from "../chunks/install-light-styles-DbCAGFOC.mjs";
3
+ import { repeat as f } from "lit/directives/repeat.js";
4
+ import { O as _ } from "../chunks/overlay-controller-D6agzzOI.mjs";
5
+ import { L as v } from "../chunks/live-announcer-Bi0orG4n.mjs";
6
+ import { d as g } from "../chunks/focus-restore-DxuP1Oe2.mjs";
7
+ import { H as y } from "../chunks/host-aria-WSGs7SPQ.mjs";
8
+ import "../chunks/mp-treeview-C8iltDbq.mjs";
9
+ const w = p(`mp-tree-select {
9
10
  display: inline-block;
10
11
  width: 100%;
11
12
  position: relative;
@@ -18,21 +19,21 @@ const v = c(`:host {
18
19
  --ts-muted: var(--bs-secondary-color, #6c757d);
19
20
  }
20
21
 
21
- :host([disabled]) {
22
+ mp-tree-select[disabled] {
22
23
  opacity: 0.65;
23
24
  pointer-events: none;
24
25
  }
25
26
 
26
- * {
27
+ [data-mps=tree-select] {
27
28
  box-sizing: border-box;
28
29
  }
29
30
 
30
- button {
31
+ button[data-mps=tree-select] {
31
32
  font-family: inherit;
32
33
  font-size: inherit;
33
34
  }
34
35
 
35
- .ts-control {
36
+ .ts-control[data-mps=tree-select] {
36
37
  display: flex;
37
38
  align-items: center;
38
39
  flex-wrap: wrap;
@@ -46,12 +47,12 @@ button {
46
47
  cursor: text;
47
48
  }
48
49
 
49
- .ts-control:focus-within {
50
+ .ts-control:focus-within[data-mps=tree-select] {
50
51
  border-color: var(--ts-primary);
51
52
  box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
52
53
  }
53
54
 
54
- .ts-button {
55
+ .ts-button[data-mps=tree-select] {
55
56
  display: flex;
56
57
  align-items: center;
57
58
  justify-content: space-between;
@@ -66,13 +67,13 @@ button {
66
67
  text-align: start;
67
68
  }
68
69
 
69
- .ts-button:focus-visible {
70
+ .ts-button:focus-visible[data-mps=tree-select] {
70
71
  outline: none;
71
72
  border-color: var(--ts-primary);
72
73
  box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
73
74
  }
74
75
 
75
- .ts-button-body {
76
+ .ts-button-body[data-mps=tree-select] {
76
77
  display: flex;
77
78
  align-items: center;
78
79
  flex-wrap: wrap;
@@ -81,11 +82,11 @@ button {
81
82
  min-width: 0;
82
83
  }
83
84
 
84
- .ts-placeholder {
85
+ .ts-placeholder[data-mps=tree-select] {
85
86
  color: var(--ts-muted);
86
87
  }
87
88
 
88
- .ts-single-value {
89
+ .ts-single-value[data-mps=tree-select] {
89
90
  flex: 1 1 auto;
90
91
  min-width: 0;
91
92
  overflow: hidden;
@@ -93,7 +94,7 @@ button {
93
94
  white-space: nowrap;
94
95
  }
95
96
 
96
- .ts-search {
97
+ .ts-search[data-mps=tree-select] {
97
98
  flex: 1 1 4rem;
98
99
  min-width: 4rem;
99
100
  border: 0;
@@ -104,7 +105,7 @@ button {
104
105
  font: inherit;
105
106
  }
106
107
 
107
- .ts-search.panel-search {
108
+ .ts-search.panel-search[data-mps=tree-select] {
108
109
  flex: 1 1 auto;
109
110
  width: 100%;
110
111
  border: 1px solid var(--ts-border);
@@ -112,7 +113,7 @@ button {
112
113
  padding: 0.375rem 0.5rem;
113
114
  }
114
115
 
115
- .ts-chip {
116
+ .ts-chip[data-mps=tree-select] {
116
117
  display: inline-flex;
117
118
  align-items: center;
118
119
  gap: 0.25rem;
@@ -125,14 +126,14 @@ button {
125
126
  line-height: 1.2;
126
127
  }
127
128
 
128
- .ts-chip-label {
129
+ .ts-chip-label[data-mps=tree-select] {
129
130
  overflow: hidden;
130
131
  text-overflow: ellipsis;
131
132
  white-space: nowrap;
132
133
  }
133
134
 
134
- .ts-chip-remove,
135
- .ts-clear {
135
+ .ts-chip-remove[data-mps=tree-select],
136
+ .ts-clear[data-mps=tree-select] {
136
137
  display: inline-flex;
137
138
  align-items: center;
138
139
  justify-content: center;
@@ -146,18 +147,18 @@ button {
146
147
  opacity: 0.7;
147
148
  }
148
149
 
149
- .ts-chip-remove:hover,
150
- .ts-clear:hover {
150
+ .ts-chip-remove:hover[data-mps=tree-select],
151
+ .ts-clear:hover[data-mps=tree-select] {
151
152
  opacity: 1;
152
153
  }
153
154
 
154
- .ts-clear {
155
+ .ts-clear[data-mps=tree-select] {
155
156
  flex: 0 0 auto;
156
157
  margin-inline-start: auto;
157
158
  font-size: 1.1em;
158
159
  }
159
160
 
160
- .ts-caret {
161
+ .ts-caret[data-mps=tree-select] {
161
162
  flex: 0 0 auto;
162
163
  display: inline-flex;
163
164
  width: 0.8em;
@@ -166,11 +167,11 @@ button {
166
167
  transition: transform 0.15s ease;
167
168
  }
168
169
 
169
- :host([data-menu-open]) .ts-caret {
170
+ mp-tree-select[data-menu-open] .ts-caret[data-mps=tree-select] {
170
171
  transform: rotate(180deg);
171
172
  }
172
173
 
173
- .ts-panel {
174
+ .ts-panel[data-mps=tree-select] {
174
175
  position: fixed;
175
176
  z-index: 1056;
176
177
  display: none;
@@ -182,34 +183,34 @@ button {
182
183
  overflow: hidden;
183
184
  }
184
185
 
185
- :host([data-menu-open]) .ts-panel {
186
+ mp-tree-select[data-menu-open] .ts-panel[data-mps=tree-select] {
186
187
  display: flex;
187
188
  }
188
189
 
189
- .ts-panel-header,
190
- .ts-panel-footer {
190
+ .ts-panel-header[data-mps=tree-select],
191
+ .ts-panel-footer[data-mps=tree-select] {
191
192
  flex: 0 0 auto;
192
193
  padding: 0.5rem;
193
194
  border-bottom: 1px solid var(--ts-border);
194
195
  }
195
196
 
196
- .ts-panel-footer {
197
+ .ts-panel-footer[data-mps=tree-select] {
197
198
  border-bottom: 0;
198
199
  border-top: 1px solid var(--ts-border);
199
200
  }
200
201
 
201
- .ts-panel-body {
202
+ .ts-panel-body[data-mps=tree-select] {
202
203
  flex: 1 1 auto;
203
204
  overflow: auto;
204
205
  }
205
206
 
206
- .ts-state {
207
+ .ts-state[data-mps=tree-select] {
207
208
  padding: 0.75rem;
208
209
  color: var(--ts-muted);
209
210
  text-align: center;
210
211
  }
211
212
 
212
- .ts-load-more {
213
+ .ts-load-more[data-mps=tree-select] {
213
214
  display: block;
214
215
  width: 100%;
215
216
  padding: 0.375rem;
@@ -221,11 +222,11 @@ button {
221
222
  font: inherit;
222
223
  }
223
224
 
224
- .ts-load-more:hover {
225
+ .ts-load-more:hover[data-mps=tree-select] {
225
226
  background: var(--bs-secondary-bg, #e9ecef);
226
227
  }
227
228
 
228
- .ts-spinner {
229
+ .ts-spinner[data-mps=tree-select] {
229
230
  display: inline-block;
230
231
  width: 1rem;
231
232
  height: 1rem;
@@ -241,30 +242,30 @@ button {
241
242
  transform: rotate(360deg);
242
243
  }
243
244
  }
244
- .ts-node {
245
+ .ts-node[data-mps=tree-select] {
245
246
  display: inline-flex;
246
247
  align-items: center;
247
248
  gap: 0.4rem;
248
249
  }
249
250
 
250
- .ts-node-check {
251
+ .ts-node-check[data-mps=tree-select] {
251
252
  flex: 0 0 auto;
252
253
  margin: 0;
253
254
  cursor: pointer;
254
255
  }
255
256
 
256
257
  @media (prefers-reduced-motion: reduce) {
257
- * {
258
+ [data-mps=tree-select] {
258
259
  transition-duration: 0.01ms !important;
259
260
  animation-duration: 0.01ms !important;
260
261
  animation-iteration-count: 1 !important;
261
262
  }
262
- }`), g = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="currentColor" aria-hidden="true" width="100%" height="100%"><path d="M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z"/></svg>';
263
- class y extends u {
263
+ }`), a = m("tree-select"), x = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="currentColor" aria-hidden="true" width="100%" height="100%"><path d="M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z"/></svg>';
264
+ class S extends u {
264
265
  constructor() {
265
- super(...arguments), this._mode = "single", this._variant = "textbox", this._cascadeSelect = !1, this._placeholder = "", this._showClear = !1, this._scrollHeight = "300px", this._inputLabel = null, this._searchLabel = null, this._clearLabel = "Clear", this.removeLabel = (e) => `Remove ${e}`, this.hostAria = new f(this, {
266
+ super(...arguments), this._mode = "single", this._variant = "textbox", this._cascadeSelect = !1, this._placeholder = "", this._showClear = !1, this._scrollHeight = "300px", this._inputLabel = null, this._searchLabel = null, this._clearLabel = "Clear", this.removeLabel = (e) => `Remove ${e}`, this.hostAria = new y(this, {
266
267
  referenceTarget: () => this.renderRoot?.querySelector("input.ts-search") ?? null
267
- }), this._disabled = !1, this._searchDebounceMs = 200, this._nodes = [], this._searchResults = null, this.liveAnnouncer = new m(this), this._query = "", this._loading = !1, this._rootsLoaded = !1, this._rootsHasMore = !1, this._searchHasMore = !1, this._byId = /* @__PURE__ */ new Map(), this._parentById = /* @__PURE__ */ new Map(), this._selected = /* @__PURE__ */ new Map(), this._indeterminate = /* @__PURE__ */ new Set(), this._debounceTimer = 0, this.overlay = new b(this, {
268
+ }), this._disabled = !1, this._searchDebounceMs = 200, this._nodes = [], this._searchResults = null, this.liveAnnouncer = new v(this), this._query = "", this._loading = !1, this._rootsLoaded = !1, this._rootsHasMore = !1, this._searchHasMore = !1, this._byId = /* @__PURE__ */ new Map(), this._parentById = /* @__PURE__ */ new Map(), this._selected = /* @__PURE__ */ new Map(), this._indeterminate = /* @__PURE__ */ new Set(), this._debounceTimer = 0, this.overlay = new _(this, {
268
269
  anchor: () => this.renderRoot.querySelector(".ts-anchor"),
269
270
  panel: () => this.renderRoot.querySelector(".ts-panel"),
270
271
  panelWidth: "anchor-min",
@@ -287,8 +288,8 @@ class y extends u {
287
288
  }
288
289
  }, this._nodeRendererKey = "";
289
290
  }
290
- static {
291
- this.styles = [v];
291
+ createRenderRoot() {
292
+ return this;
292
293
  }
293
294
  static get observedAttributes() {
294
295
  return [
@@ -576,7 +577,7 @@ class y extends u {
576
577
  removeNode(e) {
577
578
  const s = Array.from(
578
579
  this.renderRoot?.querySelectorAll(".ts-chip-remove") ?? []
579
- ).findIndex((r) => r.closest(".ts-chip")?.contains(_()));
580
+ ).findIndex((r) => r.closest(".ts-chip")?.contains(g()));
580
581
  this._mode === "checkbox" && this._cascadeSelect ? (this.applyDown(e, !1), this.applyUp(e), this.recomputeIndeterminate()) : this._selected.delete(e.id), this.emitChange(void 0, e), this.syncTreeviewSelection(), this.requestUpdate(), s >= 0 && this.updateComplete.then(() => {
581
582
  const r = Array.from(
582
583
  this.renderRoot?.querySelectorAll(".ts-chip-remove") ?? []
@@ -636,9 +637,9 @@ class y extends u {
636
637
  }), r.appendChild(n);
637
638
  }
638
639
  const i = document.createElement("span");
639
- i.className = "treeview-label";
640
+ i.className = "treeview-label", r.appendChild(i), d(r, "tree-select");
640
641
  const l = this.suggestionTemplate?.(s, this._query);
641
- return l ? i.appendChild(l) : i.textContent = s.label, r.appendChild(i), r;
642
+ return l ? i.appendChild(l) : i.textContent = s.label, r;
642
643
  }, this._nodeRendererFn);
643
644
  }
644
645
  // ---- render ------------------------------------------------------------
@@ -702,7 +703,7 @@ class y extends u {
702
703
  return e ? this.itemTemplate ? this.itemTemplate(e, this._query) : e.label : o;
703
704
  }
704
705
  renderChips() {
705
- return this._mode === "single" || !this.hasSelection ? o : p(
706
+ return this._mode === "single" || !this.hasSelection ? o : f(
706
707
  [...this._selected.values()],
707
708
  (e) => e.id,
708
709
  (e) => a`
@@ -736,7 +737,7 @@ class y extends u {
736
737
  }
737
738
  renderCaret() {
738
739
  const e = document.createElement("span");
739
- return e.style.display = "inline-flex", e.style.width = "100%", e.style.height = "100%", e.innerHTML = g, e;
740
+ return e.style.display = "inline-flex", e.style.width = "100%", e.style.height = "100%", e.innerHTML = x, d(e, "tree-select"), e;
740
741
  }
741
742
  renderPanel() {
742
743
  return a`
@@ -783,8 +784,9 @@ class y extends u {
783
784
  </button>` : o;
784
785
  }
785
786
  }
786
- typeof customElements < "u" && !customElements.get("mp-tree-select") && customElements.define("mp-tree-select", y);
787
- class k {
787
+ b("tree-select", w);
788
+ typeof customElements < "u" && !customElements.get("mp-tree-select") && customElements.define("mp-tree-select", S);
789
+ class A {
788
790
  constructor(e, t = {}) {
789
791
  this.tree = e, this.byId = /* @__PURE__ */ new Map(), this.flat = [], this.pageSize = t.pageSize ?? 50, this.delayMs = t.delayMs ?? 0;
790
792
  const s = (r) => {
@@ -823,7 +825,7 @@ class k {
823
825
  }
824
826
  }
825
827
  export {
826
- k as InMemoryTreeSelectProvider,
827
- y as MpTreeSelect,
828
- v as treeSelectStyles
828
+ A as InMemoryTreeSelectProvider,
829
+ S as MpTreeSelect,
830
+ w as treeSelectLightStyles
829
831
  };
@@ -12,7 +12,7 @@ export type PanelTemplate = () => Node;
12
12
  * `TreeNode` objects. See the issue #342 PRD for the full contract.
13
13
  */
14
14
  export declare class MpTreeSelect extends LitElement {
15
- static styles: import('lit').CSSResult[];
15
+ protected createRenderRoot(): HTMLElement;
16
16
  static get observedAttributes(): string[];
17
17
  private _mode;
18
18
  private _variant;
@@ -3,4 +3,4 @@ export type { NodeTemplate, ValueTemplate, PanelTemplate } from './components';
3
3
  export type { TreeSelectMode, TreeSelectVariant, NodePage, NodeRequest, TreeSelectProvider, TreeSelectChangeEventDetail, TreeNode, } from './types';
4
4
  export { InMemoryTreeSelectProvider } from './providers/in-memory-provider';
5
5
  export type { InMemoryProviderOptions } from './providers/in-memory-provider';
6
- export { treeSelectStyles } from './styles';
6
+ export { treeSelectLightStyles } from './styles';
@@ -1 +1 @@
1
- export { treeSelectStyles } from './tree-select.styles';
1
+ export { treeSelectLightStyles } from './tree-select.light.styles';
@@ -0,0 +1,2 @@
1
+ export declare const treeSelectLightStyles: import('lit').CSSResult;
2
+ export default treeSelectLightStyles;
@@ -1,5 +1,5 @@
1
- import { M as t, t as s } from "../chunks/mp-treeview-tkWu28iF.mjs";
1
+ import { M as r, t as i } from "../chunks/mp-treeview-C8iltDbq.mjs";
2
2
  export {
3
- t as MpTreeview,
4
- s as treeviewStyles
3
+ r as MpTreeview,
4
+ i as treeviewLightStyles
5
5
  };
@@ -42,7 +42,7 @@ export interface TreeNodeCollapseEventDetail {
42
42
  * Events: `tree-node-select`, `tree-node-expand`, `tree-node-collapse`.
43
43
  */
44
44
  export declare class MpTreeview extends LitElement {
45
- static styles: import('lit').CSSResult[];
45
+ protected createRenderRoot(): HTMLElement;
46
46
  static get observedAttributes(): string[];
47
47
  private readonly instanceId;
48
48
  private _items;
@@ -1,4 +1,4 @@
1
1
  export { MpTreeview } from './components';
2
2
  export type { TreeviewSelectionMode, TreeNodeSelectEventDetail, TreeNodeExpandEventDetail, TreeNodeCollapseEventDetail, IconResolver, TreeNodeRenderer, TreeNodeRenderContext, TreeChildrenLoader, } from './components';
3
3
  export type { TreeNode } from './types';
4
- export { treeviewStyles } from './styles';
4
+ export { treeviewLightStyles } from './styles';
@@ -1 +1 @@
1
- export { treeviewStyles } from './treeview.styles';
1
+ export { treeviewLightStyles } from './treeview.light.styles';
@@ -0,0 +1,2 @@
1
+ export declare const treeviewLightStyles: import('lit').CSSResult;
2
+ export default treeviewLightStyles;