@ukic/web-components 2.1.0-beta.2 → 2.1.0-beta.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (496) hide show
  1. package/README.md +8 -0
  2. package/dist/cjs/core.cjs.js +1 -1
  3. package/dist/cjs/{helpers-8bc3b6d2.js → helpers-81484ceb.js} +2 -2
  4. package/dist/cjs/helpers-81484ceb.js.map +1 -0
  5. package/dist/cjs/ic-alert.cjs.entry.js +3 -1
  6. package/dist/cjs/ic-alert.cjs.entry.js.map +1 -1
  7. package/dist/cjs/ic-back-to-top.cjs.entry.js +1 -1
  8. package/dist/cjs/ic-back-to-top.cjs.entry.js.map +1 -1
  9. package/dist/cjs/ic-breadcrumb-group.cjs.entry.js +1 -1
  10. package/dist/cjs/ic-breadcrumb.cjs.entry.js +1 -1
  11. package/dist/cjs/ic-button_3.cjs.entry.js +26 -10
  12. package/dist/cjs/ic-button_3.cjs.entry.js.map +1 -1
  13. package/dist/cjs/ic-card.cjs.entry.js +17 -4
  14. package/dist/cjs/ic-card.cjs.entry.js.map +1 -1
  15. package/dist/cjs/ic-checkbox-group.cjs.entry.js +1 -1
  16. package/dist/cjs/ic-checkbox-group.cjs.entry.js.map +1 -1
  17. package/dist/cjs/ic-checkbox.cjs.entry.js +3 -1
  18. package/dist/cjs/ic-checkbox.cjs.entry.js.map +1 -1
  19. package/dist/cjs/ic-chip.cjs.entry.js +66 -0
  20. package/dist/cjs/ic-chip.cjs.entry.js.map +1 -0
  21. package/dist/cjs/ic-classification-banner.cjs.entry.js +1 -1
  22. package/dist/cjs/ic-classification-banner.cjs.entry.js.map +1 -1
  23. package/dist/cjs/ic-data-entity.cjs.entry.js.map +1 -1
  24. package/dist/cjs/ic-data-row.cjs.entry.js +2 -2
  25. package/dist/cjs/ic-data-row.cjs.entry.js.map +1 -1
  26. package/dist/cjs/ic-divider.cjs.entry.js +1 -1
  27. package/dist/cjs/ic-divider.cjs.entry.js.map +1 -1
  28. package/dist/cjs/ic-footer-link-group.cjs.entry.js +1 -1
  29. package/dist/cjs/ic-footer-link-group.cjs.entry.js.map +1 -1
  30. package/dist/cjs/ic-footer-link.cjs.entry.js +1 -1
  31. package/dist/cjs/ic-footer-link.cjs.entry.js.map +1 -1
  32. package/dist/cjs/ic-footer.cjs.entry.js +3 -3
  33. package/dist/cjs/ic-footer.cjs.entry.js.map +1 -1
  34. package/dist/cjs/ic-hero.cjs.entry.js +1 -1
  35. package/dist/cjs/ic-hero.cjs.entry.js.map +1 -1
  36. package/dist/cjs/ic-input-component-container_3.cjs.entry.js +25 -20
  37. package/dist/cjs/ic-input-component-container_3.cjs.entry.js.map +1 -1
  38. package/dist/cjs/ic-input-label_2.cjs.entry.js +1 -1
  39. package/dist/cjs/ic-link.cjs.entry.js +1 -1
  40. package/dist/cjs/ic-link.cjs.entry.js.map +1 -1
  41. package/dist/cjs/ic-navigation-button.cjs.entry.js +1 -1
  42. package/dist/cjs/ic-navigation-button.cjs.entry.js.map +1 -1
  43. package/dist/cjs/ic-navigation-group.cjs.entry.js +1 -1
  44. package/dist/cjs/ic-navigation-group.cjs.entry.js.map +1 -1
  45. package/dist/cjs/ic-navigation-item.cjs.entry.js +3 -3
  46. package/dist/cjs/ic-navigation-item.cjs.entry.js.map +1 -1
  47. package/dist/cjs/ic-navigation-menu.cjs.entry.js +1 -1
  48. package/dist/cjs/ic-navigation-menu.cjs.entry.js.map +1 -1
  49. package/dist/cjs/ic-page-header.cjs.entry.js +1 -1
  50. package/dist/cjs/ic-page-header.cjs.entry.js.map +1 -1
  51. package/dist/cjs/ic-radio-group.cjs.entry.js +1 -1
  52. package/dist/cjs/ic-radio-group.cjs.entry.js.map +1 -1
  53. package/dist/cjs/ic-radio-option.cjs.entry.js +12 -2
  54. package/dist/cjs/ic-radio-option.cjs.entry.js.map +1 -1
  55. package/dist/cjs/ic-search-bar.cjs.entry.js +16 -19
  56. package/dist/cjs/ic-search-bar.cjs.entry.js.map +1 -1
  57. package/dist/cjs/ic-section-container.cjs.entry.js.map +1 -1
  58. package/dist/cjs/ic-select.cjs.entry.js +3 -3
  59. package/dist/cjs/ic-select.cjs.entry.js.map +1 -1
  60. package/dist/cjs/ic-side-navigation.cjs.entry.js +1 -1
  61. package/dist/cjs/ic-side-navigation.cjs.entry.js.map +1 -1
  62. package/dist/cjs/ic-skeleton.cjs.entry.js.map +1 -1
  63. package/dist/cjs/ic-status-tag.cjs.entry.js +4 -3
  64. package/dist/cjs/ic-status-tag.cjs.entry.js.map +1 -1
  65. package/dist/cjs/ic-step.cjs.entry.js +101 -13
  66. package/dist/cjs/ic-step.cjs.entry.js.map +1 -1
  67. package/dist/cjs/ic-stepper.cjs.entry.js +162 -41
  68. package/dist/cjs/ic-stepper.cjs.entry.js.map +1 -1
  69. package/dist/cjs/ic-switch.cjs.entry.js +1 -1
  70. package/dist/cjs/ic-switch.cjs.entry.js.map +1 -1
  71. package/dist/cjs/ic-tab-context.cjs.entry.js +6 -1
  72. package/dist/cjs/ic-tab-context.cjs.entry.js.map +1 -1
  73. package/dist/cjs/ic-tab-group.cjs.entry.js +1 -1
  74. package/dist/cjs/ic-tab.cjs.entry.js.map +1 -1
  75. package/dist/cjs/ic-text-field.cjs.entry.js +1 -1
  76. package/dist/cjs/ic-text-field.cjs.entry.js.map +1 -1
  77. package/dist/cjs/ic-theme.cjs.entry.js +3 -3
  78. package/dist/cjs/ic-theme.cjs.entry.js.map +1 -1
  79. package/dist/cjs/ic-top-navigation.cjs.entry.js +3 -3
  80. package/dist/cjs/ic-top-navigation.cjs.entry.js.map +1 -1
  81. package/dist/cjs/ic-typography.cjs.entry.js.map +1 -1
  82. package/dist/cjs/index-3ef30d9d.js +4 -0
  83. package/dist/cjs/loader.cjs.js +1 -1
  84. package/dist/collection/assets/dismiss-icon.svg +3 -0
  85. package/dist/collection/assets/warning-icon-outline.svg +3 -0
  86. package/dist/collection/collection-manifest.json +1 -0
  87. package/dist/collection/components/ic-alert/ic-alert.js +20 -1
  88. package/dist/collection/components/ic-alert/ic-alert.js.map +1 -1
  89. package/dist/collection/components/ic-button/ic-button.js +2 -2
  90. package/dist/collection/components/ic-button/ic-button.js.map +1 -1
  91. package/dist/collection/components/ic-card/ic-card.css +58 -14
  92. package/dist/collection/components/ic-card/ic-card.js +64 -8
  93. package/dist/collection/components/ic-card/ic-card.js.map +1 -1
  94. package/dist/collection/components/ic-checkbox/ic-checkbox.js +20 -1
  95. package/dist/collection/components/ic-checkbox/ic-checkbox.js.map +1 -1
  96. package/dist/collection/components/ic-checkbox-group/ic-checkbox-group.js +1 -1
  97. package/dist/collection/components/ic-checkbox-group/ic-checkbox-group.js.map +1 -1
  98. package/dist/collection/components/ic-chip/ic-chip.css +595 -0
  99. package/dist/collection/components/ic-chip/ic-chip.js +199 -0
  100. package/dist/collection/components/ic-chip/ic-chip.js.map +1 -0
  101. package/dist/collection/components/ic-chip/ic-chip.test.a11y.js +11 -0
  102. package/dist/collection/components/ic-chip/ic-chip.test.a11y.js.map +1 -0
  103. package/dist/collection/components/ic-chip/ic-chip.types.js +2 -0
  104. package/dist/collection/components/ic-chip/ic-chip.types.js.map +1 -0
  105. package/dist/collection/components/ic-classification-banner/ic-classification-banner.js +1 -1
  106. package/dist/collection/components/ic-classification-banner/ic-classification-banner.js.map +1 -1
  107. package/dist/collection/components/ic-data-row/ic-data-row.css +12 -0
  108. package/dist/collection/components/ic-divider/ic-divider.js +1 -1
  109. package/dist/collection/components/ic-divider/ic-divider.js.map +1 -1
  110. package/dist/collection/components/ic-footer/ic-footer.js +9 -6
  111. package/dist/collection/components/ic-footer/ic-footer.js.map +1 -1
  112. package/dist/collection/components/ic-footer-link/ic-footer-link.js +2 -2
  113. package/dist/collection/components/ic-footer-link/ic-footer-link.js.map +1 -1
  114. package/dist/collection/components/ic-footer-link-group/ic-footer-link-group.js +2 -2
  115. package/dist/collection/components/ic-footer-link-group/ic-footer-link-group.js.map +1 -1
  116. package/dist/collection/components/ic-hero/ic-hero.js +1 -1
  117. package/dist/collection/components/ic-hero/ic-hero.js.map +1 -1
  118. package/dist/collection/components/ic-input-component-container/ic-input-component-container.css +0 -2
  119. package/dist/collection/components/ic-link/ic-link.js +1 -1
  120. package/dist/collection/components/ic-link/ic-link.js.map +1 -1
  121. package/dist/collection/components/ic-loading-indicator/ic-loading-indicator.css +38 -2
  122. package/dist/collection/components/ic-loading-indicator/ic-loading-indicator.js +39 -5
  123. package/dist/collection/components/ic-loading-indicator/ic-loading-indicator.js.map +1 -1
  124. package/dist/collection/components/ic-menu/ic-menu.js +31 -23
  125. package/dist/collection/components/ic-menu/ic-menu.js.map +1 -1
  126. package/dist/collection/components/ic-navigation-button/ic-navigation-button.js +1 -1
  127. package/dist/collection/components/ic-navigation-button/ic-navigation-button.js.map +1 -1
  128. package/dist/collection/components/ic-navigation-group/ic-navigation-group.js +2 -2
  129. package/dist/collection/components/ic-navigation-group/ic-navigation-group.js.map +1 -1
  130. package/dist/collection/components/ic-navigation-item/ic-navigation-item.js +4 -4
  131. package/dist/collection/components/ic-navigation-item/ic-navigation-item.js.map +1 -1
  132. package/dist/collection/components/ic-navigation-menu/ic-navigation-menu.js +1 -1
  133. package/dist/collection/components/ic-navigation-menu/ic-navigation-menu.js.map +1 -1
  134. package/dist/collection/components/ic-radio-group/ic-radio-group.js +1 -1
  135. package/dist/collection/components/ic-radio-group/ic-radio-group.js.map +1 -1
  136. package/dist/collection/components/ic-radio-option/ic-radio-option.css +7 -8
  137. package/dist/collection/components/ic-radio-option/ic-radio-option.js +32 -0
  138. package/dist/collection/components/ic-radio-option/ic-radio-option.js.map +1 -1
  139. package/dist/collection/components/ic-search-bar/ic-search-bar.js +28 -27
  140. package/dist/collection/components/ic-search-bar/ic-search-bar.js.map +1 -1
  141. package/dist/collection/components/ic-select/ic-select.css +1 -1
  142. package/dist/collection/components/ic-select/ic-select.js +1 -1
  143. package/dist/collection/components/ic-select/ic-select.js.map +1 -1
  144. package/dist/collection/components/ic-side-navigation/ic-side-navigation.js +6 -3
  145. package/dist/collection/components/ic-side-navigation/ic-side-navigation.js.map +1 -1
  146. package/dist/collection/components/ic-status-tag/ic-status-tag.js +21 -2
  147. package/dist/collection/components/ic-status-tag/ic-status-tag.js.map +1 -1
  148. package/dist/collection/components/ic-status-tag/ic-status-tag.test.a11y.js +1 -1
  149. package/dist/collection/components/ic-status-tag/ic-status-tag.test.a11y.js.map +1 -1
  150. package/dist/collection/components/ic-step/ic-step.css +120 -24
  151. package/dist/collection/components/ic-step/ic-step.js +268 -27
  152. package/dist/collection/components/ic-step/ic-step.js.map +1 -1
  153. package/dist/collection/components/ic-step/ic-step.types.js.map +1 -1
  154. package/dist/collection/components/ic-stepper/ic-stepper-test-examples.js +74 -0
  155. package/dist/collection/components/ic-stepper/ic-stepper-test-examples.js.map +1 -0
  156. package/dist/collection/components/ic-stepper/ic-stepper.css +15 -1
  157. package/dist/collection/components/ic-stepper/ic-stepper.js +206 -39
  158. package/dist/collection/components/ic-stepper/ic-stepper.js.map +1 -1
  159. package/dist/collection/components/ic-stepper/ic-stepper.test.a11y.js +13 -1
  160. package/dist/collection/components/ic-stepper/ic-stepper.test.a11y.js.map +1 -1
  161. package/dist/collection/components/ic-tab/ic-tab.js +5 -2
  162. package/dist/collection/components/ic-tab/ic-tab.js.map +1 -1
  163. package/dist/collection/components/ic-tab-context/ic-tab-context.js +29 -2
  164. package/dist/collection/components/ic-tab-context/ic-tab-context.js.map +1 -1
  165. package/dist/collection/components/ic-text-field/ic-text-field.js +2 -2
  166. package/dist/collection/components/ic-text-field/ic-text-field.js.map +1 -1
  167. package/dist/collection/components/ic-theme/ic-theme.js +8 -5
  168. package/dist/collection/components/ic-theme/ic-theme.js.map +1 -1
  169. package/dist/collection/components/ic-tooltip/ic-tooltip.css +1 -1
  170. package/dist/collection/components/ic-tooltip/ic-tooltip.js +22 -1
  171. package/dist/collection/components/ic-tooltip/ic-tooltip.js.map +1 -1
  172. package/dist/collection/components/ic-top-navigation/ic-top-navigation.css +8 -3
  173. package/dist/collection/components/ic-top-navigation/ic-top-navigation.js +2 -2
  174. package/dist/collection/components/ic-top-navigation/ic-top-navigation.js.map +1 -1
  175. package/dist/collection/normalize.css +440 -0
  176. package/dist/collection/testspec.setup.js +8 -0
  177. package/dist/collection/testspec.setup.js.map +1 -1
  178. package/dist/collection/utils/helpers.js +1 -1
  179. package/dist/collection/utils/helpers.js.map +1 -1
  180. package/dist/components/helpers.js +2 -2
  181. package/dist/components/helpers.js.map +1 -1
  182. package/dist/components/ic-alert.js +3 -1
  183. package/dist/components/ic-alert.js.map +1 -1
  184. package/dist/components/ic-back-to-top.js.map +1 -1
  185. package/dist/components/ic-button2.js +2 -2
  186. package/dist/components/ic-button2.js.map +1 -1
  187. package/dist/components/ic-card.js +40 -6
  188. package/dist/components/ic-card.js.map +1 -1
  189. package/dist/components/ic-checkbox-group.js +1 -1
  190. package/dist/components/ic-checkbox-group.js.map +1 -1
  191. package/dist/components/ic-checkbox.js +2 -0
  192. package/dist/components/ic-checkbox.js.map +1 -1
  193. package/dist/components/ic-chip.d.ts +11 -0
  194. package/dist/components/ic-chip.js +99 -0
  195. package/dist/components/ic-chip.js.map +1 -0
  196. package/dist/components/ic-classification-banner.js +1 -1
  197. package/dist/components/ic-classification-banner.js.map +1 -1
  198. package/dist/components/ic-data-entity.js.map +1 -1
  199. package/dist/components/ic-data-row.js +1 -1
  200. package/dist/components/ic-data-row.js.map +1 -1
  201. package/dist/components/ic-divider2.js +1 -1
  202. package/dist/components/ic-divider2.js.map +1 -1
  203. package/dist/components/ic-footer-link-group.js +1 -1
  204. package/dist/components/ic-footer-link-group.js.map +1 -1
  205. package/dist/components/ic-footer-link.js +1 -1
  206. package/dist/components/ic-footer-link.js.map +1 -1
  207. package/dist/components/ic-footer.js +3 -3
  208. package/dist/components/ic-footer.js.map +1 -1
  209. package/dist/components/ic-hero.js +1 -1
  210. package/dist/components/ic-hero.js.map +1 -1
  211. package/dist/components/ic-input-component-container2.js +1 -1
  212. package/dist/components/ic-input-component-container2.js.map +1 -1
  213. package/dist/components/ic-input-label2.js +1 -1
  214. package/dist/components/ic-input-validation2.js +1 -1
  215. package/dist/components/ic-link2.js +1 -1
  216. package/dist/components/ic-link2.js.map +1 -1
  217. package/dist/components/ic-loading-indicator2.js +21 -6
  218. package/dist/components/ic-loading-indicator2.js.map +1 -1
  219. package/dist/components/ic-menu2.js +23 -18
  220. package/dist/components/ic-menu2.js.map +1 -1
  221. package/dist/components/ic-navigation-button.js +1 -1
  222. package/dist/components/ic-navigation-button.js.map +1 -1
  223. package/dist/components/ic-navigation-group.js +1 -1
  224. package/dist/components/ic-navigation-group.js.map +1 -1
  225. package/dist/components/ic-navigation-item.js +3 -3
  226. package/dist/components/ic-navigation-item.js.map +1 -1
  227. package/dist/components/ic-navigation-menu2.js +2 -2
  228. package/dist/components/ic-navigation-menu2.js.map +1 -1
  229. package/dist/components/ic-page-header.js.map +1 -1
  230. package/dist/components/ic-radio-group.js +1 -1
  231. package/dist/components/ic-radio-group.js.map +1 -1
  232. package/dist/components/ic-radio-option.js +11 -1
  233. package/dist/components/ic-radio-option.js.map +1 -1
  234. package/dist/components/ic-search-bar.js +18 -21
  235. package/dist/components/ic-search-bar.js.map +1 -1
  236. package/dist/components/ic-section-container2.js.map +1 -1
  237. package/dist/components/ic-select.js +3 -3
  238. package/dist/components/ic-select.js.map +1 -1
  239. package/dist/components/ic-side-navigation.js +2 -2
  240. package/dist/components/ic-side-navigation.js.map +1 -1
  241. package/dist/components/ic-skeleton.js.map +1 -1
  242. package/dist/components/ic-status-tag.js +5 -3
  243. package/dist/components/ic-status-tag.js.map +1 -1
  244. package/dist/components/ic-step.js +117 -16
  245. package/dist/components/ic-step.js.map +1 -1
  246. package/dist/components/ic-stepper.js +169 -41
  247. package/dist/components/ic-stepper.js.map +1 -1
  248. package/dist/components/ic-switch.js.map +1 -1
  249. package/dist/components/ic-tab-context.js +6 -1
  250. package/dist/components/ic-tab-context.js.map +1 -1
  251. package/dist/components/ic-tab-group.js +1 -1
  252. package/dist/components/ic-tab.js.map +1 -1
  253. package/dist/components/ic-text-field2.js +3 -3
  254. package/dist/components/ic-text-field2.js.map +1 -1
  255. package/dist/components/ic-theme.js +3 -3
  256. package/dist/components/ic-theme.js.map +1 -1
  257. package/dist/components/ic-tooltip2.js +7 -3
  258. package/dist/components/ic-tooltip2.js.map +1 -1
  259. package/dist/components/ic-top-navigation.js +4 -4
  260. package/dist/components/ic-top-navigation.js.map +1 -1
  261. package/dist/components/ic-typography2.js.map +1 -1
  262. package/dist/components/index.d.ts +2 -1
  263. package/dist/components/index.js +1 -0
  264. package/dist/components/index.js.map +1 -1
  265. package/dist/core/core.css +1 -1
  266. package/dist/core/core.esm.js +1 -1
  267. package/dist/core/core.esm.js.map +1 -1
  268. package/dist/core/normalize.css +440 -0
  269. package/dist/core/{p-5831bb8e.entry.js → p-050e1e7b.entry.js} +2 -2
  270. package/dist/core/{p-5831bb8e.entry.js.map → p-050e1e7b.entry.js.map} +1 -1
  271. package/dist/core/{p-31a8595f.entry.js → p-09592918.entry.js} +2 -2
  272. package/dist/core/{p-31a8595f.entry.js.map → p-09592918.entry.js.map} +1 -1
  273. package/dist/core/{p-347ec49e.entry.js → p-0b00f848.entry.js} +2 -2
  274. package/dist/core/p-0b00f848.entry.js.map +1 -0
  275. package/dist/core/p-16698d3e.entry.js +2 -0
  276. package/dist/core/p-16698d3e.entry.js.map +1 -0
  277. package/dist/core/p-18a9beea.entry.js +2 -0
  278. package/dist/core/p-18a9beea.entry.js.map +1 -0
  279. package/dist/core/{p-7b39977f.entry.js → p-1da1f2f3.entry.js} +2 -2
  280. package/dist/core/p-1da1f2f3.entry.js.map +1 -0
  281. package/dist/core/{p-2f114521.entry.js → p-217fa7de.entry.js} +2 -2
  282. package/dist/core/{p-2f114521.entry.js.map → p-217fa7de.entry.js.map} +1 -1
  283. package/dist/core/{p-cc83692e.entry.js → p-23bf0b7a.entry.js} +2 -2
  284. package/dist/core/{p-cc83692e.entry.js.map → p-23bf0b7a.entry.js.map} +1 -1
  285. package/dist/core/{p-558552f8.entry.js → p-27554319.entry.js} +2 -2
  286. package/dist/core/p-27554319.entry.js.map +1 -0
  287. package/dist/core/p-2ca96f69.entry.js +2 -0
  288. package/dist/core/p-2ca96f69.entry.js.map +1 -0
  289. package/dist/core/{p-dd3c3e3c.entry.js → p-3f4d632c.entry.js} +2 -2
  290. package/dist/core/p-3f4d632c.entry.js.map +1 -0
  291. package/dist/core/p-3f9cdcdd.entry.js +2 -0
  292. package/dist/core/{p-c4d3c18c.entry.js.map → p-3f9cdcdd.entry.js.map} +1 -1
  293. package/dist/core/p-4f1a7195.entry.js +2 -0
  294. package/dist/core/p-4f1a7195.entry.js.map +1 -0
  295. package/dist/core/p-5616cfb8.entry.js +2 -0
  296. package/dist/core/p-5616cfb8.entry.js.map +1 -0
  297. package/dist/core/p-66cad84e.entry.js +2 -0
  298. package/dist/core/p-66cad84e.entry.js.map +1 -0
  299. package/dist/core/p-6be5e06b.entry.js.map +1 -1
  300. package/dist/core/p-6d0eaaeb.entry.js.map +1 -1
  301. package/dist/core/p-6f442942.entry.js +2 -0
  302. package/dist/core/p-6f442942.entry.js.map +1 -0
  303. package/dist/core/{p-60ffb73e.entry.js → p-789e197b.entry.js} +2 -2
  304. package/dist/core/p-789e197b.entry.js.map +1 -0
  305. package/dist/core/{p-4c72f3a9.entry.js → p-7ba184da.entry.js} +2 -2
  306. package/dist/core/{p-4c72f3a9.entry.js.map → p-7ba184da.entry.js.map} +0 -0
  307. package/dist/core/p-80cd0a2d.entry.js +2 -0
  308. package/dist/core/p-80cd0a2d.entry.js.map +1 -0
  309. package/dist/core/{p-2b5c9143.entry.js → p-8470c255.entry.js} +2 -2
  310. package/dist/core/{p-2b5c9143.entry.js.map → p-8470c255.entry.js.map} +1 -1
  311. package/dist/core/p-89a925f8.entry.js +2 -0
  312. package/dist/core/p-89a925f8.entry.js.map +1 -0
  313. package/dist/core/{p-ecfb2e6b.entry.js → p-930cd4cc.entry.js} +2 -2
  314. package/dist/core/{p-ecfb2e6b.entry.js.map → p-930cd4cc.entry.js.map} +1 -1
  315. package/dist/core/{p-0118400b.entry.js → p-9b4022d7.entry.js} +2 -2
  316. package/dist/core/p-9b4022d7.entry.js.map +1 -0
  317. package/dist/core/p-9e684c58.entry.js +2 -0
  318. package/dist/core/p-9e684c58.entry.js.map +1 -0
  319. package/dist/core/{p-5e261268.entry.js → p-9fbceeb2.entry.js} +2 -2
  320. package/dist/core/{p-5e261268.entry.js.map → p-9fbceeb2.entry.js.map} +0 -0
  321. package/dist/core/p-a2d3e955.entry.js.map +1 -1
  322. package/dist/core/{p-9cd04875.entry.js → p-a5948fc3.entry.js} +2 -2
  323. package/dist/core/{p-9cd04875.entry.js.map → p-a5948fc3.entry.js.map} +1 -1
  324. package/dist/core/{p-23831891.js → p-a8ac8f72.js} +2 -2
  325. package/dist/core/p-a8ac8f72.js.map +1 -0
  326. package/dist/core/{p-6b34d98f.entry.js → p-ae02b008.entry.js} +2 -2
  327. package/dist/core/{p-6b34d98f.entry.js.map → p-ae02b008.entry.js.map} +1 -1
  328. package/dist/core/p-bb106092.entry.js +2 -0
  329. package/dist/core/p-bb106092.entry.js.map +1 -0
  330. package/dist/core/{p-6fba90ee.entry.js → p-bbe00cb1.entry.js} +2 -2
  331. package/dist/core/{p-6fba90ee.entry.js.map → p-bbe00cb1.entry.js.map} +1 -1
  332. package/dist/core/{p-b3dec76d.entry.js → p-c1d78a64.entry.js} +2 -2
  333. package/dist/core/{p-b3dec76d.entry.js.map → p-c1d78a64.entry.js.map} +1 -1
  334. package/dist/core/{p-0b125f26.entry.js → p-c320fa70.entry.js} +2 -2
  335. package/dist/core/{p-0b125f26.entry.js.map → p-c320fa70.entry.js.map} +0 -0
  336. package/dist/core/p-cadb531f.entry.js.map +1 -1
  337. package/dist/core/p-d599cf4f.entry.js +2 -0
  338. package/dist/core/p-d599cf4f.entry.js.map +1 -0
  339. package/dist/core/{p-6f6bd657.entry.js → p-e192e25d.entry.js} +2 -2
  340. package/dist/core/{p-6f6bd657.entry.js.map → p-e192e25d.entry.js.map} +1 -1
  341. package/dist/core/{p-7f04e382.entry.js → p-e810f48c.entry.js} +2 -2
  342. package/dist/core/{p-7f04e382.entry.js.map → p-e810f48c.entry.js.map} +1 -1
  343. package/dist/core/p-e93e9aa3.entry.js.map +1 -1
  344. package/dist/core/p-eaea567e.entry.js +2 -0
  345. package/dist/core/p-eaea567e.entry.js.map +1 -0
  346. package/dist/core/p-f5b045a5.entry.js +2 -0
  347. package/dist/core/p-f5b045a5.entry.js.map +1 -0
  348. package/dist/core/{p-10da19d2.entry.js → p-f760198e.entry.js} +2 -2
  349. package/dist/core/{p-10da19d2.entry.js.map → p-f760198e.entry.js.map} +0 -0
  350. package/dist/core/{p-c6dd4f47.entry.js → p-fd0c6039.entry.js} +2 -2
  351. package/dist/core/p-fd0c6039.entry.js.map +1 -0
  352. package/dist/esm/core.js +1 -1
  353. package/dist/esm/{helpers-3d41833c.js → helpers-46e5291b.js} +3 -3
  354. package/dist/esm/helpers-46e5291b.js.map +1 -0
  355. package/dist/esm/ic-alert.entry.js +3 -1
  356. package/dist/esm/ic-alert.entry.js.map +1 -1
  357. package/dist/esm/ic-back-to-top.entry.js +1 -1
  358. package/dist/esm/ic-back-to-top.entry.js.map +1 -1
  359. package/dist/esm/ic-breadcrumb-group.entry.js +1 -1
  360. package/dist/esm/ic-breadcrumb.entry.js +1 -1
  361. package/dist/esm/ic-button_3.entry.js +26 -10
  362. package/dist/esm/ic-button_3.entry.js.map +1 -1
  363. package/dist/esm/ic-card.entry.js +17 -4
  364. package/dist/esm/ic-card.entry.js.map +1 -1
  365. package/dist/esm/ic-checkbox-group.entry.js +1 -1
  366. package/dist/esm/ic-checkbox-group.entry.js.map +1 -1
  367. package/dist/esm/ic-checkbox.entry.js +3 -1
  368. package/dist/esm/ic-checkbox.entry.js.map +1 -1
  369. package/dist/esm/ic-chip.entry.js +62 -0
  370. package/dist/esm/ic-chip.entry.js.map +1 -0
  371. package/dist/esm/ic-classification-banner.entry.js +1 -1
  372. package/dist/esm/ic-classification-banner.entry.js.map +1 -1
  373. package/dist/esm/ic-data-entity.entry.js.map +1 -1
  374. package/dist/esm/ic-data-row.entry.js +2 -2
  375. package/dist/esm/ic-data-row.entry.js.map +1 -1
  376. package/dist/esm/ic-divider.entry.js +1 -1
  377. package/dist/esm/ic-divider.entry.js.map +1 -1
  378. package/dist/esm/ic-footer-link-group.entry.js +1 -1
  379. package/dist/esm/ic-footer-link-group.entry.js.map +1 -1
  380. package/dist/esm/ic-footer-link.entry.js +1 -1
  381. package/dist/esm/ic-footer-link.entry.js.map +1 -1
  382. package/dist/esm/ic-footer.entry.js +3 -3
  383. package/dist/esm/ic-footer.entry.js.map +1 -1
  384. package/dist/esm/ic-hero.entry.js +1 -1
  385. package/dist/esm/ic-hero.entry.js.map +1 -1
  386. package/dist/esm/ic-input-component-container_3.entry.js +25 -20
  387. package/dist/esm/ic-input-component-container_3.entry.js.map +1 -1
  388. package/dist/esm/ic-input-label_2.entry.js +1 -1
  389. package/dist/esm/ic-link.entry.js +1 -1
  390. package/dist/esm/ic-link.entry.js.map +1 -1
  391. package/dist/esm/ic-navigation-button.entry.js +1 -1
  392. package/dist/esm/ic-navigation-button.entry.js.map +1 -1
  393. package/dist/esm/ic-navigation-group.entry.js +1 -1
  394. package/dist/esm/ic-navigation-group.entry.js.map +1 -1
  395. package/dist/esm/ic-navigation-item.entry.js +3 -3
  396. package/dist/esm/ic-navigation-item.entry.js.map +1 -1
  397. package/dist/esm/ic-navigation-menu.entry.js +1 -1
  398. package/dist/esm/ic-navigation-menu.entry.js.map +1 -1
  399. package/dist/esm/ic-page-header.entry.js +1 -1
  400. package/dist/esm/ic-page-header.entry.js.map +1 -1
  401. package/dist/esm/ic-radio-group.entry.js +1 -1
  402. package/dist/esm/ic-radio-group.entry.js.map +1 -1
  403. package/dist/esm/ic-radio-option.entry.js +12 -2
  404. package/dist/esm/ic-radio-option.entry.js.map +1 -1
  405. package/dist/esm/ic-search-bar.entry.js +16 -19
  406. package/dist/esm/ic-search-bar.entry.js.map +1 -1
  407. package/dist/esm/ic-section-container.entry.js.map +1 -1
  408. package/dist/esm/ic-select.entry.js +3 -3
  409. package/dist/esm/ic-select.entry.js.map +1 -1
  410. package/dist/esm/ic-side-navigation.entry.js +1 -1
  411. package/dist/esm/ic-side-navigation.entry.js.map +1 -1
  412. package/dist/esm/ic-skeleton.entry.js.map +1 -1
  413. package/dist/esm/ic-status-tag.entry.js +4 -3
  414. package/dist/esm/ic-status-tag.entry.js.map +1 -1
  415. package/dist/esm/ic-step.entry.js +101 -13
  416. package/dist/esm/ic-step.entry.js.map +1 -1
  417. package/dist/esm/ic-stepper.entry.js +162 -41
  418. package/dist/esm/ic-stepper.entry.js.map +1 -1
  419. package/dist/esm/ic-switch.entry.js +1 -1
  420. package/dist/esm/ic-switch.entry.js.map +1 -1
  421. package/dist/esm/ic-tab-context.entry.js +6 -1
  422. package/dist/esm/ic-tab-context.entry.js.map +1 -1
  423. package/dist/esm/ic-tab-group.entry.js +1 -1
  424. package/dist/esm/ic-tab.entry.js.map +1 -1
  425. package/dist/esm/ic-text-field.entry.js +1 -1
  426. package/dist/esm/ic-text-field.entry.js.map +1 -1
  427. package/dist/esm/ic-theme.entry.js +3 -3
  428. package/dist/esm/ic-theme.entry.js.map +1 -1
  429. package/dist/esm/ic-top-navigation.entry.js +3 -3
  430. package/dist/esm/ic-top-navigation.entry.js.map +1 -1
  431. package/dist/esm/ic-typography.entry.js.map +1 -1
  432. package/dist/esm/index-1500de1f.js +4 -0
  433. package/dist/esm/loader.js +1 -1
  434. package/dist/types/components/ic-alert/ic-alert.d.ts +5 -1
  435. package/dist/types/components/ic-card/ic-card.d.ts +20 -3
  436. package/dist/types/components/ic-checkbox/ic-checkbox.d.ts +5 -1
  437. package/dist/types/components/ic-chip/ic-chip.d.ts +40 -0
  438. package/dist/types/components/ic-chip/ic-chip.test.a11y.d.ts +1 -0
  439. package/dist/types/components/ic-chip/ic-chip.types.d.ts +2 -0
  440. package/dist/types/components/ic-footer/ic-footer.d.ts +2 -2
  441. package/dist/types/components/ic-loading-indicator/ic-loading-indicator.d.ts +5 -0
  442. package/dist/types/components/ic-menu/ic-menu.d.ts +5 -4
  443. package/dist/types/components/ic-navigation-item/ic-navigation-item.d.ts +1 -1
  444. package/dist/types/components/ic-radio-option/ic-radio-option.d.ts +5 -1
  445. package/dist/types/components/ic-search-bar/ic-search-bar.d.ts +3 -4
  446. package/dist/types/components/ic-side-navigation/ic-side-navigation.d.ts +1 -1
  447. package/dist/types/components/ic-status-tag/ic-status-tag.d.ts +4 -0
  448. package/dist/types/components/ic-step/ic-step.d.ts +35 -6
  449. package/dist/types/components/ic-step/ic-step.types.d.ts +2 -0
  450. package/dist/types/components/ic-stepper/ic-stepper-test-examples.d.ts +4 -0
  451. package/dist/types/components/ic-stepper/ic-stepper.d.ts +23 -6
  452. package/dist/types/components/ic-tab/ic-tab.d.ts +1 -1
  453. package/dist/types/components/ic-tab-context/ic-tab-context.d.ts +6 -2
  454. package/dist/types/components/ic-theme/ic-theme.d.ts +2 -2
  455. package/dist/types/components/ic-tooltip/ic-tooltip.d.ts +4 -0
  456. package/dist/types/components.d.ts +161 -43
  457. package/dist/types/testspec.setup.d.ts +1 -0
  458. package/hydrate/index.js +572 -210
  459. package/package.json +3 -3
  460. package/dist/cjs/helpers-8bc3b6d2.js.map +0 -1
  461. package/dist/core/p-001651fc.entry.js +0 -2
  462. package/dist/core/p-001651fc.entry.js.map +0 -1
  463. package/dist/core/p-0118400b.entry.js.map +0 -1
  464. package/dist/core/p-07cd789d.entry.js +0 -2
  465. package/dist/core/p-07cd789d.entry.js.map +0 -1
  466. package/dist/core/p-23831891.js.map +0 -1
  467. package/dist/core/p-2e9f3011.entry.js +0 -2
  468. package/dist/core/p-2e9f3011.entry.js.map +0 -1
  469. package/dist/core/p-347ec49e.entry.js.map +0 -1
  470. package/dist/core/p-39ae284e.entry.js +0 -2
  471. package/dist/core/p-39ae284e.entry.js.map +0 -1
  472. package/dist/core/p-558552f8.entry.js.map +0 -1
  473. package/dist/core/p-60ffb73e.entry.js.map +0 -1
  474. package/dist/core/p-69650186.entry.js +0 -2
  475. package/dist/core/p-69650186.entry.js.map +0 -1
  476. package/dist/core/p-7093d214.entry.js +0 -2
  477. package/dist/core/p-7093d214.entry.js.map +0 -1
  478. package/dist/core/p-7577c6a3.entry.js +0 -2
  479. package/dist/core/p-7577c6a3.entry.js.map +0 -1
  480. package/dist/core/p-7b39977f.entry.js.map +0 -1
  481. package/dist/core/p-7f632414.entry.js +0 -2
  482. package/dist/core/p-7f632414.entry.js.map +0 -1
  483. package/dist/core/p-88b15005.entry.js +0 -2
  484. package/dist/core/p-88b15005.entry.js.map +0 -1
  485. package/dist/core/p-898607d0.entry.js +0 -2
  486. package/dist/core/p-898607d0.entry.js.map +0 -1
  487. package/dist/core/p-ac43322e.entry.js +0 -2
  488. package/dist/core/p-ac43322e.entry.js.map +0 -1
  489. package/dist/core/p-c4d3c18c.entry.js +0 -2
  490. package/dist/core/p-c6dd4f47.entry.js.map +0 -1
  491. package/dist/core/p-cf5e8a55.entry.js +0 -2
  492. package/dist/core/p-cf5e8a55.entry.js.map +0 -1
  493. package/dist/core/p-dd3c3e3c.entry.js.map +0 -1
  494. package/dist/core/p-e4551421.entry.js +0 -2
  495. package/dist/core/p-e4551421.entry.js.map +0 -1
  496. package/dist/esm/helpers-3d41833c.js.map +0 -1
@@ -1,67 +1,168 @@
1
1
  import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
2
2
  import { c as checkIcon } from './check-icon.js';
3
+ import { d as defineCustomElement$3 } from './ic-loading-indicator2.js';
3
4
  import { d as defineCustomElement$2 } from './ic-typography2.js';
4
5
 
5
- const icStepCss = ":host{display:flex;flex:auto}:host(.last-step){flex-grow:initial}.step{display:flex;flex-direction:column;flex:1 1 0}.step-top{display:flex;width:100%;align-items:center;align-self:flex-start;height:40px}.step-icon{display:flex;justify-content:center;align-items:center;border-radius:50%}.step-icon-inner{width:var(--ic-space-xl);height:var(--ic-space-xl);display:flex;justify-content:center;align-items:center;border-radius:50%}.current{color:var(--ic-theme-primary)}.step-title-area{margin:var(--ic-space-xs) 0;padding-right:var(--ic-space-xs)}.step-title,.step-subtitle{width:-moz-fit-content;width:fit-content}.step-subtitle{color:var(--ic-color-tertiary-text)}.current .step-subtitle{color:var(--ic-color-primary-text)}.completed{color:var(--ic-status-success)}.active .step-icon-inner{box-shadow:inset var(--ic-architectural-200) 0 0 0 2px}.current .step-icon-inner{background-color:var(--ic-theme-primary);color:white}.disabled{color:var(--ic-architectural-200)}.disabled .step-icon{border:1px dashed var(--ic-architectural-200);width:calc(var(--ic-space-xl) - var(--ic-space-xxxs));height:calc(var(--ic-space-xl) - var(--ic-space-xxxs))}.disabled .step-title-area{color:var(--ic-color-tertiary-text)}.completed .step-icon-inner{background:var(--ic-status-success);box-shadow:inset var(--ic-status-success) 0 0 0 var(--ic-space-xxxs);border-radius:100%}.current .step-icon{border:var(--ic-space-xxxs) solid var(--ic-theme-primary);padding:var(--ic-space-xxxs);margin:0 calc(-1 * var(--ic-space-xxxs));}.step-connect{height:var(--ic-space-xxxs);background-color:var(--ic-architectural-200);margin:0 var(--ic-space-xs);border-radius:var(--ic-space-xxs);width:100%}.aligned-full-width.step-connect{min-width:100px;width:100%}.disabled .step-connect{height:0;background-color:rgb(0 0 0 / 0%);border-top:2px dashed var(--ic-architectural-200);border-radius:0}.completed .step-connect{background-color:var(--ic-status-success)}.step-connect-inner{width:70%;display:flex;flex:auto;height:var(--ic-space-xxxs);border-radius:var(--ic-space-xxs);background-color:var(--ic-theme-primary)}.check-icon{padding-top:var(--ic-space-xxs)}.check-icon svg{width:16px;height:16px}.check-icon>svg>path{fill:white}@media (forced-colors: active){.step-connect:not(.disabled .step-connect){border:var(--ic-hc-border)}.active .step-icon-inner,.completed .step-icon-inner,.current .step-icon-inner{forced-color-adjust:none;box-shadow:inset canvastext 0 0 0 2px;background-color:transparent;color:canvastext}.current .step-icon{padding:0;border:none}.disabled,.disabled .step-title-area{color:Graytext}.step-connect-inner,.completed .step-connect{background-color:canvastext}.check-icon>svg>path{fill:canvastext}}";
6
+ const warningIcon = `<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
7
+ <path d="M7.99935 4.32666L13.0193 13H2.97935L7.99935 4.32666ZM7.99935 1.66666L0.666016 14.3333H15.3327L7.99935 1.66666ZM8.66602 11H7.33268V12.3333H8.66602V11ZM8.66602 6.99999H7.33268V9.66666H8.66602V6.99999Z" fill="currentColor"/>
8
+ </svg>`;
9
+
10
+ const icStepCss = ":host{display:flex;flex:auto}.step{display:flex;flex:1 1 0}.step-icon{display:flex;justify-content:center}.step-title,.step-subtitle,.step-status,.next-step{white-space:pre-line}.visually-hidden{position:absolute;left:-10000px;top:auto;width:1px;height:1px;overflow:hidden}:host(.compact){-moz-column-gap:var(--ic-space-sm);column-gap:var(--ic-space-sm);--compact-step-inner-color:var(--ic-theme-primary);--compact-step-circular-line-width:var(--ic-space-xxs)}:host(.compact) .step{-moz-column-gap:var(--ic-space-sm);column-gap:var(--ic-space-sm)}:host(.compact) .step:not(.current){display:none;opacity:0;visibility:hidden}.compact-step-progress-indicator{margin:var(--ic-space-xs) 0 0}:host(.compact) .step-title-area{display:flex;flex-direction:column;width:228px}.info-line{display:flex;-moz-column-gap:var(--ic-space-xs);column-gap:var(--ic-space-xs)}.step-status{display:flex;color:var(--ic-color-secondary-text);-moz-column-gap:var(--ic-space-xxxs);column-gap:var(--ic-space-xxxs)}.compact-step-completed .step-status{color:var(--ic-status-success)}.compact-step-disabled :is(.step-title,.step-status){color:var(--ic-color-tertiary-text)}.step-num{color:var(--ic-color-secondary-text);white-space:nowrap}:host(.compact) .step-icon{margin:var(--ic-space-xxxs)}:host(.compact) .step-icon svg{width:16px;height:16px}:host(.default) .step{flex-direction:column}:host(.default.last-step){flex-grow:initial}.step-top{display:flex;width:100%;align-items:center;align-self:flex-start;height:40px}:host(.default) .step-icon{border-radius:50%}.step-icon-inner{width:var(--ic-space-xl);height:var(--ic-space-xl);display:flex;justify-content:center;align-items:center;border-radius:50%}:host(.default) .current{color:var(--ic-theme-primary)}:host(.default) .step-title-area{margin:var(--ic-space-xs) 0;padding-right:var(--ic-space-xs);width:100%}:host(.default) .step-title,.step-subtitle{width:-moz-fit-content;width:fit-content}.step-subtitle{color:var(--ic-color-tertiary-text)}.current .step-subtitle{color:var(--ic-color-primary-text)}:host(.default) .completed{color:var(--ic-status-success)}.active .step-icon-inner{box-shadow:inset var(--ic-architectural-200) 0 0 0 2px}.current .step-icon-inner{background-color:var(--ic-theme-primary);color:white}.disabled{color:var(--ic-architectural-200)}.disabled .step-icon-inner{border:1px dashed var(--ic-architectural-200);width:calc(var(--ic-space-xl) - var(--ic-space-xxxs));height:calc(var(--ic-space-xl) - var(--ic-space-xxxs))}.disabled .step-title-area{color:var(--ic-color-tertiary-text)}.completed .step-icon-inner{background:var(--ic-status-success);box-shadow:inset var(--ic-status-success) 0 0 0 var(--ic-space-xxxs);border-radius:100%}:host(.default) .current .step-icon{border:var(--ic-space-xxxs) solid var(--ic-theme-primary);padding:var(--ic-space-xxxs);margin:0 calc(-1 * var(--ic-space-xxxs));}.step-connect{height:var(--ic-space-xxxs);background-color:var(--ic-architectural-200);margin:0 var(--ic-space-xs);border-radius:var(--ic-space-xxs);width:100%}.aligned-full-width.step-connect{min-width:100px;width:100%}.disabled .step-connect{height:0;background-color:rgb(0 0 0 / 0%);border-top:2px dashed var(--ic-architectural-200);border-radius:0}.completed .step-connect{background-color:var(--ic-status-success)}.step-connect-inner{width:70%;display:flex;flex:auto;height:var(--ic-space-xxxs);border-radius:var(--ic-space-xxs);background-color:var(--ic-theme-primary)}.step-icon-inner .check-icon{padding-top:var(--ic-space-xxs)}.step-icon-inner .check-icon svg{width:var(--ic-space-md);height:auto}.step-icon-inner .check-icon>svg>path{fill:var(--ic-color-white-text)}@media (forced-colors: active){.compact-step-disabled :is(.step-title,.step-status){color:GrayText}.step-connect:not(.disabled .step-connect){border:var(--ic-hc-border)}.active .step-icon-inner,.completed .step-icon-inner,.current .step-icon-inner{forced-color-adjust:none;box-shadow:inset canvastext 0 0 0 2px;background-color:transparent;color:canvastext}:host(.default) .current .step-icon{padding:0;border:none}.disabled,.disabled .step-title-area{color:GrayText}.step-connect-inner,.completed .step-connect{background-color:canvastext}.step-icon-inner .check-icon>svg>path{fill:canvastext}}";
6
11
 
7
12
  const Step = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
8
13
  constructor() {
9
14
  super();
10
15
  this.__registerHost();
11
16
  this.__attachShadow();
12
- this.stepType = "active";
17
+ this.variant = undefined;
13
18
  this.stepTitle = undefined;
14
19
  this.stepSubtitle = undefined;
20
+ this.stepStatus = undefined;
21
+ this.stepType = "active";
22
+ this.current = false;
23
+ this.compactStepStyling = undefined;
15
24
  this.stepNum = undefined;
16
25
  this.lastStep = undefined;
26
+ this.lastStepNum = undefined;
27
+ this.nextStepTitle = undefined;
28
+ this.progress = undefined;
17
29
  }
18
- render() {
19
- let icon;
20
- if (this.stepType !== "completed") {
21
- icon = (h("ic-typography", { variant: "subtitle-small" }, h("span", { class: "step-icon-inner", "aria-hidden": "true" }, this.stepNum)));
30
+ stepTypeChangeHandler() {
31
+ if (this.variant === "compact" && this.stepType === "current") {
32
+ this.current = true;
22
33
  }
23
34
  else {
24
- icon = (h("div", { class: "step-icon-inner", "aria-hidden": "true" }, h("span", { class: "check-icon", innerHTML: checkIcon })));
35
+ this.current = false;
25
36
  }
37
+ }
38
+ render() {
39
+ // ARIA LABEL
26
40
  let ariaLabel = "";
27
41
  if (this.stepType === "completed") {
28
42
  ariaLabel = ". Completed step";
29
43
  }
30
44
  else if (this.stepType === "disabled") {
31
- ariaLabel = ". Disabled step";
45
+ ariaLabel = ". Non-required step";
46
+ }
47
+ else if (this.stepStatus === "required") {
48
+ ariaLabel = ". Required step";
49
+ }
50
+ else if (this.stepStatus === "optional") {
51
+ ariaLabel = ". Optional step";
52
+ }
53
+ // STEP STATUS
54
+ let stepStatus;
55
+ if (this.stepStatus) {
56
+ stepStatus = this.stepStatus[0].toUpperCase() + this.stepStatus.slice(1);
57
+ }
58
+ // STEP TYPE
59
+ let stepType;
60
+ if (this.stepType === "disabled" ||
61
+ this.compactStepStyling === "disabled") {
62
+ stepType = "Not required";
63
+ }
64
+ else if (this.compactStepStyling === "completed") {
65
+ stepType = "Completed";
32
66
  }
67
+ // STATUS ICON FOR COMPACT STEP
68
+ let statusIcon;
69
+ if (this.stepType === "completed" ||
70
+ this.compactStepStyling === "completed") {
71
+ statusIcon = (h("span", { class: "check-icon step-icon", "aria-hidden": "true", innerHTML: checkIcon }));
72
+ }
73
+ else if (this.stepType === "disabled" ||
74
+ this.compactStepStyling === "disabled") {
75
+ statusIcon = (h("span", { class: "warning-icon step-icon", "aria-hidden": "true", innerHTML: warningIcon }));
76
+ }
77
+ // COMPACT STEP COMPONENT
78
+ const compactStep = (h("div", { class: {
79
+ ["step"]: true,
80
+ ["current"]: this.current,
81
+ [`compact-step-${this.compactStepStyling}`]: !!this.compactStepStyling,
82
+ } }, h("ic-loading-indicator", { class: {
83
+ "compact-step-progress-indicator": true,
84
+ "not-required": this.stepType === "disabled" ||
85
+ this.compactStepStyling === "disabled",
86
+ }, "aria-hidden": "true", size: "small", "inner-label": this.stepNum, progress: this.progress }), h("div", { class: "step-title-area" }, h("ic-typography", { variant: "h4", class: "step-title" }, this.stepTitle), h("div", { class: "info-line" }, h("ic-typography", { variant: "caption", class: "step-num" }, `${this.stepNum} of ${this.lastStepNum}`, h("span", { class: "visually-hidden" }, " steps")), (this.stepSubtitle ||
87
+ this.stepType === "completed" ||
88
+ this.stepType === "disabled" ||
89
+ (this.variant === "compact" &&
90
+ !!this.compactStepStyling &&
91
+ this.compactStepStyling !== "active") ||
92
+ !!this.stepStatus) && (h("div", { class: "step-status" }, statusIcon && statusIcon, (this.stepSubtitle || stepType) && (h("ic-typography", { variant: "caption" }, this.stepSubtitle !== null &&
93
+ this.stepSubtitle !== undefined
94
+ ? this.stepSubtitle
95
+ : this.stepType === "disabled" ||
96
+ (this.variant === "compact" &&
97
+ this.compactStepStyling === "disabled") ||
98
+ this.stepType === "completed" ||
99
+ (this.variant === "compact" &&
100
+ this.compactStepStyling === "completed")
101
+ ? stepType
102
+ : this.stepStatus && stepStatus))))), this.lastStep ? (h("ic-typography", { variant: "subtitle-small", class: "next-step" }, "Last step")) : (this.nextStepTitle !== undefined && (h("ic-typography", { variant: "subtitle-small", class: "next-step" }, "Next", h("span", { class: "visually-hidden" }, " step is"), ":", " ", this.nextStepTitle))))));
103
+ // ICON FOR DEFAULT STEP
104
+ let icon;
105
+ if (this.stepType !== "completed") {
106
+ icon = (h("ic-typography", { variant: "subtitle-small" }, h("span", { class: "step-icon-inner", "aria-hidden": "true" }, this.stepNum)));
107
+ }
108
+ else {
109
+ icon = (h("div", { class: "step-icon-inner", "aria-hidden": "true" }, h("span", { class: "check-icon", innerHTML: checkIcon })));
110
+ }
111
+ // STEP CONNECT FOR DEFAULT STEP
33
112
  const partialBar = this.stepType === "current" && (h("div", { class: "step-connect-inner" }));
34
113
  const finalStep = !this.lastStep && (h("div", { class: {
35
114
  ["step-connect"]: true,
36
- ["aligned-full-width"]: this.el.parentElement.classList.contains("aligned-full-width"),
115
+ ["aligned-full-width"]: this.el.parentElement.classList.contains("default") &&
116
+ !this.el.parentElement.classList.contains("aligned-left"),
37
117
  } }, partialBar));
38
- return (h(Host, { role: "listitem", "aria-label": `Step ${this.stepNum}${ariaLabel}`, "aria-current": this.stepType == "current" ? "step" : null, class: {
39
- ["aligned-full-width"]: this.el.parentElement.classList.contains("aligned-full-width"),
40
- } }, h("div", { class: {
118
+ // DEFAULT STEP COMPONENT
119
+ const defaultStep = (h("div", { class: {
41
120
  ["step"]: true,
42
121
  [`${this.stepType}`]: true,
43
- } }, h("div", { class: "step-top" }, h("div", { class: "step-icon" }, icon), finalStep), (this.stepTitle || this.stepSubtitle) && (h("div", { class: "step-title-area" }, this.stepTitle && (h("ic-typography", { variant: "subtitle-large", class: "step-title" }, this.stepTitle)), this.stepSubtitle && (h("ic-typography", { variant: "caption", class: "step-subtitle" }, this.stepSubtitle)))))));
122
+ } }, h("div", { class: "step-top" }, h("div", { class: "step-icon" }, icon), finalStep), (this.stepTitle || this.stepSubtitle || this.stepStatus) && (h("div", { class: "step-title-area" }, this.stepTitle && (h("ic-typography", { variant: "subtitle-large", class: "step-title" }, this.stepTitle)), this.stepTitle && (this.stepSubtitle || this.stepStatus) && (h("ic-typography", { variant: "caption", class: "step-subtitle" }, this.stepSubtitle !== null && this.stepSubtitle !== undefined
123
+ ? this.stepSubtitle
124
+ : stepStatus))))));
125
+ return (h(Host, { role: "listitem", "aria-label": `Step ${this.stepNum}${ariaLabel}`, "aria-current": (this.current || this.stepType === "current") && "step", class: {
126
+ ["aligned-full-width"]: this.el.parentElement.classList.contains("default") &&
127
+ !this.el.parentElement.classList.contains("aligned-left"),
128
+ [`${this.variant}`]: true,
129
+ } }, this.variant === "compact" ? compactStep : defaultStep));
44
130
  }
45
131
  get el() { return this; }
132
+ static get watchers() { return {
133
+ "stepType": ["stepTypeChangeHandler"]
134
+ }; }
46
135
  static get style() { return icStepCss; }
47
136
  }, [1, "ic-step", {
48
- "stepType": [1, "step-type"],
137
+ "variant": [1],
49
138
  "stepTitle": [1, "step-title"],
50
139
  "stepSubtitle": [1, "step-subtitle"],
140
+ "stepStatus": [1, "step-status"],
141
+ "stepType": [1, "step-type"],
142
+ "current": [1028],
143
+ "compactStepStyling": [1, "compact-step-styling"],
51
144
  "stepNum": [2, "step-num"],
52
- "lastStep": [4, "last-step"]
145
+ "lastStep": [4, "last-step"],
146
+ "lastStepNum": [2, "last-step-num"],
147
+ "nextStepTitle": [1, "next-step-title"],
148
+ "progress": [2]
53
149
  }]);
54
150
  function defineCustomElement$1() {
55
151
  if (typeof customElements === "undefined") {
56
152
  return;
57
153
  }
58
- const components = ["ic-step", "ic-typography"];
154
+ const components = ["ic-step", "ic-loading-indicator", "ic-typography"];
59
155
  components.forEach(tagName => { switch (tagName) {
60
156
  case "ic-step":
61
157
  if (!customElements.get(tagName)) {
62
158
  customElements.define(tagName, Step);
63
159
  }
64
160
  break;
161
+ case "ic-loading-indicator":
162
+ if (!customElements.get(tagName)) {
163
+ defineCustomElement$3();
164
+ }
165
+ break;
65
166
  case "ic-typography":
66
167
  if (!customElements.get(tagName)) {
67
168
  defineCustomElement$2();
@@ -1 +1 @@
1
- {"file":"ic-step.js","mappings":";;;;AAAA,MAAM,SAAS,GAAG,uoFAAuoF;;MCS5oF,IAAI;;;;;oBAKkB,QAAQ;;;;;;EAsBzC,MAAM;IACJ,IAAI,IAAI,CAAC;IACT,IAAI,IAAI,CAAC,QAAQ,KAAK,WAAW,EAAE;MACjC,IAAI,IACF,qBAAe,OAAO,EAAC,gBAAgB,IACrC,YAAM,KAAK,EAAC,iBAAiB,iBAAa,MAAM,IAC7C,IAAI,CAAC,OAAO,CACR,CACO,CACjB,CAAC;KACH;SAAM;MACL,IAAI,IACF,WAAK,KAAK,EAAC,iBAAiB,iBAAa,MAAM,IAC7C,YAAM,KAAK,EAAC,YAAY,EAAC,SAAS,EAAE,SAAS,GAAS,CAClD,CACP,CAAC;KACH;IAED,IAAI,SAAS,GAAG,EAAE,CAAC;IAEnB,IAAI,IAAI,CAAC,QAAQ,KAAK,WAAW,EAAE;MACjC,SAAS,GAAG,kBAAkB,CAAC;KAChC;SAAM,IAAI,IAAI,CAAC,QAAQ,KAAK,UAAU,EAAE;MACvC,SAAS,GAAG,iBAAiB,CAAC;KAC/B;IAED,MAAM,UAAU,GAAG,IAAI,CAAC,QAAQ,KAAK,SAAS,KAC5C,WAAK,KAAK,EAAC,oBAAoB,GAAO,CACvC,CAAC;IACF,MAAM,SAAS,GAAG,CAAC,IAAI,CAAC,QAAQ,KAC9B,WACE,KAAK,EAAE;QACL,CAAC,cAAc,GAAG,IAAI;QACtB,CAAC,oBAAoB,GACnB,IAAI,CAAC,EAAE,CAAC,aAAa,CAAC,SAAS,CAAC,QAAQ,CAAC,oBAAoB,CAAC;OACjE,IAEA,UAAU,CACP,CACP,CAAC;IAEF,QACE,EAAC,IAAI,IACH,IAAI,EAAC,UAAU,gBACH,QAAQ,IAAI,CAAC,OAAO,GAAG,SAAS,EAAE,kBAChC,IAAI,CAAC,QAAQ,IAAI,SAAS,GAAG,MAAM,GAAG,IAAI,EACxD,KAAK,EAAE;QACL,CAAC,oBAAoB,GACnB,IAAI,CAAC,EAAE,CAAC,aAAa,CAAC,SAAS,CAAC,QAAQ,CAAC,oBAAoB,CAAC;OACjE,IAED,WACE,KAAK,EAAE;QACL,CAAC,MAAM,GAAG,IAAI;QACd,CAAC,GAAG,IAAI,CAAC,QAAQ,EAAE,GAAG,IAAI;OAC3B,IAED,WAAK,KAAK,EAAC,UAAU,IACnB,WAAK,KAAK,EAAC,WAAW,IAAE,IAAI,CAAO,EAClC,SAAS,CACN,EACL,CAAC,IAAI,CAAC,SAAS,IAAI,IAAI,CAAC,YAAY,MACnC,WAAK,KAAK,EAAC,iBAAiB,IACzB,IAAI,CAAC,SAAS,KACb,qBAAe,OAAO,EAAC,gBAAgB,EAAC,KAAK,EAAC,YAAY,IACvD,IAAI,CAAC,SAAS,CACD,CACjB,EACA,IAAI,CAAC,YAAY,KAChB,qBAAe,OAAO,EAAC,SAAS,EAAC,KAAK,EAAC,eAAe,IACnD,IAAI,CAAC,YAAY,CACJ,CACjB,CACG,CACP,CACG,CACD,EACP;GACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["./src/components/ic-step/ic-step.css?tag=ic-step&encapsulation=shadow","./src/components/ic-step/ic-step.tsx"],"sourcesContent":[":host {\n display: flex;\n flex: auto;\n}\n\n:host(.last-step) {\n flex-grow: initial;\n}\n\n.step {\n display: flex;\n flex-direction: column;\n flex: 1 1 0;\n}\n\n.step-top {\n display: flex;\n width: 100%;\n align-items: center;\n align-self: flex-start;\n height: 40px;\n}\n\n.step-icon {\n display: flex;\n justify-content: center;\n align-items: center;\n border-radius: 50%;\n}\n\n.step-icon-inner {\n width: var(--ic-space-xl);\n height: var(--ic-space-xl);\n display: flex;\n justify-content: center;\n align-items: center;\n border-radius: 50%;\n}\n\n.current {\n color: var(--ic-theme-primary);\n}\n\n.step-title-area {\n margin: var(--ic-space-xs) 0;\n padding-right: var(--ic-space-xs);\n}\n\n.step-title,\n.step-subtitle {\n width: fit-content;\n}\n\n.step-subtitle {\n color: var(--ic-color-tertiary-text);\n}\n\n.current .step-subtitle {\n color: var(--ic-color-primary-text);\n}\n\n.completed {\n color: var(--ic-status-success);\n}\n\n.active .step-icon-inner {\n box-shadow: inset var(--ic-architectural-200) 0 0 0 2px;\n}\n\n.current .step-icon-inner {\n background-color: var(--ic-theme-primary);\n color: white;\n}\n\n.disabled {\n color: var(--ic-architectural-200);\n}\n\n.disabled .step-icon {\n border: 1px dashed var(--ic-architectural-200);\n width: calc(var(--ic-space-xl) - var(--ic-space-xxxs));\n height: calc(var(--ic-space-xl) - var(--ic-space-xxxs));\n}\n\n.disabled .step-title-area {\n color: var(--ic-color-tertiary-text);\n}\n\n.completed .step-icon-inner {\n background: var(--ic-status-success);\n box-shadow: inset var(--ic-status-success) 0 0 0 var(--ic-space-xxxs);\n border-radius: 100%;\n}\n\n.current .step-icon {\n border: var(--ic-space-xxxs) solid var(--ic-theme-primary);\n padding: var(--ic-space-xxxs);\n margin: 0 calc(-1 * var(--ic-space-xxxs)); /* compensating for the circle being bigger than other steps */\n}\n\n.step-connect {\n height: var(--ic-space-xxxs);\n background-color: var(--ic-architectural-200);\n margin: 0 var(--ic-space-xs);\n border-radius: var(--ic-space-xxs);\n width: 100%;\n}\n\n.aligned-full-width.step-connect {\n min-width: 100px;\n width: 100%;\n}\n\n.disabled .step-connect {\n height: 0;\n background-color: rgb(0 0 0 / 0%);\n border-top: 2px dashed var(--ic-architectural-200);\n border-radius: 0;\n}\n\n.completed .step-connect {\n background-color: var(--ic-status-success);\n}\n\n.step-connect-inner {\n width: 70%;\n display: flex;\n flex: auto;\n height: var(--ic-space-xxxs);\n border-radius: var(--ic-space-xxs);\n background-color: var(--ic-theme-primary);\n}\n\n.check-icon {\n padding-top: var(--ic-space-xxs);\n}\n\n.check-icon svg {\n width: 16px;\n height: 16px;\n}\n\n.check-icon > svg > path {\n fill: white;\n}\n\n/** High Contrast **/\n@media (forced-colors: active) {\n .step-connect:not(.disabled .step-connect) {\n border: var(--ic-hc-border);\n }\n\n .active .step-icon-inner,\n .completed .step-icon-inner,\n .current .step-icon-inner {\n forced-color-adjust: none;\n box-shadow: inset canvastext 0 0 0 2px;\n background-color: transparent;\n color: canvastext;\n }\n\n .current .step-icon {\n padding: 0;\n border: none;\n }\n\n .disabled,\n .disabled .step-title-area {\n color: Graytext;\n }\n\n .step-connect-inner,\n .completed .step-connect {\n background-color: canvastext;\n }\n\n .check-icon > svg > path {\n fill: canvastext;\n }\n}\n","import { Component, Host, h, Prop, Element } from \"@stencil/core\";\nimport checkIcon from \"../../assets/check-icon.svg\";\nimport { IcStepTypes } from \"./ic-step.types\";\n\n@Component({\n tag: \"ic-step\",\n styleUrl: \"ic-step.css\",\n shadow: true,\n})\nexport class Step {\n @Element() el: HTMLIcStepElement;\n /**\n * The state of the step within the stepper.\n */\n @Prop() stepType?: IcStepTypes = \"active\";\n\n /**\n * The name of the step within the stepper.\n */\n @Prop() stepTitle?: string;\n\n /**\n * The additional information about the step.\n */\n @Prop() stepSubtitle?: string;\n\n /**\n * @internal The step number, managed by ic-stepper.\n */\n @Prop() stepNum?: number;\n\n /**\n * @internal If `true`, the step will be marked as being the last one in the series. This is managed by ic-stepper.\n */\n @Prop() lastStep?: boolean;\n\n render() {\n let icon;\n if (this.stepType !== \"completed\") {\n icon = (\n <ic-typography variant=\"subtitle-small\">\n <span class=\"step-icon-inner\" aria-hidden=\"true\">\n {this.stepNum}\n </span>\n </ic-typography>\n );\n } else {\n icon = (\n <div class=\"step-icon-inner\" aria-hidden=\"true\">\n <span class=\"check-icon\" innerHTML={checkIcon}></span>\n </div>\n );\n }\n\n let ariaLabel = \"\";\n\n if (this.stepType === \"completed\") {\n ariaLabel = \". Completed step\";\n } else if (this.stepType === \"disabled\") {\n ariaLabel = \". Disabled step\";\n }\n\n const partialBar = this.stepType === \"current\" && (\n <div class=\"step-connect-inner\"></div>\n );\n const finalStep = !this.lastStep && (\n <div\n class={{\n [\"step-connect\"]: true,\n [\"aligned-full-width\"]:\n this.el.parentElement.classList.contains(\"aligned-full-width\"),\n }}\n >\n {partialBar}\n </div>\n );\n\n return (\n <Host\n role=\"listitem\"\n aria-label={`Step ${this.stepNum}${ariaLabel}`}\n aria-current={this.stepType == \"current\" ? \"step\" : null}\n class={{\n [\"aligned-full-width\"]:\n this.el.parentElement.classList.contains(\"aligned-full-width\"),\n }}\n >\n <div\n class={{\n [\"step\"]: true,\n [`${this.stepType}`]: true,\n }}\n >\n <div class=\"step-top\">\n <div class=\"step-icon\">{icon}</div>\n {finalStep}\n </div>\n {(this.stepTitle || this.stepSubtitle) && (\n <div class=\"step-title-area\">\n {this.stepTitle && (\n <ic-typography variant=\"subtitle-large\" class=\"step-title\">\n {this.stepTitle}\n </ic-typography>\n )}\n {this.stepSubtitle && (\n <ic-typography variant=\"caption\" class=\"step-subtitle\">\n {this.stepSubtitle}\n </ic-typography>\n )}\n </div>\n )}\n </div>\n </Host>\n );\n }\n}\n"],"version":3}
1
+ {"file":"ic-step.js","mappings":";;;;;;;;;AAAA,MAAM,SAAS,GAAG,uoIAAuoI;;MCU5oI,IAAI;;;;;;;;;oBAyBkB,QAAQ;mBAKI,KAAK;;;;;;;;EAiClD,qBAAqB;IACnB,IAAI,IAAI,CAAC,OAAO,KAAK,SAAS,IAAI,IAAI,CAAC,QAAQ,KAAK,SAAS,EAAE;MAC7D,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC;KACrB;SAAM;MACL,IAAI,CAAC,OAAO,GAAG,KAAK,CAAC;KACtB;GACF;EAED,MAAM;;IAEJ,IAAI,SAAS,GAAG,EAAE,CAAC;IA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,CAAC,cAAc,CAAC;QAC3D,CAAC,GAAG,IAAI,CAAC,OAAO,EAAE,GAAG,IAAI;OAC1B,IAEA,IAAI,CAAC,OAAO,KAAK,SAAS,GAAG,WAAW,GAAG,WAAW,CAClD,EACP;GACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["./src/components/ic-step/ic-step.css?tag=ic-step&encapsulation=shadow","./src/components/ic-step/ic-step.tsx"],"sourcesContent":["/* SHARED STYLING */\n:host {\n display: flex;\n flex: auto;\n}\n\n.step {\n display: flex;\n flex: 1 1 0;\n}\n\n.step-icon {\n display: flex;\n justify-content: center;\n}\n\n.step-title,\n.step-subtitle,\n.step-status,\n.next-step {\n white-space: pre-line;\n}\n\n.visually-hidden {\n position: absolute;\n left: -10000px;\n top: auto;\n width: 1px;\n height: 1px;\n overflow: hidden;\n}\n\n/* COMPACT STEP STYLING */\n:host(.compact) {\n column-gap: var(--ic-space-sm);\n\n --compact-step-inner-color: var(--ic-theme-primary);\n --compact-step-circular-line-width: var(--ic-space-xxs);\n}\n\n:host(.compact) .step {\n column-gap: var(--ic-space-sm);\n}\n\n:host(.compact) .step:not(.current) {\n display: none;\n opacity: 0;\n visibility: hidden;\n}\n\n.compact-step-progress-indicator {\n margin: var(--ic-space-xs) 0 0;\n}\n\n:host(.compact) .step-title-area {\n display: flex;\n flex-direction: column;\n width: 228px;\n}\n\n.info-line {\n display: flex;\n column-gap: var(--ic-space-xs);\n}\n\n.step-status {\n display: flex;\n color: var(--ic-color-secondary-text);\n column-gap: var(--ic-space-xxxs);\n}\n\n.compact-step-completed .step-status {\n color: var(--ic-status-success);\n}\n\n.compact-step-disabled :is(.step-title, .step-status) {\n color: var(--ic-color-tertiary-text);\n}\n\n.step-num {\n color: var(--ic-color-secondary-text);\n white-space: nowrap;\n}\n\n:host(.compact) .step-icon {\n margin: var(--ic-space-xxxs);\n}\n\n:host(.compact) .step-icon svg {\n width: 16px;\n height: 16px;\n}\n\n/* DEFAULT STEP STYLING */\n:host(.default) .step {\n flex-direction: column;\n}\n\n:host(.default.last-step) {\n flex-grow: initial;\n}\n\n.step-top {\n display: flex;\n width: 100%;\n align-items: center;\n align-self: flex-start;\n height: 40px;\n}\n\n:host(.default) .step-icon {\n border-radius: 50%;\n}\n\n.step-icon-inner {\n width: var(--ic-space-xl);\n height: var(--ic-space-xl);\n display: flex;\n justify-content: center;\n align-items: center;\n border-radius: 50%;\n}\n\n:host(.default) .current {\n color: var(--ic-theme-primary);\n}\n\n:host(.default) .step-title-area {\n margin: var(--ic-space-xs) 0;\n padding-right: var(--ic-space-xs);\n width: 100%;\n}\n\n:host(.default) .step-title,\n.step-subtitle {\n width: fit-content;\n}\n\n.step-subtitle {\n color: var(--ic-color-tertiary-text);\n}\n\n.current .step-subtitle {\n color: var(--ic-color-primary-text);\n}\n\n:host(.default) .completed {\n color: var(--ic-status-success);\n}\n\n.active .step-icon-inner {\n box-shadow: inset var(--ic-architectural-200) 0 0 0 2px;\n}\n\n.current .step-icon-inner {\n background-color: var(--ic-theme-primary);\n color: white;\n}\n\n.disabled {\n color: var(--ic-architectural-200);\n}\n\n.disabled .step-icon-inner {\n border: 1px dashed var(--ic-architectural-200);\n width: calc(var(--ic-space-xl) - var(--ic-space-xxxs));\n height: calc(var(--ic-space-xl) - var(--ic-space-xxxs));\n}\n\n.disabled .step-title-area {\n color: var(--ic-color-tertiary-text);\n}\n\n.completed .step-icon-inner {\n background: var(--ic-status-success);\n box-shadow: inset var(--ic-status-success) 0 0 0 var(--ic-space-xxxs);\n border-radius: 100%;\n}\n\n:host(.default) .current .step-icon {\n border: var(--ic-space-xxxs) solid var(--ic-theme-primary);\n padding: var(--ic-space-xxxs);\n margin: 0 calc(-1 * var(--ic-space-xxxs));\n /* compensating for the circle being bigger than other steps */\n}\n\n.step-connect {\n height: var(--ic-space-xxxs);\n background-color: var(--ic-architectural-200);\n margin: 0 var(--ic-space-xs);\n border-radius: var(--ic-space-xxs);\n width: 100%;\n}\n\n.aligned-full-width.step-connect {\n min-width: 100px;\n width: 100%;\n}\n\n.disabled .step-connect {\n height: 0;\n background-color: rgb(0 0 0 / 0%);\n border-top: 2px dashed var(--ic-architectural-200);\n border-radius: 0;\n}\n\n.completed .step-connect {\n background-color: var(--ic-status-success);\n}\n\n.step-connect-inner {\n width: 70%;\n display: flex;\n flex: auto;\n height: var(--ic-space-xxxs);\n border-radius: var(--ic-space-xxs);\n background-color: var(--ic-theme-primary);\n}\n\n.step-icon-inner .check-icon {\n padding-top: var(--ic-space-xxs);\n}\n\n.step-icon-inner .check-icon svg {\n width: var(--ic-space-md);\n height: auto;\n}\n\n.step-icon-inner .check-icon > svg > path {\n fill: var(--ic-color-white-text);\n}\n\n/** High Contrast **/\n@media (forced-colors: active) {\n /* COMPACT STEP */\n .compact-step-disabled :is(.step-title, .step-status) {\n color: GrayText;\n }\n\n /* DEFAULT STEP */\n .step-connect:not(.disabled .step-connect) {\n border: var(--ic-hc-border);\n }\n\n .active .step-icon-inner,\n .completed .step-icon-inner,\n .current .step-icon-inner {\n forced-color-adjust: none;\n box-shadow: inset canvastext 0 0 0 2px;\n background-color: transparent;\n color: canvastext;\n }\n\n :host(.default) .current .step-icon {\n padding: 0;\n border: none;\n }\n\n .disabled,\n .disabled .step-title-area {\n color: GrayText;\n }\n\n .step-connect-inner,\n .completed .step-connect {\n background-color: canvastext;\n }\n\n .step-icon-inner .check-icon > svg > path {\n fill: canvastext;\n }\n}\n","import { Component, Host, h, Prop, Element, Watch } from \"@stencil/core\";\nimport checkIcon from \"../../assets/check-icon.svg\";\nimport warningIcon from \"../../assets/warning-icon-outline.svg\";\nimport { IcStepVariants, IcStepStatuses, IcStepTypes } from \"./ic-step.types\";\n\n@Component({\n tag: \"ic-step\",\n styleUrl: \"ic-step.css\",\n shadow: true,\n})\nexport class Step {\n @Element() el: HTMLIcStepElement;\n /**\n * @internal The variant of the step. This is managed by ic-stepper.\n */\n @Prop() variant!: IcStepVariants;\n\n /**\n * The title of the step within the stepper.\n */\n @Prop() stepTitle?: string;\n\n /**\n * Additional information about the step. Use this prop to override the default step status messaging displayed when selecting a step type or step status.\n */\n @Prop() stepSubtitle?: string;\n\n /**\n * The status of the step. Use this prop to display a status message on the step if it is required or optional.\n */\n @Prop() stepStatus?: IcStepStatuses;\n\n /**\n * The state of the step within the stepper.\n */\n @Prop() stepType?: IcStepTypes = \"active\";\n\n /**\n * @internal If `true`, and a compact stepper is being used, the current step will be the only step in view.\n */\n @Prop({ mutable: true }) current?: boolean = false;\n\n /**\n * @internal If a compact stepper is being used, this sets the styling of the step.\n */\n @Prop() compactStepStyling?: IcStepTypes;\n\n /**\n * @internal The step number, managed by ic-stepper.\n */\n @Prop() stepNum?: number;\n\n /**\n * @internal If `true`, the step will be marked as being the last one in the series. This is managed by ic-stepper.\n */\n @Prop() lastStep!: boolean;\n\n /**\n * @internal The step number of the final step. This is managed by ic-stepper.\n */\n @Prop() lastStepNum?: number;\n\n /**\n * @internal The name of the next step. This is managed by ic-stepper.\n */\n @Prop() nextStepTitle?: string;\n\n /**\n * @internal The progress of the next step, calculated by dividing the current step number by the total number of steps. This is managed by ic-stepper.\n */\n @Prop() progress?: number;\n\n @Watch(\"stepType\")\n stepTypeChangeHandler(): void {\n if (this.variant === \"compact\" && this.stepType === \"current\") {\n this.current = true;\n } else {\n this.current = false;\n }\n }\n\n render() {\n // ARIA LABEL\n let ariaLabel = \"\";\n\n if (this.stepType === \"completed\") {\n ariaLabel = \". Completed step\";\n } else if (this.stepType === \"disabled\") {\n ariaLabel = \". Non-required step\";\n } else if (this.stepStatus === \"required\") {\n ariaLabel = \". Required step\";\n } else if (this.stepStatus === \"optional\") {\n ariaLabel = \". Optional step\";\n }\n\n // STEP STATUS\n let stepStatus;\n if (this.stepStatus) {\n stepStatus = this.stepStatus[0].toUpperCase() + this.stepStatus.slice(1);\n }\n\n // STEP TYPE\n let stepType;\n if (\n this.stepType === \"disabled\" ||\n this.compactStepStyling === \"disabled\"\n ) {\n stepType = \"Not required\";\n } else if (this.compactStepStyling === \"completed\") {\n stepType = \"Completed\";\n }\n\n // STATUS ICON FOR COMPACT STEP\n let statusIcon;\n if (\n this.stepType === \"completed\" ||\n this.compactStepStyling === \"completed\"\n ) {\n statusIcon = (\n <span\n class=\"check-icon step-icon\"\n aria-hidden=\"true\"\n innerHTML={checkIcon}\n ></span>\n );\n } else if (\n this.stepType === \"disabled\" ||\n this.compactStepStyling === \"disabled\"\n ) {\n statusIcon = (\n <span\n class=\"warning-icon step-icon\"\n aria-hidden=\"true\"\n innerHTML={warningIcon}\n ></span>\n );\n }\n\n // COMPACT STEP COMPONENT\n const compactStep = (\n <div\n class={{\n [\"step\"]: true,\n [\"current\"]: this.current,\n [`compact-step-${this.compactStepStyling}`]:\n !!this.compactStepStyling,\n }}\n >\n <ic-loading-indicator\n class={{\n \"compact-step-progress-indicator\": true,\n \"not-required\":\n this.stepType === \"disabled\" ||\n this.compactStepStyling === \"disabled\",\n }}\n aria-hidden=\"true\"\n size=\"small\"\n inner-label={this.stepNum}\n progress={this.progress}\n ></ic-loading-indicator>\n <div class=\"step-title-area\">\n <ic-typography variant=\"h4\" class=\"step-title\">\n {this.stepTitle}\n </ic-typography>\n <div class=\"info-line\">\n <ic-typography variant=\"caption\" class=\"step-num\">\n {`${this.stepNum} of ${this.lastStepNum}`}\n <span class=\"visually-hidden\"> steps</span>\n </ic-typography>\n {(this.stepSubtitle ||\n this.stepType === \"completed\" ||\n this.stepType === \"disabled\" ||\n (this.variant === \"compact\" &&\n !!this.compactStepStyling &&\n this.compactStepStyling !== \"active\") ||\n !!this.stepStatus) && (\n <div class=\"step-status\">\n {statusIcon && statusIcon}\n {(this.stepSubtitle || stepType) && (\n <ic-typography variant=\"caption\">\n {this.stepSubtitle !== null &&\n this.stepSubtitle !== undefined\n ? this.stepSubtitle\n : this.stepType === \"disabled\" ||\n (this.variant === \"compact\" &&\n this.compactStepStyling === \"disabled\") ||\n this.stepType === \"completed\" ||\n (this.variant === \"compact\" &&\n this.compactStepStyling === \"completed\")\n ? stepType\n : this.stepStatus && stepStatus}\n </ic-typography>\n )}\n </div>\n )}\n </div>\n {this.lastStep ? (\n <ic-typography variant=\"subtitle-small\" class=\"next-step\">\n Last step\n </ic-typography>\n ) : (\n this.nextStepTitle !== undefined && (\n <ic-typography variant=\"subtitle-small\" class=\"next-step\">\n Next<span class=\"visually-hidden\"> step is</span>:{\" \"}\n {this.nextStepTitle}\n </ic-typography>\n )\n )}\n </div>\n </div>\n );\n\n // ICON FOR DEFAULT STEP\n let icon;\n if (this.stepType !== \"completed\") {\n icon = (\n <ic-typography variant=\"subtitle-small\">\n <span class=\"step-icon-inner\" aria-hidden=\"true\">\n {this.stepNum}\n </span>\n </ic-typography>\n );\n } else {\n icon = (\n <div class=\"step-icon-inner\" aria-hidden=\"true\">\n <span class=\"check-icon\" innerHTML={checkIcon}></span>\n </div>\n );\n }\n\n // STEP CONNECT FOR DEFAULT STEP\n const partialBar = this.stepType === \"current\" && (\n <div class=\"step-connect-inner\"></div>\n );\n\n const finalStep = !this.lastStep && (\n <div\n class={{\n [\"step-connect\"]: true,\n [\"aligned-full-width\"]:\n this.el.parentElement.classList.contains(\"default\") &&\n !this.el.parentElement.classList.contains(\"aligned-left\"),\n }}\n >\n {partialBar}\n </div>\n );\n\n // DEFAULT STEP COMPONENT\n const defaultStep = (\n <div\n class={{\n [\"step\"]: true,\n [`${this.stepType}`]: true,\n }}\n >\n <div class=\"step-top\">\n <div class=\"step-icon\">{icon}</div>\n {finalStep}\n </div>\n {(this.stepTitle || this.stepSubtitle || this.stepStatus) && (\n <div class=\"step-title-area\">\n {this.stepTitle && (\n <ic-typography variant=\"subtitle-large\" class=\"step-title\">\n {this.stepTitle}\n </ic-typography>\n )}\n {this.stepTitle && (this.stepSubtitle || this.stepStatus) && (\n <ic-typography variant=\"caption\" class=\"step-subtitle\">\n {this.stepSubtitle !== null && this.stepSubtitle !== undefined\n ? this.stepSubtitle\n : stepStatus}\n </ic-typography>\n )}\n </div>\n )}\n </div>\n );\n\n return (\n <Host\n role=\"listitem\"\n aria-label={`Step ${this.stepNum}${ariaLabel}`}\n aria-current={(this.current || this.stepType === \"current\") && \"step\"}\n class={{\n [\"aligned-full-width\"]:\n this.el.parentElement.classList.contains(\"default\") &&\n !this.el.parentElement.classList.contains(\"aligned-left\"),\n [`${this.variant}`]: true,\n }}\n >\n {this.variant === \"compact\" ? compactStep : defaultStep}\n </Host>\n );\n }\n}\n"],"version":3}
@@ -1,75 +1,196 @@
1
1
  import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
2
2
  import { c as checkResizeObserver } from './helpers.js';
3
3
 
4
- const icStepperCss = ":host{display:flex;width:100%}.step-item-list{display:flex;margin:0;padding:0}:host(.aligned-full-width) .step-item-list{flex:auto}";
4
+ const icStepperCss = ":host{display:flex;width:100%}.step-item-list{display:flex;margin:0;padding:0}:host(.default:not(.aligned-left)) .step-item-list{flex:auto}:host(.compact) ul ::slotted(ic-step){display:none}:host(.compact) ul ::slotted(ic-step.show){display:flex}:host(.compact) ul ::slotted(ic-step.hide){display:none;opacity:0;visibility:hidden}";
5
5
 
6
- const IcStepper$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
6
+ const Stepper = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
7
7
  constructor() {
8
8
  super();
9
9
  this.__registerHost();
10
10
  this.__attachShadow();
11
11
  this.resizeObserver = null;
12
- /**
13
- * Get all steps currently within this stepper
14
- */
12
+ // Get all steps currently within this stepper
15
13
  this.getChildren = () => {
16
14
  this.steps = Array.from(this.el.querySelectorAll("ic-step"));
15
+ this.stepsWithStepTitles = Array.from(this.el.querySelectorAll("ic-step[step-title]"));
16
+ };
17
+ // Inform the user that stepTitles are required on all steps in a compact stepper
18
+ this.checkStepTitles = () => {
19
+ if (this.stepsWithStepTitles.length < this.steps.length &&
20
+ this.variantOverride &&
21
+ this.variant === "compact") {
22
+ this.noOfResizes = this.noOfResizes + 1;
23
+ if (this.noOfResizes === 1) {
24
+ console.error(`The prop 'step-title' (web components) / 'stepTitle' (react) is required for all steps of the Stepper component (compact variant)`);
25
+ }
26
+ }
27
+ };
28
+ this.setStepTypes = () => {
29
+ this.getChildren();
30
+ this.stepTypes = [];
31
+ for (let i = 0; i < this.steps.length; i++) {
32
+ this.stepTypes.push("active");
33
+ }
34
+ };
35
+ this.setStepperWidth = () => {
36
+ this.alignedFullWidth =
37
+ this.variant === "default" && this.aligned === "full-width";
38
+ const lastStep = this.steps[this.steps.length - 1];
39
+ lastStep.style.maxWidth = "none";
40
+ if (this.alignedFullWidth) {
41
+ this.stepperWidth = this.el.offsetWidth;
42
+ lastStep.style.maxWidth = `${this.stepperWidth / this.steps.length}px`;
43
+ this.lastStepWidth = lastStep.offsetWidth;
44
+ }
17
45
  };
18
46
  this.initialiseStepStates = () => {
19
47
  this.steps.forEach((step, index) => {
48
+ // Set variant
49
+ step.variant = this.variant;
20
50
  // Assign stepNum to each step
21
51
  step.stepNum = index + 1;
22
- //Assign lastStep to final step
52
+ // Assign lastStep to final step
23
53
  step.lastStep = index === this.steps.length - 1;
24
- if (step.lastStep) {
25
- step.classList.add("last-step");
26
- if (this.el.classList.contains("aligned-full-width")) {
27
- step.style.maxWidth = `${this.lastStepWidth}px`;
54
+ step.lastStepNum = this.steps.length;
55
+ if (step.stepType !== "current") {
56
+ step.current = false;
57
+ this.stepTypes[index] = step.stepType;
58
+ }
59
+ else {
60
+ step.current = true;
61
+ }
62
+ const stepTitleArea = step.shadowRoot &&
63
+ step.shadowRoot.querySelector(".step > .step-title-area");
64
+ if (this.stepsWithStepTitles.length == 0 && this.variantOverride) {
65
+ if (this.variant === "compact") {
66
+ this.autoSetStepTitles = true;
67
+ if (this.autoSetStepTitles) {
68
+ step.stepTitle = "Step " + step.stepNum;
69
+ stepTitleArea &&
70
+ stepTitleArea
71
+ .querySelector(".step-title")
72
+ .setAttribute("aria-hidden", "true");
73
+ }
74
+ }
75
+ if (this.variant === "default") {
76
+ this.autoSetStepTitles = false;
77
+ if (!this.autoSetStepTitles) {
78
+ step.stepTitle = undefined;
79
+ stepTitleArea &&
80
+ stepTitleArea
81
+ .querySelector(".step-title")
82
+ .removeAttribute("aria-hidden");
83
+ }
84
+ }
85
+ }
86
+ if (this.variant === "compact") {
87
+ if (step.current === true || step.stepType === "current") {
88
+ step.classList.remove("hide");
89
+ step.classList.add("show");
90
+ }
91
+ else if (step.classList.contains("show")) {
92
+ step.classList.remove("show");
93
+ step.classList.add("hide");
94
+ }
95
+ if (!step.lastStep) {
96
+ step.nextStepTitle = this.steps[index + 1].stepTitle;
97
+ step.progress = (step.stepNum / this.steps.length) * 100;
98
+ }
99
+ else if (step.lastStep && this.stepTypes[index] !== "completed") {
100
+ step.progress = 95;
101
+ }
102
+ else {
103
+ step.progress = 100;
28
104
  }
29
- if (this.el.classList.contains("aligned-left")) {
30
- step.style.maxWidth = `${this.connectorWidth + 48}px`;
105
+ if (this.hideStepInfo && stepTitleArea !== null) {
106
+ stepTitleArea.classList.remove("visually-hidden");
107
+ }
108
+ step.compactStepStyling = this.stepTypes[index];
109
+ }
110
+ if (this.variant === "default") {
111
+ if (!step.lastStep) {
112
+ if (this.alignedFullWidth) {
113
+ step.style.width = `${(this.stepperWidth - this.lastStepWidth) / (this.steps.length - 1)}px`;
114
+ step.style.minWidth = "148px";
115
+ }
116
+ }
117
+ else if (step.lastStep) {
118
+ step.classList.add("last-step");
119
+ if (this.alignedFullWidth) {
120
+ step.style.maxWidth = `${this.lastStepWidth}px`;
121
+ }
122
+ else {
123
+ step.style.maxWidth =
124
+ this.connectorWidth > 100
125
+ ? `${this.connectorWidth + 48}px`
126
+ : "148px";
127
+ }
128
+ }
129
+ if (this.aligned === "left") {
130
+ step.style.width =
131
+ this.connectorWidth > 100
132
+ ? `${this.connectorWidth + 48}px`
133
+ : "148px";
134
+ const stepConnect = step.shadowRoot.querySelector(".step > .step-top > .step-connect");
135
+ if (stepConnect) {
136
+ stepConnect.style.width =
137
+ this.connectorWidth > 100 ? `${this.connectorWidth}px` : "100px";
138
+ }
139
+ }
140
+ if (this.hideStepInfo && stepTitleArea !== null) {
141
+ stepTitleArea.classList.add("visually-hidden");
31
142
  }
32
143
  }
33
144
  });
34
- for (let i = 0; i < this.steps.length - 1; i++) {
35
- if (this.el.classList.contains("aligned-full-width")) {
36
- this.steps[i].style.width = `${(this.stepperWidth - this.lastStepWidth) / (this.steps.length - 1)}px`;
37
- this.steps[i].style.minWidth = "148px";
145
+ };
146
+ this.overrideVariant = () => {
147
+ let minDefaultStepperWidth = 148 * this.steps.length;
148
+ if (this.aligned === "left" && this.connectorWidth > 100) {
149
+ minDefaultStepperWidth = (this.connectorWidth + 48) * this.steps.length;
150
+ }
151
+ if (this.variantOverride) {
152
+ if (this.el.clientWidth < minDefaultStepperWidth) {
153
+ this.variant = "compact";
154
+ this.getChildren();
38
155
  }
39
- if (this.el.classList.contains("aligned-left")) {
40
- this.steps[i].style.width = `${this.connectorWidth + 48}px`;
41
- const stepConnect = this.steps[i].shadowRoot.querySelector("div > .step-top > .step-connect");
42
- stepConnect.style.width =
43
- this.connectorWidth > 100 ? `${this.connectorWidth}px` : "100px";
156
+ else {
157
+ this.variant = "default";
158
+ this.getChildren();
44
159
  }
45
160
  }
46
161
  };
162
+ this.resizeObserverCallback = () => {
163
+ this.getChildren();
164
+ this.checkStepTitles();
165
+ this.overrideVariant();
166
+ this.setStepperWidth();
167
+ this.initialiseStepStates();
168
+ };
47
169
  this.runResizeObserver = () => {
48
170
  this.resizeObserver = new ResizeObserver(() => {
49
- this.setStepperWidth();
50
- this.getChildren();
51
- this.initialiseStepStates();
171
+ this.resizeObserverCallback();
52
172
  });
53
173
  this.resizeObserver.observe(this.el);
54
174
  };
55
- this.setStepperWidth = () => {
56
- this.stepperWidth = this.el.offsetWidth;
57
- const allSteps = document.querySelectorAll("ic-step");
58
- const lastStep = allSteps[allSteps.length - 1];
59
- lastStep.style.maxWidth = "none";
60
- if (lastStep.classList.contains("aligned-full-width")) {
61
- lastStep.style.maxWidth = `${this.stepperWidth / allSteps.length}px`;
62
- }
63
- this.lastStepWidth = lastStep.offsetWidth;
64
- this.getChildren();
65
- this.initialiseStepStates();
66
- };
67
175
  this.aligned = "full-width";
176
+ this.variant = "default";
68
177
  this.connectorWidth = 100;
178
+ this.hideStepInfo = false;
69
179
  this.stepperWidth = document
70
180
  .querySelector("ic-stepper")
71
181
  .getBoundingClientRect().width;
72
182
  this.lastStepWidth = 0;
183
+ this.stepTypes = [];
184
+ this.alignedFullWidth = true;
185
+ this.autoSetStepTitles = true;
186
+ this.variantOverride = this.variant !== "compact";
187
+ this.noOfResizes = 0;
188
+ }
189
+ componentWillLoad() {
190
+ this.setStepTypes();
191
+ if (this.variant === "compact") {
192
+ this.variantOverride = false;
193
+ }
73
194
  }
74
195
  componentDidLoad() {
75
196
  checkResizeObserver(this.runResizeObserver);
@@ -81,17 +202,24 @@ const IcStepper$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
81
202
  }
82
203
  render() {
83
204
  return (h(Host, { class: {
84
- ["aligned-left"]: this.aligned === "left",
85
- ["aligned-full-width"]: this.aligned === "full-width",
205
+ [`${this.variant}`]: true,
206
+ ["aligned-left"]: this.variant === "default" && this.aligned === "left",
86
207
  } }, h("ul", { class: "step-item-list" }, h("slot", null))));
87
208
  }
88
209
  get el() { return this; }
89
210
  static get style() { return icStepperCss; }
90
211
  }, [1, "ic-stepper", {
91
212
  "aligned": [1],
213
+ "variant": [1025],
92
214
  "connectorWidth": [2, "connector-width"],
215
+ "hideStepInfo": [4, "hide-step-info"],
93
216
  "stepperWidth": [32],
94
- "lastStepWidth": [32]
217
+ "lastStepWidth": [32],
218
+ "stepTypes": [32],
219
+ "alignedFullWidth": [32],
220
+ "autoSetStepTitles": [32],
221
+ "variantOverride": [32],
222
+ "noOfResizes": [32]
95
223
  }]);
96
224
  function defineCustomElement$1() {
97
225
  if (typeof customElements === "undefined") {
@@ -101,13 +229,13 @@ function defineCustomElement$1() {
101
229
  components.forEach(tagName => { switch (tagName) {
102
230
  case "ic-stepper":
103
231
  if (!customElements.get(tagName)) {
104
- customElements.define(tagName, IcStepper$1);
232
+ customElements.define(tagName, Stepper);
105
233
  }
106
234
  break;
107
235
  } });
108
236
  }
109
237
 
110
- const IcStepper = IcStepper$1;
238
+ const IcStepper = Stepper;
111
239
  const defineCustomElement = defineCustomElement$1;
112
240
 
113
241
  export { IcStepper, defineCustomElement };
@@ -1 +1 @@
1
- {"file":"ic-stepper.js","mappings":";;;AAAA,MAAM,YAAY,GAAG,qIAAqI;;MCS7IA,WAAS;;;;;IAqBZ,mBAAc,GAAmB,IAAI,CAAC;;;;IAKtC,gBAAW,GAAG;MACpB,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,gBAAgB,CAAC,SAAS,CAAC,CAAC,CAAC;KAC9D,CAAC;IAEM,yBAAoB,GAAG;MAC7B,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,IAAI,EAAE,KAAK;;QAE7B,IAAI,CAAC,OAAO,GAAG,KAAK,GAAG,CAAC,CAAC;;QAEzB,IAAI,CAAC,QAAQ,GAAG,KAAK,KAAK,IAAI,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC;QAEhD,IAAI,IAAI,CAAC,QAAQ,EAAE;UACjB,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,WAAW,CAAC,CAAC;UAChC,IAAI,IAAI,CAAC,EAAE,CAAC,SAAS,CAAC,QAAQ,CAAC,oBAAoB,CAAC,EAAE;YACpD,IAAI,CAAC,KAAK,CAAC,QAAQ,GAAG,GAAG,IAAI,CAAC,aAAa,IAAI,CAAC;WACjD;UACD,IAAI,IAAI,CAAC,EAAE,CAAC,SAAS,CAAC,QAAQ,CAAC,cAAc,CAAC,EAAE;YAC9C,IAAI,CAAC,KAAK,CAAC,QAAQ,GAAG,GAAG,IAAI,CAAC,cAAc,GAAG,EAA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;;;;;;;","names":["IcStepper"],"sources":["./src/components/ic-stepper/ic-stepper.css?tag=ic-stepper&encapsulation=shadow","./src/components/ic-stepper/ic-stepper.tsx"],"sourcesContent":[":host {\n display: flex;\n width: 100%;\n}\n\n.step-item-list {\n display: flex;\n margin: 0;\n padding: 0;\n}\n\n:host(.aligned-full-width) .step-item-list {\n flex: auto;\n}\n","import { Component, Element, Host, Prop, h, State } from \"@stencil/core\";\nimport { checkResizeObserver } from \"../../utils/helpers\";\nimport { IcStepperAlignment } from \"./ic-stepper.types\";\n\n@Component({\n tag: \"ic-stepper\",\n styleUrl: \"ic-stepper.css\",\n shadow: true,\n})\nexport class IcStepper {\n @Element() el: HTMLIcStepperElement;\n\n /**\n * The alignment of the stepper within its container.\n */\n @Prop() aligned?: IcStepperAlignment = \"full-width\";\n\n /**\n * The length of the connnector between each step in pixels. Minimum length is 100px.\n */\n @Prop() connectorWidth?: number = 100;\n\n @State() stepperWidth: number = document\n .querySelector(\"ic-stepper\")\n .getBoundingClientRect().width;\n\n @State() lastStepWidth: number = 0;\n\n private steps: HTMLIcStepElement[];\n\n private resizeObserver: ResizeObserver = null;\n\n /**\n * Get all steps currently within this stepper\n */\n private getChildren = (): void => {\n this.steps = Array.from(this.el.querySelectorAll(\"ic-step\"));\n };\n\n private initialiseStepStates = (): void => {\n this.steps.forEach((step, index) => {\n // Assign stepNum to each step\n step.stepNum = index + 1;\n //Assign lastStep to final step\n step.lastStep = index === this.steps.length - 1;\n\n if (step.lastStep) {\n step.classList.add(\"last-step\");\n if (this.el.classList.contains(\"aligned-full-width\")) {\n step.style.maxWidth = `${this.lastStepWidth}px`;\n }\n if (this.el.classList.contains(\"aligned-left\")) {\n step.style.maxWidth = `${this.connectorWidth + 48}px`;\n }\n }\n });\n\n for (let i = 0; i < this.steps.length - 1; i++) {\n if (this.el.classList.contains(\"aligned-full-width\")) {\n this.steps[i].style.width = `${\n (this.stepperWidth - this.lastStepWidth) / (this.steps.length - 1)\n }px`;\n this.steps[i].style.minWidth = \"148px\";\n }\n\n if (this.el.classList.contains(\"aligned-left\")) {\n this.steps[i].style.width = `${this.connectorWidth + 48}px`;\n const stepConnect = this.steps[i].shadowRoot.querySelector(\n \"div > .step-top > .step-connect\"\n ) as HTMLElement;\n stepConnect.style.width =\n this.connectorWidth > 100 ? `${this.connectorWidth}px` : \"100px\";\n }\n }\n };\n\n private runResizeObserver = () => {\n this.resizeObserver = new ResizeObserver(() => {\n this.setStepperWidth();\n this.getChildren();\n this.initialiseStepStates();\n });\n this.resizeObserver.observe(this.el);\n };\n\n private setStepperWidth = (): void => {\n this.stepperWidth = this.el.offsetWidth;\n const allSteps = document.querySelectorAll(\"ic-step\");\n const lastStep = allSteps[allSteps.length - 1];\n lastStep.style.maxWidth = \"none\";\n if (lastStep.classList.contains(\"aligned-full-width\")) {\n lastStep.style.maxWidth = `${this.stepperWidth / allSteps.length}px`;\n }\n this.lastStepWidth = lastStep.offsetWidth;\n this.getChildren();\n this.initialiseStepStates();\n };\n\n componentDidLoad(): void {\n checkResizeObserver(this.runResizeObserver);\n }\n\n disconnectedCallback(): void {\n if (this.resizeObserver !== null) {\n this.resizeObserver.disconnect();\n }\n }\n\n render() {\n return (\n <Host\n class={{\n [\"aligned-left\"]: this.aligned === \"left\",\n [\"aligned-full-width\"]: this.aligned === \"full-width\",\n }}\n >\n <ul class=\"step-item-list\">\n <slot></slot>\n </ul>\n </Host>\n );\n }\n}\n"],"version":3}
1
+ {"file":"ic-stepper.js","mappings":";;;AAAA,MAAM,YAAY,GAAG,4UAA4U;;MCUpV,OAAO;;;;;IA2CV,mBAAc,GAAmB,IAAI,CAAC;;IAGtC,gBAAW,GAAG;MACpB,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,gBAAgB,CAAC,SAAS,CAAC,CAAC,CAAC;MAE7D,IAAI,CAAC,mBAAmB,GAAG,KAAK,CAAC,IAAI,CACnC,IAAI,CAAC,EAAE,CAAC,gB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BAEN,QAAQ;OACrC,aAAa,CAAC,YAAY,CAAC;OAC3B,qBAAqB,EAAE,CAAC,KAAK;yBAEC,CAAC;qBAEE,EAAE;4BAED,IAAI;6BAEH,IAAI;2BAEL,IAAI,CAAC,OAAO,KAAK,SAAS;uBAE/B,CAAC;;EAuMjC,iBAAiB;IACf,IAAI,CAAC,YAAY,EAAE,CAAC;IACpB,IAAI,IAAI,CAAC,OAAO,KAAK,SAAS,EAAE;MAC9B,IAAI,CAAC,eAAe,GAAG,KAAK,CAAC;KAC9B;GACF;EAED,gBAAgB;IACd,mBAAmB,CAAC,IAAI,CAAC,iBAAiB,CAAC,CAAC;GAC7C;EAED,oBAAoB;IAClB,IAAI,IAAI,CAAC,cAAc,KAAK,IAAI,EAAE;MAChC,IAAI,CAAC,cAAc,CAAC,UAAU,EAAE,CAAC;KAClC;GACF;EAED,MAAM;IACJ,QACE,EAAC,IAAI,IACH,KAAK,EAAE;QACL,CAAC,GAAG,IAAI,CAAC,OAAO,EAAE,GAAG,IAAI;QACzB,CAAC,cAAc,GACb,IAAI,CAAC,OAAO,KAAK,SAAS,IAAI,IAAI,CAAC,OAAO,KAAK,MAAM;OACxD,IAED,UAAI,KAAK,EAAC,gBAAgB,IACxB,eAAa,CACV,CACA,EACP;GACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":[],"sources":["./src/components/ic-stepper/ic-stepper.css?tag=ic-stepper&encapsulation=shadow","./src/components/ic-stepper/ic-stepper.tsx"],"sourcesContent":[":host {\n display: flex;\n width: 100%;\n}\n\n.step-item-list {\n display: flex;\n margin: 0;\n padding: 0;\n}\n\n:host(.default:not(.aligned-left)) .step-item-list {\n flex: auto;\n}\n\n:host(.compact) ul ::slotted(ic-step) {\n display: none;\n}\n\n:host(.compact) ul ::slotted(ic-step.show) {\n display: flex;\n}\n\n:host(.compact) ul ::slotted(ic-step.hide) {\n display: none;\n opacity: 0;\n visibility: hidden;\n}\n","import { Component, Element, Host, Prop, h, State } from \"@stencil/core\";\nimport { checkResizeObserver } from \"../../utils/helpers\";\nimport { IcStepperAlignment } from \"./ic-stepper.types\";\nimport { IcStepTypes, IcStepVariants } from \"../ic-step/ic-step.types\";\n\n@Component({\n tag: \"ic-stepper\",\n styleUrl: \"ic-stepper.css\",\n shadow: true,\n})\nexport class Stepper {\n @Element() el: HTMLIcStepperElement;\n\n /**\n * The alignment of the default stepper within its container.\n */\n @Prop() aligned?: IcStepperAlignment = \"full-width\";\n\n /**\n * The variant of the stepper.\n */\n @Prop({ mutable: true }) variant?: IcStepVariants = \"default\";\n\n /**\n * The length of the connnector between each step in pixels. Minimum length is 100px.\n */\n @Prop() connectorWidth?: number = 100;\n\n /**\n * If `true`, the information about each step, i.e. step title, step subtitle and step status, will be hidden on all default steps. The information about each step will still be visible in the compact variant of the stepper.\n */\n @Prop() hideStepInfo?: boolean = false;\n\n @State() stepperWidth: number = document\n .querySelector(\"ic-stepper\")\n .getBoundingClientRect().width;\n\n @State() lastStepWidth: number = 0;\n\n @State() stepTypes: IcStepTypes[] = [];\n\n @State() alignedFullWidth: boolean = true;\n\n @State() autoSetStepTitles: boolean = true;\n\n @State() variantOverride?: boolean = this.variant !== \"compact\";\n\n @State() noOfResizes?: number = 0;\n\n private steps: HTMLIcStepElement[];\n\n private stepsWithStepTitles: HTMLIcStepElement[];\n\n private resizeObserver: ResizeObserver = null;\n\n // Get all steps currently within this stepper\n private getChildren = (): void => {\n this.steps = Array.from(this.el.querySelectorAll(\"ic-step\"));\n\n this.stepsWithStepTitles = Array.from(\n this.el.querySelectorAll(\"ic-step[step-title]\")\n );\n };\n\n // Inform the user that stepTitles are required on all steps in a compact stepper\n private checkStepTitles = (): void => {\n if (\n this.stepsWithStepTitles.length < this.steps.length &&\n this.variantOverride &&\n this.variant === \"compact\"\n ) {\n this.noOfResizes = this.noOfResizes + 1;\n if (this.noOfResizes === 1) {\n console.error(\n `The prop 'step-title' (web components) / 'stepTitle' (react) is required for all steps of the Stepper component (compact variant)`\n );\n }\n }\n };\n\n private setStepTypes = (): void => {\n this.getChildren();\n this.stepTypes = [];\n for (let i = 0; i < this.steps.length; i++) {\n this.stepTypes.push(\"active\");\n }\n };\n\n private setStepperWidth = (): void => {\n this.alignedFullWidth =\n this.variant === \"default\" && this.aligned === \"full-width\";\n\n const lastStep = this.steps[this.steps.length - 1];\n lastStep.style.maxWidth = \"none\";\n\n if (this.alignedFullWidth) {\n this.stepperWidth = this.el.offsetWidth;\n lastStep.style.maxWidth = `${this.stepperWidth / this.steps.length}px`;\n this.lastStepWidth = lastStep.offsetWidth;\n }\n };\n\n private initialiseStepStates = (): void => {\n this.steps.forEach((step, index) => {\n // Set variant\n step.variant = this.variant;\n // Assign stepNum to each step\n step.stepNum = index + 1;\n // Assign lastStep to final step\n step.lastStep = index === this.steps.length - 1;\n step.lastStepNum = this.steps.length;\n\n if (step.stepType !== \"current\") {\n step.current = false;\n this.stepTypes[index] = step.stepType;\n } else {\n step.current = true;\n }\n\n const stepTitleArea =\n step.shadowRoot &&\n step.shadowRoot.querySelector(\".step > .step-title-area\");\n\n if (this.stepsWithStepTitles.length == 0 && this.variantOverride) {\n if (this.variant === \"compact\") {\n this.autoSetStepTitles = true;\n if (this.autoSetStepTitles) {\n step.stepTitle = \"Step \" + step.stepNum;\n stepTitleArea &&\n stepTitleArea\n .querySelector(\".step-title\")\n .setAttribute(\"aria-hidden\", \"true\");\n }\n }\n if (this.variant === \"default\") {\n this.autoSetStepTitles = false;\n if (!this.autoSetStepTitles) {\n step.stepTitle = undefined;\n stepTitleArea &&\n stepTitleArea\n .querySelector(\".step-title\")\n .removeAttribute(\"aria-hidden\");\n }\n }\n }\n\n if (this.variant === \"compact\") {\n if (step.current === true || step.stepType === \"current\") {\n step.classList.remove(\"hide\");\n step.classList.add(\"show\");\n } else if (step.classList.contains(\"show\")) {\n step.classList.remove(\"show\");\n step.classList.add(\"hide\");\n }\n\n if (!step.lastStep) {\n step.nextStepTitle = this.steps[index + 1].stepTitle;\n step.progress = (step.stepNum / this.steps.length) * 100;\n } else if (step.lastStep && this.stepTypes[index] !== \"completed\") {\n step.progress = 95;\n } else {\n step.progress = 100;\n }\n\n if (this.hideStepInfo && stepTitleArea !== null) {\n stepTitleArea.classList.remove(\"visually-hidden\");\n }\n\n step.compactStepStyling = this.stepTypes[index];\n }\n\n if (this.variant === \"default\") {\n if (!step.lastStep) {\n if (this.alignedFullWidth) {\n step.style.width = `${\n (this.stepperWidth - this.lastStepWidth) / (this.steps.length - 1)\n }px`;\n step.style.minWidth = \"148px\";\n }\n } else if (step.lastStep) {\n step.classList.add(\"last-step\");\n if (this.alignedFullWidth) {\n step.style.maxWidth = `${this.lastStepWidth}px`;\n } else {\n step.style.maxWidth =\n this.connectorWidth > 100\n ? `${this.connectorWidth + 48}px`\n : \"148px\";\n }\n }\n\n if (this.aligned === \"left\") {\n step.style.width =\n this.connectorWidth > 100\n ? `${this.connectorWidth + 48}px`\n : \"148px\";\n const stepConnect = step.shadowRoot.querySelector(\n \".step > .step-top > .step-connect\"\n ) as HTMLElement;\n\n if (stepConnect) {\n stepConnect.style.width =\n this.connectorWidth > 100 ? `${this.connectorWidth}px` : \"100px\";\n }\n }\n\n if (this.hideStepInfo && stepTitleArea !== null) {\n stepTitleArea.classList.add(\"visually-hidden\");\n }\n }\n });\n };\n\n private overrideVariant = () => {\n let minDefaultStepperWidth = 148 * this.steps.length;\n\n if (this.aligned === \"left\" && this.connectorWidth > 100) {\n minDefaultStepperWidth = (this.connectorWidth + 48) * this.steps.length;\n }\n\n if (this.variantOverride) {\n if (this.el.clientWidth < minDefaultStepperWidth) {\n this.variant = \"compact\";\n this.getChildren();\n } else {\n this.variant = \"default\";\n this.getChildren();\n }\n }\n };\n\n private resizeObserverCallback = () => {\n this.getChildren();\n this.checkStepTitles();\n this.overrideVariant();\n this.setStepperWidth();\n this.initialiseStepStates();\n };\n\n private runResizeObserver = () => {\n this.resizeObserver = new ResizeObserver(() => {\n this.resizeObserverCallback();\n });\n this.resizeObserver.observe(this.el);\n };\n\n componentWillLoad(): void {\n this.setStepTypes();\n if (this.variant === \"compact\") {\n this.variantOverride = false;\n }\n }\n\n componentDidLoad(): void {\n checkResizeObserver(this.runResizeObserver);\n }\n\n disconnectedCallback(): void {\n if (this.resizeObserver !== null) {\n this.resizeObserver.disconnect();\n }\n }\n\n render() {\n return (\n <Host\n class={{\n [`${this.variant}`]: true,\n [\"aligned-left\"]:\n this.variant === \"default\" && this.aligned === \"left\",\n }}\n >\n <ul class=\"step-item-list\">\n <slot></slot>\n </ul>\n </Host>\n );\n }\n}\n"],"version":3}