@tamagui/helpers-icon 1.46.2 → 1.47.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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tamagui/helpers-icon",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.47.0",
|
|
4
4
|
"sideEffects": false,
|
|
5
5
|
"description": "Utilities for icon packages",
|
|
6
6
|
"source": "src/index.ts",
|
|
@@ -21,14 +21,14 @@
|
|
|
21
21
|
},
|
|
22
22
|
"license": "MIT",
|
|
23
23
|
"dependencies": {
|
|
24
|
-
"@tamagui/core": "1.
|
|
24
|
+
"@tamagui/core": "1.47.0"
|
|
25
25
|
},
|
|
26
26
|
"peerDependencies": {
|
|
27
27
|
"react": "*",
|
|
28
28
|
"react-native-svg": ">=12"
|
|
29
29
|
},
|
|
30
30
|
"devDependencies": {
|
|
31
|
-
"@tamagui/build": "1.
|
|
31
|
+
"@tamagui/build": "1.47.0",
|
|
32
32
|
"react": "^18.2.0",
|
|
33
33
|
"react-native-svg": "^13.9.0"
|
|
34
34
|
}
|
package/dist/jsx/IconProps.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
//# sourceMappingURL=IconProps.mjs.map
|
package/dist/jsx/index.mjs
DELETED
package/dist/jsx/index.mjs.map
DELETED
package/dist/jsx/themed.mjs
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { getTokenValue, getVariable, useProps, useTheme } from "@tamagui/core";
|
|
2
|
-
function themed(Component, opts = {
|
|
3
|
-
defaultThemeColor: process.env.DEFAULT_ICON_THEME_COLOR || "$color",
|
|
4
|
-
defaultStrokeWidth: 2,
|
|
5
|
-
fallbackColor: "#000"
|
|
6
|
-
}) {
|
|
7
|
-
const wrapped = (propsIn) => {
|
|
8
|
-
const props = useProps(propsIn);
|
|
9
|
-
const theme = useTheme();
|
|
10
|
-
const defaultColor = props.color ?? opts.defaultThemeColor;
|
|
11
|
-
const color = getVariable(
|
|
12
|
-
(defaultColor ? theme[defaultColor] : void 0) || props.color || (!props.disableTheme ? theme.color : null) || opts.fallbackColor
|
|
13
|
-
);
|
|
14
|
-
const size = typeof props.size === "string" ? getTokenValue(props.size, "size") : props.size;
|
|
15
|
-
const strokeWidth = typeof props.strokeWidth === "string" ? getTokenValue(props.strokeWidth, "size") : props.strokeWidth ?? `${opts.defaultStrokeWidth}`;
|
|
16
|
-
return <Component {...props} color={color} size={size} strokeWidth={strokeWidth} />;
|
|
17
|
-
};
|
|
18
|
-
return wrapped;
|
|
19
|
-
}
|
|
20
|
-
export {
|
|
21
|
-
themed
|
|
22
|
-
};
|
|
23
|
-
//# sourceMappingURL=themed.mjs.map
|
package/dist/jsx/themed.mjs.map
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../src/themed.tsx"],
|
|
4
|
-
"mappings": "AAAA,SAAS,eAAe,aAAa,UAAU,gBAAgB;AAWxD,SAAS,OACd,WACA,OAAsB;AAAA,EACpB,mBAAmB,QAAQ,IAAI,4BAA4B;AAAA,EAC3D,oBAAoB;AAAA,EACpB,eAAe;AACjB,GACA;AACA,QAAM,UAAU,CAAC,YAAuB;AACtC,UAAM,QAAQ,SAAS,OAAO;AAC9B,UAAM,QAAQ,SAAS;AAEvB,UAAM,eAAe,MAAM,SAAS,KAAK;AACzC,UAAM,QAAQ;AAAA,OACX,eAAe,MAAM,YAAY,IAAI,WACpC,MAAM,UACL,CAAC,MAAM,eAAe,MAAM,QAAQ,SACrC,KAAK;AAAA,IACT;AAEA,UAAM,OACJ,OAAO,MAAM,SAAS,WAClB,cAAc,MAAM,MAAa,MAAM,IACvC,MAAM;AAEZ,UAAM,cACJ,OAAO,MAAM,gBAAgB,WACzB,cAAc,MAAM,aAAoB,MAAM,IAC9C,MAAM,eAAe,GAAG,KAAK;AAEnC,WAAO,CAAC,cAAc,OAAO,OAAO,OAAO,MAAM,MAAM,aAAa,aAAa;AAAA,EACnF;AAEA,SAAO;AACT;",
|
|
5
|
-
"names": []
|
|
6
|
-
}
|