@vellira-ui/react-native 2.98.7 → 2.100.0
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/index.js +311 -232
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -4,6 +4,59 @@ import { createConsoleOverlayDiagnostics, createOverlayManagerStore, createOverl
|
|
|
4
4
|
import { controlSizes, darkTheme, highContrastTheme, lightTheme } from "@vellira-ui/tokens";
|
|
5
5
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
6
6
|
import { Check, ChevronDown, Close, Search } from "@vellira-ui/icons";
|
|
7
|
+
//#region src/theme/componentTokenOutput.ts
|
|
8
|
+
const componentShadowLevels = [
|
|
9
|
+
"sm",
|
|
10
|
+
"md",
|
|
11
|
+
"lg",
|
|
12
|
+
"xl"
|
|
13
|
+
];
|
|
14
|
+
function hasExactKeys(candidate, expectedKeys) {
|
|
15
|
+
const actualKeys = Object.keys(candidate);
|
|
16
|
+
return actualKeys.length === expectedKeys.length && actualKeys.every((key) => expectedKeys.includes(key));
|
|
17
|
+
}
|
|
18
|
+
function isComponentPlatformIntent(value) {
|
|
19
|
+
if (typeof value !== "object" || value === null || Array.isArray(value)) return false;
|
|
20
|
+
const candidate = value;
|
|
21
|
+
if (candidate.kind === "shadow") {
|
|
22
|
+
if (candidate.role === "focus-ring" || candidate.role === "none") return hasExactKeys(candidate, ["kind", "role"]);
|
|
23
|
+
return candidate.role === "elevation" && hasExactKeys(candidate, [
|
|
24
|
+
"kind",
|
|
25
|
+
"role",
|
|
26
|
+
"level"
|
|
27
|
+
]) && typeof candidate.level === "string" && componentShadowLevels.includes(candidate.level);
|
|
28
|
+
}
|
|
29
|
+
return candidate.kind === "viewport-height" && hasExactKeys(candidate, ["kind", "ratio"]) && typeof candidate.ratio === "number" && Number.isFinite(candidate.ratio) && candidate.ratio > 0 && candidate.ratio <= 1;
|
|
30
|
+
}
|
|
31
|
+
function formatPercentage(ratio) {
|
|
32
|
+
const percentage = ratio * 100;
|
|
33
|
+
return Number.isInteger(percentage) ? String(percentage) : String(Number(percentage.toFixed(4)));
|
|
34
|
+
}
|
|
35
|
+
function resolveIntentForWeb(theme, intent) {
|
|
36
|
+
if (intent.kind === "viewport-height") return `${formatPercentage(intent.ratio)}vh`;
|
|
37
|
+
if (intent.role === "focus-ring") return theme.semantic.focus.ring.shadow;
|
|
38
|
+
if (intent.role === "none") return "none";
|
|
39
|
+
return theme.semantic.shadow[intent.level];
|
|
40
|
+
}
|
|
41
|
+
function resolveIntentForReactNative(theme, intent) {
|
|
42
|
+
if (intent.kind === "viewport-height") return `${formatPercentage(intent.ratio)}%`;
|
|
43
|
+
if (intent.role === "focus-ring" || intent.role === "none") return null;
|
|
44
|
+
const nativeLevel = intent.level === "xl" ? "lg" : intent.level;
|
|
45
|
+
return theme.tokens.shadows[nativeLevel];
|
|
46
|
+
}
|
|
47
|
+
function adaptComponentTokenTree(value, resolveIntent) {
|
|
48
|
+
if (isComponentPlatformIntent(value)) return resolveIntent(value);
|
|
49
|
+
if (Array.isArray(value)) return value.map((entry) => adaptComponentTokenTree(entry, resolveIntent));
|
|
50
|
+
if (typeof value === "object" && value !== null) return Object.fromEntries(Object.entries(value).map(([key, entry]) => [key, adaptComponentTokenTree(entry, resolveIntent)]));
|
|
51
|
+
return value;
|
|
52
|
+
}
|
|
53
|
+
function resolveComponentTokenPlatformOutputs(theme, componentTokens) {
|
|
54
|
+
return {
|
|
55
|
+
web: adaptComponentTokenTree(componentTokens, (intent) => resolveIntentForWeb(theme, intent)),
|
|
56
|
+
reactNative: adaptComponentTokenTree(componentTokens, (intent) => resolveIntentForReactNative(theme, intent))
|
|
57
|
+
};
|
|
58
|
+
}
|
|
59
|
+
//#endregion
|
|
7
60
|
//#region src/theme/fontWeight.ts
|
|
8
61
|
const nativeFontWeights = /* @__PURE__ */ new Set([
|
|
9
62
|
"normal",
|
|
@@ -936,82 +989,88 @@ DropdownContext.displayName = "DropdownContext";
|
|
|
936
989
|
//#endregion
|
|
937
990
|
//#region src/components/Dropdown/Content/DropdownContent.styles.ts
|
|
938
991
|
const getDropdownBackdropBackgroundColor = (theme, presentation) => presentation === "popover" ? "transparent" : theme.semantic.overlay.backdrop;
|
|
939
|
-
const createStyles$22 = (theme) =>
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
992
|
+
const createStyles$22 = (theme) => {
|
|
993
|
+
const canonical = theme.components.dropdown.content;
|
|
994
|
+
const output = resolveComponentTokenPlatformOutputs(theme, canonical);
|
|
995
|
+
const nativeShadow = output.reactNative.shadow;
|
|
996
|
+
if (nativeShadow === null || typeof nativeShadow === "string") throw new Error("Dropdown content shadow must resolve to a structured React Native shadow.");
|
|
997
|
+
return StyleSheet.create({
|
|
998
|
+
modalRoot: { flex: 1 },
|
|
999
|
+
sheet: { justifyContent: "flex-end" },
|
|
1000
|
+
modal: {
|
|
1001
|
+
alignItems: "center",
|
|
1002
|
+
justifyContent: "center",
|
|
1003
|
+
padding: theme.tokens.spacing[4]
|
|
1004
|
+
},
|
|
1005
|
+
popover: { flex: 1 },
|
|
1006
|
+
backdrop: { ...StyleSheet.absoluteFill },
|
|
1007
|
+
menu: {
|
|
1008
|
+
maxHeight: "50%",
|
|
1009
|
+
overflow: "hidden",
|
|
1010
|
+
padding: theme.tokens.spacing[1],
|
|
1011
|
+
backgroundColor: canonical.bg,
|
|
1012
|
+
borderColor: canonical.border,
|
|
1013
|
+
borderTopLeftRadius: theme.tokens.radius.lg,
|
|
1014
|
+
borderTopRightRadius: theme.tokens.radius.lg,
|
|
1015
|
+
borderWidth: 1,
|
|
1016
|
+
...Platform.select({
|
|
1017
|
+
web: { boxShadow: output.web.shadow },
|
|
1018
|
+
default: {
|
|
1019
|
+
shadowColor: nativeShadow.color,
|
|
1020
|
+
shadowOffset: {
|
|
1021
|
+
width: nativeShadow.x,
|
|
1022
|
+
height: -nativeShadow.y
|
|
1023
|
+
},
|
|
1024
|
+
shadowOpacity: nativeShadow.opacity,
|
|
1025
|
+
shadowRadius: nativeShadow.blur,
|
|
1026
|
+
elevation: nativeShadow.elevation
|
|
1027
|
+
}
|
|
1028
|
+
})
|
|
1029
|
+
},
|
|
1030
|
+
sheetMenu: {
|
|
1031
|
+
width: "100%",
|
|
1032
|
+
maxHeight: "70%",
|
|
1033
|
+
borderTopLeftRadius: theme.tokens.radius.lg,
|
|
1034
|
+
borderTopRightRadius: theme.tokens.radius.lg
|
|
1035
|
+
},
|
|
1036
|
+
modalMenu: {
|
|
1037
|
+
width: "100%",
|
|
1038
|
+
maxWidth: 420,
|
|
1039
|
+
maxHeight: "70%",
|
|
1040
|
+
borderRadius: theme.tokens.radius.lg
|
|
1041
|
+
},
|
|
1042
|
+
popoverMenu: {
|
|
1043
|
+
width: "100%",
|
|
1044
|
+
maxWidth: 360,
|
|
1045
|
+
maxHeight: "60%",
|
|
1046
|
+
borderRadius: theme.tokens.radius.md
|
|
1047
|
+
},
|
|
1048
|
+
searchWrap: {
|
|
1049
|
+
minHeight: 40,
|
|
1050
|
+
flexDirection: "row",
|
|
1051
|
+
alignItems: "center",
|
|
1052
|
+
gap: theme.tokens.spacing[2],
|
|
1053
|
+
paddingHorizontal: theme.tokens.spacing[3],
|
|
1054
|
+
borderBottomWidth: 1,
|
|
1055
|
+
borderBottomColor: theme.components.dropdown.separator.bg
|
|
1056
|
+
},
|
|
1057
|
+
searchIcon: {
|
|
1058
|
+
width: 16,
|
|
1059
|
+
height: 16,
|
|
1060
|
+
alignItems: "center",
|
|
1061
|
+
justifyContent: "center"
|
|
1062
|
+
},
|
|
1063
|
+
searchInput: {
|
|
1064
|
+
flex: 1,
|
|
1065
|
+
minWidth: 0,
|
|
1066
|
+
paddingVertical: theme.tokens.spacing[2],
|
|
1067
|
+
color: theme.components.dropdown.content.fg,
|
|
1068
|
+
fontFamily: theme.tokens.typography.family.regular,
|
|
1069
|
+
fontSize: theme.tokens.typography.size.sm,
|
|
1070
|
+
lineHeight: theme.tokens.typography.lineHeight.sm
|
|
1071
|
+
}
|
|
1072
|
+
});
|
|
1073
|
+
};
|
|
1015
1074
|
//#endregion
|
|
1016
1075
|
//#region src/components/Dropdown/Content/DropdownContent.tsx
|
|
1017
1076
|
const nativePointerEventsBoxNone$1 = Platform.OS === "web" ? void 0 : { pointerEvents: "box-none" };
|
|
@@ -2201,30 +2260,38 @@ const ModalClose = ({ asChild = false, children, accessibilityLabel, style }) =>
|
|
|
2201
2260
|
ModalClose.displayName = "Modal.Close";
|
|
2202
2261
|
//#endregion
|
|
2203
2262
|
//#region src/components/Modal/Content/ModalContent.styles.ts
|
|
2204
|
-
const createStyles$14 = (theme) =>
|
|
2205
|
-
|
|
2206
|
-
|
|
2207
|
-
|
|
2208
|
-
|
|
2209
|
-
|
|
2210
|
-
|
|
2211
|
-
|
|
2212
|
-
|
|
2213
|
-
|
|
2214
|
-
|
|
2215
|
-
|
|
2216
|
-
|
|
2217
|
-
|
|
2218
|
-
|
|
2219
|
-
|
|
2220
|
-
|
|
2221
|
-
|
|
2222
|
-
|
|
2223
|
-
|
|
2224
|
-
|
|
2225
|
-
|
|
2226
|
-
|
|
2227
|
-
|
|
2263
|
+
const createStyles$14 = (theme) => {
|
|
2264
|
+
const canonical = theme.components.modal.content;
|
|
2265
|
+
const output = resolveComponentTokenPlatformOutputs(theme, canonical);
|
|
2266
|
+
const nativeShadow = output.reactNative.shadow;
|
|
2267
|
+
return StyleSheet.create({ content: {
|
|
2268
|
+
width: "100%",
|
|
2269
|
+
maxWidth: canonical.size.md,
|
|
2270
|
+
maxHeight: Platform.select({
|
|
2271
|
+
web: output.web.maxHeight,
|
|
2272
|
+
default: output.reactNative.maxHeight
|
|
2273
|
+
}),
|
|
2274
|
+
padding: canonical.padding,
|
|
2275
|
+
gap: canonical.gap,
|
|
2276
|
+
backgroundColor: canonical.bg,
|
|
2277
|
+
borderColor: canonical.border,
|
|
2278
|
+
borderRadius: canonical.radius,
|
|
2279
|
+
borderWidth: canonical.borderWidth,
|
|
2280
|
+
...Platform.select({
|
|
2281
|
+
web: { boxShadow: output.web.shadow },
|
|
2282
|
+
default: {
|
|
2283
|
+
shadowColor: nativeShadow.color,
|
|
2284
|
+
shadowOffset: {
|
|
2285
|
+
width: nativeShadow.x,
|
|
2286
|
+
height: nativeShadow.y
|
|
2287
|
+
},
|
|
2288
|
+
shadowOpacity: nativeShadow.opacity,
|
|
2289
|
+
shadowRadius: nativeShadow.blur,
|
|
2290
|
+
elevation: nativeShadow.elevation
|
|
2291
|
+
}
|
|
2292
|
+
})
|
|
2293
|
+
} });
|
|
2294
|
+
};
|
|
2228
2295
|
//#endregion
|
|
2229
2296
|
//#region src/components/Modal/Content/ModalContent.tsx
|
|
2230
2297
|
const ModalContent = ({ children, style }) => {
|
|
@@ -2701,26 +2768,27 @@ const styles = StyleSheet.create({
|
|
|
2701
2768
|
content: { position: "absolute" }
|
|
2702
2769
|
});
|
|
2703
2770
|
function createPopoverContentStyles(theme) {
|
|
2704
|
-
const
|
|
2705
|
-
const
|
|
2771
|
+
const canonical = theme.components.popover.content;
|
|
2772
|
+
const output = resolveComponentTokenPlatformOutputs(theme, canonical);
|
|
2773
|
+
const nativeShadow = output.reactNative.shadow;
|
|
2706
2774
|
return StyleSheet.create({ content: {
|
|
2707
|
-
minWidth:
|
|
2708
|
-
maxWidth:
|
|
2709
|
-
padding:
|
|
2710
|
-
gap:
|
|
2711
|
-
backgroundColor:
|
|
2712
|
-
borderColor:
|
|
2713
|
-
borderWidth:
|
|
2714
|
-
borderRadius:
|
|
2715
|
-
...Platform.OS === "web" ? { boxShadow:
|
|
2716
|
-
shadowColor:
|
|
2717
|
-
shadowOpacity:
|
|
2718
|
-
shadowRadius:
|
|
2775
|
+
minWidth: canonical.minWidth,
|
|
2776
|
+
maxWidth: canonical.maxWidth,
|
|
2777
|
+
padding: canonical.padding,
|
|
2778
|
+
gap: canonical.gap,
|
|
2779
|
+
backgroundColor: canonical.bg,
|
|
2780
|
+
borderColor: canonical.border,
|
|
2781
|
+
borderWidth: canonical.borderWidth,
|
|
2782
|
+
borderRadius: canonical.radius,
|
|
2783
|
+
...Platform.OS === "web" ? { boxShadow: output.web.shadow } : {
|
|
2784
|
+
shadowColor: nativeShadow.color,
|
|
2785
|
+
shadowOpacity: nativeShadow.opacity,
|
|
2786
|
+
shadowRadius: nativeShadow.blur,
|
|
2719
2787
|
shadowOffset: {
|
|
2720
|
-
width:
|
|
2721
|
-
height:
|
|
2788
|
+
width: nativeShadow.x,
|
|
2789
|
+
height: nativeShadow.y
|
|
2722
2790
|
},
|
|
2723
|
-
elevation:
|
|
2791
|
+
elevation: nativeShadow.elevation
|
|
2724
2792
|
}
|
|
2725
2793
|
} });
|
|
2726
2794
|
}
|
|
@@ -3991,87 +4059,93 @@ const SelectLoadingState = () => {
|
|
|
3991
4059
|
SelectLoadingState.displayName = "Select.LoadingState";
|
|
3992
4060
|
//#endregion
|
|
3993
4061
|
//#region src/components/Select/Presentation/SelectPresentation.styles.ts
|
|
3994
|
-
const createPresentationStyles = (theme) =>
|
|
3995
|
-
|
|
3996
|
-
|
|
3997
|
-
|
|
3998
|
-
|
|
3999
|
-
|
|
4000
|
-
|
|
4001
|
-
|
|
4002
|
-
|
|
4003
|
-
|
|
4004
|
-
|
|
4005
|
-
|
|
4006
|
-
|
|
4007
|
-
|
|
4008
|
-
|
|
4009
|
-
|
|
4010
|
-
|
|
4011
|
-
|
|
4012
|
-
|
|
4013
|
-
|
|
4014
|
-
|
|
4015
|
-
|
|
4016
|
-
|
|
4017
|
-
|
|
4018
|
-
|
|
4019
|
-
},
|
|
4020
|
-
shadowOpacity: theme.tokens.shadows.lg.opacity,
|
|
4021
|
-
shadowRadius: theme.tokens.shadows.lg.blur,
|
|
4022
|
-
elevation: theme.tokens.shadows.lg.elevation
|
|
4023
|
-
}
|
|
4024
|
-
}) },
|
|
4025
|
-
sheetSurface: {
|
|
4026
|
-
borderTopLeftRadius: theme.tokens.radius.lg,
|
|
4027
|
-
borderTopRightRadius: theme.tokens.radius.lg,
|
|
4028
|
-
...Platform.select({
|
|
4029
|
-
web: { boxShadow: `0 -${theme.tokens.shadows.lg.y}px ${theme.tokens.shadows.lg.blur}px color-mix(in srgb, ${theme.tokens.shadows.lg.color} ${theme.tokens.shadows.lg.opacity * 100}%, transparent)` },
|
|
4062
|
+
const createPresentationStyles = (theme) => {
|
|
4063
|
+
const canonical = theme.components.select.dropdown;
|
|
4064
|
+
const output = resolveComponentTokenPlatformOutputs(theme, canonical);
|
|
4065
|
+
const nativeShadow = output.reactNative.shadow;
|
|
4066
|
+
if (nativeShadow === null || typeof nativeShadow === "string") throw new Error("Select dropdown shadow must resolve to a structured React Native shadow.");
|
|
4067
|
+
return StyleSheet.create({
|
|
4068
|
+
modalRoot: { flex: 1 },
|
|
4069
|
+
sheetRoot: { justifyContent: "flex-end" },
|
|
4070
|
+
modalPresentationRoot: {
|
|
4071
|
+
alignItems: "center",
|
|
4072
|
+
justifyContent: "center",
|
|
4073
|
+
padding: theme.tokens.spacing[4]
|
|
4074
|
+
},
|
|
4075
|
+
backdrop: {
|
|
4076
|
+
...StyleSheet.absoluteFill,
|
|
4077
|
+
backgroundColor: theme.semantic.overlay.backdrop
|
|
4078
|
+
},
|
|
4079
|
+
content: {
|
|
4080
|
+
overflow: "hidden",
|
|
4081
|
+
backgroundColor: canonical.bg,
|
|
4082
|
+
borderColor: canonical.border,
|
|
4083
|
+
borderWidth: 1
|
|
4084
|
+
},
|
|
4085
|
+
surface: { ...Platform.select({
|
|
4086
|
+
web: { boxShadow: output.web.shadow },
|
|
4030
4087
|
default: {
|
|
4031
|
-
shadowColor:
|
|
4088
|
+
shadowColor: nativeShadow.color,
|
|
4032
4089
|
shadowOffset: {
|
|
4033
|
-
width:
|
|
4034
|
-
height:
|
|
4090
|
+
width: nativeShadow.x,
|
|
4091
|
+
height: nativeShadow.y
|
|
4035
4092
|
},
|
|
4036
|
-
shadowOpacity:
|
|
4037
|
-
shadowRadius:
|
|
4038
|
-
elevation:
|
|
4093
|
+
shadowOpacity: nativeShadow.opacity,
|
|
4094
|
+
shadowRadius: nativeShadow.blur,
|
|
4095
|
+
elevation: nativeShadow.elevation
|
|
4039
4096
|
}
|
|
4040
|
-
})
|
|
4041
|
-
|
|
4042
|
-
|
|
4043
|
-
|
|
4044
|
-
|
|
4045
|
-
|
|
4046
|
-
|
|
4047
|
-
|
|
4048
|
-
|
|
4049
|
-
|
|
4050
|
-
|
|
4051
|
-
|
|
4052
|
-
|
|
4053
|
-
|
|
4054
|
-
|
|
4055
|
-
|
|
4056
|
-
|
|
4057
|
-
|
|
4058
|
-
|
|
4059
|
-
|
|
4060
|
-
|
|
4061
|
-
|
|
4062
|
-
|
|
4063
|
-
|
|
4064
|
-
|
|
4065
|
-
|
|
4066
|
-
|
|
4067
|
-
|
|
4068
|
-
|
|
4069
|
-
|
|
4070
|
-
|
|
4071
|
-
|
|
4072
|
-
|
|
4073
|
-
|
|
4074
|
-
|
|
4097
|
+
}) },
|
|
4098
|
+
sheetSurface: {
|
|
4099
|
+
borderTopLeftRadius: theme.tokens.radius.lg,
|
|
4100
|
+
borderTopRightRadius: theme.tokens.radius.lg,
|
|
4101
|
+
...Platform.select({
|
|
4102
|
+
web: { boxShadow: `0 -${theme.tokens.shadows.lg.y}px ${theme.tokens.shadows.lg.blur}px color-mix(in srgb, ${theme.tokens.shadows.lg.color} ${theme.tokens.shadows.lg.opacity * 100}%, transparent)` },
|
|
4103
|
+
default: {
|
|
4104
|
+
shadowColor: theme.tokens.shadows.lg.color,
|
|
4105
|
+
shadowOffset: {
|
|
4106
|
+
width: theme.tokens.shadows.lg.x,
|
|
4107
|
+
height: -theme.tokens.shadows.lg.y
|
|
4108
|
+
},
|
|
4109
|
+
shadowOpacity: theme.tokens.shadows.lg.opacity,
|
|
4110
|
+
shadowRadius: theme.tokens.shadows.lg.blur,
|
|
4111
|
+
elevation: theme.tokens.shadows.lg.elevation
|
|
4112
|
+
}
|
|
4113
|
+
})
|
|
4114
|
+
},
|
|
4115
|
+
modalSurface: {
|
|
4116
|
+
width: "100%",
|
|
4117
|
+
maxWidth: 420,
|
|
4118
|
+
borderRadius: theme.tokens.radius.lg
|
|
4119
|
+
},
|
|
4120
|
+
popoverSurface: { borderRadius: theme.tokens.radius.lg },
|
|
4121
|
+
sheet: {
|
|
4122
|
+
maxHeight: "74%",
|
|
4123
|
+
borderTopLeftRadius: theme.tokens.radius.lg,
|
|
4124
|
+
borderTopRightRadius: theme.tokens.radius.lg,
|
|
4125
|
+
borderBottomWidth: 0
|
|
4126
|
+
},
|
|
4127
|
+
modalPresentation: {
|
|
4128
|
+
width: "100%",
|
|
4129
|
+
maxWidth: 420,
|
|
4130
|
+
maxHeight: "74%",
|
|
4131
|
+
borderRadius: theme.tokens.radius.lg
|
|
4132
|
+
},
|
|
4133
|
+
popover: {
|
|
4134
|
+
maxHeight: "60%",
|
|
4135
|
+
borderRadius: theme.tokens.radius.lg
|
|
4136
|
+
},
|
|
4137
|
+
handleWrap: {
|
|
4138
|
+
alignItems: "center",
|
|
4139
|
+
paddingTop: theme.tokens.spacing[3]
|
|
4140
|
+
},
|
|
4141
|
+
handle: {
|
|
4142
|
+
width: 44,
|
|
4143
|
+
height: 4,
|
|
4144
|
+
borderRadius: 999,
|
|
4145
|
+
backgroundColor: theme.semantic.border.muted
|
|
4146
|
+
}
|
|
4147
|
+
});
|
|
4148
|
+
};
|
|
4075
4149
|
//#endregion
|
|
4076
4150
|
//#region src/components/Select/Presentation/SelectBackdrop.tsx
|
|
4077
4151
|
const SelectBackdrop = ({ outsidePressProps }) => {
|
|
@@ -6112,44 +6186,49 @@ function TooltipArrow() {
|
|
|
6112
6186
|
}
|
|
6113
6187
|
//#endregion
|
|
6114
6188
|
//#region src/components/Tooltip/Tooltip.styles.ts
|
|
6115
|
-
const createStyles$4 = (theme) =>
|
|
6116
|
-
|
|
6117
|
-
|
|
6118
|
-
|
|
6119
|
-
|
|
6120
|
-
|
|
6121
|
-
|
|
6122
|
-
|
|
6123
|
-
|
|
6124
|
-
|
|
6125
|
-
|
|
6126
|
-
|
|
6127
|
-
|
|
6128
|
-
|
|
6129
|
-
|
|
6130
|
-
|
|
6131
|
-
|
|
6132
|
-
|
|
6133
|
-
|
|
6134
|
-
|
|
6135
|
-
|
|
6136
|
-
|
|
6137
|
-
|
|
6138
|
-
|
|
6139
|
-
|
|
6140
|
-
|
|
6141
|
-
|
|
6142
|
-
|
|
6143
|
-
|
|
6144
|
-
|
|
6145
|
-
|
|
6146
|
-
|
|
6147
|
-
|
|
6148
|
-
|
|
6149
|
-
|
|
6150
|
-
|
|
6151
|
-
|
|
6152
|
-
|
|
6189
|
+
const createStyles$4 = (theme) => {
|
|
6190
|
+
const canonical = theme.components.tooltip.content;
|
|
6191
|
+
const output = resolveComponentTokenPlatformOutputs(theme, canonical);
|
|
6192
|
+
const nativeShadow = output.reactNative.shadow;
|
|
6193
|
+
return StyleSheet.create({
|
|
6194
|
+
root: { alignSelf: Platform.select({
|
|
6195
|
+
web: "auto",
|
|
6196
|
+
default: "flex-start"
|
|
6197
|
+
}) },
|
|
6198
|
+
overlay: { ...StyleSheet.absoluteFill },
|
|
6199
|
+
bubble: {
|
|
6200
|
+
position: "absolute",
|
|
6201
|
+
maxWidth: canonical.maxWidth,
|
|
6202
|
+
paddingHorizontal: canonical.paddingX,
|
|
6203
|
+
paddingVertical: canonical.paddingY,
|
|
6204
|
+
backgroundColor: canonical.bg,
|
|
6205
|
+
borderColor: canonical.border,
|
|
6206
|
+
borderRadius: canonical.radius,
|
|
6207
|
+
borderWidth: canonical.borderWidth,
|
|
6208
|
+
...Platform.select({
|
|
6209
|
+
web: { boxShadow: output.web.shadow },
|
|
6210
|
+
default: {
|
|
6211
|
+
shadowColor: nativeShadow.color,
|
|
6212
|
+
shadowOffset: {
|
|
6213
|
+
width: nativeShadow.x,
|
|
6214
|
+
height: nativeShadow.y
|
|
6215
|
+
},
|
|
6216
|
+
shadowOpacity: nativeShadow.opacity,
|
|
6217
|
+
shadowRadius: nativeShadow.blur,
|
|
6218
|
+
elevation: nativeShadow.elevation
|
|
6219
|
+
}
|
|
6220
|
+
})
|
|
6221
|
+
},
|
|
6222
|
+
text: {
|
|
6223
|
+
flexShrink: 1,
|
|
6224
|
+
color: canonical.fg,
|
|
6225
|
+
fontFamily: theme.tokens.typography.family.regular,
|
|
6226
|
+
fontSize: canonical.fontSize,
|
|
6227
|
+
lineHeight: canonical.lineHeight,
|
|
6228
|
+
textAlign: "center"
|
|
6229
|
+
}
|
|
6230
|
+
});
|
|
6231
|
+
};
|
|
6153
6232
|
//#endregion
|
|
6154
6233
|
//#region src/components/Tooltip/Content/TooltipContent.tsx
|
|
6155
6234
|
const TooltipContent = ({ children, forceMount = false, withArrow = false, style, textStyle }) => {
|