@cere/cere-design-system 0.0.44 → 0.0.45

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.d.mts CHANGED
@@ -363,7 +363,12 @@ declare const webSurfaceTokens: {
363
363
  readonly bgSuccess: "#eef5f0";
364
364
  readonly bgWarning: "#fef8e8";
365
365
  readonly bgDanger: "#f9dedc";
366
- readonly bgDangerStrong: "#8c1d18";
366
+ /**
367
+ * Foreground text/icon color for content sitting ON a `bgDanger` surface.
368
+ * NOT a surface color itself — do not use as backgroundColor. Pair with
369
+ * `bgDanger` for the canonical danger alert look.
370
+ */
371
+ readonly textOnDanger: "#8c1d18";
367
372
  readonly textPrimary: "#1d1b20";
368
373
  readonly textSecondary: "#5f5c64";
369
374
  readonly textMuted: "#938f99";
@@ -498,8 +503,10 @@ interface ButtonProps extends Omit<ButtonProps$1, 'variant' | 'color'> {
498
503
  */
499
504
  variant?: ButtonVariant;
500
505
  /**
501
- * Tone overlay. `onGradient` re-skins the button as a white pill on a dark
502
- * gradient surface (banner CTA pattern). Orthogonal to `variant`.
506
+ * Tone overlay. When set, **replaces** the per-variant styling `variant`
507
+ * is ignored. Today the only non-default tone is `onGradient`, which paints
508
+ * the button as a white pill on a dark gradient surface (banner CTA
509
+ * pattern). Use the default tone if you want `variant` to drive the look.
503
510
  * @default 'default'
504
511
  */
505
512
  tone?: ButtonTone;
@@ -2103,6 +2110,16 @@ interface CardProps extends Omit<CardProps$1, 'variant'> {
2103
2110
  /** Visual treatment. @default 'standard' */
2104
2111
  variant?: CardVariant;
2105
2112
  hoverable?: boolean;
2113
+ /**
2114
+ * Opt the card into being a real interactive element. When combined with
2115
+ * `onClick`, the root renders via MUI ButtonBase — focusable button,
2116
+ * Enter/Space activation, `:focus-visible` ring. When `clickable` is set
2117
+ * without `onClick`, only the pointer cursor changes (back-compat).
2118
+ *
2119
+ * `<Card onClick={...}>` WITHOUT `clickable` keeps a `<div>` root and just
2120
+ * forwards the click handler, so consumers using onClick for analytics or
2121
+ * non-clickable side effects are not silently turned into buttons.
2122
+ */
2106
2123
  clickable?: boolean;
2107
2124
  }
2108
2125
  declare const Card: React__default.FC<CardProps>;
package/dist/index.d.ts CHANGED
@@ -363,7 +363,12 @@ declare const webSurfaceTokens: {
363
363
  readonly bgSuccess: "#eef5f0";
364
364
  readonly bgWarning: "#fef8e8";
365
365
  readonly bgDanger: "#f9dedc";
366
- readonly bgDangerStrong: "#8c1d18";
366
+ /**
367
+ * Foreground text/icon color for content sitting ON a `bgDanger` surface.
368
+ * NOT a surface color itself — do not use as backgroundColor. Pair with
369
+ * `bgDanger` for the canonical danger alert look.
370
+ */
371
+ readonly textOnDanger: "#8c1d18";
367
372
  readonly textPrimary: "#1d1b20";
368
373
  readonly textSecondary: "#5f5c64";
369
374
  readonly textMuted: "#938f99";
@@ -498,8 +503,10 @@ interface ButtonProps extends Omit<ButtonProps$1, 'variant' | 'color'> {
498
503
  */
499
504
  variant?: ButtonVariant;
500
505
  /**
501
- * Tone overlay. `onGradient` re-skins the button as a white pill on a dark
502
- * gradient surface (banner CTA pattern). Orthogonal to `variant`.
506
+ * Tone overlay. When set, **replaces** the per-variant styling `variant`
507
+ * is ignored. Today the only non-default tone is `onGradient`, which paints
508
+ * the button as a white pill on a dark gradient surface (banner CTA
509
+ * pattern). Use the default tone if you want `variant` to drive the look.
503
510
  * @default 'default'
504
511
  */
505
512
  tone?: ButtonTone;
@@ -2103,6 +2110,16 @@ interface CardProps extends Omit<CardProps$1, 'variant'> {
2103
2110
  /** Visual treatment. @default 'standard' */
2104
2111
  variant?: CardVariant;
2105
2112
  hoverable?: boolean;
2113
+ /**
2114
+ * Opt the card into being a real interactive element. When combined with
2115
+ * `onClick`, the root renders via MUI ButtonBase — focusable button,
2116
+ * Enter/Space activation, `:focus-visible` ring. When `clickable` is set
2117
+ * without `onClick`, only the pointer cursor changes (back-compat).
2118
+ *
2119
+ * `<Card onClick={...}>` WITHOUT `clickable` keeps a `<div>` root and just
2120
+ * forwards the click handler, so consumers using onClick for analytics or
2121
+ * non-clickable side effects are not silently turned into buttons.
2122
+ */
2106
2123
  clickable?: boolean;
2107
2124
  }
2108
2125
  declare const Card: React__default.FC<CardProps>;
package/dist/index.js CHANGED
@@ -465,7 +465,12 @@ var webSurfaceTokens = {
465
465
  bgSuccess: "#eef5f0",
466
466
  bgWarning: "#fef8e8",
467
467
  bgDanger: "#f9dedc",
468
- bgDangerStrong: "#8c1d18",
468
+ /**
469
+ * Foreground text/icon color for content sitting ON a `bgDanger` surface.
470
+ * NOT a surface color itself — do not use as backgroundColor. Pair with
471
+ * `bgDanger` for the canonical danger alert look.
472
+ */
473
+ textOnDanger: "#8c1d18",
469
474
  // Text
470
475
  textPrimary: "#1d1b20",
471
476
  textSecondary: "#5f5c64",
@@ -2593,7 +2598,7 @@ var Card = ({
2593
2598
  children,
2594
2599
  ...props
2595
2600
  }) => {
2596
- const asButton = typeof onClick === "function";
2601
+ const asButton = clickable && typeof onClick === "function";
2597
2602
  return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
2598
2603
  StyledCard,
2599
2604
  {
@@ -2696,7 +2701,7 @@ var CopyableField = ({
2696
2701
  }
2697
2702
  }, [value, onCopy, flashDurationMs]);
2698
2703
  return /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(Card, { variant: "tinted", sx: { p: 1.75 }, children: [
2699
- (label || copied) && /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(
2704
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(
2700
2705
  import_Box.default,
2701
2706
  {
2702
2707
  sx: {
@@ -2704,11 +2709,12 @@ var CopyableField = ({
2704
2709
  alignItems: "center",
2705
2710
  justifyContent: "space-between",
2706
2711
  gap: 1,
2707
- mb: "6px"
2712
+ mb: label || copied ? "6px" : 0,
2713
+ minHeight: label || copied ? void 0 : 0
2708
2714
  },
2709
2715
  children: [
2710
2716
  label ? /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_material3.Typography, { variant: "overline", children: label }) : /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("span", {}),
2711
- copied && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(FlashLabel, { children: flashLabel })
2717
+ /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(FlashLabel, { role: "status", "aria-live": "polite", "aria-atomic": "true", children: copied ? flashLabel : "" })
2712
2718
  ]
2713
2719
  }
2714
2720
  ),
@@ -6572,10 +6578,9 @@ function Carousel({
6572
6578
  position: "absolute",
6573
6579
  top: "50%",
6574
6580
  transform: "translateY(-50%)",
6575
- bgcolor: "transparent",
6576
- color: "common.white",
6577
- boxShadow: "none",
6578
- "&:hover": { bgcolor: "rgba(255,255,255,0.12)" }
6581
+ bgcolor: "background.paper",
6582
+ boxShadow: 1,
6583
+ "&:hover": { bgcolor: "background.paper" }
6579
6584
  };
6580
6585
  return /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)(
6581
6586
  import_Box8.default,
@@ -6602,7 +6607,7 @@ function Carousel({
6602
6607
  {
6603
6608
  "aria-label": "Previous slide",
6604
6609
  onClick: () => emblaApi?.scrollPrev(),
6605
- sx: [arrowBaseSx, { left: 0 }, ...Array.isArray(arrowSx) ? arrowSx : [arrowSx]],
6610
+ sx: [arrowBaseSx, { left: 8 }, ...Array.isArray(arrowSx) ? arrowSx : [arrowSx]],
6606
6611
  children: /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(import_ChevronLeft3.default, {})
6607
6612
  }
6608
6613
  ),
@@ -6611,7 +6616,7 @@ function Carousel({
6611
6616
  {
6612
6617
  "aria-label": "Next slide",
6613
6618
  onClick: () => emblaApi?.scrollNext(),
6614
- sx: [arrowBaseSx, { right: 0 }, ...Array.isArray(arrowSx) ? arrowSx : [arrowSx]],
6619
+ sx: [arrowBaseSx, { right: 8 }, ...Array.isArray(arrowSx) ? arrowSx : [arrowSx]],
6615
6620
  children: /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(import_ChevronRight3.default, {})
6616
6621
  }
6617
6622
  )