@artsy/palette-mobile 13.2.33 → 13.2.35

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 (327) hide show
  1. package/dist/Theme.js +9 -13
  2. package/dist/animation/CssTransition.js +8 -12
  3. package/dist/animation/index.js +1 -17
  4. package/dist/constants.js +4 -8
  5. package/dist/elements/ArtsyKeyboardAvoidingView/ArtsyKeyboardAvoidingView.js +19 -23
  6. package/dist/elements/ArtsyKeyboardAvoidingView/index.js +1 -17
  7. package/dist/elements/Autocomplete/Autocomplete.js +4 -8
  8. package/dist/elements/Autocomplete/Autocomplete.tests.js +9 -11
  9. package/dist/elements/Autocomplete/index.js +1 -17
  10. package/dist/elements/Avatar/Avatar.js +17 -44
  11. package/dist/elements/Avatar/Avatar.stories.js +7 -11
  12. package/dist/elements/Avatar/Avatar.tests.js +8 -10
  13. package/dist/elements/Avatar/index.js +1 -17
  14. package/dist/elements/BackButton/BackButton.js +9 -14
  15. package/dist/elements/BackButton/BackButton.stories.js +8 -12
  16. package/dist/elements/BackButton/index.js +1 -17
  17. package/dist/elements/Banner/Banner.js +14 -18
  18. package/dist/elements/Banner/Banner.stories.js +7 -11
  19. package/dist/elements/Banner/index.js +1 -17
  20. package/dist/elements/BorderBox/BorderBox.js +9 -15
  21. package/dist/elements/BorderBox/index.js +1 -17
  22. package/dist/elements/Box/Box.js +11 -17
  23. package/dist/elements/Box/Box.stories.js +14 -20
  24. package/dist/elements/Box/index.js +1 -17
  25. package/dist/elements/Button/Button.js +30 -37
  26. package/dist/elements/Button/Button.stories.js +18 -25
  27. package/dist/elements/Button/CTAButton.js +3 -7
  28. package/dist/elements/Button/FollowButton.js +7 -11
  29. package/dist/elements/Button/LinkButton.js +4 -8
  30. package/dist/elements/Button/colors.js +3 -7
  31. package/dist/elements/Button/index.js +4 -20
  32. package/dist/elements/ButtonNew/Button.js +32 -62
  33. package/dist/elements/ButtonNew/Button.stories.js +36 -50
  34. package/dist/elements/ButtonNew/Button.tests.js +13 -15
  35. package/dist/elements/ButtonNew/CTAButton.js +3 -7
  36. package/dist/elements/ButtonNew/FollowButton.js +7 -11
  37. package/dist/elements/ButtonNew/LinkButton.js +4 -8
  38. package/dist/elements/ButtonNew/colors.js +3 -7
  39. package/dist/elements/ButtonNew/index.js +4 -20
  40. package/dist/elements/Checkbox/Check.js +29 -56
  41. package/dist/elements/Checkbox/Checkbox.js +22 -30
  42. package/dist/elements/Checkbox/Checkbox.stories.js +8 -12
  43. package/dist/elements/Checkbox/index.js +2 -18
  44. package/dist/elements/ClassTheme/ClassTheme.js +5 -9
  45. package/dist/elements/ClassTheme/index.js +1 -17
  46. package/dist/elements/Collapse/Collapse.js +4 -8
  47. package/dist/elements/Collapse/Collapse.stories.js +9 -13
  48. package/dist/elements/Collapse/index.js +1 -17
  49. package/dist/elements/CollapsibleMenuItem/CollapsibleMenuItem.js +18 -21
  50. package/dist/elements/CollapsibleMenuItem/CollapsibleMenuItem.stories.js +30 -38
  51. package/dist/elements/CollapsibleMenuItem/index.js +1 -17
  52. package/dist/elements/Dialog/Dialog.js +20 -24
  53. package/dist/elements/Dialog/Dialog.stories.js +14 -16
  54. package/dist/elements/Dialog/Dialog.tests.js +12 -14
  55. package/dist/elements/Dialog/index.js +1 -17
  56. package/dist/elements/EntityHeader/EntityHeader.js +14 -18
  57. package/dist/elements/EntityHeader/EntityHeader.stories.js +17 -25
  58. package/dist/elements/EntityHeader/index.js +1 -17
  59. package/dist/elements/Flex/Flex.js +4 -7
  60. package/dist/elements/Flex/index.js +1 -17
  61. package/dist/elements/Header/ArtsyLogoHeader.js +8 -12
  62. package/dist/elements/Header/index.js +1 -17
  63. package/dist/elements/Histogram/Histogram.js +6 -10
  64. package/dist/elements/Histogram/index.js +1 -17
  65. package/dist/elements/Image/Image.js +26 -55
  66. package/dist/elements/Image/Image.stories.js +14 -16
  67. package/dist/elements/Image/index.js +1 -17
  68. package/dist/elements/Input/Input.js +127 -157
  69. package/dist/elements/Input/Input.stories.js +9 -11
  70. package/dist/elements/Input/Input.tests.js +17 -19
  71. package/dist/elements/Input/InputTitle.js +4 -8
  72. package/dist/elements/Input/helpers.d.ts +1 -1
  73. package/dist/elements/Input/helpers.js +51 -56
  74. package/dist/elements/Input/index.js +3 -19
  75. package/dist/elements/Input/maskValue.js +5 -10
  76. package/dist/elements/Input/maskValue.tests.js +11 -13
  77. package/dist/elements/Join/Join.js +6 -10
  78. package/dist/elements/Join/index.js +1 -17
  79. package/dist/elements/LazyFlatlist/LazyFlatlist.js +3 -7
  80. package/dist/elements/LazyFlatlist/index.js +2 -18
  81. package/dist/elements/LazyFlatlist/useHasSeenItem.js +6 -10
  82. package/dist/elements/LegacyScreen/LegacyScreen.js +51 -59
  83. package/dist/elements/LegacyScreen/index.js +1 -17
  84. package/dist/elements/LegacyTabs/ContentTabs.js +8 -12
  85. package/dist/elements/LegacyTabs/NavigationalTabs.js +11 -15
  86. package/dist/elements/LegacyTabs/StepTabs.js +15 -19
  87. package/dist/elements/LegacyTabs/Tab.js +9 -13
  88. package/dist/elements/LegacyTabs/TabBarContainer.js +28 -34
  89. package/dist/elements/LegacyTabs/index.js +9 -15
  90. package/dist/elements/List/BulletedItem.js +7 -11
  91. package/dist/elements/List/List.stories.js +8 -10
  92. package/dist/elements/List/index.js +1 -17
  93. package/dist/elements/MeasuredView/MeasuredView.js +10 -15
  94. package/dist/elements/MeasuredView/index.js +1 -17
  95. package/dist/elements/MenuItem/MenuItem.js +9 -13
  96. package/dist/elements/MenuItem/MenuItem.stories.js +5 -9
  97. package/dist/elements/MenuItem/index.js +1 -17
  98. package/dist/elements/Message/Message.js +15 -19
  99. package/dist/elements/Message/Message.stories.js +10 -12
  100. package/dist/elements/Message/Message.tests.js +9 -11
  101. package/dist/elements/Message/index.js +1 -17
  102. package/dist/elements/Pill/Pill.js +53 -83
  103. package/dist/elements/Pill/Pill.stories.js +16 -18
  104. package/dist/elements/Pill/Pill.tests.js +8 -10
  105. package/dist/elements/Pill/index.js +1 -17
  106. package/dist/elements/PopIn/PopIn.js +8 -12
  107. package/dist/elements/PopIn/index.js +1 -17
  108. package/dist/elements/Popover/Popover.js +21 -28
  109. package/dist/elements/Popover/Popover.stories.js +15 -17
  110. package/dist/elements/Popover/index.js +1 -17
  111. package/dist/elements/ProgressBar/ProgressBar.js +16 -43
  112. package/dist/elements/ProgressBar/ProgressBar.stories.js +6 -8
  113. package/dist/elements/ProgressBar/ProgressBar.tests.js +7 -9
  114. package/dist/elements/ProgressBar/index.js +1 -17
  115. package/dist/elements/Radio/RadioButton.js +20 -28
  116. package/dist/elements/Radio/RadioButton.stories.js +13 -15
  117. package/dist/elements/Radio/RadioDot.js +10 -14
  118. package/dist/elements/Radio/index.js +2 -7
  119. package/dist/elements/Screen/Background.js +3 -7
  120. package/dist/elements/Screen/Body.js +9 -13
  121. package/dist/elements/Screen/BottomView.js +9 -16
  122. package/dist/elements/Screen/FloatingHeader.js +9 -13
  123. package/dist/elements/Screen/FullWidthDivider.js +5 -9
  124. package/dist/elements/Screen/FullWidthItem.js +5 -9
  125. package/dist/elements/Screen/Header.js +21 -49
  126. package/dist/elements/Screen/Screen.stories.js +18 -20
  127. package/dist/elements/Screen/ScreenBase.js +9 -13
  128. package/dist/elements/Screen/ScreenFlatList.js +8 -15
  129. package/dist/elements/Screen/ScreenScrollContext.js +9 -14
  130. package/dist/elements/Screen/ScreenScrollView.js +8 -15
  131. package/dist/elements/Screen/StickySubHeader.js +20 -47
  132. package/dist/elements/Screen/constants.js +5 -8
  133. package/dist/elements/Screen/hooks/useAnimatedHeaderScrolling.js +10 -14
  134. package/dist/elements/Screen/hooks/useListenForScreenScroll.js +10 -14
  135. package/dist/elements/Screen/index.js +29 -46
  136. package/dist/elements/SearchInput/SearchInput.js +6 -10
  137. package/dist/elements/SearchInput/index.js +1 -17
  138. package/dist/elements/Separator/Separator.js +9 -15
  139. package/dist/elements/Separator/Separator.stories.js +6 -10
  140. package/dist/elements/Separator/ShadowSeparator.js +3 -9
  141. package/dist/elements/Separator/index.js +2 -18
  142. package/dist/elements/SimpleMessage/SimpleMessage.js +9 -16
  143. package/dist/elements/SimpleMessage/index.js +1 -17
  144. package/dist/elements/Skeleton/Skeleton.js +16 -45
  145. package/dist/elements/Skeleton/Skeleton.stories.js +10 -14
  146. package/dist/elements/Skeleton/index.js +1 -17
  147. package/dist/elements/Spacer/Spacer.js +3 -7
  148. package/dist/elements/Spacer/Spacer.stories.js +15 -20
  149. package/dist/elements/Spacer/index.js +1 -17
  150. package/dist/elements/Spinner/Spinner.js +15 -23
  151. package/dist/elements/Spinner/index.js +1 -17
  152. package/dist/elements/Switch/Switch.js +8 -12
  153. package/dist/elements/Switch/Switch.stories.js +11 -15
  154. package/dist/elements/Switch/index.js +1 -17
  155. package/dist/elements/Tabs/SubTabBar.js +11 -15
  156. package/dist/elements/Tabs/TabFlashList.js +8 -12
  157. package/dist/elements/Tabs/TabFlatList.js +8 -12
  158. package/dist/elements/Tabs/TabMasonry.js +8 -12
  159. package/dist/elements/Tabs/TabScrollView.js +8 -12
  160. package/dist/elements/Tabs/Tabs.js +24 -27
  161. package/dist/elements/Tabs/Tabs.stories.js +11 -13
  162. package/dist/elements/Tabs/TabsContainer.js +15 -19
  163. package/dist/elements/Tabs/TabsWithHeader.js +8 -12
  164. package/dist/elements/Tabs/hooks/useListenForTabContentScroll.js +8 -12
  165. package/dist/elements/Tabs/index.js +1 -17
  166. package/dist/elements/Text/LinkText.js +3 -7
  167. package/dist/elements/Text/Text.js +15 -21
  168. package/dist/elements/Text/Text.stories.js +18 -27
  169. package/dist/elements/Text/Text.tests.js +3 -5
  170. package/dist/elements/Text/helpers.js +5 -10
  171. package/dist/elements/Text/index.js +3 -19
  172. package/dist/elements/ToolTip/ToolTip.js +29 -34
  173. package/dist/elements/ToolTip/ToolTip.stories.js +11 -13
  174. package/dist/elements/ToolTip/ToolTip.tests.js +7 -9
  175. package/dist/elements/ToolTip/ToolTipFlyout.js +19 -47
  176. package/dist/elements/ToolTip/index.js +1 -17
  177. package/dist/elements/Touchable/Touchable.js +12 -19
  178. package/dist/elements/Touchable/Touchable.stories.js +9 -13
  179. package/dist/elements/Touchable/TouchableHighlightColor.js +6 -10
  180. package/dist/elements/Touchable/TouchableWithScale.js +7 -11
  181. package/dist/elements/Touchable/index.js +3 -19
  182. package/dist/elements/VisualClue/VisualClue.stories.js +6 -8
  183. package/dist/elements/VisualClue/VisualClueDot.js +6 -10
  184. package/dist/elements/VisualClue/VisualClueText.js +9 -13
  185. package/dist/elements/VisualClue/index.js +2 -18
  186. package/dist/elements/index.js +45 -61
  187. package/dist/index.js +10 -26
  188. package/dist/setupJest.js +2 -7
  189. package/dist/storybook/decorators.js +20 -28
  190. package/dist/storybook/helpers.js +6 -12
  191. package/dist/svgs/AddCircleFillIcon.js +6 -10
  192. package/dist/svgs/AddCircleIcon.js +6 -10
  193. package/dist/svgs/AddIcon.js +6 -10
  194. package/dist/svgs/AlertCircleFillIcon.js +6 -10
  195. package/dist/svgs/AlertIcon.js +6 -10
  196. package/dist/svgs/ArrowCircleFillIcons.js +7 -12
  197. package/dist/svgs/ArrowDownCircleIcon.js +6 -10
  198. package/dist/svgs/ArrowDownIcon.js +6 -10
  199. package/dist/svgs/ArrowLeftCircleIcon.js +6 -10
  200. package/dist/svgs/ArrowLeftIcon.js +6 -10
  201. package/dist/svgs/ArrowRightCircleIcon.js +6 -10
  202. package/dist/svgs/ArrowRightIcon.js +6 -10
  203. package/dist/svgs/ArrowUpCircleIcon.js +6 -10
  204. package/dist/svgs/ArrowUpIcon.js +6 -10
  205. package/dist/svgs/ArtsyLogoBlackIcon.js +6 -10
  206. package/dist/svgs/ArtsyLogoWhiteIcon.js +4 -8
  207. package/dist/svgs/ArtsyMarkBlackIcon.js +6 -10
  208. package/dist/svgs/ArtsyMarkWhiteIcon.js +4 -8
  209. package/dist/svgs/ArtworkIcon.js +6 -10
  210. package/dist/svgs/AuctionIcon.js +6 -10
  211. package/dist/svgs/BellFillIcon.js +6 -10
  212. package/dist/svgs/BellIcon.js +6 -10
  213. package/dist/svgs/BlueChipIcon.js +6 -10
  214. package/dist/svgs/BoltCircleFill.js +6 -10
  215. package/dist/svgs/BoltFill.js +6 -10
  216. package/dist/svgs/BookmarkFill.js +6 -10
  217. package/dist/svgs/BriefcaseIcon.js +6 -10
  218. package/dist/svgs/CertificateIcon.js +6 -10
  219. package/dist/svgs/CheckCircleFillIcon.js +6 -10
  220. package/dist/svgs/CheckCircleIcon.js +6 -10
  221. package/dist/svgs/CheckIcon.js +6 -10
  222. package/dist/svgs/ChevronIcon.js +11 -15
  223. package/dist/svgs/ClockFill.js +6 -10
  224. package/dist/svgs/CloseCircleFillIcon.js +6 -10
  225. package/dist/svgs/CloseCircleIcon.js +6 -10
  226. package/dist/svgs/CloseIcon.js +6 -10
  227. package/dist/svgs/CollapseIcon.js +6 -10
  228. package/dist/svgs/CreditCardIcon.js +14 -18
  229. package/dist/svgs/DecreaseIcon.js +6 -10
  230. package/dist/svgs/DocumentIcon.js +6 -10
  231. package/dist/svgs/DownloadIcon.js +6 -10
  232. package/dist/svgs/EditIcon.js +6 -10
  233. package/dist/svgs/EmptyCheckCircleIcon.js +6 -10
  234. package/dist/svgs/EnterIcon.js +6 -10
  235. package/dist/svgs/EnvelopeIcon.js +6 -10
  236. package/dist/svgs/EstablishedIcon.js +6 -10
  237. package/dist/svgs/ExclamationMarkCircleFill.js +6 -10
  238. package/dist/svgs/ExpandIcon.js +6 -10
  239. package/dist/svgs/EyeClosedIcon.js +6 -10
  240. package/dist/svgs/EyeOpenedIcon.js +6 -10
  241. package/dist/svgs/FacebookIcon.js +6 -10
  242. package/dist/svgs/FairIcon.js +6 -10
  243. package/dist/svgs/FilterIcon.js +6 -10
  244. package/dist/svgs/FullWidthIcon.js +6 -10
  245. package/dist/svgs/GenomeIcon.js +6 -10
  246. package/dist/svgs/GraphIcon.js +6 -10
  247. package/dist/svgs/GridIcon.js +6 -10
  248. package/dist/svgs/GuaranteeIcon.js +7 -11
  249. package/dist/svgs/HeartFillIcon.js +6 -10
  250. package/dist/svgs/HeartIcon.js +6 -10
  251. package/dist/svgs/HideIcon.js +6 -10
  252. package/dist/svgs/HomeIcon.js +6 -10
  253. package/dist/svgs/Icon.js +15 -30
  254. package/dist/svgs/ImageIcon.js +6 -10
  255. package/dist/svgs/ImageSetIcon.js +6 -10
  256. package/dist/svgs/IncreaseIcon.js +6 -10
  257. package/dist/svgs/InfoCircleIcon.js +6 -10
  258. package/dist/svgs/InstagramAppIcon.js +3 -7
  259. package/dist/svgs/InstitutionIcon.js +6 -10
  260. package/dist/svgs/LinkIcon.js +6 -10
  261. package/dist/svgs/LoaderIcon.js +6 -10
  262. package/dist/svgs/LockIcon.js +6 -10
  263. package/dist/svgs/LogoutIcon.js +6 -10
  264. package/dist/svgs/MagnifyingGlassIcon.js +6 -10
  265. package/dist/svgs/MapPinIcon.js +6 -10
  266. package/dist/svgs/MenuIcon.js +6 -10
  267. package/dist/svgs/MessageIcon.js +7 -11
  268. package/dist/svgs/MessagesAppIcon.js +4 -8
  269. package/dist/svgs/MoneyCircleIcon.js +6 -10
  270. package/dist/svgs/MoneyFillIcon.js +6 -10
  271. package/dist/svgs/MoreIcon.js +6 -10
  272. package/dist/svgs/MultiplePersonsIcon.js +6 -10
  273. package/dist/svgs/NoArtworkIcon.js +6 -10
  274. package/dist/svgs/NoImageIcon.js +6 -10
  275. package/dist/svgs/PageIcon.js +6 -10
  276. package/dist/svgs/Payment2Icon.js +6 -10
  277. package/dist/svgs/PaymentIcon.js +6 -10
  278. package/dist/svgs/PersonIcon.js +6 -10
  279. package/dist/svgs/PublicationIcon.js +6 -10
  280. package/dist/svgs/QuestionCircleIcon.js +6 -10
  281. package/dist/svgs/ReloadIcon.js +6 -10
  282. package/dist/svgs/SecureLockIcon.js +6 -10
  283. package/dist/svgs/SettingsIcon.js +6 -10
  284. package/dist/svgs/ShareIcon.js +6 -10
  285. package/dist/svgs/ShieldFilledIcon.js +6 -10
  286. package/dist/svgs/ShieldIcon.js +6 -10
  287. package/dist/svgs/StarCircleFill.js +6 -10
  288. package/dist/svgs/StarCircleIcon.js +6 -10
  289. package/dist/svgs/Stopwatch.js +6 -10
  290. package/dist/svgs/Tag2Icon.js +7 -11
  291. package/dist/svgs/TagIcon.js +6 -10
  292. package/dist/svgs/TimerIcon.js +6 -10
  293. package/dist/svgs/TopEmergingIcon.js +6 -10
  294. package/dist/svgs/TrashIcon.js +6 -10
  295. package/dist/svgs/TrendingIcon.js +6 -10
  296. package/dist/svgs/TriangleDown.js +6 -10
  297. package/dist/svgs/TwitterIcon.js +6 -10
  298. package/dist/svgs/UserMultiIcon.js +6 -10
  299. package/dist/svgs/UserSingleIcon.js +6 -10
  300. package/dist/svgs/VerifiedIcon.js +6 -10
  301. package/dist/svgs/VerifiedPersonIcon.js +6 -10
  302. package/dist/svgs/WhatsAppAppIcon.js +4 -8
  303. package/dist/svgs/WorldGlobeCircleIcon.js +6 -10
  304. package/dist/svgs/XCircleIcon.js +6 -10
  305. package/dist/svgs/icons.stories.js +11 -38
  306. package/dist/svgs/index.js +113 -129
  307. package/dist/tokens.js +9 -12
  308. package/dist/types.js +5 -10
  309. package/dist/utils/Wrap.js +7 -11
  310. package/dist/utils/colors.stories.js +16 -20
  311. package/dist/utils/createGeminiUrl.js +6 -10
  312. package/dist/utils/flattenChildren.js +5 -9
  313. package/dist/utils/formatLargeNumber.js +1 -5
  314. package/dist/utils/formatLargeNumbers.tests.js +8 -10
  315. package/dist/utils/hooks/index.js +4 -20
  316. package/dist/utils/hooks/useColor.js +2 -6
  317. package/dist/utils/hooks/useMeasure.js +4 -8
  318. package/dist/utils/hooks/useScreenDimensions.js +11 -16
  319. package/dist/utils/hooks/useSpace.js +2 -6
  320. package/dist/utils/hooks/useTheme.js +6 -10
  321. package/dist/utils/normalizeText.js +1 -5
  322. package/dist/utils/space.stories.js +9 -13
  323. package/dist/utils/tests/renderWithWrappers.js +7 -12
  324. package/dist/utils/text.js +9 -13
  325. package/dist/utils/types.js +1 -2
  326. package/dist/utils/webTokensToMobile.js +4 -9
  327. package/package.json +14 -14
@@ -1,59 +1,30 @@
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 __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
- Object.defineProperty(o, "default", { enumerable: true, value: v });
15
- }) : function(o, v) {
16
- o["default"] = v;
17
- });
18
- var __importStar = (this && this.__importStar) || function (mod) {
19
- if (mod && mod.__esModule) return mod;
20
- var result = {};
21
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
- __setModuleDefault(result, mod);
23
- return result;
24
- };
25
- var __importDefault = (this && this.__importDefault) || function (mod) {
26
- return (mod && mod.__esModule) ? mod : { "default": mod };
27
- };
28
- Object.defineProperty(exports, "__esModule", { value: true });
29
- exports.Button = void 0;
30
- const jsx_runtime_1 = require("react/jsx-runtime");
31
- const react_1 = require("react");
32
- const react_native_1 = require("react-native");
33
- const react_native_haptic_feedback_1 = __importDefault(require("react-native-haptic-feedback"));
34
- const react_native_reanimated_1 = __importStar(require("react-native-reanimated"));
35
- const colors_1 = require("./colors");
36
- const MeasuredView_1 = require("../../elements/MeasuredView");
37
- const Box_1 = require("../Box");
38
- const Flex_1 = require("../Flex");
39
- const Spacer_1 = require("../Spacer");
40
- const Spinner_1 = require("../Spinner");
41
- const Text_1 = require("../Text");
1
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
+ import { useEffect, useState } from "react";
3
+ import { Pressable } from "react-native";
4
+ import Haptic from "react-native-haptic-feedback";
5
+ import Animated, { interpolateColor, useAnimatedReaction, useAnimatedStyle, useDerivedValue, useSharedValue, withTiming, } from "react-native-reanimated";
6
+ import { useColorsForVariantAndState } from "./colors";
7
+ import { MeasuredView } from "../../elements/MeasuredView";
8
+ import { Box } from "../Box";
9
+ import { Flex } from "../Flex";
10
+ import { Spacer } from "../Spacer";
11
+ import { Spinner } from "../Spinner";
12
+ import { Text, useTextStyleForPalette } from "../Text";
42
13
  const ANIMATION_DURATION = 150;
43
- const Button = ({ children, disabled: disabledProp, haptic, icon, iconPosition = "left", loading: loadingProp, block, longestText, onPress, size = "large", variant = "fillDark", testOnly_pressed, testID, hitSlop, ...restProps }) => {
14
+ export const Button = ({ children, disabled: disabledProp, haptic, icon, iconPosition = "left", loading: loadingProp, block, longestText, onPress, size = "large", variant = "fillDark", testOnly_pressed, testID, hitSlop, ...restProps }) => {
44
15
  const [disabled, setDisabled, disabledV] = useStateWithProp(!!disabledProp);
45
16
  const [loading, setLoading, loadingV] = useStateWithProp(!!loadingProp);
46
17
  const [pressed, setPressed, pressedV] = useStateWithProp(!!testOnly_pressed);
47
- const pressAnimationProgress = (0, react_native_reanimated_1.useSharedValue)(0);
48
- (0, react_native_reanimated_1.useAnimatedReaction)(() => {
18
+ const pressAnimationProgress = useSharedValue(0);
19
+ useAnimatedReaction(() => {
49
20
  return pressedV.value;
50
21
  }, (pressedVal) => {
51
- return (pressAnimationProgress.value = (0, react_native_reanimated_1.withTiming)(pressedVal, {
22
+ return (pressAnimationProgress.value = withTiming(pressedVal, {
52
23
  duration: ANIMATION_DURATION,
53
24
  }));
54
25
  });
55
- const textStyle = (0, Text_1.useTextStyleForPalette)(size === "small" ? "xs" : "sm");
56
- const [longestTextMeasurements, setLongestTextMeasurements] = (0, react_1.useState)({
26
+ const textStyle = useTextStyleForPalette(size === "small" ? "xs" : "sm");
27
+ const [longestTextMeasurements, setLongestTextMeasurements] = useState({
57
28
  width: 0,
58
29
  height: 0,
59
30
  });
@@ -74,12 +45,12 @@ const Button = ({ children, disabled: disabledProp, haptic, icon, iconPosition =
74
45
  return;
75
46
  }
76
47
  if (haptic !== undefined) {
77
- react_native_haptic_feedback_1.default.trigger(haptic === true ? "impactLight" : haptic);
48
+ Haptic.trigger(haptic === true ? "impactLight" : haptic);
78
49
  }
79
50
  onPress(event);
80
51
  };
81
- const colorsForVariantAndState = (0, colors_1.useColorsForVariantAndState)();
82
- const containerColorsAnim = (0, react_native_reanimated_1.useAnimatedStyle)(() => {
52
+ const colorsForVariantAndState = useColorsForVariantAndState();
53
+ const containerColorsAnim = useAnimatedStyle(() => {
83
54
  const colors = colorsForVariantAndState[variant];
84
55
  if (disabled) {
85
56
  return {
@@ -88,21 +59,21 @@ const Button = ({ children, disabled: disabledProp, haptic, icon, iconPosition =
88
59
  };
89
60
  }
90
61
  return {
91
- backgroundColor: (0, react_native_reanimated_1.interpolateColor)(pressAnimationProgress.value, [0, 1], [colors.active.bg, colors.pressed.bg]),
92
- borderColor: (0, react_native_reanimated_1.interpolateColor)(pressAnimationProgress.value, [0, 1], [colors.active.border, colors.pressed.border]),
62
+ backgroundColor: interpolateColor(pressAnimationProgress.value, [0, 1], [colors.active.bg, colors.pressed.bg]),
63
+ borderColor: interpolateColor(pressAnimationProgress.value, [0, 1], [colors.active.border, colors.pressed.border]),
93
64
  };
94
65
  });
95
- const textAnim = (0, react_native_reanimated_1.useAnimatedStyle)(() => {
66
+ const textAnim = useAnimatedStyle(() => {
96
67
  const colors = colorsForVariantAndState[variant];
97
68
  if (loading) {
98
69
  return { color: "rgba(0, 0, 0, 0)" };
99
70
  }
100
71
  return {
101
- color: (0, react_native_reanimated_1.interpolateColor)(pressAnimationProgress.value, [0, 1], [colors.active.text, colors.pressed.text]),
72
+ color: interpolateColor(pressAnimationProgress.value, [0, 1], [colors.active.text, colors.pressed.text]),
102
73
  textDecorationLine: pressAnimationProgress.value > 0 ? "underline" : "none",
103
74
  };
104
75
  });
105
- return ((0, jsx_runtime_1.jsx)(react_native_1.Pressable, { disabled: disabled, onPressIn: () => {
76
+ return (_jsx(Pressable, { disabled: disabled, onPressIn: () => {
106
77
  if (loading) {
107
78
  return;
108
79
  }
@@ -112,17 +83,16 @@ const Button = ({ children, disabled: disabledProp, haptic, icon, iconPosition =
112
83
  return;
113
84
  }
114
85
  setPressed(false);
115
- }, onPress: handlePress, testID: testID, testOnly_pressed: testOnly_pressed, hitSlop: hitSlop, children: (0, jsx_runtime_1.jsx)(Flex_1.Flex, { flexDirection: "row", children: (0, jsx_runtime_1.jsx)(Flex_1.Flex, { ...restProps, height: height, width: block ? "100%" : undefined, borderRadius: 50, overflow: "hidden", children: (0, jsx_runtime_1.jsx)(AFlex, { borderWidth: 1, borderRadius: 50, overflow: "hidden", style: containerColorsAnim, children: (0, jsx_runtime_1.jsxs)(Flex_1.Flex, { height: "100%", mx: "25px", flexDirection: "row", alignItems: "center", justifyContent: "center", children: [iconPosition === "left-start" && !!icon ? ((0, jsx_runtime_1.jsxs)(Box_1.Box, { position: "absolute", left: 0, children: [icon, (0, jsx_runtime_1.jsx)(Spacer_1.Spacer, { x: 0.5 })] })) : null, iconPosition === "left" && !!icon ? ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [icon, (0, jsx_runtime_1.jsx)(Spacer_1.Spacer, { x: 0.5 })] })) : null, (0, jsx_runtime_1.jsx)(AText, { style: [{ width: Math.ceil(longestTextMeasurements.width) }, textStyle, textAnim], textAlign: "center", children: children }), (0, jsx_runtime_1.jsx)(MeasuredView_1.MeasuredView, { setMeasuredState: setLongestTextMeasurements, children: (0, jsx_runtime_1.jsx)(Text_1.Text, { color: "red", style: textStyle, children: longestText ? longestText : children }) }), iconPosition === "right" && !!icon ? ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(Spacer_1.Spacer, { x: 0.5 }), icon] })) : null, loading ? ((0, jsx_runtime_1.jsx)(Box_1.Box, { position: "absolute", width: "100%", height: "100%", alignItems: "center", justifyContent: "center", children: (0, jsx_runtime_1.jsx)(Spinner_1.Spinner, { size: size, color: spinnerColor }) })) : null] }) }) }) }) }));
86
+ }, onPress: handlePress, testID: testID, testOnly_pressed: testOnly_pressed, hitSlop: hitSlop, children: _jsx(Flex, { flexDirection: "row", children: _jsx(Flex, { ...restProps, height: height, width: block ? "100%" : undefined, borderRadius: 50, overflow: "hidden", children: _jsx(AFlex, { borderWidth: 1, borderRadius: 50, overflow: "hidden", style: containerColorsAnim, children: _jsxs(Flex, { height: "100%", mx: "25px", flexDirection: "row", alignItems: "center", justifyContent: "center", children: [iconPosition === "left-start" && !!icon ? (_jsxs(Box, { position: "absolute", left: 0, children: [icon, _jsx(Spacer, { x: 0.5 })] })) : null, iconPosition === "left" && !!icon ? (_jsxs(_Fragment, { children: [icon, _jsx(Spacer, { x: 0.5 })] })) : null, _jsx(AText, { style: [{ width: Math.ceil(longestTextMeasurements.width) }, textStyle, textAnim], textAlign: "center", children: children }), _jsx(MeasuredView, { setMeasuredState: setLongestTextMeasurements, children: _jsx(Text, { color: "red", style: textStyle, children: longestText ? longestText : children }) }), iconPosition === "right" && !!icon ? (_jsxs(_Fragment, { children: [_jsx(Spacer, { x: 0.5 }), icon] })) : null, loading ? (_jsx(Box, { position: "absolute", width: "100%", height: "100%", alignItems: "center", justifyContent: "center", children: _jsx(Spinner, { size: size, color: spinnerColor }) })) : null] }) }) }) }) }));
116
87
  };
117
- exports.Button = Button;
118
- const AText = react_native_reanimated_1.default.createAnimatedComponent(Text_1.Text);
119
- const AFlex = react_native_reanimated_1.default.createAnimatedComponent(Flex_1.Flex);
88
+ const AText = Animated.createAnimatedComponent(Text);
89
+ const AFlex = Animated.createAnimatedComponent(Flex);
120
90
  const useStateWithProp = (prop) => {
121
- const [state, setState] = (0, react_1.useState)(!!prop);
122
- (0, react_1.useEffect)(() => {
91
+ const [state, setState] = useState(!!prop);
92
+ useEffect(() => {
123
93
  setState(!!prop);
124
94
  }, [prop]);
125
- const stateV = (0, react_native_reanimated_1.useDerivedValue)(() => {
95
+ const stateV = useDerivedValue(() => {
126
96
  if (!!state) {
127
97
  return 1;
128
98
  }
@@ -1,21 +1,18 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.SpacingAround = exports.Playground = exports.Miscellaneous = exports.TheLinkButton = exports.TheCTAButton = exports.TheFollowButton = exports.VariantsDisabled = exports.VariantsLoading = exports.Variants = exports.States = exports.Sizes = void 0;
4
- const jsx_runtime_1 = require("react/jsx-runtime");
5
- const lodash_1 = require("lodash");
6
- const react_1 = require("react");
7
- const react_native_1 = require("react-native");
8
- const Button_1 = require("./Button");
9
- const CTAButton_1 = require("./CTAButton");
10
- const FollowButton_1 = require("./FollowButton");
11
- const LinkButton_1 = require("./LinkButton");
12
- const helpers_1 = require("../../storybook/helpers");
13
- const svgs_1 = require("../../svgs");
14
- const Wrap_1 = require("../../utils/Wrap");
15
- const Box_1 = require("../Box");
16
- const Flex_1 = require("../Flex");
17
- const Spacer_1 = require("../Spacer");
18
- const Text_1 = require("../Text");
1
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
+ import { capitalize } from "lodash";
3
+ import { useState } from "react";
4
+ import { Button as RNButton } from "react-native";
5
+ import { Button } from "./Button";
6
+ import { CTAButton } from "./CTAButton";
7
+ import { FollowButton } from "./FollowButton";
8
+ import { LinkButton } from "./LinkButton";
9
+ import { DataList, List } from "../../storybook/helpers";
10
+ import { BellIcon, LinkIcon } from "../../svgs";
11
+ import { Wrap } from "../../utils/Wrap";
12
+ import { Box } from "../Box";
13
+ import { Flex } from "../Flex";
14
+ import { Spacer } from "../Spacer";
15
+ import { LinkText } from "../Text";
19
16
  const sizes = ["small", "large"];
20
17
  const variants = [
21
18
  "fillDark",
@@ -27,40 +24,29 @@ const variants = [
27
24
  "outlineLight",
28
25
  "text",
29
26
  ];
30
- exports.default = {
27
+ export default {
31
28
  title: "ButtonNew",
32
- component: Button_1.Button,
29
+ component: Button,
33
30
  };
34
- const Sizes = () => ((0, jsx_runtime_1.jsx)(helpers_1.DataList, { data: sizes, renderItem: ({ item: size }) => ((0, jsx_runtime_1.jsx)(Button_1.Button, { size: size, onPress: () => console.log(`tapped ${size}`), children: (0, lodash_1.capitalize)(size) })) }));
35
- exports.Sizes = Sizes;
36
- const States = () => {
37
- const [variant, setVariant] = (0, react_1.useState)("fillDark");
38
- return ((0, jsx_runtime_1.jsxs)(helpers_1.List, { children: [(0, jsx_runtime_1.jsx)(Flex_1.Flex, { flexDirection: "row", flexWrap: "wrap", px: 2, children: variants.map((variant) => ((0, jsx_runtime_1.jsx)(Text_1.LinkText, { color: "orange", onPress: () => setVariant(variant), mr: "2", children: variant }))) }), (0, jsx_runtime_1.jsx)(Button_1.Button, { variant: variant, onPress: () => console.log(`tapped`), longestText: "Regular YEA", children: "Regular" }), (0, jsx_runtime_1.jsx)(Button_1.Button, { variant: variant, onPress: () => console.log(`tapped`), disabled: true, children: "Disabled" }), (0, jsx_runtime_1.jsx)(Button_1.Button, { variant: variant, onPress: () => console.log(`tapped`), loading: true, children: "Loading" }), (0, jsx_runtime_1.jsx)(Button_1.Button, { variant: variant, onPress: () => console.log(`tapped`), testOnly_pressed: true, children: "Pressed" })] }));
31
+ export const Sizes = () => (_jsx(DataList, { data: sizes, renderItem: ({ item: size }) => (_jsx(Button, { size: size, onPress: () => console.log(`tapped ${size}`), children: capitalize(size) })) }));
32
+ export const States = () => {
33
+ const [variant, setVariant] = useState("fillDark");
34
+ return (_jsxs(List, { children: [_jsx(Flex, { flexDirection: "row", flexWrap: "wrap", px: 2, children: variants.map((variant) => (_jsx(LinkText, { color: "orange", onPress: () => setVariant(variant), mr: "2", children: variant }))) }), _jsx(Button, { variant: variant, onPress: () => console.log(`tapped`), longestText: "Regular YEA", children: "Regular" }), _jsx(Button, { variant: variant, onPress: () => console.log(`tapped`), disabled: true, children: "Disabled" }), _jsx(Button, { variant: variant, onPress: () => console.log(`tapped`), loading: true, children: "Loading" }), _jsx(Button, { variant: variant, onPress: () => console.log(`tapped`), testOnly_pressed: true, children: "Pressed" })] }));
39
35
  };
40
- exports.States = States;
41
- const Variants = () => ((0, jsx_runtime_1.jsx)(helpers_1.DataList, { data: variants, renderItem: ({ item: variant }) => ((0, jsx_runtime_1.jsx)(Wrap_1.Wrap, { if: variant === "outlineLight" || variant === "fillLight", children: (0, jsx_runtime_1.jsx)(Flex_1.Flex, { backgroundColor: "pink", p: 1, children: (0, jsx_runtime_1.jsx)(Wrap_1.Wrap.Content, { children: (0, jsx_runtime_1.jsx)(Button_1.Button, { variant: variant, onPress: () => console.log(`tapped ${variant}`), children: variant }) }) }) })) }));
42
- exports.Variants = Variants;
43
- const VariantsLoading = () => ((0, jsx_runtime_1.jsx)(helpers_1.DataList, { data: variants, renderItem: ({ item: variant }) => ((0, jsx_runtime_1.jsx)(Button_1.Button, { variant: variant, loading: true, onPress: () => console.log(`tapped ${variant}`), children: variant })) }));
44
- exports.VariantsLoading = VariantsLoading;
45
- const VariantsDisabled = () => ((0, jsx_runtime_1.jsx)(helpers_1.DataList, { data: variants, renderItem: ({ item: variant }) => ((0, jsx_runtime_1.jsx)(Wrap_1.Wrap, { if: variant === "outlineLight", children: (0, jsx_runtime_1.jsx)(Flex_1.Flex, { backgroundColor: "black100", p: 1, children: (0, jsx_runtime_1.jsx)(Wrap_1.Wrap.Content, { children: (0, jsx_runtime_1.jsx)(Button_1.Button, { variant: variant, disabled: true, onPress: () => console.log(`tapped ${variant}`), children: variant }) }) }) })) }));
46
- exports.VariantsDisabled = VariantsDisabled;
47
- const TheFollowButton = () => {
48
- const [follow, setFollow] = (0, react_1.useState)(true);
49
- return ((0, jsx_runtime_1.jsxs)(helpers_1.List, { children: [(0, jsx_runtime_1.jsx)(FollowButton_1.FollowButton, { isFollowed: follow, onPress: () => setFollow((v) => !v) }), (0, jsx_runtime_1.jsx)(FollowButton_1.FollowButton, { followCount: 4, isFollowed: follow, onPress: () => setFollow((v) => !v) }), (0, jsx_runtime_1.jsx)(FollowButton_1.FollowButton, { followCount: 40, isFollowed: follow, onPress: () => setFollow((v) => !v) }), (0, jsx_runtime_1.jsx)(FollowButton_1.FollowButton, { followCount: 4000, isFollowed: follow, onPress: () => setFollow((v) => !v) }), (0, jsx_runtime_1.jsx)(FollowButton_1.FollowButton, { followCount: 400000, isFollowed: follow, onPress: () => setFollow((v) => !v) }), (0, jsx_runtime_1.jsx)(FollowButton_1.FollowButton, { followCount: 40000000, isFollowed: follow, onPress: () => setFollow((v) => !v) }), (0, jsx_runtime_1.jsx)(FollowButton_1.FollowButton, { followCount: 4000000000, isFollowed: follow, onPress: () => setFollow((v) => !v) })] }));
36
+ export const Variants = () => (_jsx(DataList, { data: variants, renderItem: ({ item: variant }) => (_jsx(Wrap, { if: variant === "outlineLight" || variant === "fillLight", children: _jsx(Flex, { backgroundColor: "pink", p: 1, children: _jsx(Wrap.Content, { children: _jsx(Button, { variant: variant, onPress: () => console.log(`tapped ${variant}`), children: variant }) }) }) })) }));
37
+ export const VariantsLoading = () => (_jsx(DataList, { data: variants, renderItem: ({ item: variant }) => (_jsx(Button, { variant: variant, loading: true, onPress: () => console.log(`tapped ${variant}`), children: variant })) }));
38
+ export const VariantsDisabled = () => (_jsx(DataList, { data: variants, renderItem: ({ item: variant }) => (_jsx(Wrap, { if: variant === "outlineLight", children: _jsx(Flex, { backgroundColor: "black100", p: 1, children: _jsx(Wrap.Content, { children: _jsx(Button, { variant: variant, disabled: true, onPress: () => console.log(`tapped ${variant}`), children: variant }) }) }) })) }));
39
+ export const TheFollowButton = () => {
40
+ const [follow, setFollow] = useState(true);
41
+ return (_jsxs(List, { children: [_jsx(FollowButton, { isFollowed: follow, onPress: () => setFollow((v) => !v) }), _jsx(FollowButton, { followCount: 4, isFollowed: follow, onPress: () => setFollow((v) => !v) }), _jsx(FollowButton, { followCount: 40, isFollowed: follow, onPress: () => setFollow((v) => !v) }), _jsx(FollowButton, { followCount: 4000, isFollowed: follow, onPress: () => setFollow((v) => !v) }), _jsx(FollowButton, { followCount: 400000, isFollowed: follow, onPress: () => setFollow((v) => !v) }), _jsx(FollowButton, { followCount: 40000000, isFollowed: follow, onPress: () => setFollow((v) => !v) }), _jsx(FollowButton, { followCount: 4000000000, isFollowed: follow, onPress: () => setFollow((v) => !v) })] }));
50
42
  };
51
- exports.TheFollowButton = TheFollowButton;
52
- const TheCTAButton = () => ((0, jsx_runtime_1.jsx)(helpers_1.List, { children: (0, jsx_runtime_1.jsx)(CTAButton_1.CTAButton, { onPress: () => console.log("pressed"), children: "cta button" }) }));
53
- exports.TheCTAButton = TheCTAButton;
54
- const TheLinkButton = () => ((0, jsx_runtime_1.jsx)(helpers_1.List, { children: (0, jsx_runtime_1.jsx)(LinkButton_1.LinkButton, { onPress: () => console.log("pressed"), children: "LinkButton" }) }));
55
- exports.TheLinkButton = TheLinkButton;
56
- const Miscellaneous = () => ((0, jsx_runtime_1.jsxs)(helpers_1.List, { children: [(0, jsx_runtime_1.jsx)(Button_1.Button, { loading: true, disabled: true, children: "loading and disabled" }), (0, jsx_runtime_1.jsx)(Button_1.Button, { loading: true, disabled: true, icon: (0, jsx_runtime_1.jsx)(svgs_1.LinkIcon, {}), children: "loading and disabled with icon" }), (0, jsx_runtime_1.jsx)(Button_1.Button, { block: true, children: "block" }), (0, jsx_runtime_1.jsx)(Flex_1.Flex, { backgroundColor: "orange", width: 400, height: 80, alignItems: "center", justifyContent: "center", children: (0, jsx_runtime_1.jsx)(Button_1.Button, { variant: "fillLight", icon: (0, jsx_runtime_1.jsx)(svgs_1.LinkIcon, {}), children: "left icon" }) }), (0, jsx_runtime_1.jsx)(Button_1.Button, { icon: (0, jsx_runtime_1.jsx)(svgs_1.LinkIcon, { fill: "white100" }), iconPosition: "right", children: "right icon" }), (0, jsx_runtime_1.jsx)(Button_1.Button, { size: "small", icon: (0, jsx_runtime_1.jsx)(svgs_1.LinkIcon, { fill: "white100" }), iconPosition: "right", children: "Right Icon Small" }), (0, jsx_runtime_1.jsx)(Button_1.Button, { variant: "fillDark", size: "small", icon: (0, jsx_runtime_1.jsx)(svgs_1.BellIcon, { fill: "white100", width: "16px", height: "16px" }), children: "Create Alert" }), (0, jsx_runtime_1.jsxs)(Box_1.Box, { flexDirection: "row", children: [(0, jsx_runtime_1.jsx)(Box_1.Box, { width: 2, height: "100%", backgroundColor: "green100" }), (0, jsx_runtime_1.jsxs)(Box_1.Box, { children: [(0, jsx_runtime_1.jsx)(Button_1.Button, { size: "small", icon: (0, jsx_runtime_1.jsx)(svgs_1.LinkIcon, { fill: "white100" }), iconPosition: "right", longestText: "this is a very long text", children: "shortest text" }), (0, jsx_runtime_1.jsx)(Spacer_1.Spacer, { y: 1 }), (0, jsx_runtime_1.jsx)(Button_1.Button, { size: "small", icon: (0, jsx_runtime_1.jsx)(svgs_1.LinkIcon, { fill: "white100" }), iconPosition: "right", longestText: "this is a very long text", children: "this is a very long text" })] }), (0, jsx_runtime_1.jsx)(Box_1.Box, { width: 2, height: "100%", backgroundColor: "green100" })] }), (0, jsx_runtime_1.jsx)(Button_1.Button, { icon: (0, jsx_runtime_1.jsx)(svgs_1.LinkIcon, { fill: "white100" }), block: true, iconPosition: "left-start", children: "left-start aligned icon" })] }));
57
- exports.Miscellaneous = Miscellaneous;
58
- const Playground = () => {
59
- const [loading, setLoading] = (0, react_1.useState)(false);
60
- const [disabled, setDisabled] = (0, react_1.useState)(true);
61
- const [block, setBlock] = (0, react_1.useState)(false);
62
- return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(react_native_1.Button, { title: "loading", onPress: () => setLoading((v) => !v) }), (0, jsx_runtime_1.jsx)(react_native_1.Button, { title: "disabled", onPress: () => setDisabled((v) => !v) }), (0, jsx_runtime_1.jsx)(react_native_1.Button, { title: "block", onPress: () => setBlock((v) => !v) }), (0, jsx_runtime_1.jsx)(helpers_1.List, { children: (0, jsx_runtime_1.jsxs)(Button_1.Button, { loading: loading, disabled: disabled, block: block, longestText: "loading false, disabled false, block false", children: ["loading ", loading ? "true" : "false", ", disabled ", disabled ? "true" : "false", ", block", " ", block ? "true" : "false"] }) })] }));
43
+ export const TheCTAButton = () => (_jsx(List, { children: _jsx(CTAButton, { onPress: () => console.log("pressed"), children: "cta button" }) }));
44
+ export const TheLinkButton = () => (_jsx(List, { children: _jsx(LinkButton, { onPress: () => console.log("pressed"), children: "LinkButton" }) }));
45
+ export const Miscellaneous = () => (_jsxs(List, { children: [_jsx(Button, { loading: true, disabled: true, children: "loading and disabled" }), _jsx(Button, { loading: true, disabled: true, icon: _jsx(LinkIcon, {}), children: "loading and disabled with icon" }), _jsx(Button, { block: true, children: "block" }), _jsx(Flex, { backgroundColor: "orange", width: 400, height: 80, alignItems: "center", justifyContent: "center", children: _jsx(Button, { variant: "fillLight", icon: _jsx(LinkIcon, {}), children: "left icon" }) }), _jsx(Button, { icon: _jsx(LinkIcon, { fill: "white100" }), iconPosition: "right", children: "right icon" }), _jsx(Button, { size: "small", icon: _jsx(LinkIcon, { fill: "white100" }), iconPosition: "right", children: "Right Icon Small" }), _jsx(Button, { variant: "fillDark", size: "small", icon: _jsx(BellIcon, { fill: "white100", width: "16px", height: "16px" }), children: "Create Alert" }), _jsxs(Box, { flexDirection: "row", children: [_jsx(Box, { width: 2, height: "100%", backgroundColor: "green100" }), _jsxs(Box, { children: [_jsx(Button, { size: "small", icon: _jsx(LinkIcon, { fill: "white100" }), iconPosition: "right", longestText: "this is a very long text", children: "shortest text" }), _jsx(Spacer, { y: 1 }), _jsx(Button, { size: "small", icon: _jsx(LinkIcon, { fill: "white100" }), iconPosition: "right", longestText: "this is a very long text", children: "this is a very long text" })] }), _jsx(Box, { width: 2, height: "100%", backgroundColor: "green100" })] }), _jsx(Button, { icon: _jsx(LinkIcon, { fill: "white100" }), block: true, iconPosition: "left-start", children: "left-start aligned icon" })] }));
46
+ export const Playground = () => {
47
+ const [loading, setLoading] = useState(false);
48
+ const [disabled, setDisabled] = useState(true);
49
+ const [block, setBlock] = useState(false);
50
+ return (_jsxs(_Fragment, { children: [_jsx(RNButton, { title: "loading", onPress: () => setLoading((v) => !v) }), _jsx(RNButton, { title: "disabled", onPress: () => setDisabled((v) => !v) }), _jsx(RNButton, { title: "block", onPress: () => setBlock((v) => !v) }), _jsx(List, { children: _jsxs(Button, { loading: loading, disabled: disabled, block: block, longestText: "loading false, disabled false, block false", children: ["loading ", loading ? "true" : "false", ", disabled ", disabled ? "true" : "false", ", block", " ", block ? "true" : "false"] }) })] }));
63
51
  };
64
- exports.Playground = Playground;
65
- const SpacingAround = () => ((0, jsx_runtime_1.jsxs)(Box_1.Box, { children: [(0, jsx_runtime_1.jsx)(Button_1.Button, { m: 2, children: "wow 1" }), (0, jsx_runtime_1.jsx)(Button_1.Button, { children: "wow 2" })] }));
66
- exports.SpacingAround = SpacingAround;
52
+ export const SpacingAround = () => (_jsxs(Box, { children: [_jsx(Button, { m: 2, children: "wow 1" }), _jsx(Button, { children: "wow 2" })] }));
@@ -1,31 +1,29 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const jsx_runtime_1 = require("react/jsx-runtime");
4
- const react_native_1 = require("@testing-library/react-native");
5
- const Button_1 = require("./Button");
6
- const renderWithWrappers_1 = require("../../utils/tests/renderWithWrappers");
7
- const Spinner_1 = require("../Spinner");
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { fireEvent } from "@testing-library/react-native";
3
+ import { Button } from "./Button";
4
+ import { renderWithWrappers } from "../../utils/tests/renderWithWrappers";
5
+ import { Spinner } from "../Spinner";
8
6
  describe("Button", () => {
9
7
  it("shows spinner if loading is true", () => {
10
- const { UNSAFE_queryAllByType } = (0, renderWithWrappers_1.renderWithWrappers)((0, jsx_runtime_1.jsx)(Button_1.Button, { loading: true, children: "wow" }));
11
- expect(UNSAFE_queryAllByType(Spinner_1.Spinner)).toHaveLength(1);
8
+ const { UNSAFE_queryAllByType } = renderWithWrappers(_jsx(Button, { loading: true, children: "wow" }));
9
+ expect(UNSAFE_queryAllByType(Spinner)).toHaveLength(1);
12
10
  });
13
11
  it("invokes the onClick callback", () => {
14
12
  const onPress = jest.fn();
15
- const { getByTestId } = (0, renderWithWrappers_1.renderWithWrappers)((0, jsx_runtime_1.jsx)(Button_1.Button, { testID: "the-button", onPress: onPress, children: "wow" }));
16
- react_native_1.fireEvent.press(getByTestId("the-button"));
13
+ const { getByTestId } = renderWithWrappers(_jsx(Button, { testID: "the-button", onPress: onPress, children: "wow" }));
14
+ fireEvent.press(getByTestId("the-button"));
17
15
  expect(onPress).toHaveBeenCalled();
18
16
  });
19
17
  it("does not invoke the onClick callback if loading is true", () => {
20
18
  const onPress = jest.fn();
21
- const { getByTestId } = (0, renderWithWrappers_1.renderWithWrappers)((0, jsx_runtime_1.jsx)(Button_1.Button, { testID: "the-button", onPress: onPress, loading: true, children: "wow" }));
22
- react_native_1.fireEvent.press(getByTestId("the-button"));
19
+ const { getByTestId } = renderWithWrappers(_jsx(Button, { testID: "the-button", onPress: onPress, loading: true, children: "wow" }));
20
+ fireEvent.press(getByTestId("the-button"));
23
21
  expect(onPress).not.toHaveBeenCalled();
24
22
  });
25
23
  it("does not invoke the onClick callback if disabled is true", () => {
26
24
  const onPress = jest.fn();
27
- const { getByTestId } = (0, renderWithWrappers_1.renderWithWrappers)((0, jsx_runtime_1.jsx)(Button_1.Button, { testID: "the-button", onPress: onPress, disabled: true, children: "wow" }));
28
- react_native_1.fireEvent.press(getByTestId("the-button"));
25
+ const { getByTestId } = renderWithWrappers(_jsx(Button, { testID: "the-button", onPress: onPress, disabled: true, children: "wow" }));
26
+ fireEvent.press(getByTestId("the-button"));
29
27
  expect(onPress).not.toHaveBeenCalled();
30
28
  });
31
29
  });
@@ -1,7 +1,3 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.CTAButton = void 0;
4
- const jsx_runtime_1 = require("react/jsx-runtime");
5
- const Button_1 = require("./Button");
6
- const CTAButton = (props) => (0, jsx_runtime_1.jsx)(Button_1.Button, { block: true, haptic: true, ...props });
7
- exports.CTAButton = CTAButton;
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { Button } from "./Button";
3
+ export const CTAButton = (props) => _jsx(Button, { block: true, haptic: true, ...props });
@@ -1,12 +1,8 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.FollowButton = void 0;
4
- const jsx_runtime_1 = require("react/jsx-runtime");
5
- const CheckIcon_1 = require("../../svgs/CheckIcon");
6
- const formatLargeNumber_1 = require("../../utils/formatLargeNumber");
7
- const Button_1 = require("../Button");
8
- const Text_1 = require("../Text");
9
- const FollowButton = ({ isFollowed, followCount, longestText, loading, ...restProps }) => {
10
- return ((0, jsx_runtime_1.jsx)(Button_1.Button, { variant: isFollowed ? "outline" : "outlineGray", size: "small", longestText: longestText ? longestText : "Following", icon: isFollowed && !loading && (0, jsx_runtime_1.jsx)(CheckIcon_1.CheckIcon, { fill: "black60", width: "16px", height: "16px" }), loading: loading, ...restProps, children: !loading && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(Text_1.Text, { variant: "xs", children: isFollowed ? "Following" : "Follow" }), !!followCount && followCount > 1 && ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: (0, jsx_runtime_1.jsx)(Text_1.Text, { variant: "xs", color: "black60", children: " " + (0, formatLargeNumber_1.formatLargeNumber)(followCount, 1) }) }))] })) }));
1
+ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { CheckIcon } from "../../svgs/CheckIcon";
3
+ import { formatLargeNumber } from "../../utils/formatLargeNumber";
4
+ import { Button } from "../Button";
5
+ import { Text } from "../Text";
6
+ export const FollowButton = ({ isFollowed, followCount, longestText, loading, ...restProps }) => {
7
+ return (_jsx(Button, { variant: isFollowed ? "outline" : "outlineGray", size: "small", longestText: longestText ? longestText : "Following", icon: isFollowed && !loading && _jsx(CheckIcon, { fill: "black60", width: "16px", height: "16px" }), loading: loading, ...restProps, children: !loading && (_jsxs(_Fragment, { children: [_jsx(Text, { variant: "xs", children: isFollowed ? "Following" : "Follow" }), !!followCount && followCount > 1 && (_jsx(_Fragment, { children: _jsx(Text, { variant: "xs", color: "black60", children: " " + formatLargeNumber(followCount, 1) }) }))] })) }));
11
8
  };
12
- exports.FollowButton = FollowButton;
@@ -1,8 +1,4 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.LinkButton = void 0;
4
- const jsx_runtime_1 = require("react/jsx-runtime");
5
- const Text_1 = require("../Text");
6
- const Touchable_1 = require("../Touchable");
7
- const LinkButton = (props) => ((0, jsx_runtime_1.jsx)(Touchable_1.Touchable, { onPress: props.onPress, children: (0, jsx_runtime_1.jsx)(Text_1.Text, { underline: true, ...props }) }));
8
- exports.LinkButton = LinkButton;
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { Text } from "../Text";
3
+ import { Touchable } from "../Touchable";
4
+ export const LinkButton = (props) => (_jsx(Touchable, { onPress: props.onPress, children: _jsx(Text, { underline: true, ...props }) }));
@@ -1,9 +1,6 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.useColorsForVariantAndState = void 0;
4
- const hooks_1 = require("../../utils/hooks");
5
- const useColorsForVariantAndState = () => {
6
- const color = (0, hooks_1.useColor)();
1
+ import { useColor } from "../../utils/hooks";
2
+ export const useColorsForVariantAndState = () => {
3
+ const color = useColor();
7
4
  return {
8
5
  fillDark: {
9
6
  disabled: { bg: color("black30"), border: color("black30"), text: color("onPrimaryHigh") },
@@ -75,4 +72,3 @@ const useColorsForVariantAndState = () => {
75
72
  },
76
73
  };
77
74
  };
78
- exports.useColorsForVariantAndState = useColorsForVariantAndState;
@@ -1,20 +1,4 @@
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("./Button"), exports);
18
- __exportStar(require("./CTAButton"), exports);
19
- __exportStar(require("./FollowButton"), exports);
20
- __exportStar(require("./LinkButton"), exports);
1
+ export * from "./Button";
2
+ export * from "./CTAButton";
3
+ export * from "./FollowButton";
4
+ export * from "./LinkButton";
@@ -1,75 +1,48 @@
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 __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
- Object.defineProperty(o, "default", { enumerable: true, value: v });
15
- }) : function(o, v) {
16
- o["default"] = v;
17
- });
18
- var __importStar = (this && this.__importStar) || function (mod) {
19
- if (mod && mod.__esModule) return mod;
20
- var result = {};
21
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
- __setModuleDefault(result, mod);
23
- return result;
24
- };
25
- Object.defineProperty(exports, "__esModule", { value: true });
26
- exports.Check = exports.CHECK_SIZE = void 0;
27
- const jsx_runtime_1 = require("react/jsx-runtime");
28
- const theme_get_1 = require("@styled-system/theme-get");
29
- const native_1 = __importStar(require("styled-components/native"));
30
- const CheckIcon_1 = require("../../svgs/CheckIcon");
31
- const Box_1 = require("../Box");
32
- exports.CHECK_SIZE = 22;
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { themeGet } from "@styled-system/theme-get";
3
+ import styled, { css } from "styled-components/native";
4
+ import { CheckIcon } from "../../svgs/CheckIcon";
5
+ import { Box } from "../Box";
6
+ export const CHECK_SIZE = 22;
33
7
  const CHECK_MODES = {
34
8
  default: {
35
- resting: (0, native_1.css) `
36
- background-color: ${(0, theme_get_1.themeGet)("colors.white100")};
37
- border-color: ${(0, theme_get_1.themeGet)("colors.black10")};
9
+ resting: css `
10
+ background-color: ${themeGet("colors.white100")};
11
+ border-color: ${themeGet("colors.black10")};
38
12
  `,
39
- selected: (0, native_1.css) `
40
- background-color: ${(0, theme_get_1.themeGet)("colors.black100")};
41
- border-color: ${(0, theme_get_1.themeGet)("colors.black100")};
13
+ selected: css `
14
+ background-color: ${themeGet("colors.black100")};
15
+ border-color: ${themeGet("colors.black100")};
42
16
  `,
43
17
  },
44
18
  disabled: {
45
- resting: (0, native_1.css) `
46
- background-color: ${(0, theme_get_1.themeGet)("colors.black5")};
47
- border-color: ${(0, theme_get_1.themeGet)("colors.black10")};
19
+ resting: css `
20
+ background-color: ${themeGet("colors.black5")};
21
+ border-color: ${themeGet("colors.black10")};
48
22
  `,
49
- selected: (0, native_1.css) `
50
- background-color: ${(0, theme_get_1.themeGet)("colors.black30")};
51
- border-color: ${(0, theme_get_1.themeGet)("colors.black30")};
23
+ selected: css `
24
+ background-color: ${themeGet("colors.black30")};
25
+ border-color: ${themeGet("colors.black30")};
52
26
  `,
53
27
  },
54
28
  error: {
55
- resting: (0, native_1.css) `
56
- background-color: ${(0, theme_get_1.themeGet)("colors.white100")};
57
- border-color: ${(0, theme_get_1.themeGet)("colors.red100")};
29
+ resting: css `
30
+ background-color: ${themeGet("colors.white100")};
31
+ border-color: ${themeGet("colors.red100")};
58
32
  `,
59
- selected: (0, native_1.css) `
60
- background-color: ${(0, theme_get_1.themeGet)("colors.black100")};
61
- border-color: ${(0, theme_get_1.themeGet)("colors.black100")};
33
+ selected: css `
34
+ background-color: ${themeGet("colors.black100")};
35
+ border-color: ${themeGet("colors.black100")};
62
36
  `,
63
37
  },
64
38
  };
65
39
  /** Toggeable check mark */
66
- const Check = ({ disabled, selected, ...rest }) => {
67
- return ((0, jsx_runtime_1.jsx)(Container, { disabled: disabled, selected: selected, ...rest, children: !!selected && (0, jsx_runtime_1.jsx)(CheckIcon_1.CheckIcon, { fill: "white100" }) }));
40
+ export const Check = ({ disabled, selected, ...rest }) => {
41
+ return (_jsx(Container, { disabled: disabled, selected: selected, ...rest, children: !!selected && _jsx(CheckIcon, { fill: "white100" }) }));
68
42
  };
69
- exports.Check = Check;
70
- const Container = (0, native_1.default)(Box_1.Box) `
71
- width: ${exports.CHECK_SIZE}px;
72
- height: ${exports.CHECK_SIZE}px;
43
+ const Container = styled(Box) `
44
+ width: ${CHECK_SIZE}px;
45
+ height: ${CHECK_SIZE}px;
73
46
  display: flex;
74
47
  align-items: center;
75
48
  justify-content: center;
@@ -1,26 +1,20 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.DisabledMark = exports.CheckMark = exports.Checkbox = void 0;
7
- const jsx_runtime_1 = require("react/jsx-runtime");
8
- const theme_get_1 = require("@styled-system/theme-get");
9
- const react_1 = require("react");
10
- const react_native_1 = require("react-native");
11
- const native_1 = __importDefault(require("styled-components/native"));
12
- const CssTransition_1 = require("../../animation/CssTransition");
13
- const useTheme_1 = require("../../utils/hooks/useTheme");
14
- const Box_1 = require("../Box");
15
- const Flex_1 = require("../Flex");
16
- const Text_1 = require("../Text");
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { themeGet } from "@styled-system/theme-get";
3
+ import { useState } from "react";
4
+ import { PixelRatio, StyleSheet, TouchableWithoutFeedback, } from "react-native";
5
+ import styled from "styled-components/native";
6
+ import { CssTransition } from "../../animation/CssTransition";
7
+ import { useTheme } from "../../utils/hooks/useTheme";
8
+ import { Box } from "../Box";
9
+ import { Flex } from "../Flex";
10
+ import { Text } from "../Text";
17
11
  const CHECKBOX_SIZE = 20;
18
12
  const DURATION = 250;
19
- const Checkbox = ({ checked: checkedProp, disabled, error, onPress, text, subtitle, children, checkboxAccessibilityProps, ...restProps }) => {
20
- const { color, space } = (0, useTheme_1.useTheme)();
21
- const fontScale = react_native_1.PixelRatio.getFontScale();
13
+ export const Checkbox = ({ checked: checkedProp, disabled, error, onPress, text, subtitle, children, checkboxAccessibilityProps, ...restProps }) => {
14
+ const { color, space } = useTheme();
15
+ const fontScale = PixelRatio.getFontScale();
22
16
  const checkboxSize = CHECKBOX_SIZE * fontScale;
23
- const [checked, setChecked] = (0, react_1.useState)(checkedProp);
17
+ const [checked, setChecked] = useState(checkedProp);
24
18
  const isChecked = checkedProp ?? checked;
25
19
  const defaultCheckboxStyle = {
26
20
  backgroundColor: color("white100"),
@@ -49,22 +43,21 @@ const Checkbox = ({ checked: checkedProp, disabled, error, onPress, text, subtit
49
43
  : checkboxStyles[error ? "error" : "default"][isChecked ? "checked" : "unchecked"];
50
44
  const textColor = error ? color("red100") : disabled ? color("black30") : color("black100");
51
45
  const subtitleColor = error ? color("red100") : disabled ? color("black30") : color("black60");
52
- return ((0, jsx_runtime_1.jsx)(react_native_1.TouchableWithoutFeedback, { onPress: (event) => {
46
+ return (_jsx(TouchableWithoutFeedback, { onPress: (event) => {
53
47
  if (disabled) {
54
48
  return;
55
49
  }
56
50
  setChecked(!checked);
57
51
  onPress?.(event);
58
- }, children: (0, jsx_runtime_1.jsxs)(Flex_1.Flex, { flex: 1, ...restProps, children: [(0, jsx_runtime_1.jsxs)(Flex_1.Flex, { flexDirection: "row", children: [(0, jsx_runtime_1.jsx)(Flex_1.Flex, { mt: "2px", ...checkboxAccessibilityProps, children: (0, jsx_runtime_1.jsx)(CssTransition_1.CssTransition, { style: [
52
+ }, children: _jsxs(Flex, { flex: 1, ...restProps, children: [_jsxs(Flex, { flexDirection: "row", children: [_jsx(Flex, { mt: "2px", ...checkboxAccessibilityProps, children: _jsx(CssTransition, { style: [
59
53
  styles(fontScale).container,
60
54
  text || subtitle || children ? { marginRight: space(1) * fontScale } : {},
61
55
  checkboxStyle,
62
56
  ], animate: ["backgroundColor", "borderColor"], duration: DURATION, children: !!isChecked &&
63
- (!!disabled ? ((0, jsx_runtime_1.jsx)(exports.DisabledMark, { size: checkboxSize })) : ((0, jsx_runtime_1.jsx)(exports.CheckMark, { size: checkboxSize }))) }) }), (0, jsx_runtime_1.jsxs)(Flex_1.Flex, { justifyContent: "center", flex: 1, children: [!!text && ((0, jsx_runtime_1.jsx)(Text_1.Text, { variant: "sm-display", color: textColor, children: text })), children] })] }), !!subtitle && ((0, jsx_runtime_1.jsx)(Flex_1.Flex, { ml: `${(CHECKBOX_SIZE + space(1)) * fontScale}px`, mt: "6px", children: (0, jsx_runtime_1.jsx)(Text_1.Text, { variant: "xs", color: subtitleColor, children: subtitle }) }))] }) }));
57
+ (!!disabled ? (_jsx(DisabledMark, { size: checkboxSize })) : (_jsx(CheckMark, { size: checkboxSize }))) }) }), _jsxs(Flex, { justifyContent: "center", flex: 1, children: [!!text && (_jsx(Text, { variant: "sm-display", color: textColor, children: text })), children] })] }), !!subtitle && (_jsx(Flex, { ml: `${(CHECKBOX_SIZE + space(1)) * fontScale}px`, mt: "6px", children: _jsx(Text, { variant: "xs", color: subtitleColor, children: subtitle }) }))] }) }));
64
58
  };
65
- exports.Checkbox = Checkbox;
66
59
  // styled-component does not have support for Animated.View
67
- const styles = (fontScale) => react_native_1.StyleSheet.create({
60
+ const styles = (fontScale) => StyleSheet.create({
68
61
  container: {
69
62
  display: "flex",
70
63
  justifyContent: "center",
@@ -77,9 +70,8 @@ const styles = (fontScale) => react_native_1.StyleSheet.create({
77
70
  });
78
71
  // This component represents the √ mark in CSS. We are not using styled-system since it's easier to specify raw CSS
79
72
  // properties with styled-component.
80
- const CheckMark = ({ size }) => ((0, jsx_runtime_1.jsx)(Box_1.Box, { style: { transform: [{ rotate: "-45deg" }] }, top: "-12%", width: size * 0.625, height: size * 0.3125, borderBottomWidth: "2px", borderBottomColor: "white100", borderLeftWidth: "2px", borderLeftColor: "white100" }));
81
- exports.CheckMark = CheckMark;
82
- exports.DisabledMark = (0, native_1.default)(exports.CheckMark) `
83
- border-bottom-color: ${(0, theme_get_1.themeGet)("colors.black30")};
84
- border-left-color: ${(0, theme_get_1.themeGet)("colors.black30")};
73
+ export const CheckMark = ({ size }) => (_jsx(Box, { style: { transform: [{ rotate: "-45deg" }] }, top: "-12%", width: size * 0.625, height: size * 0.3125, borderBottomWidth: "2px", borderBottomColor: "white100", borderLeftWidth: "2px", borderLeftColor: "white100" }));
74
+ export const DisabledMark = styled(CheckMark) `
75
+ border-bottom-color: ${themeGet("colors.black30")};
76
+ border-left-color: ${themeGet("colors.black30")};
85
77
  `;