@transferwise/components 46.8.0 → 46.10.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/index.esm.js +76 -127
- package/build/index.esm.js.map +1 -1
- package/build/index.js +76 -127
- package/build/index.js.map +1 -1
- package/build/types/checkboxOption/CheckboxOption.d.ts +2 -2
- package/build/types/checkboxOption/CheckboxOption.d.ts.map +1 -1
- package/build/types/common/index.d.ts +0 -1
- package/build/types/dateLookup/DateLookup.d.ts.map +1 -1
- package/build/types/index.d.ts +2 -0
- package/build/types/index.d.ts.map +1 -1
- package/build/types/inputs/SelectInput.d.ts +2 -1
- package/build/types/inputs/SelectInput.d.ts.map +1 -1
- package/build/types/moneyInput/MoneyInput.d.ts.map +1 -1
- package/build/types/select/Select.d.ts.map +1 -1
- package/build/types/snackbar/Snackbar.d.ts +30 -22
- package/build/types/snackbar/Snackbar.d.ts.map +1 -1
- package/build/types/snackbar/SnackbarContext.d.ts +7 -2
- package/build/types/snackbar/SnackbarContext.d.ts.map +1 -1
- package/build/types/snackbar/SnackbarProvider.d.ts +7 -12
- package/build/types/snackbar/SnackbarProvider.d.ts.map +1 -1
- package/build/types/snackbar/index.d.ts +2 -0
- package/build/types/snackbar/index.d.ts.map +1 -0
- package/build/types/snackbar/useSnackbar.d.ts +1 -1
- package/build/types/snackbar/useSnackbar.d.ts.map +1 -1
- package/build/types/switch/Switch.d.ts.map +1 -1
- package/build/types/tabs/Tabs.d.ts.map +1 -1
- package/build/types/typeahead/Typeahead.d.ts.map +1 -1
- package/build/types/withNextPortal/withNextPortal.d.ts +1 -1
- package/build/types/withNextPortal/withNextPortal.d.ts.map +1 -1
- package/package.json +16 -19
- package/src/button/Button.story.tsx +3 -3
- package/src/checkboxOption/CheckboxOption.tsx +2 -2
- package/src/common/fakeEvents.js +2 -2
- package/src/common/index.js +0 -1
- package/src/dateInput/DateInput.story.tsx +4 -3
- package/src/dateLookup/DateLookup.js +6 -7
- package/src/dateLookup/DateLookup.keyboardEvents.spec.js +24 -25
- package/src/dateLookup/DateLookup.story.js +4 -3
- package/src/dateLookup/dateTrigger/DateTrigger.spec.js +3 -3
- package/src/index.ts +2 -0
- package/src/info/Info.story.tsx +3 -3
- package/src/inputWithDisplayFormat/InputWithDisplayFormat.story.js +2 -7
- package/src/inputs/SelectInput.spec.tsx +7 -0
- package/src/inputs/SelectInput.story.tsx +7 -7
- package/src/inputs/SelectInput.tsx +4 -0
- package/src/logo/Logo.js +4 -4
- package/src/moneyInput/MoneyInput.story.tsx +3 -3
- package/src/moneyInput/MoneyInput.tsx +14 -24
- package/src/select/Select.js +8 -9
- package/src/snackbar/{Snackbar.story.js → Snackbar.story.tsx} +4 -3
- package/src/snackbar/{Snackbar.js → Snackbar.tsx} +31 -32
- package/src/snackbar/SnackbarContext.ts +11 -0
- package/src/snackbar/SnackbarProvider.tsx +39 -0
- package/src/switch/Switch.spec.js +2 -3
- package/src/switch/Switch.tsx +1 -2
- package/src/switchOption/SwitchOption.spec.js +1 -4
- package/src/tabs/Tabs.js +1 -2
- package/src/textareaWithDisplayFormat/TextareaWithDisplayFormat.story.tsx +5 -4
- package/src/tile/Tile.js +2 -2
- package/src/tile/Tile.spec.js +5 -5
- package/src/tooltip/Tooltip.story.tsx +3 -3
- package/src/typeahead/Typeahead.js +5 -6
- package/src/typeahead/Typeahead.spec.js +3 -8
- package/src/typeahead/Typeahead.story.js +3 -4
- package/src/withNextPortal/withNextPortal.tsx +1 -1
- package/build/types/common/key.d.ts +0 -9
- package/build/types/common/key.d.ts.map +0 -1
- package/build/types/common/keyCodes.d.ts +0 -16
- package/build/types/common/keyCodes.d.ts.map +0 -1
- package/src/common/key.js +0 -8
- package/src/common/keyCodes.js +0 -19
- package/src/snackbar/SnackbarContext.js +0 -4
- package/src/snackbar/SnackbarProvider.js +0 -51
- /package/src/snackbar/{index.js → index.ts} +0 -0
- /package/src/snackbar/{useSnackbar.js → useSnackbar.ts} +0 -0
package/build/index.esm.js
CHANGED
|
@@ -333,15 +333,6 @@ var FileType;
|
|
|
333
333
|
FileType["CSV"] = ".csv,text/csv";
|
|
334
334
|
})(FileType || (FileType = {}));
|
|
335
335
|
|
|
336
|
-
const Key = {
|
|
337
|
-
ENTER: 'Enter',
|
|
338
|
-
ESCAPE: 'Escape',
|
|
339
|
-
SPACE: [' ', 'Spacebar'],
|
|
340
|
-
TAB: 'Tab',
|
|
341
|
-
PERIOD: '.',
|
|
342
|
-
COMMA: ','
|
|
343
|
-
};
|
|
344
|
-
|
|
345
336
|
const DEFAULT_LANG = 'en';
|
|
346
337
|
const DEFAULT_LOCALE = 'en-GB';
|
|
347
338
|
/**
|
|
@@ -2578,7 +2569,7 @@ const CheckboxOption = /*#__PURE__*/forwardRef(({
|
|
|
2578
2569
|
button: /*#__PURE__*/jsx(CheckboxButton$1, {
|
|
2579
2570
|
checked: checked,
|
|
2580
2571
|
disabled: disabled,
|
|
2581
|
-
onChange: () => onChange(!checked)
|
|
2572
|
+
onChange: () => onChange?.(!checked)
|
|
2582
2573
|
})
|
|
2583
2574
|
});
|
|
2584
2575
|
});
|
|
@@ -3134,26 +3125,6 @@ DateInput.defaultProps = {
|
|
|
3134
3125
|
};
|
|
3135
3126
|
var DateInput$1 = DateInput;
|
|
3136
3127
|
|
|
3137
|
-
/**
|
|
3138
|
-
* TODO: mention what to use instead or consider to delete this object
|
|
3139
|
-
*
|
|
3140
|
-
* @deprecated
|
|
3141
|
-
*/
|
|
3142
|
-
var KeyCodes = {
|
|
3143
|
-
DOWN: 40,
|
|
3144
|
-
UP: 38,
|
|
3145
|
-
LEFT: 37,
|
|
3146
|
-
RIGHT: 39,
|
|
3147
|
-
ENTER: 13,
|
|
3148
|
-
ESCAPE: 27,
|
|
3149
|
-
TAB: 9,
|
|
3150
|
-
SPACE: 32,
|
|
3151
|
-
BACKSPACE: 8,
|
|
3152
|
-
DELETE: 46,
|
|
3153
|
-
COMMA: 188,
|
|
3154
|
-
PERIOD: 190
|
|
3155
|
-
};
|
|
3156
|
-
|
|
3157
3128
|
const POPOVER_OFFSET = [0, 16];
|
|
3158
3129
|
// By default the flip positioning explores only the opposite alternative. So if left is passed and there's no enough space
|
|
3159
3130
|
// the right one gets chosen. If there's no space on both sides popover goes back to the initially chosen one left.
|
|
@@ -4175,8 +4146,8 @@ class DateLookup extends PureComponent {
|
|
|
4175
4146
|
open,
|
|
4176
4147
|
originalDate
|
|
4177
4148
|
} = this.state;
|
|
4178
|
-
switch (event.
|
|
4179
|
-
case
|
|
4149
|
+
switch (event.key) {
|
|
4150
|
+
case 'ArrowLeft':
|
|
4180
4151
|
if (open) {
|
|
4181
4152
|
this.adjustDate(-1, -1, -1);
|
|
4182
4153
|
} else {
|
|
@@ -4184,7 +4155,7 @@ class DateLookup extends PureComponent {
|
|
|
4184
4155
|
}
|
|
4185
4156
|
event.preventDefault();
|
|
4186
4157
|
break;
|
|
4187
|
-
case
|
|
4158
|
+
case 'ArrowUp':
|
|
4188
4159
|
if (open) {
|
|
4189
4160
|
this.adjustDate(-7, -4, -4);
|
|
4190
4161
|
} else {
|
|
@@ -4192,7 +4163,7 @@ class DateLookup extends PureComponent {
|
|
|
4192
4163
|
}
|
|
4193
4164
|
event.preventDefault();
|
|
4194
4165
|
break;
|
|
4195
|
-
case
|
|
4166
|
+
case 'ArrowRight':
|
|
4196
4167
|
if (open) {
|
|
4197
4168
|
this.adjustDate(1, 1, 1);
|
|
4198
4169
|
} else {
|
|
@@ -4200,7 +4171,7 @@ class DateLookup extends PureComponent {
|
|
|
4200
4171
|
}
|
|
4201
4172
|
event.preventDefault();
|
|
4202
4173
|
break;
|
|
4203
|
-
case
|
|
4174
|
+
case 'ArrowDown':
|
|
4204
4175
|
if (open) {
|
|
4205
4176
|
this.adjustDate(7, 4, 4);
|
|
4206
4177
|
} else {
|
|
@@ -4208,7 +4179,7 @@ class DateLookup extends PureComponent {
|
|
|
4208
4179
|
}
|
|
4209
4180
|
event.preventDefault();
|
|
4210
4181
|
break;
|
|
4211
|
-
case
|
|
4182
|
+
case 'Escape':
|
|
4212
4183
|
if (originalDate !== null) {
|
|
4213
4184
|
this.props.onChange(originalDate);
|
|
4214
4185
|
}
|
|
@@ -4531,7 +4502,7 @@ const Tile = ({
|
|
|
4531
4502
|
onKeyDown: disabled ? null : ({
|
|
4532
4503
|
key
|
|
4533
4504
|
}) => {
|
|
4534
|
-
if (key ===
|
|
4505
|
+
if (key === 'Enter' || key === ' ') {
|
|
4535
4506
|
onClick();
|
|
4536
4507
|
}
|
|
4537
4508
|
},
|
|
@@ -6762,6 +6733,7 @@ function SelectInputClearButton({
|
|
|
6762
6733
|
}
|
|
6763
6734
|
const noop = () => {};
|
|
6764
6735
|
function SelectInput({
|
|
6736
|
+
id,
|
|
6765
6737
|
name,
|
|
6766
6738
|
multiple,
|
|
6767
6739
|
placeholder,
|
|
@@ -6827,6 +6799,7 @@ function SelectInput({
|
|
|
6827
6799
|
// eslint-disable-next-line react/jsx-no-constructed-context-values
|
|
6828
6800
|
value: {
|
|
6829
6801
|
ref: mergeRefs([ref, triggerRef]),
|
|
6802
|
+
id,
|
|
6830
6803
|
...mergeProps({
|
|
6831
6804
|
onClick: () => {
|
|
6832
6805
|
setOpen(prev => !prev);
|
|
@@ -7775,8 +7748,7 @@ const parseNumber = ({
|
|
|
7775
7748
|
}
|
|
7776
7749
|
return Number(amount);
|
|
7777
7750
|
};
|
|
7778
|
-
const
|
|
7779
|
-
const inputKeyAllowlist = new Set([Key.PERIOD, Key.COMMA]);
|
|
7751
|
+
const allowedInputKeys = new Set(['Backspace', 'Delete', ',', '.', 'ArrowDown', 'ArrowUp', 'ArrowLeft', 'ArrowRight', 'Enter', 'Escape', 'Tab']);
|
|
7780
7752
|
class MoneyInput extends Component {
|
|
7781
7753
|
static defaultProps = {
|
|
7782
7754
|
size: Size.LARGE,
|
|
@@ -7814,13 +7786,12 @@ class MoneyInput extends Component {
|
|
|
7814
7786
|
}
|
|
7815
7787
|
isInputAllowedForKeyEvent = event => {
|
|
7816
7788
|
const {
|
|
7817
|
-
keyCode,
|
|
7818
7789
|
metaKey,
|
|
7819
7790
|
key,
|
|
7820
7791
|
ctrlKey
|
|
7821
7792
|
} = event;
|
|
7822
7793
|
const isNumberKey = isNumber(parseInt(key, 10));
|
|
7823
|
-
return isNumberKey || metaKey || ctrlKey ||
|
|
7794
|
+
return isNumberKey || metaKey || ctrlKey || allowedInputKeys.has(key);
|
|
7824
7795
|
};
|
|
7825
7796
|
handleKeyDown = event => {
|
|
7826
7797
|
if (!this.isInputAllowedForKeyEvent(event)) {
|
|
@@ -10660,17 +10631,17 @@ function Select({
|
|
|
10660
10631
|
}
|
|
10661
10632
|
};
|
|
10662
10633
|
const handleKeyDown = event => {
|
|
10663
|
-
switch (event.
|
|
10664
|
-
case
|
|
10665
|
-
case
|
|
10634
|
+
switch (event.key) {
|
|
10635
|
+
case 'ArrowUp':
|
|
10636
|
+
case 'ArrowDown':
|
|
10666
10637
|
if (open) {
|
|
10667
|
-
moveFocusWithDifference(event.
|
|
10638
|
+
moveFocusWithDifference(event.key === 'ArrowUp' ? -1 : 1);
|
|
10668
10639
|
} else {
|
|
10669
10640
|
setOpen(true);
|
|
10670
10641
|
}
|
|
10671
10642
|
stopPropagation$1(event);
|
|
10672
10643
|
break;
|
|
10673
|
-
case
|
|
10644
|
+
case ' ':
|
|
10674
10645
|
if (event.target !== searchBoxReference.current) {
|
|
10675
10646
|
if (open) {
|
|
10676
10647
|
selectKeyboardFocusedOption();
|
|
@@ -10680,7 +10651,7 @@ function Select({
|
|
|
10680
10651
|
stopPropagation$1(event);
|
|
10681
10652
|
}
|
|
10682
10653
|
break;
|
|
10683
|
-
case
|
|
10654
|
+
case 'Enter':
|
|
10684
10655
|
if (open) {
|
|
10685
10656
|
selectKeyboardFocusedOption();
|
|
10686
10657
|
} else {
|
|
@@ -10688,11 +10659,11 @@ function Select({
|
|
|
10688
10659
|
}
|
|
10689
10660
|
stopPropagation$1(event);
|
|
10690
10661
|
break;
|
|
10691
|
-
case
|
|
10662
|
+
case 'Escape':
|
|
10692
10663
|
handleCloseOptions();
|
|
10693
10664
|
stopPropagation$1(event);
|
|
10694
10665
|
break;
|
|
10695
|
-
case
|
|
10666
|
+
case 'Tab':
|
|
10696
10667
|
if (open) {
|
|
10697
10668
|
selectKeyboardFocusedOption();
|
|
10698
10669
|
}
|
|
@@ -11147,18 +11118,19 @@ const SegmentedControl = ({
|
|
|
11147
11118
|
|
|
11148
11119
|
const CSS_TRANSITION_DURATION = 400;
|
|
11149
11120
|
class Snackbar extends Component {
|
|
11150
|
-
/** @type {RefObject<HTMLSpanElement>} */
|
|
11151
11121
|
bodyRef = /*#__PURE__*/createRef();
|
|
11152
|
-
|
|
11153
|
-
|
|
11122
|
+
timeout = 0;
|
|
11123
|
+
transitionTimeout = 0;
|
|
11124
|
+
constructor(props) {
|
|
11125
|
+
super(props);
|
|
11154
11126
|
this.state = {
|
|
11155
11127
|
visible: false,
|
|
11156
11128
|
text: ''
|
|
11157
11129
|
};
|
|
11158
11130
|
}
|
|
11159
11131
|
componentWillUnmount() {
|
|
11160
|
-
clearTimeout(this.timeout);
|
|
11161
|
-
clearTimeout(this.transitionTimeout);
|
|
11132
|
+
window.clearTimeout(this.timeout);
|
|
11133
|
+
window.clearTimeout(this.transitionTimeout);
|
|
11162
11134
|
}
|
|
11163
11135
|
shouldComponentUpdate(nextProps, nextState) {
|
|
11164
11136
|
if (!nextProps.text) {
|
|
@@ -11173,7 +11145,7 @@ class Snackbar extends Component {
|
|
|
11173
11145
|
const {
|
|
11174
11146
|
timeout
|
|
11175
11147
|
} = this.props;
|
|
11176
|
-
this.timeout = setTimeout(() => {
|
|
11148
|
+
this.timeout = window.setTimeout(() => {
|
|
11177
11149
|
this.setState({
|
|
11178
11150
|
visible: false
|
|
11179
11151
|
});
|
|
@@ -11196,12 +11168,12 @@ class Snackbar extends Component {
|
|
|
11196
11168
|
this.setLeaveTimeout();
|
|
11197
11169
|
});
|
|
11198
11170
|
} else if (previousProps.timestamp !== timestamp) {
|
|
11199
|
-
clearTimeout(this.timeout);
|
|
11171
|
+
window.clearTimeout(this.timeout);
|
|
11200
11172
|
if (this.state.visible) {
|
|
11201
11173
|
this.setState({
|
|
11202
11174
|
visible: false
|
|
11203
11175
|
}, () => {
|
|
11204
|
-
this.transitionTimeout = setTimeout(() => {
|
|
11176
|
+
this.transitionTimeout = window.setTimeout(() => {
|
|
11205
11177
|
this.setState({
|
|
11206
11178
|
visible: true,
|
|
11207
11179
|
action,
|
|
@@ -11226,7 +11198,7 @@ class Snackbar extends Component {
|
|
|
11226
11198
|
const {
|
|
11227
11199
|
action,
|
|
11228
11200
|
text,
|
|
11229
|
-
theme,
|
|
11201
|
+
theme = Theme.LIGHT,
|
|
11230
11202
|
visible
|
|
11231
11203
|
} = this.state;
|
|
11232
11204
|
const {
|
|
@@ -11260,74 +11232,51 @@ class Snackbar extends Component {
|
|
|
11260
11232
|
}
|
|
11261
11233
|
}
|
|
11262
11234
|
Snackbar.contextType = DirectionContext;
|
|
11263
|
-
Snackbar.propTypes = {
|
|
11264
|
-
action: PropTypes.shape({
|
|
11265
|
-
label: PropTypes.string.isRequired,
|
|
11266
|
-
onClick: PropTypes.func
|
|
11267
|
-
}),
|
|
11268
|
-
text: PropTypes.node.isRequired,
|
|
11269
|
-
theme: PropTypes.oneOf(['light', 'dark']),
|
|
11270
|
-
timeout: PropTypes.number.isRequired,
|
|
11271
|
-
timestamp: PropTypes.number.isRequired
|
|
11272
|
-
};
|
|
11273
|
-
Snackbar.defaultProps = {
|
|
11274
|
-
action: null,
|
|
11275
|
-
theme: Theme.LIGHT
|
|
11276
|
-
};
|
|
11277
11235
|
var SnackbarPortal = withNextPortalWrapper(Snackbar);
|
|
11278
11236
|
|
|
11279
|
-
const SnackbarContext = /*#__PURE__*/createContext(
|
|
11237
|
+
const SnackbarContext = /*#__PURE__*/createContext({
|
|
11238
|
+
createSnackbar: () => {}
|
|
11239
|
+
});
|
|
11280
11240
|
const SnackbarConsumer = SnackbarContext.Consumer;
|
|
11281
11241
|
|
|
11282
|
-
|
|
11283
|
-
|
|
11284
|
-
|
|
11285
|
-
|
|
11286
|
-
|
|
11287
|
-
|
|
11288
|
-
|
|
11289
|
-
}
|
|
11290
|
-
|
|
11242
|
+
function SnackbarProvider({
|
|
11243
|
+
timeout = 4500,
|
|
11244
|
+
children
|
|
11245
|
+
}) {
|
|
11246
|
+
const [state, setState] = useState({
|
|
11247
|
+
text: '',
|
|
11248
|
+
timestamp: 0
|
|
11249
|
+
});
|
|
11250
|
+
const {
|
|
11291
11251
|
action,
|
|
11292
11252
|
text,
|
|
11293
|
-
theme
|
|
11294
|
-
|
|
11295
|
-
|
|
11296
|
-
|
|
11297
|
-
|
|
11298
|
-
|
|
11299
|
-
|
|
11300
|
-
|
|
11301
|
-
|
|
11302
|
-
|
|
11303
|
-
|
|
11304
|
-
|
|
11305
|
-
|
|
11306
|
-
|
|
11307
|
-
|
|
11308
|
-
|
|
11309
|
-
|
|
11310
|
-
|
|
11311
|
-
|
|
11312
|
-
|
|
11313
|
-
|
|
11314
|
-
|
|
11315
|
-
|
|
11316
|
-
|
|
11317
|
-
|
|
11318
|
-
|
|
11319
|
-
}), this.props.children]
|
|
11320
|
-
});
|
|
11321
|
-
}
|
|
11253
|
+
theme,
|
|
11254
|
+
timestamp
|
|
11255
|
+
} = state;
|
|
11256
|
+
return /*#__PURE__*/jsxs(SnackbarContext.Provider, {
|
|
11257
|
+
value: useMemo(() => ({
|
|
11258
|
+
createSnackbar: ({
|
|
11259
|
+
action,
|
|
11260
|
+
text,
|
|
11261
|
+
theme
|
|
11262
|
+
}) => {
|
|
11263
|
+
setState({
|
|
11264
|
+
action,
|
|
11265
|
+
text,
|
|
11266
|
+
theme,
|
|
11267
|
+
timestamp: Date.now()
|
|
11268
|
+
});
|
|
11269
|
+
}
|
|
11270
|
+
}), []),
|
|
11271
|
+
children: [/*#__PURE__*/jsx(SnackbarPortal, {
|
|
11272
|
+
action: action,
|
|
11273
|
+
text: text,
|
|
11274
|
+
timestamp: timestamp,
|
|
11275
|
+
timeout: timeout,
|
|
11276
|
+
theme: theme
|
|
11277
|
+
}), children]
|
|
11278
|
+
});
|
|
11322
11279
|
}
|
|
11323
|
-
SnackbarProvider.propTypes = {
|
|
11324
|
-
children: PropTypes.node.isRequired,
|
|
11325
|
-
timeout: PropTypes.number
|
|
11326
|
-
};
|
|
11327
|
-
SnackbarProvider.defaultProps = {
|
|
11328
|
-
timeout: 4500
|
|
11329
|
-
};
|
|
11330
|
-
var SnackbarProvider$1 = SnackbarProvider;
|
|
11331
11280
|
|
|
11332
11281
|
const Sticky = ({
|
|
11333
11282
|
open,
|
|
@@ -11473,7 +11422,7 @@ const Switch = props => {
|
|
|
11473
11422
|
disabled
|
|
11474
11423
|
} = props;
|
|
11475
11424
|
const handleKeyDown = event => {
|
|
11476
|
-
if (event.
|
|
11425
|
+
if (event.key === ' ') {
|
|
11477
11426
|
event.preventDefault();
|
|
11478
11427
|
onClick();
|
|
11479
11428
|
}
|
|
@@ -11970,7 +11919,7 @@ class Tabs extends Component {
|
|
|
11970
11919
|
this.switchTab(index);
|
|
11971
11920
|
};
|
|
11972
11921
|
onKeyDown = index => event => {
|
|
11973
|
-
if (event && event.
|
|
11922
|
+
if (event && event.key === 'Enter') {
|
|
11974
11923
|
this.switchTab(index);
|
|
11975
11924
|
}
|
|
11976
11925
|
};
|
|
@@ -12572,16 +12521,16 @@ class Typeahead extends Component {
|
|
|
12572
12521
|
label: query
|
|
12573
12522
|
});
|
|
12574
12523
|
} else {
|
|
12575
|
-
switch (event.
|
|
12576
|
-
case
|
|
12524
|
+
switch (event.key) {
|
|
12525
|
+
case 'ArrowDown':
|
|
12577
12526
|
event.preventDefault();
|
|
12578
12527
|
this.moveFocusedOption(1);
|
|
12579
12528
|
break;
|
|
12580
|
-
case
|
|
12529
|
+
case 'ArrowUp':
|
|
12581
12530
|
event.preventDefault();
|
|
12582
12531
|
this.moveFocusedOption(-1);
|
|
12583
12532
|
break;
|
|
12584
|
-
case
|
|
12533
|
+
case 'Enter':
|
|
12585
12534
|
event.preventDefault();
|
|
12586
12535
|
if (options[keyboardFocusedOptionIndex]) {
|
|
12587
12536
|
this.selectItem(options[keyboardFocusedOptionIndex]);
|
|
@@ -12591,7 +12540,7 @@ class Typeahead extends Component {
|
|
|
12591
12540
|
});
|
|
12592
12541
|
}
|
|
12593
12542
|
break;
|
|
12594
|
-
case
|
|
12543
|
+
case 'Backspace':
|
|
12595
12544
|
if (multiple && !query && selected.length > 0) {
|
|
12596
12545
|
this.updateSelectedValue(selected.slice(0, -1));
|
|
12597
12546
|
}
|
|
@@ -15541,5 +15490,5 @@ const translations = {
|
|
|
15541
15490
|
'zh-HK': zhHK
|
|
15542
15491
|
};
|
|
15543
15492
|
|
|
15544
|
-
export { Accordion, ActionButton, ActionOption, Alert$1 as Alert, ArrowPosition as AlertArrowPosition, Avatar, AvatarType, AvatarWrapper, Badge, Card as BaseCard, Body, BottomSheet$2 as BottomSheet, Breakpoint, Button, Card$2 as Card, Checkbox$1 as Checkbox, CheckboxButton$1 as CheckboxButton, CheckboxOption, Chevron, Chip, Chips, CircularButton$1 as CircularButton, ControlType, CriticalCommsBanner, DEFAULT_LANG, DEFAULT_LOCALE, DateInput$1 as DateInput, DateLookup$1 as DateLookup, DateMode, Decision$1 as Decision, Presentation as DecisionPresentation, Type as DecisionType, DefinitionList$1 as DefinitionList, Dimmer$1 as Dimmer, Direction, DirectionProvider, Display, Drawer$1 as Drawer, DropFade, DynamicFieldDefinitionList$1 as DynamicFieldDefinitionList, Emphasis, FileType, FlowNavigation, Header, Image, Info, InfoPresentation, InlineAlert, Input, InputGroup, InputWithDisplayFormat, InstructionsList$1 as InstructionsList, LanguageProvider, Layout$1 as Layout, Link, ListItem$1 as ListItem, Loader$1 as Loader, Logo$1 as Logo, LogoType, Markdown$1 as Markdown, MarkdownNodeType, Modal, Money$1 as Money, MoneyInput$1 as MoneyInput, MonthFormat, NavigationOption, NavigationOptionList$1 as NavigationOptionsList, Nudge, Option$2 as Option, OverlayHeader$1 as OverlayHeader, PhoneNumberInput, Popover$2 as Popover, Position, Priority, ProcessIndicator$1 as ProcessIndicator, ProfileType, Progress, ProgressBar, PromoCard$1 as PromoCard, PromoCard$1 as PromoCardGroup, Provider$1 as Provider, RTL_LANGUAGES, Radio$1 as Radio, RadioGroup$1 as RadioGroup, RadioOption$1 as RadioOption, SUPPORTED_LANGUAGES, Scroll, SearchInput, Section, SegmentedControl, Select, SelectInput, SelectInputOptionContent, SelectInputTriggerButton, Sentiment, Size, SlidingPanel$1 as SlidingPanel, SnackbarConsumer, SnackbarContext, SnackbarPortal, SnackbarProvider
|
|
15493
|
+
export { Accordion, ActionButton, ActionOption, Alert$1 as Alert, ArrowPosition as AlertArrowPosition, Avatar, AvatarType, AvatarWrapper, Badge, Card as BaseCard, Body, BottomSheet$2 as BottomSheet, Breakpoint, Button, Card$2 as Card, Checkbox$1 as Checkbox, CheckboxButton$1 as CheckboxButton, CheckboxOption, Chevron, Chip, Chips, CircularButton$1 as CircularButton, ControlType, CriticalCommsBanner, DEFAULT_LANG, DEFAULT_LOCALE, DateInput$1 as DateInput, DateLookup$1 as DateLookup, DateMode, Decision$1 as Decision, Presentation as DecisionPresentation, Type as DecisionType, DefinitionList$1 as DefinitionList, Dimmer$1 as Dimmer, Direction, DirectionProvider, Display, Drawer$1 as Drawer, DropFade, DynamicFieldDefinitionList$1 as DynamicFieldDefinitionList, Emphasis, FileType, FlowNavigation, Header, Image, Info, InfoPresentation, InlineAlert, Input, InputGroup, InputWithDisplayFormat, InstructionsList$1 as InstructionsList, LanguageProvider, Layout$1 as Layout, Link, ListItem$1 as ListItem, Loader$1 as Loader, Logo$1 as Logo, LogoType, Markdown$1 as Markdown, MarkdownNodeType, Modal, Money$1 as Money, MoneyInput$1 as MoneyInput, MonthFormat, NavigationOption, NavigationOptionList$1 as NavigationOptionsList, Nudge, Option$2 as Option, OverlayHeader$1 as OverlayHeader, PhoneNumberInput, Popover$2 as Popover, Position, Priority, ProcessIndicator$1 as ProcessIndicator, ProfileType, Progress, ProgressBar, PromoCard$1 as PromoCard, PromoCard$1 as PromoCardGroup, Provider$1 as Provider, RTL_LANGUAGES, Radio$1 as Radio, RadioGroup$1 as RadioGroup, RadioOption$1 as RadioOption, SUPPORTED_LANGUAGES, Scroll, SearchInput, Section, SegmentedControl, Select, SelectInput, SelectInputOptionContent, SelectInputTriggerButton, Sentiment, Size, SlidingPanel$1 as SlidingPanel, SnackbarConsumer, SnackbarContext, SnackbarPortal, SnackbarProvider, Status, StatusIcon, Stepper, Sticky$1 as Sticky, Summary, Switch, SwitchOption, Tabs$1 as Tabs, TextArea, TextareaWithDisplayFormat, Theme, Title, Tooltip$1 as Tooltip, Type$1 as Type, Typeahead, Typography, Upload$1 as Upload, UploadInput, UploadStep, Variant, Width, adjustLocale, getCountryFromLocale, getDirectionFromLocale, getLangFromLocale, isBrowser, isServerSide, translations, useDirection, useLayout, useScreenSize, useSnackbar };
|
|
15545
15494
|
//# sourceMappingURL=index.esm.js.map
|