igniteui-webcomponents 6.1.2 → 6.3.0-alpha.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 (348) hide show
  1. package/CHANGELOG.md +32 -0
  2. package/LICENSE +1 -1
  3. package/README.md +13 -1
  4. package/components/card/themes/content.js +7 -0
  5. package/components/card/themes/content.js.map +1 -1
  6. package/components/card/themes/shared/content/card.content.indigo.css.d.ts +1 -0
  7. package/components/card/themes/shared/content/card.content.indigo.css.js +3 -0
  8. package/components/card/themes/shared/content/card.content.indigo.css.js.map +1 -0
  9. package/components/carousel/carousel-indicator.d.ts +1 -1
  10. package/components/carousel/carousel-indicator.js.map +1 -1
  11. package/components/carousel/carousel-slide.d.ts +3 -3
  12. package/components/carousel/carousel-slide.js +7 -13
  13. package/components/carousel/carousel-slide.js.map +1 -1
  14. package/components/carousel/carousel.d.ts +39 -38
  15. package/components/carousel/carousel.js +160 -153
  16. package/components/carousel/carousel.js.map +1 -1
  17. package/components/chat/chat-input.d.ts +70 -0
  18. package/components/chat/chat-input.js +266 -0
  19. package/components/chat/chat-input.js.map +1 -0
  20. package/components/chat/chat-message-list.d.ts +111 -0
  21. package/components/chat/chat-message-list.js +178 -0
  22. package/components/chat/chat-message-list.js.map +1 -0
  23. package/components/chat/chat-message.d.ts +57 -0
  24. package/components/chat/chat-message.js +59 -0
  25. package/components/chat/chat-message.js.map +1 -0
  26. package/components/chat/chat-state.d.ts +155 -0
  27. package/components/chat/chat-state.js +167 -0
  28. package/components/chat/chat-state.js.map +1 -0
  29. package/components/chat/chat.d.ts +164 -0
  30. package/components/chat/chat.js +168 -0
  31. package/components/chat/chat.js.map +1 -0
  32. package/components/chat/markdown-util.d.ts +2 -0
  33. package/components/chat/markdown-util.js +22 -0
  34. package/components/chat/markdown-util.js.map +1 -0
  35. package/components/chat/message-attachments.d.ts +45 -0
  36. package/components/chat/message-attachments.js +127 -0
  37. package/components/chat/message-attachments.js.map +1 -0
  38. package/components/chat/themes/chat.base.css.d.ts +1 -0
  39. package/components/chat/themes/chat.base.css.js +3 -0
  40. package/components/chat/themes/chat.base.css.js.map +1 -0
  41. package/components/chat/themes/dark/chat.bootstrap.css.d.ts +1 -0
  42. package/components/chat/themes/dark/chat.bootstrap.css.js +3 -0
  43. package/components/chat/themes/dark/chat.bootstrap.css.js.map +1 -0
  44. package/components/chat/themes/dark/chat.fluent.css.d.ts +1 -0
  45. package/components/chat/themes/dark/chat.fluent.css.js +3 -0
  46. package/components/chat/themes/dark/chat.fluent.css.js.map +1 -0
  47. package/components/chat/themes/dark/chat.indigo.css.d.ts +1 -0
  48. package/components/chat/themes/dark/chat.indigo.css.js +3 -0
  49. package/components/chat/themes/dark/chat.indigo.css.js.map +1 -0
  50. package/components/chat/themes/dark/chat.material.css.d.ts +1 -0
  51. package/components/chat/themes/dark/chat.material.css.js +3 -0
  52. package/components/chat/themes/dark/chat.material.css.js.map +1 -0
  53. package/components/chat/themes/input.base.css.d.ts +1 -0
  54. package/components/chat/themes/input.base.css.js +3 -0
  55. package/components/chat/themes/input.base.css.js.map +1 -0
  56. package/components/chat/themes/input.d.ts +2 -0
  57. package/components/chat/themes/input.js +35 -0
  58. package/components/chat/themes/input.js.map +1 -0
  59. package/components/chat/themes/light/chat.bootstrap.css.d.ts +1 -0
  60. package/components/chat/themes/light/chat.bootstrap.css.js +3 -0
  61. package/components/chat/themes/light/chat.bootstrap.css.js.map +1 -0
  62. package/components/chat/themes/light/chat.fluent.css.d.ts +1 -0
  63. package/components/chat/themes/light/chat.fluent.css.js +3 -0
  64. package/components/chat/themes/light/chat.fluent.css.js.map +1 -0
  65. package/components/chat/themes/light/chat.indigo.css.d.ts +1 -0
  66. package/components/chat/themes/light/chat.indigo.css.js +3 -0
  67. package/components/chat/themes/light/chat.indigo.css.js.map +1 -0
  68. package/components/chat/themes/light/chat.material.css.d.ts +1 -0
  69. package/components/chat/themes/light/chat.material.css.js +3 -0
  70. package/components/chat/themes/light/chat.material.css.js.map +1 -0
  71. package/components/chat/themes/light/chat.shared.css.d.ts +1 -0
  72. package/components/chat/themes/light/chat.shared.css.js +3 -0
  73. package/components/chat/themes/light/chat.shared.css.js.map +1 -0
  74. package/components/chat/themes/message-attachments.base.css.d.ts +1 -0
  75. package/components/chat/themes/message-attachments.base.css.js +3 -0
  76. package/components/chat/themes/message-attachments.base.css.js.map +1 -0
  77. package/components/chat/themes/message-list.base.css.d.ts +1 -0
  78. package/components/chat/themes/message-list.base.css.js +3 -0
  79. package/components/chat/themes/message-list.base.css.js.map +1 -0
  80. package/components/chat/themes/message.base.css.d.ts +1 -0
  81. package/components/chat/themes/message.base.css.js +3 -0
  82. package/components/chat/themes/message.base.css.js.map +1 -0
  83. package/components/chat/themes/shared/chat-message.common.css.d.ts +1 -0
  84. package/components/chat/themes/shared/chat-message.common.css.js +3 -0
  85. package/components/chat/themes/shared/chat-message.common.css.js.map +1 -0
  86. package/components/chat/themes/shared/chat.common.css.d.ts +1 -0
  87. package/components/chat/themes/shared/chat.common.css.js +3 -0
  88. package/components/chat/themes/shared/chat.common.css.js.map +1 -0
  89. package/components/chat/themes/shared/input/input.bootstrap.css.d.ts +1 -0
  90. package/components/chat/themes/shared/input/input.bootstrap.css.js +3 -0
  91. package/components/chat/themes/shared/input/input.bootstrap.css.js.map +1 -0
  92. package/components/chat/themes/shared/input/input.common.css.d.ts +1 -0
  93. package/components/chat/themes/shared/input/input.common.css.js +3 -0
  94. package/components/chat/themes/shared/input/input.common.css.js.map +1 -0
  95. package/components/chat/themes/shared/input/input.fluent.css.d.ts +1 -0
  96. package/components/chat/themes/shared/input/input.fluent.css.js +3 -0
  97. package/components/chat/themes/shared/input/input.fluent.css.js.map +1 -0
  98. package/components/chat/themes/shared/input/input.indigo.css.d.ts +1 -0
  99. package/components/chat/themes/shared/input/input.indigo.css.js +3 -0
  100. package/components/chat/themes/shared/input/input.indigo.css.js.map +1 -0
  101. package/components/chat/themes/shared/input/input.material.css.d.ts +1 -0
  102. package/components/chat/themes/shared/input/input.material.css.js +3 -0
  103. package/components/chat/themes/shared/input/input.material.css.js.map +1 -0
  104. package/components/chat/themes/shared/message-attachments.common.css.d.ts +1 -0
  105. package/components/chat/themes/shared/message-attachments.common.css.js +3 -0
  106. package/components/chat/themes/shared/message-attachments.common.css.js.map +1 -0
  107. package/components/chat/themes/shared/message-list.common.css.d.ts +1 -0
  108. package/components/chat/themes/shared/message-list.common.css.js +3 -0
  109. package/components/chat/themes/shared/message-list.common.css.js.map +1 -0
  110. package/components/chat/themes/themes.d.ts +2 -0
  111. package/components/chat/themes/themes.js +46 -0
  112. package/components/chat/themes/themes.js.map +1 -0
  113. package/components/chat/types.d.ts +190 -0
  114. package/components/chat/types.js +8 -0
  115. package/components/chat/types.js.map +1 -0
  116. package/components/checkbox/checkbox-base.d.ts +3 -5
  117. package/components/checkbox/checkbox-base.js +15 -21
  118. package/components/checkbox/checkbox-base.js.map +1 -1
  119. package/components/checkbox/checkbox.d.ts +3 -4
  120. package/components/checkbox/checkbox.js +18 -17
  121. package/components/checkbox/checkbox.js.map +1 -1
  122. package/components/checkbox/switch.d.ts +0 -1
  123. package/components/checkbox/switch.js +7 -10
  124. package/components/checkbox/switch.js.map +1 -1
  125. package/components/checkbox/themes/dark/checkbox/checkbox.bootstrap.css.js +1 -1
  126. package/components/checkbox/themes/dark/checkbox/checkbox.bootstrap.css.js.map +1 -1
  127. package/components/checkbox/themes/dark/checkbox/checkbox.fluent.css.js +1 -1
  128. package/components/checkbox/themes/dark/checkbox/checkbox.fluent.css.js.map +1 -1
  129. package/components/checkbox/themes/dark/switch/switch.bootstrap.css.js +1 -1
  130. package/components/checkbox/themes/dark/switch/switch.bootstrap.css.js.map +1 -1
  131. package/components/checkbox/themes/dark/switch/switch.fluent.css.js +1 -1
  132. package/components/checkbox/themes/dark/switch/switch.fluent.css.js.map +1 -1
  133. package/components/checkbox/themes/dark/switch/switch.indigo.css.js +1 -1
  134. package/components/checkbox/themes/dark/switch/switch.indigo.css.js.map +1 -1
  135. package/components/checkbox/themes/dark/switch/switch.material.css.js +1 -1
  136. package/components/checkbox/themes/dark/switch/switch.material.css.js.map +1 -1
  137. package/components/checkbox/themes/light/switch/switch.bootstrap.css.js +1 -1
  138. package/components/checkbox/themes/light/switch/switch.bootstrap.css.js.map +1 -1
  139. package/components/checkbox/themes/light/switch/switch.fluent.css.js +1 -1
  140. package/components/checkbox/themes/light/switch/switch.fluent.css.js.map +1 -1
  141. package/components/checkbox/themes/light/switch/switch.indigo.css.js +1 -1
  142. package/components/checkbox/themes/light/switch/switch.indigo.css.js.map +1 -1
  143. package/components/checkbox/themes/light/switch/switch.material.css.js +1 -1
  144. package/components/checkbox/themes/light/switch/switch.material.css.js.map +1 -1
  145. package/components/checkbox/themes/shared/checkbox/checkbox.bootstrap.css.js +1 -1
  146. package/components/checkbox/themes/shared/checkbox/checkbox.bootstrap.css.js.map +1 -1
  147. package/components/checkbox/themes/shared/checkbox/checkbox.common.css.js +1 -1
  148. package/components/checkbox/themes/shared/checkbox/checkbox.common.css.js.map +1 -1
  149. package/components/checkbox/themes/shared/checkbox/checkbox.fluent.css.js +1 -1
  150. package/components/checkbox/themes/shared/checkbox/checkbox.fluent.css.js.map +1 -1
  151. package/components/checkbox/themes/shared/checkbox/checkbox.indigo.css.js +1 -1
  152. package/components/checkbox/themes/shared/checkbox/checkbox.indigo.css.js.map +1 -1
  153. package/components/checkbox/themes/shared/checkbox/checkbox.material.css.js +1 -1
  154. package/components/checkbox/themes/shared/checkbox/checkbox.material.css.js.map +1 -1
  155. package/components/chip/chip.d.ts +11 -11
  156. package/components/chip/chip.js +61 -65
  157. package/components/chip/chip.js.map +1 -1
  158. package/components/combo/combo.d.ts +3 -3
  159. package/components/combo/combo.js +12 -6
  160. package/components/combo/combo.js.map +1 -1
  161. package/components/combo/themes/shared/combo.common.css.js +1 -1
  162. package/components/combo/themes/shared/combo.common.css.js.map +1 -1
  163. package/components/combo/themes/shared/combo.indigo.css.js +1 -1
  164. package/components/combo/themes/shared/combo.indigo.css.js.map +1 -1
  165. package/components/combo/themes/shared/combo.material.css.js +1 -1
  166. package/components/combo/themes/shared/combo.material.css.js.map +1 -1
  167. package/components/common/context.d.ts +5 -1
  168. package/components/common/context.js +2 -1
  169. package/components/common/context.js.map +1 -1
  170. package/components/common/controllers/internals.d.ts +66 -2
  171. package/components/common/controllers/internals.js +21 -0
  172. package/components/common/controllers/internals.js.map +1 -1
  173. package/components/common/controllers/slot.d.ts +87 -0
  174. package/components/common/controllers/slot.js +75 -0
  175. package/components/common/controllers/slot.js.map +1 -0
  176. package/components/common/definitions/defineAllComponents.js +2 -0
  177. package/components/common/definitions/defineAllComponents.js.map +1 -1
  178. package/components/common/mixins/forms/associated.d.ts +1 -1
  179. package/components/common/mixins/forms/associated.js +91 -36
  180. package/components/common/mixins/forms/associated.js.map +1 -1
  181. package/components/common/mixins/forms/form-transformers.d.ts +21 -0
  182. package/components/common/mixins/forms/form-transformers.js +64 -0
  183. package/components/common/mixins/forms/form-transformers.js.map +1 -0
  184. package/components/common/mixins/forms/form-value.d.ts +7 -36
  185. package/components/common/mixins/forms/form-value.js +2 -64
  186. package/components/common/mixins/forms/form-value.js.map +1 -1
  187. package/components/common/mixins/forms/types.d.ts +19 -10
  188. package/components/common/mixins/forms/types.js +2 -1
  189. package/components/common/mixins/forms/types.js.map +1 -1
  190. package/components/common/util.d.ts +1 -0
  191. package/components/common/util.js +3 -0
  192. package/components/common/util.js.map +1 -1
  193. package/components/date-picker/date-picker.d.ts +1 -3
  194. package/components/date-picker/date-picker.js +11 -13
  195. package/components/date-picker/date-picker.js.map +1 -1
  196. package/components/date-picker/themes/dark/date-picker.indigo.css.js +1 -1
  197. package/components/date-picker/themes/dark/date-picker.indigo.css.js.map +1 -1
  198. package/components/date-picker/themes/shared/date-picker.bootstrap.css.js +1 -1
  199. package/components/date-picker/themes/shared/date-picker.bootstrap.css.js.map +1 -1
  200. package/components/date-picker/themes/shared/date-picker.common.css.js +1 -1
  201. package/components/date-picker/themes/shared/date-picker.common.css.js.map +1 -1
  202. package/components/date-picker/themes/shared/date-picker.fluent.css.js +1 -1
  203. package/components/date-picker/themes/shared/date-picker.fluent.css.js.map +1 -1
  204. package/components/date-picker/themes/shared/date-picker.indigo.css.js +1 -1
  205. package/components/date-picker/themes/shared/date-picker.indigo.css.js.map +1 -1
  206. package/components/date-picker/themes/shared/date-picker.material.css.js +1 -1
  207. package/components/date-picker/themes/shared/date-picker.material.css.js.map +1 -1
  208. package/components/date-range-picker/date-range-picker.d.ts +1 -3
  209. package/components/date-range-picker/date-range-picker.js +19 -26
  210. package/components/date-range-picker/date-range-picker.js.map +1 -1
  211. package/components/date-range-picker/themes/dark/date-range-picker.indigo.css.js +1 -1
  212. package/components/date-range-picker/themes/dark/date-range-picker.indigo.css.js.map +1 -1
  213. package/components/date-range-picker/themes/shared/date-range-picker.bootstrap.css.js +1 -1
  214. package/components/date-range-picker/themes/shared/date-range-picker.bootstrap.css.js.map +1 -1
  215. package/components/date-range-picker/themes/shared/date-range-picker.common.css.js +1 -1
  216. package/components/date-range-picker/themes/shared/date-range-picker.common.css.js.map +1 -1
  217. package/components/date-range-picker/themes/shared/date-range-picker.fluent.css.js +1 -1
  218. package/components/date-range-picker/themes/shared/date-range-picker.fluent.css.js.map +1 -1
  219. package/components/date-range-picker/themes/shared/date-range-picker.indigo.css.js +1 -1
  220. package/components/date-range-picker/themes/shared/date-range-picker.indigo.css.js.map +1 -1
  221. package/components/date-range-picker/themes/shared/date-range-picker.material.css.js +1 -1
  222. package/components/date-range-picker/themes/shared/date-range-picker.material.css.js.map +1 -1
  223. package/components/date-time-input/date-time-input.d.ts +1 -2
  224. package/components/date-time-input/date-time-input.js +7 -7
  225. package/components/date-time-input/date-time-input.js.map +1 -1
  226. package/components/dialog/dialog.d.ts +23 -25
  227. package/components/dialog/dialog.js +108 -115
  228. package/components/dialog/dialog.js.map +1 -1
  229. package/components/dialog/themes/dark/dialog.bootstrap.css.js +1 -1
  230. package/components/dialog/themes/dark/dialog.bootstrap.css.js.map +1 -1
  231. package/components/expansion-panel/expansion-panel.d.ts +12 -14
  232. package/components/expansion-panel/expansion-panel.js +43 -56
  233. package/components/expansion-panel/expansion-panel.js.map +1 -1
  234. package/components/file-input/file-input.d.ts +1 -3
  235. package/components/file-input/file-input.js +6 -11
  236. package/components/file-input/file-input.js.map +1 -1
  237. package/components/file-input/themes/shared/file-input.bootstrap.css.js +1 -1
  238. package/components/file-input/themes/shared/file-input.bootstrap.css.js.map +1 -1
  239. package/components/file-input/themes/shared/file-input.material.css.js +1 -1
  240. package/components/file-input/themes/shared/file-input.material.css.js.map +1 -1
  241. package/components/input/input.d.ts +1 -4
  242. package/components/input/input.js +7 -12
  243. package/components/input/input.js.map +1 -1
  244. package/components/input/themes/shared/input.bootstrap.css.js +1 -1
  245. package/components/input/themes/shared/input.bootstrap.css.js.map +1 -1
  246. package/components/input/themes/shared/input.common.css.js +1 -1
  247. package/components/input/themes/shared/input.common.css.js.map +1 -1
  248. package/components/input/themes/shared/input.fluent.css.js +1 -1
  249. package/components/input/themes/shared/input.fluent.css.js.map +1 -1
  250. package/components/input/themes/shared/input.indigo.css.js +1 -1
  251. package/components/input/themes/shared/input.indigo.css.js.map +1 -1
  252. package/components/input/themes/shared/input.material.css.js +1 -1
  253. package/components/input/themes/shared/input.material.css.js.map +1 -1
  254. package/components/mask-input/mask-input-base.js +1 -0
  255. package/components/mask-input/mask-input-base.js.map +1 -1
  256. package/components/mask-input/mask-input.d.ts +2 -3
  257. package/components/mask-input/mask-input.js +5 -8
  258. package/components/mask-input/mask-input.js.map +1 -1
  259. package/components/nav-drawer/nav-drawer-item.d.ts +3 -4
  260. package/components/nav-drawer/nav-drawer-item.js +15 -18
  261. package/components/nav-drawer/nav-drawer-item.js.map +1 -1
  262. package/components/nav-drawer/nav-drawer.d.ts +1 -2
  263. package/components/nav-drawer/nav-drawer.js +9 -11
  264. package/components/nav-drawer/nav-drawer.js.map +1 -1
  265. package/components/nav-drawer/themes/container.base.css.js +1 -1
  266. package/components/nav-drawer/themes/container.base.css.js.map +1 -1
  267. package/components/nav-drawer/themes/shared/container/nav-drawer.common.css.js +1 -1
  268. package/components/nav-drawer/themes/shared/container/nav-drawer.common.css.js.map +1 -1
  269. package/components/popover/popover.d.ts +17 -16
  270. package/components/popover/popover.js +81 -91
  271. package/components/popover/popover.js.map +1 -1
  272. package/components/progress/base.d.ts +8 -8
  273. package/components/progress/base.js +19 -23
  274. package/components/progress/base.js.map +1 -1
  275. package/components/progress/circular-gradient.js.map +1 -1
  276. package/components/progress/circular-progress.d.ts +3 -4
  277. package/components/progress/circular-progress.js +15 -18
  278. package/components/progress/circular-progress.js.map +1 -1
  279. package/components/progress/linear-progress.d.ts +1 -0
  280. package/components/progress/linear-progress.js +5 -1
  281. package/components/progress/linear-progress.js.map +1 -1
  282. package/components/radio/radio.d.ts +3 -5
  283. package/components/radio/radio.js +33 -31
  284. package/components/radio/radio.js.map +1 -1
  285. package/components/radio/themes/dark/radio.fluent.css.js +1 -1
  286. package/components/radio/themes/dark/radio.fluent.css.js.map +1 -1
  287. package/components/radio/themes/shared/radio.bootstrap.css.js +1 -1
  288. package/components/radio/themes/shared/radio.bootstrap.css.js.map +1 -1
  289. package/components/radio/themes/shared/radio.common.css.js +1 -1
  290. package/components/radio/themes/shared/radio.common.css.js.map +1 -1
  291. package/components/radio/themes/shared/radio.fluent.css.js +1 -1
  292. package/components/radio/themes/shared/radio.fluent.css.js.map +1 -1
  293. package/components/radio/themes/shared/radio.indigo.css.js +1 -1
  294. package/components/radio/themes/shared/radio.indigo.css.js.map +1 -1
  295. package/components/radio/themes/shared/radio.material.css.js +1 -1
  296. package/components/radio/themes/shared/radio.material.css.js.map +1 -1
  297. package/components/radio-group/radio-group.d.ts +4 -4
  298. package/components/radio-group/radio-group.js +24 -21
  299. package/components/radio-group/radio-group.js.map +1 -1
  300. package/components/rating/rating.d.ts +1 -2
  301. package/components/rating/rating.js +4 -3
  302. package/components/rating/rating.js.map +1 -1
  303. package/components/select/select.d.ts +35 -38
  304. package/components/select/select.js +138 -146
  305. package/components/select/select.js.map +1 -1
  306. package/components/select/themes/shared/select.bootstrap.css.js +1 -1
  307. package/components/select/themes/shared/select.bootstrap.css.js.map +1 -1
  308. package/components/select/themes/shared/select.common.css.js +1 -1
  309. package/components/select/themes/shared/select.common.css.js.map +1 -1
  310. package/components/select/themes/shared/select.fluent.css.js +1 -1
  311. package/components/select/themes/shared/select.fluent.css.js.map +1 -1
  312. package/components/select/themes/shared/select.indigo.css.js +1 -1
  313. package/components/select/themes/shared/select.indigo.css.js.map +1 -1
  314. package/components/select/themes/shared/select.material.css.js +1 -1
  315. package/components/select/themes/shared/select.material.css.js.map +1 -1
  316. package/components/slider/slider-label.js.map +1 -1
  317. package/components/slider/slider.d.ts +1 -2
  318. package/components/slider/slider.js +5 -2
  319. package/components/slider/slider.js.map +1 -1
  320. package/components/textarea/textarea.d.ts +13 -20
  321. package/components/textarea/textarea.js +66 -90
  322. package/components/textarea/textarea.js.map +1 -1
  323. package/components/textarea/themes/shared/textarea.bootstrap.css.js +1 -1
  324. package/components/textarea/themes/shared/textarea.bootstrap.css.js.map +1 -1
  325. package/components/textarea/themes/shared/textarea.common.css.js +1 -1
  326. package/components/textarea/themes/shared/textarea.common.css.js.map +1 -1
  327. package/components/textarea/themes/shared/textarea.fluent.css.js +1 -1
  328. package/components/textarea/themes/shared/textarea.fluent.css.js.map +1 -1
  329. package/components/textarea/themes/shared/textarea.indigo.css.js +1 -1
  330. package/components/textarea/themes/shared/textarea.indigo.css.js.map +1 -1
  331. package/components/textarea/themes/shared/textarea.material.css.js +1 -1
  332. package/components/textarea/themes/shared/textarea.material.css.js.map +1 -1
  333. package/components/tile-manager/position.js +2 -1
  334. package/components/tile-manager/position.js.map +1 -1
  335. package/components/tile-manager/tile.d.ts +8 -12
  336. package/components/tile-manager/tile.js +16 -37
  337. package/components/tile-manager/tile.js.map +1 -1
  338. package/components/validation-container/validation-container.d.ts +2 -1
  339. package/components/validation-container/validation-container.js +19 -14
  340. package/components/validation-container/validation-container.js.map +1 -1
  341. package/custom-elements.json +38469 -33868
  342. package/igniteui-webcomponents.css-data.json +1 -1
  343. package/igniteui-webcomponents.html-data.json +1 -1
  344. package/index.d.ts +3 -0
  345. package/index.js +1 -0
  346. package/index.js.map +1 -1
  347. package/package.json +1 -1
  348. package/web-types.json +2 -2
@@ -0,0 +1 @@
1
+ {"version":3,"file":"themes.js","sourceRoot":"","sources":["../../../../src/components/chat/themes/themes.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAI1B,OAAO,EAAE,MAAM,IAAI,aAAa,EAAE,MAAM,8BAA8B,CAAC;AACvE,OAAO,EAAE,MAAM,IAAI,UAAU,EAAE,MAAM,2BAA2B,CAAC;AACjE,OAAO,EAAE,MAAM,IAAI,UAAU,EAAE,MAAM,2BAA2B,CAAC;AACjE,OAAO,EAAE,MAAM,IAAI,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAErE,OAAO,EAAE,MAAM,IAAI,cAAc,EAAE,MAAM,+BAA+B,CAAC;AACzE,OAAO,EAAE,MAAM,IAAI,WAAW,EAAE,MAAM,4BAA4B,CAAC;AACnE,OAAO,EAAE,MAAM,IAAI,WAAW,EAAE,MAAM,4BAA4B,CAAC;AACnE,OAAO,EAAE,MAAM,IAAI,aAAa,EAAE,MAAM,8BAA8B,CAAC;AACvE,OAAO,EAAE,MAAM,IAAI,MAAM,EAAE,MAAM,4BAA4B,CAAC;AAE9D,MAAM,KAAK,GAAG;IACZ,MAAM,EAAE,GAAG,CAAA;MACP,MAAM;GACT;IACD,SAAS,EAAE,GAAG,CAAA;MACV,cAAc;GACjB;IACD,QAAQ,EAAE,GAAG,CAAA;MACT,aAAa;GAChB;IACD,MAAM,EAAE,GAAG,CAAA;MACP,WAAW;GACd;IACD,MAAM,EAAE,GAAG,CAAA;MACP,WAAW;GACd;CACF,CAAC;AAEF,MAAM,IAAI,GAAG;IACX,MAAM,EAAE,GAAG,CAAA;MACP,MAAM;GACT;IACD,SAAS,EAAE,GAAG,CAAA;MACV,aAAa;GAChB;IACD,QAAQ,EAAE,GAAG,CAAA;MACT,YAAY;GACf;IACD,MAAM,EAAE,GAAG,CAAA;MACP,UAAU;GACb;IACD,MAAM,EAAE,GAAG,CAAA;MACP,UAAU;GACb;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,GAAG,GAAW,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC","sourcesContent":["import { css } from 'lit';\n\nimport type { Themes } from '../../../theming/types.js';\n// Dark Overrides\nimport { styles as bootstrapDark } from './dark/chat.bootstrap.css.js';\nimport { styles as fluentDark } from './dark/chat.fluent.css.js';\nimport { styles as indigoDark } from './dark/chat.indigo.css.js';\nimport { styles as materialDark } from './dark/chat.material.css.js';\n// Light Overrides\nimport { styles as bootstrapLight } from './light/chat.bootstrap.css.js';\nimport { styles as fluentLight } from './light/chat.fluent.css.js';\nimport { styles as indigoLight } from './light/chat.indigo.css.js';\nimport { styles as materialLight } from './light/chat.material.css.js';\nimport { styles as shared } from './light/chat.shared.css.js';\n\nconst light = {\n shared: css`\n ${shared}\n `,\n bootstrap: css`\n ${bootstrapLight}\n `,\n material: css`\n ${materialLight}\n `,\n fluent: css`\n ${fluentLight}\n `,\n indigo: css`\n ${indigoLight}\n `,\n};\n\nconst dark = {\n shared: css`\n ${shared}\n `,\n bootstrap: css`\n ${bootstrapDark}\n `,\n material: css`\n ${materialDark}\n `,\n fluent: css`\n ${fluentDark}\n `,\n indigo: css`\n ${indigoDark}\n `,\n};\n\nexport const all: Themes = { light, dark };\n"]}
@@ -0,0 +1,190 @@
1
+ import type { TemplateResult } from 'lit';
2
+ /**
3
+ * Represents a single chat message in the conversation.
4
+ */
5
+ export interface IgcMessage {
6
+ /**
7
+ * A unique identifier for the message.
8
+ */
9
+ id: string;
10
+ /**
11
+ * The textual content of the message.
12
+ */
13
+ text: string;
14
+ /**
15
+ * The identifier or name of the sender of the message.
16
+ */
17
+ sender: string;
18
+ /**
19
+ * The timestamp indicating when the message was sent.
20
+ */
21
+ timestamp: Date;
22
+ /**
23
+ * Optional list of attachments associated with the message,
24
+ * such as images, files, or links.
25
+ */
26
+ attachments?: IgcMessageAttachment[];
27
+ }
28
+ /**
29
+ * Represents an attachment associated with a chat message.
30
+ */
31
+ export interface IgcMessageAttachment {
32
+ /**
33
+ * A unique identifier for the attachment.
34
+ */
35
+ id: string;
36
+ /**
37
+ * The display name of the attachment (e.g. file name).
38
+ */
39
+ name: string;
40
+ /**
41
+ * The URL from which the attachment can be downloaded or viewed.
42
+ * Typically used for attachments stored on a server or CDN.
43
+ */
44
+ url?: string;
45
+ /**
46
+ * The actual File object, if the attachment was provided locally (e.g. via upload).
47
+ */
48
+ file?: File;
49
+ /**
50
+ * The MIME type or a custom type identifier for the attachment (e.g. "image/png", "pdf", "audio").
51
+ */
52
+ type?: string;
53
+ /**
54
+ * Optional URL to a thumbnail preview of the attachment (e.g. for images or videos).
55
+ */
56
+ thumbnail?: string;
57
+ }
58
+ /**
59
+ * A function type used to render a group of attachments in a chat message.
60
+ *
61
+ * This allows consumers to customize how message attachments are displayed
62
+ * (e.g. rendering thumbnails, file icons, or download links).
63
+ *
64
+ * @param {IgcMessageAttachment[]} attachments - The list of attachments to render.
65
+ * @returns {unknown} A custom rendered representation of the attachments.
66
+ */
67
+ export type AttachmentTemplate = (attachments: IgcMessageAttachment[]) => unknown;
68
+ /**
69
+ * A function type used to render a single chat message.
70
+ *
71
+ * This allows consumers to fully customize the display of a message,
72
+ * including its text, sender info, timestamp, and any attachments.
73
+ *
74
+ * @param {IgcMessage} message - The chat message to render.
75
+ * @returns {unknown} A custom rendered representation of the message.
76
+ */
77
+ export type MessageTemplate = (message: IgcMessage) => unknown;
78
+ /**
79
+ * Configuration options for customizing the behavior and appearance of the chat component.
80
+ */
81
+ export type IgcChatOptions = {
82
+ /**
83
+ * The ID of the current user. Used to differentiate between incoming and outgoing messages.
84
+ */
85
+ currentUserId?: string;
86
+ /**
87
+ * If `true`, prevents the chat from automatically scrolling to the latest message.
88
+ */
89
+ disableAutoScroll?: boolean;
90
+ /**
91
+ * If `true`, disables the ability to upload and send attachments.
92
+ * Defaults to `false`.
93
+ */
94
+ disableAttachments?: boolean;
95
+ /**
96
+ * Indicates whether the other user is currently typing or composing a message.
97
+ */
98
+ isComposing?: boolean;
99
+ /**
100
+ * The accepted files that could be attached.
101
+ * Defines the file types as a list of comma-separated values (e.g. "image/*,.pdf") that the file input should accept.
102
+ */
103
+ acceptedFiles?: string;
104
+ /**
105
+ * Optional header text to display at the top of the chat component.
106
+ */
107
+ headerText?: string;
108
+ /**
109
+ * Optional placeholder text for the chat input area.
110
+ * Provides a hint to the user about what they can type (e.g. "Type a message...").
111
+ */
112
+ inputPlaceholder?: string;
113
+ /**
114
+ * Suggested text snippets or quick replies that can be shown as user-selectable options.
115
+ */
116
+ suggestions?: string[];
117
+ /**
118
+ * Controls the position of the chat suggestions within the component layout.
119
+ *
120
+ * - `"below-input"`: Renders suggestions below the chat input area.
121
+ * - `"below-messages"`: Renders suggestions below the chat messages area.
122
+ *
123
+ * Default is `"below-messages"`.
124
+ */
125
+ suggestionsPosition?: 'below-input' | 'below-messages';
126
+ /**
127
+ * A set of template override functions used to customize rendering of messages, attachments, etc.
128
+ */
129
+ templates?: IgcChatTemplates;
130
+ markdownRenderer?: (text: string) => TemplateResult;
131
+ };
132
+ /**
133
+ * A collection of template functions used to customize different parts of the chat component.
134
+ * Each template allows you to override the rendering of a specific part of the component.
135
+ */
136
+ export type IgcChatTemplates = {
137
+ /**
138
+ * Template for rendering an attachment in a message.
139
+ */
140
+ attachmentTemplate?: MessageTemplate;
141
+ /**
142
+ * Template for rendering a custom header above the attachment in a message.
143
+ */
144
+ attachmentHeaderTemplate?: MessageTemplate;
145
+ /**
146
+ * Template for rendering custom action buttons or controls related to an attachment
147
+ * (e.g. download, preview, delete).
148
+ */
149
+ attachmentActionsTemplate?: MessageTemplate;
150
+ /**
151
+ * Template for rendering the main content of an attachment, such as a thumbnail or file preview.
152
+ */
153
+ attachmentContentTemplate?: MessageTemplate;
154
+ /**
155
+ * Template for rendering a single chat message.
156
+ * Use this to customize message layout, formatting, or metadata.
157
+ */
158
+ messageTemplate?: MessageTemplate;
159
+ /**
160
+ * Template for rendering message-specific actions such as edit, delete, reply, etc.
161
+ */
162
+ messageActionsTemplate?: MessageTemplate;
163
+ /**
164
+ * Template used to show an indicator when the other user is typing (e.g. “User is typing...”).
165
+ */
166
+ composingIndicatorTemplate?: unknown;
167
+ /**
168
+ * Template for customizing the text input element (usually a `<textarea>` or `<input>`).
169
+ *
170
+ * @param text - The current value of the text input.
171
+ * @returns {unknown} A custom rendered representation of the text input.
172
+ */
173
+ textInputTemplate?: (text: string) => unknown;
174
+ /**
175
+ * Template for rendering additional controls in the message input area,
176
+ * such as send buttons, emoji pickers, or voice recorders.
177
+ */
178
+ textAreaActionsTemplate?: unknown;
179
+ /**
180
+ * Template for rendering attachments that are currently queued for sending (in the input area).
181
+ */
182
+ textAreaAttachmentsTemplate?: AttachmentTemplate;
183
+ };
184
+ export declare const attachmentIcon = "<svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24px\" viewBox=\"0 -960 960 960\" width=\"24px\" fill=\"#e3e3e3\"><path d=\"M720-330q0 104-73 177T470-80q-104 0-177-73t-73-177v-370q0-75 52.5-127.5T400-880q75 0 127.5 52.5T580-700v350q0 46-32 78t-78 32q-46 0-78-32t-32-78v-370h80v370q0 13 8.5 21.5T470-320q13 0 21.5-8.5T500-350v-350q-1-42-29.5-71T400-800q-42 0-71 29t-29 71v370q-1 71 49 120.5T470-160q70 0 119-49.5T640-330v-390h80v390Z\"/></svg>";
185
+ export declare const sendButtonIcon = "<svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24px\" viewBox=\"0 -960 960 960\" width=\"24px\" fill=\"#e3e3e3\"><path d=\"M120-160v-640l760 320-760 320Zm80-120 474-200-474-200v140l240 60-240 60v140Zm0 0v-400 400Z\"/></svg>";
186
+ export declare const closeIcon = "<svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24px\" viewBox=\"0 -960 960 960\" width=\"24px\" fill=\"#e3e3e3\"><path d=\"m256-200-56-56 224-224-224-224 56-56 224 224 224-224 56 56-224 224 224 224-56 56-224-224-224 224Z\"/></svg>";
187
+ export declare const fileIcon = "<svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24px\" viewBox=\"0 -960 960 960\" width=\"24px\" fill=\"#e3e3e3\"><path d=\"M240-80q-33 0-56.5-23.5T160-160v-640q0-33 23.5-56.5T240-880h320l240 240v480q0 33-23.5 56.5T720-80H240Zm280-520v-200H240v640h480v-440H520ZM240-800v200-200 640-640Z\"/></svg>";
188
+ export declare const imageIcon = "<svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24px\" viewBox=\"0 -960 960 960\" width=\"24px\" fill=\"#e3e3e3\"><path d=\"M200-120q-33 0-56.5-23.5T120-200v-560q0-33 23.5-56.5T200-840h560q33 0 56.5 23.5T840-760v560q0 33-23.5 56.5T760-120H200Zm0-80h560v-560H200v560Zm40-80h480L570-480 450-320l-90-120-120 160Zm-40 80v-560 560Z\"/></svg>";
189
+ export declare const moreIcon = "<svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24px\" viewBox=\"0 -960 960 960\" width=\"24px\" fill=\"#e3e3e3\"><path d=\"M240-400q-33 0-56.5-23.5T160-480q0-33 23.5-56.5T240-560q33 0 56.5 23.5T320-480q0 33-23.5 56.5T240-400Zm240 0q-33 0-56.5-23.5T400-480q0-33 23.5-56.5T480-560q33 0 56.5 23.5T560-480q0 33-23.5 56.5T480-400Zm240 0q-33 0-56.5-23.5T640-480q0-33 23.5-56.5T720-560q33 0 56.5 23.5T800-480q0 33-23.5 56.5T720-400Z\"/></svg>";
190
+ export declare const previewIcon = "<svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24px\" viewBox=\"0 -960 960 960\" width=\"24px\" fill=\"#e3e3e3\"><path d=\"M200-120q-33 0-56.5-23.5T120-200v-560q0-33 23.5-56.5T200-840h280v80H200v560h560v-280h80v280q0 33-23.5 56.5T760-120H200Zm188-212-56-56 372-372H560v-80h280v280h-80v-144L388-332Z\"/></svg>";
@@ -0,0 +1,8 @@
1
+ export const attachmentIcon = '<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 -960 960 960" width="24px" fill="#e3e3e3"><path d="M720-330q0 104-73 177T470-80q-104 0-177-73t-73-177v-370q0-75 52.5-127.5T400-880q75 0 127.5 52.5T580-700v350q0 46-32 78t-78 32q-46 0-78-32t-32-78v-370h80v370q0 13 8.5 21.5T470-320q13 0 21.5-8.5T500-350v-350q-1-42-29.5-71T400-800q-42 0-71 29t-29 71v370q-1 71 49 120.5T470-160q70 0 119-49.5T640-330v-390h80v390Z"/></svg>';
2
+ export const sendButtonIcon = '<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 -960 960 960" width="24px" fill="#e3e3e3"><path d="M120-160v-640l760 320-760 320Zm80-120 474-200-474-200v140l240 60-240 60v140Zm0 0v-400 400Z"/></svg>';
3
+ export const closeIcon = '<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 -960 960 960" width="24px" fill="#e3e3e3"><path d="m256-200-56-56 224-224-224-224 56-56 224 224 224-224 56 56-224 224 224 224-56 56-224-224-224 224Z"/></svg>';
4
+ export const fileIcon = '<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 -960 960 960" width="24px" fill="#e3e3e3"><path d="M240-80q-33 0-56.5-23.5T160-160v-640q0-33 23.5-56.5T240-880h320l240 240v480q0 33-23.5 56.5T720-80H240Zm280-520v-200H240v640h480v-440H520ZM240-800v200-200 640-640Z"/></svg>';
5
+ export const imageIcon = '<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 -960 960 960" width="24px" fill="#e3e3e3"><path d="M200-120q-33 0-56.5-23.5T120-200v-560q0-33 23.5-56.5T200-840h560q33 0 56.5 23.5T840-760v560q0 33-23.5 56.5T760-120H200Zm0-80h560v-560H200v560Zm40-80h480L570-480 450-320l-90-120-120 160Zm-40 80v-560 560Z"/></svg>';
6
+ export const moreIcon = '<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 -960 960 960" width="24px" fill="#e3e3e3"><path d="M240-400q-33 0-56.5-23.5T160-480q0-33 23.5-56.5T240-560q33 0 56.5 23.5T320-480q0 33-23.5 56.5T240-400Zm240 0q-33 0-56.5-23.5T400-480q0-33 23.5-56.5T480-560q33 0 56.5 23.5T560-480q0 33-23.5 56.5T480-400Zm240 0q-33 0-56.5-23.5T640-480q0-33 23.5-56.5T720-560q33 0 56.5 23.5T800-480q0 33-23.5 56.5T720-400Z"/></svg>';
7
+ export const previewIcon = '<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 -960 960 960" width="24px" fill="#e3e3e3"><path d="M200-120q-33 0-56.5-23.5T120-200v-560q0-33 23.5-56.5T200-840h280v80H200v560h560v-280h80v280q0 33-23.5 56.5T760-120H200Zm188-212-56-56 372-372H560v-80h280v280h-80v-144L388-332Z"/></svg>';
8
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/components/chat/types.ts"],"names":[],"mappings":"AAqNA,MAAM,CAAC,MAAM,cAAc,GACzB,mbAAmb,CAAC;AACtb,MAAM,CAAC,MAAM,cAAc,GACzB,yNAAyN,CAAC;AAC5N,MAAM,CAAC,MAAM,SAAS,GACpB,gOAAgO,CAAC;AACnO,MAAM,CAAC,MAAM,QAAQ,GACnB,iSAAiS,CAAC;AACpS,MAAM,CAAC,MAAM,SAAS,GACpB,yUAAyU,CAAC;AAC5U,MAAM,CAAC,MAAM,QAAQ,GACnB,6aAA6a,CAAC;AAChb,MAAM,CAAC,MAAM,WAAW,GACtB,8SAA8S,CAAC","sourcesContent":["import type { TemplateResult } from 'lit';\n\n/**\n * Represents a single chat message in the conversation.\n */\nexport interface IgcMessage {\n /**\n * A unique identifier for the message.\n */\n id: string;\n\n /**\n * The textual content of the message.\n */\n text: string;\n\n /**\n * The identifier or name of the sender of the message.\n */\n sender: string;\n\n /**\n * The timestamp indicating when the message was sent.\n */\n timestamp: Date;\n\n /**\n * Optional list of attachments associated with the message,\n * such as images, files, or links.\n */\n attachments?: IgcMessageAttachment[];\n}\n\n/**\n * Represents an attachment associated with a chat message.\n */\nexport interface IgcMessageAttachment {\n /**\n * A unique identifier for the attachment.\n */\n id: string;\n\n /**\n * The display name of the attachment (e.g. file name).\n */\n name: string;\n\n /**\n * The URL from which the attachment can be downloaded or viewed.\n * Typically used for attachments stored on a server or CDN.\n */\n url?: string;\n\n /**\n * The actual File object, if the attachment was provided locally (e.g. via upload).\n */\n file?: File;\n\n /**\n * The MIME type or a custom type identifier for the attachment (e.g. \"image/png\", \"pdf\", \"audio\").\n */\n type?: string;\n\n /**\n * Optional URL to a thumbnail preview of the attachment (e.g. for images or videos).\n */\n thumbnail?: string;\n}\n\n/**\n * A function type used to render a group of attachments in a chat message.\n *\n * This allows consumers to customize how message attachments are displayed\n * (e.g. rendering thumbnails, file icons, or download links).\n *\n * @param {IgcMessageAttachment[]} attachments - The list of attachments to render.\n * @returns {unknown} A custom rendered representation of the attachments.\n */\nexport type AttachmentTemplate = (\n attachments: IgcMessageAttachment[]\n) => unknown;\n\n/**\n * A function type used to render a single chat message.\n *\n * This allows consumers to fully customize the display of a message,\n * including its text, sender info, timestamp, and any attachments.\n *\n * @param {IgcMessage} message - The chat message to render.\n * @returns {unknown} A custom rendered representation of the message.\n */\nexport type MessageTemplate = (message: IgcMessage) => unknown;\n\n// export type MarkdownRenderer = (text: string) => TemplateResult;\n\n/**\n * Configuration options for customizing the behavior and appearance of the chat component.\n */\nexport type IgcChatOptions = {\n /**\n * The ID of the current user. Used to differentiate between incoming and outgoing messages.\n */\n currentUserId?: string;\n /**\n * If `true`, prevents the chat from automatically scrolling to the latest message.\n */\n disableAutoScroll?: boolean;\n /**\n * If `true`, disables the ability to upload and send attachments.\n * Defaults to `false`.\n */\n disableAttachments?: boolean;\n /**\n * Indicates whether the other user is currently typing or composing a message.\n */\n isComposing?: boolean;\n /**\n * The accepted files that could be attached.\n * Defines the file types as a list of comma-separated values (e.g. \"image/*,.pdf\") that the file input should accept.\n */\n acceptedFiles?: string;\n /**\n * Optional header text to display at the top of the chat component.\n */\n headerText?: string;\n /**\n * Optional placeholder text for the chat input area.\n * Provides a hint to the user about what they can type (e.g. \"Type a message...\").\n */\n inputPlaceholder?: string;\n /**\n * Suggested text snippets or quick replies that can be shown as user-selectable options.\n */\n suggestions?: string[];\n /**\n * Controls the position of the chat suggestions within the component layout.\n *\n * - `\"below-input\"`: Renders suggestions below the chat input area.\n * - `\"below-messages\"`: Renders suggestions below the chat messages area.\n *\n * Default is `\"below-messages\"`.\n */\n suggestionsPosition?: 'below-input' | 'below-messages';\n\n /**\n * A set of template override functions used to customize rendering of messages, attachments, etc.\n */\n templates?: IgcChatTemplates;\n markdownRenderer?: (text: string) => TemplateResult; //TODO: Remove when highlighter is implemented\n};\n\n/**\n * A collection of template functions used to customize different parts of the chat component.\n * Each template allows you to override the rendering of a specific part of the component.\n */\nexport type IgcChatTemplates = {\n /**\n * Template for rendering an attachment in a message.\n */\n attachmentTemplate?: MessageTemplate;\n\n /**\n * Template for rendering a custom header above the attachment in a message.\n */\n attachmentHeaderTemplate?: MessageTemplate;\n\n /**\n * Template for rendering custom action buttons or controls related to an attachment\n * (e.g. download, preview, delete).\n */\n attachmentActionsTemplate?: MessageTemplate;\n\n /**\n * Template for rendering the main content of an attachment, such as a thumbnail or file preview.\n */\n attachmentContentTemplate?: MessageTemplate;\n\n /**\n * Template for rendering a single chat message.\n * Use this to customize message layout, formatting, or metadata.\n */\n messageTemplate?: MessageTemplate;\n\n /**\n * Template for rendering message-specific actions such as edit, delete, reply, etc.\n */\n messageActionsTemplate?: MessageTemplate;\n\n /**\n * Template used to show an indicator when the other user is typing (e.g. “User is typing...”).\n */\n composingIndicatorTemplate?: unknown;\n\n /**\n * Template for customizing the text input element (usually a `<textarea>` or `<input>`).\n *\n * @param text - The current value of the text input.\n * @returns {unknown} A custom rendered representation of the text input.\n */\n textInputTemplate?: (text: string) => unknown;\n\n /**\n * Template for rendering additional controls in the message input area,\n * such as send buttons, emoji pickers, or voice recorders.\n */\n textAreaActionsTemplate?: unknown;\n\n /**\n * Template for rendering attachments that are currently queued for sending (in the input area).\n */\n textAreaAttachmentsTemplate?: AttachmentTemplate;\n};\n\nexport const attachmentIcon =\n '<svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24px\" viewBox=\"0 -960 960 960\" width=\"24px\" fill=\"#e3e3e3\"><path d=\"M720-330q0 104-73 177T470-80q-104 0-177-73t-73-177v-370q0-75 52.5-127.5T400-880q75 0 127.5 52.5T580-700v350q0 46-32 78t-78 32q-46 0-78-32t-32-78v-370h80v370q0 13 8.5 21.5T470-320q13 0 21.5-8.5T500-350v-350q-1-42-29.5-71T400-800q-42 0-71 29t-29 71v370q-1 71 49 120.5T470-160q70 0 119-49.5T640-330v-390h80v390Z\"/></svg>';\nexport const sendButtonIcon =\n '<svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24px\" viewBox=\"0 -960 960 960\" width=\"24px\" fill=\"#e3e3e3\"><path d=\"M120-160v-640l760 320-760 320Zm80-120 474-200-474-200v140l240 60-240 60v140Zm0 0v-400 400Z\"/></svg>';\nexport const closeIcon =\n '<svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24px\" viewBox=\"0 -960 960 960\" width=\"24px\" fill=\"#e3e3e3\"><path d=\"m256-200-56-56 224-224-224-224 56-56 224 224 224-224 56 56-224 224 224 224-56 56-224-224-224 224Z\"/></svg>';\nexport const fileIcon =\n '<svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24px\" viewBox=\"0 -960 960 960\" width=\"24px\" fill=\"#e3e3e3\"><path d=\"M240-80q-33 0-56.5-23.5T160-160v-640q0-33 23.5-56.5T240-880h320l240 240v480q0 33-23.5 56.5T720-80H240Zm280-520v-200H240v640h480v-440H520ZM240-800v200-200 640-640Z\"/></svg>';\nexport const imageIcon =\n '<svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24px\" viewBox=\"0 -960 960 960\" width=\"24px\" fill=\"#e3e3e3\"><path d=\"M200-120q-33 0-56.5-23.5T120-200v-560q0-33 23.5-56.5T200-840h560q33 0 56.5 23.5T840-760v560q0 33-23.5 56.5T760-120H200Zm0-80h560v-560H200v560Zm40-80h480L570-480 450-320l-90-120-120 160Zm-40 80v-560 560Z\"/></svg>';\nexport const moreIcon =\n '<svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24px\" viewBox=\"0 -960 960 960\" width=\"24px\" fill=\"#e3e3e3\"><path d=\"M240-400q-33 0-56.5-23.5T160-480q0-33 23.5-56.5T240-560q33 0 56.5 23.5T320-480q0 33-23.5 56.5T240-400Zm240 0q-33 0-56.5-23.5T400-480q0-33 23.5-56.5T480-560q33 0 56.5 23.5T560-480q0 33-23.5 56.5T480-400Zm240 0q-33 0-56.5-23.5T640-480q0-33 23.5-56.5T720-560q33 0 56.5 23.5T800-480q0 33-23.5 56.5T720-400Z\"/></svg>';\nexport const previewIcon =\n '<svg xmlns=\"http://www.w3.org/2000/svg\" height=\"24px\" viewBox=\"0 -960 960 960\" width=\"24px\" fill=\"#e3e3e3\"><path d=\"M200-120q-33 0-56.5-23.5T120-200v-560q0-33 23.5-56.5T200-840h280v80H200v560h560v-280h80v280q0 33-23.5 56.5T760-120H200Zm188-212-56-56 372-372H560v-80h280v280h-80v-144L388-332Z\"/></svg>';\n"]}
@@ -1,6 +1,5 @@
1
1
  import { LitElement } from 'lit';
2
2
  import type { Constructor } from '../common/mixins/constructor.js';
3
- import { type FormValueOf } from '../common/mixins/forms/form-value.js';
4
3
  import type { ToggleLabelPosition } from '../types.js';
5
4
  export interface IgcCheckboxChangeEventArgs {
6
5
  checked: boolean;
@@ -14,11 +13,11 @@ export interface IgcCheckboxComponentEventMap {
14
13
  declare const IgcCheckboxBaseComponent_base: Constructor<import("../common/mixins/forms/types.js").FormRequiredInterface & import("../common/mixins/forms/types.js").FormAssociatedCheckboxElementInterface> & Constructor<import("../common/mixins/event-emitter.js").EventEmitterInterface<IgcCheckboxComponentEventMap>> & Constructor<LitElement>;
15
14
  export declare class IgcCheckboxBaseComponent extends IgcCheckboxBaseComponent_base {
16
15
  protected get __validators(): import("../common/validators.js").Validator<IgcCheckboxBaseComponent>[];
16
+ protected readonly _slots: import("../common/controllers/slot.js").SlotController<"invalid" | "[default]" | "helper-text" | "value-missing" | "custom-error">;
17
17
  protected readonly _focusRingManager: import("../common/controllers/focus-ring.js").KeyboardFocusRingController;
18
- protected readonly _formValue: FormValueOf<boolean>;
18
+ protected readonly _formValue: import("../common/mixins/forms/form-value.js").FormValue<boolean>;
19
19
  protected _value: string;
20
20
  protected readonly _input: HTMLInputElement;
21
- protected readonly _label: Array<Node>;
22
21
  protected _hideLabel: boolean;
23
22
  /**
24
23
  * The value attribute of the control.
@@ -37,14 +36,13 @@ export declare class IgcCheckboxBaseComponent extends IgcCheckboxBaseComponent_b
37
36
  * @attr label-position
38
37
  */
39
38
  labelPosition: ToggleLabelPosition;
40
- protected createRenderRoot(): HTMLElement | DocumentFragment;
41
39
  /** Simulates a click on the control. */
42
40
  click(): void;
43
41
  /** Sets focus on the control. */
44
42
  focus(options?: FocusOptions): void;
45
43
  /** Removes focus from the control. */
46
44
  blur(): void;
45
+ protected _handleSlotChange(): void;
47
46
  protected _handleClick(event: PointerEvent): void;
48
- protected _handleFocus(): void;
49
47
  }
50
48
  export {};
@@ -5,23 +5,28 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
5
5
  return c > 3 && r && Object.defineProperty(target, key, r), r;
6
6
  };
7
7
  import { LitElement } from 'lit';
8
- import { property, query, queryAssignedNodes, state } from 'lit/decorators.js';
8
+ import { property, query, state } from 'lit/decorators.js';
9
9
  import { addKeyboardFocusRing } from '../common/controllers/focus-ring.js';
10
+ import { addSlotController, setSlots } from '../common/controllers/slot.js';
10
11
  import { blazorDeepImport } from '../common/decorators/blazorDeepImport.js';
11
12
  import { EventEmitterMixin } from '../common/mixins/event-emitter.js';
12
13
  import { FormAssociatedCheckboxRequiredMixin } from '../common/mixins/forms/associated-required.js';
13
- import { createFormValueState, defaultBooleanTransformers, } from '../common/mixins/forms/form-value.js';
14
- import { isEmpty } from '../common/util.js';
14
+ import { FormValueBooleanTransformers } from '../common/mixins/forms/form-transformers.js';
15
+ import { createFormValueState } from '../common/mixins/forms/form-value.js';
15
16
  import { checkBoxValidators } from './validators.js';
16
17
  let IgcCheckboxBaseComponent = class IgcCheckboxBaseComponent extends FormAssociatedCheckboxRequiredMixin(EventEmitterMixin(LitElement)) {
17
18
  constructor() {
18
19
  super(...arguments);
20
+ this._slots = addSlotController(this, {
21
+ slots: setSlots('helper-text', 'value-missing', 'custom-error', 'invalid'),
22
+ onChange: this._handleSlotChange,
23
+ });
19
24
  this._focusRingManager = addKeyboardFocusRing(this);
20
25
  this._formValue = createFormValueState(this, {
21
26
  initialValue: false,
22
- transformers: defaultBooleanTransformers,
27
+ transformers: FormValueBooleanTransformers,
23
28
  });
24
- this._hideLabel = false;
29
+ this._hideLabel = true;
25
30
  this.labelPosition = 'after';
26
31
  }
27
32
  get __validators() {
@@ -30,7 +35,7 @@ let IgcCheckboxBaseComponent = class IgcCheckboxBaseComponent extends FormAssoci
30
35
  set value(value) {
31
36
  this._value = value;
32
37
  if (this.checked) {
33
- this._setFormValue(this._value || 'on');
38
+ this._formValue.setValueAndFormState(this.checked);
34
39
  }
35
40
  }
36
41
  get value() {
@@ -38,19 +43,10 @@ let IgcCheckboxBaseComponent = class IgcCheckboxBaseComponent extends FormAssoci
38
43
  }
39
44
  set checked(value) {
40
45
  this._formValue.setValueAndFormState(value);
41
- this._validate();
42
46
  }
43
47
  get checked() {
44
48
  return this._formValue.value;
45
49
  }
46
- createRenderRoot() {
47
- const root = super.createRenderRoot();
48
- this._hideLabel = isEmpty(this._label);
49
- root.addEventListener('slotchange', () => {
50
- this._hideLabel = isEmpty(this._label);
51
- });
52
- return root;
53
- }
54
50
  click() {
55
51
  this._input.click();
56
52
  }
@@ -60,23 +56,21 @@ let IgcCheckboxBaseComponent = class IgcCheckboxBaseComponent extends FormAssoci
60
56
  blur() {
61
57
  this._input.blur();
62
58
  }
59
+ _handleSlotChange() {
60
+ this._hideLabel = !this._slots.hasAssignedNodes('[default]');
61
+ }
63
62
  _handleClick(event) {
64
63
  event.stopPropagation();
64
+ this._setTouchedState();
65
65
  this.checked = !this.checked;
66
66
  this.emitEvent('igcChange', {
67
67
  detail: { checked: this.checked, value: this.value },
68
68
  });
69
69
  }
70
- _handleFocus() {
71
- this._dirty = true;
72
- }
73
70
  };
74
71
  __decorate([
75
72
  query('input', true)
76
73
  ], IgcCheckboxBaseComponent.prototype, "_input", void 0);
77
- __decorate([
78
- queryAssignedNodes({ flatten: true })
79
- ], IgcCheckboxBaseComponent.prototype, "_label", void 0);
80
74
  __decorate([
81
75
  state()
82
76
  ], IgcCheckboxBaseComponent.prototype, "_hideLabel", void 0);
@@ -1 +1 @@
1
- {"version":3,"file":"checkbox-base.js","sourceRoot":"","sources":["../../../src/components/checkbox/checkbox-base.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,KAAK,CAAC;AACjC,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,kBAAkB,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAE/E,OAAO,EAAE,oBAAoB,EAAE,MAAM,qCAAqC,CAAC;AAC3E,OAAO,EAAE,gBAAgB,EAAE,MAAM,0CAA0C,CAAC;AAE5E,OAAO,EAAE,iBAAiB,EAAE,MAAM,mCAAmC,CAAC;AACtE,OAAO,EAAE,mCAAmC,EAAE,MAAM,+CAA+C,CAAC;AACpG,OAAO,EACL,oBAAoB,EACpB,0BAA0B,GAE3B,MAAM,sCAAsC,CAAC;AAC9C,OAAO,EAAE,OAA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IAAI,CAAC,MAAM,CAAC,CAAC;QACzC,CAAC,CAAC,CAAC;QAEH,OAAO,IAAI,CAAC;IACd,CAAC;IAGe,KAAK;QACnB,IAAI,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC;IACtB,CAAC;IAIe,KAAK,CAAC,OAAsB;QAC1C,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;IAC7B,CAAC;IAIe,IAAI;QAClB,IAAI,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC;IACrB,CAAC;IAES,YAAY,CAAC,KAAmB;QACxC,KAAK,CAAC,eAAe,EAAE,CAAC;QAExB,IAAI,CAAC,OAAO,GAAG,CAAC,IAAI,CAAC,OAAO,CAAC;QAC7B,IAAI,CAAC,SAAS,CAAC,WAAW,EAAE;YAC1B,MAAM,EAAE,EAAE,OAAO,EAAE,IAAI,CAAC,OAAO,EAAE,KAAK,EAAE,IAAI,CAAC,KAAK,EAAE;SACrD,CAAC,CAAC;IACL,CAAC;IAES,YAAY;QACpB,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC;IACrB,CAAC;CACF,CAAA;AAtFoB;IADlB,KAAK,CAAC,OAAO,EAAE,IAAI,CAAC;wDACwB;AAG1B;IADlB,kBAAkB,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;wDACE;AAG9B;IADT,KAAK,EAAE;4DACqB;AAO7B;IADC,QAAQ,EAAE;qDAMV;AAYD;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;uDAI3B;AAWM;IADN,QAAQ,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,gBAAgB,EAAE,CAAC;+DACL;AA9DzC,wBAAwB;IADpC,gBAAgB;GACJ,wBAAwB,CAwGpC","sourcesContent":["import { LitElement } from 'lit';\nimport { property, query, queryAssignedNodes, state } from 'lit/decorators.js';\n\nimport { addKeyboardFocusRing } from '../common/controllers/focus-ring.js';\nimport { blazorDeepImport } from '../common/decorators/blazorDeepImport.js';\nimport type { Constructor } from '../common/mixins/constructor.js';\nimport { EventEmitterMixin } from '../common/mixins/event-emitter.js';\nimport { FormAssociatedCheckboxRequiredMixin } from '../common/mixins/forms/associated-required.js';\nimport {\n createFormValueState,\n defaultBooleanTransformers,\n type FormValueOf,\n} from '../common/mixins/forms/form-value.js';\nimport { isEmpty } from '../common/util.js';\nimport type { ToggleLabelPosition } from '../types.js';\nimport { checkBoxValidators } from './validators.js';\n\nexport interface IgcCheckboxChangeEventArgs {\n checked: boolean;\n value?: string;\n}\n\nexport interface IgcCheckboxComponentEventMap {\n igcChange: CustomEvent<IgcCheckboxChangeEventArgs>;\n // For analyzer meta only:\n /* skipWCPrefix */\n focus: FocusEvent;\n /* skipWCPrefix */\n blur: FocusEvent;\n}\n\n@blazorDeepImport\nexport class IgcCheckboxBaseComponent extends FormAssociatedCheckboxRequiredMixin(\n EventEmitterMixin<IgcCheckboxComponentEventMap, Constructor<LitElement>>(\n LitElement\n )\n) {\n protected override get __validators() {\n return checkBoxValidators;\n }\n\n protected readonly _focusRingManager = addKeyboardFocusRing(this);\n protected override readonly _formValue: FormValueOf<boolean> =\n createFormValueState(this, {\n initialValue: false,\n transformers: defaultBooleanTransformers,\n });\n protected _value!: string;\n\n @query('input', true)\n protected readonly _input!: HTMLInputElement;\n\n @queryAssignedNodes({ flatten: true })\n protected readonly _label!: Array<Node>;\n\n @state()\n protected _hideLabel = false;\n\n /**\n * The value attribute of the control.\n * @attr\n */\n @property()\n public set value(value: string) {\n this._value = value;\n if (this.checked) {\n this._setFormValue(this._value || 'on');\n }\n }\n\n public get value(): string {\n return this._value;\n }\n\n /* @tsTwoWayProperty(true, \"igcChange\", \"detail.checked\", false) */\n /**\n * The checked state of the control.\n * @attr\n */\n @property({ type: Boolean })\n public set checked(value: boolean) {\n this._formValue.setValueAndFormState(value);\n this._validate();\n }\n\n public get checked(): boolean {\n return this._formValue.value;\n }\n\n /**\n * The label position of the control.\n * @attr label-position\n */\n @property({ reflect: true, attribute: 'label-position' })\n public labelPosition: ToggleLabelPosition = 'after';\n\n protected override createRenderRoot(): HTMLElement | DocumentFragment {\n const root = super.createRenderRoot();\n this._hideLabel = isEmpty(this._label);\n\n root.addEventListener('slotchange', () => {\n this._hideLabel = isEmpty(this._label);\n });\n\n return root;\n }\n\n /** Simulates a click on the control. */\n public override click(): void {\n this._input.click();\n }\n\n /* alternateName: focusComponent */\n /** Sets focus on the control. */\n public override focus(options?: FocusOptions): void {\n this._input.focus(options);\n }\n\n /* alternateName: blurComponent */\n /** Removes focus from the control. */\n public override blur(): void {\n this._input.blur();\n }\n\n protected _handleClick(event: PointerEvent): void {\n event.stopPropagation();\n\n this.checked = !this.checked;\n this.emitEvent('igcChange', {\n detail: { checked: this.checked, value: this.value },\n });\n }\n\n protected _handleFocus(): void {\n this._dirty = true;\n }\n}\n"]}
1
+ {"version":3,"file":"checkbox-base.js","sourceRoot":"","sources":["../../../src/components/checkbox/checkbox-base.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,KAAK,CAAC;AACjC,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAC3D,OAAO,EAAE,oBAAoB,EAAE,MAAM,qCAAqC,CAAC;AAC3E,OAAO,EAAE,iBAAiB,EAAE,QAAQ,EAAE,MAAM,+BAA+B,CAAC;AAC5E,OAAO,EAAE,gBAAgB,EAAE,MAAM,0CAA0C,CAAC;AAE5E,OAAO,EAAE,iBAAiB,EAAE,MAAM,mCAAmC,CAAC;AACtE,OAAO,EAAE,mCAAmC,EAAE,MAAM,+CAA+C,CAAC;AACpG,OAAO,EAAE,4BAA4B,EAAE,MAAM,6CAA6C,CAAC;AAC3F,OAAO,EAAE,oBAAoB,EAAE,MAAM,sCAAsC,CAAC;AAE5E,OAAO,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AAiB9C,IAAM,wBAAwB,GAA9B,MAA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AAC,IAAI,EAAE,CAAC;IACrB,CAAC;IAES,iBAAiB;QACzB,IAAI,CAAC,UAAU,GAAG,CAAC,IAAI,CAAC,MAAM,CAAC,gBAAgB,CAAC,WAAW,CAAC,CAAC;IAC/D,CAAC;IAES,YAAY,CAAC,KAAmB;QACxC,KAAK,CAAC,eAAe,EAAE,CAAC;QAExB,IAAI,CAAC,gBAAgB,EAAE,CAAC;QACxB,IAAI,CAAC,OAAO,GAAG,CAAC,IAAI,CAAC,OAAO,CAAC;QAC7B,IAAI,CAAC,SAAS,CAAC,WAAW,EAAE;YAC1B,MAAM,EAAE,EAAE,OAAO,EAAE,IAAI,CAAC,OAAO,EAAE,KAAK,EAAE,IAAI,CAAC,KAAK,EAAE;SACrD,CAAC,CAAC;IACL,CAAC;CACF,CAAA;AAxEoB;IADlB,KAAK,CAAC,OAAO,EAAE,IAAI,CAAC;wDACwB;AAGnC;IADT,KAAK,EAAE;4DACoB;AAO5B;IADC,QAAQ,EAAE;qDAMV;AAYD;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;uDAG3B;AAWM;IADN,QAAQ,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,gBAAgB,EAAE,CAAC;+DACL;AA9DzC,wBAAwB;IADpC,gBAAgB;GACJ,wBAAwB,CA8FpC","sourcesContent":["import { LitElement } from 'lit';\nimport { property, query, state } from 'lit/decorators.js';\nimport { addKeyboardFocusRing } from '../common/controllers/focus-ring.js';\nimport { addSlotController, setSlots } from '../common/controllers/slot.js';\nimport { blazorDeepImport } from '../common/decorators/blazorDeepImport.js';\nimport type { Constructor } from '../common/mixins/constructor.js';\nimport { EventEmitterMixin } from '../common/mixins/event-emitter.js';\nimport { FormAssociatedCheckboxRequiredMixin } from '../common/mixins/forms/associated-required.js';\nimport { FormValueBooleanTransformers } from '../common/mixins/forms/form-transformers.js';\nimport { createFormValueState } from '../common/mixins/forms/form-value.js';\nimport type { ToggleLabelPosition } from '../types.js';\nimport { checkBoxValidators } from './validators.js';\n\nexport interface IgcCheckboxChangeEventArgs {\n checked: boolean;\n value?: string;\n}\n\nexport interface IgcCheckboxComponentEventMap {\n igcChange: CustomEvent<IgcCheckboxChangeEventArgs>;\n // For analyzer meta only:\n /* skipWCPrefix */\n focus: FocusEvent;\n /* skipWCPrefix */\n blur: FocusEvent;\n}\n\n@blazorDeepImport\nexport class IgcCheckboxBaseComponent extends FormAssociatedCheckboxRequiredMixin(\n EventEmitterMixin<IgcCheckboxComponentEventMap, Constructor<LitElement>>(\n LitElement\n )\n) {\n protected override get __validators() {\n return checkBoxValidators;\n }\n\n protected readonly _slots = addSlotController(this, {\n slots: setSlots('helper-text', 'value-missing', 'custom-error', 'invalid'),\n onChange: this._handleSlotChange,\n });\n\n protected readonly _focusRingManager = addKeyboardFocusRing(this);\n protected override readonly _formValue = createFormValueState(this, {\n initialValue: false,\n transformers: FormValueBooleanTransformers,\n });\n protected _value!: string;\n\n @query('input', true)\n protected readonly _input!: HTMLInputElement;\n\n @state()\n protected _hideLabel = true;\n\n /**\n * The value attribute of the control.\n * @attr\n */\n @property()\n public set value(value: string) {\n this._value = value;\n if (this.checked) {\n this._formValue.setValueAndFormState(this.checked);\n }\n }\n\n public get value(): string {\n return this._value;\n }\n\n /* @tsTwoWayProperty(true, \"igcChange\", \"detail.checked\", false) */\n /**\n * The checked state of the control.\n * @attr\n */\n @property({ type: Boolean })\n public set checked(value: boolean) {\n this._formValue.setValueAndFormState(value);\n }\n\n public get checked(): boolean {\n return this._formValue.value;\n }\n\n /**\n * The label position of the control.\n * @attr label-position\n */\n @property({ reflect: true, attribute: 'label-position' })\n public labelPosition: ToggleLabelPosition = 'after';\n\n /** Simulates a click on the control. */\n public override click(): void {\n this._input.click();\n }\n\n /* alternateName: focusComponent */\n /** Sets focus on the control. */\n public override focus(options?: FocusOptions): void {\n this._input.focus(options);\n }\n\n /* alternateName: blurComponent */\n /** Removes focus from the control. */\n public override blur(): void {\n this._input.blur();\n }\n\n protected _handleSlotChange(): void {\n this._hideLabel = !this._slots.hasAssignedNodes('[default]');\n }\n\n protected _handleClick(event: PointerEvent): void {\n event.stopPropagation();\n\n this._setTouchedState();\n this.checked = !this.checked;\n this.emitEvent('igcChange', {\n detail: { checked: this.checked, value: this.value },\n });\n }\n}\n"]}
@@ -22,7 +22,6 @@ export default class IgcCheckboxComponent extends IgcCheckboxBaseComponent {
22
22
  static readonly tagName = "igc-checkbox";
23
23
  protected static styles: import("lit").CSSResult[];
24
24
  static register(): void;
25
- private static readonly increment;
26
25
  private readonly _themes;
27
26
  private readonly _inputId;
28
27
  private readonly _labelId;
@@ -32,9 +31,9 @@ export default class IgcCheckboxComponent extends IgcCheckboxBaseComponent {
32
31
  */
33
32
  indeterminate: boolean;
34
33
  protected _handleClick(event: PointerEvent): void;
35
- protected renderValidatorContainer(): TemplateResult;
36
- protected renderStandard(): TemplateResult<1>;
37
- protected renderIndigo(): TemplateResult<1>;
34
+ protected _renderValidatorContainer(): TemplateResult;
35
+ protected _renderStandard(): TemplateResult<1>;
36
+ protected _renderIndigo(): TemplateResult<1>;
38
37
  protected render(): TemplateResult<1>;
39
38
  }
40
39
  declare global {
@@ -4,24 +4,24 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
4
4
  else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
5
5
  return c > 3 && r && Object.defineProperty(target, key, r), r;
6
6
  };
7
- import { html } from 'lit';
7
+ import { html, nothing } from 'lit';
8
8
  import { property } from 'lit/decorators.js';
9
9
  import { ifDefined } from 'lit/directives/if-defined.js';
10
10
  import { live } from 'lit/directives/live.js';
11
11
  import { addThemingController } from '../../theming/theming-controller.js';
12
12
  import { registerComponent } from '../common/definitions/register.js';
13
13
  import { partMap } from '../common/part-map.js';
14
- import { createCounter } from '../common/util.js';
15
14
  import IgcValidationContainerComponent from '../validation-container/validation-container.js';
16
15
  import { IgcCheckboxBaseComponent } from './checkbox-base.js';
17
16
  import { styles } from './themes/checkbox.base.css.js';
18
17
  import { all } from './themes/checkbox-themes.js';
19
18
  import { styles as shared } from './themes/shared/checkbox/checkbox.common.css.js';
19
+ let nextId = 1;
20
20
  class IgcCheckboxComponent extends IgcCheckboxBaseComponent {
21
21
  constructor() {
22
22
  super(...arguments);
23
23
  this._themes = addThemingController(this, all);
24
- this._inputId = `checkbox-${IgcCheckboxComponent.increment()}`;
24
+ this._inputId = `checkbox-${nextId++}`;
25
25
  this._labelId = `checkbox-label-${this._inputId}`;
26
26
  this.indeterminate = false;
27
27
  }
@@ -32,17 +32,17 @@ class IgcCheckboxComponent extends IgcCheckboxBaseComponent {
32
32
  this.indeterminate = false;
33
33
  super._handleClick(event);
34
34
  }
35
- renderValidatorContainer() {
35
+ _renderValidatorContainer() {
36
36
  return IgcValidationContainerComponent.create(this);
37
37
  }
38
- renderStandard() {
38
+ _renderStandard() {
39
39
  return html `
40
40
  <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
41
41
  <path d="M4.1,12.7 9,17.6 20.3,6.3" />
42
42
  </svg>
43
43
  `;
44
44
  }
45
- renderIndigo() {
45
+ _renderIndigo() {
46
46
  return html `
47
47
  <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
48
48
  <rect width="18" height="4" x="3" y="10" rx="1.85" />
@@ -54,6 +54,9 @@ class IgcCheckboxComponent extends IgcCheckboxBaseComponent {
54
54
  }
55
55
  render() {
56
56
  const labelledBy = this.getAttribute('aria-labelledby');
57
+ const describedBy = this._slots.hasAssignedElements('helper-text')
58
+ ? 'helper-text'
59
+ : nothing;
57
60
  const checked = this.checked;
58
61
  return html `
59
62
  <label
@@ -69,37 +72,35 @@ class IgcCheckboxComponent extends IgcCheckboxBaseComponent {
69
72
  type="checkbox"
70
73
  name=${ifDefined(this.name)}
71
74
  value=${ifDefined(this.value)}
72
- .required=${this.required}
73
- .disabled=${this.disabled}
75
+ ?required=${this.required}
76
+ ?disabled=${this.disabled}
74
77
  .checked=${live(checked)}
75
78
  .indeterminate=${live(this.indeterminate)}
76
- aria-checked=${this.indeterminate && !checked ? 'mixed' : checked}
77
- aria-disabled=${this.disabled ? 'true' : 'false'}
78
79
  aria-labelledby=${labelledBy ? labelledBy : this._labelId}
80
+ aria-describedby=${describedBy}
79
81
  @click=${this._handleClick}
80
- @focus=${this._handleFocus}
82
+ @blur=${this._handleBlur}
81
83
  />
82
84
  <span part=${partMap({ control: true, checked })}>
83
85
  <span part=${partMap({ indicator: true, checked })}>
84
86
  ${this._themes.theme === 'indigo'
85
- ? this.renderIndigo()
86
- : this.renderStandard()}
87
+ ? this._renderIndigo()
88
+ : this._renderStandard()}
87
89
  </span>
88
90
  </span>
89
91
  <span
90
- .hidden=${this._hideLabel}
91
- part=${partMap({ label: true, checked })}
92
92
  id=${this._labelId}
93
+ part=${partMap({ label: true, checked })}
94
+ ?hidden=${this._hideLabel}
93
95
  ><slot></slot>
94
96
  </span>
95
97
  </label>
96
- ${this.renderValidatorContainer()}
98
+ ${this._renderValidatorContainer()}
97
99
  `;
98
100
  }
99
101
  }
100
102
  IgcCheckboxComponent.tagName = 'igc-checkbox';
101
103
  IgcCheckboxComponent.styles = [styles, shared];
102
- IgcCheckboxComponent.increment = createCounter();
103
104
  export default IgcCheckboxComponent;
104
105
  __decorate([
105
106
  property({ type: Boolean, reflect: true })
@@ -1 +1 @@
1
- {"version":3,"file":"checkbox.js","sourceRoot":"","sources":["../../../src/components/checkbox/checkbox.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,IAAI,EAAuB,MAAM,KAAK,CAAC;AAChD,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC7C,OAAO,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAC;AACzD,OAAO,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAC;AAE9C,OAAO,EAAE,oBAAoB,EAAE,MAAM,qCAAqC,CAAC;AAC3E,O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2BAAM,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,AAAnB,CAAoB;AAOnB,8BAAS,GAAG,aAAa,EAAE,AAAlB,CAAmB;eATjC,oBAAoB;AAqBhC;IADN,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;2DACd","sourcesContent":["import { html, type TemplateResult } from 'lit';\nimport { property } from 'lit/decorators.js';\nimport { ifDefined } from 'lit/directives/if-defined.js';\nimport { live } from 'lit/directives/live.js';\n\nimport { addThemingController } from '../../theming/theming-controller.js';\nimport { registerComponent } from '../common/definitions/register.js';\nimport { partMap } from '../common/part-map.js';\nimport { createCounter } from '../common/util.js';\nimport IgcValidationContainerComponent from '../validation-container/validation-container.js';\nimport { IgcCheckboxBaseComponent } from './checkbox-base.js';\nimport { styles } from './themes/checkbox.base.css.js';\nimport { all } from './themes/checkbox-themes.js';\nimport { styles as shared } from './themes/shared/checkbox/checkbox.common.css.js';\n\n/**\n * A check box allowing single values to be selected/deselected.\n *\n * @element igc-checkbox\n *\n * @slot - The checkbox label.\n * @slot helper-text - Renders content below the input.\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 *\n * @csspart base - The base wrapper of the checkbox.\n * @csspart control - The checkbox input element.\n * @csspart label - The checkbox label.\n * @csspart indicator - The checkbox indicator icon.\n */\nexport default class IgcCheckboxComponent extends IgcCheckboxBaseComponent {\n public static readonly tagName = 'igc-checkbox';\n protected static styles = [styles, shared];\n\n /* blazorSuppress */\n public static register(): void {\n registerComponent(IgcCheckboxComponent, IgcValidationContainerComponent);\n }\n\n private static readonly increment = createCounter();\n\n private readonly _themes = addThemingController(this, all);\n\n private readonly _inputId = `checkbox-${IgcCheckboxComponent.increment()}`;\n private readonly _labelId = `checkbox-label-${this._inputId}`;\n\n /**\n * Draws the checkbox in indeterminate state.\n * @attr\n */\n @property({ type: Boolean, reflect: true })\n public indeterminate = false;\n\n protected override _handleClick(event: PointerEvent): void {\n this.indeterminate = false;\n super._handleClick(event);\n }\n\n protected renderValidatorContainer(): TemplateResult {\n return IgcValidationContainerComponent.create(this);\n }\n\n protected renderStandard() {\n return html`\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n <path d=\"M4.1,12.7 9,17.6 20.3,6.3\" />\n </svg>\n `;\n }\n\n protected renderIndigo() {\n return html`\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n <rect width=\"18\" height=\"4\" x=\"3\" y=\"10\" rx=\"1.85\" />\n <path\n d=\"M19.033 5a1.966 1.966 0 0 0-1.418.586l-8.479 8.577-2.753-2.77a1.971 1.971 0 0 0-2.8 0 1.998 1.998 0 0 0 0 2.822l4.155 4.196a1.955 1.955 0 0 0 2.8 0l9.879-9.99a1.998 1.998 0 0 0 0-2.821 1.966 1.966 0 0 0-1.384-.6Z\"\n />\n </svg>\n `;\n }\n\n protected override render() {\n const labelledBy = this.getAttribute('aria-labelledby');\n const checked = this.checked;\n\n return html`\n <label\n part=${partMap({\n base: true,\n checked,\n focused: this._focusRingManager.focused,\n })}\n for=${this._inputId}\n >\n <input\n id=${this._inputId}\n type=\"checkbox\"\n name=${ifDefined(this.name)}\n value=${ifDefined(this.value)}\n .required=${this.required}\n .disabled=${this.disabled}\n .checked=${live(checked)}\n .indeterminate=${live(this.indeterminate)}\n aria-checked=${this.indeterminate && !checked ? 'mixed' : checked}\n aria-disabled=${this.disabled ? 'true' : 'false'}\n aria-labelledby=${labelledBy ? labelledBy : this._labelId}\n @click=${this._handleClick}\n @focus=${this._handleFocus}\n />\n <span part=${partMap({ control: true, checked })}>\n <span part=${partMap({ indicator: true, checked })}>\n ${this._themes.theme === 'indigo'\n ? this.renderIndigo()\n : this.renderStandard()}\n </span>\n </span>\n <span\n .hidden=${this._hideLabel}\n part=${partMap({ label: true, checked })}\n id=${this._labelId}\n ><slot></slot>\n </span>\n </label>\n ${this.renderValidatorContainer()}\n `;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'igc-checkbox': IgcCheckboxComponent;\n }\n}\n"]}
1
+ {"version":3,"file":"checkbox.js","sourceRoot":"","sources":["../../../src/components/checkbox/checkbox.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,IAAI,EAAE,OAAO,EAAuB,MAAM,KAAK,CAAC;AACzD,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC7C,OAAO,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAC;AACzD,OAAO,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAC;AAC9C,OAAO,EAAE,oBAAoB,EAAE,MAAM,qCAAqC,CAAC;AAC3E,OAAO,EAAE,iBAAiB,EAAE,MAAM,mCAAmC,CAAC;AACtE,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAChD,OAAO,+BAA+B,MAAM,iDAAiD,CAAC;AAC9F,OAAO,EAAE,wBAAwB,EAAE,MAAM,oBAAoB,CAAC;AAC9D,OAAO,EAAE,MAAM,EAAE,MAAM,+BAA+B,CAAC;AACvD,OAAO,EAAE,GAAG,EAAE,MAAM,6BAA6B,CAAC;AAClD,OAAO,EAAE,MAAM,IAAI,MAAM,EAAE,MAAM,iDAAiD,CAAC;AAEnF,IAAI,MAAM,GAAG,CAAC,CAAC;AAoBf,MAAqB,oBAAqB,SAAQ,wBAAwB;IAA1E;;QASmB,YAAO,GAAG,oBAAoB,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC;QAE1C,aAAQ,GAAG,YAAY,MAAM,EAAE,EAAE,CAAC;QAClC,aAAQ,GAAG,kBAAkB,IAAI,CAAC,QAAQ,EAAE,CAAC;QAOvD,kBAAa,GAAG,KAAK,CAAC;IA6E/B,CAAC;IA3FQ,MAAM,CAAC,QAAQ;QACpB,iBAAiB,CAAC,oBA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AE,OAAO,EAAE,CAAC;uBACjC,OAAO,CAAC,EAAE,SAAS,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;cAC9C,IAAI,CAAC,OAAO,CAAC,KAAK,KAAK,QAAQ;YAC/B,CAAC,CAAC,IAAI,CAAC,aAAa,EAAE;YACtB,CAAC,CAAC,IAAI,CAAC,eAAe,EAAE;;;;eAIvB,IAAI,CAAC,QAAQ;iBACX,OAAO,CAAC,EAAE,KAAK,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;oBAC9B,IAAI,CAAC,UAAU;;;;QAI3B,IAAI,CAAC,yBAAyB,EAAE;KACnC,CAAC;IACJ,CAAC;;AA9FsB,4BAAO,GAAG,cAAc,AAAjB,CAAkB;AAC/B,2BAAM,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,AAAnB,CAAoB;eAFxB,oBAAoB;AAmBhC;IADN,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;2DACd","sourcesContent":["import { html, nothing, type TemplateResult } from 'lit';\nimport { property } from 'lit/decorators.js';\nimport { ifDefined } from 'lit/directives/if-defined.js';\nimport { live } from 'lit/directives/live.js';\nimport { addThemingController } from '../../theming/theming-controller.js';\nimport { registerComponent } from '../common/definitions/register.js';\nimport { partMap } from '../common/part-map.js';\nimport IgcValidationContainerComponent from '../validation-container/validation-container.js';\nimport { IgcCheckboxBaseComponent } from './checkbox-base.js';\nimport { styles } from './themes/checkbox.base.css.js';\nimport { all } from './themes/checkbox-themes.js';\nimport { styles as shared } from './themes/shared/checkbox/checkbox.common.css.js';\n\nlet nextId = 1;\n\n/**\n * A check box allowing single values to be selected/deselected.\n *\n * @element igc-checkbox\n *\n * @slot - The checkbox label.\n * @slot helper-text - Renders content below the input.\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 *\n * @csspart base - The base wrapper of the checkbox.\n * @csspart control - The checkbox input element.\n * @csspart label - The checkbox label.\n * @csspart indicator - The checkbox indicator icon.\n */\nexport default class IgcCheckboxComponent extends IgcCheckboxBaseComponent {\n public static readonly tagName = 'igc-checkbox';\n protected static styles = [styles, shared];\n\n /* blazorSuppress */\n public static register(): void {\n registerComponent(IgcCheckboxComponent, IgcValidationContainerComponent);\n }\n\n private readonly _themes = addThemingController(this, all);\n\n private readonly _inputId = `checkbox-${nextId++}`;\n private readonly _labelId = `checkbox-label-${this._inputId}`;\n\n /**\n * Draws the checkbox in indeterminate state.\n * @attr\n */\n @property({ type: Boolean, reflect: true })\n public indeterminate = false;\n\n protected override _handleClick(event: PointerEvent): void {\n this.indeterminate = false;\n super._handleClick(event);\n }\n\n protected _renderValidatorContainer(): TemplateResult {\n return IgcValidationContainerComponent.create(this);\n }\n\n protected _renderStandard() {\n return html`\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n <path d=\"M4.1,12.7 9,17.6 20.3,6.3\" />\n </svg>\n `;\n }\n\n protected _renderIndigo() {\n return html`\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\">\n <rect width=\"18\" height=\"4\" x=\"3\" y=\"10\" rx=\"1.85\" />\n <path\n d=\"M19.033 5a1.966 1.966 0 0 0-1.418.586l-8.479 8.577-2.753-2.77a1.971 1.971 0 0 0-2.8 0 1.998 1.998 0 0 0 0 2.822l4.155 4.196a1.955 1.955 0 0 0 2.8 0l9.879-9.99a1.998 1.998 0 0 0 0-2.821 1.966 1.966 0 0 0-1.384-.6Z\"\n />\n </svg>\n `;\n }\n\n protected override render() {\n const labelledBy = this.getAttribute('aria-labelledby');\n const describedBy = this._slots.hasAssignedElements('helper-text')\n ? 'helper-text'\n : nothing;\n const checked = this.checked;\n\n return html`\n <label\n part=${partMap({\n base: true,\n checked,\n focused: this._focusRingManager.focused,\n })}\n for=${this._inputId}\n >\n <input\n id=${this._inputId}\n type=\"checkbox\"\n name=${ifDefined(this.name)}\n value=${ifDefined(this.value)}\n ?required=${this.required}\n ?disabled=${this.disabled}\n .checked=${live(checked)}\n .indeterminate=${live(this.indeterminate)}\n aria-labelledby=${labelledBy ? labelledBy : this._labelId}\n aria-describedby=${describedBy}\n @click=${this._handleClick}\n @blur=${this._handleBlur}\n />\n <span part=${partMap({ control: true, checked })}>\n <span part=${partMap({ indicator: true, checked })}>\n ${this._themes.theme === 'indigo'\n ? this._renderIndigo()\n : this._renderStandard()}\n </span>\n </span>\n <span\n id=${this._labelId}\n part=${partMap({ label: true, checked })}\n ?hidden=${this._hideLabel}\n ><slot></slot>\n </span>\n </label>\n ${this._renderValidatorContainer()}\n `;\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'igc-checkbox': IgcCheckboxComponent;\n }\n}\n"]}
@@ -17,7 +17,6 @@ export default class IgcSwitchComponent extends IgcCheckboxBaseComponent {
17
17
  static readonly tagName = "igc-switch";
18
18
  static styles: import("lit").CSSResult[];
19
19
  static register(): void;
20
- private static readonly increment;
21
20
  private readonly _inputId;
22
21
  private readonly _labelId;
23
22
  constructor();
@@ -4,18 +4,18 @@ import { live } from 'lit/directives/live.js';
4
4
  import { addThemingController } from '../../theming/theming-controller.js';
5
5
  import { registerComponent } from '../common/definitions/register.js';
6
6
  import { partMap } from '../common/part-map.js';
7
- import { createCounter } from '../common/util.js';
8
7
  import { IgcCheckboxBaseComponent } from './checkbox-base.js';
9
8
  import { styles as shared } from './themes/shared/switch/switch.common.css.js';
10
9
  import { styles } from './themes/switch.base.css.js';
11
10
  import { all } from './themes/switch-themes.js';
11
+ let nextId = 1;
12
12
  class IgcSwitchComponent extends IgcCheckboxBaseComponent {
13
13
  static register() {
14
14
  registerComponent(IgcSwitchComponent);
15
15
  }
16
16
  constructor() {
17
17
  super();
18
- this._inputId = `switch-${IgcSwitchComponent.increment()}`;
18
+ this._inputId = `switch-${nextId++}`;
19
19
  this._labelId = `switch-label-${this._inputId}`;
20
20
  addThemingController(this, all);
21
21
  }
@@ -29,14 +29,12 @@ class IgcSwitchComponent extends IgcCheckboxBaseComponent {
29
29
  type="checkbox"
30
30
  name=${ifDefined(this.name)}
31
31
  value=${ifDefined(this.value)}
32
- .required=${this.required}
33
- .disabled=${this.disabled}
32
+ ?required=${this.required}
33
+ ?disabled=${this.disabled}
34
34
  .checked=${live(checked)}
35
- aria-checked=${checked ? 'true' : 'false'}
36
- aria-disabled=${this.disabled ? 'true' : 'false'}
37
35
  aria-labelledby=${labelledBy ? labelledBy : this._labelId}
38
36
  @click=${this._handleClick}
39
- @focus=${this._handleFocus}
37
+ @blur=${this._handleBlur}
40
38
  />
41
39
  <span
42
40
  part=${partMap({
@@ -48,9 +46,9 @@ class IgcSwitchComponent extends IgcCheckboxBaseComponent {
48
46
  <span part=${partMap({ thumb: true, checked })}></span>
49
47
  </span>
50
48
  <span
51
- .hidden=${this._hideLabel}
52
- part=${partMap({ label: true, checked })}
53
49
  id=${this._labelId}
50
+ part=${partMap({ label: true, checked })}
51
+ ?hidden=${this._hideLabel}
54
52
  >
55
53
  <slot></slot>
56
54
  </span>
@@ -60,6 +58,5 @@ class IgcSwitchComponent extends IgcCheckboxBaseComponent {
60
58
  }
61
59
  IgcSwitchComponent.tagName = 'igc-switch';
62
60
  IgcSwitchComponent.styles = [styles, shared];
63
- IgcSwitchComponent.increment = createCounter();
64
61
  export default IgcSwitchComponent;
65
62
  //# sourceMappingURL=switch.js.map