cursedbelt 5.59.0 → 5.63.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.
Files changed (75) hide show
  1. package/dist/react/components/ColorSwatches.d.ts +33 -0
  2. package/dist/react/components/ColorSwatches.d.ts.map +1 -0
  3. package/dist/react/components/ColorSwatches.js +42 -0
  4. package/dist/react/components/ColorSwatches.js.map +1 -0
  5. package/dist/react/components/EditorPage.d.ts +1 -0
  6. package/dist/react/components/EditorPage.d.ts.map +1 -1
  7. package/dist/react/components/EditorPage.js +6 -1
  8. package/dist/react/components/EditorPage.js.map +1 -1
  9. package/dist/react/components/FormPreviewLayout.d.ts +1 -0
  10. package/dist/react/components/FormPreviewLayout.d.ts.map +1 -1
  11. package/dist/react/components/FormPreviewLayout.js +2 -1
  12. package/dist/react/components/FormPreviewLayout.js.map +1 -1
  13. package/dist/react/components/PropertyList.d.ts +17 -3
  14. package/dist/react/components/PropertyList.d.ts.map +1 -1
  15. package/dist/react/components/PropertyList.js +11 -3
  16. package/dist/react/components/PropertyList.js.map +1 -1
  17. package/dist/react/components/SwatchPicker.d.ts +37 -9
  18. package/dist/react/components/SwatchPicker.d.ts.map +1 -1
  19. package/dist/react/components/SwatchPicker.js +52 -9
  20. package/dist/react/components/SwatchPicker.js.map +1 -1
  21. package/dist/react/components/TreeView.d.ts +39 -4
  22. package/dist/react/components/TreeView.d.ts.map +1 -1
  23. package/dist/react/components/TreeView.js +54 -15
  24. package/dist/react/components/TreeView.js.map +1 -1
  25. package/dist/react/components/editorPage.css +1 -7
  26. package/dist/react/components/formKit.css +5 -6
  27. package/dist/react/components/scrollRegion.css +31 -0
  28. package/dist/react/index.d.ts +2 -1
  29. package/dist/react/index.d.ts.map +1 -1
  30. package/dist/react/index.js +1 -0
  31. package/dist/react/index.js.map +1 -1
  32. package/dist/react/master-detail/MasterDetail.d.ts.map +1 -1
  33. package/dist/react/master-detail/MasterDetail.js +1 -1
  34. package/dist/react/master-detail/MasterDetail.js.map +1 -1
  35. package/dist/scripts/guardrailsEnforce.d.ts.map +1 -1
  36. package/dist/styles-areas/core.css +6 -6
  37. package/dist/styles-areas/disk-usage.css +7 -7
  38. package/dist/styles-areas/fields.css +24 -22
  39. package/dist/styles-areas/master-detail.css +2 -2
  40. package/dist/styles-areas/nav.css +25 -26
  41. package/dist/styles-areas/workbench.css +2 -2
  42. package/dist/styles-utilities.css +31 -0
  43. package/dist/theme.css +23 -20
  44. package/package.json +24 -5
  45. package/scripts/guardrails-baseline.json +2 -2
  46. package/scripts/guardrailsEnforce.spec.ts +31 -0
  47. package/scripts/guardrailsEnforce.ts +37 -2
  48. package/scripts/styleAreas.ts +1 -0
  49. package/src/react/components/ColorSwatches.spec.tsx +62 -0
  50. package/src/react/components/ColorSwatches.tsx +100 -0
  51. package/src/react/components/EditorPage.spec.tsx +18 -0
  52. package/src/react/components/EditorPage.tsx +12 -2
  53. package/src/react/components/FormPreviewLayout.tsx +2 -1
  54. package/src/react/components/PropertyList.spec.tsx +33 -0
  55. package/src/react/components/PropertyList.tsx +31 -6
  56. package/src/react/components/SwatchPicker.spec.tsx +92 -0
  57. package/src/react/components/SwatchPicker.tsx +119 -33
  58. package/src/react/components/TreeView.spec.tsx +157 -0
  59. package/src/react/components/TreeView.tsx +161 -14
  60. package/src/react/components/editorPage.css +1 -7
  61. package/src/react/components/formKit.css +5 -6
  62. package/src/react/components/formKit.spec.tsx +9 -0
  63. package/src/react/components/scrollRegion.css +31 -0
  64. package/src/react/index.ts +2 -0
  65. package/src/react/master-detail/MasterDetail.spec.tsx +21 -0
  66. package/src/react/master-detail/MasterDetail.tsx +7 -3
  67. package/src/styles-areas/core.css +6 -6
  68. package/src/styles-areas/disk-usage.css +7 -7
  69. package/src/styles-areas/fields.css +24 -22
  70. package/src/styles-areas/master-detail.css +2 -2
  71. package/src/styles-areas/nav.css +25 -26
  72. package/src/styles-areas/workbench.css +2 -2
  73. package/src/styles-utilities.css +31 -0
  74. package/src/theme.css +23 -20
  75. package/src/themeDarkScopeAliases.spec.ts +30 -0
@@ -0,0 +1,33 @@
1
+ export interface ColorSwatchesProps {
2
+ /** The preset dots, in order. Any CSS colour; a 6-digit hex is what the custom well can open on. */
3
+ presets: readonly string[];
4
+ /** The current colour — one of the presets, or any other colour picked through the well. */
5
+ value: string | undefined;
6
+ onChange: (color: string) => void;
7
+ /** Offer a last dot for any colour (the browser's own colour well). Default `true`. */
8
+ custom?: boolean;
9
+ /** The custom dot's accessible name. Default "Any colour". */
10
+ customLabel?: string;
11
+ /** Dot diameter, as `SwatchPicker`'s: `sm` 1.5rem, `md` (default) 1.75rem, `lg` 2.25rem. */
12
+ size?: 'sm' | 'md' | 'lg';
13
+ /** Accessible name for the preset group (default "Colour"). */
14
+ 'aria-label'?: string;
15
+ className?: string;
16
+ }
17
+ /**
18
+ * `ColorSwatches` — an accent picker drawn as ONE row of dots: the presets, then a last dot for
19
+ * any colour. The preset dots are a {@link SwatchPicker} radiogroup (Radix: radio semantics,
20
+ * roving tabindex, arrow keys move the choice); the last dot is the browser's colour well, laid
21
+ * invisibly over a dot painted with the theme's categorical ramp, and becomes that colour —
22
+ * ringed as the current one — once a colour outside the presets is picked.
23
+ *
24
+ * desk drew this twice by hand (its component and list template pages, forge task 2829): a row
25
+ * of raw buttons, one of them with a raw `<input type="color">` behind an opt-out and the other
26
+ * with no custom colour at all. `ColorField` is a full-width hex field; this is the compact
27
+ * "pick an accent for this thing" control, and the next app that wants one takes it from here.
28
+ *
29
+ * Matching is case-insensitive, and what the well reports is lower-case hex, so a stored
30
+ * `#2563EB` still lights its preset.
31
+ */
32
+ export declare function ColorSwatches({ presets, value, onChange, custom, customLabel, size, 'aria-label': ariaLabel, className, }: ColorSwatchesProps): import("react").JSX.Element;
33
+ //# sourceMappingURL=ColorSwatches.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ColorSwatches.d.ts","sourceRoot":"","sources":["../../../src/react/components/ColorSwatches.tsx"],"names":[],"mappings":"AAKA,MAAM,WAAW,kBAAkB;IACjC,oGAAoG;IACpG,OAAO,EAAE,SAAS,MAAM,EAAE,CAAC;IAC3B,4FAA4F;IAC5F,KAAK,EAAE,MAAM,GAAG,SAAS,CAAC;IAC1B,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAClC,uFAAuF;IACvF,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,8DAA8D;IAC9D,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,4FAA4F;IAC5F,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;IAC1B,+DAA+D;IAC/D,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAQD;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,aAAa,CAAC,EAC5B,OAAO,EACP,KAAK,EACL,QAAQ,EACR,MAAa,EACb,WAA0B,EAC1B,IAAW,EACX,YAAY,EAAE,SAAoB,EAClC,SAAS,GACV,EAAE,kBAAkB,+BA+CpB"}
@@ -0,0 +1,42 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { useEffect, useRef } from 'react';
3
+ import { cn } from '../lib/cn.js';
4
+ import { TAP_TARGET_SQUARE } from '../lib/tapTarget.js';
5
+ import { SwatchPicker } from './SwatchPicker.js';
6
+ const SIZE = { sm: 'size-6', md: 'size-7', lg: 'size-9' };
7
+ const HEX6 = /^#[0-9a-f]{6}$/i;
8
+ /** The any-colour dot before a custom colour is picked: the theme's categorical ramp, round the dial. */
9
+ const RAMP = 'conic-gradient(var(--chart-1), var(--chart-2), var(--chart-3), var(--chart-4), var(--chart-5), var(--chart-6), var(--chart-7), var(--chart-8), var(--chart-1))';
10
+ /**
11
+ * `ColorSwatches` — an accent picker drawn as ONE row of dots: the presets, then a last dot for
12
+ * any colour. The preset dots are a {@link SwatchPicker} radiogroup (Radix: radio semantics,
13
+ * roving tabindex, arrow keys move the choice); the last dot is the browser's colour well, laid
14
+ * invisibly over a dot painted with the theme's categorical ramp, and becomes that colour —
15
+ * ringed as the current one — once a colour outside the presets is picked.
16
+ *
17
+ * desk drew this twice by hand (its component and list template pages, forge task 2829): a row
18
+ * of raw buttons, one of them with a raw `<input type="color">` behind an opt-out and the other
19
+ * with no custom colour at all. `ColorField` is a full-width hex field; this is the compact
20
+ * "pick an accent for this thing" control, and the next app that wants one takes it from here.
21
+ *
22
+ * Matching is case-insensitive, and what the well reports is lower-case hex, so a stored
23
+ * `#2563EB` still lights its preset.
24
+ */
25
+ export function ColorSwatches({ presets, value, onChange, custom = true, customLabel = 'Any colour', size = 'md', 'aria-label': ariaLabel = 'Colour', className, }) {
26
+ const current = value?.toLowerCase();
27
+ const isPreset = current !== undefined && presets.some((color) => color.toLowerCase() === current);
28
+ const isCustom = current !== undefined && current !== '' && !isPreset;
29
+ // The well opens on the current colour when it is one it can show. It is uncontrolled and kept
30
+ // in step here, because a controlled colour input needs a hex for "nothing chosen" and there is
31
+ // no honest one to write.
32
+ const wellHex = current !== undefined && HEX6.test(current) ? current : undefined;
33
+ const well = useRef(null);
34
+ useEffect(() => {
35
+ if (well.current && wellHex && well.current.value !== wellHex)
36
+ well.current.value = wellHex;
37
+ }, [wellHex]);
38
+ return (_jsxs("div", { "data-slot": 'color-swatches', className: cn('flex flex-wrap items-center gap-1.5', className), children: [_jsx(SwatchPicker, { "aria-label": ariaLabel, size: size, options: presets.map((color) => ({ value: color.toLowerCase(), color, label: color })), value: isPreset ? current : undefined, onChange: onChange }), custom ? (_jsx("label", { "data-slot": 'color-swatches-custom', "data-state": isCustom ? 'checked' : 'unchecked', style: { '--cb-swatch-fill': isCustom ? value : RAMP }, className: cn('relative inline-flex flex-none cursor-pointer rounded-full [background:var(--cb-swatch-fill,var(--muted))] border border-border/40 transition-transform', SIZE[size], TAP_TARGET_SQUARE, 'hover:scale-110 focus-within:ring-2 focus-within:ring-ring focus-within:ring-offset-1', 'data-[state=checked]:ring-2 data-[state=checked]:ring-foreground data-[state=checked]:ring-offset-1'), children: _jsx("input", {
39
+ // guardrails-ignore no-raw-inputs: task 2829 — the browser's own colour well, laid invisibly over the last dot; a hex field is ColorField's job, not a dot's
40
+ type: 'color', ref: well, "aria-label": customLabel, defaultValue: wellHex, onChange: (event) => onChange(event.target.value.toLowerCase()), className: 'absolute inset-0 m-0 size-full cursor-pointer appearance-none border-0 p-0 opacity-0' }) })) : null] }));
41
+ }
42
+ //# sourceMappingURL=ColorSwatches.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ColorSwatches.js","sourceRoot":"","sources":["../../../src/react/components/ColorSwatches.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAsB,SAAS,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAC9D,OAAO,EAAE,EAAE,EAAE,MAAM,cAAc,CAAC;AAClC,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAmBjD,MAAM,IAAI,GAAG,EAAE,EAAE,EAAE,QAAQ,EAAE,EAAE,EAAE,QAAQ,EAAE,EAAE,EAAE,QAAQ,EAAW,CAAC;AACnE,MAAM,IAAI,GAAG,iBAAiB,CAAC;AAC/B,yGAAyG;AACzG,MAAM,IAAI,GACR,gKAAgK,CAAC;AAEnK;;;;;;;;;;;;;;GAcG;AACH,MAAM,UAAU,aAAa,CAAC,EAC5B,OAAO,EACP,KAAK,EACL,QAAQ,EACR,MAAM,GAAG,IAAI,EACb,WAAW,GAAG,YAAY,EAC1B,IAAI,GAAG,IAAI,EACX,YAAY,EAAE,SAAS,GAAG,QAAQ,EAClC,SAAS,GACU;IACnB,MAAM,OAAO,GAAG,KAAK,EAAE,WAAW,EAAE,CAAC;IACrC,MAAM,QAAQ,GAAG,OAAO,KAAK,SAAS,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,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,EACvE,SAAS,EAAE,EAAE,CACX,yJAAyJ,EACzJ,IAAI,CAAC,IAAI,CAAC,EACV,iBAAiB,EACjB,uFAAuF,EACvF,qGAAqG,CACtG,YAED;oBACE,6JAA6J;oBAC7J,IAAI,EAAC,OAAO,EACZ,GAAG,EAAE,IAAI,gBACG,WAAW,EACvB,YAAY,EAAE,OAAO,EACrB,QAAQ,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,QAAQ,CAAC,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,WAAW,EAAE,CAAC,EAC/D,SAAS,EAAC,sFAAsF,GAChG,GACI,CACT,CAAC,CAAC,CAAC,IAAI,IACJ,CACP,CAAC;AACJ,CAAC"}
@@ -1,6 +1,7 @@
1
1
  import { type ReactNode } from 'react';
2
2
  import './formKit.css';
3
3
  import './editorPage.css';
4
+ import './scrollRegion.css';
4
5
  export interface EditorPageProps {
5
6
  /** What is being made or changed — *"New template"*, *"Edit Dynatrace"*. The page's heading. */
6
7
  title: ReactNode;
@@ -1 +1 @@
1
- {"version":3,"file":"EditorPage.d.ts","sourceRoot":"","sources":["../../../src/react/components/EditorPage.tsx"],"names":[],"mappings":"AACA,OAAO,EAIL,KAAK,SAAS,EAMf,MAAM,OAAO,CAAC;AAIf,OAAO,eAAe,CAAC;AACvB,OAAO,kBAAkB,CAAC;AAE1B,MAAM,WAAW,eAAe;IAC9B,gGAAgG;IAChG,KAAK,EAAE,SAAS,CAAC;IACjB,+EAA+E;IAC/E,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,0FAA0F;IAC1F,MAAM,EAAE,MAAM,IAAI,CAAC;IACnB;;;;OAIG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,wFAAwF;IACxF,OAAO,CAAC,EAAE,SAAS,CAAC;IACpB,kFAAkF;IAClF,QAAQ,EAAE,SAAS,CAAC;IACpB,wFAAwF;IACxF,OAAO,EAAE,SAAS,CAAC;IACnB,mFAAmF;IACnF,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,4FAA4F;IAC5F,YAAY,CAAC,EAAE,SAAS,CAAC;IACzB,6EAA6E;IAC7E,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,oFAAoF;IACpF,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,6EAA6E;IAC7E,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB;;;OAGG;IACH,YAAY,CAAC,EAAE,SAAS,GAAG,QAAQ,CAAC;IACpC,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAgBD;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAgB,UAAU,CAAC,EACzB,KAAK,EACL,SAAkB,EAClB,MAAM,EACN,OAAO,EACP,OAAO,EACP,QAAQ,EACR,OAAO,EACP,YAAwB,EACxB,YAAY,EACZ,YAAkB,EAClB,UAAU,EACV,KAAY,EACZ,YAAwB,EACxB,SAAS,GACV,EAAE,eAAe,+BA2JjB;AAED,MAAM,WAAW,cAAc;IAC7B,QAAQ,EAAE,SAAS,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;;;;;;;GASG;AACH,wBAAgB,SAAS,CAAC,EAAE,QAAQ,EAAE,SAAS,EAAE,EAAE,cAAc,+BAEhE"}
1
+ {"version":3,"file":"EditorPage.d.ts","sourceRoot":"","sources":["../../../src/react/components/EditorPage.tsx"],"names":[],"mappings":"AACA,OAAO,EAIL,KAAK,SAAS,EAMf,MAAM,OAAO,CAAC;AAKf,OAAO,eAAe,CAAC;AACvB,OAAO,kBAAkB,CAAC;AAC1B,OAAO,oBAAoB,CAAC;AAE5B,MAAM,WAAW,eAAe;IAC9B,gGAAgG;IAChG,KAAK,EAAE,SAAS,CAAC;IACjB,+EAA+E;IAC/E,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,0FAA0F;IAC1F,MAAM,EAAE,MAAM,IAAI,CAAC;IACnB;;;;OAIG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,wFAAwF;IACxF,OAAO,CAAC,EAAE,SAAS,CAAC;IACpB,kFAAkF;IAClF,QAAQ,EAAE,SAAS,CAAC;IACpB,wFAAwF;IACxF,OAAO,EAAE,SAAS,CAAC;IACnB,mFAAmF;IACnF,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,4FAA4F;IAC5F,YAAY,CAAC,EAAE,SAAS,CAAC;IACzB,6EAA6E;IAC7E,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,oFAAoF;IACpF,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,6EAA6E;IAC7E,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB;;;OAGG;IACH,YAAY,CAAC,EAAE,SAAS,GAAG,QAAQ,CAAC;IACpC,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAgBD;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAgB,UAAU,CAAC,EACzB,KAAK,EACL,SAAkB,EAClB,MAAM,EACN,OAAO,EACP,OAAO,EACP,QAAQ,EACR,OAAO,EACP,YAAwB,EACxB,YAAY,EACZ,YAAkB,EAClB,UAAU,EACV,KAAY,EACZ,YAAwB,EACxB,SAAS,GACV,EAAE,eAAe,+BAmKjB;AAED,MAAM,WAAW,cAAc;IAC7B,QAAQ,EAAE,SAAS,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;;;;;;;GASG;AACH,wBAAgB,SAAS,CAAC,EAAE,QAAQ,EAAE,SAAS,EAAE,EAAE,cAAc,+BAEhE"}
@@ -1,11 +1,13 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { ArrowLeft } from 'lucide-react';
3
3
  import { useCallback, useEffect, useId, useRef, useState, } from 'react';
4
+ import { useCaretInView } from '../hooks/useCaretInView.js';
4
5
  import { useDiscardGuard } from '../hooks/useDiscardGuard.js';
5
6
  import { cn } from '../lib/cn.js';
6
7
  import { UnstyledButton } from './UnstyledButton.js';
7
8
  import './formKit.css';
8
9
  import './editorPage.css';
10
+ import './scrollRegion.css';
9
11
  /** What answers Escape itself, before the page does. */
10
12
  const OWNS_ESCAPE = '[role="listbox"],[role="menu"],[role="combobox"][aria-expanded="true"],[aria-haspopup]:not([aria-haspopup="false"])[aria-expanded="true"]';
11
13
  const MIN_SPLIT = 0.25;
@@ -48,6 +50,9 @@ export function EditorPage({ title, backLabel = 'Back', onBack, isDirty, actions
48
50
  const titleId = useId();
49
51
  const formId = useId();
50
52
  const previewId = useId();
53
+ // `.cbfk-scroll`'s other half: ScrollArea's explicit scroll-into-view on focus, for a browser
54
+ // that ignores scroll-padding on its own (forge task 2827).
55
+ const onFocusCapture = useCaretInView();
51
56
  const { guardedClose, discardOverlay, isConfirming, cancelDiscard } = useDiscardGuard({ onClose: onBack, isDirty });
52
57
  const commit = useCallback((value) => {
53
58
  const next = clampSplit(value);
@@ -115,7 +120,7 @@ export function EditorPage({ title, backLabel = 'Back', onBack, isDirty, actions
115
120
  else
116
121
  guardedClose();
117
122
  };
118
- return (_jsxs("div", { ref: rootRef, className: cn('cbfk-page', className), "data-presentation": presentation, "data-mode": mode, "data-dragging": dragging ? 'true' : undefined, role: presentation === 'overlay' ? 'dialog' : 'region', "aria-modal": presentation === 'overlay' ? true : undefined, "aria-labelledby": titleId, tabIndex: -1, onKeyDown: onKeyDown, children: [_jsxs("header", { className: 'cbfk-page-head', children: [_jsxs(UnstyledButton, { className: 'cbfk-page-back', onClick: guardedClose, "aria-label": backLabel, tooltip: backLabel, children: [_jsx(ArrowLeft, { "aria-hidden": true }), _jsx("span", { className: 'cbfk-page-crumb', children: backLabel })] }), _jsx("span", { className: 'cbfk-page-sep', "aria-hidden": true, children: "/" }), _jsx("h1", { id: titleId, className: 'cbfk-page-title', children: title }), _jsx("div", { className: 'cbfk-page-modes', role: 'tablist', "aria-label": 'Show', children: ['edit', 'preview'].map((each) => (_jsx(UnstyledButton, { role: 'tab', className: 'cbfk-page-mode', "aria-selected": mode === each, "aria-controls": each === 'edit' ? formId : previewId, onClick: () => setMode(each), children: each === 'edit' ? 'Edit' : previewLabel }, each))) }), actions ? _jsx("div", { className: 'cbfk-page-actions', children: actions }) : null] }), _jsxs("div", { ref: splitRef, className: 'cbfk-page-split', style: { '--cbfk-page-split': `${(split * 100).toFixed(2)}%` }, children: [_jsx("div", { id: formId, className: cn('cbfk-page-form', quiet && 'cbfk-quiet'), children: _jsx("div", { className: 'cbfk-page-form-inner', children: children }) }), _jsx("div", { className: 'cbfk-page-divider', role: 'separator', "aria-orientation": 'vertical', "aria-label": 'Resize the form and the preview', "aria-valuemin": MIN_SPLIT * 100, "aria-valuemax": MAX_SPLIT * 100, "aria-valuenow": Math.round(split * 100), "aria-controls": formId, tabIndex: 0, onPointerDown: onPointerDown, onPointerMove: onPointerMove, onPointerUp: onPointerUp, onPointerCancel: onPointerUp, onKeyDown: onDividerKey, onDoubleClick: () => commit(defaultSplit) }), _jsxs("section", { id: previewId, className: 'cbfk-page-preview', "aria-label": previewLabel, children: [_jsxs("div", { className: 'cbfk-page-preview-head', children: [_jsx("p", { className: 'cbfk-page-preview-label', children: previewLabel }), previewTools ? _jsx("div", { className: 'cbfk-page-preview-tools', children: previewTools }) : null] }), _jsx("div", { className: 'cbfk-page-preview-body', children: preview })] })] }), discardOverlay] }));
123
+ return (_jsxs("div", { ref: rootRef, className: cn('cbfk-page', className), "data-presentation": presentation, "data-mode": mode, "data-dragging": dragging ? 'true' : undefined, role: presentation === 'overlay' ? 'dialog' : 'region', "aria-modal": presentation === 'overlay' ? true : undefined, "aria-labelledby": titleId, tabIndex: -1, onKeyDown: onKeyDown, children: [_jsxs("header", { className: 'cbfk-page-head', children: [_jsxs(UnstyledButton, { className: 'cbfk-page-back', onClick: guardedClose, "aria-label": backLabel, tooltip: backLabel, children: [_jsx(ArrowLeft, { "aria-hidden": true }), _jsx("span", { className: 'cbfk-page-crumb', children: backLabel })] }), _jsx("span", { className: 'cbfk-page-sep', "aria-hidden": true, children: "/" }), _jsx("h1", { id: titleId, className: 'cbfk-page-title', children: title }), _jsx("div", { className: 'cbfk-page-modes', role: 'tablist', "aria-label": 'Show', children: ['edit', 'preview'].map((each) => (_jsx(UnstyledButton, { role: 'tab', className: 'cbfk-page-mode', "aria-selected": mode === each, "aria-controls": each === 'edit' ? formId : previewId, onClick: () => setMode(each), children: each === 'edit' ? 'Edit' : previewLabel }, each))) }), actions ? _jsx("div", { className: 'cbfk-page-actions', children: actions }) : null] }), _jsxs("div", { ref: splitRef, className: 'cbfk-page-split', style: { '--cbfk-page-split': `${(split * 100).toFixed(2)}%` }, children: [_jsx("div", { id: formId, className: cn('cbfk-page-form cbfk-scroll', quiet && 'cbfk-quiet'), onFocusCapture: onFocusCapture, children: _jsx("div", { className: 'cbfk-page-form-inner', children: children }) }), _jsx("div", { className: 'cbfk-page-divider', role: 'separator', "aria-orientation": 'vertical', "aria-label": 'Resize the form and the preview', "aria-valuemin": MIN_SPLIT * 100, "aria-valuemax": MAX_SPLIT * 100, "aria-valuenow": Math.round(split * 100), "aria-controls": formId, tabIndex: 0, onPointerDown: onPointerDown, onPointerMove: onPointerMove, onPointerUp: onPointerUp, onPointerCancel: onPointerUp, onKeyDown: onDividerKey, onDoubleClick: () => commit(defaultSplit) }), _jsxs("section", { id: previewId, className: 'cbfk-page-preview cbfk-scroll', "aria-label": previewLabel, onFocusCapture: onFocusCapture, children: [_jsxs("div", { className: 'cbfk-page-preview-head', children: [_jsx("p", { className: 'cbfk-page-preview-label', children: previewLabel }), previewTools ? _jsx("div", { className: 'cbfk-page-preview-tools', children: previewTools }) : null] }), _jsx("div", { className: 'cbfk-page-preview-body', children: preview })] })] }), discardOverlay] }));
119
124
  }
120
125
  /**
121
126
  * Linear's form, for any form: inputs, textareas and selects drawn with no box until they are
@@ -1 +1 @@
1
- {"version":3,"file":"EditorPage.js","sourceRoot":"","sources":["../../../src/react/components/EditorPage.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,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AACH,MAAM,UAAU,SAAS,CAAC,EAAE,QAAQ,EAAE,SAAS,EAAkB;IAC/D,OAAO,cAAK,SAAS,EAAE,EAAE,CAAC,YAAY,EAAE,SAAS,CAAC,YAAG,QAAQ,GAAO,CAAC;AACvE,CAAC"}
@@ -1,5 +1,6 @@
1
1
  import { type ReactNode } from 'react';
2
2
  import './formKit.css';
3
+ import './scrollRegion.css';
3
4
  export interface FormPreviewLayoutProps {
4
5
  /** The configuration column — names, pickers, the short fields. */
5
6
  children: ReactNode;
@@ -1 +1 @@
1
- {"version":3,"file":"FormPreviewLayout.d.ts","sourceRoot":"","sources":["../../../src/react/components/FormPreviewLayout.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,SAAS,EAAmB,MAAM,OAAO,CAAC;AAExD,OAAO,eAAe,CAAC;AAEvB,MAAM,WAAW,sBAAsB;IACrC,mEAAmE;IACnE,QAAQ,EAAE,SAAS,CAAC;IACpB,uFAAuF;IACvF,OAAO,EAAE,SAAS,CAAC;IACnB;qDACiD;IACjD,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB;;;;OAIG;IACH,cAAc,CAAC,EAAE,SAAS,CAAC;IAC3B,8EAA8E;IAC9E,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B;;;OAGG;IACH,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAgB,iBAAiB,CAAC,EAChC,QAAQ,EACR,OAAO,EACP,YAAwB,EACxB,cAAc,EACd,kBAA0B,EAC1B,KAAK,EACL,SAAS,GACV,EAAE,sBAAsB,+BAkCxB"}
1
+ {"version":3,"file":"FormPreviewLayout.d.ts","sourceRoot":"","sources":["../../../src/react/components/FormPreviewLayout.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,SAAS,EAAmB,MAAM,OAAO,CAAC;AAExD,OAAO,eAAe,CAAC;AACvB,OAAO,oBAAoB,CAAC;AAE5B,MAAM,WAAW,sBAAsB;IACrC,mEAAmE;IACnE,QAAQ,EAAE,SAAS,CAAC;IACpB,uFAAuF;IACvF,OAAO,EAAE,SAAS,CAAC;IACnB;qDACiD;IACjD,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB;;;;OAIG;IACH,cAAc,CAAC,EAAE,SAAS,CAAC;IAC3B,8EAA8E;IAC9E,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B;;;OAGG;IACH,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAgB,iBAAiB,CAAC,EAChC,QAAQ,EACR,OAAO,EACP,YAAwB,EACxB,cAAc,EACd,kBAA0B,EAC1B,KAAK,EACL,SAAS,GACV,EAAE,sBAAsB,+BAkCxB"}
@@ -3,6 +3,7 @@ import { ChevronDown } from 'lucide-react';
3
3
  import { useId, useState } from 'react';
4
4
  import { cn } from '../lib/cn.js';
5
5
  import './formKit.css';
6
+ import './scrollRegion.css';
6
7
  /**
7
8
  * DESIGN.md §6's creation layout — form beside its live preview — as a layout that can go
8
9
  * anywhere, not only inside `Modal`'s `aside`.
@@ -31,6 +32,6 @@ export function FormPreviewLayout({ children, preview, previewLabel = 'Preview',
31
32
  return (_jsx("div", { className: cn('cbfk-split', className), "data-preview-open": open ? 'true' : 'false', children: _jsxs("div", { className: 'cbfk-split-grid', children: [_jsx("div", { className: 'cbfk-split-form', children: children }), _jsxs("section", { className: 'cbfk-split-preview', "aria-label": previewLabel, children: [_jsxs("button", {
32
33
  // guardrails-ignore no-raw-action-button: the narrow preview's fold — presentational
33
34
  // show/hide, no data-mutating intent; it must draw without Tailwind.
34
- type: 'button', className: 'font-[inherit] cbfk-split-bar', "aria-expanded": open, "aria-controls": bodyId, onClick: () => setOpen(!open), children: [_jsx("span", { className: 'cbfk-split-bar-label', children: previewLabel }), _jsx("span", { className: 'cbfk-split-bar-summary', children: previewSummary }), _jsx(ChevronDown, { "aria-hidden": true })] }), _jsx("p", { className: 'cbfk-split-head', children: previewLabel }), _jsx("div", { id: bodyId, className: 'cbfk-split-body', children: preview })] }), below ? _jsx("div", { className: 'cbfk-split-below', children: below }) : null] }) }));
35
+ type: 'button', className: 'font-[inherit] cbfk-split-bar', "aria-expanded": open, "aria-controls": bodyId, onClick: () => setOpen(!open), children: [_jsx("span", { className: 'cbfk-split-bar-label', children: previewLabel }), _jsx("span", { className: 'cbfk-split-bar-summary', children: previewSummary }), _jsx(ChevronDown, { "aria-hidden": true })] }), _jsx("p", { className: 'cbfk-split-head', children: previewLabel }), _jsx("div", { id: bodyId, className: 'cbfk-split-body cbfk-scroll', children: preview })] }), below ? _jsx("div", { className: 'cbfk-split-below', children: below }) : null] }) }));
35
36
  }
36
37
  //# sourceMappingURL=FormPreviewLayout.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"FormPreviewLayout.js","sourceRoot":"","sources":["../../../src/react/components/FormPreviewLayout.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAC3C,OAAO,EAAkB,KAAK,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACxD,OAAO,EAAE,EAAE,EAAE,MAAM,cAAc,CAAC;AAClC,OAAO,eAAe,CAAC;AA0BvB;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,MAAM,UAAU,iBAAiB,CAAC,EAChC,QAAQ,EACR,OAAO,EACP,YAAY,GAAG,SAAS,EACxB,cAAc,EACd,kBAAkB,GAAG,KAAK,EAC1B,KAAK,EACL,SAAS,GACc;IACvB,MAAM,CAAC,IAAI,EAAE,OAAO,CAAC,GAAG,QAAQ,CAAC,kBAAkB,CAAC,CAAC;IACrD,MAAM,MAAM,GAAG,KAAK,EAAE,CAAC;IAEvB,OAAO,CACL,cAAK,SAAS,EAAE,EAAE,CAAC,YAAY,EAAE,SAAS,CAAC,uBA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AC1B,KAAK,EACL,SAAS,GACc;IACvB,MAAM,CAAC,IAAI,EAAE,OAAO,CAAC,GAAG,QAAQ,CAAC,kBAAkB,CAAC,CAAC;IACrD,MAAM,MAAM,GAAG,KAAK,EAAE,CAAC;IAEvB,OAAO,CACL,cAAK,SAAS,EAAE,EAAE,CAAC,YAAY,EAAE,SAAS,CAAC,uBAAqB,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,OAAO,YACrF,eAAK,SAAS,EAAC,iBAAiB,aAC9B,cAAK,SAAS,EAAC,iBAAiB,YAAE,QAAQ,GAAO,EACjD,mBAAS,SAAS,EAAC,oBAAoB,gBAAa,YAAY,aAC9D;4BACE,qFAAqF;4BACrF,qEAAqE;4BACrE,IAAI,EAAC,QAAQ,EACb,SAAS,EAAC,+BAA+B,mBAC1B,IAAI,mBACJ,MAAM,EACrB,OAAO,EAAE,GAAG,EAAE,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,aAE7B,eAAM,SAAS,EAAC,sBAAsB,YAAE,YAAY,GAAQ,EAC5D,eAAM,SAAS,EAAC,wBAAwB,YAAE,cAAc,GAAQ,EAChE,KAAC,WAAW,0BAAe,IACpB,EACT,YAAG,SAAS,EAAC,iBAAiB,YAAE,YAAY,GAAK,EACjD,cAAK,EAAE,EAAE,MAAM,EAAE,SAAS,EAAC,6BAA6B,YACrD,OAAO,GACJ,IACE,EAIT,KAAK,CAAC,CAAC,CAAC,cAAK,SAAS,EAAC,kBAAkB,YAAE,KAAK,GAAO,CAAC,CAAC,CAAC,IAAI,IAC3D,GACF,CACP,CAAC;AACJ,CAAC"}
@@ -27,7 +27,7 @@ export interface PropertyListProps extends HTMLAttributes<HTMLDListElement> {
27
27
  children: ReactNode;
28
28
  }
29
29
  export declare function PropertyList({ density, className, children, ...props }: PropertyListProps): import("react").JSX.Element;
30
- export interface PropertyProps {
30
+ export interface PropertyProps extends Omit<HTMLAttributes<HTMLDivElement>, "children"> {
31
31
  /** What the fact is. Plain words, sentence case (CPY-9). */
32
32
  label: ReactNode;
33
33
  /** A 16px mark before the value — Linear's status ring, a person, a calendar. */
@@ -38,8 +38,22 @@ export interface PropertyProps {
38
38
  mono?: boolean;
39
39
  /** Trailing controls that belong to this fact — a copy button, a reset (FRM-6). */
40
40
  action?: ReactNode;
41
+ /**
42
+ * The value takes the list's whole width, under its label — a code block, an image, a
43
+ * paragraph that a value column would squeeze to a word per line. The label stays in the
44
+ * same muted voice, so a stacked fact still reads as one of the list's.
45
+ */
46
+ stacked?: boolean;
41
47
  children: ReactNode;
42
48
  }
43
- /** One fact. Renders nothing when its value is absent, so a caller never filters by hand. */
44
- export declare function Property({ label, icon, empty, mono, action, children }: PropertyProps): import("react").JSX.Element | null;
49
+ /**
50
+ * One fact. Renders nothing when its value is absent, so a caller never filters by hand.
51
+ *
52
+ * The row is a `display: contents` wrapper, so the label and value sit on the LIST's shared
53
+ * tracks. Anything else given to it — a `className`, a `data-type`, a `data-tone` — lands on that
54
+ * wrapper, which is what lets an app hang its own customising (a highlighted override, a row a
55
+ * test finds by type, tools shown on `:hover`) off the row without hand-rolling one (desk, task
56
+ * 2823: ten `<dl>`s whose rows each carried exactly that).
57
+ */
58
+ export declare function Property({ label, icon, empty, mono, action, stacked, className, children, ...row }: PropertyProps): import("react").JSX.Element | null;
45
59
  //# sourceMappingURL=PropertyList.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"PropertyList.d.ts","sourceRoot":"","sources":["../../../src/react/components/PropertyList.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AACH,OAAO,KAAK,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAGvD,MAAM,WAAW,iBAAkB,SAAQ,cAAc,CAAC,gBAAgB,CAAC;IAC1E;;;OAGG;IACH,OAAO,CAAC,EAAE,aAAa,GAAG,SAAS,CAAC;IACpC,QAAQ,EAAE,SAAS,CAAC;CACpB;AAED,wBAAgB,YAAY,CAAC,EAAE,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IAClF,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,mFAAmF;IACnF,MAAM,CAAC,EAAE,SAAS,CAAC;IACnB;;;;OAIG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,QAAQ,EAAE,SAAS,CAAC;CACpB;AAED;;;;;;;;GAQG;AACH,wBAAgB,QAAQ,CAAC,EAAE,KAAK,EAAE,IAAI,EAAE,KAAa,EAAE,IAAY,EAAE,MAAM,EAAE,OAAe,EAAE,SAAS,EAAE,QAAQ,EAAE,GAAG,GAAG,EAAE,EAAE,aAAa,sCAwCzI"}
@@ -3,10 +3,18 @@ import { cn } from "../lib/cn.js";
3
3
  export function PropertyList({ density = "comfortable", className, children, ...props }) {
4
4
  return (_jsx("dl", { "data-density": density, className: cn("group/properties m-0 grid grid-cols-[minmax(0,var(--property-label-w))_minmax(0,1fr)] gap-x-4", density === "compact" ? "gap-y-1 text-xs" : "gap-y-0 text-sm", className), ...props, children: children }));
5
5
  }
6
- /** One fact. Renders nothing when its value is absent, so a caller never filters by hand. */
7
- export function Property({ label, icon, empty = false, mono = false, action, children }) {
6
+ /**
7
+ * One fact. Renders nothing when its value is absent, so a caller never filters by hand.
8
+ *
9
+ * The row is a `display: contents` wrapper, so the label and value sit on the LIST's shared
10
+ * tracks. Anything else given to it — a `className`, a `data-type`, a `data-tone` — lands on that
11
+ * wrapper, which is what lets an app hang its own customising (a highlighted override, a row a
12
+ * test finds by type, tools shown on `:hover`) off the row without hand-rolling one (desk, task
13
+ * 2823: ten `<dl>`s whose rows each carried exactly that).
14
+ */
15
+ export function Property({ label, icon, empty = false, mono = false, action, stacked = false, className, children, ...row }) {
8
16
  if (children === undefined || children === null || children === "" || children === false)
9
17
  return null;
10
- return (_jsxs("div", { className: "contents", children: [_jsx("dt", { className: "m-0 flex min-h-[var(--control-h-sm)] min-w-0 items-center font-normal text-[var(--muted-foreground)] group-data-[density=compact]/properties:min-h-6 group-data-[density=compact]/properties:items-start", children: _jsx("span", { className: "truncate", children: label }) }), _jsxs("dd", { className: "m-0 flex min-h-[var(--control-h-sm)] min-w-0 items-center gap-2 group-data-[density=compact]/properties:min-h-6 group-data-[density=compact]/properties:items-start", children: [icon ? (_jsx("span", { "aria-hidden": "true", className: "flex size-4 flex-none items-center justify-center text-[var(--muted-foreground)]", children: icon })) : null, _jsx("span", { "data-slot": "property-value", className: cn("min-w-0", mono ? "break-all font-mono" : "break-words", empty ? "text-[var(--muted-foreground)]" : "text-[var(--foreground)]"), children: children }), action ? _jsx("span", { className: "flex flex-none items-center gap-1", children: action }) : null] })] }));
18
+ return (_jsxs("div", { ...row, "data-stacked": stacked ? "true" : undefined, className: cn("contents", className), children: [_jsx("dt", { className: cn("m-0 flex min-h-[var(--control-h-sm)] min-w-0 items-center font-normal text-[var(--muted-foreground)] group-data-[density=compact]/properties:min-h-6 group-data-[density=compact]/properties:items-start", stacked && "col-span-full"), children: _jsx("span", { className: "truncate", children: label }) }), _jsxs("dd", { className: cn("m-0 flex min-h-[var(--control-h-sm)] min-w-0 items-center gap-2 group-data-[density=compact]/properties:min-h-6 group-data-[density=compact]/properties:items-start", stacked && "col-span-full items-start pb-2"), children: [icon ? (_jsx("span", { "aria-hidden": "true", className: "flex size-4 flex-none items-center justify-center text-[var(--muted-foreground)]", children: icon })) : null, _jsx("span", { "data-slot": "property-value", className: cn("min-w-0", stacked && "w-full", mono ? "break-all font-mono" : "break-words", empty ? "text-[var(--muted-foreground)]" : "text-[var(--foreground)]"), children: children }), action ? _jsx("span", { className: "flex flex-none items-center gap-1", children: action }) : null] })] }));
11
19
  }
12
20
  //# sourceMappingURL=PropertyList.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"PropertyList.js","sourceRoot":"","sources":["../../../src/react/components/PropertyList.tsx"],"names":[],"mappings":";AAoBA,OAAO,EAAE,EAAE,EAAE,MAAM,cAAc,CAAC;AAWlC,MAAM,UAAU,YAAY,CAAC,EAAE,OAAO,GAAG,aAAa,EAAE,SAAS,EAAE,QAAQ,EAAE,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ACT,OAAO,IAAI,QAAQ,EACnB,IAAI,CAAC,CAAC,CAAC,qBAAqB,CAAC,CAAC,CAAC,aAAa,EAC5C,KAAK,CAAC,CAAC,CAAC,gCAAgC,CAAC,CAAC,CAAC,0BAA0B,CACrE,YAEA,QAAQ,GACH,EACN,MAAM,CAAC,CAAC,CAAC,eAAM,SAAS,EAAC,mCAAmC,YAAE,MAAM,GAAQ,CAAC,CAAC,CAAC,IAAI,IAChF,IACA,CACN,CAAC;AACH,CAAC"}
@@ -1,31 +1,59 @@
1
- export interface SwatchOption<T extends string = string> {
1
+ interface SwatchOptionBase<T extends string> {
2
2
  /** Stable value reported by `onChange` (an id, an index-as-string, a hex…). */
3
3
  value: T;
4
- /** Any CSS color — hex, `var(--chart-1)`, `oklch(…)`. Fills the swatch. */
5
- color: string;
6
- /** Accessible name; defaults to the value. */
4
+ /** Accessible name, and the tooltip; defaults to the value. */
7
5
  label?: string;
8
6
  disabled?: boolean;
9
7
  }
8
+ /** One swatch: a colour — or, with `none`, the "no colour" choice, drawn as the ground struck through. */
9
+ export type SwatchOption<T extends string = string> = SwatchOptionBase<T> & ({
10
+ /** Any CSS color — hex, `var(--chart-1)`, `oklch(…)`. Fills the swatch. */
11
+ color: string;
12
+ none?: undefined;
13
+ } | {
14
+ /** The "no colour" swatch (a fill cleared, an accent removed): the card ground with a slash. */
15
+ none: true;
16
+ color?: undefined;
17
+ });
10
18
  export interface SwatchPickerProps<T extends string = string> {
11
19
  options: SwatchOption<T>[];
12
20
  value: T | undefined;
13
21
  onChange: (value: T) => void;
14
22
  /** Swatch diameter: `sm` 1.5rem, `md` (default) 1.75rem, `lg` 2.25rem. */
15
23
  size?: 'sm' | 'md' | 'lg';
24
+ /** `dot` (default) is round; `tile` is a rounded square — a palette's chip (Excel's colour grid). */
25
+ shape?: 'dot' | 'tile';
26
+ /** Lay the swatches out as a grid this many across (a 2-D palette) instead of one wrapping row. */
27
+ columns?: number;
28
+ /**
29
+ * `automatic` (default): the arrow keys move the choice, as a radio group's do — right for a
30
+ * value being SET (an accent, a series colour). `manual`: the arrows only move focus, and
31
+ * Enter, Space or a click picks — including the swatch already checked, which reports again.
32
+ * Right for a palette that APPLIES a colour (a format menu, a selection's toolbar), where every
33
+ * arrow press would otherwise be an edit and the first one would close the menu. The words are
34
+ * Radix Tabs' `activationMode`.
35
+ */
36
+ activationMode?: 'automatic' | 'manual';
16
37
  /** Accessible name for the group (default "Color"). */
17
38
  'aria-label'?: string;
18
39
  className?: string;
19
40
  }
20
41
  /**
21
42
  * A discrete color-swatch radio group — pick ONE color from a fixed palette
22
- * (chart series colors, namespace hues, label tints). Radix `RadioGroup`
23
- * supplies the radiogroup ARIA pattern, roving tabindex, and arrow-key
24
- * navigation; the check glyph marks the selection.
43
+ * (chart series colors, namespace hues, label tints, a format menu's grid). Radix
44
+ * `RadioGroup` supplies the radiogroup ARIA pattern, roving tabindex, and arrow-key
45
+ * navigation; the check glyph and a ring mark the selection, and each swatch names
46
+ * itself in the belt's `Tooltip` — on focus as well as hover, which a native `title`
47
+ * never does (DESIGN.md §4, `no-raw-title-attr`).
25
48
  *
26
49
  * This is the shared primitive for every "row of color dots" UI. For the nav
27
50
  * accent picker (presets + custom hex + reset) see `ColorSwatchGrid`, which
28
- * composes this with a native color input.
51
+ * composes this with a native color input; for an accent row with an any-colour
52
+ * well, `ColorSwatches`.
53
+ *
54
+ * The checked ring keys off `aria-checked`, not Radix's `data-state`: the tooltip's
55
+ * own trigger writes `data-state` (open/closed) onto the same element.
29
56
  */
30
- export declare function SwatchPicker<T extends string = string>({ options, value, onChange, size, 'aria-label': ariaLabel, className, }: SwatchPickerProps<T>): import("react").JSX.Element;
57
+ export declare function SwatchPicker<T extends string = string>({ options, value, onChange, size, shape, columns, activationMode, 'aria-label': ariaLabel, className, }: SwatchPickerProps<T>): import("react").JSX.Element;
58
+ export {};
31
59
  //# sourceMappingURL=SwatchPicker.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"SwatchPicker.d.ts","sourceRoot":"","sources":["../../../src/react/components/SwatchPicker.tsx"],"names":[],"mappings":"AAKA,MAAM,WAAW,YAAY,CAAC,CAAC,SAAS,MAAM,GAAG,MAAM;IACrD,+EAA+E;IAC/E,KAAK,EAAE,CAAC,CAAC;IACT,2EAA2E;IAC3E,KAAK,EAAE,MAAM,CAAC;IACd,8CAA8C;IAC9C,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,MAAM,WAAW,iBAAiB,CAAC,CAAC,SAAS,MAAM,GAAG,MAAM;IAC1D,OAAO,EAAE,YAAY,CAAC,CAAC,CAAC,EAAE,CAAC;IAC3B,KAAK,EAAE,CAAC,GAAG,SAAS,CAAC;IACrB,QAAQ,EAAE,CAAC,KAAK,EAAE,CAAC,KAAK,IAAI,CAAC;IAC7B,0EAA0E;IAC1E,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;IAC1B,uDAAuD;IACvD,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAID;;;;;;;;;GASG;AACH,wBAAgB,YAAY,CAAC,CAAC,SAAS,MAAM,GAAG,MAAM,EAAE,EACtD,OAAO,EACP,KAAK,EACL,QAAQ,EACR,IAAW,EACX,YAAY,EAAE,SAAmB,EACjC,SAAS,GACV,EAAE,iBAAiB,CAAC,CAAC,CAAC,+BAkCtB"}
1
+ {"version":3,"file":"SwatchPicker.d.ts","sourceRoot":"","sources":["../../../src/react/components/SwatchPicker.tsx"],"names":[],"mappings":"AAOA,UAAU,gBAAgB,CAAC,CAAC,SAAS,MAAM;IACzC,+EAA+E;IAC/E,KAAK,EAAE,CAAC,CAAC;IACT,+DAA+D;IAC/D,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,0GAA0G;AAC1G,MAAM,MAAM,YAAY,CAAC,CAAC,SAAS,MAAM,GAAG,MAAM,IAAI,gBAAgB,CAAC,CAAC,CAAC,GACvE,CACI;IACE,2EAA2E;IAC3E,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,SAAS,CAAC;CAClB,GACD;IACE,gGAAgG;IAChG,IAAI,EAAE,IAAI,CAAC;IACX,KAAK,CAAC,EAAE,SAAS,CAAC;CACnB,CACJ,CAAC;AAEJ,MAAM,WAAW,iBAAiB,CAAC,CAAC,SAAS,MAAM,GAAG,MAAM;IAC1D,OAAO,EAAE,YAAY,CAAC,CAAC,CAAC,EAAE,CAAC;IAC3B,KAAK,EAAE,CAAC,GAAG,SAAS,CAAC;IACrB,QAAQ,EAAE,CAAC,KAAK,EAAE,CAAC,KAAK,IAAI,CAAC;IAC7B,0EAA0E;IAC1E,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;IAC1B,qGAAqG;IACrG,KAAK,CAAC,EAAE,KAAK,GAAG,MAAM,CAAC;IACvB,mGAAmG;IACnG,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB;;;;;;;OAOG;IACH,cAAc,CAAC,EAAE,WAAW,GAAG,QAAQ,CAAC;IACxC,uDAAuD;IACvD,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAQD;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,YAAY,CAAC,CAAC,SAAS,MAAM,GAAG,MAAM,EAAE,EACtD,OAAO,EACP,KAAK,EACL,QAAQ,EACR,IAAW,EACX,KAAa,EACb,OAAO,EACP,cAA4B,EAC5B,YAAY,EAAE,SAAmB,EACjC,SAAS,GACV,EAAE,iBAAiB,CAAC,CAAC,CAAC,+BA+EtB"}
@@ -1,23 +1,66 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import * as RadioGroup from '@radix-ui/react-radio-group';
3
3
  import { Check } from 'lucide-react';
4
+ import { useRef } from 'react';
4
5
  import { cn } from '../lib/cn.js';
5
6
  import { TAP_TARGET_SQUARE } from '../lib/tapTarget.js';
7
+ import { Tooltip } from './Tooltip.js';
6
8
  const SIZE = { sm: 'size-6', md: 'size-7', lg: 'size-9' };
9
+ const SHAPE = { dot: 'rounded-full', tile: 'rounded-sm' };
10
+ /** "No colour": the card ground, struck through corner to corner in the destructive hue. */
11
+ const NONE_FILL = 'linear-gradient(135deg, transparent calc(50% - 1px), var(--destructive) calc(50% - 1px) calc(50% + 1px), transparent calc(50% + 1px)), var(--card)';
7
12
  /**
8
13
  * A discrete color-swatch radio group — pick ONE color from a fixed palette
9
- * (chart series colors, namespace hues, label tints). Radix `RadioGroup`
10
- * supplies the radiogroup ARIA pattern, roving tabindex, and arrow-key
11
- * navigation; the check glyph marks the selection.
14
+ * (chart series colors, namespace hues, label tints, a format menu's grid). Radix
15
+ * `RadioGroup` supplies the radiogroup ARIA pattern, roving tabindex, and arrow-key
16
+ * navigation; the check glyph and a ring mark the selection, and each swatch names
17
+ * itself in the belt's `Tooltip` — on focus as well as hover, which a native `title`
18
+ * never does (DESIGN.md §4, `no-raw-title-attr`).
12
19
  *
13
20
  * This is the shared primitive for every "row of color dots" UI. For the nav
14
21
  * accent picker (presets + custom hex + reset) see `ColorSwatchGrid`, which
15
- * composes this with a native color input.
22
+ * composes this with a native color input; for an accent row with an any-colour
23
+ * well, `ColorSwatches`.
24
+ *
25
+ * The checked ring keys off `aria-checked`, not Radix's `data-state`: the tooltip's
26
+ * own trigger writes `data-state` (open/closed) onto the same element.
16
27
  */
17
- export function SwatchPicker({ options, value, onChange, size = 'md', 'aria-label': ariaLabel = 'Color', className, }) {
18
- return (_jsx(RadioGroup.Root, { "aria-label": ariaLabel, value: value ?? '', onValueChange: (v) => onChange(v), className: cn('flex flex-wrap items-center gap-1.5', className), children: options.map((opt) => (_jsx(RadioGroup.Item, { value: opt.value, disabled: opt.disabled, "aria-label": opt.label ?? opt.value, title: opt.label ?? opt.value, style: { backgroundColor: opt.color }, className: cn('inline-flex items-center justify-center rounded-full border border-border/40 transition-transform', SIZE[size],
19
- // A finger needs 44px (DESIGN.md §5): the swatch itself grows on a coarse pointer, since
20
- // the colour IS the button. A 28px one failed e2e/touch-targets (forge task 2514).
21
- TAP_TARGET_SQUARE, 'hover:scale-110 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-1', 'data-[state=checked]:ring-2 data-[state=checked]:ring-foreground data-[state=checked]:ring-offset-1', 'disabled:cursor-not-allowed disabled:opacity-40 disabled:hover:scale-100'), children: _jsx(RadioGroup.Indicator, { asChild: true, children: _jsx(Check, { className: 'size-3.5 text-white mix-blend-difference', "aria-hidden": true }) }) }, opt.value))) }));
28
+ export function SwatchPicker({ options, value, onChange, size = 'md', shape = 'dot', columns, activationMode = 'automatic', 'aria-label': ariaLabel = 'Color', className, }) {
29
+ const manual = activationMode === 'manual';
30
+ // Radix checks the radio an arrow key lands on by calling `click()` from inside its focus
31
+ // handler. In manual mode that one click is vetoed: our `onFocus` runs first and raises this
32
+ // flag until the focus event's dispatch is over, and `onClick` refuses Radix's check while it
33
+ // is up. (Preventing the FOCUS would skip it too, but the tooltip reads that as "do not open",
34
+ // and the arrow keys are exactly when a swatch's name is wanted.)
35
+ const focusing = useRef(false);
36
+ const grid = columns ? { gridTemplateColumns: `repeat(${columns}, max-content)` } : undefined;
37
+ return (_jsx(RadioGroup.Root, { "aria-label": ariaLabel, value: value ?? '', onValueChange: (v) => onChange(v), "data-slot": 'swatch-picker', style: grid, className: cn(columns ? 'grid' : 'flex flex-wrap', 'items-center gap-1.5', className), children: options.map((opt) => {
38
+ const name = opt.label ?? opt.value;
39
+ return (_jsx(Tooltip, { content: name, children: _jsx(RadioGroup.Item, { value: opt.value, disabled: opt.disabled, "aria-label": name, "data-swatch": opt.none ? 'none' : opt.value, style: { background: opt.none ? NONE_FILL : opt.color }, onFocus: manual
40
+ ? () => {
41
+ focusing.current = true;
42
+ queueMicrotask(() => {
43
+ focusing.current = false;
44
+ });
45
+ }
46
+ : undefined, onClick: manual
47
+ ? (event) => {
48
+ if (focusing.current)
49
+ event.preventDefault();
50
+ else if (opt.value === value)
51
+ onChange(opt.value);
52
+ }
53
+ : undefined, onKeyDown: manual
54
+ ? (event) => {
55
+ if (event.key !== 'Enter')
56
+ return;
57
+ event.preventDefault();
58
+ onChange(opt.value);
59
+ }
60
+ : undefined, className: cn('inline-flex items-center justify-center border border-border/40 transition-transform', SIZE[size], SHAPE[shape],
61
+ // A finger needs 44px (DESIGN.md §5): the swatch itself grows on a coarse pointer, since
62
+ // the colour IS the button. A 28px one failed e2e/touch-targets (forge task 2514).
63
+ TAP_TARGET_SQUARE, 'hover:scale-110 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-1', 'aria-checked:ring-2 aria-checked:ring-foreground aria-checked:ring-offset-1', 'disabled:cursor-not-allowed disabled:opacity-40 disabled:hover:scale-100'), children: opt.none ? null : (_jsx(RadioGroup.Indicator, { asChild: true, children: _jsx(Check, { className: 'size-3.5 text-white mix-blend-difference', "aria-hidden": true }) })) }) }, opt.value));
64
+ }) }));
22
65
  }
23
66
  //# sourceMappingURL=SwatchPicker.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"SwatchPicker.js","sourceRoot":"","sources":["../../../src/react/components/SwatchPicker.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,UAAU,MAAM,6BAA6B,CAAC;AAC1D,OAAO,EAAE,KAAK,EAAE,MAAM,cAAc,CAAC;AACrC,OAAO,EAAE,EAAE,EAAE,MAAM,cAAc,CAAC;AAClC,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAuBxD,MAAM,IAAI,GAAG,EAAE,EAAE,EAAE,QAAQ,EAAE,EAAE,EAAE,QAAQ,EAAE,EAAE,EAAE,QAAQ,EAAW,CAAC;AAEnE;;;;;;;;;GASG;AACH,MAAM,UAAU,YAAY,CAA4B,EACtD,OAAO,EACP,KAAK,EACL,QAAQ,EACR,IAAI,GA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f,SAAS,EAAE,EAAE,CACX,sFAAsF,EACtF,IAAI,CAAC,IAAI,CAAC,EACV,KAAK,CAAC,KAAK,CAAC;oBACZ,yFAAyF;oBACzF,mFAAmF;oBACnF,iBAAiB,EACjB,qHAAqH,EACrH,6EAA6E,EAC7E,0EAA0E,CAC3E,YAGA,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CACjB,KAAC,UAAU,CAAC,SAAS,IAAC,OAAO,kBAC3B,KAAC,KAAK,IAAC,SAAS,EAAC,0CAA0C,wBAAe,GACrD,CACxB,GACe,IApDN,GAAG,CAAC,KAAK,CAqDb,CACX,CAAC;QACJ,CAAC,CAAC,GACc,CACnB,CAAC;AACJ,CAAC"}
@@ -1,4 +1,4 @@
1
- import { type ReactNode } from 'react';
1
+ import { type HTMLAttributes, type ReactNode } from 'react';
2
2
  export interface TreeNode {
3
3
  id: string;
4
4
  /** Displayed label content. */
@@ -10,10 +10,38 @@ export interface TreeNode {
10
10
  /** True when children exist but haven't been fetched yet (triggers `onLoadChildren`). */
11
11
  hasChildren?: boolean;
12
12
  disabled?: boolean;
13
+ /**
14
+ * Trailing content after the label: a count, a status dot, a word or two of kind. Drawn muted
15
+ * and never truncated, so it says the same thing at any width; the label gives way first.
16
+ */
17
+ meta?: ReactNode;
18
+ /** A second, muted line under the label: why a search kept this row, a path, a summary. */
19
+ description?: ReactNode;
20
+ /**
21
+ * Attributes for the visible ROW — not the treeitem, which also wraps the node's children, so
22
+ * a hook on it would match every ancestor of the row you meant. A `data-*` an app's test or
23
+ * stylesheet keys on, a className.
24
+ */
25
+ rowProps?: HTMLAttributes<HTMLDivElement> & {
26
+ [key: `data-${string}`]: string | undefined;
27
+ };
28
+ }
29
+ /** A run of root nodes under a heading ("Lists", "Components"). Arrow keys pass over the heading. */
30
+ export interface TreeSection {
31
+ id: string;
32
+ /** The heading. Omitted, the section draws no heading (a single section, or the first). */
33
+ label?: ReactNode;
34
+ nodes: TreeNode[];
13
35
  }
14
36
  export type TreeSelectionMode = 'none' | 'single' | 'multi';
15
37
  export interface TreeViewProps {
16
- nodes: TreeNode[];
38
+ /** The root nodes. Give `sections` instead to draw the roots in headed groups. */
39
+ nodes?: TreeNode[];
40
+ /**
41
+ * The roots in headed groups. One tree, one tab stop and one keyboard path across all of them
42
+ * — the arrows step from the last row of one section to the first of the next.
43
+ */
44
+ sections?: TreeSection[];
17
45
  /** Selection behavior (default `'single'`). */
18
46
  selectionMode?: TreeSelectionMode;
19
47
  /** Controlled selected ids. */
@@ -26,16 +54,23 @@ export interface TreeViewProps {
26
54
  onExpandedChange?: (ids: string[]) => void;
27
55
  /** Called to lazily load children for a node (they are cached after the first load). */
28
56
  onLoadChildren?: (id: string) => Promise<TreeNode[]>;
57
+ /**
58
+ * Open a node — a double-click, or Enter (which selects it first). Separate from selection:
59
+ * selecting shows a thing, opening acts on it (an editor, a document), as Finder and VS Code's
60
+ * explorer split the two. Space only selects.
61
+ */
62
+ onOpen?: (id: string) => void;
29
63
  /** Enable drag-to-reorder within each level (default `false`). */
30
64
  draggable?: boolean;
31
65
  /**
32
66
  * Called when nodes at a level are reordered.
33
- * `parentId` is the parent node's id, or `null` for the root level.
67
+ * `parentId` is the parent node's id, or `null` for the root level — with `sections`, the
68
+ * section's id, since a row is dragged only within its own section.
34
69
  */
35
70
  onReorder?: (parentId: string | null, nodes: TreeNode[]) => void;
36
71
  className?: string;
37
72
  'aria-label'?: string;
38
73
  'aria-labelledby'?: string;
39
74
  }
40
- export declare function TreeView({ nodes, selectionMode, selected: controlledSelected, defaultSelected, onSelectionChange, expanded: controlledExpanded, defaultExpanded, onExpandedChange, onLoadChildren, draggable, onReorder, className, 'aria-label': ariaLabel, 'aria-labelledby': ariaLabelledBy, }: TreeViewProps): import("react").JSX.Element;
75
+ export declare function TreeView({ nodes: rootNodes, sections, selectionMode, selected: controlledSelected, defaultSelected, onSelectionChange, expanded: controlledExpanded, defaultExpanded, onExpandedChange, onLoadChildren, onOpen, draggable, onReorder, className, 'aria-label': ariaLabel, 'aria-labelledby': ariaLabelledBy, }: TreeViewProps): import("react").JSX.Element;
41
76
  //# sourceMappingURL=TreeView.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"TreeView.d.ts","sourceRoot":"","sources":["../../../src/react/components/TreeView.tsx"],"names":[],"mappings":"AACA,OAAO,EAGL,KAAK,SAAS,EAOf,MAAM,OAAO,CAAC;AASf,MAAM,WAAW,QAAQ;IACvB,EAAE,EAAE,MAAM,CAAC;IACX,+BAA+B;IAC/B,KAAK,EAAE,SAAS,CAAC;IACjB,6BAA6B;IAC7B,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,2DAA2D;IAC3D,QAAQ,CAAC,EAAE,QAAQ,EAAE,CAAC;IACtB,yFAAyF;IACzF,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,MAAM,MAAM,iBAAiB,GAAG,MAAM,GAAG,QAAQ,GAAG,OAAO,CAAC;AAE5D,MAAM,WAAW,aAAa;IAC5B,KAAK,EAAE,QAAQ,EAAE,CAAC;IAClB,+CAA+C;IAC/C,aAAa,CAAC,EAAE,iBAAiB,CAAC;IAClC,+BAA+B;IAC/B,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;IACpB,eAAe,CAAC,EAAE,MAAM,EAAE,CAAC;IAC3B,iBAAiB,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,IAAI,CAAC;IAC5C,+BAA+B;IAC/B,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;IACpB,eAAe,CAAC,EAAE,MAAM,EAAE,CAAC;IAC3B,gBAAgB,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,IAAI,CAAC;IAC3C,wFAAwF;IACxF,cAAc,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,OAAO,CAAC,QAAQ,EAAE,CAAC,CAAC;IACrD,kEAAkE;IAClE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