@mortenbrudvik/waveui 0.4.0 → 0.7.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 (574) hide show
  1. package/README.md +1221 -173
  2. package/dist/_virtual/_rolldown/runtime.cjs +1 -0
  3. package/dist/components/button/Button.cjs +2 -0
  4. package/dist/components/button/Button.cjs.map +1 -0
  5. package/dist/components/button/Button.mjs +50 -0
  6. package/dist/components/button/Button.mjs.map +1 -0
  7. package/dist/components/button/Button.semantics.cjs +2 -0
  8. package/dist/components/button/Button.semantics.cjs.map +1 -0
  9. package/dist/components/button/Button.semantics.mjs +61 -0
  10. package/dist/components/button/Button.semantics.mjs.map +1 -0
  11. package/dist/components/button/Button.slots.cjs +2 -0
  12. package/dist/components/button/Button.slots.cjs.map +1 -0
  13. package/dist/components/button/Button.slots.mjs +47 -0
  14. package/dist/components/button/Button.slots.mjs.map +1 -0
  15. package/dist/components/button/CompoundButton.cjs +2 -0
  16. package/dist/components/button/CompoundButton.cjs.map +1 -0
  17. package/dist/components/button/CompoundButton.mjs +53 -0
  18. package/dist/components/button/CompoundButton.mjs.map +1 -0
  19. package/dist/components/button/Link.cjs +2 -0
  20. package/dist/components/button/Link.cjs.map +1 -0
  21. package/dist/components/button/Link.mjs +37 -0
  22. package/dist/components/button/Link.mjs.map +1 -0
  23. package/dist/components/button/MenuButton.cjs +2 -0
  24. package/dist/components/button/MenuButton.cjs.map +1 -0
  25. package/dist/components/button/MenuButton.mjs +45 -0
  26. package/dist/components/button/MenuButton.mjs.map +1 -0
  27. package/dist/components/button/SplitButton.cjs +2 -0
  28. package/dist/components/button/SplitButton.cjs.map +1 -0
  29. package/dist/components/button/SplitButton.mjs +66 -0
  30. package/dist/components/button/SplitButton.mjs.map +1 -0
  31. package/dist/components/button/ToggleButton.cjs +2 -0
  32. package/dist/components/button/ToggleButton.cjs.map +1 -0
  33. package/dist/components/button/ToggleButton.mjs +65 -0
  34. package/dist/components/button/ToggleButton.mjs.map +1 -0
  35. package/dist/components/button/Toolbar.cjs +2 -0
  36. package/dist/components/button/Toolbar.cjs.map +1 -0
  37. package/dist/components/button/Toolbar.context.cjs +2 -0
  38. package/dist/components/button/Toolbar.context.cjs.map +1 -0
  39. package/dist/components/button/Toolbar.context.mjs +31 -0
  40. package/dist/components/button/Toolbar.context.mjs.map +1 -0
  41. package/dist/components/button/Toolbar.mjs +63 -0
  42. package/dist/components/button/Toolbar.mjs.map +1 -0
  43. package/dist/components/button/Toolbar.parts.cjs +2 -0
  44. package/dist/components/button/Toolbar.parts.cjs.map +1 -0
  45. package/dist/components/button/Toolbar.parts.mjs +131 -0
  46. package/dist/components/button/Toolbar.parts.mjs.map +1 -0
  47. package/dist/components/button/buttonStyles.cjs +2 -0
  48. package/dist/components/button/buttonStyles.cjs.map +1 -0
  49. package/dist/components/button/buttonStyles.mjs +39 -0
  50. package/dist/components/button/buttonStyles.mjs.map +1 -0
  51. package/dist/components/data-display/Avatar.cjs +2 -0
  52. package/dist/components/data-display/Avatar.cjs.map +1 -0
  53. package/dist/components/data-display/Avatar.mjs +157 -0
  54. package/dist/components/data-display/Avatar.mjs.map +1 -0
  55. package/dist/components/data-display/AvatarGroup.cjs +2 -0
  56. package/dist/components/data-display/AvatarGroup.cjs.map +1 -0
  57. package/dist/components/data-display/AvatarGroup.mjs +134 -0
  58. package/dist/components/data-display/AvatarGroup.mjs.map +1 -0
  59. package/dist/components/data-display/Badge.cjs +2 -0
  60. package/dist/components/data-display/Badge.cjs.map +1 -0
  61. package/dist/components/data-display/Badge.colors.cjs +2 -0
  62. package/dist/components/data-display/Badge.colors.cjs.map +1 -0
  63. package/dist/components/data-display/Badge.colors.mjs +58 -0
  64. package/dist/components/data-display/Badge.colors.mjs.map +1 -0
  65. package/dist/components/data-display/Badge.mjs +32 -0
  66. package/dist/components/data-display/Badge.mjs.map +1 -0
  67. package/dist/components/data-display/CounterBadge.cjs +2 -0
  68. package/dist/components/data-display/CounterBadge.cjs.map +1 -0
  69. package/dist/components/data-display/CounterBadge.mjs +28 -0
  70. package/dist/components/data-display/CounterBadge.mjs.map +1 -0
  71. package/dist/components/data-display/Divider.cjs +2 -0
  72. package/dist/components/data-display/Divider.cjs.map +1 -0
  73. package/dist/components/data-display/Divider.mjs +52 -0
  74. package/dist/components/data-display/Divider.mjs.map +1 -0
  75. package/dist/components/data-display/Image.cjs +2 -0
  76. package/dist/components/data-display/Image.cjs.map +1 -0
  77. package/dist/components/data-display/Image.mjs +32 -0
  78. package/dist/components/data-display/Image.mjs.map +1 -0
  79. package/dist/components/data-display/InfoLabel.cjs +2 -0
  80. package/dist/components/data-display/InfoLabel.cjs.map +1 -0
  81. package/dist/components/data-display/InfoLabel.mjs +104 -0
  82. package/dist/components/data-display/InfoLabel.mjs.map +1 -0
  83. package/dist/components/data-display/List.cjs +2 -0
  84. package/dist/components/data-display/List.cjs.map +1 -0
  85. package/dist/components/data-display/List.mjs +381 -0
  86. package/dist/components/data-display/List.mjs.map +1 -0
  87. package/dist/components/data-display/List.registry.cjs +2 -0
  88. package/dist/components/data-display/List.registry.cjs.map +1 -0
  89. package/dist/components/data-display/List.registry.mjs +101 -0
  90. package/dist/components/data-display/List.registry.mjs.map +1 -0
  91. package/dist/components/data-display/Persona.cjs +2 -0
  92. package/dist/components/data-display/Persona.cjs.map +1 -0
  93. package/dist/components/data-display/Persona.mjs +48 -0
  94. package/dist/components/data-display/Persona.mjs.map +1 -0
  95. package/dist/components/data-display/PresenceBadge.cjs +2 -0
  96. package/dist/components/data-display/PresenceBadge.cjs.map +1 -0
  97. package/dist/components/data-display/PresenceBadge.mjs +71 -0
  98. package/dist/components/data-display/PresenceBadge.mjs.map +1 -0
  99. package/dist/components/data-display/Tag.cjs +2 -0
  100. package/dist/components/data-display/Tag.cjs.map +1 -0
  101. package/dist/components/data-display/Tag.mjs +147 -0
  102. package/dist/components/data-display/Tag.mjs.map +1 -0
  103. package/dist/components/feedback/MessageBar.cjs +2 -0
  104. package/dist/components/feedback/MessageBar.cjs.map +1 -0
  105. package/dist/components/feedback/MessageBar.mjs +144 -0
  106. package/dist/components/feedback/MessageBar.mjs.map +1 -0
  107. package/dist/components/feedback/MessageBar.status.cjs +2 -0
  108. package/dist/components/feedback/MessageBar.status.cjs.map +1 -0
  109. package/dist/components/feedback/MessageBar.status.mjs +45 -0
  110. package/dist/components/feedback/MessageBar.status.mjs.map +1 -0
  111. package/dist/components/feedback/ProgressBar.cjs +2 -0
  112. package/dist/components/feedback/ProgressBar.cjs.map +1 -0
  113. package/dist/components/feedback/ProgressBar.mjs +72 -0
  114. package/dist/components/feedback/ProgressBar.mjs.map +1 -0
  115. package/dist/components/feedback/Skeleton.cjs +2 -0
  116. package/dist/components/feedback/Skeleton.cjs.map +1 -0
  117. package/dist/components/feedback/Skeleton.mjs +47 -0
  118. package/dist/components/feedback/Skeleton.mjs.map +1 -0
  119. package/dist/components/feedback/Spinner.cjs +2 -0
  120. package/dist/components/feedback/Spinner.cjs.map +1 -0
  121. package/dist/components/feedback/Spinner.mjs +60 -0
  122. package/dist/components/feedback/Spinner.mjs.map +1 -0
  123. package/dist/components/feedback/Toast.cjs +2 -0
  124. package/dist/components/feedback/Toast.cjs.map +1 -0
  125. package/dist/components/feedback/Toast.mjs +347 -0
  126. package/dist/components/feedback/Toast.mjs.map +1 -0
  127. package/dist/components/input/Checkbox.cjs +2 -0
  128. package/dist/components/input/Checkbox.cjs.map +1 -0
  129. package/dist/components/input/Checkbox.mjs +96 -0
  130. package/dist/components/input/Checkbox.mjs.map +1 -0
  131. package/dist/components/input/ColorPicker.cjs +6 -0
  132. package/dist/components/input/ColorPicker.cjs.map +1 -0
  133. package/dist/components/input/ColorPicker.mjs +236 -0
  134. package/dist/components/input/ColorPicker.mjs.map +1 -0
  135. package/dist/components/input/Combobox.cjs +2 -0
  136. package/dist/components/input/Combobox.cjs.map +1 -0
  137. package/dist/components/input/Combobox.expand.cjs +2 -0
  138. package/dist/components/input/Combobox.expand.cjs.map +1 -0
  139. package/dist/components/input/Combobox.expand.mjs +38 -0
  140. package/dist/components/input/Combobox.expand.mjs.map +1 -0
  141. package/dist/components/input/Combobox.mjs +187 -0
  142. package/dist/components/input/Combobox.mjs.map +1 -0
  143. package/dist/components/input/DatePicker.cjs +2 -0
  144. package/dist/components/input/DatePicker.cjs.map +1 -0
  145. package/dist/components/input/DatePicker.mjs +340 -0
  146. package/dist/components/input/DatePicker.mjs.map +1 -0
  147. package/dist/components/input/Dropdown.cjs +2 -0
  148. package/dist/components/input/Dropdown.cjs.map +1 -0
  149. package/dist/components/input/Dropdown.mjs +128 -0
  150. package/dist/components/input/Dropdown.mjs.map +1 -0
  151. package/dist/components/input/Field.cjs +2 -0
  152. package/dist/components/input/Field.cjs.map +1 -0
  153. package/dist/components/input/Field.mjs +200 -0
  154. package/dist/components/input/Field.mjs.map +1 -0
  155. package/dist/components/input/Input.cjs +2 -0
  156. package/dist/components/input/Input.cjs.map +1 -0
  157. package/dist/components/input/Input.mjs +81 -0
  158. package/dist/components/input/Input.mjs.map +1 -0
  159. package/dist/components/input/Label.cjs +2 -0
  160. package/dist/components/input/Label.cjs.map +1 -0
  161. package/dist/components/input/Label.mjs +28 -0
  162. package/dist/components/input/Label.mjs.map +1 -0
  163. package/dist/components/input/Option.cjs +2 -0
  164. package/dist/components/input/Option.cjs.map +1 -0
  165. package/dist/components/input/Option.mjs +169 -0
  166. package/dist/components/input/Option.mjs.map +1 -0
  167. package/dist/components/input/RadioGroup.cjs +2 -0
  168. package/dist/components/input/RadioGroup.cjs.map +1 -0
  169. package/dist/components/input/RadioGroup.mjs +139 -0
  170. package/dist/components/input/RadioGroup.mjs.map +1 -0
  171. package/dist/components/input/Rating.cjs +2 -0
  172. package/dist/components/input/Rating.cjs.map +1 -0
  173. package/dist/components/input/Rating.mjs +196 -0
  174. package/dist/components/input/Rating.mjs.map +1 -0
  175. package/dist/components/input/SearchBox.cjs +2 -0
  176. package/dist/components/input/SearchBox.cjs.map +1 -0
  177. package/dist/components/input/SearchBox.mjs +205 -0
  178. package/dist/components/input/SearchBox.mjs.map +1 -0
  179. package/dist/components/input/Select.cjs +2 -0
  180. package/dist/components/input/Select.cjs.map +1 -0
  181. package/dist/components/input/Select.mjs +33 -0
  182. package/dist/components/input/Select.mjs.map +1 -0
  183. package/dist/components/input/Slider.cjs +2 -0
  184. package/dist/components/input/Slider.cjs.map +1 -0
  185. package/dist/components/input/Slider.mjs +79 -0
  186. package/dist/components/input/Slider.mjs.map +1 -0
  187. package/dist/components/input/SpinButton.cjs +2 -0
  188. package/dist/components/input/SpinButton.cjs.map +1 -0
  189. package/dist/components/input/SpinButton.mjs +157 -0
  190. package/dist/components/input/SpinButton.mjs.map +1 -0
  191. package/dist/components/input/SwatchPicker.cjs +2 -0
  192. package/dist/components/input/SwatchPicker.cjs.map +1 -0
  193. package/dist/components/input/SwatchPicker.mjs +113 -0
  194. package/dist/components/input/SwatchPicker.mjs.map +1 -0
  195. package/dist/components/input/Switch.cjs +2 -0
  196. package/dist/components/input/Switch.cjs.map +1 -0
  197. package/dist/components/input/Switch.mjs +92 -0
  198. package/dist/components/input/Switch.mjs.map +1 -0
  199. package/dist/components/input/TagPicker.cjs +2 -0
  200. package/dist/components/input/TagPicker.cjs.map +1 -0
  201. package/dist/components/input/TagPicker.mjs +249 -0
  202. package/dist/components/input/TagPicker.mjs.map +1 -0
  203. package/dist/components/input/Textarea.cjs +2 -0
  204. package/dist/components/input/Textarea.cjs.map +1 -0
  205. package/dist/components/input/Textarea.mjs +32 -0
  206. package/dist/components/input/Textarea.mjs.map +1 -0
  207. package/dist/components/input/TimePicker.cjs +2 -0
  208. package/dist/components/input/TimePicker.cjs.map +1 -0
  209. package/dist/components/input/TimePicker.mjs +292 -0
  210. package/dist/components/input/TimePicker.mjs.map +1 -0
  211. package/dist/components/input/colorUtils.cjs +2 -0
  212. package/dist/components/input/colorUtils.cjs.map +1 -0
  213. package/dist/components/input/colorUtils.mjs +96 -0
  214. package/dist/components/input/colorUtils.mjs.map +1 -0
  215. package/dist/components/input/dateUtils.cjs +2 -0
  216. package/dist/components/input/dateUtils.cjs.map +1 -0
  217. package/dist/components/input/dateUtils.mjs +250 -0
  218. package/dist/components/input/dateUtils.mjs.map +1 -0
  219. package/dist/components/input/pickerStyles.cjs +2 -0
  220. package/dist/components/input/pickerStyles.cjs.map +1 -0
  221. package/dist/components/input/pickerStyles.mjs +10 -0
  222. package/dist/components/input/pickerStyles.mjs.map +1 -0
  223. package/dist/components/internal/HiddenInput.cjs +2 -0
  224. package/dist/components/internal/HiddenInput.cjs.map +1 -0
  225. package/dist/components/internal/HiddenInput.mjs +88 -0
  226. package/dist/components/internal/HiddenInput.mjs.map +1 -0
  227. package/dist/components/layout/Accordion.cjs +2 -0
  228. package/dist/components/layout/Accordion.cjs.map +1 -0
  229. package/dist/components/layout/Accordion.mjs +236 -0
  230. package/dist/components/layout/Accordion.mjs.map +1 -0
  231. package/dist/components/layout/Card.cjs +2 -0
  232. package/dist/components/layout/Card.cjs.map +1 -0
  233. package/dist/components/layout/Card.mjs +121 -0
  234. package/dist/components/layout/Card.mjs.map +1 -0
  235. package/dist/components/layout/Carousel.cjs +2 -0
  236. package/dist/components/layout/Carousel.cjs.map +1 -0
  237. package/dist/components/layout/Carousel.mjs +205 -0
  238. package/dist/components/layout/Carousel.mjs.map +1 -0
  239. package/dist/components/layout/Flex.cjs +2 -0
  240. package/dist/components/layout/Flex.cjs.map +1 -0
  241. package/dist/components/layout/Flex.mjs +54 -0
  242. package/dist/components/layout/Flex.mjs.map +1 -0
  243. package/dist/components/layout/Grid.cjs +2 -0
  244. package/dist/components/layout/Grid.cjs.map +1 -0
  245. package/dist/components/layout/Grid.mjs +62 -0
  246. package/dist/components/layout/Grid.mjs.map +1 -0
  247. package/dist/components/layout/Overflow.cjs +2 -0
  248. package/dist/components/layout/Overflow.cjs.map +1 -0
  249. package/dist/components/layout/Overflow.mjs +269 -0
  250. package/dist/components/layout/Overflow.mjs.map +1 -0
  251. package/dist/components/layout/Stack.cjs +2 -0
  252. package/dist/components/layout/Stack.cjs.map +1 -0
  253. package/dist/components/layout/Stack.mjs +39 -0
  254. package/dist/components/layout/Stack.mjs.map +1 -0
  255. package/dist/components/layout/TabList.cjs +2 -0
  256. package/dist/components/layout/TabList.cjs.map +1 -0
  257. package/dist/components/layout/TabList.mjs +238 -0
  258. package/dist/components/layout/TabList.mjs.map +1 -0
  259. package/dist/components/layout/Tree.cjs +2 -0
  260. package/dist/components/layout/Tree.cjs.map +1 -0
  261. package/dist/components/layout/Tree.mjs +220 -0
  262. package/dist/components/layout/Tree.mjs.map +1 -0
  263. package/dist/components/layout/disclosureIds.cjs +2 -0
  264. package/dist/components/layout/disclosureIds.cjs.map +1 -0
  265. package/dist/components/layout/disclosureIds.mjs +12 -0
  266. package/dist/components/layout/disclosureIds.mjs.map +1 -0
  267. package/dist/components/motion/Presence.cjs +2 -0
  268. package/dist/components/motion/Presence.cjs.map +1 -0
  269. package/dist/components/motion/Presence.mjs +35 -0
  270. package/dist/components/motion/Presence.mjs.map +1 -0
  271. package/dist/components/navigation/Breadcrumb.cjs +2 -0
  272. package/dist/components/navigation/Breadcrumb.cjs.map +1 -0
  273. package/dist/components/navigation/Breadcrumb.mjs +144 -0
  274. package/dist/components/navigation/Breadcrumb.mjs.map +1 -0
  275. package/dist/components/navigation/Menu.cjs +2 -0
  276. package/dist/components/navigation/Menu.cjs.map +1 -0
  277. package/dist/components/navigation/Menu.context.cjs +2 -0
  278. package/dist/components/navigation/Menu.context.cjs.map +1 -0
  279. package/dist/components/navigation/Menu.context.mjs +82 -0
  280. package/dist/components/navigation/Menu.context.mjs.map +1 -0
  281. package/dist/components/navigation/Menu.group.cjs +2 -0
  282. package/dist/components/navigation/Menu.group.cjs.map +1 -0
  283. package/dist/components/navigation/Menu.group.mjs +58 -0
  284. package/dist/components/navigation/Menu.group.mjs.map +1 -0
  285. package/dist/components/navigation/Menu.items.cjs +2 -0
  286. package/dist/components/navigation/Menu.items.cjs.map +1 -0
  287. package/dist/components/navigation/Menu.items.mjs +127 -0
  288. package/dist/components/navigation/Menu.items.mjs.map +1 -0
  289. package/dist/components/navigation/Menu.link.cjs +2 -0
  290. package/dist/components/navigation/Menu.link.cjs.map +1 -0
  291. package/dist/components/navigation/Menu.link.mjs +41 -0
  292. package/dist/components/navigation/Menu.link.mjs.map +1 -0
  293. package/dist/components/navigation/Menu.mjs +27 -0
  294. package/dist/components/navigation/Menu.mjs.map +1 -0
  295. package/dist/components/navigation/Menu.popover.cjs +2 -0
  296. package/dist/components/navigation/Menu.popover.cjs.map +1 -0
  297. package/dist/components/navigation/Menu.popover.mjs +231 -0
  298. package/dist/components/navigation/Menu.popover.mjs.map +1 -0
  299. package/dist/components/navigation/Menu.root.cjs +2 -0
  300. package/dist/components/navigation/Menu.root.cjs.map +1 -0
  301. package/dist/components/navigation/Menu.root.mjs +308 -0
  302. package/dist/components/navigation/Menu.root.mjs.map +1 -0
  303. package/dist/components/navigation/Menu.selectable.cjs +2 -0
  304. package/dist/components/navigation/Menu.selectable.cjs.map +1 -0
  305. package/dist/components/navigation/Menu.selectable.mjs +89 -0
  306. package/dist/components/navigation/Menu.selectable.mjs.map +1 -0
  307. package/dist/components/navigation/Menu.shared.cjs +2 -0
  308. package/dist/components/navigation/Menu.shared.cjs.map +1 -0
  309. package/dist/components/navigation/Menu.shared.mjs +23 -0
  310. package/dist/components/navigation/Menu.shared.mjs.map +1 -0
  311. package/dist/components/navigation/Menu.splitGroup.cjs +2 -0
  312. package/dist/components/navigation/Menu.splitGroup.cjs.map +1 -0
  313. package/dist/components/navigation/Menu.splitGroup.mjs +51 -0
  314. package/dist/components/navigation/Menu.splitGroup.mjs.map +1 -0
  315. package/dist/components/navigation/Menu.trigger.cjs +2 -0
  316. package/dist/components/navigation/Menu.trigger.cjs.map +1 -0
  317. package/dist/components/navigation/Menu.trigger.mjs +79 -0
  318. package/dist/components/navigation/Menu.trigger.mjs.map +1 -0
  319. package/dist/components/navigation/Nav.cjs +2 -0
  320. package/dist/components/navigation/Nav.cjs.map +1 -0
  321. package/dist/components/navigation/Nav.mjs +276 -0
  322. package/dist/components/navigation/Nav.mjs.map +1 -0
  323. package/dist/components/navigation/Pagination.cjs +2 -0
  324. package/dist/components/navigation/Pagination.cjs.map +1 -0
  325. package/dist/components/navigation/Pagination.mjs +110 -0
  326. package/dist/components/navigation/Pagination.mjs.map +1 -0
  327. package/dist/components/navigation/Stepper.cjs +2 -0
  328. package/dist/components/navigation/Stepper.cjs.map +1 -0
  329. package/dist/components/navigation/Stepper.mjs +204 -0
  330. package/dist/components/navigation/Stepper.mjs.map +1 -0
  331. package/dist/components/overlays/Dialog.cjs +2 -0
  332. package/dist/components/overlays/Dialog.cjs.map +1 -0
  333. package/dist/components/overlays/Dialog.mjs +180 -0
  334. package/dist/components/overlays/Dialog.mjs.map +1 -0
  335. package/dist/components/overlays/Dialog.shared.cjs +2 -0
  336. package/dist/components/overlays/Dialog.shared.cjs.map +1 -0
  337. package/dist/components/overlays/Dialog.shared.mjs +227 -0
  338. package/dist/components/overlays/Dialog.shared.mjs.map +1 -0
  339. package/dist/components/overlays/Drawer.cjs +2 -0
  340. package/dist/components/overlays/Drawer.cjs.map +1 -0
  341. package/dist/components/overlays/Drawer.mjs +192 -0
  342. package/dist/components/overlays/Drawer.mjs.map +1 -0
  343. package/dist/components/overlays/Popover.cjs +2 -0
  344. package/dist/components/overlays/Popover.cjs.map +1 -0
  345. package/dist/components/overlays/Popover.mjs +365 -0
  346. package/dist/components/overlays/Popover.mjs.map +1 -0
  347. package/dist/components/overlays/Popover.shared.cjs +2 -0
  348. package/dist/components/overlays/Popover.shared.cjs.map +1 -0
  349. package/dist/components/overlays/Popover.shared.mjs +182 -0
  350. package/dist/components/overlays/Popover.shared.mjs.map +1 -0
  351. package/dist/components/overlays/TeachingPopover.cjs +2 -0
  352. package/dist/components/overlays/TeachingPopover.cjs.map +1 -0
  353. package/dist/components/overlays/TeachingPopover.mjs +181 -0
  354. package/dist/components/overlays/TeachingPopover.mjs.map +1 -0
  355. package/dist/components/overlays/Tooltip.cjs +2 -0
  356. package/dist/components/overlays/Tooltip.cjs.map +1 -0
  357. package/dist/components/overlays/Tooltip.mjs +160 -0
  358. package/dist/components/overlays/Tooltip.mjs.map +1 -0
  359. package/dist/components/portal/Portal.cjs +2 -0
  360. package/dist/components/portal/Portal.cjs.map +1 -0
  361. package/dist/components/portal/Portal.mjs +45 -0
  362. package/dist/components/portal/Portal.mjs.map +1 -0
  363. package/dist/components/provider/WaveProvider.cjs +2 -0
  364. package/dist/components/provider/WaveProvider.cjs.map +1 -0
  365. package/dist/components/provider/WaveProvider.mjs +51 -0
  366. package/dist/components/provider/WaveProvider.mjs.map +1 -0
  367. package/dist/components/table/DataGrid.cjs +2 -0
  368. package/dist/components/table/DataGrid.cjs.map +1 -0
  369. package/dist/components/table/DataGrid.mjs +489 -0
  370. package/dist/components/table/DataGrid.mjs.map +1 -0
  371. package/dist/components/table/Table.cjs +2 -0
  372. package/dist/components/table/Table.cjs.map +1 -0
  373. package/dist/components/table/Table.mjs +99 -0
  374. package/dist/components/table/Table.mjs.map +1 -0
  375. package/dist/components/table/useGridNavigation.cjs +2 -0
  376. package/dist/components/table/useGridNavigation.cjs.map +1 -0
  377. package/dist/components/table/useGridNavigation.mjs +336 -0
  378. package/dist/components/table/useGridNavigation.mjs.map +1 -0
  379. package/dist/components/typography/Text.cjs +2 -0
  380. package/dist/components/typography/Text.cjs.map +1 -0
  381. package/dist/components/typography/Text.mjs +38 -0
  382. package/dist/components/typography/Text.mjs.map +1 -0
  383. package/dist/hooks/useAnnounce.cjs +2 -0
  384. package/dist/hooks/useAnnounce.cjs.map +1 -0
  385. package/dist/hooks/useAnnounce.mjs +88 -0
  386. package/dist/hooks/useAnnounce.mjs.map +1 -0
  387. package/dist/hooks/useCheckedValues.cjs +2 -0
  388. package/dist/hooks/useCheckedValues.cjs.map +1 -0
  389. package/dist/hooks/useCheckedValues.mjs +102 -0
  390. package/dist/hooks/useCheckedValues.mjs.map +1 -0
  391. package/dist/hooks/useContextMenuAnchor.cjs +2 -0
  392. package/dist/hooks/useContextMenuAnchor.cjs.map +1 -0
  393. package/dist/hooks/useContextMenuAnchor.mjs +132 -0
  394. package/dist/hooks/useContextMenuAnchor.mjs.map +1 -0
  395. package/dist/hooks/useControllable.cjs +2 -0
  396. package/dist/hooks/useControllable.cjs.map +1 -0
  397. package/dist/hooks/useControllable.mjs +37 -0
  398. package/dist/hooks/useControllable.mjs.map +1 -0
  399. package/dist/hooks/useDirection.cjs +2 -0
  400. package/dist/hooks/useDirection.cjs.map +1 -0
  401. package/dist/hooks/useDirection.mjs +57 -0
  402. package/dist/hooks/useDirection.mjs.map +1 -0
  403. package/dist/hooks/useDismiss.cjs +2 -0
  404. package/dist/hooks/useDismiss.cjs.map +1 -0
  405. package/dist/hooks/useDismiss.mjs +57 -0
  406. package/dist/hooks/useDismiss.mjs.map +1 -0
  407. package/dist/hooks/useEventCallback.cjs +2 -0
  408. package/dist/hooks/useEventCallback.cjs.map +1 -0
  409. package/dist/hooks/useEventCallback.mjs +16 -0
  410. package/dist/hooks/useEventCallback.mjs.map +1 -0
  411. package/dist/hooks/useFieldControl.cjs +2 -0
  412. package/dist/hooks/useFieldControl.cjs.map +1 -0
  413. package/dist/hooks/useFieldControl.mjs +62 -0
  414. package/dist/hooks/useFieldControl.mjs.map +1 -0
  415. package/dist/hooks/useFocusTrap.cjs +2 -0
  416. package/dist/hooks/useFocusTrap.cjs.map +1 -0
  417. package/dist/hooks/useFocusTrap.mjs +266 -0
  418. package/dist/hooks/useFocusTrap.mjs.map +1 -0
  419. package/dist/hooks/useFormReset.cjs +2 -0
  420. package/dist/hooks/useFormReset.cjs.map +1 -0
  421. package/dist/hooks/useFormReset.mjs +33 -0
  422. package/dist/hooks/useFormReset.mjs.map +1 -0
  423. package/dist/hooks/useHoverIntent.cjs +2 -0
  424. package/dist/hooks/useHoverIntent.cjs.map +1 -0
  425. package/dist/hooks/useHoverIntent.mjs +201 -0
  426. package/dist/hooks/useHoverIntent.mjs.map +1 -0
  427. package/dist/hooks/useId.cjs +2 -0
  428. package/dist/hooks/useId.cjs.map +1 -0
  429. package/dist/hooks/useId.mjs +11 -0
  430. package/dist/hooks/useId.mjs.map +1 -0
  431. package/dist/hooks/useIsClient.cjs +2 -0
  432. package/dist/hooks/useIsClient.cjs.map +1 -0
  433. package/dist/hooks/useIsClient.mjs +19 -0
  434. package/dist/hooks/useIsClient.mjs.map +1 -0
  435. package/dist/hooks/useListbox.cjs +2 -0
  436. package/dist/hooks/useListbox.cjs.map +1 -0
  437. package/dist/hooks/useListbox.mjs +492 -0
  438. package/dist/hooks/useListbox.mjs.map +1 -0
  439. package/dist/hooks/useMergedRefs.cjs +2 -0
  440. package/dist/hooks/useMergedRefs.cjs.map +1 -0
  441. package/dist/hooks/useMergedRefs.mjs +57 -0
  442. package/dist/hooks/useMergedRefs.mjs.map +1 -0
  443. package/dist/hooks/useModalIsolation.cjs +2 -0
  444. package/dist/hooks/useModalIsolation.cjs.map +1 -0
  445. package/dist/hooks/useModalIsolation.mjs +87 -0
  446. package/dist/hooks/useModalIsolation.mjs.map +1 -0
  447. package/dist/hooks/useModalLayer.cjs +2 -0
  448. package/dist/hooks/useModalLayer.cjs.map +1 -0
  449. package/dist/hooks/useModalLayer.mjs +30 -0
  450. package/dist/hooks/useModalLayer.mjs.map +1 -0
  451. package/dist/hooks/usePopupPosition.cjs +2 -0
  452. package/dist/hooks/usePopupPosition.cjs.map +1 -0
  453. package/dist/hooks/usePopupPosition.mjs +117 -0
  454. package/dist/hooks/usePopupPosition.mjs.map +1 -0
  455. package/dist/hooks/usePrefersReducedMotion.cjs +2 -0
  456. package/dist/hooks/usePrefersReducedMotion.cjs.map +1 -0
  457. package/dist/hooks/usePrefersReducedMotion.mjs +24 -0
  458. package/dist/hooks/usePrefersReducedMotion.mjs.map +1 -0
  459. package/dist/hooks/usePresence.cjs +2 -0
  460. package/dist/hooks/usePresence.cjs.map +1 -0
  461. package/dist/hooks/usePresence.mjs +136 -0
  462. package/dist/hooks/usePresence.mjs.map +1 -0
  463. package/dist/hooks/usePreserveFocus.cjs +2 -0
  464. package/dist/hooks/usePreserveFocus.cjs.map +1 -0
  465. package/dist/hooks/usePreserveFocus.mjs +50 -0
  466. package/dist/hooks/usePreserveFocus.mjs.map +1 -0
  467. package/dist/hooks/useRestoreFocus.cjs +2 -0
  468. package/dist/hooks/useRestoreFocus.cjs.map +1 -0
  469. package/dist/hooks/useRestoreFocus.mjs +271 -0
  470. package/dist/hooks/useRestoreFocus.mjs.map +1 -0
  471. package/dist/hooks/useRovingTabIndex.cjs +2 -0
  472. package/dist/hooks/useRovingTabIndex.cjs.map +1 -0
  473. package/dist/hooks/useRovingTabIndex.mjs +389 -0
  474. package/dist/hooks/useRovingTabIndex.mjs.map +1 -0
  475. package/dist/hooks/useScrollLock.cjs +2 -0
  476. package/dist/hooks/useScrollLock.cjs.map +1 -0
  477. package/dist/hooks/useScrollLock.mjs +71 -0
  478. package/dist/hooks/useScrollLock.mjs.map +1 -0
  479. package/dist/hooks/useTriggerElement.cjs +2 -0
  480. package/dist/hooks/useTriggerElement.cjs.map +1 -0
  481. package/dist/hooks/useTriggerElement.mjs +126 -0
  482. package/dist/hooks/useTriggerElement.mjs.map +1 -0
  483. package/dist/hooks/useTypeahead.cjs +2 -0
  484. package/dist/hooks/useTypeahead.cjs.map +1 -0
  485. package/dist/hooks/useTypeahead.mjs +38 -0
  486. package/dist/hooks/useTypeahead.mjs.map +1 -0
  487. package/dist/index.cjs +1 -1
  488. package/dist/index.d.cts +9099 -0
  489. package/dist/index.d.ts +7688 -1027
  490. package/dist/index.mjs +91 -5695
  491. package/dist/lib/aria.cjs +2 -0
  492. package/dist/lib/aria.cjs.map +1 -0
  493. package/dist/lib/aria.mjs +29 -0
  494. package/dist/lib/aria.mjs.map +1 -0
  495. package/dist/lib/children.cjs +2 -0
  496. package/dist/lib/children.cjs.map +1 -0
  497. package/dist/lib/children.mjs +37 -0
  498. package/dist/lib/children.mjs.map +1 -0
  499. package/dist/lib/cn.cjs +2 -0
  500. package/dist/lib/cn.cjs.map +1 -0
  501. package/dist/lib/cn.mjs +64 -0
  502. package/dist/lib/cn.mjs.map +1 -0
  503. package/dist/lib/composeEventHandlers.cjs +2 -0
  504. package/dist/lib/composeEventHandlers.cjs.map +1 -0
  505. package/dist/lib/composeEventHandlers.mjs +11 -0
  506. package/dist/lib/composeEventHandlers.mjs.map +1 -0
  507. package/dist/lib/dev.cjs +2 -0
  508. package/dist/lib/dev.cjs.map +1 -0
  509. package/dist/lib/dev.mjs +42 -0
  510. package/dist/lib/dev.mjs.map +1 -0
  511. package/dist/lib/direction.cjs +2 -0
  512. package/dist/lib/direction.cjs.map +1 -0
  513. package/dist/lib/direction.mjs +35 -0
  514. package/dist/lib/direction.mjs.map +1 -0
  515. package/dist/lib/events.cjs +2 -0
  516. package/dist/lib/events.cjs.map +1 -0
  517. package/dist/lib/events.mjs +31 -0
  518. package/dist/lib/events.mjs.map +1 -0
  519. package/dist/lib/focus.cjs +2 -0
  520. package/dist/lib/focus.cjs.map +1 -0
  521. package/dist/lib/focus.mjs +119 -0
  522. package/dist/lib/focus.mjs.map +1 -0
  523. package/dist/lib/globalRegistry.cjs +2 -0
  524. package/dist/lib/globalRegistry.cjs.map +1 -0
  525. package/dist/lib/globalRegistry.mjs +13 -0
  526. package/dist/lib/globalRegistry.mjs.map +1 -0
  527. package/dist/lib/icons.cjs +2 -0
  528. package/dist/lib/icons.cjs.map +1 -0
  529. package/dist/lib/icons.mjs +254 -0
  530. package/dist/lib/icons.mjs.map +1 -0
  531. package/dist/lib/labelInName.cjs +2 -0
  532. package/dist/lib/labelInName.cjs.map +1 -0
  533. package/dist/lib/labelInName.mjs +54 -0
  534. package/dist/lib/labelInName.mjs.map +1 -0
  535. package/dist/lib/layers.cjs +2 -0
  536. package/dist/lib/layers.cjs.map +1 -0
  537. package/dist/lib/layers.mjs +224 -0
  538. package/dist/lib/layers.mjs.map +1 -0
  539. package/dist/lib/mergeProps.cjs +2 -0
  540. package/dist/lib/mergeProps.cjs.map +1 -0
  541. package/dist/lib/mergeProps.mjs +21 -0
  542. package/dist/lib/mergeProps.mjs.map +1 -0
  543. package/dist/lib/mergeRefs.cjs +2 -0
  544. package/dist/lib/mergeRefs.cjs.map +1 -0
  545. package/dist/lib/mergeRefs.mjs +29 -0
  546. package/dist/lib/mergeRefs.mjs.map +1 -0
  547. package/dist/lib/renderTrigger.cjs +2 -0
  548. package/dist/lib/renderTrigger.cjs.map +1 -0
  549. package/dist/lib/renderTrigger.mjs +29 -0
  550. package/dist/lib/renderTrigger.mjs.map +1 -0
  551. package/dist/lib/slot.cjs +2 -0
  552. package/dist/lib/slot.cjs.map +1 -0
  553. package/dist/lib/slot.mjs +122 -0
  554. package/dist/lib/slot.mjs.map +1 -0
  555. package/dist/lib/styles.cjs +2 -0
  556. package/dist/lib/styles.cjs.map +1 -0
  557. package/dist/lib/styles.mjs +16 -0
  558. package/dist/lib/styles.mjs.map +1 -0
  559. package/dist/lib/theme.cjs +2 -0
  560. package/dist/lib/theme.cjs.map +1 -0
  561. package/dist/lib/theme.mjs +16 -0
  562. package/dist/lib/theme.mjs.map +1 -0
  563. package/dist/preflight.css +2 -0
  564. package/dist/styles.css +2 -0
  565. package/package.json +149 -100
  566. package/src/styles/animations.css +7 -39
  567. package/src/styles/base.css +103 -0
  568. package/src/styles/globals.css +10 -22
  569. package/src/styles/legacy-tokens.css +184 -0
  570. package/src/styles/preflight.css +7 -0
  571. package/src/styles/styles.css +32 -0
  572. package/src/styles/tailwind.css +17 -0
  573. package/src/styles/tokens.css +561 -221
  574. package/src/styles/variants.css +29 -0
@@ -0,0 +1,2 @@
1
+ function e(...e){let t=new Set;for(let n of e)if(n)for(let e of n.split(/\s+/))e&&t.add(e);return t.size>0?Array.from(t).join(` `):void 0}function t(e,t){return e?t?.reachable?{"aria-disabled":!0,"data-disabled":``,"data-disabled-focusable":``}:{"aria-disabled":!0,"data-disabled":``}:{}}function n(e,t){return n=>{if(e){n.preventDefault();return}t?.(n)}}exports.focusableDisabledProps=t,exports.joinIds=e,exports.preventIfDisabled=n;
2
+ //# sourceMappingURL=aria.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"aria.cjs","names":["joinIds","ids","seen","value","id","focusableDisabledProps","disabled","options","preventIfDisabled","event","handler"],"sources":["../../src/lib/aria.ts"],"sourcesContent":["/**\n * Joins id reference lists (`aria-describedby`, `aria-labelledby`, `aria-controls`, …): splits\n * each value on whitespace, drops empty values and duplicates, and keeps first-occurrence order.\n * Returns `undefined` when nothing is left, so React omits the attribute.\n *\n * @example joinIds(props['aria-describedby'], hintId, errorId)\n */\nexport function joinIds(...ids: Array<string | null | undefined | false>): string | undefined {\n const seen = new Set<string>();\n for (const value of ids) {\n if (!value) continue;\n for (const id of value.split(/\\s+/)) {\n if (id) seen.add(id);\n }\n }\n return seen.size > 0 ? Array.from(seen).join(' ') : undefined;\n}\n\n/** Props that mark a control unavailable while keeping it focusable (C-DISABLED). */\nexport interface FocusableDisabledProps {\n 'aria-disabled'?: true;\n 'data-disabled'?: '';\n /** Only with `reachable: true`. */\n 'data-disabled-focusable'?: '';\n}\n\n/** Options of {@link focusableDisabledProps}. */\nexport interface FocusableDisabledOptions {\n /**\n * Also renders `data-disabled-focusable`, which keeps the control in a roving container's\n * arrow-key order (`useRovingTabIndex`): for the `disabledFocusable` prop of buttons, links and\n * choice controls. Leave it off for controls that disable themselves through their own\n * activation (C-DISABLED), which a composite must skip.\n * @default false\n */\n reachable?: boolean;\n}\n\n/**\n * `aria-disabled` and `data-disabled` for a focusable disabled control, plus\n * `data-disabled-focusable` with `{ reachable: true }`. Returns `{}` when `disabled` is falsy.\n * Guard handlers with {@link preventIfDisabled}.\n *\n * Without the option it serves controls that become unavailable as a result of their own\n * activation (Pagination First/Prev/Next/Last, Carousel Prev/Next, TeachingPopover Back): they use\n * it instead of native `disabled`, so focus is not lost to `<body>`, and roving containers skip\n * them.\n */\nexport function focusableDisabledProps(\n disabled?: boolean,\n options?: FocusableDisabledOptions,\n): FocusableDisabledProps {\n if (!disabled) return {};\n return options?.reachable\n ? { 'aria-disabled': true, 'data-disabled': '', 'data-disabled-focusable': '' }\n : { 'aria-disabled': true, 'data-disabled': '' };\n}\n\n/**\n * Wraps an activation handler for a focusable-disabled control: while `disabled`, the event's\n * default action is prevented (an `aria-disabled` link does not navigate, a submit button does not\n * submit) and `handler` is not called.\n */\nexport function preventIfDisabled<E extends { preventDefault(): void }>(\n disabled: boolean | undefined,\n handler?: (event: E) => void,\n): (event: E) => void {\n return (event: E) => {\n if (disabled) {\n event.preventDefault();\n return;\n }\n handler?.(event);\n };\n}\n"],"mappings":"AAOA,SAAgBA,EAAQ,GAAGC,EAAmE,CAC5F,IAAMC,EAAO,IAAI,IACjB,IAAK,IAAMC,KAASF,EAClB,GAAKE,EACL,IAAK,IAAMC,KAAMD,EAAM,MAAM,KAAK,EAC5BC,GAAIF,EAAK,IAAIE,CAAE,EAGvB,OAAOF,EAAK,KAAO,EAAI,MAAM,KAAKA,CAAI,CAAC,CAAC,KAAK,GAAG,EAAI,IAAA,EACtD,CAgCA,SAAgBG,EACd,EACA,EACwB,CAExB,OADKC,EACEC,GAAS,UACZ,CAAE,gBAAiB,GAAM,gBAAiB,GAAI,0BAA2B,EAAG,EAC5E,CAAE,gBAAiB,GAAM,gBAAiB,EAAG,EAH3B,CAAC,CAIzB,CAOA,SAAgBC,EACd,EACA,EACoB,CACpB,MAAQ,IAAa,CACnB,GAAIF,EAAU,CACZG,EAAM,eAAe,EACrB,MACF,CACAC,IAAUD,CAAK,CACjB,CACF"}
@@ -0,0 +1,29 @@
1
+ //#region src/lib/aria.ts
2
+ function e(...e) {
3
+ let t = /* @__PURE__ */ new Set();
4
+ for (let n of e) if (n) for (let e of n.split(/\s+/)) e && t.add(e);
5
+ return t.size > 0 ? Array.from(t).join(" ") : void 0;
6
+ }
7
+ function t(e, t) {
8
+ return e ? t?.reachable ? {
9
+ "aria-disabled": !0,
10
+ "data-disabled": "",
11
+ "data-disabled-focusable": ""
12
+ } : {
13
+ "aria-disabled": !0,
14
+ "data-disabled": ""
15
+ } : {};
16
+ }
17
+ function n(e, t) {
18
+ return (n) => {
19
+ if (e) {
20
+ n.preventDefault();
21
+ return;
22
+ }
23
+ t?.(n);
24
+ };
25
+ }
26
+ //#endregion
27
+ export { t as focusableDisabledProps, e as joinIds, n as preventIfDisabled };
28
+
29
+ //# sourceMappingURL=aria.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"aria.mjs","names":["joinIds","ids","seen","value","id","focusableDisabledProps","disabled","options","preventIfDisabled","event"],"sources":["../../src/lib/aria.ts"],"sourcesContent":["/**\n * Joins id reference lists (`aria-describedby`, `aria-labelledby`, `aria-controls`, …): splits\n * each value on whitespace, drops empty values and duplicates, and keeps first-occurrence order.\n * Returns `undefined` when nothing is left, so React omits the attribute.\n *\n * @example joinIds(props['aria-describedby'], hintId, errorId)\n */\nexport function joinIds(...ids: Array<string | null | undefined | false>): string | undefined {\n const seen = new Set<string>();\n for (const value of ids) {\n if (!value) continue;\n for (const id of value.split(/\\s+/)) {\n if (id) seen.add(id);\n }\n }\n return seen.size > 0 ? Array.from(seen).join(' ') : undefined;\n}\n\n/** Props that mark a control unavailable while keeping it focusable (C-DISABLED). */\nexport interface FocusableDisabledProps {\n 'aria-disabled'?: true;\n 'data-disabled'?: '';\n /** Only with `reachable: true`. */\n 'data-disabled-focusable'?: '';\n}\n\n/** Options of {@link focusableDisabledProps}. */\nexport interface FocusableDisabledOptions {\n /**\n * Also renders `data-disabled-focusable`, which keeps the control in a roving container's\n * arrow-key order (`useRovingTabIndex`): for the `disabledFocusable` prop of buttons, links and\n * choice controls. Leave it off for controls that disable themselves through their own\n * activation (C-DISABLED), which a composite must skip.\n * @default false\n */\n reachable?: boolean;\n}\n\n/**\n * `aria-disabled` and `data-disabled` for a focusable disabled control, plus\n * `data-disabled-focusable` with `{ reachable: true }`. Returns `{}` when `disabled` is falsy.\n * Guard handlers with {@link preventIfDisabled}.\n *\n * Without the option it serves controls that become unavailable as a result of their own\n * activation (Pagination First/Prev/Next/Last, Carousel Prev/Next, TeachingPopover Back): they use\n * it instead of native `disabled`, so focus is not lost to `<body>`, and roving containers skip\n * them.\n */\nexport function focusableDisabledProps(\n disabled?: boolean,\n options?: FocusableDisabledOptions,\n): FocusableDisabledProps {\n if (!disabled) return {};\n return options?.reachable\n ? { 'aria-disabled': true, 'data-disabled': '', 'data-disabled-focusable': '' }\n : { 'aria-disabled': true, 'data-disabled': '' };\n}\n\n/**\n * Wraps an activation handler for a focusable-disabled control: while `disabled`, the event's\n * default action is prevented (an `aria-disabled` link does not navigate, a submit button does not\n * submit) and `handler` is not called.\n */\nexport function preventIfDisabled<E extends { preventDefault(): void }>(\n disabled: boolean | undefined,\n handler?: (event: E) => void,\n): (event: E) => void {\n return (event: E) => {\n if (disabled) {\n event.preventDefault();\n return;\n }\n handler?.(event);\n };\n}\n"],"mappings":";AAOA,SAAgBA,EAAQ,GAAGC,GAAmE;CAC5F,IAAMC,oBAAO,IAAI,IAAY;CAC7B,KAAK,IAAMC,KAASF,GAClB,IAAKE,GACL,KAAK,IAAMC,KAAMD,EAAM,MAAM,KAAK,GAChC,AAAIC,KAAIF,EAAK,IAAIE,CAAE;CAGvB,OAAOF,EAAK,OAAO,IAAI,MAAM,KAAKA,CAAI,CAAC,CAAC,KAAK,GAAG,IAAI,KAAA;AACtD;AAgCA,SAAgBG,EACd,GACA,GACwB;CAExB,OADKC,IACEC,GAAS,YACZ;EAAE,iBAAiB;EAAM,iBAAiB;EAAI,2BAA2B;CAAG,IAC5E;EAAE,iBAAiB;EAAM,iBAAiB;CAAG,IAH3B,CAAC;AAIzB;AAOA,SAAgBC,EACd,GACA,GACoB;CACpB,QAAQ,MAAa;EACnB,IAAIF,GAAU;GACZ,EAAM,eAAe;GACrB;EACF;EACA,IAAUG,CAAK;CACjB;AACF"}
@@ -0,0 +1,2 @@
1
+ const e=require("../_virtual/_rolldown/runtime.cjs");let t=require("react");t=e.__toESM(t,1);var n=Symbol.for(`react.lazy`);function r(e){return typeof e==`object`&&!!e&&e.$$typeof===n}function i(e){return(typeof e==`object`||typeof e==`function`)&&e!==null&&typeof e.then==`function`}function a(e,{suspend:n=!0}={}){if(!t.isValidElement(e))return;let a=e.type;if(!r(a))return a;try{return a._init(a._payload)}catch(e){if(n&&i(e))throw e;return a}}function o(e,...n){return t.isValidElement(e)&&n.includes(a(e))}function s(e,n=``){let r=[];return t.Children.toArray(e).forEach((e,i)=>{let a=`${n}${t.isValidElement(e)&&e.key!==null?e.key:i}`;o(e,t.Fragment)?r.push(...s(e.props.children,`${a}/`)):r.push({key:a,node:e})}),r}exports.flattenChildren=s,exports.getElementType=a,exports.isElementOfType=o;
2
+ //# sourceMappingURL=children.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"children.cjs","names":["React","require_runtime","react","REACT_LAZY_TYPE","isLazyElementType","type","isThenable","value","getElementType","node","error","suspend","isElementOfType","types","flattenChildren","result","children","key","prefix","child","index"],"sources":["../../src/lib/children.ts"],"sourcesContent":["/**\n * Children helpers for compound components: identify a part by its element type (lazy Server\n * Component references included) and flatten Fragments. Server-safe: no hooks and no DOM.\n */\nimport * as React from 'react';\n\nconst REACT_LAZY_TYPE = Symbol.for('react.lazy');\n\ninterface LazyElementType {\n $$typeof: symbol;\n _payload: unknown;\n _init: (payload: unknown) => unknown;\n}\n\nfunction isLazyElementType(type: unknown): type is LazyElementType {\n return (\n typeof type === 'object' &&\n type !== null &&\n (type as { $$typeof?: unknown }).$$typeof === REACT_LAZY_TYPE\n );\n}\n\nfunction isThenable(value: unknown): boolean {\n return (\n (typeof value === 'object' || typeof value === 'function') &&\n value !== null &&\n typeof (value as { then?: unknown }).then === 'function'\n );\n}\n\n/** Options of {@link getElementType}. */\nexport interface GetElementTypeOptions {\n /**\n * Whether a lazy type whose chunk is still loading suspends the caller. `false` returns the lazy\n * object itself instead (it matches no part). Pass `false` in walks that reach deeper than the\n * direct children: there the lazy can sit inside the consumer's own `<Suspense>`, the only\n * boundary that rendering it suspends, and the compound must not suspend in its place (on the\n * server, `renderToString` would throw). Such a walk goes on into the lazy element's\n * `props.children`, so a part written inside it is still found.\n * @default true\n */\n suspend?: boolean;\n}\n\n/**\n * The component (or tag) an element renders, with a lazy type unwrapped. A client component\n * written in a React Server Component reaches the client as a lazy reference\n * (`{ $$typeof: Symbol.for('react.lazy'), _payload, _init }`), so compare this, never\n * `element.type`, with a compound part.\n *\n * - Not an element: `undefined`.\n * - A lazy type: its resolved value (`_init(_payload)`); a loaded client reference resolves to the\n * component. While the chunk is still loading, `_init` throws a thenable, which is rethrown so\n * the calling component suspends exactly as rendering that lazy would (with\n * `{ suspend: false }`, the lazy object itself is returned instead). Any other error from\n * `_init` returns the lazy object itself (it matches no part; rendering it reports the error).\n * - Anything else: `element.type` (a component, an intrinsic tag string, `React.Fragment`, …).\n *\n * @example\n * getElementType(child) === Tab; // a direct child: a loading part suspends, as React would\n * getElementType(nested, { suspend: false }) === Tab; // deep in consumer content\n */\nexport function getElementType(\n node: React.ReactNode,\n { suspend = true }: GetElementTypeOptions = {},\n): unknown {\n if (!React.isValidElement(node)) return undefined;\n const type: unknown = node.type;\n if (!isLazyElementType(type)) return type;\n try {\n return type._init(type._payload);\n } catch (error) {\n if (suspend && isThenable(error)) throw error;\n return type;\n }\n}\n\n/**\n * Whether `node` is an element whose type ({@link getElementType}, lazy types unwrapped) is one of\n * `types`. Use it instead of `child.type === Part`, which is false for a part written in a Server\n * Component; it also compares Fragments and intrinsic tags.\n *\n * @example\n * isElementOfType(child, TabListPanel, TabListPanels);\n * isElementOfType<{ children?: React.ReactNode }>(child, React.Fragment);\n * isElementOfType(child, 'li');\n */\nexport function isElementOfType<P = unknown>(\n node: React.ReactNode,\n ...types: unknown[]\n): node is React.ReactElement<P> {\n return React.isValidElement(node) && types.includes(getElementType(node));\n}\n\n/**\n * Direct children with Fragments flattened recursively (`null`, `undefined` and booleans dropped),\n * each with a key that is unique across the flattened list and keeps the consumer's own `key`\n * (a Fragment's key prefixes its children's keys: `.$group/.$a`). Use it wherever a component\n * counts, slices or classifies its direct children.\n *\n * @param children The children to flatten.\n * @param prefix Prepended to every key (used for the recursion).\n */\nexport function flattenChildren(\n children: React.ReactNode,\n prefix = '',\n): Array<{ key: string; node: React.ReactNode }> {\n const result: Array<{ key: string; node: React.ReactNode }> = [];\n React.Children.toArray(children).forEach((child, index) => {\n const key = `${prefix}${React.isValidElement(child) && child.key !== null ? child.key : index}`;\n if (isElementOfType<{ children?: React.ReactNode }>(child, React.Fragment)) {\n result.push(...flattenChildren(child.props.children, `${key}/`));\n } else {\n result.push({ key, node: child });\n }\n });\n return result;\n}\n"],"mappings":"6FAMA,IAAMG,EAAkB,OAAO,IAAI,YAAY,EAQ/C,SAASC,EAAkB,EAAwC,CACjE,OACE,OAAOC,GAAS,YAChBA,GACCA,EAAgC,WAAaF,CAElD,CAEA,SAASG,EAAW,EAAyB,CAC3C,OACG,OAAOC,GAAU,UAAY,OAAOA,GAAU,aAC/CA,IAAU,MACV,OAAQA,EAA6B,MAAS,UAElD,CAkCA,SAAgBC,EACd,EACA,CAAE,UAAU,IAAgC,CAAC,EACpC,CACT,GAAI,CAACR,EAAM,eAAeS,CAAI,EAAG,OACjC,IAAMJ,EAAgBI,EAAK,KAC3B,GAAI,CAACL,EAAkBC,CAAI,EAAG,OAAOA,EACrC,GAAI,CACF,OAAOA,EAAK,MAAMA,EAAK,QAAQ,CACjC,OAASK,EAAO,CACd,GAAIC,GAAWL,EAAWI,CAAK,EAAG,MAAMA,EACxC,OAAOL,CACT,CACF,CAYA,SAAgBO,EACd,EACA,GAAGC,EAC4B,CAC/B,OAAOb,EAAM,eAAeS,CAAI,GAAKI,EAAM,SAASL,EAAeC,CAAI,CAAC,CAC1E,CAWA,SAAgBK,EACd,EACA,EAAS,GACsC,CAC/C,IAAMC,EAAwD,CAAC,EAS/D,OARAb,EAAM,SAAS,QAAQc,CAAQ,CAAC,CAAC,SAAS,EAAO,IAAU,CACzD,IAAMC,EAAM,GAAGC,IAASlB,EAAM,eAAemB,CAAK,GAAKA,EAAM,MAAQ,KAAOA,EAAM,IAAMC,IACpFR,EAAgDO,EAAOnB,EAAM,QAAQ,EACvEe,EAAO,KAAK,GAAGD,EAAgBK,EAAM,MAAM,SAAU,GAAGF,EAAI,EAAE,CAAC,EAE/DF,EAAO,KAAK,CAAE,MAAK,KAAMI,CAAM,CAAC,CAEpC,CAAC,EACMJ,CACT"}
@@ -0,0 +1,37 @@
1
+ import * as e from "react";
2
+ //#region src/lib/children.ts
3
+ var t = Symbol.for("react.lazy");
4
+ function n(e) {
5
+ return typeof e == "object" && !!e && e.$$typeof === t;
6
+ }
7
+ function r(e) {
8
+ return (typeof e == "object" || typeof e == "function") && e !== null && typeof e.then == "function";
9
+ }
10
+ function i(t, { suspend: i = !0 } = {}) {
11
+ if (!e.isValidElement(t)) return;
12
+ let a = t.type;
13
+ if (!n(a)) return a;
14
+ try {
15
+ return a._init(a._payload);
16
+ } catch (e) {
17
+ if (i && r(e)) throw e;
18
+ return a;
19
+ }
20
+ }
21
+ function a(t, ...n) {
22
+ return e.isValidElement(t) && n.includes(i(t));
23
+ }
24
+ function o(t, n = "") {
25
+ let r = [];
26
+ return e.Children.toArray(t).forEach((t, i) => {
27
+ let s = `${n}${e.isValidElement(t) && t.key !== null ? t.key : i}`;
28
+ a(t, e.Fragment) ? r.push(...o(t.props.children, `${s}/`)) : r.push({
29
+ key: s,
30
+ node: t
31
+ });
32
+ }), r;
33
+ }
34
+ //#endregion
35
+ export { o as flattenChildren, i as getElementType, a as isElementOfType };
36
+
37
+ //# sourceMappingURL=children.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"children.mjs","names":["React","REACT_LAZY_TYPE","isLazyElementType","type","isThenable","value","getElementType","node","error","suspend","isElementOfType","types","flattenChildren","result","children","key","prefix","child","index"],"sources":["../../src/lib/children.ts"],"sourcesContent":["/**\n * Children helpers for compound components: identify a part by its element type (lazy Server\n * Component references included) and flatten Fragments. Server-safe: no hooks and no DOM.\n */\nimport * as React from 'react';\n\nconst REACT_LAZY_TYPE = Symbol.for('react.lazy');\n\ninterface LazyElementType {\n $$typeof: symbol;\n _payload: unknown;\n _init: (payload: unknown) => unknown;\n}\n\nfunction isLazyElementType(type: unknown): type is LazyElementType {\n return (\n typeof type === 'object' &&\n type !== null &&\n (type as { $$typeof?: unknown }).$$typeof === REACT_LAZY_TYPE\n );\n}\n\nfunction isThenable(value: unknown): boolean {\n return (\n (typeof value === 'object' || typeof value === 'function') &&\n value !== null &&\n typeof (value as { then?: unknown }).then === 'function'\n );\n}\n\n/** Options of {@link getElementType}. */\nexport interface GetElementTypeOptions {\n /**\n * Whether a lazy type whose chunk is still loading suspends the caller. `false` returns the lazy\n * object itself instead (it matches no part). Pass `false` in walks that reach deeper than the\n * direct children: there the lazy can sit inside the consumer's own `<Suspense>`, the only\n * boundary that rendering it suspends, and the compound must not suspend in its place (on the\n * server, `renderToString` would throw). Such a walk goes on into the lazy element's\n * `props.children`, so a part written inside it is still found.\n * @default true\n */\n suspend?: boolean;\n}\n\n/**\n * The component (or tag) an element renders, with a lazy type unwrapped. A client component\n * written in a React Server Component reaches the client as a lazy reference\n * (`{ $$typeof: Symbol.for('react.lazy'), _payload, _init }`), so compare this, never\n * `element.type`, with a compound part.\n *\n * - Not an element: `undefined`.\n * - A lazy type: its resolved value (`_init(_payload)`); a loaded client reference resolves to the\n * component. While the chunk is still loading, `_init` throws a thenable, which is rethrown so\n * the calling component suspends exactly as rendering that lazy would (with\n * `{ suspend: false }`, the lazy object itself is returned instead). Any other error from\n * `_init` returns the lazy object itself (it matches no part; rendering it reports the error).\n * - Anything else: `element.type` (a component, an intrinsic tag string, `React.Fragment`, …).\n *\n * @example\n * getElementType(child) === Tab; // a direct child: a loading part suspends, as React would\n * getElementType(nested, { suspend: false }) === Tab; // deep in consumer content\n */\nexport function getElementType(\n node: React.ReactNode,\n { suspend = true }: GetElementTypeOptions = {},\n): unknown {\n if (!React.isValidElement(node)) return undefined;\n const type: unknown = node.type;\n if (!isLazyElementType(type)) return type;\n try {\n return type._init(type._payload);\n } catch (error) {\n if (suspend && isThenable(error)) throw error;\n return type;\n }\n}\n\n/**\n * Whether `node` is an element whose type ({@link getElementType}, lazy types unwrapped) is one of\n * `types`. Use it instead of `child.type === Part`, which is false for a part written in a Server\n * Component; it also compares Fragments and intrinsic tags.\n *\n * @example\n * isElementOfType(child, TabListPanel, TabListPanels);\n * isElementOfType<{ children?: React.ReactNode }>(child, React.Fragment);\n * isElementOfType(child, 'li');\n */\nexport function isElementOfType<P = unknown>(\n node: React.ReactNode,\n ...types: unknown[]\n): node is React.ReactElement<P> {\n return React.isValidElement(node) && types.includes(getElementType(node));\n}\n\n/**\n * Direct children with Fragments flattened recursively (`null`, `undefined` and booleans dropped),\n * each with a key that is unique across the flattened list and keeps the consumer's own `key`\n * (a Fragment's key prefixes its children's keys: `.$group/.$a`). Use it wherever a component\n * counts, slices or classifies its direct children.\n *\n * @param children The children to flatten.\n * @param prefix Prepended to every key (used for the recursion).\n */\nexport function flattenChildren(\n children: React.ReactNode,\n prefix = '',\n): Array<{ key: string; node: React.ReactNode }> {\n const result: Array<{ key: string; node: React.ReactNode }> = [];\n React.Children.toArray(children).forEach((child, index) => {\n const key = `${prefix}${React.isValidElement(child) && child.key !== null ? child.key : index}`;\n if (isElementOfType<{ children?: React.ReactNode }>(child, React.Fragment)) {\n result.push(...flattenChildren(child.props.children, `${key}/`));\n } else {\n result.push({ key, node: child });\n }\n });\n return result;\n}\n"],"mappings":";;AAMA,IAAMC,IAAkB,OAAO,IAAI,YAAY;AAQ/C,SAASC,EAAkB,GAAwC;CACjE,OACE,OAAOC,KAAS,cAChBA,KACCA,EAAgC,aAAaF;AAElD;AAEA,SAASG,EAAW,GAAyB;CAC3C,QACG,OAAOC,KAAU,YAAY,OAAOA,KAAU,eAC/CA,MAAU,QACV,OAAQA,EAA6B,QAAS;AAElD;AAkCA,SAAgBC,EACd,GACA,EAAE,aAAU,OAAgC,CAAC,GACpC;CACT,IAAI,CAACN,EAAM,eAAeO,CAAI,GAAG;CACjC,IAAMJ,IAAgBI,EAAK;CAC3B,IAAI,CAACL,EAAkBC,CAAI,GAAG,OAAOA;CACrC,IAAI;EACF,OAAOA,EAAK,MAAMA,EAAK,QAAQ;CACjC,SAASK,GAAO;EACd,IAAIC,KAAWL,EAAWI,CAAK,GAAG,MAAMA;EACxC,OAAOL;CACT;AACF;AAYA,SAAgBO,EACd,GACA,GAAGC,GAC4B;CAC/B,OAAOX,EAAM,eAAeO,CAAI,KAAKI,EAAM,SAASL,EAAeC,CAAI,CAAC;AAC1E;AAWA,SAAgBK,EACd,GACA,IAAS,IACsC;CAC/C,IAAMC,IAAwD,CAAC;CAS/D,OARAb,EAAM,SAAS,QAAQc,CAAQ,CAAC,CAAC,SAAS,GAAO,MAAU;EACzD,IAAMC,IAAM,GAAGC,IAAShB,EAAM,eAAeiB,CAAK,KAAKA,EAAM,QAAQ,OAAOA,EAAM,MAAMC;EACxF,AAAIR,EAAgDO,GAAOjB,EAAM,QAAQ,IACvEa,EAAO,KAAK,GAAGD,EAAgBK,EAAM,MAAM,UAAU,GAAGF,EAAI,EAAE,CAAC,IAE/DF,EAAO,KAAK;GAAE;GAAK,MAAMI;EAAM,CAAC;CAEpC,CAAC,GACMJ;AACT"}
@@ -0,0 +1,2 @@
1
+ let e=require("clsx");var t=(0,require("tailwind-merge").extendTailwindMerge)({extend:{classGroups:{duration:[{duration:[`wave-ultra-fast`,`wave-faster`,`wave-fast`,`wave-normal`,`wave-gentle`,`wave-slow`,`wave-slower`,`wave-ultra-slow`]}]},theme:{ease:[`wave-accelerate-max`,`wave-accelerate-mid`,`wave-accelerate-min`,`wave-decelerate-max`,`wave-decelerate-mid`,`wave-decelerate-min`,`wave-easy-ease-max`,`wave-easy-ease`,`wave-linear`],text:[`caption-2`,`caption-1`,`body-1`,`body-2`,`subtitle-2`,`subtitle-1`,`title-3`,`title-2`,`title-1`,`large-title`,`display`],shadow:[`2`,`4`,`8`,`16`,`28`,`64`],font:[`wave`],animate:[`wave-spin`,`wave-spin-slow`,`wave-pulse`,`wave-indeterminate`,`wave-indeterminate-rtl`]}}});function n(...n){return t((0,e.clsx)(n))}exports.cn=n,exports.twMerge=t;
2
+ //# sourceMappingURL=cn.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cn.cjs","names":["extendTailwindMerge","clsx","twMerge","cn","inputs"],"sources":["../../src/lib/cn.ts"],"sourcesContent":["import { clsx, type ClassValue } from 'clsx';\nimport { extendTailwindMerge } from 'tailwind-merge';\n\n/**\n * tailwind-merge configured with the Wave theme scales, so custom utilities are grouped\n * correctly: `text-body-1` is a font size (not a text colour), `shadow-4` is a shadow size (not a\n * shadow colour), `font-wave` is a font family, `animate-wave-*` are animations, and the motion\n * tokens `duration-wave-*` and `ease-wave-*` are transition durations and timing functions.\n */\nexport const twMerge = extendTailwindMerge({\n extend: {\n classGroups: {\n duration: [\n {\n duration: [\n 'wave-ultra-fast',\n 'wave-faster',\n 'wave-fast',\n 'wave-normal',\n 'wave-gentle',\n 'wave-slow',\n 'wave-slower',\n 'wave-ultra-slow',\n ],\n },\n ],\n },\n theme: {\n ease: [\n 'wave-accelerate-max',\n 'wave-accelerate-mid',\n 'wave-accelerate-min',\n 'wave-decelerate-max',\n 'wave-decelerate-mid',\n 'wave-decelerate-min',\n 'wave-easy-ease-max',\n 'wave-easy-ease',\n 'wave-linear',\n ],\n text: [\n 'caption-2',\n 'caption-1',\n 'body-1',\n 'body-2',\n 'subtitle-2',\n 'subtitle-1',\n 'title-3',\n 'title-2',\n 'title-1',\n 'large-title',\n 'display',\n ],\n shadow: ['2', '4', '8', '16', '28', '64'],\n font: ['wave'],\n animate: [\n 'wave-spin',\n 'wave-spin-slow',\n 'wave-pulse',\n 'wave-indeterminate',\n 'wave-indeterminate-rtl',\n ],\n },\n },\n});\n\n/**\n * Joins class names (clsx) and resolves Tailwind conflicts so the **last** class wins — pass\n * internal classes first and the consumer's `className` last.\n *\n * A later class replaces only a conflicting class **of the same variant**. Variant and state\n * classes such as the gated `not-disabled:not-aria-disabled:hover:bg-…` or `data-[selected]:bg-…`\n * are kept next to a bare `hover:bg-…`/`bg-…` and win by specificity; override them with the same\n * prefix (`not-disabled:not-aria-disabled:hover:bg-error`), the same data variant, or the important\n * modifier (`hover:bg-error!`).\n *\n * @example\n * cn('text-body-1 text-foreground', className) // className=\"text-primary\" keeps text-body-1\n */\nexport function cn(...inputs: ClassValue[]): string {\n return twMerge(clsx(inputs));\n}\n"],"mappings":"sBASA,IAAaE,GAAA,0BAAUF,CAAAA,CAAAA,oBAAAA,CAAoB,CACzC,OAAQ,CACN,YAAa,CACX,SAAU,CACR,CACE,SAAU,CACR,kBACA,cACA,YACA,cACA,cACA,YACA,cACA,iBACF,CACF,CACF,CACF,EACA,MAAO,CACL,KAAM,CACJ,sBACA,sBACA,sBACA,sBACA,sBACA,sBACA,qBACA,iBACA,aACF,EACA,KAAM,CACJ,YACA,YACA,SACA,SACA,aACA,aACA,UACA,UACA,UACA,cACA,SACF,EACA,OAAQ,CAAC,IAAK,IAAK,IAAK,KAAM,KAAM,IAAI,EACxC,KAAM,CAAC,MAAM,EACb,QAAS,CACP,YACA,iBACA,aACA,qBACA,wBACF,CACF,CACF,CACF,CAAC,EAeD,SAAgBG,EAAG,GAAGC,EAA8B,CAClD,OAAOF,GAAA,EAAQD,EAAA,KAAA,CAAKG,CAAM,CAAC,CAC7B"}
@@ -0,0 +1,64 @@
1
+ import { clsx as e } from "clsx";
2
+ import { extendTailwindMerge as t } from "tailwind-merge";
3
+ //#region src/lib/cn.ts
4
+ var n = t({ extend: {
5
+ classGroups: { duration: [{ duration: [
6
+ "wave-ultra-fast",
7
+ "wave-faster",
8
+ "wave-fast",
9
+ "wave-normal",
10
+ "wave-gentle",
11
+ "wave-slow",
12
+ "wave-slower",
13
+ "wave-ultra-slow"
14
+ ] }] },
15
+ theme: {
16
+ ease: [
17
+ "wave-accelerate-max",
18
+ "wave-accelerate-mid",
19
+ "wave-accelerate-min",
20
+ "wave-decelerate-max",
21
+ "wave-decelerate-mid",
22
+ "wave-decelerate-min",
23
+ "wave-easy-ease-max",
24
+ "wave-easy-ease",
25
+ "wave-linear"
26
+ ],
27
+ text: [
28
+ "caption-2",
29
+ "caption-1",
30
+ "body-1",
31
+ "body-2",
32
+ "subtitle-2",
33
+ "subtitle-1",
34
+ "title-3",
35
+ "title-2",
36
+ "title-1",
37
+ "large-title",
38
+ "display"
39
+ ],
40
+ shadow: [
41
+ "2",
42
+ "4",
43
+ "8",
44
+ "16",
45
+ "28",
46
+ "64"
47
+ ],
48
+ font: ["wave"],
49
+ animate: [
50
+ "wave-spin",
51
+ "wave-spin-slow",
52
+ "wave-pulse",
53
+ "wave-indeterminate",
54
+ "wave-indeterminate-rtl"
55
+ ]
56
+ }
57
+ } });
58
+ function r(...t) {
59
+ return n(e(t));
60
+ }
61
+ //#endregion
62
+ export { r as cn, n as twMerge };
63
+
64
+ //# sourceMappingURL=cn.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cn.mjs","names":["twMerge","extendTailwindMerge","cn","inputs","clsx"],"sources":["../../src/lib/cn.ts"],"sourcesContent":["import { clsx, type ClassValue } from 'clsx';\nimport { extendTailwindMerge } from 'tailwind-merge';\n\n/**\n * tailwind-merge configured with the Wave theme scales, so custom utilities are grouped\n * correctly: `text-body-1` is a font size (not a text colour), `shadow-4` is a shadow size (not a\n * shadow colour), `font-wave` is a font family, `animate-wave-*` are animations, and the motion\n * tokens `duration-wave-*` and `ease-wave-*` are transition durations and timing functions.\n */\nexport const twMerge = extendTailwindMerge({\n extend: {\n classGroups: {\n duration: [\n {\n duration: [\n 'wave-ultra-fast',\n 'wave-faster',\n 'wave-fast',\n 'wave-normal',\n 'wave-gentle',\n 'wave-slow',\n 'wave-slower',\n 'wave-ultra-slow',\n ],\n },\n ],\n },\n theme: {\n ease: [\n 'wave-accelerate-max',\n 'wave-accelerate-mid',\n 'wave-accelerate-min',\n 'wave-decelerate-max',\n 'wave-decelerate-mid',\n 'wave-decelerate-min',\n 'wave-easy-ease-max',\n 'wave-easy-ease',\n 'wave-linear',\n ],\n text: [\n 'caption-2',\n 'caption-1',\n 'body-1',\n 'body-2',\n 'subtitle-2',\n 'subtitle-1',\n 'title-3',\n 'title-2',\n 'title-1',\n 'large-title',\n 'display',\n ],\n shadow: ['2', '4', '8', '16', '28', '64'],\n font: ['wave'],\n animate: [\n 'wave-spin',\n 'wave-spin-slow',\n 'wave-pulse',\n 'wave-indeterminate',\n 'wave-indeterminate-rtl',\n ],\n },\n },\n});\n\n/**\n * Joins class names (clsx) and resolves Tailwind conflicts so the **last** class wins — pass\n * internal classes first and the consumer's `className` last.\n *\n * A later class replaces only a conflicting class **of the same variant**. Variant and state\n * classes such as the gated `not-disabled:not-aria-disabled:hover:bg-…` or `data-[selected]:bg-…`\n * are kept next to a bare `hover:bg-…`/`bg-…` and win by specificity; override them with the same\n * prefix (`not-disabled:not-aria-disabled:hover:bg-error`), the same data variant, or the important\n * modifier (`hover:bg-error!`).\n *\n * @example\n * cn('text-body-1 text-foreground', className) // className=\"text-primary\" keeps text-body-1\n */\nexport function cn(...inputs: ClassValue[]): string {\n return twMerge(clsx(inputs));\n}\n"],"mappings":";;;AASA,IAAaA,IAAUC,EAAoB,EACzC,QAAQ;CACN,aAAa,EACX,UAAU,CACR,EACE,UAAU;EACR;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CACF,EACF,CACF,EACF;CACA,OAAO;EACL,MAAM;GACJ;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACF;EACA,MAAM;GACJ;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACF;EACA,QAAQ;GAAC;GAAK;GAAK;GAAK;GAAM;GAAM;EAAI;EACxC,MAAM,CAAC,MAAM;EACb,SAAS;GACP;GACA;GACA;GACA;GACA;EACF;CACF;AACF,EACF,CAAC;AAeD,SAAgBC,EAAG,GAAGC,GAA8B;CAClD,OAAOH,EAAQI,EAAKD,CAAM,CAAC;AAC7B"}
@@ -0,0 +1,2 @@
1
+ function e(e,t,n){let r=n?.checkDefaultPrevented!==!1;return n=>{e?.(n),(!r||!n.defaultPrevented)&&t?.(n)}}exports.composeEventHandlers=e;
2
+ //# sourceMappingURL=composeEventHandlers.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"composeEventHandlers.cjs","names":["composeEventHandlers","checkDefaultPrevented","options","theirs","event","ours"],"sources":["../../src/lib/composeEventHandlers.ts"],"sourcesContent":["/**\n * Composes a consumer's event handler with a component's internal one (C-COMPOSE).\n *\n * The consumer handler (`theirs`) runs first; the internal handler (`ours`) runs afterwards unless\n * the event's default was prevented — by the consumer, or already upstream — so consumers can opt\n * out of built-in behaviour with `event.preventDefault()`. Pass `{ checkDefaultPrevented: false }`\n * for internal work that must always run (bookkeeping, state that mirrors the DOM).\n *\n * @example\n * <button onClick={composeEventHandlers(onClick, () => onSelect(value))} />\n */\nexport function composeEventHandlers<E extends { defaultPrevented: boolean }>(\n theirs?: (event: E) => void,\n ours?: (event: E) => void,\n options?: { checkDefaultPrevented?: boolean },\n): (event: E) => void {\n const checkDefaultPrevented = options?.checkDefaultPrevented !== false;\n return (event: E) => {\n theirs?.(event);\n if (!checkDefaultPrevented || !event.defaultPrevented) {\n ours?.(event);\n }\n };\n}\n"],"mappings":"AAWA,SAAgBA,EACd,EACA,EACA,EACoB,CACpB,IAAMC,EAAwBC,GAAS,wBAA0B,GACjE,MAAQ,IAAa,CACnBC,IAASC,CAAK,GACV,CAACH,GAAyB,CAACG,EAAM,mBACnCC,IAAOD,CAAK,CAEhB,CACF"}
@@ -0,0 +1,11 @@
1
+ //#region src/lib/composeEventHandlers.ts
2
+ function e(e, t, n) {
3
+ let r = n?.checkDefaultPrevented !== !1;
4
+ return (n) => {
5
+ e?.(n), (!r || !n.defaultPrevented) && t?.(n);
6
+ };
7
+ }
8
+ //#endregion
9
+ export { e as composeEventHandlers };
10
+
11
+ //# sourceMappingURL=composeEventHandlers.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"composeEventHandlers.mjs","names":["composeEventHandlers","checkDefaultPrevented","options","theirs","event","ours"],"sources":["../../src/lib/composeEventHandlers.ts"],"sourcesContent":["/**\n * Composes a consumer's event handler with a component's internal one (C-COMPOSE).\n *\n * The consumer handler (`theirs`) runs first; the internal handler (`ours`) runs afterwards unless\n * the event's default was prevented — by the consumer, or already upstream — so consumers can opt\n * out of built-in behaviour with `event.preventDefault()`. Pass `{ checkDefaultPrevented: false }`\n * for internal work that must always run (bookkeeping, state that mirrors the DOM).\n *\n * @example\n * <button onClick={composeEventHandlers(onClick, () => onSelect(value))} />\n */\nexport function composeEventHandlers<E extends { defaultPrevented: boolean }>(\n theirs?: (event: E) => void,\n ours?: (event: E) => void,\n options?: { checkDefaultPrevented?: boolean },\n): (event: E) => void {\n const checkDefaultPrevented = options?.checkDefaultPrevented !== false;\n return (event: E) => {\n theirs?.(event);\n if (!checkDefaultPrevented || !event.defaultPrevented) {\n ours?.(event);\n }\n };\n}\n"],"mappings":";AAWA,SAAgBA,EACd,GACA,GACA,GACoB;CACpB,IAAMC,IAAwBC,GAAS,0BAA0B;CACjE,QAAQ,MAAa;EAEnB,AADAC,IAASC,CAAK,IACV,CAACH,KAAyB,CAACG,EAAM,qBACnCC,IAAOD,CAAK;CAEhB;AACF"}
@@ -0,0 +1,2 @@
1
+ const e=require("./globalRegistry.cjs");var t=`[WaveUI] `;function n(){try{return process.env.NODE_ENV!==`production`}catch{return!0}}var r=n();function i(){return e.getGlobalRegistry(`warnings`,()=>new Set)}function a(e,r){if(!n())return;let a=i();a.has(e)||(a.add(e),console.warn(t+r))}function o(e){return i().has(e)}function s(e,t,n,r){let i=`${e}: \`${t}\` is deprecated and will be removed in 1.0. Use \`${n}\` instead.`+(r?` ${r}`:``);a(`deprecated:${e}:${t}`,i)}function c(e,t,n,r,i){return n!==void 0&&s(e,r,i),t===void 0?n:t}function l(){return e.getGlobalRegistry(`missing-context`,()=>new Set)}function u(e,r,i){let a=t+(i??`${e} must be used within ${r}`);if(n())throw Error(a);let o=l();o.has(a)||(o.add(a),console.error(a))}exports.hasWarned=o,exports.isDev=r,exports.reportMissingContext=u,exports.resolveDeprecatedProp=c,exports.warnDeprecated=s,exports.warnOnce=a;
2
+ //# sourceMappingURL=dev.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dev.cjs","names":["getGlobalRegistry","require_globalRegistry","PREFIX","isDevEnvironment","isDev","getWarnedKeys","warnOnce","warned","key","message","hasWarned","warnDeprecated","component","oldName","newName","extra","resolveDeprecatedProp","oldValue","newValue","getReportedMissingContexts","reportMissingContext","text","componentName","parentName","reported"],"sources":["../../src/lib/dev.ts"],"sourcesContent":["import { getGlobalRegistry } from './globalRegistry';\n\nconst PREFIX = '[WaveUI] ';\n\n/**\n * Reads the bundler-injected `process.env.NODE_ENV` at call time. The expression is written out\n * literally so bundlers replace it (Vite, webpack, esbuild, Rollup); when no bundler replaced it and\n * `process` does not exist (an unbundled ESM import in the browser), development mode is assumed.\n */\nfunction isDevEnvironment(): boolean {\n try {\n return process.env.NODE_ENV !== 'production';\n } catch {\n return true;\n }\n}\n\n/**\n * `true` unless the consumer builds with `NODE_ENV=production`. Guard development-only work with\n * it (`if (isDev) { … }`). The warning helpers below already check the environment themselves.\n */\nexport const isDev: boolean = isDevEnvironment();\n\nfunction getWarnedKeys(): Set<string> {\n return getGlobalRegistry('warnings', () => new Set<string>());\n}\n\n/**\n * Logs a development warning prefixed with `[WaveUI] `. Not deduplicated; prefer {@link warnOnce}\n * for anything that can happen on every render. No-op in production.\n *\n * @param message The message without the prefix.\n */\nexport function devWarn(message: string): void {\n if (!isDevEnvironment()) return;\n console.warn(PREFIX + message);\n}\n\n/**\n * Logs a development warning once per `key` per page. The set of emitted keys lives in the global\n * registry (`getGlobalRegistry('warnings')`), so duplicate copies of the library share it, and it\n * is cleared between tests by {@link __resetWarnings}. No-op in production (the key is not consumed).\n *\n * Component diagnostics belong in effects (C-DEV). Because it is idempotent, the pure helpers built\n * on it — {@link resolveDeprecatedProp}, `resolveSlot`/`renderSlot` and `renderTrigger` — warn at\n * call time, which is safe during render: StrictMode double renders, discarded concurrent renders\n * and re-renders all log the key once.\n *\n * @param key Deduplication key, e.g. `'Tooltip:children'`.\n * @param message The message without the prefix.\n */\nexport function warnOnce(key: string, message: string): void {\n if (!isDevEnvironment()) return;\n const warned = getWarnedKeys();\n if (warned.has(key)) return;\n warned.add(key);\n console.warn(PREFIX + message);\n}\n\n/**\n * Whether {@link warnOnce} already emitted `key` (in any copy of the library, since the set lives\n * in the shared `'warnings'` global registry). A pure read: it never consumes the key, so a later\n * `warnOnce(key, …)` still warns when this returns `false`.\n *\n * Use it to skip development-only DOM work in an effect (a subtree scan, a focus-order check) once\n * its warning has fired. It returns `false` in production, where `warnOnce` consumes no key, so\n * guard that work with {@link isDev} as well.\n *\n * @param key The deduplication key passed to `warnOnce`, e.g. `'Card:nested-interactive'`.\n */\nexport function hasWarned(key: string): boolean {\n return getWarnedKeys().has(key);\n}\n\n/**\n * Warns once per (component, prop) that a prop or value is deprecated (§5.10 format):\n *\n * `[WaveUI] TabList: \\`selectedValue\\` is deprecated and will be removed in 1.0. Use \\`value\\` instead.`\n *\n * @param component The public component name, e.g. `'TabList'`.\n * @param oldName The deprecated prop or value.\n * @param newName Its replacement.\n * @param extra Optional extra sentence appended to the message.\n */\nexport function warnDeprecated(\n component: string,\n oldName: string,\n newName: string,\n extra?: string,\n): void {\n const message =\n `${component}: \\`${oldName}\\` is deprecated and will be removed in 1.0. Use \\`${newName}\\` instead.` +\n (extra ? ` ${extra}` : '');\n warnOnce(`deprecated:${component}:${oldName}`, message);\n}\n\n/**\n * Resolves a renamed prop: returns `newValue` when it is defined, otherwise `oldValue`. Warns once\n * (via {@link warnDeprecated}) whenever the deprecated prop is used, including when both are given\n * (the new value wins, C-NAMING).\n *\n * The warning is emitted at call time, and calling it during render is the intended use: the\n * warn-once key makes it idempotent, so StrictMode double renders and re-renders log once per page\n * (a C-DEV call-time exception, like `resolveSlot` and `renderTrigger`). A component that must\n * warn from an effect instead resolves `newValue !== undefined ? newValue : oldValue` itself and\n * calls {@link warnDeprecated} in that effect.\n *\n * @example\n * const orientation = resolveDeprecatedProp('Stack', props.orientation, props.direction, 'direction', 'orientation') ?? 'vertical';\n */\nexport function resolveDeprecatedProp<T>(\n component: string,\n newValue: T | undefined,\n oldValue: T | undefined,\n oldName: string,\n newName: string,\n): T | undefined {\n if (oldValue !== undefined) warnDeprecated(component, oldName, newName);\n return newValue !== undefined ? newValue : oldValue;\n}\n\nfunction getReportedMissingContexts(): Set<string> {\n return getGlobalRegistry('missing-context', () => new Set<string>());\n}\n\n/**\n * The C-CONTEXT guard for a compound part rendered outside its root: call it from the context\n * hook when the context is `null`, then return the hook's inert value.\n *\n * The text is `[WaveUI] <componentName> must be used within <parentName>`, or `[WaveUI] <message>`\n * when `message` is given. In development it throws `new Error(text)`. In production it logs the\n * text with `console.error` once per text per page (not on every render of every misplaced\n * instance) and returns; the set of logged texts lives in the global registry\n * (`getGlobalRegistry('missing-context')`), shared by every copy of the library and cleared\n * between tests by {@link __resetWarnings}.\n *\n * @param componentName The part as the consumer writes it, e.g. `'TabList.Tab'`.\n * @param parentName The root it must be rendered in, e.g. `'<TabList>'`.\n * @param message Replaces the default text (without the prefix).\n *\n * @example\n * function useTabListContext(component: string): TabListContextValue {\n * const context = React.useContext(TabListContext);\n * if (context) return context;\n * reportMissingContext(component, '<TabList>');\n * return INERT_CONTEXT;\n * }\n */\nexport function reportMissingContext(\n componentName: string,\n parentName: string,\n message?: string,\n): void {\n const text = PREFIX + (message ?? `${componentName} must be used within ${parentName}`);\n if (isDevEnvironment()) throw new Error(text);\n const reported = getReportedMissingContexts();\n if (reported.has(text)) return;\n reported.add(text);\n console.error(text);\n}\n\n/**\n * Test-only: forgets every emitted warn-once key and every missing-context text logged by\n * {@link reportMissingContext}, so each test starts clean (called from `src/test-setup.ts` after\n * each test).\n */\nexport function __resetWarnings(): void {\n getWarnedKeys().clear();\n getReportedMissingContexts().clear();\n}\n"],"mappings":"wCAEA,IAAME,EAAS,YAOf,SAASC,GAA4B,CACnC,GAAI,CACF,OAAA,QAAA,IAAA,WAAgC,YAClC,MAAQ,CACN,MAAO,EACT,CACF,CAMA,IAAaC,EAAiBD,EAAiB,EAE/C,SAASE,GAA6B,CACpC,OAAOL,EAAAA,kBAAkB,eAAkB,IAAI,GAAa,CAC9D,CA0BA,SAAgBM,EAAS,EAAa,EAAuB,CAC3D,GAAI,CAACH,EAAiB,EAAG,OACzB,IAAMI,EAASF,EAAc,EACzBE,EAAO,IAAIC,CAAG,IAClBD,EAAO,IAAIC,CAAG,EACd,QAAQ,KAAKN,EAASO,CAAO,EAC/B,CAaA,SAAgBC,EAAU,EAAsB,CAC9C,OAAOL,EAAc,CAAC,CAAC,IAAIG,CAAG,CAChC,CAYA,SAAgBG,EACd,EACA,EACA,EACA,EACM,CACN,IAAMF,EACJ,GAAGG,EAAU,MAAMC,EAAQ,qDAAqDC,EAAQ,cACvFC,EAAQ,IAAIA,IAAU,IACzBT,EAAS,cAAcM,EAAU,GAAGC,IAAWJ,CAAO,CACxD,CAgBA,SAAgBO,EACd,EACA,EACA,EACA,EACA,EACe,CAEf,OADIC,IAAa,IAAA,IAAWN,EAAeC,EAAWC,EAASC,CAAO,EAC/DI,IAAa,IAAA,GAAuBD,EAAXC,CAClC,CAEA,SAASC,GAA0C,CACjD,OAAOnB,EAAAA,kBAAkB,sBAAyB,IAAI,GAAa,CACrE,CAyBA,SAAgBoB,EACd,EACA,EACA,EACM,CACN,IAAMC,EAAOnB,GAAUO,GAAW,GAAGa,EAAc,uBAAuBC,KAC1E,GAAIpB,EAAiB,EAAG,MAAU,MAAMkB,CAAI,EAC5C,IAAMG,EAAWL,EAA2B,EACxCK,EAAS,IAAIH,CAAI,IACrBG,EAAS,IAAIH,CAAI,EACjB,QAAQ,MAAMA,CAAI,EACpB"}
@@ -0,0 +1,42 @@
1
+ import { getGlobalRegistry as e } from "./globalRegistry.mjs";
2
+ //#region src/lib/dev.ts
3
+ var t = "[WaveUI] ";
4
+ function n() {
5
+ try {
6
+ return process.env.NODE_ENV !== "production";
7
+ } catch {
8
+ return !0;
9
+ }
10
+ }
11
+ var r = n();
12
+ function i() {
13
+ return e("warnings", () => /* @__PURE__ */ new Set());
14
+ }
15
+ function a(e, r) {
16
+ if (!n()) return;
17
+ let a = i();
18
+ a.has(e) || (a.add(e), console.warn(t + r));
19
+ }
20
+ function o(e) {
21
+ return i().has(e);
22
+ }
23
+ function s(e, t, n, r) {
24
+ let i = `${e}: \`${t}\` is deprecated and will be removed in 1.0. Use \`${n}\` instead.` + (r ? ` ${r}` : "");
25
+ a(`deprecated:${e}:${t}`, i);
26
+ }
27
+ function c(e, t, n, r, i) {
28
+ return n !== void 0 && s(e, r, i), t === void 0 ? n : t;
29
+ }
30
+ function l() {
31
+ return e("missing-context", () => /* @__PURE__ */ new Set());
32
+ }
33
+ function u(e, r, i) {
34
+ let a = t + (i ?? `${e} must be used within ${r}`);
35
+ if (n()) throw Error(a);
36
+ let o = l();
37
+ o.has(a) || (o.add(a), console.error(a));
38
+ }
39
+ //#endregion
40
+ export { o as hasWarned, r as isDev, u as reportMissingContext, c as resolveDeprecatedProp, s as warnDeprecated, a as warnOnce };
41
+
42
+ //# sourceMappingURL=dev.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dev.mjs","names":["PREFIX","isDevEnvironment","isDev","getWarnedKeys","getGlobalRegistry","warnOnce","warned","key","message","hasWarned","warnDeprecated","component","oldName","newName","extra","resolveDeprecatedProp","oldValue","newValue","getReportedMissingContexts","reportMissingContext","text","componentName","parentName","reported"],"sources":["../../src/lib/dev.ts"],"sourcesContent":["import { getGlobalRegistry } from './globalRegistry';\n\nconst PREFIX = '[WaveUI] ';\n\n/**\n * Reads the bundler-injected `process.env.NODE_ENV` at call time. The expression is written out\n * literally so bundlers replace it (Vite, webpack, esbuild, Rollup); when no bundler replaced it and\n * `process` does not exist (an unbundled ESM import in the browser), development mode is assumed.\n */\nfunction isDevEnvironment(): boolean {\n try {\n return process.env.NODE_ENV !== 'production';\n } catch {\n return true;\n }\n}\n\n/**\n * `true` unless the consumer builds with `NODE_ENV=production`. Guard development-only work with\n * it (`if (isDev) { … }`). The warning helpers below already check the environment themselves.\n */\nexport const isDev: boolean = isDevEnvironment();\n\nfunction getWarnedKeys(): Set<string> {\n return getGlobalRegistry('warnings', () => new Set<string>());\n}\n\n/**\n * Logs a development warning prefixed with `[WaveUI] `. Not deduplicated; prefer {@link warnOnce}\n * for anything that can happen on every render. No-op in production.\n *\n * @param message The message without the prefix.\n */\nexport function devWarn(message: string): void {\n if (!isDevEnvironment()) return;\n console.warn(PREFIX + message);\n}\n\n/**\n * Logs a development warning once per `key` per page. The set of emitted keys lives in the global\n * registry (`getGlobalRegistry('warnings')`), so duplicate copies of the library share it, and it\n * is cleared between tests by {@link __resetWarnings}. No-op in production (the key is not consumed).\n *\n * Component diagnostics belong in effects (C-DEV). Because it is idempotent, the pure helpers built\n * on it — {@link resolveDeprecatedProp}, `resolveSlot`/`renderSlot` and `renderTrigger` — warn at\n * call time, which is safe during render: StrictMode double renders, discarded concurrent renders\n * and re-renders all log the key once.\n *\n * @param key Deduplication key, e.g. `'Tooltip:children'`.\n * @param message The message without the prefix.\n */\nexport function warnOnce(key: string, message: string): void {\n if (!isDevEnvironment()) return;\n const warned = getWarnedKeys();\n if (warned.has(key)) return;\n warned.add(key);\n console.warn(PREFIX + message);\n}\n\n/**\n * Whether {@link warnOnce} already emitted `key` (in any copy of the library, since the set lives\n * in the shared `'warnings'` global registry). A pure read: it never consumes the key, so a later\n * `warnOnce(key, …)` still warns when this returns `false`.\n *\n * Use it to skip development-only DOM work in an effect (a subtree scan, a focus-order check) once\n * its warning has fired. It returns `false` in production, where `warnOnce` consumes no key, so\n * guard that work with {@link isDev} as well.\n *\n * @param key The deduplication key passed to `warnOnce`, e.g. `'Card:nested-interactive'`.\n */\nexport function hasWarned(key: string): boolean {\n return getWarnedKeys().has(key);\n}\n\n/**\n * Warns once per (component, prop) that a prop or value is deprecated (§5.10 format):\n *\n * `[WaveUI] TabList: \\`selectedValue\\` is deprecated and will be removed in 1.0. Use \\`value\\` instead.`\n *\n * @param component The public component name, e.g. `'TabList'`.\n * @param oldName The deprecated prop or value.\n * @param newName Its replacement.\n * @param extra Optional extra sentence appended to the message.\n */\nexport function warnDeprecated(\n component: string,\n oldName: string,\n newName: string,\n extra?: string,\n): void {\n const message =\n `${component}: \\`${oldName}\\` is deprecated and will be removed in 1.0. Use \\`${newName}\\` instead.` +\n (extra ? ` ${extra}` : '');\n warnOnce(`deprecated:${component}:${oldName}`, message);\n}\n\n/**\n * Resolves a renamed prop: returns `newValue` when it is defined, otherwise `oldValue`. Warns once\n * (via {@link warnDeprecated}) whenever the deprecated prop is used, including when both are given\n * (the new value wins, C-NAMING).\n *\n * The warning is emitted at call time, and calling it during render is the intended use: the\n * warn-once key makes it idempotent, so StrictMode double renders and re-renders log once per page\n * (a C-DEV call-time exception, like `resolveSlot` and `renderTrigger`). A component that must\n * warn from an effect instead resolves `newValue !== undefined ? newValue : oldValue` itself and\n * calls {@link warnDeprecated} in that effect.\n *\n * @example\n * const orientation = resolveDeprecatedProp('Stack', props.orientation, props.direction, 'direction', 'orientation') ?? 'vertical';\n */\nexport function resolveDeprecatedProp<T>(\n component: string,\n newValue: T | undefined,\n oldValue: T | undefined,\n oldName: string,\n newName: string,\n): T | undefined {\n if (oldValue !== undefined) warnDeprecated(component, oldName, newName);\n return newValue !== undefined ? newValue : oldValue;\n}\n\nfunction getReportedMissingContexts(): Set<string> {\n return getGlobalRegistry('missing-context', () => new Set<string>());\n}\n\n/**\n * The C-CONTEXT guard for a compound part rendered outside its root: call it from the context\n * hook when the context is `null`, then return the hook's inert value.\n *\n * The text is `[WaveUI] <componentName> must be used within <parentName>`, or `[WaveUI] <message>`\n * when `message` is given. In development it throws `new Error(text)`. In production it logs the\n * text with `console.error` once per text per page (not on every render of every misplaced\n * instance) and returns; the set of logged texts lives in the global registry\n * (`getGlobalRegistry('missing-context')`), shared by every copy of the library and cleared\n * between tests by {@link __resetWarnings}.\n *\n * @param componentName The part as the consumer writes it, e.g. `'TabList.Tab'`.\n * @param parentName The root it must be rendered in, e.g. `'<TabList>'`.\n * @param message Replaces the default text (without the prefix).\n *\n * @example\n * function useTabListContext(component: string): TabListContextValue {\n * const context = React.useContext(TabListContext);\n * if (context) return context;\n * reportMissingContext(component, '<TabList>');\n * return INERT_CONTEXT;\n * }\n */\nexport function reportMissingContext(\n componentName: string,\n parentName: string,\n message?: string,\n): void {\n const text = PREFIX + (message ?? `${componentName} must be used within ${parentName}`);\n if (isDevEnvironment()) throw new Error(text);\n const reported = getReportedMissingContexts();\n if (reported.has(text)) return;\n reported.add(text);\n console.error(text);\n}\n\n/**\n * Test-only: forgets every emitted warn-once key and every missing-context text logged by\n * {@link reportMissingContext}, so each test starts clean (called from `src/test-setup.ts` after\n * each test).\n */\nexport function __resetWarnings(): void {\n getWarnedKeys().clear();\n getReportedMissingContexts().clear();\n}\n"],"mappings":";;AAEA,IAAMA,IAAS;AAOf,SAASC,IAA4B;CACnC,IAAI;EACF,OAAA,QAAA,IAAA,aAAgC;CAClC,QAAQ;EACN,OAAO;CACT;AACF;AAMA,IAAaC,IAAiBD,EAAiB;AAE/C,SAASE,IAA6B;CACpC,OAAOC,EAAkB,kCAAkB,IAAI,IAAY,CAAC;AAC9D;AA0BA,SAAgBC,EAAS,GAAa,GAAuB;CAC3D,IAAI,CAACJ,EAAiB,GAAG;CACzB,IAAMK,IAASH,EAAc;CAC7B,AAAIG,EAAO,IAAIC,CAAG,MAClBD,EAAO,IAAIC,CAAG,GACd,QAAQ,KAAKP,IAASQ,CAAO;AAC/B;AAaA,SAAgBC,EAAU,GAAsB;CAC9C,OAAON,EAAc,CAAC,CAAC,IAAII,CAAG;AAChC;AAYA,SAAgBG,EACd,GACA,GACA,GACA,GACM;CACN,IAAMF,IACJ,GAAGG,EAAU,MAAMC,EAAQ,qDAAqDC,EAAQ,gBACvFC,IAAQ,IAAIA,MAAU;CACzB,EAAS,cAAcH,EAAU,GAAGC,KAAWJ,CAAO;AACxD;AAgBA,SAAgBO,EACd,GACA,GACA,GACA,GACA,GACe;CAEf,OADIC,MAAa,KAAA,KAAWN,EAAeC,GAAWC,GAASC,CAAO,GAC/DI,MAAa,KAAA,IAAuBD,IAAXC;AAClC;AAEA,SAASC,IAA0C;CACjD,OAAOd,EAAkB,yCAAyB,IAAI,IAAY,CAAC;AACrE;AAyBA,SAAgBe,EACd,GACA,GACA,GACM;CACN,IAAMC,IAAOpB,KAAUQ,KAAW,GAAGa,EAAc,uBAAuBC;CAC1E,IAAIrB,EAAiB,GAAG,MAAU,MAAMmB,CAAI;CAC5C,IAAMG,IAAWL,EAA2B;CAC5C,AAAIK,EAAS,IAAIH,CAAI,MACrBG,EAAS,IAAIH,CAAI,GACjB,QAAQ,MAAMA,CAAI;AACpB"}
@@ -0,0 +1,2 @@
1
+ function e(e){let t=e?.trim().toLowerCase();return t===`rtl`||t===`ltr`?t:null}function t(t){if(typeof document>`u`)return`ltr`;let n=t??document.documentElement,r=n.closest(`[dir]`);for(;r;){let t=r.getAttribute(`dir`),n=e(t);if(n)return n;if(t?.trim().toLowerCase()===`auto`)break;r=r.parentElement?r.parentElement.closest(`[dir]`):null}let i=n.ownerDocument.defaultView;if(i&&n.isConnected)for(let t=n;t;t=t.parentElement){let n=e(i.getComputedStyle(t).direction);if(n)return n}return e(n.ownerDocument.dir)??e(document.dir)??`ltr`}function n(e,t){let{orientation:n,dir:r}=t,i=n===`horizontal`||n===`both`,a=n===`vertical`||n===`both`;switch(e){case`ArrowRight`:return i?r===`rtl`?`prev`:`next`:null;case`ArrowLeft`:return i?r===`rtl`?`next`:`prev`:null;case`ArrowDown`:return a?`next`:null;case`ArrowUp`:return a?`prev`:null;default:return null}}exports.getArrowIntent=n,exports.getDirection=t;
2
+ //# sourceMappingURL=direction.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"direction.cjs","names":["asDirection","normalised","value","getDirection","start","el","node","direction","view","current","computed","getArrowIntent","options","horizontal","orientation","vertical","key","dir"],"sources":["../../src/lib/direction.ts"],"sourcesContent":["/** Writing direction. */\nexport type Direction = 'ltr' | 'rtl';\n\n/** The axis (or axes) an arrow-key navigation follows. */\nexport type ArrowOrientation = 'horizontal' | 'vertical' | 'both';\n\n/** What an arrow key means for a composite: move to the next or previous item, or nothing. */\nexport type ArrowIntent = 'next' | 'prev' | null;\n\nfunction asDirection(value: string | null | undefined): Direction | null {\n const normalised = value?.trim().toLowerCase();\n return normalised === 'rtl' || normalised === 'ltr' ? normalised : null;\n}\n\n/**\n * The writing direction that applies to `el`:\n * 1. the nearest `[dir=\"ltr\" | \"rtl\"]` attribute on `el` or an ancestor (`dir=\"auto\"` stops the\n * search, because only the browser can resolve it);\n * 2. the computed CSS `direction` of `el` (or of its nearest ancestor that reports one);\n * 3. `document.dir`;\n * 4. `'ltr'`.\n *\n * Without an element it reads `document.documentElement`. Returns `'ltr'` on the server.\n * Components with a WaveProvider context read `useDirection()` during render and call this\n * at event time (`getDirection(event.currentTarget)`).\n */\nexport function getDirection(el?: Element | null): Direction {\n if (typeof document === 'undefined') return 'ltr';\n const start = el ?? document.documentElement;\n\n let node: Element | null = start.closest('[dir]');\n while (node) {\n const value = node.getAttribute('dir');\n const direction = asDirection(value);\n if (direction) return direction;\n if (value?.trim().toLowerCase() === 'auto') break;\n node = node.parentElement ? node.parentElement.closest('[dir]') : null;\n }\n\n const view = start.ownerDocument.defaultView;\n if (view && start.isConnected) {\n for (let current: Element | null = start; current; current = current.parentElement) {\n const computed = asDirection(view.getComputedStyle(current).direction);\n if (computed) return computed;\n }\n }\n\n return asDirection(start.ownerDocument.dir) ?? asDirection(document.dir) ?? 'ltr';\n}\n\n/**\n * Maps an arrow key to a navigation intent for a composite widget (C-LOGICAL):\n * - `'horizontal'`: ArrowRight/ArrowLeft (swapped in `rtl`); Up/Down are ignored.\n * - `'vertical'`: ArrowDown/ArrowUp; Left/Right are ignored.\n * - `'both'`: all four (Left/Right swapped in `rtl`).\n *\n * @example\n * const intent = getArrowIntent(event.key, { orientation: 'horizontal', dir: getDirection(event.currentTarget) });\n */\nexport function getArrowIntent(\n key: string,\n options: { orientation: ArrowOrientation; dir: Direction },\n): ArrowIntent {\n const { orientation, dir } = options;\n const horizontal = orientation === 'horizontal' || orientation === 'both';\n const vertical = orientation === 'vertical' || orientation === 'both';\n\n switch (key) {\n case 'ArrowRight':\n return horizontal ? (dir === 'rtl' ? 'prev' : 'next') : null;\n case 'ArrowLeft':\n return horizontal ? (dir === 'rtl' ? 'next' : 'prev') : null;\n case 'ArrowDown':\n return vertical ? 'next' : null;\n case 'ArrowUp':\n return vertical ? 'prev' : null;\n default:\n return null;\n }\n}\n"],"mappings":"AASA,SAASA,EAAY,EAAoD,CACvE,IAAMC,EAAaC,GAAO,KAAK,CAAC,CAAC,YAAY,EAC7C,OAAOD,IAAe,OAASA,IAAe,MAAQA,EAAa,IACrE,CAcA,SAAgBE,EAAa,EAAgC,CAC3D,GAAI,OAAO,SAAa,IAAa,MAAO,MAC5C,IAAMC,EAAQC,GAAM,SAAS,gBAEzBC,EAAuBF,EAAM,QAAQ,OAAO,EAChD,KAAOE,GAAM,CACX,IAAMJ,EAAQI,EAAK,aAAa,KAAK,EAC/BC,EAAYP,EAAYE,CAAK,EACnC,GAAIK,EAAW,OAAOA,EACtB,GAAIL,GAAO,KAAK,CAAC,CAAC,YAAY,IAAM,OAAQ,MAC5C,EAAOI,EAAK,cAAgBA,EAAK,cAAc,QAAQ,OAAO,EAAI,IACpE,CAEA,IAAME,EAAOJ,EAAM,cAAc,YACjC,GAAII,GAAQJ,EAAM,YAChB,IAAK,IAAIK,EAA0BL,EAAOK,EAAS,EAAUA,EAAQ,cAAe,CAClF,IAAMC,EAAWV,EAAYQ,EAAK,iBAAiBC,CAAO,CAAC,CAAC,SAAS,EACrE,GAAIC,EAAU,OAAOA,CACvB,CAGF,OAAOV,EAAYI,EAAM,cAAc,GAAG,GAAKJ,EAAY,SAAS,GAAG,GAAK,KAC9E,CAWA,SAAgBW,EACd,EACA,EACa,CACb,GAAM,CAAE,cAAa,OAAQC,EACvBC,EAAaC,IAAgB,cAAgBA,IAAgB,OAC7DC,EAAWD,IAAgB,YAAcA,IAAgB,OAE/D,OAAQE,EAAR,CACE,IAAK,aACH,OAAOH,EAAcI,IAAQ,MAAQ,OAAS,OAAU,KAC1D,IAAK,YACH,OAAOJ,EAAcI,IAAQ,MAAQ,OAAS,OAAU,KAC1D,IAAK,YACH,OAAOF,EAAW,OAAS,KAC7B,IAAK,UACH,OAAOA,EAAW,OAAS,KAC7B,QACE,OAAO,IACX,CACF"}
@@ -0,0 +1,35 @@
1
+ //#region src/lib/direction.ts
2
+ function e(e) {
3
+ let t = e?.trim().toLowerCase();
4
+ return t === "rtl" || t === "ltr" ? t : null;
5
+ }
6
+ function t(t) {
7
+ if (typeof document > "u") return "ltr";
8
+ let n = t ?? document.documentElement, r = n.closest("[dir]");
9
+ for (; r;) {
10
+ let t = r.getAttribute("dir"), n = e(t);
11
+ if (n) return n;
12
+ if (t?.trim().toLowerCase() === "auto") break;
13
+ r = r.parentElement ? r.parentElement.closest("[dir]") : null;
14
+ }
15
+ let i = n.ownerDocument.defaultView;
16
+ if (i && n.isConnected) for (let t = n; t; t = t.parentElement) {
17
+ let n = e(i.getComputedStyle(t).direction);
18
+ if (n) return n;
19
+ }
20
+ return e(n.ownerDocument.dir) ?? e(document.dir) ?? "ltr";
21
+ }
22
+ function n(e, t) {
23
+ let { orientation: n, dir: r } = t, i = n === "horizontal" || n === "both", a = n === "vertical" || n === "both";
24
+ switch (e) {
25
+ case "ArrowRight": return i ? r === "rtl" ? "prev" : "next" : null;
26
+ case "ArrowLeft": return i ? r === "rtl" ? "next" : "prev" : null;
27
+ case "ArrowDown": return a ? "next" : null;
28
+ case "ArrowUp": return a ? "prev" : null;
29
+ default: return null;
30
+ }
31
+ }
32
+ //#endregion
33
+ export { n as getArrowIntent, t as getDirection };
34
+
35
+ //# sourceMappingURL=direction.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"direction.mjs","names":["asDirection","normalised","value","getDirection","start","el","node","direction","view","current","computed","getArrowIntent","options","horizontal","orientation","vertical","key","dir"],"sources":["../../src/lib/direction.ts"],"sourcesContent":["/** Writing direction. */\nexport type Direction = 'ltr' | 'rtl';\n\n/** The axis (or axes) an arrow-key navigation follows. */\nexport type ArrowOrientation = 'horizontal' | 'vertical' | 'both';\n\n/** What an arrow key means for a composite: move to the next or previous item, or nothing. */\nexport type ArrowIntent = 'next' | 'prev' | null;\n\nfunction asDirection(value: string | null | undefined): Direction | null {\n const normalised = value?.trim().toLowerCase();\n return normalised === 'rtl' || normalised === 'ltr' ? normalised : null;\n}\n\n/**\n * The writing direction that applies to `el`:\n * 1. the nearest `[dir=\"ltr\" | \"rtl\"]` attribute on `el` or an ancestor (`dir=\"auto\"` stops the\n * search, because only the browser can resolve it);\n * 2. the computed CSS `direction` of `el` (or of its nearest ancestor that reports one);\n * 3. `document.dir`;\n * 4. `'ltr'`.\n *\n * Without an element it reads `document.documentElement`. Returns `'ltr'` on the server.\n * Components with a WaveProvider context read `useDirection()` during render and call this\n * at event time (`getDirection(event.currentTarget)`).\n */\nexport function getDirection(el?: Element | null): Direction {\n if (typeof document === 'undefined') return 'ltr';\n const start = el ?? document.documentElement;\n\n let node: Element | null = start.closest('[dir]');\n while (node) {\n const value = node.getAttribute('dir');\n const direction = asDirection(value);\n if (direction) return direction;\n if (value?.trim().toLowerCase() === 'auto') break;\n node = node.parentElement ? node.parentElement.closest('[dir]') : null;\n }\n\n const view = start.ownerDocument.defaultView;\n if (view && start.isConnected) {\n for (let current: Element | null = start; current; current = current.parentElement) {\n const computed = asDirection(view.getComputedStyle(current).direction);\n if (computed) return computed;\n }\n }\n\n return asDirection(start.ownerDocument.dir) ?? asDirection(document.dir) ?? 'ltr';\n}\n\n/**\n * Maps an arrow key to a navigation intent for a composite widget (C-LOGICAL):\n * - `'horizontal'`: ArrowRight/ArrowLeft (swapped in `rtl`); Up/Down are ignored.\n * - `'vertical'`: ArrowDown/ArrowUp; Left/Right are ignored.\n * - `'both'`: all four (Left/Right swapped in `rtl`).\n *\n * @example\n * const intent = getArrowIntent(event.key, { orientation: 'horizontal', dir: getDirection(event.currentTarget) });\n */\nexport function getArrowIntent(\n key: string,\n options: { orientation: ArrowOrientation; dir: Direction },\n): ArrowIntent {\n const { orientation, dir } = options;\n const horizontal = orientation === 'horizontal' || orientation === 'both';\n const vertical = orientation === 'vertical' || orientation === 'both';\n\n switch (key) {\n case 'ArrowRight':\n return horizontal ? (dir === 'rtl' ? 'prev' : 'next') : null;\n case 'ArrowLeft':\n return horizontal ? (dir === 'rtl' ? 'next' : 'prev') : null;\n case 'ArrowDown':\n return vertical ? 'next' : null;\n case 'ArrowUp':\n return vertical ? 'prev' : null;\n default:\n return null;\n }\n}\n"],"mappings":";AASA,SAASA,EAAY,GAAoD;CACvE,IAAMC,IAAaC,GAAO,KAAK,CAAC,CAAC,YAAY;CAC7C,OAAOD,MAAe,SAASA,MAAe,QAAQA,IAAa;AACrE;AAcA,SAAgBE,EAAa,GAAgC;CAC3D,IAAI,OAAO,WAAa,KAAa,OAAO;CAC5C,IAAMC,IAAQC,KAAM,SAAS,iBAEzBC,IAAuBF,EAAM,QAAQ,OAAO;CAChD,OAAOE,IAAM;EACX,IAAMJ,IAAQI,EAAK,aAAa,KAAK,GAC/BC,IAAYP,EAAYE,CAAK;EACnC,IAAIK,GAAW,OAAOA;EACtB,IAAIL,GAAO,KAAK,CAAC,CAAC,YAAY,MAAM,QAAQ;EAC5C,IAAOI,EAAK,gBAAgBA,EAAK,cAAc,QAAQ,OAAO,IAAI;CACpE;CAEA,IAAME,IAAOJ,EAAM,cAAc;CACjC,IAAII,KAAQJ,EAAM,aAChB,KAAK,IAAIK,IAA0BL,GAAOK,GAAS,IAAUA,EAAQ,eAAe;EAClF,IAAMC,IAAWV,EAAYQ,EAAK,iBAAiBC,CAAO,CAAC,CAAC,SAAS;EACrE,IAAIC,GAAU,OAAOA;CACvB;CAGF,OAAOV,EAAYI,EAAM,cAAc,GAAG,KAAKJ,EAAY,SAAS,GAAG,KAAK;AAC9E;AAWA,SAAgBW,EACd,GACA,GACa;CACb,IAAM,EAAE,gBAAa,WAAQC,GACvBC,IAAaC,MAAgB,gBAAgBA,MAAgB,QAC7DC,IAAWD,MAAgB,cAAcA,MAAgB;CAE/D,QAAQE,GAAR;EACE,KAAK,cACH,OAAOH,IAAcI,MAAQ,QAAQ,SAAS,SAAU;EAC1D,KAAK,aACH,OAAOJ,IAAcI,MAAQ,QAAQ,SAAS,SAAU;EAC1D,KAAK,aACH,OAAOF,IAAW,SAAS;EAC7B,KAAK,WACH,OAAOA,IAAW,SAAS;EAC7B,SACE,OAAO;CACX;AACF"}
@@ -0,0 +1,2 @@
1
+ function e(e){let t=e.target;return!!t&&typeof t.nodeType==`number`&&e.currentTarget.contains(t)}function t(e){let t=e.target,n=typeof t?.closest==`function`?t.closest(`[aria-disabled="true"]`):null;return n!==null&&e.currentTarget.contains(n)}var n=new Set([`text`,`search`,`url`,`tel`,`email`,`password`,`number`]);function r(e){if(!e||e.nodeType!==1)return!1;let t=e;if(t.localName===`textarea`)return!0;if(t.localName===`input`)return n.has(t.type);if(typeof t.isContentEditable==`boolean`)return t.isContentEditable;let r=t.closest(`[contenteditable]`);return r!==null&&r.getAttribute(`contenteditable`)!==`false`}exports.isDisabledTrigger=t,exports.isEditableTarget=r,exports.isOwnEvent=e;
2
+ //# sourceMappingURL=events.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"events.cjs","names":["isOwnEvent","target","event","isDisabledTrigger","disabled","TEXT_INPUT_TYPES","isEditableTarget","el","editable"],"sources":["../../src/lib/events.ts"],"sourcesContent":["import type * as React from 'react';\n\n/**\n * Event predicates shared by the menu, popover, hover and context-menu code. Server-safe: this\n * module imports nothing from React at run time.\n */\n\n/**\n * Whether an event started in the element that handles it (`currentTarget`) or inside its DOM.\n * React bubbles the events of a portal (a Popover or Dialog opened from an item) through the item\n * and the menu surface although their target lives elsewhere in the document: those are not the\n * menu's to handle. The target is duck typed, so a menu rendered into another realm's document\n * (an iframe) still handles its own events.\n */\nexport function isOwnEvent(event: React.SyntheticEvent<HTMLElement>): boolean {\n const target = event.target as Partial<Node> | null;\n return (\n !!target && typeof target.nodeType === 'number' && event.currentTarget.contains(target as Node)\n );\n}\n\n/**\n * Whether an event comes from an `aria-disabled=\"true\"` element at or inside the element that\n * handles it (`currentTarget`): the trigger element itself, or the focusable element inside a\n * wrapper span, where `currentTarget` is the span. An `aria-disabled` ancestor outside the trigger\n * does not count.\n */\nexport function isDisabledTrigger(event: React.SyntheticEvent<HTMLElement>): boolean {\n const target = event.target as Partial<Element> | null;\n const disabled =\n typeof target?.closest === 'function' ? target.closest('[aria-disabled=\"true\"]') : null;\n return disabled !== null && event.currentTarget.contains(disabled);\n}\n\n/** `<input>` types whose value is text the user edits (a missing or unknown type is `text`). */\nconst TEXT_INPUT_TYPES = new Set(['text', 'search', 'url', 'tel', 'email', 'password', 'number']);\n\n/**\n * Whether `target` is a field where the browser's own context menu matters (paste, spelling\n * suggestions): a text-type `<input>` (`text`, `search`, `url`, `tel`, `email`, `password`,\n * `number`, or no `type`), a `<textarea>`, or an element whose `isContentEditable` is `true`\n * (read from the nearest `contenteditable` attribute where the engine lacks the property). Duck\n * typed, so an element of another realm (an iframe) counts too.\n */\nexport function isEditableTarget(target: EventTarget | null): boolean {\n if (!target || (target as Partial<Node>).nodeType !== 1) return false;\n const el = target as HTMLElement;\n if (el.localName === 'textarea') return true;\n if (el.localName === 'input') return TEXT_INPUT_TYPES.has((el as HTMLInputElement).type);\n if (typeof el.isContentEditable === 'boolean') return el.isContentEditable;\n const editable = el.closest('[contenteditable]');\n return editable !== null && editable.getAttribute('contenteditable') !== 'false';\n}\n"],"mappings":"AAcA,SAAgBA,EAAW,EAAmD,CAC5E,IAAMC,EAASC,EAAM,OACrB,MACE,CAAC,CAACD,GAAU,OAAOA,EAAO,UAAa,UAAYC,EAAM,cAAc,SAASD,CAAc,CAElG,CAQA,SAAgBE,EAAkB,EAAmD,CACnF,IAAMF,EAASC,EAAM,OACfE,EACJ,OAAOH,GAAQ,SAAY,WAAaA,EAAO,QAAQ,wBAAwB,EAAI,KACrF,OAAOG,IAAa,MAAQF,EAAM,cAAc,SAASE,CAAQ,CACnE,CAGA,IAAMC,EAAmB,IAAI,IAAI,CAAC,OAAQ,SAAU,MAAO,MAAO,QAAS,WAAY,QAAQ,CAAC,EAShG,SAAgBC,EAAiB,EAAqC,CACpE,GAAI,CAACL,GAAWA,EAAyB,WAAa,EAAG,MAAO,GAChE,IAAMM,EAAKN,EACX,GAAIM,EAAG,YAAc,WAAY,MAAO,GACxC,GAAIA,EAAG,YAAc,QAAS,OAAOF,EAAiB,IAAKE,EAAwB,IAAI,EACvF,GAAI,OAAOA,EAAG,mBAAsB,UAAW,OAAOA,EAAG,kBACzD,IAAMC,EAAWD,EAAG,QAAQ,mBAAmB,EAC/C,OAAOC,IAAa,MAAQA,EAAS,aAAa,iBAAiB,IAAM,OAC3E"}
@@ -0,0 +1,31 @@
1
+ //#region src/lib/events.ts
2
+ function e(e) {
3
+ let t = e.target;
4
+ return !!t && typeof t.nodeType == "number" && e.currentTarget.contains(t);
5
+ }
6
+ function t(e) {
7
+ let t = e.target, n = typeof t?.closest == "function" ? t.closest("[aria-disabled=\"true\"]") : null;
8
+ return n !== null && e.currentTarget.contains(n);
9
+ }
10
+ var n = /* @__PURE__ */ new Set([
11
+ "text",
12
+ "search",
13
+ "url",
14
+ "tel",
15
+ "email",
16
+ "password",
17
+ "number"
18
+ ]);
19
+ function r(e) {
20
+ if (!e || e.nodeType !== 1) return !1;
21
+ let t = e;
22
+ if (t.localName === "textarea") return !0;
23
+ if (t.localName === "input") return n.has(t.type);
24
+ if (typeof t.isContentEditable == "boolean") return t.isContentEditable;
25
+ let r = t.closest("[contenteditable]");
26
+ return r !== null && r.getAttribute("contenteditable") !== "false";
27
+ }
28
+ //#endregion
29
+ export { t as isDisabledTrigger, r as isEditableTarget, e as isOwnEvent };
30
+
31
+ //# sourceMappingURL=events.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"events.mjs","names":["isOwnEvent","target","event","isDisabledTrigger","disabled","TEXT_INPUT_TYPES","isEditableTarget","el","editable"],"sources":["../../src/lib/events.ts"],"sourcesContent":["import type * as React from 'react';\n\n/**\n * Event predicates shared by the menu, popover, hover and context-menu code. Server-safe: this\n * module imports nothing from React at run time.\n */\n\n/**\n * Whether an event started in the element that handles it (`currentTarget`) or inside its DOM.\n * React bubbles the events of a portal (a Popover or Dialog opened from an item) through the item\n * and the menu surface although their target lives elsewhere in the document: those are not the\n * menu's to handle. The target is duck typed, so a menu rendered into another realm's document\n * (an iframe) still handles its own events.\n */\nexport function isOwnEvent(event: React.SyntheticEvent<HTMLElement>): boolean {\n const target = event.target as Partial<Node> | null;\n return (\n !!target && typeof target.nodeType === 'number' && event.currentTarget.contains(target as Node)\n );\n}\n\n/**\n * Whether an event comes from an `aria-disabled=\"true\"` element at or inside the element that\n * handles it (`currentTarget`): the trigger element itself, or the focusable element inside a\n * wrapper span, where `currentTarget` is the span. An `aria-disabled` ancestor outside the trigger\n * does not count.\n */\nexport function isDisabledTrigger(event: React.SyntheticEvent<HTMLElement>): boolean {\n const target = event.target as Partial<Element> | null;\n const disabled =\n typeof target?.closest === 'function' ? target.closest('[aria-disabled=\"true\"]') : null;\n return disabled !== null && event.currentTarget.contains(disabled);\n}\n\n/** `<input>` types whose value is text the user edits (a missing or unknown type is `text`). */\nconst TEXT_INPUT_TYPES = new Set(['text', 'search', 'url', 'tel', 'email', 'password', 'number']);\n\n/**\n * Whether `target` is a field where the browser's own context menu matters (paste, spelling\n * suggestions): a text-type `<input>` (`text`, `search`, `url`, `tel`, `email`, `password`,\n * `number`, or no `type`), a `<textarea>`, or an element whose `isContentEditable` is `true`\n * (read from the nearest `contenteditable` attribute where the engine lacks the property). Duck\n * typed, so an element of another realm (an iframe) counts too.\n */\nexport function isEditableTarget(target: EventTarget | null): boolean {\n if (!target || (target as Partial<Node>).nodeType !== 1) return false;\n const el = target as HTMLElement;\n if (el.localName === 'textarea') return true;\n if (el.localName === 'input') return TEXT_INPUT_TYPES.has((el as HTMLInputElement).type);\n if (typeof el.isContentEditable === 'boolean') return el.isContentEditable;\n const editable = el.closest('[contenteditable]');\n return editable !== null && editable.getAttribute('contenteditable') !== 'false';\n}\n"],"mappings":";AAcA,SAAgBA,EAAW,GAAmD;CAC5E,IAAMC,IAASC,EAAM;CACrB,OACE,CAAC,CAACD,KAAU,OAAOA,EAAO,YAAa,YAAYC,EAAM,cAAc,SAASD,CAAc;AAElG;AAQA,SAAgBE,EAAkB,GAAmD;CACnF,IAAMF,IAASC,EAAM,QACfE,IACJ,OAAOH,GAAQ,WAAY,aAAaA,EAAO,QAAQ,0BAAwB,IAAI;CACrF,OAAOG,MAAa,QAAQF,EAAM,cAAc,SAASE,CAAQ;AACnE;AAGA,IAAMC,oBAAmB,IAAI,IAAI;CAAC;CAAQ;CAAU;CAAO;CAAO;CAAS;CAAY;AAAQ,CAAC;AAShG,SAAgBC,EAAiB,GAAqC;CACpE,IAAI,CAACL,KAAWA,EAAyB,aAAa,GAAG,OAAO;CAChE,IAAMM,IAAKN;CACX,IAAIM,EAAG,cAAc,YAAY,OAAO;CACxC,IAAIA,EAAG,cAAc,SAAS,OAAOF,EAAiB,IAAKE,EAAwB,IAAI;CACvF,IAAI,OAAOA,EAAG,qBAAsB,WAAW,OAAOA,EAAG;CACzD,IAAMC,IAAWD,EAAG,QAAQ,mBAAmB;CAC/C,OAAOC,MAAa,QAAQA,EAAS,aAAa,iBAAiB,MAAM;AAC3E"}
@@ -0,0 +1,2 @@
1
+ var e=[`a[href]`,`area[href]`,`button`,`input`,`select`,`textarea`,`iframe`,`audio[controls]`,`video[controls]`,`summary`,`[contenteditable]:not([contenteditable="false"])`].join(`, `),t=`${e}, [tabindex]`;function n(e){let t=e.getAttribute(`tabindex`);if(t===null)return null;let n=Number.parseInt(t,10);return Number.isNaN(n)?null:n}function r(t){return t.matches(e)}function i(e){let t=n(e);return t===null?r(e)?0:-1:t}function a(e){try{return e.matches(`:disabled`)}catch{return e.disabled===!0}}function o(e){return e.localName===`input`&&e.type===`hidden`}function s(e){let t=e.parentElement;return!t||t.localName!==`details`?!1:Array.from(t.children).find(e=>e.localName===`summary`)===e}function c(e){let t=e.ownerDocument.defaultView;return t?t.getComputedStyle(e):null}function l(e,t){let n=t?.get(e);if(n!==void 0)return n;let r=!1;if(e.hasAttribute(`hidden`)||c(e)?.display===`none`)r=!0;else{let n=e.parentElement;n&&(r=n.localName===`details`&&!n.hasAttribute(`open`)&&e!==Array.from(n.children).find(e=>e.localName===`summary`)||l(n,t))}return t?.set(e,r),r}function u(e,t){if(e.closest(`[inert]`)||l(e,t))return!0;let n=c(e)?.visibility;return n===`hidden`||n===`collapse`}function d(e,t){return!r(e)&&n(e)===null||a(e)||o(e)||e.localName===`summary`&&!s(e)&&n(e)===null?!1:!u(e,t)}function f(e){let t=e.form;return(t?Array.from(t.elements):Array.from(e.getRootNode().querySelectorAll(`input[type="radio"]`))).filter(n=>n.localName===`input`&&n.type===`radio`&&n.name===e.name&&n.form===t)}function p(e){return e.getRootNode().activeElement??null}function m(e){if(e.localName!==`input`)return!0;let t=e;if(t.type!==`radio`||!t.name)return!0;let n=f(t),r=p(t);if(r&&n.includes(r))return r===t;let i=n.find(e=>e.checked);return!i||i===t}function h(e,t){return d(e,t)&&i(e)>=0&&m(e)}function g(e){return d(e)}function _(e,n){let r=new Map,a=Array.from(e.querySelectorAll(t));n?.includeContainer&&e.matches(t)&&a.unshift(e);let o=a.filter(e=>h(e,r)),s=o.map((e,t)=>({el:e,index:t,tabIndex:i(e)})).filter(e=>e.tabIndex>0).sort((e,t)=>e.tabIndex-t.tabIndex||e.index-t.index).map(e=>e.el),c=o.filter(e=>i(e)===0);return[...s,...c]}function v(e,t){return _(e,t)[0]??null}function y(e,t){let n=_(e,t);return n[n.length-1]??null}function b(e){return!!e&&e.isConnected&&g(e)}function x(e,t){if(!e||!b(e))return!1;try{e.focus(t)}catch{return!1}return e.ownerDocument.activeElement===e}exports.FOCUSABLE_SELECTOR=t,exports.focusElement=x,exports.getFirstTabbable=v,exports.getLastTabbable=y,exports.getTabbableElements=_,exports.isConnectedAndFocusable=b,exports.isFocusable=g,exports.isHiddenInput=o;
2
+ //# sourceMappingURL=focus.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"focus.cjs","names":["NATIVELY_FOCUSABLE_SELECTOR","FOCUSABLE_SELECTOR","parseTabIndexAttribute","value","el","parsed","isNativelyFocusable","getTabIndex","attribute","isDisabled","isHiddenInput","isDetailsSummary","parent","summary","child","getComputed","view","isRemovedFromLayout","cached","cache","hidden","isHidden","visibility","isFocusableInternal","getRadioGroup","form","radio","getActiveElementFor","isRadioTabStop","group","active","checked","member","isTabbableInternal","isFocusable","getTabbableElements","candidates","container","options","tabbable","positive","entry","a","b","natural","getFirstTabbable","getLastTabbable","isConnectedAndFocusable","focusElement"],"sources":["../../src/lib/focus.ts"],"sourcesContent":["/**\n * Focus utilities that work in browsers and in jsdom (no layout APIs such as `offsetParent` or\n * `getClientRects`; visibility comes from attributes and computed style).\n */\n\nconst NATIVELY_FOCUSABLE_SELECTOR = [\n 'a[href]',\n 'area[href]',\n 'button',\n 'input',\n 'select',\n 'textarea',\n 'iframe',\n 'audio[controls]',\n 'video[controls]',\n 'summary',\n '[contenteditable]:not([contenteditable=\"false\"])',\n].join(', ');\n\n/**\n * Selector for every element that may be able to receive focus. Candidates are filtered further by\n * {@link isFocusable} (disabled, hidden, inert, …) and {@link isTabbable}.\n */\nexport const FOCUSABLE_SELECTOR = `${NATIVELY_FOCUSABLE_SELECTOR}, [tabindex]`;\n\ntype HiddenCache = Map<Element, boolean>;\n\nfunction parseTabIndexAttribute(el: Element): number | null {\n const value = el.getAttribute('tabindex');\n if (value === null) return null;\n const parsed = Number.parseInt(value, 10);\n return Number.isNaN(parsed) ? null : parsed;\n}\n\nfunction isNativelyFocusable(el: Element): boolean {\n return el.matches(NATIVELY_FOCUSABLE_SELECTOR);\n}\n\n/** The tab index browsers use (jsdom reports -1 for contenteditable and 0 for `<a>` without href). */\nfunction getTabIndex(el: Element): number {\n const attribute = parseTabIndexAttribute(el);\n if (attribute !== null) return attribute;\n return isNativelyFocusable(el) ? 0 : -1;\n}\n\nfunction isDisabled(el: Element): boolean {\n try {\n return el.matches(':disabled');\n } catch {\n return (el as { disabled?: unknown }).disabled === true;\n }\n}\n\n/** Whether `el` is an `<input type=\"hidden\">` (a form value, never focusable). */\nexport function isHiddenInput(el: Element): boolean {\n return el.localName === 'input' && (el as HTMLInputElement).type === 'hidden';\n}\n\n/** `<summary>` is focusable only as the first summary child of a `<details>`. */\nfunction isDetailsSummary(summary: Element): boolean {\n const parent = summary.parentElement;\n if (!parent || parent.localName !== 'details') return false;\n return Array.from(parent.children).find((child) => child.localName === 'summary') === summary;\n}\n\nfunction getComputed(el: Element): CSSStyleDeclaration | null {\n const view = el.ownerDocument.defaultView;\n return view ? view.getComputedStyle(el) : null;\n}\n\n/** Hidden by `hidden`, `display: none` on itself or an ancestor, or a closed `<details>`. */\nfunction isRemovedFromLayout(el: Element, cache?: HiddenCache): boolean {\n const cached = cache?.get(el);\n if (cached !== undefined) return cached;\n\n let hidden = false;\n if (el.hasAttribute('hidden') || getComputed(el)?.display === 'none') {\n hidden = true;\n } else {\n const parent = el.parentElement;\n if (parent) {\n if (parent.localName === 'details' && !parent.hasAttribute('open')) {\n // Only the first <summary> of a closed <details> is rendered.\n const summary = Array.from(parent.children).find((child) => child.localName === 'summary');\n hidden = el !== summary || isRemovedFromLayout(parent, cache);\n } else {\n hidden = isRemovedFromLayout(parent, cache);\n }\n }\n }\n\n cache?.set(el, hidden);\n return hidden;\n}\n\nfunction isHidden(el: Element, cache?: HiddenCache): boolean {\n if (el.closest('[inert]')) return true;\n if (isRemovedFromLayout(el, cache)) return true;\n const visibility = getComputed(el)?.visibility;\n return visibility === 'hidden' || visibility === 'collapse';\n}\n\nfunction isFocusableInternal(el: Element, cache?: HiddenCache): boolean {\n if (!isNativelyFocusable(el) && parseTabIndexAttribute(el) === null) return false;\n if (isDisabled(el) || isHiddenInput(el)) return false;\n if (el.localName === 'summary' && !isDetailsSummary(el) && parseTabIndexAttribute(el) === null) {\n return false;\n }\n return !isHidden(el, cache);\n}\n\nfunction getRadioGroup(radio: HTMLInputElement): HTMLInputElement[] {\n const form = radio.form;\n const candidates: Element[] = form\n ? Array.from(form.elements)\n : Array.from(\n (radio.getRootNode() as Document | ShadowRoot).querySelectorAll('input[type=\"radio\"]'),\n );\n return candidates.filter(\n (el): el is HTMLInputElement =>\n el.localName === 'input' &&\n (el as HTMLInputElement).type === 'radio' &&\n (el as HTMLInputElement).name === radio.name &&\n (el as HTMLInputElement).form === form,\n );\n}\n\n/**\n * The focused element of `el`'s document or shadow root (`null` when `el` is disconnected). Duck\n * typed rather than `instanceof`, so elements of another realm (iframes) work too.\n */\nfunction getActiveElementFor(el: Element): Element | null {\n const root = el.getRootNode() as Node & { activeElement?: Element | null };\n return root.activeElement ?? null;\n}\n\n/**\n * A named radio group is one tab stop, following browsers (Chromium's\n * `RadioInputType::IsKeyboardFocusable`, the `tabbable` library):\n * - while focus is on a member of the group, only that member (Tab and Shift+Tab leave the group);\n * - otherwise the checked radio (the whole group is skipped when it cannot take focus);\n * - otherwise, with no checked radio, every member: Tab enters at the first one, Shift+Tab at the\n * last one, so both `getFirstTabbable` and `getLastTabbable` return the browser's entry radio.\n * Members that are not focusable (disabled, hidden) are filtered out before this check.\n */\nfunction isRadioTabStop(el: Element): boolean {\n if (el.localName !== 'input') return true;\n const radio = el as HTMLInputElement;\n if (radio.type !== 'radio' || !radio.name) return true;\n const group = getRadioGroup(radio);\n const active = getActiveElementFor(radio);\n if (active && (group as Element[]).includes(active)) return active === radio;\n const checked = group.find((member) => member.checked);\n return checked ? checked === radio : true;\n}\n\nfunction isTabbableInternal(el: Element, cache?: HiddenCache): boolean {\n return isFocusableInternal(el, cache) && getTabIndex(el) >= 0 && isRadioTabStop(el);\n}\n\n/**\n * Whether `el` can receive focus (programmatically or by pointer): a natively focusable element or\n * one with a valid `tabindex`, that is not disabled (including via a disabled `<fieldset>`), not\n * `input[type=hidden]`, and not inside `[inert]`, `[hidden]`, `display: none`, `visibility:\n * hidden` or a closed `<details>` (except its summary).\n */\nexport function isFocusable(el: Element): boolean {\n return isFocusableInternal(el);\n}\n\n/**\n * Whether `el` is reached by Tab: focusable, `tabIndex >= 0`, and — for a radio in a named group —\n * the group's tab stop: the focused member while focus is in the group, else the checked radio,\n * else (nothing checked) every focusable member, as browsers enter such a group at its first radio\n * going forward and at its last radio going backward.\n */\nexport function isTabbable(el: Element): boolean {\n return isTabbableInternal(el);\n}\n\n/**\n * The tabbable elements inside `container` in sequential focus order: positive `tabindex` first\n * (ascending), then `tabindex=0` / natively tabbable elements in document order. Named radio\n * groups follow {@link isTabbable}, so the result depends on where focus currently is: when focus\n * is on a radio, the rest of its group is left out, which makes the focused radio the last entry\n * when its group ends the container (the element a focus trap wraps from).\n *\n * @param options.includeContainer Also consider `container` itself.\n */\nexport function getTabbableElements(\n container: Element,\n options?: { includeContainer?: boolean },\n): HTMLElement[] {\n const cache: HiddenCache = new Map();\n const candidates = Array.from(container.querySelectorAll<HTMLElement>(FOCUSABLE_SELECTOR));\n if (options?.includeContainer && container.matches(FOCUSABLE_SELECTOR)) {\n candidates.unshift(container as HTMLElement);\n }\n const tabbable = candidates.filter((el) => isTabbableInternal(el, cache));\n const positive = tabbable\n .map((el, index) => ({ el, index, tabIndex: getTabIndex(el) }))\n .filter((entry) => entry.tabIndex > 0)\n .sort((a, b) => a.tabIndex - b.tabIndex || a.index - b.index)\n .map((entry) => entry.el);\n const natural = tabbable.filter((el) => getTabIndex(el) === 0);\n return [...positive, ...natural];\n}\n\n/** The first tabbable element inside `container`, or `null`. */\nexport function getFirstTabbable(\n container: Element,\n options?: { includeContainer?: boolean },\n): HTMLElement | null {\n return getTabbableElements(container, options)[0] ?? null;\n}\n\n/** The last tabbable element inside `container`, or `null`. */\nexport function getLastTabbable(\n container: Element,\n options?: { includeContainer?: boolean },\n): HTMLElement | null {\n const tabbable = getTabbableElements(container, options);\n return tabbable[tabbable.length - 1] ?? null;\n}\n\n/** Whether `el` exists, is attached to a document and {@link isFocusable}. */\nexport function isConnectedAndFocusable(el: Element | null | undefined): boolean {\n return !!el && el.isConnected && isFocusable(el);\n}\n\n/**\n * Focuses `el` when it is connected and focusable. Returns `true` when focus actually moved to it.\n */\nexport function focusElement(\n el: HTMLElement | SVGElement | null | undefined,\n options?: FocusOptions,\n): boolean {\n if (!el || !isConnectedAndFocusable(el)) return false;\n try {\n el.focus(options);\n } catch {\n return false;\n }\n return el.ownerDocument.activeElement === el;\n}\n\n/** Whether the focused element of `container`'s document is `container` or inside it. */\nexport function containsFocus(container: Element | null | undefined): boolean {\n if (!container) return false;\n const active = container.ownerDocument.activeElement;\n return !!active && container.contains(active);\n}\n"],"mappings":"AAKA,IAAMA,EAA8B,CAClC,UACA,aACA,SACA,QACA,SACA,WACA,SACA,kBACA,kBACA,UACA,kDACF,CAAC,CAAC,KAAK,IAAI,EAMEC,EAAqB,GAAGD,EAA4B,cAIjE,SAASE,EAAuB,EAA4B,CAC1D,IAAMC,EAAQC,EAAG,aAAa,UAAU,EACxC,GAAID,IAAU,KAAM,OAAO,KAC3B,IAAME,EAAS,OAAO,SAASF,EAAO,EAAE,EACxC,OAAO,OAAO,MAAME,CAAM,EAAI,KAAOA,CACvC,CAEA,SAASC,EAAoB,EAAsB,CACjD,OAAOF,EAAG,QAAQJ,CAA2B,CAC/C,CAGA,SAASO,EAAY,EAAqB,CACxC,IAAMC,EAAYN,EAAuBE,CAAE,EAE3C,OADII,IAAc,KACXF,EAAoBF,CAAE,EAAI,EAAI,GADNI,CAEjC,CAEA,SAASC,EAAW,EAAsB,CACxC,GAAI,CACF,OAAOL,EAAG,QAAQ,WAAW,CAC/B,MAAQ,CACN,OAAQA,EAA8B,WAAa,EACrD,CACF,CAGA,SAAgBM,EAAc,EAAsB,CAClD,OAAON,EAAG,YAAc,SAAYA,EAAwB,OAAS,QACvE,CAGA,SAASO,EAAiB,EAA2B,CACnD,IAAMC,EAASC,EAAQ,cAEvB,MADI,CAACD,GAAUA,EAAO,YAAc,UAAkB,GAC/C,MAAM,KAAKA,EAAO,QAAQ,CAAC,CAAC,KAAM,GAAUE,EAAM,YAAc,SAAS,IAAMD,CACxF,CAEA,SAASE,EAAY,EAAyC,CAC5D,IAAMC,EAAOZ,EAAG,cAAc,YAC9B,OAAOY,EAAOA,EAAK,iBAAiBZ,CAAE,EAAI,IAC5C,CAGA,SAASa,EAAoB,EAAa,EAA8B,CACtE,IAAMC,EAASC,GAAO,IAAIf,CAAE,EAC5B,GAAIc,IAAW,IAAA,GAAW,OAAOA,EAEjC,IAAIE,EAAS,GACb,GAAIhB,EAAG,aAAa,QAAQ,GAAKW,EAAYX,CAAE,CAAC,EAAE,UAAY,OAC5D,EAAS,OACJ,CACL,IAAMQ,EAASR,EAAG,cACdQ,IACF,AAKEQ,EALER,EAAO,YAAc,WAAa,CAACA,EAAO,aAAa,MAAM,GAGtDR,IADO,MAAM,KAAKQ,EAAO,QAAQ,CAAC,CAAC,KAAM,GAAUE,EAAM,YAAc,SAChE,GAEPG,EAAoBL,EAAQO,CAAK,EAGhD,CAGA,OADAA,GAAO,IAAIf,EAAIgB,CAAM,EACdA,CACT,CAEA,SAASC,EAAS,EAAa,EAA8B,CAE3D,GADIjB,EAAG,QAAQ,SAAS,GACpBa,EAAoBb,EAAIe,CAAK,EAAG,MAAO,GAC3C,IAAMG,EAAaP,EAAYX,CAAE,CAAC,EAAE,WACpC,OAAOkB,IAAe,UAAYA,IAAe,UACnD,CAEA,SAASC,EAAoB,EAAa,EAA8B,CAMtE,MALI,CAACjB,EAAoBF,CAAE,GAAKF,EAAuBE,CAAE,IAAM,MAC3DK,EAAWL,CAAE,GAAKM,EAAcN,CAAE,GAClCA,EAAG,YAAc,WAAa,CAACO,EAAiBP,CAAE,GAAKF,EAAuBE,CAAE,IAAM,KACjF,GAEF,CAACiB,EAASjB,EAAIe,CAAK,CAC5B,CAEA,SAASK,EAAc,EAA6C,CAClE,IAAMC,EAAOC,EAAM,KAMnB,OAL8BD,EAC1B,MAAM,KAAKA,EAAK,QAAQ,EACxB,MAAM,KACHC,EAAM,YAAY,CAAC,CAA2B,iBAAiB,qBAAqB,CACvF,EAAA,CACc,OACf,GACCtB,EAAG,YAAc,SAChBA,EAAwB,OAAS,SACjCA,EAAwB,OAASsB,EAAM,MACvCtB,EAAwB,OAASqB,CACtC,CACF,CAMA,SAASE,EAAoB,EAA6B,CAExD,OADavB,EAAG,YACT,CAAA,CAAK,eAAiB,IAC/B,CAWA,SAASwB,EAAe,EAAsB,CAC5C,GAAIxB,EAAG,YAAc,QAAS,MAAO,GACrC,IAAMsB,EAAQtB,EACd,GAAIsB,EAAM,OAAS,SAAW,CAACA,EAAM,KAAM,MAAO,GAClD,IAAMG,EAAQL,EAAcE,CAAK,EAC3BI,EAASH,EAAoBD,CAAK,EACxC,GAAII,GAAWD,EAAoB,SAASC,CAAM,EAAG,OAAOA,IAAWJ,EACvE,IAAMK,EAAUF,EAAM,KAAM,GAAWG,EAAO,OAAO,EACrD,MAAO,IAAUD,IAAYL,CAC/B,CAEA,SAASO,EAAmB,EAAa,EAA8B,CACrE,OAAOV,EAAoBnB,EAAIe,CAAK,GAAKZ,EAAYH,CAAE,GAAK,GAAKwB,EAAexB,CAAE,CACpF,CAQA,SAAgB8B,EAAY,EAAsB,CAChD,OAAOX,EAAoBnB,CAAE,CAC/B,CAqBA,SAAgB+B,EACd,EACA,EACe,CACf,IAAMhB,EAAqB,IAAI,IACzBiB,EAAa,MAAM,KAAKC,EAAU,iBAA8BpC,CAAkB,CAAC,EACrFqC,GAAS,kBAAoBD,EAAU,QAAQpC,CAAkB,GACnEmC,EAAW,QAAQC,CAAwB,EAE7C,IAAME,EAAWH,EAAW,OAAQ,GAAOH,EAAmB7B,EAAIe,CAAK,CAAC,EAClEqB,EAAWD,EACd,KAAK,EAAI,KAAW,CAAE,KAAI,QAAO,SAAUhC,EAAYH,CAAE,CAAE,EAAE,CAAC,CAC9D,OAAQ,GAAUqC,EAAM,SAAW,CAAC,CAAC,CACrC,MAAM,EAAG,IAAMC,EAAE,SAAWC,EAAE,UAAYD,EAAE,MAAQC,EAAE,KAAK,CAAC,CAC5D,IAAK,GAAUF,EAAM,EAAE,EACpBG,EAAUL,EAAS,OAAQ,GAAOhC,EAAYH,CAAE,IAAM,CAAC,EAC7D,MAAO,CAAC,GAAGoC,EAAU,GAAGI,CAAO,CACjC,CAGA,SAAgBC,EACd,EACA,EACoB,CACpB,OAAOV,EAAoBE,EAAWC,CAAO,CAAC,CAAC,IAAM,IACvD,CAGA,SAAgBQ,EACd,EACA,EACoB,CACpB,IAAMP,EAAWJ,EAAoBE,EAAWC,CAAO,EACvD,OAAOC,EAASA,EAAS,OAAS,IAAM,IAC1C,CAGA,SAAgBQ,EAAwB,EAAyC,CAC/E,MAAO,CAAC,CAAC3C,GAAMA,EAAG,aAAe8B,EAAY9B,CAAE,CACjD,CAKA,SAAgB4C,EACd,EACA,EACS,CACT,GAAI,CAAC5C,GAAM,CAAC2C,EAAwB3C,CAAE,EAAG,MAAO,GAChD,GAAI,CACFA,EAAG,MAAMkC,CAAO,CAClB,MAAQ,CACN,MAAO,EACT,CACA,OAAOlC,EAAG,cAAc,gBAAkBA,CAC5C"}