@jobber/components-native 0.54.4-JOB-88641.7 → 0.54.4-fix-inline.3

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.
Files changed (148) hide show
  1. package/dist/package.json +7 -7
  2. package/dist/src/ActionItem/ActionItem.js +1 -1
  3. package/dist/src/Banner/Banner.js +2 -3
  4. package/dist/src/Banner/Banner.style.js +4 -2
  5. package/dist/src/Button/Button.js +2 -2
  6. package/dist/src/Button/Button.style.js +2 -2
  7. package/dist/src/Button/components/InternalButtonLoading/InternalButtonLoading.js +3 -0
  8. package/dist/src/ButtonGroup/ButtonGroup.js +1 -1
  9. package/dist/src/ButtonGroup/ButtonGroup.style.js +1 -1
  10. package/dist/src/Card/Card.js +7 -8
  11. package/dist/src/Disclosure/Disclosure.js +3 -3
  12. package/dist/src/Glimmer/Glimmer.js +42 -0
  13. package/dist/src/Glimmer/Glimmer.shape.style.js +16 -0
  14. package/dist/src/Glimmer/Glimmer.size.style.js +9 -0
  15. package/dist/src/Glimmer/Glimmer.style.js +20 -0
  16. package/dist/src/Glimmer/index.js +1 -0
  17. package/dist/src/InputCurrency/InputCurrency.js +16 -17
  18. package/dist/src/InputFieldWrapper/InputFieldWrapper.js +39 -18
  19. package/dist/src/InputFieldWrapper/InputFieldWrapper.style.js +38 -1
  20. package/dist/src/InputText/InputText.js +6 -3
  21. package/dist/src/Menu/Menu.js +20 -3
  22. package/dist/src/Menu/Menu.style.js +1 -1
  23. package/dist/src/Menu/utils.js +2 -7
  24. package/dist/src/index.js +6 -5
  25. package/dist/tsconfig.tsbuildinfo +1 -1
  26. package/dist/types/src/Banner/Banner.style.d.ts +4 -2
  27. package/dist/types/src/BottomSheet/components/BottomSheetOption/BottomSheetOption.d.ts +1 -1
  28. package/dist/types/src/ButtonGroup/ButtonGroup.style.d.ts +1 -1
  29. package/dist/types/src/ButtonGroup/components/SecondaryActionSheet/SecondaryActionSheet.d.ts +6 -6
  30. package/dist/types/src/Checkbox/CheckboxGroup.d.ts +2 -2
  31. package/dist/types/src/Form/components/FormBody/FormBody.d.ts +3 -3
  32. package/dist/types/src/Form/components/FormCache/FormCache.d.ts +4 -4
  33. package/dist/types/src/Form/components/FormMessageBanner/FormMessageBanner.d.ts +1 -1
  34. package/dist/types/src/FormField/FormField.d.ts +2 -2
  35. package/dist/types/src/FormatFile/FormatFile.d.ts +6 -6
  36. package/dist/types/src/FormatFile/components/FileView/FileView.d.ts +6 -6
  37. package/dist/types/src/FormatFile/components/FormatFileBottomSheet/FormatFileBottomSheet.d.ts +4 -4
  38. package/dist/types/src/FormatFile/components/MediaView/MediaView.d.ts +6 -6
  39. package/dist/types/src/FormatFile/components/ProgressBar/ProgressBar.d.ts +3 -3
  40. package/dist/types/src/Glimmer/Glimmer.d.ts +31 -0
  41. package/dist/types/src/Glimmer/Glimmer.shape.style.d.ts +14 -0
  42. package/dist/types/src/Glimmer/Glimmer.size.style.d.ts +17 -0
  43. package/dist/types/src/Glimmer/Glimmer.style.d.ts +18 -0
  44. package/dist/types/src/Glimmer/index.d.ts +1 -0
  45. package/dist/types/src/InputCurrency/InputCurrency.d.ts +3 -3
  46. package/dist/types/src/InputFieldWrapper/InputFieldWrapper.d.ts +19 -1
  47. package/dist/types/src/InputFieldWrapper/InputFieldWrapper.style.d.ts +34 -0
  48. package/dist/types/src/InputFieldWrapper/components/Prefix/Prefix.d.ts +12 -12
  49. package/dist/types/src/InputFieldWrapper/components/Suffix/Suffix.d.ts +14 -14
  50. package/dist/types/src/InputPassword/InputPassword.d.ts +1 -1
  51. package/dist/types/src/InputText/InputText.d.ts +6 -2
  52. package/dist/types/src/InputText/context/InputAccessoriesProvider.d.ts +1 -1
  53. package/dist/types/src/Toast/Toast.d.ts +1 -1
  54. package/dist/types/src/index.d.ts +6 -5
  55. package/dist/types/src/utils/test/MockSafeAreaProvider.d.ts +3 -3
  56. package/jestSetup.js +2 -0
  57. package/package.json +7 -7
  58. package/src/ActionItem/ActionItem.test.tsx +2 -2
  59. package/src/ActionItem/ActionItem.tsx +3 -1
  60. package/src/ActionItem/ActionItemGroup.tsx +1 -0
  61. package/src/AutoLink/hooks/useCreateLinkedText.ts +1 -0
  62. package/src/AutoLink/hooks/useTokenGenerator.ts +1 -0
  63. package/src/Banner/Banner.style.ts +4 -2
  64. package/src/Banner/Banner.tsx +3 -3
  65. package/src/BottomSheet/BottomSheet.tsx +3 -3
  66. package/src/BottomSheet/components/BottomSheetOption/BottomSheetOption.tsx +3 -1
  67. package/src/Button/Button.style.ts +2 -2
  68. package/src/Button/Button.test.tsx +2 -2
  69. package/src/Button/Button.tsx +2 -2
  70. package/src/Button/components/InternalButtonLoading/InternalButtonLoading.tsx +4 -0
  71. package/src/ButtonGroup/ButtonGroup.style.ts +1 -1
  72. package/src/ButtonGroup/ButtonGroup.tsx +1 -0
  73. package/src/ButtonGroup/components/SecondaryActionSheet/SecondaryActionSheet.tsx +7 -6
  74. package/src/Card/Card.tsx +31 -32
  75. package/src/Card/components/InternalCardHeader.tsx +1 -0
  76. package/src/Checkbox/CheckboxGroup.tsx +12 -2
  77. package/src/Chip/Chip.tsx +2 -0
  78. package/src/Content/Content.test.tsx +1 -0
  79. package/src/Content/Content.tsx +1 -0
  80. package/src/ContentOverlay/ContentOverlay.test.tsx +1 -0
  81. package/src/Disclosure/Disclosure.tsx +3 -8
  82. package/src/Disclosure/__snapshots__/Disclosure.test.tsx.snap +18 -24
  83. package/src/Divider/Divider.tsx +1 -0
  84. package/src/EmptyState/EmptyState.tsx +2 -2
  85. package/src/Flex/Flex.styles.tsx +1 -0
  86. package/src/Flex/Flex.test.tsx +2 -0
  87. package/src/Form/Form.test.tsx +19 -14
  88. package/src/Form/components/FormBody/FormBody.tsx +4 -3
  89. package/src/Form/components/FormCache/FormCache.tsx +5 -4
  90. package/src/Form/components/FormMessage/FormMessage.tsx +1 -0
  91. package/src/Form/components/FormMessageBanner/FormMessageBanner.tsx +1 -1
  92. package/src/Form/components/FormSaveButton/FormSaveButton.test.tsx +5 -5
  93. package/src/Form/context/AtlantisFormContext.tsx +1 -0
  94. package/src/Form/hooks/useFormViewRefs.ts +1 -0
  95. package/src/Form/hooks/useOfflineHandler.ts +1 -0
  96. package/src/Form/hooks/useScrollToError/useScrollToError.ts +2 -0
  97. package/src/FormField/FormField.test.tsx +6 -8
  98. package/src/FormField/FormField.tsx +2 -2
  99. package/src/FormatFile/FormatFile.tsx +15 -14
  100. package/src/FormatFile/components/FileView/FileView.tsx +9 -6
  101. package/src/FormatFile/components/FormatFileBottomSheet/FormatFileBottomSheet.tsx +4 -4
  102. package/src/FormatFile/components/MediaView/MediaView.tsx +15 -14
  103. package/src/FormatFile/components/ProgressBar/ProgressBar.tsx +3 -3
  104. package/src/FormatFile/utils/createUseCreateThumbnail.ts +1 -0
  105. package/src/Glimmer/Glimmer.shape.style.ts +17 -0
  106. package/src/Glimmer/Glimmer.size.style.ts +10 -0
  107. package/src/Glimmer/Glimmer.style.ts +23 -0
  108. package/src/Glimmer/Glimmer.test.tsx +73 -0
  109. package/src/Glimmer/Glimmer.tsx +106 -0
  110. package/src/Glimmer/index.ts +1 -0
  111. package/src/Icon/Icon.tsx +1 -0
  112. package/src/Icon/__snapshots__/Icon.test.tsx.snap +89 -24
  113. package/src/InputCurrency/InputCurrency.tsx +40 -38
  114. package/src/InputCurrency/utils.ts +9 -0
  115. package/src/InputDate/InputDate.test.tsx +1 -0
  116. package/src/InputFieldWrapper/InputFieldWrapper.style.ts +46 -1
  117. package/src/InputFieldWrapper/InputFieldWrapper.test.tsx +74 -0
  118. package/src/InputFieldWrapper/InputFieldWrapper.tsx +131 -64
  119. package/src/InputFieldWrapper/components/ClearAction/ClearAction.tsx +1 -0
  120. package/src/InputFieldWrapper/components/Prefix/Prefix.tsx +12 -12
  121. package/src/InputFieldWrapper/components/Suffix/Suffix.tsx +14 -14
  122. package/src/InputNumber/InputNumber.tsx +8 -0
  123. package/src/InputPassword/InputPassword.test.tsx +1 -0
  124. package/src/InputPassword/InputPassword.tsx +2 -1
  125. package/src/InputPressable/InputPressable.test.tsx +1 -0
  126. package/src/InputSearch/InputSearch.tsx +1 -0
  127. package/src/InputText/InputText.test.tsx +11 -0
  128. package/src/InputText/InputText.tsx +27 -2
  129. package/src/InputText/context/InputAccessoriesProvider.test.tsx +6 -1
  130. package/src/InputText/context/InputAccessoriesProvider.tsx +1 -1
  131. package/src/InputTime/utils/index.ts +1 -0
  132. package/src/Menu/Menu.style.ts +1 -1
  133. package/src/Menu/Menu.tsx +23 -2
  134. package/src/Menu/components/MenuOption/MenuOption.tsx +1 -0
  135. package/src/Menu/utils.ts +3 -7
  136. package/src/ProgressBar/ProgressBarInner.tsx +1 -0
  137. package/src/Select/components/SelectInternalPicker/SelectInternalPicker.tsx +1 -0
  138. package/src/Select/components/SelectInternalPicker/utils.ts +1 -0
  139. package/src/StatusLabel/StatusLabel.tsx +1 -1
  140. package/src/Switch/components/BaseSwitch/BaseSwitch.tsx +1 -0
  141. package/src/Text/Text.tsx +1 -0
  142. package/src/Toast/Toast.tsx +2 -1
  143. package/src/Typography/Typography.tsx +5 -0
  144. package/src/hooks/useAtlantisI18n/utils/dateFormatter.ts +1 -0
  145. package/src/hooks/useFormController.ts +2 -0
  146. package/src/index.ts +6 -5
  147. package/src/utils/intl/capitalize.ts +1 -0
  148. package/src/utils/test/MockSafeAreaProvider.tsx +3 -3
package/dist/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jobber/components-native",
3
- "version": "0.54.4-JOB-88641.7+2311c987",
3
+ "version": "0.54.4-fix-inline.3+c411f5fe",
4
4
  "license": "MIT",
5
5
  "description": "React Native implementation of Atlantis",
6
6
  "repository": {
@@ -36,8 +36,8 @@
36
36
  "build:clean": "rm -rf ./dist"
37
37
  },
38
38
  "dependencies": {
39
- "@jobber/design": "^0.54.0",
40
- "@jobber/hooks": "^2.8.3",
39
+ "@jobber/design": "^0.54.1-fix-inline.3+c411f5fe",
40
+ "@jobber/hooks": "^2.8.4-fix-inline.5+c411f5fe",
41
41
  "@react-native-clipboard/clipboard": "^1.11.2",
42
42
  "@react-native-picker/picker": "^2.4.10",
43
43
  "autolinker": "^4.0.0",
@@ -49,7 +49,6 @@
49
49
  "react-native-modalize": "^2.0.13",
50
50
  "react-native-portalize": "^1.0.7",
51
51
  "react-native-safe-area-context": "^4.5.2",
52
- "react-native-svg": "^13.9.0",
53
52
  "react-native-toast-message": "^2.1.6",
54
53
  "react-native-uuid": "^1.4.9",
55
54
  "ts-xor": "^1.1.0"
@@ -81,8 +80,9 @@
81
80
  "react-native-modal-datetime-picker": " >=13.0.0",
82
81
  "react-native-modalize": "^2.0.13",
83
82
  "react-native-portalize": "^1.0.7",
84
- "react-native-reanimated": "^2.17.0",
85
- "react-native-safe-area-context": "^4.5.2"
83
+ "react-native-reanimated": "^2.0.0 || ^3.0.0",
84
+ "react-native-safe-area-context": "^4.5.2",
85
+ "react-native-svg": ">=12.0.0"
86
86
  },
87
- "gitHead": "2311c987eb9676da43924845ee10286b6293a63e"
87
+ "gitHead": "c411f5fec260686086b5999611711c886133b5eb"
88
88
  }
@@ -28,7 +28,7 @@ function getActionIconColour(actionIconColour) {
28
28
  }
29
29
  function getActionIcon(icon) {
30
30
  if (icon === "edit") {
31
- return "arrowRight";
31
+ return "longArrowRight";
32
32
  }
33
33
  else if (icon === "editpencil") {
34
34
  return "edit";
@@ -1,6 +1,5 @@
1
1
  import React from "react";
2
2
  import { Pressable, Text as RNText, View } from "react-native";
3
- import { tokens } from "@jobber/design";
4
3
  import { styles } from "./Banner.style";
5
4
  import { BannerIcon } from "./components/BannerIcon/BannerIcon";
6
5
  import { Content } from "../Content";
@@ -23,7 +22,7 @@ export function Banner({ action, details, text, type, children, icon, }) {
23
22
  text && React.createElement(Text, { level: "text" }, text),
24
23
  details && React.createElement(TextList, { items: details, level: "text" }),
25
24
  action && (React.createElement(RNText, null,
26
- shouldFlow && React.createElement(Typography, null, " | "),
25
+ shouldFlow && React.createElement(Typography, { color: "subdued" }, " | "),
27
26
  React.createElement(ActionLabel, { align: "start" }, action.label))))))))));
28
27
  }
29
28
  function BannerChildren({ children }) {
@@ -38,7 +37,7 @@ function WrappingElement({ shouldFlow, children, }) {
38
37
  if (shouldFlow) {
39
38
  return React.createElement(RNText, { testID: "ATL-Banner-RNText" }, children);
40
39
  }
41
- return (React.createElement(View, { testID: "ATL-Banner-View", style: { gap: tokens["space-small"] } }, children));
40
+ return (React.createElement(View, { testID: "ATL-Banner-View", style: styles.contentSpacing }, children));
42
41
  }
43
42
  function getBannerIcon(type) {
44
43
  switch (type) {
@@ -5,8 +5,7 @@ export const styles = StyleSheet.create({
5
5
  width: "100%",
6
6
  borderColor: tokens["color-border"],
7
7
  borderStyle: "solid",
8
- borderWidth: tokens["border-base"],
9
- borderRadius: tokens["radius-base"],
8
+ borderBottomWidth: tokens["border-base"],
10
9
  backgroundColor: tokens["color-surface"],
11
10
  },
12
11
  bannerContent: {
@@ -29,4 +28,7 @@ export const styles = StyleSheet.create({
29
28
  bannerChildrenContent: {
30
29
  marginBottom: tokens["space-small"],
31
30
  },
31
+ contentSpacing: {
32
+ gap: tokens["space-small"],
33
+ },
32
34
  });
@@ -39,7 +39,7 @@ function getActionLabelVariation(variation, type) {
39
39
  }
40
40
  switch (variation) {
41
41
  case "learning":
42
- return "learning";
42
+ return "subtle";
43
43
  case "destructive":
44
44
  return "destructive";
45
45
  case "cancel":
@@ -57,7 +57,7 @@ function getIconColorVariation(variation, type, disabled) {
57
57
  }
58
58
  switch (variation) {
59
59
  case "learning":
60
- return "informative";
60
+ return "interactiveSubtle";
61
61
  case "destructive":
62
62
  return "destructive";
63
63
  case "cancel":
@@ -63,8 +63,8 @@ export const styles = StyleSheet.create({
63
63
  borderColor: tokens["color-interactive"],
64
64
  },
65
65
  learning: {
66
- backgroundColor: tokens["color-informative"],
67
- borderColor: tokens["color-informative"],
66
+ backgroundColor: tokens["color-interactive--subtle"],
67
+ borderColor: tokens["color-interactive--subtle"],
68
68
  },
69
69
  destructive: {
70
70
  backgroundColor: tokens["color-destructive"],
@@ -6,6 +6,9 @@ import { tokens } from "../../../utils/design";
6
6
  const imageWidth = 96;
7
7
  const offset = PixelRatio.roundToNearestPixel(imageWidth / PixelRatio.get());
8
8
  const leftOffset = -1 * offset;
9
+ // looks like deprecation for FlatList in reanimated is cascading down to other exports
10
+ // This is not createAnimatedComponent(FlatList), we are fine
11
+ // eslint-disable-next-line import/no-deprecated
9
12
  const AnimatedImage = Animated.createAnimatedComponent(ImageBackground);
10
13
  function InternalButtonLoadingInternal({ variation, type, }) {
11
14
  const translateX = useSharedValue(0);
@@ -17,7 +17,7 @@ export function ButtonGroup({ children, showCancelInBottomSheet, bottomSheetHead
17
17
  return (React.createElement(View, { style: styles.button, key: index }, customButton || (React.createElement(Button, { label: label, accessibilityLabel: label, onPress: allowTapWhenOffline ? onPress : handlePress(onPress), type: buttonType, variation: buttonVariation, fullHeight: true, icon: icon, loading: loading, testID: `ButtonGroup-Primary-Action-${index}` }))));
18
18
  }),
19
19
  secondaryActions.length > 0 && (React.createElement(View, { style: styles.moreButton },
20
- React.createElement(Button, { icon: "more", accessibilityLabel: t("more"), onPress: handlePress(openBottomSheet), fullHeight: true, testID: "ButtonGroup-Secondary-Action" }))),
20
+ React.createElement(Button, { type: "secondary", icon: "more", accessibilityLabel: t("more"), onPress: handlePress(openBottomSheet), fullHeight: true, testID: "ButtonGroup-Secondary-Action" }))),
21
21
  React.createElement(SecondaryActionSheet, { heading: bottomSheetHeading, showCancel: showCancelInBottomSheet, secondaryActionsRef: secondaryActionsRef, actions: secondaryActions.map(secondaryAction => secondaryAction.props), onOpenBottomSheet: onOpenBottomSheet, onCloseBottomSheet: onCloseBottomSheet })));
22
22
  function openBottomSheet() {
23
23
  var _a;
@@ -5,11 +5,11 @@ export const styles = StyleSheet.create({
5
5
  width: "100%",
6
6
  flexDirection: "row",
7
7
  justifyContent: "flex-end",
8
+ gap: tokens["space-small"],
8
9
  },
9
10
  button: {
10
11
  flexBasis: tokens["space-largest"],
11
12
  flexGrow: 1,
12
- paddingRight: tokens["space-smaller"],
13
13
  },
14
14
  moreButton: {
15
15
  flexBasis: tokens["space-largest"],
@@ -16,14 +16,13 @@ export function Card({ header, footer, children, reportCardHeight: onCardHeightC
16
16
  var _a, _b;
17
17
  return (React.createElement(ErrorMessageWrapper, { message: error, wrapFor: "card" },
18
18
  React.createElement(View, { onLayout: handleLayoutChange, style: [styles.container, getElevationStyle(elevation)], testID: testID },
19
- header && (React.createElement(React.Fragment, null,
20
- React.createElement(InternalCardHeader, { onPress: header.onPress, testID: `${testID}Header`, collapsable: !!children },
21
- React.createElement(View, { style: styles.headerTitle },
22
- React.createElement(Typography, { color: "heading", fontFamily: "base", fontWeight: "bold", size: "default", lineHeight: "base", accessibilityRole: "header" }, header.title)),
23
- React.createElement(View, { style: styles.actionItem },
24
- !!((_a = header.actionItem) === null || _a === void 0 ? void 0 : _a.label) && (React.createElement(View, { style: styles.actionLabel },
25
- React.createElement(ActionLabel, { type: "cardTitle" }, header.actionItem.label))),
26
- ((_b = header.actionItem) === null || _b === void 0 ? void 0 : _b.iconName) && (React.createElement(Icon, { name: header.actionItem.iconName, color: "interactive" })))))),
19
+ header && (React.createElement(InternalCardHeader, { onPress: header.onPress, testID: `${testID}Header`, collapsable: !!children },
20
+ React.createElement(View, { style: styles.headerTitle },
21
+ React.createElement(Typography, { color: "heading", fontFamily: "base", fontWeight: "bold", size: "default", lineHeight: "base", accessibilityRole: "header" }, header.title)),
22
+ React.createElement(View, { style: styles.actionItem },
23
+ !!((_a = header.actionItem) === null || _a === void 0 ? void 0 : _a.label) && (React.createElement(View, { style: styles.actionLabel },
24
+ React.createElement(ActionLabel, { type: "cardTitle" }, header.actionItem.label))),
25
+ ((_b = header.actionItem) === null || _b === void 0 ? void 0 : _b.iconName) && (React.createElement(Icon, { name: header.actionItem.iconName, color: "interactive" }))))),
27
26
  children,
28
27
  footer && (React.createElement(Pressable, { testID: `${testID}Footer`, onPress: footer.onPress, style: ({ pressed }) => [
29
28
  styles.footer,
@@ -1,12 +1,12 @@
1
1
  import React, { useState } from "react";
2
- import { ScrollView, TouchableOpacity, View, } from "react-native";
2
+ import { TouchableOpacity, View } from "react-native";
3
3
  import Reanimated, { Easing, useAnimatedStyle, useSharedValue, withTiming, } from "react-native-reanimated";
4
4
  import { EASE_CUBIC_IN_OUT } from "./constants";
5
5
  import { styles } from "./Disclosure.style";
6
6
  import { tokens } from "../utils/design";
7
7
  import { Icon } from "../Icon";
8
- const ReanimatedView = Reanimated.createAnimatedComponent(View);
9
- const ReanimatedScrollView = Reanimated.createAnimatedComponent(ScrollView);
8
+ const ReanimatedView = Reanimated.View;
9
+ const ReanimatedScrollView = Reanimated.ScrollView;
10
10
  export function Disclosure({ content, header, open, onToggle, isEmpty, animationDuration = tokens["timing-slowest"], }) {
11
11
  return (React.createElement(View, { style: styles.container },
12
12
  React.createElement(DisclosureHeader, Object.assign({}, { header, onToggle, isEmpty, open, animationDuration })),
@@ -0,0 +1,42 @@
1
+ import React, { useEffect, useRef, useState } from "react";
2
+ import { Animated, Easing, View } from "react-native";
3
+ import Svg, { Defs, LinearGradient, Rect, Stop } from "react-native-svg";
4
+ import { shineWidth, styles } from "./Glimmer.style";
5
+ import { sizeStyles } from "./Glimmer.size.style";
6
+ import { shapeStyles } from "./Glimmer.shape.style";
7
+ import { tokens } from "../utils/design";
8
+ export const GLIMMER_TEST_ID = "ATL-Glimmer";
9
+ export const GLIMMER_SHINE_TEST_ID = "ATL-Glimmer-Shine";
10
+ export function Glimmer({ width, shape = "rectangle", size = "base", timing = "base", }) {
11
+ const leftPosition = useRef(new Animated.Value(-shineWidth)).current;
12
+ const [parentWidth, setParentWidth] = useState(0);
13
+ useEffect(() => {
14
+ const shine = Animated.loop(Animated.timing(leftPosition, {
15
+ toValue: parentWidth + shineWidth,
16
+ duration: timing === "base"
17
+ ? tokens["timing-loading--extended"]
18
+ : tokens["timing-loading"],
19
+ easing: Easing.ease,
20
+ useNativeDriver: true,
21
+ }));
22
+ shine.start();
23
+ return shine.stop;
24
+ }, [parentWidth]);
25
+ return (React.createElement(View, { style: [
26
+ styles.container,
27
+ sizeStyles[size],
28
+ shapeStyles[shape],
29
+ { width },
30
+ ], onLayout: getWidth, testID: GLIMMER_TEST_ID },
31
+ React.createElement(Animated.View, { style: [styles.shine, { transform: [{ translateX: leftPosition }] }], testID: GLIMMER_SHINE_TEST_ID },
32
+ React.createElement(Svg, null,
33
+ React.createElement(Defs, null,
34
+ React.createElement(LinearGradient, { id: "gradientShine", x1: 0, y1: 0.5, x2: 1, y2: 0.5 },
35
+ React.createElement(Stop, { offset: "0%", stopColor: tokens["color-surface--background"] }),
36
+ React.createElement(Stop, { offset: "50%", stopColor: tokens["color-surface"] }),
37
+ React.createElement(Stop, { offset: "100%", stopColor: tokens["color-surface--background"] }))),
38
+ React.createElement(Rect, { fill: "url(#gradientShine)", height: "100%", width: "100%" })))));
39
+ function getWidth(event) {
40
+ setParentWidth(event.nativeEvent.layout.width);
41
+ }
42
+ }
@@ -0,0 +1,16 @@
1
+ import { StyleSheet } from "react-native";
2
+ import { tokens } from "../utils/design";
3
+ export const shapeStyles = StyleSheet.create({
4
+ rectangle: {
5
+ width: "100%",
6
+ },
7
+ square: {
8
+ width: "auto",
9
+ aspectRatio: 1 / 1,
10
+ },
11
+ circle: {
12
+ width: "auto",
13
+ aspectRatio: 1 / 1,
14
+ borderRadius: tokens["radius-circle"],
15
+ },
16
+ });
@@ -0,0 +1,9 @@
1
+ import { StyleSheet } from "react-native";
2
+ import { tokens } from "../utils/design";
3
+ export const sizeStyles = StyleSheet.create({
4
+ small: { height: tokens["space-small"] },
5
+ base: { height: tokens["space-base"] },
6
+ large: { height: tokens["space-large"] },
7
+ larger: { height: tokens["space-larger"] },
8
+ largest: { height: tokens["space-largest"] },
9
+ });
@@ -0,0 +1,20 @@
1
+ import { StyleSheet } from "react-native";
2
+ import { tokens } from "../utils/design";
3
+ export const shineWidth = tokens["space-largest"];
4
+ export const styles = StyleSheet.create({
5
+ container: {
6
+ backgroundColor: tokens["color-surface--background"],
7
+ overflow: "hidden",
8
+ position: "relative",
9
+ width: "100%",
10
+ height: tokens["space-base"],
11
+ borderRadius: tokens["radius-base"],
12
+ },
13
+ shine: {
14
+ position: "absolute",
15
+ top: 0,
16
+ left: 0,
17
+ width: shineWidth,
18
+ height: "100%",
19
+ },
20
+ });
@@ -0,0 +1 @@
1
+ export * from "./Glimmer";
@@ -73,21 +73,20 @@ export function InputCurrency(props) {
73
73
  }
74
74
  };
75
75
  const { t } = useAtlantisI18n();
76
- return (React.createElement(React.Fragment, null,
77
- React.createElement(InputText, Object.assign({}, props, { prefix: showCurrencySymbol ? { label: currencySymbol } : undefined, keyboard: getKeyboard(props), value: ((_a = props.value) === null || _a === void 0 ? void 0 : _a.toString()) || displayValue, defaultValue: (_b = props.defaultValue) === null || _b === void 0 ? void 0 : _b.toString(), onChangeText: handleChange, transform: {
78
- output: val => {
79
- return val === null || val === void 0 ? void 0 : val.split(floatSeparators.group).join("").replace(floatSeparators.decimal, ".");
80
- },
81
- }, validations: Object.assign({ pattern: {
82
- value: NUMBER_VALIDATION_REGEX,
83
- message: t("errors.notANumber"),
84
- } }, props.validations), onBlur: () => {
85
- var _a;
86
- (_a = props.onBlur) === null || _a === void 0 ? void 0 : _a.call(props);
87
- if (field.value === 0 ||
88
- field.value === "" ||
89
- field.value === undefined) {
90
- setDisplayValue("0");
91
- }
92
- } }))));
76
+ return (React.createElement(InputText, Object.assign({}, props, { prefix: showCurrencySymbol ? { label: currencySymbol } : undefined, keyboard: getKeyboard(props), value: ((_a = props.value) === null || _a === void 0 ? void 0 : _a.toString()) || displayValue, defaultValue: (_b = props.defaultValue) === null || _b === void 0 ? void 0 : _b.toString(), onChangeText: handleChange, transform: {
77
+ output: val => {
78
+ return val === null || val === void 0 ? void 0 : val.split(floatSeparators.group).join("").replace(floatSeparators.decimal, ".");
79
+ },
80
+ }, validations: Object.assign({ pattern: {
81
+ value: NUMBER_VALIDATION_REGEX,
82
+ message: t("errors.notANumber"),
83
+ } }, props.validations), onBlur: () => {
84
+ var _a;
85
+ (_a = props.onBlur) === null || _a === void 0 ? void 0 : _a.call(props);
86
+ if (field.value === 0 ||
87
+ field.value === "" ||
88
+ field.value === undefined) {
89
+ setDisplayValue("0");
90
+ }
91
+ } })));
93
92
  }
@@ -6,14 +6,21 @@ import { styles } from "./InputFieldWrapper.style";
6
6
  import { PrefixIcon, PrefixLabel } from "./components/Prefix/Prefix";
7
7
  import { SuffixIcon, SuffixLabel } from "./components/Suffix/Suffix";
8
8
  import { ClearAction } from "./components/ClearAction";
9
+ import { Glimmer } from "../Glimmer/Glimmer";
9
10
  import { ErrorMessageWrapper } from "../ErrorMessageWrapper";
10
11
  import { typographyStyles } from "../Typography";
11
12
  import { Text } from "../Text";
12
- export function InputFieldWrapper({ invalid, disabled, placeholder, assistiveText, prefix, suffix, hasMiniLabel = false, hasValue = false, error, focused = false, children, onClear, showClearAction = false, styleOverride, }) {
13
+ import { ActivityIndicator } from "../ActivityIndicator";
14
+ export const INPUT_FIELD_WRAPPER_GLIMMERS_TEST_ID = "ATL-InputFieldWrapper-Glimmers";
15
+ export const INPUT_FIELD_WRAPPER_SPINNER_TEST_ID = "ATL-InputFieldWrapper-Spinner";
16
+ export function InputFieldWrapper({ invalid, disabled, placeholder, assistiveText, prefix, suffix, hasMiniLabel = false, hasValue = false, error, focused = false, children, onClear, showClearAction = false, styleOverride, toolbar, toolbarVisibility = "while-editing", loading = false, loadingType = "spinner", }) {
13
17
  fieldAffixRequiredPropsCheck([prefix, suffix]);
14
18
  const handleClear = onClear !== null && onClear !== void 0 ? onClear : noopClear;
15
19
  warnIfClearActionWithNoOnClear(onClear, showClearAction);
16
20
  const inputInvalid = Boolean(invalid) || Boolean(error);
21
+ const isToolbarVisible = toolbar && (toolbarVisibility === "always" || focused);
22
+ const showLoadingSpinner = loading && loadingType === "spinner";
23
+ const showLoadingGlimmer = loading && loadingType === "glimmer";
17
24
  return (React.createElement(ErrorMessageWrapper, { message: getMessage({ invalid, error }) },
18
25
  React.createElement(View, { testID: "ATL-InputFieldWrapper", style: [
19
26
  styles.container,
@@ -22,23 +29,37 @@ export function InputFieldWrapper({ invalid, disabled, placeholder, assistiveTex
22
29
  disabled && styles.disabled,
23
30
  styleOverride === null || styleOverride === void 0 ? void 0 : styleOverride.container,
24
31
  ] },
25
- (prefix === null || prefix === void 0 ? void 0 : prefix.icon) && (React.createElement(PrefixIcon, { disabled: disabled, focused: focused, hasMiniLabel: hasMiniLabel, inputInvalid: inputInvalid, icon: prefix.icon })),
26
- React.createElement(View, { style: [styles.inputContainer] },
27
- React.createElement(View, { style: [
28
- !!placeholder && styles.label,
29
- hasMiniLabel && styles.miniLabel,
30
- disabled && styles.disabled,
31
- hasMiniLabel &&
32
- showClearAction &&
33
- styles.miniLabelShowClearAction,
34
- ], pointerEvents: "none" },
35
- React.createElement(Placeholder, { placeholder: placeholder, labelVariation: getLabelVariation(error, invalid, disabled), hasMiniLabel: hasMiniLabel, styleOverride: styleOverride === null || styleOverride === void 0 ? void 0 : styleOverride.placeholderText })),
36
- (prefix === null || prefix === void 0 ? void 0 : prefix.label) && hasValue && (React.createElement(PrefixLabel, { disabled: disabled, focused: focused, hasMiniLabel: hasMiniLabel, inputInvalid: inputInvalid, label: prefix.label, styleOverride: styleOverride === null || styleOverride === void 0 ? void 0 : styleOverride.prefixLabel })),
37
- children,
38
- (showClearAction || (suffix === null || suffix === void 0 ? void 0 : suffix.label) || (suffix === null || suffix === void 0 ? void 0 : suffix.icon)) && (React.createElement(View, { style: styles.inputEndContainer },
39
- showClearAction && (React.createElement(ClearAction, { hasMarginRight: !!(suffix === null || suffix === void 0 ? void 0 : suffix.icon) || !!(suffix === null || suffix === void 0 ? void 0 : suffix.label), onPress: handleClear })),
40
- (suffix === null || suffix === void 0 ? void 0 : suffix.label) && hasValue && (React.createElement(SuffixLabel, { disabled: disabled, focused: focused, hasMiniLabel: hasMiniLabel, inputInvalid: inputInvalid, label: suffix.label, hasLeftMargin: !showClearAction, styleOverride: styleOverride === null || styleOverride === void 0 ? void 0 : styleOverride.suffixLabel })),
41
- (suffix === null || suffix === void 0 ? void 0 : suffix.icon) && (React.createElement(SuffixIcon, { disabled: disabled, focused: focused, hasMiniLabel: hasMiniLabel, hasLeftMargin: !!(!showClearAction || (suffix === null || suffix === void 0 ? void 0 : suffix.label)), inputInvalid: inputInvalid, icon: suffix.icon, onPress: suffix.onPress })))))),
32
+ React.createElement(View, { style: styles.field },
33
+ (prefix === null || prefix === void 0 ? void 0 : prefix.icon) && (React.createElement(PrefixIcon, { disabled: disabled, focused: focused, hasMiniLabel: hasMiniLabel, inputInvalid: inputInvalid, icon: prefix.icon })),
34
+ React.createElement(View, { style: [styles.inputContainer] },
35
+ React.createElement(View, { style: [
36
+ !!placeholder && styles.label,
37
+ hasMiniLabel && styles.miniLabel,
38
+ disabled && styles.disabled,
39
+ hasMiniLabel &&
40
+ showClearAction &&
41
+ styles.miniLabelShowClearAction,
42
+ ], pointerEvents: "none" },
43
+ React.createElement(Placeholder, { placeholder: placeholder, labelVariation: getLabelVariation(error, invalid, disabled), hasMiniLabel: hasMiniLabel, styleOverride: styleOverride === null || styleOverride === void 0 ? void 0 : styleOverride.placeholderText })),
44
+ (prefix === null || prefix === void 0 ? void 0 : prefix.label) && hasValue && (React.createElement(PrefixLabel, { disabled: disabled, focused: focused, hasMiniLabel: hasMiniLabel, inputInvalid: inputInvalid, label: prefix.label, styleOverride: styleOverride === null || styleOverride === void 0 ? void 0 : styleOverride.prefixLabel })),
45
+ children,
46
+ showLoadingGlimmer && (React.createElement(View, { testID: INPUT_FIELD_WRAPPER_GLIMMERS_TEST_ID, style: [
47
+ styles.loadingGlimmers,
48
+ hasValue && styles.loadingGlimmersHasValue,
49
+ ] },
50
+ React.createElement(Glimmer, { size: "small", width: "80%" }),
51
+ React.createElement(Glimmer, { size: "small" }),
52
+ React.createElement(Glimmer, { size: "small", width: "70%" }))),
53
+ (showClearAction ||
54
+ (suffix === null || suffix === void 0 ? void 0 : suffix.label) ||
55
+ (suffix === null || suffix === void 0 ? void 0 : suffix.icon) ||
56
+ showLoadingSpinner) && (React.createElement(View, { style: styles.inputEndContainer },
57
+ showClearAction && (React.createElement(ClearAction, { hasMarginRight: !!(suffix === null || suffix === void 0 ? void 0 : suffix.icon) || !!(suffix === null || suffix === void 0 ? void 0 : suffix.label), onPress: handleClear })),
58
+ (suffix === null || suffix === void 0 ? void 0 : suffix.label) && hasValue && (React.createElement(SuffixLabel, { disabled: disabled, focused: focused, hasMiniLabel: hasMiniLabel, inputInvalid: inputInvalid, label: suffix.label, hasLeftMargin: !showClearAction, styleOverride: styleOverride === null || styleOverride === void 0 ? void 0 : styleOverride.suffixLabel })),
59
+ showLoadingSpinner && (React.createElement(View, { style: styles.loadingSpinner },
60
+ React.createElement(ActivityIndicator, { testID: INPUT_FIELD_WRAPPER_SPINNER_TEST_ID }))),
61
+ (suffix === null || suffix === void 0 ? void 0 : suffix.icon) && (React.createElement(SuffixIcon, { disabled: disabled, focused: focused, hasMiniLabel: hasMiniLabel, hasLeftMargin: !!(!showClearAction || (suffix === null || suffix === void 0 ? void 0 : suffix.label)), inputInvalid: inputInvalid, icon: suffix.icon, onPress: suffix.onPress })))))),
62
+ isToolbarVisible && React.createElement(View, { style: styles.toolbar }, toolbar)),
42
63
  assistiveText && !error && !invalid && (React.createElement(Text, { level: "textSupporting", variation: disabled ? "disabled" : focused ? "interactive" : "subdued" }, assistiveText))));
43
64
  }
44
65
  function getLabelVariation(error, invalid, disabled) {
@@ -3,7 +3,16 @@ import { commonInputStyles } from "./CommonInputStyles.style";
3
3
  import { tokens } from "../utils/design";
4
4
  import { typographyStyles } from "../Typography";
5
5
  export const styles = StyleSheet.create({
6
- container: StyleSheet.flatten([commonInputStyles.container]),
6
+ container: StyleSheet.flatten([
7
+ commonInputStyles.container,
8
+ {
9
+ flexDirection: "column",
10
+ },
11
+ ]),
12
+ field: {
13
+ flexDirection: "row",
14
+ alignItems: "center",
15
+ },
7
16
  inputContainer: {
8
17
  flexDirection: "row",
9
18
  flex: 1,
@@ -29,6 +38,7 @@ export const styles = StyleSheet.create({
29
38
  top: 0,
30
39
  paddingTop: tokens["space-small"] - tokens["space-smallest"],
31
40
  backgroundColor: tokens["color-surface"],
41
+ marginRight: tokens["space-small"],
32
42
  maxHeight: (typographyStyles.defaultSize.lineHeight || 0) + tokens["space-smaller"],
33
43
  zIndex: 1,
34
44
  },
@@ -78,4 +88,31 @@ export const styles = StyleSheet.create({
78
88
  flexDirection: "row",
79
89
  zIndex: 1,
80
90
  },
91
+ toolbar: {
92
+ flexBasis: "100%",
93
+ flexDirection: "row",
94
+ gap: tokens["space-small"],
95
+ paddingBottom: tokens["space-small"],
96
+ },
97
+ loadingSpinner: {
98
+ justifyContent: "center",
99
+ paddingRight: tokens["space-small"],
100
+ },
101
+ loadingGlimmers: {
102
+ position: "absolute",
103
+ top: tokens["space-base"],
104
+ bottom: tokens["space-base"],
105
+ left: 0,
106
+ right: 0,
107
+ gap: tokens["space-small"],
108
+ paddingTop: tokens["space-small"],
109
+ paddingRight: tokens["space-large"],
110
+ backgroundColor: tokens["color-surface"],
111
+ overflow: "hidden",
112
+ },
113
+ loadingGlimmersHasValue: {
114
+ top: tokens["space-large"],
115
+ paddingTop: tokens["space-base"] - tokens["space-smaller"],
116
+ bottom: tokens["space-smaller"],
117
+ },
81
118
  });
@@ -9,7 +9,7 @@ import { InputFieldWrapper } from "../InputFieldWrapper";
9
9
  import { commonInputStyles } from "../InputFieldWrapper/CommonInputStyles.style";
10
10
  export const InputText = forwardRef(InputTextInternal);
11
11
  // eslint-disable-next-line max-statements
12
- function InputTextInternal({ invalid, disabled, name, placeholder, assistiveText, keyboard, value: controlledValue, defaultValue, autoFocus, autoComplete = "off", spellCheck, textContentType = "none", validations, onChangeText, onSubmitEditing, onFocus, accessibilityLabel, accessibilityHint, autoCorrect, autoCapitalize, onBlur, multiline = false, prefix, suffix, transform = {}, clearable = multiline ? "never" : "while-editing", testID, secureTextEntry, styleOverride, }, ref) {
12
+ function InputTextInternal({ invalid, disabled, readonly = false, name, placeholder, assistiveText, keyboard, value: controlledValue, defaultValue, autoFocus, autoComplete = "off", spellCheck, textContentType = "none", validations, onChangeText, onSubmitEditing, onFocus, accessibilityLabel, accessibilityHint, autoCorrect, autoCapitalize, onBlur, multiline = false, prefix, suffix, transform = {}, clearable = multiline ? "never" : "while-editing", testID, secureTextEntry, styleOverride, toolbar, toolbarVisibility, loading, loadingType, }, ref) {
13
13
  var _a;
14
14
  const isAndroid = Platform.OS === "android";
15
15
  const isIOS = Platform.OS === "ios";
@@ -72,7 +72,7 @@ function InputTextInternal({ invalid, disabled, name, placeholder, assistiveText
72
72
  }
73
73
  onFocusNext();
74
74
  }
75
- return (React.createElement(InputFieldWrapper, { prefix: prefix, suffix: suffix, hasValue: hasValue, hasMiniLabel: hasMiniLabel, assistiveText: assistiveText, focused: focused, error: error, invalid: invalid, placeholder: placeholder, disabled: disabled, onClear: handleClear, showClearAction: showClear, styleOverride: styleOverride },
75
+ return (React.createElement(InputFieldWrapper, { prefix: prefix, suffix: suffix, hasValue: hasValue, hasMiniLabel: hasMiniLabel, assistiveText: assistiveText, focused: focused, error: error, invalid: invalid, placeholder: placeholder, disabled: disabled, onClear: handleClear, showClearAction: showClear, styleOverride: styleOverride, toolbar: toolbar, toolbarVisibility: toolbarVisibility, loading: loading, loadingType: loadingType },
76
76
  React.createElement(TextInput, Object.assign({ inputAccessoryViewID: inputAccessoryID || undefined, testID: testID, autoCapitalize: autoCapitalize, autoCorrect: autoCorrect, spellCheck: spellCheck, style: [
77
77
  commonInputStyles.input,
78
78
  styles.inputPaddingTop,
@@ -82,7 +82,10 @@ function InputTextInternal({ invalid, disabled, name, placeholder, assistiveText
82
82
  multiline && Platform.OS === "ios" && styles.multilineInputiOS,
83
83
  multiline && hasMiniLabel && styles.multiLineInputWithMini,
84
84
  styleOverride === null || styleOverride === void 0 ? void 0 : styleOverride.inputText,
85
- ], editable: !disabled, keyboardType: keyboard, value: inputTransform(internalValue), autoFocus: autoFocus, autoComplete: autoComplete, multiline: multiline, scrollEnabled: false, textContentType: textContentType, onChangeText: handleChangeText, onSubmitEditing: handleOnSubmitEditing, returnKeyType: returnKeyType, blurOnSubmit: shouldBlurOnSubmit, accessibilityLabel: accessibilityLabel || placeholder, accessibilityHint: accessibilityHint, secureTextEntry: secureTextEntry }, androidA11yProps, { onFocus: event => {
85
+ loading && loadingType === "glimmer" && { color: "transparent" },
86
+ ],
87
+ // @ts-expect-error - does exist on 0.71 and up https://github.com/facebook/react-native/pull/39281
88
+ readOnly: readonly, editable: !disabled, keyboardType: keyboard, value: inputTransform(internalValue), autoFocus: autoFocus, autoComplete: autoComplete, multiline: multiline, scrollEnabled: false, textContentType: textContentType, onChangeText: handleChangeText, onSubmitEditing: handleOnSubmitEditing, returnKeyType: returnKeyType, blurOnSubmit: shouldBlurOnSubmit, accessibilityLabel: accessibilityLabel || placeholder, accessibilityHint: accessibilityHint, accessibilityState: { busy: loading }, secureTextEntry: secureTextEntry }, androidA11yProps, { onFocus: event => {
86
89
  _name && setFocusedInput(_name);
87
90
  setFocused(true);
88
91
  onFocus === null || onFocus === void 0 ? void 0 : onFocus(event);
@@ -1,5 +1,5 @@
1
1
  import React, { useCallback, useRef, useState } from "react";
2
- import { Pressable, View, useWindowDimensions, } from "react-native";
2
+ import { Keyboard, Platform, Pressable, View, useWindowDimensions, } from "react-native";
3
3
  import { Portal } from "react-native-portalize";
4
4
  import { useSafeAreaFrame } from "react-native-safe-area-context";
5
5
  import { styles } from "./Menu.style";
@@ -23,7 +23,7 @@ export function Menu({ menuOptions, customActivator }) {
23
23
  setMenuPosition(findViewpoint(screenInfo, activatorLayout.current));
24
24
  }
25
25
  }, [screenInfo, activatorLayout]);
26
- const activatorOnPress = (onPress) => {
26
+ const openMenu = () => {
27
27
  var _a;
28
28
  (_a = menuButtonRef.current) === null || _a === void 0 ? void 0 : _a.measureInWindow((x, y, width, height) => {
29
29
  activatorLayout.current = {
@@ -34,9 +34,20 @@ export function Menu({ menuOptions, customActivator }) {
34
34
  };
35
35
  findMenuLayout();
36
36
  setOpen(true);
37
- onPress && onPress();
38
37
  });
39
38
  };
39
+ const activatorOnPress = (onPress) => {
40
+ onPress && onPress();
41
+ if (Platform.OS === "ios" && Keyboard.isVisible()) {
42
+ // On iOS, the keyboard height causes problems with the menu positioning logic.
43
+ // Wait until the keyboard is fully hidden before we show the menu.
44
+ onKeyboardDidHide(openMenu);
45
+ Keyboard.dismiss();
46
+ }
47
+ else {
48
+ openMenu();
49
+ }
50
+ };
40
51
  return (React.createElement(React.Fragment, null,
41
52
  React.createElement(View, { ref: ref => {
42
53
  menuButtonRef.current = ref;
@@ -64,3 +75,9 @@ function useScreenInformation() {
64
75
  const { height: windowHeight } = useSafeAreaFrame();
65
76
  return { headerHeight, windowWidth, windowHeight };
66
77
  }
78
+ function onKeyboardDidHide(callback) {
79
+ const listener = Keyboard.addListener("keyboardDidHide", () => {
80
+ listener.remove();
81
+ callback();
82
+ });
83
+ }
@@ -2,5 +2,5 @@ import { StyleSheet } from "react-native";
2
2
  import { tokens } from "../utils/design";
3
3
  const menuWidth = 208;
4
4
  export const styles = StyleSheet.create({
5
- menu: Object.assign({ position: "absolute", backgroundColor: tokens["color-surface"], paddingHorizontal: tokens["space-small"], paddingVertical: tokens["space-small"] + tokens["space-smallest"], borderRadius: tokens["radius-larger"], width: menuWidth }, tokens["shadow-high"]),
5
+ menu: Object.assign({ position: "absolute", backgroundColor: tokens["color-surface"], paddingHorizontal: tokens["space-small"], paddingVertical: tokens["space-small"] + tokens["space-smallest"], borderRadius: tokens["radius-base"], width: menuWidth }, tokens["shadow-high"]),
6
6
  });
@@ -59,12 +59,7 @@ function getLeftPosition(pos, activatorLayout, windowWidth, menuHorizontalPaddin
59
59
  pos.right = 0;
60
60
  }
61
61
  else {
62
- pos.right =
63
- windowWidth -
64
- activatorLayout.x -
65
- activatorLayout.width +
66
- activatorLayout.width / 2 -
67
- menuHorizontalPadding;
62
+ pos.right = windowWidth - activatorLayout.x - activatorLayout.width;
68
63
  }
69
64
  }
70
65
  function getRightPosition(pos, activatorLayout, windowWidth, menuPadding, menuWidth) {
@@ -79,6 +74,6 @@ function getRightPosition(pos, activatorLayout, windowWidth, menuPadding, menuWi
79
74
  pos.left = 0;
80
75
  }
81
76
  else {
82
- pos.left = activatorLayout.x + activatorLayout.width / 2 - menuPadding;
77
+ pos.left = activatorLayout.x;
83
78
  }
84
79
  }
package/dist/src/index.js CHANGED
@@ -17,29 +17,30 @@ export * from "./Divider";
17
17
  export * from "./EmptyState";
18
18
  export * from "./ErrorMessageWrapper";
19
19
  export * from "./Flex";
20
- export * from "./FormatFile";
21
20
  export * from "./Form";
21
+ export * from "./FormatFile";
22
22
  export * from "./FormField";
23
+ export * from "./Glimmer";
23
24
  export * from "./Heading";
24
25
  export * from "./Icon";
25
26
  export * from "./IconButton";
26
- export * from "./InputFieldWrapper";
27
27
  export * from "./InputCurrency";
28
28
  export * from "./InputDate";
29
29
  export * from "./InputEmail";
30
+ export * from "./InputFieldWrapper";
30
31
  export * from "./InputNumber";
31
32
  export * from "./InputPassword";
32
33
  export * from "./InputPressable";
33
34
  export * from "./InputSearch";
34
- export * from "./InputTime";
35
35
  export * from "./InputText";
36
+ export * from "./InputTime";
36
37
  export * from "./Menu";
37
- export * from "./TextList";
38
- export * from "./ThumbnailList";
39
38
  export * from "./ProgressBar";
40
39
  export * from "./Select";
41
40
  export * from "./StatusLabel";
42
41
  export * from "./Switch";
43
42
  export * from "./Text";
43
+ export * from "./TextList";
44
+ export * from "./ThumbnailList";
44
45
  export * from "./Toast";
45
46
  export * from "./Typography";