@kerkhoff-ict/solora 2.5.0 → 2.5.2
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 +0 -36
- package/dist/index.js +56 -0
- 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 {
|
package/dist/index.js
CHANGED
|
@@ -1918,6 +1918,61 @@ function initDropdowns() {
|
|
|
1918
1918
|
});
|
|
1919
1919
|
}
|
|
1920
1920
|
|
|
1921
|
+
// src/components/input.js
|
|
1922
|
+
function initInput() {
|
|
1923
|
+
const inputs = document.querySelectorAll(".sol-input");
|
|
1924
|
+
inputs.forEach((input) => {
|
|
1925
|
+
const form = input.closest("form");
|
|
1926
|
+
if (form && !form.noValidate) {
|
|
1927
|
+
form.noValidate = true;
|
|
1928
|
+
}
|
|
1929
|
+
let errorDisplay = input.parentNode.querySelector(".sol-error-message");
|
|
1930
|
+
if (!errorDisplay) {
|
|
1931
|
+
errorDisplay = document.createElement("span");
|
|
1932
|
+
errorDisplay.className = "sol-error-message";
|
|
1933
|
+
input.parentNode.appendChild(errorDisplay);
|
|
1934
|
+
}
|
|
1935
|
+
input.addEventListener("invalid", (e) => {
|
|
1936
|
+
e.preventDefault();
|
|
1937
|
+
updateValidationState(input, errorDisplay);
|
|
1938
|
+
});
|
|
1939
|
+
input.addEventListener("input", () => {
|
|
1940
|
+
if (input.validity.valid) {
|
|
1941
|
+
clearError(input, errorDisplay);
|
|
1942
|
+
}
|
|
1943
|
+
});
|
|
1944
|
+
input.addEventListener("blur", () => {
|
|
1945
|
+
updateValidationState(input, errorDisplay);
|
|
1946
|
+
});
|
|
1947
|
+
});
|
|
1948
|
+
}
|
|
1949
|
+
function updateValidationState(input, errorDisplay) {
|
|
1950
|
+
if (input.validity.valid) {
|
|
1951
|
+
clearError(input, errorDisplay);
|
|
1952
|
+
return;
|
|
1953
|
+
}
|
|
1954
|
+
let message = "Ongeldige invoer";
|
|
1955
|
+
if (input.validity.valueMissing) {
|
|
1956
|
+
message = "Dit veld is verplicht";
|
|
1957
|
+
} else if (input.validity.typeMismatch) {
|
|
1958
|
+
if (input.type === "email") message = "Voer een geldig e-mailadres in";
|
|
1959
|
+
if (input.type === "url") message = "Voer een geldige link in";
|
|
1960
|
+
} else if (input.validity.tooShort) {
|
|
1961
|
+
message = `Minimaal ${input.minLength} tekens nodig`;
|
|
1962
|
+
} else if (input.validity.rangeUnderflow) {
|
|
1963
|
+
message = `Minimum waarde is ${input.min}`;
|
|
1964
|
+
} else if (input.validity.patternMismatch) {
|
|
1965
|
+
message = "De opmaak is onjuist";
|
|
1966
|
+
}
|
|
1967
|
+
errorDisplay.textContent = message;
|
|
1968
|
+
errorDisplay.style.display = "block";
|
|
1969
|
+
input.classList.add("is-invalid");
|
|
1970
|
+
}
|
|
1971
|
+
function clearError(input, errorDisplay) {
|
|
1972
|
+
errorDisplay.style.display = "none";
|
|
1973
|
+
input.classList.remove("is-invalid");
|
|
1974
|
+
}
|
|
1975
|
+
|
|
1921
1976
|
// src/components/contextMenu.js
|
|
1922
1977
|
function initContextMenu() {
|
|
1923
1978
|
let menu = document.querySelector(".sol-context-menu");
|
|
@@ -2296,6 +2351,7 @@ function safeInitAll() {
|
|
|
2296
2351
|
try {
|
|
2297
2352
|
initCodeblocks();
|
|
2298
2353
|
initDropdowns();
|
|
2354
|
+
initInput();
|
|
2299
2355
|
initContextMenu();
|
|
2300
2356
|
initThemeToggle();
|
|
2301
2357
|
initPopovers();
|