@papernote/ui 1.11.2 → 1.11.4

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/styles.css CHANGED
@@ -4205,6 +4205,10 @@ input:checked + .slider:before{
4205
4205
  fill: #a8a29e;
4206
4206
  }
4207
4207
 
4208
+ .fill-ink-500{
4209
+ fill: #78716c;
4210
+ }
4211
+
4208
4212
  .fill-ink-700{
4209
4213
  fill: #44403c;
4210
4214
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@papernote/ui",
3
- "version": "1.11.2",
3
+ "version": "1.11.4",
4
4
  "type": "module",
5
5
  "description": "A modern React component library with a paper notebook aesthetic - minimal, professional, and expressive",
6
6
  "main": "dist/index.js",
@@ -62,9 +62,11 @@ export default function FunnelChart({
62
62
 
63
63
  const maxCount = Math.max(...stages.map(s => s.count), 1);
64
64
  const stageHeight = height / stages.length;
65
- const svgWidth = 400;
65
+ const svgWidth = 450;
66
66
  const padding = 20;
67
- const funnelWidth = svgWidth - padding * 2 - 160; // Leave room for labels
67
+ const leftLabelSpace = 50; // Space for conversion rate labels on left
68
+ const rightLabelSpace = 160; // Space for stage name + value labels on right
69
+ const funnelWidth = svgWidth - padding * 2 - leftLabelSpace - rightLabelSpace;
68
70
 
69
71
  return (
70
72
  <div className={className}>
@@ -75,7 +77,7 @@ export default function FunnelChart({
75
77
  const y = idx * stageHeight;
76
78
  const topWidth = funnelWidth * ratio;
77
79
  const bottomWidth = funnelWidth * nextRatio;
78
- const centerX = padding + funnelWidth / 2;
80
+ const centerX = padding + leftLabelSpace + funnelWidth / 2;
79
81
  const color = stage.color || defaultColors[idx % defaultColors.length];
80
82
 
81
83
  // Conversion rate
@@ -139,17 +141,19 @@ export default function FunnelChart({
139
141
  </text>
140
142
  )}
141
143
 
142
- {/* Conversion rate on left */}
144
+ {/* Conversion rate on left — shows stage-to-stage conversion */}
143
145
  {showConversion && conversionRate !== null && (
144
- <text
145
- x={centerX - funnelWidth / 2 - 8}
146
- y={y + 4}
147
- textAnchor="end"
148
- className="fill-ink-400"
149
- style={{ fontSize: '10px' }}
150
- >
151
- {conversionRate}%
152
- </text>
146
+ <g>
147
+ <text
148
+ x={centerX - funnelWidth / 2 - 16}
149
+ y={y + 4}
150
+ textAnchor="end"
151
+ className="fill-ink-500"
152
+ style={{ fontSize: '10px', fontWeight: 500 }}
153
+ >
154
+ ↓ {conversionRate}%
155
+ </text>
156
+ </g>
153
157
  )}
154
158
  </g>
155
159
  );