@fluid-topics/ft-search-bar 0.2.14 → 0.2.17

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.
@@ -7,6 +7,7 @@ export declare const FtSearchBarCssVariables: {
7
7
  mobileOpenBottom: FtCssVariable;
8
8
  mobileOpenLeft: FtCssVariable;
9
9
  mobileOpenRight: FtCssVariable;
10
+ desktopFiltersHeight: FtCssVariable;
10
11
  floatingZIndex: FtCssVariable;
11
12
  colorSurface: FtCssVariable;
12
13
  colorOnSurface: FtCssVariable;
@@ -6,6 +6,7 @@ import { FtSelectCssVariables } from "@fluid-topics/ft-select";
6
6
  import { FtSnapScrollCssVariables } from "@fluid-topics/ft-snap-scroll";
7
7
  import { FtChipCssVariables } from "@fluid-topics/ft-chip";
8
8
  import { FtSkeletonCssVariables } from "@fluid-topics/ft-skeleton";
9
+ import { FtTooltipCssVariables } from "@fluid-topics/ft-tooltip";
9
10
  export const FtSearchBarCssVariables = {
10
11
  height: FtCssVariable.create("--ft-search-bar-height", "SIZE", "38px"),
11
12
  borderRadius: FtCssVariable.extend("--ft-search-bar-border-radius", designSystemVariables.borderRadiusS),
@@ -14,7 +15,8 @@ export const FtSearchBarCssVariables = {
14
15
  mobileOpenBottom: FtCssVariable.create("--ft-search-bar-mobile-open-bottom", "SIZE", "0"),
15
16
  mobileOpenLeft: FtCssVariable.create("--ft-search-bar-mobile-open-left", "SIZE", "0"),
16
17
  mobileOpenRight: FtCssVariable.create("--ft-search-bar-mobile-open-right", "SIZE", "0"),
17
- floatingZIndex: FtCssVariable.create("--ft-search-bar-floating-components-z-index", "NUMBER", "2"),
18
+ desktopFiltersHeight: FtCssVariable.create("--ft-search-bar-desktop-filters-height", "SIZE", "350px"),
19
+ floatingZIndex: FtCssVariable.create("--ft-search-bar-floating-components-z-index", "NUMBER", "3"),
18
20
  colorSurface: FtCssVariable.external(designSystemVariables.colorSurface, "Design system"),
19
21
  colorOnSurface: FtCssVariable.external(designSystemVariables.colorOnSurface, "Design system"),
20
22
  colorOnSurfaceMedium: FtCssVariable.external(designSystemVariables.colorOnSurfaceMedium, "Design system"),
@@ -53,6 +55,10 @@ export const searchBarCss = css `
53
55
  background: ${FtSearchBarCssVariables.colorSurface};
54
56
  }
55
57
 
58
+ .ft-search-bar--mobile-menu-open.ft-search-bar--forced-open {
59
+ position: ${FtSearchBarCssVariables.mobileOpenPosition.get("static")};
60
+ }
61
+
56
62
  .ft-search-bar {
57
63
  position: relative;
58
64
  display: flex;
@@ -121,7 +127,7 @@ export const searchBarCss = css `
121
127
  align-items: center;
122
128
  height: 100%;
123
129
 
124
- --ft-tooltip-z-index: 3;
130
+ ${setVariable(FtTooltipCssVariables.zIndex, `calc(${FtSearchBarCssVariables.floatingZIndex} + 1)`)};
125
131
  }
126
132
 
127
133
  .ft-search-bar > ft-button,
@@ -179,23 +185,31 @@ export const searchBarCss = css `
179
185
  `;
180
186
  //language=css
181
187
  export const facetsCss = css `
182
- .ft-search-bar--floating-panel .ft-search-bar--presets {
188
+ .ft-search-bar--desktop-menu .ft-search-bar--presets {
183
189
  margin-right: auto;
184
190
  }
185
191
 
186
- .ft-search-bar--floating-panel .ft-search-bar--presets {
192
+ .ft-search-bar--desktop-menu .ft-search-bar--presets {
187
193
  min-width: 250px;
188
194
  ${setVariable(FtSelectCssVariables.optionsZIndex, "2")};
189
195
  }
190
196
 
191
- .ft-search-bar--floating-panel {
197
+ .ft-search-bar--desktop-menu {
198
+ display: flex;
192
199
  flex-direction: column;
193
200
  gap: 16px;
201
+ }
202
+
203
+ .ft-search-bar + .ft-search-bar--desktop-menu {
204
+ margin-top: 8px;
205
+ }
206
+
207
+ .ft-search-bar--floating-panel {
194
208
  padding: 16px;
195
209
  }
196
210
 
197
211
  .ft-search-bar--floating-panel-open .ft-search-bar--floating-panel {
198
- display: flex;
212
+ display: block;
199
213
  }
200
214
 
201
215
  .ft-search-bar--desktop .ft-search-bar--facets-actions {
@@ -203,6 +217,9 @@ export const facetsCss = css `
203
217
  align-items: center;
204
218
  justify-content: flex-end;
205
219
  gap: 8px;
220
+ }
221
+
222
+ .ft-search-bar--floating-panel .ft-search-bar--facets-actions {
206
223
  padding: 0 10px;
207
224
  }
208
225
 
@@ -224,13 +241,13 @@ export const facetsCss = css `
224
241
  display: none;
225
242
  }
226
243
 
227
- .ft-search-bar--floating-panel .ft-search-bar--filters-container {
244
+ .ft-search-bar--desktop-menu .ft-search-bar--filters-container {
228
245
  display: block;
229
- height: 350px;
246
+ height: ${FtSearchBarCssVariables.desktopFiltersHeight};
230
247
  --ft-snap-scroll-gap: 16px;
231
248
  }
232
249
 
233
- .ft-search-bar--floating-panel ft-filter {
250
+ .ft-search-bar--desktop-menu ft-filter {
234
251
  display: flex;
235
252
  flex-grow: 0;
236
253
  max-height: 100%;
@@ -294,7 +311,7 @@ export const facetsCss = css `
294
311
  padding-right: 0;
295
312
  }
296
313
 
297
- .ft-search-bar--floating-panel .ft-search-bar--launch-search {
314
+ .ft-search-bar--desktop-menu .ft-search-bar--launch-search {
298
315
  margin: 0;
299
316
  }
300
317
  `;
@@ -350,7 +367,7 @@ export const suggestionsCss = css `
350
367
  .ft-search-bar--floating-panel,
351
368
  .ft-search-bar--desktop .ft-search-bar--suggestions {
352
369
  position: absolute;
353
- z-index: var(--ft-search-bar-floating-components-z-index, 1);
370
+ z-index: ${FtSearchBarCssVariables.floatingZIndex};
354
371
  top: 100%;
355
372
  left: -1px;
356
373
  right: -1px;
@@ -16,6 +16,7 @@ export interface FtSearchBarLabels extends ParametrizedLabels {
16
16
  clearInputButton?: string;
17
17
  clearFilterButton?: string;
18
18
  displayMoreFilterValuesButton?: string;
19
+ noFilterValuesAvailable?: string;
19
20
  searchButton?: string;
20
21
  noSuggestions?: string;
21
22
  contentLocaleSelector?: string;
@@ -28,7 +29,7 @@ export declare type DisplayMode = "auto" | "mobile" | "desktop";
28
29
  export interface FtSearchBarProperties {
29
30
  labels?: FtSearchBarLabels;
30
31
  mode?: DisplayMode;
31
- forceMobileMenuOpen?: boolean;
32
+ forceMenuOpen?: boolean;
32
33
  baseUrl: string;
33
34
  apiIntegrationIdentifier?: string;
34
35
  contentLocale?: string;
@@ -52,6 +53,7 @@ export declare class FtSearchBar extends FtLitElement implements FtSearchBarProp
52
53
  dense: boolean;
53
54
  mode?: DisplayMode;
54
55
  forceMobileMenuOpen: boolean;
56
+ forceMenuOpen: boolean;
55
57
  baseUrl: string;
56
58
  apiIntegrationIdentifier: string;
57
59
  contentLocale?: string;
@@ -107,9 +109,11 @@ export declare class FtSearchBar extends FtLitElement implements FtSearchBarProp
107
109
  private renderMobileFacets;
108
110
  private contentLocalesAsFilterOptions;
109
111
  private renderDesktopSearchBar;
112
+ private renderDesktopMenu;
110
113
  private renderSearchBarLeftAction;
111
114
  private renderDesktopSearchBarButtons;
112
115
  private renderFacetsActions;
116
+ private renderDesktopClearFilters;
113
117
  private renderDesktopFacets;
114
118
  private renderSelectedFacets;
115
119
  private renderSuggestions;