@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,58 +1,58 @@
|
|
|
1
|
-
# Changelog
|
|
2
|
-
|
|
3
|
-
All notable changes to the `Checkbox` component will be documented in this file.
|
|
4
|
-
|
|
5
|
-
## 2026-09-09 — Figma alignment (ClickLearn Lightning Design Library, node `46-976`)
|
|
6
|
-
|
|
7
|
-
Checkbox had never been touched by a Figma-alignment pass and was still the original Bejamas import. This pass added the missing Size and Indeterminate variants documented in Figma, fixed a real disabled-state visual mismatch, and cleaned up dead/inconsistent code found along the way.
|
|
8
|
-
|
|
9
|
-
### Added
|
|
10
|
-
|
|
11
|
-
- `size?: "default" | "lg"` — `default` is the existing 16px box (unchanged), `lg` is a new 20px box, matching Figma's two size variants (Figma's own variant was named "Small"; per your call it's being renamed to "Default" in Figma to match this prop, rather than the other way around).
|
|
12
|
-
- `indeterminate?: boolean` — shows a dash icon (matching Figma's Indeterminate type) instead of the checkmark. Since `.indeterminate` is a DOM-only property with no HTML attribute equivalent, this is implemented as a `data-indeterminate` marker plus a small inline `<script>` that sets the real native property on load — everything else (styling, showing/hiding the dash) reacts to the standard CSS `:indeterminate` pseudo-class, so it behaves like a genuine indeterminate checkbox (e.g. clicking it clears indeterminate per native browser behavior), not just a visual approximation.
|
|
13
|
-
- New `checkboxVariants`/`indicatorVariants` (via `cva`) replacing the old single flat class string, to support the two sizes cleanly.
|
|
14
|
-
|
|
15
|
-
### Fixed
|
|
16
|
-
|
|
17
|
-
- Disabled state: was `disabled:opacity-50` (uniformly fading everything, including a checked box's blue to a washed-out blue). Figma specifies the box background becomes `bg-muted` (light gray) when disabled — fixed to match, with the indicator icon separately switching to `peer-disabled:text-muted-foreground` so a disabled+checked box reads as gray, not faded blue.
|
|
18
|
-
- `focus-visible:ring-[3px]` (arbitrary value) → `focus-visible:ring-3` (standard Tailwind scale utility, same 3px result, consistent with every other component's focus ring).
|
|
19
|
-
- Removed dead `data-checked:*` utility classes (`data-checked:bg-primary`, etc.) — nothing in this component has ever set a `data-checked` attribute (no JS at all besides the new indeterminate script), so these were inert leftovers from a different origin.
|
|
20
|
-
- Fixed the component's own JSDoc `@preview` block, which used `defaultChecked` (not a real prop — this is a static-rendered Astro component, there's no client state) instead of the native `checked` attribute the storybook docs page and all real usage already correctly use.
|
|
21
|
-
- Updated `@figmaUrl` from the old Bejamas file to the ClickLearn Lightning Design Library link.
|
|
22
|
-
|
|
23
|
-
### Notes
|
|
24
|
-
|
|
25
|
-
- Figma's "Checkbox Combo" (checkbox + label + description) is already fully covered by the existing `Field`/`FieldContent`/`FieldLabel`/`FieldDescription` components — no new component was added for it.
|
|
26
|
-
- Figma also showed a Hover state — excluded per your call; not necessary, and being removed from Figma too.
|
|
27
|
-
- The component's own wrapping `<label>` + `<slot/>`, used alongside a sibling `<Label for="id">` in all existing examples, was left as-is — both work correctly (`for` targets by id regardless of DOM nesting), not a bug.
|
|
28
|
-
- All values are token-based (`--primary`, `--muted`, `--border`, `--input`, `--ring`, `--destructive`, `--radius-sm` from `globals.css`) — no hardcoded arbitrary values.
|
|
29
|
-
|
|
30
|
-
## 2026-09-09 — Docs: checkbox/label/description alignment + token colors
|
|
31
|
-
|
|
32
|
-
### Fixed
|
|
33
|
-
|
|
34
|
-
- "With description" demo (`checkbox.astro` docs page and `Checkbox.astro`'s own JSDoc `@preview`): migrated from a hand-rolled `<div class="grid gap-2">` + plain `Label` to `Field`/`FieldContent`/`FieldLabel`/`FieldDescription`. The plain `Label` renders at `leading-none` (14px line-height for `text-sm`) — *shorter* than the 16px checkbox itself — so `items-start` always left the checkbox visibly overhanging the label. `FieldLabel` uses `leading-snug` (19.25px) and, combined with the `Field` alignment fix (see `field`'s changelog), now centers the checkbox against the label to within a sub-pixel difference. Verified live via `getBoundingClientRect()`, not just visually.
|
|
35
|
-
- "Selectable card" demo: same root cause (a hand-rolled `leading-none` title paragraph). Since this demo needs to stay a single clickable `<Label>` card (not `Field`, which isn't a label and wouldn't preserve click-anywhere-on-card behavior), fixed it directly: title paragraph `leading-none` → `leading-5` (20px — see the later entry below for why this specific value, and why it changed from an initial `leading-snug` guess).
|
|
36
|
-
- "Selectable card" colors: replaced hardcoded Tailwind palette colors (`border-blue-600`, `bg-blue-50`, `dark:border-blue-900`, `dark:bg-blue-950`) with token-based equivalents (`border-primary/30`, `bg-primary/5`, `dark:border-primary/20`, `dark:bg-primary/10` — matching the exact opacity convention `FieldLabel` already uses for its own `has-data-checked` state). Also removed the now-redundant `checked:border-blue-600 checked:bg-blue-600 ...` override on the `Checkbox` instance itself — unnecessary since the component's own default checked state is already `bg-primary`/`border-primary`.
|
|
37
|
-
|
|
38
|
-
Note: this entry originally also added `class="mt-px"` directly on the `Checkbox` instance as the alignment nudge. That was wrong and got fixed in the next entry below — see that entry for why and what replaced it.
|
|
39
|
-
|
|
40
|
-
## 2026-09-09 — Fixed checkbox/icon desync, disabled-label reflection, and icon stroke geometry
|
|
41
|
-
|
|
42
|
-
### Fixed
|
|
43
|
-
|
|
44
|
-
- **Checkbox+icon desync bug**, introduced by the previous entry's `class="mt-px"` fix: that class landed on the `<input>` only (`Checkbox`'s public `class` prop merges onto the input element), while the checkmark/dash icon is a separately-positioned `absolute inset-0` overlay on a *different* wrapping `<span>` that never moved. Net effect: the box border shifted 1px down to align with the label, but the icon inside it stayed put — looking like the checkmark was "pushed upward" inside the box, and the checkbox still didn't read as properly centered overall.
|
|
45
|
-
- Fixed by adding `data-slot="checkbox"` to the component's outermost `<label>`, so the nudge can target the whole box+icon unit atomically instead of the input alone. Updated `Field.astro`'s alignment selector (`horizontal`/`responsive` variants) to match `[data-slot=checkbox]` (and `RadioGroupItem`'s existing `[data-slot=radio-group-item]`) instead of a bare `input[type=checkbox]` — see `field`'s changelog for the full detail.
|
|
46
|
-
- "Selectable card" (not `Field`-based) updated the same way: `[&_[data-slot=checkbox]]:mt-px` added directly to the card's own `Label` class, replacing the `class="mt-px"` on `Checkbox` itself.
|
|
47
|
-
- Verified live: box and icon now move as one unit (0.00px delta between them), and the whole checkbox centers against its label to within ~0.6px in both "With description" and "Selectable card".
|
|
48
|
-
- **Disabled label not dimming**: `Label`'s own `peer-disabled:opacity-50` can't reach a disabled `Checkbox`'s native input, because `Checkbox` wraps its input in its own `<label>`+`<span>` — the input isn't a true CSS sibling of an externally-paired `<Label for="...">`, so `peer-*` (which relies on the `~` sibling combinator) never matches across that nesting gap. This is a structural limitation of pairing `Checkbox` with a sibling `Label`, not something fixable inside `Checkbox` itself. Reflected correctly in the "Disabled" storybook demo using `:has()` instead (which reaches into any descendant depth): wrapped the row in `group`, added `group-has-disabled:opacity-50` to the `Label`. Mirrored in `Checkbox.astro`'s own JSDoc preview.
|
|
49
|
-
- **Icon stroke didn't match Figma**: the checkmark/dash were a single 24×24-viewBox icon with `stroke-width="2"`, scaled down via `size-3`/`size-4` for display — at the default 12px display size this rendered a ~1px visual stroke. Figma's actual assets use a viewBox matching the icon's own native display size (12×12 for the default/small icon, 16×16 for large) with `stroke-width="1.5"` in both — i.e. Figma keeps the stroke a constant 1.5px regardless of size, not scaled proportionally. Replaced the single scaled icon with per-size `viewBox`/path data taken directly from Figma's exported assets (`stroke-width="1.5"` in both cases), so the rendered stroke now matches exactly at both sizes (verified: 1.5px computed at both `size-3` and `size-4` display).
|
|
50
|
-
|
|
51
|
-
## 2026-09-09 — Alignment nudge corrected: 1px guess → Figma's actual 2px offset
|
|
52
|
-
|
|
53
|
-
The `mt-px` (1px) alignment nudge from the previous entry was derived by measurement/approximation, not sourced from Figma directly. Checked Figma's actual "Checkbox Combo" node: it wraps the checkbox in `p-0.5` (2px padding on all sides) inside an `items-start` row, with the label at an explicit `leading-[20px]` — i.e. a plain 2px top offset, not a computed value.
|
|
54
|
-
|
|
55
|
-
### Changed
|
|
56
|
-
|
|
57
|
-
- "Selectable card": `[&_[data-slot=checkbox]]:mt-px` → `mt-0.5` (2px), and the title paragraph `leading-snug` (19.25px, a guess) → `leading-5` (20px, Figma's actual value). With these exact values, centering is now **0.000px** off (verified live), not just "close."
|
|
58
|
-
- `Field`'s alignment selector (see `field`'s changelog): `mt-px` → `mt-0.5` for the same reason. Since `FieldLabel` itself still uses `leading-snug` rather than Figma's literal `leading-[20px]`, the "With description" demo (which uses `Field`) has a ~0.375px residual — imperceptible, and not worth changing `FieldLabel`'s shared typography (used by many other components) over.
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to the `Checkbox` component will be documented in this file.
|
|
4
|
+
|
|
5
|
+
## 2026-09-09 — Figma alignment (ClickLearn Lightning Design Library, node `46-976`)
|
|
6
|
+
|
|
7
|
+
Checkbox had never been touched by a Figma-alignment pass and was still the original Bejamas import. This pass added the missing Size and Indeterminate variants documented in Figma, fixed a real disabled-state visual mismatch, and cleaned up dead/inconsistent code found along the way.
|
|
8
|
+
|
|
9
|
+
### Added
|
|
10
|
+
|
|
11
|
+
- `size?: "default" | "lg"` — `default` is the existing 16px box (unchanged), `lg` is a new 20px box, matching Figma's two size variants (Figma's own variant was named "Small"; per your call it's being renamed to "Default" in Figma to match this prop, rather than the other way around).
|
|
12
|
+
- `indeterminate?: boolean` — shows a dash icon (matching Figma's Indeterminate type) instead of the checkmark. Since `.indeterminate` is a DOM-only property with no HTML attribute equivalent, this is implemented as a `data-indeterminate` marker plus a small inline `<script>` that sets the real native property on load — everything else (styling, showing/hiding the dash) reacts to the standard CSS `:indeterminate` pseudo-class, so it behaves like a genuine indeterminate checkbox (e.g. clicking it clears indeterminate per native browser behavior), not just a visual approximation.
|
|
13
|
+
- New `checkboxVariants`/`indicatorVariants` (via `cva`) replacing the old single flat class string, to support the two sizes cleanly.
|
|
14
|
+
|
|
15
|
+
### Fixed
|
|
16
|
+
|
|
17
|
+
- Disabled state: was `disabled:opacity-50` (uniformly fading everything, including a checked box's blue to a washed-out blue). Figma specifies the box background becomes `bg-muted` (light gray) when disabled — fixed to match, with the indicator icon separately switching to `peer-disabled:text-muted-foreground` so a disabled+checked box reads as gray, not faded blue.
|
|
18
|
+
- `focus-visible:ring-[3px]` (arbitrary value) → `focus-visible:ring-3` (standard Tailwind scale utility, same 3px result, consistent with every other component's focus ring).
|
|
19
|
+
- Removed dead `data-checked:*` utility classes (`data-checked:bg-primary`, etc.) — nothing in this component has ever set a `data-checked` attribute (no JS at all besides the new indeterminate script), so these were inert leftovers from a different origin.
|
|
20
|
+
- Fixed the component's own JSDoc `@preview` block, which used `defaultChecked` (not a real prop — this is a static-rendered Astro component, there's no client state) instead of the native `checked` attribute the storybook docs page and all real usage already correctly use.
|
|
21
|
+
- Updated `@figmaUrl` from the old Bejamas file to the ClickLearn Lightning Design Library link.
|
|
22
|
+
|
|
23
|
+
### Notes
|
|
24
|
+
|
|
25
|
+
- Figma's "Checkbox Combo" (checkbox + label + description) is already fully covered by the existing `Field`/`FieldContent`/`FieldLabel`/`FieldDescription` components — no new component was added for it.
|
|
26
|
+
- Figma also showed a Hover state — excluded per your call; not necessary, and being removed from Figma too.
|
|
27
|
+
- The component's own wrapping `<label>` + `<slot/>`, used alongside a sibling `<Label for="id">` in all existing examples, was left as-is — both work correctly (`for` targets by id regardless of DOM nesting), not a bug.
|
|
28
|
+
- All values are token-based (`--primary`, `--muted`, `--border`, `--input`, `--ring`, `--destructive`, `--radius-sm` from `globals.css`) — no hardcoded arbitrary values.
|
|
29
|
+
|
|
30
|
+
## 2026-09-09 — Docs: checkbox/label/description alignment + token colors
|
|
31
|
+
|
|
32
|
+
### Fixed
|
|
33
|
+
|
|
34
|
+
- "With description" demo (`checkbox.astro` docs page and `Checkbox.astro`'s own JSDoc `@preview`): migrated from a hand-rolled `<div class="grid gap-2">` + plain `Label` to `Field`/`FieldContent`/`FieldLabel`/`FieldDescription`. The plain `Label` renders at `leading-none` (14px line-height for `text-sm`) — *shorter* than the 16px checkbox itself — so `items-start` always left the checkbox visibly overhanging the label. `FieldLabel` uses `leading-snug` (19.25px) and, combined with the `Field` alignment fix (see `field`'s changelog), now centers the checkbox against the label to within a sub-pixel difference. Verified live via `getBoundingClientRect()`, not just visually.
|
|
35
|
+
- "Selectable card" demo: same root cause (a hand-rolled `leading-none` title paragraph). Since this demo needs to stay a single clickable `<Label>` card (not `Field`, which isn't a label and wouldn't preserve click-anywhere-on-card behavior), fixed it directly: title paragraph `leading-none` → `leading-5` (20px — see the later entry below for why this specific value, and why it changed from an initial `leading-snug` guess).
|
|
36
|
+
- "Selectable card" colors: replaced hardcoded Tailwind palette colors (`border-blue-600`, `bg-blue-50`, `dark:border-blue-900`, `dark:bg-blue-950`) with token-based equivalents (`border-primary/30`, `bg-primary/5`, `dark:border-primary/20`, `dark:bg-primary/10` — matching the exact opacity convention `FieldLabel` already uses for its own `has-data-checked` state). Also removed the now-redundant `checked:border-blue-600 checked:bg-blue-600 ...` override on the `Checkbox` instance itself — unnecessary since the component's own default checked state is already `bg-primary`/`border-primary`.
|
|
37
|
+
|
|
38
|
+
Note: this entry originally also added `class="mt-px"` directly on the `Checkbox` instance as the alignment nudge. That was wrong and got fixed in the next entry below — see that entry for why and what replaced it.
|
|
39
|
+
|
|
40
|
+
## 2026-09-09 — Fixed checkbox/icon desync, disabled-label reflection, and icon stroke geometry
|
|
41
|
+
|
|
42
|
+
### Fixed
|
|
43
|
+
|
|
44
|
+
- **Checkbox+icon desync bug**, introduced by the previous entry's `class="mt-px"` fix: that class landed on the `<input>` only (`Checkbox`'s public `class` prop merges onto the input element), while the checkmark/dash icon is a separately-positioned `absolute inset-0` overlay on a *different* wrapping `<span>` that never moved. Net effect: the box border shifted 1px down to align with the label, but the icon inside it stayed put — looking like the checkmark was "pushed upward" inside the box, and the checkbox still didn't read as properly centered overall.
|
|
45
|
+
- Fixed by adding `data-slot="checkbox"` to the component's outermost `<label>`, so the nudge can target the whole box+icon unit atomically instead of the input alone. Updated `Field.astro`'s alignment selector (`horizontal`/`responsive` variants) to match `[data-slot=checkbox]` (and `RadioGroupItem`'s existing `[data-slot=radio-group-item]`) instead of a bare `input[type=checkbox]` — see `field`'s changelog for the full detail.
|
|
46
|
+
- "Selectable card" (not `Field`-based) updated the same way: `[&_[data-slot=checkbox]]:mt-px` added directly to the card's own `Label` class, replacing the `class="mt-px"` on `Checkbox` itself.
|
|
47
|
+
- Verified live: box and icon now move as one unit (0.00px delta between them), and the whole checkbox centers against its label to within ~0.6px in both "With description" and "Selectable card".
|
|
48
|
+
- **Disabled label not dimming**: `Label`'s own `peer-disabled:opacity-50` can't reach a disabled `Checkbox`'s native input, because `Checkbox` wraps its input in its own `<label>`+`<span>` — the input isn't a true CSS sibling of an externally-paired `<Label for="...">`, so `peer-*` (which relies on the `~` sibling combinator) never matches across that nesting gap. This is a structural limitation of pairing `Checkbox` with a sibling `Label`, not something fixable inside `Checkbox` itself. Reflected correctly in the "Disabled" storybook demo using `:has()` instead (which reaches into any descendant depth): wrapped the row in `group`, added `group-has-disabled:opacity-50` to the `Label`. Mirrored in `Checkbox.astro`'s own JSDoc preview.
|
|
49
|
+
- **Icon stroke didn't match Figma**: the checkmark/dash were a single 24×24-viewBox icon with `stroke-width="2"`, scaled down via `size-3`/`size-4` for display — at the default 12px display size this rendered a ~1px visual stroke. Figma's actual assets use a viewBox matching the icon's own native display size (12×12 for the default/small icon, 16×16 for large) with `stroke-width="1.5"` in both — i.e. Figma keeps the stroke a constant 1.5px regardless of size, not scaled proportionally. Replaced the single scaled icon with per-size `viewBox`/path data taken directly from Figma's exported assets (`stroke-width="1.5"` in both cases), so the rendered stroke now matches exactly at both sizes (verified: 1.5px computed at both `size-3` and `size-4` display).
|
|
50
|
+
|
|
51
|
+
## 2026-09-09 — Alignment nudge corrected: 1px guess → Figma's actual 2px offset
|
|
52
|
+
|
|
53
|
+
The `mt-px` (1px) alignment nudge from the previous entry was derived by measurement/approximation, not sourced from Figma directly. Checked Figma's actual "Checkbox Combo" node: it wraps the checkbox in `p-0.5` (2px padding on all sides) inside an `items-start` row, with the label at an explicit `leading-[20px]` — i.e. a plain 2px top offset, not a computed value.
|
|
54
|
+
|
|
55
|
+
### Changed
|
|
56
|
+
|
|
57
|
+
- "Selectable card": `[&_[data-slot=checkbox]]:mt-px` → `mt-0.5` (2px), and the title paragraph `leading-snug` (19.25px, a guess) → `leading-5` (20px, Figma's actual value). With these exact values, centering is now **0.000px** off (verified live), not just "close."
|
|
58
|
+
- `Field`'s alignment selector (see `field`'s changelog): `mt-px` → `mt-0.5` for the same reason. Since `FieldLabel` itself still uses `leading-snug` rather than Figma's literal `leading-[20px]`, the "With description" demo (which uses `Field`) has a ~0.375px residual — imperceptible, and not worth changing `FieldLabel`'s shared typography (used by many other components) over.
|
|
@@ -24,8 +24,8 @@
|
|
|
24
24
|
* </Field>
|
|
25
25
|
*
|
|
26
26
|
* <div class="group flex items-center gap-3">
|
|
27
|
-
* <Checkbox id="
|
|
28
|
-
* <Label for="
|
|
27
|
+
* <Checkbox id="notifications-checkbox-disabled" disabled />
|
|
28
|
+
* <Label for="notifications-checkbox-disabled" class="group-has-disabled:opacity-50">Enable notifications</Label>
|
|
29
29
|
* </div>
|
|
30
30
|
*
|
|
31
31
|
* <Label
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { default as Checkbox } from "./Checkbox.astro";
|
|
1
|
+
export { default as Checkbox } from "./Checkbox.astro";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
# Changelog
|
|
2
|
-
|
|
3
|
-
All notable changes to the `Collapsible` component will be documented in this file.
|
|
4
|
-
|
|
5
|
-
## Unreleased
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to the `Collapsible` component will be documented in this file.
|
|
4
|
+
|
|
5
|
+
## Unreleased
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { default as Collapsible } from "./Collapsible.astro";
|
|
2
|
-
export { default as CollapsibleTrigger } from "./CollapsibleTrigger.astro";
|
|
3
|
-
export { default as CollapsibleContent } from "./CollapsibleContent.astro";
|
|
4
|
-
export { collapsibleContentVariants } from "./CollapsibleContent.astro";
|
|
1
|
+
export { default as Collapsible } from "./Collapsible.astro";
|
|
2
|
+
export { default as CollapsibleTrigger } from "./CollapsibleTrigger.astro";
|
|
3
|
+
export { default as CollapsibleContent } from "./CollapsibleContent.astro";
|
|
4
|
+
export { collapsibleContentVariants } from "./CollapsibleContent.astro";
|
|
@@ -1,27 +1,27 @@
|
|
|
1
|
-
# Changelog
|
|
2
|
-
|
|
3
|
-
All notable changes to the `Combobox` component family (`Combobox`, `ComboboxInput`, `ComboboxContent`, `ComboboxList`, `ComboboxItem`, `ComboboxGroup`, `ComboboxLabel`, `ComboboxSeparator`, `ComboboxEmpty`, `ComboboxTrigger`, `ComboboxValue`) are documented in this file.
|
|
4
|
-
|
|
5
|
-
## 2026-09-08 — Figma alignment (ClickLearn Lightning Design Library, node `5455-12863`)
|
|
6
|
-
|
|
7
|
-
Styling-only pass — no props, components, or behavior were added or removed. The implementation (including the shared `InputGroup`/`InputGroupInput` it delegates trigger styling to) was already close to Figma; this fixed the remaining concrete mismatches found by comparing computed styles against the Figma spec.
|
|
8
|
-
|
|
9
|
-
### Fixed
|
|
10
|
-
|
|
11
|
-
- `ComboboxContent` (popover): computed border-radius was rendering at 8px instead of Figma's 6px, because the class string set both `rounded-md` and a later, conflicting `rounded-lg` — removed the erroneous `rounded-lg`.
|
|
12
|
-
- `ComboboxItem`: radius was `rounded-sm` (4px); Figma specifies `rounded-lg` (8px) for items.
|
|
13
|
-
- `ComboboxLabel` (group label, e.g. "Frontend"/"Backend"): was missing `font-medium` — Figma's group label is medium (500) weight, not the browser default.
|
|
14
|
-
- `ComboboxList`: removed a duplicate, malformed `max-h-[...]` utility (`calc(--spacing(72)---spacing(9))` — invalid calc syntax) that was redundant with the correct `max-h-[min(18rem,calc(var(--available-height)-var(--anchor-height)))]` already present later in the same class string.
|
|
15
|
-
|
|
16
|
-
### Added
|
|
17
|
-
|
|
18
|
-
- `@figmaUrl` JSDoc tag on `Combobox.astro` (previously had none).
|
|
19
|
-
|
|
20
|
-
### Changed (docs only)
|
|
21
|
-
|
|
22
|
-
- Removed the "Sizes" preview section from the storybook page (`apps/web/.../_sections/combobox.astro`), since Figma has no distinct size variants for this component and showcasing one there implied it was a designed feature. The underlying `size` prop on `ComboboxInput` itself (`"sm" | "default" | "lg"`, delegated to `InputGroup`) was **not** removed — it's real, pre-existing functionality shared with other inputs, just no longer given its own demo/prop-table framing as a Figma-specified variant.
|
|
23
|
-
|
|
24
|
-
### Notes
|
|
25
|
-
|
|
26
|
-
- Figma's trigger box (border, radius, shadow, Default/Hover/Focus/Invalid/Disabled states), item hover highlight (`bg-background-hover`), and the selected-item checkmark visibility already matched exactly — verified via computed styles in the browser, not just source reading.
|
|
27
|
-
- No new props/components were introduced, per explicit instruction — this was a pure token/styling correction pass.
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to the `Combobox` component family (`Combobox`, `ComboboxInput`, `ComboboxContent`, `ComboboxList`, `ComboboxItem`, `ComboboxGroup`, `ComboboxLabel`, `ComboboxSeparator`, `ComboboxEmpty`, `ComboboxTrigger`, `ComboboxValue`) are documented in this file.
|
|
4
|
+
|
|
5
|
+
## 2026-09-08 — Figma alignment (ClickLearn Lightning Design Library, node `5455-12863`)
|
|
6
|
+
|
|
7
|
+
Styling-only pass — no props, components, or behavior were added or removed. The implementation (including the shared `InputGroup`/`InputGroupInput` it delegates trigger styling to) was already close to Figma; this fixed the remaining concrete mismatches found by comparing computed styles against the Figma spec.
|
|
8
|
+
|
|
9
|
+
### Fixed
|
|
10
|
+
|
|
11
|
+
- `ComboboxContent` (popover): computed border-radius was rendering at 8px instead of Figma's 6px, because the class string set both `rounded-md` and a later, conflicting `rounded-lg` — removed the erroneous `rounded-lg`.
|
|
12
|
+
- `ComboboxItem`: radius was `rounded-sm` (4px); Figma specifies `rounded-lg` (8px) for items.
|
|
13
|
+
- `ComboboxLabel` (group label, e.g. "Frontend"/"Backend"): was missing `font-medium` — Figma's group label is medium (500) weight, not the browser default.
|
|
14
|
+
- `ComboboxList`: removed a duplicate, malformed `max-h-[...]` utility (`calc(--spacing(72)---spacing(9))` — invalid calc syntax) that was redundant with the correct `max-h-[min(18rem,calc(var(--available-height)-var(--anchor-height)))]` already present later in the same class string.
|
|
15
|
+
|
|
16
|
+
### Added
|
|
17
|
+
|
|
18
|
+
- `@figmaUrl` JSDoc tag on `Combobox.astro` (previously had none).
|
|
19
|
+
|
|
20
|
+
### Changed (docs only)
|
|
21
|
+
|
|
22
|
+
- Removed the "Sizes" preview section from the storybook page (`apps/web/.../_sections/combobox.astro`), since Figma has no distinct size variants for this component and showcasing one there implied it was a designed feature. The underlying `size` prop on `ComboboxInput` itself (`"sm" | "default" | "lg"`, delegated to `InputGroup`) was **not** removed — it's real, pre-existing functionality shared with other inputs, just no longer given its own demo/prop-table framing as a Figma-specified variant.
|
|
23
|
+
|
|
24
|
+
### Notes
|
|
25
|
+
|
|
26
|
+
- Figma's trigger box (border, radius, shadow, Default/Hover/Focus/Invalid/Disabled states), item hover highlight (`bg-background-hover`), and the selected-item checkmark visibility already matched exactly — verified via computed styles in the browser, not just source reading.
|
|
27
|
+
- No new props/components were introduced, per explicit instruction — this was a pure token/styling correction pass.
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
export { default as Combobox } from "./Combobox.astro";
|
|
2
|
-
export { default as ComboboxContent } from "./ComboboxContent.astro";
|
|
3
|
-
export { default as ComboboxEmpty } from "./ComboboxEmpty.astro";
|
|
4
|
-
export { default as ComboboxGroup } from "./ComboboxGroup.astro";
|
|
5
|
-
export { default as ComboboxInput } from "./ComboboxInput.astro";
|
|
6
|
-
export { default as ComboboxItem } from "./ComboboxItem.astro";
|
|
7
|
-
export { default as ComboboxLabel } from "./ComboboxLabel.astro";
|
|
8
|
-
export { default as ComboboxList } from "./ComboboxList.astro";
|
|
9
|
-
export { default as ComboboxSeparator } from "./ComboboxSeparator.astro";
|
|
10
|
-
export { default as ComboboxTrigger } from "./ComboboxTrigger.astro";
|
|
11
|
-
export { default as ComboboxValue } from "./ComboboxValue.astro";
|
|
1
|
+
export { default as Combobox } from "./Combobox.astro";
|
|
2
|
+
export { default as ComboboxContent } from "./ComboboxContent.astro";
|
|
3
|
+
export { default as ComboboxEmpty } from "./ComboboxEmpty.astro";
|
|
4
|
+
export { default as ComboboxGroup } from "./ComboboxGroup.astro";
|
|
5
|
+
export { default as ComboboxInput } from "./ComboboxInput.astro";
|
|
6
|
+
export { default as ComboboxItem } from "./ComboboxItem.astro";
|
|
7
|
+
export { default as ComboboxLabel } from "./ComboboxLabel.astro";
|
|
8
|
+
export { default as ComboboxList } from "./ComboboxList.astro";
|
|
9
|
+
export { default as ComboboxSeparator } from "./ComboboxSeparator.astro";
|
|
10
|
+
export { default as ComboboxTrigger } from "./ComboboxTrigger.astro";
|
|
11
|
+
export { default as ComboboxValue } from "./ComboboxValue.astro";
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
# Changelog
|
|
2
|
-
|
|
3
|
-
All notable changes to the `Date` component will be documented in this file.
|
|
4
|
-
|
|
5
|
-
## 2026-09-09 — Figma alignment (ClickLearn Lightning Design Library, node `2329-6519`)
|
|
6
|
-
|
|
7
|
-
Unlike Accordion/Combobox/Checkbox, `Date` is not an interactive widget — it's a lightweight, non-interactive date-*formatting* component (renders a plain `<time>`, no sub-components, no behavior library). Figma's "Date" page turned out to be a reference table of six formatting variants (Default, Short, Time, Full, Long, "Long with time") with sample output strings, not a visual widget spec.
|
|
8
|
-
|
|
9
|
-
### Notes (no missing variants or props found)
|
|
10
|
-
|
|
11
|
-
- All six variants Figma demos are already fully supported by the existing `format` (`"short" | "time" | "full" | "long"`, default `"long"`) and `includeTime` props — confirmed each one produces the exact same formatted output Figma shows (e.g. `format="full"` → "Friday, June 13, 2025"). No new props were needed.
|
|
12
|
-
- Figma's "Short" sample text ("6/13/2025") doesn't match what `Intl.DateTimeFormat`'s real `dateStyle: "short"` produces ("6/13/25", 2-digit year — the correct standard short-style output). Left the component using the real `Intl` API rather than "fixing" it to match what was evidently a hand-typed mockup value.
|
|
13
|
-
|
|
14
|
-
### Fixed
|
|
15
|
-
|
|
16
|
-
- The rendered `<time>` element had **zero** default styling (`class={cn("", className)}` — a literal empty base string). Added `text-sm` plus a text color as the default — first set to `text-muted-foreground` per Figma's reference table (which styled the value text as regular-weight/muted), then corrected to `text-foreground` per your direct call.
|
|
17
|
-
- Updated `@figmaUrl` from the old Bejamas file to the ClickLearn Lightning Design Library link.
|
|
18
|
-
- Polished the demo page (`apps/web/.../_sections/date.astro`) and the component's own JSDoc `@preview`: the row labels ("Default:", "Short:", etc.) were plain unstyled `<div>`s; Figma styles them `text-foreground text-sm font-medium` (bold, dark) — added to both.
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to the `Date` component will be documented in this file.
|
|
4
|
+
|
|
5
|
+
## 2026-09-09 — Figma alignment (ClickLearn Lightning Design Library, node `2329-6519`)
|
|
6
|
+
|
|
7
|
+
Unlike Accordion/Combobox/Checkbox, `Date` is not an interactive widget — it's a lightweight, non-interactive date-*formatting* component (renders a plain `<time>`, no sub-components, no behavior library). Figma's "Date" page turned out to be a reference table of six formatting variants (Default, Short, Time, Full, Long, "Long with time") with sample output strings, not a visual widget spec.
|
|
8
|
+
|
|
9
|
+
### Notes (no missing variants or props found)
|
|
10
|
+
|
|
11
|
+
- All six variants Figma demos are already fully supported by the existing `format` (`"short" | "time" | "full" | "long"`, default `"long"`) and `includeTime` props — confirmed each one produces the exact same formatted output Figma shows (e.g. `format="full"` → "Friday, June 13, 2025"). No new props were needed.
|
|
12
|
+
- Figma's "Short" sample text ("6/13/2025") doesn't match what `Intl.DateTimeFormat`'s real `dateStyle: "short"` produces ("6/13/25", 2-digit year — the correct standard short-style output). Left the component using the real `Intl` API rather than "fixing" it to match what was evidently a hand-typed mockup value.
|
|
13
|
+
|
|
14
|
+
### Fixed
|
|
15
|
+
|
|
16
|
+
- The rendered `<time>` element had **zero** default styling (`class={cn("", className)}` — a literal empty base string). Added `text-sm` plus a text color as the default — first set to `text-muted-foreground` per Figma's reference table (which styled the value text as regular-weight/muted), then corrected to `text-foreground` per your direct call.
|
|
17
|
+
- Updated `@figmaUrl` from the old Bejamas file to the ClickLearn Lightning Design Library link.
|
|
18
|
+
- Polished the demo page (`apps/web/.../_sections/date.astro`) and the component's own JSDoc `@preview`: the row labels ("Default:", "Short:", etc.) were plain unstyled `<div>`s; Figma styles them `text-foreground text-sm font-medium` (bold, dark) — added to both.
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { default as Date } from "./Date.astro";
|
|
2
|
-
|
|
1
|
+
export { default as Date } from "./Date.astro";
|
|
2
|
+
|
|
@@ -1,39 +1,39 @@
|
|
|
1
|
-
# Changelog
|
|
2
|
-
|
|
3
|
-
All notable changes to the `Dialog` component family (`Dialog`, `DialogTrigger`, `DialogContent`, `DialogOverlay`, `DialogHeader`, `DialogFooter`, `DialogTitle`, `DialogDescription`, `DialogClose`) are documented in this file.
|
|
4
|
-
|
|
5
|
-
## Earlier (commit `c3cec7d`, undocumented at the time)
|
|
6
|
-
|
|
7
|
-
- `DialogContent`: `rounded-xl` → `rounded-lg` (Figma binds 8px radius).
|
|
8
|
-
- `DialogTitle`: `font-medium` → `font-semibold` (Figma title token is Semi Bold/600).
|
|
9
|
-
- Added `Dialog.stories.ts`/`DialogStory.astro` (astrobook preview scaffolding).
|
|
10
|
-
|
|
11
|
-
No changelog entry was added at the time — backfilled here for a complete history. Everything else in the family (`Dialog.astro`, `DialogTrigger`, `DialogOverlay`, `DialogHeader`, `DialogFooter`, `DialogDescription`, `DialogClose`, `index.ts`) was untouched since the original Bejamas import until this pass.
|
|
12
|
-
|
|
13
|
-
## 2026-09-09 — Figma alignment (ClickLearn Lightning Design Library, node `141-6002`)
|
|
14
|
-
|
|
15
|
-
Figma shows a single "Opened" dialog state (a cookie-consent example: title, description, content slot, and a Close/Save-changes action row), which surfaced several real gaps beyond what `c3cec7d` had already fixed.
|
|
16
|
-
|
|
17
|
-
### Fixed
|
|
18
|
-
|
|
19
|
-
- `DialogContent`: panel background `bg-background` → `bg-card` — these are the same color in light mode but genuinely differ in dark mode (`--background` vs `--card`), so this was a real, if currently invisible, mismatch.
|
|
20
|
-
- `DialogContent`: replaced the `ring-1 ring-foreground/10` approximation with an actual `border border-border` **and** `shadow-lg` — Figma's panel has both a visible 1px border and a distinct multi-layer drop shadow (explicitly annotated "shadow-lg" in the design tokens), not a single subtle ring.
|
|
21
|
-
- `DialogContent`: **restructured** to match Figma's two-layer composition — an outer unpadded panel (bg/border/shadow/radius/position/animation only) now wraps an inner `<div class="grid gap-6 p-6 text-sm">` holding the slotted content, with the close button as a sibling of that inner wrapper rather than a child of it. Previously, the close button (`position: absolute`) was a child of the *padded* content div, so `top-4 right-4` was actually offset from the padding edge — i.e. 24px (padding) + 16px (`top-4`/`right-4`) = 40px from the panel's true corner, not the ~15px Figma shows. Now it's positioned relative to the outer unpadded panel, landing close to the corner as intended.
|
|
22
|
-
- `DialogTitle`: was missing an explicit font-size entirely (relied on inherited/browser default) and used `leading-none` (line-height: 1). Figma specifies `text-xl` (20px) with a 24px line-height — added `text-xl leading-6`. Verified computed: `fontSize: 20px`, `lineHeight: 24px`.
|
|
23
|
-
- `DialogClose`: was a bare, completely unstyled `<button>` — no hover state, no focus ring, no consistent sizing — despite every real usage example (`DialogStory.astro`, the storybook docs page, `Dialog.astro`'s own JSDoc) actually using the shared `Button` component for the footer's "Close" action instead. Figma's own close-button layer is literally named "Ghost" (matching `Button`'s `ghost` variant exactly). Rewrote `DialogClose` to render `<Button variant="ghost" size="icon-sm">` internally instead of a bare button, repositioned to `top-2 right-2` (matches the icon-button's own built-in padding placing the glyph near Figma's corner inset). Verified live: 32×32 hit area, correct hover/focus states inherited from `Button`.
|
|
24
|
-
- Docs/examples (`Dialog.astro` JSDoc, `DialogStory.astro`, the storybook page): the footer's "Close" `Button` used `variant="outline"` (visible border) everywhere — but Figma's own layer name for that button is "Ghost" (no border, text-only until hover). Changed all three to `variant="ghost"`. **Reverted in the follow-up below** — the user confirmed the footer's secondary Close action should stay `outline`; the "Ghost" Figma layer name applies to the corner X close icon (`DialogClose`, see above), not this button.
|
|
25
|
-
- `DialogFooter`: removed a dead, redundant `"gap-2"` first argument to `cn()` that was already superseded by `"flex justify-end gap-2"` later in the same call — the same class of bug `c3cec7d` fixed elsewhere (e.g. `TooltipContent`) but missed here.
|
|
26
|
-
- `index.ts`: `DialogOverlay` existed and is used internally by `DialogContent` but was never exported, so consumers couldn't import or reference it by name. Added the export.
|
|
27
|
-
- Updated `@figmaUrl` from the old Bejamas file to the ClickLearn Lightning Design Library link.
|
|
28
|
-
|
|
29
|
-
### Notes
|
|
30
|
-
|
|
31
|
-
- `DialogDescription` (`text-muted-foreground text-sm`) already matched Figma exactly — no change needed.
|
|
32
|
-
- `DialogOverlay`'s `bg-black/10` backdrop color was left as-is — Figma's export didn't capture a visible backdrop to diff against, and a raw-black dimming overlay (rather than a theme-aware token) is a common, deliberate convention for modal backdrops regardless of light/dark theme.
|
|
33
|
-
- The underlying `@data-slot/dialog` behavior library supports an `alertDialog` option that isn't exposed as a `Dialog` prop. Not added — Figma's file shows only one dialog variant, with no alert-dialog-specific visual spec to align against.
|
|
34
|
-
- All values are token-based (`--card`, `--border`, `--foreground`, `--muted-foreground`, `--radius-lg`, Tailwind's `shadow-lg`) — no hardcoded arbitrary values introduced.
|
|
35
|
-
|
|
36
|
-
### Fixed (follow-up)
|
|
37
|
-
|
|
38
|
-
- Removed a leftover `border-red-800` demo class from the nested-dialog example (`Dialog.astro` JSDoc and the storybook docs page). It was inherited from the original Bejamas import and had been a silent no-op (no border-width utility was present to give it a visible width), but became visible once this pass added a real `border` to `DialogContent` — so it started rendering an unintended red border. The nested dialog now correctly falls back to the standard `border-border` color.
|
|
39
|
-
- User correction: the footer's secondary "Close" `Button` (`Dialog.astro` JSDoc ×2, `DialogStory.astro`, the storybook page ×2) reverted from `variant="ghost"` back to `variant="outline"`. The corner X close icon (`DialogClose.astro`) stays `variant="ghost"`, matching Figma's "Ghost" layer name for that specific icon button — that layer name doesn't extend to the separate footer text button.
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to the `Dialog` component family (`Dialog`, `DialogTrigger`, `DialogContent`, `DialogOverlay`, `DialogHeader`, `DialogFooter`, `DialogTitle`, `DialogDescription`, `DialogClose`) are documented in this file.
|
|
4
|
+
|
|
5
|
+
## Earlier (commit `c3cec7d`, undocumented at the time)
|
|
6
|
+
|
|
7
|
+
- `DialogContent`: `rounded-xl` → `rounded-lg` (Figma binds 8px radius).
|
|
8
|
+
- `DialogTitle`: `font-medium` → `font-semibold` (Figma title token is Semi Bold/600).
|
|
9
|
+
- Added `Dialog.stories.ts`/`DialogStory.astro` (astrobook preview scaffolding).
|
|
10
|
+
|
|
11
|
+
No changelog entry was added at the time — backfilled here for a complete history. Everything else in the family (`Dialog.astro`, `DialogTrigger`, `DialogOverlay`, `DialogHeader`, `DialogFooter`, `DialogDescription`, `DialogClose`, `index.ts`) was untouched since the original Bejamas import until this pass.
|
|
12
|
+
|
|
13
|
+
## 2026-09-09 — Figma alignment (ClickLearn Lightning Design Library, node `141-6002`)
|
|
14
|
+
|
|
15
|
+
Figma shows a single "Opened" dialog state (a cookie-consent example: title, description, content slot, and a Close/Save-changes action row), which surfaced several real gaps beyond what `c3cec7d` had already fixed.
|
|
16
|
+
|
|
17
|
+
### Fixed
|
|
18
|
+
|
|
19
|
+
- `DialogContent`: panel background `bg-background` → `bg-card` — these are the same color in light mode but genuinely differ in dark mode (`--background` vs `--card`), so this was a real, if currently invisible, mismatch.
|
|
20
|
+
- `DialogContent`: replaced the `ring-1 ring-foreground/10` approximation with an actual `border border-border` **and** `shadow-lg` — Figma's panel has both a visible 1px border and a distinct multi-layer drop shadow (explicitly annotated "shadow-lg" in the design tokens), not a single subtle ring.
|
|
21
|
+
- `DialogContent`: **restructured** to match Figma's two-layer composition — an outer unpadded panel (bg/border/shadow/radius/position/animation only) now wraps an inner `<div class="grid gap-6 p-6 text-sm">` holding the slotted content, with the close button as a sibling of that inner wrapper rather than a child of it. Previously, the close button (`position: absolute`) was a child of the *padded* content div, so `top-4 right-4` was actually offset from the padding edge — i.e. 24px (padding) + 16px (`top-4`/`right-4`) = 40px from the panel's true corner, not the ~15px Figma shows. Now it's positioned relative to the outer unpadded panel, landing close to the corner as intended.
|
|
22
|
+
- `DialogTitle`: was missing an explicit font-size entirely (relied on inherited/browser default) and used `leading-none` (line-height: 1). Figma specifies `text-xl` (20px) with a 24px line-height — added `text-xl leading-6`. Verified computed: `fontSize: 20px`, `lineHeight: 24px`.
|
|
23
|
+
- `DialogClose`: was a bare, completely unstyled `<button>` — no hover state, no focus ring, no consistent sizing — despite every real usage example (`DialogStory.astro`, the storybook docs page, `Dialog.astro`'s own JSDoc) actually using the shared `Button` component for the footer's "Close" action instead. Figma's own close-button layer is literally named "Ghost" (matching `Button`'s `ghost` variant exactly). Rewrote `DialogClose` to render `<Button variant="ghost" size="icon-sm">` internally instead of a bare button, repositioned to `top-2 right-2` (matches the icon-button's own built-in padding placing the glyph near Figma's corner inset). Verified live: 32×32 hit area, correct hover/focus states inherited from `Button`.
|
|
24
|
+
- Docs/examples (`Dialog.astro` JSDoc, `DialogStory.astro`, the storybook page): the footer's "Close" `Button` used `variant="outline"` (visible border) everywhere — but Figma's own layer name for that button is "Ghost" (no border, text-only until hover). Changed all three to `variant="ghost"`. **Reverted in the follow-up below** — the user confirmed the footer's secondary Close action should stay `outline`; the "Ghost" Figma layer name applies to the corner X close icon (`DialogClose`, see above), not this button.
|
|
25
|
+
- `DialogFooter`: removed a dead, redundant `"gap-2"` first argument to `cn()` that was already superseded by `"flex justify-end gap-2"` later in the same call — the same class of bug `c3cec7d` fixed elsewhere (e.g. `TooltipContent`) but missed here.
|
|
26
|
+
- `index.ts`: `DialogOverlay` existed and is used internally by `DialogContent` but was never exported, so consumers couldn't import or reference it by name. Added the export.
|
|
27
|
+
- Updated `@figmaUrl` from the old Bejamas file to the ClickLearn Lightning Design Library link.
|
|
28
|
+
|
|
29
|
+
### Notes
|
|
30
|
+
|
|
31
|
+
- `DialogDescription` (`text-muted-foreground text-sm`) already matched Figma exactly — no change needed.
|
|
32
|
+
- `DialogOverlay`'s `bg-black/10` backdrop color was left as-is — Figma's export didn't capture a visible backdrop to diff against, and a raw-black dimming overlay (rather than a theme-aware token) is a common, deliberate convention for modal backdrops regardless of light/dark theme.
|
|
33
|
+
- The underlying `@data-slot/dialog` behavior library supports an `alertDialog` option that isn't exposed as a `Dialog` prop. Not added — Figma's file shows only one dialog variant, with no alert-dialog-specific visual spec to align against.
|
|
34
|
+
- All values are token-based (`--card`, `--border`, `--foreground`, `--muted-foreground`, `--radius-lg`, Tailwind's `shadow-lg`) — no hardcoded arbitrary values introduced.
|
|
35
|
+
|
|
36
|
+
### Fixed (follow-up)
|
|
37
|
+
|
|
38
|
+
- Removed a leftover `border-red-800` demo class from the nested-dialog example (`Dialog.astro` JSDoc and the storybook docs page). It was inherited from the original Bejamas import and had been a silent no-op (no border-width utility was present to give it a visible width), but became visible once this pass added a real `border` to `DialogContent` — so it started rendering an unintended red border. The nested dialog now correctly falls back to the standard `border-border` color.
|
|
39
|
+
- User correction: the footer's secondary "Close" `Button` (`Dialog.astro` JSDoc ×2, `DialogStory.astro`, the storybook page ×2) reverted from `variant="ghost"` back to `variant="outline"`. The corner X close icon (`DialogClose.astro`) stays `variant="ghost"`, matching Figma's "Ghost" layer name for that specific icon button — that layer name doesn't extend to the separate footer text button.
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
export { default as Dialog } from "./Dialog.astro";
|
|
2
|
-
export { default as DialogTitle } from "./DialogTitle.astro";
|
|
3
|
-
export { default as DialogDescription } from "./DialogDescription.astro";
|
|
4
|
-
export { default as DialogContent } from "./DialogContent.astro";
|
|
5
|
-
export { default as DialogFooter } from "./DialogFooter.astro";
|
|
6
|
-
export { default as DialogClose } from "./DialogClose.astro";
|
|
7
|
-
export { default as DialogHeader } from "./DialogHeader.astro";
|
|
8
|
-
export { default as DialogTrigger } from "./DialogTrigger.astro";
|
|
9
|
-
export { default as DialogOverlay } from "./DialogOverlay.astro";
|
|
1
|
+
export { default as Dialog } from "./Dialog.astro";
|
|
2
|
+
export { default as DialogTitle } from "./DialogTitle.astro";
|
|
3
|
+
export { default as DialogDescription } from "./DialogDescription.astro";
|
|
4
|
+
export { default as DialogContent } from "./DialogContent.astro";
|
|
5
|
+
export { default as DialogFooter } from "./DialogFooter.astro";
|
|
6
|
+
export { default as DialogClose } from "./DialogClose.astro";
|
|
7
|
+
export { default as DialogHeader } from "./DialogHeader.astro";
|
|
8
|
+
export { default as DialogTrigger } from "./DialogTrigger.astro";
|
|
9
|
+
export { default as DialogOverlay } from "./DialogOverlay.astro";
|