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/test.native.js
CHANGED
|
@@ -6709,7 +6709,8 @@ var require_skipProps_native = __commonJS({
|
|
|
6709
6709
|
outlineStyle: 1,
|
|
6710
6710
|
outlineOffset: 1,
|
|
6711
6711
|
outlineWidth: 1,
|
|
6712
|
-
outlineColor: 1
|
|
6712
|
+
outlineColor: 1,
|
|
6713
|
+
scrollbarWidth: 1
|
|
6713
6714
|
});
|
|
6714
6715
|
}
|
|
6715
6716
|
});
|
|
@@ -8391,6 +8392,61 @@ var require_Slot_native = __commonJS({
|
|
|
8391
8392
|
}
|
|
8392
8393
|
});
|
|
8393
8394
|
|
|
8395
|
+
// ../web/dist/cjs/helpers/setElementProps.native.js
|
|
8396
|
+
var require_setElementProps_native = __commonJS({
|
|
8397
|
+
"../web/dist/cjs/helpers/setElementProps.native.js"(exports2, module2) {
|
|
8398
|
+
"use strict";
|
|
8399
|
+
var __defProp2 = Object.defineProperty, __getOwnPropDesc2 = Object.getOwnPropertyDescriptor, __getOwnPropNames2 = Object.getOwnPropertyNames, __hasOwnProp2 = Object.prototype.hasOwnProperty, __export2 = function(target, all) {
|
|
8400
|
+
for (var name in all)
|
|
8401
|
+
__defProp2(target, name, {
|
|
8402
|
+
get: all[name],
|
|
8403
|
+
enumerable: !0
|
|
8404
|
+
});
|
|
8405
|
+
}, __copyProps2 = function(to, from, except, desc) {
|
|
8406
|
+
var _iteratorNormalCompletion = !0, _didIteratorError = !1, _iteratorError = void 0;
|
|
8407
|
+
if (from && typeof from == "object" || typeof from == "function")
|
|
8408
|
+
try {
|
|
8409
|
+
for (var _loop = function() {
|
|
8410
|
+
var key = _step.value;
|
|
8411
|
+
!__hasOwnProp2.call(to, key) && key !== except && __defProp2(to, key, {
|
|
8412
|
+
get: function() {
|
|
8413
|
+
return from[key];
|
|
8414
|
+
},
|
|
8415
|
+
enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable
|
|
8416
|
+
});
|
|
8417
|
+
}, _iterator = __getOwnPropNames2(from)[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = !0)
|
|
8418
|
+
_loop();
|
|
8419
|
+
} catch (err) {
|
|
8420
|
+
_didIteratorError = !0, _iteratorError = err;
|
|
8421
|
+
} finally {
|
|
8422
|
+
try {
|
|
8423
|
+
!_iteratorNormalCompletion && _iterator.return != null && _iterator.return();
|
|
8424
|
+
} finally {
|
|
8425
|
+
if (_didIteratorError)
|
|
8426
|
+
throw _iteratorError;
|
|
8427
|
+
}
|
|
8428
|
+
}
|
|
8429
|
+
return to;
|
|
8430
|
+
}, __toCommonJS2 = function(mod) {
|
|
8431
|
+
return __copyProps2(__defProp2({}, "__esModule", {
|
|
8432
|
+
value: !0
|
|
8433
|
+
}), mod);
|
|
8434
|
+
}, setElementProps_native_exports = {};
|
|
8435
|
+
__export2(setElementProps_native_exports, {
|
|
8436
|
+
setElementProps: function() {
|
|
8437
|
+
return setElementProps;
|
|
8438
|
+
}
|
|
8439
|
+
});
|
|
8440
|
+
module2.exports = __toCommonJS2(setElementProps_native_exports);
|
|
8441
|
+
function setElementProps(element) {
|
|
8442
|
+
element && !element.getBoundingClientRect && (element.getBoundingClientRect = function() {
|
|
8443
|
+
if (element.unstable_getBoundingClientRect != null)
|
|
8444
|
+
return element.unstable_getBoundingClientRect();
|
|
8445
|
+
});
|
|
8446
|
+
}
|
|
8447
|
+
}
|
|
8448
|
+
});
|
|
8449
|
+
|
|
8394
8450
|
// ../web/dist/cjs/createComponent.native.js
|
|
8395
8451
|
var require_createComponent_native = __commonJS({
|
|
8396
8452
|
"../web/dist/cjs/createComponent.native.js"(exports2, module2) {
|
|
@@ -8474,7 +8530,7 @@ var require_createComponent_native = __commonJS({
|
|
|
8474
8530
|
}
|
|
8475
8531
|
});
|
|
8476
8532
|
module2.exports = __toCommonJS2(createComponent_exports);
|
|
8477
|
-
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();
|
|
8533
|
+
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();
|
|
8478
8534
|
function _array_like_to_array2(arr, len) {
|
|
8479
8535
|
(len == null || len > arr.length) && (len = arr.length);
|
|
8480
8536
|
for (var i = 0, arr2 = new Array(len); i < len; i++)
|
|
@@ -8814,7 +8870,7 @@ var require_createComponent_native = __commonJS({
|
|
|
8814
8870
|
}), stateRef.current.hasMeasured = !0;
|
|
8815
8871
|
})), 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) {
|
|
8816
8872
|
return stateRef.current.host = x;
|
|
8817
|
-
}, forwardedRef)), viewProps.ref = curStateRef.composedRef;
|
|
8873
|
+
}, forwardedRef, import_setElementProps.setElementProps)), viewProps.ref = curStateRef.composedRef;
|
|
8818
8874
|
var pseudoGroups = splitStyles.pseudoGroups, mediaGroups = splitStyles.mediaGroups, unPress = function() {
|
|
8819
8875
|
return setStateShallow({
|
|
8820
8876
|
press: !1,
|
|
@@ -16311,7 +16367,7 @@ var require_Accordion_native = __commonJS({
|
|
|
16311
16367
|
}
|
|
16312
16368
|
});
|
|
16313
16369
|
module2.exports = __toCommonJS2(Accordion_exports);
|
|
16314
|
-
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"));
|
|
16370
|
+
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"));
|
|
16315
16371
|
function _array_like_to_array2(arr, len) {
|
|
16316
16372
|
(len == null || len > arr.length) && (len = arr.length);
|
|
16317
16373
|
for (var i = 0, arr2 = new Array(len); i < len; i++)
|
|
@@ -16456,7 +16512,7 @@ var require_Accordion_native = __commonJS({
|
|
|
16456
16512
|
].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;
|
|
16457
16513
|
}
|
|
16458
16514
|
};
|
|
16459
|
-
var _createStyledContext = (0,
|
|
16515
|
+
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) {
|
|
16460
16516
|
var valueProp = props.value, defaultValue = props.defaultValue, control = props.control, _props_onValueChange = props.onValueChange, onValueChange = _props_onValueChange === void 0 ? function() {
|
|
16461
16517
|
} : _props_onValueChange, _props_collapsible = props.collapsible, collapsible = _props_collapsible === void 0 ? !1 : _props_collapsible, accordionSingleProps = _object_without_properties5(props, [
|
|
16462
16518
|
"value",
|
|
@@ -16531,7 +16587,7 @@ var require_Accordion_native = __commonJS({
|
|
|
16531
16587
|
}))
|
|
16532
16588
|
})
|
|
16533
16589
|
});
|
|
16534
|
-
}), _createStyledContext2 = (0,
|
|
16590
|
+
}), _createStyledContext2 = (0, import_web2.createStyledContext)(), AccordionImplProvider = _createStyledContext2.Provider, useAccordionContext = _createStyledContext2.useStyledContext, AccordionImpl = /* @__PURE__ */ React2.forwardRef(function(props, forwardedRef) {
|
|
16535
16591
|
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, [
|
|
16536
16592
|
"__scopeAccordion",
|
|
16537
16593
|
"disabled",
|
|
@@ -16593,7 +16649,7 @@ var require_Accordion_native = __commonJS({
|
|
|
16593
16649
|
}))
|
|
16594
16650
|
})
|
|
16595
16651
|
});
|
|
16596
|
-
}), ITEM_NAME = "AccordionItem", _createStyledContext3 = (0,
|
|
16652
|
+
}), ITEM_NAME = "AccordionItem", _createStyledContext3 = (0, import_web2.createStyledContext)(), AccordionItemProvider = _createStyledContext3.Provider, useAccordionItemContext = _createStyledContext3.useStyledContext, AccordionItem = /* @__PURE__ */ React2.forwardRef(function(props, forwardedRef) {
|
|
16597
16653
|
var __scopeAccordion = props.__scopeAccordion, value = props.value, accordionItemProps = _object_without_properties5(props, [
|
|
16598
16654
|
"__scopeAccordion",
|
|
16599
16655
|
"value"
|
|
@@ -16631,7 +16687,7 @@ var require_Accordion_native = __commonJS({
|
|
|
16631
16687
|
}));
|
|
16632
16688
|
});
|
|
16633
16689
|
AccordionHeader.displayName = HEADER_NAME;
|
|
16634
|
-
var AccordionTriggerFrame = (0,
|
|
16690
|
+
var AccordionTriggerFrame = (0, import_web2.styled)(import_collapsible.Collapsible.Trigger, {
|
|
16635
16691
|
variants: {
|
|
16636
16692
|
unstyled: {
|
|
16637
16693
|
false: {
|
|
@@ -16671,7 +16727,7 @@ var require_Accordion_native = __commonJS({
|
|
|
16671
16727
|
ref: forwardedRef
|
|
16672
16728
|
}))
|
|
16673
16729
|
});
|
|
16674
|
-
}), AccordionContentFrame = (0,
|
|
16730
|
+
}), AccordionContentFrame = (0, import_web2.styled)(import_collapsible.Collapsible.Content, {
|
|
16675
16731
|
variants: {
|
|
16676
16732
|
unstyled: {
|
|
16677
16733
|
false: {
|
|
@@ -16696,6 +16752,29 @@ var require_Accordion_native = __commonJS({
|
|
|
16696
16752
|
}, contentProps), {
|
|
16697
16753
|
ref: forwardedRef
|
|
16698
16754
|
}));
|
|
16755
|
+
}), HeightAnimator = import_web.View.styleable(function(props) {
|
|
16756
|
+
var itemContext = useAccordionItemContext(), children = props.children, rest = _object_without_properties5(props, [
|
|
16757
|
+
"children"
|
|
16758
|
+
]), _React_useState = _sliced_to_array(React2.useState(0), 2), height = _React_useState[0], setHeight = _React_useState[1];
|
|
16759
|
+
React2.useEffect(function() {
|
|
16760
|
+
itemContext.open || setHeight(0);
|
|
16761
|
+
}, [
|
|
16762
|
+
itemContext.open
|
|
16763
|
+
]);
|
|
16764
|
+
var onLayout = (0, import_web.useEvent)(function(param) {
|
|
16765
|
+
var nativeEvent = param.nativeEvent;
|
|
16766
|
+
nativeEvent.layout.height && setHeight(nativeEvent.layout.height);
|
|
16767
|
+
});
|
|
16768
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_web.View, _object_spread_props8(_object_spread9({
|
|
16769
|
+
height
|
|
16770
|
+
}, rest), {
|
|
16771
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_web.View, {
|
|
16772
|
+
position: "absolute",
|
|
16773
|
+
//@ts-ignore
|
|
16774
|
+
onLayout,
|
|
16775
|
+
children
|
|
16776
|
+
})
|
|
16777
|
+
}));
|
|
16699
16778
|
});
|
|
16700
16779
|
function getState(open) {
|
|
16701
16780
|
return open ? "open" : "closed";
|
|
@@ -16704,7 +16783,8 @@ var require_Accordion_native = __commonJS({
|
|
|
16704
16783
|
Trigger: AccordionTrigger,
|
|
16705
16784
|
Header: AccordionHeader,
|
|
16706
16785
|
Content: AccordionContent,
|
|
16707
|
-
Item: AccordionItem
|
|
16786
|
+
Item: AccordionItem,
|
|
16787
|
+
HeightAnimator
|
|
16708
16788
|
});
|
|
16709
16789
|
}
|
|
16710
16790
|
});
|