@tamagui/web 1.88.21 → 1.88.23
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/esm/Tamagui.native.js +14 -41
- package/dist/esm/Tamagui.native.js.map +1 -1
- package/dist/esm/config.native.js +4 -40
- package/dist/esm/config.native.js.map +1 -1
- package/dist/esm/constants/accessibilityDirectMap.native.js +2 -27
- package/dist/esm/constants/accessibilityDirectMap.native.js.map +1 -1
- package/dist/esm/constants/constants.native.js +2 -26
- package/dist/esm/constants/constants.native.js.map +1 -1
- package/dist/esm/constants/isDevTools.native.js +2 -23
- package/dist/esm/constants/isDevTools.native.js.map +1 -1
- package/dist/esm/contexts/ComponentContext.native.js +4 -25
- package/dist/esm/contexts/ComponentContext.native.js.map +1 -1
- package/dist/esm/createComponent.native.js +108 -100
- package/dist/esm/createComponent.native.js.map +2 -2
- package/dist/esm/createFont.native.js +2 -23
- package/dist/esm/createFont.native.js.map +1 -1
- package/dist/esm/createShorthands.native.js +2 -23
- package/dist/esm/createShorthands.native.js.map +1 -1
- package/dist/esm/createTamagui.native.js +33 -40
- package/dist/esm/createTamagui.native.js.map +1 -1
- package/dist/esm/createTheme.native.js +2 -23
- package/dist/esm/createTheme.native.js.map +1 -1
- package/dist/esm/createTokens.native.js +4 -25
- package/dist/esm/createTokens.native.js.map +1 -1
- package/dist/esm/createVariable.native.js +10 -38
- package/dist/esm/createVariable.native.js.map +1 -1
- package/dist/esm/createVariables.native.js +7 -27
- package/dist/esm/createVariables.native.js.map +1 -1
- package/dist/esm/defaultComponentState.native.js +2 -25
- package/dist/esm/defaultComponentState.native.js.map +1 -1
- package/dist/esm/helpers/ThemeManager.native.js +12 -33
- package/dist/esm/helpers/ThemeManager.native.js.map +2 -2
- package/dist/esm/helpers/ThemeManagerContext.native.js +4 -25
- package/dist/esm/helpers/ThemeManagerContext.native.js.map +1 -1
- package/dist/esm/helpers/createMediaStyle.native.js +8 -28
- package/dist/esm/helpers/createMediaStyle.native.js.map +1 -1
- package/dist/esm/helpers/createShallowSetState.native.js +2 -25
- package/dist/esm/helpers/createShallowSetState.native.js.map +1 -1
- package/dist/esm/helpers/createStyledContext.native.js +11 -30
- package/dist/esm/helpers/createStyledContext.native.js.map +1 -1
- package/dist/esm/helpers/defaultOffset.native.js +2 -23
- package/dist/esm/helpers/defaultOffset.native.js.map +1 -1
- package/dist/esm/helpers/expandStyle.native.js +5 -26
- package/dist/esm/helpers/expandStyle.native.js.map +1 -1
- package/dist/esm/helpers/expandStyles.native.js +6 -26
- package/dist/esm/helpers/expandStyles.native.js.map +1 -1
- package/dist/esm/helpers/getExpandedShorthands.native.js +4 -25
- package/dist/esm/helpers/getExpandedShorthands.native.js.map +1 -1
- package/dist/esm/helpers/getFontLanguage.native.js +2 -23
- package/dist/esm/helpers/getFontLanguage.native.js.map +1 -1
- package/dist/esm/helpers/getGroupPropParts.native.js +4 -25
- package/dist/esm/helpers/getGroupPropParts.native.js.map +1 -1
- package/dist/esm/helpers/getSplitStyles.native.js +108 -83
- package/dist/esm/helpers/getSplitStyles.native.js.map +2 -2
- package/dist/esm/helpers/getStylesAtomic.native.js +2 -26
- package/dist/esm/helpers/getStylesAtomic.native.js.map +1 -1
- package/dist/esm/helpers/getThemeCSSRules.native.js +2 -23
- package/dist/esm/helpers/getThemeCSSRules.native.js.map +1 -1
- package/dist/esm/helpers/getVariantExtras.native.js +4 -26
- package/dist/esm/helpers/getVariantExtras.native.js.map +1 -1
- package/dist/esm/helpers/insertStyleRule.native.js +8 -36
- package/dist/esm/helpers/insertStyleRule.native.js.map +1 -1
- package/dist/esm/helpers/isObj.native.js +2 -23
- package/dist/esm/helpers/isObj.native.js.map +1 -1
- package/dist/esm/helpers/isTamaguiComponent.native.js +2 -23
- package/dist/esm/helpers/isTamaguiComponent.native.js.map +1 -1
- package/dist/esm/helpers/isTamaguiElement.native.js +5 -25
- package/dist/esm/helpers/isTamaguiElement.native.js.map +1 -1
- package/dist/esm/helpers/log.native.js +2 -23
- package/dist/esm/helpers/log.native.js.map +1 -1
- package/dist/esm/helpers/matchMedia.native.js +2 -24
- package/dist/esm/helpers/matchMedia.native.js.map +1 -1
- package/dist/esm/helpers/mergeProps.native.js +5 -25
- package/dist/esm/helpers/mergeProps.native.js.map +1 -1
- package/dist/esm/helpers/mergeVariants.native.js +2 -23
- package/dist/esm/helpers/mergeVariants.native.js.map +1 -1
- package/dist/esm/helpers/normalizeColor.native.js +7 -29
- package/dist/esm/helpers/normalizeColor.native.js.map +2 -2
- package/dist/esm/helpers/normalizeShadow.native.js +7 -27
- package/dist/esm/helpers/normalizeShadow.native.js.map +1 -1
- package/dist/esm/helpers/normalizeStyle.native.js +11 -28
- package/dist/esm/helpers/normalizeStyle.native.js.map +1 -1
- package/dist/esm/helpers/normalizeStylePropKeys.native.js +2 -23
- package/dist/esm/helpers/normalizeStylePropKeys.native.js.map +1 -1
- package/dist/esm/helpers/normalizeValueWithProperty.native.js +9 -29
- package/dist/esm/helpers/normalizeValueWithProperty.native.js.map +1 -1
- package/dist/esm/helpers/objectIdentityKey.native.js +2 -23
- package/dist/esm/helpers/objectIdentityKey.native.js.map +1 -1
- package/dist/esm/helpers/propMapper.native.js +31 -46
- package/dist/esm/helpers/propMapper.native.js.map +1 -1
- package/dist/esm/helpers/proxyThemeToParents.native.js +4 -26
- package/dist/esm/helpers/proxyThemeToParents.native.js.map +1 -1
- package/dist/esm/helpers/proxyThemeVariables.native.js +2 -23
- package/dist/esm/helpers/proxyThemeVariables.native.js.map +1 -1
- package/dist/esm/helpers/pseudoDescriptors.native.js +2 -25
- package/dist/esm/helpers/pseudoDescriptors.native.js.map +1 -1
- package/dist/esm/helpers/registerCSSVariable.native.js +5 -28
- package/dist/esm/helpers/registerCSSVariable.native.js.map +1 -1
- package/dist/esm/helpers/skipProps.native.js +2 -23
- package/dist/esm/helpers/skipProps.native.js.map +1 -1
- package/dist/esm/helpers/themeable.native.js +12 -31
- package/dist/esm/helpers/themeable.native.js.map +1 -1
- package/dist/esm/helpers/themes.native.js +5 -26
- package/dist/esm/helpers/themes.native.js.map +1 -1
- package/dist/esm/helpers/timer.native.js +2 -23
- package/dist/esm/helpers/timer.native.js.map +1 -1
- package/dist/esm/hooks/useConfiguration.native.js +7 -26
- package/dist/esm/hooks/useConfiguration.native.js.map +1 -1
- package/dist/esm/hooks/useDisableSSR.native.js +4 -25
- package/dist/esm/hooks/useDisableSSR.native.js.map +1 -1
- package/dist/esm/hooks/useIsTouchDevice.native.js +5 -25
- package/dist/esm/hooks/useIsTouchDevice.native.js.map +1 -1
- package/dist/esm/hooks/useMedia.native.js +14 -44
- package/dist/esm/hooks/useMedia.native.js.map +1 -1
- package/dist/esm/hooks/useProps.native.js +12 -29
- package/dist/esm/hooks/useProps.native.js.map +1 -1
- package/dist/esm/hooks/useTheme.native.js +27 -47
- package/dist/esm/hooks/useTheme.native.js.map +1 -1
- package/dist/esm/hooks/useThemeName.native.js +8 -26
- package/dist/esm/hooks/useThemeName.native.js.map +1 -1
- package/dist/esm/index.native.js +79 -155
- package/dist/esm/index.native.js.map +1 -1
- package/dist/esm/inject-styles.native.js +2 -23
- package/dist/esm/inject-styles.native.js.map +1 -1
- package/dist/esm/insertFont.native.js +10 -31
- package/dist/esm/insertFont.native.js.map +1 -1
- package/dist/esm/interfaces/CSSColorNames.native.js +0 -14
- package/dist/esm/interfaces/CSSColorNames.native.js.map +2 -2
- package/dist/esm/interfaces/GetRef.native.js +0 -14
- package/dist/esm/interfaces/GetRef.native.js.map +2 -2
- package/dist/esm/interfaces/KeyTypes.native.js +0 -14
- package/dist/esm/interfaces/KeyTypes.native.js.map +2 -2
- package/dist/esm/interfaces/RNExclusiveTypes.native.js +0 -14
- package/dist/esm/interfaces/RNExclusiveTypes.native.js.map +2 -2
- package/dist/esm/interfaces/Role.native.js +0 -14
- package/dist/esm/interfaces/Role.native.js.map +2 -2
- package/dist/esm/interfaces/TamaguiComponentEvents.native.js +0 -14
- package/dist/esm/interfaces/TamaguiComponentEvents.native.js.map +2 -2
- package/dist/esm/interfaces/TamaguiComponentPropsBaseBase.native.js +0 -14
- package/dist/esm/interfaces/TamaguiComponentPropsBaseBase.native.js.map +2 -2
- package/dist/esm/interfaces/TamaguiComponentState.native.js +0 -14
- package/dist/esm/interfaces/TamaguiComponentState.native.js.map +2 -2
- package/dist/esm/interfaces/WebOnlyPressEvents.native.js +0 -14
- package/dist/esm/interfaces/WebOnlyPressEvents.native.js.map +2 -2
- package/dist/esm/internalWithTheme.native.js +6 -26
- package/dist/esm/internalWithTheme.native.js.map +1 -1
- package/dist/esm/setupHooks.native.js +2 -24
- package/dist/esm/setupHooks.native.js.map +1 -1
- package/dist/esm/setupReactNative.native.js +2 -24
- package/dist/esm/setupReactNative.native.js.map +1 -1
- package/dist/esm/styled.native.js +8 -27
- package/dist/esm/styled.native.js.map +1 -1
- package/dist/esm/type-utils.native.js +0 -14
- package/dist/esm/type-utils.native.js.map +2 -2
- package/dist/esm/types.native.js +2 -21
- package/dist/esm/types.native.js.map +1 -1
- package/dist/esm/views/Configuration.native.js +7 -26
- package/dist/esm/views/Configuration.native.js.map +1 -1
- package/dist/esm/views/FontLanguage.native.js +7 -26
- package/dist/esm/views/FontLanguage.native.js.map +1 -1
- package/dist/esm/views/FontLanguage.types.native.js +0 -14
- package/dist/esm/views/FontLanguage.types.native.js.map +2 -2
- package/dist/esm/views/Slot.native.js +15 -33
- package/dist/esm/views/Slot.native.js.map +1 -1
- package/dist/esm/views/Stack.native.js +8 -27
- package/dist/esm/views/Stack.native.js.map +1 -1
- package/dist/esm/views/TamaguiProvider.native.js +11 -35
- package/dist/esm/views/TamaguiProvider.native.js.map +1 -1
- package/dist/esm/views/Text.native.js +7 -27
- package/dist/esm/views/Text.native.js.map +1 -1
- package/dist/esm/views/Theme.native.js +23 -47
- package/dist/esm/views/Theme.native.js.map +2 -2
- package/dist/esm/views/ThemeDebug.native.js +2 -23
- package/dist/esm/views/ThemeDebug.native.js.map +1 -1
- package/dist/esm/views/ThemeProvider.native.js +11 -28
- package/dist/esm/views/ThemeProvider.native.js.map +2 -2
- package/dist/esm/views/View.native.js +8 -27
- package/dist/esm/views/View.native.js.map +1 -1
- package/package.json +10 -10
|
@@ -1,31 +1,12 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __export = (target, all) => {
|
|
7
|
-
for (var name in all)
|
|
8
|
-
__defProp(target, name, { get: all[name], enumerable: !0 });
|
|
9
|
-
}, __copyProps = (to, from, except, desc) => {
|
|
10
|
-
if (from && typeof from == "object" || typeof from == "function")
|
|
11
|
-
for (let key of __getOwnPropNames(from))
|
|
12
|
-
!__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
13
|
-
return to;
|
|
14
|
-
};
|
|
15
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
|
|
16
|
-
var Configuration_exports = {};
|
|
17
|
-
__export(Configuration_exports, {
|
|
18
|
-
Configuration: () => Configuration
|
|
19
|
-
});
|
|
20
|
-
module.exports = __toCommonJS(Configuration_exports);
|
|
21
|
-
var import_react = require("react"), import_ComponentContext = require("../contexts/ComponentContext"), import_jsx_runtime = require("react/jsx-runtime");
|
|
1
|
+
import { useContext } from "react";
|
|
2
|
+
import { ComponentContext } from "../contexts/ComponentContext";
|
|
3
|
+
import { jsx } from "react/jsx-runtime";
|
|
22
4
|
const Configuration = (props) => {
|
|
23
|
-
const current =
|
|
24
|
-
return /* @__PURE__ */
|
|
5
|
+
const current = useContext(ComponentContext);
|
|
6
|
+
return /* @__PURE__ */ jsx(ComponentContext.Provider, { ...current, ...props });
|
|
25
7
|
};
|
|
26
8
|
Configuration.displayName = "Configuration";
|
|
27
|
-
|
|
28
|
-
0 && (module.exports = {
|
|
9
|
+
export {
|
|
29
10
|
Configuration
|
|
30
|
-
}
|
|
11
|
+
};
|
|
31
12
|
//# sourceMappingURL=Configuration.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/views/Configuration.tsx"],
|
|
4
|
-
"mappings": "
|
|
4
|
+
"mappings": "AAAA,SAAS,kBAAkB;AAE3B,SAAS,wBAAwB;AAUxB;AAFF,MAAM,gBAAgB,CAAC,UAA8B;AAC1D,QAAM,UAAU,WAAW,gBAAgB;AAC3C,SAAO,oBAAC,iBAAiB,UAAjB,EAA2B,GAAG,SAAU,GAAG,OAAO;AAC5D;AAEA,cAAc,cAAiB;",
|
|
5
5
|
"names": []
|
|
6
6
|
}
|
|
@@ -1,31 +1,12 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __export = (target, all) => {
|
|
7
|
-
for (var name in all)
|
|
8
|
-
__defProp(target, name, { get: all[name], enumerable: !0 });
|
|
9
|
-
}, __copyProps = (to, from, except, desc) => {
|
|
10
|
-
if (from && typeof from == "object" || typeof from == "function")
|
|
11
|
-
for (let key of __getOwnPropNames(from))
|
|
12
|
-
!__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
13
|
-
return to;
|
|
14
|
-
};
|
|
15
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
|
|
16
|
-
var FontLanguage_native_exports = {};
|
|
17
|
-
__export(FontLanguage_native_exports, {
|
|
18
|
-
FontLanguage: () => FontLanguage
|
|
19
|
-
});
|
|
20
|
-
module.exports = __toCommonJS(FontLanguage_native_exports);
|
|
21
|
-
var import_react = require("react"), import_ComponentContext = require("../contexts/ComponentContext"), import_jsx_runtime = require("react/jsx-runtime");
|
|
1
|
+
import { useMemo } from "react";
|
|
2
|
+
import { ComponentContext } from "../contexts/ComponentContext";
|
|
3
|
+
import { jsx } from "react/jsx-runtime";
|
|
22
4
|
const FontLanguage = ({ children, ...props }) => {
|
|
23
|
-
const language =
|
|
24
|
-
return /* @__PURE__ */
|
|
5
|
+
const language = useMemo(() => props, [JSON.stringify(props)]);
|
|
6
|
+
return /* @__PURE__ */ jsx(ComponentContext.Provider, { language, children });
|
|
25
7
|
};
|
|
26
8
|
FontLanguage.displayName = "FontLanguage";
|
|
27
|
-
|
|
28
|
-
0 && (module.exports = {
|
|
9
|
+
export {
|
|
29
10
|
FontLanguage
|
|
30
|
-
}
|
|
11
|
+
};
|
|
31
12
|
//# sourceMappingURL=FontLanguage.native.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/views/FontLanguage.native.tsx"],
|
|
4
|
-
"mappings": "
|
|
4
|
+
"mappings": "AAAA,SAAS,eAAe;AAExB,SAAS,wBAAwB;AAM7B;AAHG,MAAM,eAAe,CAAC,EAAE,UAAU,GAAG,MAAM,MAAyB;AACzE,QAAM,WAAW,QAAQ,MAAM,OAAO,CAAC,KAAK,UAAU,KAAK,CAAC,CAAC;AAC7D,SACE,oBAAC,iBAAiB,UAAjB,EAA0B,UAAqB,UAAS;AAE7D;AAEA,aAAa,cAAiB;",
|
|
5
5
|
"names": []
|
|
6
6
|
}
|
|
@@ -1,15 +1 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __copyProps = (to, from, except, desc) => {
|
|
7
|
-
if (from && typeof from == "object" || typeof from == "function")
|
|
8
|
-
for (let key of __getOwnPropNames(from))
|
|
9
|
-
!__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
10
|
-
return to;
|
|
11
|
-
};
|
|
12
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
|
|
13
|
-
var FontLanguage_types_exports = {};
|
|
14
|
-
module.exports = __toCommonJS(FontLanguage_types_exports);
|
|
15
1
|
//# sourceMappingURL=FontLanguage.types.js.map
|
|
@@ -1,43 +1,26 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
for (var name in all)
|
|
8
|
-
__defProp(target, name, { get: all[name], enumerable: !0 });
|
|
9
|
-
}, __copyProps = (to, from, except, desc) => {
|
|
10
|
-
if (from && typeof from == "object" || typeof from == "function")
|
|
11
|
-
for (let key of __getOwnPropNames(from))
|
|
12
|
-
!__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
13
|
-
return to;
|
|
14
|
-
};
|
|
15
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
|
|
16
|
-
var Slot_exports = {};
|
|
17
|
-
__export(Slot_exports, {
|
|
18
|
-
Slot: () => Slot,
|
|
19
|
-
Slottable: () => Slottable
|
|
20
|
-
});
|
|
21
|
-
module.exports = __toCommonJS(Slot_exports);
|
|
22
|
-
var import_compose_refs = require("@tamagui/compose-refs"), import_constants = require("@tamagui/constants"), import_helpers = require("@tamagui/helpers"), import_react = require("react"), import_jsx_runtime = require("react/jsx-runtime");
|
|
23
|
-
const Slot = (0, import_react.forwardRef)(function(props, forwardedRef) {
|
|
1
|
+
import { composeRefs } from "@tamagui/compose-refs";
|
|
2
|
+
import { isWeb } from "@tamagui/constants";
|
|
3
|
+
import { composeEventHandlers } from "@tamagui/helpers";
|
|
4
|
+
import { Children, cloneElement, forwardRef, isValidElement } from "react";
|
|
5
|
+
import { Fragment, jsx } from "react/jsx-runtime";
|
|
6
|
+
const Slot = forwardRef(function(props, forwardedRef) {
|
|
24
7
|
const { children, ...slotProps } = props;
|
|
25
|
-
if (
|
|
8
|
+
if (isValidElement(children)) {
|
|
26
9
|
const mergedProps = mergeSlotProps(children, slotProps);
|
|
27
|
-
return
|
|
10
|
+
return cloneElement(
|
|
28
11
|
children,
|
|
29
12
|
children.type.avoidForwardRef ? mergedProps : {
|
|
30
13
|
...mergedProps,
|
|
31
|
-
ref:
|
|
14
|
+
ref: composeRefs(forwardedRef, children.ref)
|
|
32
15
|
}
|
|
33
16
|
);
|
|
34
17
|
}
|
|
35
|
-
return
|
|
18
|
+
return Children.count(children) > 1 ? Children.only(null) : null;
|
|
36
19
|
});
|
|
37
20
|
Slot.displayName = "Slot";
|
|
38
|
-
const Slottable = ({ children }) => /* @__PURE__ */
|
|
21
|
+
const Slottable = ({ children }) => /* @__PURE__ */ jsx(Fragment, { children });
|
|
39
22
|
Slottable.displayName = "Slottable";
|
|
40
|
-
const pressMap =
|
|
23
|
+
const pressMap = isWeb ? {
|
|
41
24
|
onPress: "onClick",
|
|
42
25
|
onPressOut: "onMouseUp",
|
|
43
26
|
onPressIn: "onMouseDown"
|
|
@@ -49,14 +32,13 @@ function mergeSlotProps(child, slotProps) {
|
|
|
49
32
|
key in slotProps && (slotProps[pressMap[key]] = slotProps[key], delete slotProps[key]);
|
|
50
33
|
for (let propName in childProps) {
|
|
51
34
|
const slotPropValue = slotProps[propName], childPropValue = childProps[propName];
|
|
52
|
-
isHTMLChild && propName in pressMap && (propName = pressMap[propName], delete overrideProps[propName]), handleRegex.test(propName) ? overrideProps[propName] =
|
|
35
|
+
isHTMLChild && propName in pressMap && (propName = pressMap[propName], delete overrideProps[propName]), handleRegex.test(propName) ? overrideProps[propName] = composeEventHandlers(childPropValue, slotPropValue) : propName === "style" ? overrideProps[propName] = { ...slotPropValue, ...childPropValue } : propName === "className" && (overrideProps[propName] = [slotPropValue, childPropValue].filter(Boolean).join(" "));
|
|
53
36
|
}
|
|
54
37
|
return { ...slotProps, ...overrideProps };
|
|
55
38
|
}
|
|
56
39
|
const handleRegex = /^on[A-Z]/;
|
|
57
|
-
|
|
58
|
-
0 && (module.exports = {
|
|
40
|
+
export {
|
|
59
41
|
Slot,
|
|
60
42
|
Slottable
|
|
61
|
-
}
|
|
43
|
+
};
|
|
62
44
|
//# sourceMappingURL=Slot.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/views/Slot.tsx"],
|
|
4
|
-
"mappings": "
|
|
4
|
+
"mappings": "AAEA,SAAS,mBAAmB;AAC5B,SAAS,aAAa;AACtB,SAAS,4BAA4B;AAErC,SAAS,UAAU,cAAc,YAAY,sBAAsB;AAoC1D;AA1BF,MAAM,OAAO,WAA2B,SAAc,OAAO,cAAc;AAChF,QAAM,EAAE,UAAU,GAAG,UAAU,IAAI;AAEnC,MAAI,eAAe,QAAQ,GAAG;AAC5B,UAAM,cAAc,eAAe,UAAU,SAAS;AACtD,WAAO;AAAA,MACL;AAAA,MACA,SAAS,KAAK,kBACV,cACA;AAAA,QACE,GAAG;AAAA,QACH,KAAK,YAAY,cAAe,SAAiB,GAAG;AAAA,MACtD;AAAA,IACN;AAAA,EACF;AAEA,SAAO,SAAS,MAAM,QAAQ,IAAI,IAAI,SAAS,KAAK,IAAI,IAAI;AAC9D,CAAC;AAED,KAAK,cAAiB;AAMf,MAAM,YAAY,CAAC,EAAE,SAAS,MAC5B,gCAAG,UAAS;AAGrB,UAAU,cAAiB;AAI3B,MAAM,WAAW,QACb;AAAA,EACE,SAAS;AAAA,EACT,YAAY;AAAA,EACZ,WAAW;AACb,IACA,CAAC;AAEL,SAAS,eAAe,OAAY,WAAgC;AAClE,QAAM,aAAa,MAAM,OAGnB,gBAAgB,EAAE,GAAG,WAAW,GAChC,cAAc,OAAO,MAAM,QAAS;AAE1C,MAAI;AACF,eAAW,OAAO;AAChB,MAAI,OAAO,cACT,UAAU,SAAS,GAAG,CAAC,IAAI,UAAU,GAAG,GACxC,OAAO,UAAU,GAAG;AAK1B,WAAS,YAAY,YAAY;AAC/B,UAAM,gBAAgB,UAAU,QAAQ,GAClC,iBAAiB,WAAW,QAAQ;AAE1C,IAAI,eAAe,YAAY,aAC7B,WAAW,SAAS,QAAQ,GAC5B,OAAO,cAAc,QAAQ,IAGb,YAAY,KAAK,QAAQ,IAGzC,cAAc,QAAQ,IAAI,qBAAqB,gBAAgB,aAAa,IAGrE,aAAa,UACpB,cAAc,QAAQ,IAAI,EAAE,GAAG,eAAe,GAAG,eAAe,IACvD,aAAa,gBACtB,cAAc,QAAQ,IAAI,CAAC,eAAe,cAAc,EAAE,OAAO,OAAO,EAAE,KAAK,GAAG;AAAA,EAEtF;AAEA,SAAO,EAAE,GAAG,WAAW,GAAG,cAAc;AAC1C;AAEA,MAAM,cAAc;",
|
|
5
5
|
"names": []
|
|
6
6
|
}
|
|
@@ -1,32 +1,13 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __export = (target, all) => {
|
|
7
|
-
for (var name in all)
|
|
8
|
-
__defProp(target, name, { get: all[name], enumerable: !0 });
|
|
9
|
-
}, __copyProps = (to, from, except, desc) => {
|
|
10
|
-
if (from && typeof from == "object" || typeof from == "function")
|
|
11
|
-
for (let key of __getOwnPropNames(from))
|
|
12
|
-
!__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
13
|
-
return to;
|
|
14
|
-
};
|
|
15
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
|
|
16
|
-
var Stack_exports = {};
|
|
17
|
-
__export(Stack_exports, {
|
|
18
|
-
Stack: () => Stack
|
|
19
|
-
});
|
|
20
|
-
module.exports = __toCommonJS(Stack_exports);
|
|
21
|
-
var import_helpers = require("@tamagui/helpers"), import_constants = require("../constants/constants"), import_createComponent = require("../createComponent");
|
|
22
|
-
const Stack = (0, import_createComponent.createComponent)({
|
|
1
|
+
import { validStyles } from "@tamagui/helpers";
|
|
2
|
+
import { stackDefaultStyles } from "../constants/constants";
|
|
3
|
+
import { createComponent } from "../createComponent";
|
|
4
|
+
const Stack = createComponent({
|
|
23
5
|
acceptsClassName: !0,
|
|
24
|
-
defaultProps:
|
|
25
|
-
validStyles
|
|
6
|
+
defaultProps: stackDefaultStyles,
|
|
7
|
+
validStyles
|
|
26
8
|
});
|
|
27
9
|
Stack.displayName = "Stack";
|
|
28
|
-
|
|
29
|
-
0 && (module.exports = {
|
|
10
|
+
export {
|
|
30
11
|
Stack
|
|
31
|
-
}
|
|
12
|
+
};
|
|
32
13
|
//# sourceMappingURL=Stack.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/views/Stack.tsx"],
|
|
4
|
-
"mappings": "
|
|
4
|
+
"mappings": "AAAA,SAAS,mBAAmB;AAE5B,SAAS,0BAA0B;AACnC,SAAS,uBAAuB;AAUzB,MAAM,QAAQ,gBAKnB;AAAA,EACA,kBAAkB;AAAA,EAClB,cAAc;AAAA,EACd;AACF,CAAC;AAED,MAAM,cAAiB;",
|
|
5
5
|
"names": []
|
|
6
6
|
}
|
|
@@ -1,47 +1,24 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
var __export = (target, all) => {
|
|
8
|
-
for (var name in all)
|
|
9
|
-
__defProp(target, name, { get: all[name], enumerable: !0 });
|
|
10
|
-
}, __copyProps = (to, from, except, desc) => {
|
|
11
|
-
if (from && typeof from == "object" || typeof from == "function")
|
|
12
|
-
for (let key of __getOwnPropNames(from))
|
|
13
|
-
!__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
-
return to;
|
|
15
|
-
};
|
|
16
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
17
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
18
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
19
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
20
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
21
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: !0 }) : target,
|
|
22
|
-
mod
|
|
23
|
-
)), __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
|
|
24
|
-
var TamaguiProvider_exports = {};
|
|
25
|
-
__export(TamaguiProvider_exports, {
|
|
26
|
-
TamaguiProvider: () => TamaguiProvider
|
|
27
|
-
});
|
|
28
|
-
module.exports = __toCommonJS(TamaguiProvider_exports);
|
|
29
|
-
var import_constants = require("@tamagui/constants"), React = __toESM(require("react")), import_ComponentContext = require("../contexts/ComponentContext"), import_useMedia = require("../hooks/useMedia"), import_ThemeProvider = require("./ThemeProvider"), import_jsx_runtime = require("react/jsx-runtime");
|
|
1
|
+
import { isClient } from "@tamagui/constants";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
import { ComponentContext } from "../contexts/ComponentContext";
|
|
4
|
+
import { setupMediaListeners } from "../hooks/useMedia";
|
|
5
|
+
import { ThemeProvider } from "./ThemeProvider";
|
|
6
|
+
import { jsx } from "react/jsx-runtime";
|
|
30
7
|
function TamaguiProvider({
|
|
31
8
|
children,
|
|
32
9
|
disableInjectCSS,
|
|
33
10
|
config,
|
|
34
11
|
...themePropsProvider
|
|
35
12
|
}) {
|
|
36
|
-
return
|
|
13
|
+
return setupMediaListeners(), isClient && React.useLayoutEffect(() => {
|
|
37
14
|
if (config && (config.disableSSR || document.documentElement.classList.contains("t_unmounted") && document.documentElement.classList.remove("t_unmounted"), !disableInjectCSS)) {
|
|
38
15
|
const style = document.createElement("style");
|
|
39
16
|
return style.appendChild(document.createTextNode(config.getCSS())), document.head.appendChild(style), () => {
|
|
40
17
|
document.head.removeChild(style);
|
|
41
18
|
};
|
|
42
19
|
}
|
|
43
|
-
}, [config, disableInjectCSS]), /* @__PURE__ */
|
|
44
|
-
|
|
20
|
+
}, [config, disableInjectCSS]), /* @__PURE__ */ jsx(ComponentContext.Provider, { animationDriver: config == null ? void 0 : config.animations, children: /* @__PURE__ */ jsx(
|
|
21
|
+
ThemeProvider,
|
|
45
22
|
{
|
|
46
23
|
themeClassNameOnRoot: config == null ? void 0 : config.themeClassNameOnRoot,
|
|
47
24
|
disableRootThemeClass: config == null ? void 0 : config.disableRootThemeClass,
|
|
@@ -52,8 +29,7 @@ function TamaguiProvider({
|
|
|
52
29
|
) });
|
|
53
30
|
}
|
|
54
31
|
TamaguiProvider.displayName = "TamaguiProvider";
|
|
55
|
-
|
|
56
|
-
0 && (module.exports = {
|
|
32
|
+
export {
|
|
57
33
|
TamaguiProvider
|
|
58
|
-
}
|
|
34
|
+
};
|
|
59
35
|
//# sourceMappingURL=TamaguiProvider.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/views/TamaguiProvider.tsx"],
|
|
4
|
-
"mappings": "
|
|
4
|
+
"mappings": "AAAA,SAAS,gBAAgB;AACzB,YAAY,WAAW;AAEvB,SAAS,wBAAwB;AACjC,SAAS,2BAA2B;AAEpC,SAAS,qBAAqB;AAoCxB;AAlCC,SAAS,gBAAgB;AAAA,EAC9B;AAAA,EACA;AAAA,EACA;AAAA,EACA,GAAG;AACL,GAAyB;AACvB,6BAAoB,GAEhB,YAGF,MAAM,gBAAgB,MAAM;AAC1B,QAAK,WACA,OAAO,cAGN,SAAS,gBAAgB,UAAU,SAAS,aAAa,KAC3D,SAAS,gBAAgB,UAAU,OAAO,aAAa,GAIvD,CAAC,mBAAkB;AACrB,YAAM,QAAQ,SAAS,cAAc,OAAO;AAC5C,mBAAM,YAAY,SAAS,eAAe,OAAO,OAAO,CAAC,CAAC,GAC1D,SAAS,KAAK,YAAY,KAAK,GACxB,MAAM;AACX,iBAAS,KAAK,YAAY,KAAK;AAAA,MACjC;AAAA,IACF;AAAA,EACF,GAAG,CAAC,QAAQ,gBAAgB,CAAC,GAI7B,oBAAC,iBAAiB,UAAjB,EAA0B,iBAAiB,iCAAQ,YAClD;AAAA,IAAC;AAAA;AAAA,MACC,sBAAsB,iCAAQ;AAAA,MAC9B,uBAAuB,iCAAQ;AAAA,MAC9B,GAAG;AAAA,MACJ,cACE,mBAAmB,iBAAiB,SAAS,OAAO,KAAK,OAAO,MAAM,EAAE,CAAC,IAAI;AAAA,MAG9E;AAAA;AAAA,EACH,GACF;AAEJ;AAEA,gBAAgB,cAAiB;",
|
|
5
5
|
"names": []
|
|
6
6
|
}
|
|
@@ -1,28 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __export = (target, all) => {
|
|
7
|
-
for (var name in all)
|
|
8
|
-
__defProp(target, name, { get: all[name], enumerable: !0 });
|
|
9
|
-
}, __copyProps = (to, from, except, desc) => {
|
|
10
|
-
if (from && typeof from == "object" || typeof from == "function")
|
|
11
|
-
for (let key of __getOwnPropNames(from))
|
|
12
|
-
!__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
13
|
-
return to;
|
|
14
|
-
};
|
|
15
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
|
|
16
|
-
var Text_exports = {};
|
|
17
|
-
__export(Text_exports, {
|
|
18
|
-
Text: () => Text
|
|
19
|
-
});
|
|
20
|
-
module.exports = __toCommonJS(Text_exports);
|
|
21
|
-
var import_helpers = require("@tamagui/helpers"), import_createComponent = require("../createComponent");
|
|
1
|
+
import { stylePropsTextOnly, validStyles } from "@tamagui/helpers";
|
|
2
|
+
import { createComponent } from "../createComponent";
|
|
22
3
|
const ellipsisStyle = {
|
|
23
4
|
numberOfLines: 1,
|
|
24
5
|
lineBreakMode: "clip"
|
|
25
|
-
}, Text =
|
|
6
|
+
}, Text = createComponent({
|
|
26
7
|
acceptsClassName: !0,
|
|
27
8
|
isText: !0,
|
|
28
9
|
defaultProps: {
|
|
@@ -46,13 +27,12 @@ const ellipsisStyle = {
|
|
|
46
27
|
}
|
|
47
28
|
},
|
|
48
29
|
validStyles: {
|
|
49
|
-
...
|
|
50
|
-
...
|
|
30
|
+
...validStyles,
|
|
31
|
+
...stylePropsTextOnly
|
|
51
32
|
}
|
|
52
33
|
});
|
|
53
34
|
Text.displayName = "Text";
|
|
54
|
-
|
|
55
|
-
0 && (module.exports = {
|
|
35
|
+
export {
|
|
56
36
|
Text
|
|
57
|
-
}
|
|
37
|
+
};
|
|
58
38
|
//# sourceMappingURL=Text.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/views/Text.tsx"],
|
|
4
|
-
"mappings": "
|
|
4
|
+
"mappings": "AAAA,SAAS,oBAAoB,mBAAmB;AAEhD,SAAS,uBAAuB;AAwBhC,MAAM,gBAGA;AAAA,EACE,eAAe;AAAA,EACf,eAAe;AACjB,GAEO,OAAO,gBAKlB;AAAA,EACA,kBAAkB;AAAA,EAClB,QAAQ;AAAA,EAER,cAAc;AAAA,IACZ,YAAY;AAAA,IAIN,sBAAsB;AAAA,EAE9B;AAAA,EAEA,uBAAuB,oBAAI,IAAI,CAAC,YAAY,CAAC;AAAA,EAE7C,UAAU;AAAA;AAAA,IAkBR,eAAe;AAAA,MACb,OAAO,MAAM;AAAA,IACf;AAAA;AAAA;AAAA;AAAA,IAkBA,SAAS;AAAA,MACP,MAAM;AAAA,IACR;AAAA,IAEA,UAAU;AAAA,MACR,MAAM;AAAA,IACR;AAAA,EACF;AAAA,EAEA,aAAa;AAAA,IACX,GAAG;AAAA,IACH,GAAG;AAAA,EACL;AACF,CAAC;AAED,KAAK,cAAiB;",
|
|
5
5
|
"names": []
|
|
6
6
|
}
|
|
@@ -1,47 +1,24 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
__defProp(target, name, { get: all[name], enumerable: !0 });
|
|
10
|
-
}, __copyProps = (to, from, except, desc) => {
|
|
11
|
-
if (from && typeof from == "object" || typeof from == "function")
|
|
12
|
-
for (let key of __getOwnPropNames(from))
|
|
13
|
-
!__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
-
return to;
|
|
15
|
-
};
|
|
16
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
17
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
18
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
19
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
20
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
21
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: !0 }) : target,
|
|
22
|
-
mod
|
|
23
|
-
)), __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
|
|
24
|
-
var Theme_exports = {};
|
|
25
|
-
__export(Theme_exports, {
|
|
26
|
-
Theme: () => Theme,
|
|
27
|
-
getThemedChildren: () => getThemedChildren
|
|
28
|
-
});
|
|
29
|
-
module.exports = __toCommonJS(Theme_exports);
|
|
30
|
-
var import_constants = require("@tamagui/constants"), import_react = __toESM(require("react")), import_createVariable = require("../createVariable"), import_ThemeManagerContext = require("../helpers/ThemeManagerContext"), import_useTheme = require("../hooks/useTheme"), import_ThemeDebug = require("./ThemeDebug"), import_jsx_runtime = require("react/jsx-runtime");
|
|
31
|
-
const Theme = (0, import_react.forwardRef)(function({ children, ...props }, ref) {
|
|
1
|
+
import { isWeb } from "@tamagui/constants";
|
|
2
|
+
import React, { Children, cloneElement, forwardRef, isValidElement, useRef } from "react";
|
|
3
|
+
import { variableToString } from "../createVariable";
|
|
4
|
+
import { ThemeManagerIDContext } from "../helpers/ThemeManagerContext";
|
|
5
|
+
import { useChangeThemeEffect } from "../hooks/useTheme";
|
|
6
|
+
import { ThemeDebug } from "./ThemeDebug";
|
|
7
|
+
import { jsx } from "react/jsx-runtime";
|
|
8
|
+
const Theme = forwardRef(function({ children, ...props }, ref) {
|
|
32
9
|
if (props.disable)
|
|
33
10
|
return children;
|
|
34
|
-
const isRoot = !!props._isRoot, themeState =
|
|
35
|
-
let finalChildren = props["disable-child-theme"] ?
|
|
11
|
+
const isRoot = !!props._isRoot, themeState = useChangeThemeEffect(props, isRoot);
|
|
12
|
+
let finalChildren = props["disable-child-theme"] ? Children.map(
|
|
36
13
|
children,
|
|
37
|
-
(child) =>
|
|
14
|
+
(child) => cloneElement(child, { "data-disable-theme": !0 })
|
|
38
15
|
) : children;
|
|
39
16
|
if (ref)
|
|
40
17
|
try {
|
|
41
|
-
|
|
18
|
+
React.Children.only(finalChildren), finalChildren = cloneElement(finalChildren, { ref });
|
|
42
19
|
} catch {
|
|
43
20
|
}
|
|
44
|
-
return process.env.NODE_ENV === "development" && props.debug === "visualize" && (finalChildren = /* @__PURE__ */
|
|
21
|
+
return process.env.NODE_ENV === "development" && props.debug === "visualize" && (finalChildren = /* @__PURE__ */ jsx(ThemeDebug, { themeState, themeProps: props, children: finalChildren })), getThemedChildren(themeState, finalChildren, props, isRoot);
|
|
45
22
|
});
|
|
46
23
|
Theme.displayName = "Theme";
|
|
47
24
|
Theme.avoidForwardRef = !0;
|
|
@@ -51,17 +28,17 @@ function getThemedChildren(themeState, children, props, isRoot = !1) {
|
|
|
51
28
|
throw new Error(
|
|
52
29
|
process.env.NODE_ENV === "development" ? "\u274C No theme found, either incorrect name, potential duplicate tamagui deps, or TamaguiProvider not providing themes." : "\u274C 005"
|
|
53
30
|
);
|
|
54
|
-
const { shallow, forceClassName } = props, hasEverThemed =
|
|
31
|
+
const { shallow, forceClassName } = props, hasEverThemed = useRef(!1), shouldRenderChildrenWithTheme = isNewTheme || props.inverse || hasEverThemed.current || forceClassName || isRoot;
|
|
55
32
|
if (shouldRenderChildrenWithTheme && (hasEverThemed.current = !0), !shouldRenderChildrenWithTheme)
|
|
56
33
|
return children;
|
|
57
34
|
let next = children;
|
|
58
|
-
shallow && (next =
|
|
35
|
+
shallow && (next = Children.toArray(children).map((child) => isValidElement(child) ? cloneElement(
|
|
59
36
|
child,
|
|
60
37
|
void 0,
|
|
61
|
-
/* @__PURE__ */
|
|
38
|
+
/* @__PURE__ */ jsx(Theme, { name: themeManager.state.parentName, children: child.props.children })
|
|
62
39
|
) : child));
|
|
63
|
-
const elementsWithContext = /* @__PURE__ */
|
|
64
|
-
return forceClassName === !1 ? elementsWithContext :
|
|
40
|
+
const elementsWithContext = /* @__PURE__ */ jsx(ThemeManagerIDContext.Provider, { value: themeManager.id, children: next });
|
|
41
|
+
return forceClassName === !1 ? elementsWithContext : isWeb ? wrapThemeElements({
|
|
65
42
|
children: elementsWithContext,
|
|
66
43
|
themeState,
|
|
67
44
|
forceClassName,
|
|
@@ -78,10 +55,10 @@ function wrapThemeElements({
|
|
|
78
55
|
if (isRoot && forceClassName === !1)
|
|
79
56
|
return children;
|
|
80
57
|
const inverse = themeState.inversed, requiresExtraWrapper = inverse != null || forceClassName, { className, style } = getThemeClassNameAndStyle(themeState, isRoot);
|
|
81
|
-
let themedChildren = /* @__PURE__ */
|
|
58
|
+
let themedChildren = /* @__PURE__ */ jsx("span", { className: `${className} _dsp_contents is_Theme`, style, children });
|
|
82
59
|
if (requiresExtraWrapper) {
|
|
83
60
|
const name = ((_a = themeState.state) == null ? void 0 : _a.name) || "", inverseClassName = name.startsWith("light") ? "t_light is_inversed" : name.startsWith("dark") ? "t_dark is_inversed" : "";
|
|
84
|
-
themedChildren = /* @__PURE__ */
|
|
61
|
+
themedChildren = /* @__PURE__ */ jsx("span", { className: `${inverse ? inverseClassName : ""} _dsp_contents`, children: themedChildren });
|
|
85
62
|
}
|
|
86
63
|
return themedChildren;
|
|
87
64
|
}
|
|
@@ -90,15 +67,14 @@ function getThemeClassNameAndStyle(themeState, isRoot = !1) {
|
|
|
90
67
|
var _a, _b;
|
|
91
68
|
if (!themeState.isNewTheme)
|
|
92
69
|
return { className: "", style: emptyObj };
|
|
93
|
-
const themeColor = (_a = themeState.state) != null && _a.theme && themeState.isNewTheme ?
|
|
70
|
+
const themeColor = (_a = themeState.state) != null && _a.theme && themeState.isNewTheme ? variableToString(themeState.state.theme.color) : "", style = themeColor ? {
|
|
94
71
|
color: themeColor
|
|
95
72
|
} : void 0;
|
|
96
73
|
let className = ((_b = themeState.state) == null ? void 0 : _b.className) || "";
|
|
97
74
|
return isRoot && (className = className.replace("t_sub_theme", "")), { style, className };
|
|
98
75
|
}
|
|
99
|
-
|
|
100
|
-
0 && (module.exports = {
|
|
76
|
+
export {
|
|
101
77
|
Theme,
|
|
102
78
|
getThemedChildren
|
|
103
|
-
}
|
|
79
|
+
};
|
|
104
80
|
//# sourceMappingURL=Theme.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/views/Theme.tsx"],
|
|
4
|
-
"mappings": "
|
|
5
|
-
"names": [
|
|
4
|
+
"mappings": "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",
|
|
5
|
+
"names": []
|
|
6
6
|
}
|
|
@@ -1,23 +1,3 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __export = (target, all) => {
|
|
7
|
-
for (var name in all)
|
|
8
|
-
__defProp(target, name, { get: all[name], enumerable: !0 });
|
|
9
|
-
}, __copyProps = (to, from, except, desc) => {
|
|
10
|
-
if (from && typeof from == "object" || typeof from == "function")
|
|
11
|
-
for (let key of __getOwnPropNames(from))
|
|
12
|
-
!__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
13
|
-
return to;
|
|
14
|
-
};
|
|
15
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
|
|
16
|
-
var ThemeDebug_native_exports = {};
|
|
17
|
-
__export(ThemeDebug_native_exports, {
|
|
18
|
-
ThemeDebug: () => ThemeDebug
|
|
19
|
-
});
|
|
20
|
-
module.exports = __toCommonJS(ThemeDebug_native_exports);
|
|
21
1
|
function ThemeDebug({
|
|
22
2
|
themeState,
|
|
23
3
|
themeProps,
|
|
@@ -26,8 +6,7 @@ function ThemeDebug({
|
|
|
26
6
|
return children;
|
|
27
7
|
}
|
|
28
8
|
ThemeDebug.displayName = "ThemeDebug";
|
|
29
|
-
|
|
30
|
-
0 && (module.exports = {
|
|
9
|
+
export {
|
|
31
10
|
ThemeDebug
|
|
32
|
-
}
|
|
11
|
+
};
|
|
33
12
|
//# sourceMappingURL=ThemeDebug.native.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/views/ThemeDebug.native.tsx"],
|
|
4
|
-
"mappings": "
|
|
4
|
+
"mappings": "AAGO,SAAS,WAAW;AAAA,EACzB;AAAA,EACA;AAAA,EACA;AACF,GAIG;AAGD,SAAO;AACT;AAEA,WAAW,cAAiB;",
|
|
5
5
|
"names": []
|
|
6
6
|
}
|