@supersoniks/concorde 3.1.71 → 3.1.73
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/build-infos.json +1 -1
- package/concorde-core.bundle.js +214 -212
- package/concorde-core.es.js +540 -539
- package/dist/concorde-core.bundle.js +214 -212
- package/dist/concorde-core.es.js +540 -539
- package/package.json +1 -1
- package/src/core/components/ui/form/checkbox/checkbox.ts +1 -1
- package/src/core/components/ui/form/input/input.ts +1 -1
- package/src/core/components/ui/form/textarea/textarea.ts +1 -1
- package/src/core/components/ui/pop/pop.ts +6 -1
- package/src/core/utils/HTML.ts +12 -11
package/package.json
CHANGED
|
@@ -204,7 +204,7 @@ export class Checkbox extends FormCheckable(
|
|
|
204
204
|
@blur=${this.handleBlur}
|
|
205
205
|
?required=${this.required}
|
|
206
206
|
?data-indeterminate=${this.showAsIndeterminate}
|
|
207
|
-
|
|
207
|
+
?disabled=${this.disabled}
|
|
208
208
|
.checked=${ifDefined(this.checked)}
|
|
209
209
|
.name=${this.name}
|
|
210
210
|
.value=${this.value}
|
|
@@ -216,7 +216,7 @@ export class Input extends FormInput(FormElement(Subscriber(LitElement))) {
|
|
|
216
216
|
@input=${this.handleChange}
|
|
217
217
|
@blur=${this.handleBlur}
|
|
218
218
|
type=${this.type}
|
|
219
|
-
disabled=${
|
|
219
|
+
?disabled=${this.disabled}
|
|
220
220
|
?readonly=${this.readonly}
|
|
221
221
|
?autofocus=${this.autofocus}
|
|
222
222
|
list=${ifDefined(this.list)}
|
|
@@ -116,7 +116,7 @@ export class Textarea extends FormInput(FormElement(Subscriber(LitElement))) {
|
|
|
116
116
|
id="${this.id || "form-element"}"
|
|
117
117
|
@input=${this.handleChange}
|
|
118
118
|
@blur=${this.handleBlur}
|
|
119
|
-
disabled=${
|
|
119
|
+
?disabled=${this.disabled}
|
|
120
120
|
?required=${this.required}
|
|
121
121
|
?autofocus=${this.autofocus}
|
|
122
122
|
rows=${ifDefined(this.rows)}
|
|
@@ -125,6 +125,10 @@ export class Pop extends LitElement {
|
|
|
125
125
|
this.triggerElement.focus();
|
|
126
126
|
this.triggerElement = null;
|
|
127
127
|
}
|
|
128
|
+
Object.assign(this.popContent.style, {
|
|
129
|
+
left: `${this.lastContentX}px`,
|
|
130
|
+
top: `${this.lastContentY}px`,
|
|
131
|
+
});
|
|
128
132
|
this.dispatchEvent(new CustomEvent("hide"));
|
|
129
133
|
}
|
|
130
134
|
|
|
@@ -220,7 +224,7 @@ export class Pop extends LitElement {
|
|
|
220
224
|
const placementSplit = placement.split(" ");
|
|
221
225
|
const placementBase = placementSplit[0];
|
|
222
226
|
let placementSec = placementSplit[1];
|
|
223
|
-
|
|
227
|
+
|
|
224
228
|
const padding = 5;
|
|
225
229
|
const thisRect = this.getBoundingClientRect();
|
|
226
230
|
|
|
@@ -244,6 +248,7 @@ export class Pop extends LitElement {
|
|
|
244
248
|
const y0 = thisRect.top;
|
|
245
249
|
let x = x0,
|
|
246
250
|
y = y0;
|
|
251
|
+
let contentRect = this.popContent?.getBoundingClientRect();
|
|
247
252
|
const yTop = y0 - contentRect.height;
|
|
248
253
|
const xLeft = x0 - contentRect.width;
|
|
249
254
|
const xRight = x0 + thisRect.width;
|
package/src/core/utils/HTML.ts
CHANGED
|
@@ -43,12 +43,13 @@ class HTML {
|
|
|
43
43
|
if (htmlNode.nodeType === 1) {
|
|
44
44
|
const style = window.getComputedStyle(htmlNode);
|
|
45
45
|
if (
|
|
46
|
-
|
|
47
|
-
|
|
46
|
+
style?.overflowY === "auto" ||
|
|
47
|
+
style?.overflowY === "scroll" ||
|
|
48
48
|
style?.overflowY === "hidden" ||
|
|
49
|
+
style?.overflowX === "auto" ||
|
|
50
|
+
style?.overflowX === "scroll" ||
|
|
49
51
|
style?.overflowX === "hidden"
|
|
50
52
|
) {
|
|
51
|
-
|
|
52
53
|
return node;
|
|
53
54
|
}
|
|
54
55
|
}
|
|
@@ -175,25 +176,25 @@ class HTML {
|
|
|
175
176
|
}
|
|
176
177
|
}
|
|
177
178
|
export default HTML;
|
|
178
|
-
export const detecHTMLLanguageChange = (handler:()=>void) => {
|
|
179
|
+
export const detecHTMLLanguageChange = (handler: () => void) => {
|
|
179
180
|
// Select the <html> element
|
|
180
181
|
const htmlElement = document.documentElement;
|
|
181
182
|
|
|
182
183
|
// Create a new MutationObserver instance
|
|
183
184
|
const observer = new MutationObserver((mutationsList) => {
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
}
|
|
185
|
+
for (let mutation of mutationsList) {
|
|
186
|
+
if (mutation.type === "attributes" && mutation.attributeName === "lang") {
|
|
187
|
+
handler();
|
|
188
188
|
}
|
|
189
|
+
}
|
|
189
190
|
});
|
|
190
191
|
|
|
191
192
|
// Observer configuration: watch for changes to attributes
|
|
192
193
|
const config = {
|
|
193
|
-
|
|
194
|
-
|
|
194
|
+
attributes: true, // Watch for attribute changes
|
|
195
|
+
attributeFilter: ["lang"], // Only watch for changes to the lang attribute
|
|
195
196
|
};
|
|
196
197
|
|
|
197
198
|
// Start observing the <html> element for changes
|
|
198
199
|
observer.observe(htmlElement, config);
|
|
199
|
-
}
|
|
200
|
+
};
|