@coinbase/cds-mobile 9.1.2 → 9.2.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 (245) hide show
  1. package/CHANGELOG.md +13 -0
  2. package/dts/alpha/select/DefaultSelectControl.d.ts +9 -9
  3. package/dts/alpha/select/DefaultSelectControl.d.ts.map +1 -1
  4. package/dts/alpha/select/Select.d.ts.map +1 -1
  5. package/dts/alpha/select/types.d.ts +25 -8
  6. package/dts/alpha/select/types.d.ts.map +1 -1
  7. package/dts/sticky-footer/StickyFooter.d.ts +8 -0
  8. package/dts/sticky-footer/StickyFooter.d.ts.map +1 -1
  9. package/dts/visualizations/chart/bar/PercentageBarChart.d.ts +2 -2
  10. package/esm/alpha/select/DefaultSelectControl.js +34 -17
  11. package/esm/alpha/select/Select.js +59 -47
  12. package/esm/dates/DatePicker.js +0 -2
  13. package/esm/overlays/__stories__/TrayAction.stories.js +0 -1
  14. package/esm/overlays/__stories__/TrayInformational.stories.js +0 -2
  15. package/esm/overlays/__stories__/TrayMessaging.stories.js +0 -1
  16. package/esm/overlays/__stories__/TrayPromotional.stories.js +0 -1
  17. package/esm/overlays/__stories__/TrayRedesign.stories.js +0 -7
  18. package/esm/sticky-footer/StickyFooter.js +6 -3
  19. package/esm/system/__stories__/componentConfigStickerSheet/customComponentConfig.js +17 -11
  20. package/esm/system/__stories__/componentConfigStickerSheet/examples/Select.js +7 -0
  21. package/package.json +3 -3
  22. package/dts/accordion/__figma__/Accordion.figma.d.ts +0 -2
  23. package/dts/accordion/__figma__/Accordion.figma.d.ts.map +0 -1
  24. package/dts/alpha/__figma__/Select.figma.d.ts +0 -2
  25. package/dts/alpha/__figma__/Select.figma.d.ts.map +0 -1
  26. package/dts/alpha/data-card/__figma__/DataCard.figma.d.ts +0 -2
  27. package/dts/alpha/data-card/__figma__/DataCard.figma.d.ts.map +0 -1
  28. package/dts/buttons/__figma__/AvatarButton.figma.d.ts +0 -2
  29. package/dts/buttons/__figma__/AvatarButton.figma.d.ts.map +0 -1
  30. package/dts/buttons/__figma__/Button.figma.d.ts +0 -2
  31. package/dts/buttons/__figma__/Button.figma.d.ts.map +0 -1
  32. package/dts/buttons/__figma__/ButtonGroup.figma.d.ts +0 -2
  33. package/dts/buttons/__figma__/ButtonGroup.figma.d.ts.map +0 -1
  34. package/dts/buttons/__figma__/IconButton.figma.d.ts +0 -2
  35. package/dts/buttons/__figma__/IconButton.figma.d.ts.map +0 -1
  36. package/dts/buttons/__figma__/SlideButton.figma.d.ts +0 -2
  37. package/dts/buttons/__figma__/SlideButton.figma.d.ts.map +0 -1
  38. package/dts/cards/ContentCard/__figma__/ContentCard.figma.d.ts +0 -2
  39. package/dts/cards/ContentCard/__figma__/ContentCard.figma.d.ts.map +0 -1
  40. package/dts/cards/MediaCard/__figma__/MediaCard.figma.d.ts +0 -2
  41. package/dts/cards/MediaCard/__figma__/MediaCard.figma.d.ts.map +0 -1
  42. package/dts/cards/MessagingCard/__figma__/MessagingCard.figma.d.ts +0 -2
  43. package/dts/cards/MessagingCard/__figma__/MessagingCard.figma.d.ts.map +0 -1
  44. package/dts/cards/__figma__/AnnouncementCard.figma.d.ts +0 -2
  45. package/dts/cards/__figma__/AnnouncementCard.figma.d.ts.map +0 -1
  46. package/dts/cards/__figma__/ContainedAssetCard.figma.d.ts +0 -2
  47. package/dts/cards/__figma__/ContainedAssetCard.figma.d.ts.map +0 -1
  48. package/dts/cards/__figma__/FloatingAssetCard.figma.d.ts +0 -2
  49. package/dts/cards/__figma__/FloatingAssetCard.figma.d.ts.map +0 -1
  50. package/dts/cards/__figma__/NudgeCard.figma.d.ts +0 -2
  51. package/dts/cards/__figma__/NudgeCard.figma.d.ts.map +0 -1
  52. package/dts/cards/__figma__/UpsellCard.figma.d.ts +0 -2
  53. package/dts/cards/__figma__/UpsellCard.figma.d.ts.map +0 -1
  54. package/dts/carousel/__figma__/Carousel.figma.d.ts +0 -2
  55. package/dts/carousel/__figma__/Carousel.figma.d.ts.map +0 -1
  56. package/dts/cells/__figma__/ContentCell.figma.d.ts +0 -2
  57. package/dts/cells/__figma__/ContentCell.figma.d.ts.map +0 -1
  58. package/dts/cells/__figma__/ListCell.figma.d.ts +0 -2
  59. package/dts/cells/__figma__/ListCell.figma.d.ts.map +0 -1
  60. package/dts/chips/__figma__/InputChip.figma.d.ts +0 -2
  61. package/dts/chips/__figma__/InputChip.figma.d.ts.map +0 -1
  62. package/dts/chips/__figma__/SelectChip.figma.d.ts +0 -2
  63. package/dts/chips/__figma__/SelectChip.figma.d.ts.map +0 -1
  64. package/dts/chips/__figma__/TabbedChips.figma.d.ts +0 -2
  65. package/dts/chips/__figma__/TabbedChips.figma.d.ts.map +0 -1
  66. package/dts/coachmark/__figma__/Coachmark.figma.d.ts +0 -2
  67. package/dts/coachmark/__figma__/Coachmark.figma.d.ts.map +0 -1
  68. package/dts/controls/__figma__/Checkbox.figma.d.ts +0 -2
  69. package/dts/controls/__figma__/Checkbox.figma.d.ts.map +0 -1
  70. package/dts/controls/__figma__/CheckboxCell.figma.d.ts +0 -2
  71. package/dts/controls/__figma__/CheckboxCell.figma.d.ts.map +0 -1
  72. package/dts/controls/__figma__/CheckboxGroup.figma.d.ts +0 -2
  73. package/dts/controls/__figma__/CheckboxGroup.figma.d.ts.map +0 -1
  74. package/dts/controls/__figma__/RadioCell.figma.d.ts +0 -2
  75. package/dts/controls/__figma__/RadioCell.figma.d.ts.map +0 -1
  76. package/dts/controls/__figma__/RadioGroup.figma.d.ts +0 -2
  77. package/dts/controls/__figma__/RadioGroup.figma.d.ts.map +0 -1
  78. package/dts/controls/__figma__/SearchInput.figma.d.ts +0 -2
  79. package/dts/controls/__figma__/SearchInput.figma.d.ts.map +0 -1
  80. package/dts/controls/__figma__/SelectOption.figma.d.ts +0 -2
  81. package/dts/controls/__figma__/SelectOption.figma.d.ts.map +0 -1
  82. package/dts/controls/__figma__/Switch.figma.d.ts +0 -2
  83. package/dts/controls/__figma__/Switch.figma.d.ts.map +0 -1
  84. package/dts/controls/__figma__/TextInput.figma.d.ts +0 -2
  85. package/dts/controls/__figma__/TextInput.figma.d.ts.map +0 -1
  86. package/dts/dates/__figma__/DatePicker.figma.d.ts +0 -2
  87. package/dts/dates/__figma__/DatePicker.figma.d.ts.map +0 -1
  88. package/dts/dots/__figma__/DotCount.figma.d.ts +0 -2
  89. package/dts/dots/__figma__/DotCount.figma.d.ts.map +0 -1
  90. package/dts/dots/__figma__/DotStatusColor.figma.d.ts +0 -2
  91. package/dts/dots/__figma__/DotStatusColor.figma.d.ts.map +0 -1
  92. package/dts/dots/__figma__/DotSymbol.figma.d.ts +0 -2
  93. package/dts/dots/__figma__/DotSymbol.figma.d.ts.map +0 -1
  94. package/dts/icons/__figma__/Icon.figma.d.ts +0 -2
  95. package/dts/icons/__figma__/Icon.figma.d.ts.map +0 -1
  96. package/dts/icons/__figma__/LogoMark.figma.d.ts +0 -2
  97. package/dts/icons/__figma__/LogoMark.figma.d.ts.map +0 -1
  98. package/dts/icons/__figma__/LogoWordmark.figma.d.ts +0 -2
  99. package/dts/icons/__figma__/LogoWordmark.figma.d.ts.map +0 -1
  100. package/dts/icons/__figma__/SubBrandLogoMark.figma.d.ts +0 -2
  101. package/dts/icons/__figma__/SubBrandLogoMark.figma.d.ts.map +0 -1
  102. package/dts/icons/__figma__/SubBrandLogoWordmark.figma.d.ts +0 -2
  103. package/dts/icons/__figma__/SubBrandLogoWordmark.figma.d.ts.map +0 -1
  104. package/dts/illustrations/__figma__/HeroSquare.figma.d.ts +0 -2
  105. package/dts/illustrations/__figma__/HeroSquare.figma.d.ts.map +0 -1
  106. package/dts/illustrations/__figma__/Pictogram.figma.d.ts +0 -2
  107. package/dts/illustrations/__figma__/Pictogram.figma.d.ts.map +0 -1
  108. package/dts/illustrations/__figma__/SpotIcon.figma.d.ts +0 -2
  109. package/dts/illustrations/__figma__/SpotIcon.figma.d.ts.map +0 -1
  110. package/dts/illustrations/__figma__/SpotRectangle.figma.d.ts +0 -2
  111. package/dts/illustrations/__figma__/SpotRectangle.figma.d.ts.map +0 -1
  112. package/dts/illustrations/__figma__/SpotSquare.figma.d.ts +0 -2
  113. package/dts/illustrations/__figma__/SpotSquare.figma.d.ts.map +0 -1
  114. package/dts/layout/__figma__/Divider.figma.d.ts +0 -2
  115. package/dts/layout/__figma__/Divider.figma.d.ts.map +0 -1
  116. package/dts/layout/__figma__/Fallback.figma.d.ts +0 -2
  117. package/dts/layout/__figma__/Fallback.figma.d.ts.map +0 -1
  118. package/dts/media/__figma__/Avatar.figma.d.ts +0 -2
  119. package/dts/media/__figma__/Avatar.figma.d.ts.map +0 -1
  120. package/dts/multi-content-module/__figma__/MultiContentModule.figma.d.ts +0 -2
  121. package/dts/multi-content-module/__figma__/MultiContentModule.figma.d.ts.map +0 -1
  122. package/dts/navigation/__figma__/BrowserBar.figma.d.ts +0 -2
  123. package/dts/navigation/__figma__/BrowserBar.figma.d.ts.map +0 -1
  124. package/dts/navigation/__figma__/TopNavBar.figma.d.ts +0 -2
  125. package/dts/navigation/__figma__/TopNavBar.figma.d.ts.map +0 -1
  126. package/dts/numpad/__figma__/Numpad.figma.d.ts +0 -2
  127. package/dts/numpad/__figma__/Numpad.figma.d.ts.map +0 -1
  128. package/dts/overlays/__figma__/Alert.figma.d.ts +0 -2
  129. package/dts/overlays/__figma__/Alert.figma.d.ts.map +0 -1
  130. package/dts/overlays/__figma__/Toast.figma.d.ts +0 -2
  131. package/dts/overlays/__figma__/Toast.figma.d.ts.map +0 -1
  132. package/dts/overlays/modal/__figma__/Modal.figma.d.ts +0 -2
  133. package/dts/overlays/modal/__figma__/Modal.figma.d.ts.map +0 -1
  134. package/dts/overlays/tooltip/__figma__/Tooltip.figma.d.ts +0 -2
  135. package/dts/overlays/tooltip/__figma__/Tooltip.figma.d.ts.map +0 -1
  136. package/dts/overlays/tray/__figma__/Tray.figma.d.ts +0 -2
  137. package/dts/overlays/tray/__figma__/Tray.figma.d.ts.map +0 -1
  138. package/dts/page/__figma__/PageFooter.figma.d.ts +0 -2
  139. package/dts/page/__figma__/PageFooter.figma.d.ts.map +0 -1
  140. package/dts/page/__figma__/PageHeader.figma.d.ts +0 -2
  141. package/dts/page/__figma__/PageHeader.figma.d.ts.map +0 -1
  142. package/dts/perf/component-config/Button.component-config.perf-test.d.ts +0 -2
  143. package/dts/perf/component-config/Button.component-config.perf-test.d.ts.map +0 -1
  144. package/dts/perf/component-config/ComponentConfigProvider.perf-test.d.ts +0 -2
  145. package/dts/perf/component-config/ComponentConfigProvider.perf-test.d.ts.map +0 -1
  146. package/dts/perf/component-config/ComponentConfigStickerSheet.perf-test.d.ts +0 -2
  147. package/dts/perf/component-config/ComponentConfigStickerSheet.perf-test.d.ts.map +0 -1
  148. package/dts/section-header/__figma__/SectionHeader.figma.d.ts +0 -2
  149. package/dts/section-header/__figma__/SectionHeader.figma.d.ts.map +0 -1
  150. package/dts/sticky-footer/__figma__/StickyFooter.figma.d.ts +0 -2
  151. package/dts/sticky-footer/__figma__/StickyFooter.figma.d.ts.map +0 -1
  152. package/dts/tabs/__figma__/SegmentedTabs.figma.d.ts +0 -2
  153. package/dts/tabs/__figma__/SegmentedTabs.figma.d.ts.map +0 -1
  154. package/dts/tabs/__figma__/TabNavigation.figma.d.ts +0 -2
  155. package/dts/tabs/__figma__/TabNavigation.figma.d.ts.map +0 -1
  156. package/dts/tag/__figma__/Tag.figma.d.ts +0 -2
  157. package/dts/tag/__figma__/Tag.figma.d.ts.map +0 -1
  158. package/dts/typography/__figma__/Link.figma.d.ts +0 -2
  159. package/dts/typography/__figma__/Link.figma.d.ts.map +0 -1
  160. package/dts/visualizations/__figma__/ProgressBar.figma.d.ts +0 -2
  161. package/dts/visualizations/__figma__/ProgressBar.figma.d.ts.map +0 -1
  162. package/dts/visualizations/__figma__/ProgressCircle.figma.d.ts +0 -2
  163. package/dts/visualizations/__figma__/ProgressCircle.figma.d.ts.map +0 -1
  164. package/dts/visualizations/sparkline/__figma__/Sparkline.figma.d.ts +0 -2
  165. package/dts/visualizations/sparkline/__figma__/Sparkline.figma.d.ts.map +0 -1
  166. package/dts/visualizations/sparkline/sparkline-interactive/__figma__/SparklineInteractive.figma.d.ts +0 -2
  167. package/dts/visualizations/sparkline/sparkline-interactive/__figma__/SparklineInteractive.figma.d.ts.map +0 -1
  168. package/dts/visualizations/sparkline/sparkline-interactive-header/__figma__/SparklineInteractiveHeader.figma.d.ts +0 -2
  169. package/dts/visualizations/sparkline/sparkline-interactive-header/__figma__/SparklineInteractiveHeader.figma.d.ts.map +0 -1
  170. package/esm/accordion/__figma__/Accordion.figma.js +0 -42
  171. package/esm/alpha/__figma__/Select.figma.js +0 -63
  172. package/esm/alpha/data-card/__figma__/DataCard.figma.js +0 -29
  173. package/esm/buttons/__figma__/AvatarButton.figma.js +0 -25
  174. package/esm/buttons/__figma__/Button.figma.js +0 -65
  175. package/esm/buttons/__figma__/ButtonGroup.figma.js +0 -48
  176. package/esm/buttons/__figma__/IconButton.figma.js +0 -29
  177. package/esm/buttons/__figma__/SlideButton.figma.js +0 -27
  178. package/esm/cards/ContentCard/__figma__/ContentCard.figma.js +0 -35
  179. package/esm/cards/MediaCard/__figma__/MediaCard.figma.js +0 -46
  180. package/esm/cards/MessagingCard/__figma__/MessagingCard.figma.js +0 -38
  181. package/esm/cards/__figma__/AnnouncementCard.figma.js +0 -19
  182. package/esm/cards/__figma__/ContainedAssetCard.figma.js +0 -39
  183. package/esm/cards/__figma__/FloatingAssetCard.figma.js +0 -30
  184. package/esm/cards/__figma__/NudgeCard.figma.js +0 -54
  185. package/esm/cards/__figma__/UpsellCard.figma.js +0 -48
  186. package/esm/carousel/__figma__/Carousel.figma.js +0 -36
  187. package/esm/cells/__figma__/ContentCell.figma.js +0 -35
  188. package/esm/cells/__figma__/ListCell.figma.js +0 -74
  189. package/esm/chips/__figma__/InputChip.figma.js +0 -27
  190. package/esm/chips/__figma__/SelectChip.figma.js +0 -38
  191. package/esm/chips/__figma__/TabbedChips.figma.js +0 -55
  192. package/esm/coachmark/__figma__/Coachmark.figma.js +0 -41
  193. package/esm/controls/__figma__/Checkbox.figma.js +0 -27
  194. package/esm/controls/__figma__/CheckboxCell.figma.js +0 -38
  195. package/esm/controls/__figma__/CheckboxGroup.figma.js +0 -23
  196. package/esm/controls/__figma__/RadioCell.figma.js +0 -78
  197. package/esm/controls/__figma__/RadioGroup.figma.js +0 -47
  198. package/esm/controls/__figma__/SearchInput.figma.js +0 -35
  199. package/esm/controls/__figma__/SelectOption.figma.js +0 -35
  200. package/esm/controls/__figma__/Switch.figma.js +0 -16
  201. package/esm/controls/__figma__/TextInput.figma.js +0 -125
  202. package/esm/dates/__figma__/DatePicker.figma.js +0 -43
  203. package/esm/dots/__figma__/DotCount.figma.js +0 -16
  204. package/esm/dots/__figma__/DotStatusColor.figma.js +0 -23
  205. package/esm/dots/__figma__/DotSymbol.figma.js +0 -45
  206. package/esm/icons/__figma__/Icon.figma.js +0 -3906
  207. package/esm/icons/__figma__/LogoMark.figma.js +0 -20
  208. package/esm/icons/__figma__/LogoWordmark.figma.js +0 -32
  209. package/esm/icons/__figma__/SubBrandLogoMark.figma.js +0 -47
  210. package/esm/icons/__figma__/SubBrandLogoWordmark.figma.js +0 -48
  211. package/esm/illustrations/__figma__/HeroSquare.figma.js +0 -2104
  212. package/esm/illustrations/__figma__/Pictogram.figma.js +0 -1774
  213. package/esm/illustrations/__figma__/SpotIcon.figma.js +0 -340
  214. package/esm/illustrations/__figma__/SpotRectangle.figma.js +0 -1102
  215. package/esm/illustrations/__figma__/SpotSquare.figma.js +0 -1192
  216. package/esm/jest.d.js +0 -12
  217. package/esm/layout/__figma__/Divider.figma.js +0 -27
  218. package/esm/layout/__figma__/Fallback.figma.js +0 -21
  219. package/esm/media/__figma__/Avatar.figma.js +0 -56
  220. package/esm/multi-content-module/__figma__/MultiContentModule.figma.js +0 -31
  221. package/esm/navigation/__figma__/BrowserBar.figma.js +0 -58
  222. package/esm/navigation/__figma__/TopNavBar.figma.js +0 -319
  223. package/esm/numpad/__figma__/Numpad.figma.js +0 -63
  224. package/esm/overlays/__figma__/Alert.figma.js +0 -32
  225. package/esm/overlays/__figma__/Toast.figma.js +0 -51
  226. package/esm/overlays/modal/__figma__/Modal.figma.js +0 -74
  227. package/esm/overlays/tooltip/__figma__/Tooltip.figma.js +0 -92
  228. package/esm/overlays/tray/__figma__/Tray.figma.js +0 -223
  229. package/esm/page/__figma__/PageFooter.figma.js +0 -61
  230. package/esm/page/__figma__/PageHeader.figma.js +0 -58
  231. package/esm/perf/component-config/Button.component-config.perf-test.js +0 -35
  232. package/esm/perf/component-config/ComponentConfigProvider.perf-test.js +0 -147
  233. package/esm/perf/component-config/ComponentConfigStickerSheet.perf-test.js +0 -326
  234. package/esm/perf/component-config/README.md +0 -8
  235. package/esm/section-header/__figma__/SectionHeader.figma.js +0 -50
  236. package/esm/sticky-footer/__figma__/StickyFooter.figma.js +0 -25
  237. package/esm/tabs/__figma__/SegmentedTabs.figma.js +0 -79
  238. package/esm/tabs/__figma__/TabNavigation.figma.js +0 -83
  239. package/esm/tag/__figma__/Tag.figma.js +0 -86
  240. package/esm/typography/__figma__/Link.figma.js +0 -28
  241. package/esm/visualizations/__figma__/ProgressBar.figma.js +0 -99
  242. package/esm/visualizations/__figma__/ProgressCircle.figma.js +0 -26
  243. package/esm/visualizations/sparkline/__figma__/Sparkline.figma.js +0 -22
  244. package/esm/visualizations/sparkline/sparkline-interactive/__figma__/SparklineInteractive.figma.js +0 -85
  245. package/esm/visualizations/sparkline/sparkline-interactive-header/__figma__/SparklineInteractiveHeader.figma.js +0 -104
@@ -1,99 +0,0 @@
1
- const _excluded = ["floatLabel", "progress", "labelPlacement"],
2
- _excluded2 = ["showStartLabel", "showEndLabel", "progress", "labelPlacement"];
3
- function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
4
- function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; }
5
- import React from 'react';
6
- import { figma } from '@figma/code-connect';
7
- import { ProgressBar } from '../ProgressBar';
8
- import { ProgressBarWithFixedLabels } from '../ProgressBarWithFixedLabels';
9
- import { ProgressBarWithFloatLabel } from '../ProgressBarWithFloatLabel';
10
- import { jsx as _jsx } from "react/jsx-runtime";
11
- figma.connect(ProgressBar, 'https://www.figma.com/design/k5CtyJccNQUGMI5bI4lJ2g/✨-CDS-Components?node-id=64-746&m=dev', {
12
- imports: ["import { ProgressBar } from '@coinbase/cds-mobile/visualizations/ProgressBar'", "import { ProgressBarWithFloatLabel } from '@coinbase/cds-mobile/visualizations/ProgressBarWithFloatLabel'"],
13
- props: {
14
- weight: figma.enum('weight', {
15
- normal: 'normal',
16
- heavy: 'heavy',
17
- thin: 'thin'
18
- }),
19
- disabled: figma.boolean('disabled'),
20
- progress: figma.enum('progress', {
21
- '100%': 1,
22
- '75%': 0.75,
23
- '50%': 0.5,
24
- '25%': 0.25,
25
- '0%': 0
26
- }),
27
- floatLabel: figma.enum('progress', {
28
- '100%': 100,
29
- '75%': 75,
30
- '50%': 50,
31
- '25%': 25,
32
- '0%': 0
33
- }),
34
- labelPlacement: figma.enum('label placement', {
35
- 'float above': 'above',
36
- 'float below': 'below'
37
- })
38
- },
39
- example: _ref => {
40
- let {
41
- floatLabel,
42
- progress,
43
- labelPlacement
44
- } = _ref,
45
- props = _objectWithoutPropertiesLoose(_ref, _excluded);
46
- return /*#__PURE__*/_jsx(ProgressBarWithFloatLabel, {
47
- label: floatLabel,
48
- labelPlacement: labelPlacement,
49
- progress: progress,
50
- children: /*#__PURE__*/_jsx(ProgressBar, _extends({
51
- progress: progress
52
- }, props))
53
- });
54
- }
55
- });
56
- figma.connect(ProgressBar, 'https://www.figma.com/design/k5CtyJccNQUGMI5bI4lJ2g/✨-CDS-Components?node-id=64-746&m=dev', {
57
- imports: ["import { ProgressBar } from '@coinbase/cds-mobile/visualizations/ProgressBar'", "import { ProgressBarWithFloatLabel } from '@coinbase/cds-mobile/visualizations/ProgressBarWithFloatLabel'"],
58
- props: {
59
- weight: figma.enum('weight', {
60
- normal: 'normal',
61
- heavy: 'heavy',
62
- thin: 'thin'
63
- }),
64
- disabled: figma.boolean('disabled'),
65
- progress: figma.enum('progress', {
66
- '100%': 1,
67
- '75%': 0.75,
68
- '50%': 0.5,
69
- '25%': 0.25,
70
- '0%': 0
71
- }),
72
- labelPlacement: figma.enum('label placement', {
73
- 'fixed above': 'above',
74
- 'fixed below': 'below',
75
- 'side-by-side': 'beside'
76
- }),
77
- showStartLabel: figma.boolean('show start label'),
78
- showEndLabel: figma.boolean('show end label')
79
- },
80
- example: _ref2 => {
81
- let {
82
- showStartLabel,
83
- showEndLabel,
84
- progress,
85
- labelPlacement
86
- } = _ref2,
87
- props = _objectWithoutPropertiesLoose(_ref2, _excluded2);
88
- const startLabel = showStartLabel ? progress : undefined;
89
- const endLabel = showEndLabel ? progress : undefined;
90
- return /*#__PURE__*/_jsx(ProgressBarWithFixedLabels, {
91
- endLabel: endLabel,
92
- labelPlacement: labelPlacement,
93
- startLabel: startLabel,
94
- children: /*#__PURE__*/_jsx(ProgressBar, _extends({
95
- progress: progress
96
- }, props))
97
- });
98
- }
99
- });
@@ -1,26 +0,0 @@
1
- function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
2
- import React from 'react';
3
- import { figma } from '@figma/code-connect';
4
- import { ProgressCircle } from '../ProgressCircle';
5
- import { jsx as _jsx } from "react/jsx-runtime";
6
- figma.connect(ProgressCircle, 'https://www.figma.com/design/k5CtyJccNQUGMI5bI4lJ2g/✨-CDS-Components?node-id=64-917&m=dev', {
7
- imports: ["import { ProgressCircle } from '@coinbase/cds-mobile/visualizations/ProgressCircle'"],
8
- props: {
9
- hideText: figma.boolean('progress label', {
10
- true: undefined,
11
- false: true
12
- }),
13
- weight: figma.enum('weight', {
14
- normal: 'normal',
15
- heavy: 'heavy',
16
- thin: 'thin'
17
- }),
18
- progress: figma.enum('progress', {
19
- '100%': 1,
20
- '75%': 0.75,
21
- '50%': 0.5,
22
- '25%': 0.25
23
- })
24
- },
25
- example: props => /*#__PURE__*/_jsx(ProgressCircle, _extends({}, props))
26
- });
@@ -1,22 +0,0 @@
1
- import React from 'react';
2
- import { useSparklinePath } from '@coinbase/cds-common/visualizations/useSparklinePath';
3
- import { figma } from '@figma/code-connect';
4
- import { Sparkline } from '../Sparkline';
5
- import { jsx as _jsx } from "react/jsx-runtime";
6
- figma.connect(Sparkline, 'https://www.figma.com/design/k5CtyJccNQUGMI5bI4lJ2g/%E2%9C%A8-CDS-Components?node-id=320%3A15040', {
7
- imports: ["import { Sparkline } from '@coinbase/cds-mobile/visualizations/sparkline'", "import { useSparklinePath } from '@coinbase/cds-common/visualizations/useSparklinePath'"],
8
- example: function Example() {
9
- const data = [20, 30, 5, 45, 0];
10
- const path = useSparklinePath({
11
- height: 200,
12
- width: 200,
13
- data
14
- });
15
- return /*#__PURE__*/_jsx(Sparkline, {
16
- color: "auto",
17
- height: 200,
18
- path: path,
19
- width: 400
20
- });
21
- }
22
- });
@@ -1,85 +0,0 @@
1
- function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
2
- import React from 'react';
3
- import { figma } from '@figma/code-connect';
4
- import { SparklineInteractive } from '../SparklineInteractive';
5
- import { jsx as _jsx } from "react/jsx-runtime";
6
- figma.connect(SparklineInteractive, 'https://www.figma.com/design/k5CtyJccNQUGMI5bI4lJ2g/%E2%9C%A8-CDS-Components?node-id=320-14858&m=dev', {
7
- imports: ["import { SparklineInteractive } from '@coinbase/cds-mobile/visualizations/sparkline'"],
8
- props: {
9
- compact: figma.boolean('compact'),
10
- disableScrubbing: figma.boolean('scrubbing', {
11
- false: true,
12
- true: false
13
- })
14
- },
15
- example: props => {
16
- const periods = [{
17
- label: '1H',
18
- value: 'hour'
19
- }, {
20
- label: '1D',
21
- value: 'day'
22
- }, {
23
- label: '1W',
24
- value: 'week'
25
- }, {
26
- label: '1M',
27
- value: 'month'
28
- }, {
29
- label: '1Y',
30
- value: 'year'
31
- }, {
32
- label: 'All',
33
- value: 'all'
34
- }];
35
- const data = {
36
- hour: [],
37
- day: [{
38
- value: 49259.38,
39
- date: new Date('2021-12-05T04:00:00.000Z')
40
- }, {
41
- value: 49163.79,
42
- date: new Date('2021-12-05T04:05:00.000Z')
43
- }, {
44
- value: 49146.66,
45
- date: new Date('2021-12-05T04:10:00.000Z')
46
- }, {
47
- value: 49083.92,
48
- date: new Date('2021-12-05T04:15:00.000Z')
49
- }, {
50
- value: 49115.3,
51
- date: new Date('2021-12-05T04:20:00.000Z')
52
- }, {
53
- value: 48992.14,
54
- date: new Date('2021-12-05T04:25:00.000Z')
55
- }, {
56
- value: 49075.75,
57
- date: new Date('2021-12-05T04:30:00.000Z')
58
- }, {
59
- value: 49025.78,
60
- date: new Date('2021-12-05T04:35:00.000Z')
61
- }, {
62
- value: 49066.23,
63
- date: new Date('2021-12-05T04:40:00.000Z')
64
- }, {
65
- value: 49247.82,
66
- date: new Date('2021-12-05T04:45:00.000Z')
67
- }],
68
- week: [],
69
- month: [],
70
- year: [],
71
- all: []
72
- };
73
- return /*#__PURE__*/_jsx(SparklineInteractive, _extends({
74
- data: data,
75
- defaultPeriod: "day",
76
- formatDate: date => date.toLocaleString('en-US', {
77
- timeZone: 'America/New_York',
78
- hour: 'numeric',
79
- minute: 'numeric'
80
- }),
81
- periods: periods,
82
- strokeColor: "#cb51bb"
83
- }, props));
84
- }
85
- });
@@ -1,104 +0,0 @@
1
- function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
2
- import React from 'react';
3
- import { figma } from '@figma/code-connect';
4
- import { SparklineInteractive } from '../../sparkline-interactive/SparklineInteractive';
5
- import { SparklineInteractiveHeader } from '../SparklineInteractiveHeader';
6
- import { jsx as _jsx } from "react/jsx-runtime";
7
- figma.connect(SparklineInteractiveHeader, 'https://www.figma.com/design/k5CtyJccNQUGMI5bI4lJ2g/✨-CDS-Components?node-id=320-14931&m=dev', {
8
- imports: ["import { SparklineInteractiveHeader } from '@coinbase/cds-mobile/visualizations/sparkline'", "import { SparklineInteractive } from '@coinbase/cds-mobile/visualizations/sparkline'"],
9
- props: {
10
- compact: figma.boolean('compact'),
11
- disableScrubbing: figma.boolean('scrubbing', {
12
- false: true,
13
- true: false
14
- })
15
- },
16
- example: props => {
17
- const periods = [{
18
- label: '1H',
19
- value: 'hour'
20
- }, {
21
- label: '1D',
22
- value: 'day'
23
- }, {
24
- label: '1W',
25
- value: 'week'
26
- }, {
27
- label: '1M',
28
- value: 'month'
29
- }, {
30
- label: '1Y',
31
- value: 'year'
32
- }, {
33
- label: 'All',
34
- value: 'all'
35
- }];
36
- const data = {
37
- hour: [],
38
- day: [{
39
- value: 49259.38,
40
- date: new Date('2021-12-05T04:00:00.000Z')
41
- }, {
42
- value: 49163.79,
43
- date: new Date('2021-12-05T04:05:00.000Z')
44
- }, {
45
- value: 49146.66,
46
- date: new Date('2021-12-05T04:10:00.000Z')
47
- }, {
48
- value: 49083.92,
49
- date: new Date('2021-12-05T04:15:00.000Z')
50
- }, {
51
- value: 49115.3,
52
- date: new Date('2021-12-05T04:20:00.000Z')
53
- }, {
54
- value: 48992.14,
55
- date: new Date('2021-12-05T04:25:00.000Z')
56
- }, {
57
- value: 49075.75,
58
- date: new Date('2021-12-05T04:30:00.000Z')
59
- }, {
60
- value: 49025.78,
61
- date: new Date('2021-12-05T04:35:00.000Z')
62
- }, {
63
- value: 49066.23,
64
- date: new Date('2021-12-05T04:40:00.000Z')
65
- }, {
66
- value: 49247.82,
67
- date: new Date('2021-12-05T04:45:00.000Z')
68
- }],
69
- week: [],
70
- month: [],
71
- year: [],
72
- all: []
73
- };
74
- const defaultSubHead = {
75
- percent: '1.35%',
76
- sign: 'upwardTrend',
77
- variant: 'positive',
78
- accessibilityLabel: 'on Sunday, December 5, 2021 at 10:55 PM, up',
79
- priceChange: '$21.36'
80
- };
81
- const header = /*#__PURE__*/_jsx(SparklineInteractiveHeader, {
82
- defaultLabel: "Portfolio balance"
83
- // @ts-expect-error: defaultSubHead is not part of the type definition
84
- ,
85
- defaultSubHead: defaultSubHead,
86
- defaultTitle: "$10,023.82"
87
- });
88
- return /*#__PURE__*/_jsx(SparklineInteractive, _extends({
89
- data: data,
90
- defaultPeriod: "day",
91
- formatDate: date => date.toLocaleString('en-US', {
92
- timeZone: 'America/New_York',
93
- hour: 'numeric',
94
- minute: 'numeric'
95
- }),
96
- headerNode: header,
97
- onPeriodChanged: () => {},
98
- onScrub: () => {},
99
- onScrubEnd: () => {},
100
- periods: periods,
101
- strokeColor: "#cb51bb"
102
- }, props));
103
- }
104
- });