@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
package/src/info/Info.less
CHANGED
|
@@ -1,35 +1,7 @@
|
|
|
1
1
|
@import (reference) "../../node_modules/@transferwise/neptune-css/src/less/ring.less";
|
|
2
2
|
|
|
3
3
|
.np-info {
|
|
4
|
-
height: 16px;
|
|
5
|
-
line-height: 1;
|
|
6
4
|
vertical-align: middle;
|
|
7
|
-
color: var(--color-interactive-primary);
|
|
8
|
-
|
|
9
|
-
button,
|
|
10
|
-
[data-toggle="popover"]:not(.btn) {
|
|
11
|
-
.ring-offset-0();
|
|
12
|
-
|
|
13
|
-
height: 16px;
|
|
14
|
-
overflow: hidden;
|
|
15
|
-
display: inline-block;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
&__large {
|
|
19
|
-
height: 24px;
|
|
20
|
-
|
|
21
|
-
button,
|
|
22
|
-
[data-toggle="popover"]:not(.btn) {
|
|
23
|
-
height: 24px;
|
|
24
|
-
display: inline-block;
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
.tw-icon {
|
|
29
|
-
cursor: pointer;
|
|
30
|
-
color: var(--color-interactive-primary);
|
|
31
|
-
display: inline-block;
|
|
32
|
-
}
|
|
33
5
|
|
|
34
6
|
[data-toggle="popover"]:not(.btn) {
|
|
35
7
|
// Bootstrap popover has !important dotted border bottom
|
package/src/info/Info.tsx
CHANGED
|
@@ -9,6 +9,7 @@ import Popover, { PopoverPreferredPlacement } from '../popover';
|
|
|
9
9
|
|
|
10
10
|
import messages from './Info.messages';
|
|
11
11
|
import { InfoPresentation } from './infoPresentations';
|
|
12
|
+
import IconButton, { IconButtonProps } from '../iconButton';
|
|
12
13
|
|
|
13
14
|
export interface InfoProps {
|
|
14
15
|
'aria-label'?: string;
|
|
@@ -53,25 +54,19 @@ const Info = ({
|
|
|
53
54
|
const [open, setOpen] = useState(false);
|
|
54
55
|
ariaLabel ??= intl.formatMessage(messages.ariaLabel);
|
|
55
56
|
const isModal = presentation === InfoPresentation.MODAL;
|
|
56
|
-
const isSmall = size === Size.SMALL;
|
|
57
57
|
|
|
58
|
-
const buttonProps = {
|
|
58
|
+
const buttonProps: IconButtonProps = {
|
|
59
59
|
'aria-label': ariaLabel,
|
|
60
|
-
|
|
61
|
-
|
|
60
|
+
priority: 'minimal',
|
|
61
|
+
size: 24,
|
|
62
|
+
children: <HelpCircleIcon />,
|
|
62
63
|
};
|
|
63
64
|
|
|
64
65
|
return (
|
|
65
|
-
<span
|
|
66
|
-
className={clsx(className, 'np-info', {
|
|
67
|
-
'np-info__small': isSmall,
|
|
68
|
-
'np-info__large': !isSmall,
|
|
69
|
-
})}
|
|
70
|
-
>
|
|
66
|
+
<span className={clsx(className, 'np-info')}>
|
|
71
67
|
{isModal ? (
|
|
72
68
|
<>
|
|
73
|
-
<
|
|
74
|
-
type="button"
|
|
69
|
+
<IconButton
|
|
75
70
|
onClick={() => {
|
|
76
71
|
setOpen(!open);
|
|
77
72
|
if (onClick) {
|
|
@@ -84,8 +79,7 @@ const Info = ({
|
|
|
84
79
|
</>
|
|
85
80
|
) : (
|
|
86
81
|
<Popover content={content} preferredPlacement={preferredPlacement} title={title}>
|
|
87
|
-
<
|
|
88
|
-
type="button"
|
|
82
|
+
<IconButton
|
|
89
83
|
{...buttonProps}
|
|
90
84
|
onClick={() => {
|
|
91
85
|
if (onClick) {
|
package/src/inputs/Input.tsx
CHANGED
|
@@ -31,7 +31,6 @@ export const Input = forwardRef(function Input(
|
|
|
31
31
|
'np-input--shape-rectangle': shape === 'rectangle',
|
|
32
32
|
'np-input--shape-pill': shape === 'pill',
|
|
33
33
|
})}
|
|
34
|
-
// eslint-disable-next-line react/forbid-dom-props
|
|
35
34
|
style={inputPaddings}
|
|
36
35
|
{...inputAttributes}
|
|
37
36
|
{...restProps}
|
|
@@ -629,13 +629,7 @@ function SelectInputOptions<T = string>({
|
|
|
629
629
|
const getItemNode = (index: number) => {
|
|
630
630
|
const item = filteredItems[index];
|
|
631
631
|
return (
|
|
632
|
-
<SelectInputItemView
|
|
633
|
-
// eslint-disable-next-line react/no-array-index-key
|
|
634
|
-
key={index}
|
|
635
|
-
item={item}
|
|
636
|
-
renderValue={renderValue}
|
|
637
|
-
needle={needle}
|
|
638
|
-
/>
|
|
632
|
+
<SelectInputItemView key={index} item={item} renderValue={renderValue} needle={needle} />
|
|
639
633
|
);
|
|
640
634
|
};
|
|
641
635
|
|
|
@@ -19,7 +19,6 @@ export const ButtonInput = forwardRef(function ButtonInput(
|
|
|
19
19
|
ref={ref}
|
|
20
20
|
type="button"
|
|
21
21
|
className={clsx(className, inputClassNameBase({ size }), 'np-button-input')}
|
|
22
|
-
// eslint-disable-next-line react/forbid-dom-props
|
|
23
22
|
style={{ ...inputPaddings, ...style }}
|
|
24
23
|
{...restProps}
|
|
25
24
|
/>
|
package/src/inputs/_Popover.tsx
CHANGED
|
@@ -113,7 +113,6 @@ export function Popover({
|
|
|
113
113
|
'np-popover-v2-container--size-md': size === 'md',
|
|
114
114
|
'np-popover-v2-container--size-lg': size === 'lg',
|
|
115
115
|
})}
|
|
116
|
-
// eslint-disable-next-line react/forbid-dom-props
|
|
117
116
|
style={floatingStyles}
|
|
118
117
|
{...getFloatingProps()}
|
|
119
118
|
>
|
package/src/link/Link.story.tsx
CHANGED
|
@@ -1,10 +1,8 @@
|
|
|
1
|
-
/* eslint-disable react/jsx-child-element-spacing */
|
|
2
|
-
|
|
3
1
|
import { action } from '@storybook/addon-actions';
|
|
4
2
|
import { Documents, FastFlag } from '@transferwise/icons';
|
|
5
3
|
import { ComponentProps } from 'react';
|
|
6
4
|
|
|
7
|
-
import { Button } from '..';
|
|
5
|
+
import { Button, IconButton } from '..';
|
|
8
6
|
import AvatarView from '../avatarView';
|
|
9
7
|
import Info from '../info';
|
|
10
8
|
import Title from '../title/Title';
|
|
@@ -94,14 +92,9 @@ export const Variants = () => {
|
|
|
94
92
|
title="Account number"
|
|
95
93
|
value="123456789"
|
|
96
94
|
action={
|
|
97
|
-
<
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
style={{ background: 'none', border: 0 }}
|
|
101
|
-
onClick={() => action('clicked')}
|
|
102
|
-
>
|
|
103
|
-
<Documents size="24" />
|
|
104
|
-
</button>
|
|
95
|
+
<IconButton size={24} aria-label="Copy" priority="minimal">
|
|
96
|
+
<Documents />
|
|
97
|
+
</IconButton>
|
|
105
98
|
}
|
|
106
99
|
/>
|
|
107
100
|
</List>
|
package/src/main.css
CHANGED
|
@@ -874,10 +874,10 @@
|
|
|
874
874
|
display: inline-block;
|
|
875
875
|
}
|
|
876
876
|
.wds-Button-icon--md {
|
|
877
|
-
--Button-iconSize:
|
|
877
|
+
--Button-iconSize: 18px;
|
|
878
878
|
}
|
|
879
879
|
.wds-Button-icon--sm {
|
|
880
|
-
--Button-iconSize:
|
|
880
|
+
--Button-iconSize: 16px;
|
|
881
881
|
}
|
|
882
882
|
.wds-Button-icon svg {
|
|
883
883
|
width: var(--Button-iconSize);
|
|
@@ -2009,11 +2009,6 @@ button.np-option {
|
|
|
2009
2009
|
.np-theme-personal .tw-date-lookup-menu td {
|
|
2010
2010
|
border: none;
|
|
2011
2011
|
}
|
|
2012
|
-
.np-theme-personal.tw-date-lookup-menu .tw-date-lookup-header-current,
|
|
2013
|
-
.np-theme-personal .tw-date-lookup-menu .tw-date-lookup-header-current {
|
|
2014
|
-
color: #37517e;
|
|
2015
|
-
color: var(--color-content-primary);
|
|
2016
|
-
}
|
|
2017
2012
|
.np-date-trigger {
|
|
2018
2013
|
overflow: hidden;
|
|
2019
2014
|
text-overflow: ellipsis;
|
|
@@ -2482,30 +2477,7 @@ html:not([dir="rtl"]) .np-flow-navigation--sm .np-flow-navigation__stepper {
|
|
|
2482
2477
|
width: 100%;
|
|
2483
2478
|
}
|
|
2484
2479
|
.np-info {
|
|
2485
|
-
height: 16px;
|
|
2486
|
-
line-height: 1;
|
|
2487
2480
|
vertical-align: middle;
|
|
2488
|
-
color: var(--color-interactive-primary);
|
|
2489
|
-
}
|
|
2490
|
-
.np-info button,
|
|
2491
|
-
.np-info [data-toggle="popover"]:not(.btn) {
|
|
2492
|
-
--ring-outline-offset: 0;
|
|
2493
|
-
height: 16px;
|
|
2494
|
-
overflow: hidden;
|
|
2495
|
-
display: inline-block;
|
|
2496
|
-
}
|
|
2497
|
-
.np-info__large {
|
|
2498
|
-
height: 24px;
|
|
2499
|
-
}
|
|
2500
|
-
.np-info__large button,
|
|
2501
|
-
.np-info__large [data-toggle="popover"]:not(.btn) {
|
|
2502
|
-
height: 24px;
|
|
2503
|
-
display: inline-block;
|
|
2504
|
-
}
|
|
2505
|
-
.np-info .tw-icon {
|
|
2506
|
-
cursor: pointer;
|
|
2507
|
-
color: var(--color-interactive-primary);
|
|
2508
|
-
display: inline-block;
|
|
2509
2481
|
}
|
|
2510
2482
|
.np-info [data-toggle="popover"]:not(.btn) {
|
|
2511
2483
|
border-bottom: none !important;
|
|
@@ -2626,95 +2598,6 @@ html:not([dir="rtl"]) .np-flow-navigation--sm .np-flow-navigation__stepper {
|
|
|
2626
2598
|
border-radius: 9999px !important;
|
|
2627
2599
|
border-radius: var(--radius-full) !important;
|
|
2628
2600
|
}
|
|
2629
|
-
.item {
|
|
2630
|
-
padding: 16px;
|
|
2631
|
-
border-radius: 24px;
|
|
2632
|
-
border-radius: var(--radius-large);
|
|
2633
|
-
background-color: #ffffff;
|
|
2634
|
-
background-color: var(--color-background-screen);
|
|
2635
|
-
display: flex;
|
|
2636
|
-
gap: 16px;
|
|
2637
|
-
align-items: center;
|
|
2638
|
-
flex-direction: row;
|
|
2639
|
-
cursor: pointer;
|
|
2640
|
-
}
|
|
2641
|
-
.item.NonInteractive {
|
|
2642
|
-
cursor: default;
|
|
2643
|
-
}
|
|
2644
|
-
.item:disabled {
|
|
2645
|
-
opacity: 0.45;
|
|
2646
|
-
mix-blend-mode: luminosity;
|
|
2647
|
-
}
|
|
2648
|
-
.item:hover {
|
|
2649
|
-
background-color: var(--color-background-screen-hover);
|
|
2650
|
-
}
|
|
2651
|
-
.item:active {
|
|
2652
|
-
background-color: var(--color-background-screen-active);
|
|
2653
|
-
}
|
|
2654
|
-
.item.active {
|
|
2655
|
-
background-color: rgba(134,167,189,0.10196);
|
|
2656
|
-
background-color: var(--color-background-neutral);
|
|
2657
|
-
}
|
|
2658
|
-
.item.active:hover {
|
|
2659
|
-
background-color: var(--color-background-neutral-hover);
|
|
2660
|
-
}
|
|
2661
|
-
.item.active:active {
|
|
2662
|
-
background-color: var(--color-background-neutral-active);
|
|
2663
|
-
}
|
|
2664
|
-
.item.inactive {
|
|
2665
|
-
background-color: rgba(134, 167, 189, 0.025);
|
|
2666
|
-
border: 1px dashed rgba(0,0,0,0.10196);
|
|
2667
|
-
border: 1px dashed var(--color-border-neutral);
|
|
2668
|
-
}
|
|
2669
|
-
@supports (color: color-mix(in lch, red, blue)) {
|
|
2670
|
-
.item.inactive {
|
|
2671
|
-
background-color: color-mix(in srgb, var(--color-background-neutral) 25%, transparent);
|
|
2672
|
-
}
|
|
2673
|
-
}
|
|
2674
|
-
.item.inactive:hover {
|
|
2675
|
-
background-color: color-mix(in srgb, var(--color-background-neutral-hover) 25%, transparent);
|
|
2676
|
-
}
|
|
2677
|
-
.item.inactive:active {
|
|
2678
|
-
background-color: color-mix(in srgb, var(--color-background-neutral-active) 25%, transparent);
|
|
2679
|
-
}
|
|
2680
|
-
.item-media {
|
|
2681
|
-
flex: 0 0 auto;
|
|
2682
|
-
align-items: flex-start;
|
|
2683
|
-
}
|
|
2684
|
-
.startValue {
|
|
2685
|
-
flex: 1;
|
|
2686
|
-
}
|
|
2687
|
-
.endValue {
|
|
2688
|
-
flex: 1;
|
|
2689
|
-
text-align: end;
|
|
2690
|
-
}
|
|
2691
|
-
.endValue.positive {
|
|
2692
|
-
color: var(--color-sentiment-positive) !important;
|
|
2693
|
-
}
|
|
2694
|
-
.endValue.negative {
|
|
2695
|
-
color: var(--color-sentiment-negative) !important;
|
|
2696
|
-
}
|
|
2697
|
-
.endValue.positive .item-title {
|
|
2698
|
-
color: var(--color-sentiment-positive) !important;
|
|
2699
|
-
}
|
|
2700
|
-
.endValue.negative .item-title {
|
|
2701
|
-
color: var(--color-sentiment-negative) !important;
|
|
2702
|
-
}
|
|
2703
|
-
.endValue.strikethrough {
|
|
2704
|
-
-webkit-text-decoration: line-through;
|
|
2705
|
-
text-decoration: line-through;
|
|
2706
|
-
}
|
|
2707
|
-
.item-title {
|
|
2708
|
-
color: #37517e;
|
|
2709
|
-
color: var(--color-content-primary);
|
|
2710
|
-
}
|
|
2711
|
-
.item-additionalInfo {
|
|
2712
|
-
color: #768e9c;
|
|
2713
|
-
color: var(--color-content-tertiary);
|
|
2714
|
-
}
|
|
2715
|
-
.item-action {
|
|
2716
|
-
flex: 0 0 auto;
|
|
2717
|
-
}
|
|
2718
2601
|
.np-field-control {
|
|
2719
2602
|
margin-top: 4px;
|
|
2720
2603
|
margin-top: var(--size-4);
|
package/src/main.less
CHANGED
|
@@ -30,8 +30,8 @@ export interface StoryContentProps {
|
|
|
30
30
|
}
|
|
31
31
|
|
|
32
32
|
const StoryContent = ({ args, screenMode }: StoryContentProps) => {
|
|
33
|
-
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
34
33
|
const [open, setOpen] = useState(args.open);
|
|
34
|
+
|
|
35
35
|
return (
|
|
36
36
|
<>
|
|
37
37
|
<Button v2 onClick={() => setOpen(true)}>
|
|
@@ -67,12 +67,12 @@ export function parseAmount(number: string, currency: string, locale = DEFAULT_L
|
|
|
67
67
|
const precision = getCurrencyDecimals(currency);
|
|
68
68
|
const groupSeparator = isNumberLocaleSupported() ? (10000).toLocaleString(validLocale)[2] : ',';
|
|
69
69
|
const decimalSeparator = getDecimalSeparator(validLocale);
|
|
70
|
-
const numberWithStandardDecimalSeparator = (number
|
|
70
|
+
const numberWithStandardDecimalSeparator = (number || '')
|
|
71
71
|
.replace(new RegExp(`\\${groupSeparator}`, 'g'), '')
|
|
72
72
|
.replace(new RegExp(`\\${decimalSeparator}`, 'g'), '.')
|
|
73
73
|
.replace(/[^0-9.]/g, '');
|
|
74
|
-
const parsedAmount = parseFloat(
|
|
75
|
-
parseFloat(numberWithStandardDecimalSeparator).toFixed(precision),
|
|
74
|
+
const parsedAmount = Number.parseFloat(
|
|
75
|
+
Number.parseFloat(numberWithStandardDecimalSeparator).toFixed(precision),
|
|
76
76
|
);
|
|
77
77
|
return Math.abs(parsedAmount);
|
|
78
78
|
}
|
package/src/nudge/Nudge.tsx
CHANGED
|
@@ -22,7 +22,6 @@ const getLocalStorage = (): string[] => {
|
|
|
22
22
|
return storage.map((item) => String(item));
|
|
23
23
|
}
|
|
24
24
|
}
|
|
25
|
-
// eslint-disable-next-line unicorn/prefer-optional-catch-binding, no-empty
|
|
26
25
|
} catch (error) {}
|
|
27
26
|
|
|
28
27
|
return [];
|
|
@@ -101,7 +100,6 @@ const Nudge = ({
|
|
|
101
100
|
if (persistDismissal && id) {
|
|
102
101
|
try {
|
|
103
102
|
localStorage.setItem(STORAGE_NAME, JSON.stringify([...dismissedNudgesStorage, id]));
|
|
104
|
-
// eslint-disable-next-line unicorn/prefer-optional-catch-binding, no-empty
|
|
105
103
|
} catch (error) {}
|
|
106
104
|
|
|
107
105
|
setIsDismissed(true);
|
|
@@ -48,7 +48,7 @@ exports[`OverlayHeader renders as expected 1`] = `
|
|
|
48
48
|
width="24"
|
|
49
49
|
>
|
|
50
50
|
<path
|
|
51
|
-
d="
|
|
51
|
+
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"
|
|
52
52
|
/>
|
|
53
53
|
</svg>
|
|
54
54
|
</span>
|
|
@@ -51,32 +51,20 @@ type Story = StoryObj<typeof PromoCardGroup>;
|
|
|
51
51
|
|
|
52
52
|
export const Default: Story = {
|
|
53
53
|
args: {
|
|
54
|
-
children:
|
|
55
|
-
<>
|
|
56
|
-
<PromoCards />
|
|
57
|
-
</>
|
|
58
|
-
),
|
|
54
|
+
children: <PromoCards />,
|
|
59
55
|
},
|
|
60
56
|
};
|
|
61
57
|
|
|
62
58
|
export const DefaultChecked: Story = {
|
|
63
59
|
args: {
|
|
64
|
-
children:
|
|
65
|
-
<>
|
|
66
|
-
<PromoCards />
|
|
67
|
-
</>
|
|
68
|
-
),
|
|
60
|
+
children: <PromoCards />,
|
|
69
61
|
defaultChecked: 'standard',
|
|
70
62
|
},
|
|
71
63
|
};
|
|
72
64
|
|
|
73
65
|
export const Disabled: Story = {
|
|
74
66
|
args: {
|
|
75
|
-
children:
|
|
76
|
-
<>
|
|
77
|
-
<PromoCards />
|
|
78
|
-
</>
|
|
79
|
-
),
|
|
67
|
+
children: <PromoCards />,
|
|
80
68
|
isDisabled: true,
|
|
81
69
|
},
|
|
82
70
|
};
|
|
@@ -12,10 +12,8 @@ type Story = StoryObj<typeof ThemeProvider>;
|
|
|
12
12
|
|
|
13
13
|
export const PlatformTheme: Story = {
|
|
14
14
|
render: () => (
|
|
15
|
-
|
|
16
|
-
<
|
|
17
|
-
|
|
18
|
-
</ThemeProvider>
|
|
19
|
-
</>
|
|
15
|
+
<ThemeProvider theme="platform">
|
|
16
|
+
<Button>Button</Button>
|
|
17
|
+
</ThemeProvider>
|
|
20
18
|
),
|
|
21
19
|
};
|
|
@@ -31,7 +31,6 @@ describe('Select', () => {
|
|
|
31
31
|
beforeEach(() => {
|
|
32
32
|
global.requestAnimationFrame = (callback) => setTimeout(callback, 16);
|
|
33
33
|
|
|
34
|
-
// eslint-disable-next-line jest/prefer-spy-on
|
|
35
34
|
Element.prototype.scrollIntoView = mockScrollIntoView;
|
|
36
35
|
|
|
37
36
|
enableDesktopScreen();
|
package/src/select/Select.tsx
CHANGED
|
@@ -448,12 +448,10 @@ export default function Select({
|
|
|
448
448
|
);
|
|
449
449
|
}
|
|
450
450
|
|
|
451
|
-
// eslint-disable-next-line react/prop-types
|
|
452
451
|
function SeparatorOption() {
|
|
453
452
|
return <li className={s('np-separator')} aria-hidden />;
|
|
454
453
|
}
|
|
455
454
|
|
|
456
|
-
// eslint-disable-next-line react/prop-types
|
|
457
455
|
function HeaderOption({ children }: { children?: React.ReactNode }) {
|
|
458
456
|
return (
|
|
459
457
|
<li // eslint-disable-line jsx-a11y/no-noninteractive-element-interactions
|
|
@@ -500,7 +498,6 @@ export default function Select({
|
|
|
500
498
|
: createSelectHandlerForOption(selectOption);
|
|
501
499
|
|
|
502
500
|
return (
|
|
503
|
-
/* eslint-disable-next-line jsx-a11y/no-noninteractive-element-interactions */
|
|
504
501
|
<li
|
|
505
502
|
ref={isFocusedWithKeyboard ? keyboardFocusedReference : undefined}
|
|
506
503
|
key={index}
|
|
@@ -17,12 +17,12 @@ describe('option', () => {
|
|
|
17
17
|
|
|
18
18
|
it('renders the given small note', () => {
|
|
19
19
|
component.setProps({ note: 'whadup' });
|
|
20
|
-
expect(component.find(Body).last().props().children).
|
|
20
|
+
expect(component.find(Body).last().props().children).toBe('whadup');
|
|
21
21
|
});
|
|
22
22
|
|
|
23
23
|
it('renders the given secondary text in a separate line', () => {
|
|
24
24
|
component.setProps({ secondary: 'secondary text' });
|
|
25
|
-
expect(component.find(Body).last().props().children).
|
|
25
|
+
expect(component.find(Body).last().props().children).toBe('secondary text');
|
|
26
26
|
});
|
|
27
27
|
|
|
28
28
|
it('renders a given icon', () => {
|
|
@@ -175,8 +175,8 @@ export const Basic: Story = {
|
|
|
175
175
|
options: balances,
|
|
176
176
|
},
|
|
177
177
|
render: (args: SelectOptionProps) => {
|
|
178
|
-
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
179
178
|
const [selected, setSelected] = useState<SelectOptionValue | undefined>(undefined);
|
|
179
|
+
|
|
180
180
|
function onChange(value: SelectOptionValue): void {
|
|
181
181
|
setSelected(value);
|
|
182
182
|
}
|
|
@@ -194,7 +194,6 @@ export const Basic: Story = {
|
|
|
194
194
|
|
|
195
195
|
export const Variants: Story = {
|
|
196
196
|
render: () => {
|
|
197
|
-
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
198
197
|
const [selected, setSelected] = useState<SelectOptionValue<CustomData>>({
|
|
199
198
|
...paymentMethods[1].options[1],
|
|
200
199
|
content: null,
|
package/src/table/Table.tsx
CHANGED
|
@@ -113,7 +113,6 @@ const Table = ({
|
|
|
113
113
|
'np-table-outer-container--center': !fullWidth,
|
|
114
114
|
'np-table-outer-container--full-width': fullWidth,
|
|
115
115
|
})}
|
|
116
|
-
// eslint-disable-next-line jsx-a11y/no-noninteractive-tabindex
|
|
117
116
|
tabIndex={0}
|
|
118
117
|
data-testid="np-table-outer-container"
|
|
119
118
|
>
|
|
@@ -7,7 +7,6 @@ import fetchMock from 'jest-fetch-mock';
|
|
|
7
7
|
|
|
8
8
|
global.fetch = fetchMock as unknown as typeof global.fetch;
|
|
9
9
|
|
|
10
|
-
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-unsafe-call
|
|
11
10
|
Enzyme.configure({ adapter: new Adapter() });
|
|
12
11
|
|
|
13
12
|
global.requestAnimationFrame = (callback: (time: number) => void): number => {
|
package/src/tooltip/Tooltip.tsx
CHANGED
|
@@ -98,7 +98,6 @@ const Tooltip = ({
|
|
|
98
98
|
open ? `np-panel--open np-tooltip--open` : null,
|
|
99
99
|
className,
|
|
100
100
|
)}
|
|
101
|
-
// eslint-disable-next-line react/forbid-dom-props
|
|
102
101
|
style={{ ...styles.popper }}
|
|
103
102
|
{...attributes.popper}
|
|
104
103
|
aria-hidden={!open}
|
|
@@ -111,7 +110,6 @@ const Tooltip = ({
|
|
|
111
110
|
// @ts-expect-error
|
|
112
111
|
ref={setArrowElement}
|
|
113
112
|
className={clsx('np-panel__arrow')}
|
|
114
|
-
// eslint-disable-next-line react/forbid-dom-props
|
|
115
113
|
style={styles.arrow}
|
|
116
114
|
/>
|
|
117
115
|
</div>
|