@transferwise/components 0.0.0-experimental-e789c10 → 0.0.0-experimental-c84454a

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 (239) hide show
  1. package/build/dateInput/DateInput.js +5 -12
  2. package/build/dateInput/DateInput.js.map +1 -1
  3. package/build/dateInput/DateInput.mjs +4 -11
  4. package/build/dateInput/DateInput.mjs.map +1 -1
  5. package/build/expressiveMoneyInput/currencySelector/CurrencySelector.js +8 -16
  6. package/build/expressiveMoneyInput/currencySelector/CurrencySelector.js.map +1 -1
  7. package/build/expressiveMoneyInput/currencySelector/CurrencySelector.mjs +6 -14
  8. package/build/expressiveMoneyInput/currencySelector/CurrencySelector.mjs.map +1 -1
  9. package/build/index.js +7 -12
  10. package/build/index.js.map +1 -1
  11. package/build/index.mjs +3 -9
  12. package/build/index.mjs.map +1 -1
  13. package/build/inputs/SelectInput.js +890 -0
  14. package/build/inputs/SelectInput.js.map +1 -0
  15. package/build/inputs/SelectInput.messages.js.map +1 -0
  16. package/build/inputs/SelectInput.messages.mjs.map +1 -0
  17. package/build/inputs/SelectInput.mjs +881 -0
  18. package/build/inputs/SelectInput.mjs.map +1 -0
  19. package/build/inputs/{SelectInput/BottomSheet/SelectInputBottomSheet.js → _BottomSheet.js} +7 -7
  20. package/build/inputs/_BottomSheet.js.map +1 -0
  21. package/build/inputs/{SelectInput/BottomSheet/SelectInputBottomSheet.mjs → _BottomSheet.mjs} +7 -7
  22. package/build/inputs/_BottomSheet.mjs.map +1 -0
  23. package/build/inputs/{SelectInput/ButtonInput/SelectInputButtonInput.js → _ButtonInput.js} +5 -5
  24. package/build/inputs/_ButtonInput.js.map +1 -0
  25. package/build/inputs/{SelectInput/ButtonInput/SelectInputButtonInput.mjs → _ButtonInput.mjs} +5 -5
  26. package/build/inputs/_ButtonInput.mjs.map +1 -0
  27. package/build/inputs/{SelectInput/Popover/SelectInputPopover.js → _Popover.js} +7 -7
  28. package/build/inputs/_Popover.js.map +1 -0
  29. package/build/inputs/{SelectInput/Popover/SelectInputPopover.mjs → _Popover.mjs} +7 -7
  30. package/build/inputs/_Popover.mjs.map +1 -0
  31. package/build/main.css +126 -126
  32. package/build/moneyInput/MoneyInput.js +2 -9
  33. package/build/moneyInput/MoneyInput.js.map +1 -1
  34. package/build/moneyInput/MoneyInput.mjs +1 -8
  35. package/build/moneyInput/MoneyInput.mjs.map +1 -1
  36. package/build/phoneNumberInput/PhoneNumberInput.js +3 -10
  37. package/build/phoneNumberInput/PhoneNumberInput.js.map +1 -1
  38. package/build/phoneNumberInput/PhoneNumberInput.mjs +2 -9
  39. package/build/phoneNumberInput/PhoneNumberInput.mjs.map +1 -1
  40. package/build/styles/main.css +126 -126
  41. package/build/styles/sentimentSurface/SentimentSurface.css +36 -36
  42. package/build/types/index.d.ts +1 -1
  43. package/build/types/index.d.ts.map +1 -1
  44. package/build/types/inputs/{SelectInput/SelectInput.types.d.ts → SelectInput.d.ts} +38 -12
  45. package/build/types/inputs/SelectInput.d.ts.map +1 -0
  46. package/build/types/inputs/SelectInput.messages.d.ts.map +1 -0
  47. package/build/types/inputs/{SelectInput/BottomSheet/SelectInputBottomSheet.d.ts → _BottomSheet.d.ts} +3 -3
  48. package/build/types/inputs/_BottomSheet.d.ts.map +1 -0
  49. package/build/types/inputs/_ButtonInput.d.ts +5 -0
  50. package/build/types/inputs/_ButtonInput.d.ts.map +1 -0
  51. package/build/types/inputs/{SelectInput/Popover/SelectInputPopover.d.ts → _Popover.d.ts} +3 -3
  52. package/build/types/inputs/_Popover.d.ts.map +1 -0
  53. package/package.json +1 -1
  54. package/src/index.ts +1 -0
  55. package/src/inputs/{SelectInput/_stories/SelectInput.docs.mdx → SelectInput.docs.mdx} +1 -0
  56. package/src/inputs/SelectInput.less +219 -0
  57. package/src/inputs/{SelectInput/_stories/SelectInput.story.tsx → SelectInput.story.tsx} +8 -11
  58. package/src/inputs/{SelectInput/_stories/SelectInput.test.story.tsx → SelectInput.test.story.tsx} +10 -6
  59. package/src/inputs/{SelectInput/SelectInput.test.tsx → SelectInput.test.tsx} +11 -9
  60. package/src/inputs/SelectInput.tsx +1269 -0
  61. package/src/inputs/{SelectInput/BottomSheet/SelectInputBottomSheet.tsx → _BottomSheet.tsx} +7 -7
  62. package/src/inputs/{SelectInput/ButtonInput/SelectInputButtonInput.tsx → _ButtonInput.tsx} +5 -5
  63. package/src/inputs/{SelectInput/Popover/SelectInputPopover.tsx → _Popover.tsx} +7 -7
  64. package/src/main.css +126 -126
  65. package/src/main.less +1 -1
  66. package/src/sentimentSurface/SentimentSurface.css +36 -36
  67. package/src/sentimentSurface/SentimentSurface.less +12 -12
  68. package/build/inputs/SelectInput/BottomSheet/SelectInputBottomSheet.js.map +0 -1
  69. package/build/inputs/SelectInput/BottomSheet/SelectInputBottomSheet.mjs.map +0 -1
  70. package/build/inputs/SelectInput/ButtonInput/SelectInputButtonInput.js.map +0 -1
  71. package/build/inputs/SelectInput/ButtonInput/SelectInputButtonInput.mjs.map +0 -1
  72. package/build/inputs/SelectInput/ClearButton/SelectInputClearButton.js +0 -26
  73. package/build/inputs/SelectInput/ClearButton/SelectInputClearButton.js.map +0 -1
  74. package/build/inputs/SelectInput/ClearButton/SelectInputClearButton.mjs +0 -24
  75. package/build/inputs/SelectInput/ClearButton/SelectInputClearButton.mjs.map +0 -1
  76. package/build/inputs/SelectInput/DefaultRenderTrigger/SelectInputDefaultRenderTrigger.js +0 -59
  77. package/build/inputs/SelectInput/DefaultRenderTrigger/SelectInputDefaultRenderTrigger.js.map +0 -1
  78. package/build/inputs/SelectInput/DefaultRenderTrigger/SelectInputDefaultRenderTrigger.mjs +0 -56
  79. package/build/inputs/SelectInput/DefaultRenderTrigger/SelectInputDefaultRenderTrigger.mjs.map +0 -1
  80. package/build/inputs/SelectInput/ItemView/GroupItemView/SelectInputGroupItemView.js +0 -50
  81. package/build/inputs/SelectInput/ItemView/GroupItemView/SelectInputGroupItemView.js.map +0 -1
  82. package/build/inputs/SelectInput/ItemView/GroupItemView/SelectInputGroupItemView.mjs +0 -48
  83. package/build/inputs/SelectInput/ItemView/GroupItemView/SelectInputGroupItemView.mjs.map +0 -1
  84. package/build/inputs/SelectInput/ItemView/SelectInputItemView.js +0 -47
  85. package/build/inputs/SelectInput/ItemView/SelectInputItemView.js.map +0 -1
  86. package/build/inputs/SelectInput/ItemView/SelectInputItemView.mjs +0 -45
  87. package/build/inputs/SelectInput/ItemView/SelectInputItemView.mjs.map +0 -1
  88. package/build/inputs/SelectInput/Option/SelectInputOption.js +0 -42
  89. package/build/inputs/SelectInput/Option/SelectInputOption.js.map +0 -1
  90. package/build/inputs/SelectInput/Option/SelectInputOption.mjs +0 -40
  91. package/build/inputs/SelectInput/Option/SelectInputOption.mjs.map +0 -1
  92. package/build/inputs/SelectInput/OptionContent/SelectInputOptionContent.js +0 -40
  93. package/build/inputs/SelectInput/OptionContent/SelectInputOptionContent.js.map +0 -1
  94. package/build/inputs/SelectInput/OptionContent/SelectInputOptionContent.mjs +0 -38
  95. package/build/inputs/SelectInput/OptionContent/SelectInputOptionContent.mjs.map +0 -1
  96. package/build/inputs/SelectInput/Options/OptionsContainer/SelectInputOptionsContainer.js +0 -48
  97. package/build/inputs/SelectInput/Options/OptionsContainer/SelectInputOptionsContainer.js.map +0 -1
  98. package/build/inputs/SelectInput/Options/OptionsContainer/SelectInputOptionsContainer.mjs +0 -46
  99. package/build/inputs/SelectInput/Options/OptionsContainer/SelectInputOptionsContainer.mjs.map +0 -1
  100. package/build/inputs/SelectInput/Options/SelectInputOptions.js +0 -300
  101. package/build/inputs/SelectInput/Options/SelectInputOptions.js.map +0 -1
  102. package/build/inputs/SelectInput/Options/SelectInputOptions.mjs +0 -298
  103. package/build/inputs/SelectInput/Options/SelectInputOptions.mjs.map +0 -1
  104. package/build/inputs/SelectInput/Popover/SelectInputPopover.js.map +0 -1
  105. package/build/inputs/SelectInput/Popover/SelectInputPopover.mjs.map +0 -1
  106. package/build/inputs/SelectInput/SelectInput.contexts.js +0 -29
  107. package/build/inputs/SelectInput/SelectInput.contexts.js.map +0 -1
  108. package/build/inputs/SelectInput/SelectInput.contexts.mjs +0 -24
  109. package/build/inputs/SelectInput/SelectInput.contexts.mjs.map +0 -1
  110. package/build/inputs/SelectInput/SelectInput.js +0 -222
  111. package/build/inputs/SelectInput/SelectInput.js.map +0 -1
  112. package/build/inputs/SelectInput/SelectInput.messages.js.map +0 -1
  113. package/build/inputs/SelectInput/SelectInput.messages.mjs.map +0 -1
  114. package/build/inputs/SelectInput/SelectInput.mjs +0 -216
  115. package/build/inputs/SelectInput/SelectInput.mjs.map +0 -1
  116. package/build/inputs/SelectInput/SelectInput.utils.js +0 -164
  117. package/build/inputs/SelectInput/SelectInput.utils.js.map +0 -1
  118. package/build/inputs/SelectInput/SelectInput.utils.mjs +0 -154
  119. package/build/inputs/SelectInput/SelectInput.utils.mjs.map +0 -1
  120. package/build/inputs/SelectInput/TriggerButton/SelectInputTriggerButton.js +0 -42
  121. package/build/inputs/SelectInput/TriggerButton/SelectInputTriggerButton.js.map +0 -1
  122. package/build/inputs/SelectInput/TriggerButton/SelectInputTriggerButton.mjs +0 -36
  123. package/build/inputs/SelectInput/TriggerButton/SelectInputTriggerButton.mjs.map +0 -1
  124. package/build/styles/inputs/SelectInput/BottomSheet/SelectInputBottomSheet.css +0 -96
  125. package/build/styles/inputs/SelectInput/ButtonInput/SelectInputButtonInput.css +0 -16
  126. package/build/styles/inputs/SelectInput/ClearButton/SelectInputClearButton.css +0 -46
  127. package/build/styles/inputs/SelectInput/ItemView/SelectInputItemView.css +0 -16
  128. package/build/styles/inputs/SelectInput/Option/SelectInputOption.css +0 -33
  129. package/build/styles/inputs/SelectInput/OptionContent/SelectInputOptionContent.css +0 -37
  130. package/build/styles/inputs/SelectInput/Options/SelectInputOptions.css +0 -81
  131. package/build/styles/inputs/SelectInput/Popover/SelectInputPopover.css +0 -46
  132. package/build/types/inputs/SelectInput/BottomSheet/SelectInputBottomSheet.d.ts.map +0 -1
  133. package/build/types/inputs/SelectInput/BottomSheet/index.d.ts +0 -3
  134. package/build/types/inputs/SelectInput/BottomSheet/index.d.ts.map +0 -1
  135. package/build/types/inputs/SelectInput/ButtonInput/SelectInputButtonInput.d.ts +0 -5
  136. package/build/types/inputs/SelectInput/ButtonInput/SelectInputButtonInput.d.ts.map +0 -1
  137. package/build/types/inputs/SelectInput/ButtonInput/index.d.ts +0 -3
  138. package/build/types/inputs/SelectInput/ButtonInput/index.d.ts.map +0 -1
  139. package/build/types/inputs/SelectInput/ClearButton/SelectInputClearButton.d.ts +0 -7
  140. package/build/types/inputs/SelectInput/ClearButton/SelectInputClearButton.d.ts.map +0 -1
  141. package/build/types/inputs/SelectInput/ClearButton/index.d.ts +0 -3
  142. package/build/types/inputs/SelectInput/ClearButton/index.d.ts.map +0 -1
  143. package/build/types/inputs/SelectInput/DefaultRenderTrigger/SelectInputDefaultRenderTrigger.d.ts +0 -16
  144. package/build/types/inputs/SelectInput/DefaultRenderTrigger/SelectInputDefaultRenderTrigger.d.ts.map +0 -1
  145. package/build/types/inputs/SelectInput/DefaultRenderTrigger/index.d.ts +0 -2
  146. package/build/types/inputs/SelectInput/DefaultRenderTrigger/index.d.ts.map +0 -1
  147. package/build/types/inputs/SelectInput/ItemView/GroupItemView/SelectInputGroupItemView.d.ts +0 -9
  148. package/build/types/inputs/SelectInput/ItemView/GroupItemView/SelectInputGroupItemView.d.ts.map +0 -1
  149. package/build/types/inputs/SelectInput/ItemView/GroupItemView/index.d.ts +0 -3
  150. package/build/types/inputs/SelectInput/ItemView/GroupItemView/index.d.ts.map +0 -1
  151. package/build/types/inputs/SelectInput/ItemView/SelectInputItemView.d.ts +0 -11
  152. package/build/types/inputs/SelectInput/ItemView/SelectInputItemView.d.ts.map +0 -1
  153. package/build/types/inputs/SelectInput/ItemView/index.d.ts +0 -4
  154. package/build/types/inputs/SelectInput/ItemView/index.d.ts.map +0 -1
  155. package/build/types/inputs/SelectInput/Option/SelectInputOption.d.ts +0 -11
  156. package/build/types/inputs/SelectInput/Option/SelectInputOption.d.ts.map +0 -1
  157. package/build/types/inputs/SelectInput/Option/index.d.ts +0 -3
  158. package/build/types/inputs/SelectInput/Option/index.d.ts.map +0 -1
  159. package/build/types/inputs/SelectInput/OptionContent/SelectInputOptionContent.d.ts +0 -13
  160. package/build/types/inputs/SelectInput/OptionContent/SelectInputOptionContent.d.ts.map +0 -1
  161. package/build/types/inputs/SelectInput/OptionContent/index.d.ts +0 -3
  162. package/build/types/inputs/SelectInput/OptionContent/index.d.ts.map +0 -1
  163. package/build/types/inputs/SelectInput/Options/OptionsContainer/SelectInputOptionsContainer.d.ts +0 -9
  164. package/build/types/inputs/SelectInput/Options/OptionsContainer/SelectInputOptionsContainer.d.ts.map +0 -1
  165. package/build/types/inputs/SelectInput/Options/OptionsContainer/index.d.ts +0 -3
  166. package/build/types/inputs/SelectInput/Options/OptionsContainer/index.d.ts.map +0 -1
  167. package/build/types/inputs/SelectInput/Options/SelectInputOptions.d.ts +0 -21
  168. package/build/types/inputs/SelectInput/Options/SelectInputOptions.d.ts.map +0 -1
  169. package/build/types/inputs/SelectInput/Options/index.d.ts +0 -4
  170. package/build/types/inputs/SelectInput/Options/index.d.ts.map +0 -1
  171. package/build/types/inputs/SelectInput/Popover/SelectInputPopover.d.ts.map +0 -1
  172. package/build/types/inputs/SelectInput/Popover/index.d.ts +0 -3
  173. package/build/types/inputs/SelectInput/Popover/index.d.ts.map +0 -1
  174. package/build/types/inputs/SelectInput/SelectInput.contexts.d.ts +0 -33
  175. package/build/types/inputs/SelectInput/SelectInput.contexts.d.ts.map +0 -1
  176. package/build/types/inputs/SelectInput/SelectInput.d.ts +0 -10
  177. package/build/types/inputs/SelectInput/SelectInput.d.ts.map +0 -1
  178. package/build/types/inputs/SelectInput/SelectInput.messages.d.ts.map +0 -1
  179. package/build/types/inputs/SelectInput/SelectInput.types.d.ts.map +0 -1
  180. package/build/types/inputs/SelectInput/SelectInput.utils.d.ts +0 -60
  181. package/build/types/inputs/SelectInput/SelectInput.utils.d.ts.map +0 -1
  182. package/build/types/inputs/SelectInput/TriggerButton/SelectInputTriggerButton.d.ts +0 -12
  183. package/build/types/inputs/SelectInput/TriggerButton/SelectInputTriggerButton.d.ts.map +0 -1
  184. package/build/types/inputs/SelectInput/TriggerButton/index.d.ts +0 -3
  185. package/build/types/inputs/SelectInput/TriggerButton/index.d.ts.map +0 -1
  186. package/build/types/inputs/SelectInput/components.d.ts +0 -10
  187. package/build/types/inputs/SelectInput/components.d.ts.map +0 -1
  188. package/build/types/inputs/SelectInput/index.d.ts +0 -10
  189. package/build/types/inputs/SelectInput/index.d.ts.map +0 -1
  190. package/src/inputs/SelectInput/BottomSheet/SelectInputBottomSheet.css +0 -96
  191. package/src/inputs/SelectInput/BottomSheet/index.ts +0 -2
  192. package/src/inputs/SelectInput/ButtonInput/SelectInputButtonInput.css +0 -16
  193. package/src/inputs/SelectInput/ButtonInput/index.ts +0 -2
  194. package/src/inputs/SelectInput/ClearButton/SelectInputClearButton.css +0 -46
  195. package/src/inputs/SelectInput/ClearButton/SelectInputClearButton.less +0 -39
  196. package/src/inputs/SelectInput/ClearButton/SelectInputClearButton.tsx +0 -27
  197. package/src/inputs/SelectInput/ClearButton/index.ts +0 -2
  198. package/src/inputs/SelectInput/DefaultRenderTrigger/SelectInputDefaultRenderTrigger.tsx +0 -74
  199. package/src/inputs/SelectInput/DefaultRenderTrigger/index.ts +0 -5
  200. package/src/inputs/SelectInput/ItemView/GroupItemView/SelectInputGroupItemView.tsx +0 -61
  201. package/src/inputs/SelectInput/ItemView/GroupItemView/index.ts +0 -2
  202. package/src/inputs/SelectInput/ItemView/SelectInputItemView.css +0 -16
  203. package/src/inputs/SelectInput/ItemView/SelectInputItemView.less +0 -17
  204. package/src/inputs/SelectInput/ItemView/SelectInputItemView.tsx +0 -48
  205. package/src/inputs/SelectInput/ItemView/index.ts +0 -3
  206. package/src/inputs/SelectInput/Option/SelectInputOption.css +0 -33
  207. package/src/inputs/SelectInput/Option/SelectInputOption.less +0 -32
  208. package/src/inputs/SelectInput/Option/SelectInputOption.tsx +0 -57
  209. package/src/inputs/SelectInput/Option/index.ts +0 -2
  210. package/src/inputs/SelectInput/OptionContent/SelectInputOptionContent.css +0 -37
  211. package/src/inputs/SelectInput/OptionContent/SelectInputOptionContent.less +0 -38
  212. package/src/inputs/SelectInput/OptionContent/SelectInputOptionContent.tsx +0 -72
  213. package/src/inputs/SelectInput/OptionContent/index.ts +0 -2
  214. package/src/inputs/SelectInput/Options/OptionsContainer/SelectInputOptionsContainer.tsx +0 -59
  215. package/src/inputs/SelectInput/Options/OptionsContainer/index.ts +0 -2
  216. package/src/inputs/SelectInput/Options/SelectInputOptions.css +0 -81
  217. package/src/inputs/SelectInput/Options/SelectInputOptions.less +0 -77
  218. package/src/inputs/SelectInput/Options/SelectInputOptions.tsx +0 -411
  219. package/src/inputs/SelectInput/Options/index.ts +0 -3
  220. package/src/inputs/SelectInput/Popover/SelectInputPopover.css +0 -46
  221. package/src/inputs/SelectInput/Popover/index.ts +0 -2
  222. package/src/inputs/SelectInput/SelectInput.contexts.tsx +0 -40
  223. package/src/inputs/SelectInput/SelectInput.less +0 -22
  224. package/src/inputs/SelectInput/SelectInput.tsx +0 -257
  225. package/src/inputs/SelectInput/SelectInput.types.ts +0 -113
  226. package/src/inputs/SelectInput/SelectInput.utils.ts +0 -205
  227. package/src/inputs/SelectInput/TriggerButton/SelectInputTriggerButton.tsx +0 -36
  228. package/src/inputs/SelectInput/TriggerButton/index.ts +0 -5
  229. package/src/inputs/SelectInput/components.ts +0 -10
  230. package/src/inputs/SelectInput/index.ts +0 -12
  231. package/build/inputs/{SelectInput/SelectInput.messages.js → SelectInput.messages.js} +0 -0
  232. package/build/inputs/{SelectInput/SelectInput.messages.mjs → SelectInput.messages.mjs} +0 -0
  233. package/build/styles/inputs/{SelectInput/SelectInput.css → SelectInput.css} +90 -90
  234. package/build/types/inputs/{SelectInput/SelectInput.messages.d.ts → SelectInput.messages.d.ts} +0 -0
  235. package/src/inputs/{SelectInput/SelectInput.css → SelectInput.css} +90 -90
  236. /package/src/inputs/{SelectInput/SelectInput.messages.ts → SelectInput.messages.ts} +0 -0
  237. /package/src/inputs/{SelectInput/BottomSheet/SelectInputBottomSheet.less → _BottomSheet.less} +0 -0
  238. /package/src/inputs/{SelectInput/ButtonInput/SelectInputButtonInput.less → _ButtonInput.less} +0 -0
  239. /package/src/inputs/{SelectInput/Popover/SelectInputPopover.less → _Popover.less} +0 -0
@@ -12,12 +12,12 @@ import { ThemeProvider, useTheme } from '@wise/components-theming';
12
12
  import { clsx } from 'clsx';
13
13
  import { Fragment, useState } from 'react';
14
14
 
15
- import { CloseButton } from '../../../common/closeButton';
16
- import { useVirtualKeyboard } from '../../../common/hooks/useVirtualKeyboard';
17
- import { PreventScroll } from '../../../common/preventScroll/PreventScroll';
18
- import { Size } from '../../../common/propsValues/size';
15
+ import { CloseButton } from '../common/closeButton';
16
+ import { useVirtualKeyboard } from '../common/hooks/useVirtualKeyboard';
17
+ import { PreventScroll } from '../common/preventScroll/PreventScroll';
18
+ import { Size } from '../common/propsValues/size';
19
19
 
20
- export interface SelectInputBottomSheetProps {
20
+ export interface BottomSheetProps {
21
21
  open: boolean;
22
22
  renderTrigger?: (args: {
23
23
  ref: React.RefCallback<Element>;
@@ -33,7 +33,7 @@ export interface SelectInputBottomSheetProps {
33
33
  onCloseEnd?: () => void;
34
34
  }
35
35
 
36
- export function SelectInputBottomSheet({
36
+ export function BottomSheet({
37
37
  open,
38
38
  renderTrigger,
39
39
  title,
@@ -42,7 +42,7 @@ export function SelectInputBottomSheet({
42
42
  children,
43
43
  onClose,
44
44
  onCloseEnd,
45
- }: SelectInputBottomSheetProps) {
45
+ }: BottomSheetProps) {
46
46
  useVirtualKeyboard(open);
47
47
 
48
48
  const { refs, context } = useFloating<Element>({
@@ -1,15 +1,15 @@
1
1
  import { clsx } from 'clsx';
2
2
  import { forwardRef } from 'react';
3
3
 
4
- import { useInputPaddings } from '../../InputGroup';
5
- import { inputClassNameBase } from '../../_common';
4
+ import { useInputPaddings } from './InputGroup';
5
+ import { inputClassNameBase } from './_common';
6
6
 
7
- export interface SelectInputButtonInputProps extends React.ComponentPropsWithRef<'button'> {
7
+ export interface ButtonInputProps extends React.ComponentPropsWithRef<'button'> {
8
8
  size?: 'sm' | 'md' | 'lg';
9
9
  }
10
10
 
11
- export const SelectInputButtonInput = forwardRef(function ButtonInput(
12
- { size = 'md', className, style, ...restProps }: SelectInputButtonInputProps,
11
+ export const ButtonInput = forwardRef(function ButtonInput(
12
+ { size = 'md', className, style, ...restProps }: ButtonInputProps,
13
13
  ref: React.ForwardedRef<HTMLButtonElement | null>,
14
14
  ) {
15
15
  const inputPaddings = useInputPaddings();
@@ -18,9 +18,9 @@ import { ThemeProvider, useTheme } from '@wise/components-theming';
18
18
  import { clsx } from 'clsx';
19
19
  import { useState } from 'react';
20
20
 
21
- import { PreventScroll } from '../../../common/preventScroll/PreventScroll';
21
+ import { PreventScroll } from '../common/preventScroll/PreventScroll';
22
22
 
23
- export interface SelectInputPopoverProps {
23
+ export interface PopoverProps {
24
24
  placement?: Placement;
25
25
  open: boolean;
26
26
  renderTrigger: (args: {
@@ -37,9 +37,9 @@ export interface SelectInputPopoverProps {
37
37
  onCloseEnd?: () => void;
38
38
  }
39
39
 
40
- const FLOATING_PADDING = 16;
40
+ const floatingPadding = 16;
41
41
 
42
- export function SelectInputPopover({
42
+ export function Popover({
43
43
  placement,
44
44
  open,
45
45
  renderTrigger,
@@ -49,16 +49,16 @@ export function SelectInputPopover({
49
49
  children,
50
50
  onClose,
51
51
  onCloseEnd,
52
- }: SelectInputPopoverProps) {
52
+ }: PopoverProps) {
53
53
  const { refs, floatingStyles, context } = useFloating<Element>({
54
54
  strategy: 'fixed',
55
55
  placement,
56
56
  middleware: [
57
57
  offset(8),
58
- flip({ padding: FLOATING_PADDING, crossAxis: false }),
58
+ flip({ padding: floatingPadding, crossAxis: false }),
59
59
  shift(),
60
60
  floatingSize({
61
- padding: FLOATING_PADDING,
61
+ padding: floatingPadding,
62
62
  apply: ({ elements, rects, availableHeight }) => {
63
63
  elements.floating.style.setProperty('--max-height', `${availableHeight}px`);
64
64
  elements.floating.style.setProperty('--width', `${rects.reference.width}px`);
package/src/main.css CHANGED
@@ -226,12 +226,12 @@
226
226
  .np-theme-platform.wds-sentiment-surface-success-elevated,
227
227
  .np-theme-personal--bright-green.wds-sentiment-surface-success-elevated,
228
228
  .np-theme-business--bright-green.wds-sentiment-surface-success-elevated {
229
- --color-sentiment-content-primary: #E2F6D5;
230
- --color-sentiment-content-primary-hover: #D3F2C0;
231
- --color-sentiment-content-primary-active: #C5EDAB;
232
- --color-sentiment-interactive-primary: #E2F6D5;
233
- --color-sentiment-interactive-primary-hover: #D3F2C0;
234
- --color-sentiment-interactive-primary-active: #C5EDAB;
229
+ --color-sentiment-content-primary: #CEF1B8;
230
+ --color-sentiment-content-primary-hover: #E0FFCC;
231
+ --color-sentiment-content-primary-active: #E1F4D4;
232
+ --color-sentiment-interactive-primary: #CEF1B8;
233
+ --color-sentiment-interactive-primary-hover: #E0FFCC;
234
+ --color-sentiment-interactive-primary-active: #E1F4D4;
235
235
  --color-sentiment-interactive-secondary: #054D28;
236
236
  --color-sentiment-interactive-secondary-hover: #043A1E;
237
237
  --color-sentiment-interactive-secondary-active: #022614;
@@ -250,24 +250,24 @@
250
250
  .np-theme-personal--forest-green.wds-sentiment-surface-success-base,
251
251
  .np-theme-business--forest-green.wds-sentiment-surface-success-base,
252
252
  .np-theme-platform--forest-green.wds-sentiment-surface-success-base {
253
- --color-sentiment-content-primary: #BAE5A0;
254
- --color-sentiment-content-primary-hover: #C8EAB3;
255
- --color-sentiment-content-primary-active: #D6F0C7;
256
- --color-sentiment-interactive-primary: #BAE5A0;
257
- --color-sentiment-interactive-primary-hover: #C8EAB3;
258
- --color-sentiment-interactive-primary-active: #D6F0C7;
259
- --color-sentiment-interactive-secondary: #252C20;
260
- --color-sentiment-interactive-secondary-hover: #323B2B;
261
- --color-sentiment-interactive-secondary-active: #3E4A36;
262
- --color-sentiment-interactive-secondary-neutral: #37422F;
263
- --color-sentiment-interactive-secondary-neutral-hover: #46533B;
264
- --color-sentiment-interactive-secondary-neutral-active: #546548;
265
- --color-sentiment-interactive-control: #252C20;
266
- --color-sentiment-interactive-control-hover: #323B2B;
267
- --color-sentiment-interactive-control-active: #3E4A36;
268
- --color-sentiment-background-surface: #252C20;
269
- --color-sentiment-background-surface-hover: #323B2B;
270
- --color-sentiment-background-surface-active: #3E4A36;
253
+ --color-sentiment-content-primary: #CEF1B8;
254
+ --color-sentiment-content-primary-hover: #E0FFCC;
255
+ --color-sentiment-content-primary-active: #E1F4D4;
256
+ --color-sentiment-interactive-primary: #CEF1B8;
257
+ --color-sentiment-interactive-primary-hover: #E0FFCC;
258
+ --color-sentiment-interactive-primary-active: #E1F4D4;
259
+ --color-sentiment-interactive-secondary: #054D28;
260
+ --color-sentiment-interactive-secondary-hover: #043A1E;
261
+ --color-sentiment-interactive-secondary-active: #022614;
262
+ --color-sentiment-interactive-secondary-neutral: #256A43;
263
+ --color-sentiment-interactive-secondary-neutral-hover: #2A794C;
264
+ --color-sentiment-interactive-secondary-neutral-active: #329057;
265
+ --color-sentiment-interactive-control: #054D28;
266
+ --color-sentiment-interactive-control-hover: #043A1E;
267
+ --color-sentiment-interactive-control-active: #022614;
268
+ --color-sentiment-background-surface: #054D28;
269
+ --color-sentiment-background-surface-hover: #043A1E;
270
+ --color-sentiment-background-surface-active: #022614;
271
271
  }
272
272
  .np-theme-personal--dark.wds-sentiment-surface-success-elevated,
273
273
  .np-theme-business--dark.wds-sentiment-surface-success-elevated,
@@ -448,18 +448,18 @@
448
448
  --color-sentiment-interactive-primary: #E0F7F7;
449
449
  --color-sentiment-interactive-primary-hover: #CAF1F1;
450
450
  --color-sentiment-interactive-primary-active: #B6ECEC;
451
- --color-sentiment-interactive-secondary: #0B312F;
452
- --color-sentiment-interactive-secondary-hover: #124F4C;
453
- --color-sentiment-interactive-secondary-active: #176460;
454
- --color-sentiment-interactive-secondary-neutral: #174E4D;
455
- --color-sentiment-interactive-secondary-neutral-hover: #1D6261;
456
- --color-sentiment-interactive-secondary-neutral-active: #237675;
457
- --color-sentiment-interactive-control: #0B312F;
458
- --color-sentiment-interactive-control-hover: #124F4C;
459
- --color-sentiment-interactive-control-active: #176460;
460
- --color-sentiment-background-surface: #0B312F;
461
- --color-sentiment-background-surface-hover: #124F4C;
462
- --color-sentiment-background-surface-active: #176460;
451
+ --color-sentiment-interactive-secondary: #054D4D;
452
+ --color-sentiment-interactive-secondary-hover: #043A3A;
453
+ --color-sentiment-interactive-secondary-active: #022626;
454
+ --color-sentiment-interactive-secondary-neutral: #1F6161;
455
+ --color-sentiment-interactive-secondary-neutral-hover: #247070;
456
+ --color-sentiment-interactive-secondary-neutral-active: #298080;
457
+ --color-sentiment-interactive-control: #054D4D;
458
+ --color-sentiment-interactive-control-hover: #043A3A;
459
+ --color-sentiment-interactive-control-active: #022626;
460
+ --color-sentiment-background-surface: #054D4D;
461
+ --color-sentiment-background-surface-hover: #043A3A;
462
+ --color-sentiment-background-surface-active: #022626;
463
463
  }
464
464
  .np-theme-personal--dark.wds-sentiment-surface-proposition-elevated,
465
465
  .np-theme-business--dark.wds-sentiment-surface-proposition-elevated,
@@ -4002,91 +4002,14 @@ html:not([dir="rtl"]) .np-flow-navigation--sm .np-flow-navigation__stepper {
4002
4002
  color: #5d7079;
4003
4003
  color: var(--color-content-secondary);
4004
4004
  }
4005
- .np-select-input-option-container {
4006
- display: flex;
4007
- cursor: default;
4008
- -webkit-user-select: none;
4009
- -moz-user-select: none;
4010
- user-select: none;
4011
- align-items: center;
4012
- -moz-column-gap: 8px;
4013
- column-gap: 8px;
4014
- -moz-column-gap: var(--size-8);
4015
- column-gap: var(--size-8);
4016
- border-radius: 10px;
4017
- border-radius: var(--radius-small);
4018
- padding: 12px 16px;
4019
- padding: var(--size-12) var(--size-16);
4020
- color: var(--color-interactive-primary);
4021
- }
4022
- .np-select-input-option-container:focus {
4023
- outline: none;
4024
- }
4025
- .np-select-input-option-container--active {
4026
- box-shadow: inset 0 0 0 1px #c9cbce;
4027
- box-shadow: inset 0 0 0 1px var(--color-interactive-secondary);
4028
- }
4029
- .np-select-input-option-container--disabled {
4030
- opacity: 0.45;
4031
- }
4032
- .np-select-input-option-check--not-selected {
4033
- visibility: hidden;
4034
- }
4035
- .np-select-input-option {
4036
- flex: 1;
4037
- }
4038
- .np-select-input-option-content-container {
4039
- display: flex;
4040
- align-items: center;
4041
- -moz-column-gap: 8px;
4042
- column-gap: 8px;
4043
- -moz-column-gap: var(--size-8);
4044
- column-gap: var(--size-8);
4045
- color: #37517e;
4046
- color: var(--color-content-primary);
4047
- }
4048
- .np-select-input-option-content-icon {
4049
- display: flex;
4050
- }
4051
- .np-select-input-option-content-icon--not-within-trigger {
4052
- align-self: flex-start;
4053
- }
4054
- .np-select-input-option-content-text {
4055
- display: flex;
4056
- flex: 1;
4057
- flex-direction: column;
4058
- overflow: hidden;
4059
- }
4060
- .np-select-input-option-content-text-secondary {
4061
- color: #5d7079;
4062
- color: var(--color-content-secondary);
4063
- }
4064
- .np-select-input-option-content-text-within-trigger {
4005
+ .np-select-input-content {
4065
4006
  overflow: hidden;
4066
4007
  text-overflow: ellipsis;
4067
4008
  white-space: nowrap;
4068
4009
  }
4069
- .np-select-input-option-content-text-line-1 > :not([hidden]) ~ :not([hidden]) {
4070
- margin-right: 8px;
4071
- margin-right: var(--size-8);
4072
- margin-left: 8px;
4073
- margin-left: var(--size-8);
4074
- }
4075
- .np-select-input-group-item--without-needle:first-child {
4076
- margin-top: calc(-1 * 8px);
4077
- margin-top: calc(-1 * var(--size-8));
4078
- }
4079
- .np-select-input-group-item-header {
4080
- position: sticky;
4081
- top: 0px;
4082
- z-index: 10;
4083
- background-color: #ffffff;
4084
- background-color: var(--color-background-elevated);
4085
- }
4086
- .np-select-input-separator-item {
4087
- margin: 8px;
4088
- margin: var(--size-8);
4089
- border-top-width: 1px;
4010
+ .np-select-input-placeholder {
4011
+ color: #768e9c;
4012
+ color: var(--color-content-tertiary);
4090
4013
  }
4091
4014
  .np-select-input-options-container {
4092
4015
  display: flex;
@@ -4165,6 +4088,92 @@ html:not([dir="rtl"]) .np-flow-navigation--sm .np-flow-navigation__stepper {
4165
4088
  contain: strict;
4166
4089
  height: 100%;
4167
4090
  }
4091
+ .np-select-input-separator-item {
4092
+ margin: 8px;
4093
+ margin: var(--size-8);
4094
+ border-top-width: 1px;
4095
+ }
4096
+ .np-select-input-group-item--without-needle:first-child {
4097
+ margin-top: calc(-1 * 8px);
4098
+ margin-top: calc(-1 * var(--size-8));
4099
+ }
4100
+ .np-select-input-group-item-header {
4101
+ position: sticky;
4102
+ top: 0px;
4103
+ z-index: 10;
4104
+ background-color: #ffffff;
4105
+ background-color: var(--color-background-elevated);
4106
+ }
4107
+ .np-select-input-option-container {
4108
+ display: flex;
4109
+ cursor: default;
4110
+ -webkit-user-select: none;
4111
+ -moz-user-select: none;
4112
+ user-select: none;
4113
+ align-items: center;
4114
+ -moz-column-gap: 8px;
4115
+ column-gap: 8px;
4116
+ -moz-column-gap: var(--size-8);
4117
+ column-gap: var(--size-8);
4118
+ border-radius: 10px;
4119
+ border-radius: var(--radius-small);
4120
+ padding: 12px 16px;
4121
+ padding: var(--size-12) var(--size-16);
4122
+ color: var(--color-interactive-primary);
4123
+ }
4124
+ .np-select-input-option-container:focus {
4125
+ outline: none;
4126
+ }
4127
+ .np-select-input-option-container--active {
4128
+ box-shadow: inset 0 0 0 1px #c9cbce;
4129
+ box-shadow: inset 0 0 0 1px var(--color-interactive-secondary);
4130
+ }
4131
+ .np-select-input-option-container--disabled {
4132
+ opacity: 0.45;
4133
+ }
4134
+ .np-select-input-option-check--not-selected {
4135
+ visibility: hidden;
4136
+ }
4137
+ .np-select-input-option {
4138
+ flex: 1;
4139
+ }
4140
+ .np-select-input-option-content-container {
4141
+ display: flex;
4142
+ align-items: center;
4143
+ -moz-column-gap: 8px;
4144
+ column-gap: 8px;
4145
+ -moz-column-gap: var(--size-8);
4146
+ column-gap: var(--size-8);
4147
+ color: #37517e;
4148
+ color: var(--color-content-primary);
4149
+ }
4150
+ .np-select-input-option-content-icon {
4151
+ display: flex;
4152
+ }
4153
+ .np-select-input-option-content-icon--not-within-trigger {
4154
+ align-self: flex-start;
4155
+ }
4156
+ .np-select-input-option-content-text {
4157
+ display: flex;
4158
+ flex: 1;
4159
+ flex-direction: column;
4160
+ overflow: hidden;
4161
+ }
4162
+ .np-select-input-option-content-text-secondary {
4163
+ color: #5d7079;
4164
+ color: var(--color-content-secondary);
4165
+ }
4166
+ .np-select-input-option-content-text-within-trigger {
4167
+ overflow: hidden;
4168
+ text-overflow: ellipsis;
4169
+ white-space: nowrap;
4170
+ }
4171
+ .np-select-input-option-content-text-line-1 > :not([hidden]) ~ :not([hidden]) {
4172
+ margin-right: 8px;
4173
+ margin-right: var(--size-8);
4174
+ margin-left: 8px;
4175
+ margin-left: var(--size-8);
4176
+ }
4168
4177
  .np-select-input-footer {
4169
4178
  padding: 4px 24px 16px;
4170
4179
  padding: var(--size-4) var(--size-24) var(--size-16);
@@ -4215,15 +4224,6 @@ html:not([dir="rtl"]) .np-flow-navigation--sm .np-flow-navigation__stepper {
4215
4224
  border-inline-start: 1px solid rgba(0,0,0,0.10196);
4216
4225
  border-inline-start: 1px solid var(--color-border-neutral);
4217
4226
  }
4218
- .np-select-input-content {
4219
- overflow: hidden;
4220
- text-overflow: ellipsis;
4221
- white-space: nowrap;
4222
- }
4223
- .np-select-input-placeholder {
4224
- color: #768e9c;
4225
- color: var(--color-content-tertiary);
4226
- }
4227
4227
  .np-text-area {
4228
4228
  min-height: 72px;
4229
4229
  min-height: var(--size-72);
package/src/main.less CHANGED
@@ -44,7 +44,7 @@
44
44
  @import "./listItem/ListItem.less";
45
45
  @import "./field/Field.less";
46
46
  @import "./inputs/InputGroup.less";
47
- @import "./inputs/SelectInput/SelectInput.less";
47
+ @import "./inputs/SelectInput.less";
48
48
  @import "./inputs/TextArea.less";
49
49
  @import "./instructionsList/InstructionsList.less";
50
50
  @import "./link/Link.less";
@@ -226,12 +226,12 @@
226
226
  .np-theme-platform.wds-sentiment-surface-success-elevated,
227
227
  .np-theme-personal--bright-green.wds-sentiment-surface-success-elevated,
228
228
  .np-theme-business--bright-green.wds-sentiment-surface-success-elevated {
229
- --color-sentiment-content-primary: #E2F6D5;
230
- --color-sentiment-content-primary-hover: #D3F2C0;
231
- --color-sentiment-content-primary-active: #C5EDAB;
232
- --color-sentiment-interactive-primary: #E2F6D5;
233
- --color-sentiment-interactive-primary-hover: #D3F2C0;
234
- --color-sentiment-interactive-primary-active: #C5EDAB;
229
+ --color-sentiment-content-primary: #CEF1B8;
230
+ --color-sentiment-content-primary-hover: #E0FFCC;
231
+ --color-sentiment-content-primary-active: #E1F4D4;
232
+ --color-sentiment-interactive-primary: #CEF1B8;
233
+ --color-sentiment-interactive-primary-hover: #E0FFCC;
234
+ --color-sentiment-interactive-primary-active: #E1F4D4;
235
235
  --color-sentiment-interactive-secondary: #054D28;
236
236
  --color-sentiment-interactive-secondary-hover: #043A1E;
237
237
  --color-sentiment-interactive-secondary-active: #022614;
@@ -250,24 +250,24 @@
250
250
  .np-theme-personal--forest-green.wds-sentiment-surface-success-base,
251
251
  .np-theme-business--forest-green.wds-sentiment-surface-success-base,
252
252
  .np-theme-platform--forest-green.wds-sentiment-surface-success-base {
253
- --color-sentiment-content-primary: #BAE5A0;
254
- --color-sentiment-content-primary-hover: #C8EAB3;
255
- --color-sentiment-content-primary-active: #D6F0C7;
256
- --color-sentiment-interactive-primary: #BAE5A0;
257
- --color-sentiment-interactive-primary-hover: #C8EAB3;
258
- --color-sentiment-interactive-primary-active: #D6F0C7;
259
- --color-sentiment-interactive-secondary: #252C20;
260
- --color-sentiment-interactive-secondary-hover: #323B2B;
261
- --color-sentiment-interactive-secondary-active: #3E4A36;
262
- --color-sentiment-interactive-secondary-neutral: #37422F;
263
- --color-sentiment-interactive-secondary-neutral-hover: #46533B;
264
- --color-sentiment-interactive-secondary-neutral-active: #546548;
265
- --color-sentiment-interactive-control: #252C20;
266
- --color-sentiment-interactive-control-hover: #323B2B;
267
- --color-sentiment-interactive-control-active: #3E4A36;
268
- --color-sentiment-background-surface: #252C20;
269
- --color-sentiment-background-surface-hover: #323B2B;
270
- --color-sentiment-background-surface-active: #3E4A36;
253
+ --color-sentiment-content-primary: #CEF1B8;
254
+ --color-sentiment-content-primary-hover: #E0FFCC;
255
+ --color-sentiment-content-primary-active: #E1F4D4;
256
+ --color-sentiment-interactive-primary: #CEF1B8;
257
+ --color-sentiment-interactive-primary-hover: #E0FFCC;
258
+ --color-sentiment-interactive-primary-active: #E1F4D4;
259
+ --color-sentiment-interactive-secondary: #054D28;
260
+ --color-sentiment-interactive-secondary-hover: #043A1E;
261
+ --color-sentiment-interactive-secondary-active: #022614;
262
+ --color-sentiment-interactive-secondary-neutral: #256A43;
263
+ --color-sentiment-interactive-secondary-neutral-hover: #2A794C;
264
+ --color-sentiment-interactive-secondary-neutral-active: #329057;
265
+ --color-sentiment-interactive-control: #054D28;
266
+ --color-sentiment-interactive-control-hover: #043A1E;
267
+ --color-sentiment-interactive-control-active: #022614;
268
+ --color-sentiment-background-surface: #054D28;
269
+ --color-sentiment-background-surface-hover: #043A1E;
270
+ --color-sentiment-background-surface-active: #022614;
271
271
  }
272
272
  .np-theme-personal--dark.wds-sentiment-surface-success-elevated,
273
273
  .np-theme-business--dark.wds-sentiment-surface-success-elevated,
@@ -448,18 +448,18 @@
448
448
  --color-sentiment-interactive-primary: #E0F7F7;
449
449
  --color-sentiment-interactive-primary-hover: #CAF1F1;
450
450
  --color-sentiment-interactive-primary-active: #B6ECEC;
451
- --color-sentiment-interactive-secondary: #0B312F;
452
- --color-sentiment-interactive-secondary-hover: #124F4C;
453
- --color-sentiment-interactive-secondary-active: #176460;
454
- --color-sentiment-interactive-secondary-neutral: #174E4D;
455
- --color-sentiment-interactive-secondary-neutral-hover: #1D6261;
456
- --color-sentiment-interactive-secondary-neutral-active: #237675;
457
- --color-sentiment-interactive-control: #0B312F;
458
- --color-sentiment-interactive-control-hover: #124F4C;
459
- --color-sentiment-interactive-control-active: #176460;
460
- --color-sentiment-background-surface: #0B312F;
461
- --color-sentiment-background-surface-hover: #124F4C;
462
- --color-sentiment-background-surface-active: #176460;
451
+ --color-sentiment-interactive-secondary: #054D4D;
452
+ --color-sentiment-interactive-secondary-hover: #043A3A;
453
+ --color-sentiment-interactive-secondary-active: #022626;
454
+ --color-sentiment-interactive-secondary-neutral: #1F6161;
455
+ --color-sentiment-interactive-secondary-neutral-hover: #247070;
456
+ --color-sentiment-interactive-secondary-neutral-active: #298080;
457
+ --color-sentiment-interactive-control: #054D4D;
458
+ --color-sentiment-interactive-control-hover: #043A3A;
459
+ --color-sentiment-interactive-control-active: #022626;
460
+ --color-sentiment-background-surface: #054D4D;
461
+ --color-sentiment-background-surface-hover: #043A3A;
462
+ --color-sentiment-background-surface-active: #022626;
463
463
  }
464
464
  .np-theme-personal--dark.wds-sentiment-surface-proposition-elevated,
465
465
  .np-theme-business--dark.wds-sentiment-surface-proposition-elevated,
@@ -133,8 +133,8 @@
133
133
  }
134
134
  &-elevated {
135
135
  .sentiment-surface-tokens(
136
- #E2F6D5, #D3F2C0, #C5EDAB, // content-primary
137
- #E2F6D5, #D3F2C0, #C5EDAB, // interactive-primary
136
+ #CEF1B8, #E0FFCC, #E1F4D4, // content-primary
137
+ #CEF1B8, #E0FFCC, #E1F4D4, // interactive-primary
138
138
  #054D28, #043A1E, #022614, // interactive-secondary
139
139
  #256A43, #2A794C, #329057, // interactive-secondary-neutral
140
140
  #054D28, #043A1E, #022614, // interactive-control
@@ -150,12 +150,12 @@
150
150
  .np-theme-platform--forest-green& {
151
151
  &-base {
152
152
  .sentiment-surface-tokens(
153
- #BAE5A0, #C8EAB3, #D6F0C7, // content-primary
154
- #BAE5A0, #C8EAB3, #D6F0C7, // interactive-primary
155
- #252C20, #323B2B, #3E4A36, // interactive-secondary
156
- #37422F, #46533B, #546548, // interactive-secondary-neutral
157
- #252C20, #323B2B, #3E4A36, // interactive-control
158
- #252C20, #323B2B, #3E4A36 // background-surface
153
+ #CEF1B8, #E0FFCC, #E1F4D4, // content-primary
154
+ #CEF1B8, #E0FFCC, #E1F4D4, // interactive-primary
155
+ #054D28, #043A1E, #022614, // interactive-secondary
156
+ #256A43, #2A794C, #329057, // interactive-secondary-neutral
157
+ #054D28, #043A1E, #022614, // interactive-control
158
+ #054D28, #043A1E, #022614 // background-surface
159
159
  );
160
160
  }
161
161
  &-elevated {
@@ -262,10 +262,10 @@
262
262
  .sentiment-surface-tokens(
263
263
  #FFFFFF, #EAF9F9, #D5F4F4, // content-primary
264
264
  #E0F7F7, #CAF1F1, #B6ECEC, // interactive-primary
265
- #0B312F, #124F4C, #176460, // interactive-secondary
266
- #174E4D, #1D6261, #237675, // interactive-secondary-neutral
267
- #0B312F, #124F4C, #176460, // interactive-control
268
- #0B312F, #124F4C, #176460 // background-surface
265
+ #054D4D, #043A3A, #022626, // interactive-secondary
266
+ #1F6161, #247070, #298080, // interactive-secondary-neutral
267
+ #054D4D, #043A3A, #022626, // interactive-control
268
+ #054D4D, #043A3A, #022626 // background-surface
269
269
  );
270
270
  }
271
271
  &-elevated {
@@ -1 +0,0 @@
1
- {"version":3,"file":"SelectInputBottomSheet.js","sources":["../../../../src/inputs/SelectInput/BottomSheet/SelectInputBottomSheet.tsx"],"sourcesContent":["import {\n FloatingFocusManager,\n FloatingPortal,\n useDismiss,\n useFloating,\n useInteractions,\n useRole,\n} from '@floating-ui/react';\nimport { Transition, TransitionChild } from '@headlessui/react';\nimport { FocusScope } from '@react-aria/focus';\nimport { ThemeProvider, useTheme } from '@wise/components-theming';\nimport { clsx } from 'clsx';\nimport { Fragment, useState } from 'react';\n\nimport { CloseButton } from '../../../common/closeButton';\nimport { useVirtualKeyboard } from '../../../common/hooks/useVirtualKeyboard';\nimport { PreventScroll } from '../../../common/preventScroll/PreventScroll';\nimport { Size } from '../../../common/propsValues/size';\n\nexport interface SelectInputBottomSheetProps {\n open: boolean;\n renderTrigger?: (args: {\n ref: React.RefCallback<Element>;\n getInteractionProps: (customEventHandlers?: React.HTMLProps<Element>) => {\n [key: string]: unknown;\n };\n }) => React.ReactNode;\n title?: string;\n initialFocusRef?: React.MutableRefObject<HTMLElement | null>;\n padding?: 'none' | 'md';\n children?: React.ReactNode;\n onClose?: () => void;\n onCloseEnd?: () => void;\n}\n\nexport function SelectInputBottomSheet({\n open,\n renderTrigger,\n title,\n initialFocusRef,\n padding = 'md',\n children,\n onClose,\n onCloseEnd,\n}: SelectInputBottomSheetProps) {\n useVirtualKeyboard(open);\n\n const { refs, context } = useFloating<Element>({\n open,\n onOpenChange: (value) => {\n if (!value) {\n onClose?.();\n }\n },\n });\n\n const dismiss = useDismiss(context);\n const role = useRole(context);\n const { getReferenceProps, getFloatingProps } = useInteractions([dismiss, role]);\n\n const [floatingKey, setFloatingKey] = useState(0);\n\n const { theme, screenMode } = useTheme();\n\n return (\n <>\n {open ? <PreventScroll /> : null}\n {renderTrigger?.({\n ref: refs.setReference,\n getInteractionProps: getReferenceProps,\n })}\n\n <FloatingPortal>\n <ThemeProvider theme=\"personal\" screenMode={theme === 'personal' ? screenMode : 'light'}>\n <Transition\n as=\"div\"\n show={open}\n className=\"np-bottom-sheet-v2-container\"\n beforeEnter={() => {\n setFloatingKey((prev) => prev + 1);\n }}\n afterLeave={onCloseEnd}\n >\n <TransitionChild\n as=\"div\"\n className=\"np-bottom-sheet-v2-backdrop\"\n enterFrom=\"np-bottom-sheet-v2-backdrop--closed\"\n leaveTo=\"np-bottom-sheet-v2-backdrop--closed\"\n />\n\n <div className=\"np-bottom-sheet-v2\">\n <FocusScope>\n <FloatingFocusManager context={context} initialFocus={initialFocusRef}>\n <Fragment\n key={floatingKey} // Force inner state invalidation on open\n >\n <TransitionChild\n ref={refs.setFloating}\n as=\"div\"\n className=\"np-bottom-sheet-v2-content\"\n enterFrom=\"np-bottom-sheet-v2-content--closed\"\n leaveTo=\"np-bottom-sheet-v2-content--closed\"\n {...getFloatingProps()}\n >\n <div className=\"np-bottom-sheet-v2-header\">\n <CloseButton\n size={Size.SMALL}\n onClick={() => {\n onClose?.();\n }}\n />\n </div>\n <div\n className={clsx(\n 'np-bottom-sheet-v2-content-inner',\n title && 'np-bottom-sheet-v2-content-inner--has-title',\n padding === 'md' && 'np-bottom-sheet-v2-content-inner--padding-md',\n )}\n >\n {title ? (\n <h2 className=\"np-bottom-sheet-v2-title np-text-title-body\">{title}</h2>\n ) : null}\n <div className=\"np-bottom-sheet-v2-body np-text-body-default\">\n {children}\n </div>\n </div>\n </TransitionChild>\n </Fragment>\n </FloatingFocusManager>\n </FocusScope>\n </div>\n </Transition>\n </ThemeProvider>\n </FloatingPortal>\n </>\n );\n}\n"],"names":["SelectInputBottomSheet","open","renderTrigger","title","initialFocusRef","padding","children","onClose","onCloseEnd","useVirtualKeyboard","refs","context","useFloating","onOpenChange","value","dismiss","useDismiss","role","useRole","getReferenceProps","getFloatingProps","useInteractions","floatingKey","setFloatingKey","useState","theme","screenMode","useTheme","_jsxs","_Fragment","_jsx","PreventScroll","ref","setReference","getInteractionProps","FloatingPortal","ThemeProvider","Transition","as","show","className","beforeEnter","prev","afterLeave","TransitionChild","enterFrom","leaveTo","FocusScope","FloatingFocusManager","initialFocus","Fragment","setFloating","CloseButton","size","Size","SMALL","onClick","clsx"],"mappings":"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"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"SelectInputBottomSheet.mjs","sources":["../../../../src/inputs/SelectInput/BottomSheet/SelectInputBottomSheet.tsx"],"sourcesContent":["import {\n FloatingFocusManager,\n FloatingPortal,\n useDismiss,\n useFloating,\n useInteractions,\n useRole,\n} from '@floating-ui/react';\nimport { Transition, TransitionChild } from '@headlessui/react';\nimport { FocusScope } from '@react-aria/focus';\nimport { ThemeProvider, useTheme } from '@wise/components-theming';\nimport { clsx } from 'clsx';\nimport { Fragment, useState } from 'react';\n\nimport { CloseButton } from '../../../common/closeButton';\nimport { useVirtualKeyboard } from '../../../common/hooks/useVirtualKeyboard';\nimport { PreventScroll } from '../../../common/preventScroll/PreventScroll';\nimport { Size } from '../../../common/propsValues/size';\n\nexport interface SelectInputBottomSheetProps {\n open: boolean;\n renderTrigger?: (args: {\n ref: React.RefCallback<Element>;\n getInteractionProps: (customEventHandlers?: React.HTMLProps<Element>) => {\n [key: string]: unknown;\n };\n }) => React.ReactNode;\n title?: string;\n initialFocusRef?: React.MutableRefObject<HTMLElement | null>;\n padding?: 'none' | 'md';\n children?: React.ReactNode;\n onClose?: () => void;\n onCloseEnd?: () => void;\n}\n\nexport function SelectInputBottomSheet({\n open,\n renderTrigger,\n title,\n initialFocusRef,\n padding = 'md',\n children,\n onClose,\n onCloseEnd,\n}: SelectInputBottomSheetProps) {\n useVirtualKeyboard(open);\n\n const { refs, context } = useFloating<Element>({\n open,\n onOpenChange: (value) => {\n if (!value) {\n onClose?.();\n }\n },\n });\n\n const dismiss = useDismiss(context);\n const role = useRole(context);\n const { getReferenceProps, getFloatingProps } = useInteractions([dismiss, role]);\n\n const [floatingKey, setFloatingKey] = useState(0);\n\n const { theme, screenMode } = useTheme();\n\n return (\n <>\n {open ? <PreventScroll /> : null}\n {renderTrigger?.({\n ref: refs.setReference,\n getInteractionProps: getReferenceProps,\n })}\n\n <FloatingPortal>\n <ThemeProvider theme=\"personal\" screenMode={theme === 'personal' ? screenMode : 'light'}>\n <Transition\n as=\"div\"\n show={open}\n className=\"np-bottom-sheet-v2-container\"\n beforeEnter={() => {\n setFloatingKey((prev) => prev + 1);\n }}\n afterLeave={onCloseEnd}\n >\n <TransitionChild\n as=\"div\"\n className=\"np-bottom-sheet-v2-backdrop\"\n enterFrom=\"np-bottom-sheet-v2-backdrop--closed\"\n leaveTo=\"np-bottom-sheet-v2-backdrop--closed\"\n />\n\n <div className=\"np-bottom-sheet-v2\">\n <FocusScope>\n <FloatingFocusManager context={context} initialFocus={initialFocusRef}>\n <Fragment\n key={floatingKey} // Force inner state invalidation on open\n >\n <TransitionChild\n ref={refs.setFloating}\n as=\"div\"\n className=\"np-bottom-sheet-v2-content\"\n enterFrom=\"np-bottom-sheet-v2-content--closed\"\n leaveTo=\"np-bottom-sheet-v2-content--closed\"\n {...getFloatingProps()}\n >\n <div className=\"np-bottom-sheet-v2-header\">\n <CloseButton\n size={Size.SMALL}\n onClick={() => {\n onClose?.();\n }}\n />\n </div>\n <div\n className={clsx(\n 'np-bottom-sheet-v2-content-inner',\n title && 'np-bottom-sheet-v2-content-inner--has-title',\n padding === 'md' && 'np-bottom-sheet-v2-content-inner--padding-md',\n )}\n >\n {title ? (\n <h2 className=\"np-bottom-sheet-v2-title np-text-title-body\">{title}</h2>\n ) : null}\n <div className=\"np-bottom-sheet-v2-body np-text-body-default\">\n {children}\n </div>\n </div>\n </TransitionChild>\n </Fragment>\n </FloatingFocusManager>\n </FocusScope>\n </div>\n </Transition>\n </ThemeProvider>\n </FloatingPortal>\n </>\n );\n}\n"],"names":["SelectInputBottomSheet","open","renderTrigger","title","initialFocusRef","padding","children","onClose","onCloseEnd","useVirtualKeyboard","refs","context","useFloating","onOpenChange","value","dismiss","useDismiss","role","useRole","getReferenceProps","getFloatingProps","useInteractions","floatingKey","setFloatingKey","useState","theme","screenMode","useTheme","_jsxs","_Fragment","_jsx","PreventScroll","ref","setReference","getInteractionProps","FloatingPortal","ThemeProvider","Transition","as","show","className","beforeEnter","prev","afterLeave","TransitionChild","enterFrom","leaveTo","FocusScope","FloatingFocusManager","initialFocus","Fragment","setFloating","CloseButton","size","Size","SMALL","onClick","clsx"],"mappings":"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"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"SelectInputButtonInput.js","sources":["../../../../src/inputs/SelectInput/ButtonInput/SelectInputButtonInput.tsx"],"sourcesContent":["import { clsx } from 'clsx';\nimport { forwardRef } from 'react';\n\nimport { useInputPaddings } from '../../InputGroup';\nimport { inputClassNameBase } from '../../_common';\n\nexport interface SelectInputButtonInputProps extends React.ComponentPropsWithRef<'button'> {\n size?: 'sm' | 'md' | 'lg';\n}\n\nexport const SelectInputButtonInput = forwardRef(function ButtonInput(\n { size = 'md', className, style, ...restProps }: SelectInputButtonInputProps,\n ref: React.ForwardedRef<HTMLButtonElement | null>,\n) {\n const inputPaddings = useInputPaddings();\n\n return (\n <button\n ref={ref}\n type=\"button\"\n className={clsx(inputClassNameBase({ size }), 'np-button-input', className)}\n style={{ ...inputPaddings, ...style }}\n {...restProps}\n />\n );\n});\n"],"names":["SelectInputButtonInput","forwardRef","ButtonInput","size","className","style","restProps","ref","inputPaddings","useInputPaddings","_jsx","type","clsx","inputClassNameBase"],"mappings":";;;;;;;;MAUaA,sBAAsB,gBAAGC,gBAAU,CAAC,SAASC,WAAWA,CACnE;AAAEC,EAAAA,IAAI,GAAG,IAAI;EAAEC,SAAS;EAAEC,KAAK;EAAE,GAAGC;AAAS,CAA+B,EAC5EC,GAAiD,EAAA;AAEjD,EAAA,MAAMC,aAAa,GAAGC,2BAAgB,EAAE;AAExC,EAAA,oBACEC,cAAA,CAAA,QAAA,EAAA;AACEH,IAAAA,GAAG,EAAEA,GAAI;AACTI,IAAAA,IAAI,EAAC,QAAQ;AACbP,IAAAA,SAAS,EAAEQ,SAAI,CAACC,0BAAkB,CAAC;AAAEV,MAAAA;AAAI,KAAE,CAAC,EAAE,iBAAiB,EAAEC,SAAS,CAAE;AAC5EC,IAAAA,KAAK,EAAE;AAAE,MAAA,GAAGG,aAAa;MAAE,GAAGH;KAAQ;IAAA,GAClCC;AAAS,GAAC,CACd;AAEN,CAAC;;;;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"SelectInputButtonInput.mjs","sources":["../../../../src/inputs/SelectInput/ButtonInput/SelectInputButtonInput.tsx"],"sourcesContent":["import { clsx } from 'clsx';\nimport { forwardRef } from 'react';\n\nimport { useInputPaddings } from '../../InputGroup';\nimport { inputClassNameBase } from '../../_common';\n\nexport interface SelectInputButtonInputProps extends React.ComponentPropsWithRef<'button'> {\n size?: 'sm' | 'md' | 'lg';\n}\n\nexport const SelectInputButtonInput = forwardRef(function ButtonInput(\n { size = 'md', className, style, ...restProps }: SelectInputButtonInputProps,\n ref: React.ForwardedRef<HTMLButtonElement | null>,\n) {\n const inputPaddings = useInputPaddings();\n\n return (\n <button\n ref={ref}\n type=\"button\"\n className={clsx(inputClassNameBase({ size }), 'np-button-input', className)}\n style={{ ...inputPaddings, ...style }}\n {...restProps}\n />\n );\n});\n"],"names":["SelectInputButtonInput","forwardRef","ButtonInput","size","className","style","restProps","ref","inputPaddings","useInputPaddings","_jsx","type","clsx","inputClassNameBase"],"mappings":";;;;;;MAUaA,sBAAsB,gBAAGC,UAAU,CAAC,SAASC,WAAWA,CACnE;AAAEC,EAAAA,IAAI,GAAG,IAAI;EAAEC,SAAS;EAAEC,KAAK;EAAE,GAAGC;AAAS,CAA+B,EAC5EC,GAAiD,EAAA;AAEjD,EAAA,MAAMC,aAAa,GAAGC,gBAAgB,EAAE;AAExC,EAAA,oBACEC,GAAA,CAAA,QAAA,EAAA;AACEH,IAAAA,GAAG,EAAEA,GAAI;AACTI,IAAAA,IAAI,EAAC,QAAQ;AACbP,IAAAA,SAAS,EAAEQ,IAAI,CAACC,kBAAkB,CAAC;AAAEV,MAAAA;AAAI,KAAE,CAAC,EAAE,iBAAiB,EAAEC,SAAS,CAAE;AAC5EC,IAAAA,KAAK,EAAE;AAAE,MAAA,GAAGG,aAAa;MAAE,GAAGH;KAAQ;IAAA,GAClCC;AAAS,GAAC,CACd;AAEN,CAAC;;;;"}
@@ -1,26 +0,0 @@
1
- 'use strict';
2
-
3
- var icons = require('@transferwise/icons');
4
- var clsx = require('clsx');
5
- var reactIntl = require('react-intl');
6
- var DateTrigger_messages = require('../../../dateLookup/dateTrigger/DateTrigger.messages.js');
7
- var jsxRuntime = require('react/jsx-runtime');
8
-
9
- function SelectInputClearButton({
10
- className,
11
- onClick
12
- }) {
13
- const intl = reactIntl.useIntl();
14
- return /*#__PURE__*/jsxRuntime.jsx("button", {
15
- type: "button",
16
- "aria-label": intl.formatMessage(DateTrigger_messages.default.ariaLabel),
17
- className: clsx.clsx(className, 'np-select-input-addon np-select-input-addon--interactive'),
18
- onClick: onClick,
19
- children: /*#__PURE__*/jsxRuntime.jsx(icons.Cross, {
20
- size: 16
21
- })
22
- });
23
- }
24
-
25
- exports.SelectInputClearButton = SelectInputClearButton;
26
- //# sourceMappingURL=SelectInputClearButton.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"SelectInputClearButton.js","sources":["../../../../src/inputs/SelectInput/ClearButton/SelectInputClearButton.tsx"],"sourcesContent":["import { Cross } from '@transferwise/icons';\nimport { clsx } from 'clsx';\nimport { useIntl } from 'react-intl';\nimport dateTriggerMessages from '../../../dateLookup/dateTrigger/DateTrigger.messages';\n\nexport interface SelectInputClearButtonProps extends Pick<\n React.ComponentPropsWithoutRef<'button'>,\n 'className' | 'onClick'\n> {}\n\n/**\n * A button component used to clear the selected value in a SelectInput.\n */\nexport function SelectInputClearButton({ className, onClick }: SelectInputClearButtonProps) {\n const intl = useIntl();\n\n return (\n <button\n type=\"button\"\n aria-label={intl.formatMessage(dateTriggerMessages.ariaLabel)}\n className={clsx(className, 'np-select-input-addon np-select-input-addon--interactive')}\n onClick={onClick}\n >\n <Cross size={16} />\n </button>\n );\n}\n"],"names":["SelectInputClearButton","className","onClick","intl","useIntl","_jsx","type","formatMessage","dateTriggerMessages","ariaLabel","clsx","children","Cross","size"],"mappings":";;;;;;;;SAagBA,sBAAsBA,CAAC;EAAEC,SAAS;AAAEC,EAAAA;AAAO,CAA+B,EAAA;AACxF,EAAA,MAAMC,IAAI,GAAGC,iBAAO,EAAE;AAEtB,EAAA,oBACEC,cAAA,CAAA,QAAA,EAAA;AACEC,IAAAA,IAAI,EAAC,QAAQ;AACb,IAAA,YAAA,EAAYH,IAAI,CAACI,aAAa,CAACC,4BAAmB,CAACC,SAAS,CAAE;AAC9DR,IAAAA,SAAS,EAAES,SAAI,CAACT,SAAS,EAAE,0DAA0D,CAAE;AACvFC,IAAAA,OAAO,EAAEA,OAAQ;IAAAS,QAAA,eAEjBN,cAAA,CAACO,WAAK,EAAA;AAACC,MAAAA,IAAI,EAAE;KAAG;AAClB,GAAQ,CAAC;AAEb;;;;"}