@transferwise/components 0.0.0-experimental-9d9138b → 0.0.0-experimental-1fc511d
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/button/LegacyButton.js +0 -2
- package/build/button/LegacyButton.js.map +1 -1
- package/build/button/LegacyButton.mjs +0 -2
- package/build/button/LegacyButton.mjs.map +1 -1
- package/build/carousel/Carousel.js +1 -3
- package/build/carousel/Carousel.js.map +1 -1
- package/build/carousel/Carousel.mjs +1 -3
- package/build/carousel/Carousel.mjs.map +1 -1
- package/build/checkbox/Checkbox.js.map +1 -1
- package/build/checkbox/Checkbox.mjs.map +1 -1
- package/build/checkboxButton/CheckboxButton.js +1 -1
- package/build/checkboxButton/CheckboxButton.js.map +1 -1
- package/build/checkboxButton/CheckboxButton.mjs +1 -1
- package/build/checkboxButton/CheckboxButton.mjs.map +1 -1
- package/build/checkboxOption/CheckboxOption.js.map +1 -1
- package/build/checkboxOption/CheckboxOption.mjs.map +1 -1
- package/build/common/bottomSheet/BottomSheet.js.map +1 -1
- package/build/common/bottomSheet/BottomSheet.mjs.map +1 -1
- package/build/common/dateUtils/isDateValid/isDateValid.js +3 -3
- package/build/common/dateUtils/isDateValid/isDateValid.js.map +1 -1
- package/build/common/dateUtils/isDateValid/isDateValid.mjs +3 -3
- package/build/common/dateUtils/isDateValid/isDateValid.mjs.map +1 -1
- package/build/common/panel/Panel.js +3 -8
- package/build/common/panel/Panel.js.map +1 -1
- package/build/common/panel/Panel.mjs +3 -8
- package/build/common/panel/Panel.mjs.map +1 -1
- package/build/dateLookup/dateHeader/DateHeader.js +27 -22
- package/build/dateLookup/dateHeader/DateHeader.js.map +1 -1
- package/build/dateLookup/dateHeader/DateHeader.mjs +27 -22
- package/build/dateLookup/dateHeader/DateHeader.mjs.map +1 -1
- package/build/dimmer/dimmerManager/DimmerManager.js.map +1 -1
- package/build/dimmer/dimmerManager/DimmerManager.mjs.map +1 -1
- package/build/dropFade/DropFade.js.map +1 -1
- package/build/dropFade/DropFade.mjs.map +1 -1
- package/build/emphasis/EmphasisHtmlTransformer.js.map +1 -1
- package/build/emphasis/EmphasisHtmlTransformer.mjs.map +1 -1
- package/build/i18n/cs.json +22 -5
- package/build/i18n/cs.json.js +22 -5
- package/build/i18n/cs.json.js.map +1 -1
- package/build/i18n/cs.json.mjs +22 -5
- package/build/i18n/cs.json.mjs.map +1 -1
- package/build/i18n/nl.json +73 -0
- package/build/index.js +0 -1
- package/build/index.js.map +1 -1
- package/build/index.mjs +1 -1
- package/build/info/Info.js +7 -13
- package/build/info/Info.js.map +1 -1
- package/build/info/Info.mjs +7 -13
- package/build/info/Info.mjs.map +1 -1
- package/build/inputs/Input.js +1 -3
- package/build/inputs/Input.js.map +1 -1
- package/build/inputs/Input.mjs +1 -3
- package/build/inputs/Input.mjs.map +1 -1
- package/build/inputs/SelectInput.js +1 -3
- package/build/inputs/SelectInput.js.map +1 -1
- package/build/inputs/SelectInput.mjs +1 -3
- package/build/inputs/SelectInput.mjs.map +1 -1
- package/build/inputs/_ButtonInput.js +1 -3
- package/build/inputs/_ButtonInput.js.map +1 -1
- package/build/inputs/_ButtonInput.mjs +1 -3
- package/build/inputs/_ButtonInput.mjs.map +1 -1
- package/build/inputs/_Popover.js +1 -3
- package/build/inputs/_Popover.js.map +1 -1
- package/build/inputs/_Popover.mjs +1 -3
- package/build/inputs/_Popover.mjs.map +1 -1
- package/build/main.css +2 -119
- package/build/moneyInput/currencyFormatting.js +2 -2
- package/build/moneyInput/currencyFormatting.js.map +1 -1
- package/build/moneyInput/currencyFormatting.mjs +2 -2
- package/build/moneyInput/currencyFormatting.mjs.map +1 -1
- package/build/nudge/Nudge.js +0 -2
- package/build/nudge/Nudge.js.map +1 -1
- package/build/nudge/Nudge.mjs +0 -2
- package/build/nudge/Nudge.mjs.map +1 -1
- package/build/promoCard/PromoCardContext.js +0 -1
- package/build/promoCard/PromoCardContext.js.map +1 -1
- package/build/promoCard/PromoCardContext.mjs +0 -1
- package/build/promoCard/PromoCardContext.mjs.map +1 -1
- package/build/promoCard/PromoCardGroup.js +0 -1
- package/build/promoCard/PromoCardGroup.js.map +1 -1
- package/build/promoCard/PromoCardGroup.mjs +0 -1
- package/build/promoCard/PromoCardGroup.mjs.map +1 -1
- package/build/select/Select.js +19 -25
- package/build/select/Select.js.map +1 -1
- package/build/select/Select.mjs +19 -25
- package/build/select/Select.mjs.map +1 -1
- package/build/styles/button/Button.css +2 -2
- package/build/styles/dateLookup/DateLookup.css +0 -5
- package/build/styles/info/Info.css +0 -23
- package/build/styles/main.css +2 -119
- package/build/table/Table.js +1 -3
- package/build/table/Table.js.map +1 -1
- package/build/table/Table.mjs +1 -3
- package/build/table/Table.mjs.map +1 -1
- package/build/tooltip/Tooltip.js +2 -6
- package/build/tooltip/Tooltip.js.map +1 -1
- package/build/tooltip/Tooltip.mjs +2 -6
- package/build/tooltip/Tooltip.mjs.map +1 -1
- package/build/types/button/LegacyButton.d.ts.map +1 -1
- package/build/types/carousel/Carousel.d.ts.map +1 -1
- package/build/types/checkbox/Checkbox.d.ts.map +1 -1
- package/build/types/checkboxOption/CheckboxOption.d.ts +1 -2
- package/build/types/checkboxOption/CheckboxOption.d.ts.map +1 -1
- package/build/types/common/bottomSheet/BottomSheet.d.ts.map +1 -1
- package/build/types/common/dateUtils/isDateValid/isDateValid.d.ts.map +1 -1
- package/build/types/common/panel/Panel.d.ts.map +1 -1
- package/build/types/dateLookup/dateHeader/DateHeader.d.ts.map +1 -1
- package/build/types/dimmer/dimmerManager/DimmerManager.d.ts +1 -1
- package/build/types/dimmer/dimmerManager/DimmerManager.d.ts.map +1 -1
- package/build/types/dropFade/DropFade.d.ts.map +1 -1
- package/build/types/emphasis/EmphasisHtmlTransformer.d.ts +2 -2
- package/build/types/emphasis/EmphasisHtmlTransformer.d.ts.map +1 -1
- package/build/types/index.d.ts +0 -2
- package/build/types/index.d.ts.map +1 -1
- package/build/types/info/Info.d.ts.map +1 -1
- package/build/types/inputs/Input.d.ts.map +1 -1
- package/build/types/inputs/SelectInput.d.ts.map +1 -1
- package/build/types/inputs/_ButtonInput.d.ts.map +1 -1
- package/build/types/inputs/_Popover.d.ts.map +1 -1
- package/build/types/nudge/Nudge.d.ts.map +1 -1
- package/build/types/promoCard/PromoCardContext.d.ts.map +1 -1
- package/build/types/promoCard/PromoCardGroup.d.ts.map +1 -1
- package/build/types/select/Select.d.ts.map +1 -1
- package/build/types/table/Table.d.ts.map +1 -1
- package/build/types/tooltip/Tooltip.d.ts.map +1 -1
- package/build/types/upload/Upload.d.ts.map +1 -1
- package/build/upload/Upload.js +3 -1
- package/build/upload/Upload.js.map +1 -1
- package/build/upload/Upload.mjs +3 -1
- package/build/upload/Upload.mjs.map +1 -1
- package/package.json +11 -9
- package/src/accordion/Accordion.story.tsx +2 -2
- package/src/accordion/AccordionItem/__snapshots__/AccordionItem.spec.js.snap +6 -2
- package/src/alert/Alert.story.tsx +2 -2
- package/src/alert/Alert.tests.story.tsx +1 -1
- package/src/avatarWrapper/__snapshots__/AvatarWrapper.spec.tsx.snap +12 -4
- package/src/button/Button.css +2 -2
- package/src/button/Button.less +2 -2
- package/src/button/LegacyButton.tsx +0 -2
- package/src/carousel/Carousel.spec.tsx +0 -4
- package/src/carousel/Carousel.tsx +0 -1
- package/src/checkbox/Checkbox.tsx +0 -1
- package/src/checkboxButton/CheckboxButton.story.tsx +0 -2
- package/src/checkboxButton/CheckboxButton.tsx +1 -1
- package/src/checkboxOption/CheckboxOption.tsx +1 -2
- package/src/chips/__snapshots__/Chips.spec.tsx.snap +1 -1
- package/src/common/bottomSheet/BottomSheet.spec.tsx +0 -1
- package/src/common/bottomSheet/BottomSheet.story.tsx +1 -1
- package/src/common/bottomSheet/BottomSheet.tsx +0 -1
- package/src/common/bottomSheet/__snapshots__/BottomSheet.spec.tsx.snap +1 -1
- package/src/common/closeButton/__snapshots__/CloseButton.spec.tsx.snap +1 -1
- package/src/common/dateUtils/isDateValid/isDateValid.ts +5 -3
- package/src/common/hooks/useHasIntersected/useHasIntersected.spec.js +0 -2
- package/src/common/panel/Panel.tsx +2 -13
- package/src/dateLookup/DateLookup.css +0 -5
- package/src/dateLookup/DateLookup.less +0 -4
- package/src/dateLookup/dateHeader/DateHeader.tsx +24 -26
- package/src/dimmer/Dimmer.story.tsx +0 -1
- package/src/dimmer/dimmerManager/DimmerManager.ts +1 -1
- package/src/display/Display.story.tsx +0 -2
- package/src/dropFade/DropFade.story.tsx +0 -1
- package/src/dropFade/DropFade.tsx +0 -1
- package/src/emphasis/EmphasisHtmlTransformer.spec.tsx +4 -4
- package/src/emphasis/EmphasisHtmlTransformer.ts +2 -2
- package/src/flowNavigation/__snapshots__/FlowNavigation.spec.js.snap +5 -3
- package/src/i18n/cs.json +22 -5
- package/src/i18n/nl.json +73 -0
- package/src/index.ts +0 -2
- package/src/info/Info.css +0 -23
- package/src/info/Info.less +0 -28
- package/src/info/Info.tsx +8 -14
- package/src/inputs/Input.tsx +0 -1
- package/src/inputs/SelectInput.tsx +1 -7
- package/src/inputs/_ButtonInput.tsx +0 -1
- package/src/inputs/_Popover.tsx +0 -1
- package/src/link/Link.story.tsx +0 -1
- package/src/listItem/ListItem.story.tsx +4 -11
- package/src/main.css +2 -119
- package/src/main.less +0 -1
- package/src/markdown/Markdown.spec.tsx +0 -1
- package/src/modal/Modal.story.tsx +1 -1
- package/src/moneyInput/currencyFormatting.ts +3 -3
- package/src/nudge/Nudge.tsx +0 -2
- package/src/overlayHeader/__snapshots__/OverlayHeader.spec.tsx.snap +1 -1
- package/src/promoCard/PromoCardContext.tsx +0 -1
- package/src/promoCard/PromoCardGroup.story.tsx +3 -15
- package/src/promoCard/PromoCardGroup.tsx +0 -1
- package/src/provider/theme/ThemeProvider.story.tsx +3 -5
- package/src/select/Select.spec.tsx +0 -1
- package/src/select/Select.tsx +0 -3
- package/src/select/option/Option.spec.js +2 -2
- package/src/selectOption/SelectOption.story.tsx +1 -2
- package/src/table/Table.tsx +0 -1
- package/src/test-utils/jest.setup.ts +0 -1
- package/src/tooltip/Tooltip.tsx +0 -2
- package/src/upload/Upload.spec.tsx +293 -0
- package/src/upload/Upload.tsx +5 -1
- package/src/upload/steps/completeStep/completeStep.spec.tsx +51 -0
- package/src/upload/steps/processingStep/processingStep.spec.tsx +59 -0
- package/src/upload/steps/uploadImageStep/uploadImageStep.spec.tsx +79 -0
- package/build/styles/item/Item.css +0 -89
- package/build/types/item/Item.d.ts +0 -46
- package/build/types/item/Item.d.ts.map +0 -1
- package/build/types/item/ItemAdditionalInfo.d.ts +0 -7
- package/build/types/item/ItemAdditionalInfo.d.ts.map +0 -1
- package/build/types/item/ItemCheckbox.d.ts +0 -4
- package/build/types/item/ItemCheckbox.d.ts.map +0 -1
- package/build/types/item/ItemIconButton.d.ts +0 -4
- package/build/types/item/ItemIconButton.d.ts.map +0 -1
- package/build/types/item/ItemImage.d.ts +0 -4
- package/build/types/item/ItemImage.d.ts.map +0 -1
- package/build/types/item/ItemNavigation.d.ts +0 -4
- package/build/types/item/ItemNavigation.d.ts.map +0 -1
- package/build/types/item/index.d.ts +0 -5
- package/build/types/item/index.d.ts.map +0 -1
- package/src/item/Item.css +0 -89
- package/src/item/Item.less +0 -95
- package/src/item/Item.story.tsx +0 -51
- package/src/item/Item.tsx +0 -163
- package/src/item/ItemAdditionalInfo.tsx +0 -14
- package/src/item/ItemCheckbox.tsx +0 -16
- package/src/item/ItemIconButton.tsx +0 -15
- package/src/item/ItemImage.tsx +0 -11
- package/src/item/ItemNavigation.tsx +0 -16
- package/src/item/index.ts +0 -4
- package/src/upload/Upload.events.spec.js +0 -49
- package/src/upload/Upload.spec.js +0 -305
- package/src/upload/steps/completeStep/completeStep.spec.js +0 -51
- package/src/upload/steps/processingStep/processingStep.spec.js +0 -55
- package/src/upload/steps/uploadImageStep/uploadImageStep.spec.js +0 -91
|
@@ -47,9 +47,7 @@ describe('Carousel', () => {
|
|
|
47
47
|
const scrollBy = jest.fn();
|
|
48
48
|
|
|
49
49
|
beforeEach(() => {
|
|
50
|
-
// eslint-disable-next-line functional/immutable-data
|
|
51
50
|
window.HTMLElement.prototype.scrollIntoView = focusSpy;
|
|
52
|
-
// eslint-disable-next-line functional/immutable-data
|
|
53
51
|
window.HTMLElement.prototype.scrollBy = scrollBy;
|
|
54
52
|
});
|
|
55
53
|
|
|
@@ -198,13 +196,11 @@ describe('Carousel', () => {
|
|
|
198
196
|
});
|
|
199
197
|
|
|
200
198
|
const mockPositions = (scrollWidth: number, offsetWidth: number) => {
|
|
201
|
-
// eslint-disable-next-line functional/immutable-data
|
|
202
199
|
Object.defineProperty(HTMLElement.prototype, 'scrollWidth', {
|
|
203
200
|
configurable: true,
|
|
204
201
|
value: scrollWidth,
|
|
205
202
|
});
|
|
206
203
|
|
|
207
|
-
// eslint-disable-next-line functional/immutable-data
|
|
208
204
|
Object.defineProperty(HTMLElement.prototype, 'offsetWidth', {
|
|
209
205
|
configurable: true,
|
|
210
206
|
value: offsetWidth,
|
|
@@ -228,7 +228,6 @@ const Carousel: React.FC<CarouselProps> = ({ header, className, cards, onClick }
|
|
|
228
228
|
className={clsx('carousel__card-content', {
|
|
229
229
|
[card.className ?? '']: !!card.className,
|
|
230
230
|
})}
|
|
231
|
-
// eslint-disable-next-line react/forbid-dom-props
|
|
232
231
|
style={card.styles}
|
|
233
232
|
>
|
|
234
233
|
{card.content}
|
|
@@ -44,7 +44,6 @@ export default function Checkbox({
|
|
|
44
44
|
const innerDisabled = disabled || readOnly;
|
|
45
45
|
return (
|
|
46
46
|
<div id={id} className={classList}>
|
|
47
|
-
{/* eslint-disable-next-line jsx-a11y/label-has-for */}
|
|
48
47
|
<label className={clsx({ disabled })}>
|
|
49
48
|
<CheckboxButton
|
|
50
49
|
className="p-r-2"
|
|
@@ -23,7 +23,6 @@ export const Basic: Story = {
|
|
|
23
23
|
'aria-label': 'Toggle email updates',
|
|
24
24
|
},
|
|
25
25
|
render: (args) => {
|
|
26
|
-
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
27
26
|
const [checked, setChecked] = useState(true);
|
|
28
27
|
|
|
29
28
|
return <CheckboxButton {...args} checked={checked} onChange={() => setChecked(!checked)} />;
|
|
@@ -36,7 +35,6 @@ export const Indeterminate: Story = {
|
|
|
36
35
|
indeterminate: true,
|
|
37
36
|
},
|
|
38
37
|
render: (args) => {
|
|
39
|
-
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
40
38
|
const [indeterminate, setIndeterminate] = useState(true);
|
|
41
39
|
|
|
42
40
|
return (
|
|
@@ -19,7 +19,7 @@ const CheckboxButton = forwardRef<HTMLInputElement, CheckboxButtonProps>(functio
|
|
|
19
19
|
|
|
20
20
|
useEffect(() => {
|
|
21
21
|
if (internalRef.current) {
|
|
22
|
-
// eslint-disable-next-line functional/immutable-data
|
|
22
|
+
// eslint-disable-next-line functional/immutable-data
|
|
23
23
|
internalRef.current.indeterminate = indeterminate;
|
|
24
24
|
}
|
|
25
25
|
}, [indeterminate, reference]);
|
|
@@ -2,8 +2,7 @@ import { forwardRef } from 'react';
|
|
|
2
2
|
|
|
3
3
|
import CheckboxButton from '../checkboxButton';
|
|
4
4
|
import Option from '../common/Option';
|
|
5
|
-
import { ReferenceType } from '../common/Option/Option';
|
|
6
|
-
import { BaseOptionProps } from '../common/Option/Option';
|
|
5
|
+
import { ReferenceType, BaseOptionProps } from '../common/Option/Option';
|
|
7
6
|
|
|
8
7
|
export type CheckboxOptionProps = Omit<BaseOptionProps, 'onChange'> & {
|
|
9
8
|
/**
|
|
@@ -140,7 +140,7 @@ exports[`Chips Filter Chips renders as expected 1`] = `
|
|
|
140
140
|
width="16"
|
|
141
141
|
>
|
|
142
142
|
<path
|
|
143
|
-
d="
|
|
143
|
+
d="m12 13.414-7.293 7.293-1.414-1.414L10.586 12 3.293 4.707l1.414-1.414L12 10.586l7.293-7.293 1.414 1.414L13.414 12l7.293 7.293-1.414 1.414z"
|
|
144
144
|
/>
|
|
145
145
|
</svg>
|
|
146
146
|
</span>
|
|
@@ -19,8 +19,8 @@ export default {
|
|
|
19
19
|
open: true,
|
|
20
20
|
},
|
|
21
21
|
render: (args) => {
|
|
22
|
-
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
23
22
|
const [open, setOpen] = useState(args.open);
|
|
23
|
+
|
|
24
24
|
return (
|
|
25
25
|
<div style={{ height: '2000px' }}>
|
|
26
26
|
<Button onClick={() => setOpen(true)}>Open BottomSheet</Button>
|
|
@@ -201,7 +201,6 @@ const BottomSheet = ({ role = 'dialog', ...props }: BottomSheetProps) => {
|
|
|
201
201
|
position={Position.BOTTOM}
|
|
202
202
|
className={clsx('np-bottom-sheet', props.className)}
|
|
203
203
|
>
|
|
204
|
-
{/* eslint-disable-next-line jsx-a11y/no-noninteractive-element-interactions */}
|
|
205
204
|
<div
|
|
206
205
|
id={overlayId}
|
|
207
206
|
aria-labelledby={props['aria-labelledby'] || undefined}
|
|
@@ -52,7 +52,7 @@ exports[`BottomSheet renders content when open 1`] = `
|
|
|
52
52
|
width="16"
|
|
53
53
|
>
|
|
54
54
|
<path
|
|
55
|
-
d="
|
|
55
|
+
d="m12 13.414-7.293 7.293-1.414-1.414L10.586 12 3.293 4.707l1.414-1.414L12 10.586l7.293-7.293 1.414 1.414L13.414 12l7.293 7.293-1.414 1.414z"
|
|
56
56
|
/>
|
|
57
57
|
</svg>
|
|
58
58
|
</span>
|
|
@@ -21,7 +21,7 @@ exports[`CloseButton renders as expected 1`] = `
|
|
|
21
21
|
width="24"
|
|
22
22
|
>
|
|
23
23
|
<path
|
|
24
|
-
d="
|
|
24
|
+
d="m12 13.414-7.293 7.293-1.414-1.414L10.586 12 3.293 4.707l1.414-1.414L12 10.586l7.293-7.293 1.414 1.414L13.414 12l7.293 7.293-1.414 1.414z"
|
|
25
25
|
/>
|
|
26
26
|
</svg>
|
|
27
27
|
</span>
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
export const isDateValid = (date: Date | string | null) => {
|
|
2
2
|
if (date === null) {
|
|
3
3
|
return false;
|
|
4
|
-
}
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
if (date instanceof Date) {
|
|
5
7
|
return validDateObject(date);
|
|
6
|
-
} else {
|
|
7
|
-
return validDateString(date);
|
|
8
8
|
}
|
|
9
|
+
|
|
10
|
+
return validDateString(date);
|
|
9
11
|
};
|
|
10
12
|
|
|
11
13
|
export const validDateString = (dateString: string) => validDateObject(new Date(dateString));
|
|
@@ -65,7 +65,6 @@ describe('useHasIntersected', () => {
|
|
|
65
65
|
});
|
|
66
66
|
|
|
67
67
|
it('calls observer', () => {
|
|
68
|
-
// eslint-disable-next-line jest/prefer-spy-on
|
|
69
68
|
window.IntersectionObserver = jest.fn(() => ({
|
|
70
69
|
observe,
|
|
71
70
|
unobserve,
|
|
@@ -107,7 +106,6 @@ describe('useHasIntersected', () => {
|
|
|
107
106
|
});
|
|
108
107
|
|
|
109
108
|
const setupIntersectionObserver = (isIntersecting) => {
|
|
110
|
-
// eslint-disable-next-line jest/prefer-spy-on
|
|
111
109
|
window.IntersectionObserver = jest.fn((callback) => {
|
|
112
110
|
callback([{ isIntersecting }], { unobserve });
|
|
113
111
|
return {
|
|
@@ -119,26 +119,15 @@ const Panel = forwardRef<HTMLDivElement, PanelProps>(function Panel(
|
|
|
119
119
|
{...rest}
|
|
120
120
|
ref={setPopperElement}
|
|
121
121
|
role="dialog"
|
|
122
|
-
// eslint-disable-next-line react/forbid-dom-props
|
|
123
122
|
style={{ ...styles.popper }}
|
|
124
123
|
{...attributes.popper}
|
|
125
124
|
className={clsx('np-panel', { 'np-panel--open': open }, rest.className)}
|
|
126
125
|
>
|
|
127
|
-
<div
|
|
128
|
-
ref={reference}
|
|
129
|
-
/* eslint-disable-next-line react/forbid-dom-props */
|
|
130
|
-
style={contentStyle}
|
|
131
|
-
className={clsx('np-panel__content')}
|
|
132
|
-
>
|
|
126
|
+
<div ref={reference} style={contentStyle} className={clsx('np-panel__content')}>
|
|
133
127
|
{children}
|
|
134
128
|
{/* Arrow has to stay inside content to get the same animations as the "dialog" and to get hidden when panel is closed. */}
|
|
135
129
|
{arrow && (
|
|
136
|
-
<div
|
|
137
|
-
ref={setArrowElement}
|
|
138
|
-
className={clsx('np-panel__arrow')}
|
|
139
|
-
// eslint-disable-next-line react/forbid-dom-props
|
|
140
|
-
style={styles.arrow}
|
|
141
|
-
/>
|
|
130
|
+
<div ref={setArrowElement} className={clsx('np-panel__arrow')} style={styles.arrow} />
|
|
142
131
|
)}
|
|
143
132
|
</div>
|
|
144
133
|
</div>
|
|
@@ -91,8 +91,3 @@
|
|
|
91
91
|
.np-theme-personal .tw-date-lookup-menu td {
|
|
92
92
|
border: none;
|
|
93
93
|
}
|
|
94
|
-
.np-theme-personal.tw-date-lookup-menu .tw-date-lookup-header-current,
|
|
95
|
-
.np-theme-personal .tw-date-lookup-menu .tw-date-lookup-header-current {
|
|
96
|
-
color: #37517e;
|
|
97
|
-
color: var(--color-content-primary);
|
|
98
|
-
}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { clsx } from 'clsx';
|
|
2
2
|
import { useIntl } from 'react-intl';
|
|
3
3
|
|
|
4
|
-
import
|
|
5
|
-
import { Position, Size, Typography } from '../../common';
|
|
4
|
+
import { Typography } from '../../common';
|
|
6
5
|
import { useLayout } from '../../common/hooks';
|
|
7
6
|
import Title from '../../title';
|
|
8
7
|
import messages from '../DateLookup.messages';
|
|
9
|
-
|
|
10
|
-
|
|
8
|
+
import Button from '../../button/Button';
|
|
9
|
+
import { ChevronDown, ChevronLeft, ChevronRight } from '@transferwise/icons';
|
|
10
|
+
import IconButton from '../../iconButton';
|
|
11
11
|
|
|
12
12
|
interface DateHeaderProps {
|
|
13
13
|
label?: string;
|
|
@@ -29,44 +29,42 @@ const DateHeader: React.FC<DateHeaderProps> = ({
|
|
|
29
29
|
return (
|
|
30
30
|
<div className={clsx('text-xs-center', !isMobile && ['clearfix', 'p-y-1'])}>
|
|
31
31
|
<div className="pull-left-single-direction">
|
|
32
|
-
<
|
|
33
|
-
|
|
34
|
-
|
|
32
|
+
<IconButton
|
|
33
|
+
size={40}
|
|
34
|
+
priority="minimal"
|
|
35
|
+
className="d-inline-flex"
|
|
35
36
|
aria-label={`${intl.formatMessage(messages.previous)} ${dateMode}`}
|
|
36
37
|
onClick={onPreviousClick}
|
|
37
38
|
>
|
|
38
|
-
<
|
|
39
|
-
|
|
40
|
-
className="left-single-direction"
|
|
41
|
-
size={Size.MEDIUM}
|
|
42
|
-
/>
|
|
43
|
-
</button>
|
|
39
|
+
<ChevronLeft className="left-single-direction" />
|
|
40
|
+
</IconButton>
|
|
44
41
|
</div>
|
|
45
42
|
{label && (
|
|
46
43
|
<Title type={Typography.TITLE_BODY} className="tw-date-lookup-header-current-container">
|
|
47
|
-
<
|
|
44
|
+
<Button
|
|
45
|
+
v2
|
|
46
|
+
size="md"
|
|
48
47
|
type="button"
|
|
49
|
-
|
|
48
|
+
priority="tertiary"
|
|
49
|
+
className="tw-date-lookup-header-current"
|
|
50
50
|
aria-label={intl.formatMessage(messages.goTo20YearView)}
|
|
51
|
+
addonEnd={{ type: 'icon', value: <ChevronDown /> }}
|
|
51
52
|
onClick={onLabelClick}
|
|
52
53
|
>
|
|
53
54
|
{label}
|
|
54
|
-
</
|
|
55
|
+
</Button>
|
|
55
56
|
</Title>
|
|
56
57
|
)}
|
|
57
58
|
<div className="pull-right-single-direction">
|
|
58
|
-
<
|
|
59
|
-
|
|
60
|
-
className=
|
|
61
|
-
aria-label={`${
|
|
59
|
+
<IconButton
|
|
60
|
+
size={40}
|
|
61
|
+
className="d-inline-flex"
|
|
62
|
+
aria-label={`${intl.formatMessage(messages.next)} ${dateMode}`}
|
|
63
|
+
priority="minimal"
|
|
62
64
|
onClick={onNextClick}
|
|
63
65
|
>
|
|
64
|
-
<
|
|
65
|
-
|
|
66
|
-
className="right-single-direction"
|
|
67
|
-
size={Size.MEDIUM}
|
|
68
|
-
/>
|
|
69
|
-
</button>
|
|
66
|
+
<ChevronRight className="right-single-direction" />
|
|
67
|
+
</IconButton>
|
|
70
68
|
</div>
|
|
71
69
|
</div>
|
|
72
70
|
);
|
|
@@ -26,7 +26,6 @@ const DropFade = ({ children, show }: { children: ReactElement; show: boolean })
|
|
|
26
26
|
setHeight(0);
|
|
27
27
|
}}
|
|
28
28
|
>
|
|
29
|
-
{/* eslint-disable-next-line react/forbid-dom-props */}
|
|
30
29
|
<div ref={reference} style={{ height }} className="np-dropfade">
|
|
31
30
|
{clonedChild}
|
|
32
31
|
</div>
|
|
@@ -7,7 +7,7 @@ describe('creates safe, enphasised html', () => {
|
|
|
7
7
|
emphasisHtmlTransformer.transform(
|
|
8
8
|
'<script>something malicious</script><p>some text & more text</p>',
|
|
9
9
|
),
|
|
10
|
-
).
|
|
10
|
+
).toBe(
|
|
11
11
|
'<script>something malicious</script><p>some text & more text</p>',
|
|
12
12
|
);
|
|
13
13
|
});
|
|
@@ -18,7 +18,7 @@ describe('creates safe, enphasised html', () => {
|
|
|
18
18
|
emphasisHtmlTransformer.transform(
|
|
19
19
|
'<script>something malicious</script><positive>hello</positive><negative>world</negative><positive>!</positive>',
|
|
20
20
|
),
|
|
21
|
-
).
|
|
21
|
+
).toBe(
|
|
22
22
|
'<script>something malicious</script><em class="emphasis emphasis--positive">hello</em><em class="emphasis emphasis--negative">world</em><em class="emphasis emphasis--positive">!</em>',
|
|
23
23
|
);
|
|
24
24
|
});
|
|
@@ -26,11 +26,11 @@ describe('creates safe, enphasised html', () => {
|
|
|
26
26
|
describe('supports new line characters', () => {
|
|
27
27
|
it('supports slash n in the string', () => {
|
|
28
28
|
const emphasisHtmlTransformer = new EmphasisHtmlTransformer();
|
|
29
|
-
expect(emphasisHtmlTransformer.transform('hello\\nworld')).
|
|
29
|
+
expect(emphasisHtmlTransformer.transform('hello\\nworld')).toBe('hello<br />world');
|
|
30
30
|
});
|
|
31
31
|
it('supports new line characters', () => {
|
|
32
32
|
const emphasisHtmlTransformer = new EmphasisHtmlTransformer();
|
|
33
|
-
expect(emphasisHtmlTransformer.transform('hello\nworld')).
|
|
33
|
+
expect(emphasisHtmlTransformer.transform('hello\nworld')).toBe('hello<br />world');
|
|
34
34
|
});
|
|
35
35
|
});
|
|
36
36
|
});
|
|
@@ -13,9 +13,9 @@ type Tags = {
|
|
|
13
13
|
};
|
|
14
14
|
|
|
15
15
|
class EmphasisHtmlTransformer {
|
|
16
|
-
tags:
|
|
16
|
+
tags: Tags[];
|
|
17
17
|
|
|
18
|
-
constructor(whitelistedTags?:
|
|
18
|
+
constructor(whitelistedTags?: string[]) {
|
|
19
19
|
this.tags = (whitelistedTags || []).map((tag) => {
|
|
20
20
|
return {
|
|
21
21
|
transformed: {
|
|
@@ -29,7 +29,9 @@ exports[`FlowNavigation on mobile renders as expected 1`] = `
|
|
|
29
29
|
width="16"
|
|
30
30
|
>
|
|
31
31
|
<path
|
|
32
|
-
|
|
32
|
+
clip-rule="evenodd"
|
|
33
|
+
d="m5.414 11 6.293-6.293-1.414-1.414L2.3 11.286a1.01 1.01 0 0 0 0 1.428l7.993 7.993 1.414-1.414L5.414 13H22v-2z"
|
|
34
|
+
fill-rule="evenodd"
|
|
33
35
|
/>
|
|
34
36
|
</svg>
|
|
35
37
|
</span>
|
|
@@ -74,7 +76,7 @@ exports[`FlowNavigation on mobile renders as expected 1`] = `
|
|
|
74
76
|
width="24"
|
|
75
77
|
>
|
|
76
78
|
<path
|
|
77
|
-
d="
|
|
79
|
+
d="m12 13.414-7.293 7.293-1.414-1.414L10.586 12 3.293 4.707l1.414-1.414L12 10.586l7.293-7.293 1.414 1.414L13.414 12l7.293 7.293-1.414 1.414z"
|
|
78
80
|
/>
|
|
79
81
|
</svg>
|
|
80
82
|
</span>
|
|
@@ -190,7 +192,7 @@ exports[`FlowNavigation renders as expected 1`] = `
|
|
|
190
192
|
width="24"
|
|
191
193
|
>
|
|
192
194
|
<path
|
|
193
|
-
d="
|
|
195
|
+
d="m12 13.414-7.293 7.293-1.414-1.414L10.586 12 3.293 4.707l1.414-1.414L12 10.586l7.293-7.293 1.414 1.414L13.414 12l7.293 7.293-1.414 1.414z"
|
|
194
196
|
/>
|
|
195
197
|
</svg>
|
|
196
198
|
</span>
|
package/src/i18n/cs.json
CHANGED
|
@@ -9,35 +9,52 @@
|
|
|
9
9
|
"neptune.DateInput.year.label": "Rok",
|
|
10
10
|
"neptune.DateInput.year.placeholder": "RRRR",
|
|
11
11
|
"neptune.DateLookup.day": "den",
|
|
12
|
-
"neptune.DateLookup.goTo20YearView": "
|
|
12
|
+
"neptune.DateLookup.goTo20YearView": "Přejít na zobrazení 20 let",
|
|
13
13
|
"neptune.DateLookup.month": "měsíc",
|
|
14
14
|
"neptune.DateLookup.next": "další",
|
|
15
15
|
"neptune.DateLookup.previous": "předchozí",
|
|
16
16
|
"neptune.DateLookup.selected": "vybráno",
|
|
17
17
|
"neptune.DateLookup.twentyYears": "20 let",
|
|
18
18
|
"neptune.DateLookup.year": "rok",
|
|
19
|
-
"neptune.FlowNavigation.back": "
|
|
19
|
+
"neptune.FlowNavigation.back": "zpět na předchozí krok",
|
|
20
20
|
"neptune.Info.ariaLabel": "Více informací",
|
|
21
|
-
"neptune.
|
|
21
|
+
"neptune.Label.optional": "(Volitelné)",
|
|
22
|
+
"neptune.Link.opensInNewTab": "(otevře se v nové kartě)",
|
|
22
23
|
"neptune.MoneyInput.Select.placeholder": "Vybrat možnost...",
|
|
24
|
+
"neptune.MoneyInput.Select.selectCurrencyLabel": "Vybrat měnu",
|
|
25
|
+
"neptune.PhoneNumberInput.SelectInput.placeholder": "Vybrat možnost...",
|
|
23
26
|
"neptune.Select.searchPlaceholder": "Hledat...",
|
|
24
27
|
"neptune.SelectInput.noResultsFound": "Nebyly nalezeny žádné výsledky",
|
|
28
|
+
"neptune.SelectOption.action.label": "Vybrat",
|
|
29
|
+
"neptune.SelectOption.selected.action.label": "Změnit zvolenou možnost",
|
|
30
|
+
"neptune.StatusIcon.iconLabel.error": "Chyba:",
|
|
31
|
+
"neptune.StatusIcon.iconLabel.information": "Informace:",
|
|
32
|
+
"neptune.StatusIcon.iconLabel.pending": "Vyřizuje se:",
|
|
33
|
+
"neptune.StatusIcon.iconLabel.success": "Úspěšné:",
|
|
34
|
+
"neptune.StatusIcon.iconLabel.warning": "Upozornění:",
|
|
25
35
|
"neptune.Summary.statusDone": "Položka dokončena",
|
|
26
36
|
"neptune.Summary.statusNotDone": "Položka k dokončení",
|
|
27
37
|
"neptune.Summary.statusPending": "Čekající položka",
|
|
38
|
+
"neptune.Table.actionHeader": "Akce",
|
|
39
|
+
"neptune.Table.emptyData": "Nebyly nalezeny žádné výsledky",
|
|
40
|
+
"neptune.Table.loaded": "Data tabulky byla načtena",
|
|
41
|
+
"neptune.Table.loading": "Data tabulky se načítají",
|
|
42
|
+
"neptune.Table.refreshPage": "Aktualizovat stránku",
|
|
28
43
|
"neptune.Upload.csButtonText": "Nahrát další soubor?",
|
|
29
44
|
"neptune.Upload.csFailureText": "Nahrání se nezdařilo. Zkuste to prosím později",
|
|
30
45
|
"neptune.Upload.csSuccessText": "Úspěšně nahráno!",
|
|
31
|
-
"neptune.Upload.csTooLargeMessage": "
|
|
46
|
+
"neptune.Upload.csTooLargeMessage": "Nahrajte soubor menší než {maxSize} MB",
|
|
32
47
|
"neptune.Upload.csWrongTypeMessage": "Tento formát souboru není podporován. Zkuste to znovu s jiným souborem",
|
|
33
48
|
"neptune.Upload.psButtonText": "Zrušit",
|
|
34
49
|
"neptune.Upload.psProcessingText": "Načítání...",
|
|
50
|
+
"neptune.Upload.retry": "Opakovat",
|
|
35
51
|
"neptune.Upload.usButtonText": "Nebo vyberte soubor",
|
|
36
52
|
"neptune.Upload.usDropMessage": "Pusťte sem soubor pro jeho nahrání",
|
|
37
|
-
"neptune.Upload.usPlaceholder": "Přetáhněte
|
|
53
|
+
"neptune.Upload.usPlaceholder": "Přetáhněte soubor menší než {maxSize} MB",
|
|
38
54
|
"neptune.UploadButton.allFileTypes": "Všechny typy souborů",
|
|
39
55
|
"neptune.UploadButton.dropFiles": "Pusťte sem soubor pro jeho nahrání",
|
|
40
56
|
"neptune.UploadButton.instructions": "{fileTypes}, menší než {size}MB",
|
|
57
|
+
"neptune.UploadButton.maximumFiles": "Max. počet souborů: {maxFiles}.",
|
|
41
58
|
"neptune.UploadButton.uploadFile": "Nahrát soubor",
|
|
42
59
|
"neptune.UploadButton.uploadFiles": "Nahrát soubory",
|
|
43
60
|
"neptune.UploadInput.deleteModalBody": "Odstraněním tohoto souboru jej smažete z našeho systému.",
|
package/src/i18n/nl.json
ADDED
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
{
|
|
2
|
+
"neptune.Button.loadingAriaLabel": "laden",
|
|
3
|
+
"neptune.Chips.ariaLabel": "{choice} wissen",
|
|
4
|
+
"neptune.ClearButton.ariaLabel": "Wissen",
|
|
5
|
+
"neptune.CloseButton.ariaLabel": "Sluiten",
|
|
6
|
+
"neptune.DateInput.day.label": "Dag",
|
|
7
|
+
"neptune.DateInput.day.placeholder": "DD",
|
|
8
|
+
"neptune.DateInput.month.label": "Maand",
|
|
9
|
+
"neptune.DateInput.year.label": "Jaar",
|
|
10
|
+
"neptune.DateInput.year.placeholder": "JJJJ",
|
|
11
|
+
"neptune.DateLookup.day": "dag",
|
|
12
|
+
"neptune.DateLookup.goTo20YearView": "Naar 20-jaarsoverzicht",
|
|
13
|
+
"neptune.DateLookup.month": "maand",
|
|
14
|
+
"neptune.DateLookup.next": "volgende",
|
|
15
|
+
"neptune.DateLookup.previous": "vorige",
|
|
16
|
+
"neptune.DateLookup.selected": "geselecteerd",
|
|
17
|
+
"neptune.DateLookup.twentyYears": "20 jaar",
|
|
18
|
+
"neptune.DateLookup.year": "jaar",
|
|
19
|
+
"neptune.FlowNavigation.back": "terug naar vorige stap",
|
|
20
|
+
"neptune.Info.ariaLabel": "Meer informatie",
|
|
21
|
+
"neptune.Label.optional": "(Optioneel)",
|
|
22
|
+
"neptune.Link.opensInNewTab": "(wordt geopend in een nieuw tabblad)",
|
|
23
|
+
"neptune.MoneyInput.Select.placeholder": "Selecteer een optie...",
|
|
24
|
+
"neptune.MoneyInput.Select.selectCurrencyLabel": "Selecteer valuta",
|
|
25
|
+
"neptune.PhoneNumberInput.SelectInput.placeholder": "Selecteer een optie...",
|
|
26
|
+
"neptune.Select.searchPlaceholder": "Zoeken...",
|
|
27
|
+
"neptune.SelectInput.noResultsFound": "Geen resultaten gevonden",
|
|
28
|
+
"neptune.SelectOption.action.label": "Kiezen",
|
|
29
|
+
"neptune.SelectOption.selected.action.label": "Gekozen optie wijzigen",
|
|
30
|
+
"neptune.StatusIcon.iconLabel.error": "Fout:",
|
|
31
|
+
"neptune.StatusIcon.iconLabel.information": "Informatie:",
|
|
32
|
+
"neptune.StatusIcon.iconLabel.pending": "In behandeling:",
|
|
33
|
+
"neptune.StatusIcon.iconLabel.success": "Gelukt:",
|
|
34
|
+
"neptune.StatusIcon.iconLabel.warning": "Waarschuwing:",
|
|
35
|
+
"neptune.Summary.statusDone": "Item klaar",
|
|
36
|
+
"neptune.Summary.statusNotDone": "Item te doen",
|
|
37
|
+
"neptune.Summary.statusPending": "Item in behandeling",
|
|
38
|
+
"neptune.Table.actionHeader": "Actie",
|
|
39
|
+
"neptune.Table.emptyData": "Geen resultaten gevonden",
|
|
40
|
+
"neptune.Table.loaded": "Tabelgegevens zijn geladen",
|
|
41
|
+
"neptune.Table.loading": "Tabelgegevens worden geladen",
|
|
42
|
+
"neptune.Table.refreshPage": "Pagina vernieuwen",
|
|
43
|
+
"neptune.Upload.csButtonText": "Nog een bestand uploaden?",
|
|
44
|
+
"neptune.Upload.csFailureText": "Uploaden mislukt. Probeer het opnieuw",
|
|
45
|
+
"neptune.Upload.csSuccessText": "Uploaden voltooid!",
|
|
46
|
+
"neptune.Upload.csTooLargeMessage": "Upload een bestand kleiner dan {maxSize} MB",
|
|
47
|
+
"neptune.Upload.csWrongTypeMessage": "Het bestandstype wordt niet ondersteund. Probeer het opnieuw met een ander bestand.",
|
|
48
|
+
"neptune.Upload.psButtonText": "Annuleren",
|
|
49
|
+
"neptune.Upload.psProcessingText": "Uploaden...",
|
|
50
|
+
"neptune.Upload.retry": "Opnieuw proberen",
|
|
51
|
+
"neptune.Upload.usButtonText": "Of selecteer een bestand",
|
|
52
|
+
"neptune.Upload.usDropMessage": "Sleep het bestand hierheen om het te uploaden",
|
|
53
|
+
"neptune.Upload.usPlaceholder": "Sleep een bestand van maximaal {maxSize} MB",
|
|
54
|
+
"neptune.UploadButton.allFileTypes": "Alle bestandstypen",
|
|
55
|
+
"neptune.UploadButton.dropFiles": "Sleep het bestand hierheen om het te uploaden",
|
|
56
|
+
"neptune.UploadButton.instructions": "{fileTypes}, kleiner dan {size} MB",
|
|
57
|
+
"neptune.UploadButton.maximumFiles": "Maximaal {maxFiles} bestanden.",
|
|
58
|
+
"neptune.UploadButton.uploadFile": "Bestand uploaden",
|
|
59
|
+
"neptune.UploadButton.uploadFiles": "Bestanden uploaden",
|
|
60
|
+
"neptune.UploadInput.deleteModalBody": "Door dit bestand te verwijderen, wordt het uit ons systeem verwijderd.",
|
|
61
|
+
"neptune.UploadInput.deleteModalCancelButtonText": "Annuleren",
|
|
62
|
+
"neptune.UploadInput.deleteModalConfirmButtonText": "Verwijderen",
|
|
63
|
+
"neptune.UploadInput.deleteModalTitle": "Weet je zeker dat je dit bestand wilt verwijderen?",
|
|
64
|
+
"neptune.UploadInput.fileIsTooLarge": "Bestand is te groot",
|
|
65
|
+
"neptune.UploadInput.fileTypeNotSupported": "Bestandstype niet ondersteund",
|
|
66
|
+
"neptune.UploadInput.maximumFilesAlreadyUploaded": "Deze upload is mislukt omdat we maar {maxFilesAllowed} bestanden tegelijk kunnen accepteren.",
|
|
67
|
+
"neptune.UploadItem.deleting": "Verwijderen...",
|
|
68
|
+
"neptune.UploadItem.removeFile": "Bestand {filename} verwijderen",
|
|
69
|
+
"neptune.UploadItem.uploaded": "Geüpload",
|
|
70
|
+
"neptune.UploadItem.uploadedFile": "Geüpload bestand",
|
|
71
|
+
"neptune.UploadItem.uploading": "Uploaden...",
|
|
72
|
+
"neptune.UploadItem.uploadingFailed": "Uploaden mislukt"
|
|
73
|
+
}
|
package/src/index.ts
CHANGED
|
@@ -108,7 +108,6 @@ export type {
|
|
|
108
108
|
TableCellStatus,
|
|
109
109
|
TableCellType,
|
|
110
110
|
} from './table';
|
|
111
|
-
export type { ItemProps, ItemAdditionalInfoProps, ItemCheckboxProps } from './item';
|
|
112
111
|
|
|
113
112
|
/**
|
|
114
113
|
* Components
|
|
@@ -210,7 +209,6 @@ export { default as Typeahead } from './typeahead';
|
|
|
210
209
|
export { default as Upload } from './upload';
|
|
211
210
|
export { default as UploadInput } from './uploadInput';
|
|
212
211
|
export { default as Table } from './table';
|
|
213
|
-
export { default as Item } from './table';
|
|
214
212
|
|
|
215
213
|
/**
|
|
216
214
|
* Hooks
|
package/src/info/Info.css
CHANGED
|
@@ -1,28 +1,5 @@
|
|
|
1
1
|
.np-info {
|
|
2
|
-
height: 16px;
|
|
3
|
-
line-height: 1;
|
|
4
2
|
vertical-align: middle;
|
|
5
|
-
color: var(--color-interactive-primary);
|
|
6
|
-
}
|
|
7
|
-
.np-info button,
|
|
8
|
-
.np-info [data-toggle="popover"]:not(.btn) {
|
|
9
|
-
--ring-outline-offset: 0;
|
|
10
|
-
height: 16px;
|
|
11
|
-
overflow: hidden;
|
|
12
|
-
display: inline-block;
|
|
13
|
-
}
|
|
14
|
-
.np-info__large {
|
|
15
|
-
height: 24px;
|
|
16
|
-
}
|
|
17
|
-
.np-info__large button,
|
|
18
|
-
.np-info__large [data-toggle="popover"]:not(.btn) {
|
|
19
|
-
height: 24px;
|
|
20
|
-
display: inline-block;
|
|
21
|
-
}
|
|
22
|
-
.np-info .tw-icon {
|
|
23
|
-
cursor: pointer;
|
|
24
|
-
color: var(--color-interactive-primary);
|
|
25
|
-
display: inline-block;
|
|
26
3
|
}
|
|
27
4
|
.np-info [data-toggle="popover"]:not(.btn) {
|
|
28
5
|
border-bottom: none !important;
|