@bluevolt-tech/lumen 1.5.2 → 2.0.1

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 (46) hide show
  1. package/dist/components/bv-alert-banner/bv-alert-banner.d.ts +33 -0
  2. package/dist/components/bv-alert-banner/bv-alert-banner.js +206 -0
  3. package/dist/components/bv-badge/bv-badge.d.ts +1 -1
  4. package/dist/components/bv-badge/bv-badge.js +1 -1
  5. package/dist/components/bv-button/bv-button.d.ts +1 -1
  6. package/dist/components/bv-button/bv-button.js +1 -1
  7. package/dist/components/bv-checkbox/bv-checkbox.js +1 -1
  8. package/dist/components/bv-course-detail-modal/bv-course-detail-modal.js +1 -1
  9. package/dist/components/bv-course-grid-card/bv-course-grid-card.d.ts +4 -0
  10. package/dist/components/bv-course-grid-card/bv-course-grid-card.js +75 -18
  11. package/dist/components/bv-course-list-card/bv-course-list-card.d.ts +4 -0
  12. package/dist/components/bv-course-list-card/bv-course-list-card.js +75 -18
  13. package/dist/components/bv-date-range-input/bv-date-range-input.d.ts +23 -0
  14. package/dist/components/bv-date-range-input/bv-date-range-input.js +950 -0
  15. package/dist/components/bv-date-range-picker/bv-date-range-picker.d.ts +56 -0
  16. package/dist/components/bv-date-range-picker/bv-date-range-picker.js +778 -0
  17. package/dist/components/bv-empty-state/bv-empty-state.js +1 -1
  18. package/dist/components/bv-filter-dropdown/bv-filter-dropdown.d.ts +20 -5
  19. package/dist/components/bv-filter-dropdown/bv-filter-dropdown.js +263 -25
  20. package/dist/components/bv-filter-panel/bv-filter-panel.js +1 -1
  21. package/dist/components/bv-input/bv-input.d.ts +24 -0
  22. package/dist/components/bv-input/bv-input.js +148 -0
  23. package/dist/components/bv-input-dropdown/bv-input-dropdown.d.ts +46 -0
  24. package/dist/components/bv-input-dropdown/bv-input-dropdown.js +501 -0
  25. package/dist/components/bv-pagination/bv-pagination.d.ts +13 -1
  26. package/dist/components/bv-pagination/bv-pagination.js +290 -9
  27. package/dist/components/bv-portal-header/bv-portal-header.js +2 -2
  28. package/dist/components/bv-searchbox/bv-searchbox.js +1 -1
  29. package/dist/components/bv-segmented-control/bv-segmented-control.d.ts +26 -0
  30. package/dist/components/bv-segmented-control/bv-segmented-control.js +128 -0
  31. package/dist/components/bv-select/bv-select.d.ts +41 -0
  32. package/dist/components/bv-select/bv-select.js +240 -0
  33. package/dist/components/bv-split-button/bv-split-button.d.ts +37 -0
  34. package/dist/components/bv-split-button/bv-split-button.js +264 -0
  35. package/dist/components/bv-table/bv-table.d.ts +15 -0
  36. package/dist/components/bv-table/bv-table.js +260 -33
  37. package/dist/components/bv-toggle/bv-toggle.d.ts +2 -1
  38. package/dist/components/bv-toggle/bv-toggle.js +2 -2
  39. package/dist/components/bv-tooltip/bv-tooltip.d.ts +18 -0
  40. package/dist/components/bv-tooltip/bv-tooltip.js +144 -0
  41. package/dist/components/bv-user-row/bv-user-row.js +1 -1
  42. package/dist/storybook/stories/screens/cet-report.data.d.ts +55 -0
  43. package/dist/storybook/stories/screens/cet-report.data.js +3697 -0
  44. package/dist/themes/base.css +15 -1
  45. package/package.json +42 -1
  46. package/themes/base.css +15 -1
@@ -0,0 +1,240 @@
1
+ // css-inline:/home/runner/work/BV_lumen/BV_lumen/components/bv-select/bv-select.css
2
+ var bv_select_default = ":host {\n display: block;\n position: relative;\n font-family: var(--bv-font-family-base);\n}\n\n/* \u2500\u2500 Label \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\n\n.field-label {\n display: block;\n font-size: var(--bv-font-size-sm);\n font-weight: var(--bv-font-weight-semibold);\n color: var(--bv-color-neutral-800);\n margin-bottom: 6px;\n}\n\n.required-mark {\n color: var(--bv-color-danger);\n margin-left: 2px;\n}\n\n/* \u2500\u2500 Trigger \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\n\n.trigger {\n display: flex;\n align-items: center;\n justify-content: space-between;\n width: 100%;\n height: 44px;\n padding: 0 var(--bv-spacing-md);\n background: var(--bv-color-neutral-0);\n border: 1px solid var(--bv-color-neutral-300);\n border-radius: var(--bv-radius-lg);\n cursor: pointer;\n font-family: inherit;\n font-size: var(--bv-font-size-sm);\n color: var(--bv-color-neutral-800);\n text-align: left;\n transition:\n border-color var(--bv-transition-fast),\n box-shadow var(--bv-transition-fast);\n}\n\n.trigger:focus-visible {\n outline: none;\n border-color: var(--bv-color-primary);\n box-shadow:\n 0 0 0 3px var(--bv-color-primary-light),\n 0 1px 2px 0 rgba(16, 24, 40, 0.05);\n}\n\n:host([open]) .trigger {\n border-color: var(--bv-color-primary);\n box-shadow:\n 0 0 0 3px var(--bv-color-primary-light),\n 0 1px 2px 0 rgba(16, 24, 40, 0.05);\n}\n\n:host([error]:not([error=''])) .trigger {\n border-color: var(--bv-color-danger);\n}\n\n.trigger:disabled {\n background: var(--bv-color-neutral-100);\n color: var(--bv-color-neutral-400);\n cursor: not-allowed;\n}\n\n.trigger-label {\n flex: 1;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n.trigger-label.is-placeholder {\n color: var(--bv-color-neutral-400);\n}\n\n.trigger-chevron {\n display: flex;\n color: var(--bv-color-neutral-500);\n flex-shrink: 0;\n margin-left: var(--bv-spacing-sm);\n transition: transform var(--bv-transition-fast);\n}\n\n:host([open]) .trigger-chevron {\n transform: rotate(180deg);\n}\n\n/* \u2500\u2500 Dropdown panel \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\n\n.panel {\n display: none;\n position: absolute;\n top: calc(100% + 4px);\n left: 0;\n right: 0;\n background: var(--bv-color-neutral-0);\n border: 1px solid var(--bv-color-neutral-200);\n border-radius: var(--bv-radius-lg);\n box-shadow: var(--bv-shadow-md);\n z-index: 200;\n overflow: hidden;\n padding: var(--bv-spacing-xs) 0;\n}\n\n:host([open]) .panel {\n display: block;\n}\n\n/* \u2500\u2500 Options \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\n\n.option {\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: var(--bv-spacing-sm);\n padding: 10px var(--bv-spacing-md);\n font-size: var(--bv-font-size-sm);\n color: var(--bv-color-neutral-700);\n cursor: pointer;\n transition: background var(--bv-transition-fast);\n}\n\n.option:hover {\n background: var(--bv-color-secondary);\n}\n\n.option[aria-selected='true'] {\n font-weight: var(--bv-font-weight-medium);\n color: var(--bv-color-neutral-900);\n background: var(--bv-color-secondary-light);\n}\n\n.option-text {\n flex: 1;\n}\n\n.option-check {\n display: none;\n color: var(--bv-color-primary);\n flex-shrink: 0;\n}\n\n.option[aria-selected='true'] .option-check {\n display: flex;\n}\n\n/* \u2500\u2500 Error message \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\n\n.field-error {\n display: block;\n font-size: var(--bv-font-size-xs);\n color: var(--bv-color-danger);\n margin-top: var(--bv-spacing-xs);\n}\n";
3
+
4
+ // components/bv-select/bv-select.ts
5
+ var CHEVRON_DOWN = `<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M6 9l6 6 6-6"/></svg>`;
6
+ var CHECK = `<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><polyline points="20 6 9 17 4 12"/></svg>`;
7
+ var _sheet = null;
8
+ function getSheet() {
9
+ if (!_sheet) {
10
+ _sheet = new CSSStyleSheet();
11
+ _sheet.replaceSync(bv_select_default);
12
+ }
13
+ return _sheet;
14
+ }
15
+ var BvSelect = class extends HTMLElement {
16
+ static observedAttributes = [
17
+ "label",
18
+ "options",
19
+ "value",
20
+ "placeholder",
21
+ "error",
22
+ "required",
23
+ "disabled"
24
+ ];
25
+ _rendered = false;
26
+ _labelEl = null;
27
+ _triggerEl = null;
28
+ _triggerLabelEl = null;
29
+ _panelEl = null;
30
+ _errorEl = null;
31
+ _options = [];
32
+ _value = "";
33
+ _offClick = null;
34
+ constructor() {
35
+ super();
36
+ const shadow = this.attachShadow({ mode: "open" });
37
+ if ("adoptedStyleSheets" in ShadowRoot.prototype) {
38
+ shadow.adoptedStyleSheets = [getSheet()];
39
+ }
40
+ }
41
+ get value() {
42
+ return this._value;
43
+ }
44
+ set value(v) {
45
+ this.setAttribute("value", v);
46
+ }
47
+ get disabled() {
48
+ return this.hasAttribute("disabled");
49
+ }
50
+ set disabled(v) {
51
+ if (v) this.setAttribute("disabled", "");
52
+ else this.removeAttribute("disabled");
53
+ }
54
+ get required() {
55
+ return this.hasAttribute("required");
56
+ }
57
+ set required(v) {
58
+ if (v) this.setAttribute("required", "");
59
+ else this.removeAttribute("required");
60
+ }
61
+ connectedCallback() {
62
+ this._render();
63
+ }
64
+ disconnectedCallback() {
65
+ if (this._offClick) document.removeEventListener("click", this._offClick);
66
+ }
67
+ attributeChangedCallback(name, _old, val) {
68
+ if (name === "options") {
69
+ try {
70
+ this._options = JSON.parse(val ?? "[]");
71
+ } catch {
72
+ this._options = [];
73
+ }
74
+ if (this._rendered) this._renderOptions();
75
+ }
76
+ if (name === "value") {
77
+ this._value = val ?? "";
78
+ if (this._rendered) {
79
+ this._syncTriggerLabel();
80
+ this._syncSelected();
81
+ }
82
+ }
83
+ if (!this._rendered) return;
84
+ if (name === "label" || name === "required") this._syncLabel();
85
+ if (name === "error") this._syncError();
86
+ if (name === "disabled") this._syncDisabled();
87
+ if (name === "placeholder") this._syncTriggerLabel();
88
+ }
89
+ _render() {
90
+ if (this._rendered) return;
91
+ this._rendered = true;
92
+ try {
93
+ this._options = JSON.parse(this.getAttribute("options") ?? "[]");
94
+ } catch {
95
+ this._options = [];
96
+ }
97
+ this._value = this.getAttribute("value") ?? "";
98
+ const shadow = this.shadowRoot;
99
+ if (!shadow.adoptedStyleSheets.length) {
100
+ const s = document.createElement("style");
101
+ s.textContent = bv_select_default;
102
+ shadow.appendChild(s);
103
+ }
104
+ const label = document.createElement("label");
105
+ label.className = "field-label";
106
+ this._labelEl = label;
107
+ const trigger = document.createElement("button");
108
+ trigger.type = "button";
109
+ trigger.className = "trigger";
110
+ trigger.setAttribute("aria-haspopup", "listbox");
111
+ trigger.setAttribute("aria-expanded", "false");
112
+ trigger.setAttribute("part", "trigger");
113
+ this._triggerEl = trigger;
114
+ const triggerLabel = document.createElement("span");
115
+ triggerLabel.className = "trigger-label";
116
+ this._triggerLabelEl = triggerLabel;
117
+ const chevron = document.createElement("span");
118
+ chevron.className = "trigger-chevron";
119
+ chevron.innerHTML = CHEVRON_DOWN;
120
+ trigger.append(triggerLabel, chevron);
121
+ trigger.addEventListener("click", (e) => {
122
+ e.stopPropagation();
123
+ if (!this.hasAttribute("disabled")) this._toggle();
124
+ });
125
+ const panel = document.createElement("div");
126
+ panel.className = "panel";
127
+ panel.setAttribute("role", "listbox");
128
+ this._panelEl = panel;
129
+ const errorEl = document.createElement("span");
130
+ errorEl.className = "field-error";
131
+ errorEl.setAttribute("aria-live", "polite");
132
+ this._errorEl = errorEl;
133
+ shadow.append(label, trigger, panel, errorEl);
134
+ this._syncLabel();
135
+ this._syncTriggerLabel();
136
+ this._renderOptions();
137
+ this._syncError();
138
+ this._syncDisabled();
139
+ this._offClick = (e) => {
140
+ if (!this.contains(e.target) && !shadow.contains(e.target)) {
141
+ this._close();
142
+ }
143
+ };
144
+ document.addEventListener("click", this._offClick);
145
+ this.addEventListener("keydown", (e) => {
146
+ if (e.key === "Escape") this._close();
147
+ });
148
+ }
149
+ _toggle() {
150
+ if (this.hasAttribute("open")) this._close();
151
+ else this._open();
152
+ }
153
+ _open() {
154
+ var _a;
155
+ this.setAttribute("open", "");
156
+ (_a = this._triggerEl) == null ? void 0 : _a.setAttribute("aria-expanded", "true");
157
+ }
158
+ _close() {
159
+ var _a;
160
+ this.removeAttribute("open");
161
+ (_a = this._triggerEl) == null ? void 0 : _a.setAttribute("aria-expanded", "false");
162
+ }
163
+ _syncLabel() {
164
+ if (!this._labelEl) return;
165
+ const labelText = this.getAttribute("label") ?? "";
166
+ this._labelEl.textContent = labelText;
167
+ if (this.hasAttribute("required")) {
168
+ const mark = document.createElement("span");
169
+ mark.className = "required-mark";
170
+ mark.setAttribute("aria-hidden", "true");
171
+ mark.textContent = "*";
172
+ this._labelEl.appendChild(mark);
173
+ }
174
+ this._labelEl.hidden = !labelText;
175
+ }
176
+ _syncTriggerLabel() {
177
+ if (!this._triggerLabelEl) return;
178
+ const match = this._options.find((o) => o.value === this._value);
179
+ const placeholder = this.getAttribute("placeholder") ?? "Select";
180
+ this._triggerLabelEl.textContent = (match == null ? void 0 : match.label) ?? placeholder;
181
+ this._triggerLabelEl.classList.toggle("is-placeholder", !match);
182
+ }
183
+ _renderOptions() {
184
+ if (!this._panelEl) return;
185
+ this._panelEl.innerHTML = "";
186
+ for (const opt of this._options) {
187
+ const item = document.createElement("div");
188
+ item.className = "option";
189
+ item.setAttribute("role", "option");
190
+ item.setAttribute("aria-selected", opt.value === this._value ? "true" : "false");
191
+ const text = document.createElement("span");
192
+ text.className = "option-text";
193
+ text.textContent = opt.label;
194
+ const check = document.createElement("span");
195
+ check.className = "option-check";
196
+ check.innerHTML = CHECK;
197
+ item.append(text, check);
198
+ item.addEventListener("click", () => this._select(opt));
199
+ this._panelEl.appendChild(item);
200
+ }
201
+ }
202
+ _syncSelected() {
203
+ var _a;
204
+ (_a = this._panelEl) == null ? void 0 : _a.querySelectorAll(".option").forEach((el, i) => {
205
+ const opt = this._options[i];
206
+ el.setAttribute("aria-selected", (opt == null ? void 0 : opt.value) === this._value ? "true" : "false");
207
+ });
208
+ this._syncTriggerLabel();
209
+ }
210
+ _syncError() {
211
+ if (!this._errorEl) return;
212
+ const msg = this.getAttribute("error") ?? "";
213
+ this._errorEl.textContent = msg;
214
+ this._errorEl.hidden = !msg;
215
+ }
216
+ _syncDisabled() {
217
+ if (!this._triggerEl) return;
218
+ this._triggerEl.disabled = this.hasAttribute("disabled");
219
+ }
220
+ _select(opt) {
221
+ this._value = opt.value;
222
+ this.setAttribute("value", opt.value);
223
+ this._syncTriggerLabel();
224
+ this._syncSelected();
225
+ this._close();
226
+ this.dispatchEvent(
227
+ new CustomEvent("bv-change", {
228
+ bubbles: true,
229
+ composed: true,
230
+ detail: { value: opt.value, label: opt.label }
231
+ })
232
+ );
233
+ }
234
+ };
235
+ if (!customElements.get("bv-select")) {
236
+ customElements.define("bv-select", BvSelect);
237
+ }
238
+ export {
239
+ BvSelect
240
+ };
@@ -0,0 +1,37 @@
1
+ export type SplitButtonVariant = 'primary' | 'secondary' | 'outline' | 'outline-secondary';
2
+ export interface SplitButtonOption {
3
+ value: string;
4
+ label: string;
5
+ description?: string;
6
+ icon?: string;
7
+ }
8
+ export interface SplitButtonSelectDetail {
9
+ value: string;
10
+ }
11
+ export declare class BvSplitButton extends HTMLElement {
12
+ static readonly observedAttributes: readonly ["label", "variant", "disabled", "options", "open"];
13
+ private _rendered;
14
+ private _mainBtn;
15
+ private _toggleBtn;
16
+ private _labelEl;
17
+ private _panelEl;
18
+ private _offClick;
19
+ constructor();
20
+ get label(): string;
21
+ set label(v: string);
22
+ get variant(): SplitButtonVariant;
23
+ set variant(v: SplitButtonVariant);
24
+ get disabled(): boolean;
25
+ set disabled(v: boolean);
26
+ get options(): SplitButtonOption[];
27
+ set options(v: SplitButtonOption[]);
28
+ connectedCallback(): void;
29
+ disconnectedCallback(): void;
30
+ attributeChangedCallback(name: string, _old: string | null, _val: string | null): void;
31
+ private _render;
32
+ private _toggle;
33
+ private _open;
34
+ private _close;
35
+ private _syncDisabled;
36
+ private _syncPanel;
37
+ }
@@ -0,0 +1,264 @@
1
+ // css-inline:/home/runner/work/BV_lumen/BV_lumen/components/bv-split-button/bv-split-button.css
2
+ var bv_split_button_default = ":host {\n --bv-button-bg: var(--bv-color-primary);\n --bv-button-bg-hover: color-mix(in srgb, var(--bv-color-primary) 82%, black);\n --bv-button-color: var(--bv-color-neutral-0);\n --bv-button-border-color: var(--bv-color-primary);\n\n display: inline-flex;\n position: relative;\n font-family: var(--bv-font-family-base);\n}\n\n:host([hidden]) {\n display: none;\n}\n\n/* \u2500\u2500 Variants \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\n\n:host([variant='secondary']) {\n --bv-button-bg: var(--bv-color-secondary);\n --bv-button-bg-hover: color-mix(in srgb, var(--bv-color-secondary) 82%, black);\n --bv-button-color: var(--bv-color-neutral-0);\n --bv-button-border-color: var(--bv-color-secondary);\n}\n\n:host([variant='outline']) {\n --bv-button-bg: transparent;\n --bv-button-bg-hover: var(--bv-color-neutral-100);\n --bv-button-color: var(--bv-color-primary);\n --bv-button-border-color: var(--bv-color-primary);\n}\n\n:host([variant='outline-secondary']) {\n --bv-button-bg: transparent;\n --bv-button-bg-hover: var(--bv-color-neutral-100);\n --bv-button-color: var(--bv-color-neutral-700);\n --bv-button-border-color: var(--bv-color-neutral-300);\n}\n\n/* \u2500\u2500 Wrap \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\n\n.wrap {\n display: flex;\n align-items: stretch;\n width: 100%;\n}\n\n/* \u2500\u2500 Main button \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\n\n.main-btn {\n flex: 1;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n padding: 0 var(--bv-spacing-md);\n min-height: 44px;\n background: var(--bv-button-bg);\n color: var(--bv-button-color);\n border: none;\n border-radius: var(--bv-radius-lg) 0 0 var(--bv-radius-lg);\n font-family: inherit;\n font-size: var(--bv-font-size-sm);\n font-weight: var(--bv-font-weight-semibold);\n cursor: pointer;\n white-space: nowrap;\n transition: background var(--bv-transition-fast);\n}\n\n.main-btn:hover:not(:disabled) {\n background: var(--bv-button-bg-hover);\n}\n\n/* \u2500\u2500 Divider \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\n\n.divider {\n width: 1px;\n background: var(--bv-button-color);\n opacity: 0.25;\n flex-shrink: 0;\n}\n\n/* \u2500\u2500 Toggle button \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\n\n.toggle-btn {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: 36px;\n flex-shrink: 0;\n background: var(--bv-button-bg);\n color: var(--bv-button-color);\n border: none;\n border-radius: 0 var(--bv-radius-lg) var(--bv-radius-lg) 0;\n cursor: pointer;\n transition: background var(--bv-transition-fast);\n}\n\n.toggle-btn:hover:not(:disabled) {\n background: var(--bv-button-bg-hover);\n}\n\n.main-btn:disabled,\n.toggle-btn:disabled {\n opacity: 0.5;\n cursor: not-allowed;\n}\n\n/* \u2500\u2500 Panel \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\n\n.panel {\n display: none;\n position: absolute;\n top: calc(100% + 4px);\n right: 0;\n min-width: 220px;\n background: var(--bv-color-neutral-0);\n border: 1px solid var(--bv-color-neutral-200);\n border-radius: var(--bv-radius-lg);\n box-shadow: var(--bv-shadow-md);\n z-index: 200;\n padding: var(--bv-spacing-xs) 0;\n}\n\n:host([open]) .panel {\n display: block;\n}\n\n/* \u2500\u2500 Option \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\n\n.option {\n display: flex;\n align-items: center;\n gap: var(--bv-spacing-sm);\n width: 100%;\n padding: var(--bv-spacing-sm) var(--bv-spacing-md);\n background: transparent;\n border: none;\n text-align: left;\n cursor: pointer;\n font-family: inherit;\n transition: background var(--bv-transition-fast);\n}\n\n.option:hover {\n background: var(--bv-color-neutral-100);\n}\n\n.option-icon {\n display: flex;\n align-items: center;\n justify-content: center;\n color: var(--bv-color-neutral-600);\n flex-shrink: 0;\n}\n\n.option-content {\n display: flex;\n flex-direction: column;\n gap: 2px;\n}\n\n.option-label {\n font-size: var(--bv-font-size-sm);\n font-weight: var(--bv-font-weight-semibold);\n color: var(--bv-color-neutral-700);\n line-height: 1.4;\n}\n\n.option-desc {\n font-size: var(--bv-font-size-xs);\n color: var(--bv-color-neutral-500);\n line-height: 1.4;\n}\n";
3
+
4
+ // components/bv-icon/icons.ts
5
+ var icons = {
6
+ // Navigation
7
+ "chevron-up": `<path d="M18 15l-6-6-6 6"/>`,
8
+ "chevron-down": `<path d="M6 9l6 6 6-6"/>`,
9
+ "chevron-left": `<path d="M15 18l-6-6 6-6"/>`,
10
+ "chevron-right": `<path d="M9 18l6-6-6-6"/>`,
11
+ "arrow-left": `<path d="M19 12H5M12 19l-7-7 7-7"/>`,
12
+ "arrow-right": `<path d="M5 12h14M12 5l7 7-7 7"/>`,
13
+ "external-link": `<path d="M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"/><polyline points="15,3 21,3 21,9"/><line x1="10" y1="14" x2="21" y2="3"/>`,
14
+ // Actions
15
+ search: `<circle cx="11" cy="11" r="8"/><line x1="21" y1="21" x2="16.65" y2="16.65"/>`,
16
+ edit: `<path d="M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7"/><path d="M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z"/>`,
17
+ download: `<path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"/><polyline points="7,10 12,15 17,10"/><line x1="12" y1="15" x2="12" y2="3"/>`,
18
+ upload: `<path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"/><polyline points="17,8 12,3 7,8"/><line x1="12" y1="3" x2="12" y2="15"/>`,
19
+ plus: `<line x1="12" y1="5" x2="12" y2="19"/><line x1="5" y1="12" x2="19" y2="12"/>`,
20
+ minus: `<line x1="5" y1="12" x2="19" y2="12"/>`,
21
+ x: `<line x1="18" y1="6" x2="6" y2="18"/><line x1="6" y1="6" x2="18" y2="18"/>`,
22
+ check: `<polyline points="20,6 9,17 4,12"/>`,
23
+ trash: `<polyline points="3,6 5,6 21,6"/><path d="M19 6l-1 14a2 2 0 0 1-2 2H8a2 2 0 0 1-2-2L5 6"/><path d="M10 11v6M14 11v6"/><path d="M9 6V4a1 1 0 0 1 1-1h4a1 1 0 0 1 1 1v2"/>`,
24
+ copy: `<rect x="9" y="9" width="13" height="13" rx="2" ry="2"/><path d="M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"/>`,
25
+ refresh: `<polyline points="23,4 23,10 17,10"/><polyline points="1,20 1,14 7,14"/><path d="M3.51 9a9 9 0 0 1 14.85-3.36L23 10M1 14l4.64 4.36A9 9 0 0 0 20.49 15"/>`,
26
+ filter: `<polygon points="22,3 2,3 10,12.46 10,19 14,21 14,12.46 22,3"/>`,
27
+ // Layout
28
+ list: `<line x1="8" y1="6" x2="21" y2="6"/><line x1="8" y1="12" x2="21" y2="12"/><line x1="8" y1="18" x2="21" y2="18"/><line x1="3" y1="6" x2="3.01" y2="6"/><line x1="3" y1="12" x2="3.01" y2="12"/><line x1="3" y1="18" x2="3.01" y2="18"/>`,
29
+ grid: `<rect x="3" y="3" width="7" height="7"/><rect x="14" y="3" width="7" height="7"/><rect x="14" y="14" width="7" height="7"/><rect x="3" y="14" width="7" height="7"/>`,
30
+ // User / profile
31
+ user: `<path d="M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2"/><circle cx="12" cy="7" r="4"/>`,
32
+ users: `<path d="M17 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2"/><circle cx="9" cy="7" r="4"/><path d="M23 21v-2a4 4 0 0 0-3-3.87"/><path d="M16 3.13a4 4 0 0 1 0 7.75"/>`,
33
+ "user-pen": `<path d="M11.5 15H7a4 4 0 0 0-4 4v2"/><path d="M21.378 16.626a1 1 0 0 0-3.004-3.004l-4.01 4.012a2 2 0 0 0-.506.854l-.837 2.87a.5.5 0 0 0 .62.62l2.87-.837a2 2 0 0 0 .854-.506z"/><circle cx="10" cy="7" r="4"/>`,
34
+ // Content
35
+ star: `<polygon points="12,2 15.09,8.26 22,9.27 17,14.14 18.18,21.02 12,17.77 5.82,21.02 7,14.14 2,9.27 8.91,8.26 12,2"/>`,
36
+ eye: `<path d="M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z"/><circle cx="12" cy="12" r="3"/>`,
37
+ "eye-off": `<path d="M17.94 17.94A10.07 10.07 0 0 1 12 20c-7 0-11-8-11-8a18.45 18.45 0 0 1 5.06-5.94M9.9 4.24A9.12 9.12 0 0 1 12 4c7 0 11 8 11 8a18.5 18.5 0 0 1-2.16 3.19m-6.72-1.07a3 3 0 1 1-4.24-4.24"/><line x1="1" y1="1" x2="23" y2="23"/>`,
38
+ bookmark: `<path d="M19 21l-7-5-7 5V5a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2z"/>`,
39
+ tag: `<path d="M20.59 13.41l-7.17 7.17a2 2 0 0 1-2.83 0L2 12V2h10l8.59 8.59a2 2 0 0 1 0 2.82z"/><line x1="7" y1="7" x2="7.01" y2="7"/>`,
40
+ // Status / feedback
41
+ info: `<circle cx="12" cy="12" r="10"/><line x1="12" y1="8" x2="12" y2="12"/><line x1="12" y1="16" x2="12.01" y2="16"/>`,
42
+ "alert-triangle": `<path d="M10.29 3.86L1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0z"/><line x1="12" y1="9" x2="12" y2="13"/><line x1="12" y1="17" x2="12.01" y2="17"/>`,
43
+ "check-circle": `<path d="M22 11.08V12a10 10 0 1 1-5.93-9.14"/><polyline points="22,4 12,14.01 9,11.01"/>`,
44
+ "x-circle": `<circle cx="12" cy="12" r="10"/><line x1="15" y1="9" x2="9" y2="15"/><line x1="9" y1="9" x2="15" y2="15"/>`,
45
+ // Files / media
46
+ file: `<path d="M13 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V9z"/><polyline points="13,2 13,9 20,9"/>`,
47
+ image: `<rect x="3" y="3" width="18" height="18" rx="2" ry="2"/><circle cx="8.5" cy="8.5" r="1.5"/><polyline points="21,15 16,10 5,21"/>`,
48
+ video: `<polygon points="23,7 16,12 23,17 23,7"/><rect x="1" y="5" width="15" height="14" rx="2" ry="2"/>`,
49
+ // Settings
50
+ settings: `<circle cx="12" cy="12" r="3"/><path d="M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 0 1-2.83 2.83l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-4 0v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 0 1-2.83-2.83l.06-.06A1.65 1.65 0 0 0 4.68 15a1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1 0-4h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 0 1 2.83-2.83l.06.06A1.65 1.65 0 0 0 9 4.68a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 4 0v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 0 1 2.83 2.83l-.06.06A1.65 1.65 0 0 0 19.4 9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 0 4h-.09a1.65 1.65 0 0 0-1.51 1z"/>`,
51
+ lock: `<rect x="3" y="11" width="18" height="11" rx="2" ry="2"/><path d="M7 11V7a5 5 0 0 1 10 0v4"/>`,
52
+ unlock: `<rect x="3" y="11" width="18" height="11" rx="2" ry="2"/><path d="M7 11V7a5 5 0 0 1 9.9-1"/>`,
53
+ bell: `<path d="M18 8A6 6 0 0 0 6 8c0 7-3 9-3 9h18s-3-2-3-9"/><path d="M13.73 21a2 2 0 0 1-3.46 0"/>`,
54
+ mail: `<path d="M4 4h16c1.1 0 2 .9 2 2v12c0 1.1-.9 2-2 2H4c-1.1 0-2-.9-2-2V6c0-1.1.9-2 2-2z"/><polyline points="22,6 12,13 2,6"/>`,
55
+ link: `<path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"/><path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"/>`
56
+ };
57
+ function getIconSvg(name, size = 16) {
58
+ const raw = rawIcons[name];
59
+ if (raw)
60
+ return raw.replace(/width="[^"]*"/, `width="${size}"`).replace(/height="[^"]*"/, `height="${size}"`);
61
+ const paths = icons[name];
62
+ if (!paths) return "";
63
+ return `<svg xmlns="http://www.w3.org/2000/svg" width="${size}" height="${size}" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">${paths}</svg>`;
64
+ }
65
+ var rawIcons = {
66
+ // Module type (small, ~18px)
67
+ "module-scorm": `<svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 15.03 16.28" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M13.9014 4.60034L7.51368 8.14201M7.51368 8.14201L1.126 4.60034M7.51368 8.14201L7.5137 15.267M14.2771 11.1859V5.09812C14.2771 4.84113 14.2771 4.71264 14.2392 4.59804C14.2056 4.49666 14.1508 4.4036 14.0783 4.32508C13.9963 4.23633 13.8838 4.17393 13.6587 4.04913L8.09763 0.965793C7.88451 0.847624 7.77794 0.78854 7.66509 0.765376C7.56521 0.744875 7.46219 0.744875 7.36231 0.765376C7.24946 0.78854 7.1429 0.847624 6.92977 0.965793L1.36873 4.04913C1.14364 4.17393 1.0311 4.23633 0.949147 4.32508C0.876647 4.4036 0.82178 4.49666 0.788217 4.59804C0.750278 4.71264 0.750278 4.84113 0.750278 5.09812V11.1859C0.750278 11.4429 0.750278 11.5714 0.788217 11.686C0.82178 11.7874 0.876647 11.8805 0.949147 11.959C1.0311 12.0477 1.14364 12.1101 1.36873 12.2349L6.92977 15.3183C7.1429 15.4364 7.24946 15.4955 7.36231 15.5187C7.46219 15.5392 7.56521 15.5392 7.66509 15.5187C7.77794 15.4955 7.88451 15.4364 8.09763 15.3183L13.6587 12.2349C13.8838 12.1101 13.9963 12.0477 14.0783 11.959C14.1508 11.8805 14.2056 11.7874 14.2392 11.686C14.2771 11.5714 14.2771 11.4429 14.2771 11.1859Z"/></svg>`,
68
+ "module-assessment": `<svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 13.72 16.13" fill="none" stroke="currentColor" stroke-width="1.125" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M12.507 6.1875V4.1625C12.507 2.90238 12.507 2.27232 12.2629 1.79102C12.0482 1.36766 11.7056 1.02345 11.2841 0.807736C10.8051 0.5625 10.1779 0.5625 8.92364 0.5625H4.14585C2.89156 0.5625 2.26441 0.5625 1.78534 0.807736C1.36393 1.02345 1.02132 1.36766 0.806601 1.79102C0.5625 2.27232 0.5625 2.90238 0.5625 4.1625V11.9625C0.5625 13.2226 0.5625 13.8527 0.806601 14.334C1.02132 14.7573 1.36393 15.1015 1.78534 15.3173C2.26441 15.5625 2.89156 15.5625 4.14585 15.5625H8.0278M8.0278 7.3125H3.54862M5.04168 10.3125H3.54862M9.52086 4.3125H3.54862M9.89413 10.3142C10.0257 9.93852 10.2853 9.62175 10.627 9.41998C10.9688 9.21821 11.3705 9.14445 11.7612 9.21178C12.1519 9.2791 12.5062 9.48315 12.7615 9.7878C13.0168 10.0925 13.1565 10.478 13.1559 10.8763C13.1559 12.0004 11.4775 12.5625 11.4775 12.5625M11.4991 14.8125H11.5066"/></svg>`,
69
+ "module-survey": `<svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 14.56 11.63" fill="none" stroke="currentColor" stroke-width="1.125" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M14 5.8125L5.04168 5.8125M14 1.3125L5.04168 1.3125M14 10.3125L5.04168 10.3125M2.05556 5.8125C2.05556 6.22671 1.72133 6.5625 1.30903 6.5625C0.896733 6.5625 0.5625 6.22671 0.5625 5.8125C0.5625 5.39829 0.896733 5.0625 1.30903 5.0625C1.72133 5.0625 2.05556 5.39829 2.05556 5.8125ZM2.05556 1.3125C2.05556 1.72671 1.72133 2.0625 1.30903 2.0625C0.896733 2.0625 0.5625 1.72671 0.5625 1.3125C0.5625 0.898286 0.896733 0.5625 1.30903 0.5625C1.72133 0.5625 2.05556 0.898286 2.05556 1.3125ZM2.05556 10.3125C2.05556 10.7267 1.72133 11.0625 1.30903 11.0625C0.896733 11.0625 0.5625 10.7267 0.5625 10.3125C0.5625 9.89829 0.896733 9.5625 1.30903 9.5625C1.72133 9.5625 2.05556 9.89829 2.05556 10.3125Z"/></svg>`,
70
+ "module-download": `<svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 16.06 14.63" fill="none" stroke="currentColor" stroke-width="1.125" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M8.77433 3.56259L7.94155 1.88928C7.70187 1.40769 7.58202 1.16689 7.40323 0.990961C7.24512 0.835387 7.05457 0.717069 6.84535 0.644571C6.60877 0.562589 6.3408 0.562589 5.80485 0.562589H2.9514C2.1152 0.562589 1.69711 0.562589 1.37773 0.726079C1.09679 0.869889 0.868379 1.09936 0.725234 1.3816C0.562501 1.70247 0.562501 2.12251 0.562501 2.96259V3.56259M0.562501 3.56259H11.9098C13.164 3.56259 13.7912 3.56259 14.2703 3.80782C14.6917 4.02354 15.0343 4.36775 15.249 4.79111C15.4931 5.27241 15.4931 5.90247 15.4931 7.16259V10.4626C15.4931 11.7227 15.4931 12.3528 15.249 12.8341C15.0343 13.2574 14.6917 13.6016 14.2703 13.8174C13.7912 14.0626 13.164 14.0626 11.9098 14.0626H4.14585C2.89156 14.0626 2.26441 14.0626 1.78534 13.8174C1.36393 13.6016 1.02132 13.2574 0.806601 12.8341C0.562501 12.3528 0.562501 11.7227 0.562501 10.4626V3.56259ZM10.2674 8.81259L8.0278 11.0626L5.78821 8.81259M8.0278 11.0626V6.56259"/></svg>`,
71
+ "module-link": `<svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 15.97 16.03" fill="none" stroke="currentColor" stroke-width="1.125" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M6.49261 8.76267C6.81321 9.19327 7.22223 9.54956 7.69194 9.80737C8.16166 10.0652 8.68106 10.2185 9.21494 10.2569C9.74882 10.2953 10.2847 10.2179 10.7862 10.03C11.2876 9.84207 11.743 9.54797 12.1214 9.16767L14.361 6.91767C15.041 6.21041 15.4172 5.26315 15.4087 4.27991C15.4002 3.29668 15.0076 2.35613 14.3156 1.66085C13.6235 0.965569 12.6873 0.571186 11.7086 0.562642C10.7299 0.554098 9.78705 0.932077 9.08307 1.61517L7.79903 2.89767M9.47873 7.26267C9.15813 6.83207 8.7491 6.47578 8.27939 6.21796C7.80968 5.96015 7.29027 5.80683 6.75639 5.76842C6.22252 5.73001 5.68666 5.80739 5.18517 5.99533C4.68369 6.18327 4.2283 6.47737 3.84989 6.85767L1.6103 9.10767C0.930367 9.81493 0.554137 10.7622 0.562641 11.7454C0.571146 12.7287 0.963705 13.6692 1.65577 14.3645C2.34783 15.0598 3.28403 15.4542 4.26272 15.4627C5.24141 15.4712 6.18428 15.0933 6.88827 14.4102L8.16483 13.1277"/></svg>`,
72
+ "module-adobe-connect": `<svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 16.06 14.63" fill="none" stroke="currentColor" stroke-width="1.125" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M11.7605 0.56252L8.0278 3.56252L4.29515 0.56252M4.14585 14.0625H11.9098C13.164 14.0625 13.7912 14.0625 14.2703 13.8173C14.6917 13.6016 15.0343 13.2574 15.249 12.834C15.4931 12.3527 15.4931 11.7226 15.4931 10.4625V7.16252C15.4931 5.9024 15.4931 5.27234 15.249 4.79104C15.0343 4.36768 14.6917 4.02347 14.2703 3.80776C13.7912 3.56252 13.164 3.56252 11.9098 3.56252H4.14585C2.89156 3.56252 2.26441 3.56252 1.78534 3.80776C1.36393 4.02347 1.02132 4.36768 0.806601 4.79104C0.5625 5.27234 0.5625 5.9024 0.5625 7.16252V10.4625C0.5625 11.7226 0.5625 12.3527 0.806601 12.834C1.02132 13.2574 1.36393 13.6016 1.78534 13.8173C2.26441 14.0625 2.89156 14.0625 4.14585 14.0625Z"/></svg>`,
73
+ "module-video": `<svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 16.06 11.63" fill="none" stroke="currentColor" stroke-width="1.125" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M15.4931 3.51103C15.4931 3.05667 15.4931 2.82949 15.4037 2.72429C15.3261 2.63301 15.2097 2.58457 15.0906 2.59399C14.9533 2.60484 14.7934 2.76548 14.4736 3.08676L11.7605 5.8125L14.4736 8.53824C14.7934 8.85952 14.9533 9.02016 15.0906 9.03101C15.2097 9.04043 15.3261 8.99199 15.4037 8.90071C15.4931 8.79552 15.4931 8.56833 15.4931 8.11397V3.51103ZM0.5625 4.1625C0.5625 2.90238 0.5625 2.27232 0.806601 1.79102C1.02132 1.36766 1.36393 1.02345 1.78534 0.807736C2.26441 0.5625 2.89156 0.5625 4.14585 0.5625H8.17711C9.4314 0.5625 10.0585 0.5625 10.5376 0.807736C10.959 1.02345 11.3016 1.36766 11.5164 1.79102C11.7605 2.27232 11.7605 2.90238 11.7605 4.1625V7.4625C11.7605 8.72262 11.7605 9.35268 11.5164 9.83398C11.3016 10.2573 10.959 10.6015 10.5376 10.8173C10.0585 11.0625 9.4314 11.0625 8.17711 11.0625H4.14584C2.89156 11.0625 2.26441 11.0625 1.78534 10.8173C1.36393 10.6015 1.02132 10.2573 0.806601 9.83398C0.5625 9.35268 0.5625 8.72262 0.5625 7.4625V4.1625Z"/></svg>`,
74
+ "module-upload": `<svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 14.75 16.13" fill="none" stroke="currentColor" stroke-width="1.125" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M13.39 4.3125V4.1625C13.39 2.90238 13.39 2.27232 13.1278 1.79102C12.8972 1.36766 12.5293 1.02345 12.0767 0.807736C11.5622 0.5625 10.8887 0.5625 9.54172 0.5625H4.41074C3.06373 0.5625 2.39022 0.5625 1.87573 0.807736C1.42318 1.02345 1.05524 1.36766 0.824646 1.79102C0.5625 2.27232 0.5625 2.90238 0.5625 4.1625V11.9625C0.5625 13.2226 0.5625 13.8527 0.824646 14.334C1.05524 14.7573 1.42318 15.1015 1.87573 15.3173C2.39022 15.5625 3.06373 15.5625 4.41074 15.5625H7.37709M7.37709 7.3125H3.76936M6.57537 10.3125H3.76936M10.1831 4.3125H3.76936M11.7865 12.5625V8.4375C11.7865 7.81618 12.3249 7.3125 12.9891 7.3125C13.6533 7.3125 14.1917 7.81618 14.1917 8.4375V12.5625C14.1917 13.8051 13.1149 14.8125 11.7865 14.8125C10.4582 14.8125 9.38138 13.8051 9.38138 12.5625V9.5625"/></svg>`
75
+ };
76
+
77
+ // components/bv-split-button/bv-split-button.ts
78
+ var CHEVRON_DOWN = `<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><polyline points="6 9 12 15 18 9"/></svg>`;
79
+ var _sheet = null;
80
+ function getSheet() {
81
+ if (!_sheet) {
82
+ _sheet = new CSSStyleSheet();
83
+ _sheet.replaceSync(bv_split_button_default);
84
+ }
85
+ return _sheet;
86
+ }
87
+ var BvSplitButton = class extends HTMLElement {
88
+ static observedAttributes = ["label", "variant", "disabled", "options", "open"];
89
+ _rendered = false;
90
+ _mainBtn = null;
91
+ _toggleBtn = null;
92
+ _labelEl = null;
93
+ _panelEl = null;
94
+ _offClick = null;
95
+ constructor() {
96
+ super();
97
+ const shadow = this.attachShadow({ mode: "open" });
98
+ if ("adoptedStyleSheets" in ShadowRoot.prototype) {
99
+ shadow.adoptedStyleSheets = [getSheet()];
100
+ }
101
+ }
102
+ get label() {
103
+ return this.getAttribute("label") ?? "";
104
+ }
105
+ set label(v) {
106
+ this.setAttribute("label", v);
107
+ }
108
+ get variant() {
109
+ return this.getAttribute("variant") ?? "primary";
110
+ }
111
+ set variant(v) {
112
+ this.setAttribute("variant", v);
113
+ }
114
+ get disabled() {
115
+ return this.hasAttribute("disabled");
116
+ }
117
+ set disabled(v) {
118
+ if (v) this.setAttribute("disabled", "");
119
+ else this.removeAttribute("disabled");
120
+ }
121
+ get options() {
122
+ try {
123
+ return JSON.parse(this.getAttribute("options") ?? "[]");
124
+ } catch {
125
+ return [];
126
+ }
127
+ }
128
+ set options(v) {
129
+ this.setAttribute("options", JSON.stringify(v));
130
+ }
131
+ connectedCallback() {
132
+ this._render();
133
+ }
134
+ disconnectedCallback() {
135
+ if (this._offClick) document.removeEventListener("click", this._offClick);
136
+ }
137
+ attributeChangedCallback(name, _old, _val) {
138
+ if (!this._rendered) return;
139
+ if (name === "label" && this._labelEl) this._labelEl.textContent = this.label;
140
+ if (name === "options") this._syncPanel();
141
+ if (name === "disabled") this._syncDisabled();
142
+ }
143
+ _render() {
144
+ if (this._rendered) return;
145
+ this._rendered = true;
146
+ const shadow = this.shadowRoot;
147
+ if (!shadow.adoptedStyleSheets.length) {
148
+ const s = document.createElement("style");
149
+ s.textContent = bv_split_button_default;
150
+ shadow.appendChild(s);
151
+ }
152
+ const wrap = document.createElement("div");
153
+ wrap.className = "wrap";
154
+ const mainBtn = document.createElement("button");
155
+ mainBtn.type = "button";
156
+ mainBtn.className = "main-btn";
157
+ mainBtn.setAttribute("part", "main");
158
+ mainBtn.addEventListener("click", () => {
159
+ if (!this.disabled) {
160
+ this.dispatchEvent(new CustomEvent("bv-click", { bubbles: true, composed: true }));
161
+ }
162
+ });
163
+ this._mainBtn = mainBtn;
164
+ const labelEl = document.createElement("span");
165
+ labelEl.textContent = this.label;
166
+ this._labelEl = labelEl;
167
+ mainBtn.appendChild(labelEl);
168
+ const divider = document.createElement("span");
169
+ divider.className = "divider";
170
+ divider.setAttribute("aria-hidden", "true");
171
+ const toggleBtn = document.createElement("button");
172
+ toggleBtn.type = "button";
173
+ toggleBtn.className = "toggle-btn";
174
+ toggleBtn.setAttribute("aria-haspopup", "menu");
175
+ toggleBtn.setAttribute("aria-expanded", "false");
176
+ toggleBtn.setAttribute("aria-label", "More options");
177
+ toggleBtn.innerHTML = CHEVRON_DOWN;
178
+ toggleBtn.addEventListener("click", (e) => {
179
+ e.stopPropagation();
180
+ if (!this.disabled) this._toggle();
181
+ });
182
+ this._toggleBtn = toggleBtn;
183
+ wrap.append(mainBtn, divider, toggleBtn);
184
+ const panel = document.createElement("div");
185
+ panel.className = "panel";
186
+ panel.setAttribute("role", "menu");
187
+ this._panelEl = panel;
188
+ shadow.append(wrap, panel);
189
+ this._syncDisabled();
190
+ this._syncPanel();
191
+ this._offClick = (e) => {
192
+ if (!this.contains(e.target) && !shadow.contains(e.target)) {
193
+ this._close();
194
+ }
195
+ };
196
+ document.addEventListener("click", this._offClick);
197
+ }
198
+ _toggle() {
199
+ if (this.hasAttribute("open")) this._close();
200
+ else this._open();
201
+ }
202
+ _open() {
203
+ var _a;
204
+ this.setAttribute("open", "");
205
+ (_a = this._toggleBtn) == null ? void 0 : _a.setAttribute("aria-expanded", "true");
206
+ this.dispatchEvent(new CustomEvent("bv-open", { bubbles: true, composed: true }));
207
+ }
208
+ _close() {
209
+ var _a;
210
+ this.removeAttribute("open");
211
+ (_a = this._toggleBtn) == null ? void 0 : _a.setAttribute("aria-expanded", "false");
212
+ }
213
+ _syncDisabled() {
214
+ const d = this.disabled;
215
+ if (this._mainBtn) this._mainBtn.disabled = d;
216
+ if (this._toggleBtn) this._toggleBtn.disabled = d;
217
+ }
218
+ _syncPanel() {
219
+ if (!this._panelEl) return;
220
+ this._panelEl.innerHTML = "";
221
+ for (const opt of this.options) {
222
+ const btn = document.createElement("button");
223
+ btn.type = "button";
224
+ btn.className = "option";
225
+ btn.setAttribute("role", "menuitem");
226
+ if (opt.icon) {
227
+ const iconEl = document.createElement("span");
228
+ iconEl.className = "option-icon";
229
+ iconEl.innerHTML = getIconSvg(opt.icon, 18);
230
+ btn.appendChild(iconEl);
231
+ }
232
+ const content = document.createElement("span");
233
+ content.className = "option-content";
234
+ const optLabel = document.createElement("span");
235
+ optLabel.className = "option-label";
236
+ optLabel.textContent = opt.label;
237
+ content.appendChild(optLabel);
238
+ if (opt.description) {
239
+ const descEl = document.createElement("span");
240
+ descEl.className = "option-desc";
241
+ descEl.textContent = opt.description;
242
+ content.appendChild(descEl);
243
+ }
244
+ btn.appendChild(content);
245
+ btn.addEventListener("click", () => {
246
+ this._close();
247
+ this.dispatchEvent(
248
+ new CustomEvent("bv-option-select", {
249
+ bubbles: true,
250
+ composed: true,
251
+ detail: { value: opt.value }
252
+ })
253
+ );
254
+ });
255
+ this._panelEl.appendChild(btn);
256
+ }
257
+ }
258
+ };
259
+ if (!customElements.get("bv-split-button")) {
260
+ customElements.define("bv-split-button", BvSplitButton);
261
+ }
262
+ export {
263
+ BvSplitButton
264
+ };
@@ -1,5 +1,20 @@
1
+ import '../bv-tooltip/bv-tooltip.ts';
1
2
  export declare class BvTable extends HTMLElement {
2
3
  static readonly observedAttributes: string[];
4
+ private _isDragging;
5
+ private _dragStartX;
6
+ private _dragScrollLeft;
7
+ private _boundMouseDown;
8
+ private _boundMouseMove;
9
+ private _boundMouseUp;
3
10
  connectedCallback(): void;
11
+ disconnectedCallback(): void;
12
+ private _setupDrag;
13
+ private _teardownDrag;
14
+ private _enhanceBodyCells;
15
+ private _onMouseDown;
16
+ private _onMouseMove;
17
+ private _onMouseUp;
18
+ private _isOverText;
4
19
  private _enhanceHeaders;
5
20
  }