@tamagui/core 1.0.1-beta.91 → 1.0.1-beta.94
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/constants/rnw.native.js +0 -0
- package/dist/cjs/constants/rnw.native.js.map +0 -0
- package/dist/cjs/createComponent.js +39 -49
- package/dist/cjs/createComponent.js.map +2 -2
- package/dist/cjs/helpers/createPropMapper.js +24 -17
- package/dist/cjs/helpers/createPropMapper.js.map +2 -2
- package/dist/cjs/helpers/expandStyle.js +120 -0
- package/dist/cjs/helpers/expandStyle.js.map +7 -0
- package/dist/cjs/helpers/expandStyles.js +126 -0
- package/dist/cjs/helpers/expandStyles.js.map +7 -0
- package/dist/cjs/helpers/extendStaticConfig.js +5 -3
- package/dist/cjs/helpers/extendStaticConfig.js.map +2 -2
- package/dist/cjs/helpers/{getTextSize.js → getFont.js} +14 -8
- package/dist/cjs/helpers/getFont.js.map +7 -0
- package/dist/cjs/helpers/getSplitStyles.js +113 -108
- package/dist/cjs/helpers/getSplitStyles.js.map +2 -2
- package/dist/cjs/helpers/getStylesAtomic.js +165 -4
- package/dist/cjs/helpers/getStylesAtomic.js.map +2 -2
- package/dist/cjs/helpers/normalizeColor.js +76 -0
- package/dist/cjs/helpers/normalizeColor.js.map +7 -0
- package/dist/cjs/helpers/normalizeValueWithProperty.js +90 -0
- package/dist/cjs/helpers/normalizeValueWithProperty.js.map +7 -0
- package/dist/cjs/hooks/useFeatures.js +5 -2
- package/dist/cjs/hooks/useFeatures.js.map +2 -2
- package/dist/cjs/hooks/useTheme.js +1 -1
- package/dist/cjs/hooks/useTheme.js.map +2 -2
- package/dist/cjs/index.js +2 -4
- package/dist/cjs/index.js.map +2 -2
- package/dist/cjs/static.js +1 -1
- package/dist/cjs/static.js.map +2 -2
- package/dist/esm/constants/rnw.native.js +0 -0
- package/dist/esm/constants/rnw.native.js.map +0 -0
- package/dist/esm/createComponent.js +39 -49
- package/dist/esm/createComponent.js.map +2 -2
- package/dist/esm/helpers/createPropMapper.js +22 -15
- package/dist/esm/helpers/createPropMapper.js.map +2 -2
- package/dist/esm/helpers/expandStyle.js +99 -0
- package/dist/esm/helpers/expandStyle.js.map +7 -0
- package/dist/esm/helpers/expandStyles.js +103 -0
- package/dist/esm/helpers/expandStyles.js.map +7 -0
- package/dist/esm/helpers/extendStaticConfig.js +5 -3
- package/dist/esm/helpers/extendStaticConfig.js.map +2 -2
- package/dist/esm/helpers/{getTextSize.js → getFont.js} +10 -4
- package/dist/esm/helpers/getFont.js.map +7 -0
- package/dist/esm/helpers/getSplitStyles.js +114 -108
- package/dist/esm/helpers/getSplitStyles.js.map +2 -2
- package/dist/esm/helpers/getStylesAtomic.js +158 -2
- package/dist/esm/helpers/getStylesAtomic.js.map +2 -2
- package/dist/esm/helpers/normalizeColor.js +49 -0
- package/dist/esm/helpers/normalizeColor.js.map +7 -0
- package/dist/esm/helpers/normalizeValueWithProperty.js +67 -0
- package/dist/esm/helpers/normalizeValueWithProperty.js.map +7 -0
- package/dist/esm/hooks/useFeatures.js +5 -2
- package/dist/esm/hooks/useFeatures.js.map +2 -2
- package/dist/esm/hooks/useTheme.js +1 -1
- package/dist/esm/hooks/useTheme.js.map +2 -2
- package/dist/esm/index.js +2 -3
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/static.js +1 -1
- package/dist/esm/static.js.map +1 -1
- package/package.json +8 -8
- package/reset.css +2 -2
- package/types/constants/rnw.native.d.ts +0 -0
- package/types/constants/rnw.native.d.ts.map +0 -0
- package/types/createComponent.d.ts.map +1 -1
- package/types/helpers/createPropMapper.d.ts +2 -2
- package/types/helpers/createPropMapper.d.ts.map +1 -1
- package/types/helpers/createTamaguiProvider.d.ts +1 -0
- package/types/helpers/createTamaguiProvider.d.ts.map +1 -1
- package/types/helpers/expandStyle.d.ts +2 -0
- package/types/helpers/expandStyle.d.ts.map +1 -0
- package/types/helpers/expandStyles.d.ts +7 -0
- package/types/helpers/expandStyles.d.ts.map +1 -0
- package/types/helpers/extendStaticConfig.d.ts.map +1 -1
- package/types/helpers/getFont.d.ts +3 -0
- package/types/helpers/getFont.d.ts.map +1 -0
- package/types/helpers/getSplitStyles.d.ts +2 -3
- package/types/helpers/getSplitStyles.d.ts.map +1 -1
- package/types/helpers/getStylesAtomic.d.ts +6 -0
- package/types/helpers/getStylesAtomic.d.ts.map +1 -1
- package/types/helpers/normalizeColor.d.ts +3 -0
- package/types/helpers/normalizeColor.d.ts.map +1 -0
- package/types/helpers/normalizeValueWithProperty.d.ts +2 -0
- package/types/helpers/normalizeValueWithProperty.d.ts.map +1 -0
- package/types/hooks/useFeatures.d.ts.map +1 -1
- package/types/hooks/useTheme.d.ts.map +1 -1
- package/types/index.d.ts +2 -2
- package/types/index.d.ts.map +1 -1
- package/types/static.d.ts +1 -1
- package/types/static.d.ts.map +1 -1
- package/dist/cjs/assignNativePropsToWeb.js +0 -187
- package/dist/cjs/assignNativePropsToWeb.js.map +0 -7
- package/dist/cjs/helpers/fixNativeShadow.native.js +0 -51
- package/dist/cjs/helpers/fixNativeShadow.native.js.map +0 -7
- package/dist/cjs/helpers/generateAtomicStyles.js +0 -437
- package/dist/cjs/helpers/generateAtomicStyles.js.map +0 -7
- package/dist/cjs/helpers/getTextSize.js.map +0 -7
- package/dist/esm/assignNativePropsToWeb.js +0 -164
- package/dist/esm/assignNativePropsToWeb.js.map +0 -7
- package/dist/esm/helpers/fixNativeShadow.native.js +0 -28
- package/dist/esm/helpers/fixNativeShadow.native.js.map +0 -7
- package/dist/esm/helpers/generateAtomicStyles.js +0 -410
- package/dist/esm/helpers/generateAtomicStyles.js.map +0 -7
- package/dist/esm/helpers/getTextSize.js.map +0 -7
- package/types/assignNativePropsToWeb.d.ts +0 -2
- package/types/assignNativePropsToWeb.d.ts.map +0 -1
- package/types/helpers/fixNativeShadow.native.d.ts +0 -3
- package/types/helpers/fixNativeShadow.native.d.ts.map +0 -1
- package/types/helpers/generateAtomicStyles.d.ts +0 -12
- package/types/helpers/generateAtomicStyles.d.ts.map +0 -1
- package/types/helpers/getTextSize.d.ts +0 -3
- package/types/helpers/getTextSize.d.ts.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"normalizeColor.d.ts","sourceRoot":"","sources":["../../src/helpers/normalizeColor.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,cAAc,WAAY,MAAM,GAAG,MAAM,GAAG,IAAI,YAAY,MAAM,gCAoB9E,CAAA;AASD,wBAAgB,WAAW,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,oDAUjD"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"normalizeValueWithProperty.d.ts","sourceRoot":"","sources":["../../src/helpers/normalizeValueWithProperty.ts"],"names":[],"mappings":"AASA,wBAAgB,0BAA0B,CAAC,KAAK,EAAE,GAAG,EAAE,QAAQ,CAAC,EAAE,MAAM,GAAG,GAAG,CAe7E"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useFeatures.d.ts","sourceRoot":"","sources":["../../src/hooks/useFeatures.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"useFeatures.d.ts","sourceRoot":"","sources":["../../src/hooks/useFeatures.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AACjC,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,cAAc,CAAA;AAK9C,OAAO,EACL,YAAY,EACZ,eAAe,EACf,kBAAkB,EAClB,qBAAqB,EAErB,gBAAgB,EAEjB,MAAM,UAAU,CAAA;AAQjB,aAAK,YAAY,GAAG;IAClB,WAAW,EAAE,QAAQ,CAAA;IACrB,KAAK,EAAE,eAAe,CAAA;IACtB,eAAe,EAAE,CAAC,IAAI,EAAE,OAAO,CAAC,qBAAqB,CAAC,KAAK,IAAI,CAAA;IAC/D,aAAa,CAAC,EAAE,gBAAgB,CAAA;IAChC,OAAO,EAAE,YAAY,CAAA;IACrB,KAAK,EAAE,SAAS,GAAG,IAAI,GAAG,SAAS,CAAA;IACnC,YAAY,EAAE,kBAAkB,CAAA;IAChC,KAAK,EAAE,GAAG,CAAA;IACV,YAAY,CAAC,EAAE,MAAM,IAAI,CAAA;IACzB,OAAO,EAAE,SAAS,CAAC,WAAW,GAAG,IAAI,CAAC,CAAA;CACvC,CAAA;AAkBD,eAAO,MAAM,WAAW,UAAW,GAAG,UAAU,YAAY;;;;;;CAiB3D,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useTheme.d.ts","sourceRoot":"","sources":["../../src/hooks/useTheme.tsx"],"names":[],"mappings":"AAOA,OAAO,EAAqB,YAAY,EAAqC,MAAM,iBAAiB,CAAA;AACpG,OAAO,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,UAAU,CAAA;AAGjD,oBAAY,UAAU,GAAG;IACvB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,iBAAiB,CAAC,EAAE,OAAO,CAAA;IAC3B,IAAI,EAAE,OAAO,CAAC,SAAS,EAAE,MAAM,CAAC,GAAG,IAAI,CAAA;IACvC,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,QAAQ,CAAC,EAAE,GAAG,CAAA;IACd,KAAK,CAAC,EAAE,OAAO,CAAA;IACf,KAAK,CAAC,EAAE,OAAO,GAAG,SAAS,CAAA;CAC5B,CAAA;AAQD,eAAO,MAAM,QAAQ,eACP,MAAM,GAAG,IAAI,kBACT,MAAM,UACd,UAAU,gBACJ,GAAG,KAChB,
|
|
1
|
+
{"version":3,"file":"useTheme.d.ts","sourceRoot":"","sources":["../../src/hooks/useTheme.tsx"],"names":[],"mappings":"AAOA,OAAO,EAAqB,YAAY,EAAqC,MAAM,iBAAiB,CAAA;AACpG,OAAO,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,UAAU,CAAA;AAGjD,oBAAY,UAAU,GAAG;IACvB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,iBAAiB,CAAC,EAAE,OAAO,CAAA;IAC3B,IAAI,EAAE,OAAO,CAAC,SAAS,EAAE,MAAM,CAAC,GAAG,IAAI,CAAA;IACvC,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,QAAQ,CAAC,EAAE,GAAG,CAAA;IACd,KAAK,CAAC,EAAE,OAAO,CAAA;IACf,KAAK,CAAC,EAAE,OAAO,GAAG,SAAS,CAAA;CAC5B,CAAA;AAQD,eAAO,MAAM,QAAQ,eACP,MAAM,GAAG,IAAI,kBACT,MAAM,UACd,UAAU,gBACJ,GAAG,KAChB,WAkGF,CAAA;AAID,eAAO,MAAM,wBAAwB,UAAW,GAAG,QAElD,CAAA;AAED,eAAO,MAAM,YAAY,UAAW;IAAE,MAAM,CAAC,EAAE,IAAI,CAAA;CAAE,WAcpD,CAAA;AAED,eAAO,MAAM,mBAAmB,6BAE/B,CAAA;AAED,eAAO,MAAM,oBAAoB,UACxB,MAAM,GAAG,IAAI,kBACJ,MAAM,UACd,UAAU,oBACA,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;CA0CtB,CAAA"}
|
package/types/index.d.ts
CHANGED
|
@@ -25,8 +25,8 @@ export * from './helpers/getSplitStyles';
|
|
|
25
25
|
export * from './helpers/getStylesAtomic';
|
|
26
26
|
export * from './helpers/pseudoDescriptors';
|
|
27
27
|
export * from './helpers/mergeProps';
|
|
28
|
-
export
|
|
29
|
-
export * from './helpers/
|
|
28
|
+
export * from './helpers/expandStyles';
|
|
29
|
+
export * from './helpers/getFont';
|
|
30
30
|
export * from './helpers/isObj';
|
|
31
31
|
export * from './helpers/isTamaguiElement';
|
|
32
32
|
export * from './helpers/isTamaguiComponent';
|
package/types/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAA;AACzB,cAAc,mBAAmB,CAAA;AACjC,cAAc,oBAAoB,CAAA;AAClC,c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10
10
|
export * from './helpers/isObj';
|
|
11
11
|
export * from './helpers/getStylesAtomic';
|
|
12
|
-
export * from './helpers/
|
|
12
|
+
export * from './helpers/expandStyles';
|
|
13
13
|
export * from './helpers/pseudoDescriptors';
|
|
14
14
|
export * from './helpers/proxyThemeVariables';
|
|
15
15
|
export * from './helpers/getSplitStyles';
|
package/types/static.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"static.d.ts","sourceRoot":"","sources":["../src/static.ts"],"names":[],"mappings":"AAEA,cAAc,UAAU,CAAA;AACxB,cAAc,mBAAmB,CAAA;AACjC,cAAc,cAAc,CAAA;AAC5B,cAAc,gBAAgB,CAAA;AAC9B,cAAc,iBAAiB,CAAA;AAC/B,cAAc,kBAAkB,CAAA;AAChC,cAAc,uBAAuB,CAAA;AAErC,cAAc,kBAAkB,CAAA;AAChC,cAAc,kBAAkB,CAAA;AAEhC,cAAc,iBAAiB,CAAA;AAC/B,cAAc,2BAA2B,CAAA;AACzC,cAAc,
|
|
1
|
+
{"version":3,"file":"static.d.ts","sourceRoot":"","sources":["../src/static.ts"],"names":[],"mappings":"AAEA,cAAc,UAAU,CAAA;AACxB,cAAc,mBAAmB,CAAA;AACjC,cAAc,cAAc,CAAA;AAC5B,cAAc,gBAAgB,CAAA;AAC9B,cAAc,iBAAiB,CAAA;AAC/B,cAAc,kBAAkB,CAAA;AAChC,cAAc,uBAAuB,CAAA;AAErC,cAAc,kBAAkB,CAAA;AAChC,cAAc,kBAAkB,CAAA;AAEhC,cAAc,iBAAiB,CAAA;AAC/B,cAAc,2BAA2B,CAAA;AACzC,cAAc,wBAAwB,CAAA;AACtC,cAAc,6BAA6B,CAAA;AAC3C,cAAc,+BAA+B,CAAA;AAC7C,cAAc,0BAA0B,CAAA;AACxC,cAAc,kBAAkB,CAAA;AAEhC,cAAc,SAAS,CAAA;AAIvB,eAAO,MAAM,GAAG,EAAE,GAA0E,CAAA"}
|
|
@@ -1,187 +0,0 @@
|
|
|
1
|
-
var __defProp = Object.defineProperty;
|
|
2
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
-
var __export = (target, all) => {
|
|
6
|
-
for (var name in all)
|
|
7
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
-
};
|
|
9
|
-
var __copyProps = (to, from, except, desc) => {
|
|
10
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
-
for (let key of __getOwnPropNames(from))
|
|
12
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
-
}
|
|
15
|
-
return to;
|
|
16
|
-
};
|
|
17
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
-
var assignNativePropsToWeb_exports = {};
|
|
19
|
-
__export(assignNativePropsToWeb_exports, {
|
|
20
|
-
assignNativePropsToWeb: () => assignNativePropsToWeb
|
|
21
|
-
});
|
|
22
|
-
module.exports = __toCommonJS(assignNativePropsToWeb_exports);
|
|
23
|
-
var import_createComponent = require("./createComponent");
|
|
24
|
-
function assignNativePropsToWeb(elementType, viewProps, nativeProps) {
|
|
25
|
-
if (!viewProps.role && nativeProps.accessibilityRole) {
|
|
26
|
-
if (nativeProps.accessibilityRole === "none") {
|
|
27
|
-
viewProps.role = "presentation";
|
|
28
|
-
} else {
|
|
29
|
-
const webRole = import_createComponent.accessibilityRoleToWebRole[nativeProps.accessibilityRole];
|
|
30
|
-
if (webRole != null) {
|
|
31
|
-
viewProps.role = webRole || nativeProps.accessibilityRole;
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
if (nativeProps.accessibilityActiveDescendant != null) {
|
|
36
|
-
viewProps["aria-activedescendant"] = nativeProps.accessibilityActiveDescendant;
|
|
37
|
-
}
|
|
38
|
-
if (nativeProps.accessibilityAtomic != null) {
|
|
39
|
-
viewProps["aria-atomic"] = nativeProps.accessibilityAtomic;
|
|
40
|
-
}
|
|
41
|
-
if (nativeProps.accessibilityAutoComplete != null) {
|
|
42
|
-
viewProps["aria-autocomplete"] = nativeProps.accessibilityAutoComplete;
|
|
43
|
-
}
|
|
44
|
-
if (nativeProps.accessibilityBusy != null) {
|
|
45
|
-
viewProps["aria-busy"] = nativeProps.accessibilityBusy;
|
|
46
|
-
}
|
|
47
|
-
if (nativeProps.accessibilityChecked != null) {
|
|
48
|
-
viewProps["aria-checked"] = nativeProps.accessibilityChecked;
|
|
49
|
-
}
|
|
50
|
-
if (nativeProps.accessibilityColumnCount != null) {
|
|
51
|
-
viewProps["aria-colcount"] = nativeProps.accessibilityColumnCount;
|
|
52
|
-
}
|
|
53
|
-
if (nativeProps.accessibilityColumnIndex != null) {
|
|
54
|
-
viewProps["aria-colindex"] = nativeProps.accessibilityColumnIndex;
|
|
55
|
-
}
|
|
56
|
-
if (nativeProps.accessibilityColumnSpan != null) {
|
|
57
|
-
viewProps["aria-colspan"] = nativeProps.accessibilityColumnSpan;
|
|
58
|
-
}
|
|
59
|
-
if (nativeProps.accessibilityControls != null) {
|
|
60
|
-
viewProps["aria-controls"] = (0, import_createComponent.processIDRefList)(nativeProps.accessibilityControls);
|
|
61
|
-
}
|
|
62
|
-
if (nativeProps.accessibilityCurrent != null) {
|
|
63
|
-
viewProps["aria-current"] = nativeProps.accessibilityCurrent;
|
|
64
|
-
}
|
|
65
|
-
if (nativeProps.accessibilityDescribedBy != null) {
|
|
66
|
-
viewProps["aria-describedby"] = (0, import_createComponent.processIDRefList)(nativeProps.accessibilityDescribedBy);
|
|
67
|
-
}
|
|
68
|
-
if (nativeProps.accessibilityDetails != null) {
|
|
69
|
-
viewProps["aria-details"] = nativeProps.accessibilityDetails;
|
|
70
|
-
}
|
|
71
|
-
if (nativeProps.disabled === true) {
|
|
72
|
-
viewProps["aria-disabled"] = true;
|
|
73
|
-
if (elementType === "button" || elementType === "form" || elementType === "input" || elementType === "select" || elementType === "textarea") {
|
|
74
|
-
viewProps.disabled = true;
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
if (nativeProps.accessibilityErrorMessage != null) {
|
|
78
|
-
viewProps["aria-errormessage"] = nativeProps.accessibilityErrorMessage;
|
|
79
|
-
}
|
|
80
|
-
if (nativeProps.accessibilityExpanded != null) {
|
|
81
|
-
viewProps["aria-expanded"] = nativeProps.accessibilityExpanded;
|
|
82
|
-
}
|
|
83
|
-
if (nativeProps.accessibilityFlowTo != null) {
|
|
84
|
-
viewProps["aria-flowto"] = (0, import_createComponent.processIDRefList)(nativeProps.accessibilityFlowTo);
|
|
85
|
-
}
|
|
86
|
-
if (nativeProps.accessibilityHasPopup != null) {
|
|
87
|
-
viewProps["aria-haspopup"] = nativeProps.accessibilityHasPopup;
|
|
88
|
-
}
|
|
89
|
-
if (nativeProps.accessibilityHidden === true) {
|
|
90
|
-
viewProps["aria-hidden"] = nativeProps.accessibilityHidden;
|
|
91
|
-
}
|
|
92
|
-
if (nativeProps.accessibilityInvalid != null) {
|
|
93
|
-
viewProps["aria-invalid"] = nativeProps.accessibilityInvalid;
|
|
94
|
-
}
|
|
95
|
-
if (nativeProps.accessibilityKeyShortcuts != null && Array.isArray(nativeProps.accessibilityKeyShortcuts)) {
|
|
96
|
-
viewProps["aria-keyshortcuts"] = nativeProps.accessibilityKeyShortcuts.join(" ");
|
|
97
|
-
}
|
|
98
|
-
if (nativeProps.accessibilityLabel != null) {
|
|
99
|
-
viewProps["aria-label"] = nativeProps.accessibilityLabel;
|
|
100
|
-
}
|
|
101
|
-
if (nativeProps.accessibilityLabelledBy != null) {
|
|
102
|
-
viewProps["aria-labelledby"] = (0, import_createComponent.processIDRefList)(nativeProps.accessibilityLabelledBy);
|
|
103
|
-
}
|
|
104
|
-
if (nativeProps.accessibilityLevel != null) {
|
|
105
|
-
viewProps["aria-level"] = nativeProps.accessibilityLevel;
|
|
106
|
-
}
|
|
107
|
-
if (nativeProps.accessibilityLiveRegion != null) {
|
|
108
|
-
viewProps["aria-live"] = nativeProps.accessibilityLiveRegion === "none" ? "off" : nativeProps.accessibilityLiveRegion;
|
|
109
|
-
}
|
|
110
|
-
if (nativeProps.accessibilityModal != null) {
|
|
111
|
-
viewProps["aria-modal"] = nativeProps.accessibilityModal;
|
|
112
|
-
}
|
|
113
|
-
if (nativeProps.accessibilityMultiline != null) {
|
|
114
|
-
viewProps["aria-multiline"] = nativeProps.accessibilityMultiline;
|
|
115
|
-
}
|
|
116
|
-
if (nativeProps.accessibilityMultiSelectable != null) {
|
|
117
|
-
viewProps["aria-multiselectable"] = nativeProps.accessibilityMultiSelectable;
|
|
118
|
-
}
|
|
119
|
-
if (nativeProps.accessibilityOrientation != null) {
|
|
120
|
-
viewProps["aria-orientation"] = nativeProps.accessibilityOrientation;
|
|
121
|
-
}
|
|
122
|
-
if (nativeProps.accessibilityOwns != null) {
|
|
123
|
-
viewProps["aria-owns"] = (0, import_createComponent.processIDRefList)(nativeProps.accessibilityOwns);
|
|
124
|
-
}
|
|
125
|
-
if (nativeProps.accessibilityPlaceholder != null) {
|
|
126
|
-
viewProps["aria-placeholder"] = nativeProps.accessibilityPlaceholder;
|
|
127
|
-
}
|
|
128
|
-
if (nativeProps.accessibilityPosInSet != null) {
|
|
129
|
-
viewProps["aria-posinset"] = nativeProps.accessibilityPosInSet;
|
|
130
|
-
}
|
|
131
|
-
if (nativeProps.accessibilityPressed != null) {
|
|
132
|
-
viewProps["aria-pressed"] = nativeProps.accessibilityPressed;
|
|
133
|
-
}
|
|
134
|
-
if (nativeProps.accessibilityReadOnly != null) {
|
|
135
|
-
viewProps["aria-readonly"] = nativeProps.accessibilityReadOnly;
|
|
136
|
-
if (elementType === "input" || elementType === "select" || elementType === "textarea") {
|
|
137
|
-
viewProps.readOnly = true;
|
|
138
|
-
}
|
|
139
|
-
}
|
|
140
|
-
if (nativeProps.accessibilityRequired != null) {
|
|
141
|
-
viewProps["aria-required"] = nativeProps.accessibilityRequired;
|
|
142
|
-
if (elementType === "input" || elementType === "select" || elementType === "textarea") {
|
|
143
|
-
viewProps.required = true;
|
|
144
|
-
}
|
|
145
|
-
}
|
|
146
|
-
if (nativeProps.accessibilityRoleDescription != null) {
|
|
147
|
-
viewProps["aria-roledescription"] = nativeProps.accessibilityRoleDescription;
|
|
148
|
-
}
|
|
149
|
-
if (nativeProps.accessibilityRowCount != null) {
|
|
150
|
-
viewProps["aria-rowcount"] = nativeProps.accessibilityRowCount;
|
|
151
|
-
}
|
|
152
|
-
if (nativeProps.accessibilityRowIndex != null) {
|
|
153
|
-
viewProps["aria-rowindex"] = nativeProps.accessibilityRowIndex;
|
|
154
|
-
}
|
|
155
|
-
if (nativeProps.accessibilityRowSpan != null) {
|
|
156
|
-
viewProps["aria-rowspan"] = nativeProps.accessibilityRowSpan;
|
|
157
|
-
}
|
|
158
|
-
if (nativeProps.accessibilitySelected != null) {
|
|
159
|
-
viewProps["aria-selected"] = nativeProps.accessibilitySelected;
|
|
160
|
-
}
|
|
161
|
-
if (nativeProps.accessibilitySetSize != null) {
|
|
162
|
-
viewProps["aria-setsize"] = nativeProps.accessibilitySetSize;
|
|
163
|
-
}
|
|
164
|
-
if (nativeProps.accessibilitySort != null) {
|
|
165
|
-
viewProps["aria-sort"] = nativeProps.accessibilitySort;
|
|
166
|
-
}
|
|
167
|
-
if (nativeProps.accessibilityValueMax != null) {
|
|
168
|
-
viewProps["aria-valuemax"] = nativeProps.accessibilityValueMax;
|
|
169
|
-
}
|
|
170
|
-
if (nativeProps.accessibilityValueMin != null) {
|
|
171
|
-
viewProps["aria-valuemin"] = nativeProps.accessibilityValueMin;
|
|
172
|
-
}
|
|
173
|
-
if (nativeProps.accessibilityValueNow != null) {
|
|
174
|
-
viewProps["aria-valuenow"] = nativeProps.accessibilityValueNow;
|
|
175
|
-
}
|
|
176
|
-
if (nativeProps.accessibilityValueText != null) {
|
|
177
|
-
viewProps["aria-valuetext"] = nativeProps.accessibilityValueText;
|
|
178
|
-
}
|
|
179
|
-
if (nativeProps.nativeID) {
|
|
180
|
-
viewProps.id = nativeProps.nativeID;
|
|
181
|
-
}
|
|
182
|
-
}
|
|
183
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
184
|
-
0 && (module.exports = {
|
|
185
|
-
assignNativePropsToWeb
|
|
186
|
-
});
|
|
187
|
-
//# sourceMappingURL=assignNativePropsToWeb.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../src/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,gCAAgC,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,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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,51 +0,0 @@
|
|
|
1
|
-
var __defProp = Object.defineProperty;
|
|
2
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
-
var __export = (target, all) => {
|
|
6
|
-
for (var name in all)
|
|
7
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
8
|
-
};
|
|
9
|
-
var __copyProps = (to, from, except, desc) => {
|
|
10
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
11
|
-
for (let key of __getOwnPropNames(from))
|
|
12
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
13
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
14
|
-
}
|
|
15
|
-
return to;
|
|
16
|
-
};
|
|
17
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
18
|
-
var fixNativeShadow_native_exports = {};
|
|
19
|
-
__export(fixNativeShadow_native_exports, {
|
|
20
|
-
fixNativeShadow: () => fixNativeShadow
|
|
21
|
-
});
|
|
22
|
-
module.exports = __toCommonJS(fixNativeShadow_native_exports);
|
|
23
|
-
const matchRgbaHsla = /(rgba|hsla)\(\s*([\d\.]{1,}%?)\s*,\s*([\d\.]{1,}%?)\s*,\s*([\d\.]{1,}%?)\s*,\s*([\d\.]{1,})\s*\)$/;
|
|
24
|
-
function fixNativeShadow(props) {
|
|
25
|
-
if (!props.shadowColor || props.shadowColor === "transparent") {
|
|
26
|
-
return;
|
|
27
|
-
}
|
|
28
|
-
if (!props.shadowOffset) {
|
|
29
|
-
props.shadowOffset = {
|
|
30
|
-
width: 0,
|
|
31
|
-
height: 0
|
|
32
|
-
};
|
|
33
|
-
}
|
|
34
|
-
const c = String(props.shadowColor);
|
|
35
|
-
if ((c[0] === "r" || c[0] === "h") && c[3] === "a") {
|
|
36
|
-
const [_, type, _1, _2, _3, a] = c.match(matchRgbaHsla) || [];
|
|
37
|
-
if (typeof a !== "string") {
|
|
38
|
-
console.trace("invalid", c, type);
|
|
39
|
-
throw new Error(`invalid style`);
|
|
40
|
-
}
|
|
41
|
-
props.shadowColor = `${type.replace("a", "")}(${_1},${_2},${_3})`;
|
|
42
|
-
props.shadowOpacity = props.shadowOpacity ?? +a;
|
|
43
|
-
} else {
|
|
44
|
-
props.shadowOpacity = props.shadowOpacity ?? 1;
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
48
|
-
0 && (module.exports = {
|
|
49
|
-
fixNativeShadow
|
|
50
|
-
});
|
|
51
|
-
//# sourceMappingURL=fixNativeShadow.native.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/helpers/fixNativeShadow.native.tsx"],
|
|
4
|
-
"sourcesContent": ["import { ViewStyle } from 'react-native'\n\nconst matchRgbaHsla =\n /(rgba|hsla)\\(\\s*([\\d\\.]{1,}%?)\\s*,\\s*([\\d\\.]{1,}%?)\\s*,\\s*([\\d\\.]{1,}%?)\\s*,\\s*([\\d\\.]{1,})\\s*\\)$/\n\nexport function fixNativeShadow(props: ViewStyle) {\n if (!props.shadowColor || props.shadowColor === 'transparent') {\n return\n }\n if (!props.shadowOffset) {\n // fixes some broken shadows\n props.shadowOffset = {\n width: 0,\n height: 0,\n }\n }\n const c = String(props.shadowColor)\n // react native has issues sometimes with rgba/hsla() convert to color + opacity\n if ((c[0] === 'r' || c[0] === 'h') && c[3] === 'a') {\n const [_, type, _1, _2, _3, a] = c.match(matchRgbaHsla) || []\n if (typeof a !== 'string') {\n console.trace('invalid', c, type)\n throw new Error(`invalid style`)\n }\n props.shadowColor = `${type.replace('a', '')}(${_1},${_2},${_3})`\n props.shadowOpacity = props.shadowOpacity ?? +a\n } else {\n props.shadowOpacity = props.shadowOpacity ?? 1\n }\n}\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAEA,MAAM,gBACJ;AAEK,yBAAyB,OAAkB;AAChD,MAAI,CAAC,MAAM,eAAe,MAAM,gBAAgB,eAAe;AAC7D;AAAA,EACF;AACA,MAAI,CAAC,MAAM,cAAc;AAEvB,UAAM,eAAe;AAAA,MACnB,OAAO;AAAA,MACP,QAAQ;AAAA,IACV;AAAA,EACF;AACA,QAAM,IAAI,OAAO,MAAM,WAAW;AAElC,MAAK,GAAE,OAAO,OAAO,EAAE,OAAO,QAAQ,EAAE,OAAO,KAAK;AAClD,UAAM,CAAC,GAAG,MAAM,IAAI,IAAI,IAAI,KAAK,EAAE,MAAM,aAAa,KAAK,CAAC;AAC5D,QAAI,OAAO,MAAM,UAAU;AACzB,cAAQ,MAAM,WAAW,GAAG,IAAI;AAChC,YAAM,IAAI,MAAM,eAAe;AAAA,IACjC;AACA,UAAM,cAAc,GAAG,KAAK,QAAQ,KAAK,EAAE,KAAK,MAAM,MAAM;AAC5D,UAAM,gBAAgB,MAAM,iBAAiB,CAAC;AAAA,EAChD,OAAO;AACL,UAAM,gBAAgB,MAAM,iBAAiB;AAAA,EAC/C;AACF;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|