@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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@supersoniks/concorde",
3
- "version": "3.1.71",
3
+ "version": "3.1.73",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "main": "",
@@ -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
- .disabled=${ifDefined(this.disabled)}
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=${ifDefined(this.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=${ifDefined(this.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
- let contentRect = this.popContent?.getBoundingClientRect();
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;
@@ -43,12 +43,13 @@ class HTML {
43
43
  if (htmlNode.nodeType === 1) {
44
44
  const style = window.getComputedStyle(htmlNode);
45
45
  if (
46
- // (htmlNode.scrollHeight > htmlNode.clientHeight &&
47
- // (style?.overflowY === "auto" || style?.overflowY === "scroll")) ||
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
- for (let mutation of mutationsList) {
185
- if (mutation.type === 'attributes' && mutation.attributeName === 'lang') {
186
- handler();
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
- attributes: true, // Watch for attribute changes
194
- attributeFilter: ['lang'], // Only watch for changes to the lang attribute
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
+ };