@verma-consulting/design-library 0.1.59 → 0.1.60

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/dist/index.mjs CHANGED
@@ -238,28 +238,34 @@ var wordmarkCore = {
238
238
  fontWeight: 600,
239
239
  letterSpacing: "-0.015em",
240
240
  lineHeight: 1.35,
241
- color: "text.primary"
241
+ /** Brand wordmark color (matches pre-refactor Logo); avoids dark `text.primary` on dark surfaces when theme mode is still light. */
242
+ color: "primary.main"
242
243
  };
243
- function wordmarkSx(centered) {
244
+ function wordmarkFontSize(centered, hasRowLogo) {
245
+ if (centered) return "1.0625rem";
246
+ if (!hasRowLogo) return "1.0625rem";
247
+ return "1rem";
248
+ }
249
+ function wordmarkSx(centered, hasRowLogo) {
244
250
  return {
245
251
  ...wordmarkCore,
246
252
  ...centered ? {
247
- fontSize: "1.0625rem",
253
+ fontSize: wordmarkFontSize(true, false),
248
254
  textAlign: "center",
249
255
  wordBreak: "break-word"
250
256
  } : {
251
- fontSize: "0.9375rem",
257
+ fontSize: wordmarkFontSize(false, hasRowLogo),
252
258
  overflow: "hidden",
253
259
  textOverflow: "ellipsis",
254
260
  whiteSpace: "nowrap"
255
261
  }
256
262
  };
257
263
  }
258
- function companySlotTypographySx(centered) {
264
+ function companySlotTypographySx(centered, hasRowLogo) {
259
265
  return {
260
266
  "& .MuiTypography-root": {
261
267
  ...wordmarkCore,
262
- fontSize: centered ? "1.0625rem" : "0.9375rem",
268
+ fontSize: wordmarkFontSize(centered, centered ? false : hasRowLogo),
263
269
  textAlign: centered ? "center" : "inherit",
264
270
  overflow: "hidden",
265
271
  textOverflow: "ellipsis",
@@ -273,6 +279,7 @@ function CompanySlot({
273
279
  maxWidth,
274
280
  harmonizeCompanyTypography,
275
281
  companySlotSx,
282
+ hasRowLogo,
276
283
  children
277
284
  }) {
278
285
  return /* @__PURE__ */ jsx3(
@@ -285,7 +292,7 @@ function CompanySlot({
285
292
  display: "flex",
286
293
  justifyContent: centered ? "center" : "flex-start",
287
294
  alignItems: "center",
288
- ...harmonizeCompanyTypography ? companySlotTypographySx(centered) : null,
295
+ ...harmonizeCompanyTypography ? companySlotTypographySx(centered, hasRowLogo) : null,
289
296
  ...companySlotSx
290
297
  },
291
298
  children
@@ -309,13 +316,14 @@ var Logo = memo(
309
316
  const maxWidth = mdMatches ? 160 : 320;
310
317
  const companyName = (organization == null ? void 0 : organization.name) || "\u2013";
311
318
  const logoUrl = (_a2 = organization == null ? void 0 : organization.logo) == null ? void 0 : _a2.url;
319
+ const hasRowLogo = !!(logoUrl || defaultLogo);
312
320
  const avatarSx = {
313
321
  fontFamily: LOGO_FONT_STACK,
314
322
  bgcolor: "primary.main",
315
323
  fontWeight: 600,
316
324
  letterSpacing: "-0.02em"
317
325
  };
318
- const wm = wordmarkSx(centered);
326
+ const wm = wordmarkSx(centered, hasRowLogo);
319
327
  if (centered) {
320
328
  return /* @__PURE__ */ jsxs(
321
329
  Stack,
@@ -373,6 +381,7 @@ var Logo = memo(
373
381
  maxWidth,
374
382
  harmonizeCompanyTypography,
375
383
  companySlotSx,
384
+ hasRowLogo,
376
385
  children: companyComponent
377
386
  }
378
387
  )
@@ -416,6 +425,7 @@ var Logo = memo(
416
425
  maxWidth,
417
426
  harmonizeCompanyTypography,
418
427
  companySlotSx,
428
+ hasRowLogo,
419
429
  children: companyComponent
420
430
  }
421
431
  ) })