@k2b/ui 0.63.0 → 0.64.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 (332) hide show
  1. package/dist/base.css +6 -3
  2. package/dist/browser/actions/ContextMenu.js +3 -1
  3. package/dist/browser/actions/ContextMenu.js.map +1 -1
  4. package/dist/browser/actions/DragAndDrop.js +26 -5
  5. package/dist/browser/actions/DragAndDrop.js.map +1 -1
  6. package/dist/browser/actions/DropOverlay.js +76 -0
  7. package/dist/browser/actions/DropOverlay.js.map +1 -0
  8. package/dist/browser/actions/Dropdown.js +69 -15
  9. package/dist/browser/actions/Dropdown.js.map +1 -1
  10. package/dist/browser/actions/SortableList.js +338 -85
  11. package/dist/browser/actions/SortableList.js.map +1 -1
  12. package/dist/browser/actions/ViewTabs.js +9 -5
  13. package/dist/browser/actions/ViewTabs.js.map +1 -1
  14. package/dist/browser/actions/drag-and-drop-keyboard.js +211 -0
  15. package/dist/browser/actions/drag-and-drop-keyboard.js.map +1 -0
  16. package/dist/browser/actions/drag-and-drop-messages.js +21 -25
  17. package/dist/browser/actions/drag-and-drop-messages.js.map +1 -1
  18. package/dist/browser/actions/drag-and-drop.js +206 -184
  19. package/dist/browser/actions/drag-and-drop.js.map +1 -1
  20. package/dist/browser/actions/drop-overlay-pages.js +54 -0
  21. package/dist/browser/actions/drop-overlay-pages.js.map +1 -0
  22. package/dist/browser/actions/drop-overlay-view.js +318 -0
  23. package/dist/browser/actions/drop-overlay-view.js.map +1 -0
  24. package/dist/browser/actions/index.js +4 -2
  25. package/dist/browser/actions/index.js.map +1 -1
  26. package/dist/browser/actions/menu-sheet-messages.js +26 -0
  27. package/dist/browser/actions/menu-sheet-messages.js.map +1 -0
  28. package/dist/browser/actions/menu-sheet.js +80 -18
  29. package/dist/browser/actions/menu-sheet.js.map +1 -1
  30. package/dist/browser/actions/menu-submenu-panel.js +392 -0
  31. package/dist/browser/actions/menu-submenu-panel.js.map +1 -0
  32. package/dist/browser/actions/preload-when-idle.js +15 -0
  33. package/dist/browser/actions/preload-when-idle.js.map +1 -0
  34. package/dist/browser/actions/sortable-board.js +107 -0
  35. package/dist/browser/actions/sortable-board.js.map +1 -0
  36. package/dist/browser/actions/sortable-keyboard.js +202 -0
  37. package/dist/browser/actions/sortable-keyboard.js.map +1 -0
  38. package/dist/browser/actions/sortable-list-messages.js +23 -11
  39. package/dist/browser/actions/sortable-list-messages.js.map +1 -1
  40. package/dist/browser/actions/sortable-place.js +26 -0
  41. package/dist/browser/actions/sortable-place.js.map +1 -0
  42. package/dist/browser/chat/ChatDecision.js +499 -463
  43. package/dist/browser/chat/ChatDecision.js.map +1 -1
  44. package/dist/browser/chat/ChatDecisionField.js +311 -0
  45. package/dist/browser/chat/ChatDecisionField.js.map +1 -0
  46. package/dist/browser/chat/index.js +2 -0
  47. package/dist/browser/chat/index.js.map +1 -1
  48. package/dist/browser/chat/types.js.map +1 -1
  49. package/dist/browser/chat-decision-field.js +6 -0
  50. package/dist/browser/chat-decision-field.js.map +1 -0
  51. package/dist/browser/content/DataTable.js +326 -205
  52. package/dist/browser/content/DataTable.js.map +1 -1
  53. package/dist/browser/content/FileName.js +68 -0
  54. package/dist/browser/content/FileName.js.map +1 -0
  55. package/dist/browser/content/ProgressPath.js +30 -25
  56. package/dist/browser/content/ProgressPath.js.map +1 -1
  57. package/dist/browser/content/TaskRow.js +129 -0
  58. package/dist/browser/content/TaskRow.js.map +1 -0
  59. package/dist/browser/content/index.js +2 -0
  60. package/dist/browser/content/index.js.map +1 -1
  61. package/dist/browser/content/progress-path-messages.js +22 -0
  62. package/dist/browser/content/progress-path-messages.js.map +1 -0
  63. package/dist/browser/feedback/dialog-core.js +68 -11
  64. package/dist/browser/feedback/dialog-core.js.map +1 -1
  65. package/dist/browser/feedback/dialog-foot.js +45 -0
  66. package/dist/browser/feedback/dialog-foot.js.map +1 -0
  67. package/dist/browser/inputs/DatePicker.js +369 -716
  68. package/dist/browser/inputs/DatePicker.js.map +1 -1
  69. package/dist/browser/inputs/FileInputs.js +1 -1
  70. package/dist/browser/inputs/FileInputs.js.map +1 -1
  71. package/dist/browser/inputs/NumberInput.js +125 -46
  72. package/dist/browser/inputs/NumberInput.js.map +1 -1
  73. package/dist/browser/inputs/PeriodPicker.js +9 -4
  74. package/dist/browser/inputs/PeriodPicker.js.map +1 -1
  75. package/dist/browser/inputs/TextInput.js +3 -3
  76. package/dist/browser/inputs/TextInput.js.map +1 -1
  77. package/dist/browser/inputs/date-picker-panel.js +420 -0
  78. package/dist/browser/inputs/date-picker-panel.js.map +1 -0
  79. package/dist/browser/inputs/image-crop.js +1 -1
  80. package/dist/browser/inputs/image-crop.js.map +1 -1
  81. package/dist/browser/inputs/image-tools.js +4 -0
  82. package/dist/browser/inputs/image-tools.js.map +1 -0
  83. package/dist/browser/inputs/input-messages.js +8 -2
  84. package/dist/browser/inputs/input-messages.js.map +1 -1
  85. package/dist/browser/internal/field.js +2 -2
  86. package/dist/browser/internal/field.js.map +1 -1
  87. package/dist/browser/internal/renders-something.js +3 -0
  88. package/dist/browser/internal/renders-something.js.map +1 -0
  89. package/dist/browser/intl/messages.js +1 -1
  90. package/dist/browser/intl/messages.js.map +1 -1
  91. package/dist/browser/layout/AppWorkspace.js +16 -8
  92. package/dist/browser/layout/AppWorkspace.js.map +1 -1
  93. package/dist/browser/layout/Breadcrumbs.js +188 -42
  94. package/dist/browser/layout/Breadcrumbs.js.map +1 -1
  95. package/dist/browser/layout/DetailPanel.js +209 -205
  96. package/dist/browser/layout/DetailPanel.js.map +1 -1
  97. package/dist/browser/layout/FloatingPill.js +33 -0
  98. package/dist/browser/layout/FloatingPill.js.map +1 -0
  99. package/dist/browser/layout/PanelDialog.js +176 -88
  100. package/dist/browser/layout/PanelDialog.js.map +1 -1
  101. package/dist/browser/layout/StatusRow.js +174 -0
  102. package/dist/browser/layout/StatusRow.js.map +1 -0
  103. package/dist/browser/layout/app-workspace-controller.js +12 -5
  104. package/dist/browser/layout/app-workspace-controller.js.map +1 -1
  105. package/dist/browser/layout/app-workspace-state.js +2 -2
  106. package/dist/browser/layout/app-workspace-state.js.map +1 -1
  107. package/dist/browser/layout/index.js +2 -0
  108. package/dist/browser/layout/index.js.map +1 -1
  109. package/dist/browser/layout/panel-dialog-error.js +44 -0
  110. package/dist/browser/layout/panel-dialog-error.js.map +1 -0
  111. package/dist/browser/layout/panel-sheet-handle.js +86 -0
  112. package/dist/browser/layout/panel-sheet-handle.js.map +1 -0
  113. package/dist/browser/layout/workspace-messages.js +12 -2
  114. package/dist/browser/layout/workspace-messages.js.map +1 -1
  115. package/dist/browser/layout-check.js +232 -0
  116. package/dist/browser/layout-check.js.map +1 -0
  117. package/dist/browser/surfaces/Area.js +205 -0
  118. package/dist/browser/surfaces/Area.js.map +1 -0
  119. package/dist/browser/surfaces/FactGroup.js +148 -0
  120. package/dist/browser/surfaces/FactGroup.js.map +1 -0
  121. package/dist/browser/surfaces/FieldGrid.js +34 -0
  122. package/dist/browser/surfaces/FieldGrid.js.map +1 -0
  123. package/dist/browser/surfaces/NoticeCard.js +69 -57
  124. package/dist/browser/surfaces/NoticeCard.js.map +1 -1
  125. package/dist/browser/surfaces/Placeholder.js +17 -5
  126. package/dist/browser/surfaces/Placeholder.js.map +1 -1
  127. package/dist/browser/surfaces/RowGroup.js +82 -0
  128. package/dist/browser/surfaces/RowGroup.js.map +1 -0
  129. package/dist/browser/surfaces/Section.js +22 -7
  130. package/dist/browser/surfaces/Section.js.map +1 -1
  131. package/dist/browser/surfaces/StatusBadge.js +5 -1
  132. package/dist/browser/surfaces/StatusBadge.js.map +1 -1
  133. package/dist/browser/surfaces/flat-block-messages.js +37 -0
  134. package/dist/browser/surfaces/flat-block-messages.js.map +1 -0
  135. package/dist/browser/surfaces/index.js +4 -0
  136. package/dist/browser/surfaces/index.js.map +1 -1
  137. package/dist/ssr/actions/ContextMenu.js +3 -1
  138. package/dist/ssr/actions/ContextMenu.js.map +1 -1
  139. package/dist/ssr/actions/DragAndDrop.js +26 -5
  140. package/dist/ssr/actions/DragAndDrop.js.map +1 -1
  141. package/dist/ssr/actions/DropOverlay.js +69 -0
  142. package/dist/ssr/actions/DropOverlay.js.map +1 -0
  143. package/dist/ssr/actions/Dropdown.js +69 -15
  144. package/dist/ssr/actions/Dropdown.js.map +1 -1
  145. package/dist/ssr/actions/SortableList.js +293 -71
  146. package/dist/ssr/actions/SortableList.js.map +1 -1
  147. package/dist/ssr/actions/ViewTabs.js +9 -5
  148. package/dist/ssr/actions/ViewTabs.js.map +1 -1
  149. package/dist/ssr/actions/drag-and-drop-keyboard.js +211 -0
  150. package/dist/ssr/actions/drag-and-drop-keyboard.js.map +1 -0
  151. package/dist/ssr/actions/drag-and-drop-messages.js +21 -25
  152. package/dist/ssr/actions/drag-and-drop-messages.js.map +1 -1
  153. package/dist/ssr/actions/drag-and-drop.js +206 -184
  154. package/dist/ssr/actions/drag-and-drop.js.map +1 -1
  155. package/dist/ssr/actions/drop-overlay-pages.js +54 -0
  156. package/dist/ssr/actions/drop-overlay-pages.js.map +1 -0
  157. package/dist/ssr/actions/drop-overlay-view.js +225 -0
  158. package/dist/ssr/actions/drop-overlay-view.js.map +1 -0
  159. package/dist/ssr/actions/index.js +4 -2
  160. package/dist/ssr/actions/index.js.map +1 -1
  161. package/dist/ssr/actions/menu-sheet-messages.js +26 -0
  162. package/dist/ssr/actions/menu-sheet-messages.js.map +1 -0
  163. package/dist/ssr/actions/menu-sheet.js +62 -10
  164. package/dist/ssr/actions/menu-sheet.js.map +1 -1
  165. package/dist/ssr/actions/menu-submenu-panel.js +295 -0
  166. package/dist/ssr/actions/menu-submenu-panel.js.map +1 -0
  167. package/dist/ssr/actions/preload-when-idle.js +15 -0
  168. package/dist/ssr/actions/preload-when-idle.js.map +1 -0
  169. package/dist/ssr/actions/sortable-board.js +107 -0
  170. package/dist/ssr/actions/sortable-board.js.map +1 -0
  171. package/dist/ssr/actions/sortable-keyboard.js +202 -0
  172. package/dist/ssr/actions/sortable-keyboard.js.map +1 -0
  173. package/dist/ssr/actions/sortable-list-messages.js +23 -11
  174. package/dist/ssr/actions/sortable-list-messages.js.map +1 -1
  175. package/dist/ssr/actions/sortable-place.js +26 -0
  176. package/dist/ssr/actions/sortable-place.js.map +1 -0
  177. package/dist/ssr/chat/ChatDecision.js +256 -228
  178. package/dist/ssr/chat/ChatDecision.js.map +1 -1
  179. package/dist/ssr/chat/ChatDecisionField.js +206 -0
  180. package/dist/ssr/chat/ChatDecisionField.js.map +1 -0
  181. package/dist/ssr/chat/index.js +2 -0
  182. package/dist/ssr/chat/index.js.map +1 -1
  183. package/dist/ssr/chat/types.js.map +1 -1
  184. package/dist/ssr/chat-decision-field.js +6 -0
  185. package/dist/ssr/chat-decision-field.js.map +1 -0
  186. package/dist/ssr/content/DataTable.js +93 -50
  187. package/dist/ssr/content/DataTable.js.map +1 -1
  188. package/dist/ssr/content/FileName.js +46 -0
  189. package/dist/ssr/content/FileName.js.map +1 -0
  190. package/dist/ssr/content/ProgressPath.js +14 -8
  191. package/dist/ssr/content/ProgressPath.js.map +1 -1
  192. package/dist/ssr/content/TaskRow.js +95 -0
  193. package/dist/ssr/content/TaskRow.js.map +1 -0
  194. package/dist/ssr/content/index.js +2 -0
  195. package/dist/ssr/content/index.js.map +1 -1
  196. package/dist/ssr/content/progress-path-messages.js +22 -0
  197. package/dist/ssr/content/progress-path-messages.js.map +1 -0
  198. package/dist/ssr/feedback/dialog-core.js +68 -11
  199. package/dist/ssr/feedback/dialog-core.js.map +1 -1
  200. package/dist/ssr/feedback/dialog-foot.js +45 -0
  201. package/dist/ssr/feedback/dialog-foot.js.map +1 -0
  202. package/dist/ssr/inputs/DatePicker.js +94 -263
  203. package/dist/ssr/inputs/DatePicker.js.map +1 -1
  204. package/dist/ssr/inputs/FileInputs.js +1 -1
  205. package/dist/ssr/inputs/FileInputs.js.map +1 -1
  206. package/dist/ssr/inputs/NumberInput.js +114 -44
  207. package/dist/ssr/inputs/NumberInput.js.map +1 -1
  208. package/dist/ssr/inputs/PeriodPicker.js +9 -4
  209. package/dist/ssr/inputs/PeriodPicker.js.map +1 -1
  210. package/dist/ssr/inputs/TextInput.js +3 -3
  211. package/dist/ssr/inputs/TextInput.js.map +1 -1
  212. package/dist/ssr/inputs/date-picker-panel.js +233 -0
  213. package/dist/ssr/inputs/date-picker-panel.js.map +1 -0
  214. package/dist/ssr/inputs/image-crop.js +1 -1
  215. package/dist/ssr/inputs/image-crop.js.map +1 -1
  216. package/dist/ssr/inputs/image-tools.js +4 -0
  217. package/dist/ssr/inputs/image-tools.js.map +1 -0
  218. package/dist/ssr/inputs/input-messages.js +8 -2
  219. package/dist/ssr/inputs/input-messages.js.map +1 -1
  220. package/dist/ssr/internal/field.js +2 -2
  221. package/dist/ssr/internal/field.js.map +1 -1
  222. package/dist/ssr/internal/renders-something.js +3 -0
  223. package/dist/ssr/internal/renders-something.js.map +1 -0
  224. package/dist/ssr/intl/messages.js +1 -1
  225. package/dist/ssr/intl/messages.js.map +1 -1
  226. package/dist/ssr/layout/AppWorkspace.js +16 -8
  227. package/dist/ssr/layout/AppWorkspace.js.map +1 -1
  228. package/dist/ssr/layout/Breadcrumbs.js +140 -26
  229. package/dist/ssr/layout/Breadcrumbs.js.map +1 -1
  230. package/dist/ssr/layout/DetailPanel.js +70 -68
  231. package/dist/ssr/layout/DetailPanel.js.map +1 -1
  232. package/dist/ssr/layout/FloatingPill.js +16 -0
  233. package/dist/ssr/layout/FloatingPill.js.map +1 -0
  234. package/dist/ssr/layout/PanelDialog.js +82 -8
  235. package/dist/ssr/layout/PanelDialog.js.map +1 -1
  236. package/dist/ssr/layout/StatusRow.js +93 -0
  237. package/dist/ssr/layout/StatusRow.js.map +1 -0
  238. package/dist/ssr/layout/app-workspace-controller.js +12 -5
  239. package/dist/ssr/layout/app-workspace-controller.js.map +1 -1
  240. package/dist/ssr/layout/app-workspace-state.js +2 -2
  241. package/dist/ssr/layout/app-workspace-state.js.map +1 -1
  242. package/dist/ssr/layout/index.js +2 -0
  243. package/dist/ssr/layout/index.js.map +1 -1
  244. package/dist/ssr/layout/panel-dialog-error.js +28 -0
  245. package/dist/ssr/layout/panel-dialog-error.js.map +1 -0
  246. package/dist/ssr/layout/panel-sheet-handle.js +66 -0
  247. package/dist/ssr/layout/panel-sheet-handle.js.map +1 -0
  248. package/dist/ssr/layout/workspace-messages.js +12 -2
  249. package/dist/ssr/layout/workspace-messages.js.map +1 -1
  250. package/dist/ssr/layout-check.js +232 -0
  251. package/dist/ssr/layout-check.js.map +1 -0
  252. package/dist/ssr/surfaces/Area.js +147 -0
  253. package/dist/ssr/surfaces/Area.js.map +1 -0
  254. package/dist/ssr/surfaces/FactGroup.js +106 -0
  255. package/dist/ssr/surfaces/FactGroup.js.map +1 -0
  256. package/dist/ssr/surfaces/FieldGrid.js +22 -0
  257. package/dist/ssr/surfaces/FieldGrid.js.map +1 -0
  258. package/dist/ssr/surfaces/NoticeCard.js +7 -5
  259. package/dist/ssr/surfaces/NoticeCard.js.map +1 -1
  260. package/dist/ssr/surfaces/Placeholder.js +15 -4
  261. package/dist/ssr/surfaces/Placeholder.js.map +1 -1
  262. package/dist/ssr/surfaces/RowGroup.js +60 -0
  263. package/dist/ssr/surfaces/RowGroup.js.map +1 -0
  264. package/dist/ssr/surfaces/Section.js +7 -4
  265. package/dist/ssr/surfaces/Section.js.map +1 -1
  266. package/dist/ssr/surfaces/StatusBadge.js +5 -1
  267. package/dist/ssr/surfaces/StatusBadge.js.map +1 -1
  268. package/dist/ssr/surfaces/flat-block-messages.js +37 -0
  269. package/dist/ssr/surfaces/flat-block-messages.js.map +1 -0
  270. package/dist/ssr/surfaces/index.js +4 -0
  271. package/dist/ssr/surfaces/index.js.map +1 -1
  272. package/dist/styles.css +1 -1
  273. package/dist/types/actions/DragAndDrop.d.ts +17 -2
  274. package/dist/types/actions/DropOverlay.d.ts +46 -0
  275. package/dist/types/actions/Dropdown.d.ts +35 -1
  276. package/dist/types/actions/SortableList.d.ts +36 -6
  277. package/dist/types/actions/ViewTabs.d.ts +3 -2
  278. package/dist/types/actions/drag-and-drop-keyboard.d.ts +4 -0
  279. package/dist/types/actions/drag-and-drop-messages.d.ts +8 -10
  280. package/dist/types/actions/drag-and-drop.d.ts +62 -4
  281. package/dist/types/actions/drop-overlay-pages.d.ts +22 -0
  282. package/dist/types/actions/drop-overlay-view.d.ts +12 -0
  283. package/dist/types/actions/index.d.ts +9 -5
  284. package/dist/types/actions/menu-sheet-messages.d.ts +11 -0
  285. package/dist/types/actions/menu-sheet.d.ts +3 -1
  286. package/dist/types/actions/menu-submenu-panel.d.ts +27 -0
  287. package/dist/types/actions/preload-when-idle.d.ts +5 -0
  288. package/dist/types/actions/sortable-board.d.ts +69 -0
  289. package/dist/types/actions/sortable-keyboard.d.ts +7 -0
  290. package/dist/types/actions/sortable-list-messages.d.ts +10 -3
  291. package/dist/types/actions/sortable-place.d.ts +16 -0
  292. package/dist/types/chat/ChatDecision.d.ts +28 -4
  293. package/dist/types/chat/ChatDecisionField.d.ts +45 -0
  294. package/dist/types/chat/index.d.ts +1 -0
  295. package/dist/types/chat/types.d.ts +9 -0
  296. package/dist/types/chat-decision-field.d.ts +5 -0
  297. package/dist/types/content/DataTable.d.ts +19 -0
  298. package/dist/types/content/FileName.d.ts +23 -0
  299. package/dist/types/content/ProgressPath.d.ts +12 -6
  300. package/dist/types/content/TaskRow.d.ts +33 -0
  301. package/dist/types/content/index.d.ts +2 -0
  302. package/dist/types/content/progress-path-messages.d.ts +8 -0
  303. package/dist/types/feedback/dialog-core.d.ts +5 -0
  304. package/dist/types/feedback/dialog-foot.d.ts +9 -0
  305. package/dist/types/inputs/DatePicker.d.ts +3 -21
  306. package/dist/types/inputs/TextInput.d.ts +2 -0
  307. package/dist/types/inputs/date-picker-panel.d.ts +29 -0
  308. package/dist/types/inputs/image-tools.d.ts +1 -0
  309. package/dist/types/inputs/input-messages.d.ts +4 -1
  310. package/dist/types/internal/renders-something.d.ts +2 -0
  311. package/dist/types/layout/AppWorkspace.d.ts +10 -2
  312. package/dist/types/layout/Breadcrumbs.d.ts +10 -5
  313. package/dist/types/layout/FloatingPill.d.ts +20 -0
  314. package/dist/types/layout/PanelDialog.d.ts +19 -0
  315. package/dist/types/layout/StatusRow.d.ts +54 -0
  316. package/dist/types/layout/app-workspace-state.d.ts +2 -2
  317. package/dist/types/layout/index.d.ts +5 -1
  318. package/dist/types/layout/panel-dialog-error.d.ts +9 -0
  319. package/dist/types/layout/panel-sheet-handle.d.ts +8 -0
  320. package/dist/types/layout/workspace-messages.d.ts +5 -0
  321. package/dist/types/layout-check.d.ts +52 -0
  322. package/dist/types/surfaces/Area.d.ts +38 -0
  323. package/dist/types/surfaces/FactGroup.d.ts +33 -0
  324. package/dist/types/surfaces/FieldGrid.d.ts +14 -0
  325. package/dist/types/surfaces/NoticeCard.d.ts +6 -4
  326. package/dist/types/surfaces/Placeholder.d.ts +7 -0
  327. package/dist/types/surfaces/RowGroup.d.ts +20 -0
  328. package/dist/types/surfaces/Section.d.ts +8 -2
  329. package/dist/types/surfaces/StatusBadge.d.ts +2 -1
  330. package/dist/types/surfaces/flat-block-messages.d.ts +16 -0
  331. package/dist/types/surfaces/index.d.ts +9 -1
  332. package/package.json +13 -2
@@ -24,8 +24,8 @@ var _tmpl$ = ["<span class=\"k2b-dropdown__copy\"><span>", "</span>", "</span>"]
24
24
  _tmpl$13 = ["<div class=\"k2b-dropdown__label k2b-dropdown__label--action\"><span>", "</span>", "</div>"],
25
25
  _tmpl$14 = ["<p id=\"", "\" class=\"k2b-dropdown__note\" aria-hidden=\"true\">", "</p>"],
26
26
  _tmpl$15 = ["<span class=\"", "\">", "<div", " popover=\"auto\"", " class=\"", "\" style=\"", "\"", ">", "</div></span>"];
27
- import { createContext, createEffect, createSignal, createUniqueId, mergeProps, onCleanup, onMount, Show, splitProps, untrack, useContext } from "solid-js";
28
- import { Dynamic } from "solid-js/web";
27
+ import { createContext, createEffect, createRoot, createSignal, createUniqueId, mergeProps, onCleanup, onMount, Show, splitProps, untrack, useContext } from "solid-js";
28
+ import { Dynamic, isServer } from "solid-js/web";
29
29
  import { Tooltip, useLabelTooltip } from "../feedback/Tooltip";
30
30
  import { returnFocus, ringOnReturn } from "../internal/focus-return";
31
31
  import { KeyedFor } from "../internal/keyed-for";
@@ -48,6 +48,14 @@ const externalOf = item => "external" in item ? item.external : undefined;
48
48
 
49
49
  /** Where focus returns as a menu opened by `openAt` closes, read at that moment when it is a function. */
50
50
 
51
+ /**
52
+ * A row that opens a further menu beside it, marked with "▸" (K16). The submenu stands level with its row and turns
53
+ * to the other side or upwards where room ends. It opens after the pointer rests on the row for 150 ms, on click, and
54
+ * with Right or Enter; Left and Escape close one level. Moving the pointer towards it closes nothing. On a phone the
55
+ * sheet shows one level at a time, with Back at its top. A menu has at most three levels: a submenu row on the third
56
+ * level is not offered.
57
+ */
58
+
51
59
  /** A second, smaller action at the end of a row, such as "Only" beside a checkbox; it keeps the menu open. */
52
60
 
53
61
  /** Declarative radio or checkbox row for compact action menus. */
@@ -56,9 +64,13 @@ const externalOf = item => "external" in item ? item.external : undefined;
56
64
 
57
65
  const MenuContext = createContext();
58
66
  const DropdownContext = createContext();
59
- const actionableItems = menu => menu ? Array.from(menu.querySelectorAll(["[role='menuitem']:not([aria-disabled='true'])", "[role='menuitemcheckbox']:not([aria-disabled='true'])", "[role='menuitemradio']:not([aria-disabled='true'])", "[role='option']:not([aria-disabled='true'])"].join(", "))) : [];
67
+
68
+ /** The entries of one menu level that take focus. */
69
+ const menuEntries = menu => menu ? Array.from(menu.querySelectorAll(
70
+ // An open submenu inside the menu holds its own entries.
71
+ ":is([role='menuitem'], [role='menuitemcheckbox'], [role='menuitemradio'], [role='option']):not([aria-disabled='true'], .k2b-dropdown__submenu *)")) : [];
60
72
  const focusMenuItem = (menu, index) => {
61
- const items = actionableItems(menu).filter(item => !item.classList.contains("k2b-dropdown__secondary"));
73
+ const items = menuEntries(menu).filter(item => !item.classList.contains("k2b-dropdown__secondary"));
62
74
  if (items.length === 0) return;
63
75
  items[(index + items.length) % items.length]?.focus();
64
76
  };
@@ -76,7 +88,7 @@ export const dropdownPosition = (trigger, menu, position, viewport, gap = 4) =>
76
88
  top: Math.max(8, Math.min(top, viewport.height - menu.height - 8))
77
89
  };
78
90
  };
79
- const itemContent = props => [_$createComponent(Show, {
91
+ export const itemContent = props => [_$createComponent(Show, {
80
92
  get when() {
81
93
  return props.image;
82
94
  },
@@ -222,10 +234,38 @@ function DropdownChoiceRow(props) {
222
234
  }
223
235
  export function DropdownItems(props) {
224
236
  const messages = useUiMessages();
237
+ const depth = untrack(() => props.depth ?? 1);
238
+ // One object per level: an open submenu's code keeps the level's state under it.
239
+ const context = {
240
+ close: restoreFocus => props.close(restoreFocus),
241
+ role: untrack(() => props.role ?? "menuitem"),
242
+ depth,
243
+ drill: untrack(() => props.drill)
244
+ };
225
245
  // Rows read their current item: a host that rebuilds equal items while the menu is open keeps each row element (#2140).
226
246
  const renderItem = item => {
227
247
  const initial = untrack(item);
228
248
  if ("choice" in initial) return _$createComponent(DropdownChoiceItem, _$mergeProps(() => mergeProps(() => item())));
249
+ if ("submenu" in initial) {
250
+ const submenu = () => item();
251
+ loadSubmenus();
252
+ return _$createComponent(Show, {
253
+ get when() {
254
+ return submenuRow();
255
+ },
256
+ children: Row => _$createComponent(Dynamic, {
257
+ get component() {
258
+ return Row();
259
+ },
260
+ get item() {
261
+ return submenu();
262
+ },
263
+ menu: context,
264
+ Items: DropdownItems,
265
+ content: itemContent
266
+ })
267
+ });
268
+ }
229
269
  const action = () => item();
230
270
  return _$createComponent(DropdownItem, {
231
271
  get ariaLabel() {
@@ -273,18 +313,13 @@ export function DropdownItems(props) {
273
313
  });
274
314
  };
275
315
  return _$createComponent(MenuContext.Provider, {
276
- get value() {
277
- return {
278
- close: props.close,
279
- role: props.role ?? "menuitem"
280
- };
281
- },
316
+ value: context,
282
317
  get children() {
283
318
  return _$createComponent(KeyedFor, {
284
319
  get each() {
285
320
  return props.items;
286
321
  },
287
- by: item => "items" in item ? `section:${item.sectionLabel ?? ""}` : `item:${item.label}`,
322
+ by: item => "items" in item ? `section:${item.sectionLabel ?? ""}` : rowKey(item),
288
323
  children: (current, index) => {
289
324
  const item = current();
290
325
  return _$createComponent(Show, {
@@ -319,7 +354,7 @@ export function DropdownItems(props) {
319
354
  get each() {
320
355
  return current().items;
321
356
  },
322
- by: row => row.label,
357
+ by: rowKey,
323
358
  children: renderItem
324
359
  });
325
360
  },
@@ -328,7 +363,7 @@ export function DropdownItems(props) {
328
363
  get each() {
329
364
  return current().items;
330
365
  },
331
- by: row => row.label,
366
+ by: rowKey,
332
367
  children: renderItem
333
368
  })));
334
369
  }
@@ -340,6 +375,25 @@ export function DropdownItems(props) {
340
375
  }
341
376
  });
342
377
  }
378
+
379
+ /** A row's key names its kind too: an entry that turns from an action into a submenu row is built anew. */
380
+ const rowKey = item => `${"submenu" in item ? "submenu" : "choice" in item ? "choice" : "item"}:${item.label}`;
381
+ /**
382
+ * A submenu row and its menu load with the first menu that has one, so a menu without one carries none of it. A
383
+ * signal rather than `lazy`: the server and the first browser frame both show no row, and a Suspense boundary of the
384
+ * page around the menu never shows its fallback while it loads.
385
+ */
386
+ const [submenuRow, setSubmenuRow] = createRoot(() => createSignal());
387
+ let submenuLoad;
388
+ /** Starts loading the submenu code, once, as the first submenu row renders. */
389
+ const loadSubmenus = () => {
390
+ if (isServer || submenuLoad) return;
391
+ submenuLoad = import("./menu-submenu-panel").then(module => setSubmenuRow(() => module.SubmenuRow), error => {
392
+ // The next menu tries again.
393
+ submenuLoad = undefined;
394
+ globalThis.reportError(error);
395
+ });
396
+ };
343
397
  function DropdownTrigger(props) {
344
398
  const context = useContext(DropdownContext);
345
399
  if (!context) throw new Error("Dropdown.Trigger must be used inside Dropdown.Root");
@@ -630,7 +684,7 @@ function DropdownRoot(props) {
630
684
  if (!next && sheet) cancelSheet();else if (next) open(focus);else close(false);
631
685
  };
632
686
  const handleMenuKeyDown = event => {
633
- const items = actionableItems(menuRef);
687
+ const items = menuEntries(menuRef);
634
688
  // A searchable menu's field keeps the focus and moves the marked entry itself.
635
689
  if (!props.search && !props.body && (focusMenuRow(items, event.key) || focusRowSegment(items, event.key))) {
636
690
  event.preventDefault();
@@ -1 +1 @@
1
- {"version":3,"names":[],"sources":["actions/Dropdown.tsx"],"sourcesContent":["import {\n createContext,\n createEffect,\n createSignal,\n createUniqueId,\n type JSX,\n mergeProps,\n onCleanup,\n onMount,\n Show,\n splitProps,\n untrack,\n useContext,\n} from \"solid-js\";\nimport { Dynamic } from \"solid-js/web\";\nimport { Tooltip, type TooltipPlacement, useLabelTooltip } from \"../feedback/Tooltip\";\nimport { returnFocus, ringOnReturn } from \"../internal/focus-return\";\nimport { KeyedFor } from \"../internal/keyed-for\";\nimport { optionDescription } from \"../internal/option-description\";\nimport { useLocale } from \"../intl/locale\";\nimport { useUiMessages } from \"../intl/messages\";\nimport { Button, type ButtonProps, type ButtonSize, type ButtonVariant, iconTitle } from \"./Button\";\nimport { focusMenuRow, focusRowSegment } from \"./menu-rows\";\nimport { MenuSearch, type MenuSearchApi } from \"./menu-search\";\nimport { menuSheetReady, openMenuSheet } from \"./menu-sheet-open\";\nimport { prefersMenuSheet } from \"./phone-sheet\";\n\n// Resolved outside JSX: a conditional attribute compiles to a lazy memo, which would be created inside the click handler.\nconst selectAction = (item: { action?: () => void }) => item.action;\nconst closeOnSelectOf = (item: DropdownAction) => (\"closeOnSelect\" in item ? item.closeOnSelect : undefined);\nconst hrefOf = (item: DropdownAction) => (\"href\" in item ? item.href : undefined);\nconst externalOf = (item: DropdownAction) => (\"external\" in item ? item.external : undefined);\n\nexport type DropdownPosition = \"bottom-right\" | \"bottom-left\" | \"top-right\" | \"top-left\" | \"right-start\";\n/** Where a menu opened without its trigger appears: an element, or any box such as a point inside one. */\nexport type DropdownAnchor = { getBoundingClientRect(): Pick<DOMRect, \"left\" | \"top\" | \"right\" | \"bottom\"> };\n/** Where focus returns as a menu opened by `openAt` closes, read at that moment when it is a function. */\nexport type DropdownReturnFocus = HTMLElement | (() => HTMLElement | undefined);\n\nexport type DropdownActionBase = {\n class?: string;\n disabled?: boolean;\n icon?: string;\n image?: string;\n label: string;\n /**\n * Accessible name when it must say more than the visible label, such as the current value and what the next\n * activation does. It must contain the visible label.\n */\n ariaLabel?: string;\n description?: string;\n /**\n * Shown in place of `description`, such as a colored `Tag`. A function, so each place gets its own element.\n * It shows only with a `description`, which stays the text that search and screen readers use.\n */\n descriptionVisual?: () => JSX.Element;\n /** Quiet trailing information, such as a count. */\n trailing?: JSX.Element;\n /** `danger` for destructive entries; `accent` for the entry most people want, such as creating a blank item. */\n variant?: \"danger\" | \"accent\";\n};\n\nexport type DropdownAction =\n | (DropdownActionBase & {\n action: () => void;\n /**\n * Set `false` for an action that changes a value in place, such as cycling a setting: the menu stays open and\n * the focus stays on the row. Defaults to `true`.\n */\n closeOnSelect?: boolean;\n /**\n * In a phone sheet, run while the tap still counts as the person's gesture, before the sheet closes, as browsers\n * require for clipboard writes. Other actions run after the sheet has left the history. Such an action must\n * not navigate or open a dialog.\n */\n immediate?: boolean;\n href?: never;\n external?: never;\n })\n | (DropdownActionBase & {\n href: string;\n external?: boolean;\n /** Runs on a plain click instead of following the link; modified clicks, middle-click, and the link's menu keep it. */\n action?: () => void;\n })\n | (DropdownActionBase & {\n disabled: true;\n action?: never;\n href?: never;\n external?: never;\n });\n\n/** A second, smaller action at the end of a row, such as \"Only\" beside a checkbox; it keeps the menu open. */\nexport type DropdownSecondaryAction = {\n label: string;\n /** Accessible name when the visible label alone does not say what it acts on, such as \"Only Team Logistik\". */\n ariaLabel?: string;\n action: () => void;\n};\n\n/** Declarative radio or checkbox row for compact action menus. */\nexport type DropdownChoice = DropdownActionBase & {\n action: () => void;\n checked: boolean | (() => boolean);\n choice: \"checkbox\" | \"radio\";\n href?: string;\n closeOnSelect?: boolean;\n color?: string;\n /**\n * A second action at the end of the row. It shows while the row is hovered or focused, always on a touch screen,\n * and keeps its place when hidden, so the row never changes width. Right and Left move between the two.\n */\n secondary?: DropdownSecondaryAction;\n};\n\nexport type DropdownSection = {\n sectionLabel?: string;\n /**\n * `row` sets a few short radio choices, such as a sort direction, side by side as one segmented row. `tiles` sets\n * a few choices that a picture tells apart, such as arrangements, side by side as tiles with the icon above the\n * label. Give either a `sectionLabel`: the label names the choice above the row and for screen readers.\n */\n layout?: \"row\" | \"tiles\";\n /** A quiet action at the end of the section label, such as \"All\"; it needs a `sectionLabel` and keeps the menu open. */\n labelAction?: DropdownSecondaryAction;\n items: readonly (DropdownAction | DropdownChoice)[];\n};\n\nexport type DropdownItem = DropdownAction | DropdownChoice | DropdownSection;\n\n/** A search field above the entries, for a menu long enough that finding an entry takes reading. */\nexport type DropdownSearch = {\n /** Names the field and is its placeholder unless `placeholder` is set, such as \"Find template\". */\n label: string;\n placeholder?: string;\n /**\n * The entries for a query that is not blank. Defaults to the actions and choices whose label or description contains\n * the query, kept in their sections.\n */\n filter?: (query: string) => readonly DropdownItem[];\n /** What a screen reader hears after the query changes; defaults to the number of matching entries. */\n status?: (query: string, matches: number) => string;\n};\n\nexport type DropdownProps = {\n items: readonly DropdownItem[];\n /** The `Dropdown.Trigger`; leave it out for a menu opened through `attach` or `openAt`. */\n children?: JSX.Element;\n position?: DropdownPosition | (() => DropdownPosition);\n /** Larger menu rows and typography for touch. Defaults to `default`. */\n variant?: \"default\" | \"touch\";\n /**\n * Exact menu width as a CSS length. Without it the menu sizes to its longest\n * entry: at least `12rem` (`18rem` for touch), at most the viewport width\n * less `1rem` per side, where longer entries wrap.\n */\n width?: string;\n class?: string;\n menuClass?: string;\n onClose?: () => void;\n open?: boolean;\n onOpenChange?: (open: boolean) => void;\n disabled?: boolean;\n label?: string;\n align?: \"start\" | \"end\";\n /**\n * `sheet` opens the same items as a bottom sheet on phones (below 48rem) instead of a menu beside the trigger.\n * Defaults to `menu`. A controlled menu (`open`) always stays a menu.\n */\n phone?: \"menu\" | \"sheet\";\n /** Content above the phone sheet's menu. `close` dismisses it with normal history and focus restoration. */\n sheetTop?: (close: () => void) => JSX.Element;\n /**\n * Renders the entries only once the menu first opens, for a menu repeated on every row of a long list: the page\n * then carries each row's trigger, not each row's entries. Fixed for the menu's lifetime.\n */\n lazy?: boolean;\n /**\n * Receives `open`, which shows the menu without its trigger beside `anchor`, as for a context menu, a key or a\n * grip. Focus returns to `returnFocus` when the menu or sheet closes; pass a function when an entry can move the\n * place focus belongs to. Phones get the sheet as from the trigger.\n */\n openAt?: (open: (anchor: DropdownAnchor, returnFocus?: DropdownReturnFocus) => void) => void;\n /** Receives `close`, which closes the menu or sheet and returns focus. */\n closeWith?: (close: () => void) => void;\n /**\n * Puts a search field above the entries. Focus starts in the field; Up and Down move through the matching entries,\n * Enter chooses one, and the first stays marked while the query changes.\n */\n search?: DropdownSearch;\n /**\n * Adopts an element rendered elsewhere as the trigger, such as a server-rendered link: a plain click, Enter, Space,\n * Up, or Down opens the menu, while a modified or middle click keeps the link. The element gets `aria-expanded` and\n * `aria-controls`; render `aria-haspopup` with it, so the server HTML already says it opens a menu. Read once on mount.\n */\n attach?: () => HTMLElement | null | undefined;\n /** `tile` sets every entry's icon on a quiet square, for menus whose icons tell entries apart, such as templates. */\n icons?: \"plain\" | \"tile\";\n /** One quiet sentence below the entries that explains them all, such as what choosing one keeps; it describes the menu. */\n note?: string;\n};\n\nexport type DropdownTriggerProps = Omit<\n ButtonProps,\n \"aria-controls\" | \"aria-expanded\" | \"aria-haspopup\" | \"children\" | \"disabled\" | \"onClick\" | \"onKeyDown\"\n> & {\n children: JSX.Element;\n /** Use `plain` when a specialized component class owns the complete visual treatment. */\n appearance?: \"button\" | \"plain\";\n disabled?: boolean;\n iconOnly?: boolean;\n label?: string;\n size?: ButtonSize;\n tooltip?: JSX.Element | false;\n tooltipDelay?: number;\n tooltipPlacement?: TooltipPlacement;\n variant?: ButtonVariant;\n};\n\nexport type DropdownItemProps = {\n children: JSX.Element;\n closeOnSelect?: boolean;\n ariaLabel?: string;\n icon?: string;\n image?: string;\n description?: string;\n /**\n * Shown in place of `description`, such as a colored `Tag`. A function, so each place gets its own element.\n * It shows only with a `description`, which stays the text that search and screen readers use.\n */\n descriptionVisual?: () => JSX.Element;\n /** Quiet trailing information, such as a count. */\n trailing?: JSX.Element;\n disabled?: boolean;\n danger?: boolean;\n variant?: \"danger\" | \"accent\";\n href?: string;\n external?: boolean;\n /** Runs when the item is chosen. With `href`, a plain click runs it instead of following the link. */\n onSelect?: () => void;\n class?: string;\n};\n\ntype MenuContextValue = {\n close: (restoreFocus?: boolean) => void;\n /** `option` inside a searchable menu's list box, whose field keeps the focus. */\n role: \"menuitem\" | \"option\";\n};\n\ntype DropdownContextValue = {\n disabled: () => boolean;\n menuId: string;\n open: () => boolean;\n popup: () => \"dialog\" | \"menu\";\n registerTrigger: (element: HTMLElement) => void;\n toggle: () => void;\n triggerKeyDown: JSX.EventHandlerUnion<HTMLButtonElement, KeyboardEvent>;\n};\n\nconst MenuContext = createContext<MenuContextValue>();\nconst DropdownContext = createContext<DropdownContextValue>();\n\nconst actionableItems = (menu: HTMLElement | undefined): HTMLElement[] =>\n menu\n ? Array.from(\n menu.querySelectorAll<HTMLElement>(\n [\n \"[role='menuitem']:not([aria-disabled='true'])\",\n \"[role='menuitemcheckbox']:not([aria-disabled='true'])\",\n \"[role='menuitemradio']:not([aria-disabled='true'])\",\n \"[role='option']:not([aria-disabled='true'])\",\n ].join(\", \"),\n ),\n )\n : [];\n\nconst focusMenuItem = (menu: HTMLElement | undefined, index: number): void => {\n const items = actionableItems(menu).filter((item) => !item.classList.contains(\"k2b-dropdown__secondary\"));\n if (items.length === 0) return;\n items[(index + items.length) % items.length]?.focus();\n};\n\nexport const dropdownPosition = (\n trigger: Pick<DOMRect, \"left\" | \"top\" | \"right\" | \"bottom\">,\n menu: Pick<DOMRect, \"width\" | \"height\">,\n position: DropdownPosition,\n viewport: { width: number; height: number },\n gap = 4,\n): { left: number; top: number } => {\n let left = trigger.left;\n let top = trigger.bottom + gap;\n\n if (position === \"bottom-left\" || position === \"top-left\") left = trigger.right - menu.width;\n if (position === \"top-right\" || position === \"top-left\") top = trigger.top - menu.height - gap;\n if (position === \"right-start\") {\n left = trigger.right + gap;\n top = trigger.top;\n }\n\n return {\n left: Math.max(8, Math.min(left, viewport.width - menu.width - 8)),\n top: Math.max(8, Math.min(top, viewport.height - menu.height - 8)),\n };\n};\n\nconst itemContent = (props: {\n description?: string;\n descriptionVisual?: () => JSX.Element;\n icon?: string;\n image?: string;\n trailing?: JSX.Element;\n children: JSX.Element;\n}): JSX.Element => (\n <>\n <Show when={props.image} fallback={<Show when={props.icon}>{(icon) => <i class={icon()} aria-hidden=\"true\" />}</Show>}>\n {(image) => <img class=\"k2b-dropdown__image\" src={image()} alt=\"\" />}\n </Show>\n <span class=\"k2b-dropdown__copy\">\n <span>{props.children}</span>\n {optionDescription(props)}\n </span>\n {props.trailing}\n </>\n);\n\nexport function DropdownItem(props: DropdownItemProps): JSX.Element {\n const menu = useContext(MenuContext);\n const danger = () => props.danger || props.variant === \"danger\";\n const role = () => menu?.role ?? \"menuitem\";\n const content = itemContent(props);\n\n return (\n <Show\n when={!props.disabled ? props.href : undefined}\n fallback={\n <button\n type=\"button\"\n role={role()}\n aria-label={props.ariaLabel}\n tabIndex={-1}\n class={`k2b-dropdown__item ${props.class ?? \"\"}`}\n data-danger={danger() ? \"true\" : undefined}\n data-accent={props.variant === \"accent\" ? \"true\" : undefined}\n disabled={props.disabled}\n aria-disabled={props.disabled ? \"true\" : undefined}\n onClick={(event) => {\n event.preventDefault();\n event.stopPropagation();\n // Read before closing: a searchable menu clears its query as it closes, and the row then shows another entry.\n const select = props.onSelect;\n if (props.closeOnSelect !== false) menu?.close();\n select?.();\n }}\n >\n {content}\n </button>\n }\n >\n {(href) => (\n <a\n href={href()}\n target={props.external ? \"_blank\" : undefined}\n rel={props.external ? \"noopener noreferrer\" : undefined}\n role={role()}\n aria-label={props.ariaLabel}\n tabIndex={-1}\n class={`k2b-dropdown__item ${props.class ?? \"\"}`}\n data-danger={danger() ? \"true\" : undefined}\n data-accent={props.variant === \"accent\" ? \"true\" : undefined}\n onClick={(event) => {\n // With `onSelect`, a plain click runs it in place of the link; a modified click keeps its browser meaning.\n const select = props.onSelect;\n if (select && !(event.metaKey || event.ctrlKey || event.shiftKey || event.altKey)) {\n event.preventDefault();\n menu?.close();\n select();\n return;\n }\n menu?.close(false);\n }}\n >\n {content}\n </a>\n )}\n </Show>\n );\n}\n\nfunction DropdownChoiceItem(props: DropdownChoice): JSX.Element {\n const menu = useContext(MenuContext);\n // A searchable menu's field keeps the focus, so a second button in a row could not be reached; it is left out.\n return (\n <Show when={menu?.role !== \"option\" && props.secondary} fallback={<DropdownChoiceRow {...props} />}>\n {(secondary) => (\n <div class=\"k2b-dropdown__pair\">\n <DropdownChoiceRow {...props} />\n <DropdownSecondaryButton {...secondary()} class=\"k2b-dropdown__secondary\" />\n </div>\n )}\n </Show>\n );\n}\n\nfunction DropdownSecondaryButton(props: DropdownSecondaryAction & { class: string }): JSX.Element {\n return (\n <button\n type=\"button\"\n role=\"menuitem\"\n tabIndex={-1}\n class={props.class}\n aria-label={props.ariaLabel}\n onClick={(event) => {\n event.preventDefault();\n event.stopPropagation();\n props.action();\n }}\n >\n {props.label}\n </button>\n );\n}\n\nfunction DropdownChoiceRow(props: DropdownChoice): JSX.Element {\n const menu = useContext(MenuContext);\n const checked = () => (typeof props.checked === \"function\" ? props.checked() : props.checked);\n let element: HTMLElement | undefined;\n return (\n <Dynamic\n ref={(node: HTMLAnchorElement | HTMLButtonElement) => {\n element = node;\n }}\n component={!props.disabled && props.href ? \"a\" : \"button\"}\n href={!props.disabled ? props.href : undefined}\n type={!props.disabled && props.href ? undefined : \"button\"}\n role={menu?.role === \"option\" ? \"option\" : props.choice === \"checkbox\" ? \"menuitemcheckbox\" : \"menuitemradio\"}\n aria-label={props.ariaLabel}\n aria-checked={checked()}\n aria-disabled={props.disabled ? \"true\" : undefined}\n tabIndex={-1}\n class={`k2b-dropdown__item ${props.class ?? \"\"}`}\n data-selected={checked() ? \"true\" : undefined}\n disabled={props.disabled}\n onClick={(event: MouseEvent) => {\n if (props.href && (event.metaKey || event.ctrlKey || event.shiftKey || event.altKey)) {\n menu?.close(false);\n return;\n }\n event.preventDefault();\n event.stopPropagation();\n const action = props.action;\n if (props.closeOnSelect !== false) menu?.close();\n action();\n }}\n onKeyDown={(event: KeyboardEvent) => {\n // A link answers only Enter; as a menu choice it also answers Space, like the button form.\n if (event.key !== \" \" || props.disabled || !props.href) return;\n event.preventDefault();\n element?.click();\n }}\n >\n <Show when={props.choice === \"checkbox\"}>\n <span class=\"k2b-dropdown__checkbox\" aria-hidden=\"true\">\n <Show when={checked()}>\n <i class=\"ti ti-check\" />\n </Show>\n </span>\n </Show>\n <Show when={props.image} fallback={<Show when={props.icon}>{(icon) => <i class={icon()} aria-hidden=\"true\" />}</Show>}>\n {(image) => <img class=\"k2b-dropdown__image\" src={image()} alt=\"\" />}\n </Show>\n <Show when={props.color}>\n {(color) => <span class=\"k2b-dropdown__color\" style={{ \"--k2b-dropdown-color\": color() }} aria-hidden=\"true\" />}\n </Show>\n <span class=\"k2b-dropdown__copy\">\n <span>{props.label}</span>\n {optionDescription(props)}\n </span>\n {props.trailing}\n {/* Always present for radios, so selecting the widest entry cannot widen a content-sized menu. */}\n <Show when={props.choice === \"radio\"}>\n <i class=\"ti ti-check k2b-dropdown__check\" data-hidden={checked() ? undefined : \"true\"} aria-hidden=\"true\" />\n </Show>\n </Dynamic>\n );\n}\n\nexport function DropdownItems(props: {\n items: readonly DropdownItem[];\n close: (restoreFocus?: boolean) => void;\n role?: \"menuitem\" | \"option\";\n}): JSX.Element {\n const messages = useUiMessages();\n // Rows read their current item: a host that rebuilds equal items while the menu is open keeps each row element (#2140).\n const renderItem = (item: () => DropdownAction | DropdownChoice): JSX.Element => {\n const initial = untrack(item);\n if (\"choice\" in initial) return <DropdownChoiceItem {...mergeProps(() => item() as DropdownChoice)} />;\n const action = () => item() as DropdownAction;\n return (\n <DropdownItem\n ariaLabel={action().ariaLabel}\n closeOnSelect={closeOnSelectOf(action())}\n icon={action().icon}\n image={action().image}\n description={action().description}\n descriptionVisual={action().descriptionVisual}\n trailing={action().trailing}\n variant={action().variant}\n disabled={action().disabled}\n class={action().class}\n href={hrefOf(action())}\n external={externalOf(action())}\n onSelect={selectAction(action())}\n >\n {action().label}\n </DropdownItem>\n );\n };\n\n return (\n <MenuContext.Provider value={{ close: props.close, role: props.role ?? \"menuitem\" }}>\n <KeyedFor each={props.items} by={(item) => (\"items\" in item ? `section:${item.sectionLabel ?? \"\"}` : `item:${item.label}`)}>\n {(current, index) => {\n const item = current();\n return (\n <Show when={\"items\" in item} fallback={renderItem(current as () => DropdownAction | DropdownChoice)}>\n <div\n class=\"k2b-dropdown__section\"\n data-divided={index() > 0 ? \"true\" : undefined}\n role=\"group\"\n // A row of choices is no set of actions: without a label it stays unnamed rather than misnamed.\n aria-label={\n (current() as DropdownSection).sectionLabel ?? ((current() as DropdownSection).layout ? undefined : messages().actions)\n }\n >\n <Show when={(current() as DropdownSection).sectionLabel}>\n {(label) => (\n <Show\n when={props.role !== \"option\" && (current() as DropdownSection).labelAction}\n fallback={<div class=\"k2b-dropdown__label\">{label()}</div>}\n >\n {(action) => (\n <div class=\"k2b-dropdown__label k2b-dropdown__label--action\">\n <span>{label()}</span>\n <DropdownSecondaryButton {...action()} class=\"k2b-dropdown__label-action\" />\n </div>\n )}\n </Show>\n )}\n </Show>\n <Show\n when={(current() as DropdownSection).layout}\n fallback={\n <KeyedFor each={(current() as DropdownSection).items} by={(row) => row.label}>\n {renderItem}\n </KeyedFor>\n }\n >\n <div class={(current() as DropdownSection).layout === \"tiles\" ? \"k2b-dropdown__tiles\" : \"k2b-dropdown__row\"}>\n <KeyedFor each={(current() as DropdownSection).items} by={(row) => row.label}>\n {renderItem}\n </KeyedFor>\n </div>\n </Show>\n </div>\n </Show>\n );\n }}\n </KeyedFor>\n </MenuContext.Provider>\n );\n}\n\nfunction DropdownTrigger(props: DropdownTriggerProps): JSX.Element {\n const context = useContext(DropdownContext);\n if (!context) throw new Error(\"Dropdown.Trigger must be used inside Dropdown.Root\");\n const [local, rest] = splitProps(props, [\n \"appearance\",\n \"children\",\n \"class\",\n \"disabled\",\n \"iconOnly\",\n \"label\",\n \"ref\",\n \"size\",\n \"tabIndex\",\n \"title\",\n \"tooltip\",\n \"tooltipDelay\",\n \"tooltipPlacement\",\n \"type\",\n \"variant\",\n ]);\n let target: HTMLButtonElement | undefined;\n const disabled = () => Boolean(context.disabled() || local.disabled);\n // An icon-only trigger shows its label as a hint, like IconButton.\n const tooltip = useLabelTooltip(\n () => local.tooltip,\n () => (local.iconOnly ? (local.title ?? local.label) : undefined),\n );\n const register = (element: HTMLButtonElement) => {\n target = element;\n context.registerTrigger(element);\n if (typeof local.ref === \"function\") local.ref(element);\n };\n const click: JSX.EventHandlerUnion<HTMLButtonElement, MouseEvent> = (event) => {\n event.stopPropagation();\n context.toggle();\n };\n\n if (local.appearance !== \"plain\") {\n return (\n <Button\n {...rest}\n ref={register}\n aria-controls={context.menuId}\n aria-expanded={context.open()}\n aria-haspopup={context.popup()}\n aria-label={local.label}\n disabled={disabled()}\n tabIndex={disabled() ? -1 : local.tabIndex}\n onClick={click}\n onKeyDown={context.triggerKeyDown}\n type={local.type ?? \"button\"}\n class={`${local.iconOnly ? \"k2b-icon-button\" : \"\"} k2b-dropdown__trigger ${local.class ?? \"\"}`}\n size={local.size}\n variant={local.variant ?? (local.iconOnly ? \"ghost\" : undefined)}\n title={iconTitle(local.title, tooltip())}\n tooltip={tooltip()}\n tooltipDelay={local.tooltipDelay}\n tooltipPlacement={local.tooltipPlacement}\n >\n {local.children}\n </Button>\n );\n }\n\n return (\n <>\n <button\n {...rest}\n ref={register}\n aria-controls={context.menuId}\n aria-expanded={context.open()}\n aria-haspopup={context.popup()}\n aria-label={local.label}\n disabled={disabled()}\n tabIndex={disabled() ? -1 : local.tabIndex}\n onClick={click}\n onKeyDown={context.triggerKeyDown}\n type={local.type ?? \"button\"}\n class={`k2b-dropdown__trigger ${local.class ?? \"\"}`}\n title={iconTitle(local.title, tooltip())}\n >\n {local.children}\n </button>\n <Show when={tooltip() !== false && tooltip() !== undefined}>\n <Tooltip\n content={tooltip() as JSX.Element}\n target={() => target}\n delay={local.tooltipDelay}\n disabled={disabled()}\n placement={local.tooltipPlacement}\n />\n </Show>\n </>\n );\n}\n\n/**\n * Internal: content in place of the entries, as `CommandMenu` renders its command list. It reports where the focus\n * goes as the menu opens, like the search field, and `open` tells it when the menu closed.\n */\nexport type DropdownBody = (props: {\n close: (restoreFocus?: boolean) => void;\n open: () => boolean;\n api: (api: MenuSearchApi) => void;\n}) => JSX.Element;\n\n/** Accessible top-layer menu with explicit trigger ownership. */\nfunction DropdownRoot(props: DropdownProps & { body?: DropdownBody; placeMenu?: (menu: HTMLElement) => void }): JSX.Element {\n const messages = useUiMessages();\n const locale = useLocale();\n /** The open phone sheet's cancel switch: it closes when the menu goes or is disabled, as the popover does. */\n let sheet: AbortController | undefined;\n /** Ends the current phone sheet's open state, once, also before its code has loaded. */\n let endSheet: (() => void) | undefined;\n const id = createUniqueId().replace(/[^a-zA-Z0-9_-]/g, \"-\");\n const menuId = `k2b-dropdown-${id}`;\n const [internalOpen, setInternalOpen] = createSignal(false);\n const [entriesShown, setEntriesShown] = createSignal(!props.lazy);\n let triggerRef: HTMLElement | undefined;\n const [query, setQuery] = createSignal(\"\");\n let searchApi: MenuSearchApi | undefined;\n /** Set while the menu is open from `openAt`: it appears beside `anchor`, and focus returns to `origin`. */\n let anchor: DropdownAnchor | undefined;\n let origin: DropdownReturnFocus | undefined;\n const originElement = () => (typeof origin === \"function\" ? origin() : origin);\n let menuRef: HTMLDivElement | undefined;\n /**\n * Whether the popover shows, as `open` and the toggle events left it. A menu closed before its opening toggle event\n * arrives gets one event from \"closed\" to \"closed\"; this still reports that close to the owner.\n */\n let shown = false;\n /** The menu opens in place of a phone sheet whose code did not load; the owner already heard it open. */\n let announcedOpen = false;\n let triggerRing = true;\n let mounted = false;\n /** Where a key on the trigger asked the focus to go; a controlled menu opens later, in its owner's update. */\n let keyFocus: \"first\" | \"last\" | false = false;\n let viewportListenersAttached = false;\n let resizeObserver: ResizeObserver | undefined;\n\n const isOpen = () => props.open ?? internalOpen();\n const position = (): DropdownPosition =>\n typeof props.position === \"function\" ? props.position() : (props.position ?? (props.align === \"end\" ? \"bottom-left\" : \"bottom-right\"));\n\n const place = () => {\n // Internal: `CommandMenu` docks its menu to a composer instead of its trigger.\n if (props.placeMenu && menuRef) return props.placeMenu(menuRef);\n const at = anchor ?? triggerRef;\n if (!at || !menuRef) return;\n const rect = dropdownPosition(at.getBoundingClientRect(), menuRef.getBoundingClientRect(), position(), {\n width: window.innerWidth,\n height: window.innerHeight,\n });\n menuRef.style.left = `${rect.left}px`;\n menuRef.style.top = `${rect.top}px`;\n };\n const reposition = () => {\n if (isOpen()) place();\n };\n const attachViewportListeners = () => {\n if (viewportListenersAttached) return;\n viewportListenersAttached = true;\n window.addEventListener(\"resize\", reposition);\n window.addEventListener(\"scroll\", reposition, true);\n // A content-sized menu changes size when its items change while it is open.\n if (menuRef && typeof ResizeObserver !== \"undefined\") {\n resizeObserver ??= new ResizeObserver(reposition);\n resizeObserver.observe(menuRef);\n }\n };\n const detachViewportListeners = () => {\n if (!viewportListenersAttached) return;\n viewportListenersAttached = false;\n window.removeEventListener(\"resize\", reposition);\n window.removeEventListener(\"scroll\", reposition, true);\n resizeObserver?.disconnect();\n };\n const close = (restoreFocus = true) => {\n // Before hiding, so the popover does not return focus on its own.\n if (restoreFocus) returnFocus(originElement() ?? triggerRef, triggerRing);\n if (menuRef?.matches(\":popover-open\")) menuRef.hidePopover();\n setQuery(\"\");\n // Like `open`, expose the closed state now: the toggle event can arrive after the next key press, and a trigger\n // that still reads as open would ignore Enter (Escape, then Enter at once, must reopen).\n setInternalOpen(false);\n detachViewportListeners();\n };\n const open = (focus: \"first\" | \"last\" | false = \"first\") => {\n if (props.disabled || !menuRef || menuRef.matches(\":popover-open\")) return;\n triggerRing = ringOnReturn(originElement() ?? triggerRef);\n // A lazy menu's entries exist before it shows, so it places and focuses them as any other.\n setEntriesShown(true);\n menuRef.showPopover();\n shown = true;\n // The toggle event arrives a task later; expose the open state before focus moves into the menu.\n setInternalOpen(true);\n attachViewportListeners();\n place();\n queueMicrotask(() => {\n if (!focus) return;\n if (searchApi) searchApi.focus(focus);\n else focusMenuItem(menuRef, focus === \"first\" ? 0 : -1);\n });\n };\n /** The phone sheet has closed: focus goes back, and the trigger and the owner hear the close. */\n const finishSheet = (anchored: boolean, ring: boolean) => {\n sheet = undefined;\n // An entry that moved focus elsewhere, such as into a field, keeps it.\n const target = anchored ? originElement() : undefined;\n const focused = document.activeElement;\n if (target?.isConnected && (!focused || focused === document.body)) returnFocus(target, ring);\n setInternalOpen(false);\n props.onOpenChange?.(false);\n props.onClose?.();\n };\n /** Closes the phone sheet; one still waiting for its code ends at once, also while a download stalls. */\n const cancelSheet = () => {\n if (!sheet) return;\n sheet.abort();\n if (!menuSheetReady()) endSheet?.();\n };\n const requestOpen = (next: boolean, focus: \"first\" | \"last\" | false = \"first\") => {\n if (props.disabled && next) return;\n if (props.open !== undefined) {\n props.onOpenChange?.(next);\n return;\n }\n if (next && props.phone === \"sheet\" && !props.body && prefersMenuSheet()) {\n if (sheet) return;\n const current = new AbortController();\n sheet = current;\n // A sheet opened without its trigger returns focus to its own target, which an entry may have moved,\n // rather than to whatever had focus as it opened.\n const anchored = origin !== undefined;\n const ring = anchored && ringOnReturn(originElement());\n if (anchored && document.activeElement instanceof HTMLElement) document.activeElement.blur();\n // The sheet is this menu's open state: the trigger reports it and the owner hears both ends, once.\n const end = () => {\n if (sheet === current) finishSheet(anchored, ring);\n };\n endSheet = end;\n setInternalOpen(true);\n props.onOpenChange?.(true);\n void openMenuSheet(\n {\n Items: DropdownItems,\n items: props.items,\n label: props.label ?? messages().dropdownMenu,\n locale: locale(),\n top: props.sheetTop,\n search: props.search,\n icons: props.icons,\n note: props.note,\n signal: current.signal,\n },\n (error) => {\n globalThis.reportError(error);\n if (sheet !== current) return;\n // The sheet's code did not load: the person still chooses, from the menu that is always in the page, and\n // the next open tries the sheet again. The owner already heard this open.\n sheet = undefined;\n if (!current.signal.aborted && menuRef?.isConnected) {\n announcedOpen = true;\n open(focus);\n if (menuRef.matches(\":popover-open\")) return;\n announcedOpen = false;\n }\n finishSheet(anchored, ring);\n },\n ).finally(end);\n return;\n }\n // A second tap while the sheet's code still loads cancels that sheet.\n if (!next && sheet) cancelSheet();\n else if (next) open(focus);\n else close(false);\n };\n const handleMenuKeyDown = (event: KeyboardEvent) => {\n const items = actionableItems(menuRef);\n // A searchable menu's field keeps the focus and moves the marked entry itself.\n if (!props.search && !props.body && (focusMenuRow(items, event.key) || focusRowSegment(items, event.key))) {\n event.preventDefault();\n } else if (event.key === \"Escape\") {\n event.preventDefault();\n returnFocus(originElement() ?? triggerRef, triggerRing);\n requestOpen(false);\n } else if (event.key === \"Tab\") {\n requestOpen(false);\n }\n };\n\n const triggerKey = (event: KeyboardEvent) => {\n if (![\"Enter\", \" \", \"ArrowDown\", \"ArrowUp\"].includes(event.key)) return;\n // Ctrl+Enter and the like keep their browser meaning on an adopted link, such as opening it in a new tab.\n if (event.metaKey || event.ctrlKey || event.shiftKey || event.altKey) return;\n event.preventDefault();\n event.stopPropagation();\n if (isOpen()) {\n if (searchApi) searchApi.focus(event.key === \"ArrowUp\" ? \"last\" : \"first\");\n else focusMenuItem(menuRef, event.key === \"ArrowUp\" ? -1 : 0);\n return;\n }\n anchor = origin = undefined;\n keyFocus = event.key === \"ArrowUp\" ? \"last\" : \"first\";\n requestOpen(true, keyFocus);\n keyFocus = false;\n };\n const toggle = () => {\n if (!isOpen()) anchor = origin = undefined;\n requestOpen(!isOpen());\n };\n\n const context: DropdownContextValue = {\n disabled: () => Boolean(props.disabled),\n menuId,\n open: isOpen,\n registerTrigger: (element) => {\n triggerRef = element;\n },\n toggle,\n popup: () => (props.search || props.body ? \"dialog\" : \"menu\"),\n triggerKeyDown: (event) => triggerKey(event),\n };\n\n createEffect(() => {\n const controlled = props.open;\n if (!mounted || controlled === undefined || !menuRef) return;\n if (controlled && !menuRef.matches(\":popover-open\")) open(keyFocus);\n if (!controlled && menuRef.matches(\":popover-open\")) close(false);\n });\n createEffect(() => {\n if (!props.disabled) return;\n cancelSheet();\n if (mounted) close(false);\n });\n props.openAt?.((at, focus) => {\n if (isOpen()) return;\n anchor = at;\n origin = focus;\n requestOpen(true);\n });\n props.closeWith?.(() => {\n cancelSheet();\n if (isOpen()) close();\n });\n onMount(() => {\n mounted = true;\n if (props.open) open(false);\n onCleanup(detachViewportListeners);\n const adopted = props.attach?.();\n if (!adopted) return;\n triggerRef = adopted;\n adopted.setAttribute(\"aria-controls\", menuId);\n const onClick = (event: MouseEvent) => {\n if (event.defaultPrevented || event.button !== 0 || event.metaKey || event.ctrlKey || event.shiftKey || event.altKey) return;\n event.preventDefault();\n event.stopPropagation();\n toggle();\n };\n adopted.addEventListener(\"click\", onClick);\n adopted.addEventListener(\"keydown\", triggerKey);\n createEffect(() => adopted.setAttribute(\"aria-expanded\", String(isOpen())));\n onCleanup(() => {\n adopted.removeEventListener(\"click\", onClick);\n adopted.removeEventListener(\"keydown\", triggerKey);\n });\n });\n onCleanup(() => sheet?.abort());\n\n return (\n <DropdownContext.Provider value={context}>\n <span class={`k2b-dropdown ${props.class ?? \"\"}`}>\n {props.children}\n {/* biome-ignore lint/a11y/useAriaPropsSupportedByRole: the role is menu, or dialog with search; both take a name. */}\n {/* biome-ignore lint/a11y/noStaticElementInteractions: a menu or dialog popup owns its keys. */}\n <div\n ref={menuRef}\n id={menuId}\n popover=\"auto\"\n role={props.search || props.body ? \"dialog\" : \"menu\"}\n aria-label={props.label ?? messages().dropdownMenu}\n aria-describedby={props.note ? `${menuId}-note` : undefined}\n class={`k2b-dropdown__menu ${props.menuClass ?? \"\"}`}\n style={props.width ? { \"--k2b-dropdown-width\": props.width } : undefined}\n data-width={props.width ? \"fixed\" : undefined}\n data-variant={props.variant ?? \"default\"}\n data-icons={props.icons === \"tile\" ? \"tile\" : undefined}\n data-search={props.search || props.body ? \"\" : undefined}\n data-position={position()}\n onKeyDown={handleMenuKeyDown}\n onToggle={(event) => {\n const nextOpen = (event as ToggleEvent).newState === \"open\";\n const wasOpen = shown || (event as ToggleEvent).oldState === \"open\";\n shown = nextOpen;\n const announced = announcedOpen;\n announcedOpen = false;\n setInternalOpen(nextOpen);\n if (nextOpen) setEntriesShown(true);\n if (nextOpen) attachViewportListeners();\n else detachViewportListeners();\n if (!(announced && nextOpen) && (props.open === undefined || props.open !== nextOpen)) props.onOpenChange?.(nextOpen);\n // A light dismiss hides the menu with focus inside it; an opener without a trigger takes it back.\n const focused = document.activeElement;\n const target = wasOpen && !nextOpen ? originElement() : undefined;\n if (target?.isConnected && (!focused || focused === document.body || menuRef?.contains(focused)))\n returnFocus(target, triggerRing);\n if (wasOpen && !nextOpen) setQuery(\"\");\n if (wasOpen && !nextOpen) props.onClose?.();\n if (!nextOpen && props.open === true) queueMicrotask(() => props.open === true && open(false));\n }}\n >\n <Show when={entriesShown()}>\n <Show when={props.body}>\n {(body) => {\n const Body = body();\n return (\n <Body\n close={close}\n open={isOpen}\n api={(api) => {\n searchApi = api;\n onCleanup(() => {\n if (searchApi === api) searchApi = undefined;\n });\n }}\n />\n );\n }}\n </Show>\n <Show\n when={!props.body && props.search}\n fallback={\n <Show when={!props.body}>\n <DropdownItems items={props.items} close={close} />\n </Show>\n }\n >\n {(search) => (\n <MenuSearch\n Items={DropdownItems}\n items={props.items}\n search={search()}\n label={props.label ?? messages().dropdownMenu}\n query={query}\n setQuery={setQuery}\n close={close}\n api={(api) => {\n searchApi = api;\n onCleanup(() => {\n if (searchApi === api) searchApi = undefined;\n });\n }}\n />\n )}\n </Show>\n {/* Hidden from the menu's children, which are entries only; the menu reads it as its description. */}\n <Show when={props.note}>\n <p id={`${menuId}-note`} class=\"k2b-dropdown__note\" aria-hidden=\"true\">\n {props.note}\n </p>\n </Show>\n </Show>\n </div>\n </span>\n </DropdownContext.Provider>\n );\n}\n\ntype DropdownComponent = ((props: DropdownProps) => JSX.Element) & {\n Root: (props: DropdownProps) => JSX.Element;\n Trigger: (props: DropdownTriggerProps) => JSX.Element;\n Item: (props: DropdownItemProps) => JSX.Element;\n};\n\n/** Internal: the menu with a `body`, for `CommandMenu`. */\nexport const DropdownShell = DropdownRoot;\n\nexport const Dropdown = DropdownRoot as DropdownComponent;\nDropdown.Root = DropdownRoot;\nDropdown.Trigger = DropdownTrigger;\nDropdown.Item = DropdownItem;\n\nexport default Dropdown;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,SACE,aAAa,EACb,YAAY,EACZ,YAAY,EACZ,cAAc,EAEd,UAAU,EACV,SAAS,EACT,OAAO,EACP,IAAI,EACJ,UAAU,EACV,OAAO,EACP,UAAU,QACL,UAAU;AACjB,SAAS,OAAO,QAAQ,cAAc;AACtC,SAAS,OAAO,EAAyB,eAAe,QAAQ,qBAAqB;AACrF,SAAS,WAAW,EAAE,YAAY,QAAQ,0BAA0B;AACpE,SAAS,QAAQ,QAAQ,uBAAuB;AAChD,SAAS,iBAAiB,QAAQ,gCAAgC;AAClE,SAAS,SAAS,QAAQ,gBAAgB;AAC1C,SAAS,aAAa,QAAQ,kBAAkB;AAChD,SAAS,MAAM,EAAyD,SAAS,QAAQ,UAAU;AACnG,SAAS,YAAY,EAAE,eAAe,QAAQ,aAAa;AAC3D,SAAS,UAAU,QAA4B,eAAe;AAC9D,SAAS,cAAc,EAAE,aAAa,QAAQ,mBAAmB;AACjE,SAAS,gBAAgB,QAAQ,eAAe;;AAEhD;AACA,MAAM,YAAY,GAAI,IAA6B,IAAK,IAAI,CAAC,MAAM;AACnE,MAAM,eAAe,GAAI,IAAoB,IAAM,eAAe,IAAI,IAAI,GAAG,IAAI,CAAC,aAAa,GAAG,SAAU;AAC5G,MAAM,MAAM,GAAI,IAA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AAS,KAAK,GAAG,EAAE,SAAS,GAAG,SAAS;gBAC9C,CAAC,CAAC;cACJ;YAAC;UAEJ,sBAGF,IAAI;YAAA,IAAC,IAAI;cAAA,OAAE,KAAK,CAAC,IAAI;YAAA;YAAA;cAAA,uBACb,YAAG,MAAM,cAAO,WACpB,KAAK,CAAC,IAAI;YAAA;UAAA;QAAA;MAAA;IAAA;EAAA;AAQ3B;AAQA;AACA,OAAO,MAAM,aAAa,GAAG,YAAY;AAEzC,OAAO,MAAM,QAAQ,GAAG,YAAiC;AACzD,QAAQ,CAAC,IAAI,GAAG,YAAY;AAC5B,QAAQ,CAAC,OAAO,GAAG,eAAe;AAClC,QAAQ,CAAC,IAAI,GAAG,YAAY;AAE5B,eAAe,QAAQ","ignoreList":[]}
1
+ {"version":3,"names":[],"sources":["actions/Dropdown.tsx"],"sourcesContent":["import {\n createContext,\n createEffect,\n createRoot,\n createSignal,\n createUniqueId,\n type JSX,\n mergeProps,\n onCleanup,\n onMount,\n Show,\n splitProps,\n untrack,\n useContext,\n} from \"solid-js\";\nimport { Dynamic, isServer } from \"solid-js/web\";\nimport { Tooltip, type TooltipPlacement, useLabelTooltip } from \"../feedback/Tooltip\";\nimport { returnFocus, ringOnReturn } from \"../internal/focus-return\";\nimport { KeyedFor } from \"../internal/keyed-for\";\nimport { optionDescription } from \"../internal/option-description\";\nimport { useLocale } from \"../intl/locale\";\nimport { useUiMessages } from \"../intl/messages\";\nimport { Button, type ButtonProps, type ButtonSize, type ButtonVariant, iconTitle } from \"./Button\";\nimport { focusMenuRow, focusRowSegment } from \"./menu-rows\";\nimport { MenuSearch, type MenuSearchApi } from \"./menu-search\";\nimport { menuSheetReady, openMenuSheet } from \"./menu-sheet-open\";\nimport { prefersMenuSheet } from \"./phone-sheet\";\n\n// Resolved outside JSX: a conditional attribute compiles to a lazy memo, which would be created inside the click handler.\nconst selectAction = (item: { action?: () => void }) => item.action;\nconst closeOnSelectOf = (item: DropdownAction) => (\"closeOnSelect\" in item ? item.closeOnSelect : undefined);\nconst hrefOf = (item: DropdownAction) => (\"href\" in item ? item.href : undefined);\nconst externalOf = (item: DropdownAction) => (\"external\" in item ? item.external : undefined);\n\nexport type DropdownPosition = \"bottom-right\" | \"bottom-left\" | \"top-right\" | \"top-left\" | \"right-start\";\n/** Where a menu opened without its trigger appears: an element, or any box such as a point inside one. */\nexport type DropdownAnchor = { getBoundingClientRect(): Pick<DOMRect, \"left\" | \"top\" | \"right\" | \"bottom\"> };\n/** Where focus returns as a menu opened by `openAt` closes, read at that moment when it is a function. */\nexport type DropdownReturnFocus = HTMLElement | (() => HTMLElement | undefined);\n\nexport type DropdownActionBase = {\n class?: string;\n disabled?: boolean;\n icon?: string;\n image?: string;\n label: string;\n /**\n * Accessible name when it must say more than the visible label, such as the current value and what the next\n * activation does. It must contain the visible label.\n */\n ariaLabel?: string;\n description?: string;\n /**\n * Shown in place of `description`, such as a colored `Tag`. A function, so each place gets its own element.\n * It shows only with a `description`, which stays the text that search and screen readers use.\n */\n descriptionVisual?: () => JSX.Element;\n /** Quiet trailing information, such as a count. */\n trailing?: JSX.Element;\n /** `danger` for destructive entries; `accent` for the entry most people want, such as creating a blank item. */\n variant?: \"danger\" | \"accent\";\n};\n\nexport type DropdownAction =\n | (DropdownActionBase & {\n action: () => void;\n /**\n * Set `false` for an action that changes a value in place, such as cycling a setting: the menu stays open and\n * the focus stays on the row. Defaults to `true`.\n */\n closeOnSelect?: boolean;\n /**\n * In a phone sheet, run while the tap still counts as the person's gesture, before the sheet closes, as browsers\n * require for clipboard writes. Other actions run after the sheet has left the history. Such an action must\n * not navigate or open a dialog.\n */\n immediate?: boolean;\n href?: never;\n external?: never;\n })\n | (DropdownActionBase & {\n href: string;\n external?: boolean;\n /** Runs on a plain click instead of following the link; modified clicks, middle-click, and the link's menu keep it. */\n action?: () => void;\n })\n | (DropdownActionBase & {\n disabled: true;\n action?: never;\n href?: never;\n external?: never;\n })\n | DropdownSubmenu;\n\n/**\n * A row that opens a further menu beside it, marked with \"▸\" (K16). The submenu stands level with its row and turns\n * to the other side or upwards where room ends. It opens after the pointer rests on the row for 150 ms, on click, and\n * with Right or Enter; Left and Escape close one level. Moving the pointer towards it closes nothing. On a phone the\n * sheet shows one level at a time, with Back at its top. A menu has at most three levels: a submenu row on the third\n * level is not offered.\n */\nexport type DropdownSubmenu = DropdownActionBase & {\n submenu: readonly DropdownItem[];\n action?: never;\n href?: never;\n external?: never;\n};\n\n/** A second, smaller action at the end of a row, such as \"Only\" beside a checkbox; it keeps the menu open. */\nexport type DropdownSecondaryAction = {\n label: string;\n /** Accessible name when the visible label alone does not say what it acts on, such as \"Only Team Logistik\". */\n ariaLabel?: string;\n action: () => void;\n};\n\n/** Declarative radio or checkbox row for compact action menus. */\nexport type DropdownChoice = DropdownActionBase & {\n action: () => void;\n checked: boolean | (() => boolean);\n choice: \"checkbox\" | \"radio\";\n href?: string;\n closeOnSelect?: boolean;\n color?: string;\n /**\n * A second action at the end of the row. It shows while the row is hovered or focused, always on a touch screen,\n * and keeps its place when hidden, so the row never changes width. Right and Left move between the two.\n */\n secondary?: DropdownSecondaryAction;\n};\n\nexport type DropdownSection = {\n sectionLabel?: string;\n /**\n * `row` sets a few short radio choices, such as a sort direction, side by side as one segmented row. `tiles` sets\n * a few choices that a picture tells apart, such as arrangements, side by side as tiles with the icon above the\n * label. Give either a `sectionLabel`: the label names the choice above the row and for screen readers.\n */\n layout?: \"row\" | \"tiles\";\n /** A quiet action at the end of the section label, such as \"All\"; it needs a `sectionLabel` and keeps the menu open. */\n labelAction?: DropdownSecondaryAction;\n items: readonly (DropdownAction | DropdownChoice)[];\n};\n\nexport type DropdownItem = DropdownAction | DropdownChoice | DropdownSection;\n\n/** A search field above the entries, for a menu long enough that finding an entry takes reading. */\nexport type DropdownSearch = {\n /** Names the field and is its placeholder unless `placeholder` is set, such as \"Find template\". */\n label: string;\n placeholder?: string;\n /**\n * The entries for a query that is not blank. Defaults to the actions and choices whose label or description contains\n * the query, kept in their sections.\n */\n filter?: (query: string) => readonly DropdownItem[];\n /** What a screen reader hears after the query changes; defaults to the number of matching entries. */\n status?: (query: string, matches: number) => string;\n};\n\nexport type DropdownProps = {\n items: readonly DropdownItem[];\n /** The `Dropdown.Trigger`; leave it out for a menu opened through `attach` or `openAt`. */\n children?: JSX.Element;\n position?: DropdownPosition | (() => DropdownPosition);\n /** Larger menu rows and typography for touch. Defaults to `default`. */\n variant?: \"default\" | \"touch\";\n /**\n * Exact menu width as a CSS length. Without it the menu sizes to its longest\n * entry: at least `12rem` (`18rem` for touch), at most the viewport width\n * less `1rem` per side, where longer entries wrap.\n */\n width?: string;\n class?: string;\n menuClass?: string;\n onClose?: () => void;\n open?: boolean;\n onOpenChange?: (open: boolean) => void;\n disabled?: boolean;\n label?: string;\n align?: \"start\" | \"end\";\n /**\n * `sheet` opens the same items as a bottom sheet on phones (below 48rem) instead of a menu beside the trigger.\n * Defaults to `menu`. A controlled menu (`open`) always stays a menu.\n */\n phone?: \"menu\" | \"sheet\";\n /** Content above the phone sheet's menu. `close` dismisses it with normal history and focus restoration. */\n sheetTop?: (close: () => void) => JSX.Element;\n /**\n * Renders the entries only once the menu first opens, for a menu repeated on every row of a long list: the page\n * then carries each row's trigger, not each row's entries. Fixed for the menu's lifetime.\n */\n lazy?: boolean;\n /**\n * Receives `open`, which shows the menu without its trigger beside `anchor`, as for a context menu, a key or a\n * grip. Focus returns to `returnFocus` when the menu or sheet closes; pass a function when an entry can move the\n * place focus belongs to. Phones get the sheet as from the trigger.\n */\n openAt?: (open: (anchor: DropdownAnchor, returnFocus?: DropdownReturnFocus) => void) => void;\n /** Receives `close`, which closes the menu or sheet and returns focus. */\n closeWith?: (close: () => void) => void;\n /**\n * Puts a search field above the entries. Focus starts in the field; Up and Down move through the matching entries,\n * Enter chooses one, and the first stays marked while the query changes.\n */\n search?: DropdownSearch;\n /**\n * Adopts an element rendered elsewhere as the trigger, such as a server-rendered link: a plain click, Enter, Space,\n * Up, or Down opens the menu, while a modified or middle click keeps the link. The element gets `aria-expanded` and\n * `aria-controls`; render `aria-haspopup` with it, so the server HTML already says it opens a menu. Read once on mount.\n */\n attach?: () => HTMLElement | null | undefined;\n /** `tile` sets every entry's icon on a quiet square, for menus whose icons tell entries apart, such as templates. */\n icons?: \"plain\" | \"tile\";\n /** One quiet sentence below the entries that explains them all, such as what choosing one keeps; it describes the menu. */\n note?: string;\n};\n\nexport type DropdownTriggerProps = Omit<\n ButtonProps,\n \"aria-controls\" | \"aria-expanded\" | \"aria-haspopup\" | \"children\" | \"disabled\" | \"onClick\" | \"onKeyDown\"\n> & {\n children: JSX.Element;\n /** Use `plain` when a specialized component class owns the complete visual treatment. */\n appearance?: \"button\" | \"plain\";\n disabled?: boolean;\n iconOnly?: boolean;\n label?: string;\n size?: ButtonSize;\n tooltip?: JSX.Element | false;\n tooltipDelay?: number;\n tooltipPlacement?: TooltipPlacement;\n variant?: ButtonVariant;\n};\n\nexport type DropdownItemProps = {\n children: JSX.Element;\n closeOnSelect?: boolean;\n ariaLabel?: string;\n icon?: string;\n image?: string;\n description?: string;\n /**\n * Shown in place of `description`, such as a colored `Tag`. A function, so each place gets its own element.\n * It shows only with a `description`, which stays the text that search and screen readers use.\n */\n descriptionVisual?: () => JSX.Element;\n /** Quiet trailing information, such as a count. */\n trailing?: JSX.Element;\n disabled?: boolean;\n danger?: boolean;\n variant?: \"danger\" | \"accent\";\n href?: string;\n external?: boolean;\n /** Runs when the item is chosen. With `href`, a plain click runs it instead of following the link. */\n onSelect?: () => void;\n class?: string;\n};\n\nexport type MenuContextValue = {\n close: (restoreFocus?: boolean) => void;\n /** `option` inside a searchable menu's list box, whose field keeps the focus. */\n role: \"menuitem\" | \"option\";\n /** 1 for the menu itself, 2 and 3 for its submenus. */\n depth: number;\n /** In a phone sheet, a submenu row shows its entries in place of the sheet's instead of a menu beside it. */\n drill?: (item: DropdownSubmenu, row: HTMLElement) => void;\n};\n\ntype DropdownContextValue = {\n disabled: () => boolean;\n menuId: string;\n open: () => boolean;\n popup: () => \"dialog\" | \"menu\";\n registerTrigger: (element: HTMLElement) => void;\n toggle: () => void;\n triggerKeyDown: JSX.EventHandlerUnion<HTMLButtonElement, KeyboardEvent>;\n};\n\nconst MenuContext = createContext<MenuContextValue>();\nconst DropdownContext = createContext<DropdownContextValue>();\n\n/** The entries of one menu level that take focus. */\nconst menuEntries = (menu: HTMLElement | undefined): HTMLElement[] =>\n menu\n ? Array.from(\n menu.querySelectorAll<HTMLElement>(\n // An open submenu inside the menu holds its own entries.\n \":is([role='menuitem'], [role='menuitemcheckbox'], [role='menuitemradio'], [role='option']):not([aria-disabled='true'], .k2b-dropdown__submenu *)\",\n ),\n )\n : [];\n\nconst focusMenuItem = (menu: HTMLElement | undefined, index: number): void => {\n const items = menuEntries(menu).filter((item) => !item.classList.contains(\"k2b-dropdown__secondary\"));\n if (items.length === 0) return;\n items[(index + items.length) % items.length]?.focus();\n};\n\nexport const dropdownPosition = (\n trigger: Pick<DOMRect, \"left\" | \"top\" | \"right\" | \"bottom\">,\n menu: Pick<DOMRect, \"width\" | \"height\">,\n position: DropdownPosition,\n viewport: { width: number; height: number },\n gap = 4,\n): { left: number; top: number } => {\n let left = trigger.left;\n let top = trigger.bottom + gap;\n\n if (position === \"bottom-left\" || position === \"top-left\") left = trigger.right - menu.width;\n if (position === \"top-right\" || position === \"top-left\") top = trigger.top - menu.height - gap;\n if (position === \"right-start\") {\n left = trigger.right + gap;\n top = trigger.top;\n }\n\n return {\n left: Math.max(8, Math.min(left, viewport.width - menu.width - 8)),\n top: Math.max(8, Math.min(top, viewport.height - menu.height - 8)),\n };\n};\n\nexport const itemContent = (props: {\n description?: string;\n descriptionVisual?: () => JSX.Element;\n icon?: string;\n image?: string;\n trailing?: JSX.Element;\n children: JSX.Element;\n}): JSX.Element => (\n <>\n <Show when={props.image} fallback={<Show when={props.icon}>{(icon) => <i class={icon()} aria-hidden=\"true\" />}</Show>}>\n {(image) => <img class=\"k2b-dropdown__image\" src={image()} alt=\"\" />}\n </Show>\n <span class=\"k2b-dropdown__copy\">\n <span>{props.children}</span>\n {optionDescription(props)}\n </span>\n {props.trailing}\n </>\n);\n\nexport function DropdownItem(props: DropdownItemProps): JSX.Element {\n const menu = useContext(MenuContext);\n const danger = () => props.danger || props.variant === \"danger\";\n const role = () => menu?.role ?? \"menuitem\";\n const content = itemContent(props);\n\n return (\n <Show\n when={!props.disabled ? props.href : undefined}\n fallback={\n <button\n type=\"button\"\n role={role()}\n aria-label={props.ariaLabel}\n tabIndex={-1}\n class={`k2b-dropdown__item ${props.class ?? \"\"}`}\n data-danger={danger() ? \"true\" : undefined}\n data-accent={props.variant === \"accent\" ? \"true\" : undefined}\n disabled={props.disabled}\n aria-disabled={props.disabled ? \"true\" : undefined}\n onClick={(event) => {\n event.preventDefault();\n event.stopPropagation();\n // Read before closing: a searchable menu clears its query as it closes, and the row then shows another entry.\n const select = props.onSelect;\n if (props.closeOnSelect !== false) menu?.close();\n select?.();\n }}\n >\n {content}\n </button>\n }\n >\n {(href) => (\n <a\n href={href()}\n target={props.external ? \"_blank\" : undefined}\n rel={props.external ? \"noopener noreferrer\" : undefined}\n role={role()}\n aria-label={props.ariaLabel}\n tabIndex={-1}\n class={`k2b-dropdown__item ${props.class ?? \"\"}`}\n data-danger={danger() ? \"true\" : undefined}\n data-accent={props.variant === \"accent\" ? \"true\" : undefined}\n onClick={(event) => {\n // With `onSelect`, a plain click runs it in place of the link; a modified click keeps its browser meaning.\n const select = props.onSelect;\n if (select && !(event.metaKey || event.ctrlKey || event.shiftKey || event.altKey)) {\n event.preventDefault();\n menu?.close();\n select();\n return;\n }\n menu?.close(false);\n }}\n >\n {content}\n </a>\n )}\n </Show>\n );\n}\n\nfunction DropdownChoiceItem(props: DropdownChoice): JSX.Element {\n const menu = useContext(MenuContext);\n // A searchable menu's field keeps the focus, so a second button in a row could not be reached; it is left out.\n return (\n <Show when={menu?.role !== \"option\" && props.secondary} fallback={<DropdownChoiceRow {...props} />}>\n {(secondary) => (\n <div class=\"k2b-dropdown__pair\">\n <DropdownChoiceRow {...props} />\n <DropdownSecondaryButton {...secondary()} class=\"k2b-dropdown__secondary\" />\n </div>\n )}\n </Show>\n );\n}\n\nfunction DropdownSecondaryButton(props: DropdownSecondaryAction & { class: string }): JSX.Element {\n return (\n <button\n type=\"button\"\n role=\"menuitem\"\n tabIndex={-1}\n class={props.class}\n aria-label={props.ariaLabel}\n onClick={(event) => {\n event.preventDefault();\n event.stopPropagation();\n props.action();\n }}\n >\n {props.label}\n </button>\n );\n}\n\nfunction DropdownChoiceRow(props: DropdownChoice): JSX.Element {\n const menu = useContext(MenuContext);\n const checked = () => (typeof props.checked === \"function\" ? props.checked() : props.checked);\n let element: HTMLElement | undefined;\n return (\n <Dynamic\n ref={(node: HTMLAnchorElement | HTMLButtonElement) => {\n element = node;\n }}\n component={!props.disabled && props.href ? \"a\" : \"button\"}\n href={!props.disabled ? props.href : undefined}\n type={!props.disabled && props.href ? undefined : \"button\"}\n role={menu?.role === \"option\" ? \"option\" : props.choice === \"checkbox\" ? \"menuitemcheckbox\" : \"menuitemradio\"}\n aria-label={props.ariaLabel}\n aria-checked={checked()}\n aria-disabled={props.disabled ? \"true\" : undefined}\n tabIndex={-1}\n class={`k2b-dropdown__item ${props.class ?? \"\"}`}\n data-selected={checked() ? \"true\" : undefined}\n disabled={props.disabled}\n onClick={(event: MouseEvent) => {\n if (props.href && (event.metaKey || event.ctrlKey || event.shiftKey || event.altKey)) {\n menu?.close(false);\n return;\n }\n event.preventDefault();\n event.stopPropagation();\n const action = props.action;\n if (props.closeOnSelect !== false) menu?.close();\n action();\n }}\n onKeyDown={(event: KeyboardEvent) => {\n // A link answers only Enter; as a menu choice it also answers Space, like the button form.\n if (event.key !== \" \" || props.disabled || !props.href) return;\n event.preventDefault();\n element?.click();\n }}\n >\n <Show when={props.choice === \"checkbox\"}>\n <span class=\"k2b-dropdown__checkbox\" aria-hidden=\"true\">\n <Show when={checked()}>\n <i class=\"ti ti-check\" />\n </Show>\n </span>\n </Show>\n <Show when={props.image} fallback={<Show when={props.icon}>{(icon) => <i class={icon()} aria-hidden=\"true\" />}</Show>}>\n {(image) => <img class=\"k2b-dropdown__image\" src={image()} alt=\"\" />}\n </Show>\n <Show when={props.color}>\n {(color) => <span class=\"k2b-dropdown__color\" style={{ \"--k2b-dropdown-color\": color() }} aria-hidden=\"true\" />}\n </Show>\n <span class=\"k2b-dropdown__copy\">\n <span>{props.label}</span>\n {optionDescription(props)}\n </span>\n {props.trailing}\n {/* Always present for radios, so selecting the widest entry cannot widen a content-sized menu. */}\n <Show when={props.choice === \"radio\"}>\n <i class=\"ti ti-check k2b-dropdown__check\" data-hidden={checked() ? undefined : \"true\"} aria-hidden=\"true\" />\n </Show>\n </Dynamic>\n );\n}\n\nexport function DropdownItems(props: {\n items: readonly DropdownItem[];\n close: (restoreFocus?: boolean) => void;\n role?: \"menuitem\" | \"option\";\n /** Internal: the level of a submenu's entries, 1 for the menu itself. */\n depth?: number;\n /** Internal: a phone sheet shows a submenu's entries in its own place. */\n drill?: (item: DropdownSubmenu, row: HTMLElement) => void;\n}): JSX.Element {\n const messages = useUiMessages();\n const depth = untrack(() => props.depth ?? 1);\n // One object per level: an open submenu's code keeps the level's state under it.\n const context: MenuContextValue = {\n close: (restoreFocus) => props.close(restoreFocus),\n role: untrack(() => props.role ?? \"menuitem\"),\n depth,\n drill: untrack(() => props.drill),\n };\n // Rows read their current item: a host that rebuilds equal items while the menu is open keeps each row element (#2140).\n const renderItem = (item: () => DropdownAction | DropdownChoice): JSX.Element => {\n const initial = untrack(item);\n if (\"choice\" in initial) return <DropdownChoiceItem {...mergeProps(() => item() as DropdownChoice)} />;\n if (\"submenu\" in initial) {\n const submenu = () => item() as DropdownSubmenu;\n loadSubmenus();\n return (\n <Show when={submenuRow()}>\n {(Row) => <Dynamic component={Row()} item={submenu()} menu={context} Items={DropdownItems} content={itemContent} />}\n </Show>\n );\n }\n const action = () => item() as DropdownAction;\n return (\n <DropdownItem\n ariaLabel={action().ariaLabel}\n closeOnSelect={closeOnSelectOf(action())}\n icon={action().icon}\n image={action().image}\n description={action().description}\n descriptionVisual={action().descriptionVisual}\n trailing={action().trailing}\n variant={action().variant}\n disabled={action().disabled}\n class={action().class}\n href={hrefOf(action())}\n external={externalOf(action())}\n onSelect={selectAction(action())}\n >\n {action().label}\n </DropdownItem>\n );\n };\n\n return (\n <MenuContext.Provider value={context}>\n <KeyedFor each={props.items} by={(item) => (\"items\" in item ? `section:${item.sectionLabel ?? \"\"}` : rowKey(item))}>\n {(current, index) => {\n const item = current();\n return (\n <Show when={\"items\" in item} fallback={renderItem(current as () => DropdownAction | DropdownChoice)}>\n <div\n class=\"k2b-dropdown__section\"\n data-divided={index() > 0 ? \"true\" : undefined}\n role=\"group\"\n // A row of choices is no set of actions: without a label it stays unnamed rather than misnamed.\n aria-label={\n (current() as DropdownSection).sectionLabel ?? ((current() as DropdownSection).layout ? undefined : messages().actions)\n }\n >\n <Show when={(current() as DropdownSection).sectionLabel}>\n {(label) => (\n <Show\n when={props.role !== \"option\" && (current() as DropdownSection).labelAction}\n fallback={<div class=\"k2b-dropdown__label\">{label()}</div>}\n >\n {(action) => (\n <div class=\"k2b-dropdown__label k2b-dropdown__label--action\">\n <span>{label()}</span>\n <DropdownSecondaryButton {...action()} class=\"k2b-dropdown__label-action\" />\n </div>\n )}\n </Show>\n )}\n </Show>\n <Show\n when={(current() as DropdownSection).layout}\n fallback={\n <KeyedFor each={(current() as DropdownSection).items} by={rowKey}>\n {renderItem}\n </KeyedFor>\n }\n >\n <div class={(current() as DropdownSection).layout === \"tiles\" ? \"k2b-dropdown__tiles\" : \"k2b-dropdown__row\"}>\n <KeyedFor each={(current() as DropdownSection).items} by={rowKey}>\n {renderItem}\n </KeyedFor>\n </div>\n </Show>\n </div>\n </Show>\n );\n }}\n </KeyedFor>\n </MenuContext.Provider>\n );\n}\n\n/** A row's key names its kind too: an entry that turns from an action into a submenu row is built anew. */\nconst rowKey = (item: DropdownAction | DropdownChoice) =>\n `${\"submenu\" in item ? \"submenu\" : \"choice\" in item ? \"choice\" : \"item\"}:${item.label}`;\n\ntype SubmenuRowModule = typeof import(\"./menu-submenu-panel\");\n/**\n * A submenu row and its menu load with the first menu that has one, so a menu without one carries none of it. A\n * signal rather than `lazy`: the server and the first browser frame both show no row, and a Suspense boundary of the\n * page around the menu never shows its fallback while it loads.\n */\nconst [submenuRow, setSubmenuRow] = createRoot(() => createSignal<SubmenuRowModule[\"SubmenuRow\"]>());\nlet submenuLoad: Promise<unknown> | undefined;\n/** Starts loading the submenu code, once, as the first submenu row renders. */\nconst loadSubmenus = (): void => {\n if (isServer || submenuLoad) return;\n submenuLoad = import(\"./menu-submenu-panel\").then(\n (module) => setSubmenuRow(() => module.SubmenuRow),\n (error: unknown) => {\n // The next menu tries again.\n submenuLoad = undefined;\n globalThis.reportError(error);\n },\n );\n};\n\nfunction DropdownTrigger(props: DropdownTriggerProps): JSX.Element {\n const context = useContext(DropdownContext);\n if (!context) throw new Error(\"Dropdown.Trigger must be used inside Dropdown.Root\");\n const [local, rest] = splitProps(props, [\n \"appearance\",\n \"children\",\n \"class\",\n \"disabled\",\n \"iconOnly\",\n \"label\",\n \"ref\",\n \"size\",\n \"tabIndex\",\n \"title\",\n \"tooltip\",\n \"tooltipDelay\",\n \"tooltipPlacement\",\n \"type\",\n \"variant\",\n ]);\n let target: HTMLButtonElement | undefined;\n const disabled = () => Boolean(context.disabled() || local.disabled);\n // An icon-only trigger shows its label as a hint, like IconButton.\n const tooltip = useLabelTooltip(\n () => local.tooltip,\n () => (local.iconOnly ? (local.title ?? local.label) : undefined),\n );\n const register = (element: HTMLButtonElement) => {\n target = element;\n context.registerTrigger(element);\n if (typeof local.ref === \"function\") local.ref(element);\n };\n const click: JSX.EventHandlerUnion<HTMLButtonElement, MouseEvent> = (event) => {\n event.stopPropagation();\n context.toggle();\n };\n\n if (local.appearance !== \"plain\") {\n return (\n <Button\n {...rest}\n ref={register}\n aria-controls={context.menuId}\n aria-expanded={context.open()}\n aria-haspopup={context.popup()}\n aria-label={local.label}\n disabled={disabled()}\n tabIndex={disabled() ? -1 : local.tabIndex}\n onClick={click}\n onKeyDown={context.triggerKeyDown}\n type={local.type ?? \"button\"}\n class={`${local.iconOnly ? \"k2b-icon-button\" : \"\"} k2b-dropdown__trigger ${local.class ?? \"\"}`}\n size={local.size}\n variant={local.variant ?? (local.iconOnly ? \"ghost\" : undefined)}\n title={iconTitle(local.title, tooltip())}\n tooltip={tooltip()}\n tooltipDelay={local.tooltipDelay}\n tooltipPlacement={local.tooltipPlacement}\n >\n {local.children}\n </Button>\n );\n }\n\n return (\n <>\n <button\n {...rest}\n ref={register}\n aria-controls={context.menuId}\n aria-expanded={context.open()}\n aria-haspopup={context.popup()}\n aria-label={local.label}\n disabled={disabled()}\n tabIndex={disabled() ? -1 : local.tabIndex}\n onClick={click}\n onKeyDown={context.triggerKeyDown}\n type={local.type ?? \"button\"}\n class={`k2b-dropdown__trigger ${local.class ?? \"\"}`}\n title={iconTitle(local.title, tooltip())}\n >\n {local.children}\n </button>\n <Show when={tooltip() !== false && tooltip() !== undefined}>\n <Tooltip\n content={tooltip() as JSX.Element}\n target={() => target}\n delay={local.tooltipDelay}\n disabled={disabled()}\n placement={local.tooltipPlacement}\n />\n </Show>\n </>\n );\n}\n\n/**\n * Internal: content in place of the entries, as `CommandMenu` renders its command list. It reports where the focus\n * goes as the menu opens, like the search field, and `open` tells it when the menu closed.\n */\nexport type DropdownBody = (props: {\n close: (restoreFocus?: boolean) => void;\n open: () => boolean;\n api: (api: MenuSearchApi) => void;\n}) => JSX.Element;\n\n/** Accessible top-layer menu with explicit trigger ownership. */\nfunction DropdownRoot(props: DropdownProps & { body?: DropdownBody; placeMenu?: (menu: HTMLElement) => void }): JSX.Element {\n const messages = useUiMessages();\n const locale = useLocale();\n /** The open phone sheet's cancel switch: it closes when the menu goes or is disabled, as the popover does. */\n let sheet: AbortController | undefined;\n /** Ends the current phone sheet's open state, once, also before its code has loaded. */\n let endSheet: (() => void) | undefined;\n const id = createUniqueId().replace(/[^a-zA-Z0-9_-]/g, \"-\");\n const menuId = `k2b-dropdown-${id}`;\n const [internalOpen, setInternalOpen] = createSignal(false);\n const [entriesShown, setEntriesShown] = createSignal(!props.lazy);\n let triggerRef: HTMLElement | undefined;\n const [query, setQuery] = createSignal(\"\");\n let searchApi: MenuSearchApi | undefined;\n /** Set while the menu is open from `openAt`: it appears beside `anchor`, and focus returns to `origin`. */\n let anchor: DropdownAnchor | undefined;\n let origin: DropdownReturnFocus | undefined;\n const originElement = () => (typeof origin === \"function\" ? origin() : origin);\n let menuRef: HTMLDivElement | undefined;\n /**\n * Whether the popover shows, as `open` and the toggle events left it. A menu closed before its opening toggle event\n * arrives gets one event from \"closed\" to \"closed\"; this still reports that close to the owner.\n */\n let shown = false;\n /** The menu opens in place of a phone sheet whose code did not load; the owner already heard it open. */\n let announcedOpen = false;\n let triggerRing = true;\n let mounted = false;\n /** Where a key on the trigger asked the focus to go; a controlled menu opens later, in its owner's update. */\n let keyFocus: \"first\" | \"last\" | false = false;\n let viewportListenersAttached = false;\n let resizeObserver: ResizeObserver | undefined;\n\n const isOpen = () => props.open ?? internalOpen();\n const position = (): DropdownPosition =>\n typeof props.position === \"function\" ? props.position() : (props.position ?? (props.align === \"end\" ? \"bottom-left\" : \"bottom-right\"));\n\n const place = () => {\n // Internal: `CommandMenu` docks its menu to a composer instead of its trigger.\n if (props.placeMenu && menuRef) return props.placeMenu(menuRef);\n const at = anchor ?? triggerRef;\n if (!at || !menuRef) return;\n const rect = dropdownPosition(at.getBoundingClientRect(), menuRef.getBoundingClientRect(), position(), {\n width: window.innerWidth,\n height: window.innerHeight,\n });\n menuRef.style.left = `${rect.left}px`;\n menuRef.style.top = `${rect.top}px`;\n };\n const reposition = () => {\n if (isOpen()) place();\n };\n const attachViewportListeners = () => {\n if (viewportListenersAttached) return;\n viewportListenersAttached = true;\n window.addEventListener(\"resize\", reposition);\n window.addEventListener(\"scroll\", reposition, true);\n // A content-sized menu changes size when its items change while it is open.\n if (menuRef && typeof ResizeObserver !== \"undefined\") {\n resizeObserver ??= new ResizeObserver(reposition);\n resizeObserver.observe(menuRef);\n }\n };\n const detachViewportListeners = () => {\n if (!viewportListenersAttached) return;\n viewportListenersAttached = false;\n window.removeEventListener(\"resize\", reposition);\n window.removeEventListener(\"scroll\", reposition, true);\n resizeObserver?.disconnect();\n };\n const close = (restoreFocus = true) => {\n // Before hiding, so the popover does not return focus on its own.\n if (restoreFocus) returnFocus(originElement() ?? triggerRef, triggerRing);\n if (menuRef?.matches(\":popover-open\")) menuRef.hidePopover();\n setQuery(\"\");\n // Like `open`, expose the closed state now: the toggle event can arrive after the next key press, and a trigger\n // that still reads as open would ignore Enter (Escape, then Enter at once, must reopen).\n setInternalOpen(false);\n detachViewportListeners();\n };\n const open = (focus: \"first\" | \"last\" | false = \"first\") => {\n if (props.disabled || !menuRef || menuRef.matches(\":popover-open\")) return;\n triggerRing = ringOnReturn(originElement() ?? triggerRef);\n // A lazy menu's entries exist before it shows, so it places and focuses them as any other.\n setEntriesShown(true);\n menuRef.showPopover();\n shown = true;\n // The toggle event arrives a task later; expose the open state before focus moves into the menu.\n setInternalOpen(true);\n attachViewportListeners();\n place();\n queueMicrotask(() => {\n if (!focus) return;\n if (searchApi) searchApi.focus(focus);\n else focusMenuItem(menuRef, focus === \"first\" ? 0 : -1);\n });\n };\n /** The phone sheet has closed: focus goes back, and the trigger and the owner hear the close. */\n const finishSheet = (anchored: boolean, ring: boolean) => {\n sheet = undefined;\n // An entry that moved focus elsewhere, such as into a field, keeps it.\n const target = anchored ? originElement() : undefined;\n const focused = document.activeElement;\n if (target?.isConnected && (!focused || focused === document.body)) returnFocus(target, ring);\n setInternalOpen(false);\n props.onOpenChange?.(false);\n props.onClose?.();\n };\n /** Closes the phone sheet; one still waiting for its code ends at once, also while a download stalls. */\n const cancelSheet = () => {\n if (!sheet) return;\n sheet.abort();\n if (!menuSheetReady()) endSheet?.();\n };\n const requestOpen = (next: boolean, focus: \"first\" | \"last\" | false = \"first\") => {\n if (props.disabled && next) return;\n if (props.open !== undefined) {\n props.onOpenChange?.(next);\n return;\n }\n if (next && props.phone === \"sheet\" && !props.body && prefersMenuSheet()) {\n if (sheet) return;\n const current = new AbortController();\n sheet = current;\n // A sheet opened without its trigger returns focus to its own target, which an entry may have moved,\n // rather than to whatever had focus as it opened.\n const anchored = origin !== undefined;\n const ring = anchored && ringOnReturn(originElement());\n if (anchored && document.activeElement instanceof HTMLElement) document.activeElement.blur();\n // The sheet is this menu's open state: the trigger reports it and the owner hears both ends, once.\n const end = () => {\n if (sheet === current) finishSheet(anchored, ring);\n };\n endSheet = end;\n setInternalOpen(true);\n props.onOpenChange?.(true);\n void openMenuSheet(\n {\n Items: DropdownItems,\n items: props.items,\n label: props.label ?? messages().dropdownMenu,\n locale: locale(),\n top: props.sheetTop,\n search: props.search,\n icons: props.icons,\n note: props.note,\n signal: current.signal,\n },\n (error) => {\n globalThis.reportError(error);\n if (sheet !== current) return;\n // The sheet's code did not load: the person still chooses, from the menu that is always in the page, and\n // the next open tries the sheet again. The owner already heard this open.\n sheet = undefined;\n if (!current.signal.aborted && menuRef?.isConnected) {\n announcedOpen = true;\n open(focus);\n if (menuRef.matches(\":popover-open\")) return;\n announcedOpen = false;\n }\n finishSheet(anchored, ring);\n },\n ).finally(end);\n return;\n }\n // A second tap while the sheet's code still loads cancels that sheet.\n if (!next && sheet) cancelSheet();\n else if (next) open(focus);\n else close(false);\n };\n const handleMenuKeyDown = (event: KeyboardEvent) => {\n const items = menuEntries(menuRef);\n // A searchable menu's field keeps the focus and moves the marked entry itself.\n if (!props.search && !props.body && (focusMenuRow(items, event.key) || focusRowSegment(items, event.key))) {\n event.preventDefault();\n } else if (event.key === \"Escape\") {\n event.preventDefault();\n returnFocus(originElement() ?? triggerRef, triggerRing);\n requestOpen(false);\n } else if (event.key === \"Tab\") {\n requestOpen(false);\n }\n };\n\n const triggerKey = (event: KeyboardEvent) => {\n if (![\"Enter\", \" \", \"ArrowDown\", \"ArrowUp\"].includes(event.key)) return;\n // Ctrl+Enter and the like keep their browser meaning on an adopted link, such as opening it in a new tab.\n if (event.metaKey || event.ctrlKey || event.shiftKey || event.altKey) return;\n event.preventDefault();\n event.stopPropagation();\n if (isOpen()) {\n if (searchApi) searchApi.focus(event.key === \"ArrowUp\" ? \"last\" : \"first\");\n else focusMenuItem(menuRef, event.key === \"ArrowUp\" ? -1 : 0);\n return;\n }\n anchor = origin = undefined;\n keyFocus = event.key === \"ArrowUp\" ? \"last\" : \"first\";\n requestOpen(true, keyFocus);\n keyFocus = false;\n };\n const toggle = () => {\n if (!isOpen()) anchor = origin = undefined;\n requestOpen(!isOpen());\n };\n\n const context: DropdownContextValue = {\n disabled: () => Boolean(props.disabled),\n menuId,\n open: isOpen,\n registerTrigger: (element) => {\n triggerRef = element;\n },\n toggle,\n popup: () => (props.search || props.body ? \"dialog\" : \"menu\"),\n triggerKeyDown: (event) => triggerKey(event),\n };\n\n createEffect(() => {\n const controlled = props.open;\n if (!mounted || controlled === undefined || !menuRef) return;\n if (controlled && !menuRef.matches(\":popover-open\")) open(keyFocus);\n if (!controlled && menuRef.matches(\":popover-open\")) close(false);\n });\n createEffect(() => {\n if (!props.disabled) return;\n cancelSheet();\n if (mounted) close(false);\n });\n props.openAt?.((at, focus) => {\n if (isOpen()) return;\n anchor = at;\n origin = focus;\n requestOpen(true);\n });\n props.closeWith?.(() => {\n cancelSheet();\n if (isOpen()) close();\n });\n onMount(() => {\n mounted = true;\n if (props.open) open(false);\n onCleanup(detachViewportListeners);\n const adopted = props.attach?.();\n if (!adopted) return;\n triggerRef = adopted;\n adopted.setAttribute(\"aria-controls\", menuId);\n const onClick = (event: MouseEvent) => {\n if (event.defaultPrevented || event.button !== 0 || event.metaKey || event.ctrlKey || event.shiftKey || event.altKey) return;\n event.preventDefault();\n event.stopPropagation();\n toggle();\n };\n adopted.addEventListener(\"click\", onClick);\n adopted.addEventListener(\"keydown\", triggerKey);\n createEffect(() => adopted.setAttribute(\"aria-expanded\", String(isOpen())));\n onCleanup(() => {\n adopted.removeEventListener(\"click\", onClick);\n adopted.removeEventListener(\"keydown\", triggerKey);\n });\n });\n onCleanup(() => sheet?.abort());\n\n return (\n <DropdownContext.Provider value={context}>\n <span class={`k2b-dropdown ${props.class ?? \"\"}`}>\n {props.children}\n {/* biome-ignore lint/a11y/useAriaPropsSupportedByRole: the role is menu, or dialog with search; both take a name. */}\n {/* biome-ignore lint/a11y/noStaticElementInteractions: a menu or dialog popup owns its keys. */}\n <div\n ref={menuRef}\n id={menuId}\n popover=\"auto\"\n role={props.search || props.body ? \"dialog\" : \"menu\"}\n aria-label={props.label ?? messages().dropdownMenu}\n aria-describedby={props.note ? `${menuId}-note` : undefined}\n class={`k2b-dropdown__menu ${props.menuClass ?? \"\"}`}\n style={props.width ? { \"--k2b-dropdown-width\": props.width } : undefined}\n data-width={props.width ? \"fixed\" : undefined}\n data-variant={props.variant ?? \"default\"}\n data-icons={props.icons === \"tile\" ? \"tile\" : undefined}\n data-search={props.search || props.body ? \"\" : undefined}\n data-position={position()}\n onKeyDown={handleMenuKeyDown}\n onToggle={(event) => {\n const nextOpen = (event as ToggleEvent).newState === \"open\";\n const wasOpen = shown || (event as ToggleEvent).oldState === \"open\";\n shown = nextOpen;\n const announced = announcedOpen;\n announcedOpen = false;\n setInternalOpen(nextOpen);\n if (nextOpen) setEntriesShown(true);\n if (nextOpen) attachViewportListeners();\n else detachViewportListeners();\n if (!(announced && nextOpen) && (props.open === undefined || props.open !== nextOpen)) props.onOpenChange?.(nextOpen);\n // A light dismiss hides the menu with focus inside it; an opener without a trigger takes it back.\n const focused = document.activeElement;\n const target = wasOpen && !nextOpen ? originElement() : undefined;\n if (target?.isConnected && (!focused || focused === document.body || menuRef?.contains(focused)))\n returnFocus(target, triggerRing);\n if (wasOpen && !nextOpen) setQuery(\"\");\n if (wasOpen && !nextOpen) props.onClose?.();\n if (!nextOpen && props.open === true) queueMicrotask(() => props.open === true && open(false));\n }}\n >\n <Show when={entriesShown()}>\n <Show when={props.body}>\n {(body) => {\n const Body = body();\n return (\n <Body\n close={close}\n open={isOpen}\n api={(api) => {\n searchApi = api;\n onCleanup(() => {\n if (searchApi === api) searchApi = undefined;\n });\n }}\n />\n );\n }}\n </Show>\n <Show\n when={!props.body && props.search}\n fallback={\n <Show when={!props.body}>\n <DropdownItems items={props.items} close={close} />\n </Show>\n }\n >\n {(search) => (\n <MenuSearch\n Items={DropdownItems}\n items={props.items}\n search={search()}\n label={props.label ?? messages().dropdownMenu}\n query={query}\n setQuery={setQuery}\n close={close}\n api={(api) => {\n searchApi = api;\n onCleanup(() => {\n if (searchApi === api) searchApi = undefined;\n });\n }}\n />\n )}\n </Show>\n {/* Hidden from the menu's children, which are entries only; the menu reads it as its description. */}\n <Show when={props.note}>\n <p id={`${menuId}-note`} class=\"k2b-dropdown__note\" aria-hidden=\"true\">\n {props.note}\n </p>\n </Show>\n </Show>\n </div>\n </span>\n </DropdownContext.Provider>\n );\n}\n\ntype DropdownComponent = ((props: DropdownProps) => JSX.Element) & {\n Root: (props: DropdownProps) => JSX.Element;\n Trigger: (props: DropdownTriggerProps) => JSX.Element;\n Item: (props: DropdownItemProps) => JSX.Element;\n};\n\n/** Internal: the menu with a `body`, for `CommandMenu`. */\nexport const DropdownShell = DropdownRoot;\n\nexport const Dropdown = DropdownRoot as DropdownComponent;\nDropdown.Root = DropdownRoot;\nDropdown.Trigger = DropdownTrigger;\nDropdown.Item = DropdownItem;\n\nexport default Dropdown;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,SACE,aAAa,EACb,YAAY,EACZ,UAAU,EACV,YAAY,EACZ,cAAc,EAEd,UAAU,EACV,SAAS,EACT,OAAO,EACP,IAAI,EACJ,UAAU,EACV,OAAO,EACP,UAAU,QACL,UAAU;AACjB,SAAS,OAAO,EAAE,QAAQ,QAAQ,cAAc;AAChD,SAAS,OAAO,EAAyB,eAAe,QAAQ,qBA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