tamagui 1.95.3 → 1.96.0
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 +90 -10
- package/dist/native.js.map +3 -3
- package/dist/test.native.js +90 -10
- package/dist/test.native.js.map +3 -3
- package/package.json +54 -54
- package/types/views/Input.d.ts +1 -0
- package/types/views/Input.d.ts.map +1 -1
package/dist/native.js
CHANGED
|
@@ -7080,7 +7080,8 @@ var require_skipProps_native = __commonJS({
|
|
|
7080
7080
|
outlineStyle: 1,
|
|
7081
7081
|
outlineOffset: 1,
|
|
7082
7082
|
outlineWidth: 1,
|
|
7083
|
-
outlineColor: 1
|
|
7083
|
+
outlineColor: 1,
|
|
7084
|
+
scrollbarWidth: 1
|
|
7084
7085
|
});
|
|
7085
7086
|
}
|
|
7086
7087
|
});
|
|
@@ -8894,6 +8895,61 @@ var require_Slot_native = __commonJS({
|
|
|
8894
8895
|
}
|
|
8895
8896
|
});
|
|
8896
8897
|
|
|
8898
|
+
// ../web/dist/cjs/helpers/setElementProps.native.js
|
|
8899
|
+
var require_setElementProps_native = __commonJS({
|
|
8900
|
+
"../web/dist/cjs/helpers/setElementProps.native.js"(exports2, module2) {
|
|
8901
|
+
"use strict";
|
|
8902
|
+
var __defProp2 = Object.defineProperty, __getOwnPropDesc2 = Object.getOwnPropertyDescriptor, __getOwnPropNames2 = Object.getOwnPropertyNames, __hasOwnProp2 = Object.prototype.hasOwnProperty, __export2 = function(target, all) {
|
|
8903
|
+
for (var name in all)
|
|
8904
|
+
__defProp2(target, name, {
|
|
8905
|
+
get: all[name],
|
|
8906
|
+
enumerable: !0
|
|
8907
|
+
});
|
|
8908
|
+
}, __copyProps2 = function(to, from, except, desc) {
|
|
8909
|
+
var _iteratorNormalCompletion = !0, _didIteratorError = !1, _iteratorError = void 0;
|
|
8910
|
+
if (from && typeof from == "object" || typeof from == "function")
|
|
8911
|
+
try {
|
|
8912
|
+
for (var _loop = function() {
|
|
8913
|
+
var key = _step.value;
|
|
8914
|
+
!__hasOwnProp2.call(to, key) && key !== except && __defProp2(to, key, {
|
|
8915
|
+
get: function() {
|
|
8916
|
+
return from[key];
|
|
8917
|
+
},
|
|
8918
|
+
enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable
|
|
8919
|
+
});
|
|
8920
|
+
}, _iterator = __getOwnPropNames2(from)[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = !0)
|
|
8921
|
+
_loop();
|
|
8922
|
+
} catch (err) {
|
|
8923
|
+
_didIteratorError = !0, _iteratorError = err;
|
|
8924
|
+
} finally {
|
|
8925
|
+
try {
|
|
8926
|
+
!_iteratorNormalCompletion && _iterator.return != null && _iterator.return();
|
|
8927
|
+
} finally {
|
|
8928
|
+
if (_didIteratorError)
|
|
8929
|
+
throw _iteratorError;
|
|
8930
|
+
}
|
|
8931
|
+
}
|
|
8932
|
+
return to;
|
|
8933
|
+
}, __toCommonJS2 = function(mod) {
|
|
8934
|
+
return __copyProps2(__defProp2({}, "__esModule", {
|
|
8935
|
+
value: !0
|
|
8936
|
+
}), mod);
|
|
8937
|
+
}, setElementProps_native_exports = {};
|
|
8938
|
+
__export2(setElementProps_native_exports, {
|
|
8939
|
+
setElementProps: function() {
|
|
8940
|
+
return setElementProps;
|
|
8941
|
+
}
|
|
8942
|
+
});
|
|
8943
|
+
module2.exports = __toCommonJS2(setElementProps_native_exports);
|
|
8944
|
+
function setElementProps(element) {
|
|
8945
|
+
element && !element.getBoundingClientRect && (element.getBoundingClientRect = function() {
|
|
8946
|
+
if (element.unstable_getBoundingClientRect != null)
|
|
8947
|
+
return element.unstable_getBoundingClientRect();
|
|
8948
|
+
});
|
|
8949
|
+
}
|
|
8950
|
+
}
|
|
8951
|
+
});
|
|
8952
|
+
|
|
8897
8953
|
// ../web/dist/cjs/createComponent.native.js
|
|
8898
8954
|
var require_createComponent_native = __commonJS({
|
|
8899
8955
|
"../web/dist/cjs/createComponent.native.js"(exports2, module2) {
|
|
@@ -8977,7 +9033,7 @@ var require_createComponent_native = __commonJS({
|
|
|
8977
9033
|
}
|
|
8978
9034
|
});
|
|
8979
9035
|
module2.exports = __toCommonJS2(createComponent_exports);
|
|
8980
|
-
var import_jsx_runtime6 = require("react/jsx-runtime"), import_compose_refs = require_index_native10(), import_constants4 = require_index_native6(), import_helpers = require_index_native7(), import_use_did_finish_ssr = require_index_native11(), import_react4 = __toESM2(require("react")), import_config = require_config_native(), import_constants22 = require_constants_native2(), import_ComponentContext = require_ComponentContext_native(), import_createVariable = require_createVariable_native(), import_defaultComponentState = require_defaultComponentState_native(), import_createShallowSetState = require_createShallowSetState_native(), import_getSplitStyles = require_getSplitStyles_native(), import_isObj = require_isObj_native(), import_log = require_log_native(), import_mergeProps = require_mergeProps_native(), import_themeable = require_themeable_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(), import_ThemeDebug = require_ThemeDebug_native(), import_isDevTools = require_isDevTools_native();
|
|
9036
|
+
var import_jsx_runtime6 = require("react/jsx-runtime"), import_compose_refs = require_index_native10(), import_constants4 = require_index_native6(), import_helpers = require_index_native7(), import_use_did_finish_ssr = require_index_native11(), import_react4 = __toESM2(require("react")), import_config = require_config_native(), import_constants22 = require_constants_native2(), import_ComponentContext = require_ComponentContext_native(), import_createVariable = require_createVariable_native(), import_defaultComponentState = require_defaultComponentState_native(), import_createShallowSetState = require_createShallowSetState_native(), import_getSplitStyles = require_getSplitStyles_native(), import_isObj = require_isObj_native(), import_log = require_log_native(), import_mergeProps = require_mergeProps_native(), import_themeable = require_themeable_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(), import_ThemeDebug = require_ThemeDebug_native(), import_isDevTools = require_isDevTools_native(), import_setElementProps = require_setElementProps_native();
|
|
8981
9037
|
function _array_like_to_array2(arr, len) {
|
|
8982
9038
|
(len == null || len > arr.length) && (len = arr.length);
|
|
8983
9039
|
for (var i = 0, arr2 = new Array(len); i < len; i++)
|
|
@@ -9582,7 +9638,7 @@ If you meant to do this, you can disable this warning - either change untilMeasu
|
|
|
9582
9638
|
}), stateRef.current.hasMeasured = !0;
|
|
9583
9639
|
})), viewProps = ((_hooks_usePropsTransform = import_setupHooks.hooks.usePropsTransform) === null || _hooks_usePropsTransform === void 0 ? void 0 : _hooks_usePropsTransform.call(import_setupHooks.hooks, elementType, nonTamaguiProps, stateRef, curStateRef.willHydrate)) || nonTamaguiProps, curStateRef.composedRef || (curStateRef.composedRef = (0, import_compose_refs.composeRefs)(function(x) {
|
|
9584
9640
|
return stateRef.current.host = x;
|
|
9585
|
-
}, forwardedRef)), viewProps.ref = curStateRef.composedRef, process.env.NODE_ENV === "development" && !isReactNative && !isText && import_constants4.isWeb && !isHOC && import_react4.Children.toArray(props.children).forEach(function(item) {
|
|
9641
|
+
}, forwardedRef, import_setElementProps.setElementProps)), viewProps.ref = curStateRef.composedRef, process.env.NODE_ENV === "development" && !isReactNative && !isText && import_constants4.isWeb && !isHOC && import_react4.Children.toArray(props.children).forEach(function(item) {
|
|
9586
9642
|
typeof item == "string" && item !== `
|
|
9587
9643
|
` && console.error("Unexpected text node: ".concat(item, ". A text node cannot be a child of a <View>."));
|
|
9588
9644
|
}), process.env.NODE_ENV === "development" && time && time(_templateObject13());
|
|
@@ -17174,7 +17230,7 @@ var require_Accordion_native = __commonJS({
|
|
|
17174
17230
|
}
|
|
17175
17231
|
});
|
|
17176
17232
|
module2.exports = __toCommonJS2(Accordion_exports);
|
|
17177
|
-
var import_jsx_runtime6 = require("react/jsx-runtime"), import_collapsible = require_index_native14(), import_collection = require_index_native17(), import_compose_refs = require_index_native10(), import_constants4 = require_index_native6(), import_helpers = require_index_native7(), import_stacks3 = require_index_native20(), import_text2 = require_index_native22(), import_use_controllable_state = require_index_native9(), import_use_direction = require_index_native23(), import_web = require_index_native13(), React2 = __toESM2(require("react"));
|
|
17233
|
+
var import_jsx_runtime6 = require("react/jsx-runtime"), import_collapsible = require_index_native14(), import_collection = require_index_native17(), import_compose_refs = require_index_native10(), import_constants4 = require_index_native6(), import_helpers = require_index_native7(), import_stacks3 = require_index_native20(), import_text2 = require_index_native22(), import_use_controllable_state = require_index_native9(), import_use_direction = require_index_native23(), import_web = require_index_native13(), import_web2 = require_index_native13(), React2 = __toESM2(require("react"));
|
|
17178
17234
|
function _array_like_to_array2(arr, len) {
|
|
17179
17235
|
(len == null || len > arr.length) && (len = arr.length);
|
|
17180
17236
|
for (var i = 0, arr2 = new Array(len); i < len; i++)
|
|
@@ -17319,7 +17375,7 @@ var require_Accordion_native = __commonJS({
|
|
|
17319
17375
|
].includes(props.type) ? new Error("Invalid prop `type` supplied to `Accordion`. Expected one of `single | multiple`.") : props.type === "multiple" && typeof value == "string" ? new Error("Invalid prop `type` supplied to `Accordion`. Expected `single` when `defaultValue` or `value` is type `string`.") : props.type === "single" && Array.isArray(value) ? new Error("Invalid prop `type` supplied to `Accordion`. Expected `multiple` when `defaultValue` or `value` is type `string[]`.") : null;
|
|
17320
17376
|
}
|
|
17321
17377
|
};
|
|
17322
|
-
var _createStyledContext = (0,
|
|
17378
|
+
var _createStyledContext = (0, import_web2.createStyledContext)(), AccordionValueProvider = _createStyledContext.Provider, useAccordionValueContext = _createStyledContext.useStyledContext, _createStyledContext1 = (0, import_web2.createStyledContext)(), AccordionCollapsibleProvider = _createStyledContext1.Provider, useAccordionCollapsibleContext = _createStyledContext1.useStyledContext, AccordionImplSingle = /* @__PURE__ */ React2.forwardRef(function(props, forwardedRef) {
|
|
17323
17379
|
var valueProp = props.value, defaultValue = props.defaultValue, control = props.control, _props_onValueChange = props.onValueChange, onValueChange = _props_onValueChange === void 0 ? function() {
|
|
17324
17380
|
} : _props_onValueChange, _props_collapsible = props.collapsible, collapsible = _props_collapsible === void 0 ? !1 : _props_collapsible, accordionSingleProps = _object_without_properties5(props, [
|
|
17325
17381
|
"value",
|
|
@@ -17394,7 +17450,7 @@ var require_Accordion_native = __commonJS({
|
|
|
17394
17450
|
}))
|
|
17395
17451
|
})
|
|
17396
17452
|
});
|
|
17397
|
-
}), _createStyledContext2 = (0,
|
|
17453
|
+
}), _createStyledContext2 = (0, import_web2.createStyledContext)(), AccordionImplProvider = _createStyledContext2.Provider, useAccordionContext = _createStyledContext2.useStyledContext, AccordionImpl = /* @__PURE__ */ React2.forwardRef(function(props, forwardedRef) {
|
|
17398
17454
|
var __scopeAccordion = props.__scopeAccordion, disabled = props.disabled, dir = props.dir, _props_orientation = props.orientation, orientation = _props_orientation === void 0 ? "vertical" : _props_orientation, accordionProps = _object_without_properties5(props, [
|
|
17399
17455
|
"__scopeAccordion",
|
|
17400
17456
|
"disabled",
|
|
@@ -17456,7 +17512,7 @@ var require_Accordion_native = __commonJS({
|
|
|
17456
17512
|
}))
|
|
17457
17513
|
})
|
|
17458
17514
|
});
|
|
17459
|
-
}), ITEM_NAME = "AccordionItem", _createStyledContext3 = (0,
|
|
17515
|
+
}), ITEM_NAME = "AccordionItem", _createStyledContext3 = (0, import_web2.createStyledContext)(), AccordionItemProvider = _createStyledContext3.Provider, useAccordionItemContext = _createStyledContext3.useStyledContext, AccordionItem = /* @__PURE__ */ React2.forwardRef(function(props, forwardedRef) {
|
|
17460
17516
|
var __scopeAccordion = props.__scopeAccordion, value = props.value, accordionItemProps = _object_without_properties5(props, [
|
|
17461
17517
|
"__scopeAccordion",
|
|
17462
17518
|
"value"
|
|
@@ -17494,7 +17550,7 @@ var require_Accordion_native = __commonJS({
|
|
|
17494
17550
|
}));
|
|
17495
17551
|
});
|
|
17496
17552
|
AccordionHeader.displayName = HEADER_NAME;
|
|
17497
|
-
var AccordionTriggerFrame = (0,
|
|
17553
|
+
var AccordionTriggerFrame = (0, import_web2.styled)(import_collapsible.Collapsible.Trigger, {
|
|
17498
17554
|
variants: {
|
|
17499
17555
|
unstyled: {
|
|
17500
17556
|
false: {
|
|
@@ -17534,7 +17590,7 @@ var require_Accordion_native = __commonJS({
|
|
|
17534
17590
|
ref: forwardedRef
|
|
17535
17591
|
}))
|
|
17536
17592
|
});
|
|
17537
|
-
}), AccordionContentFrame = (0,
|
|
17593
|
+
}), AccordionContentFrame = (0, import_web2.styled)(import_collapsible.Collapsible.Content, {
|
|
17538
17594
|
variants: {
|
|
17539
17595
|
unstyled: {
|
|
17540
17596
|
false: {
|
|
@@ -17559,6 +17615,29 @@ var require_Accordion_native = __commonJS({
|
|
|
17559
17615
|
}, contentProps), {
|
|
17560
17616
|
ref: forwardedRef
|
|
17561
17617
|
}));
|
|
17618
|
+
}), HeightAnimator = import_web.View.styleable(function(props) {
|
|
17619
|
+
var itemContext = useAccordionItemContext(), children = props.children, rest = _object_without_properties5(props, [
|
|
17620
|
+
"children"
|
|
17621
|
+
]), _React_useState = _sliced_to_array(React2.useState(0), 2), height = _React_useState[0], setHeight = _React_useState[1];
|
|
17622
|
+
React2.useEffect(function() {
|
|
17623
|
+
itemContext.open || setHeight(0);
|
|
17624
|
+
}, [
|
|
17625
|
+
itemContext.open
|
|
17626
|
+
]);
|
|
17627
|
+
var onLayout = (0, import_web.useEvent)(function(param) {
|
|
17628
|
+
var nativeEvent = param.nativeEvent;
|
|
17629
|
+
nativeEvent.layout.height && setHeight(nativeEvent.layout.height);
|
|
17630
|
+
});
|
|
17631
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_web.View, _object_spread_props8(_object_spread9({
|
|
17632
|
+
height
|
|
17633
|
+
}, rest), {
|
|
17634
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_web.View, {
|
|
17635
|
+
position: "absolute",
|
|
17636
|
+
//@ts-ignore
|
|
17637
|
+
onLayout,
|
|
17638
|
+
children
|
|
17639
|
+
})
|
|
17640
|
+
}));
|
|
17562
17641
|
});
|
|
17563
17642
|
function getState(open) {
|
|
17564
17643
|
return open ? "open" : "closed";
|
|
@@ -17567,7 +17646,8 @@ var require_Accordion_native = __commonJS({
|
|
|
17567
17646
|
Trigger: AccordionTrigger,
|
|
17568
17647
|
Header: AccordionHeader,
|
|
17569
17648
|
Content: AccordionContent,
|
|
17570
|
-
Item: AccordionItem
|
|
17649
|
+
Item: AccordionItem,
|
|
17650
|
+
HeightAnimator
|
|
17571
17651
|
});
|
|
17572
17652
|
}
|
|
17573
17653
|
});
|