@tamagui/core 1.0.1-beta.87 → 1.0.1-beta.90
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/assignNativePropsToWeb.js +187 -0
- package/dist/cjs/assignNativePropsToWeb.js.map +7 -0
- package/dist/cjs/constants/platform.js +2 -2
- package/dist/cjs/constants/platform.js.map +2 -2
- package/dist/cjs/createComponent.js +53 -199
- package/dist/cjs/createComponent.js.map +2 -2
- package/dist/cjs/helpers/assignNativePropsToWeb.js +187 -0
- package/dist/cjs/helpers/assignNativePropsToWeb.js.map +7 -0
- package/dist/cjs/helpers/assignNativePropsToWeb.native.js +29 -0
- package/dist/cjs/helpers/assignNativePropsToWeb.native.js.map +7 -0
- package/dist/cjs/helpers/createPropMapper.js +4 -0
- package/dist/cjs/helpers/createPropMapper.js.map +2 -2
- package/dist/cjs/helpers/extendStaticConfig.js +3 -1
- package/dist/cjs/helpers/extendStaticConfig.js.map +2 -2
- package/dist/cjs/helpers/getSplitStyles.js +11 -11
- package/dist/cjs/helpers/getSplitStyles.js.map +2 -2
- package/dist/cjs/helpers/getStylesAtomic.js +4 -4
- package/dist/cjs/helpers/getStylesAtomic.js.map +2 -2
- package/dist/cjs/hooks/useFeatures.js +2 -4
- package/dist/cjs/hooks/useFeatures.js.map +2 -2
- package/dist/cjs/styled.js +0 -5
- package/dist/cjs/styled.js.map +2 -2
- package/dist/cjs/types.js.map +1 -1
- package/dist/esm/assignNativePropsToWeb.js +164 -0
- package/dist/esm/assignNativePropsToWeb.js.map +7 -0
- package/dist/esm/constants/platform.js +2 -2
- package/dist/esm/constants/platform.js.map +2 -2
- package/dist/esm/createComponent.js +50 -198
- package/dist/esm/createComponent.js.map +2 -2
- package/dist/esm/helpers/assignNativePropsToWeb.js +164 -0
- package/dist/esm/helpers/assignNativePropsToWeb.js.map +7 -0
- package/dist/esm/helpers/assignNativePropsToWeb.native.js +6 -0
- package/dist/esm/helpers/assignNativePropsToWeb.native.js.map +7 -0
- package/dist/esm/helpers/createPropMapper.js +4 -0
- package/dist/esm/helpers/createPropMapper.js.map +2 -2
- package/dist/esm/helpers/extendStaticConfig.js +3 -1
- package/dist/esm/helpers/extendStaticConfig.js.map +2 -2
- package/dist/esm/helpers/getSplitStyles.js +11 -11
- package/dist/esm/helpers/getSplitStyles.js.map +2 -2
- package/dist/esm/helpers/getStylesAtomic.js +4 -4
- package/dist/esm/helpers/getStylesAtomic.js.map +2 -2
- package/dist/esm/hooks/useFeatures.js +3 -5
- package/dist/esm/hooks/useFeatures.js.map +2 -2
- package/dist/esm/styled.js +0 -5
- package/dist/esm/styled.js.map +2 -2
- package/package.json +6 -6
- package/types/assignNativePropsToWeb.d.ts +2 -0
- package/types/assignNativePropsToWeb.d.ts.map +1 -0
- package/types/constants/platform.d.ts.map +1 -1
- package/types/constants/rnw.d.ts.map +1 -1
- package/types/createComponent.d.ts +15 -1
- package/types/createComponent.d.ts.map +1 -1
- package/types/helpers/assignNativePropsToWeb.d.ts +2 -0
- package/types/helpers/assignNativePropsToWeb.d.ts.map +1 -0
- package/types/helpers/assignNativePropsToWeb.native.d.ts +2 -0
- package/types/helpers/assignNativePropsToWeb.native.d.ts.map +1 -0
- package/types/helpers/createPropMapper.d.ts.map +1 -1
- package/types/helpers/extendStaticConfig.d.ts.map +1 -1
- package/types/helpers/getSplitStyles.d.ts +1 -4
- package/types/helpers/getSplitStyles.d.ts.map +1 -1
- package/types/helpers/getStylesAtomic.d.ts +2 -6
- package/types/helpers/getStylesAtomic.d.ts.map +1 -1
- package/types/hooks/useFeatures.d.ts.map +1 -1
- package/types/styled.d.ts.map +1 -1
- package/types/types.d.ts +3 -2
- package/types/types.d.ts.map +1 -1
- package/types/views/ThemeInverse.d.ts +1 -0
- package/types/views/ThemeInverse.d.ts.map +1 -1
- package/types/views/ThemeProvider.d.ts +1 -0
- package/types/views/ThemeProvider.d.ts.map +1 -1
|
@@ -37,7 +37,6 @@ import React, {
|
|
|
37
37
|
createElement,
|
|
38
38
|
forwardRef,
|
|
39
39
|
memo,
|
|
40
|
-
startTransition,
|
|
41
40
|
useCallback,
|
|
42
41
|
useContext,
|
|
43
42
|
useMemo,
|
|
@@ -49,6 +48,7 @@ import { getConfig, onConfiguredOnce } from "./conf";
|
|
|
49
48
|
import { stackDefaultStyles } from "./constants/constants";
|
|
50
49
|
import { isWeb, useIsomorphicLayoutEffect } from "./constants/platform";
|
|
51
50
|
import { rnw } from "./constants/rnw";
|
|
51
|
+
import { assignNativePropsToWeb } from "./helpers/assignNativePropsToWeb";
|
|
52
52
|
import { getReturnVariablesAs } from "./helpers/createPropMapper";
|
|
53
53
|
import { createShallowUpdate } from "./helpers/createShallowUpdate";
|
|
54
54
|
import { extendStaticConfig, parseStaticConfig } from "./helpers/extendStaticConfig";
|
|
@@ -461,10 +461,8 @@ function createComponent(configIn, ParentComponent) {
|
|
|
461
461
|
}
|
|
462
462
|
useIsomorphicLayoutEffect(() => {
|
|
463
463
|
if (typeof window !== "undefined" && (hasEnterStyle || props.animation)) {
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
mounted: true
|
|
467
|
-
});
|
|
464
|
+
setStateShallow({
|
|
465
|
+
mounted: true
|
|
468
466
|
});
|
|
469
467
|
}
|
|
470
468
|
internal.current.isMounted = true;
|
|
@@ -726,9 +724,11 @@ function createComponent(configIn, ParentComponent) {
|
|
|
726
724
|
}
|
|
727
725
|
return content;
|
|
728
726
|
});
|
|
729
|
-
|
|
727
|
+
if (staticConfig.componentName) {
|
|
728
|
+
component.displayName = staticConfig.componentName;
|
|
729
|
+
}
|
|
730
730
|
onConfiguredOnce((conf) => {
|
|
731
|
-
var _a, _b, _c
|
|
731
|
+
var _a, _b, _c;
|
|
732
732
|
if (process.env.IS_STATIC === "is_static") {
|
|
733
733
|
return;
|
|
734
734
|
}
|
|
@@ -739,35 +739,13 @@ function createComponent(configIn, ParentComponent) {
|
|
|
739
739
|
AnimatedView = (_c = tamaguiConfig == null ? void 0 : tamaguiConfig.animations) == null ? void 0 : _c.View;
|
|
740
740
|
initialTheme = initialTheme || proxyThemeVariables(conf.themes[conf.defaultTheme || Object.keys(conf.themes)[0]]);
|
|
741
741
|
const config = getConfig();
|
|
742
|
-
let defaultPropsIn = staticConfig.defaultProps;
|
|
742
|
+
let defaultPropsIn = staticConfig.defaultProps || {};
|
|
743
743
|
const parentNames = [...staticConfig.parentNames || [], staticConfig.componentName];
|
|
744
|
-
if (config.defaultProps && parentNames) {
|
|
745
|
-
|
|
746
|
-
let prev;
|
|
747
|
-
for (let i = 0; i < len; i++) {
|
|
748
|
-
const n = parentNames[i];
|
|
749
|
-
if (!n)
|
|
750
|
-
continue;
|
|
751
|
-
if (DefaultProps.has(n)) {
|
|
752
|
-
prev = DefaultProps.get(n);
|
|
753
|
-
continue;
|
|
754
|
-
}
|
|
755
|
-
const props = config.defaultProps[n];
|
|
756
|
-
if (!props) {
|
|
757
|
-
if (prev) {
|
|
758
|
-
DefaultProps.set(n, prev);
|
|
759
|
-
}
|
|
760
|
-
continue;
|
|
761
|
-
}
|
|
762
|
-
prev = mergeProps(prev || {}, props)[0];
|
|
763
|
-
DefaultProps.set(n, prev);
|
|
764
|
-
}
|
|
765
|
-
const ourDefaultsMerged = DefaultProps.get(staticConfig.componentName);
|
|
766
|
-
if (ourDefaultsMerged) {
|
|
767
|
-
defaultPropsIn = mergeProps(defaultPropsIn, ourDefaultsMerged)[0];
|
|
768
|
-
}
|
|
744
|
+
if (config.defaultProps && parentNames && staticConfig.componentName) {
|
|
745
|
+
defaultPropsIn = mergeConfigDefaultProps(staticConfig.componentName, defaultPropsIn, config.defaultProps, parentNames);
|
|
769
746
|
}
|
|
770
|
-
|
|
747
|
+
const debug = process.env.NODE_ENV === "development" ? defaultPropsIn["debug"] : false;
|
|
748
|
+
if (process.env.NODE_ENV === "development" && debug === "break") {
|
|
771
749
|
debugger;
|
|
772
750
|
}
|
|
773
751
|
const [parentProps, parentClassNames] = mergeProps(defaultPropsIn, {}, true);
|
|
@@ -779,8 +757,11 @@ function createComponent(configIn, ParentComponent) {
|
|
|
779
757
|
focus: false,
|
|
780
758
|
resolveVariablesAs: "both",
|
|
781
759
|
keepVariantsAsProps: true
|
|
782
|
-
}, void 0,
|
|
760
|
+
}, void 0, debug);
|
|
783
761
|
const [defaults, defaultsClassnames] = mergeProps(component.defaultProps, initialSplitStyles.viewProps, true);
|
|
762
|
+
if (debug) {
|
|
763
|
+
console.warn(defaults, component.defaultProps, initialSplitStyles);
|
|
764
|
+
}
|
|
784
765
|
initialSplitStyles.classNames = __spreadValues(__spreadValues(__spreadValues({}, parentClassNames), defaultsClassnames), initialSplitStyles.classNames);
|
|
785
766
|
defaultNativeStyle = {};
|
|
786
767
|
const validStyles2 = staticConfig.validStyles || stylePropsView;
|
|
@@ -800,14 +781,15 @@ function createComponent(configIn, ParentComponent) {
|
|
|
800
781
|
if (Object.keys(defaults).length) {
|
|
801
782
|
tamaguiDefaultProps = defaults;
|
|
802
783
|
}
|
|
803
|
-
if (process.env.NODE_ENV === "development" &&
|
|
784
|
+
if (process.env.NODE_ENV === "development" && debug) {
|
|
804
785
|
if (process.env.IS_STATIC !== "is_static") {
|
|
805
786
|
console.log(`\u{1F41B} [${staticConfig.componentName || "Component"}]`, {
|
|
806
787
|
staticConfig,
|
|
807
788
|
initialSplitStyles,
|
|
808
789
|
tamaguiDefaultProps,
|
|
809
790
|
defaultNativeStyle,
|
|
810
|
-
defaults
|
|
791
|
+
defaults,
|
|
792
|
+
defaultPropsIn
|
|
811
793
|
});
|
|
812
794
|
}
|
|
813
795
|
}
|
|
@@ -831,7 +813,6 @@ function createComponent(configIn, ParentComponent) {
|
|
|
831
813
|
};
|
|
832
814
|
return res;
|
|
833
815
|
}
|
|
834
|
-
const DefaultProps = /* @__PURE__ */ new Map();
|
|
835
816
|
const Unspaced = (props) => {
|
|
836
817
|
return props.children;
|
|
837
818
|
};
|
|
@@ -978,165 +959,6 @@ const accessibilityRoleToWebRole = {
|
|
|
978
959
|
summary: "region",
|
|
979
960
|
text: null
|
|
980
961
|
};
|
|
981
|
-
function assignNativePropsToWeb(elementType, viewProps, nativeProps) {
|
|
982
|
-
if (!viewProps.role && nativeProps.accessibilityRole) {
|
|
983
|
-
if (nativeProps.accessibilityRole === "none") {
|
|
984
|
-
viewProps.role = "presentation";
|
|
985
|
-
} else {
|
|
986
|
-
const webRole = accessibilityRoleToWebRole[nativeProps.accessibilityRole];
|
|
987
|
-
if (webRole != null) {
|
|
988
|
-
viewProps.role = webRole || nativeProps.accessibilityRole;
|
|
989
|
-
}
|
|
990
|
-
}
|
|
991
|
-
}
|
|
992
|
-
if (nativeProps.accessibilityActiveDescendant != null) {
|
|
993
|
-
viewProps["aria-activedescendant"] = nativeProps.accessibilityActiveDescendant;
|
|
994
|
-
}
|
|
995
|
-
if (nativeProps.accessibilityAtomic != null) {
|
|
996
|
-
viewProps["aria-atomic"] = nativeProps.accessibilityAtomic;
|
|
997
|
-
}
|
|
998
|
-
if (nativeProps.accessibilityAutoComplete != null) {
|
|
999
|
-
viewProps["aria-autocomplete"] = nativeProps.accessibilityAutoComplete;
|
|
1000
|
-
}
|
|
1001
|
-
if (nativeProps.accessibilityBusy != null) {
|
|
1002
|
-
viewProps["aria-busy"] = nativeProps.accessibilityBusy;
|
|
1003
|
-
}
|
|
1004
|
-
if (nativeProps.accessibilityChecked != null) {
|
|
1005
|
-
viewProps["aria-checked"] = nativeProps.accessibilityChecked;
|
|
1006
|
-
}
|
|
1007
|
-
if (nativeProps.accessibilityColumnCount != null) {
|
|
1008
|
-
viewProps["aria-colcount"] = nativeProps.accessibilityColumnCount;
|
|
1009
|
-
}
|
|
1010
|
-
if (nativeProps.accessibilityColumnIndex != null) {
|
|
1011
|
-
viewProps["aria-colindex"] = nativeProps.accessibilityColumnIndex;
|
|
1012
|
-
}
|
|
1013
|
-
if (nativeProps.accessibilityColumnSpan != null) {
|
|
1014
|
-
viewProps["aria-colspan"] = nativeProps.accessibilityColumnSpan;
|
|
1015
|
-
}
|
|
1016
|
-
if (nativeProps.accessibilityControls != null) {
|
|
1017
|
-
viewProps["aria-controls"] = processIDRefList(nativeProps.accessibilityControls);
|
|
1018
|
-
}
|
|
1019
|
-
if (nativeProps.accessibilityCurrent != null) {
|
|
1020
|
-
viewProps["aria-current"] = nativeProps.accessibilityCurrent;
|
|
1021
|
-
}
|
|
1022
|
-
if (nativeProps.accessibilityDescribedBy != null) {
|
|
1023
|
-
viewProps["aria-describedby"] = processIDRefList(nativeProps.accessibilityDescribedBy);
|
|
1024
|
-
}
|
|
1025
|
-
if (nativeProps.accessibilityDetails != null) {
|
|
1026
|
-
viewProps["aria-details"] = nativeProps.accessibilityDetails;
|
|
1027
|
-
}
|
|
1028
|
-
if (nativeProps.disabled === true) {
|
|
1029
|
-
viewProps["aria-disabled"] = true;
|
|
1030
|
-
if (elementType === "button" || elementType === "form" || elementType === "input" || elementType === "select" || elementType === "textarea") {
|
|
1031
|
-
viewProps.disabled = true;
|
|
1032
|
-
}
|
|
1033
|
-
}
|
|
1034
|
-
if (nativeProps.accessibilityErrorMessage != null) {
|
|
1035
|
-
viewProps["aria-errormessage"] = nativeProps.accessibilityErrorMessage;
|
|
1036
|
-
}
|
|
1037
|
-
if (nativeProps.accessibilityExpanded != null) {
|
|
1038
|
-
viewProps["aria-expanded"] = nativeProps.accessibilityExpanded;
|
|
1039
|
-
}
|
|
1040
|
-
if (nativeProps.accessibilityFlowTo != null) {
|
|
1041
|
-
viewProps["aria-flowto"] = processIDRefList(nativeProps.accessibilityFlowTo);
|
|
1042
|
-
}
|
|
1043
|
-
if (nativeProps.accessibilityHasPopup != null) {
|
|
1044
|
-
viewProps["aria-haspopup"] = nativeProps.accessibilityHasPopup;
|
|
1045
|
-
}
|
|
1046
|
-
if (nativeProps.accessibilityHidden === true) {
|
|
1047
|
-
viewProps["aria-hidden"] = nativeProps.accessibilityHidden;
|
|
1048
|
-
}
|
|
1049
|
-
if (nativeProps.accessibilityInvalid != null) {
|
|
1050
|
-
viewProps["aria-invalid"] = nativeProps.accessibilityInvalid;
|
|
1051
|
-
}
|
|
1052
|
-
if (nativeProps.accessibilityKeyShortcuts != null && Array.isArray(nativeProps.accessibilityKeyShortcuts)) {
|
|
1053
|
-
viewProps["aria-keyshortcuts"] = nativeProps.accessibilityKeyShortcuts.join(" ");
|
|
1054
|
-
}
|
|
1055
|
-
if (nativeProps.accessibilityLabel != null) {
|
|
1056
|
-
viewProps["aria-label"] = nativeProps.accessibilityLabel;
|
|
1057
|
-
}
|
|
1058
|
-
if (nativeProps.accessibilityLabelledBy != null) {
|
|
1059
|
-
viewProps["aria-labelledby"] = processIDRefList(nativeProps.accessibilityLabelledBy);
|
|
1060
|
-
}
|
|
1061
|
-
if (nativeProps.accessibilityLevel != null) {
|
|
1062
|
-
viewProps["aria-level"] = nativeProps.accessibilityLevel;
|
|
1063
|
-
}
|
|
1064
|
-
if (nativeProps.accessibilityLiveRegion != null) {
|
|
1065
|
-
viewProps["aria-live"] = nativeProps.accessibilityLiveRegion === "none" ? "off" : nativeProps.accessibilityLiveRegion;
|
|
1066
|
-
}
|
|
1067
|
-
if (nativeProps.accessibilityModal != null) {
|
|
1068
|
-
viewProps["aria-modal"] = nativeProps.accessibilityModal;
|
|
1069
|
-
}
|
|
1070
|
-
if (nativeProps.accessibilityMultiline != null) {
|
|
1071
|
-
viewProps["aria-multiline"] = nativeProps.accessibilityMultiline;
|
|
1072
|
-
}
|
|
1073
|
-
if (nativeProps.accessibilityMultiSelectable != null) {
|
|
1074
|
-
viewProps["aria-multiselectable"] = nativeProps.accessibilityMultiSelectable;
|
|
1075
|
-
}
|
|
1076
|
-
if (nativeProps.accessibilityOrientation != null) {
|
|
1077
|
-
viewProps["aria-orientation"] = nativeProps.accessibilityOrientation;
|
|
1078
|
-
}
|
|
1079
|
-
if (nativeProps.accessibilityOwns != null) {
|
|
1080
|
-
viewProps["aria-owns"] = processIDRefList(nativeProps.accessibilityOwns);
|
|
1081
|
-
}
|
|
1082
|
-
if (nativeProps.accessibilityPlaceholder != null) {
|
|
1083
|
-
viewProps["aria-placeholder"] = nativeProps.accessibilityPlaceholder;
|
|
1084
|
-
}
|
|
1085
|
-
if (nativeProps.accessibilityPosInSet != null) {
|
|
1086
|
-
viewProps["aria-posinset"] = nativeProps.accessibilityPosInSet;
|
|
1087
|
-
}
|
|
1088
|
-
if (nativeProps.accessibilityPressed != null) {
|
|
1089
|
-
viewProps["aria-pressed"] = nativeProps.accessibilityPressed;
|
|
1090
|
-
}
|
|
1091
|
-
if (nativeProps.accessibilityReadOnly != null) {
|
|
1092
|
-
viewProps["aria-readonly"] = nativeProps.accessibilityReadOnly;
|
|
1093
|
-
if (elementType === "input" || elementType === "select" || elementType === "textarea") {
|
|
1094
|
-
viewProps.readOnly = true;
|
|
1095
|
-
}
|
|
1096
|
-
}
|
|
1097
|
-
if (nativeProps.accessibilityRequired != null) {
|
|
1098
|
-
viewProps["aria-required"] = nativeProps.accessibilityRequired;
|
|
1099
|
-
if (elementType === "input" || elementType === "select" || elementType === "textarea") {
|
|
1100
|
-
viewProps.required = true;
|
|
1101
|
-
}
|
|
1102
|
-
}
|
|
1103
|
-
if (nativeProps.accessibilityRoleDescription != null) {
|
|
1104
|
-
viewProps["aria-roledescription"] = nativeProps.accessibilityRoleDescription;
|
|
1105
|
-
}
|
|
1106
|
-
if (nativeProps.accessibilityRowCount != null) {
|
|
1107
|
-
viewProps["aria-rowcount"] = nativeProps.accessibilityRowCount;
|
|
1108
|
-
}
|
|
1109
|
-
if (nativeProps.accessibilityRowIndex != null) {
|
|
1110
|
-
viewProps["aria-rowindex"] = nativeProps.accessibilityRowIndex;
|
|
1111
|
-
}
|
|
1112
|
-
if (nativeProps.accessibilityRowSpan != null) {
|
|
1113
|
-
viewProps["aria-rowspan"] = nativeProps.accessibilityRowSpan;
|
|
1114
|
-
}
|
|
1115
|
-
if (nativeProps.accessibilitySelected != null) {
|
|
1116
|
-
viewProps["aria-selected"] = nativeProps.accessibilitySelected;
|
|
1117
|
-
}
|
|
1118
|
-
if (nativeProps.accessibilitySetSize != null) {
|
|
1119
|
-
viewProps["aria-setsize"] = nativeProps.accessibilitySetSize;
|
|
1120
|
-
}
|
|
1121
|
-
if (nativeProps.accessibilitySort != null) {
|
|
1122
|
-
viewProps["aria-sort"] = nativeProps.accessibilitySort;
|
|
1123
|
-
}
|
|
1124
|
-
if (nativeProps.accessibilityValueMax != null) {
|
|
1125
|
-
viewProps["aria-valuemax"] = nativeProps.accessibilityValueMax;
|
|
1126
|
-
}
|
|
1127
|
-
if (nativeProps.accessibilityValueMin != null) {
|
|
1128
|
-
viewProps["aria-valuemin"] = nativeProps.accessibilityValueMin;
|
|
1129
|
-
}
|
|
1130
|
-
if (nativeProps.accessibilityValueNow != null) {
|
|
1131
|
-
viewProps["aria-valuenow"] = nativeProps.accessibilityValueNow;
|
|
1132
|
-
}
|
|
1133
|
-
if (nativeProps.accessibilityValueText != null) {
|
|
1134
|
-
viewProps["aria-valuetext"] = nativeProps.accessibilityValueText;
|
|
1135
|
-
}
|
|
1136
|
-
if (nativeProps.nativeID) {
|
|
1137
|
-
viewProps.id = nativeProps.nativeID;
|
|
1138
|
-
}
|
|
1139
|
-
}
|
|
1140
962
|
function addPseudoToStyles(styles, initialPseudos, pseudos, name, force = false) {
|
|
1141
963
|
const pseudoStyle = pseudos[name];
|
|
1142
964
|
const shouldNestObject = isWeb && name !== "enterStyle" && name !== "exitStyle";
|
|
@@ -1146,13 +968,43 @@ function addPseudoToStyles(styles, initialPseudos, pseudos, name, force = false)
|
|
|
1146
968
|
styles.push(shouldNestObject && !force ? { [name]: style } : style);
|
|
1147
969
|
}
|
|
1148
970
|
}
|
|
971
|
+
const DefaultProps = /* @__PURE__ */ new Map();
|
|
972
|
+
function mergeConfigDefaultProps(name, props, configDefaults, parentNames) {
|
|
973
|
+
const len = parentNames.length;
|
|
974
|
+
let prev;
|
|
975
|
+
for (let i = 0; i < len; i++) {
|
|
976
|
+
const n = parentNames[i];
|
|
977
|
+
if (!n)
|
|
978
|
+
continue;
|
|
979
|
+
if (DefaultProps.has(n)) {
|
|
980
|
+
prev = DefaultProps.get(n);
|
|
981
|
+
continue;
|
|
982
|
+
}
|
|
983
|
+
const props2 = configDefaults[n];
|
|
984
|
+
if (!props2) {
|
|
985
|
+
if (prev) {
|
|
986
|
+
DefaultProps.set(n, prev);
|
|
987
|
+
}
|
|
988
|
+
continue;
|
|
989
|
+
}
|
|
990
|
+
prev = mergeProps(prev || {}, props2)[0];
|
|
991
|
+
console.log("set prev", prev);
|
|
992
|
+
DefaultProps.set(n, prev);
|
|
993
|
+
}
|
|
994
|
+
const ourDefaultsMerged = DefaultProps.get(name);
|
|
995
|
+
if (ourDefaultsMerged) {
|
|
996
|
+
return mergeProps(props, ourDefaultsMerged)[0];
|
|
997
|
+
}
|
|
998
|
+
return props;
|
|
999
|
+
}
|
|
1149
1000
|
export {
|
|
1150
1001
|
AbsoluteFill,
|
|
1151
1002
|
Spacer,
|
|
1152
1003
|
Unspaced,
|
|
1153
|
-
|
|
1004
|
+
accessibilityRoleToWebRole,
|
|
1154
1005
|
createComponent,
|
|
1155
1006
|
mouseUps,
|
|
1007
|
+
processIDRefList,
|
|
1156
1008
|
spacedChildren
|
|
1157
1009
|
};
|
|
1158
1010
|
//# sourceMappingURL=createComponent.js.map
|