@qhealth-design-system/core 1.8.0 → 1.8.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.
package/CHANGELOG.md CHANGED
@@ -7,6 +7,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## Unreleased
9
9
 
10
+ ## 1.8.1 - 2024-08-15
11
+
10
12
  ## 1.8.0 - 2024-08-13
11
13
 
12
14
  ## 1.7.5 - 2024-07-03
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@qhealth-design-system/core",
3
- "version": "1.8.0",
3
+ "version": "1.8.1",
4
4
  "description": "",
5
5
  "licence": "MIT",
6
6
  "main": "index.js",
@@ -63,7 +63,7 @@
63
63
  margin: 0; //Intentionally flush with the container, as breadcrumbs are designed to sit on a full viewport width bg.
64
64
  display: none;
65
65
  @include QLD-space(padding, 0.25unit 0);
66
-
66
+ flex-shrink: 0;
67
67
  a {
68
68
  @include QLD-underline('light','underline','default','noVisited');
69
69
  color: var(--QLD-color-light__link);
@@ -94,7 +94,7 @@
94
94
  &:last-child {
95
95
  display: flex;
96
96
  flex-grow: 1;
97
- overflow: hidden;
97
+ // overflow: hidden;
98
98
  white-space: wrap;
99
99
  text-overflow: ellipsis;
100
100
  flex: 1 1 auto;
@@ -187,11 +187,10 @@
187
187
  @include QLD-media(md) {
188
188
  @include QLD-space(margin, 0 0 1rem);
189
189
  display: inline-block;
190
-
191
190
  > .qld__link-list > li {
192
191
 
193
192
  flex: 0 0 auto;
194
-
193
+ flex-shrink: 0;
195
194
  // Hide current page
196
195
  &:last-child {
197
196
  display: none;
@@ -208,7 +207,7 @@
208
207
 
209
208
  > .qld__link-list > li {
210
209
  display: inline-block;
211
-
210
+ flex-shrink: 0;
212
211
  &:last-child {
213
212
  display: inline-block;
214
213
  }
@@ -36,6 +36,7 @@
36
36
 
37
37
  const paddings = parseFloat(containerFluidStyle.getPropertyValue('padding-right').replace(/\D/g, '')) + parseFloat(containerFluidStyle.getPropertyValue('padding-left').replace(/\D/g, ''));
38
38
  bannerBreadCrumb.style.maxWidth = (containerFluid.offsetWidth - paddings) + 'px';
39
+
39
40
 
40
41
  // console.log('here is the containerFluid.offsetWidth ', paddings , ' here is the containerFluid.offsetWidth ', bannerBreadCrumb)
41
42
 
@@ -48,7 +49,8 @@
48
49
  }
49
50
 
50
51
  const breadCrumbsUl = bannerBreadCrumb.querySelector("ul.qld__link-list");
51
-
52
+ breadCrumbsUl.style.maxWidth = (containerFluid.offsetWidth - paddings) + 'px';
53
+
52
54
  return {
53
55
  bannerBreadCrumb,
54
56
  breadCrumbsUl,
@@ -142,12 +144,17 @@
142
144
 
143
145
  return overFlowWrapper;
144
146
  }
147
+
148
+ function truncateLastLi(breadCrumbsUlLis) {
149
+ breadCrumbsUlLis[breadCrumbsUlLis.length - 1].style.overflow = "hidden";
150
+ }
145
151
 
146
- function appendOverflow( breadCrumbsUlLis, overflowMenu) {
152
+ function appendOverflow( breadCrumbsUlLis, overflowMenu, breadcrumbUL) {
147
153
  breadCrumbsUlLis[1].innerHTML = "";
148
154
  breadCrumbsUlLis[1].className = "qld__overflow_menu--breadcrumbs";
149
155
  breadCrumbsUlLis[1].appendChild(overflowMenu);
150
156
  breadCrumbsUlLis[1].style.display = "flex";
157
+ truncateLastLi(breadCrumbsUlLis, breadcrumbUL);
151
158
  }
152
159
 
153
160
  breadcrumb.init = function () {
@@ -172,7 +179,7 @@
172
179
 
173
180
  insertOverFlowButton(overflowMenu, breadCrumbsUlLis[1]);
174
181
  breadCrumbsUlLis[1].style.display = "none";
175
- appendOverflow(breadCrumbsUlLis, overflowMenu);
182
+ appendOverflow(breadCrumbsUlLis, overflowMenu, breadCrumbsUl);
176
183
  i = 2;
177
184
 
178
185
  while(i < breadCrumbsUlLis.length - 2) {
@@ -185,7 +192,7 @@
185
192
 
186
193
  insertOverFlowButton(overflowMenu, breadCrumbsUlLis[1]);
187
194
  breadCrumbsUlLis[1].style.display = "none";
188
- appendOverflow(breadCrumbsUlLis, overflowMenu);
195
+ appendOverflow(breadCrumbsUlLis, overflowMenu, breadCrumbsUl);
189
196
  i = 2;
190
197
 
191
198
  while ((breadCrumbsUl.offsetHeight > (breadCrumbsUlLis[0].offsetHeight * 1.9)) &&
@@ -201,7 +208,7 @@
201
208
 
202
209
  insertOverFlowButton(overflowMenu, breadCrumbsUlLis[1]);
203
210
  breadCrumbsUlLis[1].style.display = "none";
204
- appendOverflow(breadCrumbsUlLis, overflowMenu);
211
+ appendOverflow(breadCrumbsUlLis, overflowMenu, breadCrumbsUl);
205
212
  i = 2;
206
213
 
207
214
  while ((breadCrumbsUl.offsetWidth < totalLisOffsetWidth) &&