@cntyclub/ui-react 0.7.1 → 0.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/dist/index.d.ts CHANGED
@@ -1233,19 +1233,24 @@ interface PipelineProps extends React$1.ComponentProps<"div"> {
1233
1233
  /** Ordered funnel stages, left to right. */
1234
1234
  stages: PipelineStage[];
1235
1235
  /**
1236
- * Conversion markers shown after each stage (length = `stages.length - 1`).
1237
- * Typically a percentage string; any node works.
1236
+ * Step-to-step conversion markers. `conversions[i]` is the share of stage `i`
1237
+ * that advances to stage `i + 1`, and is shown as a pill right beside stage
1238
+ * `i`'s number (length = `stages.length - 1`). Typically a percentage string.
1238
1239
  */
1239
1240
  conversions?: React$1.ReactNode[];
1240
1241
  }
1241
1242
  /**
1242
- * A horizontal conversion funnel — a row of headline stages, each with the
1243
- * step-to-step conversion pill sitting right beside its number. The row wraps
1244
- * onto multiple lines when space is tight (e.g. beside a docked panel), so it
1245
- * stays readable without stretching the stages apart.
1243
+ * A conversion funnel — equal-width stages laid left to right. Each stage
1244
+ * carries its own step-to-step conversion in a pill next to the number, and a
1245
+ * chevron points to the next stage, so the row reads as a flow rather than a
1246
+ * set of loose stats.
1247
+ *
1248
+ * The component is its own container query context: when it gets narrow (e.g.
1249
+ * beside a docked panel) the chevrons hide and the stages reflow into a
1250
+ * two-column grid, staying readable without squashing the numbers.
1246
1251
  */
1247
1252
  declare function Pipeline({ stages, conversions, className, ...props }: PipelineProps): React$1.JSX.Element;
1248
- /** The small pill that carries a stage-to-stage conversion value. */
1253
+ /** The conversion pill sitting beside a stage number. */
1249
1254
  declare function PipelineConversion({ className, ...props }: React$1.ComponentProps<"span">): React$1.JSX.Element;
1250
1255
 
1251
1256
  interface SegmentedControlOption<T extends string> {
package/dist/index.js CHANGED
@@ -6,7 +6,7 @@ import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
6
6
  import { cva } from 'class-variance-authority';
7
7
  import { AlertDialog as AlertDialog$1 } from '@base-ui/react/alert-dialog';
8
8
  import * as React17 from 'react';
9
- import { createContext, memo, forwardRef, useRef, useState, useMemo, useContext, useEffect, useCallback, useSyncExternalStore, isValidElement, useLayoutEffect } from 'react';
9
+ import { createContext, memo, forwardRef, useRef, useState, useMemo, useContext, useEffect, useCallback, Fragment as Fragment$1, useSyncExternalStore, isValidElement, useLayoutEffect } from 'react';
10
10
  import { flushSync } from 'react-dom';
11
11
  import { mergeProps } from '@base-ui/react/merge-props';
12
12
  import { useRender } from '@base-ui/react/use-render';
@@ -7409,26 +7409,40 @@ function Pipeline({ stages, conversions = [], className, ...props }) {
7409
7409
  return /* @__PURE__ */ jsx(
7410
7410
  "div",
7411
7411
  {
7412
- className: cn("flex flex-wrap items-start gap-x-5 gap-y-4", className),
7412
+ className: cn(
7413
+ "@container flex items-stretch @max-[560px]:grid @max-[560px]:grid-cols-2 @max-[560px]:gap-x-6 @max-[560px]:gap-y-5",
7414
+ className
7415
+ ),
7413
7416
  "data-slot": "pipeline",
7414
7417
  ...props,
7415
7418
  children: stages.map((stage, i) => {
7416
7419
  const conv = i < stages.length - 1 ? conversions[i] : void 0;
7417
- return /* @__PURE__ */ jsxs("div", { "data-slot": "pipeline-stage", children: [
7418
- /* @__PURE__ */ jsxs("div", { className: "flex items-baseline gap-2", children: [
7419
- /* @__PURE__ */ jsx(
7420
- "span",
7421
- {
7422
- className: cn(
7423
- "font-sans font-semibold text-3xl text-foreground leading-none tabular-nums tracking-tight",
7424
- stage.accent && "text-primary"
7425
- ),
7426
- children: stage.value
7427
- }
7428
- ),
7429
- conv != null ? /* @__PURE__ */ jsx(PipelineConversion, { children: conv }) : null
7420
+ return /* @__PURE__ */ jsxs(Fragment$1, { children: [
7421
+ /* @__PURE__ */ jsxs("div", { className: "min-w-0 flex-1 px-0.5", "data-slot": "pipeline-stage", children: [
7422
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
7423
+ /* @__PURE__ */ jsx(
7424
+ "span",
7425
+ {
7426
+ className: cn(
7427
+ "font-sans font-bold text-3xl text-foreground leading-none tabular-nums tracking-tight",
7428
+ stage.accent && "text-success"
7429
+ ),
7430
+ children: stage.value
7431
+ }
7432
+ ),
7433
+ conv != null ? /* @__PURE__ */ jsx(PipelineConversion, { children: conv }) : null
7434
+ ] }),
7435
+ /* @__PURE__ */ jsx("div", { className: "mt-2 text-muted-foreground text-xs leading-snug", children: stage.label })
7430
7436
  ] }),
7431
- /* @__PURE__ */ jsx("div", { className: "mt-1.5 text-muted-foreground text-xs leading-snug", children: stage.label })
7437
+ conv != null ? /* @__PURE__ */ jsx(
7438
+ "div",
7439
+ {
7440
+ className: "flex flex-none items-center px-1 @max-[560px]:hidden",
7441
+ "data-slot": "pipeline-arrow",
7442
+ "aria-hidden": true,
7443
+ children: /* @__PURE__ */ jsx(ChevronRight, { className: "size-3.5 text-muted-foreground/40" })
7444
+ }
7445
+ ) : null
7432
7446
  ] }, i);
7433
7447
  })
7434
7448
  }
@@ -7442,7 +7456,7 @@ function PipelineConversion({
7442
7456
  "span",
7443
7457
  {
7444
7458
  className: cn(
7445
- "inline-flex items-center rounded-full border border-border bg-secondary px-2 py-0.5 font-medium text-secondary-foreground text-xs tabular-nums",
7459
+ "inline-flex items-center rounded-full border border-success/20 bg-success/10 px-2 py-0.5 font-medium text-[11px] text-success tabular-nums dark:bg-success/16",
7446
7460
  className
7447
7461
  ),
7448
7462
  "data-slot": "pipeline-conversion",