@knpkv/rly 0.1.0 → 0.2.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 (40) hide show
  1. package/README.md +37 -1
  2. package/dist/{Dialog-DwSIPb-B.js → Dialog-xSrBk0Vv.js} +21 -19
  3. package/dist/Dialog-xSrBk0Vv.js.map +1 -0
  4. package/dist/components.css +3 -2
  5. package/dist/diff/bounded/index.js +1054 -0
  6. package/dist/diff/bounded/index.js.map +1 -0
  7. package/dist/diff/index.js +1531 -1790
  8. package/dist/diff/index.js.map +1 -1
  9. package/dist/diff/workbench/index.js +5 -0
  10. package/dist/diff/workbench/index.js.map +1 -0
  11. package/dist/dts/diff/DiffCodeView.d.ts.map +1 -1
  12. package/dist/dts/diff/annotation.d.ts +13 -0
  13. package/dist/dts/diff/annotation.d.ts.map +1 -0
  14. package/dist/dts/diff/bounded/BoundedDiffCodeView.d.ts +21 -0
  15. package/dist/dts/diff/bounded/BoundedDiffCodeView.d.ts.map +1 -0
  16. package/dist/dts/diff/bounded/index.d.ts +3 -0
  17. package/dist/dts/diff/bounded/index.d.ts.map +1 -0
  18. package/dist/dts/diff/index.d.ts +2 -7
  19. package/dist/dts/diff/index.d.ts.map +1 -1
  20. package/dist/dts/diff/rendered-line.d.ts +8 -0
  21. package/dist/dts/diff/rendered-line.d.ts.map +1 -0
  22. package/dist/dts/diff/types.d.ts +22 -3
  23. package/dist/dts/diff/types.d.ts.map +1 -1
  24. package/dist/dts/diff/workbench/index.d.ts +7 -0
  25. package/dist/dts/diff/workbench/index.d.ts.map +1 -0
  26. package/dist/dts/primitives/Button.d.ts +1 -1
  27. package/dist/dts/primitives/Button.d.ts.map +1 -1
  28. package/dist/index.js +2 -2
  29. package/dist/patterns/index.js +1 -1
  30. package/dist/{patterns-DEbg7R-A.js → patterns-5N-j-AD2.js} +2 -2
  31. package/dist/patterns-5N-j-AD2.js.map +1 -0
  32. package/dist/primitives/index.js +1 -1
  33. package/dist/workbench-tHBnbqSx.js +331 -0
  34. package/dist/workbench-tHBnbqSx.js.map +1 -0
  35. package/package.json +12 -3
  36. package/registry/components.json +12 -6
  37. package/registry/schema.json +1 -1
  38. package/registry/search.json +17 -3
  39. package/dist/Dialog-DwSIPb-B.js.map +0 -1
  40. package/dist/patterns-DEbg7R-A.js.map +0 -1
package/README.md CHANGED
@@ -334,18 +334,46 @@ worker graph out of ordinary primitives and patterns. `DiffWorkbench` composes
334
334
  a controlled header, complete lightweight file inventory, renderer slot, and
335
335
  semantic finding list. Exceptional files stay visible as loading, binary,
336
336
  generated, oversized, unavailable, or error rows; renames preserve both paths.
337
+ Applications that supply their own bounded viewer can import
338
+ `DiffWorkbench`, `DiffHeader`, and `DiffFileTree` from the lightweight
339
+ `@knpkv/rly/diff/workbench` entry without loading the syntax renderer graph.
337
340
 
338
341
  `DiffCodeView` is the single pinned `@pierre/diffs` adapter. It accepts complete
339
342
  before/after text, split or stacked layout, wrapping, context, selection,
340
343
  annotations, and virtualization controls. Its imperative handle adds or
341
344
  versions items and scrolls to files or lines without resetting the viewer.
345
+ Annotations use Rly-owned stable identities and line locations; their visual
346
+ content is rendered by the application, so review-domain fields never enter the
347
+ renderer contract. Replacing the annotation array updates only affected files
348
+ and retains renderer identity, expanded context, selected lines, and scroll
349
+ position.
342
350
 
343
351
  ```tsx
344
- import { DiffCodeView, DiffWorkerProvider } from "@knpkv/rly/diff"
352
+ import { DiffCodeView, DiffWorkerProvider, type RlyDiffCodeAnnotation } from "@knpkv/rly/diff"
353
+
354
+ const annotations: ReadonlyArray<RlyDiffCodeAnnotation> = [
355
+ {
356
+ accessibilityLabel: "High-confidence draft release finding",
357
+ id: "release-ready-finding",
358
+ location: {
359
+ itemId: "release-gate",
360
+ lineNumber: 1,
361
+ side: "additions"
362
+ },
363
+ render: ({ returnFocus }) => (
364
+ <article>
365
+ <strong>High · 96% confidence · draft</strong>
366
+ <p>The signed manifest still names the previous revision.</p>
367
+ <button onClick={returnFocus}>Return to line</button>
368
+ </article>
369
+ )
370
+ }
371
+ ]
345
372
 
346
373
  export const PullRequestDiff = () => (
347
374
  <DiffWorkerProvider poolSize={2}>
348
375
  <DiffCodeView
376
+ annotations={annotations}
349
377
  initialItems={[
350
378
  {
351
379
  id: "release-gate",
@@ -359,6 +387,14 @@ export const PullRequestDiff = () => (
359
387
  )
360
388
  ```
361
389
 
390
+ Every annotation wrapper is keyboard reachable. Pressing Escape, or invoking
391
+ the supplied `returnFocus`, focuses the exact anchored line without scrolling
392
+ it away. The same annotation contract is supported by split, stacked,
393
+ virtualized, worker-fallback, and `@knpkv/rly/diff/bounded` synchronous
394
+ presentations. Applications own severity, confidence, draft or resolution
395
+ state, stale and dismissed history, replacement links, evidence content, and
396
+ all commands.
397
+
362
398
  The provider owns a bounded module-worker pool. If creation or execution fails,
363
399
  the same complete `CodeView` remounts synchronously and announces the fallback;
364
400
  it never replaces the diff with partial raw text. Applications still own
@@ -281,40 +281,42 @@ var _ = /* @__PURE__ */ new WeakMap(), v = c(null), y = 0, b = (e, t) => {
281
281
  }), ie = i({
282
282
  variant: "secondary",
283
283
  size: "default"
284
- }), R = ({ children: t, className: n, disabled: r, leadingIcon: i, loading: o = !1, size: s = "default", stretch: c = !1, trailingIcon: l, type: u, variant: d = "secondary", ...f }) => {
285
- if (typeof t != "number" && typeof t != "string" || typeof t == "string" && t.trim().length === 0) throw Error("Button children must contain visible content");
284
+ }), R = ({ "aria-label": t, "aria-labelledby": n, children: r, className: i, disabled: o, leadingIcon: s, loading: c = !1, size: l = "default", stretch: u = !1, trailingIcon: d, type: f, variant: p = "secondary", ...m }) => {
285
+ if (typeof r != "number" && typeof r != "string" || typeof r == "string" && r.trim().length === 0) throw Error("Button children must contain visible content");
286
286
  return /* @__PURE__ */ g("button", {
287
- ...f,
288
- "aria-busy": o ? "true" : void 0,
289
- className: a(I("root"), L.variant[d].className, L.size[s].className, c && I("stretch"), n),
290
- "data-loading": o ? "true" : void 0,
291
- disabled: r || o,
292
- type: u ?? "button",
287
+ ...m,
288
+ "aria-busy": c ? "true" : void 0,
289
+ "aria-label": c && !n?.trim() ? t?.trim() ? t : String(r) : t,
290
+ "aria-labelledby": n,
291
+ className: a(I("root"), L.variant[p].className, L.size[l].className, u && I("stretch"), i),
292
+ "data-loading": c ? "true" : void 0,
293
+ disabled: o || c,
294
+ type: f ?? "button",
293
295
  children: [/* @__PURE__ */ g("span", {
294
- className: a(I("content"), o && I("loadingContent")),
296
+ className: a(I("content"), c && I("loadingContent")),
295
297
  children: [
296
- i === void 0 ? null : /* @__PURE__ */ h(e, {
298
+ s === void 0 ? null : /* @__PURE__ */ h(e, {
297
299
  decorative: !0,
298
- name: i,
299
- size: s === "compact" ? "small" : "default"
300
+ name: s,
301
+ size: l === "compact" ? "small" : "default"
300
302
  }),
301
303
  /* @__PURE__ */ h("span", {
302
304
  className: I("label"),
303
- children: t
305
+ children: r
304
306
  }),
305
- l === void 0 ? null : /* @__PURE__ */ h(e, {
307
+ d === void 0 ? null : /* @__PURE__ */ h(e, {
306
308
  decorative: !0,
307
- name: l,
308
- size: s === "compact" ? "small" : "default"
309
+ name: d,
310
+ size: l === "compact" ? "small" : "default"
309
311
  })
310
312
  ]
311
- }), o ? /* @__PURE__ */ h("span", {
313
+ }), c ? /* @__PURE__ */ h("span", {
312
314
  "aria-hidden": "true",
313
315
  className: I("loader"),
314
316
  children: /* @__PURE__ */ h(e, {
315
317
  decorative: !0,
316
318
  name: "loader",
317
- size: s === "compact" ? "small" : "default"
319
+ size: l === "compact" ? "small" : "default"
318
320
  })
319
321
  }) : null]
320
322
  });
@@ -704,4 +706,4 @@ var _ = /* @__PURE__ */ new WeakMap(), v = c(null), y = 0, b = (e, t) => {
704
706
  //#endregion
705
707
  export { ie as _, q as a, j as b, G as c, U as d, H as f, R as g, ce as h, he as i, pe as l, B as m, ye as n, _e as o, oe as p, $ as r, fe as s, xe as t, ue as u, L as v, ne as x, M as y };
706
708
 
707
- //# sourceMappingURL=Dialog-DwSIPb-B.js.map
709
+ //# sourceMappingURL=Dialog-xSrBk0Vv.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Dialog-xSrBk0Vv.js","names":[],"sources":["../src/internal/modal.ts","../src/primitives/Sheet.module.css","../src/primitives/Sheet.tsx","../src/primitives/Button.module.css","../src/primitives/Button.tsx","../src/primitives/StateLabel.module.css","../src/primitives/StateLabel.tsx","../src/primitives/Avatar.module.css","../src/primitives/Avatar.tsx","../src/primitives/Skeleton.module.css","../src/primitives/Skeleton.tsx","../src/primitives/StatePanel.module.css","../src/primitives/StatePanel.tsx","../src/primitives/Dialog.module.css","../src/primitives/Dialog.tsx"],"sourcesContent":["import {\n createContext,\n createElement,\n type ReactElement,\n type ReactNode,\n type RefObject,\n useContext,\n useLayoutEffect,\n useRef,\n useState\n} from \"react\"\n\ninterface InertRecord {\n count: number\n readonly previous: boolean\n}\n\ninterface ModalNestingState {\n readonly isContentMounted: boolean\n readonly setContentMounted: (isMounted: boolean) => void\n}\n\ninterface ModalNestingBoundaryProps {\n readonly children: ReactNode\n}\n\nconst inertRecords = new WeakMap<HTMLElement, InertRecord>()\nconst ModalNestingContext = createContext<ModalNestingState | null>(null)\nlet focusTransitionGeneration = 0\n\n/** Entry-motion ownership sampled once for each closed-to-open modal cycle. */\nexport type ModalEntryMotion = \"external\" | \"intrinsic\"\n\n/** Keep entry ownership stable while a modal is open, then resample it for the next open cycle. */\nexport const useModalEntryMotion = (open: boolean, requested: ModalEntryMotion): ModalEntryMotion => {\n const committedCycleRef = useRef({ open, value: requested })\n const resolved = open && !committedCycleRef.current.open ? requested : committedCycleRef.current.value\n useLayoutEffect(() => {\n if (!open) committedCycleRef.current = { open: false, value: requested }\n else if (!committedCycleRef.current.open) committedCycleRef.current = { open: true, value: requested }\n }, [open, requested])\n return resolved\n}\n\n/** Narrows DOM elements through the HTML-only inert contract without relying on a realm-specific constructor. */\nexport const isHTMLElement = (element: Element | null): element is HTMLElement =>\n element !== null && \"inert\" in element && typeof element.inert === \"boolean\"\n\n/** Stages nested default-open or controlled overlays until their parent content is mounted. */\nexport const ModalNestingBoundary = ({ children }: ModalNestingBoundaryProps): ReactElement => {\n const [isContentMounted, setContentMounted] = useState(false)\n return createElement(ModalNestingContext.Provider, { value: { isContentMounted, setContentMounted } }, children)\n}\n\n/** Reports whether a logical parent modal is ready to host a nested overlay. */\nexport const useParentModalReady = (): boolean => useContext(ModalNestingContext)?.isContentMounted ?? true\n\n/** Registers the current portal content so deeper overlays mount in logical stack order. */\nexport const useModalContentRegistration = (): void => {\n const setContentMounted = useContext(ModalNestingContext)?.setContentMounted\n useLayoutEffect(() => {\n setContentMounted?.(true)\n return () => setContentMounted?.(false)\n }, [setContentMounted])\n}\n\nconst retainInert = (element: HTMLElement): void => {\n const record = inertRecords.get(element)\n if (record === undefined) {\n inertRecords.set(element, { count: 1, previous: element.inert })\n element.inert = true\n return\n }\n record.count += 1\n}\n\nconst releaseInert = (element: HTMLElement): void => {\n const record = inertRecords.get(element)\n if (record === undefined) return\n if (record.count > 1) {\n record.count -= 1\n return\n }\n element.inert = record.previous\n inertRecords.delete(element)\n}\n\n/** Shares reference-counted background isolation across every rly modal primitive. */\nexport const useModalIsolation = (layerRef: RefObject<HTMLDivElement | null>, isOpen: boolean): void => {\n useLayoutEffect(() => {\n if (!isOpen) return\n const layer = layerRef.current\n if (layer === null) return\n let current: HTMLElement = layer\n const retained: Array<HTMLElement> = []\n\n while (true) {\n if (current === current.ownerDocument.body) break\n const parent = current.parentElement\n if (parent === null) break\n let hasReachedCurrent = false\n for (const sibling of parent.children) {\n if (sibling === current) {\n hasReachedCurrent = true\n continue\n }\n const isLaterModalLayer = hasReachedCurrent && sibling.hasAttribute(\"data-rly-modal-layer\")\n if (!isLaterModalLayer && isHTMLElement(sibling)) {\n retainInert(sibling)\n retained.push(sibling)\n }\n }\n current = parent\n }\n\n return () => {\n for (const element of retained) releaseInert(element)\n }\n }, [isOpen, layerRef])\n}\n\n/** Invalidates an older deferred restoration whenever a newer modal transition starts. */\nexport const invalidateModalFocusRestore = (): void => {\n focusTransitionGeneration += 1\n}\n\n/** Restores focus only after modal cleanup and only while this remains the newest transition. */\nexport const restoreModalFocusAfterCleanup = (target: HTMLElement | null): void => {\n const generation = ++focusTransitionGeneration\n setTimeout(() => {\n if (focusTransitionGeneration === generation && target?.isConnected) target.focus()\n }, 0)\n}\n","@layer rly.components {\n .layer {\n inset: var(--rly-space-0);\n isolation: isolate;\n pointer-events: none;\n position: fixed;\n z-index: 100;\n }\n\n .trigger,\n .close,\n .iconClose {\n align-items: center;\n appearance: none;\n background: var(--rly-color-surface-1);\n border: 1px solid var(--rly-color-border-2);\n color: var(--rly-color-text-1);\n cursor: pointer;\n display: inline-flex;\n font: var(--rly-type-label-weight) var(--rly-type-label-size) / var(--rly-type-label-line-height)\n var(--rly-type-label-font);\n justify-content: center;\n }\n\n .trigger,\n .close {\n border-radius: var(--rly-radius-field);\n min-block-size: var(--rly-space-40);\n padding: var(--rly-space-8) var(--rly-space-16);\n }\n\n .trigger:hover,\n .close:hover,\n .iconClose:hover {\n background: var(--rly-color-surface-2);\n }\n\n .trigger:active,\n .close:active,\n .iconClose:active {\n background: var(--rly-color-surface-3);\n }\n\n .trigger:disabled,\n .close:disabled,\n .iconClose:disabled {\n cursor: not-allowed;\n opacity: 0.58;\n }\n\n .overlay {\n animation: rly-sheet-overlay-out var(--rly-motion-standard-duration) var(--rly-motion-standard-easing);\n background: var(--rly-color-text-1);\n inset: var(--rly-space-0);\n opacity: 0.3;\n position: fixed;\n pointer-events: auto;\n z-index: 0;\n }\n\n .overlay[data-state=\"open\"] {\n animation-name: rly-sheet-overlay-in;\n }\n\n .content {\n background: var(--rly-color-surface-1);\n block-size: 100vh;\n block-size: 100dvh;\n color: var(--rly-color-text-1);\n display: flex;\n flex-direction: column;\n inset-block: var(--rly-space-0);\n max-inline-size: min(92vw, 30rem);\n overflow: hidden;\n pointer-events: auto;\n position: fixed;\n z-index: 1;\n }\n\n .end {\n animation: rly-sheet-end-out var(--rly-motion-standard-duration) var(--rly-motion-standard-easing);\n border-inline-start: 1px solid var(--rly-color-border-1);\n border-start-start-radius: var(--rly-radius-overlay);\n border-end-start-radius: var(--rly-radius-overlay);\n inset-inline-end: var(--rly-space-0);\n }\n\n .end[data-state=\"open\"] {\n animation-name: rly-sheet-end-in;\n }\n\n .start {\n animation: rly-sheet-start-out var(--rly-motion-standard-duration) var(--rly-motion-standard-easing);\n border-inline-end: 1px solid var(--rly-color-border-1);\n border-start-end-radius: var(--rly-radius-overlay);\n border-end-end-radius: var(--rly-radius-overlay);\n inset-inline-start: var(--rly-space-0);\n }\n\n .start[data-state=\"open\"] {\n animation-name: rly-sheet-start-in;\n }\n\n .layer[data-rly-sheet-entry-motion=\"external\"] .overlay[data-state=\"open\"],\n .layer[data-rly-sheet-entry-motion=\"external\"] .content[data-state=\"open\"] {\n animation: none;\n }\n\n .header {\n align-items: flex-start;\n border-block-end: 1px solid var(--rly-color-border-1);\n display: flex;\n flex: none;\n gap: var(--rly-space-16);\n justify-content: space-between;\n padding: var(--rly-space-20) var(--rly-space-24);\n }\n\n .heading {\n display: grid;\n gap: var(--rly-space-6);\n min-inline-size: var(--rly-space-0);\n }\n\n .title {\n font: var(--rly-type-card-title-weight) var(--rly-type-card-title-size) / var(--rly-type-card-title-line-height)\n var(--rly-type-card-title-font);\n letter-spacing: var(--rly-type-card-title-tracking);\n margin: var(--rly-space-0);\n overflow-wrap: anywhere;\n }\n\n .description {\n color: var(--rly-color-text-2);\n font: var(--rly-type-body-weight) var(--rly-type-body-size) / var(--rly-type-body-line-height)\n var(--rly-type-body-font);\n margin: var(--rly-space-0);\n overflow-wrap: anywhere;\n }\n\n .iconClose {\n border-radius: var(--rly-radius-field);\n flex: none;\n min-block-size: var(--rly-space-40);\n min-inline-size: var(--rly-space-40);\n padding: var(--rly-space-8);\n }\n\n .body {\n flex: 1 1 auto;\n min-block-size: var(--rly-space-0);\n min-inline-size: var(--rly-space-0);\n overflow: auto;\n overscroll-behavior: contain;\n padding: var(--rly-space-24);\n }\n\n .footer {\n align-items: center;\n border-block-start: 1px solid var(--rly-color-border-1);\n display: flex;\n flex: none;\n flex-wrap: wrap;\n gap: var(--rly-space-12);\n justify-content: flex-end;\n padding: var(--rly-space-16) var(--rly-space-24);\n }\n\n @media (max-width: 40rem) {\n .content {\n border: 0;\n border-radius: var(--rly-space-0);\n inline-size: 100vw;\n max-inline-size: none;\n }\n\n .header,\n .body {\n padding-inline: var(--rly-space-16);\n }\n\n .footer {\n padding: var(--rly-space-12) var(--rly-space-16);\n }\n }\n}\n\n@keyframes rly-sheet-overlay-in {\n from {\n opacity: 0;\n }\n\n to {\n opacity: 0.3;\n }\n}\n\n@keyframes rly-sheet-overlay-out {\n from {\n opacity: 0.3;\n }\n\n to {\n opacity: 0;\n }\n}\n\n@keyframes rly-sheet-end-in {\n from {\n transform: translateX(100%);\n }\n\n to {\n transform: translateX(0);\n }\n}\n\n@keyframes rly-sheet-end-out {\n from {\n transform: translateX(0);\n }\n\n to {\n transform: translateX(100%);\n }\n}\n\n@keyframes rly-sheet-start-in {\n from {\n transform: translateX(-100%);\n }\n\n to {\n transform: translateX(0);\n }\n}\n\n@keyframes rly-sheet-start-out {\n from {\n transform: translateX(0);\n }\n\n to {\n transform: translateX(-100%);\n }\n}\n","import { Dialog as RadixDialog } from \"radix-ui\"\nimport {\n type ComponentPropsWithRef,\n createContext,\n type ReactElement,\n type ReactNode,\n type RefObject,\n useCallback,\n useContext,\n useLayoutEffect,\n useRef,\n useState\n} from \"react\"\nimport { Icon } from \"../foundations/Icon.js\"\nimport { PortalBoundary } from \"../foundations/PortalProvider.js\"\nimport { classNames, cssClass, defineVariants, requireText } from \"../internal/component.js\"\nimport {\n invalidateModalFocusRestore,\n isHTMLElement,\n ModalNestingBoundary,\n restoreModalFocusAfterCleanup,\n useModalContentRegistration,\n useModalEntryMotion,\n useModalIsolation,\n useParentModalReady\n} from \"../internal/modal.js\"\nimport styles from \"./Sheet.module.css\"\n\nconst style = (name: string): string => cssClass(styles, name)\n\n/** Semantic logical-side metadata for the sheet surface. */\nexport const RLY_SHEET_VARIANTS = defineVariants({\n side: {\n end: {\n className: style(\"end\"),\n purpose: \"Supporting detail that follows the current reading flow\",\n tokens: [\"color-surface-1\", \"radius-overlay\", \"motion-standard\"]\n },\n start: {\n className: style(\"start\"),\n purpose: \"Navigation or context that precedes the current reading flow\",\n tokens: [\"color-surface-1\", \"radius-overlay\", \"motion-standard\"]\n }\n }\n})\n\n/** Default logical edge used when no sheet side is selected. */\nexport const RLY_SHEET_DEFAULT_VARIANTS = defineVariants({ side: \"end\" })\n/** Logical inline edges supported by a sheet. */\nexport type RlySheetSide = keyof typeof RLY_SHEET_VARIANTS.side\n\ninterface SheetRootBaseProps {\n readonly children: ReactNode\n}\n\ntype ControlledSheetRootProps = SheetRootBaseProps & {\n readonly defaultOpen?: never\n readonly onOpenChange: (open: boolean) => void\n readonly open: boolean\n}\n\ntype DefaultSheetRootProps = SheetRootBaseProps & {\n readonly defaultOpen?: boolean\n readonly onOpenChange?: (open: boolean) => void\n readonly open?: never\n}\n\n/** Controlled-first or locally owned state for a sheet tree. */\nexport type SheetRootProps = ControlledSheetRootProps | DefaultSheetRootProps\n\n/** Props for the visible native button that opens a sheet. */\nexport type SheetTriggerProps = Omit<ComponentPropsWithRef<\"button\">, \"children\"> & {\n /** Visible text that identifies the panel being opened. */\n readonly children: number | string\n}\n\n/** Props for a visible native button that closes a sheet. */\nexport type SheetCloseProps = Omit<ComponentPropsWithRef<\"button\">, \"children\"> & {\n /** Visible text that identifies the close action. */\n readonly children: number | string\n}\n\n/** Accessible content, naming, focus, and logical placement for a sheet surface. */\nexport type SheetContentProps = Omit<\n ComponentPropsWithRef<\"div\">,\n \"aria-label\" | \"aria-labelledby\" | \"children\" | \"title\"\n> & {\n readonly children: ReactNode\n /** Accessible text for the built-in icon close action. */\n readonly closeLabel?: string\n /** Optional visible supporting description announced with the title. */\n readonly description?: string\n /**\n * Defaults to intrinsic and is sampled when the sheet opens. While open, changes apply to the next cycle.\n * External suppresses surface and overlay entry only; exit stays intrinsic and shared reduced-motion rules apply.\n */\n readonly entryMotion?: \"external\" | \"intrinsic\"\n /** Optional target for deterministic initial focus. Content receives focus by default. */\n readonly initialFocusRef?: RefObject<HTMLElement | null>\n readonly side?: RlySheetSide\n /** Required visible heading and accessible name for the sheet. */\n readonly title: string\n}\n\n/** Props for the independently scrolling sheet body. */\nexport type SheetBodyProps = ComponentPropsWithRef<\"div\">\n/** Props for the persistent sheet action footer. */\nexport type SheetFooterProps = ComponentPropsWithRef<\"footer\">\n\ninterface SheetState {\n readonly open: boolean\n readonly requestOpenChange: (open: boolean) => void\n readonly restoreFocusRef: RefObject<HTMLElement | null>\n}\n\nconst SheetStateContext = createContext<SheetState | null>(null)\n\nconst useSheetState = (): SheetState => {\n const state = useContext(SheetStateContext)\n if (state === null) throw new Error(\"Sheet compound components must be nested inside Sheet.Root\")\n return state\n}\n\nconst SheetLayer = ({\n children,\n entryMotion\n}: {\n readonly children: ReactNode\n readonly entryMotion: \"external\" | \"intrinsic\"\n}): ReactElement => {\n const state = useSheetState()\n const layerRef = useRef<HTMLDivElement>(null)\n useModalContentRegistration()\n useModalIsolation(layerRef, state.open)\n return (\n <div\n className={style(\"layer\")}\n data-rly-modal-layer=\"\"\n data-rly-sheet-entry-motion={entryMotion}\n data-rly-sheet-layer=\"\"\n ref={layerRef}\n >\n {children}\n </div>\n )\n}\n\nconst requireVisibleAction = (value: number | string, component: string): number | string => {\n if (typeof value === \"string\") requireText(value, `${component} children`)\n return value\n}\n\nconst SheetRoot = (componentProps: SheetRootProps): ReactElement => {\n const { children, defaultOpen = false, onOpenChange, open } = componentProps\n const [defaultState, setDefaultState] = useState(defaultOpen)\n const isParentModalReady = useParentModalReady()\n const restoreFocusRef = useRef<HTMLElement | null>(null)\n const resolvedOpen = (open ?? defaultState) && isParentModalReady\n const previousOpenRef = useRef(resolvedOpen)\n const requestOpenChange = (nextOpen: boolean): void => {\n if (open === undefined) setDefaultState(nextOpen)\n onOpenChange?.(nextOpen)\n }\n\n useLayoutEffect(() => {\n if (previousOpenRef.current === resolvedOpen) return\n previousOpenRef.current = resolvedOpen\n if (resolvedOpen) invalidateModalFocusRestore()\n else restoreModalFocusAfterCleanup(restoreFocusRef.current)\n }, [resolvedOpen])\n\n return (\n <ModalNestingBoundary>\n <SheetStateContext.Provider value={{ open: resolvedOpen, requestOpenChange, restoreFocusRef }}>\n <RadixDialog.Root modal onOpenChange={requestOpenChange} open={resolvedOpen}>\n {children}\n </RadixDialog.Root>\n </SheetStateContext.Provider>\n </ModalNestingBoundary>\n )\n}\n\nconst SheetTrigger = ({ children, className, onClick, type, ...props }: SheetTriggerProps): ReactElement => {\n const state = useSheetState()\n return (\n <RadixDialog.Trigger\n {...props}\n className={classNames(style(\"trigger\"), className)}\n onClick={(event) => {\n state.restoreFocusRef.current = event.currentTarget\n onClick?.(event)\n }}\n type={type ?? \"button\"}\n >\n {requireVisibleAction(children, \"Sheet.Trigger\")}\n </RadixDialog.Trigger>\n )\n}\n\nconst SheetClose = ({ children, className, type, ...props }: SheetCloseProps): ReactElement => (\n <RadixDialog.Close {...props} className={classNames(style(\"close\"), className)} type={type ?? \"button\"}>\n {requireVisibleAction(children, \"Sheet.Close\")}\n </RadixDialog.Close>\n)\n\nconst SheetBody = ({ className, ...props }: SheetBodyProps): ReactElement => (\n <div {...props} className={classNames(style(\"body\"), className)} />\n)\n\nconst SheetFooter = ({ className, ...props }: SheetFooterProps): ReactElement => (\n <footer {...props} className={classNames(style(\"footer\"), className)} />\n)\n\nconst SheetContent = ({\n children,\n className,\n closeLabel,\n description,\n entryMotion = \"intrinsic\",\n initialFocusRef,\n ref,\n side = RLY_SHEET_DEFAULT_VARIANTS.side,\n tabIndex,\n title,\n ...props\n}: SheetContentProps): ReactElement => {\n const state = useSheetState()\n const resolvedEntryMotion = useModalEntryMotion(state.open, entryMotion)\n const visibleTitle = requireText(title, \"Sheet title\")\n const visibleDescription = description === undefined ? undefined : requireText(description, \"Sheet description\")\n const accessibleCloseLabel = requireText(closeLabel ?? `Close ${visibleTitle}`, \"Sheet closeLabel\")\n const contentRef = useRef<HTMLDivElement | null>(null)\n const setContentRef = useCallback(\n (node: HTMLDivElement | null): void => {\n contentRef.current = node\n if (typeof ref === \"function\") ref(node)\n else if (ref !== null && ref !== undefined) ref.current = node\n },\n [ref]\n )\n\n return (\n <PortalBoundary>\n {(container) => (\n <RadixDialog.Portal container={container}>\n <SheetLayer entryMotion={resolvedEntryMotion}>\n <RadixDialog.Overlay\n className={style(\"overlay\")}\n data-rly-sheet-overlay=\"\"\n onPointerDown={() => state.requestOpenChange(false)}\n />\n <RadixDialog.Content\n {...props}\n {...(visibleDescription === undefined ? { \"aria-describedby\": undefined } : {})}\n className={classNames(style(\"content\"), RLY_SHEET_VARIANTS.side[side].className, className)}\n data-rly-sheet-side={side}\n onCloseAutoFocus={(event) => event.preventDefault()}\n onOpenAutoFocus={(event) => {\n event.preventDefault()\n const activeElement = contentRef.current?.ownerDocument.activeElement ?? null\n if (state.restoreFocusRef.current === null && isHTMLElement(activeElement)) {\n state.restoreFocusRef.current = activeElement\n }\n const target = initialFocusRef?.current ?? contentRef.current\n target?.focus()\n if (target !== contentRef.current && target?.ownerDocument.activeElement !== target)\n contentRef.current?.focus()\n }}\n ref={setContentRef}\n tabIndex={tabIndex ?? -1}\n >\n <div className={style(\"header\")}>\n <div className={style(\"heading\")}>\n <RadixDialog.Title className={style(\"title\")}>{visibleTitle}</RadixDialog.Title>\n {visibleDescription === undefined ? null : (\n <RadixDialog.Description className={style(\"description\")}>\n {visibleDescription}\n </RadixDialog.Description>\n )}\n </div>\n <RadixDialog.Close aria-label={accessibleCloseLabel} className={style(\"iconClose\")} type=\"button\">\n <Icon decorative name=\"close\" size=\"default\" />\n </RadixDialog.Close>\n </div>\n {children}\n </RadixDialog.Content>\n </SheetLayer>\n </RadixDialog.Portal>\n )}\n </PortalBoundary>\n )\n}\n\n/** Owned compound side panel with modal focus, dismissal, and portal behavior. */\nexport const Sheet = Object.freeze({\n Body: SheetBody,\n Close: SheetClose,\n Content: SheetContent,\n Footer: SheetFooter,\n Root: SheetRoot,\n Trigger: SheetTrigger\n})\n","@layer rly.components {\n .root {\n align-items: center;\n appearance: none;\n border: 1px solid var(--rly-color-border-2);\n border-radius: var(--rly-radius-control);\n box-sizing: border-box;\n cursor: pointer;\n display: inline-grid;\n font: var(--rly-type-label-weight) var(--rly-type-label-size) / var(--rly-type-label-line-height)\n var(--rly-type-label-font);\n justify-items: center;\n letter-spacing: var(--rly-type-label-tracking);\n max-inline-size: 100%;\n padding-inline: var(--rly-space-16);\n position: relative;\n text-align: center;\n }\n\n .root:disabled {\n cursor: not-allowed;\n opacity: 0.58;\n }\n .primary {\n background: var(--rly-color-action-background);\n border-color: var(--rly-color-action-background);\n color: var(--rly-color-action-foreground);\n }\n .secondary {\n background: var(--rly-color-surface-1);\n color: var(--rly-color-text-1);\n }\n .quiet {\n background: var(--rly-color-surface-2);\n border-color: var(--rly-color-surface-2);\n color: var(--rly-color-text-1);\n }\n .compact {\n min-block-size: var(--rly-space-40);\n }\n .defaultSize {\n min-block-size: var(--rly-space-48);\n }\n .principal {\n min-block-size: calc(var(--rly-space-48) + var(--rly-space-8));\n padding-inline: var(--rly-space-24);\n }\n .stretch {\n inline-size: 100%;\n }\n\n .content {\n align-items: center;\n display: inline-flex;\n gap: var(--rly-space-8);\n justify-content: center;\n min-inline-size: var(--rly-space-0);\n padding-block: var(--rly-space-8);\n }\n\n .label {\n min-inline-size: var(--rly-space-0);\n overflow-wrap: anywhere;\n }\n .loadingContent {\n opacity: 0;\n }\n .loader {\n display: grid;\n inset: var(--rly-space-0);\n place-items: center;\n position: absolute;\n }\n\n @media (hover: hover) {\n .root:not(:disabled):hover {\n border-color: var(--rly-color-text-2);\n }\n .primary:not(:disabled):hover {\n background: var(--rly-color-text-2);\n }\n }\n}\n","import type { ComponentPropsWithRef, ReactElement } from \"react\"\nimport { Icon, type RlyIconName } from \"../foundations/Icon.js\"\nimport { classNames, cssClass, defineVariants } from \"../internal/component.js\"\nimport styles from \"./Button.module.css\"\n\nconst style = (name: string): string => cssClass(styles, name)\nexport const RLY_BUTTON_VARIANTS = defineVariants({\n variant: {\n primary: {\n className: style(\"primary\"),\n purpose: \"Single principal action\",\n tokens: [\"color-action-background\", \"color-action-foreground\"]\n },\n secondary: {\n className: style(\"secondary\"),\n purpose: \"Default supporting action\",\n tokens: [\"color-surface-1\", \"color-border-2\"]\n },\n quiet: {\n className: style(\"quiet\"),\n purpose: \"Low-emphasis contextual action\",\n tokens: [\"color-text-1\", \"color-surface-2\"]\n }\n },\n size: {\n compact: { className: style(\"compact\"), purpose: \"Dense text action\", tokens: [\"space-40\"] },\n default: { className: style(\"defaultSize\"), purpose: \"Standard action\", tokens: [\"space-48\"] },\n principal: {\n className: style(\"principal\"),\n purpose: \"Prominent consequential action\",\n tokens: [\"space-48\", \"space-8\"]\n }\n }\n})\nexport const RLY_BUTTON_DEFAULT_VARIANTS = defineVariants({ variant: \"secondary\", size: \"default\" })\nexport type RlyButtonVariant = keyof typeof RLY_BUTTON_VARIANTS.variant\nexport type RlyButtonSize = keyof typeof RLY_BUTTON_VARIANTS.size\nexport type ButtonProps = Omit<ComponentPropsWithRef<\"button\">, \"children\"> & {\n /** Plain visible text. Use IconButton for an icon-only action. */\n readonly children: number | string\n readonly leadingIcon?: RlyIconName\n readonly loading?: boolean\n readonly size?: RlyButtonSize\n readonly stretch?: boolean\n readonly trailingIcon?: RlyIconName\n readonly variant?: RlyButtonVariant\n}\n\n/** Render a visible-text action with stable disabled and loading geometry. */\nexport const Button = ({\n \"aria-label\": ariaLabel,\n \"aria-labelledby\": ariaLabelledBy,\n children,\n className,\n disabled,\n leadingIcon,\n loading = false,\n size = \"default\",\n stretch = false,\n trailingIcon,\n type,\n variant = \"secondary\",\n ...props\n}: ButtonProps): ReactElement => {\n if (\n (typeof children !== \"number\" && typeof children !== \"string\") ||\n (typeof children === \"string\" && children.trim().length === 0)\n ) {\n throw new Error(\"Button children must contain visible content\")\n }\n return (\n <button\n {...props}\n aria-busy={loading ? \"true\" : undefined}\n aria-label={loading && !ariaLabelledBy?.trim() ? (ariaLabel?.trim() ? ariaLabel : String(children)) : ariaLabel}\n aria-labelledby={ariaLabelledBy}\n className={classNames(\n style(\"root\"),\n RLY_BUTTON_VARIANTS.variant[variant].className,\n RLY_BUTTON_VARIANTS.size[size].className,\n stretch && style(\"stretch\"),\n className\n )}\n data-loading={loading ? \"true\" : undefined}\n disabled={disabled || loading}\n type={type ?? \"button\"}\n >\n <span className={classNames(style(\"content\"), loading && style(\"loadingContent\"))}>\n {leadingIcon === undefined ? null : (\n <Icon decorative name={leadingIcon} size={size === \"compact\" ? \"small\" : \"default\"} />\n )}\n <span className={style(\"label\")}>{children}</span>\n {trailingIcon === undefined ? null : (\n <Icon decorative name={trailingIcon} size={size === \"compact\" ? \"small\" : \"default\"} />\n )}\n </span>\n {loading ? (\n <span aria-hidden=\"true\" className={style(\"loader\")}>\n <Icon decorative name=\"loader\" size={size === \"compact\" ? \"small\" : \"default\"} />\n </span>\n ) : null}\n </button>\n )\n}\n","@layer rly.components {\n .root {\n align-items: center;\n border: 1px solid currentcolor;\n border-radius: var(--rly-radius-tag);\n display: inline-flex;\n gap: var(--rly-space-6);\n max-inline-size: 100%;\n padding: var(--rly-space-4) var(--rly-space-8);\n overflow-wrap: anywhere;\n }\n\n .neutral {\n background: var(--rly-color-surface-2);\n color: var(--rly-color-text-2);\n }\n .positive {\n background: var(--rly-color-success-tint);\n color: var(--rly-color-success-ink);\n }\n .critical {\n background: var(--rly-color-blocked-tint);\n color: var(--rly-color-blocked-ink);\n }\n .caution {\n background: var(--rly-color-held-tint);\n color: var(--rly-color-held-ink);\n }\n .progress {\n background: var(--rly-color-deploying-tint);\n color: var(--rly-color-deploying-ink);\n }\n .compact {\n font: var(--rly-type-meta-weight) var(--rly-type-meta-size) / var(--rly-type-meta-line-height)\n var(--rly-type-meta-font);\n }\n .defaultSize {\n font: var(--rly-type-label-weight) var(--rly-type-label-size) / var(--rly-type-label-line-height)\n var(--rly-type-label-font);\n }\n}\n","import type { ComponentPropsWithRef, ReactElement } from \"react\"\nimport { Icon, type RlyIconName } from \"../foundations/Icon.js\"\nimport { classNames, cssClass, defineVariants, requireText } from \"../internal/component.js\"\nimport styles from \"./StateLabel.module.css\"\n\nconst style = (name: string): string => cssClass(styles, name)\nexport type RlyStateTone = \"neutral\" | \"positive\" | \"critical\" | \"caution\" | \"progress\"\nexport const RLY_STATE_LABEL_VARIANTS = defineVariants({\n tone: {\n neutral: {\n className: style(\"neutral\"),\n purpose: \"Neutral or unavailable state\",\n tokens: [\"color-text-2\", \"color-surface-2\"]\n },\n positive: {\n className: style(\"positive\"),\n purpose: \"Positive state\",\n tokens: [\"color-success-ink\", \"color-success-tint\"]\n },\n critical: {\n className: style(\"critical\"),\n purpose: \"Critical state\",\n tokens: [\"color-blocked-ink\", \"color-blocked-tint\"]\n },\n caution: { className: style(\"caution\"), purpose: \"Caution state\", tokens: [\"color-held-ink\", \"color-held-tint\"] },\n progress: {\n className: style(\"progress\"),\n purpose: \"Work in progress\",\n tokens: [\"color-deploying-ink\", \"color-deploying-tint\"]\n }\n },\n size: {\n compact: { className: style(\"compact\"), purpose: \"Dense metadata state\", tokens: [\"type-meta\"] },\n default: { className: style(\"defaultSize\"), purpose: \"Standard explicit state\", tokens: [\"type-label\"] }\n }\n})\nexport const RLY_STATE_LABEL_DEFAULT_VARIANTS = defineVariants({ tone: \"neutral\", size: \"default\" })\nexport type RlyStateLabelSize = keyof typeof RLY_STATE_LABEL_VARIANTS.size\nconst toneIcons: Readonly<Record<RlyStateTone, RlyIconName>> = {\n neutral: \"minus\",\n positive: \"check\",\n critical: \"alert\",\n caution: \"clock\",\n progress: \"loader\"\n}\nexport type StateLabelProps = Omit<ComponentPropsWithRef<\"span\">, \"children\"> & {\n readonly icon?: RlyIconName\n readonly label: string\n readonly size?: RlyStateLabelSize\n readonly tone?: RlyStateTone\n}\n\n/** Render state through a visible word, icon, ink, and restrained tint. */\nexport const StateLabel = ({\n className,\n icon,\n label,\n size = \"default\",\n tone = \"neutral\",\n ...props\n}: StateLabelProps): ReactElement => (\n <span\n {...props}\n className={classNames(\n style(\"root\"),\n RLY_STATE_LABEL_VARIANTS.tone[tone].className,\n RLY_STATE_LABEL_VARIANTS.size[size].className,\n className\n )}\n >\n <Icon decorative name={icon ?? toneIcons[tone]} size=\"small\" />\n <span>{requireText(label, \"StateLabel label\")}</span>\n </span>\n)\n","@layer rly.components {\n .root {\n align-items: center;\n background: var(--rly-color-surface-2);\n box-sizing: border-box;\n color: var(--rly-color-text-2);\n display: inline-flex;\n flex: none;\n justify-content: center;\n overflow: hidden;\n }\n\n .small {\n block-size: var(--rly-space-24);\n inline-size: var(--rly-space-24);\n }\n .defaultSize {\n block-size: var(--rly-space-32);\n inline-size: var(--rly-space-32);\n }\n .large {\n block-size: var(--rly-space-40);\n inline-size: var(--rly-space-40);\n }\n .hero {\n block-size: calc(var(--rly-space-48) + var(--rly-space-8));\n inline-size: calc(var(--rly-space-48) + var(--rly-space-8));\n }\n .circle {\n border-radius: var(--rly-radius-round);\n }\n .roundedSquare {\n border-radius: var(--rly-radius-field);\n }\n .image {\n block-size: 100%;\n inline-size: 100%;\n object-fit: cover;\n }\n\n .fallback {\n align-items: center;\n block-size: 100%;\n display: flex;\n font: var(--rly-type-meta-weight) var(--rly-type-meta-size) / var(--rly-type-meta-line-height)\n var(--rly-type-meta-font);\n inline-size: 100%;\n justify-content: center;\n overflow: hidden;\n text-transform: uppercase;\n }\n}\n","import type { ComponentPropsWithRef, ReactElement } from \"react\"\nimport { Avatar as RadixAvatar } from \"radix-ui\"\nimport { classNames, cssClass, defineVariants, requireText } from \"../internal/component.js\"\nimport styles from \"./Avatar.module.css\"\n\nconst style = (name: string): string => cssClass(styles, name)\nexport const RLY_AVATAR_VARIANTS = defineVariants({\n size: {\n small: { className: style(\"small\"), purpose: \"Compact supporting identity\", tokens: [\"space-24\"] },\n default: { className: style(\"defaultSize\"), purpose: \"Standard identity\", tokens: [\"space-32\"] },\n large: { className: style(\"large\"), purpose: \"Prominent identity\", tokens: [\"space-40\"] },\n hero: { className: style(\"hero\"), purpose: \"Page-level identity\", tokens: [\"space-48\", \"space-8\"] }\n },\n shape: {\n circle: { className: style(\"circle\"), purpose: \"Human or general identity\", tokens: [\"radius-round\"] },\n \"rounded-square\": {\n className: style(\"roundedSquare\"),\n purpose: \"Non-human or system identity\",\n tokens: [\"radius-field\"]\n }\n }\n})\nexport const RLY_AVATAR_DEFAULT_VARIANTS = defineVariants({ size: \"default\", shape: \"circle\" })\nexport type RlyAvatarSize = keyof typeof RLY_AVATAR_VARIANTS.size\nexport type RlyAvatarShape = keyof typeof RLY_AVATAR_VARIANTS.shape\ntype AvatarBaseProps = Omit<ComponentPropsWithRef<\"span\">, \"aria-label\" | \"children\"> & {\n readonly fallback: string\n readonly shape?: RlyAvatarShape\n readonly size?: RlyAvatarSize\n readonly src?: string\n}\nexport type AvatarProps = AvatarBaseProps &\n ({ readonly decorative: true; readonly label?: never } | { readonly decorative?: false; readonly label: string })\n\n/** Render a fixed-geometry image with deterministic fallback and owned accessible name. */\nexport const Avatar = ({\n className,\n decorative,\n fallback,\n label,\n shape = \"circle\",\n size = \"default\",\n src,\n ...props\n}: AvatarProps): ReactElement => {\n const accessibleLabel = decorative ? undefined : requireText(label, \"Avatar label\")\n const visibleFallback = requireText(fallback, \"Avatar fallback\")\n return (\n <RadixAvatar.Root\n {...props}\n aria-hidden={decorative ? \"true\" : undefined}\n aria-label={accessibleLabel}\n className={classNames(\n style(\"root\"),\n RLY_AVATAR_VARIANTS.size[size].className,\n RLY_AVATAR_VARIANTS.shape[shape].className,\n className\n )}\n role={decorative ? undefined : \"img\"}\n >\n {src === undefined ? null : (\n <RadixAvatar.Image alt=\"\" className={style(\"image\")} decoding=\"async\" loading=\"lazy\" src={src} />\n )}\n <RadixAvatar.Fallback aria-hidden=\"true\" className={style(\"fallback\")}>\n {visibleFallback}\n </RadixAvatar.Fallback>\n </RadixAvatar.Root>\n )\n}\n","@layer rly.components {\n .root {\n background: var(--rly-color-surface-3);\n border: 1px solid var(--rly-color-border-1);\n box-sizing: border-box;\n max-inline-size: 100%;\n }\n\n .text {\n block-size: var(--rly-type-body-line-height);\n border-radius: var(--rly-radius-tag);\n inline-size: 100%;\n }\n .block {\n border-radius: var(--rly-radius-control);\n inline-size: 100%;\n min-block-size: var(--rly-space-64);\n }\n .circle {\n aspect-ratio: 1;\n border-radius: var(--rly-radius-round);\n inline-size: var(--rly-space-48);\n }\n}\n","import type { ComponentPropsWithRef, CSSProperties, ReactElement } from \"react\"\nimport { classNames, cssClass, defineVariants, requireText } from \"../internal/component.js\"\nimport styles from \"./Skeleton.module.css\"\n\nconst style = (name: string): string => cssClass(styles, name)\n\nexport const RLY_SKELETON_VARIANTS = defineVariants({\n variant: {\n text: { className: style(\"text\"), purpose: \"A line of unavailable copy\", tokens: [\"type-body\", \"radius-tag\"] },\n block: {\n className: style(\"block\"),\n purpose: \"A rectangular unavailable region\",\n tokens: [\"space-64\", \"radius-control\"]\n },\n circle: { className: style(\"circle\"), purpose: \"A circular unavailable image\", tokens: [\"radius-round\"] }\n }\n})\n\nexport const RLY_SKELETON_DEFAULT_VARIANTS = defineVariants({ variant: \"text\" })\nexport type RlySkeletonVariant = keyof typeof RLY_SKELETON_VARIANTS.variant\n\ntype SkeletonBaseProps = Omit<ComponentPropsWithRef<\"div\">, \"aria-label\" | \"children\" | \"style\"> & {\n readonly height?: CSSProperties[\"blockSize\"]\n readonly style?: CSSProperties\n readonly variant?: RlySkeletonVariant\n readonly width?: CSSProperties[\"inlineSize\"]\n}\nexport type SkeletonProps = SkeletonBaseProps &\n ({ readonly decorative?: true; readonly label?: never } | { readonly decorative: false; readonly label: string })\n\n/** Reserve content geometry without suggesting progress or motion. */\nexport const Skeleton = ({\n className,\n decorative = true,\n height,\n label,\n style: inlineStyle,\n variant = \"text\",\n width,\n ...props\n}: SkeletonProps): ReactElement => {\n if (!decorative && label === undefined) throw new Error(\"Skeleton label must contain visible text\")\n const accessibleLabel = decorative || label === undefined ? undefined : requireText(label, \"Skeleton label\")\n const dimensions: CSSProperties = {\n ...(height === undefined ? {} : { blockSize: height }),\n ...(width === undefined ? {} : { inlineSize: width })\n }\n\n return (\n <div\n {...props}\n aria-busy={decorative ? undefined : \"true\"}\n aria-hidden={decorative ? \"true\" : undefined}\n aria-label={accessibleLabel}\n className={classNames(style(\"root\"), RLY_SKELETON_VARIANTS.variant[variant].className, className)}\n role={decorative ? \"presentation\" : \"status\"}\n style={{ ...inlineStyle, ...dimensions }}\n />\n )\n}\n","@layer rly.components {\n .root {\n background: var(--rly-color-surface-2);\n border: 1px solid currentcolor;\n border-radius: var(--rly-radius-control);\n box-sizing: border-box;\n color: var(--rly-color-text-2);\n display: grid;\n gap: var(--rly-space-16);\n grid-template-columns: var(--rly-space-4) auto minmax(var(--rly-space-0), 1fr);\n max-inline-size: 100%;\n padding: var(--rly-space-24);\n }\n\n .neutral {\n background: var(--rly-color-surface-2);\n color: var(--rly-color-text-2);\n }\n .positive {\n background: var(--rly-color-success-tint);\n color: var(--rly-color-success-ink);\n }\n .critical {\n background: var(--rly-color-blocked-tint);\n color: var(--rly-color-blocked-ink);\n }\n .caution {\n background: var(--rly-color-held-tint);\n color: var(--rly-color-held-ink);\n }\n .progress {\n background: var(--rly-color-deploying-tint);\n color: var(--rly-color-deploying-ink);\n }\n .rail {\n align-self: stretch;\n background: currentcolor;\n border-radius: var(--rly-radius-round);\n }\n .icon {\n display: inline-flex;\n padding-block-start: var(--rly-space-2);\n }\n .content {\n color: var(--rly-color-text-1);\n display: grid;\n gap: var(--rly-space-8);\n min-inline-size: var(--rly-space-0);\n }\n\n .title {\n color: var(--rly-color-text-2);\n font: var(--rly-type-card-title-weight) var(--rly-type-card-title-size) / var(--rly-type-card-title-line-height)\n var(--rly-type-card-title-font);\n letter-spacing: var(--rly-type-card-title-tracking);\n margin: var(--rly-space-0);\n overflow-wrap: anywhere;\n }\n\n .positive .title {\n color: var(--rly-color-success-ink);\n }\n .critical .title {\n color: var(--rly-color-blocked-ink);\n }\n .caution .title {\n color: var(--rly-color-held-ink);\n }\n .progress .title {\n color: var(--rly-color-deploying-ink);\n }\n\n .description {\n color: var(--rly-color-text-2);\n font: var(--rly-type-body-weight) var(--rly-type-body-size) / var(--rly-type-body-line-height)\n var(--rly-type-body-font);\n overflow-wrap: anywhere;\n }\n .description > :first-child {\n margin-block-start: var(--rly-space-0);\n }\n .description > :last-child {\n margin-block-end: var(--rly-space-0);\n }\n .action {\n align-items: center;\n display: flex;\n flex-wrap: wrap;\n gap: var(--rly-space-8);\n padding-block-start: var(--rly-space-8);\n }\n}\n","import type { ComponentPropsWithRef, ReactElement, ReactNode } from \"react\"\nimport { Icon, type RlyIconName } from \"../foundations/Icon.js\"\nimport { classNames, cssClass, defineVariants, requireText } from \"../internal/component.js\"\nimport styles from \"./StatePanel.module.css\"\n\nconst style = (name: string): string => cssClass(styles, name)\n\nexport const RLY_STATE_PANEL_VARIANTS = defineVariants({\n tone: {\n neutral: {\n className: style(\"neutral\"),\n purpose: \"Neutral explanatory state\",\n tokens: [\"color-text-2\", \"color-surface-2\"]\n },\n positive: {\n className: style(\"positive\"),\n purpose: \"Positive outcome\",\n tokens: [\"color-success-ink\", \"color-success-tint\"]\n },\n critical: {\n className: style(\"critical\"),\n purpose: \"Critical outcome requiring attention\",\n tokens: [\"color-blocked-ink\", \"color-blocked-tint\"]\n },\n caution: {\n className: style(\"caution\"),\n purpose: \"Held outcome requiring review\",\n tokens: [\"color-held-ink\", \"color-held-tint\"]\n },\n progress: {\n className: style(\"progress\"),\n purpose: \"Work currently in progress\",\n tokens: [\"color-deploying-ink\", \"color-deploying-tint\"]\n }\n }\n})\n\nexport const RLY_STATE_PANEL_DEFAULT_VARIANTS = defineVariants({ tone: \"neutral\" })\nexport type RlyStatePanelTone = keyof typeof RLY_STATE_PANEL_VARIANTS.tone\nexport type RlyStatePanelAnnouncement = \"off\" | \"polite\" | \"assertive\"\n\nconst toneIcons: Readonly<Record<RlyStatePanelTone, RlyIconName>> = {\n neutral: \"minus\",\n positive: \"check\",\n critical: \"alert\",\n caution: \"clock\",\n progress: \"loader\"\n}\n\nexport type StatePanelProps = Omit<ComponentPropsWithRef<\"section\">, \"aria-live\" | \"children\" | \"title\"> & {\n readonly action?: ReactNode\n readonly announce?: RlyStatePanelAnnouncement\n readonly description?: ReactNode\n readonly icon?: RlyIconName\n readonly title: string\n readonly tone?: RlyStatePanelTone\n}\n\n/** Explain an outcome with redundant word, icon, rail, ink, and tint cues. */\nexport const StatePanel = ({\n action,\n announce = \"off\",\n className,\n description,\n icon,\n title,\n tone = \"neutral\",\n ...props\n}: StatePanelProps): ReactElement => {\n const role = announce === \"assertive\" ? \"alert\" : announce === \"polite\" ? \"status\" : undefined\n\n return (\n <section\n {...props}\n aria-live={announce === \"off\" ? undefined : announce}\n className={classNames(style(\"root\"), RLY_STATE_PANEL_VARIANTS.tone[tone].className, className)}\n role={role}\n >\n <span aria-hidden=\"true\" className={style(\"rail\")} />\n <span aria-hidden=\"true\" className={style(\"icon\")}>\n <Icon decorative name={icon ?? toneIcons[tone]} />\n </span>\n <div className={style(\"content\")}>\n <strong className={style(\"title\")}>{requireText(title, \"StatePanel title\")}</strong>\n {description === undefined ? null : <div className={style(\"description\")}>{description}</div>}\n {action === undefined ? null : <div className={style(\"action\")}>{action}</div>}\n </div>\n </section>\n )\n}\n","@layer rly.components {\n .layer {\n inset: var(--rly-space-0);\n isolation: isolate;\n pointer-events: none;\n position: fixed;\n z-index: 100;\n }\n\n .overlay {\n background: var(--rly-color-canvas);\n inset: var(--rly-space-0);\n opacity: 0.78;\n pointer-events: auto;\n position: fixed;\n z-index: 0;\n }\n\n .content {\n background: var(--rly-color-surface-1);\n border: 1px solid var(--rly-color-border-1);\n border-radius: var(--rly-radius-overlay);\n box-sizing: border-box;\n color: var(--rly-color-text-1);\n display: grid;\n gap: var(--rly-space-24);\n inset-block-start: 50%;\n inset-inline-start: 50%;\n max-block-size: calc(100dvh - var(--rly-space-32));\n max-inline-size: calc(100vw - var(--rly-space-32));\n overflow: auto;\n overscroll-behavior: contain;\n padding: var(--rly-space-32);\n pointer-events: auto;\n position: fixed;\n transform: translate(-50%, -50%);\n z-index: 1;\n }\n\n .defaultSize {\n inline-size: 32rem;\n }\n .wide {\n inline-size: 48rem;\n }\n\n .header {\n display: grid;\n gap: var(--rly-space-8);\n min-inline-size: var(--rly-space-0);\n }\n\n .title {\n font: var(--rly-type-section-title-weight) var(--rly-type-section-title-size) /\n var(--rly-type-section-title-line-height) var(--rly-type-section-title-font);\n letter-spacing: var(--rly-type-section-title-tracking);\n margin: var(--rly-space-0);\n overflow-wrap: anywhere;\n text-wrap: balance;\n }\n\n .description {\n color: var(--rly-color-text-2);\n font: var(--rly-type-body-large-weight) var(--rly-type-body-large-size) / var(--rly-type-body-large-line-height)\n var(--rly-type-body-large-font);\n margin: var(--rly-space-0);\n overflow-wrap: anywhere;\n text-wrap: pretty;\n }\n\n .body {\n min-inline-size: var(--rly-space-0);\n overflow-wrap: anywhere;\n }\n\n .overlay[data-state=\"open\"] {\n animation: dialog-fade-in var(--rly-motion-standard-duration) var(--rly-motion-standard-easing);\n }\n .overlay[data-state=\"closed\"] {\n animation: dialog-fade-out var(--rly-motion-fast-duration) var(--rly-motion-fast-easing);\n }\n .content[data-state=\"open\"] {\n animation: dialog-enter var(--rly-motion-standard-duration) var(--rly-motion-standard-easing);\n }\n .content[data-state=\"closed\"] {\n animation: dialog-exit var(--rly-motion-fast-duration) var(--rly-motion-fast-easing);\n }\n\n .layer[data-rly-dialog-entry-motion=\"external\"] .overlay[data-state=\"open\"],\n .layer[data-rly-dialog-entry-motion=\"external\"] .content[data-state=\"open\"] {\n animation: none;\n }\n\n @keyframes dialog-fade-in {\n from {\n opacity: 0;\n }\n }\n @keyframes dialog-fade-out {\n to {\n opacity: 0;\n }\n }\n @keyframes dialog-enter {\n from {\n opacity: 0;\n transform: translate(-50%, calc(-50% + var(--rly-space-8)));\n }\n }\n @keyframes dialog-exit {\n to {\n opacity: 0;\n transform: translate(-50%, calc(-50% + var(--rly-space-8)));\n }\n }\n\n @media (max-width: 25rem) {\n .content {\n block-size: 100dvh;\n border: var(--rly-space-0);\n border-radius: var(--rly-space-0);\n inset: var(--rly-space-0);\n inline-size: 100%;\n max-block-size: none;\n max-inline-size: none;\n padding: var(--rly-space-20);\n transform: none;\n }\n\n .content[data-state=\"open\"] {\n animation-name: dialog-compact-in;\n }\n .content[data-state=\"closed\"] {\n animation-name: dialog-compact-out;\n }\n }\n\n @keyframes dialog-compact-in {\n from {\n opacity: 0;\n }\n }\n @keyframes dialog-compact-out {\n to {\n opacity: 0;\n }\n }\n}\n","import {\n type ComponentPropsWithRef,\n createContext,\n type ReactElement,\n type ReactNode,\n type Ref,\n type RefObject,\n useContext,\n useLayoutEffect,\n useRef,\n useState\n} from \"react\"\nimport { Dialog as RadixDialog } from \"radix-ui\"\nimport { PortalBoundary } from \"../foundations/PortalProvider.js\"\nimport { classNames, cssClass, defineVariants, requireText } from \"../internal/component.js\"\nimport {\n invalidateModalFocusRestore,\n isHTMLElement,\n ModalNestingBoundary,\n restoreModalFocusAfterCleanup,\n useModalContentRegistration,\n useModalEntryMotion,\n useModalIsolation,\n useParentModalReady\n} from \"../internal/modal.js\"\nimport { Button, type ButtonProps } from \"./Button.js\"\nimport styles from \"./Dialog.module.css\"\n\nconst style = (name: string): string => cssClass(styles, name)\n\ninterface DialogState {\n readonly open: boolean\n readonly requestOpenChange: (open: boolean) => void\n readonly restoreTargetRef: RefObject<HTMLElement | null>\n readonly triggerRef: RefObject<HTMLButtonElement | null>\n}\n\nconst DialogStateContext = createContext<DialogState | null>(null)\n\nconst useDialogState = (): DialogState => {\n const state = useContext(DialogStateContext)\n if (state === null) throw new Error(\"Dialog compound components must be nested inside Dialog\")\n return state\n}\n\nconst assignRef = <Element,>(ref: Ref<Element> | undefined, value: Element | null): void => {\n if (typeof ref === \"function\") ref(value)\n else if (ref !== null && ref !== undefined) ref.current = value\n}\n\nconst getActiveElement = (): HTMLElement | null =>\n typeof document === \"undefined\" || !isHTMLElement(document.activeElement) ? null : document.activeElement\n\n/** Semantic size metadata for the dialog surface. */\nexport const RLY_DIALOG_VARIANTS = defineVariants({\n size: {\n default: {\n className: style(\"defaultSize\"),\n purpose: \"Focused decision or short form\",\n tokens: [\"radius-overlay\", \"space-32\"]\n },\n wide: {\n className: style(\"wide\"),\n purpose: \"Detailed comparison or multi-section form\",\n tokens: [\"radius-overlay\", \"space-64\"]\n }\n }\n})\n\n/** Default dialog size used when no size is selected. */\nexport const RLY_DIALOG_DEFAULT_VARIANTS = defineVariants({ size: \"default\" })\n/** Available dialog surface sizes. */\nexport type RlyDialogSize = keyof typeof RLY_DIALOG_VARIANTS.size\n\ntype DialogBaseProps = { readonly children: ReactNode }\ntype ControlledDialogProps = DialogBaseProps & {\n readonly defaultOpen?: never\n readonly onOpenChange: (open: boolean) => void\n readonly open: boolean\n}\ntype DefaultDialogProps = DialogBaseProps & {\n readonly defaultOpen?: boolean\n readonly onOpenChange?: (open: boolean) => void\n readonly open?: never\n}\n/** Controlled-first or locally owned state for a dialog tree. */\nexport type DialogRootProps = ControlledDialogProps | DefaultDialogProps\n\n/** Props for the visible rly button that opens a dialog. */\nexport type DialogTriggerProps = ButtonProps\n/** Props for a visible rly button that closes a dialog. */\nexport type DialogCloseProps = ButtonProps\n\n/** Accessible content, naming, focus, and sizing for a modal dialog surface. */\nexport type DialogContentProps = Omit<\n ComponentPropsWithRef<\"div\">,\n \"aria-describedby\" | \"aria-label\" | \"aria-labelledby\" | \"children\" | \"title\"\n> & {\n readonly children: ReactNode\n readonly description?: string\n /**\n * Defaults to intrinsic and is sampled when the dialog opens. While open, changes apply to the next cycle.\n * External suppresses surface and overlay entry only; exit stays intrinsic and shared reduced-motion rules apply.\n */\n readonly entryMotion?: \"external\" | \"intrinsic\"\n readonly initialFocusRef?: RefObject<HTMLElement | null>\n readonly size?: RlyDialogSize\n readonly title: string\n}\n\nconst DialogLayer = ({\n children,\n entryMotion\n}: {\n readonly children: ReactNode\n readonly entryMotion: \"external\" | \"intrinsic\"\n}): ReactElement => {\n const state = useDialogState()\n const ref = useRef<HTMLDivElement>(null)\n useModalContentRegistration()\n useModalIsolation(ref, state.open)\n return (\n <div\n className={style(\"layer\")}\n data-rly-dialog-entry-motion={entryMotion}\n data-rly-dialog-layer=\"\"\n data-rly-modal-layer=\"\"\n ref={ref}\n >\n {children}\n </div>\n )\n}\n\n/** Own controlled or reusable default dialog state without exposing Radix contracts. */\nconst DialogRoot = ({ children, defaultOpen = false, onOpenChange, open }: DialogRootProps): ReactElement => {\n const [defaultState, setDefaultState] = useState(defaultOpen)\n const isParentModalReady = useParentModalReady()\n const resolvedOpen = (open ?? defaultState) && isParentModalReady\n const previousOpenRef = useRef(resolvedOpen)\n const triggerRef = useRef<HTMLButtonElement>(null)\n const restoreTargetRef = useRef<HTMLElement | null>(resolvedOpen ? getActiveElement() : null)\n if (resolvedOpen && !previousOpenRef.current) {\n restoreTargetRef.current = triggerRef.current ?? getActiveElement()\n }\n const requestOpenChange = (nextOpen: boolean): void => {\n if (nextOpen) restoreTargetRef.current = triggerRef.current ?? getActiveElement()\n if (open === undefined) setDefaultState(nextOpen)\n onOpenChange?.(nextOpen)\n }\n\n useLayoutEffect(() => {\n if (previousOpenRef.current === resolvedOpen) return\n previousOpenRef.current = resolvedOpen\n if (resolvedOpen) invalidateModalFocusRestore()\n else restoreModalFocusAfterCleanup(restoreTargetRef.current)\n }, [resolvedOpen])\n\n return (\n <ModalNestingBoundary>\n <DialogStateContext.Provider value={{ open: resolvedOpen, requestOpenChange, restoreTargetRef, triggerRef }}>\n <RadixDialog.Root modal onOpenChange={requestOpenChange} open={resolvedOpen}>\n {children}\n </RadixDialog.Root>\n </DialogStateContext.Provider>\n </ModalNestingBoundary>\n )\n}\n\n/** Render the explicit action that opens a dialog using rly Button semantics. */\nconst DialogTrigger = ({ ref, ...props }: DialogTriggerProps): ReactElement => {\n const state = useDialogState()\n return (\n <RadixDialog.Trigger asChild>\n <Button\n {...props}\n ref={(element) => {\n state.triggerRef.current = element\n assignRef(ref, element)\n }}\n />\n </RadixDialog.Trigger>\n )\n}\n\n/** Render the explicit action that closes the current dialog. */\nconst DialogClose = (props: DialogCloseProps): ReactElement => (\n <RadixDialog.Close asChild>\n <Button {...props} />\n </RadixDialog.Close>\n)\n\n/** Render a named modal surface in the application-controlled portal boundary. */\nconst DialogContent = ({\n children,\n className,\n description,\n entryMotion = \"intrinsic\",\n initialFocusRef,\n size = \"default\",\n title,\n ...props\n}: DialogContentProps): ReactElement => {\n const state = useDialogState()\n const resolvedEntryMotion = useModalEntryMotion(state.open, entryMotion)\n const visibleTitle = requireText(title, \"Dialog title\")\n const visibleDescription = description === undefined ? undefined : requireText(description, \"Dialog description\")\n\n return (\n <PortalBoundary>\n {(container) => (\n <RadixDialog.Portal container={container}>\n <DialogLayer entryMotion={resolvedEntryMotion}>\n <RadixDialog.Overlay\n className={style(\"overlay\")}\n data-rly-dialog-overlay=\"\"\n onPointerDown={() => {\n state.requestOpenChange(false)\n }}\n />\n <RadixDialog.Content\n {...props}\n {...(visibleDescription === undefined ? { \"aria-describedby\": undefined } : {})}\n className={classNames(style(\"content\"), RLY_DIALOG_VARIANTS.size[size].className, className)}\n onCloseAutoFocus={(event) => {\n event.preventDefault()\n }}\n onOpenAutoFocus={(event) => {\n const activeElement = getActiveElement()\n if (state.triggerRef.current === null && activeElement !== null) {\n state.restoreTargetRef.current = activeElement\n }\n const target = initialFocusRef?.current\n if (target !== null && target !== undefined) {\n event.preventDefault()\n target.focus()\n }\n }}\n >\n <header className={style(\"header\")}>\n <RadixDialog.Title className={style(\"title\")}>{visibleTitle}</RadixDialog.Title>\n {visibleDescription === undefined ? null : (\n <RadixDialog.Description className={style(\"description\")}>\n {visibleDescription}\n </RadixDialog.Description>\n )}\n </header>\n <div className={style(\"body\")}>{children}</div>\n </RadixDialog.Content>\n </DialogLayer>\n </RadixDialog.Portal>\n )}\n </PortalBoundary>\n )\n}\n\n/** Owned compound dialog API with no Radix types or slots in its public contract. */\nexport const Dialog = Object.freeze({\n Close: DialogClose,\n Content: DialogContent,\n Root: DialogRoot,\n Trigger: DialogTrigger\n})\n"],"mappings":";;;;;;AA0BA,IAAM,oBAAe,IAAI,QAAkC,GACrD,IAAsB,EAAwC,IAAI,GACpE,IAA4B,GAMnB,KAAuB,GAAe,MAAkD;CACnG,IAAM,IAAoB,EAAO;EAAE;EAAM,OAAO;CAAU,CAAC,GACrD,IAAW,KAAQ,CAAC,EAAkB,QAAQ,OAAO,IAAY,EAAkB,QAAQ;CAKjG,OAJA,QAAsB;EACpB,AAAK,IACK,EAAkB,QAAQ,SAAM,EAAkB,UAAU;GAAE,MAAM;GAAM,OAAO;EAAU,KAD1F,EAAkB,UAAU;GAAE,MAAM;GAAO,OAAO;EAAU;CAEzE,GAAG,CAAC,GAAM,CAAS,CAAC,GACb;AACT,GAGa,KAAiB,MAC5B,MAAY,QAAQ,WAAW,KAAW,OAAO,EAAQ,SAAU,WAGxD,KAAwB,EAAE,kBAAwD;CAC7F,IAAM,CAAC,GAAkB,KAAqB,EAAS,EAAK;CAC5D,OAAO,EAAc,EAAoB,UAAU,EAAE,OAAO;EAAE;EAAkB;CAAkB,EAAE,GAAG,CAAQ;AACjH,GAGa,UAAqC,EAAW,CAAmB,CAAC,EAAE,oBAAoB,IAG1F,UAA0C;CACrD,IAAM,IAAoB,EAAW,CAAmB,CAAC,EAAE;CAC3D,SACE,IAAoB,EAAI,SACX,IAAoB,EAAK,IACrC,CAAC,CAAiB,CAAC;AACxB,GAEM,KAAe,MAA+B;CAClD,IAAM,IAAS,EAAa,IAAI,CAAO;CACvC,IAAI,MAAW,KAAA,GAAW;EAExB,AADA,EAAa,IAAI,GAAS;GAAE,OAAO;GAAG,UAAU,EAAQ;EAA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