@artsy/palette-mobile 23.14.0 → 24.0.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.
Files changed (220) hide show
  1. package/dist/Theme.js +16 -11
  2. package/dist/animation/CssTransition.js +71 -26
  3. package/dist/animation/index.js +17 -1
  4. package/dist/constants.js +12 -8
  5. package/dist/elements/ArtsyKeyboardAvoidingView/ArtsyKeyboardAvoidingView.js +116 -69
  6. package/dist/elements/ArtsyKeyboardAvoidingView/index.js +17 -1
  7. package/dist/elements/Autocomplete/Autocomplete.js +32 -23
  8. package/dist/elements/Autocomplete/Autocomplete.tests.js +128 -56
  9. package/dist/elements/Autocomplete/index.js +17 -1
  10. package/dist/elements/Avatar/Avatar.js +20 -15
  11. package/dist/elements/Avatar/Avatar.stories.js +29 -15
  12. package/dist/elements/Avatar/Avatar.tests.js +12 -10
  13. package/dist/elements/Avatar/index.js +17 -1
  14. package/dist/elements/BackButton/BackButton.js +16 -9
  15. package/dist/elements/BackButton/BackButton.stories.js +12 -8
  16. package/dist/elements/BackButton/index.js +17 -1
  17. package/dist/elements/Banner/Banner.js +45 -18
  18. package/dist/elements/Banner/Banner.stories.js +12 -8
  19. package/dist/elements/Banner/index.js +17 -1
  20. package/dist/elements/BorderBox/BorderBox.js +16 -11
  21. package/dist/elements/BorderBox/index.js +17 -1
  22. package/dist/elements/Box/Box.js +16 -14
  23. package/dist/elements/Box/Box.stories.js +21 -15
  24. package/dist/elements/Box/index.js +17 -1
  25. package/dist/elements/Button/Button.js +85 -64
  26. package/dist/elements/Button/Button.stories.js +48 -23
  27. package/dist/elements/Button/CTAButton.js +18 -3
  28. package/dist/elements/Button/FollowButton.js +38 -11
  29. package/dist/elements/Button/LinkButton.js +19 -4
  30. package/dist/elements/Button/colors.js +7 -3
  31. package/dist/elements/Button/index.js +20 -4
  32. package/dist/elements/ButtonNew/Button.js +114 -49
  33. package/dist/elements/ButtonNew/Button.stories.js +64 -38
  34. package/dist/elements/ButtonNew/Button.tests.js +23 -21
  35. package/dist/elements/ButtonNew/CTAButton.js +18 -3
  36. package/dist/elements/ButtonNew/FollowButton.js +36 -9
  37. package/dist/elements/ButtonNew/LinkButton.js +19 -4
  38. package/dist/elements/ButtonNew/colors.js +7 -3
  39. package/dist/elements/ButtonNew/index.js +20 -4
  40. package/dist/elements/Checkbox/Check.js +83 -46
  41. package/dist/elements/Checkbox/Checkbox.js +83 -47
  42. package/dist/elements/Checkbox/Checkbox.stories.js +10 -9
  43. package/dist/elements/Checkbox/index.js +18 -2
  44. package/dist/elements/Chip/Chip.js +23 -18
  45. package/dist/elements/Chip/Chip.stories.js +12 -8
  46. package/dist/elements/Chip/index.js +17 -1
  47. package/dist/elements/ClassTheme/ClassTheme.js +10 -5
  48. package/dist/elements/ClassTheme/index.js +17 -1
  49. package/dist/elements/Collapse/Collapse.js +9 -4
  50. package/dist/elements/Collapse/Collapse.stories.js +13 -9
  51. package/dist/elements/Collapse/index.js +17 -1
  52. package/dist/elements/CollapsibleMenuItem/CollapsibleMenuItem.js +32 -27
  53. package/dist/elements/CollapsibleMenuItem/CollapsibleMenuItem.stories.js +62 -37
  54. package/dist/elements/CollapsibleMenuItem/index.js +17 -1
  55. package/dist/elements/Dialog/Dialog.js +52 -26
  56. package/dist/elements/Dialog/Dialog.stories.js +41 -22
  57. package/dist/elements/Dialog/Dialog.tests.js +33 -31
  58. package/dist/elements/Dialog/index.js +17 -1
  59. package/dist/elements/EntityHeader/EntityHeader.js +42 -15
  60. package/dist/elements/EntityHeader/EntityHeader.stories.js +26 -18
  61. package/dist/elements/EntityHeader/index.js +17 -1
  62. package/dist/elements/Flex/Flex.js +32 -4
  63. package/dist/elements/Flex/index.js +17 -1
  64. package/dist/elements/Header/ArtsyLogoHeader.js +15 -8
  65. package/dist/elements/Header/index.js +17 -1
  66. package/dist/elements/Histogram/Histogram.js +19 -14
  67. package/dist/elements/Histogram/index.js +17 -1
  68. package/dist/elements/Image/Image.js +60 -28
  69. package/dist/elements/Image/Image.stories.js +35 -23
  70. package/dist/elements/Image/__tests__/getImageURL.tests.js +10 -8
  71. package/dist/elements/Image/helpers/getImageURL.js +13 -8
  72. package/dist/elements/Image/index.js +17 -1
  73. package/dist/elements/Input/Input.js +216 -168
  74. package/dist/elements/Input/Input.stories.js +15 -11
  75. package/dist/elements/Input/Input.tests.js +85 -39
  76. package/dist/elements/Input/InputTitle.js +9 -4
  77. package/dist/elements/Input/helpers.js +35 -27
  78. package/dist/elements/Input/index.js +19 -3
  79. package/dist/elements/Input/maskValue.js +25 -9
  80. package/dist/elements/Input/maskValue.tests.js +19 -17
  81. package/dist/elements/Join/Join.js +14 -9
  82. package/dist/elements/Join/index.js +17 -1
  83. package/dist/elements/LazyFlatlist/LazyFlatlist.js +11 -8
  84. package/dist/elements/LazyFlatlist/index.js +18 -2
  85. package/dist/elements/LazyFlatlist/useHasSeenItem.js +19 -12
  86. package/dist/elements/LegacyScreen/LegacyScreen.js +124 -83
  87. package/dist/elements/LegacyScreen/index.js +17 -1
  88. package/dist/elements/LegacyTabs/ContentTabs.js +18 -12
  89. package/dist/elements/LegacyTabs/NavigationalTabs.js +21 -15
  90. package/dist/elements/LegacyTabs/StepTabs.js +25 -19
  91. package/dist/elements/LegacyTabs/Tab.js +31 -19
  92. package/dist/elements/LegacyTabs/TabBarContainer.js +48 -39
  93. package/dist/elements/LegacyTabs/index.js +38 -9
  94. package/dist/elements/List/BulletedItem.js +34 -7
  95. package/dist/elements/List/List.stories.js +12 -8
  96. package/dist/elements/List/index.js +17 -1
  97. package/dist/elements/MeasuredView/MeasuredView.js +18 -12
  98. package/dist/elements/MeasuredView/index.js +17 -1
  99. package/dist/elements/MenuItem/MenuItem.js +14 -9
  100. package/dist/elements/MenuItem/MenuItem.stories.js +9 -5
  101. package/dist/elements/MenuItem/index.js +17 -1
  102. package/dist/elements/Message/Message.js +35 -19
  103. package/dist/elements/Message/Message.stories.d.ts +1 -1
  104. package/dist/elements/Message/Message.stories.js +23 -17
  105. package/dist/elements/Message/Message.tests.js +38 -36
  106. package/dist/elements/Message/index.js +17 -1
  107. package/dist/elements/Pill/Pill.js +116 -138
  108. package/dist/elements/Pill/Pill.stories.js +28 -20
  109. package/dist/elements/Pill/Pill.tests.js +15 -13
  110. package/dist/elements/Pill/index.js +17 -1
  111. package/dist/elements/PopIn/PopIn.js +13 -8
  112. package/dist/elements/PopIn/index.js +17 -1
  113. package/dist/elements/Popover/Popover.js +45 -15
  114. package/dist/elements/Popover/Popover.stories.js +25 -19
  115. package/dist/elements/Popover/index.js +17 -1
  116. package/dist/elements/ProgressBar/ProgressBar.js +68 -23
  117. package/dist/elements/ProgressBar/ProgressBar.stories.js +11 -7
  118. package/dist/elements/ProgressBar/ProgressBar.tests.js +48 -23
  119. package/dist/elements/ProgressBar/index.js +17 -1
  120. package/dist/elements/Radio/RadioButton.js +80 -44
  121. package/dist/elements/Radio/RadioButton.stories.js +17 -13
  122. package/dist/elements/Radio/RadioDot.js +31 -15
  123. package/dist/elements/Radio/index.js +7 -2
  124. package/dist/elements/Screen/Background.js +10 -3
  125. package/dist/elements/Screen/Body.js +37 -10
  126. package/dist/elements/Screen/BottomView.js +17 -9
  127. package/dist/elements/Screen/FloatingHeader.js +36 -9
  128. package/dist/elements/Screen/FullWidthDivider.js +20 -5
  129. package/dist/elements/Screen/FullWidthItem.js +20 -5
  130. package/dist/elements/Screen/Header.js +79 -26
  131. package/dist/elements/Screen/Screen.stories.js +46 -30
  132. package/dist/elements/Screen/ScreenBase.js +39 -11
  133. package/dist/elements/Screen/ScreenFlatList.js +26 -9
  134. package/dist/elements/Screen/ScreenScrollContext.js +21 -15
  135. package/dist/elements/Screen/ScreenScrollView.js +27 -9
  136. package/dist/elements/Screen/StickySubHeader.js +62 -23
  137. package/dist/elements/Screen/constants.js +8 -5
  138. package/dist/elements/Screen/hooks/useListenForScreenScroll.js +13 -9
  139. package/dist/elements/Screen/hooks/useShowLargeTitle.js +19 -14
  140. package/dist/elements/Screen/hooks/useTitleStyles.js +14 -10
  141. package/dist/elements/Screen/index.js +48 -31
  142. package/dist/elements/SearchInput/RoundSearchInput.js +79 -46
  143. package/dist/elements/SearchInput/SearchInput.js +43 -14
  144. package/dist/elements/SearchInput/index.js +18 -2
  145. package/dist/elements/Separator/Separator.js +20 -12
  146. package/dist/elements/Separator/Separator.stories.js +10 -6
  147. package/dist/elements/Separator/ShadowSeparator.js +14 -7
  148. package/dist/elements/Separator/index.js +18 -2
  149. package/dist/elements/SimpleMessage/SimpleMessage.js +47 -11
  150. package/dist/elements/SimpleMessage/index.js +17 -1
  151. package/dist/elements/Skeleton/Skeleton.js +50 -19
  152. package/dist/elements/Skeleton/Skeleton.stories.js +14 -10
  153. package/dist/elements/Skeleton/index.js +17 -1
  154. package/dist/elements/Spacer/Spacer.js +32 -3
  155. package/dist/elements/Spacer/Spacer.stories.js +35 -19
  156. package/dist/elements/Spacer/index.js +17 -1
  157. package/dist/elements/Spinner/Spinner.js +62 -33
  158. package/dist/elements/Spinner/index.js +17 -1
  159. package/dist/elements/Switch/Switch.js +50 -17
  160. package/dist/elements/Switch/Switch.stories.js +31 -14
  161. package/dist/elements/Switch/index.js +17 -1
  162. package/dist/elements/Tabs/SubTabBar.js +29 -20
  163. package/dist/elements/Tabs/TabFlashList.js +24 -12
  164. package/dist/elements/Tabs/TabFlatList.js +24 -12
  165. package/dist/elements/Tabs/TabMasonry.js +24 -12
  166. package/dist/elements/Tabs/TabScrollView.js +27 -14
  167. package/dist/elements/Tabs/Tabs.js +27 -24
  168. package/dist/elements/Tabs/Tabs.stories.js +93 -46
  169. package/dist/elements/Tabs/TabsContainer.js +62 -38
  170. package/dist/elements/Tabs/TabsWithHeader.js +41 -13
  171. package/dist/elements/Tabs/hooks/useListenForTabContentScroll.js +13 -9
  172. package/dist/elements/Tabs/index.js +17 -1
  173. package/dist/elements/Text/LinkText.js +32 -3
  174. package/dist/elements/Text/Text.js +61 -23
  175. package/dist/elements/Text/Text.stories.js +37 -28
  176. package/dist/elements/Text/Text.tests.js +7 -5
  177. package/dist/elements/Text/helpers.js +13 -7
  178. package/dist/elements/Text/index.js +19 -3
  179. package/dist/elements/ToolTip/ToolTip.js +67 -53
  180. package/dist/elements/ToolTip/ToolTip.stories.js +21 -14
  181. package/dist/elements/ToolTip/ToolTip.tests.js +15 -13
  182. package/dist/elements/ToolTip/ToolTipFlyout.js +68 -28
  183. package/dist/elements/ToolTip/index.js +17 -1
  184. package/dist/elements/Touchable/Touchable.js +41 -13
  185. package/dist/elements/Touchable/Touchable.stories.js +13 -9
  186. package/dist/elements/Touchable/TouchableHighlightColor.js +38 -12
  187. package/dist/elements/Touchable/TouchableWithScale.js +38 -11
  188. package/dist/elements/Touchable/index.js +19 -3
  189. package/dist/elements/VisualClue/VisualClue.stories.js +11 -7
  190. package/dist/elements/VisualClue/VisualClueDot.js +24 -14
  191. package/dist/elements/VisualClue/VisualClueText.js +26 -15
  192. package/dist/elements/VisualClue/index.js +18 -2
  193. package/dist/elements/index.js +62 -46
  194. package/dist/index.js +24 -8
  195. package/dist/setupJest.js +11 -6
  196. package/dist/storybook/decorators.js +36 -27
  197. package/dist/storybook/helpers.js +40 -22
  198. package/dist/tokens.js +28 -67
  199. package/dist/types.js +10 -5
  200. package/dist/utils/Wrap.js +16 -8
  201. package/dist/utils/colors.stories.js +31 -25
  202. package/dist/utils/createGeminiUrl.js +28 -22
  203. package/dist/utils/flattenChildren.js +20 -7
  204. package/dist/utils/formatLargeNumber.js +8 -4
  205. package/dist/utils/formatLargeNumbers.tests.js +15 -13
  206. package/dist/utils/hooks/index.js +20 -4
  207. package/dist/utils/hooks/useColor.js +6 -2
  208. package/dist/utils/hooks/useMeasure.js +40 -14
  209. package/dist/utils/hooks/useScreenDimensions.js +31 -20
  210. package/dist/utils/hooks/useSpace.js +6 -2
  211. package/dist/utils/hooks/useTheme.js +31 -23
  212. package/dist/utils/normalizeText.js +11 -6
  213. package/dist/utils/space.stories.js +15 -10
  214. package/dist/utils/tests/flattenChildren.tests.js +8 -6
  215. package/dist/utils/tests/isTestEnvironment.js +5 -1
  216. package/dist/utils/tests/renderWithWrappers.js +15 -7
  217. package/dist/utils/text.js +13 -9
  218. package/dist/utils/types.js +2 -0
  219. package/dist/utils/webTokensToMobile.js +16 -10
  220. package/package.json +30 -36
@@ -1,6 +1,35 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
- import { Box } from "../Box";
1
+ "use strict";
2
+ var __assign = (this && this.__assign) || function () {
3
+ __assign = Object.assign || function(t) {
4
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
5
+ s = arguments[i];
6
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
7
+ t[p] = s[p];
8
+ }
9
+ return t;
10
+ };
11
+ return __assign.apply(this, arguments);
12
+ };
13
+ var __rest = (this && this.__rest) || function (s, e) {
14
+ var t = {};
15
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
16
+ t[p] = s[p];
17
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
18
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
19
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
20
+ t[p[i]] = s[p[i]];
21
+ }
22
+ return t;
23
+ };
24
+ Object.defineProperty(exports, "__esModule", { value: true });
25
+ exports.Spacer = void 0;
26
+ var jsx_runtime_1 = require("react/jsx-runtime");
27
+ var Box_1 = require("../Box");
3
28
  /**
4
29
  * Used to inject space where it's needed.
5
30
  */
6
- export const Spacer = ({ x, y, ...props }) => _jsx(Box, { ml: x, mt: y, ...props });
31
+ var Spacer = function (_a) {
32
+ var x = _a.x, y = _a.y, props = __rest(_a, ["x", "y"]);
33
+ return (0, jsx_runtime_1.jsx)(Box_1.Box, __assign({ ml: x, mt: y }, props));
34
+ };
35
+ exports.Spacer = Spacer;
@@ -1,23 +1,39 @@
1
- import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
- import { Spacer } from "./Spacer";
3
- import { Text } from "../../elements";
4
- import { List } from "../../storybook/helpers";
5
- import { useSpace } from "../../utils/hooks";
6
- import { bullet } from "../../utils/text";
7
- import { Box } from "../Box";
8
- export default {
1
+ "use strict";
2
+ var __assign = (this && this.__assign) || function () {
3
+ __assign = Object.assign || function(t) {
4
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
5
+ s = arguments[i];
6
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
7
+ t[p] = s[p];
8
+ }
9
+ return t;
10
+ };
11
+ return __assign.apply(this, arguments);
12
+ };
13
+ Object.defineProperty(exports, "__esModule", { value: true });
14
+ exports.Vertical = exports.Horizontal = void 0;
15
+ var jsx_runtime_1 = require("react/jsx-runtime");
16
+ var Spacer_1 = require("./Spacer");
17
+ var elements_1 = require("../../elements");
18
+ var helpers_1 = require("../../storybook/helpers");
19
+ var hooks_1 = require("../../utils/hooks");
20
+ var text_1 = require("../../utils/text");
21
+ var Box_1 = require("../Box");
22
+ exports.default = {
9
23
  title: "Spacer",
10
- component: Spacer,
24
+ component: Spacer_1.Spacer,
11
25
  };
12
- const SpacerRow = (props) => {
13
- const space = useSpace();
14
- const size = props.x;
15
- return (_jsxs(Box, { children: [_jsxs(Box, { flexDirection: "row", children: [_jsx(Box, { width: 20, height: 20, backgroundColor: "onBackground" }), _jsx(Spacer, { ...props }), _jsx(Box, { width: 20, height: 20, backgroundColor: "onBackground" })] }), _jsx(Text, { color: "onBackground", children: typeof size === "string" ? `${size}` : `${size} ${bullet} ${space(size)}px` })] }));
26
+ var SpacerRow = function (props) {
27
+ var space = (0, hooks_1.useSpace)();
28
+ var size = props.x;
29
+ return ((0, jsx_runtime_1.jsxs)(Box_1.Box, { children: [(0, jsx_runtime_1.jsxs)(Box_1.Box, { flexDirection: "row", children: [(0, jsx_runtime_1.jsx)(Box_1.Box, { width: 20, height: 20, backgroundColor: "onBackground" }), (0, jsx_runtime_1.jsx)(Spacer_1.Spacer, __assign({}, props)), (0, jsx_runtime_1.jsx)(Box_1.Box, { width: 20, height: 20, backgroundColor: "onBackground" })] }), (0, jsx_runtime_1.jsx)(elements_1.Text, { color: "onBackground", children: typeof size === "string" ? "".concat(size) : "".concat(size, " ").concat(text_1.bullet, " ").concat(space(size), "px") })] }));
16
30
  };
17
- export const Horizontal = () => (_jsxs(List, { style: { marginLeft: 50 }, contentContainerStyle: { alignItems: "flex-start" }, children: [_jsx(Text, { weight: "medium", children: "Defined (units)" }), _jsx(SpacerRow, { x: 0.5 }), _jsx(SpacerRow, { x: 1 }), _jsx(SpacerRow, { x: 2 }), _jsx(SpacerRow, { x: 4 }), _jsx(SpacerRow, { x: 6 }), _jsx(SpacerRow, { x: 12 }), _jsx(Text, { weight: "medium", children: "Custom (pixels)" }), _jsx(SpacerRow, { x: "15px" }), _jsx(SpacerRow, { x: "50px" })] }));
18
- const SpacerCol = (props) => {
19
- const space = useSpace();
20
- const size = props.y;
21
- return (_jsxs(Box, { children: [_jsxs(Box, { flexDirection: "column", children: [_jsx(Box, { width: 20, height: 20, backgroundColor: "black" }), _jsx(Spacer, { ...props }), _jsx(Box, { width: 20, height: 20, backgroundColor: "black" })] }), _jsx(Text, { color: "black", children: typeof size === "string" ? `${size}` : `${size} ${bullet} ${space(size)}px` })] }));
31
+ var Horizontal = function () { return ((0, jsx_runtime_1.jsxs)(helpers_1.List, { style: { marginLeft: 50 }, contentContainerStyle: { alignItems: "flex-start" }, children: [(0, jsx_runtime_1.jsx)(elements_1.Text, { weight: "medium", children: "Defined (units)" }), (0, jsx_runtime_1.jsx)(SpacerRow, { x: 0.5 }), (0, jsx_runtime_1.jsx)(SpacerRow, { x: 1 }), (0, jsx_runtime_1.jsx)(SpacerRow, { x: 2 }), (0, jsx_runtime_1.jsx)(SpacerRow, { x: 4 }), (0, jsx_runtime_1.jsx)(SpacerRow, { x: 6 }), (0, jsx_runtime_1.jsx)(SpacerRow, { x: 12 }), (0, jsx_runtime_1.jsx)(elements_1.Text, { weight: "medium", children: "Custom (pixels)" }), (0, jsx_runtime_1.jsx)(SpacerRow, { x: "15px" }), (0, jsx_runtime_1.jsx)(SpacerRow, { x: "50px" })] })); };
32
+ exports.Horizontal = Horizontal;
33
+ var SpacerCol = function (props) {
34
+ var space = (0, hooks_1.useSpace)();
35
+ var size = props.y;
36
+ return ((0, jsx_runtime_1.jsxs)(Box_1.Box, { children: [(0, jsx_runtime_1.jsxs)(Box_1.Box, { flexDirection: "column", children: [(0, jsx_runtime_1.jsx)(Box_1.Box, { width: 20, height: 20, backgroundColor: "black" }), (0, jsx_runtime_1.jsx)(Spacer_1.Spacer, __assign({}, props)), (0, jsx_runtime_1.jsx)(Box_1.Box, { width: 20, height: 20, backgroundColor: "black" })] }), (0, jsx_runtime_1.jsx)(elements_1.Text, { color: "black", children: typeof size === "string" ? "".concat(size) : "".concat(size, " ").concat(text_1.bullet, " ").concat(space(size), "px") })] }));
22
37
  };
23
- export const Vertical = () => (_jsxs(_Fragment, { children: [_jsx(Text, { weight: "medium", children: "Defined (units)" }), _jsxs(List, { horizontal: true, style: { marginTop: 50 }, contentContainerStyle: { alignItems: "flex-start", paddingHorizontal: 10 }, children: [_jsx(SpacerCol, { y: 0.5 }), _jsx(SpacerCol, { y: 1 }), _jsx(SpacerCol, { y: 2 }), _jsx(SpacerCol, { y: 4 }), _jsx(SpacerCol, { y: 6 }), _jsx(SpacerCol, { y: 12 })] }), _jsx(Text, { weight: "medium", children: "Custom (pixels)" }), _jsxs(List, { horizontal: true, style: { marginTop: 50 }, contentContainerStyle: { alignItems: "flex-start", paddingHorizontal: 10 }, children: [_jsx(SpacerCol, { y: "15px" }), _jsx(SpacerCol, { y: "50px" })] })] }));
38
+ var Vertical = function () { return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(elements_1.Text, { weight: "medium", children: "Defined (units)" }), (0, jsx_runtime_1.jsxs)(helpers_1.List, { horizontal: true, style: { marginTop: 50 }, contentContainerStyle: { alignItems: "flex-start", paddingHorizontal: 10 }, children: [(0, jsx_runtime_1.jsx)(SpacerCol, { y: 0.5 }), (0, jsx_runtime_1.jsx)(SpacerCol, { y: 1 }), (0, jsx_runtime_1.jsx)(SpacerCol, { y: 2 }), (0, jsx_runtime_1.jsx)(SpacerCol, { y: 4 }), (0, jsx_runtime_1.jsx)(SpacerCol, { y: 6 }), (0, jsx_runtime_1.jsx)(SpacerCol, { y: 12 })] }), (0, jsx_runtime_1.jsx)(elements_1.Text, { weight: "medium", children: "Custom (pixels)" }), (0, jsx_runtime_1.jsxs)(helpers_1.List, { horizontal: true, style: { marginTop: 50 }, contentContainerStyle: { alignItems: "flex-start", paddingHorizontal: 10 }, children: [(0, jsx_runtime_1.jsx)(SpacerCol, { y: "15px" }), (0, jsx_runtime_1.jsx)(SpacerCol, { y: "50px" })] })] })); };
39
+ exports.Vertical = Vertical;
@@ -1 +1,17 @@
1
- export * from "./Spacer";
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./Spacer"), exports);
@@ -1,14 +1,47 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
- import { useEffect, useMemo, useRef } from "react";
3
- import { Animated, Easing } from "react-native";
4
- import styled from "styled-components/native";
5
- import { useColor } from "../../utils/hooks";
1
+ "use strict";
2
+ var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
3
+ if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
4
+ return cooked;
5
+ };
6
+ var __assign = (this && this.__assign) || function () {
7
+ __assign = Object.assign || function(t) {
8
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
9
+ s = arguments[i];
10
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
11
+ t[p] = s[p];
12
+ }
13
+ return t;
14
+ };
15
+ return __assign.apply(this, arguments);
16
+ };
17
+ var __rest = (this && this.__rest) || function (s, e) {
18
+ var t = {};
19
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
20
+ t[p] = s[p];
21
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
22
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
23
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
24
+ t[p[i]] = s[p[i]];
25
+ }
26
+ return t;
27
+ };
28
+ var __importDefault = (this && this.__importDefault) || function (mod) {
29
+ return (mod && mod.__esModule) ? mod : { "default": mod };
30
+ };
31
+ Object.defineProperty(exports, "__esModule", { value: true });
32
+ exports.Spinner = exports.getSize = void 0;
33
+ var jsx_runtime_1 = require("react/jsx-runtime");
34
+ var react_1 = require("react");
35
+ var react_native_1 = require("react-native");
36
+ var native_1 = __importDefault(require("styled-components/native"));
37
+ var hooks_1 = require("../../utils/hooks");
6
38
  /**
7
39
  * Returns width and height of spinner based on size
8
40
  * @param props
9
41
  */
10
- export const getSize = (props) => {
11
- const base = { width: 25, height: 6 };
42
+ var getSize = function (props) {
43
+ var _a, _b;
44
+ var base = { width: 25, height: 6 };
12
45
  switch (props.size) {
13
46
  case "small":
14
47
  return {
@@ -27,33 +60,36 @@ export const getSize = (props) => {
27
60
  };
28
61
  default:
29
62
  return {
30
- width: props.width ?? 25,
31
- height: props.height ?? 6,
63
+ width: (_a = props.width) !== null && _a !== void 0 ? _a : 25,
64
+ height: (_b = props.height) !== null && _b !== void 0 ? _b : 6,
32
65
  };
33
66
  }
34
67
  };
68
+ exports.getSize = getSize;
35
69
  /**
36
70
  * Spinner component for React Native
37
71
  */
38
- export const Spinner = ({ size = "medium", color: theColor = "mono100", ...rest }) => {
39
- const color = useColor();
40
- const rotation = useMemo(() => new Animated.Value(0), []);
41
- const animationRef = useRef(null);
42
- useEffect(() => {
43
- animationRef.current = Animated.loop(Animated.timing(rotation, {
72
+ var Spinner = function (_a) {
73
+ var _b = _a.size, size = _b === void 0 ? "medium" : _b, _c = _a.color, theColor = _c === void 0 ? "mono100" : _c, rest = __rest(_a, ["size", "color"]);
74
+ var color = (0, hooks_1.useColor)();
75
+ var rotation = (0, react_1.useMemo)(function () { return new react_native_1.Animated.Value(0); }, []);
76
+ var animationRef = (0, react_1.useRef)(null);
77
+ (0, react_1.useEffect)(function () {
78
+ animationRef.current = react_native_1.Animated.loop(react_native_1.Animated.timing(rotation, {
44
79
  toValue: 1,
45
80
  duration: 1000,
46
- easing: Easing.linear,
81
+ easing: react_native_1.Easing.linear,
47
82
  useNativeDriver: true,
48
83
  }), {
49
84
  iterations: -1,
50
85
  });
51
86
  animationRef.current.start();
52
- return () => {
53
- animationRef.current.stop();
87
+ return function () {
88
+ var _a;
89
+ (_a = animationRef.current) === null || _a === void 0 ? void 0 : _a.stop();
54
90
  };
55
91
  }, []);
56
- const style = [
92
+ var style = [
57
93
  {
58
94
  transform: [
59
95
  {
@@ -66,19 +102,12 @@ export const Spinner = ({ size = "medium", color: theColor = "mono100", ...rest
66
102
  },
67
103
  rest.style,
68
104
  ];
69
- return _jsx(Bar, { size: size, color: color(theColor), ...rest, style: style });
105
+ return (0, jsx_runtime_1.jsx)(Bar, __assign({ size: size, color: color(theColor) }, rest, { style: style }));
70
106
  };
107
+ exports.Spinner = Spinner;
71
108
  /** Generic Spinner component */
72
- const Bar = styled(Animated.View) `
73
- background: black;
74
- position: absolute;
75
-
76
- ${(props) => {
77
- const { width, height } = getSize(props);
78
- return `
79
- background: ${props.color};
80
- width: ${width}px;
81
- height: ${height}px;
82
- `;
83
- }};
84
- `;
109
+ var Bar = (0, native_1.default)(react_native_1.Animated.View)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n background: black;\n position: absolute;\n\n ", ";\n"], ["\n background: black;\n position: absolute;\n\n ", ";\n"])), function (props) {
110
+ var _a = (0, exports.getSize)(props), width = _a.width, height = _a.height;
111
+ return "\n background: ".concat(props.color, ";\n width: ").concat(width, "px;\n height: ").concat(height, "px;\n ");
112
+ });
113
+ var templateObject_1;
@@ -1 +1,17 @@
1
- export * from "./Spinner";
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./Spinner"), exports);
@@ -1,27 +1,60 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
- import { Platform, Switch as RNSwitch } from "react-native";
3
- import { useColor } from "../../utils/hooks";
4
- export const Switch = ({ value,
5
- // Regardless of the color scheme, the thumb and track colors are always white
6
- // @ts-expect-error
7
- thumbColorActive = Platform.OS === "ios" ? "white" : "blue100",
8
- // Regardless of the color scheme, the thumb and track colors are always white
9
- // @ts-expect-error
10
- thumbColorInactive = Platform.OS === "ios" ? "white" : "mono10", trackColorActive = Platform.OS === "ios" ? "blue100" : "blue10", trackColorInactive = "mono30", disabled, ...restProps }) => {
11
- const color = useColor();
12
- let thumbColor = value ? color(thumbColorActive) : color(thumbColorInactive);
13
- let trackColor = {
1
+ "use strict";
2
+ var __assign = (this && this.__assign) || function () {
3
+ __assign = Object.assign || function(t) {
4
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
5
+ s = arguments[i];
6
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
7
+ t[p] = s[p];
8
+ }
9
+ return t;
10
+ };
11
+ return __assign.apply(this, arguments);
12
+ };
13
+ var __rest = (this && this.__rest) || function (s, e) {
14
+ var t = {};
15
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
16
+ t[p] = s[p];
17
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
18
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
19
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
20
+ t[p[i]] = s[p[i]];
21
+ }
22
+ return t;
23
+ };
24
+ Object.defineProperty(exports, "__esModule", { value: true });
25
+ exports.Switch = void 0;
26
+ var jsx_runtime_1 = require("react/jsx-runtime");
27
+ var react_native_1 = require("react-native");
28
+ var hooks_1 = require("../../utils/hooks");
29
+ var Switch = function (_a) {
30
+ var value = _a.value,
31
+ // Regardless of the color scheme, the thumb and track colors are always white
32
+ // @ts-expect-error
33
+ _b = _a.thumbColorActive,
34
+ // Regardless of the color scheme, the thumb and track colors are always white
35
+ // @ts-expect-error
36
+ thumbColorActive = _b === void 0 ? react_native_1.Platform.OS === "ios" ? "white" : "blue100" : _b,
37
+ // Regardless of the color scheme, the thumb and track colors are always white
38
+ // @ts-expect-error
39
+ _c = _a.thumbColorInactive,
40
+ // Regardless of the color scheme, the thumb and track colors are always white
41
+ // @ts-expect-error
42
+ thumbColorInactive = _c === void 0 ? react_native_1.Platform.OS === "ios" ? "white" : "mono10" : _c, _d = _a.trackColorActive, trackColorActive = _d === void 0 ? react_native_1.Platform.OS === "ios" ? "blue100" : "blue10" : _d, _e = _a.trackColorInactive, trackColorInactive = _e === void 0 ? "mono30" : _e, disabled = _a.disabled, restProps = __rest(_a, ["value", "thumbColorActive", "thumbColorInactive", "trackColorActive", "trackColorInactive", "disabled"]);
43
+ var color = (0, hooks_1.useColor)();
44
+ var thumbColor = value ? color(thumbColorActive) : color(thumbColorInactive);
45
+ var trackColor = {
14
46
  false: color(trackColorInactive),
15
47
  true: color(trackColorActive),
16
48
  };
17
- let iosBackground = color(trackColorInactive);
49
+ var iosBackground = color(trackColorInactive);
18
50
  if (disabled) {
19
- thumbColor = Platform.OS === "ios" ? color("mono0") : color("mono30");
51
+ thumbColor = react_native_1.Platform.OS === "ios" ? color("mono0") : color("mono30");
20
52
  trackColor = {
21
53
  false: color("mono10"),
22
- true: Platform.OS === "ios" ? color("mono30") : color("mono10"),
54
+ true: react_native_1.Platform.OS === "ios" ? color("mono30") : color("mono10"),
23
55
  };
24
56
  iosBackground = color("mono10");
25
57
  }
26
- return (_jsx(RNSwitch, { accessibilityRole: "switch", value: value, disabled: disabled, thumbColor: thumbColor, trackColor: trackColor, ios_backgroundColor: iosBackground, ...restProps }));
58
+ return ((0, jsx_runtime_1.jsx)(react_native_1.Switch, __assign({ accessibilityRole: "switch", value: value, disabled: disabled, thumbColor: thumbColor, trackColor: trackColor, ios_backgroundColor: iosBackground }, restProps)));
27
59
  };
60
+ exports.Switch = Switch;
@@ -1,22 +1,39 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { useState } from "react";
3
- import { Switch } from "./Switch";
4
- import { List } from "../../storybook/helpers";
5
- import { Flex } from "../Flex";
6
- import { Text } from "../Text";
7
- export default {
1
+ "use strict";
2
+ var __assign = (this && this.__assign) || function () {
3
+ __assign = Object.assign || function(t) {
4
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
5
+ s = arguments[i];
6
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
7
+ t[p] = s[p];
8
+ }
9
+ return t;
10
+ };
11
+ return __assign.apply(this, arguments);
12
+ };
13
+ Object.defineProperty(exports, "__esModule", { value: true });
14
+ exports.Variants = void 0;
15
+ var jsx_runtime_1 = require("react/jsx-runtime");
16
+ var react_1 = require("react");
17
+ var Switch_1 = require("./Switch");
18
+ var helpers_1 = require("../../storybook/helpers");
19
+ var Flex_1 = require("../Flex");
20
+ var Text_1 = require("../Text");
21
+ exports.default = {
8
22
  title: "Switch",
9
- component: Switch,
23
+ component: Switch_1.Switch,
10
24
  };
11
- export const Variants = () => {
12
- const [switches, setSwitches] = useState([
25
+ var Variants = function () {
26
+ var _a = (0, react_1.useState)([
13
27
  { id: 1, label: "Default colors", value: true },
14
28
  { id: 2, label: "disabled", value: false },
15
29
  { id: 3, label: "Custom #1", value: true },
16
30
  { id: 4, label: "Custom #2", value: false },
17
- ]);
18
- const handleSwitchChange = (id) => {
19
- setSwitches((prevSwitches) => prevSwitches.map((sw) => (sw.id === id ? { ...sw, value: !sw.value } : sw)));
31
+ ]), switches = _a[0], setSwitches = _a[1];
32
+ var handleSwitchChange = function (id) {
33
+ setSwitches(function (prevSwitches) {
34
+ return prevSwitches.map(function (sw) { return (sw.id === id ? __assign(__assign({}, sw), { value: !sw.value }) : sw); });
35
+ });
20
36
  };
21
- return (_jsxs(List, { children: [_jsxs(Flex, { width: 200, flexDirection: "row", justifyContent: "space-between", children: [_jsx(Text, { children: "Default State" }), _jsx(Switch, { value: switches[0].value, onValueChange: () => handleSwitchChange(1) })] }), _jsxs(Flex, { width: 200, flexDirection: "row", justifyContent: "space-between", children: [_jsx(Text, { children: "Disabled" }), _jsx(Switch, { disabled: true, value: switches[1].value, onValueChange: () => handleSwitchChange(2) })] }), _jsxs(Flex, { width: 200, flexDirection: "row", justifyContent: "space-between", children: [_jsx(Text, { children: "Custom Colors 1" }), _jsx(Switch, { value: switches[2].value, onValueChange: () => handleSwitchChange(3), trackColorActive: "red100", trackColorInactive: "green100", thumbColorActive: "yellow100", thumbColorInactive: "orange100" })] }), _jsxs(Flex, { width: 200, flexDirection: "row", justifyContent: "space-between", children: [_jsx(Text, { children: "Custom Colors 2" }), _jsx(Switch, { value: switches[3].value, onValueChange: () => handleSwitchChange(4), thumbColorActive: "yellow100", trackColorActive: "blue100", thumbColorInactive: "mono0", trackColorInactive: "red100" })] })] }));
37
+ return ((0, jsx_runtime_1.jsxs)(helpers_1.List, { children: [(0, jsx_runtime_1.jsxs)(Flex_1.Flex, { width: 200, flexDirection: "row", justifyContent: "space-between", children: [(0, jsx_runtime_1.jsx)(Text_1.Text, { children: "Default State" }), (0, jsx_runtime_1.jsx)(Switch_1.Switch, { value: switches[0].value, onValueChange: function () { return handleSwitchChange(1); } })] }), (0, jsx_runtime_1.jsxs)(Flex_1.Flex, { width: 200, flexDirection: "row", justifyContent: "space-between", children: [(0, jsx_runtime_1.jsx)(Text_1.Text, { children: "Disabled" }), (0, jsx_runtime_1.jsx)(Switch_1.Switch, { disabled: true, value: switches[1].value, onValueChange: function () { return handleSwitchChange(2); } })] }), (0, jsx_runtime_1.jsxs)(Flex_1.Flex, { width: 200, flexDirection: "row", justifyContent: "space-between", children: [(0, jsx_runtime_1.jsx)(Text_1.Text, { children: "Custom Colors 1" }), (0, jsx_runtime_1.jsx)(Switch_1.Switch, { value: switches[2].value, onValueChange: function () { return handleSwitchChange(3); }, trackColorActive: "red100", trackColorInactive: "green100", thumbColorActive: "yellow100", thumbColorInactive: "orange100" })] }), (0, jsx_runtime_1.jsxs)(Flex_1.Flex, { width: 200, flexDirection: "row", justifyContent: "space-between", children: [(0, jsx_runtime_1.jsx)(Text_1.Text, { children: "Custom Colors 2" }), (0, jsx_runtime_1.jsx)(Switch_1.Switch, { value: switches[3].value, onValueChange: function () { return handleSwitchChange(4); }, thumbColorActive: "yellow100", trackColorActive: "blue100", thumbColorInactive: "mono0", trackColorInactive: "red100" })] })] }));
22
38
  };
39
+ exports.Variants = Variants;
@@ -1 +1,17 @@
1
- export * from "./Switch";
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./Switch"), exports);
@@ -1,31 +1,39 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
- import { MotiView } from "moti";
3
- import { Platform } from "react-native";
4
- import { useCurrentTabScrollY, useHeaderMeasurements } from "react-native-collapsible-tab-view";
5
- import { useAnimatedStyle } from "react-native-reanimated";
6
- import { useSpace } from "../../utils/hooks/useSpace";
7
- import { Flex } from "../Flex";
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SubTabBarIOS = exports.SubTabBarAndroid = exports.SubTabBar = void 0;
4
+ var jsx_runtime_1 = require("react/jsx-runtime");
5
+ var moti_1 = require("moti");
6
+ var react_native_1 = require("react-native");
7
+ var react_native_collapsible_tab_view_1 = require("react-native-collapsible-tab-view");
8
+ var react_native_reanimated_1 = require("react-native-reanimated");
9
+ var useSpace_1 = require("../../utils/hooks/useSpace");
10
+ var Flex_1 = require("../Flex");
8
11
  /**
9
12
  * Use to position content directly below the tab bar, and for it to stick while
10
13
  * scrolling in the subview.
11
14
  *
12
15
  * Note: On Android, it will be static and will not stick to the top of the screen.
13
16
  */
14
- export const SubTabBar = ({ children }) => {
15
- if (Platform.OS === "android") {
16
- return _jsx(SubTabBarAndroid, { children: children });
17
+ var SubTabBar = function (_a) {
18
+ var children = _a.children;
19
+ if (react_native_1.Platform.OS === "android") {
20
+ return (0, jsx_runtime_1.jsx)(exports.SubTabBarAndroid, { children: children });
17
21
  }
18
- return _jsx(SubTabBarIOS, { children: children });
22
+ return (0, jsx_runtime_1.jsx)(exports.SubTabBarIOS, { children: children });
19
23
  };
20
- export const SubTabBarAndroid = ({ children }) => {
21
- const space = useSpace();
22
- return _jsx(Flex, { style: [{ zIndex: 1, marginHorizontal: -space(2) }], children: children });
24
+ exports.SubTabBar = SubTabBar;
25
+ var SubTabBarAndroid = function (_a) {
26
+ var children = _a.children;
27
+ var space = (0, useSpace_1.useSpace)();
28
+ return (0, jsx_runtime_1.jsx)(Flex_1.Flex, { style: [{ zIndex: 1, marginHorizontal: -space(2) }], children: children });
23
29
  };
24
- export const SubTabBarIOS = ({ children }) => {
25
- const { top } = useHeaderMeasurements();
26
- const scrollY = useCurrentTabScrollY();
27
- const space = useSpace();
28
- const style = useAnimatedStyle(() => {
30
+ exports.SubTabBarAndroid = SubTabBarAndroid;
31
+ var SubTabBarIOS = function (_a) {
32
+ var children = _a.children;
33
+ var top = (0, react_native_collapsible_tab_view_1.useHeaderMeasurements)().top;
34
+ var scrollY = (0, react_native_collapsible_tab_view_1.useCurrentTabScrollY)();
35
+ var space = (0, useSpace_1.useSpace)();
36
+ var style = (0, react_native_reanimated_1.useAnimatedStyle)(function () {
29
37
  return {
30
38
  transform: [
31
39
  {
@@ -34,5 +42,6 @@ export const SubTabBarIOS = ({ children }) => {
34
42
  ],
35
43
  };
36
44
  }, []);
37
- return _jsx(MotiView, { style: [style, { zIndex: 1, marginHorizontal: -space(2) }], children: children });
45
+ return (0, jsx_runtime_1.jsx)(moti_1.MotiView, { style: [style, { zIndex: 1, marginHorizontal: -space(2) }], children: children });
38
46
  };
47
+ exports.SubTabBarIOS = SubTabBarIOS;
@@ -1,13 +1,25 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
- import { Tabs } from "react-native-collapsible-tab-view";
3
- import { useListenForTabContentScroll } from "./hooks/useListenForTabContentScroll";
4
- import { useSpace } from "../../utils/hooks/useSpace";
5
- export function TabFlashList(props) {
6
- useListenForTabContentScroll();
7
- const space = useSpace();
8
- const contentContainerStyle = (props.contentContainerStyle ?? {});
9
- return (_jsx(Tabs.FlashList, { contentContainerStyle: {
10
- paddingHorizontal: space(2),
11
- ...contentContainerStyle,
12
- }, ...props }));
1
+ "use strict";
2
+ var __assign = (this && this.__assign) || function () {
3
+ __assign = Object.assign || function(t) {
4
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
5
+ s = arguments[i];
6
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
7
+ t[p] = s[p];
8
+ }
9
+ return t;
10
+ };
11
+ return __assign.apply(this, arguments);
12
+ };
13
+ Object.defineProperty(exports, "__esModule", { value: true });
14
+ exports.TabFlashList = TabFlashList;
15
+ var jsx_runtime_1 = require("react/jsx-runtime");
16
+ var react_native_collapsible_tab_view_1 = require("react-native-collapsible-tab-view");
17
+ var useListenForTabContentScroll_1 = require("./hooks/useListenForTabContentScroll");
18
+ var useSpace_1 = require("../../utils/hooks/useSpace");
19
+ function TabFlashList(props) {
20
+ var _a;
21
+ (0, useListenForTabContentScroll_1.useListenForTabContentScroll)();
22
+ var space = (0, useSpace_1.useSpace)();
23
+ var contentContainerStyle = ((_a = props.contentContainerStyle) !== null && _a !== void 0 ? _a : {});
24
+ return ((0, jsx_runtime_1.jsx)(react_native_collapsible_tab_view_1.Tabs.FlashList, __assign({ contentContainerStyle: __assign({ paddingHorizontal: space(2) }, contentContainerStyle) }, props)));
13
25
  }
@@ -1,13 +1,25 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
- import { Tabs } from "react-native-collapsible-tab-view";
3
- import { useListenForTabContentScroll } from "./hooks/useListenForTabContentScroll";
4
- import { useSpace } from "../../utils/hooks/useSpace";
5
- export function TabFlatList(props) {
6
- useListenForTabContentScroll();
7
- const space = useSpace();
8
- const contentContainerStyle = (props.contentContainerStyle ?? {});
9
- return (_jsx(Tabs.FlatList, { contentContainerStyle: {
10
- marginHorizontal: space(2),
11
- ...contentContainerStyle,
12
- }, ...props }));
1
+ "use strict";
2
+ var __assign = (this && this.__assign) || function () {
3
+ __assign = Object.assign || function(t) {
4
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
5
+ s = arguments[i];
6
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
7
+ t[p] = s[p];
8
+ }
9
+ return t;
10
+ };
11
+ return __assign.apply(this, arguments);
12
+ };
13
+ Object.defineProperty(exports, "__esModule", { value: true });
14
+ exports.TabFlatList = TabFlatList;
15
+ var jsx_runtime_1 = require("react/jsx-runtime");
16
+ var react_native_collapsible_tab_view_1 = require("react-native-collapsible-tab-view");
17
+ var useListenForTabContentScroll_1 = require("./hooks/useListenForTabContentScroll");
18
+ var useSpace_1 = require("../../utils/hooks/useSpace");
19
+ function TabFlatList(props) {
20
+ var _a;
21
+ (0, useListenForTabContentScroll_1.useListenForTabContentScroll)();
22
+ var space = (0, useSpace_1.useSpace)();
23
+ var contentContainerStyle = ((_a = props.contentContainerStyle) !== null && _a !== void 0 ? _a : {});
24
+ return ((0, jsx_runtime_1.jsx)(react_native_collapsible_tab_view_1.Tabs.FlatList, __assign({ contentContainerStyle: __assign({ marginHorizontal: space(2) }, contentContainerStyle) }, props)));
13
25
  }
@@ -1,13 +1,25 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
- import { Tabs } from "react-native-collapsible-tab-view";
3
- import { useListenForTabContentScroll } from "./hooks/useListenForTabContentScroll";
4
- import { useSpace } from "../../utils/hooks/useSpace";
5
- export function TabMasonry(props) {
6
- useListenForTabContentScroll();
7
- const space = useSpace();
8
- const contentContainerStyle = (props.contentContainerStyle ?? {});
9
- return (_jsx(Tabs.FlashList, { masonry: true, contentContainerStyle: {
10
- paddingHorizontal: space(2),
11
- ...contentContainerStyle,
12
- }, ...props, ref: props.innerRef }));
1
+ "use strict";
2
+ var __assign = (this && this.__assign) || function () {
3
+ __assign = Object.assign || function(t) {
4
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
5
+ s = arguments[i];
6
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
7
+ t[p] = s[p];
8
+ }
9
+ return t;
10
+ };
11
+ return __assign.apply(this, arguments);
12
+ };
13
+ Object.defineProperty(exports, "__esModule", { value: true });
14
+ exports.TabMasonry = TabMasonry;
15
+ var jsx_runtime_1 = require("react/jsx-runtime");
16
+ var react_native_collapsible_tab_view_1 = require("react-native-collapsible-tab-view");
17
+ var useListenForTabContentScroll_1 = require("./hooks/useListenForTabContentScroll");
18
+ var useSpace_1 = require("../../utils/hooks/useSpace");
19
+ function TabMasonry(props) {
20
+ var _a;
21
+ (0, useListenForTabContentScroll_1.useListenForTabContentScroll)();
22
+ var space = (0, useSpace_1.useSpace)();
23
+ var contentContainerStyle = ((_a = props.contentContainerStyle) !== null && _a !== void 0 ? _a : {});
24
+ return ((0, jsx_runtime_1.jsx)(react_native_collapsible_tab_view_1.Tabs.FlashList, __assign({ masonry: true, contentContainerStyle: __assign({ paddingHorizontal: space(2) }, contentContainerStyle) }, props, { ref: props.innerRef })));
13
25
  }