@tamagui/switch-headless 1.135.3 → 1.135.4-1761749240853
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/dist/cjs/index.native.js +13 -12
- package/dist/cjs/index.native.js.map +1 -6
- package/dist/cjs/useSwitch.cjs +1 -1
- package/dist/cjs/useSwitch.js +1 -1
- package/dist/cjs/useSwitch.js.map +1 -1
- package/dist/cjs/useSwitch.native.js +41 -30
- package/dist/cjs/useSwitch.native.js.map +1 -6
- package/dist/jsx/index.native.js +21 -2
- package/dist/jsx/index.native.js.map +1 -6
- package/dist/jsx/useSwitch.native.js +57 -23
- package/dist/jsx/useSwitch.native.js.map +1 -6
- package/package.json +8 -7
package/dist/cjs/index.native.js
CHANGED
|
@@ -1,20 +1,21 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
|
|
2
3
|
var __defProp = Object.defineProperty;
|
|
3
4
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
5
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
6
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
7
|
var __copyProps = (to, from, except, desc) => {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
8
|
+
if (from && typeof from == "object" || typeof from == "function") for (let key of __getOwnPropNames(from)) !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, {
|
|
9
|
+
get: () => from[key],
|
|
10
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
11
|
+
});
|
|
12
|
+
return to;
|
|
13
|
+
},
|
|
14
|
+
__reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
|
15
|
+
var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
16
|
+
value: !0
|
|
17
|
+
}), mod);
|
|
13
18
|
var index_exports = {};
|
|
14
19
|
module.exports = __toCommonJS(index_exports);
|
|
15
|
-
__reExport(index_exports, require("./useSwitch"), module.exports);
|
|
16
|
-
|
|
17
|
-
0 && (module.exports = {
|
|
18
|
-
...require("./useSwitch")
|
|
19
|
-
});
|
|
20
|
-
//# sourceMappingURL=index.js.map
|
|
20
|
+
__reExport(index_exports, require("./useSwitch.native.js"), module.exports);
|
|
21
|
+
//# sourceMappingURL=index.native.js.map
|
|
@@ -1,6 +1 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../src/index.ts"],
|
|
4
|
-
"mappings": ";;;;;;;;;;;;AAAA;AAAA;AAAA,0BAAc,wBAAd;",
|
|
5
|
-
"names": []
|
|
6
|
-
}
|
|
1
|
+
{"version":3,"names":["__toCommonJS","mod","__copyProps","__defProp","value","index_exports","module","exports"],"sources":["../../src/index.ts"],"sourcesContent":[null],"mappings":";;;;;;;;;;;;;;AAAA,IAAAA,YAAA,GAAAC,GAAA,IAAAC,WAAA,CAAAC,SAAA;EAAAC,KAAA;AAAA,IAAAH,GAAA;AAAA,IAAAI,aAAA;AAAAC,MAAA,CAAAC,OAAA,GAAAP,YAAc,CAAAK,aAAA","ignoreList":[]}
|
package/dist/cjs/useSwitch.cjs
CHANGED
|
@@ -39,7 +39,7 @@ var import_compose_refs = require("@tamagui/compose-refs"),
|
|
|
39
39
|
import_helpers = require("@tamagui/helpers"),
|
|
40
40
|
import_label = require("@tamagui/label"),
|
|
41
41
|
import_use_previous = require("@tamagui/use-previous"),
|
|
42
|
-
React = __toESM(require("react")),
|
|
42
|
+
React = __toESM(require("react"), 1),
|
|
43
43
|
import_jsx_runtime =
|
|
44
44
|
// @ts-ignore
|
|
45
45
|
require("react/jsx-runtime");
|
package/dist/cjs/useSwitch.js
CHANGED
|
@@ -25,7 +25,7 @@ __export(useSwitch_exports, {
|
|
|
25
25
|
useSwitch: () => useSwitch
|
|
26
26
|
});
|
|
27
27
|
module.exports = __toCommonJS(useSwitch_exports);
|
|
28
|
-
var import_compose_refs = require("@tamagui/compose-refs"), import_constants = require("@tamagui/constants"), import_helpers = require("@tamagui/helpers"), import_label = require("@tamagui/label"), import_use_previous = require("@tamagui/use-previous"), React = __toESM(require("react")), import_jsx_runtime = (
|
|
28
|
+
var import_compose_refs = require("@tamagui/compose-refs"), import_constants = require("@tamagui/constants"), import_helpers = require("@tamagui/helpers"), import_label = require("@tamagui/label"), import_use_previous = require("@tamagui/use-previous"), React = __toESM(require("react"), 1), import_jsx_runtime = (
|
|
29
29
|
// @ts-ignore
|
|
30
30
|
require("react/jsx-runtime")
|
|
31
31
|
);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/useSwitch.tsx"],
|
|
4
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,0BAAgC,kCAChC,mBAAsB,+BACtB,iBAAqC,6BACrC,eAAgC,2BAChC,sBAA4B,kCAC5B,QAAuB,
|
|
4
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,0BAAgC,kCAChC,mBAAsB,+BACtB,iBAAqC,6BACrC,eAAgC,2BAChC,sBAA4B,kCAC5B,QAAuB,8BAuDnB;AAAA;AAAA;AAAA;AApCJ,SAAS,SAAS,SAAsB;AACtC,SAAO,UAAU,YAAY;AAC/B;AAWA,MAAM,cAAc,CAAC,UAA4B;AAC/C,QAAM,EAAE,SAAS,SAAS,UAAU,IAAM,GAAG,WAAW,IAAI,OACtD,MAAM,MAAM,OAAyB,IAAI,GACzC,kBAAc,iCAAY,OAAO;AAGvC,eAAM,UAAU,MAAM;AACpB,UAAM,QAAQ,IAAI,SACZ,aAAa,OAAO,iBAAiB,WAKrC,aAJa,OAAO;AAAA,MACxB;AAAA,MACA;AAAA,IACF,EAC8B;AAC9B,QAAI,gBAAgB,WAAW,YAAY;AACz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AA,MACH;AAAA,MACA,WAAW;AAAA;AAAA;AAAA;AAAA,MAIX,aACE,0BAAS,gBACP;AAAA,QAAC;AAAA;AAAA,UACC,SAAS;AAAA,UACT,SAAS,CAAC,iCAAiC;AAAA,UAC3C;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,UAIA,OAAO,EAAE,WAAW,oBAAoB;AAAA;AAAA,MAC1C,IACE;AAAA,IACR;AAAA,EACF;AACF;",
|
|
5
5
|
"names": []
|
|
6
6
|
}
|
|
@@ -1,50 +1,61 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
|
|
2
3
|
var __create = Object.create;
|
|
3
4
|
var __defProp = Object.defineProperty;
|
|
4
5
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
6
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
-
var __getProtoOf = Object.getPrototypeOf,
|
|
7
|
+
var __getProtoOf = Object.getPrototypeOf,
|
|
8
|
+
__hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
9
|
var __export = (target, all) => {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
10
|
+
for (var name in all) __defProp(target, name, {
|
|
11
|
+
get: all[name],
|
|
12
|
+
enumerable: !0
|
|
13
|
+
});
|
|
14
|
+
},
|
|
15
|
+
__copyProps = (to, from, except, desc) => {
|
|
16
|
+
if (from && typeof from == "object" || typeof from == "function") for (let key of __getOwnPropNames(from)) !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, {
|
|
17
|
+
get: () => from[key],
|
|
18
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
19
|
+
});
|
|
20
|
+
return to;
|
|
21
|
+
};
|
|
16
22
|
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
17
23
|
// If the importer is in node compatibility mode or this is not an ESM
|
|
18
24
|
// file that has been converted to a CommonJS file using a Babel-
|
|
19
25
|
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
20
26
|
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
21
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
|
|
22
|
-
|
|
23
|
-
|
|
27
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
|
|
28
|
+
value: mod,
|
|
29
|
+
enumerable: !0
|
|
30
|
+
}) : target, mod)),
|
|
31
|
+
__toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
32
|
+
value: !0
|
|
33
|
+
}), mod);
|
|
24
34
|
var useSwitch_exports = {};
|
|
25
35
|
__export(useSwitch_exports, {
|
|
26
36
|
useSwitch: () => useSwitch
|
|
27
37
|
});
|
|
28
38
|
module.exports = __toCommonJS(useSwitch_exports);
|
|
29
|
-
var import_jsx_runtime = require("react/jsx-runtime"),
|
|
39
|
+
var import_jsx_runtime = require("react/jsx-runtime"),
|
|
40
|
+
import_compose_refs = require("@tamagui/compose-refs"),
|
|
41
|
+
import_constants = require("@tamagui/constants"),
|
|
42
|
+
import_helpers = require("@tamagui/helpers"),
|
|
43
|
+
import_label = require("@tamagui/label"),
|
|
44
|
+
import_use_previous = require("@tamagui/use-previous"),
|
|
45
|
+
React = __toESM(require("react"), 1);
|
|
30
46
|
function useSwitch(props, param, ref) {
|
|
31
47
|
var [checked, setChecked] = param;
|
|
32
|
-
if (1)
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
};
|
|
48
|
+
if (1) return {
|
|
49
|
+
switchProps: {
|
|
50
|
+
onPress() {
|
|
51
|
+
setChecked(function (prevChecked) {
|
|
52
|
+
return !prevChecked;
|
|
53
|
+
});
|
|
54
|
+
}
|
|
55
|
+
},
|
|
56
|
+
switchRef: ref,
|
|
57
|
+
bubbleInput: null
|
|
58
|
+
};
|
|
44
59
|
var disabled, name, value, required, hasConsumerStoppedPropagationRef, button, setButton, composedRefs, isFormControl, labelId, ariaLabelledBy;
|
|
45
60
|
}
|
|
46
|
-
|
|
47
|
-
0 && (module.exports = {
|
|
48
|
-
useSwitch
|
|
49
|
-
});
|
|
50
|
-
//# sourceMappingURL=useSwitch.js.map
|
|
61
|
+
//# sourceMappingURL=useSwitch.native.js.map
|
|
@@ -1,6 +1 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../src/useSwitch.tsx"],
|
|
4
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,yBAA4B,8BAC5B,sBAAgC,kCAChC,mBAAsB,+BACtB,iBAAqC,6BACrC,eAAgC,2BAChC,sBAA4B,kCAC5B,QAAuB;AA4ChB,SAAS,UAAU,OAAO,OAAO,KAAK;AACzC,MAAI,CAAC,SAAS,UAAU,IAAI;AAC5B,MAAI;AACA,WAAO;AAAA,MACH,aAAa;AAAA,QACT,UAAW;AACP,qBAAW,SAAS,aAAa;AAC7B,mBAAO,CAAC;AAAA,UACZ,CAAC;AAAA,QACL;AAAA,MACJ;AAAA,MACA,WAAW;AAAA,MACX,aAAa;AAAA,IACjB;AAEA,MAAM,UAAU,MAAM,OAAO,UACzB,kCACC,QAAQ,WACT,cAEA,eACA,SACA;AA6CZ;",
|
|
5
|
-
"names": []
|
|
6
|
-
}
|
|
1
|
+
{"version":3,"names":["__toCommonJS","mod","__copyProps","__defProp","value","useSwitch_exports","__export","useSwitch","module","exports","import_jsx_runtime","require","import_compose_refs","import_constants","import_helpers","import_label","import_use_previous","React","__toESM","props","param","ref","checked","setChecked","switchProps","onPress","prevChecked","switchRef","bubbleInput","disabled","name","required","hasConsumerStoppedPropagationRef","button","setButton","composedRefs","isFormControl","labelId","ariaLabelledBy"],"sources":["../../src/useSwitch.tsx"],"sourcesContent":[null],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAAA;EAAAA,YAAA,GAAAC,GAAA,IAAAC,WAAA,CAAAC,SAAA;IAAAC,KAAA;EAAA,IAAAH,GAAA;AAAA,IAAAI,iBAAA;AAAAC,QAAA,CAAAD,iBAAA;EAAAE,SAAA,EAAAA,CAAA,KAAAA;AAAA;AAAAC,MAAA,CAAAC,OAAA,GAAAT,YAAgC,CAAAK,iBAAA;AA4D5B,IAAAK,kBAAA,GAAAC,OAAA;EAAAC,mBAAA,GAAAD,OAAA;EAAAE,gBAAA,GAAAF,OAAA;EAAAG,cAAA,GAAAH,OAAA;EAAAI,YAAA,GAAAJ,OAAA;EAAAK,mBAAA,GAAAL,OAAA;EAAAM,KAAA,GAAAC,OAAA,CAAAP,OAAA;AAAA,SAAAJ,UAAAY,KAAA,EAAAC,KAAA,EAAAC,GAAA;EAAA,KAAAC,OAAA,EAAAC,UAAA,IAAAH,KAAA;EApCJ,OACE,OAAO;IACTI,WAAA;MAWMC,QAAA;QACIF,UAAS,WAASG,WAAU,EAAM;UAK1C,OAAM,CAAAA,WAAgB;QACd;MAGJ;IACA;IAE4BC,SAAA,EAAAN,GAAA;IAC9BO,WAAI;EACF;EACA,IAAAC,QAAA,EAAAC,IAAW,EAAK1B,KAAA,EAAO2B,QAAO,EAC9BC,gCAAyB,EAAAC,MAAA,EAAAC,SAAA,EAAAC,YAAA,EAAAC,aAAA,EAAAC,OAAA,EAAAC,cAAA;AAAA","ignoreList":[]}
|
package/dist/jsx/index.native.js
CHANGED
|
@@ -1,2 +1,21 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __copyProps = (to, from, except, desc) => {
|
|
8
|
+
if (from && typeof from == "object" || typeof from == "function") for (let key of __getOwnPropNames(from)) !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, {
|
|
9
|
+
get: () => from[key],
|
|
10
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
11
|
+
});
|
|
12
|
+
return to;
|
|
13
|
+
},
|
|
14
|
+
__reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
|
15
|
+
var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
16
|
+
value: !0
|
|
17
|
+
}), mod);
|
|
18
|
+
var index_exports = {};
|
|
19
|
+
module.exports = __toCommonJS(index_exports);
|
|
20
|
+
__reExport(index_exports, require("./useSwitch.native.js"), module.exports);
|
|
21
|
+
//# sourceMappingURL=index.native.js.map
|
|
@@ -1,27 +1,61 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var __create = Object.create;
|
|
4
|
+
var __defProp = Object.defineProperty;
|
|
5
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
6
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
7
|
+
var __getProtoOf = Object.getPrototypeOf,
|
|
8
|
+
__hasOwnProp = Object.prototype.hasOwnProperty;
|
|
9
|
+
var __export = (target, all) => {
|
|
10
|
+
for (var name in all) __defProp(target, name, {
|
|
11
|
+
get: all[name],
|
|
12
|
+
enumerable: !0
|
|
13
|
+
});
|
|
14
|
+
},
|
|
15
|
+
__copyProps = (to, from, except, desc) => {
|
|
16
|
+
if (from && typeof from == "object" || typeof from == "function") for (let key of __getOwnPropNames(from)) !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, {
|
|
17
|
+
get: () => from[key],
|
|
18
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
19
|
+
});
|
|
20
|
+
return to;
|
|
21
|
+
};
|
|
22
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
23
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
24
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
25
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
26
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
27
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
|
|
28
|
+
value: mod,
|
|
29
|
+
enumerable: !0
|
|
30
|
+
}) : target, mod)),
|
|
31
|
+
__toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
32
|
+
value: !0
|
|
33
|
+
}), mod);
|
|
34
|
+
var useSwitch_exports = {};
|
|
35
|
+
__export(useSwitch_exports, {
|
|
36
|
+
useSwitch: () => useSwitch
|
|
37
|
+
});
|
|
38
|
+
module.exports = __toCommonJS(useSwitch_exports);
|
|
39
|
+
var import_jsx_runtime = require("react/jsx-runtime"),
|
|
40
|
+
import_compose_refs = require("@tamagui/compose-refs"),
|
|
41
|
+
import_constants = require("@tamagui/constants"),
|
|
42
|
+
import_helpers = require("@tamagui/helpers"),
|
|
43
|
+
import_label = require("@tamagui/label"),
|
|
44
|
+
import_use_previous = require("@tamagui/use-previous"),
|
|
45
|
+
React = __toESM(require("react"), 1);
|
|
8
46
|
function useSwitch(props, param, ref) {
|
|
9
47
|
var [checked, setChecked] = param;
|
|
10
|
-
if (1)
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
};
|
|
48
|
+
if (1) return {
|
|
49
|
+
switchProps: {
|
|
50
|
+
onPress() {
|
|
51
|
+
setChecked(function (prevChecked) {
|
|
52
|
+
return !prevChecked;
|
|
53
|
+
});
|
|
54
|
+
}
|
|
55
|
+
},
|
|
56
|
+
switchRef: ref,
|
|
57
|
+
bubbleInput: null
|
|
58
|
+
};
|
|
22
59
|
var disabled, name, value, required, hasConsumerStoppedPropagationRef, button, setButton, composedRefs, isFormControl, labelId, ariaLabelledBy;
|
|
23
60
|
}
|
|
24
|
-
|
|
25
|
-
useSwitch
|
|
26
|
-
};
|
|
27
|
-
//# sourceMappingURL=useSwitch.js.map
|
|
61
|
+
//# sourceMappingURL=useSwitch.native.js.map
|
|
@@ -1,6 +1 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../src/useSwitch.tsx"],
|
|
4
|
-
"mappings": "AAAA,SAAS,OAAO,YAAY;AAC5B,OAAgC;AAChC,OAAsB;AACtB,OAAqC;AACrC,OAAgC;AAChC,SAAS,mBAAmB;AAC5B,YAAY,WAAW;AA4ChB,SAAS,UAAU,OAAO,OAAO,KAAK;AACzC,MAAI,CAAC,SAAS,UAAU,IAAI;AAC5B,MAAI;AACA,WAAO;AAAA,MACH,aAAa;AAAA,QACT,UAAW;AACP,qBAAW,SAAS,aAAa;AAC7B,mBAAO,CAAC;AAAA,UACZ,CAAC;AAAA,QACL;AAAA,MACJ;AAAA,MACA,WAAW;AAAA,MACX,aAAa;AAAA,IACjB;AAEA,MAAM,UAAU,MAAM,OAAO,UACzB,kCACC,QAAQ,WACT,cAEA,eACA,SACA;AA6CZ;",
|
|
5
|
-
"names": []
|
|
6
|
-
}
|
|
1
|
+
{"version":3,"names":["__create","Object","create","__defProp","defineProperty","__getOwnPropDesc","getOwnPropertyDescriptor","__getOwnPropNames","getOwnPropertyNames","__getProtoOf","getPrototypeOf","__hasOwnProp","prototype","hasOwnProperty","__export","target","all","name","get","enumerable","__copyProps","to","from","except","desc","key","call","__toESM","mod","isNodeMode","__esModule","value","__toCommonJS","useSwitch_exports","useSwitch","module","exports","import_jsx_runtime","require","import_compose_refs","import_constants","import_helpers","import_label","import_use_previous","React","props","param","ref","checked","setChecked","switchProps","onPress","prevChecked","switchRef","bubbleInput","disabled","required","hasConsumerStoppedPropagationRef","button","setButton","composedRefs","isFormControl","labelId","ariaLabelledBy"],"sources":["../../src/useSwitch.tsx"],"sourcesContent":[null],"mappings":"AAAA,YAAS;;AACT,IAAAA,QAAS,GAAAC,MAAA,CAAaC,MAAA;AACtB,IAAAC,SAAS,GAAAF,MAAA,CAAAG,cAA4B;AACrC,IAAAC,gBAAS,GAAAJ,MAAA,CAAAK,wBAAuB;AAChC,IAAAC,iBAAS,GAAAN,MAAmB,CAAAO,mBAAA;AAC5B,IAAAC,YAAY,GAAAR,MAAW,CAAAS,cAAA;EAAAC,YAAA,GAAAV,MAAA,CAAAW,SAAA,CAAAC,cAAA;AAuDnB,IAAAC,QAAA,GAAAA,CAAAC,MAAA,EAAAC,GAAA;IApCJ,SAASC,IAAA,IAASD,GAAA,EAChBb,SAAO,CAAAY,MAAU,EAAAE,IAAA;MAAAC,GAAY,EAAAF,GAAA,CAAAC,IAAA;MAAAE,UAAA;IAAA;EAC/B;EAAAC,WAAA,GAAAA,CAAAC,EAAA,EAAAC,IAAA,EAAAC,MAAA,EAAAC,IAAA;IAWA,IAAMF,IAAA,WAAeA,IAAA,YAA4B,WAAAA,IAAA,gBAC/C,KAAM,IAAEG,GAAA,IAASlB,iBAAS,CAAUe,IAAM,GAK1C,CAAAX,YAAM,CAAAe,IAAA,CAAUL,EAAA,EAAAI,GAAM,KAAAA,GAAA,KAAAF,MAAA,IAAApB,SAAA,CAAAkB,EAAA,EAAAI,GAAA;MAAAP,GAAA,EAAAA,CAAA,KAAAI,IAAA,CAAAG,GAAA;MAAAN,UAAA,IAAAK,IAAA,GAAAnB,gBAAA,CAAAiB,IAAA,EAAAG,GAAA,MAAAD,IAAA,CAAAL;IAAA;IACpB,OAAAE,EAAM;EAEoB;AACxB,IAAAM,OACA,GAAAA,CAAAC,GAAA,EAAAC,UAAA,EA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|
|
2
2
|
"name": "@tamagui/switch-headless",
|
|
3
|
-
"version": "1.135.
|
|
3
|
+
"version": "1.135.4-1761749240853",
|
|
4
|
+
"type": "module",
|
|
4
5
|
"sideEffects": [
|
|
5
6
|
"*.css"
|
|
6
7
|
],
|
|
@@ -36,18 +37,18 @@
|
|
|
36
37
|
}
|
|
37
38
|
},
|
|
38
39
|
"dependencies": {
|
|
39
|
-
"@tamagui/compose-refs": "1.135.
|
|
40
|
-
"@tamagui/constants": "1.135.
|
|
41
|
-
"@tamagui/helpers": "1.135.
|
|
42
|
-
"@tamagui/label": "1.135.
|
|
43
|
-
"@tamagui/use-previous": "1.135.
|
|
40
|
+
"@tamagui/compose-refs": "1.135.4-1761749240853",
|
|
41
|
+
"@tamagui/constants": "1.135.4-1761749240853",
|
|
42
|
+
"@tamagui/helpers": "1.135.4-1761749240853",
|
|
43
|
+
"@tamagui/label": "1.135.4-1761749240853",
|
|
44
|
+
"@tamagui/use-previous": "1.135.4-1761749240853"
|
|
44
45
|
},
|
|
45
46
|
"peerDependencies": {
|
|
46
47
|
"react": "*",
|
|
47
48
|
"react-native": "*"
|
|
48
49
|
},
|
|
49
50
|
"devDependencies": {
|
|
50
|
-
"@tamagui/build": "1.135.
|
|
51
|
+
"@tamagui/build": "1.135.4-1761749240853",
|
|
51
52
|
"react": "*",
|
|
52
53
|
"react-native": "^0.79.2"
|
|
53
54
|
},
|