@nldd/design-system 0.20.0 → 0.21.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (394) hide show
  1. package/custom-elements.json +361 -10
  2. package/dist/cdn/autoloader.js +181 -0
  3. package/dist/cdn/chunks/activity-indicator-JglZJ8dh.js +356 -0
  4. package/dist/cdn/chunks/activity-indicator.i18n-D7mCy6d2.js +3 -0
  5. package/dist/cdn/chunks/avatar-ASqePVhU.js +308 -0
  6. package/dist/cdn/chunks/avatar-group-GinEMPm9.js +338 -0
  7. package/dist/cdn/chunks/avatar-group.i18n-BYw_9wt_.js +7 -0
  8. package/dist/cdn/chunks/avatar.i18n-CMwQjBkS.js +7 -0
  9. package/dist/cdn/chunks/badge-Cc2Nufoc.js +323 -0
  10. package/dist/cdn/chunks/badge.i18n-DqW7hLQj.js +3 -0
  11. package/dist/cdn/chunks/banner-BLVKM07M.js +325 -0
  12. package/dist/cdn/chunks/banner.i18n-BOCM9rGN.js +3 -0
  13. package/dist/cdn/chunks/bar-split-view-Clbg-p9H.js +259 -0
  14. package/dist/cdn/chunks/base-CfuoYRhN.js +3 -0
  15. package/dist/cdn/chunks/blockquote-BoOqbGdm.js +189 -0
  16. package/dist/cdn/chunks/box-WkhyjQVy.js +88 -0
  17. package/dist/cdn/chunks/breadcrumbs-D9YxZzRj.js +162 -0
  18. package/dist/cdn/chunks/breadcrumbs.i18n-zmO8jaTO.js +3 -0
  19. package/dist/cdn/chunks/breakpoints-Cwor8TRP.js +15 -0
  20. package/dist/cdn/chunks/button-DO90Lo6q.js +863 -0
  21. package/dist/cdn/chunks/button-bar-Bxgdbyh3.js +225 -0
  22. package/dist/cdn/chunks/button-group-BYGPPLmZ.js +205 -0
  23. package/dist/{components/button.i18n-DiDGynnq.js → cdn/chunks/button.i18n-BGFt7Z9u.js} +2 -2
  24. package/dist/cdn/chunks/card-BP0jfOkS.js +262 -0
  25. package/dist/cdn/chunks/card.i18n-CpafLm3i.js +8 -0
  26. package/dist/cdn/chunks/carried-context-DlMSujiJ.js +37 -0
  27. package/dist/cdn/chunks/cell-BRD2ilQh.js +144 -0
  28. package/dist/cdn/chunks/checkbox-Cazx8CQn.js +296 -0
  29. package/dist/cdn/chunks/checkbox-field-DDZ-B6vH.js +157 -0
  30. package/dist/cdn/chunks/class-map-CXSdNjt8.js +26 -0
  31. package/dist/cdn/chunks/code-editor-D6Q55oaY.js +286 -0
  32. package/dist/cdn/chunks/code-viewer-DspLH2T1.js +766 -0
  33. package/dist/cdn/chunks/code-viewer.i18n-BHfSDRbK.js +13 -0
  34. package/dist/cdn/chunks/codemirror-input-Db65x22n.js +1232 -0
  35. package/dist/cdn/chunks/collection-NVtkvDls.js +396 -0
  36. package/dist/cdn/chunks/collection.i18n-DqWPGnZO.js +8 -0
  37. package/dist/cdn/chunks/combo-box-OywRKaWj.js +512 -0
  38. package/dist/cdn/chunks/combo-box.i18n-BorzYnJ2.js +6 -0
  39. package/dist/cdn/chunks/container-rrbwk0z4.js +602 -0
  40. package/dist/cdn/chunks/custom-element-BW8Ua4c7.js +7 -0
  41. package/dist/cdn/chunks/custom-element-q6NzoL5b.js +301 -0
  42. package/dist/cdn/chunks/custom-font-size-D7KNr84p.js +57 -0
  43. package/dist/cdn/chunks/date-field-vmZLo80s.js +662 -0
  44. package/dist/cdn/chunks/date-field.i18n-BTzc0E9a.js +15 -0
  45. package/dist/cdn/chunks/date-picker-CXDzSBoL.js +993 -0
  46. package/dist/cdn/chunks/date-picker.i18n-Dsc_M5QK.js +82 -0
  47. package/dist/cdn/chunks/decorate-TduJMFD_.js +280 -0
  48. package/dist/cdn/chunks/defer-focus-F73ud2D9.js +9 -0
  49. package/dist/cdn/chunks/described-by-mixin-daRE7orX.js +32 -0
  50. package/dist/cdn/chunks/description-cell-CQwOj_rN.js +166 -0
  51. package/dist/cdn/chunks/dev-checks-zW_W-hnh.js +2695 -0
  52. package/dist/cdn/chunks/directive-CwRgozUW.js +27 -0
  53. package/dist/cdn/chunks/dismiss-from-title-bar-C6mP7sWP.js +5 -0
  54. package/dist/cdn/chunks/dist-3C80SZN9.js +849 -0
  55. package/dist/cdn/chunks/dist-A7_1pHX0.js +379 -0
  56. package/dist/cdn/chunks/dist-BEfLdOvy.js +1346 -0
  57. package/dist/cdn/chunks/dist-BTUxFM2V.js +268 -0
  58. package/dist/cdn/chunks/dist-CP3G1pSK.js +1037 -0
  59. package/dist/cdn/chunks/dist-C_dGY6zR.js +468 -0
  60. package/dist/{components/dist-B9YBOGFW.js → cdn/chunks/dist-ChmCRv39.js} +109 -153
  61. package/dist/{components/dist-CJm4tkNC.js → cdn/chunks/dist-D2qap2OY.js} +23 -31
  62. package/dist/cdn/chunks/dist-DPUBF0MZ.js +1593 -0
  63. package/dist/{components/dist-4g23YHP0.js → cdn/chunks/dist-DrTzvgE7.js} +291 -404
  64. package/dist/cdn/chunks/dist-EM4MWLQq.js +385 -0
  65. package/dist/cdn/chunks/dist-EgIBI-FG.js +293 -0
  66. package/dist/{components/dist-Bf823YyL.js → cdn/chunks/dist-Rm6FvrSR.js} +272 -551
  67. package/dist/cdn/chunks/divider-CCNbnplA.js +53 -0
  68. package/dist/cdn/chunks/document-tab-bar-A2DFWrP9.js +973 -0
  69. package/dist/cdn/chunks/document-tab-bar.i18n-DKrA9TnB.js +9 -0
  70. package/dist/cdn/chunks/drag-handle-cell-CbzDYebG.js +206 -0
  71. package/dist/cdn/chunks/drag-handle-cell.i18n-CKUrbm2q.js +3 -0
  72. package/dist/cdn/chunks/dropdown-DZTZtkm5.js +350 -0
  73. package/dist/cdn/chunks/element-state-B-44fVqq.js +20 -0
  74. package/dist/cdn/chunks/file-field-DQ52qq5L.js +1484 -0
  75. package/dist/cdn/chunks/file-field.i18n-pDM7Utud.js +40 -0
  76. package/dist/cdn/chunks/floating-ui.dom-B8J1rV2c.js +753 -0
  77. package/dist/cdn/chunks/focus-target-DSLGcCWq.js +24 -0
  78. package/dist/cdn/chunks/form-actions-C_7hINq-.js +90 -0
  79. package/dist/cdn/chunks/form-associated-mixin--GIbl98p.js +62 -0
  80. package/dist/cdn/chunks/form-field--4nWJ_DK.js +364 -0
  81. package/dist/cdn/chunks/form-hXLgy_tY.js +84 -0
  82. package/dist/cdn/chunks/form-section-By-D4un0.js +64 -0
  83. package/dist/cdn/chunks/full-bleed-section-Dg4sIJG1.js +161 -0
  84. package/dist/cdn/chunks/gherkin-eseYvsxh.js +29 -0
  85. package/dist/cdn/chunks/hero-CQQMNCT_.js +761 -0
  86. package/dist/{components/icon-_Eox7ZfO.js → cdn/chunks/icon-BORlalt0.js} +298 -308
  87. package/dist/cdn/chunks/icon-button-rKiIHs7A.js +632 -0
  88. package/dist/{components/icon-button.i18n-1_N-wN6x.js → cdn/chunks/icon-button.i18n-DpZOfIS4.js} +2 -4
  89. package/dist/cdn/chunks/icon-cell-rk4NQid2.js +156 -0
  90. package/dist/cdn/chunks/identity-BLXecYsZ.js +187 -0
  91. package/dist/cdn/chunks/if-defined-CaKKERku.js +4 -0
  92. package/dist/cdn/chunks/image-DZMW6JgL.js +659 -0
  93. package/dist/cdn/chunks/image.i18n-ONcm1h7o.js +3 -0
  94. package/dist/cdn/chunks/implicit-submission-Csbcor_E.js +27 -0
  95. package/dist/cdn/chunks/inline-dialog-WlqtPBPJ.js +259 -0
  96. package/dist/cdn/chunks/input-modality-XE0B7yCn.js +42 -0
  97. package/dist/cdn/chunks/just-in-time-education-DRcb5g7x.js +611 -0
  98. package/dist/cdn/chunks/just-in-time-education.i18n-CW_dsaxf.js +6 -0
  99. package/dist/cdn/chunks/kanban-Ca_mfqsA.js +400 -0
  100. package/dist/cdn/chunks/kanban-column-fgIMc7pw.js +375 -0
  101. package/dist/cdn/chunks/kanban.i18n-CWqc3e0B.js +11 -0
  102. package/dist/cdn/chunks/keyboard-shortcut-EknnW7Ub.js +267 -0
  103. package/dist/cdn/chunks/languages-yKikVFv_.js +8893 -0
  104. package/dist/cdn/chunks/link-FBSAJ3UC.js +229 -0
  105. package/dist/cdn/chunks/link-group-90qVfKa0.js +111 -0
  106. package/dist/cdn/chunks/link-hint-KFhgr5Ng.js +24 -0
  107. package/dist/cdn/chunks/link-rel-DvrTEfVT.js +8 -0
  108. package/dist/cdn/chunks/link.i18n-DJPobGmu.js +8 -0
  109. package/dist/cdn/chunks/list-CaWl3q0Z.js +880 -0
  110. package/dist/cdn/chunks/list-item-Cagnf6eG.js +802 -0
  111. package/dist/cdn/chunks/list-item-segment-BRzBF1y_.js +315 -0
  112. package/dist/cdn/chunks/list-item-segment.i18n-DHnrQL4V.js +8 -0
  113. package/dist/{components/list-item.i18n-89uqlBMK.js → cdn/chunks/list-item.i18n-Br6J5Ev9.js} +2 -2
  114. package/dist/cdn/chunks/list-items-Du0RCWsY.js +6 -0
  115. package/dist/{components/list.i18n-CKqbhFQ_.js → cdn/chunks/list.i18n-C40ltgdI.js} +2 -2
  116. package/dist/cdn/chunks/loading-tags-DtUr-DR7.js +3 -0
  117. package/dist/cdn/chunks/menu-BtxzRedh.js +719 -0
  118. package/dist/cdn/chunks/menu-bar-BU3Hjk1b.js +253 -0
  119. package/dist/cdn/chunks/menu-bar-item-C7LQ0NI_.js +365 -0
  120. package/dist/cdn/chunks/menu-bar.i18n-BoMu4Eoz.js +3 -0
  121. package/dist/cdn/chunks/menu-divider-CLLRgMll.js +15 -0
  122. package/dist/cdn/chunks/menu-group-BL24ChpR.js +23 -0
  123. package/dist/cdn/chunks/menu-item-CooKfrFa.js +140 -0
  124. package/dist/cdn/chunks/menu.i18n-C6uYJsG3.js +10 -0
  125. package/dist/cdn/chunks/menu.template-C6rbfI-u.js +642 -0
  126. package/dist/cdn/chunks/modal-dialog-BrUMP4Jm.js +240 -0
  127. package/dist/cdn/chunks/multi-line-text-field-D7hXhyOn.js +318 -0
  128. package/dist/cdn/chunks/navigation-split-view-B2ZQhxEb.js +621 -0
  129. package/dist/cdn/chunks/nl.generated-D6T41jG3.js +112 -0
  130. package/dist/cdn/chunks/notification-DSGP14d1.js +492 -0
  131. package/dist/cdn/chunks/notification.i18n-BKUSLN5c.js +6 -0
  132. package/dist/cdn/chunks/number-field-B8op14Y_.js +301 -0
  133. package/dist/cdn/chunks/number-field.i18n-BS0bINWY.js +7 -0
  134. package/dist/cdn/chunks/one-half-one-half-section-ZYmHYf4Q.js +213 -0
  135. package/dist/cdn/chunks/one-third-two-thirds-section-Ds10K6AS.js +213 -0
  136. package/dist/cdn/chunks/one-time-code-field-Cgy_tTS4.js +693 -0
  137. package/dist/cdn/chunks/open-when-rendered-CW_2_WUZ.js +20 -0
  138. package/dist/cdn/chunks/owned-attribute-x9OCTy_4.js +6 -0
  139. package/dist/cdn/chunks/owner-form-Cq8tT7ac.js +7 -0
  140. package/dist/cdn/chunks/page-CBf_Decp.js +431 -0
  141. package/dist/cdn/chunks/page-footer-CSv1dU7M.js +396 -0
  142. package/dist/cdn/chunks/page-footer.i18n-pbdr4lN3.js +3 -0
  143. package/dist/cdn/chunks/page-section-mixin-Dp6X8GKd.js +132 -0
  144. package/dist/cdn/chunks/pagination-CMUcFB53.js +485 -0
  145. package/dist/cdn/chunks/pagination.i18n-QQMx14CQ.js +9 -0
  146. package/dist/cdn/chunks/password-field-C76Vm3rm.js +368 -0
  147. package/dist/cdn/chunks/password-field.i18n-CzdBn-1b.js +8 -0
  148. package/dist/cdn/chunks/popover-CGbeEv_-.js +334 -0
  149. package/dist/cdn/chunks/popover-target-B25dxnmt.js +10 -0
  150. package/dist/cdn/chunks/popover.i18n-DmFBHUvB.js +3 -0
  151. package/dist/cdn/chunks/popup-anchor-controller-VZw0bXf2.js +30 -0
  152. package/dist/cdn/chunks/progress-bar-BLiHaRUS.js +674 -0
  153. package/dist/cdn/chunks/progress-bar.i18n-Cr5miGTx.js +8 -0
  154. package/dist/cdn/chunks/progress-circle-CjkovRbL.js +667 -0
  155. package/dist/cdn/chunks/progress-circle.i18n-CRrXuY4V.js +8 -0
  156. package/dist/cdn/chunks/query-ChDzi9FQ.js +28 -0
  157. package/dist/cdn/chunks/radio-button-GHyO-GQB.js +338 -0
  158. package/dist/cdn/chunks/radio-button-field-C-Z6Lnd4.js +192 -0
  159. package/dist/cdn/chunks/radio-button-group-ChTqBCnQ.js +118 -0
  160. package/dist/cdn/chunks/radio-position-CXWYAjaz.js +10 -0
  161. package/dist/cdn/chunks/reflect-non-default-Bu3rpCvg.js +9 -0
  162. package/dist/cdn/chunks/render-marked-DX_5ISZE.js +37 -0
  163. package/dist/cdn/chunks/repeat-Ch_5OsXE.js +76 -0
  164. package/dist/cdn/chunks/return-focus-BzZWhXhc.js +57 -0
  165. package/dist/cdn/chunks/rich-text-CQ2uwMSp.js +47 -0
  166. package/dist/cdn/chunks/rich-text.i18n-BlJ68YuU.js +3 -0
  167. package/dist/cdn/chunks/row-header-mixin-CgqvREoV.js +16 -0
  168. package/dist/cdn/chunks/sanitize-url-CBuGmY0W.js +7 -0
  169. package/dist/cdn/chunks/scroll-mode-controller-COUD1-3P.js +42 -0
  170. package/dist/cdn/chunks/search-field-BGNfERhn.js +396 -0
  171. package/dist/cdn/chunks/search-field.i18n-B_Oc7hc-.js +6 -0
  172. package/dist/cdn/chunks/segmented-control-BYAG4VRp.js +671 -0
  173. package/dist/cdn/chunks/shadow-resets-6SToDsPu.js +12 -0
  174. package/dist/cdn/chunks/sheet-CqN7ViYV.js +340 -0
  175. package/dist/cdn/chunks/shell-C9rds_D9.js +146 -0
  176. package/dist/cdn/chunks/shell-DmJOYhyF.js +108 -0
  177. package/dist/cdn/chunks/side-by-side-split-view-C5oX4c6Z.js +166 -0
  178. package/dist/cdn/chunks/sidebar-section-CFPBdETU.js +353 -0
  179. package/dist/cdn/chunks/sidebar-section.i18n-BuGfRMpD.js +6 -0
  180. package/dist/cdn/chunks/simple-section-qrCqXeBa.js +192 -0
  181. package/dist/cdn/chunks/skip-link-DWh4W6-J.js +161 -0
  182. package/dist/cdn/chunks/skip-link.i18n--PbEdAmJ.js +3 -0
  183. package/dist/cdn/chunks/slider--hODfOwh.js +772 -0
  184. package/dist/cdn/chunks/slider.i18n-DVw0c8AG.js +6 -0
  185. package/dist/cdn/chunks/slot-content-BLuPqVXw.js +13 -0
  186. package/dist/cdn/chunks/spacer-CFzq_JCh.js +237 -0
  187. package/dist/cdn/chunks/spacer-cell-DuVOgIj8.js +68 -0
  188. package/dist/cdn/chunks/spacing-scale-SufIjHeN.js +28 -0
  189. package/dist/cdn/chunks/split-button-DH19p8So.js +268 -0
  190. package/dist/cdn/chunks/split-button.i18n-DtClSMga.js +3 -0
  191. package/dist/cdn/chunks/split-view-divider-jzcPmnMh.js +100 -0
  192. package/dist/cdn/chunks/split-view-pane-BLsZz263.js +128 -0
  193. package/dist/cdn/chunks/stacked-split-view-CcOR8LrJ.js +157 -0
  194. package/dist/cdn/chunks/static-html-Cf4ccUIg.js +26 -0
  195. package/dist/cdn/chunks/status-bar-CINbOihq.js +284 -0
  196. package/dist/cdn/chunks/status-bar-change-CR9l0Gyk.js +3 -0
  197. package/dist/cdn/chunks/step-bar-6FvZL1Ti.js +474 -0
  198. package/dist/cdn/chunks/step-bar.i18n-DocExlD7.js +9 -0
  199. package/dist/cdn/chunks/step-cell-CejRisgS.js +287 -0
  200. package/dist/cdn/chunks/stepper-CY2rJWOJ.js +223 -0
  201. package/dist/cdn/chunks/stepper.i18n-COOAkaBl.js +7 -0
  202. package/dist/cdn/chunks/style-map-DsIw6lkq.js +29 -0
  203. package/dist/cdn/chunks/style-mod-DGMhzWuk.js +1583 -0
  204. package/dist/cdn/chunks/swatch-picker-BY3DBIl6.js +430 -0
  205. package/dist/cdn/chunks/swatch-picker.i18n-_G0nmnGe.js +22 -0
  206. package/dist/cdn/chunks/switch-DDSsZFwK.js +275 -0
  207. package/dist/cdn/chunks/switch-field-CMoM9I38.js +137 -0
  208. package/dist/cdn/chunks/tab-bar-CA8K1XjU.js +697 -0
  209. package/dist/cdn/chunks/tab-bar.i18n-Crsc7ShA.js +3 -0
  210. package/dist/cdn/chunks/table-DwXjCSD5.js +308 -0
  211. package/dist/cdn/chunks/table.i18n-Bmb_uw_w.js +3 -0
  212. package/dist/cdn/chunks/tag-DM3APy3B.js +306 -0
  213. package/dist/cdn/chunks/text-B1CatNR1.js +421 -0
  214. package/dist/cdn/chunks/text-cell-BkEsGI3g.js +299 -0
  215. package/dist/cdn/chunks/text-editor-BvTiMeNV.js +3743 -0
  216. package/dist/cdn/chunks/text-editor.i18n-sJKiRQ4i.js +17 -0
  217. package/dist/cdn/chunks/text-field-CUyh1-V8.js +398 -0
  218. package/dist/cdn/chunks/time-field--5K0YTcr.js +607 -0
  219. package/dist/cdn/chunks/time-field.i18n-CLH5vmS7.js +11 -0
  220. package/dist/cdn/chunks/time-picker-W0xYXLy8.js +508 -0
  221. package/dist/cdn/chunks/time-picker.i18n-BilOCXlS.js +7 -0
  222. package/dist/cdn/chunks/title-BuT7tWqN.js +437 -0
  223. package/dist/cdn/chunks/title-bar-label-controller-DSxdKZOg.js +24 -0
  224. package/dist/cdn/chunks/title-cell-8d8psUBX.js +327 -0
  225. package/dist/cdn/chunks/toggle-button-DNXWXZpE.js +528 -0
  226. package/dist/cdn/chunks/toggle-button-group-ByowJYgs.js +156 -0
  227. package/dist/cdn/chunks/token-CnkEB3hB.js +266 -0
  228. package/dist/cdn/chunks/token-field-BpyxOGmU.js +664 -0
  229. package/dist/cdn/chunks/token-field.i18n-BclzoR8F.js +9 -0
  230. package/dist/cdn/chunks/token.i18n-RGD5zAtl.js +7 -0
  231. package/dist/cdn/chunks/toml-w97zZfFO.js +27 -0
  232. package/dist/cdn/chunks/toolbar-C24LqAzK.js +408 -0
  233. package/dist/cdn/chunks/toolbar-item-DpPfPxCi.js +50 -0
  234. package/dist/cdn/chunks/toolbar-title-KBMpfL9d.js +84 -0
  235. package/dist/cdn/chunks/toolbar.i18n-QwS37CBC.js +8 -0
  236. package/dist/cdn/chunks/toolbar.styles-BQkG4gVc.js +383 -0
  237. package/dist/cdn/chunks/tooltip-BsAHJjci.js +325 -0
  238. package/dist/cdn/chunks/top-navigation-bar-C_kLPVKD.js +925 -0
  239. package/dist/cdn/chunks/top-navigation-bar.i18n-C-lcH1nB.js +10 -0
  240. package/dist/cdn/chunks/top-title-bar-iNFB2zQL.js +344 -0
  241. package/dist/cdn/chunks/translations-wxBSz213.js +8 -0
  242. package/dist/cdn/chunks/two-thirds-one-third-section-D-UANbHC.js +213 -0
  243. package/dist/cdn/chunks/validation-list-C5BhHZIG.js +202 -0
  244. package/dist/cdn/chunks/validation-list.i18n-CM6In8zD.js +12 -0
  245. package/dist/cdn/chunks/visibility-mixin-COAZ9pON.js +74 -0
  246. package/dist/cdn/chunks/visually-hidden-BPgATaH0.js +43 -0
  247. package/dist/cdn/chunks/window-CxV6ELE9.js +227 -0
  248. package/dist/cdn/chunks/window.i18n-CsEnUPAk.js +3 -0
  249. package/dist/cdn/chunks/with-translations-XX14GKFh.js +16 -0
  250. package/dist/components/actions/menu/menu-item.d.ts +6 -2
  251. package/dist/components/actions/menu/menu-item.d.ts.map +1 -1
  252. package/dist/components/actions/menu/menu-item.js +12 -1
  253. package/dist/components/actions/menu/menu-item.js.map +1 -1
  254. package/dist/components/actions/menu/menu.js +1 -1
  255. package/dist/components/actions/menu/menu.js.map +1 -1
  256. package/dist/components/actions/menu/menu.template.d.ts.map +1 -1
  257. package/dist/components/actions/menu/menu.template.js +2 -1
  258. package/dist/components/actions/menu/menu.template.js.map +1 -1
  259. package/dist/components/content/blockquote/blockquote.d.ts +1 -0
  260. package/dist/components/content/blockquote/blockquote.d.ts.map +1 -1
  261. package/dist/components/content/blockquote/blockquote.js +1 -0
  262. package/dist/components/content/blockquote/blockquote.js.map +1 -1
  263. package/dist/components/content/identity/identity.d.ts +1 -0
  264. package/dist/components/content/identity/identity.d.ts.map +1 -1
  265. package/dist/components/content/identity/identity.js +1 -0
  266. package/dist/components/content/identity/identity.js.map +1 -1
  267. package/dist/components/content/image/image.d.ts +1 -0
  268. package/dist/components/content/image/image.d.ts.map +1 -1
  269. package/dist/components/content/image/image.js +1 -0
  270. package/dist/components/content/image/image.js.map +1 -1
  271. package/dist/components/content/rich-text/rich-text.d.ts +1 -0
  272. package/dist/components/content/rich-text/rich-text.d.ts.map +1 -1
  273. package/dist/components/content/rich-text/rich-text.js +1 -0
  274. package/dist/components/content/rich-text/rich-text.js.map +1 -1
  275. package/dist/components/content/text/text.d.ts +1 -0
  276. package/dist/components/content/text/text.d.ts.map +1 -1
  277. package/dist/components/content/text/text.js +1 -0
  278. package/dist/components/content/text/text.js.map +1 -1
  279. package/dist/components/content/title/title.d.ts +1 -0
  280. package/dist/components/content/title/title.d.ts.map +1 -1
  281. package/dist/components/content/title/title.js +1 -0
  282. package/dist/components/content/title/title.js.map +1 -1
  283. package/dist/components/forms/form/form.d.ts.map +1 -1
  284. package/dist/components/forms/form/form.js +1 -0
  285. package/dist/components/forms/form/form.js.map +1 -1
  286. package/dist/components/forms/form-field/form-field.d.ts +1 -0
  287. package/dist/components/forms/form-field/form-field.d.ts.map +1 -1
  288. package/dist/components/forms/form-field/form-field.js +1 -0
  289. package/dist/components/forms/form-field/form-field.js.map +1 -1
  290. package/dist/components/inputs/date-field/date-field.d.ts +9 -4
  291. package/dist/components/inputs/date-field/date-field.d.ts.map +1 -1
  292. package/dist/components/inputs/date-field/date-field.js +20 -7
  293. package/dist/components/inputs/date-field/date-field.js.map +1 -1
  294. package/dist/components/inputs/date-field/date-field.template.d.ts.map +1 -1
  295. package/dist/components/inputs/date-field/date-field.template.js +1 -0
  296. package/dist/components/inputs/date-field/date-field.template.js.map +1 -1
  297. package/dist/components/inputs/dropdown/dropdown.d.ts +23 -2
  298. package/dist/components/inputs/dropdown/dropdown.d.ts.map +1 -1
  299. package/dist/components/inputs/dropdown/dropdown.js +68 -11
  300. package/dist/components/inputs/dropdown/dropdown.js.map +1 -1
  301. package/dist/components/inputs/time-field/time-field.d.ts +4 -0
  302. package/dist/components/inputs/time-field/time-field.d.ts.map +1 -1
  303. package/dist/components/inputs/time-field/time-field.js +17 -2
  304. package/dist/components/inputs/time-field/time-field.js.map +1 -1
  305. package/dist/components/inputs/time-field/time-field.template.d.ts.map +1 -1
  306. package/dist/components/inputs/time-field/time-field.template.js +1 -0
  307. package/dist/components/inputs/time-field/time-field.template.js.map +1 -1
  308. package/dist/components/layout/container/container.d.ts +15 -2
  309. package/dist/components/layout/container/container.d.ts.map +1 -1
  310. package/dist/components/layout/container/container.js +38 -3
  311. package/dist/components/layout/container/container.js.map +1 -1
  312. package/dist/components/layout/container/container.styles.js +1 -1
  313. package/dist/components/layout/container/container.template.js +1 -1
  314. package/dist/components/layout/container/container.template.js.map +1 -1
  315. package/dist/components/layout/page-sections/hero/hero.d.ts +1 -0
  316. package/dist/components/layout/page-sections/hero/hero.d.ts.map +1 -1
  317. package/dist/components/layout/page-sections/hero/hero.js +1 -0
  318. package/dist/components/layout/page-sections/hero/hero.js.map +1 -1
  319. package/dist/components/layout/popover/popover.d.ts.map +1 -1
  320. package/dist/components/layout/popover/popover.js +4 -2
  321. package/dist/components/layout/popover/popover.js.map +1 -1
  322. package/dist/components/lists-and-tables/list-item/list-item.d.ts +7 -0
  323. package/dist/components/lists-and-tables/list-item/list-item.d.ts.map +1 -1
  324. package/dist/components/lists-and-tables/list-item/list-item.js +13 -3
  325. package/dist/components/lists-and-tables/list-item/list-item.js.map +1 -1
  326. package/dist/components/lists-and-tables/list-item-segment/list-item-segment.d.ts +11 -1
  327. package/dist/components/lists-and-tables/list-item-segment/list-item-segment.d.ts.map +1 -1
  328. package/dist/components/lists-and-tables/list-item-segment/list-item-segment.js +19 -3
  329. package/dist/components/lists-and-tables/list-item-segment/list-item-segment.js.map +1 -1
  330. package/dist/nldd.min.js +729 -727
  331. package/dist/types/react.d.ts +3323 -0
  332. package/dist/types/vue.d.ts +11 -3
  333. package/dist/utilities/autoloader.d.ts +33 -0
  334. package/dist/utilities/autoloader.d.ts.map +1 -0
  335. package/dist/utilities/autoloader.generated.d.ts +3 -0
  336. package/dist/utilities/autoloader.generated.d.ts.map +1 -0
  337. package/dist/utilities/autoloader.generated.js +141 -0
  338. package/dist/utilities/autoloader.generated.js.map +1 -0
  339. package/dist/utilities/autoloader.js +94 -0
  340. package/dist/utilities/autoloader.js.map +1 -0
  341. package/dist/utilities/dev-checks.d.ts +9 -0
  342. package/dist/utilities/dev-checks.d.ts.map +1 -1
  343. package/dist/utilities/dev-checks.js +45 -3
  344. package/dist/utilities/dev-checks.js.map +1 -1
  345. package/dist/utilities/dev-rules.generated.d.ts.map +1 -1
  346. package/dist/utilities/dev-rules.generated.js +12 -2
  347. package/dist/utilities/dev-rules.generated.js.map +1 -1
  348. package/dist/utilities/loading-tags.d.ts +7 -0
  349. package/dist/utilities/loading-tags.d.ts.map +1 -0
  350. package/dist/utilities/loading-tags.js +7 -0
  351. package/dist/utilities/loading-tags.js.map +1 -0
  352. package/dist/utilities/owner-form.d.ts +3 -3
  353. package/dist/utilities/owner-form.d.ts.map +1 -1
  354. package/dist/utilities/owner-form.js +6 -3
  355. package/dist/utilities/owner-form.js.map +1 -1
  356. package/dist/utilities/return-focus.d.ts +14 -0
  357. package/dist/utilities/return-focus.d.ts.map +1 -1
  358. package/dist/utilities/return-focus.js +26 -8
  359. package/dist/utilities/return-focus.js.map +1 -1
  360. package/lint/data.generated.json +1 -1
  361. package/lint/engine.js +53 -1
  362. package/lint/format.js +6 -5
  363. package/lint/frontends.js +224 -16
  364. package/lint/linter.js +5 -3
  365. package/lint/main.js +36 -9
  366. package/lint/project.js +73 -4
  367. package/lint/rule-data.js +17 -2
  368. package/lint/tree.js +3 -0
  369. package/package.json +50 -11
  370. package/dist/components/breakpoints-DtL62nLI.js +0 -45
  371. package/dist/components/components.js +0 -68243
  372. package/dist/components/decorate-DD7uUxHb.js +0 -51
  373. package/dist/components/defer-focus-dzorHsCQ.js +0 -176
  374. package/dist/components/dev-checks-CLB9G43h.js +0 -2711
  375. package/dist/components/dist-245LaK9m.js +0 -1479
  376. package/dist/components/dist-BFZM0YsR.js +0 -15772
  377. package/dist/components/dist-BNkeFjc3.js +0 -1180
  378. package/dist/components/dist-CSC1dG3L.js +0 -365
  379. package/dist/components/dist-CeMOOqgP.js +0 -1509
  380. package/dist/components/dist-DFjwTlJV.js +0 -624
  381. package/dist/components/dist-DHhnz3Gv.js +0 -381
  382. package/dist/components/dist-PeUX4vPq.js +0 -2857
  383. package/dist/components/dist-m70B83qb.js +0 -463
  384. package/dist/components/element-state-BnarBv0M.js +0 -42
  385. package/dist/components/gherkin-DzYbEwDO.js +0 -107
  386. package/dist/components/icon-button-8gvQCwCW.js +0 -2305
  387. package/dist/components/input-modality-D_CY185R.js +0 -48
  388. package/dist/components/just-in-time-education.i18n-BqU1ImP4.js +0 -423
  389. package/dist/components/nl.generated-DzZkOgnP.js +0 -64
  390. package/dist/components/rolldown-runtime-D8jQpDG7.js +0 -12
  391. package/dist/components/shadow-resets-BwOyyZFH.js +0 -60
  392. package/dist/components/shell-Dh5IwHd-.js +0 -222
  393. package/dist/components/toml-D0Pix_8Q.js +0 -58
  394. package/dist/components/visibility-mixin-Dzn48SL8.js +0 -153
@@ -0,0 +1,719 @@
1
+ import { r as e } from "./icon-BORlalt0.js";
2
+ import { n as t, t as n } from "./custom-element-q6NzoL5b.js";
3
+ import { n as r, t as i } from "./decorate-TduJMFD_.js";
4
+ import { t as a } from "./reflect-non-default-Bu3rpCvg.js";
5
+ import { r as o } from "./element-state-B-44fVqq.js";
6
+ import "./keyboard-shortcut-EknnW7Ub.js";
7
+ import { t as s } from "./translations-wxBSz213.js";
8
+ import { a as c, i as l, n as u, o as d, r as f, t as p } from "./floating-ui.dom-B8J1rV2c.js";
9
+ import { r as m, t as h } from "./input-modality-XE0B7yCn.js";
10
+ import { r as g, t as _ } from "./carried-context-DlMSujiJ.js";
11
+ import { c as v, i as y } from "./menu.template-C6rbfI-u.js";
12
+ import { t as b } from "./menu-divider-CLLRgMll.js";
13
+ import { t as x } from "./menu-item-CooKfrFa.js";
14
+ import { t as S } from "./menu-group-BL24ChpR.js";
15
+ import { t as C } from "./menu.i18n-C6uYJsG3.js";
16
+ import "./icon-cell-rk4NQid2.js";
17
+ import { n as w } from "./breakpoints-Cwor8TRP.js";
18
+ import "./spacer-cell-DuVOgIj8.js";
19
+ import "./text-cell-BkEsGI3g.js";
20
+ import "./inline-dialog-WlqtPBPJ.js";
21
+ import { t as T } from "./return-focus-BzZWhXhc.js";
22
+ function E(e, t) {
23
+ let n = document;
24
+ for (let r = 0; r < 20; r++) {
25
+ let r = n.elementFromPoint(e, t);
26
+ if (!r) return null;
27
+ let i = r.closest("nldd-menu-item");
28
+ if (i) return i;
29
+ if (!r.shadowRoot) return null;
30
+ n = r.shadowRoot;
31
+ }
32
+ return null;
33
+ }
34
+ function D(e, t) {
35
+ let n = document;
36
+ for (let r = 0; r < 20; r++) {
37
+ let r = n.elementFromPoint(e, t);
38
+ if (!r || r.closest("nldd-menu") || !r.shadowRoot) return r;
39
+ n = r.shadowRoot;
40
+ }
41
+ return null;
42
+ }
43
+ var O = class {
44
+ constructor(e) {
45
+ this._host = e, this._pressedItem = null, this._touchStart = {
46
+ x: 0,
47
+ y: 0
48
+ }, this._outsideStart = {
49
+ x: 0,
50
+ y: 0
51
+ }, this._onOutsideTap = null, this._handlePointerdown = (e) => {
52
+ if (e.button !== 0) return;
53
+ let t = e.target?.closest("nldd-menu-item");
54
+ t && !t.disabled && (this._pressedItem = t, document.addEventListener("pointerup", this._handleRelease, {
55
+ capture: !0,
56
+ once: !0
57
+ }));
58
+ }, this._handleRelease = (e) => {
59
+ let t = this._pressedItem;
60
+ if (this._pressedItem = null, !t || !this._host._isMenuOpen) return;
61
+ let n = E(e.clientX, e.clientY);
62
+ n && n !== t && !n.disabled && n._handleClick();
63
+ }, this.touchStart = (e) => {
64
+ let t = e.touches[0];
65
+ t && (this._touchStart = {
66
+ x: t.clientX,
67
+ y: t.clientY
68
+ }, this._host.removeAttribute("scroll-active"));
69
+ }, this.touchMove = (e) => {
70
+ if (this._host.hasAttribute("scroll-active")) return;
71
+ let t = e.touches[0];
72
+ t && Math.hypot(t.clientX - this._touchStart.x, t.clientY - this._touchStart.y) > 8 && this._host.setAttribute("scroll-active", "");
73
+ }, this.touchEnd = () => {
74
+ this._host.removeAttribute("scroll-active");
75
+ }, this._handleOutsideMove = (e) => {
76
+ Math.hypot(e.clientX - this._outsideStart.x, e.clientY - this._outsideStart.y) > 8 && this.stopOutsideTap();
77
+ }, this._handleOutsideEnd = () => {
78
+ let e = this._onOutsideTap;
79
+ this.stopOutsideTap(), e?.();
80
+ }, this._handleOutsideCancel = () => {
81
+ this.stopOutsideTap();
82
+ }, e.addController(this);
83
+ }
84
+ hostConnected() {
85
+ this._host.addEventListener("pointerdown", this._handlePointerdown);
86
+ }
87
+ hostDisconnected() {
88
+ this._host.removeEventListener("pointerdown", this._handlePointerdown), document.removeEventListener("pointerup", this._handleRelease, !0), this._pressedItem = null, this.stopOutsideTap();
89
+ }
90
+ trackOutsideTap(e, t) {
91
+ this.stopOutsideTap(), this._outsideStart = {
92
+ x: e.clientX,
93
+ y: e.clientY
94
+ }, this._onOutsideTap = t, document.addEventListener("pointermove", this._handleOutsideMove, !0), document.addEventListener("pointerup", this._handleOutsideEnd, !0), document.addEventListener("pointercancel", this._handleOutsideCancel, !0);
95
+ }
96
+ stopOutsideTap() {
97
+ this._onOutsideTap = null, document.removeEventListener("pointermove", this._handleOutsideMove, !0), document.removeEventListener("pointerup", this._handleOutsideEnd, !0), document.removeEventListener("pointercancel", this._handleOutsideCancel, !0);
98
+ }
99
+ }, k = class {
100
+ constructor(e, t, n, r) {
101
+ this.parent = e, this.opener = t, this.submenu = n, this.drillIn = r, this._homeParent = null, this._homeNextSibling = null, this._handleToggle = (e) => {
102
+ e.newState === "closed" && (this.submenu._drillInHidingForDeeper ? this.submenu._drillInHidingForDeeper = !1 : this._teardown(!0));
103
+ }, this.root = e._rootMenu;
104
+ }
105
+ open() {
106
+ let { parent: e, opener: t, submenu: n, root: r } = this;
107
+ e._activeSubmenu?.hidePopover?.(), n._parentMenu = e, n._parentItem = t, n._chainRoot = r, r._openChain.includes(this) || r._openChain.push(this), this.drillIn ? (n.anchorElement = r._getAnchorEl(), n.placement = r.placement) : (n.anchorElement = t, n.placement = "right-start"), e._activeSubmenu = n, e._activeSubmenuOpener = t, e._activeLevel = this, t._submenuOpen = !0, t.removeAttribute("highlighted"), n.addEventListener("toggle", this._handleToggle), this.drillIn && (this._homeParent = n.parentElement, this._homeNextSibling = n.nextSibling, _(n, this._homeParent), document.body.appendChild(n)), n.showPopover?.(), this.drillIn ? (n._announce(n._t("components.menu.submenu-title", { title: t.text })), e._drillInHidingForDeeper = !0, e.hidePopover?.()) : requestAnimationFrame(() => {
108
+ e._activeSubmenu === n && e._safeTriangle.start(n);
109
+ });
110
+ }
111
+ collapse() {
112
+ this.submenu.removeEventListener("toggle", this._handleToggle), this.submenu.hidePopover?.(), this._teardown(!1);
113
+ }
114
+ _teardown(e) {
115
+ let { parent: t, opener: n, submenu: r, root: i } = this;
116
+ r.removeEventListener("toggle", this._handleToggle), t._activeSubmenu === r && (t._activeSubmenu = null, t._activeSubmenuOpener = null, t._activeLevel = null), r._parentMenu = null, r._parentItem = null, r._chainRoot = null;
117
+ let a = i._openChain.indexOf(this);
118
+ if (a !== -1 && i._openChain.splice(a, 1), n._submenuOpen = !1, this.drillIn && (g(r), this._homeParent?.isConnected ? this._homeParent.insertBefore(r, this._homeNextSibling) : r.remove(), e && t.isConnected)) {
119
+ t.matches(":popover-open") || t.showPopover?.();
120
+ let e = t._parentItem?.text;
121
+ t._announce(e ? t._t("components.menu.submenu-back-action", { title: e }) : t._t("components.menu.back-action"));
122
+ }
123
+ n.hasAttribute("data-focused") || n.removeAttribute("highlighted"), t._safeTriangle.stop(), t.dispatchEvent(new CustomEvent("submenu-close", {
124
+ detail: {
125
+ submenu: r,
126
+ item: n
127
+ },
128
+ bubbles: !0,
129
+ composed: !1
130
+ }));
131
+ }
132
+ };
133
+ function A(e, t) {
134
+ return !!e && !!t && t.x >= e.left && t.x <= e.right && t.y >= e.top && t.y <= e.bottom;
135
+ }
136
+ function j(e, t) {
137
+ let n = !1, r = !1;
138
+ for (let i = 0; i < t.length; i++) {
139
+ let a = t[i], o = t[(i + 1) % t.length], s = (e.x - o.x) * (a.y - o.y) - (a.x - o.x) * (e.y - o.y);
140
+ if (s < 0 && (n = !0), s > 0 && (r = !0), n && r) return !1;
141
+ }
142
+ return !0;
143
+ }
144
+ function M(e, t, n) {
145
+ let r = t.x < n.left ? n.left : n.right;
146
+ return [
147
+ e,
148
+ {
149
+ x: r,
150
+ y: n.top
151
+ },
152
+ {
153
+ x: r,
154
+ y: n.bottom
155
+ }
156
+ ];
157
+ }
158
+ function N(e, t) {
159
+ return {
160
+ x: Math.max(t.left, Math.min(t.right, e.x)) - 4,
161
+ y: e.y > t.bottom ? t.bottom : t.top
162
+ };
163
+ }
164
+ var P = class {
165
+ constructor(e) {
166
+ this._host = e, this.movingToward = !1, this._listener = null, this._stallTimer = null, this._lastPos = null, this._apex = null, this._overlay = null, e.addController(this);
167
+ }
168
+ hostDisconnected() {
169
+ this.stop();
170
+ }
171
+ start(e) {
172
+ this.stop(), this._listener = (t) => this._track({
173
+ x: t.clientX,
174
+ y: t.clientY
175
+ }, e), window.addEventListener("mousemove", this._listener);
176
+ }
177
+ stop() {
178
+ this._listener !== null && (window.removeEventListener("mousemove", this._listener), this._listener = null), this._clearStall(), this._lastPos = null, this._apex = null, this.movingToward = !1, this._removeOverlay();
179
+ }
180
+ _track(e, t) {
181
+ if (this._host.isPointInSubmenus(e, t)) {
182
+ this.movingToward = !1, this._lastPos = e, this._apex = null, this._host.safeTriangleOpener?.removeAttribute("highlighted"), this._removeOverlay();
183
+ return;
184
+ }
185
+ let n = t.getBoundingClientRect(), r = this._host.safeTriangleOpener?.getBoundingClientRect(), i = A(r, e), a = A(r, this._lastPos);
186
+ this._apex !== null && i && (this._apex = null);
187
+ let o = this.movingToward;
188
+ if (this._apex === null) {
189
+ if (i) {
190
+ this.movingToward = !0, this._lastPos = e;
191
+ let t = this._host.safeTriangleOpener;
192
+ t && !t.hasAttribute("highlighted") && this._host.highlightOpener(), this._host.debugSafeTriangle && r && this._drawOverlay(M({
193
+ x: e.x - 4,
194
+ y: e.y
195
+ }, e, n));
196
+ return;
197
+ }
198
+ r && a && (e.y > r.bottom || e.y < r.top) ? (this._apex = N(e, r), this.movingToward = !0) : (this.movingToward = !1, this._lastPos = e, this._removeOverlay(), o && this._host.releaseAt(e));
199
+ } else {
200
+ let t = M(this._apex, e, n);
201
+ this.movingToward = j(e, t), this._host.debugSafeTriangle && this._drawOverlay(t);
202
+ }
203
+ this._lastPos = e;
204
+ let s = this._host.safeTriangleOpener;
205
+ s && this.movingToward && !s.hasAttribute("highlighted") && this._host.highlightOpener(), o && !this.movingToward && this._host.releaseAt(e), this._scheduleStall();
206
+ }
207
+ _clearStall() {
208
+ this._stallTimer !== null && (clearTimeout(this._stallTimer), this._stallTimer = null);
209
+ }
210
+ _scheduleStall() {
211
+ this._clearStall(), this.movingToward && (this._stallTimer = window.setTimeout(() => {
212
+ this._stallTimer = null, this.movingToward = !1, this._apex = null, this._lastPos && this._host.releaseAt(this._lastPos);
213
+ }, 500));
214
+ }
215
+ _drawOverlay(e) {
216
+ let t = "http://www.w3.org/2000/svg";
217
+ if (this._overlay === null) {
218
+ let e = document.createElement("div");
219
+ e.setAttribute("popover", "manual"), e.setAttribute("aria-hidden", "true"), e.style.cssText = "position:fixed;inset:0;width:100vw;height:100vh;pointer-events:none;border:0;padding:0;margin:0;background:transparent;overflow:visible;";
220
+ let n = document.createElementNS(t, "svg");
221
+ n.setAttribute("width", "100%"), n.setAttribute("height", "100%");
222
+ let r = document.createElementNS(t, "polygon");
223
+ r.setAttribute("fill", "rgba(255, 0, 128, 0.15)"), r.setAttribute("stroke", "rgba(255, 0, 128, 0.85)"), r.setAttribute("stroke-width", "1"), n.appendChild(r), e.appendChild(n), document.body.appendChild(e), e.showPopover(), this._overlay = e;
224
+ }
225
+ this._overlay.querySelector("polygon").setAttribute("points", e.map((e) => `${e.x},${e.y}`).join(" "));
226
+ }
227
+ _removeOverlay() {
228
+ this._overlay?.hidePopover?.(), this._overlay?.remove(), this._overlay = null;
229
+ }
230
+ }, F = "a[href],button:not([disabled]),input:not([disabled]):not([type=\"hidden\"]),select:not([disabled]),textarea:not([disabled]),[tabindex]:not([tabindex=\"-1\"]),[contenteditable=\"\"],[contenteditable=\"true\"],details > summary:first-of-type";
231
+ function I(e) {
232
+ return e instanceof HTMLElement && e.matches(F) && e.tabIndex >= 0 && !e.closest("[inert]") && e.getClientRects().length > 0;
233
+ }
234
+ function L(e) {
235
+ if (e instanceof HTMLSlotElement) {
236
+ let t = e.assignedElements({ flatten: !0 });
237
+ return t.length ? t : Array.from(e.children);
238
+ }
239
+ return Array.from((e.shadowRoot ?? e).children);
240
+ }
241
+ function R(e, t) {
242
+ let n = !1, r = (i) => {
243
+ if (i === t) return null;
244
+ if (n && I(i)) return i;
245
+ for (let e of L(i)) {
246
+ let t = r(e);
247
+ if (t) return t;
248
+ }
249
+ return i === e && (n = !0), null;
250
+ };
251
+ return r(document.body);
252
+ }
253
+ // src/components/actions/menu/menu.ts
254
+ var z = /* @__PURE__ */ e({
255
+ NLDDMenu: () => q,
256
+ NLDDMenuDivider: () => b,
257
+ NLDDMenuGroup: () => S,
258
+ NLDDMenuItem: () => x
259
+ }), B, V = (e, t) => {
260
+ let n = e.toLowerCase(), r = t.text.toLowerCase().includes(n), i = t.value !== "" && t.value.toLowerCase().includes(n), a = t.aliases !== "" && t.aliases.split(" ").some((e) => e.toLowerCase().includes(n));
261
+ return r || i || a;
262
+ };
263
+ function H(e) {
264
+ let t = (e.accessibleLabel || e.getAttribute("accessible-label") || e.getAttribute("aria-label") || e.getAttribute("text") || (e.shadowRoot ? "" : e.textContent) || "").trim();
265
+ if (t) return t;
266
+ let n = e.getRootNode();
267
+ return n instanceof ShadowRoot ? H(n.host) : "";
268
+ }
269
+ var U = 500, W = 40, G = .1, K = 150, q = class e extends r {
270
+ constructor(...e) {
271
+ super(...e), this.variant = "menu", this.width = "", this.anchor = "", this.anchorElement = null, this.accessibleLabel = "", this.placement = "bottom-start", this.anchorOffset = 0, this.maxItems = 0, this.emptyText = "", this.emptySupportingText = "", this.translations = {}, this.filterFn = V, this.debugSafeTriangle = !1, this._isEmpty = !1, this._hasHeader = !1, this._hasFooter = !1, this._activeSubmenu = null, this._activeSubmenuOpener = null, this._activeLevel = null, this._drillInHidingForDeeper = !1, this._openChain = [], this._chainRoot = null, this._parentMenu = null, this._parentItem = null, this._isOpen = !1, this._focusReturn = new T(), this._previousAnchorForResync = null, this._collapsedByPointerGesture = !1, this._cleanupAutoUpdate = null, this._announceRaf = 0, this._pendingAnnouncement = "", this._announceResultsTimer = 0, this._resyncAnchorFromPopoverState = () => {
272
+ let e = this.matches(":popover-open");
273
+ e !== this._isOpen && (this._isOpen = e, this._syncAnchorPopupState(e));
274
+ }, this._seededPopupType = null, this._handleDocumentClick = (e) => {
275
+ let t = this._collapsedByPointerGesture;
276
+ if (this._collapsedByPointerGesture = !1, this.anchorElement) return;
277
+ let n = this._getAnchorEl();
278
+ n && e.composedPath().includes(n) && (t || (this._drillInMode && (this._isOpen || this._openChain.length > 0) ? this._collapseChain() : this._isOpen ? this.hidePopover() : this.showPopover()));
279
+ }, this._hoverOpenItem = null, this._hoverOpenTimer = null, this._hoverOpenDeadline = 0, this._lastHoverMove = null, this._safeTriangle = new P(this), this._handleMenuItemMouseenter = (e) => {
280
+ if (m()) return;
281
+ let t = e.target.closest("nldd-menu-item");
282
+ t && this._activateItem(t);
283
+ }, this._handleMouseover = (e) => {
284
+ m() || this.variant === "listbox" || e.composedPath().some((e) => e instanceof Element && e.localName === "nldd-menu-item") || this._safeTriangle.movingToward || this._leaveItems();
285
+ }, this._handleMouseleave = () => {
286
+ this.variant !== "listbox" && this._clearHighlight(), this._cancelHoverOpen();
287
+ }, this._handleHoverMove = (e) => {
288
+ let t = this._hoverOpenItem;
289
+ if (!t || !e.composedPath().includes(t)) return;
290
+ let n = this._lastHoverMove;
291
+ if (this._lastHoverMove = {
292
+ x: e.clientX,
293
+ y: e.clientY,
294
+ t: e.timeStamp
295
+ }, n) {
296
+ let t = e.timeStamp - n.t, r = Math.hypot(e.clientX - n.x, e.clientY - n.y);
297
+ if (t > 0 && r > 0 && r / t < G) {
298
+ this._openHoverItem();
299
+ return;
300
+ }
301
+ }
302
+ this._waitForRest();
303
+ }, this._handleMenuItemFocused = (e) => {
304
+ let t = e.target.closest("nldd-menu-item");
305
+ !t || t.disabled || t.hasAttribute("hidden") || t.closest("nldd-menu") === this && this._setHighlight(t);
306
+ }, this._handleSubmenuOpen = (e) => {
307
+ let { item: t, submenu: n } = e.detail;
308
+ t.closest("nldd-menu") === this && (e.stopPropagation(), this._activeSubmenu !== n && new k(this, t, n, this._drillInMode).open());
309
+ }, this._handleBack = () => {
310
+ this.hidePopover?.();
311
+ }, this._handleBackMouseenter = () => {
312
+ this._clearHighlight();
313
+ }, this._pointer = new O(this), this._openWindowWidth = 0, this._handleWindowResize = () => {
314
+ window.innerWidth !== this._openWindowWidth && this._collapseChain();
315
+ }, this._collapseChain = () => {
316
+ let e = this._chainRoot ?? this, t = e._openChain;
317
+ e._openChain = [];
318
+ for (let e = t.length - 1; e >= 0; e--) t[e].collapse();
319
+ e._isOpen && e.hidePopover?.();
320
+ }, this._handleDocumentPointerdown = (e) => {
321
+ if (!this._isOpen) return;
322
+ if (!this._isSubmenu) {
323
+ let t = this._getAnchorEl(), n = e.composedPath();
324
+ if (t && n.includes(t) && !n.includes(this)) {
325
+ this._collapsedByPointerGesture = !0;
326
+ return;
327
+ }
328
+ }
329
+ if (!this._drillInMode || !this._isSubmenu) return;
330
+ let t = e.composedPath(), n = this;
331
+ for (; n;) {
332
+ if (t.includes(n)) return;
333
+ n = n._parentMenu;
334
+ }
335
+ e.pointerType === "touch" ? this._pointer.trackOutsideTap(e, () => {
336
+ (this._chainRoot ?? this)._collapsedByPointerGesture = !0, this._collapseChain();
337
+ }) : ((this._chainRoot ?? this)._collapsedByPointerGesture = !0, this._collapseChain());
338
+ }, this._handleKeydown = (e) => {
339
+ if (e.key === "Tab" && this._tabOut(e)) return;
340
+ e.key === "Tab" && this.variant === "navigation" && (this._tabbing = !0, clearTimeout(this._tabbingTimer), this._tabbingTimer = setTimeout(() => {
341
+ this._tabbing = !1;
342
+ }));
343
+ let t = this._getVisibleItems();
344
+ if (t.length === 0) return;
345
+ let n = this.querySelector("nldd-menu-item[data-focused]");
346
+ if (n && n.closest("nldd-menu") !== this) return;
347
+ let r = this._getFocusedIndex(t);
348
+ switch (e.key) {
349
+ case "ArrowDown":
350
+ e.preventDefault(), e.stopPropagation(), t[r === -1 ? 0 : r < t.length - 1 ? r + 1 : 0].focus();
351
+ break;
352
+ case "ArrowUp":
353
+ e.preventDefault(), e.stopPropagation(), t[r === -1 ? t.length - 1 : r > 0 ? r - 1 : t.length - 1].focus();
354
+ break;
355
+ case "Home":
356
+ e.preventDefault(), e.stopPropagation(), t[0].focus();
357
+ break;
358
+ case "End":
359
+ e.preventDefault(), e.stopPropagation(), t[t.length - 1].focus();
360
+ break;
361
+ case "ArrowRight": {
362
+ let n = t[r];
363
+ n?._hasSubmenu && (e.preventDefault(), e.stopPropagation(), n._handleClick(), requestAnimationFrame(() => {
364
+ this._activeSubmenu?._getVisibleItems()[0]?.focus();
365
+ }));
366
+ break;
367
+ }
368
+ case "ArrowLeft":
369
+ if (this._isSubmenu) {
370
+ e.preventDefault(), e.stopPropagation();
371
+ let t = this._parentItem;
372
+ this.hidePopover(), t?.focus();
373
+ }
374
+ break;
375
+ case "Escape":
376
+ e.preventDefault(), e.stopPropagation(), this.hidePopover(), (this._isSubmenu ? this._parentItem : this._getAnchorEl())?.focus();
377
+ break;
378
+ default: this.variant === "navigation" || e.key.length !== 1 || e.ctrlKey || e.metaKey || e.altKey || this._handleTypeahead(e, t, r);
379
+ }
380
+ }, this._handleFocusOut = (e) => {
381
+ if (this.variant !== "navigation" || !this.matches(":popover-open")) return;
382
+ let t = e.relatedTarget;
383
+ (t ? this.contains(t) || this._isAnchor(t) : !this._tabbing) || this.hidePopover();
384
+ }, this._tabbing = !1, this._typeaheadBuffer = "", this._typeaheadTimer = null, this._claimItems = () => {
385
+ this.variant === "navigation" && Array.from(this.querySelectorAll("nldd-menu")).forEach((e) => {
386
+ e.variant = "navigation";
387
+ });
388
+ let e = Array.from(this.querySelectorAll("nldd-menu-item"));
389
+ e.forEach((e) => {
390
+ e.menuVariant = this.variant;
391
+ }), Array.from(this.querySelectorAll("nldd-menu-divider, nldd-menu-group")).forEach((e) => {
392
+ e.menuVariant = this.variant;
393
+ });
394
+ let t = e.filter((e) => e.closest("nldd-menu") === this), n = this.variant === "menu" && t.some((e) => e.type === "checkbox" || e.type === "radio");
395
+ t.forEach((e) => {
396
+ e.checkColumn = n;
397
+ });
398
+ }, this._handleBeforeToggle = (e) => {
399
+ e.newState === "open" && (this.removeAttribute("positioned"), this.variant !== "listbox" && !this._isSubmenu && this._focusReturn.remember(this._getAnchorEl()));
400
+ }, this._handleToggle = async (e) => {
401
+ let t = e;
402
+ if (this._isOpen = t.newState === "open", this._syncAnchorPopupState(this._isOpen), t.newState !== "open") {
403
+ this.anchorOffset = 0, this._cleanupAutoUpdate?.(), this._cleanupAutoUpdate = null, window.removeEventListener("resize", this._handleWindowResize), document.removeEventListener("pointerdown", this._handleDocumentPointerdown, !0), this._pointer.stopOutsideTap(), this._clearHighlight(), this._focusReturn.restore(this);
404
+ return;
405
+ }
406
+ this._updateDividerVisibility(), this._clearHighlight(), this._updateEmptyState(), this._claimItems(), await this.reposition(), this.setAttribute("positioned", "");
407
+ let n = this._getAnchorEl();
408
+ if (n && (this._cleanupAutoUpdate = p(n, this, () => this.reposition())), this._openWindowWidth = window.innerWidth, window.addEventListener("resize", this._handleWindowResize, { passive: !0 }), document.addEventListener("pointerdown", this._handleDocumentPointerdown, !0), await this.updateComplete, this.variant !== "listbox") {
409
+ let e = h(), t = this._getVisibleItems();
410
+ if (e && t.length > 0) this._setHighlight(t[0]), t[0].focus();
411
+ else {
412
+ let t = this.shadowRoot?.querySelector(".menu");
413
+ t?.classList.toggle("is-pointer-focus", !e), t?.focus();
414
+ }
415
+ }
416
+ };
417
+ }
418
+ _t(e, t) {
419
+ return s(this.translations, C, e, t);
420
+ }
421
+ get _resolvedEmptyText() {
422
+ return this.emptyText || this._t("components.menu.empty-text");
423
+ }
424
+ get _resolvedBackLabel() {
425
+ let e = this._t("components.menu.back-action"), t = this._parentItem?.text ?? "";
426
+ return t ? `${e}: ${t}` : e;
427
+ }
428
+ _announce(e) {
429
+ if (!e || this._announceRaf && e === this._pendingAnnouncement) return;
430
+ let t = this.shadowRoot?.querySelector(".menu__live-region");
431
+ t && (this._announceRaf && cancelAnimationFrame(this._announceRaf), this._pendingAnnouncement = e, t.textContent = "", this._announceRaf = requestAnimationFrame(() => {
432
+ this._announceRaf = requestAnimationFrame(() => {
433
+ this._announceRaf = 0, this._pendingAnnouncement = "", t.textContent = e;
434
+ });
435
+ }));
436
+ }
437
+ updated(e) {
438
+ if (e.has("anchorOffset") && this._isOpen && this.reposition(), e.has("width") && (this.width ? (this.style.setProperty("--_menu-width", this.width), this.style.setProperty("--_menu-min-width", this.width), this.style.setProperty("--_menu-max-width", this.width)) : (this.style.removeProperty("--_menu-width"), this.style.removeProperty("--_menu-min-width"), this.style.removeProperty("--_menu-max-width"))), e.has("maxItems") && (this.maxItems > 0 ? this.style.setProperty("--_menu-max-items", String(this.maxItems)) : this.style.removeProperty("--_menu-max-items")), e.has("variant") && (this._claimItems(), e.get("variant") !== void 0 && this._syncAnchorPopupState(this._isOpen)), e.has("anchor") || e.has("anchorElement")) {
439
+ this._previousAnchorForResync?.removeEventListener("pointerdown", this._resyncAnchorFromPopoverState, !0);
440
+ let e = this._getAnchorEl();
441
+ e?.addEventListener("pointerdown", this._resyncAnchorFromPopoverState, !0), this._previousAnchorForResync = e, this._syncAnchorPopupState(this._isOpen);
442
+ }
443
+ }
444
+ get _listLabel() {
445
+ if (this.accessibleLabel) return this.accessibleLabel;
446
+ if (this._parentItem?.text) return this._parentItem.text;
447
+ let e = this._getAnchorEl();
448
+ return e ? H(e) : "";
449
+ }
450
+ _shownForInvoker() {
451
+ return this.matches(":popover-open") || this._openChain.length > 0 || this._collapsedByPointerGesture;
452
+ }
453
+ _endInvokerGesture() {
454
+ this._collapsedByPointerGesture = !1;
455
+ }
456
+ _getAnchorEl() {
457
+ return this.anchorElement ? this.anchorElement : this.anchor ? document.getElementById(this.anchor) : null;
458
+ }
459
+ _resolveDrillInPlacement(e) {
460
+ let t = this.placement || "bottom-start", n = t.includes("-") ? t.slice(t.indexOf("-")) : "", r = e.getBoundingClientRect(), i = this._cssPx("--_menu-viewport-margin");
461
+ return `${window.innerHeight - r.bottom - i >= r.top - i ? "bottom" : "top"}${n}`;
462
+ }
463
+ _syncAnchorPopupState(e) {
464
+ let t = this._getAnchorEl();
465
+ if (t) {
466
+ if ("expanded" in t && (t.expanded = e), "popupType" in t && (!t.popupType || t.popupType === this._seededPopupType)) {
467
+ let e = this.variant === "navigation" ? "" : this.variant === "listbox" ? "listbox" : "menu";
468
+ t.popupType = e, this._seededPopupType = e || null;
469
+ }
470
+ "popoverTargetAction" in t && (t.popoverTargetAction = e ? "hide" : "show");
471
+ }
472
+ }
473
+ get safeTriangleOpener() {
474
+ return this._activeSubmenuOpener;
475
+ }
476
+ highlightOpener() {
477
+ this._activeSubmenuOpener && this._setHighlight(this._activeSubmenuOpener);
478
+ }
479
+ isPointInSubmenus(e, t) {
480
+ let n = t;
481
+ for (; n;) {
482
+ if (A(n.getBoundingClientRect(), e)) return !0;
483
+ n = n._activeSubmenu;
484
+ }
485
+ return !1;
486
+ }
487
+ _activateItem(e) {
488
+ e.disabled || e.hasAttribute("hidden") || e.closest("nldd-menu") === this && (this._safeTriangle.movingToward && e !== this._activeSubmenuOpener || (this._setHighlight(e), !this._drillInMode && (this._activeSubmenu && e !== this._activeSubmenuOpener && this._activeSubmenu.hidePopover?.(), this._cancelHoverOpen(), e._hasSubmenu && this._activeSubmenuOpener !== e && this._scheduleHoverOpen(e))));
489
+ }
490
+ releaseAt(e) {
491
+ let t = D(e.x, e.y), n = t?.closest("nldd-menu");
492
+ if (n && n !== this) return;
493
+ let r = t?.closest("nldd-menu-item");
494
+ r ? this._activateItem(r) : this._leaveItems();
495
+ }
496
+ _leaveItems() {
497
+ this._cancelHoverOpen(), this._activeSubmenu?.hidePopover?.(), this.variant !== "listbox" && this._clearHighlight();
498
+ }
499
+ _scheduleHoverOpen(e) {
500
+ this._hoverOpenItem = e, this._hoverOpenDeadline = performance.now() + K, this._waitForRest();
501
+ }
502
+ _waitForRest() {
503
+ this._hoverOpenTimer !== null && clearTimeout(this._hoverOpenTimer);
504
+ let e = Math.min(W, this._hoverOpenDeadline - performance.now());
505
+ this._hoverOpenTimer = window.setTimeout(() => this._openHoverItem(), Math.max(0, e));
506
+ }
507
+ _openHoverItem() {
508
+ let e = this._hoverOpenItem;
509
+ this._cancelHoverOpen(), e?._handleClick();
510
+ }
511
+ _cancelHoverOpen() {
512
+ this._hoverOpenTimer !== null && clearTimeout(this._hoverOpenTimer), this._hoverOpenTimer = null, this._hoverOpenItem = null, this._lastHoverMove = null;
513
+ }
514
+ static _getDrillInModeQuery() {
515
+ return e._drillInModeQuery === null && (e._drillInModeQuery = matchMedia(`(pointer: coarse), (max-width: ${w.smMax})`)), e._drillInModeQuery;
516
+ }
517
+ get _drillInMode() {
518
+ return e._getDrillInModeQuery().matches;
519
+ }
520
+ get _rootMenu() {
521
+ let e = this;
522
+ for (; e._parentMenu;) e = e._parentMenu;
523
+ return e;
524
+ }
525
+ get _isSubmenu() {
526
+ return this._parentMenu !== null;
527
+ }
528
+ get _isMenuOpen() {
529
+ return this._isOpen;
530
+ }
531
+ connectedCallback() {
532
+ super.connectedCallback(), this.id || (this.id = `nldd-menu-${e._menuIdCounter++}`), this.hasAttribute("popover") || this.setAttribute("popover", ""), this.addEventListener("beforetoggle", this._handleBeforeToggle), this.addEventListener("toggle", this._handleToggle), this.addEventListener("keydown", this._handleKeydown), this.addEventListener("focusout", this._handleFocusOut), this.addEventListener("mouseenter", this._handleMenuItemMouseenter, !0), this.addEventListener("mouseover", this._handleMouseover), this.addEventListener("mousemove", this._handleHoverMove), this.addEventListener("mouseleave", this._handleMouseleave), this.addEventListener("menu-item-focused", this._handleMenuItemFocused), this.addEventListener("submenu-open", this._handleSubmenuOpen), this.addEventListener("select", this._collapseChain), document.addEventListener("click", this._handleDocumentClick);
533
+ }
534
+ willUpdate() {
535
+ this.hasUpdated || this._updateEmptyState();
536
+ }
537
+ firstUpdated() {
538
+ queueMicrotask(() => {
539
+ this._onHeaderSlotChange(), this._onFooterSlotChange();
540
+ }), Promise.resolve().then(() => this._syncAnchorPopupState(this._isOpen));
541
+ }
542
+ disconnectedCallback() {
543
+ super.disconnectedCallback(), clearTimeout(this._announceResultsTimer), this._announceResultsTimer = 0, this._activeSubmenu && this._activeSubmenu.hidePopover?.(), this.removeEventListener("beforetoggle", this._handleBeforeToggle), this.removeEventListener("toggle", this._handleToggle), this._previousAnchorForResync?.removeEventListener("pointerdown", this._resyncAnchorFromPopoverState, !0), this._previousAnchorForResync = null, this.removeEventListener("keydown", this._handleKeydown), this.removeEventListener("focusout", this._handleFocusOut), clearTimeout(this._tabbingTimer), this._tabbing = !1, this.removeEventListener("mouseenter", this._handleMenuItemMouseenter, !0), this.removeEventListener("mouseover", this._handleMouseover), this.removeEventListener("mousemove", this._handleHoverMove), this.removeEventListener("mouseleave", this._handleMouseleave), this.removeEventListener("menu-item-focused", this._handleMenuItemFocused), this.removeEventListener("submenu-open", this._handleSubmenuOpen), this.removeEventListener("select", this._collapseChain), document.removeEventListener("click", this._handleDocumentClick), document.removeEventListener("pointerdown", this._handleDocumentPointerdown, !0), this._pointer.stopOutsideTap(), window.removeEventListener("resize", this._handleWindowResize), this._cancelHoverOpen(), this._safeTriangle.stop(), this._typeaheadTimer !== null && (clearTimeout(this._typeaheadTimer), this._typeaheadTimer = null), this._cleanupAutoUpdate?.(), this._cleanupAutoUpdate = null;
544
+ }
545
+ _getVisibleItems() {
546
+ return Array.from(this.querySelectorAll("nldd-menu-item:not([hidden]):not([disabled])")).filter((e) => e.closest("nldd-menu") === this);
547
+ }
548
+ _getFocusedIndex(e) {
549
+ return e.findIndex((e) => e.hasAttribute("data-focused"));
550
+ }
551
+ _clearHighlight() {
552
+ Array.from(this.querySelectorAll("nldd-menu-item")).filter((e) => e.closest("nldd-menu") === this).forEach((e) => e.removeAttribute("highlighted"));
553
+ }
554
+ _setHighlight(e) {
555
+ this._clearHighlight(), (e ?? this._getVisibleItems()[0] ?? null)?.setAttribute("highlighted", "");
556
+ }
557
+ _updateEmptyState() {
558
+ let e = Array.from(this.querySelectorAll("nldd-menu-item:not([hidden])")).filter((e) => e.closest("nldd-menu") === this);
559
+ this._isEmpty = e.length === 0;
560
+ }
561
+ _slotHasContent(e) {
562
+ return ((this.shadowRoot?.querySelector(`slot[name="${e}"]`))?.assignedNodes({ flatten: !0 }) ?? []).some((e) => e.nodeType === Node.ELEMENT_NODE || e.nodeType === Node.TEXT_NODE && (e.textContent?.trim() ?? "") !== "");
563
+ }
564
+ _onHeaderSlotChange() {
565
+ this._hasHeader = this._slotHasContent("header");
566
+ }
567
+ _onFooterSlotChange() {
568
+ this._hasFooter = this._slotHasContent("footer");
569
+ }
570
+ _updateDividerVisibility() {
571
+ let e = Array.from(this.children).filter((e) => !e.hasAttribute("slot"));
572
+ e.forEach((e) => {
573
+ let t = e.tagName.toLowerCase();
574
+ t === "nldd-menu-divider" && e.removeAttribute("hidden"), t === "nldd-menu-group" && (e.removeAttribute("data-no-bottom-divider"), e.removeAttribute("data-no-top-divider"));
575
+ });
576
+ let t = e.filter((e) => !e.hasAttribute("hidden"));
577
+ t.forEach((e, n) => {
578
+ if (e.tagName.toLowerCase() !== "nldd-menu-divider") return;
579
+ let r = t[n - 1]?.tagName.toLowerCase(), i = t[n + 1]?.tagName.toLowerCase(), a = n === 0, o = n === t.length - 1;
580
+ (a || o || r === "nldd-menu-divider" || r === "nldd-menu-group" || i === "nldd-menu-group") && e.setAttribute("hidden", "");
581
+ });
582
+ let n = t.filter((e) => !e.hasAttribute("hidden"));
583
+ n.forEach((e, t) => {
584
+ if (e.tagName.toLowerCase() !== "nldd-menu-group") return;
585
+ t === 0 && e.setAttribute("data-no-top-divider", "");
586
+ let r = n[t + 1]?.tagName.toLowerCase();
587
+ (t === n.length - 1 || r === "nldd-menu-group") && e.setAttribute("data-no-bottom-divider", "");
588
+ });
589
+ }
590
+ filter(e, { hide: t = !0 } = {}) {
591
+ o(this, "filtered", !0), Array.from(this.querySelectorAll("nldd-menu-item")).forEach((n) => {
592
+ let r = !t || !e || this.filterFn(e, n);
593
+ n.toggleAttribute("hidden", !r), n.query = r && e ? e : "";
594
+ }), this._updateGroupVisibility(), this._setHighlight(null), this._updateEmptyState(), this._updateDividerVisibility(), this._isOpen && this.reposition();
595
+ }
596
+ _announceResults() {
597
+ clearTimeout(this._announceResultsTimer), this._announceResultsTimer = window.setTimeout(() => {
598
+ if (this._announceResultsTimer = 0, !this.isConnected || !this.matches(":popover-open")) return;
599
+ let e = Array.from(this.querySelectorAll("nldd-menu-item:not([hidden])")).filter((e) => e.closest("nldd-menu") === this).length, t;
600
+ t = e === 0 ? ((this.shadowRoot?.querySelector("slot[name=\"empty\"]"))?.assignedNodes({ flatten: !0 }) ?? []).map((e) => e.textContent ?? "").join(" ").trim() || this._resolvedEmptyText : e === 1 ? this._t("components.menu.one-result-text") : this._t("components.menu.results-text", { count: e }), this._announce(t);
601
+ }, U);
602
+ }
603
+ _updateGroupVisibility() {
604
+ this.querySelectorAll("nldd-menu-group").forEach((e) => {
605
+ let t = e.querySelectorAll("nldd-menu-item:not([hidden])");
606
+ e.toggleAttribute("hidden", t.length === 0);
607
+ });
608
+ }
609
+ focusItem(e) {
610
+ let t = this._getVisibleItems();
611
+ if (t.length === 0) return;
612
+ let n;
613
+ if (e === "first") n = 0;
614
+ else {
615
+ let r = t.findIndex((e) => e.hasAttribute("highlighted") || e.hasAttribute("data-focused"));
616
+ n = e === "next" ? r === -1 ? 0 : r < t.length - 1 ? r + 1 : 0 : r === -1 ? t.length - 1 : r > 0 ? r - 1 : t.length - 1;
617
+ }
618
+ t.forEach((e) => e.removeAttribute("highlighted")), t[n].setAttribute("highlighted", ""), t[n].focus();
619
+ }
620
+ moveHighlight(e) {
621
+ let t = this._getVisibleItems();
622
+ if (t.length === 0) return;
623
+ let n = t.findIndex((e) => e.hasAttribute("highlighted")), r;
624
+ r = e === "next" ? n === -1 ? 0 : n < t.length - 1 ? n + 1 : 0 : n === -1 ? t.length - 1 : n > 0 ? n - 1 : t.length - 1, t.forEach((e) => e.removeAttribute("highlighted")), t[r].setAttribute("highlighted", ""), t[r].scrollIntoView({
625
+ block: "nearest",
626
+ inline: "nearest"
627
+ });
628
+ }
629
+ getHighlighted() {
630
+ return this.querySelector("nldd-menu-item[highlighted]");
631
+ }
632
+ getHighlightedId() {
633
+ return this.getHighlighted()?.id ?? "";
634
+ }
635
+ _cssPx(e) {
636
+ let t = parseFloat(getComputedStyle(this).getPropertyValue(e));
637
+ return Number.isNaN(t) ? 0 : t;
638
+ }
639
+ async reposition() {
640
+ let e = this._getAnchorEl();
641
+ if (!e || !this._isOpen) return;
642
+ let t = this._cssPx("--_menu-viewport-margin"), n = this._isSubmenu && !this._drillInMode ? this._cssPx("--_menu-padding") : 0, r = this._drillInMode, i = r ? this._resolveDrillInPlacement(e) : this.placement, { x: a, y: o } = await u(e, this, {
643
+ placement: i,
644
+ middleware: [
645
+ l({
646
+ mainAxis: this.anchorOffset,
647
+ alignmentAxis: -n
648
+ }),
649
+ ...r ? [] : [f({ padding: t })],
650
+ c({ padding: t }),
651
+ d({
652
+ padding: t,
653
+ apply: ({ availableHeight: e }) => {
654
+ this.style.setProperty("--_menu-max-height", `${e}px`);
655
+ }
656
+ })
657
+ ]
658
+ });
659
+ Object.assign(this.style, {
660
+ left: `${a}px`,
661
+ top: `${o}px`
662
+ });
663
+ }
664
+ _tabOut(e) {
665
+ let t = this._getAnchorEl();
666
+ if (!t || this._isSubmenu || !this.matches(":popover-open")) return !1;
667
+ let n = this._getVisibleItems(), r = n.findIndex((e) => e.matches(":focus-within"));
668
+ if (r === -1 || r !== (e.shiftKey ? 0 : n.length - 1)) return !1;
669
+ e.preventDefault(), e.stopPropagation();
670
+ let i = e.shiftKey ? t : R(t, this);
671
+ return this.hidePopover(), (i ?? t).focus(), !0;
672
+ }
673
+ _isAnchor(e) {
674
+ let t = this._getAnchorEl();
675
+ return t ? e === t || t.contains(e) || t.getRootNode().host === e : !1;
676
+ }
677
+ _handleTypeahead(t, n, r) {
678
+ this._typeaheadTimer !== null && clearTimeout(this._typeaheadTimer), this._typeaheadBuffer += t.key.toLowerCase(), this._typeaheadTimer = window.setTimeout(() => {
679
+ this._typeaheadBuffer = "", this._typeaheadTimer = null;
680
+ }, e._TYPEAHEAD_RESET_MS);
681
+ let i = this._typeaheadBuffer.length === 1 && r >= 0 ? r + 1 : Math.max(0, r);
682
+ for (let e = 0; e < n.length; e++) {
683
+ let r = (i + e) % n.length;
684
+ if (n[r].text.toLowerCase().startsWith(this._typeaheadBuffer)) {
685
+ t.preventDefault(), t.stopPropagation(), n[r].focus();
686
+ return;
687
+ }
688
+ }
689
+ }
690
+ render() {
691
+ return y.call(this, this._isEmpty, this.variant);
692
+ }
693
+ };
694
+ B = q, B.styles = v, B._drillInModeQuery = null, B._menuIdCounter = 0, B._TYPEAHEAD_RESET_MS = 500, i([t({
695
+ reflect: !0,
696
+ converter: a("menu")
697
+ })], q.prototype, "variant", void 0), i([t({ type: String })], q.prototype, "width", void 0), i([t({
698
+ reflect: !0,
699
+ converter: a("")
700
+ })], q.prototype, "anchor", void 0), i([t({ attribute: !1 })], q.prototype, "anchorElement", void 0), i([t({ attribute: "accessible-label" })], q.prototype, "accessibleLabel", void 0), i([t({
701
+ reflect: !0,
702
+ converter: a("bottom-start")
703
+ })], q.prototype, "placement", void 0), i([t({ attribute: !1 })], q.prototype, "anchorOffset", void 0), i([t({
704
+ type: Number,
705
+ attribute: "max-items"
706
+ })], q.prototype, "maxItems", void 0), i([t({
707
+ reflect: !0,
708
+ attribute: "empty-text",
709
+ converter: a("")
710
+ })], q.prototype, "emptyText", void 0), i([t({
711
+ reflect: !0,
712
+ attribute: "empty-supporting-text",
713
+ converter: a("")
714
+ })], q.prototype, "emptySupportingText", void 0), i([t({ type: Object })], q.prototype, "translations", void 0), i([t({ attribute: !1 })], q.prototype, "filterFn", void 0), i([t({
715
+ type: Boolean,
716
+ reflect: !0,
717
+ attribute: "debug-safe-triangle"
718
+ })], q.prototype, "debugSafeTriangle", void 0), i([n()], q.prototype, "_isEmpty", void 0), i([n()], q.prototype, "_hasHeader", void 0), i([n()], q.prototype, "_hasFooter", void 0), i([n()], q.prototype, "_parentItem", void 0), customElements.get("nldd-menu") || customElements.define("nldd-menu", q);
719
+ export { z as t };