@ukic/web-components 3.0.0-alpha.3 → 3.0.0-alpha.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (722) hide show
  1. package/dist/cjs/core.cjs.js +1 -1
  2. package/dist/cjs/{helpers-69219f14.js → helpers-529aaa3a.js} +5 -4
  3. package/dist/cjs/helpers-529aaa3a.js.map +1 -0
  4. package/dist/cjs/ic-accordion-group.cjs.entry.js +10 -10
  5. package/dist/cjs/ic-accordion-group.cjs.entry.js.map +1 -1
  6. package/dist/cjs/ic-accordion.cjs.entry.js +5 -5
  7. package/dist/cjs/ic-accordion.cjs.entry.js.map +1 -1
  8. package/dist/cjs/ic-alert.cjs.entry.js +7 -5
  9. package/dist/cjs/ic-alert.cjs.entry.js.map +1 -1
  10. package/dist/cjs/ic-back-to-top.cjs.entry.js +8 -5
  11. package/dist/cjs/ic-back-to-top.cjs.entry.js.map +1 -1
  12. package/dist/cjs/ic-badge.cjs.entry.js +2 -2
  13. package/dist/cjs/ic-badge.cjs.entry.js.map +1 -1
  14. package/dist/cjs/ic-breadcrumb-group.cjs.entry.js +43 -20
  15. package/dist/cjs/ic-breadcrumb-group.cjs.entry.js.map +1 -1
  16. package/dist/cjs/ic-breadcrumb.cjs.entry.js +2 -2
  17. package/dist/cjs/ic-breadcrumb.cjs.entry.js.map +1 -1
  18. package/dist/cjs/ic-button_3.cjs.entry.js +11 -13
  19. package/dist/cjs/ic-button_3.cjs.entry.js.map +1 -1
  20. package/dist/cjs/ic-card-vertical.cjs.entry.js +25 -26
  21. package/dist/cjs/ic-card-vertical.cjs.entry.js.map +1 -1
  22. package/dist/cjs/ic-checkbox-group.cjs.entry.js +16 -5
  23. package/dist/cjs/ic-checkbox-group.cjs.entry.js.map +1 -1
  24. package/dist/cjs/ic-checkbox.cjs.entry.js +5 -3
  25. package/dist/cjs/ic-checkbox.cjs.entry.js.map +1 -1
  26. package/dist/cjs/ic-chip.cjs.entry.js +1 -1
  27. package/dist/cjs/ic-classification-banner.cjs.entry.js +1 -1
  28. package/dist/cjs/ic-classification-banner.cjs.entry.js.map +1 -1
  29. package/dist/cjs/ic-data-row.cjs.entry.js +1 -1
  30. package/dist/cjs/ic-dialog.cjs.entry.js +4 -2
  31. package/dist/cjs/ic-dialog.cjs.entry.js.map +1 -1
  32. package/dist/cjs/ic-divider.cjs.entry.js +71 -7
  33. package/dist/cjs/ic-divider.cjs.entry.js.map +1 -1
  34. package/dist/cjs/ic-empty-state.cjs.entry.js +1 -1
  35. package/dist/cjs/ic-footer-link-group.cjs.entry.js +3 -3
  36. package/dist/cjs/ic-footer-link-group.cjs.entry.js.map +1 -1
  37. package/dist/cjs/ic-footer-link.cjs.entry.js +2 -2
  38. package/dist/cjs/ic-footer-link.cjs.entry.js.map +1 -1
  39. package/dist/cjs/ic-footer.cjs.entry.js +2 -2
  40. package/dist/cjs/ic-footer.cjs.entry.js.map +1 -1
  41. package/dist/cjs/ic-hero.cjs.entry.js +2 -2
  42. package/dist/cjs/ic-hero.cjs.entry.js.map +1 -1
  43. package/dist/cjs/ic-horizontal-scroll.cjs.entry.js +15 -7
  44. package/dist/cjs/ic-horizontal-scroll.cjs.entry.js.map +1 -1
  45. package/dist/cjs/ic-input-component-container_3.cjs.entry.js +14 -25
  46. package/dist/cjs/ic-input-component-container_3.cjs.entry.js.map +1 -1
  47. package/dist/cjs/ic-input-label_2.cjs.entry.js +21 -25
  48. package/dist/cjs/ic-input-label_2.cjs.entry.js.map +1 -1
  49. package/dist/cjs/ic-link.cjs.entry.js +3 -8
  50. package/dist/cjs/ic-link.cjs.entry.js.map +1 -1
  51. package/dist/cjs/ic-menu-group.cjs.entry.js +2 -2
  52. package/dist/cjs/ic-menu-group.cjs.entry.js.map +1 -1
  53. package/dist/cjs/ic-menu-item.cjs.entry.js +18 -17
  54. package/dist/cjs/ic-menu-item.cjs.entry.js.map +1 -1
  55. package/dist/cjs/ic-navigation-button.cjs.entry.js +7 -3
  56. package/dist/cjs/ic-navigation-button.cjs.entry.js.map +1 -1
  57. package/dist/cjs/ic-navigation-group.cjs.entry.js +7 -4
  58. package/dist/cjs/ic-navigation-group.cjs.entry.js.map +1 -1
  59. package/dist/cjs/ic-navigation-item.cjs.entry.js +57 -5
  60. package/dist/cjs/ic-navigation-item.cjs.entry.js.map +1 -1
  61. package/dist/cjs/ic-navigation-menu.cjs.entry.js +5 -4
  62. package/dist/cjs/ic-navigation-menu.cjs.entry.js.map +1 -1
  63. package/dist/cjs/ic-page-header.cjs.entry.js +5 -3
  64. package/dist/cjs/ic-page-header.cjs.entry.js.map +1 -1
  65. package/dist/cjs/ic-pagination-item.cjs.entry.js +8 -11
  66. package/dist/cjs/ic-pagination-item.cjs.entry.js.map +1 -1
  67. package/dist/cjs/ic-pagination.cjs.entry.js +19 -15
  68. package/dist/cjs/ic-pagination.cjs.entry.js.map +1 -1
  69. package/dist/cjs/ic-popover-menu.cjs.entry.js +9 -9
  70. package/dist/cjs/ic-popover-menu.cjs.entry.js.map +1 -1
  71. package/dist/cjs/ic-radio-group.cjs.entry.js +14 -5
  72. package/dist/cjs/ic-radio-group.cjs.entry.js.map +1 -1
  73. package/dist/cjs/ic-radio-option.cjs.entry.js +8 -4
  74. package/dist/cjs/ic-radio-option.cjs.entry.js.map +1 -1
  75. package/dist/cjs/ic-search-bar.cjs.entry.js +12 -9
  76. package/dist/cjs/ic-search-bar.cjs.entry.js.map +1 -1
  77. package/dist/cjs/ic-select.cjs.entry.js +10 -12
  78. package/dist/cjs/ic-select.cjs.entry.js.map +1 -1
  79. package/dist/cjs/ic-side-navigation.cjs.entry.js +13 -8
  80. package/dist/cjs/ic-side-navigation.cjs.entry.js.map +1 -1
  81. package/dist/cjs/ic-status-tag.cjs.entry.js +5 -4
  82. package/dist/cjs/ic-status-tag.cjs.entry.js.map +1 -1
  83. package/dist/cjs/ic-step.cjs.entry.js +1 -1
  84. package/dist/cjs/ic-stepper.cjs.entry.js +1 -1
  85. package/dist/cjs/ic-switch.cjs.entry.js +2 -2
  86. package/dist/cjs/ic-switch.cjs.entry.js.map +1 -1
  87. package/dist/cjs/ic-tab-context.cjs.entry.js +2 -1
  88. package/dist/cjs/ic-tab-context.cjs.entry.js.map +1 -1
  89. package/dist/cjs/ic-tab-group.cjs.entry.js +3 -19
  90. package/dist/cjs/ic-tab-group.cjs.entry.js.map +1 -1
  91. package/dist/cjs/ic-tab-panel.cjs.entry.js +1 -1
  92. package/dist/cjs/ic-tab.cjs.entry.js +1 -1
  93. package/dist/cjs/ic-text-field.cjs.entry.js +18 -15
  94. package/dist/cjs/ic-text-field.cjs.entry.js.map +1 -1
  95. package/dist/cjs/ic-theme.cjs.entry.js +1 -1
  96. package/dist/cjs/ic-toast.cjs.entry.js +3 -3
  97. package/dist/cjs/ic-toast.cjs.entry.js.map +1 -1
  98. package/dist/cjs/ic-toggle-button-group.cjs.entry.js +29 -5
  99. package/dist/cjs/ic-toggle-button-group.cjs.entry.js.map +1 -1
  100. package/dist/cjs/ic-toggle-button.cjs.entry.js +9 -6
  101. package/dist/cjs/ic-toggle-button.cjs.entry.js.map +1 -1
  102. package/dist/cjs/ic-top-navigation.cjs.entry.js +6 -4
  103. package/dist/cjs/ic-top-navigation.cjs.entry.js.map +1 -1
  104. package/dist/cjs/ic-typography.cjs.entry.js +2 -2
  105. package/dist/cjs/ic-typography.cjs.entry.js.map +1 -1
  106. package/dist/cjs/loader.cjs.js +1 -1
  107. package/dist/collection/ag-theme-icds.css +217 -0
  108. package/dist/collection/collection-manifest.json +1 -1
  109. package/dist/collection/components/ic-accordion/ic-accordion.css +21 -19
  110. package/dist/collection/components/ic-accordion/ic-accordion.js +27 -30
  111. package/dist/collection/components/ic-accordion/ic-accordion.js.map +1 -1
  112. package/dist/collection/components/ic-accordion/test/basic/ic-accordion.spec.js +3 -3
  113. package/dist/collection/components/ic-accordion/test/basic/ic-accordion.spec.js.map +1 -1
  114. package/dist/collection/components/ic-accordion-group/ic-accordion-group.css +2 -12
  115. package/dist/collection/components/ic-accordion-group/ic-accordion-group.js +18 -18
  116. package/dist/collection/components/ic-accordion-group/ic-accordion-group.js.map +1 -1
  117. package/dist/collection/components/ic-accordion-group/test/basic/ic-accordion-group.spec.js +3 -3
  118. package/dist/collection/components/ic-accordion-group/test/basic/ic-accordion-group.spec.js.map +1 -1
  119. package/dist/collection/components/ic-alert/ic-alert.css +29 -18
  120. package/dist/collection/components/ic-alert/ic-alert.js +48 -22
  121. package/dist/collection/components/ic-alert/ic-alert.js.map +1 -1
  122. package/dist/collection/components/ic-alert/test/basic/ic-alert.spec.js +1 -1
  123. package/dist/collection/components/ic-alert/test/basic/ic-alert.spec.js.map +1 -1
  124. package/dist/collection/components/ic-back-to-top/ic-back-to-top.css +5 -2
  125. package/dist/collection/components/ic-back-to-top/ic-back-to-top.js +31 -4
  126. package/dist/collection/components/ic-back-to-top/ic-back-to-top.js.map +1 -1
  127. package/dist/collection/components/ic-back-to-top/test/basic/ic-back-to-top.spec.js +14 -0
  128. package/dist/collection/components/ic-back-to-top/test/basic/ic-back-to-top.spec.js.map +1 -1
  129. package/dist/collection/components/ic-badge/ic-badge.css +3 -3
  130. package/dist/collection/components/ic-breadcrumb/ic-breadcrumb.css +4 -7
  131. package/dist/collection/components/ic-breadcrumb-group/ic-breadcrumb-group.js +44 -19
  132. package/dist/collection/components/ic-breadcrumb-group/ic-breadcrumb-group.js.map +1 -1
  133. package/dist/collection/components/ic-button/ic-button.css +658 -421
  134. package/dist/collection/components/ic-button/ic-button.js +51 -35
  135. package/dist/collection/components/ic-button/ic-button.js.map +1 -1
  136. package/dist/collection/components/ic-button/test/basic/ic-button.spec.js +3 -3
  137. package/dist/collection/components/ic-button/test/basic/ic-button.spec.js.map +1 -1
  138. package/dist/collection/components/ic-card-vertical/ic-card-vertical.css +99 -115
  139. package/dist/collection/components/ic-card-vertical/ic-card-vertical.js +50 -27
  140. package/dist/collection/components/ic-card-vertical/ic-card-vertical.js.map +1 -1
  141. package/dist/collection/components/ic-checkbox/ic-checkbox.css +42 -39
  142. package/dist/collection/components/ic-checkbox/ic-checkbox.js +28 -2
  143. package/dist/collection/components/ic-checkbox/ic-checkbox.js.map +1 -1
  144. package/dist/collection/components/ic-checkbox-group/ic-checkbox-group.css +15 -2
  145. package/dist/collection/components/ic-checkbox-group/ic-checkbox-group.js +39 -2
  146. package/dist/collection/components/ic-checkbox-group/ic-checkbox-group.js.map +1 -1
  147. package/dist/collection/components/ic-classification-banner/ic-classification-banner.css +13 -25
  148. package/dist/collection/components/ic-dialog/ic-dialog.css +16 -3
  149. package/dist/collection/components/ic-dialog/ic-dialog.js +26 -0
  150. package/dist/collection/components/ic-dialog/ic-dialog.js.map +1 -1
  151. package/dist/collection/components/ic-divider/ic-divider.css +341 -4
  152. package/dist/collection/components/ic-divider/ic-divider.js +235 -8
  153. package/dist/collection/components/ic-divider/ic-divider.js.map +1 -1
  154. package/dist/collection/components/ic-divider/ic-divider.types.js +2 -0
  155. package/dist/collection/components/ic-divider/ic-divider.types.js.map +1 -0
  156. package/dist/collection/components/ic-divider/test/basic/ic-divider.spec.js +89 -4
  157. package/dist/collection/components/ic-divider/test/basic/ic-divider.spec.js.map +1 -1
  158. package/dist/collection/components/ic-footer/ic-footer.css +20 -19
  159. package/dist/collection/components/ic-footer-link/ic-footer-link.css +2 -2
  160. package/dist/collection/components/ic-footer-link-group/ic-footer-link-group.css +11 -19
  161. package/dist/collection/components/ic-footer-link-group/ic-footer-link-group.js +1 -1
  162. package/dist/collection/components/ic-footer-link-group/ic-footer-link-group.js.map +1 -1
  163. package/dist/collection/components/ic-hero/ic-hero.css +23 -8
  164. package/dist/collection/components/ic-horizontal-scroll/ic-horizontal-scroll.css +0 -4
  165. package/dist/collection/components/ic-horizontal-scroll/ic-horizontal-scroll.js +62 -6
  166. package/dist/collection/components/ic-horizontal-scroll/ic-horizontal-scroll.js.map +1 -1
  167. package/dist/collection/components/ic-horizontal-scroll/test/basic/ic-horizontal-scroll.spec.js +43 -0
  168. package/dist/collection/components/ic-horizontal-scroll/test/basic/ic-horizontal-scroll.spec.js.map +1 -1
  169. package/dist/collection/components/ic-input-component-container/ic-input-component-container.css +40 -17
  170. package/dist/collection/components/ic-input-component-container/ic-input-component-container.js +8 -38
  171. package/dist/collection/components/ic-input-component-container/ic-input-component-container.js.map +1 -1
  172. package/dist/collection/components/ic-input-label/ic-input-label.css +18 -20
  173. package/dist/collection/components/ic-input-label/ic-input-label.js +11 -33
  174. package/dist/collection/components/ic-input-label/ic-input-label.js.map +1 -1
  175. package/dist/collection/components/ic-input-validation/ic-input-validation.css +12 -3
  176. package/dist/collection/components/ic-input-validation/ic-input-validation.js +7 -7
  177. package/dist/collection/components/ic-input-validation/ic-input-validation.js.map +1 -1
  178. package/dist/collection/components/ic-link/ic-link.css +0 -24
  179. package/dist/collection/components/ic-link/ic-link.js +3 -8
  180. package/dist/collection/components/ic-link/ic-link.js.map +1 -1
  181. package/dist/collection/components/ic-link/test/basic/ic-link.spec.js +2 -2
  182. package/dist/collection/components/ic-link/test/basic/ic-link.spec.js.map +1 -1
  183. package/dist/collection/components/ic-menu/ic-menu.css +35 -19
  184. package/dist/collection/components/ic-menu/ic-menu.js +3 -2
  185. package/dist/collection/components/ic-menu/ic-menu.js.map +1 -1
  186. package/dist/collection/components/ic-menu-group/ic-menu-group.js +1 -1
  187. package/dist/collection/components/ic-menu-group/ic-menu-group.js.map +1 -1
  188. package/dist/collection/components/ic-menu-item/ic-menu-item.js +58 -25
  189. package/dist/collection/components/ic-menu-item/ic-menu-item.js.map +1 -1
  190. package/dist/collection/components/ic-menu-item/test/basic/ic-menu-item.spec.js +2 -2
  191. package/dist/collection/components/ic-menu-item/test/basic/ic-menu-item.spec.js.map +1 -1
  192. package/dist/collection/components/ic-navigation-button/ic-navigation-button.css +14 -0
  193. package/dist/collection/components/ic-navigation-button/ic-navigation-button.js +29 -1
  194. package/dist/collection/components/ic-navigation-button/ic-navigation-button.js.map +1 -1
  195. package/dist/collection/components/ic-navigation-button/test/basic/ic-navigation-button.spec.js +1 -1
  196. package/dist/collection/components/ic-navigation-button/test/basic/ic-navigation-button.spec.js.map +1 -1
  197. package/dist/collection/components/ic-navigation-group/ic-navigation-group.css +13 -8
  198. package/dist/collection/components/ic-navigation-group/ic-navigation-group.js +29 -2
  199. package/dist/collection/components/ic-navigation-group/ic-navigation-group.js.map +1 -1
  200. package/dist/collection/components/ic-navigation-item/ic-navigation-item.css +20 -18
  201. package/dist/collection/components/ic-navigation-item/ic-navigation-item.js +83 -6
  202. package/dist/collection/components/ic-navigation-item/ic-navigation-item.js.map +1 -1
  203. package/dist/collection/components/ic-navigation-item/test/basic/ic-navigation-item.spec.js +12 -0
  204. package/dist/collection/components/ic-navigation-item/test/basic/ic-navigation-item.spec.js.map +1 -1
  205. package/dist/collection/components/ic-navigation-menu/ic-navigation-menu.css +9 -6
  206. package/dist/collection/components/ic-navigation-menu/ic-navigation-menu.js +27 -2
  207. package/dist/collection/components/ic-navigation-menu/ic-navigation-menu.js.map +1 -1
  208. package/dist/collection/components/ic-page-header/ic-page-header.css +2 -1
  209. package/dist/collection/components/ic-page-header/ic-page-header.js +27 -1
  210. package/dist/collection/components/ic-page-header/ic-page-header.js.map +1 -1
  211. package/dist/collection/components/ic-pagination/ic-pagination.css +15 -0
  212. package/dist/collection/components/ic-pagination/ic-pagination.js +59 -37
  213. package/dist/collection/components/ic-pagination/ic-pagination.js.map +1 -1
  214. package/dist/collection/components/ic-pagination/test/basic/ic-pagination.spec.js +1 -1
  215. package/dist/collection/components/ic-pagination/test/basic/ic-pagination.spec.js.map +1 -1
  216. package/dist/collection/components/ic-pagination-item/ic-pagination-item.css +26 -6
  217. package/dist/collection/components/ic-pagination-item/ic-pagination-item.js +48 -33
  218. package/dist/collection/components/ic-pagination-item/ic-pagination-item.js.map +1 -1
  219. package/dist/collection/components/ic-popover-menu/ic-popover-menu.js +25 -12
  220. package/dist/collection/components/ic-popover-menu/ic-popover-menu.js.map +1 -1
  221. package/dist/collection/components/ic-radio-group/ic-radio-group.css +17 -1
  222. package/dist/collection/components/ic-radio-group/ic-radio-group.js +37 -2
  223. package/dist/collection/components/ic-radio-group/ic-radio-group.js.map +1 -1
  224. package/dist/collection/components/ic-radio-option/ic-radio-option.css +34 -25
  225. package/dist/collection/components/ic-radio-option/ic-radio-option.js +30 -2
  226. package/dist/collection/components/ic-radio-option/ic-radio-option.js.map +1 -1
  227. package/dist/collection/components/ic-search-bar/ic-search-bar.css +42 -5
  228. package/dist/collection/components/ic-search-bar/ic-search-bar.js +34 -8
  229. package/dist/collection/components/ic-search-bar/ic-search-bar.js.map +1 -1
  230. package/dist/collection/components/ic-select/ic-select.css +50 -36
  231. package/dist/collection/components/ic-select/ic-select.js +34 -12
  232. package/dist/collection/components/ic-select/ic-select.js.map +1 -1
  233. package/dist/collection/components/ic-side-navigation/ic-side-navigation.css +48 -32
  234. package/dist/collection/components/ic-side-navigation/ic-side-navigation.js +11 -6
  235. package/dist/collection/components/ic-side-navigation/ic-side-navigation.js.map +1 -1
  236. package/dist/collection/components/ic-side-navigation/test/basic/ic-side-navigation.spec.js +3 -3
  237. package/dist/collection/components/ic-side-navigation/test/basic/ic-side-navigation.spec.js.map +1 -1
  238. package/dist/collection/components/ic-status-tag/ic-status-tag.css +5 -5
  239. package/dist/collection/components/ic-status-tag/ic-status-tag.js +21 -2
  240. package/dist/collection/components/ic-status-tag/ic-status-tag.js.map +1 -1
  241. package/dist/collection/components/ic-status-tag/test/basic/ic-status-tag.spec.js +15 -32
  242. package/dist/collection/components/ic-status-tag/test/basic/ic-status-tag.spec.js.map +1 -1
  243. package/dist/collection/components/ic-switch/ic-switch.css +3 -0
  244. package/dist/collection/components/ic-tab-context/ic-tab-context.js +2 -1
  245. package/dist/collection/components/ic-tab-context/ic-tab-context.js.map +1 -1
  246. package/dist/collection/components/ic-tab-group/ic-tab-group.css +8 -0
  247. package/dist/collection/components/ic-tab-group/ic-tab-group.js +1 -17
  248. package/dist/collection/components/ic-tab-group/ic-tab-group.js.map +1 -1
  249. package/dist/collection/components/ic-text-field/ic-text-field.css +61 -8
  250. package/dist/collection/components/ic-text-field/ic-text-field.js +40 -13
  251. package/dist/collection/components/ic-text-field/ic-text-field.js.map +1 -1
  252. package/dist/collection/components/ic-text-field/test/basic/ic-text-field.textarea.spec.js +2 -2
  253. package/dist/collection/components/ic-text-field/test/basic/ic-text-field.textarea.spec.js.map +1 -1
  254. package/dist/collection/components/ic-toast/ic-toast.css +25 -16
  255. package/dist/collection/components/ic-toast/ic-toast.js +1 -2
  256. package/dist/collection/components/ic-toast/ic-toast.js.map +1 -1
  257. package/dist/collection/components/ic-toast/test/basic/ic-toast.spec.js +12 -12
  258. package/dist/collection/components/ic-toast/test/basic/ic-toast.spec.js.map +1 -1
  259. package/dist/collection/components/ic-toggle-button/ic-toggle-button.css +189 -54
  260. package/dist/collection/components/ic-toggle-button/ic-toggle-button.js +53 -32
  261. package/dist/collection/components/ic-toggle-button/ic-toggle-button.js.map +1 -1
  262. package/dist/collection/components/ic-toggle-button-group/ic-toggle-button-group.css +23 -16
  263. package/dist/collection/components/ic-toggle-button-group/ic-toggle-button-group.js +77 -28
  264. package/dist/collection/components/ic-toggle-button-group/ic-toggle-button-group.js.map +1 -1
  265. package/dist/collection/components/ic-toggle-button-group/test/ic-toggle-button-group.spec.js +18 -0
  266. package/dist/collection/components/ic-toggle-button-group/test/ic-toggle-button-group.spec.js.map +1 -1
  267. package/dist/collection/components/ic-top-navigation/ic-top-navigation.css +41 -17
  268. package/dist/collection/components/ic-top-navigation/ic-top-navigation.js +28 -2
  269. package/dist/collection/components/ic-top-navigation/ic-top-navigation.js.map +1 -1
  270. package/dist/collection/components/ic-typography/ic-typography.css +4 -6
  271. package/dist/collection/utils/helpers.js +4 -3
  272. package/dist/collection/utils/helpers.js.map +1 -1
  273. package/dist/components/helpers.js +5 -4
  274. package/dist/components/helpers.js.map +1 -1
  275. package/dist/components/ic-accordion-group.js +11 -11
  276. package/dist/components/ic-accordion-group.js.map +1 -1
  277. package/dist/components/ic-accordion.js +5 -5
  278. package/dist/components/ic-accordion.js.map +1 -1
  279. package/dist/components/ic-alert.js +8 -5
  280. package/dist/components/ic-alert.js.map +1 -1
  281. package/dist/components/ic-back-to-top.js +9 -5
  282. package/dist/components/ic-back-to-top.js.map +1 -1
  283. package/dist/components/ic-badge.js +1 -1
  284. package/dist/components/ic-badge.js.map +1 -1
  285. package/dist/components/ic-breadcrumb-group.js +43 -19
  286. package/dist/components/ic-breadcrumb-group.js.map +1 -1
  287. package/dist/components/ic-breadcrumb2.js +1 -1
  288. package/dist/components/ic-breadcrumb2.js.map +1 -1
  289. package/dist/components/ic-button2.js +12 -13
  290. package/dist/components/ic-button2.js.map +1 -1
  291. package/dist/components/ic-card-vertical.js +27 -27
  292. package/dist/components/ic-card-vertical.js.map +1 -1
  293. package/dist/components/ic-checkbox-group.js +18 -5
  294. package/dist/components/ic-checkbox-group.js.map +1 -1
  295. package/dist/components/ic-checkbox.js +5 -2
  296. package/dist/components/ic-checkbox.js.map +1 -1
  297. package/dist/components/ic-classification-banner.js +1 -1
  298. package/dist/components/ic-classification-banner.js.map +1 -1
  299. package/dist/components/ic-dialog.js +4 -1
  300. package/dist/components/ic-dialog.js.map +1 -1
  301. package/dist/components/ic-divider2.js +86 -9
  302. package/dist/components/ic-divider2.js.map +1 -1
  303. package/dist/components/ic-footer-link-group.js +2 -2
  304. package/dist/components/ic-footer-link-group.js.map +1 -1
  305. package/dist/components/ic-footer-link.js +1 -1
  306. package/dist/components/ic-footer-link.js.map +1 -1
  307. package/dist/components/ic-footer.js +1 -1
  308. package/dist/components/ic-footer.js.map +1 -1
  309. package/dist/components/ic-hero.js +1 -1
  310. package/dist/components/ic-hero.js.map +1 -1
  311. package/dist/components/ic-horizontal-scroll2.js +16 -6
  312. package/dist/components/ic-horizontal-scroll2.js.map +1 -1
  313. package/dist/components/ic-input-component-container2.js +9 -22
  314. package/dist/components/ic-input-component-container2.js.map +1 -1
  315. package/dist/components/ic-input-label2.js +12 -17
  316. package/dist/components/ic-input-label2.js.map +1 -1
  317. package/dist/components/ic-input-validation2.js +8 -8
  318. package/dist/components/ic-input-validation2.js.map +1 -1
  319. package/dist/components/ic-link2.js +4 -9
  320. package/dist/components/ic-link2.js.map +1 -1
  321. package/dist/components/ic-menu-group.js +1 -1
  322. package/dist/components/ic-menu-group.js.map +1 -1
  323. package/dist/components/ic-menu-item2.js +20 -19
  324. package/dist/components/ic-menu-item2.js.map +1 -1
  325. package/dist/components/ic-menu2.js +4 -3
  326. package/dist/components/ic-menu2.js.map +1 -1
  327. package/dist/components/ic-navigation-button.js +7 -2
  328. package/dist/components/ic-navigation-button.js.map +1 -1
  329. package/dist/components/ic-navigation-group.js +7 -3
  330. package/dist/components/ic-navigation-group.js.map +1 -1
  331. package/dist/components/ic-navigation-item.js +60 -6
  332. package/dist/components/ic-navigation-item.js.map +1 -1
  333. package/dist/components/ic-navigation-menu2.js +6 -4
  334. package/dist/components/ic-navigation-menu2.js.map +1 -1
  335. package/dist/components/ic-page-header.js +5 -2
  336. package/dist/components/ic-page-header.js.map +1 -1
  337. package/dist/components/ic-pagination-item2.js +10 -12
  338. package/dist/components/ic-pagination-item2.js.map +1 -1
  339. package/dist/components/ic-pagination.js +20 -15
  340. package/dist/components/ic-pagination.js.map +1 -1
  341. package/dist/components/ic-popover-menu.js +8 -8
  342. package/dist/components/ic-popover-menu.js.map +1 -1
  343. package/dist/components/ic-radio-group.js +16 -5
  344. package/dist/components/ic-radio-group.js.map +1 -1
  345. package/dist/components/ic-radio-option.js +8 -3
  346. package/dist/components/ic-radio-option.js.map +1 -1
  347. package/dist/components/ic-search-bar.js +13 -9
  348. package/dist/components/ic-search-bar.js.map +1 -1
  349. package/dist/components/ic-select.js +11 -12
  350. package/dist/components/ic-select.js.map +1 -1
  351. package/dist/components/ic-side-navigation.js +13 -8
  352. package/dist/components/ic-side-navigation.js.map +1 -1
  353. package/dist/components/ic-status-tag.js +5 -3
  354. package/dist/components/ic-status-tag.js.map +1 -1
  355. package/dist/components/ic-switch.js +1 -1
  356. package/dist/components/ic-switch.js.map +1 -1
  357. package/dist/components/ic-tab-context.js +2 -1
  358. package/dist/components/ic-tab-context.js.map +1 -1
  359. package/dist/components/ic-tab-group.js +2 -18
  360. package/dist/components/ic-tab-group.js.map +1 -1
  361. package/dist/components/ic-text-field2.js +19 -15
  362. package/dist/components/ic-text-field2.js.map +1 -1
  363. package/dist/components/ic-toast.js +3 -3
  364. package/dist/components/ic-toast.js.map +1 -1
  365. package/dist/components/ic-toggle-button-group.js +36 -7
  366. package/dist/components/ic-toggle-button-group.js.map +1 -1
  367. package/dist/components/ic-toggle-button.js +11 -7
  368. package/dist/components/ic-toggle-button.js.map +1 -1
  369. package/dist/components/ic-top-navigation.js +7 -4
  370. package/dist/components/ic-top-navigation.js.map +1 -1
  371. package/dist/components/ic-typography2.js +1 -1
  372. package/dist/components/ic-typography2.js.map +1 -1
  373. package/dist/core/ag-theme-icds.css +217 -0
  374. package/dist/core/core.css +934 -66
  375. package/dist/core/core.esm.js +1 -1
  376. package/dist/core/core.esm.js.map +1 -1
  377. package/dist/core/p-03dc6b93.entry.js +2 -0
  378. package/dist/core/p-03dc6b93.entry.js.map +1 -0
  379. package/dist/core/p-04339c98.entry.js +2 -0
  380. package/dist/core/p-04339c98.entry.js.map +1 -0
  381. package/dist/core/p-0aec7fab.entry.js +2 -0
  382. package/dist/core/p-0aec7fab.entry.js.map +1 -0
  383. package/dist/core/{p-37dea10d.entry.js → p-0cef50b7.entry.js} +2 -2
  384. package/dist/core/{p-4a3b1f06.entry.js → p-12f72d83.entry.js} +2 -2
  385. package/dist/core/p-12f72d83.entry.js.map +1 -0
  386. package/dist/core/{p-f5b2b26d.entry.js → p-15fd6539.entry.js} +2 -2
  387. package/dist/core/p-175baf98.entry.js +2 -0
  388. package/dist/core/p-175baf98.entry.js.map +1 -0
  389. package/dist/core/{p-726673ee.entry.js → p-2223c7ee.entry.js} +2 -2
  390. package/dist/core/p-2223c7ee.entry.js.map +1 -0
  391. package/dist/core/p-274b1ed7.entry.js +2 -0
  392. package/dist/core/p-274b1ed7.entry.js.map +1 -0
  393. package/dist/core/p-2a300ec7.entry.js +2 -0
  394. package/dist/core/p-2a300ec7.entry.js.map +1 -0
  395. package/dist/core/p-303307bb.entry.js +2 -0
  396. package/dist/core/p-303307bb.entry.js.map +1 -0
  397. package/dist/core/p-3317f083.entry.js +2 -0
  398. package/dist/core/p-3317f083.entry.js.map +1 -0
  399. package/dist/core/p-35bd9d76.entry.js +2 -0
  400. package/dist/core/p-35bd9d76.entry.js.map +1 -0
  401. package/dist/core/p-36f4e0bd.entry.js +2 -0
  402. package/dist/core/p-36f4e0bd.entry.js.map +1 -0
  403. package/dist/core/p-3a4000d8.entry.js +2 -0
  404. package/dist/core/p-3a4000d8.entry.js.map +1 -0
  405. package/dist/core/{p-5cd016e1.entry.js → p-48463a79.entry.js} +2 -2
  406. package/dist/core/p-48463a79.entry.js.map +1 -0
  407. package/dist/core/{p-dd36bf1b.entry.js → p-4fea4610.entry.js} +2 -2
  408. package/dist/core/p-4fea4610.entry.js.map +1 -0
  409. package/dist/core/p-60d458e5.entry.js +2 -0
  410. package/dist/core/p-60d458e5.entry.js.map +1 -0
  411. package/dist/core/{p-690c5e80.entry.js → p-685d6aa9.entry.js} +2 -2
  412. package/dist/core/p-6bb3ef22.entry.js +2 -0
  413. package/dist/core/p-6bb3ef22.entry.js.map +1 -0
  414. package/dist/core/p-6cb1f1da.entry.js +2 -0
  415. package/dist/core/p-6cb1f1da.entry.js.map +1 -0
  416. package/dist/core/{p-c9cf932c.entry.js → p-78f46cf8.entry.js} +2 -2
  417. package/dist/core/p-78f46cf8.entry.js.map +1 -0
  418. package/dist/core/p-79c132e3.entry.js +2 -0
  419. package/dist/core/p-79c132e3.entry.js.map +1 -0
  420. package/dist/core/p-7cba80ac.entry.js +2 -0
  421. package/dist/core/p-7cba80ac.entry.js.map +1 -0
  422. package/dist/core/p-81f80487.entry.js +2 -0
  423. package/dist/core/p-81f80487.entry.js.map +1 -0
  424. package/dist/core/p-85be0268.entry.js +2 -0
  425. package/dist/core/p-85be0268.entry.js.map +1 -0
  426. package/dist/core/p-85d33e38.entry.js +2 -0
  427. package/dist/core/p-85d33e38.entry.js.map +1 -0
  428. package/dist/core/{p-b78f8b8c.entry.js → p-88810080.entry.js} +2 -2
  429. package/dist/core/p-88810080.entry.js.map +1 -0
  430. package/dist/core/{p-b01ffa55.entry.js → p-96b4ca6e.entry.js} +2 -2
  431. package/dist/core/p-96b4ca6e.entry.js.map +1 -0
  432. package/dist/core/p-97e8246c.entry.js +2 -0
  433. package/dist/core/p-97e8246c.entry.js.map +1 -0
  434. package/dist/core/p-98816f52.entry.js +2 -0
  435. package/dist/core/p-98816f52.entry.js.map +1 -0
  436. package/dist/core/p-a01841e2.entry.js +2 -0
  437. package/dist/core/p-a01841e2.entry.js.map +1 -0
  438. package/dist/core/p-a6be333f.entry.js +2 -0
  439. package/dist/core/p-a6be333f.entry.js.map +1 -0
  440. package/dist/core/p-a91b0212.entry.js +2 -0
  441. package/dist/core/p-a91b0212.entry.js.map +1 -0
  442. package/dist/core/p-ae42affc.entry.js +2 -0
  443. package/dist/core/p-ae42affc.entry.js.map +1 -0
  444. package/dist/core/p-b06939fa.entry.js +2 -0
  445. package/dist/core/p-b06939fa.entry.js.map +1 -0
  446. package/dist/core/{p-95f603dd.entry.js → p-ba37e169.entry.js} +2 -2
  447. package/dist/core/p-ba55afea.entry.js +2 -0
  448. package/dist/core/p-ba55afea.entry.js.map +1 -0
  449. package/dist/core/p-bbd2febe.entry.js +2 -0
  450. package/dist/core/p-bbd2febe.entry.js.map +1 -0
  451. package/dist/core/p-c0d5043e.entry.js +2 -0
  452. package/dist/core/p-c0d5043e.entry.js.map +1 -0
  453. package/dist/core/p-c43d676b.entry.js +2 -0
  454. package/dist/core/p-c43d676b.entry.js.map +1 -0
  455. package/dist/core/p-c4f32f77.entry.js +2 -0
  456. package/dist/core/p-c4f32f77.entry.js.map +1 -0
  457. package/dist/core/p-c563d479.entry.js +2 -0
  458. package/dist/core/p-c563d479.entry.js.map +1 -0
  459. package/dist/core/{p-922984cb.entry.js → p-c5d3c71e.entry.js} +2 -2
  460. package/dist/core/p-c7e01fcd.entry.js +2 -0
  461. package/dist/core/p-c7e01fcd.entry.js.map +1 -0
  462. package/dist/core/p-c82240b7.entry.js +2 -0
  463. package/dist/core/p-c82240b7.entry.js.map +1 -0
  464. package/dist/core/{p-7b35de65.entry.js → p-cdbc3414.entry.js} +2 -2
  465. package/dist/core/p-d3263ed9.entry.js +2 -0
  466. package/dist/core/p-d3263ed9.entry.js.map +1 -0
  467. package/dist/core/p-d43e0f4b.entry.js +2 -0
  468. package/dist/core/p-d43e0f4b.entry.js.map +1 -0
  469. package/dist/core/p-d987bdc0.entry.js +2 -0
  470. package/dist/core/p-d987bdc0.entry.js.map +1 -0
  471. package/dist/core/{p-50ead56c.entry.js → p-df957570.entry.js} +2 -2
  472. package/dist/core/p-df957570.entry.js.map +1 -0
  473. package/dist/core/p-e107f362.entry.js +2 -0
  474. package/dist/core/p-e107f362.entry.js.map +1 -0
  475. package/dist/core/{p-ee6dd94c.entry.js → p-ec097c1f.entry.js} +2 -2
  476. package/dist/core/{p-14dfd8db.entry.js → p-f069f50e.entry.js} +2 -2
  477. package/dist/core/p-f069f50e.entry.js.map +1 -0
  478. package/dist/core/{p-acbd15ab.entry.js → p-f580f0ce.entry.js} +2 -2
  479. package/dist/core/{p-b7eb8ef9.js → p-f99576e0.js} +2 -2
  480. package/dist/core/p-f99576e0.js.map +1 -0
  481. package/dist/esm/core.js +1 -1
  482. package/dist/esm/{helpers-e8797e8d.js → helpers-7bf8c67f.js} +6 -5
  483. package/dist/esm/helpers-7bf8c67f.js.map +1 -0
  484. package/dist/esm/ic-accordion-group.entry.js +10 -10
  485. package/dist/esm/ic-accordion-group.entry.js.map +1 -1
  486. package/dist/esm/ic-accordion.entry.js +5 -5
  487. package/dist/esm/ic-accordion.entry.js.map +1 -1
  488. package/dist/esm/ic-alert.entry.js +7 -5
  489. package/dist/esm/ic-alert.entry.js.map +1 -1
  490. package/dist/esm/ic-back-to-top.entry.js +9 -6
  491. package/dist/esm/ic-back-to-top.entry.js.map +1 -1
  492. package/dist/esm/ic-badge.entry.js +2 -2
  493. package/dist/esm/ic-badge.entry.js.map +1 -1
  494. package/dist/esm/ic-breadcrumb-group.entry.js +43 -20
  495. package/dist/esm/ic-breadcrumb-group.entry.js.map +1 -1
  496. package/dist/esm/ic-breadcrumb.entry.js +2 -2
  497. package/dist/esm/ic-breadcrumb.entry.js.map +1 -1
  498. package/dist/esm/ic-button_3.entry.js +11 -13
  499. package/dist/esm/ic-button_3.entry.js.map +1 -1
  500. package/dist/esm/ic-card-vertical.entry.js +26 -27
  501. package/dist/esm/ic-card-vertical.entry.js.map +1 -1
  502. package/dist/esm/ic-checkbox-group.entry.js +16 -5
  503. package/dist/esm/ic-checkbox-group.entry.js.map +1 -1
  504. package/dist/esm/ic-checkbox.entry.js +5 -3
  505. package/dist/esm/ic-checkbox.entry.js.map +1 -1
  506. package/dist/esm/ic-chip.entry.js +1 -1
  507. package/dist/esm/ic-classification-banner.entry.js +1 -1
  508. package/dist/esm/ic-classification-banner.entry.js.map +1 -1
  509. package/dist/esm/ic-data-row.entry.js +1 -1
  510. package/dist/esm/ic-dialog.entry.js +4 -2
  511. package/dist/esm/ic-dialog.entry.js.map +1 -1
  512. package/dist/esm/ic-divider.entry.js +72 -8
  513. package/dist/esm/ic-divider.entry.js.map +1 -1
  514. package/dist/esm/ic-empty-state.entry.js +1 -1
  515. package/dist/esm/ic-footer-link-group.entry.js +3 -3
  516. package/dist/esm/ic-footer-link-group.entry.js.map +1 -1
  517. package/dist/esm/ic-footer-link.entry.js +2 -2
  518. package/dist/esm/ic-footer-link.entry.js.map +1 -1
  519. package/dist/esm/ic-footer.entry.js +2 -2
  520. package/dist/esm/ic-footer.entry.js.map +1 -1
  521. package/dist/esm/ic-hero.entry.js +2 -2
  522. package/dist/esm/ic-hero.entry.js.map +1 -1
  523. package/dist/esm/ic-horizontal-scroll.entry.js +15 -7
  524. package/dist/esm/ic-horizontal-scroll.entry.js.map +1 -1
  525. package/dist/esm/ic-input-component-container_3.entry.js +14 -25
  526. package/dist/esm/ic-input-component-container_3.entry.js.map +1 -1
  527. package/dist/esm/ic-input-label_2.entry.js +21 -25
  528. package/dist/esm/ic-input-label_2.entry.js.map +1 -1
  529. package/dist/esm/ic-link.entry.js +3 -8
  530. package/dist/esm/ic-link.entry.js.map +1 -1
  531. package/dist/esm/ic-menu-group.entry.js +2 -2
  532. package/dist/esm/ic-menu-group.entry.js.map +1 -1
  533. package/dist/esm/ic-menu-item.entry.js +18 -17
  534. package/dist/esm/ic-menu-item.entry.js.map +1 -1
  535. package/dist/esm/ic-navigation-button.entry.js +7 -3
  536. package/dist/esm/ic-navigation-button.entry.js.map +1 -1
  537. package/dist/esm/ic-navigation-group.entry.js +7 -4
  538. package/dist/esm/ic-navigation-group.entry.js.map +1 -1
  539. package/dist/esm/ic-navigation-item.entry.js +58 -6
  540. package/dist/esm/ic-navigation-item.entry.js.map +1 -1
  541. package/dist/esm/ic-navigation-menu.entry.js +5 -4
  542. package/dist/esm/ic-navigation-menu.entry.js.map +1 -1
  543. package/dist/esm/ic-page-header.entry.js +5 -3
  544. package/dist/esm/ic-page-header.entry.js.map +1 -1
  545. package/dist/esm/ic-pagination-item.entry.js +8 -11
  546. package/dist/esm/ic-pagination-item.entry.js.map +1 -1
  547. package/dist/esm/ic-pagination.entry.js +19 -15
  548. package/dist/esm/ic-pagination.entry.js.map +1 -1
  549. package/dist/esm/ic-popover-menu.entry.js +9 -9
  550. package/dist/esm/ic-popover-menu.entry.js.map +1 -1
  551. package/dist/esm/ic-radio-group.entry.js +14 -5
  552. package/dist/esm/ic-radio-group.entry.js.map +1 -1
  553. package/dist/esm/ic-radio-option.entry.js +8 -4
  554. package/dist/esm/ic-radio-option.entry.js.map +1 -1
  555. package/dist/esm/ic-search-bar.entry.js +12 -9
  556. package/dist/esm/ic-search-bar.entry.js.map +1 -1
  557. package/dist/esm/ic-select.entry.js +10 -12
  558. package/dist/esm/ic-select.entry.js.map +1 -1
  559. package/dist/esm/ic-side-navigation.entry.js +13 -8
  560. package/dist/esm/ic-side-navigation.entry.js.map +1 -1
  561. package/dist/esm/ic-status-tag.entry.js +5 -4
  562. package/dist/esm/ic-status-tag.entry.js.map +1 -1
  563. package/dist/esm/ic-step.entry.js +1 -1
  564. package/dist/esm/ic-stepper.entry.js +1 -1
  565. package/dist/esm/ic-switch.entry.js +2 -2
  566. package/dist/esm/ic-switch.entry.js.map +1 -1
  567. package/dist/esm/ic-tab-context.entry.js +2 -1
  568. package/dist/esm/ic-tab-context.entry.js.map +1 -1
  569. package/dist/esm/ic-tab-group.entry.js +3 -19
  570. package/dist/esm/ic-tab-group.entry.js.map +1 -1
  571. package/dist/esm/ic-tab-panel.entry.js +1 -1
  572. package/dist/esm/ic-tab.entry.js +1 -1
  573. package/dist/esm/ic-text-field.entry.js +18 -15
  574. package/dist/esm/ic-text-field.entry.js.map +1 -1
  575. package/dist/esm/ic-theme.entry.js +1 -1
  576. package/dist/esm/ic-toast.entry.js +3 -3
  577. package/dist/esm/ic-toast.entry.js.map +1 -1
  578. package/dist/esm/ic-toggle-button-group.entry.js +29 -5
  579. package/dist/esm/ic-toggle-button-group.entry.js.map +1 -1
  580. package/dist/esm/ic-toggle-button.entry.js +9 -6
  581. package/dist/esm/ic-toggle-button.entry.js.map +1 -1
  582. package/dist/esm/ic-top-navigation.entry.js +6 -4
  583. package/dist/esm/ic-top-navigation.entry.js.map +1 -1
  584. package/dist/esm/ic-typography.entry.js +2 -2
  585. package/dist/esm/ic-typography.entry.js.map +1 -1
  586. package/dist/esm/loader.js +1 -1
  587. package/dist/types/components/ic-accordion/ic-accordion.d.ts +5 -5
  588. package/dist/types/components/ic-accordion-group/ic-accordion-group.d.ts +4 -4
  589. package/dist/types/components/ic-alert/ic-alert.d.ts +9 -5
  590. package/dist/types/components/ic-back-to-top/ic-back-to-top.d.ts +5 -0
  591. package/dist/types/components/ic-breadcrumb-group/ic-breadcrumb-group.d.ts +1 -0
  592. package/dist/types/components/ic-button/ic-button.d.ts +9 -5
  593. package/dist/types/components/ic-card-vertical/ic-card-vertical.d.ts +8 -4
  594. package/dist/types/components/ic-checkbox/ic-checkbox.d.ts +6 -2
  595. package/dist/types/components/ic-checkbox-group/ic-checkbox-group.d.ts +7 -1
  596. package/dist/types/components/ic-dialog/ic-dialog.d.ts +5 -0
  597. package/dist/types/components/ic-divider/ic-divider.d.ts +31 -1
  598. package/dist/types/components/ic-divider/ic-divider.types.d.ts +3 -0
  599. package/dist/types/components/ic-footer-link-group/ic-footer-link-group.d.ts +2 -1
  600. package/dist/types/components/ic-horizontal-scroll/ic-horizontal-scroll.d.ts +7 -1
  601. package/dist/types/components/ic-input-component-container/ic-input-component-container.d.ts +0 -4
  602. package/dist/types/components/ic-input-label/ic-input-label.d.ts +0 -4
  603. package/dist/types/components/ic-menu-item/ic-menu-item.d.ts +11 -5
  604. package/dist/types/components/ic-navigation-button/ic-navigation-button.d.ts +6 -2
  605. package/dist/types/components/ic-navigation-group/ic-navigation-group.d.ts +6 -2
  606. package/dist/types/components/ic-navigation-item/ic-navigation-item.d.ts +13 -2
  607. package/dist/types/components/ic-navigation-menu/ic-navigation-menu.d.ts +5 -0
  608. package/dist/types/components/ic-page-header/ic-page-header.d.ts +5 -1
  609. package/dist/types/components/ic-pagination/ic-pagination.d.ts +9 -5
  610. package/dist/types/components/ic-pagination-item/ic-pagination-item.d.ts +9 -5
  611. package/dist/types/components/ic-popover-menu/ic-popover-menu.d.ts +3 -6
  612. package/dist/types/components/ic-radio-group/ic-radio-group.d.ts +6 -1
  613. package/dist/types/components/ic-radio-option/ic-radio-option.d.ts +5 -1
  614. package/dist/types/components/ic-search-bar/ic-search-bar.d.ts +5 -1
  615. package/dist/types/components/ic-select/ic-select.d.ts +6 -2
  616. package/dist/types/components/ic-status-tag/ic-status-tag.d.ts +4 -0
  617. package/dist/types/components/ic-tab-group/ic-tab-group.d.ts +0 -4
  618. package/dist/types/components/ic-text-field/ic-text-field.d.ts +5 -1
  619. package/dist/types/components/ic-toggle-button/ic-toggle-button.d.ts +9 -5
  620. package/dist/types/components/ic-toggle-button-group/ic-toggle-button-group.d.ts +12 -5
  621. package/dist/types/components/ic-top-navigation/ic-top-navigation.d.ts +5 -1
  622. package/dist/types/components.d.ts +328 -79
  623. package/dist/types/utils/helpers.d.ts +2 -2
  624. package/hydrate/index.js +550 -330
  625. package/package.json +2 -2
  626. package/vscode-data.json +482 -118
  627. package/dist/cjs/helpers-69219f14.js.map +0 -1
  628. package/dist/core/p-0395442c.entry.js +0 -2
  629. package/dist/core/p-0395442c.entry.js.map +0 -1
  630. package/dist/core/p-0d233b0c.entry.js +0 -2
  631. package/dist/core/p-0d233b0c.entry.js.map +0 -1
  632. package/dist/core/p-134def81.entry.js +0 -2
  633. package/dist/core/p-134def81.entry.js.map +0 -1
  634. package/dist/core/p-14dfd8db.entry.js.map +0 -1
  635. package/dist/core/p-1b116dd1.entry.js +0 -2
  636. package/dist/core/p-1b116dd1.entry.js.map +0 -1
  637. package/dist/core/p-21cc87c0.entry.js +0 -2
  638. package/dist/core/p-21cc87c0.entry.js.map +0 -1
  639. package/dist/core/p-2eae9b27.entry.js +0 -2
  640. package/dist/core/p-2eae9b27.entry.js.map +0 -1
  641. package/dist/core/p-31fc8756.entry.js +0 -2
  642. package/dist/core/p-31fc8756.entry.js.map +0 -1
  643. package/dist/core/p-3618ac34.entry.js +0 -2
  644. package/dist/core/p-3618ac34.entry.js.map +0 -1
  645. package/dist/core/p-384d454d.entry.js +0 -2
  646. package/dist/core/p-384d454d.entry.js.map +0 -1
  647. package/dist/core/p-3d417eff.entry.js +0 -2
  648. package/dist/core/p-3d417eff.entry.js.map +0 -1
  649. package/dist/core/p-3d9726a3.entry.js +0 -2
  650. package/dist/core/p-3d9726a3.entry.js.map +0 -1
  651. package/dist/core/p-43256b7c.entry.js +0 -2
  652. package/dist/core/p-43256b7c.entry.js.map +0 -1
  653. package/dist/core/p-4a3b1f06.entry.js.map +0 -1
  654. package/dist/core/p-50ead56c.entry.js.map +0 -1
  655. package/dist/core/p-5cd016e1.entry.js.map +0 -1
  656. package/dist/core/p-5ef8e106.entry.js +0 -2
  657. package/dist/core/p-5ef8e106.entry.js.map +0 -1
  658. package/dist/core/p-6d3e4bb1.entry.js +0 -2
  659. package/dist/core/p-6d3e4bb1.entry.js.map +0 -1
  660. package/dist/core/p-726673ee.entry.js.map +0 -1
  661. package/dist/core/p-72d30c8a.entry.js +0 -2
  662. package/dist/core/p-72d30c8a.entry.js.map +0 -1
  663. package/dist/core/p-76263187.entry.js +0 -2
  664. package/dist/core/p-76263187.entry.js.map +0 -1
  665. package/dist/core/p-7827b5cb.entry.js +0 -2
  666. package/dist/core/p-7827b5cb.entry.js.map +0 -1
  667. package/dist/core/p-79d0be03.entry.js +0 -2
  668. package/dist/core/p-79d0be03.entry.js.map +0 -1
  669. package/dist/core/p-7fbf2d3e.entry.js +0 -2
  670. package/dist/core/p-7fbf2d3e.entry.js.map +0 -1
  671. package/dist/core/p-91cf9b2b.entry.js +0 -2
  672. package/dist/core/p-91cf9b2b.entry.js.map +0 -1
  673. package/dist/core/p-97fb2bdf.entry.js +0 -2
  674. package/dist/core/p-97fb2bdf.entry.js.map +0 -1
  675. package/dist/core/p-ac4b7329.entry.js +0 -2
  676. package/dist/core/p-ac4b7329.entry.js.map +0 -1
  677. package/dist/core/p-b01ffa55.entry.js.map +0 -1
  678. package/dist/core/p-b17c94b7.entry.js +0 -2
  679. package/dist/core/p-b17c94b7.entry.js.map +0 -1
  680. package/dist/core/p-b78f8b8c.entry.js.map +0 -1
  681. package/dist/core/p-b7eb8ef9.js.map +0 -1
  682. package/dist/core/p-b95a72a3.entry.js +0 -2
  683. package/dist/core/p-b95a72a3.entry.js.map +0 -1
  684. package/dist/core/p-b997064c.entry.js +0 -2
  685. package/dist/core/p-b997064c.entry.js.map +0 -1
  686. package/dist/core/p-ba6ecc15.entry.js +0 -2
  687. package/dist/core/p-ba6ecc15.entry.js.map +0 -1
  688. package/dist/core/p-c0fc3d02.entry.js +0 -2
  689. package/dist/core/p-c0fc3d02.entry.js.map +0 -1
  690. package/dist/core/p-c396bd4d.entry.js +0 -2
  691. package/dist/core/p-c396bd4d.entry.js.map +0 -1
  692. package/dist/core/p-c9cf932c.entry.js.map +0 -1
  693. package/dist/core/p-cf7db84a.entry.js +0 -2
  694. package/dist/core/p-cf7db84a.entry.js.map +0 -1
  695. package/dist/core/p-dd36bf1b.entry.js.map +0 -1
  696. package/dist/core/p-e488de54.entry.js +0 -2
  697. package/dist/core/p-e488de54.entry.js.map +0 -1
  698. package/dist/core/p-e4d1839e.entry.js +0 -2
  699. package/dist/core/p-e4d1839e.entry.js.map +0 -1
  700. package/dist/core/p-eb3b4935.entry.js +0 -2
  701. package/dist/core/p-eb3b4935.entry.js.map +0 -1
  702. package/dist/core/p-ebafab37.entry.js +0 -2
  703. package/dist/core/p-ebafab37.entry.js.map +0 -1
  704. package/dist/core/p-f0fc1bf0.entry.js +0 -2
  705. package/dist/core/p-f0fc1bf0.entry.js.map +0 -1
  706. package/dist/core/p-f24984c5.entry.js +0 -2
  707. package/dist/core/p-f24984c5.entry.js.map +0 -1
  708. package/dist/core/p-f60dbd0e.entry.js +0 -2
  709. package/dist/core/p-f60dbd0e.entry.js.map +0 -1
  710. package/dist/core/p-f71c00ce.entry.js +0 -2
  711. package/dist/core/p-f71c00ce.entry.js.map +0 -1
  712. package/dist/core/p-ff4298b1.entry.js +0 -2
  713. package/dist/core/p-ff4298b1.entry.js.map +0 -1
  714. package/dist/esm/helpers-e8797e8d.js.map +0 -1
  715. /package/dist/core/{p-37dea10d.entry.js.map → p-0cef50b7.entry.js.map} +0 -0
  716. /package/dist/core/{p-f5b2b26d.entry.js.map → p-15fd6539.entry.js.map} +0 -0
  717. /package/dist/core/{p-690c5e80.entry.js.map → p-685d6aa9.entry.js.map} +0 -0
  718. /package/dist/core/{p-95f603dd.entry.js.map → p-ba37e169.entry.js.map} +0 -0
  719. /package/dist/core/{p-922984cb.entry.js.map → p-c5d3c71e.entry.js.map} +0 -0
  720. /package/dist/core/{p-7b35de65.entry.js.map → p-cdbc3414.entry.js.map} +0 -0
  721. /package/dist/core/{p-ee6dd94c.entry.js.map → p-ec097c1f.entry.js.map} +0 -0
  722. /package/dist/core/{p-acbd15ab.entry.js.map → p-f580f0ce.entry.js.map} +0 -0
@@ -1 +1 @@
1
- {"file":"ic-switch.js","mappings":";;;;;AAAA,MAAM,WAAW,GAAG,stNAAstN;;ACuB1uN,IAAI,QAAQ,GAAG,CAAC,CAAC;MAYJ,MAAM;;;;;;;;QACT,YAAO,GAAG,mBAAmB,QAAQ,EAAE,EAAE,CAAC;QA4G1C,iBAAY,GAAG;YACrB,IAAI,CAAC,YAAY,GAAG,CAAC,IAAI,CAAC,YAAY,CAAC;YACvC,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC;gBACjB,OAAO,EAAE,IAAI,CAAC,YAAY;gBAC1B,KAAK,EAAE,IAAI,CAAC,KAAK;aAClB,CAAC,CAAC;SACJ,CAAC;QAEM,YAAO,GAAG;YAChB,IAAI,CAAC,OAAO,CAAC,IAAI,EAAE,CAAC;SACrB,CAAC;QAEM,WAAM,GAAG;YACf,IAAI,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC;SACpB,CAAC;QAEM,oBAAe,GAAG;YACxB,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC,gBAAgB,CAAC;SAC3C,CAAC;4BA1H+B,KAAK;gCACV,IAAI,CAAC,OAAO;uBAKZ,KAAK;wBAUJ,KAAK;0BAKJ,EAAE;yBAKF,KAAK;;oBAUX,IAAI,CAAC,OAAO;yBAKN,KAAK;oBAKH,QAAQ;qBAKV,SAAS;qBASP,IAAI;;IAnDpC,oBAAoB;QAClB,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC,OAAO,CAAC;KAClC;IAkED,oBAAoB;QAClB,uBAAuB,CAAC,IAAI,CAAC,EAAE,EAAE,I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ACX,EAAE,EAAC,GAAG,EACN,EAAE,EAAC,GAAG,EACN,CAAC,EAAE,IAAI,KAAK,OAAO,GAAG,OAAO,GAAG,OAAO,GACvC,CACE,CACD,EACP,YAAM,IAAI,EAAC,iBAAiB,GAAQ,EACnC,SAAS,KACR,oCACc,MAAM,EAClB,OAAO,EAAC,OAAO,EACf,KAAK,EAAC,0BAA0B,IAE/B,YAAY,GAAG,IAAI,GAAG,KAAK,CACd,CACjB,CACK,CACH,EACP;KACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["src/components/ic-switch/ic-switch.css?tag=ic-switch&encapsulation=shadow","src/components/ic-switch/ic-switch.tsx"],"sourcesContent":["@import \"../../global/normalize.css\";\n\n:host {\n display: inline-block;\n}\n\ninput {\n overflow: hidden;\n appearance: none;\n}\n\n.ic-switch-container {\n display: flex;\n flex-wrap: wrap;\n align-items: center;\n gap: var(--ic-space-xxs);\n cursor: pointer;\n}\n\n.ic-switch-label {\n margin-left: var(--ic-space-xxs);\n margin-bottom: var(--ic-space-sm);\n}\n\n.ic-switch-label-small {\n margin-bottom: 0.625rem;\n}\n\n.ic-switch-toggle {\n display: flex;\n align-items: center;\n justify-content: space-around;\n width: 4rem;\n height: var(--ic-space-xl);\n position: relative;\n border-radius: 100vw;\n background-color: var(--ic-switch-unchecked-bg);\n border: var(--ic-border-width) solid var(--ic-switch-unchecked);\n box-sizing: border-box;\n transition: var(--ic-transition-duration-fast);\n}\n\n.ic-switch-line-break {\n flex: 1 0 100%;\n}\n\n.ic-switch-checked-status {\n padding-left: var(--ic-space-xxs);\n width: var(--ic-space-lg);\n color: var(--ic-switch-help-text);\n}\n\n.ic-switch-toggle::before {\n content: \"\";\n width: 1.333rem;\n height: 1.333rem;\n border-radius: 50%;\n position: absolute;\n z-index: 2;\n top: 50%;\n left: 0.333rem;\n transform: translate(0, -50%);\n background-color: var(--ic-switch-unchecked);\n transition: var(--ic-transition-duration-slow);\n}\n\n.ic-switch-icon {\n display: inline-block;\n vertical-align: middle;\n width: 0.625rem;\n height: 0.625rem;\n}\n\n.ic-switch-icon-circle,\n.ic-switch-icon-line {\n stroke-width: 1;\n}\n\n.ic-switch-icon-circle {\n stroke: var(--ic-switch-indicator-off);\n}\n\n.ic-switch-icon-line {\n stroke: var(--ic-switch-indicator-on);\n}\n\n@media (prefers-reduced-motion: reduce) {\n .ic-switch-toggle::before {\n transition-duration: 0ms;\n }\n}\n\n.ic-switch-input:checked + .ic-switch-toggle {\n background-color: var(--ic-switch-checked-bg);\n border: none;\n}\n\n.ic-switch-input:checked + .ic-switch-toggle::before {\n transform: translate(var(--ic-space-xl), -50%);\n background-color: var(--ic-switch-checked);\n}\n\n.ic-switch-input:not([disabled]) + .ic-switch-toggle:hover::before {\n box-shadow: 0 0 0 0.75rem var(--ic-switch-unchecked-bg-hover);\n}\n\n.ic-switch-input:not([disabled]) + .ic-switch-toggle:active::before {\n box-shadow: 0 0 0 0.75rem var(--ic-switch-unchecked-bg-pressed);\n}\n\n.ic-switch-input:not([disabled]):checked + .ic-switch-toggle:hover::before {\n box-shadow: 0 0 0 0.75rem var(--ic-switch-checked-bg-hover);\n}\n\n.ic-switch-input:not([disabled]):checked + .ic-switch-toggle:active::before {\n box-shadow: 0 0 0 0.75rem var(--ic-switch-checked-bg-pressed);\n}\n\n.ic-switch-input:focus:not([disabled]) + .ic-switch-toggle,\n.ic-switch-input:focus-visible:not([disabled]) + .ic-switch-toggle {\n box-shadow: var(--ic-border-focus);\n}\n\n.ic-switch-disabled {\n cursor: default;\n}\n\n.ic-switch-disabled .ic-switch-icon-circle {\n stroke: var(--ic-switch-indicator-off-disabled);\n}\n\n.ic-switch-disabled .ic-switch-icon-line {\n stroke: var(--ic-switch-indicator-on-disabled);\n}\n\n.ic-switch-input:disabled + .ic-switch-toggle {\n background-color: var(--ic-switch-unchecked-bg-disabled);\n border: var(--ic-space-1px) dashed var(--ic-switch-unchecked-outline-disabled);\n}\n\n.ic-switch-input:disabled ~ .ic-switch-checked-status {\n color: var(--ic-architectural-300);\n}\n\n.ic-switch-input:disabled + .ic-switch-toggle::before {\n background-color: var(--ic-switch-unchecked-disabled);\n}\n\n.ic-switch-input:disabled:checked + .ic-switch-toggle {\n background-color: var(--ic-switch-checked-bg-disabled);\n border: var(--ic-border-width) dashed\n var(--ic-switch-checked-outline-disabled);\n}\n\n.ic-switch-input:disabled:checked + .ic-switch-toggle::before {\n background-color: var(--ic-switch-checked);\n}\n\n.ic-switch-small {\n gap: var(--ic-space-xxxs);\n}\n\n.ic-switch-small .ic-switch-checked-status {\n padding-left: 0.375rem;\n}\n\n.ic-switch-small .ic-switch-toggle {\n width: var(--ic-space-xxl);\n height: var(--ic-space-lg);\n}\n\n.ic-switch-small .ic-switch-toggle::before {\n width: var(--ic-space-md);\n height: var(--ic-space-md);\n left: var(--ic-space-xxs);\n}\n\n.ic-switch-small .ic-switch-input:checked + .ic-switch-toggle::before {\n transform: translate(var(--ic-space-lg), -50%);\n}\n\n::slotted(*) {\n margin-left: var(--ic-space-sm);\n}\n\n::slotted(svg) {\n fill: var(--ic-switch-icon);\n}\n\n@media (forced-colors: active) {\n .ic-switch-toggle::before,\n .ic-switch-input:checked + .ic-switch-toggle {\n border: var(--ic-border-hc);\n }\n\n .ic-switch-input:focus + .ic-switch-toggle {\n border-color: highlight;\n outline: var(--ic-space-xxxs) solid highlight;\n }\n\n .ic-switch-input:checked + .ic-switch-toggle::before {\n transform: translate(calc(var(--ic-space-xl) - 0.125rem), -50%);\n }\n\n .ic-switch-input:disabled + .ic-switch-toggle,\n .ic-switch-input:disabled:checked + .ic-switch-toggle,\n .ic-switch-input:disabled + .ic-switch-toggle::before {\n border-color: GrayText;\n }\n\n .ic-switch-input:disabled ~ .ic-switch-checked-status {\n color: GrayText;\n }\n\n .ic-switch-disabled .ic-switch-icon-circle,\n .ic-switch-disabled .ic-switch-icon-line {\n stroke: GrayText;\n }\n}\n","import {\n Component,\n Host,\n h,\n Prop,\n State,\n Element,\n Event,\n EventEmitter,\n Method,\n Watch,\n} from \"@stencil/core\";\nimport {\n getInputDescribedByText,\n onComponentRequiredPropUndefined,\n renderHiddenInput,\n addFormResetListener,\n removeFormResetListener,\n removeDisabledFalse,\n} from \"../../utils/helpers\";\nimport { IcSwitchChangeEventDetail } from \"./ic-switch.types\";\nimport { IcSizesNoLarge, IcThemeMode } from \"../../utils/types\";\n\nlet inputIds = 0;\n\n/**\n * @slot right-adornment - Content is placed to the right of switch before state label.\n */\n@Component({\n tag: \"ic-switch\",\n styleUrl: \"ic-switch.css\",\n shadow: {\n delegatesFocus: true,\n },\n})\nexport class Switch {\n private inputId = `ic-switch-input-${inputIds++}`;\n\n @Element() el: HTMLIcSwitchElement;\n\n @State() checkedState: boolean = false;\n @State() initiallyChecked = this.checked;\n\n /**\n * If `true`, the switch will display as checked.\n */\n @Prop() checked?: boolean = false;\n\n @Watch(\"checked\")\n checkedChangeHandler(): void {\n this.checkedState = this.checked;\n }\n\n /**\n * If `true`, the disabled state will be set.\n */\n @Prop() disabled?: boolean = false;\n\n /**\n * The helper text that will be displayed for additional field guidance.\n */\n @Prop() helperText?: string = \"\";\n\n /**\n * If `true`, the label will be hidden and the required label value will be applied as an aria-label.\n */\n @Prop() hideLabel?: boolean = false;\n\n /**\n * The aria-label applied to the switch when no visual 'name' is provided.\n */\n @Prop() label!: string;\n\n /**\n * The name of the control, which is submitted with the form data.\n */\n @Prop() name?: string = this.inputId;\n\n /**\n * If `true`, the switch will render the On/Off state text.\n */\n @Prop() showState?: boolean = false;\n\n /**\n * The size of the switch component.\n */\n @Prop() size?: IcSizesNoLarge = \"medium\";\n\n /**\n * Sets the theme color to the dark or light theme color. \"inherit\" will set the color based on the system settings or ic-theme component.\n */\n @Prop() theme?: IcThemeMode = \"inherit\";\n\n /**\n * The value of the toggle does not mean if it's checked or not, use the `checked`\n * property for that.\n *\n * The value of a toggle is analogous to the value of a `<input type=\"checkbox\">`,\n * it's only used when the toggle participates in a native `<form>`.\n */\n @Prop() value?: string | null = \"on\";\n\n /**\n * Emitted when the toggle loses focus.\n */\n @Event() icBlur!: EventEmitter<void>;\n\n /**\n * Emitted when the value property has changed.\n */\n @Event() icChange!: EventEmitter<IcSwitchChangeEventDetail>;\n\n /**\n * Emitted when the toggle has focus.\n */\n @Event() icFocus!: EventEmitter<void>;\n\n disconnectedCallback(): void {\n removeFormResetListener(this.el, this.handleFormReset);\n }\n\n componentWillLoad(): void {\n this.checkedState = this.checked;\n addFormResetListener(this.el, this.handleFormReset);\n removeDisabledFalse(this.disabled, this.el);\n }\n\n componentDidLoad(): void {\n onComponentRequiredPropUndefined(\n [{ prop: this.label, propName: \"label\" }],\n \"Switch\"\n );\n }\n\n /**\n * Sets focus on the switch.\n */\n @Method()\n async setFocus(): Promise<void> {\n if (this.el.shadowRoot.querySelector(\"input\")) {\n this.el.shadowRoot.querySelector(\"input\").focus();\n }\n }\n\n private handleChange = () => {\n this.checkedState = !this.checkedState;\n this.icChange.emit({\n checked: this.checkedState,\n value: this.value,\n });\n };\n\n private onFocus = () => {\n this.icFocus.emit();\n };\n\n private onBlur = () => {\n this.icBlur.emit();\n };\n\n private handleFormReset = (): void => {\n this.checkedState = this.initiallyChecked;\n };\n\n render() {\n const {\n label,\n checkedState,\n size,\n disabled,\n name,\n showState,\n value,\n hideLabel,\n helperText,\n inputId,\n theme,\n } = this;\n\n renderHiddenInput(true, this.el, name, checkedState ? value : \"\", disabled);\n\n const describedBy = getInputDescribedByText(\n inputId,\n helperText !== \"\",\n false\n );\n\n return (\n <Host\n class={{\n [`ic-theme-${theme}`]: theme !== \"inherit\",\n }}\n >\n <label\n class={{\n [\"ic-switch-container\"]: true,\n [\"ic-switch-disabled\"]: disabled,\n [\"ic-switch-small\"]: size === \"small\",\n }}\n htmlFor={inputId}\n >\n {!hideLabel && (\n <ic-input-label\n for={inputId}\n label={label}\n helperText={helperText}\n readonly={true}\n disabled={disabled}\n class={{\n [\"ic-switch-label\"]: true,\n [\"ic-switch-label-small\"]: size === \"small\",\n }}\n ></ic-input-label>\n )}\n {!hideLabel && <span class=\"ic-switch-line-break\"></span>}\n <input\n checked={checkedState}\n disabled={disabled}\n aria-label={label}\n aria-checked={checkedState ? \"true\" : \"false\"}\n aria-describedby={describedBy}\n role=\"switch\"\n class=\"ic-switch-input\"\n type=\"checkbox\"\n name=\"toggle\"\n id={inputId}\n onFocus={this.onFocus}\n onBlur={this.onBlur}\n onChange={this.handleChange}\n />\n <span class=\"ic-switch-toggle\">\n <svg\n class=\"ic-switch-icon\"\n aria-hidden=\"true\"\n focusable=\"false\"\n viewBox=\"0 0 10 10\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <line\n class=\"ic-switch-icon-line\"\n x1=\"9\"\n y1={size === \"small\" ? \"2\" : \"1\"}\n x2=\"9\"\n y2={size === \"small\" ? \"8\" : \"9\"}\n />\n </svg>\n <svg\n class=\"ic-switch-icon\"\n aria-hidden=\"true\"\n focusable=\"false\"\n viewBox=\"0 0 10 10\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <circle\n class=\"ic-switch-icon-circle\"\n fill=\"none\"\n cx=\"5\"\n cy=\"5\"\n r={size === \"small\" ? \"3.335\" : \"4.445\"}\n />\n </svg>\n </span>\n <slot name=\"right-adornment\"></slot>\n {showState && (\n <ic-typography\n aria-hidden=\"true\"\n variant=\"label\"\n class=\"ic-switch-checked-status\"\n >\n {checkedState ? \"On\" : \"Off\"}\n </ic-typography>\n )}\n </label>\n </Host>\n );\n }\n}\n"],"version":3}
1
+ {"file":"ic-switch.js","mappings":";;;;;AAAA,MAAM,WAAW,GAAG,u0NAAu0N;;ACuB31N,IAAI,QAAQ,GAAG,CAAC,CAAC;MAYJ,MAAM;;;;;;;;QACT,YAAO,GAAG,mBAAmB,QAAQ,EAAE,EAAE,CAAC;QA4G1C,iBAAY,GAAG;YACrB,IAAI,CAAC,YAAY,GAAG,CAAC,IAAI,CAAC,YAAY,CAAC;YACvC,IAAI,CAAC,QAA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EAAC,QAAQ,EACb,EAAE,EAAE,OAAO,EACX,OAAO,EAAE,IAAI,CAAC,OAAO,EACrB,MAAM,EAAE,IAAI,CAAC,MAAM,EACnB,QAAQ,EAAE,IAAI,CAAC,YAAY,GAC3B,EACF,YAAM,KAAK,EAAC,kBAAkB,IAC5B,WACE,KAAK,EAAC,gBAAgB,iBACV,MAAM,EAClB,SAAS,EAAC,OAAO,EACjB,OAAO,EAAC,WAAW,EACnB,KAAK,EAAC,4BAA4B,IAElC,YACE,KAAK,EAAC,qBAAqB,EAC3B,EAAE,EAAC,GAAG,EACN,EAAE,EAAE,IAAI,KAAK,OAAO,GAAG,GAAG,GAAG,GAAG,EAChC,EAAE,EAAC,GAAG,EACN,EAAE,EAAE,IAAI,KAAK,OAAO,GAAG,GAAG,GAAG,GAAG,GAChC,CACE,EACN,WACE,KAAK,EAAC,gBAAgB,iBACV,MAAM,EAClB,SAAS,EAAC,OAAO,EACjB,OAAO,EAAC,WAAW,EACnB,KAAK,EAAC,4BAA4B,IAElC,cACE,KAAK,EAAC,uBAAuB,EAC7B,IAAI,EAAC,MAAM,EACX,EAAE,EAAC,GAAG,EACN,EAAE,EAAC,GAAG,EACN,CAAC,EAAE,IAAI,KAAK,OAAO,GAAG,OAAO,GAAG,OAAO,GACvC,CACE,CACD,EACP,YAAM,IAAI,EAAC,iBAAiB,GAAQ,EACnC,SAAS,KACR,oCACc,MAAM,EAClB,OAAO,EAAC,OAAO,EACf,KAAK,EAAC,0BAA0B,IAE/B,YAAY,GAAG,IAAI,GAAG,KAAK,CACd,CACjB,CACK,CACH,EACP;KACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["src/components/ic-switch/ic-switch.css?tag=ic-switch&encapsulation=shadow","src/components/ic-switch/ic-switch.tsx"],"sourcesContent":["@import \"../../global/normalize.css\";\n\n:host {\n display: inline-block;\n\n --ic-input-label-text-color: var(--ic-switch-label);\n --ic-input-label-helper-text-color: var(--ic-switch-help-text);\n}\n\ninput {\n overflow: hidden;\n appearance: none;\n}\n\n.ic-switch-container {\n display: flex;\n flex-wrap: wrap;\n align-items: center;\n gap: var(--ic-space-xxs);\n cursor: pointer;\n}\n\n.ic-switch-label {\n margin-left: var(--ic-space-xxs);\n margin-bottom: var(--ic-space-sm);\n}\n\n.ic-switch-label-small {\n margin-bottom: 0.625rem;\n}\n\n.ic-switch-toggle {\n display: flex;\n align-items: center;\n justify-content: space-around;\n width: 4rem;\n height: var(--ic-space-xl);\n position: relative;\n border-radius: 100vw;\n background-color: var(--ic-switch-unchecked-bg);\n border: var(--ic-border-width) solid var(--ic-switch-unchecked);\n box-sizing: border-box;\n transition: var(--ic-transition-duration-fast);\n}\n\n.ic-switch-line-break {\n flex: 1 0 100%;\n}\n\n.ic-switch-checked-status {\n padding-left: var(--ic-space-xxs);\n width: var(--ic-space-lg);\n color: var(--ic-switch-help-text);\n}\n\n.ic-switch-toggle::before {\n content: \"\";\n width: 1.333rem;\n height: 1.333rem;\n border-radius: 50%;\n position: absolute;\n z-index: 2;\n top: 50%;\n left: 0.333rem;\n transform: translate(0, -50%);\n background-color: var(--ic-switch-unchecked);\n transition: var(--ic-transition-duration-slow);\n}\n\n.ic-switch-icon {\n display: inline-block;\n vertical-align: middle;\n width: 0.625rem;\n height: 0.625rem;\n}\n\n.ic-switch-icon-circle,\n.ic-switch-icon-line {\n stroke-width: 1;\n}\n\n.ic-switch-icon-circle {\n stroke: var(--ic-switch-indicator-off);\n}\n\n.ic-switch-icon-line {\n stroke: var(--ic-switch-indicator-on);\n}\n\n@media (prefers-reduced-motion: reduce) {\n .ic-switch-toggle::before {\n transition-duration: 0ms;\n }\n}\n\n.ic-switch-input:checked + .ic-switch-toggle {\n background-color: var(--ic-switch-checked-bg);\n border: none;\n}\n\n.ic-switch-input:checked + .ic-switch-toggle::before {\n transform: translate(var(--ic-space-xl), -50%);\n background-color: var(--ic-switch-checked);\n}\n\n.ic-switch-input:not([disabled]) + .ic-switch-toggle:hover::before {\n box-shadow: 0 0 0 0.75rem var(--ic-switch-unchecked-bg-hover);\n}\n\n.ic-switch-input:not([disabled]) + .ic-switch-toggle:active::before {\n box-shadow: 0 0 0 0.75rem var(--ic-switch-unchecked-bg-pressed);\n}\n\n.ic-switch-input:not([disabled]):checked + .ic-switch-toggle:hover::before {\n box-shadow: 0 0 0 0.75rem var(--ic-switch-checked-bg-hover);\n}\n\n.ic-switch-input:not([disabled]):checked + .ic-switch-toggle:active::before {\n box-shadow: 0 0 0 0.75rem var(--ic-switch-checked-bg-pressed);\n}\n\n.ic-switch-input:focus:not([disabled]) + .ic-switch-toggle,\n.ic-switch-input:focus-visible:not([disabled]) + .ic-switch-toggle {\n box-shadow: var(--ic-border-focus);\n}\n\n.ic-switch-disabled {\n cursor: default;\n}\n\n.ic-switch-disabled .ic-switch-icon-circle {\n stroke: var(--ic-switch-indicator-off-disabled);\n}\n\n.ic-switch-disabled .ic-switch-icon-line {\n stroke: var(--ic-switch-indicator-on-disabled);\n}\n\n.ic-switch-input:disabled + .ic-switch-toggle {\n background-color: var(--ic-switch-unchecked-bg-disabled);\n border: var(--ic-space-1px) dashed var(--ic-switch-unchecked-outline-disabled);\n}\n\n.ic-switch-input:disabled ~ .ic-switch-checked-status {\n color: var(--ic-architectural-300);\n}\n\n.ic-switch-input:disabled + .ic-switch-toggle::before {\n background-color: var(--ic-switch-unchecked-disabled);\n}\n\n.ic-switch-input:disabled:checked + .ic-switch-toggle {\n background-color: var(--ic-switch-checked-bg-disabled);\n border: var(--ic-border-width) dashed\n var(--ic-switch-checked-outline-disabled);\n}\n\n.ic-switch-input:disabled:checked + .ic-switch-toggle::before {\n background-color: var(--ic-switch-checked);\n}\n\n.ic-switch-small {\n gap: var(--ic-space-xxxs);\n}\n\n.ic-switch-small .ic-switch-checked-status {\n padding-left: 0.375rem;\n}\n\n.ic-switch-small .ic-switch-toggle {\n width: var(--ic-space-xxl);\n height: var(--ic-space-lg);\n}\n\n.ic-switch-small .ic-switch-toggle::before {\n width: var(--ic-space-md);\n height: var(--ic-space-md);\n left: var(--ic-space-xxs);\n}\n\n.ic-switch-small .ic-switch-input:checked + .ic-switch-toggle::before {\n transform: translate(var(--ic-space-lg), -50%);\n}\n\n::slotted(*) {\n margin-left: var(--ic-space-sm);\n}\n\n::slotted(svg) {\n fill: var(--ic-switch-icon);\n}\n\n@media (forced-colors: active) {\n .ic-switch-toggle::before,\n .ic-switch-input:checked + .ic-switch-toggle {\n border: var(--ic-border-hc);\n }\n\n .ic-switch-input:focus + .ic-switch-toggle {\n border-color: highlight;\n outline: var(--ic-space-xxxs) solid highlight;\n }\n\n .ic-switch-input:checked + .ic-switch-toggle::before {\n transform: translate(calc(var(--ic-space-xl) - 0.125rem), -50%);\n }\n\n .ic-switch-input:disabled + .ic-switch-toggle,\n .ic-switch-input:disabled:checked + .ic-switch-toggle,\n .ic-switch-input:disabled + .ic-switch-toggle::before {\n border-color: GrayText;\n }\n\n .ic-switch-input:disabled ~ .ic-switch-checked-status {\n color: GrayText;\n }\n\n .ic-switch-disabled .ic-switch-icon-circle,\n .ic-switch-disabled .ic-switch-icon-line {\n stroke: GrayText;\n }\n}\n","import {\n Component,\n Host,\n h,\n Prop,\n State,\n Element,\n Event,\n EventEmitter,\n Method,\n Watch,\n} from \"@stencil/core\";\nimport {\n getInputDescribedByText,\n onComponentRequiredPropUndefined,\n renderHiddenInput,\n addFormResetListener,\n removeFormResetListener,\n removeDisabledFalse,\n} from \"../../utils/helpers\";\nimport { IcSwitchChangeEventDetail } from \"./ic-switch.types\";\nimport { IcSizesNoLarge, IcThemeMode } from \"../../utils/types\";\n\nlet inputIds = 0;\n\n/**\n * @slot right-adornment - Content is placed to the right of switch before state label.\n */\n@Component({\n tag: \"ic-switch\",\n styleUrl: \"ic-switch.css\",\n shadow: {\n delegatesFocus: true,\n },\n})\nexport class Switch {\n private inputId = `ic-switch-input-${inputIds++}`;\n\n @Element() el: HTMLIcSwitchElement;\n\n @State() checkedState: boolean = false;\n @State() initiallyChecked = this.checked;\n\n /**\n * If `true`, the switch will display as checked.\n */\n @Prop() checked?: boolean = false;\n\n @Watch(\"checked\")\n checkedChangeHandler(): void {\n this.checkedState = this.checked;\n }\n\n /**\n * If `true`, the disabled state will be set.\n */\n @Prop() disabled?: boolean = false;\n\n /**\n * The helper text that will be displayed for additional field guidance.\n */\n @Prop() helperText?: string = \"\";\n\n /**\n * If `true`, the label will be hidden and the required label value will be applied as an aria-label.\n */\n @Prop() hideLabel?: boolean = false;\n\n /**\n * The aria-label applied to the switch when no visual 'name' is provided.\n */\n @Prop() label!: string;\n\n /**\n * The name of the control, which is submitted with the form data.\n */\n @Prop() name?: string = this.inputId;\n\n /**\n * If `true`, the switch will render the On/Off state text.\n */\n @Prop() showState?: boolean = false;\n\n /**\n * The size of the switch component.\n */\n @Prop() size?: IcSizesNoLarge = \"medium\";\n\n /**\n * Sets the theme color to the dark or light theme color. \"inherit\" will set the color based on the system settings or ic-theme component.\n */\n @Prop() theme?: IcThemeMode = \"inherit\";\n\n /**\n * The value of the toggle does not mean if it's checked or not, use the `checked`\n * property for that.\n *\n * The value of a toggle is analogous to the value of a `<input type=\"checkbox\">`,\n * it's only used when the toggle participates in a native `<form>`.\n */\n @Prop() value?: string | null = \"on\";\n\n /**\n * Emitted when the toggle loses focus.\n */\n @Event() icBlur!: EventEmitter<void>;\n\n /**\n * Emitted when the value property has changed.\n */\n @Event() icChange!: EventEmitter<IcSwitchChangeEventDetail>;\n\n /**\n * Emitted when the toggle has focus.\n */\n @Event() icFocus!: EventEmitter<void>;\n\n disconnectedCallback(): void {\n removeFormResetListener(this.el, this.handleFormReset);\n }\n\n componentWillLoad(): void {\n this.checkedState = this.checked;\n addFormResetListener(this.el, this.handleFormReset);\n removeDisabledFalse(this.disabled, this.el);\n }\n\n componentDidLoad(): void {\n onComponentRequiredPropUndefined(\n [{ prop: this.label, propName: \"label\" }],\n \"Switch\"\n );\n }\n\n /**\n * Sets focus on the switch.\n */\n @Method()\n async setFocus(): Promise<void> {\n if (this.el.shadowRoot.querySelector(\"input\")) {\n this.el.shadowRoot.querySelector(\"input\").focus();\n }\n }\n\n private handleChange = () => {\n this.checkedState = !this.checkedState;\n this.icChange.emit({\n checked: this.checkedState,\n value: this.value,\n });\n };\n\n private onFocus = () => {\n this.icFocus.emit();\n };\n\n private onBlur = () => {\n this.icBlur.emit();\n };\n\n private handleFormReset = (): void => {\n this.checkedState = this.initiallyChecked;\n };\n\n render() {\n const {\n label,\n checkedState,\n size,\n disabled,\n name,\n showState,\n value,\n hideLabel,\n helperText,\n inputId,\n theme,\n } = this;\n\n renderHiddenInput(true, this.el, name, checkedState ? value : \"\", disabled);\n\n const describedBy = getInputDescribedByText(\n inputId,\n helperText !== \"\",\n false\n );\n\n return (\n <Host\n class={{\n [`ic-theme-${theme}`]: theme !== \"inherit\",\n }}\n >\n <label\n class={{\n [\"ic-switch-container\"]: true,\n [\"ic-switch-disabled\"]: disabled,\n [\"ic-switch-small\"]: size === \"small\",\n }}\n htmlFor={inputId}\n >\n {!hideLabel && (\n <ic-input-label\n for={inputId}\n label={label}\n helperText={helperText}\n readonly={true}\n disabled={disabled}\n class={{\n [\"ic-switch-label\"]: true,\n [\"ic-switch-label-small\"]: size === \"small\",\n }}\n ></ic-input-label>\n )}\n {!hideLabel && <span class=\"ic-switch-line-break\"></span>}\n <input\n checked={checkedState}\n disabled={disabled}\n aria-label={label}\n aria-checked={checkedState ? \"true\" : \"false\"}\n aria-describedby={describedBy}\n role=\"switch\"\n class=\"ic-switch-input\"\n type=\"checkbox\"\n name=\"toggle\"\n id={inputId}\n onFocus={this.onFocus}\n onBlur={this.onBlur}\n onChange={this.handleChange}\n />\n <span class=\"ic-switch-toggle\">\n <svg\n class=\"ic-switch-icon\"\n aria-hidden=\"true\"\n focusable=\"false\"\n viewBox=\"0 0 10 10\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <line\n class=\"ic-switch-icon-line\"\n x1=\"9\"\n y1={size === \"small\" ? \"2\" : \"1\"}\n x2=\"9\"\n y2={size === \"small\" ? \"8\" : \"9\"}\n />\n </svg>\n <svg\n class=\"ic-switch-icon\"\n aria-hidden=\"true\"\n focusable=\"false\"\n viewBox=\"0 0 10 10\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <circle\n class=\"ic-switch-icon-circle\"\n fill=\"none\"\n cx=\"5\"\n cy=\"5\"\n r={size === \"small\" ? \"3.335\" : \"4.445\"}\n />\n </svg>\n </span>\n <slot name=\"right-adornment\"></slot>\n {showState && (\n <ic-typography\n aria-hidden=\"true\"\n variant=\"label\"\n class=\"ic-switch-checked-status\"\n >\n {checkedState ? \"On\" : \"Off\"}\n </ic-typography>\n )}\n </label>\n </Host>\n );\n }\n}\n"],"version":3}
@@ -151,7 +151,8 @@ const TabContext = /*@__PURE__*/ proxyCustomElement(class TabContext extends HTM
151
151
  this.configureTabs();
152
152
  }
153
153
  disconnectedCallback() {
154
- this.tabGroup.removeEventListener("keydown", this.keydownHandler);
154
+ var _a;
155
+ (_a = this.tabGroup) === null || _a === void 0 ? void 0 : _a.removeEventListener("keydown", this.keydownHandler);
155
156
  }
156
157
  tabClickHandler(event) {
157
158
  if (this.selectedTabIndex === undefined &&
@@ -1 +1 @@
1
- {"file":"ic-tab-context.js","mappings":";;AAmBA,MAAM,eAAe,GAAG,YAAY,CAAC;MAKxB,UAAU;;;;;QAGb,iBAAY,GAA4B,EAAE,CAAC;QAC3C,YAAO,GAAuB,EAAE,CAAC;;QA8IjC,aAAQ,GAAG;YACjB,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,GAAG,EAAE,KAAK;gBAC3B,MAAM,KAAK,GAAG,UAAU,KAAK,YAAY,IAAI,CAAC,SAAS,EAAE,CAAC;gBAC1D,MAAM,UAAU,GAAG,gBAAgB,KAAK,YAAY,IAAI,CAAC,SAAS,EAAE,CAAC;gBACrE,GAAG,CAAC,YAAY,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;gBAC9B,GA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,CAAC,IAAI,CAAC,WAAW,CAAC,EAAE;YACnE,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC,QAAQ,GAAG,IAAI,CAAC;YAC5C,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC,MAAM,GAAG,KAAK,CAAC;SACjD;aAAM;YACL,IAAI,CAAC,aAAa,EAAE,CAAC;SACtB;QAED,IAAI,QAAQ,EAAE;YACZ,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC,QAAQ,EAAE,CAAC;SACxC;KACF;IAiID,MAAM;QACJ,OAAO,eAAa,CAAC;KACtB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["src/components/ic-tab-context/ic-tab-context.tsx"],"sourcesContent":["import {\n Component,\n Element,\n Event,\n EventEmitter,\n Listen,\n Prop,\n State,\n h,\n Watch,\n Method,\n} from \"@stencil/core\";\nimport { IcActivationTypes, IcThemeMode } from \"../../utils/types\";\n\nimport {\n IcTabClickEventDetail,\n IcTabSelectEventDetail,\n} from \"../ic-tab/ic-tab.types\";\n\nconst CONTEXT_ID_ATTR = \"context-id\";\n\n@Component({\n tag: \"ic-tab-context\",\n})\nexport class TabContext {\n private enabledTabs: HTMLIcTabElement[];\n private focusedTabIndex: number;\n private newTabPanels: HTMLIcTabPanelElement[] = [];\n private newTabs: HTMLIcTabElement[] = [];\n private tabs: HTMLIcTabElement[];\n private tabGroup: HTMLIcTabGroupElement;\n private tabPanels: HTMLIcTabPanelElement[];\n\n @Element() el: HTMLIcTabContextElement;\n\n @State() selectedTab: number | null;\n\n /**\n * Determines whether tabs have to be manually activated (by pressing 'Enter' or 'Space') when they receive focus using keyboard navigation.\n */\n @Prop() activationType?: IcActivationTypes = \"automatic\";\n\n /**\n * The unique context needed if using multiple tabs inside one another i.e. rendering another set of tabs inside a tab panel.\n */\n @Prop({ reflect: true }) contextId?: string = \"default\";\n\n /**\n * The selected tab to be controlled by the user. Must be used alongside the icTabSelect event to manage tab selection.\n */\n @Prop() selectedTabIndex?: number;\n\n @Watch(\"selectedTabIndex\")\n updateSelectedTab(newValue: number): void {\n this.selectedTab = newValue;\n }\n\n /**\n * If `true`, the tabs will display as black in the light theme.\n */\n @Prop() monochrome?: boolean = false;\n @Watch(\"monochrome\")\n watchMonochromeHandler(): void {\n this.tabs.forEach((tab, index) => {\n tab.monochrome = this.monochrome;\n this.tabPanels[index].monochrome = this.monochrome;\n });\n this.tabGroup.monochrome = this.monochrome;\n }\n\n /**\n * Sets the theme color to the dark or light theme color. \"inherit\" will set the color based on the system settings or ic-theme component.\n */\n @Prop() theme?: IcThemeMode = \"inherit\";\n @Watch(\"theme\")\n watchThemeHandler(): void {\n this.tabs.forEach((tab, index) => {\n tab.theme = this.theme;\n this.tabPanels[index].theme = this.theme;\n });\n this.tabGroup.theme = this.theme;\n }\n\n /**\n * Emitted when a user selects a tab.\n */\n @Event({ bubbles: false }) icTabSelect: EventEmitter<IcTabSelectEventDetail>;\n\n componentDidLoad(): void {\n if (this.selectedTabIndex !== undefined) {\n this.selectedTab = this.selectedTabIndex;\n }\n this.getChildren();\n this.linkTabs();\n this.tabGroup.addEventListener(\"keydown\", this.keydownHandler);\n this.setInitialTab();\n this.configureTabs();\n }\n\n componentWillUpdate(): void {\n this.configureTabs();\n }\n\n disconnectedCallback(): void {\n this.tabGroup.removeEventListener(\"keydown\", this.keydownHandler);\n }\n\n @Listen(\"tabClick\")\n tabClickHandler(event: CustomEvent<IcTabClickEventDetail>): void {\n if (\n this.selectedTabIndex === undefined &&\n event.detail.contextId === this.contextId\n ) {\n this.selectedTab = event.detail.position;\n }\n /* eslint-disable no-unexpected-multiline */\n this.icTabSelect.emit({\n tabIndex: event.detail.position,\n tabLabel: this.el\n .querySelectorAll(\"ic-tab\")\n [event.detail.position].textContent.trim(),\n });\n /* eslint-enable no-unexpected-multiline */\n event.stopImmediatePropagation();\n }\n\n @Listen(\"tabCreated\")\n @Listen(\"tabPanelCreated\")\n tabCreatedHandler(ev: CustomEvent): void {\n if (this.tabs && this.tabPanels) {\n (ev.detail.setFocus ? this.newTabs : this.newTabPanels).push(ev.detail);\n if (this.newTabs.length === this.newTabPanels.length) {\n this.tabs.push(...this.newTabs);\n this.tabPanels.push(...this.newTabPanels);\n this.enabledTabs = this.getEnabledTabs();\n this.linkTabs();\n if (!this.tabs[this.selectedTab] || !this.tabPanels[this.selectedTab])\n this.setInitialTab();\n this.configureTabs();\n this.newTabs = [];\n this.newTabPanels = [];\n }\n }\n }\n\n @Listen(\"tabEnabled\")\n tabEnabledHandler(): void {\n this.enabledTabs = this.getEnabledTabs();\n }\n\n /**\n * @internal Used to set tab/tab panel IDs when a tab/tab panel has been removed\n */\n @Method()\n async tabRemovedHandler(hadFocus?: boolean): Promise<void> {\n this.getChildren();\n this.linkTabs();\n if (this.tabs[this.selectedTab] && this.tabPanels[this.selectedTab]) {\n this.tabs[this.selectedTab].selected = true;\n this.tabPanels[this.selectedTab].hidden = false;\n } else {\n this.setInitialTab();\n }\n\n if (hadFocus) {\n this.tabs[this.selectedTab].setFocus();\n }\n }\n\n /** Sets attributes to link tab-group, tabs and tab-panels */\n private linkTabs = () => {\n this.tabs.forEach((tab, index) => {\n const tabId = `ic-tab-${index}-context-${this.contextId}`;\n const tabPanelId = `ic-tab-panel-${index}-context-${this.contextId}`;\n tab.setAttribute(\"id\", tabId);\n tab.tabId = `ic-tab--${index}-context-${this.contextId}`;\n tab.tabPosition = index;\n tab.setAttribute(\"aria-controls\", tabPanelId);\n tab.setAttribute(CONTEXT_ID_ATTR, this.contextId);\n this.tabGroup.setAttribute(CONTEXT_ID_ATTR, this.contextId);\n this.tabPanels[index].setAttribute(\"id\", tabPanelId);\n this.tabPanels[index].setAttribute(\"aria-labelledby\", tabId);\n this.tabPanels[index].setAttribute(CONTEXT_ID_ATTR, this.contextId);\n\n tab.theme = this.theme;\n this.tabPanels[index].theme = this.theme;\n this.tabGroup.theme = this.theme;\n });\n };\n\n /**\n * Gets tabs and tabpanels with the same context ID using querySelector to selector the children in relation to the host\n */\n private getChildren = (): void => {\n this.tabGroup = this.el.querySelector(\"ic-tab-group\");\n this.tabs = Array.from(this.tabGroup.querySelectorAll(\"ic-tab\"));\n this.tabPanels = Array.from(this.el.children).filter(\n (child) => child.tagName === \"IC-TAB-PANEL\"\n ) as HTMLIcTabPanelElement[];\n this.enabledTabs = this.getEnabledTabs();\n };\n\n private keydownHandler = (event: KeyboardEvent) => {\n const isManual = this.activationType === \"manual\";\n const enabledTabIndex = this.enabledTabs.findIndex(\n (tab) =>\n tab.tabId ===\n this.tabs[isManual ? this.focusedTabIndex : this.selectedTab].tabId\n );\n const keyboardFunction = isManual\n ? this.keyboardFocusTab\n : this.keyboardSelectTab;\n let preventDefault = true;\n switch (event.key) {\n case \"Home\":\n keyboardFunction(0);\n break;\n case \"End\":\n keyboardFunction(this.enabledTabs.length - 1);\n break;\n case \"ArrowRight\":\n keyboardFunction(\n enabledTabIndex < this.enabledTabs.length - 1\n ? enabledTabIndex + 1\n : 0\n );\n break;\n case \"ArrowLeft\":\n keyboardFunction(\n (enabledTabIndex > 0 ? enabledTabIndex : this.enabledTabs.length) - 1\n );\n break;\n default:\n if (isManual && (event.key === \"Enter\" || event.key === \" \")) {\n this.keyboardSelectTab(this.focusedTabIndex);\n } else {\n preventDefault = false;\n }\n }\n if (preventDefault) event.preventDefault();\n };\n\n /** Sets the tab that is selected on initial render */\n private setInitialTab = (): void => {\n if (this.selectedTabIndex !== undefined) {\n this.selectedTab = this.selectedTabIndex;\n this.focusedTabIndex = this.selectedTabIndex;\n } else {\n const firstEnabledTabIndex = this.tabs.findIndex(\n (tab) => tab.tabId === this.enabledTabs[0].tabId\n );\n this.selectedTab = firstEnabledTabIndex;\n this.focusedTabIndex = firstEnabledTabIndex;\n }\n };\n\n /** Passes the selected tab to the tab and tab panel components */\n private configureTabs = () => {\n this.enabledTabs.forEach((tab) => {\n tab.selected = tab.tabPosition === this.selectedTab;\n });\n this.tabPanels.forEach((tabPanel, index) => {\n tabPanel.hidden = index !== this.selectedTab;\n });\n };\n\n private getEnabledTabs = () =>\n Array.from(this.tabs).filter((child) => !child.disabled);\n\n /** Sets focus on tab and selects it */\n private keyboardSelectTab = (enabledTabIndex: number) => {\n const newIndex = this.tabs.findIndex(\n (tab) => tab.tabId === this.enabledTabs[enabledTabIndex].tabId\n );\n this.enabledTabs[enabledTabIndex].focus();\n if (this.selectedTabIndex === undefined) {\n this.selectedTab = newIndex;\n } else {\n /* eslint-disable no-unexpected-multiline */\n this.icTabSelect.emit({\n tabIndex: newIndex,\n tabLabel: this.el\n .querySelectorAll(\"ic-tab\")\n [newIndex].textContent.trim(),\n });\n }\n };\n\n /** Sets focus on tab without selecting it (for manual activation) */\n private keyboardFocusTab = (enabledTabIndex: number) => {\n this.enabledTabs[enabledTabIndex].focus();\n this.focusedTabIndex = this.tabs.findIndex(\n (tab) => tab.tabId === this.enabledTabs[enabledTabIndex].tabId\n );\n };\n\n render() {\n return <slot></slot>;\n }\n}\n"],"version":3}
1
+ {"file":"ic-tab-context.js","mappings":";;AAmBA,MAAM,eAAe,GAAG,YAAY,CAAC;MAKxB,UAAU;;;;;QAGb,iBAAY,GAA4B,EAAE,CAAC;QAC3C,YAAO,GAAuB,EAAE,CAAC;;QA8IjC,aAAQ,GAAG;YACjB,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,GAAG,EAAE,KAAK;gBAC3B,MAAM,KAAK,GAAG,UAAU,KAAK,YAAY,IAAI,CAAC,SAAS,EAAE,CAAC;gBAC1D,MAAM,UAAU,GAAG,gBAAgB,KAAK,YAAY,IAAI,CAAC,SAAS,EAAE,CAAC;gBACrE,GAAG,CAAC,YAAY,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;gBAC9B,GAAG,CAAC,KAAK,GAAG,WAAW,KAAK,YAAY,IAAI,CAAC,SAAS,EAAE,CAAC;gBACzD,GAAG,CAAC,WAAW,GAAG,KAA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,QAAQ,GAAG,IAAI,CAAC;YAC5C,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC,MAAM,GAAG,KAAK,CAAC;SACjD;aAAM;YACL,IAAI,CAAC,aAAa,EAAE,CAAC;SACtB;QAED,IAAI,QAAQ,EAAE;YACZ,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC,QAAQ,EAAE,CAAC;SACxC;KACF;IAiID,MAAM;QACJ,OAAO,eAAa,CAAC;KACtB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["src/components/ic-tab-context/ic-tab-context.tsx"],"sourcesContent":["import {\n Component,\n Element,\n Event,\n EventEmitter,\n Listen,\n Prop,\n State,\n h,\n Watch,\n Method,\n} from \"@stencil/core\";\nimport { IcActivationTypes, IcThemeMode } from \"../../utils/types\";\n\nimport {\n IcTabClickEventDetail,\n IcTabSelectEventDetail,\n} from \"../ic-tab/ic-tab.types\";\n\nconst CONTEXT_ID_ATTR = \"context-id\";\n\n@Component({\n tag: \"ic-tab-context\",\n})\nexport class TabContext {\n private enabledTabs: HTMLIcTabElement[];\n private focusedTabIndex: number;\n private newTabPanels: HTMLIcTabPanelElement[] = [];\n private newTabs: HTMLIcTabElement[] = [];\n private tabs: HTMLIcTabElement[];\n private tabGroup: HTMLIcTabGroupElement;\n private tabPanels: HTMLIcTabPanelElement[];\n\n @Element() el: HTMLIcTabContextElement;\n\n @State() selectedTab: number | null;\n\n /**\n * Determines whether tabs have to be manually activated (by pressing 'Enter' or 'Space') when they receive focus using keyboard navigation.\n */\n @Prop() activationType?: IcActivationTypes = \"automatic\";\n\n /**\n * The unique context needed if using multiple tabs inside one another i.e. rendering another set of tabs inside a tab panel.\n */\n @Prop({ reflect: true }) contextId?: string = \"default\";\n\n /**\n * The selected tab to be controlled by the user. Must be used alongside the icTabSelect event to manage tab selection.\n */\n @Prop() selectedTabIndex?: number;\n\n @Watch(\"selectedTabIndex\")\n updateSelectedTab(newValue: number): void {\n this.selectedTab = newValue;\n }\n\n /**\n * If `true`, the tabs will display as black in the light theme.\n */\n @Prop() monochrome?: boolean = false;\n @Watch(\"monochrome\")\n watchMonochromeHandler(): void {\n this.tabs.forEach((tab, index) => {\n tab.monochrome = this.monochrome;\n this.tabPanels[index].monochrome = this.monochrome;\n });\n this.tabGroup.monochrome = this.monochrome;\n }\n\n /**\n * Sets the theme color to the dark or light theme color. \"inherit\" will set the color based on the system settings or ic-theme component.\n */\n @Prop() theme?: IcThemeMode = \"inherit\";\n @Watch(\"theme\")\n watchThemeHandler(): void {\n this.tabs.forEach((tab, index) => {\n tab.theme = this.theme;\n this.tabPanels[index].theme = this.theme;\n });\n this.tabGroup.theme = this.theme;\n }\n\n /**\n * Emitted when a user selects a tab.\n */\n @Event({ bubbles: false }) icTabSelect: EventEmitter<IcTabSelectEventDetail>;\n\n componentDidLoad(): void {\n if (this.selectedTabIndex !== undefined) {\n this.selectedTab = this.selectedTabIndex;\n }\n this.getChildren();\n this.linkTabs();\n this.tabGroup.addEventListener(\"keydown\", this.keydownHandler);\n this.setInitialTab();\n this.configureTabs();\n }\n\n componentWillUpdate(): void {\n this.configureTabs();\n }\n\n disconnectedCallback(): void {\n this.tabGroup?.removeEventListener(\"keydown\", this.keydownHandler);\n }\n\n @Listen(\"tabClick\")\n tabClickHandler(event: CustomEvent<IcTabClickEventDetail>): void {\n if (\n this.selectedTabIndex === undefined &&\n event.detail.contextId === this.contextId\n ) {\n this.selectedTab = event.detail.position;\n }\n /* eslint-disable no-unexpected-multiline */\n this.icTabSelect.emit({\n tabIndex: event.detail.position,\n tabLabel: this.el\n .querySelectorAll(\"ic-tab\")\n [event.detail.position].textContent.trim(),\n });\n /* eslint-enable no-unexpected-multiline */\n event.stopImmediatePropagation();\n }\n\n @Listen(\"tabCreated\")\n @Listen(\"tabPanelCreated\")\n tabCreatedHandler(ev: CustomEvent): void {\n if (this.tabs && this.tabPanels) {\n (ev.detail.setFocus ? this.newTabs : this.newTabPanels).push(ev.detail);\n if (this.newTabs.length === this.newTabPanels.length) {\n this.tabs.push(...this.newTabs);\n this.tabPanels.push(...this.newTabPanels);\n this.enabledTabs = this.getEnabledTabs();\n this.linkTabs();\n if (!this.tabs[this.selectedTab] || !this.tabPanels[this.selectedTab])\n this.setInitialTab();\n this.configureTabs();\n this.newTabs = [];\n this.newTabPanels = [];\n }\n }\n }\n\n @Listen(\"tabEnabled\")\n tabEnabledHandler(): void {\n this.enabledTabs = this.getEnabledTabs();\n }\n\n /**\n * @internal Used to set tab/tab panel IDs when a tab/tab panel has been removed\n */\n @Method()\n async tabRemovedHandler(hadFocus?: boolean): Promise<void> {\n this.getChildren();\n this.linkTabs();\n if (this.tabs[this.selectedTab] && this.tabPanels[this.selectedTab]) {\n this.tabs[this.selectedTab].selected = true;\n this.tabPanels[this.selectedTab].hidden = false;\n } else {\n this.setInitialTab();\n }\n\n if (hadFocus) {\n this.tabs[this.selectedTab].setFocus();\n }\n }\n\n /** Sets attributes to link tab-group, tabs and tab-panels */\n private linkTabs = () => {\n this.tabs.forEach((tab, index) => {\n const tabId = `ic-tab-${index}-context-${this.contextId}`;\n const tabPanelId = `ic-tab-panel-${index}-context-${this.contextId}`;\n tab.setAttribute(\"id\", tabId);\n tab.tabId = `ic-tab--${index}-context-${this.contextId}`;\n tab.tabPosition = index;\n tab.setAttribute(\"aria-controls\", tabPanelId);\n tab.setAttribute(CONTEXT_ID_ATTR, this.contextId);\n this.tabGroup.setAttribute(CONTEXT_ID_ATTR, this.contextId);\n this.tabPanels[index].setAttribute(\"id\", tabPanelId);\n this.tabPanels[index].setAttribute(\"aria-labelledby\", tabId);\n this.tabPanels[index].setAttribute(CONTEXT_ID_ATTR, this.contextId);\n\n tab.theme = this.theme;\n this.tabPanels[index].theme = this.theme;\n this.tabGroup.theme = this.theme;\n });\n };\n\n /**\n * Gets tabs and tabpanels with the same context ID using querySelector to selector the children in relation to the host\n */\n private getChildren = (): void => {\n this.tabGroup = this.el.querySelector(\"ic-tab-group\");\n this.tabs = Array.from(this.tabGroup.querySelectorAll(\"ic-tab\"));\n this.tabPanels = Array.from(this.el.children).filter(\n (child) => child.tagName === \"IC-TAB-PANEL\"\n ) as HTMLIcTabPanelElement[];\n this.enabledTabs = this.getEnabledTabs();\n };\n\n private keydownHandler = (event: KeyboardEvent) => {\n const isManual = this.activationType === \"manual\";\n const enabledTabIndex = this.enabledTabs.findIndex(\n (tab) =>\n tab.tabId ===\n this.tabs[isManual ? this.focusedTabIndex : this.selectedTab].tabId\n );\n const keyboardFunction = isManual\n ? this.keyboardFocusTab\n : this.keyboardSelectTab;\n let preventDefault = true;\n switch (event.key) {\n case \"Home\":\n keyboardFunction(0);\n break;\n case \"End\":\n keyboardFunction(this.enabledTabs.length - 1);\n break;\n case \"ArrowRight\":\n keyboardFunction(\n enabledTabIndex < this.enabledTabs.length - 1\n ? enabledTabIndex + 1\n : 0\n );\n break;\n case \"ArrowLeft\":\n keyboardFunction(\n (enabledTabIndex > 0 ? enabledTabIndex : this.enabledTabs.length) - 1\n );\n break;\n default:\n if (isManual && (event.key === \"Enter\" || event.key === \" \")) {\n this.keyboardSelectTab(this.focusedTabIndex);\n } else {\n preventDefault = false;\n }\n }\n if (preventDefault) event.preventDefault();\n };\n\n /** Sets the tab that is selected on initial render */\n private setInitialTab = (): void => {\n if (this.selectedTabIndex !== undefined) {\n this.selectedTab = this.selectedTabIndex;\n this.focusedTabIndex = this.selectedTabIndex;\n } else {\n const firstEnabledTabIndex = this.tabs.findIndex(\n (tab) => tab.tabId === this.enabledTabs[0].tabId\n );\n this.selectedTab = firstEnabledTabIndex;\n this.focusedTabIndex = firstEnabledTabIndex;\n }\n };\n\n /** Passes the selected tab to the tab and tab panel components */\n private configureTabs = () => {\n this.enabledTabs.forEach((tab) => {\n tab.selected = tab.tabPosition === this.selectedTab;\n });\n this.tabPanels.forEach((tabPanel, index) => {\n tabPanel.hidden = index !== this.selectedTab;\n });\n };\n\n private getEnabledTabs = () =>\n Array.from(this.tabs).filter((child) => !child.disabled);\n\n /** Sets focus on tab and selects it */\n private keyboardSelectTab = (enabledTabIndex: number) => {\n const newIndex = this.tabs.findIndex(\n (tab) => tab.tabId === this.enabledTabs[enabledTabIndex].tabId\n );\n this.enabledTabs[enabledTabIndex].focus();\n if (this.selectedTabIndex === undefined) {\n this.selectedTab = newIndex;\n } else {\n /* eslint-disable no-unexpected-multiline */\n this.icTabSelect.emit({\n tabIndex: newIndex,\n tabLabel: this.el\n .querySelectorAll(\"ic-tab\")\n [newIndex].textContent.trim(),\n });\n }\n };\n\n /** Sets focus on tab without selecting it (for manual activation) */\n private keyboardFocusTab = (enabledTabIndex: number) => {\n this.enabledTabs[enabledTabIndex].focus();\n this.focusedTabIndex = this.tabs.findIndex(\n (tab) => tab.tabId === this.enabledTabs[enabledTabIndex].tabId\n );\n };\n\n render() {\n return <slot></slot>;\n }\n}\n"],"version":3}
@@ -6,29 +6,13 @@ import { d as defineCustomElement$4 } from './ic-loading-indicator2.js';
6
6
  import { d as defineCustomElement$3 } from './ic-tooltip2.js';
7
7
  import { d as defineCustomElement$2 } from './ic-typography2.js';
8
8
 
9
- const icTabGroupCss = ":host{display:block;margin-bottom:var(--ic-space-md);border-bottom:var(--ic-space-1px) solid var(--ic-tab-bottom-border)}:host(.ic-tab-group-monochrome){border-bottom:var(--ic-space-1px) solid\n var(--ic-tab-bottom-border-monochrome)}:host(.ic-tab-group-inline){margin-bottom:0;border-bottom:none}.tabs-container{display:flex;flex-direction:row}.tabs-container::-webkit-scrollbar{display:none}";
9
+ const icTabGroupCss = ":host{display:block;margin-bottom:var(--ic-space-md);border-bottom:var(--ic-space-1px) solid var(--ic-tab-bottom-border)}:host(.ic-tab-group-monochrome){border-bottom:var(--ic-space-1px) solid\n var(--ic-tab-bottom-border-monochrome)}:host(.ic-tab-group-inline){margin-bottom:0;border-bottom:none}.tabs-container{display:flex;flex-direction:row}.tabs-container::-webkit-scrollbar{display:none}:host ic-horizontal-scroll{--splitter-color:var(--ic-tab-divider)}:host(.ic-tab-group-monochrome) ic-horizontal-scroll{--splitter-color:var(--ic-tab-divider-monochrome)}";
10
10
 
11
11
  const TabGroup = /*@__PURE__*/ proxyCustomElement(class TabGroup extends HTMLElement {
12
12
  constructor() {
13
13
  super();
14
14
  this.__registerHost();
15
15
  this.__attachShadow();
16
- /**
17
- * Temporary function to handle horizontal scroll appearance until other dark mode work is completed.
18
- */
19
- this.handleHorizontalScrollAppearance = () => {
20
- if (this.theme === "dark" ||
21
- (this.theme === "inherit" &&
22
- window.matchMedia("(prefers-color-scheme: dark)").matches)) {
23
- return "light";
24
- }
25
- else if (this.monochrome) {
26
- return "dark";
27
- }
28
- else {
29
- return "default";
30
- }
31
- };
32
16
  this.inline = false;
33
17
  this.label = undefined;
34
18
  this.monochrome = false;
@@ -43,7 +27,7 @@ const TabGroup = /*@__PURE__*/ proxyCustomElement(class TabGroup extends HTMLEle
43
27
  ["ic-tab-group-inline"]: this.inline,
44
28
  [`ic-theme-${theme}`]: theme !== "inherit",
45
29
  ["ic-tab-group-monochrome"]: monochrome,
46
- } }, h("ic-horizontal-scroll", { appearance: this.handleHorizontalScrollAppearance(), "focus-trigger": "tabFocus" }, h("div", { class: "tabs-container" }, h("slot", null)))));
30
+ } }, h("ic-horizontal-scroll", { theme: this.theme, "focus-trigger": "tabFocus", monochrome: this.monochrome }, h("div", { class: "tabs-container" }, h("slot", null)))));
47
31
  }
48
32
  static get delegatesFocus() { return true; }
49
33
  static get style() { return icTabGroupCss; }
@@ -1 +1 @@
1
- {"file":"ic-tab-group.js","mappings":";;;;;;;;AAAA,MAAM,aAAa,GAAG,8YAA8Y;;MCYvZ,QAAQ;;;;;;;;QA2BX,qCAAgC,GAAG;YACzC,IACE,IAAI,CAAC,KAAK,KAAK,MAAM;iBACpB,IAAI,CAAC,KAAK,KAAK,SAAS;oBACvB,MAAM,CAAC,UAAU,CAAC,8BAA8B,CAAC,CAAC,OAAO,CAAC,EAC5D;gBACA,OAAO,OAAO,CAAC;aAChB;iBAAM,IAAI,IAAI,CAAC,UAAU,EAAE;gBAC1B,OAAO,MAAM,CAAC;aACf;iBAAM;gBACL,OAAO,SAAS,CAAC;aAClB;SACF,CAAC;sBAnC0C,KAAK;;0BAQlB,KAAK;qBAGN,SAAS;;IAEvC,gBAAgB;QACd,gCAAgC,CAC9B,CAAC,EAAE,IAAI,EAAE,IAAI,CAAC,KAAK,EAAE,QAAQ,EAAE,OAAO,EAAE,CAAC,EACzC,WAAW,CACZ,CAAC;KACH;IAmBD,MAAM;QACJ,MAAM,EAAE,KAAK,EAAE,KAAK,EAAE,UAAU,EAAE,GAAG,IAAI,CAAC;QAE1C,QACE,EAAC,IAAI,IACH,IAAI,EAAC,SAAS,gBACF,KAAK,EACjB,KAAK,EAAE;gBACL,CAAC,qBAAqB,GAAG,IAAI,CAAC,MAAM;gBACpC,CAAC,YAAY,KAAK,EAAE,GAAG,KAAK,KAAK,SAAS;gBAC1C,CAAC,yBAAyB,GAAG,UAAU;aACxC,IAED,4BACE,UAAU,EAAE,IAAI,CAAC,gCAAgC,EAAE,mBACrC,UAAU,IAExB,WAAK,KAAK,EAAC,gBAAgB,IACzB,eAAa,CACT,CACe,CAClB,EACP;KACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["src/components/ic-tab-group/ic-tab-group.css?tag=ic-tab-group&encapsulation=shadow","src/components/ic-tab-group/ic-tab-group.tsx"],"sourcesContent":[":host {\n display: block;\n margin-bottom: var(--ic-space-md);\n border-bottom: var(--ic-space-1px) solid var(--ic-tab-bottom-border);\n}\n\n:host(.ic-tab-group-monochrome) {\n border-bottom: var(--ic-space-1px) solid\n var(--ic-tab-bottom-border-monochrome);\n}\n\n:host(.ic-tab-group-inline) {\n margin-bottom: 0;\n border-bottom: none;\n}\n\n.tabs-container {\n display: flex;\n flex-direction: row;\n}\n\n.tabs-container::-webkit-scrollbar {\n display: none;\n}\n","import { Component, Host, Prop, h } from \"@stencil/core\";\n\nimport { onComponentRequiredPropUndefined } from \"../../utils/helpers\";\nimport { IcThemeMode } from \"../../utils/types\";\n\n@Component({\n tag: \"ic-tab-group\",\n styleUrl: \"ic-tab-group.css\",\n shadow: {\n delegatesFocus: true,\n },\n})\nexport class TabGroup {\n /**\n * If `true`, the tabs and tab panels will be positioned separately.\n */\n @Prop({ reflect: true }) inline?: boolean = false;\n\n /**\n * The label to describe the purpose of the set of tabs to screen reader users.\n */\n @Prop() label!: string;\n\n /** @internal Determines whether black variant of the tabs should be displayed. */\n @Prop() monochrome?: boolean = false;\n\n /** @internal Determines whether the light or dark variant of the tabs should be displayed. */\n @Prop() theme?: IcThemeMode = \"inherit\";\n\n componentDidLoad(): void {\n onComponentRequiredPropUndefined(\n [{ prop: this.label, propName: \"label\" }],\n \"Tab Group\"\n );\n }\n\n /**\n * Temporary function to handle horizontal scroll appearance until other dark mode work is completed.\n */\n private handleHorizontalScrollAppearance = () => {\n if (\n this.theme === \"dark\" ||\n (this.theme === \"inherit\" &&\n window.matchMedia(\"(prefers-color-scheme: dark)\").matches)\n ) {\n return \"light\";\n } else if (this.monochrome) {\n return \"dark\";\n } else {\n return \"default\";\n }\n };\n\n render() {\n const { theme, label, monochrome } = this;\n\n return (\n <Host\n role=\"tablist\"\n aria-label={label}\n class={{\n [\"ic-tab-group-inline\"]: this.inline,\n [`ic-theme-${theme}`]: theme !== \"inherit\",\n [\"ic-tab-group-monochrome\"]: monochrome,\n }}\n >\n <ic-horizontal-scroll\n appearance={this.handleHorizontalScrollAppearance()}\n focus-trigger=\"tabFocus\"\n >\n <div class=\"tabs-container\">\n <slot></slot>\n </div>\n </ic-horizontal-scroll>\n </Host>\n );\n }\n}\n"],"version":3}
1
+ {"file":"ic-tab-group.js","mappings":";;;;;;;;AAAA,MAAM,aAAa,GAAG,ujBAAujB;;MCYhkB,QAAQ;;;;;sBAIyB,KAAK;;0BAQlB,KAAK;qBAGN,SAAS;;IAEvC,gBAAgB;QACd,gCAAgC,CAC9B,CAAC,EAAE,IAAI,EAAE,IAAI,CAAC,KAAK,EAAE,QAAQ,EAAE,OAAO,EAAE,CAAC,EACzC,WAAW,CACZ,CAAC;KACH;IAED,MAAM;QACJ,MAAM,EAAE,KAAK,EAAE,KAAK,EAAE,UAAU,EAAE,GAAG,IAAI,CAAC;QAE1C,QACE,EAAC,IAAI,IACH,IAAI,EAAC,SAAS,gBACF,KAAK,EACjB,KAAK,EAAE;gBACL,CAAC,qBAAqB,GAAG,IAAI,CAAC,MAAM;gBACpC,CAAC,YAAY,KAAK,EAAE,GAAG,KAAK,KAAK,SAAS;gBAC1C,CAAC,yBAAyB,GAAG,UAAU;aACxC,IAED,4BACE,KAAK,EAAE,IAAI,CAAC,KAAK,mBACH,UAAU,EACxB,UAAU,EAAE,IAAI,CAAC,UAAU,IAE3B,WAAK,KAAK,EAAC,gBAAgB,IACzB,eAAa,CACT,CACe,CAClB,EACP;KACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["src/components/ic-tab-group/ic-tab-group.css?tag=ic-tab-group&encapsulation=shadow","src/components/ic-tab-group/ic-tab-group.tsx"],"sourcesContent":[":host {\n display: block;\n margin-bottom: var(--ic-space-md);\n border-bottom: var(--ic-space-1px) solid var(--ic-tab-bottom-border);\n}\n\n:host(.ic-tab-group-monochrome) {\n border-bottom: var(--ic-space-1px) solid\n var(--ic-tab-bottom-border-monochrome);\n}\n\n:host(.ic-tab-group-inline) {\n margin-bottom: 0;\n border-bottom: none;\n}\n\n.tabs-container {\n display: flex;\n flex-direction: row;\n}\n\n.tabs-container::-webkit-scrollbar {\n display: none;\n}\n\n:host ic-horizontal-scroll {\n --splitter-color: var(--ic-tab-divider);\n}\n\n:host(.ic-tab-group-monochrome) ic-horizontal-scroll {\n --splitter-color: var(--ic-tab-divider-monochrome);\n}\n","import { Component, Host, Prop, h } from \"@stencil/core\";\n\nimport { onComponentRequiredPropUndefined } from \"../../utils/helpers\";\nimport { IcThemeMode } from \"../../utils/types\";\n\n@Component({\n tag: \"ic-tab-group\",\n styleUrl: \"ic-tab-group.css\",\n shadow: {\n delegatesFocus: true,\n },\n})\nexport class TabGroup {\n /**\n * If `true`, the tabs and tab panels will be positioned separately.\n */\n @Prop({ reflect: true }) inline?: boolean = false;\n\n /**\n * The label to describe the purpose of the set of tabs to screen reader users.\n */\n @Prop() label!: string;\n\n /** @internal Determines whether black variant of the tabs should be displayed. */\n @Prop() monochrome?: boolean = false;\n\n /** @internal Determines whether the light or dark variant of the tabs should be displayed. */\n @Prop() theme?: IcThemeMode = \"inherit\";\n\n componentDidLoad(): void {\n onComponentRequiredPropUndefined(\n [{ prop: this.label, propName: \"label\" }],\n \"Tab Group\"\n );\n }\n\n render() {\n const { theme, label, monochrome } = this;\n\n return (\n <Host\n role=\"tablist\"\n aria-label={label}\n class={{\n [\"ic-tab-group-inline\"]: this.inline,\n [`ic-theme-${theme}`]: theme !== \"inherit\",\n [\"ic-tab-group-monochrome\"]: monochrome,\n }}\n >\n <ic-horizontal-scroll\n theme={this.theme}\n focus-trigger=\"tabFocus\"\n monochrome={this.monochrome}\n >\n <div class=\"tabs-container\">\n <slot></slot>\n </div>\n </ic-horizontal-scroll>\n </Host>\n );\n }\n}\n"],"version":3}
@@ -1,12 +1,12 @@
1
1
  import { proxyCustomElement, HTMLElement, createEvent, forceUpdate, h, Host } from '@stencil/core/internal/client';
2
- import { f as checkSlotInChildMutations, R as debounceEvent, p as removeFormResetListener, b as inheritAttributes, n as addFormResetListener, r as removeDisabledFalse, o as onComponentRequiredPropUndefined, x as IcInformationStatus, t as getInputDescribedByText, q as renderHiddenInput, i as isSlotUsed, S as isEmptyString, I as IC_INHERITED_ARIA } from './helpers.js';
2
+ import { f as checkSlotInChildMutations, S as debounceEvent, p as removeFormResetListener, b as inheritAttributes, n as addFormResetListener, r as removeDisabledFalse, o as onComponentRequiredPropUndefined, x as IcInformationStatus, t as getInputDescribedByText, q as renderHiddenInput, i as isSlotUsed, T as isEmptyString, I as IC_INHERITED_ARIA } from './helpers.js';
3
3
  import { d as defineCustomElement$5 } from './ic-input-component-container2.js';
4
4
  import { d as defineCustomElement$4 } from './ic-input-container2.js';
5
5
  import { d as defineCustomElement$3 } from './ic-input-label2.js';
6
6
  import { d as defineCustomElement$2 } from './ic-input-validation2.js';
7
7
  import { d as defineCustomElement$1 } from './ic-typography2.js';
8
8
 
9
- const icTextFieldCss = "/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */html{line-height:1.15;-webkit-text-size-adjust:100%;}body{margin:0}main{display:block}h1{font-size:2em;margin:0.67em 0}hr{box-sizing:content-box;height:0;overflow:visible;}pre{font-family:monospace, monospace;font-size:1em;}a{background-color:transparent}abbr[title]{border-bottom:none;text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted;}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace, monospace;font-size:1em;}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-0.25em}sup{top:-0.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0;}button,input{overflow:visible}button,select{text-transform:none}button,[type=\"button\"],[type=\"reset\"],[type=\"submit\"]{-webkit-appearance:button}button::-moz-focus-inner,[type=\"button\"]::-moz-focus-inner,[type=\"reset\"]::-moz-focus-inner,[type=\"submit\"]::-moz-focus-inner{border-style:none;padding:0}button:-moz-focusring,[type=\"button\"]:-moz-focusring,[type=\"reset\"]:-moz-focusring,[type=\"submit\"]:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:0.35em 0.75em 0.625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal;}progress{vertical-align:baseline}textarea{overflow:auto}[type=\"checkbox\"],[type=\"radio\"]{box-sizing:border-box;padding:0;}[type=\"number\"]::-webkit-inner-spin-button,[type=\"number\"]::-webkit-outer-spin-button{height:auto}[type=\"search\"]{-webkit-appearance:textfield;outline-offset:-2px;}[type=\"search\"]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit;}details{display:block}summary{display:list-item}template{display:none}[hidden]{display:none}html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,menu,nav,output,ruby,section,summary,time,mark,audio,video{margin:0;padding:0;border:0;font-size:100%;font-style:inherit;vertical-align:baseline}:host{display:block;--ic-input-label-helpertext-padding:var(--ic-space-xxs)}:host(.ic-text-field-full-width){width:100%}::-moz-placeholder{color:var(--ic-color-text-tertiary);opacity:1}::placeholder{color:var(--ic-color-text-tertiary);opacity:1}input,textarea{border:0;border-radius:var(--ic-border-radius);background-color:var(--ic-architectural-white);line-height:1.5rem;letter-spacing:0.005rem;width:100%;padding-right:var(--ic-space-xs);padding-left:var(--ic-space-xs)}textarea{min-height:var(--ic-space-lg);resize:vertical;padding-top:0.375rem}input:focus,textarea:focus{border:0;outline:0}input:disabled,textarea:disabled{color:var(--ic-architectural-200)}input.readonly,textarea.readonly{color:var(--ic-color-text-primary)}input::-webkit-outer-spin-button,input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}input[type=\"number\"]{-moz-appearance:textfield}textarea.no-resize{resize:none}.char-count-text{--ic-typography-color:var(--ic-color-text-secondary);padding-right:var(--ic-space-xxxs)}.no-left-pad{padding-left:0}::slotted([slot=\"icon\"]){fill:var(--ic-color-text-tertiary)}.has-value ::slotted([slot=\"icon\"]){fill:var(--ic-color-text-primary)}.char-count{margin-right:calc(-1 * var(--ic-space-xxxs))}.remaining-char-count-desc{position:absolute;left:-9999px}input[type=\"search\"]::-webkit-search-cancel-button,input[type=\"search\"]::-webkit-search-decoration,input[type=\"search\"]::-webkit-search-results-button,input[type=\"search\"]::-webkit-search-results-decoration{display:none}input[type=\"search\"].truncate-value{width:100%;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}@media (forced-colors: active){input.readonly,textarea.readonly{color:canvastext}.has-value ::slotted([slot=\"icon\"]){fill:currentcolor}}";
9
+ const icTextFieldCss = "/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */html{line-height:1.15;-webkit-text-size-adjust:100%;}body{margin:0}main{display:block}h1{font-size:2em;margin:0.67em 0}hr{box-sizing:content-box;height:0;overflow:visible;}pre{font-family:monospace, monospace;font-size:1em;}a{background-color:transparent}abbr[title]{border-bottom:none;text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted;}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace, monospace;font-size:1em;}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-0.25em}sup{top:-0.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0;}button,input{overflow:visible}button,select{text-transform:none}button,[type=\"button\"],[type=\"reset\"],[type=\"submit\"]{-webkit-appearance:button}button::-moz-focus-inner,[type=\"button\"]::-moz-focus-inner,[type=\"reset\"]::-moz-focus-inner,[type=\"submit\"]::-moz-focus-inner{border-style:none;padding:0}button:-moz-focusring,[type=\"button\"]:-moz-focusring,[type=\"reset\"]:-moz-focusring,[type=\"submit\"]:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:0.35em 0.75em 0.625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal;}progress{vertical-align:baseline}textarea{overflow:auto}[type=\"checkbox\"],[type=\"radio\"]{box-sizing:border-box;padding:0;}[type=\"number\"]::-webkit-inner-spin-button,[type=\"number\"]::-webkit-outer-spin-button{height:auto}[type=\"search\"]{-webkit-appearance:textfield;outline-offset:-2px;}[type=\"search\"]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit;}details{display:block}summary{display:list-item}template{display:none}[hidden]{display:none}html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,menu,nav,output,ruby,section,summary,time,mark,audio,video{margin:0;padding:0;border:0;font-size:100%;font-style:inherit;vertical-align:baseline}:host{display:block;--ic-input-label-helpertext-padding:var(--ic-space-xxs);--border-color:var(--ic-text-field-border-neutral);--border-color-hover:var(--ic-text-field-border-neutral-hover);--border-color-pressed:var(--ic-text-field-border-neutral-pressed);--border-color-disabled:var(--ic-text-field-border-disabled);--border-color-error:var(--ic-text-field-border-error);--border-color-error-hover:var(--ic-text-field-border-error-hover);--border-color-error-pressed:var(--ic-text-field-border-error-pressed);--border-color-success:var(--ic-text-field-border-success);--border-color-success-hover:var(--ic-text-field-border-success-hover);--border-color-success-pressed:var(--ic-text-field-border-success-pressed);--border-color-warning:var(--ic-text-field-border-warning);--border-color-warning-hover:var(--ic-text-field-border-warning-hover);--border-color-warning-pressed:var(--ic-text-field-border-warning-pressed);--ic-input-label-text-color:var(--ic-text-field-label);--ic-input-label-helper-text-color:var(--ic-text-field-subtitle);--ic-input-validation-status-text-color:var(--ic-text-field-state-text);--ic-input-validation-error:var(--ic-text-field-state-icon-error);--ic-input-validation-warning-icon-color:var(\n --ic-text-field-state-icon-warning\n );--ic-input-validation-success-icon-color:var(\n --ic-text-field-state-icon-success\n );--ic-input-component-container-success-icon-inline-color:var(\n --ic-text-field-state-icon-success\n )}:host(.ic-text-field-disabled){--ic-input-label-text-color:var(--ic-text-field-label-disabled);--ic-input-label-helper-text-color:var(--ic-text-field-subtitle-disabled);--text-field-placeholder-color:var(\n --ic-text-field-text-area-placeholder-text-disabled\n )}:host(.ic-text-field-full-width){width:100%}::-moz-placeholder{color:var(\n --text-field-placeholder-color,\n var(--ic-text-field-placeholder-text)\n );opacity:1}::placeholder{color:var(\n --text-field-placeholder-color,\n var(--ic-text-field-placeholder-text)\n );opacity:1}input,textarea{border:0;border-radius:var(--ic-border-radius);color:var(--text-field-text-color, var(--ic-text-field-text));background-color:var(--input-bg-color, var(--ic-text-field-background));line-height:1.5rem;letter-spacing:0.005rem;width:100%;padding-right:var(--ic-space-xs);padding-left:var(--ic-space-xs);caret-color:var(\n --text-field-typing-cursor,\n var(--ic-text-field-typing-cursor)\n )}textarea{min-height:var(--ic-space-lg);resize:vertical;padding-top:0.375rem}input:focus,textarea:focus{border:0;outline:0}input:disabled,textarea:disabled{color:var(\n --text-field-disabled-text-color,\n var(--ic-text-field-text-disabled)\n )}input.readonly,textarea.readonly{color:var(--ic-text-field-read-only-input-text-internal)}input::-webkit-outer-spin-button,input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}input[type=\"number\"]{-moz-appearance:textfield}textarea.no-resize{resize:none}.char-count-text{--ic-typography-color:var(--ic-text-field-character-limit);padding-right:var(--ic-space-xxxs)}:host(.ic-text-field-disabled) .char-count-text{--ic-typography-color:var(--ic-text-field-character-limit-disabled)}.no-left-pad{padding-left:0}::slotted([slot=\"icon\"]){fill:var(--ic-text-field-text-disabled)}.has-value ::slotted([slot=\"icon\"]){fill:var(--ic-text-field-input-internal-icon)}.char-count{margin-right:calc(-1 * var(--ic-space-xxxs))}.remaining-char-count-desc{position:absolute;left:-9999px}input[type=\"search\"]::-webkit-search-cancel-button,input[type=\"search\"]::-webkit-search-decoration,input[type=\"search\"]::-webkit-search-results-button,input[type=\"search\"]::-webkit-search-results-decoration{display:none}input[type=\"search\"].truncate-value{width:100%;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}@media (forced-colors: active){input.readonly,textarea.readonly{color:canvastext}.has-value ::slotted([slot=\"icon\"]){fill:currentcolor}}";
10
10
 
11
11
  let inputIds = 0;
12
12
  const MUTABLE_ATTRIBUTES = [...IC_INHERITED_ARIA, "title"];
@@ -108,6 +108,7 @@ const TextField = /*@__PURE__*/ proxyCustomElement(class TextField extends HTMLE
108
108
  this.rows = 1;
109
109
  this.size = "medium";
110
110
  this.spellcheck = false;
111
+ this.theme = "inherit";
111
112
  this.truncateValue = undefined;
112
113
  this.type = "text";
113
114
  this.validationInline = false;
@@ -185,7 +186,7 @@ const TextField = /*@__PURE__*/ proxyCustomElement(class TextField extends HTMLE
185
186
  (_a = this.inputEl) === null || _a === void 0 ? void 0 : _a.focus();
186
187
  }
187
188
  render() {
188
- const { inputId, name, label, required, size, placeholder, helperText, hideCharCount, rows, resize, disabled, value, min, max, numChars, readonly, maxCharacters, maxCharactersWarning, maxCharactersReached, minCharacters, minCharactersUnattained, minValueUnattained, maxValueExceeded, validationStatus, validationText, validationInline, validationInlineInternal, spellcheck, inputmode, fullWidth, truncateValue, hiddenInput, } = this;
189
+ const { inputId, name, label, required, size, placeholder, helperText, hideCharCount, rows, resize, disabled, value, min, max, numChars, readonly, maxCharacters, maxCharactersWarning, maxCharactersReached, minCharacters, minCharactersUnattained, minValueUnattained, maxValueExceeded, validationStatus, validationText, validationInline, validationInlineInternal, spellcheck, inputmode, fullWidth, truncateValue, hiddenInput, theme, } = this;
189
190
  const disabledMode = readonly || disabled;
190
191
  const currentStatus = maxValueExceeded ||
191
192
  minValueUnattained ||
@@ -225,17 +226,21 @@ const TextField = /*@__PURE__*/ proxyCustomElement(class TextField extends HTMLE
225
226
  if (hiddenInput) {
226
227
  renderHiddenInput(true, this.el, name, value, disabledMode);
227
228
  }
228
- return (h(Host, { class: { ["ic-text-field-full-width"]: fullWidth } }, h("ic-input-container", { readonly: readonly, disabled: disabledMode }, !this.hideLabel && (h("ic-input-label", { for: inputId, label: label, helperText: helperText, required: required, disabled: disabledText, readonly: readonly })), h("ic-input-component-container", { size: size, validationStatus: currentStatus, multiLine: multiline, disabled: disabledMode, readonly: readonly, validationInline: validationInline, fullWidth: fullWidth }, showLeftIcon && (h("span", { class: {
229
- ["readonly"]: readonly,
230
- ["has-value"]: value.length > 0,
229
+ return (h(Host, { class: {
230
+ "ic-text-field-full-width": fullWidth,
231
+ [`ic-theme-${theme}`]: theme !== "inherit",
232
+ "ic-text-field-disabled": disabledMode,
233
+ } }, h("ic-input-container", { readonly: readonly, disabled: disabledMode }, !this.hideLabel && (h("ic-input-label", { for: inputId, label: label, helperText: helperText, required: required, disabled: disabledText, readonly: readonly })), h("ic-input-component-container", { size: size, validationStatus: currentStatus, multiLine: multiline, disabled: disabledMode, readonly: readonly, validationInline: validationInline, fullWidth: fullWidth }, showLeftIcon && (h("span", { class: {
234
+ readonly,
235
+ "has-value": value.length > 0,
231
236
  }, slot: "left-icon" }, h("slot", { name: "icon" }))), !multiline ? (h("input", Object.assign({ id: inputId, name: name, ref: (el) => (this.inputEl = el), type: this.type, min: min, max: max, value: value, class: {
232
- ["no-left-pad"]: !showLeftIcon && readonly,
233
- ["readonly"]: readonly,
234
- ["truncate-value"]: truncateValue,
237
+ "no-left-pad": !showLeftIcon && readonly,
238
+ readonly,
239
+ "truncate-value": truncateValue,
235
240
  }, placeholder: placeholder ? placeholder : "", required: required, disabled: disabledMode, readonly: readonly, onInput: this.onInput, onBlur: this.onBlur, onFocus: this.onFocus, "aria-label": label, "aria-describedby": describedBy, "aria-invalid": invalid, "aria-activedescendant": this.ariaActiveDescendant, "aria-expanded": this.ariaExpanded, "aria-owns": this.ariaOwns, autocomplete: this.autocomplete, autocapitalize: this.autocapitalize, autoFocus: this.autoFocus, spellcheck: spellcheck, inputmode: inputmode, role: this.role, maxlength: maxCharactersReached ? maxCharacters : null, minlength: minCharactersUnattained ? minCharacters : null }, this.inheritedAttributes))) : (h("textarea", Object.assign({ id: inputId, class: {
236
- ["no-resize"]: resize === false || readonly,
237
- ["no-left-pad"]: !showLeftIcon && readonly,
238
- ["readonly"]: readonly,
241
+ "no-resize": resize === false || readonly,
242
+ "no-left-pad": !showLeftIcon && readonly,
243
+ readonly,
239
244
  }, name: name, ref: (el) => (this.inputEl = el), value: value, rows: rows, required: required, disabled: disabledMode, placeholder: placeholder ? placeholder : "", readonly: readonly, onInput: this.onInput, onBlur: this.onBlur, onFocus: this.onFocus, "aria-label": label, "aria-describedby": describedBy, "aria-invalid": invalid, autocapitalize: this.autocapitalize, autoFocus: this.autoFocus, spellcheck: spellcheck, inputmode: inputmode, maxlength: maxCharactersReached ? maxCharacters : null, minlength: minCharactersUnattained ? minCharacters : null }, this.inheritedAttributes))), isSlotUsed(this.el, "clear-button") && (h("slot", { name: "clear-button" })), isSlotUsed(this.el, "search-submit-button") && (h("slot", { name: "search-submit-button" }))), isSlotUsed(this.el, "menu") && h("slot", { name: "menu" }), (!isEmptyString(validationStatus) ||
240
245
  !isEmptyString(validationText) ||
241
246
  maxNumChars > 0 ||
@@ -248,9 +253,7 @@ const TextField = /*@__PURE__*/ proxyCustomElement(class TextField extends HTMLE
248
253
  validationInline) ||
249
254
  validationInlineInternal
250
255
  ? ""
251
- : currentStatus, message: showStatusText ? currentValidationText : "", ariaLiveMode: messageAriaLive, for: inputId, fullWidth: fullWidth }, !readonly && maxNumChars > 0 && (h("div", { slot: "validation-message-adornment" }, !hideCharCount && (h("ic-typography", { variant: "caption", class: {
252
- ["char-count-text"]: true,
253
- } }, h("span", { class: "char-count" }, numChars, "/", maxNumChars))), h("span", { class: "remaining-char-count-desc", "aria-live": "polite" }, hiddenRemainingCharCountDesc), h("span", { hidden: true, id: hiddenCharCountDescId }, "Field can contain a maximum of ", maxNumChars, " characters."))))))));
256
+ : currentStatus, message: showStatusText ? currentValidationText : "", ariaLiveMode: messageAriaLive, for: inputId, fullWidth: fullWidth }, !readonly && maxNumChars > 0 && (h("div", { slot: "validation-message-adornment" }, !hideCharCount && (h("ic-typography", { variant: "caption", class: "char-count-text" }, h("span", { class: "char-count" }, numChars, "/", maxNumChars))), h("span", { class: "remaining-char-count-desc", "aria-live": "polite" }, hiddenRemainingCharCountDesc), h("span", { hidden: true, id: hiddenCharCountDescId }, "Field can contain a maximum of ", maxNumChars, " characters."))))))));
254
257
  }
255
258
  get el() { return this; }
256
259
  static get watchers() { return {
@@ -289,6 +292,7 @@ const TextField = /*@__PURE__*/ proxyCustomElement(class TextField extends HTMLE
289
292
  "rows": [2],
290
293
  "size": [1],
291
294
  "spellcheck": [4],
295
+ "theme": [1],
292
296
  "truncateValue": [4, "truncate-value"],
293
297
  "type": [1],
294
298
  "validationInline": [4, "validation-inline"],
@@ -1 +1 @@
1
- {"file":"ic-text-field2.js","mappings":";;;;;;;;AAAA,MAAM,cAAc,GAAG,qmIAAqmI;;AC0C5nI,IAAI,QAAQ,GAAG,CAAC,CAAC;AACjB,MAAM,kBAAkB,GAAG,CAAC,GAAG,iBAAiB,EAAE,OAAO,CAAC,CAAC;MAU9C,SAAS;;;;;;;;;;;QACZ,wBAAmB,GAA4B,EAAE,CAAC;QAElD,yBAAoB,GAAqB,IAAI,CAAC;QA0U9C,wBAAmB,GAAG,CAAC,KAAa;YAC1C,IAAI,IAAI,CAAC,IAAI,KAAK,QAAQ,EAAE;gBAC1B,IAAI,CAAC,kBAAkB,GAAG,KAAK,IAAI,MAAM,CAAC,KAAK,CAAC,GAAG,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;gBACpE,IAAI,CAAC,gBAAgB,GAAG,MAAM,CAAC,KAAK,CAAC,GAAG,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;aAC1D;SACF,CAAC;QAEM,4BAAuB,GAAG,CAAC,KAAa;YAC9C,IAAI,CAAC,QAAQ,GAAG,KAAK,CAAC,MAAM,CAAC;YAC7B,IAAI,CAAC,oBAAoB;gBACvB,IAAI,CAAC,aAAa,GAAG,CAAC,GAAG,IAAI,CAAC,QAAQ,IAAI,IAAI,CAAC,aAAa,GAAG,KAAK,CAAC;YAEvE,IAAI,IAAI,C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ACE,MAAM,EACJ,IAAI,CAAC,SAAS,CAAC,aAAa,CAAC,KAAK,KAAK;iBACtC,aAAa,KAAK,mBAAmB,CAAC,OAAO;oBAC5C,gBAAgB,CAAC;gBACnB,wBAAwB;kBACpB,EAAE;kBACF,aAAa,EAEnB,OAAO,EAAE,cAAc,GAAG,qBAAqB,GAAG,EAAE,EACpD,YAAY,EAAE,eAAe,EAC7B,GAAG,EAAE,OAAO,EACZ,SAAS,EAAE,SAAS,IAEnB,CAAC,QAAQ,IAAI,WAAW,GAAG,CAAC,KAC3B,WAAK,IAAI,EAAC,8BAA8B,IACrC,CAAC,aAAa,KACb,qBACE,OAAO,EAAC,SAAS,EACjB,KAAK,EAAE;gBACL,CAAC,iBAAiB,GAAG,IAAI;aAC1B,IAED,YAAM,KAAK,EAAC,YAAY,IACrB,QAAQ,OAAG,WAAW,CAClB,CACO,CACjB,EACD,YAAM,KAAK,EAAC,2BAA2B,eAAW,QAAQ,IACvD,4BAA4B,CACxB,EACP,YAAM,MAAM,EAAE,IAAI,EAAE,EAAE,EAAE,qBAAqB,uCACX,WAAW,iBACtC,CACH,CACP,CACmB,CACvB,CACgB,CAChB,EACP;KACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["src/components/ic-text-field/ic-text-field.css?tag=ic-text-field&encapsulation=shadow","src/components/ic-text-field/ic-text-field.tsx"],"sourcesContent":["@import \"../../global/normalize.css\";\n\n:host {\n /**\n * @prop --input-width: Width of the input field\n */\n display: block;\n --ic-input-label-helpertext-padding: var(--ic-space-xxs);\n}\n\n:host(.ic-text-field-full-width) {\n width: 100%;\n}\n\n::placeholder {\n color: var(--ic-color-text-tertiary);\n opacity: 1;\n}\n\ninput,\ntextarea {\n border: 0;\n border-radius: var(--ic-border-radius);\n background-color: var(--ic-architectural-white);\n line-height: 1.5rem;\n letter-spacing: 0.005rem;\n width: 100%;\n padding-right: var(--ic-space-xs);\n padding-left: var(--ic-space-xs);\n}\n\ntextarea {\n min-height: var(--ic-space-lg);\n resize: vertical;\n padding-top: 0.375rem;\n}\n\ninput:focus,\ntextarea:focus {\n border: 0;\n outline: 0;\n}\n\ninput:disabled,\ntextarea:disabled {\n color: var(--ic-architectural-200);\n}\n\ninput.readonly,\ntextarea.readonly {\n color: var(--ic-color-text-primary);\n}\n\n/* Chrome, Safari, Edge */\ninput::-webkit-outer-spin-button,\ninput::-webkit-inner-spin-button {\n -webkit-appearance: none;\n margin: 0;\n}\n\n/* Firefox */\ninput[type=\"number\"] {\n -moz-appearance: textfield;\n}\n\ntextarea.no-resize {\n resize: none;\n}\n\n.char-count-text {\n --ic-typography-color: var(--ic-color-text-secondary);\n\n padding-right: var(--ic-space-xxxs);\n}\n\n.no-left-pad {\n padding-left: 0;\n}\n\n::slotted([slot=\"icon\"]) {\n fill: var(--ic-color-text-tertiary);\n}\n\n.has-value ::slotted([slot=\"icon\"]) {\n fill: var(--ic-color-text-primary);\n}\n\n.char-count {\n margin-right: calc(-1 * var(--ic-space-xxxs));\n}\n\n.remaining-char-count-desc {\n position: absolute;\n left: -9999px;\n}\n\ninput[type=\"search\"]::-webkit-search-cancel-button,\ninput[type=\"search\"]::-webkit-search-decoration,\ninput[type=\"search\"]::-webkit-search-results-button,\ninput[type=\"search\"]::-webkit-search-results-decoration {\n display: none;\n}\n\ninput[type=\"search\"].truncate-value {\n width: 100%;\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n}\n\n@media (forced-colors: active) {\n input.readonly,\n textarea.readonly {\n color: canvastext;\n }\n\n .has-value ::slotted([slot=\"icon\"]) {\n fill: currentcolor;\n }\n}\n","import {\n Component,\n Element,\n Event,\n EventEmitter,\n Host,\n Listen,\n Prop,\n State,\n Watch,\n Method,\n h,\n forceUpdate,\n} from \"@stencil/core\";\nimport {\n IcInformationStatus,\n IcAutocompleteTypes,\n IcAutocorrectStates,\n IcInformationStatusOrEmpty,\n IcValueEventDetail,\n IcSizesNoLarge,\n} from \"../../utils/types\";\nimport {\n inheritAttributes,\n debounceEvent,\n getInputDescribedByText,\n renderHiddenInput,\n isEmptyString,\n onComponentRequiredPropUndefined,\n addFormResetListener,\n removeFormResetListener,\n isSlotUsed,\n removeDisabledFalse,\n checkSlotInChildMutations,\n} from \"../../utils/helpers\";\nimport { IC_INHERITED_ARIA } from \"../../utils/constants\";\nimport {\n IcAriaAutocompleteTypes,\n IcTextFieldInputModes,\n IcTextFieldTypes,\n} from \"./ic-text-field.types\";\n\nlet inputIds = 0;\nconst MUTABLE_ATTRIBUTES = [...IC_INHERITED_ARIA, \"title\"];\n\n/**\n * @slot icon - Content will be placed to the left of the text input.\n */\n@Component({\n tag: \"ic-text-field\",\n styleUrl: \"ic-text-field.css\",\n shadow: true,\n})\nexport class TextField {\n private inheritedAttributes: { [k: string]: string } = {};\n private inputEl: HTMLInputElement | HTMLTextAreaElement;\n private hostMutationObserver: MutationObserver = null;\n\n @Element() el: HTMLIcTextFieldElement;\n\n @State() numChars: number = 0;\n @State() maxCharactersReached: boolean = false;\n @State() maxCharactersWarning: boolean = false;\n @State() minCharactersUnattained: boolean = false;\n @State() maxValueExceeded: boolean = false;\n @State() minValueUnattained: boolean = false;\n\n /**\n * @slot clear-button - an ic-button clear component will render as an end adornment to the input.\n * @slot search-submit-button - an ic-button search submit component will render as an end adornment to the input.\n * @slot menu - an ic-menu component will appear below the input.\n */\n\n /**\n * @internal The active element when focus is on the ic-menu items.\n */\n @Prop() ariaActiveDescendant?: string;\n\n /**\n * @internal Used to identify whether inputting any text triggers more predictions\n */\n @Prop() ariaAutocomplete: IcAriaAutocompleteTypes = undefined;\n\n /**\n * @internal Used to identify if the slotted menu is rendered\n */\n @Prop() ariaExpanded: string;\n\n /**\n * @internal Used to identify any related child component\n */\n @Prop() ariaOwns: string;\n\n /**\n * The automatic capitalisation of the text value as it is entered/edited by the user.\n * Available options: \"off\", \"none\", \"on\", \"sentences\", \"words\", \"characters\".\n */\n @Prop() autocapitalize = \"off\";\n\n /**\n * The state of autocompletion the browser can apply on the text value.\n */\n @Prop() autocomplete: IcAutocompleteTypes = \"off\";\n\n /**\n * The state of autocorrection the browser can apply when the user is entering/editing the text value.\n */\n @Prop() autocorrect: IcAutocorrectStates = \"off\";\n\n /**\n * If `true`, the form control will have input focus when the page loads.\n */\n @Prop() autoFocus = false;\n\n /**\n * If `true`, the disabled state will be set.\n */\n @Prop() disabled: boolean = false;\n\n /**\n * Specify whether the text field fills the full width of the container.\n * If `true`, this overrides the --input-width CSS variable.\n */\n @Prop() fullWidth: boolean = false;\n\n /**\n * The helper text that will be displayed for additional field guidance.\n */\n @Prop() helperText: string = \"\";\n\n /**\n * If `true`, the character count which is displayed when `maxCharacters` is set will be visually hidden.\n */\n @Prop() hideCharCount: boolean = false;\n\n /**\n * If `true`, the label will be hidden and the required label value will be applied as an aria-label.\n */\n @Prop() hideLabel: boolean = false;\n\n /**\n * @internal If `true`, the hidden form input will stop rendering for form submission.\n */\n @Prop() hiddenInput: boolean = true;\n\n /**\n * The ID for the input.\n */\n @Prop() inputId?: string = `ic-text-field-input-${inputIds++}`;\n\n /**\n * A hint to the browser for which keyboard to display.\n * Possible values: `\"none\"`, `\"text\"`, `\"tel\"`, `\"url\"`,\n * `\"email\"`, `\"numeric\"`, `\"decimal\"`, and `\"search\"`.\n */\n @Prop() inputmode: IcTextFieldInputModes = \"text\";\n\n /**\n * The label for the input.\n */\n @Prop() label!: string;\n\n /**\n * The maximum number that can be accepted as a value, when `type` is `number` and `rows` is `1`. (NOTE: Ensure to include visual indication of max value in `helperText` or `label`)\n */\n @Prop() max: string | number = undefined;\n\n /**\n * The count of characters in the field. Will display a warning if the bound is reached. (NOTE: If the value of the text field has been set using the `value` prop, it will be truncated to this number of characters)\n */\n @Prop() maxCharacters: number = 0;\n\n /**\n * The minimum number that can be accepted as a value, when `type` is `number` and `rows` is `1`. (NOTE: Ensure to include visual indication of min value in `helperText` or `label`)\n */\n @Prop() min: string | number = undefined;\n\n /**\n * The minimum number of characters that can be entered in the field.\n */\n @Prop() minCharacters: number = 0;\n\n /**\n * The name of the control, which is submitted with the form data.\n */\n @Prop() name: string = this.inputId;\n\n /**\n * The placeholder value to be displayed.\n */\n @Prop() placeholder: string = \"\";\n\n /**\n * If `true`, the read only state will be set.\n */\n @Prop({ reflect: true }) readonly: boolean = false;\n\n /**\n * If `true`, the input will require a value.\n */\n @Prop() required: boolean = false;\n\n /**\n * If `true`, the multiline text area will be resizeable.\n */\n @Prop() resize: boolean = false;\n\n /**\n * @internal Used to set the role if not default textbox;\n */\n @Prop() role: string;\n\n /**\n * The number of rows to transform the text field into a text area with a specific height.\n */\n @Prop() rows: number = 1;\n\n /**\n * The size of the text field component.\n */\n @Prop() size?: IcSizesNoLarge = \"medium\";\n\n /**\n * If `true`, the value of the text field will have its spelling and grammar checked.\n */\n @Prop() spellcheck: boolean = false;\n /**\n * @internal If `true`, an ellipsis will be displayed at the end of the value if the value is longer than the container.\n */\n @Prop() truncateValue?: boolean;\n\n /**\n * The type of control to display. The default type is text.\n */\n @Prop() type: IcTextFieldTypes = \"text\";\n\n /**\n * If `true`, the icon in input control will be displayed - only applies when validationStatus ='success'.\n */\n @Prop() validationInline: boolean = false;\n\n /**\n * @internal If `true`, the validation will display inline.\n */\n @Prop() validationInlineInternal: boolean = false;\n\n /**\n * The validation state - e.g. 'error' | 'warning' | 'success'.\n */\n @Prop() validationStatus: IcInformationStatusOrEmpty = \"\";\n\n /**\n * The validation state - e.g. 'error' | 'warning' | 'success'.\n */\n @Prop() validationText: string = \"\";\n\n /**\n * The amount of time, in milliseconds, to wait to trigger the `icChange` event after each keystroke.\n */\n @Prop() debounce: number = 0;\n\n @Watch(\"debounce\")\n private debounceChanged() {\n this.icChange = debounceEvent(this.icChange, this.debounce);\n }\n\n /**\n * The value of the text field.\n */\n @Prop({ reflect: true, mutable: true }) value: string = \"\";\n @State() initialValue = this.value;\n\n @Watch(\"value\")\n private watchValueHandler(newValue: string): void {\n let value;\n\n if (this.maxCharacters > 0) {\n value = newValue.substring(0, this.maxCharacters);\n this.value = value;\n } else {\n value = newValue;\n }\n\n if (this.inputEl && this.inputEl.value !== value) {\n this.inputEl.value = value;\n }\n\n this.getMaxValueExceeded(value);\n\n this.getMaxCharactersReached(value);\n\n this.icChange.emit({ value });\n }\n\n /**\n * @internal Emitted when the validationInlineInternal is `true`\n */\n @Event() getValidationText: EventEmitter<IcValueEventDetail>;\n\n /**\n * Emitted when input loses focus.\n */\n @Event() icBlur: EventEmitter<IcValueEventDetail>;\n\n /**\n * Emitted when the value has changed.\n */\n @Event() icChange: EventEmitter<IcValueEventDetail>;\n\n /**\n * Emitted when input gains focus.\n */\n @Event() icFocus: EventEmitter<IcValueEventDetail>;\n\n /**\n * Emitted when a keyboard input occurred.\n */\n @Event() icInput: EventEmitter<IcValueEventDetail>;\n\n /**\n * Emitted when a keydown event occurred.\n */\n @Event() icKeydown: EventEmitter<{ event: KeyboardEvent }>;\n\n connectedCallback(): void {\n this.debounceChanged();\n }\n\n disconnectedCallback(): void {\n removeFormResetListener(this.el, this.handleFormReset);\n this.hostMutationObserver?.disconnect();\n }\n\n componentWillLoad(): void {\n if (this.value !== this.initialValue) {\n this.watchValueHandler(this.value);\n } else if (this.maxCharacters > 0) {\n this.value = this.value.substring(0, this.maxCharacters);\n }\n\n this.getMaxValueExceeded(this.value);\n this.getMaxCharactersReached(this.value);\n\n this.inheritedAttributes = inheritAttributes(this.el, MUTABLE_ATTRIBUTES);\n\n if (this.readonly) {\n this.maxValueExceeded = false;\n this.minValueUnattained = false;\n }\n\n addFormResetListener(this.el, this.handleFormReset);\n\n removeDisabledFalse(this.disabled, this.el);\n }\n\n componentDidLoad(): void {\n onComponentRequiredPropUndefined(\n [{ prop: this.label, propName: \"label\" }],\n \"Text Field\"\n );\n if (this.validationInlineInternal) {\n this.getValidationText.emit({ value: this.validationText });\n }\n\n this.hostMutationObserver = new MutationObserver(this.hostMutationCallback);\n this.hostMutationObserver.observe(this.el, {\n attributes: true,\n childList: true,\n });\n }\n\n @Listen(\"keydown\", {})\n handleKeyDown(ev: KeyboardEvent): void {\n this.icKeydown.emit({ event: ev });\n this.maxCharactersWarning = this.maxCharactersReached;\n }\n\n /**\n * Sets focus on the native `input`.\n */\n\n @Method()\n async setFocus(): Promise<void> {\n this.inputEl?.focus();\n }\n\n private getMaxValueExceeded = (value: string) => {\n if (this.type === \"number\") {\n this.minValueUnattained = value && Number(value) < Number(this.min);\n this.maxValueExceeded = Number(value) > Number(this.max);\n }\n };\n\n private getMaxCharactersReached = (value: string) => {\n this.numChars = value.length;\n this.maxCharactersReached =\n this.maxCharacters > 0 ? this.numChars >= this.maxCharacters : false;\n\n if (this.maxCharactersWarning && !this.maxCharactersReached) {\n this.maxCharactersWarning = false;\n }\n };\n\n private onInput = (ev: Event) => {\n this.value = (ev.target as HTMLInputElement).value;\n this.icInput.emit({ value: this.value });\n };\n\n private onBlur = (ev: Event) => {\n const value = (ev.target as HTMLInputElement).value;\n this.numChars = value.length;\n this.minCharactersUnattained =\n this.minCharacters > 0 ? this.numChars < this.minCharacters : false;\n this.icBlur.emit({ value: value });\n };\n\n private onFocus = (ev: Event) => {\n this.icFocus.emit({ value: (ev.target as HTMLInputElement).value });\n };\n\n private hasStatus = (status: IcInformationStatusOrEmpty) =>\n status !== \"\" && !this.disabled;\n\n private handleFormReset = (): void => {\n this.value = this.initialValue;\n };\n\n // triggered when attributes of host element change\n private hostMutationCallback = (mutationList: MutationRecord[]): void => {\n let forceComponentUpdate = false;\n mutationList.forEach(\n ({ attributeName, type, addedNodes, removedNodes }) => {\n if (MUTABLE_ATTRIBUTES.includes(attributeName)) {\n this.inheritedAttributes[attributeName] =\n this.el.getAttribute(attributeName);\n forceComponentUpdate = true;\n } else if (type === \"childList\") {\n forceComponentUpdate = checkSlotInChildMutations(\n addedNodes,\n removedNodes,\n \"icon\"\n );\n }\n }\n );\n if (forceComponentUpdate) {\n forceUpdate(this);\n }\n };\n\n render() {\n const {\n inputId,\n name,\n label,\n required,\n size,\n placeholder,\n helperText,\n hideCharCount,\n rows,\n resize,\n disabled,\n value,\n min,\n max,\n numChars,\n readonly,\n maxCharacters,\n maxCharactersWarning,\n maxCharactersReached,\n minCharacters,\n minCharactersUnattained,\n minValueUnattained,\n maxValueExceeded,\n validationStatus,\n validationText,\n validationInline,\n validationInlineInternal,\n spellcheck,\n inputmode,\n fullWidth,\n truncateValue,\n hiddenInput,\n } = this;\n\n const disabledMode = readonly || disabled;\n\n const currentStatus =\n maxValueExceeded ||\n minValueUnattained ||\n minCharactersUnattained ||\n maxCharactersWarning\n ? maxCharactersWarning\n ? IcInformationStatus.Warning\n : IcInformationStatus.Error\n : validationStatus;\n\n const currentValidationText = maxCharactersWarning\n ? `Maximum input is ${maxCharacters} characters`\n : maxValueExceeded\n ? `Maximum value of ${max} exceeded`\n : minValueUnattained\n ? `Minimum value of ${min} not met`\n : minCharactersUnattained\n ? `Minimum input is ${minCharacters} characters`\n : validationText;\n\n const maxNumChars = readonly ? 0 : maxCharacters;\n const messageAriaLive =\n maxCharactersWarning ||\n maxValueExceeded ||\n minValueUnattained ||\n currentStatus === IcInformationStatus.Error\n ? \"assertive\"\n : \"polite\";\n\n const showStatusText =\n this.hasStatus(currentStatus) &&\n !(currentStatus == IcInformationStatus.Success && validationInline) &&\n !validationInlineInternal;\n\n const multiline = rows > 1;\n\n const charsRemaining = maxNumChars - numChars;\n const hiddenRemainingCharCountDesc = `${charsRemaining} character${\n charsRemaining === 1 ? \"\" : \"s\"\n } remaining.`;\n const hiddenCharCountDescId =\n maxCharacters > 0 ? `${inputId}-char-count-desc` : \"\";\n\n const describedBy = `${hiddenCharCountDescId} ${getInputDescribedByText(\n inputId,\n helperText !== \"\",\n showStatusText\n )}`.trim();\n\n const disabledText = disabledMode && !readonly;\n const showLeftIcon =\n !!this.el.querySelector(`[slot=\"icon\"]`) && !disabledText;\n\n const invalid = `${currentStatus === IcInformationStatus.Error}`;\n\n if (hiddenInput) {\n renderHiddenInput(true, this.el, name, value, disabledMode);\n }\n return (\n <Host class={{ [\"ic-text-field-full-width\"]: fullWidth }}>\n <ic-input-container readonly={readonly} disabled={disabledMode}>\n {!this.hideLabel && (\n <ic-input-label\n for={inputId}\n label={label}\n helperText={helperText}\n required={required}\n disabled={disabledText}\n readonly={readonly}\n ></ic-input-label>\n )}\n\n <ic-input-component-container\n size={size}\n validationStatus={currentStatus}\n multiLine={multiline}\n disabled={disabledMode}\n readonly={readonly}\n validationInline={validationInline}\n fullWidth={fullWidth}\n >\n {showLeftIcon && (\n <span\n class={{\n [\"readonly\"]: readonly,\n [\"has-value\"]: value.length > 0,\n }}\n slot=\"left-icon\"\n >\n <slot name=\"icon\" />\n </span>\n )}\n\n {!multiline ? (\n <input\n id={inputId}\n name={name}\n ref={(el) => (this.inputEl = el as HTMLInputElement)}\n type={this.type}\n min={min}\n max={max}\n value={value}\n class={{\n [\"no-left-pad\"]: !showLeftIcon && readonly,\n [\"readonly\"]: readonly,\n [\"truncate-value\"]: truncateValue,\n }}\n placeholder={placeholder ? placeholder : \"\"}\n required={required}\n disabled={disabledMode}\n readonly={readonly}\n onInput={this.onInput}\n onBlur={this.onBlur}\n onFocus={this.onFocus}\n aria-label={label}\n aria-describedby={describedBy}\n aria-invalid={invalid}\n aria-activedescendant={this.ariaActiveDescendant}\n aria-expanded={this.ariaExpanded}\n aria-owns={this.ariaOwns}\n autocomplete={this.autocomplete}\n autocapitalize={this.autocapitalize}\n autoFocus={this.autoFocus}\n spellcheck={spellcheck}\n inputmode={inputmode}\n role={this.role}\n maxlength={maxCharactersReached ? maxCharacters : null}\n minlength={minCharactersUnattained ? minCharacters : null}\n {...this.inheritedAttributes}\n ></input>\n ) : (\n <textarea\n id={inputId}\n class={{\n [\"no-resize\"]: resize === false || readonly,\n [\"no-left-pad\"]: !showLeftIcon && readonly,\n [\"readonly\"]: readonly,\n }}\n name={name}\n ref={(el) => (this.inputEl = el as HTMLTextAreaElement)}\n value={value}\n rows={rows}\n required={required}\n disabled={disabledMode}\n placeholder={placeholder ? placeholder : \"\"}\n readonly={readonly}\n onInput={this.onInput}\n onBlur={this.onBlur}\n onFocus={this.onFocus}\n aria-label={label}\n aria-describedby={describedBy}\n aria-invalid={invalid}\n autocapitalize={this.autocapitalize}\n autoFocus={this.autoFocus}\n spellcheck={spellcheck}\n inputmode={inputmode}\n maxlength={maxCharactersReached ? maxCharacters : null}\n minlength={minCharactersUnattained ? minCharacters : null}\n {...this.inheritedAttributes}\n ></textarea>\n )}\n {isSlotUsed(this.el, \"clear-button\") && (\n <slot name=\"clear-button\"></slot>\n )}\n {isSlotUsed(this.el, \"search-submit-button\") && (\n <slot name=\"search-submit-button\"></slot>\n )}\n </ic-input-component-container>\n {isSlotUsed(this.el, \"menu\") && <slot name=\"menu\"></slot>}\n {(!isEmptyString(validationStatus) ||\n !isEmptyString(validationText) ||\n maxNumChars > 0 ||\n maxValueExceeded ||\n maxCharactersWarning ||\n minCharactersUnattained ||\n minValueUnattained) &&\n !validationInlineInternal && (\n <ic-input-validation\n status={\n this.hasStatus(currentStatus) === false ||\n (currentStatus === IcInformationStatus.Success &&\n validationInline) ||\n validationInlineInternal\n ? \"\"\n : currentStatus\n }\n message={showStatusText ? currentValidationText : \"\"}\n ariaLiveMode={messageAriaLive}\n for={inputId}\n fullWidth={fullWidth}\n >\n {!readonly && maxNumChars > 0 && (\n <div slot=\"validation-message-adornment\">\n {!hideCharCount && (\n <ic-typography\n variant=\"caption\"\n class={{\n [\"char-count-text\"]: true,\n }}\n >\n <span class=\"char-count\">\n {numChars}/{maxNumChars}\n </span>\n </ic-typography>\n )}\n <span class=\"remaining-char-count-desc\" aria-live=\"polite\">\n {hiddenRemainingCharCountDesc}\n </span>\n <span hidden={true} id={hiddenCharCountDescId}>\n Field can contain a maximum of {maxNumChars} characters.\n </span>\n </div>\n )}\n </ic-input-validation>\n )}\n </ic-input-container>\n </Host>\n );\n }\n}\n"],"version":3}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IACrC,CAAC,aAAa,KACb,qBAAe,OAAO,EAAC,SAAS,EAAC,KAAK,EAAC,iBAAiB,IACtD,YAAM,KAAK,EAAC,YAAY,IACrB,QAAQ,OAAG,WAAW,CAClB,CACO,CACjB,EACD,YAAM,KAAK,EAAC,2BAA2B,eAAW,QAAQ,IACvD,4BAA4B,CACxB,EACP,YAAM,MAAM,EAAE,IAAI,EAAE,EAAE,EAAE,qBAAqB,uCACX,WAAW,iBACtC,CACH,CACP,CACmB,CACvB,CACgB,CAChB,EACP;KACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["src/components/ic-text-field/ic-text-field.css?tag=ic-text-field&encapsulation=shadow","src/components/ic-text-field/ic-text-field.tsx"],"sourcesContent":["@import \"../../global/normalize.css\";\n\n:host {\n /**\n * @prop --input-width: Width of the input field\n */\n display: block;\n\n --ic-input-label-helpertext-padding: var(--ic-space-xxs);\n --border-color: var(--ic-text-field-border-neutral);\n --border-color-hover: var(--ic-text-field-border-neutral-hover);\n --border-color-pressed: var(--ic-text-field-border-neutral-pressed);\n --border-color-disabled: var(--ic-text-field-border-disabled);\n --border-color-error: var(--ic-text-field-border-error);\n --border-color-error-hover: var(--ic-text-field-border-error-hover);\n --border-color-error-pressed: var(--ic-text-field-border-error-pressed);\n --border-color-success: var(--ic-text-field-border-success);\n --border-color-success-hover: var(--ic-text-field-border-success-hover);\n --border-color-success-pressed: var(--ic-text-field-border-success-pressed);\n --border-color-warning: var(--ic-text-field-border-warning);\n --border-color-warning-hover: var(--ic-text-field-border-warning-hover);\n --border-color-warning-pressed: var(--ic-text-field-border-warning-pressed);\n --ic-input-label-text-color: var(--ic-text-field-label);\n --ic-input-label-helper-text-color: var(--ic-text-field-subtitle);\n --ic-input-validation-status-text-color: var(--ic-text-field-state-text);\n --ic-input-validation-error: var(--ic-text-field-state-icon-error);\n --ic-input-validation-warning-icon-color: var(\n --ic-text-field-state-icon-warning\n );\n --ic-input-validation-success-icon-color: var(\n --ic-text-field-state-icon-success\n );\n --ic-input-component-container-success-icon-inline-color: var(\n --ic-text-field-state-icon-success\n );\n}\n\n:host(.ic-text-field-disabled) {\n --ic-input-label-text-color: var(--ic-text-field-label-disabled);\n --ic-input-label-helper-text-color: var(--ic-text-field-subtitle-disabled);\n --text-field-placeholder-color: var(\n --ic-text-field-text-area-placeholder-text-disabled\n );\n}\n\n:host(.ic-text-field-full-width) {\n width: 100%;\n}\n\n::placeholder {\n color: var(\n --text-field-placeholder-color,\n var(--ic-text-field-placeholder-text)\n );\n opacity: 1;\n}\n\ninput,\ntextarea {\n border: 0;\n border-radius: var(--ic-border-radius);\n color: var(--text-field-text-color, var(--ic-text-field-text));\n background-color: var(--input-bg-color, var(--ic-text-field-background));\n line-height: 1.5rem;\n letter-spacing: 0.005rem;\n width: 100%;\n padding-right: var(--ic-space-xs);\n padding-left: var(--ic-space-xs);\n caret-color: var(\n --text-field-typing-cursor,\n var(--ic-text-field-typing-cursor)\n );\n}\n\ntextarea {\n min-height: var(--ic-space-lg);\n resize: vertical;\n padding-top: 0.375rem;\n}\n\ninput:focus,\ntextarea:focus {\n border: 0;\n outline: 0;\n}\n\ninput:disabled,\ntextarea:disabled {\n color: var(\n --text-field-disabled-text-color,\n var(--ic-text-field-text-disabled)\n );\n}\n\ninput.readonly,\ntextarea.readonly {\n color: var(--ic-text-field-read-only-input-text-internal);\n}\n\n/* Chrome, Safari, Edge */\ninput::-webkit-outer-spin-button,\ninput::-webkit-inner-spin-button {\n -webkit-appearance: none;\n margin: 0;\n}\n\n/* Firefox */\ninput[type=\"number\"] {\n -moz-appearance: textfield;\n}\n\ntextarea.no-resize {\n resize: none;\n}\n\n.char-count-text {\n --ic-typography-color: var(--ic-text-field-character-limit);\n\n padding-right: var(--ic-space-xxxs);\n}\n\n:host(.ic-text-field-disabled) .char-count-text {\n --ic-typography-color: var(--ic-text-field-character-limit-disabled);\n}\n\n.no-left-pad {\n padding-left: 0;\n}\n\n::slotted([slot=\"icon\"]) {\n fill: var(--ic-text-field-text-disabled);\n}\n\n.has-value ::slotted([slot=\"icon\"]) {\n fill: var(--ic-text-field-input-internal-icon);\n}\n\n.char-count {\n margin-right: calc(-1 * var(--ic-space-xxxs));\n}\n\n.remaining-char-count-desc {\n position: absolute;\n left: -9999px;\n}\n\ninput[type=\"search\"]::-webkit-search-cancel-button,\ninput[type=\"search\"]::-webkit-search-decoration,\ninput[type=\"search\"]::-webkit-search-results-button,\ninput[type=\"search\"]::-webkit-search-results-decoration {\n display: none;\n}\n\ninput[type=\"search\"].truncate-value {\n width: 100%;\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n}\n\n@media (forced-colors: active) {\n input.readonly,\n textarea.readonly {\n color: canvastext;\n }\n\n .has-value ::slotted([slot=\"icon\"]) {\n fill: currentcolor;\n }\n}\n","import {\n Component,\n Element,\n Event,\n EventEmitter,\n Host,\n Listen,\n Prop,\n State,\n Watch,\n Method,\n h,\n forceUpdate,\n} from \"@stencil/core\";\nimport {\n IcInformationStatus,\n IcAutocompleteTypes,\n IcAutocorrectStates,\n IcInformationStatusOrEmpty,\n IcValueEventDetail,\n IcSizesNoLarge,\n IcThemeMode,\n} from \"../../utils/types\";\nimport {\n inheritAttributes,\n debounceEvent,\n getInputDescribedByText,\n renderHiddenInput,\n isEmptyString,\n onComponentRequiredPropUndefined,\n addFormResetListener,\n removeFormResetListener,\n isSlotUsed,\n removeDisabledFalse,\n checkSlotInChildMutations,\n} from \"../../utils/helpers\";\nimport { IC_INHERITED_ARIA } from \"../../utils/constants\";\nimport {\n IcAriaAutocompleteTypes,\n IcTextFieldInputModes,\n IcTextFieldTypes,\n} from \"./ic-text-field.types\";\n\nlet inputIds = 0;\nconst MUTABLE_ATTRIBUTES = [...IC_INHERITED_ARIA, \"title\"];\n\n/**\n * @slot icon - Content will be placed to the left of the text input.\n */\n@Component({\n tag: \"ic-text-field\",\n styleUrl: \"ic-text-field.css\",\n shadow: true,\n})\nexport class TextField {\n private inheritedAttributes: { [k: string]: string } = {};\n private inputEl: HTMLInputElement | HTMLTextAreaElement;\n private hostMutationObserver: MutationObserver = null;\n\n @Element() el: HTMLIcTextFieldElement;\n\n @State() numChars: number = 0;\n @State() maxCharactersReached: boolean = false;\n @State() maxCharactersWarning: boolean = false;\n @State() minCharactersUnattained: boolean = false;\n @State() maxValueExceeded: boolean = false;\n @State() minValueUnattained: boolean = false;\n\n /**\n * @slot clear-button - an ic-button clear component will render as an end adornment to the input.\n * @slot search-submit-button - an ic-button search submit component will render as an end adornment to the input.\n * @slot menu - an ic-menu component will appear below the input.\n */\n\n /**\n * @internal The active element when focus is on the ic-menu items.\n */\n @Prop() ariaActiveDescendant?: string;\n\n /**\n * @internal Used to identify whether inputting any text triggers more predictions\n */\n @Prop() ariaAutocomplete: IcAriaAutocompleteTypes = undefined;\n\n /**\n * @internal Used to identify if the slotted menu is rendered\n */\n @Prop() ariaExpanded: string;\n\n /**\n * @internal Used to identify any related child component\n */\n @Prop() ariaOwns: string;\n\n /**\n * The automatic capitalisation of the text value as it is entered/edited by the user.\n * Available options: \"off\", \"none\", \"on\", \"sentences\", \"words\", \"characters\".\n */\n @Prop() autocapitalize = \"off\";\n\n /**\n * The state of autocompletion the browser can apply on the text value.\n */\n @Prop() autocomplete: IcAutocompleteTypes = \"off\";\n\n /**\n * The state of autocorrection the browser can apply when the user is entering/editing the text value.\n */\n @Prop() autocorrect: IcAutocorrectStates = \"off\";\n\n /**\n * If `true`, the form control will have input focus when the page loads.\n */\n @Prop() autoFocus = false;\n\n /**\n * If `true`, the disabled state will be set.\n */\n @Prop() disabled: boolean = false;\n\n /**\n * Specify whether the text field fills the full width of the container.\n * If `true`, this overrides the --input-width CSS variable.\n */\n @Prop() fullWidth: boolean = false;\n\n /**\n * The helper text that will be displayed for additional field guidance.\n */\n @Prop() helperText: string = \"\";\n\n /**\n * If `true`, the character count which is displayed when `maxCharacters` is set will be visually hidden.\n */\n @Prop() hideCharCount: boolean = false;\n\n /**\n * If `true`, the label will be hidden and the required label value will be applied as an aria-label.\n */\n @Prop() hideLabel: boolean = false;\n\n /**\n * @internal If `true`, the hidden form input will stop rendering for form submission.\n */\n @Prop() hiddenInput: boolean = true;\n\n /**\n * The ID for the input.\n */\n @Prop() inputId?: string = `ic-text-field-input-${inputIds++}`;\n\n /**\n * A hint to the browser for which keyboard to display.\n * Possible values: `\"none\"`, `\"text\"`, `\"tel\"`, `\"url\"`,\n * `\"email\"`, `\"numeric\"`, `\"decimal\"`, and `\"search\"`.\n */\n @Prop() inputmode: IcTextFieldInputModes = \"text\";\n\n /**\n * The label for the input.\n */\n @Prop() label!: string;\n\n /**\n * The maximum number that can be accepted as a value, when `type` is `number` and `rows` is `1`. (NOTE: Ensure to include visual indication of max value in `helperText` or `label`)\n */\n @Prop() max: string | number = undefined;\n\n /**\n * The count of characters in the field. Will display a warning if the bound is reached. (NOTE: If the value of the text field has been set using the `value` prop, it will be truncated to this number of characters)\n */\n @Prop() maxCharacters: number = 0;\n\n /**\n * The minimum number that can be accepted as a value, when `type` is `number` and `rows` is `1`. (NOTE: Ensure to include visual indication of min value in `helperText` or `label`)\n */\n @Prop() min: string | number = undefined;\n\n /**\n * The minimum number of characters that can be entered in the field.\n */\n @Prop() minCharacters: number = 0;\n\n /**\n * The name of the control, which is submitted with the form data.\n */\n @Prop() name: string = this.inputId;\n\n /**\n * The placeholder value to be displayed.\n */\n @Prop() placeholder: string = \"\";\n\n /**\n * If `true`, the read only state will be set.\n */\n @Prop({ reflect: true }) readonly: boolean = false;\n\n /**\n * If `true`, the input will require a value.\n */\n @Prop() required: boolean = false;\n\n /**\n * If `true`, the multiline text area will be resizeable.\n */\n @Prop() resize: boolean = false;\n\n /**\n * @internal Used to set the role if not default textbox;\n */\n @Prop() role: string;\n\n /**\n * The number of rows to transform the text field into a text area with a specific height.\n */\n @Prop() rows: number = 1;\n\n /**\n * The size of the text field component.\n */\n @Prop() size?: IcSizesNoLarge = \"medium\";\n\n /**\n * If `true`, the value of the text field will have its spelling and grammar checked.\n */\n @Prop() spellcheck: boolean = false;\n\n /**\n * Sets the theme color to the dark or light theme color. \"inherit\" will set the color based on the system settings or ic-theme component.\n */\n @Prop() theme: IcThemeMode = \"inherit\";\n\n /**\n * @internal If `true`, an ellipsis will be displayed at the end of the value if the value is longer than the container.\n */\n @Prop() truncateValue?: boolean;\n\n /**\n * The type of control to display. The default type is text.\n */\n @Prop() type: IcTextFieldTypes = \"text\";\n\n /**\n * If `true`, the icon in input control will be displayed - only applies when validationStatus ='success'.\n */\n @Prop() validationInline: boolean = false;\n\n /**\n * @internal If `true`, the validation will display inline.\n */\n @Prop() validationInlineInternal: boolean = false;\n\n /**\n * The validation state - e.g. 'error' | 'warning' | 'success'.\n */\n @Prop() validationStatus: IcInformationStatusOrEmpty = \"\";\n\n /**\n * The validation state - e.g. 'error' | 'warning' | 'success'.\n */\n @Prop() validationText: string = \"\";\n\n /**\n * The amount of time, in milliseconds, to wait to trigger the `icChange` event after each keystroke.\n */\n @Prop() debounce: number = 0;\n\n @Watch(\"debounce\")\n private debounceChanged() {\n this.icChange = debounceEvent(this.icChange, this.debounce);\n }\n\n /**\n * The value of the text field.\n */\n @Prop({ reflect: true, mutable: true }) value: string = \"\";\n @State() initialValue = this.value;\n\n @Watch(\"value\")\n private watchValueHandler(newValue: string): void {\n let value;\n\n if (this.maxCharacters > 0) {\n value = newValue.substring(0, this.maxCharacters);\n this.value = value;\n } else {\n value = newValue;\n }\n\n if (this.inputEl && this.inputEl.value !== value) {\n this.inputEl.value = value;\n }\n\n this.getMaxValueExceeded(value);\n\n this.getMaxCharactersReached(value);\n\n this.icChange.emit({ value });\n }\n\n /**\n * @internal Emitted when the validationInlineInternal is `true`\n */\n @Event() getValidationText: EventEmitter<IcValueEventDetail>;\n\n /**\n * Emitted when input loses focus.\n */\n @Event() icBlur: EventEmitter<IcValueEventDetail>;\n\n /**\n * Emitted when the value has changed.\n */\n @Event() icChange: EventEmitter<IcValueEventDetail>;\n\n /**\n * Emitted when input gains focus.\n */\n @Event() icFocus: EventEmitter<IcValueEventDetail>;\n\n /**\n * Emitted when a keyboard input occurred.\n */\n @Event() icInput: EventEmitter<IcValueEventDetail>;\n\n /**\n * Emitted when a keydown event occurred.\n */\n @Event() icKeydown: EventEmitter<{ event: KeyboardEvent }>;\n\n connectedCallback(): void {\n this.debounceChanged();\n }\n\n disconnectedCallback(): void {\n removeFormResetListener(this.el, this.handleFormReset);\n this.hostMutationObserver?.disconnect();\n }\n\n componentWillLoad(): void {\n if (this.value !== this.initialValue) {\n this.watchValueHandler(this.value);\n } else if (this.maxCharacters > 0) {\n this.value = this.value.substring(0, this.maxCharacters);\n }\n\n this.getMaxValueExceeded(this.value);\n this.getMaxCharactersReached(this.value);\n\n this.inheritedAttributes = inheritAttributes(this.el, MUTABLE_ATTRIBUTES);\n\n if (this.readonly) {\n this.maxValueExceeded = false;\n this.minValueUnattained = false;\n }\n\n addFormResetListener(this.el, this.handleFormReset);\n\n removeDisabledFalse(this.disabled, this.el);\n }\n\n componentDidLoad(): void {\n onComponentRequiredPropUndefined(\n [{ prop: this.label, propName: \"label\" }],\n \"Text Field\"\n );\n if (this.validationInlineInternal) {\n this.getValidationText.emit({ value: this.validationText });\n }\n\n this.hostMutationObserver = new MutationObserver(this.hostMutationCallback);\n this.hostMutationObserver.observe(this.el, {\n attributes: true,\n childList: true,\n });\n }\n\n @Listen(\"keydown\", {})\n handleKeyDown(ev: KeyboardEvent): void {\n this.icKeydown.emit({ event: ev });\n this.maxCharactersWarning = this.maxCharactersReached;\n }\n\n /**\n * Sets focus on the native `input`.\n */\n\n @Method()\n async setFocus(): Promise<void> {\n this.inputEl?.focus();\n }\n\n private getMaxValueExceeded = (value: string) => {\n if (this.type === \"number\") {\n this.minValueUnattained = value && Number(value) < Number(this.min);\n this.maxValueExceeded = Number(value) > Number(this.max);\n }\n };\n\n private getMaxCharactersReached = (value: string) => {\n this.numChars = value.length;\n this.maxCharactersReached =\n this.maxCharacters > 0 ? this.numChars >= this.maxCharacters : false;\n\n if (this.maxCharactersWarning && !this.maxCharactersReached) {\n this.maxCharactersWarning = false;\n }\n };\n\n private onInput = (ev: Event) => {\n this.value = (ev.target as HTMLInputElement).value;\n this.icInput.emit({ value: this.value });\n };\n\n private onBlur = (ev: Event) => {\n const value = (ev.target as HTMLInputElement).value;\n this.numChars = value.length;\n this.minCharactersUnattained =\n this.minCharacters > 0 ? this.numChars < this.minCharacters : false;\n this.icBlur.emit({ value: value });\n };\n\n private onFocus = (ev: Event) => {\n this.icFocus.emit({ value: (ev.target as HTMLInputElement).value });\n };\n\n private hasStatus = (status: IcInformationStatusOrEmpty) =>\n status !== \"\" && !this.disabled;\n\n private handleFormReset = (): void => {\n this.value = this.initialValue;\n };\n\n // triggered when attributes of host element change\n private hostMutationCallback = (mutationList: MutationRecord[]): void => {\n let forceComponentUpdate = false;\n mutationList.forEach(\n ({ attributeName, type, addedNodes, removedNodes }) => {\n if (MUTABLE_ATTRIBUTES.includes(attributeName)) {\n this.inheritedAttributes[attributeName] =\n this.el.getAttribute(attributeName);\n forceComponentUpdate = true;\n } else if (type === \"childList\") {\n forceComponentUpdate = checkSlotInChildMutations(\n addedNodes,\n removedNodes,\n \"icon\"\n );\n }\n }\n );\n if (forceComponentUpdate) {\n forceUpdate(this);\n }\n };\n\n render() {\n const {\n inputId,\n name,\n label,\n required,\n size,\n placeholder,\n helperText,\n hideCharCount,\n rows,\n resize,\n disabled,\n value,\n min,\n max,\n numChars,\n readonly,\n maxCharacters,\n maxCharactersWarning,\n maxCharactersReached,\n minCharacters,\n minCharactersUnattained,\n minValueUnattained,\n maxValueExceeded,\n validationStatus,\n validationText,\n validationInline,\n validationInlineInternal,\n spellcheck,\n inputmode,\n fullWidth,\n truncateValue,\n hiddenInput,\n theme,\n } = this;\n\n const disabledMode = readonly || disabled;\n\n const currentStatus =\n maxValueExceeded ||\n minValueUnattained ||\n minCharactersUnattained ||\n maxCharactersWarning\n ? maxCharactersWarning\n ? IcInformationStatus.Warning\n : IcInformationStatus.Error\n : validationStatus;\n\n const currentValidationText = maxCharactersWarning\n ? `Maximum input is ${maxCharacters} characters`\n : maxValueExceeded\n ? `Maximum value of ${max} exceeded`\n : minValueUnattained\n ? `Minimum value of ${min} not met`\n : minCharactersUnattained\n ? `Minimum input is ${minCharacters} characters`\n : validationText;\n\n const maxNumChars = readonly ? 0 : maxCharacters;\n const messageAriaLive =\n maxCharactersWarning ||\n maxValueExceeded ||\n minValueUnattained ||\n currentStatus === IcInformationStatus.Error\n ? \"assertive\"\n : \"polite\";\n\n const showStatusText =\n this.hasStatus(currentStatus) &&\n !(currentStatus == IcInformationStatus.Success && validationInline) &&\n !validationInlineInternal;\n\n const multiline = rows > 1;\n\n const charsRemaining = maxNumChars - numChars;\n const hiddenRemainingCharCountDesc = `${charsRemaining} character${\n charsRemaining === 1 ? \"\" : \"s\"\n } remaining.`;\n const hiddenCharCountDescId =\n maxCharacters > 0 ? `${inputId}-char-count-desc` : \"\";\n\n const describedBy = `${hiddenCharCountDescId} ${getInputDescribedByText(\n inputId,\n helperText !== \"\",\n showStatusText\n )}`.trim();\n\n const disabledText = disabledMode && !readonly;\n const showLeftIcon =\n !!this.el.querySelector(`[slot=\"icon\"]`) && !disabledText;\n\n const invalid = `${currentStatus === IcInformationStatus.Error}`;\n\n if (hiddenInput) {\n renderHiddenInput(true, this.el, name, value, disabledMode);\n }\n return (\n <Host\n class={{\n \"ic-text-field-full-width\": fullWidth,\n [`ic-theme-${theme}`]: theme !== \"inherit\",\n \"ic-text-field-disabled\": disabledMode,\n }}\n >\n <ic-input-container readonly={readonly} disabled={disabledMode}>\n {!this.hideLabel && (\n <ic-input-label\n for={inputId}\n label={label}\n helperText={helperText}\n required={required}\n disabled={disabledText}\n readonly={readonly}\n ></ic-input-label>\n )}\n\n <ic-input-component-container\n size={size}\n validationStatus={currentStatus}\n multiLine={multiline}\n disabled={disabledMode}\n readonly={readonly}\n validationInline={validationInline}\n fullWidth={fullWidth}\n >\n {showLeftIcon && (\n <span\n class={{\n readonly,\n \"has-value\": value.length > 0,\n }}\n slot=\"left-icon\"\n >\n <slot name=\"icon\" />\n </span>\n )}\n\n {!multiline ? (\n <input\n id={inputId}\n name={name}\n ref={(el) => (this.inputEl = el as HTMLInputElement)}\n type={this.type}\n min={min}\n max={max}\n value={value}\n class={{\n \"no-left-pad\": !showLeftIcon && readonly,\n readonly,\n \"truncate-value\": truncateValue,\n }}\n placeholder={placeholder ? placeholder : \"\"}\n required={required}\n disabled={disabledMode}\n readonly={readonly}\n onInput={this.onInput}\n onBlur={this.onBlur}\n onFocus={this.onFocus}\n aria-label={label}\n aria-describedby={describedBy}\n aria-invalid={invalid}\n aria-activedescendant={this.ariaActiveDescendant}\n aria-expanded={this.ariaExpanded}\n aria-owns={this.ariaOwns}\n autocomplete={this.autocomplete}\n autocapitalize={this.autocapitalize}\n autoFocus={this.autoFocus}\n spellcheck={spellcheck}\n inputmode={inputmode}\n role={this.role}\n maxlength={maxCharactersReached ? maxCharacters : null}\n minlength={minCharactersUnattained ? minCharacters : null}\n {...this.inheritedAttributes}\n ></input>\n ) : (\n <textarea\n id={inputId}\n class={{\n \"no-resize\": resize === false || readonly,\n \"no-left-pad\": !showLeftIcon && readonly,\n readonly,\n }}\n name={name}\n ref={(el) => (this.inputEl = el as HTMLTextAreaElement)}\n value={value}\n rows={rows}\n required={required}\n disabled={disabledMode}\n placeholder={placeholder ? placeholder : \"\"}\n readonly={readonly}\n onInput={this.onInput}\n onBlur={this.onBlur}\n onFocus={this.onFocus}\n aria-label={label}\n aria-describedby={describedBy}\n aria-invalid={invalid}\n autocapitalize={this.autocapitalize}\n autoFocus={this.autoFocus}\n spellcheck={spellcheck}\n inputmode={inputmode}\n maxlength={maxCharactersReached ? maxCharacters : null}\n minlength={minCharactersUnattained ? minCharacters : null}\n {...this.inheritedAttributes}\n ></textarea>\n )}\n {isSlotUsed(this.el, \"clear-button\") && (\n <slot name=\"clear-button\"></slot>\n )}\n {isSlotUsed(this.el, \"search-submit-button\") && (\n <slot name=\"search-submit-button\"></slot>\n )}\n </ic-input-component-container>\n {isSlotUsed(this.el, \"menu\") && <slot name=\"menu\"></slot>}\n {(!isEmptyString(validationStatus) ||\n !isEmptyString(validationText) ||\n maxNumChars > 0 ||\n maxValueExceeded ||\n maxCharactersWarning ||\n minCharactersUnattained ||\n minValueUnattained) &&\n !validationInlineInternal && (\n <ic-input-validation\n status={\n this.hasStatus(currentStatus) === false ||\n (currentStatus === IcInformationStatus.Success &&\n validationInline) ||\n validationInlineInternal\n ? \"\"\n : currentStatus\n }\n message={showStatusText ? currentValidationText : \"\"}\n ariaLiveMode={messageAriaLive}\n for={inputId}\n fullWidth={fullWidth}\n >\n {!readonly && maxNumChars > 0 && (\n <div slot=\"validation-message-adornment\">\n {!hideCharCount && (\n <ic-typography variant=\"caption\" class=\"char-count-text\">\n <span class=\"char-count\">\n {numChars}/{maxNumChars}\n </span>\n </ic-typography>\n )}\n <span class=\"remaining-char-count-desc\" aria-live=\"polite\">\n {hiddenRemainingCharCountDesc}\n </span>\n <span hidden={true} id={hiddenCharCountDescId}>\n Field can contain a maximum of {maxNumChars} characters.\n </span>\n </div>\n )}\n </ic-input-validation>\n )}\n </ic-input-container>\n </Host>\n );\n }\n}\n"],"version":3}
@@ -1,12 +1,12 @@
1
1
  import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/core/internal/client';
2
2
  import { c as closeIcon } from './close-icon.js';
3
- import { i as isSlotUsed, V as VARIANT_ICONS, o as onComponentRequiredPropUndefined, M as getSlot, e as IcThemeForegroundEnum, l as isPropDefined } from './helpers.js';
3
+ import { i as isSlotUsed, V as VARIANT_ICONS, o as onComponentRequiredPropUndefined, N as getSlot, l as isPropDefined } from './helpers.js';
4
4
  import { d as defineCustomElement$5 } from './ic-button2.js';
5
5
  import { d as defineCustomElement$4 } from './ic-loading-indicator2.js';
6
6
  import { d as defineCustomElement$3 } from './ic-tooltip2.js';
7
7
  import { d as defineCustomElement$2 } from './ic-typography2.js';
8
8
 
9
- const icToastCss = "/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */html{line-height:1.15;-webkit-text-size-adjust:100%;}body{margin:0}main{display:block}h1{font-size:2em;margin:0.67em 0}hr{box-sizing:content-box;height:0;overflow:visible;}pre{font-family:monospace, monospace;font-size:1em;}a{background-color:transparent}abbr[title]{border-bottom:none;text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted;}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace, monospace;font-size:1em;}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-0.25em}sup{top:-0.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0;}button,input{overflow:visible}button,select{text-transform:none}button,[type=\"button\"],[type=\"reset\"],[type=\"submit\"]{-webkit-appearance:button}button::-moz-focus-inner,[type=\"button\"]::-moz-focus-inner,[type=\"reset\"]::-moz-focus-inner,[type=\"submit\"]::-moz-focus-inner{border-style:none;padding:0}button:-moz-focusring,[type=\"button\"]:-moz-focusring,[type=\"reset\"]:-moz-focusring,[type=\"submit\"]:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:0.35em 0.75em 0.625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal;}progress{vertical-align:baseline}textarea{overflow:auto}[type=\"checkbox\"],[type=\"radio\"]{box-sizing:border-box;padding:0;}[type=\"number\"]::-webkit-inner-spin-button,[type=\"number\"]::-webkit-outer-spin-button{height:auto}[type=\"search\"]{-webkit-appearance:textfield;outline-offset:-2px;}[type=\"search\"]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit;}details{display:block}summary{display:list-item}template{display:none}[hidden]{display:none}html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,menu,nav,output,ruby,section,summary,time,mark,audio,video{margin:0;padding:0;border:0;font-size:100%;font-style:inherit;vertical-align:baseline}@media (prefers-reduced-motion: no-preference){:host{animation:fadein var(--ic-transition-duration-slow) ease-in-out}:host(.hidden){animation:fadeout var(--ic-transition-duration-slow) ease-in-out}}:host{--bottom-position:var(--ic-space-xl);position:fixed;bottom:var(--bottom-position);left:50%;transform:translate(-50%);z-index:var(--ic-z-index-toast)}:host(.ic-toast-hidden){display:none}:host(:focus){outline:none}.container{max-width:32.5rem;min-width:18rem;box-shadow:var(--ic-elevation-overlay);min-height:3.5rem;background-color:var(--ic-architectural-800);--ic-typography-color:var(--ic-color-text-primary-dark);display:flex;align-items:center;position:relative;border-radius:var(--ic-border-radius)}.toast-icon-container{height:100%;display:flex;align-items:center}.divider{height:100%;width:var(--ic-space-xs);position:absolute;border-radius:var(--ic-space-xxxs) 0 0 var(--ic-space-xxxs)}.divider-neutral{background-color:var(--ic-status-unknown-default)}.divider-info{background-color:var(--ic-status-info-contrast)}.divider-warning{background-color:var(--ic-status-warning-contrast)}.divider-error{background-color:var(--ic-status-error-contrast)}.divider-success{background-color:var(--ic-status-success-contrast)}.toast-icon,::slotted(svg){height:var(--ic-space-lg);width:var(--ic-space-lg);margin-left:var(--ic-space-md)}:host([variant=\"neutral\"]) .toast-icon svg,::slotted(svg){fill:var(--ic-status-unknown-default)}:host([variant=\"info\"]) .toast-icon svg{fill:var(--ic-status-info-contrast)}:host([variant=\"warning\"]) .toast-icon svg{fill:var(--ic-status-warning-contrast)}:host([variant=\"error\"]) .toast-icon svg{fill:var(--ic-status-error-contrast)}:host([variant=\"success\"]) .toast-icon svg{fill:var(--ic-status-success-contrast)}.toast-content{margin-left:var(--ic-space-xs);width:100%}.no-icon{margin-left:var(--ic-space-md)}.toast-message{padding:var(--ic-space-xs) var(--ic-space-xs) var(--ic-space-xs) 0}.toast-action-container{padding-bottom:var(--ic-space-md)}ic-button{padding:var(--ic-space-xs)}ic-loading-indicator{--outer-color:transparent;--inner-color:var(--ic-action-light)}.toast-dismiss-timer{padding:var(--ic-space-sm)}@media (max-width: 576px){:host{--bottom-position:var(--ic-space-lg);width:calc(100% - 2 * var(--ic-space-md))}}@media (min-width: 993px){:host{--bottom-position:calc(var(--ic-space-xl) + var(--ic-space-xs))}}@media (forced-colors: active){.container{border:var(--ic-border-hc)}}@keyframes fadein{from{bottom:0;opacity:0}to{bottom:var(--bottom-position);opacity:1}}@keyframes fadeout{from{bottom:var(--bottom-position);opacity:1}to{bottom:0;opacity:0}}";
9
+ const icToastCss = "/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */html{line-height:1.15;-webkit-text-size-adjust:100%;}body{margin:0}main{display:block}h1{font-size:2em;margin:0.67em 0}hr{box-sizing:content-box;height:0;overflow:visible;}pre{font-family:monospace, monospace;font-size:1em;}a{background-color:transparent}abbr[title]{border-bottom:none;text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted;}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace, monospace;font-size:1em;}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-0.25em}sup{top:-0.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0;}button,input{overflow:visible}button,select{text-transform:none}button,[type=\"button\"],[type=\"reset\"],[type=\"submit\"]{-webkit-appearance:button}button::-moz-focus-inner,[type=\"button\"]::-moz-focus-inner,[type=\"reset\"]::-moz-focus-inner,[type=\"submit\"]::-moz-focus-inner{border-style:none;padding:0}button:-moz-focusring,[type=\"button\"]:-moz-focusring,[type=\"reset\"]:-moz-focusring,[type=\"submit\"]:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:0.35em 0.75em 0.625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal;}progress{vertical-align:baseline}textarea{overflow:auto}[type=\"checkbox\"],[type=\"radio\"]{box-sizing:border-box;padding:0;}[type=\"number\"]::-webkit-inner-spin-button,[type=\"number\"]::-webkit-outer-spin-button{height:auto}[type=\"search\"]{-webkit-appearance:textfield;outline-offset:-2px;}[type=\"search\"]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit;}details{display:block}summary{display:list-item}template{display:none}[hidden]{display:none}html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,menu,nav,output,ruby,section,summary,time,mark,audio,video{margin:0;padding:0;border:0;font-size:100%;font-style:inherit;vertical-align:baseline}@media (prefers-reduced-motion: no-preference){:host{animation:fadein var(--ic-transition-duration-slow) ease-in-out}:host(.hidden){animation:fadeout var(--ic-transition-duration-slow) ease-in-out}}:host{--bottom-position:var(--ic-space-xl);position:fixed;bottom:var(--bottom-position);left:50%;transform:translate(-50%);z-index:var(--ic-z-index-toast)}:host(.ic-toast-hidden){display:none}:host(:focus){outline:none}.container{max-width:32.5rem;min-width:18rem;box-shadow:var(--ic-elevation-overlay);min-height:3.5rem;background-color:var(--ic-toast-background);display:flex;align-items:center;position:relative;border-radius:var(--ic-border-radius)}.toast-icon-container{height:100%;display:flex;align-items:center}.divider{height:100%;width:var(--ic-space-xs);position:absolute;border-radius:var(--ic-space-xxxs) 0 0 var(--ic-space-xxxs)}.divider-neutral{background-color:var(--ic-toast-status-neutral)}.divider-info{background-color:var(--ic-toast-status-info)}.divider-warning{background-color:var(--ic-toast-status-warning)}.divider-error{background-color:var(--ic-toast-status-error)}.divider-success{background-color:var(--ic-toast-status-success)}.toast-icon,::slotted(svg){height:var(--ic-space-lg);width:var(--ic-space-lg);margin-left:var(--ic-space-md)}:host([variant=\"neutral\"]) .toast-icon svg,::slotted(svg){fill:var(--ic-toast-icon-neutral)}:host([variant=\"info\"]) .toast-icon svg{fill:var(--ic-toast-icon-info)}:host([variant=\"warning\"]) .toast-icon svg{fill:var(--ic-toast-icon-warning)}:host([variant=\"error\"]) .toast-icon svg{fill:var(--ic-toast-icon-error)}:host([variant=\"success\"]) .toast-icon svg{fill:var(--ic-toast-icon-success)}.toast-content{margin-left:var(--ic-space-xs);width:100%}.no-icon{margin-left:var(--ic-space-md)}.toast-text{padding:var(--ic-space-xs) var(--ic-space-xs) var(--ic-space-xs) 0}.toast-heading{--ic-typography-color:var(--ic-toast-title)}.toast-message{--ic-typography-color:var(--ic-toast-description)}.toast-action-container{padding-bottom:var(--ic-space-md)}#dismiss-button{padding:var(--ic-space-xs)}#dismiss-button>svg{color:var(--ic-toast-dismiss-button)}ic-loading-indicator{--outer-color:transparent;--inner-color:var(--ic-action-light)}.toast-dismiss-timer{padding:var(--ic-space-sm)}@media (max-width: 576px){:host{--bottom-position:var(--ic-space-lg);width:calc(100% - 2 * var(--ic-space-md))}}@media (min-width: 993px){:host{--bottom-position:calc(var(--ic-space-xl) + var(--ic-space-xs))}}@media (forced-colors: active){.container{border:var(--ic-border-hc)}}@keyframes fadein{from{bottom:0;opacity:0}to{bottom:var(--bottom-position);opacity:1}}@keyframes fadeout{from{bottom:var(--bottom-position);opacity:1}to{bottom:0;opacity:0}}";
10
10
 
11
11
  const AUTO_DISMISS_TIMER_REFRESH_RATE_MS = 1000;
12
12
  const TOAST_HEADING_CHAR_LIMIT = 70;
@@ -207,7 +207,7 @@ const Toast = /*@__PURE__*/ proxyCustomElement(class Toast extends HTMLElement {
207
207
  } }), variant === "neutral" ? (h("slot", { name: "neutral-icon" })) : (h("span", { class: "toast-icon", innerHTML: VARIANT_ICONS[variant].icon })))), h("div", { class: {
208
208
  ["toast-content"]: true,
209
209
  ["no-icon"]: variant === "neutral" && !isSlotUsed(this.el, "neutral-icon"),
210
- } }, h("div", { class: "toast-message" }, h("ic-typography", { variant: "subtitle-large" }, visible && h("h5", null, heading)), message && (h("ic-typography", { variant: "body" }, visible && h("p", null, message)))), isSlotUsed(this.el, "action") && (h("div", { class: "toast-action-container" }, h("slot", { name: "action" })))), !isManual ? (h("ic-loading-indicator", { class: "toast-dismiss-timer", theme: "dark", monochrome: true, size: "icon", progress: this.timerProgress, description: "" })) : (h("ic-button", { id: "dismiss-button", innerHTML: closeIcon, onClick: this.dismissAction, variant: "icon", appearance: IcThemeForegroundEnum.Light, "aria-label": dismissButtonAriaLabel })))));
210
+ } }, h("div", { class: "toast-text" }, h("ic-typography", { variant: "subtitle-large", class: "toast-heading" }, visible && h("h5", null, heading)), message && (h("ic-typography", { variant: "body", class: "toast-message" }, visible && h("p", null, message)))), isSlotUsed(this.el, "action") && (h("div", { class: "toast-action-container" }, h("slot", { name: "action" })))), !isManual ? (h("ic-loading-indicator", { class: "toast-dismiss-timer", theme: "dark", monochrome: true, size: "icon", progress: this.timerProgress, description: "" })) : (h("ic-button", { id: "dismiss-button", innerHTML: closeIcon, onClick: this.dismissAction, variant: "icon", "aria-label": dismissButtonAriaLabel })))));
211
211
  }
212
212
  get el() { return this; }
213
213
  static get watchers() { return {