@lmvz-ds/components 0.20.0 → 0.21.0
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/CHANGELOG.md +6 -0
- package/cjs/lmvz-components.cjs.js +1 -1
- package/cjs/lmvz-toggle.cjs.entry.js +96 -0
- package/cjs/loader.cjs.js +1 -1
- package/collection/collection-manifest.json +1 -0
- package/collection/components/lmvz-toggle/lmvz-toggle.css +118 -0
- package/collection/components/lmvz-toggle/lmvz-toggle.js +358 -0
- package/collection/integration/header-integration/header-integration.js +1 -1
- package/components/index.d.ts +2 -0
- package/components/index.d.ts.bak +2 -0
- package/components/index.js +1 -1
- package/components/lmvz-toggle.d.ts +11 -0
- package/components/lmvz-toggle.d.ts.bak +11 -0
- package/components/lmvz-toggle.js +1 -0
- package/esm/lmvz-components.js +1 -1
- package/esm/lmvz-toggle.entry.js +94 -0
- package/esm/loader.js +1 -1
- package/hydrate/index.js +110 -0
- package/hydrate/index.mjs +110 -0
- package/lmvz-components/lmvz-components.esm.js +1 -1
- package/lmvz-components/p-c3b7890d.entry.js +1 -0
- package/manifest.json +348 -1
- package/package.json +5 -1
- package/types/components/lmvz-toggle/lmvz-toggle.d.ts +31 -0
- package/types/components.d.ts +119 -0
package/manifest.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"timestamp": "2026-05-
|
|
2
|
+
"timestamp": "2026-05-21T07:12:41",
|
|
3
3
|
"compiler": {
|
|
4
4
|
"name": "@stencil/core",
|
|
5
5
|
"version": "4.43.4",
|
|
@@ -5744,6 +5744,353 @@
|
|
|
5744
5744
|
"dependents": [],
|
|
5745
5745
|
"dependencies": [],
|
|
5746
5746
|
"dependencyGraph": {}
|
|
5747
|
+
},
|
|
5748
|
+
{
|
|
5749
|
+
"filePath": "src/components/lmvz-toggle/lmvz-toggle.tsx",
|
|
5750
|
+
"encapsulation": "scoped",
|
|
5751
|
+
"tag": "lmvz-toggle",
|
|
5752
|
+
"readme": "# lmvz-toggle\n\n\n",
|
|
5753
|
+
"docs": "Toggle (switch) component. Wraps a native `<input type=\"checkbox\" role=\"switch\">` for full keyboard and form support.",
|
|
5754
|
+
"docsTags": [
|
|
5755
|
+
{
|
|
5756
|
+
"name": "example",
|
|
5757
|
+
"text": "```html\n<lmvz-toggle label=\"Enable notifications\" name=\"notifications\" required></lmvz-toggle>\n```"
|
|
5758
|
+
}
|
|
5759
|
+
],
|
|
5760
|
+
"usage": {},
|
|
5761
|
+
"props": [
|
|
5762
|
+
{
|
|
5763
|
+
"name": "checked",
|
|
5764
|
+
"type": "boolean",
|
|
5765
|
+
"complexType": {
|
|
5766
|
+
"original": "boolean",
|
|
5767
|
+
"resolved": "boolean",
|
|
5768
|
+
"references": {}
|
|
5769
|
+
},
|
|
5770
|
+
"mutable": true,
|
|
5771
|
+
"attr": "checked",
|
|
5772
|
+
"reflectToAttr": true,
|
|
5773
|
+
"docs": "Whether the toggle is checked",
|
|
5774
|
+
"docsTags": [
|
|
5775
|
+
{
|
|
5776
|
+
"name": "default",
|
|
5777
|
+
"text": "false"
|
|
5778
|
+
}
|
|
5779
|
+
],
|
|
5780
|
+
"default": "false",
|
|
5781
|
+
"values": [
|
|
5782
|
+
{
|
|
5783
|
+
"type": "boolean"
|
|
5784
|
+
}
|
|
5785
|
+
],
|
|
5786
|
+
"optional": false,
|
|
5787
|
+
"required": false,
|
|
5788
|
+
"getter": false,
|
|
5789
|
+
"setter": false
|
|
5790
|
+
},
|
|
5791
|
+
{
|
|
5792
|
+
"name": "disabled",
|
|
5793
|
+
"type": "boolean",
|
|
5794
|
+
"complexType": {
|
|
5795
|
+
"original": "boolean",
|
|
5796
|
+
"resolved": "boolean",
|
|
5797
|
+
"references": {}
|
|
5798
|
+
},
|
|
5799
|
+
"mutable": false,
|
|
5800
|
+
"attr": "disabled",
|
|
5801
|
+
"reflectToAttr": true,
|
|
5802
|
+
"docs": "Whether the toggle is disabled",
|
|
5803
|
+
"docsTags": [
|
|
5804
|
+
{
|
|
5805
|
+
"name": "default",
|
|
5806
|
+
"text": "false"
|
|
5807
|
+
}
|
|
5808
|
+
],
|
|
5809
|
+
"default": "false",
|
|
5810
|
+
"values": [
|
|
5811
|
+
{
|
|
5812
|
+
"type": "boolean"
|
|
5813
|
+
}
|
|
5814
|
+
],
|
|
5815
|
+
"optional": false,
|
|
5816
|
+
"required": false,
|
|
5817
|
+
"getter": false,
|
|
5818
|
+
"setter": false
|
|
5819
|
+
},
|
|
5820
|
+
{
|
|
5821
|
+
"name": "form",
|
|
5822
|
+
"type": "string | undefined",
|
|
5823
|
+
"complexType": {
|
|
5824
|
+
"original": "string",
|
|
5825
|
+
"resolved": "string | undefined",
|
|
5826
|
+
"references": {}
|
|
5827
|
+
},
|
|
5828
|
+
"mutable": false,
|
|
5829
|
+
"attr": "form",
|
|
5830
|
+
"reflectToAttr": false,
|
|
5831
|
+
"docs": "Form id to associate with",
|
|
5832
|
+
"docsTags": [],
|
|
5833
|
+
"values": [
|
|
5834
|
+
{
|
|
5835
|
+
"type": "string"
|
|
5836
|
+
},
|
|
5837
|
+
{
|
|
5838
|
+
"type": "undefined"
|
|
5839
|
+
}
|
|
5840
|
+
],
|
|
5841
|
+
"optional": true,
|
|
5842
|
+
"required": false,
|
|
5843
|
+
"getter": false,
|
|
5844
|
+
"setter": false
|
|
5845
|
+
},
|
|
5846
|
+
{
|
|
5847
|
+
"name": "label",
|
|
5848
|
+
"type": "string",
|
|
5849
|
+
"complexType": {
|
|
5850
|
+
"original": "string",
|
|
5851
|
+
"resolved": "string",
|
|
5852
|
+
"references": {}
|
|
5853
|
+
},
|
|
5854
|
+
"mutable": false,
|
|
5855
|
+
"attr": "label",
|
|
5856
|
+
"reflectToAttr": false,
|
|
5857
|
+
"docs": "Label text for the toggle",
|
|
5858
|
+
"docsTags": [],
|
|
5859
|
+
"values": [
|
|
5860
|
+
{
|
|
5861
|
+
"type": "string"
|
|
5862
|
+
}
|
|
5863
|
+
],
|
|
5864
|
+
"optional": false,
|
|
5865
|
+
"required": true,
|
|
5866
|
+
"getter": false,
|
|
5867
|
+
"setter": false
|
|
5868
|
+
},
|
|
5869
|
+
{
|
|
5870
|
+
"name": "name",
|
|
5871
|
+
"type": "string | undefined",
|
|
5872
|
+
"complexType": {
|
|
5873
|
+
"original": "string",
|
|
5874
|
+
"resolved": "string | undefined",
|
|
5875
|
+
"references": {}
|
|
5876
|
+
},
|
|
5877
|
+
"mutable": false,
|
|
5878
|
+
"attr": "name",
|
|
5879
|
+
"reflectToAttr": false,
|
|
5880
|
+
"docs": "Name attribute for form integration",
|
|
5881
|
+
"docsTags": [],
|
|
5882
|
+
"values": [
|
|
5883
|
+
{
|
|
5884
|
+
"type": "string"
|
|
5885
|
+
},
|
|
5886
|
+
{
|
|
5887
|
+
"type": "undefined"
|
|
5888
|
+
}
|
|
5889
|
+
],
|
|
5890
|
+
"optional": true,
|
|
5891
|
+
"required": false,
|
|
5892
|
+
"getter": false,
|
|
5893
|
+
"setter": false
|
|
5894
|
+
},
|
|
5895
|
+
{
|
|
5896
|
+
"name": "required",
|
|
5897
|
+
"type": "boolean",
|
|
5898
|
+
"complexType": {
|
|
5899
|
+
"original": "boolean",
|
|
5900
|
+
"resolved": "boolean",
|
|
5901
|
+
"references": {}
|
|
5902
|
+
},
|
|
5903
|
+
"mutable": false,
|
|
5904
|
+
"attr": "required",
|
|
5905
|
+
"reflectToAttr": true,
|
|
5906
|
+
"docs": "Whether the toggle is required",
|
|
5907
|
+
"docsTags": [
|
|
5908
|
+
{
|
|
5909
|
+
"name": "default",
|
|
5910
|
+
"text": "false"
|
|
5911
|
+
}
|
|
5912
|
+
],
|
|
5913
|
+
"default": "false",
|
|
5914
|
+
"values": [
|
|
5915
|
+
{
|
|
5916
|
+
"type": "boolean"
|
|
5917
|
+
}
|
|
5918
|
+
],
|
|
5919
|
+
"optional": false,
|
|
5920
|
+
"required": false,
|
|
5921
|
+
"getter": false,
|
|
5922
|
+
"setter": false
|
|
5923
|
+
},
|
|
5924
|
+
{
|
|
5925
|
+
"name": "value",
|
|
5926
|
+
"type": "string",
|
|
5927
|
+
"complexType": {
|
|
5928
|
+
"original": "string",
|
|
5929
|
+
"resolved": "string",
|
|
5930
|
+
"references": {}
|
|
5931
|
+
},
|
|
5932
|
+
"mutable": false,
|
|
5933
|
+
"attr": "value",
|
|
5934
|
+
"reflectToAttr": false,
|
|
5935
|
+
"docs": "Value submitted with the form when checked",
|
|
5936
|
+
"docsTags": [
|
|
5937
|
+
{
|
|
5938
|
+
"name": "default",
|
|
5939
|
+
"text": "'on'"
|
|
5940
|
+
}
|
|
5941
|
+
],
|
|
5942
|
+
"default": "'on'",
|
|
5943
|
+
"values": [
|
|
5944
|
+
{
|
|
5945
|
+
"type": "string"
|
|
5946
|
+
}
|
|
5947
|
+
],
|
|
5948
|
+
"optional": false,
|
|
5949
|
+
"required": false,
|
|
5950
|
+
"getter": false,
|
|
5951
|
+
"setter": false
|
|
5952
|
+
}
|
|
5953
|
+
],
|
|
5954
|
+
"methods": [
|
|
5955
|
+
{
|
|
5956
|
+
"name": "blurToggle",
|
|
5957
|
+
"returns": {
|
|
5958
|
+
"type": "Promise<void>",
|
|
5959
|
+
"docs": ""
|
|
5960
|
+
},
|
|
5961
|
+
"complexType": {
|
|
5962
|
+
"signature": "() => Promise<void>",
|
|
5963
|
+
"parameters": [],
|
|
5964
|
+
"references": {
|
|
5965
|
+
"Promise": {
|
|
5966
|
+
"location": "global",
|
|
5967
|
+
"id": "global::Promise"
|
|
5968
|
+
}
|
|
5969
|
+
},
|
|
5970
|
+
"return": "Promise<void>"
|
|
5971
|
+
},
|
|
5972
|
+
"signature": "blurToggle() => Promise<void>",
|
|
5973
|
+
"parameters": [],
|
|
5974
|
+
"docs": "Removes focus from the toggle",
|
|
5975
|
+
"docsTags": []
|
|
5976
|
+
},
|
|
5977
|
+
{
|
|
5978
|
+
"name": "checkValidity",
|
|
5979
|
+
"returns": {
|
|
5980
|
+
"type": "Promise<boolean>",
|
|
5981
|
+
"docs": ""
|
|
5982
|
+
},
|
|
5983
|
+
"complexType": {
|
|
5984
|
+
"signature": "() => Promise<boolean>",
|
|
5985
|
+
"parameters": [],
|
|
5986
|
+
"references": {
|
|
5987
|
+
"Promise": {
|
|
5988
|
+
"location": "global",
|
|
5989
|
+
"id": "global::Promise"
|
|
5990
|
+
}
|
|
5991
|
+
},
|
|
5992
|
+
"return": "Promise<boolean>"
|
|
5993
|
+
},
|
|
5994
|
+
"signature": "checkValidity() => Promise<boolean>",
|
|
5995
|
+
"parameters": [],
|
|
5996
|
+
"docs": "Returns whether the toggle satisfies its validation constraints",
|
|
5997
|
+
"docsTags": []
|
|
5998
|
+
},
|
|
5999
|
+
{
|
|
6000
|
+
"name": "focusToggle",
|
|
6001
|
+
"returns": {
|
|
6002
|
+
"type": "Promise<void>",
|
|
6003
|
+
"docs": ""
|
|
6004
|
+
},
|
|
6005
|
+
"complexType": {
|
|
6006
|
+
"signature": "() => Promise<void>",
|
|
6007
|
+
"parameters": [],
|
|
6008
|
+
"references": {
|
|
6009
|
+
"Promise": {
|
|
6010
|
+
"location": "global",
|
|
6011
|
+
"id": "global::Promise"
|
|
6012
|
+
}
|
|
6013
|
+
},
|
|
6014
|
+
"return": "Promise<void>"
|
|
6015
|
+
},
|
|
6016
|
+
"signature": "focusToggle() => Promise<void>",
|
|
6017
|
+
"parameters": [],
|
|
6018
|
+
"docs": "Sets focus on the toggle",
|
|
6019
|
+
"docsTags": []
|
|
6020
|
+
},
|
|
6021
|
+
{
|
|
6022
|
+
"name": "getInputElement",
|
|
6023
|
+
"returns": {
|
|
6024
|
+
"type": "Promise<HTMLInputElement | undefined>",
|
|
6025
|
+
"docs": ""
|
|
6026
|
+
},
|
|
6027
|
+
"complexType": {
|
|
6028
|
+
"signature": "() => Promise<HTMLInputElement | undefined>",
|
|
6029
|
+
"parameters": [],
|
|
6030
|
+
"references": {
|
|
6031
|
+
"Promise": {
|
|
6032
|
+
"location": "global",
|
|
6033
|
+
"id": "global::Promise"
|
|
6034
|
+
},
|
|
6035
|
+
"HTMLInputElement": {
|
|
6036
|
+
"location": "global",
|
|
6037
|
+
"id": "global::HTMLInputElement"
|
|
6038
|
+
}
|
|
6039
|
+
},
|
|
6040
|
+
"return": "Promise<HTMLInputElement | undefined>"
|
|
6041
|
+
},
|
|
6042
|
+
"signature": "getInputElement() => Promise<HTMLInputElement | undefined>",
|
|
6043
|
+
"parameters": [],
|
|
6044
|
+
"docs": "Returns the native HTMLInputElement.\n\nPromise resolves when the element is ready and the input is available.",
|
|
6045
|
+
"docsTags": []
|
|
6046
|
+
},
|
|
6047
|
+
{
|
|
6048
|
+
"name": "reportValidity",
|
|
6049
|
+
"returns": {
|
|
6050
|
+
"type": "Promise<boolean>",
|
|
6051
|
+
"docs": ""
|
|
6052
|
+
},
|
|
6053
|
+
"complexType": {
|
|
6054
|
+
"signature": "() => Promise<boolean>",
|
|
6055
|
+
"parameters": [],
|
|
6056
|
+
"references": {
|
|
6057
|
+
"Promise": {
|
|
6058
|
+
"location": "global",
|
|
6059
|
+
"id": "global::Promise"
|
|
6060
|
+
}
|
|
6061
|
+
},
|
|
6062
|
+
"return": "Promise<boolean>"
|
|
6063
|
+
},
|
|
6064
|
+
"signature": "reportValidity() => Promise<boolean>",
|
|
6065
|
+
"parameters": [],
|
|
6066
|
+
"docs": "Reports validation errors to the user",
|
|
6067
|
+
"docsTags": []
|
|
6068
|
+
}
|
|
6069
|
+
],
|
|
6070
|
+
"events": [
|
|
6071
|
+
{
|
|
6072
|
+
"event": "lmvzChange",
|
|
6073
|
+
"detail": "boolean",
|
|
6074
|
+
"bubbles": true,
|
|
6075
|
+
"complexType": {
|
|
6076
|
+
"original": "boolean",
|
|
6077
|
+
"resolved": "boolean",
|
|
6078
|
+
"references": {}
|
|
6079
|
+
},
|
|
6080
|
+
"cancelable": true,
|
|
6081
|
+
"composed": true,
|
|
6082
|
+
"docs": "Emitted when the toggle is switched. Event detail is the new checked state.",
|
|
6083
|
+
"docsTags": []
|
|
6084
|
+
}
|
|
6085
|
+
],
|
|
6086
|
+
"listeners": [],
|
|
6087
|
+
"styles": [],
|
|
6088
|
+
"slots": [],
|
|
6089
|
+
"parts": [],
|
|
6090
|
+
"states": [],
|
|
6091
|
+
"dependents": [],
|
|
6092
|
+
"dependencies": [],
|
|
6093
|
+
"dependencyGraph": {}
|
|
5747
6094
|
}
|
|
5748
6095
|
],
|
|
5749
6096
|
"typeLibrary": {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lmvz-ds/components",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.21.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"description": "The components of the design system",
|
|
7
7
|
"author": "Patrick Nemenz <patrick.nemenz@adesso.at>",
|
|
@@ -71,6 +71,10 @@
|
|
|
71
71
|
"./lmvz-checkbox": {
|
|
72
72
|
"import": "./components/lmvz-checkbox.js",
|
|
73
73
|
"types": "./components/lmvz-checkbox.d.ts"
|
|
74
|
+
},
|
|
75
|
+
"./lmvz-toggle": {
|
|
76
|
+
"types": "./components/lmvz-toggle.d.ts",
|
|
77
|
+
"import": "./components/lmvz-toggle.js"
|
|
74
78
|
}
|
|
75
79
|
},
|
|
76
80
|
"main": "./index.cjs.js",
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { type EventEmitter } from '../../stencil-public-runtime';
|
|
2
|
+
import { type AriaValidationHost } from '../../utils/aria/aria-validation-controller';
|
|
3
|
+
import { ReactiveControllerHost } from '../../utils/reactive-controller-host';
|
|
4
|
+
export declare class LmvzToggle extends ReactiveControllerHost implements AriaValidationHost {
|
|
5
|
+
readonly el: HTMLElement;
|
|
6
|
+
get validationEl(): HTMLElement;
|
|
7
|
+
internals: ElementInternals;
|
|
8
|
+
private nativeInputElement?;
|
|
9
|
+
private toggleId;
|
|
10
|
+
lmvzChange: EventEmitter<boolean>;
|
|
11
|
+
label: string;
|
|
12
|
+
checked: boolean;
|
|
13
|
+
disabled: boolean;
|
|
14
|
+
required: boolean;
|
|
15
|
+
name?: string;
|
|
16
|
+
value: string;
|
|
17
|
+
form?: string;
|
|
18
|
+
constructor();
|
|
19
|
+
formAssociatedCallback(_form: HTMLFormElement | undefined): void;
|
|
20
|
+
formResetCallback(): void;
|
|
21
|
+
formStateRestoreCallback(state: string): void;
|
|
22
|
+
handleCheckedChange(checked: boolean): void;
|
|
23
|
+
handleDisabledChange(disabled: boolean): void;
|
|
24
|
+
focusToggle(): Promise<void>;
|
|
25
|
+
blurToggle(): Promise<void>;
|
|
26
|
+
checkValidity(): Promise<boolean>;
|
|
27
|
+
reportValidity(): Promise<boolean>;
|
|
28
|
+
getInputElement(): Promise<HTMLInputElement | undefined>;
|
|
29
|
+
private handleChange;
|
|
30
|
+
render(): any;
|
|
31
|
+
}
|
package/types/components.d.ts
CHANGED
|
@@ -407,6 +407,66 @@ export declare namespace Components {
|
|
|
407
407
|
*/
|
|
408
408
|
"value"?: string;
|
|
409
409
|
}
|
|
410
|
+
/**
|
|
411
|
+
* Toggle (switch) component. Wraps a native `<input type="checkbox" role="switch">` for full keyboard and form support.
|
|
412
|
+
* @example ```html
|
|
413
|
+
* <lmvz-toggle label="Enable notifications" name="notifications" required></lmvz-toggle>
|
|
414
|
+
* ```
|
|
415
|
+
*/
|
|
416
|
+
export interface LmvzToggle {
|
|
417
|
+
/**
|
|
418
|
+
* Removes focus from the toggle
|
|
419
|
+
*/
|
|
420
|
+
"blurToggle": () => Promise<void>;
|
|
421
|
+
/**
|
|
422
|
+
* Returns whether the toggle satisfies its validation constraints
|
|
423
|
+
*/
|
|
424
|
+
"checkValidity": () => Promise<boolean>;
|
|
425
|
+
/**
|
|
426
|
+
* Whether the toggle is checked
|
|
427
|
+
* @default false
|
|
428
|
+
*/
|
|
429
|
+
"checked": boolean;
|
|
430
|
+
/**
|
|
431
|
+
* Whether the toggle is disabled
|
|
432
|
+
* @default false
|
|
433
|
+
*/
|
|
434
|
+
"disabled": boolean;
|
|
435
|
+
/**
|
|
436
|
+
* Sets focus on the toggle
|
|
437
|
+
*/
|
|
438
|
+
"focusToggle": () => Promise<void>;
|
|
439
|
+
/**
|
|
440
|
+
* Form id to associate with
|
|
441
|
+
*/
|
|
442
|
+
"form"?: string;
|
|
443
|
+
/**
|
|
444
|
+
* Returns the native HTMLInputElement. Promise resolves when the element is ready and the input is available.
|
|
445
|
+
*/
|
|
446
|
+
"getInputElement": () => Promise<HTMLInputElement | undefined>;
|
|
447
|
+
/**
|
|
448
|
+
* Label text for the toggle
|
|
449
|
+
*/
|
|
450
|
+
"label": string;
|
|
451
|
+
/**
|
|
452
|
+
* Name attribute for form integration
|
|
453
|
+
*/
|
|
454
|
+
"name"?: string;
|
|
455
|
+
/**
|
|
456
|
+
* Reports validation errors to the user
|
|
457
|
+
*/
|
|
458
|
+
"reportValidity": () => Promise<boolean>;
|
|
459
|
+
/**
|
|
460
|
+
* Whether the toggle is required
|
|
461
|
+
* @default false
|
|
462
|
+
*/
|
|
463
|
+
"required": boolean;
|
|
464
|
+
/**
|
|
465
|
+
* Value submitted with the form when checked
|
|
466
|
+
* @default 'on'
|
|
467
|
+
*/
|
|
468
|
+
"value": string;
|
|
469
|
+
}
|
|
410
470
|
}
|
|
411
471
|
|
|
412
472
|
export declare type FormRef = string | HTMLFormElement | undefined;
|
|
@@ -809,6 +869,50 @@ export declare namespace JSX {
|
|
|
809
869
|
*/
|
|
810
870
|
"value"?: string;
|
|
811
871
|
}
|
|
872
|
+
/**
|
|
873
|
+
* Toggle (switch) component. Wraps a native `<input type="checkbox" role="switch">` for full keyboard and form support.
|
|
874
|
+
* @example ```html
|
|
875
|
+
* <lmvz-toggle label="Enable notifications" name="notifications" required></lmvz-toggle>
|
|
876
|
+
* ```
|
|
877
|
+
*/
|
|
878
|
+
export interface LmvzToggle {
|
|
879
|
+
/**
|
|
880
|
+
* Whether the toggle is checked
|
|
881
|
+
* @default false
|
|
882
|
+
*/
|
|
883
|
+
"checked"?: boolean;
|
|
884
|
+
/**
|
|
885
|
+
* Whether the toggle is disabled
|
|
886
|
+
* @default false
|
|
887
|
+
*/
|
|
888
|
+
"disabled"?: boolean;
|
|
889
|
+
/**
|
|
890
|
+
* Form id to associate with
|
|
891
|
+
*/
|
|
892
|
+
"form"?: string;
|
|
893
|
+
/**
|
|
894
|
+
* Label text for the toggle
|
|
895
|
+
*/
|
|
896
|
+
"label": string;
|
|
897
|
+
/**
|
|
898
|
+
* Name attribute for form integration
|
|
899
|
+
*/
|
|
900
|
+
"name"?: string;
|
|
901
|
+
/**
|
|
902
|
+
* Emitted when the toggle is switched. Event detail is the new checked state.
|
|
903
|
+
*/
|
|
904
|
+
"onLmvzChange"?: (event: LmvzToggleCustomEvent<boolean>) => void;
|
|
905
|
+
/**
|
|
906
|
+
* Whether the toggle is required
|
|
907
|
+
* @default false
|
|
908
|
+
*/
|
|
909
|
+
"required"?: boolean;
|
|
910
|
+
/**
|
|
911
|
+
* Value submitted with the form when checked
|
|
912
|
+
* @default 'on'
|
|
913
|
+
*/
|
|
914
|
+
"value"?: string;
|
|
915
|
+
}
|
|
812
916
|
|
|
813
917
|
export interface LmvzButtonAttributes {
|
|
814
918
|
"ti": number;
|
|
@@ -890,6 +994,15 @@ export declare namespace JSX {
|
|
|
890
994
|
"required": boolean;
|
|
891
995
|
"name": string;
|
|
892
996
|
}
|
|
997
|
+
export interface LmvzToggleAttributes {
|
|
998
|
+
"label": string;
|
|
999
|
+
"checked": boolean;
|
|
1000
|
+
"disabled": boolean;
|
|
1001
|
+
"required": boolean;
|
|
1002
|
+
"name": string;
|
|
1003
|
+
"value": string;
|
|
1004
|
+
"form": string;
|
|
1005
|
+
}
|
|
893
1006
|
|
|
894
1007
|
export interface IntrinsicElements {
|
|
895
1008
|
"lmvz-action": LmvzAction;
|
|
@@ -902,6 +1015,7 @@ export declare namespace JSX {
|
|
|
902
1015
|
"lmvz-input": Omit<LmvzInput, keyof LmvzInputAttributes> & { [K in keyof LmvzInput & keyof LmvzInputAttributes]?: LmvzInput[K] } & { [K in keyof LmvzInput & keyof LmvzInputAttributes as `attr:${K}`]?: LmvzInputAttributes[K] } & { [K in keyof LmvzInput & keyof LmvzInputAttributes as `prop:${K}`]?: LmvzInput[K] } & OneOf<"label", LmvzInput["label"], LmvzInputAttributes["label"]>;
|
|
903
1016
|
"lmvz-menuitem": Omit<LmvzMenuitem, keyof LmvzMenuitemAttributes> & { [K in keyof LmvzMenuitem & keyof LmvzMenuitemAttributes]?: LmvzMenuitem[K] } & { [K in keyof LmvzMenuitem & keyof LmvzMenuitemAttributes as `attr:${K}`]?: LmvzMenuitemAttributes[K] } & { [K in keyof LmvzMenuitem & keyof LmvzMenuitemAttributes as `prop:${K}`]?: LmvzMenuitem[K] };
|
|
904
1017
|
"lmvz-select": Omit<LmvzSelect, keyof LmvzSelectAttributes> & { [K in keyof LmvzSelect & keyof LmvzSelectAttributes]?: LmvzSelect[K] } & { [K in keyof LmvzSelect & keyof LmvzSelectAttributes as `attr:${K}`]?: LmvzSelectAttributes[K] } & { [K in keyof LmvzSelect & keyof LmvzSelectAttributes as `prop:${K}`]?: LmvzSelect[K] } & OneOf<"label", LmvzSelect["label"], LmvzSelectAttributes["label"]>;
|
|
1018
|
+
"lmvz-toggle": Omit<LmvzToggle, keyof LmvzToggleAttributes> & { [K in keyof LmvzToggle & keyof LmvzToggleAttributes]?: LmvzToggle[K] } & { [K in keyof LmvzToggle & keyof LmvzToggleAttributes as `attr:${K}`]?: LmvzToggleAttributes[K] } & { [K in keyof LmvzToggle & keyof LmvzToggleAttributes as `prop:${K}`]?: LmvzToggle[K] } & OneOf<"label", LmvzToggle["label"], LmvzToggleAttributes["label"]>;
|
|
905
1019
|
}
|
|
906
1020
|
}
|
|
907
1021
|
|
|
@@ -945,6 +1059,11 @@ export declare interface LmvzSelectCustomEvent<T> extends CustomEvent<T> {
|
|
|
945
1059
|
target: HTMLLmvzSelectElement;
|
|
946
1060
|
}
|
|
947
1061
|
|
|
1062
|
+
export declare interface LmvzToggleCustomEvent<T> extends CustomEvent<T> {
|
|
1063
|
+
detail: T;
|
|
1064
|
+
target: HTMLLmvzToggleElement;
|
|
1065
|
+
}
|
|
1066
|
+
|
|
948
1067
|
declare const scaleValues: readonly ["small", "default", "large"];
|
|
949
1068
|
|
|
950
1069
|
declare const sizes: readonly ["xs", "sm", "md", "lg"];
|