@cntyclub/ui-react 0.8.1 → 0.8.2

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cntyclub/ui-react",
3
- "version": "0.8.1",
3
+ "version": "0.8.2",
4
4
  "description": "React component library for the Country Club UI Kit — Base UI primitives styled with the Country Club design system (Tailwind CSS v4)",
5
5
  "type": "module",
6
6
  "sideEffects": [
@@ -22,6 +22,17 @@ interface SegmentedControlProps<T extends string> {
22
22
  className?: string;
23
23
  }
24
24
 
25
+ /**
26
+ * Per-size segment padding. The base toggle sizes are icon-button tight
27
+ * (~5px), which crowds text labels like "Past 3 months"; a segmented control
28
+ * reads as text tabs, so it wants room to breathe on both axes.
29
+ */
30
+ const SEGMENT_SIZE: Record<NonNullable<SegmentedControlProps<string>["size"]>, string> = {
31
+ sm: "h-8 px-3.5 sm:h-7",
32
+ default: "h-9 px-4 sm:h-8",
33
+ lg: "h-10 px-5 sm:h-9",
34
+ };
35
+
25
36
  /**
26
37
  * A single-select segmented control — a compact row of mutually-exclusive
27
38
  * options (e.g. a time-range switch: Past month / Past 3 months / Overall).
@@ -53,7 +64,11 @@ function SegmentedControl<T extends string>({
53
64
  variant={variant}
54
65
  >
55
66
  {options.map((option) => (
56
- <ToggleGroupItem key={option.value} value={option.value}>
67
+ <ToggleGroupItem
68
+ key={option.value}
69
+ value={option.value}
70
+ className={SEGMENT_SIZE[size]}
71
+ >
57
72
  {option.label}
58
73
  </ToggleGroupItem>
59
74
  ))}