tamagui 1.132.12 → 1.132.14
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/native.js +572 -567
- package/dist/native.js.map +3 -3
- package/dist/test.native.js +561 -555
- package/dist/test.native.js.map +3 -3
- package/package.json +55 -55
package/dist/native.js
CHANGED
|
@@ -35,8 +35,166 @@ var require_polyfill_dev = __commonJS({
|
|
|
35
35
|
}
|
|
36
36
|
});
|
|
37
37
|
|
|
38
|
-
// ../../
|
|
38
|
+
// ../../packages/fake-react-native/index.js
|
|
39
|
+
var require_fake_react_native = __commonJS({
|
|
40
|
+
"../../packages/fake-react-native/index.js"(exports2, module2) {
|
|
41
|
+
module2.exports = proxyWorm();
|
|
42
|
+
function proxyWorm() {
|
|
43
|
+
return new Proxy({
|
|
44
|
+
StyleSheet: {
|
|
45
|
+
create() {
|
|
46
|
+
}
|
|
47
|
+
},
|
|
48
|
+
Platform: {
|
|
49
|
+
OS: "web"
|
|
50
|
+
},
|
|
51
|
+
Image: "Image",
|
|
52
|
+
View: "View",
|
|
53
|
+
Text: "Text",
|
|
54
|
+
TextInput: "TextInput",
|
|
55
|
+
ScrollView: "ScrollView",
|
|
56
|
+
Dimensions: {
|
|
57
|
+
addEventListener(cb) {
|
|
58
|
+
}
|
|
59
|
+
},
|
|
60
|
+
addPoolingTo() {
|
|
61
|
+
}
|
|
62
|
+
}, {
|
|
63
|
+
get(target, key) {
|
|
64
|
+
return Reflect.get(target, key) || proxyWorm();
|
|
65
|
+
},
|
|
66
|
+
apply() {
|
|
67
|
+
return proxyWorm();
|
|
68
|
+
}
|
|
69
|
+
});
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
});
|
|
73
|
+
|
|
74
|
+
// ../../core/constants/dist/cjs/constants.native.js
|
|
75
|
+
var require_constants_native = __commonJS({
|
|
76
|
+
"../../core/constants/dist/cjs/constants.native.js"(exports2, module2) {
|
|
77
|
+
"use strict";
|
|
78
|
+
var __defProp2 = Object.defineProperty, __getOwnPropDesc2 = Object.getOwnPropertyDescriptor, __getOwnPropNames2 = Object.getOwnPropertyNames, __hasOwnProp2 = Object.prototype.hasOwnProperty, __export2 = function(target, all) {
|
|
79
|
+
for (var name in all) __defProp2(target, name, {
|
|
80
|
+
get: all[name],
|
|
81
|
+
enumerable: !0
|
|
82
|
+
});
|
|
83
|
+
}, __copyProps2 = function(to, from, except, desc) {
|
|
84
|
+
var _iteratorNormalCompletion = !0, _didIteratorError = !1, _iteratorError = void 0;
|
|
85
|
+
if (from && typeof from == "object" || typeof from == "function") try {
|
|
86
|
+
for (var _loop = function() {
|
|
87
|
+
var key = _step.value;
|
|
88
|
+
!__hasOwnProp2.call(to, key) && key !== except && __defProp2(to, key, {
|
|
89
|
+
get: function() {
|
|
90
|
+
return from[key];
|
|
91
|
+
},
|
|
92
|
+
enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable
|
|
93
|
+
});
|
|
94
|
+
}, _iterator = __getOwnPropNames2(from)[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = !0) _loop();
|
|
95
|
+
} catch (err) {
|
|
96
|
+
_didIteratorError = !0, _iteratorError = err;
|
|
97
|
+
} finally {
|
|
98
|
+
try {
|
|
99
|
+
!_iteratorNormalCompletion && _iterator.return != null && _iterator.return();
|
|
100
|
+
} finally {
|
|
101
|
+
if (_didIteratorError)
|
|
102
|
+
throw _iteratorError;
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
return to;
|
|
106
|
+
}, __toCommonJS2 = function(mod) {
|
|
107
|
+
return __copyProps2(__defProp2({}, "__esModule", {
|
|
108
|
+
value: !0
|
|
109
|
+
}), mod);
|
|
110
|
+
}, constants_native_exports = {};
|
|
111
|
+
__export2(constants_native_exports, {
|
|
112
|
+
IS_REACT_19: function() {
|
|
113
|
+
return IS_REACT_19;
|
|
114
|
+
},
|
|
115
|
+
currentPlatform: function() {
|
|
116
|
+
return currentPlatform;
|
|
117
|
+
},
|
|
118
|
+
isAndroid: function() {
|
|
119
|
+
return isAndroid;
|
|
120
|
+
},
|
|
121
|
+
isChrome: function() {
|
|
122
|
+
return isChrome2;
|
|
123
|
+
},
|
|
124
|
+
isClient: function() {
|
|
125
|
+
return isClient2;
|
|
126
|
+
},
|
|
127
|
+
isIos: function() {
|
|
128
|
+
return isIos;
|
|
129
|
+
},
|
|
130
|
+
isServer: function() {
|
|
131
|
+
return isServer2;
|
|
132
|
+
},
|
|
133
|
+
isTouchable: function() {
|
|
134
|
+
return isTouchable2;
|
|
135
|
+
},
|
|
136
|
+
isWeb: function() {
|
|
137
|
+
return isWeb6;
|
|
138
|
+
},
|
|
139
|
+
isWebTouchable: function() {
|
|
140
|
+
return isWebTouchable2;
|
|
141
|
+
},
|
|
142
|
+
isWindowDefined: function() {
|
|
143
|
+
return isWindowDefined;
|
|
144
|
+
},
|
|
145
|
+
useIsomorphicLayoutEffect: function() {
|
|
146
|
+
return useIsomorphicLayoutEffect2;
|
|
147
|
+
}
|
|
148
|
+
});
|
|
149
|
+
module2.exports = __toCommonJS2(constants_native_exports);
|
|
150
|
+
var import_react3 = require("react"), import_react22 = require("react"), import_react_native4 = require_fake_react_native(), IS_REACT_19 = !!import_react22.use, isWeb6 = !1, isWindowDefined = !1, isServer2 = !1, isClient2 = !1, useIsomorphicLayoutEffect2 = import_react3.useLayoutEffect, isChrome2 = !1, isWebTouchable2 = !1, isTouchable2 = !0, isAndroid = import_react_native4.Platform.OS === "android" || process.env.TEST_NATIVE_PLATFORM === "android", isIos = import_react_native4.Platform.OS === "ios" || process.env.TEST_NATIVE_PLATFORM === "ios", platforms = {
|
|
151
|
+
ios: "ios",
|
|
152
|
+
android: "android"
|
|
153
|
+
}, currentPlatform = platforms[import_react_native4.Platform.OS] || "native";
|
|
154
|
+
}
|
|
155
|
+
});
|
|
156
|
+
|
|
157
|
+
// ../../core/constants/dist/cjs/index.native.js
|
|
39
158
|
var require_index_native = __commonJS({
|
|
159
|
+
"../../core/constants/dist/cjs/index.native.js"(exports2, module2) {
|
|
160
|
+
"use strict";
|
|
161
|
+
var __defProp2 = Object.defineProperty, __getOwnPropDesc2 = Object.getOwnPropertyDescriptor, __getOwnPropNames2 = Object.getOwnPropertyNames, __hasOwnProp2 = Object.prototype.hasOwnProperty, __copyProps2 = function(to, from, except, desc) {
|
|
162
|
+
var _iteratorNormalCompletion = !0, _didIteratorError = !1, _iteratorError = void 0;
|
|
163
|
+
if (from && typeof from == "object" || typeof from == "function") try {
|
|
164
|
+
for (var _loop = function() {
|
|
165
|
+
var key = _step.value;
|
|
166
|
+
!__hasOwnProp2.call(to, key) && key !== except && __defProp2(to, key, {
|
|
167
|
+
get: function() {
|
|
168
|
+
return from[key];
|
|
169
|
+
},
|
|
170
|
+
enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable
|
|
171
|
+
});
|
|
172
|
+
}, _iterator = __getOwnPropNames2(from)[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = !0) _loop();
|
|
173
|
+
} catch (err) {
|
|
174
|
+
_didIteratorError = !0, _iteratorError = err;
|
|
175
|
+
} finally {
|
|
176
|
+
try {
|
|
177
|
+
!_iteratorNormalCompletion && _iterator.return != null && _iterator.return();
|
|
178
|
+
} finally {
|
|
179
|
+
if (_didIteratorError)
|
|
180
|
+
throw _iteratorError;
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
return to;
|
|
184
|
+
}, __reExport2 = function(target, mod, secondTarget) {
|
|
185
|
+
return __copyProps2(target, mod, "default"), secondTarget && __copyProps2(secondTarget, mod, "default");
|
|
186
|
+
}, __toCommonJS2 = function(mod) {
|
|
187
|
+
return __copyProps2(__defProp2({}, "__esModule", {
|
|
188
|
+
value: !0
|
|
189
|
+
}), mod);
|
|
190
|
+
}, index_exports2 = {};
|
|
191
|
+
module2.exports = __toCommonJS2(index_exports2);
|
|
192
|
+
__reExport2(index_exports2, require_constants_native(), module2.exports);
|
|
193
|
+
}
|
|
194
|
+
});
|
|
195
|
+
|
|
196
|
+
// ../../core/use-force-update/dist/cjs/index.native.js
|
|
197
|
+
var require_index_native2 = __commonJS({
|
|
40
198
|
"../../core/use-force-update/dist/cjs/index.native.js"(exports2, module2) {
|
|
41
199
|
"use strict";
|
|
42
200
|
var __create2 = Object.create, __defProp2 = Object.defineProperty, __getOwnPropDesc2 = Object.getOwnPropertyDescriptor, __getOwnPropNames2 = Object.getOwnPropertyNames, __getProtoOf2 = Object.getPrototypeOf, __hasOwnProp2 = Object.prototype.hasOwnProperty, __export2 = function(target, all) {
|
|
@@ -163,7 +321,7 @@ var require_LayoutGroupContext_native = __commonJS({
|
|
|
163
321
|
});
|
|
164
322
|
|
|
165
323
|
// ../../core/use-constant/dist/cjs/index.native.js
|
|
166
|
-
var
|
|
324
|
+
var require_index_native3 = __commonJS({
|
|
167
325
|
"../../core/use-constant/dist/cjs/index.native.js"(exports2, module2) {
|
|
168
326
|
"use strict";
|
|
169
327
|
var __create2 = Object.create, __defProp2 = Object.defineProperty, __getOwnPropDesc2 = Object.getOwnPropertyDescriptor, __getOwnPropNames2 = Object.getOwnPropertyNames, __getProtoOf2 = Object.getPrototypeOf, __hasOwnProp2 = Object.prototype.hasOwnProperty, __export2 = function(target, all) {
|
|
@@ -394,7 +552,7 @@ var require_usePresence_native = __commonJS({
|
|
|
394
552
|
});
|
|
395
553
|
|
|
396
554
|
// ../../core/use-presence/dist/cjs/index.native.js
|
|
397
|
-
var
|
|
555
|
+
var require_index_native4 = __commonJS({
|
|
398
556
|
"../../core/use-presence/dist/cjs/index.native.js"(exports2, module2) {
|
|
399
557
|
"use strict";
|
|
400
558
|
var __defProp2 = Object.defineProperty, __getOwnPropDesc2 = Object.getOwnPropertyDescriptor, __getOwnPropNames2 = Object.getOwnPropertyNames, __hasOwnProp2 = Object.prototype.hasOwnProperty, __export2 = function(target, all) {
|
|
@@ -507,7 +665,7 @@ var require_PresenceChild_native = __commonJS({
|
|
|
507
665
|
}
|
|
508
666
|
});
|
|
509
667
|
module2.exports = __toCommonJS2(PresenceChild_exports);
|
|
510
|
-
var import_jsx_runtime6 = require("react/jsx-runtime"), import_use_constant =
|
|
668
|
+
var import_jsx_runtime6 = require("react/jsx-runtime"), import_use_constant = require_index_native3(), import_use_presence = require_index_native4(), React4 = __toESM2(require("react")), import_react3 = require("react"), PresenceChild = /* @__PURE__ */ React4.memo(function(param) {
|
|
511
669
|
var { children, initial, isPresent: isPresent2, onExitComplete, exitVariant, enterVariant, enterExitVariant, presenceAffectsLayout, custom } = param, presenceChildren = (0, import_use_constant.useConstant)(newChildrenMap), id = (0, import_react3.useId)() || "", context = React4.useMemo(
|
|
512
670
|
function() {
|
|
513
671
|
return {
|
|
@@ -620,7 +778,7 @@ var require_AnimatePresence_native = __commonJS({
|
|
|
620
778
|
}
|
|
621
779
|
});
|
|
622
780
|
module2.exports = __toCommonJS2(AnimatePresence_exports);
|
|
623
|
-
var import_jsx_runtime6 = require("react/jsx-runtime"),
|
|
781
|
+
var import_jsx_runtime6 = require("react/jsx-runtime"), import_constants4 = require_index_native(), import_use_force_update = require_index_native2(), import_react3 = require("react"), import_LayoutGroupContext = require_LayoutGroupContext_native(), import_PresenceChild = require_PresenceChild_native(), getChildKey = function(child) {
|
|
624
782
|
return child.key || "";
|
|
625
783
|
};
|
|
626
784
|
function updateChildLookup(children, allChildren) {
|
|
@@ -642,7 +800,9 @@ var require_AnimatePresence_native = __commonJS({
|
|
|
642
800
|
if (passThrough) return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_jsx_runtime6.Fragment, {
|
|
643
801
|
children
|
|
644
802
|
});
|
|
645
|
-
if (
|
|
803
|
+
if ((0, import_constants4.useIsomorphicLayoutEffect)(function() {
|
|
804
|
+
isInitialRender.current = !1;
|
|
805
|
+
}, []), isInitialRender.current) return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_jsx_runtime6.Fragment, {
|
|
646
806
|
children: filteredChildren.map(function(child) {
|
|
647
807
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_PresenceChild.PresenceChild, {
|
|
648
808
|
isPresent: !0,
|
|
@@ -746,7 +906,7 @@ var require_types_native = __commonJS({
|
|
|
746
906
|
});
|
|
747
907
|
|
|
748
908
|
// ../animate-presence/dist/cjs/index.native.js
|
|
749
|
-
var
|
|
909
|
+
var require_index_native5 = __commonJS({
|
|
750
910
|
"../animate-presence/dist/cjs/index.native.js"(exports2, module2) {
|
|
751
911
|
"use strict";
|
|
752
912
|
var __defProp2 = Object.defineProperty, __getOwnPropDesc2 = Object.getOwnPropertyDescriptor, __getOwnPropNames2 = Object.getOwnPropertyNames, __hasOwnProp2 = Object.prototype.hasOwnProperty, __copyProps2 = function(to, from, except, desc) {
|
|
@@ -781,14 +941,14 @@ var require_index_native4 = __commonJS({
|
|
|
781
941
|
}, index_exports2 = {};
|
|
782
942
|
module2.exports = __toCommonJS2(index_exports2);
|
|
783
943
|
__reExport2(index_exports2, require_AnimatePresence_native(), module2.exports);
|
|
784
|
-
__reExport2(index_exports2,
|
|
944
|
+
__reExport2(index_exports2, require_index_native4(), module2.exports);
|
|
785
945
|
__reExport2(index_exports2, require_types_native(), module2.exports);
|
|
786
946
|
__reExport2(index_exports2, require_PresenceChild_native(), module2.exports);
|
|
787
947
|
}
|
|
788
948
|
});
|
|
789
949
|
|
|
790
950
|
// ../../core/simple-hash/dist/cjs/index.native.js
|
|
791
|
-
var
|
|
951
|
+
var require_index_native6 = __commonJS({
|
|
792
952
|
"../../core/simple-hash/dist/cjs/index.native.js"(exports2, module2) {
|
|
793
953
|
"use strict";
|
|
794
954
|
var __defProp2 = Object.defineProperty, __getOwnPropDesc2 = Object.getOwnPropertyDescriptor, __getOwnPropNames2 = Object.getOwnPropertyNames, __hasOwnProp2 = Object.prototype.hasOwnProperty, __export2 = function(target, all) {
|
|
@@ -910,9 +1070,9 @@ var require_clamp_native = __commonJS({
|
|
|
910
1070
|
}
|
|
911
1071
|
});
|
|
912
1072
|
module2.exports = __toCommonJS2(clamp_exports);
|
|
913
|
-
function clamp(
|
|
1073
|
+
function clamp(value2, param) {
|
|
914
1074
|
var [min, max] = param;
|
|
915
|
-
return Math.min(max, Math.max(min,
|
|
1075
|
+
return Math.min(max, Math.max(min, value2));
|
|
916
1076
|
}
|
|
917
1077
|
}
|
|
918
1078
|
});
|
|
@@ -1115,164 +1275,6 @@ var require_types_native2 = __commonJS({
|
|
|
1115
1275
|
}
|
|
1116
1276
|
});
|
|
1117
1277
|
|
|
1118
|
-
// ../../packages/fake-react-native/index.js
|
|
1119
|
-
var require_fake_react_native = __commonJS({
|
|
1120
|
-
"../../packages/fake-react-native/index.js"(exports2, module2) {
|
|
1121
|
-
module2.exports = proxyWorm();
|
|
1122
|
-
function proxyWorm() {
|
|
1123
|
-
return new Proxy({
|
|
1124
|
-
StyleSheet: {
|
|
1125
|
-
create() {
|
|
1126
|
-
}
|
|
1127
|
-
},
|
|
1128
|
-
Platform: {
|
|
1129
|
-
OS: "web"
|
|
1130
|
-
},
|
|
1131
|
-
Image: "Image",
|
|
1132
|
-
View: "View",
|
|
1133
|
-
Text: "Text",
|
|
1134
|
-
TextInput: "TextInput",
|
|
1135
|
-
ScrollView: "ScrollView",
|
|
1136
|
-
Dimensions: {
|
|
1137
|
-
addEventListener(cb) {
|
|
1138
|
-
}
|
|
1139
|
-
},
|
|
1140
|
-
addPoolingTo() {
|
|
1141
|
-
}
|
|
1142
|
-
}, {
|
|
1143
|
-
get(target, key) {
|
|
1144
|
-
return Reflect.get(target, key) || proxyWorm();
|
|
1145
|
-
},
|
|
1146
|
-
apply() {
|
|
1147
|
-
return proxyWorm();
|
|
1148
|
-
}
|
|
1149
|
-
});
|
|
1150
|
-
}
|
|
1151
|
-
}
|
|
1152
|
-
});
|
|
1153
|
-
|
|
1154
|
-
// ../../core/constants/dist/cjs/constants.native.js
|
|
1155
|
-
var require_constants_native = __commonJS({
|
|
1156
|
-
"../../core/constants/dist/cjs/constants.native.js"(exports2, module2) {
|
|
1157
|
-
"use strict";
|
|
1158
|
-
var __defProp2 = Object.defineProperty, __getOwnPropDesc2 = Object.getOwnPropertyDescriptor, __getOwnPropNames2 = Object.getOwnPropertyNames, __hasOwnProp2 = Object.prototype.hasOwnProperty, __export2 = function(target, all) {
|
|
1159
|
-
for (var name in all) __defProp2(target, name, {
|
|
1160
|
-
get: all[name],
|
|
1161
|
-
enumerable: !0
|
|
1162
|
-
});
|
|
1163
|
-
}, __copyProps2 = function(to, from, except, desc) {
|
|
1164
|
-
var _iteratorNormalCompletion = !0, _didIteratorError = !1, _iteratorError = void 0;
|
|
1165
|
-
if (from && typeof from == "object" || typeof from == "function") try {
|
|
1166
|
-
for (var _loop = function() {
|
|
1167
|
-
var key = _step.value;
|
|
1168
|
-
!__hasOwnProp2.call(to, key) && key !== except && __defProp2(to, key, {
|
|
1169
|
-
get: function() {
|
|
1170
|
-
return from[key];
|
|
1171
|
-
},
|
|
1172
|
-
enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable
|
|
1173
|
-
});
|
|
1174
|
-
}, _iterator = __getOwnPropNames2(from)[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = !0) _loop();
|
|
1175
|
-
} catch (err) {
|
|
1176
|
-
_didIteratorError = !0, _iteratorError = err;
|
|
1177
|
-
} finally {
|
|
1178
|
-
try {
|
|
1179
|
-
!_iteratorNormalCompletion && _iterator.return != null && _iterator.return();
|
|
1180
|
-
} finally {
|
|
1181
|
-
if (_didIteratorError)
|
|
1182
|
-
throw _iteratorError;
|
|
1183
|
-
}
|
|
1184
|
-
}
|
|
1185
|
-
return to;
|
|
1186
|
-
}, __toCommonJS2 = function(mod) {
|
|
1187
|
-
return __copyProps2(__defProp2({}, "__esModule", {
|
|
1188
|
-
value: !0
|
|
1189
|
-
}), mod);
|
|
1190
|
-
}, constants_native_exports = {};
|
|
1191
|
-
__export2(constants_native_exports, {
|
|
1192
|
-
IS_REACT_19: function() {
|
|
1193
|
-
return IS_REACT_19;
|
|
1194
|
-
},
|
|
1195
|
-
currentPlatform: function() {
|
|
1196
|
-
return currentPlatform;
|
|
1197
|
-
},
|
|
1198
|
-
isAndroid: function() {
|
|
1199
|
-
return isAndroid;
|
|
1200
|
-
},
|
|
1201
|
-
isChrome: function() {
|
|
1202
|
-
return isChrome2;
|
|
1203
|
-
},
|
|
1204
|
-
isClient: function() {
|
|
1205
|
-
return isClient2;
|
|
1206
|
-
},
|
|
1207
|
-
isIos: function() {
|
|
1208
|
-
return isIos;
|
|
1209
|
-
},
|
|
1210
|
-
isServer: function() {
|
|
1211
|
-
return isServer2;
|
|
1212
|
-
},
|
|
1213
|
-
isTouchable: function() {
|
|
1214
|
-
return isTouchable2;
|
|
1215
|
-
},
|
|
1216
|
-
isWeb: function() {
|
|
1217
|
-
return isWeb6;
|
|
1218
|
-
},
|
|
1219
|
-
isWebTouchable: function() {
|
|
1220
|
-
return isWebTouchable2;
|
|
1221
|
-
},
|
|
1222
|
-
isWindowDefined: function() {
|
|
1223
|
-
return isWindowDefined;
|
|
1224
|
-
},
|
|
1225
|
-
useIsomorphicLayoutEffect: function() {
|
|
1226
|
-
return useIsomorphicLayoutEffect2;
|
|
1227
|
-
}
|
|
1228
|
-
});
|
|
1229
|
-
module2.exports = __toCommonJS2(constants_native_exports);
|
|
1230
|
-
var import_react3 = require("react"), import_react22 = require("react"), import_react_native4 = require_fake_react_native(), IS_REACT_19 = !!import_react22.use, isWeb6 = !1, isWindowDefined = !1, isServer2 = !1, isClient2 = !1, useIsomorphicLayoutEffect2 = import_react3.useLayoutEffect, isChrome2 = !1, isWebTouchable2 = !1, isTouchable2 = !0, isAndroid = import_react_native4.Platform.OS === "android" || process.env.TEST_NATIVE_PLATFORM === "android", isIos = import_react_native4.Platform.OS === "ios" || process.env.TEST_NATIVE_PLATFORM === "ios", platforms = {
|
|
1231
|
-
ios: "ios",
|
|
1232
|
-
android: "android"
|
|
1233
|
-
}, currentPlatform = platforms[import_react_native4.Platform.OS] || "native";
|
|
1234
|
-
}
|
|
1235
|
-
});
|
|
1236
|
-
|
|
1237
|
-
// ../../core/constants/dist/cjs/index.native.js
|
|
1238
|
-
var require_index_native6 = __commonJS({
|
|
1239
|
-
"../../core/constants/dist/cjs/index.native.js"(exports2, module2) {
|
|
1240
|
-
"use strict";
|
|
1241
|
-
var __defProp2 = Object.defineProperty, __getOwnPropDesc2 = Object.getOwnPropertyDescriptor, __getOwnPropNames2 = Object.getOwnPropertyNames, __hasOwnProp2 = Object.prototype.hasOwnProperty, __copyProps2 = function(to, from, except, desc) {
|
|
1242
|
-
var _iteratorNormalCompletion = !0, _didIteratorError = !1, _iteratorError = void 0;
|
|
1243
|
-
if (from && typeof from == "object" || typeof from == "function") try {
|
|
1244
|
-
for (var _loop = function() {
|
|
1245
|
-
var key = _step.value;
|
|
1246
|
-
!__hasOwnProp2.call(to, key) && key !== except && __defProp2(to, key, {
|
|
1247
|
-
get: function() {
|
|
1248
|
-
return from[key];
|
|
1249
|
-
},
|
|
1250
|
-
enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable
|
|
1251
|
-
});
|
|
1252
|
-
}, _iterator = __getOwnPropNames2(from)[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = !0) _loop();
|
|
1253
|
-
} catch (err) {
|
|
1254
|
-
_didIteratorError = !0, _iteratorError = err;
|
|
1255
|
-
} finally {
|
|
1256
|
-
try {
|
|
1257
|
-
!_iteratorNormalCompletion && _iterator.return != null && _iterator.return();
|
|
1258
|
-
} finally {
|
|
1259
|
-
if (_didIteratorError)
|
|
1260
|
-
throw _iteratorError;
|
|
1261
|
-
}
|
|
1262
|
-
}
|
|
1263
|
-
return to;
|
|
1264
|
-
}, __reExport2 = function(target, mod, secondTarget) {
|
|
1265
|
-
return __copyProps2(target, mod, "default"), secondTarget && __copyProps2(secondTarget, mod, "default");
|
|
1266
|
-
}, __toCommonJS2 = function(mod) {
|
|
1267
|
-
return __copyProps2(__defProp2({}, "__esModule", {
|
|
1268
|
-
value: !0
|
|
1269
|
-
}), mod);
|
|
1270
|
-
}, index_exports2 = {};
|
|
1271
|
-
module2.exports = __toCommonJS2(index_exports2);
|
|
1272
|
-
__reExport2(index_exports2, require_constants_native(), module2.exports);
|
|
1273
|
-
}
|
|
1274
|
-
});
|
|
1275
|
-
|
|
1276
1278
|
// ../../core/helpers/dist/cjs/shouldRenderNativePlatform.native.js
|
|
1277
1279
|
var require_shouldRenderNativePlatform_native = __commonJS({
|
|
1278
1280
|
"../../core/helpers/dist/cjs/shouldRenderNativePlatform.native.js"(exports2, module2) {
|
|
@@ -1316,7 +1318,7 @@ var require_shouldRenderNativePlatform_native = __commonJS({
|
|
|
1316
1318
|
}
|
|
1317
1319
|
});
|
|
1318
1320
|
module2.exports = __toCommonJS2(shouldRenderNativePlatform_exports);
|
|
1319
|
-
var import_constants4 =
|
|
1321
|
+
var import_constants4 = require_index_native(), ALL_PLATFORMS = [
|
|
1320
1322
|
"web",
|
|
1321
1323
|
"android",
|
|
1322
1324
|
"ios"
|
|
@@ -1422,7 +1424,7 @@ var require_validStyleProps_native = __commonJS({
|
|
|
1422
1424
|
}
|
|
1423
1425
|
});
|
|
1424
1426
|
module2.exports = __toCommonJS2(validStyleProps_exports);
|
|
1425
|
-
var import_constants4 =
|
|
1427
|
+
var import_constants4 = require_index_native(), textColors = {
|
|
1426
1428
|
color: !0,
|
|
1427
1429
|
textDecorationColor: !0,
|
|
1428
1430
|
textShadowColor: !0
|
|
@@ -1771,7 +1773,7 @@ var require_index_native7 = __commonJS({
|
|
|
1771
1773
|
}), mod);
|
|
1772
1774
|
}, index_exports2 = {};
|
|
1773
1775
|
module2.exports = __toCommonJS2(index_exports2);
|
|
1774
|
-
__reExport2(index_exports2,
|
|
1776
|
+
__reExport2(index_exports2, require_index_native6(), module2.exports);
|
|
1775
1777
|
__reExport2(index_exports2, require_clamp_native(), module2.exports);
|
|
1776
1778
|
__reExport2(index_exports2, require_composeEventHandlers_native(), module2.exports);
|
|
1777
1779
|
__reExport2(index_exports2, require_concatClassName_native(), module2.exports);
|
|
@@ -1837,7 +1839,7 @@ var require_useGet_native = __commonJS({
|
|
|
1837
1839
|
}
|
|
1838
1840
|
});
|
|
1839
1841
|
module2.exports = __toCommonJS2(useGet_exports);
|
|
1840
|
-
var import_constants4 =
|
|
1842
|
+
var import_constants4 = require_index_native(), React4 = __toESM2(require("react"));
|
|
1841
1843
|
function useGet2(currentValue, initialValue, forwardToFunction) {
|
|
1842
1844
|
var curRef = React4.useRef(initialValue ?? currentValue);
|
|
1843
1845
|
return (0, import_constants4.useIsomorphicLayoutEffect)(function() {
|
|
@@ -2054,7 +2056,7 @@ var require_useControllableState_native = __commonJS({
|
|
|
2054
2056
|
return _();
|
|
2055
2057
|
};
|
|
2056
2058
|
function useControllableState(param) {
|
|
2057
|
-
var { prop, defaultProp, onChange, strategy = "prop-wins", preventUpdate, transition } = param, [state, setState] = React4.useState(prop ?? defaultProp), previous = React4.useRef(state), propWins = strategy === "prop-wins" && prop !== void 0,
|
|
2059
|
+
var { prop, defaultProp, onChange, strategy = "prop-wins", preventUpdate, transition } = param, [state, setState] = React4.useState(prop ?? defaultProp), previous = React4.useRef(state), propWins = strategy === "prop-wins" && prop !== void 0, value2 = propWins ? prop : state, onChangeCb = (0, import_use_event.useEvent)(onChange || idFn), transitionFn = transition ? import_start_transition.startTransition : emptyCallbackFn;
|
|
2058
2060
|
React4.useEffect(function() {
|
|
2059
2061
|
prop !== void 0 && (previous.current = prop, transitionFn(function() {
|
|
2060
2062
|
setState(prop);
|
|
@@ -2077,7 +2079,7 @@ var require_useControllableState_native = __commonJS({
|
|
|
2077
2079
|
});
|
|
2078
2080
|
});
|
|
2079
2081
|
return [
|
|
2080
|
-
|
|
2082
|
+
value2,
|
|
2081
2083
|
setter
|
|
2082
2084
|
];
|
|
2083
2085
|
}
|
|
@@ -2351,7 +2353,7 @@ var require_config_native = __commonJS({
|
|
|
2351
2353
|
}
|
|
2352
2354
|
});
|
|
2353
2355
|
module2.exports = __toCommonJS2(config_exports);
|
|
2354
|
-
var import_constants4 =
|
|
2356
|
+
var import_constants4 = require_index_native(), import_constants22 = require_constants_native2(), import_loadDuplicatedConfig = require_loadDuplicatedConfig_native(), conf, haventCalledErrorMessage = process.env.NODE_ENV === "development" ? `
|
|
2355
2357
|
Haven't called createTamagui yet. ${import_constants22.MISSING_THEME_MESSAGE}
|
|
2356
2358
|
` : "\u274C Error 001", getSetting2 = function(key) {
|
|
2357
2359
|
if (process.env.NODE_ENV === "development" && !conf) throw new Error(haventCalledErrorMessage);
|
|
@@ -2386,22 +2388,22 @@ Haven't called createTamagui yet. ${import_constants22.MISSING_THEME_MESSAGE}
|
|
|
2386
2388
|
if (process.env.NODE_ENV === "development" && !conf) throw new Error(haventCalledErrorMessage);
|
|
2387
2389
|
var { tokens, tokensParsed } = conf;
|
|
2388
2390
|
return prefixed === !1 ? tokens : prefixed === !0 ? tokensParsed : tokensMerged;
|
|
2389
|
-
}, getTokenObject = function(
|
|
2391
|
+
}, getTokenObject = function(value2, group) {
|
|
2390
2392
|
var _tokensMerged_group, _tokensMerged_, _conf_specificTokens_value;
|
|
2391
|
-
return (_conf_specificTokens_value = conf.specificTokens[
|
|
2392
|
-
return tokensMerged[cat][
|
|
2393
|
-
}) || ""]) === null || _tokensMerged_ === void 0 ? void 0 : _tokensMerged_[
|
|
2394
|
-
}, getToken3 = function(
|
|
2395
|
-
var useVariable = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : import_constants4.isWeb, token = getTokenObject(
|
|
2393
|
+
return (_conf_specificTokens_value = conf.specificTokens[value2]) !== null && _conf_specificTokens_value !== void 0 ? _conf_specificTokens_value : group ? (_tokensMerged_group = tokensMerged[group]) === null || _tokensMerged_group === void 0 ? void 0 : _tokensMerged_group[value2] : (_tokensMerged_ = tokensMerged[Object.keys(tokensMerged).find(function(cat) {
|
|
2394
|
+
return tokensMerged[cat][value2];
|
|
2395
|
+
}) || ""]) === null || _tokensMerged_ === void 0 ? void 0 : _tokensMerged_[value2];
|
|
2396
|
+
}, getToken3 = function(value2, group) {
|
|
2397
|
+
var useVariable = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : import_constants4.isWeb, token = getTokenObject(value2, group);
|
|
2396
2398
|
return useVariable ? token == null ? void 0 : token.variable : token == null ? void 0 : token.val;
|
|
2397
|
-
}, getTokenValue3 = function(
|
|
2398
|
-
if (!(
|
|
2399
|
+
}, getTokenValue3 = function(value2, group) {
|
|
2400
|
+
if (!(value2 === "unset" || value2 === "auto")) return getToken3(value2, group, !1);
|
|
2399
2401
|
}, useTokens = getTokens3, getThemes3 = function() {
|
|
2400
2402
|
return conf.themes;
|
|
2401
2403
|
}, configListeners = /* @__PURE__ */ new Set(), onConfiguredOnce = function(cb) {
|
|
2402
2404
|
conf ? cb(conf) : configListeners.add(cb);
|
|
2403
|
-
}, updateConfig2 = function(key,
|
|
2404
|
-
Object.assign(conf[key],
|
|
2405
|
+
}, updateConfig2 = function(key, value2) {
|
|
2406
|
+
Object.assign(conf[key], value2);
|
|
2405
2407
|
}, getFont = function(name) {
|
|
2406
2408
|
var _Object_entries_find, conf2 = getConfig3(), _conf_fontsParsed_name;
|
|
2407
2409
|
return (_conf_fontsParsed_name = conf2.fontsParsed[name]) !== null && _conf_fontsParsed_name !== void 0 ? _conf_fontsParsed_name : (_Object_entries_find = Object.entries(conf2.fontsParsed).find(function(param) {
|
|
@@ -2488,7 +2490,7 @@ var require_createVariable_native = __commonJS({
|
|
|
2488
2490
|
}
|
|
2489
2491
|
});
|
|
2490
2492
|
module2.exports = __toCommonJS2(createVariable_exports);
|
|
2491
|
-
var import_constants4 =
|
|
2493
|
+
var import_constants4 = require_index_native(), import_helpers = require_index_native7(), import_config = require_config_native();
|
|
2492
2494
|
function constructCSSVariableName(name) {
|
|
2493
2495
|
return `var(--${process.env.TAMAGUI_CSS_VARIABLE_PREFIX || ""}${name})`;
|
|
2494
2496
|
}
|
|
@@ -2543,9 +2545,9 @@ var require_createVariable_native = __commonJS({
|
|
|
2543
2545
|
var name = (0, import_helpers.simpleHash)(nameProp, 60);
|
|
2544
2546
|
return includeVar ? constructCSSVariableName(name) : name;
|
|
2545
2547
|
};
|
|
2546
|
-
function px(
|
|
2548
|
+
function px(value2) {
|
|
2547
2549
|
return {
|
|
2548
|
-
val:
|
|
2550
|
+
val: value2,
|
|
2549
2551
|
needsPx: !0
|
|
2550
2552
|
};
|
|
2551
2553
|
}
|
|
@@ -2622,7 +2624,7 @@ var require_insertStyleRule_native = __commonJS({
|
|
|
2622
2624
|
}
|
|
2623
2625
|
});
|
|
2624
2626
|
module2.exports = __toCommonJS2(insertStyleRule_exports);
|
|
2625
|
-
var import_constants4 =
|
|
2627
|
+
var import_constants4 = require_index_native(), import_helpers = require_index_native7(), import_createVariable = require_createVariable_native(), scannedCache = /* @__PURE__ */ new WeakMap(), totalSelectorsInserted = /* @__PURE__ */ new Map(), allSelectors = {}, allRules = {}, insertedTransforms = {}, getAllSelectors = function() {
|
|
2626
2628
|
return allSelectors;
|
|
2627
2629
|
}, getAllRules = function() {
|
|
2628
2630
|
return Object.values(allRules);
|
|
@@ -2635,8 +2637,8 @@ var require_insertStyleRule_native = __commonJS({
|
|
|
2635
2637
|
process.env.NODE_ENV === "development" && console.error(`\u274C Invalid transform, likely used deg/% improperly ${identifier}`);
|
|
2636
2638
|
return;
|
|
2637
2639
|
}
|
|
2638
|
-
var startI = s + 10, endI = css.indexOf(";"),
|
|
2639
|
-
if (!insertedTransforms[identifier]) return insertedTransforms[identifier] =
|
|
2640
|
+
var startI = s + 10, endI = css.indexOf(";"), value2 = css.slice(startI, endI);
|
|
2641
|
+
if (!insertedTransforms[identifier]) return insertedTransforms[identifier] = value2, !0;
|
|
2640
2642
|
}
|
|
2641
2643
|
var lastScannedSheets = null;
|
|
2642
2644
|
function scanAllSheets() {
|
|
@@ -2751,15 +2753,15 @@ var require_insertStyleRule_native = __commonJS({
|
|
|
2751
2753
|
if (sepI !== -1) {
|
|
2752
2754
|
var varIndex = rule.indexOf("--"), key1 = rule.slice(varIndex === -1 ? 0 : varIndex + 2, sepI);
|
|
2753
2755
|
process.env.TAMAGUI_CSS_VARIABLE_PREFIX && (key1 = key1.replace(process.env.TAMAGUI_CSS_VARIABLE_PREFIX, ""));
|
|
2754
|
-
var val = rule.slice(sepI + 2),
|
|
2756
|
+
var val = rule.slice(sepI + 2), value2 = void 0;
|
|
2755
2757
|
if (val[0] === "v" && val.startsWith("var(")) {
|
|
2756
2758
|
var varName = val.slice(6, -1), tokenVal = colorVarToVal[varName];
|
|
2757
|
-
tokenVal ?
|
|
2758
|
-
} else
|
|
2759
|
+
tokenVal ? value2 = tokenVal : (rootComputedStyle || (rootComputedStyle = getComputedStyle(document.body)), value2 = rootComputedStyle.getPropertyValue("--" + varName));
|
|
2760
|
+
} else value2 = val;
|
|
2759
2761
|
values[key1] = (0, import_createVariable.createVariable)({
|
|
2760
2762
|
key: key1,
|
|
2761
2763
|
name: key1,
|
|
2762
|
-
val:
|
|
2764
|
+
val: value2
|
|
2763
2765
|
}, !0);
|
|
2764
2766
|
}
|
|
2765
2767
|
}
|
|
@@ -3141,7 +3143,7 @@ var require_useMedia_native = __commonJS({
|
|
|
3141
3143
|
}
|
|
3142
3144
|
});
|
|
3143
3145
|
module2.exports = __toCommonJS2(useMedia_exports);
|
|
3144
|
-
var import_constants4 =
|
|
3146
|
+
var import_constants4 = require_index_native(), import_react3 = require("react"), import_config = require_config_native(), import_matchMedia = require_matchMedia_native(), import_pseudoDescriptors = require_pseudoDescriptors_native(), mediaState3 = (
|
|
3145
3147
|
// development only safeguard
|
|
3146
3148
|
process.env.NODE_ENV === "development" ? new Proxy({}, {
|
|
3147
3149
|
get(target, key) {
|
|
@@ -3293,8 +3295,8 @@ var require_useMedia_native = __commonJS({
|
|
|
3293
3295
|
if (typeof query == "string") return query;
|
|
3294
3296
|
if (cache.has(query)) return cache.get(query);
|
|
3295
3297
|
var res = Object.entries(query).map(function(param) {
|
|
3296
|
-
var [feature,
|
|
3297
|
-
return feature = camelToHyphen(feature), typeof
|
|
3298
|
+
var [feature, value2] = param;
|
|
3299
|
+
return feature = camelToHyphen(feature), typeof value2 == "string" ? `(${feature}: ${value2})` : (typeof value2 == "number" && /[height|width]$/.test(feature) && (value2 = `${value2}px`), `(${feature}: ${value2})`);
|
|
3298
3300
|
}).join(" and ");
|
|
3299
3301
|
return key && (cachedMediaKeyToQuery[key] = res), cache.set(query, res), res;
|
|
3300
3302
|
}
|
|
@@ -3385,13 +3387,13 @@ var require_Tamagui_native = __commonJS({
|
|
|
3385
3387
|
function _create_class(Constructor, protoProps, staticProps) {
|
|
3386
3388
|
return protoProps && _defineProperties(Constructor.prototype, protoProps), staticProps && _defineProperties(Constructor, staticProps), Constructor;
|
|
3387
3389
|
}
|
|
3388
|
-
function _define_property(obj, key,
|
|
3390
|
+
function _define_property(obj, key, value2) {
|
|
3389
3391
|
return key in obj ? Object.defineProperty(obj, key, {
|
|
3390
|
-
value,
|
|
3392
|
+
value: value2,
|
|
3391
3393
|
enumerable: !0,
|
|
3392
3394
|
configurable: !0,
|
|
3393
3395
|
writable: !0
|
|
3394
|
-
}) : obj[key] =
|
|
3396
|
+
}) : obj[key] = value2, obj;
|
|
3395
3397
|
}
|
|
3396
3398
|
var Tamagui = function() {
|
|
3397
3399
|
if (process.env.NODE_ENV === "development") {
|
|
@@ -3445,8 +3447,8 @@ var require_Tamagui_native = __commonJS({
|
|
|
3445
3447
|
}
|
|
3446
3448
|
}(), identifierToValue = /* @__PURE__ */ new Map(), getValueFromIdentifier = function(identifier) {
|
|
3447
3449
|
return identifierToValue.get(identifier);
|
|
3448
|
-
}, setIdentifierValue = function(identifier,
|
|
3449
|
-
identifierToValue.set(identifier,
|
|
3450
|
+
}, setIdentifierValue = function(identifier, value2) {
|
|
3451
|
+
identifierToValue.set(identifier, value2);
|
|
3450
3452
|
};
|
|
3451
3453
|
}
|
|
3452
3454
|
});
|
|
@@ -3513,8 +3515,8 @@ var require_compose_refs_native = __commonJS({
|
|
|
3513
3515
|
});
|
|
3514
3516
|
module2.exports = __toCommonJS2(compose_refs_exports);
|
|
3515
3517
|
var React4 = __toESM2(require("react"));
|
|
3516
|
-
function setRef(ref,
|
|
3517
|
-
typeof ref == "function" ? ref(
|
|
3518
|
+
function setRef(ref, value2) {
|
|
3519
|
+
typeof ref == "function" ? ref(value2) : ref && (ref.current = value2);
|
|
3518
3520
|
}
|
|
3519
3521
|
function composeRefs() {
|
|
3520
3522
|
for (var _len = arguments.length, refs = new Array(_len), _key = 0; _key < _len; _key++) refs[_key] = arguments[_key];
|
|
@@ -3841,8 +3843,8 @@ var require_createStyledContext_native = __commonJS({
|
|
|
3841
3843
|
})
|
|
3842
3844
|
});
|
|
3843
3845
|
}, useStyledContext = function() {
|
|
3844
|
-
var scopeIn = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : "", lastScopeInNamespace = (0, import_react3.useContext)(LastScopeInNamespace), scope = namespace ? scopeIn ? getNamespacedScope(scopeIn) : lastScopeInNamespace : scopeIn, context = scope ? getOrCreateScopedContext(scope) : OGContext,
|
|
3845
|
-
return
|
|
3846
|
+
var scopeIn = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : "", lastScopeInNamespace = (0, import_react3.useContext)(LastScopeInNamespace), scope = namespace ? scopeIn ? getNamespacedScope(scopeIn) : lastScopeInNamespace : scopeIn, context = scope ? getOrCreateScopedContext(scope) : OGContext, value2 = import_react3.default.useContext(context);
|
|
3847
|
+
return value2;
|
|
3846
3848
|
};
|
|
3847
3849
|
return Context.Provider = Provider, Context.props = defaultValues, Context.context = OGContext, Context.useStyledContext = useStyledContext, Context;
|
|
3848
3850
|
}
|
|
@@ -5100,7 +5102,7 @@ var require_expandStyles_native = __commonJS({
|
|
|
5100
5102
|
}
|
|
5101
5103
|
});
|
|
5102
5104
|
module2.exports = __toCommonJS2(expandStyles_exports);
|
|
5103
|
-
var import_constants4 =
|
|
5105
|
+
var import_constants4 = require_index_native(), import_normalizeShadow = require_normalizeShadow_native();
|
|
5104
5106
|
function fixStyles(style) {
|
|
5105
5107
|
"elevationAndroid" in style && (style.elevation = style.elevationAndroid, delete style.elevationAndroid), (style.shadowRadius != null || style.shadowColor || style.shadowOpacity != null || style.shadowOffset) && Object.assign(style, (0, import_normalizeShadow.normalizeShadow)(style));
|
|
5106
5108
|
for (var key in borderDefaults) if (key in style) {
|
|
@@ -5216,7 +5218,7 @@ var require_isActivePlatform_native = __commonJS({
|
|
|
5216
5218
|
}
|
|
5217
5219
|
});
|
|
5218
5220
|
module2.exports = __toCommonJS2(isActivePlatform_exports);
|
|
5219
|
-
var import_constants4 =
|
|
5221
|
+
var import_constants4 = require_index_native();
|
|
5220
5222
|
function isActivePlatform(key) {
|
|
5221
5223
|
if (!key.startsWith("$platform")) return !0;
|
|
5222
5224
|
var platform2 = key.slice(10);
|
|
@@ -5381,16 +5383,16 @@ var require_normalizeValueWithProperty_native = __commonJS({
|
|
|
5381
5383
|
}
|
|
5382
5384
|
});
|
|
5383
5385
|
module2.exports = __toCommonJS2(normalizeValueWithProperty_exports);
|
|
5384
|
-
var import_constants4 =
|
|
5386
|
+
var import_constants4 = require_index_native(), import_helpers = require_index_native7(), stylePropsAllPlusTransforms = {
|
|
5385
5387
|
...import_helpers.stylePropsAll,
|
|
5386
5388
|
translateX: !0,
|
|
5387
5389
|
translateY: !0
|
|
5388
5390
|
};
|
|
5389
|
-
function normalizeValueWithProperty(
|
|
5391
|
+
function normalizeValueWithProperty(value2) {
|
|
5390
5392
|
var property = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : "";
|
|
5391
|
-
if (!import_constants4.isWeb || import_helpers.stylePropsUnitless[property] || property && !stylePropsAllPlusTransforms[property] || typeof
|
|
5392
|
-
var res =
|
|
5393
|
-
return
|
|
5393
|
+
if (!import_constants4.isWeb || import_helpers.stylePropsUnitless[property] || property && !stylePropsAllPlusTransforms[property] || typeof value2 == "boolean") return value2;
|
|
5394
|
+
var res = value2;
|
|
5395
|
+
return value2 && typeof value2 == "object" ? value2 : (typeof value2 == "number" ? res = `${value2}px` : property && (res = `${res}`), res);
|
|
5394
5396
|
}
|
|
5395
5397
|
}
|
|
5396
5398
|
});
|
|
@@ -5648,32 +5650,32 @@ var require_expandStyle_native = __commonJS({
|
|
|
5648
5650
|
}
|
|
5649
5651
|
});
|
|
5650
5652
|
module2.exports = __toCommonJS2(expandStyle_exports);
|
|
5651
|
-
var import_constants4 =
|
|
5653
|
+
var import_constants4 = require_index_native(), import_config = require_config_native(), import_webToNativeProps = require_webToNativeProps_native(), _loop = function(parent2) {
|
|
5652
5654
|
var _exec, _exec_index, prefix = parent2.slice(0, (_exec_index = (_exec = /[A-Z]/.exec(parent2)) === null || _exec === void 0 ? void 0 : _exec.index) !== null && _exec_index !== void 0 ? _exec_index : parent2.length);
|
|
5653
5655
|
EXPANSIONS[parent2] = EXPANSIONS[parent2].map(function(k) {
|
|
5654
5656
|
return `${prefix}${k}`;
|
|
5655
5657
|
});
|
|
5656
5658
|
};
|
|
5657
|
-
function expandStyle(key,
|
|
5659
|
+
function expandStyle(key, value2) {
|
|
5658
5660
|
if (import_constants4.isAndroid && key === "elevationAndroid") return [
|
|
5659
5661
|
[
|
|
5660
5662
|
"elevation",
|
|
5661
|
-
|
|
5663
|
+
value2
|
|
5662
5664
|
]
|
|
5663
5665
|
];
|
|
5664
5666
|
if (key in EXPANSIONS) return EXPANSIONS[key].map(function(key2) {
|
|
5665
5667
|
return [
|
|
5666
5668
|
key2,
|
|
5667
|
-
|
|
5669
|
+
value2
|
|
5668
5670
|
];
|
|
5669
5671
|
});
|
|
5670
5672
|
if (key in import_webToNativeProps.webToNativeExpansion) return import_webToNativeProps.webToNativeExpansion[key].map(function(key2) {
|
|
5671
5673
|
return [
|
|
5672
5674
|
key2,
|
|
5673
|
-
|
|
5675
|
+
value2
|
|
5674
5676
|
];
|
|
5675
5677
|
});
|
|
5676
|
-
if (key in import_webToNativeProps.webToNativeDynamicExpansion) return import_webToNativeProps.webToNativeDynamicExpansion[key](
|
|
5678
|
+
if (key in import_webToNativeProps.webToNativeDynamicExpansion) return import_webToNativeProps.webToNativeDynamicExpansion[key](value2);
|
|
5677
5679
|
}
|
|
5678
5680
|
var all = [
|
|
5679
5681
|
"Top",
|
|
@@ -5918,8 +5920,8 @@ var require_normalizeStyle_native = __commonJS({
|
|
|
5918
5920
|
res[key] = normalizeStyle(prop, disableNormalize);
|
|
5919
5921
|
continue;
|
|
5920
5922
|
}
|
|
5921
|
-
var
|
|
5922
|
-
out ? Object.assign(res, Object.fromEntries(out)) : res[key] =
|
|
5923
|
+
var value2 = disableNormalize ? prop : (0, import_normalizeValueWithProperty.normalizeValueWithProperty)(prop, key), out = (0, import_expandStyle.expandStyle)(key, value2);
|
|
5924
|
+
out ? Object.assign(res, Object.fromEntries(out)) : res[key] = value2;
|
|
5923
5925
|
}
|
|
5924
5926
|
}
|
|
5925
5927
|
return (0, import_expandStyles.fixStyles)(res), res;
|
|
@@ -6138,18 +6140,18 @@ var require_propMapper_native = __commonJS({
|
|
|
6138
6140
|
}
|
|
6139
6141
|
});
|
|
6140
6142
|
module2.exports = __toCommonJS2(propMapper_exports);
|
|
6141
|
-
var import_constants4 =
|
|
6142
|
-
if (disabled) return map(key,
|
|
6143
|
+
var import_constants4 = require_index_native(), import_helpers = require_index_native7(), import_config = require_config_native(), import_createVariable = require_createVariable_native(), import_expandStyle = require_expandStyle_native(), import_getVariantExtras = require_getVariantExtras_native(), import_isObj = require_isObj_native(), import_normalizeStyle = require_normalizeStyle_native(), import_pseudoDescriptors = require_pseudoDescriptors_native(), import_skipProps = require_skipProps_native(), propMapper = function(key, value2, styleState, disabled, map) {
|
|
6144
|
+
if (disabled) return map(key, value2);
|
|
6143
6145
|
if (lastFontFamilyToken = null, !(!import_constants4.isAndroid && key === "elevationAndroid")) {
|
|
6144
6146
|
var { conf, styleProps, staticConfig } = styleState;
|
|
6145
|
-
if (
|
|
6147
|
+
if (value2 === "unset") {
|
|
6146
6148
|
var _conf_unset, unsetVal = (_conf_unset = conf.unset) === null || _conf_unset === void 0 ? void 0 : _conf_unset[key];
|
|
6147
|
-
if (unsetVal != null)
|
|
6149
|
+
if (unsetVal != null) value2 = unsetVal;
|
|
6148
6150
|
else return;
|
|
6149
6151
|
}
|
|
6150
6152
|
var { variants } = staticConfig;
|
|
6151
6153
|
if (!styleProps.noExpand && variants && key in variants) {
|
|
6152
|
-
var variantValue = resolveVariants(key,
|
|
6154
|
+
var variantValue = resolveVariants(key, value2, styleProps, styleState, "");
|
|
6153
6155
|
if (variantValue) {
|
|
6154
6156
|
variantValue.forEach(function(param) {
|
|
6155
6157
|
var [_$key, _$value] = param;
|
|
@@ -6158,35 +6160,35 @@ var require_propMapper_native = __commonJS({
|
|
|
6158
6160
|
return;
|
|
6159
6161
|
}
|
|
6160
6162
|
}
|
|
6161
|
-
if (styleProps.disableExpandShorthands || key in conf.shorthands && (key = conf.shorthands[key]),
|
|
6163
|
+
if (styleProps.disableExpandShorthands || key in conf.shorthands && (key = conf.shorthands[key]), value2 != null && (value2[0] === "$" ? value2 = getTokenForKey(key, value2, styleProps, styleState) : (0, import_createVariable.isVariable)(value2) && (value2 = resolveVariableValue(key, value2, styleProps.resolveValues))), value2 != null) {
|
|
6162
6164
|
key === "fontFamily" && lastFontFamilyToken && (styleState.fontFamily = lastFontFamilyToken);
|
|
6163
|
-
var expanded = styleProps.noExpand ? null : (0, import_expandStyle.expandStyle)(key,
|
|
6165
|
+
var expanded = styleProps.noExpand ? null : (0, import_expandStyle.expandStyle)(key, value2);
|
|
6164
6166
|
if (expanded) for (var max = expanded.length, i = 0; i < max; i++) {
|
|
6165
6167
|
var [nkey, nvalue] = expanded[i];
|
|
6166
6168
|
map(nkey, nvalue);
|
|
6167
6169
|
}
|
|
6168
|
-
else map(key,
|
|
6170
|
+
else map(key, value2);
|
|
6169
6171
|
}
|
|
6170
6172
|
}
|
|
6171
|
-
}, resolveVariants = function(key,
|
|
6173
|
+
}, resolveVariants = function(key, value2, styleProps, styleState, parentVariantKey) {
|
|
6172
6174
|
var { staticConfig, conf, debug } = styleState, { variants } = staticConfig;
|
|
6173
6175
|
if (variants) {
|
|
6174
|
-
var variantValue = getVariantDefinition(variants[key],
|
|
6176
|
+
var variantValue = getVariantDefinition(variants[key], value2, conf);
|
|
6175
6177
|
if (process.env.NODE_ENV === "development" && debug === "verbose" && (console.groupCollapsed(`\u2666\uFE0F\u2666\uFE0F\u2666\uFE0F resolve variant ${key}`), console.info({
|
|
6176
6178
|
key,
|
|
6177
|
-
value,
|
|
6179
|
+
value: value2,
|
|
6178
6180
|
variantValue,
|
|
6179
6181
|
variants
|
|
6180
6182
|
}), console.groupEnd()), !variantValue) {
|
|
6181
|
-
if (process.env.TAMAGUI_WARN_ON_MISSING_VARIANT === "1" && typeof
|
|
6183
|
+
if (process.env.TAMAGUI_WARN_ON_MISSING_VARIANT === "1" && typeof value2 != "boolean") {
|
|
6182
6184
|
var name = staticConfig.componentName || "[UnnamedComponent]";
|
|
6183
|
-
console.warn(`No variant found: ${name} has variant "${key}", but no matching value "${
|
|
6185
|
+
console.warn(`No variant found: ${name} has variant "${key}", but no matching value "${value2}"`);
|
|
6184
6186
|
}
|
|
6185
6187
|
return;
|
|
6186
6188
|
}
|
|
6187
6189
|
if (typeof variantValue == "function") {
|
|
6188
6190
|
var fn = variantValue, extras = (0, import_getVariantExtras.getVariantExtras)(styleState);
|
|
6189
|
-
variantValue = fn(
|
|
6191
|
+
variantValue = fn(value2, extras), process.env.NODE_ENV;
|
|
6190
6192
|
}
|
|
6191
6193
|
var fontFamilyResult;
|
|
6192
6194
|
if ((0, import_isObj.isObj)(variantValue)) {
|
|
@@ -6211,11 +6213,11 @@ var require_propMapper_native = __commonJS({
|
|
|
6211
6213
|
}
|
|
6212
6214
|
} else if (typeof input == "string" && input[0] === "$") return input;
|
|
6213
6215
|
}
|
|
6214
|
-
var variableToFontNameCache = /* @__PURE__ */ new WeakMap(), resolveTokensAndVariants = function(key,
|
|
6216
|
+
var variableToFontNameCache = /* @__PURE__ */ new WeakMap(), resolveTokensAndVariants = function(key, value2, styleProps, styleState, parentVariantKey) {
|
|
6215
6217
|
var { conf, staticConfig, debug, theme } = styleState, { variants } = staticConfig, res = {};
|
|
6216
|
-
process.env.NODE_ENV === "development" && debug === "verbose" && console.info(" - resolveTokensAndVariants", key,
|
|
6217
|
-
for (var _key in
|
|
6218
|
-
var subKey = conf.shorthands[_key] || _key, val =
|
|
6218
|
+
process.env.NODE_ENV === "development" && debug === "verbose" && console.info(" - resolveTokensAndVariants", key, value2);
|
|
6219
|
+
for (var _key in value2) {
|
|
6220
|
+
var subKey = conf.shorthands[_key] || _key, val = value2[_key];
|
|
6219
6221
|
if (!(!styleProps.noSkip && subKey in import_skipProps.skipProps)) {
|
|
6220
6222
|
if (styleProps.noExpand) res[subKey] = val;
|
|
6221
6223
|
else if (variants && subKey in variants) {
|
|
@@ -6283,17 +6285,17 @@ var require_propMapper_native = __commonJS({
|
|
|
6283
6285
|
spreadName: `...${name}`
|
|
6284
6286
|
};
|
|
6285
6287
|
});
|
|
6286
|
-
function getVariantDefinition(variant,
|
|
6288
|
+
function getVariantDefinition(variant, value2, conf) {
|
|
6287
6289
|
if (variant) {
|
|
6288
6290
|
if (typeof variant == "function") return variant;
|
|
6289
|
-
var exact = variant[
|
|
6291
|
+
var exact = variant[value2];
|
|
6290
6292
|
if (exact) return exact;
|
|
6291
|
-
if (
|
|
6293
|
+
if (value2 != null) {
|
|
6292
6294
|
var { tokensParsed } = conf, _iteratorNormalCompletion = !0, _didIteratorError = !1, _iteratorError = void 0;
|
|
6293
6295
|
try {
|
|
6294
6296
|
for (var _iterator = tokenCats[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = !0) {
|
|
6295
6297
|
var { name, spreadName } = _step.value;
|
|
6296
|
-
if (spreadName in variant && name in tokensParsed &&
|
|
6298
|
+
if (spreadName in variant && name in tokensParsed && value2 in tokensParsed[name]) return variant[spreadName];
|
|
6297
6299
|
}
|
|
6298
6300
|
} catch (err) {
|
|
6299
6301
|
_didIteratorError = !0, _iteratorError = err;
|
|
@@ -6305,32 +6307,32 @@ var require_propMapper_native = __commonJS({
|
|
|
6305
6307
|
}
|
|
6306
6308
|
}
|
|
6307
6309
|
var fontSizeVariant = variant["...fontSize"];
|
|
6308
|
-
if (fontSizeVariant && conf.fontSizeTokens.has(
|
|
6310
|
+
if (fontSizeVariant && conf.fontSizeTokens.has(value2)) return fontSizeVariant;
|
|
6309
6311
|
}
|
|
6310
|
-
return variant[`:${typeof
|
|
6312
|
+
return variant[`:${typeof value2}`] || variant["..."];
|
|
6311
6313
|
}
|
|
6312
6314
|
}
|
|
6313
6315
|
var fontShorthand = {
|
|
6314
6316
|
fontSize: "size",
|
|
6315
6317
|
fontWeight: "weight"
|
|
6316
|
-
}, lastFontFamilyToken = null, getTokenForKey = function(key,
|
|
6318
|
+
}, lastFontFamilyToken = null, getTokenForKey = function(key, value2, styleProps, styleState) {
|
|
6317
6319
|
var _staticConfig_accept, resolveAs = styleProps.resolveValues || "none";
|
|
6318
|
-
if (resolveAs === "none") return
|
|
6319
|
-
var { theme, conf = (0, import_config.getConfig)(), context, fontFamily, staticConfig } = styleState, themeValue = theme ? theme[
|
|
6320
|
+
if (resolveAs === "none") return value2;
|
|
6321
|
+
var { theme, conf = (0, import_config.getConfig)(), context, fontFamily, staticConfig } = styleState, themeValue = theme ? theme[value2] || theme[value2.slice(1)] : void 0, tokensParsed = conf.tokensParsed, valOrVar, hasSet = !1, customTokenAccept = staticConfig == null || (_staticConfig_accept = staticConfig.accept) === null || _staticConfig_accept === void 0 ? void 0 : _staticConfig_accept[key];
|
|
6320
6322
|
if (customTokenAccept) {
|
|
6321
|
-
var val = themeValue ?? tokensParsed[customTokenAccept][
|
|
6323
|
+
var val = themeValue ?? tokensParsed[customTokenAccept][value2];
|
|
6322
6324
|
val != null && (resolveAs = "value", valOrVar = val, hasSet = !0);
|
|
6323
6325
|
}
|
|
6324
6326
|
if (themeValue) {
|
|
6325
|
-
if (resolveAs === "except-theme") return
|
|
6326
|
-
valOrVar = themeValue, process.env.NODE_ENV === "development" && styleState.debug === "verbose" && (globalThis.tamaguiAvoidTracking = !0, console.info(` - resolving ${key} to theme value ${
|
|
6327
|
+
if (resolveAs === "except-theme") return value2;
|
|
6328
|
+
valOrVar = themeValue, process.env.NODE_ENV === "development" && styleState.debug === "verbose" && (globalThis.tamaguiAvoidTracking = !0, console.info(` - resolving ${key} to theme value ${value2} resolveAs ${resolveAs}`, valOrVar), globalThis.tamaguiAvoidTracking = !1), hasSet = !0;
|
|
6327
6329
|
} else {
|
|
6328
|
-
if (
|
|
6330
|
+
if (value2 in conf.specificTokens) hasSet = !0, valOrVar = conf.specificTokens[value2];
|
|
6329
6331
|
else {
|
|
6330
6332
|
switch (key) {
|
|
6331
6333
|
case "fontFamily": {
|
|
6332
6334
|
var _fontsParsed_value, fontsParsed = context != null && context.language ? (0, import_getVariantExtras.getFontsForLanguage)(conf.fontsParsed, context.language) : conf.fontsParsed;
|
|
6333
|
-
valOrVar = ((_fontsParsed_value = fontsParsed[
|
|
6335
|
+
valOrVar = ((_fontsParsed_value = fontsParsed[value2]) === null || _fontsParsed_value === void 0 ? void 0 : _fontsParsed_value.family) || value2, lastFontFamilyToken = value2, hasSet = !0;
|
|
6334
6336
|
break;
|
|
6335
6337
|
}
|
|
6336
6338
|
case "fontSize":
|
|
@@ -6340,18 +6342,18 @@ var require_propMapper_native = __commonJS({
|
|
|
6340
6342
|
var fam = fontFamily || conf.defaultFontToken;
|
|
6341
6343
|
if (fam) {
|
|
6342
6344
|
var _font_, fontsParsed1 = context != null && context.language ? (0, import_getVariantExtras.getFontsForLanguage)(conf.fontsParsed, context.language) : conf.fontsParsed, font = fontsParsed1[fam] || fontsParsed1[conf.defaultFontToken];
|
|
6343
|
-
valOrVar = (font == null || (_font_ = font[fontShorthand[key] || key]) === null || _font_ === void 0 ? void 0 : _font_[
|
|
6345
|
+
valOrVar = (font == null || (_font_ = font[fontShorthand[key] || key]) === null || _font_ === void 0 ? void 0 : _font_[value2]) || value2, hasSet = !0;
|
|
6344
6346
|
}
|
|
6345
6347
|
break;
|
|
6346
6348
|
}
|
|
6347
6349
|
}
|
|
6348
6350
|
for (var cat in import_helpers.tokenCategories) if (key in import_helpers.tokenCategories[cat]) {
|
|
6349
|
-
var res = tokensParsed[cat][
|
|
6351
|
+
var res = tokensParsed[cat][value2];
|
|
6350
6352
|
res != null && (valOrVar = res, hasSet = !0);
|
|
6351
6353
|
}
|
|
6352
6354
|
}
|
|
6353
6355
|
if (!hasSet) {
|
|
6354
|
-
var spaceVar = tokensParsed.space[
|
|
6356
|
+
var spaceVar = tokensParsed.space[value2];
|
|
6355
6357
|
spaceVar != null && (valOrVar = spaceVar, hasSet = !0);
|
|
6356
6358
|
}
|
|
6357
6359
|
}
|
|
@@ -6477,8 +6479,8 @@ var require_transformsToString_native = __commonJS({
|
|
|
6477
6479
|
// { matrix: [1,2,3,4,5,6] } => 'matrix(1,2,3,4,5,6)'
|
|
6478
6480
|
// { perspective: 1000 } => perspective(1000px)
|
|
6479
6481
|
function(transform) {
|
|
6480
|
-
var type = Object.keys(transform)[0],
|
|
6481
|
-
return type === "matrix" || type === "matrix3d" ? `${type}(${
|
|
6482
|
+
var type = Object.keys(transform)[0], value2 = transform[type];
|
|
6483
|
+
return type === "matrix" || type === "matrix3d" ? `${type}(${value2.join(",")})` : `${type}(${(0, import_normalizeValueWithProperty.normalizeValueWithProperty)(value2, type)})`;
|
|
6482
6484
|
}
|
|
6483
6485
|
).join(" ");
|
|
6484
6486
|
}
|
|
@@ -6549,7 +6551,7 @@ var require_getSplitStyles_native = __commonJS({
|
|
|
6549
6551
|
}
|
|
6550
6552
|
});
|
|
6551
6553
|
module2.exports = __toCommonJS2(getSplitStyles_exports);
|
|
6552
|
-
var import_constants4 =
|
|
6554
|
+
var import_constants4 = require_index_native(), import_helpers = require_index_native7(), import_react3 = __toESM2(require("react")), import_getDynamicVal = require_getDynamicVal_native(), import_config = require_config_native(), import_accessibilityDirectMap = require_accessibilityDirectMap_native(), import_constants22 = require_constants_native2(), import_isDevTools = require_isDevTools_native(), import_useMedia = require_useMedia_native(), import_createMediaStyle = require_createMediaStyle_native(), import_expandStyles = require_expandStyles_native(), import_getCSSStylesAtomic = require_getCSSStylesAtomic_native(), import_getGroupPropParts = require_getGroupPropParts_native(), import_insertStyleRule = require_insertStyleRule_native(), import_isActivePlatform = require_isActivePlatform_native(), import_isActiveTheme = require_isActiveTheme_native(), import_log = require_log_native(), import_normalizeValueWithProperty = require_normalizeValueWithProperty_native(), import_propMapper = require_propMapper_native(), import_pseudoDescriptors = require_pseudoDescriptors_native(), import_skipProps = require_skipProps_native(), import_sortString = require_sortString_native(), import_transformsToString = require_transformsToString_native(), conf, PROP_SPLIT = "-";
|
|
6553
6555
|
function isValidStyleKey(key, validStyles, accept) {
|
|
6554
6556
|
return key in validStyles ? !0 : accept && key in accept;
|
|
6555
6557
|
}
|
|
@@ -6779,12 +6781,12 @@ var require_getSplitStyles_native = __commonJS({
|
|
|
6779
6781
|
}
|
|
6780
6782
|
} else if (!(themeName === mediaKeyShort || themeName.startsWith(mediaKeyShort))) return;
|
|
6781
6783
|
} else if (isGroupMedia) {
|
|
6782
|
-
var _groupContext_groupName, _componentState_group, groupInfo = (0, import_getGroupPropParts.getGroupPropParts)(mediaKeyShort), groupName = groupInfo.name, groupState = groupContext == null || (_groupContext_groupName = groupContext[groupName]) === null || _groupContext_groupName === void 0 ? void 0 : _groupContext_groupName.state;
|
|
6784
|
+
var _groupContext_groupName, _componentState_group, groupInfo = (0, import_getGroupPropParts.getGroupPropParts)(mediaKeyShort), groupName = groupInfo.name, groupState = groupContext == null || (_groupContext_groupName = groupContext[groupName]) === null || _groupContext_groupName === void 0 ? void 0 : _groupContext_groupName.state, groupPseudoKey = groupInfo.pseudo, groupMediaKey = groupInfo.media;
|
|
6783
6785
|
if (!groupState) {
|
|
6784
|
-
process.env.NODE_ENV === "development" && debug && (0, import_log.log)(`No parent with group prop, skipping styles: ${groupName}`);
|
|
6786
|
+
process.env.NODE_ENV === "development" && debug && (0, import_log.log)(`No parent with group prop, skipping styles: ${groupName}`), pseudoGroups || (pseudoGroups = /* @__PURE__ */ new Set());
|
|
6785
6787
|
return;
|
|
6786
6788
|
}
|
|
6787
|
-
var
|
|
6789
|
+
var componentGroupState = (_componentState_group = componentState.group) === null || _componentState_group === void 0 ? void 0 : _componentState_group[groupName];
|
|
6788
6790
|
if (groupMediaKey) {
|
|
6789
6791
|
mediaGroups || (mediaGroups = /* @__PURE__ */ new Set()), mediaGroups.add(groupMediaKey);
|
|
6790
6792
|
var mediaState1 = componentGroupState == null ? void 0 : componentGroupState.media, isActive = mediaState1 == null ? void 0 : mediaState1[groupMediaKey];
|
|
@@ -6914,7 +6916,7 @@ var require_getSplitStyles_native = __commonJS({
|
|
|
6914
6916
|
if (!styleState.style.$$css) {
|
|
6915
6917
|
var atomic, _iteratorNormalCompletion, _didIteratorError, _iteratorError;
|
|
6916
6918
|
try {
|
|
6917
|
-
for (var _iterator, _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = !0) var atomicStyle, _props_animateOnly, _props_animateOnly1, key2,
|
|
6919
|
+
for (var _iterator, _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = !0) var atomicStyle, _props_animateOnly, _props_animateOnly1, key2, value2, identifier, isAnimatedAndAnimateOnly, nonAnimatedAnimateOnly;
|
|
6918
6920
|
} catch (err) {
|
|
6919
6921
|
} finally {
|
|
6920
6922
|
}
|
|
@@ -7088,14 +7090,14 @@ var require_getSplitStyles_native = __commonJS({
|
|
|
7088
7090
|
delete viewProps[key], viewProps[key] = next;
|
|
7089
7091
|
} else viewProps[key] = val;
|
|
7090
7092
|
}
|
|
7091
|
-
function mergeMediaByImportance(styleState, mediaKey, key,
|
|
7093
|
+
function mergeMediaByImportance(styleState, mediaKey, key, value2, isSizeMedia, importanceBump, debugProp) {
|
|
7092
7094
|
var usedKeys = styleState.usedKeys, importance = (0, import_useMedia.getMediaImportanceIfMoreImportant)(mediaKey, key, styleState, isSizeMedia);
|
|
7093
7095
|
if (importanceBump && (importance = (importance || 0) + importanceBump), process.env.NODE_ENV === "development" && debugProp === "verbose" && (0, import_log.log)(`mergeMediaByImportance ${key} importance usedKey ${usedKeys[key]} next ${importance}`), importance === null) return !1;
|
|
7094
7096
|
if (key in import_pseudoDescriptors.pseudoDescriptors) {
|
|
7095
7097
|
var descriptor = import_pseudoDescriptors.pseudoDescriptors[key], descriptorKey = descriptor.stateKey || descriptor.name, isDisabled = styleState.componentState[descriptorKey] === !1;
|
|
7096
7098
|
if (isDisabled) return !1;
|
|
7097
|
-
for (var subKey in
|
|
7098
|
-
} else mergeStyle(styleState, key,
|
|
7099
|
+
for (var subKey in value2) mergeStyle(styleState, subKey, value2[subKey], importance);
|
|
7100
|
+
} else mergeStyle(styleState, key, value2, importance);
|
|
7099
7101
|
return !0;
|
|
7100
7102
|
}
|
|
7101
7103
|
function normalizeStyle(style) {
|
|
@@ -7306,7 +7308,9 @@ var require_subscribeToContextGroup_native = __commonJS({
|
|
|
7306
7308
|
}
|
|
7307
7309
|
}, createGroupListener = function(name, param) {
|
|
7308
7310
|
var { setStateShallow, pseudoGroups, mediaGroups, groupContext } = param, parent = groupContext == null ? void 0 : groupContext[name];
|
|
7309
|
-
|
|
7311
|
+
if (!parent) return function() {
|
|
7312
|
+
};
|
|
7313
|
+
var dispose = parent.subscribe(function(param2) {
|
|
7310
7314
|
var { layout, pseudo } = param2;
|
|
7311
7315
|
setStateShallow(function(prev) {
|
|
7312
7316
|
var _prev_group, didChange = !1, group = ((_prev_group = prev.group) === null || _prev_group === void 0 ? void 0 : _prev_group[name]) || {
|
|
@@ -7331,7 +7335,11 @@ var require_subscribeToContextGroup_native = __commonJS({
|
|
|
7331
7335
|
}
|
|
7332
7336
|
} : prev;
|
|
7333
7337
|
});
|
|
7334
|
-
})
|
|
7338
|
+
});
|
|
7339
|
+
return function() {
|
|
7340
|
+
dispose(), setStateShallow({
|
|
7341
|
+
group: {}
|
|
7342
|
+
});
|
|
7335
7343
|
};
|
|
7336
7344
|
};
|
|
7337
7345
|
}
|
|
@@ -7395,7 +7403,7 @@ var require_useThemeState_native = __commonJS({
|
|
|
7395
7403
|
}
|
|
7396
7404
|
});
|
|
7397
7405
|
module2.exports = __toCommonJS2(useThemeState_exports);
|
|
7398
|
-
var import_constants4 =
|
|
7406
|
+
var import_constants4 = require_index_native(), import_react3 = require("react"), import_config = require_config_native(), import_constants22 = require_constants_native2(), ThemeStateContext = (0, import_react3.createContext)(""), allListeners = /* @__PURE__ */ new Map(), listenersByParent = {}, HasRenderedOnce = /* @__PURE__ */ new WeakMap(), HadTheme = /* @__PURE__ */ new WeakMap(), PendingUpdate = /* @__PURE__ */ new Map(), states = /* @__PURE__ */ new Map(), localStates = /* @__PURE__ */ new Map(), shouldForce = !1, forceUpdateThemes2 = function() {
|
|
7399
7407
|
cacheVersion++, shouldForce = !0, allListeners.forEach(function(cb) {
|
|
7400
7408
|
return cb();
|
|
7401
7409
|
});
|
|
@@ -7707,7 +7715,7 @@ var require_getThemeProxied_native = __commonJS({
|
|
|
7707
7715
|
}
|
|
7708
7716
|
});
|
|
7709
7717
|
module2.exports = __toCommonJS2(getThemeProxied_exports);
|
|
7710
|
-
var import_constants4 =
|
|
7718
|
+
var import_constants4 = require_index_native(), import_config = require_config_native(), import_createVariable = require_createVariable_native(), import_doesRootSchemeMatchSystem = require_doesRootSchemeMatchSystem_native(), import_getDynamicVal = require_getDynamicVal_native(), cache = /* @__PURE__ */ new Map(), curKeys, curProps, curState, emptyObject = {};
|
|
7711
7719
|
function getThemeProxied(_props, _state, _keys) {
|
|
7712
7720
|
if (!(_state != null && _state.theme)) return emptyObject;
|
|
7713
7721
|
if (curKeys = _keys, curProps = _props, curState = _state, cache.has(curState.theme)) {
|
|
@@ -7719,14 +7727,14 @@ var require_getThemeProxied_native = __commonJS({
|
|
|
7719
7727
|
curKeys && (curKeys.current || (curKeys.current = /* @__PURE__ */ new Set()), curKeys.current.add(key), process.env.NODE_ENV === "development" && curProps.debug && console.info(` \u{1F3A8} useTheme() tracking new key: ${key}`, curKeys));
|
|
7720
7728
|
}
|
|
7721
7729
|
var proxied1 = Object.fromEntries(Object.entries(_state.theme).flatMap(function(param) {
|
|
7722
|
-
var [key,
|
|
7723
|
-
...
|
|
7730
|
+
var [key, value2] = param, proxied2 = {
|
|
7731
|
+
...value2,
|
|
7724
7732
|
get val() {
|
|
7725
|
-
return globalThis.tamaguiAvoidTracking || track(key),
|
|
7733
|
+
return globalThis.tamaguiAvoidTracking || track(key), value2.val;
|
|
7726
7734
|
},
|
|
7727
7735
|
get(platform2) {
|
|
7728
7736
|
if (curState) {
|
|
7729
|
-
var outVal = (0, import_createVariable.getVariable)(
|
|
7737
|
+
var outVal = (0, import_createVariable.getVariable)(value2), { name, scheme, inverses } = curState, shouldOptimize = scheme && platform2 !== "web" && import_constants4.isIos && !curProps.deopt && (0, import_config.getSetting)("fastSchemeChange") && inverses === 0 && (0, import_doesRootSchemeMatchSystem.doesRootSchemeMatchSystem)();
|
|
7730
7738
|
if (shouldOptimize) {
|
|
7731
7739
|
var _config_themes_name, _config_themes_oppositeName, oppositeScheme = scheme === "dark" ? "light" : "dark", oppositeName = name.replace(scheme, oppositeScheme), color = (0, import_createVariable.getVariable)((_config_themes_name = config.themes[name]) === null || _config_themes_name === void 0 ? void 0 : _config_themes_name[key]), oppositeColor = (0, import_createVariable.getVariable)((_config_themes_oppositeName = config.themes[oppositeName]) === null || _config_themes_oppositeName === void 0 ? void 0 : _config_themes_oppositeName[key]), dynamicVal = (0, import_getDynamicVal.getDynamicVal)({
|
|
7732
7740
|
scheme,
|
|
@@ -7932,7 +7940,7 @@ var require_Theme_native = __commonJS({
|
|
|
7932
7940
|
}
|
|
7933
7941
|
});
|
|
7934
7942
|
module2.exports = __toCommonJS2(Theme_exports);
|
|
7935
|
-
var import_jsx_runtime6 = require("react/jsx-runtime"), import_constants4 =
|
|
7943
|
+
var import_jsx_runtime6 = require("react/jsx-runtime"), import_constants4 = require_index_native(), import_react3 = __toESM2(require("react")), import_config = require_config_native(), import_createVariable = require_createVariable_native(), import_useTheme = require_useTheme_native(), import_useThemeState = require_useThemeState_native(), import_ThemeDebug = require_ThemeDebug_native(), Theme2 = /* @__PURE__ */ (0, import_react3.forwardRef)(function(props, ref) {
|
|
7936
7944
|
if (props.disable) return props.children;
|
|
7937
7945
|
var { passThrough } = props, isRoot = !!props._isRoot, [_, themeState] = (0, import_useTheme.useThemeWithState)(props, isRoot), disableDirectChildTheme = props["disable-child-theme"], finalChildren = disableDirectChildTheme ? import_react3.Children.map(props.children, function(child) {
|
|
7938
7946
|
return passThrough ? child : /* @__PURE__ */ (0, import_react3.cloneElement)(child, {
|
|
@@ -8160,7 +8168,7 @@ var require_wrapStyleTags_native = __commonJS({
|
|
|
8160
8168
|
}
|
|
8161
8169
|
});
|
|
8162
8170
|
module2.exports = __toCommonJS2(wrapStyleTags_exports);
|
|
8163
|
-
var import_jsx_runtime6 = require("react/jsx-runtime"), import_constants4 =
|
|
8171
|
+
var import_jsx_runtime6 = require("react/jsx-runtime"), import_constants4 = require_index_native(), import_helpers = require_index_native7();
|
|
8164
8172
|
function getStyleTags(styles) {
|
|
8165
8173
|
import_constants4.IS_REACT_19;
|
|
8166
8174
|
}
|
|
@@ -8214,9 +8222,9 @@ var require_ClientOnly_native = __commonJS({
|
|
|
8214
8222
|
});
|
|
8215
8223
|
module2.exports = __toCommonJS2(ClientOnly_exports);
|
|
8216
8224
|
var import_jsx_runtime6 = require("react/jsx-runtime"), import_react3 = require("react"), ClientOnlyContext2 = /* @__PURE__ */ (0, import_react3.createContext)(!1), ClientOnly2 = function(param) {
|
|
8217
|
-
var { children,
|
|
8225
|
+
var { children, enabled } = param, existingValue = (0, import_react3.useContext)(ClientOnlyContext2);
|
|
8218
8226
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(ClientOnlyContext2.Provider, {
|
|
8219
|
-
value,
|
|
8227
|
+
value: enabled ?? existingValue,
|
|
8220
8228
|
children
|
|
8221
8229
|
});
|
|
8222
8230
|
};
|
|
@@ -8293,13 +8301,13 @@ var require_index_native14 = __commonJS({
|
|
|
8293
8301
|
var React4 = __toESM2(require("react")), import_ClientOnly = require_ClientOnly_native(), import_ClientOnly2 = require_ClientOnly_native(), useIsClientOnly = function() {
|
|
8294
8302
|
return React4.useContext(import_ClientOnly.ClientOnlyContext);
|
|
8295
8303
|
};
|
|
8296
|
-
function useDidFinishSSR2(
|
|
8304
|
+
function useDidFinishSSR2() {
|
|
8297
8305
|
var clientOnly = React4.useContext(import_ClientOnly.ClientOnlyContext);
|
|
8298
|
-
return value
|
|
8306
|
+
return value != null ? value : !0;
|
|
8299
8307
|
}
|
|
8300
|
-
function useClientValue(
|
|
8308
|
+
function useClientValue(value1) {
|
|
8301
8309
|
var done = useDidFinishSSR2();
|
|
8302
|
-
return done ? typeof
|
|
8310
|
+
return done ? typeof value1 == "function" ? value1() : value1 : void 0;
|
|
8303
8311
|
}
|
|
8304
8312
|
}
|
|
8305
8313
|
});
|
|
@@ -8347,25 +8355,23 @@ var require_useComponentState_native = __commonJS({
|
|
|
8347
8355
|
}
|
|
8348
8356
|
});
|
|
8349
8357
|
module2.exports = __toCommonJS2(useComponentState_exports);
|
|
8350
|
-
var import_constants4 =
|
|
8351
|
-
var _animationDriver_usePresence, isHydrated = (0, import_use_did_finish_ssr.useDidFinishSSR)(), needsHydration = !(0, import_use_did_finish_ssr.useIsClientOnly)(), [startedUnhydrated] = (0, import_react3.useState)(needsHydration && !isHydrated), useAnimations = animationDriver == null ? void 0 : animationDriver.useAnimations, stateRef = (0, import_react3.useRef)(void 0
|
|
8352
|
-
stateRef.current || (stateRef.current = {});
|
|
8353
|
-
var hasAnimationProp = !!("animation" in props || props.style && hasAnimatedStyleValue(props.style)), supportsCSS = animationDriver == null ? void 0 : animationDriver.supportsCSS, curStateRef = stateRef.current;
|
|
8358
|
+
var import_constants4 = require_index_native(), import_is_equal_shallow = require_index_native12(), import_use_did_finish_ssr = require_index_native14(), import_react3 = require("react"), import_defaultComponentState = require_defaultComponentState_native(), import_isObj = require_isObj_native(), import_log = require_log_native(), useComponentState = function(props, animationDriver, staticConfig, config) {
|
|
8359
|
+
var _animationDriver_usePresence, isHydrated = (0, import_use_did_finish_ssr.useDidFinishSSR)(), needsHydration = !(0, import_use_did_finish_ssr.useIsClientOnly)(), [startedUnhydrated] = (0, import_react3.useState)(needsHydration && !isHydrated), useAnimations = animationDriver == null ? void 0 : animationDriver.useAnimations, { isHOC } = staticConfig, stateRef = (0, import_react3.useRef)({}), hasAnimationProp = !!(!isHOC && "animation" in props || props.style && hasAnimatedStyleValue(props.style)), supportsCSS = animationDriver == null ? void 0 : animationDriver.supportsCSS, curStateRef = stateRef.current;
|
|
8354
8360
|
!needsHydration && hasAnimationProp && (curStateRef.hasAnimated = !0);
|
|
8355
8361
|
var willBeAnimatedClient = function() {
|
|
8356
|
-
var next = !!(hasAnimationProp && !
|
|
8362
|
+
var next = !!(hasAnimationProp && !isHOC && useAnimations);
|
|
8357
8363
|
return !!(next || curStateRef.hasAnimated);
|
|
8358
8364
|
}(), willBeAnimated = !import_constants4.isServer && willBeAnimatedClient;
|
|
8359
8365
|
willBeAnimated && !curStateRef.hasAnimated && (curStateRef.hasAnimated = !0);
|
|
8360
|
-
var { disableClassName } = props, presence = willBeAnimated && props.animatePresence !== !1 && (animationDriver == null || (_animationDriver_usePresence = animationDriver.usePresence) === null || _animationDriver_usePresence === void 0 ? void 0 : _animationDriver_usePresence.call(animationDriver)) || null, presenceState = presence == null ? void 0 : presence[2], isExiting = (presenceState == null ? void 0 : presenceState.isPresent) === !1, isEntering = (presenceState == null ? void 0 : presenceState.isPresent) === !0 && presenceState.initial !== !1, hasEnterStyle = !!props.enterStyle, hasAnimationThatNeedsHydrate = hasAnimationProp && !isHydrated && ((animationDriver == null ? void 0 : animationDriver.isReactNative) || !supportsCSS),
|
|
8366
|
+
var { disableClassName } = props, presence = !isHOC && willBeAnimated && props.animatePresence !== !1 && (animationDriver == null || (_animationDriver_usePresence = animationDriver.usePresence) === null || _animationDriver_usePresence === void 0 ? void 0 : _animationDriver_usePresence.call(animationDriver)) || null, presenceState = presence == null ? void 0 : presence[2], isExiting = (presenceState == null ? void 0 : presenceState.isPresent) === !1, isEntering = (presenceState == null ? void 0 : presenceState.isPresent) === !0 && presenceState.initial !== !1, hasEnterStyle = !!props.enterStyle, hasAnimationThatNeedsHydrate = hasAnimationProp && !isHydrated && ((animationDriver == null ? void 0 : animationDriver.isReactNative) || !supportsCSS), canImmediatelyEnter = hasEnterStyle || isEntering, shouldEnter = !isHOC && (hasEnterStyle || isEntering || hasAnimationThatNeedsHydrate || // disableClassName doesnt work server side, only client, so needs hydrate
|
|
8361
8367
|
// this is just for a better ux, supports css variables for light/dark, media queries, etc
|
|
8362
|
-
disableClassName, initialState = shouldEnter ? (
|
|
8368
|
+
disableClassName), initialState = shouldEnter ? (
|
|
8363
8369
|
// on the very first render we switch all spring animation drivers to css rendering
|
|
8364
8370
|
// this is because we need to use css variables, which they don't support to do proper SSR
|
|
8365
8371
|
// without flickers of the wrong colors.
|
|
8366
8372
|
// but once we do that initial hydration and we are in client side rendering mode,
|
|
8367
8373
|
// we can avoid the extra re-render on mount
|
|
8368
|
-
|
|
8374
|
+
canImmediatelyEnter ? import_defaultComponentState.defaultComponentStateShouldEnter : import_defaultComponentState.defaultComponentState
|
|
8369
8375
|
) : import_defaultComponentState.defaultComponentStateMounted, disabled = isDisabled(props);
|
|
8370
8376
|
disabled != null && (initialState.disabled = disabled);
|
|
8371
8377
|
var states = (0, import_react3.useState)(initialState), state = props.forceStyle ? {
|
|
@@ -8529,7 +8535,7 @@ var require_Slot_native = __commonJS({
|
|
|
8529
8535
|
}
|
|
8530
8536
|
});
|
|
8531
8537
|
module2.exports = __toCommonJS2(Slot_exports);
|
|
8532
|
-
var import_jsx_runtime6 = require("react/jsx-runtime"), import_compose_refs = require_index_native11(), import_constants4 =
|
|
8538
|
+
var import_jsx_runtime6 = require("react/jsx-runtime"), import_compose_refs = require_index_native11(), import_constants4 = require_index_native(), import_helpers = require_index_native7(), import_react3 = require("react"), is19 = import_react3.version.startsWith("19."), Slot = /* @__PURE__ */ (0, import_react3.memo)(/* @__PURE__ */ (0, import_react3.forwardRef)(function(props, forwardedRef) {
|
|
8533
8539
|
var { children, ...slotProps } = props;
|
|
8534
8540
|
if (/* @__PURE__ */ (0, import_react3.isValidElement)(children)) {
|
|
8535
8541
|
var mergedProps = mergeSlotProps(children, slotProps);
|
|
@@ -8644,7 +8650,7 @@ var require_createComponent_native = __commonJS({
|
|
|
8644
8650
|
}
|
|
8645
8651
|
});
|
|
8646
8652
|
module2.exports = __toCommonJS2(createComponent_exports);
|
|
8647
|
-
var import_jsx_runtime6 = require("react/jsx-runtime"), import_compose_refs = require_index_native11(), import_constants4 =
|
|
8653
|
+
var import_jsx_runtime6 = require("react/jsx-runtime"), import_compose_refs = require_index_native11(), import_constants4 = require_index_native(), import_helpers = require_index_native7(), import_is_equal_shallow = require_index_native12(), import_react3 = __toESM2(require("react")), import_config = require_config_native(), import_constants22 = require_constants_native2(), import_isDevTools = require_isDevTools_native(), import_ComponentContext = require_ComponentContext_native(), import_GroupContext = require_GroupContext_native(), import_createVariable = require_createVariable_native(), import_defaultComponentState = require_defaultComponentState_native(), import_getShorthandValue = require_getShorthandValue_native(), import_getSplitStyles = require_getSplitStyles_native(), import_log = require_log_native(), import_mergeProps = require_mergeProps_native(), import_objectIdentityKey = require_objectIdentityKey_native(), import_setElementProps = require_setElementProps_native(), import_subscribeToContextGroup = require_subscribeToContextGroup_native(), import_themeable = require_themeable_native(), import_wrapStyleTags = require_wrapStyleTags_native(), import_useComponentState = require_useComponentState_native(), import_useMedia = require_useMedia_native(), import_useTheme = require_useTheme_native(), import_setupHooks = require_setupHooks_native(), import_Slot = require_Slot_native(), import_Theme = require_Theme_native(), time2, debugKeyListeners, startVisualizer, componentSetStates = /* @__PURE__ */ new Set(), avoidReRenderKeys = /* @__PURE__ */ new Set([
|
|
8648
8654
|
"hover",
|
|
8649
8655
|
"press",
|
|
8650
8656
|
"pressIn",
|
|
@@ -8739,16 +8745,15 @@ var require_createComponent_native = __commonJS({
|
|
|
8739
8745
|
componentName2
|
|
8740
8746
|
]);
|
|
8741
8747
|
var componentContext = import_react3.default.useContext(import_ComponentContext.ComponentContext), groupContextParent = import_react3.default.useContext(import_GroupContext.GroupContext), animationDriver = componentContext.animationDriver, useAnimations = animationDriver == null ? void 0 : animationDriver.useAnimations, componentState = (0, import_useComponentState.useComponentState)(props, animationDriver, staticConfig, config), { disabled, groupName, hasAnimationProp, hasEnterStyle, isAnimated, isExiting, isHydrated, presence, presenceState, setState, noClass, state, stateRef, supportsCSS, willBeAnimated, willBeAnimatedClient, startedUnhydrated } = componentState;
|
|
8742
|
-
|
|
8743
|
-
var pendingState =
|
|
8744
|
-
pendingState && (
|
|
8745
|
-
}
|
|
8748
|
+
hasAnimationProp && animationDriver != null && animationDriver.avoidReRenders && (0, import_constants4.useIsomorphicLayoutEffect)(function() {
|
|
8749
|
+
var pendingState = stateRef.current.nextState;
|
|
8750
|
+
pendingState && (stateRef.current.nextState = void 0, componentState.setStateShallow(pendingState));
|
|
8751
|
+
});
|
|
8746
8752
|
var allGroupContexts = (0, import_react3.useMemo)(function() {
|
|
8747
|
-
var _stateRef_current_group;
|
|
8753
|
+
var _stateRef_current_group_listeners, _stateRef_current_group;
|
|
8748
8754
|
if (!groupName || props.passThrough) return groupContextParent;
|
|
8749
|
-
(_stateRef_current_group = stateRef.current.group) === null || _stateRef_current_group === void 0 || _stateRef_current_group.listeners.clear();
|
|
8750
8755
|
var listeners = /* @__PURE__ */ new Set();
|
|
8751
|
-
return stateRef.current.group = {
|
|
8756
|
+
return (_stateRef_current_group = stateRef.current.group) === null || _stateRef_current_group === void 0 || (_stateRef_current_group_listeners = _stateRef_current_group.listeners) === null || _stateRef_current_group_listeners === void 0 || _stateRef_current_group_listeners.clear(), stateRef.current.group = {
|
|
8752
8757
|
listeners,
|
|
8753
8758
|
emit(state2) {
|
|
8754
8759
|
listeners.forEach(function(l) {
|
|
@@ -8847,8 +8852,8 @@ var require_createComponent_native = __commonJS({
|
|
|
8847
8852
|
styledContextProps
|
|
8848
8853
|
}, themeName = (themeState == null ? void 0 : themeState.name) || "";
|
|
8849
8854
|
process.env.NODE_ENV === "development" && time2 && time2`split-styles-prepare`;
|
|
8850
|
-
var splitStyles = (0, import_getSplitStyles.useSplitStyles)(props, staticConfig, theme, themeName, state, styleProps, null, componentContext, allGroupContexts, elementType, startedUnhydrated, debugProp), groupContext = groupName && (allGroupContexts == null ? void 0 : allGroupContexts[groupName]) || null;
|
|
8851
|
-
if (
|
|
8855
|
+
var splitStyles = (0, import_getSplitStyles.useSplitStyles)(props, staticConfig, theme, themeName, state, styleProps, null, componentContext, allGroupContexts, elementType, startedUnhydrated, debugProp), isPassthrough = !splitStyles, groupContext = groupName && (allGroupContexts == null ? void 0 : allGroupContexts[groupName]) || null;
|
|
8856
|
+
if (!isPassthrough && groupContext && // avoids onLayout if we don't need it
|
|
8852
8857
|
props.containerType !== "normal") {
|
|
8853
8858
|
var groupState = groupContext == null ? void 0 : groupContext.state;
|
|
8854
8859
|
if (groupState && groupState.layout === void 0) {
|
|
@@ -8859,34 +8864,38 @@ var require_createComponent_native = __commonJS({
|
|
|
8859
8864
|
});
|
|
8860
8865
|
}
|
|
8861
8866
|
}
|
|
8862
|
-
if (
|
|
8863
|
-
var
|
|
8867
|
+
if (!isPassthrough && (hasAnimationProp || groupName) && animationDriver != null && animationDriver.avoidReRenders) {
|
|
8868
|
+
var updateGroupListeners2 = function() {
|
|
8869
|
+
var updatedState = stateRef.current.nextState;
|
|
8870
|
+
if (groupContext) {
|
|
8871
|
+
var { group, hasDynGroupChildren, unmounted, animation, ...childrenGroupState } = updatedState;
|
|
8872
|
+
notifyGroupSubscribers(groupContext, stateRef.current.group || null, childrenGroupState);
|
|
8873
|
+
}
|
|
8874
|
+
}, updateGroupListeners = updateGroupListeners2, _componentContext, ogSetStateShallow = setStateShallow;
|
|
8864
8875
|
stateRef.current.updateStyleListener = function() {
|
|
8865
|
-
var updatedState =
|
|
8866
|
-
groupContext && notifyGroupSubscribers(groupContext, stateRef.current.group || null, childrenGroupState);
|
|
8867
|
-
var nextStyles = (0, import_getSplitStyles.getSplitStyles)(props, staticConfig, theme, themeName, updatedState, mediaState22 ? {
|
|
8876
|
+
var updatedState = stateRef.current.nextState || state, mediaState22 = stateRef.current.nextMedia, nextStyles = (0, import_getSplitStyles.getSplitStyles)(props, staticConfig, theme, themeName, updatedState, mediaState22 ? {
|
|
8868
8877
|
...styleProps,
|
|
8869
8878
|
mediaState: mediaState22
|
|
8870
8879
|
} : styleProps, null, componentContext, allGroupContexts, elementType, startedUnhydrated, debugProp), useStyleListener = stateRef.current.useStyleListener;
|
|
8871
8880
|
useStyleListener == null || useStyleListener((nextStyles == null ? void 0 : nextStyles.style) || {});
|
|
8872
8881
|
}, (_componentContext = componentContext).mediaEmit || (_componentContext.mediaEmit = function(next) {
|
|
8873
8882
|
var _stateRef_current_updateStyleListener, _stateRef_current;
|
|
8874
|
-
|
|
8883
|
+
stateRef.current.nextMedia = next, (_stateRef_current_updateStyleListener = (_stateRef_current = stateRef.current).updateStyleListener) === null || _stateRef_current_updateStyleListener === void 0 || _stateRef_current_updateStyleListener.call(_stateRef_current);
|
|
8875
8884
|
}), stateRef.current.setStateShallow = function(nextOrGetNext) {
|
|
8876
|
-
var prev =
|
|
8885
|
+
var prev = stateRef.current.nextState || state, next = typeof nextOrGetNext == "function" ? nextOrGetNext(prev) : nextOrGetNext;
|
|
8877
8886
|
if (!(next === prev || (0, import_is_equal_shallow.isEqualShallow)(prev, next))) {
|
|
8878
8887
|
var canAvoidReRender = Object.keys(next).every(function(key3) {
|
|
8879
8888
|
return avoidReRenderKeys.has(key3);
|
|
8880
|
-
})
|
|
8881
|
-
|
|
8882
|
-
|
|
8883
|
-
|
|
8884
|
-
|
|
8885
|
-
|
|
8886
|
-
|
|
8889
|
+
}), updatedState = {
|
|
8890
|
+
...prev,
|
|
8891
|
+
...next
|
|
8892
|
+
};
|
|
8893
|
+
if (stateRef.current.nextState = updatedState, canAvoidReRender) {
|
|
8894
|
+
var _stateRef_current_updateStyleListener, _stateRef_current;
|
|
8895
|
+
process.env.NODE_ENV === "development" && debugProp && debugProp !== "profile" && (console.groupCollapsed("[\u26A1\uFE0F] avoid setState", componentName2, next, {
|
|
8887
8896
|
updatedState,
|
|
8888
8897
|
props
|
|
8889
|
-
}), console.info(stateRef.current.host), console.groupEnd()), (_stateRef_current_updateStyleListener = (_stateRef_current = stateRef.current).updateStyleListener) === null || _stateRef_current_updateStyleListener === void 0 || _stateRef_current_updateStyleListener.call(_stateRef_current);
|
|
8898
|
+
}), console.info(stateRef.current.host), console.groupEnd()), updateGroupListeners2(), (_stateRef_current_updateStyleListener = (_stateRef_current = stateRef.current).updateStyleListener) === null || _stateRef_current_updateStyleListener === void 0 || _stateRef_current_updateStyleListener.call(_stateRef_current);
|
|
8890
8899
|
} else process.env.NODE_ENV === "development" && debugProp && debugProp !== "profile" && console.info("[\u{1F40C}] re-render", {
|
|
8891
8900
|
canAvoidReRender,
|
|
8892
8901
|
next
|
|
@@ -8959,7 +8968,7 @@ var require_createComponent_native = __commonJS({
|
|
|
8959
8968
|
}
|
|
8960
8969
|
process.env.NODE_ENV === "development" && props.untilMeasured && !props.group && console.warn(`You set the untilMeasured prop without setting group. This doesn't work, be sure to set untilMeasured on the parent that sets group, not the children that use the $group- prop.
|
|
8961
8970
|
|
|
8962
|
-
If you meant to do this, you can disable this warning - either change untilMeasured and group at the same time, or do group={conditional ? 'name' : undefined}`), process.env.NODE_ENV === "development" && time2 && time2`destructure`,
|
|
8971
|
+
If you meant to do this, you can disable this warning - either change untilMeasured and group at the same time, or do group={conditional ? 'name' : undefined}`), process.env.NODE_ENV === "development" && time2 && time2`destructure`, !isPassthrough && groupContext && // avoids onLayout if we don't need it
|
|
8963
8972
|
props.containerType !== "normal" && (nonTamaguiProps.onLayout = (0, import_helpers.composeEventHandlers)(nonTamaguiProps.onLayout, function(e) {
|
|
8964
8973
|
var _stateRef_current_group, layout = e.nativeEvent.layout;
|
|
8965
8974
|
groupContext.state.layout = layout, (_stateRef_current_group = stateRef.current.group) === null || _stateRef_current_group === void 0 || _stateRef_current_group.emit({
|
|
@@ -9029,12 +9038,8 @@ If you meant to do this, you can disable this warning - either change untilMeasu
|
|
|
9029
9038
|
}, [
|
|
9030
9039
|
allGroupContexts,
|
|
9031
9040
|
disabled,
|
|
9032
|
-
pseudoGroups ?
|
|
9033
|
-
|
|
9034
|
-
]).join("") : 0,
|
|
9035
|
-
mediaGroups ? Object.keys([
|
|
9036
|
-
...mediaGroups
|
|
9037
|
-
]).join("") : 0
|
|
9041
|
+
pseudoGroups ? (0, import_objectIdentityKey.objectIdentityKey)(pseudoGroups) : 0,
|
|
9042
|
+
mediaGroups ? (0, import_objectIdentityKey.objectIdentityKey)(mediaGroups) : 0
|
|
9038
9043
|
]);
|
|
9039
9044
|
var groupEmitter = stateRef.current.group;
|
|
9040
9045
|
(0, import_constants4.useIsomorphicLayoutEffect)(function() {
|
|
@@ -9134,7 +9139,7 @@ If you meant to do this, you can disable this warning - either change untilMeasu
|
|
|
9134
9139
|
onPress,
|
|
9135
9140
|
onLongPress
|
|
9136
9141
|
});
|
|
9137
|
-
process.env.NODE_ENV === "development" && time2 && time2`spaced-as-child`,
|
|
9142
|
+
process.env.NODE_ENV === "development" && time2 && time2`spaced-as-child`, isPassthrough && (content = propsIn.children, elementType = BaseViewComponent, viewProps = {
|
|
9138
9143
|
style: {
|
|
9139
9144
|
display: "contents"
|
|
9140
9145
|
}
|
|
@@ -9206,7 +9211,8 @@ If you meant to do this, you can disable this warning - either change untilMeasu
|
|
|
9206
9211
|
styleProps,
|
|
9207
9212
|
themeState,
|
|
9208
9213
|
viewProps,
|
|
9209
|
-
willBeAnimated
|
|
9214
|
+
willBeAnimated,
|
|
9215
|
+
startedUnhydrated
|
|
9210
9216
|
});
|
|
9211
9217
|
} catch {
|
|
9212
9218
|
} finally {
|
|
@@ -9524,7 +9530,7 @@ var require_createVariables_native = __commonJS({
|
|
|
9524
9530
|
}
|
|
9525
9531
|
});
|
|
9526
9532
|
module2.exports = __toCommonJS2(createVariables_exports);
|
|
9527
|
-
var import_constants4 =
|
|
9533
|
+
var import_constants4 = require_index_native(), import_helpers = require_index_native7(), import_createVariable = require_createVariable_native(), cache = /* @__PURE__ */ new WeakMap(), createVariables = function(tokens) {
|
|
9528
9534
|
var parentPath = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : "", isFont = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : !1;
|
|
9529
9535
|
if (cache.has(tokens)) return tokens;
|
|
9530
9536
|
var res = {}, i = 0;
|
|
@@ -9918,10 +9924,10 @@ var require_createFont_native = __commonJS({
|
|
|
9918
9924
|
...sectionKeys
|
|
9919
9925
|
])
|
|
9920
9926
|
].map(function(key) {
|
|
9921
|
-
var _section_key, _ref,
|
|
9922
|
-
return fillValue =
|
|
9927
|
+
var _section_key, _ref, value2 = (_ref = (_section_key = section[key]) !== null && _section_key !== void 0 ? _section_key : defaultValue) !== null && _ref !== void 0 ? _ref : fillValue;
|
|
9928
|
+
return fillValue = value2, defaultValue = value2, [
|
|
9923
9929
|
key,
|
|
9924
|
-
|
|
9930
|
+
value2
|
|
9925
9931
|
];
|
|
9926
9932
|
}));
|
|
9927
9933
|
}, createFont2 = function(font) {
|
|
@@ -10073,7 +10079,7 @@ var require_createTamagui_native = __commonJS({
|
|
|
10073
10079
|
}
|
|
10074
10080
|
});
|
|
10075
10081
|
module2.exports = __toCommonJS2(createTamagui_exports);
|
|
10076
|
-
var import_constants4 =
|
|
10082
|
+
var import_constants4 = require_index_native(), import_config = require_config_native(), import_createVariables = require_createVariables_native(), import_getThemeCSSRules = require_getThemeCSSRules_native(), import_insertStyleRule = require_insertStyleRule_native(), import_proxyThemeToParents = require_proxyThemeToParents_native(), import_registerCSSVariable = require_registerCSSVariable_native(), import_themes = require_themes_native(), import_useMedia = require_useMedia_native(), import_insertFont = require_insertFont_native(), import_loadDuplicatedConfig = require_loadDuplicatedConfig_native(), import_Tamagui = require_Tamagui_native();
|
|
10077
10083
|
function shouldTokenCategoryHaveUnits(category) {
|
|
10078
10084
|
var UNIT_CATEGORIES = /* @__PURE__ */ new Set([
|
|
10079
10085
|
"size",
|
|
@@ -11052,7 +11058,7 @@ var require_useIsTouchDevice_native = __commonJS({
|
|
|
11052
11058
|
}
|
|
11053
11059
|
});
|
|
11054
11060
|
module2.exports = __toCommonJS2(useIsTouchDevice_exports);
|
|
11055
|
-
var import_constants4 =
|
|
11061
|
+
var import_constants4 = require_index_native(), import_use_did_finish_ssr = require_index_native14(), useIsTouchDevice2 = function() {
|
|
11056
11062
|
return import_constants4.isWeb ? (0, import_use_did_finish_ssr.useDidFinishSSR)() ? import_constants4.isTouchable : !1 : !0;
|
|
11057
11063
|
};
|
|
11058
11064
|
}
|
|
@@ -11171,7 +11177,7 @@ var require_useProps_native = __commonJS({
|
|
|
11171
11177
|
}
|
|
11172
11178
|
});
|
|
11173
11179
|
module2.exports = __toCommonJS2(useProps_exports);
|
|
11174
|
-
var import_constants4 =
|
|
11180
|
+
var import_constants4 = require_index_native(), import_react3 = __toESM2(require("react")), import_config = require_config_native(), import_ComponentContext = require_ComponentContext_native(), import_GroupContext = require_GroupContext_native(), import_getSplitStyles = require_getSplitStyles_native(), import_subscribeToContextGroup = require_subscribeToContextGroup_native(), import_Stack = require_Stack_native(), import_useComponentState = require_useComponentState_native(), import_useMedia = require_useMedia_native(), import_useTheme = require_useTheme_native();
|
|
11175
11181
|
function useProps2(props, opts) {
|
|
11176
11182
|
var [propsOut, styleOut] = usePropsAndStyle2(props, {
|
|
11177
11183
|
...opts,
|
|
@@ -11411,7 +11417,7 @@ var require_ThemeProvider_native = __commonJS({
|
|
|
11411
11417
|
}
|
|
11412
11418
|
});
|
|
11413
11419
|
module2.exports = __toCommonJS2(ThemeProvider_exports);
|
|
11414
|
-
var import_jsx_runtime6 = require("react/jsx-runtime"), import_constants4 =
|
|
11420
|
+
var import_jsx_runtime6 = require("react/jsx-runtime"), import_constants4 = require_index_native(), import_react3 = require("react"), import_config = require_config_native(), import_constants22 = require_constants_native2(), import_Theme = require_Theme_native(), ThemeProvider = function(props) {
|
|
11415
11421
|
var _props_disableRootThemeClass, disableRootThemeClass = (_props_disableRootThemeClass = props.disableRootThemeClass) !== null && _props_disableRootThemeClass !== void 0 ? _props_disableRootThemeClass : (0, import_config.getSetting)("disableRootThemeClass"), _props_themeClassNameOnRoot, themeClassNameOnRoot = (_props_themeClassNameOnRoot = props.themeClassNameOnRoot) !== null && _props_themeClassNameOnRoot !== void 0 ? _props_themeClassNameOnRoot : (0, import_config.getSetting)("themeClassNameOnRoot");
|
|
11416
11422
|
return import_constants4.isClient && (0, import_constants4.useIsomorphicLayoutEffect)(function() {
|
|
11417
11423
|
if (!disableRootThemeClass) {
|
|
@@ -11562,7 +11568,7 @@ var require_TamaguiProvider_native = __commonJS({
|
|
|
11562
11568
|
}
|
|
11563
11569
|
});
|
|
11564
11570
|
module2.exports = __toCommonJS2(TamaguiProvider_exports);
|
|
11565
|
-
var import_jsx_runtime6 = require("react/jsx-runtime"), import_constants4 =
|
|
11571
|
+
var import_jsx_runtime6 = require("react/jsx-runtime"), import_constants4 = require_index_native(), import_use_did_finish_ssr = require_index_native14(), import_react3 = __toESM2(require("react")), import_config = require_config_native(), import_ComponentContext = require_ComponentContext_native(), import_insertStyleRule = require_insertStyleRule_native(), import_useMedia = require_useMedia_native(), import_ThemeProvider = require_ThemeProvider_native();
|
|
11566
11572
|
function TamaguiProvider2(param) {
|
|
11567
11573
|
var { children, disableInjectCSS, config, className, defaultTheme, disableRootThemeClass, reset, themeClassNameOnRoot } = param;
|
|
11568
11574
|
import_constants4.IS_REACT_19 || import_constants4.isClient && (0, import_constants4.useIsomorphicLayoutEffect)(function() {
|
|
@@ -11592,6 +11598,7 @@ var require_TamaguiProvider_native = __commonJS({
|
|
|
11592
11598
|
})
|
|
11593
11599
|
});
|
|
11594
11600
|
return (0, import_config.getSetting)("disableSSR") && (contents = /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_use_did_finish_ssr.ClientOnly, {
|
|
11601
|
+
enabled: !0,
|
|
11595
11602
|
children: contents
|
|
11596
11603
|
})), /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(import_jsx_runtime6.Fragment, {
|
|
11597
11604
|
children: [
|
|
@@ -11672,16 +11679,15 @@ var require_Configuration_native = __commonJS({
|
|
|
11672
11679
|
});
|
|
11673
11680
|
module2.exports = __toCommonJS2(Configuration_exports);
|
|
11674
11681
|
var import_jsx_runtime6 = require("react/jsx-runtime"), import_use_did_finish_ssr = require_index_native14(), import_react3 = __toESM2(require("react")), import_ComponentContext = require_ComponentContext_native(), Configuration2 = function(props) {
|
|
11675
|
-
var current = import_react3.default.useContext(import_ComponentContext.ComponentContext);
|
|
11682
|
+
var current = import_react3.default.useContext(import_ComponentContext.ComponentContext), _props_disableSSR;
|
|
11676
11683
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_use_did_finish_ssr.ClientOnly, {
|
|
11677
|
-
|
|
11684
|
+
enabled: (_props_disableSSR = props.disableSSR) !== null && _props_disableSSR !== void 0 ? _props_disableSSR : current.disableSSR,
|
|
11678
11685
|
children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_ComponentContext.ComponentContext.Provider, {
|
|
11679
11686
|
...current,
|
|
11680
11687
|
...props
|
|
11681
11688
|
})
|
|
11682
11689
|
});
|
|
11683
11690
|
};
|
|
11684
|
-
Configuration2.displayName = "Configuration";
|
|
11685
11691
|
}
|
|
11686
11692
|
});
|
|
11687
11693
|
|
|
@@ -11853,7 +11859,7 @@ var require_index_native15 = __commonJS({
|
|
|
11853
11859
|
__reExport2(index_exports2, require_index_native8(), module2.exports);
|
|
11854
11860
|
__reExport2(index_exports2, require_index_native11(), module2.exports);
|
|
11855
11861
|
__reExport2(index_exports2, require_index_native7(), module2.exports);
|
|
11856
|
-
__reExport2(index_exports2,
|
|
11862
|
+
__reExport2(index_exports2, require_index_native(), module2.exports);
|
|
11857
11863
|
__reExport2(index_exports2, require_setupHooks_native(), module2.exports);
|
|
11858
11864
|
}
|
|
11859
11865
|
});
|
|
@@ -11925,7 +11931,7 @@ var require_Collapsible_native = __commonJS({
|
|
|
11925
11931
|
}
|
|
11926
11932
|
});
|
|
11927
11933
|
module2.exports = __toCommonJS2(Collapsible_exports);
|
|
11928
|
-
var import_jsx_runtime6 = require("react/jsx-runtime"), import_animate_presence =
|
|
11934
|
+
var import_jsx_runtime6 = require("react/jsx-runtime"), import_animate_presence = require_index_native5(), import_helpers = require_index_native7(), import_use_controllable_state = require_index_native10(), import_web = require_index_native15(), React4 = __toESM2(require("react")), COLLAPSIBLE_NAME = "Collapsible", { Provider: CollapsibleProvider, useStyledContext: useCollapsibleContext } = (0, import_web.createStyledContext)(), _Collapsible = /* @__PURE__ */ React4.forwardRef(function(props, forwardedRef) {
|
|
11929
11935
|
var { __scopeCollapsible, open: openProp, defaultOpen, disabled, onOpenChange, ...collapsibleProps } = props, [open = !1, setOpen] = (0, import_use_controllable_state.useControllableState)({
|
|
11930
11936
|
prop: openProp,
|
|
11931
11937
|
defaultProp: defaultOpen,
|
|
@@ -12096,41 +12102,41 @@ var require_matchQuery_native = __commonJS({
|
|
|
12096
12102
|
var inverse = query.inverse, typeMatch = query.type === "all" || values.type === query.type;
|
|
12097
12103
|
if (typeMatch && inverse || !(typeMatch || inverse)) return !1;
|
|
12098
12104
|
var expressionsMatch = query.expressions.every(function(expression) {
|
|
12099
|
-
var feature = expression.feature, modifier = expression.modifier, expValue = expression.value,
|
|
12100
|
-
if (!
|
|
12105
|
+
var feature = expression.feature, modifier = expression.modifier, expValue = expression.value, value2 = values[feature];
|
|
12106
|
+
if (!value2) return !1;
|
|
12101
12107
|
switch (feature) {
|
|
12102
12108
|
case "orientation":
|
|
12103
12109
|
case "scan":
|
|
12104
|
-
return
|
|
12110
|
+
return value2.toLowerCase() === expValue.toLowerCase();
|
|
12105
12111
|
case "width":
|
|
12106
12112
|
case "height":
|
|
12107
12113
|
case "device-width":
|
|
12108
12114
|
case "device-height":
|
|
12109
|
-
expValue = toPx(expValue),
|
|
12115
|
+
expValue = toPx(expValue), value2 = toPx(value2);
|
|
12110
12116
|
break;
|
|
12111
12117
|
case "resolution":
|
|
12112
|
-
expValue = toDpi(expValue),
|
|
12118
|
+
expValue = toDpi(expValue), value2 = toDpi(value2);
|
|
12113
12119
|
break;
|
|
12114
12120
|
case "aspect-ratio":
|
|
12115
12121
|
case "device-aspect-ratio":
|
|
12116
12122
|
case /* Deprecated */
|
|
12117
12123
|
"device-pixel-ratio":
|
|
12118
|
-
expValue = toDecimal(expValue),
|
|
12124
|
+
expValue = toDecimal(expValue), value2 = toDecimal(value2);
|
|
12119
12125
|
break;
|
|
12120
12126
|
case "grid":
|
|
12121
12127
|
case "color":
|
|
12122
12128
|
case "color-index":
|
|
12123
12129
|
case "monochrome":
|
|
12124
|
-
expValue = Number.parseInt(expValue, 10) || 1,
|
|
12130
|
+
expValue = Number.parseInt(expValue, 10) || 1, value2 = Number.parseInt(value2, 10) || 0;
|
|
12125
12131
|
break;
|
|
12126
12132
|
}
|
|
12127
12133
|
switch (modifier) {
|
|
12128
12134
|
case "min":
|
|
12129
|
-
return
|
|
12135
|
+
return value2 >= expValue;
|
|
12130
12136
|
case "max":
|
|
12131
|
-
return
|
|
12137
|
+
return value2 <= expValue;
|
|
12132
12138
|
default:
|
|
12133
|
-
return
|
|
12139
|
+
return value2 === expValue;
|
|
12134
12140
|
}
|
|
12135
12141
|
});
|
|
12136
12142
|
return expressionsMatch && !inverse || !expressionsMatch && inverse;
|
|
@@ -12162,35 +12168,35 @@ var require_matchQuery_native = __commonJS({
|
|
|
12162
12168
|
return decimal || (numbers = ratio.match(/^(\d+)\s*\/\s*(\d+)$/), decimal = numbers[1] / numbers[2]), decimal;
|
|
12163
12169
|
}
|
|
12164
12170
|
function toDpi(resolution) {
|
|
12165
|
-
var _String_match,
|
|
12171
|
+
var _String_match, value2 = Number.parseFloat(resolution), units = (_String_match = String(resolution).match(RE_RESOLUTION_UNIT)) === null || _String_match === void 0 ? void 0 : _String_match[1];
|
|
12166
12172
|
switch (units) {
|
|
12167
12173
|
case "dpcm":
|
|
12168
|
-
return
|
|
12174
|
+
return value2 / 2.54;
|
|
12169
12175
|
case "dppx":
|
|
12170
|
-
return
|
|
12176
|
+
return value2 * 96;
|
|
12171
12177
|
default:
|
|
12172
|
-
return
|
|
12178
|
+
return value2;
|
|
12173
12179
|
}
|
|
12174
12180
|
}
|
|
12175
12181
|
function toPx(length) {
|
|
12176
|
-
var _String_match,
|
|
12182
|
+
var _String_match, value2 = Number.parseFloat(length), units = (_String_match = String(length).match(RE_LENGTH_UNIT)) === null || _String_match === void 0 ? void 0 : _String_match[1];
|
|
12177
12183
|
switch (units) {
|
|
12178
12184
|
case "em":
|
|
12179
|
-
return
|
|
12185
|
+
return value2 * 16;
|
|
12180
12186
|
case "rem":
|
|
12181
|
-
return
|
|
12187
|
+
return value2 * 16;
|
|
12182
12188
|
case "cm":
|
|
12183
|
-
return
|
|
12189
|
+
return value2 * 96 / 2.54;
|
|
12184
12190
|
case "mm":
|
|
12185
|
-
return
|
|
12191
|
+
return value2 * 96 / 2.54 / 10;
|
|
12186
12192
|
case "in":
|
|
12187
|
-
return
|
|
12193
|
+
return value2 * 96;
|
|
12188
12194
|
case "pt":
|
|
12189
|
-
return
|
|
12195
|
+
return value2 * 72;
|
|
12190
12196
|
case "pc":
|
|
12191
|
-
return
|
|
12197
|
+
return value2 * 72 / 12;
|
|
12192
12198
|
default:
|
|
12193
|
-
return
|
|
12199
|
+
return value2;
|
|
12194
12200
|
}
|
|
12195
12201
|
}
|
|
12196
12202
|
}
|
|
@@ -12252,13 +12258,13 @@ var require_mediaQueryList_native = __commonJS({
|
|
|
12252
12258
|
function _create_class(Constructor, protoProps, staticProps) {
|
|
12253
12259
|
return protoProps && _defineProperties(Constructor.prototype, protoProps), staticProps && _defineProperties(Constructor, staticProps), Constructor;
|
|
12254
12260
|
}
|
|
12255
|
-
function _define_property(obj, key,
|
|
12261
|
+
function _define_property(obj, key, value2) {
|
|
12256
12262
|
return key in obj ? Object.defineProperty(obj, key, {
|
|
12257
|
-
value,
|
|
12263
|
+
value: value2,
|
|
12258
12264
|
enumerable: !0,
|
|
12259
12265
|
configurable: !0,
|
|
12260
12266
|
writable: !0
|
|
12261
|
-
}) : obj[key] =
|
|
12267
|
+
}) : obj[key] = value2, obj;
|
|
12262
12268
|
}
|
|
12263
12269
|
var NativeMediaQueryList = /* @__PURE__ */ function() {
|
|
12264
12270
|
"use strict";
|
|
@@ -12928,13 +12934,13 @@ var require_ResponderTouchHistoryStore_native = __commonJS({
|
|
|
12928
12934
|
function _create_class(Constructor, protoProps, staticProps) {
|
|
12929
12935
|
return protoProps && _defineProperties(Constructor.prototype, protoProps), staticProps && _defineProperties(Constructor, staticProps), Constructor;
|
|
12930
12936
|
}
|
|
12931
|
-
function _define_property(obj, key,
|
|
12937
|
+
function _define_property(obj, key, value2) {
|
|
12932
12938
|
return key in obj ? Object.defineProperty(obj, key, {
|
|
12933
|
-
value,
|
|
12939
|
+
value: value2,
|
|
12934
12940
|
enumerable: !0,
|
|
12935
12941
|
configurable: !0,
|
|
12936
12942
|
writable: !0
|
|
12937
|
-
}) : obj[key] =
|
|
12943
|
+
}) : obj[key] = value2, obj;
|
|
12938
12944
|
}
|
|
12939
12945
|
var ResponderTouchHistoryStore = /* @__PURE__ */ function() {
|
|
12940
12946
|
"use strict";
|
|
@@ -13500,7 +13506,7 @@ var require_index_native19 = __commonJS({
|
|
|
13500
13506
|
}
|
|
13501
13507
|
});
|
|
13502
13508
|
module2.exports = __toCommonJS2(index_exports2);
|
|
13503
|
-
var import_constants4 =
|
|
13509
|
+
var import_constants4 = require_index_native(), import_is_equal_shallow = require_index_native12(), LayoutHandlers = /* @__PURE__ */ new WeakMap(), Nodes = /* @__PURE__ */ new Set(), IntersectionState = /* @__PURE__ */ new WeakMap(), globalIntersectionObserver = null, strategy = "async";
|
|
13504
13510
|
function setOnLayoutStrategy3(state) {
|
|
13505
13511
|
strategy = state;
|
|
13506
13512
|
}
|
|
@@ -14347,7 +14353,7 @@ var require_Collection_native = __commonJS({
|
|
|
14347
14353
|
}
|
|
14348
14354
|
});
|
|
14349
14355
|
module2.exports = __toCommonJS2(Collection_exports);
|
|
14350
|
-
var import_jsx_runtime6 = require("react/jsx-runtime"), import_compose_refs = require_index_native11(), import_constants4 =
|
|
14356
|
+
var import_jsx_runtime6 = require("react/jsx-runtime"), import_compose_refs = require_index_native11(), import_constants4 = require_index_native(), import_core12 = require_index_native20(), import_react3 = __toESM2(require("react"));
|
|
14351
14357
|
function createCollection(name) {
|
|
14352
14358
|
var { Provider: CollectionProviderImpl, useStyledContext: useCollectionContext } = (0, import_core12.createStyledContext)({
|
|
14353
14359
|
collectionRef: {
|
|
@@ -15261,7 +15267,7 @@ var require_index_native25 = __commonJS({
|
|
|
15261
15267
|
}
|
|
15262
15268
|
});
|
|
15263
15269
|
module2.exports = __toCommonJS2(index_exports2);
|
|
15264
|
-
var import_constants4 =
|
|
15270
|
+
var import_constants4 = require_index_native(), import_web = require_index_native15(), getFontSized2 = function() {
|
|
15265
15271
|
var sizeTokenIn = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : "$true", { font, fontFamily, props } = arguments.length > 1 ? arguments[1] : void 0, _font_lineHeight, _font_weight, _font_letterSpacing, _font_transform, _font_style, _font_color;
|
|
15266
15272
|
if (!font) return {
|
|
15267
15273
|
fontSize: sizeTokenIn
|
|
@@ -15896,7 +15902,7 @@ var require_Accordion_native = __commonJS({
|
|
|
15896
15902
|
}
|
|
15897
15903
|
});
|
|
15898
15904
|
module2.exports = __toCommonJS2(Accordion_exports);
|
|
15899
|
-
var import_jsx_runtime6 = require("react/jsx-runtime"), import_collapsible = require_index_native16(), import_collection = require_index_native21(), import_compose_refs = require_index_native11(), import_constants4 =
|
|
15905
|
+
var import_jsx_runtime6 = require("react/jsx-runtime"), import_collapsible = require_index_native16(), import_collection = require_index_native21(), import_compose_refs = require_index_native11(), import_constants4 = require_index_native(), import_core12 = require_index_native20(), import_helpers = require_index_native7(), import_stacks3 = require_index_native24(), import_text2 = require_index_native26(), import_use_controllable_state = require_index_native10(), import_use_direction = require_index_native27(), React4 = __toESM2(require("react")), ACCORDION_NAME = "Accordion", ACCORDION_KEYS = [
|
|
15900
15906
|
"Home",
|
|
15901
15907
|
"End",
|
|
15902
15908
|
"ArrowDown",
|
|
@@ -15919,24 +15925,24 @@ var require_Accordion_native = __commonJS({
|
|
|
15919
15925
|
AccordionComponent.displayName = ACCORDION_NAME;
|
|
15920
15926
|
AccordionComponent.propTypes = {
|
|
15921
15927
|
type(props) {
|
|
15922
|
-
var
|
|
15928
|
+
var value2 = props.value || props.defaultValue;
|
|
15923
15929
|
return props.type && ![
|
|
15924
15930
|
"single",
|
|
15925
15931
|
"multiple"
|
|
15926
|
-
].includes(props.type) ? new Error("Invalid prop `type` supplied to `Accordion`. Expected one of `single | multiple`.") : props.type === "multiple" && typeof
|
|
15932
|
+
].includes(props.type) ? new Error("Invalid prop `type` supplied to `Accordion`. Expected one of `single | multiple`.") : props.type === "multiple" && typeof value2 == "string" ? new Error("Invalid prop `type` supplied to `Accordion`. Expected `single` when `defaultValue` or `value` is type `string`.") : props.type === "single" && Array.isArray(value2) ? new Error("Invalid prop `type` supplied to `Accordion`. Expected `multiple` when `defaultValue` or `value` is type `string[]`.") : null;
|
|
15927
15933
|
}
|
|
15928
15934
|
};
|
|
15929
15935
|
var { Provider: AccordionValueProvider, useStyledContext: useAccordionValueContext } = (0, import_core12.createStyledContext)(), { Provider: AccordionCollapsibleProvider, useStyledContext: useAccordionCollapsibleContext } = (0, import_core12.createStyledContext)(), AccordionImplSingle = /* @__PURE__ */ React4.forwardRef(function(props, forwardedRef) {
|
|
15930
15936
|
var { value: valueProp, defaultValue, control, onValueChange = function() {
|
|
15931
|
-
}, collapsible = !1, ...accordionSingleProps } = props, [
|
|
15937
|
+
}, collapsible = !1, ...accordionSingleProps } = props, [value2, setValue] = (0, import_use_controllable_state.useControllableState)({
|
|
15932
15938
|
prop: valueProp,
|
|
15933
15939
|
defaultProp: defaultValue || "",
|
|
15934
15940
|
onChange: onValueChange
|
|
15935
15941
|
});
|
|
15936
15942
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(AccordionValueProvider, {
|
|
15937
15943
|
scope: props.__scopeAccordion,
|
|
15938
|
-
value:
|
|
15939
|
-
|
|
15944
|
+
value: value2 ? [
|
|
15945
|
+
value2
|
|
15940
15946
|
] : [],
|
|
15941
15947
|
onItemOpen: setValue,
|
|
15942
15948
|
onItemClose: React4.useCallback(function() {
|
|
@@ -15956,7 +15962,7 @@ var require_Accordion_native = __commonJS({
|
|
|
15956
15962
|
});
|
|
15957
15963
|
}), AccordionImplMultiple = /* @__PURE__ */ React4.forwardRef(function(props, forwardedRef) {
|
|
15958
15964
|
var { value: valueProp, defaultValue, onValueChange = function() {
|
|
15959
|
-
}, ...accordionMultipleProps } = props, [
|
|
15965
|
+
}, ...accordionMultipleProps } = props, [value2, setValue] = (0, import_use_controllable_state.useControllableState)({
|
|
15960
15966
|
prop: valueProp,
|
|
15961
15967
|
defaultProp: defaultValue || [],
|
|
15962
15968
|
onChange: onValueChange
|
|
@@ -15973,8 +15979,8 @@ var require_Accordion_native = __commonJS({
|
|
|
15973
15979
|
]), handleItemClose = React4.useCallback(function(itemValue) {
|
|
15974
15980
|
return setValue(function() {
|
|
15975
15981
|
var prevValue = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : [];
|
|
15976
|
-
return prevValue.filter(function(
|
|
15977
|
-
return
|
|
15982
|
+
return prevValue.filter(function(value22) {
|
|
15983
|
+
return value22 !== itemValue;
|
|
15978
15984
|
});
|
|
15979
15985
|
});
|
|
15980
15986
|
}, [
|
|
@@ -15982,7 +15988,7 @@ var require_Accordion_native = __commonJS({
|
|
|
15982
15988
|
]);
|
|
15983
15989
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(AccordionValueProvider, {
|
|
15984
15990
|
scope: props.__scopeAccordion,
|
|
15985
|
-
value:
|
|
15991
|
+
value: value2 || [],
|
|
15986
15992
|
onItemOpen: handleItemOpen,
|
|
15987
15993
|
onItemClose: handleItemClose,
|
|
15988
15994
|
children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(AccordionCollapsibleProvider, {
|
|
@@ -16054,7 +16060,7 @@ var require_Accordion_native = __commonJS({
|
|
|
16054
16060
|
})
|
|
16055
16061
|
});
|
|
16056
16062
|
}), ITEM_NAME = "AccordionItem", { Provider: AccordionItemProvider, useStyledContext: useAccordionItemContext } = (0, import_core12.createStyledContext)(), AccordionItem = /* @__PURE__ */ React4.forwardRef(function(props, forwardedRef) {
|
|
16057
|
-
var { __scopeAccordion, value, ...accordionItemProps } = props, accordionContext = useAccordionContext(__scopeAccordion), valueContext = useAccordionValueContext(__scopeAccordion), triggerId = React4.useId(), open =
|
|
16063
|
+
var { __scopeAccordion, value: value2, ...accordionItemProps } = props, accordionContext = useAccordionContext(__scopeAccordion), valueContext = useAccordionValueContext(__scopeAccordion), triggerId = React4.useId(), open = value2 && valueContext.value.includes(value2) || !1, disabled = accordionContext.disabled || props.disabled;
|
|
16058
16064
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(AccordionItemProvider, {
|
|
16059
16065
|
scope: __scopeAccordion,
|
|
16060
16066
|
open,
|
|
@@ -16069,7 +16075,7 @@ var require_Accordion_native = __commonJS({
|
|
|
16069
16075
|
disabled,
|
|
16070
16076
|
open,
|
|
16071
16077
|
onOpenChange: function(open2) {
|
|
16072
|
-
open2 ? valueContext.onItemOpen(
|
|
16078
|
+
open2 ? valueContext.onItemOpen(value2) : valueContext.onItemClose(value2);
|
|
16073
16079
|
}
|
|
16074
16080
|
})
|
|
16075
16081
|
});
|
|
@@ -16508,7 +16514,7 @@ var require_constants_native3 = __commonJS({
|
|
|
16508
16514
|
}
|
|
16509
16515
|
});
|
|
16510
16516
|
module2.exports = __toCommonJS2(constants_exports);
|
|
16511
|
-
var import_constants4 =
|
|
16517
|
+
var import_constants4 = require_index_native(), _global__IS_FABRIC, IS_FABRIC = typeof global < "u" && !!((_global__IS_FABRIC = global._IS_FABRIC) !== null && _global__IS_FABRIC !== void 0 ? _global__IS_FABRIC : global.nativeFabricUIManager), USE_NATIVE_PORTAL = process.env.TAMAGUI_USE_NATIVE_PORTAL && process.env.TAMAGUI_USE_NATIVE_PORTAL !== "false" ? !0 : !import_constants4.isAndroid && !IS_FABRIC, allPortalHosts = /* @__PURE__ */ new Map(), portalListeners = {};
|
|
16512
16518
|
}
|
|
16513
16519
|
});
|
|
16514
16520
|
|
|
@@ -16579,7 +16585,7 @@ var require_GorhomPortal_native = __commonJS({
|
|
|
16579
16585
|
}
|
|
16580
16586
|
});
|
|
16581
16587
|
module2.exports = __toCommonJS2(GorhomPortal_exports);
|
|
16582
|
-
var import_jsx_runtime6 = require("react/jsx-runtime"), import_constants4 =
|
|
16588
|
+
var import_jsx_runtime6 = require("react/jsx-runtime"), import_constants4 = require_index_native(), import_start_transition = require_index_native9(), import_react3 = __toESM2(require("react")), import_constants22 = require_constants_native3(), ACTIONS = /* @__PURE__ */ function(ACTIONS2) {
|
|
16583
16589
|
return ACTIONS2[ACTIONS2.REGISTER_HOST = 0] = "REGISTER_HOST", ACTIONS2[ACTIONS2.DEREGISTER_HOST = 1] = "DEREGISTER_HOST", ACTIONS2[ACTIONS2.ADD_UPDATE_PORTAL = 2] = "ADD_UPDATE_PORTAL", ACTIONS2[ACTIONS2.REMOVE_PORTAL = 3] = "REMOVE_PORTAL", ACTIONS2;
|
|
16584
16590
|
}(ACTIONS || {}), INITIAL_STATE = {}, registerHost = function(state, hostName) {
|
|
16585
16591
|
return hostName in state || (state[hostName] = []), state;
|
|
@@ -16662,9 +16668,9 @@ var require_GorhomPortal_native = __commonJS({
|
|
|
16662
16668
|
};
|
|
16663
16669
|
}, PortalProviderComponent = function(param) {
|
|
16664
16670
|
var { rootHostName = "root", shouldAddRootHost = !0, children } = param, [state, dispatch] = (0, import_react3.useReducer)(reducer, INITIAL_STATE), transitionDispatch = (0, import_react3.useMemo)(function() {
|
|
16665
|
-
var next = function(
|
|
16671
|
+
var next = function(value2) {
|
|
16666
16672
|
(0, import_start_transition.startTransition)(function() {
|
|
16667
|
-
dispatch(
|
|
16673
|
+
dispatch(value2);
|
|
16668
16674
|
});
|
|
16669
16675
|
};
|
|
16670
16676
|
return next;
|
|
@@ -16781,7 +16787,7 @@ var require_GorhomPortalItem_native = __commonJS({
|
|
|
16781
16787
|
}
|
|
16782
16788
|
});
|
|
16783
16789
|
module2.exports = __toCommonJS2(GorhomPortalItem_native_exports);
|
|
16784
|
-
var import_constants4 =
|
|
16790
|
+
var import_constants4 = require_index_native(), import_core12 = require_index_native20(), import_react3 = require("react"), import_GorhomPortal = require_GorhomPortal_native(), GorhomPortalItem = function(props) {
|
|
16785
16791
|
var { name: _providedName, hostName, handleOnMount: _providedHandleOnMount, handleOnUnmount: _providedHandleOnUnmount, handleOnUpdate: _providedHandleOnUpdate, children, passThrough } = props, { addPortal: addUpdatePortal, removePortal } = (0, import_GorhomPortal.usePortal)(hostName), id = (0, import_react3.useId)(), name = _providedName || id, handleOnMount = (0, import_core12.useEvent)(function() {
|
|
16786
16792
|
_providedHandleOnMount ? _providedHandleOnMount(function() {
|
|
16787
16793
|
return addUpdatePortal(name, children);
|
|
@@ -17121,7 +17127,7 @@ var require_Adapt_native = __commonJS({
|
|
|
17121
17127
|
}
|
|
17122
17128
|
});
|
|
17123
17129
|
module2.exports = __toCommonJS2(Adapt_exports);
|
|
17124
|
-
var import_jsx_runtime6 = require("react/jsx-runtime"), import_constants4 =
|
|
17130
|
+
var import_jsx_runtime6 = require("react/jsx-runtime"), import_constants4 = require_index_native(), import_core12 = require_index_native20(), import_helpers = require_index_native7(), import_portal2 = require_index_native30(), import_z_index_stack2 = require_index_native29(), import_react3 = __toESM2(require("react")), AdaptContext = (0, import_core12.createStyledContext)({
|
|
17125
17131
|
Contents: null,
|
|
17126
17132
|
scopeName: "",
|
|
17127
17133
|
portalName: "",
|
|
@@ -17344,11 +17350,11 @@ var require_create_context_native = __commonJS({
|
|
|
17344
17350
|
function createContext(rootComponentName, defaultContext) {
|
|
17345
17351
|
var Context = /* @__PURE__ */ React4.createContext(defaultContext);
|
|
17346
17352
|
function Provider(props) {
|
|
17347
|
-
var { children, ...context } = props,
|
|
17353
|
+
var { children, ...context } = props, value2 = React4.useMemo(function() {
|
|
17348
17354
|
return context;
|
|
17349
17355
|
}, Object.values(context));
|
|
17350
17356
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Context.Provider, {
|
|
17351
|
-
value,
|
|
17357
|
+
value: value2,
|
|
17352
17358
|
children
|
|
17353
17359
|
});
|
|
17354
17360
|
}
|
|
@@ -17372,11 +17378,11 @@ var require_create_context_native = __commonJS({
|
|
|
17372
17378
|
defaultContext
|
|
17373
17379
|
];
|
|
17374
17380
|
function Provider(props) {
|
|
17375
|
-
var _scope_scopeName, { scope, children, ...context } = props, Context = (scope == null || (_scope_scopeName = scope[scopeName]) === null || _scope_scopeName === void 0 ? void 0 : _scope_scopeName[index]) || BaseContext,
|
|
17381
|
+
var _scope_scopeName, { scope, children, ...context } = props, Context = (scope == null || (_scope_scopeName = scope[scopeName]) === null || _scope_scopeName === void 0 ? void 0 : _scope_scopeName[index]) || BaseContext, value2 = React4.useMemo(function() {
|
|
17376
17382
|
return context;
|
|
17377
17383
|
}, Object.values(context));
|
|
17378
17384
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Context.Provider, {
|
|
17379
|
-
value,
|
|
17385
|
+
value: value2,
|
|
17380
17386
|
children
|
|
17381
17387
|
});
|
|
17382
17388
|
}
|
|
@@ -18182,7 +18188,7 @@ var require_useSheetProviderProps_native = __commonJS({
|
|
|
18182
18188
|
}
|
|
18183
18189
|
});
|
|
18184
18190
|
module2.exports = __toCommonJS2(useSheetProviderProps_exports);
|
|
18185
|
-
var import_react3 = __toESM2(require("react")), import_core12 = require_index_native20(), import_use_constant =
|
|
18191
|
+
var import_react3 = __toESM2(require("react")), import_core12 = require_index_native20(), import_use_constant = require_index_native3(), import_use_controllable_state = require_index_native10();
|
|
18186
18192
|
function useSheetProviderProps(props, state) {
|
|
18187
18193
|
var options = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, handleRef = import_react3.default.useRef(null), contentRef = import_react3.default.useRef(null), [frameSize, setFrameSize] = import_react3.default.useState(0), [maxContentSize, setMaxContentSize] = import_react3.default.useState(0), _props_snapPointsMode, snapPointsMode = (_props_snapPointsMode = props.snapPointsMode) !== null && _props_snapPointsMode !== void 0 ? _props_snapPointsMode : "percent", _props_snapPoints, snapPointsProp = (_props_snapPoints = props.snapPoints) !== null && _props_snapPoints !== void 0 ? _props_snapPoints : snapPointsMode === "percent" ? [
|
|
18188
18194
|
80
|
|
@@ -18574,7 +18580,7 @@ var require_SheetImplementationCustom_native = __commonJS({
|
|
|
18574
18580
|
}
|
|
18575
18581
|
});
|
|
18576
18582
|
module2.exports = __toCommonJS2(SheetImplementationCustom_exports);
|
|
18577
|
-
var import_jsx_runtime6 = require("react/jsx-runtime"), import_adapt = require_index_native31(), import_animate_presence =
|
|
18583
|
+
var import_jsx_runtime6 = require("react/jsx-runtime"), import_adapt = require_index_native31(), import_animate_presence = require_index_native5(), import_compose_refs = require_index_native11(), import_constants4 = require_index_native(), import_core12 = require_index_native20(), import_portal2 = require_index_native30(), import_react3 = __toESM2(require("react")), import_react_native4 = require_fake_react_native(), import_contexts = require_contexts_native(), import_helpers = require_helpers_native2(), import_SheetContext = require_SheetContext_native(), import_useSheetOpenState = require_useSheetOpenState_native(), import_useSheetProviderProps = require_useSheetProviderProps_native(), hiddenSize = 10000.1, sheetHiddenStyleSheet = null, relativeDimensionTo = import_constants4.isWeb ? "window" : "screen", SheetImplementationCustom = /* @__PURE__ */ import_react3.default.forwardRef(function(props, forwardedRef) {
|
|
18578
18584
|
var parentSheet = import_react3.default.useContext(import_contexts.ParentSheetContext), { animation, animationConfig: animationConfigProp, modal = !1, zIndex = parentSheet.zIndex + 1, moveOnKeyboardChange = !1, unmountChildrenWhenHidden = !1, portalProps, containerComponent: ContainerComponent = import_react3.default.Fragment } = props, state = (0, import_useSheetOpenState.useSheetOpenState)(props), [overlayComponent, setOverlayComponent] = import_react3.default.useState(null), providerProps = (0, import_useSheetProviderProps.useSheetProviderProps)(props, state, {
|
|
18579
18585
|
onOverlayComponent: setOverlayComponent
|
|
18580
18586
|
}), { frameSize, setFrameSize, snapPoints, snapPointsMode, hasFit, position, setPosition, scrollBridge, screenSize, setMaxContentSize, maxSnapPoint } = providerProps, { open, controller, isHidden } = state, sheetRef = import_react3.default.useRef(void 0), ref = (0, import_compose_refs.useComposedRefs)(forwardedRef, sheetRef, providerProps.contentRef), { animationDriver } = (0, import_core12.useConfiguration)();
|
|
@@ -18619,8 +18625,8 @@ var require_SheetImplementationCustom_native = __commonJS({
|
|
|
18619
18625
|
useAnimatedNumberReaction({
|
|
18620
18626
|
value: animatedNumber,
|
|
18621
18627
|
hostRef: sheetRef
|
|
18622
|
-
}, import_react3.default.useCallback(function(
|
|
18623
|
-
at.current =
|
|
18628
|
+
}, import_react3.default.useCallback(function(value2) {
|
|
18629
|
+
at.current = value2, scrollBridge.paneY = value2;
|
|
18624
18630
|
}, [
|
|
18625
18631
|
animationDriver
|
|
18626
18632
|
]));
|
|
@@ -19289,7 +19295,7 @@ var require_createSheet_native = __commonJS({
|
|
|
19289
19295
|
}
|
|
19290
19296
|
});
|
|
19291
19297
|
module2.exports = __toCommonJS2(createSheet_exports);
|
|
19292
|
-
var import_jsx_runtime6 = require("react/jsx-runtime"), import_compose_refs = require_index_native11(), import_constants4 =
|
|
19298
|
+
var import_jsx_runtime6 = require("react/jsx-runtime"), import_compose_refs = require_index_native11(), import_constants4 = require_index_native(), import_core12 = require_index_native20(), import_helpers = require_index_native7(), import_portal2 = require_index_native30(), import_remove_scroll = require_index_native35(), import_use_did_finish_ssr = require_index_native14(), import_z_index_stack2 = require_index_native29(), import_react3 = require("react"), import_react_native4 = require_fake_react_native(), import_constants22 = require_constants_native4(), import_nativeSheet = require_nativeSheet_native(), import_SheetContext = require_SheetContext_native(), import_SheetImplementationCustom = require_SheetImplementationCustom_native(), import_SheetScrollView = require_SheetScrollView_native(), import_useSheetController = require_useSheetController_native(), import_useSheetOffscreenSize = require_useSheetOffscreenSize_native();
|
|
19293
19299
|
function createSheet(param) {
|
|
19294
19300
|
var { Handle, Frame, Overlay } = param, SheetHandle = Handle.styleable(function(param2, forwardedRef) {
|
|
19295
19301
|
var { __scopeSheet, ...props } = param2, context = (0, import_SheetContext.useSheetContext)(import_constants22.SHEET_HANDLE_NAME, __scopeSheet), composedRef = (0, import_compose_refs.useComposedRefs)(context.handleRef, forwardedRef);
|
|
@@ -19861,7 +19867,7 @@ var require_Dialog_native = __commonJS({
|
|
|
19861
19867
|
}
|
|
19862
19868
|
});
|
|
19863
19869
|
module2.exports = __toCommonJS2(Dialog_exports);
|
|
19864
|
-
var import_jsx_runtime6 = require("react/jsx-runtime"), import_adapt = require_index_native31(), import_animate_presence =
|
|
19870
|
+
var import_jsx_runtime6 = require("react/jsx-runtime"), import_adapt = require_index_native31(), import_animate_presence = require_index_native5(), import_compose_refs = require_index_native11(), import_constants4 = require_index_native(), import_core12 = require_index_native20(), import_create_context = require_index_native32(), import_dismissable = require_index_native33(), import_focus_scope = require_index_native34(), import_helpers = require_index_native7(), import_portal2 = require_index_native30(), import_remove_scroll = require_index_native35(), import_sheet = require_index_native37(), import_stacks3 = require_index_native24(), import_text2 = require_index_native26(), import_use_controllable_state = require_index_native10(), import_z_index_stack2 = require_index_native29(), React4 = __toESM2(require("react")), DialogContext = (0, import_core12.createStyledContext)(
|
|
19865
19871
|
// since we always provide this we can avoid setting here
|
|
19866
19872
|
{},
|
|
19867
19873
|
"Dialog__"
|
|
@@ -20105,6 +20111,7 @@ var require_Dialog_native = __commonJS({
|
|
|
20105
20111
|
children: contentProps.children
|
|
20106
20112
|
});
|
|
20107
20113
|
var contents = /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(DialogContentFrame, {
|
|
20114
|
+
ref: composedRefs,
|
|
20108
20115
|
id: context.contentId,
|
|
20109
20116
|
"aria-describedby": context.descriptionId,
|
|
20110
20117
|
"aria-labelledby": context.titleId,
|
|
@@ -20120,8 +20127,6 @@ var require_Dialog_native = __commonJS({
|
|
|
20120
20127
|
onPointerDownOutside,
|
|
20121
20128
|
onFocusOutside,
|
|
20122
20129
|
onInteractOutside,
|
|
20123
|
-
// @ts-ignore
|
|
20124
|
-
ref: composedRefs,
|
|
20125
20130
|
onDismiss: function() {
|
|
20126
20131
|
var _context_onOpenChange;
|
|
20127
20132
|
return context == null || (_context_onOpenChange = context.onOpenChange) === null || _context_onOpenChange === void 0 ? void 0 : _context_onOpenChange.call(context, !1);
|
|
@@ -20418,7 +20423,7 @@ var require_AlertDialog_native = __commonJS({
|
|
|
20418
20423
|
}
|
|
20419
20424
|
});
|
|
20420
20425
|
module2.exports = __toCommonJS2(AlertDialog_exports);
|
|
20421
|
-
var import_jsx_runtime6 = require("react/jsx-runtime"), import_compose_refs = require_index_native11(), import_constants4 =
|
|
20426
|
+
var import_jsx_runtime6 = require("react/jsx-runtime"), import_compose_refs = require_index_native11(), import_constants4 = require_index_native(), import_core12 = require_index_native20(), import_dialog = require_index_native38(), import_helpers = require_index_native7(), import_use_controllable_state = require_index_native10(), React4 = __toESM2(require("react")), import_react_native4 = require_fake_react_native(), AlertScopePrefix = "Alert__", getAlertDialogScope = function(scope) {
|
|
20422
20427
|
return AlertScopePrefix + scope;
|
|
20423
20428
|
}, ROOT_NAME = "AlertDialog", TRIGGER_NAME = "AlertDialogTrigger", NativeAlertDialogTriggerFrame = (0, import_core12.styled)(import_core12.View, {
|
|
20424
20429
|
name: TRIGGER_NAME
|
|
@@ -20736,7 +20741,7 @@ var require_Image_native = __commonJS({
|
|
|
20736
20741
|
}
|
|
20737
20742
|
});
|
|
20738
20743
|
module2.exports = __toCommonJS2(Image_exports);
|
|
20739
|
-
var import_jsx_runtime6 = require("react/jsx-runtime"), import_react3 = __toESM2(require("react")), import_constants4 =
|
|
20744
|
+
var import_jsx_runtime6 = require("react/jsx-runtime"), import_react3 = __toESM2(require("react")), import_constants4 = require_index_native(), import_core12 = require_index_native20(), import_react_native4 = require_fake_react_native(), StyledImage = (0, import_core12.styled)(import_react_native4.Image, {
|
|
20740
20745
|
name: "Image"
|
|
20741
20746
|
}), hasWarned = !1, Image = StyledImage.styleable(function(inProps, ref) {
|
|
20742
20747
|
var [props, style] = (0, import_core12.usePropsAndStyle)(inProps), { src, source, objectFit, ...rest } = props;
|
|
@@ -22312,7 +22317,7 @@ var require_focusableInputHOC_native = __commonJS({
|
|
|
22312
22317
|
module2.exports = __toCommonJS2(focusableInputHOC_exports);
|
|
22313
22318
|
var import_compose_refs = require_index_native11(), import_web = require_index_native15(), import_react3 = __toESM2(require("react")), import_registerFocusable = require_registerFocusable_native();
|
|
22314
22319
|
function useFocusable2(param) {
|
|
22315
|
-
var { isInput, props, ref } = param, { id, onChangeText, value, defaultValue } = props, inputValue = import_react3.default.useRef(
|
|
22320
|
+
var { isInput, props, ref } = param, { id, onChangeText, value: value2, defaultValue } = props, inputValue = import_react3.default.useRef(value2 || defaultValue || ""), unregisterFocusable = import_react3.default.useRef(void 0), focusAndSelect = import_react3.default.useCallback(function(input) {
|
|
22316
22321
|
input.focus(), input.setSelection && typeof inputValue.current == "string" && input.setSelection(0, inputValue.current.length);
|
|
22317
22322
|
}, []), registerFocusableHandler = import_react3.default.useCallback(function(input) {
|
|
22318
22323
|
var _unregisterFocusable_current;
|
|
@@ -22332,8 +22337,8 @@ var require_focusableInputHOC_native = __commonJS({
|
|
|
22332
22337
|
input && registerFocusableHandler(input);
|
|
22333
22338
|
}, [
|
|
22334
22339
|
registerFocusableHandler
|
|
22335
|
-
]), handleChangeText = (0, import_web.useEvent)(function(
|
|
22336
|
-
inputValue.current =
|
|
22340
|
+
]), handleChangeText = (0, import_web.useEvent)(function(value22) {
|
|
22341
|
+
inputValue.current = value22, onChangeText == null || onChangeText(value22);
|
|
22337
22342
|
});
|
|
22338
22343
|
return import_react3.default.useEffect(function() {
|
|
22339
22344
|
return function() {
|
|
@@ -22491,7 +22496,7 @@ var require_Label_native = __commonJS({
|
|
|
22491
22496
|
}
|
|
22492
22497
|
});
|
|
22493
22498
|
module2.exports = __toCommonJS2(Label_exports);
|
|
22494
|
-
var import_jsx_runtime6 = require("react/jsx-runtime"), import_compose_refs = require_index_native11(), import_constants4 =
|
|
22499
|
+
var import_jsx_runtime6 = require("react/jsx-runtime"), import_compose_refs = require_index_native11(), import_constants4 = require_index_native(), import_create_context = require_index_native32(), import_focusable2 = require_index_native47(), import_get_button_sized2 = require_index_native23(), import_get_font_sized2 = require_index_native25(), import_text2 = require_index_native26(), import_web = require_index_native15(), React4 = __toESM2(require("react")), NAME = "Label", [LabelProvider, useLabelContextImpl] = (0, import_create_context.createContext)(NAME, {
|
|
22495
22500
|
id: void 0,
|
|
22496
22501
|
controlRef: {
|
|
22497
22502
|
current: null
|
|
@@ -22685,15 +22690,15 @@ var require_index_native49 = __commonJS({
|
|
|
22685
22690
|
});
|
|
22686
22691
|
module2.exports = __toCommonJS2(index_exports2);
|
|
22687
22692
|
var React4 = __toESM2(require("react"));
|
|
22688
|
-
function usePrevious(
|
|
22693
|
+
function usePrevious(value2) {
|
|
22689
22694
|
var ref = React4.useRef({
|
|
22690
|
-
value,
|
|
22691
|
-
previous:
|
|
22695
|
+
value: value2,
|
|
22696
|
+
previous: value2
|
|
22692
22697
|
});
|
|
22693
22698
|
return React4.useMemo(function() {
|
|
22694
|
-
return ref.current.value !==
|
|
22699
|
+
return ref.current.value !== value2 && (ref.current.previous = ref.current.value, ref.current.value = value2), ref.current.previous;
|
|
22695
22700
|
}, [
|
|
22696
|
-
|
|
22701
|
+
value2
|
|
22697
22702
|
]);
|
|
22698
22703
|
}
|
|
22699
22704
|
}
|
|
@@ -22903,9 +22908,9 @@ var require_useCheckbox_native = __commonJS({
|
|
|
22903
22908
|
}
|
|
22904
22909
|
});
|
|
22905
22910
|
module2.exports = __toCommonJS2(useCheckbox_exports);
|
|
22906
|
-
var import_jsx_runtime6 = require("react/jsx-runtime"), import_compose_refs = require_index_native11(), import_constants4 =
|
|
22911
|
+
var import_jsx_runtime6 = require("react/jsx-runtime"), import_compose_refs = require_index_native11(), import_constants4 = require_index_native(), import_helpers = require_index_native7(), import_label = require_index_native48(), import_react3 = __toESM2(require("react")), import_BubbleInput = require_BubbleInput_native(), import_utils = require_utils_native2();
|
|
22907
22912
|
function useCheckbox(props, param, ref) {
|
|
22908
|
-
var [checked, setChecked] = param, { labelledBy: ariaLabelledby, name, required, disabled, value = "on", onCheckedChange, ...checkboxProps } = props, [button, setButton] = import_react3.default.useState(null), composedRefs = (0, import_compose_refs.useComposedRefs)(ref, setButton), hasConsumerStoppedPropagationRef = import_react3.default.useRef(!1), isFormControl = import_constants4.isWeb ? button ? !!button.closest("form") : !0 : !1, labelId = (0, import_label.useLabelContext)(button), labelledBy = ariaLabelledby || labelId, parentKeyDown = props.onKeyDown, handleKeyDown = (0, import_react3.useMemo)(function() {
|
|
22913
|
+
var [checked, setChecked] = param, { labelledBy: ariaLabelledby, name, required, disabled, value: value2 = "on", onCheckedChange, ...checkboxProps } = props, [button, setButton] = import_react3.default.useState(null), composedRefs = (0, import_compose_refs.useComposedRefs)(ref, setButton), hasConsumerStoppedPropagationRef = import_react3.default.useRef(!1), isFormControl = import_constants4.isWeb ? button ? !!button.closest("form") : !0 : !1, labelId = (0, import_label.useLabelContext)(button), labelledBy = ariaLabelledby || labelId, parentKeyDown = props.onKeyDown, handleKeyDown = (0, import_react3.useMemo)(function() {
|
|
22909
22914
|
return (0, import_helpers.composeEventHandlers)(parentKeyDown, function(event) {
|
|
22910
22915
|
event.key === "Enter" && event.preventDefault();
|
|
22911
22916
|
});
|
|
@@ -22926,7 +22931,7 @@ var require_useCheckbox_native = __commonJS({
|
|
|
22926
22931
|
control: button,
|
|
22927
22932
|
bubbles: !hasConsumerStoppedPropagationRef.current,
|
|
22928
22933
|
name,
|
|
22929
|
-
value,
|
|
22934
|
+
value: value2,
|
|
22930
22935
|
checked,
|
|
22931
22936
|
required,
|
|
22932
22937
|
disabled
|
|
@@ -22939,7 +22944,7 @@ var require_useCheckbox_native = __commonJS({
|
|
|
22939
22944
|
...checkboxProps,
|
|
22940
22945
|
...import_constants4.isWeb && {
|
|
22941
22946
|
type: "button",
|
|
22942
|
-
value,
|
|
22947
|
+
value: value2,
|
|
22943
22948
|
"data-state": (0, import_utils.getState)(checked),
|
|
22944
22949
|
"data-disabled": disabled ? "" : void 0,
|
|
22945
22950
|
disabled,
|
|
@@ -23083,8 +23088,8 @@ var require_createCheckbox_native = __commonJS({
|
|
|
23083
23088
|
import_react3.default.useEffect(function() {
|
|
23084
23089
|
if (props.id && !props.disabled) return (0, import_focusable2.registerFocusable)(props.id, {
|
|
23085
23090
|
focusAndSelect: function() {
|
|
23086
|
-
setChecked == null || setChecked(function(
|
|
23087
|
-
return !
|
|
23091
|
+
setChecked == null || setChecked(function(value2) {
|
|
23092
|
+
return !value2;
|
|
23088
23093
|
});
|
|
23089
23094
|
},
|
|
23090
23095
|
focus: function() {
|
|
@@ -24140,7 +24145,7 @@ var require_Animate_native = __commonJS({
|
|
|
24140
24145
|
}
|
|
24141
24146
|
});
|
|
24142
24147
|
module2.exports = __toCommonJS2(Animate_exports);
|
|
24143
|
-
var import_jsx_runtime6 = require("react/jsx-runtime"), import_animate_presence =
|
|
24148
|
+
var import_jsx_runtime6 = require("react/jsx-runtime"), import_animate_presence = require_index_native5(), import_react3 = require("react");
|
|
24144
24149
|
function Animate(param) {
|
|
24145
24150
|
var { children, lazyMount, type, present, passThrough, ...props } = param, [lazyMounted, setLazyMounted] = (0, import_react3.useState)(lazyMount ? !1 : present);
|
|
24146
24151
|
(0, import_react3.useEffect)(function() {
|
|
@@ -24535,7 +24540,7 @@ var require_Popper_native = __commonJS({
|
|
|
24535
24540
|
}
|
|
24536
24541
|
});
|
|
24537
24542
|
module2.exports = __toCommonJS2(Popper_exports);
|
|
24538
|
-
var import_jsx_runtime6 = require("react/jsx-runtime"), import_compose_refs = require_index_native11(), import_constants4 =
|
|
24543
|
+
var import_jsx_runtime6 = require("react/jsx-runtime"), import_compose_refs = require_index_native11(), import_constants4 = require_index_native(), import_core12 = require_index_native20(), import_floating = require_index_native57(), import_get_token2 = require_index_native22(), import_stacks3 = require_index_native24(), import_start_transition = require_index_native9(), React4 = __toESM2(require("react")), import_react_native4 = require_fake_react_native(), PopperContextFast = (0, import_core12.createStyledContext)(
|
|
24539
24544
|
// since we always provide this we can avoid setting here
|
|
24540
24545
|
{},
|
|
24541
24546
|
"Popper__"
|
|
@@ -25022,7 +25027,7 @@ var require_Popover_native = __commonJS({
|
|
|
25022
25027
|
}
|
|
25023
25028
|
});
|
|
25024
25029
|
module2.exports = __toCommonJS2(Popover_exports);
|
|
25025
|
-
var import_jsx_runtime6 = require("react/jsx-runtime"), import_polyfill_dev = require_polyfill_dev(), import_adapt = require_index_native31(), import_animate = require_index_native56(), import_animate_presence =
|
|
25030
|
+
var import_jsx_runtime6 = require("react/jsx-runtime"), import_polyfill_dev = require_polyfill_dev(), import_adapt = require_index_native31(), import_animate = require_index_native56(), import_animate_presence = require_index_native5(), import_compose_refs = require_index_native11(), import_constants4 = require_index_native(), import_core12 = require_index_native20(), import_floating = require_index_native57(), import_focus_scope = require_index_native34(), import_helpers = require_index_native7(), import_popper = require_index_native58(), import_portal2 = require_index_native30(), import_remove_scroll = require_index_native35(), import_scroll_view = require_index_native36(), import_sheet = require_index_native37(), import_stacks3 = require_index_native24(), import_use_controllable_state = require_index_native10(), import_z_index_stack2 = require_index_native29(), React4 = __toESM2(require("react")), import_useFloatingContext = require_useFloatingContext_native(), needsRepropagation = import_constants4.isAndroid || import_constants4.isIos && !import_portal2.USE_NATIVE_PORTAL, PopoverContext = (0, import_core12.createStyledContext)(
|
|
25026
25031
|
// since we always provide this we can avoid setting here
|
|
25027
25032
|
{},
|
|
25028
25033
|
"Popover__"
|
|
@@ -25529,20 +25534,20 @@ var require_Progress_native = __commonJS({
|
|
|
25529
25534
|
animation: context.width ? animation : null
|
|
25530
25535
|
});
|
|
25531
25536
|
});
|
|
25532
|
-
function defaultGetValueLabel(
|
|
25533
|
-
return `${Math.round(
|
|
25537
|
+
function defaultGetValueLabel(value2, max) {
|
|
25538
|
+
return `${Math.round(value2 / max * 100)}%`;
|
|
25534
25539
|
}
|
|
25535
|
-
function getProgressState(
|
|
25536
|
-
return
|
|
25540
|
+
function getProgressState(value2, maxValue) {
|
|
25541
|
+
return value2 == null ? "indeterminate" : value2 === maxValue ? "complete" : "loading";
|
|
25537
25542
|
}
|
|
25538
|
-
function isNumber(
|
|
25539
|
-
return typeof
|
|
25543
|
+
function isNumber(value2) {
|
|
25544
|
+
return typeof value2 == "number";
|
|
25540
25545
|
}
|
|
25541
25546
|
function isValidMaxNumber(max) {
|
|
25542
25547
|
return isNumber(max) && !Number.isNaN(max) && max > 0;
|
|
25543
25548
|
}
|
|
25544
|
-
function isValidValueNumber(
|
|
25545
|
-
return isNumber(
|
|
25549
|
+
function isValidValueNumber(value2, max) {
|
|
25550
|
+
return isNumber(value2) && !Number.isNaN(value2) && value2 <= max && value2 >= 0;
|
|
25546
25551
|
}
|
|
25547
25552
|
var DEFAULT_MAX = 100, ProgressFrame = (0, import_core12.styled)(import_stacks3.ThemeableStack, {
|
|
25548
25553
|
name: "Progress",
|
|
@@ -25577,21 +25582,21 @@ var require_Progress_native = __commonJS({
|
|
|
25577
25582
|
getValueLabel = defaultGetValueLabel,
|
|
25578
25583
|
size: size2 = "$true",
|
|
25579
25584
|
...progressProps
|
|
25580
|
-
} = props, max = isValidMaxNumber(maxProp) ? maxProp : DEFAULT_MAX,
|
|
25585
|
+
} = props, max = isValidMaxNumber(maxProp) ? maxProp : DEFAULT_MAX, value2 = isValidValueNumber(valueProp, max) ? valueProp : null, valueLabel = isNumber(value2) ? getValueLabel(value2, max) : void 0, [width, setWidth] = React4.useState(0);
|
|
25581
25586
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(ProgressProvider, {
|
|
25582
25587
|
scope: __scopeProgress,
|
|
25583
|
-
value,
|
|
25588
|
+
value: value2,
|
|
25584
25589
|
max,
|
|
25585
25590
|
width,
|
|
25586
25591
|
children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(ProgressFrame, {
|
|
25587
25592
|
"aria-valuemax": max,
|
|
25588
25593
|
"aria-valuemin": 0,
|
|
25589
|
-
"aria-valuenow": isNumber(
|
|
25594
|
+
"aria-valuenow": isNumber(value2) ? value2 : void 0,
|
|
25590
25595
|
"aria-valuetext": valueLabel,
|
|
25591
25596
|
// @ts-ignore
|
|
25592
25597
|
role: "progressbar",
|
|
25593
|
-
"data-state": getProgressState(
|
|
25594
|
-
"data-value":
|
|
25598
|
+
"data-state": getProgressState(value2, max),
|
|
25599
|
+
"data-value": value2 ?? void 0,
|
|
25595
25600
|
"data-max": max,
|
|
25596
25601
|
...progressProps.unstyled !== !0 && {
|
|
25597
25602
|
size: size2
|
|
@@ -25750,8 +25755,8 @@ var require_RadioGroup_native = __commonJS({
|
|
|
25750
25755
|
}
|
|
25751
25756
|
},
|
|
25752
25757
|
size: {
|
|
25753
|
-
"...size": function(
|
|
25754
|
-
var { props } = param, _props_scaleSize, size2 = Math.floor((0, import_core12.getVariableValue)((0, import_get_token2.getSize)(
|
|
25758
|
+
"...size": function(value2, param) {
|
|
25759
|
+
var { props } = param, _props_scaleSize, size2 = Math.floor((0, import_core12.getVariableValue)((0, import_get_token2.getSize)(value2)) * ((_props_scaleSize = props.scaleSize) !== null && _props_scaleSize !== void 0 ? _props_scaleSize : 0.5));
|
|
25755
25760
|
return {
|
|
25756
25761
|
width: size2,
|
|
25757
25762
|
height: size2
|
|
@@ -25988,16 +25993,16 @@ var require_useRadioGroup_native = __commonJS({
|
|
|
25988
25993
|
}
|
|
25989
25994
|
});
|
|
25990
25995
|
module2.exports = __toCommonJS2(useRadioGroup_exports);
|
|
25991
|
-
var import_jsx_runtime6 = require("react/jsx-runtime"), import_compose_refs = require_index_native11(), import_constants4 =
|
|
25996
|
+
var import_jsx_runtime6 = require("react/jsx-runtime"), import_compose_refs = require_index_native11(), import_constants4 = require_index_native(), import_focusable2 = require_index_native47(), import_helpers = require_index_native7(), import_label = require_index_native48(), import_use_controllable_state = require_index_native10(), import_react3 = require("react"), import_BubbleInput = require_BubbleInput_native2(), import_utils = require_utils_native3();
|
|
25992
25997
|
function useRadioGroup(params) {
|
|
25993
|
-
var { value: valueProp, onValueChange, defaultValue, required, disabled, name, native, accentColor, orientation, ref } = params, [
|
|
25998
|
+
var { value: valueProp, onValueChange, defaultValue, required, disabled, name, native, accentColor, orientation, ref } = params, [value2, setValue] = (0, import_use_controllable_state.useControllableState)({
|
|
25994
25999
|
prop: valueProp,
|
|
25995
26000
|
defaultProp: defaultValue,
|
|
25996
26001
|
onChange: onValueChange
|
|
25997
26002
|
});
|
|
25998
26003
|
return {
|
|
25999
26004
|
providerValue: {
|
|
26000
|
-
value,
|
|
26005
|
+
value: value2,
|
|
26001
26006
|
onChange: setValue,
|
|
26002
26007
|
required,
|
|
26003
26008
|
disabled,
|
|
@@ -26022,9 +26027,9 @@ var require_useRadioGroup_native = __commonJS({
|
|
|
26022
26027
|
"ArrowLeft",
|
|
26023
26028
|
"ArrowRight"
|
|
26024
26029
|
], useRadioGroupItem = function(params) {
|
|
26025
|
-
var { radioGroupContext, value, labelledBy: ariaLabelledby, disabled: itemDisabled, ref: refProp, id, onPress, onKeyDown, onFocus } = params, { value: groupValue, disabled, required, onChange, name, native, accentColor } = (0, import_react3.useContext)(radioGroupContext), [button, setButton] = (0, import_react3.useState)(null), hasConsumerStoppedPropagationRef = (0, import_react3.useRef)(!1), ref = (0, import_react3.useRef)(null), composedRefs = (0, import_compose_refs.useComposedRefs)(refProp, function(node) {
|
|
26030
|
+
var { radioGroupContext, value: value2, labelledBy: ariaLabelledby, disabled: itemDisabled, ref: refProp, id, onPress, onKeyDown, onFocus } = params, { value: groupValue, disabled, required, onChange, name, native, accentColor } = (0, import_react3.useContext)(radioGroupContext), [button, setButton] = (0, import_react3.useState)(null), hasConsumerStoppedPropagationRef = (0, import_react3.useRef)(!1), ref = (0, import_react3.useRef)(null), composedRefs = (0, import_compose_refs.useComposedRefs)(refProp, function(node) {
|
|
26026
26031
|
return setButton(node);
|
|
26027
|
-
}, ref), isArrowKeyPressedRef = (0, import_react3.useRef)(!1), isFormControl = import_constants4.isWeb ? button ? !!button.closest("form") : !0 : !1, checked = groupValue ===
|
|
26032
|
+
}, ref), isArrowKeyPressedRef = (0, import_react3.useRef)(!1), isFormControl = import_constants4.isWeb ? button ? !!button.closest("form") : !0 : !1, checked = groupValue === value2, labelId = (0, import_label.useLabelContext)(button), labelledBy = ariaLabelledby || labelId;
|
|
26028
26033
|
(0, import_react3.useEffect)(function() {
|
|
26029
26034
|
if (import_constants4.isWeb) {
|
|
26030
26035
|
var handleKeyDown = function(event) {
|
|
@@ -26039,14 +26044,14 @@ var require_useRadioGroup_native = __commonJS({
|
|
|
26039
26044
|
}, []), (0, import_react3.useEffect)(function() {
|
|
26040
26045
|
if (id && !disabled) return (0, import_focusable2.registerFocusable)(id, {
|
|
26041
26046
|
focusAndSelect: function() {
|
|
26042
|
-
onChange == null || onChange(
|
|
26047
|
+
onChange == null || onChange(value2);
|
|
26043
26048
|
},
|
|
26044
26049
|
focus: function() {
|
|
26045
26050
|
}
|
|
26046
26051
|
});
|
|
26047
26052
|
}, [
|
|
26048
26053
|
id,
|
|
26049
|
-
|
|
26054
|
+
value2,
|
|
26050
26055
|
disabled
|
|
26051
26056
|
]);
|
|
26052
26057
|
var isDisabled = disabled || itemDisabled;
|
|
@@ -26061,7 +26066,7 @@ var require_useRadioGroup_native = __commonJS({
|
|
|
26061
26066
|
control: button,
|
|
26062
26067
|
bubbles: !hasConsumerStoppedPropagationRef.current,
|
|
26063
26068
|
name,
|
|
26064
|
-
value,
|
|
26069
|
+
value: value2,
|
|
26065
26070
|
checked,
|
|
26066
26071
|
required,
|
|
26067
26072
|
disabled: isDisabled,
|
|
@@ -26082,11 +26087,11 @@ var require_useRadioGroup_native = __commonJS({
|
|
|
26082
26087
|
ref: composedRefs,
|
|
26083
26088
|
...import_constants4.isWeb && {
|
|
26084
26089
|
type: "button",
|
|
26085
|
-
value
|
|
26090
|
+
value: value2
|
|
26086
26091
|
},
|
|
26087
26092
|
id,
|
|
26088
26093
|
onPress: (0, import_helpers.composeEventHandlers)(onPress, function(event) {
|
|
26089
|
-
checked || onChange == null || onChange(
|
|
26094
|
+
checked || onChange == null || onChange(value2), isFormControl && (hasConsumerStoppedPropagationRef.current = event.isPropagationStopped(), hasConsumerStoppedPropagationRef.current || event.stopPropagation());
|
|
26090
26095
|
}),
|
|
26091
26096
|
...import_constants4.isWeb && {
|
|
26092
26097
|
onKeyDown: (0, import_helpers.composeEventHandlers)(onKeyDown, function(event) {
|
|
@@ -26347,11 +26352,11 @@ var require_createRadioGroup_native = __commonJS({
|
|
|
26347
26352
|
var { disableActiveTheme, Frame = import_RadioGroup.RadioGroupFrame, Indicator = import_RadioGroup.RadioGroupIndicatorFrame, Item = import_RadioGroup.RadioGroupItemFrame } = createProps;
|
|
26348
26353
|
ensureContext(Frame), ensureContext(Indicator), ensureContext(Item);
|
|
26349
26354
|
var RadioGroupImp = Frame.styleable(function(props, ref) {
|
|
26350
|
-
var { value, defaultValue, onValueChange, required = !1, disabled = !1, name, native, accentColor, orientation = "vertical", ...rest } = props, { providerValue, frameAttrs, rovingFocusGroupAttrs } = (0, import_radio_headless.useRadioGroup)({
|
|
26355
|
+
var { value: value2, defaultValue, onValueChange, required = !1, disabled = !1, name, native, accentColor, orientation = "vertical", ...rest } = props, { providerValue, frameAttrs, rovingFocusGroupAttrs } = (0, import_radio_headless.useRadioGroup)({
|
|
26351
26356
|
orientation,
|
|
26352
26357
|
name,
|
|
26353
26358
|
defaultValue,
|
|
26354
|
-
value,
|
|
26359
|
+
value: value2,
|
|
26355
26360
|
onValueChange,
|
|
26356
26361
|
required,
|
|
26357
26362
|
disabled,
|
|
@@ -26371,7 +26376,7 @@ var require_createRadioGroup_native = __commonJS({
|
|
|
26371
26376
|
});
|
|
26372
26377
|
}), RadioGroupItemImp = Item.styleable(function(props, ref) {
|
|
26373
26378
|
var {
|
|
26374
|
-
value,
|
|
26379
|
+
value: value2,
|
|
26375
26380
|
labelledBy,
|
|
26376
26381
|
onPress,
|
|
26377
26382
|
//@ts-expect-error
|
|
@@ -26381,7 +26386,7 @@ var require_createRadioGroup_native = __commonJS({
|
|
|
26381
26386
|
...rest
|
|
26382
26387
|
} = props, { providerValue, bubbleInput, rovingFocusGroupAttrs, frameAttrs, isFormControl, native } = (0, import_radio_headless.useRadioGroupItem)({
|
|
26383
26388
|
radioGroupContext: RadioGroupContext,
|
|
26384
|
-
value,
|
|
26389
|
+
value: value2,
|
|
26385
26390
|
id,
|
|
26386
26391
|
labelledBy,
|
|
26387
26392
|
disabled,
|
|
@@ -26577,7 +26582,7 @@ var require_Separator_native = __commonJS({
|
|
|
26577
26582
|
}
|
|
26578
26583
|
});
|
|
26579
26584
|
module2.exports = __toCommonJS2(Separator_exports);
|
|
26580
|
-
var import_constants4 =
|
|
26585
|
+
var import_constants4 = require_index_native(), import_core12 = require_index_native20(), Separator = (0, import_core12.styled)(import_core12.Stack, {
|
|
26581
26586
|
name: "Separator",
|
|
26582
26587
|
borderColor: "$borderColor",
|
|
26583
26588
|
flexShrink: 0,
|
|
@@ -26993,42 +26998,42 @@ var require_SelectItem_native = __commonJS({
|
|
|
26993
26998
|
}
|
|
26994
26999
|
});
|
|
26995
27000
|
module2.exports = __toCommonJS2(SelectItem_exports);
|
|
26996
|
-
var import_jsx_runtime6 = require("react/jsx-runtime"), import_compose_refs = require_index_native11(), import_constants4 =
|
|
26997
|
-
var { scope, value, disabled = !1, textValue: textValueProp, index, ...restProps } = props, { props: listItemProps } = (0, import_list_item.useListItem)({
|
|
27001
|
+
var import_jsx_runtime6 = require("react/jsx-runtime"), import_compose_refs = require_index_native11(), import_constants4 = require_index_native(), import_list_item = require_index_native55(), import_core12 = require_index_native20(), React4 = __toESM2(require("react")), import_context = require_context_native2(), ITEM_NAME = "SelectItem", { Provider: SelectItemContextProvider, useStyledContext: useSelectItemContext } = (0, import_core12.createStyledContext)(null, ITEM_NAME), SelectItem = import_list_item.ListItemFrame.styleable(function(props, forwardedRef) {
|
|
27002
|
+
var { scope, value: value2, disabled = !1, textValue: textValueProp, index, ...restProps } = props, { props: listItemProps } = (0, import_list_item.useListItem)({
|
|
26998
27003
|
...!props.unstyled && {
|
|
26999
27004
|
ellipse: !0
|
|
27000
27005
|
},
|
|
27001
27006
|
...restProps
|
|
27002
|
-
}), context = (0, import_context.useSelectItemParentContext)(scope), { setSelectedIndex, listRef, setOpen, onChange, activeIndexSubscribe, valueSubscribe, allowMouseUpRef, allowSelectRef, setValueAtIndex, selectTimeoutRef, dataRef, interactions, shouldRenderWebNative, size: size2, onActiveChange, initialValue } = context, [isSelected, setSelected] = React4.useState(initialValue ===
|
|
27007
|
+
}), context = (0, import_context.useSelectItemParentContext)(scope), { setSelectedIndex, listRef, setOpen, onChange, activeIndexSubscribe, valueSubscribe, allowMouseUpRef, allowSelectRef, setValueAtIndex, selectTimeoutRef, dataRef, interactions, shouldRenderWebNative, size: size2, onActiveChange, initialValue } = context, [isSelected, setSelected] = React4.useState(initialValue === value2);
|
|
27003
27008
|
React4.useEffect(function() {
|
|
27004
27009
|
return activeIndexSubscribe(function(i) {
|
|
27005
27010
|
var isActive = index === i;
|
|
27006
27011
|
if (isActive) {
|
|
27007
27012
|
var _listRef_current_index;
|
|
27008
|
-
onActiveChange(
|
|
27013
|
+
onActiveChange(value2, index), listRef == null || (_listRef_current_index = listRef.current[index]) === null || _listRef_current_index === void 0 || _listRef_current_index.focus();
|
|
27009
27014
|
}
|
|
27010
27015
|
});
|
|
27011
27016
|
}, [
|
|
27012
27017
|
index
|
|
27013
27018
|
]), React4.useEffect(function() {
|
|
27014
27019
|
return valueSubscribe(function(val) {
|
|
27015
|
-
setSelected(val ===
|
|
27020
|
+
setSelected(val === value2);
|
|
27016
27021
|
});
|
|
27017
27022
|
}, [
|
|
27018
|
-
|
|
27023
|
+
value2
|
|
27019
27024
|
]);
|
|
27020
27025
|
var textId = React4.useId(), refCallback = React4.useCallback(function(node) {
|
|
27021
27026
|
import_constants4.isWeb && node instanceof HTMLElement && listRef && (listRef.current[index] = node);
|
|
27022
27027
|
}, []), composedRefs = (0, import_compose_refs.useComposedRefs)(forwardedRef, refCallback);
|
|
27023
27028
|
(0, import_constants4.useIsomorphicLayoutEffect)(function() {
|
|
27024
|
-
setValueAtIndex(index,
|
|
27029
|
+
setValueAtIndex(index, value2);
|
|
27025
27030
|
}, [
|
|
27026
27031
|
index,
|
|
27027
27032
|
setValueAtIndex,
|
|
27028
|
-
|
|
27033
|
+
value2
|
|
27029
27034
|
]);
|
|
27030
27035
|
function handleSelect() {
|
|
27031
|
-
setSelectedIndex(index), onChange(
|
|
27036
|
+
setSelectedIndex(index), onChange(value2), setOpen(!1);
|
|
27032
27037
|
}
|
|
27033
27038
|
var selectItemProps = React4.useMemo(function() {
|
|
27034
27039
|
return interactions ? interactions.getItemProps({
|
|
@@ -27057,11 +27062,11 @@ var require_SelectItem_native = __commonJS({
|
|
|
27057
27062
|
]);
|
|
27058
27063
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(SelectItemContextProvider, {
|
|
27059
27064
|
scope,
|
|
27060
|
-
value,
|
|
27065
|
+
value: value2,
|
|
27061
27066
|
textId: textId || "",
|
|
27062
27067
|
isSelected,
|
|
27063
27068
|
children: shouldRenderWebNative ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("option", {
|
|
27064
|
-
value,
|
|
27069
|
+
value: value2,
|
|
27065
27070
|
children: props.children
|
|
27066
27071
|
}) : /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_list_item.ListItemFrame, {
|
|
27067
27072
|
tag: "div",
|
|
@@ -27587,7 +27592,7 @@ var require_Select_native = __commonJS({
|
|
|
27587
27592
|
}
|
|
27588
27593
|
});
|
|
27589
27594
|
module2.exports = __toCommonJS2(Select_exports);
|
|
27590
|
-
var import_jsx_runtime6 = require("react/jsx-runtime"), import_adapt = require_index_native31(), import_compose_refs = require_index_native11(), import_constants4 =
|
|
27595
|
+
var import_jsx_runtime6 = require("react/jsx-runtime"), import_adapt = require_index_native31(), import_compose_refs = require_index_native11(), import_constants4 = require_index_native(), import_core12 = require_index_native20(), import_focus_scope = require_index_native34(), import_focusable2 = require_index_native47(), import_get_token2 = require_index_native22(), import_helpers = require_index_native7(), import_list_item = require_index_native55(), import_separator = require_index_native64(), import_sheet = require_index_native37(), import_stacks3 = require_index_native24(), import_text2 = require_index_native26(), import_use_controllable_state = require_index_native10(), import_use_debounce = require_index_native65(), React4 = __toESM2(require("react")), import_context = require_context_native2(), import_SelectContent = require_SelectContent_native(), import_SelectImpl = require_SelectImpl_native(), import_SelectItem = require_SelectItem_native(), import_SelectItemText = require_SelectItemText_native(), import_SelectScrollButton = require_SelectScrollButton_native(), import_SelectTrigger = require_SelectTrigger_native(), import_SelectViewport = require_SelectViewport_native(), import_useSelectBreakpointActive = require_useSelectBreakpointActive_native(), VALUE_NAME = "SelectValue", SelectValueFrame = (0, import_core12.styled)(import_text2.SizableText, {
|
|
27591
27596
|
name: VALUE_NAME,
|
|
27592
27597
|
userSelect: "none"
|
|
27593
27598
|
}), SelectValue = SelectValueFrame.styleable(function(param, forwardedRef) {
|
|
@@ -27765,9 +27770,9 @@ var require_Select_native = __commonJS({
|
|
|
27765
27770
|
function useEmitter() {
|
|
27766
27771
|
var listeners = React4.useRef(null);
|
|
27767
27772
|
listeners.current || (listeners.current = /* @__PURE__ */ new Set());
|
|
27768
|
-
var emit = function(
|
|
27773
|
+
var emit = function(value2) {
|
|
27769
27774
|
listeners.current.forEach(function(l) {
|
|
27770
|
-
return l(
|
|
27775
|
+
return l(value2);
|
|
27771
27776
|
});
|
|
27772
27777
|
}, subscribe = React4.useCallback(function(listener) {
|
|
27773
27778
|
return listeners.current.add(listener), function() {
|
|
@@ -27786,25 +27791,25 @@ var require_Select_native = __commonJS({
|
|
|
27786
27791
|
prop: openProp,
|
|
27787
27792
|
defaultProp: defaultOpen || !1,
|
|
27788
27793
|
onChange: onOpenChange
|
|
27789
|
-
}), [
|
|
27794
|
+
}), [value2, setValue] = (0, import_use_controllable_state.useControllableState)({
|
|
27790
27795
|
prop: valueProp,
|
|
27791
27796
|
defaultProp: defaultValue || "",
|
|
27792
27797
|
onChange: onValueChange,
|
|
27793
27798
|
transition: !0
|
|
27794
27799
|
});
|
|
27795
27800
|
React4.useEffect(function() {
|
|
27796
|
-
open && emitValue(
|
|
27801
|
+
open && emitValue(value2);
|
|
27797
27802
|
}, [
|
|
27798
27803
|
open
|
|
27799
27804
|
]), React4.useEffect(function() {
|
|
27800
|
-
emitValue(
|
|
27805
|
+
emitValue(value2);
|
|
27801
27806
|
}, [
|
|
27802
|
-
|
|
27807
|
+
value2
|
|
27803
27808
|
]), React4.useEffect(function() {
|
|
27804
27809
|
if (props.id) return (0, import_focusable2.registerFocusable)(props.id, {
|
|
27805
27810
|
focusAndSelect: function() {
|
|
27806
|
-
setOpen == null || setOpen(function(
|
|
27807
|
-
return !
|
|
27811
|
+
setOpen == null || setOpen(function(value22) {
|
|
27812
|
+
return !value22;
|
|
27808
27813
|
});
|
|
27809
27814
|
},
|
|
27810
27815
|
focus: function() {
|
|
@@ -27827,7 +27832,7 @@ var require_Select_native = __commonJS({
|
|
|
27827
27832
|
scope,
|
|
27828
27833
|
adaptScope,
|
|
27829
27834
|
initialValue: React4.useMemo(function() {
|
|
27830
|
-
return
|
|
27835
|
+
return value2;
|
|
27831
27836
|
}, [
|
|
27832
27837
|
open
|
|
27833
27838
|
]),
|
|
@@ -27839,12 +27844,12 @@ var require_Select_native = __commonJS({
|
|
|
27839
27844
|
onChange: React4.useCallback(function(val) {
|
|
27840
27845
|
setValue(val), emitValue(val);
|
|
27841
27846
|
}, []),
|
|
27842
|
-
onActiveChange: (0, import_core12.useEvent)(function(
|
|
27843
|
-
onActiveChange == null || onActiveChange(
|
|
27847
|
+
onActiveChange: (0, import_core12.useEvent)(function(value22, index) {
|
|
27848
|
+
onActiveChange == null || onActiveChange(value22, index);
|
|
27844
27849
|
}),
|
|
27845
27850
|
setSelectedIndex,
|
|
27846
|
-
setValueAtIndex: React4.useCallback(function(index,
|
|
27847
|
-
listContentRef.current[index] =
|
|
27851
|
+
setValueAtIndex: React4.useCallback(function(index, value22) {
|
|
27852
|
+
listContentRef.current[index] = value22;
|
|
27848
27853
|
}, []),
|
|
27849
27854
|
shouldRenderWebNative,
|
|
27850
27855
|
children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_context.SelectProvider, {
|
|
@@ -27863,7 +27868,7 @@ var require_Select_native = __commonJS({
|
|
|
27863
27868
|
activeIndex,
|
|
27864
27869
|
selectedIndex,
|
|
27865
27870
|
setActiveIndex: setActiveIndexDebounced,
|
|
27866
|
-
value,
|
|
27871
|
+
value: value2,
|
|
27867
27872
|
open,
|
|
27868
27873
|
native,
|
|
27869
27874
|
children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(SelectSheetController, {
|
|
@@ -27875,7 +27880,7 @@ var require_Select_native = __commonJS({
|
|
|
27875
27880
|
selectedIndexRef,
|
|
27876
27881
|
...props,
|
|
27877
27882
|
open,
|
|
27878
|
-
value,
|
|
27883
|
+
value: value2,
|
|
27879
27884
|
children
|
|
27880
27885
|
})
|
|
27881
27886
|
})
|
|
@@ -28103,9 +28108,9 @@ var require_helpers_native3 = __commonJS({
|
|
|
28103
28108
|
return a - b;
|
|
28104
28109
|
});
|
|
28105
28110
|
}
|
|
28106
|
-
function convertValueToPercentage(
|
|
28111
|
+
function convertValueToPercentage(value2, min, max) {
|
|
28107
28112
|
var maxSteps = max - min, percentPerStep = 100 / maxSteps;
|
|
28108
|
-
return percentPerStep * (
|
|
28113
|
+
return percentPerStep * (value2 - min);
|
|
28109
28114
|
}
|
|
28110
28115
|
function getLabel(index, totalValues) {
|
|
28111
28116
|
if (totalValues > 2) return `Value ${index + 1} of ${totalValues}`;
|
|
@@ -28116,8 +28121,8 @@ var require_helpers_native3 = __commonJS({
|
|
|
28116
28121
|
}
|
|
28117
28122
|
function getClosestValueIndex(values, nextValue) {
|
|
28118
28123
|
if (values.length === 1) return 0;
|
|
28119
|
-
var distances = values.map(function(
|
|
28120
|
-
return Math.abs(
|
|
28124
|
+
var distances = values.map(function(value2) {
|
|
28125
|
+
return Math.abs(value2 - nextValue);
|
|
28121
28126
|
}), closestDistance = Math.min(...distances);
|
|
28122
28127
|
return distances.indexOf(closestDistance);
|
|
28123
28128
|
}
|
|
@@ -28132,8 +28137,8 @@ var require_helpers_native3 = __commonJS({
|
|
|
28132
28137
|
return (quarterWidth - offset2(left) * direction) * direction;
|
|
28133
28138
|
}
|
|
28134
28139
|
function getStepsBetweenValues(values) {
|
|
28135
|
-
return values.slice(0, -1).map(function(
|
|
28136
|
-
return values[index + 1] -
|
|
28140
|
+
return values.slice(0, -1).map(function(value2, index) {
|
|
28141
|
+
return values[index + 1] - value2;
|
|
28137
28142
|
});
|
|
28138
28143
|
}
|
|
28139
28144
|
function hasMinStepsBetweenValues(values, minStepsBetweenValues) {
|
|
@@ -28144,18 +28149,18 @@ var require_helpers_native3 = __commonJS({
|
|
|
28144
28149
|
return !0;
|
|
28145
28150
|
}
|
|
28146
28151
|
function linearScale(input, output) {
|
|
28147
|
-
return function(
|
|
28152
|
+
return function(value2) {
|
|
28148
28153
|
if (input[0] === input[1] || output[0] === output[1]) return output[0];
|
|
28149
28154
|
var ratio = (output[1] - output[0]) / (input[1] - input[0]);
|
|
28150
|
-
return output[0] + ratio * (
|
|
28155
|
+
return output[0] + ratio * (value2 - input[0]);
|
|
28151
28156
|
};
|
|
28152
28157
|
}
|
|
28153
|
-
function getDecimalCount(
|
|
28154
|
-
return (String(
|
|
28158
|
+
function getDecimalCount(value2) {
|
|
28159
|
+
return (String(value2).split(".")[1] || "").length;
|
|
28155
28160
|
}
|
|
28156
|
-
function roundValue(
|
|
28161
|
+
function roundValue(value2, decimalCount) {
|
|
28157
28162
|
var rounder = Math.pow(10, decimalCount);
|
|
28158
|
-
return Math.round(
|
|
28163
|
+
return Math.round(value2 * rounder) / rounder;
|
|
28159
28164
|
}
|
|
28160
28165
|
}
|
|
28161
28166
|
});
|
|
@@ -28218,7 +28223,7 @@ var require_SliderImpl_native = __commonJS({
|
|
|
28218
28223
|
}
|
|
28219
28224
|
});
|
|
28220
28225
|
module2.exports = __toCommonJS2(SliderImpl_exports);
|
|
28221
|
-
var import_jsx_runtime6 = require("react/jsx-runtime"), import_constants4 =
|
|
28226
|
+
var import_jsx_runtime6 = require("react/jsx-runtime"), import_constants4 = require_index_native(), import_core12 = require_index_native20(), import_get_token2 = require_index_native22(), import_helpers = require_index_native7(), import_stacks3 = require_index_native24(), React4 = __toESM2(require("react")), import_constants22 = require_constants_native6(), SliderFrame2 = (0, import_core12.styled)(import_stacks3.YStack, {
|
|
28222
28227
|
position: "relative",
|
|
28223
28228
|
variants: {
|
|
28224
28229
|
orientation: {
|
|
@@ -28368,7 +28373,7 @@ var require_Slider_native = __commonJS({
|
|
|
28368
28373
|
}
|
|
28369
28374
|
});
|
|
28370
28375
|
module2.exports = __toCommonJS2(Slider_exports);
|
|
28371
|
-
var import_jsx_runtime6 = require("react/jsx-runtime"), import_compose_refs = require_index_native11(), import_constants4 =
|
|
28376
|
+
var import_jsx_runtime6 = require("react/jsx-runtime"), import_compose_refs = require_index_native11(), import_constants4 = require_index_native(), import_core12 = require_index_native20(), import_get_token2 = require_index_native22(), import_helpers = require_index_native7(), import_helpers2 = require_index_native7(), import_stacks3 = require_index_native24(), import_use_controllable_state = require_index_native10(), import_use_direction = require_index_native27(), React4 = __toESM2(require("react")), import_constants22 = require_constants_native6(), import_helpers3 = require_helpers_native3(), import_SliderImpl = require_SliderImpl_native(), activeSliderMeasureListeners = /* @__PURE__ */ new Set();
|
|
28372
28377
|
import_constants4.isWeb && import_constants4.isClient && !process.env.TAMAGUI_DISABLE_SLIDER_INTERVAL && ((_setInterval = setInterval) === null || _setInterval === void 0 || _setInterval(
|
|
28373
28378
|
function() {
|
|
28374
28379
|
activeSliderMeasureListeners.forEach(function(cb) {
|
|
@@ -28395,8 +28400,8 @@ var require_Slider_native = __commonJS({
|
|
|
28395
28400
|
] : [
|
|
28396
28401
|
max,
|
|
28397
28402
|
min
|
|
28398
|
-
],
|
|
28399
|
-
return
|
|
28403
|
+
], value2 = (0, import_helpers3.linearScale)(input, output);
|
|
28404
|
+
return value2(pointerPosition);
|
|
28400
28405
|
}
|
|
28401
28406
|
var measure = function() {
|
|
28402
28407
|
var _sliderRef_current;
|
|
@@ -28444,16 +28449,16 @@ var require_Slider_native = __commonJS({
|
|
|
28444
28449
|
orientation: "horizontal",
|
|
28445
28450
|
onLayout: measure,
|
|
28446
28451
|
onSlideStart: function(event, target) {
|
|
28447
|
-
var
|
|
28448
|
-
|
|
28452
|
+
var value2 = getValueFromPointer(event.nativeEvent.locationX);
|
|
28453
|
+
value2 && (onSlideStart == null || onSlideStart(value2, target, event));
|
|
28449
28454
|
},
|
|
28450
28455
|
onSlideMove: function(event) {
|
|
28451
|
-
var
|
|
28452
|
-
|
|
28456
|
+
var value2 = getValueFromPointer(event.nativeEvent.pageX - state.offset);
|
|
28457
|
+
value2 && (onSlideMove == null || onSlideMove(value2, event));
|
|
28453
28458
|
},
|
|
28454
28459
|
onSlideEnd: function(event) {
|
|
28455
|
-
var
|
|
28456
|
-
|
|
28460
|
+
var value2 = getValueFromPointer(event.nativeEvent.pageX - state.offset);
|
|
28461
|
+
value2 && (onSlideEnd == null || onSlideEnd(event, value2));
|
|
28457
28462
|
},
|
|
28458
28463
|
onStepKeyDown: function(event) {
|
|
28459
28464
|
var isBackKey = import_constants22.BACK_KEYS[direction].includes(event.key);
|
|
@@ -28490,8 +28495,8 @@ var require_Slider_native = __commonJS({
|
|
|
28490
28495
|
], output = [
|
|
28491
28496
|
max,
|
|
28492
28497
|
min
|
|
28493
|
-
],
|
|
28494
|
-
return
|
|
28498
|
+
], value2 = (0, import_helpers3.linearScale)(input, output);
|
|
28499
|
+
return value2(pointerPosition);
|
|
28495
28500
|
}
|
|
28496
28501
|
var measure = function() {
|
|
28497
28502
|
var _sliderRef_current;
|
|
@@ -28515,16 +28520,16 @@ var require_Slider_native = __commonJS({
|
|
|
28515
28520
|
orientation: "vertical",
|
|
28516
28521
|
onLayout: measure,
|
|
28517
28522
|
onSlideStart: function(event, target) {
|
|
28518
|
-
var
|
|
28519
|
-
|
|
28523
|
+
var value2 = getValueFromPointer(event.nativeEvent.locationY);
|
|
28524
|
+
value2 && (onSlideStart == null || onSlideStart(value2, target, event));
|
|
28520
28525
|
},
|
|
28521
28526
|
onSlideMove: function(event) {
|
|
28522
|
-
var
|
|
28523
|
-
|
|
28527
|
+
var value2 = getValueFromPointer(event.nativeEvent.pageY - state.offset);
|
|
28528
|
+
value2 && (onSlideMove == null || onSlideMove(value2, event));
|
|
28524
28529
|
},
|
|
28525
28530
|
onSlideEnd: function(event) {
|
|
28526
|
-
var
|
|
28527
|
-
onSlideEnd == null || onSlideEnd(event,
|
|
28531
|
+
var value2 = getValueFromPointer(event.nativeEvent.pageY - state.offset);
|
|
28532
|
+
onSlideEnd == null || onSlideEnd(event, value2);
|
|
28528
28533
|
},
|
|
28529
28534
|
onStepKeyDown: function(event) {
|
|
28530
28535
|
var isBackKey = import_constants22.BACK_KEYS.ltr.includes(event.key);
|
|
@@ -28570,8 +28575,8 @@ var require_Slider_native = __commonJS({
|
|
|
28570
28575
|
position: "absolute",
|
|
28571
28576
|
pointerEvents: "box-none"
|
|
28572
28577
|
}), SliderTrackActive = /* @__PURE__ */ React4.forwardRef(function(props, forwardedRef) {
|
|
28573
|
-
var { __scopeSlider, ...rangeProps } = props, context = (0, import_constants22.useSliderContext)(__scopeSlider), orientation = (0, import_constants22.useSliderOrientationContext)(__scopeSlider), ref = React4.useRef(null), composedRefs = (0, import_compose_refs.useComposedRefs)(forwardedRef, ref), valuesCount = context.values.length, percentages = context.values.map(function(
|
|
28574
|
-
return (0, import_helpers3.convertValueToPercentage)(
|
|
28578
|
+
var { __scopeSlider, ...rangeProps } = props, context = (0, import_constants22.useSliderContext)(__scopeSlider), orientation = (0, import_constants22.useSliderOrientationContext)(__scopeSlider), ref = React4.useRef(null), composedRefs = (0, import_compose_refs.useComposedRefs)(forwardedRef, ref), valuesCount = context.values.length, percentages = context.values.map(function(value2) {
|
|
28579
|
+
return (0, import_helpers3.convertValueToPercentage)(value2, context.min, context.max);
|
|
28575
28580
|
}), offsetStart = valuesCount > 1 ? Math.min(...percentages) : 0, offsetEnd = 100 - Math.max(...percentages);
|
|
28576
28581
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(SliderTrackActiveFrame, {
|
|
28577
28582
|
orientation: context.orientation,
|
|
@@ -28629,7 +28634,7 @@ var require_Slider_native = __commonJS({
|
|
|
28629
28634
|
unstyled: process.env.TAMAGUI_HEADLESS === "1"
|
|
28630
28635
|
}
|
|
28631
28636
|
}), SliderThumb = SliderThumbFrame.styleable(function(props, forwardedRef) {
|
|
28632
|
-
var { __scopeSlider, index, circular, size: sizeProp, ...thumbProps } = props, context = (0, import_constants22.useSliderContext)(__scopeSlider), orientation = (0, import_constants22.useSliderOrientationContext)(__scopeSlider), [thumb, setThumb] = React4.useState(null), composedRefs = (0, import_compose_refs.useComposedRefs)(forwardedRef, setThumb),
|
|
28637
|
+
var { __scopeSlider, index, circular, size: sizeProp, ...thumbProps } = props, context = (0, import_constants22.useSliderContext)(__scopeSlider), orientation = (0, import_constants22.useSliderOrientationContext)(__scopeSlider), [thumb, setThumb] = React4.useState(null), composedRefs = (0, import_compose_refs.useComposedRefs)(forwardedRef, setThumb), value2 = context.values[index], percent = value2 === void 0 ? 0 : (0, import_helpers3.convertValueToPercentage)(value2, context.min, context.max), label = (0, import_helpers3.getLabel)(index, context.values.length), _ref, sizeIn = (_ref = sizeProp ?? context.size) !== null && _ref !== void 0 ? _ref : "$true", [size2, setSize] = React4.useState(function() {
|
|
28633
28638
|
var estimatedSize = (0, import_core12.getVariableValue)(getThumbSize(sizeIn).width);
|
|
28634
28639
|
return estimatedSize;
|
|
28635
28640
|
}), thumbInBoundsOffset = size2 ? (0, import_helpers3.getThumbInBoundsOffset)(size2, percent, orientation.direction) : 0;
|
|
@@ -28664,7 +28669,7 @@ var require_Slider_native = __commonJS({
|
|
|
28664
28669
|
role: "slider",
|
|
28665
28670
|
"aria-label": props["aria-label"] || label,
|
|
28666
28671
|
"aria-valuemin": context.min,
|
|
28667
|
-
"aria-valuenow":
|
|
28672
|
+
"aria-valuenow": value2,
|
|
28668
28673
|
"aria-valuemax": context.max,
|
|
28669
28674
|
"aria-orientation": context.orientation,
|
|
28670
28675
|
"data-orientation": context.orientation,
|
|
@@ -28703,13 +28708,13 @@ var require_Slider_native = __commonJS({
|
|
|
28703
28708
|
}), SliderComponent = /* @__PURE__ */ React4.forwardRef(function(props, forwardedRef) {
|
|
28704
28709
|
var { name, min = 0, max = 100, step = 1, orientation = "horizontal", disabled = !1, minStepsBetweenThumbs = 0, defaultValue = [
|
|
28705
28710
|
min
|
|
28706
|
-
], value, onValueChange = function() {
|
|
28711
|
+
], value: value2, onValueChange = function() {
|
|
28707
28712
|
}, size: sizeProp, onSlideEnd, onSlideMove, onSlideStart, ...sliderProps } = props, sliderRef = React4.useRef(null), composedRefs = (0, import_compose_refs.useComposedRefs)(sliderRef, forwardedRef), thumbRefs = React4.useRef(/* @__PURE__ */ new Map()), valueIndexToChangeRef = React4.useRef(0), isHorizontal = orientation === "horizontal", [values = [], setValues] = (0, import_use_controllable_state.useControllableState)({
|
|
28708
|
-
prop:
|
|
28713
|
+
prop: value2,
|
|
28709
28714
|
defaultProp: defaultValue,
|
|
28710
28715
|
transition: !0,
|
|
28711
|
-
onChange: function(
|
|
28712
|
-
updateThumbFocus(valueIndexToChangeRef.current), onValueChange(
|
|
28716
|
+
onChange: function(value22) {
|
|
28717
|
+
updateThumbFocus(valueIndexToChangeRef.current), onValueChange(value22);
|
|
28713
28718
|
}
|
|
28714
28719
|
});
|
|
28715
28720
|
import_constants4.isWeb && React4.useEffect(function() {
|
|
@@ -28745,11 +28750,11 @@ var require_Slider_native = __commonJS({
|
|
|
28745
28750
|
}
|
|
28746
28751
|
}
|
|
28747
28752
|
}
|
|
28748
|
-
function handleSlideMove(
|
|
28749
|
-
updateValues(
|
|
28753
|
+
function handleSlideMove(value22, event) {
|
|
28754
|
+
updateValues(value22, valueIndexToChangeRef.current), onSlideMove == null || onSlideMove(event, value22);
|
|
28750
28755
|
}
|
|
28751
|
-
function updateValues(
|
|
28752
|
-
var decimalCount = (0, import_helpers3.getDecimalCount)(step), snapToStep = (0, import_helpers3.roundValue)(Math.round((
|
|
28756
|
+
function updateValues(value22, atIndex) {
|
|
28757
|
+
var decimalCount = (0, import_helpers3.getDecimalCount)(step), snapToStep = (0, import_helpers3.roundValue)(Math.round((value22 - min) / step) * step + min, decimalCount), nextValue = (0, import_helpers2.clamp)(snapToStep, [
|
|
28753
28758
|
min,
|
|
28754
28759
|
max
|
|
28755
28760
|
]);
|
|
@@ -28777,12 +28782,12 @@ var require_Slider_native = __commonJS({
|
|
|
28777
28782
|
min,
|
|
28778
28783
|
max,
|
|
28779
28784
|
onSlideEnd,
|
|
28780
|
-
onSlideStart: disabled ? void 0 : function(
|
|
28785
|
+
onSlideStart: disabled ? void 0 : function(value22, target, event) {
|
|
28781
28786
|
if (target !== "thumb") {
|
|
28782
|
-
var closestIndex = (0, import_helpers3.getClosestValueIndex)(values,
|
|
28783
|
-
updateValues(
|
|
28787
|
+
var closestIndex = (0, import_helpers3.getClosestValueIndex)(values, value22);
|
|
28788
|
+
updateValues(value22, closestIndex);
|
|
28784
28789
|
}
|
|
28785
|
-
onSlideStart == null || onSlideStart(event,
|
|
28790
|
+
onSlideStart == null || onSlideStart(event, value22, target);
|
|
28786
28791
|
},
|
|
28787
28792
|
onSlideMove: disabled ? void 0 : handleSlideMove,
|
|
28788
28793
|
onHomeKeyDown: function() {
|
|
@@ -28794,8 +28799,8 @@ var require_Slider_native = __commonJS({
|
|
|
28794
28799
|
onStepKeyDown: function(param) {
|
|
28795
28800
|
var { event, direction: stepDirection } = param;
|
|
28796
28801
|
if (!disabled) {
|
|
28797
|
-
var isPageKey = import_constants22.PAGE_KEYS.includes(event.key), isSkipKey = isPageKey || event.shiftKey && import_constants22.ARROW_KEYS.includes(event.key), multiplier = isSkipKey ? 10 : 1, atIndex = valueIndexToChangeRef.current,
|
|
28798
|
-
updateValues(
|
|
28802
|
+
var isPageKey = import_constants22.PAGE_KEYS.includes(event.key), isSkipKey = isPageKey || event.shiftKey && import_constants22.ARROW_KEYS.includes(event.key), multiplier = isSkipKey ? 10 : 1, atIndex = valueIndexToChangeRef.current, value22 = values[atIndex], stepInDirection = step * multiplier * stepDirection;
|
|
28803
|
+
updateValues(value22 + stepInDirection, atIndex);
|
|
28799
28804
|
}
|
|
28800
28805
|
}
|
|
28801
28806
|
})
|
|
@@ -28918,7 +28923,7 @@ var require_useSwitch_native = __commonJS({
|
|
|
28918
28923
|
}
|
|
28919
28924
|
});
|
|
28920
28925
|
module2.exports = __toCommonJS2(useSwitch_exports);
|
|
28921
|
-
var import_jsx_runtime6 = require("react/jsx-runtime"), import_compose_refs = require_index_native11(), import_constants4 =
|
|
28926
|
+
var import_jsx_runtime6 = require("react/jsx-runtime"), import_compose_refs = require_index_native11(), import_constants4 = require_index_native(), import_helpers = require_index_native7(), import_label = require_index_native48(), import_use_previous = require_index_native49(), React4 = __toESM2(require("react"));
|
|
28922
28927
|
function useSwitch(props, param, ref) {
|
|
28923
28928
|
var [checked, setChecked] = param;
|
|
28924
28929
|
return {
|
|
@@ -28932,7 +28937,7 @@ var require_useSwitch_native = __commonJS({
|
|
|
28932
28937
|
switchRef: ref,
|
|
28933
28938
|
bubbleInput: null
|
|
28934
28939
|
};
|
|
28935
|
-
var disabled, name,
|
|
28940
|
+
var disabled, name, value2, required, hasConsumerStoppedPropagationRef, button, setButton, composedRefs, isFormControl, labelId, ariaLabelledBy;
|
|
28936
28941
|
}
|
|
28937
28942
|
}
|
|
28938
28943
|
});
|
|
@@ -29253,8 +29258,8 @@ var require_createSwitch_native = __commonJS({
|
|
|
29253
29258
|
React4.useEffect(function() {
|
|
29254
29259
|
if (props.id && !props.disabled) return (0, import_focusable2.registerFocusable)(props.id, {
|
|
29255
29260
|
focusAndSelect: function() {
|
|
29256
|
-
setChecked == null || setChecked(function(
|
|
29257
|
-
return !
|
|
29261
|
+
setChecked == null || setChecked(function(value22) {
|
|
29262
|
+
return !value22;
|
|
29258
29263
|
});
|
|
29259
29264
|
},
|
|
29260
29265
|
focus: function() {
|
|
@@ -29270,7 +29275,7 @@ var require_createSwitch_native = __commonJS({
|
|
|
29270
29275
|
onValueChange: setChecked,
|
|
29271
29276
|
...nativeProps
|
|
29272
29277
|
});
|
|
29273
|
-
var disabled = props.disabled,
|
|
29278
|
+
var disabled = props.disabled, value2 = React4.useMemo(function() {
|
|
29274
29279
|
return {
|
|
29275
29280
|
checked,
|
|
29276
29281
|
disabled,
|
|
@@ -29285,7 +29290,7 @@ var require_createSwitch_native = __commonJS({
|
|
|
29285
29290
|
next !== frameWidth && setFrameInnerWidth(next);
|
|
29286
29291
|
}, _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;
|
|
29287
29292
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(SwitchContext.Provider, {
|
|
29288
|
-
value,
|
|
29293
|
+
value: value2,
|
|
29289
29294
|
children: [
|
|
29290
29295
|
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Frame, {
|
|
29291
29296
|
ref: switchRef,
|
|
@@ -29593,7 +29598,7 @@ var require_createTabs_native = __commonJS({
|
|
|
29593
29598
|
}
|
|
29594
29599
|
});
|
|
29595
29600
|
module2.exports = __toCommonJS2(createTabs_exports);
|
|
29596
|
-
var import_jsx_runtime6 = require("react/jsx-runtime"), import_compose_refs = require_index_native11(), import_constants4 =
|
|
29601
|
+
var import_jsx_runtime6 = require("react/jsx-runtime"), import_compose_refs = require_index_native11(), import_constants4 = require_index_native(), import_group = require_index_native53(), import_helpers = require_index_native7(), import_roving_focus = require_index_native62(), import_use_controllable_state = require_index_native10(), import_use_direction = require_index_native27(), import_web = require_index_native15(), React4 = __toESM2(require("react")), import_Tabs = require_Tabs_native(), import_StyledContext = require_StyledContext_native2();
|
|
29597
29602
|
function createTabs(createProps) {
|
|
29598
29603
|
var { ContentFrame = import_Tabs.DefaultTabsContentFrame, TabFrame = import_Tabs.DefaultTabsTabFrame, TabsFrame = import_Tabs.DefaultTabsFrame } = createProps, TABS_CONTEXT = "TabsContext", TAB_LIST_NAME = "TabsList", TabsList = /* @__PURE__ */ React4.forwardRef(function(props, forwardedRef) {
|
|
29599
29604
|
var { __scopeTabs, loop = !0, children, ...listProps } = props, context = (0, import_StyledContext.useTabsContext)(__scopeTabs);
|
|
@@ -29616,7 +29621,7 @@ var require_createTabs_native = __commonJS({
|
|
|
29616
29621
|
});
|
|
29617
29622
|
TabsList.displayName = TAB_LIST_NAME;
|
|
29618
29623
|
var TRIGGER_NAME = "TabsTrigger", TabsTrigger = TabFrame.styleable(function(props, forwardedRef) {
|
|
29619
|
-
var { __scopeTabs, value, disabled = !1, onInteraction, disableActiveTheme, ...triggerProps } = props, context = (0, import_StyledContext.useTabsContext)(__scopeTabs), triggerId = makeTriggerId(context.baseId,
|
|
29624
|
+
var { __scopeTabs, value: value2, disabled = !1, onInteraction, disableActiveTheme, ...triggerProps } = props, context = (0, import_StyledContext.useTabsContext)(__scopeTabs), triggerId = makeTriggerId(context.baseId, value2), contentId = makeContentId(context.baseId, value2), isSelected = value2 === context.value, [layout, setLayout] = React4.useState(null), triggerRef = React4.useRef(null), groupItemProps = (0, import_group.useGroupItem)({
|
|
29620
29625
|
disabled: !!disabled
|
|
29621
29626
|
});
|
|
29622
29627
|
React4.useEffect(function() {
|
|
@@ -29644,7 +29649,7 @@ var require_createTabs_native = __commonJS({
|
|
|
29644
29649
|
isSelected && layout && (onInteraction == null || onInteraction("select", layout));
|
|
29645
29650
|
}, [
|
|
29646
29651
|
isSelected,
|
|
29647
|
-
|
|
29652
|
+
value2,
|
|
29648
29653
|
layout
|
|
29649
29654
|
]);
|
|
29650
29655
|
var _props_onPress;
|
|
@@ -29683,7 +29688,7 @@ var require_createTabs_native = __commonJS({
|
|
|
29683
29688
|
ref: (0, import_compose_refs.composeRefs)(forwardedRef, triggerRef),
|
|
29684
29689
|
onPress: (0, import_helpers.composeEventHandlers)((_props_onPress = props.onPress) !== null && _props_onPress !== void 0 ? _props_onPress : void 0, function(event) {
|
|
29685
29690
|
var webChecks = !import_constants4.isWeb || event.button === 0 && event.ctrlKey === !1;
|
|
29686
|
-
!disabled && !isSelected && webChecks ? context.onChange(
|
|
29691
|
+
!disabled && !isSelected && webChecks ? context.onChange(value2) : event.preventDefault();
|
|
29687
29692
|
}),
|
|
29688
29693
|
...import_constants4.isWeb && {
|
|
29689
29694
|
type: "button",
|
|
@@ -29691,12 +29696,12 @@ var require_createTabs_native = __commonJS({
|
|
|
29691
29696
|
[
|
|
29692
29697
|
" ",
|
|
29693
29698
|
"Enter"
|
|
29694
|
-
].includes(event.key) && (context.onChange(
|
|
29699
|
+
].includes(event.key) && (context.onChange(value2), event.preventDefault());
|
|
29695
29700
|
}),
|
|
29696
29701
|
onFocus: (0, import_helpers.composeEventHandlers)(props.onFocus, function(event) {
|
|
29697
29702
|
layout && (onInteraction == null || onInteraction("focus", layout));
|
|
29698
29703
|
var isAutomaticActivation = context.activationMode !== "manual";
|
|
29699
|
-
!isSelected && !disabled && isAutomaticActivation && context.onChange(
|
|
29704
|
+
!isSelected && !disabled && isAutomaticActivation && context.onChange(value2);
|
|
29700
29705
|
}),
|
|
29701
29706
|
onBlur: (0, import_helpers.composeEventHandlers)(props.onFocus, function() {
|
|
29702
29707
|
onInteraction == null || onInteraction("focus", null);
|
|
@@ -29708,7 +29713,7 @@ var require_createTabs_native = __commonJS({
|
|
|
29708
29713
|
});
|
|
29709
29714
|
TabsTrigger.displayName = TRIGGER_NAME;
|
|
29710
29715
|
var TabsContent = ContentFrame.styleable(function(props, forwardedRef) {
|
|
29711
|
-
var { __scopeTabs, value, forceMount, children, ...contentProps } = props, context = (0, import_StyledContext.useTabsContext)(__scopeTabs), isSelected =
|
|
29716
|
+
var { __scopeTabs, value: value2, forceMount, children, ...contentProps } = props, context = (0, import_StyledContext.useTabsContext)(__scopeTabs), isSelected = value2 === context.value, show = forceMount || isSelected, triggerId = makeTriggerId(context.baseId, value2), contentId = makeContentId(context.baseId, value2);
|
|
29712
29717
|
return show ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(ContentFrame, {
|
|
29713
29718
|
"data-state": isSelected ? "active" : "inactive",
|
|
29714
29719
|
"data-orientation": context.orientation,
|
|
@@ -29721,9 +29726,9 @@ var require_createTabs_native = __commonJS({
|
|
|
29721
29726
|
...contentProps,
|
|
29722
29727
|
ref: forwardedRef,
|
|
29723
29728
|
children
|
|
29724
|
-
},
|
|
29729
|
+
}, value2) : null;
|
|
29725
29730
|
}), TabsComponent = TabsFrame.styleable(function(props, forwardedRef) {
|
|
29726
|
-
var { __scopeTabs, value: valueProp, onValueChange, defaultValue, orientation = "horizontal", dir, activationMode = "automatic", size: size2 = "$true", ...tabsProps } = props, direction = (0, import_use_direction.useDirection)(dir), [
|
|
29731
|
+
var { __scopeTabs, value: valueProp, onValueChange, defaultValue, orientation = "horizontal", dir, activationMode = "automatic", size: size2 = "$true", ...tabsProps } = props, direction = (0, import_use_direction.useDirection)(dir), [value2, setValue] = (0, import_use_controllable_state.useControllableState)({
|
|
29727
29732
|
prop: valueProp,
|
|
29728
29733
|
onChange: onValueChange,
|
|
29729
29734
|
defaultProp: defaultValue ?? ""
|
|
@@ -29739,7 +29744,7 @@ var require_createTabs_native = __commonJS({
|
|
|
29739
29744
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_StyledContext.TabsProvider, {
|
|
29740
29745
|
scope: __scopeTabs,
|
|
29741
29746
|
baseId: React4.useId(),
|
|
29742
|
-
value,
|
|
29747
|
+
value: value2,
|
|
29743
29748
|
onChange: setValue,
|
|
29744
29749
|
orientation,
|
|
29745
29750
|
dir: direction,
|
|
@@ -29767,11 +29772,11 @@ var require_createTabs_native = __commonJS({
|
|
|
29767
29772
|
Content: TabsContent
|
|
29768
29773
|
});
|
|
29769
29774
|
}
|
|
29770
|
-
function makeTriggerId(baseId,
|
|
29771
|
-
return `${baseId}-trigger-${
|
|
29775
|
+
function makeTriggerId(baseId, value2) {
|
|
29776
|
+
return `${baseId}-trigger-${value2}`;
|
|
29772
29777
|
}
|
|
29773
|
-
function makeContentId(baseId,
|
|
29774
|
-
return `${baseId}-content-${
|
|
29778
|
+
function makeContentId(baseId, value2) {
|
|
29779
|
+
return `${baseId}-content-${value2}`;
|
|
29775
29780
|
}
|
|
29776
29781
|
}
|
|
29777
29782
|
});
|
|
@@ -29878,7 +29883,7 @@ var require_mutateTheme_native = __commonJS({
|
|
|
29878
29883
|
}
|
|
29879
29884
|
});
|
|
29880
29885
|
module2.exports = __toCommonJS2(mutateTheme_exports);
|
|
29881
|
-
var import_constants4 =
|
|
29886
|
+
var import_constants4 = require_index_native(), import_start_transition = require_index_native9(), import_web = require_index_native15();
|
|
29882
29887
|
function mutateThemes2(param) {
|
|
29883
29888
|
var { themes, batch, insertCSS = !0, ...props } = param, allThemesProxied = {}, allThemesRaw = {}, _iteratorNormalCompletion = !0, _didIteratorError = !1, _iteratorError = void 0;
|
|
29884
29889
|
try {
|
|
@@ -30406,7 +30411,7 @@ var require_ToggleGroup_native = __commonJS({
|
|
|
30406
30411
|
}
|
|
30407
30412
|
});
|
|
30408
30413
|
module2.exports = __toCommonJS2(ToggleGroup_exports);
|
|
30409
|
-
var import_jsx_runtime6 = require("react/jsx-runtime"), import_constants4 =
|
|
30414
|
+
var import_jsx_runtime6 = require("react/jsx-runtime"), import_constants4 = require_index_native(), import_focusable2 = require_index_native47(), import_font_size = require_index_native43(), import_get_token2 = require_index_native22(), import_group = require_index_native53(), import_helpers = require_index_native7(), import_helpers_tamagui = require_index_native44(), import_roving_focus = require_index_native62(), import_use_controllable_state = require_index_native10(), import_use_direction = require_index_native27(), import_web = require_index_native15(), import_react3 = __toESM2(require("react")), import_Toggle = require_Toggle_native(), TOGGLE_GROUP_NAME = "ToggleGroup", TOGGLE_GROUP_ITEM_NAME = "ToggleGroupItem", TOGGLE_GROUP_CONTEXT = "ToggleGroup", { Provider: ToggleGroupItemProvider, useStyledContext: useToggleGroupItemContext } = (0, import_web.createStyledContext)(), { Provider: ToggleGroupContext, useStyledContext: useToggleGroupContext } = (0, import_web.createStyledContext)(), ToggleGroupItem = import_Toggle.ToggleFrame.extractable(/* @__PURE__ */ import_react3.default.forwardRef(function(props, forwardedRef) {
|
|
30410
30415
|
var [_, { color }] = (0, import_web.usePropsAndStyle)(props), { disablePassStyles, ...rest } = props, valueContext = useToggleGroupValueContext(props.__scopeToggleGroup), context = useToggleGroupContext(props.__scopeToggleGroup), pressed = valueContext == null ? void 0 : valueContext.value.includes(props.value), disabled = context.disabled || props.disabled || !1, groupItemProps = (0, import_group.useGroupItem)({
|
|
30411
30416
|
disabled
|
|
30412
30417
|
}), _props_size, size2 = (_props_size = props.size) !== null && _props_size !== void 0 ? _props_size : context.size, sizeProps = props.unstyled ? {} : {
|
|
@@ -30445,7 +30450,7 @@ var require_ToggleGroup_native = __commonJS({
|
|
|
30445
30450
|
}));
|
|
30446
30451
|
ToggleGroupItem.displayName = TOGGLE_GROUP_ITEM_NAME;
|
|
30447
30452
|
var ToggleGroupItemImpl = /* @__PURE__ */ import_react3.default.forwardRef(function(props, forwardedRef) {
|
|
30448
|
-
var { __scopeToggleGroup, value, ...itemProps } = props, valueContext = useToggleGroupValueContext(__scopeToggleGroup), singleProps = {
|
|
30453
|
+
var { __scopeToggleGroup, value: value2, ...itemProps } = props, valueContext = useToggleGroupValueContext(__scopeToggleGroup), singleProps = {
|
|
30449
30454
|
"aria-pressed": void 0
|
|
30450
30455
|
}, typeProps = valueContext.type === "single" ? singleProps : void 0;
|
|
30451
30456
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_Toggle.Toggle, {
|
|
@@ -30453,7 +30458,7 @@ var require_ToggleGroup_native = __commonJS({
|
|
|
30453
30458
|
...itemProps,
|
|
30454
30459
|
ref: forwardedRef,
|
|
30455
30460
|
onPressedChange: function(pressed) {
|
|
30456
|
-
pressed ? valueContext.onItemActivate(
|
|
30461
|
+
pressed ? valueContext.onItemActivate(value2) : valueContext.onItemDeactivate(value2);
|
|
30457
30462
|
}
|
|
30458
30463
|
});
|
|
30459
30464
|
}), ToggleGroup = (0, import_helpers.withStaticProperties)(/* @__PURE__ */ import_react3.default.forwardRef(function(props, forwardedRef) {
|
|
@@ -30488,7 +30493,7 @@ var require_ToggleGroup_native = __commonJS({
|
|
|
30488
30493
|
ToggleGroup.displayName = TOGGLE_GROUP_NAME;
|
|
30489
30494
|
var { Provider: ToggleGroupValueProvider, useStyledContext: useToggleGroupValueContext } = (0, import_web.createStyledContext)(), ToggleGroupImplSingle = /* @__PURE__ */ import_react3.default.forwardRef(function(props, forwardedRef) {
|
|
30490
30495
|
var { value: valueProp, defaultValue, onValueChange = function() {
|
|
30491
|
-
}, disableDeactivation = !1, ...toggleGroupSingleProps } = props, [
|
|
30496
|
+
}, disableDeactivation = !1, ...toggleGroupSingleProps } = props, [value2, setValue] = (0, import_use_controllable_state.useControllableState)({
|
|
30492
30497
|
prop: valueProp,
|
|
30493
30498
|
defaultProp: defaultValue,
|
|
30494
30499
|
onChange: onValueChange
|
|
@@ -30496,10 +30501,10 @@ var require_ToggleGroup_native = __commonJS({
|
|
|
30496
30501
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(ToggleGroupValueProvider, {
|
|
30497
30502
|
scope: props.__scopeToggleGroup,
|
|
30498
30503
|
type: "single",
|
|
30499
|
-
value:
|
|
30500
|
-
|
|
30504
|
+
value: value2 ? [
|
|
30505
|
+
value2
|
|
30501
30506
|
] : [],
|
|
30502
|
-
defaultValue:
|
|
30507
|
+
defaultValue: value2,
|
|
30503
30508
|
onItemActivate: setValue,
|
|
30504
30509
|
onItemDeactivate: import_react3.default.useCallback(function() {
|
|
30505
30510
|
return disableDeactivation ? null : setValue("");
|
|
@@ -30514,7 +30519,7 @@ var require_ToggleGroup_native = __commonJS({
|
|
|
30514
30519
|
});
|
|
30515
30520
|
}), ToggleGroupImplMultiple = /* @__PURE__ */ import_react3.default.forwardRef(function(props, forwardedRef) {
|
|
30516
30521
|
var { value: valueProp, defaultValue, onValueChange = function() {
|
|
30517
|
-
}, disableDeactivation, ...toggleGroupMultipleProps } = props, [
|
|
30522
|
+
}, disableDeactivation, ...toggleGroupMultipleProps } = props, [value2 = [], setValue] = (0, import_use_controllable_state.useControllableState)({
|
|
30518
30523
|
prop: valueProp,
|
|
30519
30524
|
defaultProp: defaultValue,
|
|
30520
30525
|
onChange: onValueChange
|
|
@@ -30531,8 +30536,8 @@ var require_ToggleGroup_native = __commonJS({
|
|
|
30531
30536
|
]), handleButtonDeactivate = import_react3.default.useCallback(function(itemValue) {
|
|
30532
30537
|
return setValue(function() {
|
|
30533
30538
|
var prevValue = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : [];
|
|
30534
|
-
return prevValue.filter(function(
|
|
30535
|
-
return
|
|
30539
|
+
return prevValue.filter(function(value22) {
|
|
30540
|
+
return value22 !== itemValue;
|
|
30536
30541
|
});
|
|
30537
30542
|
});
|
|
30538
30543
|
}, [
|
|
@@ -30541,8 +30546,8 @@ var require_ToggleGroup_native = __commonJS({
|
|
|
30541
30546
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(ToggleGroupValueProvider, {
|
|
30542
30547
|
scope: props.__scopeToggleGroup,
|
|
30543
30548
|
type: "multiple",
|
|
30544
|
-
value,
|
|
30545
|
-
defaultValue:
|
|
30549
|
+
value: value2,
|
|
30550
|
+
defaultValue: value2,
|
|
30546
30551
|
onItemActivate: handleButtonActivate,
|
|
30547
30552
|
onItemDeactivate: handleButtonDeactivate,
|
|
30548
30553
|
children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(ToggleGroupImpl, {
|
|
@@ -30990,7 +30995,7 @@ var require_index_native74 = __commonJS({
|
|
|
30990
30995
|
}
|
|
30991
30996
|
});
|
|
30992
30997
|
module2.exports = __toCommonJS2(index_exports2);
|
|
30993
|
-
var import_react3 = __toESM2(require("react")), import_constants4 =
|
|
30998
|
+
var import_react3 = __toESM2(require("react")), import_constants4 = require_index_native(), import_helpers = require_helpers_native4(), import_initialValue = require_initialValue_native(), import_initialValue2 = require_initialValue_native();
|
|
30994
30999
|
function useWindowDimensions() {
|
|
30995
31000
|
var { serverValue = import_initialValue.initialValue } = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
30996
31001
|
return import_react3.default.useSyncExternalStore(import_helpers.subscribe, import_helpers.getWindowSize, function() {
|
|
@@ -31199,7 +31204,7 @@ module.exports = __toCommonJS(index_exports);
|
|
|
31199
31204
|
__reExport(index_exports, __toESM(require_index_native28()), module.exports);
|
|
31200
31205
|
__reExport(index_exports, __toESM(require_index_native31()), module.exports);
|
|
31201
31206
|
__reExport(index_exports, __toESM(require_index_native39()), module.exports);
|
|
31202
|
-
__reExport(index_exports, __toESM(
|
|
31207
|
+
__reExport(index_exports, __toESM(require_index_native5()), module.exports);
|
|
31203
31208
|
__reExport(index_exports, __toESM(require_index_native42()), module.exports);
|
|
31204
31209
|
__reExport(index_exports, __toESM(require_index_native45()), module.exports);
|
|
31205
31210
|
__reExport(index_exports, __toESM(require_index_native46()), module.exports);
|
|
@@ -31236,7 +31241,7 @@ __reExport(index_exports, __toESM(require_index_native72()), module.exports);
|
|
|
31236
31241
|
__reExport(index_exports, __toESM(require_index_native73()), module.exports);
|
|
31237
31242
|
__reExport(index_exports, __toESM(require_index_native10()), module.exports);
|
|
31238
31243
|
__reExport(index_exports, __toESM(require_index_native65()), module.exports);
|
|
31239
|
-
__reExport(index_exports, __toESM(
|
|
31244
|
+
__reExport(index_exports, __toESM(require_index_native2()), module.exports);
|
|
31240
31245
|
__reExport(index_exports, __toESM(require_index_native74()), module.exports);
|
|
31241
31246
|
__reExport(index_exports, __toESM(require_index_native75()), module.exports);
|
|
31242
31247
|
|
|
@@ -31313,7 +31318,7 @@ var import_jsx_runtime = require("react/jsx-runtime"), import_core2 = __toESM(re
|
|
|
31313
31318
|
};
|
|
31314
31319
|
|
|
31315
31320
|
// src/views/Anchor.tsx
|
|
31316
|
-
var import_jsx_runtime2 = require("react/jsx-runtime"), import_constants = __toESM(
|
|
31321
|
+
var import_jsx_runtime2 = require("react/jsx-runtime"), import_constants = __toESM(require_index_native()), import_core3 = __toESM(require_index_native20()), import_text = __toESM(require_index_native26()), import_react_native = __toESM(require_fake_react_native()), AnchorFrame = (0, import_core3.styled)(import_text.SizableText, {
|
|
31317
31322
|
name: "Anchor",
|
|
31318
31323
|
tag: "a",
|
|
31319
31324
|
accessibilityRole: "link"
|
|
@@ -31363,7 +31368,7 @@ var import_core5 = __toESM(require_index_native20()), import_stacks = __toESM(re
|
|
|
31363
31368
|
});
|
|
31364
31369
|
|
|
31365
31370
|
// src/views/Input.tsx
|
|
31366
|
-
var import_jsx_runtime3 = require("react/jsx-runtime"), import_react = __toESM(require("react")), import_constants2 = __toESM(
|
|
31371
|
+
var import_jsx_runtime3 = require("react/jsx-runtime"), import_react = __toESM(require("react")), import_constants2 = __toESM(require_index_native()), import_core7 = __toESM(require_index_native20()), import_focusable = __toESM(require_index_native47()), import_react_native2 = __toESM(require_fake_react_native());
|
|
31367
31372
|
|
|
31368
31373
|
// src/helpers/inputHelpers.tsx
|
|
31369
31374
|
var import_core6 = __toESM(require_index_native20()), import_get_button_sized = __toESM(require_index_native23()), import_get_font_sized = __toESM(require_index_native25()), import_get_token = __toESM(require_index_native22()), inputSizeVariant = function() {
|
|
@@ -31502,7 +31507,7 @@ var import_jsx_runtime4 = require("react/jsx-runtime"), import_core8 = __toESM(r
|
|
|
31502
31507
|
}));
|
|
31503
31508
|
|
|
31504
31509
|
// src/views/TextArea.tsx
|
|
31505
|
-
var import_jsx_runtime5 = require("react/jsx-runtime"), import_react2 = __toESM(require("react")), import_constants3 = __toESM(
|
|
31510
|
+
var import_jsx_runtime5 = require("react/jsx-runtime"), import_react2 = __toESM(require("react")), import_constants3 = __toESM(require_index_native()), import_core9 = __toESM(require_index_native20());
|
|
31506
31511
|
var TextAreaFrame = (0, import_core9.styled)(InputFrame, {
|
|
31507
31512
|
name: "TextArea",
|
|
31508
31513
|
multiline: !0,
|