@transferwise/components 0.0.0-experimental-c654bc3 → 0.0.0-experimental-a7e0e6f
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/index.esm.js +47 -141
- package/build/index.esm.js.map +1 -1
- package/build/index.js +47 -141
- package/build/index.js.map +1 -1
- package/build/main.css +7 -5
- package/build/styles/dimmer/Dimmer.css +0 -3
- package/build/styles/drawer/Drawer.css +3 -0
- package/build/styles/main.css +7 -5
- package/build/styles/modal/Modal.css +4 -2
- package/build/types/index.d.ts +2 -1
- package/build/types/index.d.ts.map +1 -1
- package/build/types/typeahead/Typeahead.d.ts +98 -57
- package/build/types/typeahead/Typeahead.d.ts.map +1 -1
- package/build/types/typeahead/index.d.ts +3 -2
- package/build/types/typeahead/index.d.ts.map +1 -1
- package/build/types/typeahead/typeaheadInput/TypeaheadInput.d.ts +23 -41
- package/build/types/typeahead/typeaheadInput/TypeaheadInput.d.ts.map +1 -1
- package/build/types/typeahead/typeaheadOption/TypeaheadOption.d.ts +9 -17
- package/build/types/typeahead/typeaheadOption/TypeaheadOption.d.ts.map +1 -1
- package/package.json +5 -2
- package/src/dimmer/Dimmer.css +0 -3
- package/src/dimmer/Dimmer.less +0 -4
- package/src/drawer/Drawer.css +3 -0
- package/src/drawer/Drawer.less +4 -0
- package/src/index.ts +2 -1
- package/src/main.css +7 -5
- package/src/modal/Modal.css +4 -2
- package/src/modal/Modal.less +5 -1
- package/src/modal/Modal.story.tsx +4 -2
- package/src/typeahead/Typeahead.spec.js +1 -1
- package/src/typeahead/{Typeahead.story.js → Typeahead.story.tsx} +8 -7
- package/src/typeahead/{Typeahead.js → Typeahead.tsx} +105 -106
- package/src/typeahead/index.ts +4 -0
- package/src/typeahead/typeaheadInput/{TypeaheadInput.js → TypeaheadInput.tsx} +43 -42
- package/src/typeahead/typeaheadOption/{TypeaheadOption.js → TypeaheadOption.tsx} +10 -20
- package/src/typeahead/index.js +0 -3
package/build/main.css
CHANGED
|
@@ -1801,9 +1801,6 @@ button.np-option {
|
|
|
1801
1801
|
.dimmer.dimmer--exit.dimmer--exit-fade > * {
|
|
1802
1802
|
opacity: 0;
|
|
1803
1803
|
}
|
|
1804
|
-
.dimmer .np-theme-personal {
|
|
1805
|
-
background: transparent;
|
|
1806
|
-
}
|
|
1807
1804
|
.dimmer-content-positioner {
|
|
1808
1805
|
min-height: 100%;
|
|
1809
1806
|
pointer-events: none;
|
|
@@ -1887,6 +1884,9 @@ button.np-option {
|
|
|
1887
1884
|
overflow-y: auto;
|
|
1888
1885
|
flex: 1;
|
|
1889
1886
|
}
|
|
1887
|
+
.np-drawer .np-drawer-content .np-theme-personal {
|
|
1888
|
+
background-color: transparent;
|
|
1889
|
+
}
|
|
1890
1890
|
.np-drawer .np-drawer-footer,
|
|
1891
1891
|
.np-drawer .np-drawer-content {
|
|
1892
1892
|
padding: 16px;
|
|
@@ -3200,9 +3200,11 @@ a {
|
|
|
3200
3200
|
min-height: var(--size-32);
|
|
3201
3201
|
padding-bottom: 4px !important;
|
|
3202
3202
|
}
|
|
3203
|
+
.tw-modal .tw-modal-content .np-theme-personal {
|
|
3204
|
+
background-color: transparent;
|
|
3205
|
+
}
|
|
3203
3206
|
.tw-modal table,
|
|
3204
|
-
.tw-modal .table
|
|
3205
|
-
.tw-modal .np-theme-personal {
|
|
3207
|
+
.tw-modal .table {
|
|
3206
3208
|
background-color: transparent;
|
|
3207
3209
|
}
|
|
3208
3210
|
@media (min-width: 576px) {
|
package/build/styles/main.css
CHANGED
|
@@ -1801,9 +1801,6 @@ button.np-option {
|
|
|
1801
1801
|
.dimmer.dimmer--exit.dimmer--exit-fade > * {
|
|
1802
1802
|
opacity: 0;
|
|
1803
1803
|
}
|
|
1804
|
-
.dimmer .np-theme-personal {
|
|
1805
|
-
background: transparent;
|
|
1806
|
-
}
|
|
1807
1804
|
.dimmer-content-positioner {
|
|
1808
1805
|
min-height: 100%;
|
|
1809
1806
|
pointer-events: none;
|
|
@@ -1887,6 +1884,9 @@ button.np-option {
|
|
|
1887
1884
|
overflow-y: auto;
|
|
1888
1885
|
flex: 1;
|
|
1889
1886
|
}
|
|
1887
|
+
.np-drawer .np-drawer-content .np-theme-personal {
|
|
1888
|
+
background-color: transparent;
|
|
1889
|
+
}
|
|
1890
1890
|
.np-drawer .np-drawer-footer,
|
|
1891
1891
|
.np-drawer .np-drawer-content {
|
|
1892
1892
|
padding: 16px;
|
|
@@ -3200,9 +3200,11 @@ a {
|
|
|
3200
3200
|
min-height: var(--size-32);
|
|
3201
3201
|
padding-bottom: 4px !important;
|
|
3202
3202
|
}
|
|
3203
|
+
.tw-modal .tw-modal-content .np-theme-personal {
|
|
3204
|
+
background-color: transparent;
|
|
3205
|
+
}
|
|
3203
3206
|
.tw-modal table,
|
|
3204
|
-
.tw-modal .table
|
|
3205
|
-
.tw-modal .np-theme-personal {
|
|
3207
|
+
.tw-modal .table {
|
|
3206
3208
|
background-color: transparent;
|
|
3207
3209
|
}
|
|
3208
3210
|
@media (min-width: 576px) {
|
|
@@ -82,9 +82,11 @@
|
|
|
82
82
|
min-height: var(--size-32);
|
|
83
83
|
padding-bottom: 4px !important;
|
|
84
84
|
}
|
|
85
|
+
.tw-modal .tw-modal-content .np-theme-personal {
|
|
86
|
+
background-color: transparent;
|
|
87
|
+
}
|
|
85
88
|
.tw-modal table,
|
|
86
|
-
.tw-modal .table
|
|
87
|
-
.tw-modal .np-theme-personal {
|
|
89
|
+
.tw-modal .table {
|
|
88
90
|
background-color: transparent;
|
|
89
91
|
}
|
|
90
92
|
@media (min-width: 576px) {
|
package/build/types/index.d.ts
CHANGED
|
@@ -16,6 +16,7 @@ export type { ModalProps } from './modal';
|
|
|
16
16
|
export type { CurrencyHeaderItem, CurrencyItem, CurrencyOptionItem, MoneyInputProps, } from './moneyInput';
|
|
17
17
|
export type { LayoutDirection, TypographyTypes, TitleTypes, BodyTypes, LinkTypes, DisplayTypes, } from './common';
|
|
18
18
|
export type { SegmentedControlProps } from './segmentedControl';
|
|
19
|
+
export type { TypeaheadProps, TypeaheadOption } from './typeahead';
|
|
19
20
|
/**
|
|
20
21
|
* Components
|
|
21
22
|
*/
|
|
@@ -98,7 +99,7 @@ export { default as SwitchOption } from './switchOption';
|
|
|
98
99
|
export { default as Tabs } from './tabs';
|
|
99
100
|
export { default as TextareaWithDisplayFormat } from './textareaWithDisplayFormat';
|
|
100
101
|
export { default as Tooltip } from './tooltip';
|
|
101
|
-
export {
|
|
102
|
+
export { Typeahead } from './typeahead';
|
|
102
103
|
export { default as Upload } from './upload';
|
|
103
104
|
export { default as UploadInput } from './uploadInput';
|
|
104
105
|
export { SnackbarConsumer, SnackbarContext } from './snackbar/SnackbarContext';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,YAAY,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AACjD,YAAY,EAAE,2BAA2B,EAAE,MAAM,0BAA0B,CAAC;AAC5E,YAAY,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAC3D,YAAY,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAC7D,YAAY,EACV,oBAAoB,EACpB,eAAe,EACf,6BAA6B,EAC7B,qBAAqB,EACrB,gBAAgB,EAChB,wBAAwB,EACxB,6BAA6B,GAC9B,MAAM,sBAAsB,CAAC;AAC9B,YAAY,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AACvD,YAAY,EAAE,qBAAqB,EAAE,MAAM,qCAAqC,CAAC;AACjF,YAAY,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACzD,YAAY,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AACtE,YAAY,EAAE,8BAA8B,EAAE,MAAM,6BAA6B,CAAC;AAClF,YAAY,EAAE,YAAY,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAC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,EAAE,MAAM,mBAAmB,CAAC;AACvD,OAAO,EAAE,QAAQ,EAAE,MAAM,QAAQ,CAAC;AAClC,OAAO,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AAEpC;;GAEG;AACH,OAAO,EACL,YAAY,EACZ,YAAY,EACZ,cAAc,EACd,oBAAoB,EACpB,sBAAsB,EACtB,iBAAiB,EACjB,SAAS,EACT,YAAY,EACZ,aAAa,EACb,mBAAmB,GACpB,MAAM,UAAU,CAAC;AAElB;;GAEG;AACH,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,QAAQ,CAAC"}
|
|
@@ -1,57 +1,98 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
validateChip?: (
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
1
|
+
import { DebouncedFunc } from 'lodash';
|
|
2
|
+
import { Component, ReactNode } from 'react';
|
|
3
|
+
import { Size, SizeMedium, SizeLarge } from '../common';
|
|
4
|
+
import { InlineAlertProps } from '../inlineAlert/InlineAlert';
|
|
5
|
+
import TypeaheadOption from './typeaheadOption/TypeaheadOption';
|
|
6
|
+
export type TypeaheadOption<T = string> = {
|
|
7
|
+
label: string;
|
|
8
|
+
note?: string;
|
|
9
|
+
secondary?: string;
|
|
10
|
+
value?: T;
|
|
11
|
+
};
|
|
12
|
+
export interface TypeaheadProps<T> {
|
|
13
|
+
id: string;
|
|
14
|
+
name: string;
|
|
15
|
+
addon: ReactNode;
|
|
16
|
+
alert?: {
|
|
17
|
+
message: InlineAlertProps['children'];
|
|
18
|
+
type: InlineAlertProps['type'];
|
|
19
|
+
};
|
|
20
|
+
allowNew: boolean;
|
|
21
|
+
autoFillOnBlur?: boolean;
|
|
22
|
+
autoFocus: boolean;
|
|
23
|
+
chipSeparators?: string[];
|
|
24
|
+
clearable: boolean;
|
|
25
|
+
footer: ReactNode;
|
|
26
|
+
initialValue: TypeaheadOption<T>[];
|
|
27
|
+
inputAutoComplete?: string;
|
|
28
|
+
maxHeight: number;
|
|
29
|
+
minQueryLength: number;
|
|
30
|
+
placeholder?: string;
|
|
31
|
+
multiple: boolean;
|
|
32
|
+
options: TypeaheadOption<T>[];
|
|
33
|
+
searchDelay: number;
|
|
34
|
+
showSuggestions: boolean;
|
|
35
|
+
showNewEntry: boolean;
|
|
36
|
+
size?: SizeMedium | SizeLarge;
|
|
37
|
+
onBlur?: () => void;
|
|
38
|
+
onChange: (options: TypeaheadOption<T>[]) => void;
|
|
39
|
+
onFocus?: () => void;
|
|
40
|
+
onInputChange?: (query: string) => void;
|
|
41
|
+
onSearch?: (query: string) => void;
|
|
42
|
+
validateChip?: (chip: TypeaheadOption<T>) => boolean;
|
|
43
|
+
}
|
|
44
|
+
type TypeaheadState<T> = {
|
|
45
|
+
selected: TypeaheadOption<T>[];
|
|
46
|
+
keyboardFocusedOptionIndex: number | null;
|
|
47
|
+
errorState: boolean;
|
|
48
|
+
query: string;
|
|
49
|
+
optionsShown?: boolean;
|
|
50
|
+
isFocused?: boolean;
|
|
51
|
+
};
|
|
52
|
+
export declare class Typeahead<T> extends Component<TypeaheadProps<T>, TypeaheadState<T>> {
|
|
53
|
+
props: TypeaheadProps<T> & Required<Pick<TypeaheadProps<T>, keyof typeof Typeahead.defaultProps>>;
|
|
54
|
+
static defaultProps: {
|
|
55
|
+
addon: null;
|
|
56
|
+
allowNew: boolean;
|
|
57
|
+
autoFillOnBlur: boolean;
|
|
58
|
+
autoFocus: boolean;
|
|
59
|
+
chipSeparators: never[];
|
|
60
|
+
clearable: boolean;
|
|
61
|
+
footer: null;
|
|
62
|
+
initialValue: never[];
|
|
63
|
+
inputAutoComplete: string;
|
|
64
|
+
maxHeight: null;
|
|
65
|
+
minQueryLength: number;
|
|
66
|
+
multiple: boolean;
|
|
67
|
+
searchDelay: number;
|
|
68
|
+
showSuggestions: boolean;
|
|
69
|
+
showNewEntry: boolean;
|
|
70
|
+
size: Size;
|
|
71
|
+
validateChip: () => boolean;
|
|
72
|
+
};
|
|
73
|
+
constructor(props: TypeaheadProps<T>);
|
|
74
|
+
handleSearchDebounced: DebouncedFunc<(query: string) => void>;
|
|
75
|
+
UNSAFE_componentWillReceiveProps(nextProps: TypeaheadProps<T>): void;
|
|
76
|
+
componentWillUnmount(): void;
|
|
77
|
+
handleOnFocus: () => void;
|
|
78
|
+
onOptionSelected: (event: React.MouseEvent, item: TypeaheadOption<T>) => void;
|
|
79
|
+
handleOnChange: React.ChangeEventHandler<HTMLInputElement>;
|
|
80
|
+
handleOnPaste: React.ClipboardEventHandler<HTMLInputElement>;
|
|
81
|
+
handleOnKeyDown: React.KeyboardEventHandler<HTMLInputElement>;
|
|
82
|
+
moveFocusedOption(offset: number): void;
|
|
83
|
+
selectItem: (item: TypeaheadOption<T>) => void;
|
|
84
|
+
handleSearch: (query: string) => void;
|
|
85
|
+
handleDocumentClick: () => void;
|
|
86
|
+
showMenu: () => void;
|
|
87
|
+
hideMenu: () => void;
|
|
88
|
+
updateSelectedValue: (selected: TypeaheadOption<T>[]) => void;
|
|
89
|
+
clear: (event: React.MouseEvent<HTMLButtonElement>) => void;
|
|
90
|
+
removeChip: (option: TypeaheadOption<T>) => void;
|
|
91
|
+
renderChip: (option: TypeaheadOption<T>, idx: number) => ReactNode;
|
|
92
|
+
renderMenu: ({ footer, options, id, keyboardFocusedOptionIndex, query, allowNew, showNewEntry, dropdownOpen, }: Pick<TypeaheadProps<T>, "id" | "footer" | "options" | "allowNew" | "showNewEntry"> & Pick<TypeaheadState<T>, "query" | "keyboardFocusedOptionIndex"> & {
|
|
93
|
+
dropdownOpen?: boolean | undefined;
|
|
94
|
+
}) => import("react").JSX.Element;
|
|
95
|
+
render(): import("react").JSX.Element;
|
|
96
|
+
}
|
|
97
|
+
export {};
|
|
98
|
+
//# sourceMappingURL=Typeahead.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Typeahead.d.ts","sourceRoot":"","sources":["../../../src/typeahead/Typeahead.
|
|
1
|
+
{"version":3,"file":"Typeahead.d.ts","sourceRoot":"","sources":["../../../src/typeahead/Typeahead.tsx"],"names":[],"mappings":"AAMA,OAAO,EAAE,aAAa,EAAE,MAAM,QAAQ,CAAC;AAGvC,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAG7C,OAAO,EAAE,IAAI,EAAa,UAAU,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AAOnE,OAAO,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAG9D,OAAO,eAAe,MAAM,mCAAmC,CAAC;AAKhE,MAAM,MAAM,eAAe,CAAC,CAAC,GAAG,MAAM,IAAI;IACxC,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,CAAC,CAAC;CACX,CAAC;AAEF,MAAM,WAAW,cAAc,CAAC,CAAC;IAC/B,EAAE,EAAE,MAAM,CAA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,aAWN;IAEF,mBAAmB,aAAc,gBAAgB,CAAC,CAAC,EAAE,UAOnD;IAEF,KAAK,UAAW,gBAAgB,CAAC,iBAAiB,CAAC,UASjD;IAEF,UAAU,WAAY,gBAAgB,CAAC,CAAC,UAMtC;IAEF,UAAU,WAAY,gBAAgB,CAAC,CAAC,OAAO,MAAM,KAAG,SAAS,CAc/D;IAEF,UAAU;;sCA6CR;IAEF,MAAM;CAsGP"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
import
|
|
1
|
+
import { Typeahead, type TypeaheadProps } from './Typeahead';
|
|
2
|
+
import type { TypeaheadOption } from './Typeahead';
|
|
3
|
+
export { Typeahead, TypeaheadOption, TypeaheadProps };
|
|
3
4
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/typeahead/index.
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/typeahead/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,KAAK,cAAc,EAAE,MAAM,aAAa,CAAC;AAC7D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAEnD,OAAO,EAAE,SAAS,EAAE,eAAe,EAAE,cAAc,EAAE,CAAC"}
|
|
@@ -1,47 +1,29 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
import { Component, ReactNode } from 'react';
|
|
2
|
+
import { TypeaheadOption, TypeaheadProps } from '../Typeahead';
|
|
3
|
+
export type TypeaheadInputProps<T> = {
|
|
4
|
+
typeaheadId: string;
|
|
5
|
+
value: string;
|
|
6
|
+
selected: TypeaheadOption<T>[];
|
|
7
|
+
optionsShown?: boolean;
|
|
8
|
+
autoComplete: string;
|
|
9
|
+
onChange: React.ChangeEventHandler<HTMLInputElement>;
|
|
10
|
+
onKeyDown: React.KeyboardEventHandler<HTMLInputElement>;
|
|
11
|
+
onFocus: () => void;
|
|
12
|
+
onPaste: React.ClipboardEventHandler<HTMLInputElement>;
|
|
13
|
+
renderChip: (chip: TypeaheadOption<T>, index: number) => ReactNode;
|
|
14
|
+
} & Pick<TypeaheadProps<T>, 'id' | 'name' | 'autoFocus' | 'multiple' | 'placeholder' | 'maxHeight' | 'onFocus'>;
|
|
15
|
+
type TypeaheadInputState = {
|
|
16
|
+
inputWidth: number;
|
|
17
|
+
};
|
|
18
|
+
export default class TypeaheadInput<T> extends Component<TypeaheadInputProps<T>, TypeaheadInputState> {
|
|
19
|
+
inputRef: HTMLInputElement | null;
|
|
20
|
+
sizerRef: HTMLDivElement | null;
|
|
21
|
+
constructor(props: TypeaheadInputProps<T>);
|
|
6
22
|
componentDidMount(): void;
|
|
7
|
-
componentDidUpdate(previousProps:
|
|
23
|
+
componentDidUpdate(previousProps: TypeaheadInputProps<T>): void;
|
|
8
24
|
recalculateWidth: () => void;
|
|
9
25
|
renderInput: () => import("react").JSX.Element;
|
|
10
|
-
inputRef: HTMLInputElement | null | undefined;
|
|
11
26
|
render(): import("react").JSX.Element;
|
|
12
|
-
sizerRef: HTMLDivElement | null | undefined;
|
|
13
27
|
}
|
|
14
|
-
|
|
15
|
-
namespace propTypes {
|
|
16
|
-
const typeaheadId: any;
|
|
17
|
-
const name: any;
|
|
18
|
-
const autoFocus: any;
|
|
19
|
-
const multiple: any;
|
|
20
|
-
const value: any;
|
|
21
|
-
const selected: any;
|
|
22
|
-
const placeholder: any;
|
|
23
|
-
const optionsShown: any;
|
|
24
|
-
const maxHeight: any;
|
|
25
|
-
const autoComplete: any;
|
|
26
|
-
const onChange: any;
|
|
27
|
-
const renderChip: any;
|
|
28
|
-
const onKeyDown: any;
|
|
29
|
-
const onFocus: any;
|
|
30
|
-
const onPaste: any;
|
|
31
|
-
}
|
|
32
|
-
namespace defaultProps {
|
|
33
|
-
const autoFocus_1: boolean;
|
|
34
|
-
export { autoFocus_1 as autoFocus };
|
|
35
|
-
const maxHeight_1: null;
|
|
36
|
-
export { maxHeight_1 as maxHeight };
|
|
37
|
-
const placeholder_1: string;
|
|
38
|
-
export { placeholder_1 as placeholder };
|
|
39
|
-
const optionsShown_1: boolean;
|
|
40
|
-
export { optionsShown_1 as optionsShown };
|
|
41
|
-
const selected_1: never[];
|
|
42
|
-
export { selected_1 as selected };
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
export default TypeaheadInput;
|
|
46
|
-
import { Component } from "react";
|
|
28
|
+
export {};
|
|
47
29
|
//# sourceMappingURL=TypeaheadInput.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TypeaheadInput.d.ts","sourceRoot":"","sources":["../../../../src/typeahead/typeaheadInput/TypeaheadInput.
|
|
1
|
+
{"version":3,"file":"TypeaheadInput.d.ts","sourceRoot":"","sources":["../../../../src/typeahead/typeaheadInput/TypeaheadInput.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAG7C,OAAO,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAI/D,MAAM,MAAM,mBAAmB,CAAC,CAAC,IAAI;IACnC,WAAW,EAAE,MAAM,CAAC;IACpB,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,eAAe,CAAC,CAAC,CAAC,EAAE,CAAC;IAC/B,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,YAAY,EAAE,MAAM,CAAC;IACrB,QAAQ,EAAE,KAAK,CAAC,kBAAkB,CAAC,gBAAgB,CAAC,CAAC;IACrD,SAAS,EAAE,KAAK,CAAC,oBAAoB,CAAC,gBAAgB,CAAC,CAAC;IACxD,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,OAAO,EAAE,KAAK,CAAC,qBAAqB,CAAC,gBAAgB,CAAC,CAAC;IACvD,UAAU,EAAE,CAAC,IAAI,EAAE,eAAe,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,MAAM,KAAK,SAAS,CAAC;CACpE,GAAG,IAAI,CACN,cAAc,CAAC,CAAC,CAAC,EACjB,IAAI,GAAG,MAAM,GAAG,WAAW,GAAG,UAAU,GAAG,aAAa,GAAG,WAAW,GAAG,SAAS,CACnF,CAAC;AAEF,KAAK,mBAAmB,GAAG;IACzB,UAAU,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF,MAAM,CAAC,OAAO,OAAO,cAAc,CAAC,CAAC,CAAE,SAAQ,SAAS,CACtD,mBAAmB,CAAC,CAAC,CAAC,EACtB,mBAAmB,CACpB;IACC,QAAQ,EAAE,gBAAgB,GAAG,IAAI,CAAQ;IACzC,QAAQ,EAAE,cAAc,GAAG,IAAI,CAAQ;gBAE3B,KAAK,EAAE,mBAAmB,CAAC,CAAC,CAAC;IAOzC,iBAAiB;IAOjB,kBAAkB,CAAC,aAAa,EAAE,mBAAmB,CAAC,CAAC,CAAC;IAMxD,gBAAgB,aAQd;IAEF,WAAW,oCA4CT;IAEF,MAAM;CA8BP"}
|
|
@@ -1,19 +1,11 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { TypeaheadOption } from '../Typeahead';
|
|
3
|
+
export type TypeaheadOptionProps<T> = {
|
|
4
|
+
option: TypeaheadOption<T>;
|
|
5
|
+
selected?: boolean;
|
|
6
|
+
onClick?: React.MouseEventHandler;
|
|
7
|
+
query?: string;
|
|
8
|
+
};
|
|
9
|
+
declare const Option: <T>(props: TypeaheadOptionProps<T>) => import("react").JSX.Element;
|
|
1
10
|
export default Option;
|
|
2
|
-
declare function Option(props: any): import("react").JSX.Element;
|
|
3
|
-
declare namespace Option {
|
|
4
|
-
namespace propTypes {
|
|
5
|
-
const option: any;
|
|
6
|
-
const query: any;
|
|
7
|
-
const selected: any;
|
|
8
|
-
const onClick: any;
|
|
9
|
-
}
|
|
10
|
-
namespace defaultProps {
|
|
11
|
-
const selected_1: boolean;
|
|
12
|
-
export { selected_1 as selected };
|
|
13
|
-
const query_1: string;
|
|
14
|
-
export { query_1 as query };
|
|
15
|
-
export function onClick_1(): void;
|
|
16
|
-
export { onClick_1 as onClick };
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
11
|
//# sourceMappingURL=TypeaheadOption.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TypeaheadOption.d.ts","sourceRoot":"","sources":["../../../../src/typeahead/typeaheadOption/TypeaheadOption.
|
|
1
|
+
{"version":3,"file":"TypeaheadOption.d.ts","sourceRoot":"","sources":["../../../../src/typeahead/typeaheadOption/TypeaheadOption.tsx"],"names":[],"mappings":";AAGA,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAG/C,MAAM,MAAM,oBAAoB,CAAC,CAAC,IAAI;IACpC,MAAM,EAAE,eAAe,CAAC,CAAC,CAAC,CAAC;IAC3B,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,OAAO,CAAC,EAAE,KAAK,CAAC,iBAAiB,CAAC;IAClC,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,QAAA,MAAM,MAAM,oEAqBX,CAAC;AAEF,eAAe,MAAM,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@transferwise/components",
|
|
3
|
-
"version": "0.0.0-experimental-
|
|
3
|
+
"version": "0.0.0-experimental-a7e0e6f",
|
|
4
4
|
"description": "Neptune React components",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
@@ -54,6 +54,10 @@
|
|
|
54
54
|
"@tsconfig/recommended": "^1.0.2",
|
|
55
55
|
"@types/babel__core": "^7.20.1",
|
|
56
56
|
"@types/jest": "^26.0.20",
|
|
57
|
+
"@types/lodash": "4.14.202",
|
|
58
|
+
"@types/lodash.clamp": "^4.0.9",
|
|
59
|
+
"@types/lodash.debounce": "^4.0.9",
|
|
60
|
+
"@types/lodash.throttle": "^4.1.7",
|
|
57
61
|
"@types/node": "^14.14.31",
|
|
58
62
|
"@types/react": "^17.0.65",
|
|
59
63
|
"@types/react-dom": "^17.0.20",
|
|
@@ -97,7 +101,6 @@
|
|
|
97
101
|
"@react-spring/web": "~9.6.1",
|
|
98
102
|
"@transferwise/formatting": "^2.1.0",
|
|
99
103
|
"@transferwise/neptune-validation": "^3.1.0",
|
|
100
|
-
"@types/lodash.throttle": "^4.1.7",
|
|
101
104
|
"classnames": "^2.2.6",
|
|
102
105
|
"commonmark": "0.29.1",
|
|
103
106
|
"core-js": "^3.8.0",
|
package/src/dimmer/Dimmer.css
CHANGED
package/src/dimmer/Dimmer.less
CHANGED
package/src/drawer/Drawer.css
CHANGED
package/src/drawer/Drawer.less
CHANGED
package/src/index.ts
CHANGED
|
@@ -36,6 +36,7 @@ export type {
|
|
|
36
36
|
DisplayTypes,
|
|
37
37
|
} from './common';
|
|
38
38
|
export type { SegmentedControlProps } from './segmentedControl';
|
|
39
|
+
export type { TypeaheadProps, TypeaheadOption } from './typeahead';
|
|
39
40
|
|
|
40
41
|
/**
|
|
41
42
|
* Components
|
|
@@ -123,7 +124,7 @@ export { default as SwitchOption } from './switchOption';
|
|
|
123
124
|
export { default as Tabs } from './tabs';
|
|
124
125
|
export { default as TextareaWithDisplayFormat } from './textareaWithDisplayFormat';
|
|
125
126
|
export { default as Tooltip } from './tooltip';
|
|
126
|
-
export {
|
|
127
|
+
export { Typeahead } from './typeahead';
|
|
127
128
|
export { default as Upload } from './upload';
|
|
128
129
|
export { default as UploadInput } from './uploadInput';
|
|
129
130
|
export { SnackbarConsumer, SnackbarContext } from './snackbar/SnackbarContext';
|
package/src/main.css
CHANGED
|
@@ -1801,9 +1801,6 @@ button.np-option {
|
|
|
1801
1801
|
.dimmer.dimmer--exit.dimmer--exit-fade > * {
|
|
1802
1802
|
opacity: 0;
|
|
1803
1803
|
}
|
|
1804
|
-
.dimmer .np-theme-personal {
|
|
1805
|
-
background: transparent;
|
|
1806
|
-
}
|
|
1807
1804
|
.dimmer-content-positioner {
|
|
1808
1805
|
min-height: 100%;
|
|
1809
1806
|
pointer-events: none;
|
|
@@ -1887,6 +1884,9 @@ button.np-option {
|
|
|
1887
1884
|
overflow-y: auto;
|
|
1888
1885
|
flex: 1;
|
|
1889
1886
|
}
|
|
1887
|
+
.np-drawer .np-drawer-content .np-theme-personal {
|
|
1888
|
+
background-color: transparent;
|
|
1889
|
+
}
|
|
1890
1890
|
.np-drawer .np-drawer-footer,
|
|
1891
1891
|
.np-drawer .np-drawer-content {
|
|
1892
1892
|
padding: 16px;
|
|
@@ -3200,9 +3200,11 @@ a {
|
|
|
3200
3200
|
min-height: var(--size-32);
|
|
3201
3201
|
padding-bottom: 4px !important;
|
|
3202
3202
|
}
|
|
3203
|
+
.tw-modal .tw-modal-content .np-theme-personal {
|
|
3204
|
+
background-color: transparent;
|
|
3205
|
+
}
|
|
3203
3206
|
.tw-modal table,
|
|
3204
|
-
.tw-modal .table
|
|
3205
|
-
.tw-modal .np-theme-personal {
|
|
3207
|
+
.tw-modal .table {
|
|
3206
3208
|
background-color: transparent;
|
|
3207
3209
|
}
|
|
3208
3210
|
@media (min-width: 576px) {
|
package/src/modal/Modal.css
CHANGED
|
@@ -82,9 +82,11 @@
|
|
|
82
82
|
min-height: var(--size-32);
|
|
83
83
|
padding-bottom: 4px !important;
|
|
84
84
|
}
|
|
85
|
+
.tw-modal .tw-modal-content .np-theme-personal {
|
|
86
|
+
background-color: transparent;
|
|
87
|
+
}
|
|
85
88
|
.tw-modal table,
|
|
86
|
-
.tw-modal .table
|
|
87
|
-
.tw-modal .np-theme-personal {
|
|
89
|
+
.tw-modal .table {
|
|
88
90
|
background-color: transparent;
|
|
89
91
|
}
|
|
90
92
|
@media (min-width: 576px) {
|
package/src/modal/Modal.less
CHANGED
|
@@ -98,7 +98,7 @@ export const WithoutTitle: Story = {
|
|
|
98
98
|
|
|
99
99
|
export const WithoutTitleMobile: Story = storyConfig(WithoutTitle, { variants: ['mobile'] });
|
|
100
100
|
|
|
101
|
-
export const
|
|
101
|
+
export const WithThemeProviderInContent: Story = {
|
|
102
102
|
args: {
|
|
103
103
|
title: lorem10,
|
|
104
104
|
body: lorem100,
|
|
@@ -111,4 +111,6 @@ export const WithThemeProviderInContentProps: Story = {
|
|
|
111
111
|
),
|
|
112
112
|
};
|
|
113
113
|
|
|
114
|
-
export const
|
|
114
|
+
export const WithThemeProviderInContentMobile: Story = storyConfig(WithThemeProviderInContent, {
|
|
115
|
+
variants: ['mobile'],
|
|
116
|
+
});
|
|
@@ -5,7 +5,7 @@ import { InlineAlert } from '..';
|
|
|
5
5
|
import { Sentiment } from '../common';
|
|
6
6
|
import { fakeEvent, fakeKeyDownEventForKey } from '../common/fakeEvents';
|
|
7
7
|
|
|
8
|
-
import Typeahead from './Typeahead';
|
|
8
|
+
import { Typeahead } from './Typeahead';
|
|
9
9
|
|
|
10
10
|
const defaultLocale = 'en-GB';
|
|
11
11
|
|