@namroodinc/liquid-editorial 0.10.2 → 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 +313 -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-D17gkytm.js → ColourField-C39pcjkG.js} +6 -6
- package/dist/chunks/ColourField-C39pcjkG.js.map +1 -0
- package/dist/chunks/{DatePicker-0uvnuiye.js → DatePicker-DDc1nDTb.js} +21 -21
- 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-LWwX_EzL.js → EntryPicker-DlEsVCvA.js} +3 -3
- package/dist/chunks/EntryPicker-DlEsVCvA.js.map +1 -0
- package/dist/chunks/{FormEditor-IKdPwVPx.js → FormEditor-CLLOHKiO.js} +6 -6
- package/dist/chunks/{FormEditor-IKdPwVPx.js.map → FormEditor-CLLOHKiO.js.map} +1 -1
- package/dist/chunks/{FormEditor-BZ_4nxIG.cjs → FormEditor-iACd0El-.cjs} +2 -2
- package/dist/chunks/{FormEditor-BZ_4nxIG.cjs.map → FormEditor-iACd0El-.cjs.map} +1 -1
- package/dist/chunks/{RichTextEditor-CwoHE-AN.js → RichTextEditor-B0P53GFt.js} +373 -284
- 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-BLH1tXk3.js → use-picker-session-BnMxbGAZ.js} +10 -10
- 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/item.d.cts +1 -3
- package/dist/components/EntryPicker/item.d.cts.map +1 -1
- package/dist/components/EntryPicker/item.d.ts +1 -3
- package/dist/components/EntryPicker/item.d.ts.map +1 -1
- package/dist/components/EntryPicker/style.css +43 -19
- package/dist/components/Field/style.css +6 -5
- package/dist/components/FormEditor/README.md +40 -12
- 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/storyblock-view.d.cts +1 -1
- package/dist/components/RichTextEditor/storyblock-view.d.cts.map +1 -1
- package/dist/components/RichTextEditor/storyblock-view.d.ts +1 -1
- package/dist/components/RichTextEditor/storyblock-view.d.ts.map +1 -1
- package/dist/components/RichTextEditor/style.css +127 -55
- 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-B03ejnGS.cjs +0 -2
- package/dist/chunks/ColourField-B03ejnGS.cjs.map +0 -1
- package/dist/chunks/ColourField-D17gkytm.js.map +0 -1
- package/dist/chunks/DatePicker-0uvnuiye.js.map +0 -1
- package/dist/chunks/DatePicker-CVaefhfS.cjs +0 -2
- package/dist/chunks/DatePicker-CVaefhfS.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-CiS8zT64.cjs +0 -2
- package/dist/chunks/EntryPicker-CiS8zT64.cjs.map +0 -1
- package/dist/chunks/EntryPicker-LWwX_EzL.js.map +0 -1
- package/dist/chunks/RichTextEditor-CwoHE-AN.js.map +0 -1
- package/dist/chunks/RichTextEditor-DMrxJhA6.cjs +0 -2
- package/dist/chunks/RichTextEditor-DMrxJhA6.cjs.map +0 -1
- package/dist/chunks/use-picker-session-BLH1tXk3.js.map +0 -1
- package/dist/chunks/use-picker-session-tRDYUd_d.cjs +0 -2
- package/dist/chunks/use-picker-session-tRDYUd_d.cjs.map +0 -1
|
@@ -1,40 +1,40 @@
|
|
|
1
1
|
import { t as e } from "../../chunks/Icon-CYXOo0Kt.js";
|
|
2
2
|
import { Grid as t } from "../Grid/index.js";
|
|
3
|
-
import {
|
|
4
|
-
import { forwardRef as
|
|
5
|
-
import { jsx as
|
|
3
|
+
import { AssetCardSkeleton as n } from "../AssetCard/index.js";
|
|
4
|
+
import { forwardRef as r } from "react";
|
|
5
|
+
import { jsx as i, jsxs as a } from "react/jsx-runtime";
|
|
6
6
|
//#region src/components/AssetGrid/index.tsx
|
|
7
|
-
function
|
|
7
|
+
function o(...e) {
|
|
8
8
|
return e.filter(Boolean).join(" ");
|
|
9
9
|
}
|
|
10
|
-
var
|
|
11
|
-
return /* @__PURE__ */
|
|
10
|
+
var s = r(function({ isLoading: e = !1, loadingCount: r = 8, loadingCard: a, className: s, children: c, ...l }, u) {
|
|
11
|
+
return /* @__PURE__ */ i(t, {
|
|
12
12
|
ref: u,
|
|
13
13
|
columns: "auto",
|
|
14
14
|
gap: "md",
|
|
15
15
|
minColumnWidth: "var(--asset-tile-min-width)",
|
|
16
|
-
className:
|
|
16
|
+
className: o("ds-asset-grid", s),
|
|
17
17
|
"aria-busy": e || void 0,
|
|
18
18
|
...l,
|
|
19
|
-
children: e ? Array.from({ length:
|
|
20
|
-
...
|
|
19
|
+
children: e ? Array.from({ length: r }, (e, t) => /* @__PURE__ */ i(n, {
|
|
20
|
+
...a,
|
|
21
21
|
index: t
|
|
22
22
|
}, t)) : c
|
|
23
23
|
});
|
|
24
24
|
});
|
|
25
|
-
function
|
|
26
|
-
return /* @__PURE__ */
|
|
25
|
+
function c({ title: t, description: n, action: r }) {
|
|
26
|
+
return /* @__PURE__ */ a("div", {
|
|
27
27
|
className: "ds-asset-empty",
|
|
28
28
|
children: [
|
|
29
|
-
/* @__PURE__ */
|
|
29
|
+
/* @__PURE__ */ i(e, {
|
|
30
30
|
name: "image",
|
|
31
31
|
size: 24
|
|
32
32
|
}),
|
|
33
|
-
/* @__PURE__ */
|
|
33
|
+
/* @__PURE__ */ i("span", {
|
|
34
34
|
className: "ds-asset-empty__title",
|
|
35
35
|
children: t
|
|
36
36
|
}),
|
|
37
|
-
n && /* @__PURE__ */
|
|
37
|
+
n && /* @__PURE__ */ i("span", {
|
|
38
38
|
className: "ds-asset-empty__description",
|
|
39
39
|
children: n
|
|
40
40
|
}),
|
|
@@ -43,6 +43,6 @@ function l({ title: t, description: n, action: r }) {
|
|
|
43
43
|
});
|
|
44
44
|
}
|
|
45
45
|
//#endregion
|
|
46
|
-
export {
|
|
46
|
+
export { s as AssetGrid, c as AssetGridEmpty };
|
|
47
47
|
|
|
48
48
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["Icon","cx","parts","AssetGrid","forwardRef","rest","Grid","className","isLoading","loadingCount","AssetCardSkeleton","loadingCard","i","children","AssetGridEmpty","title","description","action"
|
|
1
|
+
{"version":3,"file":"index.js","names":["Icon","cx","parts","AssetGrid","forwardRef","rest","Grid","className","isLoading","loadingCount","AssetCardSkeleton","loadingCard","i","children","AssetGridEmpty","title","description","action"],"sources":["../../../src/components/AssetGrid/index.tsx"],"sourcesContent":["import { forwardRef, type HTMLAttributes, type ReactNode } from \"react\";\nimport { Grid } from \"../Grid\";\nimport { Icon } from \"../Icon\";\nimport { AssetCardSkeleton, type AssetCardSkeletonProps } from \"../AssetCard\";\nimport \"./style.css\";\n\nfunction cx(...parts: (string | undefined | false)[]) {\n return parts.filter(Boolean).join(\" \");\n}\n\nexport interface AssetGridProps extends HTMLAttributes<HTMLDivElement> {\n /**\n * Renders placeholder tiles instead of children. The grid keeps its\n * geometry, so nothing moves when the real assets arrive.\n */\n isLoading?: boolean;\n /** How many placeholder tiles to show while loading. */\n loadingCount?: number;\n /** Slots each placeholder reserves; match the cards that replace them. */\n loadingCard?: Omit<AssetCardSkeletonProps, \"index\">;\n children?: ReactNode;\n}\n\n/**\n * The media library surface: an auto-filling grid of asset tiles. Sits inside\n * a `TableFrame` when it is the page's collection, bare inside a drawer.\n */\nexport const AssetGrid = forwardRef<HTMLDivElement, AssetGridProps>(function AssetGrid(\n { isLoading = false, loadingCount = 8, loadingCard, className, children, ...rest },\n ref,\n) {\n return (\n <Grid\n ref={ref}\n columns=\"auto\"\n gap=\"md\"\n minColumnWidth=\"var(--asset-tile-min-width)\"\n className={cx(\"ds-asset-grid\", className)}\n aria-busy={isLoading || undefined}\n {...rest}\n >\n {isLoading\n ? Array.from({ length: loadingCount }, (_, i) => (\n <AssetCardSkeleton\n key={i}\n {...loadingCard}\n index={i}\n />\n ))\n : children}\n </Grid>\n );\n});\n\nexport interface AssetGridEmptyProps {\n title: string;\n description?: ReactNode;\n action?: ReactNode;\n}\n\n/** Nothing in the library yet — one action, the one that fills it. */\nexport function AssetGridEmpty({ title, description, action }: AssetGridEmptyProps) {\n return (\n <div className=\"ds-asset-empty\">\n <Icon\n name=\"image\"\n size={24}\n />\n <span className=\"ds-asset-empty__title\">{title}</span>\n {description && <span className=\"ds-asset-empty__description\">{description}</span>}\n {action}\n </div>\n );\n}\n"],"mappings":";;;;;;AAMA,SAASC,EAAG,GAAGC,GAAuC;CACpD,OAAOA,EAAM,OAAO,OAAO,CAAC,CAAC,KAAK,GAAG;AACvC;AAmBA,IAAaC,IAAYC,EAA2C,SAClE,EAAE,eAAY,IAAO,kBAAe,GAAG,gBAAa,cAAW,aAAU,GAAGC,KAC5E,GACA;CACA,OACE,kBAACC,GAAD;EACO;EACL,SAAQ;EACR,KAAI;EACJ,gBAAe;EACf,WAAWL,EAAG,iBAAiBM,CAAS;EACxC,aAAWC,KAAa,KAAA;EACxB,GAAIH;EAEH,UAAAG,IACG,MAAM,KAAK,EAAE,QAAQC,EAAa,IAAI,GAAG,MACvC,kBAACC,GAAD;GAEE,GAAIC;GACJ,OAAOC;EACR,GAHMA,CAGN,CACF,IACDC;CACA,CAAA;AAEV,CAAC;AASD,SAAgBC,EAAe,EAAE,UAAO,gBAAa,aAA+B;CAClF,OACE,kBAAC,OAAD;EAAK,WAAU;EAAf,UAAA;GACE,kBAACd,GAAD;IACE,MAAK;IACL,MAAM;GACP,CAAA;GACD,kBAAC,QAAD;IAAM,WAAU;IAAyB,UAAAe;GAAY,CAAA;GACpDC,KAAe,kBAAC,QAAD;IAAM,WAAU;IAA+B,UAAAA;GAAkB,CAAA;GAChFC;EACE;;AAET"}
|
|
@@ -18,7 +18,9 @@
|
|
|
18
18
|
align-items: center;
|
|
19
19
|
justify-content: center;
|
|
20
20
|
border-radius: 50%;
|
|
21
|
-
|
|
21
|
+
|
|
22
|
+
/* Initials step from the local ground, as neutral badges do. */
|
|
23
|
+
background: var(--fill-control);
|
|
22
24
|
user-select: none;
|
|
23
25
|
}
|
|
24
26
|
|
|
@@ -43,7 +45,7 @@
|
|
|
43
45
|
overflow: hidden;
|
|
44
46
|
background: var(--avatar-background, transparent);
|
|
45
47
|
color: var(--avatar-foreground, var(--color-text));
|
|
46
|
-
border:
|
|
48
|
+
border: 0;
|
|
47
49
|
border-radius: 50%;
|
|
48
50
|
font-size: var(--avatar-font-size);
|
|
49
51
|
font-weight: var(--font-weight-bold);
|
|
@@ -73,7 +75,7 @@
|
|
|
73
75
|
.ds-avatar:focus-visible,
|
|
74
76
|
.ds-avatar > a.ds-avatar__control:focus-visible,
|
|
75
77
|
.ds-avatar-group__count:focus-visible {
|
|
76
|
-
outline: var(--
|
|
78
|
+
outline: var(--focus-width) solid var(--color-focus);
|
|
77
79
|
outline-offset: 2px;
|
|
78
80
|
}
|
|
79
81
|
|
|
@@ -82,8 +84,23 @@
|
|
|
82
84
|
align-items: center;
|
|
83
85
|
}
|
|
84
86
|
|
|
87
|
+
/* Each later avatar is cut away 2px beyond the one overlapping it. The
|
|
88
|
+
* gap is transparent, so it shows whatever is painted behind the group,
|
|
89
|
+
* including a hovered or selected row. */
|
|
85
90
|
.ds-avatar-group .ds-avatar + .ds-avatar {
|
|
91
|
+
--avatar-cut-x: calc(var(--space-2) - var(--avatar-size) / 2);
|
|
92
|
+
--avatar-cut: calc(var(--avatar-size) / 2 + 2px);
|
|
93
|
+
|
|
86
94
|
margin-inline-start: calc(-1 * var(--space-2));
|
|
95
|
+
mask: radial-gradient(
|
|
96
|
+
circle at var(--avatar-cut-x) 50%,
|
|
97
|
+
transparent calc(var(--avatar-cut) - 0.5px),
|
|
98
|
+
rgb(0 0 0) var(--avatar-cut)
|
|
99
|
+
);
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
.ds-avatar-group .ds-avatar + .ds-avatar:dir(rtl) {
|
|
103
|
+
--avatar-cut-x: calc(100% - var(--space-2) + var(--avatar-size) / 2);
|
|
87
104
|
}
|
|
88
105
|
|
|
89
106
|
.ds-avatar-group .ds-avatar:nth-child(1) {
|
|
@@ -98,19 +115,23 @@
|
|
|
98
115
|
z-index: 1;
|
|
99
116
|
}
|
|
100
117
|
|
|
118
|
+
/* A focused avatar rises above its neighbour, uncut, so the mask never
|
|
119
|
+
* clips its focus ring. */
|
|
101
120
|
.ds-avatar-group .ds-avatar:focus-within {
|
|
102
121
|
z-index: 4;
|
|
122
|
+
mask: none;
|
|
103
123
|
}
|
|
104
124
|
|
|
105
125
|
.ds-avatar-group__count {
|
|
106
126
|
flex: none;
|
|
107
127
|
margin-inline-start: var(--space-2);
|
|
108
|
-
padding:
|
|
109
|
-
border:
|
|
128
|
+
padding: 4px 10px;
|
|
129
|
+
border: 0;
|
|
110
130
|
border-radius: var(--radius-pill);
|
|
111
131
|
color: var(--color-text-muted);
|
|
112
132
|
font-size: var(--font-size-xs);
|
|
113
133
|
font-weight: var(--font-weight-bold);
|
|
134
|
+
background: var(--fill-control);
|
|
114
135
|
}
|
|
115
136
|
|
|
116
137
|
.ds-avatar-tooltip {
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});let e=require("react"),t=require("react/jsx-runtime");var n=(0,e.forwardRef)(function({shape:e=`tag`,size:n=`md`,tone:r,appearance:i=`
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});let e=require("react"),t=require("react/jsx-runtime");var n=(0,e.forwardRef)(function({shape:e=`tag`,size:n=`md`,tone:r,appearance:i=`soft`,isCountExact:a=!1,className:o,children:s,...c},l){if(e===`count`&&!a){let e=Number(s);if(!Number.isNaN(e)){if(e===0)return null;s=e>99?`99+`:String(e)}}return(0,t.jsxs)(`span`,{ref:l,"data-shape":e,"data-size":n,"data-appearance":i,"data-tone":e===`status`?r:void 0,className:[`ds-badge`,o].filter(Boolean).join(` `),...c,children:[e===`status`&&(0,t.jsx)(`span`,{className:`ds-badge__dot`,"aria-hidden":`true`}),s]})});exports.Badge=n;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","names":["forwardRef","react","react_jsx_runtime","Badge","rest","shape","isCountExact","value","children","size","appearance","tone","className"],"sources":["../../../src/components/Badge/index.tsx"],"sourcesContent":["import { forwardRef, type HTMLAttributes, type ReactNode } from \"react\";\nimport \"./style.css\";\n\nexport type BadgeShape = \"status\" | \"tag\" | \"count\";\nexport type BadgeSize = \"sm\" | \"md\" | \"lg\";\n\n/**\n * How much ink the badge spends.\n * - `
|
|
1
|
+
{"version":3,"file":"index.cjs","names":["forwardRef","react","react_jsx_runtime","Badge","rest","shape","isCountExact","value","children","size","appearance","tone","className"],"sources":["../../../src/components/Badge/index.tsx"],"sourcesContent":["import { forwardRef, type HTMLAttributes, type ReactNode } from \"react\";\nimport \"./style.css\";\n\nexport type BadgeShape = \"status\" | \"tag\" | \"count\";\nexport type BadgeSize = \"sm\" | \"md\" | \"lg\";\n\n/**\n * How much ink the badge spends.\n * - `soft` — the tone's soft fill behind tone-coloured text. The default.\n * - `solid` — the tone as a full fill. Reserve it for the one state a row is\n * really about; a table of solid badges reads as noise.\n */\nexport type BadgeAppearance = \"soft\" | \"solid\";\n\n/** Six publication states, and no seventh without a decision record. */\nexport type StatusTone =\n \"draft\" | \"scheduled\" | \"published\" | \"changed\" | \"unpublished\" | \"archived\";\n\nexport interface BadgeProps extends HTMLAttributes<HTMLSpanElement> {\n shape?: BadgeShape;\n /** `md` keeps the standard size; `sm` condenses labels for dense layouts. */\n size?: BadgeSize;\n /** Required on `status`, forbidden on `tag` and `count`. */\n tone?: StatusTone;\n appearance?: BadgeAppearance;\n /** Show count values in full, including zero. Other count badges keep their compact defaults. */\n isCountExact?: boolean;\n children?: ReactNode;\n}\n\n/**\n * A small, non-interactive label attached to something else. Never a button,\n * never a filter. Status tones are reserved for publication state.\n */\nexport const Badge = forwardRef<HTMLSpanElement, BadgeProps>(function Badge(\n {\n shape = \"tag\",\n size = \"md\",\n tone,\n appearance = \"soft\",\n isCountExact = false,\n className,\n children,\n ...rest\n },\n ref,\n) {\n if (shape === \"count\" && !isCountExact) {\n const value = Number(children);\n if (!Number.isNaN(value)) {\n if (value === 0) {\n return null;\n }\n children = value > 99 ? \"99+\" : String(value);\n }\n }\n\n return (\n <span\n ref={ref}\n data-shape={shape}\n data-size={size}\n data-appearance={appearance}\n data-tone={shape === \"status\" ? tone : undefined}\n className={[\"ds-badge\", className].filter(Boolean).join(\" \")}\n {...rest}\n >\n {shape === \"status\" && (\n <span\n className=\"ds-badge__dot\"\n aria-hidden=\"true\"\n />\n )}\n {children}\n </span>\n );\n});\n"],"mappings":"A,yHAkCA,IAAaG,GAAA,EAAQH,EAAAA,WAAAA,CAAwC,SAC3D,CACE,QAAQ,MACR,OAAO,KACP,OACA,aAAa,OACb,eAAe,GACf,YACA,WACA,GAAGI,GAEL,EACA,CACA,GAAIC,IAAU,SAAW,CAACC,EAAc,CACtC,IAAMC,EAAQ,OAAOC,CAAQ,EAC7B,GAAI,CAAC,OAAO,MAAMD,CAAK,EAAG,CACxB,GAAIA,IAAU,EACZ,OAAO,KAET,EAAWA,EAAQ,GAAK,MAAQ,OAAOA,CAAK,CAC9C,CACF,CAEA,OACE,EAAAL,EAAA,KAAA,CAAC,OAAD,CACO,MACL,aAAYG,EACZ,YAAWI,EACX,kBAAiBC,EACjB,YAAWL,IAAU,SAAWM,EAAO,IAAA,GACvC,UAAW,CAAC,WAAYC,CAAS,CAAC,CAAC,OAAO,OAAO,CAAC,CAAC,KAAK,GAAG,EAC3D,GAAIR,EAPN,SAAA,CASGC,IAAU,WACT,EAAAH,EAAA,IAAA,CAAC,OAAD,CACE,UAAU,gBACV,cAAY,MACb,CAAA,EAEFM,CACG,C,EAEV,CAAC,E"}
|
|
@@ -3,12 +3,11 @@ export type BadgeShape = "status" | "tag" | "count";
|
|
|
3
3
|
export type BadgeSize = "sm" | "md" | "lg";
|
|
4
4
|
/**
|
|
5
5
|
* How much ink the badge spends.
|
|
6
|
-
* - `
|
|
7
|
-
* - `soft` — the tone's soft fill behind tone-coloured text. For dense tables.
|
|
6
|
+
* - `soft` — the tone's soft fill behind tone-coloured text. The default.
|
|
8
7
|
* - `solid` — the tone as a full fill. Reserve it for the one state a row is
|
|
9
8
|
* really about; a table of solid badges reads as noise.
|
|
10
9
|
*/
|
|
11
|
-
export type BadgeAppearance = "
|
|
10
|
+
export type BadgeAppearance = "soft" | "solid";
|
|
12
11
|
/** Six publication states, and no seventh without a decision record. */
|
|
13
12
|
export type StatusTone = "draft" | "scheduled" | "published" | "changed" | "unpublished" | "archived";
|
|
14
13
|
export interface BadgeProps extends HTMLAttributes<HTMLSpanElement> {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.cts","sourceRoot":"","sources":["../../../src/components/Badge/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAc,KAAK,cAAc,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AACxE,OAAO,aAAa,CAAC;AAErB,MAAM,MAAM,UAAU,GAAG,QAAQ,GAAG,KAAK,GAAG,OAAO,CAAC;AACpD,MAAM,MAAM,SAAS,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;AAE3C
|
|
1
|
+
{"version":3,"file":"index.d.cts","sourceRoot":"","sources":["../../../src/components/Badge/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAc,KAAK,cAAc,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AACxE,OAAO,aAAa,CAAC;AAErB,MAAM,MAAM,UAAU,GAAG,QAAQ,GAAG,KAAK,GAAG,OAAO,CAAC;AACpD,MAAM,MAAM,SAAS,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;AAE3C;;;;;GAKG;AACH,MAAM,MAAM,eAAe,GAAG,MAAM,GAAG,OAAO,CAAC;AAE/C,wEAAwE;AACxE,MAAM,MAAM,UAAU,GACpB,OAAO,GAAG,WAAW,GAAG,WAAW,GAAG,SAAS,GAAG,aAAa,GAAG,UAAU,CAAC;AAE/E,MAAM,WAAW,UAAW,SAAQ,cAAc,CAAC,eAAe,CAAC;IACjE,KAAK,CAAC,EAAE,UAAU,CAAC;IACnB,6EAA6E;IAC7E,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,4DAA4D;IAC5D,IAAI,CAAC,EAAE,UAAU,CAAC;IAClB,UAAU,CAAC,EAAE,eAAe,CAAC;IAC7B,iGAAiG;IACjG,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB;AAED;;;GAGG;AACH,eAAO,MAAM,KAAK,wGA0ChB,CAAC"}
|
|
@@ -3,12 +3,11 @@ export type BadgeShape = "status" | "tag" | "count";
|
|
|
3
3
|
export type BadgeSize = "sm" | "md" | "lg";
|
|
4
4
|
/**
|
|
5
5
|
* How much ink the badge spends.
|
|
6
|
-
* - `
|
|
7
|
-
* - `soft` — the tone's soft fill behind tone-coloured text. For dense tables.
|
|
6
|
+
* - `soft` — the tone's soft fill behind tone-coloured text. The default.
|
|
8
7
|
* - `solid` — the tone as a full fill. Reserve it for the one state a row is
|
|
9
8
|
* really about; a table of solid badges reads as noise.
|
|
10
9
|
*/
|
|
11
|
-
export type BadgeAppearance = "
|
|
10
|
+
export type BadgeAppearance = "soft" | "solid";
|
|
12
11
|
/** Six publication states, and no seventh without a decision record. */
|
|
13
12
|
export type StatusTone = "draft" | "scheduled" | "published" | "changed" | "unpublished" | "archived";
|
|
14
13
|
export interface BadgeProps extends HTMLAttributes<HTMLSpanElement> {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Badge/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAc,KAAK,cAAc,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AACxE,OAAO,aAAa,CAAC;AAErB,MAAM,MAAM,UAAU,GAAG,QAAQ,GAAG,KAAK,GAAG,OAAO,CAAC;AACpD,MAAM,MAAM,SAAS,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;AAE3C
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Badge/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAc,KAAK,cAAc,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AACxE,OAAO,aAAa,CAAC;AAErB,MAAM,MAAM,UAAU,GAAG,QAAQ,GAAG,KAAK,GAAG,OAAO,CAAC;AACpD,MAAM,MAAM,SAAS,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;AAE3C;;;;;GAKG;AACH,MAAM,MAAM,eAAe,GAAG,MAAM,GAAG,OAAO,CAAC;AAE/C,wEAAwE;AACxE,MAAM,MAAM,UAAU,GACpB,OAAO,GAAG,WAAW,GAAG,WAAW,GAAG,SAAS,GAAG,aAAa,GAAG,UAAU,CAAC;AAE/E,MAAM,WAAW,UAAW,SAAQ,cAAc,CAAC,eAAe,CAAC;IACjE,KAAK,CAAC,EAAE,UAAU,CAAC;IACnB,6EAA6E;IAC7E,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,4DAA4D;IAC5D,IAAI,CAAC,EAAE,UAAU,CAAC;IAClB,UAAU,CAAC,EAAE,eAAe,CAAC;IAC7B,iGAAiG;IACjG,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB;AAED;;;GAGG;AACH,eAAO,MAAM,KAAK,wGA0ChB,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { forwardRef as e } from "react";
|
|
2
2
|
import { jsx as t, jsxs as n } from "react/jsx-runtime";
|
|
3
3
|
//#region src/components/Badge/index.tsx
|
|
4
|
-
var r = e(function({ shape: e = "tag", size: r = "md", tone: i, appearance: a = "
|
|
4
|
+
var r = e(function({ shape: e = "tag", size: r = "md", tone: i, appearance: a = "soft", isCountExact: o = !1, className: s, children: c, ...l }, u) {
|
|
5
5
|
if (e === "count" && !o) {
|
|
6
6
|
let e = Number(c);
|
|
7
7
|
if (!Number.isNaN(e)) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["Badge","forwardRef","rest","shape","isCountExact","value","children","size","appearance","tone","className"],"sources":["../../../src/components/Badge/index.tsx"],"sourcesContent":["import { forwardRef, type HTMLAttributes, type ReactNode } from \"react\";\nimport \"./style.css\";\n\nexport type BadgeShape = \"status\" | \"tag\" | \"count\";\nexport type BadgeSize = \"sm\" | \"md\" | \"lg\";\n\n/**\n * How much ink the badge spends.\n * - `
|
|
1
|
+
{"version":3,"file":"index.js","names":["Badge","forwardRef","rest","shape","isCountExact","value","children","size","appearance","tone","className"],"sources":["../../../src/components/Badge/index.tsx"],"sourcesContent":["import { forwardRef, type HTMLAttributes, type ReactNode } from \"react\";\nimport \"./style.css\";\n\nexport type BadgeShape = \"status\" | \"tag\" | \"count\";\nexport type BadgeSize = \"sm\" | \"md\" | \"lg\";\n\n/**\n * How much ink the badge spends.\n * - `soft` — the tone's soft fill behind tone-coloured text. The default.\n * - `solid` — the tone as a full fill. Reserve it for the one state a row is\n * really about; a table of solid badges reads as noise.\n */\nexport type BadgeAppearance = \"soft\" | \"solid\";\n\n/** Six publication states, and no seventh without a decision record. */\nexport type StatusTone =\n \"draft\" | \"scheduled\" | \"published\" | \"changed\" | \"unpublished\" | \"archived\";\n\nexport interface BadgeProps extends HTMLAttributes<HTMLSpanElement> {\n shape?: BadgeShape;\n /** `md` keeps the standard size; `sm` condenses labels for dense layouts. */\n size?: BadgeSize;\n /** Required on `status`, forbidden on `tag` and `count`. */\n tone?: StatusTone;\n appearance?: BadgeAppearance;\n /** Show count values in full, including zero. Other count badges keep their compact defaults. */\n isCountExact?: boolean;\n children?: ReactNode;\n}\n\n/**\n * A small, non-interactive label attached to something else. Never a button,\n * never a filter. Status tones are reserved for publication state.\n */\nexport const Badge = forwardRef<HTMLSpanElement, BadgeProps>(function Badge(\n {\n shape = \"tag\",\n size = \"md\",\n tone,\n appearance = \"soft\",\n isCountExact = false,\n className,\n children,\n ...rest\n },\n ref,\n) {\n if (shape === \"count\" && !isCountExact) {\n const value = Number(children);\n if (!Number.isNaN(value)) {\n if (value === 0) {\n return null;\n }\n children = value > 99 ? \"99+\" : String(value);\n }\n }\n\n return (\n <span\n ref={ref}\n data-shape={shape}\n data-size={size}\n data-appearance={appearance}\n data-tone={shape === \"status\" ? tone : undefined}\n className={[\"ds-badge\", className].filter(Boolean).join(\" \")}\n {...rest}\n >\n {shape === \"status\" && (\n <span\n className=\"ds-badge__dot\"\n aria-hidden=\"true\"\n />\n )}\n {children}\n </span>\n );\n});\n"],"mappings":";;;AAkCA,IAAaA,IAAQC,EAAwC,SAC3D,EACE,WAAQ,OACR,UAAO,MACP,SACA,gBAAa,QACb,kBAAe,IACf,cACA,aACA,GAAGC,KAEL,GACA;CACA,IAAIC,MAAU,WAAW,CAACC,GAAc;EACtC,IAAMC,IAAQ,OAAOC,CAAQ;EAC7B,IAAI,CAAC,OAAO,MAAMD,CAAK,GAAG;GACxB,IAAIA,MAAU,GACZ,OAAO;GAET,IAAWA,IAAQ,KAAK,QAAQ,OAAOA,CAAK;EAC9C;CACF;CAEA,OACE,kBAAC,QAAD;EACO;EACL,cAAYF;EACZ,aAAWI;EACX,mBAAiBC;EACjB,aAAWL,MAAU,WAAWM,IAAO,KAAA;EACvC,WAAW,CAAC,YAAYC,CAAS,CAAC,CAAC,OAAO,OAAO,CAAC,CAAC,KAAK,GAAG;EAC3D,GAAIR;EAPN,UAAA,CASGC,MAAU,YACT,kBAAC,QAAD;GACE,WAAU;GACV,eAAY;EACb,CAAA,GAEFG,CACG;;AAEV,CAAC"}
|
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
@layer components {
|
|
2
2
|
.ds-badge {
|
|
3
|
-
--badge-ink: var(--color-text
|
|
4
|
-
|
|
3
|
+
--badge-ink: var(--color-text);
|
|
4
|
+
|
|
5
|
+
/* Neutral soft badges (tags, counts, draft and archived) step from the
|
|
6
|
+
* fill they sit on, so they read on the canvas, the header, bands and
|
|
7
|
+
* hovered rows alike. Toned statuses keep their status fills. */
|
|
8
|
+
--badge-soft: var(--fill-control);
|
|
5
9
|
--badge-solid: var(--color-text);
|
|
6
10
|
--badge-on-solid: var(--color-surface);
|
|
7
11
|
--badge-marker: currentcolor;
|
|
@@ -9,8 +13,8 @@
|
|
|
9
13
|
display: inline-flex;
|
|
10
14
|
align-items: center;
|
|
11
15
|
gap: var(--badge-gap);
|
|
12
|
-
padding: var(--badge-pad-block) var(--badge-pad-inline,
|
|
13
|
-
border:
|
|
16
|
+
padding: var(--badge-pad-block) var(--badge-pad-inline, 10px);
|
|
17
|
+
border: 0;
|
|
14
18
|
border-radius: var(--badge-radius);
|
|
15
19
|
font-family: var(--font-sans);
|
|
16
20
|
font-size: var(--badge-font-size);
|
|
@@ -21,26 +25,26 @@
|
|
|
21
25
|
white-space: nowrap;
|
|
22
26
|
}
|
|
23
27
|
|
|
24
|
-
/* The base metrics are md; sizes keep the same
|
|
28
|
+
/* The base metrics are md; sizes keep the same corners and tracking. */
|
|
25
29
|
.ds-badge[data-size="sm"] {
|
|
26
|
-
--badge-pad-block: var(--badge-sm-pad-block,
|
|
27
|
-
--badge-pad-inline:
|
|
30
|
+
--badge-pad-block: var(--badge-sm-pad-block, 3px);
|
|
31
|
+
--badge-pad-inline: 6px;
|
|
28
32
|
--badge-gap: var(--space-1);
|
|
29
33
|
--badge-marker-size: var(--space-1);
|
|
30
34
|
--badge-count-min: 20px;
|
|
31
|
-
--badge-count-pad-inline:
|
|
35
|
+
--badge-count-pad-inline: 6px;
|
|
32
36
|
--badge-count-font-size: var(--badge-font-size);
|
|
33
37
|
}
|
|
34
38
|
|
|
35
39
|
.ds-badge[data-size="lg"] {
|
|
36
40
|
--badge-font-size: var(--font-size-xs);
|
|
37
41
|
--badge-line-height: 1rem;
|
|
38
|
-
--badge-pad-block:
|
|
39
|
-
--badge-pad-inline:
|
|
42
|
+
--badge-pad-block: 6px;
|
|
43
|
+
--badge-pad-inline: 14px;
|
|
40
44
|
--badge-gap: var(--space-2);
|
|
41
45
|
--badge-marker-size: var(--space-2);
|
|
42
46
|
--badge-count-min: 28px;
|
|
43
|
-
--badge-count-pad-inline:
|
|
47
|
+
--badge-count-pad-inline: 10px;
|
|
44
48
|
--badge-count-font-size: var(--font-size-sm);
|
|
45
49
|
}
|
|
46
50
|
|
|
@@ -55,24 +59,16 @@
|
|
|
55
59
|
font-variant-numeric: tabular-nums;
|
|
56
60
|
}
|
|
57
61
|
|
|
58
|
-
/*
|
|
59
|
-
.ds-badge[data-appearance="outline"] {
|
|
60
|
-
background: transparent;
|
|
61
|
-
border-color: var(--badge-ink);
|
|
62
|
-
color: var(--badge-ink);
|
|
63
|
-
}
|
|
64
|
-
|
|
62
|
+
/* Both appearances keep the same dimensions. */
|
|
65
63
|
.ds-badge[data-appearance="soft"] {
|
|
66
64
|
--badge-marker: var(--badge-soft-marker, currentColor);
|
|
67
65
|
|
|
68
66
|
background: var(--badge-soft);
|
|
69
|
-
border-color: transparent;
|
|
70
67
|
color: var(--badge-ink);
|
|
71
68
|
}
|
|
72
69
|
|
|
73
70
|
.ds-badge[data-appearance="solid"] {
|
|
74
71
|
background: var(--badge-solid);
|
|
75
|
-
border-color: var(--badge-solid);
|
|
76
72
|
color: var(--badge-on-solid);
|
|
77
73
|
}
|
|
78
74
|
|
|
@@ -87,35 +83,34 @@
|
|
|
87
83
|
/* ── Publication tones ───────────────────────────────────────────────── */
|
|
88
84
|
.ds-badge[data-tone="draft"] {
|
|
89
85
|
--badge-ink: var(--status-draft-text);
|
|
90
|
-
--badge-soft: var(--status-draft-soft);
|
|
91
86
|
--badge-soft-marker: var(--status-draft);
|
|
92
87
|
--badge-solid: var(--color-text-muted);
|
|
93
88
|
--badge-on-solid: var(--color-surface);
|
|
94
89
|
}
|
|
95
90
|
|
|
96
91
|
.ds-badge[data-tone="scheduled"] {
|
|
97
|
-
--badge-ink: var(--
|
|
92
|
+
--badge-ink: var(--color-primary-text);
|
|
98
93
|
--badge-soft: var(--status-scheduled-soft);
|
|
99
94
|
--badge-solid: var(--color-primary);
|
|
100
95
|
--badge-on-solid: var(--color-text-on-solid);
|
|
101
96
|
}
|
|
102
97
|
|
|
103
98
|
.ds-badge[data-tone="published"] {
|
|
104
|
-
--badge-ink: var(--
|
|
99
|
+
--badge-ink: var(--color-success-text);
|
|
105
100
|
--badge-soft: var(--status-published-soft);
|
|
106
101
|
--badge-solid: var(--color-success);
|
|
107
102
|
--badge-on-solid: var(--color-text-on-solid);
|
|
108
103
|
}
|
|
109
104
|
|
|
110
105
|
.ds-badge[data-tone="changed"] {
|
|
111
|
-
--badge-ink: var(--
|
|
106
|
+
--badge-ink: var(--color-warning-text);
|
|
112
107
|
--badge-soft: var(--status-changed-soft);
|
|
113
108
|
--badge-solid: var(--color-warning);
|
|
114
109
|
--badge-on-solid: var(--color-text-on-solid);
|
|
115
110
|
}
|
|
116
111
|
|
|
117
112
|
.ds-badge[data-tone="unpublished"] {
|
|
118
|
-
--badge-ink: var(--
|
|
113
|
+
--badge-ink: var(--color-danger-text);
|
|
119
114
|
--badge-soft: var(--status-unpublished-soft);
|
|
120
115
|
--badge-solid: var(--color-danger);
|
|
121
116
|
--badge-on-solid: var(--color-text-on-solid);
|
|
@@ -123,7 +118,6 @@
|
|
|
123
118
|
|
|
124
119
|
.ds-badge[data-tone="archived"] {
|
|
125
120
|
--badge-ink: var(--status-archived-text);
|
|
126
|
-
--badge-soft: var(--color-surface-subtle);
|
|
127
121
|
--badge-solid: var(--color-border-strong);
|
|
128
122
|
--badge-on-solid: var(--color-text);
|
|
129
123
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../../chunks/Board-
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../../chunks/Board-CNVy8gHI.cjs");exports.Board=e.t,exports.BoardCard=e.n,exports.BoardColumn=e.r;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { t as Board, n as BoardCard, r as BoardColumn } from "../../chunks/Board-
|
|
1
|
+
export { t as Board, n as BoardCard, r as BoardColumn } from "../../chunks/Board-BCS7sDXg.js";
|
|
@@ -7,28 +7,37 @@
|
|
|
7
7
|
padding-block-end: var(--space-2);
|
|
8
8
|
}
|
|
9
9
|
|
|
10
|
-
/*
|
|
10
|
+
/* Band-coloured trays hold surface-coloured cards. */
|
|
11
11
|
.ds-board-column {
|
|
12
12
|
display: flex;
|
|
13
13
|
flex-direction: column;
|
|
14
14
|
flex: none;
|
|
15
15
|
inline-size: var(--board-column-width);
|
|
16
16
|
max-block-size: var(--board-column-max-height);
|
|
17
|
-
border:
|
|
17
|
+
border: 0;
|
|
18
18
|
border-radius: var(--radius-lg);
|
|
19
|
-
background: var(--
|
|
19
|
+
background: var(--field-bg);
|
|
20
20
|
overflow: hidden;
|
|
21
|
+
|
|
22
|
+
--field-bg: var(--fill-band);
|
|
21
23
|
}
|
|
22
24
|
|
|
23
|
-
/* The drop target reads on the fill
|
|
25
|
+
/* The drop target reads on the fill. */
|
|
24
26
|
.ds-board-column[data-over] {
|
|
25
|
-
background: var(--
|
|
26
|
-
}
|
|
27
|
+
background: var(--field-bg);
|
|
27
28
|
|
|
28
|
-
|
|
29
|
+
--field-bg: var(--color-primary-soft);
|
|
30
|
+
--button-active-bg: var(--color-primary-soft-pressed);
|
|
31
|
+
}
|
|
29
32
|
|
|
33
|
+
/* A lane being reordered leaves a recessed slot: the pressed step of the
|
|
34
|
+
* lane fill, darker than every resting lane. Its grip stays visible because
|
|
35
|
+
* it holds focus through a keyboard drag. */
|
|
30
36
|
.ds-board-column[data-dragging] {
|
|
31
|
-
|
|
37
|
+
--field-paint: var(--field-pressed);
|
|
38
|
+
|
|
39
|
+
background: var(--field-pressed);
|
|
40
|
+
color: var(--color-text-muted);
|
|
32
41
|
}
|
|
33
42
|
|
|
34
43
|
.ds-board-column[data-overlay] {
|
|
@@ -68,8 +77,7 @@
|
|
|
68
77
|
display: flex;
|
|
69
78
|
align-items: center;
|
|
70
79
|
gap: var(--space-2);
|
|
71
|
-
padding:
|
|
72
|
-
border-block-end: var(--rule-width) solid var(--rule-color);
|
|
80
|
+
padding: 12px 16px 4px;
|
|
73
81
|
}
|
|
74
82
|
|
|
75
83
|
.ds-board-column__title {
|
|
@@ -90,7 +98,7 @@
|
|
|
90
98
|
.ds-board-column__body {
|
|
91
99
|
display: flex;
|
|
92
100
|
flex-direction: column;
|
|
93
|
-
gap: var(--space-
|
|
101
|
+
gap: var(--space-2);
|
|
94
102
|
padding: var(--space-3);
|
|
95
103
|
overflow-y: auto;
|
|
96
104
|
min-block-size: var(--board-column-min-body);
|
|
@@ -101,16 +109,22 @@
|
|
|
101
109
|
display: flex;
|
|
102
110
|
align-items: stretch;
|
|
103
111
|
gap: var(--space-2);
|
|
104
|
-
border:
|
|
112
|
+
border: 0;
|
|
105
113
|
border-radius: var(--radius-md);
|
|
106
|
-
background: var(--
|
|
114
|
+
background: var(--field-bg);
|
|
107
115
|
padding: var(--space-3);
|
|
108
116
|
font-size: var(--font-size-sm);
|
|
109
117
|
user-select: none;
|
|
110
118
|
transition: background-color var(--duration-fast) var(--ease-standard);
|
|
119
|
+
|
|
120
|
+
--field-bg: var(--color-surface);
|
|
111
121
|
}
|
|
112
122
|
|
|
123
|
+
/* Painted fills other than the ground are named in --field-paint, so
|
|
124
|
+
* neutral badges and controls on the card step from them. */
|
|
113
125
|
.ds-board-card:hover {
|
|
126
|
+
--field-paint: var(--field-hover);
|
|
127
|
+
|
|
114
128
|
background: var(--field-hover);
|
|
115
129
|
}
|
|
116
130
|
|
|
@@ -123,12 +137,19 @@
|
|
|
123
137
|
min-inline-size: 0;
|
|
124
138
|
}
|
|
125
139
|
|
|
126
|
-
/* The card left behind stays in place as a
|
|
140
|
+
/* The card left behind stays in place as a recessed slot, so the row never
|
|
141
|
+
* collapses and the slot separates from both the lane and resting cards. */
|
|
127
142
|
.ds-board-card[data-dragging] {
|
|
128
|
-
|
|
143
|
+
--field-paint: var(--field-pressed);
|
|
144
|
+
|
|
145
|
+
background: var(--field-pressed);
|
|
146
|
+
color: var(--color-text-muted);
|
|
129
147
|
}
|
|
130
148
|
|
|
149
|
+
/* The pointer rests on the overlay, so it keeps its rest fill. */
|
|
131
150
|
.ds-board-card[data-overlay] {
|
|
151
|
+
--field-paint: initial;
|
|
152
|
+
|
|
132
153
|
box-shadow: var(--shadow-lg);
|
|
133
154
|
background: var(--color-surface);
|
|
134
155
|
}
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
align-items: center;
|
|
5
5
|
justify-content: center;
|
|
6
6
|
gap: var(--space-2);
|
|
7
|
-
border:
|
|
7
|
+
border: 0;
|
|
8
8
|
border-radius: var(--radius-md);
|
|
9
9
|
font-family: var(--font-sans);
|
|
10
10
|
font-weight: var(--font-weight-semibold);
|
|
@@ -65,7 +65,7 @@
|
|
|
65
65
|
}
|
|
66
66
|
|
|
67
67
|
.ds-button:where(:not(.ds-field-skin))[data-variant="neutral"] {
|
|
68
|
-
background: var(--
|
|
68
|
+
background: var(--fill-control);
|
|
69
69
|
color: var(--color-text);
|
|
70
70
|
}
|
|
71
71
|
|
|
@@ -73,14 +73,14 @@
|
|
|
73
73
|
:disabled,
|
|
74
74
|
[aria-disabled="true"]
|
|
75
75
|
) {
|
|
76
|
-
background: var(--
|
|
76
|
+
background: var(--fill-control-hover);
|
|
77
77
|
}
|
|
78
78
|
|
|
79
79
|
.ds-button:where(:not(.ds-field-skin))[data-variant="neutral"]:active:not(
|
|
80
80
|
:disabled,
|
|
81
81
|
[aria-disabled="true"]
|
|
82
82
|
) {
|
|
83
|
-
background: var(--
|
|
83
|
+
background: var(--fill-control-pressed);
|
|
84
84
|
}
|
|
85
85
|
|
|
86
86
|
.ds-button:where(:not(.ds-field-skin))[data-variant="danger"] {
|
|
@@ -102,29 +102,38 @@
|
|
|
102
102
|
background: var(--color-danger-pressed, var(--color-danger));
|
|
103
103
|
}
|
|
104
104
|
|
|
105
|
+
/* Selected containers raise --button-active-bg above their own soft fill.
|
|
106
|
+
* Hover and press step from it on the soft ladder, so they always move
|
|
107
|
+
* further from rest; on the default ground they equal the soft steps. */
|
|
105
108
|
.ds-button:where(:not(.ds-field-skin))[data-variant="active"] {
|
|
106
|
-
background: var(--
|
|
109
|
+
background: var(--button-active-bg);
|
|
107
110
|
color: var(--color-primary-text);
|
|
108
|
-
border-color: var(--color-primary);
|
|
109
111
|
}
|
|
110
112
|
|
|
111
113
|
.ds-button:where(:not(.ds-field-skin))[data-variant="active"]:hover:not(
|
|
112
114
|
:disabled,
|
|
113
115
|
[aria-disabled="true"]
|
|
114
116
|
) {
|
|
115
|
-
background:
|
|
117
|
+
background: color-mix(
|
|
118
|
+
in srgb,
|
|
119
|
+
var(--color-primary) var(--soft-step-hover),
|
|
120
|
+
var(--button-active-bg)
|
|
121
|
+
);
|
|
116
122
|
}
|
|
117
123
|
|
|
118
124
|
.ds-button:where(:not(.ds-field-skin))[data-variant="active"]:active:not(
|
|
119
125
|
:disabled,
|
|
120
126
|
[aria-disabled="true"]
|
|
121
127
|
) {
|
|
122
|
-
background:
|
|
128
|
+
background: color-mix(
|
|
129
|
+
in srgb,
|
|
130
|
+
var(--color-primary) var(--soft-step-pressed),
|
|
131
|
+
var(--button-active-bg)
|
|
132
|
+
);
|
|
123
133
|
}
|
|
124
134
|
|
|
125
135
|
.ds-button:where(:not(.ds-field-skin))[data-variant="simple"] {
|
|
126
136
|
background: transparent;
|
|
127
|
-
border-color: transparent;
|
|
128
137
|
color: var(--color-text-muted);
|
|
129
138
|
font-weight: var(--font-weight-regular);
|
|
130
139
|
}
|
|
@@ -144,7 +153,7 @@
|
|
|
144
153
|
}
|
|
145
154
|
|
|
146
155
|
.ds-button:focus-visible {
|
|
147
|
-
outline: var(--
|
|
156
|
+
outline: var(--focus-width) solid var(--color-focus);
|
|
148
157
|
outline-offset: 2px;
|
|
149
158
|
}
|
|
150
159
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","names":["forwardRef","react","react_jsx_runtime","ButtonGroup","rest","isAttached","orientation","className"],"sources":["../../../src/components/ButtonGroup/index.tsx"],"sourcesContent":["import { forwardRef, type HTMLAttributes, type ReactNode } from \"react\";\nimport \"./style.css\";\n\nexport type ButtonGroupOrientation = \"horizontal\" | \"vertical\";\n\nexport interface ButtonGroupProps extends HTMLAttributes<HTMLDivElement> {\n /** Attached segments read as one control; spaced reads as related actions. */\n isAttached?: boolean;\n orientation?: ButtonGroupOrientation;\n /** Required when the group itself carries the meaning (e.g. a view switcher). */\n \"aria-label\"?: string;\n children?: ReactNode;\n}\n\n/**\n * A row of `Button`s that belong to one decision. Mark the current segment with\n * `variant=\"
|
|
1
|
+
{"version":3,"file":"index.cjs","names":["forwardRef","react","react_jsx_runtime","ButtonGroup","rest","isAttached","orientation","className"],"sources":["../../../src/components/ButtonGroup/index.tsx"],"sourcesContent":["import { forwardRef, type HTMLAttributes, type ReactNode } from \"react\";\nimport \"./style.css\";\n\nexport type ButtonGroupOrientation = \"horizontal\" | \"vertical\";\n\nexport interface ButtonGroupProps extends HTMLAttributes<HTMLDivElement> {\n /** Attached segments read as one control; spaced reads as related actions. */\n isAttached?: boolean;\n orientation?: ButtonGroupOrientation;\n /** Required when the group itself carries the meaning (e.g. a view switcher). */\n \"aria-label\"?: string;\n children?: ReactNode;\n}\n\n/**\n * A row of `Button`s that belong to one decision. Mark the current segment with\n * `variant=\"primary\"` and `aria-pressed` — the group adds no selection state of\n * its own, so it stays a layout contract rather than a second control API.\n */\nexport const ButtonGroup = forwardRef<HTMLDivElement, ButtonGroupProps>(function ButtonGroup(\n { isAttached = true, orientation = \"horizontal\", className, children, ...rest },\n ref,\n) {\n return (\n <div\n ref={ref}\n role=\"group\"\n data-attached={isAttached}\n data-orientation={orientation}\n className={[\"ds-button-group\", className].filter(Boolean).join(\" \")}\n {...rest}\n >\n {children}\n </div>\n );\n});\n"],"mappings":"A,yHAmBA,IAAaG,GAAA,EAAcH,EAAAA,WAAAA,CAA6C,SACtE,CAAE,aAAa,GAAM,cAAc,aAAc,YAAW,WAAU,GAAGI,GACzE,EACA,CACA,OACE,EAAAF,EAAA,IAAA,CAAC,MAAD,CACO,MACL,KAAK,QACL,gBAAeG,EACf,mBAAkBC,EAClB,UAAW,CAAC,kBAAmBC,CAAS,CAAC,CAAC,OAAO,OAAO,CAAC,CAAC,KAAK,GAAG,EAClE,GAAIH,EAEH,UACE,CAAA,CAET,CAAC,E"}
|
|
@@ -10,7 +10,7 @@ export interface ButtonGroupProps extends HTMLAttributes<HTMLDivElement> {
|
|
|
10
10
|
}
|
|
11
11
|
/**
|
|
12
12
|
* A row of `Button`s that belong to one decision. Mark the current segment with
|
|
13
|
-
* `variant="
|
|
13
|
+
* `variant="primary"` and `aria-pressed` — the group adds no selection state of
|
|
14
14
|
* its own, so it stays a layout contract rather than a second control API.
|
|
15
15
|
*/
|
|
16
16
|
export declare const ButtonGroup: import("react").ForwardRefExoticComponent<ButtonGroupProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
@@ -10,7 +10,7 @@ export interface ButtonGroupProps extends HTMLAttributes<HTMLDivElement> {
|
|
|
10
10
|
}
|
|
11
11
|
/**
|
|
12
12
|
* A row of `Button`s that belong to one decision. Mark the current segment with
|
|
13
|
-
* `variant="
|
|
13
|
+
* `variant="primary"` and `aria-pressed` — the group adds no selection state of
|
|
14
14
|
* its own, so it stays a layout contract rather than a second control API.
|
|
15
15
|
*/
|
|
16
16
|
export declare const ButtonGroup: import("react").ForwardRefExoticComponent<ButtonGroupProps & import("react").RefAttributes<HTMLDivElement>>;
|