@itenthusiasm/custom-elements 1.0.2 → 1.0.3
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.
|
@@ -40,6 +40,7 @@ class CheckboxGroup extends HTMLElement {
|
|
|
40
40
|
*/
|
|
41
41
|
attributeChangedCallback(_name, _oldValue, _newValue) {
|
|
42
42
|
// NOTE: If we're only watching constraint-related attributes, then we only need to re-run validation here.
|
|
43
|
+
if (!this.fieldset) return; // eslint-disable-line @typescript-eslint/no-unnecessary-condition -- Check needed here.
|
|
43
44
|
this.#validateConstraints();
|
|
44
45
|
}
|
|
45
46
|
|
|
@@ -30,8 +30,10 @@ declare module "preact" {
|
|
|
30
30
|
}
|
|
31
31
|
|
|
32
32
|
// eslint-disable-next-line @typescript-eslint/no-empty-object-type -- This is required to support ComboboxField props
|
|
33
|
-
interface SelectHTMLAttributes<T extends EventTarget = HTMLSelectElement>
|
|
34
|
-
|
|
33
|
+
interface SelectHTMLAttributes<T extends EventTarget = HTMLSelectElement> extends Omit<
|
|
34
|
+
ComboboxFieldHTMLAttributes<T>,
|
|
35
|
+
"onfilterchange"
|
|
36
|
+
> {}
|
|
35
37
|
|
|
36
38
|
interface ComboboxOptionHTMLAttributes<T extends EventTarget = ComboboxOption> extends HTMLAttributes<T> {
|
|
37
39
|
defaultSelected?: Signalish<ComboboxOption["defaultSelected"] | undefined>;
|
|
@@ -22,8 +22,10 @@ declare module "react" {
|
|
|
22
22
|
onfilterchangeCapture?: ReactEventHandler<T>;
|
|
23
23
|
}
|
|
24
24
|
|
|
25
|
-
interface SelectHTMLAttributes<T>
|
|
26
|
-
|
|
25
|
+
interface SelectHTMLAttributes<T> extends Omit<
|
|
26
|
+
ComboboxFieldHTMLAttributes<T>,
|
|
27
|
+
"filter" | "onfilterchange" | "onfilterchangeCapture"
|
|
28
|
+
> {
|
|
27
29
|
filter?: "";
|
|
28
30
|
}
|
|
29
31
|
|
|
@@ -37,8 +37,10 @@ declare module "solid-js" {
|
|
|
37
37
|
}
|
|
38
38
|
|
|
39
39
|
// eslint-disable-next-line @typescript-eslint/no-empty-object-type -- This is required to support ComboboxField props
|
|
40
|
-
interface SelectHTMLAttributes<T>
|
|
41
|
-
|
|
40
|
+
interface SelectHTMLAttributes<T> extends Omit<
|
|
41
|
+
ComboboxFieldHTMLAttributes<T>,
|
|
42
|
+
"onFilterchange" | "onfilterchange" | "on:filterchange"
|
|
43
|
+
> {}
|
|
42
44
|
|
|
43
45
|
interface ComboboxOptionHTMLAttributes<T> extends HTMLAttributes<T> {
|
|
44
46
|
disabled?: ComboboxOption["disabled"];
|
|
@@ -31,8 +31,10 @@ declare module "svelte/elements" {
|
|
|
31
31
|
}
|
|
32
32
|
|
|
33
33
|
// eslint-disable-next-line @typescript-eslint/no-empty-object-type -- This is required to support ComboboxField attrs
|
|
34
|
-
interface HTMLSelectAttributes
|
|
35
|
-
|
|
34
|
+
interface HTMLSelectAttributes extends Omit<
|
|
35
|
+
HTMLComboboxFieldAttributes<HTMLSelectElement>,
|
|
36
|
+
"onfilterchange" | "on:filterchange"
|
|
37
|
+
> {}
|
|
36
38
|
|
|
37
39
|
interface HTMLComboboxOptionAttributes extends HTMLAttributes<ComboboxOption> {
|
|
38
40
|
defaultSelected?: ComboboxOption["defaultSelected"] | null;
|
package/package.json
CHANGED
package/types/helpers.d.ts
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
// NOTE: For some reason, TS complains in the JS files if we export a `type`, so we're exporting `interface`s instead.
|
|
2
2
|
/* eslint @typescript-eslint/no-empty-object-type: ["error", { "allowInterfaces": "with-single-extends" }] */
|
|
3
|
-
export interface ExposedInternals
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
> {}
|
|
3
|
+
export interface ExposedInternals extends Pick<
|
|
4
|
+
ElementInternals,
|
|
5
|
+
"labels" | "form" | "validity" | "validationMessage" | "willValidate" | "checkValidity" | "reportValidity"
|
|
6
|
+
> {}
|
|
8
7
|
|
|
9
|
-
export interface FieldPropertiesAndMethods
|
|
10
|
-
|
|
8
|
+
export interface FieldPropertiesAndMethods extends Pick<
|
|
9
|
+
HTMLInputElement,
|
|
10
|
+
"name" | "required" | "disabled" | "setCustomValidity"
|
|
11
|
+
> {}
|
|
11
12
|
|
|
12
13
|
export interface FieldMinMax extends Pick<HTMLInputElement, "min" | "max"> {}
|