@sdxc/ui 0.0.0-pre.1

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 (399) hide show
  1. package/LICENSE.md +21 -0
  2. package/README.md +812 -0
  3. package/dist/animations/index.d.ts +12 -0
  4. package/dist/animations/index.js +12 -0
  5. package/dist/animations/keyframes.d.ts +162 -0
  6. package/dist/animations/keyframes.js +297 -0
  7. package/dist/animations/scroll.d.ts +154 -0
  8. package/dist/animations/scroll.js +228 -0
  9. package/dist/animations/tokens.d.ts +47 -0
  10. package/dist/animations/tokens.js +47 -0
  11. package/dist/animations/transitions.d.ts +143 -0
  12. package/dist/animations/transitions.js +147 -0
  13. package/dist/behaviors/announcer.d.ts +90 -0
  14. package/dist/behaviors/announcer.js +93 -0
  15. package/dist/behaviors/calendar-model.d.ts +218 -0
  16. package/dist/behaviors/calendar-model.js +376 -0
  17. package/dist/behaviors/drag-session.d.ts +119 -0
  18. package/dist/behaviors/drag-session.js +110 -0
  19. package/dist/behaviors/filter-model.d.ts +117 -0
  20. package/dist/behaviors/filter-model.js +185 -0
  21. package/dist/behaviors/index.d.ts +16 -0
  22. package/dist/behaviors/index.js +16 -0
  23. package/dist/behaviors/resize-session.d.ts +115 -0
  24. package/dist/behaviors/resize-session.js +157 -0
  25. package/dist/behaviors/scroll-follow-model.d.ts +180 -0
  26. package/dist/behaviors/scroll-follow-model.js +197 -0
  27. package/dist/behaviors/selection-model.d.ts +129 -0
  28. package/dist/behaviors/selection-model.js +259 -0
  29. package/dist/behaviors/toaster.d.ts +144 -0
  30. package/dist/behaviors/toaster.js +228 -0
  31. package/dist/components/accordion.d.ts +93 -0
  32. package/dist/components/accordion.js +165 -0
  33. package/dist/components/alert-dialog.d.ts +110 -0
  34. package/dist/components/alert-dialog.js +169 -0
  35. package/dist/components/alert.d.ts +109 -0
  36. package/dist/components/alert.js +160 -0
  37. package/dist/components/aspect-ratio.d.ts +44 -0
  38. package/dist/components/aspect-ratio.js +35 -0
  39. package/dist/components/attachment.d.ts +146 -0
  40. package/dist/components/attachment.js +320 -0
  41. package/dist/components/avatar.d.ts +118 -0
  42. package/dist/components/avatar.js +89 -0
  43. package/dist/components/badge.d.ts +66 -0
  44. package/dist/components/badge.js +129 -0
  45. package/dist/components/breadcrumbs.d.ts +67 -0
  46. package/dist/components/breadcrumbs.js +121 -0
  47. package/dist/components/bubble.d.ts +91 -0
  48. package/dist/components/bubble.js +216 -0
  49. package/dist/components/button.d.ts +78 -0
  50. package/dist/components/button.js +207 -0
  51. package/dist/components/calendar.d.ts +166 -0
  52. package/dist/components/calendar.js +320 -0
  53. package/dist/components/card.d.ts +82 -0
  54. package/dist/components/card.js +126 -0
  55. package/dist/components/carousel.d.ts +96 -0
  56. package/dist/components/carousel.js +214 -0
  57. package/dist/components/chart.d.ts +485 -0
  58. package/dist/components/chart.js +563 -0
  59. package/dist/components/checkbox-group.d.ts +58 -0
  60. package/dist/components/checkbox-group.js +53 -0
  61. package/dist/components/checkbox.d.ts +61 -0
  62. package/dist/components/checkbox.js +81 -0
  63. package/dist/components/color-area.d.ts +83 -0
  64. package/dist/components/color-area.js +251 -0
  65. package/dist/components/color-field.d.ts +128 -0
  66. package/dist/components/color-field.js +73 -0
  67. package/dist/components/color-picker.d.ts +132 -0
  68. package/dist/components/color-picker.js +183 -0
  69. package/dist/components/color-slider.d.ts +103 -0
  70. package/dist/components/color-slider.js +198 -0
  71. package/dist/components/color-swatch-picker.d.ts +106 -0
  72. package/dist/components/color-swatch-picker.js +75 -0
  73. package/dist/components/color-swatch.d.ts +57 -0
  74. package/dist/components/color-swatch.js +82 -0
  75. package/dist/components/color-wheel.d.ts +58 -0
  76. package/dist/components/color-wheel.js +160 -0
  77. package/dist/components/combobox.d.ts +73 -0
  78. package/dist/components/combobox.js +108 -0
  79. package/dist/components/command.d.ts +80 -0
  80. package/dist/components/command.js +151 -0
  81. package/dist/components/confirm.d.ts +124 -0
  82. package/dist/components/confirm.js +56 -0
  83. package/dist/components/context-menu.d.ts +108 -0
  84. package/dist/components/context-menu.js +200 -0
  85. package/dist/components/date-field.d.ts +110 -0
  86. package/dist/components/date-field.js +49 -0
  87. package/dist/components/date-picker.d.ts +136 -0
  88. package/dist/components/date-picker.js +155 -0
  89. package/dist/components/date-range-picker.d.ts +152 -0
  90. package/dist/components/date-range-picker.js +106 -0
  91. package/dist/components/description.d.ts +36 -0
  92. package/dist/components/description.js +21 -0
  93. package/dist/components/dialog.d.ts +97 -0
  94. package/dist/components/dialog.js +203 -0
  95. package/dist/components/disclosure.d.ts +85 -0
  96. package/dist/components/disclosure.js +180 -0
  97. package/dist/components/drawer.d.ts +82 -0
  98. package/dist/components/drawer.js +162 -0
  99. package/dist/components/drop-indicator.d.ts +43 -0
  100. package/dist/components/drop-indicator.js +47 -0
  101. package/dist/components/drop-zone.d.ts +73 -0
  102. package/dist/components/drop-zone.js +54 -0
  103. package/dist/components/empty.d.ts +89 -0
  104. package/dist/components/empty.js +129 -0
  105. package/dist/components/field-error.d.ts +41 -0
  106. package/dist/components/field-error.js +36 -0
  107. package/dist/components/file-trigger.d.ts +84 -0
  108. package/dist/components/file-trigger.js +169 -0
  109. package/dist/components/form.d.ts +118 -0
  110. package/dist/components/form.js +113 -0
  111. package/dist/components/grid-list.d.ts +112 -0
  112. package/dist/components/grid-list.js +220 -0
  113. package/dist/components/group.d.ts +45 -0
  114. package/dist/components/group.js +44 -0
  115. package/dist/components/header.d.ts +33 -0
  116. package/dist/components/header.js +29 -0
  117. package/dist/components/heading-scope.d.ts +83 -0
  118. package/dist/components/heading-scope.js +82 -0
  119. package/dist/components/heading.d.ts +50 -0
  120. package/dist/components/heading.js +31 -0
  121. package/dist/components/hover-card.d.ts +77 -0
  122. package/dist/components/hover-card.js +151 -0
  123. package/dist/components/image-placeholder.d.ts +105 -0
  124. package/dist/components/image-placeholder.js +212 -0
  125. package/dist/components/index.d.ts +109 -0
  126. package/dist/components/index.js +109 -0
  127. package/dist/components/input.d.ts +53 -0
  128. package/dist/components/input.js +76 -0
  129. package/dist/components/item.d.ts +97 -0
  130. package/dist/components/item.js +185 -0
  131. package/dist/components/keyboard.d.ts +33 -0
  132. package/dist/components/keyboard.js +20 -0
  133. package/dist/components/label.d.ts +38 -0
  134. package/dist/components/label.js +24 -0
  135. package/dist/components/link-button.d.ts +59 -0
  136. package/dist/components/link-button.js +174 -0
  137. package/dist/components/link.d.ts +43 -0
  138. package/dist/components/link.js +85 -0
  139. package/dist/components/listbox.d.ts +119 -0
  140. package/dist/components/listbox.js +114 -0
  141. package/dist/components/logo.d.ts +117 -0
  142. package/dist/components/logo.js +89 -0
  143. package/dist/components/marker.d.ts +82 -0
  144. package/dist/components/marker.js +163 -0
  145. package/dist/components/menu.d.ts +90 -0
  146. package/dist/components/menu.js +146 -0
  147. package/dist/components/menubar.d.ts +54 -0
  148. package/dist/components/menubar.js +118 -0
  149. package/dist/components/message-scroller.d.ts +109 -0
  150. package/dist/components/message-scroller.js +180 -0
  151. package/dist/components/message.d.ts +104 -0
  152. package/dist/components/message.js +200 -0
  153. package/dist/components/meter.d.ts +60 -0
  154. package/dist/components/meter.js +110 -0
  155. package/dist/components/modal.d.ts +71 -0
  156. package/dist/components/modal.js +120 -0
  157. package/dist/components/nav-link.d.ts +53 -0
  158. package/dist/components/nav-link.js +83 -0
  159. package/dist/components/navigation-menu.d.ts +150 -0
  160. package/dist/components/navigation-menu.js +381 -0
  161. package/dist/components/number-field.d.ts +76 -0
  162. package/dist/components/number-field.js +190 -0
  163. package/dist/components/otp-field.d.ts +68 -0
  164. package/dist/components/otp-field.js +46 -0
  165. package/dist/components/overlay-arrow.d.ts +51 -0
  166. package/dist/components/overlay-arrow.js +77 -0
  167. package/dist/components/pagination.d.ts +67 -0
  168. package/dist/components/pagination.js +164 -0
  169. package/dist/components/popover.d.ts +69 -0
  170. package/dist/components/popover.js +68 -0
  171. package/dist/components/progress-bar.d.ts +53 -0
  172. package/dist/components/progress-bar.js +90 -0
  173. package/dist/components/radio-group.d.ts +102 -0
  174. package/dist/components/radio-group.js +114 -0
  175. package/dist/components/range-calendar.d.ts +169 -0
  176. package/dist/components/range-calendar.js +216 -0
  177. package/dist/components/resizable.d.ts +98 -0
  178. package/dist/components/resizable.js +151 -0
  179. package/dist/components/scroll-area.d.ts +54 -0
  180. package/dist/components/scroll-area.js +89 -0
  181. package/dist/components/search-field.d.ts +55 -0
  182. package/dist/components/search-field.js +49 -0
  183. package/dist/components/section.d.ts +37 -0
  184. package/dist/components/section.js +22 -0
  185. package/dist/components/select.d.ts +96 -0
  186. package/dist/components/select.js +285 -0
  187. package/dist/components/selection-indicator.d.ts +47 -0
  188. package/dist/components/selection-indicator.js +50 -0
  189. package/dist/components/sentinel-row.d.ts +22 -0
  190. package/dist/components/sentinel-row.js +29 -0
  191. package/dist/components/separator.d.ts +35 -0
  192. package/dist/components/separator.js +48 -0
  193. package/dist/components/shared-element.d.ts +45 -0
  194. package/dist/components/shared-element.js +48 -0
  195. package/dist/components/sheet.d.ts +78 -0
  196. package/dist/components/sheet.js +167 -0
  197. package/dist/components/sidebar.d.ts +288 -0
  198. package/dist/components/sidebar.js +1068 -0
  199. package/dist/components/skeleton.d.ts +36 -0
  200. package/dist/components/skeleton.js +38 -0
  201. package/dist/components/slider.d.ts +102 -0
  202. package/dist/components/slider.js +179 -0
  203. package/dist/components/spinner.d.ts +55 -0
  204. package/dist/components/spinner.js +51 -0
  205. package/dist/components/switch.d.ts +47 -0
  206. package/dist/components/switch.js +82 -0
  207. package/dist/components/table.d.ts +139 -0
  208. package/dist/components/table.js +216 -0
  209. package/dist/components/tabs.d.ts +124 -0
  210. package/dist/components/tabs.js +246 -0
  211. package/dist/components/tag-group.d.ts +83 -0
  212. package/dist/components/tag-group.js +157 -0
  213. package/dist/components/text-field.d.ts +119 -0
  214. package/dist/components/text-field.js +51 -0
  215. package/dist/components/text.d.ts +34 -0
  216. package/dist/components/text.js +19 -0
  217. package/dist/components/textarea.d.ts +52 -0
  218. package/dist/components/textarea.js +82 -0
  219. package/dist/components/time-field.d.ts +110 -0
  220. package/dist/components/time-field.js +48 -0
  221. package/dist/components/toast.d.ts +149 -0
  222. package/dist/components/toast.js +365 -0
  223. package/dist/components/toggle-button.d.ts +115 -0
  224. package/dist/components/toggle-button.js +237 -0
  225. package/dist/components/toolbar.d.ts +47 -0
  226. package/dist/components/toolbar.js +54 -0
  227. package/dist/components/tooltip.d.ts +52 -0
  228. package/dist/components/tooltip.js +92 -0
  229. package/dist/components/tree.d.ts +123 -0
  230. package/dist/components/tree.js +239 -0
  231. package/dist/components/typeset.d.ts +53 -0
  232. package/dist/components/typeset.js +271 -0
  233. package/dist/index.d.ts +8 -0
  234. package/dist/index.js +8 -0
  235. package/dist/mixins/aria-checked.d.ts +42 -0
  236. package/dist/mixins/aria-checked.js +127 -0
  237. package/dist/mixins/attachment-trigger.d.ts +64 -0
  238. package/dist/mixins/attachment-trigger.js +190 -0
  239. package/dist/mixins/calendar-keys.d.ts +27 -0
  240. package/dist/mixins/calendar-keys.js +113 -0
  241. package/dist/mixins/carousel-controls.d.ts +30 -0
  242. package/dist/mixins/carousel-controls.js +222 -0
  243. package/dist/mixins/chart-tooltip.d.ts +118 -0
  244. package/dist/mixins/chart-tooltip.js +323 -0
  245. package/dist/mixins/clear-field.d.ts +60 -0
  246. package/dist/mixins/clear-field.js +100 -0
  247. package/dist/mixins/color-area-drag.d.ts +58 -0
  248. package/dist/mixins/color-area-drag.js +162 -0
  249. package/dist/mixins/color-channel-sync.d.ts +73 -0
  250. package/dist/mixins/color-channel-sync.js +169 -0
  251. package/dist/mixins/color-preview.d.ts +28 -0
  252. package/dist/mixins/color-preview.js +77 -0
  253. package/dist/mixins/color-wheel-drag.d.ts +58 -0
  254. package/dist/mixins/color-wheel-drag.js +139 -0
  255. package/dist/mixins/combobox-filter.d.ts +59 -0
  256. package/dist/mixins/combobox-filter.js +81 -0
  257. package/dist/mixins/command-filter.d.ts +55 -0
  258. package/dist/mixins/command-filter.js +121 -0
  259. package/dist/mixins/command-keys.d.ts +31 -0
  260. package/dist/mixins/command-keys.js +116 -0
  261. package/dist/mixins/context-menu.d.ts +24 -0
  262. package/dist/mixins/context-menu.js +64 -0
  263. package/dist/mixins/copy-to-clipboard.d.ts +64 -0
  264. package/dist/mixins/copy-to-clipboard.js +109 -0
  265. package/dist/mixins/dismiss.d.ts +77 -0
  266. package/dist/mixins/dismiss.js +151 -0
  267. package/dist/mixins/drag-reorder.d.ts +88 -0
  268. package/dist/mixins/drag-reorder.js +214 -0
  269. package/dist/mixins/drop-zone.d.ts +52 -0
  270. package/dist/mixins/drop-zone.js +132 -0
  271. package/dist/mixins/dual-range.d.ts +60 -0
  272. package/dist/mixins/dual-range.js +100 -0
  273. package/dist/mixins/grid-list-keys.d.ts +34 -0
  274. package/dist/mixins/grid-list-keys.js +260 -0
  275. package/dist/mixins/heading-level-fallback.d.ts +81 -0
  276. package/dist/mixins/heading-level-fallback.js +112 -0
  277. package/dist/mixins/hotkey.d.ts +26 -0
  278. package/dist/mixins/hotkey.js +132 -0
  279. package/dist/mixins/image-fallback.d.ts +57 -0
  280. package/dist/mixins/image-fallback.js +86 -0
  281. package/dist/mixins/index.d.ts +48 -0
  282. package/dist/mixins/index.js +48 -0
  283. package/dist/mixins/listbox-keys.d.ts +52 -0
  284. package/dist/mixins/listbox-keys.js +63 -0
  285. package/dist/mixins/long-press.d.ts +76 -0
  286. package/dist/mixins/long-press.js +130 -0
  287. package/dist/mixins/menu-keys.d.ts +40 -0
  288. package/dist/mixins/menu-keys.js +117 -0
  289. package/dist/mixins/menubar-keys.d.ts +59 -0
  290. package/dist/mixins/menubar-keys.js +230 -0
  291. package/dist/mixins/message-follow.d.ts +56 -0
  292. package/dist/mixins/message-follow.js +368 -0
  293. package/dist/mixins/otp-slots.d.ts +53 -0
  294. package/dist/mixins/otp-slots.js +175 -0
  295. package/dist/mixins/persist.d.ts +36 -0
  296. package/dist/mixins/persist.js +78 -0
  297. package/dist/mixins/press-toggle.d.ts +43 -0
  298. package/dist/mixins/press-toggle.js +61 -0
  299. package/dist/mixins/range-preview.d.ts +26 -0
  300. package/dist/mixins/range-preview.js +120 -0
  301. package/dist/mixins/resize-handle.d.ts +101 -0
  302. package/dist/mixins/resize-handle.js +288 -0
  303. package/dist/mixins/stepper.d.ts +81 -0
  304. package/dist/mixins/stepper.js +194 -0
  305. package/dist/mixins/tab-keys.d.ts +30 -0
  306. package/dist/mixins/tab-keys.js +63 -0
  307. package/dist/mixins/theme-toggle.d.ts +82 -0
  308. package/dist/mixins/theme-toggle.js +158 -0
  309. package/dist/mixins/track-host-node.d.ts +34 -0
  310. package/dist/mixins/track-host-node.js +42 -0
  311. package/dist/mixins/treeKeys.d.ts +57 -0
  312. package/dist/mixins/treeKeys.js +266 -0
  313. package/dist/mixins/validate.d.ts +65 -0
  314. package/dist/mixins/validate.js +139 -0
  315. package/dist/mixins/view-transition.d.ts +56 -0
  316. package/dist/mixins/view-transition.js +111 -0
  317. package/dist/styles/chart-palette.d.ts +34 -0
  318. package/dist/styles/chart-palette.js +27 -0
  319. package/dist/styles/field-stack-layout.d.ts +27 -0
  320. package/dist/styles/field-stack-layout.js +16 -0
  321. package/dist/styles/floating-surface.d.ts +32 -0
  322. package/dist/styles/floating-surface.js +30 -0
  323. package/dist/styles/graphic-host.d.ts +25 -0
  324. package/dist/styles/graphic-host.js +18 -0
  325. package/dist/styles/index.d.ts +20 -0
  326. package/dist/styles/index.js +20 -0
  327. package/dist/styles/interactive-transition.d.ts +32 -0
  328. package/dist/styles/interactive-transition.js +32 -0
  329. package/dist/styles/legend-toggle.d.ts +29 -0
  330. package/dist/styles/legend-toggle.js +24 -0
  331. package/dist/styles/output-caption-text.d.ts +22 -0
  332. package/dist/styles/output-caption-text.js +15 -0
  333. package/dist/styles/panel-chrome.d.ts +34 -0
  334. package/dist/styles/panel-chrome.js +26 -0
  335. package/dist/styles/range-thumb-appearance.d.ts +36 -0
  336. package/dist/styles/range-thumb-appearance.js +76 -0
  337. package/dist/styles/rtl-aware-gradient-direction.d.ts +28 -0
  338. package/dist/styles/rtl-aware-gradient-direction.js +28 -0
  339. package/dist/styles/semantic-color-panel.d.ts +35 -0
  340. package/dist/styles/semantic-color-panel.js +41 -0
  341. package/dist/utils/chart-marker-indices.d.ts +22 -0
  342. package/dist/utils/chart-marker-indices.js +45 -0
  343. package/dist/utils/chart-path.d.ts +86 -0
  344. package/dist/utils/chart-path.js +122 -0
  345. package/dist/utils/chart-scale.d.ts +182 -0
  346. package/dist/utils/chart-scale.js +221 -0
  347. package/dist/utils/color-math.d.ts +252 -0
  348. package/dist/utils/color-math.js +480 -0
  349. package/dist/utils/command-event.d.ts +24 -0
  350. package/dist/utils/command-event.js +26 -0
  351. package/dist/utils/css-styles.d.ts +21 -0
  352. package/dist/utils/css-styles.js +11 -0
  353. package/dist/utils/decorative-icon.d.ts +15 -0
  354. package/dist/utils/decorative-icon.js +15 -0
  355. package/dist/utils/disabled-selector.d.ts +22 -0
  356. package/dist/utils/disabled-selector.js +22 -0
  357. package/dist/utils/dispatch-change.d.ts +17 -0
  358. package/dist/utils/dispatch-change.js +19 -0
  359. package/dist/utils/field-parts.d.ts +26 -0
  360. package/dist/utils/field-parts.js +12 -0
  361. package/dist/utils/full-turn-radians.d.ts +16 -0
  362. package/dist/utils/full-turn-radians.js +16 -0
  363. package/dist/utils/geometry.d.ts +14 -0
  364. package/dist/utils/geometry.js +9 -0
  365. package/dist/utils/has-accessible-text.d.ts +19 -0
  366. package/dist/utils/has-accessible-text.js +30 -0
  367. package/dist/utils/hue-spectrum.d.ts +19 -0
  368. package/dist/utils/hue-spectrum.js +19 -0
  369. package/dist/utils/index.d.ts +35 -0
  370. package/dist/utils/index.js +35 -0
  371. package/dist/utils/is-new-primary-press.d.ts +29 -0
  372. package/dist/utils/is-new-primary-press.js +31 -0
  373. package/dist/utils/keyboard-nav.d.ts +64 -0
  374. package/dist/utils/keyboard-nav.js +79 -0
  375. package/dist/utils/merge-style.d.ts +33 -0
  376. package/dist/utils/merge-style.js +30 -0
  377. package/dist/utils/paired-range-inputs.d.ts +26 -0
  378. package/dist/utils/paired-range-inputs.js +29 -0
  379. package/dist/utils/placement.d.ts +18 -0
  380. package/dist/utils/placement.js +12 -0
  381. package/dist/utils/prefers-reduced-motion.d.ts +17 -0
  382. package/dist/utils/prefers-reduced-motion.js +19 -0
  383. package/dist/utils/resolve-field-wiring.d.ts +83 -0
  384. package/dist/utils/resolve-field-wiring.js +53 -0
  385. package/dist/utils/resolve-fill-percent.d.ts +28 -0
  386. package/dist/utils/resolve-fill-percent.js +34 -0
  387. package/dist/utils/round-precision.d.ts +22 -0
  388. package/dist/utils/round-precision.js +25 -0
  389. package/dist/utils/semantic-color-panel.d.ts +35 -0
  390. package/dist/utils/semantic-color-panel.js +28 -0
  391. package/dist/utils/semantic-color.d.ts +17 -0
  392. package/dist/utils/semantic-color.js +11 -0
  393. package/dist/utils/warn-if-no-accessible-name.d.ts +52 -0
  394. package/dist/utils/warn-if-no-accessible-name.js +55 -0
  395. package/dist/utils/write-cookie.d.ts +35 -0
  396. package/dist/utils/write-cookie.js +37 -0
  397. package/package.json +32 -0
  398. package/src/reset.css +223 -0
  399. package/src/theme.css +146 -0
@@ -0,0 +1,97 @@
1
+ /**
2
+ * A modal surface built on the native `<dialog>` element, opened and closed
3
+ * declaratively through Invoker Commands (`commandfor`/`command`) instead of
4
+ * a JavaScript-tracked open state. Compound parts cover a header, title,
5
+ * description, footer, and a dismiss control, so a page composes only the
6
+ * pieces a given dialog needs.
7
+ *
8
+ * @author [Sergio Xalambrí](https://sergiodxa.com)
9
+ * @copyright Sergio Xalambrí 2026
10
+ */
11
+ import type { Handle, Props as TagProps, RemixNode } from "remix/ui";
12
+ import { Button } from "./button.js";
13
+ /**
14
+ * Prop types for {@link Dialog} and its compound parts.
15
+ */
16
+ export declare namespace Dialog {
17
+ /**
18
+ * Every native `<dialog>` attribute, plus the `mix` passthrough. `role`
19
+ * stays the platform's implicit `"dialog"` unless set to `"alertdialog"`,
20
+ * and `open`/`closedby` stay the platform's own native state and light-dismiss controls.
21
+ */
22
+ interface Props extends TagProps<"dialog"> {
23
+ /** The panel's compound parts: {@link Dialog.Header}, {@link Dialog.Footer}, {@link Dialog.Close}, or any other content. */
24
+ children: RemixNode;
25
+ }
26
+ /**
27
+ * Props accepted by {@link Dialog.Header}.
28
+ */
29
+ interface HeaderProps extends TagProps<"div"> {
30
+ }
31
+ /**
32
+ * Props accepted by {@link Dialog.Title}. Every native heading-element
33
+ * attribute still applies, since the rendered tag depends on the nearest
34
+ * ambient heading level, falling back to `<h1>` where none is set.
35
+ */
36
+ interface TitleProps extends TagProps<"h1"> {
37
+ }
38
+ /**
39
+ * Props accepted by {@link Dialog.Description}.
40
+ */
41
+ interface DescriptionProps extends TagProps<"p"> {
42
+ }
43
+ /**
44
+ * Props accepted by {@link Dialog.Footer}.
45
+ */
46
+ interface FooterProps extends TagProps<"div"> {
47
+ }
48
+ /**
49
+ * Props accepted by {@link Dialog.Close}: every {@link Button.Props} field
50
+ * except the ones this component fixes on the consumer's behalf.
51
+ */
52
+ interface CloseProps extends Omit<Button.Props, "children" | "variant" | "color" | "size" | "aria-label" | "commandfor" | "command"> {
53
+ /** `id` of the ancestor {@link Dialog} this button dismisses. */
54
+ commandfor: string;
55
+ /** Invoker Commands verb dispatched to the target Dialog. Defaults to `"close"`. */
56
+ command?: "close";
57
+ /**
58
+ * Accessible label for the icon-only control — required, since the
59
+ * button carries no visible text for assistive technology to read.
60
+ */
61
+ "aria-label": string;
62
+ }
63
+ }
64
+ /**
65
+ * Renders the dialog panel as a native `<dialog>` host, its `::backdrop`
66
+ * tinted and, where supported, blurred to dim the page behind it. The panel
67
+ * declares the `ui-dialog` named container so {@link Dialog.Header} and {@link Dialog.Footer} can size against the panel's own width; Invoker Commands open and close it declaratively — a trigger elsewhere points `commandfor` at this element's `id` with `command="show-modal"`, and any control inside, including {@link Dialog.Close}, points `commandfor` at that same `id` with `command="close"`.
68
+ *
69
+ * @param handle Runtime handle carrying the host `<dialog>`'s props.
70
+ * @returns The render function producing the panel's markup.
71
+ * @example
72
+ * <Button commandfor="confirm-delete" command="show-modal">{t("project.delete")}</Button>
73
+ * <Dialog id="confirm-delete" aria-labelledby="confirm-delete-title">
74
+ * <Dialog.Header>
75
+ * <Dialog.Title id="confirm-delete-title">{t("project.deleteTitle")}</Dialog.Title>
76
+ * <Dialog.Description>{t("project.deleteDescription")}</Dialog.Description>
77
+ * </Dialog.Header>
78
+ * <Dialog.Footer>
79
+ * <Button commandfor="confirm-delete" command="close" color="danger">{t("actions.delete")}</Button>
80
+ * </Dialog.Footer>
81
+ * <Dialog.Close commandfor="confirm-delete" aria-label={t("actions.close")} />
82
+ * </Dialog>
83
+ * @example
84
+ * <Dialog id="welcome" mix={zoom({ duration: durations.normal })}>
85
+ * <Dialog.Header>
86
+ * <Dialog.Title>{t("welcome.title")}</Dialog.Title>
87
+ * </Dialog.Header>
88
+ * </Dialog>
89
+ */
90
+ export declare function Dialog(handle: Handle<Dialog.Props>): () => import("remix/ui").RemixElement;
91
+ export declare namespace Dialog {
92
+ var Header: (handle: Handle<Dialog.HeaderProps>) => () => import("remix/ui").RemixElement;
93
+ var Title: (handle: Handle<Dialog.TitleProps>) => () => import("remix/ui").RemixElement;
94
+ var Description: (handle: Handle<Dialog.DescriptionProps>) => () => import("remix/ui").RemixElement;
95
+ var Footer: (handle: Handle<Dialog.FooterProps>) => () => import("remix/ui").RemixElement;
96
+ var Close: (handle: Handle<Dialog.CloseProps>) => () => import("remix/ui").RemixElement;
97
+ }
@@ -0,0 +1,203 @@
1
+ import { jsx as _jsx } from "remix/ui/jsx-runtime";
2
+ import { XIcon } from "@sdxc/icons";
3
+ import { bg, fg, outline } from "@sdxc/u/color";
4
+ import { backdropBlur, backdropSaturate, opacity, rounded, transition, transitionBehavior, } from "@sdxc/u/effects";
5
+ import { raw } from "@sdxc/u/general";
6
+ import { absolute, container, flex, flexCol, flexColReverse, flexRow, gap, inset, justify, relative, } from "@sdxc/u/layout";
7
+ import { overflow } from "@sdxc/u/overflow";
8
+ import { at, media, startingStyle, supports } from "@sdxc/u/responsive";
9
+ import { is, maxBs, maxIs, p } from "@sdxc/u/size";
10
+ import { when } from "@sdxc/u/state";
11
+ import { fontSize, leading, textAlign, tracking, weight } from "@sdxc/u/typography";
12
+ import { durations, easings } from "../animations/tokens.js";
13
+ import { Button } from "./button.js";
14
+ import { resolveHeadingLevel, TAG_BY_LEVEL } from "./heading-scope.js";
15
+ /**
16
+ * Named container {@link Dialog} declares on its own host, so
17
+ * {@link Dialog.Header} and {@link Dialog.Footer} can query the panel's own
18
+ * width instead of the page's.
19
+ */
20
+ const CONTAINER_NAME = "ui-dialog";
21
+ /**
22
+ * Invoker Commands verb {@link Dialog.CloseProps.command} falls back to when
23
+ * omitted, dismissing the ancestor Dialog named by `commandfor`.
24
+ */
25
+ const DEFAULT_CLOSE_COMMAND = "close";
26
+ /**
27
+ * Renders the dialog panel as a native `<dialog>` host, its `::backdrop`
28
+ * tinted and, where supported, blurred to dim the page behind it. The panel
29
+ * declares the `ui-dialog` named container so {@link Dialog.Header} and {@link Dialog.Footer} can size against the panel's own width; Invoker Commands open and close it declaratively — a trigger elsewhere points `commandfor` at this element's `id` with `command="show-modal"`, and any control inside, including {@link Dialog.Close}, points `commandfor` at that same `id` with `command="close"`.
30
+ *
31
+ * @param handle Runtime handle carrying the host `<dialog>`'s props.
32
+ * @returns The render function producing the panel's markup.
33
+ * @example
34
+ * <Button commandfor="confirm-delete" command="show-modal">{t("project.delete")}</Button>
35
+ * <Dialog id="confirm-delete" aria-labelledby="confirm-delete-title">
36
+ * <Dialog.Header>
37
+ * <Dialog.Title id="confirm-delete-title">{t("project.deleteTitle")}</Dialog.Title>
38
+ * <Dialog.Description>{t("project.deleteDescription")}</Dialog.Description>
39
+ * </Dialog.Header>
40
+ * <Dialog.Footer>
41
+ * <Button commandfor="confirm-delete" command="close" color="danger">{t("actions.delete")}</Button>
42
+ * </Dialog.Footer>
43
+ * <Dialog.Close commandfor="confirm-delete" aria-label={t("actions.close")} />
44
+ * </Dialog>
45
+ * @example
46
+ * <Dialog id="welcome" mix={zoom({ duration: durations.normal })}>
47
+ * <Dialog.Header>
48
+ * <Dialog.Title>{t("welcome.title")}</Dialog.Title>
49
+ * </Dialog.Header>
50
+ * </Dialog>
51
+ */
52
+ export function Dialog(handle) {
53
+ return () => {
54
+ let { id, children, mix, ...rest } = handle.props;
55
+ if (import.meta.env.DEV && !id) {
56
+ console.warn('Dialog rendered without an "id" — "commandfor" on a trigger or close control has nothing to target.');
57
+ }
58
+ return (_jsx("dialog", { ...rest, id: id, "data-slot": "dialog", mix: [
59
+ relative(),
60
+ bg("neutral.tint"),
61
+ fg("neutral.emphasis"),
62
+ rounded("lg"),
63
+ is("full"),
64
+ maxIs("28rem"),
65
+ maxBs("90vh"),
66
+ gap(6),
67
+ p(6),
68
+ overflow("auto"),
69
+ /** Gated on `[open]` so the UA's own `dialog:not([open])` hiding still applies. */
70
+ when("&[open]", flex()),
71
+ flexCol(),
72
+ container(CONTAINER_NAME, "inline-size"),
73
+ when("&::backdrop", [
74
+ bg("rgb(0 0 0 / 0.5)"),
75
+ transitionBehavior("allow-discrete"),
76
+ opacity(0),
77
+ transition("opacity, display, overlay", {
78
+ duration: durations.normal,
79
+ easing: easings.standard,
80
+ }),
81
+ ]),
82
+ when("&[open]::backdrop", opacity(100)),
83
+ supports("(backdrop-filter: blur(0))", media("(prefers-reduced-transparency: no-preference)", when("&::backdrop", [backdropBlur("md"), backdropSaturate(1.4)]))),
84
+ startingStyle(when("&[open]::backdrop", opacity(0))),
85
+ outline("none"),
86
+ /** `overscrollBehavior` has no matching utility; this shadow value doesn't match the `shadow()` scale (`sm`/`base`/`md`/`lg`). */
87
+ raw({
88
+ overscrollBehavior: "contain",
89
+ boxShadow: "0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1)",
90
+ }),
91
+ mix,
92
+ ], children: children }));
93
+ };
94
+ }
95
+ /**
96
+ * Renders {@link Dialog.HeaderProps.children} as the panel's header slot: a
97
+ * column stacking {@link Dialog.Title} and {@link Dialog.Description},
98
+ * centered while narrow and start-aligned (flipping under `dir="rtl"`) once the panel's own `ui-dialog` container grows past `40rem`.
99
+ *
100
+ * @param handle Runtime handle carrying the host `<div>`'s props.
101
+ * @returns The render function producing the header slot's markup.
102
+ * @example
103
+ * <Dialog.Header>
104
+ * <Dialog.Title>{t("project.deleteTitle")}</Dialog.Title>
105
+ * <Dialog.Description>{t("project.deleteDescription")}</Dialog.Description>
106
+ * </Dialog.Header>
107
+ */
108
+ Dialog.Header = function DialogHeader(handle) {
109
+ return () => {
110
+ let { mix, ...rest } = handle.props;
111
+ return (_jsx("div", { ...rest, "data-slot": "header", mix: [
112
+ flex(),
113
+ flexCol(),
114
+ gap(1.5),
115
+ textAlign("center"),
116
+ at("40rem", CONTAINER_NAME, textAlign("start")),
117
+ mix,
118
+ ] }));
119
+ };
120
+ };
121
+ /**
122
+ * Renders {@link Dialog.TitleProps.children} as the panel's heading, inside
123
+ * the native heading element matching the nearest ambient heading level —
124
+ * `<h1>` by default — sized and weighted as the panel's most prominent line of text at every level.
125
+ *
126
+ * @param handle Runtime handle carrying the host heading element's props.
127
+ * @returns The render function producing the heading's markup.
128
+ * @example
129
+ * <Dialog.Title>{t("project.deleteTitle")}</Dialog.Title>
130
+ */
131
+ Dialog.Title = function DialogTitle(handle) {
132
+ return () => {
133
+ let { mix, ...rest } = handle.props;
134
+ let resolved = resolveHeadingLevel(handle);
135
+ let Tag = TAG_BY_LEVEL[resolved];
136
+ return (_jsx(Tag, { ...rest, "data-slot": "title", mix: [
137
+ fg("neutral.emphasis"),
138
+ weight("semibold"),
139
+ tracking("tight"),
140
+ fontSize("lg"),
141
+ leading(1),
142
+ mix,
143
+ ], children: rest.children }));
144
+ };
145
+ };
146
+ /**
147
+ * Renders {@link Dialog.DescriptionProps.children} as the panel's supporting
148
+ * copy, in a native `<p>` set to the panel's muted foreground color so it
149
+ * reads as secondary to {@link Dialog.Title}.
150
+ *
151
+ * @param handle Runtime handle carrying the host `<p>`'s props.
152
+ * @returns The render function producing the description's markup.
153
+ * @example
154
+ * <Dialog.Description>{t("project.deleteDescription")}</Dialog.Description>
155
+ */
156
+ Dialog.Description = function DialogDescription(handle) {
157
+ return () => {
158
+ let { mix, ...rest } = handle.props;
159
+ return (_jsx("p", { ...rest, "data-slot": "description", mix: [fg("neutral.muted"), fontSize("sm"), mix], children: rest.children }));
160
+ };
161
+ };
162
+ /**
163
+ * Renders {@link Dialog.FooterProps.children} as the panel's action row: a
164
+ * column of stacked, full-width controls while the panel is narrow,
165
+ * switching to a single end-aligned row past the panel's own `40rem` container mark.
166
+ *
167
+ * @param handle Runtime handle carrying the host `<div>`'s props.
168
+ * @returns The render function producing the action row's markup.
169
+ * @example
170
+ * <Dialog.Footer>
171
+ * <Button commandfor="confirm-delete" command="close" variant="outline">{t("actions.cancel")}</Button>
172
+ * <Button commandfor="confirm-delete" command="close" color="danger">{t("actions.delete")}</Button>
173
+ * </Dialog.Footer>
174
+ */
175
+ Dialog.Footer = function DialogFooter(handle) {
176
+ return () => {
177
+ let { mix, ...rest } = handle.props;
178
+ return (_jsx("div", { ...rest, "data-slot": "footer", mix: [
179
+ flex(),
180
+ gap(2),
181
+ flexColReverse(),
182
+ at("40rem", CONTAINER_NAME, [flexRow(), justify("end")]),
183
+ mix,
184
+ ] }));
185
+ };
186
+ };
187
+ /**
188
+ * Renders a dismiss control for the ancestor {@link Dialog} named by
189
+ * `commandfor`: a small, ghost-styled {@link Button} with a fixed "X" glyph,
190
+ * pinned to the panel's corner. `command` defaults to `"close"`, so passing only `commandfor` and `aria-label` wires it up.
191
+ *
192
+ * @param handle Runtime handle carrying the host button's props.
193
+ * @returns The render function producing the dismiss control's markup.
194
+ * @example
195
+ * <Dialog.Close commandfor="confirm-delete" aria-label={t("actions.close")} />
196
+ */
197
+ Dialog.Close = function DialogClose(handle) {
198
+ return () => {
199
+ let { commandfor, command, mix, ...rest } = handle.props;
200
+ let resolvedCommand = command ?? DEFAULT_CLOSE_COMMAND;
201
+ return (_jsx(Button, { ...rest, type: "button", variant: "ghost", color: "neutral", size: "sm", commandfor: commandfor, command: resolvedCommand, "data-slot": "close", mix: [absolute(), inset(4, 4, "auto", "auto"), mix], children: _jsx(XIcon, { size: 16 }) }));
202
+ };
203
+ };
@@ -0,0 +1,85 @@
1
+ /**
2
+ * A single expand/collapse section built on the native `<details>` and
3
+ * `<summary>` elements, so the show/hide state, keyboard handling, and
4
+ * find-in-page behavior all come from the platform itself.
5
+ * `Disclosure.Trigger` is the always-visible `<summary>` label and
6
+ * `Disclosure.Panel` is the content it reveals; `Disclosure.Group` stacks
7
+ * several disclosures into one bordered list.
8
+ *
9
+ * @author [Sergio Xalambrí](https://sergiodxa.com)
10
+ * @copyright Sergio Xalambrí 2026
11
+ */
12
+ import type { Handle, Props as TagProps, RemixNode } from "remix/ui";
13
+ /**
14
+ * Prop types for {@link Disclosure} and its compound parts.
15
+ */
16
+ export declare namespace Disclosure {
17
+ /**
18
+ * Every native `<details>` attribute, plus the `mix` passthrough. The
19
+ * `open` attribute alone drives expanded state, and sibling disclosures
20
+ * sharing a `name` let the browser keep only one open at a time.
21
+ */
22
+ interface Props extends TagProps<"details"> {
23
+ /** The section's compound parts: {@link Disclosure.Trigger} followed by {@link Disclosure.Panel}. */
24
+ children: RemixNode;
25
+ }
26
+ /**
27
+ * Props accepted by {@link Disclosure.Header}. The rendered tag matches
28
+ * the nearest ambient heading level, falling back to `<h1>` where nothing
29
+ * supplies one.
30
+ */
31
+ interface HeaderProps extends TagProps<"h1"> {
32
+ /** The trigger's label text, exposed as a heading for assistive technology. */
33
+ children: RemixNode;
34
+ }
35
+ /**
36
+ * Props accepted by {@link Disclosure.Trigger}.
37
+ */
38
+ interface TriggerProps extends TagProps<"summary"> {
39
+ /** The always-visible label, typically plain text or {@link Disclosure.Header}. */
40
+ children: RemixNode;
41
+ }
42
+ /**
43
+ * Props accepted by {@link Disclosure.Panel}.
44
+ */
45
+ interface PanelProps extends TagProps<"div"> {
46
+ /** The content revealed while the section is open. */
47
+ children: RemixNode;
48
+ }
49
+ /**
50
+ * Props accepted by {@link Disclosure.Group}.
51
+ */
52
+ interface GroupProps extends TagProps<"div"> {
53
+ /** One or more {@link Disclosure} sections to stack into a single bordered list. */
54
+ children: RemixNode;
55
+ }
56
+ }
57
+ /**
58
+ * Renders the section's `<details>` host, revealing
59
+ * {@link Disclosure.Panel}'s content while `open`. The `::details-content`
60
+ * block-size transition is a progressive enhancement over the native toggle.
61
+ *
62
+ * @param handle Runtime handle carrying the host `<details>`'s props.
63
+ * @returns The render function producing the section's markup.
64
+ * @example
65
+ * <Disclosure>
66
+ * <Disclosure.Trigger>{t("faq.refunds.question")}</Disclosure.Trigger>
67
+ * <Disclosure.Panel>
68
+ * <p>{t("faq.refunds.answer")}</p>
69
+ * </Disclosure.Panel>
70
+ * </Disclosure>
71
+ * @example
72
+ * <Disclosure open>
73
+ * <Disclosure.Trigger>{t("faq.shipping.question")}</Disclosure.Trigger>
74
+ * <Disclosure.Panel>
75
+ * <p>{t("faq.shipping.answer")}</p>
76
+ * </Disclosure.Panel>
77
+ * </Disclosure>
78
+ */
79
+ export declare function Disclosure(handle: Handle<Disclosure.Props>): () => import("remix/ui").RemixElement;
80
+ export declare namespace Disclosure {
81
+ var Header: (handle: Handle<Disclosure.HeaderProps>) => () => import("remix/ui").RemixElement;
82
+ var Trigger: (handle: Handle<Disclosure.TriggerProps>) => () => import("remix/ui").RemixElement;
83
+ var Panel: (handle: Handle<Disclosure.PanelProps>) => () => import("remix/ui").RemixElement;
84
+ var Group: (handle: Handle<Disclosure.GroupProps>) => () => import("remix/ui").RemixElement;
85
+ }
@@ -0,0 +1,180 @@
1
+ import { jsx as _jsx } from "remix/ui/jsx-runtime";
2
+ import { bg, borderEdge, fg, outline } from "@sdxc/u/color";
3
+ import { opacity, roundedCorner, rounded, transition, transitionDuration } from "@sdxc/u/effects";
4
+ import { cursor, listStyle, raw } from "@sdxc/u/general";
5
+ import { flex, flexCol, gap, hidden, interpolateSize, items } from "@sdxc/u/layout";
6
+ import { overflow } from "@sdxc/u/overflow";
7
+ import { media } from "@sdxc/u/responsive";
8
+ import { bs, is, m, pb, pi } from "@sdxc/u/size";
9
+ import { detailsContent, hover, when } from "@sdxc/u/state";
10
+ import { textAlign, weight } from "@sdxc/u/typography";
11
+ import { panelChrome } from "../styles/panel-chrome.js";
12
+ import { resolveHeadingLevel, TAG_BY_LEVEL } from "./heading-scope.js";
13
+ /**
14
+ * Renders the section's `<details>` host, revealing
15
+ * {@link Disclosure.Panel}'s content while `open`. The `::details-content`
16
+ * block-size transition is a progressive enhancement over the native toggle.
17
+ *
18
+ * @param handle Runtime handle carrying the host `<details>`'s props.
19
+ * @returns The render function producing the section's markup.
20
+ * @example
21
+ * <Disclosure>
22
+ * <Disclosure.Trigger>{t("faq.refunds.question")}</Disclosure.Trigger>
23
+ * <Disclosure.Panel>
24
+ * <p>{t("faq.refunds.answer")}</p>
25
+ * </Disclosure.Panel>
26
+ * </Disclosure>
27
+ * @example
28
+ * <Disclosure open>
29
+ * <Disclosure.Trigger>{t("faq.shipping.question")}</Disclosure.Trigger>
30
+ * <Disclosure.Panel>
31
+ * <p>{t("faq.shipping.answer")}</p>
32
+ * </Disclosure.Panel>
33
+ * </Disclosure>
34
+ */
35
+ export function Disclosure(handle) {
36
+ return () => {
37
+ let { children, mix, ...rest } = handle.props;
38
+ return (_jsx("details", { ...rest, mix: [
39
+ panelChrome(),
40
+ interpolateSize(),
41
+ detailsContent([
42
+ overflow("clip"),
43
+ bs(0),
44
+ raw({
45
+ transitionProperty: "block-size, content-visibility",
46
+ transitionBehavior: "allow-discrete",
47
+ }),
48
+ transitionDuration("200ms"),
49
+ ]),
50
+ when("&[open]::details-content", bs("auto")),
51
+ media("(prefers-reduced-motion: reduce)", detailsContent(transitionDuration("0s"))),
52
+ mix,
53
+ ], children: children }));
54
+ };
55
+ }
56
+ /**
57
+ * Renders {@link Disclosure.HeaderProps.children} as an accessible heading
58
+ * at the ambient level, nested directly inside
59
+ * {@link Disclosure.Trigger}, since `<summary>` must stay `<details>`'s direct child.
60
+ *
61
+ * @param handle Runtime handle carrying the host heading element's props.
62
+ * @returns The render function producing the heading's markup.
63
+ * @example
64
+ * <Disclosure.Trigger>
65
+ * <Disclosure.Header>{t("faq.refunds.question")}</Disclosure.Header>
66
+ * </Disclosure.Trigger>
67
+ */
68
+ Disclosure.Header = function DisclosureHeader(handle) {
69
+ return () => {
70
+ let { children, mix, ...rest } = handle.props;
71
+ let resolved = resolveHeadingLevel(handle);
72
+ let Tag = TAG_BY_LEVEL[resolved];
73
+ return (_jsx(Tag, { ...rest, "data-heading-level": resolved, mix: [m(0), mix], children: children }));
74
+ };
75
+ };
76
+ /**
77
+ * Renders {@link Disclosure.TriggerProps.children} inside a native `<summary>`
78
+ * with its marker suppressed so a consumer supplies its own indicator.
79
+ * `aria-disabled="true"` mutes appearance; the consumer's own script must still block toggling.
80
+ *
81
+ * @param handle Runtime handle carrying the host `<summary>`'s props.
82
+ * @returns The render function producing the trigger's markup.
83
+ * @example
84
+ * <Disclosure.Trigger>{t("faq.refunds.question")}</Disclosure.Trigger>
85
+ * @example
86
+ * <Disclosure.Trigger aria-disabled="true">{t("faq.archived.question")}</Disclosure.Trigger>
87
+ */
88
+ Disclosure.Trigger = function DisclosureTrigger(handle) {
89
+ return () => {
90
+ let { children, mix, ...rest } = handle.props;
91
+ return (_jsx("summary", { ...rest, mix: [
92
+ when("&:focus-visible", outline({ color: "brand.ring", offset: 2 })),
93
+ flex(),
94
+ is("full"),
95
+ items("center"),
96
+ gap(2),
97
+ rounded("lg"),
98
+ pb(3),
99
+ pi(3),
100
+ textAlign("start"),
101
+ weight("medium"),
102
+ fg("neutral.emphasis"),
103
+ hover(bg("neutral.tint")),
104
+ when('&[aria-disabled="true"]', opacity(50)),
105
+ cursor("pointer"),
106
+ listStyle(),
107
+ when("&::-webkit-details-marker", hidden()),
108
+ when("&::marker", raw({ content: '""' })),
109
+ transition("color, background-color, border-color, outline-color, text-decoration-color, fill, stroke"),
110
+ when('&[aria-disabled="true"]', cursor("not-allowed")),
111
+ mix,
112
+ ], children: children }));
113
+ };
114
+ };
115
+ /**
116
+ * Renders {@link Disclosure.PanelProps.children} in a `<div>` positioned
117
+ * after {@link Disclosure.Trigger}, all `<details>` needs to treat it as
118
+ * the collapsible body. Its padding is left for the consumer to size.
119
+ *
120
+ * @param handle Runtime handle carrying the host `<div>`'s props.
121
+ * @returns The render function producing the panel's markup.
122
+ * @example
123
+ * <Disclosure.Panel>
124
+ * <p>{t("faq.refunds.answer")}</p>
125
+ * </Disclosure.Panel>
126
+ */
127
+ Disclosure.Panel = function DisclosurePanel(handle) {
128
+ return () => {
129
+ let { children, mix, ...rest } = handle.props;
130
+ return (_jsx("div", { ...rest, mix: [overflow(), mix], children: children }));
131
+ };
132
+ };
133
+ /**
134
+ * Renders {@link Disclosure.GroupProps.children} as a bordered, rounded list
135
+ * of {@link Disclosure} sections sharing one divider between them. Sections
136
+ * keep toggling independently unless they share a `name`.
137
+ *
138
+ * @param handle Runtime handle carrying the host `<div>`'s props.
139
+ * @returns The render function producing the list's markup.
140
+ * @example
141
+ * <Disclosure.Group>
142
+ * <Disclosure>
143
+ * <Disclosure.Trigger>{t("faq.refunds.question")}</Disclosure.Trigger>
144
+ * <Disclosure.Panel>
145
+ * <p>{t("faq.refunds.answer")}</p>
146
+ * </Disclosure.Panel>
147
+ * </Disclosure>
148
+ * <Disclosure>
149
+ * <Disclosure.Trigger>{t("faq.shipping.question")}</Disclosure.Trigger>
150
+ * <Disclosure.Panel>
151
+ * <p>{t("faq.shipping.answer")}</p>
152
+ * </Disclosure.Panel>
153
+ * </Disclosure>
154
+ * </Disclosure.Group>
155
+ */
156
+ Disclosure.Group = function DisclosureGroup(handle) {
157
+ return () => {
158
+ let { children, mix, ...rest } = handle.props;
159
+ return (_jsx("div", { ...rest, mix: [
160
+ flex(),
161
+ flexCol(),
162
+ when("& > details", [
163
+ rounded("none"),
164
+ borderEdge("inline-start", { width: "0", noStyleDefault: true }),
165
+ borderEdge("inline-end", { width: "0", noStyleDefault: true }),
166
+ borderEdge("block-start", { width: "0", noStyleDefault: true }),
167
+ when("&:first-child", [
168
+ roundedCorner("start-start", "lg"),
169
+ roundedCorner("start-end", "lg"),
170
+ borderEdge("block-start", { width: 1, noStyleDefault: true }),
171
+ ]),
172
+ when("&:last-child", [
173
+ roundedCorner("end-start", "lg"),
174
+ roundedCorner("end-end", "lg"),
175
+ ]),
176
+ ]),
177
+ mix,
178
+ ], children: children }));
179
+ };
180
+ };
@@ -0,0 +1,82 @@
1
+ /**
2
+ * A preset of {@link Dialog} docked flush against one physical edge of the
3
+ * viewport, sized to fill that edge and sliding into place from it on open,
4
+ * back out on close. Every other detail — the dimming, blurrable
5
+ * `::backdrop`, the `ui-dialog` named container its compound parts query,
6
+ * and the missing-`id` dev-mode contract check — carries over from
7
+ * {@link Dialog}, since this component composes it directly.
8
+ *
9
+ * @author [Sergio Xalambrí](https://sergiodxa.com)
10
+ * @copyright Sergio Xalambrí 2026
11
+ */
12
+ import type { Handle } from "remix/ui";
13
+ import { Dialog } from "./dialog.js";
14
+ /**
15
+ * Prop types for {@link Drawer} and its compound parts. Each compound part
16
+ * aliases {@link Dialog}'s matching part, since {@link Drawer} renders
17
+ * straight through to {@link Dialog}'s markup.
18
+ */
19
+ export declare namespace Drawer {
20
+ /**
21
+ * Physical edge of the viewport the panel docks against and slides in from.
22
+ * `"left"`/`"right"` name that fixed edge regardless of `dir`;
23
+ * `"top"`/`"bottom"` name the block axis, which already tracks `dir` on its own.
24
+ */
25
+ type Placement = "top" | "right" | "bottom" | "left";
26
+ /** Every prop {@link Dialog.Props} accepts, plus `placement`. */
27
+ interface Props extends Dialog.Props {
28
+ /**
29
+ * Physical edge of the viewport to dock against and slide in from.
30
+ * Defaults to {@link DEFAULT_PLACEMENT}.
31
+ */
32
+ placement?: Placement;
33
+ }
34
+ /** Every prop {@link Dialog.HeaderProps} accepts, unchanged. */
35
+ interface HeaderProps extends Dialog.HeaderProps {
36
+ }
37
+ /** Every prop {@link Dialog.TitleProps} accepts, unchanged. */
38
+ interface TitleProps extends Dialog.TitleProps {
39
+ }
40
+ /** Every prop {@link Dialog.DescriptionProps} accepts, unchanged. */
41
+ interface DescriptionProps extends Dialog.DescriptionProps {
42
+ }
43
+ /** Every prop {@link Dialog.FooterProps} accepts, unchanged. */
44
+ interface FooterProps extends Dialog.FooterProps {
45
+ }
46
+ /** Every prop {@link Dialog.CloseProps} accepts, unchanged. */
47
+ interface CloseProps extends Dialog.CloseProps {
48
+ }
49
+ }
50
+ /**
51
+ * Renders {@link Dialog} pinned to one edge of the viewport, animating a
52
+ * `transform` off the native `open` attribute so `@starting-style` can
53
+ * animate the close; a `mix` prop composes alongside this placement styling.
54
+ *
55
+ * @param handle Runtime handle carrying the host `<dialog>`'s props, plus `placement`.
56
+ * @returns The render function producing the docked panel's markup.
57
+ * @example
58
+ * <Button commandfor="cart" command="show-modal">{t("cart.open")}</Button>
59
+ * <Drawer id="cart" placement="right" aria-labelledby="cart-title">
60
+ * <Drawer.Header>
61
+ * <Drawer.Title id="cart-title">{t("cart.title")}</Drawer.Title>
62
+ * </Drawer.Header>
63
+ * <Drawer.Close commandfor="cart" aria-label={t("actions.close")} />
64
+ * </Drawer>
65
+ * @example
66
+ * <Drawer id="filters" placement="bottom" aria-labelledby="filters-title">
67
+ * <Drawer.Header>
68
+ * <Drawer.Title id="filters-title">{t("filters.title")}</Drawer.Title>
69
+ * </Drawer.Header>
70
+ * <Drawer.Footer>
71
+ * <Button commandfor="filters" command="close">{t("actions.apply")}</Button>
72
+ * </Drawer.Footer>
73
+ * </Drawer>
74
+ */
75
+ export declare function Drawer(handle: Handle<Drawer.Props>): () => import("remix/ui").RemixElement;
76
+ export declare namespace Drawer {
77
+ var Header: (handle: Handle<Dialog.HeaderProps>) => () => import("remix/ui").RemixElement;
78
+ var Title: (handle: Handle<Dialog.TitleProps>) => () => import("remix/ui").RemixElement;
79
+ var Description: (handle: Handle<Dialog.DescriptionProps>) => () => import("remix/ui").RemixElement;
80
+ var Footer: (handle: Handle<Dialog.FooterProps>) => () => import("remix/ui").RemixElement;
81
+ var Close: (handle: Handle<Dialog.CloseProps>) => () => import("remix/ui").RemixElement;
82
+ }