@axinom/mosaic-ui 0.72.5 → 0.72.6

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@axinom/mosaic-ui",
3
- "version": "0.72.5",
3
+ "version": "0.72.6",
4
4
  "description": "UI components for building Axinom Mosaic applications",
5
5
  "author": "Axinom",
6
6
  "license": "PROPRIETARY",
@@ -113,5 +113,5 @@
113
113
  "publishConfig": {
114
114
  "access": "public"
115
115
  },
116
- "gitHead": "c979cfcc87f8c0d686f9965a0cfb63f54083cb76"
116
+ "gitHead": "efcad0d91a11ba7fbdd2efd9568a75e61f796a44"
117
117
  }
@@ -3,44 +3,47 @@
3
3
  .container {
4
4
  @include boxSizing;
5
5
 
6
+ display: flex;
7
+ flex-direction: column;
8
+
6
9
  height: 100%;
7
10
  width: $filter-width;
8
11
 
9
- display: grid;
10
- grid-template-columns: 1fr;
11
- grid-auto-rows: min-content;
12
- overflow-x: hidden;
13
- overflow-y: auto;
14
- gap: 5px;
15
- padding: 5px;
16
-
17
- transition: width 250ms cubic-bezier(0.4, 0, 0.2, 1);
18
-
19
12
  background-color: var(
20
13
  --filter-controller-background-color,
21
14
  $filter-controller-background-color
22
15
  );
16
+
17
+ transition: width 250ms cubic-bezier(0.4, 0, 0.2, 1);
23
18
  }
24
19
 
25
20
  .header {
21
+ position: sticky;
22
+ top: 0;
23
+ z-index: 1;
24
+
26
25
  display: grid;
27
26
  grid-template-columns: auto 1fr auto;
28
27
  align-items: center;
29
28
 
30
- background-color: color-mix(
31
- in srgb,
32
- var(--filter-background-color, white) 50%,
33
- transparent
29
+ background-color: var(
30
+ --filter-controller-background-color,
31
+ $filter-controller-background-color
34
32
  );
33
+ border-bottom: 1px solid
34
+ var(--filter-header-border-color, $filter-header-border-color);
35
35
 
36
36
  .headerButton {
37
- width: 40px;
38
- height: 40px;
37
+ width: 44px;
38
+ height: 44px;
39
39
 
40
40
  svg {
41
- height: 100%;
41
+ height: 80%;
42
42
  * {
43
- stroke: var(--mosaic-secondary);
43
+ stroke: var(
44
+ --filter-context-button-color,
45
+ $filter-context-button-color
46
+ );
44
47
  }
45
48
  }
46
49
  }
@@ -49,12 +52,28 @@
49
52
  text-align: left;
50
53
  font-weight: bold;
51
54
  white-space: nowrap;
52
- color: var(--mosaic-neutral-1);
55
+ color: var(--filter-header-color, $filter-header-color);
53
56
  padding-left: 5px;
54
57
  }
55
58
  }
56
59
 
57
60
  .collapsed {
58
- width: 50px; // 40px button + container padding (5px each side, border-box)
61
+ width: 44px; // matches the 44px header toggle button
59
62
  overflow-y: hidden;
60
63
  }
64
+
65
+ .filters {
66
+ // Fill the remaining column height; `min-height: 0` overrides the default
67
+ // `auto` so the child can shrink below its content size and scroll instead
68
+ // of overflowing the container.
69
+ flex: 1;
70
+ min-height: 0;
71
+
72
+ display: grid;
73
+ grid-template-columns: 1fr;
74
+ grid-auto-rows: min-content;
75
+ overflow-x: hidden;
76
+ overflow-y: auto;
77
+ gap: 5px;
78
+ padding: 5px;
79
+ }
@@ -223,6 +223,7 @@ const FiltersComponent = <T extends Data>(
223
223
  buttonContext={ButtonContext.Icon}
224
224
  onButtonClicked={toggleExpanded}
225
225
  dataTestId="filters-toggle"
226
+ title={isExpanded ? 'Collapse filters' : 'Expand filters'}
226
227
  />
227
228
  </Badge>
228
229
  {isExpanded && (
@@ -234,18 +235,24 @@ const FiltersComponent = <T extends Data>(
234
235
  <Button
235
236
  icon={IconName.RemoveAllFilters}
236
237
  className={classes.headerButton}
237
- buttonContext={ButtonContext.None}
238
+ buttonContext={ButtonContext.Icon}
238
239
  onButtonClicked={clearAllFilters}
239
240
  dataTestId="filters-clear-all"
241
+ title="Remove all filters"
240
242
  />
241
243
  )}
242
244
  </>
243
245
  )}
244
246
  </div>
245
- {isExpanded &&
246
- options?.map((filter: FilterType<T>, index: number) =>
247
- renderFilter(filter, index),
248
- )}
247
+ <div
248
+ className={clsx(classes.filters, 'filters')}
249
+ data-test-id="filters-list"
250
+ >
251
+ {isExpanded &&
252
+ options?.map((filter: FilterType<T>, index: number) =>
253
+ renderFilter(filter, index),
254
+ )}
255
+ </div>
249
256
  </div>
250
257
  );
251
258
  };
@@ -82,6 +82,8 @@ $filter-controller-background-color: var(--mosaic-neutral-3);
82
82
  $filter-border-color: var(--mosaic-secondary);
83
83
  $multi-option-checkbox-border: var(--mosaic-secondary);
84
84
  $multi-option-label-color: var(--mosaic-neutral-1);
85
+ $filter-header-border-color: var(--mosaic-neutral-2);
86
+ $filter-header-color: var(--mosaic-neutral-1);
85
87
 
86
88
  /* Details vars */
87
89
  $details-background-color: #ffffff;