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
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pointer-operation.js","sourceRoot":"","sources":["../../../src/internals/directives/pointer-operation.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,KAAK,CAAC;AAC/B,OAAO,EACL,cAAc,EAId,QAAQ,GACT,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,wBAAwB,CAAC;AAC1D,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AA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,CAAC,UAAU,EAAE,CAAC;YACrB,OAAO;QACT,CAAC;QAED,MAAM,EAAE,SAAS,EAAE,KAAK,EAAE,GAAG,IAAI,CAAC,UAAU,CAAC;QAC7C,MAAM,OAAO,GAAG,IAAI,CAAC,eAAe,CAAC;QAErC,IAAI,OAAO,EAAE,iBAAiB,CAAC,SAAS,CAAC,EAAE,CAAC;YAC1C,OAAO,CAAC,qBAAqB,CAAC,SAAS,CAAC,CAAC;QAC3C,CAAC;QAED,KAAK,EAAE,MAAM,EAAE,CAAC;QAChB,IAAI,CAAC,eAAe,GAAG,SAAS,CAAC;QACjC,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC;IACzB,CAAC;IAMkB,WAAW;QAC5B,IAAI,CAAC,uBAAuB,EAAE,CAAC;IACjC,CAAC;IAEkB,YAAY;QAC7B,IAAI,CAAC,QAAQ,EAAE,CAAC;QAChB,IAAI,CAAC,aAAa,CAAC,KAAK,EAAE,CAAC;IAC7B,CAAC;IAEe,MAAM,CACpB,IAAiB,EACjB,CAAC,OAAO,CAA4B;QAEpC,IAAI,IAAI,CAAC,WAAW,EAAE,CAAC;YACrB,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,OAAsB,CAAC;YACzC,IAAI,CAAC,QAAQ,GAAG,CAAC,OAAO,IAAI,EAAE,CAAa,CAAC;YAC5C,IAAI,CAAC,uBAAuB,EAAE,CAAC;QACjC,CAAC;QACD,OAAO,QAAQ,CAAC;IAClB,CAAC;IAEM,MAAM,CAAC,QAAmB;QAC/B,OAAO,QAAQ,CAAC;IAClB,CAAC;CAGF","sourcesContent":["import { noChange } from 'lit';\nimport {\n AsyncDirective,\n type DirectiveParameters,\n type ElementPart,\n type PartInfo,\n PartType,\n} from 'lit/async-directive.js';\nimport { createAbortHandle } from '../abort-handler.js';\nimport { escapeKey, isKey } from '../controllers/keys.js';\nimport { getDefaultLayer } from '../utils/dom.js';\nimport { preventDefault } from '../utils/events.js';\nimport { resolveValue } from '../utils/types.js';\n\n/**\n * How an operation applies its result. `immediate` changes the target while\n * the pointer moves. `deferred` changes a ghost, and the target keeps its\n * state until the operation ends.\n */\nexport type PointerOperationMode = 'immediate' | 'deferred';\n\n/** Builds the ghost element from the initial rectangle. */\nexport type GhostFactory = (initial: DOMRect) => HTMLElement;\n\n/** The options that the pointer directives have in common. */\nexport interface PointerOperationOptions {\n /** Whether the directive starts operations. Defaults to `true`. */\n enabled?: boolean;\n /** The mode of the operation. Each directive has its own default. */\n mode?: PointerOperationMode;\n /** The operation target. Defaults to the element with the directive. */\n target?: HTMLElement | (() => HTMLElement | null | undefined);\n ghostFactory?: GhostFactory;\n /** The ghost container. Defaults to the document body. */\n layer?: () => HTMLElement;\n}\n\n/** The traits that a directive fixes, and that its options cannot change. */\nexport type PointerOperationConfig = {\n /** The name of the directive, used in the wrong-part-type error. */\n name: string;\n ghostAttribute: string;\n defaultMode: PointerOperationMode;\n /** The ghost that the directive builds without a factory. */\n defaultGhost: GhostFactory;\n};\n\n/** The state that each operation keeps, whatever the directive. */\nexport type PointerOperationState = {\n pointerId: number;\n /** The ghost element in deferred mode. */\n ghost: HTMLElement | null;\n};\n\n/**\n * The parts that the drag and the resize directives share.\n *\n * @remarks\n * The base class keeps the abort handles, the ghost, the pointer capture and\n * the life-cycle. A subclass adds its own geometry and start events.\n */\nexport abstract class PointerOperationDirective<\n TOptions extends PointerOperationOptions,\n TState extends PointerOperationState,\n> extends AsyncDirective {\n /** Aborts the listeners that wait for an operation to start. */\n protected readonly _triggerAbort = createAbortHandle();\n /** Aborts the listeners that run for the duration of an operation. */\n protected readonly _operationAbort = createAbortHandle();\n\n protected readonly _config: PointerOperationConfig;\n\n protected _options = {} as TOptions;\n protected _host?: HTMLElement;\n protected _operation: TState | null = null;\n\n /** The element that holds the pointer capture of the running operation. */\n private _captureElement?: HTMLElement;\n\n constructor(partInfo: PartInfo, config: PointerOperationConfig) {\n super(partInfo);\n\n if (partInfo.type !== PartType.ELEMENT) {\n throw new Error(\n `The \\`${config.name}\\` directive can only be used on elements.`\n );\n }\n\n this._config = config;\n }\n\n protected get _enabled(): boolean {\n return this._options.enabled ?? true;\n }\n\n protected get _isDeferred(): boolean {\n return (this._options.mode ?? this._config.defaultMode) === 'deferred';\n }\n\n //#region Subclass contract\n\n protected abstract _attachTriggerListeners(): void;\n\n /** Reports the cancellation and restores the target element. */\n protected abstract _cancelOperation(): void;\n\n //#endregion\n\n //#region Shared internals\n\n /** Prevents the native interactions that would compete with the directive. */\n protected readonly _preventNativeBehavior = (event: Event): void => {\n if (this._enabled) {\n event.preventDefault();\n }\n };\n\n protected readonly _handleKeydown = (event: KeyboardEvent): void => {\n if (!this._operation || !isKey(event, escapeKey)) {\n return;\n }\n\n this._cancelOperation();\n this._dispose();\n };\n\n protected _resolveTarget(): HTMLElement | null {\n return resolveValue(this._options.target) ?? this._host ?? null;\n }\n\n protected _resolveLayer(): HTMLElement {\n return this._options.layer?.() ?? getDefaultLayer();\n }\n\n protected _createGhost(initial: DOMRect): HTMLElement {\n const ghost = (this._options.ghostFactory ?? this._config.defaultGhost)(\n initial\n );\n\n ghost.setAttribute(this._config.ghostAttribute, '');\n this._resolveLayer().append(ghost);\n return ghost;\n }\n\n /** Captures the pointer on `element` and adds the operation listeners. */\n protected _startOperationListeners(\n element: HTMLElement,\n pointerId: number,\n onMove: (event: PointerEvent) => void,\n onEnd: (event: PointerEvent) => void\n ): void {\n const { signal } = this._operationAbort;\n\n this._captureElement = element;\n element.setPointerCapture(pointerId);\n element.addEventListener('pointermove', onMove, { signal });\n element.addEventListener('lostpointercapture', onEnd, { signal });\n element.addEventListener('contextmenu', preventDefault, { signal });\n globalThis.addEventListener('keydown', this._handleKeydown, { signal });\n }\n\n /** Stops the operation and removes the ghost and the listeners. */\n protected _dispose(): void {\n this._operationAbort.abort();\n\n if (!this._operation) {\n return;\n }\n\n const { pointerId, ghost } = this._operation;\n const element = this._captureElement;\n\n if (element?.hasPointerCapture(pointerId)) {\n element.releasePointerCapture(pointerId);\n }\n\n ghost?.remove();\n this._captureElement = undefined;\n this._operation = null;\n }\n\n //#endregion\n\n //#region Directive life-cycle\n\n protected override reconnected(): void {\n this._attachTriggerListeners();\n }\n\n protected override disconnected(): void {\n this._dispose();\n this._triggerAbort.abort();\n }\n\n public override update(\n part: ElementPart,\n [options]: DirectiveParameters<this>\n ) {\n if (this.isConnected) {\n this._host = part.element as HTMLElement;\n this._options = (options ?? {}) as TOptions;\n this._attachTriggerListeners();\n }\n return noChange;\n }\n\n public render(_options?: TOptions) {\n return noChange;\n }\n\n //#endregion\n}\n"]}
@@ -1,25 +1,24 @@
1
- import { AsyncDirective, type DirectiveParameters, type ElementPart, type PartInfo } from 'lit/async-directive.js';
2
- export type ResizeMode = 'immediate' | 'deferred';
1
+ import { type PartInfo } from 'lit/async-directive.js';
2
+ import { type PointerOperationOptions, PointerOperationDirective, type PointerOperationState } from './pointer-operation.js';
3
3
  export type ResizeDirection = 'horizontal' | 'vertical' | 'both';
4
- export type ResizeGhostFactory = (initial: DOMRect) => HTMLElement;
5
4
  export type ResizeCallback = (params: ResizeCallbackParams) => unknown;
6
5
  export type ResizeCancelCallback = (state: ResizeState) => unknown;
7
6
  export type ResizeState = {
8
7
  /** The dimensions of the resize target at the start of the operation. */
9
8
  initial: DOMRect;
10
- /** The current dimensions of the resize target. Mutable from within the callbacks. */
9
+ /** The current dimensions. The callbacks can change this rectangle. */
11
10
  current: DOMRect;
12
- /** Difference between the current and initial width. */
11
+ /** The difference between the current and the initial width. */
13
12
  deltaX: number;
14
- /** Difference between the current and initial height. */
13
+ /** The difference between the current and the initial height. */
15
14
  deltaY: number;
16
15
  /** The ghost element when in deferred mode. */
17
16
  ghost: HTMLElement | null;
18
- /** The element the directive is attached to. */
17
+ /** The element that carries the directive. */
19
18
  trigger: HTMLElement | null;
20
19
  /**
21
- * When assigned from within the `end` callback, it is invoked instead of the default
22
- * behavior of applying the final dimensions to the resize target.
20
+ * An optional commit function that the `end` callback sets. It runs in
21
+ * place of the default, which applies the final dimensions to the target.
23
22
  */
24
23
  commit?: () => unknown;
25
24
  };
@@ -27,83 +26,56 @@ export type ResizeCallbackParams = {
27
26
  event: PointerEvent;
28
27
  state: ResizeState;
29
28
  };
30
- /** Options for the resizable directive. */
31
- export interface ResizableOptions {
32
- /** Whether the directive will listen for and initiate resize operations. Defaults to `true`. */
33
- enabled?: boolean;
34
- /**
35
- * The mode of the resize operation.
36
- *
37
- * In `immediate` mode the target element is resized in place as the pointer moves.
38
- * In `deferred` mode a ghost element is created and resized instead, with the final
39
- * dimensions applied to the target when the operation completes.
40
- */
41
- mode?: ResizeMode;
29
+ /**
30
+ * Options for the resizable directive. See {@link PointerOperationOptions}
31
+ * for the shared ones. The mode defaults to `immediate`, which resizes the
32
+ * target while the pointer moves.
33
+ */
34
+ export interface ResizableOptions extends PointerOperationOptions {
42
35
  /** The direction in which the element can be resized. Defaults to `both`. */
43
36
  direction?: ResizeDirection;
44
- /**
45
- * The element being resized. Defaults to the element the directive is applied to.
46
- *
47
- * Accepts either an element or a function returning one, resolved at the start
48
- * of each resize operation.
49
- */
50
- target?: HTMLElement | (() => HTMLElement | null | undefined);
51
- /** Factory function for the ghost element in deferred mode. */
52
- ghostFactory?: ResizeGhostFactory;
53
- /** The container in which the deferred ghost element is rendered. Defaults to the document body. */
54
- layer?: () => HTMLElement;
55
- /** The minimum width of the resizable element in pixels. */
37
+ /** The size bounds of the resizable element, in pixels. */
56
38
  minWidth?: number;
57
- /** The maximum width of the resizable element in pixels. */
58
39
  maxWidth?: number;
59
- /** The minimum height of the resizable element in pixels. */
60
40
  minHeight?: number;
61
- /** The maximum height of the resizable element in pixels. */
62
41
  maxHeight?: number;
63
- /** Whether to maintain the initial aspect ratio of the resizable element. */
42
+ /** Whether the element keeps its initial aspect ratio during a resize. */
64
43
  maintainAspectRatio?: boolean;
65
- /** Called when a resize operation starts. Return `false` to abort the operation. */
44
+ /** Runs when a resize starts. A `false` return aborts the operation. */
66
45
  start?: ResizeCallback;
67
- /** Called on each pointer move during a resize operation. May mutate `state.current`. */
46
+ /** Runs on each pointer move. The callback can change `state.current`. */
68
47
  resize?: ResizeCallback;
69
- /** Called when a resize operation completes. May assign `state.commit`. */
48
+ /** Runs when a resize completes. The callback can set `state.commit`. */
70
49
  end?: ResizeCallback;
71
- /** Called when a resize operation is cancelled with the Escape key. */
50
+ /** Runs when the Escape key cancels a resize operation. */
72
51
  cancel?: ResizeCancelCallback;
73
52
  }
74
- declare class ResizableDirective extends AsyncDirective {
75
- private readonly _triggerAbort;
76
- private readonly _resizeAbort;
77
- private _options;
78
- private _host?;
79
- private _operation;
53
+ type ResizeOperation = PointerOperationState & {
54
+ target: HTMLElement;
55
+ initial: DOMRect;
56
+ current: DOMRect;
57
+ /** The inline size styles of the target, restored on an immediate cancel. */
58
+ targetStyles: {
59
+ width: string;
60
+ height: string;
61
+ };
62
+ };
63
+ declare class ResizableDirective extends PointerOperationDirective<ResizableOptions, ResizeOperation> {
80
64
  constructor(partInfo: PartInfo);
81
- private get _enabled();
82
- private get _isDeferred();
65
+ protected _cancelOperation(): void;
83
66
  private readonly _handlePointerDown;
84
67
  private readonly _handlePointerMove;
85
68
  private readonly _handlePointerEnd;
86
- private readonly _handleKeydown;
87
- /** Prevents native touch interactions from interfering with an enabled directive. */
88
- private readonly _preventNativeBehavior;
89
- private _addTriggerListeners;
90
- private _resolveTarget;
91
- private _createGhost;
69
+ protected _attachTriggerListeners(): void;
92
70
  private _createState;
93
71
  private _createParams;
94
72
  private _updateDimensions;
95
- /** Applies the current dimensions of the operation as inline styles to the given element. */
73
+ /** Applies the current dimensions to `element` as inline styles. */
96
74
  private _applyDimensions;
97
- /** Stops the current resize operation, cleaning up the ghost element and event listeners. */
98
- private _dispose;
99
- protected reconnected(): void;
100
- protected disconnected(): void;
101
- update(part: ElementPart, [options]: DirectiveParameters<this>): symbol;
102
- render(_options?: ResizableOptions): symbol;
103
75
  }
104
76
  /**
105
- * A directive that makes an element a trigger for resizing a target element,
106
- * either in place or through a deferred ghost element.
77
+ * A directive that makes an element a resize trigger. It resizes the target
78
+ * in place, or through a deferred ghost element.
107
79
  */
108
80
  export declare const resizable: (_options?: ResizableOptions | undefined) => import("lit-html/directive.js").DirectiveResult<typeof ResizableDirective>;
109
81
  export {};
@@ -1,9 +1,6 @@
1
- import { noChange } from 'lit';
2
- import { AsyncDirective, directive, PartType, } from 'lit/async-directive.js';
3
- import { createAbortHandle } from '../abort-handler.js';
4
- import { escapeKey, isKey } from '../controllers/key-bindings.js';
5
- import { getDefaultLayer, setStyles } from '../utils/dom.js';
6
- import { preventDefault } from '../utils/events.js';
1
+ import { directive } from 'lit/async-directive.js';
2
+ import { setStyles } from '../utils/dom.js';
3
+ import { PointerOperationDirective, } from './pointer-operation.js';
7
4
  function createDefaultGhost({ x, y, width, height }) {
8
5
  const element = document.createElement('div');
9
6
  const { scrollX, scrollY } = window;
@@ -19,13 +16,14 @@ function createDefaultGhost({ x, y, width, height }) {
19
16
  });
20
17
  return element;
21
18
  }
22
- class ResizableDirective extends AsyncDirective {
19
+ class ResizableDirective extends PointerOperationDirective {
23
20
  constructor(partInfo) {
24
- super(partInfo);
25
- this._triggerAbort = createAbortHandle();
26
- this._resizeAbort = createAbortHandle();
27
- this._options = {};
28
- this._operation = null;
21
+ super(partInfo, {
22
+ name: 'resizable',
23
+ ghostAttribute: 'data-resize-ghost',
24
+ defaultMode: 'immediate',
25
+ defaultGhost: createDefaultGhost,
26
+ });
29
27
  this._handlePointerDown = (event) => {
30
28
  if (!this._enabled || event.button !== 0 || this._operation) {
31
29
  return;
@@ -39,7 +37,7 @@ class ResizableDirective extends AsyncDirective {
39
37
  pointerId: event.pointerId,
40
38
  target,
41
39
  initial,
42
- current: structuredClone(initial),
40
+ current: DOMRect.fromRect(initial),
43
41
  ghost: this._isDeferred ? this._createGhost(initial) : null,
44
42
  targetStyles: { width: target.style.width, height: target.style.height },
45
43
  };
@@ -47,15 +45,7 @@ class ResizableDirective extends AsyncDirective {
47
45
  this._dispose();
48
46
  return;
49
47
  }
50
- const host = this._host;
51
- const { signal } = this._resizeAbort;
52
- host.setPointerCapture(event.pointerId);
53
- host.addEventListener('pointermove', this._handlePointerMove, { signal });
54
- host.addEventListener('lostpointercapture', this._handlePointerEnd, {
55
- signal,
56
- });
57
- host.addEventListener('contextmenu', preventDefault, { signal });
58
- globalThis.addEventListener('keydown', this._handleKeydown, { signal });
48
+ this._startOperationListeners(this._host, event.pointerId, this._handlePointerMove, this._handlePointerEnd);
59
49
  };
60
50
  this._handlePointerMove = (event) => {
61
51
  if (!this._operation) {
@@ -82,32 +72,14 @@ class ResizableDirective extends AsyncDirective {
82
72
  }
83
73
  this._dispose();
84
74
  };
85
- this._handleKeydown = (event) => {
86
- if (!this._operation || !isKey(event, escapeKey)) {
87
- return;
88
- }
89
- this._options.cancel?.(this._createState());
90
- if (!this._isDeferred) {
91
- setStyles(this._operation.target, this._operation.targetStyles);
92
- }
93
- this._dispose();
94
- };
95
- this._preventNativeBehavior = (event) => {
96
- if (this._enabled) {
97
- event.preventDefault();
98
- }
99
- };
100
- if (partInfo.type !== PartType.ELEMENT) {
101
- throw new Error('The `resizable` directive can only be used on elements.');
102
- }
103
- }
104
- get _enabled() {
105
- return this._options.enabled ?? true;
106
75
  }
107
- get _isDeferred() {
108
- return this._options.mode === 'deferred';
76
+ _cancelOperation() {
77
+ this._options.cancel?.(this._createState());
78
+ if (!this._isDeferred) {
79
+ setStyles(this._operation.target, this._operation.targetStyles);
80
+ }
109
81
  }
110
- _addTriggerListeners() {
82
+ _attachTriggerListeners() {
111
83
  if (!this._host) {
112
84
  return;
113
85
  }
@@ -120,16 +92,6 @@ class ResizableDirective extends AsyncDirective {
120
92
  signal,
121
93
  });
122
94
  }
123
- _resolveTarget() {
124
- const { target } = this._options;
125
- return ((typeof target === 'function' ? target() : target) ?? this._host ?? null);
126
- }
127
- _createGhost(initial) {
128
- const ghost = this._options.ghostFactory?.(initial) ?? createDefaultGhost(initial);
129
- ghost.setAttribute('data-resize-ghost', '');
130
- (this._options.layer?.() ?? getDefaultLayer()).append(ghost);
131
- return ghost;
132
- }
133
95
  _createState() {
134
96
  const { initial, current, ghost } = this._operation;
135
97
  return {
@@ -180,35 +142,6 @@ class ResizableDirective extends AsyncDirective {
180
142
  });
181
143
  }
182
144
  }
183
- _dispose() {
184
- this._resizeAbort.abort();
185
- if (this._operation) {
186
- const { pointerId, ghost } = this._operation;
187
- if (this._host?.hasPointerCapture(pointerId)) {
188
- this._host.releasePointerCapture(pointerId);
189
- }
190
- ghost?.remove();
191
- this._operation = null;
192
- }
193
- }
194
- reconnected() {
195
- this._addTriggerListeners();
196
- }
197
- disconnected() {
198
- this._dispose();
199
- this._triggerAbort.abort();
200
- }
201
- update(part, [options]) {
202
- if (this.isConnected) {
203
- this._host = part.element;
204
- this._options = options ?? {};
205
- this._addTriggerListeners();
206
- }
207
- return noChange;
208
- }
209
- render(_options) {
210
- return noChange;
211
- }
212
145
  }
213
146
  export const resizable = directive(ResizableDirective);
214
147
  //# sourceMappingURL=resize.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"resize.js","sourceRoot":"","sources":["../../../src/internals/directives/resize.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,KAAK,CAAC;AAC/B,OAAO,EACL,cAAc,EACd,SAAS,EAIT,QAAQ,GACT,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,gCAAgC,CAAC;AAClE,OAAO,EAAE,eAAe,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC7D,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAwFpD,SAAS,kBAAkB,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,EAAW;IAC1D,MAAM,OAAO,GAAG,QAAQ,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;IAC9C,MA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ACd,IAAI,CAAC,YAAY,CAAC,KAAK,EAAE,CAAC;QAE1B,IAAI,IAAI,CAAC,UAAU,EAAE,CAAC;YACpB,MAAM,EAAE,SAAS,EAAE,KAAK,EAAE,GAAG,IAAI,CAAC,UAAU,CAAC;YAE7C,IAAI,IAAI,CAAC,KAAK,EAAE,iBAAiB,CAAC,SAAS,CAAC,EAAE,CAAC;gBAC7C,IAAI,CAAC,KAAK,CAAC,qBAAqB,CAAC,SAAS,CAAC,CAAC;YAC9C,CAAC;YAED,KAAK,EAAE,MAAM,EAAE,CAAC;YAChB,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC;QACzB,CAAC;IACH,CAAC;IAIkB,WAAW;QAC5B,IAAI,CAAC,oBAAoB,EAAE,CAAC;IAC9B,CAAC;IAEkB,YAAY;QAC7B,IAAI,CAAC,QAAQ,EAAE,CAAC;QAChB,IAAI,CAAC,aAAa,CAAC,KAAK,EAAE,CAAC;IAC7B,CAAC;IAEe,MAAM,CACpB,IAAiB,EACjB,CAAC,OAAO,CAA4B;QAEpC,IAAI,IAAI,CAAC,WAAW,EAAE,CAAC;YACrB,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,OAAsB,CAAC;YACzC,IAAI,CAAC,QAAQ,GAAG,OAAO,IAAI,EAAE,CAAC;YAC9B,IAAI,CAAC,oBAAoB,EAAE,CAAC;QAC9B,CAAC;QACD,OAAO,QAAQ,CAAC;IAClB,CAAC;IAEM,MAAM,CAAC,QAA2B;QACvC,OAAO,QAAQ,CAAC;IAClB,CAAC;CACF;AAMD,MAAM,CAAC,MAAM,SAAS,GAAG,SAAS,CAAC,kBAAkB,CAAC,CAAC","sourcesContent":["import { noChange } from 'lit';\nimport {\n AsyncDirective,\n directive,\n type DirectiveParameters,\n type ElementPart,\n type PartInfo,\n PartType,\n} from 'lit/async-directive.js';\nimport { createAbortHandle } from '../abort-handler.js';\nimport { escapeKey, isKey } from '../controllers/key-bindings.js';\nimport { getDefaultLayer, setStyles } from '../utils/dom.js';\nimport { preventDefault } from '../utils/events.js';\n\nexport type ResizeMode = 'immediate' | 'deferred';\nexport type ResizeDirection = 'horizontal' | 'vertical' | 'both';\nexport type ResizeGhostFactory = (initial: DOMRect) => HTMLElement;\nexport type ResizeCallback = (params: ResizeCallbackParams) => unknown;\nexport type ResizeCancelCallback = (state: ResizeState) => unknown;\n\nexport type ResizeState = {\n /** The dimensions of the resize target at the start of the operation. */\n initial: DOMRect;\n /** The current dimensions of the resize target. Mutable from within the callbacks. */\n current: DOMRect;\n /** Difference between the current and initial width. */\n deltaX: number;\n /** Difference between the current and initial height. */\n deltaY: number;\n /** The ghost element when in deferred mode. */\n ghost: HTMLElement | null;\n /** The element the directive is attached to. */\n trigger: HTMLElement | null;\n /**\n * When assigned from within the `end` callback, it is invoked instead of the default\n * behavior of applying the final dimensions to the resize target.\n */\n commit?: () => unknown;\n};\n\nexport type ResizeCallbackParams = {\n event: PointerEvent;\n state: ResizeState;\n};\n\n/** Options for the resizable directive. */\nexport interface ResizableOptions {\n /** Whether the directive will listen for and initiate resize operations. Defaults to `true`. */\n enabled?: boolean;\n /**\n * The mode of the resize operation.\n *\n * In `immediate` mode the target element is resized in place as the pointer moves.\n * In `deferred` mode a ghost element is created and resized instead, with the final\n * dimensions applied to the target when the operation completes.\n */\n mode?: ResizeMode;\n /** The direction in which the element can be resized. Defaults to `both`. */\n direction?: ResizeDirection;\n /**\n * The element being resized. Defaults to the element the directive is applied to.\n *\n * Accepts either an element or a function returning one, resolved at the start\n * of each resize operation.\n */\n target?: HTMLElement | (() => HTMLElement | null | undefined);\n /** Factory function for the ghost element in deferred mode. */\n ghostFactory?: ResizeGhostFactory;\n /** The container in which the deferred ghost element is rendered. Defaults to the document body. */\n layer?: () => HTMLElement;\n /** The minimum width of the resizable element in pixels. */\n minWidth?: number;\n /** The maximum width of the resizable element in pixels. */\n maxWidth?: number;\n /** The minimum height of the resizable element in pixels. */\n minHeight?: number;\n /** The maximum height of the resizable element in pixels. */\n maxHeight?: number;\n /** Whether to maintain the initial aspect ratio of the resizable element. */\n maintainAspectRatio?: boolean;\n /** Called when a resize operation starts. Return `false` to abort the operation. */\n start?: ResizeCallback;\n /** Called on each pointer move during a resize operation. May mutate `state.current`. */\n resize?: ResizeCallback;\n /** Called when a resize operation completes. May assign `state.commit`. */\n end?: ResizeCallback;\n /** Called when a resize operation is cancelled with the Escape key. */\n cancel?: ResizeCancelCallback;\n}\n\ntype ResizeOperation = {\n pointerId: number;\n target: HTMLElement;\n initial: DOMRect;\n current: DOMRect;\n ghost: HTMLElement | null;\n /** Inline size styles of the target before the operation, restored on cancel. */\n targetStyles: { width: string; height: string };\n};\n\nfunction createDefaultGhost({ x, y, width, height }: DOMRect): HTMLElement {\n const element = document.createElement('div');\n const { scrollX, scrollY } = window;\n\n setStyles(element, {\n position: 'absolute',\n top: `${y + scrollY}px`,\n left: `${x + scrollX}px`,\n zIndex: '1000',\n background: 'pink',\n opacity: '0.85',\n width: `${width}px`,\n height: `${height}px`,\n });\n\n return element;\n}\n\nclass ResizableDirective extends AsyncDirective {\n private readonly _triggerAbort = createAbortHandle();\n private readonly _resizeAbort = createAbortHandle();\n\n private _options: ResizableOptions = {};\n private _host?: HTMLElement;\n private _operation: ResizeOperation | null = null;\n\n constructor(partInfo: PartInfo) {\n super(partInfo);\n\n if (partInfo.type !== PartType.ELEMENT) {\n throw new Error(\n 'The `resizable` directive can only be used on elements.'\n );\n }\n }\n\n private get _enabled(): boolean {\n return this._options.enabled ?? true;\n }\n\n private get _isDeferred(): boolean {\n return this._options.mode === 'deferred';\n }\n\n // #region Event handlers\n\n private readonly _handlePointerDown = (event: PointerEvent): void => {\n if (!this._enabled || event.button !== 0 || this._operation) {\n return;\n }\n\n const target = this._resolveTarget();\n if (!target) {\n return;\n }\n\n const initial = target.getBoundingClientRect();\n\n this._operation = {\n pointerId: event.pointerId,\n target,\n initial,\n current: structuredClone(initial),\n ghost: this._isDeferred ? this._createGhost(initial) : null,\n targetStyles: { width: target.style.width, height: target.style.height },\n };\n\n if (this._options.start?.(this._createParams(event)) === false) {\n this._dispose();\n return;\n }\n\n const host = this._host!;\n const { signal } = this._resizeAbort;\n\n host.setPointerCapture(event.pointerId);\n host.addEventListener('pointermove', this._handlePointerMove, { signal });\n host.addEventListener('lostpointercapture', this._handlePointerEnd, {\n signal,\n });\n host.addEventListener('contextmenu', preventDefault, { signal });\n globalThis.addEventListener('keydown', this._handleKeydown, { signal });\n };\n\n private readonly _handlePointerMove = (event: PointerEvent): void => {\n if (!this._operation) {\n return;\n }\n\n this._updateDimensions(event);\n\n const params = this._createParams(event);\n this._options.resize?.(params);\n this._operation.current = params.state.current;\n\n this._applyDimensions(\n this._isDeferred ? this._operation.ghost : this._operation.target\n );\n };\n\n private readonly _handlePointerEnd = (event: PointerEvent): void => {\n if (!this._operation) {\n return;\n }\n\n const params = this._createParams(event);\n this._options.end?.(params);\n this._operation.current = params.state.current;\n\n if (params.state.commit) {\n params.state.commit();\n } else {\n this._applyDimensions(this._operation.target);\n }\n\n this._dispose();\n };\n\n private readonly _handleKeydown = (event: KeyboardEvent): void => {\n if (!this._operation || !isKey(event, escapeKey)) {\n return;\n }\n\n this._options.cancel?.(this._createState());\n\n if (!this._isDeferred) {\n setStyles(this._operation.target, this._operation.targetStyles);\n }\n\n this._dispose();\n };\n\n // #endregion\n\n // #region Internal API\n\n /** Prevents native touch interactions from interfering with an enabled directive. */\n private readonly _preventNativeBehavior = (event: Event): void => {\n if (this._enabled) {\n event.preventDefault();\n }\n };\n\n private _addTriggerListeners(): void {\n if (!this._host) {\n return;\n }\n\n const { signal } = this._triggerAbort;\n\n this._host.addEventListener('pointerdown', this._handlePointerDown, {\n signal,\n });\n this._host.addEventListener('touchstart', this._preventNativeBehavior, {\n passive: false,\n signal,\n });\n }\n\n private _resolveTarget(): HTMLElement | null {\n const { target } = this._options;\n return (\n (typeof target === 'function' ? target() : target) ?? this._host ?? null\n );\n }\n\n private _createGhost(initial: DOMRect): HTMLElement {\n const ghost =\n this._options.ghostFactory?.(initial) ?? createDefaultGhost(initial);\n\n ghost.setAttribute('data-resize-ghost', '');\n (this._options.layer?.() ?? getDefaultLayer()).append(ghost);\n return ghost;\n }\n\n private _createState(): ResizeState {\n const { initial, current, ghost } = this._operation!;\n\n return {\n initial,\n current,\n deltaX: current.width - initial.width,\n deltaY: current.height - initial.height,\n ghost,\n trigger: this._host ?? null,\n };\n }\n\n private _createParams(event: PointerEvent): ResizeCallbackParams {\n return { event, state: this._createState() };\n }\n\n private _updateDimensions({ clientX, clientY }: PointerEvent): void {\n const { initial, current } = this._operation!;\n const {\n direction = 'both',\n maintainAspectRatio,\n minWidth,\n maxWidth,\n minHeight,\n maxHeight,\n } = this._options;\n\n const horizontal = direction !== 'vertical';\n const vertical = direction !== 'horizontal';\n\n let width = horizontal ? clientX - initial.x : initial.width;\n let height = vertical ? clientY - initial.y : initial.height;\n\n if (maintainAspectRatio) {\n const ratio = initial.width / initial.height;\n\n if (horizontal) {\n height = width / ratio;\n } else {\n width = height * ratio;\n }\n }\n\n if (minWidth != null) width = Math.max(width, minWidth);\n if (maxWidth != null) width = Math.min(width, maxWidth);\n if (minHeight != null) height = Math.max(height, minHeight);\n if (maxHeight != null) height = Math.min(height, maxHeight);\n\n current.width = width;\n current.height = height;\n }\n\n /** Applies the current dimensions of the operation as inline styles to the given element. */\n private _applyDimensions(element: HTMLElement | null): void {\n if (element) {\n const { current } = this._operation!;\n setStyles(element, {\n width: `${current.width}px`,\n height: `${current.height}px`,\n });\n }\n }\n\n /** Stops the current resize operation, cleaning up the ghost element and event listeners. */\n private _dispose(): void {\n this._resizeAbort.abort();\n\n if (this._operation) {\n const { pointerId, ghost } = this._operation;\n\n if (this._host?.hasPointerCapture(pointerId)) {\n this._host.releasePointerCapture(pointerId);\n }\n\n ghost?.remove();\n this._operation = null;\n }\n }\n\n // #endregion\n\n protected override reconnected(): void {\n this._addTriggerListeners();\n }\n\n protected override disconnected(): void {\n this._dispose();\n this._triggerAbort.abort();\n }\n\n public override update(\n part: ElementPart,\n [options]: DirectiveParameters<this>\n ) {\n if (this.isConnected) {\n this._host = part.element as HTMLElement;\n this._options = options ?? {};\n this._addTriggerListeners();\n }\n return noChange;\n }\n\n public render(_options?: ResizableOptions) {\n return noChange;\n }\n}\n\n/**\n * A directive that makes an element a trigger for resizing a target element,\n * either in place or through a deferred ghost element.\n */\nexport const resizable = directive(ResizableDirective);\n"]}
1
+ {"version":3,"file":"resize.js","sourceRoot":"","sources":["../../../src/internals/directives/resize.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAiB,MAAM,wBAAwB,CAAC;AAClE,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5C,OAAO,EAEL,yBAAyB,GAE1B,MAAM,wBAAwB,CAAC;AAgEhC,SAAS,kBAAkB,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,EAAW;IAC1D,MAAM,OAAO,GAAG,QAAQ,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;IAC9C,MAAM,EAAE,OAAO,EAAE,OAAO,EAAE,GAAG,MAAM,CAAC;IAEpC,SAAS,CAAC,OAAO,EAAE;QACjB,QAAQ,EAAE,UAAU;QACpB,GAAG,EAAE,GAAG,CAAC,GAAG,OAAO,IAAI;QACvB,IAAI,EAAE,GAAG,CAAC,GAAG,OAAO,IAAI;QACxB,MAAM,EAAE,MAAM;QACd,UAAU,EAAE,MAAM;QAClB,OAAO,EAAE,MAAM;QACf,KAAK,EAAE,GAAG,KAAK,IAAI;QACnB,MAAM,EAAE,GAAG,MAAM,IAAI;KACtB,CAAC,CAAC;IAEH,OAAO,OAAO,CAAC;AACjB,CAAC;AAED,MAAM,kBAAmB,SAAQ,yBAGhC;IACC,YAAY,QAAkB;QAC5B,KAAK,CAAC,QAAQ,EAAE;YACd,IAAI,EAAE,WAAW;YACjB,cAAc,EAAE,mBAAmB;YACnC,WAAW,EAAE,WAAW;YACxB,YAAY,EAAE,kBAAkB;S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OAAO,EAAE;gBACjB,KAAK,EAAE,GAAG,OAAO,CAAC,KAAK,IAAI;gBAC3B,MAAM,EAAE,GAAG,OAAO,CAAC,MAAM,IAAI;aAC9B,CAAC,CAAC;QACL,CAAC;IACH,CAAC;CAGF;AAMD,MAAM,CAAC,MAAM,SAAS,GAAG,SAAS,CAAC,kBAAkB,CAAC,CAAC","sourcesContent":["import { directive, type PartInfo } from 'lit/async-directive.js';\nimport { setStyles } from '../utils/dom.js';\nimport {\n type PointerOperationOptions,\n PointerOperationDirective,\n type PointerOperationState,\n} from './pointer-operation.js';\n\nexport type ResizeDirection = 'horizontal' | 'vertical' | 'both';\nexport type ResizeCallback = (params: ResizeCallbackParams) => unknown;\nexport type ResizeCancelCallback = (state: ResizeState) => unknown;\n\nexport type ResizeState = {\n /** The dimensions of the resize target at the start of the operation. */\n initial: DOMRect;\n /** The current dimensions. The callbacks can change this rectangle. */\n current: DOMRect;\n /** The difference between the current and the initial width. */\n deltaX: number;\n /** The difference between the current and the initial height. */\n deltaY: number;\n /** The ghost element when in deferred mode. */\n ghost: HTMLElement | null;\n /** The element that carries the directive. */\n trigger: HTMLElement | null;\n /**\n * An optional commit function that the `end` callback sets. It runs in\n * place of the default, which applies the final dimensions to the target.\n */\n commit?: () => unknown;\n};\n\nexport type ResizeCallbackParams = {\n event: PointerEvent;\n state: ResizeState;\n};\n\n/**\n * Options for the resizable directive. See {@link PointerOperationOptions}\n * for the shared ones. The mode defaults to `immediate`, which resizes the\n * target while the pointer moves.\n */\nexport interface ResizableOptions extends PointerOperationOptions {\n /** The direction in which the element can be resized. Defaults to `both`. */\n direction?: ResizeDirection;\n /** The size bounds of the resizable element, in pixels. */\n minWidth?: number;\n maxWidth?: number;\n minHeight?: number;\n maxHeight?: number;\n /** Whether the element keeps its initial aspect ratio during a resize. */\n maintainAspectRatio?: boolean;\n /** Runs when a resize starts. A `false` return aborts the operation. */\n start?: ResizeCallback;\n /** Runs on each pointer move. The callback can change `state.current`. */\n resize?: ResizeCallback;\n /** Runs when a resize completes. The callback can set `state.commit`. */\n end?: ResizeCallback;\n /** Runs when the Escape key cancels a resize operation. */\n cancel?: ResizeCancelCallback;\n}\n\ntype ResizeOperation = PointerOperationState & {\n target: HTMLElement;\n initial: DOMRect;\n current: DOMRect;\n /** The inline size styles of the target, restored on an immediate cancel. */\n targetStyles: { width: string; height: string };\n};\n\nfunction createDefaultGhost({ x, y, width, height }: DOMRect): HTMLElement {\n const element = document.createElement('div');\n const { scrollX, scrollY } = window;\n\n setStyles(element, {\n position: 'absolute',\n top: `${y + scrollY}px`,\n left: `${x + scrollX}px`,\n zIndex: '1000',\n background: 'pink',\n opacity: '0.85',\n width: `${width}px`,\n height: `${height}px`,\n });\n\n return element;\n}\n\nclass ResizableDirective extends PointerOperationDirective<\n ResizableOptions,\n ResizeOperation\n> {\n constructor(partInfo: PartInfo) {\n super(partInfo, {\n name: 'resizable',\n ghostAttribute: 'data-resize-ghost',\n defaultMode: 'immediate',\n defaultGhost: createDefaultGhost,\n });\n }\n\n protected override _cancelOperation(): void {\n this._options.cancel?.(this._createState());\n\n if (!this._isDeferred) {\n setStyles(this._operation!.target, this._operation!.targetStyles);\n }\n }\n\n // #region Event handlers\n\n private readonly _handlePointerDown = (event: PointerEvent): void => {\n if (!this._enabled || event.button !== 0 || this._operation) {\n return;\n }\n\n const target = this._resolveTarget();\n if (!target) {\n return;\n }\n\n const initial = target.getBoundingClientRect();\n\n this._operation = {\n pointerId: event.pointerId,\n target,\n initial,\n current: DOMRect.fromRect(initial),\n ghost: this._isDeferred ? this._createGhost(initial) : null,\n targetStyles: { width: target.style.width, height: target.style.height },\n };\n\n if (this._options.start?.(this._createParams(event)) === false) {\n this._dispose();\n return;\n }\n\n this._startOperationListeners(\n this._host!,\n event.pointerId,\n this._handlePointerMove,\n this._handlePointerEnd\n );\n };\n\n private readonly _handlePointerMove = (event: PointerEvent): void => {\n if (!this._operation) {\n return;\n }\n\n this._updateDimensions(event);\n\n const params = this._createParams(event);\n this._options.resize?.(params);\n this._operation.current = params.state.current;\n\n this._applyDimensions(\n this._isDeferred ? this._operation.ghost : this._operation.target\n );\n };\n\n private readonly _handlePointerEnd = (event: PointerEvent): void => {\n if (!this._operation) {\n return;\n }\n\n const params = this._createParams(event);\n this._options.end?.(params);\n this._operation.current = params.state.current;\n\n if (params.state.commit) {\n params.state.commit();\n } else {\n this._applyDimensions(this._operation.target);\n }\n\n this._dispose();\n };\n\n // #endregion\n\n // #region Internal API\n\n protected override _attachTriggerListeners(): void {\n if (!this._host) {\n return;\n }\n\n const { signal } = this._triggerAbort;\n\n this._host.addEventListener('pointerdown', this._handlePointerDown, {\n signal,\n });\n this._host.addEventListener('touchstart', this._preventNativeBehavior, {\n passive: false,\n signal,\n });\n }\n\n private _createState(): ResizeState {\n const { initial, current, ghost } = this._operation!;\n\n return {\n initial,\n current,\n deltaX: current.width - initial.width,\n deltaY: current.height - initial.height,\n ghost,\n trigger: this._host ?? null,\n };\n }\n\n private _createParams(event: PointerEvent): ResizeCallbackParams {\n return { event, state: this._createState() };\n }\n\n private _updateDimensions({ clientX, clientY }: PointerEvent): void {\n const { initial, current } = this._operation!;\n const {\n direction = 'both',\n maintainAspectRatio,\n minWidth,\n maxWidth,\n minHeight,\n maxHeight,\n } = this._options;\n\n const horizontal = direction !== 'vertical';\n const vertical = direction !== 'horizontal';\n\n let width = horizontal ? clientX - initial.x : initial.width;\n let height = vertical ? clientY - initial.y : initial.height;\n\n if (maintainAspectRatio) {\n const ratio = initial.width / initial.height;\n\n if (horizontal) {\n height = width / ratio;\n } else {\n width = height * ratio;\n }\n }\n\n if (minWidth != null) width = Math.max(width, minWidth);\n if (maxWidth != null) width = Math.min(width, maxWidth);\n if (minHeight != null) height = Math.max(height, minHeight);\n if (maxHeight != null) height = Math.min(height, maxHeight);\n\n current.width = width;\n current.height = height;\n }\n\n /** Applies the current dimensions to `element` as inline styles. */\n private _applyDimensions(element: HTMLElement | null): void {\n if (element) {\n const { current } = this._operation!;\n setStyles(element, {\n width: `${current.width}px`,\n height: `${current.height}px`,\n });\n }\n }\n\n // #endregion\n}\n\n/**\n * A directive that makes an element a resize trigger. It resizes the target\n * in place, or through a deferred ghost element.\n */\nexport const resizable = directive(ResizableDirective);\n"]}
@@ -1,4 +1,7 @@
1
- /** @deprecated since 7.2.0. Please use the newly provided ICalendarResourceStrings interface or set global resource strings using `registerI18n` method. */
1
+ /**
2
+ * @deprecated since 7.2.0. Use the newly provided `ICalendarResourceStrings`
3
+ * interface, or set global resource strings with the `registerI18n` method.
4
+ */
2
5
  export interface IgcCalendarResourceStrings {
3
6
  selectMonth?: string;
4
7
  selectYear?: string;
@@ -15,5 +18,8 @@ export interface IgcCalendarResourceStrings {
15
18
  nextYears?: string;
16
19
  weekLabel?: string;
17
20
  }
18
- /** @deprecated since 7.2.0. Please use the newly provided resources from the igniteui-i18n-resources package. */
21
+ /**
22
+ * @deprecated since 7.2.0. Use the newly provided resources from the
23
+ * igniteui-i18n-resources package.
24
+ */
19
25
  export declare const IgcCalendarResourceStringEN: IgcCalendarResourceStrings;
@@ -1,7 +1,7 @@
1
1
  import { CalendarResourceStringsEN } from 'igniteui-i18n-core';
2
- import { convertToIgcResource } from '../utils.js';
2
+ import { calendarResourcesMap, convertToIgcResource } from '../utils.js';
3
3
  export const IgcCalendarResourceStringEN = {
4
- ...convertToIgcResource(CalendarResourceStringsEN, 'calendar'),
4
+ ...convertToIgcResource(CalendarResourceStringsEN, calendarResourcesMap),
5
5
  weekLabel: 'Wk',
6
6
  };
7
7
  //# sourceMappingURL=calendar.resources.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"calendar.resources.js","sourceRoot":"","sources":["../../../../src/internals/i18n/EN/calendar.resources.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,yBAAyB,EAAE,MAAM,oBAAoB,CAAC;AAC/D,OAAO,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AAyBnD,MAAM,CAAC,MAAM,2BAA2B,GAA+B;IACrE,GAAG,oBAAoB,CAAC,yBAAyB,EAAE,UAAU,CAAC;IAC9D,SAAS,EAAE,IAAI;CAChB,CAAC","sourcesContent":["import { CalendarResourceStringsEN } from 'igniteui-i18n-core';\nimport { convertToIgcResource } from '../utils.js';\n\n/* blazorSuppress */\n/** @deprecated since 7.2.0. Please use the newly provided ICalendarResourceStrings interface or set global resource strings using `registerI18n` method. */\nexport interface IgcCalendarResourceStrings {\n selectMonth?: string;\n selectYear?: string;\n selectDate?: string;\n selectRange?: string;\n selectedDate?: string;\n startDate?: string;\n endDate?: string;\n previousMonth?: string;\n nextMonth?: string;\n previousYear?: string;\n nextYear?: string;\n previousYears?: string;\n nextYears?: string;\n weekLabel?: string;\n}\n\n// Because weekLabel should be retrieved from the i18n formatter, but previously was present in resources.\n// Manually add it for now, as part of the default EN. When updating make sure to switch in source\n// the week start to be retrieved using a formatter instead of locale.\n/** @deprecated since 7.2.0. Please use the newly provided resources from the igniteui-i18n-resources package. */\nexport const IgcCalendarResourceStringEN: IgcCalendarResourceStrings = {\n ...convertToIgcResource(CalendarResourceStringsEN, 'calendar'),\n weekLabel: 'Wk',\n};\n"]}
1
+ {"version":3,"file":"calendar.resources.js","sourceRoot":"","sources":["../../../../src/internals/i18n/EN/calendar.resources.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,yBAAyB,EAAE,MAAM,oBAAoB,CAAC;AAC/D,OAAO,EAAE,oBAAoB,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AA+BzE,MAAM,CAAC,MAAM,2BAA2B,GAA+B;IACrE,GAAG,oBAAoB,CAAC,yBAAyB,EAAE,oBAAoB,CAAC;IACxE,SAAS,EAAE,IAAI;CAChB,CAAC","sourcesContent":["import { CalendarResourceStringsEN } from 'igniteui-i18n-core';\nimport { calendarResourcesMap, convertToIgcResource } from '../utils.js';\n\n/* blazorSuppress */\n/**\n * @deprecated since 7.2.0. Use the newly provided `ICalendarResourceStrings`\n * interface, or set global resource strings with the `registerI18n` method.\n */\nexport interface IgcCalendarResourceStrings {\n selectMonth?: string;\n selectYear?: string;\n selectDate?: string;\n selectRange?: string;\n selectedDate?: string;\n startDate?: string;\n endDate?: string;\n previousMonth?: string;\n nextMonth?: string;\n previousYear?: string;\n nextYear?: string;\n previousYears?: string;\n nextYears?: string;\n weekLabel?: string;\n}\n\n// The i18n formatter gives `weekLabel`, but an earlier version kept it in\n// the resources, so it stays in the default EN strings. A future change must\n// read the week start from the formatter, not from the locale.\n/**\n * @deprecated since 7.2.0. Use the newly provided resources from the\n * igniteui-i18n-resources package.\n */\nexport const IgcCalendarResourceStringEN: IgcCalendarResourceStrings = {\n ...convertToIgcResource(CalendarResourceStringsEN, calendarResourcesMap),\n weekLabel: 'Wk',\n};\n"]}
@@ -1,4 +1,7 @@
1
- /** @deprecated since 7.2.0. Please use the newly provided `IChatResourceStrings` interfaces from or set global resource strings using `registerI18n` method. */
1
+ /**
2
+ * @deprecated since 7.2.0. Use the newly provided `IChatResourceStrings`
3
+ * interface, or set global resource strings with the `registerI18n` method.
4
+ */
2
5
  export interface IgcChatResourceStrings {
3
6
  suggestionsHeader?: string;
4
7
  reactionCopy?: string;
@@ -9,5 +12,8 @@ export interface IgcChatResourceStrings {
9
12
  attachmentsListLabel?: string;
10
13
  messageCopied?: string;
11
14
  }
12
- /** @deprecated since 7.2.0. Please use the newly provided resources from the igniteui-i18n-resources package. */
15
+ /**
16
+ * @deprecated since 7.2.0. Use the newly provided resources from the
17
+ * igniteui-i18n-resources package.
18
+ */
13
19
  export declare const IgcChatResourceStringEN: IgcChatResourceStrings;
@@ -1,11 +1,4 @@
1
- export const IgcChatResourceStringEN = {
2
- suggestionsHeader: 'Suggestions',
3
- reactionCopy: 'Copy',
4
- reactionLike: 'Like',
5
- reactionDislike: 'Dislike',
6
- reactionRegenerate: 'Regenerate',
7
- attachmentLabel: 'Attachment',
8
- attachmentsListLabel: 'Attachments',
9
- messageCopied: 'Message copied to clipboard',
10
- };
1
+ import { ChatResourceStringsEN } from 'igniteui-i18n-core';
2
+ import { chatResourcesMap, convertToIgcResource } from '../utils.js';
3
+ export const IgcChatResourceStringEN = convertToIgcResource(ChatResourceStringsEN, chatResourcesMap);
11
4
  //# sourceMappingURL=chat.resources.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"chat.resources.js","sourceRoot":"","sources":["../../../../src/internals/i18n/EN/chat.resources.ts"],"names":[],"mappings":"AAcA,MAAM,CAAC,MAAM,uBAAuB,GAA2B;IAC7D,iBAAiB,EAAE,aAAa;IAChC,YAAY,EAAE,MAAM;IACpB,YAAY,EAAE,MAAM;IACpB,eAAe,EAAE,SAAS;IAC1B,kBAAkB,EAAE,YAAY;IAChC,eAAe,EAAE,YAAY;IAC7B,oBAAoB,EAAE,aAAa;IACnC,aAAa,EAAE,6BAA6B;CAC7C,CAAC","sourcesContent":["/* blazorSuppress */\n/** @deprecated since 7.2.0. Please use the newly provided `IChatResourceStrings` interfaces from or set global resource strings using `registerI18n` method. */\nexport interface IgcChatResourceStrings {\n suggestionsHeader?: string;\n reactionCopy?: string;\n reactionLike?: string;\n reactionDislike?: string;\n reactionRegenerate?: string;\n attachmentLabel?: string;\n attachmentsListLabel?: string;\n messageCopied?: string;\n}\n\n/** @deprecated since 7.2.0. Please use the newly provided resources from the igniteui-i18n-resources package. */\nexport const IgcChatResourceStringEN: IgcChatResourceStrings = {\n suggestionsHeader: 'Suggestions',\n reactionCopy: 'Copy',\n reactionLike: 'Like',\n reactionDislike: 'Dislike',\n reactionRegenerate: 'Regenerate',\n attachmentLabel: 'Attachment',\n attachmentsListLabel: 'Attachments',\n messageCopied: 'Message copied to clipboard',\n};\n"]}
1
+ {"version":3,"file":"chat.resources.js","sourceRoot":"","sources":["../../../../src/internals/i18n/EN/chat.resources.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAC;AAC3D,OAAO,EAAE,gBAAgB,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AAsBrE,MAAM,CAAC,MAAM,uBAAuB,GAClC,oBAAoB,CAAC,qBAAqB,EAAE,gBAAgB,CAAC,CAAC","sourcesContent":["import { ChatResourceStringsEN } from 'igniteui-i18n-core';\nimport { chatResourcesMap, convertToIgcResource } from '../utils.js';\n\n/* blazorSuppress */\n/**\n * @deprecated since 7.2.0. Use the newly provided `IChatResourceStrings`\n * interface, or set global resource strings with the `registerI18n` method.\n */\nexport interface IgcChatResourceStrings {\n suggestionsHeader?: string;\n reactionCopy?: string;\n reactionLike?: string;\n reactionDislike?: string;\n reactionRegenerate?: string;\n attachmentLabel?: string;\n attachmentsListLabel?: string;\n messageCopied?: string;\n}\n\n/**\n * @deprecated since 7.2.0. Use the newly provided resources from the\n * igniteui-i18n-resources package.\n */\nexport const IgcChatResourceStringEN: IgcChatResourceStrings =\n convertToIgcResource(ChatResourceStringsEN, chatResourcesMap);\n"]}
@@ -1,8 +1,10 @@
1
- import { type IgcCalendarResourceStrings } from './calendar.resources.js';
2
- /** @deprecated since 7.2.0. Please use the newly provided `IDatePickerResourceStrings` and `ICalendarResourceStrings` interfaces or set global resource strings using `registerI18n` method. */
1
+ import type { IgcCalendarResourceStrings } from './calendar.resources.js';
2
+ /**
3
+ * @deprecated since 7.2.0. Use the newly provided
4
+ * `IDatePickerResourceStrings` and `ICalendarResourceStrings` interfaces, or
5
+ * set global resource strings with the `registerI18n` method.
6
+ */
3
7
  export interface IgcDatePickerResourceStrings extends IgcCalendarResourceStrings {
4
8
  changeDate: string;
5
9
  chooseDate: string;
6
10
  }
7
- /** @deprecated since 7.2.0. Please use the newly provided resources from the igniteui-i18n-resources package. */
8
- export declare const IgcDatePickerResourceStringsEN: IgcDatePickerResourceStrings;
@@ -1,8 +1,2 @@
1
- import { DatePickerResourceStringsEN } from 'igniteui-i18n-core';
2
- import { convertToIgcResource } from '../utils.js';
3
- import { IgcCalendarResourceStringEN, } from './calendar.resources.js';
4
- export const IgcDatePickerResourceStringsEN = {
5
- ...convertToIgcResource(DatePickerResourceStringsEN, 'date-picker'),
6
- ...IgcCalendarResourceStringEN,
7
- };
1
+ export {};
8
2
  //# sourceMappingURL=date-picker.resources.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"date-picker.resources.js","sourceRoot":"","sources":["../../../../src/internals/i18n/EN/date-picker.resources.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,2BAA2B,EAAE,MAAM,oBAAoB,CAAC;AACjE,OAAO,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AACnD,OAAO,EACL,2BAA2B,GAE5B,MAAM,yBAAyB,CAAC;AAUjC,MAAM,CAAC,MAAM,8BAA8B,GAAiC;IAC1E,GAAG,oBAAoB,CAAC,2BAA2B,EAAE,aAAa,CAAC;IACnE,GAAG,2BAA2B;CAC/B,CAAC","sourcesContent":["import { DatePickerResourceStringsEN } from 'igniteui-i18n-core';\nimport { convertToIgcResource } from '../utils.js';\nimport {\n IgcCalendarResourceStringEN,\n type IgcCalendarResourceStrings,\n} from './calendar.resources.js';\n\n/* blazorSuppress */\n/** @deprecated since 7.2.0. Please use the newly provided `IDatePickerResourceStrings` and `ICalendarResourceStrings` interfaces or set global resource strings using `registerI18n` method. */\nexport interface IgcDatePickerResourceStrings extends IgcCalendarResourceStrings {\n changeDate: string;\n chooseDate: string;\n}\n\n/** @deprecated since 7.2.0. Please use the newly provided resources from the igniteui-i18n-resources package. */\nexport const IgcDatePickerResourceStringsEN: IgcDatePickerResourceStrings = {\n ...convertToIgcResource(DatePickerResourceStringsEN, 'date-picker'),\n ...IgcCalendarResourceStringEN,\n};\n"]}
1
+ {"version":3,"file":"date-picker.resources.js","sourceRoot":"","sources":["../../../../src/internals/i18n/EN/date-picker.resources.ts"],"names":[],"mappings":"","sourcesContent":["import type { IgcCalendarResourceStrings } from './calendar.resources.js';\n\n/* blazorSuppress */\n/**\n * @deprecated since 7.2.0. Use the newly provided\n * `IDatePickerResourceStrings` and `ICalendarResourceStrings` interfaces, or\n * set global resource strings with the `registerI18n` method.\n */\nexport interface IgcDatePickerResourceStrings extends IgcCalendarResourceStrings {\n changeDate: string;\n chooseDate: string;\n}\n"]}
@@ -1,5 +1,9 @@
1
1
  import { type IgcCalendarResourceStrings } from './calendar.resources.js';
2
- /** @deprecated since 7.2.0. Please use the newly provided `ICalendarResourceStrings` and `IDateRangePickerResourceStrings` interfaces or set global resource strings using `registerI18n` method. */
2
+ /**
3
+ * @deprecated since 7.2.0. Use the newly provided
4
+ * `ICalendarResourceStrings` and `IDateRangePickerResourceStrings`
5
+ * interfaces, or set global resource strings with the `registerI18n` method.
6
+ */
3
7
  export interface IgcDateRangePickerResourceStrings extends IgcCalendarResourceStrings {
4
8
  separator?: string;
5
9
  done?: string;
@@ -9,5 +13,8 @@ export interface IgcDateRangePickerResourceStrings extends IgcCalendarResourceSt
9
13
  currentMonth?: string;
10
14
  yearToDate?: string;
11
15
  }
12
- /** @deprecated since 7.2.0. Please use the newly provided resources from the igniteui-i18n-resources package. */
16
+ /**
17
+ * @deprecated since 7.2.0. Use the newly provided resources from the
18
+ * igniteui-i18n-resources package.
19
+ */
13
20
  export declare const IgcDateRangePickerResourceStringsEN: IgcDateRangePickerResourceStrings;
@@ -1,8 +1,8 @@
1
1
  import { DateRangePickerResourceStringsEN } from 'igniteui-i18n-core';
2
- import { convertToIgcResource } from '../utils.js';
2
+ import { convertToIgcResource, dateRangePickerResourcesMap } from '../utils.js';
3
3
  import { IgcCalendarResourceStringEN, } from './calendar.resources.js';
4
4
  export const IgcDateRangePickerResourceStringsEN = {
5
- ...convertToIgcResource(DateRangePickerResourceStringsEN, 'date-range-picker'),
5
+ ...convertToIgcResource(DateRangePickerResourceStringsEN, dateRangePickerResourcesMap),
6
6
  ...IgcCalendarResourceStringEN,
7
7
  };
8
8
  //# sourceMappingURL=date-range-picker.resources.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"date-range-picker.resources.js","sourceRoot":"","sources":["../../../../src/internals/i18n/EN/date-range-picker.resources.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gCAAgC,EAAE,MAAM,oBAAoB,CAAC;AACtE,OAAO,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AACnD,OAAO,EACL,2BAA2B,GAE5B,MAAM,yBAAyB,CAAC;AAejC,MAAM,CAAC,MAAM,mCAAmC,GAC9C;IACE,GAAG,oBAAoB,CACrB,gCAAgC,EAChC,mBAAmB,CACpB;IACD,GAAG,2BAA2B;CAC/B,CAAC","sourcesContent":["import { DateRangePickerResourceStringsEN } from 'igniteui-i18n-core';\nimport { convertToIgcResource } from '../utils.js';\nimport {\n IgcCalendarResourceStringEN,\n type IgcCalendarResourceStrings,\n} from './calendar.resources.js';\n\n/* blazorSuppress */\n/** @deprecated since 7.2.0. Please use the newly provided `ICalendarResourceStrings` and `IDateRangePickerResourceStrings` interfaces or set global resource strings using `registerI18n` method. */\nexport interface IgcDateRangePickerResourceStrings extends IgcCalendarResourceStrings {\n separator?: string;\n done?: string;\n cancel?: string;\n last7Days?: string;\n last30Days?: string;\n currentMonth?: string;\n yearToDate?: string;\n}\n\n/** @deprecated since 7.2.0. Please use the newly provided resources from the igniteui-i18n-resources package. */\nexport const IgcDateRangePickerResourceStringsEN: IgcDateRangePickerResourceStrings =\n {\n ...convertToIgcResource(\n DateRangePickerResourceStringsEN,\n 'date-range-picker'\n ),\n ...IgcCalendarResourceStringEN,\n };\n"]}
1
+ {"version":3,"file":"date-range-picker.resources.js","sourceRoot":"","sources":["../../../../src/internals/i18n/EN/date-range-picker.resources.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gCAAgC,EAAE,MAAM,oBAAoB,CAAC;AACtE,OAAO,EAAE,oBAAoB,EAAE,2BAA2B,EAAE,MAAM,aAAa,CAAC;AAChF,OAAO,EACL,2BAA2B,GAE5B,MAAM,yBAAyB,CAAC;AAsBjC,MAAM,CAAC,MAAM,mCAAmC,GAC9C;IACE,GAAG,oBAAoB,CACrB,gCAAgC,EAChC,2BAA2B,CAC5B;IACD,GAAG,2BAA2B;CAC/B,CAAC","sourcesContent":["import { DateRangePickerResourceStringsEN } from 'igniteui-i18n-core';\nimport { convertToIgcResource, dateRangePickerResourcesMap } from '../utils.js';\nimport {\n IgcCalendarResourceStringEN,\n type IgcCalendarResourceStrings,\n} from './calendar.resources.js';\n\n/* blazorSuppress */\n/**\n * @deprecated since 7.2.0. Use the newly provided\n * `ICalendarResourceStrings` and `IDateRangePickerResourceStrings`\n * interfaces, or set global resource strings with the `registerI18n` method.\n */\nexport interface IgcDateRangePickerResourceStrings extends IgcCalendarResourceStrings {\n separator?: string;\n done?: string;\n cancel?: string;\n last7Days?: string;\n last30Days?: string;\n currentMonth?: string;\n yearToDate?: string;\n}\n\n/**\n * @deprecated since 7.2.0. Use the newly provided resources from the\n * igniteui-i18n-resources package.\n */\nexport const IgcDateRangePickerResourceStringsEN: IgcDateRangePickerResourceStrings =\n {\n ...convertToIgcResource(\n DateRangePickerResourceStringsEN,\n dateRangePickerResourcesMap\n ),\n ...IgcCalendarResourceStringEN,\n };\n"]}