@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.js CHANGED
@@ -283,28 +283,34 @@ var wordmarkCore = {
283
283
  fontWeight: 600,
284
284
  letterSpacing: "-0.015em",
285
285
  lineHeight: 1.35,
286
- color: "text.primary"
286
+ /** Brand wordmark color (matches pre-refactor Logo); avoids dark `text.primary` on dark surfaces when theme mode is still light. */
287
+ color: "primary.main"
287
288
  };
288
- function wordmarkSx(centered) {
289
+ function wordmarkFontSize(centered, hasRowLogo) {
290
+ if (centered) return "1.0625rem";
291
+ if (!hasRowLogo) return "1.0625rem";
292
+ return "1rem";
293
+ }
294
+ function wordmarkSx(centered, hasRowLogo) {
289
295
  return {
290
296
  ...wordmarkCore,
291
297
  ...centered ? {
292
- fontSize: "1.0625rem",
298
+ fontSize: wordmarkFontSize(true, false),
293
299
  textAlign: "center",
294
300
  wordBreak: "break-word"
295
301
  } : {
296
- fontSize: "0.9375rem",
302
+ fontSize: wordmarkFontSize(false, hasRowLogo),
297
303
  overflow: "hidden",
298
304
  textOverflow: "ellipsis",
299
305
  whiteSpace: "nowrap"
300
306
  }
301
307
  };
302
308
  }
303
- function companySlotTypographySx(centered) {
309
+ function companySlotTypographySx(centered, hasRowLogo) {
304
310
  return {
305
311
  "& .MuiTypography-root": {
306
312
  ...wordmarkCore,
307
- fontSize: centered ? "1.0625rem" : "0.9375rem",
313
+ fontSize: wordmarkFontSize(centered, centered ? false : hasRowLogo),
308
314
  textAlign: centered ? "center" : "inherit",
309
315
  overflow: "hidden",
310
316
  textOverflow: "ellipsis",
@@ -318,6 +324,7 @@ function CompanySlot({
318
324
  maxWidth,
319
325
  harmonizeCompanyTypography,
320
326
  companySlotSx,
327
+ hasRowLogo,
321
328
  children
322
329
  }) {
323
330
  return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
@@ -330,7 +337,7 @@ function CompanySlot({
330
337
  display: "flex",
331
338
  justifyContent: centered ? "center" : "flex-start",
332
339
  alignItems: "center",
333
- ...harmonizeCompanyTypography ? companySlotTypographySx(centered) : null,
340
+ ...harmonizeCompanyTypography ? companySlotTypographySx(centered, hasRowLogo) : null,
334
341
  ...companySlotSx
335
342
  },
336
343
  children
@@ -354,13 +361,14 @@ var Logo = (0, import_react.memo)(
354
361
  const maxWidth = mdMatches ? 160 : 320;
355
362
  const companyName = (organization == null ? void 0 : organization.name) || "\u2013";
356
363
  const logoUrl = (_a2 = organization == null ? void 0 : organization.logo) == null ? void 0 : _a2.url;
364
+ const hasRowLogo = !!(logoUrl || defaultLogo);
357
365
  const avatarSx = {
358
366
  fontFamily: LOGO_FONT_STACK,
359
367
  bgcolor: "primary.main",
360
368
  fontWeight: 600,
361
369
  letterSpacing: "-0.02em"
362
370
  };
363
- const wm = wordmarkSx(centered);
371
+ const wm = wordmarkSx(centered, hasRowLogo);
364
372
  if (centered) {
365
373
  return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
366
374
  import_material2.Stack,
@@ -418,6 +426,7 @@ var Logo = (0, import_react.memo)(
418
426
  maxWidth,
419
427
  harmonizeCompanyTypography,
420
428
  companySlotSx,
429
+ hasRowLogo,
421
430
  children: companyComponent
422
431
  }
423
432
  )
@@ -461,6 +470,7 @@ var Logo = (0, import_react.memo)(
461
470
  maxWidth,
462
471
  harmonizeCompanyTypography,
463
472
  companySlotSx,
473
+ hasRowLogo,
464
474
  children: companyComponent
465
475
  }
466
476
  ) })