@tamagui/switch-headless 1.99.1 → 1.100.1
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.
|
@@ -29,13 +29,11 @@ module.exports = __toCommonJS(useSwitch_exports);
|
|
|
29
29
|
var import_jsx_runtime = require("react/jsx-runtime"), 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"));
|
|
30
30
|
function _array_like_to_array(arr, len) {
|
|
31
31
|
(len == null || len > arr.length) && (len = arr.length);
|
|
32
|
-
for (var i = 0, arr2 = new Array(len); i < len; i++)
|
|
33
|
-
arr2[i] = arr[i];
|
|
32
|
+
for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
|
|
34
33
|
return arr2;
|
|
35
34
|
}
|
|
36
35
|
function _array_with_holes(arr) {
|
|
37
|
-
if (Array.isArray(arr))
|
|
38
|
-
return arr;
|
|
36
|
+
if (Array.isArray(arr)) return arr;
|
|
39
37
|
}
|
|
40
38
|
function _define_property(obj, key, value) {
|
|
41
39
|
return key in obj ? Object.defineProperty(obj, key, {
|
|
@@ -58,8 +56,7 @@ function _iterable_to_array_limit(arr, i) {
|
|
|
58
56
|
try {
|
|
59
57
|
!_n && _i.return != null && _i.return();
|
|
60
58
|
} finally {
|
|
61
|
-
if (_d)
|
|
62
|
-
throw _e;
|
|
59
|
+
if (_d) throw _e;
|
|
63
60
|
}
|
|
64
61
|
}
|
|
65
62
|
return _arr;
|
|
@@ -95,8 +92,7 @@ function _object_spread_props(target, source) {
|
|
|
95
92
|
}), target;
|
|
96
93
|
}
|
|
97
94
|
function _object_without_properties(source, excluded) {
|
|
98
|
-
if (source == null)
|
|
99
|
-
return {};
|
|
95
|
+
if (source == null) return {};
|
|
100
96
|
var target = _object_without_properties_loose(source, excluded), key, i;
|
|
101
97
|
if (Object.getOwnPropertySymbols) {
|
|
102
98
|
var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
|
|
@@ -106,8 +102,7 @@ function _object_without_properties(source, excluded) {
|
|
|
106
102
|
return target;
|
|
107
103
|
}
|
|
108
104
|
function _object_without_properties_loose(source, excluded) {
|
|
109
|
-
if (source == null)
|
|
110
|
-
return {};
|
|
105
|
+
if (source == null) return {};
|
|
111
106
|
var target = {}, sourceKeys = Object.keys(source), key, i;
|
|
112
107
|
for (i = 0; i < sourceKeys.length; i++)
|
|
113
108
|
key = sourceKeys[i], !(excluded.indexOf(key) >= 0) && (target[key] = source[key]);
|
|
@@ -118,13 +113,10 @@ function _sliced_to_array(arr, i) {
|
|
|
118
113
|
}
|
|
119
114
|
function _unsupported_iterable_to_array(o, minLen) {
|
|
120
115
|
if (o) {
|
|
121
|
-
if (typeof o == "string")
|
|
122
|
-
return _array_like_to_array(o, minLen);
|
|
116
|
+
if (typeof o == "string") return _array_like_to_array(o, minLen);
|
|
123
117
|
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
124
|
-
if (n === "Object" && o.constructor && (n = o.constructor.name), n === "Map" || n === "Set")
|
|
125
|
-
|
|
126
|
-
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))
|
|
127
|
-
return _array_like_to_array(o, minLen);
|
|
118
|
+
if (n === "Object" && o.constructor && (n = o.constructor.name), n === "Map" || n === "Set") return Array.from(n);
|
|
119
|
+
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);
|
|
128
120
|
}
|
|
129
121
|
}
|
|
130
122
|
function getState(checked) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/Users/n8/tamagui/packages/switch-headless/src/useSwitch.tsx"],
|
|
4
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;uDAAA,sBAAg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AAW;MAAoB;SAExC;EACR;AACF;",
|
|
5
5
|
"names": ["getState", "checked", "BubbleInput", "props", "control", "bubbles", "inputProps", "ref", "React", "useRef", "prevChecked", "usePrevious", "useEffect", "input", "current", "inputProto", "window", "HTMLInputElement", "prototype", "descriptor", "Object", "getOwnPropertyDescriptor", "setChecked", "set", "event", "Event", "call", "dispatchEvent", "_jsx", "type", "aria-hidden", "defaultChecked", "tabIndex", "style", "position", "pointerEvents", "opacity", "margin", "useSwitch", "disabled", "name", "value", "required", "hasConsumerStoppedPropagationRef", "useState", "button", "setButton", "composedRefs", "useComposedRefs", "isFormControl", "isWeb", "Boolean", "closest", "labelId", "useLabelContext", "ariaLabelledBy", "labeledBy", "switchProps", "role", "undefined", "onPress", "composeEventHandlers", "isPropagationStopped", "stopPropagation", "switchRef", "bubbleInput", "transform"]
|
|
6
6
|
}
|
|
@@ -7,13 +7,11 @@ import { usePrevious } from "@tamagui/use-previous";
|
|
|
7
7
|
import * as React from "react";
|
|
8
8
|
function _array_like_to_array(arr, len) {
|
|
9
9
|
(len == null || len > arr.length) && (len = arr.length);
|
|
10
|
-
for (var i = 0, arr2 = new Array(len); i < len; i++)
|
|
11
|
-
arr2[i] = arr[i];
|
|
10
|
+
for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
|
|
12
11
|
return arr2;
|
|
13
12
|
}
|
|
14
13
|
function _array_with_holes(arr) {
|
|
15
|
-
if (Array.isArray(arr))
|
|
16
|
-
return arr;
|
|
14
|
+
if (Array.isArray(arr)) return arr;
|
|
17
15
|
}
|
|
18
16
|
function _define_property(obj, key, value) {
|
|
19
17
|
return key in obj ? Object.defineProperty(obj, key, {
|
|
@@ -36,8 +34,7 @@ function _iterable_to_array_limit(arr, i) {
|
|
|
36
34
|
try {
|
|
37
35
|
!_n && _i.return != null && _i.return();
|
|
38
36
|
} finally {
|
|
39
|
-
if (_d)
|
|
40
|
-
throw _e;
|
|
37
|
+
if (_d) throw _e;
|
|
41
38
|
}
|
|
42
39
|
}
|
|
43
40
|
return _arr;
|
|
@@ -73,8 +70,7 @@ function _object_spread_props(target, source) {
|
|
|
73
70
|
}), target;
|
|
74
71
|
}
|
|
75
72
|
function _object_without_properties(source, excluded) {
|
|
76
|
-
if (source == null)
|
|
77
|
-
return {};
|
|
73
|
+
if (source == null) return {};
|
|
78
74
|
var target = _object_without_properties_loose(source, excluded), key, i;
|
|
79
75
|
if (Object.getOwnPropertySymbols) {
|
|
80
76
|
var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
|
|
@@ -84,8 +80,7 @@ function _object_without_properties(source, excluded) {
|
|
|
84
80
|
return target;
|
|
85
81
|
}
|
|
86
82
|
function _object_without_properties_loose(source, excluded) {
|
|
87
|
-
if (source == null)
|
|
88
|
-
return {};
|
|
83
|
+
if (source == null) return {};
|
|
89
84
|
var target = {}, sourceKeys = Object.keys(source), key, i;
|
|
90
85
|
for (i = 0; i < sourceKeys.length; i++)
|
|
91
86
|
key = sourceKeys[i], !(excluded.indexOf(key) >= 0) && (target[key] = source[key]);
|
|
@@ -96,13 +91,10 @@ function _sliced_to_array(arr, i) {
|
|
|
96
91
|
}
|
|
97
92
|
function _unsupported_iterable_to_array(o, minLen) {
|
|
98
93
|
if (o) {
|
|
99
|
-
if (typeof o == "string")
|
|
100
|
-
return _array_like_to_array(o, minLen);
|
|
94
|
+
if (typeof o == "string") return _array_like_to_array(o, minLen);
|
|
101
95
|
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
102
|
-
if (n === "Object" && o.constructor && (n = o.constructor.name), n === "Map" || n === "Set")
|
|
103
|
-
|
|
104
|
-
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))
|
|
105
|
-
return _array_like_to_array(o, minLen);
|
|
96
|
+
if (n === "Object" && o.constructor && (n = o.constructor.name), n === "Map" || n === "Set") return Array.from(n);
|
|
97
|
+
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);
|
|
106
98
|
}
|
|
107
99
|
}
|
|
108
100
|
function getState(checked) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/Users/n8/tamagui/packages/switch-headless/src/useSwitch.tsx"],
|
|
4
|
-
"mappings": ";AAAA,SAASA,uBAAuB;AAChC,SAASC,aAAa;AACtB,SAASC,4BAA4B;AACrC,SAASC,uBAAuB;AAChC,SAASC,mBAAmB;AAC5B,YAAYC,WAAW
|
|
4
|
+
"mappings": ";AAAA,SAASA,uBAAuB;AAChC,SAASC,aAAa;AACtB,SAASC,4BAA4B;AACrC,SAASC,uBAAuB;AAChC,SAASC,mBAAmB;AAC5B,YAAYC,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAmBvB,SAASC,SAASC,SAAoB;AACpC,SAAOA,UAAU,YAAY;AAC/B;AAWA,IAAMC,cAAc,SAACC,OAAAA;AACnB,MAAQC,UAAoDD,MAApDC,SAASH,UAA2CE,MAA3CF,SAAAA,iBAA2CE,MAAlCE,SAAAA,UAAAA,mBAAAA,SAAU,KAAA,gBAASC,aAAAA,2BAAeH,OAAAA;IAApDC;IAASH;IAASI;MACpBE,MAAMR,MAAMS,OAAyB,IAAA,GACrCC,cAAcX,YAAYG,OAAAA;AAGhCF,eAAMW,UAAU,WAAA;AACd,QAAMC,QAAQJ,IAAIK,SACZC,aAAaC,OAAOC,iBAAiBC,WACrCC,aAAaC,OAAOC,yBACxBN,YACA,SAAA,GAEIO,aAAaH,WAAWI;AAC9B,QAAIZ,gBAAgBR,WAAWmB,YAAY;AACzC,UAAME,QAAQ,IAAIC,MAAM,SAAS;QAAElB;MAAQ,CAAA;AAC3Ce,iBAAWI,KAAKb,OAAOV,OAAAA,GACvBU,MAAMc,cAAcH,KAAAA;I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MAAMiC,qBAAoB,GAIhEf,iCAAiC5B,WAASU,MAAMkC,gBAAe;MAExE,CAAA;;IAEFC,WAAWb;;;;IAIXc,aACE/D,SAASkD,gBACP,qBAAC3C,aAAAA;MACCE,SAASsC;MACTrC,SAAS,CAACmC,iCAAiC5B;MAC3CyB;MACAC;MACArC;MACAsC;MACAH;;;;MAIAN,OAAO;QAAE6B,WAAW;MAAoB;SAExC;EACR;AACF;",
|
|
5
5
|
"names": ["useComposedRefs", "isWeb", "composeEventHandlers", "useLabelContext", "usePrevious", "React", "getState", "checked", "BubbleInput", "props", "control", "bubbles", "inputProps", "ref", "useRef", "prevChecked", "useEffect", "input", "current", "inputProto", "window", "HTMLInputElement", "prototype", "descriptor", "Object", "getOwnPropertyDescriptor", "setChecked", "set", "event", "Event", "call", "dispatchEvent", "type", "aria-hidden", "defaultChecked", "tabIndex", "style", "position", "pointerEvents", "opacity", "margin", "useSwitch", "disabled", "name", "value", "required", "hasConsumerStoppedPropagationRef", "useState", "button", "setButton", "composedRefs", "isFormControl", "Boolean", "closest", "labelId", "ariaLabelledBy", "labeledBy", "switchProps", "role", "undefined", "onPress", "isPropagationStopped", "stopPropagation", "switchRef", "bubbleInput", "transform"]
|
|
6
6
|
}
|
|
@@ -7,13 +7,11 @@ import { usePrevious } from "@tamagui/use-previous";
|
|
|
7
7
|
import * as React from "react";
|
|
8
8
|
function _array_like_to_array(arr, len) {
|
|
9
9
|
(len == null || len > arr.length) && (len = arr.length);
|
|
10
|
-
for (var i = 0, arr2 = new Array(len); i < len; i++)
|
|
11
|
-
arr2[i] = arr[i];
|
|
10
|
+
for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
|
|
12
11
|
return arr2;
|
|
13
12
|
}
|
|
14
13
|
function _array_with_holes(arr) {
|
|
15
|
-
if (Array.isArray(arr))
|
|
16
|
-
return arr;
|
|
14
|
+
if (Array.isArray(arr)) return arr;
|
|
17
15
|
}
|
|
18
16
|
function _define_property(obj, key, value) {
|
|
19
17
|
return key in obj ? Object.defineProperty(obj, key, {
|
|
@@ -36,8 +34,7 @@ function _iterable_to_array_limit(arr, i) {
|
|
|
36
34
|
try {
|
|
37
35
|
!_n && _i.return != null && _i.return();
|
|
38
36
|
} finally {
|
|
39
|
-
if (_d)
|
|
40
|
-
throw _e;
|
|
37
|
+
if (_d) throw _e;
|
|
41
38
|
}
|
|
42
39
|
}
|
|
43
40
|
return _arr;
|
|
@@ -73,8 +70,7 @@ function _object_spread_props(target, source) {
|
|
|
73
70
|
}), target;
|
|
74
71
|
}
|
|
75
72
|
function _object_without_properties(source, excluded) {
|
|
76
|
-
if (source == null)
|
|
77
|
-
return {};
|
|
73
|
+
if (source == null) return {};
|
|
78
74
|
var target = _object_without_properties_loose(source, excluded), key, i;
|
|
79
75
|
if (Object.getOwnPropertySymbols) {
|
|
80
76
|
var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
|
|
@@ -84,8 +80,7 @@ function _object_without_properties(source, excluded) {
|
|
|
84
80
|
return target;
|
|
85
81
|
}
|
|
86
82
|
function _object_without_properties_loose(source, excluded) {
|
|
87
|
-
if (source == null)
|
|
88
|
-
return {};
|
|
83
|
+
if (source == null) return {};
|
|
89
84
|
var target = {}, sourceKeys = Object.keys(source), key, i;
|
|
90
85
|
for (i = 0; i < sourceKeys.length; i++)
|
|
91
86
|
key = sourceKeys[i], !(excluded.indexOf(key) >= 0) && (target[key] = source[key]);
|
|
@@ -96,13 +91,10 @@ function _sliced_to_array(arr, i) {
|
|
|
96
91
|
}
|
|
97
92
|
function _unsupported_iterable_to_array(o, minLen) {
|
|
98
93
|
if (o) {
|
|
99
|
-
if (typeof o == "string")
|
|
100
|
-
return _array_like_to_array(o, minLen);
|
|
94
|
+
if (typeof o == "string") return _array_like_to_array(o, minLen);
|
|
101
95
|
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
102
|
-
if (n === "Object" && o.constructor && (n = o.constructor.name), n === "Map" || n === "Set")
|
|
103
|
-
|
|
104
|
-
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))
|
|
105
|
-
return _array_like_to_array(o, minLen);
|
|
96
|
+
if (n === "Object" && o.constructor && (n = o.constructor.name), n === "Map" || n === "Set") return Array.from(n);
|
|
97
|
+
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);
|
|
106
98
|
}
|
|
107
99
|
}
|
|
108
100
|
function getState(checked) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/Users/n8/tamagui/packages/switch-headless/src/useSwitch.tsx"],
|
|
4
|
-
"mappings": ";AAAA,SAASA,uBAAuB;AAChC,SAASC,aAAa;AACtB,SAASC,4BAA4B;AACrC,SAASC,uBAAuB;AAChC,SAASC,mBAAmB;AAC5B,YAAYC,WAAW
|
|
4
|
+
"mappings": ";AAAA,SAASA,uBAAuB;AAChC,SAASC,aAAa;AACtB,SAASC,4BAA4B;AACrC,SAASC,uBAAuB;AAChC,SAASC,mBAAmB;AAC5B,YAAYC,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAmBvB,SAASC,SAASC,SAAoB;AACpC,SAAOA,UAAU,YAAY;AAC/B;AAWA,IAAMC,cAAc,SAACC,OAAAA;AACnB,MAAQC,UAAoDD,MAApDC,SAASH,UAA2CE,MAA3CF,SAAAA,iBAA2CE,MAAlCE,SAAAA,UAAAA,mBAAAA,SAAU,KAAA,gBAASC,aAAAA,2BAAeH,OAAAA;IAApDC;IAASH;IAASI;MACpBE,MAAMR,MAAMS,OAAyB,IAAA,GACrCC,cAAcX,YAAYG,OAAAA;AAGhCF,eAAMW,UAAU,WAAA;AACd,QAAMC,QAAQJ,IAAIK,SACZC,aAAaC,OAAOC,iBAAiBC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A;MACvB,iBAAiBmC,WAAW,KAAKiB;MACjCjB;IACF,IACA,CAAC,GACFjC,KAAAA,GAAAA;MACH,mBAAmB8C;MACnBK,SAAS1D,qBAAqBO,MAAMmD,SAAS,SAAChC,OAAAA;AAC5CF,mBAAW,SAACX,aAAAA;iBAAgB,CAACA;YACzBd,SAASkD,kBACXL,iCAAiC5B,UAAUU,MAAMiC,qBAAoB,GAIhEf,iCAAiC5B,WAASU,MAAMkC,gBAAe;MAExE,CAAA;;IAEFC,WAAWb;;;;IAIXc,aACE/D,SAASkD,gBACP,qBAAC3C,aAAAA;MACCE,SAASsC;MACTrC,SAAS,CAACmC,iCAAiC5B;MAC3CyB;MACAC;MACArC;MACAsC;MACAH;;;;MAIAN,OAAO;QAAE6B,WAAW;MAAoB;SAExC;EACR;AACF;",
|
|
5
5
|
"names": ["useComposedRefs", "isWeb", "composeEventHandlers", "useLabelContext", "usePrevious", "React", "getState", "checked", "BubbleInput", "props", "control", "bubbles", "inputProps", "ref", "useRef", "prevChecked", "useEffect", "input", "current", "inputProto", "window", "HTMLInputElement", "prototype", "descriptor", "Object", "getOwnPropertyDescriptor", "setChecked", "set", "event", "Event", "call", "dispatchEvent", "type", "aria-hidden", "defaultChecked", "tabIndex", "style", "position", "pointerEvents", "opacity", "margin", "useSwitch", "disabled", "name", "value", "required", "hasConsumerStoppedPropagationRef", "useState", "button", "setButton", "composedRefs", "isFormControl", "Boolean", "closest", "labelId", "ariaLabelledBy", "labeledBy", "switchProps", "role", "undefined", "onPress", "isPropagationStopped", "stopPropagation", "switchRef", "bubbleInput", "transform"]
|
|
6
6
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tamagui/switch-headless",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.100.1",
|
|
4
4
|
"sideEffects": [
|
|
5
5
|
"*.css"
|
|
6
6
|
],
|
|
@@ -32,18 +32,18 @@
|
|
|
32
32
|
}
|
|
33
33
|
},
|
|
34
34
|
"dependencies": {
|
|
35
|
-
"@tamagui/compose-refs": "1.
|
|
36
|
-
"@tamagui/constants": "1.
|
|
37
|
-
"@tamagui/helpers": "1.
|
|
38
|
-
"@tamagui/label": "1.
|
|
39
|
-
"@tamagui/use-previous": "1.
|
|
35
|
+
"@tamagui/compose-refs": "1.100.1",
|
|
36
|
+
"@tamagui/constants": "1.100.1",
|
|
37
|
+
"@tamagui/helpers": "1.100.1",
|
|
38
|
+
"@tamagui/label": "1.100.1",
|
|
39
|
+
"@tamagui/use-previous": "1.100.1"
|
|
40
40
|
},
|
|
41
41
|
"peerDependencies": {
|
|
42
42
|
"react": "*",
|
|
43
43
|
"react-native": "*"
|
|
44
44
|
},
|
|
45
45
|
"devDependencies": {
|
|
46
|
-
"@tamagui/build": "1.
|
|
46
|
+
"@tamagui/build": "1.100.1",
|
|
47
47
|
"react": "^18.2.0",
|
|
48
48
|
"react-native": "0.74.1"
|
|
49
49
|
},
|