@m3e/core 1.0.0-rc.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 (357) hide show
  1. package/LICENSE +22 -0
  2. package/NOTICE.md +8 -0
  3. package/README.md +59 -0
  4. package/cem.config.mjs +16 -0
  5. package/demo/index.html +58 -0
  6. package/dist/a11y.js +1431 -0
  7. package/dist/a11y.js.map +1 -0
  8. package/dist/a11y.min.js +87 -0
  9. package/dist/a11y.min.js.map +1 -0
  10. package/dist/anchoring.js +1748 -0
  11. package/dist/anchoring.js.map +1 -0
  12. package/dist/anchoring.min.js +7 -0
  13. package/dist/anchoring.min.js.map +1 -0
  14. package/dist/bidi.js +106 -0
  15. package/dist/bidi.js.map +1 -0
  16. package/dist/bidi.min.js +16 -0
  17. package/dist/bidi.min.js.map +1 -0
  18. package/dist/css-custom-data.json +257 -0
  19. package/dist/custom-elements.json +13504 -0
  20. package/dist/html-custom-data.json +199 -0
  21. package/dist/index.js +4342 -0
  22. package/dist/index.js.map +1 -0
  23. package/dist/index.min.js +520 -0
  24. package/dist/index.min.js.map +1 -0
  25. package/dist/layout.js +64 -0
  26. package/dist/layout.js.map +1 -0
  27. package/dist/layout.min.js +15 -0
  28. package/dist/layout.min.js.map +1 -0
  29. package/dist/platform.js +56 -0
  30. package/dist/platform.js.map +1 -0
  31. package/dist/platform.min.js +15 -0
  32. package/dist/platform.min.js.map +1 -0
  33. package/dist/src/a11y/AriaDescriber.d.ts +31 -0
  34. package/dist/src/a11y/AriaDescriber.d.ts.map +1 -0
  35. package/dist/src/a11y/FocusTrapElement.d.ts +25 -0
  36. package/dist/src/a11y/FocusTrapElement.d.ts.map +1 -0
  37. package/dist/src/a11y/InteractivityChecker.d.ts +22 -0
  38. package/dist/src/a11y/InteractivityChecker.d.ts.map +1 -0
  39. package/dist/src/a11y/LiveAnnouncer.d.ts +56 -0
  40. package/dist/src/a11y/LiveAnnouncer.d.ts.map +1 -0
  41. package/dist/src/a11y/aria-reference.d.ts +30 -0
  42. package/dist/src/a11y/aria-reference.d.ts.map +1 -0
  43. package/dist/src/a11y/index.d.ts +8 -0
  44. package/dist/src/a11y/index.d.ts.map +1 -0
  45. package/dist/src/a11y/keycodes/KeyCode.d.ts +118 -0
  46. package/dist/src/a11y/keycodes/KeyCode.d.ts.map +1 -0
  47. package/dist/src/a11y/keycodes/ModifierKeys.d.ts +5 -0
  48. package/dist/src/a11y/keycodes/ModifierKeys.d.ts.map +1 -0
  49. package/dist/src/a11y/keycodes/getKeyCode.d.ts +7 -0
  50. package/dist/src/a11y/keycodes/getKeyCode.d.ts.map +1 -0
  51. package/dist/src/a11y/keycodes/hasModifierKey.d.ts +9 -0
  52. package/dist/src/a11y/keycodes/hasModifierKey.d.ts.map +1 -0
  53. package/dist/src/a11y/keycodes/index.d.ts +6 -0
  54. package/dist/src/a11y/keycodes/index.d.ts.map +1 -0
  55. package/dist/src/a11y/keycodes/isModifierAllowed.d.ts +9 -0
  56. package/dist/src/a11y/keycodes/isModifierAllowed.d.ts.map +1 -0
  57. package/dist/src/a11y/list-key/FocusKeyManager.d.ts +17 -0
  58. package/dist/src/a11y/list-key/FocusKeyManager.d.ts.map +1 -0
  59. package/dist/src/a11y/list-key/ListKeyManager.d.ts +114 -0
  60. package/dist/src/a11y/list-key/ListKeyManager.d.ts.map +1 -0
  61. package/dist/src/a11y/list-key/ListManager.d.ts +37 -0
  62. package/dist/src/a11y/list-key/ListManager.d.ts.map +1 -0
  63. package/dist/src/a11y/list-key/RadioKeyManager.d.ts +20 -0
  64. package/dist/src/a11y/list-key/RadioKeyManager.d.ts.map +1 -0
  65. package/dist/src/a11y/list-key/RovingTabIndexManager.d.ts +22 -0
  66. package/dist/src/a11y/list-key/RovingTabIndexManager.d.ts.map +1 -0
  67. package/dist/src/a11y/list-key/SelectionManager.d.ts +46 -0
  68. package/dist/src/a11y/list-key/SelectionManager.d.ts.map +1 -0
  69. package/dist/src/a11y/list-key/Typeahead.d.ts +64 -0
  70. package/dist/src/a11y/list-key/Typeahead.d.ts.map +1 -0
  71. package/dist/src/a11y/list-key/index.d.ts +8 -0
  72. package/dist/src/a11y/list-key/index.d.ts.map +1 -0
  73. package/dist/src/a11y/visuallyHide.d.ts +6 -0
  74. package/dist/src/a11y/visuallyHide.d.ts.map +1 -0
  75. package/dist/src/anchoring/AnchorOptions.d.ts +15 -0
  76. package/dist/src/anchoring/AnchorOptions.d.ts.map +1 -0
  77. package/dist/src/anchoring/AnchorPosition.d.ts +3 -0
  78. package/dist/src/anchoring/AnchorPosition.d.ts.map +1 -0
  79. package/dist/src/anchoring/index.d.ts +4 -0
  80. package/dist/src/anchoring/index.d.ts.map +1 -0
  81. package/dist/src/anchoring/positionAnchor.d.ts +12 -0
  82. package/dist/src/anchoring/positionAnchor.d.ts.map +1 -0
  83. package/dist/src/bidi/Directionality.d.ts +27 -0
  84. package/dist/src/bidi/Directionality.d.ts.map +1 -0
  85. package/dist/src/bidi/index.d.ts +2 -0
  86. package/dist/src/bidi/index.d.ts.map +1 -0
  87. package/dist/src/index.d.ts +2 -0
  88. package/dist/src/index.d.ts.map +1 -0
  89. package/dist/src/layout/Breakpoint.d.ts +26 -0
  90. package/dist/src/layout/Breakpoint.d.ts.map +1 -0
  91. package/dist/src/layout/BreakpointObserver.d.ts +18 -0
  92. package/dist/src/layout/BreakpointObserver.d.ts.map +1 -0
  93. package/dist/src/layout/index.d.ts +3 -0
  94. package/dist/src/layout/index.d.ts.map +1 -0
  95. package/dist/src/platform/Platform.d.ts +34 -0
  96. package/dist/src/platform/Platform.d.ts.map +1 -0
  97. package/dist/src/platform/index.d.ts +2 -0
  98. package/dist/src/platform/index.d.ts.map +1 -0
  99. package/dist/src/shared/controllers/FocusController.d.ts +30 -0
  100. package/dist/src/shared/controllers/FocusController.d.ts.map +1 -0
  101. package/dist/src/shared/controllers/HoverController.d.ts +40 -0
  102. package/dist/src/shared/controllers/HoverController.d.ts.map +1 -0
  103. package/dist/src/shared/controllers/IntersectionController.d.ts +40 -0
  104. package/dist/src/shared/controllers/IntersectionController.d.ts.map +1 -0
  105. package/dist/src/shared/controllers/LongPressController.d.ts +32 -0
  106. package/dist/src/shared/controllers/LongPressController.d.ts.map +1 -0
  107. package/dist/src/shared/controllers/MonitorControllerBase.d.ts +62 -0
  108. package/dist/src/shared/controllers/MonitorControllerBase.d.ts.map +1 -0
  109. package/dist/src/shared/controllers/MutationController.d.ts +37 -0
  110. package/dist/src/shared/controllers/MutationController.d.ts.map +1 -0
  111. package/dist/src/shared/controllers/PressedController.d.ts +45 -0
  112. package/dist/src/shared/controllers/PressedController.d.ts.map +1 -0
  113. package/dist/src/shared/controllers/ResizeController.d.ts +40 -0
  114. package/dist/src/shared/controllers/ResizeController.d.ts.map +1 -0
  115. package/dist/src/shared/controllers/ScrollController.d.ts +34 -0
  116. package/dist/src/shared/controllers/ScrollController.d.ts.map +1 -0
  117. package/dist/src/shared/controllers/index.d.ts +9 -0
  118. package/dist/src/shared/controllers/index.d.ts.map +1 -0
  119. package/dist/src/shared/decorators/debounce.d.ts +7 -0
  120. package/dist/src/shared/decorators/debounce.d.ts.map +1 -0
  121. package/dist/src/shared/decorators/index.d.ts +2 -0
  122. package/dist/src/shared/decorators/index.d.ts.map +1 -0
  123. package/dist/src/shared/directives/index.d.ts +2 -0
  124. package/dist/src/shared/directives/index.d.ts.map +1 -0
  125. package/dist/src/shared/directives/safeStyleMap.d.ts +44 -0
  126. package/dist/src/shared/directives/safeStyleMap.d.ts.map +1 -0
  127. package/dist/src/shared/index.d.ts +8 -0
  128. package/dist/src/shared/index.d.ts.map +1 -0
  129. package/dist/src/shared/mixins/AttachInternals.d.ts +24 -0
  130. package/dist/src/shared/mixins/AttachInternals.d.ts.map +1 -0
  131. package/dist/src/shared/mixins/Checked.d.ts +24 -0
  132. package/dist/src/shared/mixins/Checked.d.ts.map +1 -0
  133. package/dist/src/shared/mixins/CheckedIndeterminate.d.ts +25 -0
  134. package/dist/src/shared/mixins/CheckedIndeterminate.d.ts.map +1 -0
  135. package/dist/src/shared/mixins/CheckedOrSelected.d.ts +23 -0
  136. package/dist/src/shared/mixins/CheckedOrSelected.d.ts.map +1 -0
  137. package/dist/src/shared/mixins/ConstraintValidation.d.ts +48 -0
  138. package/dist/src/shared/mixins/ConstraintValidation.d.ts.map +1 -0
  139. package/dist/src/shared/mixins/Constructor.d.ts +3 -0
  140. package/dist/src/shared/mixins/Constructor.d.ts.map +1 -0
  141. package/dist/src/shared/mixins/Dirty.d.ts +27 -0
  142. package/dist/src/shared/mixins/Dirty.d.ts.map +1 -0
  143. package/dist/src/shared/mixins/Disabled.d.ts +25 -0
  144. package/dist/src/shared/mixins/Disabled.d.ts.map +1 -0
  145. package/dist/src/shared/mixins/DisabledInteractive.d.ts +25 -0
  146. package/dist/src/shared/mixins/DisabledInteractive.d.ts.map +1 -0
  147. package/dist/src/shared/mixins/EventAttribute.d.ts +11 -0
  148. package/dist/src/shared/mixins/EventAttribute.d.ts.map +1 -0
  149. package/dist/src/shared/mixins/Focusable.d.ts +11 -0
  150. package/dist/src/shared/mixins/Focusable.d.ts.map +1 -0
  151. package/dist/src/shared/mixins/FormAssociated.d.ts +34 -0
  152. package/dist/src/shared/mixins/FormAssociated.d.ts.map +1 -0
  153. package/dist/src/shared/mixins/FormSubmitter.d.ts +31 -0
  154. package/dist/src/shared/mixins/FormSubmitter.d.ts.map +1 -0
  155. package/dist/src/shared/mixins/HtmlFor.d.ts +30 -0
  156. package/dist/src/shared/mixins/HtmlFor.d.ts.map +1 -0
  157. package/dist/src/shared/mixins/KeyboardClick.d.ts +11 -0
  158. package/dist/src/shared/mixins/KeyboardClick.d.ts.map +1 -0
  159. package/dist/src/shared/mixins/Labelled.d.ts +22 -0
  160. package/dist/src/shared/mixins/Labelled.d.ts.map +1 -0
  161. package/dist/src/shared/mixins/LinkButton.d.ts +36 -0
  162. package/dist/src/shared/mixins/LinkButton.d.ts.map +1 -0
  163. package/dist/src/shared/mixins/ReadOnly.d.ts +25 -0
  164. package/dist/src/shared/mixins/ReadOnly.d.ts.map +1 -0
  165. package/dist/src/shared/mixins/Required.d.ts +26 -0
  166. package/dist/src/shared/mixins/Required.d.ts.map +1 -0
  167. package/dist/src/shared/mixins/RequiredConstraintValidation.d.ts +21 -0
  168. package/dist/src/shared/mixins/RequiredConstraintValidation.d.ts.map +1 -0
  169. package/dist/src/shared/mixins/Role.d.ts +13 -0
  170. package/dist/src/shared/mixins/Role.d.ts.map +1 -0
  171. package/dist/src/shared/mixins/Selected.d.ts +24 -0
  172. package/dist/src/shared/mixins/Selected.d.ts.map +1 -0
  173. package/dist/src/shared/mixins/Touched.d.ts +27 -0
  174. package/dist/src/shared/mixins/Touched.d.ts.map +1 -0
  175. package/dist/src/shared/mixins/Vertical.d.ts +24 -0
  176. package/dist/src/shared/mixins/Vertical.d.ts.map +1 -0
  177. package/dist/src/shared/mixins/hasKeys.d.ts +9 -0
  178. package/dist/src/shared/mixins/hasKeys.d.ts.map +1 -0
  179. package/dist/src/shared/mixins/index.d.ts +25 -0
  180. package/dist/src/shared/mixins/index.d.ts.map +1 -0
  181. package/dist/src/shared/primitives/CollapsibleElement.d.ts +58 -0
  182. package/dist/src/shared/primitives/CollapsibleElement.d.ts.map +1 -0
  183. package/dist/src/shared/primitives/ElevationElement.d.ts +88 -0
  184. package/dist/src/shared/primitives/ElevationElement.d.ts.map +1 -0
  185. package/dist/src/shared/primitives/ElevationLevel.d.ts +3 -0
  186. package/dist/src/shared/primitives/ElevationLevel.d.ts.map +1 -0
  187. package/dist/src/shared/primitives/ElevationToken.d.ts +15 -0
  188. package/dist/src/shared/primitives/ElevationToken.d.ts.map +1 -0
  189. package/dist/src/shared/primitives/FocusRingElement.d.ts +78 -0
  190. package/dist/src/shared/primitives/FocusRingElement.d.ts.map +1 -0
  191. package/dist/src/shared/primitives/FocusRingToken.d.ts +17 -0
  192. package/dist/src/shared/primitives/FocusRingToken.d.ts.map +1 -0
  193. package/dist/src/shared/primitives/PseudoCheckboxElement.d.ts +50 -0
  194. package/dist/src/shared/primitives/PseudoCheckboxElement.d.ts.map +1 -0
  195. package/dist/src/shared/primitives/PseudoRadioElement.d.ts +41 -0
  196. package/dist/src/shared/primitives/PseudoRadioElement.d.ts.map +1 -0
  197. package/dist/src/shared/primitives/RippleElement.d.ts +110 -0
  198. package/dist/src/shared/primitives/RippleElement.d.ts.map +1 -0
  199. package/dist/src/shared/primitives/RippleToken.d.ts +12 -0
  200. package/dist/src/shared/primitives/RippleToken.d.ts.map +1 -0
  201. package/dist/src/shared/primitives/ScrollContainerElement.d.ts +64 -0
  202. package/dist/src/shared/primitives/ScrollContainerElement.d.ts.map +1 -0
  203. package/dist/src/shared/primitives/ScrollDividers.d.ts +3 -0
  204. package/dist/src/shared/primitives/ScrollDividers.d.ts.map +1 -0
  205. package/dist/src/shared/primitives/SlideElement.d.ts +48 -0
  206. package/dist/src/shared/primitives/SlideElement.d.ts.map +1 -0
  207. package/dist/src/shared/primitives/StateLayerElement.d.ts +77 -0
  208. package/dist/src/shared/primitives/StateLayerElement.d.ts.map +1 -0
  209. package/dist/src/shared/primitives/StateLayerToken.d.ts +13 -0
  210. package/dist/src/shared/primitives/StateLayerToken.d.ts.map +1 -0
  211. package/dist/src/shared/primitives/TextOverflowElement.d.ts +39 -0
  212. package/dist/src/shared/primitives/TextOverflowElement.d.ts.map +1 -0
  213. package/dist/src/shared/primitives/index.d.ts +13 -0
  214. package/dist/src/shared/primitives/index.d.ts.map +1 -0
  215. package/dist/src/shared/tokens/ColorToken.d.ts +96 -0
  216. package/dist/src/shared/tokens/ColorToken.d.ts.map +1 -0
  217. package/dist/src/shared/tokens/DensityToken.d.ts +15 -0
  218. package/dist/src/shared/tokens/DensityToken.d.ts.map +1 -0
  219. package/dist/src/shared/tokens/DesignToken.d.ts +366 -0
  220. package/dist/src/shared/tokens/DesignToken.d.ts.map +1 -0
  221. package/dist/src/shared/tokens/ElevationToken.d.ts +16 -0
  222. package/dist/src/shared/tokens/ElevationToken.d.ts.map +1 -0
  223. package/dist/src/shared/tokens/MotionToken.d.ts +69 -0
  224. package/dist/src/shared/tokens/MotionToken.d.ts.map +1 -0
  225. package/dist/src/shared/tokens/ScrollbarToken.d.ts +10 -0
  226. package/dist/src/shared/tokens/ScrollbarToken.d.ts.map +1 -0
  227. package/dist/src/shared/tokens/ShapeToken.d.ts +79 -0
  228. package/dist/src/shared/tokens/ShapeToken.d.ts.map +1 -0
  229. package/dist/src/shared/tokens/StateToken.d.ts +10 -0
  230. package/dist/src/shared/tokens/StateToken.d.ts.map +1 -0
  231. package/dist/src/shared/tokens/TypescaleToken.d.ts +220 -0
  232. package/dist/src/shared/tokens/TypescaleToken.d.ts.map +1 -0
  233. package/dist/src/shared/tokens/index.d.ts +2 -0
  234. package/dist/src/shared/tokens/index.d.ts.map +1 -0
  235. package/dist/src/shared/utils/getTextContent.d.ts +8 -0
  236. package/dist/src/shared/utils/getTextContent.d.ts.map +1 -0
  237. package/dist/src/shared/utils/guid.d.ts +6 -0
  238. package/dist/src/shared/utils/guid.d.ts.map +1 -0
  239. package/dist/src/shared/utils/hasAssignedNodes.d.ts +7 -0
  240. package/dist/src/shared/utils/hasAssignedNodes.d.ts.map +1 -0
  241. package/dist/src/shared/utils/index.d.ts +6 -0
  242. package/dist/src/shared/utils/index.d.ts.map +1 -0
  243. package/dist/src/shared/utils/prefersReducedMotion.d.ts +6 -0
  244. package/dist/src/shared/utils/prefersReducedMotion.d.ts.map +1 -0
  245. package/dist/src/shared/utils/scrollIntoViewIfNeeded.d.ts +8 -0
  246. package/dist/src/shared/utils/scrollIntoViewIfNeeded.d.ts.map +1 -0
  247. package/eslint.config.mjs +21 -0
  248. package/package.json +87 -0
  249. package/rollup.config.js +132 -0
  250. package/src/a11y/AriaDescriber.ts +130 -0
  251. package/src/a11y/FocusTrapElement.ts +136 -0
  252. package/src/a11y/InteractivityChecker.ts +62 -0
  253. package/src/a11y/LiveAnnouncer.ts +143 -0
  254. package/src/a11y/aria-reference.ts +51 -0
  255. package/src/a11y/index.ts +8 -0
  256. package/src/a11y/keycodes/KeyCode.ts +128 -0
  257. package/src/a11y/keycodes/ModifierKeys.ts +5 -0
  258. package/src/a11y/keycodes/getKeyCode.ts +8 -0
  259. package/src/a11y/keycodes/hasModifierKey.ts +11 -0
  260. package/src/a11y/keycodes/index.ts +5 -0
  261. package/src/a11y/keycodes/isModifierAllowed.ts +12 -0
  262. package/src/a11y/list-key/FocusKeyManager.ts +25 -0
  263. package/src/a11y/list-key/ListKeyManager.ts +350 -0
  264. package/src/a11y/list-key/ListManager.ts +66 -0
  265. package/src/a11y/list-key/RadioKeyManager.ts +49 -0
  266. package/src/a11y/list-key/RovingTabIndexManager.ts +56 -0
  267. package/src/a11y/list-key/SelectionManager.ts +132 -0
  268. package/src/a11y/list-key/Typeahead.ts +131 -0
  269. package/src/a11y/list-key/index.ts +7 -0
  270. package/src/a11y/visuallyHide.ts +18 -0
  271. package/src/anchoring/AnchorOptions.ts +19 -0
  272. package/src/anchoring/AnchorPosition.ts +14 -0
  273. package/src/anchoring/index.ts +3 -0
  274. package/src/anchoring/positionAnchor.ts +53 -0
  275. package/src/bidi/Directionality.ts +85 -0
  276. package/src/bidi/index.ts +1 -0
  277. package/src/index.ts +1 -0
  278. package/src/layout/Breakpoint.ts +26 -0
  279. package/src/layout/BreakpointObserver.ts +44 -0
  280. package/src/layout/index.ts +2 -0
  281. package/src/platform/Platform.ts +67 -0
  282. package/src/platform/index.ts +1 -0
  283. package/src/shared/controllers/FocusController.ts +60 -0
  284. package/src/shared/controllers/HoverController.ts +140 -0
  285. package/src/shared/controllers/IntersectionController.ts +81 -0
  286. package/src/shared/controllers/LongPressController.ts +87 -0
  287. package/src/shared/controllers/MonitorControllerBase.ts +99 -0
  288. package/src/shared/controllers/MutationController.ts +89 -0
  289. package/src/shared/controllers/PressedController.ts +137 -0
  290. package/src/shared/controllers/ResizeController.ts +83 -0
  291. package/src/shared/controllers/ScrollController.ts +100 -0
  292. package/src/shared/controllers/index.ts +8 -0
  293. package/src/shared/decorators/debounce.ts +19 -0
  294. package/src/shared/decorators/index.ts +1 -0
  295. package/src/shared/directives/index.ts +1 -0
  296. package/src/shared/directives/safeStyleMap.ts +108 -0
  297. package/src/shared/index.ts +7 -0
  298. package/src/shared/mixins/AttachInternals.ts +48 -0
  299. package/src/shared/mixins/Checked.ts +50 -0
  300. package/src/shared/mixins/CheckedIndeterminate.ts +47 -0
  301. package/src/shared/mixins/CheckedOrSelected.ts +36 -0
  302. package/src/shared/mixins/ConstraintValidation.ts +213 -0
  303. package/src/shared/mixins/Constructor.ts +2 -0
  304. package/src/shared/mixins/Dirty.ts +71 -0
  305. package/src/shared/mixins/Disabled.ts +49 -0
  306. package/src/shared/mixins/DisabledInteractive.ts +78 -0
  307. package/src/shared/mixins/EventAttribute.ts +25 -0
  308. package/src/shared/mixins/Focusable.ts +52 -0
  309. package/src/shared/mixins/FormAssociated.ts +152 -0
  310. package/src/shared/mixins/FormSubmitter.ts +123 -0
  311. package/src/shared/mixins/HtmlFor.ts +89 -0
  312. package/src/shared/mixins/KeyboardClick.ts +46 -0
  313. package/src/shared/mixins/Labelled.ts +88 -0
  314. package/src/shared/mixins/LinkButton.ts +169 -0
  315. package/src/shared/mixins/ReadOnly.ts +48 -0
  316. package/src/shared/mixins/Required.ts +50 -0
  317. package/src/shared/mixins/RequiredConstraintValidation.ts +45 -0
  318. package/src/shared/mixins/Role.ts +134 -0
  319. package/src/shared/mixins/Selected.ts +50 -0
  320. package/src/shared/mixins/Touched.ts +71 -0
  321. package/src/shared/mixins/Vertical.ts +44 -0
  322. package/src/shared/mixins/hasKeys.ts +10 -0
  323. package/src/shared/mixins/index.ts +24 -0
  324. package/src/shared/primitives/CollapsibleElement.ts +227 -0
  325. package/src/shared/primitives/ElevationElement.ts +254 -0
  326. package/src/shared/primitives/ElevationLevel.ts +2 -0
  327. package/src/shared/primitives/ElevationToken.ts +18 -0
  328. package/src/shared/primitives/FocusRingElement.ts +199 -0
  329. package/src/shared/primitives/FocusRingToken.ts +24 -0
  330. package/src/shared/primitives/PseudoCheckboxElement.ts +116 -0
  331. package/src/shared/primitives/PseudoRadioElement.ts +83 -0
  332. package/src/shared/primitives/RippleElement.ts +289 -0
  333. package/src/shared/primitives/RippleToken.ts +15 -0
  334. package/src/shared/primitives/ScrollContainerElement.ts +151 -0
  335. package/src/shared/primitives/ScrollDividers.ts +2 -0
  336. package/src/shared/primitives/SlideElement.ts +128 -0
  337. package/src/shared/primitives/StateLayerElement.ts +191 -0
  338. package/src/shared/primitives/StateLayerToken.ts +16 -0
  339. package/src/shared/primitives/TextOverflowElement.ts +60 -0
  340. package/src/shared/primitives/index.ts +12 -0
  341. package/src/shared/tokens/ColorToken.ts +142 -0
  342. package/src/shared/tokens/DensityToken.ts +23 -0
  343. package/src/shared/tokens/DesignToken.ts +35 -0
  344. package/src/shared/tokens/ElevationToken.ts +115 -0
  345. package/src/shared/tokens/MotionToken.ts +107 -0
  346. package/src/shared/tokens/ScrollbarToken.ts +13 -0
  347. package/src/shared/tokens/ShapeToken.ts +138 -0
  348. package/src/shared/tokens/StateToken.ts +13 -0
  349. package/src/shared/tokens/TypescaleToken.ts +230 -0
  350. package/src/shared/tokens/index.ts +1 -0
  351. package/src/shared/utils/getTextContent.ts +31 -0
  352. package/src/shared/utils/guid.ts +11 -0
  353. package/src/shared/utils/hasAssignedNodes.ts +8 -0
  354. package/src/shared/utils/index.ts +5 -0
  355. package/src/shared/utils/prefersReducedMotion.ts +9 -0
  356. package/src/shared/utils/scrollIntoViewIfNeeded.ts +18 -0
  357. package/tsconfig.json +9 -0
package/dist/layout.js ADDED
@@ -0,0 +1,64 @@
1
+ /**
2
+ * @license MIT
3
+ * Copyright (c) 2025 matraic
4
+ * See LICENSE file in the project root for full license text.
5
+ */
6
+ import { isServer } from 'lit';
7
+
8
+ /**
9
+ * Adapted from Angular Material CDK Breakpoints
10
+ * Source: https://github.com/angular/components/blob/main/src/cdk/layout/breakpoints.ts
11
+ *
12
+ * @license MIT
13
+ * Copyright (c) 2025 Google LLC
14
+ * See LICENSE file in the project root for full license text.
15
+ */
16
+ /** Specifies predefined breakpoints. */
17
+ var Breakpoint;
18
+ (function (Breakpoint) {
19
+ Breakpoint["XSmall"] = "(max-width: 599.98px)";
20
+ Breakpoint["Small"] = "(min-width: 600px) and (max-width: 959.98px)";
21
+ Breakpoint["Medium"] = "(min-width: 960px) and (max-width: 1279.98px)";
22
+ Breakpoint["Large"] = "(min-width: 1280px) and (max-width: 1919.98px)";
23
+ Breakpoint["XLarge"] = "(min-width: 1920px)";
24
+ Breakpoint["Handset"] = "(max-width: 599.98px) and (orientation: portrait), (max-width: 959.98px) and (orientation: landscape)";
25
+ Breakpoint["Tablet"] = "(min-width: 600px) and (max-width: 839.98px) and (orientation: portrait), (min-width: 960px) and (max-width: 1279.98px) and (orientation: landscape)";
26
+ Breakpoint["Web"] = "(min-width: 840px) and (orientation: portrait), (min-width: 1280px) and (orientation: landscape)";
27
+ Breakpoint["HandsetPortrait"] = "(max-width: 599.98px) and (orientation: portrait)";
28
+ Breakpoint["TabletPortrait"] = "(min-width: 600px) and (max-width: 839.98px) and (orientation: portrait)";
29
+ Breakpoint["WebPortrait"] = "(min-width: 840px) and (orientation: portrait)";
30
+ Breakpoint["HandsetLandscape"] = "(max-width: 959.98px) and (orientation: landscape)";
31
+ Breakpoint["TabletLandscape"] = "(min-width: 960px) and (max-width: 1279.98px) and (orientation: landscape)";
32
+ Breakpoint["WebLandscape"] = "(min-width: 1280px) and (orientation: landscape)";
33
+ })(Breakpoint || (Breakpoint = {}));
34
+
35
+ /** Utility used to detect changes to viewport sizes. */
36
+ class M3eBreakpointObserver {
37
+ /**
38
+ * Observes changes to viewport sizes.
39
+ * @param {Array<Breakpoint | string>} breakpoints The breakpoints to observe.
40
+ * @param {BreakpointObserverCallback} callback The callback function invoked when the viewport size changes.
41
+ * @returns {() => void} A function used to stop observing changes to viewport sizes.
42
+ */
43
+ static observe(breakpoints, callback) {
44
+ if (isServer || breakpoints.length == 0) {
45
+ return () => { };
46
+ }
47
+ const mediaQueries = breakpoints.map((x) => matchMedia(x));
48
+ const changeHandler = () => {
49
+ const map = new Map();
50
+ breakpoints.forEach((x, i) => map.set(x, mediaQueries[i].matches));
51
+ callback(map);
52
+ };
53
+ mediaQueries.forEach((x) => x.addEventListener("change", changeHandler));
54
+ changeHandler();
55
+ return () => {
56
+ mediaQueries.forEach((x) => x.removeEventListener("change", changeHandler));
57
+ mediaQueries.length = 0;
58
+ };
59
+ }
60
+ }
61
+ globalThis.M3eBreakpointObserver = M3eBreakpointObserver;
62
+
63
+ export { Breakpoint, M3eBreakpointObserver };
64
+ //# sourceMappingURL=layout.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"layout.js","sources":["../../src/layout/Breakpoint.ts","../../src/layout/BreakpointObserver.ts"],"sourcesContent":["/**\r\n * Adapted from Angular Material CDK Breakpoints\r\n * Source: https://github.com/angular/components/blob/main/src/cdk/layout/breakpoints.ts\r\n *\r\n * @license MIT\r\n * Copyright (c) 2025 Google LLC\r\n * See LICENSE file in the project root for full license text.\r\n */\r\n\r\n/** Specifies predefined breakpoints. */\r\nexport enum Breakpoint {\r\n XSmall = \"(max-width: 599.98px)\",\r\n Small = \"(min-width: 600px) and (max-width: 959.98px)\",\r\n Medium = \"(min-width: 960px) and (max-width: 1279.98px)\",\r\n Large = \"(min-width: 1280px) and (max-width: 1919.98px)\",\r\n XLarge = \"(min-width: 1920px)\",\r\n Handset = \"(max-width: 599.98px) and (orientation: portrait), (max-width: 959.98px) and (orientation: landscape)\",\r\n Tablet = \"(min-width: 600px) and (max-width: 839.98px) and (orientation: portrait), (min-width: 960px) and (max-width: 1279.98px) and (orientation: landscape)\",\r\n Web = \"(min-width: 840px) and (orientation: portrait), (min-width: 1280px) and (orientation: landscape)\",\r\n HandsetPortrait = \"(max-width: 599.98px) and (orientation: portrait)\",\r\n TabletPortrait = \"(min-width: 600px) and (max-width: 839.98px) and (orientation: portrait)\",\r\n WebPortrait = \"(min-width: 840px) and (orientation: portrait)\",\r\n HandsetLandscape = \"(max-width: 959.98px) and (orientation: landscape)\",\r\n TabletLandscape = \"(min-width: 960px) and (max-width: 1279.98px) and (orientation: landscape)\",\r\n WebLandscape = \"(min-width: 1280px) and (orientation: landscape)\",\r\n}\r\n","import { isServer } from \"lit\";\r\n\r\nimport { Breakpoint } from \"./Breakpoint\";\r\n\r\n/** The callback function invoked when the viewport size changes. */\r\nexport type BreakpointObserverCallback = (matches: Map<Breakpoint | string, boolean>) => void;\r\n\r\n/** Utility used to detect changes to viewport sizes. */\r\nexport class M3eBreakpointObserver {\r\n /**\r\n * Observes changes to viewport sizes.\r\n * @param {Array<Breakpoint | string>} breakpoints The breakpoints to observe.\r\n * @param {BreakpointObserverCallback} callback The callback function invoked when the viewport size changes.\r\n * @returns {() => void} A function used to stop observing changes to viewport sizes.\r\n */\r\n static observe(breakpoints: Array<Breakpoint | string>, callback: BreakpointObserverCallback): () => void {\r\n if (isServer || breakpoints.length == 0) {\r\n return () => {};\r\n }\r\n\r\n const mediaQueries = breakpoints.map((x) => matchMedia(x));\r\n const changeHandler = () => {\r\n const map = new Map<Breakpoint | string, boolean>();\r\n breakpoints.forEach((x, i) => map.set(x, mediaQueries[i].matches));\r\n callback(map);\r\n };\r\n\r\n mediaQueries.forEach((x) => x.addEventListener(\"change\", changeHandler));\r\n\r\n changeHandler();\r\n\r\n return () => {\r\n mediaQueries.forEach((x) => x.removeEventListener(\"change\", changeHandler));\r\n mediaQueries.length = 0;\r\n };\r\n }\r\n}\r\n\r\ndeclare global {\r\n /** Utility used to detect changes to viewport sizes. */\r\n var M3eBreakpointObserver: M3eBreakpointObserver;\r\n}\r\n\r\nglobalThis.M3eBreakpointObserver = M3eBreakpointObserver;\r\n"],"names":[],"mappings":";;;;;;;AAAA;;;;;;;AAOG;AAEH;IACY;AAAZ,CAAA,UAAY,UAAU,EAAA;AACpB,IAAA,UAAA,CAAA,QAAA,CAAA,GAAA,uBAAgC;AAChC,IAAA,UAAA,CAAA,OAAA,CAAA,GAAA,8CAAsD;AACtD,IAAA,UAAA,CAAA,QAAA,CAAA,GAAA,+CAAwD;AACxD,IAAA,UAAA,CAAA,OAAA,CAAA,GAAA,gDAAwD;AACxD,IAAA,UAAA,CAAA,QAAA,CAAA,GAAA,qBAA8B;AAC9B,IAAA,UAAA,CAAA,SAAA,CAAA,GAAA,uGAAiH;AACjH,IAAA,UAAA,CAAA,QAAA,CAAA,GAAA,sJAA+J;AAC/J,IAAA,UAAA,CAAA,KAAA,CAAA,GAAA,kGAAwG;AACxG,IAAA,UAAA,CAAA,iBAAA,CAAA,GAAA,mDAAqE;AACrE,IAAA,UAAA,CAAA,gBAAA,CAAA,GAAA,0EAA2F;AAC3F,IAAA,UAAA,CAAA,aAAA,CAAA,GAAA,gDAA8D;AAC9D,IAAA,UAAA,CAAA,kBAAA,CAAA,GAAA,oDAAuE;AACvE,IAAA,UAAA,CAAA,iBAAA,CAAA,GAAA,4EAA8F;AAC9F,IAAA,UAAA,CAAA,cAAA,CAAA,GAAA,kDAAiE;AACnE,CAAC,EAfW,UAAU,KAAV,UAAU,GAAA,EAAA,CAAA,CAAA;;ACHtB;MACa,qBAAqB,CAAA;AAChC;;;;;AAKG;AACH,IAAA,OAAO,OAAO,CAAC,WAAuC,EAAE,QAAoC,EAAA;QAC1F,IAAI,QAAQ,IAAI,WAAW,CAAC,MAAM,IAAI,CAAC,EAAE;AACvC,YAAA,OAAO,MAAK,EAAE,CAAC;QACjB;AAEA,QAAA,MAAM,YAAY,GAAG,WAAW,CAAC,GAAG,CAAC,CAAC,CAAC,KAAK,UAAU,CAAC,CAAC,CAAC,CAAC;QAC1D,MAAM,aAAa,GAAG,MAAK;AACzB,YAAA,MAAM,GAAG,GAAG,IAAI,GAAG,EAAgC;YACnD,WAAW,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,CAAC,KAAK,GAAG,CAAC,GAAG,CAAC,CAAC,EAAE,YAAY,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC;YAClE,QAAQ,CAAC,GAAG,CAAC;AACf,QAAA,CAAC;AAED,QAAA,YAAY,CAAC,OAAO,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,gBAAgB,CAAC,QAAQ,EAAE,aAAa,CAAC,CAAC;AAExE,QAAA,aAAa,EAAE;AAEf,QAAA,OAAO,MAAK;AACV,YAAA,YAAY,CAAC,OAAO,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,mBAAmB,CAAC,QAAQ,EAAE,aAAa,CAAC,CAAC;AAC3E,YAAA,YAAY,CAAC,MAAM,GAAG,CAAC;AACzB,QAAA,CAAC;IACH;AACD;AAOD,UAAU,CAAC,qBAAqB,GAAG,qBAAqB;;;;"}
@@ -0,0 +1,15 @@
1
+ /**
2
+ * @license MIT
3
+ * Copyright (c) 2025 matraic
4
+ * See LICENSE file in the project root for full license text.
5
+ */
6
+ import{isServer as a}from"lit";
7
+ /**
8
+ * Adapted from Angular Material CDK Breakpoints
9
+ * Source: https://github.com/angular/components/blob/main/src/cdk/layout/breakpoints.ts
10
+ *
11
+ * @license MIT
12
+ * Copyright (c) 2025 Google LLC
13
+ * See LICENSE file in the project root for full license text.
14
+ */var t;!function(a){a.XSmall="(max-width: 599.98px)",a.Small="(min-width: 600px) and (max-width: 959.98px)",a.Medium="(min-width: 960px) and (max-width: 1279.98px)",a.Large="(min-width: 1280px) and (max-width: 1919.98px)",a.XLarge="(min-width: 1920px)",a.Handset="(max-width: 599.98px) and (orientation: portrait), (max-width: 959.98px) and (orientation: landscape)",a.Tablet="(min-width: 600px) and (max-width: 839.98px) and (orientation: portrait), (min-width: 960px) and (max-width: 1279.98px) and (orientation: landscape)",a.Web="(min-width: 840px) and (orientation: portrait), (min-width: 1280px) and (orientation: landscape)",a.HandsetPortrait="(max-width: 599.98px) and (orientation: portrait)",a.TabletPortrait="(min-width: 600px) and (max-width: 839.98px) and (orientation: portrait)",a.WebPortrait="(min-width: 840px) and (orientation: portrait)",a.HandsetLandscape="(max-width: 959.98px) and (orientation: landscape)",a.TabletLandscape="(min-width: 960px) and (max-width: 1279.98px) and (orientation: landscape)",a.WebLandscape="(min-width: 1280px) and (orientation: landscape)"}(t||(t={}));class n{static observe(t,n){if(a||0==t.length)return()=>{};const i=t.map(a=>matchMedia(a)),d=()=>{const a=new Map;t.forEach((t,n)=>a.set(t,i[n].matches)),n(a)};return i.forEach(a=>a.addEventListener("change",d)),d(),()=>{i.forEach(a=>a.removeEventListener("change",d)),i.length=0}}}globalThis.M3eBreakpointObserver=n;export{t as Breakpoint,n as M3eBreakpointObserver};
15
+ //# sourceMappingURL=layout.min.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"layout.min.js","sources":["../../src/layout/Breakpoint.ts","../../src/layout/BreakpointObserver.ts"],"sourcesContent":["/**\r\n * Adapted from Angular Material CDK Breakpoints\r\n * Source: https://github.com/angular/components/blob/main/src/cdk/layout/breakpoints.ts\r\n *\r\n * @license MIT\r\n * Copyright (c) 2025 Google LLC\r\n * See LICENSE file in the project root for full license text.\r\n */\r\n\r\n/** Specifies predefined breakpoints. */\r\nexport enum Breakpoint {\r\n XSmall = \"(max-width: 599.98px)\",\r\n Small = \"(min-width: 600px) and (max-width: 959.98px)\",\r\n Medium = \"(min-width: 960px) and (max-width: 1279.98px)\",\r\n Large = \"(min-width: 1280px) and (max-width: 1919.98px)\",\r\n XLarge = \"(min-width: 1920px)\",\r\n Handset = \"(max-width: 599.98px) and (orientation: portrait), (max-width: 959.98px) and (orientation: landscape)\",\r\n Tablet = \"(min-width: 600px) and (max-width: 839.98px) and (orientation: portrait), (min-width: 960px) and (max-width: 1279.98px) and (orientation: landscape)\",\r\n Web = \"(min-width: 840px) and (orientation: portrait), (min-width: 1280px) and (orientation: landscape)\",\r\n HandsetPortrait = \"(max-width: 599.98px) and (orientation: portrait)\",\r\n TabletPortrait = \"(min-width: 600px) and (max-width: 839.98px) and (orientation: portrait)\",\r\n WebPortrait = \"(min-width: 840px) and (orientation: portrait)\",\r\n HandsetLandscape = \"(max-width: 959.98px) and (orientation: landscape)\",\r\n TabletLandscape = \"(min-width: 960px) and (max-width: 1279.98px) and (orientation: landscape)\",\r\n WebLandscape = \"(min-width: 1280px) and (orientation: landscape)\",\r\n}\r\n","import { isServer } from \"lit\";\r\n\r\nimport { Breakpoint } from \"./Breakpoint\";\r\n\r\n/** The callback function invoked when the viewport size changes. */\r\nexport type BreakpointObserverCallback = (matches: Map<Breakpoint | string, boolean>) => void;\r\n\r\n/** Utility used to detect changes to viewport sizes. */\r\nexport class M3eBreakpointObserver {\r\n /**\r\n * Observes changes to viewport sizes.\r\n * @param {Array<Breakpoint | string>} breakpoints The breakpoints to observe.\r\n * @param {BreakpointObserverCallback} callback The callback function invoked when the viewport size changes.\r\n * @returns {() => void} A function used to stop observing changes to viewport sizes.\r\n */\r\n static observe(breakpoints: Array<Breakpoint | string>, callback: BreakpointObserverCallback): () => void {\r\n if (isServer || breakpoints.length == 0) {\r\n return () => {};\r\n }\r\n\r\n const mediaQueries = breakpoints.map((x) => matchMedia(x));\r\n const changeHandler = () => {\r\n const map = new Map<Breakpoint | string, boolean>();\r\n breakpoints.forEach((x, i) => map.set(x, mediaQueries[i].matches));\r\n callback(map);\r\n };\r\n\r\n mediaQueries.forEach((x) => x.addEventListener(\"change\", changeHandler));\r\n\r\n changeHandler();\r\n\r\n return () => {\r\n mediaQueries.forEach((x) => x.removeEventListener(\"change\", changeHandler));\r\n mediaQueries.length = 0;\r\n };\r\n }\r\n}\r\n\r\ndeclare global {\r\n /** Utility used to detect changes to viewport sizes. */\r\n var M3eBreakpointObserver: M3eBreakpointObserver;\r\n}\r\n\r\nglobalThis.M3eBreakpointObserver = M3eBreakpointObserver;\r\n"],"names":["Breakpoint","M3eBreakpointObserver","observe","breakpoints","callback","isServer","length","mediaQueries","map","x","matchMedia","changeHandler","Map","forEach","i","set","matches","addEventListener","removeEventListener","globalThis"],"mappings":";;;;;;;;;;;;;OAUYA,GAAZ,SAAYA,GACVA,EAAA,OAAA,wBACAA,EAAA,MAAA,+CACAA,EAAA,OAAA,gDACAA,EAAA,MAAA,iDACAA,EAAA,OAAA,sBACAA,EAAA,QAAA,wGACAA,EAAA,OAAA,uJACAA,EAAA,IAAA,mGACAA,EAAA,gBAAA,oDACAA,EAAA,eAAA,2EACAA,EAAA,YAAA,iDACAA,EAAA,iBAAA,qDACAA,EAAA,gBAAA,6EACAA,EAAA,aAAA,kDACD,CAfD,CAAYA,IAAAA,EAAU,CAAA,UCFTC,EAOX,cAAOC,CAAQC,EAAyCC,GACtD,GAAIC,GAAkC,GAAtBF,EAAYG,OAC1B,MAAO,OAGT,MAAMC,EAAeJ,EAAYK,IAAKC,GAAMC,WAAWD,IACjDE,EAAgB,KACpB,MAAMH,EAAM,IAAII,IAChBT,EAAYU,QAAQ,CAACJ,EAAGK,IAAMN,EAAIO,IAAIN,EAAGF,EAAaO,GAAGE,UACzDZ,EAASI,IAOX,OAJAD,EAAaM,QAASJ,GAAMA,EAAEQ,iBAAiB,SAAUN,IAEzDA,IAEO,KACLJ,EAAaM,QAASJ,GAAMA,EAAES,oBAAoB,SAAUP,IAC5DJ,EAAaD,OAAS,EAE1B,EAQFa,WAAWlB,sBAAwBA"}
@@ -0,0 +1,56 @@
1
+ /**
2
+ * @license MIT
3
+ * Copyright (c) 2025 matraic
4
+ * See LICENSE file in the project root for full license text.
5
+ */
6
+ import { isServer } from 'lit';
7
+
8
+ /**
9
+ * Adapted from Angular Material CDK Platform
10
+ * Source: https://github.com/angular/components/blob/main/src/cdk/platform/platform.ts
11
+ *
12
+ * @license MIT
13
+ * Copyright (c) 2025 Google LLC
14
+ * See LICENSE file in the project root for full license text.
15
+ */
16
+ /* eslint-disable @typescript-eslint/no-explicit-any */
17
+ let hasV8BreakIterator;
18
+ try {
19
+ hasV8BreakIterator = typeof Intl !== "undefined" && Intl.v8BreakIterator;
20
+ }
21
+ catch {
22
+ hasV8BreakIterator = false;
23
+ }
24
+ /** Utility used to detect the current platform. */
25
+ class M3ePlatform {
26
+ }
27
+ /** A value indicating whether the platform is a browser. */
28
+ M3ePlatform.isBrowser = !isServer && typeof document === "object" && !!document;
29
+ /** A value indicating whether the current browser is Microsoft Edge. */
30
+ M3ePlatform.Edge = M3ePlatform.isBrowser && /(edge)/i.test(navigator.userAgent);
31
+ /** A value indicating whether the current rendering engine is Microsoft Trident. */
32
+ M3ePlatform.Trident = M3ePlatform.isBrowser && /(msie|trident)/i.test(navigator.userAgent);
33
+ /** A value indicating whether the current rendering engine is Blink. */
34
+ M3ePlatform.Blink = M3ePlatform.isBrowser &&
35
+ !!(window.chrome || hasV8BreakIterator) &&
36
+ typeof CSS !== "undefined" &&
37
+ !M3ePlatform.Edge &&
38
+ !M3ePlatform.Trident;
39
+ /** A value indicating whether the current rendering engine is WebKit. */
40
+ M3ePlatform.WebKit = M3ePlatform.isBrowser &&
41
+ /AppleWebKit/i.test(navigator.userAgent) &&
42
+ !M3ePlatform.Blink &&
43
+ !M3ePlatform.Edge &&
44
+ !M3ePlatform.Trident;
45
+ /** A value indicating whether the current platform is Apply iOS. */
46
+ M3ePlatform.iOS = M3ePlatform.isBrowser && /iPad|iPhone|iPod/.test(navigator.userAgent) && !("MSStream" in window);
47
+ /** A value indicating whether the current browser is Firefox. */
48
+ M3ePlatform.Firefox = M3ePlatform.isBrowser && /(firefox|minefield)/i.test(navigator.userAgent);
49
+ /** A value indicating whether the current platform is Android. */
50
+ M3ePlatform.Android = M3ePlatform.isBrowser && /android/i.test(navigator.userAgent) && !M3ePlatform.Trident;
51
+ /** A value indicating whether the current browser is Safari. */
52
+ M3ePlatform.Safari = M3ePlatform.isBrowser && /safari/i.test(navigator.userAgent) && M3ePlatform.WebKit;
53
+ globalThis.M3ePlatform = M3ePlatform;
54
+
55
+ export { M3ePlatform };
56
+ //# sourceMappingURL=platform.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"platform.js","sources":["../../src/platform/Platform.ts"],"sourcesContent":["/**\r\n * Adapted from Angular Material CDK Platform\r\n * Source: https://github.com/angular/components/blob/main/src/cdk/platform/platform.ts\r\n *\r\n * @license MIT\r\n * Copyright (c) 2025 Google LLC\r\n * See LICENSE file in the project root for full license text.\r\n */\r\n\r\n/* eslint-disable @typescript-eslint/no-explicit-any */\r\nimport { isServer } from \"lit\";\r\n\r\nlet hasV8BreakIterator: boolean;\r\n\r\ntry {\r\n hasV8BreakIterator = typeof Intl !== \"undefined\" && (Intl as any).v8BreakIterator;\r\n} catch {\r\n hasV8BreakIterator = false;\r\n}\r\n\r\n/** Utility used to detect the current platform. */\r\nexport class M3ePlatform {\r\n /** A value indicating whether the platform is a browser. */\r\n static readonly isBrowser = !isServer && typeof document === \"object\" && !!document;\r\n\r\n /** A value indicating whether the current browser is Microsoft Edge. */\r\n static readonly Edge = M3ePlatform.isBrowser && /(edge)/i.test(navigator.userAgent);\r\n\r\n /** A value indicating whether the current rendering engine is Microsoft Trident. */\r\n static readonly Trident = M3ePlatform.isBrowser && /(msie|trident)/i.test(navigator.userAgent);\r\n\r\n /** A value indicating whether the current rendering engine is Blink. */\r\n static readonly Blink =\r\n M3ePlatform.isBrowser &&\r\n !!((window as any).chrome || hasV8BreakIterator) &&\r\n typeof CSS !== \"undefined\" &&\r\n !M3ePlatform.Edge &&\r\n !M3ePlatform.Trident;\r\n\r\n /** A value indicating whether the current rendering engine is WebKit. */\r\n static readonly WebKit =\r\n M3ePlatform.isBrowser &&\r\n /AppleWebKit/i.test(navigator.userAgent) &&\r\n !M3ePlatform.Blink &&\r\n !M3ePlatform.Edge &&\r\n !M3ePlatform.Trident;\r\n\r\n /** A value indicating whether the current platform is Apply iOS. */\r\n static readonly iOS =\r\n M3ePlatform.isBrowser && /iPad|iPhone|iPod/.test(navigator.userAgent) && !(\"MSStream\" in window);\r\n\r\n /** A value indicating whether the current browser is Firefox. */\r\n static readonly Firefox = M3ePlatform.isBrowser && /(firefox|minefield)/i.test(navigator.userAgent);\r\n\r\n /** A value indicating whether the current platform is Android. */\r\n static readonly Android = M3ePlatform.isBrowser && /android/i.test(navigator.userAgent) && !M3ePlatform.Trident;\r\n\r\n /** A value indicating whether the current browser is Safari. */\r\n static readonly Safari = M3ePlatform.isBrowser && /safari/i.test(navigator.userAgent) && M3ePlatform.WebKit;\r\n}\r\n\r\ndeclare global {\r\n /** Utility used to detect the current platform. */\r\n var M3ePlatform: M3ePlatform;\r\n}\r\n\r\nglobalThis.M3ePlatform = M3ePlatform;\r\n"],"names":[],"mappings":";;;;;;;AAAA;;;;;;;AAOG;AAEH;AAGA,IAAI,kBAA2B;AAE/B,IAAI;IACF,kBAAkB,GAAG,OAAO,IAAI,KAAK,WAAW,IAAK,IAAY,CAAC,eAAe;AACnF;AAAE,MAAM;IACN,kBAAkB,GAAG,KAAK;AAC5B;AAEA;MACa,WAAW,CAAA;;AACtB;AACgB,WAAA,CAAA,SAAS,GAAG,CAAC,QAAQ,IAAI,OAAO,QAAQ,KAAK,QAAQ,IAAI,CAAC,CAAC,QAAQ;AAEnF;AACgB,WAAA,CAAA,IAAI,GAAG,WAAW,CAAC,SAAS,IAAI,SAAS,CAAC,IAAI,CAAC,SAAS,CAAC,SAAS,CAAC;AAEnF;AACgB,WAAA,CAAA,OAAO,GAAG,WAAW,CAAC,SAAS,IAAI,iBAAiB,CAAC,IAAI,CAAC,SAAS,CAAC,SAAS,CAAC;AAE9F;AACgB,WAAA,CAAA,KAAK,GACnB,WAAW,CAAC,SAAS;AACrB,IAAA,CAAC,EAAG,MAAc,CAAC,MAAM,IAAI,kBAAkB,CAAC;IAChD,OAAO,GAAG,KAAK,WAAW;IAC1B,CAAC,WAAW,CAAC,IAAI;IACjB,CAAC,WAAW,CAAC,OAAO;AAEtB;AACgB,WAAA,CAAA,MAAM,GACpB,WAAW,CAAC,SAAS;AACrB,IAAA,cAAc,CAAC,IAAI,CAAC,SAAS,CAAC,SAAS,CAAC;IACxC,CAAC,WAAW,CAAC,KAAK;IAClB,CAAC,WAAW,CAAC,IAAI;IACjB,CAAC,WAAW,CAAC,OAAO;AAEtB;AACgB,WAAA,CAAA,GAAG,GACjB,WAAW,CAAC,SAAS,IAAI,kBAAkB,CAAC,IAAI,CAAC,SAAS,CAAC,SAAS,CAAC,IAAI,EAAE,UAAU,IAAI,MAAM,CAAC;AAElG;AACgB,WAAA,CAAA,OAAO,GAAG,WAAW,CAAC,SAAS,IAAI,sBAAsB,CAAC,IAAI,CAAC,SAAS,CAAC,SAAS,CAAC;AAEnG;AACgB,WAAA,CAAA,OAAO,GAAG,WAAW,CAAC,SAAS,IAAI,UAAU,CAAC,IAAI,CAAC,SAAS,CAAC,SAAS,CAAC,IAAI,CAAC,WAAW,CAAC,OAAO;AAE/G;AACgB,WAAA,CAAA,MAAM,GAAG,WAAW,CAAC,SAAS,IAAI,SAAS,CAAC,IAAI,CAAC,SAAS,CAAC,SAAS,CAAC,IAAI,WAAW,CAAC,MAAM;AAQ7G,UAAU,CAAC,WAAW,GAAG,WAAW;;;;"}
@@ -0,0 +1,15 @@
1
+ /**
2
+ * @license MIT
3
+ * Copyright (c) 2025 matraic
4
+ * See LICENSE file in the project root for full license text.
5
+ */
6
+ import{isServer as e}from"lit";
7
+ /**
8
+ * Adapted from Angular Material CDK Platform
9
+ * Source: https://github.com/angular/components/blob/main/src/cdk/platform/platform.ts
10
+ *
11
+ * @license MIT
12
+ * Copyright (c) 2025 Google LLC
13
+ * See LICENSE file in the project root for full license text.
14
+ */let t;try{t="undefined"!=typeof Intl&&Intl.v8BreakIterator}catch{t=!1}class i{}i.isBrowser=!e&&"object"==typeof document&&!!document,i.Edge=i.isBrowser&&/(edge)/i.test(navigator.userAgent),i.Trident=i.isBrowser&&/(msie|trident)/i.test(navigator.userAgent),i.Blink=i.isBrowser&&!(!window.chrome&&!t)&&"undefined"!=typeof CSS&&!i.Edge&&!i.Trident,i.WebKit=i.isBrowser&&/AppleWebKit/i.test(navigator.userAgent)&&!i.Blink&&!i.Edge&&!i.Trident,i.iOS=i.isBrowser&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!("MSStream"in window),i.Firefox=i.isBrowser&&/(firefox|minefield)/i.test(navigator.userAgent),i.Android=i.isBrowser&&/android/i.test(navigator.userAgent)&&!i.Trident,i.Safari=i.isBrowser&&/safari/i.test(navigator.userAgent)&&i.WebKit,globalThis.M3ePlatform=i;export{i as M3ePlatform};
15
+ //# sourceMappingURL=platform.min.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"platform.min.js","sources":["../../src/platform/Platform.ts"],"sourcesContent":["/**\r\n * Adapted from Angular Material CDK Platform\r\n * Source: https://github.com/angular/components/blob/main/src/cdk/platform/platform.ts\r\n *\r\n * @license MIT\r\n * Copyright (c) 2025 Google LLC\r\n * See LICENSE file in the project root for full license text.\r\n */\r\n\r\n/* eslint-disable @typescript-eslint/no-explicit-any */\r\nimport { isServer } from \"lit\";\r\n\r\nlet hasV8BreakIterator: boolean;\r\n\r\ntry {\r\n hasV8BreakIterator = typeof Intl !== \"undefined\" && (Intl as any).v8BreakIterator;\r\n} catch {\r\n hasV8BreakIterator = false;\r\n}\r\n\r\n/** Utility used to detect the current platform. */\r\nexport class M3ePlatform {\r\n /** A value indicating whether the platform is a browser. */\r\n static readonly isBrowser = !isServer && typeof document === \"object\" && !!document;\r\n\r\n /** A value indicating whether the current browser is Microsoft Edge. */\r\n static readonly Edge = M3ePlatform.isBrowser && /(edge)/i.test(navigator.userAgent);\r\n\r\n /** A value indicating whether the current rendering engine is Microsoft Trident. */\r\n static readonly Trident = M3ePlatform.isBrowser && /(msie|trident)/i.test(navigator.userAgent);\r\n\r\n /** A value indicating whether the current rendering engine is Blink. */\r\n static readonly Blink =\r\n M3ePlatform.isBrowser &&\r\n !!((window as any).chrome || hasV8BreakIterator) &&\r\n typeof CSS !== \"undefined\" &&\r\n !M3ePlatform.Edge &&\r\n !M3ePlatform.Trident;\r\n\r\n /** A value indicating whether the current rendering engine is WebKit. */\r\n static readonly WebKit =\r\n M3ePlatform.isBrowser &&\r\n /AppleWebKit/i.test(navigator.userAgent) &&\r\n !M3ePlatform.Blink &&\r\n !M3ePlatform.Edge &&\r\n !M3ePlatform.Trident;\r\n\r\n /** A value indicating whether the current platform is Apply iOS. */\r\n static readonly iOS =\r\n M3ePlatform.isBrowser && /iPad|iPhone|iPod/.test(navigator.userAgent) && !(\"MSStream\" in window);\r\n\r\n /** A value indicating whether the current browser is Firefox. */\r\n static readonly Firefox = M3ePlatform.isBrowser && /(firefox|minefield)/i.test(navigator.userAgent);\r\n\r\n /** A value indicating whether the current platform is Android. */\r\n static readonly Android = M3ePlatform.isBrowser && /android/i.test(navigator.userAgent) && !M3ePlatform.Trident;\r\n\r\n /** A value indicating whether the current browser is Safari. */\r\n static readonly Safari = M3ePlatform.isBrowser && /safari/i.test(navigator.userAgent) && M3ePlatform.WebKit;\r\n}\r\n\r\ndeclare global {\r\n /** Utility used to detect the current platform. */\r\n var M3ePlatform: M3ePlatform;\r\n}\r\n\r\nglobalThis.M3ePlatform = M3ePlatform;\r\n"],"names":["hasV8BreakIterator","Intl","v8BreakIterator","M3ePlatform","isBrowser","isServer","document","Edge","test","navigator","userAgent","Trident","Blink","window","chrome","CSS","WebKit","iOS","Firefox","Android","Safari","globalThis"],"mappings":";;;;;;;;;;;;;GAYA,IAAIA,EAEJ,IACEA,EAAqC,oBAATC,MAAyBA,KAAaC,eACpE,CAAE,MACAF,GAAqB,CACvB,OAGaG,GAEKA,EAAAC,WAAaC,GAAgC,iBAAbC,YAA2BA,SAG3DH,EAAAI,KAAOJ,EAAYC,WAAa,UAAUI,KAAKC,UAAUC,WAGzDP,EAAAQ,QAAUR,EAAYC,WAAa,kBAAkBI,KAAKC,UAAUC,WAGpEP,EAAAS,MACdT,EAAYC,cACRS,OAAeC,SAAUd,IACd,oBAARe,MACNZ,EAAYI,OACZJ,EAAYQ,QAGCR,EAAAa,OACdb,EAAYC,WACZ,eAAeI,KAAKC,UAAUC,aAC7BP,EAAYS,QACZT,EAAYI,OACZJ,EAAYQ,QAGCR,EAAAc,IACdd,EAAYC,WAAa,mBAAmBI,KAAKC,UAAUC,cAAgB,aAAcG,QAG3EV,EAAAe,QAAUf,EAAYC,WAAa,uBAAuBI,KAAKC,UAAUC,WAGzEP,EAAAgB,QAAUhB,EAAYC,WAAa,WAAWI,KAAKC,UAAUC,aAAeP,EAAYQ,QAGxFR,EAAAiB,OAASjB,EAAYC,WAAa,UAAUI,KAAKC,UAAUC,YAAcP,EAAYa,OAQvGK,WAAWlB,YAAcA"}
@@ -0,0 +1,31 @@
1
+ /**
2
+ * Adapted from Angular Material CDK ARIA Describer
3
+ * Source: https://github.com/angular/components/blob/main/src/cdk/a11y/aria-describer/aria-describer.ts
4
+ *
5
+ * @license MIT
6
+ * Copyright (c) 2025 Google LLC
7
+ * See LICENSE file in the project root for full license text.
8
+ */
9
+ /** Utility for generating visually hidden elements that convey descriptive messages using `aria-describedby`. */
10
+ export declare class M3eAriaDescriber {
11
+ #private;
12
+ /**
13
+ * Adds an `aria-describedby` reference to a hidden element that contains the message.
14
+ * @param {Element} element The element for which to provide a visually hidden description.
15
+ * @param {string} message The message used to describe `element`.
16
+ * @param {string} [role="tooltip"] The ARIA role of the message.
17
+ */
18
+ static describe(element: Element, message: string, role?: string): void;
19
+ /**
20
+ * Removes an `aria-describedby` reference to a hidden element that contains the message.
21
+ * @param {Element} element The element from which to remove a visually hidden description.
22
+ * @param {string} message The message used to describe `element`.
23
+ * @param {string} [role="tooltip"] The ARIA role of the message.
24
+ */
25
+ static removeDescription(element: Element, message: string, role?: string): void;
26
+ }
27
+ declare global {
28
+ /** Utility for generating visually hidden elements that convey descriptive messages using `aria-describedby`. */
29
+ var M3eAriaDescriber: M3eAriaDescriber;
30
+ }
31
+ //# sourceMappingURL=AriaDescriber.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AriaDescriber.d.ts","sourceRoot":"","sources":["../../../src/a11y/AriaDescriber.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAOH,iHAAiH;AACjH,qBAAa,gBAAgB;;IAU3B;;;;;OAKG;IACH,MAAM,CAAC,QAAQ,CAAC,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,IAAI,GAAE,MAAkB,GAAG,IAAI;IAmClF;;;;;OAKG;IACH,MAAM,CAAC,iBAAiB,CAAC,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,IAAI,GAAE,MAAkB,GAAG,IAAI;CAkD5F;AAED,OAAO,CAAC,MAAM,CAAC;IACb,iHAAiH;IACjH,IAAI,gBAAgB,EAAE,gBAAgB,CAAC;CACxC"}
@@ -0,0 +1,25 @@
1
+ import { CSSResultGroup, LitElement } from "lit";
2
+ declare const M3eFocusTrapElement_base: import("../shared/mixins/Constructor").Constructor<import("..").DisabledMixin> & import("../shared/mixins/Constructor").Constructor & typeof LitElement;
3
+ /**
4
+ * A non-visual element used to trap focus within nested content.
5
+ * @tag m3e-focus-trap
6
+ *
7
+ * @slot - Renders content for which to trap focus.
8
+ *
9
+ * @attr disabled - Disables the focus trap.
10
+ */
11
+ export declare class M3eFocusTrapElement extends M3eFocusTrapElement_base {
12
+ #private;
13
+ /** The styles of the element. */
14
+ static styles: CSSResultGroup;
15
+ /** @private */ private readonly _firstTrap;
16
+ /** @inheritdoc */
17
+ protected render(): unknown;
18
+ }
19
+ declare global {
20
+ interface HTMLElementTagNameMap {
21
+ "m3e-focus-trap": M3eFocusTrapElement;
22
+ }
23
+ }
24
+ export {};
25
+ //# sourceMappingURL=FocusTrapElement.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FocusTrapElement.d.ts","sourceRoot":"","sources":["../../../src/a11y/FocusTrapElement.ts"],"names":[],"mappings":"AAAA,OAAO,EAAO,cAAc,EAAQ,UAAU,EAAE,MAAM,KAAK,CAAC;;AAQ5D;;;;;;;GAOG;AACH,qBACa,mBAAoB,SAAQ,wBAAkC;;IACzE,iCAAiC;IACjC,OAAgB,MAAM,EAAE,cAAc,CAOpC;IAEF,eAAe,CAAiB,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAsB;IAEjF,kBAAkB;cACC,MAAM,IAAI,OAAO;CAkGrC;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,gBAAgB,EAAE,mBAAmB,CAAC;KACvC;CACF"}
@@ -0,0 +1,22 @@
1
+ /** Utility for checking the interactivity of an element, such as whether it is focusable. */
2
+ export declare class M3eInteractivityChecker {
3
+ #private;
4
+ /**
5
+ * Determines whether a given element can receive focus.
6
+ * @param {Element} element The element to test.
7
+ * @param {readonly Element[]} [parents = undefined] The known parent elements to test. The default value is `undefined`.
8
+ * @returns {boolean} Whether `element` can receive focus.
9
+ */
10
+ static isFocusable(element: Element, parents?: readonly Element[]): boolean;
11
+ /**
12
+ * Finds interactive elements that descend from the specified element.
13
+ * @param {HTMLElement} element The `HTMLElement` to search.
14
+ * @returns {HTMLElement[]} The interactive elements that descend from `element`.
15
+ */
16
+ static findInteractiveElements(element: HTMLElement): HTMLElement[];
17
+ }
18
+ declare global {
19
+ /** Utility for checking the interactivity of an element, such as whether it is focusable. */
20
+ var M3eInteractivityChecker: M3eInteractivityChecker;
21
+ }
22
+ //# sourceMappingURL=InteractivityChecker.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"InteractivityChecker.d.ts","sourceRoot":"","sources":["../../../src/a11y/InteractivityChecker.ts"],"names":[],"mappings":"AAAA,6FAA6F;AAC7F,qBAAa,uBAAuB;;IAClC;;;;;OAKG;IACH,MAAM,CAAC,WAAW,CAAC,OAAO,EAAE,OAAO,EAAE,OAAO,CAAC,EAAE,SAAS,OAAO,EAAE,GAAG,OAAO;IA4B3E;;;;OAIG;IACH,MAAM,CAAC,uBAAuB,CAAC,OAAO,EAAE,WAAW,GAAG,WAAW,EAAE;CAapE;AAED,OAAO,CAAC,MAAM,CAAC;IACb,6FAA6F;IAC7F,IAAI,uBAAuB,EAAE,uBAAuB,CAAC;CACtD"}
@@ -0,0 +1,56 @@
1
+ /**
2
+ * Adapted from Angular Material CDK Live Announcer
3
+ * Source: https://github.com/angular/components/blob/main/src/cdk/a11y/live-announcer/live-announcer.ts
4
+ *
5
+ * @license MIT
6
+ * Copyright (c) 2025 Google LLC
7
+ * See LICENSE file in the project root for full license text.
8
+ */
9
+ /** Specifies the possible politeness levels in which to announce messages. */
10
+ export type ARIALivePoliteness = "off" | "polite" | "assertive";
11
+ /** Utility for announcing messages to screen readers. */
12
+ export declare class M3eLiveAnnouncer {
13
+ #private;
14
+ /**
15
+ * Announces the specified message to screen readers.
16
+ * @param {string} message The message to announce.
17
+ * @returns {Promise<void>} A `Promise` that resolves when `message` is added to the DOM.
18
+ */
19
+ static announce(message: string): Promise<void>;
20
+ /**
21
+ * Announces the specified message to screen readers.
22
+ * @param {string} message The message to announce.
23
+ * @param {ARIALivePoliteness | undefined} politeness The politeness in which to announce `message`.
24
+ * @returns {Promise<void>} A `Promise` that resolves when `message` is added to the DOM.
25
+ */
26
+ static announce(message: string, politeness?: ARIALivePoliteness): Promise<void>;
27
+ /**
28
+ * Announces the specified message to screen readers.
29
+ * @param {string} message The message to announce.
30
+ * @param {number | undefined} duration The duration, in milliseconds, after which to clear the announcement. Note
31
+ * that this takes effect after the message has been added to the DOM, which can be up to
32
+ * 100ms after `announce` has been called.
33
+ * @returns {Promise<void>} A `Promise` that resolves when `message` is added to the DOM.
34
+ */
35
+ static announce(message: string, duration?: number): Promise<void>;
36
+ /**
37
+ * Announces the specified message to screen readers.
38
+ * @param {string} message The message to announce.
39
+ * @param {ARIALivePoliteness | undefined} politeness The politeness in which to announce `message`.
40
+ * @param {number | undefined} duration The duration, in milliseconds, after which to clear the announcement. Note
41
+ * that this takes effect after the message has been added to the DOM, which can be up to 100ms after `announce` has been called.
42
+ * @returns {Promise<void>} A `Promise` that resolves when `message` is added to the DOM.
43
+ */
44
+ static announce(message: string, politeness?: ARIALivePoliteness, duration?: number): Promise<void>;
45
+ /**
46
+ * Clears the current text from the announcer element. Can be used to prevent
47
+ * screen readers from reading the text out again while the user is going
48
+ * through page landmarks.
49
+ */
50
+ static clear(): void;
51
+ }
52
+ declare global {
53
+ /** Utility for announcing messages to screen readers. */
54
+ var M3eLiveAnnouncer: M3eLiveAnnouncer;
55
+ }
56
+ //# sourceMappingURL=LiveAnnouncer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"LiveAnnouncer.d.ts","sourceRoot":"","sources":["../../../src/a11y/LiveAnnouncer.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAOH,8EAA8E;AAC9E,MAAM,MAAM,kBAAkB,GAAG,KAAK,GAAG,QAAQ,GAAG,WAAW,CAAC;AAEhE,yDAAyD;AACzD,qBAAa,gBAAgB;;IAO3B;;;;OAIG;IACH,MAAM,CAAC,QAAQ,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAE/C;;;;;OAKG;IACH,MAAM,CAAC,QAAQ,CAAC,OAAO,EAAE,MAAM,EAAE,UAAU,CAAC,EAAE,kBAAkB,GAAG,OAAO,CAAC,IAAI,CAAC;IAEhF;;;;;;;OAOG;IACH,MAAM,CAAC,QAAQ,CAAC,OAAO,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAElE;;;;;;;OAOG;IACH,MAAM,CAAC,QAAQ,CAAC,OAAO,EAAE,MAAM,EAAE,UAAU,CAAC,EAAE,kBAAkB,EAAE,QAAQ,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IA+CnG;;;;OAIG;IACH,MAAM,CAAC,KAAK;CAyBb;AAED,OAAO,CAAC,MAAM,CAAC;IACb,yDAAyD;IACzD,IAAI,gBAAgB,EAAE,gBAAgB,CAAC;CACxC"}
@@ -0,0 +1,30 @@
1
+ /**
2
+ * Adapted from Angular Material CDK AriaDescriber
3
+ * Source: https://github.com/angular/components/blob/main/src/cdk/a11y/aria-describer/aria-reference.ts
4
+ *
5
+ * @license MIT
6
+ * Copyright (c) 2025 Google LLC
7
+ * See LICENSE file in the project root for full license text.
8
+ */
9
+ /**
10
+ * Gets a list of IDs referenced by an element for the specified ARIA attribute.
11
+ * @param {Element} element The element from which to get referenced IDs.
12
+ * @param {`aria-${string}`} attribute The ARIA attribute from which to get referenced IDs.
13
+ * @returns {string[]} a list of IDs referenced by `element` for `attribute`.
14
+ */
15
+ export declare function getAriaReferenceIds(element: Element, attribute: `aria-${string}`): string[];
16
+ /**
17
+ * Adds an ID to the list of IDs referenced by an element for a given ARIA attribute.
18
+ * @param {Element} element The element to which to add a referenced ID.
19
+ * @param {`aria-${string}`} attribute The ARIA attribute to which to add an ID.
20
+ * @param {string} id The ID to add.
21
+ */
22
+ export declare function addAriaReferencedId(element: Element, attribute: `aria-${string}`, id: string): void;
23
+ /**
24
+ * Removes an ID from a list of IDs referenced by an element for the specified ARIA attribute.
25
+ * @param {Element} element The element from which to remove an ID.
26
+ * @param {`aria-${string}`} attribute The ARIA attribute from which to remove an ID.
27
+ * @param {string} id The ID to remove.
28
+ */
29
+ export declare function removeAriaReferencedId(element: Element, attribute: `aria-${string}`, id: string): void;
30
+ //# sourceMappingURL=aria-reference.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"aria-reference.d.ts","sourceRoot":"","sources":["../../../src/a11y/aria-reference.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH;;;;;GAKG;AACH,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE,QAAQ,MAAM,EAAE,GAAG,MAAM,EAAE,CAE3F;AAED;;;;;GAKG;AACH,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE,QAAQ,MAAM,EAAE,EAAE,EAAE,EAAE,MAAM,GAAG,IAAI,CAQnG;AAED;;;;;GAKG;AACH,wBAAgB,sBAAsB,CAAC,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE,QAAQ,MAAM,EAAE,EAAE,EAAE,EAAE,MAAM,GAAG,IAAI,CAStG"}
@@ -0,0 +1,8 @@
1
+ export * from "./list-key";
2
+ export * from "./keycodes";
3
+ export * from "./aria-reference";
4
+ export * from "./AriaDescriber";
5
+ export * from "./FocusTrapElement";
6
+ export * from "./InteractivityChecker";
7
+ export * from "./LiveAnnouncer";
8
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/a11y/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC;AAC3B,cAAc,YAAY,CAAC;AAE3B,cAAc,kBAAkB,CAAC;AACjC,cAAc,iBAAiB,CAAC;AAChC,cAAc,oBAAoB,CAAC;AACnC,cAAc,wBAAwB,CAAC;AACvC,cAAc,iBAAiB,CAAC"}
@@ -0,0 +1,118 @@
1
+ /** Specifies known key code values. */
2
+ export declare enum KeyCode {
3
+ Backspace = 8,
4
+ Tab = 9,
5
+ Enter = 13,
6
+ Shift = 16,
7
+ Ctrl = 17,
8
+ Alt = 18,
9
+ PauseBreak = 19,
10
+ CapsLock = 20,
11
+ Escape = 27,
12
+ Space = 32,
13
+ PageUp = 33,
14
+ PageDown = 34,
15
+ End = 35,
16
+ Home = 36,
17
+ LeftArrow = 37,
18
+ UpArrow = 38,
19
+ RightArrow = 39,
20
+ DownArrow = 40,
21
+ Insert = 45,
22
+ Delete = 46,
23
+ Zero = 48,
24
+ ClosedParen = 48,
25
+ One = 49,
26
+ ExclamationMark = 49,
27
+ Two = 50,
28
+ AtSign = 50,
29
+ Three = 51,
30
+ PoundSign = 51,
31
+ Hash = 51,
32
+ Four = 52,
33
+ DollarSign = 52,
34
+ Five = 53,
35
+ PercentSign = 53,
36
+ Six = 54,
37
+ Caret = 54,
38
+ Hat = 54,
39
+ Seven = 55,
40
+ Ampersand = 55,
41
+ Eight = 56,
42
+ Star = 56,
43
+ Asterik = 56,
44
+ Nine = 57,
45
+ OpenParen = 57,
46
+ A = 65,
47
+ B = 66,
48
+ C = 67,
49
+ D = 68,
50
+ E = 69,
51
+ F = 70,
52
+ G = 71,
53
+ H = 72,
54
+ I = 73,
55
+ J = 74,
56
+ K = 75,
57
+ L = 76,
58
+ M = 77,
59
+ N = 78,
60
+ O = 79,
61
+ P = 80,
62
+ Q = 81,
63
+ R = 82,
64
+ S = 83,
65
+ T = 84,
66
+ U = 85,
67
+ V = 86,
68
+ W = 87,
69
+ X = 88,
70
+ Y = 89,
71
+ Z = 90,
72
+ LeftWindowKey = 91,
73
+ RightWindowKey = 92,
74
+ SelectKey = 93,
75
+ Numpad0 = 96,
76
+ Numpad1 = 97,
77
+ Numpad2 = 98,
78
+ Numpad3 = 99,
79
+ Numpad4 = 100,
80
+ Numpad5 = 101,
81
+ Numpad6 = 102,
82
+ Numpad7 = 103,
83
+ Numpad8 = 104,
84
+ Numpad9 = 105,
85
+ Multiply = 106,
86
+ Add = 107,
87
+ Subtract = 109,
88
+ DecimalPoint = 110,
89
+ Divide = 111,
90
+ F1 = 112,
91
+ F2 = 113,
92
+ F3 = 114,
93
+ F4 = 115,
94
+ F5 = 116,
95
+ F6 = 117,
96
+ F7 = 118,
97
+ F8 = 119,
98
+ F9 = 120,
99
+ F10 = 121,
100
+ F11 = 122,
101
+ F12 = 123,
102
+ NumLock = 144,
103
+ ScrollLock = 145,
104
+ SemiColon = 186,
105
+ Equals = 187,
106
+ Comma = 188,
107
+ Dash = 189,
108
+ Period = 190,
109
+ UnderScore = 189,
110
+ PlusSign = 187,
111
+ ForwardSlash = 191,
112
+ Tilde = 192,
113
+ GraveAccent = 192,
114
+ OpenBracket = 219,
115
+ ClosedBracket = 221,
116
+ Quote = 222
117
+ }
118
+ //# sourceMappingURL=KeyCode.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"KeyCode.d.ts","sourceRoot":"","sources":["../../../../src/a11y/keycodes/KeyCode.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,oBAAY,OAAO;IACjB,SAAS,IAAI;IACb,GAAG,IAAI;IACP,KAAK,KAAK;IACV,KAAK,KAAK;IACV,IAAI,KAAK;IACT,GAAG,KAAK;IACR,UAAU,KAAK;IACf,QAAQ,KAAK;IACb,MAAM,KAAK;IACX,KAAK,KAAK;IACV,MAAM,KAAK;IACX,QAAQ,KAAK;IACb,GAAG,KAAK;IACR,IAAI,KAAK;IAET,SAAS,KAAK;IACd,OAAO,KAAK;IACZ,UAAU,KAAK;IACf,SAAS,KAAK;IAEd,MAAM,KAAK;IACX,MAAM,KAAK;IAEX,IAAI,KAAK;IACT,WAAW,KAAO;IAClB,GAAG,KAAK;IACR,eAAe,KAAM;IACrB,GAAG,KAAK;IACR,MAAM,KAAM;IACZ,KAAK,KAAK;IACV,SAAS,KAAQ;IACjB,IAAI,KAAY;IAChB,IAAI,KAAK;IACT,UAAU,KAAO;IACjB,IAAI,KAAK;IACT,WAAW,KAAO;IAClB,GAAG,KAAK;IACR,KAAK,KAAM;IACX,GAAG,KAAQ;IACX,KAAK,KAAK;IACV,SAAS,KAAQ;IACjB,KAAK,KAAK;IACV,IAAI,KAAQ;IACZ,OAAO,KAAO;IACd,IAAI,KAAK;IACT,SAAS,KAAO;IAEhB,CAAC,KAAK;IACN,CAAC,KAAK;IACN,CAAC,KAAK;IACN,CAAC,KAAK;IACN,CAAC,KAAK;IACN,CAAC,KAAK;IACN,CAAC,KAAK;IACN,CAAC,KAAK;IACN,CAAC,KAAK;IACN,CAAC,KAAK;IACN,CAAC,KAAK;IACN,CAAC,KAAK;IACN,CAAC,KAAK;IACN,CAAC,KAAK;IACN,CAAC,KAAK;IACN,CAAC,KAAK;IACN,CAAC,KAAK;IACN,CAAC,KAAK;IACN,CAAC,KAAK;IACN,CAAC,KAAK;IACN,CAAC,KAAK;IACN,CAAC,KAAK;IACN,CAAC,KAAK;IACN,CAAC,KAAK;IACN,CAAC,KAAK;IACN,CAAC,KAAK;IAEN,aAAa,KAAK;IAClB,cAAc,KAAK;IACnB,SAAS,KAAK;IAEd,OAAO,KAAK;IACZ,OAAO,KAAK;IACZ,OAAO,KAAK;IACZ,OAAO,KAAK;IACZ,OAAO,MAAM;IACb,OAAO,MAAM;IACb,OAAO,MAAM;IACb,OAAO,MAAM;IACb,OAAO,MAAM;IACb,OAAO,MAAM;IAEb,QAAQ,MAAM;IACd,GAAG,MAAM;IACT,QAAQ,MAAM;IACd,YAAY,MAAM;IAClB,MAAM,MAAM;IAEZ,EAAE,MAAM;IACR,EAAE,MAAM;IACR,EAAE,MAAM;IACR,EAAE,MAAM;IACR,EAAE,MAAM;IACR,EAAE,MAAM;IACR,EAAE,MAAM;IACR,EAAE,MAAM;IACR,EAAE,MAAM;IACR,GAAG,MAAM;IACT,GAAG,MAAM;IACT,GAAG,MAAM;IAET,OAAO,MAAM;IACb,UAAU,MAAM;IAEhB,SAAS,MAAM;IACf,MAAM,MAAM;IACZ,KAAK,MAAM;IACX,IAAI,MAAM;IACV,MAAM,MAAM;IACZ,UAAU,MAAO;IACjB,QAAQ,MAAS;IACjB,YAAY,MAAM;IAClB,KAAK,MAAM;IACX,WAAW,MAAQ;IAEnB,WAAW,MAAM;IACjB,aAAa,MAAM;IACnB,KAAK,MAAM;CACZ"}
@@ -0,0 +1,5 @@
1
+ /** Specifies the keyboard modifier keys. */
2
+ export type ModifierKey = "alt" | "shift" | "ctrl" | "meta";
3
+ /** The modifier keys. */
4
+ export declare const ModifierKeys: readonly ModifierKey[];
5
+ //# sourceMappingURL=ModifierKeys.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ModifierKeys.d.ts","sourceRoot":"","sources":["../../../../src/a11y/keycodes/ModifierKeys.ts"],"names":[],"mappings":"AAAA,4CAA4C;AAC5C,MAAM,MAAM,WAAW,GAAG,KAAK,GAAG,OAAO,GAAG,MAAM,GAAG,MAAM,CAAC;AAE5D,yBAAyB;AACzB,eAAO,MAAM,YAAY,EAAE,SAAS,WAAW,EAAqC,CAAC"}
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Resolves the key code for the specified `KeyboardEvent`.
3
+ * @param {KeyboardEvent} e The `KeyboardEvent` for which to resolve the key code.
4
+ * @returns {number} The key code for `e`.
5
+ */
6
+ export declare function getKeyCode(e: KeyboardEvent): number;
7
+ //# sourceMappingURL=getKeyCode.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getKeyCode.d.ts","sourceRoot":"","sources":["../../../../src/a11y/keycodes/getKeyCode.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,wBAAgB,UAAU,CAAC,CAAC,EAAE,aAAa,GAAG,MAAM,CAEnD"}
@@ -0,0 +1,9 @@
1
+ import { ModifierKey } from "./ModifierKeys";
2
+ /**
3
+ * Determines whether a modifier key is pressed.
4
+ * @param {KeyboardEvent} e The `KeyboardEvent` to test.
5
+ * @param {ModifierKey[]} modifiers The modifier keys to test.
6
+ * @returns {boolean} A value indicating whether a modifier key is pressed.
7
+ */
8
+ export declare function hasModifierKey(e: KeyboardEvent, ...modifiers: ModifierKey[]): boolean;
9
+ //# sourceMappingURL=hasModifierKey.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"hasModifierKey.d.ts","sourceRoot":"","sources":["../../../../src/a11y/keycodes/hasModifierKey.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAE7C;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,CAAC,EAAE,aAAa,EAAE,GAAG,SAAS,EAAE,WAAW,EAAE,GAAG,OAAO,CAErF"}
@@ -0,0 +1,6 @@
1
+ export * from "./ModifierKeys";
2
+ export * from "./KeyCode";
3
+ export * from "./getKeyCode";
4
+ export * from "./hasModifierKey";
5
+ export * from "./isModifierAllowed";
6
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/a11y/keycodes/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,WAAW,CAAC;AAC1B,cAAc,cAAc,CAAC;AAC7B,cAAc,kBAAkB,CAAC;AACjC,cAAc,qBAAqB,CAAC"}
@@ -0,0 +1,9 @@
1
+ import { ModifierKey } from "./ModifierKeys";
2
+ /**
3
+ * Determines whether the specified modifier keys are allowed.
4
+ * @param {KeyboardEvent} e The `KeyboardEvent` to test.
5
+ * @param {ModifierKey[]} modifiers The allowed modifier keys.
6
+ * @returns {boolean} A value indicating whether `modifiers` are allowed.
7
+ */
8
+ export declare function isModifierAllowed(e: KeyboardEvent, ...modifiers: ModifierKey[]): boolean;
9
+ //# sourceMappingURL=isModifierAllowed.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"isModifierAllowed.d.ts","sourceRoot":"","sources":["../../../../src/a11y/keycodes/isModifierAllowed.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAgB,MAAM,gBAAgB,CAAC;AAE3D;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAAC,CAAC,EAAE,aAAa,EAAE,GAAG,SAAS,EAAE,WAAW,EAAE,GAAG,OAAO,CAExF"}
@@ -0,0 +1,17 @@
1
+ import { ListKeyManager } from "./ListKeyManager";
2
+ /**
3
+ * Utility for managing keyboard events for selectable lists whose items directly receive focus.
4
+ * @template T The type of managed item.
5
+ */
6
+ export declare class FocusKeyManager<T extends HTMLElement> extends ListKeyManager<T> {
7
+ #private;
8
+ /** @inheritdoc */
9
+ setActiveItem(item: T | null | undefined): void;
10
+ /**
11
+ * Configures the key manager with options used to focus items.
12
+ * @param {FocusOptions} options Options used to focus items.
13
+ * @returns {FocusKeyManager<T>} The configured key manager.
14
+ */
15
+ withOptions(options: FocusOptions): this;
16
+ }
17
+ //# sourceMappingURL=FocusKeyManager.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FocusKeyManager.d.ts","sourceRoot":"","sources":["../../../../src/a11y/list-key/FocusKeyManager.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAElD;;;GAGG;AACH,qBAAa,eAAe,CAAC,CAAC,SAAS,WAAW,CAAE,SAAQ,cAAc,CAAC,CAAC,CAAC;;IAG3E,kBAAkB;IACT,aAAa,CAAC,IAAI,EAAE,CAAC,GAAG,IAAI,GAAG,SAAS,GAAG,IAAI;IAKxD;;;;OAIG;IACH,WAAW,CAAC,OAAO,EAAE,YAAY,GAAG,IAAI;CAIzC"}