@tamagui/switch 2.0.0-rc.4 → 2.0.0-rc.40
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/StyledContext.cjs +14 -12
- package/dist/cjs/StyledContext.native.js +20 -18
- package/dist/cjs/StyledContext.native.js.map +1 -1
- package/dist/cjs/Switch.cjs +76 -74
- package/dist/cjs/Switch.native.js +81 -80
- package/dist/cjs/Switch.native.js.map +1 -1
- package/dist/cjs/createSwitch.cjs +156 -144
- package/dist/cjs/createSwitch.native.js +161 -153
- package/dist/cjs/createSwitch.native.js.map +1 -1
- package/dist/cjs/index.cjs +15 -13
- package/dist/cjs/index.native.js +20 -18
- package/dist/cjs/index.native.js.map +1 -1
- package/dist/cjs/types.cjs +7 -5
- package/dist/cjs/types.native.js +7 -5
- package/dist/cjs/types.native.js.map +1 -1
- package/dist/cjs/useSwitchNative.cjs +12 -10
- package/dist/cjs/useSwitchNative.native.js +40 -33
- package/dist/cjs/useSwitchNative.native.js.map +1 -1
- package/dist/esm/StyledContext.mjs +2 -2
- package/dist/esm/StyledContext.native.js +2 -2
- package/dist/esm/Switch.mjs +61 -61
- package/dist/esm/Switch.mjs.map +1 -1
- package/dist/esm/Switch.native.js +65 -66
- package/dist/esm/Switch.native.js.map +1 -1
- package/dist/esm/createSwitch.mjs +124 -114
- package/dist/esm/createSwitch.mjs.map +1 -1
- package/dist/esm/createSwitch.native.js +129 -123
- package/dist/esm/createSwitch.native.js.map +1 -1
- package/dist/esm/index.js +8 -11
- package/dist/esm/index.js.map +1 -6
- package/dist/esm/useSwitchNative.native.js +11 -6
- package/dist/esm/useSwitchNative.native.js.map +1 -1
- package/dist/jsx/StyledContext.mjs +2 -2
- package/dist/jsx/StyledContext.native.js +20 -18
- package/dist/jsx/StyledContext.native.js.map +1 -1
- package/dist/jsx/Switch.mjs +61 -61
- package/dist/jsx/Switch.mjs.map +1 -1
- package/dist/jsx/Switch.native.js +81 -80
- package/dist/jsx/Switch.native.js.map +1 -1
- package/dist/jsx/createSwitch.mjs +124 -114
- package/dist/jsx/createSwitch.mjs.map +1 -1
- package/dist/jsx/createSwitch.native.js +161 -153
- package/dist/jsx/createSwitch.native.js.map +1 -1
- package/dist/jsx/index.js +8 -11
- package/dist/jsx/index.js.map +1 -6
- package/dist/jsx/index.native.js +20 -18
- package/dist/jsx/index.native.js.map +1 -1
- package/dist/jsx/types.native.js +7 -5
- package/dist/jsx/useSwitchNative.native.js +40 -33
- package/dist/jsx/useSwitchNative.native.js.map +1 -1
- package/package.json +17 -20
- package/types/createSwitch.d.ts +4 -4
- package/types/index.d.ts +4 -4
- package/dist/cjs/StyledContext.js +0 -28
- package/dist/cjs/StyledContext.js.map +0 -6
- package/dist/cjs/Switch.js +0 -93
- package/dist/cjs/Switch.js.map +0 -6
- package/dist/cjs/createSwitch.js +0 -146
- package/dist/cjs/createSwitch.js.map +0 -6
- package/dist/cjs/index.js +0 -31
- package/dist/cjs/index.js.map +0 -6
- package/dist/cjs/types.js +0 -14
- package/dist/cjs/types.js.map +0 -6
- package/dist/cjs/useSwitchNative.js +0 -23
- package/dist/cjs/useSwitchNative.js.map +0 -6
- package/dist/esm/StyledContext.js +0 -12
- package/dist/esm/StyledContext.js.map +0 -6
- package/dist/esm/Switch.js +0 -79
- package/dist/esm/Switch.js.map +0 -6
- package/dist/esm/createSwitch.js +0 -135
- package/dist/esm/createSwitch.js.map +0 -6
- package/dist/esm/types.js +0 -1
- package/dist/esm/types.js.map +0 -6
- package/dist/esm/useSwitchNative.js +0 -7
- package/dist/esm/useSwitchNative.js.map +0 -6
- package/dist/jsx/StyledContext.js +0 -12
- package/dist/jsx/StyledContext.js.map +0 -6
- package/dist/jsx/Switch.js +0 -79
- package/dist/jsx/Switch.js.map +0 -6
- package/dist/jsx/createSwitch.js +0 -135
- package/dist/jsx/createSwitch.js.map +0 -6
- package/dist/jsx/types.js +0 -1
- package/dist/jsx/types.js.map +0 -6
- package/dist/jsx/useSwitchNative.js +0 -7
- package/dist/jsx/useSwitchNative.js.map +0 -6
|
@@ -4,181 +4,189 @@ var __create = Object.create;
|
|
|
4
4
|
var __defProp = Object.defineProperty;
|
|
5
5
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
6
6
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
7
|
-
var __getProtoOf = Object.getPrototypeOf
|
|
8
|
-
|
|
7
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
8
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
9
9
|
var __export = (target, all) => {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
10
|
+
for (var name in all) __defProp(target, name, {
|
|
11
|
+
get: all[name],
|
|
12
|
+
enumerable: true
|
|
13
|
+
});
|
|
14
|
+
};
|
|
15
|
+
var __copyProps = (to, from, except, desc) => {
|
|
16
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
17
|
+
for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
17
18
|
get: () => from[key],
|
|
18
19
|
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
19
20
|
});
|
|
20
|
-
|
|
21
|
-
|
|
21
|
+
}
|
|
22
|
+
return to;
|
|
23
|
+
};
|
|
22
24
|
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
25
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
26
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
27
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
28
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
29
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
|
|
30
|
+
value: mod,
|
|
31
|
+
enumerable: true
|
|
32
|
+
}) : target, mod));
|
|
33
|
+
var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
34
|
+
value: true
|
|
35
|
+
}), mod);
|
|
34
36
|
var createSwitch_exports = {};
|
|
35
37
|
__export(createSwitch_exports, {
|
|
36
38
|
createSwitch: () => createSwitch
|
|
37
39
|
});
|
|
38
40
|
module.exports = __toCommonJS(createSwitch_exports);
|
|
39
|
-
var import_jsx_runtime = require("react/jsx-runtime")
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
41
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
42
|
+
var import_core = require("@tamagui/core");
|
|
43
|
+
var import_switch_headless = require("@tamagui/switch-headless");
|
|
44
|
+
var import_use_controllable_state = require("@tamagui/use-controllable-state");
|
|
45
|
+
var React = __toESM(require("react"), 1);
|
|
46
|
+
var import_StyledContext = require("./StyledContext.native.js");
|
|
47
|
+
var import_Switch = require("./Switch.native.js");
|
|
48
|
+
var import_useSwitchNative = require("./useSwitchNative.native.js");
|
|
47
49
|
function createSwitch(createProps) {
|
|
48
50
|
var {
|
|
49
51
|
Frame = import_Switch.SwitchFrame,
|
|
50
52
|
Thumb = import_Switch.SwitchThumb
|
|
51
53
|
} = createProps;
|
|
52
|
-
process.env.NODE_ENV === "development"
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
54
|
+
if (process.env.NODE_ENV === "development") {
|
|
55
|
+
if (Frame !== import_Switch.SwitchFrame && Frame.staticConfig.context && Frame.staticConfig.context !== import_StyledContext.SwitchStyledContext || Thumb !== import_Switch.SwitchThumb && Thumb.staticConfig.context && Thumb.staticConfig.context !== import_StyledContext.SwitchStyledContext) {
|
|
56
|
+
console.warn(`Warning: createSwitch() needs to control context to pass checked state from Frame to Thumb, any custom context passed will be overridden.`);
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
Frame.staticConfig.context = import_StyledContext.SwitchStyledContext;
|
|
60
|
+
Thumb.staticConfig.context = import_StyledContext.SwitchStyledContext;
|
|
61
|
+
var SwitchThumbComponent = Thumb.styleable(function SwitchThumb2(props, forwardedRef) {
|
|
62
|
+
var {
|
|
63
|
+
size: sizeProp,
|
|
64
|
+
unstyled: unstyledProp,
|
|
65
|
+
activeStyle,
|
|
66
|
+
...thumbProps
|
|
67
|
+
} = props;
|
|
68
|
+
var styledContext = import_StyledContext.SwitchStyledContext.useStyledContext();
|
|
69
|
+
var {
|
|
70
|
+
unstyled: unstyledContext,
|
|
71
|
+
size: sizeContext,
|
|
72
|
+
active,
|
|
73
|
+
disabled,
|
|
74
|
+
frameWidth = 0
|
|
75
|
+
} = styledContext;
|
|
76
|
+
var _ref;
|
|
77
|
+
var unstyled = process.env.TAMAGUI_HEADLESS === "1" ? true : (_ref = unstyledProp !== null && unstyledProp !== void 0 ? unstyledProp : unstyledContext) !== null && _ref !== void 0 ? _ref : false;
|
|
78
|
+
var _ref1;
|
|
79
|
+
var size = (_ref1 = sizeProp !== null && sizeProp !== void 0 ? sizeProp : sizeContext) !== null && _ref1 !== void 0 ? _ref1 : "$true";
|
|
80
|
+
var initialChecked = React.useRef(active).current;
|
|
81
|
+
var initialWidth = (0, import_core.getVariableValue)(props.width || size, "size");
|
|
82
|
+
var [thumbWidth, setThumbWidth] = React.useState(typeof initialWidth === "number" ? initialWidth : 0);
|
|
83
|
+
var distance = frameWidth - thumbWidth;
|
|
84
|
+
var x = initialChecked ? active ? 0 : -distance : active ? distance : 0;
|
|
85
|
+
return /* @__PURE__ */(0, import_jsx_runtime.jsx)(Thumb, {
|
|
86
|
+
ref: forwardedRef,
|
|
87
|
+
unstyled,
|
|
88
|
+
...(unstyled === false && {
|
|
89
|
+
size
|
|
90
|
+
}),
|
|
91
|
+
alignSelf: initialChecked ? "flex-end" : "flex-start",
|
|
92
|
+
x,
|
|
93
|
+
onLayout: (0, import_core.composeEventHandlers)(props.onLayout, function (e) {
|
|
94
|
+
var next = e.nativeEvent.layout.width;
|
|
95
|
+
setThumbWidth(next);
|
|
96
|
+
}),
|
|
97
|
+
disabled,
|
|
98
|
+
...thumbProps,
|
|
99
|
+
...(active && activeStyle)
|
|
100
|
+
});
|
|
101
|
+
});
|
|
102
|
+
var SwitchComponent = Frame.styleable(function SwitchFrame(_props, forwardedRef) {
|
|
103
|
+
var {
|
|
104
|
+
native,
|
|
105
|
+
nativeProps,
|
|
106
|
+
checked: checkedProp,
|
|
107
|
+
defaultChecked,
|
|
108
|
+
onCheckedChange,
|
|
109
|
+
activeStyle,
|
|
110
|
+
unstyled: unstyledProp,
|
|
111
|
+
activeTheme: activeThemeProp,
|
|
112
|
+
...props
|
|
113
|
+
} = _props;
|
|
114
|
+
var [checked, setChecked] = (0, import_use_controllable_state.useControllableState)({
|
|
115
|
+
prop: checkedProp,
|
|
116
|
+
defaultProp: defaultChecked || false,
|
|
117
|
+
onChange: onCheckedChange,
|
|
118
|
+
transition: true
|
|
119
|
+
});
|
|
120
|
+
var styledContext = React.useContext(import_StyledContext.SwitchStyledContext.context);
|
|
121
|
+
var [frameWidth, setFrameInnerWidth] = React.useState(0);
|
|
122
|
+
var {
|
|
123
|
+
switchProps,
|
|
124
|
+
bubbleInput,
|
|
125
|
+
switchRef
|
|
126
|
+
} = (0, import_switch_headless.useSwitch)(props, [checked, setChecked],
|
|
127
|
+
// @ts-ignore TODO tamagui react 19 type error
|
|
128
|
+
forwardedRef);
|
|
129
|
+
var nativeSwitch = (0, import_useSwitchNative.useSwitchNative)({
|
|
130
|
+
id: props.id,
|
|
131
|
+
disabled: props.disabled,
|
|
132
|
+
native,
|
|
133
|
+
nativeProps,
|
|
134
|
+
checked,
|
|
135
|
+
setChecked
|
|
136
|
+
});
|
|
137
|
+
if (nativeSwitch) {
|
|
138
|
+
return nativeSwitch;
|
|
139
|
+
}
|
|
140
|
+
var disabled = props.disabled;
|
|
141
|
+
var handleLayout = function (e) {
|
|
142
|
+
var next = e.nativeEvent.layout.width;
|
|
143
|
+
if (next !== frameWidth) {
|
|
144
|
+
setFrameInnerWidth(next);
|
|
145
|
+
}
|
|
146
|
+
};
|
|
147
|
+
var _styledContext_unstyled, _ref;
|
|
148
|
+
var unstyled = (_ref = (_styledContext_unstyled = styledContext.unstyled) !== null && _styledContext_unstyled !== void 0 ? _styledContext_unstyled : unstyledProp) !== null && _ref !== void 0 ? _ref : false;
|
|
149
|
+
var _styledContext_size, _ref1, _styledContext_size1, _ref2;
|
|
150
|
+
return /* @__PURE__ */(0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, {
|
|
151
|
+
children: [/* @__PURE__ */(0, import_jsx_runtime.jsx)(import_StyledContext.SwitchStyledContext.Provider, {
|
|
152
|
+
size: (_ref1 = (_styledContext_size = styledContext.size) !== null && _styledContext_size !== void 0 ? _styledContext_size : props.size) !== null && _ref1 !== void 0 ? _ref1 : "$true",
|
|
79
153
|
unstyled,
|
|
80
|
-
|
|
81
|
-
size
|
|
82
|
-
}),
|
|
83
|
-
alignSelf: initialChecked ? "flex-end" : "flex-start",
|
|
84
|
-
x,
|
|
85
|
-
onLayout: (0, import_core.composeEventHandlers)(props.onLayout, function (e) {
|
|
86
|
-
var next = e.nativeEvent.layout.width;
|
|
87
|
-
setThumbWidth(next);
|
|
88
|
-
}),
|
|
154
|
+
active: checked,
|
|
89
155
|
disabled,
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
unstyled: unstyledProp,
|
|
103
|
-
activeTheme: activeThemeProp,
|
|
104
|
-
...props
|
|
105
|
-
} = _props,
|
|
106
|
-
[checked, setChecked] = (0, import_use_controllable_state.useControllableState)({
|
|
107
|
-
prop: checkedProp,
|
|
108
|
-
defaultProp: defaultChecked || !1,
|
|
109
|
-
onChange: onCheckedChange,
|
|
110
|
-
transition: !0
|
|
111
|
-
}),
|
|
112
|
-
styledContext = React.useContext(import_StyledContext.SwitchStyledContext.context),
|
|
113
|
-
[frameWidth, setFrameInnerWidth] = React.useState(0),
|
|
114
|
-
{
|
|
115
|
-
switchProps,
|
|
116
|
-
bubbleInput,
|
|
117
|
-
switchRef
|
|
118
|
-
} = (0, import_switch_headless.useSwitch)(props, [checked, setChecked],
|
|
119
|
-
// @ts-ignore TODO tamagui react 19 type error
|
|
120
|
-
forwardedRef),
|
|
121
|
-
nativeSwitch = (0, import_useSwitchNative.useSwitchNative)({
|
|
122
|
-
id: props.id,
|
|
123
|
-
disabled: props.disabled,
|
|
124
|
-
native,
|
|
125
|
-
nativeProps,
|
|
126
|
-
checked,
|
|
127
|
-
setChecked
|
|
128
|
-
});
|
|
129
|
-
if (nativeSwitch) return nativeSwitch;
|
|
130
|
-
var disabled = props.disabled,
|
|
131
|
-
handleLayout = function (e) {
|
|
132
|
-
var next = e.nativeEvent.layout.width;
|
|
133
|
-
next !== frameWidth && setFrameInnerWidth(next);
|
|
134
|
-
},
|
|
135
|
-
_styledContext_unstyled,
|
|
136
|
-
_ref,
|
|
137
|
-
unstyled = (_ref = (_styledContext_unstyled = styledContext.unstyled) !== null && _styledContext_unstyled !== void 0 ? _styledContext_unstyled : unstyledProp) !== null && _ref !== void 0 ? _ref : !1,
|
|
138
|
-
_styledContext_size,
|
|
139
|
-
_ref1,
|
|
140
|
-
_styledContext_size1,
|
|
141
|
-
_ref2;
|
|
142
|
-
return /* @__PURE__ */(0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, {
|
|
143
|
-
children: [/* @__PURE__ */(0, import_jsx_runtime.jsx)(import_StyledContext.SwitchStyledContext.Provider, {
|
|
144
|
-
size: (_ref1 = (_styledContext_size = styledContext.size) !== null && _styledContext_size !== void 0 ? _styledContext_size : props.size) !== null && _ref1 !== void 0 ? _ref1 : "$true",
|
|
156
|
+
frameWidth,
|
|
157
|
+
children: /* @__PURE__ */(0, import_jsx_runtime.jsx)(Frame, {
|
|
158
|
+
ref: switchRef,
|
|
159
|
+
render: "button",
|
|
160
|
+
// activeThemeProp should be a theme name string like "active", not a style object
|
|
161
|
+
theme: activeThemeProp !== null && activeThemeProp !== void 0 ? activeThemeProp : null,
|
|
162
|
+
...(import_core.isWeb && {
|
|
163
|
+
type: "button"
|
|
164
|
+
}),
|
|
165
|
+
...(!unstyled && {
|
|
166
|
+
size: (_ref2 = (_styledContext_size1 = styledContext.size) !== null && _styledContext_size1 !== void 0 ? _styledContext_size1 : props.size) !== null && _ref2 !== void 0 ? _ref2 : "$true"
|
|
167
|
+
}),
|
|
145
168
|
unstyled,
|
|
146
|
-
|
|
169
|
+
...props,
|
|
170
|
+
...switchProps,
|
|
147
171
|
disabled,
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
render: "button",
|
|
152
|
-
// activeThemeProp should be a theme name string like "active", not a style object
|
|
153
|
-
theme: activeThemeProp ?? null,
|
|
154
|
-
...(import_core.isWeb && {
|
|
155
|
-
type: "button"
|
|
156
|
-
}),
|
|
157
|
-
...(!unstyled && {
|
|
158
|
-
size: (_ref2 = (_styledContext_size1 = styledContext.size) !== null && _styledContext_size1 !== void 0 ? _styledContext_size1 : props.size) !== null && _ref2 !== void 0 ? _ref2 : "$true"
|
|
172
|
+
...(checked && {
|
|
173
|
+
...(!unstyled && !activeStyle && {
|
|
174
|
+
backgroundColor: "$backgroundActive"
|
|
159
175
|
}),
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
}),
|
|
168
|
-
...activeStyle
|
|
169
|
-
}),
|
|
170
|
-
children: /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_core.View, {
|
|
171
|
-
alignSelf: "stretch",
|
|
172
|
-
flex: 1,
|
|
173
|
-
onLayout: handleLayout,
|
|
174
|
-
children: props.children
|
|
175
|
-
})
|
|
176
|
+
...activeStyle
|
|
177
|
+
}),
|
|
178
|
+
children: /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_core.View, {
|
|
179
|
+
alignSelf: "stretch",
|
|
180
|
+
flex: 1,
|
|
181
|
+
onLayout: handleLayout,
|
|
182
|
+
children: props.children
|
|
176
183
|
})
|
|
177
|
-
})
|
|
178
|
-
})
|
|
179
|
-
}, {
|
|
180
|
-
disableTheme: !0
|
|
184
|
+
})
|
|
185
|
+
}), bubbleInput]
|
|
181
186
|
});
|
|
187
|
+
}, {
|
|
188
|
+
disableTheme: true
|
|
189
|
+
});
|
|
182
190
|
return (0, import_core.withStaticProperties)(SwitchComponent, {
|
|
183
191
|
Thumb: SwitchThumbComponent
|
|
184
192
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["__toCommonJS","mod","__copyProps","__defProp","value","createSwitch_exports","__export","createSwitch","module","exports","import_jsx_runtime","require","import_core","import_switch_headless","import_use_controllable_state","React","__toESM","import_StyledContext","import_Switch","import_useSwitchNative","createProps","Frame","SwitchFrame","Thumb","SwitchThumb","process","env","NODE_ENV","staticConfig","context","SwitchStyledContext","console","warn","SwitchThumbComponent","styleable","props","forwardedRef","size","sizeProp","unstyled","unstyledProp","activeStyle","thumbProps","styledContext","useStyledContext","unstyledContext","sizeContext","active","disabled","frameWidth","_ref","TAMAGUI_HEADLESS","_ref1","initialChecked","useRef","current","initialWidth","getVariableValue","width","thumbWidth","setThumbWidth","useState","distance","x","jsx","ref","alignSelf","onLayout","composeEventHandlers","e","next","nativeEvent","layout","SwitchComponent","_props","native","nativeProps","checked","checkedProp","defaultChecked","onCheckedChange","activeTheme","activeThemeProp","setChecked","useControllableState","prop","defaultProp","onChange","transition","useContext","setFrameInnerWidth","switchProps","bubbleInput","switchRef","useSwitch","nativeSwitch","useSwitchNative","id","handleLayout","_styledContext_unstyled","_styledContext_size","_styledContext_size1","_ref2","jsxs","Fragment","children","Provider","render","theme","isWeb","type","backgroundColor","View","flex","disableTheme","withStaticProperties"],"sources":["../../src/createSwitch.tsx"],"sourcesContent":[null],"mappings":"
|
|
1
|
+
{"version":3,"names":["__toCommonJS","mod","__copyProps","__defProp","value","createSwitch_exports","__export","createSwitch","module","exports","import_jsx_runtime","require","import_core","import_switch_headless","import_use_controllable_state","React","__toESM","import_StyledContext","import_Switch","import_useSwitchNative","createProps","Frame","SwitchFrame","Thumb","SwitchThumb","process","env","NODE_ENV","staticConfig","context","SwitchStyledContext","console","warn","SwitchThumbComponent","styleable","SwitchThumb2","props","forwardedRef","size","sizeProp","unstyled","unstyledProp","activeStyle","thumbProps","styledContext","useStyledContext","unstyledContext","sizeContext","active","disabled","frameWidth","_ref","TAMAGUI_HEADLESS","_ref1","initialChecked","useRef","current","initialWidth","getVariableValue","width","thumbWidth","setThumbWidth","useState","distance","x","jsx","ref","alignSelf","onLayout","composeEventHandlers","e","next","nativeEvent","layout","SwitchComponent","_props","native","nativeProps","checked","checkedProp","defaultChecked","onCheckedChange","activeTheme","activeThemeProp","setChecked","useControllableState","prop","defaultProp","onChange","transition","useContext","setFrameInnerWidth","switchProps","bubbleInput","switchRef","useSwitch","nativeSwitch","useSwitchNative","id","handleLayout","_styledContext_unstyled","_styledContext_size","_styledContext_size1","_ref2","jsxs","Fragment","children","Provider","render","theme","isWeb","type","backgroundColor","View","flex","disableTheme","withStaticProperties"],"sources":["../../src/createSwitch.tsx"],"sourcesContent":[null],"mappings":";;;;;;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AA1D,aAAgB,CAAAN,IAAA,cAAAgE,oBAAA,cAAAA,oBAAA,GAAAlE,KAAA,CAAAE,IAAA,cAAAiE,KAAA,cAAAA,KAAA;UAE3D,CACE;UACE/D,QAAA;UAAC,GAAAJ,KAAA;UAAA,GAAAwD,WAAA;UACC3C,QAAM;UACN,IAAA6B,OAAA;YACA,KAAAtC,QAAQ,KAAAE,WAAA;cACRsE,eAAA;YACA;YAEA,GAAAtE;UAAA;UAACgE,QAAA,qBAAAhG,kBAAA,CAAAuD,GAAA,EAAArD,WAAA,CAAAqG,IAAA;YAAA9C,SACM;YAAA+C,IACL;YAAO9C,QAEP,EAAO+B,YAAA;YAAmBO,QACrB,EAAAtE,KAAA,CAAAsE;UAA0B;QACb;MAC0B,IAC5Cb,WACA;IACI;EACC;IACLsB,YACC;EAAe;EAEI,WAAAvG,WACd,CAAAwG,oBAAiB,EAAA1C,eAAA;IAAAnD,KAAA,EAAAU;EACnB;AACC","ignoreList":[]}
|
package/dist/cjs/index.cjs
CHANGED
|
@@ -3,21 +3,23 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
|
3
3
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
4
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
5
|
var __export = (target, all) => {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
6
|
+
for (var name in all) __defProp(target, name, {
|
|
7
|
+
get: all[name],
|
|
8
|
+
enumerable: true
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
13
14
|
get: () => from[key],
|
|
14
15
|
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
15
16
|
});
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
|
19
21
|
var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
20
|
-
value:
|
|
22
|
+
value: true
|
|
21
23
|
}), mod);
|
|
22
24
|
var index_exports = {};
|
|
23
25
|
__export(index_exports, {
|
|
@@ -25,8 +27,8 @@ __export(index_exports, {
|
|
|
25
27
|
useSwitchNative: () => import_useSwitchNative.useSwitchNative
|
|
26
28
|
});
|
|
27
29
|
module.exports = __toCommonJS(index_exports);
|
|
28
|
-
var import_createSwitch = require("./createSwitch.cjs")
|
|
29
|
-
|
|
30
|
+
var import_createSwitch = require("./createSwitch.cjs");
|
|
31
|
+
var import_Switch = require("./Switch.cjs");
|
|
30
32
|
__reExport(index_exports, require("./createSwitch.cjs"), module.exports);
|
|
31
33
|
__reExport(index_exports, require("./StyledContext.cjs"), module.exports);
|
|
32
34
|
__reExport(index_exports, require("./Switch.cjs"), module.exports);
|
package/dist/cjs/index.native.js
CHANGED
|
@@ -5,21 +5,23 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
|
5
5
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
6
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
7
|
var __export = (target, all) => {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
8
|
+
for (var name in all) __defProp(target, name, {
|
|
9
|
+
get: all[name],
|
|
10
|
+
enumerable: true
|
|
11
|
+
});
|
|
12
|
+
};
|
|
13
|
+
var __copyProps = (to, from, except, desc) => {
|
|
14
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
15
|
+
for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
15
16
|
get: () => from[key],
|
|
16
17
|
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
17
18
|
});
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
19
|
+
}
|
|
20
|
+
return to;
|
|
21
|
+
};
|
|
22
|
+
var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
|
21
23
|
var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
22
|
-
value:
|
|
24
|
+
value: true
|
|
23
25
|
}), mod);
|
|
24
26
|
var index_exports = {};
|
|
25
27
|
__export(index_exports, {
|
|
@@ -27,15 +29,15 @@ __export(index_exports, {
|
|
|
27
29
|
useSwitchNative: () => import_useSwitchNative.useSwitchNative
|
|
28
30
|
});
|
|
29
31
|
module.exports = __toCommonJS(index_exports);
|
|
30
|
-
var import_createSwitch = require("./createSwitch.native.js")
|
|
31
|
-
|
|
32
|
+
var import_createSwitch = require("./createSwitch.native.js");
|
|
33
|
+
var import_Switch = require("./Switch.native.js");
|
|
32
34
|
__reExport(index_exports, require("./createSwitch.native.js"), module.exports);
|
|
33
35
|
__reExport(index_exports, require("./StyledContext.native.js"), module.exports);
|
|
34
36
|
__reExport(index_exports, require("./Switch.native.js"), module.exports);
|
|
35
37
|
__reExport(index_exports, require("./types.native.js"), module.exports);
|
|
36
|
-
var import_useSwitchNative = require("./useSwitchNative.native.js")
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
38
|
+
var import_useSwitchNative = require("./useSwitchNative.native.js");
|
|
39
|
+
var Switch = (0, import_createSwitch.createSwitch)({
|
|
40
|
+
Frame: import_Switch.SwitchFrame,
|
|
41
|
+
Thumb: import_Switch.SwitchThumb
|
|
42
|
+
});
|
|
41
43
|
//# sourceMappingURL=index.native.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["__toCommonJS","mod","__copyProps","__defProp","value","index_exports","__export","Switch","useSwitchNative","import_useSwitchNative","module","exports","import_createSwitch","require","import_Switch","__reExport","createSwitch","Frame","SwitchFrame","Thumb","SwitchThumb"],"sources":["../../src/index.ts"],"sourcesContent":[null],"mappings":"
|
|
1
|
+
{"version":3,"names":["__toCommonJS","mod","__copyProps","__defProp","value","index_exports","__export","Switch","useSwitchNative","import_useSwitchNative","module","exports","import_createSwitch","require","import_Switch","__reExport","createSwitch","Frame","SwitchFrame","Thumb","SwitchThumb"],"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,QAAA,CAAAD,aAAA;EAAAE,MAAA,EAAAA,CAAA,KAAAA,MAAA;EAAAC,eAAA,EAAAA,CAAA,KAAAC,sBAAA,CAAAD;AAAA;AAAAE,MAAA,CAAAC,OAAA,GAAAX,YAA6B,CAAAK,aAAA;AAC7B,IAAAO,mBAAyC,GAAAC,OAAA;AAEzC,IAAAC,aAAA,GAAAD,OAAc;AACdE,UAAA,CAAAV,aAAA,EAAcQ,OAAA,8BAAAH,MAJd,CAAAC,OAAA;AAKAI,UAAA,CAAAV,aAAA,EAAcQ,OAAA,4BALd,GAAAH,MAAA,CAAAC,OAAA;AAMAI,UAAA,CAAAV,aAAA,EAAcQ,OAAA,wBANdH,MAAA,CAAAC,OAAA;AAOAI,UAAA,CAAAV,aAAA,EAAAQ,OAAgC,uBAAAH,MAAA,CAAAC,OAAA;AAazB,IAAAF,sBAAe,GAAAI,OAAA,8BAAa;AAAA,IACjCN,MAAO,OAAAK,mBAAA,CAAAI,YAAA;EACPC,KAAA,EAAOH,aAAA,CAAAI,WAAA;EACRC,KAAA,EAAAL,aAAA,CAAAM","ignoreList":[]}
|
package/dist/cjs/types.cjs
CHANGED
|
@@ -3,14 +3,16 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
|
3
3
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
4
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
5
|
var __copyProps = (to, from, except, desc) => {
|
|
6
|
-
if (from && typeof from
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
6
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
7
|
+
for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
8
|
+
get: () => from[key],
|
|
9
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
10
|
+
});
|
|
11
|
+
}
|
|
10
12
|
return to;
|
|
11
13
|
};
|
|
12
14
|
var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
13
|
-
value:
|
|
15
|
+
value: true
|
|
14
16
|
}), mod);
|
|
15
17
|
var types_exports = {};
|
|
16
18
|
module.exports = __toCommonJS(types_exports);
|
package/dist/cjs/types.native.js
CHANGED
|
@@ -5,14 +5,16 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
|
5
5
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
6
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
7
|
var __copyProps = (to, from, except, desc) => {
|
|
8
|
-
if (from && typeof from
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
8
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
9
|
+
for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
10
|
+
get: () => from[key],
|
|
11
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
12
|
+
});
|
|
13
|
+
}
|
|
12
14
|
return to;
|
|
13
15
|
};
|
|
14
16
|
var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
15
|
-
value:
|
|
17
|
+
value: true
|
|
16
18
|
}), mod);
|
|
17
19
|
var types_exports = {};
|
|
18
20
|
module.exports = __toCommonJS(types_exports);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["__toCommonJS","mod","__copyProps","__defProp","value","types_exports"],"sources":["../../src/types.ts"],"sourcesContent":[null],"mappings":"
|
|
1
|
+
{"version":3,"names":["__toCommonJS","mod","__copyProps","__defProp","value","types_exports"],"sources":["../../src/types.ts"],"sourcesContent":[null],"mappings":";;;;;;;;;;;;;;;AAAA,IAAAA,YAAA,GAAAC,GAAA,IAAAC,WAAA,CAAAC,SAAA;EAAAC,KAAA;AAAA,IAAAH,GAAA;AAAA,IAAAI,aAAA","ignoreList":[]}
|
|
@@ -3,20 +3,22 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
|
3
3
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
4
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
5
|
var __export = (target, all) => {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
6
|
+
for (var name in all) __defProp(target, name, {
|
|
7
|
+
get: all[name],
|
|
8
|
+
enumerable: true
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
+
for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
13
14
|
get: () => from[key],
|
|
14
15
|
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
15
16
|
});
|
|
16
|
-
|
|
17
|
-
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
18
20
|
var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
19
|
-
value:
|
|
21
|
+
value: true
|
|
20
22
|
}), mod);
|
|
21
23
|
var useSwitchNative_exports = {};
|
|
22
24
|
__export(useSwitchNative_exports, {
|