tamagui 1.95.2 → 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/cjs/views/Input.js.map +1 -1
- package/dist/cjs/views/Input.native.js +1 -14
- package/dist/cjs/views/Input.native.js.map +2 -2
- package/dist/esm/views/Input.js.map +1 -1
- package/dist/esm/views/Input.native.js +3 -16
- package/dist/esm/views/Input.native.js.map +2 -2
- package/dist/jsx/views/Input.js.map +1 -1
- package/dist/jsx/views/Input.native.js +3 -16
- package/dist/jsx/views/Input.native.js.map +2 -2
- package/dist/native.js +97 -30
- package/dist/native.js.map +3 -3
- package/dist/test.native.js +97 -30
- package/dist/test.native.js.map +3 -3
- package/package.json +54 -54
- package/src/views/Input.tsx +2 -16
- 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
|
});
|
|
@@ -23574,14 +23654,14 @@ var require_registerFocusable_native = __commonJS({
|
|
|
23574
23654
|
return focusFocusable;
|
|
23575
23655
|
},
|
|
23576
23656
|
registerFocusable: function() {
|
|
23577
|
-
return
|
|
23657
|
+
return registerFocusable2;
|
|
23578
23658
|
},
|
|
23579
23659
|
unregisterFocusable: function() {
|
|
23580
23660
|
return unregisterFocusable;
|
|
23581
23661
|
}
|
|
23582
23662
|
});
|
|
23583
23663
|
module2.exports = __toCommonJS2(registerFocusable_native_exports);
|
|
23584
|
-
var InputsMap = /* @__PURE__ */ new Map(),
|
|
23664
|
+
var InputsMap = /* @__PURE__ */ new Map(), registerFocusable2 = function(id, input) {
|
|
23585
23665
|
return InputsMap.set(id, input), function() {
|
|
23586
23666
|
InputsMap.delete(id);
|
|
23587
23667
|
};
|
|
@@ -25354,7 +25434,7 @@ var require_use_sync_external_store_shim_native_development = __commonJS({
|
|
|
25354
25434
|
function is(x, y) {
|
|
25355
25435
|
return x === y && (x !== 0 || 1 / x === 1 / y) || x !== x && y !== y;
|
|
25356
25436
|
}
|
|
25357
|
-
var objectIs = typeof Object.is == "function" ? Object.is : is, useState = React2.useState,
|
|
25437
|
+
var objectIs = typeof Object.is == "function" ? Object.is : is, useState = React2.useState, useEffect2 = React2.useEffect, useLayoutEffect = React2.useLayoutEffect, useDebugValue2 = React2.useDebugValue, didWarnOld18Alpha = !1, didWarnUncachedGetSnapshot = !1;
|
|
25358
25438
|
function useSyncExternalStore(subscribe, getSnapshot, getServerSnapshot) {
|
|
25359
25439
|
didWarnOld18Alpha || React2.startTransition !== void 0 && (didWarnOld18Alpha = !0, error("You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."));
|
|
25360
25440
|
var value = getSnapshot();
|
|
@@ -25376,7 +25456,7 @@ var require_use_sync_external_store_shim_native_development = __commonJS({
|
|
|
25376
25456
|
subscribe,
|
|
25377
25457
|
value,
|
|
25378
25458
|
getSnapshot
|
|
25379
|
-
]),
|
|
25459
|
+
]), useEffect2(function() {
|
|
25380
25460
|
checkIfSnapshotChanged(inst) && forceUpdate({
|
|
25381
25461
|
inst
|
|
25382
25462
|
});
|
|
@@ -25424,7 +25504,7 @@ var require_with_selector_development = __commonJS({
|
|
|
25424
25504
|
function is(x, y) {
|
|
25425
25505
|
return x === y && (x !== 0 || 1 / x === 1 / y) || x !== x && y !== y;
|
|
25426
25506
|
}
|
|
25427
|
-
var objectIs = typeof Object.is == "function" ? Object.is : is, useSyncExternalStore = shim.useSyncExternalStore, useRef3 = React2.useRef,
|
|
25507
|
+
var objectIs = typeof Object.is == "function" ? Object.is : is, useSyncExternalStore = shim.useSyncExternalStore, useRef3 = React2.useRef, useEffect2 = React2.useEffect, useMemo = React2.useMemo, useDebugValue2 = React2.useDebugValue;
|
|
25428
25508
|
function useSyncExternalStoreWithSelector2(subscribe, getSnapshot, getServerSnapshot, selector, isEqual) {
|
|
25429
25509
|
var instRef = useRef3(null), inst;
|
|
25430
25510
|
instRef.current === null ? (inst = {
|
|
@@ -25463,7 +25543,7 @@ var require_with_selector_development = __commonJS({
|
|
|
25463
25543
|
selector,
|
|
25464
25544
|
isEqual
|
|
25465
25545
|
]), getSelection = _useMemo[0], getServerSelection = _useMemo[1], value = useSyncExternalStore(subscribe, getSelection, getServerSelection);
|
|
25466
|
-
return
|
|
25546
|
+
return useEffect2(function() {
|
|
25467
25547
|
inst.hasValue = !0, inst.value = value;
|
|
25468
25548
|
}, [
|
|
25469
25549
|
value
|
|
@@ -37873,20 +37953,7 @@ var defaultStyles = _object_spread_props6(_object_spread6({
|
|
|
37873
37953
|
}
|
|
37874
37954
|
}), Input = InputFrame.styleable(function(propsIn, forwardedRef) {
|
|
37875
37955
|
var ref = (0, import_react2.useRef)(null), composedRefs = (0, import_core7.useComposedRefs)(forwardedRef, ref), props = useInputProps(propsIn, composedRefs);
|
|
37876
|
-
return (0,
|
|
37877
|
-
if (props.id && !props.disabled)
|
|
37878
|
-
return (0, import_focusable.registerFocusable)(props.id, {
|
|
37879
|
-
focusAndSelect: function() {
|
|
37880
|
-
var _ref_current;
|
|
37881
|
-
(_ref_current = ref.current) === null || _ref_current === void 0 || _ref_current.focus();
|
|
37882
|
-
},
|
|
37883
|
-
focus: function() {
|
|
37884
|
-
}
|
|
37885
|
-
});
|
|
37886
|
-
}, [
|
|
37887
|
-
props.id,
|
|
37888
|
-
props.disabled
|
|
37889
|
-
]), /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(InputFrame, _object_spread6({}, props));
|
|
37956
|
+
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(InputFrame, _object_spread6({}, props));
|
|
37890
37957
|
});
|
|
37891
37958
|
function useInputProps(props, ref) {
|
|
37892
37959
|
var _theme_placeholderColorProp, _theme_placeholderColor, theme = (0, import_core7.useTheme)(), _useFocusable = (0, import_focusable.useFocusable)({
|