@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.
- package/dist/accordion-core-DaNyPWRr.js +277 -0
- package/dist/alert-core-DWtHbX_-.js +134 -0
- package/dist/breadcrumb-list-core-Dh68T8Cf.js +747 -0
- package/dist/{mono-button-CLkHg3WW.js → button-core-DerXg84Q.js} +3 -276
- package/dist/button-dropdown-core-DKYEOyjy.js +654 -0
- package/dist/button-utils-D5-66M02.js +63 -0
- package/dist/card-utils-l80qAmrN.js +312 -0
- package/dist/chart-core-DV7hD3ZY.js +801 -0
- package/dist/checkbox-utils-DKdrhAzF.js +337 -0
- package/dist/chip-utils-DpRrd7Zj.js +403 -0
- package/dist/{data-source-controller-C6C4ej_M.js → data-source-controller-DS_JLrmS.js} +1 -1
- package/dist/{data-source-options-fxT5QIX4.js → data-source-options-DJUNU26C.js} +6 -6
- package/dist/{data-source-read-BL266IW0.js → data-source-read-uKJpRAzx.js} +2 -2
- package/dist/date-core-CyuSyvvG.js +734 -0
- package/dist/drawer-core-DbFWvNln.js +759 -0
- package/dist/dropdown-core-BCH1pK14.js +511 -0
- package/dist/dropdown-table-core-SfHUJVFq.js +1342 -0
- package/dist/export.js +1 -1
- package/dist/{field-path-BabiMrrA.js → field-path-DK2VBWHl.js} +1 -1
- package/dist/field-tooltip.css_raw-DVblekCl.js +5 -0
- package/dist/{field-validation.css_raw-Cx6SGrfP.js → field-validation.css_raw-BU7C6173.js} +1 -170
- package/dist/file-upload-core-Cz_dBQMx.js +624 -0
- package/dist/filter-builder-core-DyWjbBP7.js +381 -0
- package/dist/{filter-builder-B6Y2mmbM.js → filter-builder-vbqIuPhX.js} +1 -1
- package/dist/{filter-eval-ChDSaAUH.js → filter-eval-CqeBnMYh.js} +1 -1
- package/dist/{filter-odata-Bi27XUpQ.js → filter-odata-GsczYKNC.js} +1 -1
- package/dist/{hydration-flush-BaE9gN3C.js → hydration-flush-Volt9X7Q.js} +2 -1071
- package/dist/index.js +11 -11
- package/dist/{index.node-DTqDBca7.js → index.node-Csy9zrr1.js} +4 -4
- package/dist/index.node.js +11 -11
- package/dist/input-utils-BglY-k0H.js +1145 -0
- package/dist/menu-core-DkAYuCZ2.js +831 -0
- package/dist/modal-core-CSBSPN_m.js +844 -0
- package/dist/mono-button-DVvZ03P-.js +280 -0
- package/dist/{mono-button.shadow-DqZMpcqY.js → mono-button.shadow-BANxMGln.js} +6 -594
- package/dist/{mono-data-chart-NKPdAgVq.js → mono-data-chart-ChF4J9RT.js} +6 -6
- package/dist/{mono-data-dropdown-B2iRpJuI.js → mono-data-dropdown-Bgj2PDfm.js} +1 -1
- package/dist/{mono-data-grid-llJCX9MC.js → mono-data-grid-DJkp96N-.js} +144 -46
- package/dist/{mono-event-BPku9HpS.js → mono-event-CAZf0F_k.js} +14 -9
- package/dist/{mono-form-controller-BrA10erm.js → mono-form-controller-DxZLvyg6.js} +2 -1
- package/dist/mono-table-checkbox-core-BKOMx8R5.js +5288 -0
- package/dist/nav-core-B5qU2dzn.js +225 -0
- package/dist/{normalize-error-D93O4q8g.js → normalize-error-BEcd1tmS.js} +2 -2
- package/dist/otp-core-DXg3vFLh.js +758 -0
- package/dist/radio-utils-Dk9Tl1jz.js +319 -0
- package/dist/rich-text-editor-core-Ddd_QaLn.js +1280 -0
- package/dist/select-utils-BgArYHk8.js +2140 -0
- package/dist/sidebar-core-CD6txDo3.js +583 -0
- package/dist/slider-core-vcWr321-.js +1014 -0
- package/dist/src/components/dropdown-table/dropdown-table-core.d.ts +2 -2
- package/dist/src/components/dropdown-table/dropdown-table-types.d.ts +1 -1
- package/dist/src/components/dropdown-table/index.d.ts +1 -1
- package/dist/src/components/dropdown-table/index.shadow.d.ts +1 -1
- package/dist/src/components/dropdown-table/mono-data-dropdown.d.ts +1 -1
- package/dist/src/components/form/form-types.d.ts +9 -3
- package/dist/src/components/input/input-core.d.ts +1 -1
- package/dist/src/components/input/input-types.d.ts +1 -1
- package/dist/src/components/otp/otp-core.d.ts +1 -1
- package/dist/src/components/select/select-core.d.ts +1 -1
- package/dist/src/components/select/select-types.d.ts +1 -1
- package/dist/src/components/slider/slider-core.d.ts +1 -1
- package/dist/src/components/slider/slider-types.d.ts +1 -1
- package/dist/src/components/table/filter-suggestion.d.ts +171 -0
- package/dist/src/components/table/index.d.ts +5 -4
- package/dist/src/components/table/index.shadow.d.ts +5 -4
- package/dist/src/components/table/mono-data-grid.d.ts +22 -3
- package/dist/src/components/table/mono-table-empty-core.d.ts +37 -0
- package/dist/src/components/table/mono-table-search-core.d.ts +22 -3
- package/dist/src/components/table/table-types.d.ts +74 -4
- package/dist/src/components/tag-input/tag-input-core.d.ts +1 -1
- package/dist/src/components/tag-input/tag-input-types.d.ts +1 -1
- package/dist/src/components/textarea/textarea-core.d.ts +1 -1
- package/dist/src/composables/mono-event.d.ts +7 -1
- package/dist/src/entries/index.d.ts +8 -6
- package/dist/src/entries/index.node.d.ts +8 -6
- package/dist/src/search/index.d.ts +1 -1
- package/dist/src/utils/group-count.d.ts +36 -0
- package/dist/switch-utils-CTZ4id2V.js +338 -0
- package/dist/tabs-core-r5-B8k_N.js +317 -0
- package/dist/tag-input-utils-D2JA90DQ.js +3060 -0
- package/dist/textarea-utils-VU1KeXm8.js +821 -0
- package/dist/ui/accordion.js +2 -274
- package/dist/ui/alert.js +2 -131
- package/dist/ui/breadcrumb.js +4 -745
- package/dist/ui/button-dropdown.js +4 -652
- package/dist/ui/button.js +2 -63
- package/dist/ui/card.js +2 -310
- package/dist/ui/chart.js +4 -800
- package/dist/ui/checkbox.js +4 -335
- package/dist/ui/chip.js +4 -402
- package/dist/ui/date.js +3 -732
- package/dist/ui/drawer.js +3 -757
- package/dist/ui/dropdown-table.js +5 -1341
- package/dist/ui/dropdown.js +4 -509
- package/dist/ui/file-upload.js +3 -622
- package/dist/ui/filter.js +5 -380
- package/dist/ui/form.js +1 -1
- package/dist/ui/index.css +118 -1
- package/dist/ui/input.js +3 -1141
- package/dist/ui/menu.js +4 -828
- package/dist/ui/modal.js +4 -843
- package/dist/ui/nav.js +4 -223
- package/dist/ui/otp.js +4 -756
- package/dist/ui/radio.js +4 -317
- package/dist/ui/rich-text-editor.js +4 -1278
- package/dist/ui/select.js +5 -2138
- package/dist/ui/shadow/accordion.js +4 -273
- package/dist/ui/shadow/alert.js +4 -130
- package/dist/ui/shadow/breadcrumb.js +5 -744
- package/dist/ui/shadow/button-dropdown.js +6 -652
- package/dist/ui/shadow/button.js +3 -63
- package/dist/ui/shadow/card.js +4 -309
- package/dist/ui/shadow/chart.js +6 -1576
- package/dist/ui/shadow/checkbox.js +4 -334
- package/dist/ui/shadow/chip.js +4 -396
- package/dist/ui/shadow/date.js +7 -731
- package/dist/ui/shadow/drawer.js +4 -756
- package/dist/ui/shadow/dropdown-table.js +8 -1762
- package/dist/ui/shadow/dropdown.js +4 -508
- package/dist/ui/shadow/file-upload.js +4 -620
- package/dist/ui/shadow/filter.js +7 -379
- package/dist/ui/shadow/input.js +6 -1140
- package/dist/ui/shadow/menu.js +5 -828
- package/dist/ui/shadow/modal.js +6 -1063
- package/dist/ui/shadow/nav.js +5 -223
- package/dist/ui/shadow/otp.js +6 -754
- package/dist/ui/shadow/radio.js +4 -316
- package/dist/ui/shadow/rich-text-editor.js +4 -1276
- package/dist/ui/shadow/select.js +6 -2136
- package/dist/ui/shadow/sidebar.js +5 -581
- package/dist/ui/shadow/slider.js +5 -1010
- package/dist/ui/shadow/switch.js +4 -335
- package/dist/ui/shadow/table.js +10 -4501
- package/dist/ui/shadow/tabs.js +6 -315
- package/dist/ui/shadow/tag-input.js +7 -3057
- package/dist/ui/shadow/textarea.js +6 -817
- package/dist/ui/sidebar.js +3 -581
- package/dist/ui/slider.js +4 -1012
- package/dist/ui/switch.js +4 -336
- package/dist/ui/table.js +9 -4502
- package/dist/ui/tabs.js +4 -315
- package/dist/ui/tag-input.js +5 -3058
- package/dist/ui/textarea.js +4 -819
- package/dist/vue.d.ts +3 -2
- package/package.json +3 -3
- package/dist/chip-strip-bNfLn52Z.js +0 -215
- package/dist/data-source-controller-Dx6IQ2CN.js +0 -243
- package/dist/data-source-options-BM4r4PRw.js +0 -558
- package/dist/data-source-read-HyBCRg1t.js +0 -242
- package/dist/excel-BXzr3uI1.js +0 -784
- package/dist/export-ixRdCS2y.js +0 -2388
- package/dist/field-tooltip-addon-CWCp19mJ.js +0 -702
- package/dist/field-tooltip.css_raw-U5UeTa2d.js +0 -269
- package/dist/filter-builder-C0T3pMx2.js +0 -208
- package/dist/form-control-core-BbiACMtL.js +0 -226
- package/dist/icon-ClxnYhBG.js +0 -19
- package/dist/import-Dc4eXC02.js +0 -612
- package/dist/light-slots-_no0r2Z-.js +0 -246
- package/dist/markdown-uGlE_OfJ.js +0 -20191
- package/dist/mono-data-grid-e9ZVBlNN.js +0 -4240
- package/dist/normalize-error-BmLbgANw.js +0 -1048
|
@@ -1,658 +1,10 @@
|
|
|
1
|
-
import { t as applyProps } from "../element-props-xvw0EB7H.js";
|
|
2
1
|
import { t as customElement } from "../mono-element-CKcT0rwv.js";
|
|
3
|
-
import {
|
|
4
|
-
import
|
|
5
|
-
import {
|
|
6
|
-
import "
|
|
7
|
-
import { t as PopupPortalController } from "../popup-portal-CINuVjNY.js";
|
|
8
|
-
import { LitElement, html, isServer, nothing } from "lit";
|
|
2
|
+
import { t as __decorate } from "../decorate-DbYFpi8R.js";
|
|
3
|
+
import "../mono-button-DVvZ03P-.js";
|
|
4
|
+
import { t as MonoButtonDropdownCore } from "../button-dropdown-core-DKYEOyjy.js";
|
|
5
|
+
import { LitElement, html } from "lit";
|
|
9
6
|
import { ref } from "lit/directives/ref.js";
|
|
10
|
-
import { property, state } from "lit/decorators.js";
|
|
11
|
-
import { repeat } from "lit/directives/repeat.js";
|
|
12
7
|
|
|
13
|
-
//#region src/components/button/button-dropdown-core.ts
|
|
14
|
-
/**
|
|
15
|
-
* Would these two entry lists RENDER identically?
|
|
16
|
-
*
|
|
17
|
-
* Function-valued fields are skipped: a consumer rebuilds `onClick` on every render
|
|
18
|
-
* so it closes over the current row, and those handlers are resolved at click time
|
|
19
|
-
* rather than baked into the DOM, so they cannot make the output differ. Everything
|
|
20
|
-
* else — label, icon, size, color, variant, disabled — is compared strictly, and any
|
|
21
|
-
* non-primitive field (a fresh `cssClass` object, say) simply compares unequal and
|
|
22
|
-
* falls back to a normal update. Conservative by construction: a false "same" would
|
|
23
|
-
* show stale markup, a false "different" only costs the render we have today.
|
|
24
|
-
*/
|
|
25
|
-
function sameButtonItems(a, b) {
|
|
26
|
-
if (a === b) return true;
|
|
27
|
-
if (!Array.isArray(a) || !Array.isArray(b) || a.length !== b.length) return false;
|
|
28
|
-
for (let i = 0; i < a.length; i++) {
|
|
29
|
-
const x = a[i];
|
|
30
|
-
const y = b[i];
|
|
31
|
-
if (x === y) continue;
|
|
32
|
-
if (!x || !y || typeof x !== "object" || typeof y !== "object") return false;
|
|
33
|
-
const keys = Object.keys(x);
|
|
34
|
-
if (keys.length !== Object.keys(y).length) return false;
|
|
35
|
-
for (const key of keys) {
|
|
36
|
-
const xv = x[key];
|
|
37
|
-
const yv = y[key];
|
|
38
|
-
if (typeof xv === "function" && typeof yv === "function") continue;
|
|
39
|
-
if (xv !== yv) return false;
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
return true;
|
|
43
|
-
}
|
|
44
|
-
/**
|
|
45
|
-
* `MonoButtonDropdownCore` — everything render-mode-agnostic for
|
|
46
|
-
* `mono-button-dropdown`.
|
|
47
|
-
*
|
|
48
|
-
* The behaviour in one line: **while `buttons.length <= min` the entries render
|
|
49
|
-
* as plain buttons; past that they ALL move into a dropdown and only the trigger
|
|
50
|
-
* is left.** That all-or-nothing rule is deliberate (it mirrors the Vuetify
|
|
51
|
-
* `ButtonMenu` this replaces) — a partial split would leave the row's width
|
|
52
|
-
* jumping around as the action list changes.
|
|
53
|
-
*
|
|
54
|
-
* Two pieces are borrowed rather than rebuilt:
|
|
55
|
-
* - **`PopupPortalController`** does the positioning, flipping and z-index
|
|
56
|
-
* stacking, exactly as `mono-dropdown` uses it, so this panel ranks correctly
|
|
57
|
-
* against modals and other popups.
|
|
58
|
-
* - **Each entry is a real `<mono-button>`**, so every `ButtonProps` — `loading`,
|
|
59
|
-
* `throttle`, `handler`, `badge` — keeps working with nothing re-implemented.
|
|
60
|
-
* Props are pushed on with `applyProps` rather than a fixed attribute list, so
|
|
61
|
-
* a prop added to the button later flows through without touching this file.
|
|
62
|
-
*/
|
|
63
|
-
/**
|
|
64
|
-
* The component's PUBLIC custom properties, handed to the popup portal so a
|
|
65
|
-
* relocated panel keeps overrides an ancestor of the host set — a portaled panel
|
|
66
|
-
* is a child of `<body>`, so it inherits none of them, and `getComputedStyle`
|
|
67
|
-
* cannot enumerate custom properties for the portal to copy them blindly.
|
|
68
|
-
*
|
|
69
|
-
* Kept in step with button-dropdown.css by tests/button-dropdown-attributes.test.ts.
|
|
70
|
-
*/
|
|
71
|
-
const BUTTON_DROPDOWN_STYLE_VARS = [
|
|
72
|
-
"--mono-button-dropdown-bg",
|
|
73
|
-
"--mono-button-dropdown-border",
|
|
74
|
-
"--mono-button-dropdown-dark",
|
|
75
|
-
"--mono-button-dropdown-danger",
|
|
76
|
-
"--mono-button-dropdown-gap",
|
|
77
|
-
"--mono-button-dropdown-info",
|
|
78
|
-
"--mono-button-dropdown-item-base-color",
|
|
79
|
-
"--mono-button-dropdown-item-base-hover-bg",
|
|
80
|
-
"--mono-button-dropdown-item-base-hover-color",
|
|
81
|
-
"--mono-button-dropdown-item-color",
|
|
82
|
-
"--mono-button-dropdown-item-font-weight",
|
|
83
|
-
"--mono-button-dropdown-item-hover",
|
|
84
|
-
"--mono-button-dropdown-item-hover-bg",
|
|
85
|
-
"--mono-button-dropdown-item-hover-color",
|
|
86
|
-
"--mono-button-dropdown-item-radius",
|
|
87
|
-
"--mono-button-dropdown-item-radius-lg",
|
|
88
|
-
"--mono-button-dropdown-item-radius-xl",
|
|
89
|
-
"--mono-button-dropdown-item-radius-xxl",
|
|
90
|
-
"--mono-button-dropdown-light",
|
|
91
|
-
"--mono-button-dropdown-list-gap",
|
|
92
|
-
"--mono-button-dropdown-min-width",
|
|
93
|
-
"--mono-button-dropdown-min-width-lg",
|
|
94
|
-
"--mono-button-dropdown-min-width-md",
|
|
95
|
-
"--mono-button-dropdown-min-width-sm",
|
|
96
|
-
"--mono-button-dropdown-min-width-xl",
|
|
97
|
-
"--mono-button-dropdown-min-width-xs",
|
|
98
|
-
"--mono-button-dropdown-min-width-xxl",
|
|
99
|
-
"--mono-button-dropdown-offset",
|
|
100
|
-
"--mono-button-dropdown-offset-lg",
|
|
101
|
-
"--mono-button-dropdown-offset-md",
|
|
102
|
-
"--mono-button-dropdown-offset-sm",
|
|
103
|
-
"--mono-button-dropdown-offset-xl",
|
|
104
|
-
"--mono-button-dropdown-offset-xs",
|
|
105
|
-
"--mono-button-dropdown-offset-xxl",
|
|
106
|
-
"--mono-button-dropdown-padding",
|
|
107
|
-
"--mono-button-dropdown-padding-lg",
|
|
108
|
-
"--mono-button-dropdown-padding-md",
|
|
109
|
-
"--mono-button-dropdown-padding-sm",
|
|
110
|
-
"--mono-button-dropdown-padding-xl",
|
|
111
|
-
"--mono-button-dropdown-padding-xs",
|
|
112
|
-
"--mono-button-dropdown-padding-xxl",
|
|
113
|
-
"--mono-button-dropdown-primary",
|
|
114
|
-
"--mono-button-dropdown-purple",
|
|
115
|
-
"--mono-button-dropdown-radius",
|
|
116
|
-
"--mono-button-dropdown-radius-lg",
|
|
117
|
-
"--mono-button-dropdown-radius-md",
|
|
118
|
-
"--mono-button-dropdown-radius-sm",
|
|
119
|
-
"--mono-button-dropdown-radius-xl",
|
|
120
|
-
"--mono-button-dropdown-radius-xs",
|
|
121
|
-
"--mono-button-dropdown-radius-xxl",
|
|
122
|
-
"--mono-button-dropdown-ring-color",
|
|
123
|
-
"--mono-button-dropdown-ring-width",
|
|
124
|
-
"--mono-button-dropdown-secondary",
|
|
125
|
-
"--mono-button-dropdown-shadow",
|
|
126
|
-
"--mono-button-dropdown-success",
|
|
127
|
-
"--mono-button-dropdown-surface",
|
|
128
|
-
"--mono-button-dropdown-teal",
|
|
129
|
-
"--mono-button-dropdown-text",
|
|
130
|
-
"--mono-button-dropdown-warning"
|
|
131
|
-
];
|
|
132
|
-
const MonoButtonDropdownCore = (superClass) => {
|
|
133
|
-
class MonoButtonDropdownCoreClass extends superClass {
|
|
134
|
-
constructor(...args) {
|
|
135
|
-
super(...args);
|
|
136
|
-
this._panelEl = null;
|
|
137
|
-
this._triggerEl = null;
|
|
138
|
-
this._popup = new PopupPortalController(this, {
|
|
139
|
-
getPanel: () => this._panelEl,
|
|
140
|
-
getAnchor: () => this._triggerEl,
|
|
141
|
-
/**
|
|
142
|
-
* The INNER wrapper, not the host — it's what carries
|
|
143
|
-
* `.mono-button-dropdown`, and therefore the `--_mono-button-dropdown-*`
|
|
144
|
-
* variables every panel rule reads. The portal mirrors this element's class
|
|
145
|
-
* onto itself, so the relocated panel keeps inheriting them; pointing at the
|
|
146
|
-
* host (which has no class) left the panel transparent and border-less,
|
|
147
|
-
* since each value resolved to an undefined var.
|
|
148
|
-
*/
|
|
149
|
-
getStyleScope: () => this.renderRoot?.querySelector?.(".mono-button-dropdown"),
|
|
150
|
-
isOpen: () => this.modelValue,
|
|
151
|
-
side: () => this._side(),
|
|
152
|
-
align: () => this._align(),
|
|
153
|
-
offset: () => this.offset,
|
|
154
|
-
styleVars: () => BUTTON_DROPDOWN_STYLE_VARS,
|
|
155
|
-
flip: () => true,
|
|
156
|
-
shift: () => true,
|
|
157
|
-
onSideResolved: (side) => {
|
|
158
|
-
if (this._resolvedSide !== side) this._resolvedSide = side;
|
|
159
|
-
}
|
|
160
|
-
});
|
|
161
|
-
this._buttons = [];
|
|
162
|
-
this.min = 1;
|
|
163
|
-
this.placement = "bottom-end";
|
|
164
|
-
this.offset = 4;
|
|
165
|
-
this.modelValue = false;
|
|
166
|
-
this.disabled = false;
|
|
167
|
-
this.closeOnSelect = true;
|
|
168
|
-
this.closeOnOutsideClick = true;
|
|
169
|
-
this.closeOnEscape = true;
|
|
170
|
-
this.cssClass = {};
|
|
171
|
-
this._resolvedSide = "bottom";
|
|
172
|
-
this._documentBound = false;
|
|
173
|
-
this._onDocumentClick = (event) => {
|
|
174
|
-
if (!this.modelValue || !this.closeOnOutsideClick) return;
|
|
175
|
-
const path = event.composedPath();
|
|
176
|
-
if (path.includes(this) || this._popup.containsInPath(path)) return;
|
|
177
|
-
this._setOpen(false, "outside", event);
|
|
178
|
-
};
|
|
179
|
-
this._onDocumentKeydown = (event) => {
|
|
180
|
-
if (!this.modelValue) return;
|
|
181
|
-
if (event.key === "Escape" && this.closeOnEscape) {
|
|
182
|
-
this._setOpen(false, "escape", event);
|
|
183
|
-
this._focusTrigger();
|
|
184
|
-
return;
|
|
185
|
-
}
|
|
186
|
-
if (event.key === "ArrowDown" || event.key === "ArrowUp") {
|
|
187
|
-
const rows = this._menuButtons();
|
|
188
|
-
if (!rows.length) return;
|
|
189
|
-
event.preventDefault();
|
|
190
|
-
rows[(rows.findIndex((b) => b === document.activeElement || b.contains(document.activeElement)) + (event.key === "ArrowDown" ? 1 : -1) + rows.length) % rows.length]?.focus?.();
|
|
191
|
-
}
|
|
192
|
-
};
|
|
193
|
-
this._itemEls = /* @__PURE__ */ new Map();
|
|
194
|
-
this._itemParts = /* @__PURE__ */ new Map();
|
|
195
|
-
this.bindPanel = (el) => {
|
|
196
|
-
this._panelEl = el ?? null;
|
|
197
|
-
};
|
|
198
|
-
this._rootEl = null;
|
|
199
|
-
this.bindRoot = (el) => {
|
|
200
|
-
this._rootEl = el ?? null;
|
|
201
|
-
this._applyRootAttrs(this._rootEl);
|
|
202
|
-
};
|
|
203
|
-
defineHybridPropAliases(this, [
|
|
204
|
-
"modelValue",
|
|
205
|
-
"closeOnSelect",
|
|
206
|
-
"closeOnOutsideClick",
|
|
207
|
-
"closeOnEscape",
|
|
208
|
-
"cssClass",
|
|
209
|
-
"cssClassName"
|
|
210
|
-
]);
|
|
211
|
-
}
|
|
212
|
-
/**
|
|
213
|
-
* Entries for this dropdown.
|
|
214
|
-
*
|
|
215
|
-
* `noAccessor` because assignment does two things, only one of which is an
|
|
216
|
-
* update. Building a fresh array on every render is the NORMAL shape whenever an
|
|
217
|
-
* entry's `onClick` closes over the current row — and with one dropdown per table
|
|
218
|
-
* row that means an unrelated re-render (a filter panel opening, say) hands N
|
|
219
|
-
* dropdowns a brand-new array and re-renders all of them. Measured on a 2000-row
|
|
220
|
-
* table: 737ms of blocked main thread per toggle, against 60ms when the array
|
|
221
|
-
* identity happened to be stable. Nothing about the RENDER differed.
|
|
222
|
-
*
|
|
223
|
-
* So: compare by content and skip the update when it is equivalent. Handlers are
|
|
224
|
-
* excluded from that comparison deliberately — they are rebuilt every render by
|
|
225
|
-
* design and are resolved at CLICK time from `_itemParts`, never captured in the
|
|
226
|
-
* listener closure (see `_itemElement`). That is also why `_retargetItemParts()`
|
|
227
|
-
* has to run on EVERY assignment including a skipped one: `_itemParts` is
|
|
228
|
-
* normally refreshed during render, so without it a suppressed update would
|
|
229
|
-
* leave the cached entries pointing at the previous array's closures and a click
|
|
230
|
-
* would fire the wrong row's handler.
|
|
231
|
-
*/
|
|
232
|
-
get buttons() {
|
|
233
|
-
return this._buttons;
|
|
234
|
-
}
|
|
235
|
-
set buttons(next) {
|
|
236
|
-
const previous = this._buttons;
|
|
237
|
-
this._buttons = next ?? [];
|
|
238
|
-
this._retargetItemParts();
|
|
239
|
-
if (!sameButtonItems(previous, this._buttons)) this.requestUpdate("buttons", previous);
|
|
240
|
-
}
|
|
241
|
-
/**
|
|
242
|
-
* Point the cached entry elements at the CURRENT array without rendering, so a
|
|
243
|
-
* click resolves this render's `item`/`index` even when the update was skipped.
|
|
244
|
-
*/
|
|
245
|
-
_retargetItemParts() {
|
|
246
|
-
if (!this._itemParts?.size) return;
|
|
247
|
-
for (const [key, state] of this._itemParts) {
|
|
248
|
-
const index = Number(key.slice(2));
|
|
249
|
-
const item = this._buttons[index];
|
|
250
|
-
if (item) this._itemParts.set(key, {
|
|
251
|
-
...state,
|
|
252
|
-
item,
|
|
253
|
-
index
|
|
254
|
-
});
|
|
255
|
-
}
|
|
256
|
-
}
|
|
257
|
-
connectedCallback() {
|
|
258
|
-
super.connectedCallback();
|
|
259
|
-
if (isServer) return;
|
|
260
|
-
this._syncDocument();
|
|
261
|
-
}
|
|
262
|
-
disconnectedCallback() {
|
|
263
|
-
this._syncDocument(false);
|
|
264
|
-
super.disconnectedCallback();
|
|
265
|
-
}
|
|
266
|
-
/**
|
|
267
|
-
* Outside-click / Escape listeners, bound while OPEN only (select's rule). Both handlers
|
|
268
|
-
* bail when closed, and a grid that puts one of these in every row held two `document`
|
|
269
|
-
* listeners per row — one capture-phase — in the path of every click and keystroke.
|
|
270
|
-
*/
|
|
271
|
-
_syncDocument(want = this.modelValue && this.isConnected) {
|
|
272
|
-
if (isServer || want === this._documentBound) return;
|
|
273
|
-
this._documentBound = want;
|
|
274
|
-
if (want) {
|
|
275
|
-
document.addEventListener("click", this._onDocumentClick, true);
|
|
276
|
-
document.addEventListener("keydown", this._onDocumentKeydown);
|
|
277
|
-
} else {
|
|
278
|
-
document.removeEventListener("click", this._onDocumentClick, true);
|
|
279
|
-
document.removeEventListener("keydown", this._onDocumentKeydown);
|
|
280
|
-
}
|
|
281
|
-
}
|
|
282
|
-
/** Entries are behind the trigger once there are more of them than `min`. */
|
|
283
|
-
get collapsed() {
|
|
284
|
-
return (this.buttons?.length ?? 0) > Math.max(0, this.min ?? 1);
|
|
285
|
-
}
|
|
286
|
-
show(source = "manual") {
|
|
287
|
-
this._setOpen(true, source);
|
|
288
|
-
}
|
|
289
|
-
hide(source = "manual") {
|
|
290
|
-
this._setOpen(false, source);
|
|
291
|
-
}
|
|
292
|
-
toggle(source = "manual") {
|
|
293
|
-
this._setOpen(!this.modelValue, source);
|
|
294
|
-
}
|
|
295
|
-
_setOpen(next, source, sourceEvent) {
|
|
296
|
-
if (this.disabled && next) return;
|
|
297
|
-
if (this.modelValue === next) return;
|
|
298
|
-
this.modelValue = next;
|
|
299
|
-
const detail = {
|
|
300
|
-
modelValue: next,
|
|
301
|
-
collapsed: this.collapsed,
|
|
302
|
-
source,
|
|
303
|
-
sourceEvent
|
|
304
|
-
};
|
|
305
|
-
dispatchMonoEvent(this, next ? "open" : "close", detail);
|
|
306
|
-
}
|
|
307
|
-
/** The rendered entry buttons inside the open panel, in order. */
|
|
308
|
-
_menuButtons() {
|
|
309
|
-
return this._panelEl ? Array.from(this._panelEl.querySelectorAll("[data-mono-bd-item]")) : [];
|
|
310
|
-
}
|
|
311
|
-
_focusTrigger() {
|
|
312
|
-
this._triggerEl?.focus?.();
|
|
313
|
-
}
|
|
314
|
-
_side() {
|
|
315
|
-
return this.placement?.split("-")[0] ?? "bottom";
|
|
316
|
-
}
|
|
317
|
-
_align() {
|
|
318
|
-
const part = this.placement?.split("-")[1];
|
|
319
|
-
return part === "start" || part === "end" ? part : "center";
|
|
320
|
-
}
|
|
321
|
-
/** Light renders `mono-button`; the shadow build overrides with its own tag. */
|
|
322
|
-
_buttonTag() {
|
|
323
|
-
return "mono-button";
|
|
324
|
-
}
|
|
325
|
-
/**
|
|
326
|
-
* Whether entry content can be written as a Lit template.
|
|
327
|
-
*
|
|
328
|
-
* **It can't for the light build.** A light `<mono-button>` CAPTURES its
|
|
329
|
-
* children in `connectedCallback` and relocates them into its own
|
|
330
|
-
* `[data-mono-slot]` targets — including nodes our template rendered into it.
|
|
331
|
-
* That ejects this element's part markers, and the next render dies with
|
|
332
|
-
* "this `ChildPart` has no `parentNode`". So the light build hands Lit a
|
|
333
|
-
* fully-built element instead (see `_itemElement`), leaving Lit no parts
|
|
334
|
-
* inside the button to lose.
|
|
335
|
-
*
|
|
336
|
-
* The shadow build has no such problem: it projects through a native
|
|
337
|
-
* `<slot>`, moves nothing, and stays SSR-safe.
|
|
338
|
-
*/
|
|
339
|
-
_declarativeItems() {
|
|
340
|
-
return false;
|
|
341
|
-
}
|
|
342
|
-
updated(changed) {
|
|
343
|
-
super.updated?.(changed);
|
|
344
|
-
this._syncDocument();
|
|
345
|
-
this._applyRootAttrs(this._rootEl);
|
|
346
|
-
}
|
|
347
|
-
willUpdate(changed) {
|
|
348
|
-
if (changed.has("buttons")) this._pruneItemCache();
|
|
349
|
-
super.willUpdate?.(changed);
|
|
350
|
-
}
|
|
351
|
-
/** Forget cached entries whose index no longer exists in `buttons`. */
|
|
352
|
-
_pruneItemCache() {
|
|
353
|
-
const len = this.buttons?.length ?? 0;
|
|
354
|
-
for (const key of [...this._itemEls.keys()]) {
|
|
355
|
-
const index = Number(key.slice(2));
|
|
356
|
-
if (!Number.isFinite(index) || index >= len) {
|
|
357
|
-
this._itemEls.delete(key);
|
|
358
|
-
this._itemParts.delete(key);
|
|
359
|
-
}
|
|
360
|
-
}
|
|
361
|
-
}
|
|
362
|
-
/** Build (or update) the real element for one entry. */
|
|
363
|
-
_itemElement(item, index, inMenu, opts) {
|
|
364
|
-
const key = `${inMenu ? "m" : "r"}:${index}`;
|
|
365
|
-
let el = this._itemEls.get(key);
|
|
366
|
-
const prev = this._itemParts.get(key);
|
|
367
|
-
if (el && prev && (prev.label !== item.label || prev.icon !== item.icon)) {
|
|
368
|
-
this._itemEls.delete(key);
|
|
369
|
-
el = void 0;
|
|
370
|
-
}
|
|
371
|
-
if (!el) {
|
|
372
|
-
el = document.createElement(this._buttonTag());
|
|
373
|
-
el.setAttribute("data-mono-bd-item", "");
|
|
374
|
-
if (item.icon) {
|
|
375
|
-
const icon = document.createElement("span");
|
|
376
|
-
icon.setAttribute("slot", "icon");
|
|
377
|
-
icon.className = `mono-icon ${item.icon}`;
|
|
378
|
-
el.appendChild(icon);
|
|
379
|
-
}
|
|
380
|
-
if (item.label) el.appendChild(document.createTextNode(item.label));
|
|
381
|
-
el.addEventListener("click", ((event) => {
|
|
382
|
-
const state = this._itemParts.get(key);
|
|
383
|
-
if (state) this._onItemClick(state.item, state.index, event);
|
|
384
|
-
}));
|
|
385
|
-
el.addEventListener("mno-click", (e) => e.stopPropagation());
|
|
386
|
-
el.addEventListener("mnoClick", (e) => e.stopPropagation());
|
|
387
|
-
this._itemEls.set(key, el);
|
|
388
|
-
}
|
|
389
|
-
this._itemParts.set(key, {
|
|
390
|
-
label: item.label,
|
|
391
|
-
icon: item.icon,
|
|
392
|
-
item,
|
|
393
|
-
index
|
|
394
|
-
});
|
|
395
|
-
el.className = opts.cls;
|
|
396
|
-
this._applyItem(el, item);
|
|
397
|
-
return el;
|
|
398
|
-
}
|
|
399
|
-
_cls(base, key) {
|
|
400
|
-
const extra = this.cssClass?.[key];
|
|
401
|
-
return extra ? `${base} ${extra}` : base;
|
|
402
|
-
}
|
|
403
|
-
/**
|
|
404
|
-
* Push an entry's props onto its rendered `<mono-button>`.
|
|
405
|
-
*
|
|
406
|
-
* Done imperatively via a Lit ref callback rather than as template
|
|
407
|
-
* attributes: object/function props (`handler`, `cssClass`, `throttle`) can't
|
|
408
|
-
* cross as attributes, and going through `applyProps` means any prop the
|
|
409
|
-
* button gains later works here with no change.
|
|
410
|
-
*/
|
|
411
|
-
_applyItem(el, item) {
|
|
412
|
-
if (!el) return;
|
|
413
|
-
const { label: _l, icon: _i, onClick: _c, className: _n, ...rest } = item;
|
|
414
|
-
applyProps(el, rest);
|
|
415
|
-
if (this.disabled) el.disabled = true;
|
|
416
|
-
}
|
|
417
|
-
_onItemClick(item, index, event) {
|
|
418
|
-
if (item.disabled || this.disabled) return;
|
|
419
|
-
item.onClick?.(event);
|
|
420
|
-
dispatchMonoEvent(this, "click", {
|
|
421
|
-
item,
|
|
422
|
-
index,
|
|
423
|
-
modelValue: this.modelValue,
|
|
424
|
-
collapsed: this.collapsed,
|
|
425
|
-
source: "trigger",
|
|
426
|
-
sourceEvent: event
|
|
427
|
-
});
|
|
428
|
-
if (this.collapsed && this.closeOnSelect) this._setOpen(false, "manual", event);
|
|
429
|
-
}
|
|
430
|
-
/** One entry, as a real button element carrying its own props. */
|
|
431
|
-
renderItem(item, index, inMenu) {
|
|
432
|
-
const tag = this._buttonTag();
|
|
433
|
-
const cls = [
|
|
434
|
-
inMenu ? "mono-button-dropdown-item-btn" : "mono-button-dropdown-row-btn",
|
|
435
|
-
inMenu && item.color ? `mono-bd-c-${item.color}` : "",
|
|
436
|
-
item.className ?? ""
|
|
437
|
-
].filter(Boolean).join(" ");
|
|
438
|
-
const content = html`
|
|
439
|
-
${item.icon ? html`<span slot="icon" class="mono-icon ${item.icon}"></span>` : nothing}
|
|
440
|
-
${item.label ?? nothing}
|
|
441
|
-
`;
|
|
442
|
-
const onClick = (e) => this._onItemClick(item, index, e);
|
|
443
|
-
if (!this._declarativeItems()) return this._itemElement(item, index, inMenu, {
|
|
444
|
-
cls,
|
|
445
|
-
onClick
|
|
446
|
-
});
|
|
447
|
-
const bind = (el) => this._applyItem(el, item);
|
|
448
|
-
const stop = (e) => e.stopPropagation();
|
|
449
|
-
return tag === "mono-button" ? html`<mono-button
|
|
450
|
-
class=${cls}
|
|
451
|
-
data-mono-bd-item
|
|
452
|
-
${ref(bind)}
|
|
453
|
-
@click=${onClick}
|
|
454
|
-
@mno-click=${stop}
|
|
455
|
-
@mnoClick=${stop}
|
|
456
|
-
>${content}</mono-button
|
|
457
|
-
>` : html`<mono-shadow-button
|
|
458
|
-
class=${cls}
|
|
459
|
-
data-mono-bd-item
|
|
460
|
-
${ref(bind)}
|
|
461
|
-
@click=${onClick}
|
|
462
|
-
@mno-click=${stop}
|
|
463
|
-
@mnoClick=${stop}
|
|
464
|
-
>${content}</mono-shadow-button
|
|
465
|
-
>`;
|
|
466
|
-
}
|
|
467
|
-
/** The inline row — every entry as a plain button, no dropdown involved. */
|
|
468
|
-
renderRow() {
|
|
469
|
-
return html`
|
|
470
|
-
<div class=${this._cls("mono-button-dropdown-row", "row")} mono-row ?hidden=${this.collapsed}>
|
|
471
|
-
${this.collapsed ? nothing : repeat(this.buttons ?? [], (_item, i) => i, (item, i) => this.renderItem(item, i, false))}
|
|
472
|
-
</div>
|
|
473
|
-
`;
|
|
474
|
-
}
|
|
475
|
-
/** Class + state for the panel, which each build writes into its own template. */
|
|
476
|
-
get panelClass() {
|
|
477
|
-
return this._cls("mono-button-dropdown-panel", "panel");
|
|
478
|
-
}
|
|
479
|
-
get panelHidden() {
|
|
480
|
-
return !this.collapsed || !this.modelValue;
|
|
481
|
-
}
|
|
482
|
-
/**
|
|
483
|
-
* The prop mirrors, each omitted at its default so `:not([mono-size])` means
|
|
484
|
-
* "md" for hand-written markup exactly as it does for the element.
|
|
485
|
-
*/
|
|
486
|
-
_computeRootAttrs() {
|
|
487
|
-
const align = this._align();
|
|
488
|
-
const side = this.modelValue ? this._resolvedSide : this._side();
|
|
489
|
-
return {
|
|
490
|
-
"mono-size": !this.size || this.size === "md" ? null : this.size,
|
|
491
|
-
"mono-color": !this.color || this.color === "primary" ? null : this.color,
|
|
492
|
-
"mono-variant": !this.variant || this.variant === "solid" ? null : this.variant,
|
|
493
|
-
"mono-rounded": this.rounded ?? null,
|
|
494
|
-
"mono-placement": this.placement === "bottom-end" ? null : this.placement,
|
|
495
|
-
"mono-side": side === "bottom" ? null : side,
|
|
496
|
-
"mono-align": align === "end" ? null : align,
|
|
497
|
-
"mono-open": this.modelValue ? "" : null,
|
|
498
|
-
"mono-collapsed": this.collapsed ? "" : null,
|
|
499
|
-
"mono-disabled": this.disabled ? "" : null,
|
|
500
|
-
"mono-fixed": this._positionsPanel() ? "" : null
|
|
501
|
-
};
|
|
502
|
-
}
|
|
503
|
-
/** Does this build measure and place the panel itself? (light only — see above.) */
|
|
504
|
-
_positionsPanel() {
|
|
505
|
-
return !isServer && this.renderRoot === this;
|
|
506
|
-
}
|
|
507
|
-
_applyRootAttrs(root) {
|
|
508
|
-
if (!root) return;
|
|
509
|
-
if (!root.hasAttribute("mono-button-dropdown")) root.setAttribute("mono-button-dropdown", "");
|
|
510
|
-
for (const [name, value] of Object.entries(this._computeRootAttrs())) if (value === null) root.removeAttribute(name);
|
|
511
|
-
else if (root.getAttribute(name) !== value) root.setAttribute(name, value);
|
|
512
|
-
}
|
|
513
|
-
/**
|
|
514
|
-
* An entry's `color` inside the menu.
|
|
515
|
-
*
|
|
516
|
-
* It is NOT a button colour in there (see button-dropdown.css): the row takes
|
|
517
|
-
* the role as its INK and a 10%/20% wash of it on hover, the way Basecoat
|
|
518
|
-
* treats `[data-variant='destructive']`. `primary` is written out rather
|
|
519
|
-
* than dropped as a default, because the panel's own ink is the popover
|
|
520
|
-
* foreground, not the primary role.
|
|
521
|
-
*/
|
|
522
|
-
_itemColorAttr(item) {
|
|
523
|
-
return item.color ?? null;
|
|
524
|
-
}
|
|
525
|
-
/** The menu rows. Lives INSIDE the panel, so these parts travel with it. */
|
|
526
|
-
renderMenuList() {
|
|
527
|
-
return html`
|
|
528
|
-
<ul class=${this._cls("mono-button-dropdown-list", "list")} mono-list>
|
|
529
|
-
${this.collapsed ? repeat(this.buttons ?? [], (_item, i) => i, (item, i) => html`
|
|
530
|
-
<li
|
|
531
|
-
class=${this._cls("mono-button-dropdown-item", "item")}
|
|
532
|
-
mono-item
|
|
533
|
-
mono-item-color=${this._itemColorAttr(item) ?? nothing}
|
|
534
|
-
role="none"
|
|
535
|
-
>
|
|
536
|
-
${this.renderItem(item, i, true)}
|
|
537
|
-
</li>
|
|
538
|
-
`) : nothing}
|
|
539
|
-
</ul>
|
|
540
|
-
`;
|
|
541
|
-
}
|
|
542
|
-
/** The `⋮` trigger. `nothing` while the entries are inline. */
|
|
543
|
-
renderTrigger() {
|
|
544
|
-
if (!this.collapsed) return nothing;
|
|
545
|
-
return this._renderTriggerButton();
|
|
546
|
-
}
|
|
547
|
-
_renderTriggerButton() {
|
|
548
|
-
const t = {
|
|
549
|
-
...this.color ? { color: this.color } : {},
|
|
550
|
-
...this.variant ? { variant: this.variant } : {},
|
|
551
|
-
...this.size ? { size: this.size } : {},
|
|
552
|
-
...this.rounded ? { rounded: this.rounded } : {},
|
|
553
|
-
...this.trigger ?? {}
|
|
554
|
-
};
|
|
555
|
-
const tag = this._buttonTag();
|
|
556
|
-
const triggerCls = this._cls("mono-button-dropdown-trigger", "trigger");
|
|
557
|
-
const bindTrigger = (el) => {
|
|
558
|
-
this._triggerEl = el ?? null;
|
|
559
|
-
if (!el) return;
|
|
560
|
-
const { label: _l, icon: _i, ...rest } = t;
|
|
561
|
-
applyProps(el, rest);
|
|
562
|
-
if (this.disabled) el.disabled = true;
|
|
563
|
-
};
|
|
564
|
-
const stop = (e) => e.stopPropagation();
|
|
565
|
-
const onTrigger = (e) => {
|
|
566
|
-
e.stopPropagation();
|
|
567
|
-
this.toggle("trigger");
|
|
568
|
-
};
|
|
569
|
-
if (!this._declarativeItems()) {
|
|
570
|
-
let el = this._itemEls.get("trigger");
|
|
571
|
-
if (!el) {
|
|
572
|
-
el = document.createElement(tag);
|
|
573
|
-
el.setAttribute("mono-trigger", "");
|
|
574
|
-
const icon = document.createElement("span");
|
|
575
|
-
icon.setAttribute("slot", "icon");
|
|
576
|
-
icon.className = `mono-icon ${t.icon ?? "i-mdi-dots-vertical"}`;
|
|
577
|
-
el.appendChild(icon);
|
|
578
|
-
if (t.label) el.appendChild(document.createTextNode(t.label));
|
|
579
|
-
if (!t.label) el.setAttribute("icon-only", "true");
|
|
580
|
-
el.addEventListener("click", onTrigger);
|
|
581
|
-
el.addEventListener("mno-click", stop);
|
|
582
|
-
el.addEventListener("mnoClick", stop);
|
|
583
|
-
this._itemEls.set("trigger", el);
|
|
584
|
-
}
|
|
585
|
-
el.className = triggerCls;
|
|
586
|
-
bindTrigger(el);
|
|
587
|
-
return el;
|
|
588
|
-
}
|
|
589
|
-
const triggerContent = html`
|
|
590
|
-
<span slot="icon" class="mono-icon ${t.icon ?? "i-mdi-dots-vertical"}"></span>
|
|
591
|
-
${t.label ?? nothing}
|
|
592
|
-
`;
|
|
593
|
-
return tag === "mono-button" ? html`<mono-button
|
|
594
|
-
class=${triggerCls}
|
|
595
|
-
mono-trigger
|
|
596
|
-
icon-only=${t.label ? nothing : "true"}
|
|
597
|
-
${ref(bindTrigger)}
|
|
598
|
-
@click=${onTrigger}
|
|
599
|
-
@mno-click=${stop}
|
|
600
|
-
@mnoClick=${stop}
|
|
601
|
-
>${triggerContent}</mono-button
|
|
602
|
-
>` : html`<mono-shadow-button
|
|
603
|
-
class=${triggerCls}
|
|
604
|
-
mono-trigger
|
|
605
|
-
icon-only=${t.label ? nothing : "true"}
|
|
606
|
-
${ref(bindTrigger)}
|
|
607
|
-
@click=${onTrigger}
|
|
608
|
-
@mno-click=${stop}
|
|
609
|
-
@mnoClick=${stop}
|
|
610
|
-
>${triggerContent}</mono-shadow-button
|
|
611
|
-
>`;
|
|
612
|
-
}
|
|
613
|
-
}
|
|
614
|
-
__decorate([property({
|
|
615
|
-
attribute: false,
|
|
616
|
-
noAccessor: true
|
|
617
|
-
})], MonoButtonDropdownCoreClass.prototype, "buttons", null);
|
|
618
|
-
__decorate([property({ converter: numberStringConverter })], MonoButtonDropdownCoreClass.prototype, "min", void 0);
|
|
619
|
-
__decorate([property({ type: String })], MonoButtonDropdownCoreClass.prototype, "placement", void 0);
|
|
620
|
-
__decorate([property({ converter: numberStringConverter })], MonoButtonDropdownCoreClass.prototype, "offset", void 0);
|
|
621
|
-
__decorate([property({ type: String })], MonoButtonDropdownCoreClass.prototype, "color", void 0);
|
|
622
|
-
__decorate([property({ type: String })], MonoButtonDropdownCoreClass.prototype, "variant", void 0);
|
|
623
|
-
__decorate([property({ type: String })], MonoButtonDropdownCoreClass.prototype, "size", void 0);
|
|
624
|
-
__decorate([property({ type: String })], MonoButtonDropdownCoreClass.prototype, "rounded", void 0);
|
|
625
|
-
__decorate([property({
|
|
626
|
-
attribute: false,
|
|
627
|
-
hasChanged: rateLimitHasChanged
|
|
628
|
-
})], MonoButtonDropdownCoreClass.prototype, "trigger", void 0);
|
|
629
|
-
__decorate([property({
|
|
630
|
-
attribute: "model-value",
|
|
631
|
-
reflect: true,
|
|
632
|
-
converter: booleanStringConverter
|
|
633
|
-
})], MonoButtonDropdownCoreClass.prototype, "modelValue", void 0);
|
|
634
|
-
__decorate([property({
|
|
635
|
-
reflect: true,
|
|
636
|
-
converter: booleanStringConverter
|
|
637
|
-
})], MonoButtonDropdownCoreClass.prototype, "disabled", void 0);
|
|
638
|
-
__decorate([property({
|
|
639
|
-
attribute: "close-on-select",
|
|
640
|
-
converter: booleanStringConverter
|
|
641
|
-
})], MonoButtonDropdownCoreClass.prototype, "closeOnSelect", void 0);
|
|
642
|
-
__decorate([property({
|
|
643
|
-
attribute: "close-on-outside-click",
|
|
644
|
-
converter: booleanStringConverter
|
|
645
|
-
})], MonoButtonDropdownCoreClass.prototype, "closeOnOutsideClick", void 0);
|
|
646
|
-
__decorate([property({
|
|
647
|
-
attribute: "close-on-escape",
|
|
648
|
-
converter: booleanStringConverter
|
|
649
|
-
})], MonoButtonDropdownCoreClass.prototype, "closeOnEscape", void 0);
|
|
650
|
-
__decorate([property({ attribute: false })], MonoButtonDropdownCoreClass.prototype, "cssClass", void 0);
|
|
651
|
-
__decorate([state()], MonoButtonDropdownCoreClass.prototype, "_resolvedSide", void 0);
|
|
652
|
-
return MonoButtonDropdownCoreClass;
|
|
653
|
-
};
|
|
654
|
-
|
|
655
|
-
//#endregion
|
|
656
8
|
//#region src/components/button/mono-button-dropdown.ts
|
|
657
9
|
let MonoButtonDropdown = class MonoButtonDropdown extends MonoButtonDropdownCore(LitElement) {
|
|
658
10
|
createRenderRoot() {
|