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
@@ -1,6 +1,5 @@
1
1
  /**
2
2
  * Builds a string from format specifiers and replacement parameters.
3
- * Will coerce non-string parameters to their string representations.
4
3
  *
5
4
  * @example
6
5
  * ```typescript
@@ -10,24 +9,23 @@
10
9
  */
11
10
  export declare function formatString(template: string, ...params: unknown[]): string;
12
11
  /**
13
- * Splits a string into its words, treating whitespace, `-`, `_` and
14
- * camelCase boundaries as separators.
12
+ * Splits a string into words at whitespace, `-`, `_` and camelCase
13
+ * boundaries.
15
14
  */
16
15
  export declare function splitToWords(text: string): string[];
17
16
  /** Converts a string to kebab-case. */
18
17
  export declare function toKebabCase(text: string): string;
19
18
  /**
20
- * Escapes any potential regex syntax characters in a string, and returns a new string
21
- * that can be safely used as a literal pattern for the `RegExp()` constructor.
22
- *
23
- * @remarks
24
- * Substitute with `RegExp.escape` once it has enough support:
19
+ * Escapes each regular expression character in a string, so that `RegExp()`
20
+ * reads it as a literal pattern.
25
21
  *
22
+ * @remarks
23
+ * Replace with `RegExp.escape` once browser support is sufficient:
26
24
  * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp/escape#browser_compatibility
27
25
  */
28
26
  export declare function escapeRegex(value: string): string;
29
27
  /**
30
- * Creates a generator of monotonically increasing DOM ids based on the given prefix.
28
+ * Creates a function that returns DOM ids with the given prefix.
31
29
  *
32
30
  * @example
33
31
  * ```typescript
@@ -38,7 +36,7 @@ export declare function escapeRegex(value: string): string;
38
36
  */
39
37
  export declare function createIdGenerator(prefix: string): () => string;
40
38
  /**
41
- * Generates a unique string ID of the specified size using a URL-friendly alphabet.
42
- * The default size is 21 characters, which provides a very low probability of collisions.
39
+ * Generates a unique string id of the given size, from a URL-safe alphabet.
40
+ * The default of 21 characters makes a collision very unlikely.
43
41
  */
44
42
  export declare function nanoid(size?: number): string;
@@ -1 +1 @@
1
- {"version":3,"file":"strings.js","sourceRoot":"","sources":["../../../src/internals/utils/strings.ts"],"names":[],"mappings":"AAUA,MAAM,UAAU,YAAY,CAAC,QAAgB,EAAE,GAAG,MAAiB;IACjE,MAAM,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC;IAE7B,OAAO,QAAQ,CAAC,OAAO,CAAC,UAAU,EAAE,CAAC,KAAa,EAAE,KAAa,EAAE,EAAE,CACnE,KAAK,IAAI,MAAM,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,GAAG,MAAM,CAAC,KAAK,CAAC,EAAE,CAC7C,CAAC;AACJ,CAAC;AAMD,MAAM,UAAU,YAAY,CAAC,IAAY;IACvC,MAAM,KAAK,GAAG,IAAI,CAAC,UAAU,CAAC,mBA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,CAAC;AAMD,MAAM,UAAU,MAAM,CAAC,IAAI,GAAG,EAAE;IAC9B,MAAM,KAAK,GAAG,IAAI,GAAG,CAAC,CAAC;IACvB,QAAQ,CAAC,KAAK,CAAC,CAAC;IAEhB,IAAI,EAAE,GAAG,EAAE,CAAC;IACZ,KAAK,IAAI,CAAC,GAAG,UAAU,GAAG,KAAK,EAAE,CAAC,GAAG,UAAU,EAAE,CAAC,EAAE,EAAE,CAAC;QACrD,EAAE,IAAI,WAAW,CAAC,IAAI,CAAC,CAAC,CAAC,GAAG,EAAE,CAAC,CAAC;IAClC,CAAC;IAED,OAAO,EAAE,CAAC;AACZ,CAAC","sourcesContent":["/**\n * Builds a string from format specifiers and replacement parameters.\n * Will coerce non-string parameters to their string representations.\n *\n * @example\n * ```typescript\n * formatString('{0} says \"{1}\".', 'John', 'Hello'); // 'John says \"Hello\".'\n * formatString('{1} is greater than {0}', 0, 1); // '1 is greater than 0'\n * ```\n */\nexport function formatString(template: string, ...params: unknown[]): string {\n const length = params.length;\n\n return template.replace(/{(\\d+)}/g, (match: string, index: number) =>\n index >= length ? match : `${params[index]}`\n );\n}\n\n/**\n * Splits a string into its words, treating whitespace, `-`, `_` and\n * camelCase boundaries as separators.\n */\nexport function splitToWords(text: string) {\n const input = text.replaceAll(/[^a-zA-Z0-9\\s-_]/g, '');\n if (/[\\s-_]+/.test(input)) return input.split(/[\\s-_]+/);\n return input.split(/(?=[A-Z])+/);\n}\n\n/** Converts a string to kebab-case. */\nexport function toKebabCase(text: string): string {\n const input = text.trim();\n return splitToWords(input).join('-').toLowerCase();\n}\n\n/**\n * Escapes any potential regex syntax characters in a string, and returns a new string\n * that can be safely used as a literal pattern for the `RegExp()` constructor.\n *\n * @remarks\n * Substitute with `RegExp.escape` once it has enough support:\n *\n * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp/escape#browser_compatibility\n */\nexport function escapeRegex(value: string): string {\n return value.replace(/[.*+?^${}()|[\\]\\\\]/g, '\\\\$&');\n}\n\n/**\n * Creates a generator of monotonically increasing DOM ids based on the given prefix.\n *\n * @example\n * ```typescript\n * const nextId = createIdGenerator('radio');\n * nextId(); // 'radio-1'\n * nextId(); // 'radio-2'\n * ```\n */\nexport function createIdGenerator(prefix: string): () => string {\n let id = 0;\n return () => `${prefix}-${++id}`;\n}\n\nlet pool: Uint8Array<ArrayBuffer>;\nlet poolOffset: number;\nconst urlAlphabet =\n 'useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict';\n\nfunction fillPool(bytes: number): void {\n if (!pool || pool.length < bytes) {\n pool = new Uint8Array(new ArrayBuffer(bytes * 128));\n crypto.getRandomValues(pool);\n poolOffset = 0;\n } else if (poolOffset + bytes > pool.length) {\n crypto.getRandomValues(pool);\n poolOffset = 0;\n }\n poolOffset += bytes;\n}\n\n/**\n * Generates a unique string ID of the specified size using a URL-friendly alphabet.\n * The default size is 21 characters, which provides a very low probability of collisions.\n */\nexport function nanoid(size = 21): string {\n const bytes = size | 0;\n fillPool(bytes);\n\n let id = '';\n for (let i = poolOffset - bytes; i < poolOffset; i++) {\n id += urlAlphabet[pool[i] & 63];\n }\n\n return id;\n}\n"]}
1
+ {"version":3,"file":"strings.js","sourceRoot":"","sources":["../../../src/internals/utils/strings.ts"],"names":[],"mappings":"AASA,MAAM,UAAU,YAAY,CAAC,QAAgB,EAAE,GAAG,MAAiB;IACjE,MAAM,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC;IAE7B,OAAO,QAAQ,CAAC,OAAO,CAAC,UAAU,EAAE,CAAC,KAAa,EAAE,KAAa,EAAE,EAAE,CACnE,KAAK,IAAI,MAAM,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,GAAG,MAAM,CAAC,KAAK,CAAC,EAAE,CAC7C,CAAC;AACJ,CAAC;AAMD,MAAM,UAAU,YAAY,CAAC,IAAY;IACvC,MAAM,KAAK,GAAG,IAAI,CAAC,UAAU,CAAC,mBAAmB,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C;AAMD,MAAM,UAAU,MAAM,CAAC,IAAI,GAAG,EAAE;IAC9B,MAAM,KAAK,GAAG,IAAI,GAAG,CAAC,CAAC;IACvB,QAAQ,CAAC,KAAK,CAAC,CAAC;IAEhB,IAAI,EAAE,GAAG,EAAE,CAAC;IACZ,KAAK,IAAI,CAAC,GAAG,UAAU,GAAG,KAAK,EAAE,CAAC,GAAG,UAAU,EAAE,CAAC,EAAE,EAAE,CAAC;QACrD,EAAE,IAAI,WAAW,CAAC,IAAI,CAAC,CAAC,CAAC,GAAG,EAAE,CAAC,CAAC;IAClC,CAAC;IAED,OAAO,EAAE,CAAC;AACZ,CAAC","sourcesContent":["/**\n * Builds a string from format specifiers and replacement parameters.\n *\n * @example\n * ```typescript\n * formatString('{0} says \"{1}\".', 'John', 'Hello'); // 'John says \"Hello\".'\n * formatString('{1} is greater than {0}', 0, 1); // '1 is greater than 0'\n * ```\n */\nexport function formatString(template: string, ...params: unknown[]): string {\n const length = params.length;\n\n return template.replace(/{(\\d+)}/g, (match: string, index: number) =>\n index >= length ? match : `${params[index]}`\n );\n}\n\n/**\n * Splits a string into words at whitespace, `-`, `_` and camelCase\n * boundaries.\n */\nexport function splitToWords(text: string) {\n const input = text.replaceAll(/[^a-zA-Z0-9\\s-_]/g, '');\n if (/[\\s-_]+/.test(input)) return input.split(/[\\s-_]+/);\n return input.split(/(?=[A-Z])+/);\n}\n\n/** Converts a string to kebab-case. */\nexport function toKebabCase(text: string): string {\n const input = text.trim();\n return splitToWords(input).join('-').toLowerCase();\n}\n\n/**\n * Escapes each regular expression character in a string, so that `RegExp()`\n * reads it as a literal pattern.\n *\n * @remarks\n * Replace with `RegExp.escape` once browser support is sufficient:\n * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp/escape#browser_compatibility\n */\nexport function escapeRegex(value: string): string {\n return value.replace(/[.*+?^${}()|[\\]\\\\]/g, '\\\\$&');\n}\n\n/**\n * Creates a function that returns DOM ids with the given prefix.\n *\n * @example\n * ```typescript\n * const nextId = createIdGenerator('radio');\n * nextId(); // 'radio-1'\n * nextId(); // 'radio-2'\n * ```\n */\nexport function createIdGenerator(prefix: string): () => string {\n let id = 0;\n return () => `${prefix}-${++id}`;\n}\n\nlet pool: Uint8Array<ArrayBuffer>;\nlet poolOffset: number;\nconst urlAlphabet =\n 'useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict';\n\nfunction fillPool(bytes: number): void {\n if (!pool || pool.length < bytes) {\n pool = new Uint8Array(new ArrayBuffer(bytes * 128));\n crypto.getRandomValues(pool);\n poolOffset = 0;\n } else if (poolOffset + bytes > pool.length) {\n crypto.getRandomValues(pool);\n poolOffset = 0;\n }\n poolOffset += bytes;\n}\n\n/**\n * Generates a unique string id of the given size, from a URL-safe alphabet.\n * The default of 21 characters makes a collision very unlikely.\n */\nexport function nanoid(size = 21): string {\n const bytes = size | 0;\n fillPool(bytes);\n\n let id = '';\n for (let i = poolOffset - bytes; i < poolOffset; i++) {\n id += urlAlphabet[pool[i] & 63];\n }\n\n return id;\n}\n"]}
@@ -1,13 +1,26 @@
1
- /** Returns whether the value is not `undefined`. Note that `null` is considered defined. */
1
+ /** Returns whether the value is not `undefined`. `null` counts as defined. */
2
2
  export declare function isDefined<T = unknown>(value: T): value is T & ({} | null);
3
3
  export declare function isFunction(value: unknown): value is CallableFunction;
4
4
  export declare function isString(value: unknown): value is string;
5
5
  export declare function isObject(value: unknown): value is object;
6
- /** Returns whether the value is a plain object (POJO) - created via `{}`, `new Object()` or `Object.create(null)`. */
6
+ /**
7
+ * Returns whether the value is a plain object from `{}`, `new Object()` or
8
+ * `Object.create(null)`.
9
+ */
7
10
  export declare function isPlainObject(value: unknown): value is Record<PropertyKey, unknown>;
11
+ /**
12
+ * Resolves a value that the caller gives either directly or as a factory.
13
+ *
14
+ * @example
15
+ * ```typescript
16
+ * resolveValue(element); // element
17
+ * resolveValue(() => element); // element
18
+ * ```
19
+ */
20
+ export declare function resolveValue<T>(source: T | (() => T)): T;
8
21
  export declare function isRegExp(value: unknown): value is RegExp;
9
22
  export declare function isEventListenerObject(x: unknown): x is EventListenerObject;
10
- /** Required utility type for specific props */
23
+ /** Makes the given keys `K` of the type `T` required. */
11
24
  export type RequiredProps<T, K extends keyof T> = T & {
12
25
  [P in K]-?: T[P];
13
26
  };
@@ -22,6 +22,9 @@ export function isPlainObject(value) {
22
22
  ? Object.prototype.toString.call(value) === '[object Object]'
23
23
  : false;
24
24
  }
25
+ export function resolveValue(source) {
26
+ return isFunction(source) ? source() : source;
27
+ }
25
28
  export function isRegExp(value) {
26
29
  return value instanceof RegExp;
27
30
  }
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/internals/utils/types.ts"],"names":[],"mappings":"AACA,MAAM,UAAU,SAAS,CAAc,KAAQ;IAC7C,OAAO,KAAK,KAAK,SAAS,CAAC;AAC7B,CAAC;AAED,MAAM,UAAU,UAAU,CAAC,KAAc;IACvC,OAAO,OAAO,KAAK,KAAK,UAAU,CAAC;AACrC,CAAC;AAED,MAAM,UAAU,QAAQ,CAAC,KAAc;IACrC,OAAO,OAAO,KAAK,KAAK,QAAQ,CAAC;AACnC,CAAC;AAED,MAAM,UAAU,QAAQ,CAAC,KAAc;IACrC,OAAO,KAAK,IAAI,IAAI,IAAI,OAAO,KAAK,KAAK,QAAQ,CAAC;AACpD,CAAC;AAGD,MAAM,UAAU,aAAa,CAC3B,KAAc;IAEd,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,EAAE,CAAC;QACrB,OAAO,KAAK,CAAC;IACf,CAAC;IAED,MAAM,KAAK,GAAG,MAAM,CAAC,cAAc,CAAC,KAAK,CAAmC,CAAC;IAE7E,MAAM,kBAAkB,GACtB,KAAK,KAAK,IAAI;QACd,KAAK,KAAK,MAAM,CAAC,SAAS;QAC1B,MAAM,CAAC,cAAc,CAAC,KAAK,CAAC,KAAK,IAAI,CAAC;IAExC,OAAO,kBAAkB;QACvB,CAAC,CAAC,MAAM,CAAC,SAAS,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,KAAK,iBAAiB;QAC7D,CAAC,CAAC,KAAK,CAAC;AACZ,CAAC;AAED,MAAM,UAAU,QAAQ,CAAC,KAAc;IACrC,OAAO,KAAK,YAAY,MAAM,CAAC;AACjC,CAAC;AAED,MAAM,UAAU,qBAAqB,CAAC,CAAU;IAC9C,OAAO,QAAQ,CAAC,CAAC,CAAC,IAAI,aAAa,IAAI,CAAC,CAAC;AAC3C,CAAC","sourcesContent":["/** Returns whether the value is not `undefined`. Note that `null` is considered defined. */\nexport function isDefined<T = unknown>(value: T) {\n return value !== undefined;\n}\n\nexport function isFunction(value: unknown): value is CallableFunction {\n return typeof value === 'function';\n}\n\nexport function isString(value: unknown): value is string {\n return typeof value === 'string';\n}\n\nexport function isObject(value: unknown): value is object {\n return value != null && typeof value === 'object';\n}\n\n/** Returns whether the value is a plain object (POJO) - created via `{}`, `new Object()` or `Object.create(null)`. */\nexport function isPlainObject(\n value: unknown\n): value is Record<PropertyKey, unknown> {\n if (!isObject(value)) {\n return false;\n }\n\n const proto = Object.getPrototypeOf(value) as typeof Object.prototype | null;\n\n const hasObjectPrototype =\n proto === null ||\n proto === Object.prototype ||\n Object.getPrototypeOf(proto) === null;\n\n return hasObjectPrototype\n ? Object.prototype.toString.call(value) === '[object Object]'\n : false;\n}\n\nexport function isRegExp(value: unknown): value is RegExp {\n return value instanceof RegExp;\n}\n\nexport function isEventListenerObject(x: unknown): x is EventListenerObject {\n return isObject(x) && 'handleEvent' in x;\n}\n\n/** Required utility type for specific props */\nexport type RequiredProps<T, K extends keyof T> = T & {\n [P in K]-?: T[P];\n};\n"]}
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/internals/utils/types.ts"],"names":[],"mappings":"AACA,MAAM,UAAU,SAAS,CAAc,KAAQ;IAC7C,OAAO,KAAK,KAAK,SAAS,CAAC;AAC7B,CAAC;AAED,MAAM,UAAU,UAAU,CAAC,KAAc;IACvC,OAAO,OAAO,KAAK,KAAK,UAAU,CAAC;AACrC,CAAC;AAED,MAAM,UAAU,QAAQ,CAAC,KAAc;IACrC,OAAO,OAAO,KAAK,KAAK,QAAQ,CAAC;AACnC,CAAC;AAED,MAAM,UAAU,QAAQ,CAAC,KAAc;IACrC,OAAO,KAAK,IAAI,IAAI,IAAI,OAAO,KAAK,KAAK,QAAQ,CAAC;AACpD,CAAC;AAMD,MAAM,UAAU,aAAa,CAC3B,KAAc;IAEd,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,EAAE,CAAC;QACrB,OAAO,KAAK,CAAC;IACf,CAAC;IAED,MAAM,KAAK,GAAG,MAAM,CAAC,cAAc,CAAC,KAAK,CAAmC,CAAC;IAE7E,MAAM,kBAAkB,GACtB,KAAK,KAAK,IAAI;QACd,KAAK,KAAK,MAAM,CAAC,SAAS;QAC1B,MAAM,CAAC,cAAc,CAAC,KAAK,CAAC,KAAK,IAAI,CAAC;IAExC,OAAO,kBAAkB;QACvB,CAAC,CAAC,MAAM,CAAC,SAAS,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,KAAK,iBAAiB;QAC7D,CAAC,CAAC,KAAK,CAAC;AACZ,CAAC;AAWD,MAAM,UAAU,YAAY,CAAI,MAAqB;IACnD,OAAO,UAAU,CAAC,MAAM,CAAC,CAAC,CAAC,CAAE,MAAkB,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC;AAC7D,CAAC;AAED,MAAM,UAAU,QAAQ,CAAC,KAAc;IACrC,OAAO,KAAK,YAAY,MAAM,CAAC;AACjC,CAAC;AAED,MAAM,UAAU,qBAAqB,CAAC,CAAU;IAC9C,OAAO,QAAQ,CAAC,CAAC,CAAC,IAAI,aAAa,IAAI,CAAC,CAAC;AAC3C,CAAC","sourcesContent":["/** Returns whether the value is not `undefined`. `null` counts as defined. */\nexport function isDefined<T = unknown>(value: T) {\n return value !== undefined;\n}\n\nexport function isFunction(value: unknown): value is CallableFunction {\n return typeof value === 'function';\n}\n\nexport function isString(value: unknown): value is string {\n return typeof value === 'string';\n}\n\nexport function isObject(value: unknown): value is object {\n return value != null && typeof value === 'object';\n}\n\n/**\n * Returns whether the value is a plain object from `{}`, `new Object()` or\n * `Object.create(null)`.\n */\nexport function isPlainObject(\n value: unknown\n): value is Record<PropertyKey, unknown> {\n if (!isObject(value)) {\n return false;\n }\n\n const proto = Object.getPrototypeOf(value) as typeof Object.prototype | null;\n\n const hasObjectPrototype =\n proto === null ||\n proto === Object.prototype ||\n Object.getPrototypeOf(proto) === null;\n\n return hasObjectPrototype\n ? Object.prototype.toString.call(value) === '[object Object]'\n : false;\n}\n\n/**\n * Resolves a value that the caller gives either directly or as a factory.\n *\n * @example\n * ```typescript\n * resolveValue(element); // element\n * resolveValue(() => element); // element\n * ```\n */\nexport function resolveValue<T>(source: T | (() => T)): T {\n return isFunction(source) ? (source as () => T)() : source;\n}\n\nexport function isRegExp(value: unknown): value is RegExp {\n return value instanceof RegExp;\n}\n\nexport function isEventListenerObject(x: unknown): x is EventListenerObject {\n return isObject(x) && 'handleEvent' in x;\n}\n\n/** Makes the given keys `K` of the type `T` required. */\nexport type RequiredProps<T, K extends keyof T> = T & {\n [P in K]-?: T[P];\n};\n"]}
@@ -53,25 +53,26 @@ export declare const maxDateValidator: Validator<{
53
53
  value?: Date | null;
54
54
  max?: Date | null;
55
55
  }>;
56
- /** A host whose bound comparisons follow the parts present in its format. */
56
+ /** A host that compares bounds at the granularity of its own format. */
57
57
  interface DatePartsHost {
58
58
  hasDateParts(): boolean;
59
59
  hasTimeParts(): boolean;
60
60
  }
61
61
  /**
62
- * Creates a `rangeUnderflow` validator for hosts whose `min` comparison must
63
- * respect the parts of the host's format - day granularity when the format has
64
- * no time parts, time-of-day granularity when it has no date parts.
62
+ * Creates a `rangeUnderflow` validator for the `min` bound of a host.
65
63
  *
66
- * `resolveValues` returns the dates checked against the bound; empty slots
67
- * are skipped, so a partial range validates only its present ends.
64
+ * @remarks
65
+ * The comparison follows the host format: day granularity without time
66
+ * parts, time-of-day granularity without date parts. `resolveValues` gives
67
+ * the dates to compare, and empty slots are skipped, so a partial range
68
+ * validates only the ends it has.
68
69
  */
69
70
  export declare function createMinDateTimeValidator<T extends DatePartsHost & {
70
71
  min?: Date | null;
71
72
  }>(resolveValues: (host: T) => (Date | null | undefined)[]): Validator<T>;
72
73
  /**
73
- * Creates a `rangeOverflow` validator for hosts whose `max` comparison must
74
- * respect the parts of the host's format. See {@link createMinDateTimeValidator}.
74
+ * Creates a `rangeOverflow` validator for the `max` bound of a host.
75
+ * See {@link createMinDateTimeValidator}.
75
76
  */
76
77
  export declare function createMaxDateTimeValidator<T extends DatePartsHost & {
77
78
  max?: Date | null;
@@ -4,6 +4,12 @@ import { CalendarDay } from './date/model.js';
4
4
  import { asNumber, numberOfDecimals, roundPrecise } from './utils/math.js';
5
5
  import { formatString } from './utils/strings.js';
6
6
  import { isDefined } from './utils/types.js';
7
+ function minBoundMessage(min) {
8
+ return formatString(ValidationResourceStringsEN.min_validation_error, min);
9
+ }
10
+ function maxBoundMessage(max) {
11
+ return formatString(ValidationResourceStringsEN.max_validation_error, max);
12
+ }
7
13
  const emailRegex = /^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/;
8
14
  export const requiredValidator = {
9
15
  key: 'valueMissing',
@@ -32,14 +38,14 @@ export const patternValidator = {
32
38
  };
33
39
  export const minValidator = {
34
40
  key: 'rangeUnderflow',
35
- message: ({ min }) => formatString(ValidationResourceStringsEN.min_validation_error, min),
41
+ message: ({ min }) => minBoundMessage(min),
36
42
  isValid: ({ min, value }) => isDefined(value) && value !== '' && isDefined(min)
37
43
  ? asNumber(value) >= asNumber(min)
38
44
  : true,
39
45
  };
40
46
  export const maxValidator = {
41
47
  key: 'rangeOverflow',
42
- message: ({ max }) => formatString(ValidationResourceStringsEN.max_validation_error, max),
48
+ message: ({ max }) => maxBoundMessage(max),
43
49
  isValid: ({ max, value }) => isDefined(value) && value !== '' && isDefined(max)
44
50
  ? asNumber(value) <= asNumber(max)
45
51
  : true,
@@ -70,12 +76,12 @@ export const urlValidator = {
70
76
  };
71
77
  export const minDateValidator = {
72
78
  key: 'rangeUnderflow',
73
- message: ({ min }) => formatString(ValidationResourceStringsEN.min_validation_error, min),
79
+ message: ({ min }) => minBoundMessage(min),
74
80
  isValid: ({ value, min }) => value && min ? CalendarDay.compare(value, min) >= 0 : true,
75
81
  };
76
82
  export const maxDateValidator = {
77
83
  key: 'rangeOverflow',
78
- message: ({ max }) => formatString(ValidationResourceStringsEN.max_validation_error, max),
84
+ message: ({ max }) => maxBoundMessage(max),
79
85
  isValid: ({ value, max }) => value && max ? CalendarDay.compare(value, max) <= 0 : true,
80
86
  };
81
87
  function isWithinBound(host, bound, values, exceeds) {
@@ -87,14 +93,14 @@ function isWithinBound(host, bound, values, exceeds) {
87
93
  export function createMinDateTimeValidator(resolveValues) {
88
94
  return {
89
95
  key: 'rangeUnderflow',
90
- message: ({ min }) => formatString(ValidationResourceStringsEN.min_validation_error, min),
96
+ message: (host) => minBoundMessage(host.min),
91
97
  isValid: (host) => isWithinBound(host, host.min, resolveValues(host), isDateLessThanMin),
92
98
  };
93
99
  }
94
100
  export function createMaxDateTimeValidator(resolveValues) {
95
101
  return {
96
102
  key: 'rangeOverflow',
97
- message: ({ max }) => formatString(ValidationResourceStringsEN.max_validation_error, max),
103
+ message: (host) => maxBoundMessage(host.max),
98
104
  isValid: (host) => isWithinBound(host, host.max, resolveValues(host), isDateExceedingMax),
99
105
  };
100
106
  }
@@ -1 +1 @@
1
- {"version":3,"file":"validators.js","sourceRoot":"","sources":["../../src/internals/validators.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,2BAA2B,EAAE,MAAM,oBAAoB,CAAC;AACjE,OAAO,EAA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,MAAM,CAAC,KAAK,CACV,CAAC,IAAI,EAAE,EAAE,CACP,CAAC,IAAI;YACL,CAAC,OAAO,CAAC,IAAI,EAAE,KAAK,EAAE,IAAI,CAAC,YAAY,EAAE,EAAE,IAAI,CAAC,YAAY,EAAE,CAAC,CAClE;QACH,CAAC,CAAC,IAAI,CAAC;AACX,CAAC;AAUD,MAAM,UAAU,0BAA0B,CAExC,aAAuD;IACvD,OAAO;QACL,GAAG,EAAE,gBAAgB;QACrB,OAAO,EAAE,CAAC,EAAE,GAAG,EAAE,EAAE,EAAE,CACnB,YAAY,CAAC,2BAA2B,CAAC,oBAAqB,EAAE,GAAG,CAAC;QACtE,OAAO,EAAE,CAAC,IAAI,EAAE,EAAE,CAChB,aAAa,CAAC,IAAI,EAAE,IAAI,CAAC,GAAG,EAAE,aAAa,CAAC,IAAI,CAAC,EAAE,iBAAiB,CAAC;KACxE,CAAC;AACJ,CAAC;AAMD,MAAM,UAAU,0BAA0B,CAExC,aAAuD;IACvD,OAAO;QACL,GAAG,EAAE,eAAe;QACpB,OAAO,EAAE,CAAC,EAAE,GAAG,EAAE,EAAE,EAAE,CACnB,YAAY,CAAC,2BAA2B,CAAC,oBAAqB,EAAE,GAAG,CAAC;QACtE,OAAO,EAAE,CAAC,IAAI,EAAE,EAAE,CAChB,aAAa,CAAC,IAAI,EAAE,IAAI,CAAC,GAAG,EAAE,aAAa,CAAC,IAAI,CAAC,EAAE,kBAAkB,CAAC;KACzE,CAAC;AACJ,CAAC","sourcesContent":["import { ValidationResourceStringsEN } from 'igniteui-i18n-core';\nimport { isDateExceedingMax, isDateLessThanMin } from './date/compare.js';\nimport { CalendarDay } from './date/model.js';\nimport { asNumber, numberOfDecimals, roundPrecise } from './utils/math.js';\nimport { formatString } from './utils/strings.js';\nimport { isDefined } from './utils/types.js';\n\ntype ValidatorHandler<T> = (host: T) => boolean;\ntype ValidatorMessageFormat<T> = (host: T) => string;\n\n/** @hidden */\nexport interface Validator<T = any> {\n key: keyof ValidityStateFlags;\n message: string | ValidatorMessageFormat<T>;\n isValid: ValidatorHandler<T>;\n}\n\nconst emailRegex =\n /^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/;\n\nexport const requiredValidator: Validator<{\n required: boolean;\n value?: unknown;\n}> = {\n key: 'valueMissing',\n message: ValidationResourceStringsEN.required_validation_error!,\n isValid: ({ required, value }) => (required ? !!value : true),\n};\n\nexport const requiredBooleanValidator: Validator<{\n required: boolean;\n checked: boolean;\n}> = {\n key: 'valueMissing',\n message: ValidationResourceStringsEN.required_validation_error!,\n isValid: ({ required, checked }) => (required ? checked : true),\n};\n\nexport const minLengthValidator: Validator<{\n minLength?: number;\n value: string;\n}> = {\n key: 'tooShort',\n message: ({ minLength }) =>\n formatString(\n ValidationResourceStringsEN.min_length_validation_error!,\n minLength\n ),\n isValid: ({ minLength, value }) =>\n minLength && value ? value.length >= asNumber(minLength) : true,\n};\n\nexport const maxLengthValidator: Validator<{\n maxLength?: number;\n value: string;\n}> = {\n key: 'tooLong',\n message: ({ maxLength }) =>\n formatString(\n ValidationResourceStringsEN.max_length_validation_error!,\n maxLength\n ),\n isValid: ({ maxLength, value }) =>\n maxLength && value ? value.length <= asNumber(maxLength) : true,\n};\n\nexport const patternValidator: Validator<{ pattern?: string; value: string }> =\n {\n key: 'patternMismatch',\n message: ValidationResourceStringsEN.pattern_validation_error!,\n isValid: ({ pattern, value }) =>\n pattern && value ? new RegExp(pattern, 'u').test(value) : true,\n };\n\nexport const minValidator: Validator<{\n min?: number;\n value: number | string;\n}> = {\n key: 'rangeUnderflow',\n message: ({ min }) =>\n formatString(ValidationResourceStringsEN.min_validation_error!, min),\n isValid: ({ min, value }) =>\n isDefined(value) && value !== '' && isDefined(min)\n ? asNumber(value) >= asNumber(min)\n : true,\n};\n\nexport const maxValidator: Validator<{\n max?: number;\n value: number | string;\n}> = {\n key: 'rangeOverflow',\n message: ({ max }) =>\n formatString(ValidationResourceStringsEN.max_validation_error!, max),\n isValid: ({ max, value }) =>\n isDefined(value) && value !== '' && isDefined(max)\n ? asNumber(value) <= asNumber(max)\n : true,\n};\n\nexport const stepValidator: Validator<{\n min?: number;\n step?: number;\n value: number | string;\n}> = {\n key: 'stepMismatch',\n message: 'Value does not conform to step constraint',\n isValid: ({ min, step, value }) => {\n if (isDefined(value) && value !== '' && isDefined(step)) {\n const _value = asNumber(value) - asNumber(min);\n const _step = asNumber(step);\n const magnitude = numberOfDecimals(_step) + 1;\n const rem = roundPrecise(\n Math.abs(_value - _step * Math.round(_value / _step)),\n magnitude\n );\n\n return !rem;\n }\n return true;\n },\n};\n\nexport const emailValidator: Validator<{ value: string }> = {\n key: 'typeMismatch',\n message: ValidationResourceStringsEN.email_validation_error!,\n isValid: ({ value }) => (value ? emailRegex.test(value) : true),\n};\n\nexport const urlValidator: Validator<{ value: string }> = {\n key: 'typeMismatch',\n message: ValidationResourceStringsEN.url_validation_error!,\n isValid: ({ value }) => (value ? URL.canParse(value) : true),\n};\n\nexport const minDateValidator: Validator<{\n value?: Date | null;\n min?: Date | null;\n}> = {\n key: 'rangeUnderflow',\n message: ({ min }) =>\n formatString(ValidationResourceStringsEN.min_validation_error!, min),\n isValid: ({ value, min }) =>\n value && min ? CalendarDay.compare(value, min) >= 0 : true,\n};\n\nexport const maxDateValidator: Validator<{\n value?: Date | null;\n max?: Date | null;\n}> = {\n key: 'rangeOverflow',\n message: ({ max }) =>\n formatString(ValidationResourceStringsEN.max_validation_error!, max),\n isValid: ({ value, max }) =>\n value && max ? CalendarDay.compare(value, max) <= 0 : true,\n};\n\n/** A host whose bound comparisons follow the parts present in its format. */\ninterface DatePartsHost {\n hasDateParts(): boolean;\n hasTimeParts(): boolean;\n}\n\n/** Compares a date against a bound at the granularity of the host's format. */\ntype DateBoundComparer = (\n date: Date,\n bound: Date,\n hasTimeParts: boolean,\n hasDateParts: boolean\n) => boolean;\n\n/** Whether no value of the host exceeds `bound`. An absent bound holds. */\nfunction isWithinBound<T extends DatePartsHost>(\n host: T,\n bound: Date | null | undefined,\n values: (Date | null | undefined)[],\n exceeds: DateBoundComparer\n): boolean {\n return bound\n ? values.every(\n (date) =>\n !date ||\n !exceeds(date, bound, host.hasTimeParts(), host.hasDateParts())\n )\n : true;\n}\n\n/**\n * Creates a `rangeUnderflow` validator for hosts whose `min` comparison must\n * respect the parts of the host's format - day granularity when the format has\n * no time parts, time-of-day granularity when it has no date parts.\n *\n * `resolveValues` returns the dates checked against the bound; empty slots\n * are skipped, so a partial range validates only its present ends.\n */\nexport function createMinDateTimeValidator<\n T extends DatePartsHost & { min?: Date | null },\n>(resolveValues: (host: T) => (Date | null | undefined)[]): Validator<T> {\n return {\n key: 'rangeUnderflow',\n message: ({ min }) =>\n formatString(ValidationResourceStringsEN.min_validation_error!, min),\n isValid: (host) =>\n isWithinBound(host, host.min, resolveValues(host), isDateLessThanMin),\n };\n}\n\n/**\n * Creates a `rangeOverflow` validator for hosts whose `max` comparison must\n * respect the parts of the host's format. See {@link createMinDateTimeValidator}.\n */\nexport function createMaxDateTimeValidator<\n T extends DatePartsHost & { max?: Date | null },\n>(resolveValues: (host: T) => (Date | null | undefined)[]): Validator<T> {\n return {\n key: 'rangeOverflow',\n message: ({ max }) =>\n formatString(ValidationResourceStringsEN.max_validation_error!, max),\n isValid: (host) =>\n isWithinBound(host, host.max, resolveValues(host), isDateExceedingMax),\n };\n}\n"]}
1
+ {"version":3,"file":"validators.js","sourceRoot":"","sources":["../../src/internals/validators.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,2BAA2B,EAAE,MAAM,oBAAoB,CAAC;AACjE,OAAO,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAC1E,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAC9C,OAAO,EAAE,QAAQ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,KAAK,CACV,CAAC,IAAI,EAAE,EAAE,CACP,CAAC,IAAI;YACL,CAAC,OAAO,CAAC,IAAI,EAAE,KAAK,EAAE,IAAI,CAAC,YAAY,EAAE,EAAE,IAAI,CAAC,YAAY,EAAE,CAAC,CAClE;QACH,CAAC,CAAC,IAAI,CAAC;AACX,CAAC;AAWD,MAAM,UAAU,0BAA0B,CAExC,aAAuD;IACvD,OAAO;QACL,GAAG,EAAE,gBAAgB;QACrB,OAAO,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,eAAe,CAAC,IAAI,CAAC,GAAG,CAAC;QAC5C,OAAO,EAAE,CAAC,IAAI,EAAE,EAAE,CAChB,aAAa,CAAC,IAAI,EAAE,IAAI,CAAC,GAAG,EAAE,aAAa,CAAC,IAAI,CAAC,EAAE,iBAAiB,CAAC;KACxE,CAAC;AACJ,CAAC;AAMD,MAAM,UAAU,0BAA0B,CAExC,aAAuD;IACvD,OAAO;QACL,GAAG,EAAE,eAAe;QACpB,OAAO,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,eAAe,CAAC,IAAI,CAAC,GAAG,CAAC;QAC5C,OAAO,EAAE,CAAC,IAAI,EAAE,EAAE,CAChB,aAAa,CAAC,IAAI,EAAE,IAAI,CAAC,GAAG,EAAE,aAAa,CAAC,IAAI,CAAC,EAAE,kBAAkB,CAAC;KACzE,CAAC;AACJ,CAAC","sourcesContent":["import { ValidationResourceStringsEN } from 'igniteui-i18n-core';\nimport { isDateExceedingMax, isDateLessThanMin } from './date/compare.js';\nimport { CalendarDay } from './date/model.js';\nimport { asNumber, numberOfDecimals, roundPrecise } from './utils/math.js';\nimport { formatString } from './utils/strings.js';\nimport { isDefined } from './utils/types.js';\n\ntype ValidatorHandler<T> = (host: T) => boolean;\ntype ValidatorMessageFormat<T> = (host: T) => string;\n\n/** @hidden */\nexport interface Validator<T = any> {\n key: keyof ValidityStateFlags;\n message: string | ValidatorMessageFormat<T>;\n isValid: ValidatorHandler<T>;\n}\n\n/** Formats the `rangeUnderflow` message with the `min` bound. */\nfunction minBoundMessage(min: unknown): string {\n return formatString(ValidationResourceStringsEN.min_validation_error!, min);\n}\n\n/** Formats the `rangeOverflow` message with the `max` bound. */\nfunction maxBoundMessage(max: unknown): string {\n return formatString(ValidationResourceStringsEN.max_validation_error!, max);\n}\n\nconst emailRegex =\n /^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/;\n\nexport const requiredValidator: Validator<{\n required: boolean;\n value?: unknown;\n}> = {\n key: 'valueMissing',\n message: ValidationResourceStringsEN.required_validation_error!,\n isValid: ({ required, value }) => (required ? !!value : true),\n};\n\nexport const requiredBooleanValidator: Validator<{\n required: boolean;\n checked: boolean;\n}> = {\n key: 'valueMissing',\n message: ValidationResourceStringsEN.required_validation_error!,\n isValid: ({ required, checked }) => (required ? checked : true),\n};\n\nexport const minLengthValidator: Validator<{\n minLength?: number;\n value: string;\n}> = {\n key: 'tooShort',\n message: ({ minLength }) =>\n formatString(\n ValidationResourceStringsEN.min_length_validation_error!,\n minLength\n ),\n isValid: ({ minLength, value }) =>\n minLength && value ? value.length >= asNumber(minLength) : true,\n};\n\nexport const maxLengthValidator: Validator<{\n maxLength?: number;\n value: string;\n}> = {\n key: 'tooLong',\n message: ({ maxLength }) =>\n formatString(\n ValidationResourceStringsEN.max_length_validation_error!,\n maxLength\n ),\n isValid: ({ maxLength, value }) =>\n maxLength && value ? value.length <= asNumber(maxLength) : true,\n};\n\nexport const patternValidator: Validator<{ pattern?: string; value: string }> =\n {\n key: 'patternMismatch',\n message: ValidationResourceStringsEN.pattern_validation_error!,\n isValid: ({ pattern, value }) =>\n pattern && value ? new RegExp(pattern, 'u').test(value) : true,\n };\n\nexport const minValidator: Validator<{\n min?: number;\n value: number | string;\n}> = {\n key: 'rangeUnderflow',\n message: ({ min }) => minBoundMessage(min),\n isValid: ({ min, value }) =>\n isDefined(value) && value !== '' && isDefined(min)\n ? asNumber(value) >= asNumber(min)\n : true,\n};\n\nexport const maxValidator: Validator<{\n max?: number;\n value: number | string;\n}> = {\n key: 'rangeOverflow',\n message: ({ max }) => maxBoundMessage(max),\n isValid: ({ max, value }) =>\n isDefined(value) && value !== '' && isDefined(max)\n ? asNumber(value) <= asNumber(max)\n : true,\n};\n\nexport const stepValidator: Validator<{\n min?: number;\n step?: number;\n value: number | string;\n}> = {\n key: 'stepMismatch',\n message: 'Value does not conform to step constraint',\n isValid: ({ min, step, value }) => {\n if (isDefined(value) && value !== '' && isDefined(step)) {\n const _value = asNumber(value) - asNumber(min);\n const _step = asNumber(step);\n const magnitude = numberOfDecimals(_step) + 1;\n const rem = roundPrecise(\n Math.abs(_value - _step * Math.round(_value / _step)),\n magnitude\n );\n\n return !rem;\n }\n return true;\n },\n};\n\nexport const emailValidator: Validator<{ value: string }> = {\n key: 'typeMismatch',\n message: ValidationResourceStringsEN.email_validation_error!,\n isValid: ({ value }) => (value ? emailRegex.test(value) : true),\n};\n\nexport const urlValidator: Validator<{ value: string }> = {\n key: 'typeMismatch',\n message: ValidationResourceStringsEN.url_validation_error!,\n isValid: ({ value }) => (value ? URL.canParse(value) : true),\n};\n\nexport const minDateValidator: Validator<{\n value?: Date | null;\n min?: Date | null;\n}> = {\n key: 'rangeUnderflow',\n message: ({ min }) => minBoundMessage(min),\n isValid: ({ value, min }) =>\n value && min ? CalendarDay.compare(value, min) >= 0 : true,\n};\n\nexport const maxDateValidator: Validator<{\n value?: Date | null;\n max?: Date | null;\n}> = {\n key: 'rangeOverflow',\n message: ({ max }) => maxBoundMessage(max),\n isValid: ({ value, max }) =>\n value && max ? CalendarDay.compare(value, max) <= 0 : true,\n};\n\n/** A host that compares bounds at the granularity of its own format. */\ninterface DatePartsHost {\n hasDateParts(): boolean;\n hasTimeParts(): boolean;\n}\n\n/** Compares a date with a bound at the granularity of the host format. */\ntype DateBoundComparer = (\n date: Date,\n bound: Date,\n hasTimeParts: boolean,\n hasDateParts: boolean\n) => boolean;\n\n/**\n * Returns `true` when no value of the host exceeds `bound`. An unset bound\n * and an empty value both pass.\n */\nfunction isWithinBound<T extends DatePartsHost>(\n host: T,\n bound: Date | null | undefined,\n values: (Date | null | undefined)[],\n exceeds: DateBoundComparer\n): boolean {\n return bound\n ? values.every(\n (date) =>\n !date ||\n !exceeds(date, bound, host.hasTimeParts(), host.hasDateParts())\n )\n : true;\n}\n\n/**\n * Creates a `rangeUnderflow` validator for the `min` bound of a host.\n *\n * @remarks\n * The comparison follows the host format: day granularity without time\n * parts, time-of-day granularity without date parts. `resolveValues` gives\n * the dates to compare, and empty slots are skipped, so a partial range\n * validates only the ends it has.\n */\nexport function createMinDateTimeValidator<\n T extends DatePartsHost & { min?: Date | null },\n>(resolveValues: (host: T) => (Date | null | undefined)[]): Validator<T> {\n return {\n key: 'rangeUnderflow',\n message: (host) => minBoundMessage(host.min),\n isValid: (host) =>\n isWithinBound(host, host.min, resolveValues(host), isDateLessThanMin),\n };\n}\n\n/**\n * Creates a `rangeOverflow` validator for the `max` bound of a host.\n * See {@link createMinDateTimeValidator}.\n */\nexport function createMaxDateTimeValidator<\n T extends DatePartsHost & { max?: Date | null },\n>(resolveValues: (host: T) => (Date | null | undefined)[]): Validator<T> {\n return {\n key: 'rangeOverflow',\n message: (host) => maxBoundMessage(host.max),\n isValid: (host) =>\n isWithinBound(host, host.max, resolveValues(host), isDateExceedingMax),\n };\n}\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "igniteui-webcomponents",
3
- "version": "7.3.2",
3
+ "version": "7.4.1",
4
4
  "description": "Ignite UI for Web Components is a complete library of UI components, giving you the ability to build modern web applications using encapsulation and the concept of reusable components in a dependency-free approach.",
5
5
  "author": "Infragistics",
6
6
  "license": "MIT",
package/skills/README.md CHANGED
@@ -14,8 +14,10 @@ Skills are structured instructions that help AI agents understand and execute co
14
14
  | [igniteui-wc-integrate-with-framework](./igniteui-wc-integrate-with-framework/SKILL.md) | Integrate components into React, Angular, Vue, or vanilla JS applications | Setting up components in your project |
15
15
  | [igniteui-wc-customize-component-theme](./igniteui-wc-customize-component-theme/SKILL.md) | Customize styling using CSS custom properties, parts, and theming system | Applying custom brand colors/styles |
16
16
  | [igniteui-wc-generate-from-image-design](./igniteui-wc-generate-from-image-design/SKILL.md) | Implement a view from a screenshot or mockup using Ignite UI Web Components | Converting a design image into UI |
17
+ | [igniteui-wc-figma-to-app](./igniteui-wc-figma-to-app/SKILL.md) | Translate Figma screens from any UI kit (Indigo.Design, third-party, or plain frames) into a working app | Implementing a design from a Figma file |
17
18
  | [igniteui-wc-optimize-bundle-size](./igniteui-wc-optimize-bundle-size/SKILL.md) | Reduce bundle size by importing only needed components and lazy loading | Optimizing production performance |
18
19
  | [igniteui-wc-migrate-grid-lite-to-premium](./igniteui-wc-migrate-grid-lite-to-premium/SKILL.md) | Migrate from Grid Lite to the premium Data Grid | Adopting enterprise grid features |
20
+ | [igniteui-wc-grids](./igniteui-wc-grids/SKILL.md) | Set up a grid: package choice, theming, Shadow DOM, layout, sorting/filtering | Adding or debugging a grid in an app |
19
21
 
20
22
  ## How to Use
21
23
 
@@ -25,6 +27,7 @@ When working with an AI agent like GitHub Copilot, reference skills by name or a
25
27
  - "How do I integrate igniteui-webcomponents with React?"
26
28
  - "Help me customize the button colors to match my brand"
27
29
  - "Build this screenshot with Ignite UI Web Components"
30
+ - "Implement this Figma design with Ignite UI Web Components"
28
31
  - "My bundle size is too large, how can I reduce it?"
29
32
  - "Show me how to use these components in Vue"
30
33
 
@@ -32,6 +35,7 @@ When working with an AI agent like GitHub Copilot, reference skills by name or a
32
35
  - "Follow the integrate-with-framework skill for my Angular app"
33
36
  - "Use the customize-component-theme skill to help me style components"
34
37
  - "Use the generate-from-image-design skill to implement this mockup"
38
+ - "Use the figma-to-app skill to build this artboard"
35
39
  - "Apply the optimize-bundle-size skill to reduce my bundle"
36
40
 
37
41
  ## Skill Structure
@@ -53,9 +57,6 @@ If you identify gaps in the skills or have suggestions for improvements:
53
57
 
54
58
  1. [Open an issue](https://github.com/IgniteUI/igniteui-webcomponents/issues) describing the improvement
55
59
  2. Submit a pull request with the proposed changes
56
- 3. Follow the skill format and structure of existing skills
57
-
58
- For skills related to **contributing to the library itself** (creating components, reviewing PRs, etc.), see [`.github/skills/`](../.github/skills/).
59
60
 
60
61
  ## Additional Resources
61
62
 
@@ -1,6 +1,7 @@
1
1
  ---
2
+ license: MIT
2
3
  name: igniteui-wc-choose-components
3
- description: Identify and select the right Ignite UI Web Components for your app UI, then navigate to official docs, usage examples, and API references
4
+ description: "Identify the right Ignite UI Web Components (igniteui-webcomponents, grids, charts, dock manager, React wrappers) for a UI requirement and point to official docs, examples, and API references. WHEN TO USE: the user asks which component fits a UI pattern (form, table, dashboard, navigation, chat, etc.), needs to compare options (e.g. Grid Lite vs. premium Grid), wants a component list for a screen, or asks which package a component lives in. WHEN NOT TO USE: implementing a view from a design image or Figma file (use generate-from-image-design or figma-to-app), installing/wiring packages into a framework (use integrate-with-framework), styling/theming (use customize-component-theme), reducing bundle size (use optimize-bundle-size), or migrating Grid Lite to the premium grid (use migrate-grid-lite-to-premium)."
4
5
  user-invocable: true
5
6
  ---
6
7
 
@@ -1,6 +1,7 @@
1
1
  ---
2
+ license: MIT
2
3
  name: igniteui-wc-customize-component-theme
3
- description: Customize Ignite UI Web Components styling using CSS custom properties, optional Sass, and the igniteui-theming MCP server for AI-assisted theming
4
+ description: "Theme and style Ignite UI Web Components (and igniteui-react) apps using CSS custom properties, optional Sass, and the igniteui-theming MCP server. WHEN TO USE: the user wants to apply or switch a pre-built theme (Material, Fluent, Bootstrap, Indigo, light/dark), create a custom palette or global theme, restyle a specific component via design tokens or ::part, scope a theme to a container, adjust sizing/spacing/roundness, or toggle light/dark mode. WHEN NOT TO USE: choosing which component to use (use choose-components), building a full view from a design image or Figma file (use generate-from-image-design or figma-to-app, which include theming), installing packages or framework setup (use integrate-with-framework), or styling non-Ignite UI elements or libraries."
4
5
  user-invocable: true
5
6
  ---
6
7