@tamagui/helpers-tamagui 1.75.5 → 1.75.6
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/useCurrentColor.js +4 -1
- package/dist/cjs/useCurrentColor.js.map +1 -1
- package/dist/cjs/useCurrentColor.native.js +4 -1
- package/dist/cjs/useCurrentColor.native.js.map +1 -1
- package/dist/esm/useCurrentColor.js +3 -1
- package/dist/esm/useCurrentColor.js.map +1 -1
- package/dist/esm/useCurrentColor.native.js +3 -1
- package/dist/esm/useCurrentColor.native.js.map +1 -1
- package/package.json +4 -4
- package/src/useCurrentColor.tsx +3 -1
- package/types/useCurrentColor.d.ts.map +1 -1
|
@@ -19,8 +19,11 @@ __export(useCurrentColor_exports, {
|
|
|
19
19
|
module.exports = __toCommonJS(useCurrentColor_exports);
|
|
20
20
|
var import_web = require("@tamagui/web");
|
|
21
21
|
const useCurrentColor = (colorProp) => {
|
|
22
|
+
var _a;
|
|
22
23
|
const theme = (0, import_web.useTheme)();
|
|
23
|
-
return (0, import_web.getVariable)(
|
|
24
|
+
return (0, import_web.getVariable)(
|
|
25
|
+
colorProp || ((_a = theme[colorProp]) == null ? void 0 : _a.get("web")) || theme.color.get("web")
|
|
26
|
+
);
|
|
24
27
|
};
|
|
25
28
|
// Annotate the CommonJS export names for ESM import in node:
|
|
26
29
|
0 && (module.exports = {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/useCurrentColor.tsx"],
|
|
4
|
-
"mappings": ";;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,iBAMO;AAGA,MAAM,kBAAkB,CAAC,cAAyB;
|
|
4
|
+
"mappings": ";;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,iBAMO;AAGA,MAAM,kBAAkB,CAAC,cAAyB;AATzD;AAUE,QAAM,YAAQ,qBAAS;AAIvB,aAHY;AAAA,IACV,eAAa,WAAM,SAAgB,MAAtB,mBAAyB,IAAI,WAAU,MAAM,MAAM,IAAI,KAAK;AAAA,EAC3E;AAEF;",
|
|
5
5
|
"names": []
|
|
6
6
|
}
|
|
@@ -20,8 +20,11 @@ __export(useCurrentColor_exports, {
|
|
|
20
20
|
module.exports = __toCommonJS(useCurrentColor_exports);
|
|
21
21
|
var import_web = require("@tamagui/web");
|
|
22
22
|
const useCurrentColor = (colorProp) => {
|
|
23
|
+
var _a;
|
|
23
24
|
const theme = (0, import_web.useTheme)();
|
|
24
|
-
return (0, import_web.getVariable)(
|
|
25
|
+
return (0, import_web.getVariable)(
|
|
26
|
+
colorProp || ((_a = theme[colorProp]) == null ? void 0 : _a.get("web")) || theme.color.get("web")
|
|
27
|
+
);
|
|
25
28
|
};
|
|
26
29
|
// Annotate the CommonJS export names for ESM import in node:
|
|
27
30
|
0 && (module.exports = {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/useCurrentColor.tsx"],
|
|
4
|
-
"mappings": ";;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,iBAMO;AAGA,MAAM,kBAAkB,CAAC,cAAyB;
|
|
4
|
+
"mappings": ";;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,iBAMO;AAGA,MAAM,kBAAkB,CAAC,cAAyB;AATzD;AAUE,QAAM,YAAQ,qBAAS;AAIvB,aAHY;AAAA,IACV,eAAa,WAAM,SAAgB,MAAtB,mBAAyB,IAAI,WAAU,MAAM,MAAM,IAAI,KAAK;AAAA,EAC3E;AAEF;",
|
|
5
5
|
"names": []
|
|
6
6
|
}
|
|
@@ -4,7 +4,9 @@ import {
|
|
|
4
4
|
} from "@tamagui/web";
|
|
5
5
|
const useCurrentColor = (colorProp) => {
|
|
6
6
|
const theme = useTheme();
|
|
7
|
-
return getVariable(
|
|
7
|
+
return getVariable(
|
|
8
|
+
colorProp || theme[colorProp]?.get("web") || theme.color.get("web")
|
|
9
|
+
);
|
|
8
10
|
};
|
|
9
11
|
export {
|
|
10
12
|
useCurrentColor
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/useCurrentColor.tsx"],
|
|
4
|
-
"mappings": "AAAA;AAAA,EAIE;AAAA,EACA;AAAA,OACK;AAGA,MAAM,kBAAkB,CAAC,cAAyB;AACvD,QAAM,QAAQ,SAAS;
|
|
4
|
+
"mappings": "AAAA;AAAA,EAIE;AAAA,EACA;AAAA,OACK;AAGA,MAAM,kBAAkB,CAAC,cAAyB;AACvD,QAAM,QAAQ,SAAS;AAIvB,SAHY;AAAA,IACV,aAAa,MAAM,SAAgB,GAAG,IAAI,KAAK,KAAK,MAAM,MAAM,IAAI,KAAK;AAAA,EAC3E;AAEF;",
|
|
5
5
|
"names": []
|
|
6
6
|
}
|
|
@@ -4,7 +4,9 @@ import {
|
|
|
4
4
|
} from "@tamagui/web";
|
|
5
5
|
const useCurrentColor = (colorProp) => {
|
|
6
6
|
const theme = useTheme();
|
|
7
|
-
return getVariable(
|
|
7
|
+
return getVariable(
|
|
8
|
+
colorProp || theme[colorProp]?.get("web") || theme.color.get("web")
|
|
9
|
+
);
|
|
8
10
|
};
|
|
9
11
|
export {
|
|
10
12
|
useCurrentColor
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/useCurrentColor.tsx"],
|
|
4
|
-
"mappings": "AAAA;AAAA,EAIE;AAAA,EACA;AAAA,OACK;AAGA,MAAM,kBAAkB,CAAC,cAAyB;AACvD,QAAM,QAAQ,SAAS;
|
|
4
|
+
"mappings": "AAAA;AAAA,EAIE;AAAA,EACA;AAAA,OACK;AAGA,MAAM,kBAAkB,CAAC,cAAyB;AACvD,QAAM,QAAQ,SAAS;AAIvB,SAHY;AAAA,IACV,aAAa,MAAM,SAAgB,GAAG,IAAI,KAAK,KAAK,MAAM,MAAM,IAAI,KAAK;AAAA,EAC3E;AAEF;",
|
|
5
5
|
"names": []
|
|
6
6
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tamagui/helpers-tamagui",
|
|
3
|
-
"version": "1.75.
|
|
3
|
+
"version": "1.75.6",
|
|
4
4
|
"source": "src/index.ts",
|
|
5
5
|
"types": "./types/index.d.ts",
|
|
6
6
|
"main": "dist/cjs",
|
|
@@ -19,11 +19,11 @@
|
|
|
19
19
|
"clean:build": "tamagui-build clean:build"
|
|
20
20
|
},
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"@tamagui/helpers": "1.75.
|
|
23
|
-
"@tamagui/web": "1.75.
|
|
22
|
+
"@tamagui/helpers": "1.75.6",
|
|
23
|
+
"@tamagui/web": "1.75.6"
|
|
24
24
|
},
|
|
25
25
|
"devDependencies": {
|
|
26
|
-
"@tamagui/build": "1.75.
|
|
26
|
+
"@tamagui/build": "1.75.6",
|
|
27
27
|
"react": "^18.2.0",
|
|
28
28
|
"react-native": "^0.72.1",
|
|
29
29
|
"vitest": "^0.34.3"
|
package/src/useCurrentColor.tsx
CHANGED
|
@@ -9,7 +9,9 @@ import type { TextStyle } from 'react-native'
|
|
|
9
9
|
|
|
10
10
|
export const useCurrentColor = (colorProp: ColorProp) => {
|
|
11
11
|
const theme = useTheme()
|
|
12
|
-
const out = getVariable(
|
|
12
|
+
const out = getVariable(
|
|
13
|
+
colorProp || theme[colorProp as any]?.get('web') || theme.color.get('web')
|
|
14
|
+
)
|
|
13
15
|
return out
|
|
14
16
|
}
|
|
15
17
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useCurrentColor.d.ts","sourceRoot":"","sources":["../src/useCurrentColor.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,WAAW,EACX,eAAe,EACf,QAAQ,EAGT,MAAM,cAAc,CAAA;AACrB,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAA;AAE7C,eAAO,MAAM,eAAe,cAAe,SAAS,
|
|
1
|
+
{"version":3,"file":"useCurrentColor.d.ts","sourceRoot":"","sources":["../src/useCurrentColor.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,WAAW,EACX,eAAe,EACf,QAAQ,EAGT,MAAM,cAAc,CAAA;AACrB,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAA;AAE7C,eAAO,MAAM,eAAe,cAAe,SAAS,WAMnD,CAAA;AAED,MAAM,MAAM,SAAS,GACjB,eAAe,GACf,QAAQ,GACR,WAAW,GACX,SAAS,CAAC,OAAO,CAAC,GAClB,SAAS,CAAA"}
|