igniteui-webcomponents 7.3.2 → 7.4.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 (478) hide show
  1. package/CHANGELOG.md +87 -0
  2. package/animations/easings.d.ts +21 -31
  3. package/animations/easings.js +21 -34
  4. package/animations/easings.js.map +1 -1
  5. package/animations/player.d.ts +8 -16
  6. package/animations/player.js +5 -8
  7. package/animations/player.js.map +1 -1
  8. package/animations/view-transition.d.ts +10 -10
  9. package/animations/view-transition.js +26 -37
  10. package/animations/view-transition.js.map +1 -1
  11. package/components/breadcrumb/breadcrumb.d.ts +74 -0
  12. package/components/breadcrumb/breadcrumb.js +107 -0
  13. package/components/breadcrumb/breadcrumb.js.map +1 -0
  14. package/components/breadcrumb/breadcrumbs.d.ts +60 -0
  15. package/components/breadcrumb/breadcrumbs.js +50 -0
  16. package/components/breadcrumb/breadcrumbs.js.map +1 -0
  17. package/components/breadcrumb/themes/breadcrumb.base.css.js +3 -0
  18. package/components/breadcrumb/themes/breadcrumb.base.css.js.map +1 -0
  19. package/components/breadcrumb/themes/breadcrumbs.base.css.d.ts +1 -0
  20. package/components/{resize-container/themes/resize-container.base.css.js → breadcrumb/themes/breadcrumbs.base.css.js} +2 -2
  21. package/components/breadcrumb/themes/breadcrumbs.base.css.js.map +1 -0
  22. package/components/breadcrumb/themes/dark/breadcrumb.bootstrap.css.d.ts +1 -0
  23. package/components/breadcrumb/themes/dark/breadcrumb.bootstrap.css.js +3 -0
  24. package/components/breadcrumb/themes/dark/breadcrumb.bootstrap.css.js.map +1 -0
  25. package/components/breadcrumb/themes/dark/breadcrumb.fluent.css.d.ts +1 -0
  26. package/components/breadcrumb/themes/dark/breadcrumb.fluent.css.js +3 -0
  27. package/components/breadcrumb/themes/dark/breadcrumb.fluent.css.js.map +1 -0
  28. package/components/breadcrumb/themes/dark/breadcrumb.indigo.css.d.ts +1 -0
  29. package/components/breadcrumb/themes/dark/breadcrumb.indigo.css.js +3 -0
  30. package/components/breadcrumb/themes/dark/breadcrumb.indigo.css.js.map +1 -0
  31. package/components/breadcrumb/themes/dark/breadcrumb.material.css.d.ts +1 -0
  32. package/components/breadcrumb/themes/dark/breadcrumb.material.css.js +3 -0
  33. package/components/breadcrumb/themes/dark/breadcrumb.material.css.js.map +1 -0
  34. package/components/breadcrumb/themes/light/breadcrumb.bootstrap.css.d.ts +1 -0
  35. package/components/breadcrumb/themes/light/breadcrumb.bootstrap.css.js +3 -0
  36. package/components/breadcrumb/themes/light/breadcrumb.bootstrap.css.js.map +1 -0
  37. package/components/breadcrumb/themes/light/breadcrumb.fluent.css.d.ts +1 -0
  38. package/components/breadcrumb/themes/light/breadcrumb.fluent.css.js +3 -0
  39. package/components/breadcrumb/themes/light/breadcrumb.fluent.css.js.map +1 -0
  40. package/components/breadcrumb/themes/light/breadcrumb.indigo.css.d.ts +1 -0
  41. package/components/breadcrumb/themes/light/breadcrumb.indigo.css.js +3 -0
  42. package/components/breadcrumb/themes/light/breadcrumb.indigo.css.js.map +1 -0
  43. package/components/breadcrumb/themes/light/breadcrumb.material.css.d.ts +1 -0
  44. package/components/breadcrumb/themes/light/breadcrumb.material.css.js +3 -0
  45. package/components/breadcrumb/themes/light/breadcrumb.material.css.js.map +1 -0
  46. package/components/breadcrumb/themes/light/breadcrumb.shared.css.d.ts +1 -0
  47. package/components/breadcrumb/themes/light/breadcrumb.shared.css.js +3 -0
  48. package/components/breadcrumb/themes/light/breadcrumb.shared.css.js.map +1 -0
  49. package/components/breadcrumb/themes/shared/breadcrumb.bootstrap.css.d.ts +1 -0
  50. package/components/breadcrumb/themes/shared/breadcrumb.bootstrap.css.js +3 -0
  51. package/components/breadcrumb/themes/shared/breadcrumb.bootstrap.css.js.map +1 -0
  52. package/components/breadcrumb/themes/shared/breadcrumb.common.css.d.ts +1 -0
  53. package/components/breadcrumb/themes/shared/breadcrumb.common.css.js +3 -0
  54. package/components/breadcrumb/themes/shared/breadcrumb.common.css.js.map +1 -0
  55. package/components/breadcrumb/themes/shared/breadcrumb.fluent.css.d.ts +1 -0
  56. package/components/breadcrumb/themes/shared/breadcrumb.fluent.css.js +3 -0
  57. package/components/breadcrumb/themes/shared/breadcrumb.fluent.css.js.map +1 -0
  58. package/components/breadcrumb/themes/shared/breadcrumb.indigo.css.d.ts +1 -0
  59. package/components/breadcrumb/themes/shared/breadcrumb.indigo.css.js +3 -0
  60. package/components/breadcrumb/themes/shared/breadcrumb.indigo.css.js.map +1 -0
  61. package/components/breadcrumb/themes/shared/breadcrumb.material.css.d.ts +1 -0
  62. package/components/breadcrumb/themes/shared/breadcrumb.material.css.js +3 -0
  63. package/components/breadcrumb/themes/shared/breadcrumb.material.css.js.map +1 -0
  64. package/components/breadcrumb/themes/themes.d.ts +2 -0
  65. package/components/breadcrumb/themes/themes.js +50 -0
  66. package/components/breadcrumb/themes/themes.js.map +1 -0
  67. package/components/button/button.d.ts +0 -2
  68. package/components/button/button.js.map +1 -1
  69. package/components/button-group/button-group.d.ts +42 -12
  70. package/components/button-group/button-group.js +82 -34
  71. package/components/button-group/button-group.js.map +1 -1
  72. package/components/button-group/toggle-button.d.ts +6 -1
  73. package/components/button-group/toggle-button.js +28 -2
  74. package/components/button-group/toggle-button.js.map +1 -1
  75. package/components/calendar/base.js +2 -1
  76. package/components/calendar/base.js.map +1 -1
  77. package/components/calendar/calendar.d.ts +2 -3
  78. package/components/calendar/calendar.js.map +1 -1
  79. package/components/calendar/days-view/days-view.d.ts +2 -2
  80. package/components/calendar/days-view/days-view.js.map +1 -1
  81. package/components/carousel/carousel-indicator.js +1 -0
  82. package/components/carousel/carousel-indicator.js.map +1 -1
  83. package/components/carousel/carousel-slide.d.ts +1 -1
  84. package/components/carousel/carousel-slide.js.map +1 -1
  85. package/components/carousel/carousel.d.ts +3 -3
  86. package/components/carousel/carousel.js.map +1 -1
  87. package/components/chat/chat-input.d.ts +1 -2
  88. package/components/chat/chat-input.js +1 -1
  89. package/components/chat/chat-input.js.map +1 -1
  90. package/components/chat/chat-state.d.ts +8 -9
  91. package/components/chat/chat-state.js.map +1 -1
  92. package/components/chat/chat.d.ts +1 -3
  93. package/components/chat/chat.js +2 -2
  94. package/components/chat/chat.js.map +1 -1
  95. package/components/chat/message-attachments.d.ts +6 -15
  96. package/components/chat/message-attachments.js.map +1 -1
  97. package/components/chat/utils.d.ts +0 -1
  98. package/components/chat/utils.js +1 -1
  99. package/components/chat/utils.js.map +1 -1
  100. package/components/checkbox/checkbox-base.d.ts +3 -1
  101. package/components/checkbox/checkbox-base.js +4 -0
  102. package/components/checkbox/checkbox-base.js.map +1 -1
  103. package/components/checkbox/checkbox.js +4 -12
  104. package/components/checkbox/checkbox.js.map +1 -1
  105. package/components/checkbox/switch.js +1 -8
  106. package/components/checkbox/switch.js.map +1 -1
  107. package/components/chip/chip.d.ts +2 -2
  108. package/components/chip/chip.js.map +1 -1
  109. package/components/color-picker/color-picker.d.ts +35 -34
  110. package/components/color-picker/color-picker.js +12 -7
  111. package/components/color-picker/color-picker.js.map +1 -1
  112. package/components/color-picker/common.d.ts +0 -2
  113. package/components/color-picker/common.js +2 -2
  114. package/components/color-picker/common.js.map +1 -1
  115. package/components/color-picker/converters.js.map +1 -1
  116. package/components/color-picker/picker-canvas.js.map +1 -1
  117. package/components/combo/combo.d.ts +24 -24
  118. package/components/combo/combo.js +21 -26
  119. package/components/combo/combo.js.map +1 -1
  120. package/components/combo/controllers/data.d.ts +7 -10
  121. package/components/combo/controllers/data.js.map +1 -1
  122. package/components/date-picker/date-picker.base.d.ts +22 -27
  123. package/components/date-picker/date-picker.base.js +9 -3
  124. package/components/date-picker/date-picker.base.js.map +1 -1
  125. package/components/date-picker/date-picker.d.ts +1 -1
  126. package/components/date-picker/date-picker.js +5 -3
  127. package/components/date-picker/date-picker.js.map +1 -1
  128. package/components/date-range-picker/date-range-input.d.ts +0 -2
  129. package/components/date-range-picker/date-range-input.js +0 -6
  130. package/components/date-range-picker/date-range-input.js.map +1 -1
  131. package/components/date-range-picker/date-range-picker.d.ts +22 -31
  132. package/components/date-range-picker/date-range-picker.js +7 -7
  133. package/components/date-range-picker/date-range-picker.js.map +1 -1
  134. package/components/date-range-picker/i18n.d.ts +21 -0
  135. package/components/date-range-picker/i18n.js +10 -0
  136. package/components/date-range-picker/i18n.js.map +1 -0
  137. package/components/date-range-picker/predefined-ranges-area.d.ts +3 -3
  138. package/components/date-range-picker/predefined-ranges-area.js +2 -5
  139. package/components/date-range-picker/predefined-ranges-area.js.map +1 -1
  140. package/components/date-range-picker/validators.d.ts +0 -4
  141. package/components/date-range-picker/validators.js +4 -4
  142. package/components/date-range-picker/validators.js.map +1 -1
  143. package/components/date-time-input/date-time-input.base.d.ts +42 -40
  144. package/components/date-time-input/date-time-input.base.js +9 -5
  145. package/components/date-time-input/date-time-input.base.js.map +1 -1
  146. package/components/date-time-input/date-time-input.d.ts +1 -11
  147. package/components/date-time-input/date-time-input.js +0 -6
  148. package/components/date-time-input/date-time-input.js.map +1 -1
  149. package/components/date-time-input/datetime-mask-parser.d.ts +0 -10
  150. package/components/date-time-input/datetime-mask-parser.js +1 -1
  151. package/components/date-time-input/datetime-mask-parser.js.map +1 -1
  152. package/components/dialog/dialog.js.map +1 -1
  153. package/components/dropdown/dropdown-group.d.ts +2 -10
  154. package/components/dropdown/dropdown-group.js +2 -27
  155. package/components/dropdown/dropdown-group.js.map +1 -1
  156. package/components/dropdown/dropdown.d.ts +17 -23
  157. package/components/dropdown/dropdown.js +5 -17
  158. package/components/dropdown/dropdown.js.map +1 -1
  159. package/components/file-input/file-input.d.ts +7 -2
  160. package/components/file-input/file-input.js +4 -0
  161. package/components/file-input/file-input.js.map +1 -1
  162. package/components/icon/icon.d.ts +1 -1
  163. package/components/icon/icon.registry.d.ts +6 -6
  164. package/components/icon/icon.registry.js.map +1 -1
  165. package/components/input/input-base.d.ts +2 -2
  166. package/components/input/input-base.js +3 -5
  167. package/components/input/input-base.js.map +1 -1
  168. package/components/input/input.d.ts +3 -3
  169. package/components/input/input.js.map +1 -1
  170. package/components/mask-input/mask-history.d.ts +22 -18
  171. package/components/mask-input/mask-history.js.map +1 -1
  172. package/components/mask-input/mask-input.d.ts +1 -1
  173. package/components/mask-input/mask-parser.d.ts +11 -13
  174. package/components/mask-input/mask-parser.js.map +1 -1
  175. package/components/popover/popover.d.ts +45 -34
  176. package/components/popover/popover.js +54 -122
  177. package/components/popover/popover.js.map +1 -1
  178. package/components/popover/position/arrow.d.ts +19 -0
  179. package/components/popover/position/arrow.js +33 -0
  180. package/components/popover/position/arrow.js.map +1 -0
  181. package/components/popover/position/floating.d.ts +40 -0
  182. package/components/popover/position/floating.js +146 -0
  183. package/components/popover/position/floating.js.map +1 -0
  184. package/components/popover/position/native.d.ts +45 -0
  185. package/components/popover/position/native.js +158 -0
  186. package/components/popover/position/native.js.map +1 -0
  187. package/components/popover/position/strategy.d.ts +37 -0
  188. package/components/popover/position/strategy.js +21 -0
  189. package/components/popover/position/strategy.js.map +1 -0
  190. package/components/popover/position/types.d.ts +26 -0
  191. package/components/popover/position/types.js +15 -0
  192. package/components/popover/position/types.js.map +1 -0
  193. package/components/popover/themes/light/popover.base.css.js +1 -1
  194. package/components/popover/themes/light/popover.base.css.js.map +1 -1
  195. package/components/progress/circular-progress.d.ts +0 -5
  196. package/components/progress/circular-progress.js.map +1 -1
  197. package/components/qr-code/qr-code.d.ts +1 -1
  198. package/components/radio/radio.d.ts +6 -4
  199. package/components/radio/radio.js +24 -25
  200. package/components/radio/radio.js.map +1 -1
  201. package/components/radio-group/radio-group.js.map +1 -1
  202. package/components/rating/rating.d.ts +9 -6
  203. package/components/rating/rating.js +17 -18
  204. package/components/rating/rating.js.map +1 -1
  205. package/components/select/select-group.d.ts +5 -10
  206. package/components/select/select-group.js +10 -34
  207. package/components/select/select-group.js.map +1 -1
  208. package/components/select/select.d.ts +12 -20
  209. package/components/select/select.js +5 -15
  210. package/components/select/select.js.map +1 -1
  211. package/components/slider/range-slider.d.ts +0 -1
  212. package/components/slider/range-slider.js +6 -11
  213. package/components/slider/range-slider.js.map +1 -1
  214. package/components/slider/slider-base.d.ts +4 -1
  215. package/components/slider/slider-base.js +20 -18
  216. package/components/slider/slider-base.js.map +1 -1
  217. package/components/slider/slider.d.ts +2 -0
  218. package/components/slider/slider.js +5 -1
  219. package/components/slider/slider.js.map +1 -1
  220. package/components/splitter/splitter.d.ts +6 -6
  221. package/components/splitter/splitter.js.map +1 -1
  222. package/components/textarea/textarea.d.ts +2 -5
  223. package/components/textarea/textarea.js +3 -5
  224. package/components/textarea/textarea.js.map +1 -1
  225. package/components/tile-manager/tile-manager.d.ts +6 -7
  226. package/components/tile-manager/tile-manager.js.map +1 -1
  227. package/components/tile-manager/tile.d.ts +3 -3
  228. package/components/tile-manager/tile.js.map +1 -1
  229. package/components/toast/toast.d.ts +0 -2
  230. package/components/toast/toast.js.map +1 -1
  231. package/components/tooltip/controller.js.map +1 -1
  232. package/components/tooltip/service.js +4 -5
  233. package/components/tooltip/service.js.map +1 -1
  234. package/components/tooltip/tooltip.d.ts +34 -13
  235. package/components/tooltip/tooltip.js +8 -4
  236. package/components/tooltip/tooltip.js.map +1 -1
  237. package/components/tree/tree-item.d.ts +6 -6
  238. package/components/tree/tree-item.js.map +1 -1
  239. package/components/tree/tree.navigation.d.ts +5 -6
  240. package/components/tree/tree.navigation.js.map +1 -1
  241. package/components/tree/tree.selection.js.map +1 -1
  242. package/components/types.d.ts +1 -1
  243. package/components/types.js.map +1 -1
  244. package/components/validation-container/validation-container.js +2 -1
  245. package/components/validation-container/validation-container.js.map +1 -1
  246. package/components/virtualization/engine.d.ts +40 -9
  247. package/components/virtualization/engine.js +126 -61
  248. package/components/virtualization/engine.js.map +1 -1
  249. package/components/virtualization/recycle.d.ts +13 -0
  250. package/components/virtualization/recycle.js +152 -0
  251. package/components/virtualization/recycle.js.map +1 -0
  252. package/components/virtualization/virtualization.d.ts +84 -65
  253. package/components/virtualization/virtualization.js +20 -16
  254. package/components/virtualization/virtualization.js.map +1 -1
  255. package/custom-elements.json +18455 -19551
  256. package/igniteui-webcomponents.css-data.json +2 -2
  257. package/igniteui-webcomponents.html-data.json +1 -1
  258. package/index.d.ts +3 -1
  259. package/index.js +2 -0
  260. package/index.js.map +1 -1
  261. package/internals/abort-handler.d.ts +13 -25
  262. package/internals/abort-handler.js +4 -6
  263. package/internals/abort-handler.js.map +1 -1
  264. package/internals/context.d.ts +13 -7
  265. package/internals/context.js +2 -1
  266. package/internals/context.js.map +1 -1
  267. package/internals/controllers/adopt-styles.d.ts +19 -20
  268. package/internals/controllers/adopt-styles.js +3 -8
  269. package/internals/controllers/adopt-styles.js.map +1 -1
  270. package/internals/controllers/aria-projection.d.ts +100 -61
  271. package/internals/controllers/aria-projection.js +81 -31
  272. package/internals/controllers/aria-projection.js.map +1 -1
  273. package/internals/controllers/async-consumer.js.map +1 -1
  274. package/internals/controllers/command.d.ts +15 -30
  275. package/internals/controllers/command.js +2 -7
  276. package/internals/controllers/command.js.map +1 -1
  277. package/internals/controllers/context-provider.d.ts +7 -13
  278. package/internals/controllers/context-provider.js.map +1 -1
  279. package/internals/controllers/focus-ring.d.ts +10 -30
  280. package/internals/controllers/focus-ring.js +6 -12
  281. package/internals/controllers/focus-ring.js.map +1 -1
  282. package/internals/controllers/fullscreen.d.ts +7 -23
  283. package/internals/controllers/fullscreen.js +3 -9
  284. package/internals/controllers/fullscreen.js.map +1 -1
  285. package/internals/controllers/gestures.d.ts +10 -29
  286. package/internals/controllers/gestures.js +1 -3
  287. package/internals/controllers/gestures.js.map +1 -1
  288. package/internals/controllers/group.d.ts +13 -30
  289. package/internals/controllers/group.js.map +1 -1
  290. package/internals/controllers/host-listeners.d.ts +28 -0
  291. package/internals/controllers/host-listeners.js +27 -0
  292. package/internals/controllers/host-listeners.js.map +1 -0
  293. package/internals/controllers/id-resolver.d.ts +8 -9
  294. package/internals/controllers/id-resolver.js +6 -14
  295. package/internals/controllers/id-resolver.js.map +1 -1
  296. package/internals/controllers/internals.d.ts +53 -104
  297. package/internals/controllers/internals.js +40 -13
  298. package/internals/controllers/internals.js.map +1 -1
  299. package/internals/controllers/key-bindings.d.ts +61 -158
  300. package/internals/controllers/key-bindings.js +68 -67
  301. package/internals/controllers/key-bindings.js.map +1 -1
  302. package/internals/controllers/keys.d.ts +32 -0
  303. package/internals/controllers/keys.js +20 -0
  304. package/internals/controllers/keys.js.map +1 -0
  305. package/internals/controllers/mutation-observer.d.ts +14 -37
  306. package/internals/controllers/mutation-observer.js +1 -1
  307. package/internals/controllers/mutation-observer.js.map +1 -1
  308. package/internals/controllers/resize-observer.d.ts +9 -19
  309. package/internals/controllers/resize-observer.js.map +1 -1
  310. package/internals/controllers/root-click.d.ts +11 -42
  311. package/internals/controllers/root-click.js +4 -6
  312. package/internals/controllers/root-click.js.map +1 -1
  313. package/internals/controllers/roving-focus.d.ts +16 -35
  314. package/internals/controllers/roving-focus.js.map +1 -1
  315. package/internals/controllers/slot.d.ts +25 -54
  316. package/internals/controllers/slot.js +6 -6
  317. package/internals/controllers/slot.js.map +1 -1
  318. package/internals/controllers/toggle.d.ts +44 -48
  319. package/internals/controllers/toggle.js.map +1 -1
  320. package/internals/date/compare.js.map +1 -1
  321. package/internals/date/converters.d.ts +10 -7
  322. package/internals/date/converters.js.map +1 -1
  323. package/internals/date/model.d.ts +9 -16
  324. package/internals/date/model.js +22 -25
  325. package/internals/date/model.js.map +1 -1
  326. package/internals/decorators/blazorAdditionalDependencies.d.ts +4 -2
  327. package/internals/decorators/blazorAdditionalDependencies.js.map +1 -1
  328. package/internals/decorators/blazorDeepImport.d.ts +1 -3
  329. package/internals/decorators/blazorDeepImport.js.map +1 -1
  330. package/internals/decorators/blazorInclude.d.ts +3 -2
  331. package/internals/decorators/blazorInclude.js.map +1 -1
  332. package/internals/decorators/blazorIndirectRender.d.ts +1 -3
  333. package/internals/decorators/blazorIndirectRender.js.map +1 -1
  334. package/internals/decorators/blazorSuppressComponent.d.ts +1 -3
  335. package/internals/decorators/blazorSuppressComponent.js.map +1 -1
  336. package/internals/decorators/coerced-property.d.ts +14 -20
  337. package/internals/decorators/coerced-property.js.map +1 -1
  338. package/internals/decorators/shadow-options.d.ts +2 -5
  339. package/internals/decorators/shadow-options.js.map +1 -1
  340. package/internals/definitions/defineAllComponents.js +2 -0
  341. package/internals/definitions/defineAllComponents.js.map +1 -1
  342. package/internals/directives/drag.d.ts +51 -81
  343. package/internals/directives/drag.js +27 -89
  344. package/internals/directives/drag.js.map +1 -1
  345. package/internals/directives/pointer-operation.d.ts +75 -0
  346. package/internals/directives/pointer-operation.js +92 -0
  347. package/internals/directives/pointer-operation.js.map +1 -0
  348. package/internals/directives/resize.d.ts +36 -64
  349. package/internals/directives/resize.js +18 -85
  350. package/internals/directives/resize.js.map +1 -1
  351. package/internals/i18n/EN/calendar.resources.d.ts +8 -2
  352. package/internals/i18n/EN/calendar.resources.js +2 -2
  353. package/internals/i18n/EN/calendar.resources.js.map +1 -1
  354. package/internals/i18n/EN/chat.resources.d.ts +8 -2
  355. package/internals/i18n/EN/chat.resources.js +3 -10
  356. package/internals/i18n/EN/chat.resources.js.map +1 -1
  357. package/internals/i18n/EN/date-picker.resources.d.ts +6 -4
  358. package/internals/i18n/EN/date-picker.resources.js +1 -7
  359. package/internals/i18n/EN/date-picker.resources.js.map +1 -1
  360. package/internals/i18n/EN/date-range-picker.resources.d.ts +9 -2
  361. package/internals/i18n/EN/date-range-picker.resources.js +2 -2
  362. package/internals/i18n/EN/date-range-picker.resources.js.map +1 -1
  363. package/internals/i18n/i18n-controller.d.ts +44 -46
  364. package/internals/i18n/i18n-controller.js +46 -33
  365. package/internals/i18n/i18n-controller.js.map +1 -1
  366. package/internals/i18n/utils.d.ts +9 -4
  367. package/internals/i18n/utils.js +4 -27
  368. package/internals/i18n/utils.js.map +1 -1
  369. package/internals/mixins/alert.d.ts +10 -25
  370. package/internals/mixins/alert.js.map +1 -1
  371. package/internals/mixins/combo-box.d.ts +21 -11
  372. package/internals/mixins/combo-box.js +16 -22
  373. package/internals/mixins/combo-box.js.map +1 -1
  374. package/internals/mixins/event-emitter.js +9 -11
  375. package/internals/mixins/event-emitter.js.map +1 -1
  376. package/internals/mixins/forms/associated-required.d.ts +4 -4
  377. package/internals/mixins/forms/associated-required.js.map +1 -1
  378. package/internals/mixins/forms/associated.d.ts +4 -2
  379. package/internals/mixins/forms/associated.js +42 -19
  380. package/internals/mixins/forms/associated.js.map +1 -1
  381. package/internals/mixins/forms/form-transformers.js.map +1 -1
  382. package/internals/mixins/forms/types.d.ts +27 -78
  383. package/internals/mixins/forms/types.js.map +1 -1
  384. package/internals/mixins/group.d.ts +18 -0
  385. package/internals/mixins/group.js +37 -0
  386. package/internals/mixins/group.js.map +1 -0
  387. package/internals/mixins/i18n.d.ts +10 -16
  388. package/internals/mixins/i18n.js.map +1 -1
  389. package/internals/mixins/mask-behavior.d.ts +8 -22
  390. package/internals/mixins/mask-behavior.js +1 -2
  391. package/internals/mixins/mask-behavior.js.map +1 -1
  392. package/internals/mixins/option.d.ts +1 -2
  393. package/internals/mixins/option.js +2 -1
  394. package/internals/mixins/option.js.map +1 -1
  395. package/internals/part-map.d.ts +4 -2
  396. package/internals/part-map.js +1 -1
  397. package/internals/part-map.js.map +1 -1
  398. package/internals/templates/input-shell.d.ts +8 -17
  399. package/internals/templates/input-shell.js +4 -1
  400. package/internals/templates/input-shell.js.map +1 -1
  401. package/internals/templates/masked-input.d.ts +7 -8
  402. package/internals/templates/masked-input.js.map +1 -1
  403. package/internals/templates/slotted-icon.d.ts +7 -12
  404. package/internals/templates/slotted-icon.js.map +1 -1
  405. package/internals/templates/toggle-shell.d.ts +19 -19
  406. package/internals/templates/toggle-shell.js +12 -8
  407. package/internals/templates/toggle-shell.js.map +1 -1
  408. package/internals/timing.d.ts +5 -14
  409. package/internals/timing.js.map +1 -1
  410. package/internals/utils/arrays.d.ts +21 -21
  411. package/internals/utils/arrays.js +14 -0
  412. package/internals/utils/arrays.js.map +1 -1
  413. package/internals/utils/dom.d.ts +53 -41
  414. package/internals/utils/dom.js +3 -4
  415. package/internals/utils/dom.js.map +1 -1
  416. package/internals/utils/events.d.ts +29 -16
  417. package/internals/utils/events.js +9 -1
  418. package/internals/utils/events.js.map +1 -1
  419. package/internals/utils/lit.d.ts +5 -2
  420. package/internals/utils/lit.js.map +1 -1
  421. package/internals/utils/math.d.ts +8 -6
  422. package/internals/utils/math.js.map +1 -1
  423. package/internals/utils/objects.d.ts +3 -20
  424. package/internals/utils/objects.js +1 -39
  425. package/internals/utils/objects.js.map +1 -1
  426. package/internals/utils/strings.d.ts +9 -11
  427. package/internals/utils/strings.js.map +1 -1
  428. package/internals/utils/types.d.ts +16 -3
  429. package/internals/utils/types.js +3 -0
  430. package/internals/utils/types.js.map +1 -1
  431. package/internals/validators.d.ts +9 -8
  432. package/internals/validators.js +12 -6
  433. package/internals/validators.js.map +1 -1
  434. package/package.json +1 -1
  435. package/skills/README.md +4 -3
  436. package/skills/igniteui-wc-choose-components/SKILL.md +2 -1
  437. package/skills/igniteui-wc-customize-component-theme/SKILL.md +2 -1
  438. package/skills/igniteui-wc-figma-to-app/SKILL.md +328 -0
  439. package/skills/igniteui-wc-figma-to-app/references/asset-extraction.md +343 -0
  440. package/skills/igniteui-wc-figma-to-app/references/design-provenance.md +199 -0
  441. package/skills/igniteui-wc-figma-to-app/references/design-token-bridge.md +489 -0
  442. package/skills/igniteui-wc-figma-to-app/references/figma-component-map.md +370 -0
  443. package/skills/igniteui-wc-figma-to-app/references/figma-exploration.md +222 -0
  444. package/skills/igniteui-wc-figma-to-app/references/mcp-setup.md +363 -0
  445. package/skills/igniteui-wc-figma-to-app/references/project-setup.md +105 -0
  446. package/skills/igniteui-wc-figma-to-app/references/theme-generation.md +180 -0
  447. package/skills/igniteui-wc-figma-to-app/references/validation-patterns.md +370 -0
  448. package/skills/igniteui-wc-generate-from-image-design/SKILL.md +2 -1
  449. package/skills/igniteui-wc-generate-from-image-design/references/gotchas.md +3 -3
  450. package/skills/igniteui-wc-grids/SKILL.md +133 -0
  451. package/skills/igniteui-wc-integrate-with-framework/SKILL.md +2 -1
  452. package/skills/igniteui-wc-migrate-grid-lite-to-premium/SKILL.md +2 -1
  453. package/skills/igniteui-wc-optimize-bundle-size/SKILL.md +2 -1
  454. package/theming/config.d.ts +14 -5
  455. package/theming/config.js +38 -18
  456. package/theming/config.js.map +1 -1
  457. package/theming/context.d.ts +1 -23
  458. package/theming/context.js.map +1 -1
  459. package/theming/theming-controller.d.ts +2 -32
  460. package/theming/theming-controller.js +15 -21
  461. package/theming/theming-controller.js.map +1 -1
  462. package/theming/theming-event.d.ts +0 -7
  463. package/theming/theming-event.js +0 -13
  464. package/theming/theming-event.js.map +1 -1
  465. package/theming/types.d.ts +1 -8
  466. package/theming/types.js.map +1 -1
  467. package/web-types.json +3 -3
  468. package/animations/presets/slide/index.d.ts +0 -3
  469. package/animations/presets/slide/index.js +0 -16
  470. package/animations/presets/slide/index.js.map +0 -1
  471. package/components/resize-container/themes/resize-container.base.css.js.map +0 -1
  472. package/internals/controllers/root-scroll.d.ts +0 -31
  473. package/internals/controllers/root-scroll.js +0 -71
  474. package/internals/controllers/root-scroll.js.map +0 -1
  475. package/theming/utils.d.ts +0 -11
  476. package/theming/utils.js +0 -20
  477. package/theming/utils.js.map +0 -1
  478. /package/components/{resize-container/themes/resize-container.base.css.d.ts → breadcrumb/themes/breadcrumb.base.css.d.ts} +0 -0
package/CHANGELOG.md CHANGED
@@ -4,6 +4,91 @@ All notable changes to this project will be documented in this file.
4
4
  The format is based on [Keep a Changelog](http://keepachangelog.com/)
5
5
  and this project adheres to [Semantic Versioning](http://semver.org/).
6
6
 
7
+ ## [7.4.1] - 2026-09-25
8
+ ### Added
9
+ - #### AI-Assisted Development
10
+ - New `igniteui-wc-grids` skill. It helps an agent pick the grid package, register the grid, apply one theme, inject the theme into a Shadow DOM, set the layout and set up sorting and filtering. [#2376](https://github.com/IgniteUI/igniteui-webcomponents/pull/2376)
11
+ - #### Virtual scroll
12
+ - `keyFunction` property. It returns the key of an item, so an item keeps its element while it is in the rendered window, also when it moves in `data`. Without it, the index is the key. [#2401](https://github.com/IgniteUI/igniteui-webcomponents/pull/2401)
13
+
14
+ ### Changed
15
+ - #### AI-Assisted Development
16
+ - All skills now declare the MIT license, and their descriptions state when to use them and when to use a different skill. [#2400](https://github.com/IgniteUI/igniteui-webcomponents/pull/2400)
17
+ - The `igniteui-wc-figma-to-app` skill now supports Figma files from any UI kit, not only the Indigo.Design UI Kits. Its guidance now agrees with the current Figma, theming and component APIs, and its steps are in separate reference files, so an agent loads less text. [#2400](https://github.com/IgniteUI/igniteui-webcomponents/pull/2400) [#2404](https://github.com/IgniteUI/igniteui-webcomponents/pull/2404)
18
+ - #### Virtual scroll
19
+ - **Behavior change:** Item elements are now recycled. An item that stays in the rendered window keeps its element, and the elements of the items that leave show the items that enter. Before, each element showed the item at its window position, so each scroll updated every rendered item. DOM state that the item template does not bind, for example the state of a checkbox without a `checked` binding, stays with the element and shows on the item that enters. The `itemTemplate` documentation shows how to bind this state or get new DOM for each item. [#2401](https://github.com/IgniteUI/igniteui-webcomponents/pull/2401)
20
+ - The average measured item size now replaces `estimatedItemSize` for the items that are not measured yet, so the scrollbar follows the real content when the estimate is wrong. [#2401](https://github.com/IgniteUI/igniteui-webcomponents/pull/2401)
21
+
22
+ ### Fixed
23
+ - #### Virtual scroll
24
+ - `scrollToIndex` with `block: 'nearest'` now aligns an item after the viewport to the end of the viewport, as native `scrollIntoView` does. Before, it aligned each item out of view to the start, so a scroll to the next item moved a full page. [#2401](https://github.com/IgniteUI/igniteui-webcomponents/pull/2401)
25
+ - #### Checkbox, Switch, Radio
26
+ - A `<label>` element bound through `for`, or wrapping the component, now names the control and a click on it focuses and toggles the control, as for a native checkbox or radio. Before, the control had no accessible name and the click did nothing. [#2402](https://github.com/IgniteUI/igniteui-webcomponents/pull/2402)
27
+ - The host `aria-labelledby` now names the control. Before, the component copied the ID into its shadow root, where it did not resolve. [#2402](https://github.com/IgniteUI/igniteui-webcomponents/pull/2402)
28
+ - #### Rating, Slider
29
+ - A `<label>` element bound through `for`, or wrapping the component, now names the control, and a click on it focuses the control. [#2402](https://github.com/IgniteUI/igniteui-webcomponents/pull/2402)
30
+ - The host `aria-labelledby` now names the control. The slider now also follows a change of the host `aria-label` after the first render. [#2402](https://github.com/IgniteUI/igniteui-webcomponents/pull/2402)
31
+ - The slider value tooltip is hidden from assistive technology, because `aria-valuetext` already carries the value. [#2402](https://github.com/IgniteUI/igniteui-webcomponents/pull/2402)
32
+ - #### Color picker
33
+ - In `default` mode, an external `<label>` and the host `aria-labelledby` and `aria-label` now name the trigger button. Before, it was always "Open color picker". [#2402](https://github.com/IgniteUI/igniteui-webcomponents/pull/2402)
34
+ - In `input` mode, the text input no longer carries `aria-expanded`, which ARIA does not allow on a text input. The swatch button in the prefix still reflects the open state. [#2402](https://github.com/IgniteUI/igniteui-webcomponents/pull/2402)
35
+ - #### File input
36
+ - A click on an external `<label>` now focuses the native input and opens the file picker, as for a native file input. Before, the focus went to the browse button. [#2402](https://github.com/IgniteUI/igniteui-webcomponents/pull/2402)
37
+ - #### Combo
38
+ - The `label` property and an external `<label>` now name the input. Before, the selection status text ("No options selected") replaced them. [#2402](https://github.com/IgniteUI/igniteui-webcomponents/pull/2402)
39
+ - #### Combo, Color picker, Date picker, Date range picker, Date time input, File input, Input, Mask input, Select, Textarea
40
+ - The host `aria-labelledby` and `aria-label` now name the native editor. All form associated components use one naming order: the host `aria-labelledby`, then the external `<label>` elements, then the own label, then the host `aria-label`. [#2402](https://github.com/IgniteUI/igniteui-webcomponents/pull/2402)
41
+ - A `<label>` element added after the first render now names the control from its first focus. Before, it did not name the control until the next render. [#2402](https://github.com/IgniteUI/igniteui-webcomponents/pull/2402)
42
+ - The helper text `aria-describedby` of the input editors now stays after a re-render. Before, a re-render removed it. [#2402](https://github.com/IgniteUI/igniteui-webcomponents/pull/2402)
43
+
44
+ ## [7.4.0] - 2026-09-23
45
+ ### Added
46
+ - #### Breadcrumbs
47
+ - New `igc-breadcrumbs` and `igc-breadcrumb` components show a navigation trail. [#1881](https://github.com/IgniteUI/igniteui-webcomponents/pull/1881)
48
+ - `igc-breadcrumbs` has the `list` role. The `separator` attribute sets the icon between the items. The default is `tree_expand`. Put the component in a `<nav aria-label="...">` element, as the ARIA breadcrumb pattern requires.
49
+ - `igc-breadcrumb` has the `listitem` role. Put the item content, usually an anchor, in the default slot. The `prefix` and `suffix` slots add content before and after it. The `separator` slot replaces the icon of one item.
50
+ - `current` sets `aria-current="page"`. `disabled` sets `aria-disabled` and removes the slotted content from the tab sequence. Assistive technology does not read the separator.
51
+ - The `label` and `separator` CSS parts style the two containers.
52
+ - #### Button group
53
+ - The single selection modes now use the radio group keyboard pattern. [#2385](https://github.com/IgniteUI/igniteui-webcomponents/pull/2385)
54
+ - The group is one tab stop.
55
+ - The arrow keys move the focus and the selection together. They skip disabled buttons and wrap at the two ends.
56
+ - `alignment="horizontal"` uses ArrowLeft and ArrowRight and follows the text direction. `alignment="vertical"` uses ArrowUp and ArrowDown.
57
+ - Before, each button was a tab stop and the arrow keys did nothing. The `radiogroup` role does not permit this.
58
+ - The `multiple` mode does not change. Each button stays a tab stop.
59
+ - #### Combo, Color picker, Date picker, Date range picker, Dropdown, Select, Tooltip
60
+ - `scroll-strategy` attribute. It sets what the popup does when a container scrolls. [#2355](https://github.com/IgniteUI/igniteui-webcomponents/pull/2355)
61
+ - `hide` (default) hides the popup while its anchor is fully out of view.
62
+ - `scroll` keeps the popup visible and on its anchor.
63
+ - `close` closes the component on each scroll. A `sticky` tooltip also closes.
64
+ - The date pickers ignore the attribute in `dialog` mode.
65
+
66
+ ### Changed
67
+ - #### Button group
68
+ - The `radiogroup` or `group` role and the disabled state are now on the `igc-button-group` host. Before, they were on an element in the shadow root. An `aria-label` or `aria-labelledby` on the host now names the group. [#2385](https://github.com/IgniteUI/igniteui-webcomponents/pull/2385)
69
+ - In the single selection modes, `alignment` sets the `aria-orientation` of the radio group.
70
+ - #### Combo, Color picker, Date picker, Date range picker, Dropdown, Select, Tooltip
71
+ - **Behavior change:** The popup now hides while its anchor is fully scrolled out of view. Before, it stayed visible. Set `scroll-strategy="scroll"` to keep the previous behavior. [#2355](https://github.com/IgniteUI/igniteui-webcomponents/pull/2355)
72
+ - #### Dropdown, Select, Tooltip
73
+ - The popup no longer moves along the viewport edge to stay in view. It only flips to the opposite side. [#2355](https://github.com/IgniteUI/igniteui-webcomponents/pull/2355)
74
+ - #### Popover
75
+ - Popovers now use native CSS anchor positioning in browsers that support it (Chrome/Edge 133+, Firefox 147+, Safari 26+). Other browsers use `@floating-ui/dom` as before, and load it only when necessary. [#2355](https://github.com/IgniteUI/igniteui-webcomponents/pull/2355)
76
+
77
+ ### Fixed
78
+ - #### Carousel
79
+ - The indicators now set `aria-label` as a content attribute and in `ElementInternals`. Before, only `ElementInternals` had it, and tools that do not read internals reported no tab name. [#2378](https://github.com/IgniteUI/igniteui-webcomponents/pull/2378)
80
+ - #### Combo, Select
81
+ - A click on the input label opened the list and closed it again. The component emitted `igcOpening`, `igcClosing` and `igcClosed`, and stayed closed. [#2390](https://github.com/IgniteUI/igniteui-webcomponents/pull/2390)
82
+ - #### Date picker
83
+ - In dropdown mode, a `label` that you set after the first render did not go to the native input. This occurred in all themes except Material. [#2378](https://github.com/IgniteUI/igniteui-webcomponents/pull/2378)
84
+ - The `container` CSS part is now exported. It was documented, but not exported. [#2398](https://github.com/IgniteUI/igniteui-webcomponents/pull/2398)
85
+ - #### Date range picker
86
+ - The `ranges` CSS part is now exported. It was documented, but not exported. [#2398](https://github.com/IgniteUI/igniteui-webcomponents/pull/2398)
87
+ - #### Dropdown
88
+ - The anchor now names the list through `ariaLabelledByElements`. Before, `aria-labelledby` pointed to the anchor slot, which tools cannot resolve. [#2378](https://github.com/IgniteUI/igniteui-webcomponents/pull/2378)
89
+ - #### Input, Date time input, Date range input, File input, Mask input, Textarea
90
+ - A click on the label now emits one `click` event from the component. Before, it emitted two. A disabled component now emits none. [#2390](https://github.com/IgniteUI/igniteui-webcomponents/pull/2390)
91
+
7
92
  ## [7.3.2] - 2026-09-09
8
93
  ### Added
9
94
  - #### Library
@@ -1616,6 +1701,8 @@ Initial release of Ignite UI Web Components
1616
1701
  - Ripple component
1617
1702
  - Switch component
1618
1703
 
1704
+ [7.4.1]: https://github.com/IgniteUI/igniteui-webcomponents/compare/7.4.0...7.4.1
1705
+ [7.4.0]: https://github.com/IgniteUI/igniteui-webcomponents/compare/7.3.2...7.4.0
1619
1706
  [7.3.2]: https://github.com/IgniteUI/igniteui-webcomponents/compare/7.3.1...7.3.2
1620
1707
  [7.3.1]: https://github.com/IgniteUI/igniteui-webcomponents/compare/7.3.0...7.3.1
1621
1708
  [7.3.0]: https://github.com/IgniteUI/igniteui-webcomponents/compare/7.2.4...7.3.0
@@ -1,31 +1,21 @@
1
- declare enum EaseIn {
2
- Quad = "cubic-bezier(0.550, 0.085, 0.680, 0.530)",
3
- Cubic = "cubic-bezier(0.550, 0.055, 0.675, 0.190)",
4
- Quart = "cubic-bezier(0.895, 0.030, 0.685, 0.220)",
5
- Quint = "cubic-bezier(0.755, 0.050, 0.855, 0.060)",
6
- Sine = "cubic-bezier(0.470, 0.000, 0.745, 0.715)",
7
- Expo = "cubic-bezier(0.950, 0.050, 0.795, 0.035)",
8
- Circ = "cubic-bezier(0.600, 0.040, 0.980, 0.335)",
9
- Back = "cubic-bezier(0.600, -0.280, 0.735, 0.045)"
10
- }
11
- declare enum EaseOut {
12
- Quad = "cubic-bezier(0.250, 0.460, 0.450, 0.940)",
13
- Cubic = "cubic-bezier(0.215, 0.610, 0.355, 1.000)",
14
- Quart = "cubic-bezier(0.165, 0.840, 0.440, 1.000)",
15
- Quint = "cubic-bezier(0.230, 1.000, 0.320, 1.000)",
16
- Sine = "cubic-bezier(0.390, 0.575, 0.565, 1.000)",
17
- Expo = "cubic-bezier(0.190, 1.000, 0.220, 1.000)",
18
- Circ = "cubic-bezier(0.075, 0.820, 0.165, 1.000)",
19
- Back = "cubic-bezier(0.175, 0.885, 0.320, 1.275)"
20
- }
21
- declare enum EaseInOut {
22
- Quad = "cubic-bezier(0.455, 0.030, 0.515, 0.955)",
23
- Cubic = "cubic-bezier(0.645, 0.045, 0.355, 1.000)",
24
- Quart = "cubic-bezier(0.770, 0.000, 0.175, 1.000)",
25
- Quint = "cubic-bezier(0.860, 0.000, 0.070, 1.000)",
26
- Sine = "cubic-bezier(0.445, 0.050, 0.550, 0.950)",
27
- Expo = "cubic-bezier(1.000, 0.000, 0.000, 1.000)",
28
- Circ = "cubic-bezier(0.785, 0.135, 0.150, 0.860)",
29
- Back = "cubic-bezier(0.680, -0.550, 0.265, 1.550)"
30
- }
31
- export { EaseIn, EaseInOut, EaseOut };
1
+ declare const EaseOut: {
2
+ readonly Quad: "cubic-bezier(0.250, 0.460, 0.450, 0.940)";
3
+ readonly Cubic: "cubic-bezier(0.215, 0.610, 0.355, 1.000)";
4
+ readonly Quart: "cubic-bezier(0.165, 0.840, 0.440, 1.000)";
5
+ readonly Quint: "cubic-bezier(0.230, 1.000, 0.320, 1.000)";
6
+ readonly Sine: "cubic-bezier(0.390, 0.575, 0.565, 1.000)";
7
+ readonly Expo: "cubic-bezier(0.190, 1.000, 0.220, 1.000)";
8
+ readonly Circ: "cubic-bezier(0.075, 0.820, 0.165, 1.000)";
9
+ readonly Back: "cubic-bezier(0.175, 0.885, 0.320, 1.275)";
10
+ };
11
+ declare const EaseInOut: {
12
+ readonly Quad: "cubic-bezier(0.455, 0.030, 0.515, 0.955)";
13
+ readonly Cubic: "cubic-bezier(0.645, 0.045, 0.355, 1.000)";
14
+ readonly Quart: "cubic-bezier(0.770, 0.000, 0.175, 1.000)";
15
+ readonly Quint: "cubic-bezier(0.860, 0.000, 0.070, 1.000)";
16
+ readonly Sine: "cubic-bezier(0.445, 0.050, 0.550, 0.950)";
17
+ readonly Expo: "cubic-bezier(1.000, 0.000, 0.000, 1.000)";
18
+ readonly Circ: "cubic-bezier(0.785, 0.135, 0.150, 0.860)";
19
+ readonly Back: "cubic-bezier(0.680, -0.550, 0.265, 1.550)";
20
+ };
21
+ export { EaseInOut, EaseOut };
@@ -1,35 +1,22 @@
1
- var EaseIn;
2
- (function (EaseIn) {
3
- EaseIn["Quad"] = "cubic-bezier(0.550, 0.085, 0.680, 0.530)";
4
- EaseIn["Cubic"] = "cubic-bezier(0.550, 0.055, 0.675, 0.190)";
5
- EaseIn["Quart"] = "cubic-bezier(0.895, 0.030, 0.685, 0.220)";
6
- EaseIn["Quint"] = "cubic-bezier(0.755, 0.050, 0.855, 0.060)";
7
- EaseIn["Sine"] = "cubic-bezier(0.470, 0.000, 0.745, 0.715)";
8
- EaseIn["Expo"] = "cubic-bezier(0.950, 0.050, 0.795, 0.035)";
9
- EaseIn["Circ"] = "cubic-bezier(0.600, 0.040, 0.980, 0.335)";
10
- EaseIn["Back"] = "cubic-bezier(0.600, -0.280, 0.735, 0.045)";
11
- })(EaseIn || (EaseIn = {}));
12
- var EaseOut;
13
- (function (EaseOut) {
14
- EaseOut["Quad"] = "cubic-bezier(0.250, 0.460, 0.450, 0.940)";
15
- EaseOut["Cubic"] = "cubic-bezier(0.215, 0.610, 0.355, 1.000)";
16
- EaseOut["Quart"] = "cubic-bezier(0.165, 0.840, 0.440, 1.000)";
17
- EaseOut["Quint"] = "cubic-bezier(0.230, 1.000, 0.320, 1.000)";
18
- EaseOut["Sine"] = "cubic-bezier(0.390, 0.575, 0.565, 1.000)";
19
- EaseOut["Expo"] = "cubic-bezier(0.190, 1.000, 0.220, 1.000)";
20
- EaseOut["Circ"] = "cubic-bezier(0.075, 0.820, 0.165, 1.000)";
21
- EaseOut["Back"] = "cubic-bezier(0.175, 0.885, 0.320, 1.275)";
22
- })(EaseOut || (EaseOut = {}));
23
- var EaseInOut;
24
- (function (EaseInOut) {
25
- EaseInOut["Quad"] = "cubic-bezier(0.455, 0.030, 0.515, 0.955)";
26
- EaseInOut["Cubic"] = "cubic-bezier(0.645, 0.045, 0.355, 1.000)";
27
- EaseInOut["Quart"] = "cubic-bezier(0.770, 0.000, 0.175, 1.000)";
28
- EaseInOut["Quint"] = "cubic-bezier(0.860, 0.000, 0.070, 1.000)";
29
- EaseInOut["Sine"] = "cubic-bezier(0.445, 0.050, 0.550, 0.950)";
30
- EaseInOut["Expo"] = "cubic-bezier(1.000, 0.000, 0.000, 1.000)";
31
- EaseInOut["Circ"] = "cubic-bezier(0.785, 0.135, 0.150, 0.860)";
32
- EaseInOut["Back"] = "cubic-bezier(0.680, -0.550, 0.265, 1.550)";
33
- })(EaseInOut || (EaseInOut = {}));
34
- export { EaseIn, EaseInOut, EaseOut };
1
+ const EaseOut = {
2
+ Quad: 'cubic-bezier(0.250, 0.460, 0.450, 0.940)',
3
+ Cubic: 'cubic-bezier(0.215, 0.610, 0.355, 1.000)',
4
+ Quart: 'cubic-bezier(0.165, 0.840, 0.440, 1.000)',
5
+ Quint: 'cubic-bezier(0.230, 1.000, 0.320, 1.000)',
6
+ Sine: 'cubic-bezier(0.390, 0.575, 0.565, 1.000)',
7
+ Expo: 'cubic-bezier(0.190, 1.000, 0.220, 1.000)',
8
+ Circ: 'cubic-bezier(0.075, 0.820, 0.165, 1.000)',
9
+ Back: 'cubic-bezier(0.175, 0.885, 0.320, 1.275)',
10
+ };
11
+ const EaseInOut = {
12
+ Quad: 'cubic-bezier(0.455, 0.030, 0.515, 0.955)',
13
+ Cubic: 'cubic-bezier(0.645, 0.045, 0.355, 1.000)',
14
+ Quart: 'cubic-bezier(0.770, 0.000, 0.175, 1.000)',
15
+ Quint: 'cubic-bezier(0.860, 0.000, 0.070, 1.000)',
16
+ Sine: 'cubic-bezier(0.445, 0.050, 0.550, 0.950)',
17
+ Expo: 'cubic-bezier(1.000, 0.000, 0.000, 1.000)',
18
+ Circ: 'cubic-bezier(0.785, 0.135, 0.150, 0.860)',
19
+ Back: 'cubic-bezier(0.680, -0.550, 0.265, 1.550)',
20
+ };
21
+ export { EaseInOut, EaseOut };
35
22
  //# sourceMappingURL=easings.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"easings.js","sourceRoot":"","sources":["../../src/animations/easings.ts"],"names":[],"mappings":"AAAA,IAAK,MASJ;AATD,WAAK,MAAM;IACT,2DAAiD,CAAA;IACjD,4DAAkD,CAAA;IAClD,4DAAkD,CAAA;IAClD,4DAAkD,CAAA;IAClD,2DAAiD,CAAA;IACjD,2DAAiD,CAAA;IACjD,2DAAiD,CAAA;IACjD,4DAAkD,CAAA;AACpD,CAAC,EATI,MAAM,KAAN,MAAM,QASV;AAED,IAAK,OASJ;AATD,WAAK,OAAO;IACV,4DAAiD,CAAA;IACjD,6DAAkD,CAAA;IAClD,6DAAkD,CAAA;IAClD,6DAAkD,CAAA;IAClD,4DAAiD,CAAA;IACjD,4DAAiD,CAAA;IACjD,4DAAiD,CAAA;IACjD,4DAAiD,CAAA;AACnD,CAAC,EATI,OAAO,KAAP,OAAO,QASX;AAED,IAAK,SASJ;AATD,WAAK,SAAS;IACZ,8DAAiD,CAAA;IACjD,+DAAkD,CAAA;IAClD,+DAAkD,CAAA;IAClD,+DAAkD,CAAA;IAClD,8DAAiD,CAAA;IACjD,8DAAiD,CAAA;IACjD,8DAAiD,CAAA;IACjD,+DAAkD,CAAA;AACpD,CAAC,EATI,SAAS,KAAT,SAAS,QASb;AAED,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,OAAO,EAAE,CAAC","sourcesContent":["enum EaseIn {\n Quad = 'cubic-bezier(0.550, 0.085, 0.680, 0.530)',\n Cubic = 'cubic-bezier(0.550, 0.055, 0.675, 0.190)',\n Quart = 'cubic-bezier(0.895, 0.030, 0.685, 0.220)',\n Quint = 'cubic-bezier(0.755, 0.050, 0.855, 0.060)',\n Sine = 'cubic-bezier(0.470, 0.000, 0.745, 0.715)',\n Expo = 'cubic-bezier(0.950, 0.050, 0.795, 0.035)',\n Circ = 'cubic-bezier(0.600, 0.040, 0.980, 0.335)',\n Back = 'cubic-bezier(0.600, -0.280, 0.735, 0.045)',\n}\n\nenum EaseOut {\n Quad = 'cubic-bezier(0.250, 0.460, 0.450, 0.940)',\n Cubic = 'cubic-bezier(0.215, 0.610, 0.355, 1.000)',\n Quart = 'cubic-bezier(0.165, 0.840, 0.440, 1.000)',\n Quint = 'cubic-bezier(0.230, 1.000, 0.320, 1.000)',\n Sine = 'cubic-bezier(0.390, 0.575, 0.565, 1.000)',\n Expo = 'cubic-bezier(0.190, 1.000, 0.220, 1.000)',\n Circ = 'cubic-bezier(0.075, 0.820, 0.165, 1.000)',\n Back = 'cubic-bezier(0.175, 0.885, 0.320, 1.275)',\n}\n\nenum EaseInOut {\n Quad = 'cubic-bezier(0.455, 0.030, 0.515, 0.955)',\n Cubic = 'cubic-bezier(0.645, 0.045, 0.355, 1.000)',\n Quart = 'cubic-bezier(0.770, 0.000, 0.175, 1.000)',\n Quint = 'cubic-bezier(0.860, 0.000, 0.070, 1.000)',\n Sine = 'cubic-bezier(0.445, 0.050, 0.550, 0.950)',\n Expo = 'cubic-bezier(1.000, 0.000, 0.000, 1.000)',\n Circ = 'cubic-bezier(0.785, 0.135, 0.150, 0.860)',\n Back = 'cubic-bezier(0.680, -0.550, 0.265, 1.550)',\n}\n\nexport { EaseIn, EaseInOut, EaseOut };\n"]}
1
+ {"version":3,"file":"easings.js","sourceRoot":"","sources":["../../src/animations/easings.ts"],"names":[],"mappings":"AAAA,MAAM,OAAO,GAAG;IACd,IAAI,EAAE,0CAA0C;IAChD,KAAK,EAAE,0CAA0C;IACjD,KAAK,EAAE,0CAA0C;IACjD,KAAK,EAAE,0CAA0C;IACjD,IAAI,EAAE,0CAA0C;IAChD,IAAI,EAAE,0CAA0C;IAChD,IAAI,EAAE,0CAA0C;IAChD,IAAI,EAAE,0CAA0C;CACxC,CAAC;AAEX,MAAM,SAAS,GAAG;IAChB,IAAI,EAAE,0CAA0C;IAChD,KAAK,EAAE,0CAA0C;IACjD,KAAK,EAAE,0CAA0C;IACjD,KAAK,EAAE,0CAA0C;IACjD,IAAI,EAAE,0CAA0C;IAChD,IAAI,EAAE,0CAA0C;IAChD,IAAI,EAAE,0CAA0C;IAChD,IAAI,EAAE,2CAA2C;CACzC,CAAC;AAEX,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,CAAC","sourcesContent":["const EaseOut = {\n Quad: 'cubic-bezier(0.250, 0.460, 0.450, 0.940)',\n Cubic: 'cubic-bezier(0.215, 0.610, 0.355, 1.000)',\n Quart: 'cubic-bezier(0.165, 0.840, 0.440, 1.000)',\n Quint: 'cubic-bezier(0.230, 1.000, 0.320, 1.000)',\n Sine: 'cubic-bezier(0.390, 0.575, 0.565, 1.000)',\n Expo: 'cubic-bezier(0.190, 1.000, 0.220, 1.000)',\n Circ: 'cubic-bezier(0.075, 0.820, 0.165, 1.000)',\n Back: 'cubic-bezier(0.175, 0.885, 0.320, 1.275)',\n} as const;\n\nconst EaseInOut = {\n Quad: 'cubic-bezier(0.455, 0.030, 0.515, 0.955)',\n Cubic: 'cubic-bezier(0.645, 0.045, 0.355, 1.000)',\n Quart: 'cubic-bezier(0.770, 0.000, 0.175, 1.000)',\n Quint: 'cubic-bezier(0.860, 0.000, 0.070, 1.000)',\n Sine: 'cubic-bezier(0.445, 0.050, 0.550, 0.950)',\n Expo: 'cubic-bezier(1.000, 0.000, 0.000, 1.000)',\n Circ: 'cubic-bezier(0.785, 0.135, 0.150, 0.860)',\n Back: 'cubic-bezier(0.680, -0.550, 0.265, 1.550)',\n} as const;\n\nexport { EaseInOut, EaseOut };\n"]}
@@ -1,4 +1,3 @@
1
- import type { ReactiveController, ReactiveControllerHost } from 'lit';
2
1
  import type { Ref } from 'lit/directives/ref.js';
3
2
  import type { AnimationReferenceMetadata } from './types.js';
4
3
  /**
@@ -6,25 +5,18 @@ import type { AnimationReferenceMetadata } from './types.js';
6
5
  */
7
6
  export declare function getPrefersReducedMotion(): boolean;
8
7
  /**
9
- * A ReactiveController for managing Web Animation API (WA-API) playback
10
- * on a host element or a specified target element.
11
- *
12
- * It provides methods to play, stop, and coordinate animations, including
13
- * support for 'height: auto' transitions and reduced motion preference.
8
+ * Manages Web Animation API (WA-API) playback on a host element or a specified target element,
9
+ * including support for 'height: auto' transitions and reduced motion preference.
10
+ * It uses no host lifecycle hooks, so it is not registered as a reactive controller.
14
11
  */
15
- declare class AnimationController implements ReactiveController {
12
+ declare class AnimationController {
16
13
  private readonly _host;
17
14
  private readonly _ref?;
18
- /**
19
- * The actual HTMLElement target for the animations.
20
- * Prioritizes a passed-in Ref value, then a direct HTMLElement, falling back to the host.
21
- */
15
+ /** The passed-in element, else the resolved Ref value, else the host. */
22
16
  protected get _target(): HTMLElement;
23
- constructor(host: ReactiveControllerHost & HTMLElement, ref?: Ref<HTMLElement> | HTMLElement);
17
+ constructor(host: HTMLElement, ref?: Ref<HTMLElement> | HTMLElement);
24
18
  /** Pre-processes keyframes, specifically resolving 'auto' height to the element's scrollHeight. */
25
19
  private _parseKeyframes;
26
- /** @internal */
27
- hostConnected(): void;
28
20
  /**
29
21
  * Plays a sequence of keyframes, first cancelling all existing animations on the target.
30
22
  *
@@ -41,9 +33,9 @@ declare class AnimationController implements ReactiveController {
41
33
  cancelAll(): void;
42
34
  }
43
35
  /**
44
- * Creates and attaches an animation player instance to the passed in `host` element.
36
+ * Creates an animation player for the passed in `host` element.
45
37
  * The player will run animations on the passed in `target`, or if `target` is undefined,
46
38
  * the host element itself.
47
39
  */
48
- export declare function addAnimationController(host: ReactiveControllerHost & HTMLElement, target?: Ref<HTMLElement> | HTMLElement): AnimationController;
40
+ export declare function addAnimationController(host: HTMLElement, target?: Ref<HTMLElement> | HTMLElement): AnimationController;
49
41
  export type { AnimationController };
@@ -1,8 +1,7 @@
1
1
  import { isElement } from '#internals/utils/dom.js';
2
2
  const LISTENER_OPTIONS = { once: true };
3
3
  export function getPrefersReducedMotion() {
4
- return (globalThis?.matchMedia?.('(prefers-reduced-motion: reduce)').matches ??
5
- false);
4
+ return (globalThis.matchMedia?.('(prefers-reduced-motion: reduce)').matches ?? false);
6
5
  }
7
6
  class AnimationController {
8
7
  get _target() {
@@ -14,7 +13,6 @@ class AnimationController {
14
13
  constructor(host, ref) {
15
14
  this._host = host;
16
15
  this._ref = ref;
17
- this._host.addController(this);
18
16
  }
19
17
  _parseKeyframes(keyframes) {
20
18
  const target = this._target;
@@ -24,7 +22,6 @@ class AnimationController {
24
22
  : frame;
25
23
  });
26
24
  }
27
- hostConnected() { }
28
25
  async playExclusive(animation) {
29
26
  this.cancelAll();
30
27
  const event = await this.play(animation);
@@ -33,16 +30,16 @@ class AnimationController {
33
30
  async play(animation) {
34
31
  const { steps, options } = animation;
35
32
  const duration = getPrefersReducedMotion() ? 0 : (options?.duration ?? 0);
36
- if (!Number.isFinite(duration)) {
33
+ if (!(Number.isFinite(duration) && Number.isFinite(options?.iterations ?? 1))) {
37
34
  throw new Error('Promise-based animations must be finite.');
38
35
  }
39
36
  return new Promise((resolve) => {
40
- const animation = this._target.animate(this._parseKeyframes(steps), {
37
+ const player = this._target.animate(this._parseKeyframes(steps), {
41
38
  ...options,
42
39
  duration,
43
40
  });
44
- animation.addEventListener('cancel', resolve, LISTENER_OPTIONS);
45
- animation.addEventListener('finish', resolve, LISTENER_OPTIONS);
41
+ player.addEventListener('cancel', resolve, LISTENER_OPTIONS);
42
+ player.addEventListener('finish', resolve, LISTENER_OPTIONS);
46
43
  });
47
44
  }
48
45
  cancelAll() {
@@ -1 +1 @@
1
- {"version":3,"file":"player.js","sourceRoot":"","sources":["../../src/animations/player.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AAGpD,MAAM,gBAAgB,GAAG,EAAE,IAAI,EAAE,IAAI,EAAW,CAAC;AAKjD,MAAM,UAAU,uBAAuB;IACrC,OAAO,CACL,UAAU,EAAE,UAAU,EAAE,CAAC,kCAAkC,CAAC,CAAC,OAAO;QACpE,KAAK,CACN,CAAC;AACJ,CAAC;AASD,MAAM,mBAAmB;IAQvB,IAAc,OAAO;QACnB,IAAI,SAAS,CAAC,IAAI,CAAC,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KAAK,CAAC,0CAA0C,CAAC,CAAC;QAC9D,CAAC;QAED,OAAO,IAAI,OAAO,CAAyB,CAAC,OAAO,EAAE,EAAE;YACrD,MAAM,SAAS,GAAG,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,eAAe,CAAC,KAAK,CAAC,EAAE;gBAClE,GAAG,OAAO;gBACV,QAAQ;aACT,CAAC,CAAC;YAEH,SAAS,CAAC,gBAAgB,CAAC,QAAQ,EAAE,OAAO,EAAE,gBAAgB,CAAC,CAAC;YAChE,SAAS,CAAC,gBAAgB,CAAC,QAAQ,EAAE,OAAO,EAAE,gBAAgB,CAAC,CAAC;QAClE,CAAC,CAAC,CAAC;IACL,CAAC;IAGM,SAAS;QACd,KAAK,MAAM,SAAS,IAAI,IAAI,CAAC,OAAO,CAAC,aAAa,EAAE,EAAE,CAAC;YACrD,SAAS,CAAC,MAAM,EAAE,CAAC;QACrB,CAAC;IACH,CAAC;CACF;AAOD,MAAM,UAAU,sBAAsB,CACpC,IAA0C,EAC1C,MAAuC;IAEvC,OAAO,IAAI,mBAAmB,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;AAC/C,CAAC","sourcesContent":["import type { ReactiveController, ReactiveControllerHost } from 'lit';\nimport type { Ref } from 'lit/directives/ref.js';\nimport { isElement } from '#internals/utils/dom.js';\nimport type { AnimationReferenceMetadata } from './types.js';\n\nconst LISTENER_OPTIONS = { once: true } as const;\n\n/**\n * Checks the user's preference for reduced motion.\n */\nexport function getPrefersReducedMotion(): boolean {\n return (\n globalThis?.matchMedia?.('(prefers-reduced-motion: reduce)').matches ??\n false\n );\n}\n\n/**\n * A ReactiveController for managing Web Animation API (WA-API) playback\n * on a host element or a specified target element.\n *\n * It provides methods to play, stop, and coordinate animations, including\n * support for 'height: auto' transitions and reduced motion preference.\n */\nclass AnimationController implements ReactiveController {\n private readonly _host: ReactiveControllerHost & HTMLElement;\n private readonly _ref?: Ref<HTMLElement> | HTMLElement;\n\n /**\n * The actual HTMLElement target for the animations.\n * Prioritizes a passed-in Ref value, then a direct HTMLElement, falling back to the host.\n */\n protected get _target(): HTMLElement {\n if (isElement(this._ref)) {\n return this._ref;\n }\n\n return this._ref?.value ?? this._host;\n }\n\n constructor(\n host: ReactiveControllerHost & HTMLElement,\n ref?: Ref<HTMLElement> | HTMLElement\n ) {\n this._host = host;\n this._ref = ref;\n this._host.addController(this);\n }\n\n /** Pre-processes keyframes, specifically resolving 'auto' height to the element's scrollHeight. */\n private _parseKeyframes(keyframes: Keyframe[]): Keyframe[] {\n const target = this._target;\n\n return keyframes.map((frame) => {\n return frame.height === 'auto'\n ? { ...frame, height: `${target.scrollHeight}px` }\n : frame;\n });\n }\n\n /** @internal */\n public hostConnected(): void {}\n\n /**\n * Plays a sequence of keyframes, first cancelling all existing animations on the target.\n *\n * The cancellation must stay synchronous - awaiting before it would let an\n * animation started earlier in the same tick escape and run to completion.\n */\n public async playExclusive(\n animation: AnimationReferenceMetadata\n ): Promise<boolean> {\n this.cancelAll();\n\n const event = await this.play(animation);\n return event.type === 'finish';\n }\n\n /**\n * Plays a sequence of keyframes using WA-API.\n * Automatically sets duration to 0 if 'prefers-reduced-motion' is set.\n */\n public async play(\n animation: AnimationReferenceMetadata\n ): Promise<AnimationPlaybackEvent> {\n const { steps, options } = animation;\n const duration = getPrefersReducedMotion() ? 0 : (options?.duration ?? 0);\n\n if (!Number.isFinite(duration)) {\n throw new Error('Promise-based animations must be finite.');\n }\n\n return new Promise<AnimationPlaybackEvent>((resolve) => {\n const animation = this._target.animate(this._parseKeyframes(steps), {\n ...options,\n duration,\n });\n\n animation.addEventListener('cancel', resolve, LISTENER_OPTIONS);\n animation.addEventListener('finish', resolve, LISTENER_OPTIONS);\n });\n }\n\n /** Cancels all active animations on the target element. */\n public cancelAll(): void {\n for (const animation of this._target.getAnimations()) {\n animation.cancel();\n }\n }\n}\n\n/**\n * Creates and attaches an animation player instance to the passed in `host` element.\n * The player will run animations on the passed in `target`, or if `target` is undefined,\n * the host element itself.\n */\nexport function addAnimationController(\n host: ReactiveControllerHost & HTMLElement,\n target?: Ref<HTMLElement> | HTMLElement\n): AnimationController {\n return new AnimationController(host, target);\n}\n\nexport type { AnimationController };\n"]}
1
+ {"version":3,"file":"player.js","sourceRoot":"","sources":["../../src/animations/player.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AAGpD,MAAM,gBAAgB,GAAG,EAAE,IAAI,EAAE,IAAI,EAAW,CAAC;AAKjD,MAAM,UAAU,uBAAuB;IACrC,OAAO,CACL,UAAU,CAAC,UAAU,EAAE,CAAC,kCAAkC,CAAC,CAAC,OAAO,IAAI,KAAK,CAC7E,CAAC;AACJ,CAAC;AAOD,MAAM,mBAAmB;IAKvB,IAAc,OAAO;QACnB,IAAI,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC;YACzB,OAAO,IAAI,CAAC,IAAI,CAAC;QACnB,CAAC;QAED,OAAO,IAAI,CAAC,IAAI,EAAE,KAAK,IAAI,IAAI,CAAC,KAAK,CAAC;IACxC,CAAC;IAED,YAAY,IAAiB,EAAE,GAAoC;QACjE,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC;QAClB,IAAI,CAAC,IAAI,GAAG,GAAG,CAAC;IAClB,CAAC;IAGO,eAAe,CAAC,SAAqB;QAC3C,MAAM,MAAM,GAAG,IAAI,CAAC,OAAO,CAAC;QAE5B,OAAO,SAAS,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE;YAC7B,OAAO,KAAK,CAAC,MAAM,KAAK,MAAM;gBAC5B,CAAC,CAAC,EAAE,GAAG,KAAK,EAAE,MAAM,EAAE,GAAG,MAAM,CAAC,YAAY,IAAI,EAAE;gBAClD,CAAC,CAAC,KAAK,CAAC;QACZ,CAAC,CAAC,CAAC;IACL,CAAC;IAQM,KAAK,CAAC,aAAa,CACxB,SAAqC;QAErC,IAAI,CAAC,SAAS,EAAE,CAAC;QAEjB,M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C;AAC/C,CAAC","sourcesContent":["import type { Ref } from 'lit/directives/ref.js';\nimport { isElement } from '#internals/utils/dom.js';\nimport type { AnimationReferenceMetadata } from './types.js';\n\nconst LISTENER_OPTIONS = { once: true } as const;\n\n/**\n * Checks the user's preference for reduced motion.\n */\nexport function getPrefersReducedMotion(): boolean {\n return (\n globalThis.matchMedia?.('(prefers-reduced-motion: reduce)').matches ?? false\n );\n}\n\n/**\n * Manages Web Animation API (WA-API) playback on a host element or a specified target element,\n * including support for 'height: auto' transitions and reduced motion preference.\n * It uses no host lifecycle hooks, so it is not registered as a reactive controller.\n */\nclass AnimationController {\n private readonly _host: HTMLElement;\n private readonly _ref?: Ref<HTMLElement> | HTMLElement;\n\n /** The passed-in element, else the resolved Ref value, else the host. */\n protected get _target(): HTMLElement {\n if (isElement(this._ref)) {\n return this._ref;\n }\n\n return this._ref?.value ?? this._host;\n }\n\n constructor(host: HTMLElement, ref?: Ref<HTMLElement> | HTMLElement) {\n this._host = host;\n this._ref = ref;\n }\n\n /** Pre-processes keyframes, specifically resolving 'auto' height to the element's scrollHeight. */\n private _parseKeyframes(keyframes: Keyframe[]): Keyframe[] {\n const target = this._target;\n\n return keyframes.map((frame) => {\n return frame.height === 'auto'\n ? { ...frame, height: `${target.scrollHeight}px` }\n : frame;\n });\n }\n\n /**\n * Plays a sequence of keyframes, first cancelling all existing animations on the target.\n *\n * The cancellation must stay synchronous - awaiting before it would let an\n * animation started earlier in the same tick escape and run to completion.\n */\n public async playExclusive(\n animation: AnimationReferenceMetadata\n ): Promise<boolean> {\n this.cancelAll();\n\n const event = await this.play(animation);\n return event.type === 'finish';\n }\n\n /**\n * Plays a sequence of keyframes using WA-API.\n * Automatically sets duration to 0 if 'prefers-reduced-motion' is set.\n */\n public async play(\n animation: AnimationReferenceMetadata\n ): Promise<AnimationPlaybackEvent> {\n const { steps, options } = animation;\n const duration = getPrefersReducedMotion() ? 0 : (options?.duration ?? 0);\n\n if (\n !(Number.isFinite(duration) && Number.isFinite(options?.iterations ?? 1))\n ) {\n throw new Error('Promise-based animations must be finite.');\n }\n\n return new Promise<AnimationPlaybackEvent>((resolve) => {\n const player = this._target.animate(this._parseKeyframes(steps), {\n ...options,\n duration,\n });\n\n player.addEventListener('cancel', resolve, LISTENER_OPTIONS);\n player.addEventListener('finish', resolve, LISTENER_OPTIONS);\n });\n }\n\n /** Cancels all active animations on the target element. */\n public cancelAll(): void {\n for (const animation of this._target.getAnimations()) {\n animation.cancel();\n }\n }\n}\n\n/**\n * Creates an animation player for the passed in `host` element.\n * The player will run animations on the passed in `target`, or if `target` is undefined,\n * the host element itself.\n */\nexport function addAnimationController(\n host: HTMLElement,\n target?: Ref<HTMLElement> | HTMLElement\n): AnimationController {\n return new AnimationController(host, target);\n}\n\nexport type { AnimationController };\n"]}
@@ -6,8 +6,9 @@ import { AsyncDirective, type DirectiveParameters } from 'lit/async-directive.js
6
6
  export declare function startViewTransition(callback: ViewTransitionUpdateCallback): ViewTransition;
7
7
  /**
8
8
  * Starts a scoped view transition on the specified target element and skips it if the user has requested reduced motion.
9
+ * Returns null, without calling `callback`, if the target does not support scoped view transitions.
9
10
  */
10
- export declare function startScopedViewTransition(target: HTMLElement, callback: ViewTransitionUpdateCallback): ViewTransition | null;
11
+ export declare function startScopedViewTransition(target: Node, callback: ViewTransitionUpdateCallback): ViewTransition | null;
11
12
  /**
12
13
  * Sets the view transition name for the specified target element.
13
14
  */
@@ -25,20 +26,19 @@ export declare function getActiveViewTransition(): ViewTransition | null;
25
26
  */
26
27
  export declare function getActiveScopedViewTransition(target: Node): ViewTransition | null;
27
28
  declare class ScopedViewTransitionDirective extends AsyncDirective {
28
- private _isFirstRender;
29
+ private _template?;
29
30
  render(template: TemplateResult): TemplateResult;
30
- update(part: ChildPart, [template]: DirectiveParameters<this>): typeof noChange | TemplateResult;
31
+ update(part: ChildPart, [template]: DirectiveParameters<this>): TemplateResult | typeof noChange;
31
32
  }
32
33
  /**
33
- * A directive that enables scoped view transitions for a template.
34
- *
35
- * When applied, it will start a view transition whenever the template is updated,
36
- * provided that the parent node supports view transitions.
37
- * If the user has requested reduced motion, the transition will be skipped.
34
+ * A directive that starts a scoped view transition on the parent element each time
35
+ * the template changes. The first render and renders with an unchanged template
36
+ * (same strings and values) do not start a transition.
37
+ * If the user has requested reduced motion, the transition is skipped.
38
38
  *
39
39
  * @remarks
40
- * This directive is intended to be used with Lit templates inside a component that supports view transitions.
41
- * It will not work if the parent node does not support view transitions (e.g., if the parent is not a document or element that implements the ViewTransition interface).
40
+ * The parent node must implement `Element.startViewTransition()`. Otherwise the
41
+ * template is rendered directly, without a transition.
42
42
  */
43
43
  export declare const scopedViewTransition: (template: TemplateResult) => import("lit-html/directive.js").DirectiveResult<typeof ScopedViewTransitionDirective>;
44
44
  export {};
@@ -1,37 +1,34 @@
1
1
  import { noChange } from 'lit';
2
2
  import { AsyncDirective, directive, } from 'lit/async-directive.js';
3
+ import { sameItems } from '#internals/utils/arrays.js';
3
4
  import { isFunction } from '#internals/utils/types.js';
4
5
  import { getPrefersReducedMotion } from './player.js';
5
6
  function hasScopedViewTransition(node) {
6
7
  return 'startViewTransition' in node && isFunction(node.startViewTransition);
7
8
  }
9
+ function skipOnReducedMotion(transition) {
10
+ if (getPrefersReducedMotion()) {
11
+ transition.skipTransition();
12
+ }
13
+ return transition;
14
+ }
8
15
  export function startViewTransition(callback) {
9
16
  const init = globalThis.document?.startViewTransition;
10
17
  if (!init) {
11
- callback();
12
- const resolved = Promise.resolve();
18
+ const done = Promise.resolve(callback()).then(() => { });
13
19
  return {
14
- finished: resolved,
15
- ready: resolved,
16
- updateCallbackDone: resolved,
20
+ finished: done,
21
+ ready: done,
22
+ updateCallbackDone: done,
17
23
  skipTransition: () => { },
18
24
  };
19
25
  }
20
- const transition = init.call(globalThis.document, callback);
21
- if (getPrefersReducedMotion()) {
22
- transition.skipTransition();
23
- }
24
- return transition;
26
+ return skipOnReducedMotion(init.call(globalThis.document, callback));
25
27
  }
26
28
  export function startScopedViewTransition(target, callback) {
27
- if (!hasScopedViewTransition(target)) {
28
- return null;
29
- }
30
- const transition = target.startViewTransition(callback);
31
- if (getPrefersReducedMotion()) {
32
- transition.skipTransition();
33
- }
34
- return transition;
29
+ return hasScopedViewTransition(target)
30
+ ? skipOnReducedMotion(target.startViewTransition(callback))
31
+ : null;
35
32
  }
36
33
  export function setTransitionName(target, name) {
37
34
  target.style.viewTransitionName = name;
@@ -45,36 +42,28 @@ export function getActiveViewTransition() {
45
42
  return globalThis.document?.activeViewTransition ?? null;
46
43
  }
47
44
  export function getActiveScopedViewTransition(target) {
48
- if (!hasScopedViewTransition(target)) {
49
- return null;
50
- }
51
- return target.activeViewTransition ?? null;
45
+ return hasScopedViewTransition(target)
46
+ ? (target.activeViewTransition ?? null)
47
+ : null;
48
+ }
49
+ function isSameTemplate(a, b) {
50
+ return a.strings === b.strings && sameItems(a.values, b.values);
52
51
  }
53
52
  class ScopedViewTransitionDirective extends AsyncDirective {
54
- constructor() {
55
- super(...arguments);
56
- this._isFirstRender = true;
57
- }
58
53
  render(template) {
59
54
  return template;
60
55
  }
61
56
  update(part, [template]) {
62
- if (this._isFirstRender) {
63
- this._isFirstRender = false;
57
+ const previous = this._template;
58
+ this._template = template;
59
+ if (!previous || isSameTemplate(previous, template)) {
64
60
  return this.render(template);
65
61
  }
66
- const parent = part.parentNode;
67
- if (!hasScopedViewTransition(parent)) {
68
- return this.render(template);
69
- }
70
- const transition = parent.startViewTransition(() => {
62
+ const transition = startScopedViewTransition(part.parentNode, () => {
71
63
  this.setValue(template);
72
64
  return new Promise((resolve) => requestAnimationFrame(resolve));
73
65
  });
74
- if (getPrefersReducedMotion()) {
75
- transition.skipTransition();
76
- }
77
- return noChange;
66
+ return transition ? noChange : this.render(template);
78
67
  }
79
68
  }
80
69
  export const scopedViewTransition = directive(ScopedViewTransitionDirective);
@@ -1 +1 @@
1
- {"version":3,"file":"view-transition.js","sourceRoot":"","sources":["../../src/animations/view-transition.ts"],"names":[],"mappings":"AAAA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,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;YACxB,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,qBAAqB,CAAC,OAAO,CAAC,CAAC,CAAC;QAClE,CAAC,CAAC,CAAC;QAEH,IAAI,uBAAuB,EAAE,EAAE,CAAC;YAC9B,UAAU,CAAC,cAAc,EAAE,CAAC;QAC9B,CAAC;QAED,OAAO,QAAQ,CAAC;IAClB,CAAC;CACF;AAaD,MAAM,CAAC,MAAM,oBAAoB,GAAG,SAAS,CAAC,6BAA6B,CAAC,CAAC","sourcesContent":["import { type ChildPart, noChange, type TemplateResult } from 'lit';\nimport {\n AsyncDirective,\n type DirectiveParameters,\n directive,\n} from 'lit/async-directive.js';\nimport { isFunction } from '#internals/utils/types.js';\nimport { getPrefersReducedMotion } from './player.js';\n\ntype ScopedViewTransitionElement = HTMLElement & {\n startViewTransition: (\n callback: () => Promise<unknown> | unknown\n ) => ViewTransition;\n activeViewTransition?: ViewTransition | null;\n};\n\n/**\n * Returns true if the specified node supports scoped view transitions, false otherwise.\n */\nfunction hasScopedViewTransition(\n node: Node\n): node is ScopedViewTransitionElement {\n return 'startViewTransition' in node && isFunction(node.startViewTransition);\n}\n\n/**\n * Starts a document view transition and skips it if the user has requested reduced motion.\n */\nexport function startViewTransition(\n callback: ViewTransitionUpdateCallback\n): ViewTransition {\n const init = globalThis.document?.startViewTransition;\n\n /* c8 ignore next 11 */\n if (!init) {\n callback();\n const resolved = Promise.resolve();\n\n return {\n finished: resolved,\n ready: resolved,\n updateCallbackDone: resolved,\n skipTransition: () => {},\n } as ViewTransition;\n }\n\n const transition = init.call(globalThis.document, callback);\n\n if (getPrefersReducedMotion()) {\n transition.skipTransition();\n }\n\n return transition;\n}\n\n/**\n * Starts a scoped view transition on the specified target element and skips it if the user has requested reduced motion.\n */\nexport function startScopedViewTransition(\n target: HTMLElement,\n callback: ViewTransitionUpdateCallback\n): ViewTransition | null {\n if (!hasScopedViewTransition(target)) {\n return null;\n }\n\n const transition = target.startViewTransition(callback);\n\n if (getPrefersReducedMotion()) {\n transition.skipTransition();\n }\n\n return transition;\n}\n\n/**\n * Sets the view transition name for the specified target element.\n */\nexport function setTransitionName(target: HTMLElement, name: string): void {\n target.style.viewTransitionName = name;\n}\n\n/**\n * Clears the view transition name for the specified target elements.\n */\nexport function clearTransitionName(...targets: HTMLElement[]): void {\n for (const target of targets) {\n target.style.viewTransitionName = '';\n }\n}\n\n/**\n * Returns the active view transition if one is currently in progress, or null otherwise.\n */\nexport function getActiveViewTransition(): ViewTransition | null {\n return globalThis.document?.activeViewTransition ?? null;\n}\n\n/**\n * Returns the active scoped view transition for the specified target element if one is currently in progress, or null otherwise.\n */\nexport function getActiveScopedViewTransition(\n target: Node\n): ViewTransition | null {\n if (!hasScopedViewTransition(target)) {\n return null;\n }\n\n return target.activeViewTransition ?? null;\n}\n\nclass ScopedViewTransitionDirective extends AsyncDirective {\n private _isFirstRender = true;\n\n public override render(template: TemplateResult): TemplateResult {\n return template;\n }\n\n public override update(\n part: ChildPart,\n [template]: DirectiveParameters<this>\n ) {\n if (this._isFirstRender) {\n this._isFirstRender = false;\n return this.render(template);\n }\n\n const parent = part.parentNode;\n\n if (!hasScopedViewTransition(parent)) {\n return this.render(template);\n }\n\n const transition = parent.startViewTransition(() => {\n this.setValue(template);\n return new Promise((resolve) => requestAnimationFrame(resolve));\n });\n\n if (getPrefersReducedMotion()) {\n transition.skipTransition();\n }\n\n return noChange;\n }\n}\n\n/**\n * A directive that enables scoped view transitions for a template.\n *\n * When applied, it will start a view transition whenever the template is updated,\n * provided that the parent node supports view transitions.\n * If the user has requested reduced motion, the transition will be skipped.\n *\n * @remarks\n * This directive is intended to be used with Lit templates inside a component that supports view transitions.\n * It will not work if the parent node does not support view transitions (e.g., if the parent is not a document or element that implements the ViewTransition interface).\n */\nexport const scopedViewTransition = directive(ScopedViewTransitionDirective);\n"]}
1
+ {"version":3,"file":"view-transition.js","sourceRoot":"","sources":["../../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B,CAAC;QAED,MAAM,UAAU,GAAG,yBAAyB,CAAC,IAAI,CAAC,UAAU,EAAE,GAAG,EAAE;YACjE,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;YAExB,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,qBAAqB,CAAC,OAAO,CAAC,CAAC,CAAC;QAClE,CAAC,CAAC,CAAC;QAEH,OAAO,UAAU,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;IACvD,CAAC;CACF;AAYD,MAAM,CAAC,MAAM,oBAAoB,GAAG,SAAS,CAAC,6BAA6B,CAAC,CAAC","sourcesContent":["import { type ChildPart, noChange, type TemplateResult } from 'lit';\nimport {\n AsyncDirective,\n type DirectiveParameters,\n directive,\n} from 'lit/async-directive.js';\nimport { sameItems } from '#internals/utils/arrays.js';\nimport { isFunction } from '#internals/utils/types.js';\nimport { getPrefersReducedMotion } from './player.js';\n\ntype ScopedViewTransitionElement = HTMLElement & {\n startViewTransition: (\n callback: () => Promise<unknown> | unknown\n ) => ViewTransition;\n activeViewTransition?: ViewTransition | null;\n};\n\n/**\n * Returns true if the specified node supports scoped view transitions, false otherwise.\n */\nfunction hasScopedViewTransition(\n node: Node\n): node is ScopedViewTransitionElement {\n return 'startViewTransition' in node && isFunction(node.startViewTransition);\n}\n\nfunction skipOnReducedMotion(transition: ViewTransition): ViewTransition {\n if (getPrefersReducedMotion()) {\n transition.skipTransition();\n }\n\n return transition;\n}\n\n/**\n * Starts a document view transition and skips it if the user has requested reduced motion.\n */\nexport function startViewTransition(\n callback: ViewTransitionUpdateCallback\n): ViewTransition {\n const init = globalThis.document?.startViewTransition;\n\n /* c8 ignore next 10 */\n if (!init) {\n const done = Promise.resolve(callback()).then(() => {});\n\n return {\n finished: done,\n ready: done,\n updateCallbackDone: done,\n skipTransition: () => {},\n } as ViewTransition;\n }\n\n return skipOnReducedMotion(init.call(globalThis.document, callback));\n}\n\n/**\n * Starts a scoped view transition on the specified target element and skips it if the user has requested reduced motion.\n * Returns null, without calling `callback`, if the target does not support scoped view transitions.\n */\nexport function startScopedViewTransition(\n target: Node,\n callback: ViewTransitionUpdateCallback\n): ViewTransition | null {\n return hasScopedViewTransition(target)\n ? skipOnReducedMotion(target.startViewTransition(callback))\n : null;\n}\n\n/**\n * Sets the view transition name for the specified target element.\n */\nexport function setTransitionName(target: HTMLElement, name: string): void {\n target.style.viewTransitionName = name;\n}\n\n/**\n * Clears the view transition name for the specified target elements.\n */\nexport function clearTransitionName(...targets: HTMLElement[]): void {\n for (const target of targets) {\n target.style.viewTransitionName = '';\n }\n}\n\n/**\n * Returns the active view transition if one is currently in progress, or null otherwise.\n */\nexport function getActiveViewTransition(): ViewTransition | null {\n return globalThis.document?.activeViewTransition ?? null;\n}\n\n/**\n * Returns the active scoped view transition for the specified target element if one is currently in progress, or null otherwise.\n */\nexport function getActiveScopedViewTransition(\n target: Node\n): ViewTransition | null {\n return hasScopedViewTransition(target)\n ? (target.activeViewTransition ?? null)\n : null;\n}\n\nfunction isSameTemplate(a: TemplateResult, b: TemplateResult): boolean {\n return a.strings === b.strings && sameItems(a.values, b.values);\n}\n\nclass ScopedViewTransitionDirective extends AsyncDirective {\n private _template?: TemplateResult;\n\n public override render(template: TemplateResult): TemplateResult {\n return template;\n }\n\n public override update(\n part: ChildPart,\n [template]: DirectiveParameters<this>\n ): TemplateResult | typeof noChange {\n const previous = this._template;\n this._template = template;\n\n if (!previous || isSameTemplate(previous, template)) {\n return this.render(template);\n }\n\n const transition = startScopedViewTransition(part.parentNode, () => {\n this.setValue(template);\n // Let nested elements render before the new state is captured.\n return new Promise((resolve) => requestAnimationFrame(resolve));\n });\n\n return transition ? noChange : this.render(template);\n }\n}\n\n/**\n * A directive that starts a scoped view transition on the parent element each time\n * the template changes. The first render and renders with an unchanged template\n * (same strings and values) do not start a transition.\n * If the user has requested reduced motion, the transition is skipped.\n *\n * @remarks\n * The parent node must implement `Element.startViewTransition()`. Otherwise the\n * template is rendered directly, without a transition.\n */\nexport const scopedViewTransition = directive(ScopedViewTransitionDirective);\n"]}