@tamagui/helpers-icon 1.69.0 → 1.69.2
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/themed.js +2 -2
- package/dist/cjs/themed.native.js +2 -2
- package/dist/esm/themed.js +2 -2
- package/dist/jsx/themed.js +2 -2
- package/dist/jsx/themed.native.js +2 -2
- package/package.json +3 -3
- package/src/themed.tsx +2 -2
package/dist/cjs/themed.js
CHANGED
|
@@ -24,8 +24,8 @@ function themed(Component, opts = {
|
|
|
24
24
|
fallbackColor: "#000"
|
|
25
25
|
}) {
|
|
26
26
|
return (propsIn) => {
|
|
27
|
-
const [props, style] = (0, import_core.usePropsAndStyle)(propsIn), theme = (0, import_core.useTheme)(), defaultColor =
|
|
28
|
-
(defaultColor ? theme[defaultColor] : void 0) ||
|
|
27
|
+
const [props, style] = (0, import_core.usePropsAndStyle)(propsIn), theme = (0, import_core.useTheme)(), defaultColor = style.color ?? opts.defaultThemeColor, color = (0, import_core.getVariable)(
|
|
28
|
+
(defaultColor ? theme[defaultColor] : void 0) || style.color || (props.disableTheme ? null : theme.color) || opts.fallbackColor
|
|
29
29
|
), size = typeof props.size == "string" ? (0, import_core.getTokenValue)(props.size, "size") : props.size, strokeWidth = typeof props.strokeWidth == "string" ? (0, import_core.getTokenValue)(props.strokeWidth, "size") : props.strokeWidth ?? `${opts.defaultStrokeWidth}`;
|
|
30
30
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
31
31
|
Component,
|
|
@@ -25,8 +25,8 @@ function themed(Component, opts = {
|
|
|
25
25
|
fallbackColor: "#000"
|
|
26
26
|
}) {
|
|
27
27
|
return (propsIn) => {
|
|
28
|
-
const [props, style] = (0, import_core.usePropsAndStyle)(propsIn), theme = (0, import_core.useTheme)(), defaultColor =
|
|
29
|
-
(defaultColor ? theme[defaultColor] : void 0) ||
|
|
28
|
+
const [props, style] = (0, import_core.usePropsAndStyle)(propsIn), theme = (0, import_core.useTheme)(), defaultColor = style.color ?? opts.defaultThemeColor, color = (0, import_core.getVariable)(
|
|
29
|
+
(defaultColor ? theme[defaultColor] : void 0) || style.color || (props.disableTheme ? null : theme.color) || opts.fallbackColor
|
|
30
30
|
), size = typeof props.size == "string" ? (0, import_core.getTokenValue)(props.size, "size") : props.size, strokeWidth = typeof props.strokeWidth == "string" ? (0, import_core.getTokenValue)(props.strokeWidth, "size") : props.strokeWidth ?? `${opts.defaultStrokeWidth}`;
|
|
31
31
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
32
32
|
Component,
|
package/dist/esm/themed.js
CHANGED
|
@@ -6,8 +6,8 @@ function themed(Component, opts = {
|
|
|
6
6
|
fallbackColor: "#000"
|
|
7
7
|
}) {
|
|
8
8
|
return (propsIn) => {
|
|
9
|
-
const [props, style] = usePropsAndStyle(propsIn), theme = useTheme(), defaultColor =
|
|
10
|
-
(defaultColor ? theme[defaultColor] : void 0) ||
|
|
9
|
+
const [props, style] = usePropsAndStyle(propsIn), theme = useTheme(), defaultColor = style.color ?? opts.defaultThemeColor, color = getVariable(
|
|
10
|
+
(defaultColor ? theme[defaultColor] : void 0) || style.color || (props.disableTheme ? null : theme.color) || opts.fallbackColor
|
|
11
11
|
), size = typeof props.size == "string" ? getTokenValue(props.size, "size") : props.size, strokeWidth = typeof props.strokeWidth == "string" ? getTokenValue(props.strokeWidth, "size") : props.strokeWidth ?? `${opts.defaultStrokeWidth}`;
|
|
12
12
|
return /* @__PURE__ */ jsx(
|
|
13
13
|
Component,
|
package/dist/jsx/themed.js
CHANGED
|
@@ -5,8 +5,8 @@ function themed(Component, opts = {
|
|
|
5
5
|
fallbackColor: "#000"
|
|
6
6
|
}) {
|
|
7
7
|
return (propsIn) => {
|
|
8
|
-
const [props, style] = usePropsAndStyle(propsIn), theme = useTheme(), defaultColor =
|
|
9
|
-
(defaultColor ? theme[defaultColor] : void 0) ||
|
|
8
|
+
const [props, style] = usePropsAndStyle(propsIn), theme = useTheme(), defaultColor = style.color ?? opts.defaultThemeColor, color = getVariable(
|
|
9
|
+
(defaultColor ? theme[defaultColor] : void 0) || style.color || (props.disableTheme ? null : theme.color) || opts.fallbackColor
|
|
10
10
|
), size = typeof props.size == "string" ? getTokenValue(props.size, "size") : props.size, strokeWidth = typeof props.strokeWidth == "string" ? getTokenValue(props.strokeWidth, "size") : props.strokeWidth ?? `${opts.defaultStrokeWidth}`;
|
|
11
11
|
return <Component
|
|
12
12
|
{...props}
|
|
@@ -5,8 +5,8 @@ function themed(Component, opts = {
|
|
|
5
5
|
fallbackColor: "#000"
|
|
6
6
|
}) {
|
|
7
7
|
return (propsIn) => {
|
|
8
|
-
const [props, style] = usePropsAndStyle(propsIn), theme = useTheme(), defaultColor =
|
|
9
|
-
(defaultColor ? theme[defaultColor] : void 0) ||
|
|
8
|
+
const [props, style] = usePropsAndStyle(propsIn), theme = useTheme(), defaultColor = style.color ?? opts.defaultThemeColor, color = getVariable(
|
|
9
|
+
(defaultColor ? theme[defaultColor] : void 0) || style.color || (props.disableTheme ? null : theme.color) || opts.fallbackColor
|
|
10
10
|
), size = typeof props.size == "string" ? getTokenValue(props.size, "size") : props.size, strokeWidth = typeof props.strokeWidth == "string" ? getTokenValue(props.strokeWidth, "size") : props.strokeWidth ?? `${opts.defaultStrokeWidth}`;
|
|
11
11
|
return <Component
|
|
12
12
|
{...props}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tamagui/helpers-icon",
|
|
3
|
-
"version": "1.69.
|
|
3
|
+
"version": "1.69.2",
|
|
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.69.
|
|
24
|
+
"@tamagui/core": "1.69.2"
|
|
25
25
|
},
|
|
26
26
|
"peerDependencies": {
|
|
27
27
|
"react": "*",
|
|
28
28
|
"react-native-svg": ">=12"
|
|
29
29
|
},
|
|
30
30
|
"devDependencies": {
|
|
31
|
-
"@tamagui/build": "1.69.
|
|
31
|
+
"@tamagui/build": "1.69.2",
|
|
32
32
|
"react": "^18.2.0",
|
|
33
33
|
"react-native-svg": "^13.9.0"
|
|
34
34
|
}
|
package/src/themed.tsx
CHANGED
|
@@ -21,10 +21,10 @@ export function themed(
|
|
|
21
21
|
const [props, style] = usePropsAndStyle(propsIn)
|
|
22
22
|
const theme = useTheme()
|
|
23
23
|
|
|
24
|
-
const defaultColor =
|
|
24
|
+
const defaultColor = style.color ?? opts.defaultThemeColor
|
|
25
25
|
const color = getVariable(
|
|
26
26
|
(defaultColor ? theme[defaultColor] : undefined) ||
|
|
27
|
-
|
|
27
|
+
style.color ||
|
|
28
28
|
(!props.disableTheme ? theme.color : null) ||
|
|
29
29
|
opts.fallbackColor
|
|
30
30
|
)
|