@7365admin1/layer-common 4.97.1-staging.616 → 4.97.1-staging.617

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.
@@ -13,7 +13,7 @@
13
13
  <!-- Seven365 staff view: persistent banner with Exit (only while one is open). -->
14
14
  <StaffViewBanner />
15
15
  <v-app-bar
16
- :height="58"
16
+ :height="barHeight"
17
17
  flat
18
18
  scroll-behavior="elevate"
19
19
  scroll-threshold="200"
@@ -21,7 +21,7 @@
21
21
  >
22
22
  <v-app-bar-nav-icon v-if="!props.hideNavIcon" @click="drawer = !drawer"></v-app-bar-nav-icon>
23
23
 
24
- <div class="app-topbar-shell__crumb">
24
+ <div ref="crumbEl" class="app-topbar-shell__crumb">
25
25
  <span v-if="siteName" class="app-topbar-shell__site">{{ siteName }}</span>
26
26
  <span v-if="siteName && moduleName" class="app-topbar-shell__sep">/</span>
27
27
  <span class="app-topbar-shell__module">{{ moduleName }}</span>
@@ -170,6 +170,25 @@ const siteName = computed(() =>
170
170
 
171
171
  const route = useRoute();
172
172
 
173
+ /**
174
+ * The bar is the design's 58px, and grows when a long site name wraps onto
175
+ * more lines than fit - so the full name is always visible, never clipped.
176
+ */
177
+ const crumbEl = ref<HTMLElement | null>(null);
178
+ const crumbHeight = ref(0);
179
+ const barHeight = computed(() => Math.max(58, crumbHeight.value));
180
+ let crumbObserver: ResizeObserver | null = null;
181
+
182
+ onMounted(() => {
183
+ if (!crumbEl.value || typeof ResizeObserver === "undefined") return;
184
+ crumbObserver = new ResizeObserver(() => {
185
+ crumbHeight.value = crumbEl.value?.offsetHeight ?? 0;
186
+ });
187
+ crumbObserver.observe(crumbEl.value);
188
+ });
189
+
190
+ onBeforeUnmount(() => crumbObserver?.disconnect());
191
+
173
192
  /**
174
193
  * The page's name comes off the route name, which the applications build from
175
194
  * their own folder structure: `org-site-work-orders` is Work Orders. The rule
@@ -238,26 +257,38 @@ const { getNameInitials } = useUtils();
238
257
  flex: 1 1 auto;
239
258
  min-width: 0;
240
259
  display: flex;
260
+ flex-wrap: wrap;
241
261
  align-items: center;
242
- gap: 6px;
262
+ column-gap: 6px;
263
+ padding-block: 6px;
243
264
  font-size: var(--fs-breadcrumb);
244
- /* Truncates rather than wraps: two lines would break a 58px bar, and the
245
- site name is the half worth losing first. */
246
- overflow: hidden;
247
- white-space: nowrap;
265
+ line-height: 1.25;
266
+ /* Owner 2026-10-30: the site name is shown IN FULL - it wraps, the bar grows
267
+ to fit (see `barHeight`), and it is never cut with an ellipsis. */
268
+ white-space: normal;
248
269
  }
249
270
 
250
271
  .app-topbar-shell__site,
251
272
  .app-topbar-shell__sep {
252
273
  color: var(--muted);
253
- overflow: hidden;
254
- text-overflow: ellipsis;
274
+ }
275
+
276
+ .app-topbar-shell__site {
277
+ /* Word boundaries first; only a single unbroken word wider than the bar is
278
+ split, so nothing is ever hidden. */
279
+ overflow-wrap: break-word;
255
280
  }
256
281
 
257
282
  .app-topbar-shell__module {
258
283
  color: var(--text);
259
284
  font-weight: 700;
260
- flex: 0 0 auto;
285
+ }
286
+
287
+ /* Phones: a little smaller, so a long name takes fewer lines. */
288
+ @media (max-width: 599px) {
289
+ .app-topbar-shell__crumb {
290
+ font-size: 12px;
291
+ }
261
292
  }
262
293
 
263
294
  /**
@@ -311,9 +342,7 @@ const { getNameInitials } = useUtils();
311
342
  font-weight: 800;
312
343
  line-height: 1.3;
313
344
  color: var(--text);
314
- overflow: hidden;
315
- white-space: nowrap;
316
- text-overflow: ellipsis;
345
+ overflow-wrap: break-word;
317
346
  }
318
347
 
319
348
  .app-profile-menu__site {
@@ -321,9 +350,7 @@ const { getNameInitials } = useUtils();
321
350
  font-weight: 600;
322
351
  line-height: 1.3;
323
352
  color: var(--muted);
324
- overflow: hidden;
325
- white-space: nowrap;
326
- text-overflow: ellipsis;
353
+ overflow-wrap: break-word;
327
354
  }
328
355
 
329
356
  .app-profile-menu__rows {
@@ -15,10 +15,9 @@
15
15
  :to="props.route"
16
16
  class="switch-context__activator"
17
17
  >
18
- <!-- The design prints the organisation and site names in full, but
19
- mid-word line breaks ("Manageme-nt", "Condominiu-m") are not
20
- acceptable. Wrap at word boundaries onto up to two lines, then
21
- ellipsis; the title attribute keeps the full name on hover. -->
18
+ <!-- Owner 2026-10-30: the organisation and site names are shown IN
19
+ FULL - wrapped at word boundaries onto as many lines as they
20
+ need, never cut with an ellipsis. -->
22
21
  <v-list-item-title
23
22
  class="switch-context__name"
24
23
  :title="name || `Select ${prop.title}`"
@@ -339,18 +338,35 @@ const selectItem = (value: string) => {
339
338
  background: var(--hover);
340
339
  }
341
340
 
342
- /* Wrap the full organisation/site name at word boundaries onto up to two
343
- lines, then ellipsis - never break mid-word. Full name is on the title
344
- attribute for hover. */
345
- .switch-context__name {
346
- display: -webkit-box;
347
- line-clamp: 2;
348
- -webkit-line-clamp: 2;
349
- -webkit-box-orient: vertical;
350
- overflow: hidden;
341
+ /* Owner 2026-10-30: the full organisation/site name, wrapped at word
342
+ boundaries onto as many lines as it needs - never clamped or cut. Only a
343
+ single word wider than the rail is split. The selector carries the Vuetify
344
+ class so it beats `.v-list-item-title`'s nowrap + ellipsis. */
345
+ .v-list-item-title.switch-context__name {
346
+ /* A touch under the rail's 14px, so a long name takes fewer lines. */
347
+ font-size: 13px;
351
348
  white-space: normal;
352
- overflow-wrap: normal;
353
- word-break: normal;
349
+ overflow: visible;
350
+ text-overflow: clip;
351
+ overflow-wrap: break-word;
354
352
  line-height: 1.25;
355
353
  }
354
+
355
+ /* The dropdown rows: same rule, the whole name on every row. */
356
+ .switch-context__row {
357
+ white-space: normal;
358
+ overflow-wrap: break-word;
359
+ line-height: 1.3;
360
+ }
361
+
362
+ /* The icon's gap is the rail rows' 10px, not Vuetify's 32px, so a long name
363
+ gets the width and takes fewer lines. */
364
+ .switch-context__activator :deep(.v-list-item__prepend > .v-icon ~ .v-list-item__spacer) {
365
+ width: 10px;
366
+ }
367
+
368
+ .switch-context__activator :deep(.v-list-item__content),
369
+ .switch-context__row :deep(.v-list-item__content) {
370
+ overflow: visible;
371
+ }
356
372
  </style>
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@7365admin1/layer-common",
3
3
  "license": "MIT",
4
4
  "type": "module",
5
- "version": "4.97.1-staging.616",
5
+ "version": "4.97.1-staging.617",
6
6
  "author": "7365admin1",
7
7
  "main": "./nuxt.config.ts",
8
8
  "//files": "What a consumer extending this layer actually loads. Without this npm ships the whole working tree - the changesets, the CI workflows, the render harness in tools/ and any scratch directory that happened to exist at publish time. Nuxt resolves a layer by directory, so every runtime directory below has to stay listed; adding a new top-level runtime directory means adding it here too.",