@ledgerhq/react-ui 0.53.0 → 0.53.1-nightly.20260902021544

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 (294) hide show
  1. package/README.md +3 -6
  2. package/lib/assets/logos/LedgerLiveAltRegular.d.ts.map +1 -1
  3. package/lib/assets/logos/LedgerLiveRegular.d.ts.map +1 -1
  4. package/lib/cjs/components/animations/GlitchText/index.js +16 -42
  5. package/lib/cjs/components/animations/GlitchText/index.js.map +1 -1
  6. package/lib/cjs/components/form/Radio/RadioElement.js +2 -2
  7. package/lib/cjs/components/form/Radio/RadioElement.js.map +1 -1
  8. package/lib/cjs/components/form/Radio/RadioListElement.js +2 -2
  9. package/lib/cjs/components/form/Radio/RadioListElement.js.map +1 -1
  10. package/lib/cjs/components/form/Radio/index.js +2 -2
  11. package/lib/cjs/components/form/Radio/index.js.map +1 -1
  12. package/lib/cjs/components/form/index.js +2 -2
  13. package/lib/cjs/components/form/index.js.map +1 -1
  14. package/lib/cjs/components/index.js +2 -2
  15. package/lib/cjs/components/index.js.map +1 -1
  16. package/lib/cjs/components/layout/Carousel/Footer/Pagination/bullets.js.map +1 -1
  17. package/lib/cjs/components/layout/Carousel/Footer/Pagination/index.js.map +1 -1
  18. package/lib/cjs/components/layout/Carousel/Footer/Pagination/types.js.map +1 -1
  19. package/lib/cjs/components/layout/Carousel/Footer/Pagination/utils.js.map +1 -1
  20. package/lib/cjs/components/layout/Carousel/Footer/index.js.map +1 -1
  21. package/lib/cjs/components/layout/Carousel/Footer/variantContentCard.js.map +1 -1
  22. package/lib/cjs/components/layout/Carousel/Footer/variantDefault.js.map +1 -1
  23. package/lib/cjs/components/layout/Carousel/index.js.map +1 -1
  24. package/lib/cjs/components/layout/index.js.map +1 -1
  25. package/lib/cjs/index.js +2 -2
  26. package/lib/cjs/index.js.map +1 -1
  27. package/lib/components/Table/index.d.ts +5 -11
  28. package/lib/components/Table/index.d.ts.map +1 -1
  29. package/lib/components/asorted/Divider/index.d.ts.map +1 -1
  30. package/lib/components/asorted/Icon/BoxedIcon.d.ts.map +1 -1
  31. package/lib/components/asorted/Icon/Icon.d.ts.map +1 -1
  32. package/lib/components/asorted/Text/index.d.ts.map +1 -1
  33. package/lib/components/cta/Button/index.d.ts.map +1 -1
  34. package/lib/components/cta/Link/index.d.ts.map +1 -1
  35. package/lib/components/cta/Toggle/index.d.ts.map +1 -1
  36. package/lib/components/form/BaseInput/index.d.ts +2 -2
  37. package/lib/components/form/BaseInput/index.d.ts.map +1 -1
  38. package/lib/components/form/Checkbox/Checkbox.d.ts.map +1 -1
  39. package/lib/components/form/LegendInput/index.d.ts +2 -2
  40. package/lib/components/form/LegendInput/index.d.ts.map +1 -1
  41. package/lib/components/form/NumberInput/index.d.ts +2 -2
  42. package/lib/components/form/NumberInput/index.d.ts.map +1 -1
  43. package/lib/components/form/QrCodeInput/index.d.ts +2 -2
  44. package/lib/components/form/QrCodeInput/index.d.ts.map +1 -1
  45. package/lib/components/form/QuantityInput/index.d.ts +2 -2
  46. package/lib/components/form/QuantityInput/index.d.ts.map +1 -1
  47. package/lib/components/form/Radio/RadioElement.d.ts +6 -5
  48. package/lib/components/form/Radio/RadioElement.d.ts.map +1 -1
  49. package/lib/components/form/Radio/RadioElement.js +1 -1
  50. package/lib/components/form/Radio/RadioElement.js.map +1 -1
  51. package/lib/components/form/Radio/RadioListElement.d.ts +5 -5
  52. package/lib/components/form/Radio/RadioListElement.d.ts.map +1 -1
  53. package/lib/components/form/Radio/RadioListElement.js +1 -1
  54. package/lib/components/form/Radio/RadioListElement.js.map +1 -1
  55. package/lib/components/form/Radio/index.d.ts +7 -16
  56. package/lib/components/form/Radio/index.d.ts.map +1 -1
  57. package/lib/components/form/SearchInput/index.d.ts +2 -2
  58. package/lib/components/form/SearchInput/index.d.ts.map +1 -1
  59. package/lib/components/form/SelectInput/index.d.ts.map +1 -1
  60. package/lib/components/form/Switch/Switch.d.ts.map +1 -1
  61. package/lib/components/layout/Box/index.d.ts.map +1 -1
  62. package/lib/components/layout/Carousel/Footer/Pagination/bullets.d.ts.map +1 -1
  63. package/lib/components/layout/Carousel/Footer/Pagination/index.d.ts.map +1 -1
  64. package/lib/components/layout/Carousel/Footer/Pagination/types.d.ts +4 -4
  65. package/lib/components/layout/Carousel/Footer/Pagination/types.d.ts.map +1 -1
  66. package/lib/components/layout/Carousel/Footer/Pagination/types.js.map +1 -1
  67. package/lib/components/layout/Carousel/Footer/Pagination/utils.d.ts.map +1 -1
  68. package/lib/components/layout/Carousel/Footer/index.d.ts.map +1 -1
  69. package/lib/components/layout/Carousel/Footer/variantContentCard.d.ts.map +1 -1
  70. package/lib/components/layout/Carousel/Footer/variantDefault.d.ts.map +1 -1
  71. package/lib/components/layout/Carousel/index.d.ts.map +1 -1
  72. package/lib/components/layout/Drawer/index.d.ts.map +1 -1
  73. package/lib/components/layout/Flex/index.d.ts +1 -1
  74. package/lib/components/layout/Flex/index.d.ts.map +1 -1
  75. package/lib/components/layout/Grid/index.d.ts.map +1 -1
  76. package/lib/components/layout/List/VerticalTimeline/TimelineIndicator.d.ts +0 -3
  77. package/lib/components/layout/List/VerticalTimeline/TimelineIndicator.d.ts.map +1 -1
  78. package/lib/components/layout/List/VerticalTimeline/TimelineItem.d.ts.map +1 -1
  79. package/lib/components/layout/List/VerticalTimeline/index.d.ts.map +1 -1
  80. package/lib/components/layout/Popin/index.d.ts +26 -23
  81. package/lib/components/layout/Popin/index.d.ts.map +1 -1
  82. package/lib/components/layout/Side/Provider.d.ts.map +1 -1
  83. package/lib/components/layout/Side/index.d.ts.map +1 -1
  84. package/lib/components/message/Alert/index.d.ts +12 -10
  85. package/lib/components/message/Alert/index.d.ts.map +1 -1
  86. package/lib/components/message/ContinueOnDevice/index.d.ts.map +1 -1
  87. package/lib/components/message/Log/index.d.ts.map +1 -1
  88. package/lib/components/message/Notification/index.d.ts.map +1 -1
  89. package/lib/components/message/StatusNotification/index.d.ts.map +1 -1
  90. package/lib/components/message/Tooltip/styles.d.ts.map +1 -1
  91. package/lib/components/navigation/Aside/index.d.ts +1 -1
  92. package/lib/components/navigation/Breadcrumb/index.d.ts.map +1 -1
  93. package/lib/components/navigation/FlowStepper/index.d.ts +3 -6
  94. package/lib/components/navigation/FlowStepper/index.d.ts.map +1 -1
  95. package/lib/components/navigation/progress/ProgressBar/Onboarding.d.ts.map +1 -1
  96. package/lib/components/navigation/progress/Stepper/index.d.ts.map +1 -1
  97. package/lib/components/navigation/sideBar/Item/Item.d.ts.map +1 -1
  98. package/lib/components/navigation/sideBar/Logo/Logo.d.ts.map +1 -1
  99. package/lib/components/navigation/sideBar/SideBar/SideBar.d.ts +5 -4
  100. package/lib/components/navigation/sideBar/SideBar/SideBar.d.ts.map +1 -1
  101. package/lib/components/navigation/sideBar/Toggle/Toggle.d.ts.map +1 -1
  102. package/lib/components/navigation/sideBar/index.d.ts.map +1 -1
  103. package/lib/components/styled.d.ts.map +1 -1
  104. package/lib/components/transitions/TransitionInOut.d.ts.map +1 -1
  105. package/lib/components/transitions/TransitionScale.d.ts.map +1 -1
  106. package/lib/components/transitions/TransitionSlide.d.ts.map +1 -1
  107. package/lib/helpers.d.ts.map +1 -1
  108. package/lib/pre-ldls/components/AccountItem/AccountItem.d.ts.map +1 -1
  109. package/lib/pre-ldls/components/AccountList/AccountList.d.ts.map +1 -1
  110. package/lib/pre-ldls/components/Address/Address.d.ts.map +1 -1
  111. package/lib/pre-ldls/components/Address/formatAddress.d.ts.map +1 -1
  112. package/lib/pre-ldls/components/Address/formatAddress.js.map +1 -1
  113. package/lib/pre-ldls/components/CardButton/CardButton.d.ts.map +1 -1
  114. package/lib/pre-ldls/components/Checkbox/Checkbox.d.ts.map +1 -1
  115. package/lib/pre-ldls/components/Tag/Tag.d.ts.map +1 -1
  116. package/lib/pre-ldls/components/Tag/Tag.js +1 -1
  117. package/lib/pre-ldls/components/Tag/Tag.js.map +1 -1
  118. package/lib/pre-ldls/components/VirtualList/VirtualList.d.ts.map +1 -1
  119. package/lib/pre-ldls/libs/design-tokens.d.ts.map +1 -1
  120. package/lib/pre-ldls/libs/index.d.ts.map +1 -1
  121. package/lib/styles/InvertTheme.d.ts.map +1 -1
  122. package/lib/styles/StyleProvider.d.ts.map +1 -1
  123. package/lib/styles/helpers.d.ts.map +1 -1
  124. package/lib/styles/styled/fontFamily.d.ts +3 -3
  125. package/lib/styles/styled/fontFamily.d.ts.map +1 -1
  126. package/lib/styles/system/gaps.d.ts.map +1 -1
  127. package/lib/styles/theme.d.ts.map +1 -1
  128. package/package.json +14 -24
  129. package/lib/cjs/components/Table/Table.stories.js +0 -1985
  130. package/lib/cjs/components/Table/Table.stories.js.map +0 -1
  131. package/lib/cjs/components/Table/stories.helper.js +0 -1188
  132. package/lib/cjs/components/Table/stories.helper.js.map +0 -1
  133. package/lib/cjs/components/Tag/Tag.stories.js +0 -918
  134. package/lib/cjs/components/Tag/Tag.stories.js.map +0 -1
  135. package/lib/cjs/components/animations/GlitchText/GlitchText.stories.js +0 -905
  136. package/lib/cjs/components/animations/GlitchText/GlitchText.stories.js.map +0 -1
  137. package/lib/cjs/components/asorted/Divider/Divider.stories.js +0 -794
  138. package/lib/cjs/components/asorted/Divider/Divider.stories.js.map +0 -1
  139. package/lib/cjs/components/asorted/Icon/BoxedIcon.stories.js +0 -393
  140. package/lib/cjs/components/asorted/Icon/BoxedIcon.stories.js.map +0 -1
  141. package/lib/cjs/components/asorted/Icon/Icons.stories.js +0 -789
  142. package/lib/cjs/components/asorted/Icon/Icons.stories.js.map +0 -1
  143. package/lib/cjs/components/asorted/Icon/IconsLegacy.stories.js +0 -1472
  144. package/lib/cjs/components/asorted/Icon/IconsLegacy.stories.js.map +0 -1
  145. package/lib/cjs/components/asorted/Icon/NotificationIcon.stories.js +0 -348
  146. package/lib/cjs/components/asorted/Icon/NotificationIcon.stories.js.map +0 -1
  147. package/lib/cjs/components/asorted/Text/Text.stories.js +0 -836
  148. package/lib/cjs/components/asorted/Text/Text.stories.js.map +0 -1
  149. package/lib/cjs/components/cta/Button/Button.stories.js +0 -1286
  150. package/lib/cjs/components/cta/Button/Button.stories.js.map +0 -1
  151. package/lib/cjs/components/cta/Link/Link.stories.js +0 -911
  152. package/lib/cjs/components/cta/Link/Link.stories.js.map +0 -1
  153. package/lib/cjs/components/cta/Toggle/Toggle.stories.js +0 -873
  154. package/lib/cjs/components/cta/Toggle/Toggle.stories.js.map +0 -1
  155. package/lib/cjs/components/form/BaseInput/Input.stories.js +0 -1310
  156. package/lib/cjs/components/form/BaseInput/Input.stories.js.map +0 -1
  157. package/lib/cjs/components/form/Checkbox/Checkbox.stories.js +0 -909
  158. package/lib/cjs/components/form/Checkbox/Checkbox.stories.js.map +0 -1
  159. package/lib/cjs/components/form/Dropdown/Dropdown.stories.js +0 -1758
  160. package/lib/cjs/components/form/Dropdown/Dropdown.stories.js.map +0 -1
  161. package/lib/cjs/components/form/LegendInput/Input.stories.js +0 -1283
  162. package/lib/cjs/components/form/LegendInput/Input.stories.js.map +0 -1
  163. package/lib/cjs/components/form/NumberInput/Input.stories.js +0 -1341
  164. package/lib/cjs/components/form/NumberInput/Input.stories.js.map +0 -1
  165. package/lib/cjs/components/form/QrCodeInput/Input.stories.js +0 -1305
  166. package/lib/cjs/components/form/QrCodeInput/Input.stories.js.map +0 -1
  167. package/lib/cjs/components/form/QuantityInput/Input.stories.js +0 -1332
  168. package/lib/cjs/components/form/QuantityInput/Input.stories.js.map +0 -1
  169. package/lib/cjs/components/form/Radio/Radio.stories.js +0 -1196
  170. package/lib/cjs/components/form/Radio/Radio.stories.js.map +0 -1
  171. package/lib/cjs/components/form/Radio/RadioElement.stories.js +0 -1084
  172. package/lib/cjs/components/form/Radio/RadioElement.stories.js.map +0 -1
  173. package/lib/cjs/components/form/Radio/RadioListElement.stories.js +0 -1052
  174. package/lib/cjs/components/form/Radio/RadioListElement.stories.js.map +0 -1
  175. package/lib/cjs/components/form/SearchInput/Input.stories.js +0 -1278
  176. package/lib/cjs/components/form/SearchInput/Input.stories.js.map +0 -1
  177. package/lib/cjs/components/form/SelectInput/Select.stories.js +0 -2175
  178. package/lib/cjs/components/form/SelectInput/Select.stories.js.map +0 -1
  179. package/lib/cjs/components/form/SplitInput/SplitInput.stories.js +0 -2020
  180. package/lib/cjs/components/form/SplitInput/SplitInput.stories.js.map +0 -1
  181. package/lib/cjs/components/form/Switch/Switch.stories.js +0 -940
  182. package/lib/cjs/components/form/Switch/Switch.stories.js.map +0 -1
  183. package/lib/cjs/components/form/TabSelector/TabSelector.stories.js +0 -837
  184. package/lib/cjs/components/form/TabSelector/TabSelector.stories.js.map +0 -1
  185. package/lib/cjs/components/layout/Banner/BannerCard/BannerCard.stories.js +0 -1625
  186. package/lib/cjs/components/layout/Banner/BannerCard/BannerCard.stories.js.map +0 -1
  187. package/lib/cjs/components/layout/Banner/NotificationCard/NotificationCard.stories.js +0 -1110
  188. package/lib/cjs/components/layout/Banner/NotificationCard/NotificationCard.stories.js.map +0 -1
  189. package/lib/cjs/components/layout/Box/Box.stories.js +0 -221
  190. package/lib/cjs/components/layout/Box/Box.stories.js.map +0 -1
  191. package/lib/cjs/components/layout/Carousel/Carousel.stories.js +0 -2064
  192. package/lib/cjs/components/layout/Carousel/Carousel.stories.js.map +0 -1
  193. package/lib/cjs/components/layout/ContentCard/PortfolioContentCard/PortfolioContentCard.stories.js +0 -1514
  194. package/lib/cjs/components/layout/ContentCard/PortfolioContentCard/PortfolioContentCard.stories.js.map +0 -1
  195. package/lib/cjs/components/layout/Drawer/Drawer.stories.js +0 -1482
  196. package/lib/cjs/components/layout/Drawer/Drawer.stories.js.map +0 -1
  197. package/lib/cjs/components/layout/Flex/Flex.stories.js +0 -491
  198. package/lib/cjs/components/layout/Flex/Flex.stories.js.map +0 -1
  199. package/lib/cjs/components/layout/Grid/Grid.stories.js +0 -959
  200. package/lib/cjs/components/layout/Grid/Grid.stories.js.map +0 -1
  201. package/lib/cjs/components/layout/List/NumberedList/NumberedList.stories.js +0 -928
  202. package/lib/cjs/components/layout/List/NumberedList/NumberedList.stories.js.map +0 -1
  203. package/lib/cjs/components/layout/List/VerticalTimeline/VerticalTimeline.stories.js +0 -1884
  204. package/lib/cjs/components/layout/List/VerticalTimeline/VerticalTimeline.stories.js.map +0 -1
  205. package/lib/cjs/components/layout/Popin/Popin.stories.js +0 -1478
  206. package/lib/cjs/components/layout/Popin/Popin.stories.js.map +0 -1
  207. package/lib/cjs/components/layout/Side/Side.stories.js +0 -1623
  208. package/lib/cjs/components/layout/Side/Side.stories.js.map +0 -1
  209. package/lib/cjs/components/loaders/InfiniteLoader/InfiniteLoader.stories.js +0 -262
  210. package/lib/cjs/components/loaders/InfiniteLoader/InfiniteLoader.stories.js.map +0 -1
  211. package/lib/cjs/components/loaders/ProgressLoader/ProgressLoader.stories.js +0 -862
  212. package/lib/cjs/components/loaders/ProgressLoader/ProgressLoader.stories.js.map +0 -1
  213. package/lib/cjs/components/message/Alert/Alert.stories.js +0 -1345
  214. package/lib/cjs/components/message/Alert/Alert.stories.js.map +0 -1
  215. package/lib/cjs/components/message/ContinueOnDevice/ContinueOnDevice.stories.js +0 -854
  216. package/lib/cjs/components/message/ContinueOnDevice/ContinueOnDevice.stories.js.map +0 -1
  217. package/lib/cjs/components/message/Log/Log.stories.js +0 -839
  218. package/lib/cjs/components/message/Log/Log.stories.js.map +0 -1
  219. package/lib/cjs/components/message/Notification/Badge.stories.js +0 -319
  220. package/lib/cjs/components/message/Notification/Badge.stories.js.map +0 -1
  221. package/lib/cjs/components/message/Notification/Notification.stories.js +0 -1085
  222. package/lib/cjs/components/message/Notification/Notification.stories.js.map +0 -1
  223. package/lib/cjs/components/message/StatusNotification/StatusNotification.stories.js +0 -977
  224. package/lib/cjs/components/message/StatusNotification/StatusNotification.stories.js.map +0 -1
  225. package/lib/cjs/components/message/Tip/Tip.stories.js +0 -812
  226. package/lib/cjs/components/message/Tip/Tip.stories.js.map +0 -1
  227. package/lib/cjs/components/message/Tooltip/Tooltip.stories.js +0 -853
  228. package/lib/cjs/components/message/Tooltip/Tooltip.stories.js.map +0 -1
  229. package/lib/cjs/components/navigation/Aside/Aside.stories.js +0 -961
  230. package/lib/cjs/components/navigation/Aside/Aside.stories.js.map +0 -1
  231. package/lib/cjs/components/navigation/Aside/stories.helper.js +0 -48
  232. package/lib/cjs/components/navigation/Aside/stories.helper.js.map +0 -1
  233. package/lib/cjs/components/navigation/Breadcrumb/Breadcrumb.stories.js +0 -1953
  234. package/lib/cjs/components/navigation/Breadcrumb/Breadcrumb.stories.js.map +0 -1
  235. package/lib/cjs/components/navigation/FlowStepper/FlowStepper.stories.js +0 -2054
  236. package/lib/cjs/components/navigation/FlowStepper/FlowStepper.stories.js.map +0 -1
  237. package/lib/cjs/components/navigation/Header/Header.stories.js +0 -815
  238. package/lib/cjs/components/navigation/Header/Header.stories.js.map +0 -1
  239. package/lib/cjs/components/navigation/progress/ProgressBar/Onboarding.stories.js +0 -822
  240. package/lib/cjs/components/navigation/progress/ProgressBar/Onboarding.stories.js.map +0 -1
  241. package/lib/cjs/components/navigation/progress/Stepper/Item.stories.js +0 -907
  242. package/lib/cjs/components/navigation/progress/Stepper/Item.stories.js.map +0 -1
  243. package/lib/cjs/components/navigation/progress/Stepper/ProgressSteps.stories.js +0 -927
  244. package/lib/cjs/components/navigation/progress/Stepper/ProgressSteps.stories.js.map +0 -1
  245. package/lib/cjs/components/navigation/sideBar/Item/Item.stories.js +0 -1030
  246. package/lib/cjs/components/navigation/sideBar/Item/Item.stories.js.map +0 -1
  247. package/lib/cjs/components/navigation/sideBar/SideBar/SideBar.stories.js +0 -1318
  248. package/lib/cjs/components/navigation/sideBar/SideBar/SideBar.stories.js.map +0 -1
  249. package/lib/cjs/components/styled.stories.js +0 -200
  250. package/lib/cjs/components/styled.stories.js.map +0 -1
  251. package/lib/cjs/components/tabs/Bar/Bar.stories.js +0 -808
  252. package/lib/cjs/components/tabs/Bar/Bar.stories.js.map +0 -1
  253. package/lib/cjs/components/tabs/Chip/Chip.stories.js +0 -818
  254. package/lib/cjs/components/tabs/Chip/Chip.stories.js.map +0 -1
  255. package/lib/cjs/components/tabs/Pill/Pill.stories.js +0 -873
  256. package/lib/cjs/components/tabs/Pill/Pill.stories.js.map +0 -1
  257. package/lib/cjs/components/tabs/Tabs/Tabs.stories.js +0 -1061
  258. package/lib/cjs/components/tabs/Tabs/Tabs.stories.js.map +0 -1
  259. package/lib/cjs/pre-ldls/components/AccountItem/AccountItem.stories.js +0 -2372
  260. package/lib/cjs/pre-ldls/components/AccountItem/AccountItem.stories.js.map +0 -1
  261. package/lib/cjs/pre-ldls/components/AccountList/AccountList.stories.js +0 -2513
  262. package/lib/cjs/pre-ldls/components/AccountList/AccountList.stories.js.map +0 -1
  263. package/lib/cjs/pre-ldls/components/Address/Address.stories.js +0 -1873
  264. package/lib/cjs/pre-ldls/components/Address/Address.stories.js.map +0 -1
  265. package/lib/cjs/pre-ldls/components/CardButton/CardButton.stories.js +0 -1282
  266. package/lib/cjs/pre-ldls/components/CardButton/CardButton.stories.js.map +0 -1
  267. package/lib/cjs/pre-ldls/components/Checkbox/Checkbox.stories.js +0 -1263
  268. package/lib/cjs/pre-ldls/components/Checkbox/Checkbox.stories.js.map +0 -1
  269. package/lib/cjs/pre-ldls/components/Tag/Tag.stories.js +0 -1834
  270. package/lib/cjs/pre-ldls/components/Tag/Tag.stories.js.map +0 -1
  271. package/lib/cjs/pre-ldls/components/TextInput/TextInput.stories.js +0 -1498
  272. package/lib/cjs/pre-ldls/components/TextInput/TextInput.stories.js.map +0 -1
  273. package/lib/cjs/pre-ldls/components/VirtualList/VirtualList.stories.js +0 -606
  274. package/lib/cjs/pre-ldls/components/VirtualList/VirtualList.stories.js.map +0 -1
  275. package/lib/cjs/pre-ldls/components/sharedStoryBook.js +0 -1819
  276. package/lib/cjs/pre-ldls/components/sharedStoryBook.js.map +0 -1
  277. package/lib/cjs/styles/Spacing.stories.js +0 -759
  278. package/lib/cjs/styles/Spacing.stories.js.map +0 -1
  279. package/lib/cjs/styles/breakpoints.stories.js +0 -823
  280. package/lib/cjs/styles/breakpoints.stories.js.map +0 -1
  281. package/lib/cjs/styles/palettes/colors.stories.js +0 -785
  282. package/lib/cjs/styles/palettes/colors.stories.js.map +0 -1
  283. package/lib/components/Table/stories.helper.d.ts +0 -30
  284. package/lib/components/Table/stories.helper.d.ts.map +0 -1
  285. package/lib/components/Table/stories.helper.js +0 -185
  286. package/lib/components/Table/stories.helper.js.map +0 -1
  287. package/lib/components/navigation/Aside/stories.helper.d.ts +0 -3
  288. package/lib/components/navigation/Aside/stories.helper.d.ts.map +0 -1
  289. package/lib/components/navigation/Aside/stories.helper.js +0 -3
  290. package/lib/components/navigation/Aside/stories.helper.js.map +0 -1
  291. package/lib/pre-ldls/components/sharedStoryBook.d.ts +0 -5
  292. package/lib/pre-ldls/components/sharedStoryBook.d.ts.map +0 -1
  293. package/lib/pre-ldls/components/sharedStoryBook.js +0 -15
  294. package/lib/pre-ldls/components/sharedStoryBook.js.map +0 -1
@@ -1,2175 +0,0 @@
1
- (() => {
2
- "use strict";
3
- var __webpack_modules__ = ({
4
- 348(__unused_rspack_module, __webpack_exports__, __webpack_require__) {
5
- /* import */ var react__rspack_import_0 = __webpack_require__(2015);
6
- /* import */ var react__rspack_import_0_default = /*#__PURE__*/__webpack_require__.n(react__rspack_import_0);
7
- /* import */ var _styled__rspack_import_2 = __webpack_require__(7680);
8
- /* import */ var styled_system__rspack_import_1 = __webpack_require__(9351);
9
- /* import */ var styled_system__rspack_import_1_default = /*#__PURE__*/__webpack_require__.n(styled_system__rspack_import_1);
10
- /* import */ var _styles_styled_fontFamily__rspack_import_4 = __webpack_require__(3364);
11
- /* import */ var _styles__rspack_import_3 = __webpack_require__(4368);
12
-
13
-
14
-
15
-
16
-
17
- const uppercase = (0,styled_system__rspack_import_1.system)({
18
- uppercase: {
19
- property: "textTransform",
20
- transform: (value)=>value ? "uppercase" : "none"
21
- }
22
- });
23
- const Text = _styled__rspack_import_2["default"].span.attrs(({ variant = "body", fontSize, color })=>({
24
- fontSize: fontSize ? fontSize : variant,
25
- color: color || "neutral.c100"
26
- }))`
27
- font-weight: 500;
28
- white-space: ${(props)=>props.whiteSpace ?? "normal"};
29
- ${(p)=>_styles__rspack_import_3.textVariantStyle[p.variant || "body"]}
30
- ${(0,styled_system__rspack_import_1.compose)(uppercase, styled_system__rspack_import_1.lineHeight, _styles_styled_fontFamily__rspack_import_4["default"], styled_system__rspack_import_1.fontSize, styled_system__rspack_import_1.textAlign, styled_system__rspack_import_1.fontWeight, styled_system__rspack_import_1.letterSpacing, (0,styled_system__rspack_import_1.system)({
31
- textOverflow: true
32
- }))}
33
- ${(p)=>p.textTransform ? `text-transform: ${p.textTransform};` : ""}
34
- `;
35
- /* export default */ const __rspack_default_export = (Text);
36
-
37
- __webpack_require__.d(__webpack_exports__, {
38
- }, {
39
- "default": __rspack_default_export
40
- });
41
-
42
-
43
- },
44
- 4368(__unused_rspack_module, __webpack_exports__, __webpack_require__) {
45
- /* import */ var styled_components__rspack_import_0 = __webpack_require__(2770);
46
- /* import */ var styled_components__rspack_import_0_default = /*#__PURE__*/__webpack_require__.n(styled_components__rspack_import_0);
47
-
48
- const getFontSource = (name)=>(props)=>{
49
- const fontsPath = props.fontsPath ?? "assets/fonts";
50
- const fontName = props.fontMappings && props.fontMappings(name) || `${name}.woff2`;
51
- return `url("${fontsPath}/${fontName}") format("woff2")`;
52
- };
53
- const fontStyles = (0,styled_components__rspack_import_0.css)`
54
- @font-face {
55
- font-family: "Inter";
56
- src: ${getFontSource("Inter-ExtraLight-BETA")};
57
- font-weight: 100;
58
- font-style: normal;
59
- }
60
-
61
- @font-face {
62
- font-family: "Inter";
63
- src: ${getFontSource("Inter-Light-BETA")};
64
- font-weight: 300;
65
- font-style: normal;
66
- }
67
-
68
- @font-face {
69
- font-family: "Inter";
70
- src: ${getFontSource("Inter-Regular")};
71
- font-weight: 400;
72
- font-style: normal;
73
- }
74
-
75
- @font-face {
76
- font-family: "Inter";
77
- src: ${getFontSource("Inter-Medium")};
78
- font-weight: 500;
79
- font-style: normal;
80
- }
81
-
82
- @font-face {
83
- font-family: "Inter";
84
- src: ${getFontSource("Inter-SemiBold")};
85
- font-weight: 600;
86
- font-style: normal;
87
- }
88
-
89
- @font-face {
90
- font-family: "Inter";
91
- src: ${getFontSource("Inter-ExtraBold")};
92
- font-weight: 900;
93
- font-style: normal;
94
- }
95
-
96
- @font-face {
97
- font-family: "Alpha";
98
- src: ${getFontSource("HMAlphaMono-Medium")};
99
- font-weight: 500;
100
- font-style: normal;
101
- }
102
- `;
103
- const textVariantStyle = {
104
- h1: {
105
- fontFamily: "Alpha, Inter, Sans",
106
- fontWeight: 500,
107
- "text-transform": "uppercase"
108
- },
109
- h1Inter: {
110
- fontFamily: "Inter, Sans",
111
- fontWeight: 500,
112
- "text-transform": "uppercase"
113
- },
114
- h2: {
115
- fontFamily: "Alpha, Inter, Sans",
116
- fontWeight: 500,
117
- "text-transform": "uppercase"
118
- },
119
- h2Inter: {
120
- fontFamily: "Inter, Sans",
121
- fontWeight: 500,
122
- "text-transform": "uppercase"
123
- },
124
- h3: {
125
- fontFamily: "Alpha, Inter, Sans",
126
- fontWeight: 500,
127
- "text-transform": "uppercase"
128
- },
129
- h3Inter: {
130
- fontFamily: "Inter, Sans",
131
- fontWeight: 500
132
- },
133
- h4: {
134
- fontFamily: "Alpha, Inter, Sans",
135
- fontWeight: 500,
136
- "text-transform": "uppercase"
137
- },
138
- h4Inter: {
139
- fontFamily: "Inter, Sans",
140
- fontWeight: 600
141
- },
142
- h5: {
143
- fontFamily: "Alpha, Inter, Sans",
144
- fontWeight: 500,
145
- "text-transform": "uppercase"
146
- },
147
- h5Inter: {
148
- fontFamily: "Inter, Sans",
149
- fontWeight: 500
150
- },
151
- large: {
152
- fontFamily: "Inter, Sans"
153
- },
154
- largeLineHeight: {
155
- fontFamily: "Inter, Sans",
156
- lineHeight: 1.7
157
- },
158
- body: {
159
- fontFamily: "Inter, Sans"
160
- },
161
- bodyLineHeight: {
162
- fontFamily: "Inter, Sans",
163
- lineHeight: 1.7
164
- },
165
- paragraph: {
166
- fontFamily: "Inter, Sans"
167
- },
168
- paragraphLineHeight: {
169
- fontFamily: "Inter, Sans",
170
- lineHeight: 1.7
171
- },
172
- small: {
173
- fontFamily: "Inter, Sans"
174
- },
175
- extraSmall: {
176
- fontFamily: "Inter, Sans"
177
- },
178
- tiny: {
179
- fontFamily: "Inter, Sans"
180
- },
181
- micro: {
182
- fontFamily: "Inter, Sans"
183
- },
184
- subtitle: {
185
- fontFamily: "Inter, Sans",
186
- fontWeight: 600,
187
- "text-transform": "uppercase"
188
- }
189
- };
190
-
191
- __webpack_require__.d(__webpack_exports__, {
192
- }, {
193
- textVariantStyle: textVariantStyle
194
- });
195
-
196
-
197
- },
198
- 6599(__unused_rspack_module, __webpack_exports__, __webpack_require__) {
199
-
200
- // EXPORTS
201
- __webpack_require__.d(__webpack_exports__, {
202
- ButtonUnstyled: () => (/* binding */ ButtonUnstyled)
203
- });
204
-
205
- // UNUSED EXPORTS: Base, ButtonExpand, buttonSizeStyle, default
206
-
207
- ;// CONCATENATED MODULE: external "@ledgerhq/icons-ui/reactLegacy/ChevronBottomMedium"
208
- const ChevronBottomMedium_namespaceObject = require("@ledgerhq/icons-ui/reactLegacy/ChevronBottomMedium");
209
- var ChevronBottomMedium_default = /*#__PURE__*/__webpack_require__.n(ChevronBottomMedium_namespaceObject);
210
- // EXTERNAL MODULE: external "react"
211
- var external_react_ = __webpack_require__(2015);
212
- var external_react_default = /*#__PURE__*/__webpack_require__.n(external_react_);
213
- // EXTERNAL MODULE: external "styled-components"
214
- var external_styled_components_ = __webpack_require__(2770);
215
- var external_styled_components_default = /*#__PURE__*/__webpack_require__.n(external_styled_components_);
216
- // EXTERNAL MODULE: external "styled-system"
217
- var external_styled_system_ = __webpack_require__(9351);
218
- // EXTERNAL MODULE: ./src/styles/helpers.ts + 1 modules
219
- var helpers = __webpack_require__(205);
220
- // EXTERNAL MODULE: ./src/styles/styled/fontFamily.ts
221
- var fontFamily = __webpack_require__(3364);
222
- // EXTERNAL MODULE: ./src/styles/theme.ts
223
- var theme = __webpack_require__(5548);
224
- // EXTERNAL MODULE: ./src/components/styled.ts
225
- var styled = __webpack_require__(7680);
226
- ;// CONCATENATED MODULE: ./src/components/cta/Button/index.tsx
227
-
228
-
229
-
230
-
231
-
232
-
233
-
234
-
235
- const IconContainer = (external_styled_components_default()).div`
236
- display: inline-block;
237
- ${(p)=>`${p.iconPosition === "left" ? "margin-right" : "margin-left"}: ${p.theme.space[4]}px;`}
238
- padding-top: 0.2em;
239
- `;
240
- const getVariantColors = (p)=>({
241
- main: {
242
- outline: `
243
- border-color: ${p.theme.colors.neutral.c100};
244
- color: ${p.theme.colors.neutral.c100};
245
- background-color: transparent;
246
- &:hover, &:focus {
247
- background-color: ${(0,helpers.rgba)(p.theme.colors.neutral.c100, 0.03)};
248
- }
249
- &:active {
250
- background-color: ${(0,helpers.rgba)(p.theme.colors.neutral.c100, 0.05)};
251
- }
252
- `,
253
- filled: `
254
- color: ${p.theme.colors.neutral.c00};
255
- background-color: ${p.theme.colors.neutral.c100};
256
- &:hover, &:focus {
257
- background-color: ${p.theme.colors.neutral.c90};
258
- }
259
- `
260
- },
261
- shade: `
262
- border-color: ${p.theme.colors.neutral.c40};
263
- color: ${p.theme.colors.neutral.c100};
264
- &:focus {
265
- border-color: ${p.theme.colors.primary.c80};
266
- }
267
-
268
- &:hover, &:focus {
269
- background-color: ${p.theme.colors.neutral.c20};
270
- }
271
-
272
- &:active {
273
- background-color: ${p.theme.colors.neutral.c30};
274
- }
275
- `,
276
- error: {
277
- outline: `
278
- border-color: ${p.theme.colors.error.c50};
279
- color: ${p.theme.colors.error.c50};
280
- background-color: transparent;
281
- &:hover {
282
- background-color: ${(0,helpers.rgba)(p.theme.colors.error.c50, 0.02)};
283
- }
284
- &:active {
285
- background-color: ${(0,helpers.rgba)(p.theme.colors.error.c50, 0.05)};
286
- }
287
- `,
288
- filled: `
289
- color: ${p.theme.colors.neutral.c00};
290
- background-color: ${p.theme.colors.error.c50};
291
- &:hover {
292
- background-color: ${p.theme.colors.error.c40};
293
- }
294
- `
295
- },
296
- neutral: `
297
- color: ${p.theme.colors.neutral.c100};
298
- background-color: ${p.theme.colors.neutral.c30};
299
- &:hover {
300
- background-color: ${p.theme.colors.neutral.c40};
301
- }
302
- `,
303
- color: {
304
- outline: `
305
- border-color: ${p.theme.colors.primary.c80};
306
- color: ${p.theme.colors.primary.c80};
307
- background-color: transparent;
308
- &:hover {
309
- background-color: ${(0,helpers.rgba)(p.theme.colors.primary.c100, 0.02)};
310
- }
311
- &:active {
312
- background-color: ${(0,helpers.rgba)(p.theme.colors.primary.c100, 0.05)};
313
- }
314
- `,
315
- filled: `
316
- color: ${p.theme.colors.neutral.c00};
317
- background-color: ${p.theme.colors.primary.c80};
318
- &:hover {
319
- background-color: ${p.theme.colors.primary.c70};
320
- }
321
- `
322
- },
323
- disabled: {
324
- outline: `
325
- border-color: ${p.theme.colors.neutral.c50};
326
- color: ${p.theme.colors.neutral.c50};
327
- background-color: transparent;
328
- &:focus, &:hover {
329
- box-shadow: none;
330
- }
331
- `,
332
- filled: `
333
- color: ${p.theme.colors.neutral.c50};
334
- background-color: ${p.theme.colors.neutral.c30};
335
- &:focus, &:hover {
336
- box-shadow: none;
337
- }
338
- `
339
- },
340
- default: `
341
- color: ${p.theme.colors.neutral.c100};
342
- background-color: transparent;
343
- &:hover {
344
- text-decoration: underline;
345
- }
346
- `
347
- });
348
- const ButtonUnstyled = styled["default"].button`
349
- all: unset;
350
- cursor: pointer;
351
-
352
- &:disabled {
353
- cursor: default;
354
- }
355
- `;
356
- const Base = styled["default"].button.attrs((p)=>({
357
- fontFamily: "Inter",
358
- fontSize: p.fontSize ?? 4
359
- }))`
360
- background-color: transparent;
361
- border-color: transparent;
362
- border-radius: 44px;
363
- border-style: solid;
364
- border-width: ${(p)=>p.outline || p.variant === "shade" ? 1 : 0}px;
365
- font-weight: 600;
366
- ${(0,external_styled_system_.compose)(fontFamily["default"], external_styled_system_.fontSize, external_styled_system_.border)};
367
- line-height: ${(p)=>p.theme.fontSizes[p.fontSize]}px;
368
- text-align: center;
369
- display: inline-flex;
370
- align-items: center;
371
- justify-content: center;
372
- overflow: hidden;
373
- ${(p)=>buttonSizeStyle[p.size || "medium"]}
374
- text-overflow: ellipsis;
375
- white-space: ${(p)=>p.whiteSpace ? p.whiteSpace : "nowrap"};
376
- max-width: 100%;
377
- position: relative;
378
- cursor: ${(p)=>p.disabled ? "default" : "pointer"};
379
- &:active {
380
- box-shadow: 0 0 0 4px ${(p)=>(0,helpers.rgba)(p.theme.colors.primary.c60, 0.4)};
381
- }
382
- &:focus, &:hover {
383
- box-shadow: 0 0 0 2px ${(p)=>(0,helpers.rgba)(p.theme.colors.primary.c60, 0.4)};
384
- }
385
-
386
- ${(p)=>{
387
- const variants = getVariantColors(p);
388
- if (p.disabled) {
389
- return p.outline || p.variant === "shade" ? variants.disabled.outline : variants.disabled.filled;
390
- }
391
- const variant = p.variant ?? "default";
392
- switch(variant){
393
- case "main":
394
- return p.outline ? variants.main.outline : variants.main.filled;
395
- case "shade":
396
- return variants.shade;
397
- case "error":
398
- return p.outline ? variants.error.outline : variants.error.filled;
399
- case "color":
400
- return p.outline ? variants.color.outline : variants.color.filled;
401
- case "neutral":
402
- return variants.neutral;
403
- case "default":
404
- default:
405
- return variants.default;
406
- }
407
- }}
408
- ${(p)=>p.iconButton ? (0,external_styled_components_.css)`
409
- width: ${p.theme.space[12]}px;
410
- padding: 0;
411
- ${IconContainer} {
412
- margin: 0;
413
- }
414
- ` : ""}
415
- ${(p)=>p.theme.transition([
416
- "background-color",
417
- "color",
418
- "border-color",
419
- "box-shadow"
420
- ], "0.2s")}
421
- `;
422
- const ContentContainer = (external_styled_components_default()).div``;
423
- const Button = ({ Icon, iconPosition = "right", iconSize = 16, children, onClick, ...props }, ref)=>{
424
- const iconNodeSize = iconSize || theme.fontSizes[props.fontSize ?? 4];
425
- const IconNode = (0,external_react_.useMemo)(()=>{
426
- if (!Icon) return null;
427
- if (typeof Icon === "object") return Icon;
428
- return /*#__PURE__*/ external_react_default().createElement(Icon, {
429
- size: iconNodeSize
430
- });
431
- }, [
432
- iconNodeSize,
433
- Icon
434
- ]);
435
- return /*#__PURE__*/ external_react_default().createElement(Base, {
436
- ...props,
437
- ref: ref,
438
- iconButton: !(Icon == null) && !children,
439
- onClick: onClick
440
- }, iconPosition === "right" ? /*#__PURE__*/ external_react_default().createElement(ContentContainer, null, children) : null, IconNode && /*#__PURE__*/ external_react_default().createElement(IconContainer, {
441
- iconPosition: iconPosition
442
- }, IconNode), iconPosition === "left" ? /*#__PURE__*/ external_react_default().createElement(ContentContainer, null, children) : null);
443
- };
444
- const ButtonWithRef = /*#__PURE__*/ external_react_default().forwardRef(Button);
445
- const StyledButtonExpand = external_styled_components_default()(ButtonWithRef).attrs((props)=>({
446
- Icon: props.Icon != null || (ChevronBottomMedium_default()),
447
- iconPosition: props.iconPosition || "right"
448
- }))`
449
- ${IconContainer} {
450
- transition: transform 0.25s;
451
- ${(p)=>p.expanded ? "transform: rotate(180deg)" : ""}
452
- }
453
- `;
454
- function ButtonExpand({ onToggle, onClick, ...props }, ref) {
455
- const [expanded, setExpanded] = (0,external_react_.useState)(false);
456
- return /*#__PURE__*/ external_react_default().createElement(StyledButtonExpand, {
457
- ...props,
458
- ref: ref,
459
- expanded: expanded,
460
- onClick: (event)=>{
461
- setExpanded((expanded)=>!expanded);
462
- onToggle != null && onToggle(!expanded);
463
- onClick != null && onClick(event);
464
- }
465
- });
466
- }
467
- const buttonSizeStyle = {
468
- xs: {
469
- padding: "0 12px",
470
- height: "28px"
471
- },
472
- small: {
473
- padding: "0 20px",
474
- height: "32px"
475
- },
476
- medium: {
477
- padding: "0 24px",
478
- height: "40px"
479
- },
480
- large: {
481
- padding: "0 28px",
482
- height: "48px"
483
- },
484
- xl: {
485
- padding: "0 28px",
486
- height: "56px"
487
- }
488
- };
489
- Button.Unstyled = ButtonUnstyled;
490
- Button.Expand = /*#__PURE__*/ external_react_default().forwardRef(ButtonExpand);
491
- ButtonWithRef.Unstyled = Button.Unstyled;
492
- ButtonWithRef.Expand = Button.Expand;
493
- /* export default */ const cta_Button = ((/* unused pure expression or super */ null && (ButtonWithRef)));
494
-
495
-
496
- },
497
- 3770(__unused_rspack_module, __webpack_exports__, __webpack_require__) {
498
-
499
- // EXPORTS
500
- __webpack_require__.d(__webpack_exports__, {
501
- InputContainer: () => (/* binding */ InputContainer),
502
- InputErrorContainer: () => (/* binding */ InputErrorContainer)
503
- });
504
-
505
- // UNUSED EXPORTS: BaseInput, ClearableButtonUnstyled, InputInfoContainer, InputRenderLeftContainer, InputRenderRightContainer, InputWarningContainer, default
506
-
507
- // EXTERNAL MODULE: external "styled-components"
508
- var external_styled_components_ = __webpack_require__(2770);
509
- var external_styled_components_default = /*#__PURE__*/__webpack_require__.n(external_styled_components_);
510
- // EXTERNAL MODULE: external "styled-system"
511
- var external_styled_system_ = __webpack_require__(9351);
512
- // EXTERNAL MODULE: external "react"
513
- var external_react_ = __webpack_require__(2015);
514
- ;// CONCATENATED MODULE: external "@ledgerhq/icons-ui/reactLegacy/CircledCrossSolidMedium"
515
- const CircledCrossSolidMedium_namespaceObject = require("@ledgerhq/icons-ui/reactLegacy/CircledCrossSolidMedium");
516
- // EXTERNAL MODULE: ./src/components/layout/Flex/index.ts
517
- var Flex = __webpack_require__(3696);
518
- // EXTERNAL MODULE: ./src/components/asorted/Text/index.tsx
519
- var Text = __webpack_require__(348);
520
- // EXTERNAL MODULE: ./src/styles/helpers.ts + 1 modules
521
- var helpers = __webpack_require__(205);
522
- // EXTERNAL MODULE: ./src/components/cta/Button/index.tsx + 1 modules
523
- var Button = __webpack_require__(6599);
524
- ;// CONCATENATED MODULE: ./src/components/form/BaseInput/index.tsx
525
-
526
-
527
-
528
-
529
-
530
-
531
-
532
-
533
- const InputContainer = (external_styled_components_default()).div`
534
- display: flex;
535
- height: 48px;
536
- border: ${(p)=>`1px solid ${p.theme.colors.neutral.c40}`};
537
- border-radius: 24px;
538
- transition: all 0.2s ease;
539
- color: ${(p)=>p.theme.colors.neutral.c100};
540
-
541
- ${(p)=>p.focus && !p.error && !p.warning ? (0,external_styled_components_.css)`
542
- border: 1px solid ${p.theme.colors.primary.c80};
543
- box-shadow: 0 0 0 4px ${(0,helpers.rgba)(p.theme.colors.primary.c60, 0.4)};
544
- ` : undefined};
545
-
546
- ${(p)=>p.error && !p.disabled ? (0,external_styled_components_.css)`
547
- border: 1px solid ${p.theme.colors.error.c50};
548
- ` : undefined};
549
-
550
- ${(p)=>!p.error && p.warning && !p.disabled ? (0,external_styled_components_.css)`
551
- border: 1px solid ${p.theme.colors.warning.c40};
552
- ` : undefined};
553
-
554
- ${(p)=>!p.error && !p.warning && !p.disabled ? (0,external_styled_components_.css)`
555
- &:hover {
556
- border: ${!p.disabled && `1px solid ${p.theme.colors.primary.c80}`};
557
- }
558
- ` : undefined};
559
-
560
- ${(p)=>p.disabled ? (0,external_styled_components_.css)`
561
- color: ${p.theme.colors.neutral.c60};
562
- background: ${(p)=>p.theme.colors.neutral.c20};
563
- ` : undefined};
564
- `;
565
- const BaseInput = external_styled_components_default().input.attrs({
566
- fontSize: "paragraph",
567
- fontWeight: "medium"
568
- })`
569
- height: 100%;
570
- width: 100%;
571
- border: 0;
572
- caret-color: ${(p)=>p.error ? p.theme.colors.error.c50 : p.theme.colors.primary.c80};
573
- background: none;
574
- outline: none;
575
- cursor: ${(p)=>p.disabled ? "not-allowed" : "text"};
576
- flex-shrink: 1;
577
- padding-left: 20px;
578
- padding-right: 20px;
579
- &::placeholder {
580
- color: ${(p)=>p.disabled ? p.theme.colors.neutral.c50 : p.theme.colors.neutral.c70};
581
- }
582
-
583
- /* stylelint-disable property-no-vendor-prefix */
584
-
585
- /* Hide type=number arrow for Chrome, Safari, Edge, Opera */
586
- &::-webkit-outer-spin-button,
587
- ::-webkit-inner-spin-button {
588
- -webkit-appearance: none;
589
- margin: 0;
590
- }
591
-
592
- /* Hide type=number arrow for Firefox */
593
- &[type="number"] {
594
- -moz-appearance: textfield;
595
- }
596
- /* stylelint-enable property-no-vendor-prefix */
597
-
598
- ${external_styled_system_.typography}
599
- `;
600
- const InputErrorContainer = external_styled_components_default()((0,Text["default"]))`
601
- color: ${(p)=>p.theme.colors.error.c50};
602
- margin-left: 12px;
603
- `;
604
- const InputWarningContainer = external_styled_components_default()((0,Text["default"]))`
605
- color: ${(p)=>p.theme.colors.warning.c40};
606
- margin-left: 12px;
607
- `;
608
- const InputInfoContainer = external_styled_components_default()((0,Text["default"]))`
609
- color: ${(p)=>p.theme.colors.neutral.c60};
610
- margin-left: 12px;
611
- `;
612
- const InputRenderLeftContainer = external_styled_components_default()((0,Flex["default"])).attrs(()=>({
613
- alignItems: "center",
614
- pl: "16px"
615
- }))``;
616
- const InputRenderRightContainer = external_styled_components_default()((0,Flex["default"])).attrs(()=>({
617
- alignItems: "center",
618
- pr: "16px"
619
- }))``;
620
- const ClearableButtonUnstyled = external_styled_components_default()((0,Button.ButtonUnstyled))`
621
- display: flex;
622
- `;
623
- // Yes, this is dirty. If you can figure out a better way please change the code :).
624
- // oxlint-disable-next-line typescript/no-explicit-any
625
- const IDENTITY = (_)=>_;
626
- function Input(props, ref) {
627
- const { colors } = useTheme();
628
- const { value, disabled, error, warning, info, onChange, onChangeEvent, renderLeft, renderRight, unwrapped, containerProps, serialize = IDENTITY, deserialize = IDENTITY, clearable, ...htmlInputProps } = props;
629
- const [focus, setFocus] = useState(false);
630
- const inputValue = useMemo(()=>serialize(value), [
631
- serialize,
632
- value
633
- ]);
634
- const handleChange = useCallback((e)=>{
635
- onChange && onChange(deserialize(e.target.value));
636
- onChangeEvent && onChangeEvent(e);
637
- }, [
638
- onChange,
639
- onChangeEvent,
640
- deserialize
641
- ]);
642
- const handleClear = useCallback(()=>{
643
- onChange && onChange(deserialize(""));
644
- }, [
645
- onChange,
646
- deserialize
647
- ]);
648
- const inner = /*#__PURE__*/ React.createElement(React.Fragment, null, typeof renderLeft === "function" ? renderLeft(props) : renderLeft, /*#__PURE__*/ React.createElement(BaseInput, {
649
- ref: ref,
650
- ...htmlInputProps,
651
- disabled: disabled,
652
- error: error,
653
- warning: warning,
654
- info: info,
655
- onChange: handleChange,
656
- value: inputValue,
657
- onFocus: (event)=>{
658
- setFocus(true);
659
- htmlInputProps.onFocus && htmlInputProps.onFocus(event);
660
- },
661
- onBlur: (event)=>{
662
- setFocus(false);
663
- htmlInputProps.onBlur && htmlInputProps.onBlur(event);
664
- }
665
- }), clearable && inputValue && /*#__PURE__*/ React.createElement(FlexBox, {
666
- alignItems: "center",
667
- mr: 7
668
- }, /*#__PURE__*/ React.createElement(ClearableButtonUnstyled, {
669
- onClick: handleClear
670
- }, /*#__PURE__*/ React.createElement(CircledCrossSolidMedium, {
671
- size: 18,
672
- color: colors.neutral.c50
673
- }))), typeof renderRight === "function" ? renderRight(props) : renderRight);
674
- if (unwrapped) {
675
- return /*#__PURE__*/ React.createElement(FlexBox, {
676
- alignItems: "stretch",
677
- style: {
678
- height: "100%"
679
- }
680
- }, inner);
681
- }
682
- return /*#__PURE__*/ React.createElement("div", null, /*#__PURE__*/ React.createElement(InputContainer, {
683
- disabled: disabled,
684
- focus: focus,
685
- error: error,
686
- warning: warning,
687
- ...containerProps
688
- }, inner), (error || warning || info) && !disabled && /*#__PURE__*/ React.createElement(FlexBox, {
689
- flexDirection: "column",
690
- rowGap: 2,
691
- mt: 2
692
- }, error ? /*#__PURE__*/ React.createElement(InputErrorContainer, {
693
- variant: "small"
694
- }, error) : warning ? /*#__PURE__*/ React.createElement(InputWarningContainer, {
695
- variant: "small"
696
- }, warning) : info ? /*#__PURE__*/ React.createElement(InputInfoContainer, {
697
- variant: "small"
698
- }, info) : null));
699
- }
700
- /* export default */ const form_BaseInput = (/*#__PURE__*/(/* unused pure expression or super */ null && (React.forwardRef(Input))));
701
-
702
-
703
- },
704
- 268(__unused_rspack_module, __webpack_exports__, __webpack_require__) {
705
- /* import */ var react__rspack_import_0 = __webpack_require__(2015);
706
- /* import */ var react__rspack_import_0_default = /*#__PURE__*/__webpack_require__.n(react__rspack_import_0);
707
- /* import */ var react_select__rspack_import_1 = __webpack_require__(8466);
708
- /* import */ var react_select__rspack_import_1_default = /*#__PURE__*/__webpack_require__.n(react_select__rspack_import_1);
709
- /* import */ var _BaseInput__rspack_import_2 = __webpack_require__(3770);
710
-
711
-
712
-
713
- function getStyles(theme) {
714
- return (provided)=>({
715
- ...provided,
716
- display: "flex",
717
- alignItems: "center",
718
- width: "100%",
719
- border: 0,
720
- padding: `0px ${theme.space[7]}px`,
721
- boxShadow: "none",
722
- borderRadius: "inherit",
723
- background: "transparent"
724
- });
725
- }
726
- function Control(props) {
727
- const { isFocused, selectProps, children } = props;
728
- const { isDisabled, error, renderLeft } = selectProps;
729
- return /*#__PURE__*/ react__rspack_import_0_default().createElement(_BaseInput__rspack_import_2.InputContainer, {
730
- disabled: isDisabled,
731
- error: error,
732
- focus: isFocused
733
- }, /*#__PURE__*/ react__rspack_import_0_default().createElement(react_select__rspack_import_1.components.Control, props, renderLeft ? renderLeft(props) : null, children));
734
- }
735
-
736
- __webpack_require__.d(__webpack_exports__, {
737
- Control: () => (Control),
738
- getStyles: () => (getStyles)
739
- });
740
-
741
-
742
- },
743
- 7621(__unused_rspack_module, __webpack_exports__, __webpack_require__) {
744
- /* import */ var react__rspack_import_0 = __webpack_require__(2015);
745
- /* import */ var react__rspack_import_0_default = /*#__PURE__*/__webpack_require__.n(react__rspack_import_0);
746
- /* import */ var react_select__rspack_import_1 = __webpack_require__(8466);
747
- /* import */ var react_select__rspack_import_1_default = /*#__PURE__*/__webpack_require__.n(react_select__rspack_import_1);
748
- /* import */ var styled_components__rspack_import_2 = __webpack_require__(2770);
749
- /* import */ var styled_components__rspack_import_2_default = /*#__PURE__*/__webpack_require__.n(styled_components__rspack_import_2);
750
- /* import */ var _asorted_Text__rspack_import_4 = __webpack_require__(348);
751
- /* import */ var _ledgerhq_icons_ui_reactLegacy__rspack_import_3 = __webpack_require__(9979);
752
- /* import */ var _ledgerhq_icons_ui_reactLegacy__rspack_import_3_default = /*#__PURE__*/__webpack_require__.n(_ledgerhq_icons_ui_reactLegacy__rspack_import_3);
753
-
754
-
755
-
756
-
757
-
758
- function getStyles() {
759
- return (provided)=>({
760
- ...provided,
761
- padding: 0
762
- });
763
- }
764
- function DropdownIndicator(props) {
765
- const theme = (0,styled_components__rspack_import_2.useTheme)();
766
- const { isDisabled } = props.selectProps;
767
- const ChevronIcon = props.selectProps.menuIsOpen ? _ledgerhq_icons_ui_reactLegacy__rspack_import_3.ChevronTopMedium : _ledgerhq_icons_ui_reactLegacy__rspack_import_3.ChevronBottomMedium;
768
- const color = isDisabled ? theme.colors.neutral.c60 : theme.colors.neutral.c100;
769
- return /*#__PURE__*/ react__rspack_import_0_default().createElement(react_select__rspack_import_1.components.DropdownIndicator, props, /*#__PURE__*/ react__rspack_import_0_default().createElement(_asorted_Text__rspack_import_4["default"], {
770
- as: "div",
771
- color: color,
772
- style: {
773
- display: "flex"
774
- }
775
- }, /*#__PURE__*/ react__rspack_import_0_default().createElement(ChevronIcon, {
776
- size: 12
777
- })));
778
- }
779
-
780
- __webpack_require__.d(__webpack_exports__, {
781
- DropdownIndicator: () => (DropdownIndicator),
782
- getStyles: () => (getStyles)
783
- });
784
-
785
-
786
- },
787
- 8396(__unused_rspack_module, __webpack_exports__, __webpack_require__) {
788
- /* import */ var react__rspack_import_0 = __webpack_require__(2015);
789
- /* import */ var react__rspack_import_0_default = /*#__PURE__*/__webpack_require__.n(react__rspack_import_0);
790
- /* import */ var react_select__rspack_import_1 = __webpack_require__(8466);
791
- /* import */ var react_select__rspack_import_1_default = /*#__PURE__*/__webpack_require__.n(react_select__rspack_import_1);
792
- /* import */ var _layout_Flex__rspack_import_2 = __webpack_require__(3696);
793
-
794
-
795
-
796
- function IndicatorsContainer(props) {
797
- const { renderRight } = props.selectProps;
798
- return /*#__PURE__*/ react__rspack_import_0_default().createElement(_layout_Flex__rspack_import_2["default"], {
799
- alignItems: "center"
800
- }, renderRight ? renderRight(props) : null, /*#__PURE__*/ react__rspack_import_0_default().createElement(react_select__rspack_import_1.components.IndicatorsContainer, props));
801
- }
802
-
803
- __webpack_require__.d(__webpack_exports__, {
804
- IndicatorsContainer: () => (IndicatorsContainer)
805
- });
806
-
807
-
808
- },
809
- 9082(__unused_rspack_module, __webpack_exports__, __webpack_require__) {
810
- /* import */ var react__rspack_import_0 = __webpack_require__(2015);
811
- /* import */ var react__rspack_import_0_default = /*#__PURE__*/__webpack_require__.n(react__rspack_import_0);
812
- /* import */ var react_select__rspack_import_1 = __webpack_require__(8466);
813
- /* import */ var react_select__rspack_import_1_default = /*#__PURE__*/__webpack_require__.n(react_select__rspack_import_1);
814
-
815
-
816
- function getStyles(theme) {
817
- const isLight = theme.colors.type === "light";
818
- return (provided)=>({
819
- ...provided,
820
- display: "flex",
821
- flexDirection: "column",
822
- gap: theme.space[2],
823
- padding: theme.space[3],
824
- border: `1px solid ${theme.colors.neutral[isLight ? "c20" : "c30"]}`,
825
- borderRadius: "8px",
826
- boxShadow: `0px 6px 12px rgba(0, 0, 0, ${isLight ? 0.04 : 0.08})`,
827
- background: theme.colors.neutral[isLight ? "c00" : "c20"],
828
- color: theme.colors.neutral.c80
829
- });
830
- }
831
- function MenuList(props) {
832
- return /*#__PURE__*/ react__rspack_import_0_default().createElement(react_select__rspack_import_1.components.MenuList, props, props.children);
833
- }
834
-
835
- __webpack_require__.d(__webpack_exports__, {
836
- MenuList: () => (MenuList),
837
- getStyles: () => (getStyles)
838
- });
839
-
840
-
841
- },
842
- 4216(__unused_rspack_module, __webpack_exports__, __webpack_require__) {
843
- /* import */ var react__rspack_import_0 = __webpack_require__(2015);
844
- /* import */ var react__rspack_import_0_default = /*#__PURE__*/__webpack_require__.n(react__rspack_import_0);
845
- /* import */ var react_select__rspack_import_1 = __webpack_require__(8466);
846
- /* import */ var react_select__rspack_import_1_default = /*#__PURE__*/__webpack_require__.n(react_select__rspack_import_1);
847
- /* import */ var styled_components__rspack_import_2 = __webpack_require__(2770);
848
- /* import */ var styled_components__rspack_import_2_default = /*#__PURE__*/__webpack_require__.n(styled_components__rspack_import_2);
849
- /* import */ var _asorted_Text__rspack_import_3 = __webpack_require__(348);
850
-
851
-
852
-
853
-
854
- function getStyles() {
855
- return (provided)=>({
856
- ...provided,
857
- display: "flex",
858
- alignItems: "center",
859
- padding: 0,
860
- cursor: "inherit",
861
- background: "inherit",
862
- color: "inherit",
863
- boxShadow: "none",
864
- border: "none",
865
- ":active": undefined
866
- });
867
- }
868
- const Wrapper = styled_components__rspack_import_2_default()((0,_asorted_Text__rspack_import_3["default"])).attrs({
869
- as: "div"
870
- })`
871
- height: 48px;
872
- display: flex;
873
- padding: 0 ${(p)=>p.theme.space[5]}px;
874
- border-radius: ${(p)=>`${p.theme.radii[1]}px`};
875
- ${(p)=>!p.disabled ? "cursor: pointer;" : ""}
876
- ${(props)=>{
877
- const { theme, selected, focus, disabled } = props;
878
- if (selected) {
879
- return `
880
- color: ${theme.colors.primary.c90};
881
- background: ${theme.colors.primary.c20};
882
- `;
883
- }
884
- if (disabled) {
885
- return `
886
- color: ${theme.colors.neutral.c50};
887
- ${focus ? `&:not(:active) {
888
- background: ${theme.colors.neutral.c20};
889
- }` : ""}
890
- `;
891
- }
892
- return `
893
- color: ${theme.colors.neutral.c80};
894
- &:hover {
895
- color: ${theme.colors.neutral.c100};
896
- background: ${theme.colors.primary.c10};
897
- }
898
- &:active {
899
- color: ${theme.colors.neutral.c100};
900
- background: ${theme.colors.primary.c30};
901
- }
902
- ${focus ? `&:not(:active) {
903
- color: ${theme.colors.neutral.c100};
904
- background: ${theme.colors.primary.c10};
905
- }` : ""}
906
- `;
907
- }};
908
- `;
909
- function Option(props) {
910
- const { render, children, ...innerProps } = props;
911
- return /*#__PURE__*/ react__rspack_import_0_default().createElement(Wrapper, {
912
- disabled: props.isDisabled,
913
- selected: props.isSelected,
914
- focus: props.isFocused,
915
- fontWeight: "semiBold",
916
- variant: "paragraph"
917
- }, /*#__PURE__*/ react__rspack_import_0_default().createElement(react_select__rspack_import_1.components.Option, innerProps, render ? render(props) : children));
918
- }
919
-
920
- __webpack_require__.d(__webpack_exports__, {
921
- Option: () => (Option),
922
- getStyles: () => (getStyles)
923
- });
924
-
925
-
926
- },
927
- 4711(__unused_rspack_module, __webpack_exports__, __webpack_require__) {
928
- /* import */ var react__rspack_import_0 = __webpack_require__(2015);
929
- /* import */ var react__rspack_import_0_default = /*#__PURE__*/__webpack_require__.n(react__rspack_import_0);
930
- /* import */ var react_select__rspack_import_1 = __webpack_require__(8466);
931
- /* import */ var react_select__rspack_import_1_default = /*#__PURE__*/__webpack_require__.n(react_select__rspack_import_1);
932
- /* import */ var _asorted_Text__rspack_import_2 = __webpack_require__(348);
933
-
934
-
935
-
936
- function getStyles() {
937
- return (provided)=>({
938
- ...provided,
939
- padding: 0
940
- });
941
- }
942
- function ValueContainer(props) {
943
- const color = props.selectProps.isDisabled ? "neutral.c60" : "neutral.c100";
944
- return /*#__PURE__*/ react__rspack_import_0_default().createElement(react_select__rspack_import_1.components.ValueContainer, props, /*#__PURE__*/ react__rspack_import_0_default().createElement(_asorted_Text__rspack_import_2["default"], {
945
- as: "div",
946
- variant: "paragraph",
947
- color: color,
948
- style: {
949
- display: "inherit",
950
- alignItems: "center"
951
- }
952
- }, props.render ? props.render(props) : props.children));
953
- }
954
-
955
- __webpack_require__.d(__webpack_exports__, {
956
- ValueContainer: () => (ValueContainer),
957
- getStyles: () => (getStyles)
958
- });
959
-
960
-
961
- },
962
- 2031(__unused_rspack_module, __webpack_exports__, __webpack_require__) {
963
- /* import */ var react__rspack_import_0 = __webpack_require__(2015);
964
- /* import */ var react__rspack_import_0_default = /*#__PURE__*/__webpack_require__.n(react__rspack_import_0);
965
- /* import */ var react_select__rspack_import_1 = __webpack_require__(8466);
966
- /* import */ var react_select__rspack_import_1_default = /*#__PURE__*/__webpack_require__.n(react_select__rspack_import_1);
967
- /* import */ var styled_components__rspack_import_2 = __webpack_require__(2770);
968
- /* import */ var styled_components__rspack_import_2_default = /*#__PURE__*/__webpack_require__.n(styled_components__rspack_import_2);
969
- /* import */ var _DropdownIndicator__rspack_import_5 = __webpack_require__(7621);
970
- /* import */ var _ValueContainer__rspack_import_4 = __webpack_require__(4711);
971
- /* import */ var _Control__rspack_import_3 = __webpack_require__(268);
972
- /* import */ var _MenuList__rspack_import_6 = __webpack_require__(9082);
973
- /* import */ var _Option__rspack_import_7 = __webpack_require__(4216);
974
- /* import */ var _IndicatorsContainer__rspack_import_8 = __webpack_require__(8396);
975
- /* import */ var _BaseInput__rspack_import_9 = __webpack_require__(3770);
976
-
977
-
978
-
979
-
980
-
981
-
982
-
983
-
984
-
985
-
986
- const stylesFn = (theme)=>({
987
- control: _Control__rspack_import_3.getStyles(theme),
988
- valueContainer: _ValueContainer__rspack_import_4.getStyles(),
989
- dropdownIndicator: _DropdownIndicator__rspack_import_5.getStyles(),
990
- menuList: _MenuList__rspack_import_6.getStyles(theme),
991
- option: _Option__rspack_import_7.getStyles(),
992
- input: (provided)=>({
993
- ...provided,
994
- color: theme.colors.neutral.c100
995
- }),
996
- placeholder: (provided)=>({
997
- ...provided,
998
- color: theme.colors.neutral.c60
999
- }),
1000
- singleValue: (provided)=>({
1001
- ...provided,
1002
- color: "inherit"
1003
- }),
1004
- multiValue: (provided)=>({
1005
- ...provided,
1006
- backgroundColor: theme.colors.primary.c20,
1007
- borderRadius: theme.radii[1]
1008
- }),
1009
- multiValueLabel: (provided)=>({
1010
- ...provided,
1011
- color: theme.colors.neutral.c100
1012
- }),
1013
- multiValueRemove: (provided)=>({
1014
- ...provided,
1015
- cursor: "pointer",
1016
- "&:hover": {
1017
- color: theme.colors.error.c50,
1018
- backgroundColor: theme.colors.error.c30
1019
- }
1020
- }),
1021
- menu: (provided)=>({
1022
- ...provided,
1023
- border: 0,
1024
- boxShadow: "none",
1025
- background: "none"
1026
- })
1027
- });
1028
- function SelectInput({ error, rowHeight = 48, unwrapped, extendStyles, ...props }) {
1029
- const theme = (0,styled_components__rspack_import_2.useTheme)();
1030
- const styles = (0,react__rspack_import_0.useMemo)(()=>extendStyles ? extendStyles(stylesFn(theme)) : stylesFn(theme), [
1031
- theme,
1032
- extendStyles
1033
- ]);
1034
- const { isDisabled, components = {} } = props;
1035
- const innerContent = /*#__PURE__*/ react__rspack_import_0_default().createElement((react_select__rspack_import_1_default()), {
1036
- ...props,
1037
- styles: {
1038
- ...styles,
1039
- ...props.styles
1040
- },
1041
- classNamePrefix: "react-select",
1042
- components: {
1043
- Control: _Control__rspack_import_3.Control,
1044
- ValueContainer: _ValueContainer__rspack_import_4.ValueContainer,
1045
- IndicatorsContainer: _IndicatorsContainer__rspack_import_8.IndicatorsContainer,
1046
- DropdownIndicator: _DropdownIndicator__rspack_import_5.DropdownIndicator,
1047
- MenuList: _MenuList__rspack_import_6.MenuList,
1048
- Option: _Option__rspack_import_7.Option,
1049
- IndicatorSeparator: null,
1050
- ...components
1051
- },
1052
- // @ts-expect-error We want to be able to pass extra props here…
1053
- rowHeight: rowHeight
1054
- });
1055
- if (unwrapped) return innerContent;
1056
- return /*#__PURE__*/ react__rspack_import_0_default().createElement("div", null, innerContent, error && !isDisabled && /*#__PURE__*/ react__rspack_import_0_default().createElement(_BaseInput__rspack_import_9.InputErrorContainer, {
1057
- variant: "paragraph"
1058
- }, error));
1059
- }
1060
- /* export default */ const __rspack_default_export = (/*#__PURE__*/(0,react__rspack_import_0.memo)(SelectInput));
1061
-
1062
- __webpack_require__.d(__webpack_exports__, {
1063
- }, {
1064
- "default": __rspack_default_export
1065
- });
1066
-
1067
-
1068
- },
1069
- 3696(__unused_rspack_module, __webpack_exports__, __webpack_require__) {
1070
- /* import */ var _styled__rspack_import_0 = __webpack_require__(7680);
1071
-
1072
- const FlexBox = _styled__rspack_import_0["default"].div.attrs({
1073
- display: "flex",
1074
- minWidth: 0
1075
- })``;
1076
- /* export default */ const __rspack_default_export = (FlexBox);
1077
-
1078
- __webpack_require__.d(__webpack_exports__, {
1079
- }, {
1080
- "default": __rspack_default_export
1081
- });
1082
-
1083
-
1084
- },
1085
- 2843(__unused_rspack_module, __webpack_exports__, __webpack_require__) {
1086
- /* import */ var styled_system__rspack_import_0 = __webpack_require__(9351);
1087
- /* import */ var styled_system__rspack_import_0_default = /*#__PURE__*/__webpack_require__.n(styled_system__rspack_import_0);
1088
- /* import */ var _styled__rspack_import_1 = __webpack_require__(7680);
1089
-
1090
-
1091
- function getColumns(props) {
1092
- const { columns } = props;
1093
- return columns === "none" ? columns : `repeat(${columns || 12}, minmax(0, 1fr));`;
1094
- }
1095
- function getRows(props) {
1096
- const { rows } = props;
1097
- return !rows ? "initial" : rows === "none" ? rows : `repeat(${rows}, minmax(0, 1fr));`;
1098
- }
1099
- const Grid = _styled__rspack_import_1["default"].div`
1100
- display: grid;
1101
- grid-template-columns: ${getColumns};
1102
- grid-template-rows: ${getRows};
1103
- ${styled_system__rspack_import_0.grid};
1104
- `;
1105
- /* export default */ const __rspack_default_export = (Grid);
1106
-
1107
- __webpack_require__.d(__webpack_exports__, {
1108
- }, {
1109
- "default": __rspack_default_export
1110
- });
1111
-
1112
-
1113
- },
1114
- 7680(__unused_rspack_module, __webpack_exports__, __webpack_require__) {
1115
- /* import */ var _styles_system_gaps__rspack_import_2 = __webpack_require__(4182);
1116
- /* import */ var styled_components__rspack_import_0 = __webpack_require__(2770);
1117
- /* import */ var styled_components__rspack_import_0_default = /*#__PURE__*/__webpack_require__.n(styled_components__rspack_import_0);
1118
- /* import */ var styled_system__rspack_import_1 = __webpack_require__(9351);
1119
- /* import */ var styled_system__rspack_import_1_default = /*#__PURE__*/__webpack_require__.n(styled_system__rspack_import_1);
1120
-
1121
-
1122
-
1123
- const baseStyles = (0,styled_system__rspack_import_1.compose)(styled_system__rspack_import_1.flexbox, styled_system__rspack_import_1.space, styled_system__rspack_import_1.position, styled_system__rspack_import_1.color, styled_system__rspack_import_1.layout, styled_system__rspack_import_1.overflow, _styles_system_gaps__rspack_import_2["default"], styled_system__rspack_import_1.border);
1124
- const proxyStyled = new Proxy((styled_components__rspack_import_0_default()), {
1125
- apply (target, thisArg, argumentsList) {
1126
- return styled_components__rspack_import_0_default()(target.apply(thisArg, argumentsList)(baseStyles));
1127
- },
1128
- get (target, property) {
1129
- if (typeof target[property] === "function") {
1130
- return styled_components__rspack_import_0_default()(target[property].apply((styled_components__rspack_import_0_default()), [
1131
- baseStyles
1132
- ]));
1133
- }
1134
- return target[property];
1135
- }
1136
- });
1137
- /* export default */ const __rspack_default_export = (proxyStyled);
1138
-
1139
- __webpack_require__.d(__webpack_exports__, {
1140
- }, {
1141
- "default": __rspack_default_export
1142
- });
1143
-
1144
-
1145
- },
1146
- 205(__unused_rspack_module, __webpack_exports__, __webpack_require__) {
1147
-
1148
- // EXPORTS
1149
- __webpack_require__.d(__webpack_exports__, {
1150
- ff: () => (/* binding */ ff),
1151
- rgba: () => (/* binding */ rgba)
1152
- });
1153
-
1154
- // UNUSED EXPORTS: darken, ensureContrast, lighten, mix
1155
-
1156
- ;// CONCATENATED MODULE: external "color"
1157
- const external_color_namespaceObject = require("color");
1158
- var external_color_default = /*#__PURE__*/__webpack_require__.n(external_color_namespaceObject);
1159
- // EXTERNAL MODULE: ./src/styles/theme.ts
1160
- var theme = __webpack_require__(5548);
1161
- ;// CONCATENATED MODULE: ./src/styles/helpers.ts
1162
-
1163
-
1164
- const rgba = (c, a)=>external_color_default()(c).alpha(a).rgb().toString();
1165
- const darken = (c, a)=>Color(c).darken(a).toString();
1166
- const lighten = (c, a)=>Color(c).lighten(a).toString();
1167
- const mix = (c, b, a)=>Color(c).mix(Color(b), a).toString();
1168
- const ff = (v)=>{
1169
- const [font, type = "Regular"] = v.split("|");
1170
- // @ts-expect-error FIXME
1171
- const { style, weight } = theme.fontFamilies[font][type];
1172
- // @ts-expect-error FIXME
1173
- const fallback = theme.fontFamilies[font].fallback ?? "Arial";
1174
- return {
1175
- fontFamily: `${font}, ${fallback}`,
1176
- fontWeight: weight,
1177
- fontStyle: style
1178
- };
1179
- };
1180
- const ensureContrast = (color1, color2)=>{
1181
- const colorL1 = Color(color1).luminosity() + 0.05;
1182
- const colorL2 = Color(color2).luminosity() + 0.05;
1183
- const lRatio = colorL1 > colorL2 ? colorL1 / colorL2 : colorL2 / colorL1;
1184
- if (lRatio < 1.5) {
1185
- return Color(color1).rotate(180).negate().string();
1186
- }
1187
- return color1;
1188
- };
1189
-
1190
-
1191
- },
1192
- 3364(__unused_rspack_module, __webpack_exports__, __webpack_require__) {
1193
- /* import */ var _helpers__rspack_import_0 = __webpack_require__(205);
1194
-
1195
- /* export default */ const __rspack_default_export = ((props)=>{
1196
- const prop = props.ff;
1197
- if (prop == null) {
1198
- return null;
1199
- }
1200
- return (0,_helpers__rspack_import_0.ff)(prop);
1201
- });
1202
-
1203
- __webpack_require__.d(__webpack_exports__, {
1204
- }, {
1205
- "default": __rspack_default_export
1206
- });
1207
-
1208
-
1209
- },
1210
- 4182(__unused_rspack_module, __webpack_exports__, __webpack_require__) {
1211
- /* import */ var styled_system__rspack_import_0 = __webpack_require__(9351);
1212
- /* import */ var styled_system__rspack_import_0_default = /*#__PURE__*/__webpack_require__.n(styled_system__rspack_import_0);
1213
-
1214
- const gaps = (0,styled_system__rspack_import_0.system)({
1215
- rowGap: {
1216
- property: "rowGap",
1217
- scale: "space"
1218
- },
1219
- columnGap: {
1220
- property: "columnGap",
1221
- scale: "space"
1222
- }
1223
- });
1224
- /* export default */ const __rspack_default_export = (gaps);
1225
-
1226
- __webpack_require__.d(__webpack_exports__, {
1227
- }, {
1228
- "default": __rspack_default_export
1229
- });
1230
-
1231
-
1232
- },
1233
- 5548(__unused_rspack_module, __webpack_exports__, __webpack_require__) {
1234
- /* import */ var styled_components__rspack_import_0 = __webpack_require__(2770);
1235
- /* import */ var styled_components__rspack_import_0_default = /*#__PURE__*/__webpack_require__.n(styled_components__rspack_import_0);
1236
- /* import */ var _ledgerhq_ui_shared__rspack_import_1 = __webpack_require__(2993);
1237
- /* import */ var _ledgerhq_ui_shared__rspack_import_1_default = /*#__PURE__*/__webpack_require__.n(_ledgerhq_ui_shared__rspack_import_1);
1238
-
1239
-
1240
- const breakpoints = {
1241
- sm: "640px",
1242
- md: "768px",
1243
- lg: "1024px",
1244
- xl: "1280px",
1245
- xxl: "1536px"
1246
- };
1247
- const space = [
1248
- /* space indexes:
1249
- 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21 */ 0,
1250
- 2,
1251
- 4,
1252
- 8,
1253
- 10,
1254
- 12,
1255
- 16,
1256
- 20,
1257
- 24,
1258
- 28,
1259
- 32,
1260
- 36,
1261
- 40,
1262
- 44,
1263
- 48,
1264
- 52,
1265
- 56,
1266
- 60,
1267
- 64,
1268
- 68,
1269
- 72,
1270
- 76
1271
- ];
1272
- const fontSizes = [
1273
- 8,
1274
- 10,
1275
- 11,
1276
- 12,
1277
- 13,
1278
- 14,
1279
- 16,
1280
- 20,
1281
- 24,
1282
- 28,
1283
- 32,
1284
- 36
1285
- ];
1286
- [fontSizes.micro, fontSizes.tiny, fontSizes.extraSmall, fontSizes.small, fontSizes.paragraph, fontSizes.body, fontSizes.large, fontSizes.h5, fontSizes.h4, fontSizes.h3, fontSizes.h2, fontSizes.h1] = fontSizes;
1287
- fontSizes.largeLineHeight = fontSizes.large;
1288
- fontSizes.bodyLineHeight = fontSizes.body;
1289
- fontSizes.paragraphLineHeight = fontSizes.paragraph;
1290
- fontSizes.subtitle = fontSizes.extraSmall;
1291
- fontSizes.h1Inter = fontSizes.h1;
1292
- fontSizes.h2Inter = fontSizes.h2;
1293
- fontSizes.h3Inter = fontSizes.h3;
1294
- fontSizes.h4Inter = fontSizes.h4;
1295
- fontSizes.h5Inter = fontSizes.h5;
1296
- const fontWeights = {
1297
- extraLight: "100",
1298
- light: "300",
1299
- regular: "400",
1300
- medium: "500",
1301
- semiBold: "600",
1302
- bold: "700",
1303
- extraBold: "800"
1304
- };
1305
- const radii = [
1306
- 0,
1307
- 4,
1308
- 8,
1309
- 12,
1310
- 16,
1311
- 20
1312
- ];
1313
- const shadows = [
1314
- "0 4px 8px 0 rgba(0, 0, 0, 0.03)"
1315
- ];
1316
- const zIndexes = [
1317
- -1,
1318
- 0,
1319
- 1,
1320
- 9,
1321
- 10,
1322
- 90,
1323
- 100,
1324
- 900,
1325
- 1000
1326
- ];
1327
- // Those fonts are now defined in global.css, this is just a mapping for styled-system
1328
- const fontFamilies = {
1329
- Inter: {
1330
- ExtraLight: {
1331
- weight: 100,
1332
- style: "normal"
1333
- },
1334
- Light: {
1335
- weight: 300,
1336
- style: "normal"
1337
- },
1338
- Regular: {
1339
- weight: 400,
1340
- style: "normal"
1341
- },
1342
- Medium: {
1343
- weight: 500,
1344
- style: "normal"
1345
- },
1346
- SemiBold: {
1347
- weight: 600,
1348
- style: "normal"
1349
- },
1350
- Bold: {
1351
- weight: 700,
1352
- style: "normal"
1353
- },
1354
- ExtraBold: {
1355
- weight: 800,
1356
- style: "normal"
1357
- }
1358
- },
1359
- Alpha: {
1360
- Medium: {
1361
- weight: 500,
1362
- style: "normal"
1363
- }
1364
- }
1365
- };
1366
- const animationDuration = "0.33s";
1367
- const easings = {
1368
- outQuadratic: "cubic-bezier(0.25, 0.46, 0.45, 0.94)"
1369
- };
1370
- const transition = (properties = [
1371
- "all"
1372
- ], duration = animationDuration, easing = easings.outQuadratic)=>(0,styled_components__rspack_import_0.css)`
1373
- transition-property: ${properties.join(",")};
1374
- transition-duration: ${duration};
1375
- transition-timing-function: ${easing};
1376
- `;
1377
- const fadeIn = (0,styled_components__rspack_import_0.keyframes)`
1378
- 0% {
1379
- opacity: 0;
1380
- }
1381
- 100% {
1382
- opacity: 1;
1383
- }
1384
- `;
1385
- const fadeOut = (0,styled_components__rspack_import_0.keyframes)`
1386
- 0% {
1387
- opacity: 1;
1388
- }
1389
- 100% {
1390
- opacity: 0;
1391
- }
1392
- `;
1393
- const fadeInGrowX = (0,styled_components__rspack_import_0.keyframes)`
1394
- 0% {
1395
- opacity: 0;
1396
- transform: scaleX(0);
1397
- }
1398
- 100% {
1399
- opacity: 1;
1400
- transform: scaleX(1);
1401
- }
1402
- `;
1403
- const fadeInUp = (0,styled_components__rspack_import_0.keyframes)`
1404
- 0% {
1405
- opacity: 0;
1406
- transform: translateY(66%);
1407
- }
1408
- 100% {
1409
- opacity: 1;
1410
- transform: translateY(0%);
1411
- }
1412
- `;
1413
- const animations = {
1414
- fadeIn: ()=>(0,styled_components__rspack_import_0.css)`
1415
- ${fadeIn} ${animationDuration} ${easings.outQuadratic} forwards
1416
- `,
1417
- fadeOut: ()=>(0,styled_components__rspack_import_0.css)`
1418
- ${fadeOut} ${animationDuration} ${easings.outQuadratic} forwards
1419
- `,
1420
- fadeInGrowX: ()=>(0,styled_components__rspack_import_0.css)`
1421
- ${fadeInGrowX} 0.6s ${easings.outQuadratic} forwards
1422
- `,
1423
- fadeInUp: ()=>(0,styled_components__rspack_import_0.css)`
1424
- ${fadeInUp} ${animationDuration} ${easings.outQuadratic} forwards
1425
- `
1426
- };
1427
- const overflow = {
1428
- x: (0,styled_components__rspack_import_0.css)`
1429
- overflow-y: hidden;
1430
- overflow-x: scroll;
1431
- will-change: transform;
1432
- &:hover {
1433
- --track-color: ${(p)=>p.theme.colors.neutral.c30};
1434
- }
1435
- `,
1436
- y: (0,styled_components__rspack_import_0.css)`
1437
- overflow-x: hidden;
1438
- overflow-y: scroll;
1439
- will-change: transform;
1440
- &:hover {
1441
- --track-color: ${(p)=>p.theme.colors.neutral.c30};
1442
- }
1443
- `,
1444
- yAuto: (0,styled_components__rspack_import_0.css)`
1445
- overflow-x: hidden;
1446
- overflow-y: auto;
1447
- will-change: transform;
1448
- &:hover {
1449
- --track-color: ${(p)=>p.theme.colors.neutral.c30};
1450
- }
1451
- `,
1452
- xy: (0,styled_components__rspack_import_0.css)`
1453
- overflow: scroll;
1454
- will-change: transform;
1455
- &:hover {
1456
- --track-color: ${(p)=>p.theme.colors.neutral.c30};
1457
- }
1458
- `,
1459
- trackSize: 12
1460
- };
1461
- const theme = {
1462
- theme: "light",
1463
- sizes: {
1464
- drawer: {
1465
- side: {
1466
- big: {
1467
- width: 580
1468
- },
1469
- small: {
1470
- width: 420
1471
- }
1472
- },
1473
- popin: {
1474
- min: {
1475
- height: 158,
1476
- width: 462
1477
- },
1478
- max: {
1479
- height: 522,
1480
- width: 622
1481
- }
1482
- }
1483
- },
1484
- topBarHeight: 58,
1485
- sideBarWidth: 230
1486
- },
1487
- radii,
1488
- fontFamilies,
1489
- fontSizes,
1490
- fontWeights,
1491
- space,
1492
- shadows,
1493
- colors: _ledgerhq_ui_shared__rspack_import_1.palettes.light,
1494
- animations,
1495
- overflow,
1496
- transition,
1497
- zIndexes,
1498
- breakpoints
1499
- };
1500
- /* unused export default */ var __rspack_default_export = ((/* unused pure expression or super */ null && (theme)));
1501
-
1502
- __webpack_require__.d(__webpack_exports__, {
1503
- }, {
1504
- fontFamilies: fontFamilies,
1505
- fontSizes: fontSizes
1506
- });
1507
-
1508
-
1509
- },
1510
- 9979(module) {
1511
- module.exports = require("@ledgerhq/icons-ui/reactLegacy");
1512
-
1513
- },
1514
- 2993(module) {
1515
- module.exports = require("@ledgerhq/ui-shared");
1516
-
1517
- },
1518
- 2015(module) {
1519
- module.exports = require("react");
1520
-
1521
- },
1522
- 8466(module) {
1523
- module.exports = require("react-select");
1524
-
1525
- },
1526
- 2770(module) {
1527
- module.exports = require("styled-components");
1528
-
1529
- },
1530
- 9351(module) {
1531
- module.exports = require("styled-system");
1532
-
1533
- },
1534
-
1535
- });
1536
- // The module cache
1537
- var __webpack_module_cache__ = {};
1538
-
1539
- // The require function
1540
- function __webpack_require__(moduleId) {
1541
-
1542
- // Check if module is in cache
1543
- var cachedModule = __webpack_module_cache__[moduleId];
1544
- if (cachedModule !== undefined) {
1545
- return cachedModule.exports;
1546
- }
1547
- // Create a new module (and put it into the cache)
1548
- var module = (__webpack_module_cache__[moduleId] = {
1549
- exports: {}
1550
- });
1551
- // Execute the module function
1552
- __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
1553
-
1554
- // Return the exports of the module
1555
- return module.exports;
1556
-
1557
- }
1558
-
1559
- // webpack/runtime/compat_get_default_export
1560
- (() => {
1561
- // getDefaultExport function for compatibility with non-ESM modules
1562
- __webpack_require__.n = (module) => {
1563
- var getter = module && module.__esModule ?
1564
- () => (module['default']) :
1565
- () => (module);
1566
- __webpack_require__.d(getter, { a: getter });
1567
- return getter;
1568
- };
1569
-
1570
- })();
1571
- // webpack/runtime/define_property_getters
1572
- (() => {
1573
- __webpack_require__.d = (exports, getters, values) => {
1574
- var define = (defs, kind) => {
1575
- for(var key in defs) {
1576
- if(__webpack_require__.o(defs, key) && !__webpack_require__.o(exports, key)) {
1577
- Object.defineProperty(exports, key, { enumerable: true, [kind]: defs[key] });
1578
- }
1579
- }
1580
- };
1581
- define(getters, "get");
1582
- define(values, "value");
1583
- };
1584
- })();
1585
- // webpack/runtime/has_own_property
1586
- (() => {
1587
- __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
1588
- })();
1589
- // webpack/runtime/make_namespace_object
1590
- (() => {
1591
- // define __esModule on exports
1592
- __webpack_require__.r = (exports) => {
1593
- if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
1594
- Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
1595
- }
1596
- Object.defineProperty(exports, '__esModule', { value: true });
1597
- };
1598
- })();
1599
- var __webpack_exports__ = {};
1600
- // This entry needs to be wrapped in an IIFE because it needs to be isolated against other modules in the chunk.
1601
- (() => {
1602
- // ESM COMPAT FLAG
1603
- __webpack_require__.r(__webpack_exports__);
1604
-
1605
- // EXPORTS
1606
- __webpack_require__.d(__webpack_exports__, {
1607
- CustomOptions: () => (/* binding */ CustomOptions),
1608
- Default: () => (/* binding */ Default),
1609
- DisabledOption: () => (/* binding */ DisabledOption),
1610
- Minimal: () => (/* binding */ Minimal),
1611
- MultiSelect: () => (/* binding */ MultiSelect),
1612
- SideRenders: () => (/* binding */ SideRenders),
1613
- "default": () => (/* binding */ Select_stories)
1614
- });
1615
-
1616
- // EXTERNAL MODULE: external "react"
1617
- var external_react_ = __webpack_require__(2015);
1618
- var external_react_default = /*#__PURE__*/__webpack_require__.n(external_react_);
1619
- // EXTERNAL MODULE: external "styled-components"
1620
- var external_styled_components_ = __webpack_require__(2770);
1621
- // EXTERNAL MODULE: ./src/components/asorted/Text/index.tsx
1622
- var Text = __webpack_require__(348);
1623
- // EXTERNAL MODULE: ./src/components/layout/Flex/index.ts
1624
- var Flex = __webpack_require__(3696);
1625
- // EXTERNAL MODULE: ./src/components/layout/Grid/index.ts
1626
- var Grid = __webpack_require__(2843);
1627
- ;// CONCATENATED MODULE: external "@ledgerhq/icons-ui/reactLegacy/SearchMedium"
1628
- const SearchMedium_namespaceObject = require("@ledgerhq/icons-ui/reactLegacy/SearchMedium");
1629
- var SearchMedium_default = /*#__PURE__*/__webpack_require__.n(SearchMedium_namespaceObject);
1630
- // EXTERNAL MODULE: ./src/components/form/SelectInput/index.tsx
1631
- var SelectInput = __webpack_require__(2031);
1632
- // EXTERNAL MODULE: ./src/components/form/SelectInput/Option.tsx
1633
- var Option = __webpack_require__(4216);
1634
- // EXTERNAL MODULE: ./src/components/form/SelectInput/ValueContainer.tsx
1635
- var ValueContainer = __webpack_require__(4711);
1636
- ;// CONCATENATED MODULE: ./src/components/form/SelectInput/Select.stories.tsx
1637
-
1638
-
1639
-
1640
-
1641
-
1642
-
1643
-
1644
-
1645
-
1646
- const description = `
1647
- ### A styled Select Input control
1648
-
1649
- > This component is based on [react-select](https://react-select.com/). Please refer to the [documentation](https://react-select.com/props) for an exhaustive list of available props.
1650
-
1651
- ## Usage
1652
-
1653
- \`\`\`jsx
1654
-
1655
- import { SelectInput } from "@ledgerhq/react-ui"
1656
-
1657
- \`\`\`
1658
-
1659
- Basically the component accepts a list of selectable options and a callback.
1660
-
1661
- \`\`\`jsx
1662
- // Minimal working example
1663
-
1664
- const [value, setValue] = React.useState()
1665
- const options = [
1666
- { value: "chocolate", label: "Chocolate" },
1667
- { value: "strawberry", label: "Strawberry" },
1668
- { value: "vanilla", label: "Vanilla" },
1669
- ]
1670
-
1671
- <SelectInput
1672
- options={options}
1673
- value={value}
1674
- onChange={setValue}
1675
- />
1676
- \`\`\`
1677
-
1678
- ## Portaling
1679
-
1680
- The opened menu is not rendered inside a portal by default.
1681
-
1682
- - Use the \`menuPortalTarget\` [prop](https://react-select.com/advanced#portaling) to specify a node to root the portal.
1683
- - To specify a custom z-index you will need to override the \`menuPortal\` style.
1684
-
1685
- \`\`\`jsx
1686
- <SelectInput
1687
- menuPortalTarget={document.body}
1688
- styles={{ menuPortal: (provided) => ({ ...provided, zIndex: 2 }) }}
1689
- />
1690
- \`\`\`
1691
-
1692
- ## Extending Styles
1693
-
1694
- react-select has built in support for [overriding styles](https://react-select.com/styles#provided-styles-and-state).
1695
-
1696
- #### Using the \`extendStyles\` props
1697
-
1698
- SelectInput contains custom built-in styles to integrate the select control with the rest of the Ledger design.
1699
-
1700
- The \`extendStyles\` prop is a function that will allow you to compose new styles.
1701
- The function argument is a map between the react-select provided styles and additional ones.
1702
-
1703
- \`\`\`jsx
1704
- /*
1705
- The "styles" argument is an object containing component names as keys and functions as values.
1706
- These functions take as arguments the styles provided by react-select and return an object of additional styles.
1707
- */
1708
- const extendStyles = (styles) => ({
1709
- ...styles,
1710
- menuPortal: (provided) => {
1711
- return {
1712
- // "styles.menuPortal" will exist if SelectInput has custom styles for this component.
1713
- // Otherwise, use the react-select provided ones.
1714
- ...((styles.menuPortal && styles.menuPortal(provided)) || { ...provided }),
1715
- // Then extend the output with your own styles!
1716
- zIndex: 2,
1717
- };
1718
- },
1719
- });
1720
-
1721
- <SelectInput extendStyles={extendStyles} />
1722
- \`\`\`
1723
-
1724
- #### Using the \`styles\` prop
1725
-
1726
- To completely override the SelectInput styles, use the \`style\` prop.
1727
-
1728
- \`\`\`jsx
1729
- // The "provided" argument will only contain the base react-select styles.
1730
- const styles = { menuPortal: (provided) => ({ ...provided, zIndex: 2 }) }
1731
-
1732
- <SelectInput styles={styles} />
1733
- \`\`\`
1734
-
1735
- ## Extending Components
1736
-
1737
- react-select has built in support for [extending components](https://react-select.com/components).
1738
-
1739
- To override components use the \`components\` prop:
1740
-
1741
- \`\`\`jsx
1742
-
1743
- <SelectInput components={{ Option: ColorOption, ValueContainer: ColorValueContainer }} />
1744
-
1745
- \`\`\`
1746
-
1747
- If you would like to re-use inner SelectInput components you can import them like so:
1748
-
1749
- \`\`\`jsx
1750
- // Import them as modules
1751
- import * as DropdownIndicatorModule from "@ledgerhq/react-ui/components/form/SelectInput/DropdownIndicator";
1752
- import * as ValueContainerModule from "@ledgerhq/react-ui/components/form/SelectInput/ValueContainer";
1753
- import * as ControlModule from "@ledgerhq/react-ui/components/form/SelectInput/Control";
1754
- import * as MenuListModule from "@ledgerhq/react-ui/components/form/SelectInput/MenuList";
1755
- import * as OptionModule from "@ledgerhq/react-ui/components/form/SelectInput/Option";
1756
-
1757
- // Then each module contains the component definition and the associated style
1758
- const { DropdownIndicator, getStyles } = DropdownIndicatorModule
1759
-
1760
- <SelectInput
1761
- components={{dropdownIndicator: DropdownIndicator}}
1762
- styles={{dropdownIndicator: getStyles}}
1763
- />
1764
- \`\`\`
1765
-
1766
- ## Sandbox
1767
-
1768
- The following advanced example showcases how to override components and styles and disable elements.
1769
- `;
1770
- /* export default */ const Select_stories = ({
1771
- title: "Form/Input/Select",
1772
- component: SelectInput["default"],
1773
- argTypes: {
1774
- value: {
1775
- table: {
1776
- disable: true
1777
- }
1778
- },
1779
- renderLeft: {
1780
- table: {
1781
- disable: true
1782
- }
1783
- },
1784
- renderRight: {
1785
- table: {
1786
- disable: true
1787
- }
1788
- },
1789
- rowHeight: {
1790
- table: {
1791
- disable: true
1792
- }
1793
- },
1794
- isDisabled: {
1795
- type: "boolean"
1796
- },
1797
- error: {
1798
- type: "string"
1799
- },
1800
- menuIsOpen: {
1801
- type: "boolean"
1802
- }
1803
- },
1804
- parameters: {
1805
- docs: {
1806
- description: {
1807
- component: description
1808
- }
1809
- }
1810
- }
1811
- });
1812
- const options = [
1813
- // Labels contain muttons spaces (U+2003 character).
1814
- // Do not replace with a regular space please!
1815
- {
1816
- value: "chocolate",
1817
- label: "🍫 Chocolate"
1818
- },
1819
- {
1820
- value: "strawberry",
1821
- label: "🍓 Strawberry"
1822
- },
1823
- {
1824
- value: "lemon",
1825
- label: "🍋 Lemon"
1826
- },
1827
- {
1828
- value: "vanilla",
1829
- label: "🍦 Vanilla"
1830
- }
1831
- ];
1832
- const cssColors = [
1833
- "aliceblue",
1834
- "antiquewhite",
1835
- "aqua",
1836
- "aquamarine",
1837
- "azure",
1838
- "beige",
1839
- "bisque",
1840
- "black",
1841
- "blanchedalmond",
1842
- "blue",
1843
- "blueviolet",
1844
- "brown",
1845
- "burlywood",
1846
- "cadetblue",
1847
- "chartreuse",
1848
- "chocolate",
1849
- "coral",
1850
- "cornflowerblue",
1851
- "cornsilk",
1852
- "crimson",
1853
- "cyan",
1854
- "darkblue",
1855
- "darkcyan",
1856
- "darkgoldenrod",
1857
- "darkgray",
1858
- "darkgreen",
1859
- "darkgrey",
1860
- "darkkhaki",
1861
- "darkmagenta",
1862
- "darkolivegreen",
1863
- "darkorange",
1864
- "darkorchid",
1865
- "darkred",
1866
- "darksalmon",
1867
- "darkseagreen",
1868
- "darkslateblue",
1869
- "darkslategray",
1870
- "darkslategrey",
1871
- "darkturquoise",
1872
- "darkviolet",
1873
- "deeppink",
1874
- "deepskyblue",
1875
- "dimgray",
1876
- "dimgrey",
1877
- "dodgerblue",
1878
- "firebrick",
1879
- "floralwhite",
1880
- "forestgreen",
1881
- "fuchsia",
1882
- "gainsboro",
1883
- "ghostwhite",
1884
- "gold",
1885
- "goldenrod",
1886
- "gray",
1887
- "green",
1888
- "greenyellow",
1889
- "grey",
1890
- "honeydew",
1891
- "hotpink",
1892
- "indianred",
1893
- "indigo",
1894
- "ivory",
1895
- "khaki",
1896
- "lavender",
1897
- "lavenderblush",
1898
- "lawngreen",
1899
- "lemonchiffon",
1900
- "lightblue",
1901
- "lightcoral",
1902
- "lightcyan",
1903
- "lightgoldenrodyellow",
1904
- "lightgray",
1905
- "lightgreen",
1906
- "lightgrey",
1907
- "lightpink",
1908
- "lightsalmon",
1909
- "lightseagreen",
1910
- "lightskyblue",
1911
- "lightslategray",
1912
- "lightslategrey",
1913
- "lightsteelblue",
1914
- "lightyellow",
1915
- "lime",
1916
- "limegreen",
1917
- "linen",
1918
- "magenta",
1919
- "maroon",
1920
- "mediumaquamarine",
1921
- "mediumblue",
1922
- "mediumorchid",
1923
- "mediumpurple",
1924
- "mediumseagreen",
1925
- "mediumslateblue",
1926
- "mediumspringgreen",
1927
- "mediumturquoise",
1928
- "mediumvioletred",
1929
- "midnightblue",
1930
- "mintcream",
1931
- "mistyrose",
1932
- "moccasin",
1933
- "navajowhite",
1934
- "navy",
1935
- "oldlace",
1936
- "olive",
1937
- "olivedrab",
1938
- "orange",
1939
- "orangered",
1940
- "orchid",
1941
- "palegoldenrod",
1942
- "palegreen",
1943
- "paleturquoise",
1944
- "palevioletred",
1945
- "papayawhip",
1946
- "peachpuff",
1947
- "peru",
1948
- "pink",
1949
- "plum",
1950
- "powderblue",
1951
- "purple",
1952
- "red",
1953
- "rosybrown",
1954
- "royalblue",
1955
- "saddlebrown",
1956
- "salmon",
1957
- "sandybrown",
1958
- "seagreen",
1959
- "seashell",
1960
- "sienna",
1961
- "silver",
1962
- "skyblue",
1963
- "slateblue",
1964
- "slategray",
1965
- "slategrey",
1966
- "snow",
1967
- "springgreen",
1968
- "steelblue",
1969
- "tan",
1970
- "teal",
1971
- "thistle",
1972
- "tomato",
1973
- "turquoise",
1974
- "violet",
1975
- "wheat",
1976
- "white",
1977
- "whitesmoke",
1978
- "yellow",
1979
- "yellowgreen"
1980
- ];
1981
- const colorOptions = cssColors.map((color)=>({
1982
- label: color,
1983
- value: color
1984
- }));
1985
- const ColorOption = (props)=>{
1986
- return /*#__PURE__*/ external_react_default().createElement(Option.Option, {
1987
- ...props,
1988
- render: ({ children })=>/*#__PURE__*/ external_react_default().createElement(Flex["default"], {
1989
- flex: 1,
1990
- py: 2,
1991
- alignItems: "center"
1992
- }, /*#__PURE__*/ external_react_default().createElement(Flex["default"], {
1993
- mr: 4,
1994
- p: 4,
1995
- style: {
1996
- background: props.data.value
1997
- }
1998
- }), /*#__PURE__*/ external_react_default().createElement(Flex["default"], {
1999
- flex: 1,
2000
- style: {
2001
- textTransform: "capitalize"
2002
- }
2003
- }, children))
2004
- });
2005
- };
2006
- const ColorValueContainer = (props)=>{
2007
- return /*#__PURE__*/ external_react_default().createElement(ValueContainer.ValueContainer, {
2008
- render: ({ children })=>/*#__PURE__*/ external_react_default().createElement(Grid["default"], {
2009
- alignItems: "center",
2010
- style: {
2011
- textTransform: "capitalize"
2012
- }
2013
- }, children),
2014
- ...props
2015
- });
2016
- };
2017
- const Default = (args)=>{
2018
- const [value, setValue] = external_react_default().useState(null);
2019
- return /*#__PURE__*/ external_react_default().createElement(SelectInput["default"], {
2020
- options: colorOptions,
2021
- value: value,
2022
- onChange: setValue,
2023
- placeholder: "Pick a color",
2024
- isClearable: true,
2025
- isOptionDisabled: (option)=>option.value.startsWith("b"),
2026
- components: {
2027
- Option: ColorOption,
2028
- ValueContainer: ColorValueContainer
2029
- },
2030
- renderLeft: (_)=>value && /*#__PURE__*/ external_react_default().createElement(Flex["default"], {
2031
- mr: 4,
2032
- p: 4,
2033
- style: {
2034
- background: value.value
2035
- }
2036
- }),
2037
- menuPortalTarget: document.body,
2038
- styles: {
2039
- menuPortal: (provided)=>({
2040
- ...provided,
2041
- zIndex: 2
2042
- })
2043
- },
2044
- ...args
2045
- });
2046
- };
2047
- const Minimal = (args)=>{
2048
- const [value, setValue] = external_react_default().useState(null);
2049
- return /*#__PURE__*/ external_react_default().createElement(SelectInput["default"], {
2050
- options: options,
2051
- value: value,
2052
- onChange: setValue,
2053
- menuPortalTarget: document.body,
2054
- ...args
2055
- });
2056
- };
2057
- Minimal.parameters = {
2058
- docs: {
2059
- description: {
2060
- story: "This is a minimal working example with only required props."
2061
- }
2062
- }
2063
- };
2064
- const SideRenders = (args)=>{
2065
- const [value, setValue] = external_react_default().useState(null);
2066
- const theme = (0,external_styled_components_.useTheme)();
2067
- return /*#__PURE__*/ external_react_default().createElement(SelectInput["default"], {
2068
- options: options,
2069
- value: value,
2070
- onChange: setValue,
2071
- renderLeft: (props)=>/*#__PURE__*/ external_react_default().createElement(Flex["default"], {
2072
- mr: 3
2073
- }, /*#__PURE__*/ external_react_default().createElement((SearchMedium_default()), {
2074
- color: props.isDisabled ? "currentColor" : theme.colors.neutral.c70
2075
- })),
2076
- renderRight: ()=>/*#__PURE__*/ external_react_default().createElement(Text["default"], {
2077
- mr: 4,
2078
- fontWeight: "semiBold",
2079
- variant: "body",
2080
- color: "inherit"
2081
- }, "#Right"),
2082
- menuPortalTarget: document.body,
2083
- ...args
2084
- });
2085
- };
2086
- SideRenders.parameters = {
2087
- docs: {
2088
- description: {
2089
- story: "This example has side renders - a magnifying glass icon on the left and custom label on the right."
2090
- }
2091
- }
2092
- };
2093
- const CustomOption = (props)=>{
2094
- return /*#__PURE__*/ external_react_default().createElement(Option.Option, {
2095
- ...props,
2096
- render: ({ children })=>/*#__PURE__*/ external_react_default().createElement(Flex["default"], {
2097
- flex: 1,
2098
- alignItems: "center"
2099
- }, /*#__PURE__*/ external_react_default().createElement(Text["default"], {
2100
- fontWeight: "semiBold",
2101
- variant: "paragraph",
2102
- mr: 4
2103
- }, "#Left"), /*#__PURE__*/ external_react_default().createElement(Flex["default"], {
2104
- flex: 1,
2105
- justifyContent: "space-between"
2106
- }, children, /*#__PURE__*/ external_react_default().createElement(Text["default"], {
2107
- fontWeight: "semiBold",
2108
- variant: "paragraph",
2109
- color: "inherit"
2110
- }, "#Right")))
2111
- });
2112
- };
2113
- const CustomOptions = (args)=>{
2114
- const [value, setValue] = external_react_default().useState();
2115
- return /*#__PURE__*/ external_react_default().createElement(SelectInput["default"], {
2116
- options: options,
2117
- value: value,
2118
- onChange: setValue,
2119
- components: {
2120
- Option: CustomOption
2121
- },
2122
- menuPortalTarget: document.body,
2123
- ...args
2124
- });
2125
- };
2126
- CustomOptions.parameters = {
2127
- docs: {
2128
- description: {
2129
- story: "Here the `Option` component is overriden to display side labels (#Left and #Right)."
2130
- }
2131
- }
2132
- };
2133
- const DisabledOption = (args)=>{
2134
- const [value, setValue] = external_react_default().useState(null);
2135
- return /*#__PURE__*/ external_react_default().createElement(SelectInput["default"], {
2136
- options: options,
2137
- value: value,
2138
- onChange: setValue,
2139
- isOptionDisabled: (option)=>option.value === "lemon",
2140
- menuPortalTarget: document.body,
2141
- ...args
2142
- });
2143
- };
2144
- DisabledOption.parameters = {
2145
- docs: {
2146
- description: {
2147
- story: "Using the `isOptionDisabled` prop, options having a value that matches 'lemon' are disabled."
2148
- }
2149
- }
2150
- };
2151
- const MultiSelect = (args)=>{
2152
- const [value, setValue] = external_react_default().useState([]);
2153
- return /*#__PURE__*/ external_react_default().createElement(SelectInput["default"], {
2154
- isMulti: true,
2155
- options: options,
2156
- value: value,
2157
- onChange: setValue,
2158
- menuPortalTarget: document.body,
2159
- ...args
2160
- });
2161
- };
2162
- MultiSelect.parameters = {
2163
- docs: {
2164
- description: {
2165
- story: "A standard selector with multiselection using the `isMulti` prop."
2166
- }
2167
- }
2168
- };
2169
-
2170
- })();
2171
-
2172
- module.exports = __webpack_exports__;
2173
- })()
2174
- ;
2175
- //# sourceMappingURL=Select.stories.js.map