@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.
- package/package.json +1 -1
- package/src/components/accordion/CHANGELOG.md +41 -41
- package/src/components/accordion/index.ts +4 -4
- package/src/components/alert/CHANGELOG.md +5 -5
- package/src/components/alert/index.ts +4 -4
- package/src/components/avatar/CHANGELOG.md +44 -44
- package/src/components/avatar/index.ts +6 -6
- package/src/components/badge/CHANGELOG.md +49 -49
- package/src/components/badge/index.ts +2 -2
- package/src/components/breadcrumb/CHANGELOG.md +24 -24
- package/src/components/breadcrumb/index.ts +5 -5
- package/src/components/button/CHANGELOG.md +41 -41
- package/src/components/button/index.ts +2 -2
- package/src/components/button-group/CHANGELOG.md +34 -34
- package/src/components/button-group/index.ts +3 -3
- package/src/components/card/CHANGELOG.md +162 -119
- package/src/components/card/Card.astro +23 -8
- package/src/components/card/CardContent.astro +1 -1
- package/src/components/card/CardDescription.astro +1 -1
- package/src/components/card/CardMedia.astro +1 -1
- package/src/components/card/CardMediaActions.astro +21 -0
- package/src/components/card/CardMediaSelect.astro +21 -0
- package/src/components/card/index.ts +12 -10
- package/src/components/carousel/CHANGELOG.md +5 -5
- package/src/components/carousel/index.ts +3 -3
- package/src/components/checkbox/CHANGELOG.md +58 -58
- package/src/components/checkbox/Checkbox.astro +2 -2
- package/src/components/checkbox/index.ts +1 -1
- package/src/components/collapsible/CHANGELOG.md +5 -5
- package/src/components/collapsible/index.ts +4 -4
- package/src/components/combobox/CHANGELOG.md +27 -27
- package/src/components/combobox/index.ts +11 -11
- package/src/components/date/CHANGELOG.md +18 -18
- package/src/components/date/index.ts +2 -2
- package/src/components/dialog/CHANGELOG.md +39 -39
- package/src/components/dialog/index.ts +9 -9
- package/src/components/dropdown-menu/CHANGELOG.md +194 -194
- package/src/components/dropdown-menu/DropdownMenuItemContent.astro +79 -79
- package/src/components/dropdown-menu/DropdownMenuPortal.astro +13 -13
- package/src/components/dropdown-menu/DropdownMenuRadioGroup.astro +13 -13
- package/src/components/dropdown-menu/dropdown-menu-item-variants.ts +24 -24
- package/src/components/dropdown-menu/index.ts +12 -12
- package/src/components/field/CHANGELOG.md +33 -33
- package/src/components/field/index.ts +10 -10
- package/src/components/hover-card/CHANGELOG.md +20 -20
- package/src/components/hover-card/index.ts +3 -3
- package/src/components/input/CHANGELOG.md +29 -29
- package/src/components/input/index.ts +2 -2
- package/src/components/input-group/CHANGELOG.md +49 -49
- package/src/components/input-group/controlClasses.ts +2 -2
- package/src/components/input-group/index.ts +6 -6
- package/src/components/item/CHANGELOG.md +27 -27
- package/src/components/item/index.ts +10 -10
- package/src/components/kbd/CHANGELOG.md +5 -5
- package/src/components/kbd/index.ts +2 -2
- package/src/components/label/CHANGELOG.md +28 -28
- package/src/components/label/index.ts +2 -2
- package/src/components/link-group/CHANGELOG.md +75 -75
- package/src/components/link-group/index.ts +5 -5
- package/src/components/link-group/link-group-list-variants.ts +15 -15
- package/src/components/marquee/CHANGELOG.md +5 -5
- package/src/components/marquee/index.ts +2 -2
- package/src/components/native-select/CHANGELOG.md +5 -5
- package/src/components/native-select/NativeSelectOption.astro +9 -9
- package/src/components/native-select/index.ts +3 -3
- package/src/components/navigation-menu/CHANGELOG.md +63 -63
- package/src/components/navigation-menu/index.ts +10 -10
- package/src/components/organisms/lightning-sidebar-nav/CHANGELOG.md +50 -0
- package/src/components/organisms/lightning-sidebar-nav/LightningSidebarNav.astro +176 -0
- package/src/components/organisms/lightning-sidebar-nav/SidebarNav.astro +50 -0
- package/src/components/organisms/lightning-sidebar-nav/SidebarNavGroup.astro +74 -0
- package/src/components/organisms/lightning-sidebar-nav/SidebarNavItem.astro +94 -0
- package/src/components/organisms/lightning-sidebar-nav/SidebarNavProBadge.astro +26 -0
- package/src/components/organisms/lightning-sidebar-nav/SidebarNavSection.astro +71 -0
- package/src/components/organisms/lightning-sidebar-nav/SidebarNavSkeleton.astro +67 -0
- package/src/components/organisms/lightning-sidebar-nav/SidebarNavSubItem.astro +69 -0
- package/src/components/organisms/lightning-sidebar-nav/SidebarNavUsage.astro +78 -0
- package/src/components/organisms/lightning-sidebar-nav/SidebarNavWorkspaceAvatar.astro +46 -0
- package/src/components/organisms/lightning-sidebar-nav/SidebarNavWorkspaceSwitcher.astro +130 -0
- package/src/components/organisms/lightning-sidebar-nav/icons.ts +46 -0
- package/src/components/organisms/lightning-sidebar-nav/index.ts +18 -0
- package/src/components/organisms/lightning-sidebar-nav/types.ts +77 -0
- package/src/components/popover/CHANGELOG.md +20 -5
- package/src/components/popover/Popover.astro +1 -0
- package/src/components/popover/PopoverContent.astro +6 -5
- package/src/components/popover/PopoverHeader.astro +1 -1
- package/src/components/popover/PopoverTrigger.astro +7 -1
- package/src/components/popover/index.ts +7 -7
- package/src/components/radio-group/CHANGELOG.md +31 -9
- package/src/components/radio-group/RadioGroup.astro +1 -1
- package/src/components/radio-group/RadioGroupItem.astro +12 -3
- package/src/components/radio-group/index.ts +3 -3
- package/src/components/select/CHANGELOG.md +39 -39
- package/src/components/select/index.ts +8 -8
- package/src/components/separator/CHANGELOG.md +5 -5
- package/src/components/separator/index.ts +2 -2
- package/src/components/skeleton/CHANGELOG.md +5 -5
- package/src/components/skeleton/index.ts +1 -1
- package/src/components/slider/CHANGELOG.md +5 -5
- package/src/components/slider/index.ts +1 -1
- package/src/components/spinner/CHANGELOG.md +18 -5
- package/src/components/spinner/Spinner.astro +3 -2
- package/src/components/spinner/index.ts +1 -1
- package/src/components/sticky-surface/CHANGELOG.md +5 -5
- package/src/components/sticky-surface/index.ts +2 -2
- package/src/components/switch/CHANGELOG.md +29 -9
- package/src/components/switch/Switch.astro +4 -4
- package/src/components/switch/index.ts +1 -1
- package/src/components/table/CHANGELOG.md +24 -5
- package/src/components/table/Table.astro +120 -12
- package/src/components/table/TableBody.astro +1 -2
- package/src/components/table/TableBulkToolbar.astro +37 -0
- package/src/components/table/TableCell.astro +25 -1
- package/src/components/table/TableCellText.astro +17 -0
- package/src/components/table/TableColumnMenu.astro +50 -0
- package/src/components/table/TableEditableCell.astro +287 -0
- package/src/components/table/TableEmpty.astro +17 -0
- package/src/components/table/TableFolderCell.astro +38 -0
- package/src/components/table/TableFooter.astro +1 -1
- package/src/components/table/TableHead.astro +71 -2
- package/src/components/table/TableHeader.astro +1 -1
- package/src/components/table/TablePagination.astro +57 -0
- package/src/components/table/TableRow.astro +32 -1
- package/src/components/table/TableSelectAllBanner.astro +34 -0
- package/src/components/table/TableSelectCell.astro +50 -0
- package/src/components/table/TableSkeletonRow.astro +21 -0
- package/src/components/table/index.ts +19 -9
- package/src/components/table/table-cell-variants.ts +29 -0
- package/src/components/tabs/CHANGELOG.md +5 -5
- package/src/components/tabs/index.ts +6 -6
- package/src/components/textarea/CHANGELOG.md +22 -5
- package/src/components/textarea/Textarea.astro +25 -3
- package/src/components/textarea/index.ts +2 -2
- package/src/components/toggle/CHANGELOG.md +23 -5
- package/src/components/toggle/Toggle.astro +13 -1
- package/src/components/toggle/index.ts +1 -1
- package/src/components/toggle-group/CHANGELOG.md +18 -5
- package/src/components/toggle-group/ToggleGroup.astro +14 -2
- package/src/components/toggle-group/index.ts +2 -2
- package/src/components/tooltip/CHANGELOG.md +22 -5
- package/src/components/tooltip/Tooltip.astro +26 -0
- package/src/components/tooltip/TooltipContent.astro +34 -9
- package/src/components/tooltip/index.ts +3 -3
- package/src/lib/table-controller.ts +1090 -0
- package/src/lib/toggle-group-controller.ts +113 -113
- package/src/lib/toggle-shared.ts +27 -26
- package/src/lib/utils.ts +6 -6
- package/src/styles/globals.css +197 -177
|
@@ -1,28 +1,28 @@
|
|
|
1
|
-
# Changelog
|
|
2
|
-
|
|
3
|
-
All notable changes to the `Label` component will be documented in this file.
|
|
4
|
-
|
|
5
|
-
## Date 10th Sep 2026
|
|
6
|
-
## Figma alignment (node 7228-1290, prop table 7423-9892)
|
|
7
|
-
|
|
8
|
-
### Fixed
|
|
9
|
-
|
|
10
|
-
- Removed a copy-paste duplicate class string passed twice into `cn()`.
|
|
11
|
-
- Dropped `leading-none` on the label text — it collapsed the line-height to 1, whereas Figma's `text/md/md-medium` style specifies a 20px line-height, which Tailwind's `text-sm` already provides by default.
|
|
12
|
-
- Added explicit `text-foreground` for the default-state text color, matching Figma's `var(--foreground)` token (previously relied on ambient inherited color).
|
|
13
|
-
|
|
14
|
-
### Added
|
|
15
|
-
|
|
16
|
-
New props, matching Figma's Props Reference table:
|
|
17
|
-
|
|
18
|
-
- `supportiveText?: string` — optional secondary text rendered below the label.
|
|
19
|
-
- `showSupportiveText?: boolean` (default `false`) — shows the `supportiveText` line when both this and `supportiveText` are set.
|
|
20
|
-
- `showHintIcon?: boolean` (default `false`) — shows a small `CircleQuestionMark` icon (`@lucide/astro`) beside the label text.
|
|
21
|
-
|
|
22
|
-
Figma's table documents both new booleans defaulting to `true`, but they default to `false` here: defaulting to `true` would have made a hint icon appear next to every existing `<Label>` in the app that doesn't already opt out, since no current usage passes these props. Opt-in keeps every existing call site (including `Checkbox`'s and `FieldLabel`'s compositions) visually unchanged.
|
|
23
|
-
|
|
24
|
-
The `label` prop documented in Figma's table was intentionally not added — every caller in this repo supplies label text via `<slot />` (e.g. `FieldLabel.astro`), so the slot remains the sole content API.
|
|
25
|
-
|
|
26
|
-
The new layout (label text + icon row, supportive text below) only applies when `showHintIcon` or `showSupportiveText`+`supportiveText` are actually used (`hasExtras`); otherwise the label renders with the exact same classes as before (`flex items-center gap-2 ...`), so it doesn't disturb consumers that override the root layout themselves (e.g. the side-by-side custom composition in `Checkbox.astro`'s JSDoc preview).
|
|
27
|
-
|
|
28
|
-
No explicit `disabled` prop was added — disabled styling continues to come from the existing `group-data-[disabled=true]` / `peer-disabled` CSS hooks tied to a sibling control, unchanged.
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to the `Label` component will be documented in this file.
|
|
4
|
+
|
|
5
|
+
## Date 10th Sep 2026
|
|
6
|
+
## Figma alignment (node 7228-1290, prop table 7423-9892)
|
|
7
|
+
|
|
8
|
+
### Fixed
|
|
9
|
+
|
|
10
|
+
- Removed a copy-paste duplicate class string passed twice into `cn()`.
|
|
11
|
+
- Dropped `leading-none` on the label text — it collapsed the line-height to 1, whereas Figma's `text/md/md-medium` style specifies a 20px line-height, which Tailwind's `text-sm` already provides by default.
|
|
12
|
+
- Added explicit `text-foreground` for the default-state text color, matching Figma's `var(--foreground)` token (previously relied on ambient inherited color).
|
|
13
|
+
|
|
14
|
+
### Added
|
|
15
|
+
|
|
16
|
+
New props, matching Figma's Props Reference table:
|
|
17
|
+
|
|
18
|
+
- `supportiveText?: string` — optional secondary text rendered below the label.
|
|
19
|
+
- `showSupportiveText?: boolean` (default `false`) — shows the `supportiveText` line when both this and `supportiveText` are set.
|
|
20
|
+
- `showHintIcon?: boolean` (default `false`) — shows a small `CircleQuestionMark` icon (`@lucide/astro`) beside the label text.
|
|
21
|
+
|
|
22
|
+
Figma's table documents both new booleans defaulting to `true`, but they default to `false` here: defaulting to `true` would have made a hint icon appear next to every existing `<Label>` in the app that doesn't already opt out, since no current usage passes these props. Opt-in keeps every existing call site (including `Checkbox`'s and `FieldLabel`'s compositions) visually unchanged.
|
|
23
|
+
|
|
24
|
+
The `label` prop documented in Figma's table was intentionally not added — every caller in this repo supplies label text via `<slot />` (e.g. `FieldLabel.astro`), so the slot remains the sole content API.
|
|
25
|
+
|
|
26
|
+
The new layout (label text + icon row, supportive text below) only applies when `showHintIcon` or `showSupportiveText`+`supportiveText` are actually used (`hasExtras`); otherwise the label renders with the exact same classes as before (`flex items-center gap-2 ...`), so it doesn't disturb consumers that override the root layout themselves (e.g. the side-by-side custom composition in `Checkbox.astro`'s JSDoc preview).
|
|
27
|
+
|
|
28
|
+
No explicit `disabled` prop was added — disabled styling continues to come from the existing `group-data-[disabled=true]` / `peer-disabled` CSS hooks tied to a sibling control, unchanged.
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { default as Label } from "./Label.astro";
|
|
2
|
-
|
|
1
|
+
export { default as Label } from "./Label.astro";
|
|
2
|
+
|
|
@@ -1,75 +1,75 @@
|
|
|
1
|
-
# Changelog
|
|
2
|
-
|
|
3
|
-
All notable changes to the `LinkGroup` component will be documented in this file.
|
|
4
|
-
|
|
5
|
-
## Date 10th Sep 2026
|
|
6
|
-
## Figma alignment (node 2329-7942, item node 2166-5713)
|
|
7
|
-
|
|
8
|
-
`LinkGroup`/`LinkGroupItem`/`LinkGroupList`/`LinkGroupTitle` had not yet gone through a Figma alignment
|
|
9
|
-
pass — `@figmaUrl` still pointed at the old Bejamas source file, and most typography/padding/state classes
|
|
10
|
-
were either missing entirely or on the wrong scale.
|
|
11
|
-
|
|
12
|
-
### Variants
|
|
13
|
-
|
|
14
|
-
- Added an `orientation` prop to `LinkGroupList` (`"vertical" | "horizontal"`, default `"vertical"`) via a
|
|
15
|
-
new `link-group-list-variants.ts` (`cva`), matching Figma's `Orientation=Vertical/Horizontal` variant
|
|
16
|
-
property on the "Link Group" component — previously the list was hardcoded to a vertical `flex-col` with
|
|
17
|
-
no way to render Figma's Horizontal variant at all.
|
|
18
|
-
|
|
19
|
-
### Sizing & Spacing
|
|
20
|
-
|
|
21
|
-
- **`LinkGroupList`:** `gap-1` (4px) → `gap-2` (8px) — Figma's list uses `spacing/2` (8px) between items, not 4px.
|
|
22
|
-
- **`LinkGroupItem`:** the slotted `<a>` had no font-size, weight, line-height, padding, or radius at all —
|
|
23
|
-
added `text-sm font-medium leading-5` (Figma's `text/md/md-medium`, 14px/500/20px), `p-0.5 rounded-lg`
|
|
24
|
-
(Figma's `padding/p-0.5` = 2px, `radius/rounded-lg` = 8px).
|
|
25
|
-
- **`LinkGroupTitle`:** `text-lg` (18px) → `text-base` (16px) to match Figma's heading size; `text-current` →
|
|
26
|
-
`text-foreground` for explicit token binding instead of relying on inherited color.
|
|
27
|
-
- **Fixed a real spacing bug:** `LinkGroupTitle` had its own `mb-2` (8px) *on top of* `LinkGroup`'s wrapper
|
|
28
|
-
`gap-2` (8px) between title and list, doubling the heading-to-list gap to 16px instead of Figma's single
|
|
29
|
-
8px gap. Removed `mb-2` — `LinkGroup`'s flex `gap-2` now does this alone.
|
|
30
|
-
- `LinkGroup`'s wrapper gained `items-start` (was implicit `stretch`), matching Figma's root container and
|
|
31
|
-
preventing the title/list from stretching to an unintended width.
|
|
32
|
-
|
|
33
|
-
### States
|
|
34
|
-
|
|
35
|
-
- `LinkGroupItem`'s `<a>` kept its existing `hover:underline` (Default: no underline, Hover: underline, no
|
|
36
|
-
color/background change — already matched Figma exactly).
|
|
37
|
-
- Added `focus-visible:ring-2 focus-visible:ring-chart-1` (plus `outline-hidden`) — **not** documented in
|
|
38
|
-
Figma, which only shows Default/Hover for this component, but added for keyboard-accessibility parity
|
|
39
|
-
with every other interactive component in this library (Button/Input/DropdownMenuItem all have an explicit
|
|
40
|
-
focus-visible ring). See "Flagged for the designer" below.
|
|
41
|
-
|
|
42
|
-
### Tokens (`globals.css`)
|
|
43
|
-
|
|
44
|
-
- No new tokens needed — `radius-lg` and `muted-foreground`/`foreground` already existed and match Figma's
|
|
45
|
-
values exactly (`muted-foreground` = `#71717a`, `foreground` = `#09090b` in light mode). `p-0.5`, `gap-2`,
|
|
46
|
-
`text-sm`, `leading-5` all come from Tailwind's default scale, which happens to line up 1:1 with Figma's
|
|
47
|
-
`padding/spacing/font-size` variables here.
|
|
48
|
-
|
|
49
|
-
### Storybook & Docs
|
|
50
|
-
|
|
51
|
-
- Added `@figmaUrl`/`@component` JSDoc to `LinkGroupItem.astro` (didn't have one before) and repointed
|
|
52
|
-
`LinkGroup.astro`'s `@figmaUrl` from the old Bejamas file to the ClickLearn Lightning Design Library.
|
|
53
|
-
Added a "Horizontal orientation" example to `LinkGroup.astro`'s JSDoc.
|
|
54
|
-
- `apps/web/src/pages/storybook/_sections/link-group.astro`: added an `orientation="horizontal"` preview and
|
|
55
|
-
an `orientation` row to the `LinkGroupList` props table.
|
|
56
|
-
|
|
57
|
-
### Not changed
|
|
58
|
-
|
|
59
|
-
- Kept the existing "style the slotted `<a>` via `[&_a]:` selectors" approach on `LinkGroupItem` rather than
|
|
60
|
-
refactoring to a polymorphic `as="a"` component (like `Button`) — this was a visual alignment pass, not an
|
|
61
|
-
architecture change. Worth a future discussion if consumers want a self-rendering anchor.
|
|
62
|
-
- Did not add a `linkGroupLabel` boolean prop (Figma has one to toggle the heading) — Astro's `<slot>`
|
|
63
|
-
presence already handles "heading shown only if provided" for free; a boolean prop would be redundant here.
|
|
64
|
-
|
|
65
|
-
### Flagged for the designer / engineering (not addressed in this pass)
|
|
66
|
-
|
|
67
|
-
- The "Component / Link Group / Orientation" usage-example page in Figma shows a divider line under the
|
|
68
|
-
"Link group name" heading in its Vertical sample, but the actual master component (the one with the real
|
|
69
|
-
`Orientation` variant property) has no divider — heading, 8px gap, list. Followed the master component;
|
|
70
|
-
worth cleaning up the usage-example frame in Figma so it doesn't raise the same question next time.
|
|
71
|
-
- The Link component in Figma only documents Default/Hover states — no Focus state. Added a focus-visible
|
|
72
|
-
ring anyway for accessibility (see "States" above); worth adding an explicit documented Focus variant to
|
|
73
|
-
the Figma component so future passes don't have to guess the treatment.
|
|
74
|
-
|
|
75
|
-
## Unreleased
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to the `LinkGroup` component will be documented in this file.
|
|
4
|
+
|
|
5
|
+
## Date 10th Sep 2026
|
|
6
|
+
## Figma alignment (node 2329-7942, item node 2166-5713)
|
|
7
|
+
|
|
8
|
+
`LinkGroup`/`LinkGroupItem`/`LinkGroupList`/`LinkGroupTitle` had not yet gone through a Figma alignment
|
|
9
|
+
pass — `@figmaUrl` still pointed at the old Bejamas source file, and most typography/padding/state classes
|
|
10
|
+
were either missing entirely or on the wrong scale.
|
|
11
|
+
|
|
12
|
+
### Variants
|
|
13
|
+
|
|
14
|
+
- Added an `orientation` prop to `LinkGroupList` (`"vertical" | "horizontal"`, default `"vertical"`) via a
|
|
15
|
+
new `link-group-list-variants.ts` (`cva`), matching Figma's `Orientation=Vertical/Horizontal` variant
|
|
16
|
+
property on the "Link Group" component — previously the list was hardcoded to a vertical `flex-col` with
|
|
17
|
+
no way to render Figma's Horizontal variant at all.
|
|
18
|
+
|
|
19
|
+
### Sizing & Spacing
|
|
20
|
+
|
|
21
|
+
- **`LinkGroupList`:** `gap-1` (4px) → `gap-2` (8px) — Figma's list uses `spacing/2` (8px) between items, not 4px.
|
|
22
|
+
- **`LinkGroupItem`:** the slotted `<a>` had no font-size, weight, line-height, padding, or radius at all —
|
|
23
|
+
added `text-sm font-medium leading-5` (Figma's `text/md/md-medium`, 14px/500/20px), `p-0.5 rounded-lg`
|
|
24
|
+
(Figma's `padding/p-0.5` = 2px, `radius/rounded-lg` = 8px).
|
|
25
|
+
- **`LinkGroupTitle`:** `text-lg` (18px) → `text-base` (16px) to match Figma's heading size; `text-current` →
|
|
26
|
+
`text-foreground` for explicit token binding instead of relying on inherited color.
|
|
27
|
+
- **Fixed a real spacing bug:** `LinkGroupTitle` had its own `mb-2` (8px) *on top of* `LinkGroup`'s wrapper
|
|
28
|
+
`gap-2` (8px) between title and list, doubling the heading-to-list gap to 16px instead of Figma's single
|
|
29
|
+
8px gap. Removed `mb-2` — `LinkGroup`'s flex `gap-2` now does this alone.
|
|
30
|
+
- `LinkGroup`'s wrapper gained `items-start` (was implicit `stretch`), matching Figma's root container and
|
|
31
|
+
preventing the title/list from stretching to an unintended width.
|
|
32
|
+
|
|
33
|
+
### States
|
|
34
|
+
|
|
35
|
+
- `LinkGroupItem`'s `<a>` kept its existing `hover:underline` (Default: no underline, Hover: underline, no
|
|
36
|
+
color/background change — already matched Figma exactly).
|
|
37
|
+
- Added `focus-visible:ring-2 focus-visible:ring-chart-1` (plus `outline-hidden`) — **not** documented in
|
|
38
|
+
Figma, which only shows Default/Hover for this component, but added for keyboard-accessibility parity
|
|
39
|
+
with every other interactive component in this library (Button/Input/DropdownMenuItem all have an explicit
|
|
40
|
+
focus-visible ring). See "Flagged for the designer" below.
|
|
41
|
+
|
|
42
|
+
### Tokens (`globals.css`)
|
|
43
|
+
|
|
44
|
+
- No new tokens needed — `radius-lg` and `muted-foreground`/`foreground` already existed and match Figma's
|
|
45
|
+
values exactly (`muted-foreground` = `#71717a`, `foreground` = `#09090b` in light mode). `p-0.5`, `gap-2`,
|
|
46
|
+
`text-sm`, `leading-5` all come from Tailwind's default scale, which happens to line up 1:1 with Figma's
|
|
47
|
+
`padding/spacing/font-size` variables here.
|
|
48
|
+
|
|
49
|
+
### Storybook & Docs
|
|
50
|
+
|
|
51
|
+
- Added `@figmaUrl`/`@component` JSDoc to `LinkGroupItem.astro` (didn't have one before) and repointed
|
|
52
|
+
`LinkGroup.astro`'s `@figmaUrl` from the old Bejamas file to the ClickLearn Lightning Design Library.
|
|
53
|
+
Added a "Horizontal orientation" example to `LinkGroup.astro`'s JSDoc.
|
|
54
|
+
- `apps/web/src/pages/storybook/_sections/link-group.astro`: added an `orientation="horizontal"` preview and
|
|
55
|
+
an `orientation` row to the `LinkGroupList` props table.
|
|
56
|
+
|
|
57
|
+
### Not changed
|
|
58
|
+
|
|
59
|
+
- Kept the existing "style the slotted `<a>` via `[&_a]:` selectors" approach on `LinkGroupItem` rather than
|
|
60
|
+
refactoring to a polymorphic `as="a"` component (like `Button`) — this was a visual alignment pass, not an
|
|
61
|
+
architecture change. Worth a future discussion if consumers want a self-rendering anchor.
|
|
62
|
+
- Did not add a `linkGroupLabel` boolean prop (Figma has one to toggle the heading) — Astro's `<slot>`
|
|
63
|
+
presence already handles "heading shown only if provided" for free; a boolean prop would be redundant here.
|
|
64
|
+
|
|
65
|
+
### Flagged for the designer / engineering (not addressed in this pass)
|
|
66
|
+
|
|
67
|
+
- The "Component / Link Group / Orientation" usage-example page in Figma shows a divider line under the
|
|
68
|
+
"Link group name" heading in its Vertical sample, but the actual master component (the one with the real
|
|
69
|
+
`Orientation` variant property) has no divider — heading, 8px gap, list. Followed the master component;
|
|
70
|
+
worth cleaning up the usage-example frame in Figma so it doesn't raise the same question next time.
|
|
71
|
+
- The Link component in Figma only documents Default/Hover states — no Focus state. Added a focus-visible
|
|
72
|
+
ring anyway for accessibility (see "States" above); worth adding an explicit documented Focus variant to
|
|
73
|
+
the Figma component so future passes don't have to guess the treatment.
|
|
74
|
+
|
|
75
|
+
## Unreleased
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export { default as LinkGroup } from "./LinkGroup.astro";
|
|
2
|
-
export { default as LinkGroupTitle } from "./LinkGroupTitle.astro";
|
|
3
|
-
export { default as LinkGroupList } from "./LinkGroupList.astro";
|
|
4
|
-
export { default as LinkGroupItem } from "./LinkGroupItem.astro";
|
|
5
|
-
|
|
1
|
+
export { default as LinkGroup } from "./LinkGroup.astro";
|
|
2
|
+
export { default as LinkGroupTitle } from "./LinkGroupTitle.astro";
|
|
3
|
+
export { default as LinkGroupList } from "./LinkGroupList.astro";
|
|
4
|
+
export { default as LinkGroupItem } from "./LinkGroupItem.astro";
|
|
5
|
+
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { cva } from "class-variance-authority";
|
|
2
|
-
|
|
3
|
-
export const linkGroupListVariants = cva("flex gap-2", {
|
|
4
|
-
variants: {
|
|
5
|
-
orientation: {
|
|
6
|
-
vertical: "flex-col items-start",
|
|
7
|
-
horizontal: "flex-row items-start w-full",
|
|
8
|
-
},
|
|
9
|
-
},
|
|
10
|
-
defaultVariants: {
|
|
11
|
-
orientation: "vertical",
|
|
12
|
-
},
|
|
13
|
-
});
|
|
14
|
-
|
|
15
|
-
export type LinkGroupOrientation = "vertical" | "horizontal";
|
|
1
|
+
import { cva } from "class-variance-authority";
|
|
2
|
+
|
|
3
|
+
export const linkGroupListVariants = cva("flex gap-2", {
|
|
4
|
+
variants: {
|
|
5
|
+
orientation: {
|
|
6
|
+
vertical: "flex-col items-start",
|
|
7
|
+
horizontal: "flex-row items-start w-full",
|
|
8
|
+
},
|
|
9
|
+
},
|
|
10
|
+
defaultVariants: {
|
|
11
|
+
orientation: "vertical",
|
|
12
|
+
},
|
|
13
|
+
});
|
|
14
|
+
|
|
15
|
+
export type LinkGroupOrientation = "vertical" | "horizontal";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
# Changelog
|
|
2
|
-
|
|
3
|
-
All notable changes to the `Marquee` component will be documented in this file.
|
|
4
|
-
|
|
5
|
-
## Unreleased
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to the `Marquee` component will be documented in this file.
|
|
4
|
+
|
|
5
|
+
## Unreleased
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { default as Marquee } from "./Marquee.astro";
|
|
2
|
-
|
|
1
|
+
export { default as Marquee } from "./Marquee.astro";
|
|
2
|
+
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
# Changelog
|
|
2
|
-
|
|
3
|
-
All notable changes to the `NativeSelect` component will be documented in this file.
|
|
4
|
-
|
|
5
|
-
## Unreleased
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to the `NativeSelect` component will be documented in this file.
|
|
4
|
+
|
|
5
|
+
## Unreleased
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
---
|
|
2
|
-
import type { HTMLAttributes } from "astro/types";
|
|
3
|
-
|
|
4
|
-
interface Props extends HTMLAttributes<"option"> {}
|
|
5
|
-
|
|
6
|
-
const { ...rest } = Astro.props as Props;
|
|
7
|
-
---
|
|
8
|
-
|
|
9
|
-
<option data-slot="native-select-option" {...rest} class=""><slot /></option>
|
|
1
|
+
---
|
|
2
|
+
import type { HTMLAttributes } from "astro/types";
|
|
3
|
+
|
|
4
|
+
interface Props extends HTMLAttributes<"option"> {}
|
|
5
|
+
|
|
6
|
+
const { ...rest } = Astro.props as Props;
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
<option data-slot="native-select-option" {...rest} class=""><slot /></option>
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { default as NativeSelect } from "./NativeSelect.astro";
|
|
2
|
-
export { default as NativeSelectOption } from "./NativeSelectOption.astro";
|
|
3
|
-
export { default as NativeSelectOptGroup } from "./NativeSelectOptGroup.astro";
|
|
1
|
+
export { default as NativeSelect } from "./NativeSelect.astro";
|
|
2
|
+
export { default as NativeSelectOption } from "./NativeSelectOption.astro";
|
|
3
|
+
export { default as NativeSelectOptGroup } from "./NativeSelectOptGroup.astro";
|
|
@@ -1,63 +1,63 @@
|
|
|
1
|
-
# Changelog
|
|
2
|
-
|
|
3
|
-
All notable changes to the `NavigationMenu` component will be documented in this file.
|
|
4
|
-
|
|
5
|
-
## Date 10th Sep 2026 (follow-up)
|
|
6
|
-
## Fix: NavigationMenuItem's `align` prop was a no-op
|
|
7
|
-
|
|
8
|
-
### Fixed
|
|
9
|
-
|
|
10
|
-
- `NavigationMenuItem.astro`: added an `align?: "start" | "center" | "end"` prop, rendered as `data-align` on the `<li>` — mirrors how `value`/`data-value` already worked in this file. Previously the prop wasn't declared at all, so passing `align="..."` fell into the component's `{...rest}` spread and rendered as an inert, non-`data-*` HTML attribute that `@data-slot/navigation-menu`'s runtime never reads (it only reads `data-*`). The runtime already supported per-item alignment via `data-align` on either `NavigationMenuContent` (checked first) or `NavigationMenuItem` (checked as a fallback) — confirmed by reading its bundled source — so this was purely a missing pass-through in the Astro wrapper, not a runtime limitation. This also makes `NavigationMenuItem`'s entry in the live Storybook `PropsTable` (`"Content alignment relative to trigger (on NavigationMenuItem/NavigationMenuContent)"`) actually true for the first time.
|
|
11
|
-
- Caught via the new "Item alignment" Storybook preview lane, which showed all three `align` values opening in the identical position before this fix.
|
|
12
|
-
|
|
13
|
-
## Date 10th Sep 2026 (follow-up)
|
|
14
|
-
## Fix: link title/subtext font tokens (node 5548-10862)
|
|
15
|
-
|
|
16
|
-
### Fixed
|
|
17
|
-
|
|
18
|
-
- The designer re-bound the component's font variables in Figma, exposing two named text styles: `text/lg/lg-medium` (Inter, 500, 16px/24px line-height — used for every title/label) and `text/md/md-medium` (Inter, 500, 14px/20px line-height — used for every subtext/description line, now explicitly Medium weight where it was previously an unbound raw value).
|
|
19
|
-
- Audited the codebase's font bindings against these: `--font-sans` (Inter, via Astro's `fontProviders.google()`) and Tailwind's `font-medium` (500) already matched exactly, and Tailwind's `text-base`/`text-sm` utilities already match Figma's `text-base`/`text-md` sizes and line-heights value-for-value — no new CSS tokens were needed.
|
|
20
|
-
- The gap was in the repeated title/subtext markup pattern used everywhere a `NavigationMenuLink` holds a title + description (in `NavigationMenu.astro`'s JSDoc `@preview`/`@usage`/`@examples` blocks, and mirrored in `apps/web/src/pages/storybook/_sections/navigation-menu.astro`): titles used `leading-none font-medium` with no `text-base`, so they inherited `NavigationMenuLink`'s wrapper `text-sm` (14px) instead of the correct 16px, and subtext used `line-clamp-2 text-muted-foreground` with no `font-medium`, rendering at regular/400 weight instead of the now-explicit Medium/500. Fixed both: titles are now `text-base font-medium` (dropped `leading-none` — Tailwind's `text-base` already pairs a matching 24px/1.5 line-height by default), subtext is now `line-clamp-2 font-medium text-muted-foreground`.
|
|
21
|
-
- The JSDoc-only "Featured Card" example had its own drift (`text-lg` title, no `font-medium` on the description) — fixed to `text-base font-medium` / `text-sm font-medium text-muted-foreground` to match the Card variant's spec.
|
|
22
|
-
- `NavigationMenuLink.astro` and `NavigationMenuTrigger.astro` themselves were not changed — the trigger already matched `text/lg/lg-medium` exactly, and the link's base `text-sm` remains the correct default for plain text-only links (e.g. the "With Simple Links" example); only the title/subtext content pattern needed to explicitly opt into the right size/weight at the point of use.
|
|
23
|
-
|
|
24
|
-
## Date 10th Sep 2026 (follow-up)
|
|
25
|
-
## Fix: NavigationMenuIndicator painting over trigger text (node 5548-10862)
|
|
26
|
-
|
|
27
|
-
### Fixed
|
|
28
|
-
|
|
29
|
-
- `NavigationMenuItem.astro`: added `z-10` alongside the existing `relative` class. `NavigationMenuIndicator` is an absolutely-positioned `bg-muted/60` highlight the runtime slides to match the active trigger's exact bounding box; because it's `absolute z-0` and comes last in DOM order among the list's positioned children (`NavigationMenuList` is `relative`, each `NavigationMenuItem` was `relative` with no explicit `z-index`), it was painting on top of — not behind — the active/hovered trigger, washing its text out to a translucent gray instead of `--foreground`. The trigger's own text/background styling was already correct (verified via computed `color`, `opacity`, and `-webkit-text-fill-color`, all unaffected); this was purely a stacking-order bug from a second element overlapping it. Figma's design has no separate sliding-highlight layer at all — every hover/open highlight is baked into the trigger's own background classes — so restacking the indicator behind the trigger is a no-op visually (it's now fully covered by the trigger's own opaque/semi-opaque background) rather than a loss of functionality.
|
|
30
|
-
|
|
31
|
-
## Date 10th Sep 2026 (follow-up)
|
|
32
|
-
## Fix: trigger label color in the open state (node 5548-10862)
|
|
33
|
-
|
|
34
|
-
### Fixed
|
|
35
|
-
|
|
36
|
-
- `NavigationMenuTrigger.astro`: added an explicit `text-foreground` to `navigationMenuTriggerStyle`'s base classes. The trigger previously set no text color at all and relied on inheritance, which let the label read as a dimmer color once open (`data-open:bg-muted/50`). Figma binds the label to `--foreground` in every state (Closed/Default, Closed/Hover, Closed/Focus, Opened) — never a muted color — and every other trigger-style element in the system (`Button`'s `outline`/`ghost` variants) already binds color explicitly rather than relying on inheritance. This brings `NavigationMenuTrigger` in line with both.
|
|
37
|
-
|
|
38
|
-
## Date 10th Sep 2026
|
|
39
|
-
## Figma alignment (node 5548-10862)
|
|
40
|
-
|
|
41
|
-
### Sizing & Spacing
|
|
42
|
-
|
|
43
|
-
- **Trigger** (`NavigationMenuTrigger`): height `h-9` (36px) → `h-11` (44px); vertical padding `py-2` (8px) → `py-2.5` (10px); added an explicit `gap-1.5` (6px) between the label and the chevron, replacing the chevron's old `ml-1` (4px) margin — matches Figma's `padding/p-1-5` gap token exactly.
|
|
44
|
-
- **Link** (`NavigationMenuLink`): padding `p-2` (8px) → `p-3` (12px); icon↔content gap `gap-1.5` (6px) → `gap-4` (16px); alignment `items-center` → `items-start` (Figma's link items top-align icon + title + two-line subtext); radius `rounded-sm` (4px) → `rounded-lg` (8px), matching the popup surface radius and `DropdownMenuItem`'s established radius.
|
|
45
|
-
- **Popup/viewport chrome** (`NavigationMenuPositioner`, `NavigationMenuViewport`, and the no-viewport branch of `NavigationMenuContent`): `ring-1 ring-foreground/10` + generic `shadow` → `border border-border` + Figma's literal `card-light` effect (`shadow-[0px_1px_1px_0px_rgba(5,23,41,0.06)]`) — Figma uses a real 1px border, not a ring, same fix already applied to `DropdownMenuContent` in the dropdown-menu pass.
|
|
46
|
-
- **Content** (`NavigationMenuContent`): padding `p-2 pr-2.5` (asymmetric, scrollbar-compensated) → uniform `p-2` (8px), matching Figma's content padding exactly.
|
|
47
|
-
|
|
48
|
-
### Docs
|
|
49
|
-
|
|
50
|
-
- `NavigationMenu.astro`'s "Featured Card" `@examples` block switched from a gradient fill (`bg-gradient-to-b from-muted/50 to-muted`, `rounded-md`) to a solid `bg-accent rounded-lg` fill, matching the structure of Figma's featured-card highlight (a flat accent-colored panel, not a gradient).
|
|
51
|
-
|
|
52
|
-
### Tokens
|
|
53
|
-
|
|
54
|
-
- No new tokens added. `popover`, `border`, `muted-foreground`, and `ring` (`primary-400`) were already bound correctly and needed no change.
|
|
55
|
-
- **Known drift (not fixed in this pass):** Figma's `accent` variable for the featured-card highlight is `#ebf3fc` (light blue); the codebase's `--accent` token (`globals.css`) is a near-white gray (`oklch(0.97 0 0)`). Left as-is per design decision — the "Featured Card" example above uses `bg-accent` structurally, so it will pick up the correct color automatically whenever `--accent` is revisited as its own task.
|
|
56
|
-
|
|
57
|
-
### Flagged for the designer / engineering (not addressed in this pass)
|
|
58
|
-
|
|
59
|
-
- Figma's `showIcon`/`showTitle`/`showSubtext` booleans on the "Navigation Menu" component are Figma-prototyping variants, not real component props — Astro's slot-based composition shows/hides content by presence in the slot, not via a boolean prop. No action needed unless a named-slot pattern (e.g. `<slot name="icon">`) is specifically wanted.
|
|
60
|
-
- The new 44px trigger height doesn't correspond to any size in the shared `Button` scale (`sm`=32px, `default`=36px, `lg`=40px, used by `DropdownMenuTrigger`) — currently bespoke to `NavigationMenuTrigger`. Worth a deliberate call on whether that should become a reusable `Button` size.
|
|
61
|
-
- `NavigationMenuTrigger.astro` calls `cva()` with no `variants` map (just a base-string wrapper) — fine while the trigger has no real variants, but if Figma introduces trigger variants later, extend via the established `<component>-<part>-variants.ts` convention (see `dropdown-menu-item-variants.ts`, `link-group-list-variants.ts`) rather than inline `data-[...]:` selectors.
|
|
62
|
-
|
|
63
|
-
## Unreleased
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to the `NavigationMenu` component will be documented in this file.
|
|
4
|
+
|
|
5
|
+
## Date 10th Sep 2026 (follow-up)
|
|
6
|
+
## Fix: NavigationMenuItem's `align` prop was a no-op
|
|
7
|
+
|
|
8
|
+
### Fixed
|
|
9
|
+
|
|
10
|
+
- `NavigationMenuItem.astro`: added an `align?: "start" | "center" | "end"` prop, rendered as `data-align` on the `<li>` — mirrors how `value`/`data-value` already worked in this file. Previously the prop wasn't declared at all, so passing `align="..."` fell into the component's `{...rest}` spread and rendered as an inert, non-`data-*` HTML attribute that `@data-slot/navigation-menu`'s runtime never reads (it only reads `data-*`). The runtime already supported per-item alignment via `data-align` on either `NavigationMenuContent` (checked first) or `NavigationMenuItem` (checked as a fallback) — confirmed by reading its bundled source — so this was purely a missing pass-through in the Astro wrapper, not a runtime limitation. This also makes `NavigationMenuItem`'s entry in the live Storybook `PropsTable` (`"Content alignment relative to trigger (on NavigationMenuItem/NavigationMenuContent)"`) actually true for the first time.
|
|
11
|
+
- Caught via the new "Item alignment" Storybook preview lane, which showed all three `align` values opening in the identical position before this fix.
|
|
12
|
+
|
|
13
|
+
## Date 10th Sep 2026 (follow-up)
|
|
14
|
+
## Fix: link title/subtext font tokens (node 5548-10862)
|
|
15
|
+
|
|
16
|
+
### Fixed
|
|
17
|
+
|
|
18
|
+
- The designer re-bound the component's font variables in Figma, exposing two named text styles: `text/lg/lg-medium` (Inter, 500, 16px/24px line-height — used for every title/label) and `text/md/md-medium` (Inter, 500, 14px/20px line-height — used for every subtext/description line, now explicitly Medium weight where it was previously an unbound raw value).
|
|
19
|
+
- Audited the codebase's font bindings against these: `--font-sans` (Inter, via Astro's `fontProviders.google()`) and Tailwind's `font-medium` (500) already matched exactly, and Tailwind's `text-base`/`text-sm` utilities already match Figma's `text-base`/`text-md` sizes and line-heights value-for-value — no new CSS tokens were needed.
|
|
20
|
+
- The gap was in the repeated title/subtext markup pattern used everywhere a `NavigationMenuLink` holds a title + description (in `NavigationMenu.astro`'s JSDoc `@preview`/`@usage`/`@examples` blocks, and mirrored in `apps/web/src/pages/storybook/_sections/navigation-menu.astro`): titles used `leading-none font-medium` with no `text-base`, so they inherited `NavigationMenuLink`'s wrapper `text-sm` (14px) instead of the correct 16px, and subtext used `line-clamp-2 text-muted-foreground` with no `font-medium`, rendering at regular/400 weight instead of the now-explicit Medium/500. Fixed both: titles are now `text-base font-medium` (dropped `leading-none` — Tailwind's `text-base` already pairs a matching 24px/1.5 line-height by default), subtext is now `line-clamp-2 font-medium text-muted-foreground`.
|
|
21
|
+
- The JSDoc-only "Featured Card" example had its own drift (`text-lg` title, no `font-medium` on the description) — fixed to `text-base font-medium` / `text-sm font-medium text-muted-foreground` to match the Card variant's spec.
|
|
22
|
+
- `NavigationMenuLink.astro` and `NavigationMenuTrigger.astro` themselves were not changed — the trigger already matched `text/lg/lg-medium` exactly, and the link's base `text-sm` remains the correct default for plain text-only links (e.g. the "With Simple Links" example); only the title/subtext content pattern needed to explicitly opt into the right size/weight at the point of use.
|
|
23
|
+
|
|
24
|
+
## Date 10th Sep 2026 (follow-up)
|
|
25
|
+
## Fix: NavigationMenuIndicator painting over trigger text (node 5548-10862)
|
|
26
|
+
|
|
27
|
+
### Fixed
|
|
28
|
+
|
|
29
|
+
- `NavigationMenuItem.astro`: added `z-10` alongside the existing `relative` class. `NavigationMenuIndicator` is an absolutely-positioned `bg-muted/60` highlight the runtime slides to match the active trigger's exact bounding box; because it's `absolute z-0` and comes last in DOM order among the list's positioned children (`NavigationMenuList` is `relative`, each `NavigationMenuItem` was `relative` with no explicit `z-index`), it was painting on top of — not behind — the active/hovered trigger, washing its text out to a translucent gray instead of `--foreground`. The trigger's own text/background styling was already correct (verified via computed `color`, `opacity`, and `-webkit-text-fill-color`, all unaffected); this was purely a stacking-order bug from a second element overlapping it. Figma's design has no separate sliding-highlight layer at all — every hover/open highlight is baked into the trigger's own background classes — so restacking the indicator behind the trigger is a no-op visually (it's now fully covered by the trigger's own opaque/semi-opaque background) rather than a loss of functionality.
|
|
30
|
+
|
|
31
|
+
## Date 10th Sep 2026 (follow-up)
|
|
32
|
+
## Fix: trigger label color in the open state (node 5548-10862)
|
|
33
|
+
|
|
34
|
+
### Fixed
|
|
35
|
+
|
|
36
|
+
- `NavigationMenuTrigger.astro`: added an explicit `text-foreground` to `navigationMenuTriggerStyle`'s base classes. The trigger previously set no text color at all and relied on inheritance, which let the label read as a dimmer color once open (`data-open:bg-muted/50`). Figma binds the label to `--foreground` in every state (Closed/Default, Closed/Hover, Closed/Focus, Opened) — never a muted color — and every other trigger-style element in the system (`Button`'s `outline`/`ghost` variants) already binds color explicitly rather than relying on inheritance. This brings `NavigationMenuTrigger` in line with both.
|
|
37
|
+
|
|
38
|
+
## Date 10th Sep 2026
|
|
39
|
+
## Figma alignment (node 5548-10862)
|
|
40
|
+
|
|
41
|
+
### Sizing & Spacing
|
|
42
|
+
|
|
43
|
+
- **Trigger** (`NavigationMenuTrigger`): height `h-9` (36px) → `h-11` (44px); vertical padding `py-2` (8px) → `py-2.5` (10px); added an explicit `gap-1.5` (6px) between the label and the chevron, replacing the chevron's old `ml-1` (4px) margin — matches Figma's `padding/p-1-5` gap token exactly.
|
|
44
|
+
- **Link** (`NavigationMenuLink`): padding `p-2` (8px) → `p-3` (12px); icon↔content gap `gap-1.5` (6px) → `gap-4` (16px); alignment `items-center` → `items-start` (Figma's link items top-align icon + title + two-line subtext); radius `rounded-sm` (4px) → `rounded-lg` (8px), matching the popup surface radius and `DropdownMenuItem`'s established radius.
|
|
45
|
+
- **Popup/viewport chrome** (`NavigationMenuPositioner`, `NavigationMenuViewport`, and the no-viewport branch of `NavigationMenuContent`): `ring-1 ring-foreground/10` + generic `shadow` → `border border-border` + Figma's literal `card-light` effect (`shadow-[0px_1px_1px_0px_rgba(5,23,41,0.06)]`) — Figma uses a real 1px border, not a ring, same fix already applied to `DropdownMenuContent` in the dropdown-menu pass.
|
|
46
|
+
- **Content** (`NavigationMenuContent`): padding `p-2 pr-2.5` (asymmetric, scrollbar-compensated) → uniform `p-2` (8px), matching Figma's content padding exactly.
|
|
47
|
+
|
|
48
|
+
### Docs
|
|
49
|
+
|
|
50
|
+
- `NavigationMenu.astro`'s "Featured Card" `@examples` block switched from a gradient fill (`bg-gradient-to-b from-muted/50 to-muted`, `rounded-md`) to a solid `bg-accent rounded-lg` fill, matching the structure of Figma's featured-card highlight (a flat accent-colored panel, not a gradient).
|
|
51
|
+
|
|
52
|
+
### Tokens
|
|
53
|
+
|
|
54
|
+
- No new tokens added. `popover`, `border`, `muted-foreground`, and `ring` (`primary-400`) were already bound correctly and needed no change.
|
|
55
|
+
- **Known drift (not fixed in this pass):** Figma's `accent` variable for the featured-card highlight is `#ebf3fc` (light blue); the codebase's `--accent` token (`globals.css`) is a near-white gray (`oklch(0.97 0 0)`). Left as-is per design decision — the "Featured Card" example above uses `bg-accent` structurally, so it will pick up the correct color automatically whenever `--accent` is revisited as its own task.
|
|
56
|
+
|
|
57
|
+
### Flagged for the designer / engineering (not addressed in this pass)
|
|
58
|
+
|
|
59
|
+
- Figma's `showIcon`/`showTitle`/`showSubtext` booleans on the "Navigation Menu" component are Figma-prototyping variants, not real component props — Astro's slot-based composition shows/hides content by presence in the slot, not via a boolean prop. No action needed unless a named-slot pattern (e.g. `<slot name="icon">`) is specifically wanted.
|
|
60
|
+
- The new 44px trigger height doesn't correspond to any size in the shared `Button` scale (`sm`=32px, `default`=36px, `lg`=40px, used by `DropdownMenuTrigger`) — currently bespoke to `NavigationMenuTrigger`. Worth a deliberate call on whether that should become a reusable `Button` size.
|
|
61
|
+
- `NavigationMenuTrigger.astro` calls `cva()` with no `variants` map (just a base-string wrapper) — fine while the trigger has no real variants, but if Figma introduces trigger variants later, extend via the established `<component>-<part>-variants.ts` convention (see `dropdown-menu-item-variants.ts`, `link-group-list-variants.ts`) rather than inline `data-[...]:` selectors.
|
|
62
|
+
|
|
63
|
+
## Unreleased
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
export { default as NavigationMenu } from "./NavigationMenu.astro";
|
|
2
|
-
export { default as NavigationMenuList } from "./NavigationMenuList.astro";
|
|
3
|
-
export { default as NavigationMenuItem } from "./NavigationMenuItem.astro";
|
|
4
|
-
export { default as NavigationMenuTrigger } from "./NavigationMenuTrigger.astro";
|
|
5
|
-
export { default as NavigationMenuContent } from "./NavigationMenuContent.astro";
|
|
6
|
-
export { default as NavigationMenuPositioner } from "./NavigationMenuPositioner.astro";
|
|
7
|
-
export { default as NavigationMenuViewport } from "./NavigationMenuViewport.astro";
|
|
8
|
-
export { default as NavigationMenuLink } from "./NavigationMenuLink.astro";
|
|
9
|
-
export { default as NavigationMenuIndicator } from "./NavigationMenuIndicator.astro";
|
|
10
|
-
export { navigationMenuTriggerStyle } from "./NavigationMenuTrigger.astro";
|
|
1
|
+
export { default as NavigationMenu } from "./NavigationMenu.astro";
|
|
2
|
+
export { default as NavigationMenuList } from "./NavigationMenuList.astro";
|
|
3
|
+
export { default as NavigationMenuItem } from "./NavigationMenuItem.astro";
|
|
4
|
+
export { default as NavigationMenuTrigger } from "./NavigationMenuTrigger.astro";
|
|
5
|
+
export { default as NavigationMenuContent } from "./NavigationMenuContent.astro";
|
|
6
|
+
export { default as NavigationMenuPositioner } from "./NavigationMenuPositioner.astro";
|
|
7
|
+
export { default as NavigationMenuViewport } from "./NavigationMenuViewport.astro";
|
|
8
|
+
export { default as NavigationMenuLink } from "./NavigationMenuLink.astro";
|
|
9
|
+
export { default as NavigationMenuIndicator } from "./NavigationMenuIndicator.astro";
|
|
10
|
+
export { navigationMenuTriggerStyle } from "./NavigationMenuTrigger.astro";
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to the `LightningSidebarNav` organism will be documented in this file.
|
|
4
|
+
|
|
5
|
+
## Unreleased
|
|
6
|
+
|
|
7
|
+
### Added
|
|
8
|
+
|
|
9
|
+
- New **Organisms** tier (`packages/ui/src/components/organisms/`). `LightningSidebarNav` is the first organism, composed from existing components: Avatar, DropdownMenu, Collapsible, Badge, Separator, Skeleton and Button.
|
|
10
|
+
- `LightningSidebarNav`: renders the whole sidebar from JSON-serialisable backend data (`workspace`, `workspaces`, `sections`, `footerItems`, `usage`, `upgrade`, `loading`).
|
|
11
|
+
- The active item is resolved from `activeId`, or the longest segment-prefix match of `currentPath` (defaults to `Astro.url.pathname`). It gets `aria-current="page"`.
|
|
12
|
+
- Groups containing the active link open automatically.
|
|
13
|
+
- Composable parts for custom layouts:
|
|
14
|
+
- `SidebarNav`: the shell
|
|
15
|
+
- `SidebarNavWorkspaceSwitcher`
|
|
16
|
+
- `SidebarNavSection`: `density` is `default` or `compact`, with an optional category `label`
|
|
17
|
+
- `SidebarNavItem`
|
|
18
|
+
- `SidebarNavGroup`
|
|
19
|
+
- `SidebarNavSubItem`
|
|
20
|
+
- `SidebarNavUsage`
|
|
21
|
+
- `SidebarNavSkeleton`
|
|
22
|
+
- `SidebarNavProBadge`
|
|
23
|
+
- `SidebarNavWorkspaceAvatar`
|
|
24
|
+
- `icons.ts`: a string → Lucide registry so backend data can name icons (`"house"`, `"video"`, …).
|
|
25
|
+
- `sidebar-nav:workspace-change` event (`{ id }`, bubbles, cancelable). Fired when a workspace is picked. If the workspace has an `href` and the event isn't cancelled, the browser navigates there.
|
|
26
|
+
|
|
27
|
+
### Figma alignment (node 7513:60)
|
|
28
|
+
|
|
29
|
+
- **Group Item:**
|
|
30
|
+
- Default: `muted-foreground`, medium weight.
|
|
31
|
+
- Hover: `bg-muted`, foreground, semibold.
|
|
32
|
+
- Focus: 1px `sidebar-ring` inset ring.
|
|
33
|
+
- Active: `sidebar-accent` fill plus semibold `sidebar-accent-foreground`. Active is never shown by colour alone.
|
|
34
|
+
- **.nav item:** 12px medium label against a 1px guide rail at 7.5px. When active, a darker 28px rail segment is drawn over it and the label uses `sidebar-accent-foreground`.
|
|
35
|
+
- **Pro badge:** `Badge variant="accent" size="sm"` with a Lucide `zap` tail icon.
|
|
36
|
+
- **Skeleton:** the workspace switcher stays real. Rows are a 16px square plus an 80px bar.
|
|
37
|
+
- **Spacing:** primary list rows are 12px apart and footer links 2px apart. Separators take 16px of vertical space.
|
|
38
|
+
|
|
39
|
+
### Tokens (`globals.css`)
|
|
40
|
+
|
|
41
|
+
- Mapped the previously unused `--sidebar*` variables in `@theme inline`, which gives utilities like `bg-sidebar` and `text-sidebar-accent-foreground`.
|
|
42
|
+
- Aligned the light values to Figma:
|
|
43
|
+
- `--sidebar`: zinc-50
|
|
44
|
+
- `--sidebar-accent`: primary-50
|
|
45
|
+
- `--sidebar-accent-foreground`: primary-950
|
|
46
|
+
- `--sidebar-border`: `--border`
|
|
47
|
+
- `--sidebar-ring`: `--ring`
|
|
48
|
+
- Dark mode uses a primary-tinted accent.
|
|
49
|
+
- Added `--sidebar-rail` (zinc-300 light / 15% white dark) for the sub-item guide line.
|
|
50
|
+
- The shared `--accent` token is unchanged.
|