tamagui 1.92.0 → 1.93.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 +3 -3
- package/dist/cjs/views/Input.js.map +1 -1
- package/dist/cjs/views/Input.native.js +17 -4
- package/dist/cjs/views/Input.native.js.map +2 -2
- package/dist/cjs/views/TextArea.js +10 -8
- package/dist/cjs/views/TextArea.js.map +1 -1
- package/dist/cjs/views/TextArea.native.js +17 -4
- package/dist/cjs/views/TextArea.native.js.map +2 -2
- package/dist/esm/index.js +1 -1
- package/dist/esm/index.mjs +0 -1
- package/dist/esm/setup.js +1 -1
- package/dist/esm/setup.mjs +0 -1
- package/dist/esm/views/Input.js +4 -3
- package/dist/esm/views/Input.js.map +1 -1
- package/dist/esm/views/Input.mjs +6 -3
- package/dist/esm/views/Input.native.js +19 -5
- package/dist/esm/views/Input.native.js.map +2 -2
- package/dist/esm/views/TextArea.js +12 -8
- package/dist/esm/views/TextArea.js.map +1 -1
- package/dist/esm/views/TextArea.mjs +6 -3
- package/dist/esm/views/TextArea.native.js +19 -4
- package/dist/esm/views/TextArea.native.js.map +2 -2
- package/dist/jsx/index.js +1 -1
- package/dist/jsx/index.mjs +0 -1
- package/dist/jsx/setup.js +1 -1
- package/dist/jsx/setup.mjs +0 -1
- package/dist/jsx/views/Input.js +4 -3
- package/dist/jsx/views/Input.js.map +1 -1
- package/dist/jsx/views/Input.mjs +6 -3
- package/dist/jsx/views/Input.native.js +19 -5
- package/dist/jsx/views/Input.native.js.map +2 -2
- package/dist/jsx/views/TextArea.js +12 -8
- package/dist/jsx/views/TextArea.js.map +1 -1
- package/dist/jsx/views/TextArea.mjs +6 -3
- package/dist/jsx/views/TextArea.native.js +19 -4
- package/dist/jsx/views/TextArea.native.js.map +2 -2
- package/dist/native.js +677 -424
- package/dist/native.js.map +2 -2
- package/dist/test.native.js +663 -410
- package/dist/test.native.js.map +2 -2
- package/package.json +58 -55
- package/src/views/Input.tsx +22 -4
- package/src/views/TextArea.tsx +31 -9
- package/types/views/Input.d.ts.map +1 -1
- package/types/views/TextArea.d.ts.map +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/views/Users/n8/tamagui/packages/tamagui/src/views/Input.tsx"],
|
|
4
|
-
"mappings": ";AAAA,SAASA,aAAa;AAEtB,SAASC,QAAQC,gBAAgB;
|
|
5
|
-
"names": ["isWeb", "styled", "useTheme", "useFocusable", "TextInput", "inputSizeVariant", "defaultStyles", "size", "fontFamily", "borderWidth", "outlineWidth", "color", "tabIndex", "focusable", "borderColor", "backgroundColor", "minWidth", "hoverStyle", "focusStyle", "focusVisibleStyle", "outlineColor", "outlineStyle", "InputFrame", "name", "variants", "unstyled", "false", "disabled", "true", "defaultVariants", "process", "env", "TAMAGUI_HEADLESS", "isInput", "accept", "placeholderTextColor", "selectionColor", "Input", "styleable", "propsIn", "ref", "props", "useInputProps", "theme", "onChangeText", "combinedRef", "placeholderColorProp", "get", "placeholderColor", "readOnly"]
|
|
4
|
+
"mappings": ";AAAA,SAASA,aAAa;AAEtB,SAASC,QAAQC,iBAAiBC,gBAAgB;AAClD,SAASC,mBAAmBC,oBAAoB;AAChD,SAASC,iBAAiB;AAE1B,SAASC,wBAAwB;AACjC,SAASC,WAAWC,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAE3B,IAAMC,gBAAgB,qBAAA,eAAA;EAC3BC,MAAM;EACNC,YAAY;EACZC,aAAa;EACbC,cAAc;EACdC,OAAO;GAEHf,QACA;EACEgB,UAAU;AACZ,IACA;EACEC,WAAW;AACb,CAAA,GAAA;EAEJC,aAAa;EACbC,iBAAiB;;EAGjBC,UAAU;EAEVC,YAAY;IACVH,aAAa;EACf;EAEAI,YAAY;IACVJ,aAAa;EACf;EAEAK,mBAAmB;IACjBC,cAAc;IACdV,cAAc;IACdW,cAAc;EAChB;IAGWC,a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gB,QAAtBL,4BAAAA,SAAAA,SAAAA,wBAAwBI,IAAG;AAE7B,SAAO,qBAAA,eAAA;IACLZ,KAAKU;IACLI,UAAUZ,MAAMhB;KACbgB,KAAAA,GAAAA;IACHR;IACAe;;AAEJ;",
|
|
5
|
+
"names": ["isWeb", "styled", "useComposedRefs", "useTheme", "registerFocusable", "useFocusable", "TextInput", "inputSizeVariant", "useEffect", "useRef", "defaultStyles", "size", "fontFamily", "borderWidth", "outlineWidth", "color", "tabIndex", "focusable", "borderColor", "backgroundColor", "minWidth", "hoverStyle", "focusStyle", "focusVisibleStyle", "outlineColor", "outlineStyle", "InputFrame", "name", "variants", "unstyled", "false", "disabled", "true", "defaultVariants", "process", "env", "TAMAGUI_HEADLESS", "isInput", "accept", "placeholderTextColor", "selectionColor", "Input", "styleable", "propsIn", "forwardedRef", "ref", "composedRefs", "props", "useInputProps", "id", "focusAndSelect", "current", "focus", "theme", "onChangeText", "combinedRef", "placeholderColorProp", "get", "placeholderColor", "readOnly"]
|
|
6
6
|
}
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import { isWeb } from "@tamagui/constants";
|
|
2
|
-
import { styled } from "@tamagui/core";
|
|
2
|
+
import { styled, useComposedRefs } from "@tamagui/core";
|
|
3
3
|
import { textAreaSizeVariant } from "../helpers/inputHelpers";
|
|
4
4
|
import { InputFrame, defaultStyles, useInputProps } from "./Input";
|
|
5
|
+
|
|
6
|
+
import { useRef } from "react";
|
|
5
7
|
import { jsx } from "react/jsx-runtime";
|
|
6
8
|
const TextAreaFrame = styled(InputFrame, {
|
|
7
9
|
name: "TextArea",
|
|
@@ -22,13 +24,15 @@ const TextAreaFrame = styled(InputFrame, {
|
|
|
22
24
|
defaultVariants: {
|
|
23
25
|
unstyled: process.env.TAMAGUI_HEADLESS === "1"
|
|
24
26
|
}
|
|
25
|
-
}), TextArea = TextAreaFrame.styleable(
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
});
|
|
27
|
+
}), TextArea = TextAreaFrame.styleable(
|
|
28
|
+
(propsIn, forwardedRef) => {
|
|
29
|
+
const ref = useRef(null), composedRefs = useComposedRefs(forwardedRef, ref), props = useInputProps(propsIn, composedRefs), linesProp = {
|
|
30
|
+
// web uses rows now, but native not caught up :/
|
|
31
|
+
[isWeb ? "rows" : "numberOfLines"]: propsIn.unstyled ? void 0 : 4
|
|
32
|
+
};
|
|
33
|
+
return /* @__PURE__ */ jsx(TextAreaFrame, { ...linesProp, ...props });
|
|
34
|
+
}
|
|
35
|
+
);
|
|
32
36
|
export {
|
|
33
37
|
TextArea,
|
|
34
38
|
TextAreaFrame
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/views/TextArea.tsx"],
|
|
4
|
-
"mappings": "AAAA,SAAS,aAAa;AACtB,SAAS,
|
|
4
|
+
"mappings": "AAAA,SAAS,aAAa;AACtB,SAAS,QAAQ,uBAAuB;AAExC,SAAS,2BAA2B;AAEpC,SAAS,YAAY,eAAe,qBAAqB;AACzD,OAAkC;AAClC,SAAoB,cAAc;AA0DvB;AApDJ,MAAM,gBAAgB,OAAO,YAAY;AAAA,EAC9C,MAAM;AAAA,EACN,WAAW;AAAA;AAAA,EAEX,YAAY;AAAA,EAEZ,UAAU;AAAA,IACR,UAAU;AAAA,MACR,OAAO;AAAA,QACL,QAAQ;AAAA,QACR,GAAG;AAAA,MACL;AAAA,IACF;AAAA,IAEA,MAAM;AAAA,MACJ,WAAW;AAAA,IACb;AAAA,EACF;AAAA,EAEA,iBAAiB;AAAA,IACf,UAAU,QAAQ,IAAI,qBAAqB;AAAA,EAC7C;AACF,CAAC,GAIY,WAAW,cAAc;AAAA,EACpC,CAAC,SAAS,iBAAiB;AACzB,UAAM,MAAM,OAAc,IAAI,GACxB,eAAe,gBAAgB,cAAc,GAAG,GAEhD,QAAQ,cAAc,SAAS,YAAY,GAE3C,YAAY;AAAA;AAAA,MAEhB,CAAC,QAAQ,SAAS,eAAe,GAAG,QAAQ,WAAW,SAAY;AAAA,IACrE;AAgBA,WAAO,oBAAC,iBAAe,GAAG,WAAY,GAAG,OAAO;AAAA,EAClD;AACF;",
|
|
5
5
|
"names": []
|
|
6
6
|
}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { isWeb } from "@tamagui/constants";
|
|
2
|
-
import { styled } from "@tamagui/core";
|
|
2
|
+
import { styled, useComposedRefs } from "@tamagui/core";
|
|
3
3
|
import { textAreaSizeVariant } from "../helpers/inputHelpers.mjs";
|
|
4
4
|
import { InputFrame, defaultStyles, useInputProps } from "./Input.mjs";
|
|
5
|
+
import { useRef } from "react";
|
|
5
6
|
import { jsx } from "react/jsx-runtime";
|
|
6
7
|
const TextAreaFrame = styled(InputFrame, {
|
|
7
8
|
name: "TextArea",
|
|
@@ -23,8 +24,10 @@ const TextAreaFrame = styled(InputFrame, {
|
|
|
23
24
|
unstyled: process.env.TAMAGUI_HEADLESS === "1"
|
|
24
25
|
}
|
|
25
26
|
}),
|
|
26
|
-
TextArea = TextAreaFrame.styleable((propsIn,
|
|
27
|
-
const
|
|
27
|
+
TextArea = TextAreaFrame.styleable((propsIn, forwardedRef) => {
|
|
28
|
+
const ref = useRef(null),
|
|
29
|
+
composedRefs = useComposedRefs(forwardedRef, ref),
|
|
30
|
+
props = useInputProps(propsIn, composedRefs),
|
|
28
31
|
linesProp = {
|
|
29
32
|
// web uses rows now, but native not caught up :/
|
|
30
33
|
[isWeb ? "rows" : "numberOfLines"]: propsIn.unstyled ? void 0 : 4
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { isWeb } from "@tamagui/constants";
|
|
3
|
-
import { styled } from "@tamagui/core";
|
|
3
|
+
import { styled, useComposedRefs } from "@tamagui/core";
|
|
4
4
|
import { textAreaSizeVariant } from "../helpers/inputHelpers";
|
|
5
5
|
import { InputFrame, defaultStyles, useInputProps } from "./Input";
|
|
6
|
+
import { registerFocusable } from "@tamagui/focusable";
|
|
7
|
+
import { useEffect, useRef } from "react";
|
|
6
8
|
function _define_property(obj, key, value) {
|
|
7
9
|
return key in obj ? Object.defineProperty(obj, key, {
|
|
8
10
|
value,
|
|
@@ -40,12 +42,25 @@ var TextAreaFrame = styled(InputFrame, {
|
|
|
40
42
|
defaultVariants: {
|
|
41
43
|
unstyled: process.env.TAMAGUI_HEADLESS === "1"
|
|
42
44
|
}
|
|
43
|
-
}), TextArea = TextAreaFrame.styleable(function(propsIn,
|
|
44
|
-
var props = useInputProps(propsIn,
|
|
45
|
+
}), TextArea = TextAreaFrame.styleable(function(propsIn, forwardedRef) {
|
|
46
|
+
var ref = useRef(null), composedRefs = useComposedRefs(forwardedRef, ref), props = useInputProps(propsIn, composedRefs), linesProp = (
|
|
45
47
|
// web uses rows now, but native not caught up :/
|
|
46
48
|
_define_property({}, isWeb ? "rows" : "numberOfLines", propsIn.unstyled ? void 0 : 4)
|
|
47
49
|
);
|
|
48
|
-
return
|
|
50
|
+
return useEffect(function() {
|
|
51
|
+
if (props.id && !props.disabled)
|
|
52
|
+
return registerFocusable(props.id, {
|
|
53
|
+
focusAndSelect: function() {
|
|
54
|
+
var _ref_current;
|
|
55
|
+
(_ref_current = ref.current) === null || _ref_current === void 0 || _ref_current.focus();
|
|
56
|
+
},
|
|
57
|
+
focus: function() {
|
|
58
|
+
}
|
|
59
|
+
});
|
|
60
|
+
}, [
|
|
61
|
+
props.id,
|
|
62
|
+
props.disabled
|
|
63
|
+
]), /* @__PURE__ */ _jsx(TextAreaFrame, _object_spread({}, linesProp, props));
|
|
49
64
|
});
|
|
50
65
|
export {
|
|
51
66
|
TextArea,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/views/Users/n8/tamagui/packages/tamagui/src/views/TextArea.tsx"],
|
|
4
|
-
"mappings": ";AAAA,SAASA,aAAa;AACtB,SAASC,
|
|
5
|
-
"names": ["isWeb", "styled", "textAreaSizeVariant", "InputFrame", "defaultStyles", "useInputProps", "TextAreaFrame", "name", "multiline", "whiteSpace", "variants", "unstyled", "false", "height", "size", "defaultVariants", "process", "env", "TAMAGUI_HEADLESS", "TextArea", "styleable", "propsIn", "ref", "props", "linesProp", "undefined"]
|
|
4
|
+
"mappings": ";AAAA,SAASA,aAAa;AACtB,SAASC,QAAQC,uBAAuB;AAExC,SAASC,2BAA2B;AAEpC,SAASC,YAAYC,eAAeC,qBAAqB;AACzD,SAASC,yBAAyB;AAClC,SAASC,WAAWC,cAAc;;;;;;;;;;;;;;;;;;;;AAM3B,IAAMC,gBAAgBT,OAAOG,YAAY;EAC9CO,MAAM;EACNC,WAAW;;EAEXC,YAAY;EAEZC,UAAU;IACRC,UAAU;MACRC,OAAO,eAAA;QACLC,QAAQ;SACLZ,aAAAA;IAEP;IAEAa,MAAM;MACJ,WAAWf;IACb;EACF;EAEAgB,iBAAiB;IACfJ,UAAUK,QAAQC,IAAIC,qBAAqB;EAC7C;AACF,CAAA,GAIaC,WAAWb,cAAcc,UACpC,SAACC,SAASC,cAAAA;AACR,MAAMC,MAAMlB,OAAc,IAAA,GACpBmB,eAAe1B,gBAAgBwB,cAAcC,GAAAA,GAE7CE,QAAQvB,cAAcmB,SAASG,YAAAA,GAE/BE;;IAEJ,iBAAA,CAAA,GAAC9B,QAAQ,SAAS,iBAAkByB,QAAQV,WAAWgB,SAAY,CAAA;;AAInEvB,mBAAU,WAAA;AACR,QAAKqB,MAAMG,MACPH,OAAMI;AAEV,aAAO1B,kBAAkBsB,MAAMG,IAAI;QACjCE,gBAAgB,WAAA;cACdP;WAAAA,eAAAA,IAAIQ,aAAO,QAAXR,iBAAAA,UAAAA,aAAaS,MAAK;QACpB;QACAA,OAAO,WAAA;QAAO;MAChB,CAAA;EACF,GAAG;IAACP,MAAMG;IAAIH,MAAMI;GAAS,GAGxB,qBAACvB,eAAAA,eAAAA,CAAAA,GAAkBoB,WAAeD,KAAAA,CAAAA;AAC3C,CAAA;",
|
|
5
|
+
"names": ["isWeb", "styled", "useComposedRefs", "textAreaSizeVariant", "InputFrame", "defaultStyles", "useInputProps", "registerFocusable", "useEffect", "useRef", "TextAreaFrame", "name", "multiline", "whiteSpace", "variants", "unstyled", "false", "height", "size", "defaultVariants", "process", "env", "TAMAGUI_HEADLESS", "TextArea", "styleable", "propsIn", "forwardedRef", "ref", "composedRefs", "props", "linesProp", "undefined", "id", "disabled", "focusAndSelect", "current", "focus"]
|
|
6
6
|
}
|