@cl-light-ds/ui 0.1.0 → 0.3.0

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.
Files changed (148) hide show
  1. package/package.json +1 -1
  2. package/src/components/accordion/CHANGELOG.md +41 -41
  3. package/src/components/accordion/index.ts +4 -4
  4. package/src/components/alert/CHANGELOG.md +5 -5
  5. package/src/components/alert/index.ts +4 -4
  6. package/src/components/avatar/CHANGELOG.md +44 -44
  7. package/src/components/avatar/index.ts +6 -6
  8. package/src/components/badge/CHANGELOG.md +49 -49
  9. package/src/components/badge/index.ts +2 -2
  10. package/src/components/breadcrumb/CHANGELOG.md +24 -24
  11. package/src/components/breadcrumb/index.ts +5 -5
  12. package/src/components/button/CHANGELOG.md +41 -41
  13. package/src/components/button/index.ts +2 -2
  14. package/src/components/button-group/CHANGELOG.md +34 -34
  15. package/src/components/button-group/index.ts +3 -3
  16. package/src/components/card/CHANGELOG.md +162 -119
  17. package/src/components/card/Card.astro +23 -8
  18. package/src/components/card/CardContent.astro +1 -1
  19. package/src/components/card/CardDescription.astro +1 -1
  20. package/src/components/card/CardMedia.astro +1 -1
  21. package/src/components/card/CardMediaActions.astro +21 -0
  22. package/src/components/card/CardMediaSelect.astro +21 -0
  23. package/src/components/card/index.ts +12 -10
  24. package/src/components/carousel/CHANGELOG.md +5 -5
  25. package/src/components/carousel/index.ts +3 -3
  26. package/src/components/checkbox/CHANGELOG.md +58 -58
  27. package/src/components/checkbox/Checkbox.astro +2 -2
  28. package/src/components/checkbox/index.ts +1 -1
  29. package/src/components/collapsible/CHANGELOG.md +5 -5
  30. package/src/components/collapsible/index.ts +4 -4
  31. package/src/components/combobox/CHANGELOG.md +27 -27
  32. package/src/components/combobox/index.ts +11 -11
  33. package/src/components/date/CHANGELOG.md +18 -18
  34. package/src/components/date/index.ts +2 -2
  35. package/src/components/dialog/CHANGELOG.md +39 -39
  36. package/src/components/dialog/index.ts +9 -9
  37. package/src/components/dropdown-menu/CHANGELOG.md +194 -194
  38. package/src/components/dropdown-menu/DropdownMenuItemContent.astro +79 -79
  39. package/src/components/dropdown-menu/DropdownMenuPortal.astro +13 -13
  40. package/src/components/dropdown-menu/DropdownMenuRadioGroup.astro +13 -13
  41. package/src/components/dropdown-menu/dropdown-menu-item-variants.ts +24 -24
  42. package/src/components/dropdown-menu/index.ts +12 -12
  43. package/src/components/field/CHANGELOG.md +33 -33
  44. package/src/components/field/index.ts +10 -10
  45. package/src/components/hover-card/CHANGELOG.md +20 -20
  46. package/src/components/hover-card/index.ts +3 -3
  47. package/src/components/input/CHANGELOG.md +29 -29
  48. package/src/components/input/index.ts +2 -2
  49. package/src/components/input-group/CHANGELOG.md +49 -49
  50. package/src/components/input-group/controlClasses.ts +2 -2
  51. package/src/components/input-group/index.ts +6 -6
  52. package/src/components/item/CHANGELOG.md +27 -27
  53. package/src/components/item/index.ts +10 -10
  54. package/src/components/kbd/CHANGELOG.md +5 -5
  55. package/src/components/kbd/index.ts +2 -2
  56. package/src/components/label/CHANGELOG.md +28 -28
  57. package/src/components/label/index.ts +2 -2
  58. package/src/components/link-group/CHANGELOG.md +75 -75
  59. package/src/components/link-group/index.ts +5 -5
  60. package/src/components/link-group/link-group-list-variants.ts +15 -15
  61. package/src/components/marquee/CHANGELOG.md +5 -5
  62. package/src/components/marquee/index.ts +2 -2
  63. package/src/components/native-select/CHANGELOG.md +5 -5
  64. package/src/components/native-select/NativeSelectOption.astro +9 -9
  65. package/src/components/native-select/index.ts +3 -3
  66. package/src/components/navigation-menu/CHANGELOG.md +63 -63
  67. package/src/components/navigation-menu/index.ts +10 -10
  68. package/src/components/organisms/lightning-sidebar-nav/CHANGELOG.md +50 -0
  69. package/src/components/organisms/lightning-sidebar-nav/LightningSidebarNav.astro +176 -0
  70. package/src/components/organisms/lightning-sidebar-nav/SidebarNav.astro +50 -0
  71. package/src/components/organisms/lightning-sidebar-nav/SidebarNavGroup.astro +74 -0
  72. package/src/components/organisms/lightning-sidebar-nav/SidebarNavItem.astro +94 -0
  73. package/src/components/organisms/lightning-sidebar-nav/SidebarNavProBadge.astro +26 -0
  74. package/src/components/organisms/lightning-sidebar-nav/SidebarNavSection.astro +71 -0
  75. package/src/components/organisms/lightning-sidebar-nav/SidebarNavSkeleton.astro +67 -0
  76. package/src/components/organisms/lightning-sidebar-nav/SidebarNavSubItem.astro +69 -0
  77. package/src/components/organisms/lightning-sidebar-nav/SidebarNavUsage.astro +78 -0
  78. package/src/components/organisms/lightning-sidebar-nav/SidebarNavWorkspaceAvatar.astro +46 -0
  79. package/src/components/organisms/lightning-sidebar-nav/SidebarNavWorkspaceSwitcher.astro +130 -0
  80. package/src/components/organisms/lightning-sidebar-nav/icons.ts +46 -0
  81. package/src/components/organisms/lightning-sidebar-nav/index.ts +18 -0
  82. package/src/components/organisms/lightning-sidebar-nav/types.ts +77 -0
  83. package/src/components/popover/CHANGELOG.md +20 -5
  84. package/src/components/popover/Popover.astro +1 -0
  85. package/src/components/popover/PopoverContent.astro +6 -5
  86. package/src/components/popover/PopoverHeader.astro +1 -1
  87. package/src/components/popover/PopoverTrigger.astro +7 -1
  88. package/src/components/popover/index.ts +7 -7
  89. package/src/components/radio-group/CHANGELOG.md +31 -9
  90. package/src/components/radio-group/RadioGroup.astro +1 -1
  91. package/src/components/radio-group/RadioGroupItem.astro +12 -3
  92. package/src/components/radio-group/index.ts +3 -3
  93. package/src/components/select/CHANGELOG.md +39 -39
  94. package/src/components/select/index.ts +8 -8
  95. package/src/components/separator/CHANGELOG.md +5 -5
  96. package/src/components/separator/index.ts +2 -2
  97. package/src/components/skeleton/CHANGELOG.md +5 -5
  98. package/src/components/skeleton/index.ts +1 -1
  99. package/src/components/slider/CHANGELOG.md +5 -5
  100. package/src/components/slider/index.ts +1 -1
  101. package/src/components/spinner/CHANGELOG.md +18 -5
  102. package/src/components/spinner/Spinner.astro +3 -2
  103. package/src/components/spinner/index.ts +1 -1
  104. package/src/components/sticky-surface/CHANGELOG.md +5 -5
  105. package/src/components/sticky-surface/index.ts +2 -2
  106. package/src/components/switch/CHANGELOG.md +29 -9
  107. package/src/components/switch/Switch.astro +4 -4
  108. package/src/components/switch/index.ts +1 -1
  109. package/src/components/table/CHANGELOG.md +24 -5
  110. package/src/components/table/Table.astro +120 -12
  111. package/src/components/table/TableBody.astro +1 -2
  112. package/src/components/table/TableBulkToolbar.astro +37 -0
  113. package/src/components/table/TableCell.astro +25 -1
  114. package/src/components/table/TableCellText.astro +17 -0
  115. package/src/components/table/TableColumnMenu.astro +50 -0
  116. package/src/components/table/TableEditableCell.astro +287 -0
  117. package/src/components/table/TableEmpty.astro +17 -0
  118. package/src/components/table/TableFolderCell.astro +38 -0
  119. package/src/components/table/TableFooter.astro +1 -1
  120. package/src/components/table/TableHead.astro +71 -2
  121. package/src/components/table/TableHeader.astro +1 -1
  122. package/src/components/table/TablePagination.astro +57 -0
  123. package/src/components/table/TableRow.astro +32 -1
  124. package/src/components/table/TableSelectAllBanner.astro +34 -0
  125. package/src/components/table/TableSelectCell.astro +50 -0
  126. package/src/components/table/TableSkeletonRow.astro +21 -0
  127. package/src/components/table/index.ts +19 -9
  128. package/src/components/table/table-cell-variants.ts +29 -0
  129. package/src/components/tabs/CHANGELOG.md +5 -5
  130. package/src/components/tabs/index.ts +6 -6
  131. package/src/components/textarea/CHANGELOG.md +22 -5
  132. package/src/components/textarea/Textarea.astro +25 -3
  133. package/src/components/textarea/index.ts +2 -2
  134. package/src/components/toggle/CHANGELOG.md +23 -5
  135. package/src/components/toggle/Toggle.astro +13 -1
  136. package/src/components/toggle/index.ts +1 -1
  137. package/src/components/toggle-group/CHANGELOG.md +18 -5
  138. package/src/components/toggle-group/ToggleGroup.astro +14 -2
  139. package/src/components/toggle-group/index.ts +2 -2
  140. package/src/components/tooltip/CHANGELOG.md +22 -5
  141. package/src/components/tooltip/Tooltip.astro +26 -0
  142. package/src/components/tooltip/TooltipContent.astro +34 -9
  143. package/src/components/tooltip/index.ts +3 -3
  144. package/src/lib/table-controller.ts +1090 -0
  145. package/src/lib/toggle-group-controller.ts +113 -113
  146. package/src/lib/toggle-shared.ts +27 -26
  147. package/src/lib/utils.ts +6 -6
  148. package/src/styles/globals.css +197 -177
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cl-light-ds/ui",
3
- "version": "0.1.0",
3
+ "version": "0.3.0",
4
4
  "description": "ClickLearn Lightning Design System — Astro UI component library.",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -1,41 +1,41 @@
1
- # Changelog
2
-
3
- All notable changes to the `Accordion` component family (`Accordion`, `AccordionItem`, `AccordionTrigger`, `AccordionContent`) are documented in this file.
4
-
5
- ## 2026-09-08 — Figma alignment (ClickLearn Lightning Design Library, node `133-7547`)
6
-
7
- Aligned the component visually and functionally with Figma, while preserving the existing 4-part structure and all pre-existing props.
8
-
9
- ### Added
10
-
11
- - `Accordion`: `shape` prop (`"default" | "flush" | "rounded"`) — `default` keeps the bottom-border divider list, `flush` removes dividers entirely, `rounded` renders each item as its own bordered, rounded card with an 8px gap between items.
12
- - `AccordionItem`: `disabled` prop.
13
- - `AccordionTrigger`:
14
- - `icon` — leading icon rendered before the label (e.g. a lucide-astro icon component).
15
- - `badge` — optional pill (now backed by the shared `Badge` component: `variant="outline" shape="pill" size="sm"`) rendered next to the label.
16
- - `disabled` prop.
17
- - `indicatorIcon` (`"plus-minus" | "chevron"`, default `"plus-minus"`) — style of the built-in expand/collapse indicator.
18
-
19
- ### Changed
20
-
21
- - `AccordionTrigger`: replaced the hardcoded chevron up/down indicator with a Plus/Minus swap by default (matches Figma; chevron still available via `indicatorIcon="chevron"`).
22
- - `AccordionTrigger`: padding `py-4` → `p-3`; bottom padding reduces to `pb-1` when expanded, tightening the header-to-body gap.
23
- - `AccordionTrigger` / `AccordionContent`: label and caption text size `text-sm` → `text-xs` (12px), matching Figma's actual type token (this design system's `text-sm` utility is 14px).
24
- - `AccordionContent`: caption color now explicit `text-muted-foreground` (previously inherited the default dark foreground color).
25
- - `AccordionContent`: horizontal padding now `pr-3 pl-(--accordion-indent, --spacing(3))` — a shared `--accordion-indent` CSS variable (set on `AccordionItem`, `--spacing(3)` by default, `--spacing(9)` when the trigger has a lead icon) so the body text aligns under the label, not under the lead icon.
26
- - `AccordionContent`: `pb-4` → `pb-3` (12px); `pt-0` → `pt-1` (4px) — combined with the trigger's `aria-expanded:pb-1`, the header-to-body gap is 8px total.
27
- - `AccordionItem`: shape-driven classes for border/radius/background (`default` → `border-b`, `rounded` → `border` + `rounded-lg` + `bg-card`, `flush` → none).
28
- - Focus ring moved from the trigger button to `AccordionItem` (via `has-[[data-slot=accordion-trigger]:focus-visible]:*`), so a focused item's ring wraps the whole box — including the expanded caption — not just the header row. Reverted an interim change that used `focus:` (any pointer/click focus); it is `focus-visible:` only, so a mouse click does not show the ring.
29
- - Fixed the malformed `@figmaUrl` JSDoc (previously two concatenated URLs) to the correct single ClickLearn Lightning Design Library link.
30
-
31
- ### Fixed
32
-
33
- - Lead icon color: was `text-muted-foreground` (gray); Figma's actual asset is `text-foreground` (dark, matching the label).
34
- - Lead icon size: the `<svg>` was rendering at its native 24px inside a 20px (later 16px) wrapper span, because the size class was only applied to the wrapper, not the icon itself — silently eating into the icon-to-label gap. Fixed by passing the size class directly to the icon component.
35
- - Badge text picked up the trigger's `hover:underline` (text-decoration propagates to inline descendants). Added `no-underline` — currently not present after switching the badge to the shared `Badge` component with no `class` override, so this regressed; needs revisiting if the badge should stay non-underlined on hover.
36
-
37
- ### Notes
38
-
39
- - `shape` lives only on the `Accordion` root (cascades to all items uniformly) — Figma's "Nested" demo renders identically to "Rounded", so it isn't a distinct shape value.
40
- - `disabled`, `badge`, and the `flush` shape value have no dedicated demo frame in the Figma file; they were implemented using the design system's existing muted/border tokens rather than a pixel-exact spec.
41
- - All spacing values are token-based (Tailwind's `--spacing` scale) or reference `globals.css` color tokens — no hardcoded arbitrary pixel/rem/hex values remain in the four component files.
1
+ # Changelog
2
+
3
+ All notable changes to the `Accordion` component family (`Accordion`, `AccordionItem`, `AccordionTrigger`, `AccordionContent`) are documented in this file.
4
+
5
+ ## 2026-09-08 — Figma alignment (ClickLearn Lightning Design Library, node `133-7547`)
6
+
7
+ Aligned the component visually and functionally with Figma, while preserving the existing 4-part structure and all pre-existing props.
8
+
9
+ ### Added
10
+
11
+ - `Accordion`: `shape` prop (`"default" | "flush" | "rounded"`) — `default` keeps the bottom-border divider list, `flush` removes dividers entirely, `rounded` renders each item as its own bordered, rounded card with an 8px gap between items.
12
+ - `AccordionItem`: `disabled` prop.
13
+ - `AccordionTrigger`:
14
+ - `icon` — leading icon rendered before the label (e.g. a lucide-astro icon component).
15
+ - `badge` — optional pill (now backed by the shared `Badge` component: `variant="outline" shape="pill" size="sm"`) rendered next to the label.
16
+ - `disabled` prop.
17
+ - `indicatorIcon` (`"plus-minus" | "chevron"`, default `"plus-minus"`) — style of the built-in expand/collapse indicator.
18
+
19
+ ### Changed
20
+
21
+ - `AccordionTrigger`: replaced the hardcoded chevron up/down indicator with a Plus/Minus swap by default (matches Figma; chevron still available via `indicatorIcon="chevron"`).
22
+ - `AccordionTrigger`: padding `py-4` → `p-3`; bottom padding reduces to `pb-1` when expanded, tightening the header-to-body gap.
23
+ - `AccordionTrigger` / `AccordionContent`: label and caption text size `text-sm` → `text-xs` (12px), matching Figma's actual type token (this design system's `text-sm` utility is 14px).
24
+ - `AccordionContent`: caption color now explicit `text-muted-foreground` (previously inherited the default dark foreground color).
25
+ - `AccordionContent`: horizontal padding now `pr-3 pl-(--accordion-indent, --spacing(3))` — a shared `--accordion-indent` CSS variable (set on `AccordionItem`, `--spacing(3)` by default, `--spacing(9)` when the trigger has a lead icon) so the body text aligns under the label, not under the lead icon.
26
+ - `AccordionContent`: `pb-4` → `pb-3` (12px); `pt-0` → `pt-1` (4px) — combined with the trigger's `aria-expanded:pb-1`, the header-to-body gap is 8px total.
27
+ - `AccordionItem`: shape-driven classes for border/radius/background (`default` → `border-b`, `rounded` → `border` + `rounded-lg` + `bg-card`, `flush` → none).
28
+ - Focus ring moved from the trigger button to `AccordionItem` (via `has-[[data-slot=accordion-trigger]:focus-visible]:*`), so a focused item's ring wraps the whole box — including the expanded caption — not just the header row. Reverted an interim change that used `focus:` (any pointer/click focus); it is `focus-visible:` only, so a mouse click does not show the ring.
29
+ - Fixed the malformed `@figmaUrl` JSDoc (previously two concatenated URLs) to the correct single ClickLearn Lightning Design Library link.
30
+
31
+ ### Fixed
32
+
33
+ - Lead icon color: was `text-muted-foreground` (gray); Figma's actual asset is `text-foreground` (dark, matching the label).
34
+ - Lead icon size: the `<svg>` was rendering at its native 24px inside a 20px (later 16px) wrapper span, because the size class was only applied to the wrapper, not the icon itself — silently eating into the icon-to-label gap. Fixed by passing the size class directly to the icon component.
35
+ - Badge text picked up the trigger's `hover:underline` (text-decoration propagates to inline descendants). Added `no-underline` — currently not present after switching the badge to the shared `Badge` component with no `class` override, so this regressed; needs revisiting if the badge should stay non-underlined on hover.
36
+
37
+ ### Notes
38
+
39
+ - `shape` lives only on the `Accordion` root (cascades to all items uniformly) — Figma's "Nested" demo renders identically to "Rounded", so it isn't a distinct shape value.
40
+ - `disabled`, `badge`, and the `flush` shape value have no dedicated demo frame in the Figma file; they were implemented using the design system's existing muted/border tokens rather than a pixel-exact spec.
41
+ - All spacing values are token-based (Tailwind's `--spacing` scale) or reference `globals.css` color tokens — no hardcoded arbitrary pixel/rem/hex values remain in the four component files.
@@ -1,4 +1,4 @@
1
- export { default as Accordion } from "./Accordion.astro";
2
- export { default as AccordionItem } from "./AccordionItem.astro";
3
- export { default as AccordionTrigger } from "./AccordionTrigger.astro";
4
- export { default as AccordionContent } from "./AccordionContent.astro";
1
+ export { default as Accordion } from "./Accordion.astro";
2
+ export { default as AccordionItem } from "./AccordionItem.astro";
3
+ export { default as AccordionTrigger } from "./AccordionTrigger.astro";
4
+ export { default as AccordionContent } from "./AccordionContent.astro";
@@ -1,5 +1,5 @@
1
- # Changelog
2
-
3
- All notable changes to the `Alert` component will be documented in this file.
4
-
5
- ## Unreleased
1
+ # Changelog
2
+
3
+ All notable changes to the `Alert` component will be documented in this file.
4
+
5
+ ## Unreleased
@@ -1,4 +1,4 @@
1
- export { default as Alert } from "./Alert.astro";
2
- export { default as AlertTitle } from "./AlertTitle.astro";
3
- export { default as AlertDescription } from "./AlertDescription.astro";
4
-
1
+ export { default as Alert } from "./Alert.astro";
2
+ export { default as AlertTitle } from "./AlertTitle.astro";
3
+ export { default as AlertDescription } from "./AlertDescription.astro";
4
+
@@ -1,44 +1,44 @@
1
- # Changelog Avatar
2
-
3
- All notable changes to the `Avatar` component will be documented in this file.
4
-
5
-
6
- ## New props
7
-
8
- | Prop | Type | Default | Purpose |
9
- | :--- | :--- | :--- | :--- |
10
- | `variant` | `"image" &#124; "initials" &#124; "icon"` | `"image"` | Sets `data-variant`; gates the new inline icon rendering. Image/Initials still render via whichever child (`<AvatarImage>`/`<AvatarFallback>`) you slot in — this doesn't replace that. |
11
- | `icon` | `AstroComponent` (from `@lucide/astro`) | — | Icon to render when `variant="icon"`, same pattern as `Alert`'s icon prop. |
12
- | `status` | `"active" &#124; "inactive"` | `undefined` (no badge) | Renders an internal status dot — green for active/online, red for inactive/offline. |
13
-
14
- ## Styling
15
-
16
- - Migrated the root class string to `cva` (size × variant), matching the pattern `Alert.astro` already uses, instead of the old chained `data-[size=...]:` selectors.
17
- - Added a border to the circle at every size, bound to the `border-border` token: 1px (sm), 1.5px (default), 2px (lg) — previously there was no border at all.
18
- - `variant="icon"` adds `bg-primary-foreground` (white fill) since there's no child component supplying it.
19
-
20
- ## Markup
21
-
22
- - Added `data-variant` and `data-status` attributes alongside the existing `data-slot`/`data-size`.
23
- - Icon is rendered inline (centered, sized 14/16/20px per size) when `variant="icon"` — no new subcomponent file needed.
24
- - Status badge is now rendered internally via `<AvatarBadge status={status} />` when status is set, instead of requiring the consumer to manually slot `<AvatarBadge />`.
25
-
26
- ## Docs (JSDoc block)
27
-
28
- - `@figmaUrl` corrected — it was pointing at the old generic BejamasUI template file; now points at your ClickLearn Lightning node (`node-id=113-1145`).
29
- - `@description` updated to mention initials/icon/status.
30
- - Replaced the old "Badge" example with a "Variants" example (image/initials/icon) and a "Status" example (active/inactive).
31
- - `@preview` / `@usage` updated to use `status="active"` instead of a bare `<AvatarBadge />` child.
32
-
33
- ## Sibling files (part of the same alignment)
34
-
35
- - `AvatarBadge.astro` — added `status?: "active" | "inactive"` (default `"active"`, keeps old bare `<AvatarBadge />` usage looking the same); color now `bg-success`/`bg-destructive` by status; size now scales 6/10/12px per avatar size; swapped `ring-background` for an explicit `border-primary-foreground` to match Figma's literal token.
36
- - `AvatarFallback.astro` (the Initials variant) — recolored from `bg-muted`/`text-muted-foreground` to `bg-primary-foreground`/`text-foreground`/`font-semibold`; text size now scales with avatar size.
37
- - `Avatar.stories.ts` / `AvatarStory.astro` — added Initials, Icon, StatusActive, StatusInactive stories.
38
- - `apps/web/.../_sections/avatar.astro` — props table updated with variant/icon/status; added "Variants" and "Status" preview sections.
39
-
40
- ## Not changed
41
-
42
- - `AvatarImage.astro`, `AvatarGroup.astro`, `AvatarGroupCount.astro` — diameters were already correct, and group-stacking behavior was verified visually to still look right after the border change.
43
-
44
- ## Unreleased
1
+ # Changelog Avatar
2
+
3
+ All notable changes to the `Avatar` component will be documented in this file.
4
+
5
+
6
+ ## New props
7
+
8
+ | Prop | Type | Default | Purpose |
9
+ | :--- | :--- | :--- | :--- |
10
+ | `variant` | `"image" &#124; "initials" &#124; "icon"` | `"image"` | Sets `data-variant`; gates the new inline icon rendering. Image/Initials still render via whichever child (`<AvatarImage>`/`<AvatarFallback>`) you slot in — this doesn't replace that. |
11
+ | `icon` | `AstroComponent` (from `@lucide/astro`) | — | Icon to render when `variant="icon"`, same pattern as `Alert`'s icon prop. |
12
+ | `status` | `"active" &#124; "inactive"` | `undefined` (no badge) | Renders an internal status dot — green for active/online, red for inactive/offline. |
13
+
14
+ ## Styling
15
+
16
+ - Migrated the root class string to `cva` (size × variant), matching the pattern `Alert.astro` already uses, instead of the old chained `data-[size=...]:` selectors.
17
+ - Added a border to the circle at every size, bound to the `border-border` token: 1px (sm), 1.5px (default), 2px (lg) — previously there was no border at all.
18
+ - `variant="icon"` adds `bg-primary-foreground` (white fill) since there's no child component supplying it.
19
+
20
+ ## Markup
21
+
22
+ - Added `data-variant` and `data-status` attributes alongside the existing `data-slot`/`data-size`.
23
+ - Icon is rendered inline (centered, sized 14/16/20px per size) when `variant="icon"` — no new subcomponent file needed.
24
+ - Status badge is now rendered internally via `<AvatarBadge status={status} />` when status is set, instead of requiring the consumer to manually slot `<AvatarBadge />`.
25
+
26
+ ## Docs (JSDoc block)
27
+
28
+ - `@figmaUrl` corrected — it was pointing at the old generic BejamasUI template file; now points at your ClickLearn Lightning node (`node-id=113-1145`).
29
+ - `@description` updated to mention initials/icon/status.
30
+ - Replaced the old "Badge" example with a "Variants" example (image/initials/icon) and a "Status" example (active/inactive).
31
+ - `@preview` / `@usage` updated to use `status="active"` instead of a bare `<AvatarBadge />` child.
32
+
33
+ ## Sibling files (part of the same alignment)
34
+
35
+ - `AvatarBadge.astro` — added `status?: "active" | "inactive"` (default `"active"`, keeps old bare `<AvatarBadge />` usage looking the same); color now `bg-success`/`bg-destructive` by status; size now scales 6/10/12px per avatar size; swapped `ring-background` for an explicit `border-primary-foreground` to match Figma's literal token.
36
+ - `AvatarFallback.astro` (the Initials variant) — recolored from `bg-muted`/`text-muted-foreground` to `bg-primary-foreground`/`text-foreground`/`font-semibold`; text size now scales with avatar size.
37
+ - `Avatar.stories.ts` / `AvatarStory.astro` — added Initials, Icon, StatusActive, StatusInactive stories.
38
+ - `apps/web/.../_sections/avatar.astro` — props table updated with variant/icon/status; added "Variants" and "Status" preview sections.
39
+
40
+ ## Not changed
41
+
42
+ - `AvatarImage.astro`, `AvatarGroup.astro`, `AvatarGroupCount.astro` — diameters were already correct, and group-stacking behavior was verified visually to still look right after the border change.
43
+
44
+ ## Unreleased
@@ -1,6 +1,6 @@
1
- export { default as Avatar } from "./Avatar.astro";
2
- export { default as AvatarImage } from "./AvatarImage.astro";
3
- export { default as AvatarFallback } from "./AvatarFallback.astro";
4
- export { default as AvatarBadge } from "./AvatarBadge.astro";
5
- export { default as AvatarGroup } from "./AvatarGroup.astro";
6
- export { default as AvatarGroupCount } from "./AvatarGroupCount.astro";
1
+ export { default as Avatar } from "./Avatar.astro";
2
+ export { default as AvatarImage } from "./AvatarImage.astro";
3
+ export { default as AvatarFallback } from "./AvatarFallback.astro";
4
+ export { default as AvatarBadge } from "./AvatarBadge.astro";
5
+ export { default as AvatarGroup } from "./AvatarGroup.astro";
6
+ export { default as AvatarGroupCount } from "./AvatarGroupCount.astro";
@@ -1,49 +1,49 @@
1
- # Changelog for Badge.astro
2
-
3
- ## Variants
4
-
5
- - Added 4 new variants: `success`, `warning`, `accent`, and `ghost` (previously only `default`, `secondary`, `destructive`, and `outline`).
6
- - **Destructive restyled:** Now uses a solid red background with white text (previously a soft/light red-on-red-tint style).
7
- - **Ghost:** Matches its name by using `bg-card` with no border, seamlessly blending into the surface.
8
-
9
- ## Shapes
10
-
11
- - Renamed `shape="default"` to `shape="sharp"` (breaking rename, approved).
12
- - Added `shape="rounded"` (6px radius).
13
- - Default shape changed from `"default"` to `"pill"`.
14
-
15
- ## Sizing & Spacing
16
-
17
- - Fixed a padding bug where both sizes shared the same horizontal padding. Sizes are now distinctly mapped per Figma: `sm` uses `px-1`, and `default` uses `px-1.5`.
18
- - Tightened the icon/label gap from `gap-1` (4px) to `gap-0.5` (2px).
19
-
20
- ## New Props
21
-
22
- - `leadIcon` / `tailIcon` (`boolean`): Renders a lead-icon / tail-icon named slot before/after the label. This is auto-detected from slot presence if not explicitly passed (matching the pattern used for `Alert`'s `hasActions`).
23
- - Icon sizing now dynamically scales with the badge size (12px for small / 14px for default).
24
-
25
- ## States
26
-
27
- - **Focus:** Added `focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-3` (replacing dead code where the old `has-data-[icon=...]` selectors never matched).
28
- - **Disabled:** Added `disabled:bg-muted disabled:text-muted-foreground disabled:border-transparent`.
29
- - **Hover:** Added in a follow-up pass to align with new Figma designs.
30
- - Every variant now has its own hover fill, which fires on both `as="a"` and `as="button"` elements. Plain `<span>` badges remain static.
31
- - Fixed a selector bug (`[a]:hover:` is confirmed working) and removed an incorrect text-color hover change on the outline variant.
32
-
33
- ## Tokens (`globals.css`)
34
-
35
- New CSS variables were added. None of these conflict with or touch the shared `--accent` / `--success` tokens used elsewhere in the app:
36
- - **Solid variant colors:** `--badge-success`, `--badge-warning`, `--badge-accent` (plus their respective foregrounds).
37
- - **Hover-only colors:** `--background-button-hover`, `--destructive-hover`, `--badge-accent-hover` (used for hover states that require specific colors rather than simple opacity fades of existing tokens).
38
-
39
- ## Storybook & Docs (`_sections/badge.astro`)
40
-
41
- - Rebuilt the prop table to include the new variants, shape values, and `leadIcon` / `tailIcon` rows.
42
- - Added new preview blocks: **Shapes**, **Sizes**, and **With icons**.
43
- - Added an **Interactive states** block. All variants are rendered `as="button"` alongside a disabled example, so hover, focus, and disabled states can be previewed live rather than just described.
44
-
45
- ## Not Changed
46
-
47
- - Disabled and Focus states were already correct from the initial pass. They were confirmed against the latest Figma updates and left as-is.
48
-
49
- ## Unreleased
1
+ # Changelog for Badge.astro
2
+
3
+ ## Variants
4
+
5
+ - Added 4 new variants: `success`, `warning`, `accent`, and `ghost` (previously only `default`, `secondary`, `destructive`, and `outline`).
6
+ - **Destructive restyled:** Now uses a solid red background with white text (previously a soft/light red-on-red-tint style).
7
+ - **Ghost:** Matches its name by using `bg-card` with no border, seamlessly blending into the surface.
8
+
9
+ ## Shapes
10
+
11
+ - Renamed `shape="default"` to `shape="sharp"` (breaking rename, approved).
12
+ - Added `shape="rounded"` (6px radius).
13
+ - Default shape changed from `"default"` to `"pill"`.
14
+
15
+ ## Sizing & Spacing
16
+
17
+ - Fixed a padding bug where both sizes shared the same horizontal padding. Sizes are now distinctly mapped per Figma: `sm` uses `px-1`, and `default` uses `px-1.5`.
18
+ - Tightened the icon/label gap from `gap-1` (4px) to `gap-0.5` (2px).
19
+
20
+ ## New Props
21
+
22
+ - `leadIcon` / `tailIcon` (`boolean`): Renders a lead-icon / tail-icon named slot before/after the label. This is auto-detected from slot presence if not explicitly passed (matching the pattern used for `Alert`'s `hasActions`).
23
+ - Icon sizing now dynamically scales with the badge size (12px for small / 14px for default).
24
+
25
+ ## States
26
+
27
+ - **Focus:** Added `focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-3` (replacing dead code where the old `has-data-[icon=...]` selectors never matched).
28
+ - **Disabled:** Added `disabled:bg-muted disabled:text-muted-foreground disabled:border-transparent`.
29
+ - **Hover:** Added in a follow-up pass to align with new Figma designs.
30
+ - Every variant now has its own hover fill, which fires on both `as="a"` and `as="button"` elements. Plain `<span>` badges remain static.
31
+ - Fixed a selector bug (`[a]:hover:` is confirmed working) and removed an incorrect text-color hover change on the outline variant.
32
+
33
+ ## Tokens (`globals.css`)
34
+
35
+ New CSS variables were added. None of these conflict with or touch the shared `--accent` / `--success` tokens used elsewhere in the app:
36
+ - **Solid variant colors:** `--badge-success`, `--badge-warning`, `--badge-accent` (plus their respective foregrounds).
37
+ - **Hover-only colors:** `--background-button-hover`, `--destructive-hover`, `--badge-accent-hover` (used for hover states that require specific colors rather than simple opacity fades of existing tokens).
38
+
39
+ ## Storybook & Docs (`_sections/badge.astro`)
40
+
41
+ - Rebuilt the prop table to include the new variants, shape values, and `leadIcon` / `tailIcon` rows.
42
+ - Added new preview blocks: **Shapes**, **Sizes**, and **With icons**.
43
+ - Added an **Interactive states** block. All variants are rendered `as="button"` alongside a disabled example, so hover, focus, and disabled states can be previewed live rather than just described.
44
+
45
+ ## Not Changed
46
+
47
+ - Disabled and Focus states were already correct from the initial pass. They were confirmed against the latest Figma updates and left as-is.
48
+
49
+ ## Unreleased
@@ -1,2 +1,2 @@
1
- export { default as Badge } from "./Badge.astro";
2
-
1
+ export { default as Badge } from "./Badge.astro";
2
+
@@ -1,24 +1,24 @@
1
- # Changelog
2
-
3
- All notable changes to the `Breadcrumb` component family (`Breadcrumb`, `BreadcrumbList`, `BreadcrumbItem`, `BreadcrumbSeparator`) are documented in this file.
4
-
5
- ## 2026-09-08 — Figma alignment (ClickLearn Lightning Design Library, node `2166-5409`)
6
-
7
- Aligned the component visually with Figma's `breadcrumb.link` component, entirely within the existing four-part structure — no new components were introduced, and `BreadcrumbItem` still accepts any raw child content unchanged.
8
-
9
- ### Changed
10
-
11
- - `BreadcrumbItem`: styling for Figma's Default/Hover/Active `breadcrumb.link` states is now baked directly into the item via descendant selectors, targeting whatever `<a>` / `<span aria-current="page">` the consumer slots in:
12
- - Color: `[&_a]:text-muted-foreground`, `[&_a:hover]:text-foreground`, `[&_[aria-current=page]]:text-foreground`.
13
- - Click-target sizing: `inline-flex items-center gap-1 rounded-lg px-3 py-2 font-medium` on both the link and the current-page span, matching Figma's padded/rounded treatment.
14
- - Focus: `outline-none focus-visible:ring-3 focus-visible:ring-ring/50` on the link (Figma doesn't demo a focus state, but keyboard-focus visibility is a baseline requirement, reusing the idiom established on `AccordionTrigger`).
15
- - This is a universal, non-opt-in fix — existing raw `<a>`/`<span>` usage now gets the correct look automatically instead of requiring `class="hover:text-foreground transition-colors"` inlined at every call site (following the same convention already used by the sibling `LinkGroupItem`).
16
- - `BreadcrumbList`: `gap-1.5 sm:gap-2.5` (6px/10px responsive) → `gap-0`. Figma itself specifies a flat `gap-2` (8px), but the row read as too spacious once `BreadcrumbItem`'s own `px-3 py-2` link padding was added (that padding already provides breathing room around each label/separator), so the list-level gap was dropped to `gap-0` as a deliberate visual call on top of the Figma spec.
17
- - `BreadcrumbSeparator`: icon size `size-3.5` (14px) → `size-4` (16px), matching Figma. Swapped the raw inline `<svg>` chevron-right path for `ChevronRight` from `@lucide/astro` (same glyph, matches the icon-library convention already established elsewhere in this design system).
18
- - Fixed the `@figmaUrl` JSDoc (was the old Bejamas file) to the ClickLearn Lightning Design Library link.
19
-
20
- ### Notes
21
-
22
- - Figma's `breadcrumb.link` also exposes an optional leading icon and a trailing dropdown chevron. These were **not** added as props — `BreadcrumbItem` wraps opaque slotted content, so it can't inject markup inside a consumer's `<a>`; a consumer who wants an icon can already include it directly in their own link markup (e.g. `<BreadcrumbItem><a href="/"><HouseIcon class="size-4" /> Home</a></BreadcrumbItem>`), and it will inherit the correct sizing/spacing from the `[&_a]` treatment above.
23
- - Figma's collapsed-trail "..." is modeled as plain text inside a normal link-styled slot, not a distinct component — no `BreadcrumbEllipsis` was added; `<BreadcrumbItem><span>...</span></BreadcrumbItem>` already covers it.
24
- - All spacing/color values are token-based (Tailwind's `--spacing` scale, `--muted-foreground`/`--foreground`/`--radius-lg` from `globals.css`) — no hardcoded arbitrary values.
1
+ # Changelog
2
+
3
+ All notable changes to the `Breadcrumb` component family (`Breadcrumb`, `BreadcrumbList`, `BreadcrumbItem`, `BreadcrumbSeparator`) are documented in this file.
4
+
5
+ ## 2026-09-08 — Figma alignment (ClickLearn Lightning Design Library, node `2166-5409`)
6
+
7
+ Aligned the component visually with Figma's `breadcrumb.link` component, entirely within the existing four-part structure — no new components were introduced, and `BreadcrumbItem` still accepts any raw child content unchanged.
8
+
9
+ ### Changed
10
+
11
+ - `BreadcrumbItem`: styling for Figma's Default/Hover/Active `breadcrumb.link` states is now baked directly into the item via descendant selectors, targeting whatever `<a>` / `<span aria-current="page">` the consumer slots in:
12
+ - Color: `[&_a]:text-muted-foreground`, `[&_a:hover]:text-foreground`, `[&_[aria-current=page]]:text-foreground`.
13
+ - Click-target sizing: `inline-flex items-center gap-1 rounded-lg px-3 py-2 font-medium` on both the link and the current-page span, matching Figma's padded/rounded treatment.
14
+ - Focus: `outline-none focus-visible:ring-3 focus-visible:ring-ring/50` on the link (Figma doesn't demo a focus state, but keyboard-focus visibility is a baseline requirement, reusing the idiom established on `AccordionTrigger`).
15
+ - This is a universal, non-opt-in fix — existing raw `<a>`/`<span>` usage now gets the correct look automatically instead of requiring `class="hover:text-foreground transition-colors"` inlined at every call site (following the same convention already used by the sibling `LinkGroupItem`).
16
+ - `BreadcrumbList`: `gap-1.5 sm:gap-2.5` (6px/10px responsive) → `gap-0`. Figma itself specifies a flat `gap-2` (8px), but the row read as too spacious once `BreadcrumbItem`'s own `px-3 py-2` link padding was added (that padding already provides breathing room around each label/separator), so the list-level gap was dropped to `gap-0` as a deliberate visual call on top of the Figma spec.
17
+ - `BreadcrumbSeparator`: icon size `size-3.5` (14px) → `size-4` (16px), matching Figma. Swapped the raw inline `<svg>` chevron-right path for `ChevronRight` from `@lucide/astro` (same glyph, matches the icon-library convention already established elsewhere in this design system).
18
+ - Fixed the `@figmaUrl` JSDoc (was the old Bejamas file) to the ClickLearn Lightning Design Library link.
19
+
20
+ ### Notes
21
+
22
+ - Figma's `breadcrumb.link` also exposes an optional leading icon and a trailing dropdown chevron. These were **not** added as props — `BreadcrumbItem` wraps opaque slotted content, so it can't inject markup inside a consumer's `<a>`; a consumer who wants an icon can already include it directly in their own link markup (e.g. `<BreadcrumbItem><a href="/"><HouseIcon class="size-4" /> Home</a></BreadcrumbItem>`), and it will inherit the correct sizing/spacing from the `[&_a]` treatment above.
23
+ - Figma's collapsed-trail "..." is modeled as plain text inside a normal link-styled slot, not a distinct component — no `BreadcrumbEllipsis` was added; `<BreadcrumbItem><span>...</span></BreadcrumbItem>` already covers it.
24
+ - All spacing/color values are token-based (Tailwind's `--spacing` scale, `--muted-foreground`/`--foreground`/`--radius-lg` from `globals.css`) — no hardcoded arbitrary values.
@@ -1,5 +1,5 @@
1
- export { default as Breadcrumb } from "./Breadcrumb.astro";
2
- export { default as BreadcrumbList } from "./BreadcrumbList.astro";
3
- export { default as BreadcrumbItem } from "./BreadcrumbItem.astro";
4
- export { default as BreadcrumbSeparator } from "./BreadcrumbSeparator.astro";
5
-
1
+ export { default as Breadcrumb } from "./Breadcrumb.astro";
2
+ export { default as BreadcrumbList } from "./BreadcrumbList.astro";
3
+ export { default as BreadcrumbItem } from "./BreadcrumbItem.astro";
4
+ export { default as BreadcrumbSeparator } from "./BreadcrumbSeparator.astro";
5
+
@@ -1,41 +1,41 @@
1
- # Changelog for Button.astro
2
-
3
- All notable changes to the `Button` component will be documented in this file.
4
-
5
- ## Date 8th Sep 2026
6
- ## Figma alignment (node 114-6897, prop table 7185-13418)
7
-
8
- ### Variants
9
-
10
- - **Primary:** removed the duplicated/conflicting hover utilities (`hover:bg-primary/80` next to `hover:bg-primary/90`); Figma's hover state resolves to `#3785e0cc`, i.e. `bg-primary` at 80% opacity. Kept `hover:bg-primary/80` only.
11
- - **Destructive:** completely rebuilt. It previously mixed `text-destructive` and `text-white`, and stacked four different hover opacities (`/20`, `/30`, `/60`, `/90`) across light/dark. Figma's destructive is flat: `bg-destructive text-destructive-foreground`, hover `bg-destructive-hover` (`#ef4444`, already an existing token).
12
- - **Outline:** dropped the leftover `dark:bg-input/30 dark:border-input dark:hover:bg-input/50` and the duplicate `border`/`shadow-xs shadow-none` pair. Now `border border-border bg-background text-foreground`, hover `bg-background-hover`.
13
- - **Secondary:** hover changed from `hover:bg-secondary/80` to `hover:bg-background-button-hover` (`#e4e4e7`), matching the resolved Figma value and the same token Badge already uses for its secondary hover.
14
- - **Ghost:** dropped the implicit `bg-secondary`/`bg-muted` hover mix; now `text-foreground hover:bg-background-hover`, matching Figma exactly.
15
- - **Link:** was rendered with `p-0` (no padding box) and no hover treatment beyond `hover:underline`. Figma's Link symbol keeps the same padding box as every other variant and adds a `hover:bg-background-hover` wash in addition to the underline. Removed `p-0`.
16
- - Dropped `aria-expanded:*` variant styling that had no corresponding Figma state — components should express open/active state through `variant`/`class`, not baked into every variant.
17
-
18
- ### States
19
-
20
- - **Disabled:** was `disabled:opacity-50` (just dims whatever variant color). Figma switches every variant to the same flat `bg-muted`/`text-muted-foreground`/`border-transparent`, confirmed identical across Primary, Secondary, Outline, Ghost and Destructive. Moved to the shared base class so it applies uniformly.
21
- - **Focus:** ring was `focus-visible:ring-ring/50` (translucent). Figma's focus ring is a solid 2px ring in `chart-1` (`#afcef3`, = `primary-200`) plus a `border-ring` border — both already existing tokens. Now `focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-chart-1`.
22
-
23
- ### Sizing & Spacing
24
-
25
- - **Radius:** unified to `rounded-lg` (8px) for every size. Previously `sm` used a one-off `rounded-[min(var(--radius-md),10px)]` and only `lg`/`default` used `rounded-lg` — Figma uses the same 8px radius across all three sizes and both icon-only and labeled buttons.
26
- - **Font size:** `default`/`sm` were rendering at Tailwind's `text-sm` (14px) but Figma's token for those sizes is 12px (`text-xs` in this Tailwind scale). `lg` was `text-base` (16px) but Figma's large text token is 14px (`text-sm`). Fixed both.
27
- - **Icon size:** replaced the single blanket `[&_svg:not([class*='size-'])]:size-4` (16px for every size) with per-size rules: `size-3.5` (14px) for `sm`, `size-4` (16px) for `default`, `size-5` (20px) for `lg` — confirmed against Figma's lead/tail icon dimensions per size.
28
- - **Gap:** simplified nested Figma auto-layout spacing (2px flex gap + 2px label padding on each side ≈ 4px effective gap) down to a single `gap-1` (4px) on the root, applied uniformly across sizes.
29
- - **Horizontal padding:** `sm` uses `px-2` (8px), `default`/`lg` both use `px-2.5` (10px) — confirmed from Figma's resolved padding tokens (large's extra height comes from its bigger icon/font/fixed `h-10`, not extra horizontal padding).
30
-
31
- ### New Props
32
-
33
- - `leadIcon` / `tailIcon` / `badge` (`boolean`): render the `lead-icon` / `tail-icon` / `badge` named slots before/after the label. Auto-detected from slot presence if not explicitly passed — same pattern as Badge's `leadIcon`/`tailIcon`.
34
- - This replaces the previous implicit convention of dropping an icon in as a bare child with a `data-icon="inline-start"|"inline-end"` attribute and relying on `has-data-[icon=...]`/`has-[.badge:last-child]` selectors for spacing. No existing usages in the repo relied on that convention (grepped for `data-icon=`), so this is a clean cutover.
35
- - Docs updated: the "With badge" example now also sets `shape="sharp" size="sm"` on the nested `Badge`, matching the compact/square badge Figma nests inside a Button (`rounded-xs`, `px-1 py-0.5`) rather than Badge's own pill/default sizing.
36
-
37
- ### Tokens (`globals.css`)
38
-
39
- No new tokens were needed — every color Button uses already exists: `primary`/`primary-foreground`, `secondary`/`secondary-foreground`, `background`/`background-hover`/`background-button-hover`, `destructive`/`destructive-foreground`/`destructive-hover`, `muted`/`muted-foreground`, `border`, `ring`, `chart-1`.
40
-
41
- ## Unreleased
1
+ # Changelog for Button.astro
2
+
3
+ All notable changes to the `Button` component will be documented in this file.
4
+
5
+ ## Date 8th Sep 2026
6
+ ## Figma alignment (node 114-6897, prop table 7185-13418)
7
+
8
+ ### Variants
9
+
10
+ - **Primary:** removed the duplicated/conflicting hover utilities (`hover:bg-primary/80` next to `hover:bg-primary/90`); Figma's hover state resolves to `#3785e0cc`, i.e. `bg-primary` at 80% opacity. Kept `hover:bg-primary/80` only.
11
+ - **Destructive:** completely rebuilt. It previously mixed `text-destructive` and `text-white`, and stacked four different hover opacities (`/20`, `/30`, `/60`, `/90`) across light/dark. Figma's destructive is flat: `bg-destructive text-destructive-foreground`, hover `bg-destructive-hover` (`#ef4444`, already an existing token).
12
+ - **Outline:** dropped the leftover `dark:bg-input/30 dark:border-input dark:hover:bg-input/50` and the duplicate `border`/`shadow-xs shadow-none` pair. Now `border border-border bg-background text-foreground`, hover `bg-background-hover`.
13
+ - **Secondary:** hover changed from `hover:bg-secondary/80` to `hover:bg-background-button-hover` (`#e4e4e7`), matching the resolved Figma value and the same token Badge already uses for its secondary hover.
14
+ - **Ghost:** dropped the implicit `bg-secondary`/`bg-muted` hover mix; now `text-foreground hover:bg-background-hover`, matching Figma exactly.
15
+ - **Link:** was rendered with `p-0` (no padding box) and no hover treatment beyond `hover:underline`. Figma's Link symbol keeps the same padding box as every other variant and adds a `hover:bg-background-hover` wash in addition to the underline. Removed `p-0`.
16
+ - Dropped `aria-expanded:*` variant styling that had no corresponding Figma state — components should express open/active state through `variant`/`class`, not baked into every variant.
17
+
18
+ ### States
19
+
20
+ - **Disabled:** was `disabled:opacity-50` (just dims whatever variant color). Figma switches every variant to the same flat `bg-muted`/`text-muted-foreground`/`border-transparent`, confirmed identical across Primary, Secondary, Outline, Ghost and Destructive. Moved to the shared base class so it applies uniformly.
21
+ - **Focus:** ring was `focus-visible:ring-ring/50` (translucent). Figma's focus ring is a solid 2px ring in `chart-1` (`#afcef3`, = `primary-200`) plus a `border-ring` border — both already existing tokens. Now `focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-chart-1`.
22
+
23
+ ### Sizing & Spacing
24
+
25
+ - **Radius:** unified to `rounded-lg` (8px) for every size. Previously `sm` used a one-off `rounded-[min(var(--radius-md),10px)]` and only `lg`/`default` used `rounded-lg` — Figma uses the same 8px radius across all three sizes and both icon-only and labeled buttons.
26
+ - **Font size:** `default`/`sm` were rendering at Tailwind's `text-sm` (14px) but Figma's token for those sizes is 12px (`text-xs` in this Tailwind scale). `lg` was `text-base` (16px) but Figma's large text token is 14px (`text-sm`). Fixed both.
27
+ - **Icon size:** replaced the single blanket `[&_svg:not([class*='size-'])]:size-4` (16px for every size) with per-size rules: `size-3.5` (14px) for `sm`, `size-4` (16px) for `default`, `size-5` (20px) for `lg` — confirmed against Figma's lead/tail icon dimensions per size.
28
+ - **Gap:** simplified nested Figma auto-layout spacing (2px flex gap + 2px label padding on each side ≈ 4px effective gap) down to a single `gap-1` (4px) on the root, applied uniformly across sizes.
29
+ - **Horizontal padding:** `sm` uses `px-2` (8px), `default`/`lg` both use `px-2.5` (10px) — confirmed from Figma's resolved padding tokens (large's extra height comes from its bigger icon/font/fixed `h-10`, not extra horizontal padding).
30
+
31
+ ### New Props
32
+
33
+ - `leadIcon` / `tailIcon` / `badge` (`boolean`): render the `lead-icon` / `tail-icon` / `badge` named slots before/after the label. Auto-detected from slot presence if not explicitly passed — same pattern as Badge's `leadIcon`/`tailIcon`.
34
+ - This replaces the previous implicit convention of dropping an icon in as a bare child with a `data-icon="inline-start"|"inline-end"` attribute and relying on `has-data-[icon=...]`/`has-[.badge:last-child]` selectors for spacing. No existing usages in the repo relied on that convention (grepped for `data-icon=`), so this is a clean cutover.
35
+ - Docs updated: the "With badge" example now also sets `shape="sharp" size="sm"` on the nested `Badge`, matching the compact/square badge Figma nests inside a Button (`rounded-xs`, `px-1 py-0.5`) rather than Badge's own pill/default sizing.
36
+
37
+ ### Tokens (`globals.css`)
38
+
39
+ No new tokens were needed — every color Button uses already exists: `primary`/`primary-foreground`, `secondary`/`secondary-foreground`, `background`/`background-hover`/`background-button-hover`, `destructive`/`destructive-foreground`/`destructive-hover`, `muted`/`muted-foreground`, `border`, `ring`, `chart-1`.
40
+
41
+ ## Unreleased
@@ -1,2 +1,2 @@
1
- export { default as Button } from "./Button.astro";
2
-
1
+ export { default as Button } from "./Button.astro";
2
+
@@ -1,34 +1,34 @@
1
- # Changelog for ButtonGroup.astro
2
-
3
- All notable changes to the `ButtonGroup` component will be documented in this file.
4
-
5
- ## Date 8th Sep 2026
6
- ## Figma alignment (node 114-9882)
7
-
8
- ### Sizing & Spacing
9
-
10
- - **Radius fixed:** `Button.astro` was forcing `in-data-[slot=button-group]:rounded-md` (6px) on the `default`, `sm`, `lg`, and `icon-sm` sizes whenever a button sat inside a group, while `icon` and `icon-lg` had no such override. Figma's grouped item corners are unambiguously `--radius/rounded-lg` (8px, same token as `--radius-lg` in `globals.css`) across every size. Removed the override entirely — end-item corners on a `ButtonGroup` now render at 8px consistently, matching standalone `Button` and every size.
11
- - No changes were needed to `ButtonGroup.astro`'s own merge logic (`rounded-e-lg!`, `border-s-0`, etc.) — it already resolved to 8px correctly; the bug was solely in `Button.astro`'s per-size override.
12
-
13
- ### States (new, `Button.astro`, scoped via `in-data-[slot=button-group]:`)
14
-
15
- Previously, grouped buttons had no state styling of their own — they just inherited standalone `outline`-variant hover (`hover:bg-background-hover`) and the shared global focus ring. Figma's `Button Group` states are defined per-size in the `Button Group / Items` master symbols frame (node `114:11217`) — note the separate `States` showcase page (node `2597:6822`) had its `Hover`/`Focus` symbol instances swapped, so the master symbols frame was used as the authoritative source instead:
16
-
17
- - **Hover:** background becomes `bg-background-hover` (`#f4f4f5`, existing `--background-hover` token), border uses Figma's `accent` variable (`#ebf3fc`) — which doesn't match this codebase's `--accent` token (a neutral gray) but is identical to the existing `--badge-accent`/`--primary-50` token, so bound to `border-badge-accent` (same token/pattern `Badge.astro` already uses for its own `accent` variant). No shadow. New `in-data-[slot=button-group]:hover:*` rule on `Button.astro`.
18
- - **Focus-visible:** background stays `bg-background` (white, unchanged), border is `border-ring` (`#5f9de6`, existing `--ring` token), plus a 2px `ring-chart-1` shadow (the effect is literally named `border-focus` in the Figma file). This is **exactly** `Button.astro`'s existing global `focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-chart-1` rule — no grouped-context override needed; grouped and standalone buttons share identical focus-visible styling.
19
- - **Disabled:** unchanged — `bg-muted`/`text-muted-foreground`/`border-transparent` from `Button.astro`'s shared `disabled:` classes already matches Figma's grouped disabled state (`bg-muted`/`border-muted`/`text-muted-foreground`) visually.
20
- - **Default:** unchanged — Figma's grouped item (`bg-background`/`border-border`/`text-foreground`) is exactly `Button`'s existing `outline` variant, which is what every documented `ButtonGroup` usage already passes.
21
-
22
- ### Storybook & Docs (`_sections/button-group.astro`)
23
-
24
- - Added a "Disabled" preview block, alongside the existing `Preview`/`Vertical orientation`/`Sizes` sections, so the disabled state is visible in Storybook.
25
-
26
- ### Not changed (flagged, not acted on)
27
-
28
- A few things in Figma's `Button Group` variants don't match `Button`'s already-finalized standalone sizing from its own alignment pass, and read more like authoring artifacts in the Figma file than intentional grouped-only rules — left as-is rather than re-touching `Button.astro`'s validated standalone spacing:
29
-
30
- - Figma's grouped "Medium/Default" item uses 8px horizontal padding vs. standalone `Button` `default` size's 10px (`px-2.5`). Small and Large sizes match their standalone counterparts exactly, so this looks like one mistyped padding token in the Figma file.
31
- - Figma's grouped `lg` item shows a 6px icon/label gap vs. `Button`'s current `lg` gap of 4px (`gap-1`).
32
- - Figma's grouped icons are a flat 14px (text mode) / 16px (icon-only) regardless of size, vs. `Button`'s current per-size icon scaling (14/16/20 for sm/default/lg) — which the prior `Button` alignment pass deliberately validated against `Button`'s own (different) Figma variants.
33
-
34
- ## Unreleased
1
+ # Changelog for ButtonGroup.astro
2
+
3
+ All notable changes to the `ButtonGroup` component will be documented in this file.
4
+
5
+ ## Date 8th Sep 2026
6
+ ## Figma alignment (node 114-9882)
7
+
8
+ ### Sizing & Spacing
9
+
10
+ - **Radius fixed:** `Button.astro` was forcing `in-data-[slot=button-group]:rounded-md` (6px) on the `default`, `sm`, `lg`, and `icon-sm` sizes whenever a button sat inside a group, while `icon` and `icon-lg` had no such override. Figma's grouped item corners are unambiguously `--radius/rounded-lg` (8px, same token as `--radius-lg` in `globals.css`) across every size. Removed the override entirely — end-item corners on a `ButtonGroup` now render at 8px consistently, matching standalone `Button` and every size.
11
+ - No changes were needed to `ButtonGroup.astro`'s own merge logic (`rounded-e-lg!`, `border-s-0`, etc.) — it already resolved to 8px correctly; the bug was solely in `Button.astro`'s per-size override.
12
+
13
+ ### States (new, `Button.astro`, scoped via `in-data-[slot=button-group]:`)
14
+
15
+ Previously, grouped buttons had no state styling of their own — they just inherited standalone `outline`-variant hover (`hover:bg-background-hover`) and the shared global focus ring. Figma's `Button Group` states are defined per-size in the `Button Group / Items` master symbols frame (node `114:11217`) — note the separate `States` showcase page (node `2597:6822`) had its `Hover`/`Focus` symbol instances swapped, so the master symbols frame was used as the authoritative source instead:
16
+
17
+ - **Hover:** background becomes `bg-background-hover` (`#f4f4f5`, existing `--background-hover` token), border uses Figma's `accent` variable (`#ebf3fc`) — which doesn't match this codebase's `--accent` token (a neutral gray) but is identical to the existing `--badge-accent`/`--primary-50` token, so bound to `border-badge-accent` (same token/pattern `Badge.astro` already uses for its own `accent` variant). No shadow. New `in-data-[slot=button-group]:hover:*` rule on `Button.astro`.
18
+ - **Focus-visible:** background stays `bg-background` (white, unchanged), border is `border-ring` (`#5f9de6`, existing `--ring` token), plus a 2px `ring-chart-1` shadow (the effect is literally named `border-focus` in the Figma file). This is **exactly** `Button.astro`'s existing global `focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-chart-1` rule — no grouped-context override needed; grouped and standalone buttons share identical focus-visible styling.
19
+ - **Disabled:** unchanged — `bg-muted`/`text-muted-foreground`/`border-transparent` from `Button.astro`'s shared `disabled:` classes already matches Figma's grouped disabled state (`bg-muted`/`border-muted`/`text-muted-foreground`) visually.
20
+ - **Default:** unchanged — Figma's grouped item (`bg-background`/`border-border`/`text-foreground`) is exactly `Button`'s existing `outline` variant, which is what every documented `ButtonGroup` usage already passes.
21
+
22
+ ### Storybook & Docs (`_sections/button-group.astro`)
23
+
24
+ - Added a "Disabled" preview block, alongside the existing `Preview`/`Vertical orientation`/`Sizes` sections, so the disabled state is visible in Storybook.
25
+
26
+ ### Not changed (flagged, not acted on)
27
+
28
+ A few things in Figma's `Button Group` variants don't match `Button`'s already-finalized standalone sizing from its own alignment pass, and read more like authoring artifacts in the Figma file than intentional grouped-only rules — left as-is rather than re-touching `Button.astro`'s validated standalone spacing:
29
+
30
+ - Figma's grouped "Medium/Default" item uses 8px horizontal padding vs. standalone `Button` `default` size's 10px (`px-2.5`). Small and Large sizes match their standalone counterparts exactly, so this looks like one mistyped padding token in the Figma file.
31
+ - Figma's grouped `lg` item shows a 6px icon/label gap vs. `Button`'s current `lg` gap of 4px (`gap-1`).
32
+ - Figma's grouped icons are a flat 14px (text mode) / 16px (icon-only) regardless of size, vs. `Button`'s current per-size icon scaling (14/16/20 for sm/default/lg) — which the prior `Button` alignment pass deliberately validated against `Button`'s own (different) Figma variants.
33
+
34
+ ## Unreleased
@@ -1,3 +1,3 @@
1
- export { default as ButtonGroup } from "./ButtonGroup.astro";
2
- export { default as ButtonGroupSeparator } from "./ButtonGroupSeparator.astro";
3
- export { default as ButtonGroupText } from "./ButtonGroupText.astro";
1
+ export { default as ButtonGroup } from "./ButtonGroup.astro";
2
+ export { default as ButtonGroupSeparator } from "./ButtonGroupSeparator.astro";
3
+ export { default as ButtonGroupText } from "./ButtonGroupText.astro";