igniteui-webcomponents 7.3.0-beta.0 → 7.3.0

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 (375) hide show
  1. package/CHANGELOG.md +23 -0
  2. package/animations/player.d.ts +7 -2
  3. package/animations/player.js +1 -2
  4. package/animations/player.js.map +1 -1
  5. package/components/accordion/accordion.js +4 -16
  6. package/components/accordion/accordion.js.map +1 -1
  7. package/components/avatar/avatar.d.ts +0 -1
  8. package/components/avatar/avatar.js +5 -9
  9. package/components/avatar/avatar.js.map +1 -1
  10. package/components/badge/badge.d.ts +1 -3
  11. package/components/badge/badge.js +4 -8
  12. package/components/badge/badge.js.map +1 -1
  13. package/components/banner/banner.d.ts +6 -5
  14. package/components/banner/banner.js +19 -17
  15. package/components/banner/banner.js.map +1 -1
  16. package/components/button/button-base.d.ts +1 -1
  17. package/components/button/button-base.js.map +1 -1
  18. package/components/button-group/button-group.d.ts +0 -1
  19. package/components/button-group/button-group.js +12 -17
  20. package/components/button-group/button-group.js.map +1 -1
  21. package/components/calendar/base.d.ts +3 -13
  22. package/components/calendar/base.js +10 -31
  23. package/components/calendar/base.js.map +1 -1
  24. package/components/calendar/calendar.d.ts +2 -2
  25. package/components/calendar/months-view/months-view.d.ts +1 -1
  26. package/components/calendar/months-view/months-view.js.map +1 -1
  27. package/components/carousel/carousel-indicator.d.ts +1 -1
  28. package/components/carousel/carousel-indicator.js +13 -13
  29. package/components/carousel/carousel-indicator.js.map +1 -1
  30. package/components/carousel/carousel-slide.d.ts +0 -2
  31. package/components/carousel/carousel-slide.js +7 -9
  32. package/components/carousel/carousel-slide.js.map +1 -1
  33. package/components/carousel/carousel.d.ts +52 -35
  34. package/components/carousel/carousel.js +136 -122
  35. package/components/carousel/carousel.js.map +1 -1
  36. package/components/carousel/themes/carousel.base.css.js +1 -1
  37. package/components/carousel/themes/carousel.base.css.js.map +1 -1
  38. package/components/chat/chat-input.d.ts +1 -1
  39. package/components/chat/chat-input.js +21 -21
  40. package/components/chat/chat-input.js.map +1 -1
  41. package/components/chat/chat.d.ts +0 -2
  42. package/components/chat/chat.js +6 -12
  43. package/components/chat/chat.js.map +1 -1
  44. package/components/checkbox/checkbox-base.d.ts +1 -1
  45. package/components/checkbox/checkbox.d.ts +3 -5
  46. package/components/checkbox/checkbox.js +33 -44
  47. package/components/checkbox/checkbox.js.map +1 -1
  48. package/components/checkbox/switch.d.ts +1 -1
  49. package/components/checkbox/switch.js +23 -34
  50. package/components/checkbox/switch.js.map +1 -1
  51. package/components/chip/chip.d.ts +1 -14
  52. package/components/chip/chip.js +12 -33
  53. package/components/chip/chip.js.map +1 -1
  54. package/components/color-picker/color-picker.d.ts +261 -0
  55. package/components/color-picker/color-picker.js +620 -0
  56. package/components/color-picker/color-picker.js.map +1 -0
  57. package/components/color-picker/common.d.ts +37 -0
  58. package/components/color-picker/common.js +55 -0
  59. package/components/color-picker/common.js.map +1 -0
  60. package/components/color-picker/converters.d.ts +18 -0
  61. package/components/color-picker/converters.js +173 -0
  62. package/components/color-picker/converters.js.map +1 -0
  63. package/components/color-picker/model.d.ts +120 -0
  64. package/components/color-picker/model.js +174 -0
  65. package/components/color-picker/model.js.map +1 -0
  66. package/components/color-picker/picker-canvas.d.ts +95 -0
  67. package/components/color-picker/picker-canvas.js +154 -0
  68. package/components/color-picker/picker-canvas.js.map +1 -0
  69. package/components/color-picker/themes/color-picker.base.css.d.ts +1 -0
  70. package/components/color-picker/themes/color-picker.base.css.js +3 -0
  71. package/components/color-picker/themes/color-picker.base.css.js.map +1 -0
  72. package/components/color-picker/themes/dark/color-picker.bootstrap.css.d.ts +1 -0
  73. package/components/color-picker/themes/dark/color-picker.bootstrap.css.js +3 -0
  74. package/components/color-picker/themes/dark/color-picker.bootstrap.css.js.map +1 -0
  75. package/components/color-picker/themes/dark/color-picker.fluent.css.d.ts +1 -0
  76. package/components/color-picker/themes/dark/color-picker.fluent.css.js +3 -0
  77. package/components/color-picker/themes/dark/color-picker.fluent.css.js.map +1 -0
  78. package/components/color-picker/themes/dark/color-picker.indigo.css.d.ts +1 -0
  79. package/components/color-picker/themes/dark/color-picker.indigo.css.js +3 -0
  80. package/components/color-picker/themes/dark/color-picker.indigo.css.js.map +1 -0
  81. package/components/color-picker/themes/dark/color-picker.material.css.d.ts +1 -0
  82. package/components/color-picker/themes/dark/color-picker.material.css.js +3 -0
  83. package/components/color-picker/themes/dark/color-picker.material.css.js.map +1 -0
  84. package/components/color-picker/themes/light/color-picker.bootstrap.css.d.ts +1 -0
  85. package/components/color-picker/themes/light/color-picker.bootstrap.css.js +3 -0
  86. package/components/color-picker/themes/light/color-picker.bootstrap.css.js.map +1 -0
  87. package/components/color-picker/themes/light/color-picker.fluent.css.d.ts +1 -0
  88. package/components/color-picker/themes/light/color-picker.fluent.css.js +3 -0
  89. package/components/color-picker/themes/light/color-picker.fluent.css.js.map +1 -0
  90. package/components/color-picker/themes/light/color-picker.indigo.css.d.ts +1 -0
  91. package/components/color-picker/themes/light/color-picker.indigo.css.js +3 -0
  92. package/components/color-picker/themes/light/color-picker.indigo.css.js.map +1 -0
  93. package/components/color-picker/themes/light/color-picker.material.css.d.ts +1 -0
  94. package/components/color-picker/themes/light/color-picker.material.css.js +3 -0
  95. package/components/color-picker/themes/light/color-picker.material.css.js.map +1 -0
  96. package/components/color-picker/themes/light/color-picker.shared.css.d.ts +1 -0
  97. package/components/color-picker/themes/light/color-picker.shared.css.js +3 -0
  98. package/components/color-picker/themes/light/color-picker.shared.css.js.map +1 -0
  99. package/components/color-picker/themes/picker-canvas.base.css.d.ts +1 -0
  100. package/components/color-picker/themes/picker-canvas.base.css.js +3 -0
  101. package/components/color-picker/themes/picker-canvas.base.css.js.map +1 -0
  102. package/components/color-picker/themes/shared/color-picker.bootstrap.css.d.ts +1 -0
  103. package/components/color-picker/themes/shared/color-picker.bootstrap.css.js +3 -0
  104. package/components/color-picker/themes/shared/color-picker.bootstrap.css.js.map +1 -0
  105. package/components/color-picker/themes/shared/color-picker.common.css.d.ts +1 -0
  106. package/components/color-picker/themes/shared/color-picker.common.css.js +3 -0
  107. package/components/color-picker/themes/shared/color-picker.common.css.js.map +1 -0
  108. package/components/color-picker/themes/shared/color-picker.fluent.css.d.ts +1 -0
  109. package/components/color-picker/themes/shared/color-picker.fluent.css.js +3 -0
  110. package/components/color-picker/themes/shared/color-picker.fluent.css.js.map +1 -0
  111. package/components/color-picker/themes/shared/color-picker.indigo.css.d.ts +1 -0
  112. package/components/color-picker/themes/shared/color-picker.indigo.css.js +3 -0
  113. package/components/color-picker/themes/shared/color-picker.indigo.css.js.map +1 -0
  114. package/components/color-picker/themes/shared/color-picker.material.css.d.ts +1 -0
  115. package/components/color-picker/themes/shared/color-picker.material.css.js +3 -0
  116. package/components/color-picker/themes/shared/color-picker.material.css.js.map +1 -0
  117. package/components/color-picker/themes/themes.d.ts +2 -0
  118. package/components/color-picker/themes/themes.js +50 -0
  119. package/components/color-picker/themes/themes.js.map +1 -0
  120. package/components/color-picker/validators.d.ts +3 -0
  121. package/components/color-picker/validators.js +5 -0
  122. package/components/color-picker/validators.js.map +1 -0
  123. package/components/combo/combo-item.d.ts +1 -3
  124. package/components/combo/combo-item.js +5 -12
  125. package/components/combo/combo-item.js.map +1 -1
  126. package/components/combo/combo.d.ts +7 -20
  127. package/components/combo/combo.js +59 -81
  128. package/components/combo/combo.js.map +1 -1
  129. package/components/date-picker/date-picker.base.d.ts +12 -9
  130. package/components/date-picker/date-picker.base.js +24 -31
  131. package/components/date-picker/date-picker.base.js.map +1 -1
  132. package/components/date-picker/date-picker.d.ts +1 -1
  133. package/components/date-picker/date-picker.js +3 -5
  134. package/components/date-picker/date-picker.js.map +1 -1
  135. package/components/date-range-picker/date-range-input.d.ts +2 -4
  136. package/components/date-range-picker/date-range-input.js +6 -37
  137. package/components/date-range-picker/date-range-input.js.map +1 -1
  138. package/components/date-range-picker/date-range-picker.d.ts +2 -5
  139. package/components/date-range-picker/date-range-picker.js +15 -28
  140. package/components/date-range-picker/date-range-picker.js.map +1 -1
  141. package/components/date-range-picker/predefined-ranges-area.d.ts +2 -2
  142. package/components/date-range-picker/predefined-ranges-area.js +4 -6
  143. package/components/date-range-picker/predefined-ranges-area.js.map +1 -1
  144. package/components/date-range-picker/validators.d.ts +1 -1
  145. package/components/date-range-picker/validators.js +5 -18
  146. package/components/date-range-picker/validators.js.map +1 -1
  147. package/components/date-time-input/date-part.d.ts +2 -1
  148. package/components/date-time-input/date-part.js +38 -75
  149. package/components/date-time-input/date-part.js.map +1 -1
  150. package/components/date-time-input/date-time-input.base.d.ts +31 -12
  151. package/components/date-time-input/date-time-input.base.js +43 -11
  152. package/components/date-time-input/date-time-input.base.js.map +1 -1
  153. package/components/date-time-input/date-time-input.d.ts +1 -3
  154. package/components/date-time-input/date-time-input.js +7 -40
  155. package/components/date-time-input/date-time-input.js.map +1 -1
  156. package/components/date-time-input/datetime-mask-parser.d.ts +8 -0
  157. package/components/date-time-input/datetime-mask-parser.js +8 -8
  158. package/components/date-time-input/datetime-mask-parser.js.map +1 -1
  159. package/components/date-time-input/validators.js +3 -14
  160. package/components/date-time-input/validators.js.map +1 -1
  161. package/components/dialog/dialog.d.ts +6 -7
  162. package/components/dialog/dialog.js +21 -26
  163. package/components/dialog/dialog.js.map +1 -1
  164. package/components/divider/divider.d.ts +1 -4
  165. package/components/divider/divider.js +8 -17
  166. package/components/divider/divider.js.map +1 -1
  167. package/components/dropdown/dropdown-group.js +1 -6
  168. package/components/dropdown/dropdown-group.js.map +1 -1
  169. package/components/expansion-panel/expansion-panel.d.ts +15 -5
  170. package/components/expansion-panel/expansion-panel.js +23 -34
  171. package/components/expansion-panel/expansion-panel.js.map +1 -1
  172. package/components/file-input/file-input.d.ts +2 -14
  173. package/components/file-input/file-input.js +5 -23
  174. package/components/file-input/file-input.js.map +1 -1
  175. package/components/highlight/highlight.d.ts +6 -8
  176. package/components/highlight/highlight.js +12 -20
  177. package/components/highlight/highlight.js.map +1 -1
  178. package/components/icon/icon-references.js +1 -0
  179. package/components/icon/icon-references.js.map +1 -1
  180. package/components/icon/icon.d.ts +1 -1
  181. package/components/icon/internal-icons-lib.js +3 -0
  182. package/components/icon/internal-icons-lib.js.map +1 -1
  183. package/components/icon/registry/types.d.ts +1 -1
  184. package/components/icon/registry/types.js.map +1 -1
  185. package/components/input/input.d.ts +9 -19
  186. package/components/input/input.js +30 -60
  187. package/components/input/input.js.map +1 -1
  188. package/components/input/themes/shared/input.material.css.js +1 -1
  189. package/components/input/themes/shared/input.material.css.js.map +1 -1
  190. package/components/mask-input/mask-input.d.ts +1 -1
  191. package/components/mask-input/mask-input.js +2 -4
  192. package/components/mask-input/mask-input.js.map +1 -1
  193. package/components/nav-drawer/nav-drawer.d.ts +7 -7
  194. package/components/nav-drawer/nav-drawer.js +12 -23
  195. package/components/nav-drawer/nav-drawer.js.map +1 -1
  196. package/components/progress/base.d.ts +4 -7
  197. package/components/progress/base.js +21 -45
  198. package/components/progress/base.js.map +1 -1
  199. package/components/qr-code/qr-code.d.ts +1 -1
  200. package/components/qr-code/qr-code.js +3 -2
  201. package/components/qr-code/qr-code.js.map +1 -1
  202. package/components/qr-code/types.d.ts +1 -1
  203. package/components/qr-code/types.js.map +1 -1
  204. package/components/radio/controller.d.ts +2 -30
  205. package/components/radio/controller.js +8 -94
  206. package/components/radio/controller.js.map +1 -1
  207. package/components/radio/radio.d.ts +5 -5
  208. package/components/radio/radio.js +48 -58
  209. package/components/radio/radio.js.map +1 -1
  210. package/components/radio-group/radio-group.d.ts +1 -2
  211. package/components/radio-group/radio-group.js +2 -9
  212. package/components/radio-group/radio-group.js.map +1 -1
  213. package/components/rating/rating.d.ts +24 -12
  214. package/components/rating/rating.js +79 -73
  215. package/components/rating/rating.js.map +1 -1
  216. package/components/resize-container/default-ghost.js +4 -3
  217. package/components/resize-container/default-ghost.js.map +1 -1
  218. package/components/resize-container/resize-container.d.ts +1 -1
  219. package/components/resize-container/resize-container.js +5 -3
  220. package/components/resize-container/resize-container.js.map +1 -1
  221. package/components/resize-container/resize-controller.js +4 -3
  222. package/components/resize-container/resize-controller.js.map +1 -1
  223. package/components/select/select-group.d.ts +2 -1
  224. package/components/select/select-group.js +7 -11
  225. package/components/select/select-group.js.map +1 -1
  226. package/components/select/select.d.ts +3 -4
  227. package/components/select/select.js +23 -28
  228. package/components/select/select.js.map +1 -1
  229. package/components/slider/range-slider.d.ts +3 -2
  230. package/components/slider/range-slider.js +22 -70
  231. package/components/slider/range-slider.js.map +1 -1
  232. package/components/slider/slider-base.d.ts +9 -6
  233. package/components/slider/slider-base.js +27 -28
  234. package/components/slider/slider-base.js.map +1 -1
  235. package/components/slider/slider.js +9 -5
  236. package/components/slider/slider.js.map +1 -1
  237. package/components/splitter/splitter.d.ts +1 -1
  238. package/components/splitter/splitter.js.map +1 -1
  239. package/components/stepper/step.d.ts +3 -0
  240. package/components/stepper/step.js +9 -5
  241. package/components/stepper/step.js.map +1 -1
  242. package/components/stepper/stepper.d.ts +0 -11
  243. package/components/stepper/stepper.js +21 -86
  244. package/components/stepper/stepper.js.map +1 -1
  245. package/components/tabs/tab.d.ts +1 -1
  246. package/components/tabs/tab.js +6 -5
  247. package/components/tabs/tab.js.map +1 -1
  248. package/components/tabs/tabs.d.ts +1 -5
  249. package/components/tabs/tabs.js +12 -34
  250. package/components/tabs/tabs.js.map +1 -1
  251. package/components/textarea/textarea.d.ts +6 -7
  252. package/components/textarea/textarea.js +3 -10
  253. package/components/textarea/textarea.js.map +1 -1
  254. package/components/theme-provider/theme-provider.d.ts +2 -4
  255. package/components/theme-provider/theme-provider.js +11 -21
  256. package/components/theme-provider/theme-provider.js.map +1 -1
  257. package/components/tile-manager/tile-manager.d.ts +10 -21
  258. package/components/tile-manager/tile-manager.js +43 -74
  259. package/components/tile-manager/tile-manager.js.map +1 -1
  260. package/components/tile-manager/tile.d.ts +10 -18
  261. package/components/tile-manager/tile.js +50 -67
  262. package/components/tile-manager/tile.js.map +1 -1
  263. package/components/tooltip/tooltip.d.ts +4 -7
  264. package/components/tooltip/tooltip.js +20 -28
  265. package/components/tooltip/tooltip.js.map +1 -1
  266. package/components/tree/tree.d.ts +1 -14
  267. package/components/tree/tree.js +5 -23
  268. package/components/tree/tree.js.map +1 -1
  269. package/components/tree/tree.navigation.d.ts +1 -1
  270. package/components/tree/tree.navigation.js.map +1 -1
  271. package/components/types.d.ts +2 -0
  272. package/components/types.js.map +1 -1
  273. package/components/validation-container/validation-container.d.ts +1 -2
  274. package/components/validation-container/validation-container.js.map +1 -1
  275. package/components/virtualization/engine.d.ts +40 -38
  276. package/components/virtualization/engine.js.map +1 -1
  277. package/components/virtualization/types.d.ts +6 -5
  278. package/components/virtualization/types.js.map +1 -1
  279. package/components/virtualization/virtualization.d.ts +94 -80
  280. package/components/virtualization/virtualization.js +10 -2
  281. package/components/virtualization/virtualization.js.map +1 -1
  282. package/custom-elements.json +31948 -26708
  283. package/igniteui-webcomponents.css-data.json +1 -1
  284. package/igniteui-webcomponents.html-data.json +1 -1
  285. package/index.d.ts +1 -0
  286. package/index.js +1 -0
  287. package/index.js.map +1 -1
  288. package/internals/controllers/aria-projection.d.ts +6 -6
  289. package/internals/controllers/aria-projection.js.map +1 -1
  290. package/internals/controllers/context-provider.d.ts +48 -0
  291. package/internals/controllers/context-provider.js +29 -0
  292. package/internals/controllers/context-provider.js.map +1 -0
  293. package/internals/controllers/drag.js +6 -6
  294. package/internals/controllers/drag.js.map +1 -1
  295. package/internals/controllers/gestures.js +3 -0
  296. package/internals/controllers/gestures.js.map +1 -1
  297. package/internals/controllers/group.d.ts +64 -0
  298. package/internals/controllers/group.js +104 -0
  299. package/internals/controllers/group.js.map +1 -0
  300. package/internals/controllers/internals.d.ts +16 -3
  301. package/internals/controllers/internals.js +10 -3
  302. package/internals/controllers/internals.js.map +1 -1
  303. package/internals/controllers/key-bindings.d.ts +6 -0
  304. package/internals/controllers/key-bindings.js +3 -0
  305. package/internals/controllers/key-bindings.js.map +1 -1
  306. package/internals/controllers/roving-focus.d.ts +72 -0
  307. package/internals/controllers/roving-focus.js +61 -0
  308. package/internals/controllers/roving-focus.js.map +1 -0
  309. package/internals/controllers/slot.d.ts +8 -0
  310. package/internals/controllers/slot.js +4 -0
  311. package/internals/controllers/slot.js.map +1 -1
  312. package/internals/controllers/toggle.d.ts +96 -0
  313. package/internals/controllers/toggle.js +65 -0
  314. package/internals/controllers/toggle.js.map +1 -0
  315. package/internals/date/converters.js +2 -5
  316. package/internals/date/converters.js.map +1 -1
  317. package/internals/date/model.d.ts +4 -0
  318. package/internals/date/model.js +6 -0
  319. package/internals/date/model.js.map +1 -1
  320. package/internals/decorators/coerced-property.d.ts +47 -0
  321. package/internals/decorators/coerced-property.js +36 -0
  322. package/internals/decorators/coerced-property.js.map +1 -0
  323. package/internals/definitions/defineAllComponents.js +2 -0
  324. package/internals/definitions/defineAllComponents.js.map +1 -1
  325. package/internals/i18n/i18n-controller.d.ts +22 -3
  326. package/internals/i18n/i18n-controller.js +28 -6
  327. package/internals/i18n/i18n-controller.js.map +1 -1
  328. package/internals/mixins/alert.d.ts +1 -1
  329. package/internals/mixins/alert.js +5 -3
  330. package/internals/mixins/alert.js.map +1 -1
  331. package/internals/mixins/combo-box.d.ts +3 -12
  332. package/internals/mixins/combo-box.js +6 -32
  333. package/internals/mixins/combo-box.js.map +1 -1
  334. package/internals/mixins/forms/associated.js +18 -0
  335. package/internals/mixins/forms/associated.js.map +1 -1
  336. package/internals/mixins/forms/types.d.ts +20 -1
  337. package/internals/mixins/forms/types.js.map +1 -1
  338. package/internals/mixins/i18n.d.ts +31 -0
  339. package/internals/mixins/i18n.js +36 -0
  340. package/internals/mixins/i18n.js.map +1 -0
  341. package/internals/mixins/mask-behavior.d.ts +6 -5
  342. package/internals/mixins/mask-behavior.js +1 -2
  343. package/internals/mixins/mask-behavior.js.map +1 -1
  344. package/internals/mixins/option.js +4 -2
  345. package/internals/mixins/option.js.map +1 -1
  346. package/internals/templates/masked-input.d.ts +1 -1
  347. package/internals/templates/masked-input.js.map +1 -1
  348. package/internals/templates/slotted-icon.d.ts +32 -0
  349. package/internals/templates/slotted-icon.js +19 -0
  350. package/internals/templates/slotted-icon.js.map +1 -0
  351. package/internals/templates/toggle-shell.d.ts +46 -0
  352. package/internals/templates/toggle-shell.js +38 -0
  353. package/internals/templates/toggle-shell.js.map +1 -0
  354. package/internals/timing.d.ts +32 -0
  355. package/internals/timing.js +20 -0
  356. package/internals/timing.js.map +1 -0
  357. package/internals/utils/arrays.d.ts +2 -2
  358. package/internals/utils/arrays.js.map +1 -1
  359. package/internals/utils/dom.d.ts +22 -0
  360. package/internals/utils/dom.js +15 -1
  361. package/internals/utils/dom.js.map +1 -1
  362. package/internals/utils/math.d.ts +1 -1
  363. package/internals/utils/math.js.map +1 -1
  364. package/internals/utils/types.d.ts +1 -1
  365. package/internals/utils/types.js.map +1 -1
  366. package/internals/validators.d.ts +23 -0
  367. package/internals/validators.js +21 -0
  368. package/internals/validators.js.map +1 -1
  369. package/package.json +3 -1
  370. package/theming/theming-controller.d.ts +3 -3
  371. package/theming/theming-controller.js.map +1 -1
  372. package/web-types.json +2 -2
  373. package/internals/decorators/watch.d.ts +0 -5
  374. package/internals/decorators/watch.js +0 -19
  375. package/internals/decorators/watch.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"file-input.js","sourceRoot":"","sources":["../../../src/components/file-input/file-input.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EACL,0BAA0B,GAE3B,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AAC3B,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,YAAY,EAAE,MAAM,2CAA2C,CAAC;AACzE,OAAO,EAAE,iBAAiB,EAAE,QAAQ,EAAE,MAAM,gCAAgC,CAAC;AAC7E,OAAO,EAAE,iBAAiB,EAAE,MAAM,oCAAoC,CAAC;AACvE,OAAO,EAAE,iBAAiB,EAAE,M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,SAAS,EAAE,KAAK,EAAE,CAAC;4DAG9B;AAWD;IADC,QAAQ,EAAE;mDAGV;AAaM;IADN,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;uDACnB;AAOjB;IADN,QAAQ,EAAE;qDACQ;AAOH;IADf,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;wDACQ","sourcesContent":["import {\n FileInputResourceStringsEN,\n type IFileInputResourceStrings,\n} from 'igniteui-i18n-core';\nimport { html } from 'lit';\nimport { property, state } from 'lit/decorators.js';\nimport { ariaBindings } from '#internals/controllers/aria-projection.js';\nimport { addSlotController, setSlots } from '#internals/controllers/slot.js';\nimport { registerComponent } from '#internals/definitions/register.js';\nimport { addI18nController } from '#internals/i18n/i18n-controller.js';\nimport type { AbstractConstructor } from '#internals/mixins/constructor.js';\nimport { EventEmitterMixin } from '#internals/mixins/event-emitter.js';\nimport { FormValueFileListTransformers } from '#internals/mixins/forms/form-transformers.js';\nimport { createFormValueState } from '#internals/mixins/forms/form-value.js';\nimport { partMap } from '#internals/part-map.js';\nimport { hasFiles } from '#internals/utils/dom.js';\nimport { bindIf } from '#internals/utils/lit.js';\nimport { addThemingController } from '#theming/theming-controller.js';\nimport IgcButtonComponent from '../button/button.js';\nimport {\n IgcInputBaseComponent,\n type IgcInputComponentEventMap,\n} from '../input/input-base.js';\nimport { styles as baseStyle } from '../input/themes/input.base.css.js';\nimport { styles as shared } from '../input/themes/shared/input.common.css.js';\nimport IgcValidationContainerComponent from '../validation-container/validation-container.js';\nimport { styles } from './themes/file-input.base.css.js';\nimport { all } from './themes/themes.js';\nimport { fileValidators } from './validators.js';\n\n/* blazorSuppress */\nexport interface IgcFileInputComponentEventMap extends Omit<\n IgcInputComponentEventMap,\n 'igcChange' | 'igcInput'\n> {\n igcCancel: CustomEvent<FileList>;\n igcChange: CustomEvent<FileList>;\n}\n\nconst Slots = setSlots(\n 'prefix',\n 'suffix',\n 'helper-text',\n 'file-selector-text',\n 'file-missing-text',\n 'value-missing',\n 'custom-error',\n 'invalid'\n);\n\n/* blazorSuppress */\n/**\n * @element igc-file-input\n *\n * @slot prefix - Renders content before the input.\n * @slot suffix - Renders content after input.\n * @slot helper-text - Renders content below the input.\n * @slot file-selector-text - Renders content for the browse button when input type is file.\n * @slot file-missing-text - Renders content when input type is file and no file is chosen.\n * @slot value-missing - Renders content when the required validation fails.\n * @slot custom-error - Renders content when setCustomValidity(message) is set.\n * @slot invalid - Renders content when the component is in invalid state (validity.valid = false).\n *\n * @fires igcChange - Emitted when the control's checked state changes.\n * @fires igcCancel - Emitted when the control's file picker dialog is canceled.\n *\n * @csspart container - The main wrapper that holds all main input elements.\n * @csspart input - The native input element.\n * @csspart label - The native label element.\n * @csspart file-names - The file names wrapper when input type is 'file'.\n * @csspart file-selector-button - The browse button when input type is 'file'.\n * @csspart prefix - The prefix wrapper.\n * @csspart suffix - The suffix wrapper.\n * @csspart helper-text - The helper text wrapper.\n */\nexport default class IgcFileInputComponent extends EventEmitterMixin<\n IgcFileInputComponentEventMap,\n AbstractConstructor<IgcInputBaseComponent>\n>(IgcInputBaseComponent) {\n public static readonly tagName = 'igc-file-input';\n public static styles = [baseStyle, shared, styles];\n\n /* blazorSuppress */\n public static register(): void {\n registerComponent(\n IgcFileInputComponent,\n IgcValidationContainerComponent,\n IgcButtonComponent\n );\n }\n\n //#region Internal attributes and properties\n\n protected override readonly _themes = addThemingController(this, all);\n\n protected override readonly _slots = addSlotController(this, {\n slots: Slots,\n });\n\n protected override readonly _formValue = createFormValueState(this, {\n initialValue: null,\n transformers: FormValueFileListTransformers,\n });\n\n protected readonly _i18nController = addI18nController(this, {\n defaultEN: FileInputResourceStringsEN,\n });\n\n protected override get __validators() {\n return fileValidators;\n }\n\n private get _fileNames(): string | null {\n if (!hasFiles(this)) {\n return null;\n }\n\n return Array.from(this.files)\n .map((file) => file.name || 'unnamed')\n .join(', ');\n }\n\n /**\n * Indicates whether the file picker dialog is currently active.\n * Used to manage validation on blur.\n */\n @state()\n private _filePickerActive = false;\n\n //#endregion\n\n //#region Public attributes and properties\n\n /* @tsTwoWayProperty(true, \"igcChange\", \"detail\", false) */\n /**\n * The value of the control.\n * Similar to native file input, this property is read-only and cannot be set programmatically.\n * @attr\n */\n @property()\n public set value(value: string) {\n if (value === '' && this._input) {\n this._input.value = value;\n }\n }\n\n public get value(): string {\n return this._input?.value ?? '';\n }\n\n /**\n * The resource strings for localization.\n */\n @property({ attribute: false })\n public set resourceStrings(value: IFileInputResourceStrings) {\n this._i18nController.resourceStrings = value;\n }\n\n public get resourceStrings(): IFileInputResourceStrings {\n return this._i18nController.resourceStrings;\n }\n\n /**\n * Gets/Sets the locale used for getting language, affecting resource strings.\n * @attr locale\n */\n @property()\n public set locale(value: string) {\n this._i18nController.locale = value;\n }\n\n public get locale(): string {\n return this._i18nController.locale;\n }\n\n /**\n * Whether the control allows the user to select more than one file.\n *\n * @attr\n * @default false\n */\n @property({ type: Boolean, reflect: true })\n public multiple = false;\n\n /**\n * The file types the control accepts, as a comma-separated list.\n * @attr\n */\n @property()\n public accept = '';\n\n /**\n * Whether the control should receive focus automatically.\n * @attr\n */\n @property({ type: Boolean })\n public override autofocus!: boolean;\n\n /** Returns the list of selected files. */\n public get files(): FileList {\n return this._input?.files ?? new DataTransfer().files;\n }\n\n //#endregion\n\n //#region Internal methods\n\n /**\n * A file input cannot have a default file list, so the `value` attribute\n * never contributes a default - otherwise its string would be stored as the\n * FileList default and submitted character-by-character after a form reset.\n */\n protected override _setDefaultValue(): void {\n this._formValue.defaultValue = null;\n }\n\n /**\n * Restores directly instead of through the `value` setter: the setter is\n * deliberately inert (read-only semantics) and never updates the form state.\n */\n protected override _restoreDefaultValue(): void {\n if (this._input) {\n this._input.value = '';\n }\n this._formValue.setValueAndFormState(this._formValue.defaultValue);\n this.requestUpdate();\n }\n\n //#endregion\n\n //#region Event Handlers\n\n private _handleChange(): void {\n this._filePickerActive = false;\n this._setTouchedState();\n this._formValue.setValueAndFormState(this.files);\n\n this.requestUpdate();\n this.emitEvent('igcChange', { detail: this.files });\n }\n\n private _handleCancel(): void {\n this._filePickerActive = false;\n this._setTouchedState();\n this._validate();\n\n this.emitEvent('igcCancel', { detail: this.files });\n }\n\n protected override _handleBlur(): void {\n this._filePickerActive ? this._validate() : super._handleBlur();\n }\n\n /* c8 ignore next 3 */\n protected _handleClick(): void {\n this._filePickerActive = true;\n }\n\n //#endregion\n\n protected override _renderFileParts() {\n const emptyText =\n this.placeholder ?? this.resourceStrings.file_input_placeholder;\n\n return html`\n <div part=\"file-parts\">\n <div part=\"file-selector-button\">\n <igc-button variant=\"flat\" ?disabled=${this.disabled} tabindex=\"-1\">\n <slot name=\"file-selector-text\"\n >${this.resourceStrings.file_input_upload_button}</slot\n >\n </igc-button>\n </div>\n <div part=\"file-names\">\n <span>\n ${\n this._fileNames ??\n html`<slot name=\"file-missing-text\">${emptyText}</slot>`\n }\n </span>\n </div>\n </div>\n `;\n }\n\n protected override _renderInput() {\n const hasNegativeTabIndex = this.getAttribute('tabindex') === '-1';\n\n return html`\n <input\n ${ariaBindings(this._ariaTarget.resolveBindings())}\n id=${this._inputId}\n part=${partMap(this._resolvePartNames('input'))}\n type=\"file\"\n ?disabled=${this.disabled}\n ?required=${this.required}\n ?autofocus=${this.autofocus}\n ?multiple=${this.multiple}\n tabindex=${bindIf(hasNegativeTabIndex, -1)}\n accept=${bindIf(this.accept, this.accept)}\n @click=${this._handleClick}\n @change=${this._handleChange}\n @cancel=${this._handleCancel}\n @blur=${this._handleBlur}\n />\n `;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'igc-file-input': IgcFileInputComponent;\n }\n}\n"]}
1
+ {"version":3,"file":"file-input.js","sourceRoot":"","sources":["../../../src/components/file-input/file-input.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EACL,0BAA0B,GAE3B,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,IAAI,EAAE,MAA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IADN,QAAQ,EAAE;qDACQ;AAOH;IADf,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;wDACQ","sourcesContent":["import {\n FileInputResourceStringsEN,\n type IFileInputResourceStrings,\n} from 'igniteui-i18n-core';\nimport { html } from 'lit';\nimport { property, state } from 'lit/decorators.js';\nimport { ariaBindings } from '#internals/controllers/aria-projection.js';\nimport { addSlotController, setSlots } from '#internals/controllers/slot.js';\nimport { registerComponent } from '#internals/definitions/register.js';\nimport type { I18nControllerConfig } from '#internals/i18n/i18n-controller.js';\nimport type { AbstractConstructor } from '#internals/mixins/constructor.js';\nimport { EventEmitterMixin } from '#internals/mixins/event-emitter.js';\nimport { FormValueFileListTransformers } from '#internals/mixins/forms/form-transformers.js';\nimport { createFormValueState } from '#internals/mixins/forms/form-value.js';\nimport { I18nMixin } from '#internals/mixins/i18n.js';\nimport { partMap } from '#internals/part-map.js';\nimport { hasFiles } from '#internals/utils/dom.js';\nimport { bindIf } from '#internals/utils/lit.js';\nimport { addThemingController } from '#theming/theming-controller.js';\nimport IgcButtonComponent from '../button/button.js';\nimport {\n IgcInputBaseComponent,\n type IgcInputComponentEventMap,\n} from '../input/input-base.js';\nimport { styles as baseStyle } from '../input/themes/input.base.css.js';\nimport { styles as shared } from '../input/themes/shared/input.common.css.js';\nimport IgcValidationContainerComponent from '../validation-container/validation-container.js';\nimport { styles } from './themes/file-input.base.css.js';\nimport { all } from './themes/themes.js';\nimport { fileValidators } from './validators.js';\n\n/* blazorSuppress */\nexport interface IgcFileInputComponentEventMap extends Omit<\n IgcInputComponentEventMap,\n 'igcChange' | 'igcInput'\n> {\n igcCancel: CustomEvent<FileList>;\n igcChange: CustomEvent<FileList>;\n}\n\nconst Slots = setSlots(\n 'prefix',\n 'suffix',\n 'helper-text',\n 'file-selector-text',\n 'file-missing-text',\n 'value-missing',\n 'custom-error',\n 'invalid'\n);\n\nconst i18n: I18nControllerConfig<IFileInputResourceStrings> = {\n defaultEN: FileInputResourceStringsEN,\n};\n\n/* blazorSuppress */\n/**\n * @element igc-file-input\n *\n * @slot prefix - Renders content before the input.\n * @slot suffix - Renders content after input.\n * @slot helper-text - Renders content below the input.\n * @slot file-selector-text - Renders content for the browse button when input type is file.\n * @slot file-missing-text - Renders content when input type is file and no file is chosen.\n * @slot value-missing - Renders content when the required validation fails.\n * @slot custom-error - Renders content when setCustomValidity(message) is set.\n * @slot invalid - Renders content when the component is in invalid state (validity.valid = false).\n *\n * @fires igcChange - Emitted when the control's checked state changes.\n * @fires igcCancel - Emitted when the control's file picker dialog is canceled.\n *\n * @csspart container - The main wrapper that holds all main input elements.\n * @csspart input - The native input element.\n * @csspart label - The native label element.\n * @csspart file-names - The file names wrapper when input type is 'file'.\n * @csspart file-selector-button - The browse button when input type is 'file'.\n * @csspart prefix - The prefix wrapper.\n * @csspart suffix - The suffix wrapper.\n * @csspart helper-text - The helper text wrapper.\n */\nexport default class IgcFileInputComponent extends I18nMixin(\n EventEmitterMixin<\n IgcFileInputComponentEventMap,\n AbstractConstructor<IgcInputBaseComponent>\n >(IgcInputBaseComponent),\n i18n\n) {\n public static readonly tagName = 'igc-file-input';\n public static styles = [baseStyle, shared, styles];\n\n /* blazorSuppress */\n public static register(): void {\n registerComponent(\n IgcFileInputComponent,\n IgcValidationContainerComponent,\n IgcButtonComponent\n );\n }\n\n //#region Internal attributes and properties\n\n protected override readonly _themes = addThemingController(this, all);\n\n protected override readonly _slots = addSlotController(this, {\n slots: Slots,\n });\n\n protected override readonly _formValue = createFormValueState(this, {\n initialValue: null,\n transformers: FormValueFileListTransformers,\n });\n\n protected override get __validators() {\n return fileValidators;\n }\n\n private get _fileNames(): string | null {\n if (!hasFiles(this)) {\n return null;\n }\n\n return Array.from(this.files)\n .map((file) => file.name || 'unnamed')\n .join(', ');\n }\n\n /**\n * Indicates whether the file picker dialog is currently active.\n * Used to manage validation on blur.\n */\n @state()\n private _filePickerActive = false;\n\n //#endregion\n\n //#region Public attributes and properties\n\n /* @tsTwoWayProperty(true, \"igcChange\", \"detail\", false) */\n /**\n * The value of the control.\n * Similar to native file input, this property is read-only and cannot be set programmatically.\n * @attr\n */\n @property()\n public set value(value: string) {\n if (value === '' && this._input) {\n this._input.value = value;\n }\n }\n\n public get value(): string {\n return this._input?.value ?? '';\n }\n\n /**\n * Whether the control allows the user to select more than one file.\n *\n * @attr\n * @default false\n */\n @property({ type: Boolean, reflect: true })\n public multiple = false;\n\n /**\n * The file types the control accepts, as a comma-separated list.\n * @attr\n */\n @property()\n public accept = '';\n\n /**\n * Whether the control should receive focus automatically.\n * @attr\n */\n @property({ type: Boolean })\n public override autofocus!: boolean;\n\n /** Returns the list of selected files. */\n public get files(): FileList {\n return this._input?.files ?? new DataTransfer().files;\n }\n\n //#endregion\n\n //#region Internal methods\n\n /**\n * A file input cannot have a default file list, so the `value` attribute\n * never contributes a default - otherwise its string would be stored as the\n * FileList default and submitted character-by-character after a form reset.\n */\n protected override _setDefaultValue(): void {\n this._formValue.defaultValue = null;\n }\n\n /**\n * Restores directly instead of through the `value` setter: the setter is\n * deliberately inert (read-only semantics) and never updates the form state.\n */\n protected override _restoreDefaultValue(): void {\n if (this._input) {\n this._input.value = '';\n }\n this._formValue.setValueAndFormState(this._formValue.defaultValue);\n this.requestUpdate();\n }\n\n //#endregion\n\n //#region Event Handlers\n\n private _handleChange(): void {\n this._filePickerActive = false;\n this._setTouchedState();\n this._formValue.setValueAndFormState(this.files);\n\n this.requestUpdate();\n this.emitEvent('igcChange', { detail: this.files });\n }\n\n private _handleCancel(): void {\n this._filePickerActive = false;\n this._setTouchedState();\n this._validate();\n\n this.emitEvent('igcCancel', { detail: this.files });\n }\n\n protected override _handleBlur(): void {\n this._filePickerActive ? this._validate() : super._handleBlur();\n }\n\n /* c8 ignore next 3 */\n protected _handleClick(): void {\n this._filePickerActive = true;\n }\n\n //#endregion\n\n protected override _renderFileParts() {\n const emptyText =\n this.placeholder ?? this.resourceStrings.file_input_placeholder;\n\n return html`\n <div part=\"file-parts\">\n <div part=\"file-selector-button\">\n <igc-button variant=\"flat\" ?disabled=${this.disabled} tabindex=\"-1\">\n <slot name=\"file-selector-text\"\n >${this.resourceStrings.file_input_upload_button}</slot\n >\n </igc-button>\n </div>\n <div part=\"file-names\">\n <span>\n ${\n this._fileNames ??\n html`<slot name=\"file-missing-text\">${emptyText}</slot>`\n }\n </span>\n </div>\n </div>\n `;\n }\n\n protected override _renderInput() {\n const hasNegativeTabIndex = this.getAttribute('tabindex') === '-1';\n\n return html`\n <input\n ${ariaBindings(this._ariaTarget.resolveBindings())}\n id=${this._inputId}\n part=${partMap(this._resolvePartNames('input'))}\n type=\"file\"\n ?disabled=${this.disabled}\n ?required=${this.required}\n ?autofocus=${this.autofocus}\n ?multiple=${this.multiple}\n tabindex=${bindIf(hasNegativeTabIndex, -1)}\n accept=${bindIf(this.accept, this.accept)}\n @click=${this._handleClick}\n @change=${this._handleChange}\n @cancel=${this._handleCancel}\n @blur=${this._handleBlur}\n />\n `;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'igc-file-input': IgcFileInputComponent;\n }\n}\n"]}
@@ -18,7 +18,7 @@ import { type HighlightNavigation } from './service.js';
18
18
  * @cssproperty --background-active - The background color for the active highlighted text node.
19
19
  *
20
20
  * @example
21
- * Basic usage wrap your text and set the `search-text` attribute:
21
+ * Basic usage - wrap your text and set the `search-text` attribute:
22
22
  * ```html
23
23
  * <igc-highlight search-text="world">
24
24
  * <p>Hello, world! The world is a wonderful place.</p>
@@ -29,7 +29,7 @@ import { type HighlightNavigation } from './service.js';
29
29
  * Case-sensitive search:
30
30
  * ```html
31
31
  * <igc-highlight search-text="Hello" case-sensitive>
32
- * <p>Hello hello HELLO only the first one matches.</p>
32
+ * <p>Hello hello HELLO - only the first one matches.</p>
33
33
  * </igc-highlight>
34
34
  * ```
35
35
  *
@@ -67,8 +67,8 @@ export default class IgcHighlightComponent extends LitElement {
67
67
  static styles: import("lit").CSSResult[];
68
68
  static register(): void;
69
69
  private readonly _service;
70
- private _caseSensitive;
71
- private _searchText;
70
+ /** Shared config for the properties that trigger a new search when changed. */
71
+ private static readonly _search;
72
72
  /**
73
73
  * Whether to match the searched text with case sensitivity in mind.
74
74
  * When `true`, only exact-case occurrences of `searchText` are highlighted.
@@ -76,8 +76,7 @@ export default class IgcHighlightComponent extends LitElement {
76
76
  * @attr case-sensitive
77
77
  * @default false
78
78
  */
79
- set caseSensitive(value: boolean);
80
- get caseSensitive(): boolean;
79
+ caseSensitive: boolean;
81
80
  /**
82
81
  * The string to search and highlight in the DOM content of the component.
83
82
  * Setting this property triggers a new search automatically.
@@ -85,8 +84,7 @@ export default class IgcHighlightComponent extends LitElement {
85
84
  *
86
85
  * @attr search-text
87
86
  */
88
- set searchText(value: string);
89
- get searchText(): string;
87
+ searchText: string;
90
88
  /** The total number of matches found for the current `searchText`. Returns `0` when there are no matches or `searchText` is empty. */
91
89
  get size(): number;
92
90
  /** The zero-based index of the currently active (focused) match. Returns `0` when there are no matches. */
@@ -6,6 +6,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
6
6
  };
7
7
  import { html, LitElement } from 'lit';
8
8
  import { property } from 'lit/decorators.js';
9
+ import { coercedProperty, } from '#internals/decorators/coerced-property.js';
9
10
  import { registerComponent } from '#internals/definitions/register.js';
10
11
  import { addThemingController } from '#theming/theming-controller.js';
11
12
  import { createHighlightController, } from './service.js';
@@ -17,20 +18,9 @@ export default class IgcHighlightComponent extends LitElement {
17
18
  static register() {
18
19
  registerComponent(IgcHighlightComponent);
19
20
  }
20
- set caseSensitive(value) {
21
- this._caseSensitive = value;
22
- this.search();
23
- }
24
- get caseSensitive() {
25
- return this._caseSensitive;
26
- }
27
- set searchText(value) {
28
- this._searchText = value;
29
- this.search();
30
- }
31
- get searchText() {
32
- return this._searchText;
33
- }
21
+ static { this._search = {
22
+ onChange: ({ host }) => host.search(),
23
+ }; }
34
24
  get size() {
35
25
  return this._service.size;
36
26
  }
@@ -40,8 +30,8 @@ export default class IgcHighlightComponent extends LitElement {
40
30
  constructor() {
41
31
  super();
42
32
  this._service = createHighlightController(this);
43
- this._caseSensitive = false;
44
- this._searchText = '';
33
+ this.caseSensitive = false;
34
+ this.searchText = '';
45
35
  addThemingController(this, all, {
46
36
  themeChange: this._addStylesheet,
47
37
  });
@@ -69,9 +59,11 @@ export default class IgcHighlightComponent extends LitElement {
69
59
  }
70
60
  }
71
61
  __decorate([
72
- property({ type: Boolean, reflect: true, attribute: 'case-sensitive' })
73
- ], IgcHighlightComponent.prototype, "caseSensitive", null);
62
+ property({ type: Boolean, reflect: true, attribute: 'case-sensitive' }),
63
+ coercedProperty(IgcHighlightComponent._search)
64
+ ], IgcHighlightComponent.prototype, "caseSensitive", void 0);
74
65
  __decorate([
75
- property({ attribute: 'search-text' })
76
- ], IgcHighlightComponent.prototype, "searchText", null);
66
+ property({ attribute: 'search-text' }),
67
+ coercedProperty(IgcHighlightComponent._search)
68
+ ], IgcHighlightComponent.prototype, "searchText", void 0);
77
69
  //# sourceMappingURL=highlight.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"highlight.js","sourceRoot":"","sources":["../../../src/components/highlight/highlight.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,KAAK,CAAC;AACvC,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC7C,OAAO,EAAE,iBAAiB,EAAE,MAAM,oCAAoC,CAAC;AACvE,OAAO,EAAE,oBAAoB,EAAE,MAAM,gCAAgC,CAAC;AACtE,OAAO,EACL,yBAAyB,GAE1B,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,MAAM,IAAI,MAAM,EAAE,MAAM,yCAAyC,CAAC;AAC3E,OAAO,EAAE,GAAG,EAAE,MAAM,oBAAoB,CAAC;AAgEzC,MAAM,CAAC,OAAO,OAAO,qBAAsB,SAAQ,UAAU;aACpC,YAAO,GAAG,eAAe,AAAlB,CAAmB;aAC1B,WAAM,GAAG,CAA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C,QAAQ,CAAC,SAAS,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC;IAC1C,CAAC;IAQM,MAAM;QACX,IAAI,IAAI,CAAC,UAAU,EAAE,CAAC;YACpB,IAAI,CAAC,QAAQ,CAAC,KAAK,EAAE,CAAC;YACtB,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;QACtC,CAAC;IACH,CAAC;IAIkB,MAAM;QACvB,OAAO,IAAI,CAAA,eAAe,CAAC;IAC7B,CAAC;;AAvGD;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,gBAAgB,EAAE,CAAC;0DAIvE;AAcD;IADC,QAAQ,CAAC,EAAE,SAAS,EAAE,aAAa,EAAE,CAAC;uDAItC","sourcesContent":["import { html, LitElement } from 'lit';\nimport { property } from 'lit/decorators.js';\nimport { registerComponent } from '#internals/definitions/register.js';\nimport { addThemingController } from '#theming/theming-controller.js';\nimport {\n createHighlightController,\n type HighlightNavigation,\n} from './service.js';\nimport { styles as shared } from './themes/shared/highlight.common.css.js';\nimport { all } from './themes/themes.js';\n\n/**\n * The highlight component provides efficient searching and highlighting of text\n * projected into it via its default slot. It uses the native CSS Custom Highlight API\n * to apply highlight styles to matched text nodes without modifying the DOM.\n *\n * The component supports case-sensitive matching, programmatic navigation between\n * matches, and automatic scroll-into-view of the active match.\n *\n * @element igc-highlight\n *\n * @slot - The default slot. Place the text content you want to search and highlight here.\n *\n * @cssproperty --foreground - The text color for a highlighted text node.\n * @cssproperty --background - The background color for a highlighted text node.\n * @cssproperty --foreground-active - The text color for the active highlighted text node.\n * @cssproperty --background-active - The background color for the active highlighted text node.\n *\n * @example\n * Basic usage wrap your text and set the `search-text` attribute:\n * ```html\n * <igc-highlight search-text=\"world\">\n * <p>Hello, world! The world is a wonderful place.</p>\n * </igc-highlight>\n * ```\n *\n * @example\n * Case-sensitive search:\n * ```html\n * <igc-highlight search-text=\"Hello\" case-sensitive>\n * <p>Hello hello HELLO only the first one matches.</p>\n * </igc-highlight>\n * ```\n *\n * @example\n * Navigating between matches programmatically:\n * ```typescript\n * const highlight = document.querySelector('igc-highlight');\n *\n * highlight.searchText = 'world';\n * console.log(highlight.size); // total number of matches\n * console.log(highlight.current); // index of the active match (0-based)\n *\n * highlight.next(); // move to the next match\n * highlight.previous(); // move to the previous match\n * highlight.setActive(2); // jump to a specific match by index\n * ```\n *\n * @example\n * Prevent scroll-into-view when navigating:\n * ```typescript\n * const highlight = document.querySelector('igc-highlight');\n * highlight.next({ preventScroll: true });\n * ```\n *\n * @example\n * Re-run search after dynamic content changes (e.g. lazy-loaded text):\n * ```typescript\n * const highlight = document.querySelector('igc-highlight');\n * // After slotted content has been updated:\n * highlight.search();\n * ```\n */\nexport default class IgcHighlightComponent extends LitElement {\n public static readonly tagName = 'igc-highlight';\n public static override styles = [shared];\n\n /* blazorSuppress */\n public static register(): void {\n registerComponent(IgcHighlightComponent);\n }\n\n //#region Internal properties and state\n\n private readonly _service = createHighlightController(this);\n\n private _caseSensitive = false;\n private _searchText = '';\n\n //#endregion\n\n //#region Public properties and attributes\n\n /**\n * Whether to match the searched text with case sensitivity in mind.\n * When `true`, only exact-case occurrences of `searchText` are highlighted.\n *\n * @attr case-sensitive\n * @default false\n */\n @property({ type: Boolean, reflect: true, attribute: 'case-sensitive' })\n public set caseSensitive(value: boolean) {\n this._caseSensitive = value;\n this.search();\n }\n\n public get caseSensitive(): boolean {\n return this._caseSensitive;\n }\n\n /**\n * The string to search and highlight in the DOM content of the component.\n * Setting this property triggers a new search automatically.\n * An empty string clears all highlights.\n *\n * @attr search-text\n */\n @property({ attribute: 'search-text' })\n public set searchText(value: string) {\n this._searchText = value;\n this.search();\n }\n\n public get searchText(): string {\n return this._searchText;\n }\n\n /** The total number of matches found for the current `searchText`. Returns `0` when there are no matches or `searchText` is empty. */\n public get size(): number {\n return this._service.size;\n }\n\n /** The zero-based index of the currently active (focused) match. Returns `0` when there are no matches. */\n public get current(): number {\n return this._service.current;\n }\n\n //#endregion\n\n constructor() {\n super();\n\n addThemingController(this, all, {\n themeChange: this._addStylesheet,\n });\n }\n\n //#region Internal methods\n\n private _addStylesheet(): void {\n this._service.attachStylesheet();\n }\n\n //#endregion\n\n //#region Public methods\n\n /**\n * Moves the active highlight to the next match.\n * Wraps around to the first match after the last one.\n *\n * @param options - Optional navigation options (e.g. `preventScroll`).\n */\n public next(options?: HighlightNavigation): void {\n this._service.next(options);\n }\n\n /**\n * Moves the active highlight to the previous match.\n * Wraps around to the last match when going back from the first one.\n *\n * @param options - Optional navigation options (e.g. `preventScroll`).\n */\n public previous(options?: HighlightNavigation): void {\n this._service.previous(options);\n }\n\n /**\n * Moves the active highlight to the match at the specified zero-based index.\n *\n * @param index - The zero-based index of the match to activate.\n * @param options - Optional navigation options (e.g. `preventScroll`).\n */\n public setActive(index: number, options?: HighlightNavigation): void {\n this._service.setActive(index, options);\n }\n\n /**\n * Re-runs the highlight search based on the current `searchText` and `caseSensitive` values.\n *\n * Call this method after the slotted content changes dynamically (e.g. after lazy loading\n * or programmatic DOM mutations) to ensure all matches are up to date.\n */\n public search(): void {\n if (this.hasUpdated) {\n this._service.clear();\n this._service.find(this.searchText);\n }\n }\n\n //#endregion\n\n protected override render() {\n return html`<slot></slot>`;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'igc-highlight': IgcHighlightComponent;\n }\n}\n"]}
1
+ {"version":3,"file":"highlight.js","sourceRoot":"","sources":["../../../src/components/highlight/highlight.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,KAAK,CAAC;AACvC,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC7C,OAAO,EACL,eAAe,GAEhB,MAAM,2CAA2C,CAAC;AACnD,OAAO,EAAE,iBAAiB,EAAE,MAAM,oCAAoC,CAAC;AACvE,OAAO,EAAE,oBAAoB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CAAC;IAQM,SAAS,CAAC,KAAa,EAAE,OAA6B;QAC3D,IAAI,CAAC,QAAQ,CAAC,SAAS,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC;IAC1C,CAAC;IAQM,MAAM;QACX,IAAI,IAAI,CAAC,UAAU,EAAE,CAAC;YACpB,IAAI,CAAC,QAAQ,CAAC,KAAK,EAAE,CAAC;YACtB,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;QACtC,CAAC;IACH,CAAC;IAIkB,MAAM;QACvB,OAAO,IAAI,CAAA,eAAe,CAAC;IAC7B,CAAC;;AA1FM;IAFN,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,gBAAgB,EAAE,CAAC;IACvE,eAAe,CAAC,qBAAqB,CAAC,OAAO,CAAC;4DAClB;AAWtB;IAFN,QAAQ,CAAC,EAAE,SAAS,EAAE,aAAa,EAAE,CAAC;IACtC,eAAe,CAAC,qBAAqB,CAAC,OAAO,CAAC;yDACxB","sourcesContent":["import { html, LitElement } from 'lit';\nimport { property } from 'lit/decorators.js';\nimport {\n coercedProperty,\n type CoercedPropertyConfig,\n} from '#internals/decorators/coerced-property.js';\nimport { registerComponent } from '#internals/definitions/register.js';\nimport { addThemingController } from '#theming/theming-controller.js';\nimport {\n createHighlightController,\n type HighlightNavigation,\n} from './service.js';\nimport { styles as shared } from './themes/shared/highlight.common.css.js';\nimport { all } from './themes/themes.js';\n\n/**\n * The highlight component provides efficient searching and highlighting of text\n * projected into it via its default slot. It uses the native CSS Custom Highlight API\n * to apply highlight styles to matched text nodes without modifying the DOM.\n *\n * The component supports case-sensitive matching, programmatic navigation between\n * matches, and automatic scroll-into-view of the active match.\n *\n * @element igc-highlight\n *\n * @slot - The default slot. Place the text content you want to search and highlight here.\n *\n * @cssproperty --foreground - The text color for a highlighted text node.\n * @cssproperty --background - The background color for a highlighted text node.\n * @cssproperty --foreground-active - The text color for the active highlighted text node.\n * @cssproperty --background-active - The background color for the active highlighted text node.\n *\n * @example\n * Basic usage - wrap your text and set the `search-text` attribute:\n * ```html\n * <igc-highlight search-text=\"world\">\n * <p>Hello, world! The world is a wonderful place.</p>\n * </igc-highlight>\n * ```\n *\n * @example\n * Case-sensitive search:\n * ```html\n * <igc-highlight search-text=\"Hello\" case-sensitive>\n * <p>Hello hello HELLO - only the first one matches.</p>\n * </igc-highlight>\n * ```\n *\n * @example\n * Navigating between matches programmatically:\n * ```typescript\n * const highlight = document.querySelector('igc-highlight');\n *\n * highlight.searchText = 'world';\n * console.log(highlight.size); // total number of matches\n * console.log(highlight.current); // index of the active match (0-based)\n *\n * highlight.next(); // move to the next match\n * highlight.previous(); // move to the previous match\n * highlight.setActive(2); // jump to a specific match by index\n * ```\n *\n * @example\n * Prevent scroll-into-view when navigating:\n * ```typescript\n * const highlight = document.querySelector('igc-highlight');\n * highlight.next({ preventScroll: true });\n * ```\n *\n * @example\n * Re-run search after dynamic content changes (e.g. lazy-loaded text):\n * ```typescript\n * const highlight = document.querySelector('igc-highlight');\n * // After slotted content has been updated:\n * highlight.search();\n * ```\n */\nexport default class IgcHighlightComponent extends LitElement {\n public static readonly tagName = 'igc-highlight';\n public static override styles = [shared];\n\n /* blazorSuppress */\n public static register(): void {\n registerComponent(IgcHighlightComponent);\n }\n\n //#region Internal properties and state\n\n private readonly _service = createHighlightController(this);\n\n /** Shared config for the properties that trigger a new search when changed. */\n private static readonly _search: CoercedPropertyConfig<\n unknown,\n IgcHighlightComponent\n > = {\n onChange: ({ host }) => host.search(),\n };\n\n //#endregion\n\n //#region Public properties and attributes\n\n /**\n * Whether to match the searched text with case sensitivity in mind.\n * When `true`, only exact-case occurrences of `searchText` are highlighted.\n *\n * @attr case-sensitive\n * @default false\n */\n @property({ type: Boolean, reflect: true, attribute: 'case-sensitive' })\n @coercedProperty(IgcHighlightComponent._search)\n public caseSensitive = false;\n\n /**\n * The string to search and highlight in the DOM content of the component.\n * Setting this property triggers a new search automatically.\n * An empty string clears all highlights.\n *\n * @attr search-text\n */\n @property({ attribute: 'search-text' })\n @coercedProperty(IgcHighlightComponent._search)\n public searchText = '';\n\n /** The total number of matches found for the current `searchText`. Returns `0` when there are no matches or `searchText` is empty. */\n public get size(): number {\n return this._service.size;\n }\n\n /** The zero-based index of the currently active (focused) match. Returns `0` when there are no matches. */\n public get current(): number {\n return this._service.current;\n }\n\n //#endregion\n\n constructor() {\n super();\n\n addThemingController(this, all, {\n themeChange: this._addStylesheet,\n });\n }\n\n //#region Internal methods\n\n private _addStylesheet(): void {\n this._service.attachStylesheet();\n }\n\n //#endregion\n\n //#region Public methods\n\n /**\n * Moves the active highlight to the next match.\n * Wraps around to the first match after the last one.\n *\n * @param options - Optional navigation options (e.g. `preventScroll`).\n */\n public next(options?: HighlightNavigation): void {\n this._service.next(options);\n }\n\n /**\n * Moves the active highlight to the previous match.\n * Wraps around to the last match when going back from the first one.\n *\n * @param options - Optional navigation options (e.g. `preventScroll`).\n */\n public previous(options?: HighlightNavigation): void {\n this._service.previous(options);\n }\n\n /**\n * Moves the active highlight to the match at the specified zero-based index.\n *\n * @param index - The zero-based index of the match to activate.\n * @param options - Optional navigation options (e.g. `preventScroll`).\n */\n public setActive(index: number, options?: HighlightNavigation): void {\n this._service.setActive(index, options);\n }\n\n /**\n * Re-runs the highlight search based on the current `searchText` and `caseSensitive` values.\n *\n * Call this method after the slotted content changes dynamically (e.g. after lazy loading\n * or programmatic DOM mutations) to ensure all matches are up to date.\n */\n public search(): void {\n if (this.hasUpdated) {\n this._service.clear();\n this._service.find(this.searchText);\n }\n }\n\n //#endregion\n\n protected override render() {\n return html`<slot></slot>`;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'igc-highlight': IgcHighlightComponent;\n }\n}\n"]}
@@ -36,6 +36,7 @@ const ICON_ALIASES = {
36
36
  regenerate: { default: 'reload' },
37
37
  copy_content: { default: 'copy' },
38
38
  collapse: { default: 'keyboard_arrow_up', indigo: 'indigo_chevron_up' },
39
+ eye_dropper: { default: 'colorize' },
39
40
  arrow_prev: {
40
41
  default: 'navigate_before',
41
42
  fluent: 'arrow_upward',
@@ -1 +1 @@
1
- {"version":3,"file":"icon-references.js","sourceRoot":"","sources":["../../../src/components/icon/icon-references.ts"],"names":[],"mappings":"AA6BA,MAAM,QAAQ,GAAG,UAAU,CAAC;AAO5B,MAAM,YAAY,GAA0D;IAC1E,MAAM,EAAE,EAAE,OAAO,EAAE,qBAAqB,EAAE,MAAM,EAAE,qBAAqB,EAAE;IACzE,WAAW,EAAE,EAAE,OAAO,EAAE,aAAa,EAAE,MAAM,EAAE,oBAAoB,EAAE;IACrE,eAAe,EAAE,EAAE,OAAO,EAAE,iBAAiB,EAAE;IAC/C,YAAY,EAAE,EAAE,OAAO,EAAE,gBAAgB,EAAE;IAC3C,YAAY,EAAE,EAAE,OAAO,EAAE,cAAc,EAAE;IACzC,YAAY,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE;IACjC,eAAe,EAAE,EAAE,OAAO,EAAE,OAAO,EAAE;IACrC,eAAe,EAAE,EAAE,OAAO,EAAE,OAAO,EAAE;IACrC,gBAAgB,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE;IACvC,cAAc,EAAE,EAAE,OAAO,EAAE,aAAa,EAAE;IAC1C,kBAAkB,EAAE,EAAE,OAAO,EAAE,gBAAgB,EAAE;IACjD,YAAY,EAAE,EAAE,OAAO,EAAE,cAAc,EAAE;IACzC,QAAQ,EAAE,EAAE,OAAO,EAAE,UAAU,EAAE;IACjC,QAAQ,EAAE,EAAE,OAAO,EAAE,UAAU,EAAE;IACjC,QAAQ,EAAE,EAAE,OAAO,EAAE,UAAU,EAAE;IACjC,QAAQ,EAAE,EAAE,OAAO,EAAE,UAAU,EAAE;IACjC,SAAS,EAAE,EAAE,OAAO,EAAE,WAAW,EAAE;IACnC,OAAO,EAAE,EAAE,OAAO,EAAE,SAAS,EAAE;IAC/B,SAAS,EAA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E,EAAE,OAAO,EAAE,YAAY,EAAE,MAAM,EAAE,mBAAmB,EAAE;IAClE,eAAe,EAAE;QACf,OAAO,EAAE,iBAAiB;QAC1B,MAAM,EAAE,wBAAwB;KACjC;IACD,cAAc,EAAE;QACd,OAAO,EAAE,gBAAgB;QACzB,MAAM,EAAE,uBAAuB;KAChC;IACD,gBAAgB,EAAE;QAChB,OAAO,EAAE,kBAAkB;QAC3B,MAAM,EAAE,yBAAyB;KAClC;IACD,MAAM,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE;CAC9B,CAAC;AAGF,MAAM,CAAC,MAAM,eAAe,GAGxB,IAAI,GAAG,CACT,MAAM,CAAC,OAAO,CAAC,YAAY,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,KAAK,EAAE,OAAO,CAAC,EAAE,EAAE,CAAC;IACrD,KAAK;IACL,IAAI,GAAG,CACJ,MAAM,CAAC,OAAO,CAAC,OAAO,CAA8B,CAAC,GAAG,CACvD,CAAC,CAAC,KAAK,EAAE,IAAI,CAAC,EAAE,EAAE,CAAC,CAAC,KAAK,EAAE,EAAE,IAAI,EAAE,UAAU,EAAE,QAAQ,EAAE,CAAC,CAC3D,CACF;CACF,CAAC,CACH,CAAC","sourcesContent":["/** READ BEFORE YOU MODIFY THIS FILE!\n *\n * Before you add/modify an icon reference, please think about the semantics of the icon you are adding/modifying.\n *\n * Icon aliases have sematic meaning depending on the context in which they are used.\n * For instance, if your component handles toggling between expanded and collapsed states,\n * you may want to use the already existing `expand` and `collapse` aliases that point to\n * the `expand_more` and `expand_less` icons in the material font set.\n *\n * It may so happen, however, that the design of your component requires you to use the `chevron_right` for the\n * expand icon and the `expand_more` for the collapse icon. In this case the `tree_expand` and `tree_collapse` aliases\n * would be appropriate.\n * This distinction is important when choosing which icon to use for your component as it will have an impact\n * when a user decides to rewire the `expand`/`collapse` icons to some other icons.\n *\n * Likewise, modifying existing references should be handled with caution as many component in the framework already\n * share icons that have equivalent semantic meaning. For example, the `Paginator`, `Grid Filtering Row`,\n * and `Tabs` components in Ignite UI for Angular all use the `prev` and `next` icons for navigating between pages\n * or lists of items. Changing the underlying target for those icons should be done in a way that suits all components.\n *\n * Keep in mind that icon aliases and their underlying names are shared between Ignite UI component frameworks\n * and changing an alias name here should be reflected in the other frameworks as well.\n *\n * To get acquainted with which component uses what icon, please make sure to read the\n * [docs](https://infragistics.com/products/ignite-ui-angular/Angular/components/icon-service#internal-usage).\n */\nimport type { IconMeta, IconThemeKey } from './registry/types.js';\n\n/** The collection every built-in alias target lives in. */\nconst INTERNAL = 'internal';\n\n/**\n * Maps an alias in the `default` collection to the name of its target icon in\n * the `internal` collection, per theme. The `default` entry is the fallback for\n * themes without an explicit target.\n */\nconst ICON_ALIASES: Record<string, Partial<Record<IconThemeKey, string>>> = {\n expand: { default: 'keyboard_arrow_down', indigo: 'indigo_chevron_down' },\n attach_file: { default: 'attach_file', indigo: 'indigo_attach_file' },\n attach_document: { default: 'document_filled' },\n attach_image: { default: 'document_image' },\n auto_suggest: { default: 'auto_suggest' },\n send_message: { default: 'send' },\n image_thumbnail: { default: 'image' },\n table_thumbnail: { default: 'table' },\n layout_thumbnail: { default: 'layout' },\n code_thumbnail: { default: 'code_circle' },\n document_thumbnail: { default: 'document_empty' },\n file_generic: { default: 'file_generic' },\n file_css: { default: 'file_css' },\n file_csv: { default: 'file_csv' },\n file_doc: { default: 'file_doc' },\n file_htm: { default: 'file_htm' },\n file_html: { default: 'file_html' },\n file_js: { default: 'file_js' },\n file_json: { default: 'file_json' },\n file_pdf: { default: 'file_pdf' },\n file_rtf: { default: 'file_rtf' },\n file_svg: { default: 'file_svg' },\n file_txt: { default: 'file_txt' },\n file_xls: { default: 'file_xls' },\n file_xml: { default: 'file_xml' },\n file_zip: { default: 'file_zip' },\n file_link: { default: 'file_link' },\n more_horiz: { default: 'more_horiz' },\n open_in_new: { default: 'open_in_new' },\n thumb_up_active: { default: 'thumb_up_filled' },\n thumb_up_inactive: { default: 'thumb_up_empty' },\n thumb_down_active: { default: 'thumb_down_filled' },\n thumb_down_inactive: { default: 'thumb_down_empty' },\n regenerate: { default: 'reload' },\n copy_content: { default: 'copy' },\n collapse: { default: 'keyboard_arrow_up', indigo: 'indigo_chevron_up' },\n arrow_prev: {\n default: 'navigate_before',\n fluent: 'arrow_upward',\n indigo: 'indigo_chevron_left',\n },\n arrow_next: {\n default: 'navigate_next',\n fluent: 'arrow_downward',\n indigo: 'indigo_chevron_right',\n },\n selected: { default: 'chip_select' },\n remove: { default: 'chip_cancel', indigo: 'indigo_cancel' },\n input_clear: { default: 'clear', indigo: 'indigo_clear' },\n input_expand: {\n default: 'keyboard_arrow_down',\n indigo: 'indigo_chevron_down',\n },\n input_collapse: { default: 'keyboard_arrow_up', indigo: 'indigo_chevron_up' },\n chevron_right: {\n default: 'keyboard_arrow_right',\n indigo: 'indigo_chevron_right',\n },\n chevron_left: { default: 'navigate_before', indigo: 'indigo_chevron_left' },\n case_sensitive: { default: 'case_sensitive' },\n today: { default: 'calendar_today', indigo: 'indigo_calendar_today' },\n clock: { default: 'access_time', indigo: 'indigo_access_time' },\n star_filled: { default: 'star' },\n star_outlined: { default: 'star_border' },\n prev: { default: 'navigate_before', indigo: 'indigo_chevron_left' },\n next: { default: 'navigate_next', indigo: 'indigo_chevron_right' },\n tree_expand: {\n default: 'keyboard_arrow_right',\n indigo: 'indigo_chevron_right',\n },\n tree_collapse: {\n default: 'keyboard_arrow_down',\n indigo: 'indigo_chevron_down',\n },\n carousel_prev: {\n default: 'keyboard_arrow_left',\n indigo: 'indigo_chevron_left',\n },\n carousel_next: {\n default: 'keyboard_arrow_right',\n indigo: 'indigo_chevron_right',\n },\n error: { default: 'error', indigo: 'indigo_error' },\n fullscreen: { default: 'fullscreen', indigo: 'indigo_fullscreen' },\n fullscreen_exit: {\n default: 'fullscreen_exit',\n indigo: 'indigo_fullscreen_exit',\n },\n expand_content: {\n default: 'expand_content',\n indigo: 'indigo_expand_content',\n },\n collapse_content: {\n default: 'collapse_content',\n indigo: 'indigo_collapse_content',\n },\n resize: { default: 'resize' },\n};\n\n/** Resolved alias name -> theme -> target icon. */\nexport const ICON_REFERENCES: ReadonlyMap<\n string,\n ReadonlyMap<IconThemeKey, IconMeta>\n> = new Map(\n Object.entries(ICON_ALIASES).map(([alias, targets]) => [\n alias,\n new Map(\n (Object.entries(targets) as [IconThemeKey, string][]).map(\n ([theme, name]) => [theme, { name, collection: INTERNAL }]\n )\n ),\n ])\n);\n"]}
1
+ {"version":3,"file":"icon-references.js","sourceRoot":"","sources":["../../../src/components/icon/icon-references.ts"],"names":[],"mappings":"AA6BA,MAAM,QAAQ,GAAG,UAAU,CAAC;AAO5B,MAAM,YAAY,GAA0D;IAC1E,MAAM,EAAE,EAAE,OAAO,EAAE,qBAAqB,EAAE,MAAM,EAAE,qBAAqB,EAAE;IACzE,WAAW,EAAE,EAAE,OAAO,EAAE,aAAa,EAAE,MAAM,EAAE,oBAAoB,EAAE;IACrE,eAAe,EAAE,EAAE,OAAO,EAAE,iBAAiB,EAAE;IAC/C,YAAY,EAAE,EAAE,OAAO,EAAE,gBAAgB,EAAE;IAC3C,YAAY,EAAE,EAAE,OAAO,EAAE,cAAc,EAAE;IACzC,YAAY,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE;IACjC,eAAe,EAAE,EAAE,OAAO,EAAE,OAAO,EAAE;IACrC,eAAe,EAAE,EAAE,OAAO,EAAE,OAAO,EAAE;IACrC,gBAAgB,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE;IACvC,cAAc,EAAE,EAAE,OAAO,EAAE,aAAa,EAAE;IAC1C,kBAAkB,EAAE,EAAE,OAAO,EAAE,gBAAgB,EAAE;IACjD,YAAY,EAAE,EAAE,OAAO,EAAE,cAAc,EAAE;IACzC,QAAQ,EAAE,EAAE,OAAO,EAAE,UAAU,EAAE;IACjC,QAAQ,EAAE,EAAE,OAAO,EAAE,UAAU,EAAE;IACjC,QAAQ,EAAE,EAAE,OAAO,EAAE,UAAU,EAAE;I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E,qBAAqB;QAC9B,MAAM,EAAE,qBAAqB;KAC9B;IACD,aAAa,EAAE;QACb,OAAO,EAAE,sBAAsB;QAC/B,MAAM,EAAE,sBAAsB;KAC/B;IACD,KAAK,EAAE,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,cAAc,EAAE;IACnD,UAAU,EAAE,EAAE,OAAO,EAAE,YAAY,EAAE,MAAM,EAAE,mBAAmB,EAAE;IAClE,eAAe,EAAE;QACf,OAAO,EAAE,iBAAiB;QAC1B,MAAM,EAAE,wBAAwB;KACjC;IACD,cAAc,EAAE;QACd,OAAO,EAAE,gBAAgB;QACzB,MAAM,EAAE,uBAAuB;KAChC;IACD,gBAAgB,EAAE;QAChB,OAAO,EAAE,kBAAkB;QAC3B,MAAM,EAAE,yBAAyB;KAClC;IACD,MAAM,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE;CAC9B,CAAC;AAGF,MAAM,CAAC,MAAM,eAAe,GAGxB,IAAI,GAAG,CACT,MAAM,CAAC,OAAO,CAAC,YAAY,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,KAAK,EAAE,OAAO,CAAC,EAAE,EAAE,CAAC;IACrD,KAAK;IACL,IAAI,GAAG,CACJ,MAAM,CAAC,OAAO,CAAC,OAAO,CAA8B,CAAC,GAAG,CACvD,CAAC,CAAC,KAAK,EAAE,IAAI,CAAC,EAAE,EAAE,CAAC,CAAC,KAAK,EAAE,EAAE,IAAI,EAAE,UAAU,EAAE,QAAQ,EAAE,CAAC,CAC3D,CACF;CACF,CAAC,CACH,CAAC","sourcesContent":["/** READ BEFORE YOU MODIFY THIS FILE!\n *\n * Before you add/modify an icon reference, please think about the semantics of the icon you are adding/modifying.\n *\n * Icon aliases have sematic meaning depending on the context in which they are used.\n * For instance, if your component handles toggling between expanded and collapsed states,\n * you may want to use the already existing `expand` and `collapse` aliases that point to\n * the `expand_more` and `expand_less` icons in the material font set.\n *\n * It may so happen, however, that the design of your component requires you to use the `chevron_right` for the\n * expand icon and the `expand_more` for the collapse icon. In this case the `tree_expand` and `tree_collapse` aliases\n * would be appropriate.\n * This distinction is important when choosing which icon to use for your component as it will have an impact\n * when a user decides to rewire the `expand`/`collapse` icons to some other icons.\n *\n * Likewise, modifying existing references should be handled with caution as many component in the framework already\n * share icons that have equivalent semantic meaning. For example, the `Paginator`, `Grid Filtering Row`,\n * and `Tabs` components in Ignite UI for Angular all use the `prev` and `next` icons for navigating between pages\n * or lists of items. Changing the underlying target for those icons should be done in a way that suits all components.\n *\n * Keep in mind that icon aliases and their underlying names are shared between Ignite UI component frameworks\n * and changing an alias name here should be reflected in the other frameworks as well.\n *\n * To get acquainted with which component uses what icon, please make sure to read the\n * [docs](https://infragistics.com/products/ignite-ui-angular/Angular/components/icon-service#internal-usage).\n */\nimport type { IconMeta, IconThemeKey } from './registry/types.js';\n\n/** The collection every built-in alias target lives in. */\nconst INTERNAL = 'internal';\n\n/**\n * Maps an alias in the `default` collection to the name of its target icon in\n * the `internal` collection, per theme. The `default` entry is the fallback for\n * themes without an explicit target.\n */\nconst ICON_ALIASES: Record<string, Partial<Record<IconThemeKey, string>>> = {\n expand: { default: 'keyboard_arrow_down', indigo: 'indigo_chevron_down' },\n attach_file: { default: 'attach_file', indigo: 'indigo_attach_file' },\n attach_document: { default: 'document_filled' },\n attach_image: { default: 'document_image' },\n auto_suggest: { default: 'auto_suggest' },\n send_message: { default: 'send' },\n image_thumbnail: { default: 'image' },\n table_thumbnail: { default: 'table' },\n layout_thumbnail: { default: 'layout' },\n code_thumbnail: { default: 'code_circle' },\n document_thumbnail: { default: 'document_empty' },\n file_generic: { default: 'file_generic' },\n file_css: { default: 'file_css' },\n file_csv: { default: 'file_csv' },\n file_doc: { default: 'file_doc' },\n file_htm: { default: 'file_htm' },\n file_html: { default: 'file_html' },\n file_js: { default: 'file_js' },\n file_json: { default: 'file_json' },\n file_pdf: { default: 'file_pdf' },\n file_rtf: { default: 'file_rtf' },\n file_svg: { default: 'file_svg' },\n file_txt: { default: 'file_txt' },\n file_xls: { default: 'file_xls' },\n file_xml: { default: 'file_xml' },\n file_zip: { default: 'file_zip' },\n file_link: { default: 'file_link' },\n more_horiz: { default: 'more_horiz' },\n open_in_new: { default: 'open_in_new' },\n thumb_up_active: { default: 'thumb_up_filled' },\n thumb_up_inactive: { default: 'thumb_up_empty' },\n thumb_down_active: { default: 'thumb_down_filled' },\n thumb_down_inactive: { default: 'thumb_down_empty' },\n regenerate: { default: 'reload' },\n copy_content: { default: 'copy' },\n collapse: { default: 'keyboard_arrow_up', indigo: 'indigo_chevron_up' },\n eye_dropper: { default: 'colorize' },\n arrow_prev: {\n default: 'navigate_before',\n fluent: 'arrow_upward',\n indigo: 'indigo_chevron_left',\n },\n arrow_next: {\n default: 'navigate_next',\n fluent: 'arrow_downward',\n indigo: 'indigo_chevron_right',\n },\n selected: { default: 'chip_select' },\n remove: { default: 'chip_cancel', indigo: 'indigo_cancel' },\n input_clear: { default: 'clear', indigo: 'indigo_clear' },\n input_expand: {\n default: 'keyboard_arrow_down',\n indigo: 'indigo_chevron_down',\n },\n input_collapse: { default: 'keyboard_arrow_up', indigo: 'indigo_chevron_up' },\n chevron_right: {\n default: 'keyboard_arrow_right',\n indigo: 'indigo_chevron_right',\n },\n chevron_left: { default: 'navigate_before', indigo: 'indigo_chevron_left' },\n case_sensitive: { default: 'case_sensitive' },\n today: { default: 'calendar_today', indigo: 'indigo_calendar_today' },\n clock: { default: 'access_time', indigo: 'indigo_access_time' },\n star_filled: { default: 'star' },\n star_outlined: { default: 'star_border' },\n prev: { default: 'navigate_before', indigo: 'indigo_chevron_left' },\n next: { default: 'navigate_next', indigo: 'indigo_chevron_right' },\n tree_expand: {\n default: 'keyboard_arrow_right',\n indigo: 'indigo_chevron_right',\n },\n tree_collapse: {\n default: 'keyboard_arrow_down',\n indigo: 'indigo_chevron_down',\n },\n carousel_prev: {\n default: 'keyboard_arrow_left',\n indigo: 'indigo_chevron_left',\n },\n carousel_next: {\n default: 'keyboard_arrow_right',\n indigo: 'indigo_chevron_right',\n },\n error: { default: 'error', indigo: 'indigo_error' },\n fullscreen: { default: 'fullscreen', indigo: 'indigo_fullscreen' },\n fullscreen_exit: {\n default: 'fullscreen_exit',\n indigo: 'indigo_fullscreen_exit',\n },\n expand_content: {\n default: 'expand_content',\n indigo: 'indigo_expand_content',\n },\n collapse_content: {\n default: 'collapse_content',\n indigo: 'indigo_collapse_content',\n },\n resize: { default: 'resize' },\n};\n\n/** Resolved alias name -> theme -> target icon. */\nexport const ICON_REFERENCES: ReadonlyMap<\n string,\n ReadonlyMap<IconThemeKey, IconMeta>\n> = new Map(\n Object.entries(ICON_ALIASES).map(([alias, targets]) => [\n alias,\n new Map(\n (Object.entries(targets) as [IconThemeKey, string][]).map(\n ([theme, name]) => [theme, { name, collection: INTERNAL }]\n )\n ),\n ])\n);\n"]}
@@ -96,7 +96,7 @@ export default class IgcIconComponent extends LitElement {
96
96
  protected update(props: PropertyValues<this>): void;
97
97
  protected firstUpdated(): void;
98
98
  private _getIcon;
99
- protected render(): import("lit-html").TemplateResult<1> | typeof nothing;
99
+ protected render(): typeof nothing | import("lit-html").TemplateResult<1>;
100
100
  protected registerIcon(name: string, url: string, collection?: string, stripMeta?: boolean): Promise<void>;
101
101
  protected registerIconFromText(name: string, iconText: string, collection?: string, stripMeta?: boolean): void;
102
102
  protected setIconRef(name: string, collection: string, icon: IconMeta): void;
@@ -32,6 +32,9 @@ export const internalIcons = new Map(Object.entries({
32
32
  copy: {
33
33
  svg: `<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 -960 960 960" width="24px"><path d="M360-240q-33 0-56.5-23.5T280-320v-480q0-33 23.5-56.5T360-880h360q33 0 56.5 23.5T800-800v480q0 33-23.5 56.5T720-240H360Zm0-80h360v-480H360v480ZM200-80q-33 0-56.5-23.5T120-160v-560h80v560h440v80H200Zm160-240v-480 480Z"/></svg>`,
34
34
  },
35
+ colorize: {
36
+ svg: `<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 -960 960 960" width="24px" fill="#e3e3e3"><path d="M120-120v-190l358-358-58-56 58-56 76 76 124-124q5-5 12.5-8t15.5-3q8 0 15 3t13 8l94 94q5 6 8 13t3 15q0 8-3 15.5t-8 12.5L705-555l76 78-57 57-56-58-358 358H120Zm80-80h78l332-334-76-76-334 332v78Zm447-410 96-96-37-37-96 96 37 37Zm0 0-37-37 37 37Z"/></svg>`,
37
+ },
35
38
  chip_cancel: {
36
39
  svg: `<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M0 0h24v24H0z" fill="none"/><path d="M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2zm5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12 17 15.59z"/></svg>`,
37
40
  },