@tamagui/core 1.1.7 → 1.1.9
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/Tamagui.js +4 -0
- package/dist/cjs/Tamagui.js.map +1 -1
- package/dist/cjs/addTheme.js +1 -0
- package/dist/cjs/addTheme.js.map +1 -1
- package/dist/cjs/config.js.map +1 -1
- package/dist/cjs/createComponent.js +54 -27
- package/dist/cjs/createComponent.js.map +1 -1
- package/dist/cjs/createFont.js.map +1 -1
- package/dist/cjs/createTamagui.js +4 -0
- package/dist/cjs/createTamagui.js.map +2 -2
- package/dist/cjs/createTokens.web.test.js +1 -0
- package/dist/cjs/createTokens.web.test.js.map +1 -1
- package/dist/cjs/createVariable.js.map +1 -1
- package/dist/cjs/createVariables.js.map +1 -1
- package/dist/cjs/helpers/RNComponents.js +1 -0
- package/dist/cjs/helpers/RNComponents.js.map +1 -1
- package/dist/cjs/helpers/ThemeManager.js +1 -0
- package/dist/cjs/helpers/ThemeManager.js.map +1 -1
- package/dist/cjs/helpers/ThemeManager.test.js.map +1 -1
- package/dist/cjs/helpers/createMediaStyle.js.map +1 -1
- package/dist/cjs/helpers/createPropMapper.js.map +1 -1
- package/dist/cjs/helpers/expandStyle.js +2 -0
- package/dist/cjs/helpers/expandStyle.js.map +1 -1
- package/dist/cjs/helpers/expandStyles.js +2 -8
- package/dist/cjs/helpers/expandStyles.js.map +3 -3
- package/dist/cjs/helpers/extendStaticConfig.js.map +1 -1
- package/dist/cjs/helpers/getExpandedShorthands.js.map +1 -1
- package/dist/cjs/helpers/getFontLanguage.js.map +1 -1
- package/dist/cjs/helpers/getSplitStyles.js +4 -4
- package/dist/cjs/helpers/getSplitStyles.js.map +2 -2
- package/dist/cjs/helpers/getStylesAtomic.js +3 -0
- package/dist/cjs/helpers/getStylesAtomic.js.map +1 -1
- package/dist/cjs/helpers/getThemeCSSRules.js.map +1 -1
- package/dist/cjs/helpers/getVariantExtras.js +3 -0
- package/dist/cjs/helpers/getVariantExtras.js.map +1 -1
- package/dist/cjs/helpers/insertStyleRule.js.map +1 -1
- package/dist/cjs/helpers/matchMedia.native.js.map +1 -1
- package/dist/cjs/helpers/mergeProps.js.map +1 -1
- package/dist/cjs/helpers/mergeTransform.js.map +1 -1
- package/dist/cjs/helpers/normalizeColor.js +9 -5
- package/dist/cjs/helpers/normalizeColor.js.map +3 -3
- package/dist/cjs/helpers/normalizeValueWithProperty.js.map +1 -1
- package/dist/cjs/helpers/proxyThemeVariables.js.map +1 -1
- package/dist/cjs/helpers/themeable.js +16 -9
- package/dist/cjs/helpers/themeable.js.map +1 -1
- package/dist/cjs/helpers/themes.js.map +1 -1
- package/dist/cjs/helpers/useShallowSetState.js.map +1 -1
- package/dist/cjs/helpers/warnOnce.js.map +1 -1
- package/dist/cjs/hooks/useMedia.js +23 -19
- package/dist/cjs/hooks/useMedia.js.map +2 -2
- package/dist/cjs/hooks/useTheme.js +2 -0
- package/dist/cjs/hooks/useTheme.js.map +1 -1
- package/dist/cjs/hooks/useThemeName.js.map +1 -1
- package/dist/cjs/inject-styles.js.map +1 -1
- package/dist/cjs/insertFont.js.map +1 -1
- package/dist/cjs/setupReactNative.js.map +1 -1
- package/dist/cjs/styled.js +2 -0
- package/dist/cjs/styled.js.map +1 -1
- package/dist/cjs/views/FontLanguage.js +10 -7
- package/dist/cjs/views/FontLanguage.js.map +1 -1
- package/dist/cjs/views/FontLanguage.native.js +1 -4
- package/dist/cjs/views/FontLanguage.native.js.map +1 -1
- package/dist/cjs/views/Slot.js +1 -3
- package/dist/cjs/views/Slot.js.map +1 -1
- package/dist/cjs/views/Stack.web.test.js +2 -11
- package/dist/cjs/views/Stack.web.test.js.map +1 -1
- package/dist/cjs/views/TamaguiProvider.js +22 -18
- package/dist/cjs/views/TamaguiProvider.js.map +1 -1
- package/dist/cjs/views/Text.js +2 -0
- package/dist/cjs/views/Text.js.map +1 -1
- package/dist/cjs/views/Theme.js +16 -18
- package/dist/cjs/views/Theme.js.map +1 -1
- package/dist/cjs/views/ThemeProvider.js +20 -14
- package/dist/cjs/views/ThemeProvider.js.map +1 -1
- package/dist/esm/addTheme.js +1 -0
- package/dist/esm/addTheme.js.map +1 -1
- package/dist/esm/config.js.map +1 -1
- package/dist/esm/createComponent.js +50 -27
- package/dist/esm/createComponent.js.map +1 -1
- package/dist/esm/createFont.js.map +1 -1
- package/dist/esm/createTamagui.js +4 -0
- package/dist/esm/createTamagui.js.map +2 -2
- package/dist/esm/createTokens.web.test.js +1 -0
- package/dist/esm/createTokens.web.test.js.map +1 -1
- package/dist/esm/createVariable.js.map +1 -1
- package/dist/esm/createVariables.js.map +1 -1
- package/dist/esm/helpers/RNComponents.js +1 -0
- package/dist/esm/helpers/RNComponents.js.map +1 -1
- package/dist/esm/helpers/ThemeManager.js +1 -0
- package/dist/esm/helpers/ThemeManager.js.map +1 -1
- package/dist/esm/helpers/ThemeManager.test.js.map +1 -1
- package/dist/esm/helpers/createMediaStyle.js.map +1 -1
- package/dist/esm/helpers/createPropMapper.js.map +1 -1
- package/dist/esm/helpers/expandStyle.js +2 -0
- package/dist/esm/helpers/expandStyle.js.map +1 -1
- package/dist/esm/helpers/expandStyles.js +1 -1
- package/dist/esm/helpers/expandStyles.js.map +2 -2
- package/dist/esm/helpers/extendStaticConfig.js.map +1 -1
- package/dist/esm/helpers/getExpandedShorthands.js.map +1 -1
- package/dist/esm/helpers/getFontLanguage.js.map +1 -1
- package/dist/esm/helpers/getSplitStyles.js +4 -4
- package/dist/esm/helpers/getSplitStyles.js.map +2 -2
- package/dist/esm/helpers/getStylesAtomic.js +3 -0
- package/dist/esm/helpers/getStylesAtomic.js.map +1 -1
- package/dist/esm/helpers/getThemeCSSRules.js.map +1 -1
- package/dist/esm/helpers/getVariantExtras.js +3 -0
- package/dist/esm/helpers/getVariantExtras.js.map +1 -1
- package/dist/esm/helpers/insertStyleRule.js.map +1 -1
- package/dist/esm/helpers/matchMedia.native.js.map +1 -1
- package/dist/esm/helpers/mergeProps.js.map +1 -1
- package/dist/esm/helpers/mergeTransform.js.map +1 -1
- package/dist/esm/helpers/normalizeColor.js +4 -4
- package/dist/esm/helpers/normalizeColor.js.map +3 -3
- package/dist/esm/helpers/normalizeValueWithProperty.js.map +1 -1
- package/dist/esm/helpers/proxyThemeVariables.js.map +1 -1
- package/dist/esm/helpers/themeable.js +12 -9
- package/dist/esm/helpers/themeable.js.map +1 -1
- package/dist/esm/helpers/themes.js.map +1 -1
- package/dist/esm/helpers/useShallowSetState.js.map +1 -1
- package/dist/esm/helpers/warnOnce.js.map +1 -1
- package/dist/esm/hooks/useMedia.js +23 -19
- package/dist/esm/hooks/useMedia.js.map +2 -2
- package/dist/esm/hooks/useTheme.js +2 -0
- package/dist/esm/hooks/useTheme.js.map +1 -1
- package/dist/esm/hooks/useThemeName.js.map +1 -1
- package/dist/esm/inject-styles.js.map +1 -1
- package/dist/esm/insertFont.js.map +1 -1
- package/dist/esm/setupReactNative.js.map +1 -1
- package/dist/esm/styled.js +2 -0
- package/dist/esm/styled.js.map +1 -1
- package/dist/esm/views/FontLanguage.js +10 -7
- package/dist/esm/views/FontLanguage.js.map +1 -1
- package/dist/esm/views/FontLanguage.native.js +1 -4
- package/dist/esm/views/FontLanguage.native.js.map +1 -1
- package/dist/esm/views/Slot.js +1 -3
- package/dist/esm/views/Slot.js.map +1 -1
- package/dist/esm/views/Stack.web.test.js +2 -11
- package/dist/esm/views/Stack.web.test.js.map +1 -1
- package/dist/esm/views/TamaguiProvider.js +18 -18
- package/dist/esm/views/TamaguiProvider.js.map +1 -1
- package/dist/esm/views/Text.js +2 -0
- package/dist/esm/views/Text.js.map +1 -1
- package/dist/esm/views/Theme.js +16 -18
- package/dist/esm/views/Theme.js.map +1 -1
- package/dist/esm/views/ThemeProvider.js +20 -14
- package/dist/esm/views/ThemeProvider.js.map +1 -1
- package/package.json +12 -15
- package/src/createTamagui.ts +1 -0
- package/src/helpers/expandStyles.ts +1 -1
- package/src/helpers/getSplitStyles.tsx +0 -4
- package/src/helpers/normalizeColor.ts +5 -3
- package/src/hooks/useMedia.tsx +10 -11
- package/types/helpers/normalizeColor.d.ts +2 -1
- package/dist/cjs/contexts/ButtonInsideButtonContext.js +0 -30
- package/dist/cjs/contexts/ButtonInsideButtonContext.js.map +0 -7
- package/dist/cjs/contexts/ThemeContext.js +0 -30
- package/dist/cjs/contexts/ThemeContext.js.map +0 -7
- package/dist/cjs/createFont.test.js +0 -125
- package/dist/cjs/createFont.test.js.map +0 -7
- package/dist/cjs/createTokens.test.js +0 -27
- package/dist/cjs/createTokens.test.js.map +0 -7
- package/dist/cjs/createVariable.test.js +0 -7
- package/dist/cjs/createVariable.test.js.map +0 -7
- package/dist/cjs/helpers/areEqualSets.js +0 -38
- package/dist/cjs/helpers/areEqualSets.js.map +0 -7
- package/dist/cjs/helpers/assignNativePropsToWeb.js +0 -188
- package/dist/cjs/helpers/assignNativePropsToWeb.js.map +0 -7
- package/dist/cjs/helpers/assignNativePropsToWeb.native.js +0 -30
- package/dist/cjs/helpers/assignNativePropsToWeb.native.js.map +0 -7
- package/dist/cjs/helpers/cache.js +0 -43
- package/dist/cjs/helpers/cache.js.map +0 -7
- package/dist/cjs/helpers/calc.js +0 -71
- package/dist/cjs/helpers/calc.js.map +0 -7
- package/dist/cjs/helpers/getFont.js +0 -66
- package/dist/cjs/helpers/getFont.js.map +0 -7
- package/dist/cjs/helpers/getSize.js +0 -44
- package/dist/cjs/helpers/getSize.js.map +0 -7
- package/dist/cjs/helpers/getSplitStyles.test.js +0 -19
- package/dist/cjs/helpers/getSplitStyles.test.js.map +0 -7
- package/dist/cjs/helpers/getStackSize.js +0 -46
- package/dist/cjs/helpers/getStackSize.js.map +0 -7
- package/dist/cjs/helpers/startTransition.js +0 -36
- package/dist/cjs/helpers/startTransition.js.map +0 -7
- package/dist/cjs/hooks/useConstant.js +0 -39
- package/dist/cjs/hooks/useConstant.js.map +0 -7
- package/dist/cjs/hooks/useIsMounted.js +0 -40
- package/dist/cjs/hooks/useIsMounted.js.map +0 -7
- package/dist/cjs/hooks/usePressable.js +0 -36
- package/dist/cjs/hooks/usePressable.js.map +0 -7
- package/dist/cjs/hooks/useUnmountEffect.js +0 -32
- package/dist/cjs/hooks/useUnmountEffect.js.map +0 -7
- package/dist/cjs/injectStyles.js +0 -40
- package/dist/cjs/injectStyles.js.map +0 -7
- package/dist/cjs/views/Stack.test.js +0 -31
- package/dist/cjs/views/Stack.test.js.map +0 -7
- package/dist/cjs/views/ThemeInverse.js +0 -56
- package/dist/cjs/views/ThemeInverse.js.map +0 -7
- package/dist/cjs/views/ThemeReset.js +0 -69
- package/dist/cjs/views/ThemeReset.js.map +0 -7
- package/dist/esm/contexts/ButtonInsideButtonContext.js +0 -6
- package/dist/esm/contexts/ButtonInsideButtonContext.js.map +0 -7
- package/dist/esm/contexts/ThemeContext.js +0 -6
- package/dist/esm/contexts/ThemeContext.js.map +0 -7
- package/dist/esm/createFont.test.js +0 -124
- package/dist/esm/createFont.test.js.map +0 -7
- package/dist/esm/createTokens.test.js +0 -26
- package/dist/esm/createTokens.test.js.map +0 -7
- package/dist/esm/createVariable.test.js +0 -6
- package/dist/esm/createVariable.test.js.map +0 -7
- package/dist/esm/helpers/areEqualSets.js +0 -14
- package/dist/esm/helpers/areEqualSets.js.map +0 -7
- package/dist/esm/helpers/assignNativePropsToWeb.js +0 -164
- package/dist/esm/helpers/assignNativePropsToWeb.js.map +0 -7
- package/dist/esm/helpers/assignNativePropsToWeb.native.js +0 -6
- package/dist/esm/helpers/assignNativePropsToWeb.native.js.map +0 -7
- package/dist/esm/helpers/cache.js +0 -18
- package/dist/esm/helpers/cache.js.map +0 -7
- package/dist/esm/helpers/calc.js +0 -47
- package/dist/esm/helpers/calc.js.map +0 -7
- package/dist/esm/helpers/getFont.js +0 -42
- package/dist/esm/helpers/getFont.js.map +0 -7
- package/dist/esm/helpers/getSize.js +0 -19
- package/dist/esm/helpers/getSize.js.map +0 -7
- package/dist/esm/helpers/getSplitStyles.test.js +0 -18
- package/dist/esm/helpers/getSplitStyles.test.js.map +0 -7
- package/dist/esm/helpers/getStackSize.js +0 -22
- package/dist/esm/helpers/getStackSize.js.map +0 -7
- package/dist/esm/helpers/startTransition.js +0 -6
- package/dist/esm/helpers/startTransition.js.map +0 -7
- package/dist/esm/hooks/useConstant.js +0 -15
- package/dist/esm/hooks/useConstant.js.map +0 -7
- package/dist/esm/hooks/useIsMounted.js +0 -16
- package/dist/esm/hooks/useIsMounted.js.map +0 -7
- package/dist/esm/hooks/usePressable.js +0 -12
- package/dist/esm/hooks/usePressable.js.map +0 -7
- package/dist/esm/hooks/useUnmountEffect.js +0 -8
- package/dist/esm/hooks/useUnmountEffect.js.map +0 -7
- package/dist/esm/injectStyles.js +0 -16
- package/dist/esm/injectStyles.js.map +0 -7
- package/dist/esm/views/Stack.test.js +0 -30
- package/dist/esm/views/Stack.test.js.map +0 -7
- package/dist/esm/views/ThemeInverse.js +0 -32
- package/dist/esm/views/ThemeInverse.js.map +0 -7
- package/dist/esm/views/ThemeReset.js +0 -39
- package/dist/esm/views/ThemeReset.js.map +0 -7
- package/src/createFont.web.test.tsx +0 -129
- package/src/createTokens.web.test.tsx +0 -29
- package/src/createVariable.web.test.tsx +0 -7
- package/src/helpers/ThemeManager.test.tsx +0 -497
- package/src/views/Stack.web.test.tsx +0 -71
- package/types/createFont.test.d.ts +0 -2
- package/types/createTokens.test.d.ts +0 -2
- package/types/createVariable.test.d.ts +0 -2
- package/types/helpers/getSplitStyles.test.d.ts +0 -2
- package/types/views/Stack.test.d.ts +0 -2
|
@@ -1,188 +0,0 @@
|
|
|
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: true });
|
|
9
|
-
};
|
|
10
|
-
var __copyProps = (to, from, except, desc) => {
|
|
11
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
-
for (let key of __getOwnPropNames(from))
|
|
13
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
-
}
|
|
16
|
-
return to;
|
|
17
|
-
};
|
|
18
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
-
var assignNativePropsToWeb_exports = {};
|
|
20
|
-
__export(assignNativePropsToWeb_exports, {
|
|
21
|
-
assignNativePropsToWeb: () => assignNativePropsToWeb
|
|
22
|
-
});
|
|
23
|
-
module.exports = __toCommonJS(assignNativePropsToWeb_exports);
|
|
24
|
-
var import_createComponent = require("../createComponent");
|
|
25
|
-
function assignNativePropsToWeb(elementType, viewProps, nativeProps) {
|
|
26
|
-
if (!viewProps.role && nativeProps.accessibilityRole) {
|
|
27
|
-
if (nativeProps.accessibilityRole === "none") {
|
|
28
|
-
viewProps.role = "presentation";
|
|
29
|
-
} else {
|
|
30
|
-
const webRole = import_createComponent.accessibilityRoleToWebRole[nativeProps.accessibilityRole];
|
|
31
|
-
if (webRole != null) {
|
|
32
|
-
viewProps.role = webRole || nativeProps.accessibilityRole;
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
if (nativeProps.accessibilityActiveDescendant != null) {
|
|
37
|
-
viewProps["aria-activedescendant"] = nativeProps.accessibilityActiveDescendant;
|
|
38
|
-
}
|
|
39
|
-
if (nativeProps.accessibilityAtomic != null) {
|
|
40
|
-
viewProps["aria-atomic"] = nativeProps.accessibilityAtomic;
|
|
41
|
-
}
|
|
42
|
-
if (nativeProps.accessibilityAutoComplete != null) {
|
|
43
|
-
viewProps["aria-autocomplete"] = nativeProps.accessibilityAutoComplete;
|
|
44
|
-
}
|
|
45
|
-
if (nativeProps.accessibilityBusy != null) {
|
|
46
|
-
viewProps["aria-busy"] = nativeProps.accessibilityBusy;
|
|
47
|
-
}
|
|
48
|
-
if (nativeProps.accessibilityChecked != null) {
|
|
49
|
-
viewProps["aria-checked"] = nativeProps.accessibilityChecked;
|
|
50
|
-
}
|
|
51
|
-
if (nativeProps.accessibilityColumnCount != null) {
|
|
52
|
-
viewProps["aria-colcount"] = nativeProps.accessibilityColumnCount;
|
|
53
|
-
}
|
|
54
|
-
if (nativeProps.accessibilityColumnIndex != null) {
|
|
55
|
-
viewProps["aria-colindex"] = nativeProps.accessibilityColumnIndex;
|
|
56
|
-
}
|
|
57
|
-
if (nativeProps.accessibilityColumnSpan != null) {
|
|
58
|
-
viewProps["aria-colspan"] = nativeProps.accessibilityColumnSpan;
|
|
59
|
-
}
|
|
60
|
-
if (nativeProps.accessibilityControls != null) {
|
|
61
|
-
viewProps["aria-controls"] = (0, import_createComponent.processIDRefList)(nativeProps.accessibilityControls);
|
|
62
|
-
}
|
|
63
|
-
if (nativeProps.accessibilityCurrent != null) {
|
|
64
|
-
viewProps["aria-current"] = nativeProps.accessibilityCurrent;
|
|
65
|
-
}
|
|
66
|
-
if (nativeProps.accessibilityDescribedBy != null) {
|
|
67
|
-
viewProps["aria-describedby"] = (0, import_createComponent.processIDRefList)(nativeProps.accessibilityDescribedBy);
|
|
68
|
-
}
|
|
69
|
-
if (nativeProps.accessibilityDetails != null) {
|
|
70
|
-
viewProps["aria-details"] = nativeProps.accessibilityDetails;
|
|
71
|
-
}
|
|
72
|
-
if (nativeProps.disabled === true) {
|
|
73
|
-
viewProps["aria-disabled"] = true;
|
|
74
|
-
if (elementType === "button" || elementType === "form" || elementType === "input" || elementType === "select" || elementType === "textarea") {
|
|
75
|
-
viewProps.disabled = true;
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
if (nativeProps.accessibilityErrorMessage != null) {
|
|
79
|
-
viewProps["aria-errormessage"] = nativeProps.accessibilityErrorMessage;
|
|
80
|
-
}
|
|
81
|
-
if (nativeProps.accessibilityExpanded != null) {
|
|
82
|
-
viewProps["aria-expanded"] = nativeProps.accessibilityExpanded;
|
|
83
|
-
}
|
|
84
|
-
if (nativeProps.accessibilityFlowTo != null) {
|
|
85
|
-
viewProps["aria-flowto"] = (0, import_createComponent.processIDRefList)(nativeProps.accessibilityFlowTo);
|
|
86
|
-
}
|
|
87
|
-
if (nativeProps.accessibilityHasPopup != null) {
|
|
88
|
-
viewProps["aria-haspopup"] = nativeProps.accessibilityHasPopup;
|
|
89
|
-
}
|
|
90
|
-
if (nativeProps.accessibilityHidden === true) {
|
|
91
|
-
viewProps["aria-hidden"] = nativeProps.accessibilityHidden;
|
|
92
|
-
}
|
|
93
|
-
if (nativeProps.accessibilityInvalid != null) {
|
|
94
|
-
viewProps["aria-invalid"] = nativeProps.accessibilityInvalid;
|
|
95
|
-
}
|
|
96
|
-
if (nativeProps.accessibilityKeyShortcuts != null && Array.isArray(nativeProps.accessibilityKeyShortcuts)) {
|
|
97
|
-
viewProps["aria-keyshortcuts"] = nativeProps.accessibilityKeyShortcuts.join(" ");
|
|
98
|
-
}
|
|
99
|
-
if (nativeProps.accessibilityLabel != null) {
|
|
100
|
-
viewProps["aria-label"] = nativeProps.accessibilityLabel;
|
|
101
|
-
}
|
|
102
|
-
if (nativeProps.accessibilityLabelledBy != null) {
|
|
103
|
-
viewProps["aria-labelledby"] = (0, import_createComponent.processIDRefList)(nativeProps.accessibilityLabelledBy);
|
|
104
|
-
}
|
|
105
|
-
if (nativeProps.accessibilityLevel != null) {
|
|
106
|
-
viewProps["aria-level"] = nativeProps.accessibilityLevel;
|
|
107
|
-
}
|
|
108
|
-
if (nativeProps.accessibilityLiveRegion != null) {
|
|
109
|
-
viewProps["aria-live"] = nativeProps.accessibilityLiveRegion === "none" ? "off" : nativeProps.accessibilityLiveRegion;
|
|
110
|
-
}
|
|
111
|
-
if (nativeProps.accessibilityModal != null) {
|
|
112
|
-
viewProps["aria-modal"] = nativeProps.accessibilityModal;
|
|
113
|
-
}
|
|
114
|
-
if (nativeProps.accessibilityMultiline != null) {
|
|
115
|
-
viewProps["aria-multiline"] = nativeProps.accessibilityMultiline;
|
|
116
|
-
}
|
|
117
|
-
if (nativeProps.accessibilityMultiSelectable != null) {
|
|
118
|
-
viewProps["aria-multiselectable"] = nativeProps.accessibilityMultiSelectable;
|
|
119
|
-
}
|
|
120
|
-
if (nativeProps.accessibilityOrientation != null) {
|
|
121
|
-
viewProps["aria-orientation"] = nativeProps.accessibilityOrientation;
|
|
122
|
-
}
|
|
123
|
-
if (nativeProps.accessibilityOwns != null) {
|
|
124
|
-
viewProps["aria-owns"] = (0, import_createComponent.processIDRefList)(nativeProps.accessibilityOwns);
|
|
125
|
-
}
|
|
126
|
-
if (nativeProps.accessibilityPlaceholder != null) {
|
|
127
|
-
viewProps["aria-placeholder"] = nativeProps.accessibilityPlaceholder;
|
|
128
|
-
}
|
|
129
|
-
if (nativeProps.accessibilityPosInSet != null) {
|
|
130
|
-
viewProps["aria-posinset"] = nativeProps.accessibilityPosInSet;
|
|
131
|
-
}
|
|
132
|
-
if (nativeProps.accessibilityPressed != null) {
|
|
133
|
-
viewProps["aria-pressed"] = nativeProps.accessibilityPressed;
|
|
134
|
-
}
|
|
135
|
-
if (nativeProps.accessibilityReadOnly != null) {
|
|
136
|
-
viewProps["aria-readonly"] = nativeProps.accessibilityReadOnly;
|
|
137
|
-
if (elementType === "input" || elementType === "select" || elementType === "textarea") {
|
|
138
|
-
viewProps.readOnly = true;
|
|
139
|
-
}
|
|
140
|
-
}
|
|
141
|
-
if (nativeProps.accessibilityRequired != null) {
|
|
142
|
-
viewProps["aria-required"] = nativeProps.accessibilityRequired;
|
|
143
|
-
if (elementType === "input" || elementType === "select" || elementType === "textarea") {
|
|
144
|
-
viewProps.required = true;
|
|
145
|
-
}
|
|
146
|
-
}
|
|
147
|
-
if (nativeProps.accessibilityRoleDescription != null) {
|
|
148
|
-
viewProps["aria-roledescription"] = nativeProps.accessibilityRoleDescription;
|
|
149
|
-
}
|
|
150
|
-
if (nativeProps.accessibilityRowCount != null) {
|
|
151
|
-
viewProps["aria-rowcount"] = nativeProps.accessibilityRowCount;
|
|
152
|
-
}
|
|
153
|
-
if (nativeProps.accessibilityRowIndex != null) {
|
|
154
|
-
viewProps["aria-rowindex"] = nativeProps.accessibilityRowIndex;
|
|
155
|
-
}
|
|
156
|
-
if (nativeProps.accessibilityRowSpan != null) {
|
|
157
|
-
viewProps["aria-rowspan"] = nativeProps.accessibilityRowSpan;
|
|
158
|
-
}
|
|
159
|
-
if (nativeProps.accessibilitySelected != null) {
|
|
160
|
-
viewProps["aria-selected"] = nativeProps.accessibilitySelected;
|
|
161
|
-
}
|
|
162
|
-
if (nativeProps.accessibilitySetSize != null) {
|
|
163
|
-
viewProps["aria-setsize"] = nativeProps.accessibilitySetSize;
|
|
164
|
-
}
|
|
165
|
-
if (nativeProps.accessibilitySort != null) {
|
|
166
|
-
viewProps["aria-sort"] = nativeProps.accessibilitySort;
|
|
167
|
-
}
|
|
168
|
-
if (nativeProps.accessibilityValueMax != null) {
|
|
169
|
-
viewProps["aria-valuemax"] = nativeProps.accessibilityValueMax;
|
|
170
|
-
}
|
|
171
|
-
if (nativeProps.accessibilityValueMin != null) {
|
|
172
|
-
viewProps["aria-valuemin"] = nativeProps.accessibilityValueMin;
|
|
173
|
-
}
|
|
174
|
-
if (nativeProps.accessibilityValueNow != null) {
|
|
175
|
-
viewProps["aria-valuenow"] = nativeProps.accessibilityValueNow;
|
|
176
|
-
}
|
|
177
|
-
if (nativeProps.accessibilityValueText != null) {
|
|
178
|
-
viewProps["aria-valuetext"] = nativeProps.accessibilityValueText;
|
|
179
|
-
}
|
|
180
|
-
if (nativeProps.nativeID) {
|
|
181
|
-
viewProps.id = nativeProps.nativeID;
|
|
182
|
-
}
|
|
183
|
-
}
|
|
184
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
185
|
-
0 && (module.exports = {
|
|
186
|
-
assignNativePropsToWeb
|
|
187
|
-
});
|
|
188
|
-
//# sourceMappingURL=assignNativePropsToWeb.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/helpers/assignNativePropsToWeb.tsx"],
|
|
4
|
-
"sourcesContent": ["import { accessibilityRoleToWebRole, processIDRefList } from '../createComponent'\n\n// adapted from react-native-web\n\nexport function assignNativePropsToWeb(elementType: string, viewProps: any, nativeProps: any) {\n if (!viewProps.role && nativeProps.accessibilityRole) {\n if (nativeProps.accessibilityRole === 'none') {\n viewProps.role = 'presentation'\n } else {\n const webRole = accessibilityRoleToWebRole[nativeProps.accessibilityRole]\n if (webRole != null) {\n viewProps.role = webRole || nativeProps.accessibilityRole\n }\n }\n }\n\n if (nativeProps.accessibilityActiveDescendant != null) {\n viewProps['aria-activedescendant'] = nativeProps.accessibilityActiveDescendant\n }\n if (nativeProps.accessibilityAtomic != null) {\n viewProps['aria-atomic'] = nativeProps.accessibilityAtomic\n }\n if (nativeProps.accessibilityAutoComplete != null) {\n viewProps['aria-autocomplete'] = nativeProps.accessibilityAutoComplete\n }\n if (nativeProps.accessibilityBusy != null) {\n viewProps['aria-busy'] = nativeProps.accessibilityBusy\n }\n if (nativeProps.accessibilityChecked != null) {\n viewProps['aria-checked'] = nativeProps.accessibilityChecked\n }\n if (nativeProps.accessibilityColumnCount != null) {\n viewProps['aria-colcount'] = nativeProps.accessibilityColumnCount\n }\n if (nativeProps.accessibilityColumnIndex != null) {\n viewProps['aria-colindex'] = nativeProps.accessibilityColumnIndex\n }\n if (nativeProps.accessibilityColumnSpan != null) {\n viewProps['aria-colspan'] = nativeProps.accessibilityColumnSpan\n }\n if (nativeProps.accessibilityControls != null) {\n viewProps['aria-controls'] = processIDRefList(nativeProps.accessibilityControls)\n }\n if (nativeProps.accessibilityCurrent != null) {\n viewProps['aria-current'] = nativeProps.accessibilityCurrent\n }\n if (nativeProps.accessibilityDescribedBy != null) {\n viewProps['aria-describedby'] = processIDRefList(nativeProps.accessibilityDescribedBy)\n }\n if (nativeProps.accessibilityDetails != null) {\n viewProps['aria-details'] = nativeProps.accessibilityDetails\n }\n if (nativeProps.disabled === true) {\n viewProps['aria-disabled'] = true\n // Enhance with native semantics\n if (\n elementType === 'button' ||\n elementType === 'form' ||\n elementType === 'input' ||\n elementType === 'select' ||\n elementType === 'textarea'\n ) {\n viewProps.disabled = true\n }\n }\n if (nativeProps.accessibilityErrorMessage != null) {\n viewProps['aria-errormessage'] = nativeProps.accessibilityErrorMessage\n }\n if (nativeProps.accessibilityExpanded != null) {\n viewProps['aria-expanded'] = nativeProps.accessibilityExpanded\n }\n if (nativeProps.accessibilityFlowTo != null) {\n viewProps['aria-flowto'] = processIDRefList(nativeProps.accessibilityFlowTo)\n }\n if (nativeProps.accessibilityHasPopup != null) {\n viewProps['aria-haspopup'] = nativeProps.accessibilityHasPopup\n }\n if (nativeProps.accessibilityHidden === true) {\n viewProps['aria-hidden'] = nativeProps.accessibilityHidden\n }\n if (nativeProps.accessibilityInvalid != null) {\n viewProps['aria-invalid'] = nativeProps.accessibilityInvalid\n }\n if (\n nativeProps.accessibilityKeyShortcuts != null &&\n Array.isArray(nativeProps.accessibilityKeyShortcuts)\n ) {\n viewProps['aria-keyshortcuts'] = nativeProps.accessibilityKeyShortcuts.join(' ')\n }\n if (nativeProps.accessibilityLabel != null) {\n viewProps['aria-label'] = nativeProps.accessibilityLabel\n }\n if (nativeProps.accessibilityLabelledBy != null) {\n viewProps['aria-labelledby'] = processIDRefList(nativeProps.accessibilityLabelledBy)\n }\n if (nativeProps.accessibilityLevel != null) {\n viewProps['aria-level'] = nativeProps.accessibilityLevel\n }\n if (nativeProps.accessibilityLiveRegion != null) {\n viewProps['aria-live'] =\n nativeProps.accessibilityLiveRegion === 'none' ? 'off' : nativeProps.accessibilityLiveRegion\n }\n if (nativeProps.accessibilityModal != null) {\n viewProps['aria-modal'] = nativeProps.accessibilityModal\n }\n if (nativeProps.accessibilityMultiline != null) {\n viewProps['aria-multiline'] = nativeProps.accessibilityMultiline\n }\n if (nativeProps.accessibilityMultiSelectable != null) {\n viewProps['aria-multiselectable'] = nativeProps.accessibilityMultiSelectable\n }\n if (nativeProps.accessibilityOrientation != null) {\n viewProps['aria-orientation'] = nativeProps.accessibilityOrientation\n }\n if (nativeProps.accessibilityOwns != null) {\n viewProps['aria-owns'] = processIDRefList(nativeProps.accessibilityOwns)\n }\n if (nativeProps.accessibilityPlaceholder != null) {\n viewProps['aria-placeholder'] = nativeProps.accessibilityPlaceholder\n }\n if (nativeProps.accessibilityPosInSet != null) {\n viewProps['aria-posinset'] = nativeProps.accessibilityPosInSet\n }\n if (nativeProps.accessibilityPressed != null) {\n viewProps['aria-pressed'] = nativeProps.accessibilityPressed\n }\n if (nativeProps.accessibilityReadOnly != null) {\n viewProps['aria-readonly'] = nativeProps.accessibilityReadOnly\n // Enhance with native semantics\n if (elementType === 'input' || elementType === 'select' || elementType === 'textarea') {\n viewProps.readOnly = true\n }\n }\n if (nativeProps.accessibilityRequired != null) {\n viewProps['aria-required'] = nativeProps.accessibilityRequired\n // Enhance with native semantics\n if (elementType === 'input' || elementType === 'select' || elementType === 'textarea') {\n viewProps.required = true\n }\n }\n if (nativeProps.accessibilityRoleDescription != null) {\n viewProps['aria-roledescription'] = nativeProps.accessibilityRoleDescription\n }\n if (nativeProps.accessibilityRowCount != null) {\n viewProps['aria-rowcount'] = nativeProps.accessibilityRowCount\n }\n if (nativeProps.accessibilityRowIndex != null) {\n viewProps['aria-rowindex'] = nativeProps.accessibilityRowIndex\n }\n if (nativeProps.accessibilityRowSpan != null) {\n viewProps['aria-rowspan'] = nativeProps.accessibilityRowSpan\n }\n if (nativeProps.accessibilitySelected != null) {\n viewProps['aria-selected'] = nativeProps.accessibilitySelected\n }\n if (nativeProps.accessibilitySetSize != null) {\n viewProps['aria-setsize'] = nativeProps.accessibilitySetSize\n }\n if (nativeProps.accessibilitySort != null) {\n viewProps['aria-sort'] = nativeProps.accessibilitySort\n }\n if (nativeProps.accessibilityValueMax != null) {\n viewProps['aria-valuemax'] = nativeProps.accessibilityValueMax\n }\n if (nativeProps.accessibilityValueMin != null) {\n viewProps['aria-valuemin'] = nativeProps.accessibilityValueMin\n }\n if (nativeProps.accessibilityValueNow != null) {\n viewProps['aria-valuenow'] = nativeProps.accessibilityValueNow\n }\n if (nativeProps.accessibilityValueText != null) {\n viewProps['aria-valuetext'] = nativeProps.accessibilityValueText\n }\n\n if (nativeProps.nativeID) {\n viewProps.id = nativeProps.nativeID\n }\n}\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,6BAA6D;AAItD,SAAS,uBAAuB,aAAqB,WAAgB,aAAkB;AAC5F,MAAI,CAAC,UAAU,QAAQ,YAAY,mBAAmB;AACpD,QAAI,YAAY,sBAAsB,QAAQ;AAC5C,gBAAU,OAAO;AAAA,IACnB,OAAO;AACL,YAAM,UAAU,kDAA2B,YAAY;AACvD,UAAI,WAAW,MAAM;AACnB,kBAAU,OAAO,WAAW,YAAY;AAAA,MAC1C;AAAA,IACF;AAAA,EACF;AAEA,MAAI,YAAY,iCAAiC,MAAM;AACrD,cAAU,2BAA2B,YAAY;AAAA,EACnD;AACA,MAAI,YAAY,uBAAuB,MAAM;AAC3C,cAAU,iBAAiB,YAAY;AAAA,EACzC;AACA,MAAI,YAAY,6BAA6B,MAAM;AACjD,cAAU,uBAAuB,YAAY;AAAA,EAC/C;AACA,MAAI,YAAY,qBAAqB,MAAM;AACzC,cAAU,eAAe,YAAY;AAAA,EACvC;AACA,MAAI,YAAY,wBAAwB,MAAM;AAC5C,cAAU,kBAAkB,YAAY;AAAA,EAC1C;AACA,MAAI,YAAY,4BAA4B,MAAM;AAChD,cAAU,mBAAmB,YAAY;AAAA,EAC3C;AACA,MAAI,YAAY,4BAA4B,MAAM;AAChD,cAAU,mBAAmB,YAAY;AAAA,EAC3C;AACA,MAAI,YAAY,2BAA2B,MAAM;AAC/C,cAAU,kBAAkB,YAAY;AAAA,EAC1C;AACA,MAAI,YAAY,yBAAyB,MAAM;AAC7C,cAAU,uBAAmB,yCAAiB,YAAY,qBAAqB;AAAA,EACjF;AACA,MAAI,YAAY,wBAAwB,MAAM;AAC5C,cAAU,kBAAkB,YAAY;AAAA,EAC1C;AACA,MAAI,YAAY,4BAA4B,MAAM;AAChD,cAAU,0BAAsB,yCAAiB,YAAY,wBAAwB;AAAA,EACvF;AACA,MAAI,YAAY,wBAAwB,MAAM;AAC5C,cAAU,kBAAkB,YAAY;AAAA,EAC1C;AACA,MAAI,YAAY,aAAa,MAAM;AACjC,cAAU,mBAAmB;AAE7B,QACE,gBAAgB,YAChB,gBAAgB,UAChB,gBAAgB,WAChB,gBAAgB,YAChB,gBAAgB,YAChB;AACA,gBAAU,WAAW;AAAA,IACvB;AAAA,EACF;AACA,MAAI,YAAY,6BAA6B,MAAM;AACjD,cAAU,uBAAuB,YAAY;AAAA,EAC/C;AACA,MAAI,YAAY,yBAAyB,MAAM;AAC7C,cAAU,mBAAmB,YAAY;AAAA,EAC3C;AACA,MAAI,YAAY,uBAAuB,MAAM;AAC3C,cAAU,qBAAiB,yCAAiB,YAAY,mBAAmB;AAAA,EAC7E;AACA,MAAI,YAAY,yBAAyB,MAAM;AAC7C,cAAU,mBAAmB,YAAY;AAAA,EAC3C;AACA,MAAI,YAAY,wBAAwB,MAAM;AAC5C,cAAU,iBAAiB,YAAY;AAAA,EACzC;AACA,MAAI,YAAY,wBAAwB,MAAM;AAC5C,cAAU,kBAAkB,YAAY;AAAA,EAC1C;AACA,MACE,YAAY,6BAA6B,QACzC,MAAM,QAAQ,YAAY,yBAAyB,GACnD;AACA,cAAU,uBAAuB,YAAY,0BAA0B,KAAK,GAAG;AAAA,EACjF;AACA,MAAI,YAAY,sBAAsB,MAAM;AAC1C,cAAU,gBAAgB,YAAY;AAAA,EACxC;AACA,MAAI,YAAY,2BAA2B,MAAM;AAC/C,cAAU,yBAAqB,yCAAiB,YAAY,uBAAuB;AAAA,EACrF;AACA,MAAI,YAAY,sBAAsB,MAAM;AAC1C,cAAU,gBAAgB,YAAY;AAAA,EACxC;AACA,MAAI,YAAY,2BAA2B,MAAM;AAC/C,cAAU,eACR,YAAY,4BAA4B,SAAS,QAAQ,YAAY;AAAA,EACzE;AACA,MAAI,YAAY,sBAAsB,MAAM;AAC1C,cAAU,gBAAgB,YAAY;AAAA,EACxC;AACA,MAAI,YAAY,0BAA0B,MAAM;AAC9C,cAAU,oBAAoB,YAAY;AAAA,EAC5C;AACA,MAAI,YAAY,gCAAgC,MAAM;AACpD,cAAU,0BAA0B,YAAY;AAAA,EAClD;AACA,MAAI,YAAY,4BAA4B,MAAM;AAChD,cAAU,sBAAsB,YAAY;AAAA,EAC9C;AACA,MAAI,YAAY,qBAAqB,MAAM;AACzC,cAAU,mBAAe,yCAAiB,YAAY,iBAAiB;AAAA,EACzE;AACA,MAAI,YAAY,4BAA4B,MAAM;AAChD,cAAU,sBAAsB,YAAY;AAAA,EAC9C;AACA,MAAI,YAAY,yBAAyB,MAAM;AAC7C,cAAU,mBAAmB,YAAY;AAAA,EAC3C;AACA,MAAI,YAAY,wBAAwB,MAAM;AAC5C,cAAU,kBAAkB,YAAY;AAAA,EAC1C;AACA,MAAI,YAAY,yBAAyB,MAAM;AAC7C,cAAU,mBAAmB,YAAY;AAEzC,QAAI,gBAAgB,WAAW,gBAAgB,YAAY,gBAAgB,YAAY;AACrF,gBAAU,WAAW;AAAA,IACvB;AAAA,EACF;AACA,MAAI,YAAY,yBAAyB,MAAM;AAC7C,cAAU,mBAAmB,YAAY;AAEzC,QAAI,gBAAgB,WAAW,gBAAgB,YAAY,gBAAgB,YAAY;AACrF,gBAAU,WAAW;AAAA,IACvB;AAAA,EACF;AACA,MAAI,YAAY,gCAAgC,MAAM;AACpD,cAAU,0BAA0B,YAAY;AAAA,EAClD;AACA,MAAI,YAAY,yBAAyB,MAAM;AAC7C,cAAU,mBAAmB,YAAY;AAAA,EAC3C;AACA,MAAI,YAAY,yBAAyB,MAAM;AAC7C,cAAU,mBAAmB,YAAY;AAAA,EAC3C;AACA,MAAI,YAAY,wBAAwB,MAAM;AAC5C,cAAU,kBAAkB,YAAY;AAAA,EAC1C;AACA,MAAI,YAAY,yBAAyB,MAAM;AAC7C,cAAU,mBAAmB,YAAY;AAAA,EAC3C;AACA,MAAI,YAAY,wBAAwB,MAAM;AAC5C,cAAU,kBAAkB,YAAY;AAAA,EAC1C;AACA,MAAI,YAAY,qBAAqB,MAAM;AACzC,cAAU,eAAe,YAAY;AAAA,EACvC;AACA,MAAI,YAAY,yBAAyB,MAAM;AAC7C,cAAU,mBAAmB,YAAY;AAAA,EAC3C;AACA,MAAI,YAAY,yBAAyB,MAAM;AAC7C,cAAU,mBAAmB,YAAY;AAAA,EAC3C;AACA,MAAI,YAAY,yBAAyB,MAAM;AAC7C,cAAU,mBAAmB,YAAY;AAAA,EAC3C;AACA,MAAI,YAAY,0BAA0B,MAAM;AAC9C,cAAU,oBAAoB,YAAY;AAAA,EAC5C;AAEA,MAAI,YAAY,UAAU;AACxB,cAAU,KAAK,YAAY;AAAA,EAC7B;AACF;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
|
@@ -1,30 +0,0 @@
|
|
|
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: true });
|
|
9
|
-
};
|
|
10
|
-
var __copyProps = (to, from, except, desc) => {
|
|
11
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
-
for (let key of __getOwnPropNames(from))
|
|
13
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
-
}
|
|
16
|
-
return to;
|
|
17
|
-
};
|
|
18
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
-
var assignNativePropsToWeb_native_exports = {};
|
|
20
|
-
__export(assignNativePropsToWeb_native_exports, {
|
|
21
|
-
assignNativePropsToWeb: () => assignNativePropsToWeb
|
|
22
|
-
});
|
|
23
|
-
module.exports = __toCommonJS(assignNativePropsToWeb_native_exports);
|
|
24
|
-
function assignNativePropsToWeb(elementType, viewProps, nativeProps) {
|
|
25
|
-
}
|
|
26
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
27
|
-
0 && (module.exports = {
|
|
28
|
-
assignNativePropsToWeb
|
|
29
|
-
});
|
|
30
|
-
//# sourceMappingURL=assignNativePropsToWeb.native.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/helpers/assignNativePropsToWeb.native.tsx"],
|
|
4
|
-
"sourcesContent": ["export function assignNativePropsToWeb(elementType: string, viewProps: any, nativeProps: any) {}\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAO,SAAS,uBAAuB,aAAqB,WAAgB,aAAkB;AAAC;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
|
@@ -1,43 +0,0 @@
|
|
|
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: true });
|
|
9
|
-
};
|
|
10
|
-
var __copyProps = (to, from, except, desc) => {
|
|
11
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
-
for (let key of __getOwnPropNames(from))
|
|
13
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
-
}
|
|
16
|
-
return to;
|
|
17
|
-
};
|
|
18
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
-
var cache_exports = {};
|
|
20
|
-
__export(cache_exports, {
|
|
21
|
-
cache: () => cache
|
|
22
|
-
});
|
|
23
|
-
module.exports = __toCommonJS(cache_exports);
|
|
24
|
-
class Cache {
|
|
25
|
-
constructor() {
|
|
26
|
-
this.v = {};
|
|
27
|
-
}
|
|
28
|
-
get(key, valStr) {
|
|
29
|
-
var _a;
|
|
30
|
-
return (_a = this.v[key]) == null ? void 0 : _a[valStr];
|
|
31
|
-
}
|
|
32
|
-
set(key, valStr, object) {
|
|
33
|
-
var _a;
|
|
34
|
-
(_a = this.v)[key] ?? (_a[key] = {});
|
|
35
|
-
this.v[key][valStr] = object;
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
const cache = new Cache();
|
|
39
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
40
|
-
0 && (module.exports = {
|
|
41
|
-
cache
|
|
42
|
-
});
|
|
43
|
-
//# sourceMappingURL=cache.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/helpers/cache.ts"],
|
|
4
|
-
"sourcesContent": ["type Value = Object | Array<any> | string | number\n\nexport type Style = { [key: string]: Value }\n\nclass Cache {\n v: Record<string, any> = {}\n\n get(key: string, valStr: string) {\n return this.v[key]?.[valStr]\n }\n\n set(key: string, valStr: string, object: any) {\n this.v[key] ??= {}\n this.v[key][valStr] = object\n }\n}\n\nexport const cache = new Cache()\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAIA,MAAM,MAAM;AAAA,EAAZ;AACE,aAAyB,CAAC;AAAA;AAAA,EAE1B,IAAI,KAAa,QAAgB;AAPnC;AAQI,YAAO,UAAK,EAAE,SAAP,mBAAc;AAAA,EACvB;AAAA,EAEA,IAAI,KAAa,QAAgB,QAAa;AAXhD;AAYI,eAAK,GAAL,mBAAgB,CAAC;AACjB,SAAK,EAAE,KAAK,UAAU;AAAA,EACxB;AACF;AAEO,MAAM,QAAQ,IAAI,MAAM;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
package/dist/cjs/helpers/calc.js
DELETED
|
@@ -1,71 +0,0 @@
|
|
|
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: true });
|
|
9
|
-
};
|
|
10
|
-
var __copyProps = (to, from, except, desc) => {
|
|
11
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
-
for (let key of __getOwnPropNames(from))
|
|
13
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
-
}
|
|
16
|
-
return to;
|
|
17
|
-
};
|
|
18
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
-
var calc_exports = {};
|
|
20
|
-
__export(calc_exports, {
|
|
21
|
-
calc: () => calc
|
|
22
|
-
});
|
|
23
|
-
module.exports = __toCommonJS(calc_exports);
|
|
24
|
-
var import_constants = require("@tamagui/constants");
|
|
25
|
-
var import_createVariable = require("../createVariable");
|
|
26
|
-
const operators = {
|
|
27
|
-
"+": (a, b) => a + b,
|
|
28
|
-
"-": (a, b) => a - b,
|
|
29
|
-
"/": (a, b) => a / b,
|
|
30
|
-
"*": (a, b) => a * b
|
|
31
|
-
};
|
|
32
|
-
const calc = (...valuesAndOperators) => {
|
|
33
|
-
if (import_constants.isWeb) {
|
|
34
|
-
let res2 = "calc(";
|
|
35
|
-
for (const cur of valuesAndOperators) {
|
|
36
|
-
if (operators[cur]) {
|
|
37
|
-
res2 += " " + cur + " ";
|
|
38
|
-
} else {
|
|
39
|
-
res2 += convertToVariableOrNumber(cur);
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
return res2 + ")";
|
|
43
|
-
}
|
|
44
|
-
let res = 0;
|
|
45
|
-
let nextOp = null;
|
|
46
|
-
for (const cur of valuesAndOperators) {
|
|
47
|
-
if (operators[cur]) {
|
|
48
|
-
nextOp = operators[cur];
|
|
49
|
-
} else {
|
|
50
|
-
if (nextOp) {
|
|
51
|
-
res = nextOp(res, cur);
|
|
52
|
-
nextOp = null;
|
|
53
|
-
} else {
|
|
54
|
-
res = +cur;
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
return res;
|
|
59
|
-
};
|
|
60
|
-
const convertToVariableOrNumber = (v) => {
|
|
61
|
-
const varOrVal = (0, import_createVariable.getVariableVariable)(v);
|
|
62
|
-
if (typeof varOrVal === "number") {
|
|
63
|
-
return `${varOrVal}px`;
|
|
64
|
-
}
|
|
65
|
-
return varOrVal;
|
|
66
|
-
};
|
|
67
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
68
|
-
0 && (module.exports = {
|
|
69
|
-
calc
|
|
70
|
-
});
|
|
71
|
-
//# sourceMappingURL=calc.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/helpers/calc.ts"],
|
|
4
|
-
"sourcesContent": ["import { isWeb } from '@tamagui/constants'\n\nimport { getVariableVariable } from '../createVariable'\nimport { FontLineHeightTokens, FontSizeTokens, SizeTokens, SpaceTokens } from '../types'\n\n// unused code - not exported\n\n/**\n * Simple calc() that handles native + web\n * on web: outputs a calc() string\n * on native: outputs a plain number\n */\n\nexport type CalcVal =\n | string\n | number\n | SizeTokens\n | SpaceTokens\n | FontSizeTokens\n | FontLineHeightTokens\n\nconst operators = {\n '+': (a: number, b: number) => a + b,\n '-': (a: number, b: number) => a - b,\n '/': (a: number, b: number) => a / b,\n '*': (a: number, b: number) => a * b,\n}\n\ntype Operator = keyof typeof operators\n\nexport const calc = (...valuesAndOperators: (CalcVal | Operator)[]) => {\n if (isWeb) {\n let res = 'calc('\n for (const cur of valuesAndOperators) {\n if (operators[cur as any]) {\n // spaces are significant\n res += ' ' + cur + ' '\n } else {\n res += convertToVariableOrNumber(cur)\n }\n }\n return res + ')'\n }\n\n let res = 0\n let nextOp: any = null\n for (const cur of valuesAndOperators) {\n if (operators[cur as any]) {\n nextOp = operators[cur as any]\n } else {\n if (nextOp) {\n res = nextOp(res, cur)\n nextOp = null\n } else {\n res = +cur\n }\n }\n }\n return res\n}\n\nconst convertToVariableOrNumber = (v: any) => {\n const varOrVal = getVariableVariable(v)\n if (typeof varOrVal === 'number') {\n return `${varOrVal}px`\n }\n return varOrVal\n}\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,uBAAsB;AAEtB,4BAAoC;AAmBpC,MAAM,YAAY;AAAA,EAChB,KAAK,CAAC,GAAW,MAAc,IAAI;AAAA,EACnC,KAAK,CAAC,GAAW,MAAc,IAAI;AAAA,EACnC,KAAK,CAAC,GAAW,MAAc,IAAI;AAAA,EACnC,KAAK,CAAC,GAAW,MAAc,IAAI;AACrC;AAIO,MAAM,OAAO,IAAI,uBAA+C;AACrE,MAAI,wBAAO;AACT,QAAIA,OAAM;AACV,eAAW,OAAO,oBAAoB;AACpC,UAAI,UAAU,MAAa;AAEzB,QAAAA,QAAO,MAAM,MAAM;AAAA,MACrB,OAAO;AACL,QAAAA,QAAO,0BAA0B,GAAG;AAAA,MACtC;AAAA,IACF;AACA,WAAOA,OAAM;AAAA,EACf;AAEA,MAAI,MAAM;AACV,MAAI,SAAc;AAClB,aAAW,OAAO,oBAAoB;AACpC,QAAI,UAAU,MAAa;AACzB,eAAS,UAAU;AAAA,IACrB,OAAO;AACL,UAAI,QAAQ;AACV,cAAM,OAAO,KAAK,GAAG;AACrB,iBAAS;AAAA,MACX,OAAO;AACL,cAAM,CAAC;AAAA,MACT;AAAA,IACF;AAAA,EACF;AACA,SAAO;AACT;AAEA,MAAM,4BAA4B,CAAC,MAAW;AAC5C,QAAM,eAAW,2CAAoB,CAAC;AACtC,MAAI,OAAO,aAAa,UAAU;AAChC,WAAO,GAAG;AAAA,EACZ;AACA,SAAO;AACT;",
|
|
6
|
-
"names": ["res"]
|
|
7
|
-
}
|
|
@@ -1,66 +0,0 @@
|
|
|
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: true });
|
|
9
|
-
};
|
|
10
|
-
var __copyProps = (to, from, except, desc) => {
|
|
11
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
-
for (let key of __getOwnPropNames(from))
|
|
13
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
-
}
|
|
16
|
-
return to;
|
|
17
|
-
};
|
|
18
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
-
var getFont_exports = {};
|
|
20
|
-
__export(getFont_exports, {
|
|
21
|
-
getFont: () => getFont
|
|
22
|
-
});
|
|
23
|
-
module.exports = __toCommonJS(getFont_exports);
|
|
24
|
-
var import_createVariable = require("../createVariable");
|
|
25
|
-
const getFont = (val = "$4", { fonts, theme, props }) => {
|
|
26
|
-
var _a, _b, _c;
|
|
27
|
-
const family = (0, import_createVariable.getVariableValue)(props.fontFamily) || "$body";
|
|
28
|
-
const font = fonts[family] || fonts["$body"];
|
|
29
|
-
if (!font) {
|
|
30
|
-
if (process.env.NODE_ENV === "development") {
|
|
31
|
-
console.warn("\u26A0\uFE0F no font found", { family, fontTokens: Object.keys(fonts), val });
|
|
32
|
-
}
|
|
33
|
-
return {};
|
|
34
|
-
}
|
|
35
|
-
const fontFamily = font.family;
|
|
36
|
-
const fontSize = props.fontSize || font.size[val];
|
|
37
|
-
const lineHeight = props.lineHeight || font.lineHeight[val];
|
|
38
|
-
const fontWeight = props.fontWeight || font.weight[val];
|
|
39
|
-
const letterSpacing = props.letterSpacing || font.letterSpacing[val];
|
|
40
|
-
const fontStyle = props.fontStyle || ((_a = font.style) == null ? void 0 : _a[val]);
|
|
41
|
-
const textTransform = props.textTransform || ((_b = font.transform) == null ? void 0 : _b[val]);
|
|
42
|
-
const color = props.color || ((_c = font.color) == null ? void 0 : _c[val]) || theme.color;
|
|
43
|
-
const style = {
|
|
44
|
-
color,
|
|
45
|
-
fontStyle,
|
|
46
|
-
textTransform,
|
|
47
|
-
fontFamily,
|
|
48
|
-
fontWeight,
|
|
49
|
-
letterSpacing,
|
|
50
|
-
fontSize,
|
|
51
|
-
lineHeight
|
|
52
|
-
};
|
|
53
|
-
if (process.env.NODE_ENV === "development") {
|
|
54
|
-
if (props["debug"]) {
|
|
55
|
-
console.groupCollapsed(" \u{1F539} getFont", val, props["fontWeight"], props["fow"]);
|
|
56
|
-
console.log({ style, props, font });
|
|
57
|
-
console.groupEnd();
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
return style;
|
|
61
|
-
};
|
|
62
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
63
|
-
0 && (module.exports = {
|
|
64
|
-
getFont
|
|
65
|
-
});
|
|
66
|
-
//# sourceMappingURL=getFont.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/helpers/getFont.tsx"],
|
|
4
|
-
"sourcesContent": ["/* eslint-disable no-console */\nimport { getVariableValue } from '../createVariable'\nimport { FontSizeTokens, TextProps, VariantSpreadFunction } from '../types'\n\nexport const getFont: VariantSpreadFunction<TextProps, FontSizeTokens> = (\n val = '$4',\n { fonts, theme, props }\n) => {\n const family = getVariableValue(props.fontFamily) || '$body'\n const font = fonts[family] || fonts['$body']\n if (!font) {\n if (process.env.NODE_ENV === 'development') {\n console.warn('\u26A0\uFE0F no font found', { family, fontTokens: Object.keys(fonts), val })\n }\n return {} as any\n }\n const fontFamily = font.family\n const fontSize = props.fontSize || font.size[val]\n const lineHeight = props.lineHeight || font.lineHeight[val]\n const fontWeight = props.fontWeight || font.weight[val]\n const letterSpacing = props.letterSpacing || font.letterSpacing[val]\n const fontStyle = props.fontStyle || font.style?.[val]\n const textTransform = props.textTransform || font.transform?.[val]\n const color = props.color || font.color?.[val] || theme.color\n const style = {\n color,\n fontStyle,\n textTransform,\n fontFamily,\n fontWeight,\n letterSpacing,\n fontSize,\n lineHeight,\n }\n if (process.env.NODE_ENV === 'development') {\n if (props['debug']) {\n console.groupCollapsed(' \uD83D\uDD39 getFont', val, props['fontWeight'], props['fow'])\n console.log({ style, props, font })\n console.groupEnd()\n }\n }\n return style\n}\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AACA,4BAAiC;AAG1B,MAAM,UAA4D,CACvE,MAAM,MACN,EAAE,OAAO,OAAO,MAAM,MACnB;AAPL;AAQE,QAAM,aAAS,wCAAiB,MAAM,UAAU,KAAK;AACrD,QAAM,OAAO,MAAM,WAAW,MAAM;AACpC,MAAI,CAAC,MAAM;AACT,QAAI,QAAQ,IAAI,aAAa,eAAe;AAC1C,cAAQ,KAAK,8BAAoB,EAAE,QAAQ,YAAY,OAAO,KAAK,KAAK,GAAG,IAAI,CAAC;AAAA,IAClF;AACA,WAAO,CAAC;AAAA,EACV;AACA,QAAM,aAAa,KAAK;AACxB,QAAM,WAAW,MAAM,YAAY,KAAK,KAAK;AAC7C,QAAM,aAAa,MAAM,cAAc,KAAK,WAAW;AACvD,QAAM,aAAa,MAAM,cAAc,KAAK,OAAO;AACnD,QAAM,gBAAgB,MAAM,iBAAiB,KAAK,cAAc;AAChE,QAAM,YAAY,MAAM,eAAa,UAAK,UAAL,mBAAa;AAClD,QAAM,gBAAgB,MAAM,mBAAiB,UAAK,cAAL,mBAAiB;AAC9D,QAAM,QAAQ,MAAM,WAAS,UAAK,UAAL,mBAAa,SAAQ,MAAM;AACxD,QAAM,QAAQ;AAAA,IACZ;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF;AACA,MAAI,QAAQ,IAAI,aAAa,eAAe;AAC1C,QAAI,MAAM,UAAU;AAClB,cAAQ,eAAe,uBAAgB,KAAK,MAAM,eAAe,MAAM,MAAM;AAC7E,cAAQ,IAAI,EAAE,OAAO,OAAO,KAAK,CAAC;AAClC,cAAQ,SAAS;AAAA,IACnB;AAAA,EACF;AACA,SAAO;AACT;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
|
@@ -1,44 +0,0 @@
|
|
|
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: true });
|
|
9
|
-
};
|
|
10
|
-
var __copyProps = (to, from, except, desc) => {
|
|
11
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
-
for (let key of __getOwnPropNames(from))
|
|
13
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
-
}
|
|
16
|
-
return to;
|
|
17
|
-
};
|
|
18
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
-
var getSize_exports = {};
|
|
20
|
-
__export(getSize_exports, {
|
|
21
|
-
getSize: () => getSize,
|
|
22
|
-
stepTokenUpOrDown: () => stepTokenUpOrDown
|
|
23
|
-
});
|
|
24
|
-
module.exports = __toCommonJS(getSize_exports);
|
|
25
|
-
var import_config = require("../config");
|
|
26
|
-
const getSize = (size, shift = 0, bounds = [0]) => {
|
|
27
|
-
return stepTokenUpOrDown((0, import_config.getTokens)(true).size, size, shift, bounds);
|
|
28
|
-
};
|
|
29
|
-
const stepTokenUpOrDown = (tokens, current, shift = 0, bounds = [0]) => {
|
|
30
|
-
const sizeNames = Object.keys(tokens);
|
|
31
|
-
const currentKeyNum = (typeof current === "string" ? current.replace("$", "") : current) || "4";
|
|
32
|
-
const nextKeyName = `$${+currentKeyNum + shift}`;
|
|
33
|
-
const min = bounds[0] ?? 0;
|
|
34
|
-
const max = bounds[1] ?? sizeNames.length - 1;
|
|
35
|
-
const index = Math.min(max, Math.max(min, sizeNames.indexOf(nextKeyName)));
|
|
36
|
-
const key = sizeNames[index];
|
|
37
|
-
return tokens[key] || tokens["$4"];
|
|
38
|
-
};
|
|
39
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
40
|
-
0 && (module.exports = {
|
|
41
|
-
getSize,
|
|
42
|
-
stepTokenUpOrDown
|
|
43
|
-
});
|
|
44
|
-
//# sourceMappingURL=getSize.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/helpers/getSize.ts"],
|
|
4
|
-
"sourcesContent": ["import { getTokens } from '../config'\nimport { SizeTokens, SpaceTokens } from '../types'\n\nexport const getSize = (size?: SizeTokens | undefined, shift = 0, bounds = [0]) => {\n return stepTokenUpOrDown(getTokens(true).size, size, shift, bounds)\n}\n\nexport const stepTokenUpOrDown = (\n tokens: Object,\n current?: SizeTokens | SpaceTokens | string,\n shift = 0,\n bounds = [0]\n) => {\n const sizeNames = Object.keys(tokens)\n const currentKeyNum = (typeof current === 'string' ? current.replace('$', '') : current) || '4'\n const nextKeyName = `$${+currentKeyNum + shift}`\n const min = bounds[0] ?? 0\n const max = bounds[1] ?? sizeNames.length - 1\n const index = Math.min(max, Math.max(min, sizeNames.indexOf(nextKeyName)))\n const key = sizeNames[index]\n return tokens[key] || tokens['$4']\n}\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,oBAA0B;AAGnB,MAAM,UAAU,CAAC,MAA+B,QAAQ,GAAG,SAAS,CAAC,CAAC,MAAM;AACjF,SAAO,sBAAkB,yBAAU,IAAI,EAAE,MAAM,MAAM,OAAO,MAAM;AACpE;AAEO,MAAM,oBAAoB,CAC/B,QACA,SACA,QAAQ,GACR,SAAS,CAAC,CAAC,MACR;AACH,QAAM,YAAY,OAAO,KAAK,MAAM;AACpC,QAAM,iBAAiB,OAAO,YAAY,WAAW,QAAQ,QAAQ,KAAK,EAAE,IAAI,YAAY;AAC5F,QAAM,cAAc,IAAI,CAAC,gBAAgB;AACzC,QAAM,MAAM,OAAO,MAAM;AACzB,QAAM,MAAM,OAAO,MAAM,UAAU,SAAS;AAC5C,QAAM,QAAQ,KAAK,IAAI,KAAK,KAAK,IAAI,KAAK,UAAU,QAAQ,WAAW,CAAC,CAAC;AACzE,QAAM,MAAM,UAAU;AACtB,SAAO,OAAO,QAAQ,OAAO;AAC/B;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var import_vitest = require("vitest");
|
|
3
|
-
var import_createComponent = require("../createComponent");
|
|
4
|
-
var import_Stack = require("../views/Stack");
|
|
5
|
-
var import_getSplitStyles = require("./getSplitStyles");
|
|
6
|
-
(0, import_vitest.describe)("getSplitStyles", () => {
|
|
7
|
-
(0, import_vitest.test)(`prop "accessibilityRequired" becomes "aria-required" and "required"`, () => {
|
|
8
|
-
const out = (0, import_getSplitStyles.getSplitStyles)(
|
|
9
|
-
{
|
|
10
|
-
accessibilityRequired: false
|
|
11
|
-
},
|
|
12
|
-
import_Stack.Stack.staticConfig,
|
|
13
|
-
{},
|
|
14
|
-
import_createComponent.defaultComponentState
|
|
15
|
-
);
|
|
16
|
-
console.log("out", out);
|
|
17
|
-
});
|
|
18
|
-
});
|
|
19
|
-
//# sourceMappingURL=getSplitStyles.test.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/helpers/getSplitStyles.test.tsx"],
|
|
4
|
-
"sourcesContent": ["import { describe, expect, test } from 'vitest'\n\nimport { defaultComponentState } from '../createComponent'\nimport { Stack } from '../views/Stack'\nimport { getSplitStyles } from './getSplitStyles'\n\ndescribe('getSplitStyles', () => {\n test(`prop \"accessibilityRequired\" becomes \"aria-required\" and \"required\"`, () => {\n const out = getSplitStyles(\n {\n accessibilityRequired: false,\n },\n Stack.staticConfig as any,\n {},\n defaultComponentState\n )\n\n console.log('out', out)\n })\n})\n"],
|
|
5
|
-
"mappings": ";AAAA,oBAAuC;AAEvC,6BAAsC;AACtC,mBAAsB;AACtB,4BAA+B;AAAA,IAE/B,wBAAS,kBAAkB,MAAM;AAC/B,0BAAK,uEAAuE,MAAM;AAChF,UAAM,UAAM;AAAA,MACV;AAAA,QACE,uBAAuB;AAAA,MACzB;AAAA,MACA,mBAAM;AAAA,MACN,CAAC;AAAA,MACD;AAAA,IACF;AAEA,YAAQ,IAAI,OAAO,GAAG;AAAA,EACxB,CAAC;AACH,CAAC;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
|
@@ -1,46 +0,0 @@
|
|
|
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: true });
|
|
9
|
-
};
|
|
10
|
-
var __copyProps = (to, from, except, desc) => {
|
|
11
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
-
for (let key of __getOwnPropNames(from))
|
|
13
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
-
}
|
|
16
|
-
return to;
|
|
17
|
-
};
|
|
18
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
-
var getStackSize_exports = {};
|
|
20
|
-
__export(getStackSize_exports, {
|
|
21
|
-
getButtonSize: () => getButtonSize
|
|
22
|
-
});
|
|
23
|
-
module.exports = __toCommonJS(getStackSize_exports);
|
|
24
|
-
var import_getSize = require("./getSize");
|
|
25
|
-
const getButtonSize = (val, { tokens }) => {
|
|
26
|
-
if (typeof val === "number") {
|
|
27
|
-
return {
|
|
28
|
-
paddingHorizontal: val * 0.25,
|
|
29
|
-
height: val,
|
|
30
|
-
borderRadius: val * 0.2
|
|
31
|
-
};
|
|
32
|
-
}
|
|
33
|
-
const ySize = (0, import_getSize.getSize)(val, 0);
|
|
34
|
-
const xSize = (0, import_getSize.stepTokenUpOrDown)(tokens.space, val);
|
|
35
|
-
const radiusToken = tokens.radius[val] ?? tokens.radius["$4"];
|
|
36
|
-
return {
|
|
37
|
-
paddingHorizontal: xSize,
|
|
38
|
-
height: ySize,
|
|
39
|
-
borderRadius: radiusToken
|
|
40
|
-
};
|
|
41
|
-
};
|
|
42
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
43
|
-
0 && (module.exports = {
|
|
44
|
-
getButtonSize
|
|
45
|
-
});
|
|
46
|
-
//# sourceMappingURL=getStackSize.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/helpers/getStackSize.ts"],
|
|
4
|
-
"sourcesContent": ["import { SizeTokens, VariantSpreadExtras } from '../types'\nimport { getSize, stepTokenUpOrDown } from './getSize'\n\nexport type ScaleVariantExtras = Pick<VariantSpreadExtras<any>, 'tokens' | 'props' | 'fonts'>\n\nexport const getButtonSize = (val: SizeTokens | number, { tokens }: VariantSpreadExtras<any>) => {\n if (typeof val === 'number') {\n return {\n paddingHorizontal: val * 0.25,\n height: val,\n borderRadius: val * 0.2,\n }\n }\n const ySize = getSize(val, 0)\n const xSize = stepTokenUpOrDown(tokens.space, val)\n const radiusToken = tokens.radius[val] ?? tokens.radius['$4']\n return {\n paddingHorizontal: xSize,\n height: ySize,\n borderRadius: radiusToken,\n }\n}\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AACA,qBAA2C;AAIpC,MAAM,gBAAgB,CAAC,KAA0B,EAAE,OAAO,MAAgC;AAC/F,MAAI,OAAO,QAAQ,UAAU;AAC3B,WAAO;AAAA,MACL,mBAAmB,MAAM;AAAA,MACzB,QAAQ;AAAA,MACR,cAAc,MAAM;AAAA,IACtB;AAAA,EACF;AACA,QAAM,YAAQ,wBAAQ,KAAK,CAAC;AAC5B,QAAM,YAAQ,kCAAkB,OAAO,OAAO,GAAG;AACjD,QAAM,cAAc,OAAO,OAAO,QAAQ,OAAO,OAAO;AACxD,SAAO;AAAA,IACL,mBAAmB;AAAA,IACnB,QAAQ;AAAA,IACR,cAAc;AAAA,EAChB;AACF;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __create = Object.create;
|
|
3
|
-
var __defProp = Object.defineProperty;
|
|
4
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
-
var __export = (target, all) => {
|
|
9
|
-
for (var name in all)
|
|
10
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
-
};
|
|
12
|
-
var __copyProps = (to, from, except, desc) => {
|
|
13
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
-
for (let key of __getOwnPropNames(from))
|
|
15
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
-
}
|
|
18
|
-
return to;
|
|
19
|
-
};
|
|
20
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
22
|
-
mod
|
|
23
|
-
));
|
|
24
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
25
|
-
var startTransition_exports = {};
|
|
26
|
-
__export(startTransition_exports, {
|
|
27
|
-
startTransition: () => startTransition
|
|
28
|
-
});
|
|
29
|
-
module.exports = __toCommonJS(startTransition_exports);
|
|
30
|
-
var import_react = __toESM(require("react"));
|
|
31
|
-
const startTransition = import_react.default.startTransition || ((cb) => cb());
|
|
32
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
33
|
-
0 && (module.exports = {
|
|
34
|
-
startTransition
|
|
35
|
-
});
|
|
36
|
-
//# sourceMappingURL=startTransition.js.map
|