@knpkv/rly 0.8.0 → 0.10.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 (91) hide show
  1. package/README.md +49 -3
  2. package/dist/{Dialog-_t9OodCK.js → Dialog-B9Ub_gMT.js} +79 -62
  3. package/dist/Dialog-B9Ub_gMT.js.map +1 -0
  4. package/dist/components.css +2 -2
  5. package/dist/diff/bounded/index.js +317 -303
  6. package/dist/diff/bounded/index.js.map +1 -1
  7. package/dist/diff/index.js +2436 -2433
  8. package/dist/diff/index.js.map +1 -1
  9. package/dist/diff/patch/index.js +188 -186
  10. package/dist/diff/patch/index.js.map +1 -1
  11. package/dist/diff/workbench/index.js +1 -1
  12. package/dist/dts/diff/DiffCodeView.d.ts.map +1 -1
  13. package/dist/dts/diff/DiffFileTree.d.ts.map +1 -1
  14. package/dist/dts/diff/DiffFinding.d.ts.map +1 -1
  15. package/dist/dts/diff/DiffHeader.d.ts.map +1 -1
  16. package/dist/dts/diff/bounded/BoundedDiffCodeView.d.ts.map +1 -1
  17. package/dist/dts/diff/patch/PatchDiffView.d.ts.map +1 -1
  18. package/dist/dts/internal/useNarrowerThan.d.ts +10 -0
  19. package/dist/dts/internal/useNarrowerThan.d.ts.map +1 -0
  20. package/dist/dts/patterns/AgentThread.d.ts.map +1 -1
  21. package/dist/dts/patterns/DecisionBar.d.ts +68 -0
  22. package/dist/dts/patterns/DecisionBar.d.ts.map +1 -0
  23. package/dist/dts/patterns/FreshnessStamp.d.ts.map +1 -1
  24. package/dist/dts/patterns/Hero.d.ts +69 -0
  25. package/dist/dts/patterns/Hero.d.ts.map +1 -0
  26. package/dist/dts/patterns/Region.d.ts +56 -0
  27. package/dist/dts/patterns/Region.d.ts.map +1 -0
  28. package/dist/dts/patterns/ReleaseRelay.d.ts.map +1 -1
  29. package/dist/dts/patterns/StageRail.d.ts +11 -1
  30. package/dist/dts/patterns/StageRail.d.ts.map +1 -1
  31. package/dist/dts/patterns/TimelineRow.d.ts +25 -0
  32. package/dist/dts/patterns/TimelineRow.d.ts.map +1 -1
  33. package/dist/dts/patterns/Verdict.d.ts +1 -1
  34. package/dist/dts/patterns/Verdict.d.ts.map +1 -1
  35. package/dist/dts/patterns/index.d.ts +8 -2
  36. package/dist/dts/patterns/index.d.ts.map +1 -1
  37. package/dist/dts/primitives/Button.d.ts +9 -4
  38. package/dist/dts/primitives/Button.d.ts.map +1 -1
  39. package/dist/dts/primitives/ChartLegend.d.ts +23 -0
  40. package/dist/dts/primitives/ChartLegend.d.ts.map +1 -0
  41. package/dist/dts/primitives/Field.d.ts +8 -3
  42. package/dist/dts/primitives/Field.d.ts.map +1 -1
  43. package/dist/dts/primitives/IconButton.d.ts +9 -4
  44. package/dist/dts/primitives/IconButton.d.ts.map +1 -1
  45. package/dist/dts/primitives/LimitTrack.d.ts +62 -0
  46. package/dist/dts/primitives/LimitTrack.d.ts.map +1 -0
  47. package/dist/dts/primitives/Notice.d.ts +5 -5
  48. package/dist/dts/primitives/Select.d.ts +8 -3
  49. package/dist/dts/primitives/Select.d.ts.map +1 -1
  50. package/dist/dts/primitives/StateLabel.d.ts +6 -6
  51. package/dist/dts/primitives/StateLabel.d.ts.map +1 -1
  52. package/dist/dts/primitives/StatePanel.d.ts +7 -6
  53. package/dist/dts/primitives/StatePanel.d.ts.map +1 -1
  54. package/dist/dts/primitives/ThemeSelect.d.ts +3 -2
  55. package/dist/dts/primitives/ThemeSelect.d.ts.map +1 -1
  56. package/dist/dts/primitives/ToggleGroup.d.ts +9 -4
  57. package/dist/dts/primitives/ToggleGroup.d.ts.map +1 -1
  58. package/dist/dts/primitives/TrackKey.d.ts +20 -0
  59. package/dist/dts/primitives/TrackKey.d.ts.map +1 -0
  60. package/dist/dts/primitives/index.d.ts +6 -0
  61. package/dist/dts/primitives/index.d.ts.map +1 -1
  62. package/dist/dts/tokens/control.d.ts +27 -0
  63. package/dist/dts/tokens/control.d.ts.map +1 -0
  64. package/dist/dts/tokens/index.d.ts +2 -2
  65. package/dist/dts/tokens/index.d.ts.map +1 -1
  66. package/dist/dts/tokens/semantic-tokens.d.ts +3 -1
  67. package/dist/dts/tokens/semantic-tokens.d.ts.map +1 -1
  68. package/dist/generated-tokens.css +55 -6
  69. package/dist/index.js +5 -5
  70. package/dist/patterns/index.js +2 -2
  71. package/dist/{patterns-LJ8Y44f2.js → patterns-DTsU3pFo.js} +1251 -954
  72. package/dist/patterns-DTsU3pFo.js.map +1 -0
  73. package/dist/primitives/index.js +3 -3
  74. package/dist/primitives-CgvvYKjR.js +589 -0
  75. package/dist/primitives-CgvvYKjR.js.map +1 -0
  76. package/dist/tokens/index.js +2 -2
  77. package/dist/{tokens-CjK9bxo7.js → tokens-B075JP3Z.js} +8 -3
  78. package/dist/tokens-B075JP3Z.js.map +1 -0
  79. package/dist/useNarrowerThan-B1PM32sm.js +21 -0
  80. package/dist/useNarrowerThan-B1PM32sm.js.map +1 -0
  81. package/dist/{workbench-4C25n_BY.js → workbench-CHCnYW3G.js} +107 -131
  82. package/dist/workbench-CHCnYW3G.js.map +1 -0
  83. package/package.json +5 -3
  84. package/registry/components.json +707 -25
  85. package/registry/search.json +172 -2
  86. package/dist/Dialog-_t9OodCK.js.map +0 -1
  87. package/dist/patterns-LJ8Y44f2.js.map +0 -1
  88. package/dist/primitives-CjQX0eVM.js +0 -453
  89. package/dist/primitives-CjQX0eVM.js.map +0 -1
  90. package/dist/tokens-CjK9bxo7.js.map +0 -1
  91. package/dist/workbench-4C25n_BY.js.map +0 -1
@@ -168,6 +168,7 @@
168
168
  "button",
169
169
  "compact",
170
170
  "default",
171
+ "dense",
171
172
  "disabled",
172
173
  "loading",
173
174
  "primary",
@@ -179,6 +180,28 @@
179
180
  "variant"
180
181
  ]
181
182
  },
183
+ {
184
+ "capabilities": [
185
+ "explain",
186
+ "present"
187
+ ],
188
+ "category": "primitive",
189
+ "importPath": "@knpkv/rly/primitives",
190
+ "name": "ChartLegend",
191
+ "states": [
192
+ "default",
193
+ "other",
194
+ "series"
195
+ ],
196
+ "terms": [
197
+ "chartlegend",
198
+ "explain",
199
+ "other",
200
+ "present",
201
+ "primitive",
202
+ "series"
203
+ ]
204
+ },
182
205
  {
183
206
  "capabilities": [
184
207
  "group",
@@ -203,6 +226,34 @@
203
226
  "size"
204
227
  ]
205
228
  },
229
+ {
230
+ "capabilities": [
231
+ "decide",
232
+ "present"
233
+ ],
234
+ "category": "pattern",
235
+ "importPath": "@knpkv/rly/patterns",
236
+ "name": "DecisionBar",
237
+ "states": [
238
+ "default",
239
+ "off",
240
+ "ready",
241
+ "sending",
242
+ "sticky"
243
+ ],
244
+ "terms": [
245
+ "decide",
246
+ "decisionbar",
247
+ "inline",
248
+ "off",
249
+ "pattern",
250
+ "placement",
251
+ "present",
252
+ "ready",
253
+ "sending",
254
+ "sticky"
255
+ ]
256
+ },
206
257
  {
207
258
  "capabilities": [
208
259
  "confirm",
@@ -523,6 +574,7 @@
523
574
  "terms": [
524
575
  "compact",
525
576
  "default",
577
+ "dense",
526
578
  "field",
527
579
  "input",
528
580
  "primitive",
@@ -606,6 +658,34 @@
606
658
  "review"
607
659
  ]
608
660
  },
661
+ {
662
+ "capabilities": [
663
+ "present",
664
+ "status"
665
+ ],
666
+ "category": "pattern",
667
+ "importPath": "@knpkv/rly/patterns",
668
+ "name": "Hero",
669
+ "states": [
670
+ "default",
671
+ "display",
672
+ "heading",
673
+ "line"
674
+ ],
675
+ "terms": [
676
+ "blocked",
677
+ "display",
678
+ "heading",
679
+ "held",
680
+ "hero",
681
+ "line",
682
+ "pattern",
683
+ "present",
684
+ "size",
685
+ "status",
686
+ "tone"
687
+ ]
688
+ },
609
689
  {
610
690
  "capabilities": [
611
691
  "symbol"
@@ -651,6 +731,7 @@
651
731
  "act",
652
732
  "compact",
653
733
  "default",
734
+ "dense",
654
735
  "disabled",
655
736
  "iconbutton",
656
737
  "loading",
@@ -663,6 +744,37 @@
663
744
  "variant"
664
745
  ]
665
746
  },
747
+ {
748
+ "capabilities": [
749
+ "measure",
750
+ "present"
751
+ ],
752
+ "category": "primitive",
753
+ "importPath": "@knpkv/rly/primitives",
754
+ "name": "LimitTrack",
755
+ "states": [
756
+ "default",
757
+ "full",
758
+ "near",
759
+ "projected",
760
+ "stale",
761
+ "unknown"
762
+ ],
763
+ "terms": [
764
+ "default",
765
+ "full",
766
+ "limittrack",
767
+ "measure",
768
+ "near",
769
+ "present",
770
+ "primitive",
771
+ "projected",
772
+ "size",
773
+ "slim",
774
+ "stale",
775
+ "unknown"
776
+ ]
777
+ },
666
778
  {
667
779
  "capabilities": [
668
780
  "navigate"
@@ -774,6 +886,28 @@
774
886
  "portalprovider"
775
887
  ]
776
888
  },
889
+ {
890
+ "capabilities": [
891
+ "compose",
892
+ "present"
893
+ ],
894
+ "category": "pattern",
895
+ "importPath": "@knpkv/rly/patterns",
896
+ "name": "Region",
897
+ "states": [
898
+ "default",
899
+ "tray"
900
+ ],
901
+ "terms": [
902
+ "compose",
903
+ "default",
904
+ "pattern",
905
+ "present",
906
+ "region",
907
+ "tone",
908
+ "tray"
909
+ ]
910
+ },
777
911
  {
778
912
  "capabilities": [
779
913
  "relationship",
@@ -957,6 +1091,7 @@
957
1091
  "terms": [
958
1092
  "compact",
959
1093
  "default",
1094
+ "dense",
960
1095
  "disabled",
961
1096
  "primitive",
962
1097
  "select",
@@ -1076,7 +1211,8 @@
1076
1211
  "building",
1077
1212
  "compact",
1078
1213
  "complete",
1079
- "default"
1214
+ "default",
1215
+ "words"
1080
1216
  ],
1081
1217
  "terms": [
1082
1218
  "blocked",
@@ -1088,7 +1224,8 @@
1088
1224
  "pattern",
1089
1225
  "progress",
1090
1226
  "size",
1091
- "stagerail"
1227
+ "stagerail",
1228
+ "words"
1092
1229
  ]
1093
1230
  },
1094
1231
  {
@@ -1293,10 +1430,14 @@
1293
1430
  "visible"
1294
1431
  ],
1295
1432
  "terms": [
1433
+ "compact",
1434
+ "default",
1435
+ "dense",
1296
1436
  "hidden",
1297
1437
  "labelVisibility",
1298
1438
  "preference",
1299
1439
  "primitive",
1440
+ "size",
1300
1441
  "theme",
1301
1442
  "themeselect",
1302
1443
  "visible"
@@ -1314,6 +1455,7 @@
1314
1455
  "agent",
1315
1456
  "default",
1316
1457
  "human",
1458
+ "provenance",
1317
1459
  "service",
1318
1460
  "system"
1319
1461
  ],
@@ -1322,6 +1464,7 @@
1322
1464
  "audit",
1323
1465
  "human",
1324
1466
  "pattern",
1467
+ "provenance",
1325
1468
  "service",
1326
1469
  "system",
1327
1470
  "timeline",
@@ -1344,12 +1487,39 @@
1344
1487
  "checked",
1345
1488
  "compact",
1346
1489
  "default",
1490
+ "dense",
1347
1491
  "primitive",
1348
1492
  "select",
1349
1493
  "size",
1350
1494
  "togglegroup"
1351
1495
  ]
1352
1496
  },
1497
+ {
1498
+ "capabilities": [
1499
+ "explain",
1500
+ "present"
1501
+ ],
1502
+ "category": "primitive",
1503
+ "importPath": "@knpkv/rly/primitives",
1504
+ "name": "TrackKey",
1505
+ "states": [
1506
+ "default",
1507
+ "near",
1508
+ "projected",
1509
+ "stale",
1510
+ "unknown"
1511
+ ],
1512
+ "terms": [
1513
+ "explain",
1514
+ "near",
1515
+ "present",
1516
+ "primitive",
1517
+ "projected",
1518
+ "stale",
1519
+ "trackkey",
1520
+ "unknown"
1521
+ ]
1522
+ },
1353
1523
  {
1354
1524
  "capabilities": [
1355
1525
  "release",
@@ -1 +0,0 @@
1
- {"version":3,"file":"Dialog-_t9OodCK.js","names":["Predicate.isBoolean","Predicate.isObjectOrArray","layer","trigger","overlay","content","header","title","description","body","style","styles","Predicate.isString","RadixDialog","Predicate.isFunction","root","primary","secondary","quiet","compact","defaultSize","principal","content","label","style","styles","Predicate.isNumber","Predicate.isString","root","neutral","positive","critical","caution","progress","compact","defaultSize","style","styles","toneIcons","root","defaultSize","circle","style","styles","Avatar","RadixAvatar","root","compact","defaultSize","style","styles","compact","defaultSize","content","style","styles","RadixSelect","Select","root","style","styles","root","content","title","description","style","styles","description","defaultSize","style","styles","Predicate.isString","Predicate.isFunction","Predicate.isObjectOrArray","styles","Predicate.isFunction","RadixDialog","Dialog","Icon","isBoolean","isObjectOrArray","isString","cssClass","isFunction","defineVariants","isNumber","classNames","inertRecords","scrollLockRecords","ModalNestingContext","createContext","focusTransitionGeneration","useModalEntryMotion","committedCycleRef","useRef","requested","resolved","open","useLayoutEffect","hasHTMLElementInertContract","element","isHTMLElement","ModalNestingBoundary","isContentMounted","setContentMounted","useState","createElement","children","useParentModalReady","useContext","useParentModalPresent","useModalContentRegistration","retainInert","record","releaseInert","useModalIsolation","isOpen","layer","layerRef","retained","observedParents","MutationObserverConstructor","observer","synchronizeIsolation","current","parent","hasReachedCurrent","sibling","parentElement","host","retainScrollLock","ownerDocument","root","releaseScrollLock","useModalScrollLock","invalidateModalFocusRestore","restoreModalFocusAfterCleanup","generation","target","Sheet_module_default","style$9","name","RLY_SHEET_VARIANTS","RLY_SHEET_DEFAULT_VARIANTS","SheetStateContext","useSheetState","state","SheetLayer","entryMotion","requireVisibleAction","value","requireText","component","Sheet","props","className","Dialog","type","resolvedEntryMotion","visibleTitle","title","visibleDescription","description","accessibleCloseLabel","closeLabel","contentRef","setContentRef","useCallback","node","ref","PortalBoundary","side","event","activeElement","initialFocusRef","tabIndex","componentProps","defaultState","setDefaultState","defaultOpen","isParentModalReady","restoreFocusRef","resolvedOpen","previousOpenRef","requestOpenChange","nextOpen","onOpenChange","onClick","Button_module_default","style$8","RLY_BUTTON_VARIANTS","RLY_BUTTON_DEFAULT_VARIANTS","Button","ariaLabel","ariaLabelledBy","loading","variant","size","stretch","disabled","leadingIcon","trailingIcon","StateLabel_module_default","style$7","RLY_STATE_LABEL_VARIANTS","RLY_STATE_LABEL_DEFAULT_VARIANTS","toneIcons$1","StateLabel","tone","icon","label","Avatar_module_default","style$6","RLY_AVATAR_VARIANTS","RLY_AVATAR_DEFAULT_VARIANTS","Avatar$1","accessibleLabel","decorative","visibleFallback","fallback","Avatar","form","src","IconButton_module_default","style$5","RLY_ICON_BUTTON_VARIANTS","RLY_ICON_BUTTON_DEFAULT_VARIANTS","IconButton","registeredFieldControls","registerFieldControl","isRegisteredFieldControl","Select_module_default","style$4","RLY_SELECT_VARIANTS","RLY_SELECT_DEFAULT_VARIANTS","validateOptions","options","option","values","Select$1","valueControlled","ariaDescribedBy","ariaErrorMessage","ariaInvalid","ariaRequired","visiblePlaceholder","placeholder","selectedValue","defaultValue","selectedOption","selectedLabel","Select","autoComplete","onValueChange","required","Skeleton_module_default","style$3","RLY_SKELETON_VARIANTS","RLY_SKELETON_DEFAULT_VARIANTS","Skeleton","inlineStyle","dimensions","height","width","StatePanel_module_default","style$2","RLY_STATE_PANEL_VARIANTS","RLY_STATE_PANEL_DEFAULT_VARIANTS","toneIcons","StatePanel","role","announce","action","Field_module_default","style$1","semanticControlKeys","concreteControlElements","RLY_FIELD_VARIANTS","RLY_FIELD_DEFAULT_VARIANTS","Field","generatedId","useId","resolvedControlId","controlId","labelId","descriptionId","errorId","error","commonControlProps","id","controlProps","control","controlType","key","Dialog_module_default","style","DialogStateContext","useDialogState","assignRef","getActiveElement","RLY_DIALOG_VARIANTS","RLY_DIALOG_DEFAULT_VARIANTS","DialogLayer","Dialog$1","triggerRef","restoreTargetRef"],"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/IconButton.module.css","../src/primitives/IconButton.tsx","../src/internal/field-control.ts","../src/primitives/Select.module.css","../src/primitives/Select.tsx","../src/primitives/Skeleton.module.css","../src/primitives/Skeleton.tsx","../src/primitives/StatePanel.module.css","../src/primitives/StatePanel.tsx","../src/primitives/Field.module.css","../src/primitives/Field.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\"\nimport * as Predicate from \"./predicates.js\"\n\ninterface InertRecord {\n count: number\n readonly previous: boolean\n}\n\ninterface ScrollLockRecord {\n count: number\n readonly overflow: string\n readonly overscrollBehavior: string\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 scrollLockRecords = new WeakMap<Document, ScrollLockRecord>()\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\nconst hasHTMLElementInertContract = <Value extends object>(element: Value): element is Value & HTMLElement =>\n \"inert\" in element && Predicate.isBoolean(element.inert)\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 && hasHTMLElementInertContract(element)\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/** Reports whether this component belongs to a logical parent modal. */\nexport const useParentModalPresent = (): boolean => useContext(ModalNestingContext) !== null\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 const retained = new Set<HTMLElement>()\n const observedParents = new Set<Node>()\n const MutationObserverConstructor = layer.ownerDocument.defaultView?.MutationObserver\n let observer: MutationObserver | null = null\n\n const synchronizeIsolation = (): void => {\n let current: Element = layer\n while (true) {\n if (current === current.ownerDocument.body) break\n const parent = current.parentNode\n if (parent === null) break\n if (!observedParents.has(parent)) {\n observer?.observe(parent, { childList: true })\n observedParents.add(parent)\n }\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) && !retained.has(sibling)) {\n retainInert(sibling)\n retained.add(sibling)\n }\n }\n const parentElement = current.parentElement\n if (parentElement !== null) {\n current = parentElement\n continue\n }\n if (!(\"host\" in parent)) break\n const host = parent.host\n if (!Predicate.isObjectOrArray(host) || !hasHTMLElementInertContract(host)) break\n current = host\n }\n }\n\n if (MutationObserverConstructor !== undefined) observer = new MutationObserverConstructor(synchronizeIsolation)\n synchronizeIsolation()\n\n return () => {\n observer?.disconnect()\n for (const element of retained) releaseInert(element)\n }\n }, [isOpen, layerRef])\n}\n\nconst retainScrollLock = (ownerDocument: Document): void => {\n const record = scrollLockRecords.get(ownerDocument)\n if (record !== undefined) {\n record.count += 1\n return\n }\n const root = ownerDocument.documentElement\n scrollLockRecords.set(ownerDocument, {\n count: 1,\n overflow: root.style.overflow,\n overscrollBehavior: root.style.overscrollBehavior\n })\n root.style.overflow = \"hidden\"\n root.style.overscrollBehavior = \"none\"\n}\n\nconst releaseScrollLock = (ownerDocument: Document): void => {\n const record = scrollLockRecords.get(ownerDocument)\n if (record === undefined) return\n if (record.count > 1) {\n record.count -= 1\n return\n }\n const root = ownerDocument.documentElement\n root.style.overflow = record.overflow\n root.style.overscrollBehavior = record.overscrollBehavior\n scrollLockRecords.delete(ownerDocument)\n}\n\n/** Shares a reference-counted document scroll lock across custom rly modal surfaces. */\nexport const useModalScrollLock = (layerRef: RefObject<HTMLDivElement | null>, isOpen: boolean): void => {\n useLayoutEffect(() => {\n if (!isOpen) return\n const ownerDocument = layerRef.current?.ownerDocument\n if (ownerDocument === undefined) return\n retainScrollLock(ownerDocument)\n return () => releaseScrollLock(ownerDocument)\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 !== null && target.isConnected === true) 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\"\nimport * as Predicate from \"../internal/predicates.js\"\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 (Predicate.isString(value)) 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 (Predicate.isFunction(ref)) 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\"\nimport * as Predicate from \"../internal/predicates.js\"\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 (!Predicate.isNumber(children) && !Predicate.isString(children)) ||\n (Predicate.isString(children) && 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 = {\n neutral: \"minus\",\n positive: \"check\",\n critical: \"alert\",\n caution: \"clock\",\n progress: \"loader\"\n} satisfies Readonly<Record<RlyStateTone, RlyIconName>>\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 form: {\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\", form: \"circle\" })\nexport type RlyAvatarSize = keyof typeof RLY_AVATAR_VARIANTS.size\nexport type RlyAvatarForm = keyof typeof RLY_AVATAR_VARIANTS.form\ntype AvatarBaseProps = Omit<ComponentPropsWithRef<\"span\">, \"aria-label\" | \"children\"> & {\n readonly fallback: string\n readonly form?: RlyAvatarForm\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 form = \"circle\",\n label,\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.form[form].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 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 padding: var(--rly-space-0);\n place-items: 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 block-size: calc(var(--rly-space-40) + var(--rly-space-4));\n inline-size: calc(var(--rly-space-40) + var(--rly-space-4));\n }\n .defaultSize {\n block-size: var(--rly-space-48);\n inline-size: var(--rly-space-48);\n }\n .principal {\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\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, requireText } from \"../internal/component.js\"\nimport styles from \"./IconButton.module.css\"\n\nconst style = (name: string): string => cssClass(styles, name)\nexport const RLY_ICON_BUTTON_VARIANTS = defineVariants({\n variant: {\n primary: {\n className: style(\"primary\"),\n purpose: \"Principal icon action\",\n tokens: [\"color-action-background\", \"color-action-foreground\"]\n },\n secondary: {\n className: style(\"secondary\"),\n purpose: \"Default icon action\",\n tokens: [\"color-surface-1\", \"color-border-2\"]\n },\n quiet: {\n className: style(\"quiet\"),\n purpose: \"Low-emphasis icon action\",\n tokens: [\"color-text-1\", \"color-surface-2\"]\n }\n },\n size: {\n compact: {\n className: style(\"compact\"),\n purpose: \"Minimum accessible icon target\",\n tokens: [\"space-40\", \"space-4\"]\n },\n default: { className: style(\"defaultSize\"), purpose: \"Standard icon target\", tokens: [\"space-48\"] },\n principal: { className: style(\"principal\"), purpose: \"Prominent icon target\", tokens: [\"space-48\", \"space-8\"] }\n }\n})\nexport const RLY_ICON_BUTTON_DEFAULT_VARIANTS = defineVariants({ variant: \"secondary\", size: \"default\" })\nexport type RlyIconButtonVariant = keyof typeof RLY_ICON_BUTTON_VARIANTS.variant\nexport type RlyIconButtonSize = keyof typeof RLY_ICON_BUTTON_VARIANTS.size\nexport type IconButtonProps = Omit<ComponentPropsWithRef<\"button\">, \"aria-label\" | \"children\"> & {\n readonly icon: RlyIconName\n readonly label: string\n readonly loading?: boolean\n readonly size?: RlyIconButtonSize\n readonly variant?: RlyIconButtonVariant\n}\n\n/** Render an icon-only action whose accessible name is mandatory and owned. */\nexport const IconButton = ({\n className,\n disabled,\n icon,\n label,\n loading = false,\n size = \"default\",\n type,\n variant = \"secondary\",\n ...props\n}: IconButtonProps): ReactElement => (\n <button\n {...props}\n aria-busy={loading ? \"true\" : undefined}\n aria-label={requireText(label, \"IconButton label\")}\n className={classNames(\n style(\"root\"),\n RLY_ICON_BUTTON_VARIANTS.variant[variant].className,\n RLY_ICON_BUTTON_VARIANTS.size[size].className,\n className\n )}\n data-loading={loading ? \"true\" : undefined}\n disabled={disabled || loading}\n type={type ?? \"button\"}\n >\n <Icon decorative name={loading ? \"loader\" : icon} size={size === \"compact\" ? \"small\" : \"default\"} />\n </button>\n)\n","const registeredFieldControls = new WeakSet<object>()\n\n/** Register an owned control that applies Field semantics to its final DOM host. */\nexport const registerFieldControl = <Component extends object>(component: Component): Component => {\n registeredFieldControls.add(component)\n return component\n}\n\n/** Distinguish rly-owned controls from consumer components that may discard DOM semantics. */\nexport const isRegisteredFieldControl = <Component extends object>(component: Component): boolean =>\n registeredFieldControls.has(component)\n","@layer rly.components {\n .trigger {\n align-items: center;\n appearance: none;\n background: var(--rly-color-surface-1);\n border: 1px solid var(--rly-color-border-2);\n border-radius: var(--rly-radius-field);\n box-sizing: border-box;\n color: var(--rly-color-text-1);\n cursor: pointer;\n display: inline-flex;\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 gap: var(--rly-space-12);\n inline-size: 100%;\n justify-content: space-between;\n max-inline-size: 100%;\n min-inline-size: var(--rly-space-0);\n padding: var(--rly-space-8) var(--rly-space-12);\n text-align: start;\n }\n\n .trigger[data-placeholder] {\n color: var(--rly-color-text-2);\n }\n\n .trigger > span:first-child {\n min-inline-size: var(--rly-space-0);\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n }\n\n .trigger[data-state=\"open\"] {\n border-color: var(--rly-color-focus);\n }\n\n .trigger:disabled {\n cursor: not-allowed;\n opacity: 0.58;\n }\n\n .trigger[aria-invalid=\"true\"] {\n border-color: var(--rly-color-blocked-ink);\n }\n\n .compact {\n min-block-size: var(--rly-space-40);\n padding-block: var(--rly-space-6);\n }\n\n .defaultSize {\n min-block-size: var(--rly-space-48);\n }\n\n .triggerIcon {\n display: inline-flex;\n flex: none;\n transition: transform var(--rly-motion-fast-duration) var(--rly-motion-fast-easing);\n }\n\n .trigger[data-state=\"open\"] .triggerIcon {\n transform: rotate(180deg);\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-field);\n box-sizing: border-box;\n color: var(--rly-color-text-1);\n max-block-size: min(20rem, var(--radix-select-content-available-height));\n max-inline-size: min(calc(100vw - var(--rly-space-32)), 32rem);\n min-inline-size: var(--radix-select-trigger-width);\n overflow: hidden;\n transform-origin: var(--radix-select-content-transform-origin);\n z-index: 100;\n }\n\n .viewport {\n box-sizing: border-box;\n padding: var(--rly-space-4);\n }\n\n .item {\n align-items: center;\n border-radius: var(--rly-radius-tag);\n box-sizing: border-box;\n cursor: default;\n display: flex;\n gap: var(--rly-space-8);\n justify-content: space-between;\n min-block-size: var(--rly-space-40);\n min-inline-size: var(--rly-space-0);\n outline: none;\n overflow-wrap: anywhere;\n padding: var(--rly-space-8) var(--rly-space-12);\n user-select: none;\n }\n\n .item[data-highlighted],\n .item[data-state=\"checked\"] {\n background: var(--rly-color-surface-2);\n }\n\n .item[data-disabled] {\n opacity: 0.58;\n }\n\n .itemIndicator {\n display: inline-flex;\n flex: none;\n }\n\n .scrollButton {\n align-items: center;\n color: var(--rly-color-text-2);\n display: flex;\n justify-content: center;\n min-block-size: var(--rly-space-32);\n }\n\n @media (max-width: 30rem) {\n .content {\n inline-size: var(--radix-select-trigger-width);\n max-inline-size: calc(100vw - var(--rly-space-16));\n }\n }\n}\n","import { Select as RadixSelect } from \"radix-ui\"\nimport type { AriaAttributes, ComponentPropsWithRef, ReactElement } from \"react\"\nimport { Icon } from \"../foundations/Icon.js\"\nimport { PortalBoundary } from \"../foundations/PortalProvider.js\"\nimport { classNames, cssClass, defineVariants, requireText } from \"../internal/component.js\"\nimport { registerFieldControl } from \"../internal/field-control.js\"\nimport styles from \"./Select.module.css\"\n\nconst style = (name: string): string => cssClass(styles, name)\n\nexport const RLY_SELECT_VARIANTS = defineVariants({\n size: {\n compact: { className: style(\"compact\"), purpose: \"Dense form rows\", tokens: [\"space-40\", \"type-meta\"] },\n default: {\n className: style(\"defaultSize\"),\n purpose: \"Standard selection control\",\n tokens: [\"space-48\", \"type-body\"]\n }\n }\n})\n\nexport const RLY_SELECT_DEFAULT_VARIANTS = defineVariants({ size: \"default\" })\nexport type RlySelectSize = keyof typeof RLY_SELECT_VARIANTS.size\n\nexport interface RlySelectOption {\n readonly disabled?: boolean\n readonly label: string\n readonly value: string\n}\n\ntype TriggerProps = Pick<\n ComponentPropsWithRef<\"button\">,\n \"className\" | \"id\" | \"onBlur\" | \"onFocus\" | \"onKeyDown\" | \"ref\" | \"tabIndex\"\n>\n\ntype SelectAccessibleName =\n | { readonly \"aria-label\": string; readonly \"aria-labelledby\"?: never }\n | { readonly \"aria-label\"?: never; readonly \"aria-labelledby\": string }\n\ntype SelectValueState =\n | {\n readonly defaultValue?: never\n readonly onValueChange: (value: string) => void\n readonly value: string | undefined\n }\n | {\n readonly defaultValue?: string\n readonly onValueChange?: (value: string) => void\n readonly value?: never\n }\n\ntype SelectOpenState =\n | {\n readonly defaultOpen?: never\n readonly onOpenChange: (open: boolean) => void\n readonly open: boolean\n }\n | {\n readonly defaultOpen?: boolean\n readonly onOpenChange?: (open: boolean) => void\n readonly open?: never\n }\n\ninterface SelectBaseProps extends TriggerProps {\n readonly \"aria-describedby\"?: AriaAttributes[\"aria-describedby\"]\n readonly \"aria-errormessage\"?: AriaAttributes[\"aria-errormessage\"]\n readonly \"aria-invalid\"?: AriaAttributes[\"aria-invalid\"]\n readonly \"aria-required\"?: AriaAttributes[\"aria-required\"]\n readonly autoComplete?: string\n readonly disabled?: boolean\n readonly form?: string\n readonly name?: string\n readonly options: ReadonlyArray<RlySelectOption>\n readonly placeholder?: string\n readonly required?: boolean\n readonly size?: RlySelectSize\n}\n\nexport type SelectProps = SelectBaseProps & SelectAccessibleName & SelectValueState & SelectOpenState\n\nconst validateOptions = (options: ReadonlyArray<RlySelectOption>, disabled: boolean): void => {\n if (!disabled && !options.some((option) => !option.disabled)) {\n throw new Error(\"Select options must contain at least one enabled option\")\n }\n const values = new Set<string>()\n for (const option of options) {\n requireText(option.label, \"Select option label\")\n const value = requireText(option.value, \"Select option value\")\n if (values.has(value)) throw new Error(`Duplicate Select option value: ${value}`)\n values.add(value)\n }\n}\n\n/** Render an owned, portal-safe single-value selector without exposing Radix component shapes. */\nconst SelectImplementation = (componentProps: SelectProps): ReactElement => {\n const valueControlled = \"value\" in componentProps\n const {\n \"aria-describedby\": ariaDescribedBy,\n \"aria-errormessage\": ariaErrorMessage,\n \"aria-invalid\": ariaInvalid,\n \"aria-label\": ariaLabel,\n \"aria-labelledby\": ariaLabelledBy,\n \"aria-required\": ariaRequired,\n autoComplete,\n className,\n defaultOpen,\n defaultValue,\n disabled = false,\n form,\n id,\n name,\n onBlur,\n onFocus,\n onKeyDown,\n onOpenChange,\n onValueChange,\n open,\n options,\n placeholder = \"Select an option\",\n ref,\n required = false,\n size = RLY_SELECT_DEFAULT_VARIANTS.size,\n tabIndex,\n value\n } = componentProps\n validateOptions(options, disabled)\n const accessibleName = ariaLabel ?? ariaLabelledBy\n requireText(accessibleName, ariaLabel === undefined ? \"Select aria-labelledby\" : \"Select aria-label\")\n const visiblePlaceholder = requireText(placeholder, \"Select placeholder\")\n const selectedValue = value ?? defaultValue\n const selectedOption =\n selectedValue === undefined ? undefined : options.find((option) => option.value === selectedValue)\n if (selectedValue !== undefined && selectedOption === undefined) {\n throw new Error(`Select value does not match an option: ${selectedValue}`)\n }\n // Only a controlled value is known on every render; an uncontrolled one is left to Radix to mirror.\n const selectedLabel = valueControlled ? selectedOption?.label : undefined\n\n return (\n <RadixSelect.Root\n {...(autoComplete === undefined ? {} : { autoComplete })}\n {...(defaultOpen === undefined ? {} : { defaultOpen })}\n {...(defaultValue === undefined ? {} : { defaultValue })}\n disabled={disabled}\n {...(form === undefined ? {} : { form })}\n {...(name === undefined ? {} : { name })}\n {...(onOpenChange === undefined ? {} : { onOpenChange })}\n {...(onValueChange === undefined ? {} : { onValueChange })}\n {...(open === undefined ? {} : { open })}\n required={required}\n {...(valueControlled ? { value: value ?? \"\" } : {})}\n >\n <RadixSelect.Trigger\n aria-describedby={ariaDescribedBy}\n aria-errormessage={ariaErrorMessage}\n aria-invalid={ariaInvalid}\n aria-label={ariaLabel}\n aria-labelledby={ariaLabelledBy}\n aria-required={ariaRequired ?? (required ? true : undefined)}\n className={classNames(style(\"trigger\"), RLY_SELECT_VARIANTS.size[size].className, className)}\n id={id}\n onBlur={onBlur}\n onFocus={onFocus}\n onKeyDown={onKeyDown}\n ref={ref}\n tabIndex={tabIndex}\n >\n {/* Render the label directly so a controlled value shows before the list mounts, including on the server. */}\n <RadixSelect.Value placeholder={visiblePlaceholder}>{selectedLabel}</RadixSelect.Value>\n <RadixSelect.Icon asChild>\n <span aria-hidden=\"true\" className={style(\"triggerIcon\")}>\n <Icon decorative name=\"chevron-down\" size=\"small\" />\n </span>\n </RadixSelect.Icon>\n </RadixSelect.Trigger>\n <PortalBoundary>\n {(container) => (\n <RadixSelect.Portal container={container}>\n <RadixSelect.Content\n align=\"start\"\n className={classNames(style(\"content\"), RLY_SELECT_VARIANTS.size[size].className)}\n position=\"popper\"\n sideOffset={6}\n >\n <RadixSelect.ScrollUpButton aria-hidden=\"true\" className={style(\"scrollButton\")}>\n <Icon decorative name=\"chevron-up\" size=\"small\" />\n </RadixSelect.ScrollUpButton>\n <RadixSelect.Viewport className={style(\"viewport\")}>\n {options.map((option) => (\n <RadixSelect.Item\n className={style(\"item\")}\n {...(option.disabled === undefined ? {} : { disabled: option.disabled })}\n key={option.value}\n textValue={option.label}\n value={option.value}\n >\n <RadixSelect.ItemText>{option.label}</RadixSelect.ItemText>\n <RadixSelect.ItemIndicator className={style(\"itemIndicator\")}>\n <Icon decorative name=\"check\" size=\"small\" />\n </RadixSelect.ItemIndicator>\n </RadixSelect.Item>\n ))}\n </RadixSelect.Viewport>\n <RadixSelect.ScrollDownButton aria-hidden=\"true\" className={style(\"scrollButton\")}>\n <Icon decorative name=\"chevron-down\" size=\"small\" />\n </RadixSelect.ScrollDownButton>\n </RadixSelect.Content>\n </RadixSelect.Portal>\n )}\n </PortalBoundary>\n </RadixSelect.Root>\n )\n}\n\nexport const Select = /* @__PURE__ */ registerFieldControl(SelectImplementation)\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 = {\n neutral: \"minus\",\n positive: \"check\",\n critical: \"alert\",\n caution: \"clock\",\n progress: \"loader\"\n} satisfies Readonly<Record<RlyStatePanelTone, RlyIconName>>\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/**\n * Explain an outcome with redundant word, icon, rail, ink, and tint cues.\n *\n * `announce` makes the panel a live region. A polite status region reliably announces\n * changes only once it is already mounted: mount it persistently and swap its content.\n * An assertive alert may announce as soon as it is inserted. Keep `announce=\"off\"`\n * for static states.\n */\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 // An announcing region owns its role; otherwise the caller's role (for example \"note\") stands.\n const role = announce === \"assertive\" ? \"alert\" : announce === \"polite\" ? \"status\" : props.role\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 .root {\n align-content: start;\n color: var(--rly-color-text-1);\n display: grid;\n gap: var(--rly-space-8);\n inline-size: 100%;\n max-inline-size: 100%;\n min-inline-size: var(--rly-space-0);\n }\n\n .label {\n align-items: baseline;\n display: flex;\n flex-wrap: wrap;\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 gap: var(--rly-space-8);\n letter-spacing: var(--rly-type-label-tracking);\n }\n\n .required,\n .description,\n .error {\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 letter-spacing: var(--rly-type-meta-tracking);\n margin: var(--rly-space-0);\n overflow-wrap: anywhere;\n }\n\n .required,\n .description {\n color: var(--rly-color-text-2);\n }\n\n .error {\n color: var(--rly-color-blocked-ink);\n }\n\n .controlSlot {\n min-inline-size: var(--rly-space-0);\n }\n\n .control {\n appearance: none;\n background: var(--rly-color-surface-1);\n border: 1px solid var(--rly-color-border-2);\n border-radius: var(--rly-radius-field);\n box-sizing: border-box;\n color: var(--rly-color-text-1);\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 inline-size: 100%;\n max-inline-size: 100%;\n min-inline-size: var(--rly-space-0);\n padding: var(--rly-space-8) var(--rly-space-12);\n }\n\n .control:is(textarea) {\n min-block-size: var(--rly-space-96);\n resize: vertical;\n }\n\n .compact .control {\n min-block-size: var(--rly-space-40);\n padding-block: var(--rly-space-6);\n }\n\n .defaultSize .control {\n min-block-size: var(--rly-space-48);\n }\n\n .control:disabled,\n .control[aria-disabled=\"true\"] {\n cursor: not-allowed;\n opacity: 0.58;\n }\n\n .control[aria-invalid=\"true\"] {\n border-color: var(--rly-color-blocked-ink);\n }\n}\n","import { type AriaAttributes, type ComponentPropsWithRef, type ReactElement, useId } from \"react\"\nimport { classNames, cssClass, defineVariants, requireText } from \"../internal/component.js\"\nimport { isRegisteredFieldControl } from \"../internal/field-control.js\"\nimport styles from \"./Field.module.css\"\nimport * as Predicate from \"../internal/predicates.js\"\n\nconst style = (name: string): string => cssClass(styles, name)\nconst semanticControlKeys: ReadonlyArray<keyof FieldControlProps> = [\n \"aria-describedby\",\n \"aria-errormessage\",\n \"aria-invalid\",\n \"aria-labelledby\",\n \"aria-required\",\n \"id\",\n \"required\"\n]\nconst concreteControlElements = new Set([\"button\", \"input\", \"select\", \"textarea\"])\n\nexport const RLY_FIELD_VARIANTS = defineVariants({\n size: {\n compact: { className: style(\"compact\"), purpose: \"Dense form rows\", tokens: [\"space-40\", \"type-meta\"] },\n default: { className: style(\"defaultSize\"), purpose: \"Standard form controls\", tokens: [\"space-48\", \"type-label\"] }\n }\n})\n\nexport const RLY_FIELD_DEFAULT_VARIANTS = defineVariants({ size: \"default\" })\nexport type RlyFieldSize = keyof typeof RLY_FIELD_VARIANTS.size\n\n/** DOM-neutral semantics to spread onto an input, textarea, native select, or rly Select. */\nexport interface FieldControlProps {\n readonly \"aria-describedby\"?: AriaAttributes[\"aria-describedby\"]\n readonly \"aria-errormessage\"?: AriaAttributes[\"aria-errormessage\"]\n readonly \"aria-invalid\"?: AriaAttributes[\"aria-invalid\"]\n readonly \"aria-labelledby\": string\n readonly \"aria-required\"?: AriaAttributes[\"aria-required\"]\n readonly className: string\n readonly id: string\n readonly required?: true\n}\n\nexport type FieldProps = Omit<ComponentPropsWithRef<\"div\">, \"children\"> & {\n readonly children: (controlProps: FieldControlProps) => ReactElement<FieldControlProps>\n readonly controlId?: string\n readonly description?: string\n readonly error?: string\n readonly label: string\n readonly required?: boolean\n readonly size?: RlyFieldSize\n}\n\n/** Compose visible field context with control semantics without cloning an implementation-specific control. */\nexport const Field = ({\n children,\n className,\n controlId,\n description,\n error,\n label,\n required = false,\n size = RLY_FIELD_DEFAULT_VARIANTS.size,\n ...props\n}: FieldProps): ReactElement => {\n const generatedId = useId()\n const resolvedControlId = controlId ?? `rly-field-${generatedId}`\n const labelId = `${resolvedControlId}-label`\n const descriptionId = description === undefined ? undefined : `${resolvedControlId}-description`\n const errorId = error === undefined ? undefined : `${resolvedControlId}-error`\n const describedBy = [descriptionId, errorId].filter((id): id is string => id !== undefined).join(\" \") || undefined\n const commonControlProps: FieldControlProps = {\n \"aria-describedby\": describedBy,\n \"aria-errormessage\": errorId,\n \"aria-invalid\": error === undefined ? undefined : true,\n \"aria-labelledby\": labelId,\n \"aria-required\": required ? true : undefined,\n className: style(\"control\"),\n id: resolvedControlId\n }\n const controlProps: FieldControlProps = required ? { ...commonControlProps, required: true } : commonControlProps\n const control = children(controlProps)\n const controlType = control.type\n const supportedControl = Predicate.isString(controlType)\n ? concreteControlElements.has(controlType)\n : (Predicate.isFunction(controlType) || Predicate.isObjectOrArray(controlType)) &&\n controlType !== null &&\n isRegisteredFieldControl(controlType)\n if (!supportedControl) throw new Error(\"Field children must render one concrete or rly-owned control\")\n for (const key of semanticControlKeys) {\n if (control.props[key] !== controlProps[key]) throw new Error(`Field control must apply ${key}`)\n }\n if (!control.props.className.split(\" \").includes(controlProps.className)) {\n throw new Error(\"Field control must apply className\")\n }\n\n return (\n <div\n {...props}\n className={classNames(style(\"root\"), RLY_FIELD_VARIANTS.size[size].className, className)}\n data-error={error === undefined ? undefined : \"true\"}\n >\n <label className={style(\"label\")} htmlFor={resolvedControlId} id={labelId}>\n {requireText(label, \"Field label\")}\n {required ? <span className={style(\"required\")}>Required</span> : null}\n </label>\n {description === undefined ? null : (\n <p className={style(\"description\")} id={descriptionId}>\n {requireText(description, \"Field description\")}\n </p>\n )}\n <div className={style(\"controlSlot\")}>{control}</div>\n {error === undefined ? null : (\n <p className={style(\"error\")} id={errorId} role=\"alert\">\n {requireText(error, \"Field error\")}\n </p>\n )}\n </div>\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\"\nimport * as Predicate from \"../internal/predicates.js\"\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 (Predicate.isFunction(ref)) ref(value)\n else if (ref !== null && ref !== undefined) ref.current = value\n}\n\nconst getActiveElement = (): HTMLElement | null => {\n try {\n return isHTMLElement(document.activeElement) ? document.activeElement : null\n } catch {\n return null\n }\n}\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":";;;;;;AAiCA,IAAMuF,oBAAe,IAAI,QAAkC,GACrDC,oBAAoB,IAAI,QAAoC,GAC5DC,IAAsBC,EAAwC,IAAI,GACpEC,IAA4B,GAMnBC,KAAuB,GAAe,MAAkD;CACnG,IAAMC,IAAoBC,EAAO;EAAE;EAAM,OAAOC;CAAU,CAAC,GACrDC,IAAWC,KAAQ,CAACJ,EAAkB,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