@namroodinc/liquid-editorial 0.11.0 → 0.12.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/README.md +32 -18
- package/UPGRADING.md +252 -0
- package/dist/chunks/{Board-Cnyqrc-R.js → Board-BCS7sDXg.js} +13 -5
- package/dist/chunks/{Board-Cnyqrc-R.js.map → Board-BCS7sDXg.js.map} +1 -1
- package/dist/chunks/{Board-DFuJt2Oh.cjs → Board-CNVy8gHI.cjs} +2 -2
- package/dist/chunks/Board-CNVy8gHI.cjs.map +1 -0
- package/dist/chunks/{CollectionView-Vj84E26b.js → CollectionView-B0ZJxkNK.js} +4 -4
- package/dist/chunks/CollectionView-B0ZJxkNK.js.map +1 -0
- package/dist/chunks/CollectionView-DrszOUOt.cjs +2 -0
- package/dist/chunks/CollectionView-DrszOUOt.cjs.map +1 -0
- package/dist/chunks/ColourField-BdobU76j.cjs +2 -0
- package/dist/chunks/ColourField-BdobU76j.cjs.map +1 -0
- package/dist/chunks/{ColourField-DkO8tjeB.js → ColourField-C39pcjkG.js} +2 -2
- package/dist/chunks/ColourField-C39pcjkG.js.map +1 -0
- package/dist/chunks/{DatePicker-B8tllGYy.js → DatePicker-DDc1nDTb.js} +2 -2
- package/dist/chunks/DatePicker-DDc1nDTb.js.map +1 -0
- package/dist/chunks/DatePicker-Dpvfomrm.cjs +2 -0
- package/dist/chunks/DatePicker-Dpvfomrm.cjs.map +1 -0
- package/dist/chunks/{Drawer-DTtgAZO2.js → Drawer-C3mWT9Kh.js} +2 -2
- package/dist/chunks/Drawer-C3mWT9Kh.js.map +1 -0
- package/dist/chunks/Drawer-DTKZptua.cjs +2 -0
- package/dist/chunks/Drawer-DTKZptua.cjs.map +1 -0
- package/dist/chunks/EntryPicker-CgWbgWnc.cjs +2 -0
- package/dist/chunks/EntryPicker-CgWbgWnc.cjs.map +1 -0
- package/dist/chunks/{EntryPicker-KxHZzZsh.js → EntryPicker-DlEsVCvA.js} +3 -3
- package/dist/chunks/EntryPicker-DlEsVCvA.js.map +1 -0
- package/dist/chunks/{FormEditor-CdLqPaKK.js → FormEditor-CLLOHKiO.js} +6 -6
- package/dist/chunks/{FormEditor-CdLqPaKK.js.map → FormEditor-CLLOHKiO.js.map} +1 -1
- package/dist/chunks/{FormEditor-BJcAIVcL.cjs → FormEditor-iACd0El-.cjs} +2 -2
- package/dist/chunks/{FormEditor-BJcAIVcL.cjs.map → FormEditor-iACd0El-.cjs.map} +1 -1
- package/dist/chunks/{RichTextEditor-DmNM63Wg.js → RichTextEditor-B0P53GFt.js} +9 -9
- package/dist/chunks/RichTextEditor-B0P53GFt.js.map +1 -0
- package/dist/chunks/RichTextEditor-Wu_yjvD7.cjs +2 -0
- package/dist/chunks/RichTextEditor-Wu_yjvD7.cjs.map +1 -0
- package/dist/chunks/{use-picker-session-BDEWL2jK.js → use-picker-session-BnMxbGAZ.js} +3 -3
- package/dist/chunks/use-picker-session-BnMxbGAZ.js.map +1 -0
- package/dist/chunks/use-picker-session-DbfOJstX.cjs +2 -0
- package/dist/chunks/use-picker-session-DbfOJstX.cjs.map +1 -0
- package/dist/components/AppShell/index.cjs +1 -1
- package/dist/components/AppShell/index.js +1 -1
- package/dist/components/AssetCard/index.cjs +1 -1
- package/dist/components/AssetCard/index.cjs.map +1 -1
- package/dist/components/AssetCard/index.d.cts.map +1 -1
- package/dist/components/AssetCard/index.d.ts.map +1 -1
- package/dist/components/AssetCard/index.js +16 -16
- package/dist/components/AssetCard/index.js.map +1 -1
- package/dist/components/AssetCard/style.css +47 -46
- package/dist/components/AssetGrid/index.cjs +1 -1
- package/dist/components/AssetGrid/index.cjs.map +1 -1
- package/dist/components/AssetGrid/index.d.cts +0 -2
- package/dist/components/AssetGrid/index.d.cts.map +1 -1
- package/dist/components/AssetGrid/index.d.ts +0 -2
- package/dist/components/AssetGrid/index.d.ts.map +1 -1
- package/dist/components/AssetGrid/index.js +15 -15
- package/dist/components/AssetGrid/index.js.map +1 -1
- package/dist/components/Avatar/style.css +26 -5
- package/dist/components/Badge/index.cjs +1 -1
- package/dist/components/Badge/index.cjs.map +1 -1
- package/dist/components/Badge/index.d.cts +2 -3
- package/dist/components/Badge/index.d.cts.map +1 -1
- package/dist/components/Badge/index.d.ts +2 -3
- package/dist/components/Badge/index.d.ts.map +1 -1
- package/dist/components/Badge/index.js +1 -1
- package/dist/components/Badge/index.js.map +1 -1
- package/dist/components/Badge/style.css +20 -26
- package/dist/components/Board/index.cjs +1 -1
- package/dist/components/Board/index.js +1 -1
- package/dist/components/Board/style.css +36 -15
- package/dist/components/Button/style.css +19 -10
- package/dist/components/ButtonGroup/index.cjs.map +1 -1
- package/dist/components/ButtonGroup/index.d.cts +1 -1
- package/dist/components/ButtonGroup/index.d.ts +1 -1
- package/dist/components/ButtonGroup/index.js.map +1 -1
- package/dist/components/ButtonGroup/style.css +4 -20
- package/dist/components/Choice/style.css +10 -9
- package/dist/components/CollectionView/index.cjs +1 -1
- package/dist/components/CollectionView/index.js +1 -1
- package/dist/components/CollectionView/style.css +8 -11
- package/dist/components/ColourField/index.cjs +1 -1
- package/dist/components/ColourField/index.js +1 -1
- package/dist/components/ColourField/style.css +28 -17
- package/dist/components/DatePicker/index.cjs +1 -1
- package/dist/components/DatePicker/index.js +1 -1
- package/dist/components/DatePicker/style.css +10 -3
- package/dist/components/Drawer/index.cjs +1 -1
- package/dist/components/Drawer/index.js +1 -1
- package/dist/components/Drawer/style.css +11 -22
- package/dist/components/EditLayout/index.cjs +1 -1
- package/dist/components/EditLayout/index.cjs.map +1 -1
- package/dist/components/EditLayout/index.js +2 -2
- package/dist/components/EditLayout/index.js.map +1 -1
- package/dist/components/EditLayout/style.css +10 -5
- package/dist/components/EntryPicker/index.cjs +1 -1
- package/dist/components/EntryPicker/index.js +1 -1
- package/dist/components/EntryPicker/style.css +43 -19
- package/dist/components/Field/style.css +6 -5
- package/dist/components/FormEditor/README.md +21 -5
- package/dist/components/FormEditor/index.cjs +1 -1
- package/dist/components/FormEditor/index.js +1 -1
- package/dist/components/ImageCropper/style.css +20 -20
- package/dist/components/Menu/style.css +2 -3
- package/dist/components/Modal/index.cjs +1 -1
- package/dist/components/Modal/index.cjs.map +1 -1
- package/dist/components/Modal/index.js +1 -1
- package/dist/components/Modal/index.js.map +1 -1
- package/dist/components/Modal/style.css +7 -5
- package/dist/components/Popover/style.css +2 -2
- package/dist/components/RichTextEditor/index.cjs +1 -1
- package/dist/components/RichTextEditor/index.js +1 -1
- package/dist/components/RichTextEditor/style.css +59 -42
- package/dist/components/SelectionCard/index.cjs +1 -1
- package/dist/components/SelectionCard/index.cjs.map +1 -1
- package/dist/components/SelectionCard/index.d.cts.map +1 -1
- package/dist/components/SelectionCard/index.d.ts.map +1 -1
- package/dist/components/SelectionCard/index.js +5 -1
- package/dist/components/SelectionCard/index.js.map +1 -1
- package/dist/components/SelectionCard/style.css +39 -12
- package/dist/components/SideNav/index.cjs +1 -1
- package/dist/components/SideNav/index.cjs.map +1 -1
- package/dist/components/SideNav/index.d.cts +3 -3
- package/dist/components/SideNav/index.d.ts +3 -3
- package/dist/components/SideNav/index.js +15 -3
- package/dist/components/SideNav/index.js.map +1 -1
- package/dist/components/SideNav/style.css +19 -13
- package/dist/components/Slider/style.css +12 -14
- package/dist/components/SortableList/index.cjs +1 -1
- package/dist/components/SortableList/index.cjs.map +1 -1
- package/dist/components/SortableList/index.js +6 -2
- package/dist/components/SortableList/index.js.map +1 -1
- package/dist/components/SortableList/style.css +20 -5
- package/dist/components/Stepper/style.css +8 -9
- package/dist/components/SubNav/index.cjs.map +1 -1
- package/dist/components/SubNav/index.d.cts +2 -2
- package/dist/components/SubNav/index.d.ts +2 -2
- package/dist/components/SubNav/index.js.map +1 -1
- package/dist/components/SubNav/style.css +3 -8
- package/dist/components/Switch/index.cjs +1 -1
- package/dist/components/Switch/index.cjs.map +1 -1
- package/dist/components/Switch/index.d.cts.map +1 -1
- package/dist/components/Switch/index.d.ts.map +1 -1
- package/dist/components/Switch/index.js +2 -2
- package/dist/components/Switch/index.js.map +1 -1
- package/dist/components/Switch/style.css +14 -6
- package/dist/components/Table/index.cjs +1 -1
- package/dist/components/Table/index.cjs.map +1 -1
- package/dist/components/Table/index.js +2 -2
- package/dist/components/Table/index.js.map +1 -1
- package/dist/components/Table/style.css +34 -22
- package/dist/components/TagsInput/index.cjs +1 -1
- package/dist/components/TagsInput/index.cjs.map +1 -1
- package/dist/components/TagsInput/index.js +1 -1
- package/dist/components/TagsInput/index.js.map +1 -1
- package/dist/components/TagsInput/style.css +31 -6
- package/dist/components/Time/style.css +1 -1
- package/dist/components/Toast/style.css +1 -1
- package/dist/components/TopNav/index.cjs +1 -1
- package/dist/components/TopNav/index.cjs.map +1 -1
- package/dist/components/TopNav/index.d.cts +4 -4
- package/dist/components/TopNav/index.d.ts +4 -4
- package/dist/components/TopNav/index.js +5 -1
- package/dist/components/TopNav/index.js.map +1 -1
- package/dist/components/TopNav/style.css +6 -9
- package/dist/elements.css +0 -1
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +2 -2
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +44 -44
- package/dist/message.css +8 -14
- package/dist/tokens.css +101 -43
- package/package.json +1 -1
- package/dist/chunks/Board-DFuJt2Oh.cjs.map +0 -1
- package/dist/chunks/CollectionView-BNYx29b1.cjs +0 -2
- package/dist/chunks/CollectionView-BNYx29b1.cjs.map +0 -1
- package/dist/chunks/CollectionView-Vj84E26b.js.map +0 -1
- package/dist/chunks/ColourField--rS9KDpq.cjs +0 -2
- package/dist/chunks/ColourField--rS9KDpq.cjs.map +0 -1
- package/dist/chunks/ColourField-DkO8tjeB.js.map +0 -1
- package/dist/chunks/DatePicker-B8tllGYy.js.map +0 -1
- package/dist/chunks/DatePicker-OiqjoO-f.cjs +0 -2
- package/dist/chunks/DatePicker-OiqjoO-f.cjs.map +0 -1
- package/dist/chunks/Drawer-BDX9_qHA.cjs +0 -2
- package/dist/chunks/Drawer-BDX9_qHA.cjs.map +0 -1
- package/dist/chunks/Drawer-DTtgAZO2.js.map +0 -1
- package/dist/chunks/EntryPicker-BI_7g2Wg.cjs +0 -2
- package/dist/chunks/EntryPicker-BI_7g2Wg.cjs.map +0 -1
- package/dist/chunks/EntryPicker-KxHZzZsh.js.map +0 -1
- package/dist/chunks/RichTextEditor-BXyhSeJd.cjs +0 -2
- package/dist/chunks/RichTextEditor-BXyhSeJd.cjs.map +0 -1
- package/dist/chunks/RichTextEditor-DmNM63Wg.js.map +0 -1
- package/dist/chunks/use-picker-session-BDEWL2jK.js.map +0 -1
- package/dist/chunks/use-picker-session-C4FGinLN.cjs +0 -2
- package/dist/chunks/use-picker-session-C4FGinLN.cjs.map +0 -1
package/README.md
CHANGED
|
@@ -77,7 +77,7 @@ Field supplies labels and validation relationships. Button supplies action styli
|
|
|
77
77
|
|
|
78
78
|
## Component catalogue
|
|
79
79
|
|
|
80
|
-
All **
|
|
80
|
+
All **51 families** and **103 runtime exports** are listed below, including compound components, hooks and helpers. Each family links to a practical guide and its source stories. Run Storybook locally for interactive examples; this README does not assume a hosted Storybook. Exported TypeScript declarations provide the detailed prop reference.
|
|
81
81
|
|
|
82
82
|
### Collection and editing catalogue
|
|
83
83
|
|
|
@@ -157,7 +157,7 @@ All **50 families** and **103 runtime exports** are listed below, including comp
|
|
|
157
157
|
| [Board](#board) | `Board`, `BoardColumn`, `BoardCard` | [Stories](https://github.com/namroodinc/liquid-editorial/blob/main/src/components/Board/Board.stories.tsx) |
|
|
158
158
|
| [SortableList](#sortablelist) | `SortableList`, `SortableListItem` | [Stories](https://github.com/namroodinc/liquid-editorial/blob/main/src/components/SortableList/SortableList.stories.tsx) |
|
|
159
159
|
| [AssetCard](#assetcard) | `AssetCard`, `AssetCardSkeleton` | [Stories](https://github.com/namroodinc/liquid-editorial/blob/main/src/components/AssetCard/AssetCard.stories.tsx) |
|
|
160
|
-
| [AssetGrid](#assetgrid) | `AssetGrid`, `
|
|
160
|
+
| [AssetGrid](#assetgrid) | `AssetGrid`, `AssetGridEmpty` | [Stories](https://github.com/namroodinc/liquid-editorial/blob/main/src/components/AssetGrid/AssetGrid.stories.tsx) |
|
|
161
161
|
| [ImageCropper](#imagecropper) | `ImageCropper`, `cropToBlob` | [Stories](https://github.com/namroodinc/liquid-editorial/blob/main/src/components/ImageCropper/ImageCropper.stories.tsx) |
|
|
162
162
|
|
|
163
163
|
## Actions and feedback
|
|
@@ -208,7 +208,7 @@ export function ViewPicker() {
|
|
|
208
208
|
{["list", "grid"].map((item) => (
|
|
209
209
|
<Button
|
|
210
210
|
key={item}
|
|
211
|
-
variant={view === item ? "
|
|
211
|
+
variant={view === item ? "primary" : "neutral"}
|
|
212
212
|
aria-pressed={view === item}
|
|
213
213
|
onClick={() => setView(item)}
|
|
214
214
|
>
|
|
@@ -220,7 +220,7 @@ export function ViewPicker() {
|
|
|
220
220
|
}
|
|
221
221
|
```
|
|
222
222
|
|
|
223
|
-
Give a meaningful group an accessible name
|
|
223
|
+
Give a meaningful group an accessible name. Use `variant="primary"` and `aria-pressed` for selected segments; the group only controls spacing and corners, and adds no selection rail.
|
|
224
224
|
|
|
225
225
|
### Menu
|
|
226
226
|
|
|
@@ -335,7 +335,7 @@ export function MetadataDrawer() {
|
|
|
335
335
|
}
|
|
336
336
|
```
|
|
337
337
|
|
|
338
|
-
`side="start"` and `"end"` mirror in RTL; `"bottom"` creates a bottom sheet. All sides have square corners and slide through their anchored edge. Motion follows `--duration-panel` and `--ease-panel`, with reduced-motion support.
|
|
338
|
+
`side="start"` and `"end"` mirror in RTL; `"bottom"` creates a bottom sheet. All sides have square corners and slide through their anchored edge. Motion follows `--duration-panel` and `--ease-panel`, with reduced-motion support. Panels separate from the page with a shadow; they have no outer borders.
|
|
339
339
|
|
|
340
340
|
Use `variant="navigation"` for compact navigation, `closeLabel` for contextual dismissal copy, and a React-node `title` for a brand. Supply `aria-label` for an independent dialog name. `portalContainer` can keep a navigation drawer inside a positioned element; the default covers the viewport from `document.body`.
|
|
341
341
|
|
|
@@ -388,6 +388,8 @@ Tones are `neutral` (default), `info`, `success`, `warning`, `danger`, and `revi
|
|
|
388
388
|
The icon is hidden by default: pass `icon="auto"` for the tone's icon,
|
|
389
389
|
`icon="none"` to hide it explicitly, or an `IconName` such as `"clock"`.
|
|
390
390
|
|
|
391
|
+
Banners use tone fills and icons without a start rail or extra rail padding.
|
|
392
|
+
|
|
391
393
|
```tsx
|
|
392
394
|
import { useState } from "react";
|
|
393
395
|
import { Banner, Button } from "@namroodinc/liquid-editorial";
|
|
@@ -466,7 +468,7 @@ Provider notifications dismiss automatically after five seconds unless `duration
|
|
|
466
468
|
|
|
467
469
|
### Badge
|
|
468
470
|
|
|
469
|
-
A non-interactive editorial label. Use `shape="status"` for publication state, `"tag"` (the default) for metadata, and `"count"` for totals. Appearance defaults to `"
|
|
471
|
+
A non-interactive editorial label. Use `shape="status"` for publication state, `"tag"` (the default) for metadata, and `"count"` for totals. Appearance defaults to `"soft"`; `"solid"` emphasizes one state. These are the only supported appearances.
|
|
470
472
|
|
|
471
473
|
Set `size="sm"` for condensed labels or `"lg"` for more prominent labels. The default `"md"` keeps the existing size. All three sizes work with every shape and appearance; their standard heights are 20px, 24px, and 28px respectively.
|
|
472
474
|
|
|
@@ -1150,7 +1152,7 @@ ColourField supports normal textbox props, refs, `size`, `readOnly`, `isDisabled
|
|
|
1150
1152
|
|
|
1151
1153
|
### EntryPicker
|
|
1152
1154
|
|
|
1153
|
-
Select entries or assets from app-provided items. The value is an ordered array of IDs in both single and multiple mode. The picker owns search, its selection modal, and optional ordering; the app owns loading and persistence. Selected items
|
|
1155
|
+
Select entries or assets from app-provided items. The value is an ordered array of IDs in both single and multiple mode. The picker owns search, its selection modal, and optional ordering; the app owns loading and persistence. Selected items use fills and draft/removed state styling without rails. The surrounding Field and list have no added surface or padding.
|
|
1154
1156
|
|
|
1155
1157
|
```tsx
|
|
1156
1158
|
import { useState } from "react";
|
|
@@ -1289,7 +1291,7 @@ General forms can use select fields with `options: [{ value, label }]`, per-fiel
|
|
|
1289
1291
|
|
|
1290
1292
|
`columns` sets the most columns and defaults to one. The form drops a column whenever a field would be narrower than `minColumnWidth` (default `16rem`), measured against the form's own width, so it steps down inside drawers and modals. Use `columns="auto"` to fit as many columns as the width allows. FormEditor is not a size container, so it keeps its content width in flex rows and popovers.
|
|
1291
1293
|
|
|
1292
|
-
Plain `hr` elements
|
|
1294
|
+
Plain `hr` elements retain separator semantics and spacing without a painted rule. This style is included in `styles.css` and the optional reset. FormEditor separators use the form's grid gap instead of their global block margins.
|
|
1293
1295
|
|
|
1294
1296
|
Changes emit `onValueChange(nextValues, { fieldId })`. Use the changed field ID when adapting to APIs that accept patches, generated IDs, or dependent values. Runtime form schemas can hold JSX and live choices, so keep them separate from persisted content definitions. Picker field options such as `picker: { itemLabel: "image", itemsLabel: "images" }` provide contextual search and selection copy without putting data access in the library. `picker.label` overrides the field's name: its legend, accessible name, default "Choose …" action and required message. Omitted or `undefined` item and action options keep the asset or entry wording.
|
|
1295
1297
|
|
|
@@ -1659,7 +1661,7 @@ Zero results display “No results” and disable every control. `isDisabled` al
|
|
|
1659
1661
|
|
|
1660
1662
|
### Table
|
|
1661
1663
|
|
|
1662
|
-
Composable native table elements with a
|
|
1664
|
+
Composable native table elements with a borderless surface, filled toolbar, alternating rows and empty state.
|
|
1663
1665
|
|
|
1664
1666
|
```tsx
|
|
1665
1667
|
import {
|
|
@@ -1706,7 +1708,7 @@ import {
|
|
|
1706
1708
|
|
|
1707
1709
|
Empty TableBody children automatically show “No data found.” across the table. Override with `emptyMessage`; use `isEmpty` when custom row components determine results, or `isEmpty={false}` while loading. The consuming UI composes skeleton rows/loading indicators. Standalone TableEmpty supports an optional icon, description, and action.
|
|
1708
1710
|
|
|
1709
|
-
TableRow supports `isSelected` and `isInteractive`; an interactive appearance still needs real link/Button controls and handlers. Cells support `align="start"`/`"end"`, `width="control"`, and emphasis `default`/`primary`/`muted`. Preserve captions/header scopes. Set native `colSpan` explicitly when composing custom spanning cells.
|
|
1711
|
+
Alternate rows step 3% text from the table's own ground, so a Table alternates on the canvas or any panel as well as inside a TableFrame. TableRow supports `isSelected` and `isInteractive`; an interactive appearance still needs real link/Button controls and handlers. Cells support `align="start"`/`"end"`, `width="control"`, and emphasis `default`/`primary`/`muted`. Preserve captions/header scopes. Set native `colSpan` explicitly when composing custom spanning cells.
|
|
1710
1712
|
|
|
1711
1713
|
### Board
|
|
1712
1714
|
|
|
@@ -1858,8 +1860,8 @@ An auto-filling media grid. `isLoading` substitutes eight skeletons by default;
|
|
|
1858
1860
|
import {
|
|
1859
1861
|
AssetGrid,
|
|
1860
1862
|
AssetGridEmpty,
|
|
1861
|
-
|
|
1862
|
-
|
|
1863
|
+
AssetCard,
|
|
1864
|
+
AssetCardSkeleton,
|
|
1863
1865
|
} from "@namroodinc/liquid-editorial";
|
|
1864
1866
|
|
|
1865
1867
|
export function MediaLibrary({
|
|
@@ -1876,7 +1878,7 @@ export function MediaLibrary({
|
|
|
1876
1878
|
loadingCount={4}
|
|
1877
1879
|
>
|
|
1878
1880
|
{files.map((file) => (
|
|
1879
|
-
<
|
|
1881
|
+
<AssetCard
|
|
1880
1882
|
key={file.id}
|
|
1881
1883
|
name={file.name}
|
|
1882
1884
|
src={file.src}
|
|
@@ -1894,10 +1896,10 @@ export function MediaLibrary({
|
|
|
1894
1896
|
);
|
|
1895
1897
|
}
|
|
1896
1898
|
|
|
1897
|
-
<
|
|
1899
|
+
<AssetCardSkeleton />;
|
|
1898
1900
|
```
|
|
1899
1901
|
|
|
1900
|
-
|
|
1902
|
+
Use AssetCard and AssetCardSkeleton from the package root or `components/AssetCard`; the AssetGrid entry point exports the grid and its empty state. Place the grid in TableFrame for a collection page or directly inside a drawer. The application loads files and supplies upload/select actions.
|
|
1901
1903
|
|
|
1902
1904
|
### ImageCropper
|
|
1903
1905
|
|
|
@@ -1956,7 +1958,7 @@ Changing `aspect` resets pan and zoom while preserving rotation. There is no rat
|
|
|
1956
1958
|
|
|
1957
1959
|
## Themes and fonts
|
|
1958
1960
|
|
|
1959
|
-
Set `data-theme` on the document root to `light` (the default), `dark`, `cherry-glaze`, or `black-hawaii`. The system font stacks can be overridden with tokens; the package does not download bundled fonts.
|
|
1961
|
+
Set `data-theme` on the document root to `light` (the default), `dark`, `cherry-glaze`, or `black-hawaii`. TopNav uses `--color-header`, the canvas stepped darker (near-black in dark themes), so it separates from both the page and the sidebar surface; its controls derive fills against that header ground. Unchecked choices and off switches use the softer `--fill-indicator`, controlled by the theme-scoped `--indicator-tint`. The system font stacks can be overridden with tokens; the package does not download bundled fonts.
|
|
1960
1962
|
|
|
1961
1963
|
```css
|
|
1962
1964
|
:root {
|
|
@@ -1967,12 +1969,24 @@ Set `data-theme` on the document root to `light` (the default), `dark`, `cherry-
|
|
|
1967
1969
|
|
|
1968
1970
|
Theme tokens are included in `styles.css`. Import `@namroodinc/liquid-editorial/tokens.css` when you only need the token system. Keep themes on the document root so body-portaled dialogs and popovers inherit them. Overlays opened from inside a component that knows its place on the page carry that place's `data-theme`, `lang` and `dir` as attributes: a Popover takes them from its anchor, and RichTextEditor's expanded view, link dialog and anything opened from them take them from the editor. Other Modals and Drawers inherit from the document root; pass `dir` to Drawer explicitly where needed. Layouts support RTL and reduced-motion preferences where described in their guides.
|
|
1969
1971
|
|
|
1970
|
-
Colours the tokens derive from a theme re-derive on every `data-theme` element, so a themed subtree or overlay uses its own theme's values. These are the field fill
|
|
1972
|
+
Colours the tokens derive from a theme re-derive on every `data-theme` element, so a themed subtree or overlay uses its own theme's values. These are the field and control fill ladders, bands, indicators, soft hover and pressed fills, tone text and status aliases. Override them on `:root, [data-theme]` rather than `:root` alone. Decorative rails are limited to AssetCard and Table row selections; their colour remains a root-level setting. Navigation, fields, editors, picker rows, selection cards and both message appearances use fills/text instead, with normal padding. Decorative borders and their tokens have been removed; see the Unreleased migration checklist in UPGRADING.md. A custom container with its own fill sets `--field-bg` and carries `ds-field-surface`, so fields and buttons inside it rest, hover, focus and press against that fill:
|
|
1971
1973
|
|
|
1972
1974
|
```html
|
|
1973
1975
|
<section class="ds-field-surface" style="--field-bg: var(--color-surface)">…</section>
|
|
1974
1976
|
```
|
|
1975
1977
|
|
|
1978
|
+
Selection cards, sortable list items, EntryPicker items, AssetCards and the rich-text editor rest on `--fill-card`: the surface on the canvas, lowered to `--fill-row-alt` inside Modal, Drawer and TableFrame so they still separate from those panels. A custom surface-coloured container that hosts them sets the same value, for example `style="--field-bg: var(--color-surface); --fill-card: var(--fill-row-alt)"`.
|
|
1979
|
+
|
|
1980
|
+
Neutral Buttons, tag/count/draft/archived Badges and initials Avatars step from the fill they sit on. A field surface that paints a hover or active fill over its ground names it in `--field-paint`, as library rows and cards do, so their contents step from the painted fill instead:
|
|
1981
|
+
|
|
1982
|
+
```css
|
|
1983
|
+
.my-row:hover {
|
|
1984
|
+
--field-paint: var(--field-hover);
|
|
1985
|
+
|
|
1986
|
+
background: var(--field-hover);
|
|
1987
|
+
}
|
|
1988
|
+
```
|
|
1989
|
+
|
|
1976
1990
|
## Upgrading
|
|
1977
1991
|
|
|
1978
1992
|
Read [UPGRADING.md](https://github.com/namroodinc/liquid-editorial/blob/main/UPGRADING.md) for adoption, compatibility, and verification steps between your previous and installed versions. The guide and AGENTS.md ship alongside the package manifest in `node_modules/@namroodinc/liquid-editorial/`.
|
|
@@ -2018,7 +2032,7 @@ stays operable while a page loads, so focus stays on the pressed Next or Previou
|
|
|
2018
2032
|
button; pass `pagination.isDisabled` to lock it. A pending selection also locks it.
|
|
2019
2033
|
Optional `filter`, `mine`, `view`, `selection` and `actions` configure the toolbar.
|
|
2020
2034
|
The grid/table `view` switch uses an attached ButtonGroup with pressed-state
|
|
2021
|
-
styling and a
|
|
2035
|
+
styling and a 2px gap between its two buttons.
|
|
2022
2036
|
The selected count is announced from a status region present before selection.
|
|
2023
2037
|
When Clear or a selection action leaves with focus, focus returns to the title.
|
|
2024
2038
|
The application owns filtering, records, eligibility, selection and requests.
|
package/UPGRADING.md
CHANGED
|
@@ -2,6 +2,258 @@
|
|
|
2
2
|
|
|
3
3
|
## Unreleased
|
|
4
4
|
|
|
5
|
+
## 0.12.0
|
|
6
|
+
|
|
7
|
+
### Breaking changes
|
|
8
|
+
|
|
9
|
+
The library now uses borderless fills, bands, alternating rows, spacing and
|
|
10
|
+
asset/table selection rails. The following APIs are **removed**, with no
|
|
11
|
+
compatibility aliases or deprecation period. Update every application and shared package that consumes
|
|
12
|
+
them before adopting this release. Keyboard focus outlines remain supported.
|
|
13
|
+
|
|
14
|
+
| Removed API | Replacement / required action |
|
|
15
|
+
| --- | --- |
|
|
16
|
+
| Badge `appearance="outline"`, including the `BadgeAppearance` member | Omit `appearance` for the new `soft` default, or pass `appearance="soft"`. Only `soft` and `solid` remain. Update stored/configured values as well as JSX. |
|
|
17
|
+
| `AssetTile` | `AssetCard` |
|
|
18
|
+
| `AssetTileSkeleton` | `AssetCardSkeleton` |
|
|
19
|
+
| `AssetTileProps` | `AssetCardProps` |
|
|
20
|
+
| `AssetTileSkeletonProps` | `AssetCardSkeletonProps` |
|
|
21
|
+
| AssetTile exports/types from `components/AssetGrid` | Import the AssetCard replacements from the package root or `components/AssetCard`. AssetGrid retains its grid and empty-state exports. |
|
|
22
|
+
| `--frame-width`, `--frame-color` | Remove frame overrides. Use a surface fill on canvas, with shadows for overlays. |
|
|
23
|
+
| `--rule-width`, `--rule-color` | Remove separator overrides. Use spacing, row fills or header/footer bands. Semantic separators keep their roles without a painted rule. |
|
|
24
|
+
| `--control-border-width` | Use `--focus-width` for focus outlines. Remove border terms from layout/image calculations; do not replace them with focus width. |
|
|
25
|
+
| `--control-border-color` | Remove stroke overrides. Choose the supported control fill or semantic rail colour instead. |
|
|
26
|
+
| `--badge-border-width` | Remove the override. Badge padding now includes the removed border space: each default padding token is 2px larger. Add 2px to any custom `--badge-pad-block`, `--badge-sm-pad-block`, `--badge-pad-inline` or `--badge-count-pad-inline` value to keep the old size. |
|
|
27
|
+
| `--color-primary-border` | Primary soft fill; only asset/table selections retain a rail. |
|
|
28
|
+
| `--color-success-border` | Success soft fill and icon/text tone. |
|
|
29
|
+
| `--color-warning-border` | Warning soft fill and icon/text tone. |
|
|
30
|
+
| `--color-danger-border` | Danger soft fill and icon/text tone. |
|
|
31
|
+
| `--color-review-border` | Review soft fill and icon/text tone. |
|
|
32
|
+
| `--storyblock-bar-border` | Remove the override; use the existing `--storyblock-bar-bg` for bar fill. |
|
|
33
|
+
| `--message-border` | Remove the override; use message soft fill and icon tone. Toast's `--toast-tone` remains supported. |
|
|
34
|
+
| `--colour-thumb-ring` | Remove the override; colour thumbs carry a fixed surface-and-text halo over the shared shadow. |
|
|
35
|
+
| `.ds-asset-tile` and all `.ds-asset-tile__*` hooks | Replace the prefix with `.ds-asset-card`, retaining the suffix. The old classes are neither emitted nor styled. |
|
|
36
|
+
|
|
37
|
+
Complete retired CSS hook inventory (each maps to the same suffix under
|
|
38
|
+
`ds-asset-card`):
|
|
39
|
+
|
|
40
|
+
```text
|
|
41
|
+
ds-asset-tile
|
|
42
|
+
ds-asset-tile__actions
|
|
43
|
+
ds-asset-tile__hit
|
|
44
|
+
ds-asset-tile__link
|
|
45
|
+
ds-asset-tile__meta
|
|
46
|
+
ds-asset-tile__name
|
|
47
|
+
ds-asset-tile__pending
|
|
48
|
+
ds-asset-tile__pending-label
|
|
49
|
+
ds-asset-tile__placeholder
|
|
50
|
+
ds-asset-tile__spinner
|
|
51
|
+
ds-asset-tile__text
|
|
52
|
+
ds-asset-tile__thumb
|
|
53
|
+
ds-asset-tile__thumb-skeleton
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
Adoption:
|
|
57
|
+
|
|
58
|
+
1. Rename the AssetTile imports, JSX, types and selector hooks using the table.
|
|
59
|
+
For example, replace
|
|
60
|
+
`import { AssetTile, type AssetTileProps } from "@namroodinc/liquid-editorial/components/AssetGrid"`
|
|
61
|
+
with
|
|
62
|
+
`import { AssetCard, type AssetCardProps } from "@namroodinc/liquid-editorial/components/AssetCard"`.
|
|
63
|
+
2. Replace Badge outline configuration with `soft`, or remove the explicit prop.
|
|
64
|
+
Update selectors for `data-appearance="outline"` to `soft`, and refresh visual
|
|
65
|
+
expectations for badges whose appearance was omitted.
|
|
66
|
+
3. Remove the retired token declarations and uses. Do not retain local copies
|
|
67
|
+
of the removed borders to recreate the old treatment. Custom containers still
|
|
68
|
+
set `--field-bg` and carry `ds-field-surface`; the field and new control fill
|
|
69
|
+
ladders then derive against that ground.
|
|
70
|
+
4. Search each consuming repository, including shared packages, generated
|
|
71
|
+
schemas/configuration, themes and CSS-in-JS. These commands intentionally also
|
|
72
|
+
find comments and snapshots that may need review:
|
|
73
|
+
|
|
74
|
+
```sh
|
|
75
|
+
rg -n 'AssetTile(Skeleton)?(Props)?|ds-asset-tile' . --glob '!node_modules/**' --glob '!dist/**'
|
|
76
|
+
rg -n 'outline' . --glob '!node_modules/**' --glob '!dist/**' --glob '*.{ts,tsx,js,jsx,json,css,scss}'
|
|
77
|
+
rg -n --glob '!node_modules/**' --glob '!dist/**' -- '--(frame-(width|color)|rule-(width|color)|control-border-(width|color)|badge-border-width|color-(primary|success|warning|danger|review)-border|storyblock-bar-border|message-border|colour-thumb-ring)' .
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
Inspect `outline` matches: remove the Badge appearance and its selectors;
|
|
81
|
+
preserve keyboard focus styles. Adjust search roots to the consumer's layout.
|
|
82
|
+
|
|
83
|
+
Changes and compatibility:
|
|
84
|
+
|
|
85
|
+
- Decorative rails are limited to selected AssetCard tiles and Table rows.
|
|
86
|
+
Toasts, navigation, fields, selection cards, picker rows, collection toolbars,
|
|
87
|
+
editors and blockquotes have no start/bottom rails, including invalid, draft,
|
|
88
|
+
missing and selected states. Existing fills, text/icon cues and keyboard focus
|
|
89
|
+
remain. Padding no longer reserves space for removed rails; field affixes keep
|
|
90
|
+
their measured spacing. Asset/table selection geometry and RTL rails remain.
|
|
91
|
+
- Banners and Toasts share rail-free message styles with symmetric padding;
|
|
92
|
+
floating Toasts retain their outer shadow and icon tone. `--toast-tone` now
|
|
93
|
+
recolours the icon only. Remove local overrides that restore other rails.
|
|
94
|
+
Keep `--rail-width`, `--rail-color` and `--rail-direction` overrides scoped to
|
|
95
|
+
asset/table selection styling. Functional slider/colour tracks, stepper
|
|
96
|
+
connectors, usage rings and layout sidebars remain supported.
|
|
97
|
+
- Unchecked radio/checkbox fills and off switches are softer: `--indicator-tint`
|
|
98
|
+
is 50% in light, 45% in dark/Black Hawaii and 59% in Cherry Glaze. Their
|
|
99
|
+
built-in background pairs retain at least 3:1 contrast. Unchecked choices
|
|
100
|
+
hover to `--fill-indicator-hover`; off switches hover and press through
|
|
101
|
+
`--fill-indicator-hover` and `--fill-indicator-pressed`, which Switch maps
|
|
102
|
+
onto Button's neutral variant. Checked states retain their primary fill. An
|
|
103
|
+
invalid Switch renders Button's `danger` variant (`data-variant="danger"`)
|
|
104
|
+
whether on or off, and its knob position still shows the state; update
|
|
105
|
+
selectors that matched `aria-invalid` styling on the track. In an invalid
|
|
106
|
+
SelectionCard group, checked cards mix the danger tint into their selected
|
|
107
|
+
fill, so they stay distinct from unchecked cards. Stepper numbers keep their stronger fill for readability, and the
|
|
108
|
+
current step keeps its soft primary fill (the `active` Button variant when
|
|
109
|
+
navigable), distinct from solid completed steps.
|
|
110
|
+
- TopNav uses the new `--color-header`: the canvas stepped darker (6% text in
|
|
111
|
+
light palettes, 85% black in dark ones), so the header separates from the
|
|
112
|
+
canvas beside the sidebar as well as from SideNav's surface. Dark-theme
|
|
113
|
+
headers are near-black. Nested controls re-derive against the header.
|
|
114
|
+
Consumers overriding header backgrounds should set this token on
|
|
115
|
+
`:root, [data-theme]`, or keep their custom `--field-bg` and background
|
|
116
|
+
aligned. A custom dark palette sets `--color-header` itself.
|
|
117
|
+
- Attached ButtonGroups use 2px gaps; selected segments use the primary Button
|
|
118
|
+
variant with no selection rail. Update consumer groups from
|
|
119
|
+
`variant={selected ? "active" : "neutral"}` to
|
|
120
|
+
`variant={selected ? "primary" : "neutral"}`, retaining `aria-pressed`. A
|
|
121
|
+
focused attached segment is lifted above its neighbours so its focus ring is
|
|
122
|
+
never painted over. Table rows alternate instead of carrying rules: the
|
|
123
|
+
alternate row is 3% text into the table's own ground (`--table-row-alt`,
|
|
124
|
+
declared on `.ds-table`), so a Table on the canvas or a panel alternates as
|
|
125
|
+
visibly as one in a TableFrame.
|
|
126
|
+
Drawers have no page-facing border; overlay separation comes from shadows.
|
|
127
|
+
- Drag placeholders (Board cards and lanes, SortableList items with a custom
|
|
128
|
+
overlay) are recessed slots: the pressed step of their own fill, distinct
|
|
129
|
+
from the lane and from resting items. Their drag handles stay visible, so
|
|
130
|
+
keyboard focus and its ring remain on the handle throughout a keyboard drag.
|
|
131
|
+
- Selection cards, sortable list items, EntryPicker items and results,
|
|
132
|
+
AssetCards and the rich-text editor's writing area rest on the new
|
|
133
|
+
`--fill-card`: `--color-surface` on the canvas, lowered to `--fill-row-alt`
|
|
134
|
+
inside Modal, Drawer and TableFrame so they keep their shape there. The
|
|
135
|
+
editor toolbar and storyblocks step from the same fill. A custom
|
|
136
|
+
surface-coloured container hosting them sets
|
|
137
|
+
`--fill-card: var(--fill-row-alt)`.
|
|
138
|
+
- Every library ground (panels, toolbars, footers, cards, messages, raised
|
|
139
|
+
surfaces) now paints `var(--field-bg)`, so its controls derive from the fill
|
|
140
|
+
it actually shows. Setting `--field-bg` on one of these containers now
|
|
141
|
+
repaints it as well. The EditLayout details rail and sheet use the band as
|
|
142
|
+
their ground (the rail now carries `ds-field-surface`), and navigation Drawer
|
|
143
|
+
footers use the surface they paint.
|
|
144
|
+
- Field hover is now the weakest field state: invalid fields keep their danger
|
|
145
|
+
fill under the pointer, and keyboard-focused fields keep their focus fill.
|
|
146
|
+
- Neutral soft Badges (tags, counts, draft and archived) and initials Avatars
|
|
147
|
+
use `--fill-control`, a step from the fill they sit on, so they read on the
|
|
148
|
+
canvas, the header, bands and any surface. Toned statuses keep their status
|
|
149
|
+
fills. `--status-draft-text` and `--status-archived-text` are now 50% text
|
|
150
|
+
into muted (60% in Cherry Glaze), so those labels keep 4.5:1 on every
|
|
151
|
+
neutral and hovered step; custom status tabs using them get the darker ink.
|
|
152
|
+
- New `--field-paint`: a field surface that paints a hover, drag or active
|
|
153
|
+
fill over its ground names it here, and `--fill-control` and its steps derive
|
|
154
|
+
from it. Hovered and dragged SortableList items, Board cards and lanes,
|
|
155
|
+
SelectionCards, AssetCards, interactive and selected Table rows, and hovered
|
|
156
|
+
or active SideNav rows (now field surfaces) set it, so badges, avatars and
|
|
157
|
+
neutral Buttons inside step from the fill actually shown. Every surface
|
|
158
|
+
resets it to `initial`. Custom hoverable containers set
|
|
159
|
+
`--field-paint: var(--field-hover)` beside their hover background and carry
|
|
160
|
+
`ds-field-surface`.
|
|
161
|
+
- TagsInput chips step 8% text from the field's current fill (rest, hover,
|
|
162
|
+
focus or invalid, exposed as `--tags-fill`) and are field surfaces, so chips
|
|
163
|
+
and their remove Buttons stay visible in every field state.
|
|
164
|
+
- Grouped avatars are cut apart by a transparent 2px gap (a CSS mask), so the
|
|
165
|
+
gap shows whatever is painted behind the group, including hovered rows. A
|
|
166
|
+
focused avatar rises uncut above its neighbour. Remove local rings or
|
|
167
|
+
borders added to separate grouped avatars.
|
|
168
|
+
- EntryPicker draft and removed items change only their ground, so reorderable
|
|
169
|
+
items step on hover and as drag placeholders like any other item. A
|
|
170
|
+
SortableList drag overlay keeps the list's card fill instead of the hover
|
|
171
|
+
step. It copies none of the item's classes or data attributes, so a toned
|
|
172
|
+
overlay is styled through `renderDragOverlay` content.
|
|
173
|
+
- Horizontal rules in the rich-text editor (`---`, saved as `horizontalRule`)
|
|
174
|
+
paint a 2px bar in `--fill-control-pressed`, and a selected rule shows the
|
|
175
|
+
focus outline. Bare page `hr` elements keep spacing only.
|
|
176
|
+
- The first SideNav section after a SideNavHeader has a tighter top padding.
|
|
177
|
+
- ColourPanel thumbs carry a surface ring and a text ring, so the selection is
|
|
178
|
+
visible over the colour it sits on. Swatches have an inner text-tinted
|
|
179
|
+
hairline, so a swatch matching the panel stays visible. Calendar and
|
|
180
|
+
ColourPanel header bands step 7% text from the raised panel, so they read in
|
|
181
|
+
every theme, including Black Hawaii and Cherry Glaze.
|
|
182
|
+
- Storyblocks have no start rail on the block or title bar, including selected,
|
|
183
|
+
draft and missing states. State fills and keyboard focus outlines remain;
|
|
184
|
+
bar/body padding no longer reserves rail space. Saved values and callbacks
|
|
185
|
+
are unchanged. Remove local CSS that restores a storyblock start rail.
|
|
186
|
+
- Light's `--color-surface-subtle` moves from `#eef2f7` to `#e9edf3` so bands,
|
|
187
|
+
Board lanes, the EditLayout rail, footers, neutral banners and empty states
|
|
188
|
+
separate from the canvas. Cherry Glaze bands and warning fills, and Black
|
|
189
|
+
Hawaii bands, raised surfaces and success/warning/danger fills, change to
|
|
190
|
+
keep states distinguishable.
|
|
191
|
+
Tone text is adjusted where the new soft fills need stronger contrast.
|
|
192
|
+
- New tokens: `--focus-width`, `--fill-control`, `--fill-control-hover`,
|
|
193
|
+
`--fill-control-pressed`, `--fill-indicator`, `--fill-indicator-hover`,
|
|
194
|
+
`--fill-indicator-pressed`, `--fill-band`, `--fill-row-alt`, `--fill-card`,
|
|
195
|
+
`--field-paint`, `--indicator-tint`, `--color-header`, `--button-active-bg`
|
|
196
|
+
and `--rail-direction`.
|
|
197
|
+
The field tint ladder is now 7/10/14/18%; invalid fill is 12% danger.
|
|
198
|
+
- `--button-active-bg` is the `active` Button variant's rest fill
|
|
199
|
+
(`--color-primary-soft` by default). Containers with a primary-soft selected
|
|
200
|
+
fill (selected Table rows, SelectionCards, AssetCards, EntryPicker results,
|
|
201
|
+
CollectionView selection toolbars and Board drop targets) raise it to
|
|
202
|
+
`--color-primary-soft-pressed` so active buttons stay visible. Hover and press
|
|
203
|
+
step from it on the soft ladder. A custom container with a soft selected fill
|
|
204
|
+
sets `--button-active-bg` to a fill that differs from its own.
|
|
205
|
+
- `--rail-direction` is `1` in left-to-right scopes and `-1` in right-to-left
|
|
206
|
+
ones, including nested `dir` scopes. The library derives it from `dir`;
|
|
207
|
+
multiply horizontal inset offsets for asset/table selection rails by it.
|
|
208
|
+
- Badge small/medium/large heights remain 20/24/28px. Fixed control heights,
|
|
209
|
+
picker contracts, callbacks, saved values and FormEditor schemas are unchanged.
|
|
210
|
+
`--asset-tile-min-width` and `--asset-tile-gap` remain supported grid sizing
|
|
211
|
+
tokens; they are not component aliases. Existing semantic colour tokens such
|
|
212
|
+
as `--color-border-strong` still support graphics, status and crop guides.
|
|
213
|
+
|
|
214
|
+
Verification for consuming projects:
|
|
215
|
+
|
|
216
|
+
- Repeat the searches and resolve all active code/configuration matches for
|
|
217
|
+
removed APIs. Run typecheck, tests and production builds for every consuming
|
|
218
|
+
application and shared package. Confirm package-root and component imports.
|
|
219
|
+
- Check all four themes, custom themed subtrees and nested overlays. Confirm
|
|
220
|
+
fields, buttons, badges and selected rows separate from their local ground.
|
|
221
|
+
- Exercise keyboard focus, checked/unchecked/indeterminate and disabled states,
|
|
222
|
+
validation, attached groups, selected/draft/missing items, drag placeholders,
|
|
223
|
+
contained images and expanded rich-text editors. Verify grouped selections
|
|
224
|
+
match primary Buttons in rest/hover/press/disabled states. Confirm rails appear
|
|
225
|
+
only on selected asset cards and table rows, including RTL. Check invalid
|
|
226
|
+
fields/editors, navigation, quotes, picker states and both message appearances
|
|
227
|
+
without rails or rail padding. Check softer
|
|
228
|
+
unchecked/off controls, and the distinct header/sidebar fills, including
|
|
229
|
+
header actions and scoped themes. Check narrow layouts and RTL.
|
|
230
|
+
- Hover invalid and keyboard-focused fields: the danger or focus fill remains.
|
|
231
|
+
Tab through attached ButtonGroups and confirm each focus ring is complete.
|
|
232
|
+
Drag Board cards, Board lanes and custom-overlay SortableList items with the
|
|
233
|
+
keyboard: the placeholder reads as a slot and the handle keeps its ring.
|
|
234
|
+
- Place selection cards, sortable lists, EntryPickers, AssetGrids and rich-text
|
|
235
|
+
editors on the canvas, in a Modal, a Drawer, a TableFrame and any custom
|
|
236
|
+
surface-coloured container: each keeps a visible shape. Check AvatarGroups
|
|
237
|
+
(including inside hovered rows), avatars and badges on the TopNav header,
|
|
238
|
+
neutral banners and Board lanes on the canvas, the EditLayout details rail
|
|
239
|
+
and narrow sheet, ColourPanel thumbs over matching colours, white and
|
|
240
|
+
near-surface swatches, and Calendar/ColourPanel headers in all themes.
|
|
241
|
+
- Hover SideNav rows with count badges, and hover and drag draft or removed
|
|
242
|
+
items in a reorderable EntryPicker. Hover interactive Table rows, cards and
|
|
243
|
+
list items that hold tag, draft or archived Badges and initials Avatars:
|
|
244
|
+
each stays visible on the hover fill. Put draft and archived Badges on bands
|
|
245
|
+
(the EditLayout rail, toolbars, footers) and the header.
|
|
246
|
+
- Type, hover, focus and invalidate a TagsInput: chips and their remove
|
|
247
|
+
Buttons stay visible. Place a bare Table on the canvas and confirm rows
|
|
248
|
+
alternate. Confirm the TopNav separates from the canvas beside the SideNav.
|
|
249
|
+
Insert `---` in a rich-text editor and select the rule. Show a SelectionCard
|
|
250
|
+
group error with some cards checked: checked cards remain distinct.
|
|
251
|
+
Hover and press `active` Buttons inside selected rows and cards: each step
|
|
252
|
+
moves further from rest.
|
|
253
|
+
- Confirm selection/errors do not move text or affixes, Badge sizes remain
|
|
254
|
+
stable, and saved form/editor values round-trip without changes. Refresh
|
|
255
|
+
affected visual snapshots only after inspecting the new styling.
|
|
256
|
+
|
|
5
257
|
## 0.11.0
|
|
6
258
|
|
|
7
259
|
### Breaking changes
|
|
@@ -117,7 +117,7 @@ var A = (e, t) => {
|
|
|
117
117
|
strategy: C,
|
|
118
118
|
children: U
|
|
119
119
|
}) : U, /* @__PURE__ */ d(p, { children: [E && N === "card" ? /* @__PURE__ */ d("div", {
|
|
120
|
-
className: "ds-board-card",
|
|
120
|
+
className: "ds-board-card ds-field-surface",
|
|
121
121
|
"data-overlay": !0,
|
|
122
122
|
children: [/* @__PURE__ */ u("span", {
|
|
123
123
|
className: "ds-board-card__handle",
|
|
@@ -128,7 +128,7 @@ var A = (e, t) => {
|
|
|
128
128
|
children: i?.(E)
|
|
129
129
|
})]
|
|
130
130
|
}) : null, E && N === "column" ? /* @__PURE__ */ u("div", {
|
|
131
|
-
className: "ds-board-column",
|
|
131
|
+
className: "ds-board-column ds-field-surface",
|
|
132
132
|
"data-overlay": !0,
|
|
133
133
|
children: o?.(E)
|
|
134
134
|
}) : null] })]
|
|
@@ -157,7 +157,11 @@ var A = (e, t) => {
|
|
|
157
157
|
transform: D.Translate.toString(C),
|
|
158
158
|
transition: w
|
|
159
159
|
},
|
|
160
|
-
className: [
|
|
160
|
+
className: [
|
|
161
|
+
"ds-board-column",
|
|
162
|
+
"ds-field-surface",
|
|
163
|
+
l
|
|
164
|
+
].filter(Boolean).join(" "),
|
|
161
165
|
"data-over": h === "card" && g === e || void 0,
|
|
162
166
|
"data-dragging": O || void 0,
|
|
163
167
|
"aria-label": r,
|
|
@@ -214,7 +218,11 @@ var A = (e, t) => {
|
|
|
214
218
|
transform: D.Translate.toString(h),
|
|
215
219
|
transition: g
|
|
216
220
|
},
|
|
217
|
-
className: [
|
|
221
|
+
className: [
|
|
222
|
+
"ds-board-card",
|
|
223
|
+
"ds-field-surface",
|
|
224
|
+
a
|
|
225
|
+
].filter(Boolean).join(" "),
|
|
218
226
|
"data-dragging": _ || void 0,
|
|
219
227
|
"data-idle": v && v !== e ? "" : void 0,
|
|
220
228
|
...c,
|
|
@@ -236,4 +244,4 @@ var A = (e, t) => {
|
|
|
236
244
|
//#endregion
|
|
237
245
|
export { F as n, P as r, N as t };
|
|
238
246
|
|
|
239
|
-
//# sourceMappingURL=Board-
|
|
247
|
+
//# sourceMappingURL=Board-BCS7sDXg.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Board-Cnyqrc-R.js","names":["Icon","mergeRefs","columnMove","over","data","columnId","\"type\"","\"columnId\"","toIndex","columnIds","active","cardMove","fromColumnId","onCard","toColumnId","\"sortable\"","\"items\"","boardCoordinateGetter","args","event","containers","context","c","a","b","activeRect","rect","currentCoordinates","sortableKeyboardCoordinates","boardCollisionDetection","isColumn","type","container","scoped","closestCorners","within","pointerWithin","rank","id","BoardContext","createContext","Board","forwardRef","rest","dndId","useId","activeId","setActiveId","useState","activeType","setActiveType","overColumnId","setOverColumnId","sensors","useSensors","useSensor","PointerSensor","KeyboardSensor","handleStart","useCallback","handleOver","overData","reset","handleEnd","move","onColumnMove","onMove","value","useMemo","board","className","DndContext","MeasuringStrategy","SortableContext","horizontalListSortingStrategy","DragOverlay","renderDragOverlay","renderColumnDragOverlay","BoardColumn","useContext","setBodyRef","useDroppable","itemIds","setColumnRef","useSortable","isDraggable","ref","CSS","transform","isDragging","title","Button","attributes","listeners","count","action","verticalListSortingStrategy","BoardCard","setNodeRef","label"],"sources":["../../src/components/Board/moves.ts","../../src/components/Board/keyboard.ts","../../src/components/Board/index.tsx"],"sourcesContent":["import type { DragEndEvent } from \"@dnd-kit/core\";\nimport type { BoardColumnMove, BoardMove } from \".\";\n\nexport function columnMove(\n { active, over }: DragEndEvent,\n columnIds: string[],\n): BoardColumnMove | undefined {\n if (!over) {\n return;\n }\n const data = over.data.current ?? {};\n const columnId = data[\"type\"] === \"column\" ? String(over.id) : String(data[\"columnId\"] ?? \"\");\n const toIndex = columnIds.indexOf(columnId);\n if (toIndex < 0 || columnId === String(active.id)) {\n return;\n }\n return { columnId: String(active.id), toIndex };\n}\n\nexport function cardMove({ active, over }: DragEndEvent): BoardMove | undefined {\n if (!over) {\n return;\n }\n const fromColumnId = String(active.data.current?.[\"columnId\"] ?? \"\");\n const data = over.data.current ?? {};\n const onCard = data[\"type\"] === \"card\";\n const toColumnId = String(data[\"columnId\"] ?? (onCard ? \"\" : over.id));\n // A card occupies a precise slot; empty lane space appends to the lane.\n const toIndex = onCard\n ? ((data[\"sortable\"] as { index: number } | undefined)?.index ?? 0)\n : ((data[\"items\"] as string[] | undefined) ?? []).length;\n if (!toColumnId) {\n return;\n }\n if (fromColumnId === toColumnId && String(active.id) === String(over.id)) {\n return;\n }\n return { cardId: String(active.id), fromColumnId, toColumnId, toIndex };\n}\n","import type { KeyboardCoordinateGetter } from \"@dnd-kit/core\";\nimport { sortableKeyboardCoordinates } from \"@dnd-kit/sortable\";\n\n/**\n * Arrow up/down sorts inside a lane; left/right jumps lanes, which the stock\n * sortable getter does not do.\n */\nexport const boardCoordinateGetter: KeyboardCoordinateGetter = (event, args) => {\n const { currentCoordinates, context } = args;\n if (event.code === \"ArrowLeft\" || event.code === \"ArrowRight\") {\n const containers = context.droppableContainers\n .getEnabled()\n .filter((c) => c.data.current?.[\"type\"] === \"column-body\")\n .sort((a, b) => (a.rect.current?.left ?? 0) - (b.rect.current?.left ?? 0));\n const activeRect = context.active?.rect.current.translated;\n if (!activeRect) {\n return undefined;\n }\n const index = containers.findIndex(\n (c) =>\n (c.rect.current?.left ?? 0) <= activeRect.left + 1 &&\n (c.rect.current?.right ?? 0) >= activeRect.left - 1,\n );\n const next = containers[index + (event.code === \"ArrowRight\" ? 1 : -1)];\n const rect = next?.rect.current;\n if (!rect) {\n return undefined;\n }\n event.preventDefault();\n return { x: rect.left + rect.width / 2 - activeRect.width / 2, y: currentCoordinates.y };\n }\n return sortableKeyboardCoordinates(event, args);\n};\n","import {\n createContext,\n forwardRef,\n useCallback,\n useContext,\n useId,\n useMemo,\n useState,\n type HTMLAttributes,\n type ReactNode,\n} from \"react\";\nimport {\n DndContext,\n DragOverlay,\n KeyboardSensor,\n PointerSensor,\n closestCorners,\n pointerWithin,\n MeasuringStrategy,\n useDroppable,\n useSensor,\n useSensors,\n type CollisionDetection,\n type DragEndEvent,\n type DragOverEvent,\n type DragStartEvent,\n} from \"@dnd-kit/core\";\nimport {\n SortableContext,\n horizontalListSortingStrategy,\n useSortable,\n verticalListSortingStrategy,\n} from \"@dnd-kit/sortable\";\nimport { CSS } from \"@dnd-kit/utilities\";\nimport { Button } from \"../Button\";\nimport { Icon } from \"../Icon\";\nimport { mergeRefs } from \"../../internal/mergeRefs\";\nimport { cardMove, columnMove } from \"./moves\";\nimport { boardCoordinateGetter } from \"./keyboard\";\nimport \"./style.css\";\n\nexport interface BoardMove {\n cardId: string;\n fromColumnId: string;\n toColumnId: string;\n /** Index the card lands on inside the destination column. */\n toIndex: number;\n}\n\nexport interface BoardColumnMove {\n columnId: string;\n toIndex: number;\n}\n\ninterface BoardContextValue {\n activeId: string | null;\n activeType: \"card\" | \"column\" | null;\n /** The lane the pointer is currently over, whatever it is actually over. */\n overColumnId: string | null;\n}\n\n/**\n * A lane's body sits inside the lane's frame, so a raw corner-distance\n * strategy lets the body steal the hit from the lane itself — most visibly at\n * the board ends, where the last lane then never shifts aside to open the\n * drop gap. Resolve by what is being dragged: a column only ever hits other\n * columns; a card hits the card under the pointer first, then the lane body\n * under it, then whatever is nearest.\n */\nconst boardCollisionDetection: CollisionDetection = (args) => {\n const isColumn = args.active.data.current?.[\"type\"] === \"column\";\n const containers = args.droppableContainers.filter((container) => {\n const type = container.data.current?.[\"type\"];\n return isColumn ? type === \"column\" : type !== \"column\";\n });\n const scoped = { ...args, droppableContainers: containers };\n if (isColumn) {\n return closestCorners(scoped);\n }\n const within = pointerWithin(scoped);\n if (within.length > 0) {\n const rank = (id: (typeof within)[number][\"id\"]) =>\n containers.find((c) => c.id === id)?.data.current?.[\"type\"] === \"card\" ? 0 : 1;\n return [...within].sort((a, b) => rank(a.id) - rank(b.id));\n }\n return closestCorners(scoped);\n};\n\nconst BoardContext = createContext<BoardContextValue>({\n activeId: null,\n activeType: null,\n overColumnId: null,\n});\n\nexport interface BoardProps extends Omit<HTMLAttributes<HTMLDivElement>, \"onDragEnd\"> {\n /** Column ids in render order. Required for columns to be re-orderable. */\n columnIds?: string[];\n /** Fired once a card is dropped somewhere new. Apply it to your own state. */\n onMove?: (move: BoardMove) => void;\n /** Fired once a column is dropped in a new position. */\n onColumnMove?: (move: BoardColumnMove) => void;\n /** Rendered inside the drag overlay while a card is in the air. */\n renderDragOverlay?: (cardId: string) => ReactNode;\n /** Rendered inside the drag overlay while a column is in the air. */\n renderColumnDragOverlay?: (columnId: string) => ReactNode;\n children?: ReactNode;\n}\n\n/**\n * A column board with pointer and keyboard dragging. The board owns the drag\n * mechanics only — the card data stays yours; react to `onMove`.\n */\nexport const Board = forwardRef<HTMLDivElement, BoardProps>(function Board(\n {\n columnIds,\n onMove,\n onColumnMove,\n renderDragOverlay,\n renderColumnDragOverlay,\n className,\n children,\n ...rest\n },\n ref,\n) {\n const dndId = useId();\n const [activeId, setActiveId] = useState<string | null>(null);\n const [activeType, setActiveType] = useState<\"card\" | \"column\" | null>(null);\n const [overColumnId, setOverColumnId] = useState<string | null>(null);\n const sensors = useSensors(\n useSensor(PointerSensor, { activationConstraint: { distance: 4 } }),\n useSensor(KeyboardSensor, { coordinateGetter: boardCoordinateGetter }),\n );\n\n const handleStart = useCallback((event: DragStartEvent) => {\n setActiveId(String(event.active.id));\n setActiveType(event.active.data.current?.[\"type\"] === \"column\" ? \"column\" : \"card\");\n }, []);\n\n /* Cards land on cards as often as on empty space, so the lane a drag is over\n * is always resolved back to a column id — one highlight, one meaning. */\n const handleOver = useCallback((event: DragOverEvent) => {\n const over = event.over;\n if (!over) {\n setOverColumnId(null);\n return;\n }\n const overData = over.data.current ?? {};\n const columnId =\n overData[\"type\"] === \"column\" ? String(over.id) : String(overData[\"columnId\"] ?? \"\");\n setOverColumnId(columnId || null);\n }, []);\n\n const reset = useCallback(() => {\n setActiveId(null);\n setActiveType(null);\n setOverColumnId(null);\n }, []);\n\n const handleEnd = useCallback(\n (event: DragEndEvent) => {\n const { active, over } = event;\n reset();\n if (!over) {\n return;\n }\n\n /* Columns reorder among themselves; a column never lands inside a lane. */\n if (active.data.current?.[\"type\"] === \"column\") {\n const move = columnMove(event, columnIds ?? []);\n if (move) {\n onColumnMove?.(move);\n }\n } else {\n const move = cardMove(event);\n if (move) {\n onMove?.(move);\n }\n }\n },\n [columnIds, onColumnMove, onMove, reset],\n );\n\n const value = useMemo(\n () => ({ activeId, activeType, overColumnId }),\n [activeId, activeType, overColumnId],\n );\n\n const board = (\n <div\n ref={ref}\n className={[\"ds-board\", className].filter(Boolean).join(\" \")}\n {...rest}\n >\n {children}\n </div>\n );\n\n return (\n <BoardContext.Provider value={value}>\n <DndContext\n id={`ds-board-${dndId}`}\n sensors={sensors}\n collisionDetection={boardCollisionDetection}\n /* Lanes scroll and change height mid-drag, so positions are re-read\n * continuously — without this the shift animation misfires. */\n measuring={{ droppable: { strategy: MeasuringStrategy.Always } }}\n\n onDragStart={handleStart}\n onDragOver={handleOver}\n onDragEnd={handleEnd}\n onDragCancel={reset}\n >\n {columnIds ? (\n <SortableContext\n items={columnIds}\n strategy={horizontalListSortingStrategy}\n >\n {board}\n </SortableContext>\n ) : (\n board\n )}\n <DragOverlay>\n {activeId && activeType === \"card\" ? (\n <div\n className=\"ds-board-card\"\n data-overlay\n >\n <span\n className=\"ds-board-card__handle\"\n aria-hidden=\"true\"\n >\n <Icon name=\"grip-vertical\" />\n </span>\n <div className=\"ds-board-card__content\">{renderDragOverlay?.(activeId)}</div>\n </div>\n ) : null}\n {activeId && activeType === \"column\" ? (\n <div\n className=\"ds-board-column\"\n data-overlay\n >\n {renderColumnDragOverlay?.(activeId)}\n </div>\n ) : null}\n </DragOverlay>\n </DndContext>\n </BoardContext.Provider>\n );\n});\n\nexport interface BoardColumnProps extends HTMLAttributes<HTMLDivElement> {\n id: string;\n title: string;\n /** Card ids in render order — the sortable contract for this column. */\n itemIds: string[];\n /** Shown beside the title; defaults to the number of cards. */\n count?: number;\n /** A control in the column head, e.g. an add button or a menu. */\n action?: ReactNode;\n /** Set false to pin a lane in place. */\n isDraggable?: boolean;\n children?: ReactNode;\n}\n\n/**\n * One lane of the board. Heavy frame, hairline head rule, scrolling body, and\n * a grip on top of the head that drags the whole lane sideways.\n */\nexport const BoardColumn = forwardRef<HTMLElement, BoardColumnProps>(function BoardColumn(\n { id, title, itemIds, count, action, isDraggable = true, className, children, ...rest },\n ref,\n) {\n const { activeType, overColumnId } = useContext(BoardContext);\n const { setNodeRef: setBodyRef } = useDroppable({\n id: `${id}::body`,\n data: { type: \"column-body\", columnId: id, items: itemIds },\n });\n const {\n attributes,\n listeners,\n setNodeRef: setColumnRef,\n transform,\n transition,\n isDragging,\n } = useSortable({\n id,\n disabled: !isDraggable,\n data: { type: \"column\", columnId: id, items: itemIds },\n });\n\n return (\n <section\n ref={mergeRefs(setColumnRef, ref)}\n style={{ transform: CSS.Translate.toString(transform), transition }}\n className={[\"ds-board-column\", className].filter(Boolean).join(\" \")}\n data-over={(activeType === \"card\" && overColumnId === id) || undefined}\n data-dragging={isDragging || undefined}\n\n aria-label={title}\n {...rest}\n >\n {isDraggable && (\n <Button\n variant=\"simple\"\n size=\"sm\"\n iconStart=\"grip-horizontal\"\n className=\"ds-board-column__grip\"\n aria-label={`Reorder ${title}`}\n {...attributes}\n {...listeners}\n />\n )}\n <header className=\"ds-board-column__head\">\n <span className=\"ds-board-column__title\">{title}</span>\n <span className=\"ds-board-column__count\">{count ?? itemIds.length}</span>\n {action && <span className=\"ds-board-column__action\">{action}</span>}\n </header>\n <div\n ref={setBodyRef}\n className=\"ds-board-column__body\"\n >\n <SortableContext\n items={itemIds}\n strategy={verticalListSortingStrategy}\n >\n {children}\n </SortableContext>\n </div>\n </section>\n );\n});\n\nexport interface BoardCardProps extends HTMLAttributes<HTMLDivElement> {\n id: string;\n columnId: string;\n /** Accessible name announced when the card is picked up. */\n label?: string;\n children?: ReactNode;\n}\n\n/**\n * A draggable card. The grip on the left is the handle, so the card body can\n * hold links and buttons; the grip is a real button for keyboard users:\n * space to pick up, arrows to move, space to drop.\n */\nexport const BoardCard = forwardRef<HTMLDivElement, BoardCardProps>(function BoardCard(\n { id, columnId, label, className, children, ...rest },\n ref,\n) {\n const { attributes, listeners, setNodeRef, transform, transition, isDragging } = useSortable({\n id,\n data: { type: \"card\", columnId },\n });\n const { activeId } = useContext(BoardContext);\n\n return (\n <div\n ref={mergeRefs(setNodeRef, ref)}\n style={{ transform: CSS.Translate.toString(transform), transition }}\n className={[\"ds-board-card\", className].filter(Boolean).join(\" \")}\n data-dragging={isDragging || undefined}\n data-idle={activeId && activeId !== id ? \"\" : undefined}\n {...rest}\n >\n <Button\n variant=\"simple\"\n size=\"sm\"\n isIconOnly\n iconStart=\"grip-vertical\"\n className=\"ds-board-card__handle\"\n aria-label={label ? `Move ${label}` : \"Move card\"}\n {...attributes}\n {...listeners}\n />\n <div className=\"ds-board-card__content\">{children}</div>\n </div>\n );\n});\n"],"mappings":";;;;;;;;;AAGA,SAAgBE,EACd,EAAE,WAAQ,WACV,GAC6B;CAC7B,IAAI,CAACC,GACH;CAEF,IAAMC,IAAOD,EAAK,KAAK,WAAW,CAAC,GAC7BE,IAAWD,EAAKE,SAAY,WAAW,OAAOH,EAAK,EAAE,IAAI,OAAOC,EAAKG,YAAe,EAAE,GACtFC,IAAUC,EAAU,QAAQJ,CAAQ;CAC1C,IAAI,MAAU,KAAKA,MAAa,OAAOK,EAAO,EAAE,IAGhD,OAAO;EAAE,UAAU,OAAOA,EAAO,EAAE;EAAG;CAAQ;AAChD;AAEA,SAAgBC,EAAS,EAAE,WAAQ,WAA6C;CAC9E,IAAI,CAACR,GACH;CAEF,IAAMS,IAAe,OAAOF,EAAO,KAAK,SAAUH,YAAe,EAAE,GAC7DH,IAAOD,EAAK,KAAK,WAAW,CAAC,GAC7BU,IAAST,EAAKE,SAAY,QAC1BQ,IAAa,OAAOV,EAAKG,aAAgBM,IAAS,KAAKV,EAAK,GAAG,GAE/DK,IAAUK,IACVT,EAAKW,UAA+C,SAAS,KAC7DX,EAAKY,SAAqC,CAAC,EAAA,CAAG;CACpD,IAAKF,MAGDF,MAAiBE,KAAc,OAAOJ,EAAO,EAAE,MAAM,OAAOP,EAAK,EAAE,IAGvE,OAAO;EAAE,QAAQ,OAAOO,EAAO,EAAE;EAAG;EAAc;EAAY;CAAQ;AACxE;;;AC/BA,IAAa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;IACL,WAAU;IAEV,UAAA,kBAACP,GAAD;KACE,OAAOS;KACP,UAAUc;KAET;IACc,CAAA;GACd,CAAA;EACE;;AAEb,CAAC,GAeYC,IAAYvD,EAA2C,SAClE,EAAE,OAAI,aAAU,UAAO,cAAW,aAAU,GAAGC,KAC/C,GACA;CACA,IAAM,EAAE,eAAY,cAAW,eAAY,cAAW,eAAY,kBAAeyC,EAAY;EAC3F;EACA,MAAM;GAAE,MAAM;GAAQ;EAAS;CACjC,CAAC,GACK,EAAE,gBAAaL,EAAWxC,CAAY;CAE5C,OACE,kBAAC,OAAD;EACE,KAAKtC,EAAUiG,GAAYZ,CAAG;EAC9B,OAAO;GAAE,WAAWC,EAAI,UAAU,SAASC,CAAS;GAAG;EAAW;EAClE,WAAW,CAAC,iBAAiBlB,CAAS,CAAC,CAAC,OAAO,OAAO,CAAC,CAAC,KAAK,GAAG;EAChE,iBAAemB,KAAc,KAAA;EAC7B,aAAW3C,KAAYA,MAAaR,IAAK,KAAK,KAAA;EAC9C,GAAIK;EANN,UAAA,CAQE,kBAACgD,GAAD;GACE,SAAQ;GACR,MAAK;GACL,YAAA;GACA,WAAU;GACV,WAAU;GACV,cAAYQ,IAAQ,QAAQA,MAAU;GACtC,GAAIP;GACJ,GAAIC;EACL,CAAA,GACD,kBAAC,OAAD;GAAK,WAAU;GAA0B;EAAc,CAAA,CACpD;;AAET,CAAC"}
|
|
1
|
+
{"version":3,"file":"Board-BCS7sDXg.js","names":["Icon","mergeRefs","columnMove","over","data","columnId","\"type\"","\"columnId\"","toIndex","columnIds","active","cardMove","fromColumnId","onCard","toColumnId","\"sortable\"","\"items\"","boardCoordinateGetter","args","event","containers","context","c","a","b","activeRect","rect","currentCoordinates","sortableKeyboardCoordinates","boardCollisionDetection","isColumn","type","container","scoped","closestCorners","within","pointerWithin","rank","id","BoardContext","createContext","Board","forwardRef","rest","dndId","useId","activeId","setActiveId","useState","activeType","setActiveType","overColumnId","setOverColumnId","sensors","useSensors","useSensor","PointerSensor","KeyboardSensor","handleStart","useCallback","handleOver","overData","reset","handleEnd","move","onColumnMove","onMove","value","useMemo","board","className","DndContext","MeasuringStrategy","SortableContext","horizontalListSortingStrategy","DragOverlay","renderDragOverlay","renderColumnDragOverlay","BoardColumn","useContext","setBodyRef","useDroppable","itemIds","setColumnRef","useSortable","isDraggable","ref","CSS","transform","isDragging","title","Button","attributes","listeners","count","action","verticalListSortingStrategy","BoardCard","setNodeRef","label"],"sources":["../../src/components/Board/moves.ts","../../src/components/Board/keyboard.ts","../../src/components/Board/index.tsx"],"sourcesContent":["import type { DragEndEvent } from \"@dnd-kit/core\";\nimport type { BoardColumnMove, BoardMove } from \".\";\n\nexport function columnMove(\n { active, over }: DragEndEvent,\n columnIds: string[],\n): BoardColumnMove | undefined {\n if (!over) {\n return;\n }\n const data = over.data.current ?? {};\n const columnId = data[\"type\"] === \"column\" ? String(over.id) : String(data[\"columnId\"] ?? \"\");\n const toIndex = columnIds.indexOf(columnId);\n if (toIndex < 0 || columnId === String(active.id)) {\n return;\n }\n return { columnId: String(active.id), toIndex };\n}\n\nexport function cardMove({ active, over }: DragEndEvent): BoardMove | undefined {\n if (!over) {\n return;\n }\n const fromColumnId = String(active.data.current?.[\"columnId\"] ?? \"\");\n const data = over.data.current ?? {};\n const onCard = data[\"type\"] === \"card\";\n const toColumnId = String(data[\"columnId\"] ?? (onCard ? \"\" : over.id));\n // A card occupies a precise slot; empty lane space appends to the lane.\n const toIndex = onCard\n ? ((data[\"sortable\"] as { index: number } | undefined)?.index ?? 0)\n : ((data[\"items\"] as string[] | undefined) ?? []).length;\n if (!toColumnId) {\n return;\n }\n if (fromColumnId === toColumnId && String(active.id) === String(over.id)) {\n return;\n }\n return { cardId: String(active.id), fromColumnId, toColumnId, toIndex };\n}\n","import type { KeyboardCoordinateGetter } from \"@dnd-kit/core\";\nimport { sortableKeyboardCoordinates } from \"@dnd-kit/sortable\";\n\n/**\n * Arrow up/down sorts inside a lane; left/right jumps lanes, which the stock\n * sortable getter does not do.\n */\nexport const boardCoordinateGetter: KeyboardCoordinateGetter = (event, args) => {\n const { currentCoordinates, context } = args;\n if (event.code === \"ArrowLeft\" || event.code === \"ArrowRight\") {\n const containers = context.droppableContainers\n .getEnabled()\n .filter((c) => c.data.current?.[\"type\"] === \"column-body\")\n .sort((a, b) => (a.rect.current?.left ?? 0) - (b.rect.current?.left ?? 0));\n const activeRect = context.active?.rect.current.translated;\n if (!activeRect) {\n return undefined;\n }\n const index = containers.findIndex(\n (c) =>\n (c.rect.current?.left ?? 0) <= activeRect.left + 1 &&\n (c.rect.current?.right ?? 0) >= activeRect.left - 1,\n );\n const next = containers[index + (event.code === \"ArrowRight\" ? 1 : -1)];\n const rect = next?.rect.current;\n if (!rect) {\n return undefined;\n }\n event.preventDefault();\n return { x: rect.left + rect.width / 2 - activeRect.width / 2, y: currentCoordinates.y };\n }\n return sortableKeyboardCoordinates(event, args);\n};\n","import {\n createContext,\n forwardRef,\n useCallback,\n useContext,\n useId,\n useMemo,\n useState,\n type HTMLAttributes,\n type ReactNode,\n} from \"react\";\nimport {\n DndContext,\n DragOverlay,\n KeyboardSensor,\n PointerSensor,\n closestCorners,\n pointerWithin,\n MeasuringStrategy,\n useDroppable,\n useSensor,\n useSensors,\n type CollisionDetection,\n type DragEndEvent,\n type DragOverEvent,\n type DragStartEvent,\n} from \"@dnd-kit/core\";\nimport {\n SortableContext,\n horizontalListSortingStrategy,\n useSortable,\n verticalListSortingStrategy,\n} from \"@dnd-kit/sortable\";\nimport { CSS } from \"@dnd-kit/utilities\";\nimport { Button } from \"../Button\";\nimport { Icon } from \"../Icon\";\nimport { mergeRefs } from \"../../internal/mergeRefs\";\nimport { cardMove, columnMove } from \"./moves\";\nimport { boardCoordinateGetter } from \"./keyboard\";\nimport \"./style.css\";\n\nexport interface BoardMove {\n cardId: string;\n fromColumnId: string;\n toColumnId: string;\n /** Index the card lands on inside the destination column. */\n toIndex: number;\n}\n\nexport interface BoardColumnMove {\n columnId: string;\n toIndex: number;\n}\n\ninterface BoardContextValue {\n activeId: string | null;\n activeType: \"card\" | \"column\" | null;\n /** The lane the pointer is currently over, whatever it is actually over. */\n overColumnId: string | null;\n}\n\n/**\n * A lane's body sits inside the lane's frame, so a raw corner-distance\n * strategy lets the body steal the hit from the lane itself — most visibly at\n * the board ends, where the last lane then never shifts aside to open the\n * drop gap. Resolve by what is being dragged: a column only ever hits other\n * columns; a card hits the card under the pointer first, then the lane body\n * under it, then whatever is nearest.\n */\nconst boardCollisionDetection: CollisionDetection = (args) => {\n const isColumn = args.active.data.current?.[\"type\"] === \"column\";\n const containers = args.droppableContainers.filter((container) => {\n const type = container.data.current?.[\"type\"];\n return isColumn ? type === \"column\" : type !== \"column\";\n });\n const scoped = { ...args, droppableContainers: containers };\n if (isColumn) {\n return closestCorners(scoped);\n }\n const within = pointerWithin(scoped);\n if (within.length > 0) {\n const rank = (id: (typeof within)[number][\"id\"]) =>\n containers.find((c) => c.id === id)?.data.current?.[\"type\"] === \"card\" ? 0 : 1;\n return [...within].sort((a, b) => rank(a.id) - rank(b.id));\n }\n return closestCorners(scoped);\n};\n\nconst BoardContext = createContext<BoardContextValue>({\n activeId: null,\n activeType: null,\n overColumnId: null,\n});\n\nexport interface BoardProps extends Omit<HTMLAttributes<HTMLDivElement>, \"onDragEnd\"> {\n /** Column ids in render order. Required for columns to be re-orderable. */\n columnIds?: string[];\n /** Fired once a card is dropped somewhere new. Apply it to your own state. */\n onMove?: (move: BoardMove) => void;\n /** Fired once a column is dropped in a new position. */\n onColumnMove?: (move: BoardColumnMove) => void;\n /** Rendered inside the drag overlay while a card is in the air. */\n renderDragOverlay?: (cardId: string) => ReactNode;\n /** Rendered inside the drag overlay while a column is in the air. */\n renderColumnDragOverlay?: (columnId: string) => ReactNode;\n children?: ReactNode;\n}\n\n/**\n * A column board with pointer and keyboard dragging. The board owns the drag\n * mechanics only — the card data stays yours; react to `onMove`.\n */\nexport const Board = forwardRef<HTMLDivElement, BoardProps>(function Board(\n {\n columnIds,\n onMove,\n onColumnMove,\n renderDragOverlay,\n renderColumnDragOverlay,\n className,\n children,\n ...rest\n },\n ref,\n) {\n const dndId = useId();\n const [activeId, setActiveId] = useState<string | null>(null);\n const [activeType, setActiveType] = useState<\"card\" | \"column\" | null>(null);\n const [overColumnId, setOverColumnId] = useState<string | null>(null);\n const sensors = useSensors(\n useSensor(PointerSensor, { activationConstraint: { distance: 4 } }),\n useSensor(KeyboardSensor, { coordinateGetter: boardCoordinateGetter }),\n );\n\n const handleStart = useCallback((event: DragStartEvent) => {\n setActiveId(String(event.active.id));\n setActiveType(event.active.data.current?.[\"type\"] === \"column\" ? \"column\" : \"card\");\n }, []);\n\n /* Cards land on cards as often as on empty space, so the lane a drag is over\n * is always resolved back to a column id — one highlight, one meaning. */\n const handleOver = useCallback((event: DragOverEvent) => {\n const over = event.over;\n if (!over) {\n setOverColumnId(null);\n return;\n }\n const overData = over.data.current ?? {};\n const columnId =\n overData[\"type\"] === \"column\" ? String(over.id) : String(overData[\"columnId\"] ?? \"\");\n setOverColumnId(columnId || null);\n }, []);\n\n const reset = useCallback(() => {\n setActiveId(null);\n setActiveType(null);\n setOverColumnId(null);\n }, []);\n\n const handleEnd = useCallback(\n (event: DragEndEvent) => {\n const { active, over } = event;\n reset();\n if (!over) {\n return;\n }\n\n /* Columns reorder among themselves; a column never lands inside a lane. */\n if (active.data.current?.[\"type\"] === \"column\") {\n const move = columnMove(event, columnIds ?? []);\n if (move) {\n onColumnMove?.(move);\n }\n } else {\n const move = cardMove(event);\n if (move) {\n onMove?.(move);\n }\n }\n },\n [columnIds, onColumnMove, onMove, reset],\n );\n\n const value = useMemo(\n () => ({ activeId, activeType, overColumnId }),\n [activeId, activeType, overColumnId],\n );\n\n const board = (\n <div\n ref={ref}\n className={[\"ds-board\", className].filter(Boolean).join(\" \")}\n {...rest}\n >\n {children}\n </div>\n );\n\n return (\n <BoardContext.Provider value={value}>\n <DndContext\n id={`ds-board-${dndId}`}\n sensors={sensors}\n collisionDetection={boardCollisionDetection}\n /* Lanes scroll and change height mid-drag, so positions are re-read\n * continuously — without this the shift animation misfires. */\n measuring={{ droppable: { strategy: MeasuringStrategy.Always } }}\n\n onDragStart={handleStart}\n onDragOver={handleOver}\n onDragEnd={handleEnd}\n onDragCancel={reset}\n >\n {columnIds ? (\n <SortableContext\n items={columnIds}\n strategy={horizontalListSortingStrategy}\n >\n {board}\n </SortableContext>\n ) : (\n board\n )}\n <DragOverlay>\n {activeId && activeType === \"card\" ? (\n <div\n className=\"ds-board-card ds-field-surface\"\n data-overlay\n >\n <span\n className=\"ds-board-card__handle\"\n aria-hidden=\"true\"\n >\n <Icon name=\"grip-vertical\" />\n </span>\n <div className=\"ds-board-card__content\">{renderDragOverlay?.(activeId)}</div>\n </div>\n ) : null}\n {activeId && activeType === \"column\" ? (\n <div\n className=\"ds-board-column ds-field-surface\"\n data-overlay\n >\n {renderColumnDragOverlay?.(activeId)}\n </div>\n ) : null}\n </DragOverlay>\n </DndContext>\n </BoardContext.Provider>\n );\n});\n\nexport interface BoardColumnProps extends HTMLAttributes<HTMLDivElement> {\n id: string;\n title: string;\n /** Card ids in render order — the sortable contract for this column. */\n itemIds: string[];\n /** Shown beside the title; defaults to the number of cards. */\n count?: number;\n /** A control in the column head, e.g. an add button or a menu. */\n action?: ReactNode;\n /** Set false to pin a lane in place. */\n isDraggable?: boolean;\n children?: ReactNode;\n}\n\n/**\n * One lane of the board. Heavy frame, hairline head rule, scrolling body, and\n * a grip on top of the head that drags the whole lane sideways.\n */\nexport const BoardColumn = forwardRef<HTMLElement, BoardColumnProps>(function BoardColumn(\n { id, title, itemIds, count, action, isDraggable = true, className, children, ...rest },\n ref,\n) {\n const { activeType, overColumnId } = useContext(BoardContext);\n const { setNodeRef: setBodyRef } = useDroppable({\n id: `${id}::body`,\n data: { type: \"column-body\", columnId: id, items: itemIds },\n });\n const {\n attributes,\n listeners,\n setNodeRef: setColumnRef,\n transform,\n transition,\n isDragging,\n } = useSortable({\n id,\n disabled: !isDraggable,\n data: { type: \"column\", columnId: id, items: itemIds },\n });\n\n return (\n <section\n ref={mergeRefs(setColumnRef, ref)}\n style={{ transform: CSS.Translate.toString(transform), transition }}\n className={[\"ds-board-column\", \"ds-field-surface\", className].filter(Boolean).join(\" \")}\n data-over={(activeType === \"card\" && overColumnId === id) || undefined}\n data-dragging={isDragging || undefined}\n\n aria-label={title}\n {...rest}\n >\n {isDraggable && (\n <Button\n variant=\"simple\"\n size=\"sm\"\n iconStart=\"grip-horizontal\"\n className=\"ds-board-column__grip\"\n aria-label={`Reorder ${title}`}\n {...attributes}\n {...listeners}\n />\n )}\n <header className=\"ds-board-column__head\">\n <span className=\"ds-board-column__title\">{title}</span>\n <span className=\"ds-board-column__count\">{count ?? itemIds.length}</span>\n {action && <span className=\"ds-board-column__action\">{action}</span>}\n </header>\n <div\n ref={setBodyRef}\n className=\"ds-board-column__body\"\n >\n <SortableContext\n items={itemIds}\n strategy={verticalListSortingStrategy}\n >\n {children}\n </SortableContext>\n </div>\n </section>\n );\n});\n\nexport interface BoardCardProps extends HTMLAttributes<HTMLDivElement> {\n id: string;\n columnId: string;\n /** Accessible name announced when the card is picked up. */\n label?: string;\n children?: ReactNode;\n}\n\n/**\n * A draggable card. The grip on the left is the handle, so the card body can\n * hold links and buttons; the grip is a real button for keyboard users:\n * space to pick up, arrows to move, space to drop.\n */\nexport const BoardCard = forwardRef<HTMLDivElement, BoardCardProps>(function BoardCard(\n { id, columnId, label, className, children, ...rest },\n ref,\n) {\n const { attributes, listeners, setNodeRef, transform, transition, isDragging } = useSortable({\n id,\n data: { type: \"card\", columnId },\n });\n const { activeId } = useContext(BoardContext);\n\n return (\n <div\n ref={mergeRefs(setNodeRef, ref)}\n style={{ transform: CSS.Translate.toString(transform), transition }}\n className={[\"ds-board-card\", \"ds-field-surface\", className].filter(Boolean).join(\" \")}\n data-dragging={isDragging || undefined}\n data-idle={activeId && activeId !== id ? \"\" : undefined}\n {...rest}\n >\n <Button\n variant=\"simple\"\n size=\"sm\"\n isIconOnly\n iconStart=\"grip-vertical\"\n className=\"ds-board-card__handle\"\n aria-label={label ? `Move ${label}` : \"Move card\"}\n {...attributes}\n {...listeners}\n />\n <div className=\"ds-board-card__content\">{children}</div>\n </div>\n );\n});\n"],"mappings":";;;;;;;;;AAGA,SAAgBE,EACd,EAAE,WAAQ,WACV,GAC6B;CAC7B,IAAI,CAACC,GACH;CAEF,IAAMC,IAAOD,EAAK,KAAK,WAAW,CAAC,GAC7BE,IAAWD,EAAKE,SAAY,WAAW,OAAOH,EAAK,EAAE,IAAI,OAAOC,EAAKG,YAAe,EAAE,GACtFC,IAAUC,EAAU,QAAQJ,CAAQ;CAC1C,IAAI,MAAU,KAAKA,MAAa,OAAOK,EAAO,EAAE,IAGhD,OAAO;EAAE,UAAU,OAAOA,EAAO,EAAE;EAAG;CAAQ;AAChD;AAEA,SAAgBC,EAAS,EAAE,WAAQ,WAA6C;CAC9E,IAAI,CAACR,GACH;CAEF,IAAMS,IAAe,OAAOF,EAAO,KAAK,SAAUH,YAAe,EAAE,GAC7DH,IAAOD,EAAK,KAAK,WAAW,CAAC,GAC7BU,IAAST,EAAKE,SAAY,QAC1BQ,IAAa,OAAOV,EAAKG,aAAgBM,IAAS,KAAKV,EAAK,GAAG,GAE/DK,IAAUK,IACVT,EAAKW,UAA+C,SAAS,KAC7DX,EAAKY,SAAqC,CAAC,EAAA,CAAG;CACpD,IAAKF,MAGDF,MAAiBE,KAAc,OAAOJ,EAAO,EAAE,MAAM,OAAOP,EAAK,EAAE,IAGvE,OAAO;EAAE,QAAQ,OAAOO,EAAO,EAAE;EAAG;EAAc;EAAY;CAAQ;AACxE;;;AC/BA,IAAaO,KAAmD,GAAO,MAAS;CAC9E,IAAM,EAAE,uBAAoB,eAAYC;CACxC,IAAIC,EAAM,SAAS,eAAeA,EAAM,SAAS,cAAc;EAC7D,IAAMC,IAAaC,EAAQ,oBACxB,WAAW,CAAC,CACZ,QAAQ,MAAMC,EAAE,KAAK,SAAU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