@m3e/core 1.0.0-rc.1 → 1.0.0-rc.2

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 (338) hide show
  1. package/README.md +1 -2
  2. package/dist/a11y.js +6 -18
  3. package/dist/a11y.js.map +1 -1
  4. package/dist/a11y.min.js +5 -5
  5. package/dist/a11y.min.js.map +1 -1
  6. package/dist/custom-elements.json +3449 -3429
  7. package/dist/html-custom-data.json +14 -6
  8. package/dist/index.js +198 -29
  9. package/dist/index.js.map +1 -1
  10. package/dist/index.min.js +87 -87
  11. package/dist/index.min.js.map +1 -1
  12. package/package.json +1 -1
  13. package/cem.config.mjs +0 -16
  14. package/demo/index.html +0 -58
  15. package/dist/src/a11y/AriaDescriber.d.ts +0 -31
  16. package/dist/src/a11y/AriaDescriber.d.ts.map +0 -1
  17. package/dist/src/a11y/FocusTrapElement.d.ts +0 -25
  18. package/dist/src/a11y/FocusTrapElement.d.ts.map +0 -1
  19. package/dist/src/a11y/InteractivityChecker.d.ts +0 -22
  20. package/dist/src/a11y/InteractivityChecker.d.ts.map +0 -1
  21. package/dist/src/a11y/LiveAnnouncer.d.ts +0 -56
  22. package/dist/src/a11y/LiveAnnouncer.d.ts.map +0 -1
  23. package/dist/src/a11y/aria-reference.d.ts +0 -30
  24. package/dist/src/a11y/aria-reference.d.ts.map +0 -1
  25. package/dist/src/a11y/index.d.ts +0 -8
  26. package/dist/src/a11y/index.d.ts.map +0 -1
  27. package/dist/src/a11y/keycodes/KeyCode.d.ts +0 -118
  28. package/dist/src/a11y/keycodes/KeyCode.d.ts.map +0 -1
  29. package/dist/src/a11y/keycodes/ModifierKeys.d.ts +0 -5
  30. package/dist/src/a11y/keycodes/ModifierKeys.d.ts.map +0 -1
  31. package/dist/src/a11y/keycodes/getKeyCode.d.ts +0 -7
  32. package/dist/src/a11y/keycodes/getKeyCode.d.ts.map +0 -1
  33. package/dist/src/a11y/keycodes/hasModifierKey.d.ts +0 -9
  34. package/dist/src/a11y/keycodes/hasModifierKey.d.ts.map +0 -1
  35. package/dist/src/a11y/keycodes/index.d.ts +0 -6
  36. package/dist/src/a11y/keycodes/index.d.ts.map +0 -1
  37. package/dist/src/a11y/keycodes/isModifierAllowed.d.ts +0 -9
  38. package/dist/src/a11y/keycodes/isModifierAllowed.d.ts.map +0 -1
  39. package/dist/src/a11y/list-key/FocusKeyManager.d.ts +0 -17
  40. package/dist/src/a11y/list-key/FocusKeyManager.d.ts.map +0 -1
  41. package/dist/src/a11y/list-key/ListKeyManager.d.ts +0 -114
  42. package/dist/src/a11y/list-key/ListKeyManager.d.ts.map +0 -1
  43. package/dist/src/a11y/list-key/ListManager.d.ts +0 -37
  44. package/dist/src/a11y/list-key/ListManager.d.ts.map +0 -1
  45. package/dist/src/a11y/list-key/RadioKeyManager.d.ts +0 -20
  46. package/dist/src/a11y/list-key/RadioKeyManager.d.ts.map +0 -1
  47. package/dist/src/a11y/list-key/RovingTabIndexManager.d.ts +0 -22
  48. package/dist/src/a11y/list-key/RovingTabIndexManager.d.ts.map +0 -1
  49. package/dist/src/a11y/list-key/SelectionManager.d.ts +0 -46
  50. package/dist/src/a11y/list-key/SelectionManager.d.ts.map +0 -1
  51. package/dist/src/a11y/list-key/Typeahead.d.ts +0 -64
  52. package/dist/src/a11y/list-key/Typeahead.d.ts.map +0 -1
  53. package/dist/src/a11y/list-key/index.d.ts +0 -8
  54. package/dist/src/a11y/list-key/index.d.ts.map +0 -1
  55. package/dist/src/a11y/visuallyHide.d.ts +0 -6
  56. package/dist/src/a11y/visuallyHide.d.ts.map +0 -1
  57. package/dist/src/anchoring/AnchorOptions.d.ts +0 -15
  58. package/dist/src/anchoring/AnchorOptions.d.ts.map +0 -1
  59. package/dist/src/anchoring/AnchorPosition.d.ts +0 -3
  60. package/dist/src/anchoring/AnchorPosition.d.ts.map +0 -1
  61. package/dist/src/anchoring/index.d.ts +0 -4
  62. package/dist/src/anchoring/index.d.ts.map +0 -1
  63. package/dist/src/anchoring/positionAnchor.d.ts +0 -12
  64. package/dist/src/anchoring/positionAnchor.d.ts.map +0 -1
  65. package/dist/src/bidi/Directionality.d.ts +0 -27
  66. package/dist/src/bidi/Directionality.d.ts.map +0 -1
  67. package/dist/src/bidi/index.d.ts +0 -2
  68. package/dist/src/bidi/index.d.ts.map +0 -1
  69. package/dist/src/index.d.ts +0 -2
  70. package/dist/src/index.d.ts.map +0 -1
  71. package/dist/src/layout/Breakpoint.d.ts +0 -26
  72. package/dist/src/layout/Breakpoint.d.ts.map +0 -1
  73. package/dist/src/layout/BreakpointObserver.d.ts +0 -18
  74. package/dist/src/layout/BreakpointObserver.d.ts.map +0 -1
  75. package/dist/src/layout/index.d.ts +0 -3
  76. package/dist/src/layout/index.d.ts.map +0 -1
  77. package/dist/src/platform/Platform.d.ts +0 -34
  78. package/dist/src/platform/Platform.d.ts.map +0 -1
  79. package/dist/src/platform/index.d.ts +0 -2
  80. package/dist/src/platform/index.d.ts.map +0 -1
  81. package/dist/src/shared/controllers/FocusController.d.ts +0 -30
  82. package/dist/src/shared/controllers/FocusController.d.ts.map +0 -1
  83. package/dist/src/shared/controllers/HoverController.d.ts +0 -40
  84. package/dist/src/shared/controllers/HoverController.d.ts.map +0 -1
  85. package/dist/src/shared/controllers/IntersectionController.d.ts +0 -40
  86. package/dist/src/shared/controllers/IntersectionController.d.ts.map +0 -1
  87. package/dist/src/shared/controllers/LongPressController.d.ts +0 -32
  88. package/dist/src/shared/controllers/LongPressController.d.ts.map +0 -1
  89. package/dist/src/shared/controllers/MonitorControllerBase.d.ts +0 -62
  90. package/dist/src/shared/controllers/MonitorControllerBase.d.ts.map +0 -1
  91. package/dist/src/shared/controllers/MutationController.d.ts +0 -37
  92. package/dist/src/shared/controllers/MutationController.d.ts.map +0 -1
  93. package/dist/src/shared/controllers/PressedController.d.ts +0 -45
  94. package/dist/src/shared/controllers/PressedController.d.ts.map +0 -1
  95. package/dist/src/shared/controllers/ResizeController.d.ts +0 -40
  96. package/dist/src/shared/controllers/ResizeController.d.ts.map +0 -1
  97. package/dist/src/shared/controllers/ScrollController.d.ts +0 -34
  98. package/dist/src/shared/controllers/ScrollController.d.ts.map +0 -1
  99. package/dist/src/shared/controllers/index.d.ts +0 -9
  100. package/dist/src/shared/controllers/index.d.ts.map +0 -1
  101. package/dist/src/shared/decorators/debounce.d.ts +0 -7
  102. package/dist/src/shared/decorators/debounce.d.ts.map +0 -1
  103. package/dist/src/shared/decorators/index.d.ts +0 -2
  104. package/dist/src/shared/decorators/index.d.ts.map +0 -1
  105. package/dist/src/shared/directives/index.d.ts +0 -2
  106. package/dist/src/shared/directives/index.d.ts.map +0 -1
  107. package/dist/src/shared/directives/safeStyleMap.d.ts +0 -44
  108. package/dist/src/shared/directives/safeStyleMap.d.ts.map +0 -1
  109. package/dist/src/shared/index.d.ts +0 -8
  110. package/dist/src/shared/index.d.ts.map +0 -1
  111. package/dist/src/shared/mixins/AttachInternals.d.ts +0 -24
  112. package/dist/src/shared/mixins/AttachInternals.d.ts.map +0 -1
  113. package/dist/src/shared/mixins/Checked.d.ts +0 -24
  114. package/dist/src/shared/mixins/Checked.d.ts.map +0 -1
  115. package/dist/src/shared/mixins/CheckedIndeterminate.d.ts +0 -25
  116. package/dist/src/shared/mixins/CheckedIndeterminate.d.ts.map +0 -1
  117. package/dist/src/shared/mixins/CheckedOrSelected.d.ts +0 -23
  118. package/dist/src/shared/mixins/CheckedOrSelected.d.ts.map +0 -1
  119. package/dist/src/shared/mixins/ConstraintValidation.d.ts +0 -48
  120. package/dist/src/shared/mixins/ConstraintValidation.d.ts.map +0 -1
  121. package/dist/src/shared/mixins/Constructor.d.ts +0 -3
  122. package/dist/src/shared/mixins/Constructor.d.ts.map +0 -1
  123. package/dist/src/shared/mixins/Dirty.d.ts +0 -27
  124. package/dist/src/shared/mixins/Dirty.d.ts.map +0 -1
  125. package/dist/src/shared/mixins/Disabled.d.ts +0 -25
  126. package/dist/src/shared/mixins/Disabled.d.ts.map +0 -1
  127. package/dist/src/shared/mixins/DisabledInteractive.d.ts +0 -25
  128. package/dist/src/shared/mixins/DisabledInteractive.d.ts.map +0 -1
  129. package/dist/src/shared/mixins/EventAttribute.d.ts +0 -11
  130. package/dist/src/shared/mixins/EventAttribute.d.ts.map +0 -1
  131. package/dist/src/shared/mixins/Focusable.d.ts +0 -11
  132. package/dist/src/shared/mixins/Focusable.d.ts.map +0 -1
  133. package/dist/src/shared/mixins/FormAssociated.d.ts +0 -34
  134. package/dist/src/shared/mixins/FormAssociated.d.ts.map +0 -1
  135. package/dist/src/shared/mixins/FormSubmitter.d.ts +0 -31
  136. package/dist/src/shared/mixins/FormSubmitter.d.ts.map +0 -1
  137. package/dist/src/shared/mixins/HtmlFor.d.ts +0 -30
  138. package/dist/src/shared/mixins/HtmlFor.d.ts.map +0 -1
  139. package/dist/src/shared/mixins/KeyboardClick.d.ts +0 -11
  140. package/dist/src/shared/mixins/KeyboardClick.d.ts.map +0 -1
  141. package/dist/src/shared/mixins/Labelled.d.ts +0 -22
  142. package/dist/src/shared/mixins/Labelled.d.ts.map +0 -1
  143. package/dist/src/shared/mixins/LinkButton.d.ts +0 -36
  144. package/dist/src/shared/mixins/LinkButton.d.ts.map +0 -1
  145. package/dist/src/shared/mixins/ReadOnly.d.ts +0 -25
  146. package/dist/src/shared/mixins/ReadOnly.d.ts.map +0 -1
  147. package/dist/src/shared/mixins/Required.d.ts +0 -26
  148. package/dist/src/shared/mixins/Required.d.ts.map +0 -1
  149. package/dist/src/shared/mixins/RequiredConstraintValidation.d.ts +0 -21
  150. package/dist/src/shared/mixins/RequiredConstraintValidation.d.ts.map +0 -1
  151. package/dist/src/shared/mixins/Role.d.ts +0 -13
  152. package/dist/src/shared/mixins/Role.d.ts.map +0 -1
  153. package/dist/src/shared/mixins/Selected.d.ts +0 -24
  154. package/dist/src/shared/mixins/Selected.d.ts.map +0 -1
  155. package/dist/src/shared/mixins/Touched.d.ts +0 -27
  156. package/dist/src/shared/mixins/Touched.d.ts.map +0 -1
  157. package/dist/src/shared/mixins/Vertical.d.ts +0 -24
  158. package/dist/src/shared/mixins/Vertical.d.ts.map +0 -1
  159. package/dist/src/shared/mixins/hasKeys.d.ts +0 -9
  160. package/dist/src/shared/mixins/hasKeys.d.ts.map +0 -1
  161. package/dist/src/shared/mixins/index.d.ts +0 -25
  162. package/dist/src/shared/mixins/index.d.ts.map +0 -1
  163. package/dist/src/shared/primitives/CollapsibleElement.d.ts +0 -58
  164. package/dist/src/shared/primitives/CollapsibleElement.d.ts.map +0 -1
  165. package/dist/src/shared/primitives/ElevationElement.d.ts +0 -88
  166. package/dist/src/shared/primitives/ElevationElement.d.ts.map +0 -1
  167. package/dist/src/shared/primitives/ElevationLevel.d.ts +0 -3
  168. package/dist/src/shared/primitives/ElevationLevel.d.ts.map +0 -1
  169. package/dist/src/shared/primitives/ElevationToken.d.ts +0 -15
  170. package/dist/src/shared/primitives/ElevationToken.d.ts.map +0 -1
  171. package/dist/src/shared/primitives/FocusRingElement.d.ts +0 -78
  172. package/dist/src/shared/primitives/FocusRingElement.d.ts.map +0 -1
  173. package/dist/src/shared/primitives/FocusRingToken.d.ts +0 -17
  174. package/dist/src/shared/primitives/FocusRingToken.d.ts.map +0 -1
  175. package/dist/src/shared/primitives/PseudoCheckboxElement.d.ts +0 -50
  176. package/dist/src/shared/primitives/PseudoCheckboxElement.d.ts.map +0 -1
  177. package/dist/src/shared/primitives/PseudoRadioElement.d.ts +0 -41
  178. package/dist/src/shared/primitives/PseudoRadioElement.d.ts.map +0 -1
  179. package/dist/src/shared/primitives/RippleElement.d.ts +0 -110
  180. package/dist/src/shared/primitives/RippleElement.d.ts.map +0 -1
  181. package/dist/src/shared/primitives/RippleToken.d.ts +0 -12
  182. package/dist/src/shared/primitives/RippleToken.d.ts.map +0 -1
  183. package/dist/src/shared/primitives/ScrollContainerElement.d.ts +0 -64
  184. package/dist/src/shared/primitives/ScrollContainerElement.d.ts.map +0 -1
  185. package/dist/src/shared/primitives/ScrollDividers.d.ts +0 -3
  186. package/dist/src/shared/primitives/ScrollDividers.d.ts.map +0 -1
  187. package/dist/src/shared/primitives/SlideElement.d.ts +0 -48
  188. package/dist/src/shared/primitives/SlideElement.d.ts.map +0 -1
  189. package/dist/src/shared/primitives/StateLayerElement.d.ts +0 -77
  190. package/dist/src/shared/primitives/StateLayerElement.d.ts.map +0 -1
  191. package/dist/src/shared/primitives/StateLayerToken.d.ts +0 -13
  192. package/dist/src/shared/primitives/StateLayerToken.d.ts.map +0 -1
  193. package/dist/src/shared/primitives/TextOverflowElement.d.ts +0 -39
  194. package/dist/src/shared/primitives/TextOverflowElement.d.ts.map +0 -1
  195. package/dist/src/shared/primitives/index.d.ts +0 -13
  196. package/dist/src/shared/primitives/index.d.ts.map +0 -1
  197. package/dist/src/shared/tokens/ColorToken.d.ts +0 -96
  198. package/dist/src/shared/tokens/ColorToken.d.ts.map +0 -1
  199. package/dist/src/shared/tokens/DensityToken.d.ts +0 -15
  200. package/dist/src/shared/tokens/DensityToken.d.ts.map +0 -1
  201. package/dist/src/shared/tokens/DesignToken.d.ts +0 -366
  202. package/dist/src/shared/tokens/DesignToken.d.ts.map +0 -1
  203. package/dist/src/shared/tokens/ElevationToken.d.ts +0 -16
  204. package/dist/src/shared/tokens/ElevationToken.d.ts.map +0 -1
  205. package/dist/src/shared/tokens/MotionToken.d.ts +0 -69
  206. package/dist/src/shared/tokens/MotionToken.d.ts.map +0 -1
  207. package/dist/src/shared/tokens/ScrollbarToken.d.ts +0 -10
  208. package/dist/src/shared/tokens/ScrollbarToken.d.ts.map +0 -1
  209. package/dist/src/shared/tokens/ShapeToken.d.ts +0 -79
  210. package/dist/src/shared/tokens/ShapeToken.d.ts.map +0 -1
  211. package/dist/src/shared/tokens/StateToken.d.ts +0 -10
  212. package/dist/src/shared/tokens/StateToken.d.ts.map +0 -1
  213. package/dist/src/shared/tokens/TypescaleToken.d.ts +0 -220
  214. package/dist/src/shared/tokens/TypescaleToken.d.ts.map +0 -1
  215. package/dist/src/shared/tokens/index.d.ts +0 -2
  216. package/dist/src/shared/tokens/index.d.ts.map +0 -1
  217. package/dist/src/shared/utils/getTextContent.d.ts +0 -8
  218. package/dist/src/shared/utils/getTextContent.d.ts.map +0 -1
  219. package/dist/src/shared/utils/guid.d.ts +0 -6
  220. package/dist/src/shared/utils/guid.d.ts.map +0 -1
  221. package/dist/src/shared/utils/hasAssignedNodes.d.ts +0 -7
  222. package/dist/src/shared/utils/hasAssignedNodes.d.ts.map +0 -1
  223. package/dist/src/shared/utils/index.d.ts +0 -6
  224. package/dist/src/shared/utils/index.d.ts.map +0 -1
  225. package/dist/src/shared/utils/prefersReducedMotion.d.ts +0 -6
  226. package/dist/src/shared/utils/prefersReducedMotion.d.ts.map +0 -1
  227. package/dist/src/shared/utils/scrollIntoViewIfNeeded.d.ts +0 -8
  228. package/dist/src/shared/utils/scrollIntoViewIfNeeded.d.ts.map +0 -1
  229. package/eslint.config.mjs +0 -21
  230. package/rollup.config.js +0 -132
  231. package/src/a11y/AriaDescriber.ts +0 -130
  232. package/src/a11y/FocusTrapElement.ts +0 -136
  233. package/src/a11y/InteractivityChecker.ts +0 -62
  234. package/src/a11y/LiveAnnouncer.ts +0 -143
  235. package/src/a11y/aria-reference.ts +0 -51
  236. package/src/a11y/index.ts +0 -8
  237. package/src/a11y/keycodes/KeyCode.ts +0 -128
  238. package/src/a11y/keycodes/ModifierKeys.ts +0 -5
  239. package/src/a11y/keycodes/getKeyCode.ts +0 -8
  240. package/src/a11y/keycodes/hasModifierKey.ts +0 -11
  241. package/src/a11y/keycodes/index.ts +0 -5
  242. package/src/a11y/keycodes/isModifierAllowed.ts +0 -12
  243. package/src/a11y/list-key/FocusKeyManager.ts +0 -25
  244. package/src/a11y/list-key/ListKeyManager.ts +0 -350
  245. package/src/a11y/list-key/ListManager.ts +0 -66
  246. package/src/a11y/list-key/RadioKeyManager.ts +0 -49
  247. package/src/a11y/list-key/RovingTabIndexManager.ts +0 -56
  248. package/src/a11y/list-key/SelectionManager.ts +0 -132
  249. package/src/a11y/list-key/Typeahead.ts +0 -131
  250. package/src/a11y/list-key/index.ts +0 -7
  251. package/src/a11y/visuallyHide.ts +0 -18
  252. package/src/anchoring/AnchorOptions.ts +0 -19
  253. package/src/anchoring/AnchorPosition.ts +0 -14
  254. package/src/anchoring/index.ts +0 -3
  255. package/src/anchoring/positionAnchor.ts +0 -53
  256. package/src/bidi/Directionality.ts +0 -85
  257. package/src/bidi/index.ts +0 -1
  258. package/src/index.ts +0 -1
  259. package/src/layout/Breakpoint.ts +0 -26
  260. package/src/layout/BreakpointObserver.ts +0 -44
  261. package/src/layout/index.ts +0 -2
  262. package/src/platform/Platform.ts +0 -67
  263. package/src/platform/index.ts +0 -1
  264. package/src/shared/controllers/FocusController.ts +0 -60
  265. package/src/shared/controllers/HoverController.ts +0 -140
  266. package/src/shared/controllers/IntersectionController.ts +0 -81
  267. package/src/shared/controllers/LongPressController.ts +0 -87
  268. package/src/shared/controllers/MonitorControllerBase.ts +0 -99
  269. package/src/shared/controllers/MutationController.ts +0 -89
  270. package/src/shared/controllers/PressedController.ts +0 -137
  271. package/src/shared/controllers/ResizeController.ts +0 -83
  272. package/src/shared/controllers/ScrollController.ts +0 -100
  273. package/src/shared/controllers/index.ts +0 -8
  274. package/src/shared/decorators/debounce.ts +0 -19
  275. package/src/shared/decorators/index.ts +0 -1
  276. package/src/shared/directives/index.ts +0 -1
  277. package/src/shared/directives/safeStyleMap.ts +0 -108
  278. package/src/shared/index.ts +0 -7
  279. package/src/shared/mixins/AttachInternals.ts +0 -48
  280. package/src/shared/mixins/Checked.ts +0 -50
  281. package/src/shared/mixins/CheckedIndeterminate.ts +0 -47
  282. package/src/shared/mixins/CheckedOrSelected.ts +0 -36
  283. package/src/shared/mixins/ConstraintValidation.ts +0 -213
  284. package/src/shared/mixins/Constructor.ts +0 -2
  285. package/src/shared/mixins/Dirty.ts +0 -71
  286. package/src/shared/mixins/Disabled.ts +0 -49
  287. package/src/shared/mixins/DisabledInteractive.ts +0 -78
  288. package/src/shared/mixins/EventAttribute.ts +0 -25
  289. package/src/shared/mixins/Focusable.ts +0 -52
  290. package/src/shared/mixins/FormAssociated.ts +0 -152
  291. package/src/shared/mixins/FormSubmitter.ts +0 -123
  292. package/src/shared/mixins/HtmlFor.ts +0 -89
  293. package/src/shared/mixins/KeyboardClick.ts +0 -46
  294. package/src/shared/mixins/Labelled.ts +0 -88
  295. package/src/shared/mixins/LinkButton.ts +0 -169
  296. package/src/shared/mixins/ReadOnly.ts +0 -48
  297. package/src/shared/mixins/Required.ts +0 -50
  298. package/src/shared/mixins/RequiredConstraintValidation.ts +0 -45
  299. package/src/shared/mixins/Role.ts +0 -134
  300. package/src/shared/mixins/Selected.ts +0 -50
  301. package/src/shared/mixins/Touched.ts +0 -71
  302. package/src/shared/mixins/Vertical.ts +0 -44
  303. package/src/shared/mixins/hasKeys.ts +0 -10
  304. package/src/shared/mixins/index.ts +0 -24
  305. package/src/shared/primitives/CollapsibleElement.ts +0 -227
  306. package/src/shared/primitives/ElevationElement.ts +0 -254
  307. package/src/shared/primitives/ElevationLevel.ts +0 -2
  308. package/src/shared/primitives/ElevationToken.ts +0 -18
  309. package/src/shared/primitives/FocusRingElement.ts +0 -199
  310. package/src/shared/primitives/FocusRingToken.ts +0 -24
  311. package/src/shared/primitives/PseudoCheckboxElement.ts +0 -116
  312. package/src/shared/primitives/PseudoRadioElement.ts +0 -83
  313. package/src/shared/primitives/RippleElement.ts +0 -289
  314. package/src/shared/primitives/RippleToken.ts +0 -15
  315. package/src/shared/primitives/ScrollContainerElement.ts +0 -151
  316. package/src/shared/primitives/ScrollDividers.ts +0 -2
  317. package/src/shared/primitives/SlideElement.ts +0 -128
  318. package/src/shared/primitives/StateLayerElement.ts +0 -191
  319. package/src/shared/primitives/StateLayerToken.ts +0 -16
  320. package/src/shared/primitives/TextOverflowElement.ts +0 -60
  321. package/src/shared/primitives/index.ts +0 -12
  322. package/src/shared/tokens/ColorToken.ts +0 -142
  323. package/src/shared/tokens/DensityToken.ts +0 -23
  324. package/src/shared/tokens/DesignToken.ts +0 -35
  325. package/src/shared/tokens/ElevationToken.ts +0 -115
  326. package/src/shared/tokens/MotionToken.ts +0 -107
  327. package/src/shared/tokens/ScrollbarToken.ts +0 -13
  328. package/src/shared/tokens/ShapeToken.ts +0 -138
  329. package/src/shared/tokens/StateToken.ts +0 -13
  330. package/src/shared/tokens/TypescaleToken.ts +0 -230
  331. package/src/shared/tokens/index.ts +0 -1
  332. package/src/shared/utils/getTextContent.ts +0 -31
  333. package/src/shared/utils/guid.ts +0 -11
  334. package/src/shared/utils/hasAssignedNodes.ts +0 -8
  335. package/src/shared/utils/index.ts +0 -5
  336. package/src/shared/utils/prefersReducedMotion.ts +0 -9
  337. package/src/shared/utils/scrollIntoViewIfNeeded.ts +0 -18
  338. package/tsconfig.json +0 -9
@@ -1,128 +0,0 @@
1
- /** Specifies known key code values. */
2
- export 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
-
18
- LeftArrow = 37,
19
- UpArrow = 38,
20
- RightArrow = 39,
21
- DownArrow = 40,
22
-
23
- Insert = 45,
24
- Delete = 46,
25
-
26
- Zero = 48,
27
- ClosedParen = Zero,
28
- One = 49,
29
- ExclamationMark = One,
30
- Two = 50,
31
- AtSign = Two,
32
- Three = 51,
33
- PoundSign = Three,
34
- Hash = PoundSign,
35
- Four = 52,
36
- DollarSign = Four,
37
- Five = 53,
38
- PercentSign = Five,
39
- Six = 54,
40
- Caret = Six,
41
- Hat = Caret,
42
- Seven = 55,
43
- Ampersand = Seven,
44
- Eight = 56,
45
- Star = Eight,
46
- Asterik = Star,
47
- Nine = 57,
48
- OpenParen = Nine,
49
-
50
- A = 65,
51
- B = 66,
52
- C = 67,
53
- D = 68,
54
- E = 69,
55
- F = 70,
56
- G = 71,
57
- H = 72,
58
- I = 73,
59
- J = 74,
60
- K = 75,
61
- L = 76,
62
- M = 77,
63
- N = 78,
64
- O = 79,
65
- P = 80,
66
- Q = 81,
67
- R = 82,
68
- S = 83,
69
- T = 84,
70
- U = 85,
71
- V = 86,
72
- W = 87,
73
- X = 88,
74
- Y = 89,
75
- Z = 90,
76
-
77
- LeftWindowKey = 91,
78
- RightWindowKey = 92,
79
- SelectKey = 93,
80
-
81
- Numpad0 = 96,
82
- Numpad1 = 97,
83
- Numpad2 = 98,
84
- Numpad3 = 99,
85
- Numpad4 = 100,
86
- Numpad5 = 101,
87
- Numpad6 = 102,
88
- Numpad7 = 103,
89
- Numpad8 = 104,
90
- Numpad9 = 105,
91
-
92
- Multiply = 106,
93
- Add = 107,
94
- Subtract = 109,
95
- DecimalPoint = 110,
96
- Divide = 111,
97
-
98
- F1 = 112,
99
- F2 = 113,
100
- F3 = 114,
101
- F4 = 115,
102
- F5 = 116,
103
- F6 = 117,
104
- F7 = 118,
105
- F8 = 119,
106
- F9 = 120,
107
- F10 = 121,
108
- F11 = 122,
109
- F12 = 123,
110
-
111
- NumLock = 144,
112
- ScrollLock = 145,
113
-
114
- SemiColon = 186,
115
- Equals = 187,
116
- Comma = 188,
117
- Dash = 189,
118
- Period = 190,
119
- UnderScore = Dash,
120
- PlusSign = Equals,
121
- ForwardSlash = 191,
122
- Tilde = 192,
123
- GraveAccent = Tilde,
124
-
125
- OpenBracket = 219,
126
- ClosedBracket = 221,
127
- Quote = 222,
128
- }
@@ -1,5 +0,0 @@
1
- /** Specifies the keyboard modifier keys. */
2
- export type ModifierKey = "alt" | "shift" | "ctrl" | "meta";
3
-
4
- /** The modifier keys. */
5
- export const ModifierKeys: readonly ModifierKey[] = ["alt", "shift", "ctrl", "meta"];
@@ -1,8 +0,0 @@
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 function getKeyCode(e: KeyboardEvent): number {
7
- return e.which || e.charCode || e.keyCode;
8
- }
@@ -1,11 +0,0 @@
1
- import { ModifierKey } from "./ModifierKeys";
2
-
3
- /**
4
- * Determines whether a modifier key is pressed.
5
- * @param {KeyboardEvent} e The `KeyboardEvent` to test.
6
- * @param {ModifierKey[]} modifiers The modifier keys to test.
7
- * @returns {boolean} A value indicating whether a modifier key is pressed.
8
- */
9
- export function hasModifierKey(e: KeyboardEvent, ...modifiers: ModifierKey[]): boolean {
10
- return modifiers.length ? modifiers.some((x) => e[`${x}Key`]) : e.altKey || e.shiftKey || e.ctrlKey || e.metaKey;
11
- }
@@ -1,5 +0,0 @@
1
- export * from "./ModifierKeys";
2
- export * from "./KeyCode";
3
- export * from "./getKeyCode";
4
- export * from "./hasModifierKey";
5
- export * from "./isModifierAllowed";
@@ -1,12 +0,0 @@
1
- import { hasModifierKey } from "./hasModifierKey";
2
- import { ModifierKey, ModifierKeys } from "./ModifierKeys";
3
-
4
- /**
5
- * Determines whether the specified modifier keys are allowed.
6
- * @param {KeyboardEvent} e The `KeyboardEvent` to test.
7
- * @param {ModifierKey[]} modifiers The allowed modifier keys.
8
- * @returns {boolean} A value indicating whether `modifiers` are allowed.
9
- */
10
- export function isModifierAllowed(e: KeyboardEvent, ...modifiers: ModifierKey[]): boolean {
11
- return ModifierKeys.every((x) => !hasModifierKey(e, x) || modifiers.includes(x));
12
- }
@@ -1,25 +0,0 @@
1
- import { ListKeyManager } from "./ListKeyManager";
2
-
3
- /**
4
- * Utility for managing keyboard events for selectable lists whose items directly receive focus.
5
- * @template T The type of managed item.
6
- */
7
- export class FocusKeyManager<T extends HTMLElement> extends ListKeyManager<T> {
8
- /** @private */ #focusOptions?: FocusOptions;
9
-
10
- /** @inheritdoc */
11
- override setActiveItem(item: T | null | undefined): void {
12
- super.setActiveItem(item);
13
- item?.focus(this.#focusOptions);
14
- }
15
-
16
- /**
17
- * Configures the key manager with options used to focus items.
18
- * @param {FocusOptions} options Options used to focus items.
19
- * @returns {FocusKeyManager<T>} The configured key manager.
20
- */
21
- withOptions(options: FocusOptions): this {
22
- this.#focusOptions = options;
23
- return this;
24
- }
25
- }
@@ -1,350 +0,0 @@
1
- /**
2
- * Adapted from Angular Material CDK KeyManager
3
- * Source: https://github.com/angular/components/blob/main/src/cdk/a11y/key-manager/list-key-manager.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
- import { hasModifierKey, isModifierAllowed, ModifierKey } from "../keycodes";
11
- import { isDisabledMixin } from "../../shared/mixins/Disabled";
12
-
13
- import { ListManager } from "./ListManager";
14
- import { Typeahead, TypeaheadItem } from "./Typeahead";
15
-
16
- /**
17
- * Utility for managing keyboard events for selectable lists.
18
- * @template T The type of managed item.
19
- */
20
- export class ListKeyManager<T extends HTMLElement & TypeaheadItem> extends ListManager<T> {
21
- /** @private */ #typeahead?: Typeahead<T>;
22
-
23
- /**
24
- * Whether the active item will wrap to the other end of
25
- * list when there are no more items in the given direction.
26
- * @default false
27
- */
28
- public wrap = false;
29
-
30
- /**
31
- * Whether to activate the first and last items respectively when
32
- * the `HOME` or `END` key is pressed.
33
- * @default false
34
- */
35
- public homeAndEnd = false;
36
-
37
- /**
38
- * Whether to activate every 10th (or configured) first/last item
39
- * in the up/down direction when the `PAGEUP` or `PAGEDOWN` key is pressed.
40
- * @default false
41
- */
42
- public pageUpAndDown = false;
43
-
44
- /**
45
- * The number of items to skip when the `PAGEUP` or `PAGEDOWN` key is pressed.
46
- * @default 10
47
- */
48
- public pageDelta = 10;
49
-
50
- /**
51
- * Whether to the list is oriented vertically.
52
- * @default false
53
- */
54
- public vertical = false;
55
-
56
- /** The allowed modifier keys.
57
- * @default []
58
- */
59
- public allowedModifiers: ModifierKey[] = [];
60
-
61
- /**
62
- * A function used to skip items.
63
- * @param {T} item The item to test.
64
- * @returns {boolean} Whether `item` should be skipped.
65
- */
66
- public skipPredicate: (item: T) => boolean = (item) => isDisabledMixin(item) && item.disabled;
67
-
68
- /** @inheritdoc */
69
- override setItems(items: T[]): { added: readonly T[]; removed: readonly T[] } {
70
- this.#typeahead?.setItems(items);
71
- return super.setItems(items);
72
- }
73
-
74
- /** @inheritdoc */
75
- override updateActiveItem(item: T | null | undefined): void {
76
- super.updateActiveItem(item);
77
- if (this.#typeahead) {
78
- this.#typeahead.setSelectedIndex(item ? this.items.indexOf(item) : -1);
79
- }
80
- }
81
-
82
- /**
83
- * Configures the key manager to activate the first and last items respectively when the `HOME` or `END` key is pressed.
84
- * @param {boolean} [enabled = true] Whether to activate the first and last items respectively when
85
- * the `HOME` or `END` key is pressed.
86
- * @returns {ListKeyManager<T>} The configured key manager.
87
- */
88
- withHomeAndEnd(enabled: boolean = true): this {
89
- this.homeAndEnd = enabled;
90
- return this;
91
- }
92
-
93
- /**
94
- * Configures the key manager to page up and down when the `PAGEUP` or `PAGEDOWN` key is pressed.
95
- * @param {boolean} [enabled = true] Whether to activate page up and down when the `PAGEUP` or `PAGEDOWN` key is pressed.
96
- * @param {number} [pageDelta=10] The number of items to skip when the `PAGEUP` or `PAGEDOWN` key is pressed.
97
- * @returns {ListKeyManager<T>} The configured key manager.
98
- */
99
- withPageUpAndDown(enabled: boolean = true, pageDelta: number = 10): this {
100
- this.pageUpAndDown = enabled;
101
- this.pageDelta = pageDelta;
102
- return this;
103
- }
104
-
105
- /**
106
- * Configures wrapping mode, which determines whether the active item will wrap to the other end of list when there are no more items in the given direction.
107
- * @param {boolean} [enabled = true] Whether the active item will wrap to the other end of
108
- * list when there are no more items in the given direction.
109
- * @returns {ListKeyManager<T>} The configured key manager.
110
- */
111
- withWrap(enabled: boolean = true): this {
112
- this.wrap = enabled;
113
- return this;
114
- }
115
-
116
- /**
117
- * Configures whether to move the selection vertically.
118
- * @param {boolean} [enabled = true] Whether to move selection vertically.
119
- * @returns {ListKeyManager<T>} The configured key manager.
120
- */
121
- withVerticalOrientation(enabled: boolean = true): this {
122
- this.vertical = enabled;
123
- return this;
124
- }
125
-
126
- /**
127
- * Configured allowed modifier keys.
128
- * @param {ModifierKey[]} modifiers The allowed modifier keys.
129
- * @returns {ListKeyManager<T>} The configured key manager.
130
- */
131
- withAllowedModifiers(...modifiers: ModifierKey[]): this {
132
- this.allowedModifiers = modifiers;
133
- return this;
134
- }
135
-
136
- /**
137
- * Configures whether typeahead is enabled.
138
- * @param {boolean} [enabled = true] Whether typeahead is enabled.
139
- * @returns {ListKeyManager<T>} The configured key manager.
140
- */
141
- withTypeahead(enabled: boolean = true): this {
142
- if (enabled) {
143
- this.#typeahead = new Typeahead<T>({ callback: (item) => this.setActiveItem(item) });
144
- } else {
145
- this.#typeahead = undefined;
146
- }
147
- return this;
148
- }
149
-
150
- /**
151
- * Configures a function used to test whether an item should be skipped.
152
- * @param skipPredicate A function used to determine whether an item should be skipped.
153
- * @returns {ListKeyManager<T>} The configured key manager.
154
- */
155
- withSkipPredicate(skipPredicate: (item: T) => boolean): this {
156
- this.skipPredicate = skipPredicate;
157
- return this;
158
- }
159
-
160
- /**
161
- * Sets the active item depending on the key event passed in.
162
- * @param {KeyboardEvent} e The keyboard event to be used for determining which element should be active.
163
- */
164
- onKeyDown(e: KeyboardEvent): void {
165
- if (e.defaultPrevented) return;
166
-
167
- const modifierAllowed = isModifierAllowed(e, ...this.allowedModifiers);
168
-
169
- switch (e.key) {
170
- case "Left":
171
- case "ArrowLeft":
172
- if (modifierAllowed && !this.vertical) {
173
- e.preventDefault();
174
- const prev = this.#findPrevious();
175
- if (prev) {
176
- this.setActiveItem(prev);
177
- }
178
- }
179
- break;
180
- case "Up":
181
- case "ArrowUp":
182
- if (modifierAllowed) {
183
- e.preventDefault();
184
- const prev = this.#findPrevious();
185
- if (prev) {
186
- this.setActiveItem(prev);
187
- }
188
- }
189
-
190
- break;
191
-
192
- case "Right":
193
- case "ArrowRight":
194
- if (modifierAllowed && !this.vertical) {
195
- e.preventDefault();
196
- const next = this.#findNext();
197
- if (next) {
198
- this.setActiveItem(next);
199
- }
200
- }
201
- break;
202
-
203
- case "Down":
204
- case "ArrowDown":
205
- if (modifierAllowed) {
206
- e.preventDefault();
207
- const next = this.#findNext();
208
- if (next) {
209
- this.setActiveItem(next);
210
- }
211
- }
212
-
213
- break;
214
-
215
- case "Home":
216
- if (modifierAllowed && this.homeAndEnd) {
217
- e.preventDefault();
218
- const first = this.#findFirst();
219
- if (first) {
220
- this.setActiveItem(first);
221
- }
222
- }
223
-
224
- break;
225
-
226
- case "End":
227
- if (modifierAllowed && this.homeAndEnd) {
228
- e.preventDefault();
229
- const last = this.#findLast();
230
- if (last) {
231
- this.setActiveItem(last);
232
- }
233
- }
234
-
235
- break;
236
-
237
- case "PageUp":
238
- if (modifierAllowed && this.pageUpAndDown) {
239
- e.preventDefault();
240
- const prev = this.#findPreviousByIndex(
241
- this.activeItem ? Math.max(0, this.items.indexOf(this.activeItem) - this.pageDelta) : 0
242
- );
243
- if (prev) {
244
- this.setActiveItem(prev);
245
- }
246
- }
247
-
248
- break;
249
-
250
- case "PageDown":
251
- if (modifierAllowed && this.pageUpAndDown) {
252
- e.preventDefault();
253
- const next = this.#findNextByIndex(
254
- this.activeItem
255
- ? Math.min(this.items.length - 1, this.items.indexOf(this.activeItem) + this.pageDelta)
256
- : this.items.length - 1
257
- );
258
- if (next) {
259
- this.setActiveItem(next);
260
- }
261
- }
262
-
263
- break;
264
-
265
- default:
266
- if (modifierAllowed || hasModifierKey(e, "shift")) {
267
- this.#typeahead?.onKeyDown(e);
268
- }
269
- break;
270
- }
271
- }
272
-
273
- /** @private */
274
- #findFirst(): T | null {
275
- for (let i = 0; i < this.items.length; i++) {
276
- if (this.items[i] === this.activeItem) break;
277
- const test = this.items[i];
278
- if (!this.skipPredicate(test)) {
279
- return test;
280
- }
281
- }
282
- return null;
283
- }
284
-
285
- /** @private */
286
- #findLast(): T | null {
287
- for (let i = this.items.length - 1; i >= 0; i--) {
288
- if (this.items[i] === this.activeItem) break;
289
- const test = this.items[i];
290
- if (!this.skipPredicate(test)) {
291
- return test;
292
- }
293
- }
294
- return null;
295
- }
296
-
297
- /** @private */
298
- #findNext(): T | null {
299
- for (let i = 0; i < this.items.length; i++) {
300
- if (this.items[i] === this.activeItem) {
301
- for (let j = i + 1; j < this.items.length; j++) {
302
- const test = this.items[j];
303
- if (!this.skipPredicate(test)) {
304
- return test;
305
- }
306
- }
307
- break;
308
- }
309
- }
310
- return this.wrap ? this.#findFirst() : null;
311
- }
312
-
313
- /** @private */
314
- #findPrevious(): T | null {
315
- for (let i = 0; i < this.items.length; i++) {
316
- if (this.items[i] === this.activeItem) {
317
- for (let j = i - 1; j >= 0; j--) {
318
- const test = this.items[j];
319
- if (!this.skipPredicate(test)) {
320
- return test;
321
- }
322
- }
323
- break;
324
- }
325
- }
326
- return this.wrap ? this.#findLast() : null;
327
- }
328
-
329
- /** @private */
330
- #findPreviousByIndex(index: number): T | null {
331
- for (let i = index; i >= 0; i--) {
332
- const test = this.items[i];
333
- if (!this.skipPredicate(test)) {
334
- return test;
335
- }
336
- }
337
- return null;
338
- }
339
-
340
- /** @private */
341
- #findNextByIndex(index: number): T | null {
342
- for (let i = index; i < this.items.length; i++) {
343
- const test = this.items[i];
344
- if (!this.skipPredicate(test)) {
345
- return test;
346
- }
347
- }
348
- return null;
349
- }
350
- }
@@ -1,66 +0,0 @@
1
- /**
2
- * Utility for managing a list of items which supports activation.
3
- * @template T The type of managed item.
4
- */
5
- export class ListManager<T> {
6
- /** @private */ #items = new Array<T>();
7
- /** @private */ #activeItem: T | null = null;
8
- /** @private */ #onActiveItemChangeCallback?: () => void;
9
-
10
- /** The items being managed. */
11
- get items(): ReadonlyArray<T> {
12
- return this.#items;
13
- }
14
-
15
- /** The active item. */
16
- get activeItem(): T | null {
17
- return this.#activeItem;
18
- }
19
-
20
- /**
21
- * Sets the items to manage.
22
- * @param {Array<T>} items The new items.
23
- * @returns {{ added: ReadonlyArray<T>; removed: ReadonlyArray<T> }} An object specifying added and removed items.
24
- */
25
- setItems(items: Array<T>): { added: ReadonlyArray<T>; removed: ReadonlyArray<T> } {
26
- const removed = this.items.filter((x) => !items.includes(x));
27
- const added = items.filter((x) => !this.items.includes(x));
28
-
29
- this.#items = items;
30
-
31
- if (this.activeItem && !this.items.includes(this.activeItem)) {
32
- this.updateActiveItem(null);
33
- }
34
-
35
- return { added, removed };
36
- }
37
-
38
- /**
39
- * Sets the active item.
40
- * @param {T | null | undefined} item The new active item.
41
- */
42
- setActiveItem(item: T | null | undefined): void {
43
- if (this.activeItem !== item) {
44
- this.updateActiveItem(item);
45
- this.#onActiveItemChangeCallback?.();
46
- }
47
- }
48
-
49
- /**
50
- * Updates the active item.
51
- * @param {T | null | undefined} item The active item.
52
- */
53
- updateActiveItem(item: T | null | undefined): void {
54
- this.#activeItem = item ?? null;
55
- }
56
-
57
- /**
58
- * Configures the list manager with a callback invoked when an item is activated.
59
- * @param {() => void} callback The callback invoked when an item is activated.
60
- * @returns {ListManager<T>} The configured list manager.
61
- */
62
- onActiveItemChange(callback: () => void): this {
63
- this.#onActiveItemChangeCallback = callback;
64
- return this;
65
- }
66
- }
@@ -1,49 +0,0 @@
1
- import { LitElement } from "lit";
2
-
3
- import { CheckedOrSelectedMixin, isCheckedOrSelected } from "../../shared/mixins/CheckedOrSelected";
4
- import { DisabledMixin } from "../../shared/mixins/Disabled";
5
-
6
- import { RovingTabIndexManager } from "./RovingTabIndexManager";
7
-
8
- /**
9
- * Utility for managing keyboard events for selectable lists whose items behave like a radio.
10
- * @template T The type of managed item.
11
- */
12
- export class RadioKeyManager<
13
- T extends LitElement & DisabledMixin & CheckedOrSelectedMixin
14
- > extends RovingTabIndexManager<T> {
15
- /** @private */ #disabled = false;
16
-
17
- /** A value indicating whether managed items are disabled. */
18
- get disabled(): boolean {
19
- return this.#disabled;
20
- }
21
- set disabled(value: boolean) {
22
- this.#disabled = value;
23
- this.items.forEach((x) => (x.disabled = value));
24
- }
25
-
26
- /** @inheritdoc */
27
- override setItems(items: T[]): { added: readonly T[]; removed: readonly T[] } {
28
- if (this.disabled) {
29
- items.forEach((x) => (x.disabled = true));
30
- }
31
-
32
- const { added, removed } = super.setItems(items);
33
-
34
- if (added.length > 0 || removed.length > 0) {
35
- if (!this.activeItem) {
36
- this.updateActiveItem(added.find((x) => !this.skipPredicate(x)) ?? null);
37
- }
38
-
39
- if (this.activeItem && (this.activeItem.disabled || !isCheckedOrSelected(this.activeItem))) {
40
- const checked = added.find((x) => !this.skipPredicate(x) && isCheckedOrSelected(x));
41
- if (checked) {
42
- this.updateActiveItem(checked);
43
- }
44
- }
45
- }
46
-
47
- return { added, removed };
48
- }
49
- }