@skyscanner/backpack-web 38.8.0 → 38.9.1

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.
@@ -16,5 +16,6 @@
16
16
  * limitations under the License.
17
17
  */import BpkAutosuggest from "./src/BpkAutosuggest";
18
18
  import BpkAutosuggestSuggestion from "./src/BpkAutosuggestSuggestion";
19
+ import BpkAutosuggestV2 from "./src/BpkAutosuggestV2/BpkAutosuggest";
19
20
  export default BpkAutosuggest;
20
- export { BpkAutosuggestSuggestion };
21
+ export { BpkAutosuggestSuggestion, BpkAutosuggestV2 };
@@ -0,0 +1,68 @@
1
+ import type { ReactElement, HTMLProps, InputHTMLAttributes, Ref, SyntheticEvent } from 'react';
2
+ export type BpkAutoSuggestTheme = {
3
+ container?: string;
4
+ containerOpen?: string;
5
+ suggestionsContainer?: string;
6
+ suggestionsContainerOpen?: string;
7
+ suggestionsList?: string;
8
+ suggestion?: string;
9
+ suggestionHighlighted?: string;
10
+ sectionContainer?: string;
11
+ sectionTitle?: string;
12
+ desktopSuggestionsContainer?: string;
13
+ desktopSuggestionsList?: string;
14
+ inputTextWrapper?: string;
15
+ inputWrapper?: string;
16
+ label?: string;
17
+ visuallyHidden?: string;
18
+ };
19
+ export type EnterKeyHintType = 'enter' | 'done' | 'go' | 'next' | 'previous' | 'search' | 'send';
20
+ export type BpkInputRenderProps = InputHTMLAttributes<HTMLInputElement> & {
21
+ ref?: Ref<HTMLInputElement>;
22
+ onClear?: (e: SyntheticEvent<HTMLButtonElement>) => void;
23
+ };
24
+ export type BpkAutoSuggestProps<T> = {
25
+ suggestions: T[];
26
+ ariaLabels?: {
27
+ resultsList?: string;
28
+ label?: string;
29
+ clearButton?: string;
30
+ noResults?: string;
31
+ };
32
+ getSuggestionValue: (suggestion: T) => string;
33
+ inputProps: HTMLProps<HTMLInputElement>;
34
+ onSuggestionSelected?: (data?: {
35
+ inputValue: string;
36
+ suggestion?: T;
37
+ }) => void;
38
+ onSuggestionsFetchRequested: (value: string) => void;
39
+ onSuggestionsClearRequested: () => void;
40
+ renderSuggestion: (suggestion: T) => ReactElement;
41
+ id: string;
42
+ enterKeyHint?: EnterKeyHintType;
43
+ getA11yResultsMessage: (resultCount: number) => string;
44
+ defaultValue?: string;
45
+ isDesktop?: boolean;
46
+ onLoad?: (inputValue: string) => void;
47
+ onClick?: () => void;
48
+ renderBesideInput?: () => ReactElement;
49
+ showClear?: boolean;
50
+ theme?: Partial<BpkAutoSuggestTheme>;
51
+ highlightFirstSuggestion?: boolean;
52
+ shouldRenderSuggestions?: (value?: string) => boolean;
53
+ multiSection?: boolean;
54
+ getSectionSuggestions?: (section: T) => T[];
55
+ renderSectionTitle?: (section: T) => ReactElement | null;
56
+ alwaysRenderSuggestions?: boolean;
57
+ onInputValueChange?: (input: {
58
+ method: string;
59
+ newValue: string;
60
+ }) => void;
61
+ renderInputComponent?: (inputProps: BpkInputRenderProps) => ReactElement;
62
+ onSuggestionHighlighted?: (data: {
63
+ suggestion: T | null;
64
+ }) => void;
65
+ focusInputOnSuggestionClick?: boolean;
66
+ };
67
+ declare const BpkAutosuggest: import("react").ForwardRefExoticComponent<BpkAutoSuggestProps<any> & import("react").RefAttributes<HTMLInputElement>>;
68
+ export default BpkAutosuggest;
@@ -0,0 +1,431 @@
1
+ /*
2
+ * Backpack - Skyscanner's Design System
3
+ *
4
+ * Copyright 2016 Skyscanner Ltd
5
+ *
6
+ * Licensed under the Apache License, Version 2.0 (the "License");
7
+ * you may not use this file except in compliance with the License.
8
+ * You may obtain a copy of the License at
9
+ *
10
+ * http://www.apache.org/licenses/LICENSE-2.0
11
+ *
12
+ * Unless required by applicable law or agreed to in writing, software
13
+ * distributed under the License is distributed on an "AS IS" BASIS,
14
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
+ * See the License for the specific language governing permissions and
16
+ * limitations under the License.
17
+ */
18
+
19
+ import { useEffect, forwardRef, useRef } from 'react';
20
+ import { useFloating, offset, flip, shift, size, arrow as floatingArrow, FloatingArrow, autoUpdate, FloatingPortal } from '@floating-ui/react';
21
+ import { useCombobox } from 'downshift';
22
+ import { surfaceHighlightDay } from '@skyscanner/bpk-foundations-web/tokens/base.es6';
23
+ import BpkInput from "../../../bpk-component-input";
24
+ import { cssModules } from "../../../bpk-react-utils";
25
+ import STYLES from "./BpkAutosuggest.module.css";
26
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
27
+ const getClassName = cssModules(STYLES);
28
+ const defaultTheme = {
29
+ container: getClassName('bpk-autosuggest__container'),
30
+ containerOpen: getClassName('bpk-autosuggest__container--open'),
31
+ suggestionsContainer: getClassName('bpk-autosuggest__suggestions-container'),
32
+ suggestionsContainerOpen: getClassName('bpk-autosuggest__suggestions-container--open'),
33
+ suggestionsList: getClassName('bpk-autosuggest__suggestions-list'),
34
+ suggestion: getClassName('bpk-autosuggest__suggestion-item'),
35
+ suggestionHighlighted: getClassName('bpk-autosuggest__suggestion-item--highlighted'),
36
+ sectionContainer: getClassName('bpk-autosuggest__section-container'),
37
+ sectionTitle: getClassName('bpk-autosuggest__section-title'),
38
+ input: getClassName('bpk-autosuggest__input'),
39
+ visuallyHidden: getClassName('bpk-autosuggest__visuallyhidden')
40
+ };
41
+ const strokeWidth = 0.0625;
42
+ const BpkAutosuggest = /*#__PURE__*/forwardRef(({
43
+ alwaysRenderSuggestions,
44
+ ariaLabels,
45
+ defaultValue,
46
+ enterKeyHint,
47
+ focusInputOnSuggestionClick = false,
48
+ getA11yResultsMessage,
49
+ getSectionSuggestions,
50
+ getSuggestionValue,
51
+ highlightFirstSuggestion,
52
+ id,
53
+ inputProps,
54
+ isDesktop = true,
55
+ multiSection,
56
+ onClick,
57
+ onInputValueChange,
58
+ onLoad,
59
+ onSuggestionHighlighted,
60
+ onSuggestionSelected,
61
+ onSuggestionsClearRequested,
62
+ onSuggestionsFetchRequested,
63
+ renderBesideInput,
64
+ renderInputComponent,
65
+ renderSectionTitle,
66
+ renderSuggestion,
67
+ shouldRenderSuggestions,
68
+ showClear = false,
69
+ suggestions,
70
+ theme: customTheme = {}
71
+ }, forwardedRef) => {
72
+ const ariaDescribedByLabelId = `${id}-srOnly`;
73
+ const theme = {
74
+ ...defaultTheme,
75
+ ...customTheme
76
+ };
77
+ const arrowRef = useRef(null);
78
+ const previousHighlightedIndexRef = useRef(null);
79
+ const hasInteractedRef = useRef(false);
80
+ const hasLoadedInitiallyRef = useRef(false);
81
+ const suggestionsCount = suggestions.length;
82
+ const hasSuggestions = suggestionsCount > 0;
83
+ function stateReducer(state, actionAndChanges) {
84
+ const {
85
+ changes,
86
+ type
87
+ } = actionAndChanges;
88
+ const shouldForceKeepOpen = alwaysRenderSuggestions && hasSuggestions && changes.isOpen === false;
89
+ if (shouldForceKeepOpen) {
90
+ return {
91
+ ...changes,
92
+ isOpen: true
93
+ };
94
+ }
95
+ switch (type) {
96
+ case useCombobox.stateChangeTypes.InputClick:
97
+ return {
98
+ ...changes,
99
+ isOpen: state.isOpen
100
+ };
101
+ default:
102
+ {
103
+ const forceOpen = !isDesktop && !!changes.inputValue;
104
+ return {
105
+ ...changes,
106
+ isOpen: forceOpen ? true : changes.isOpen
107
+ };
108
+ }
109
+ }
110
+ }
111
+ const flattenedSuggestions = multiSection ? suggestions.flatMap(section => getSectionSuggestions?.(section) ?? []) : suggestions;
112
+ const {
113
+ getInputProps,
114
+ getItemProps,
115
+ getLabelProps,
116
+ getMenuProps,
117
+ highlightedIndex,
118
+ inputValue,
119
+ isOpen,
120
+ openMenu,
121
+ setInputValue
122
+ } = useCombobox({
123
+ stateReducer,
124
+ items: flattenedSuggestions,
125
+ itemToString(suggestion) {
126
+ return suggestion ? getSuggestionValue(suggestion) : '';
127
+ },
128
+ async onInputValueChange(changes) {
129
+ const {
130
+ inputValue: newInputValue,
131
+ isOpen: newIsOpen,
132
+ type
133
+ } = changes;
134
+ onInputValueChange?.({
135
+ method: type,
136
+ newValue: newInputValue ?? ''
137
+ });
138
+ if (newInputValue?.length > 0) {
139
+ if (newIsOpen) {
140
+ onSuggestionsFetchRequested(newInputValue);
141
+ }
142
+ } else {
143
+ onSuggestionsFetchRequested('');
144
+ }
145
+ },
146
+ onSelectedItemChange(changes) {
147
+ const {
148
+ selectedItem
149
+ } = changes;
150
+ if (selectedItem) {
151
+ setInputValue(getSuggestionValue(selectedItem));
152
+ onSuggestionSelected?.({
153
+ suggestion: selectedItem,
154
+ inputValue
155
+ });
156
+ if (alwaysRenderSuggestions) {
157
+ // Manually clear suggestions or hide menu
158
+ onSuggestionsClearRequested();
159
+ }
160
+ }
161
+ },
162
+ getA11yStatusMessage() {
163
+ return getA11yResultsMessage?.(suggestionsCount) ?? '';
164
+ },
165
+ initialInputValue: defaultValue ?? '',
166
+ id
167
+ });
168
+ const {
169
+ context,
170
+ floatingStyles,
171
+ refs
172
+ } = useFloating({
173
+ placement: 'bottom-start',
174
+ middleware: isDesktop ? [offset(4), flip(), shift(), size({
175
+ apply({
176
+ elements,
177
+ rects
178
+ }) {
179
+ Object.assign(elements.floating.style, {
180
+ width: `${rects.reference.width}px`
181
+ });
182
+ }
183
+ }), floatingArrow({
184
+ element: arrowRef
185
+ })] : [],
186
+ whileElementsMounted: isDesktop ? autoUpdate : undefined
187
+ });
188
+ useEffect(() => {
189
+ if (defaultValue) {
190
+ setInputValue(defaultValue);
191
+ } else {
192
+ setInputValue('');
193
+ }
194
+ }, [defaultValue, setInputValue]);
195
+ useEffect(() => {
196
+ if (!isDesktop) {
197
+ onLoad?.(inputValue);
198
+ }
199
+ if (alwaysRenderSuggestions) {
200
+ hasLoadedInitiallyRef.current = true;
201
+ onSuggestionsFetchRequested(inputValue ?? '');
202
+ } else if (inputValue) {
203
+ onSuggestionsFetchRequested(inputValue);
204
+ }
205
+ // fire track event on load and forget about it after. We don't want to track again when anything (inputValue) changes
206
+ // eslint-disable-next-line react-hooks/exhaustive-deps
207
+ }, []);
208
+ useEffect(() => {
209
+ if (highlightedIndex === previousHighlightedIndexRef.current) return;
210
+ previousHighlightedIndexRef.current = highlightedIndex;
211
+ const currentSuggestion = highlightedIndex != null && highlightedIndex >= 0 ? flattenedSuggestions?.[highlightedIndex] ?? null : null;
212
+ onSuggestionHighlighted?.({
213
+ suggestion: currentSuggestion
214
+ });
215
+ }, [highlightedIndex, flattenedSuggestions, onSuggestionHighlighted]);
216
+ const handleInputInteraction = () => {
217
+ hasInteractedRef.current = true;
218
+ if (shouldRenderSuggestions) {
219
+ shouldRenderSuggestions(inputValue);
220
+ openMenu();
221
+ }
222
+ if (!isOpen && inputValue.length) {
223
+ onSuggestionsFetchRequested(inputValue);
224
+ openMenu();
225
+ } else if (alwaysRenderSuggestions && !inputValue) {
226
+ onSuggestionsFetchRequested('');
227
+ } else {
228
+ onClick?.();
229
+ }
230
+
231
+ // Desktop destination autosuggest lives on the homepage and is "loaded/interacted with" via clicking on it
232
+ // Every other use case is within a new screen or modal so is interacted with via the user navigating into the modal/new screen
233
+ if (isDesktop) {
234
+ onLoad?.(inputValue);
235
+ }
236
+ };
237
+ const handleSuggestionClick = () => {
238
+ if (!focusInputOnSuggestionClick) {
239
+ document.activeElement?.blur?.();
240
+ }
241
+ };
242
+ const clearSuggestions = e => {
243
+ e?.stopPropagation();
244
+ setInputValue('');
245
+ if (alwaysRenderSuggestions) {
246
+ hasLoadedInitiallyRef.current = true;
247
+ onSuggestionsFetchRequested('');
248
+ }
249
+ };
250
+
251
+ // Render suggestions function to render single section suggestion
252
+ const renderSuggestions = ({
253
+ items,
254
+ sectionId,
255
+ sectionIndex,
256
+ sectionTitle,
257
+ startIndex = 0
258
+ }) => items.map((suggestion, localIndex) => {
259
+ const globalIndex = startIndex + localIndex;
260
+ const isFirst = globalIndex === 0;
261
+ const itemId = sectionId ? `item-${sectionIndex}-${localIndex}` : undefined;
262
+ const isHighlighted = highlightedIndex === globalIndex || highlightFirstSuggestion && isFirst && highlightedIndex === -1;
263
+ return /*#__PURE__*/_jsx("li", {
264
+ "aria-labelledby": sectionId && itemId ? `${sectionId} ${itemId}` : undefined,
265
+ ...getItemProps({
266
+ item: suggestion,
267
+ index: globalIndex,
268
+ onClick: handleSuggestionClick,
269
+ 'aria-selected': highlightedIndex === globalIndex
270
+ }),
271
+ className: getClassName(theme.suggestion, isHighlighted && theme.suggestionHighlighted),
272
+ children: itemId ? /*#__PURE__*/_jsx("span", {
273
+ id: itemId,
274
+ children: renderSuggestion(suggestion)
275
+ }) : renderSuggestion(suggestion)
276
+ }, sectionTitle ? `${sectionTitle}-${getSuggestionValue(suggestion)}` : getSuggestionValue(suggestion));
277
+ });
278
+
279
+ // renderSections function to render multi-section suggestions
280
+ const renderSections = sections => {
281
+ let suggestionIndex = 0;
282
+ return sections.map((section, sectionIndex) => {
283
+ const sectionSuggestions = getSectionSuggestions?.(section) ?? [];
284
+ if (sectionSuggestions.length === 0) {
285
+ return null;
286
+ }
287
+ const sectionId = `section-${sectionIndex}`;
288
+ const sectionTitleElement = renderSectionTitle?.(section);
289
+ const sectionTitle = typeof sectionTitleElement === 'string' ? sectionTitleElement : `section-${sectionIndex}`;
290
+ const renderedItems = renderSuggestions({
291
+ items: sectionSuggestions,
292
+ sectionId,
293
+ sectionTitle,
294
+ sectionIndex,
295
+ startIndex: suggestionIndex
296
+ });
297
+ suggestionIndex += sectionSuggestions.length;
298
+ return /*#__PURE__*/_jsxs("section", {
299
+ className: theme.sectionContainer,
300
+ role: "group",
301
+ "aria-labelledby": sectionId,
302
+ children: [sectionTitleElement && /*#__PURE__*/_jsx("div", {
303
+ id: sectionId,
304
+ className: theme.sectionTitle,
305
+ children: sectionTitleElement
306
+ }), renderedItems]
307
+ }, sectionTitle);
308
+ });
309
+ };
310
+ const showSuggestions = hasSuggestions && (alwaysRenderSuggestions && hasLoadedInitiallyRef.current && !hasInteractedRef.current || isOpen);
311
+ const renderList = () => multiSection ? renderSections(suggestions) : renderSuggestions({
312
+ items: suggestions
313
+ });
314
+
315
+ // Render the input component
316
+ const renderInput = () => {
317
+ const inputAriaLabel = inputValue || inputProps.placeholder;
318
+ const {
319
+ className: inputClassName,
320
+ name: inputName,
321
+ onClick: inputOnClick,
322
+ onKeyDown: inputOnKeyDown,
323
+ type: typeFromInputProps,
324
+ ...restInputProps
325
+ } = inputProps;
326
+ const {
327
+ ref: downshiftInputRef,
328
+ value,
329
+ ...finalInputProps
330
+ } = getInputProps({
331
+ ref: forwardedRef,
332
+ onClick: handleInputInteraction,
333
+ onFocus: handleInputInteraction,
334
+ 'aria-describedby': ariaDescribedByLabelId,
335
+ 'aria-label': inputAriaLabel,
336
+ className: inputClassName || theme.input,
337
+ ...restInputProps
338
+ });
339
+ const setInputRef = node => {
340
+ if (refs.reference?.current === node) return;
341
+
342
+ // convert input ref from Downshift
343
+ if (typeof downshiftInputRef === 'function') {
344
+ downshiftInputRef(node);
345
+ } else if (downshiftInputRef && typeof downshiftInputRef === 'object' && 'current' in downshiftInputRef) {
346
+ downshiftInputRef.current = node;
347
+ }
348
+ };
349
+ if (renderInputComponent) {
350
+ return renderInputComponent({
351
+ ref: setInputRef,
352
+ enterKeyHint,
353
+ value,
354
+ ...finalInputProps
355
+ });
356
+ }
357
+ return /*#__PURE__*/_jsx("div", {
358
+ className: getClassName(theme.label),
359
+ children: /*#__PURE__*/_jsxs("div", {
360
+ className: getClassName(theme.inputTextWrapper),
361
+ children: [/*#__PURE__*/_jsx("label", {
362
+ "aria-hidden": true,
363
+ ...getLabelProps(),
364
+ children: renderBesideInput?.()
365
+ }), /*#__PURE__*/_jsx("span", {
366
+ className: theme.visuallyHidden,
367
+ id: ariaDescribedByLabelId,
368
+ children: ariaLabels?.label && ariaLabels.label
369
+ }), /*#__PURE__*/_jsx("div", {
370
+ className: getClassName(theme.inputWrapper),
371
+ children: /*#__PURE__*/_jsx(BpkInput, {
372
+ value: inputValue,
373
+ inputRef: setInputRef,
374
+ clearButtonMode: showClear ? 'whileEditing' : 'never',
375
+ clearButtonLabel: ariaLabels?.clearButton || 'Clear input',
376
+ name: inputName || id,
377
+ id: id,
378
+ ...finalInputProps,
379
+ enterKeyHint: enterKeyHint,
380
+ onClear: clearSuggestions
381
+ })
382
+ })]
383
+ })
384
+ });
385
+ };
386
+ const containerWrapperRef = useRef(null);
387
+ useEffect(() => {
388
+ if (containerWrapperRef.current) {
389
+ refs.setReference(containerWrapperRef.current);
390
+ }
391
+ }, [refs]);
392
+ return /*#__PURE__*/_jsxs("div", {
393
+ ref: containerWrapperRef,
394
+ className: getClassName(theme.container, suggestionsCount && theme.containerOpen),
395
+ children: [renderInput(), showSuggestions && (isDesktop ? /*#__PURE__*/_jsx(FloatingPortal, {
396
+ children: /*#__PURE__*/_jsxs("div", {
397
+ ref: refs.setFloating,
398
+ style: floatingStyles,
399
+ className: getClassName(theme.suggestionsContainer, isDesktop && theme.desktopSuggestionsContainer, showSuggestions && theme.suggestionsContainerOpen),
400
+ children: [/*#__PURE__*/_jsx(FloatingArrow, {
401
+ ref: arrowRef,
402
+ context: context,
403
+ className: getClassName('bpk-autosuggest__arrow'),
404
+ role: "presentation",
405
+ stroke: surfaceHighlightDay,
406
+ strokeWidth: strokeWidth
407
+ }), /*#__PURE__*/_jsx("ul", {
408
+ ...getMenuProps({
409
+ ...(ariaLabels?.resultsList && {
410
+ 'aria-label': ariaLabels.resultsList
411
+ })
412
+ }),
413
+ className: getClassName(theme.suggestionsList, isDesktop && theme.desktopSuggestionsList),
414
+ children: renderList()
415
+ })]
416
+ })
417
+ }) : /*#__PURE__*/_jsx("div", {
418
+ className: getClassName(theme.suggestionsContainer, showSuggestions && theme.suggestionsContainerOpen),
419
+ children: /*#__PURE__*/_jsx("ul", {
420
+ ...getMenuProps({
421
+ ...(ariaLabels?.resultsList && {
422
+ 'aria-label': ariaLabels.resultsList
423
+ })
424
+ }),
425
+ className: getClassName(theme.suggestionsList),
426
+ children: renderList()
427
+ })
428
+ }))]
429
+ });
430
+ });
431
+ export default BpkAutosuggest;
@@ -0,0 +1,18 @@
1
+ /*
2
+ * Backpack - Skyscanner's Design System
3
+ *
4
+ * Copyright 2016 Skyscanner Ltd
5
+ *
6
+ * Licensed under the Apache License, Version 2.0 (the "License");
7
+ * you may not use this file except in compliance with the License.
8
+ * You may obtain a copy of the License at
9
+ *
10
+ * http://www.apache.org/licenses/LICENSE-2.0
11
+ *
12
+ * Unless required by applicable law or agreed to in writing, software
13
+ * distributed under the License is distributed on an "AS IS" BASIS,
14
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
+ * See the License for the specific language governing permissions and
16
+ * limitations under the License.
17
+ */
18
+ .bpk-autosuggest__input{width:100%}.bpk-autosuggest__suggestions-container{margin-top:.75rem;border:.0625rem solid #e0e4e9;border-radius:.5rem;background-color:#fff}.bpk-autosuggest__arrow{width:1.5rem;height:1.5rem;fill:#fff}.bpk-autosuggest__arrow[data-hide]{visibility:hidden}.bpk-autosuggest__suggestions-list{min-width:fit-content;margin:0;padding:0;border-radius:.5rem;background-color:#fff;list-style:none;box-shadow:0px 4px 14px 0px rgba(37,32,31,.25);overflow:hidden}.bpk-autosuggest__suggestion-item{cursor:pointer;margin:0;font-size:1rem;line-height:1.5rem;font-weight:400}.bpk-autosuggest__suggestion-item:not(:last-child){box-shadow:0 -1px 0 0 #c1c7cf inset}.bpk-autosuggest__suggestion-item:active{background-color:#eff3f8}.bpk-autosuggest__suggestion-item--highlighted{background-color:#eff3f8}.bpk-autosuggest__suggestion{display:table;width:100%;padding:1rem}.bpk-autosuggest__suggestion--indent{padding-left:2rem}.bpk-autosuggest__suggestion-icon{display:table-cell;margin-right:.5rem;vertical-align:top;fill:#626971}html[dir=rtl] .bpk-autosuggest__suggestion-icon{margin-right:0;margin-left:.5rem}.bpk-autosuggest__suggestion-content{display:table-cell;width:100%;vertical-align:top}.bpk-autosuggest__suggestion-inner{display:flex;flex-direction:row;flex-wrap:wrap;justify-content:space-between}.bpk-autosuggest__suggestion-value{display:block}.bpk-autosuggest__suggestion-sub-heading{display:table-cell;width:100%;vertical-align:top;margin:0;font-size:.75rem;line-height:1rem;font-weight:400}.bpk-autosuggest__suggestion-tertiary-label{display:table-cell;align-self:center;color:#626971;vertical-align:top;word-break:keep-all;margin:0;font-size:.75rem;line-height:1rem;font-weight:400}.bpk-autosuggest__section-container:not(:first-of-type){border-top:1px solid #c1c7cf}.bpk-autosuggest__visuallyhidden{position:absolute;width:1px;height:1px;margin:-1px;padding:0;border:0;white-space:nowrap;overflow:hidden;clip:rect(0 0 0 0)}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@skyscanner/backpack-web",
3
- "version": "38.8.0",
3
+ "version": "38.9.1",
4
4
  "description": "Backpack Design System web library",
5
5
  "repository": {
6
6
  "type": "git",
@@ -25,7 +25,7 @@
25
25
  "@floating-ui/react": "^0.26.12",
26
26
  "@popperjs/core": "^2.11.8",
27
27
  "@radix-ui/react-compose-refs": "^1.1.1",
28
- "@radix-ui/react-slider": "1.1.2",
28
+ "@radix-ui/react-slider": "1.3.5",
29
29
  "@react-google-maps/api": "^2.19.3",
30
30
  "@skyscanner/bpk-foundations-web": "^22.1.0",
31
31
  "@skyscanner/bpk-svgs": "^20.8.0",
@@ -33,6 +33,7 @@
33
33
  "a11y-focus-store": "^1.0.0",
34
34
  "d3-path": "^3.1.0",
35
35
  "d3-scale": "^4.0.2",
36
+ "downshift": "^9.0.10",
36
37
  "intersection-observer": "^0.12.2",
37
38
  "lodash": "^4.17.20",
38
39
  "lodash.clamp": "^4.0.3",