@transferwise/components 46.157.1 → 46.159.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/FlowNavigation/FlowNavigation.js +5 -14
- package/build/FlowNavigation/FlowNavigation.js.map +1 -1
- package/build/FlowNavigation/FlowNavigation.mjs +5 -14
- package/build/FlowNavigation/FlowNavigation.mjs.map +1 -1
- package/build/Markup/Markup.js +15 -14
- package/build/Markup/Markup.js.map +1 -1
- package/build/Markup/Markup.mjs +15 -14
- package/build/Markup/Markup.mjs.map +1 -1
- package/build/Popover/Popover.js +4 -0
- package/build/Popover/Popover.js.map +1 -1
- package/build/Popover/Popover.mjs +4 -0
- package/build/Popover/Popover.mjs.map +1 -1
- package/build/_deprecated/OverlayHeader/OverlayHeader.js +6 -41
- package/build/_deprecated/OverlayHeader/OverlayHeader.js.map +1 -1
- package/build/_deprecated/OverlayHeader/OverlayHeader.mjs +6 -41
- package/build/_deprecated/OverlayHeader/OverlayHeader.mjs.map +1 -1
- package/build/common/Panel/Panel.js +13 -4
- package/build/common/Panel/Panel.js.map +1 -1
- package/build/common/Panel/Panel.mjs +14 -5
- package/build/common/Panel/Panel.mjs.map +1 -1
- package/build/common/PropsValues/position.js +29 -0
- package/build/common/PropsValues/position.js.map +1 -1
- package/build/common/PropsValues/position.mjs +28 -1
- package/build/common/PropsValues/position.mjs.map +1 -1
- package/build/main.css +8 -34
- package/build/styles/FlowNavigation/FlowNavigation.css +7 -13
- package/build/styles/main.css +8 -34
- package/build/types/FlowNavigation/FlowNavigation.d.ts +2 -9
- package/build/types/FlowNavigation/FlowNavigation.d.ts.map +1 -1
- package/build/types/Markup/Markup.d.ts.map +1 -1
- package/build/types/Markup/Markup.types.d.ts +16 -5
- package/build/types/Markup/Markup.types.d.ts.map +1 -1
- package/build/types/Markup/index.d.ts +1 -1
- package/build/types/Markup/index.d.ts.map +1 -1
- package/build/types/Popover/Popover.d.ts +1 -1
- package/build/types/Popover/Popover.d.ts.map +1 -1
- package/build/types/_deprecated/OverlayHeader/OverlayHeader.d.ts.map +1 -1
- package/build/types/common/Panel/Panel.d.ts +6 -6
- package/build/types/common/Panel/Panel.d.ts.map +1 -1
- package/build/types/common/PropsValues/position.d.ts +18 -1
- package/build/types/common/PropsValues/position.d.ts.map +1 -1
- package/build/types/common/ResponsivePanel/ResponsivePanel.d.ts +2 -2
- package/build/types/index.d.ts +1 -1
- package/build/types/index.d.ts.map +1 -1
- package/package.json +3 -3
- package/src/FlowNavigation/FlowNavigation.css +7 -13
- package/src/FlowNavigation/FlowNavigation.less +6 -15
- package/src/FlowNavigation/FlowNavigation.tsx +6 -27
- package/src/FlowNavigation/_stories/FlowNavigation.story.tsx +0 -86
- package/src/Markup/Markup.test.tsx +8 -7
- package/src/Markup/Markup.tsx +18 -15
- package/src/Markup/Markup.types.ts +16 -6
- package/src/Markup/_stories/Markup.docs.mdx +60 -0
- package/src/Markup/_stories/Markup.story.tsx +7 -8
- package/src/Markup/index.ts +6 -1
- package/src/Popover/Popover.tsx +9 -2
- package/src/_deprecated/OverlayHeader/OverlayHeader.tsx +2 -21
- package/src/common/Panel/Panel.test.tsx +17 -0
- package/src/common/Panel/Panel.tsx +17 -8
- package/src/common/Panel/_stories/Panel.story.tsx +182 -0
- package/src/common/PropsValues/position.ts +54 -0
- package/src/i18n/en.json +1 -0
- package/src/index.ts +1 -1
- package/src/main.css +8 -34
- package/src/main.less +0 -1
- package/build/styles/_deprecated/OverlayHeader/OverlayHeader.css +0 -15
- package/src/_deprecated/OverlayHeader/OverlayHeader.css +0 -15
- package/src/_deprecated/OverlayHeader/OverlayHeader.less +0 -24
|
@@ -1,13 +1,19 @@
|
|
|
1
|
+
import type { Placement } from '@floating-ui/react';
|
|
2
|
+
|
|
1
3
|
export enum Position {
|
|
2
4
|
BOTTOM = 'bottom',
|
|
3
5
|
BOTTOM_LEFT = 'bottom-left',
|
|
4
6
|
BOTTOM_RIGHT = 'bottom-right',
|
|
5
7
|
CENTER = 'center',
|
|
6
8
|
LEFT = 'left',
|
|
9
|
+
LEFT_BOTTOM = 'left-bottom',
|
|
7
10
|
LEFT_TOP = 'left-top',
|
|
8
11
|
RIGHT = 'right',
|
|
12
|
+
RIGHT_BOTTOM = 'right-bottom',
|
|
9
13
|
RIGHT_TOP = 'right-top',
|
|
10
14
|
TOP = 'top',
|
|
15
|
+
TOP_LEFT = 'top-left',
|
|
16
|
+
TOP_RIGHT = 'top-right',
|
|
11
17
|
}
|
|
12
18
|
|
|
13
19
|
export type PositionCenter = 'center';
|
|
@@ -15,3 +21,51 @@ export type PositionTop = 'top';
|
|
|
15
21
|
export type PositionRight = 'right';
|
|
16
22
|
export type PositionBottom = 'bottom';
|
|
17
23
|
export type PositionLeft = 'left';
|
|
24
|
+
|
|
25
|
+
export type PositionTopLeft = 'top-left';
|
|
26
|
+
export type PositionTopRight = 'top-right';
|
|
27
|
+
export type PositionBottomLeft = 'bottom-left';
|
|
28
|
+
export type PositionBottomRight = 'bottom-right';
|
|
29
|
+
export type PositionLeftTop = 'left-top';
|
|
30
|
+
export type PositionLeftBottom = 'left-bottom';
|
|
31
|
+
export type PositionRightTop = 'right-top';
|
|
32
|
+
export type PositionRightBottom = 'right-bottom';
|
|
33
|
+
|
|
34
|
+
/** Neptune position values that can be converted to floating-ui Placement */
|
|
35
|
+
export type FloatingPlacement =
|
|
36
|
+
| PositionTop
|
|
37
|
+
| PositionRight
|
|
38
|
+
| PositionBottom
|
|
39
|
+
| PositionLeft
|
|
40
|
+
| PositionTopLeft
|
|
41
|
+
| PositionTopRight
|
|
42
|
+
| PositionRightTop
|
|
43
|
+
| PositionRightBottom
|
|
44
|
+
| PositionBottomLeft
|
|
45
|
+
| PositionBottomRight
|
|
46
|
+
| PositionLeftTop
|
|
47
|
+
| PositionLeftBottom;
|
|
48
|
+
|
|
49
|
+
/** Maps Neptune position values to floating-ui Placement */
|
|
50
|
+
export const positionToPlacement = (position: FloatingPlacement): Placement => {
|
|
51
|
+
switch (position) {
|
|
52
|
+
case 'top-left':
|
|
53
|
+
return 'top-start';
|
|
54
|
+
case 'top-right':
|
|
55
|
+
return 'top-end';
|
|
56
|
+
case 'bottom-left':
|
|
57
|
+
return 'bottom-start';
|
|
58
|
+
case 'bottom-right':
|
|
59
|
+
return 'bottom-end';
|
|
60
|
+
case 'left-top':
|
|
61
|
+
return 'left-start';
|
|
62
|
+
case 'left-bottom':
|
|
63
|
+
return 'left-end';
|
|
64
|
+
case 'right-top':
|
|
65
|
+
return 'right-start';
|
|
66
|
+
case 'right-bottom':
|
|
67
|
+
return 'right-end';
|
|
68
|
+
default:
|
|
69
|
+
return position;
|
|
70
|
+
}
|
|
71
|
+
};
|
package/src/i18n/en.json
CHANGED
|
@@ -50,6 +50,7 @@
|
|
|
50
50
|
"neptune.Table.loaded": "Table data has loaded",
|
|
51
51
|
"neptune.Table.loading": "Table data is loading",
|
|
52
52
|
"neptune.Table.refreshPage": "Refresh page",
|
|
53
|
+
"neptune.Typeahead.suggestionsLabel": "Suggestions",
|
|
53
54
|
"neptune.Upload.csButtonText": "Upload another file?",
|
|
54
55
|
"neptune.Upload.csFailureText": "Upload failed. Please, try again",
|
|
55
56
|
"neptune.Upload.csSuccessText": "Upload complete!",
|
package/src/index.ts
CHANGED
|
@@ -95,7 +95,7 @@ export type { LegacyListItemProps } from './_deprecated/LegacyListItem';
|
|
|
95
95
|
export type { LinkProps } from './Link';
|
|
96
96
|
export type { LoaderProps } from './Loader';
|
|
97
97
|
export type { MarkdownProps } from './Markdown';
|
|
98
|
-
export type { MarkupActionHandler,
|
|
98
|
+
export type { MarkupActionHandler, MarkupNode, MarkupProps, MarkupTextOptions } from './Markup';
|
|
99
99
|
export type { ModalProps } from './Modal';
|
|
100
100
|
export type { MoneyProps } from './Money';
|
|
101
101
|
export type {
|
package/src/main.css
CHANGED
|
@@ -29013,7 +29013,13 @@ button.np-option {
|
|
|
29013
29013
|
justify-content: center;
|
|
29014
29014
|
width: 100%;
|
|
29015
29015
|
box-sizing: border-box;
|
|
29016
|
-
min-height:
|
|
29016
|
+
min-height: 80px;
|
|
29017
|
+
}
|
|
29018
|
+
|
|
29019
|
+
@media (min-width: 320.02px) {
|
|
29020
|
+
.np-flow-navigation {
|
|
29021
|
+
min-height: 128px;
|
|
29022
|
+
}
|
|
29017
29023
|
}
|
|
29018
29024
|
|
|
29019
29025
|
.np-flow-navigation--border-bottom {
|
|
@@ -29024,7 +29030,7 @@ button.np-option {
|
|
|
29024
29030
|
.np-flow-navigation__content {
|
|
29025
29031
|
width: 100%;
|
|
29026
29032
|
min-width: 320px;
|
|
29027
|
-
max-width:
|
|
29033
|
+
max-width: none;
|
|
29028
29034
|
}
|
|
29029
29035
|
|
|
29030
29036
|
.np-flow-navigation__stepper {
|
|
@@ -29101,20 +29107,6 @@ html:not([dir="rtl"]) .np-flow-navigation--sm .np-flow-navigation__stepper {
|
|
|
29101
29107
|
visibility: hidden;
|
|
29102
29108
|
}
|
|
29103
29109
|
|
|
29104
|
-
.np-flow-navigation--composable {
|
|
29105
|
-
min-height: 80px;
|
|
29106
|
-
}
|
|
29107
|
-
|
|
29108
|
-
@media (min-width: 320.02px) {
|
|
29109
|
-
.np-flow-navigation--composable {
|
|
29110
|
-
min-height: 128px;
|
|
29111
|
-
}
|
|
29112
|
-
}
|
|
29113
|
-
|
|
29114
|
-
.np-flow-navigation--composable .np-flow-navigation__content {
|
|
29115
|
-
max-width: none;
|
|
29116
|
-
}
|
|
29117
|
-
|
|
29118
29110
|
.np-theme-personal--forest-green .np-flow-navigation .np-flow-header__left path,
|
|
29119
29111
|
.np-theme-personal--bright-green .np-flow-navigation .np-flow-header__left path,
|
|
29120
29112
|
.np-theme-personal--dark .np-flow-navigation .np-flow-header__left path {
|
|
@@ -31650,24 +31642,6 @@ html:not([dir="rtl"]) .np-navigation-option {
|
|
|
31650
31642
|
text-decoration: var(--nudge-link-text-decoration);
|
|
31651
31643
|
}
|
|
31652
31644
|
|
|
31653
|
-
.np-overlay-header .np-overlay-header__content {
|
|
31654
|
-
min-height: 97px;
|
|
31655
|
-
width: 100%;
|
|
31656
|
-
min-width: 320px;
|
|
31657
|
-
max-width: calc(1160px - 36px);
|
|
31658
|
-
}
|
|
31659
|
-
|
|
31660
|
-
.np-theme-personal .np-overlay-header {
|
|
31661
|
-
border-bottom: 1px solid rgba(0,0,0,0.10196);
|
|
31662
|
-
border-bottom: 1px solid var(--color-border-neutral);
|
|
31663
|
-
}
|
|
31664
|
-
|
|
31665
|
-
.np-theme-personal--forest-green .np-overlay-header .np-flow-header__left path,
|
|
31666
|
-
.np-theme-personal--bright-green .np-overlay-header .np-flow-header__left path,
|
|
31667
|
-
.np-theme-personal--dark .np-overlay-header .np-flow-header__left path {
|
|
31668
|
-
fill: var(--color-interactive-primary);
|
|
31669
|
-
}
|
|
31670
|
-
|
|
31671
31645
|
.tw-telephone {
|
|
31672
31646
|
display: flex;
|
|
31673
31647
|
}
|
package/src/main.less
CHANGED
|
@@ -63,7 +63,6 @@
|
|
|
63
63
|
@import "./_deprecated/NavigationOption/NavigationOption.less";
|
|
64
64
|
@import "./_deprecated/NavigationOptionsList/NavigationOptionsList.less";
|
|
65
65
|
@import "./Nudge/Nudge.less";
|
|
66
|
-
@import "./_deprecated/OverlayHeader/OverlayHeader.less";
|
|
67
66
|
@import "./PhoneNumberInput/PhoneNumberInput.less";
|
|
68
67
|
@import "./Popover/Popover.less";
|
|
69
68
|
@import "./PromoCard/PromoCard.less";
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
.np-overlay-header .np-overlay-header__content {
|
|
2
|
-
min-height: 97px;
|
|
3
|
-
width: 100%;
|
|
4
|
-
min-width: 320px;
|
|
5
|
-
max-width: calc(1160px - 36px);
|
|
6
|
-
}
|
|
7
|
-
.np-theme-personal .np-overlay-header {
|
|
8
|
-
border-bottom: 1px solid rgba(0,0,0,0.10196);
|
|
9
|
-
border-bottom: 1px solid var(--color-border-neutral);
|
|
10
|
-
}
|
|
11
|
-
.np-theme-personal--forest-green .np-overlay-header .np-flow-header__left path,
|
|
12
|
-
.np-theme-personal--bright-green .np-overlay-header .np-flow-header__left path,
|
|
13
|
-
.np-theme-personal--dark .np-overlay-header .np-flow-header__left path {
|
|
14
|
-
fill: var(--color-interactive-primary);
|
|
15
|
-
}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
.np-overlay-header .np-overlay-header__content {
|
|
2
|
-
min-height: 97px;
|
|
3
|
-
width: 100%;
|
|
4
|
-
min-width: 320px;
|
|
5
|
-
max-width: calc(1160px - 36px);
|
|
6
|
-
}
|
|
7
|
-
.np-theme-personal .np-overlay-header {
|
|
8
|
-
border-bottom: 1px solid rgba(0,0,0,0.10196);
|
|
9
|
-
border-bottom: 1px solid var(--color-border-neutral);
|
|
10
|
-
}
|
|
11
|
-
.np-theme-personal--forest-green .np-overlay-header .np-flow-header__left path,
|
|
12
|
-
.np-theme-personal--bright-green .np-overlay-header .np-flow-header__left path,
|
|
13
|
-
.np-theme-personal--dark .np-overlay-header .np-flow-header__left path {
|
|
14
|
-
fill: var(--color-interactive-primary);
|
|
15
|
-
}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
@import (reference) "@transferwise/neptune-tokens/breakpoints.less";
|
|
2
|
-
@import (reference) "./../../styles/less/addons/_spacing-utilities.less";
|
|
3
|
-
|
|
4
|
-
.np-overlay-header {
|
|
5
|
-
.np-overlay-header__content {
|
|
6
|
-
// Same height and width as in FlowNavigation
|
|
7
|
-
min-height: 97px;
|
|
8
|
-
width: 100%;
|
|
9
|
-
min-width: @screen-xs-min;
|
|
10
|
-
max-width: calc(@screen-lg-min - 36px);
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
.np-theme-personal & {
|
|
14
|
-
border-bottom: 1px solid var(--color-border-neutral);
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
.np-theme-personal--forest-green &,
|
|
18
|
-
.np-theme-personal--bright-green &,
|
|
19
|
-
.np-theme-personal--dark & {
|
|
20
|
-
.np-flow-header__left path {
|
|
21
|
-
fill: var(--color-interactive-primary);
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
}
|