@cloudgrid-io/ui 0.55.0 → 0.57.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/dist/blocks/chip-list.d.ts +35 -0
- package/dist/blocks/chip-list.d.ts.map +1 -0
- package/dist/blocks/chip-list.js +37 -0
- package/dist/blocks/chip-list.js.map +1 -0
- package/dist/blocks/confirm-delete-dialog.d.ts +12 -1
- package/dist/blocks/confirm-delete-dialog.d.ts.map +1 -1
- package/dist/blocks/confirm-delete-dialog.js +2 -2
- package/dist/blocks/confirm-delete-dialog.js.map +1 -1
- package/dist/blocks/danger-zone.d.ts.map +1 -1
- package/dist/blocks/danger-zone.js +13 -1
- package/dist/blocks/danger-zone.js.map +1 -1
- package/dist/blocks/dialog-subject.d.ts +34 -0
- package/dist/blocks/dialog-subject.d.ts.map +1 -0
- package/dist/blocks/dialog-subject.js +30 -0
- package/dist/blocks/dialog-subject.js.map +1 -0
- package/dist/blocks/field-label.d.ts +31 -0
- package/dist/blocks/field-label.d.ts.map +1 -0
- package/dist/blocks/field-label.js +29 -0
- package/dist/blocks/field-label.js.map +1 -0
- package/dist/blocks/filter-bar.d.ts +7 -5
- package/dist/blocks/filter-bar.d.ts.map +1 -1
- package/dist/blocks/filter-bar.js +13 -6
- package/dist/blocks/filter-bar.js.map +1 -1
- package/dist/blocks/grid-profile.d.ts +15 -1
- package/dist/blocks/grid-profile.d.ts.map +1 -1
- package/dist/blocks/grid-profile.js +14 -2
- package/dist/blocks/grid-profile.js.map +1 -1
- package/dist/blocks/impact-list.d.ts.map +1 -1
- package/dist/blocks/impact-list.js +1 -1
- package/dist/blocks/impact-list.js.map +1 -1
- package/dist/blocks/search-field.d.ts +4 -1
- package/dist/blocks/search-field.d.ts.map +1 -1
- package/dist/blocks/search-field.js +2 -2
- package/dist/blocks/search-field.js.map +1 -1
- package/dist/blocks/section-heading.d.ts +12 -1
- package/dist/blocks/section-heading.d.ts.map +1 -1
- package/dist/blocks/section-heading.js +12 -3
- package/dist/blocks/section-heading.js.map +1 -1
- package/dist/blocks/settings-frame.d.ts +7 -1
- package/dist/blocks/settings-frame.d.ts.map +1 -1
- package/dist/blocks/settings-frame.js +9 -2
- package/dist/blocks/settings-frame.js.map +1 -1
- package/dist/blocks/settings-row.d.ts +36 -5
- package/dist/blocks/settings-row.d.ts.map +1 -1
- package/dist/blocks/settings-row.js +55 -13
- package/dist/blocks/settings-row.js.map +1 -1
- package/dist/blocks/side-nav.d.ts +31 -1
- package/dist/blocks/side-nav.d.ts.map +1 -1
- package/dist/blocks/side-nav.js +38 -20
- package/dist/blocks/side-nav.js.map +1 -1
- package/dist/blocks/usage-meter.d.ts +7 -1
- package/dist/blocks/usage-meter.d.ts.map +1 -1
- package/dist/blocks/usage-meter.js +9 -3
- package/dist/blocks/usage-meter.js.map +1 -1
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -0
- package/dist/index.js.map +1 -1
- package/dist/ui/badge.d.ts +1 -1
- package/dist/ui/badge.d.ts.map +1 -1
- package/dist/ui/badge.js +8 -0
- package/dist/ui/badge.js.map +1 -1
- package/dist/ui/button.d.ts.map +1 -1
- package/dist/ui/button.js +6 -1
- package/dist/ui/button.js.map +1 -1
- package/dist/ui/combobox.d.ts +10 -1
- package/dist/ui/combobox.d.ts.map +1 -1
- package/dist/ui/combobox.js +10 -2
- package/dist/ui/combobox.js.map +1 -1
- package/dist/ui/dialog.d.ts +13 -2
- package/dist/ui/dialog.d.ts.map +1 -1
- package/dist/ui/dialog.js +13 -3
- package/dist/ui/dialog.js.map +1 -1
- package/dist/ui/input.d.ts +20 -1
- package/dist/ui/input.d.ts.map +1 -1
- package/dist/ui/input.js +20 -3
- package/dist/ui/input.js.map +1 -1
- package/dist/ui/select.d.ts +7 -3
- package/dist/ui/select.d.ts.map +1 -1
- package/dist/ui/select.js +25 -1
- package/dist/ui/select.js.map +1 -1
- package/dist/ui/switch.d.ts +13 -0
- package/dist/ui/switch.d.ts.map +1 -1
- package/dist/ui/switch.js +14 -1
- package/dist/ui/switch.js.map +1 -1
- package/dist/ui/table.d.ts +6 -1
- package/dist/ui/table.d.ts.map +1 -1
- package/dist/ui/table.js +6 -3
- package/dist/ui/table.js.map +1 -1
- package/dist/ui/textarea.d.ts +10 -1
- package/dist/ui/textarea.d.ts.map +1 -1
- package/dist/ui/textarea.js +10 -2
- package/dist/ui/textarea.js.map +1 -1
- package/package.json +1 -1
|
@@ -18,10 +18,21 @@ import * as React from "react";
|
|
|
18
18
|
* caption role in `faint-strong`, which clears 4.5:1 on every ground. Without
|
|
19
19
|
* either, the markup is byte for byte what it was (test/settings-row-494).
|
|
20
20
|
*
|
|
21
|
+
* ## `wrap` (ui#502)
|
|
22
|
+
*
|
|
23
|
+
* The title row wraps: at phone width a Coming soon tag after a long title
|
|
24
|
+
* goes under it (8 below), never past the column's edge, where the settings
|
|
25
|
+
* pages cut "Coming soon" to "Comin" (the final audit's R5 and G5). At any
|
|
26
|
+
* width where it fits, nothing moves: the gaps across are what they were.
|
|
27
|
+
* `SettingsSection` always sets it. Off by default, so the Home's headings,
|
|
28
|
+
* whose filter tabs shrink and scroll beside the title, are unchanged.
|
|
29
|
+
*
|
|
21
30
|
* `id` lands on the heading element, so a section can name itself with it
|
|
22
31
|
* (`aria-labelledby`), which is what `SettingsSection` does.
|
|
23
32
|
*/
|
|
24
|
-
declare function SectionHeading({ title, level, inline, action, icon, description, headingId, className, ...props }: Omit<React.ComponentProps<"div">, "title" | "children"> & {
|
|
33
|
+
declare function SectionHeading({ title, level, inline, action, icon, description, headingId, wrap, className, ...props }: Omit<React.ComponentProps<"div">, "title" | "children"> & {
|
|
34
|
+
/** Let `inline` go under the title when the row is too narrow (ui#502). */
|
|
35
|
+
wrap?: boolean;
|
|
25
36
|
title: React.ReactNode;
|
|
26
37
|
/** The heading element. Default 2. */
|
|
27
38
|
level?: 2 | 3 | 4;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"section-heading.d.ts","sourceRoot":"","sources":["../../src/blocks/section-heading.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAI9B
|
|
1
|
+
{"version":3,"file":"section-heading.d.ts","sourceRoot":"","sources":["../../src/blocks/section-heading.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAI9B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AACH,iBAAS,cAAc,CAAC,EACtB,KAAK,EACL,KAAS,EACT,MAAM,EACN,MAAM,EACN,IAAI,EACJ,WAAW,EACX,SAAS,EACT,IAAY,EACZ,SAAS,EACT,GAAG,KAAK,EACT,EAAE,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,EAAE,OAAO,GAAG,UAAU,CAAC,GAAG;IAC3D,2EAA2E;IAC3E,IAAI,CAAC,EAAE,OAAO,CAAA;IACd,KAAK,EAAE,KAAK,CAAC,SAAS,CAAA;IACtB,sCAAsC;IACtC,KAAK,CAAC,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,CAAA;IACjB,6CAA6C;IAC7C,MAAM,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IACxB,qCAAqC;IACrC,MAAM,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IACxB,uFAAuF;IACvF,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IACtB,4DAA4D;IAC5D,WAAW,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IAC7B,iEAAiE;IACjE,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB,qBA0EA;AAED,OAAO,EAAE,cAAc,EAAE,CAAA"}
|
|
@@ -20,16 +20,25 @@ import { cn } from "../lib/cloudgrid-cn.js";
|
|
|
20
20
|
* caption role in `faint-strong`, which clears 4.5:1 on every ground. Without
|
|
21
21
|
* either, the markup is byte for byte what it was (test/settings-row-494).
|
|
22
22
|
*
|
|
23
|
+
* ## `wrap` (ui#502)
|
|
24
|
+
*
|
|
25
|
+
* The title row wraps: at phone width a Coming soon tag after a long title
|
|
26
|
+
* goes under it (8 below), never past the column's edge, where the settings
|
|
27
|
+
* pages cut "Coming soon" to "Comin" (the final audit's R5 and G5). At any
|
|
28
|
+
* width where it fits, nothing moves: the gaps across are what they were.
|
|
29
|
+
* `SettingsSection` always sets it. Off by default, so the Home's headings,
|
|
30
|
+
* whose filter tabs shrink and scroll beside the title, are unchanged.
|
|
31
|
+
*
|
|
23
32
|
* `id` lands on the heading element, so a section can name itself with it
|
|
24
33
|
* (`aria-labelledby`), which is what `SettingsSection` does.
|
|
25
34
|
*/
|
|
26
|
-
function SectionHeading({ title, level = 2, inline, action, icon, description, headingId, className, ...props }) {
|
|
35
|
+
function SectionHeading({ title, level = 2, inline, action, icon, description, headingId, wrap = false, className, ...props }) {
|
|
27
36
|
const Heading = `h${level}`;
|
|
28
37
|
const heading = (_jsx(Heading, { "data-slot": "section-heading-title", id: headingId, className: "m-0 shrink-0 text-heading-lg font-medium text-ink", children: title }));
|
|
29
38
|
if (icon || description) {
|
|
30
|
-
return (_jsxs("div", { "data-slot": "section-heading", className: cn("flex min-w-0 items-start justify-between gap-6 text-ink", className), ...props, children: [_jsxs("div", { "data-slot": "section-heading-start", className: "grid min-w-0 gap-1", children: [_jsxs("div", { className: "flex min-w-0 items-center gap-3", children: [icon ? (_jsx("span", { "data-slot": "section-heading-icon", "aria-hidden": "true", className: "flex size-5 shrink-0 items-center justify-center text-steel in-data-[cg-surface=panel]:text-faint in-data-[cg-surface=ink]:text-faint [&>svg]:size-5", children: icon })) : null, heading, inline ? (_jsx("div", { "data-slot": "section-heading-inline", className: "ms-3 min-w-0", children: inline })) : null] }), description ? (_jsx("p", { "data-slot": "section-heading-description", className: "m-0 text-caption text-faint-strong", children: description })) : null] }), action ? (_jsx("div", { "data-slot": "section-heading-action", className: "shrink-0 self-center", children: action })) : null] }));
|
|
39
|
+
return (_jsxs("div", { "data-slot": "section-heading", className: cn("flex min-w-0 items-start justify-between gap-6 text-ink", className), ...props, children: [_jsxs("div", { "data-slot": "section-heading-start", className: "grid min-w-0 gap-1", children: [_jsxs("div", { className: cn("flex min-w-0 items-center gap-3", wrap && "flex-wrap gap-y-2"), children: [icon ? (_jsx("span", { "data-slot": "section-heading-icon", "aria-hidden": "true", className: "flex size-5 shrink-0 items-center justify-center text-steel in-data-[cg-surface=panel]:text-faint in-data-[cg-surface=ink]:text-faint [&>svg]:size-5", children: icon })) : null, heading, inline ? (_jsx("div", { "data-slot": "section-heading-inline", className: "ms-3 min-w-0", children: inline })) : null] }), description ? (_jsx("p", { "data-slot": "section-heading-description", className: "m-0 text-caption text-faint-strong", children: description })) : null] }), action ? (_jsx("div", { "data-slot": "section-heading-action", className: "shrink-0 self-center", children: action })) : null] }));
|
|
31
40
|
}
|
|
32
|
-
return (_jsxs("div", { "data-slot": "section-heading", className: cn("flex min-w-0 items-center justify-between gap-6 text-ink", className), ...props, children: [_jsxs("div", { "data-slot": "section-heading-start", className: "flex min-w-0 items-center gap-6", children: [heading, inline ? (_jsx("div", { "data-slot": "section-heading-inline", className: "min-w-0", children: inline })) : null] }), action ? (_jsx("div", { "data-slot": "section-heading-action", className: "shrink-0", children: action })) : null] }));
|
|
41
|
+
return (_jsxs("div", { "data-slot": "section-heading", className: cn("flex min-w-0 items-center justify-between gap-6 text-ink", className), ...props, children: [_jsxs("div", { "data-slot": "section-heading-start", className: cn("flex min-w-0 items-center gap-6", wrap && "flex-wrap gap-y-2"), children: [heading, inline ? (_jsx("div", { "data-slot": "section-heading-inline", className: "min-w-0", children: inline })) : null] }), action ? (_jsx("div", { "data-slot": "section-heading-action", className: "shrink-0", children: action })) : null] }));
|
|
33
42
|
}
|
|
34
43
|
export { SectionHeading };
|
|
35
44
|
//# sourceMappingURL=section-heading.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"section-heading.js","sourceRoot":"","sources":["../../src/blocks/section-heading.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAE9B,OAAO,EAAE,EAAE,EAAE,MAAM,oBAAoB,CAAA;AAEvC
|
|
1
|
+
{"version":3,"file":"section-heading.js","sourceRoot":"","sources":["../../src/blocks/section-heading.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAE9B,OAAO,EAAE,EAAE,EAAE,MAAM,oBAAoB,CAAA;AAEvC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AACH,SAAS,cAAc,CAAC,EACtB,KAAK,EACL,KAAK,GAAG,CAAC,EACT,MAAM,EACN,MAAM,EACN,IAAI,EACJ,WAAW,EACX,SAAS,EACT,IAAI,GAAG,KAAK,EACZ,SAAS,EACT,GAAG,KAAK,EAiBT;IACC,MAAM,OAAO,GAAG,IAAI,KAAK,EAAwB,CAAA;IAEjD,MAAM,OAAO,GAAG,CACd,KAAC,OAAO,iBACI,uBAAuB,EACjC,EAAE,EAAE,SAAS,EACb,SAAS,EAAC,mDAAmD,YAE5D,KAAK,GACE,CACX,CAAA;IAED,IAAI,IAAI,IAAI,WAAW,EAAE,CAAC;QACxB,OAAO,CACL,4BACY,iBAAiB,EAC3B,SAAS,EAAE,EAAE,CAAC,yDAAyD,EAAE,SAAS,CAAC,KAC/E,KAAK,aAET,4BAAe,uBAAuB,EAAC,SAAS,EAAC,oBAAoB,aACnE,eAAK,SAAS,EAAE,EAAE,CAAC,iCAAiC,EAAE,IAAI,IAAI,mBAAmB,CAAC,aAC/E,IAAI,CAAC,CAAC,CAAC,CACN,4BACY,sBAAsB,iBACpB,MAAM,EAClB,SAAS,EAAC,sJAAsJ,YAE/J,IAAI,GACA,CACR,CAAC,CAAC,CAAC,IAAI,EACP,OAAO,EACP,MAAM,CAAC,CAAC,CAAC,CACR,2BAAe,wBAAwB,EAAC,SAAS,EAAC,cAAc,YAC7D,MAAM,GACH,CACP,CAAC,CAAC,CAAC,IAAI,IACJ,EACL,WAAW,CAAC,CAAC,CAAC,CACb,yBAAa,6BAA6B,EAAC,SAAS,EAAC,oCAAoC,YACtF,WAAW,GACV,CACL,CAAC,CAAC,CAAC,IAAI,IACJ,EACL,MAAM,CAAC,CAAC,CAAC,CACR,2BAAe,wBAAwB,EAAC,SAAS,EAAC,sBAAsB,YACrE,MAAM,GACH,CACP,CAAC,CAAC,CAAC,IAAI,IACJ,CACP,CAAA;IACH,CAAC;IAED,OAAO,CACL,4BACY,iBAAiB,EAC3B,SAAS,EAAE,EAAE,CAAC,0DAA0D,EAAE,SAAS,CAAC,KAChF,KAAK,aAET,4BAAe,uBAAuB,EAAC,SAAS,EAAE,EAAE,CAAC,iCAAiC,EAAE,IAAI,IAAI,mBAAmB,CAAC,aACjH,OAAO,EACP,MAAM,CAAC,CAAC,CAAC,CACR,2BAAe,wBAAwB,EAAC,SAAS,EAAC,SAAS,YACxD,MAAM,GACH,CACP,CAAC,CAAC,CAAC,IAAI,IACJ,EACL,MAAM,CAAC,CAAC,CAAC,CACR,2BAAe,wBAAwB,EAAC,SAAS,EAAC,UAAU,YACzD,MAAM,GACH,CACP,CAAC,CAAC,CAAC,IAAI,IACJ,CACP,CAAA;AACH,CAAC;AAED,OAAO,EAAE,cAAc,EAAE,CAAA"}
|
|
@@ -75,8 +75,12 @@ declare function SettingsFrame({ menu, title, current, menuLabel, defaultMenuOpe
|
|
|
75
75
|
* subtitle, in the caption role; both optional.
|
|
76
76
|
* - `children`: the blocks, each one child of the stack. A block that should
|
|
77
77
|
* sit closer than 32 (Usage's alerts line under its rule) says so itself.
|
|
78
|
+
* - `tabbed` (ui#500): the first block is a tab row (Members 9 / Invited 3).
|
|
79
|
+
* The design leaves more air above tabs: 71 from the subtitle's caps to the
|
|
80
|
+
* tabs', where 32 gives 60. It is 44 under the header (`mb-3` on the 32),
|
|
81
|
+
* 72 cap to cap; only the space before the first block changes.
|
|
78
82
|
*/
|
|
79
|
-
declare function SettingsPage({ title, subtitle, action, eyebrow, note, className, children, ...props }: Omit<React.ComponentProps<"div">, "title"> & {
|
|
83
|
+
declare function SettingsPage({ title, subtitle, action, eyebrow, note, tabbed, className, children, ...props }: Omit<React.ComponentProps<"div">, "title"> & {
|
|
80
84
|
/** The page's name, its h1: "Usage". */
|
|
81
85
|
title: React.ReactNode;
|
|
82
86
|
/** The line under the title. */
|
|
@@ -87,6 +91,8 @@ declare function SettingsPage({ title, subtitle, action, eyebrow, note, classNam
|
|
|
87
91
|
eyebrow?: React.ReactNode;
|
|
88
92
|
/** A caption under the subtitle. */
|
|
89
93
|
note?: React.ReactNode;
|
|
94
|
+
/** The first block is a tab row: 44 under the header, not 32. */
|
|
95
|
+
tabbed?: boolean;
|
|
90
96
|
}): React.JSX.Element;
|
|
91
97
|
export { SettingsFrame, SettingsPage };
|
|
92
98
|
//# sourceMappingURL=settings-frame.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"settings-frame.d.ts","sourceRoot":"","sources":["../../src/blocks/settings-frame.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAK9B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AACH,iBAAS,aAAa,CAAC,EACrB,IAAI,EACJ,KAAK,EACL,OAAO,EACP,SAAkB,EAClB,eAAuB,EACvB,SAAS,EACT,QAAQ,EACR,GAAG,KAAK,EACT,EAAE,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,EAAE,OAAO,CAAC,GAAG;IAC9C,8DAA8D;IAC9D,IAAI,EAAE,KAAK,CAAC,SAAS,CAAA;IACrB,gDAAgD;IAChD,KAAK,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IACvB,6DAA6D;IAC7D,OAAO,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IACzB,8BAA8B;IAC9B,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,sCAAsC;IACtC,eAAe,CAAC,EAAE,OA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S,CAAA;IACzB,oCAAoC;IACpC,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IACtB,iEAAiE;IACjE,MAAM,CAAC,EAAE,OAAO,CAAA;CACjB,qBAsCA;AAED,OAAO,EAAE,aAAa,EAAE,YAAY,EAAE,CAAA"}
|
|
@@ -77,9 +77,16 @@ function SettingsFrame({ menu, title, current, menuLabel = "Menu", defaultMenuOp
|
|
|
77
77
|
* subtitle, in the caption role; both optional.
|
|
78
78
|
* - `children`: the blocks, each one child of the stack. A block that should
|
|
79
79
|
* sit closer than 32 (Usage's alerts line under its rule) says so itself.
|
|
80
|
+
* - `tabbed` (ui#500): the first block is a tab row (Members 9 / Invited 3).
|
|
81
|
+
* The design leaves more air above tabs: 71 from the subtitle's caps to the
|
|
82
|
+
* tabs', where 32 gives 60. It is 44 under the header (`mb-3` on the 32),
|
|
83
|
+
* 72 cap to cap; only the space before the first block changes.
|
|
80
84
|
*/
|
|
81
|
-
function SettingsPage({ title, subtitle, action, eyebrow, note, className, children, ...props }) {
|
|
82
|
-
return (_jsxs("div", { "data-slot": "settings-page", className: cn("flex min-w-0 flex-col gap-8", className), ...props, children: [_jsxs("header", { "data-slot": "settings-page-header", className: "grid min-w-0 gap-3", children: [eyebrow ? (_jsx("p", { "data-slot": "settings-page-eyebrow", className: "m-0 text-body-sm text-(--cg-text-accent)", children: eyebrow })) : null, _jsxs("div", { "data-slot": "settings-page-title-row", className: "flex min-w-0 flex-wrap items-center justify-between gap-4", children: [_jsx("h1", { "data-slot": "settings-page-title", className: "m-0 font-ui text-title-32 font-medium tracking-normal normal-case text-ink", children: title }), action ? (_jsx("div", { "data-slot": "settings-page-action", className: "flex shrink-0 items-center", children: action })) : null] }), subtitle ? (_jsx("p", { "data-slot": "settings-page-subtitle", className: "m-0 text-body-md text-body", children: subtitle })) : null, note ? (
|
|
85
|
+
function SettingsPage({ title, subtitle, action, eyebrow, note, tabbed = false, className, children, ...props }) {
|
|
86
|
+
return (_jsxs("div", { "data-slot": "settings-page", className: cn("flex min-w-0 flex-col gap-8", className), ...props, children: [_jsxs("header", { "data-slot": "settings-page-header", className: cn("grid min-w-0 gap-3", tabbed && "mb-3"), children: [eyebrow ? (_jsx("p", { "data-slot": "settings-page-eyebrow", className: "m-0 text-body-sm text-(--cg-text-accent)", children: eyebrow })) : null, _jsxs("div", { "data-slot": "settings-page-title-row", className: "flex min-w-0 flex-wrap items-center justify-between gap-4", children: [_jsx("h1", { "data-slot": "settings-page-title", className: "m-0 font-ui text-title-32 font-medium tracking-normal normal-case text-ink", children: title }), action ? (_jsx("div", { "data-slot": "settings-page-action", className: "flex shrink-0 items-center", children: action })) : null] }), subtitle ? (_jsx("p", { "data-slot": "settings-page-subtitle", className: "m-0 text-body-md text-body", children: subtitle })) : null, note ? (
|
|
87
|
+
// 8 under the subtitle, not the header's 12: 30 caps to caps, as
|
|
88
|
+
// Permissions draws it (ui#502; it was 35).
|
|
89
|
+
_jsx("p", { "data-slot": "settings-page-note", className: "m-0 -mt-1 text-caption text-faint-strong", children: note })) : null] }), children] }));
|
|
83
90
|
}
|
|
84
91
|
export { SettingsFrame, SettingsPage };
|
|
85
92
|
//# sourceMappingURL=settings-frame.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"settings-frame.js","sourceRoot":"","sources":["../../src/blocks/settings-frame.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAA;;AAEZ,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAE9B,OAAO,EAAE,EAAE,EAAE,MAAM,oBAAoB,CAAA;AACvC,OAAO,EAAE,eAAe,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAA;AAE/D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AACH,SAAS,aAAa,CAAC,EACrB,IAAI,EACJ,KAAK,EACL,OAAO,EACP,SAAS,GAAG,MAAM,EAClB,eAAe,GAAG,KAAK,EACvB,SAAS,EACT,QAAQ,EACR,GAAG,KAAK,EAY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AAC,CAAC,CAAC,CACT,yBAAa,uBAAuB,EAAC,SAAS,EAAC,0CAA0C,YACtF,OAAO,GACN,CACL,CAAC,CAAC,CAAC,IAAI,EACR,4BAAe,yBAAyB,EAAC,SAAS,EAAC,2DAA2D,aAC5G,0BACY,qBAAqB,EAC/B,SAAS,EAAC,4EAA4E,YAErF,KAAK,GACH,EACJ,MAAM,CAAC,CAAC,CAAC,CACR,2BAAe,sBAAsB,EAAC,SAAS,EAAC,4BAA4B,YACzE,MAAM,GACH,CACP,CAAC,CAAC,CAAC,IAAI,IACJ,EACL,QAAQ,CAAC,CAAC,CAAC,CACV,yBAAa,wBAAwB,EAAC,SAAS,EAAC,4BAA4B,YACzE,QAAQ,GACP,CACL,CAAC,CAAC,CAAC,IAAI,EACP,IAAI,CAAC,CAAC,CAAC;oBACN,iEAAiE;oBACjE,4CAA4C;oBAC5C,yBAAa,oBAAoB,EAAC,SAAS,EAAC,0CAA0C,YACnF,IAAI,GACH,CACL,CAAC,CAAC,CAAC,IAAI,IACD,EACR,QAAQ,IACL,CACP,CAAA;AACH,CAAC;AAED,OAAO,EAAE,aAAa,EAAE,YAAY,EAAE,CAAA"}
|
|
@@ -31,15 +31,36 @@ declare function SettingsRow({ label, description, link, control, comingSoon, hi
|
|
|
31
31
|
* `divider` (ui#498) draws the hairline under the section, with its content
|
|
32
32
|
* ending 24 above it (`pb-6`): Usage's Run power and AI blocks, as the design
|
|
33
33
|
* measures them. Without it the section has no rule and no padding of its own.
|
|
34
|
+
*
|
|
35
|
+
* ## `density` and `rule` (ui#502)
|
|
36
|
+
*
|
|
37
|
+
* Permissions draws its sections tighter than General (the final audit's R1
|
|
38
|
+
* and R2, at 1:1): hairlines 58 apart, a one-line row with its 38 select or
|
|
39
|
+
* its 24 switch centred in it, and a hairline under every section heading, 34
|
|
40
|
+
* below the title's caps, with the first row right under it. General draws its
|
|
41
|
+
* rows about 71 apart and no hairline under its headings, so these are props
|
|
42
|
+
* and the defaults are unchanged.
|
|
43
|
+
*
|
|
44
|
+
* density="compact" rows at least 58 tall, 6 above and below the text
|
|
45
|
+
* rule the hairline under the heading (14 under its box),
|
|
46
|
+
* and no gap between it and the first row
|
|
34
47
|
*/
|
|
35
|
-
declare function SettingsSection({ title, icon, description, action, level, comingSoon, divider, className, children, ...props }: Omit<React.ComponentProps<"section">, "title"> & {
|
|
48
|
+
declare function SettingsSection({ title, icon, description, action, level, comingSoon, divider, density, rule, className, children, ...props }: Omit<React.ComponentProps<"section">, "title"> & {
|
|
49
|
+
/** `compact` (ui#502): rows 58 from hairline to hairline, as Permissions draws them. */
|
|
50
|
+
density?: "default" | "compact";
|
|
51
|
+
/** A hairline under the heading, the rows right under it (ui#502). */
|
|
52
|
+
rule?: boolean;
|
|
36
53
|
title: React.ReactNode;
|
|
37
54
|
icon?: React.ReactNode;
|
|
38
55
|
description?: React.ReactNode;
|
|
39
56
|
action?: React.ReactNode;
|
|
40
57
|
level?: 2 | 3 | 4;
|
|
41
|
-
/**
|
|
42
|
-
|
|
58
|
+
/**
|
|
59
|
+
* Designed, not built. `true`: one tag on the heading, every row and the
|
|
60
|
+
* action unusable. `"partial"`: one tag on the heading, and only the rows
|
|
61
|
+
* marked `comingSoon` unusable, untagged.
|
|
62
|
+
*/
|
|
63
|
+
comingSoon?: boolean | "partial";
|
|
43
64
|
/** A hairline under the section, its content ending 24 above it. */
|
|
44
65
|
divider?: boolean;
|
|
45
66
|
}): React.JSX.Element;
|
|
@@ -59,11 +80,19 @@ declare function SettingsLink({ render, className, children, ...props }: useRend
|
|
|
59
80
|
* the rows above and below. No `onEdit`, no pencil: a pencil that does nothing
|
|
60
81
|
* would say the value can be changed when it cannot.
|
|
61
82
|
*/
|
|
62
|
-
declare function EditableValue({ value, label, onEdit, valueClassName, className, ...props }: Omit<React.ComponentProps<"span">, "children"> & {
|
|
83
|
+
declare function EditableValue({ value, label, onEdit, valueClassName, wrap, className, ...props }: Omit<React.ComponentProps<"span">, "children"> & {
|
|
63
84
|
/** What is shown. */
|
|
64
85
|
value: React.ReactNode;
|
|
65
86
|
/** The value's type and colour, when it is not a row's 15px ink (the Grid's name). */
|
|
66
87
|
valueClassName?: string;
|
|
88
|
+
/**
|
|
89
|
+
* Wrap a long value onto more lines instead of cutting it with an ellipsis
|
|
90
|
+
* (ui#500: the Grid's description at phone width). The pencil is in the
|
|
91
|
+
* text's flow, 8 after its last word (ui#502), so it does not jump to the
|
|
92
|
+
* column's right edge when the value takes the whole width. Off, the value
|
|
93
|
+
* is one line, as before.
|
|
94
|
+
*/
|
|
95
|
+
wrap?: boolean;
|
|
67
96
|
/** What the pencil edits, in words: "administrative contact". */
|
|
68
97
|
label: string;
|
|
69
98
|
onEdit?: () => void;
|
|
@@ -95,7 +124,9 @@ declare function SettingsSummary({ glyph, title, description, figure, figureNote
|
|
|
95
124
|
/**
|
|
96
125
|
* Label and value pairs (ui#494): Billing details as the design draws them,
|
|
97
126
|
* two columns, the labels in the quiet tone, no rules between. A real
|
|
98
|
-
* description list, so a screen reader pairs each value with its label.
|
|
127
|
+
* description list, so a screen reader pairs each value with its label. The
|
|
128
|
+
* values start 264 from the edge, as the design measures (a 232 label column
|
|
129
|
+
* and the 32 gap; ui#502, it was 288).
|
|
99
130
|
*/
|
|
100
131
|
declare function DetailList({ items, className, ...props }: Omit<React.ComponentProps<"dl">, "children"> & {
|
|
101
132
|
items: readonly {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"settings-row.d.ts","sourceRoot":"","sources":["../../src/blocks/settings-row.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAA;
|
|
1
|
+
{"version":3,"file":"settings-row.d.ts","sourceRoot":"","sources":["../../src/blocks/settings-row.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAA;AA6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AG,UAAU,CAAC,GAAG;IAC3D,wEAAwE;IACxE,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,CAAA;IAClB,KAAK,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IACvB,KAAK,EAAE,KAAK,CAAC,SAAS,CAAA;IACtB,WAAW,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IAC7B,MAAM,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IACxB,UAAU,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IAC5B,MAAM,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;CACzB,qBAoDA;AAED;;;;;;GAMG;AACH,iBAAS,UAAU,CAAC,EAClB,KAAK,EACL,SAAS,EACT,GAAG,KAAK,EACT,EAAE,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,IAAI,CAAC,EAAE,UAAU,CAAC,GAAG;IAChD,KAAK,EAAE,SAAS;QAAE,KAAK,EAAE,KAAK,CAAC,SAAS,CAAC;QAAC,KAAK,EAAE,KAAK,CAAC,SAAS,CAAA;KAAE,EAAE,CAAA;CACrE,qBAeA;AAED,OAAO,EAAE,UAAU,EAAE,aAAa,EAAE,YAAY,EAAE,WAAW,EAAE,eAAe,EAAE,eAAe,EAAE,CAAA;AACjG,YAAY,EAAE,kBAAkB,EAAE,CAAA"}
|
|
@@ -79,6 +79,14 @@ import { SectionHeading } from "./section-heading.js";
|
|
|
79
79
|
* section stays a region, so it carries no `aria-disabled` of its own; its
|
|
80
80
|
* name says Coming soon.
|
|
81
81
|
*
|
|
82
|
+
* ## Some rows Coming soon (`SettingsSection comingSoon="partial"`, ui#500)
|
|
83
|
+
*
|
|
84
|
+
* A working section with a few unbuilt rows (General's Creation defaults, the
|
|
85
|
+
* Grid profile with its logo upload to come): one tag on the heading, never one
|
|
86
|
+
* per row. The section is named with the tag; its rows and its action work;
|
|
87
|
+
* only the rows marked `comingSoon` are greyed, inert and `aria-disabled`, and
|
|
88
|
+
* they carry no tag of their own.
|
|
89
|
+
*
|
|
82
90
|
* ## The highlight (`highlighted`)
|
|
83
91
|
*
|
|
84
92
|
* The settings search opens a page and points at one row ("Timezone ·
|
|
@@ -89,21 +97,33 @@ import { SectionHeading } from "./section-heading.js";
|
|
|
89
97
|
* the surface's own wash on the panel and on ink, where the tint is a light
|
|
90
98
|
* colour under light text.
|
|
91
99
|
*/
|
|
92
|
-
/**
|
|
100
|
+
/**
|
|
101
|
+
* Inside a `SettingsSection` that is Coming soon: `all`, every row is
|
|
102
|
+
* unavailable; `partial`, the heading carries the tag and only the rows marked
|
|
103
|
+
* `comingSoon` are unavailable, without a tag of their own.
|
|
104
|
+
*/
|
|
93
105
|
const SettingsSectionComingSoon = React.createContext(false);
|
|
106
|
+
/** The rows' height inside a `SettingsSection` (ui#502): see its `density`. */
|
|
107
|
+
const SettingsSectionDensity = React.createContext("default");
|
|
94
108
|
function SettingsRow({ label, description, link, control, comingSoon = false, highlighted = false, align = "center", className, ...props }) {
|
|
95
109
|
const labelId = React.useId();
|
|
96
110
|
const tagId = React.useId();
|
|
97
111
|
const descriptionId = React.useId();
|
|
98
112
|
const sectionComingSoon = React.useContext(SettingsSectionComingSoon);
|
|
99
|
-
|
|
100
|
-
|
|
113
|
+
const compact = React.useContext(SettingsSectionDensity) === "compact";
|
|
114
|
+
// Unavailable on its own or because its whole section is. In a `partial`
|
|
115
|
+
// section the heading carries the one tag, so the row has none of its own.
|
|
116
|
+
const unavailable = comingSoon || sectionComingSoon === "all";
|
|
117
|
+
const tagged = comingSoon && sectionComingSoon !== "partial";
|
|
101
118
|
const hasDescription = description !== undefined && description !== null && description !== false;
|
|
102
119
|
const describedBy = hasDescription ? descriptionId : undefined;
|
|
103
120
|
const rendered = typeof control === "function" ? control({ labelId, descriptionId: describedBy }) : control;
|
|
104
|
-
return (_jsxs("div", { "data-slot": "settings-row", role: "group", "aria-labelledby":
|
|
121
|
+
return (_jsxs("div", { "data-slot": "settings-row", role: "group", "aria-labelledby": tagged ? `${labelId} ${tagId}` : labelId, "aria-describedby": describedBy, "aria-disabled": unavailable ? "true" : undefined, "data-coming-soon": unavailable ? "" : undefined, "data-highlighted": highlighted ? "" : undefined, className: cn("relative isolate flex scroll-mt-6 flex-col gap-3 border-b border-hairline py-4 last:border-b-0", "sm:flex-row sm:justify-between sm:gap-8", align === "start" ? "sm:items-start" : "sm:items-center",
|
|
122
|
+
// ui#502: a compact section's rows are 58 from hairline to hairline
|
|
123
|
+
// (Permissions): at least 58, and 6 above and below the text.
|
|
124
|
+
compact && "min-h-14.5 py-1.5",
|
|
105
125
|
// The highlight, outside the text box: see the module note.
|
|
106
|
-
"before:pointer-events-none before:absolute before:inset-y-0 before:-inset-x-3 before:-z-10 before:rounded-md before:bg-brand-tint before:opacity-0 before:transition-opacity before:duration-(--cg-duration)", "in-data-[cg-surface=panel]:before:bg-(--cg-hover) in-data-[cg-surface=ink]:before:bg-(--cg-hover)", "data-highlighted:before:opacity-100", className), ...props, children: [_jsxs("div", { "data-slot": "settings-row-text", className: "grid min-w-0 flex-1 gap-1", children: [_jsxs("div", { className: "flex min-w-0 flex-wrap items-center gap-2", children: [_jsx("span", { id: labelId, "data-slot": "settings-row-label", className: "text-body-sm font-medium text-ink", children: label }),
|
|
126
|
+
"before:pointer-events-none before:absolute before:inset-y-0 before:-inset-x-3 before:-z-10 before:rounded-md before:bg-brand-tint before:opacity-0 before:transition-opacity before:duration-(--cg-duration)", "in-data-[cg-surface=panel]:before:bg-(--cg-hover) in-data-[cg-surface=ink]:before:bg-(--cg-hover)", "data-highlighted:before:opacity-100", className), ...props, children: [_jsxs("div", { "data-slot": "settings-row-text", className: "grid min-w-0 flex-1 gap-1", children: [_jsxs("div", { className: "flex min-w-0 flex-wrap items-center gap-2", children: [_jsx("span", { id: labelId, "data-slot": "settings-row-label", className: "text-body-sm font-medium text-ink", children: label }), tagged ? _jsx(ComingSoonTag, { id: tagId }) : null] }), hasDescription ? (_jsx("p", { id: descriptionId, "data-slot": "settings-row-description", className: "m-0 text-caption text-faint-strong", children: description })) : null, link ? (_jsx("div", { "data-slot": "settings-row-link", className: "pt-1", children: link })) : null] }), rendered !== undefined && rendered !== null && rendered !== false ? (_jsx("div", { "data-slot": "settings-row-control", inert: unavailable, className: cn("flex min-w-0 shrink-0 items-center gap-3 sm:justify-end", unavailable && "opacity-50 select-none"), children: rendered })) : null] }));
|
|
107
127
|
}
|
|
108
128
|
/**
|
|
109
129
|
* A section of settings: its heading, then its rows. `title`, `icon`,
|
|
@@ -113,11 +133,26 @@ function SettingsRow({ label, description, link, control, comingSoon = false, hi
|
|
|
113
133
|
* `divider` (ui#498) draws the hairline under the section, with its content
|
|
114
134
|
* ending 24 above it (`pb-6`): Usage's Run power and AI blocks, as the design
|
|
115
135
|
* measures them. Without it the section has no rule and no padding of its own.
|
|
136
|
+
*
|
|
137
|
+
* ## `density` and `rule` (ui#502)
|
|
138
|
+
*
|
|
139
|
+
* Permissions draws its sections tighter than General (the final audit's R1
|
|
140
|
+
* and R2, at 1:1): hairlines 58 apart, a one-line row with its 38 select or
|
|
141
|
+
* its 24 switch centred in it, and a hairline under every section heading, 34
|
|
142
|
+
* below the title's caps, with the first row right under it. General draws its
|
|
143
|
+
* rows about 71 apart and no hairline under its headings, so these are props
|
|
144
|
+
* and the defaults are unchanged.
|
|
145
|
+
*
|
|
146
|
+
* density="compact" rows at least 58 tall, 6 above and below the text
|
|
147
|
+
* rule the hairline under the heading (14 under its box),
|
|
148
|
+
* and no gap between it and the first row
|
|
116
149
|
*/
|
|
117
|
-
function SettingsSection({ title, icon, description, action, level = 2, comingSoon = false, divider = false, className, children, ...props }) {
|
|
150
|
+
function SettingsSection({ title, icon, description, action, level = 2, comingSoon = false, divider = false, density = "default", rule = false, className, children, ...props }) {
|
|
118
151
|
const headingId = React.useId();
|
|
119
152
|
const tagId = React.useId();
|
|
120
|
-
|
|
153
|
+
const partial = comingSoon === "partial";
|
|
154
|
+
const whole = comingSoon === true;
|
|
155
|
+
return (_jsxs("section", { "aria-labelledby": comingSoon ? `${headingId} ${tagId}` : headingId, "data-coming-soon": partial ? "partial" : whole ? "" : undefined, "data-slot": "settings-section", className: cn("grid min-w-0 scroll-mt-6 gap-2 text-ink", rule && "gap-0", divider && "border-b border-hairline pb-6", className), ...props, children: [_jsx(SectionHeading, { title: title, icon: icon, description: description, inline: comingSoon ? _jsx(ComingSoonTag, { id: tagId }) : undefined, action: action ? (_jsx("span", { "data-slot": "settings-section-action", inert: whole, className: cn("inline-flex", whole && "opacity-50 select-none"), children: action })) : undefined, level: level, headingId: headingId, wrap: true, className: rule ? "border-b border-hairline pb-3.5" : undefined }), _jsx("div", { "data-slot": "settings-section-rows", className: "flex min-w-0 flex-col", children: _jsx(SettingsSectionComingSoon.Provider, { value: partial ? "partial" : whole ? "all" : false, children: _jsx(SettingsSectionDensity.Provider, { value: density, children: children }) }) })] }));
|
|
121
156
|
}
|
|
122
157
|
/**
|
|
123
158
|
* The brand text link with the leave-arrow: "Manage plan", "Manage spaces",
|
|
@@ -146,8 +181,11 @@ function SettingsLink({ render, className, children, ...props }) {
|
|
|
146
181
|
* the rows above and below. No `onEdit`, no pencil: a pencil that does nothing
|
|
147
182
|
* would say the value can be changed when it cannot.
|
|
148
183
|
*/
|
|
149
|
-
function EditableValue({ value, label, onEdit, valueClassName, className, ...props }) {
|
|
150
|
-
|
|
184
|
+
function EditableValue({ value, label, onEdit, valueClassName, wrap = false, className, ...props }) {
|
|
185
|
+
const pencil = onEdit ? (_jsx("button", { type: "button", "aria-label": `Edit ${label}`, onClick: onEdit, className: cn("-me-1 inline-flex size-6 shrink-0 items-center justify-center rounded-xs text-body transition-colors hover:bg-(--cg-hover) hover:text-ink focus-line",
|
|
186
|
+
// In the flow of a wrapping value: 8 after the last word, on its line.
|
|
187
|
+
wrap && "ms-2 -my-1 align-middle"), children: _jsx(EditIcon, { className: "size-4" }) })) : null;
|
|
188
|
+
return (_jsxs("span", { "data-slot": "editable-value", className: cn("inline-flex min-w-0 items-center gap-2", wrap && "items-start", className), ...props, children: [_jsxs("span", { "data-slot": "editable-value-text", className: cn("min-w-0 text-body-sm text-ink", wrap ? "block whitespace-normal break-words" : "truncate", valueClassName), children: [value, wrap ? pencil : null] }), wrap ? null : pencil] }));
|
|
151
189
|
}
|
|
152
190
|
/**
|
|
153
191
|
* A SUMMARY BLOCK (ui#494): Billing's plan and payment method, as the design
|
|
@@ -164,16 +202,20 @@ function EditableValue({ value, label, onEdit, valueClassName, className, ...pro
|
|
|
164
202
|
* a Coming soon section the action is inert and greyed, as a row's control is.
|
|
165
203
|
*/
|
|
166
204
|
function SettingsSummary({ glyph, title, description, figure, figureNote, action, size = "lg", className, ...props }) {
|
|
167
|
-
const unavailable = React.useContext(SettingsSectionComingSoon);
|
|
168
|
-
return (_jsxs("div", { "data-slot": "settings-summary", className: cn("flex min-w-0 flex-wrap items-center gap-x-8 gap-y-4 py-4 text-ink", className), ...props, children: [_jsxs("div", { className: "flex min-w-0 items-center gap-5 sm:w-80", children: [glyph ? (_jsx("span", { "data-slot": "settings-summary-glyph", "aria-hidden": "true", className: "flex shrink-0 items-center justify-center", children: glyph })) : null, _jsxs("div", { className: "grid min-w-0 gap-1", children: [_jsx("span", { "data-slot": "settings-summary-title", className: cn(size === "md" ? "text-body-18" : "text-title-24", "font-medium tracking-normal"), children: title }), description ? (_jsx("span", { "data-slot": "settings-summary-description", className: "text-body-sm text-body", children: description })) : null] })] }), figure ? (
|
|
205
|
+
const unavailable = React.useContext(SettingsSectionComingSoon) === "all";
|
|
206
|
+
return (_jsxs("div", { "data-slot": "settings-summary", className: cn("flex min-w-0 flex-wrap items-center gap-x-8 gap-y-4 py-4 text-ink", className), ...props, children: [_jsxs("div", { className: "flex min-w-0 items-center gap-5 sm:w-80", children: [glyph ? (_jsx("span", { "data-slot": "settings-summary-glyph", "aria-hidden": "true", className: "flex shrink-0 items-center justify-center", children: glyph })) : null, _jsxs("div", { className: "grid min-w-0 gap-1", children: [_jsx("span", { "data-slot": "settings-summary-title", className: cn(size === "md" ? "text-body-18" : "text-title-24", "font-medium tracking-normal"), children: title }), description ? (_jsx("span", { "data-slot": "settings-summary-description", className: "text-body-sm text-body", children: description })) : null] })] }), figure ? (
|
|
207
|
+
// On the title's line, not centred on the title and its line (ui#502).
|
|
208
|
+
_jsxs("div", { className: "grid min-w-0 gap-1 self-start", children: [_jsx("span", { "data-slot": "settings-summary-figure", className: "text-title-24 font-medium tracking-normal tabular-nums", children: figure }), figureNote ? (_jsx("span", { "data-slot": "settings-summary-figure-note", className: "text-body-sm text-body", children: figureNote })) : null] })) : null, action ? (_jsx("div", { "data-slot": "settings-summary-action", inert: unavailable, className: cn("ms-auto flex shrink-0 items-center gap-3", unavailable && "opacity-50 select-none"), children: action })) : null] }));
|
|
169
209
|
}
|
|
170
210
|
/**
|
|
171
211
|
* Label and value pairs (ui#494): Billing details as the design draws them,
|
|
172
212
|
* two columns, the labels in the quiet tone, no rules between. A real
|
|
173
|
-
* description list, so a screen reader pairs each value with its label.
|
|
213
|
+
* description list, so a screen reader pairs each value with its label. The
|
|
214
|
+
* values start 264 from the edge, as the design measures (a 232 label column
|
|
215
|
+
* and the 32 gap; ui#502, it was 288).
|
|
174
216
|
*/
|
|
175
217
|
function DetailList({ items, className, ...props }) {
|
|
176
|
-
return (_jsx("dl", { "data-slot": "detail-list", className: cn("m-0 grid min-w-0 grid-cols-1 gap-x-8 gap-y-2 py-4 text-ink sm:grid-cols-[
|
|
218
|
+
return (_jsx("dl", { "data-slot": "detail-list", className: cn("m-0 grid min-w-0 grid-cols-1 gap-x-8 gap-y-2 py-4 text-ink sm:grid-cols-[14.5rem_minmax(0,1fr)] sm:gap-y-6", className), ...props, children: items.map((item, i) => (_jsxs(React.Fragment, { children: [_jsx("dt", { className: "text-body-md text-faint-strong", children: item.label }), _jsx("dd", { className: "m-0 text-body-md text-ink max-sm:pb-3", children: item.value })] }, i))) }));
|
|
177
219
|
}
|
|
178
220
|
export { DetailList, EditableValue, SettingsLink, SettingsRow, SettingsSection, SettingsSummary };
|
|
179
221
|
//# sourceMappingURL=settings-row.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"settings-row.js","sourceRoot":"","sources":["../../src/blocks/settings-row.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAA;;AAEZ,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAA;AAErD,OAAO,EAAE,EAAE,EAAE,MAAM,oBAAoB,CAAA;AACvC,OAAO,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAA;AAC7D,OAAO,EAAE,QAAQ,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAA;AAC5D,OAAO,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAA;AAE9D
|
|
1
|
+
{"version":3,"file":"settings-row.js","sourceRoot":"","sources":["../../src/blocks/settings-row.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAA;;AAEZ,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAA;AAErD,OAAO,EAAE,EAAE,EAAE,MAAM,oBAAoB,CAAA;AACvC,OAAO,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAA;AAC7D,OAAO,EAAE,QAAQ,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAA;AAC5D,OAAO,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAA;AAE9D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0FG;AAEH;;;;GAIG;AACH,MAAM,yBAAyB,GAAG,KAAK,CAAC,aAAa,CAA4B,KAAK,CAAC,CAAA;AAEvF,+EAA+E;AAC/E,MAAM,sBAAsB,GAAG,KAAK,CAAC,aAAa,CAAwB,SAAS,CAAC,CAAA;AAMpF,SAAS,WAAW,CAAC,EACnB,KAAK,EACL,WA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CAAC,IAAI,IACJ,IACF,EACL,MAAM,CAAC,CAAC,CAAC;YACR,uEAAuE;YACvE,eAAK,SAAS,EAAC,+BAA+B,aAC5C,4BAAgB,yBAAyB,EAAC,SAAS,EAAC,wDAAwD,YACzG,MAAM,GACF,EACN,UAAU,CAAC,CAAC,CAAC,CACZ,4BAAgB,8BAA8B,EAAC,SAAS,EAAC,wBAAwB,YAC9E,UAAU,GACN,CACR,CAAC,CAAC,CAAC,IAAI,IACJ,CACP,CAAC,CAAC,CAAC,IAAI,EACP,MAAM,CAAC,CAAC,CAAC,CACR,2BACY,yBAAyB,EACnC,KAAK,EAAE,WAAW,EAClB,SAAS,EAAE,EAAE,CAAC,0CAA0C,EAAE,WAAW,IAAI,wBAAwB,CAAC,YAEjG,MAAM,GACH,CACP,CAAC,CAAC,CAAC,IAAI,IACJ,CACP,CAAA;AACH,CAAC;AAED;;;;;;GAMG;AACH,SAAS,UAAU,CAAC,EAClB,KAAK,EACL,SAAS,EACT,GAAG,KAAK,EAGT;IACC,OAAO,CACL,0BACY,aAAa,EACvB,SAAS,EAAE,EAAE,CAAC,4GAA4G,EAAE,SAAS,CAAC,KAClI,KAAK,YAER,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,CAAC,EAAE,EAAE,CAAC,CACtB,MAAC,KAAK,CAAC,QAAQ,eACb,aAAI,SAAS,EAAC,gCAAgC,YAAE,IAAI,CAAC,KAAK,GAAM,EAChE,aAAI,SAAS,EAAC,uCAAuC,YAAE,IAAI,CAAC,KAAK,GAAM,KAFpD,CAAC,CAGL,CAClB,CAAC,GACC,CACN,CAAA;AACH,CAAC;AAED,OAAO,EAAE,UAAU,EAAE,aAAa,EAAE,YAAY,EAAE,WAAW,EAAE,eAAe,EAAE,eAAe,EAAE,CAAA"}
|
|
@@ -1,5 +1,29 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import { useRender } from "@base-ui/react/use-render";
|
|
3
|
+
/**
|
|
4
|
+
* ## The settings menu (`variant="settings"`, ui#502)
|
|
5
|
+
*
|
|
6
|
+
* The Grid settings designs draw their menu another way than the app page's
|
|
7
|
+
* rail, the same on all eight of them (cloudgrid-console#1068's final audit,
|
|
8
|
+
* rows S1 to S3 and S7):
|
|
9
|
+
*
|
|
10
|
+
* - the chosen row is a NEUTRAL chip, the page grey N1 (`bg-page`, #F1F1F6),
|
|
11
|
+
* not Primary 20, with its label and filled glyph in the accent text role
|
|
12
|
+
* (Primary on the page: 5.19:1 on N1, over the 4.5:1 floor for the label).
|
|
13
|
+
* N1 is a :root value that does not flip, so on the panel and on ink the chip
|
|
14
|
+
* is the surface's own wash and the accent is the surface's own (white,
|
|
15
|
+
* lime), as everything else in the nav does;
|
|
16
|
+
* - the glyphs at rest are ink (#222), not N3 (14.1:1 on N1, 15.9:1 on white);
|
|
17
|
+
* - a row's glyph is 12 in from the chip's left and its label 44 in (12 + 20 +
|
|
18
|
+
* 12), not 20 and 52, and the group labels sit on the column's edge, with
|
|
19
|
+
* the search field and the chips;
|
|
20
|
+
* - the search mark is 14, 14 in, with the text 37 in (`Input slotSize="xs"`).
|
|
21
|
+
*
|
|
22
|
+
* The app page's rail and the platform admin's keep the lavender chip, the N3
|
|
23
|
+
* glyphs and the 20 inset they were designed with (#377, #436, ui#477): the
|
|
24
|
+
* designs do not agree, so it is a variant and the default is unchanged.
|
|
25
|
+
*/
|
|
26
|
+
type SideNavVariant = "default" | "settings";
|
|
3
27
|
/**
|
|
4
28
|
* Whether every word of the query is somewhere in the text, ignoring case,
|
|
5
29
|
* accents and order. An empty query matches everything.
|
|
@@ -39,7 +63,13 @@ export type SideNavSearchProps = {
|
|
|
39
63
|
/** At most this many results are listed. */
|
|
40
64
|
maxResults?: number;
|
|
41
65
|
};
|
|
42
|
-
declare function SideNav({ label, context, search, className, children, onKeyDown, ...props }: Omit<React.ComponentProps<"nav">, "ref"> & {
|
|
66
|
+
declare function SideNav({ label, context, search, variant, className, children, onKeyDown, ...props }: Omit<React.ComponentProps<"nav">, "ref"> & {
|
|
67
|
+
/**
|
|
68
|
+
* `settings` (ui#502): the Grid settings menu, a neutral chip with the
|
|
69
|
+
* accent label, ink glyphs, rows 12 in and the small search mark. See the
|
|
70
|
+
* module note, "The settings menu".
|
|
71
|
+
*/
|
|
72
|
+
variant?: SideNavVariant;
|
|
43
73
|
/**
|
|
44
74
|
* Names the landmark. Required, not optional: a page with two `<nav>`s and no
|
|
45
75
|
* names gives a screen-reader user two identical "navigation" entries and no
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"side-nav.d.ts","sourceRoot":"","sources":["../../src/blocks/side-nav.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAA;
|
|
1
|
+
{"version":3,"file":"side-nav.d.ts","sourceRoot":"","sources":["../../src/blocks/side-nav.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAA;AAmLrD;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,KAAK,cAAc,GAAG,SAAS,GAAG,UAAU,CAAA;AAmC5C;;;GAGG;AACH,iBAAS,mBAAmB,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO,CAMjE;AAWD,gEAAgE;AAChE,MAAM,MAAM,mBAAmB,GAAG;IAChC,4DAA4D;IAC5D,EAAE,EAAE,MAAM,CAAA;IACV,2CAA2C;IAC3C,KAAK,EAAE,MAAM,CAAA;IACb,4CAA4C;IAC5C,IAAI,EAAE,MAAM,CAAA;IACZ,uDAAuD;IACvD,SAAS,EAAE,MAAM,CAAA;IACjB,iEAAiE;IACjE,QAAQ,CAAC,EAAE,SAAS,MAAM,EAAE,CAAA;CAC7B,CAAA;AAED,MAAM,MAAM,kBAAkB,GAAG;IAC/B,iDAAiD;IACjD,KAAK,C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