@mono-lit/helper 0.0.8 → 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-CLqE8F8P.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-DUXo_jxd.js → mono-data-dropdown-Bgj2PDfm.js} +1 -1
  38. package/dist/{mono-data-grid-Bb00QM72.js → mono-data-grid-DJkp96N-.js} +346 -51
  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 +58 -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 +130 -5
  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-Bkr-e1-i.js +0 -4043
  161. package/dist/normalize-error-BmLbgANw.js +0 -1048
@@ -1,513 +1,9 @@
1
- import { a as __decorate, f as customElement, i as withShadowUtilityStyles, l as defineHybridPropAliases, r as toShadowCss, s as booleanStringConverter, t as flushSsrHydration, u as numberStringConverter } from "../../hydration-flush-BaE9gN3C.js";
2
- import { t as dispatchMonoEvent } from "../../mono-event-BPku9HpS.js";
3
- import { n as cssPart, r as defineCssClassAliases, t as applyCssClass } from "../../css-class-B6Tc_MAx.js";
4
- import { n as applyPopupPlacement, r as computePopupPlacement, t as PopupPortalController } from "../../popup-portal-CINuVjNY.js";
1
+ import { t as customElement } from "../../mono-element-CKcT0rwv.js";
2
+ import { t as __decorate } from "../../decorate-DbYFpi8R.js";
3
+ import { t as MonoDropdownCore } from "../../dropdown-core-BCH1pK14.js";
4
+ import { i as withShadowUtilityStyles, r as toShadowCss, t as flushSsrHydration } from "../../hydration-flush-Volt9X7Q.js";
5
5
  import { LitElement, html, isServer, unsafeCSS } from "lit";
6
- import { property, state } from "lit/decorators.js";
7
6
 
8
- //#region src/components/dropdown/dropdown-core.ts
9
- /**
10
- * `MonoDropdownCore` — all render-mode-agnostic logic for `mono-dropdown`:
11
- * reactive props, hybrid aliases, host-class management, open/close state +
12
- * events, trigger listeners, outside-click/escape, and `position: fixed` panel
13
- * positioning (with containing-block compensation).
14
- *
15
- * SSR-safe: every `document`/`window`/layout-measuring path is guarded by
16
- * `isServer` (lit) so `@lit-labs/ssr` can render it on the server.
17
- *
18
- * Leaves to each build: `createRenderRoot()`, the slot strategy + `render()`,
19
- * and `_activeMainNodes()` (light: captured nodes; shadow: main slot's
20
- * assigned elements). Panel/queries use `this.renderRoot`, which is `this` for
21
- * the light build and the shadow root for the shadow build.
22
- */
23
- /**
24
- * The dropdown's PUBLIC custom properties, handed to the popup portal so a
25
- * relocated panel keeps overrides an ancestor of the host set — a portaled panel
26
- * is a child of `<body>`, so it inherits none of them, and `getComputedStyle`
27
- * cannot enumerate custom properties for the portal to copy them blindly.
28
- *
29
- * Kept in step with dropdown.css by tests/dropdown-attributes.test.ts.
30
- */
31
- const DROPDOWN_STYLE_VARS = [
32
- "--mono-dropdown-accent",
33
- "--mono-dropdown-bg",
34
- "--mono-dropdown-border",
35
- "--mono-dropdown-danger",
36
- "--mono-dropdown-font",
37
- "--mono-dropdown-font-lg",
38
- "--mono-dropdown-font-md",
39
- "--mono-dropdown-font-sm",
40
- "--mono-dropdown-font-xl",
41
- "--mono-dropdown-font-xs",
42
- "--mono-dropdown-font-xxl",
43
- "--mono-dropdown-gap",
44
- "--mono-dropdown-gap-lg",
45
- "--mono-dropdown-gap-md",
46
- "--mono-dropdown-gap-sm",
47
- "--mono-dropdown-gap-xl",
48
- "--mono-dropdown-gap-xs",
49
- "--mono-dropdown-gap-xxl",
50
- "--mono-dropdown-info",
51
- "--mono-dropdown-line-height",
52
- "--mono-dropdown-max-width",
53
- "--mono-dropdown-max-width-lg",
54
- "--mono-dropdown-max-width-md",
55
- "--mono-dropdown-max-width-sm",
56
- "--mono-dropdown-max-width-xl",
57
- "--mono-dropdown-max-width-xs",
58
- "--mono-dropdown-max-width-xxl",
59
- "--mono-dropdown-min-width",
60
- "--mono-dropdown-min-width-lg",
61
- "--mono-dropdown-min-width-md",
62
- "--mono-dropdown-min-width-sm",
63
- "--mono-dropdown-min-width-xl",
64
- "--mono-dropdown-min-width-xs",
65
- "--mono-dropdown-min-width-xxl",
66
- "--mono-dropdown-offset",
67
- "--mono-dropdown-offset-lg",
68
- "--mono-dropdown-offset-md",
69
- "--mono-dropdown-offset-sm",
70
- "--mono-dropdown-offset-xl",
71
- "--mono-dropdown-offset-xs",
72
- "--mono-dropdown-offset-xxl",
73
- "--mono-dropdown-pad-x",
74
- "--mono-dropdown-pad-x-lg",
75
- "--mono-dropdown-pad-x-md",
76
- "--mono-dropdown-pad-x-sm",
77
- "--mono-dropdown-pad-x-xl",
78
- "--mono-dropdown-pad-x-xs",
79
- "--mono-dropdown-pad-x-xxl",
80
- "--mono-dropdown-pad-y",
81
- "--mono-dropdown-pad-y-lg",
82
- "--mono-dropdown-pad-y-md",
83
- "--mono-dropdown-pad-y-sm",
84
- "--mono-dropdown-pad-y-xl",
85
- "--mono-dropdown-pad-y-xs",
86
- "--mono-dropdown-pad-y-xxl",
87
- "--mono-dropdown-primary",
88
- "--mono-dropdown-radius",
89
- "--mono-dropdown-radius-lg",
90
- "--mono-dropdown-radius-md",
91
- "--mono-dropdown-radius-sm",
92
- "--mono-dropdown-radius-xl",
93
- "--mono-dropdown-radius-xs",
94
- "--mono-dropdown-radius-xxl",
95
- "--mono-dropdown-ring-base",
96
- "--mono-dropdown-ring-color",
97
- "--mono-dropdown-ring-width",
98
- "--mono-dropdown-secondary",
99
- "--mono-dropdown-shadow",
100
- "--mono-dropdown-success",
101
- "--mono-dropdown-surface",
102
- "--mono-dropdown-text",
103
- "--mono-dropdown-warning",
104
- "--mono-dropdown-teal",
105
- "--mono-dropdown-purple",
106
- "--mono-dropdown-neutral",
107
- "--mono-dropdown-dark"
108
- ];
109
- const MonoDropdownCore = (superClass) => {
110
- class MonoDropdownCoreClass extends superClass {
111
- constructor(...args) {
112
- super(...args);
113
- this._popup = new PopupPortalController(this, {
114
- getPanel: () => this.renderRoot.querySelector(".mono-dropdown-panel"),
115
- getAnchor: () => this._firstMainElement(),
116
- getStyleScope: () => this,
117
- isOpen: () => this.modelValue,
118
- side: () => this._sideFromPlacement(this.placement),
119
- align: () => this._alignFromPlacement(this.placement),
120
- offset: () => this.offset,
121
- styleVars: () => DROPDOWN_STYLE_VARS,
122
- flip: () => this.flip,
123
- shift: () => this.shift,
124
- onSideResolved: (side) => {
125
- if (this._resolvedSide !== side) {
126
- this._resolvedSide = side;
127
- this._updateHostClasses();
128
- }
129
- }
130
- });
131
- this.placement = "bottom-start";
132
- this.trigger = "click";
133
- this.size = "md";
134
- this.color = "primary";
135
- this.modelValue = false;
136
- this.disabled = false;
137
- this.flip = true;
138
- this.shift = true;
139
- this.offset = 4;
140
- this.closeOnOutsideClick = true;
141
- this.closeOnEscape = true;
142
- this.cssClass = {};
143
- this.cssClassName = "";
144
- this._resolvedSide = "bottom";
145
- this._triggerListenersAttached = false;
146
- this._attachedTriggerNodes = [];
147
- this._appliedHostClasses = /* @__PURE__ */ new Set();
148
- this._viewportBound = false;
149
- this._viewportFrame = 0;
150
- this._documentBound = false;
151
- this._handleTriggerClick = (event) => {
152
- if (this.disabled || this.trigger !== "click") return;
153
- event.stopPropagation();
154
- this._setOpen(!this.modelValue, "trigger", event);
155
- };
156
- this._handleTriggerHoverIn = (event) => {
157
- if (this.disabled || this.trigger !== "hover" || this.modelValue) return;
158
- this._setOpen(true, "hover", event);
159
- };
160
- this._handleTriggerHoverOut = (event) => {
161
- if (this.disabled || this.trigger !== "hover" || !this.modelValue) return;
162
- this._setOpen(false, "hover", event);
163
- };
164
- this._handleTriggerKeydown = (event) => {
165
- if (this.disabled || this.trigger !== "click") return;
166
- if (event.key === "Enter" || event.key === " ") {
167
- event.preventDefault();
168
- this._setOpen(!this.modelValue, "trigger", event);
169
- }
170
- };
171
- this._handleDocumentClick = (event) => {
172
- if (!this.modelValue || !this.closeOnOutsideClick) return;
173
- const path = event.composedPath();
174
- if (path.includes(this) || this._popup.containsInPath(path)) return;
175
- this._setOpen(false, "outside", event);
176
- };
177
- this._handleDocumentKeydown = (event) => {
178
- if (!this.modelValue || !this.closeOnEscape || event.key !== "Escape") return;
179
- const path = event.composedPath();
180
- if (this._popup.ownsNestedInPath(path) || this._popup.inLayerAbove(path)) return;
181
- event.preventDefault();
182
- this._setOpen(false, "escape", event);
183
- };
184
- this._handleViewportChange = () => {
185
- if (!this.modelValue || this._viewportFrame) return;
186
- this._viewportFrame = requestAnimationFrame(() => {
187
- this._viewportFrame = 0;
188
- if (this.modelValue) this._positionPanel();
189
- });
190
- };
191
- defineHybridPropAliases(this, [
192
- "modelValue",
193
- "closeOnOutsideClick",
194
- "closeOnEscape"
195
- ]);
196
- defineCssClassAliases(this, (value) => this._setCssClass(value));
197
- }
198
- static get observedAttributes() {
199
- return [
200
- ...super.observedAttributes ?? [],
201
- "modelvalue",
202
- "closeonoutsideclick",
203
- "closeonescape",
204
- "css-class",
205
- "cssclass"
206
- ];
207
- }
208
- attributeChangedCallback(name, oldValue, newValue) {
209
- super.attributeChangedCallback(name, oldValue, newValue);
210
- if (oldValue === newValue) return;
211
- if (name === "modelvalue") this.modelValue = this._toBoolean(newValue);
212
- else if (name === "closeonoutsideclick") this.closeOnOutsideClick = this._toBoolean(newValue);
213
- else if (name === "closeonescape") this.closeOnEscape = this._toBoolean(newValue);
214
- else if (name === "css-class" || name === "cssclass") this._setCssClass(newValue);
215
- }
216
- connectedCallback() {
217
- super.connectedCallback();
218
- this._resolvedSide = this._sideFromPlacement(this.placement);
219
- this._updateHostClasses();
220
- if (isServer) return;
221
- if (this.modelValue) {
222
- this._bindViewport();
223
- this._bindDocument();
224
- }
225
- }
226
- disconnectedCallback() {
227
- this._unbindDocument();
228
- this._unbindViewport();
229
- this._detachTriggerListeners();
230
- super.disconnectedCallback();
231
- }
232
- updated(changed) {
233
- super.updated(changed);
234
- this._updateHostClasses();
235
- this._syncTriggerListeners();
236
- if (this.modelValue) {
237
- this._bindViewport();
238
- this._bindDocument();
239
- if (changed.has("modelValue")) this._popup.reposition();
240
- this._positionPanel();
241
- } else {
242
- this._unbindViewport();
243
- this._unbindDocument();
244
- }
245
- }
246
- /**
247
- * Outside-click / Escape listeners, bound while OPEN only (select's rule). Both handlers
248
- * bail when closed, so at rest they cost only dispatch — two `document` listeners per
249
- * dropdown (one capture-phase) in the path of every click and keystroke on the page.
250
- */
251
- _bindDocument() {
252
- if (isServer || this._documentBound) return;
253
- this._documentBound = true;
254
- document.addEventListener("click", this._handleDocumentClick, true);
255
- document.addEventListener("keydown", this._handleDocumentKeydown);
256
- }
257
- _unbindDocument() {
258
- if (isServer || !this._documentBound) return;
259
- this._documentBound = false;
260
- document.removeEventListener("click", this._handleDocumentClick, true);
261
- document.removeEventListener("keydown", this._handleDocumentKeydown);
262
- }
263
- _toBoolean(value) {
264
- if (typeof value === "boolean") return value;
265
- if (typeof value === "string") {
266
- const normalized = value.toLowerCase().trim();
267
- return normalized === "" || normalized === "true";
268
- }
269
- return Boolean(value);
270
- }
271
- _setCssClass(value) {
272
- applyCssClass(this, value);
273
- }
274
- _cls(base, key) {
275
- return cssPart(this.cssClass, base, key);
276
- }
277
- _sideFromPlacement(p) {
278
- if (p.startsWith("top")) return "top";
279
- if (p.startsWith("left")) return "left";
280
- if (p.startsWith("right")) return "right";
281
- return "bottom";
282
- }
283
- _alignFromPlacement(p) {
284
- if (p.endsWith("-start")) return "start";
285
- if (p.endsWith("-end")) return "end";
286
- return "center";
287
- }
288
- /**
289
- * The Basecoat styling attributes for the ROOT, mirroring the props one for
290
- * one. `side` and `align` are the RESOLVED pair (upstream splits placement
291
- * that way, and flip/shift can move the side at runtime) while
292
- * `mono-placement` keeps the prop itself visible for a consumer's own CSS.
293
- * A value at its default emits nothing, so `:not([mono-size])` is md.
294
- */
295
- _computeRootAttrs() {
296
- const align = this._alignFromPlacement(this.placement);
297
- const side = this.modelValue ? this._resolvedSide : this._sideFromPlacement(this.placement);
298
- return {
299
- "mono-size": this.size === "md" ? null : this.size,
300
- "mono-color": this.color === "primary" ? null : this.color,
301
- "mono-placement": this.placement === "bottom-start" ? null : this.placement,
302
- "mono-side": side === "bottom" ? null : side,
303
- "mono-align": align === "start" ? null : align,
304
- "mono-trigger": this.trigger === "click" ? null : this.trigger,
305
- "mono-open": this.modelValue ? "" : null,
306
- "mono-disabled": this.disabled ? "" : null,
307
- "mono-fixed": ""
308
- };
309
- }
310
- /** Write {@link _computeRootAttrs} onto whichever element carries the root. */
311
- _applyRootAttrs(root) {
312
- if (!root) return;
313
- if (!root.hasAttribute("mono-dropdown")) root.setAttribute("mono-dropdown", "");
314
- for (const [name, value] of Object.entries(this._computeRootAttrs())) if (value === null) root.removeAttribute(name);
315
- else if (root.getAttribute(name) !== value) root.setAttribute(name, value);
316
- }
317
- _computeHostClasses() {
318
- return [
319
- "mono-dropdown",
320
- this.size,
321
- this.color,
322
- this.placement,
323
- `is-${this._resolvedSide}`,
324
- "is-fixed",
325
- this.modelValue ? "open" : null,
326
- this.disabled ? "disabled" : null,
327
- this.cssClassName || null,
328
- this.cssClass?.root || null
329
- ].filter((c) => Boolean(c));
330
- }
331
- /**
332
- * Apply the computed state classes. The LIGHT build renders into `this`, so
333
- * the classes go on the host element (imperatively). The SHADOW build
334
- * overrides this to a no-op and instead renders the classes onto an inner
335
- * `.mono-dropdown` root in `render()` — the host's `class` is controlled by
336
- * the framework (Vue) and would otherwise wipe imperatively-added classes
337
- * (e.g. `open`) on every re-render.
338
- */
339
- _updateHostClasses() {
340
- if (isServer) return;
341
- this._applyRootAttrs(this);
342
- const next = new Set(this._computeHostClasses());
343
- for (const cls of this._appliedHostClasses) if (!next.has(cls)) this.classList.remove(cls);
344
- for (const cls of next) if (!this._appliedHostClasses.has(cls)) this.classList.add(cls);
345
- this._appliedHostClasses = next;
346
- }
347
- _setOpen(next, source, sourceEvent) {
348
- if (this.disabled && next) return;
349
- if (this.modelValue === next) return;
350
- const oldValue = this.modelValue;
351
- this.modelValue = next;
352
- const detail = {
353
- modelValue: next,
354
- currentValue: next,
355
- oldValue,
356
- value: next,
357
- source,
358
- sourceEvent,
359
- resolvedSide: this._resolvedSide
360
- };
361
- dispatchMonoEvent(this, "click", detail, { alias: "toggle" });
362
- dispatchMonoEvent(this, next ? "open" : "close", detail);
363
- }
364
- show(source = "manual") {
365
- this._setOpen(true, source);
366
- }
367
- hide(source = "manual") {
368
- this._setOpen(false, source);
369
- }
370
- toggle(source = "manual") {
371
- this._setOpen(!this.modelValue, source);
372
- }
373
- focus() {
374
- this._firstMainElement()?.focus();
375
- }
376
- blur() {
377
- this._firstMainElement()?.blur();
378
- }
379
- _firstMainElement() {
380
- for (const node of this._activeMainNodes()) return node;
381
- return null;
382
- }
383
- /**
384
- * The activator element(s) projected into the `main` slot. Overridden per
385
- * build (light: captured nodes; shadow: main slot's assignedElements).
386
- */
387
- _activeMainNodes() {
388
- return [];
389
- }
390
- _syncTriggerListeners() {
391
- if (isServer) return;
392
- const next = this._activeMainNodes();
393
- if (next.length === this._attachedTriggerNodes.length && next.every((n, i) => n === this._attachedTriggerNodes[i]) && this._triggerListenersAttached) return;
394
- this._detachTriggerListeners();
395
- for (const node of next) {
396
- node.addEventListener("click", this._handleTriggerClick);
397
- node.addEventListener("keydown", this._handleTriggerKeydown);
398
- node.addEventListener("mouseenter", this._handleTriggerHoverIn);
399
- node.addEventListener("mouseleave", this._handleTriggerHoverOut);
400
- }
401
- this._attachedTriggerNodes = next;
402
- this._triggerListenersAttached = next.length > 0;
403
- }
404
- _detachTriggerListeners() {
405
- for (const node of this._attachedTriggerNodes) {
406
- node.removeEventListener("click", this._handleTriggerClick);
407
- node.removeEventListener("keydown", this._handleTriggerKeydown);
408
- node.removeEventListener("mouseenter", this._handleTriggerHoverIn);
409
- node.removeEventListener("mouseleave", this._handleTriggerHoverOut);
410
- }
411
- this._attachedTriggerNodes = [];
412
- this._triggerListenersAttached = false;
413
- }
414
- /**
415
- * Listen for viewport movement — but ONLY while this dropdown is open.
416
- *
417
- * These used to be bound in `connectedCallback`, so every dropdown on the page
418
- * held a capture-phase `scroll` listener on `window` whether or not it was open,
419
- * and each one ran a forced layout per scroll event. A non-passive capture
420
- * listener on `window` also disqualifies the whole page's scrolling from running
421
- * off the compositor thread; nothing here calls `preventDefault`, so `passive`.
422
- */
423
- _bindViewport() {
424
- if (isServer || this._viewportBound) return;
425
- window.addEventListener("scroll", this._handleViewportChange, {
426
- capture: true,
427
- passive: true
428
- });
429
- window.addEventListener("resize", this._handleViewportChange, { passive: true });
430
- this._viewportBound = true;
431
- }
432
- _unbindViewport() {
433
- if (isServer) return;
434
- if (this._viewportFrame) {
435
- cancelAnimationFrame(this._viewportFrame);
436
- this._viewportFrame = 0;
437
- }
438
- if (!this._viewportBound) return;
439
- window.removeEventListener("scroll", this._handleViewportChange, true);
440
- window.removeEventListener("resize", this._handleViewportChange);
441
- this._viewportBound = false;
442
- }
443
- /**
444
- * Place the panel against its trigger.
445
- *
446
- * SHADOW build in practice: the light build's panel is relocated into a body
447
- * portal and `PopupPortalController` positions it there (from its
448
- * `hostUpdated`, and again from `updated()` once the activator is placed). Both
449
- * paths therefore run the SAME shared math — main-axis flip, cross-axis align
450
- * flip, shift, and painted-extent measurement. This method used to carry its
451
- * own copy of that algorithm, which is precisely how it came to be missing
452
- * all of the above; `dropdown-table-core` already delegates the same way.
453
- */
454
- _positionPanel() {
455
- if (isServer) return;
456
- const panel = this.renderRoot.querySelector(".mono-dropdown-panel");
457
- if (!panel) return;
458
- const main = this._firstMainElement();
459
- if (!main) {
460
- panel.style.top = "";
461
- panel.style.left = "";
462
- panel.style.right = "";
463
- panel.style.bottom = "";
464
- return;
465
- }
466
- const placement = computePopupPlacement(main, panel, {
467
- side: this._sideFromPlacement(this.placement),
468
- align: this._alignFromPlacement(this.placement),
469
- offset: this.offset,
470
- flip: this.flip,
471
- shift: this.shift
472
- });
473
- applyPopupPlacement(panel, placement);
474
- if (this._resolvedSide !== placement.side) {
475
- this._resolvedSide = placement.side;
476
- this._updateHostClasses();
477
- }
478
- }
479
- }
480
- __decorate([property({ type: String })], MonoDropdownCoreClass.prototype, "placement", void 0);
481
- __decorate([property({ type: String })], MonoDropdownCoreClass.prototype, "trigger", void 0);
482
- __decorate([property({ type: String })], MonoDropdownCoreClass.prototype, "size", void 0);
483
- __decorate([property({ type: String })], MonoDropdownCoreClass.prototype, "color", void 0);
484
- __decorate([property({
485
- attribute: "model-value",
486
- reflect: true,
487
- converter: booleanStringConverter
488
- })], MonoDropdownCoreClass.prototype, "modelValue", void 0);
489
- __decorate([property({
490
- reflect: true,
491
- converter: booleanStringConverter
492
- })], MonoDropdownCoreClass.prototype, "disabled", void 0);
493
- __decorate([property({ converter: booleanStringConverter })], MonoDropdownCoreClass.prototype, "flip", void 0);
494
- __decorate([property({ converter: booleanStringConverter })], MonoDropdownCoreClass.prototype, "shift", void 0);
495
- __decorate([property({ converter: numberStringConverter })], MonoDropdownCoreClass.prototype, "offset", void 0);
496
- __decorate([property({
497
- attribute: "close-on-outside-click",
498
- converter: booleanStringConverter
499
- })], MonoDropdownCoreClass.prototype, "closeOnOutsideClick", void 0);
500
- __decorate([property({
501
- attribute: "close-on-escape",
502
- converter: booleanStringConverter
503
- })], MonoDropdownCoreClass.prototype, "closeOnEscape", void 0);
504
- __decorate([property({ attribute: false })], MonoDropdownCoreClass.prototype, "cssClass", void 0);
505
- __decorate([property({ attribute: false })], MonoDropdownCoreClass.prototype, "cssClassName", void 0);
506
- __decorate([state()], MonoDropdownCoreClass.prototype, "_resolvedSide", void 0);
507
- return MonoDropdownCoreClass;
508
- };
509
-
510
- //#endregion
511
7
  //#region \0raw:C:\Users\VCT-DEV\Desktop\libs\packages\helper\src\components\dropdown\dropdown.css?raw.js
512
8
  var dropdown_css_raw_default = "/* =========================================================================\r\n mono-dropdown — a port of Basecoat's `.popover` + `[data-popover]`\r\n (basecoat-css@1.0.2, vega style).\r\n\r\n Styled by ATTRIBUTE, like Basecoat — and the attributes mirror the element's\r\n props one for one, so hand-written markup reads like the Lit / Vue tag:\r\n\r\n <mono-dropdown size=\"lg\" color=\"success\" placement=\"bottom-start\">\r\n <div mono-dropdown mono-size=\"lg\" mono-color=\"success\"\r\n mono-placement=\"bottom-start\" mono-side=\"bottom\" mono-align=\"start\">\r\n <span mono-activator><button>Click me</button></span>\r\n <div mono-panel role=\"dialog\" aria-hidden=\"false\">\r\n <div mono-body>Any HTML goes here.</div>\r\n </div>\r\n </div>\r\n\r\n An absent attribute is the prop's default (`:not([mono-size])` = md,\r\n `:not([mono-color])` = primary, no `mono-side` = bottom, no `mono-align` =\r\n start). The element writes these on its ROOT — the host in the light build,\r\n an inner root `<div>` in the shadow one — plus the states `mono-open`,\r\n `mono-disabled` and `mono-fixed` (set once the element takes over positioning\r\n and writes inline top/left). The old classes (`.mono-dropdown.md.primary.open`)\r\n are still emitted as inert hooks until 2.0 but no rule here reads them.\r\n\r\n Selector map (ours ≡ upstream):\r\n [mono-dropdown] ≡ .popover (relative inline-flex) — DEVIATION:\r\n inline-BLOCK, because the activator wrapper is\r\n `display: contents` and must not become a flex item\r\n [mono-activator] ≡ EXTENSION (upstream's trigger is a sibling <button>;\r\n ours wraps a slotted one and stays out of layout)\r\n [mono-panel] ≡ [data-popover] (absolute z-50 min-w-full w-max\r\n overflow-x-hidden overflow-y-auto visible opacity-100\r\n scale-100 transition-all outline-hidden, and\r\n bg-popover text-popover-foreground ring-1\r\n ring-foreground/10 flex flex-col gap-4 rounded-md\r\n p-4 text-sm shadow-md duration-100)\r\n [mono-panel][aria-hidden=true] ≡ [data-popover][aria-hidden='true'] (invisible\r\n opacity-0 scale-95 + a 2-unit translate away from\r\n the side it opens from)\r\n [mono-side=\"…\"] ≡ [data-popover][data-side='…'] (mt-1 top-full,\r\n mb-1 bottom-full, me-1 end-full, ms-1 start-full)\r\n — DEVIATION: the 1-unit margin is\r\n `--mono-dropdown-offset`, a prop (`offset`)\r\n [mono-align=\"…\"] ≡ [data-popover][data-align='…'] (start-0 / end-0 /\r\n start-1/2 -translate-x-1/2, and the top/bottom pair\r\n for the two side placements)\r\n [mono-body] ≡ EXTENSION (the panel's width floor, see below)\r\n [mono-size=\"…\"] ≡ EXTENSION (upstream ships one popover size)\r\n [mono-color=\"…\"] ≡ EXTENSION (the role tints the ring)\r\n [mono-disabled] ≡ .btn disabled:opacity-50 — DEVIATION: 0.55, the\r\n pre-port value, because the activator is a\r\n consumer's own control and dimming it twice reads\r\n as broken\r\n\r\n THE PANEL IS PORTALED. While open, the light build moves [mono-panel] into a\r\n body portal; `composables/popup-portal` mirrors the root's class AND its\r\n `mono-*` attributes onto that portal, so `[mono-dropdown] > [mono-panel]`\r\n keeps matching there. Every panel rule is written as a CHILD of the root for\r\n exactly that reason — and because `>` also stops these rules reaching a\r\n `[mono-body]` that belongs to a card slotted inside the panel.\r\n\r\n `[mono-dropdown]` IS ALSO A PART NAME: select, tag-input, date and\r\n dropdown-table all call their popup panel `[mono-dropdown]`, scoped\r\n `[mono-<field>] > [mono-dropdown]` = (0,2,0). This root rule is (0,1,0), so it\r\n loses everywhere they set a property — and it deliberately sets NO paint (no\r\n colour, no background), only layout and custom properties, so nothing it does\r\n set can reach a field's panel visibly. Same contract as chip's root.\r\n\r\n Specificity contract (same as the pre-port class sheet): a part's RESTING rule\r\n is exactly one attribute strong — `:where([mono-dropdown]) > [mono-panel]` =\r\n (0,1,0) — so a utility class handed in through `cssClass` wins by source\r\n order, while the prop and state rules stay heavier.\r\n\r\n FLAVORS set `--mono-dropdown-{radius,ring-color,ring-width,shadow,gap,\r\n padding-<size>,font-<size>,min-width-<size>,max-width-<size>,offset-<size>}`;\r\n every fallback here is vega's value\r\n (`node scripts/basecoat-styles.mjs --varying \"popover\"`).\r\n ========================================================================= */\r\n\r\nmono-dropdown {\r\n display: inline-block;\r\n}\r\n\r\n/* =========================================\r\n Root — layout and the palette. NOTHING here paints (see the header).\r\n ========================================= */\r\n\r\n[mono-dropdown] {\r\n /* ── the six roles, each a public knob over a Basecoat token ───────────── */\r\n --_mono-dropdown-primary: var(--mono-dropdown-primary, var(--primary));\r\n --_mono-dropdown-secondary: var(--mono-dropdown-secondary, var(--secondary-foreground));\r\n --_mono-dropdown-success: var(--mono-dropdown-success, var(--success));\r\n --_mono-dropdown-danger: var(--mono-dropdown-danger, var(--destructive));\r\n --_mono-dropdown-warning: var(--mono-dropdown-warning, var(--warning));\r\n --_mono-dropdown-info: var(--mono-dropdown-info, var(--info));\r\n --_mono-dropdown-teal: var(--mono-dropdown-teal, var(--teal));\r\n --_mono-dropdown-purple: var(--mono-dropdown-purple, var(--purple));\r\n --_mono-dropdown-neutral: var(--mono-dropdown-neutral, var(--neutral));\r\n --_mono-dropdown-dark: var(--mono-dropdown-dark, var(--dark));\r\n /* the colour in play — `primary` unless a [mono-color] rule re-points it */\r\n --_mono-dropdown-accent: var(--mono-dropdown-accent, var(--_mono-dropdown-accent-preset, var(--_mono-dropdown-primary)));\r\n\r\n --_mono-dropdown-bg: var(--mono-dropdown-bg, var(--mono-dropdown-surface, var(--popover)));\r\n --_mono-dropdown-text: var(--mono-dropdown-text, var(--popover-foreground));\r\n /* `ring-1 ring-foreground/10`, with the role mixed in so `color` is visible on\r\n an otherwise neutral surface (EXTENSION — upstream's popover has no colour) */\r\n --_mono-dropdown-ring-width: var(--mono-dropdown-ring-width, var(--mono-border-width));\r\n /* the neutral half of the ring is its own knob: a flavor that wants\r\n `ring-foreground/5` sets THAT, and the role stays mixed in on top */\r\n --_mono-dropdown-ring-base: var(--mono-dropdown-ring-base, color-mix(in oklab, var(--foreground) 10%, transparent));\r\n --_mono-dropdown-ring-color: var(--mono-dropdown-ring-color, var(--mono-dropdown-border,\r\n color-mix(in oklab, var(--_mono-dropdown-accent) 18%, var(--_mono-dropdown-ring-base))));\r\n --_mono-dropdown-shadow: var(--mono-dropdown-shadow, var(--mono-shadow-md));\r\n\r\n /* ── md metrics live on the unqualified root ON PURPOSE ────────────────────\r\n basecoat@1.0.2 styles/vega.css [data-popover] — gap-4 rounded-md p-4 text-sm */\r\n --_mono-dropdown-radius: var(--mono-dropdown-radius, var(--_mono-dropdown-radius-preset, var(--mono-dropdown-radius-md, var(--mono-radius-md))));\r\n --_mono-dropdown-pad-x: var(--mono-dropdown-pad-x, var(--_mono-dropdown-pad-x-preset, var(--mono-dropdown-pad-x-md, calc(var(--mono-spacing) * 4))));\r\n --_mono-dropdown-pad-y: var(--mono-dropdown-pad-y, var(--_mono-dropdown-pad-y-preset, var(--mono-dropdown-pad-y-md, calc(var(--mono-spacing) * 4))));\r\n --_mono-dropdown-gap: var(--mono-dropdown-gap, var(--_mono-dropdown-gap-preset, var(--mono-dropdown-gap-md, calc(var(--mono-spacing) * 4))));\r\n --_mono-dropdown-font: var(--mono-dropdown-font, var(--_mono-dropdown-font-preset, var(--mono-dropdown-font-md, var(--mono-text-sm))));\r\n --_mono-dropdown-line-height: var(--mono-dropdown-line-height, var(--_mono-dropdown-line-height-preset, var(--mono-text-sm--lh)));\r\n --_mono-dropdown-min-width: var(--mono-dropdown-min-width, var(--_mono-dropdown-min-width-preset, var(--mono-dropdown-min-width-md, 200px)));\r\n --_mono-dropdown-max-width: var(--mono-dropdown-max-width, var(--_mono-dropdown-max-width-preset, var(--mono-dropdown-max-width-md, 280px)));\r\n /* `mt-1` and friends — a prop here (`offset`), so it is one knob per size */\r\n --_mono-dropdown-offset: var(--mono-dropdown-offset, var(--_mono-dropdown-offset-preset, var(--mono-dropdown-offset-md, var(--mono-spacing))));\r\n\r\n /* basecoat@1.0.2 components/popover.css .popover — relative inline-flex */\r\n position: relative;\r\n display: inline-block;\r\n box-sizing: border-box;\r\n font-family: inherit;\r\n}\r\n\r\n[mono-dropdown] *,\r\n[mono-dropdown] *::before,\r\n[mono-dropdown] *::after {\r\n box-sizing: border-box;\r\n}\r\n\r\n/* =========================================\r\n Sizes — EXTENSION: Basecoat ships ONE popover; md is its `[data-popover]`\r\n ========================================= */\r\n\r\n[mono-dropdown][mono-size=\"xs\"] {\r\n --_mono-dropdown-radius-preset: var(--mono-dropdown-radius-xs, var(--mono-radius-sm));\r\n --_mono-dropdown-pad-x-preset: var(--mono-dropdown-pad-x-xs, calc(var(--mono-spacing) * 2));\r\n --_mono-dropdown-pad-y-preset: var(--mono-dropdown-pad-y-xs, calc(var(--mono-spacing) * 2));\r\n --_mono-dropdown-gap-preset: var(--mono-dropdown-gap-xs, calc(var(--mono-spacing) * 1.5));\r\n --_mono-dropdown-font-preset: var(--mono-dropdown-font-xs, var(--mono-text-xs));\r\n --_mono-dropdown-line-height-preset: var(--mono-text-xs--lh);\r\n --_mono-dropdown-min-width-preset: var(--mono-dropdown-min-width-xs, 150px);\r\n --_mono-dropdown-max-width-preset: var(--mono-dropdown-max-width-xs, 220px);\r\n --_mono-dropdown-offset-preset: var(--mono-dropdown-offset-xs, calc(var(--mono-spacing) * 0.75));\r\n}\r\n\r\n[mono-dropdown][mono-size=\"sm\"] {\r\n --_mono-dropdown-radius-preset: var(--mono-dropdown-radius-sm, var(--mono-radius-md));\r\n --_mono-dropdown-pad-x-preset: var(--mono-dropdown-pad-x-sm, calc(var(--mono-spacing) * 3));\r\n --_mono-dropdown-pad-y-preset: var(--mono-dropdown-pad-y-sm, calc(var(--mono-spacing) * 3));\r\n --_mono-dropdown-gap-preset: var(--mono-dropdown-gap-sm, calc(var(--mono-spacing) * 2.5));\r\n --_mono-dropdown-font-preset: var(--mono-dropdown-font-sm, var(--mono-text-xs));\r\n --_mono-dropdown-line-height-preset: var(--mono-text-xs--lh);\r\n --_mono-dropdown-min-width-preset: var(--mono-dropdown-min-width-sm, 170px);\r\n --_mono-dropdown-max-width-preset: var(--mono-dropdown-max-width-sm, 240px);\r\n --_mono-dropdown-offset-preset: var(--mono-dropdown-offset-sm, var(--mono-spacing));\r\n}\r\n\r\n[mono-dropdown][mono-size=\"lg\"] {\r\n --_mono-dropdown-radius-preset: var(--mono-dropdown-radius-lg, var(--mono-radius-lg));\r\n --_mono-dropdown-pad-x-preset: var(--mono-dropdown-pad-x-lg, calc(var(--mono-spacing) * 5));\r\n --_mono-dropdown-pad-y-preset: var(--mono-dropdown-pad-y-lg, calc(var(--mono-spacing) * 5));\r\n --_mono-dropdown-gap-preset: var(--mono-dropdown-gap-lg, calc(var(--mono-spacing) * 5));\r\n --_mono-dropdown-font-preset: var(--mono-dropdown-font-lg, var(--mono-text-sm));\r\n --_mono-dropdown-line-height-preset: var(--mono-text-sm--lh);\r\n --_mono-dropdown-min-width-preset: var(--mono-dropdown-min-width-lg, 240px);\r\n --_mono-dropdown-max-width-preset: var(--mono-dropdown-max-width-lg, 340px);\r\n --_mono-dropdown-offset-preset: var(--mono-dropdown-offset-lg, calc(var(--mono-spacing) * 1.5));\r\n}\r\n\r\n[mono-dropdown][mono-size=\"xl\"] {\r\n --_mono-dropdown-radius-preset: var(--mono-dropdown-radius-xl, var(--mono-radius-xl));\r\n --_mono-dropdown-pad-x-preset: var(--mono-dropdown-pad-x-xl, calc(var(--mono-spacing) * 6));\r\n --_mono-dropdown-pad-y-preset: var(--mono-dropdown-pad-y-xl, calc(var(--mono-spacing) * 6));\r\n --_mono-dropdown-gap-preset: var(--mono-dropdown-gap-xl, calc(var(--mono-spacing) * 5));\r\n --_mono-dropdown-font-preset: var(--mono-dropdown-font-xl, var(--mono-text-base));\r\n --_mono-dropdown-line-height-preset: var(--mono-text-base--lh);\r\n --_mono-dropdown-min-width-preset: var(--mono-dropdown-min-width-xl, 280px);\r\n --_mono-dropdown-max-width-preset: var(--mono-dropdown-max-width-xl, 420px);\r\n --_mono-dropdown-offset-preset: var(--mono-dropdown-offset-xl, calc(var(--mono-spacing) * 2));\r\n}\r\n\r\n[mono-dropdown][mono-size=\"xxl\"] {\r\n --_mono-dropdown-radius-preset: var(--mono-dropdown-radius-xxl, var(--mono-radius-xl));\r\n --_mono-dropdown-pad-x-preset: var(--mono-dropdown-pad-x-xxl, calc(var(--mono-spacing) * 7));\r\n --_mono-dropdown-pad-y-preset: var(--mono-dropdown-pad-y-xxl, calc(var(--mono-spacing) * 7));\r\n --_mono-dropdown-gap-preset: var(--mono-dropdown-gap-xxl, calc(var(--mono-spacing) * 6));\r\n --_mono-dropdown-font-preset: var(--mono-dropdown-font-xxl, var(--mono-text-lg));\r\n --_mono-dropdown-line-height-preset: var(--mono-text-lg--lh);\r\n --_mono-dropdown-min-width-preset: var(--mono-dropdown-min-width-xxl, 320px);\r\n --_mono-dropdown-max-width-preset: var(--mono-dropdown-max-width-xxl, 480px);\r\n --_mono-dropdown-offset-preset: var(--mono-dropdown-offset-xxl, calc(var(--mono-spacing) * 2.5));\r\n}\r\n\r\n/* =========================================\r\n Colours — EXTENSION: the role tints the panel's ring\r\n ========================================= */\r\n\r\n[mono-dropdown][mono-color=\"primary\"] { --_mono-dropdown-accent-preset: var(--_mono-dropdown-primary); }\r\n[mono-dropdown][mono-color=\"secondary\"] { --_mono-dropdown-accent-preset: var(--_mono-dropdown-secondary); }\r\n[mono-dropdown][mono-color=\"success\"] { --_mono-dropdown-accent-preset: var(--_mono-dropdown-success); }\r\n[mono-dropdown][mono-color=\"danger\"] { --_mono-dropdown-accent-preset: var(--_mono-dropdown-danger); }\r\n[mono-dropdown][mono-color=\"warning\"] { --_mono-dropdown-accent-preset: var(--_mono-dropdown-warning); }\r\n[mono-dropdown][mono-color=\"info\"] { --_mono-dropdown-accent-preset: var(--_mono-dropdown-info); }\r\n[mono-dropdown][mono-color=\"teal\"] { --_mono-dropdown-accent-preset: var(--_mono-dropdown-teal); }\r\n[mono-dropdown][mono-color=\"purple\"] { --_mono-dropdown-accent-preset: var(--_mono-dropdown-purple); }\r\n[mono-dropdown][mono-color=\"neutral\"] { --_mono-dropdown-accent-preset: var(--_mono-dropdown-neutral); }\r\n[mono-dropdown][mono-color=\"dark\"] { --_mono-dropdown-accent-preset: var(--_mono-dropdown-dark); }\r\n\r\n/* =========================================\r\n Activator — EXTENSION: a wrapper that stays out of layout\r\n ========================================= */\r\n\r\n:where([mono-dropdown]) > [mono-activator] {\r\n display: contents;\r\n}\r\n\r\n/* The activator is the consumer's own control, so it is dimmed once and gently:\r\n 0.55 is the pre-port value, kept so a disabled dropdown reads the same. */\r\n[mono-dropdown][mono-disabled] > [mono-activator] {\r\n opacity: 0.55;\r\n cursor: not-allowed;\r\n}\r\n\r\n/* =========================================\r\n Panel — `[data-popover]`\r\n ========================================= */\r\n\r\n/* basecoat@1.0.2 components/popover.css [data-popover] — absolute z-50 min-w-full\r\n w-max overflow-x-hidden overflow-y-auto visible opacity-100 scale-100\r\n transition-all outline-hidden\r\n — DEVIATIONS: `min-w-full` is the BODY's floor here (see [mono-body]) so a\r\n body that cannot shrink sizes the panel instead of spilling out of it, and the\r\n z-index is the shared popup stack's `--mono-popup-z` rather than a flat z-50. */\r\n:where([mono-dropdown]) > [mono-panel] {\r\n position: absolute;\r\n z-index: var(--mono-popup-z, 200);\r\n width: max-content;\r\n min-width: min-content;\r\n max-width: var(--_mono-dropdown-max-width);\r\n max-height: var(--mono-popup-avail-h, none);\r\n overflow-x: hidden;\r\n overflow-y: auto;\r\n visibility: visible;\r\n opacity: 1;\r\n scale: 1;\r\n outline: none;\r\n transition:\r\n opacity var(--mono-duration) var(--mono-ease),\r\n scale var(--mono-duration) var(--mono-ease),\r\n translate var(--mono-duration) var(--mono-ease),\r\n visibility var(--mono-duration) var(--mono-ease);\r\n\r\n /* basecoat@1.0.2 styles/vega.css [data-popover] — bg-popover\r\n text-popover-foreground ring-foreground/10 flex flex-col gap-4 rounded-md p-4\r\n text-sm shadow-md ring-1 duration-100 */\r\n display: flex;\r\n flex-direction: column;\r\n gap: var(--_mono-dropdown-gap);\r\n padding: var(--_mono-dropdown-pad-y) var(--_mono-dropdown-pad-x);\r\n border-radius: var(--_mono-dropdown-radius);\r\n background: var(--_mono-dropdown-bg);\r\n color: var(--_mono-dropdown-text);\r\n font-size: var(--_mono-dropdown-font);\r\n line-height: var(--_mono-dropdown-line-height);\r\n box-shadow:\r\n 0 0 0 var(--_mono-dropdown-ring-width) var(--_mono-dropdown-ring-color),\r\n var(--_mono-dropdown-shadow);\r\n}\r\n\r\n/* basecoat@1.0.2 components/popover.css [data-popover] >> &[aria-hidden='true']\r\n — invisible opacity-0 scale-95, and a 2-unit translate away from the side it\r\n opens from. The element writes `aria-hidden` on the panel already, so the\r\n closed state needs no class of its own. */\r\n[mono-dropdown] > [mono-panel][aria-hidden=\"true\"] {\r\n visibility: hidden;\r\n opacity: 0;\r\n scale: 0.95;\r\n pointer-events: none;\r\n}\r\n\r\n[mono-dropdown][mono-side=\"top\"] > [mono-panel][aria-hidden=\"true\"] {\r\n translate: 0 calc(var(--mono-spacing) * 2);\r\n}\r\n\r\n[mono-dropdown]:not([mono-side]) > [mono-panel][aria-hidden=\"true\"],\r\n[mono-dropdown][mono-side=\"bottom\"] > [mono-panel][aria-hidden=\"true\"] {\r\n translate: 0 calc(var(--mono-spacing) * -2);\r\n}\r\n\r\n[mono-dropdown][mono-side=\"left\"] > [mono-panel][aria-hidden=\"true\"] {\r\n translate: calc(var(--mono-spacing) * 2) 0;\r\n}\r\n\r\n[mono-dropdown][mono-side=\"right\"] > [mono-panel][aria-hidden=\"true\"] {\r\n translate: calc(var(--mono-spacing) * -2) 0;\r\n}\r\n\r\n/* Once the element takes over, it positions the panel in the viewport and writes\r\n inline top/left — so the static placement rules below must not fight it. */\r\n[mono-dropdown][mono-fixed] > [mono-panel] {\r\n position: fixed;\r\n}\r\n\r\n/* =========================================\r\n Static placement — `[data-side]` / `[data-align]`, verbatim\r\n -----------------------------------------------------------------------------\r\n These are what hand-written markup (and SSR, before the element hydrates)\r\n positions with. The element overrides them with inline top/left once it has\r\n measured, which is why every rule here uses only the four edges.\r\n ========================================= */\r\n\r\n/* basecoat@1.0.2 components/popover.css [data-popover] >> &:not([data-side]), &[data-side='bottom']\r\n — mt-1 top-full */\r\n[mono-dropdown]:not([mono-side]):not([mono-fixed]) > [mono-panel],\r\n[mono-dropdown][mono-side=\"bottom\"]:not([mono-fixed]) > [mono-panel] {\r\n top: 100%;\r\n margin-top: var(--_mono-dropdown-offset);\r\n}\r\n\r\n/* basecoat@1.0.2 components/popover.css [data-popover] >> &[data-side='top'] — mb-1 bottom-full */\r\n[mono-dropdown][mono-side=\"top\"]:not([mono-fixed]) > [mono-panel] {\r\n bottom: 100%;\r\n margin-bottom: var(--_mono-dropdown-offset);\r\n}\r\n\r\n/* basecoat@1.0.2 components/popover.css [data-popover] >> &[data-side='left'] — me-1 end-full */\r\n[mono-dropdown][mono-side=\"left\"]:not([mono-fixed]) > [mono-panel] {\r\n inset-inline-end: 100%;\r\n margin-inline-end: var(--_mono-dropdown-offset);\r\n}\r\n\r\n/* basecoat@1.0.2 components/popover.css [data-popover] >> &[data-side='right'] — ms-1 start-full */\r\n[mono-dropdown][mono-side=\"right\"]:not([mono-fixed]) > [mono-panel] {\r\n inset-inline-start: 100%;\r\n margin-inline-start: var(--_mono-dropdown-offset);\r\n}\r\n\r\n/* The top/bottom pair aligns on the inline axis: start-0 / end-0 / start-1/2 -translate-x-1/2 */\r\n[mono-dropdown]:is(:not([mono-side]), [mono-side=\"top\"], [mono-side=\"bottom\"]):is(:not([mono-align]), [mono-align=\"start\"]):not([mono-fixed]) > [mono-panel] {\r\n inset-inline-start: 0;\r\n}\r\n\r\n[mono-dropdown]:is(:not([mono-side]), [mono-side=\"top\"], [mono-side=\"bottom\"])[mono-align=\"end\"]:not([mono-fixed]) > [mono-panel] {\r\n inset-inline-end: 0;\r\n}\r\n\r\n[mono-dropdown]:is(:not([mono-side]), [mono-side=\"top\"], [mono-side=\"bottom\"])[mono-align=\"center\"]:not([mono-fixed]) > [mono-panel] {\r\n inset-inline-start: 50%;\r\n translate: -50% 0;\r\n}\r\n\r\n/* …and the left/right pair on the block axis: top-0 / bottom-0 / top-1/2 -translate-y-1/2 */\r\n[mono-dropdown]:is([mono-side=\"left\"], [mono-side=\"right\"]):is(:not([mono-align]), [mono-align=\"start\"]):not([mono-fixed]) > [mono-panel] {\r\n top: 0;\r\n}\r\n\r\n[mono-dropdown]:is([mono-side=\"left\"], [mono-side=\"right\"])[mono-align=\"end\"]:not([mono-fixed]) > [mono-panel] {\r\n bottom: 0;\r\n}\r\n\r\n[mono-dropdown]:is([mono-side=\"left\"], [mono-side=\"right\"])[mono-align=\"center\"]:not([mono-fixed]) > [mono-panel] {\r\n top: 50%;\r\n translate: 0 -50%;\r\n}\r\n\r\n/* A centred panel keeps its centring translate while closed, and adds the\r\n directional one — `translate` is a single property, so both go in one value. */\r\n[mono-dropdown]:is(:not([mono-side]), [mono-side=\"bottom\"])[mono-align=\"center\"]:not([mono-fixed]) > [mono-panel][aria-hidden=\"true\"] {\r\n translate: -50% calc(var(--mono-spacing) * -2);\r\n}\r\n\r\n[mono-dropdown][mono-side=\"top\"][mono-align=\"center\"]:not([mono-fixed]) > [mono-panel][aria-hidden=\"true\"] {\r\n translate: -50% calc(var(--mono-spacing) * 2);\r\n}\r\n\r\n[mono-dropdown][mono-side=\"left\"][mono-align=\"center\"]:not([mono-fixed]) > [mono-panel][aria-hidden=\"true\"] {\r\n translate: calc(var(--mono-spacing) * 2) -50%;\r\n}\r\n\r\n[mono-dropdown][mono-side=\"right\"][mono-align=\"center\"]:not([mono-fixed]) > [mono-panel][aria-hidden=\"true\"] {\r\n translate: calc(var(--mono-spacing) * -2) -50%;\r\n}\r\n\r\n/* =========================================\r\n Body — EXTENSION: the panel's width floor\r\n ========================================= */\r\n\r\n/* The floor lives HERE, not on the panel, so it reaches the panel as a\r\n min-content contribution rather than as a competing `min-width` — which is\r\n what lets slotted content that cannot shrink (a body with its own width) size\r\n the panel instead of spilling out of it. Only the padding is subtracted\r\n so the panel's border box lands on exactly --_mono-dropdown-min-width.\r\n Only the padding is subtracted: the edge is Basecoat's `ring-1`, a\r\n box-shadow, which takes no layout space (subtracting it left every panel 2px\r\n under its preset). */\r\n:where([mono-dropdown]) > [mono-panel] > [mono-body] {\r\n min-width: calc(var(--_mono-dropdown-min-width) - 2 * var(--_mono-dropdown-pad-x));\r\n}\r\n\r\n@media (prefers-reduced-motion: reduce) {\r\n :where([mono-dropdown]) > [mono-panel] {\r\n transition: none;\r\n }\r\n}\r\n";
513
9