@transferwise/components 45.15.0 → 45.15.1
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.
- package/build/i18n/en.json +8 -0
- package/build/index.esm.js +322 -318
- package/build/index.esm.js.map +1 -1
- package/build/index.js +321 -317
- package/build/index.js.map +1 -1
- package/build/main.css +1 -1
- package/build/styles/dateLookup/DateLookup.css +1 -1
- package/build/styles/main.css +1 -1
- package/build/types/avatarWrapper/AvatarWrapper.d.ts +14 -5
- package/build/types/avatarWrapper/AvatarWrapper.d.ts.map +1 -1
- package/build/types/common/Option/Option.d.ts.map +1 -1
- package/build/types/common/focusBoundary/FocusBoundary.d.ts +2 -2
- package/build/types/common/focusBoundary/FocusBoundary.d.ts.map +1 -1
- package/build/types/dateInput/DateInput.d.ts +2 -0
- package/build/types/dateInput/DateInput.d.ts.map +1 -1
- package/build/types/dateLookup/DateLookup.messages.d.ts +65 -0
- package/build/types/dateLookup/DateLookup.messages.d.ts.map +1 -0
- package/build/types/dateLookup/dateHeader/DateHeader.d.ts +3 -1
- package/build/types/dateLookup/dateHeader/DateHeader.d.ts.map +1 -1
- package/build/types/dateLookup/tableLink/TableLink.d.ts +4 -26
- package/build/types/dateLookup/tableLink/TableLink.d.ts.map +1 -1
- package/build/types/dateLookup/yearCalendar/YearCalendar.d.ts +4 -29
- package/build/types/dateLookup/yearCalendar/YearCalendar.d.ts.map +1 -1
- package/build/types/phoneNumberInput/PhoneNumberInput.d.ts.map +1 -1
- package/build/types/snackbar/Snackbar.d.ts.map +1 -1
- package/build/types/tabs/Tabs.d.ts.map +1 -1
- package/build/types/upload/steps/completeStep/completeStep.d.ts.map +1 -1
- package/build/types/upload/steps/processingStep/processingStep.d.ts.map +1 -1
- package/package.json +2 -1
- package/src/accordion/AccordionItem/__snapshots__/AccordionItem.spec.js.snap +6 -6
- package/src/avatarWrapper/AvatarWrapper.tsx +20 -8
- package/src/avatarWrapper/__snapshots__/AvatarWrapper.spec.tsx.snap +1 -1
- package/src/card/Card.spec.js +2 -2
- package/src/common/Option/Option.tsx +1 -7
- package/src/common/bottomSheet/__snapshots__/BottomSheet.spec.tsx.snap +8 -1
- package/src/common/focusBoundary/FocusBoundary.tsx +9 -32
- package/src/dateInput/DateInput.js +6 -0
- package/src/dateInput/DateInput.story.tsx +2 -0
- package/src/dateLookup/DateLookup.css +1 -1
- package/src/dateLookup/DateLookup.keyboardEvents.spec.js +3 -3
- package/src/dateLookup/DateLookup.less +4 -0
- package/src/dateLookup/DateLookup.messages.js +44 -0
- package/src/dateLookup/DateLookup.testingLibrary.spec.js +39 -0
- package/src/dateLookup/dateHeader/DateHeader.js +48 -26
- package/src/dateLookup/dateHeader/DateHeader.spec.js +37 -0
- package/src/dateLookup/dayCalendar/DayCalendar.js +3 -1
- package/src/dateLookup/dayCalendar/DayCalendar.spec.js +7 -1
- package/src/dateLookup/dayCalendar/table/DayCalendarTable.js +7 -3
- package/src/dateLookup/dayCalendar/table/DayCalendarTable.spec.js +1 -0
- package/src/dateLookup/monthCalendar/MonthCalendar.js +3 -1
- package/src/dateLookup/monthCalendar/MonthCalendar.spec.js +7 -1
- package/src/dateLookup/monthCalendar/table/MonthCalendarTable.spec.js +4 -5
- package/src/dateLookup/tableLink/TableLink.js +24 -3
- package/src/dateLookup/tableLink/TableLink.spec.js +60 -4
- package/src/dateLookup/yearCalendar/YearCalendar.js +16 -3
- package/src/dateLookup/yearCalendar/YearCalendar.spec.js +14 -1
- package/src/dateLookup/yearCalendar/table/YearCalendarTable.spec.js +4 -5
- package/src/i18n/en.json +8 -0
- package/src/inputs/SelectInput.story.tsx +14 -9
- package/src/main.css +1 -1
- package/src/phoneNumberInput/PhoneNumberInput.js +1 -0
- package/src/snackbar/Snackbar.js +6 -1
- package/src/snackbar/Snackbar.spec.js +1 -3
- package/src/tabs/Tabs.js +2 -1
- package/src/upload/Upload.js +1 -1
- package/src/upload/steps/completeStep/completeStep.js +4 -1
- package/src/upload/steps/processingStep/processingStep.js +1 -0
- package/src/uploadInput/uploadItem/UploadItem.tsx +1 -1
- package/build/types/common/focusBoundary/utils/getFocusableElements.d.ts +0 -2
- package/build/types/common/focusBoundary/utils/getFocusableElements.d.ts.map +0 -1
- package/build/types/common/focusBoundary/utils/index.d.ts +0 -3
- package/build/types/common/focusBoundary/utils/index.d.ts.map +0 -1
- package/build/types/common/focusBoundary/utils/resetFocus.d.ts +0 -2
- package/build/types/common/focusBoundary/utils/resetFocus.d.ts.map +0 -1
- package/src/common/focusBoundary/FocusBoundary.spec.tsx +0 -66
- package/src/common/focusBoundary/__snapshots__/FocusBoundary.spec.tsx.snap +0 -16
- package/src/common/focusBoundary/utils/getFocusableElements.js +0 -25
- package/src/common/focusBoundary/utils/getFocusableElements.spec.js +0 -51
- package/src/common/focusBoundary/utils/index.js +0 -2
- package/src/common/focusBoundary/utils/resetFocus.js +0 -23
- package/src/common/focusBoundary/utils/resetFocus.spec.js +0 -103
- package/src/snackbar/__snapshots__/Snackbar.spec.js.snap +0 -5
|
@@ -141,7 +141,10 @@ export const Months: StoryObj<{
|
|
|
141
141
|
<div className="d-flex flex-column">
|
|
142
142
|
<SelectInput
|
|
143
143
|
placeholder="Month"
|
|
144
|
-
items={months.map((month) => ({
|
|
144
|
+
items={months.map((month) => ({
|
|
145
|
+
type: 'option',
|
|
146
|
+
value: month,
|
|
147
|
+
}))}
|
|
145
148
|
value={selectedMonth}
|
|
146
149
|
renderValue={(month) => <SelectInputOptionContent title={month.name} />}
|
|
147
150
|
onChange={(month) => {
|
|
@@ -206,6 +209,14 @@ const allCurrencies: Currency[] = [...popularCurrencies, ...otherCurrencies].sor
|
|
|
206
209
|
a.code.localeCompare(b.code),
|
|
207
210
|
);
|
|
208
211
|
|
|
212
|
+
function currencyOption(currency: Currency) {
|
|
213
|
+
return {
|
|
214
|
+
type: 'option',
|
|
215
|
+
value: currency,
|
|
216
|
+
filterMatchers: [currency.code, currency.name, ...(currency.countries ?? [])],
|
|
217
|
+
} satisfies SelectInputItem<Currency>;
|
|
218
|
+
}
|
|
219
|
+
|
|
209
220
|
export const Currencies: StoryObj<{
|
|
210
221
|
onChange: (value: Currency) => void;
|
|
211
222
|
}> = {
|
|
@@ -219,18 +230,12 @@ export const Currencies: StoryObj<{
|
|
|
219
230
|
{
|
|
220
231
|
type: 'group',
|
|
221
232
|
label: 'Popular currencies',
|
|
222
|
-
options: popularCurrencies.map((currency) => (
|
|
223
|
-
type: 'option',
|
|
224
|
-
value: currency,
|
|
225
|
-
})),
|
|
233
|
+
options: popularCurrencies.map((currency) => currencyOption(currency)),
|
|
226
234
|
},
|
|
227
235
|
{
|
|
228
236
|
type: 'group',
|
|
229
237
|
label: 'All currencies',
|
|
230
|
-
options: allCurrencies.map((currency) => (
|
|
231
|
-
type: 'option',
|
|
232
|
-
value: currency,
|
|
233
|
-
})),
|
|
238
|
+
options: allCurrencies.map((currency) => currencyOption(currency)),
|
|
234
239
|
},
|
|
235
240
|
]}
|
|
236
241
|
value={selectedCurrency}
|