@sebgroup/green-core 3.32.1 → 3.32.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.
- package/components/checkbox/checkbox.component.d.ts +1 -0
- package/components/checkbox/checkbox.component.js +6 -0
- package/components/switch/switch.component.d.ts +1 -0
- package/components/switch/switch.component.js +7 -0
- package/custom-elements.json +7323 -7323
- package/gds-element.js +1 -1
- package/generated/mcp/components.json +1 -1
- package/generated/mcp/icons.json +1 -1
- package/generated/mcp/index.json +1 -1
- package/generated/mcp/tokens.json +1 -1
- package/generated/react/index.d.ts +3 -3
- package/generated/react/index.js +3 -3
- package/package.json +1 -1
- package/tokens/variables.dark.css.js +1 -1
- package/utils/helpers/custom-element-scoping.js +1 -1
|
@@ -35,6 +35,7 @@ export declare class GdsCheckbox extends GdsFormControlElement {
|
|
|
35
35
|
set value(value: string);
|
|
36
36
|
private _elCheckbox;
|
|
37
37
|
private _handleIndeterminateChange;
|
|
38
|
+
private _handleCheckedChange;
|
|
38
39
|
focus(options?: FocusOptions): void;
|
|
39
40
|
render(): any;
|
|
40
41
|
protected _getValidityAnchor(): HTMLElement;
|
|
@@ -55,6 +55,9 @@ let GdsCheckbox = class extends GdsFormControlElement {
|
|
|
55
55
|
this.checked = false;
|
|
56
56
|
}
|
|
57
57
|
}
|
|
58
|
+
_handleCheckedChange() {
|
|
59
|
+
__privateMethod(this, _GdsCheckbox_instances, syncFormValue_fn).call(this);
|
|
60
|
+
}
|
|
58
61
|
focus(options) {
|
|
59
62
|
this._elCheckbox.focus(options);
|
|
60
63
|
}
|
|
@@ -158,6 +161,9 @@ __decorateClass([
|
|
|
158
161
|
__decorateClass([
|
|
159
162
|
watch("indeterminate")
|
|
160
163
|
], GdsCheckbox.prototype, "_handleIndeterminateChange", 1);
|
|
164
|
+
__decorateClass([
|
|
165
|
+
watch("checked")
|
|
166
|
+
], GdsCheckbox.prototype, "_handleCheckedChange", 1);
|
|
161
167
|
GdsCheckbox = __decorateClass([
|
|
162
168
|
gdsCustomElement("gds-checkbox", {
|
|
163
169
|
dependsOn: [GdsToggleControlBase, IconCheckmark, IconMinusSmall]
|
|
@@ -26,6 +26,7 @@ declare class Switch extends GdsFormControlElement<string> {
|
|
|
26
26
|
*/
|
|
27
27
|
get value(): string;
|
|
28
28
|
set value(val: string);
|
|
29
|
+
private _handleCheckedChange;
|
|
29
30
|
protected _getValidityAnchor(): HTMLElement;
|
|
30
31
|
protected formResetCallback(): void;
|
|
31
32
|
focus(options?: FocusOptions): void;
|
|
@@ -11,6 +11,7 @@ import { ifDefined } from "lit/directives/if-defined.js";
|
|
|
11
11
|
import { gdsCustomElement, html } from "../../scoping.js";
|
|
12
12
|
import { ariaForwarding } from "../../utils/decorators/aria-forwarding.js";
|
|
13
13
|
import { styleExpressionProperty } from "../../utils/decorators/style-expression-property.js";
|
|
14
|
+
import { watch } from "../../utils/decorators/watch.js";
|
|
14
15
|
import {
|
|
15
16
|
withLayoutChildProps,
|
|
16
17
|
withMarginProps,
|
|
@@ -55,6 +56,9 @@ let Switch = class extends GdsFormControlElement {
|
|
|
55
56
|
set value(val) {
|
|
56
57
|
this._internalValue = val;
|
|
57
58
|
}
|
|
59
|
+
_handleCheckedChange() {
|
|
60
|
+
__privateMethod(this, _Switch_instances, syncFormValue_fn).call(this);
|
|
61
|
+
}
|
|
58
62
|
_getValidityAnchor() {
|
|
59
63
|
return this._input;
|
|
60
64
|
}
|
|
@@ -176,6 +180,9 @@ __decorateClass([
|
|
|
176
180
|
__decorateClass([
|
|
177
181
|
query(".perimeter")
|
|
178
182
|
], Switch.prototype, "_perimeter", 2);
|
|
183
|
+
__decorateClass([
|
|
184
|
+
watch("checked")
|
|
185
|
+
], Switch.prototype, "_handleCheckedChange", 1);
|
|
179
186
|
Switch = __decorateClass([
|
|
180
187
|
ariaForwarding({
|
|
181
188
|
labelledBy: "#switch-input",
|