@kerkhoff-ict/solora 2.1.10 → 2.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.css +33 -135
- package/dist/index.js +63 -73
- package/package.json +1 -1
package/dist/index.css
CHANGED
|
@@ -175,42 +175,6 @@
|
|
|
175
175
|
box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4), inset 0 0 0 1px rgba(255, 255, 255, 0.1);
|
|
176
176
|
}
|
|
177
177
|
}
|
|
178
|
-
flux\\:button {
|
|
179
|
-
all: unset;
|
|
180
|
-
display: inline-flex;
|
|
181
|
-
align-items: center;
|
|
182
|
-
justify-content: center;
|
|
183
|
-
font-weight: 600;
|
|
184
|
-
border-radius: 9999px;
|
|
185
|
-
padding: 0.5rem 1rem;
|
|
186
|
-
cursor: pointer;
|
|
187
|
-
transition: all 0.2s ease;
|
|
188
|
-
background: var(--color-primary, #0071e3);
|
|
189
|
-
color: var(--color-text-light, #fff);
|
|
190
|
-
}
|
|
191
|
-
flux\\:button:hover {
|
|
192
|
-
filter: brightness(0.85);
|
|
193
|
-
}
|
|
194
|
-
flux\\:button.btn-secondary {
|
|
195
|
-
background: var(--color-secondary, #f5f5f5);
|
|
196
|
-
color: var(--color-text-dark, #000);
|
|
197
|
-
border: 2px solid rgba(0, 0, 0, 0.1);
|
|
198
|
-
}
|
|
199
|
-
flux\\:input {
|
|
200
|
-
all: unset;
|
|
201
|
-
width: 100%;
|
|
202
|
-
padding: 0.3rem 0.4rem;
|
|
203
|
-
border-radius: 12px;
|
|
204
|
-
border: 1px solid rgba(0, 0, 0, 0.1);
|
|
205
|
-
background: var(--color-bg, #fefefe);
|
|
206
|
-
color: var(--color-text-dark, #000);
|
|
207
|
-
box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.05), 0 2px 8px rgba(0, 0, 0, 0.05);
|
|
208
|
-
transition: all 0.2s cubic-bezier(0.25, 0.8, 0.25, 1);
|
|
209
|
-
}
|
|
210
|
-
flux\\:input:focus {
|
|
211
|
-
border-color: var(--color-primary, #0071e3);
|
|
212
|
-
box-shadow: 0 0 0 4px var(--color-focus-glow, rgba(0, 113, 227, 0.15));
|
|
213
|
-
}
|
|
214
178
|
|
|
215
179
|
/* src/components/codeblock.css */
|
|
216
180
|
.codeblock {
|
|
@@ -465,8 +429,8 @@ flux\\:input:focus {
|
|
|
465
429
|
}
|
|
466
430
|
}
|
|
467
431
|
|
|
468
|
-
/* src/components/dropdown.css */
|
|
469
|
-
.
|
|
432
|
+
/* src/components/dropdown-style.css */
|
|
433
|
+
.sol-container {
|
|
470
434
|
position: relative;
|
|
471
435
|
display: inline-block;
|
|
472
436
|
font-family:
|
|
@@ -474,147 +438,81 @@ flux\\:input:focus {
|
|
|
474
438
|
BlinkMacSystemFont,
|
|
475
439
|
"Segoe UI",
|
|
476
440
|
Roboto,
|
|
477
|
-
Helvetica,
|
|
478
|
-
Arial,
|
|
479
441
|
sans-serif;
|
|
480
442
|
cursor: pointer;
|
|
481
443
|
user-select: none;
|
|
482
444
|
}
|
|
483
|
-
.
|
|
484
|
-
padding: 0.
|
|
445
|
+
.sol-btn {
|
|
446
|
+
padding: 0.5rem 0.8rem;
|
|
485
447
|
border-radius: 12px;
|
|
486
448
|
border: 1px solid rgba(0, 0, 0, 0.1);
|
|
487
449
|
background: var(--color-bg, #fefefe);
|
|
488
450
|
color: var(--color-text-dark, #000);
|
|
489
|
-
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.
|
|
451
|
+
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
|
|
490
452
|
transition: all 0.2s ease;
|
|
491
453
|
display: flex;
|
|
492
454
|
align-items: center;
|
|
493
455
|
justify-content: space-between;
|
|
494
|
-
|
|
495
|
-
overflow: hidden;
|
|
496
|
-
text-overflow: ellipsis;
|
|
456
|
+
gap: 10px;
|
|
497
457
|
}
|
|
498
|
-
.
|
|
499
|
-
background:
|
|
458
|
+
.sol-btn:hover {
|
|
459
|
+
background: rgba(0, 0, 0, 0.03);
|
|
500
460
|
}
|
|
501
|
-
.
|
|
461
|
+
.sol-btn::after {
|
|
502
462
|
content: "\25be";
|
|
503
|
-
|
|
504
|
-
font-size: 0.75rem;
|
|
463
|
+
font-size: 0.8rem;
|
|
505
464
|
transition: transform 0.2s ease;
|
|
506
465
|
}
|
|
507
|
-
.
|
|
466
|
+
.sol-container.open .sol-btn::after {
|
|
508
467
|
transform: rotate(180deg);
|
|
509
468
|
}
|
|
510
|
-
.
|
|
469
|
+
.sol-menu {
|
|
511
470
|
position: absolute;
|
|
512
471
|
top: 100%;
|
|
513
472
|
left: 0;
|
|
514
|
-
width: 100%;
|
|
515
|
-
min-width: 10rem;
|
|
516
|
-
border-radius: 12px;
|
|
473
|
+
min-width: 100%;
|
|
517
474
|
margin-top: 0.5rem;
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
background: transparent;
|
|
475
|
+
border-radius: 12px;
|
|
476
|
+
background: rgba(255, 255, 255, 0.7);
|
|
521
477
|
border: 1px solid rgba(255, 255, 255, 0.3);
|
|
522
478
|
backdrop-filter: blur(12px);
|
|
523
479
|
-webkit-backdrop-filter: blur(12px);
|
|
524
480
|
box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12);
|
|
525
|
-
|
|
526
|
-
scrollbar-width: thin;
|
|
527
|
-
scrollbar-color: rgba(0, 0, 0, 0.2) transparent;
|
|
481
|
+
z-index: 1000;
|
|
528
482
|
opacity: 0;
|
|
529
483
|
transform: translateY(-10px) scale(0.95);
|
|
530
484
|
pointer-events: none;
|
|
531
485
|
transition: all 0.25s cubic-bezier(0.25, 0.8, 0.25, 1);
|
|
532
|
-
|
|
533
|
-
}
|
|
534
|
-
.dropdown-content::-webkit-scrollbar {
|
|
535
|
-
width: 6px;
|
|
536
|
-
}
|
|
537
|
-
.dropdown-content::-webkit-scrollbar-thumb {
|
|
538
|
-
background: rgba(0, 0, 0, 0.2);
|
|
539
|
-
border-radius: 3px;
|
|
540
|
-
}
|
|
541
|
-
.dropdown-content::-webkit-scrollbar-track {
|
|
542
|
-
background: transparent;
|
|
486
|
+
overflow: hidden;
|
|
543
487
|
}
|
|
544
|
-
.
|
|
488
|
+
.sol-container.open .sol-menu {
|
|
545
489
|
opacity: 1;
|
|
546
490
|
transform: translateY(0) scale(1);
|
|
547
491
|
pointer-events: auto;
|
|
548
492
|
}
|
|
549
|
-
.
|
|
550
|
-
padding: 0.
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
cursor: pointer;
|
|
493
|
+
.sol-item {
|
|
494
|
+
padding: 0.6rem 0.8rem;
|
|
495
|
+
transition: background 0.2s;
|
|
496
|
+
color: #000;
|
|
554
497
|
}
|
|
555
|
-
.
|
|
498
|
+
.sol-item:hover {
|
|
556
499
|
background: rgba(0, 0, 0, 0.05);
|
|
557
500
|
}
|
|
558
|
-
.
|
|
559
|
-
|
|
560
|
-
background: rgba(0, 0, 0, 0.1);
|
|
561
|
-
}
|
|
562
|
-
.dropdown-item[aria-disabled=true],
|
|
563
|
-
.dropdown-item.placeholder {
|
|
564
|
-
color: rgba(0, 0, 0, 0.4);
|
|
565
|
-
cursor: default;
|
|
566
|
-
pointer-events: none;
|
|
567
|
-
}
|
|
568
|
-
.dropdown input[type=hidden] {
|
|
569
|
-
display: none;
|
|
570
|
-
}
|
|
571
|
-
.dropdown-divider {
|
|
572
|
-
height: 1px;
|
|
573
|
-
margin: 0.25rem 0;
|
|
574
|
-
background: rgba(0, 0, 0, 0.1);
|
|
575
|
-
}
|
|
576
|
-
.dropdown-label {
|
|
577
|
-
padding: 0.3rem 0.4rem;
|
|
501
|
+
.sol-item.active {
|
|
502
|
+
background: rgba(0, 0, 0, 0.08);
|
|
578
503
|
font-weight: 600;
|
|
579
|
-
color: rgba(0, 0, 0, 0.6);
|
|
580
|
-
cursor: default;
|
|
581
504
|
}
|
|
582
|
-
:root.dark .
|
|
505
|
+
:root.dark .sol-btn {
|
|
583
506
|
background: #1c1c1e;
|
|
584
|
-
color: #
|
|
585
|
-
border:
|
|
586
|
-
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
|
|
587
|
-
}
|
|
588
|
-
:root.dark .dropdown-btn:hover {
|
|
589
|
-
background: rgba(255, 255, 255, 0.05);
|
|
590
|
-
}
|
|
591
|
-
:root.dark .dropdown-content {
|
|
592
|
-
background: transparent;
|
|
593
|
-
backdrop-filter: blur(12px);
|
|
594
|
-
-webkit-backdrop-filter: blur(12px);
|
|
595
|
-
box-shadow: 0 12px 32px rgba(0, 0, 0, 0.6);
|
|
596
|
-
}
|
|
597
|
-
:root.dark .dropdown-item {
|
|
598
|
-
color: #f0f0f0;
|
|
599
|
-
}
|
|
600
|
-
:root.dark .dropdown-item:hover {
|
|
601
|
-
background: rgba(255, 255, 255, 0.08);
|
|
602
|
-
}
|
|
603
|
-
:root.dark .dropdown-item.active {
|
|
604
|
-
background: rgba(255, 255, 255, 0.12);
|
|
605
|
-
}
|
|
606
|
-
:root.dark .dropdown-divider {
|
|
607
|
-
background: rgba(255, 255, 255, 0.2);
|
|
608
|
-
}
|
|
609
|
-
:root.dark .dropdown-item[aria-disabled=true],
|
|
610
|
-
:root.dark .dropdown-item.placeholder {
|
|
611
|
-
color: rgba(255, 255, 255, 0.4);
|
|
507
|
+
color: #fff;
|
|
508
|
+
border-color: rgba(255, 255, 255, 0.1);
|
|
612
509
|
}
|
|
613
|
-
:root.dark .
|
|
614
|
-
|
|
510
|
+
:root.dark .sol-menu {
|
|
511
|
+
background: rgba(28, 28, 30, 0.7);
|
|
512
|
+
color: #fff;
|
|
615
513
|
}
|
|
616
|
-
:root.dark .
|
|
617
|
-
|
|
514
|
+
:root.dark .sol-item {
|
|
515
|
+
color: #fff;
|
|
618
516
|
}
|
|
619
517
|
|
|
620
518
|
/* src/components/input.css */
|
package/dist/index.js
CHANGED
|
@@ -1847,77 +1847,6 @@ function initMaximizeButton(block, maximizeBtn) {
|
|
|
1847
1847
|
});
|
|
1848
1848
|
}
|
|
1849
1849
|
|
|
1850
|
-
// src/components/dropdown.js
|
|
1851
|
-
function initDropdowns() {
|
|
1852
|
-
if (typeof window === "undefined") return;
|
|
1853
|
-
document.querySelectorAll(".dropdown").forEach((drop) => {
|
|
1854
|
-
if (drop.dataset.initialized) return;
|
|
1855
|
-
drop.dataset.initialized = "true";
|
|
1856
|
-
const btn = drop.querySelector(".dropdown-btn");
|
|
1857
|
-
const content = drop.querySelector(".dropdown-content");
|
|
1858
|
-
if (!btn || !content) return;
|
|
1859
|
-
let hiddenInput = drop.querySelector('input[type="hidden"]');
|
|
1860
|
-
if (!hiddenInput) {
|
|
1861
|
-
hiddenInput = document.createElement("input");
|
|
1862
|
-
hiddenInput.type = "hidden";
|
|
1863
|
-
hiddenInput.name = drop.dataset.name || "dropdown";
|
|
1864
|
-
drop.appendChild(hiddenInput);
|
|
1865
|
-
}
|
|
1866
|
-
const getItems = () => Array.from(content.querySelectorAll('.dropdown-item:not([aria-disabled="true"])'));
|
|
1867
|
-
const setValue = (item) => {
|
|
1868
|
-
if (item.getAttribute("aria-disabled") === "true") return;
|
|
1869
|
-
btn.innerHTML = item.innerHTML;
|
|
1870
|
-
content.querySelectorAll(".dropdown-item").forEach((i) => i.classList.remove("active"));
|
|
1871
|
-
item.classList.add("active");
|
|
1872
|
-
hiddenInput.value = item.dataset.value ?? item.textContent.trim();
|
|
1873
|
-
drop.dispatchEvent(new CustomEvent("change", { detail: hiddenInput.value }));
|
|
1874
|
-
};
|
|
1875
|
-
const initialItem = content.querySelector(".dropdown-item.active") || content.querySelector('.dropdown-item:not([aria-disabled="true"])');
|
|
1876
|
-
if (initialItem) setValue(initialItem);
|
|
1877
|
-
const toggle = () => drop.classList.toggle("open");
|
|
1878
|
-
const close = () => drop.classList.remove("open");
|
|
1879
|
-
btn.addEventListener("click", (e) => {
|
|
1880
|
-
e.stopPropagation();
|
|
1881
|
-
toggle();
|
|
1882
|
-
});
|
|
1883
|
-
document.addEventListener("click", (e) => {
|
|
1884
|
-
if (!drop.contains(e.target)) close();
|
|
1885
|
-
});
|
|
1886
|
-
btn.addEventListener("keydown", (e) => {
|
|
1887
|
-
if (!["ArrowDown", "ArrowUp", "Enter", "Escape"].includes(e.key)) return;
|
|
1888
|
-
const items = getItems();
|
|
1889
|
-
let currentIndex = items.findIndex((i) => i.classList.contains("active"));
|
|
1890
|
-
e.preventDefault();
|
|
1891
|
-
drop.classList.add("open");
|
|
1892
|
-
if (e.key === "ArrowDown") {
|
|
1893
|
-
currentIndex = (currentIndex + 1) % items.length;
|
|
1894
|
-
} else if (e.key === "ArrowUp") {
|
|
1895
|
-
currentIndex = (currentIndex - 1 + items.length) % items.length;
|
|
1896
|
-
} else if (e.key === "Enter") {
|
|
1897
|
-
if (currentIndex >= 0) setValue(items[currentIndex]);
|
|
1898
|
-
close();
|
|
1899
|
-
return;
|
|
1900
|
-
} else if (e.key === "Escape") {
|
|
1901
|
-
close();
|
|
1902
|
-
return;
|
|
1903
|
-
}
|
|
1904
|
-
items.forEach((i) => i.classList.remove("active"));
|
|
1905
|
-
items[currentIndex].classList.add("active");
|
|
1906
|
-
items[currentIndex].scrollIntoView({ block: "nearest" });
|
|
1907
|
-
});
|
|
1908
|
-
content.addEventListener("click", (e) => {
|
|
1909
|
-
const item = e.target.closest(".dropdown-item");
|
|
1910
|
-
if (item) {
|
|
1911
|
-
setValue(item);
|
|
1912
|
-
close();
|
|
1913
|
-
}
|
|
1914
|
-
});
|
|
1915
|
-
btn.setAttribute("tabindex", "0");
|
|
1916
|
-
btn.setAttribute("role", "combobox");
|
|
1917
|
-
btn.setAttribute("aria-haspopup", "listbox");
|
|
1918
|
-
});
|
|
1919
|
-
}
|
|
1920
|
-
|
|
1921
1850
|
// src/components/contextMenu.js
|
|
1922
1851
|
function initContextMenu() {
|
|
1923
1852
|
let menu = document.querySelector(".sol-context-menu");
|
|
@@ -2268,19 +2197,80 @@ function initThemeToggle(elementSelector = ".sol-theme-toggle") {
|
|
|
2268
2197
|
});
|
|
2269
2198
|
}
|
|
2270
2199
|
|
|
2200
|
+
// src/components/sol-core.js
|
|
2201
|
+
function initSolCore() {
|
|
2202
|
+
const elements = document.querySelectorAll('[class*="sol-dropdown-w-["]');
|
|
2203
|
+
elements.forEach((el) => {
|
|
2204
|
+
const classList = Array.from(el.classList);
|
|
2205
|
+
const widthClass = classList.find((c) => c.startsWith("sol-dropdown-w-["));
|
|
2206
|
+
if (widthClass) {
|
|
2207
|
+
const widthValue = widthClass.match(/\[(.*?)\]/)[1];
|
|
2208
|
+
el.style.width = widthValue;
|
|
2209
|
+
const btn = el.querySelector(".sol-btn");
|
|
2210
|
+
if (btn) btn.style.width = "100%";
|
|
2211
|
+
}
|
|
2212
|
+
});
|
|
2213
|
+
}
|
|
2214
|
+
|
|
2215
|
+
// src/components/sol-select.js
|
|
2216
|
+
function initSolSelect() {
|
|
2217
|
+
document.querySelectorAll(".sol-select").forEach((select) => {
|
|
2218
|
+
const btn = select.querySelector(".sol-btn");
|
|
2219
|
+
const items = select.querySelectorAll(".sol-item");
|
|
2220
|
+
const input = select.querySelector('input[type="hidden"]');
|
|
2221
|
+
btn.addEventListener("click", (e) => {
|
|
2222
|
+
e.stopPropagation();
|
|
2223
|
+
select.classList.toggle("open");
|
|
2224
|
+
});
|
|
2225
|
+
items.forEach((item) => {
|
|
2226
|
+
item.addEventListener("click", () => {
|
|
2227
|
+
const val = item.dataset.value || item.innerText;
|
|
2228
|
+
btn.innerText = item.innerText;
|
|
2229
|
+
if (input) input.value = val;
|
|
2230
|
+
items.forEach((i) => i.classList.remove("active"));
|
|
2231
|
+
item.classList.add("active");
|
|
2232
|
+
select.classList.remove("open");
|
|
2233
|
+
});
|
|
2234
|
+
});
|
|
2235
|
+
});
|
|
2236
|
+
}
|
|
2237
|
+
|
|
2238
|
+
// src/components/sol-dropdown.js
|
|
2239
|
+
function initSolDropdown() {
|
|
2240
|
+
document.querySelectorAll(".sol-dropdown").forEach((dropdown) => {
|
|
2241
|
+
const btn = dropdown.querySelector(".sol-btn");
|
|
2242
|
+
btn.addEventListener("click", (e) => {
|
|
2243
|
+
e.stopPropagation();
|
|
2244
|
+
dropdown.classList.toggle("open");
|
|
2245
|
+
});
|
|
2246
|
+
dropdown.querySelectorAll(".sol-item").forEach((item) => {
|
|
2247
|
+
item.addEventListener("click", () => {
|
|
2248
|
+
dropdown.classList.remove("open");
|
|
2249
|
+
});
|
|
2250
|
+
});
|
|
2251
|
+
});
|
|
2252
|
+
document.addEventListener("click", () => {
|
|
2253
|
+
document.querySelectorAll(".sol-container").forEach((el) => el.classList.remove("open"));
|
|
2254
|
+
});
|
|
2255
|
+
}
|
|
2256
|
+
|
|
2271
2257
|
// src/index.js
|
|
2272
2258
|
if (typeof window !== "undefined") {
|
|
2273
2259
|
document.addEventListener("DOMContentLoaded", () => {
|
|
2260
|
+
initSolCore();
|
|
2274
2261
|
initCodeblocks();
|
|
2275
|
-
initDropdowns();
|
|
2276
2262
|
initContextMenu();
|
|
2277
2263
|
initThemeToggle();
|
|
2264
|
+
initSolSelect();
|
|
2265
|
+
initSolDropdown();
|
|
2278
2266
|
});
|
|
2279
2267
|
}
|
|
2280
2268
|
export {
|
|
2281
2269
|
initCodeblocks,
|
|
2282
2270
|
initContextMenu,
|
|
2283
|
-
|
|
2271
|
+
initSolCore,
|
|
2272
|
+
initSolDropdown,
|
|
2273
|
+
initSolSelect,
|
|
2284
2274
|
initThemeToggle
|
|
2285
2275
|
};
|
|
2286
2276
|
/*! Bundled license information:
|