@tamagui/switch 1.135.4 → 1.135.6

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.
@@ -1,133 +1,215 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { composeEventHandlers, getShorthandValue, getVariableValue, isWeb, shouldRenderNativePlatform, withStaticProperties } from "@tamagui/core";
3
- import { registerFocusable } from "@tamagui/focusable";
4
- import { useSwitch } from "@tamagui/switch-headless";
5
- import { useControllableState } from "@tamagui/use-controllable-state";
6
- import * as React from "react";
7
- import { Switch as NativeSwitch, View } from "react-native";
8
- import { SwitchStyledContext } from "./StyledContext";
9
- import { SwitchFrame as DefaultSwitchFrame, SwitchThumb } from "./Switch";
10
- var SwitchContext = /* @__PURE__ */ React.createContext({
11
- checked: !1,
12
- disabled: !1,
13
- frameWidth: 0
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 createSwitch_exports = {};
35
+ __export(createSwitch_exports, {
36
+ SwitchContext: () => SwitchContext,
37
+ createSwitch: () => createSwitch
14
38
  });
39
+ module.exports = __toCommonJS(createSwitch_exports);
40
+ var import_jsx_runtime = require("react/jsx-runtime"),
41
+ import_core = require("@tamagui/core"),
42
+ import_focusable = require("@tamagui/focusable"),
43
+ import_switch_headless = require("@tamagui/switch-headless"),
44
+ import_use_controllable_state = require("@tamagui/use-controllable-state"),
45
+ React = __toESM(require("react"), 1),
46
+ import_react_native = require("react-native"),
47
+ import_StyledContext = require("./StyledContext.native.js"),
48
+ import_Switch = require("./Switch.native.js"),
49
+ SwitchContext = /* @__PURE__ */React.createContext({
50
+ checked: !1,
51
+ disabled: !1,
52
+ frameWidth: 0
53
+ });
15
54
  function createSwitch(createProps) {
16
- var { disableActiveTheme, Frame = DefaultSwitchFrame, Thumb = SwitchThumb } = createProps;
17
- process.env.NODE_ENV === "development" && (Frame !== DefaultSwitchFrame && Frame.staticConfig.context && Frame.staticConfig.context !== SwitchStyledContext || Thumb !== SwitchThumb && Thumb.staticConfig.context && Thumb.staticConfig.context !== SwitchStyledContext) && console.warn("Warning: createSwitch() needs to control context to pass checked state from Frame to Thumb, any custom context passed will be overridden."), Frame.staticConfig.context = SwitchStyledContext, Thumb.staticConfig.context = SwitchStyledContext;
18
- var SwitchThumbComponent = Thumb.styleable(function(props, forwardedRef) {
19
- var { size: sizeProp, unstyled: unstyledProp, nativeID, ...thumbProps } = props, context = React.useContext(SwitchContext), { checked, disabled, frameWidth } = context, styledContext = SwitchStyledContext.useStyledContext(), { unstyled: unstyledContext, size: sizeContext } = styledContext, _ref, unstyled = process.env.TAMAGUI_HEADLESS === "1" ? !0 : (_ref = unstyledProp ?? unstyledContext) !== null && _ref !== void 0 ? _ref : !1, _ref1, size = (_ref1 = sizeProp ?? sizeContext) !== null && _ref1 !== void 0 ? _ref1 : "$true", initialChecked = React.useRef(checked).current, initialWidth = getVariableValue(props.width, "size"), [thumbWidth, setThumbWidth] = React.useState(typeof initialWidth == "number" ? initialWidth : 0), distance = frameWidth - thumbWidth, x = initialChecked ? checked ? 0 : -distance : checked ? distance : 0;
20
- return /* @__PURE__ */ _jsx(Thumb, {
21
- ref: forwardedRef,
22
- unstyled,
23
- ...unstyled === !1 && {
24
- size,
25
- ...!disableActiveTheme && !unstyled && {
26
- theme: checked ? "active" : null
27
- }
28
- },
29
- alignSelf: initialChecked ? "flex-end" : "flex-start",
30
- x,
31
- onLayout: composeEventHandlers(props.onLayout, function(e) {
32
- var next = e.nativeEvent.layout.width;
33
- next !== thumbWidth && setThumbWidth(next);
34
- }),
35
- // expected variants
36
- checked,
37
- disabled,
38
- ...thumbProps
39
- });
40
- }), SwitchComponent = Frame.styleable(function(_props, forwardedRef) {
41
- var { native, nativeProps, checked: checkedProp, defaultChecked, onCheckedChange, ...props } = _props, [checked, setChecked] = useControllableState({
42
- prop: checkedProp,
43
- defaultProp: defaultChecked || !1,
44
- onChange: onCheckedChange,
45
- transition: !0
46
- }), styledContext = React.useContext(SwitchStyledContext.context), estimatedInitialWidth = 0, estWidth = getVariableValue(getShorthandValue(props, "width"), "size");
47
- if (estWidth) {
48
- var _getShorthandValue, _ref, estPad = (_ref = (_getShorthandValue = getShorthandValue(props, "paddingHorizontal")) !== null && _getShorthandValue !== void 0 ? _getShorthandValue : getShorthandValue(props, "padding")) !== null && _ref !== void 0 ? _ref : 0, _getShorthandValue1, _ref1, estLeftPad = (_ref1 = (_getShorthandValue1 = getShorthandValue(props, "paddingLeft")) !== null && _getShorthandValue1 !== void 0 ? _getShorthandValue1 : estPad) !== null && _ref1 !== void 0 ? _ref1 : 0, _getShorthandValue2, _ref2, estRightPad = (_ref2 = (_getShorthandValue2 = getShorthandValue(props, "paddingRight")) !== null && _getShorthandValue2 !== void 0 ? _getShorthandValue2 : estPad) !== null && _ref2 !== void 0 ? _ref2 : 0;
49
- estimatedInitialWidth = estWidth - (estLeftPad ? getVariableValue(estLeftPad, "size") : 0) - (estRightPad ? getVariableValue(estRightPad, "size") : 0);
50
- }
51
- var [frameWidth, setFrameInnerWidth] = React.useState(estimatedInitialWidth), { switchProps, bubbleInput, switchRef } = useSwitch(
52
- // @ts-ignore
53
- props,
54
- [
55
+ var {
56
+ disableActiveTheme,
57
+ Frame = import_Switch.SwitchFrame,
58
+ Thumb = import_Switch.SwitchThumb
59
+ } = createProps;
60
+ process.env.NODE_ENV === "development" && (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) && console.warn("Warning: createSwitch() needs to control context to pass checked state from Frame to Thumb, any custom context passed will be overridden."), Frame.staticConfig.context = import_StyledContext.SwitchStyledContext, Thumb.staticConfig.context = import_StyledContext.SwitchStyledContext;
61
+ var SwitchThumbComponent = Thumb.styleable(function (props, forwardedRef) {
62
+ var {
63
+ size: sizeProp,
64
+ unstyled: unstyledProp,
65
+ nativeID,
66
+ ...thumbProps
67
+ } = props,
68
+ context = React.useContext(SwitchContext),
69
+ {
70
+ checked,
71
+ disabled,
72
+ frameWidth
73
+ } = context,
74
+ styledContext = import_StyledContext.SwitchStyledContext.useStyledContext(),
75
+ {
76
+ unstyled: unstyledContext,
77
+ size: sizeContext
78
+ } = styledContext,
79
+ _ref,
80
+ unstyled = process.env.TAMAGUI_HEADLESS === "1" ? !0 : (_ref = unstyledProp ?? unstyledContext) !== null && _ref !== void 0 ? _ref : !1,
81
+ _ref1,
82
+ size = (_ref1 = sizeProp ?? sizeContext) !== null && _ref1 !== void 0 ? _ref1 : "$true",
83
+ initialChecked = React.useRef(checked).current,
84
+ initialWidth = (0, import_core.getVariableValue)(props.width, "size"),
85
+ [thumbWidth, setThumbWidth] = React.useState(typeof initialWidth == "number" ? initialWidth : 0),
86
+ distance = frameWidth - thumbWidth,
87
+ x = initialChecked ? checked ? 0 : -distance : checked ? distance : 0;
88
+ return /* @__PURE__ */(0, import_jsx_runtime.jsx)(Thumb, {
89
+ ref: forwardedRef,
90
+ unstyled,
91
+ ...(unstyled === !1 && {
92
+ size,
93
+ ...(!disableActiveTheme && !unstyled && {
94
+ theme: checked ? "active" : null
95
+ })
96
+ }),
97
+ alignSelf: initialChecked ? "flex-end" : "flex-start",
98
+ x,
99
+ onLayout: (0, import_core.composeEventHandlers)(props.onLayout, function (e) {
100
+ var next = e.nativeEvent.layout.width;
101
+ next !== thumbWidth && setThumbWidth(next);
102
+ }),
103
+ // expected variants
55
104
  checked,
56
- setChecked
57
- ],
58
- // @ts-ignore TODO tamagui react 19 type error
59
- forwardedRef
60
- );
61
- React.useEffect(function() {
62
- if (props.id && !props.disabled)
63
- return registerFocusable(props.id, {
64
- focusAndSelect: function() {
65
- setChecked == null || setChecked(function(value2) {
105
+ disabled,
106
+ ...thumbProps
107
+ });
108
+ }),
109
+ SwitchComponent = Frame.styleable(function (_props, forwardedRef) {
110
+ var {
111
+ native,
112
+ nativeProps,
113
+ checked: checkedProp,
114
+ defaultChecked,
115
+ onCheckedChange,
116
+ ...props
117
+ } = _props,
118
+ [checked, setChecked] = (0, import_use_controllable_state.useControllableState)({
119
+ prop: checkedProp,
120
+ defaultProp: defaultChecked || !1,
121
+ onChange: onCheckedChange,
122
+ transition: !0
123
+ }),
124
+ styledContext = React.useContext(import_StyledContext.SwitchStyledContext.context),
125
+ estimatedInitialWidth = 0,
126
+ estWidth = (0, import_core.getVariableValue)((0, import_core.getShorthandValue)(props, "width"), "size");
127
+ if (estWidth) {
128
+ var _getShorthandValue,
129
+ _ref,
130
+ estPad = (_ref = (_getShorthandValue = (0, import_core.getShorthandValue)(props, "paddingHorizontal")) !== null && _getShorthandValue !== void 0 ? _getShorthandValue : (0, import_core.getShorthandValue)(props, "padding")) !== null && _ref !== void 0 ? _ref : 0,
131
+ _getShorthandValue1,
132
+ _ref1,
133
+ estLeftPad = (_ref1 = (_getShorthandValue1 = (0, import_core.getShorthandValue)(props, "paddingLeft")) !== null && _getShorthandValue1 !== void 0 ? _getShorthandValue1 : estPad) !== null && _ref1 !== void 0 ? _ref1 : 0,
134
+ _getShorthandValue2,
135
+ _ref2,
136
+ estRightPad = (_ref2 = (_getShorthandValue2 = (0, import_core.getShorthandValue)(props, "paddingRight")) !== null && _getShorthandValue2 !== void 0 ? _getShorthandValue2 : estPad) !== null && _ref2 !== void 0 ? _ref2 : 0;
137
+ estimatedInitialWidth = estWidth - (estLeftPad ? (0, import_core.getVariableValue)(estLeftPad, "size") : 0) - (estRightPad ? (0, import_core.getVariableValue)(estRightPad, "size") : 0);
138
+ }
139
+ var [frameWidth, setFrameInnerWidth] = React.useState(estimatedInitialWidth),
140
+ {
141
+ switchProps,
142
+ bubbleInput,
143
+ switchRef
144
+ } = (0, import_switch_headless.useSwitch)(
145
+ // @ts-ignore
146
+ props, [checked, setChecked],
147
+ // @ts-ignore TODO tamagui react 19 type error
148
+ forwardedRef);
149
+ React.useEffect(function () {
150
+ if (props.id && !props.disabled) return (0, import_focusable.registerFocusable)(props.id, {
151
+ focusAndSelect: function () {
152
+ setChecked?.(function (value2) {
66
153
  return !value2;
67
154
  });
68
155
  },
69
- focus: function() {
70
- }
156
+ focus: function () {}
71
157
  });
72
- }, [
73
- props.id,
74
- props.disabled
75
- ]);
76
- var renderNative = shouldRenderNativePlatform(native);
77
- if (renderNative === "android" || renderNative === "ios")
78
- return /* @__PURE__ */ _jsx(NativeSwitch, {
158
+ }, [props.id, props.disabled]);
159
+ var renderNative = (0, import_core.shouldRenderNativePlatform)(native);
160
+ if (renderNative === "android" || renderNative === "ios") return /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_react_native.Switch, {
79
161
  value: checked,
80
162
  onValueChange: setChecked,
81
163
  ...nativeProps
82
164
  });
83
- var disabled = props.disabled, value = React.useMemo(function() {
84
- return {
85
- checked,
86
- disabled,
87
- frameWidth
88
- };
89
- }, [
90
- checked,
91
- disabled,
92
- frameWidth
93
- ]), handleLayout = function(e) {
94
- var next = e.nativeEvent.layout.width;
95
- next !== frameWidth && setFrameInnerWidth(next);
96
- }, _styledContext_unstyled, _ref3, unstyled = (_ref3 = (_styledContext_unstyled = styledContext.unstyled) !== null && _styledContext_unstyled !== void 0 ? _styledContext_unstyled : props.unstyled) !== null && _ref3 !== void 0 ? _ref3 : !1, _styledContext_size, _ref4;
97
- return /* @__PURE__ */ _jsxs(SwitchContext.Provider, {
98
- value,
99
- children: [
100
- /* @__PURE__ */ _jsx(Frame, {
165
+ var disabled = props.disabled,
166
+ value = React.useMemo(function () {
167
+ return {
168
+ checked,
169
+ disabled,
170
+ frameWidth
171
+ };
172
+ }, [checked, disabled, frameWidth]),
173
+ handleLayout = function (e) {
174
+ var next = e.nativeEvent.layout.width;
175
+ next !== frameWidth && setFrameInnerWidth(next);
176
+ },
177
+ _styledContext_unstyled,
178
+ _ref3,
179
+ unstyled = (_ref3 = (_styledContext_unstyled = styledContext.unstyled) !== null && _styledContext_unstyled !== void 0 ? _styledContext_unstyled : props.unstyled) !== null && _ref3 !== void 0 ? _ref3 : !1,
180
+ _styledContext_size,
181
+ _ref4;
182
+ return /* @__PURE__ */(0, import_jsx_runtime.jsxs)(SwitchContext.Provider, {
183
+ value,
184
+ children: [/* @__PURE__ */(0, import_jsx_runtime.jsx)(Frame, {
101
185
  ref: switchRef,
102
186
  tag: "button",
103
- ...isWeb && {
187
+ ...(import_core.isWeb && {
104
188
  type: "button"
105
- },
106
- ...!unstyled && {
189
+ }),
190
+ ...(!unstyled && {
107
191
  size: (_ref4 = (_styledContext_size = styledContext.size) !== null && _styledContext_size !== void 0 ? _styledContext_size : props.size) !== null && _ref4 !== void 0 ? _ref4 : "$true"
108
- },
192
+ }),
109
193
  unstyled,
110
194
  ...props,
111
195
  ...switchProps,
112
- ...!disableActiveTheme && !props.unstyled && {
196
+ ...(!disableActiveTheme && !props.unstyled && {
113
197
  theme: checked ? "active" : null
114
- },
198
+ }),
115
199
  // expected variants
116
200
  checked,
117
201
  disabled,
118
- children: /* @__PURE__ */ _jsx(View, {
202
+ children: /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_react_native.View, {
119
203
  style: measureContainerStyle,
120
204
  onLayout: handleLayout,
121
205
  children: frameWidth ? props.children : null
122
206
  })
123
- }),
124
- bubbleInput
125
- ]
207
+ }), bubbleInput]
208
+ });
209
+ }, {
210
+ disableTheme: !0
126
211
  });
127
- }, {
128
- disableTheme: !0
129
- });
130
- return withStaticProperties(SwitchComponent, {
212
+ return (0, import_core.withStaticProperties)(SwitchComponent, {
131
213
  Thumb: SwitchThumbComponent
132
214
  });
133
215
  }
@@ -135,8 +217,4 @@ var measureContainerStyle = {
135
217
  alignSelf: "stretch",
136
218
  flex: 1
137
219
  };
138
- export {
139
- SwitchContext,
140
- createSwitch
141
- };
142
- //# sourceMappingURL=createSwitch.js.map
220
+ //# sourceMappingURL=createSwitch.native.js.map
@@ -1,6 +1 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../src/createSwitch.tsx"],
4
- "mappings": "AAAA,SAAS,OAAO,MAAM,QAAQ,aAAa;AAC3C,SAAS,sBAAsB,mBAAmB,kBAAkB,OAAO,4BAA4B,4BAA4B;AACnI,SAAS,yBAAyB;AAClC,SAAS,iBAAiB;AAC1B,SAAS,4BAA4B;AACrC,YAAY,WAAW;AACvB,SAAS,UAAU,cAAc,YAAY;AAC7C,SAAS,2BAA2B;AACpC,SAAS,eAAe,oBAAoB,mBAAmB;AACxD,IAAI,gBAA8B,sBAAM,cAAc;AAAA,EACzD,SAAS;AAAA,EACT,UAAU;AAAA,EACV,YAAY;AAChB,CAAC;AACM,SAAS,aAAa,aAAa;AACtC,MAAI,EAAE,oBAAoB,QAAQ,oBAA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UACpL;AAAA,UACA;AAAA,UACA,GAAG;AAAA,UACH,GAAG;AAAA,UACH,GAAG,CAAC,sBAAsB,CAAC,MAAM,YAAY;AAAA,YACzC,OAAO,UAAU,WAAW;AAAA,UAChC;AAAA;AAAA,UAEA;AAAA,UACA;AAAA,UACA,UAAwB,qBAAK,MAAM;AAAA,YAC/B,OAAO;AAAA,YACP,UAAU;AAAA,YACV,UAAW,aAAoB,MAAM,WAAb;AAAA,UAC5B,CAAC;AAAA,QACL,CAAC;AAAA,QACD;AAAA,MACJ;AAAA,IACJ,CAAC;AAAA,EACL,GAAG;AAAA,IACC,cAAc;AAAA,EAClB,CAAC;AACD,SAAO,qBAAqB,iBAAiB;AAAA,IACzC,OAAO;AAAA,EACX,CAAC;AACL;AACA,IAAI,wBAAwB;AAAA,EACxB,WAAW;AAAA,EACX,MAAM;AACV;",
5
- "names": ["value"]
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","createSwitch_exports","SwitchContext","createSwitch","module","exports","import_jsx_runtime","require","import_core","import_focusable","import_switch_headless","import_use_controllable_state","React","import_react_native","import_StyledContext","import_Switch","createContext","checked","disabled","frameWidth","createProps","disableActiveTheme","Frame","SwitchFrame","Thumb","SwitchThumb","process","env","NODE_ENV","staticConfig","context","SwitchStyledContext","console","warn","SwitchThumbComponent","styleable","props","forwardedRef","size","sizeProp","unstyled","unstyledProp","nativeID","thumbProps","useContext","styledContext","useStyledContext","unstyledContext","sizeContext","_ref","TAMAGUI_HEADLESS","_ref1","initialChecked","useRef","current","initialWidth","getVariableValue","width","thumbWidth","setThumbWidth","useState","distance","x","jsx","ref","theme","alignSelf","onLayout","composeEventHandlers","e","next","nativeEvent","layout","SwitchComponent","_props","native","nativeProps","checkedProp","defaultChecked","onCheckedChange","setChecked","useControllableState","prop","defaultProp","onChange","transition","estimatedInitialWidth","estWidth","getShorthandValue","_getShorthandValue","estPad","_getShorthandValue1","estLeftPad","_getShorthandValue2","_ref2","estRightPad","setFrameInnerWidth","switchProps","bubbleInput","switchRef","useSwitch","useEffect","id","registerFocusable","focusAndSelect","value2","focus","renderNative","shouldRenderNativePlatform","Switch","onValueChange","useMemo","handleLayout","_styledContext_unstyled","_ref3","_styledContext_size","_ref4","jsxs","Provider","children","tag","isWeb","type"],"sources":["../../src/createSwitch.tsx"],"sourcesContent":[null],"mappings":"AACA;;AAAA,IACEA,QAAA,GAAAC,MAAA,CAAAC,MAAA;AAAA,IACAC,SAAA,GAAAF,MAAA,CAAAG,cAAA;AAAA,IACAC,gBAAA,GAAAJ,MAAA,CAAAK,wBAAA;AAAA,IACAC,iBAAA,GAAAN,MAAA,CAAAO,mBAAA;AAAA,IACAC,YAAA,GAAAR,MAAA,CAAAS,cAAA;EAAAC,YAAA,GAAAV,MAAA,CAAAW,SAAA,CAAAC,cAAA;AAAA,IACAC,QAAA,GAAAA,CAAAC,MAAA,EAAAC,GAAA;IAAA,KACK,IAAAC,IAAA,IAAAD,GAAA,EACPb,SAAkC,CAAAY,MAAA,EAAAE,IAAA;MAAAC,GAAA,EAAAF,GAAA,CAAAC,IAAA;MAAAE,UAAA;IAAA;EAKlC;EAAAC,WAAS,GAAAA,CAAAC,EAAA,EAAAC,IAAiB,EAAAC,MAAA,EAAAC,IAAA;IAC1B,IAAAF,IAAS,WAAAA,IAAA,YAA4B,WAAAA,IAAA,gBACrC,SAAYG,GAAA,IAAAlB,iBAAW,CAAAe,IAAA,GAMvB,CAAAX,YAAmB,CAAAe,IAAA,CAAAL,EAAA,EAAAI,GAAA,CAAc,IAAAA,GAAA,KAAYF,MAAA,IAAApB,SAAA,CAAAkB,EAAA,EAAAI,GAAA;MAAAP,GAAA,EAAAA,CAAA,KAAAI,IAAA,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QAAAvH,KACH;QAEJwH,QAAA,GACA,mBAAAjH,kBAAA,CAAAyD,GAAA,EAAAzC,KAAA;UACE0C,GAAA,EAAAmC,SAAc;UAChBqB,GAAA;UACF,IAAAhH,WAAA,CAAAiH,KAAA;YAEOC,IAAA;UACL,CAAO;UACR,KAAAlF,QAAA;YACHF,IAAA,GAAA8E,KAAA,IAAAD,mBAAA,GAAAtE,aAAA,CAAAP,IAAA,cAAA6E,mBAAA,cAAAA,mBAAA,GAAA/E,KAAA,CAAAE,IAAA,cAAA8E,KAAA,cAAAA,KAAA;UAEM;UACJ5E,QAAW;UACL,GAAAJ,KAAA;UACR,GAAA6D,WAAA","ignoreList":[]}
@@ -1,13 +1,38 @@
1
- import { createSwitch } from "./createSwitch";
2
- import { SwitchFrame, SwitchThumb } from "./Switch";
3
- export * from "./createSwitch";
4
- export * from "./StyledContext";
5
- export * from "./Switch";
6
- var Switch = createSwitch({
7
- Frame: SwitchFrame,
8
- Thumb: SwitchThumb
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 __export = (target, all) => {
8
+ for (var name in all) __defProp(target, name, {
9
+ get: all[name],
10
+ enumerable: !0
11
+ });
12
+ },
13
+ __copyProps = (to, from, except, desc) => {
14
+ if (from && typeof from == "object" || typeof from == "function") for (let key of __getOwnPropNames(from)) !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, {
15
+ get: () => from[key],
16
+ enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
17
+ });
18
+ return to;
19
+ },
20
+ __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
21
+ var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
22
+ value: !0
23
+ }), mod);
24
+ var index_exports = {};
25
+ __export(index_exports, {
26
+ Switch: () => Switch
9
27
  });
10
- export {
11
- Switch
12
- };
13
- //# sourceMappingURL=index.js.map
28
+ module.exports = __toCommonJS(index_exports);
29
+ var import_createSwitch = require("./createSwitch.native.js"),
30
+ import_Switch = require("./Switch.native.js");
31
+ __reExport(index_exports, require("./createSwitch.native.js"), module.exports);
32
+ __reExport(index_exports, require("./StyledContext.native.js"), module.exports);
33
+ __reExport(index_exports, require("./Switch.native.js"), module.exports);
34
+ var Switch = (0, import_createSwitch.createSwitch)({
35
+ Frame: import_Switch.SwitchFrame,
36
+ Thumb: import_Switch.SwitchThumb
37
+ });
38
+ //# sourceMappingURL=index.native.js.map
@@ -1,6 +1 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../src/index.ts"],
4
- "mappings": "AAAA,SAAS,oBAAoB;AAC7B,SAAS,aAAa,mBAAmB;AACzC,cAAc;AACd,cAAc;AACd,cAAc;AAWH,IAAI,SAAS,aAAa;AAAA,EACjC,OAAO;AAAA,EACP,OAAO;AACX,CAAC;",
5
- "names": []
6
- }
1
+ {"version":3,"names":["__defProp","Object","defineProperty","__getOwnPropDesc","getOwnPropertyDescriptor","__getOwnPropNames","getOwnPropertyNames","__hasOwnProp","prototype","hasOwnProperty","__export","target","all","name","get","enumerable","__copyProps","to","from","except","desc"],"sources":["../../src/index.ts"],"sourcesContent":[null],"mappings":"AAAA,YAAS;;AACT,IAAAA,SAAS,GAAAC,MAAa,CAAAC,cAAA;AAEtB,IAAAC,gBAAc,GAAAF,MAAA,CAAAG,wBAAA;AACd,IAAAC,iBAAc,GAAAJ,MAAA,CAAAK,mBAAA;AACd,IAAAC,YAAc,GAAAN,MAAA,CAAAO,SAAA,CAAAC,cAAA;AAaP,IAAAC,QAAM,GAASA,CAAAC,MAAA,EAAAC,GAAA,KAAa;IACjC,SAAOC,IAAA,IAAAD,GAAA,EACPZ,SAAO,CAAAW,MAAA,EAAAE,IAAA;MAAAC,GAAA,EAAAF,GAAA,CAAAC,IAAA;MAAAE,UAAA;IAAA;EACT,CAAC;EAAAC,WAAA,GAAAA,CAAAC,EAAA,EAAAC,IAAA,EAAAC,MAAA,EAAAC,IAAA","ignoreList":[]}
package/package.json CHANGED
@@ -1,6 +1,7 @@
1
1
  {
2
2
  "name": "@tamagui/switch",
3
- "version": "1.135.4",
3
+ "version": "1.135.6",
4
+ "type": "module",
4
5
  "removeSideEffects": true,
5
6
  "sideEffects": [
6
7
  "*.css"
@@ -37,24 +38,24 @@
37
38
  }
38
39
  },
39
40
  "dependencies": {
40
- "@tamagui/compose-refs": "1.135.4",
41
- "@tamagui/constants": "1.135.4",
42
- "@tamagui/core": "1.135.4",
43
- "@tamagui/focusable": "1.135.4",
44
- "@tamagui/get-token": "1.135.4",
45
- "@tamagui/helpers": "1.135.4",
46
- "@tamagui/label": "1.135.4",
47
- "@tamagui/stacks": "1.135.4",
48
- "@tamagui/switch-headless": "1.135.4",
49
- "@tamagui/use-controllable-state": "1.135.4",
50
- "@tamagui/use-previous": "1.135.4"
41
+ "@tamagui/compose-refs": "1.135.6",
42
+ "@tamagui/constants": "1.135.6",
43
+ "@tamagui/core": "1.135.6",
44
+ "@tamagui/focusable": "1.135.6",
45
+ "@tamagui/get-token": "1.135.6",
46
+ "@tamagui/helpers": "1.135.6",
47
+ "@tamagui/label": "1.135.6",
48
+ "@tamagui/stacks": "1.135.6",
49
+ "@tamagui/switch-headless": "1.135.6",
50
+ "@tamagui/use-controllable-state": "1.135.6",
51
+ "@tamagui/use-previous": "1.135.6"
51
52
  },
52
53
  "peerDependencies": {
53
54
  "react": "*",
54
55
  "react-native": "*"
55
56
  },
56
57
  "devDependencies": {
57
- "@tamagui/build": "1.135.4",
58
+ "@tamagui/build": "1.135.6",
58
59
  "react": "*",
59
60
  "react-native": "^0.79.2"
60
61
  },