@transferwise/components 46.166.0 → 46.168.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (246) hide show
  1. package/README.md +1 -1
  2. package/build/CardContainer/CardContainer.js +34 -0
  3. package/build/CardContainer/CardContainer.js.map +1 -0
  4. package/build/CardContainer/CardContainer.mjs +30 -0
  5. package/build/CardContainer/CardContainer.mjs.map +1 -0
  6. package/build/CardWidget/CardWidget.js +98 -0
  7. package/build/CardWidget/CardWidget.js.map +1 -0
  8. package/build/CardWidget/CardWidget.mjs +94 -0
  9. package/build/CardWidget/CardWidget.mjs.map +1 -0
  10. package/build/CardWidget/CardWidgetAction.js +73 -0
  11. package/build/CardWidget/CardWidgetAction.js.map +1 -0
  12. package/build/CardWidget/CardWidgetAction.mjs +68 -0
  13. package/build/CardWidget/CardWidgetAction.mjs.map +1 -0
  14. package/build/Link/Link.js.map +1 -1
  15. package/build/Link/Link.mjs.map +1 -1
  16. package/build/ListItem/ListItem.js +2 -0
  17. package/build/ListItem/ListItem.js.map +1 -1
  18. package/build/ListItem/ListItem.mjs +2 -0
  19. package/build/ListItem/ListItem.mjs.map +1 -1
  20. package/build/Loader/Loader.js.map +1 -1
  21. package/build/Loader/Loader.mjs.map +1 -1
  22. package/build/Prompt/PrimitivePrompt/PrimitivePrompt.js +2 -1
  23. package/build/Prompt/PrimitivePrompt/PrimitivePrompt.js.map +1 -1
  24. package/build/Prompt/PrimitivePrompt/PrimitivePrompt.mjs +2 -1
  25. package/build/Prompt/PrimitivePrompt/PrimitivePrompt.mjs.map +1 -1
  26. package/build/Prompt/Snackbar/Snackbar.js +205 -0
  27. package/build/Prompt/Snackbar/Snackbar.js.map +1 -0
  28. package/build/Prompt/Snackbar/Snackbar.messages.js +14 -0
  29. package/build/Prompt/Snackbar/Snackbar.messages.js.map +1 -0
  30. package/build/Prompt/Snackbar/Snackbar.messages.mjs +10 -0
  31. package/build/Prompt/Snackbar/Snackbar.messages.mjs.map +1 -0
  32. package/build/Prompt/Snackbar/Snackbar.mjs +203 -0
  33. package/build/Prompt/Snackbar/Snackbar.mjs.map +1 -0
  34. package/build/Prompt/Snackbar/SnackbarContext.js.map +1 -0
  35. package/build/Prompt/Snackbar/SnackbarContext.mjs.map +1 -0
  36. package/build/Prompt/Snackbar/SnackbarPortal.js +12 -0
  37. package/build/Prompt/Snackbar/SnackbarPortal.js.map +1 -0
  38. package/build/Prompt/Snackbar/SnackbarPortal.mjs +8 -0
  39. package/build/Prompt/Snackbar/SnackbarPortal.mjs.map +1 -0
  40. package/build/Prompt/Snackbar/SnackbarProvider.js +42 -0
  41. package/build/Prompt/Snackbar/SnackbarProvider.js.map +1 -0
  42. package/build/Prompt/Snackbar/SnackbarProvider.mjs +38 -0
  43. package/build/Prompt/Snackbar/SnackbarProvider.mjs.map +1 -0
  44. package/build/Prompt/Snackbar/constants.js +17 -0
  45. package/build/Prompt/Snackbar/constants.js.map +1 -0
  46. package/build/Prompt/Snackbar/constants.mjs +11 -0
  47. package/build/Prompt/Snackbar/constants.mjs.map +1 -0
  48. package/build/Prompt/Snackbar/useSnackbar.js.map +1 -0
  49. package/build/Prompt/Snackbar/useSnackbar.mjs.map +1 -0
  50. package/build/Prompt/Snackbar/useSnackbarAutoDismiss.js +66 -0
  51. package/build/Prompt/Snackbar/useSnackbarAutoDismiss.js.map +1 -0
  52. package/build/Prompt/Snackbar/useSnackbarAutoDismiss.mjs +62 -0
  53. package/build/Prompt/Snackbar/useSnackbarAutoDismiss.mjs.map +1 -0
  54. package/build/Prompt/Snackbar/useSnackbarManager.js +153 -0
  55. package/build/Prompt/Snackbar/useSnackbarManager.js.map +1 -0
  56. package/build/Prompt/Snackbar/useSnackbarManager.mjs +149 -0
  57. package/build/Prompt/Snackbar/useSnackbarManager.mjs.map +1 -0
  58. package/build/Prompt/Snackbar/useSnackbarSwipeDismiss.js +135 -0
  59. package/build/Prompt/Snackbar/useSnackbarSwipeDismiss.js.map +1 -0
  60. package/build/Prompt/Snackbar/useSnackbarSwipeDismiss.mjs +131 -0
  61. package/build/Prompt/Snackbar/useSnackbarSwipeDismiss.mjs.map +1 -0
  62. package/build/Section/Section.js.map +1 -1
  63. package/build/Section/Section.mjs.map +1 -1
  64. package/build/_deprecated/Select/Select.js +1 -1
  65. package/build/_deprecated/Select/Select.js.map +1 -1
  66. package/build/_deprecated/Select/Select.mjs +1 -1
  67. package/build/_deprecated/Select/Select.mjs.map +1 -1
  68. package/build/common/BottomSheet/BottomSheet.js +1 -3
  69. package/build/common/BottomSheet/BottomSheet.js.map +1 -1
  70. package/build/common/BottomSheet/BottomSheet.mjs +1 -3
  71. package/build/common/BottomSheet/BottomSheet.mjs.map +1 -1
  72. package/build/i18n/en.json +1 -0
  73. package/build/i18n/en.json.js +1 -0
  74. package/build/i18n/en.json.js.map +1 -1
  75. package/build/i18n/en.json.mjs +1 -0
  76. package/build/i18n/en.json.mjs.map +1 -1
  77. package/build/index.js +7 -3
  78. package/build/index.js.map +1 -1
  79. package/build/index.mjs +5 -3
  80. package/build/index.mjs.map +1 -1
  81. package/build/main.css +331 -75
  82. package/build/styles/CardContainer/CardContainer.css +108 -0
  83. package/build/styles/CardWidget/CardWidget.css +78 -0
  84. package/build/styles/IconButton/IconButton.css +3 -4
  85. package/build/styles/ListItem/ListItem.css +8 -0
  86. package/build/styles/Prompt/Snackbar/Snackbar.css +134 -0
  87. package/build/styles/main.css +331 -75
  88. package/build/types/Body/Body.d.ts +2 -2
  89. package/build/types/CardContainer/CardContainer.d.ts +8 -0
  90. package/build/types/CardContainer/CardContainer.d.ts.map +1 -0
  91. package/build/types/CardContainer/CardContainer.types.d.ts +55 -0
  92. package/build/types/CardContainer/CardContainer.types.d.ts.map +1 -0
  93. package/build/types/CardContainer/_stories/helpers.d.ts +3 -0
  94. package/build/types/CardContainer/_stories/helpers.d.ts.map +1 -0
  95. package/build/types/CardContainer/index.d.ts +3 -0
  96. package/build/types/CardContainer/index.d.ts.map +1 -0
  97. package/build/types/CardWidget/CardWidget.d.ts +10 -0
  98. package/build/types/CardWidget/CardWidget.d.ts.map +1 -0
  99. package/build/types/CardWidget/CardWidget.types.d.ts +55 -0
  100. package/build/types/CardWidget/CardWidget.types.d.ts.map +1 -0
  101. package/build/types/CardWidget/CardWidgetAction.d.ts +54 -0
  102. package/build/types/CardWidget/CardWidgetAction.d.ts.map +1 -0
  103. package/build/types/CardWidget/index.d.ts +4 -0
  104. package/build/types/CardWidget/index.d.ts.map +1 -0
  105. package/build/types/IconButton/IconButton.d.ts +1 -1
  106. package/build/types/Link/Link.d.ts +1 -1
  107. package/build/types/ListItem/ListItem.d.ts +1 -1
  108. package/build/types/ListItem/ListItem.d.ts.map +1 -1
  109. package/build/types/Loader/Loader.d.ts +1 -1
  110. package/build/types/MoneyInput/MoneyInput.d.ts +1 -1
  111. package/build/types/MoneyInput/MoneyInput.d.ts.map +1 -1
  112. package/build/types/Prompt/PrimitivePrompt/PrimitivePrompt.d.ts +11 -0
  113. package/build/types/Prompt/PrimitivePrompt/PrimitivePrompt.d.ts.map +1 -1
  114. package/build/types/Prompt/Snackbar/Snackbar.d.ts +62 -0
  115. package/build/types/Prompt/Snackbar/Snackbar.d.ts.map +1 -0
  116. package/build/types/Prompt/Snackbar/Snackbar.messages.d.ts +9 -0
  117. package/build/types/Prompt/Snackbar/Snackbar.messages.d.ts.map +1 -0
  118. package/build/types/Prompt/Snackbar/Snackbar.types.d.ts +12 -0
  119. package/build/types/Prompt/Snackbar/Snackbar.types.d.ts.map +1 -0
  120. package/build/types/{Snackbar → Prompt/Snackbar}/SnackbarContext.d.ts +2 -2
  121. package/build/types/Prompt/Snackbar/SnackbarContext.d.ts.map +1 -0
  122. package/build/types/Prompt/Snackbar/SnackbarPortal.d.ts +4 -0
  123. package/build/types/Prompt/Snackbar/SnackbarPortal.d.ts.map +1 -0
  124. package/build/types/Prompt/Snackbar/SnackbarProvider.d.ts +13 -0
  125. package/build/types/Prompt/Snackbar/SnackbarProvider.d.ts.map +1 -0
  126. package/build/types/Prompt/Snackbar/constants.d.ts +9 -0
  127. package/build/types/Prompt/Snackbar/constants.d.ts.map +1 -0
  128. package/build/types/{Snackbar → Prompt/Snackbar}/index.d.ts +1 -1
  129. package/build/types/Prompt/Snackbar/index.d.ts.map +1 -0
  130. package/build/types/Prompt/Snackbar/useSnackbar.d.ts +3 -0
  131. package/build/types/Prompt/Snackbar/useSnackbar.d.ts.map +1 -0
  132. package/build/types/Prompt/Snackbar/useSnackbarAutoDismiss.d.ts +13 -0
  133. package/build/types/Prompt/Snackbar/useSnackbarAutoDismiss.d.ts.map +1 -0
  134. package/build/types/Prompt/Snackbar/useSnackbarManager.d.ts +20 -0
  135. package/build/types/Prompt/Snackbar/useSnackbarManager.d.ts.map +1 -0
  136. package/build/types/Prompt/Snackbar/useSnackbarSwipeDismiss.d.ts +22 -0
  137. package/build/types/Prompt/Snackbar/useSnackbarSwipeDismiss.d.ts.map +1 -0
  138. package/build/types/Section/Section.d.ts +1 -1
  139. package/build/types/Title/Title.d.ts +2 -2
  140. package/build/types/Upload/Steps/UploadImageStep/UploadImageStep.d.ts +1 -1
  141. package/build/types/UploadInput/UploadItem/UploadItemLink.d.ts +1 -1
  142. package/build/types/_deprecated/Select/Select.d.ts +1 -1
  143. package/build/types/common/BottomSheet/BottomSheet.d.ts +1 -3
  144. package/build/types/common/BottomSheet/BottomSheet.d.ts.map +1 -1
  145. package/build/types/index.d.ts +9 -5
  146. package/build/types/index.d.ts.map +1 -1
  147. package/build/types/test-utils/index.d.ts +2 -0
  148. package/build/types/test-utils/index.d.ts.map +1 -1
  149. package/package.json +4 -4
  150. package/src/CardContainer/CardContainer.css +108 -0
  151. package/src/CardContainer/CardContainer.less +171 -0
  152. package/src/CardContainer/CardContainer.test.tsx +150 -0
  153. package/src/CardContainer/CardContainer.tsx +51 -0
  154. package/src/CardContainer/CardContainer.types.ts +62 -0
  155. package/src/CardContainer/_stories/CardContainer.story.tsx +167 -0
  156. package/src/CardContainer/_stories/CardContainer.test.story.tsx +103 -0
  157. package/src/CardContainer/_stories/helpers.tsx +50 -0
  158. package/src/CardContainer/index.ts +6 -0
  159. package/src/CardWidget/CardWidget.css +78 -0
  160. package/src/CardWidget/CardWidget.less +107 -0
  161. package/src/CardWidget/CardWidget.test.tsx +221 -0
  162. package/src/CardWidget/CardWidget.tsx +78 -0
  163. package/src/CardWidget/CardWidget.types.ts +63 -0
  164. package/src/CardWidget/CardWidgetAction.tsx +128 -0
  165. package/src/CardWidget/_stories/CardWidget.story.tsx +238 -0
  166. package/src/CardWidget/_stories/CardWidget.test.story.tsx +350 -0
  167. package/src/CardWidget/index.ts +3 -0
  168. package/src/IconButton/IconButton.css +3 -4
  169. package/src/IconButton/IconButton.less +14 -1
  170. package/src/Link/Link.tsx +1 -1
  171. package/src/ListItem/AdditionalInfo/_stories/ListItemAdditionalInfo.story.tsx +1 -1
  172. package/src/ListItem/AvatarView/_stories/ListItemAvatarView.story.tsx +3 -3
  173. package/src/ListItem/ListItem.css +8 -0
  174. package/src/ListItem/ListItem.less +8 -0
  175. package/src/ListItem/ListItem.test.tsx +20 -0
  176. package/src/ListItem/ListItem.tsx +3 -1
  177. package/src/ListItem/_stories/ListItem.disabled.story.tsx +1 -1
  178. package/src/ListItem/_stories/ListItem.layout.test.story.tsx +1 -1
  179. package/src/ListItem/_stories/ListItem.scenarios.story.tsx +2 -2
  180. package/src/ListItem/_stories/ListItem.story.tsx +1 -1
  181. package/src/Loader/Loader.tsx +1 -1
  182. package/src/Prompt/CriticalBanner/_stories/CriticalBanner.docs.mdx +122 -0
  183. package/src/Prompt/CriticalBanner/_stories/CriticalBanner.story.tsx +0 -2
  184. package/src/Prompt/PrimitivePrompt/PrimitivePrompt.test.tsx +24 -1
  185. package/src/Prompt/PrimitivePrompt/PrimitivePrompt.tsx +8 -2
  186. package/src/Prompt/Snackbar/Snackbar.css +134 -0
  187. package/src/Prompt/Snackbar/Snackbar.less +159 -0
  188. package/src/Prompt/Snackbar/Snackbar.messages.ts +9 -0
  189. package/src/Prompt/Snackbar/Snackbar.test.tsx +1079 -0
  190. package/src/Prompt/Snackbar/Snackbar.tsx +245 -0
  191. package/src/Prompt/Snackbar/Snackbar.types.ts +17 -0
  192. package/src/{Snackbar → Prompt/Snackbar}/SnackbarContext.ts +2 -2
  193. package/src/Prompt/Snackbar/SnackbarPortal.tsx +8 -0
  194. package/src/Prompt/Snackbar/SnackbarProvider.test.tsx +783 -0
  195. package/src/Prompt/Snackbar/SnackbarProvider.tsx +41 -0
  196. package/src/Prompt/Snackbar/_stories/Snackbar.accessibility.docs.mdx +58 -0
  197. package/src/{Snackbar → Prompt/Snackbar}/_stories/Snackbar.rtl.test.story.tsx +17 -9
  198. package/src/Prompt/Snackbar/_stories/Snackbar.story.tsx +416 -0
  199. package/src/Prompt/Snackbar/_stories/Snackbar.test.story.tsx +263 -0
  200. package/src/Prompt/Snackbar/constants.ts +10 -0
  201. package/src/{Snackbar → Prompt/Snackbar}/index.ts +1 -1
  202. package/src/Prompt/Snackbar/useSnackbarAutoDismiss.ts +74 -0
  203. package/src/Prompt/Snackbar/useSnackbarManager.ts +169 -0
  204. package/src/Prompt/Snackbar/useSnackbarSwipeDismiss.ts +169 -0
  205. package/src/Section/Section.tsx +1 -1
  206. package/src/_deprecated/Select/Select.tsx +1 -1
  207. package/src/_deprecated/Select/_stories/Select.story.tsx +1 -1
  208. package/src/common/BottomSheet/BottomSheet.tsx +1 -3
  209. package/src/i18n/en.json +1 -0
  210. package/src/index.ts +18 -5
  211. package/src/main.css +331 -75
  212. package/src/main.less +3 -1
  213. package/build/Snackbar/Snackbar.js +0 -128
  214. package/build/Snackbar/Snackbar.js.map +0 -1
  215. package/build/Snackbar/Snackbar.mjs +0 -123
  216. package/build/Snackbar/Snackbar.mjs.map +0 -1
  217. package/build/Snackbar/SnackbarContext.js.map +0 -1
  218. package/build/Snackbar/SnackbarContext.mjs.map +0 -1
  219. package/build/Snackbar/SnackbarProvider.js +0 -46
  220. package/build/Snackbar/SnackbarProvider.js.map +0 -1
  221. package/build/Snackbar/SnackbarProvider.mjs +0 -42
  222. package/build/Snackbar/SnackbarProvider.mjs.map +0 -1
  223. package/build/Snackbar/useSnackbar.js.map +0 -1
  224. package/build/Snackbar/useSnackbar.mjs.map +0 -1
  225. package/build/styles/Snackbar/Snackbar.css +0 -71
  226. package/build/types/Snackbar/Snackbar.d.ts +0 -16
  227. package/build/types/Snackbar/Snackbar.d.ts.map +0 -1
  228. package/build/types/Snackbar/SnackbarContext.d.ts.map +0 -1
  229. package/build/types/Snackbar/SnackbarProvider.d.ts +0 -6
  230. package/build/types/Snackbar/SnackbarProvider.d.ts.map +0 -1
  231. package/build/types/Snackbar/index.d.ts.map +0 -1
  232. package/build/types/Snackbar/useSnackbar.d.ts +0 -3
  233. package/build/types/Snackbar/useSnackbar.d.ts.map +0 -1
  234. package/src/FlowNavigation/_stories/FlowNavigation.CriticalBanner.docs.mdx +0 -66
  235. package/src/Snackbar/Snackbar.css +0 -71
  236. package/src/Snackbar/Snackbar.less +0 -80
  237. package/src/Snackbar/Snackbar.test.tsx +0 -206
  238. package/src/Snackbar/Snackbar.tsx +0 -129
  239. package/src/Snackbar/SnackbarProvider.tsx +0 -33
  240. package/src/Snackbar/_stories/Snackbar.story.tsx +0 -89
  241. package/src/Snackbar/_stories/Snackbar.test.story.tsx +0 -139
  242. /package/build/{Snackbar → Prompt/Snackbar}/SnackbarContext.js +0 -0
  243. /package/build/{Snackbar → Prompt/Snackbar}/SnackbarContext.mjs +0 -0
  244. /package/build/{Snackbar → Prompt/Snackbar}/useSnackbar.js +0 -0
  245. /package/build/{Snackbar → Prompt/Snackbar}/useSnackbar.mjs +0 -0
  246. /package/src/{Snackbar → Prompt/Snackbar}/useSnackbar.ts +0 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CardWidget.d.ts","sourceRoot":"","sources":["../../../src/CardWidget/CardWidget.tsx"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAoB,eAAe,EAAE,MAAM,oBAAoB,CAAC;AA6C5E;;;;;GAKG;AACH,QAAA,MAAM,UAAU,yGAcf,CAAC;AAIF,eAAe,UAAU,CAAC"}
@@ -0,0 +1,55 @@
1
+ import type { ReactNode } from 'react';
2
+ import type { Heading } from '../common';
3
+ import type { CardContainerProps } from '../CardContainer';
4
+ import type { LinkProps } from '../Link';
5
+ import type { CardWidgetActionButton } from './CardWidgetAction';
6
+ /**
7
+ * Props passed to the [Link](https://storybook.wise.design/?path=/docs/typography-link--docs)
8
+ * that the title is rendered as. A trailing chevron is rendered automatically, so do not put one
9
+ * in `title`.
10
+ */
11
+ export type CardWidgetTitleAction = Pick<LinkProps, 'href' | 'target' | 'onClick'>;
12
+ export interface CardWidgetHeader {
13
+ /** The widget's title. */
14
+ title: ReactNode;
15
+ /**
16
+ * Heading element rendered for the title.
17
+ * @default 'h3'
18
+ */
19
+ as?: Heading;
20
+ /**
21
+ * Makes the title a link with a trailing chevron.
22
+ * @default undefined
23
+ */
24
+ titleAction?: CardWidgetTitleAction;
25
+ /**
26
+ * A `CardWidgetActionButton` object (with a `label` or an `icon`) renders a small button,
27
+ * anchored to the inline end. Any other node is rendered as given.
28
+ * @default undefined
29
+ */
30
+ action?: CardWidgetActionButton | ReactNode;
31
+ /**
32
+ * Second action, at a lower emphasis, rendered before `action`. Two is the maximum, to keep
33
+ * the title legible. Takes the same values as `action`, and keeps its lower emphasis when used
34
+ * on its own.
35
+ * @default undefined
36
+ */
37
+ actionSecondary?: CardWidgetActionButton | ReactNode;
38
+ }
39
+ /**
40
+ * The widget always has the card's default padding, so its header and content line up, and its
41
+ * states always follow its title link.
42
+ */
43
+ export interface CardWidgetProps extends Omit<CardContainerProps, 'padding' | 'interactive'> {
44
+ /**
45
+ * The widget's header: a title, optionally a link, and up to two actions.
46
+ * @default undefined
47
+ */
48
+ header?: CardWidgetHeader;
49
+ /**
50
+ * The widget's content, rendered under the header.
51
+ * @default undefined
52
+ */
53
+ children?: ReactNode;
54
+ }
55
+ //# sourceMappingURL=CardWidget.types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CardWidget.types.d.ts","sourceRoot":"","sources":["../../../src/CardWidget/CardWidget.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACzC,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AAC3D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AACzC,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,oBAAoB,CAAC;AAEjE;;;;GAIG;AACH,MAAM,MAAM,qBAAqB,GAAG,IAAI,CAAC,SAAS,EAAE,MAAM,GAAG,QAAQ,GAAG,SAAS,CAAC,CAAC;AAEnF,MAAM,WAAW,gBAAgB;IAC/B,0BAA0B;IAC1B,KAAK,EAAE,SAAS,CAAC;IAEjB;;;OAGG;IACH,EAAE,CAAC,EAAE,OAAO,CAAC;IAEb;;;OAGG;IACH,WAAW,CAAC,EAAE,qBAAqB,CAAC;IAEpC;;;;OAIG;IACH,MAAM,CAAC,EAAE,sBAAsB,GAAG,SAAS,CAAC;IAE5C;;;;;OAKG;IACH,eAAe,CAAC,EAAE,sBAAsB,GAAG,SAAS,CAAC;CACtD;AAED;;;GAGG;AACH,MAAM,WAAW,eAAgB,SAAQ,IAAI,CAAC,kBAAkB,EAAE,SAAS,GAAG,aAAa,CAAC;IAC1F;;;OAGG;IACH,MAAM,CAAC,EAAE,gBAAgB,CAAC;IAE1B;;;OAGG;IACH,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB"}
@@ -0,0 +1,54 @@
1
+ import { type MouseEventHandler, type ReactNode } from 'react';
2
+ import type { ButtonProps } from '../Button/Button.types';
3
+ /** The action slot a `CardWidgetActionButton` was passed to, which is what determines its emphasis. */
4
+ export type CardWidgetActionSlot = 'action' | 'actionSecondary';
5
+ type CardWidgetActionButtonBase = Pick<ButtonProps, 'href' | 'target' | 'disabled'> & {
6
+ /**
7
+ * `HTMLElement` rather than a narrower target, because an action is a `button` or an `a`
8
+ * depending on whether `href` is set.
9
+ * @default undefined
10
+ */
11
+ onClick?: MouseEventHandler<HTMLElement>;
12
+ /**
13
+ * Rendered after `label`, or as the only content of an unlabelled action.
14
+ * Size it yourself — 16px is expected in both cases.
15
+ * @default undefined
16
+ */
17
+ icon?: ReactNode;
18
+ 'data-testid'?: string;
19
+ };
20
+ /** An action with a visible label, rendered as a small button. */
21
+ type CardWidgetLabelledActionButton = CardWidgetActionButtonBase & {
22
+ /** Non-rendering values are excluded, so an unlabelled action has to meet the icon-only rules. */
23
+ label: Exclude<ButtonProps['children'], null | undefined | boolean>;
24
+ /** @default undefined */
25
+ 'aria-label'?: string;
26
+ };
27
+ /**
28
+ * An action with no visible label, rendered as a 32px icon button. The icon is
29
+ * the only thing on screen and `aria-label` is the only accessible name, so
30
+ * both are required.
31
+ */
32
+ type CardWidgetIconActionButton = CardWidgetActionButtonBase & {
33
+ label?: never;
34
+ icon: ReactNode;
35
+ 'aria-label': string;
36
+ };
37
+ /**
38
+ * An action the `CardWidget` header renders as a button. With a `label` it is a small `Button`; without
39
+ * one, a 32px `IconButton`, which requires both an `icon` and an `aria-label`. Emphasis is not
40
+ * part of the object — it comes from the slot the action is passed to.
41
+ */
42
+ export type CardWidgetActionButton = CardWidgetLabelledActionButton | CardWidgetIconActionButton;
43
+ /**
44
+ * Tells a `CardWidgetActionButton` object apart from any other node passed to an action slot.
45
+ * Every button action has a `label` or an `icon`, which no React element, portal or array does.
46
+ */
47
+ export declare const isCardWidgetActionButton: (value: unknown) => value is CardWidgetActionButton;
48
+ /** Renders a `CardWidgetActionButton` at the emphasis of the slot it was passed to. */
49
+ declare const CardWidgetAction: ({ action: { label, icon, "aria-label": ariaLabel, "data-testid": dataTestId, href, target, onClick, disabled, }, slot, }: {
50
+ action: CardWidgetActionButton;
51
+ slot: CardWidgetActionSlot;
52
+ }) => import("react").JSX.Element;
53
+ export default CardWidgetAction;
54
+ //# sourceMappingURL=CardWidgetAction.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CardWidgetAction.d.ts","sourceRoot":"","sources":["../../../src/CardWidget/CardWidgetAction.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAkB,KAAK,iBAAiB,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAG/E,OAAO,KAAK,EAAkB,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAG1E,uGAAuG;AACvG,MAAM,MAAM,oBAAoB,GAAG,QAAQ,GAAG,iBAAiB,CAAC;AAEhE,KAAK,0BAA0B,GAAG,IAAI,CAAC,WAAW,EAAE,MAAM,GAAG,QAAQ,GAAG,UAAU,CAAC,GAAG;IACpF;;;;OAIG;IACH,OAAO,CAAC,EAAE,iBAAiB,CAAC,WAAW,CAAC,CAAC;IAEzC;;;;OAIG;IACH,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB,CAAC;AAEF,kEAAkE;AAClE,KAAK,8BAA8B,GAAG,0BAA0B,GAAG;IACjE,kGAAkG;IAClG,KAAK,EAAE,OAAO,CAAC,WAAW,CAAC,UAAU,CAAC,EAAE,IAAI,GAAG,SAAS,GAAG,OAAO,CAAC,CAAC;IACpE,yBAAyB;IACzB,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB,CAAC;AAEF;;;;GAIG;AACH,KAAK,0BAA0B,GAAG,0BAA0B,GAAG;IAC7D,KAAK,CAAC,EAAE,KAAK,CAAC;IACd,IAAI,EAAE,SAAS,CAAC;IAChB,YAAY,EAAE,MAAM,CAAC;CACtB,CAAC;AAEF;;;;GAIG;AACH,MAAM,MAAM,sBAAsB,GAAG,8BAA8B,GAAG,0BAA0B,CAAC;AAYjG;;;GAGG;AACH,eAAO,MAAM,wBAAwB,GAAI,OAAO,OAAO,KAAG,KAAK,IAAI,sBAK5B,CAAC;AAExC,uFAAuF;AACvF,QAAA,MAAM,gBAAgB,GAA6B,0HAYhD;IACD,MAAM,EAAE,sBAAsB,CAAC;IAC/B,IAAI,EAAE,oBAAoB,CAAC;CAC5B,gCAoCA,CAAC;AAEF,eAAe,gBAAgB,CAAC"}
@@ -0,0 +1,4 @@
1
+ export { default } from './CardWidget';
2
+ export type { CardWidgetProps, CardWidgetHeader, CardWidgetTitleAction } from './CardWidget.types';
3
+ export type { CardWidgetActionButton } from './CardWidgetAction';
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/CardWidget/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,YAAY,EAAE,eAAe,EAAE,gBAAgB,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAC;AACnG,YAAY,EAAE,sBAAsB,EAAE,MAAM,oBAAoB,CAAC"}
@@ -16,6 +16,6 @@ declare const IconButton: import("react").ForwardRefExoticComponent<{
16
16
  /** @default 'default' */
17
17
  type?: "default" | "negative";
18
18
  'data-testid'?: string;
19
- } & Pick<AnchorHTMLAttributes<HTMLAnchorElement>, "onClick" | "target" | "href"> & Pick<ButtonHTMLAttributes<HTMLButtonElement>, "disabled" | "onClick"> & Pick<HTMLAttributes<HTMLDivElement>, "id" | "className" | "tabIndex" | "role" | "aria-label" | "children"> & import("react").RefAttributes<unknown>>;
19
+ } & Pick<AnchorHTMLAttributes<HTMLAnchorElement>, "onClick" | "target" | "href"> & Pick<ButtonHTMLAttributes<HTMLButtonElement>, "disabled" | "onClick"> & Pick<HTMLAttributes<HTMLDivElement>, "children" | "className" | "id" | "tabIndex" | "role" | "aria-label"> & import("react").RefAttributes<unknown>>;
20
20
  export default IconButton;
21
21
  //# sourceMappingURL=IconButton.d.ts.map
@@ -6,7 +6,7 @@ export type LinkProps = PrimitiveAnchorProps & Pick<PrimitiveButtonProps, 'onCli
6
6
  /**
7
7
  * Standard Link component with navigate away icon
8
8
  *
9
- * Documentation: https://transferwise.github.io/neptune-web/components/content/Link
9
+ * Documentation: https://storybook.wise.design/?path=/docs/typography-link--docs
10
10
  */
11
11
  declare const Link: ({ className, children, href, target, type, "aria-label": ariaLabel, onClick, disabled, ...props }: LinkProps) => import("react").JSX.Element;
12
12
  export default Link;
@@ -32,7 +32,7 @@ export type ListItemProps = {
32
32
  * Vertical padding of the list item, in pixels.
33
33
  * @default 12
34
34
  */
35
- paddingY?: 12 | 24;
35
+ paddingY?: 8 | 12 | 16 | 24;
36
36
  title: ReactNode;
37
37
  subtitle?: ReactNode;
38
38
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"ListItem.d.ts","sourceRoot":"","sources":["../../../src/ListItem/ListItem.tsx"],"names":[],"mappings":"AAAA,OAAO,EAML,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AAIf,OAAO,EAAc,KAAK,uBAAuB,EAAE,MAAM,cAAc,CAAC;AACxE,OAAO,EAAY,KAAK,qBAAqB,EAAE,MAAM,YAAY,CAAC;AAClE,OAAO,EAAc,KAAK,uBAAuB,EAAE,MAAM,cAAc,CAAC;AAExE,OAAO,EAAU,KAAK,mBAAmB,EAAE,MAAM,UAAU,CAAC;AAC5D,OAAO,EAAS,KAAK,kBAAkB,EAAE,MAAM,SAAS,CAAC;AACzD,OAAO,EAAU,KAAK,mBAAmB,EAAE,MAAM,UAAU,CAAC;AAY5D,MAAM,MAAM,aAAa,GACvB,iBAAiB,GAAG,YAAY,GAAG,OAAO,GAAG,UAAU,GAAG,QAAQ,GAAG,QAAQ,GAAG,aAAa,CAAC;AAEhG,MAAM,MAAM,oBAAoB,GAC5B,uBAAuB,GACvB,qBAAqB,GACrB,mBAAmB,GACnB,uBAAuB,GACvB,kBAAkB,GAClB,mBAAmB,CAAC;AAExB,MAAM,MAAM,aAAa,GAAG;IAC1B,oBAAoB;IACpB,EAAE,CAAC,EAAE,IAAI,GAAG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C;IAC1B,EAAE,CAAC,EAAE,MAAM,CAAC;CACb,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,QAAQ;oNAkBlB,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA4Of,CAAC;AA6GF,eAAe,QAAQ,CAAC"}
@@ -21,7 +21,7 @@ export type LoaderProps = {
21
21
  /**
22
22
  * Loader component
23
23
  *
24
- * Docs link: https://transferwise.github.io/neptune-web/components/progress/Loader
24
+ * Docs link: https://storybook.wise.design/?path=/docs/loading-loader--docs
25
25
  *
26
26
  * @param root0
27
27
  * @param root0.small
@@ -55,7 +55,6 @@ declare const _default: import("react").FC<{
55
55
  selectProps?: Partial<SelectInputProps<CurrencyOptionItem>> | undefined;
56
56
  amount: number | null;
57
57
  searchPlaceholder?: string | undefined;
58
- decimals?: number | undefined;
59
58
  currencies: readonly CurrencyItem[];
60
59
  selectedCurrency: CurrencyOptionItem;
61
60
  onCurrencyChange?: ((value: CurrencyOptionItem) => void) | undefined;
@@ -67,6 +66,7 @@ declare const _default: import("react").FC<{
67
66
  }) => void) | undefined;
68
67
  customActionLabel?: import("react").ReactNode;
69
68
  onCustomAction?: (() => void) | undefined;
69
+ decimals?: number | undefined;
70
70
  }>;
71
71
  export default _default;
72
72
  //# sourceMappingURL=MoneyInput.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"MoneyInput.d.ts","sourceRoot":"","sources":["../../../src/MoneyInput/MoneyInput.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAc,KAAK,qBAAqB,EAAE,MAAM,sBAAsB,CAAC;AAE9E,OAAO,EAGL,SAAS,EACT,UAAU,EACV,SAAS,EAEV,MAAM,WAAW,CAAC;AACnB,OAAO,EAAuB,wBAAwB,EAAE,MAAM,oBAAoB,CAAC;AAEnF,OAAO,EAKL,gBAAgB,EACjB,MAAM,uBAAuB,CAAC;AAO/B,MAAM,WAAW,kBAAkB;IACjC,MAAM,CAAC,EAAE,KAAK,C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GAAG,eAAe,GAC9D,OAAO,CAAC,wBAAwB,CAAC,CAAC;;SA5B7B,MAAM;wBACS,MAAM;YAMnB,SAAS,GAAG,UAAU,GAAG,SAAS;kBAF3B,MAAM;iBAYP,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC;kBACrB,OAAO,CAAC,gBAAgB,CAAC,kBAAkB,CAAC,CAAC;YAZnD,MAAM,GAAG,IAAI;wBAID,MAAM;gBARd,SAAS,YAAY,EAAE;sBACjB,kBAAkB;wBACjB,CAAC,KAAK,EAAE,kBAAkB,KAAK,IAAI;sBAIrC,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,KAAK,IAAI;;sBAM9B,CAAC,KAAK,EAAE;QAAE,WAAW,EAAE,MAAM,CAAC;QAAC,eAAe,EAAE,YAAY,EAAE,CAAA;KAAE,KAAK,IAAI;;sBAEzE,MAAM,IAAI;eAQhB,MAAM;;AA0anB,wBAA2F"}
@@ -1,4 +1,5 @@
1
1
  import { Emphasis, Sentiment } from '../../SentimentSurface';
2
+ import { type IconButtonProps } from '../../IconButton';
2
3
  import { HTMLAttributes, ReactNode } from 'react';
3
4
  export type PrimitivePromptProps = HTMLAttributes<HTMLDivElement> & {
4
5
  /**
@@ -23,6 +24,11 @@ export type PrimitivePromptProps = HTMLAttributes<HTMLDivElement> & {
23
24
  * Handler called when the close button is clicked. If not provided, then the close button is hidden.
24
25
  */
25
26
  onDismiss?: () => void;
27
+ /**
28
+ * The priority of the dismiss IconButton.
29
+ * @default 'secondary'
30
+ */
31
+ dismissButtonPriority?: IconButtonProps['priority'];
26
32
  /**
27
33
  * Test ID for testing tools
28
34
  */
@@ -54,6 +60,11 @@ export declare const PrimitivePrompt: import("react").ForwardRefExoticComponent<
54
60
  * Handler called when the close button is clicked. If not provided, then the close button is hidden.
55
61
  */
56
62
  onDismiss?: () => void;
63
+ /**
64
+ * The priority of the dismiss IconButton.
65
+ * @default 'secondary'
66
+ */
67
+ dismissButtonPriority?: IconButtonProps["priority"];
57
68
  /**
58
69
  * Test ID for testing tools
59
70
  */
@@ -1 +1 @@
1
- {"version":3,"file":"PrimitivePrompt.d.ts","sourceRoot":"","sources":["../../../../src/Prompt/PrimitivePrompt/PrimitivePrompt.tsx"],"names":[],"mappings":"AAEA,OAAyB,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AAI/E,OAAO,EAAc,cAAc,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAE9D,MAAM,MAAM,oBAAoB,GAAG,cAAc,CAAC,cAAc,CAAC,GAAG;IAClE;;;OAGG;IACH,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB;;;OAGG;IACH,QAAQ,CAAC,EAAE,QAAQ,CAAC;IACpB;;OAEG;IACH,KAAK,EAAE,SAAS,CAAC;IACjB;;OAEG;IACH,OAAO,CAAC,EAAE,SAAS,CAAC;IACpB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,IAAI,CAAC;IACvB;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB,CAAC;AAEF;;gHAEgH;AAChH,eAAO,MAAM,eAAe;IA/B1B;;;OAGG;gBACS,SAAS;IACrB;;;OAGG;eACQ,QAAQ;IACnB;;OAEG;WACI,SAAS;IAChB;;OAEG;cACO,SAAS;IACnB;;OAEG;gBACS,MAAM,IAAI;IACtB;;OAEG;oBACa,MAAM;kDAsDvB,CAAC"}
1
+ {"version":3,"file":"PrimitivePrompt.d.ts","sourceRoot":"","sources":["../../../../src/Prompt/PrimitivePrompt/PrimitivePrompt.tsx"],"names":[],"mappings":"AAEA,OAAyB,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AAC/E,OAAmB,EAAE,KAAK,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAGpE,OAAO,EAAc,cAAc,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAE9D,MAAM,MAAM,oBAAoB,GAAG,cAAc,CAAC,cAAc,CAAC,GAAG;IAClE;;;OAGG;IACH,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB;;;OAGG;IACH,QAAQ,CAAC,EAAE,QAAQ,CAAC;IACpB;;OAEG;IACH,KAAK,EAAE,SAAS,CAAC;IACjB;;OAEG;IACH,OAAO,CAAC,EAAE,SAAS,CAAC;IACpB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,IAAI,CAAC;IACvB;;;OAGG;IACH,qBAAqB,CAAC,EAAE,eAAe,CAAC,UAAU,CAAC,CAAC;IACpD;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB,CAAC;AAEF;;gHAEgH;AAChH,eAAO,MAAM,eAAe;IApC1B;;;OAGG;gBACS,SAAS;IACrB;;;OAGG;eACQ,QAAQ;IACnB;;OAEG;WACI,SAAS;IAChB;;OAEG;cACO,SAAS;IACnB;;OAEG;gBACS,MAAM,IAAI;IACtB;;;OAGG;4BACqB,eAAe,CAAC,UAAU,CAAC;IACnD;;OAEG;oBACa,MAAM;kDAuDvB,CAAC"}
@@ -0,0 +1,62 @@
1
+ import type { ThemeDark, ThemeLight } from '../../common';
2
+ import type { Sentiment } from '../../SentimentSurface';
3
+ import type { SnackbarAction, SnackbarDuration } from './Snackbar.types';
4
+ /**
5
+ * Props for the controlled Snackbar surface, including provider-managed lifecycle controls.
6
+ * Use SnackbarCreationProps when creating notifications through SnackbarProvider/useSnackbar.
7
+ */
8
+ export interface SnackbarProps {
9
+ /** One optional callback or navigation action. Activating it dismisses after its callback runs. */
10
+ action?: SnackbarAction;
11
+ /** Changes for each new Snackbar so LiveRegion re-announces it. */
12
+ announcementKey: number;
13
+ /**
14
+ * Controls auto-dismiss with a four-second, six-second or indefinite duration after entry finishes.
15
+ * Takes precedence over the deprecated `timeout`.
16
+ * When neither option is supplied, the default is 4000ms (previously 4500ms).
17
+ * @default 'default'
18
+ */
19
+ duration?: SnackbarDuration;
20
+ /**
21
+ * Replaces the media with a progress indicator, uses neutral styling and prevents auto-dismiss.
22
+ * Takes precedence over `media`, `sentiment`, `duration` and the deprecated `timeout`.
23
+ * @default false
24
+ */
25
+ loading?: boolean;
26
+ /** Overrides sentiment-derived media with content for the 24×24px media slot. */
27
+ media?: React.ReactNode;
28
+ /**
29
+ * Called once after this Snackbar finishes exiting, including after an action (e.g. Undo)
30
+ * or replacement by a newer Snackbar. The action callback runs first.
31
+ * Not called for Snackbars discarded before being shown, such as earlier creates batched
32
+ * before the first render.
33
+ */
34
+ onDismiss?: () => void;
35
+ /** Requests an exit; the provider retains the surface until onExited confirms it has finished. */
36
+ onDismissRequest: () => void;
37
+ /** Called after the exit animation so the provider can unmount active or show its replacement. */
38
+ onExited: () => void;
39
+ /**
40
+ * Controls the sentiment surface and default media.
41
+ * @default 'neutral'
42
+ */
43
+ sentiment?: Sentiment;
44
+ /** Message content. Empty strings or absent text dismiss without creating a blank replacement. */
45
+ text: React.ReactNode;
46
+ /** @deprecated Has no effect. Snackbar theming is based on ThemeProvider. */
47
+ theme?: ThemeLight | ThemeDark;
48
+ /**
49
+ * @deprecated Use `duration` instead. Explicit millisecond values remain supported and are not
50
+ * automatically remapped when no `duration` is supplied.
51
+ * To migrate, use `default` for 0–5000ms, `extended` for values above 5000ms, and `indefinite`
52
+ * for intentionally persistent notifications.
53
+ */
54
+ timeout?: number;
55
+ /** @deprecated Has no effect when using SnackbarProvider, which manages Snackbar identity. */
56
+ timestamp?: number;
57
+ /** Controls entry/exit; the surface does not manage visibility itself. */
58
+ visible: boolean;
59
+ }
60
+ export declare const Snackbar: ({ action, announcementKey, duration, loading, media, onDismissRequest, onExited, sentiment, text, timeout, visible, }: SnackbarProps) => import("react").JSX.Element;
61
+ export default Snackbar;
62
+ //# sourceMappingURL=Snackbar.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Snackbar.d.ts","sourceRoot":"","sources":["../../../../src/Prompt/Snackbar/Snackbar.tsx"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAG1D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AAKxD,OAAO,KAAK,EAAE,cAAc,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AAIzE;;;GAGG;AACH,MAAM,WAAW,aAAa;IAC5B,mGAAmG;IACnG,MAAM,CAAC,EAAE,cAAc,CAAC;IACxB,mEAAmE;IACnE,eAAe,EAAE,MAAM,CAAC;IACxB;;;;;OAKG;IACH,QAAQ,CAAC,EAAE,gBAAgB,CAAC;IAC5B;;;;OAIG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,iFAAiF;IACjF,KAAK,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACxB;;;;;OAKG;IACH,SAAS,CAAC,EAAE,MAAM,IAAI,CAAC;IACvB,kGAAkG;IAClG,gBAAgB,EAAE,MAAM,IAAI,CAAC;IAC7B,kGAAkG;IAClG,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB;;;OAGG;IACH,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB,kGAAkG;IAClG,IAAI,EAAE,KAAK,CAAC,SAAS,CAAC;IACtB,6EAA6E;IAC7E,KAAK,CAAC,EAAE,UAAU,GAAG,SAAS,CAAC;IAC/B;;;;;OAKG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,8FAA8F;IAC9F,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,0EAA0E;IAC1E,OAAO,EAAE,OAAO,CAAC;CAClB;AAED,eAAO,MAAM,QAAQ,GAAI,uHAYtB,aAAa,gCAyJf,CAAC;AAEF,eAAe,QAAQ,CAAC"}
@@ -0,0 +1,9 @@
1
+ declare const _default: {
2
+ escapeDismissHint: {
3
+ id: string;
4
+ defaultMessage: string;
5
+ description: string;
6
+ };
7
+ };
8
+ export default _default;
9
+ //# sourceMappingURL=Snackbar.messages.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Snackbar.messages.d.ts","sourceRoot":"","sources":["../../../../src/Prompt/Snackbar/Snackbar.messages.ts"],"names":[],"mappings":";;;;;;;AAEA,wBAMG"}
@@ -0,0 +1,12 @@
1
+ import type { ButtonProps, ButtonReferenceType } from '../../Button/Button.types';
2
+ import type { SnackbarProps } from './Snackbar';
3
+ /** Semantic auto-dismiss durations. `indefinite` disables the timer. */
4
+ export type SnackbarDuration = 'default' | 'extended' | 'indefinite';
5
+ /** One optional action. Supports callbacks and navigation through the Button API. */
6
+ export type SnackbarAction = Pick<ButtonProps, 'href' | 'target'> & {
7
+ label: ButtonProps['children'];
8
+ onClick?: React.MouseEventHandler<ButtonReferenceType>;
9
+ };
10
+ /** Props accepted by `createSnackbar` from `useSnackbar()`. */
11
+ export type SnackbarCreationProps = Omit<SnackbarProps, 'announcementKey' | 'onDismissRequest' | 'onExited' | 'timeout' | 'visible'>;
12
+ //# sourceMappingURL=Snackbar.types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Snackbar.types.d.ts","sourceRoot":"","sources":["../../../../src/Prompt/Snackbar/Snackbar.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AAClF,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAEhD,wEAAwE;AACxE,MAAM,MAAM,gBAAgB,GAAG,SAAS,GAAG,UAAU,GAAG,YAAY,CAAC;AAErE,qFAAqF;AACrF,MAAM,MAAM,cAAc,GAAG,IAAI,CAAC,WAAW,EAAE,MAAM,GAAG,QAAQ,CAAC,GAAG;IAClE,KAAK,EAAE,WAAW,CAAC,UAAU,CAAC,CAAC;IAC/B,OAAO,CAAC,EAAE,KAAK,CAAC,iBAAiB,CAAC,mBAAmB,CAAC,CAAC;CACxD,CAAC;AAEF,+DAA+D;AAC/D,MAAM,MAAM,qBAAqB,GAAG,IAAI,CACtC,aAAa,EACb,iBAAiB,GAAG,kBAAkB,GAAG,UAAU,GAAG,SAAS,GAAG,SAAS,CAC5E,CAAC"}
@@ -1,6 +1,6 @@
1
- import { SnackbarProps } from './Snackbar';
1
+ import type { SnackbarCreationProps } from './Snackbar.types';
2
2
  export type SnackbarContextType = {
3
- createSnackbar: (props: Omit<SnackbarProps, 'timeout' | 'timestamp'>) => void;
3
+ createSnackbar: (props: SnackbarCreationProps) => void;
4
4
  };
5
5
  export declare const SnackbarContext: import("react").Context<SnackbarContextType>;
6
6
  export declare const SnackbarConsumer: import("react").Consumer<SnackbarContextType>;
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SnackbarContext.d.ts","sourceRoot":"","sources":["../../../../src/Prompt/Snackbar/SnackbarContext.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,kBAAkB,CAAC;AAE9D,MAAM,MAAM,mBAAmB,GAAG;IAChC,cAAc,EAAE,CAAC,KAAK,EAAE,qBAAqB,KAAK,IAAI,CAAC;CACxD,CAAC;AAEF,eAAO,MAAM,eAAe,8CAAmE,CAAC;AAEhG,eAAO,MAAM,gBAAgB,+CAA2B,CAAC"}
@@ -0,0 +1,4 @@
1
+ /** Renders the Snackbar into `document.body` after mount, so it's safe for SSR. */
2
+ declare const SnackbarPortal: (props: import("./Snackbar").SnackbarProps) => import("react").ReactPortal | null;
3
+ export default SnackbarPortal;
4
+ //# sourceMappingURL=SnackbarPortal.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SnackbarPortal.d.ts","sourceRoot":"","sources":["../../../../src/Prompt/Snackbar/SnackbarPortal.tsx"],"names":[],"mappings":"AAIA,mFAAmF;AACnF,QAAA,MAAM,cAAc,mFAA2B,CAAC;AAEhD,eAAe,cAAc,CAAC"}
@@ -0,0 +1,13 @@
1
+ export interface SnackbarProviderProps {
2
+ /**
3
+ * @deprecated Use per-Snackbar `duration` instead. Explicit millisecond values remain supported
4
+ * and are not automatically remapped when no `duration` is supplied.
5
+ * When neither option is supplied, the default is 4000ms (previously 4500ms), after entry finishes.
6
+ * To migrate, use `default` for 0–5000ms, `extended` for values above 5000ms, and `indefinite`
7
+ * for intentionally persistent notifications.
8
+ */
9
+ timeout?: number;
10
+ children?: React.ReactNode;
11
+ }
12
+ export default function SnackbarProvider({ timeout, children }: SnackbarProviderProps): import("react").JSX.Element;
13
+ //# sourceMappingURL=SnackbarProvider.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SnackbarProvider.d.ts","sourceRoot":"","sources":["../../../../src/Prompt/Snackbar/SnackbarProvider.tsx"],"names":[],"mappings":"AAMA,MAAM,WAAW,qBAAqB;IACpC;;;;;;OAMG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC5B;AAED,MAAM,CAAC,OAAO,UAAU,gBAAgB,CAAC,EAAE,OAAO,EAAE,QAAQ,EAAE,EAAE,qBAAqB,+BAsBpF"}
@@ -0,0 +1,9 @@
1
+ export declare const SNACKBAR_ENTER_DURATION = 300;
2
+ export declare const SNACKBAR_EXIT_DURATION = 150;
3
+ /** Default auto-dismiss duration for short feedback, in milliseconds. */
4
+ export declare const SNACKBAR_DEFAULT_DURATION = 4000;
5
+ /** Extended auto-dismiss duration for messages needing more reading time, in milliseconds. */
6
+ export declare const SNACKBAR_EXTENDED_DURATION = 6000;
7
+ /** Fraction of the Snackbar surface height a downward swipe must travel to dismiss (0.5 = half). */
8
+ export declare const SNACKBAR_SWIPE_DISMISS_THRESHOLD = 0.5;
9
+ //# sourceMappingURL=constants.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../../src/Prompt/Snackbar/constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,uBAAuB,MAAM,CAAC;AAC3C,eAAO,MAAM,sBAAsB,MAAM,CAAC;AAE1C,yEAAyE;AACzE,eAAO,MAAM,yBAAyB,OAAO,CAAC;AAC9C,8FAA8F;AAC9F,eAAO,MAAM,0BAA0B,OAAO,CAAC;AAE/C,oGAAoG;AACpG,eAAO,MAAM,gCAAgC,MAAM,CAAC"}
@@ -1,4 +1,4 @@
1
1
  export { default } from './Snackbar';
2
- export type { SnackbarProps } from './Snackbar';
2
+ export type { SnackbarCreationProps } from './Snackbar.types';
3
3
  export type { SnackbarProviderProps } from './SnackbarProvider';
4
4
  //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/Prompt/Snackbar/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAErC,YAAY,EAAE,qBAAqB,EAAE,MAAM,kBAAkB,CAAC;AAC9D,YAAY,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAC"}
@@ -0,0 +1,3 @@
1
+ declare function useSnackbar(): (props: import("./Snackbar.types").SnackbarCreationProps) => void;
2
+ export default useSnackbar;
3
+ //# sourceMappingURL=useSnackbar.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useSnackbar.d.ts","sourceRoot":"","sources":["../../../../src/Prompt/Snackbar/useSnackbar.ts"],"names":[],"mappings":"AAIA,iBAAS,WAAW,sEAInB;AAED,eAAe,WAAW,CAAC"}
@@ -0,0 +1,13 @@
1
+ import type { SnackbarProps } from './Snackbar';
2
+ /** Starts after entry finishes and pauses on hover, focus or swipe, preserving the remaining time. */
3
+ declare const useSnackbarAutoDismiss: ({ duration, loading, onDismissRequest, timeout, visible, }: Pick<SnackbarProps, "duration" | "loading" | "onDismissRequest" | "timeout" | "visible">) => {
4
+ handleBlur: (event: React.FocusEvent<HTMLDivElement>) => void;
5
+ handleEntered: () => void;
6
+ handleFocus: () => void;
7
+ handleMouseEnter: () => void;
8
+ handleMouseLeave: () => void;
9
+ setSwiping: import("react").Dispatch<import("react").SetStateAction<boolean>>;
10
+ surfaceRef: import("react").RefObject<HTMLDivElement>;
11
+ };
12
+ export default useSnackbarAutoDismiss;
13
+ //# sourceMappingURL=useSnackbarAutoDismiss.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useSnackbarAutoDismiss.d.ts","sourceRoot":"","sources":["../../../../src/Prompt/Snackbar/useSnackbarAutoDismiss.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAShD,sGAAsG;AACtG,QAAA,MAAM,sBAAsB,GAAI,4DAM7B,IAAI,CAAC,aAAa,EAAE,UAAU,GAAG,SAAS,GAAG,kBAAkB,GAAG,SAAS,GAAG,SAAS,CAAC;wBAmCnE,KAAK,CAAC,UAAU,CAAC,cAAc,CAAC;;;;;;;CAiBvD,CAAC;AAEF,eAAe,sBAAsB,CAAC"}
@@ -0,0 +1,20 @@
1
+ import type { SnackbarCreationProps } from './Snackbar.types';
2
+ type SnackbarInstance = {
3
+ id: number;
4
+ props: SnackbarCreationProps;
5
+ };
6
+ /**
7
+ * Owns latest-wins replacement through reducer actions, separate from rendering and animation.
8
+ * Stable create/dismiss callbacks request state changes; the surface's onExited callback completes
9
+ * dismissal. The provider uses this state to mount/unmount the portal without a notification queue.
10
+ */
11
+ declare const useSnackbarManager: () => {
12
+ active: SnackbarInstance | null;
13
+ announcementKey: number;
14
+ createSnackbar: (props: SnackbarCreationProps) => void;
15
+ dismissSnackbar: () => void;
16
+ handleExited: () => void;
17
+ visible: boolean;
18
+ };
19
+ export default useSnackbarManager;
20
+ //# sourceMappingURL=useSnackbarManager.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useSnackbarManager.d.ts","sourceRoot":"","sources":["../../../../src/Prompt/Snackbar/useSnackbarManager.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,kBAAkB,CAAC;AAE9D,KAAK,gBAAgB,GAAG;IACtB,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,qBAAqB,CAAC;CAC9B,CAAC;AAqGF;;;;GAIG;AACH,QAAA,MAAM,kBAAkB;;;4BAIqB,qBAAqB;;;;CAiDjE,CAAC;AAEF,eAAe,kBAAkB,CAAC"}
@@ -0,0 +1,22 @@
1
+ /**
2
+ * Captures one primary pointer and follows downward, mostly vertical movement without re-rendering.
3
+ * Release dismisses at half the surface height; shorter/cancelled gestures settle back into place.
4
+ * The outer wrapper moves independently of entry/exit motion, and a committed swipe consumes its
5
+ * follow-up click so dragging from the action cannot activate it.
6
+ */
7
+ declare const useSnackbarSwipeDismiss: ({ onDismissRequest, onSwipeChange, visible, }: {
8
+ onDismissRequest: () => void;
9
+ /** Reports when a gesture starts and ends so auto-dismiss can pause beneath the pointer. */
10
+ onSwipeChange: (swiping: boolean) => void;
11
+ visible: boolean;
12
+ }) => {
13
+ clearSwipePosition: () => void;
14
+ containerRef: import("react").RefObject<HTMLDivElement>;
15
+ handleClickCapture: (event: React.MouseEvent<HTMLDivElement>) => void;
16
+ handlePointerCancel: (event: Pick<PointerEvent, "pointerId">) => void;
17
+ handlePointerDown: (event: React.PointerEvent<HTMLDivElement>) => void;
18
+ handlePointerMove: (event: React.PointerEvent<HTMLDivElement>) => void;
19
+ handlePointerUp: (event: React.PointerEvent<HTMLDivElement>) => void;
20
+ };
21
+ export default useSnackbarSwipeDismiss;
22
+ //# sourceMappingURL=useSnackbarSwipeDismiss.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useSnackbarSwipeDismiss.d.ts","sourceRoot":"","sources":["../../../../src/Prompt/Snackbar/useSnackbarSwipeDismiss.ts"],"names":[],"mappings":"AAeA;;;;;GAKG;AACH,QAAA,MAAM,uBAAuB,GAAI,+CAI9B;IACD,gBAAgB,EAAE,MAAM,IAAI,CAAC;IAC7B,4FAA4F;IAC5F,aAAa,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,IAAI,CAAC;IAC1C,OAAO,EAAE,OAAO,CAAC;CAClB;;;gCAuHoC,KAAK,CAAC,UAAU,CAAC,cAAc,CAAC;iCA9BzD,IAAI,CAAC,YAAY,EAAE,WAAW,CAAC;+BAtEP,KAAK,CAAC,YAAY,CAAC,cAAc,CAAC;+BAkBlC,KAAK,CAAC,YAAY,CAAC,cAAc,CAAC;6BAepC,KAAK,CAAC,YAAY,CAAC,cAAc,CAAC;CAoFnE,CAAC;AAEF,eAAe,uBAAuB,CAAC"}
@@ -6,7 +6,7 @@ type SectionProps = PropsWithChildren<CommonProps & {
6
6
  }> & Pick<HTMLAttributes<HTMLDivElement>, 'role' | 'aria-labelledby'>;
7
7
  /**
8
8
  *
9
- * Neptune Web: https://transferwise.github.io/neptune-web/components/content/Section
9
+ * Neptune Web: https://storybook.wise.design/?path=/docs/content-section--docs
10
10
  *
11
11
  */
12
12
  declare const Section: ({ as: Element, children, className, withHorizontalPadding, role, ...restProps }: SectionProps) => import("react").JSX.Element;
@@ -10,7 +10,7 @@ export type TitleProps = LabelHTMLAttributes<HTMLHeadingElement | HTMLSpanElemen
10
10
  */
11
11
  type?: TitleTypes;
12
12
  };
13
- declare const Title: React.ForwardRefExoticComponent<React.LabelHTMLAttributes<HTMLHeadingElement | HTMLLabelElement | HTMLSpanElement> & React.LiHTMLAttributes<HTMLLIElement> & {
13
+ declare const Title: React.ForwardRefExoticComponent<React.LabelHTMLAttributes<HTMLSpanElement | HTMLHeadingElement | HTMLLabelElement> & React.LiHTMLAttributes<HTMLLIElement> & {
14
14
  /**
15
15
  * Default value will based one `type` prop
16
16
  */
@@ -19,6 +19,6 @@ declare const Title: React.ForwardRefExoticComponent<React.LabelHTMLAttributes<H
19
19
  * Default value: {@link DEFAULT_TYPE}
20
20
  */
21
21
  type?: TitleTypes;
22
- } & React.RefAttributes<HTMLHeadingElement | HTMLLabelElement | HTMLLegendElement | HTMLLIElement | HTMLSpanElement>>;
22
+ } & React.RefAttributes<HTMLSpanElement | HTMLHeadingElement | HTMLLabelElement | HTMLLegendElement | HTMLLIElement>>;
23
23
  export default Title;
24
24
  //# sourceMappingURL=Title.d.ts.map
@@ -15,7 +15,7 @@ export default class UploadImageStep extends PureComponent<UploadImageStepProps>
15
15
  uploadInputRef: import("react").RefObject<HTMLInputElement>;
16
16
  onManualUpload: () => void;
17
17
  onKeyDown: (event: React.KeyboardEvent<HTMLLabelElement>) => void;
18
- getImage: () => number | true | Iterable<import("react").ReactNode> | import("react").JSX.Element;
18
+ getImage: () => number | true | import("react").JSX.Element | Iterable<import("react").ReactNode>;
19
19
  render(): import("react").JSX.Element;
20
20
  }
21
21
  //# sourceMappingURL=UploadImageStep.d.ts.map
@@ -5,5 +5,5 @@ export declare const UploadItemLink: import("react").ForwardRefExoticComponent<{
5
5
  singleFileUpload: boolean;
6
6
  } & {
7
7
  children?: import("react").ReactNode | undefined;
8
- } & import("react").RefAttributes<HTMLAnchorElement | HTMLDivElement>>;
8
+ } & import("react").RefAttributes<HTMLDivElement | HTMLAnchorElement>>;
9
9
  //# sourceMappingURL=UploadItemLink.d.ts.map
@@ -64,7 +64,7 @@ export interface SelectProps {
64
64
  onSearchChange?: (value: string) => void;
65
65
  }
66
66
  /**
67
- * @deprecated Use `SelectInput` instead (https://neptune.wise.design/blog/2023-11-28-adopting-our-new-selectinput)
67
+ * @deprecated Use `SelectInput` instead (https://storybook.wise.design/?path=/docs/forms-selectinput--docs)
68
68
  */
69
69
  export default function Select({ placeholder, id, required, disabled, inverse, dropdownWidth, size, block, selected, search, onChange, onFocus, onBlur, options: defaultOptions, onSearchChange, searchValue: initSearchValue, searchPlaceholder, classNames: classNamesProp, dropdownUp, dropdownProps, buttonProps, }: SelectProps): import("react").JSX.Element;
70
70
  export {};
@@ -5,9 +5,7 @@ export type BottomSheetProps = PropsWithChildren<{
5
5
  open: boolean;
6
6
  } & CommonProps & Pick<HTMLAttributes<HTMLDivElement>, 'role' | 'aria-labelledby' | 'aria-label'>>;
7
7
  /**
8
- * Neptune: https://transferwise.github.io/neptune/components/bottom-sheet/
9
- *
10
- * Neptune Web: https://transferwise.github.io/neptune-web/components/overlays/BottomSheet
8
+ * Design guidance: https://docs.wise.design/components/bottom-sheet/
11
9
  *
12
10
  */
13
11
  declare const BottomSheet: ({ role, ...props }: BottomSheetProps) => import("react").JSX.Element;
@@ -1 +1 @@
1
- {"version":3,"file":"BottomSheet.d.ts","sourceRoot":"","sources":["../../../../src/common/BottomSheet/BottomSheet.tsx"],"names":[],"mappings":"AACA,OAAO,EAEL,cAAc,EACd,iBAAiB,EACjB,cAAc,EAIf,MAAM,OAAO,CAAC;AAQf,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAY7C,MAAM,MAAM,gBAAgB,GAAG,iBAAiB,CAC9C;IACE,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,GAAG,cAAc,KAAK,IAAI,CAAC;IAClD,IAAI,EAAE,OAAO,CAAC;CACf,GAAG,WAAW,GACb,IAAI,CAAC,cAAc,CAAC,cAAc,CAAC,EAAE,MAAM,GAAG,iBAAiB,GAAG,YAAY,CAAC,CAClF,CAAC;AAEF;;;;;GAKG;AACH,QAAA,MAAM,WAAW,GAAI,oBAA+B,gBAAgB,gCA4LnE,CAAC;AAEF,eAAe,WAAW,CAAC"}
1
+ {"version":3,"file":"BottomSheet.d.ts","sourceRoot":"","sources":["../../../../src/common/BottomSheet/BottomSheet.tsx"],"names":[],"mappings":"AACA,OAAO,EAEL,cAAc,EACd,iBAAiB,EACjB,cAAc,EAIf,MAAM,OAAO,CAAC;AAQf,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAY7C,MAAM,MAAM,gBAAgB,GAAG,iBAAiB,CAC9C;IACE,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,GAAG,cAAc,KAAK,IAAI,CAAC;IAClD,IAAI,EAAE,OAAO,CAAC;CACf,GAAG,WAAW,GACb,IAAI,CAAC,cAAc,CAAC,cAAc,CAAC,EAAE,MAAM,GAAG,iBAAiB,GAAG,YAAY,CAAC,CAClF,CAAC;AAEF;;;GAGG;AACH,QAAA,MAAM,WAAW,GAAI,oBAA+B,gBAAgB,gCA4LnE,CAAC;AAEF,eAAe,WAAW,CAAC"}